@flatbiz/antd 2.3.21 → 2.3.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.css +60 -12
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/index.d.ts +51 -28
- package/package.json +3 -3
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["@flatbiz/antd/src/01-styles/index.ts","@flatbiz/antd/src/permission/index.tsx","@flatbiz/antd/src/button-operate/index.tsx","@flatbiz/antd/src/date-picker-wrapper/index.tsx","@flatbiz/antd/src/date-range-picker-wrapper/index.tsx","@flatbiz/antd/src/drawer-wraper/drawer.model.ts","@flatbiz/antd/src/drawer-wraper/drawer-operation.tsx","@flatbiz/antd/src/drawer-wraper/drawer-wraper.tsx","@flatbiz/antd/src/drawer-wraper/index.ts","@flatbiz/antd/src/drawer-wrapper/drawer.model.ts","@flatbiz/antd/src/drawer-wrapper/drawer-operation.tsx","@flatbiz/antd/src/drawer-wrapper/drawer-wrapper.tsx","@flatbiz/antd/src/drawer-wrapper/index.ts","@flatbiz/antd/src/editable-table/utils.ts","@flatbiz/antd/src/editable-table/form-item/checkbox-group.tsx","@flatbiz/antd/src/editable-table/form-item/date-picker-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/date-range-picker-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/input.tsx","@flatbiz/antd/src/editable-table/form-item/input-number.tsx","@flatbiz/antd/src/editable-table/form-item/radio-group.tsx","@flatbiz/antd/src/selector-wrapper/model.ts","@flatbiz/antd/src/selector-wrapper/index.tsx","@flatbiz/antd/src/editable-table/form-item/selector-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/text.tsx","@flatbiz/antd/src/editable-table/form-item/textarea.tsx","@flatbiz/antd/src/hooks/use-effect-custom.ts","@flatbiz/antd/src/hooks/use-effect-custom-async.ts","@flatbiz/antd/src/upload-wrapper/index.tsx","@flatbiz/antd/src/editable-table/form-item/upload-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/index.tsx","@flatbiz/antd/src/editable-table/form-list-item/form-list.tsx","@flatbiz/antd/src/editable-table/form-list-item/index.tsx","@flatbiz/antd/src/editable-table/index.tsx","@flatbiz/antd/src/file-import/index.tsx","@flatbiz/antd/src/file-upload/index.tsx","@flatbiz/antd/src/flex-layout/index.tsx","@flatbiz/antd/src/gap/index.tsx","@flatbiz/antd/src/modal-wraper/modal.model.ts","@flatbiz/antd/src/modal-wraper/modal-operation.tsx","@flatbiz/antd/src/modal-wraper/modal-wraper.tsx","@flatbiz/antd/src/modal-wraper/index.ts","@flatbiz/antd/src/modal-wrapper/modal.model.ts","@flatbiz/antd/src/modal-wrapper/modal-operation.tsx","@flatbiz/antd/src/modal-wrapper/modal-wrapper.tsx","@flatbiz/antd/src/modal-wrapper/index.ts","@flatbiz/antd/src/page-fixed-footer/index.tsx","@flatbiz/antd/src/page404/index.tsx","@flatbiz/antd/src/pre-defined-classname/form/index.tsx","@flatbiz/antd/src/pre-defined-classname/index.ts","@flatbiz/antd/src/simple-layout/index.tsx","@flatbiz/antd/src/sms-count-down/index.tsx","@flatbiz/antd/src/table-filter-layout/index.tsx","@flatbiz/antd/src/tree-selector-wrapper/model.ts","@flatbiz/antd/src/tree-selector-wrapper/utils.ts","@flatbiz/antd/src/tree-selector-wrapper/index.tsx","@flatbiz/antd/src/tree-wrapper/model.ts","@flatbiz/antd/src/tree-wrapper/utils.ts","@flatbiz/antd/src/tree-wrapper/index.tsx"],"sourcesContent":["import { noop } from '@flatbiz/utils';\nimport './1_root.less';\nimport './2_base.less';\n\nexport const styles = noop;\n","import { isArray } from '@dimjs/lang';\nimport { getGlobalData } from '@flatbiz/utils';\nimport { FC, Fragment } from 'react';\n\nexport const getPermissionList = () => {\n const { elemAclLimits } = getGlobalData();\n const permissionList: string[] = isArray(elemAclLimits) ? elemAclLimits : [];\n return permissionList;\n};\n\nexport const hasPermission = (name: string) => {\n const permissionList = getPermissionList();\n if (permissionList.includes(name)) {\n return true;\n }\n return false;\n};\n\nexport interface PermissionProps {\n name: string;\n}\nexport const Permission: FC<PermissionProps> = (props) => {\n const permissionList = getPermissionList();\n if (permissionList.includes(props.name)) {\n return <Fragment>{props.children}</Fragment>;\n }\n return null;\n};\n","import { isUndefined } from '@dimjs/lang';\nimport { Button, ButtonProps, Divider, Popconfirm, Space, SpaceProps } from 'antd';\nimport { VFC } from 'react';\nimport { hasPermission } from '../permission';\nimport './style.less';\n\nexport interface ButtonOperateItem extends ButtonProps {\n text: string;\n color?: string;\n onClick: () => void;\n permission?: string;\n needConfirm?: boolean;\n confirmMessage?: string;\n hidden?: boolean;\n}\n\nexport interface ButtonOperateProps {\n operateList: Array<ButtonOperateItem | null>;\n wrap?: boolean;\n size?: SpaceProps['size'];\n}\n\nexport const ButtonOperate: VFC<ButtonOperateProps> = (props) => {\n return (\n <div className=\"table-operate\">\n <Space\n split={<Divider type=\"vertical\" />}\n size={props.size}\n wrap={isUndefined(props.wrap) ? true : props.wrap}\n >\n {props.operateList.map((item, index) => {\n if (!item) return null;\n const {\n text,\n color,\n onClick,\n permission,\n needConfirm,\n confirmMessage,\n hidden,\n style,\n ...otherProps\n } = item;\n if (hidden) return null;\n if (permission && !hasPermission(permission)) return null;\n const newStyle = color ? { color, ...style } : style;\n const type = item.type || 'link';\n if (needConfirm) {\n return (\n <Popconfirm\n title={confirmMessage}\n okText=\"确定\"\n cancelText=\"取消\"\n onConfirm={onClick}\n arrowPointAtCenter={true}\n key={index}\n >\n <Button {...otherProps} onClick={undefined} type={type} danger style={newStyle}>\n {text}\n </Button>\n </Popconfirm>\n );\n }\n return (\n <Button {...otherProps} type={type} style={newStyle} key={index} onClick={onClick}>\n {text}\n </Button>\n );\n })}\n </Space>\n </div>\n );\n};\n\nButtonOperate.defaultProps = {\n size: 0,\n};\n","import { flatbizDate } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { DatePicker } from 'antd';\nimport { PickerDateProps } from 'antd/lib/date-picker/generatePicker';\nimport moment from 'moment';\nimport { useMemo, VFC } from 'react';\n\nexport type DatePickerWrapperProps = {\n value?: string;\n onChange?: (value?: string) => void;\n} & Omit<PickerDateProps<moment.Moment>, 'value' | 'onChange'>;\n\n/**\n * DatePicker包装组件\n * ```\n * 1. value类型为 string\n * 2. onChange返回类型 string\n * 3. 默认格式化类型 YYYY-MM-DD; 当showTime===true时,默认格式化类型YYYY-MM-DD HH:mm:ss\n * 4. 其他格式化类型自定义format\n * ```\n */\nexport const DatePickerWrapper: VFC<DatePickerWrapperProps> = (props) => {\n const { value, onChange, style, ...otherProps } = props;\n const format = useMemo(() => {\n if (props.format) return props.format as string;\n if (props.showTime) return 'YYYY-MM-DD HH:mm:ss';\n return 'YYYY-MM-DD';\n }, [props.showTime, props.format]);\n\n const onChangeDate = hooks.useCallbackRef((value) => {\n if (value) {\n onChange?.(moment(value).format(format));\n } else {\n onChange?.(undefined);\n }\n });\n\n const datePickerValue = value && flatbizDate.isDate(value) ? moment(new Date(value)) : undefined;\n\n return (\n <DatePicker\n {...otherProps}\n style={{ width: '100%', ...style }}\n value={datePickerValue}\n onChange={onChangeDate}\n />\n );\n};\n","import { flatbizDate } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { DatePicker } from 'antd';\nimport { RangePickerDateProps } from 'antd/lib/date-picker/generatePicker';\nimport moment from 'moment';\nimport { useMemo, VFC } from 'react';\n\nexport type DateRangePickerWrapperProps = {\n value?: [string, string];\n onChange?: (value?: [string, string]) => void;\n} & Omit<RangePickerDateProps<moment.Moment>, 'value' | 'onChange'>;\n\n/**\n * DatePicker.RangePicker包装组件\n * ```\n * TODO: 引用DatePicker.RangePicker TS有问题,待解决\n * 1. value类型为 [string, string]\n * 2. onChange返回类型 [string, string]\n * 3. 默认格式化类型 YYYY-MM-DD; 当showTime===true时,默认格式化类型YYYY-MM-DD HH:mm:ss\n * 4. 其他格式化类型自定义format\n * ```\n */\nexport const DateRangePickerWrapper: VFC<DateRangePickerWrapperProps> = (props) => {\n const { value, onChange, style, ...otherProps } = props;\n\n const format = useMemo(() => {\n if (props.format) return props.format as string;\n if (props.showTime === true) return 'YYYY-MM-DD HH:mm:ss';\n return 'YYYY-MM-DD';\n }, [props.showTime, props.format]);\n\n const onChangeDate = hooks.useCallbackRef((values) => {\n if (values) {\n const [value1, value2] = values || [];\n onChange?.([moment(value1).format(format), moment(value2).format(format)]);\n } else {\n onChange?.(undefined);\n }\n });\n\n const [date1, date2] = value || [];\n\n const rangePickerValue =\n date1 && date2 && flatbizDate.isDate(date1) && flatbizDate.isDate(date2)\n ? [moment(new Date(date1)), moment(new Date(date2))]\n : undefined;\n\n return (\n <DatePicker.RangePicker\n {...otherProps}\n style={{ width: '100%', ...style }}\n value={rangePickerValue as [moment.Moment, moment.Moment]}\n onChange={onChangeDate}\n />\n );\n};\n","import { ModelType } from '@dimjs/model';\n\nexport interface DrawerStateType {\n title: string;\n /**\n * 显示drawer\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, any>;\n operateType: 'create' | 'update' | 'view' | null;\n pageLoading?: boolean;\n}\n\nexport interface DrawerActionsParamType {\n openDrawerForm: Pick<DrawerStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeDrawer: void;\n setDrawerItemData: Record<string, any>;\n}\n\n/**\n * @shared\n * 提供公共的drawer处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个drawer实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const DrawerModel: ModelType<DrawerStateType, DrawerActionsParamType> = {\n actions: {\n openDrawerForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeDrawer() {\n return (state) => {\n state.visible = false;\n };\n },\n setDrawerItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: null,\n },\n};\n","import { SaveOutlined } from '@ant-design/icons';\nimport { Button, ButtonProps, Space } from 'antd';\n\nexport interface DrawerOperationOldProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const DrawerOperation = (props: DrawerOperationOldProps) => {\n return (\n <div className=\"fixed-bottom-block\">\n <Space size=\"middle\">\n <Button {...props.cancelButtonProps} className=\"cancel-btn\" onClick={props.onCancel}>\n {props.cancelText || '取消'}\n </Button>\n {props.hideOkBtn != true && (\n <Button\n type=\"primary\"\n icon={<SaveOutlined />}\n {...props.okButtonProps}\n className=\"ok-btn\"\n onClick={props.onOk}\n loading={props.loading}\n >\n {props.okText || '提交'}\n </Button>\n )}\n </Space>\n </div>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Drawer, DrawerProps } from 'antd';\nimport { FC, useEffect } from 'react';\nimport { DrawerOperation, DrawerOperationOldProps } from './drawer-operation';\nimport './style.less';\n\nexport type DrawerFormOldProps = {\n className?: string;\n /**\n * 整个drawer页面级的spinning <Page loading />\n */\n pageLoading?: boolean;\n // 设置了 DrawerProps footer属性后,operationProps配置将失效\n operationProps?: DrawerOperationOldProps;\n} & DrawerProps;\n\nconst PageLoader = () => {\n return (\n <div className=\"drawer-wraper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const DrawerWraper: FC<DrawerFormOldProps> = (props) => {\n const { pageLoading, className, width = 600, children, footer, operationProps, ...otherProps } = props;\n useEffect(() => {\n console.error(\n '@flatbiz/antd库【DrawerWraper】组件已经过期,请使用DrawerWrapper替换包括DrawerWraper=>DrawerWrapper、createDrawerWraperModel=>createDrawerWrapperModel,如果使用DrawerWrapper组件原用法需要调整',\n );\n }, []);\n return (\n <Drawer\n className={classNames('drawer-wraper', className)}\n keyboard={false}\n forceRender={false}\n destroyOnClose={true}\n width={'80%'}\n contentWrapperStyle={{ maxWidth: width }}\n size=\"default\"\n {...otherProps}\n footer={footer || footer === null ? footer : <DrawerOperation {...operationProps} />}\n >\n <div className=\"drawer-wraper-content\">{children}</div>\n {pageLoading && <PageLoader />}\n </Drawer>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { DrawerActionsParamType, DrawerModel, DrawerStateType } from './drawer.model';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst drawerModels: Record<string, API<ModelType<DrawerStateType, DrawerActionsParamType, any>>> = {};\n\n/**\n * drawer弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [drawerState, drawerActions] = createDrawerWraperModel('key值').useStore();\n * ```\n */\nexport const createDrawerWraperModel = (key: string) => {\n if (!drawerModels[key]) {\n drawerModels[key] = Model(DrawerModel);\n }\n return drawerModels[key];\n};\n\nexport * from './drawer-wraper';\n","import { ModelType } from '@dimjs/model';\n\nexport interface DrawerStateType {\n title: string;\n /**\n * 显示drawer\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, any>;\n operateType: 'create' | 'update' | 'view' | null;\n pageLoading?: boolean;\n}\n\nexport interface DrawerActionsParamType {\n openDrawerForm: Pick<DrawerStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeDrawer: void;\n setDrawerItemData: Record<string, any>;\n}\n\n/**\n * @shared\n * 提供公共的drawer处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个drawer实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const DrawerModel: ModelType<DrawerStateType, DrawerActionsParamType> = {\n actions: {\n openDrawerForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeDrawer() {\n return (state) => {\n state.visible = false;\n };\n },\n setDrawerItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: null,\n },\n};\n","import { SaveOutlined } from '@ant-design/icons';\nimport { Button, ButtonProps, Space } from 'antd';\n\nexport interface DrawerOperationProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const DrawerOperation = (props: DrawerOperationProps) => {\n return (\n <div className=\"fixed-bottom-block\">\n <Space size=\"middle\">\n <Button {...props.cancelButtonProps} className=\"cancel-btn\" onClick={props.onCancel}>\n {props.cancelText || '取消'}\n </Button>\n {props.hideOkBtn != true && (\n <Button\n type=\"primary\"\n icon={<SaveOutlined />}\n {...props.okButtonProps}\n className=\"ok-btn\"\n onClick={props.onOk}\n loading={props.loading}\n >\n {props.okText || '提交'}\n </Button>\n )}\n </Space>\n </div>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Drawer, DrawerProps } from 'antd';\nimport { FC } from 'react';\nimport { DrawerOperation, DrawerOperationProps } from './drawer-operation';\nimport './style.less';\n\nexport type DrawerFormProps = {\n className?: string;\n /**\n * 整个drawer页面级的spinning <Page loading />\n */\n pageLoading?: boolean;\n // 设置了 DrawerProps footer属性后,operationProps配置将失效\n operationProps?: DrawerOperationProps;\n} & DrawerProps;\n\nconst PageLoader = () => {\n return (\n <div className=\"drawer-wrapper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const DrawerWrapper: FC<DrawerFormProps> = (props) => {\n const { pageLoading, className, width = 600, children, footer, operationProps, ...otherProps } = props;\n return (\n <Drawer\n className={classNames('drawer-wrapper', className)}\n keyboard={false}\n forceRender={false}\n destroyOnClose={true}\n width={'80%'}\n contentWrapperStyle={{ maxWidth: width }}\n size=\"default\"\n {...otherProps}\n footer={footer || footer === null ? footer : <DrawerOperation {...operationProps} />}\n >\n <div className=\"drawer-wrapper-content\">{children}</div>\n {pageLoading && <PageLoader />}\n </Drawer>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { DrawerActionsParamType, DrawerModel, DrawerStateType } from './drawer.model';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst drawerModels: Record<string, API<ModelType<DrawerStateType, DrawerActionsParamType, any>>> = {};\n\n/**\n * drawer弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [drawerState, drawerActions] = createDrawerWrapperModel('key值').useStore();\n * ```\n */\nexport const createDrawerWrapperModel = (key: string) => {\n if (!drawerModels[key]) {\n drawerModels[key] = Model(DrawerModel);\n }\n return drawerModels[key];\n};\n\nexport * from './drawer-wrapper';\n","import { FieldSingleConfig } from './type';\n\nexport const getEditable = (editable: FieldSingleConfig['editable'], tableRowIndex: number) => {\n return typeof editable === 'boolean' ? editable : editable?.({ tableRowIndex });\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { LabelValueItem } from '@flatbiz/utils';\nimport { Checkbox, Form, Tag } from 'antd';\nimport { useMemo } from 'react';\nimport { EditableCheckboxGroupConfig, EditableFormItemProps } from '../type';\n\ntype CheckboxGroupFormItemContent = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: Array<string | number>;\n onChange?: (value: any) => void;\n};\n\nconst CheckboxGroupFormItemContent = (props: CheckboxGroupFormItemContent) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableCheckboxGroupConfig).editableComptProps;\n\n const viewLabelList = useMemo(() => {\n if (editable) return [];\n const value = isArray(props.value) ? props.value : ([] as any[]);\n const options = (editableComptProps.options || []) as LabelValueItem[];\n if (!isArray(options) || options.length === 0) {\n return value.map((item) => ({ label: item, value: item }));\n }\n const returnList = [] as LabelValueItem[];\n value.forEach((item) => {\n const target = options.find((temp) => temp.value === item);\n returnList.push(target ? target : { label: item, value: item });\n });\n return returnList;\n }, [editable, editableComptProps.options, props.value]);\n\n if (editable) {\n return <Checkbox.Group {...editableComptProps} value={props.value} onChange={props.onChange} />;\n }\n return (\n <span className=\"editable-checkbox-group-view\">\n {render\n ? render(props.value)\n : viewLabelList.map((tag, index) => (\n <Tag key={index} color=\"#1890ff\">\n {tag.label}\n </Tag>\n ))}\n </span>\n );\n};\n\nexport const CheckboxGroupFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-checkbox-group-form-item', formItemProps?.className)}\n >\n <CheckboxGroupFormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Form } from 'antd';\nimport { DatePickerWrapper } from '../../date-picker-wrapper';\nimport { EditableDatePickerWrapperConfig, EditableFormItemProps } from '../type';\n\nexport const DatePickerWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-date-picker-wraper-form-item', formItemProps?.className)}\n >\n <DatePickerWrapper {...(editableConfig as EditableDatePickerWrapperConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { Form } from 'antd';\nimport { useMemo } from 'react';\nimport { DateRangePickerWrapper } from '../../date-range-picker-wrapper';\nimport { EditableDateRangePickerWrapperConfig, EditableFormItemProps } from '../type';\n\ntype FormItemContentProps = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: [string, string];\n onChange?: (value?: [string, string]) => void;\n};\n\nconst FormItemContent = (props: FormItemContentProps) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableDateRangePickerWrapperConfig).editableComptProps;\n\n const viewLabel = useMemo(() => {\n const value = isArray(props.value) ? props.value : ([] as any[]);\n if (editable) return undefined;\n return value.join('~');\n }, [editable, props.value]);\n\n if (editable) {\n return <DateRangePickerWrapper {...editableComptProps} value={props.value} onChange={props.onChange} />;\n }\n return <span className=\"editable-date-range-picker-view\">{render ? render(props.value) : viewLabel}</span>;\n};\n\nexport const DateRangePickerWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-date-range-picker-wraper-form-item', formItemProps?.className)}\n >\n <FormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { Form, Input } from 'antd';\nimport { EditableFormItemProps, EditableInputConfig } from '../type';\n\nexport const InputFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item {...formItemProps} name={props.name}>\n <Input {...(editableConfig as EditableInputConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Form, InputNumber } from 'antd';\nimport { EditableFormItemProps, EditableInputNumberConfig } from '../type';\n\nexport const InputNumberFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-input-number-form-item', formItemProps?.className)}\n >\n <InputNumber {...(editableConfig as EditableInputNumberConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { LabelValueItem } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Form, Radio, Tag } from 'antd';\nimport { useMemo } from 'react';\nimport { EditableFormItemProps, EditableRadioGroupConfig } from '../type';\n\ntype RadioGroupFormItemContent = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: string | number;\n onChange?: (value: string | number) => void;\n};\n\nconst RadioGroupFormItemContent = (props: RadioGroupFormItemContent) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableRadioGroupConfig).editableComptProps;\n\n const viewLabel = useMemo(() => {\n if (editable) return [];\n const value = props.value;\n const options = (editableComptProps.options || []) as LabelValueItem<string | number>[];\n if (!isArray(options) || options.length === 0) {\n return value;\n }\n const target = options.find((item) => item.value === value);\n return target?.label || value;\n }, [editable, editableComptProps.options, props.value]);\n\n const onChange = hooks.useCallbackRef((e) => {\n props.onChange?.(e.target.value as string | number);\n });\n\n if (editable) {\n return <Radio.Group {...editableComptProps} value={props.value} onChange={onChange} />;\n }\n return (\n <span className=\"editable-radio-group-view\">\n {render ? render(props.value) : viewLabel ? <Tag color=\"#1890ff\">{viewLabel}</Tag> : null}\n </span>\n );\n};\n\nexport const RadioGroupFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-radio-group-form-item', formItemProps?.className)}\n >\n <RadioGroupFormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { LabelValueItem } from '@flatbiz/utils';\n\nexport type ModelState = {\n selectorList: LabelValueItem[];\n queryIsEmpty: boolean;\n requestStatus: 'init' | 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setSelectBoxList: ModelState['selectorList'];\n resetSelectBoxList: void;\n changeRequestStatus: ModelState['requestStatus'];\n};\n\nconst defaultState: ModelState = {\n selectorList: [],\n queryIsEmpty: false,\n requestStatus: 'init',\n};\n\nconst _SelectorWrapperModel: ModelType<ModelState, ModelActionParams> = {\n actions: {\n setSelectBoxList: (params) => {\n return (state) => {\n state.selectorList = params || [];\n state.requestStatus = 'request-success';\n };\n },\n resetSelectBoxList: () => {\n return (state) => {\n state.selectorList = [];\n };\n },\n changeRequestStatus: (params) => {\n return (state) => {\n state.requestStatus = params;\n };\n },\n },\n state: defaultState,\n};\n\nconst selectorWrapperModels: Record<string, API<ModelType<ModelState, ModelActionParams, any>>> = {};\n\n/**\n * ```\n * 使用方式\n * const [state, actions] = selectorWrapperModel('key值').useStore();\n * ```\n */\nexport const selectorWrapperModel = (key: string) => {\n if (!selectorWrapperModels[key]) {\n selectorWrapperModels[key] = Model(_SelectorWrapperModel);\n }\n return selectorWrapperModels[key];\n};\n","import { RedoOutlined } from '@ant-design/icons';\nimport { extend } from '@dimjs/utils';\nimport { useEffectCustom } from '@flatbiz/antd';\nimport {\n arrayField2LabelValue,\n isUndefinedOrNull,\n LabelValueItem,\n TPlainObject,\n valueIsEqual,\n} from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, Empty, message, Select, SelectProps } from 'antd';\nimport { DependencyList, forwardRef, useImperativeHandle, useMemo, useRef, useState } from 'react';\nimport { ModelState, selectorWrapperModel } from './model';\n\ntype SelectorServiceConfig = {\n params?: TPlainObject;\n requiredParamsKeys?: string[];\n onRequest?: (params?: any) => any;\n /**\n * 响应数据适配器\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject[];\n};\n\nexport type SelectorWrapperProps = Omit<\n SelectProps,\n 'filterOption' | 'onSearch' | 'loading' | 'notFoundContent' | 'options' | 'fieldNames'\n> & {\n // 模型唯一值\n modelKey: string;\n fieldNames?: { label: string; value: string };\n /**\n * useEffect依赖性数组\n */\n effectDependencyList?: DependencyList;\n /**\n * 请求服务需求的数据,当设置`selectorList`后无效果\n */\n serviceConfig?: SelectorServiceConfig;\n /**\n * 同步设置选择器选项列表\n * ```\n * 1. 当设置selectorList后,serviceConfig、operateType=search、onSelectorListChange将失效\n * 2. 不支持异步数据,异步使用serviceConfig方式\n * 3. 如果配置fieldNames,会转换后使用\n * ```\n */\n selectorList?: TPlainObject[];\n /**\n * 通过服务获取数据后回调,当设置`selectorList`后无效果\n */\n onSelectorListChange?: (dataList: LabelValueItem[]) => void;\n /**\n * 添加全部选项\n * ```\n * 1. showAllOption = true,添加默认全部选项(value值为空字符串)\n * 2. 可自定义全部选项\n * ```\n */\n showAllOption?: true | JSX.Element;\n /**\n * 输入操作类型,默认值:filter\n * ```\n * 1. search:根据输入项去服务端查询\n * 2. filter:初始化已查询数据,根据输入内容筛选\n * 3. 在设置`selectorList`后,operateType=search将失效\n * ```\n */\n operateType?: 'search' | 'filter';\n // 搜索调接口字段名称,默认值:keyword\n searchFieldName?: string;\n};\n\nexport type SelectorWrapperRefApi = {\n onClearSelectorList: () => void;\n getSelectorList: () => LabelValueItem<string | number>[];\n};\n\n/**\n * 选择器包装组件\n * @param props\n * @returns\n * ```\n * 1. modelKey的配置是为了缓存数据;\n * 1.1: 当有effectDependencyList依赖项时,依赖项的发生变化后,每次都会去调用接口获取数据\n * 1.2: 当无effectDependencyList依赖项时,第一次调用接口成功后会有标记,下次访问存在标记,就不在调用接口,使用缓存数据;如果想强制刷新数据,可通过随便配置依赖项完成\n * 2. selectorList属性\n * 2.1 当设置selectorList属性后,serviceConfig、operateType=search、onSelectorListChange将失效\n * 2.2 不支持异步数据,异步使用serviceConfig方式\n * 3. operateType=search状态下,回填数据查询接口时,会在接口中默认添加id字段(id的值为回填的值)\n * ```\n */\nexport const SelectorWrapper = forwardRef<SelectorWrapperRefApi, SelectorWrapperProps>((props, ref) => {\n const {\n serviceConfig,\n showAllOption,\n effectDependencyList,\n onSelectorListChange,\n operateType,\n searchFieldName,\n selectorList,\n modelKey,\n fieldNames,\n ...otherProps\n } = props;\n\n const isSearch = operateType === 'search' && selectorList === undefined;\n const newServiceConfig = serviceConfig || {};\n const newEffectDependencyList = effectDependencyList || [];\n const changeOperateValueRef = useRef<string | number>();\n const [loading, setLoading] = useState(false);\n const [state, actions] = selectorWrapperModel(modelKey).useStore();\n\n const valueIsEmpty = (value: string | number) => {\n return value === '' || isUndefinedOrNull(value);\n };\n\n const serviceRespDataTranslation = (respData) => {\n const respDataList = newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData;\n return arrayField2LabelValue(respDataList || [], fieldNames);\n };\n\n const startDataSourceRequest = hooks.useCallbackRef(\n async (inputValue?: string, searchId?: string | number) => {\n try {\n if (!newServiceConfig.onRequest) {\n throw new Error('onRequest 调用接口服务不能为空');\n }\n const requiredParamsKeys = newServiceConfig.requiredParamsKeys;\n const params = extend({}, newServiceConfig.params);\n if (requiredParamsKeys) {\n const isEmpty = requiredParamsKeys.find((key) => {\n return valueIsEmpty(params[key] as string | number);\n });\n if (isEmpty) {\n console.warn(`SelectorWrapper组件:参数:${requiredParamsKeys.join('、')}不能为空`);\n return;\n }\n }\n try {\n setLoading(true);\n void actions.changeRequestStatus('request-pre');\n if ((!isUndefinedOrNull(inputValue) || !isUndefinedOrNull(searchId)) && isSearch) {\n const keyword = searchFieldName || 'keyword';\n params[keyword] = inputValue;\n params['id'] = searchId;\n }\n const respData = await newServiceConfig.onRequest?.(params);\n const respDataTranslation = serviceRespDataTranslation(respData);\n setLoading(false);\n onSelectorListChange?.(respDataTranslation);\n void actions.setSelectBoxList(respDataTranslation);\n } catch (error) {\n console.error(error);\n setLoading(false);\n void actions.changeRequestStatus('request-error');\n void message.error(error.message || '获取数据异常');\n }\n } catch (error) {\n setLoading(false);\n void message.error((error.message as string) || '数据查询异常...');\n }\n },\n );\n\n useEffectCustom(() => {\n if (selectorList) {\n void actions.setSelectBoxList(arrayField2LabelValue(selectorList || [], fieldNames));\n return;\n }\n if (isSearch) return;\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = selectorWrapperModel(modelKey).getState();\n\n if (\n newEffectDependencyList.length > 0 ||\n valueIsEqual(realTimeState.requestStatus, ['request-error', 'init'])\n ) {\n void startDataSourceRequest();\n }\n }, newEffectDependencyList);\n\n useEffectCustom(() => {\n if (isSearch) {\n if (valueIsEmpty(props.value as string | number)) {\n onSelectorListChange?.([]);\n void actions.resetSelectBoxList();\n } else {\n // 判断是否由外部回填value数据\n if (props.value !== changeOperateValueRef.current) {\n void startDataSourceRequest(undefined, props.value as string | number);\n }\n }\n }\n }, newEffectDependencyList.concat([props.value]));\n\n useImperativeHandle(ref, () => {\n return {\n onClearSelectorList: () => {\n void actions.resetSelectBoxList();\n },\n getSelectorList: () => {\n return state.selectorList;\n },\n };\n });\n\n const filterOption = hooks.useCallbackRef((input: string, option) => {\n return (option?.children as unknown as string).toLowerCase().indexOf(input.toLowerCase()) >= 0;\n });\n\n const onSearch = hooks.useDebounceCallback((value: string) => {\n if (value) {\n void startDataSourceRequest(value);\n } else {\n void actions.resetSelectBoxList();\n }\n }, 300);\n\n const onChange = hooks.useCallbackRef((value: string | number, ...otherParams) => {\n changeOperateValueRef.current = value;\n props.onChange?.(value, otherParams);\n });\n const onAgainRequest = hooks.useCallbackRef(() => {\n void startDataSourceRequest();\n });\n\n const selectOptionsAll = <Select.Option value=\"\">全部</Select.Option>;\n return (\n <Select\n showSearch={true}\n allowClear={true}\n {...otherProps}\n value={isUndefinedOrNull(props.value) ? undefined : props.value}\n notFoundContent={\n <NotFoundContent requestStatus={state.requestStatus} onAgainRequest={onAgainRequest} />\n }\n loading={loading}\n onSearch={isSearch ? onSearch : undefined}\n filterOption={isSearch ? false : filterOption}\n onChange={onChange}\n fieldNames={undefined}\n suffixIcon={\n state.requestStatus === 'request-error' ? (\n <RedoOutlined spin={loading} onClick={onAgainRequest} />\n ) : undefined\n }\n >\n {showAllOption === true ? selectOptionsAll : showAllOption}\n {state.selectorList.map((item) => {\n return (\n <Select.Option value={item.value} label={item.label} key={item.value}>\n {item.label}\n </Select.Option>\n );\n })}\n </Select>\n );\n});\n\nconst NotFoundContent = (props: {\n requestStatus?: ModelState['requestStatus'];\n onAgainRequest: () => void;\n}) => {\n const description = useMemo(() => {\n if (props.requestStatus === 'request-error') {\n return '数据查询异常';\n } else if (props.requestStatus === 'request-success') {\n return '暂无数据';\n }\n return '数据查询中';\n }, [props.requestStatus]);\n return (\n <Empty\n image={Empty.PRESENTED_IMAGE_SIMPLE}\n description={description}\n className={'tree-selector-wrapper-empty'}\n >\n {props.requestStatus === 'request-error' && (\n <Button type=\"primary\" onClick={props.onAgainRequest}>\n 重新获取数据\n </Button>\n )}\n </Empty>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { arrayField2LabelValue, LabelValueItem } from '@flatbiz/utils';\nimport { Form, Tag } from 'antd';\nimport { useMemo } from 'react';\nimport { SelectorWrapper } from '../../selector-wrapper';\nimport { EditableFormItemProps, EditableSelectWrapperConfig } from '../type';\n\ntype FormItemContentProps = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: string | number | Array<string | number>;\n onChange?: (value: any) => void;\n};\n\nconst FormItemContent = (props: FormItemContentProps) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableSelectWrapperConfig).editableComptProps;\n\n const viewLabelList = useMemo(() => {\n const value = isArray(props.value) ? props.value : ([] as any[]);\n if (editable) return [];\n const selectorList = arrayField2LabelValue(\n editableComptProps.selectorList || [],\n editableComptProps.fieldNames,\n );\n if (selectorList.length === 0) {\n return value.map((item) => ({ label: item, value: item }));\n }\n const returnList = [] as LabelValueItem[];\n value.forEach((item) => {\n const target = selectorList.find((temp) => temp.value === item);\n returnList.push(target ? target : { label: item, value: item });\n });\n return returnList;\n }, [editable, editableComptProps.fieldNames, editableComptProps.selectorList, props.value]);\n\n if (editable) {\n return <SelectorWrapper {...editableComptProps} value={props.value} onChange={props.onChange} />;\n }\n return (\n <span className=\"editable-selector-view\">\n {render\n ? render(props.value)\n : viewLabelList.map((tag, index) => (\n <Tag key={index} color=\"#1890ff\">\n {tag.label}\n </Tag>\n ))}\n </span>\n );\n};\n\nexport const SelectorWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-selector-wrapper-form-item', formItemProps?.className)}\n >\n <FormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { isBoolean, isNumber, isString } from '@dimjs/lang';\nimport { Form } from 'antd';\nimport { useMemo } from 'react';\nimport { EditableFormItemProps, FieldSingleConfig } from '../type';\n\nconst FormItemTextContent = (props: {\n value?: string | number;\n name: EditableFormItemProps['name'];\n fieldConfig?: FieldSingleConfig;\n}) => {\n const value = useMemo(() => {\n if (props.fieldConfig?.render) return undefined;\n const isBaseData =\n isString(props.value) || isNumber(props.value) || isBoolean(props.value) || !props.value;\n if (!isBaseData) {\n console.warn(`Form.List name:【${props.name}】数据【${JSON.stringify(props.value)}】不能渲染在页面中`);\n }\n return isBaseData ? props.value : undefined;\n }, [props.fieldConfig?.render, props.name, props.value]);\n\n return <span className=\"editable-text-view\">{props.fieldConfig?.render?.(props.value) || value}</span>;\n};\n\nexport const TextFormItem = (props: { name: Array<number | string>; fieldConfig?: FieldSingleConfig }) => {\n return (\n <Form.Item noStyle name={props.name}>\n <FormItemTextContent name={props.name} fieldConfig={props.fieldConfig} />\n </Form.Item>\n );\n};\n","import { Form, Input } from 'antd';\nimport { EditableFormItemProps, EditableTextareaConfig } from '../type';\n\nexport const TextAreaFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item {...formItemProps} name={props.name}>\n <Input.TextArea {...(editableConfig as EditableTextareaConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { DependencyList, EffectCallback, useEffect } from 'react';\n\nexport const useEffectCustom = (fn: EffectCallback, deps: DependencyList) => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return useEffect(fn, deps);\n};\n","import { DependencyList, useEffect } from 'react';\n\nexport const useEffectCustomAsync = (fn: () => Promise<void>, deps: DependencyList) => {\n useEffect(() => {\n async function asyncFunction() {\n await fn();\n }\n void asyncFunction();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n};\n","import { PlusOutlined } from '@ant-design/icons';\nimport { classNames, extend } from '@dimjs/utils';\nimport { TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, message, Upload, UploadProps } from 'antd';\nimport { UploadChangeParam } from 'antd/lib/upload';\nimport { UploadFile, UploadListType } from 'antd/lib/upload/interface';\nimport { FC, Fragment, useState } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport './style.less';\n\nexport type UploadWrapperFileItem = {\n uid: string;\n name: string;\n url: string;\n};\n\nexport type UploadWrapperProps<T extends TPlainObject = TPlainObject> = {\n value?: T[];\n onChange?: (value?: T[]) => void;\n onUploadError?: (message?: string) => void;\n onUploadChange?: (info: UploadChangeParam<UploadFile>) => void;\n /**\n * 属性映射\n */\n fieldNames?: {\n uid: string;\n name: string;\n url: string;\n };\n /**\n * 接口响应数据适配器,如果配置了fieldNames,适配器返回值会再进过fieldNames转换\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject;\n} & Omit<UploadProps, 'onChange' | 'fileList'>;\n\n/**\n * 文件上传\n * ```\n * 1. 可通过配置children替换默认上传触发布局\n * 2. 接口返回结构:\n * formData上传接口返回值\n * {\n * code: '0000',\n * data: {\n * uid: '唯一值,可使用fileKey值'\n * name: '文件名称'\n * url: '预览地址'\n * }\n * }\n * 可通过fieldNames配置接口返回值属性名称映射\n * 3. 最佳使用方式,与Form结合使用\n * <Form.Item name=\"attachmentList\" label=\"附件\">\n * <UploadWrapper action={uploadUrl} onPreview={onPreviewFile} />\n * </Form.Item>\n * ```\n *\n */\nexport const UploadWrapper: FC<UploadWrapperProps> = (props) => {\n const { onChange, onUploadError, value, ...otherProps } = props;\n const [uploadList, setUploadList] = useState<UploadWrapperFileItem[]>();\n const fieldNames = extend(\n {\n uid: 'uid',\n name: 'name',\n url: 'url',\n },\n props.fieldNames,\n ) as UploadWrapperFileItem;\n\n useEffectCustom(() => {\n setUploadList(\n value?.map((item) => {\n return {\n uid: item[fieldNames.uid],\n name: item[fieldNames.name],\n url: item[fieldNames.url],\n };\n }),\n );\n }, [fieldNames.name, fieldNames.uid, fieldNames.url, value]);\n\n const onUploadChange = hooks.useCallbackRef((info) => {\n const fileList = info.fileList as TPlainObject[];\n if (info.file.status === 'done') {\n const respData = info.file.response;\n if (respData.code === '0000') {\n const result = (\n props.onRequestResultAdapter ? props.onRequestResultAdapter(respData.data) : respData.data\n ) as TPlainObject;\n result[fieldNames.uid] = result[fieldNames.uid] || info.file.uid;\n result[fieldNames.name] = result[fieldNames.name] || info.file.name;\n if (props.maxCount === 1) {\n onChange?.([result]);\n } else {\n onChange?.((value || []).concat(result));\n }\n } else {\n if (onUploadError) {\n onUploadError(respData.message as string);\n } else {\n void message.error((respData.message as string) || '上传操作失败...');\n }\n fileList[fileList.length - 1] = {\n ...fileList[fileList.length - 1],\n status: 'error',\n };\n }\n } else if (info.file.status === 'removed') {\n const uid = info.file.uid;\n const targetList = value !== undefined ? [...value] : [];\n const targetIndex = targetList.findIndex((item) => {\n const tempUid = item[fieldNames.uid];\n return tempUid === uid;\n });\n if (targetIndex >= 0) {\n targetList.splice(targetIndex, 1);\n }\n onChange?.(targetList);\n } else if (info.file.status === 'error') {\n if (onUploadError) {\n onUploadError();\n } else {\n void message.error('上传操作失败...');\n }\n }\n // https://github.com/ant-design/ant-design/issues/2423\n setUploadList([...fileList] as UploadWrapperFileItem[]);\n props.onUploadChange?.(info);\n });\n\n return (\n <Upload\n {...otherProps}\n onChange={onUploadChange}\n fileList={uploadList}\n className={classNames('v-upload-wrapper', otherProps.className)}\n >\n {otherProps.disabled ? null : (\n <UploadTrigger listType={otherProps.listType}>{props.children}</UploadTrigger>\n )}\n </Upload>\n );\n};\n\nconst UploadTrigger: FC<{ listType?: UploadListType }> = (props) => {\n if (props.children) return <Fragment>{props.children}</Fragment>;\n if (props.listType === 'picture-card') {\n return (\n <div>\n <PlusOutlined />\n <div style={{ marginTop: 8 }}>上传图片</div>\n </div>\n );\n }\n if (props.listType === 'picture') {\n return (\n <Button type=\"primary\" ghost>\n 选择图片上传\n </Button>\n );\n }\n return (\n <Button type=\"primary\" ghost>\n 选择文件上传\n </Button>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Form } from 'antd';\nimport { UploadWrapper } from '../../upload-wrapper';\nimport { EditableFileUploadConfig, EditableFormItemProps } from '../type';\n\nconst UploadWrapperFormItemContent = (\n props: EditableFormItemProps & { value?: any; onChange?: (value?: any) => void },\n) => {\n const { editableConfig, render, editable } = props.fieldConfig;\n const { children, ...otherProps } = (editableConfig as EditableFileUploadConfig).editableComptProps;\n if (editable) {\n return (\n <UploadWrapper listType=\"text\" {...otherProps} value={props.value} onChange={props.onChange}>\n {children}\n </UploadWrapper>\n );\n }\n return (\n <div className=\"upload-wrapper-selector-view\">\n {render ? (\n render(props.value)\n ) : (\n <UploadWrapper listType=\"text\" {...otherProps} value={props.value} disabled={true} />\n )}\n </div>\n );\n};\n\nexport const UploadWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-upload-wrapper-form-item', formItemProps?.className)}\n >\n <UploadWrapperFormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { extend } from '@dimjs/utils';\nimport { FieldSingleConfig } from '../type';\nimport { getEditable } from '../utils';\nimport { CheckboxGroupFormItem } from './checkbox-group';\nimport { DatePickerWrapperFormItem } from './date-picker-wrapper';\nimport { DateRangePickerWrapperFormItem } from './date-range-picker-wrapper';\nimport { InputFormItem } from './input';\nimport { InputNumberFormItem } from './input-number';\nimport { RadioGroupFormItem } from './radio-group';\nimport { SelectorWrapperFormItem } from './selector-wrapper';\nimport { TextFormItem } from './text';\nimport { TextAreaFormItem } from './textarea';\nimport { UploadWrapperFormItem } from './upload-wrapper';\n\nexport type FormItemAdapterProps = {\n name: Array<number | string>;\n completeName: Array<number | string>;\n fieldConfig: FieldSingleConfig;\n tableRowIndex: number;\n};\n\nexport const FormItemAdapter = (props: FormItemAdapterProps) => {\n const { editableConfig, editable } = props.fieldConfig;\n const newEditable = getEditable(editable, props.tableRowIndex);\n const fieldConfig = extend({}, props.fieldConfig, { editable: newEditable });\n\n const commomProps = {\n name: props.name,\n fieldConfig,\n };\n\n if (editableConfig?.type === 'input' && newEditable) {\n return <InputFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'inputNumber' && newEditable) {\n return <InputNumberFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'textArea' && newEditable) {\n return <TextAreaFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'datePickerWrapper' && newEditable) {\n return <DatePickerWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'dateRangePickerWrapper') {\n return <DateRangePickerWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'selectorWrapper') {\n return <SelectorWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'checkboxGroup') {\n return <CheckboxGroupFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'radioGroup') {\n return <RadioGroupFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'uploadWrapper') {\n return <UploadWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'custom') {\n return editableConfig.editableComptProps({\n name: props.name,\n editable: newEditable,\n completeName: props.completeName,\n });\n }\n return <TextFormItem {...commomProps} />;\n};\n","import { DeleteOutlined } from '@ant-design/icons';\nimport { classNames } from '@dimjs/utils';\nimport { Button, Form, Space } from 'antd';\nimport { FormItemAdapter } from '../form-item';\nimport { FormListConfig } from '../type';\nimport { getEditable } from '../utils';\n\nexport type FormListProps = {\n name: Array<number | string>;\n formListConfig: FormListConfig;\n tableRowIndex: number;\n completeName: (string | number)[];\n};\n\nexport const FormList = (props: FormListProps) => {\n const from = Form.useFormInstance();\n const {\n onFormListBeforeRender,\n editableConfigList,\n onFormListAfterRender,\n onFormListItemBeforeRender,\n onFormListItemAfterRender,\n deleteOperateRender,\n } = props.formListConfig;\n return (\n <Form.List name={props.name}>\n {(fields, { add, remove }) => (\n <>\n {onFormListBeforeRender\n ? onFormListBeforeRender({\n tableRowIndex: props.tableRowIndex,\n add,\n get value() {\n return from.getFieldValue(props.completeName);\n },\n })\n : null}\n {fields.map((fieldChild, index) => {\n const hasEditable = editableConfigList.find((item) =>\n getEditable(item.editable, props.tableRowIndex),\n );\n const className = classNames(\n 'editable-inner-formlist-item',\n `editable-inner-formlist-item-${props.name[1]}`,\n { 'editable-inner-formlist-item_preview': !hasEditable },\n );\n return (\n <div key={index} className={className}>\n {onFormListItemBeforeRender\n ? onFormListItemBeforeRender({\n add,\n remove: () => {\n remove(index);\n },\n formListItemIndex: index,\n tableRowIndex: props.tableRowIndex,\n get value() {\n return from.getFieldValue([...props.completeName, fieldChild.name]);\n },\n })\n : null}\n <Space>\n {editableConfigList.map((fieldItem, index) => {\n return (\n <FormItemAdapter\n name={[fieldChild.name, fieldItem.fieldName]}\n fieldConfig={fieldItem}\n key={index}\n tableRowIndex={props.tableRowIndex}\n completeName={[...props.completeName, fieldChild.name]}\n />\n );\n })}\n {hasEditable ? (\n <DeleteFormListItem\n deleteOperateRender={deleteOperateRender}\n remove={() => {\n remove(index);\n }}\n index={index}\n />\n ) : null}\n </Space>\n {onFormListItemAfterRender\n ? onFormListItemAfterRender({\n add,\n formListItemIndex: index,\n tableRowIndex: props.tableRowIndex,\n remove: () => {\n remove(index);\n },\n get value() {\n return from.getFieldValue([...props.completeName, fieldChild.name]);\n },\n })\n : null}\n </div>\n );\n })}\n {onFormListAfterRender\n ? onFormListAfterRender({\n tableRowIndex: props.tableRowIndex,\n add,\n get value() {\n return from.getFieldValue(props.completeName);\n },\n })\n : null}\n </>\n )}\n </Form.List>\n );\n};\n\nconst DeleteFormListItem = (props: {\n deleteOperateRender: FormListConfig['deleteOperateRender'];\n remove: () => void;\n index: number;\n}) => {\n return (\n <Form.Item>\n {props.deleteOperateRender ? (\n props.deleteOperateRender({ remove: props.remove, formListItemIndex: props.index })\n ) : (\n <Button type=\"link\" danger icon={<DeleteOutlined />} onClick={props.remove}>\n 删除\n </Button>\n )}\n </Form.Item>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { FormItemAdapter } from '../form-item';\nimport { TextFormItem } from '../form-item/text';\nimport { FieldSingleConfig, FormListConfig } from '../type';\nimport { FormList } from './form-list';\n\nexport type FormListItemProps = {\n name: Array<number | string>;\n fieldConfig?: FieldSingleConfig | FormListConfig;\n tableRowIndex: number;\n completeName: (string | number)[];\n};\n\nexport const FormListItem = (props: FormListItemProps) => {\n if (props.fieldConfig) {\n if (isArray(props.fieldConfig['editableConfigList'])) {\n const formListConfig = props.fieldConfig as FormListConfig;\n return (\n <FormList\n name={props.name}\n completeName={props.completeName}\n formListConfig={formListConfig}\n tableRowIndex={props.tableRowIndex}\n />\n );\n } else {\n return (\n <FormItemAdapter\n name={props.name}\n fieldConfig={props.fieldConfig as FieldSingleConfig}\n tableRowIndex={props.tableRowIndex}\n completeName={props.completeName}\n />\n );\n }\n }\n return <TextFormItem name={props.name} />;\n};\n","import { PlusOutlined } from '@ant-design/icons';\nimport { Button, Form, Table, TableProps } from 'antd';\nimport { FormListOperation, FormListProps } from 'antd/lib/form/FormList';\nimport { ColumnsType } from 'antd/lib/table';\nimport { Fragment, ReactElement, useMemo } from 'react';\nimport { FormListItem } from './form-list-item';\nimport './style.less';\nimport { EditableTableRecordType, FieldSingleConfig, FormListConfig } from './type';\n\n// export type EditableTableDataSourceItem = FormListFieldData & { operation: FormListOperation };\n\n/**\n * antd 默认render功能此处不能使用\n */\nexport type EditableTableColumn = Omit<ColumnsType['0'], 'render'> & {\n dataIndex?: string;\n fieldConfig?: FieldSingleConfig | FormListConfig;\n /**\n * 配置操作功能处理后,fieldConfig配置将失效\n * ```\n * 1. tableRowIndex:当前row的索引值\n * 1. name:当前row的form.item的name值\n * ```\n */\n operateRender?: (item: {\n tableRowIndex: number;\n name: Array<string | number>;\n operation: FormListOperation;\n }) => ReactElement;\n};\n\nexport type EditableTableProps = {\n name: string;\n /**\n * ```\n * antd table属性\n * 1. 新增cellVerticalAlign,单元格竖直方向对齐方式,设置table column onCell属性后失效\n * ```\n */\n tableProps?: Omit<TableProps<EditableTableRecordType>, 'dataSource' | 'columns' | 'rowKey'> & {\n cellVerticalAlign?: 'baseline' | 'middle' | 'top' | 'bottom';\n };\n columns: EditableTableColumn[];\n onTableBeforeRender?: (formListOperation: FormListOperation, nextRowIndex: number) => ReactElement | null;\n /**\n * 设置后,将覆盖底部`新增`按钮\n */\n onTableAfterRender?: (formListOperation: FormListOperation, nextRowIndex: number) => ReactElement | null;\n rules?: FormListProps['rules'];\n};\n\nexport const EditableTable = (props: EditableTableProps) => {\n const columns = useMemo(() => {\n if (!props.columns) return [];\n return props.columns.map((columnItem) => {\n const { fieldConfig, operateRender, ...otherColumnItem } = columnItem;\n return {\n onCell: () => {\n return {\n valign: props.tableProps?.cellVerticalAlign || 'middle',\n };\n },\n ...otherColumnItem,\n render: (_value, record) => {\n if (operateRender) {\n return (\n operateRender({\n name: [...props.name, record.name],\n tableRowIndex: record.name,\n operation: record.operation,\n }) || ''\n );\n }\n return (\n <FormListItem\n name={columnItem.dataIndex ? [record.name, columnItem.dataIndex] : [record.name]}\n completeName={\n columnItem.dataIndex\n ? [...props.name, record.name, columnItem.dataIndex]\n : [...props.name, record.name]\n }\n fieldConfig={fieldConfig}\n tableRowIndex={record.name}\n />\n );\n },\n };\n }) as ColumnsType<EditableTableRecordType>;\n }, [props.columns, props.name, props.tableProps?.cellVerticalAlign]);\n\n return (\n <div className=\"editable-table\">\n <Form.List name={props.name} rules={props.rules}>\n {(fields, formListOperation) => {\n return (\n <Fragment>\n {props.onTableBeforeRender ? props.onTableBeforeRender(formListOperation, fields.length) : null}\n <Table\n scroll={{ x: 'max-content' }}\n pagination={false}\n {...props.tableProps}\n dataSource={fields.map((item) => ({ ...item, operation: formListOperation }))}\n columns={columns}\n rowKey=\"key\"\n />\n {props.onTableAfterRender ? (\n props.onTableAfterRender(formListOperation, fields.length)\n ) : (\n <Button\n type=\"dashed\"\n onClick={() => formListOperation.add()}\n block\n icon={<PlusOutlined />}\n style={{ marginTop: 15 }}\n >\n 新增\n </Button>\n )}\n </Fragment>\n );\n }}\n </Form.List>\n </div>\n );\n};\n","import { hooks } from '@wove/react';\nimport { Button, message, Upload, UploadProps } from 'antd';\nimport { FC, useState } from 'react';\n\nexport type FileImportProps = {\n onImportFinish: (data?: any) => void;\n} & Omit<\n UploadProps,\n | 'fileList'\n | 'showUploadList'\n | 'itemRender'\n | 'listType'\n | 'multiple'\n | 'previewFile'\n | 'progress'\n | 'onChange'\n | 'onDownload'\n | 'onRemove'\n | 'onPreview'\n | 'directory'\n | 'customRequest'\n | 'defaultFileList'\n | 'iconRender'\n>;\n\n/**\n * 文件导入\n * ```\n * 默认值:\n * name: 'file',\n * accept: '.xlsx,.xls',\n * ```\n */\nexport const FileImport: FC<FileImportProps> = (props) => {\n const { onImportFinish, ...otherProps } = props;\n\n const [loading, setLoading] = useState(false);\n\n const onChange = hooks.useCallbackRef((info) => {\n if (info.file.status === 'uploading') {\n setLoading(true);\n } else if (info.file.status === 'done') {\n setLoading(false);\n const respData = info.file.response;\n if (respData.code === '0000') {\n onImportFinish(respData.data);\n } else {\n void message.error((respData.message as string) || '文件导入异常...');\n }\n }\n });\n\n return (\n <Upload showUploadList={false} maxCount={1} {...otherProps} onChange={onChange}>\n {props.children ? (\n props.children\n ) : (\n <Button type=\"primary\" ghost loading={loading}>\n 选择文件\n </Button>\n )}\n </Upload>\n );\n};\n\nFileImport.defaultProps = {\n name: 'file',\n accept: '.xlsx,.xls',\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames, extend } from '@dimjs/utils';\nimport { hooks } from '@wove/react';\nimport { Upload, UploadProps } from 'antd';\nimport { UploadChangeParam } from 'antd/lib/upload';\nimport { UploadFile } from 'antd/lib/upload/interface';\nimport { FC, useEffect, useState } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport './style.less';\n\nexport type FileUploadItem = {\n fileKey: string;\n fileName: string;\n};\n\ntype AntdFileUploadItem = {\n uid: string;\n name: string;\n fileKey: string;\n};\n\nexport type FileUploadProps = {\n onChange?: (value?: FileUploadItem[]) => void;\n onUploadError?: (message?: string) => void;\n value?: FileUploadItem[];\n onPreview?: (item: FileUploadItem) => void;\n onUploadChange?: (info: UploadChangeParam<UploadFile>) => void;\n /**\n * 属性映射\n */\n fieldNames?: {\n fileKey?: string;\n fileName?: string;\n };\n} & Omit<UploadProps, 'onChange' | 'fileList' | 'onPreview'>;\n\n/**\n * 文件上传,结合Form使用最佳\n * ```\n * 接口返回结构:\n * formData上传接口必须返回fileKey值\n * {\n * code: '0000',\n * data: {\n * fileKey: '预览文件对应的fileKey'\n * }\n * }\n * 可通过fieldNames配置接口返回值属性名称映射\n * ```\n * ```\n * 最佳使用方式:\n * <Form.Item name=\"attachmentList\" label=\"附件\">\n * <FileUpload action={uploadUrl} onPreview={onPreviewFile}>\n * <Button type=\"primary\">选择文件导入</Button>\n * </FileUpload>\n * </Form.Item>\n * ```\n *\n */\nexport const FileUpload: FC<FileUploadProps> = (props) => {\n useEffectCustom(() => {\n console.error('@flatbiz/antd库【FileUpload】组件已经过期,请使用【UploadWrapper】组件替换');\n }, []);\n\n const { onChange, onUploadError, onPreview, value, ...otherProps } = props;\n const [uploadValue, setUploadValue] = useState<AntdFileUploadItem[]>([]);\n const fieldNames = extend(\n {\n fileKey: 'fileKey',\n fileName: 'fileName',\n },\n props.fieldNames,\n ) as FileUploadItem;\n\n useEffect(() => {\n if (value && isArray(value)) {\n setUploadValue(\n value.map((item) => {\n return {\n uid: item['uid'] || item[fieldNames.fileKey],\n name: item[fieldNames.fileName],\n fileKey: item[fieldNames.fileKey],\n url: item[fieldNames.fileKey],\n thumbUrl: item[fieldNames.fileKey],\n };\n }),\n );\n }\n }, [fieldNames.fileKey, fieldNames.fileName, value]);\n\n const onUploadChange = hooks.useCallbackRef((info) => {\n if (info.file.status === 'done') {\n const respData = info.file.response;\n if (respData.code === '0000') {\n const result = respData.data || {};\n const uploadItem = {\n uid: info.file.uid,\n fileName: result[fieldNames.fileName] || (info.file.name as string),\n fileKey: result[fieldNames.fileKey],\n } as FileUploadItem;\n const respValue = (value || []).concat(uploadItem);\n onChange?.(respValue as unknown as FileUploadItem[]);\n } else {\n onUploadError?.(respData.message as string);\n }\n } else if (info.file.status === 'removed') {\n const uid = info.file.uid;\n const targetList = value !== undefined ? [...value] : [];\n const targetIndex = targetList.findIndex((item) => {\n const tempUid = item['uid'] || item[fieldNames.fileKey];\n return tempUid === uid;\n });\n if (targetIndex >= 0) {\n targetList.splice(targetIndex, 1);\n }\n onChange?.(targetList);\n } else if (info.file.status === 'error') {\n onUploadError?.();\n }\n // https://github.com/ant-design/ant-design/issues/2423\n setUploadValue([...info.fileList]);\n props.onUploadChange?.(info);\n });\n\n const onUploadPreview = hooks.useCallbackRef((file) => {\n onPreview?.({\n fileKey: file[fieldNames.fileKey],\n fileName: file[fieldNames.fileName],\n });\n });\n\n return (\n <Upload\n {...otherProps}\n onChange={onUploadChange}\n onPreview={onUploadPreview}\n fileList={uploadValue}\n className={classNames('v-file-upload', otherProps.className)}\n >\n {props.children}\n </Upload>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { isUndefinedOrNull } from '@flatbiz/utils';\nimport { cloneElement, CSSProperties, FC } from 'react';\nimport './style.less';\n\nexport type FlexLayoutProps = {\n className?: string;\n fullIndex?: number | number[];\n direction?: 'vertical' | 'horizontal';\n onClick?: () => void;\n style?: CSSProperties;\n gap?: number;\n};\n/**\n * flex布局\n * 1. direction:默认值vertical\n * 2. gap间隙距离\n * 3. fullIndex:指定children数组索引值对象flex=1\n * 4. children添加key熟悉\n * @param props\n * @returns\n */\nexport const FlexLayout: FC<FlexLayoutProps> = (props) => {\n const childrens = (isArray(props.children) ? props.children : [props.children]) as JSX.Element[];\n const direction = props.direction || 'vertical';\n const gap = props.gap ? props.gap : 0;\n const fullIndexList = !isUndefinedOrNull(props.fullIndex)\n ? isArray(props.fullIndex)\n ? props.fullIndex\n : [props.fullIndex as number]\n : [];\n return (\n <div\n className={classNames('v-flex-layout', `v-flex-${direction}`, props.className)}\n style={props.style}\n onClick={props.onClick}\n >\n {childrens.map((children, index) => {\n const childrenStyle = children.props.style || {};\n const style = fullIndexList.includes(index) ? { flex: 1, ...childrenStyle } : childrenStyle;\n if (index < childrens.length - 1 && gap > 0) {\n if (direction === 'horizontal') {\n style.marginRight = gap;\n } else {\n style.marginBottom = gap;\n }\n }\n return cloneElement(children, { style });\n })}\n </div>\n );\n};\n","import { CSSProperties, VFC } from 'react';\n\nexport type GapProps = {\n height?: number;\n className?: string;\n style?: CSSProperties;\n};\n\n/**\n * 间隙组件\n * @param props\n * @returns\n */\nexport const Gap: VFC<GapProps> = (props) => {\n return <div style={{ height: props.height, ...props.style }} className={props.className} />;\n};\n","import { ModelType } from '@dimjs/model';\n\nexport interface ModalStateType {\n title?: string;\n /**\n * 显示modal\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, unknown> | null;\n operateType: 'create' | 'update' | 'view';\n pageLoading?: boolean;\n}\n\nexport interface ModalActionsParamType {\n openModalForm: Pick<ModalStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeModal: void;\n setModalItemData: Record<string, unknown>;\n}\n\n/**\n * @shared\n * 提供公共的modal处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个modal实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const ModalModel: ModelType<ModalStateType, ModalActionsParamType> = {\n actions: {\n openModalForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeModal() {\n return (state) => {\n state.visible = false;\n };\n },\n setModalItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: 'view',\n },\n};\n","import { Button, ButtonProps, Space } from 'antd';\nimport { Fragment } from 'react';\n\nexport interface ModalOperationOldProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const ModalOperation = ({\n loading,\n okText = '保存',\n cancelText = '取消',\n onCancel,\n onOk,\n hideOkBtn,\n ...otherProps\n}: ModalOperationOldProps) => {\n return (\n <Fragment>\n <Space size=\"middle\">\n <Button {...otherProps.cancelButtonProps} className=\"cancel-btn\" onClick={onCancel}>\n {cancelText}\n </Button>\n {hideOkBtn != true && (\n <Button\n type=\"primary\"\n {...otherProps.okButtonProps}\n className=\"ok-btn\"\n onClick={onOk}\n loading={loading}\n >\n {okText}\n </Button>\n )}\n </Space>\n </Fragment>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Modal, ModalProps } from 'antd';\nimport { FC, useEffect } from 'react';\nimport { ModalOperation, ModalOperationOldProps } from './modal-operation';\nimport './style.less';\n\nexport type ModalFormProps = {\n className?: string;\n // 整个modal页面级的spinning <Page loading />\n pageLoading?: boolean;\n // 设置了 ModalProps footer属性后,operationProps配置将失效\n operationProps?: ModalOperationOldProps;\n footer?: null | React.ReactNode;\n} & Omit<\n ModalProps,\n | 'footer'\n | 'onOk'\n | 'okText'\n | 'cancelText'\n | 'okButtonProps'\n | 'cancelButtonProps'\n | 'okType'\n | 'confirmLoading'\n>;\n\nconst PageLoader = () => {\n return (\n <div className=\"modal-wraper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const ModalWraper: FC<ModalFormProps> = (props) => {\n const { pageLoading, className, width, children, footer, operationProps, ...otherProps } = props;\n\n useEffect(() => {\n console.error(\n '@flatbiz/antd库【ModalWraper】组件已经过期,请使用ModalWrapper替换包括ModalWraper=>ModalWrapper、createModalWraperModel=>createModalWrapperModel,如果使用ModalWrapper组件原用法需要调整',\n );\n }, []);\n\n return (\n <Modal\n className={classNames('modal-wraper', className)}\n keyboard={false}\n forceRender={false}\n destroyOnClose={true}\n {...otherProps}\n width={width || 600}\n footer={null}\n >\n <div className=\"modal-wraper-content\">\n {children}\n {pageLoading && <PageLoader />}\n </div>\n {footer !== null && (\n <div className=\"modal-wraper-content-footer\">\n {footer ? footer : <ModalOperation {...operationProps} />}\n </div>\n )}\n </Modal>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { ModalActionsParamType, ModalModel, ModalStateType } from './modal.model';\n\n/**\n * 组件单词写错,请输入\n */\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst modalModels: Record<string, API<ModelType<ModalStateType, ModalActionsParamType, any>>> = {};\n\n/**\n * modal弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [modalState, modalActions] = createModalWraperModel('key值').useStore();\n * ```\n */\nexport const createModalWraperModel = (key: string) => {\n if (!modalModels[key]) {\n modalModels[key] = Model(ModalModel);\n }\n return modalModels[key];\n};\n\nexport * from './modal-wraper';\n","import { ModelType } from '@dimjs/model';\n\nexport interface ModalStateType {\n title?: string;\n /**\n * 显示modal\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, unknown> | null;\n operateType: 'create' | 'update' | 'view';\n pageLoading?: boolean;\n}\n\nexport interface ModalActionsParamType {\n openModalForm: Pick<ModalStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeModal: void;\n setModalItemData: Record<string, unknown>;\n}\n\n/**\n * @shared\n * 提供公共的modal处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个modal实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const ModalModel: ModelType<ModalStateType, ModalActionsParamType> = {\n actions: {\n openModalForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeModal() {\n return (state) => {\n state.visible = false;\n };\n },\n setModalItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: 'view',\n },\n};\n","import { Button, ButtonProps, Space } from 'antd';\nimport { Fragment } from 'react';\n\nexport interface ModalOperationProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const ModalOperation = ({\n loading,\n okText = '保存',\n cancelText = '取消',\n onCancel,\n onOk,\n hideOkBtn,\n ...otherProps\n}: ModalOperationProps) => {\n return (\n <Fragment>\n <Space size=\"middle\">\n <Button {...otherProps.cancelButtonProps} className=\"cancel-btn\" onClick={onCancel}>\n {cancelText}\n </Button>\n {hideOkBtn != true && (\n <Button\n type=\"primary\"\n {...otherProps.okButtonProps}\n className=\"ok-btn\"\n onClick={onOk}\n loading={loading}\n >\n {okText}\n </Button>\n )}\n </Space>\n </Fragment>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Modal, ModalProps } from 'antd';\nimport { FC } from 'react';\nimport { ModalOperation, ModalOperationProps } from './modal-operation';\nimport './style.less';\n\nexport type ModalFormOldProps = {\n className?: string;\n // 整个modal页面级的spinning <Page loading />\n pageLoading?: boolean;\n // 设置了 ModalProps footer属性后,operationProps配置将失效\n operationProps?: ModalOperationProps;\n footer?: null | React.ReactNode;\n} & Omit<\n ModalProps,\n | 'footer'\n | 'onOk'\n | 'okText'\n | 'cancelText'\n | 'okButtonProps'\n | 'cancelButtonProps'\n | 'okType'\n | 'confirmLoading'\n>;\n\nconst PageLoader = () => {\n return (\n <div className=\"modal-wrapper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const ModalWrapper: FC<ModalFormOldProps> = (props) => {\n const { pageLoading, className, width, children, footer, operationProps, ...otherProps } = props;\n\n return (\n <Modal\n className={classNames('modal-wrapper', className)}\n keyboard={false}\n forceRender={false}\n destroyOnClose={true}\n {...otherProps}\n width={width || 600}\n footer={null}\n >\n <div className=\"modal-wrapper-content\">\n {children}\n {pageLoading && <PageLoader />}\n </div>\n {footer !== null && (\n <div className=\"modal-wrapper-content-footer\">\n {footer ? footer : <ModalOperation {...operationProps} />}\n </div>\n )}\n </Modal>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { ModalActionsParamType, ModalModel, ModalStateType } from './modal.model';\n\n/**\n * 组件单词写错,请输入\n */\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst modalModels: Record<string, API<ModelType<ModalStateType, ModalActionsParamType, any>>> = {};\n\n/**\n * modal弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [modalState, modalActions] = createModalWrapperModel('key值').useStore();\n * ```\n */\nexport const createModalWrapperModel = (key: string) => {\n if (!modalModels[key]) {\n modalModels[key] = Model(ModalModel);\n }\n return modalModels[key];\n};\n\nexport * from './modal-wrapper';\n","import { classNames } from '@dimjs/utils';\nimport { CSSProperties, FC } from 'react';\nimport './style.less';\n\nexport type PageFixedFooterProps = {\n className?: string;\n style?: CSSProperties;\n};\n\nexport const PageFixedFooter: FC<PageFixedFooterProps> = (props) => {\n return (\n <div className={classNames('page-fixed-footer', props.className)} style={props.style}>\n {props.children}\n </div>\n );\n};\n","export const Page404 = () => {\n return <div className=\"v-404\">404</div>;\n};\n","import './style.less';\n/**\n * 使用在Form组件上,预定义form-item label宽度\n */\nexport const formClassName = {\n label_width_70: 'form-label-70',\n label_width_80: 'form-label-80',\n label_width_90: 'form-label-90',\n label_width_100: 'form-label-100',\n label_width_110: 'form-label-110',\n label_width_120: 'form-label-120',\n label_width_130: 'form-label-130',\n label_width_auto: 'form-label-auto',\n};\n\n/**\n * 使用在Form.Item组件上,预定义form-item label宽度\n */\nexport const formItemClassName = {\n label_width_70: 'form-item-label-70',\n label_width_80: 'form-item-label-80',\n label_width_90: 'form-item-label-90',\n label_width_100: 'form-item-label-100',\n label_width_110: 'form-item-label-110',\n label_width_120: 'form-item-label-120',\n label_width_130: 'form-item-label-130',\n label_width_auto: 'form-item-label-auto',\n};\n","import { formClassName, formItemClassName } from './form';\n\n/**\n * 预定义className\n * ```\n * form: 使用在Form组件上,设置form-item label宽度\n * formItem: 使用在Form.Item组件上,设置form-item label宽度\n * ```\n */\nexport const preDefinedClassName = {\n form: formClassName,\n formItem: formItemClassName,\n};\n","import { classNames } from '@dimjs/utils';\nimport { CSSProperties, FC, ReactElement } from 'react';\nimport './style.less';\n\nexport type SimpleLayoutProps = {\n className?: string;\n style?: CSSProperties;\n title?: string | ReactElement;\n desc?: string | ReactElement;\n formLabelAlign?: 'left' | 'right';\n layoutType?: 'layer' | 'tight';\n};\n\nexport const SimpleLayout: FC<SimpleLayoutProps> = (props) => {\n const labelAlign = props.formLabelAlign || 'right';\n const className = classNames(\n 'simple-layout',\n {\n 'simple-layout-tight': props.layoutType === 'tight',\n 'simple-layout-formlabel-left': labelAlign === 'left',\n },\n props.className,\n );\n\n return (\n <div className={className} style={props.style}>\n {props.title ? <div className=\"simple-layout-title\">{props.title}</div> : null}\n {props.desc ? <div className=\"simple-layout-desc\">{props.desc}</div> : null}\n {props.children ? <div className=\"simple-layout-content\">{props.children}</div> : null}\n </div>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { hooks } from '@wove/react';\nimport { FC, useEffect, useMemo, useState } from 'react';\n\nexport interface SmsCountDownProps {\n onSendRequest: () => Promise<void>; // 验证码请求函数\n totalTicks?: number; // 总倒计时,默认:60(s)\n duration?: number; // 倒计时间隔,默认:1000ms(1s)\n autoStart?: boolean; // 是否自动开始倒计时,默认:fasle,注意:不会自动调用 onSendRequest\n format?: string; // 倒计时格式化,默认:'{t}s'\n sendTxt?: string; // 文案,默认:'获取验证码'\n sentTxt?: string; // 倒计时完成文案,默认:'重新获取'\n processingTxt?: string; // 倒计时中文案,默认:'发送中...'\n onTick?: (time: number) => void; // 倒计时回调\n className?: string;\n}\nexport const SmsCountDown: FC<SmsCountDownProps> = (props) => {\n const [showMessage, setShowMessage] = useState<string>();\n\n const [running, setRunning] = useState(false);\n const [starting, setStarting] = useState(false);\n\n // 初始化设置有效\n const initConfig = useMemo<Omit<SmsCountDownProps, 'onSendRequest' | 'onTick' | 'className'>>(() => {\n return {\n sendTxt: props.sendTxt,\n sentTxt: props.sentTxt,\n processingTxt: props.processingTxt,\n format: props.format,\n autoStart: props.autoStart,\n totalTicks: props.totalTicks,\n duration: props.duration,\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const format = initConfig.format as string;\n const totalTicks = initConfig.totalTicks as number;\n const duration = initConfig.duration as number;\n\n const countdownFnc = hooks.useCountdownCallback(\n (num) => {\n const second = num / 1000;\n if (num > 0) {\n if (!running) {\n setRunning(true);\n }\n setShowMessage(format.replace('{t}', String(second)));\n props.onTick?.(second);\n } else if (num === 0) {\n setRunning(false);\n setStarting(false);\n props.onTick?.(second);\n setShowMessage(initConfig.sentTxt);\n }\n },\n totalTicks * 1000,\n { intervalTime: duration },\n );\n\n useEffect(() => {\n if (!initConfig.autoStart) {\n setShowMessage(initConfig.sendTxt);\n } else {\n countdownFnc();\n setStarting(true);\n setRunning(true);\n }\n }, [countdownFnc, initConfig]);\n\n const onStart = hooks.useCallbackRef(() => {\n if (running || starting) return;\n setStarting(true);\n setShowMessage(initConfig.processingTxt);\n void props\n .onSendRequest()\n .then(() => {\n setRunning(true);\n countdownFnc();\n })\n .catch(() => {\n setShowMessage(initConfig.sendTxt);\n setStarting(false);\n });\n });\n\n const className = classNames('v-count-down', props.className, {\n running,\n starting,\n });\n\n return (\n <div className={className} onClick={onStart}>\n {showMessage}\n </div>\n );\n};\n\nSmsCountDown.defaultProps = {\n totalTicks: 60,\n duration: 1000,\n autoStart: false,\n format: '{t}s',\n sendTxt: '获取验证码',\n sentTxt: '重新获取',\n processingTxt: '发送中...',\n};\n","import { classNames } from '@dimjs/utils';\nimport { Children, cloneElement, FC } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport './style.less';\n\ntype StaticMethods = {\n Condition: typeof Condition;\n Operate: typeof Operate;\n Table: typeof Table;\n Footer: typeof Footer;\n};\n\nconst overdueConsole = () => {\n console.error('@flatbiz/antd库【TableFilterLayout】组件已经过期,请使用【SimpleLayout】组件替代');\n};\n\nexport type TableFilterLayoutProps = {\n className?: string;\n isFixed?: boolean;\n fullIndex?: number;\n};\n\nexport const TableFilterLayout: FC<TableFilterLayoutProps> & StaticMethods = (props) => {\n useEffectCustom(() => {\n overdueConsole();\n }, []);\n\n return (\n <div\n className={classNames(\n 'table-filter-layout',\n { 'table-filter-layout-flex': props.isFixed },\n props.className,\n )}\n >\n {Children.map(props.children, (item, index) => {\n if (props.isFixed && index === props.fullIndex) {\n return cloneElement(item as JSX.Element, { className: 'table-filter-layout-flex-full' });\n }\n return item;\n })}\n </div>\n );\n};\n\nconst Condition: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-condition', props.className)}>{props.children}</div>;\n};\n\nconst Operate: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-operate', props.className)}>{props.children}</div>;\n};\n\nconst Table: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-table', props.className)}>{props.children}</div>;\n};\nconst Footer: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-footer', props.className)}>{props.children}</div>;\n};\n\nTableFilterLayout.Condition = Condition;\nTableFilterLayout.Operate = Operate;\nTableFilterLayout.Table = Table;\nTableFilterLayout.Footer = Footer;\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { TSetDefaultDefined } from '@flatbiz/utils';\nimport { TreeSelectProps } from 'antd';\n\nexport type ModelState = {\n treeSelectorList: TSetDefaultDefined<TreeSelectProps['treeData'], []>;\n queryIsEmpty: boolean;\n requestStatus?: 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setSelectBoxList: ModelState['treeSelectorList'];\n resetSelectBoxList: void;\n changeRequestStatus: ModelState['requestStatus'];\n};\n\nconst defaultState: ModelState = {\n treeSelectorList: [],\n queryIsEmpty: false,\n};\n\nconst TreeSelectorWrapperModel: ModelType<ModelState, ModelActionParams> = {\n actions: {\n setSelectBoxList: (params) => {\n return (state) => {\n state.treeSelectorList = params || [];\n state.requestStatus = 'request-success';\n };\n },\n resetSelectBoxList: () => {\n return (state) => {\n state.treeSelectorList = [];\n };\n },\n changeRequestStatus: (params) => {\n return (state) => {\n state.requestStatus = params;\n };\n },\n },\n state: defaultState,\n};\n\nconst treeSelectorWrapperModels: Record<string, API<ModelType<ModelState, ModelActionParams, any>>> = {};\n\n/**\n * ```\n * 使用方式\n * const [state, actions] = useTreeSelectorWrapperModel('key值').useStore();\n * ```\n */\nexport const treeSelectorWrapperModel = (key: string) => {\n if (!treeSelectorWrapperModels[key]) {\n treeSelectorWrapperModels[key] = Model(TreeSelectorWrapperModel);\n }\n return treeSelectorWrapperModels[key];\n};\n","import { isArray } from '@dimjs/lang';\nimport { TPlainObject, treeLeafParentsArray, treeToTiledArray } from '@flatbiz/utils';\nimport { TreeSelectProps } from 'antd';\n\nexport const getExpandedKeys = (\n value: string | number,\n treeList: TPlainObject[],\n fieldNames?: TreeSelectProps['fieldNames'],\n) => {\n if (!isArray(treeList) || treeList.length === 0) return [];\n const tiledArray = treeToTiledArray(treeList, fieldNames);\n return treeLeafParentsArray(value, tiledArray);\n};\n","import { RedoOutlined } from '@ant-design/icons';\nimport { isArray } from '@dimjs/lang';\nimport { extend } from '@dimjs/utils';\nimport { useEffectCustom } from '@flatbiz/antd';\nimport { isUndefinedOrNull, TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, Empty, message, TreeSelect, TreeSelectProps } from 'antd';\nimport { DependencyList, forwardRef, useEffect, useImperativeHandle, useMemo, useState } from 'react';\nimport { ModelState, treeSelectorWrapperModel } from './model';\nimport './style.less';\nimport { getExpandedKeys } from './utils';\ntype TreeSelectorServiceConfig = {\n params?: TPlainObject;\n requiredParamsKeys?: string[];\n onRequest?: (params?: any) => any;\n /**\n * 响应数据适配器\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject[];\n};\n\nexport type TreeSelectorWrapperProps = Omit<\n TreeSelectProps,\n 'treeExpandedKeys' | 'treeData' | 'loading' | 'onTreeExpand'\n> & {\n modelKey: string;\n effectDependencyList?: DependencyList;\n /**\n * 请求服务需求的数据,当设置`treeSelectorList`后无效果\n */\n serviceConfig?: TreeSelectorServiceConfig;\n /**\n * 当设置treeSelectorList后,serviceConfig、onTreeSelectorListChange将失效\n * ```\n * 1. 不支持异步数据,异步使用serviceConfig方式\n * ```\n */\n treeSelectorList?: TreeSelectProps['treeData'];\n /**\n * 通过服务获取数据后回调,当设置`treeSelectorList`后无效果\n */\n onTreeSelectorListChange?: (treeSelectorList?: TreeSelectProps['treeData']) => void;\n};\n\nexport type TreeSelectorWrapperRefApi = {\n onClearSelectorList: () => void;\n getTreeSelectorList: () => TreeSelectProps['treeData'];\n};\n\n/**\n * 树选择器包装组件\n * @param props\n * @returns\n * ```\n * 1. 当设置treeSelectorList属性后,serviceConfig、onTreeSelectorListChange将失效\n * ```\n */\nexport const TreeSelectorWrapper = forwardRef<TreeSelectorWrapperRefApi, TreeSelectorWrapperProps>(\n (props, ref) => {\n const {\n serviceConfig,\n effectDependencyList,\n onTreeSelectorListChange,\n treeSelectorList,\n modelKey,\n ...otherProps\n } = props;\n const newServiceConfig = serviceConfig || {};\n const newEffectDependencyList = effectDependencyList || [];\n const [loading, setLoading] = useState(false);\n const [treeExpandedKeys, setTreeExpandedKeys] = useState<React.Key[]>();\n const [state, actions] = treeSelectorWrapperModel(modelKey).useStore();\n const valueIsEmpty = (value: string | number) => {\n return value === '' || isUndefinedOrNull(value);\n };\n\n const serviceResponseHandle = (respData) => {\n const respDataList = (\n newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData\n ) as TPlainObject[];\n return respDataList;\n };\n\n const startDataSourceRequest = hooks.useCallbackRef(async () => {\n try {\n if (!newServiceConfig.onRequest) {\n throw new Error('onRequest 调用接口服务不能为空');\n }\n const requiredParamsKeys = newServiceConfig.requiredParamsKeys;\n const params = extend({}, newServiceConfig.params);\n if (requiredParamsKeys) {\n const isEmpty = requiredParamsKeys.find((key) => {\n return valueIsEmpty(params[key] as string | number);\n });\n if (isEmpty) {\n console.warn(`TreeSelectorWrapper组件:参数:${requiredParamsKeys.join('、')}不能为空`);\n return;\n }\n }\n try {\n setLoading(true);\n void actions.changeRequestStatus('request-pre');\n const _respData = await newServiceConfig.onRequest?.(params);\n const respData = serviceResponseHandle(_respData) as TreeSelectProps['treeData'];\n setLoading(false);\n onTreeSelectorListChange?.(respData);\n void actions.setSelectBoxList(respData || []);\n } catch (error) {\n setLoading(false);\n void actions.changeRequestStatus('request-error');\n }\n } catch (error) {\n setLoading(false);\n void message.error((error.message as string) || '数据查询异常...');\n }\n });\n\n useEffectCustom(() => {\n if (treeSelectorList) {\n void actions.setSelectBoxList(treeSelectorList);\n return;\n }\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = treeSelectorWrapperModel(modelKey).getState();\n console.log('realTimeState', realTimeState.requestStatus);\n if (\n newEffectDependencyList.length > 0 ||\n !realTimeState.requestStatus ||\n realTimeState.requestStatus === 'request-error'\n ) {\n void startDataSourceRequest();\n }\n }, newEffectDependencyList);\n\n useEffect(() => {\n if (!isUndefinedOrNull(props.value)) {\n const valueList = isArray(props.value) ? props.value : [props.value];\n if (valueList.length > 0 && state.treeSelectorList.length > 0) {\n let expandedKeys = [] as Array<string | number>;\n valueList.forEach((tempValue) => {\n const targetList = getExpandedKeys(\n tempValue as string | number,\n state.treeSelectorList,\n props.fieldNames,\n );\n expandedKeys = expandedKeys.concat(targetList.map((item) => item.value));\n });\n setTreeExpandedKeys((prev) => {\n const mergeList = expandedKeys.concat(prev || []);\n return Array.from(new Set(mergeList));\n });\n }\n }\n }, [state.treeSelectorList, props.fieldNames, props.value]);\n\n useImperativeHandle(ref, () => {\n return {\n onClearSelectorList: () => {\n void actions.setSelectBoxList([]);\n },\n getTreeSelectorList: () => {\n return state.treeSelectorList;\n },\n };\n });\n\n const onTreeExpand = hooks.useCallbackRef((expandedKeys) => {\n setTreeExpandedKeys(expandedKeys as string[]);\n });\n\n const onAgainRequest = hooks.useCallbackRef(() => {\n void startDataSourceRequest();\n });\n\n return (\n <TreeSelect\n dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}\n showSearch={true}\n treeLine={true}\n {...otherProps}\n value={isUndefinedOrNull(props.value) ? undefined : props.value}\n treeExpandedKeys={treeExpandedKeys}\n treeData={state.treeSelectorList}\n loading={loading}\n onTreeExpand={onTreeExpand}\n style={{ width: '100%', ...otherProps.style }}\n suffixIcon={\n state.requestStatus === 'request-error' ? (\n <RedoOutlined spin={loading} onClick={onAgainRequest} />\n ) : undefined\n }\n notFoundContent={\n <NotFoundContent requestStatus={state.requestStatus} onAgainRequest={onAgainRequest} />\n }\n />\n );\n },\n);\n\nconst NotFoundContent = (props: {\n requestStatus?: ModelState['requestStatus'];\n onAgainRequest: () => void;\n}) => {\n const description = useMemo(() => {\n if (props.requestStatus === 'request-error') {\n return '数据查询异常';\n } else if (props.requestStatus === 'request-success') {\n return '暂无数据';\n }\n return '数据查询中';\n }, [props.requestStatus]);\n return (\n <Empty\n image={Empty.PRESENTED_IMAGE_SIMPLE}\n description={description}\n className={'tree-selector-wrapper-empty'}\n >\n {props.requestStatus === 'request-error' && (\n <Button type=\"primary\" onClick={props.onAgainRequest}>\n 重新获取数据\n </Button>\n )}\n </Empty>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { TSetDefaultDefined } from '@flatbiz/utils';\nimport { TreeProps } from 'antd';\n\nexport type ModelState = {\n treeList: TSetDefaultDefined<TreeProps['treeData'], []>;\n queryIsEmpty: boolean;\n requestStatus?: 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setTreeList: ModelState['treeList'];\n resetTreeList: void;\n changeRequestStatus: ModelState['requestStatus'];\n};\n\nconst defaultState: ModelState = {\n treeList: [],\n queryIsEmpty: false,\n};\n\nconst TreeWrapperModel: ModelType<ModelState, ModelActionParams> = {\n actions: {\n setTreeList: (params) => {\n return (state) => {\n state.treeList = params || [];\n state.requestStatus = 'request-success';\n };\n },\n resetTreeList: () => {\n return (state) => {\n state.treeList = [];\n };\n },\n changeRequestStatus: (params) => {\n return (state) => {\n state.requestStatus = params;\n };\n },\n },\n state: defaultState,\n};\n\nconst treeWrapperModels: Record<string, API<ModelType<ModelState, ModelActionParams, any>>> = {};\n\n/**\n * ```\n * 使用方式\n * const [state, actions] = useTreeWrapperModel('key值').useStore();\n * ```\n */\nexport const treeWrapperModel = (key: string) => {\n if (!treeWrapperModels[key]) {\n treeWrapperModels[key] = Model(TreeWrapperModel);\n }\n return treeWrapperModels[key];\n};\n","import { TPlainObject, treeLeafParentsArray, treeToTiledArray } from '@flatbiz/utils';\n\nexport const getExpandedKeys = (\n value: string | number,\n treeList: TPlainObject[],\n fieldNames?: { label?: string; value?: string; children?: string },\n) => {\n const tiledArray = treeToTiledArray(treeList, fieldNames);\n return treeLeafParentsArray(value, tiledArray);\n};\n","import { isArray } from '@dimjs/lang';\nimport { extend } from '@dimjs/utils';\nimport { useEffectCustom } from '@flatbiz/antd';\nimport { isUndefinedOrNull, TPlainObject, treeToTiledArray } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, Empty, message, Spin, Tree, TreeProps } from 'antd';\nimport { DependencyList, forwardRef, useImperativeHandle, useMemo, useState } from 'react';\nimport { ModelState, treeWrapperModel } from './model';\nimport './style.less';\nimport { getExpandedKeys } from './utils';\n\ntype TreeServiceConfig = {\n params?: TPlainObject;\n requiredParamsKeys?: string[];\n onRequest?: (params?: any) => any;\n /**\n * 响应数据适配器\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject[];\n};\n\nexport type TreeWrapperProps = Omit<\n TreeProps,\n | 'expandedKeys'\n | 'treeData'\n | 'onExpand'\n | 'selectedKeys'\n | 'checkedKeys'\n | 'onCheck'\n | 'onSelect'\n | 'defaultCheckedKeys'\n | 'defaultSelectedKeys'\n | 'fieldNames'\n> & {\n modelKey: string;\n effectDependencyList?: DependencyList;\n /**\n * 请求服务需求的数据,当设置`selectorTreeList`后无效果\n */\n serviceConfig?: TreeServiceConfig;\n /**\n * 当设置selectorTreeList后,serviceConfig将失效\n * ```\n * 1. 不支持异步数据,异步使用serviceConfig方式\n * ```\n */\n selectorTreeList?: TreeProps['treeData'];\n value?: string | number | Array<string | number>;\n onChange?: (selectedKey: string | number | Array<string | number>) => void;\n fieldNames?: { label?: string; value?: string; children?: string };\n /**\n * 打开tree折叠过滤关键字\n */\n filterLabel?: string;\n};\n\nexport type TreeWrapperRefApi = {\n onClearSelectorList: () => void;\n getTreeDataList: () => TreeProps['treeData'];\n};\n\n/**\n * 树包装组件\n * @param props\n * @returns\n * ```\n * 1. 当设置selectorTreeList属性后,serviceConfig、onSelectorListChange将失效\n * ```\n */\nexport const TreeWrapper = forwardRef<TreeWrapperRefApi, TreeWrapperProps>((props, ref) => {\n const {\n serviceConfig,\n effectDependencyList,\n selectorTreeList,\n value,\n onChange,\n fieldNames,\n modelKey,\n ...otherProps\n } = props;\n const newServiceConfig = serviceConfig || {};\n const newEffectDependencyList = effectDependencyList || [];\n const [treeExpandedKeys, setTreeExpandedKeys] = useState<React.Key[]>();\n const [state, actions] = treeWrapperModel(modelKey).useStore();\n const [loading, setLoading] = useState(false);\n\n const valueList = useMemo(() => {\n if (isUndefinedOrNull(props.value)) return undefined;\n return (isArray(props.value) ? props.value : [props.value]) as Array<string | number>;\n }, [props.value]);\n\n const valueIsEmpty = (value: string | number) => {\n return value === '' || isUndefinedOrNull(value);\n };\n\n const serviceResponseHandle = (respData) => {\n const respDataList = (\n newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData\n ) as TPlainObject[];\n return respDataList;\n };\n\n const startDataSourceRequest = hooks.useCallbackRef(async () => {\n try {\n if (!newServiceConfig.onRequest) {\n throw new Error('onRequest 调用接口服务不能为空');\n }\n const requiredParamsKeys = newServiceConfig.requiredParamsKeys;\n const params = extend({}, newServiceConfig.params);\n if (requiredParamsKeys) {\n const isEmpty = requiredParamsKeys.find((key) => {\n return valueIsEmpty(params[key] as string | number);\n });\n if (isEmpty) {\n console.warn(`TreeWrapper组件:参数:${requiredParamsKeys.join('、')}不能为空`);\n return;\n }\n }\n try {\n setLoading(true);\n void actions.changeRequestStatus('request-pre');\n const _respData = await newServiceConfig.onRequest?.(params);\n const respData = serviceResponseHandle(_respData) as TreeProps['treeData'];\n void actions.setTreeList(respData || []);\n setLoading(false);\n } catch (error) {\n setLoading(false);\n void actions.changeRequestStatus('request-error');\n }\n } catch (error) {\n setLoading(false);\n void message.error((error.message as string) || '数据查询异常...');\n }\n });\n\n useEffectCustom(() => {\n if (selectorTreeList) {\n void actions.setTreeList(selectorTreeList);\n return;\n }\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = treeWrapperModel(modelKey).getState();\n if (\n newEffectDependencyList.length > 0 ||\n !realTimeState.requestStatus ||\n realTimeState.requestStatus === 'request-error'\n ) {\n void startDataSourceRequest();\n }\n }, newEffectDependencyList);\n\n useEffectCustom(() => {\n if (valueList && valueList.length > 0 && state.treeList.length > 0 && !treeExpandedKeys) {\n let expandedKeys = [] as Array<string | number>;\n valueList.forEach((tempValue) => {\n const targetList = getExpandedKeys(tempValue, state.treeList, props.fieldNames);\n expandedKeys = expandedKeys.concat(targetList.map((item) => item.value));\n });\n setTreeExpandedKeys((prev) => {\n const mergeList = expandedKeys.concat(prev || []);\n return Array.from(new Set(mergeList));\n });\n }\n }, [state.treeList, props.fieldNames, value]);\n\n hooks.useUpdateEffect(() => {\n if (props.filterLabel) {\n const tiledArray = treeToTiledArray(state.treeList || [], props.fieldNames);\n const targetList = tiledArray.filter((item) => item.label?.includes(props.filterLabel || ''));\n let expandedKeys = [] as Array<string | number>;\n targetList.map((tempItem) => {\n const targetValues = getExpandedKeys(\n tempItem.value as string,\n state.treeList || [],\n props.fieldNames,\n );\n const valueList = targetValues.map((item) => item.value);\n expandedKeys = expandedKeys.concat(valueList);\n });\n setTreeExpandedKeys(Array.from(new Set(expandedKeys)));\n } else {\n setTreeExpandedKeys([]);\n }\n }, [props.filterLabel]);\n\n useImperativeHandle(ref, () => {\n return {\n onClearSelectorList: () => {\n void actions.resetTreeList();\n },\n getTreeDataList: () => {\n return state.treeList;\n },\n };\n });\n\n const onExpand = hooks.useCallbackRef((expandedKeys) => {\n setTreeExpandedKeys(expandedKeys as string[]);\n });\n const onCheck = hooks.useCallbackRef((checkedKeys) => {\n onChange?.(checkedKeys as Array<string | number>);\n });\n const onSelect = hooks.useCallbackRef((checkedKeys) => {\n if (props.multiple) {\n onChange?.(checkedKeys as Array<string | number>);\n } else {\n onChange?.(checkedKeys[0] as string | number);\n }\n });\n\n const treeFieldNames = useMemo(() => {\n const newFieldNames = extend({ label: 'label', value: 'value', children: 'children' }, fieldNames);\n return { title: newFieldNames.label, key: newFieldNames.value, children: newFieldNames.children };\n }, [fieldNames]);\n\n if (state.treeList.length > 0) {\n return (\n <Tree\n showLine={otherProps.checkable ? false : { showLeafIcon: false }}\n {...otherProps}\n fieldNames={treeFieldNames}\n expandedKeys={treeExpandedKeys}\n treeData={state.treeList}\n onExpand={onExpand}\n selectedKeys={otherProps.checkable ? undefined : valueList}\n checkedKeys={otherProps.checkable ? valueList : undefined}\n onCheck={otherProps.checkable ? onCheck : undefined}\n onSelect={otherProps.checkable ? undefined : onSelect}\n style={{ width: '100%', ...otherProps.style }}\n />\n );\n }\n\n return (\n <NotFoundContent\n requestStatus={state.requestStatus}\n loading={loading}\n onAgainRequest={startDataSourceRequest}\n />\n );\n});\n\nconst NotFoundContent = (props: {\n requestStatus?: ModelState['requestStatus'];\n onAgainRequest: () => void;\n loading: boolean;\n}) => {\n const description = useMemo(() => {\n if (props.requestStatus === 'request-error') {\n return '数据查询异常';\n } else if (props.requestStatus === 'request-success') {\n return '暂无数据';\n }\n return '数据查询中';\n }, [props.requestStatus]);\n return (\n <div className=\"tree-wrapper-empty\">\n <Spin spinning={props.loading}></Spin>\n <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={description}>\n {props.requestStatus === 'request-error' && (\n <Button type=\"primary\" onClick={props.onAgainRequest}>\n 重新获取数据\n </Button>\n )}\n </Empty>\n </div>\n );\n};\n"],"names":["styles","noop","getPermissionList","_getGlobalData","getGlobalData","elemAclLimits","permissionList","_isArray","hasPermission","name","includes","Permission","props","_jsx","Fragment","children","ButtonOperate","className","Space","split","Divider","type","size","wrap","_isUndefined","operateList","map","item","index","text","color","onClick","permission","needConfirm","confirmMessage","hidden","style","otherProps","_excluded","newStyle","_extends","Popconfirm","title","okText","cancelText","onConfirm","arrowPointAtCenter","Button","undefined","danger","_createElement","key","defaultProps","DatePickerWrapper","value","onChange","format","useMemo","showTime","onChangeDate","_hooks","useCallbackRef","moment","datePickerValue","flatbizDate","isDate","Date","DatePicker","width","DateRangePickerWrapper","values","value1","_ref","value2","date1","_ref2","date2","rangePickerValue","RangePicker","DrawerModel","actions","openDrawerForm","itemData","operateType","pageLoading","state","visible","closeDrawer","setDrawerItemData","params","DrawerOperation","_jsxs","cancelButtonProps","onCancel","hideOkBtn","icon","_SaveOutlined","okButtonProps","onOk","loading","PageLoader","DrawerWraper","_props$width","footer","operationProps","useEffect","console","error","Drawer","_classNames","keyboard","forceRender","destroyOnClose","contentWrapperStyle","maxWidth","drawerModels","createDrawerWraperModel","Model","DrawerWrapper","createDrawerWrapperModel","getEditable","editable","tableRowIndex","CheckboxGroupFormItemContent","fieldConfig","editableConfig","render","editableComptProps","viewLabelList","options","length","label","returnList","forEach","target","find","temp","push","Checkbox","Group","tag","Tag","CheckboxGroupFormItem","formItemProps","Form","Item","DatePickerWrapperFormItem","FormItemContent","viewLabel","join","DateRangePickerWrapperFormItem","InputFormItem","Input","InputNumberFormItem","InputNumber","RadioGroupFormItemContent","e","Radio","RadioGroupFormItem","defaultState","selectorList","queryIsEmpty","requestStatus","_SelectorWrapperModel","setSelectBoxList","resetSelectBoxList","changeRequestStatus","selectorWrapperModels","selectorWrapperModel","SelectorWrapper","forwardRef","ref","serviceConfig","showAllOption","effectDependencyList","onSelectorListChange","searchFieldName","modelKey","fieldNames","isSearch","newServiceConfig","newEffectDependencyList","changeOperateValueRef","useRef","useState","_useState","setLoading","_selectorWrapperModel","useStore","valueIsEmpty","isUndefinedOrNull","serviceRespDataTranslation","respData","respDataList","onRequestResultAdapter","arrayField2LabelValue","startDataSourceRequest","inputValue","searchId","Promise","$return","$error","requiredParamsKeys","_params","isEmpty","keyword","_respData","respDataTranslation","$Try_1_Post","$boundEx","$Try_1_Catch","message","onRequest","Error","_extend","warn","$Try_2_Post","$Try_2_Catch","then","$await_3","useEffectCustom","realTimeState","getState","valueIsEqual","current","concat","useImperativeHandle","onClearSelectorList","getSelectorList","filterOption","input","option","toLowerCase","indexOf","onSearch","useDebounceCallback","_len","arguments","otherParams","Array","_key","onAgainRequest","selectOptionsAll","Select","Option","showSearch","allowClear","notFoundContent","NotFoundContent","suffixIcon","_RedoOutlined","spin","description","Empty","image","PRESENTED_IMAGE_SIMPLE","SelectorWrapperFormItem","FormItemTextContent","_props$fieldConfig2","_props$fieldConfig3","_props$fieldConfig","isBaseData","_isString","_isNumber","_isBoolean","JSON","stringify","TextFormItem","noStyle","TextAreaFormItem","TextArea","fn","deps","useEffectCustomAsync","asyncFunction","$await_1","UploadWrapper","onUploadError","uploadList","setUploadList","uid","url","onUploadChange","info","fileList","file","status","response","code","result","data","maxCount","targetList","targetIndex","findIndex","tempUid","splice","Upload","disabled","UploadTrigger","listType","marginTop","ghost","UploadWrapperFormItemContent","_objectWithoutPropertiesLoose","_editableComptProps","UploadWrapperFormItem","FormItemAdapter","newEditable","commomProps","completeName","FormList","from","useFormInstance","formListConfig","onFormListBeforeRender","editableConfigList","onFormListAfterRender","onFormListItemBeforeRender","onFormListItemAfterRender","deleteOperateRender","List","fields","add","remove","_Fragment","getFieldValue","fieldChild","hasEditable","formListItemIndex","fieldItem","fieldName","DeleteFormListItem","_DeleteOutlined","FormListItem","EditableTable","_props$tableProps2","columns","columnItem","operateRender","otherColumnItem","onCell","_props$tableProps","valign","tableProps","cellVerticalAlign","_value","record","operation","dataIndex","rules","formListOperation","onTableBeforeRender","Table","scroll","x","pagination","dataSource","rowKey","onTableAfterRender","block","_PlusOutlined","FileImport","onImportFinish","showUploadList","accept","FileUpload","onPreview","uploadValue","setUploadValue","fileKey","fileName","thumbUrl","uploadItem","respValue","onUploadPreview","FlexLayout","childrens","direction","gap","fullIndexList","fullIndex","childrenStyle","flex","marginRight","marginBottom","cloneElement","Gap","height","ModalModel","openModalForm","closeModal","setModalItemData","ModalOperation","_ref$okText","_ref$cancelText","ModalWraper","Modal","modalModels","createModalWraperModel","ModalWrapper","createModalWrapperModel","PageFixedFooter","Page404","formClassName","label_width_70","label_width_80","label_width_90","label_width_100","label_width_110","label_width_120","label_width_130","label_width_auto","formItemClassName","preDefinedClassName","form","formItem","SimpleLayout","labelAlign","formLabelAlign","layoutType","desc","SmsCountDown","showMessage","setShowMessage","running","_useState2","setRunning","starting","_useState3","setStarting","initConfig","sendTxt","sentTxt","processingTxt","autoStart","totalTicks","duration","countdownFnc","useCountdownCallback","num","second","replace","String","onTick","intervalTime","onStart","onSendRequest","catch","overdueConsole","TableFilterLayout","isFixed","Children","Condition","Operate","Footer","treeSelectorList","TreeSelectorWrapperModel","treeSelectorWrapperModels","treeSelectorWrapperModel","getExpandedKeys","treeList","tiledArray","treeToTiledArray","treeLeafParentsArray","TreeSelectorWrapper","onTreeSelectorListChange","treeExpandedKeys","setTreeExpandedKeys","_treeSelectorWrapperM","serviceResponseHandle","_respData2","log","valueList","expandedKeys","tempValue","prev","mergeList","Set","getTreeSelectorList","onTreeExpand","TreeSelect","dropdownStyle","maxHeight","overflow","treeLine","treeData","TreeWrapperModel","setTreeList","resetTreeList","treeWrapperModels","treeWrapperModel","TreeWrapper","selectorTreeList","_treeWrapperModel$use","useUpdateEffect","filterLabel","filter","_item$label","tempItem","targetValues","getTreeDataList","onExpand","onCheck","checkedKeys","onSelect","multiple","treeFieldNames","newFieldNames","Tree","showLine","checkable","showLeafIcon","selectedKeys","Spin","spinning"],"mappings":";+7CAIO,IAAMA,GAASC,kXCATC,IAAAA,GAAoB,SAApBA,IACX,IAAAC,EAA0BC,IAAlBC,IAAAA,cACR,IAAMC,EAA2BC,EAAQF,GAAiBA,EAAgB,GAC1E,OAAOC,OAGIE,G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AMgP,EAAcnM,GAAQ,WAC1B,GAAI7C,EAAMsJ,gBAAkB,gBAAiB,CAC3C,MAAO,cACF,GAAItJ,EAAMsJ,gBAAkB,kBAAmB,CACpD,MAAO,OAET,MAAO,UACN,CAACtJ,EAAMsJ,gBACV,OACEvE,EAAA,MAAA,CAAK1E,UAAU,qBAAfF,SAAA,CACEF,EAACqf,EAAD,CAAMC,SAAUvf,EAAMuF,UACtBtF,EAACgP,EAAD,CAAOC,MAAOD,EAAME,uBAAwBH,YAAaA,EAAzD7O,SACGH,EAAMsJ,gBAAkB,iBACvBrJ,EAACkC,EAAD,CAAQ1B,KAAK,UAAUU,QAASnB,EAAMqO,eAAtClO,SAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["@flatbiz/antd/src/01-styles/index.ts","@flatbiz/antd/src/permission/index.tsx","@flatbiz/antd/src/button-operate/index.tsx","@flatbiz/antd/src/date-picker-wrapper/index.tsx","@flatbiz/antd/src/date-range-picker-wrapper/index.tsx","@flatbiz/antd/src/drawer-wraper/drawer.model.ts","@flatbiz/antd/src/drawer-wraper/drawer-operation.tsx","@flatbiz/antd/src/drawer-wraper/drawer-wraper.tsx","@flatbiz/antd/src/drawer-wraper/index.ts","@flatbiz/antd/src/drawer-wrapper/drawer.model.ts","@flatbiz/antd/src/hooks/use-effect-custom.ts","@flatbiz/antd/src/hooks/use-effect-custom-async.ts","@flatbiz/antd/src/drawer-wrapper/drawer-operation.tsx","@flatbiz/antd/src/drawer-wrapper/drawer-wrapper.tsx","@flatbiz/antd/src/drawer-wrapper/index.ts","@flatbiz/antd/src/editable-table/utils.ts","@flatbiz/antd/src/editable-table/form-item/checkbox-group.tsx","@flatbiz/antd/src/editable-table/form-item/date-picker-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/date-range-picker-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/input.tsx","@flatbiz/antd/src/editable-table/form-item/input-number.tsx","@flatbiz/antd/src/editable-table/form-item/radio-group.tsx","@flatbiz/antd/src/selector-wrapper/model.ts","@flatbiz/antd/src/selector-wrapper/index.tsx","@flatbiz/antd/src/editable-table/form-item/selector-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/text.tsx","@flatbiz/antd/src/editable-table/form-item/textarea.tsx","@flatbiz/antd/src/upload-wrapper/index.tsx","@flatbiz/antd/src/editable-table/form-item/upload-wrapper.tsx","@flatbiz/antd/src/editable-table/form-item/index.tsx","@flatbiz/antd/src/editable-table/form-list-item/form-list.tsx","@flatbiz/antd/src/editable-table/form-list-item/index.tsx","@flatbiz/antd/src/editable-table/index.tsx","@flatbiz/antd/src/file-import/index.tsx","@flatbiz/antd/src/file-upload/index.tsx","@flatbiz/antd/src/flex-layout/index.tsx","@flatbiz/antd/src/gap/index.tsx","@flatbiz/antd/src/icon-wrapper/index.tsx","@flatbiz/antd/src/modal-wraper/modal.model.ts","@flatbiz/antd/src/modal-wraper/modal-operation.tsx","@flatbiz/antd/src/modal-wraper/modal-wraper.tsx","@flatbiz/antd/src/modal-wraper/index.ts","@flatbiz/antd/src/modal-wrapper/modal.model.ts","@flatbiz/antd/src/modal-wrapper/modal-operation.tsx","@flatbiz/antd/src/modal-wrapper/modal-wrapper.tsx","@flatbiz/antd/src/modal-wrapper/index.ts","@flatbiz/antd/src/page-fixed-footer/index.tsx","@flatbiz/antd/src/page404/index.tsx","@flatbiz/antd/src/pre-defined-classname/form/index.tsx","@flatbiz/antd/src/pre-defined-classname/index.ts","@flatbiz/antd/src/simple-layout/index.tsx","@flatbiz/antd/src/sms-count-down/index.tsx","@flatbiz/antd/src/table-filter-layout/index.tsx","@flatbiz/antd/src/tree-selector-wrapper/model.ts","@flatbiz/antd/src/tree-selector-wrapper/utils.ts","@flatbiz/antd/src/tree-selector-wrapper/index.tsx","@flatbiz/antd/src/tree-wrapper/model.ts","@flatbiz/antd/src/tree-wrapper/utils.ts","@flatbiz/antd/src/tree-wrapper/index.tsx"],"sourcesContent":["import { noop } from '@flatbiz/utils';\nimport './1_root.less';\nimport './2_base.less';\n\nexport const styles = noop;\n","import { isArray } from '@dimjs/lang';\nimport { getGlobalData } from '@flatbiz/utils';\nimport { FC, Fragment } from 'react';\n\nexport const getPermissionList = () => {\n const { elemAclLimits } = getGlobalData();\n const permissionList: string[] = isArray(elemAclLimits) ? elemAclLimits : [];\n return permissionList;\n};\n\nexport const hasPermission = (name: string) => {\n const permissionList = getPermissionList();\n if (permissionList.includes(name)) {\n return true;\n }\n return false;\n};\n\nexport interface PermissionProps {\n name: string;\n}\nexport const Permission: FC<PermissionProps> = (props) => {\n const permissionList = getPermissionList();\n if (permissionList.includes(props.name)) {\n return <Fragment>{props.children}</Fragment>;\n }\n return null;\n};\n","import { isUndefined } from '@dimjs/lang';\nimport { Button, ButtonProps, Divider, Popconfirm, Space, SpaceProps } from 'antd';\nimport { VFC } from 'react';\nimport { hasPermission } from '../permission';\nimport './style.less';\n\nexport interface ButtonOperateItem extends ButtonProps {\n text: string;\n color?: string;\n onClick: () => void;\n permission?: string;\n needConfirm?: boolean;\n confirmMessage?: string;\n hidden?: boolean;\n}\n\nexport interface ButtonOperateProps {\n operateList: Array<ButtonOperateItem | null>;\n wrap?: boolean;\n size?: SpaceProps['size'];\n}\n\nexport const ButtonOperate: VFC<ButtonOperateProps> = (props) => {\n return (\n <div className=\"table-operate\">\n <Space\n split={<Divider type=\"vertical\" />}\n size={props.size}\n wrap={isUndefined(props.wrap) ? true : props.wrap}\n >\n {props.operateList.map((item, index) => {\n if (!item) return null;\n const {\n text,\n color,\n onClick,\n permission,\n needConfirm,\n confirmMessage,\n hidden,\n style,\n ...otherProps\n } = item;\n if (hidden) return null;\n if (permission && !hasPermission(permission)) return null;\n const newStyle = color ? { color, ...style } : style;\n const type = item.type || 'link';\n if (needConfirm) {\n return (\n <Popconfirm\n title={confirmMessage}\n okText=\"确定\"\n cancelText=\"取消\"\n onConfirm={onClick}\n arrowPointAtCenter={true}\n key={index}\n >\n <Button {...otherProps} onClick={undefined} type={type} danger style={newStyle}>\n {text}\n </Button>\n </Popconfirm>\n );\n }\n return (\n <Button {...otherProps} type={type} style={newStyle} key={index} onClick={onClick}>\n {text}\n </Button>\n );\n })}\n </Space>\n </div>\n );\n};\n\nButtonOperate.defaultProps = {\n size: 0,\n};\n","import { flatbizDate } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { DatePicker } from 'antd';\nimport { PickerDateProps } from 'antd/lib/date-picker/generatePicker';\nimport moment from 'moment';\nimport { useMemo, VFC } from 'react';\n\nexport type DatePickerWrapperProps = {\n value?: string;\n onChange?: (value?: string) => void;\n} & Omit<PickerDateProps<moment.Moment>, 'value' | 'onChange'>;\n\n/**\n * DatePicker包装组件\n * ```\n * 1. value类型为 string\n * 2. onChange返回类型 string\n * 3. 默认格式化类型 YYYY-MM-DD; 当showTime===true时,默认格式化类型YYYY-MM-DD HH:mm:ss\n * 4. 其他格式化类型自定义format\n * ```\n */\nexport const DatePickerWrapper: VFC<DatePickerWrapperProps> = (props) => {\n const { value, onChange, style, ...otherProps } = props;\n const format = useMemo(() => {\n if (props.format) return props.format as string;\n if (props.showTime) return 'YYYY-MM-DD HH:mm:ss';\n return 'YYYY-MM-DD';\n }, [props.showTime, props.format]);\n\n const onChangeDate = hooks.useCallbackRef((value) => {\n if (value) {\n onChange?.(moment(value).format(format));\n } else {\n onChange?.(undefined);\n }\n });\n\n const datePickerValue = value && flatbizDate.isDate(value) ? moment(new Date(value)) : undefined;\n\n return (\n <DatePicker\n {...otherProps}\n style={{ width: '100%', ...style }}\n value={datePickerValue}\n onChange={onChangeDate}\n />\n );\n};\n","import { flatbizDate } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { DatePicker } from 'antd';\nimport { RangePickerDateProps } from 'antd/lib/date-picker/generatePicker';\nimport moment from 'moment';\nimport { useMemo, VFC } from 'react';\n\nexport type DateRangePickerWrapperProps = {\n value?: [string, string];\n onChange?: (value?: [string, string]) => void;\n} & Omit<RangePickerDateProps<moment.Moment>, 'value' | 'onChange'>;\n\n/**\n * DatePicker.RangePicker包装组件\n * ```\n * TODO: 引用DatePicker.RangePicker TS有问题,待解决\n * 1. value类型为 [string, string]\n * 2. onChange返回类型 [string, string]\n * 3. 默认格式化类型 YYYY-MM-DD; 当showTime===true时,默认格式化类型YYYY-MM-DD HH:mm:ss\n * 4. 其他格式化类型自定义format\n * ```\n */\nexport const DateRangePickerWrapper: VFC<DateRangePickerWrapperProps> = (props) => {\n const { value, onChange, style, ...otherProps } = props;\n\n const format = useMemo(() => {\n if (props.format) return props.format as string;\n if (props.showTime === true) return 'YYYY-MM-DD HH:mm:ss';\n return 'YYYY-MM-DD';\n }, [props.showTime, props.format]);\n\n const onChangeDate = hooks.useCallbackRef((values) => {\n if (values) {\n const [value1, value2] = values || [];\n onChange?.([moment(value1).format(format), moment(value2).format(format)]);\n } else {\n onChange?.(undefined);\n }\n });\n\n const [date1, date2] = value || [];\n\n const rangePickerValue =\n date1 && date2 && flatbizDate.isDate(date1) && flatbizDate.isDate(date2)\n ? [moment(new Date(date1)), moment(new Date(date2))]\n : undefined;\n\n return (\n <DatePicker.RangePicker\n {...otherProps}\n style={{ width: '100%', ...style }}\n value={rangePickerValue as [moment.Moment, moment.Moment]}\n onChange={onChangeDate}\n />\n );\n};\n","import { ModelType } from '@dimjs/model';\n\nexport interface DrawerStateType {\n title: string;\n /**\n * 显示drawer\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, any>;\n operateType: 'create' | 'update' | 'view' | null;\n pageLoading?: boolean;\n}\n\nexport interface DrawerActionsParamType {\n openDrawerForm: Pick<DrawerStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeDrawer: void;\n setDrawerItemData: Record<string, any>;\n}\n\n/**\n * @shared\n * 提供公共的drawer处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个drawer实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const DrawerModel: ModelType<DrawerStateType, DrawerActionsParamType> = {\n actions: {\n openDrawerForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeDrawer() {\n return (state) => {\n state.visible = false;\n };\n },\n setDrawerItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: null,\n },\n};\n","import { SaveOutlined } from '@ant-design/icons';\nimport { Button, ButtonProps, Space } from 'antd';\n\nexport interface DrawerOperationOldProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const DrawerOperation = (props: DrawerOperationOldProps) => {\n return (\n <div className=\"fixed-bottom-block\">\n <Space size=\"middle\">\n <Button {...props.cancelButtonProps} className=\"cancel-btn\" onClick={props.onCancel}>\n {props.cancelText || '取消'}\n </Button>\n {props.hideOkBtn != true && (\n <Button\n type=\"primary\"\n icon={<SaveOutlined />}\n {...props.okButtonProps}\n className=\"ok-btn\"\n onClick={props.onOk}\n loading={props.loading}\n >\n {props.okText || '提交'}\n </Button>\n )}\n </Space>\n </div>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Drawer, DrawerProps } from 'antd';\nimport { FC, useEffect } from 'react';\nimport { DrawerOperation, DrawerOperationOldProps } from './drawer-operation';\nimport './style.less';\n\nexport type DrawerFormProps = {\n className?: string;\n /**\n * 整个drawer页面级的spinning <Page loading />\n */\n pageLoading?: boolean;\n // 设置了 DrawerProps footer属性后,operationProps配置将失效\n operationProps?: DrawerOperationOldProps;\n} & DrawerProps;\n\nconst PageLoader = () => {\n return (\n <div className=\"drawer-wraper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const DrawerWraper: FC<DrawerFormProps> = (props) => {\n const { pageLoading, className, width = 600, children, footer, operationProps, ...otherProps } = props;\n useEffect(() => {\n console.error(\n '@flatbiz/antd库【DrawerWraper】组件已经过期,请使用DrawerWrapper替换包括DrawerWraper=>DrawerWrapper、createDrawerWraperModel=>createDrawerWrapperModel,如果使用DrawerWrapper组件原用法需要调整',\n );\n }, []);\n return (\n <Drawer\n className={classNames('drawer-wraper', className)}\n keyboard={false}\n forceRender={false}\n destroyOnClose={true}\n width={'80%'}\n contentWrapperStyle={{ maxWidth: width }}\n size=\"default\"\n {...otherProps}\n footer={footer || footer === null ? footer : <DrawerOperation {...operationProps} />}\n >\n <div className=\"drawer-wraper-content\">{children}</div>\n {pageLoading && <PageLoader />}\n </Drawer>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { DrawerActionsParamType, DrawerModel, DrawerStateType } from './drawer.model';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst drawerModels: Record<string, API<ModelType<DrawerStateType, DrawerActionsParamType, any>>> = {};\n\n/**\n * drawer弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [drawerState, drawerActions] = createDrawerWraperModel('key值').useStore();\n * ```\n */\nexport const createDrawerWraperModel = (key: string) => {\n if (!drawerModels[key]) {\n drawerModels[key] = Model(DrawerModel);\n }\n return drawerModels[key];\n};\n\nexport * from './drawer-wraper';\n","import { ModelType } from '@dimjs/model';\n\nexport interface DrawerStateType {\n title: string;\n /**\n * 显示drawer\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, any>;\n operateType: 'create' | 'update' | 'view' | null;\n pageLoading?: boolean;\n}\n\nexport interface DrawerActionsParamType {\n openDrawerForm: Pick<DrawerStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeDrawer: void;\n setDrawerItemData: Record<string, any>;\n}\n\n/**\n * @shared\n * 提供公共的drawer处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个drawer实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const DrawerModel: ModelType<DrawerStateType, DrawerActionsParamType> = {\n actions: {\n openDrawerForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeDrawer() {\n return (state) => {\n state.visible = false;\n };\n },\n setDrawerItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: null,\n },\n};\n","import { DependencyList, EffectCallback, useEffect } from 'react';\n\nexport const useEffectCustom = (fn: EffectCallback, deps: DependencyList) => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return useEffect(fn, deps);\n};\n","import { DependencyList, useEffect } from 'react';\n\nexport const useEffectCustomAsync = (fn: () => Promise<void>, deps: DependencyList) => {\n useEffect(() => {\n async function asyncFunction() {\n await fn();\n }\n void asyncFunction();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n};\n","import { SaveOutlined } from '@ant-design/icons';\nimport { Button, ButtonProps, Space } from 'antd';\n\nexport interface DrawerOperationProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const DrawerOperation = (props: DrawerOperationProps) => {\n return (\n <div className=\"fixed-bottom-block\">\n <Space size=\"middle\">\n <Button {...props.cancelButtonProps} className=\"cancel-btn\" onClick={props.onCancel}>\n {props.cancelText || '取消'}\n </Button>\n {props.hideOkBtn != true && (\n <Button\n type=\"primary\"\n icon={<SaveOutlined />}\n {...props.okButtonProps}\n className=\"ok-btn\"\n onClick={props.onOk}\n loading={props.loading}\n >\n {props.okText || '提交'}\n </Button>\n )}\n </Space>\n </div>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Drawer, DrawerProps } from 'antd';\nimport { FC, Fragment } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport { DrawerOperation, DrawerOperationProps } from './drawer-operation';\nimport './style.less';\n\ntype DrawerWrapperStaticMethods = {\n Content: typeof DrawerWrapperContent;\n Footer: typeof DrawerWrapperFooter;\n};\n\nexport type DrawerWrapperProps = {\n className?: string;\n /**\n * 整个drawer页面级的spinning <Page loading />\n */\n pageLoading?: boolean;\n} & Omit<DrawerProps, 'footer'>;\n\nconst PageLoader = () => {\n return (\n <div className=\"drawer-wrapper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\nconst DrawerWrapperContent: FC<{ operationProps?: DrawerOperationProps }> = (props) => {\n return (\n <Fragment>\n <div className=\"drawer-wrapper-content\">{props.children}</div>\n {props.operationProps ? (\n <DrawerWrapperFooter>\n <DrawerOperation {...props.operationProps} />\n </DrawerWrapperFooter>\n ) : null}\n </Fragment>\n );\n};\n\nconst DrawerWrapperFooter = (props) => {\n return <div className=\"drawer-wrapper-footer\">{props.children}</div>;\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const DrawerWrapper: FC<DrawerWrapperProps> & DrawerWrapperStaticMethods = (props) => {\n const { pageLoading, className, width = 600, children, ...otherProps } = props;\n\n useEffectCustom(() => {\n if (props['operationProps']) {\n throw new Error('DrawerWrapper组件升级,参数operationProps用法变更,请及时更新');\n }\n }, []);\n\n return (\n <Drawer\n className={classNames('drawer-wrapper', className)}\n keyboard={false}\n forceRender={false}\n destroyOnClose={true}\n width={'80%'}\n contentWrapperStyle={{ maxWidth: width }}\n size=\"default\"\n {...otherProps}\n footer={null}\n >\n {pageLoading && <PageLoader />}\n {children}\n </Drawer>\n );\n};\n\nDrawerWrapper.Content = DrawerWrapperContent;\nDrawerWrapper.Footer = DrawerWrapperFooter;\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { DrawerActionsParamType, DrawerModel, DrawerStateType } from './drawer.model';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst drawerModels: Record<string, API<ModelType<DrawerStateType, DrawerActionsParamType, any>>> = {};\n\n/**\n * drawer弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [drawerState, drawerActions] = createDrawerWrapperModel('key值').useStore();\n * ```\n */\nexport const createDrawerWrapperModel = (key: string) => {\n if (!drawerModels[key]) {\n drawerModels[key] = Model(DrawerModel);\n }\n return drawerModels[key];\n};\n\nexport * from './drawer-wrapper';\n","import { FieldSingleConfig } from './type';\n\nexport const getEditable = (editable: FieldSingleConfig['editable'], tableRowIndex: number) => {\n return typeof editable === 'boolean' ? editable : editable?.({ tableRowIndex });\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { LabelValueItem } from '@flatbiz/utils';\nimport { Checkbox, Form, Tag } from 'antd';\nimport { useMemo } from 'react';\nimport { EditableCheckboxGroupConfig, EditableFormItemProps } from '../type';\n\ntype CheckboxGroupFormItemContent = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: Array<string | number>;\n onChange?: (value: any) => void;\n};\n\nconst CheckboxGroupFormItemContent = (props: CheckboxGroupFormItemContent) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableCheckboxGroupConfig).editableComptProps;\n\n const viewLabelList = useMemo(() => {\n if (editable) return [];\n const value = isArray(props.value) ? props.value : ([] as any[]);\n const options = (editableComptProps.options || []) as LabelValueItem[];\n if (!isArray(options) || options.length === 0) {\n return value.map((item) => ({ label: item, value: item }));\n }\n const returnList = [] as LabelValueItem[];\n value.forEach((item) => {\n const target = options.find((temp) => temp.value === item);\n returnList.push(target ? target : { label: item, value: item });\n });\n return returnList;\n }, [editable, editableComptProps.options, props.value]);\n\n if (editable) {\n return <Checkbox.Group {...editableComptProps} value={props.value} onChange={props.onChange} />;\n }\n return (\n <span className=\"editable-checkbox-group-view\">\n {render\n ? render(props.value)\n : viewLabelList.map((tag, index) => (\n <Tag key={index} color=\"#1890ff\">\n {tag.label}\n </Tag>\n ))}\n </span>\n );\n};\n\nexport const CheckboxGroupFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-checkbox-group-form-item', formItemProps?.className)}\n >\n <CheckboxGroupFormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Form } from 'antd';\nimport { DatePickerWrapper } from '../../date-picker-wrapper';\nimport { EditableDatePickerWrapperConfig, EditableFormItemProps } from '../type';\n\nexport const DatePickerWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-date-picker-wraper-form-item', formItemProps?.className)}\n >\n <DatePickerWrapper {...(editableConfig as EditableDatePickerWrapperConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { Form } from 'antd';\nimport { useMemo } from 'react';\nimport { DateRangePickerWrapper } from '../../date-range-picker-wrapper';\nimport { EditableDateRangePickerWrapperConfig, EditableFormItemProps } from '../type';\n\ntype FormItemContentProps = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: [string, string];\n onChange?: (value?: [string, string]) => void;\n};\n\nconst FormItemContent = (props: FormItemContentProps) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableDateRangePickerWrapperConfig).editableComptProps;\n\n const viewLabel = useMemo(() => {\n const value = isArray(props.value) ? props.value : ([] as any[]);\n if (editable) return undefined;\n return value.join('~');\n }, [editable, props.value]);\n\n if (editable) {\n return <DateRangePickerWrapper {...editableComptProps} value={props.value} onChange={props.onChange} />;\n }\n return <span className=\"editable-date-range-picker-view\">{render ? render(props.value) : viewLabel}</span>;\n};\n\nexport const DateRangePickerWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-date-range-picker-wraper-form-item', formItemProps?.className)}\n >\n <FormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { Form, Input } from 'antd';\nimport { EditableFormItemProps, EditableInputConfig } from '../type';\n\nexport const InputFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item {...formItemProps} name={props.name}>\n <Input {...(editableConfig as EditableInputConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Form, InputNumber } from 'antd';\nimport { EditableFormItemProps, EditableInputNumberConfig } from '../type';\n\nexport const InputNumberFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-input-number-form-item', formItemProps?.className)}\n >\n <InputNumber {...(editableConfig as EditableInputNumberConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { LabelValueItem } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Form, Radio, Tag } from 'antd';\nimport { useMemo } from 'react';\nimport { EditableFormItemProps, EditableRadioGroupConfig } from '../type';\n\ntype RadioGroupFormItemContent = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: string | number;\n onChange?: (value: string | number) => void;\n};\n\nconst RadioGroupFormItemContent = (props: RadioGroupFormItemContent) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableRadioGroupConfig).editableComptProps;\n\n const viewLabel = useMemo(() => {\n if (editable) return [];\n const value = props.value;\n const options = (editableComptProps.options || []) as LabelValueItem<string | number>[];\n if (!isArray(options) || options.length === 0) {\n return value;\n }\n const target = options.find((item) => item.value === value);\n return target?.label || value;\n }, [editable, editableComptProps.options, props.value]);\n\n const onChange = hooks.useCallbackRef((e) => {\n props.onChange?.(e.target.value as string | number);\n });\n\n if (editable) {\n return <Radio.Group {...editableComptProps} value={props.value} onChange={onChange} />;\n }\n return (\n <span className=\"editable-radio-group-view\">\n {render ? render(props.value) : viewLabel ? <Tag color=\"#1890ff\">{viewLabel}</Tag> : null}\n </span>\n );\n};\n\nexport const RadioGroupFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-radio-group-form-item', formItemProps?.className)}\n >\n <RadioGroupFormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { LabelValueItem } from '@flatbiz/utils';\n\nexport type ModelState = {\n selectorList: LabelValueItem[];\n queryIsEmpty: boolean;\n requestStatus: 'init' | 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setSelectBoxList: ModelState['selectorList'];\n resetSelectBoxList: void;\n changeRequestStatus: ModelState['requestStatus'];\n};\n\nconst defaultState: ModelState = {\n selectorList: [],\n queryIsEmpty: false,\n requestStatus: 'init',\n};\n\nconst _SelectorWrapperModel: ModelType<ModelState, ModelActionParams> = {\n actions: {\n setSelectBoxList: (params) => {\n return (state) => {\n state.selectorList = params || [];\n state.requestStatus = 'request-success';\n };\n },\n resetSelectBoxList: () => {\n return (state) => {\n state.selectorList = [];\n };\n },\n changeRequestStatus: (params) => {\n return (state) => {\n state.requestStatus = params;\n };\n },\n },\n state: defaultState,\n};\n\nconst selectorWrapperModels: Record<string, API<ModelType<ModelState, ModelActionParams, any>>> = {};\n\n/**\n * ```\n * 使用方式\n * const [state, actions] = selectorWrapperModel('key值').useStore();\n * ```\n */\nexport const selectorWrapperModel = (key: string) => {\n if (!selectorWrapperModels[key]) {\n selectorWrapperModels[key] = Model(_SelectorWrapperModel);\n }\n return selectorWrapperModels[key];\n};\n","import { RedoOutlined } from '@ant-design/icons';\nimport { extend } from '@dimjs/utils';\nimport { useEffectCustom } from '@flatbiz/antd';\nimport {\n arrayField2LabelValue,\n isUndefinedOrNull,\n LabelValueItem,\n TPlainObject,\n valueIsEqual,\n} from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, Empty, message, Select, SelectProps } from 'antd';\nimport { DependencyList, forwardRef, useImperativeHandle, useMemo, useRef, useState } from 'react';\nimport { ModelState, selectorWrapperModel } from './model';\n\ntype SelectorServiceConfig = {\n params?: TPlainObject;\n requiredParamsKeys?: string[];\n onRequest?: (params?: any) => any;\n /**\n * 响应数据适配器\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject[];\n};\n\nexport type SelectorWrapperProps = Omit<\n SelectProps,\n 'filterOption' | 'onSearch' | 'loading' | 'notFoundContent' | 'options' | 'fieldNames'\n> & {\n // 模型唯一值\n modelKey: string;\n fieldNames?: { label: string; value: string };\n /**\n * useEffect依赖性数组\n */\n effectDependencyList?: DependencyList;\n /**\n * 请求服务需求的数据,当设置`selectorList`后无效果\n */\n serviceConfig?: SelectorServiceConfig;\n /**\n * 同步设置选择器选项列表\n * ```\n * 1. 当设置selectorList后,serviceConfig、operateType=search、onSelectorListChange将失效\n * 2. 不支持异步数据,异步使用serviceConfig方式\n * 3. 如果配置fieldNames,会转换后使用\n * ```\n */\n selectorList?: TPlainObject[];\n /**\n * 通过服务获取数据后回调,当设置`selectorList`后无效果\n */\n onSelectorListChange?: (dataList: LabelValueItem[]) => void;\n /**\n * 添加全部选项\n * ```\n * 1. showAllOption = true,添加默认全部选项(value值为空字符串)\n * 2. 可自定义全部选项\n * ```\n */\n showAllOption?: true | JSX.Element;\n /**\n * 输入操作类型,默认值:filter\n * ```\n * 1. search:根据输入项去服务端查询\n * 2. filter:初始化已查询数据,根据输入内容筛选\n * 3. 在设置`selectorList`后,operateType=search将失效\n * ```\n */\n operateType?: 'search' | 'filter';\n // 搜索调接口字段名称,默认值:keyword\n searchFieldName?: string;\n};\n\nexport type SelectorWrapperRefApi = {\n onClearSelectorList: () => void;\n getSelectorList: () => LabelValueItem<string | number>[];\n};\n\n/**\n * 选择器包装组件\n * @param props\n * @returns\n * ```\n * 1. modelKey的配置是为了缓存数据;\n * 1.1: 当有effectDependencyList依赖项时,依赖项的发生变化后,每次都会去调用接口获取数据\n * 1.2: 当无effectDependencyList依赖项时,第一次调用接口成功后会有标记,下次访问存在标记,就不在调用接口,使用缓存数据;如果想强制刷新数据,可通过随便配置依赖项完成\n * 2. selectorList属性\n * 2.1 当设置selectorList属性后,serviceConfig、operateType=search、onSelectorListChange将失效\n * 2.2 不支持异步数据,异步使用serviceConfig方式\n * 3. operateType=search状态下,回填数据查询接口时,会在接口中默认添加id字段(id的值为回填的值)\n * ```\n */\nexport const SelectorWrapper = forwardRef<SelectorWrapperRefApi, SelectorWrapperProps>((props, ref) => {\n const {\n serviceConfig,\n showAllOption,\n effectDependencyList,\n onSelectorListChange,\n operateType,\n searchFieldName,\n selectorList,\n modelKey,\n fieldNames,\n ...otherProps\n } = props;\n\n const isSearch = operateType === 'search' && selectorList === undefined;\n const newServiceConfig = serviceConfig || {};\n const newEffectDependencyList = effectDependencyList || [];\n const changeOperateValueRef = useRef<string | number>();\n const [loading, setLoading] = useState(false);\n const [state, actions] = selectorWrapperModel(modelKey).useStore();\n\n const valueIsEmpty = (value: string | number) => {\n return value === '' || isUndefinedOrNull(value);\n };\n\n const serviceRespDataTranslation = (respData) => {\n const respDataList = newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData;\n return arrayField2LabelValue(respDataList || [], fieldNames);\n };\n\n const startDataSourceRequest = hooks.useCallbackRef(\n async (inputValue?: string, searchId?: string | number) => {\n try {\n if (!newServiceConfig.onRequest) {\n throw new Error('onRequest 调用接口服务不能为空');\n }\n const requiredParamsKeys = newServiceConfig.requiredParamsKeys;\n const params = extend({}, newServiceConfig.params);\n if (requiredParamsKeys) {\n const isEmpty = requiredParamsKeys.find((key) => {\n return valueIsEmpty(params[key] as string | number);\n });\n if (isEmpty) {\n console.warn(`SelectorWrapper组件:参数:${requiredParamsKeys.join('、')}不能为空`);\n return;\n }\n }\n try {\n setLoading(true);\n void actions.changeRequestStatus('request-pre');\n if ((!isUndefinedOrNull(inputValue) || !isUndefinedOrNull(searchId)) && isSearch) {\n const keyword = searchFieldName || 'keyword';\n params[keyword] = inputValue;\n params['id'] = searchId;\n }\n const respData = await newServiceConfig.onRequest?.(params);\n const respDataTranslation = serviceRespDataTranslation(respData);\n setLoading(false);\n onSelectorListChange?.(respDataTranslation);\n void actions.setSelectBoxList(respDataTranslation);\n } catch (error) {\n console.error(error);\n setLoading(false);\n void actions.changeRequestStatus('request-error');\n void message.error(error.message || '获取数据异常');\n }\n } catch (error) {\n setLoading(false);\n void message.error((error.message as string) || '数据查询异常...');\n }\n },\n );\n\n useEffectCustom(() => {\n if (selectorList) {\n void actions.setSelectBoxList(arrayField2LabelValue(selectorList || [], fieldNames));\n return;\n }\n if (isSearch) return;\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = selectorWrapperModel(modelKey).getState();\n\n if (\n newEffectDependencyList.length > 0 ||\n valueIsEqual(realTimeState.requestStatus, ['request-error', 'init'])\n ) {\n void startDataSourceRequest();\n }\n }, newEffectDependencyList);\n\n useEffectCustom(() => {\n if (isSearch) {\n if (valueIsEmpty(props.value as string | number)) {\n onSelectorListChange?.([]);\n void actions.resetSelectBoxList();\n } else {\n // 判断是否由外部回填value数据\n if (props.value !== changeOperateValueRef.current) {\n void startDataSourceRequest(undefined, props.value as string | number);\n }\n }\n }\n }, newEffectDependencyList.concat([props.value]));\n\n useImperativeHandle(ref, () => {\n return {\n onClearSelectorList: () => {\n void actions.resetSelectBoxList();\n },\n getSelectorList: () => {\n return state.selectorList;\n },\n };\n });\n\n const filterOption = hooks.useCallbackRef((input: string, option) => {\n return (option?.children as unknown as string).toLowerCase().indexOf(input.toLowerCase()) >= 0;\n });\n\n const onSearch = hooks.useDebounceCallback((value: string) => {\n if (value) {\n void startDataSourceRequest(value);\n } else {\n void actions.resetSelectBoxList();\n }\n }, 300);\n\n const onChange = hooks.useCallbackRef((value: string | number, ...otherParams) => {\n changeOperateValueRef.current = value;\n props.onChange?.(value, otherParams);\n });\n const onAgainRequest = hooks.useCallbackRef(() => {\n void startDataSourceRequest();\n });\n\n const selectOptionsAll = <Select.Option value=\"\">全部</Select.Option>;\n return (\n <Select\n showSearch={true}\n allowClear={true}\n {...otherProps}\n value={isUndefinedOrNull(props.value) ? undefined : props.value}\n notFoundContent={\n <NotFoundContent requestStatus={state.requestStatus} onAgainRequest={onAgainRequest} />\n }\n loading={loading}\n onSearch={isSearch ? onSearch : undefined}\n filterOption={isSearch ? false : filterOption}\n onChange={onChange}\n fieldNames={undefined}\n suffixIcon={\n state.requestStatus === 'request-error' ? (\n <RedoOutlined spin={loading} onClick={onAgainRequest} />\n ) : undefined\n }\n >\n {showAllOption === true ? selectOptionsAll : showAllOption}\n {state.selectorList.map((item) => {\n return (\n <Select.Option value={item.value} label={item.label} key={item.value}>\n {item.label}\n </Select.Option>\n );\n })}\n </Select>\n );\n});\n\nconst NotFoundContent = (props: {\n requestStatus?: ModelState['requestStatus'];\n onAgainRequest: () => void;\n}) => {\n const description = useMemo(() => {\n if (props.requestStatus === 'request-error') {\n return '数据查询异常';\n } else if (props.requestStatus === 'request-success') {\n return '暂无数据';\n }\n return '数据查询中';\n }, [props.requestStatus]);\n return (\n <Empty\n image={Empty.PRESENTED_IMAGE_SIMPLE}\n description={description}\n className={'tree-selector-wrapper-empty'}\n >\n {props.requestStatus === 'request-error' && (\n <Button type=\"primary\" onClick={props.onAgainRequest}>\n 重新获取数据\n </Button>\n )}\n </Empty>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { arrayField2LabelValue, LabelValueItem } from '@flatbiz/utils';\nimport { Form, Tag } from 'antd';\nimport { useMemo } from 'react';\nimport { SelectorWrapper } from '../../selector-wrapper';\nimport { EditableFormItemProps, EditableSelectWrapperConfig } from '../type';\n\ntype FormItemContentProps = Omit<EditableFormItemProps, 'formItemProps'> & {\n value?: string | number | Array<string | number>;\n onChange?: (value: any) => void;\n};\n\nconst FormItemContent = (props: FormItemContentProps) => {\n const { editableConfig, editable, render } = props.fieldConfig;\n const editableComptProps = (editableConfig as EditableSelectWrapperConfig).editableComptProps;\n\n const viewLabelList = useMemo(() => {\n const value = isArray(props.value) ? props.value : ([] as any[]);\n if (editable) return [];\n const selectorList = arrayField2LabelValue(\n editableComptProps.selectorList || [],\n editableComptProps.fieldNames,\n );\n if (selectorList.length === 0) {\n return value.map((item) => ({ label: item, value: item }));\n }\n const returnList = [] as LabelValueItem[];\n value.forEach((item) => {\n const target = selectorList.find((temp) => temp.value === item);\n returnList.push(target ? target : { label: item, value: item });\n });\n return returnList;\n }, [editable, editableComptProps.fieldNames, editableComptProps.selectorList, props.value]);\n\n if (editable) {\n return <SelectorWrapper {...editableComptProps} value={props.value} onChange={props.onChange} />;\n }\n return (\n <span className=\"editable-selector-view\">\n {render\n ? render(props.value)\n : viewLabelList.map((tag, index) => (\n <Tag key={index} color=\"#1890ff\">\n {tag.label}\n </Tag>\n ))}\n </span>\n );\n};\n\nexport const SelectorWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-selector-wrapper-form-item', formItemProps?.className)}\n >\n <FormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { isBoolean, isNumber, isString } from '@dimjs/lang';\nimport { Form } from 'antd';\nimport { useMemo } from 'react';\nimport { EditableFormItemProps, FieldSingleConfig } from '../type';\n\nconst FormItemTextContent = (props: {\n value?: string | number;\n name: EditableFormItemProps['name'];\n fieldConfig?: FieldSingleConfig;\n}) => {\n const value = useMemo(() => {\n if (props.fieldConfig?.render) return undefined;\n const isBaseData =\n isString(props.value) || isNumber(props.value) || isBoolean(props.value) || !props.value;\n if (!isBaseData) {\n console.warn(`Form.List name:【${props.name}】数据【${JSON.stringify(props.value)}】不能渲染在页面中`);\n }\n return isBaseData ? props.value : undefined;\n }, [props.fieldConfig?.render, props.name, props.value]);\n\n return <span className=\"editable-text-view\">{props.fieldConfig?.render?.(props.value) || value}</span>;\n};\n\nexport const TextFormItem = (props: { name: Array<number | string>; fieldConfig?: FieldSingleConfig }) => {\n return (\n <Form.Item noStyle name={props.name}>\n <FormItemTextContent name={props.name} fieldConfig={props.fieldConfig} />\n </Form.Item>\n );\n};\n","import { Form, Input } from 'antd';\nimport { EditableFormItemProps, EditableTextareaConfig } from '../type';\n\nexport const TextAreaFormItem = (props: EditableFormItemProps) => {\n const { formItemProps, editableConfig } = props.fieldConfig;\n return (\n <Form.Item {...formItemProps} name={props.name}>\n <Input.TextArea {...(editableConfig as EditableTextareaConfig).editableComptProps} />\n </Form.Item>\n );\n};\n","import { PlusOutlined } from '@ant-design/icons';\nimport { classNames, extend } from '@dimjs/utils';\nimport { TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, message, Upload, UploadProps } from 'antd';\nimport { UploadChangeParam } from 'antd/lib/upload';\nimport { UploadFile, UploadListType } from 'antd/lib/upload/interface';\nimport { FC, Fragment, useState } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport './style.less';\n\nexport type UploadWrapperFileItem = {\n uid: string;\n name: string;\n url?: string;\n};\n\nexport type UploadWrapperProps<T extends TPlainObject = TPlainObject> = {\n value?: T[];\n onChange?: (value?: T[]) => void;\n onUploadError?: (message?: string) => void;\n onUploadChange?: (info: UploadChangeParam<UploadFile>) => void;\n /**\n * 属性映射\n */\n fieldNames?: {\n uid?: string;\n name?: string;\n url?: string;\n };\n /**\n * 接口响应数据适配器,如果配置了fieldNames,适配器返回值会再进过fieldNames转换\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject;\n} & Omit<UploadProps, 'onChange' | 'fileList'>;\n\n/**\n * 文件上传\n * ```\n * 1. 可通过配置children替换默认上传触发布局\n * 2. 接口返回结构:\n * formData上传接口返回值\n * {\n * code: '0000',\n * data: {\n * uid: '唯一值,可使用fileKey值'\n * name: '文件名称'\n * url: '预览地址'\n * }\n * }\n * 3. 如果接口返回的不是上面的字段名称,可通过fieldNames配置接口返回字段名称映射\n *\n * 4. 最佳使用方式,与Form结合使用\n * <Form.Item name=\"attachmentList\" label=\"附件\">\n * <UploadWrapper action={uploadUrl} />\n * </Form.Item>\n * ```\n *\n */\nexport const UploadWrapper: FC<UploadWrapperProps> = (props) => {\n const { onChange, onUploadError, value, ...otherProps } = props;\n const [uploadList, setUploadList] = useState<UploadWrapperFileItem[]>();\n const fieldNames = extend(\n {\n uid: 'uid',\n name: 'name',\n url: 'url',\n },\n props.fieldNames,\n ) as Required<UploadWrapperFileItem>;\n\n useEffectCustom(() => {\n setUploadList(\n value?.map((item) => {\n return {\n uid: item[fieldNames.uid],\n name: item[fieldNames.name],\n url: item[fieldNames.url],\n };\n }),\n );\n }, [fieldNames.name, fieldNames.uid, fieldNames.url, value]);\n\n const onUploadChange = hooks.useCallbackRef((info) => {\n const fileList = info.fileList as TPlainObject[];\n if (info.file.status === 'done') {\n const respData = info.file.response;\n if (respData.code === '0000') {\n const result = (\n props.onRequestResultAdapter ? props.onRequestResultAdapter(respData.data) : respData.data\n ) as TPlainObject;\n result[fieldNames.uid] = result[fieldNames.uid] || info.file.uid;\n result[fieldNames.name] = result[fieldNames.name] || info.file.name;\n if (props.maxCount === 1) {\n onChange?.([result]);\n } else {\n onChange?.((value || []).concat(result));\n }\n } else {\n if (onUploadError) {\n onUploadError(respData.message as string);\n } else {\n void message.error((respData.message as string) || '上传操作失败...');\n }\n fileList[fileList.length - 1] = {\n ...fileList[fileList.length - 1],\n status: 'error',\n };\n }\n } else if (info.file.status === 'removed') {\n const uid = info.file.uid;\n const targetList = value !== undefined ? [...value] : [];\n const targetIndex = targetList.findIndex((item) => {\n const tempUid = item[fieldNames.uid];\n return tempUid === uid;\n });\n if (targetIndex >= 0) {\n targetList.splice(targetIndex, 1);\n }\n onChange?.(targetList);\n } else if (info.file.status === 'error') {\n if (onUploadError) {\n onUploadError();\n } else {\n void message.error('上传操作失败...');\n }\n }\n // https://github.com/ant-design/ant-design/issues/2423\n setUploadList([...fileList] as UploadWrapperFileItem[]);\n props.onUploadChange?.(info);\n });\n\n return (\n <Upload\n {...otherProps}\n onChange={onUploadChange}\n fileList={uploadList}\n className={classNames('v-upload-wrapper', otherProps.className)}\n >\n {otherProps.disabled ? null : (\n <UploadTrigger listType={otherProps.listType}>{props.children}</UploadTrigger>\n )}\n </Upload>\n );\n};\n\nconst UploadTrigger: FC<{ listType?: UploadListType }> = (props) => {\n if (props.children) return <Fragment>{props.children}</Fragment>;\n if (props.listType === 'picture-card') {\n return (\n <div>\n <PlusOutlined />\n <div style={{ marginTop: 8 }}>上传图片</div>\n </div>\n );\n }\n if (props.listType === 'picture') {\n return (\n <Button type=\"primary\" ghost>\n 选择图片上传\n </Button>\n );\n }\n return (\n <Button type=\"primary\" ghost>\n 选择文件上传\n </Button>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Form } from 'antd';\nimport { UploadWrapper } from '../../upload-wrapper';\nimport { EditableFileUploadConfig, EditableFormItemProps } from '../type';\n\nconst UploadWrapperFormItemContent = (\n props: EditableFormItemProps & { value?: any; onChange?: (value?: any) => void },\n) => {\n const { editableConfig, render, editable } = props.fieldConfig;\n const { children, ...otherProps } = (editableConfig as EditableFileUploadConfig).editableComptProps;\n if (editable) {\n return (\n <UploadWrapper listType=\"text\" {...otherProps} value={props.value} onChange={props.onChange}>\n {children}\n </UploadWrapper>\n );\n }\n return (\n <div className=\"upload-wrapper-selector-view\">\n {render ? (\n render(props.value)\n ) : (\n <UploadWrapper listType=\"text\" {...otherProps} value={props.value} disabled={true} />\n )}\n </div>\n );\n};\n\nexport const UploadWrapperFormItem = (props: EditableFormItemProps) => {\n const { formItemProps } = props.fieldConfig;\n return (\n <Form.Item\n {...formItemProps}\n name={props.name}\n className={classNames('editable-upload-wrapper-form-item', formItemProps?.className)}\n >\n <UploadWrapperFormItemContent {...props} />\n </Form.Item>\n );\n};\n","import { extend } from '@dimjs/utils';\nimport { FieldSingleConfig } from '../type';\nimport { getEditable } from '../utils';\nimport { CheckboxGroupFormItem } from './checkbox-group';\nimport { DatePickerWrapperFormItem } from './date-picker-wrapper';\nimport { DateRangePickerWrapperFormItem } from './date-range-picker-wrapper';\nimport { InputFormItem } from './input';\nimport { InputNumberFormItem } from './input-number';\nimport { RadioGroupFormItem } from './radio-group';\nimport { SelectorWrapperFormItem } from './selector-wrapper';\nimport { TextFormItem } from './text';\nimport { TextAreaFormItem } from './textarea';\nimport { UploadWrapperFormItem } from './upload-wrapper';\n\nexport type FormItemAdapterProps = {\n name: Array<number | string>;\n completeName: Array<number | string>;\n fieldConfig: FieldSingleConfig;\n tableRowIndex: number;\n};\n\nexport const FormItemAdapter = (props: FormItemAdapterProps) => {\n const { editableConfig, editable } = props.fieldConfig;\n const newEditable = getEditable(editable, props.tableRowIndex);\n const fieldConfig = extend({}, props.fieldConfig, { editable: newEditable });\n\n const commomProps = {\n name: props.name,\n fieldConfig,\n };\n\n if (editableConfig?.type === 'input' && newEditable) {\n return <InputFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'inputNumber' && newEditable) {\n return <InputNumberFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'textArea' && newEditable) {\n return <TextAreaFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'datePickerWrapper' && newEditable) {\n return <DatePickerWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'dateRangePickerWrapper') {\n return <DateRangePickerWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'selectorWrapper') {\n return <SelectorWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'checkboxGroup') {\n return <CheckboxGroupFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'radioGroup') {\n return <RadioGroupFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'uploadWrapper') {\n return <UploadWrapperFormItem {...commomProps} />;\n } else if (editableConfig?.type === 'custom') {\n return editableConfig.editableComptProps({\n name: props.name,\n editable: newEditable,\n completeName: props.completeName,\n });\n }\n return <TextFormItem {...commomProps} />;\n};\n","import { DeleteOutlined } from '@ant-design/icons';\nimport { classNames } from '@dimjs/utils';\nimport { Button, Form, Space } from 'antd';\nimport { FormItemAdapter } from '../form-item';\nimport { FormListConfig } from '../type';\nimport { getEditable } from '../utils';\n\nexport type FormListProps = {\n name: Array<number | string>;\n formListConfig: FormListConfig;\n tableRowIndex: number;\n completeName: (string | number)[];\n};\n\nexport const FormList = (props: FormListProps) => {\n const from = Form.useFormInstance();\n const {\n onFormListBeforeRender,\n editableConfigList,\n onFormListAfterRender,\n onFormListItemBeforeRender,\n onFormListItemAfterRender,\n deleteOperateRender,\n } = props.formListConfig;\n return (\n <Form.List name={props.name}>\n {(fields, { add, remove }) => (\n <>\n {onFormListBeforeRender\n ? onFormListBeforeRender({\n tableRowIndex: props.tableRowIndex,\n add,\n get value() {\n return from.getFieldValue(props.completeName);\n },\n })\n : null}\n {fields.map((fieldChild, index) => {\n const hasEditable = editableConfigList.find((item) =>\n getEditable(item.editable, props.tableRowIndex),\n );\n const className = classNames(\n 'editable-inner-formlist-item',\n `editable-inner-formlist-item-${props.name[1]}`,\n { 'editable-inner-formlist-item_preview': !hasEditable },\n );\n return (\n <div key={index} className={className}>\n {onFormListItemBeforeRender\n ? onFormListItemBeforeRender({\n add,\n remove: () => {\n remove(index);\n },\n formListItemIndex: index,\n tableRowIndex: props.tableRowIndex,\n get value() {\n return from.getFieldValue([...props.completeName, fieldChild.name]);\n },\n })\n : null}\n <Space>\n {editableConfigList.map((fieldItem, index) => {\n return (\n <FormItemAdapter\n name={[fieldChild.name, fieldItem.fieldName]}\n fieldConfig={fieldItem}\n key={index}\n tableRowIndex={props.tableRowIndex}\n completeName={[...props.completeName, fieldChild.name]}\n />\n );\n })}\n {hasEditable ? (\n <DeleteFormListItem\n deleteOperateRender={deleteOperateRender}\n remove={() => {\n remove(index);\n }}\n index={index}\n />\n ) : null}\n </Space>\n {onFormListItemAfterRender\n ? onFormListItemAfterRender({\n add,\n formListItemIndex: index,\n tableRowIndex: props.tableRowIndex,\n remove: () => {\n remove(index);\n },\n get value() {\n return from.getFieldValue([...props.completeName, fieldChild.name]);\n },\n })\n : null}\n </div>\n );\n })}\n {onFormListAfterRender\n ? onFormListAfterRender({\n tableRowIndex: props.tableRowIndex,\n add,\n get value() {\n return from.getFieldValue(props.completeName);\n },\n })\n : null}\n </>\n )}\n </Form.List>\n );\n};\n\nconst DeleteFormListItem = (props: {\n deleteOperateRender: FormListConfig['deleteOperateRender'];\n remove: () => void;\n index: number;\n}) => {\n return (\n <Form.Item>\n {props.deleteOperateRender ? (\n props.deleteOperateRender({ remove: props.remove, formListItemIndex: props.index })\n ) : (\n <Button type=\"link\" danger icon={<DeleteOutlined />} onClick={props.remove}>\n 删除\n </Button>\n )}\n </Form.Item>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { FormItemAdapter } from '../form-item';\nimport { TextFormItem } from '../form-item/text';\nimport { FieldSingleConfig, FormListConfig } from '../type';\nimport { FormList } from './form-list';\n\nexport type FormListItemProps = {\n name: Array<number | string>;\n fieldConfig?: FieldSingleConfig | FormListConfig;\n tableRowIndex: number;\n completeName: (string | number)[];\n};\n\nexport const FormListItem = (props: FormListItemProps) => {\n if (props.fieldConfig) {\n if (isArray(props.fieldConfig['editableConfigList'])) {\n const formListConfig = props.fieldConfig as FormListConfig;\n return (\n <FormList\n name={props.name}\n completeName={props.completeName}\n formListConfig={formListConfig}\n tableRowIndex={props.tableRowIndex}\n />\n );\n } else {\n return (\n <FormItemAdapter\n name={props.name}\n fieldConfig={props.fieldConfig as FieldSingleConfig}\n tableRowIndex={props.tableRowIndex}\n completeName={props.completeName}\n />\n );\n }\n }\n return <TextFormItem name={props.name} />;\n};\n","import { PlusOutlined } from '@ant-design/icons';\nimport { Button, Form, Table, TableProps } from 'antd';\nimport { FormListOperation, FormListProps } from 'antd/lib/form/FormList';\nimport { ColumnsType } from 'antd/lib/table';\nimport { Fragment, ReactElement, useMemo } from 'react';\nimport { FormListItem } from './form-list-item';\nimport './style.less';\nimport { EditableTableRecordType, FieldSingleConfig, FormListConfig } from './type';\n\n// export type EditableTableDataSourceItem = FormListFieldData & { operation: FormListOperation };\n\n/**\n * antd 默认render功能此处不能使用\n */\nexport type EditableTableColumn = Omit<ColumnsType['0'], 'render'> & {\n dataIndex?: string;\n fieldConfig?: FieldSingleConfig | FormListConfig;\n /**\n * 配置操作功能处理后,fieldConfig配置将失效\n * ```\n * 1. tableRowIndex:当前row的索引值\n * 1. name:当前row的form.item的name值\n * ```\n */\n operateRender?: (item: {\n tableRowIndex: number;\n name: Array<string | number>;\n operation: FormListOperation;\n }) => ReactElement;\n};\n\nexport type EditableTableProps = {\n name: string;\n /**\n * ```\n * antd table属性\n * 1. 新增cellVerticalAlign,单元格竖直方向对齐方式,设置table column onCell属性后失效\n * ```\n */\n tableProps?: Omit<TableProps<EditableTableRecordType>, 'dataSource' | 'columns' | 'rowKey'> & {\n cellVerticalAlign?: 'baseline' | 'middle' | 'top' | 'bottom';\n };\n columns: EditableTableColumn[];\n onTableBeforeRender?: (formListOperation: FormListOperation, nextRowIndex: number) => ReactElement | null;\n /**\n * 设置后,将覆盖底部`新增`按钮\n */\n onTableAfterRender?: (formListOperation: FormListOperation, nextRowIndex: number) => ReactElement | null;\n rules?: FormListProps['rules'];\n};\n\nexport const EditableTable = (props: EditableTableProps) => {\n const columns = useMemo(() => {\n if (!props.columns) return [];\n return props.columns.map((columnItem) => {\n const { fieldConfig, operateRender, ...otherColumnItem } = columnItem;\n return {\n onCell: () => {\n return {\n valign: props.tableProps?.cellVerticalAlign || 'middle',\n };\n },\n ...otherColumnItem,\n render: (_value, record) => {\n if (operateRender) {\n return (\n operateRender({\n name: [...props.name, record.name],\n tableRowIndex: record.name,\n operation: record.operation,\n }) || ''\n );\n }\n return (\n <FormListItem\n name={columnItem.dataIndex ? [record.name, columnItem.dataIndex] : [record.name]}\n completeName={\n columnItem.dataIndex\n ? [...props.name, record.name, columnItem.dataIndex]\n : [...props.name, record.name]\n }\n fieldConfig={fieldConfig}\n tableRowIndex={record.name}\n />\n );\n },\n };\n }) as ColumnsType<EditableTableRecordType>;\n }, [props.columns, props.name, props.tableProps?.cellVerticalAlign]);\n\n return (\n <div className=\"editable-table\">\n <Form.List name={props.name} rules={props.rules}>\n {(fields, formListOperation) => {\n return (\n <Fragment>\n {props.onTableBeforeRender ? props.onTableBeforeRender(formListOperation, fields.length) : null}\n <Table\n scroll={{ x: 'max-content' }}\n pagination={false}\n {...props.tableProps}\n dataSource={fields.map((item) => ({ ...item, operation: formListOperation }))}\n columns={columns}\n rowKey=\"key\"\n />\n {props.onTableAfterRender ? (\n props.onTableAfterRender(formListOperation, fields.length)\n ) : (\n <Button\n type=\"dashed\"\n onClick={() => formListOperation.add()}\n block\n icon={<PlusOutlined />}\n style={{ marginTop: 15 }}\n >\n 新增\n </Button>\n )}\n </Fragment>\n );\n }}\n </Form.List>\n </div>\n );\n};\n","import { hooks } from '@wove/react';\nimport { Button, message, Upload, UploadProps } from 'antd';\nimport { FC, useState } from 'react';\n\nexport type FileImportProps = {\n onImportFinish: (data?: any) => void;\n} & Omit<\n UploadProps,\n | 'fileList'\n | 'showUploadList'\n | 'itemRender'\n | 'listType'\n | 'multiple'\n | 'previewFile'\n | 'progress'\n | 'onChange'\n | 'onDownload'\n | 'onRemove'\n | 'onPreview'\n | 'directory'\n | 'customRequest'\n | 'defaultFileList'\n | 'iconRender'\n>;\n\n/**\n * 文件导入\n * ```\n * 默认值:\n * name: 'file',\n * accept: '.xlsx,.xls',\n * ```\n */\nexport const FileImport: FC<FileImportProps> = (props) => {\n const { onImportFinish, ...otherProps } = props;\n\n const [loading, setLoading] = useState(false);\n\n const onChange = hooks.useCallbackRef((info) => {\n if (info.file.status === 'uploading') {\n setLoading(true);\n } else if (info.file.status === 'done') {\n setLoading(false);\n const respData = info.file.response;\n if (respData.code === '0000') {\n onImportFinish(respData.data);\n } else {\n void message.error((respData.message as string) || '文件导入异常...');\n }\n }\n });\n\n return (\n <Upload showUploadList={false} maxCount={1} {...otherProps} onChange={onChange}>\n {props.children ? (\n props.children\n ) : (\n <Button type=\"primary\" ghost loading={loading}>\n 选择文件\n </Button>\n )}\n </Upload>\n );\n};\n\nFileImport.defaultProps = {\n name: 'file',\n accept: '.xlsx,.xls',\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames, extend } from '@dimjs/utils';\nimport { hooks } from '@wove/react';\nimport { Upload, UploadProps } from 'antd';\nimport { UploadChangeParam } from 'antd/lib/upload';\nimport { UploadFile } from 'antd/lib/upload/interface';\nimport { FC, useEffect, useState } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport './style.less';\n\nexport type FileUploadItem = {\n fileKey: string;\n fileName: string;\n};\n\ntype AntdFileUploadItem = {\n uid: string;\n name: string;\n fileKey: string;\n};\n\nexport type FileUploadProps = {\n onChange?: (value?: FileUploadItem[]) => void;\n onUploadError?: (message?: string) => void;\n value?: FileUploadItem[];\n onPreview?: (item: FileUploadItem) => void;\n onUploadChange?: (info: UploadChangeParam<UploadFile>) => void;\n /**\n * 属性映射\n */\n fieldNames?: {\n fileKey?: string;\n fileName?: string;\n };\n} & Omit<UploadProps, 'onChange' | 'fileList' | 'onPreview'>;\n\n/**\n * 文件上传,结合Form使用最佳\n * ```\n * 接口返回结构:\n * formData上传接口必须返回fileKey值\n * {\n * code: '0000',\n * data: {\n * fileKey: '预览文件对应的fileKey'\n * }\n * }\n * 可通过fieldNames配置接口返回值属性名称映射\n * ```\n * ```\n * 最佳使用方式:\n * <Form.Item name=\"attachmentList\" label=\"附件\">\n * <FileUpload action={uploadUrl} onPreview={onPreviewFile}>\n * <Button type=\"primary\">选择文件导入</Button>\n * </FileUpload>\n * </Form.Item>\n * ```\n *\n */\nexport const FileUpload: FC<FileUploadProps> = (props) => {\n useEffectCustom(() => {\n console.error('@flatbiz/antd库【FileUpload】组件已经过期,请使用【UploadWrapper】组件替换');\n }, []);\n\n const { onChange, onUploadError, onPreview, value, ...otherProps } = props;\n const [uploadValue, setUploadValue] = useState<AntdFileUploadItem[]>([]);\n const fieldNames = extend(\n {\n fileKey: 'fileKey',\n fileName: 'fileName',\n },\n props.fieldNames,\n ) as FileUploadItem;\n\n useEffect(() => {\n if (value && isArray(value)) {\n setUploadValue(\n value.map((item) => {\n return {\n uid: item['uid'] || item[fieldNames.fileKey],\n name: item[fieldNames.fileName],\n fileKey: item[fieldNames.fileKey],\n url: item[fieldNames.fileKey],\n thumbUrl: item[fieldNames.fileKey],\n };\n }),\n );\n }\n }, [fieldNames.fileKey, fieldNames.fileName, value]);\n\n const onUploadChange = hooks.useCallbackRef((info) => {\n if (info.file.status === 'done') {\n const respData = info.file.response;\n if (respData.code === '0000') {\n const result = respData.data || {};\n const uploadItem = {\n uid: info.file.uid,\n fileName: result[fieldNames.fileName] || (info.file.name as string),\n fileKey: result[fieldNames.fileKey],\n } as FileUploadItem;\n const respValue = (value || []).concat(uploadItem);\n onChange?.(respValue as unknown as FileUploadItem[]);\n } else {\n onUploadError?.(respData.message as string);\n }\n } else if (info.file.status === 'removed') {\n const uid = info.file.uid;\n const targetList = value !== undefined ? [...value] : [];\n const targetIndex = targetList.findIndex((item) => {\n const tempUid = item['uid'] || item[fieldNames.fileKey];\n return tempUid === uid;\n });\n if (targetIndex >= 0) {\n targetList.splice(targetIndex, 1);\n }\n onChange?.(targetList);\n } else if (info.file.status === 'error') {\n onUploadError?.();\n }\n // https://github.com/ant-design/ant-design/issues/2423\n setUploadValue([...info.fileList]);\n props.onUploadChange?.(info);\n });\n\n const onUploadPreview = hooks.useCallbackRef((file) => {\n onPreview?.({\n fileKey: file[fieldNames.fileKey],\n fileName: file[fieldNames.fileName],\n });\n });\n\n return (\n <Upload\n {...otherProps}\n onChange={onUploadChange}\n onPreview={onUploadPreview}\n fileList={uploadValue}\n className={classNames('v-file-upload', otherProps.className)}\n >\n {props.children}\n </Upload>\n );\n};\n","import { isArray } from '@dimjs/lang';\nimport { classNames } from '@dimjs/utils';\nimport { isUndefinedOrNull } from '@flatbiz/utils';\nimport { cloneElement, CSSProperties, FC } from 'react';\nimport './style.less';\n\nexport type FlexLayoutProps = {\n className?: string;\n fullIndex?: number | number[];\n direction?: 'vertical' | 'horizontal';\n onClick?: () => void;\n style?: CSSProperties;\n gap?: number;\n};\n/**\n * flex布局\n * 1. direction:默认值vertical\n * 2. gap间隙距离\n * 3. fullIndex:指定children数组索引值对象flex=1\n * 4. children添加key熟悉\n * @param props\n * @returns\n */\nexport const FlexLayout: FC<FlexLayoutProps> = (props) => {\n const childrens = (isArray(props.children) ? props.children : [props.children]) as JSX.Element[];\n const direction = props.direction || 'vertical';\n const gap = props.gap ? props.gap : 0;\n const fullIndexList = !isUndefinedOrNull(props.fullIndex)\n ? isArray(props.fullIndex)\n ? props.fullIndex\n : [props.fullIndex as number]\n : [];\n return (\n <div\n className={classNames('v-flex-layout', `v-flex-${direction}`, props.className)}\n style={props.style}\n onClick={props.onClick}\n >\n {childrens.map((children, index) => {\n const childrenStyle = children.props.style || {};\n const style = fullIndexList.includes(index) ? { flex: 1, ...childrenStyle } : childrenStyle;\n if (index < childrens.length - 1 && gap > 0) {\n if (direction === 'horizontal') {\n style.marginRight = gap;\n } else {\n style.marginBottom = gap;\n }\n }\n return cloneElement(children, { style, key: index });\n })}\n </div>\n );\n};\n","import { CSSProperties, VFC } from 'react';\n\nexport type GapProps = {\n height?: number;\n className?: string;\n style?: CSSProperties;\n};\n\n/**\n * 间隙组件\n * @param props\n * @returns\n */\nexport const Gap: VFC<GapProps> = (props) => {\n return <div style={{ height: props.height, ...props.style }} className={props.className} />;\n};\n","import { classNames } from '@dimjs/utils';\nimport { Tooltip } from 'antd';\nimport { CSSProperties, VFC } from 'react';\nimport './style.less';\n\nexport type IconWrapperProps = {\n hoverTips?: string;\n icon?: React.ReactNode;\n style?: CSSProperties;\n text?: string | React.ReactElement;\n className?: string;\n size?: 'small' | 'middle' | 'large';\n};\nexport const IconWrapper: VFC<IconWrapperProps> = (props) => {\n return (\n <Tooltip title={props.hoverTips}>\n <div\n className={classNames('icon-wrapper', `icon-wrapper-${props.size || 'middle'}`, props.className)}\n style={props.style}\n >\n {props.icon}\n {props.text ? <span className=\"icon-wrapper-text\">{props.text}</span> : null}\n </div>\n </Tooltip>\n );\n};\n","import { ModelType } from '@dimjs/model';\n\nexport interface ModalStateType {\n title?: string;\n /**\n * 显示modal\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, unknown> | null;\n operateType: 'create' | 'update' | 'view';\n pageLoading?: boolean;\n}\n\nexport interface ModalActionsParamType {\n openModalForm: Pick<ModalStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeModal: void;\n setModalItemData: Record<string, unknown>;\n}\n\n/**\n * @shared\n * 提供公共的modal处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个modal实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const ModalModel: ModelType<ModalStateType, ModalActionsParamType> = {\n actions: {\n openModalForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeModal() {\n return (state) => {\n state.visible = false;\n };\n },\n setModalItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: 'view',\n },\n};\n","import { Button, ButtonProps, Space } from 'antd';\nimport { Fragment } from 'react';\n\nexport interface ModalOperationProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const ModalOperation = ({\n loading,\n okText = '保存',\n cancelText = '取消',\n onCancel,\n onOk,\n hideOkBtn,\n ...otherProps\n}: ModalOperationProps) => {\n return (\n <Fragment>\n <Space size=\"middle\">\n <Button {...otherProps.cancelButtonProps} className=\"cancel-btn\" onClick={onCancel}>\n {cancelText}\n </Button>\n {hideOkBtn != true && (\n <Button\n type=\"primary\"\n {...otherProps.okButtonProps}\n className=\"ok-btn\"\n onClick={onOk}\n loading={loading}\n >\n {okText}\n </Button>\n )}\n </Space>\n </Fragment>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Modal, ModalProps } from 'antd';\nimport { FC, useEffect } from 'react';\nimport { ModalOperation, ModalOperationProps } from './modal-operation';\nimport './style.less';\n\nexport type ModalFormProps = {\n className?: string;\n // 整个modal页面级的spinning <Page loading />\n pageLoading?: boolean;\n // 设置了 ModalProps footer属性后,operationProps配置将失效\n operationProps?: ModalOperationProps;\n footer?: null | React.ReactNode;\n} & Omit<\n ModalProps,\n | 'footer'\n | 'onOk'\n | 'okText'\n | 'cancelText'\n | 'okButtonProps'\n | 'cancelButtonProps'\n | 'okType'\n | 'confirmLoading'\n>;\n\nconst PageLoader = () => {\n return (\n <div className=\"modal-wraper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const ModalWraper: FC<ModalFormProps> = (props) => {\n const { pageLoading, className, width, children, footer, operationProps, ...otherProps } = props;\n\n useEffect(() => {\n console.error(\n '@flatbiz/antd库【ModalWraper】组件已经过期,请使用ModalWrapper替换包括ModalWraper=>ModalWrapper、createModalWraperModel=>createModalWrapperModel,如果使用ModalWrapper组件原用法需要调整',\n );\n }, []);\n\n return (\n <Modal\n className={classNames('modal-wraper', className)}\n keyboard={false}\n forceRender={false}\n destroyOnClose={true}\n {...otherProps}\n width={width || 600}\n footer={null}\n >\n <div className=\"modal-wraper-content\">\n {children}\n {pageLoading && <PageLoader />}\n </div>\n {footer !== null && (\n <div className=\"modal-wraper-content-footer\">\n {footer ? footer : <ModalOperation {...operationProps} />}\n </div>\n )}\n </Modal>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { ModalActionsParamType, ModalModel, ModalStateType } from './modal.model';\n\n/**\n * 组件单词写错,请输入\n */\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst modalModels: Record<string, API<ModelType<ModalStateType, ModalActionsParamType, any>>> = {};\n\n/**\n * modal弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [modalState, modalActions] = createModalWraperModel('key值').useStore();\n * ```\n */\nexport const createModalWraperModel = (key: string) => {\n if (!modalModels[key]) {\n modalModels[key] = Model(ModalModel);\n }\n return modalModels[key];\n};\n\nexport * from './modal-wraper';\n","import { ModelType } from '@dimjs/model';\n\nexport interface ModalStateType {\n title?: string;\n /**\n * 显示modal\n */\n visible: boolean;\n /**\n * 用来处理form, `更新`的时候的传递当前item列表行的数据, 当`创建`的时候强制设置为 `undefined`\n */\n itemData?: Record<string, unknown> | null;\n operateType: 'create' | 'update' | 'view';\n pageLoading?: boolean;\n}\n\nexport interface ModalActionsParamType {\n openModalForm: Pick<ModalStateType, 'title' | 'itemData' | 'operateType' | 'pageLoading'>;\n closeModal: void;\n setModalItemData: Record<string, unknown>;\n}\n\n/**\n * @shared\n * 提供公共的modal处理, 通常用来表单编辑, 弹窗抽屉模式.\n * 注意全部理论上只允许一个modal实例存在,如需处理多个, 请自行实例话模型.\n */\nexport const ModalModel: ModelType<ModalStateType, ModalActionsParamType> = {\n actions: {\n openModalForm({ itemData, title, operateType, pageLoading }) {\n return (state) => {\n state.itemData = itemData;\n state.title = title;\n state.operateType = operateType;\n state.pageLoading = pageLoading;\n state.visible = true;\n };\n },\n closeModal() {\n return (state) => {\n state.visible = false;\n };\n },\n setModalItemData(params) {\n return (state) => {\n state.pageLoading = false;\n state.itemData = params;\n };\n },\n },\n state: {\n visible: false,\n title: '',\n operateType: 'view',\n },\n};\n","import { Button, ButtonProps, Space } from 'antd';\nimport { Fragment } from 'react';\n\nexport interface ModalOperationOldProps {\n loading?: boolean;\n okText?: string;\n cancelText?: string;\n onOk?: () => void;\n onCancel?: () => void;\n hideOkBtn?: boolean;\n okButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n cancelButtonProps?: Omit<ButtonProps, 'onClick' | 'loading' | 'className'>;\n}\n\nexport const ModalOperation = ({\n loading,\n okText = '保存',\n cancelText = '取消',\n onCancel,\n onOk,\n hideOkBtn,\n ...otherProps\n}: ModalOperationOldProps) => {\n return (\n <Fragment>\n <Space size=\"middle\">\n <Button {...otherProps.cancelButtonProps} className=\"cancel-btn\" onClick={onCancel}>\n {cancelText}\n </Button>\n {hideOkBtn != true && (\n <Button\n type=\"primary\"\n {...otherProps.okButtonProps}\n className=\"ok-btn\"\n onClick={onOk}\n loading={loading}\n >\n {okText}\n </Button>\n )}\n </Space>\n </Fragment>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { Modal, ModalProps } from 'antd';\nimport { FC, Fragment } from 'react';\nimport { useEffectCustom } from '../hooks/use-effect-custom';\nimport { ModalOperation, ModalOperationOldProps } from './modal-operation';\nimport './style.less';\n\ntype ModalWrapperStaticMethods = {\n Content: typeof ModalWrapperContent;\n Footer: typeof ModalWrapperFooter;\n};\n\nexport type ModalWrapperProps = {\n className?: string;\n // 整个modal页面级的spinning <Page loading />\n pageLoading?: boolean;\n} & Omit<\n ModalProps,\n | 'footer'\n | 'onOk'\n | 'okText'\n | 'cancelText'\n | 'okButtonProps'\n | 'cancelButtonProps'\n | 'okType'\n | 'confirmLoading'\n>;\n\nconst PageLoader = () => {\n return (\n <div className=\"modal-wrapper-loader\">\n <div className=\"loader-wrapper\">\n <div className=\"loader-inner\" />\n <div className=\"loader-text\">LOADING</div>\n </div>\n </div>\n );\n};\n\nconst ModalWrapperContent: FC<{ operationProps?: ModalOperationOldProps }> = (props) => {\n return (\n <Fragment>\n <div className=\"modal-wrapper-content\">{props.children}</div>\n {props.operationProps ? (\n <ModalWrapperFooter>\n <ModalOperation {...props.operationProps} />\n </ModalWrapperFooter>\n ) : null}\n </Fragment>\n );\n};\n\nconst ModalWrapperFooter = (props) => {\n return <div className=\"modal-wrapper-footer\">{props.children}</div>;\n};\n\n/**\n * 弹窗机制\n * ```\n * 1. 默认 destroyOnClose = true\n * 2. 默认 forceRender = false\n * ```\n */\nexport const ModalWrapper: FC<ModalWrapperProps> & ModalWrapperStaticMethods = (props) => {\n const { pageLoading, className, width, children, ...otherProps } = props;\n\n useEffectCustom(() => {\n if (props['operationProps']) {\n throw new Error('ModalWrapper组件升级,参数operationProps用法变更,请及时更新');\n }\n }, []);\n\n return (\n <Modal\n className={classNames('modal-wrapper', className)}\n keyboard={false}\n forceRender={true}\n destroyOnClose={true}\n {...otherProps}\n width={width || 600}\n footer={null}\n >\n {children}\n {pageLoading && <PageLoader />}\n </Modal>\n );\n};\n\nModalWrapper.Content = ModalWrapperContent;\nModalWrapper.Footer = ModalWrapperFooter;\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { ModalActionsParamType, ModalModel, ModalStateType } from './modal.model';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst modalModels: Record<string, API<ModelType<ModalStateType, ModalActionsParamType, any>>> = {};\n\n/**\n * modal弹窗模型\n * @param key 唯一值必传\n * @returns\n *\n * ```\n * 使用方式\n * const [modalState, modalActions] = createModalWrapperModel('key值').useStore();\n * ```\n */\nexport const createModalWrapperModel = (key: string) => {\n if (!modalModels[key]) {\n modalModels[key] = Model(ModalModel);\n }\n return modalModels[key];\n};\n\nexport * from './modal-wrapper';\n","import { classNames } from '@dimjs/utils';\nimport { CSSProperties, FC } from 'react';\nimport './style.less';\n\nexport type PageFixedFooterProps = {\n className?: string;\n style?: CSSProperties;\n};\n\nexport const PageFixedFooter: FC<PageFixedFooterProps> = (props) => {\n return (\n <div className={classNames('page-fixed-footer', props.className)} style={props.style}>\n {props.children}\n </div>\n );\n};\n","export const Page404 = () => {\n return <div className=\"v-404\">404</div>;\n};\n","import './style.less';\n/**\n * 使用在Form组件上,预定义form-item label宽度\n */\nexport const formClassName = {\n label_width_70: 'form-label-70',\n label_width_80: 'form-label-80',\n label_width_90: 'form-label-90',\n label_width_100: 'form-label-100',\n label_width_110: 'form-label-110',\n label_width_120: 'form-label-120',\n label_width_130: 'form-label-130',\n label_width_auto: 'form-label-auto',\n};\n\n/**\n * 使用在Form.Item组件上,预定义form-item label宽度\n */\nexport const formItemClassName = {\n label_width_70: 'form-item-label-70',\n label_width_80: 'form-item-label-80',\n label_width_90: 'form-item-label-90',\n label_width_100: 'form-item-label-100',\n label_width_110: 'form-item-label-110',\n label_width_120: 'form-item-label-120',\n label_width_130: 'form-item-label-130',\n label_width_auto: 'form-item-label-auto',\n};\n","import { formClassName, formItemClassName } from './form';\n\n/**\n * 预定义className\n * ```\n * form: 使用在Form组件上,设置form-item label宽度\n * formItem: 使用在Form.Item组件上,设置form-item label宽度\n * ```\n */\nexport const preDefinedClassName = {\n form: formClassName,\n formItem: formItemClassName,\n};\n","import { classNames } from '@dimjs/utils';\nimport { CSSProperties, FC, ReactElement } from 'react';\nimport './style.less';\n\nexport type SimpleLayoutProps = {\n className?: string;\n style?: CSSProperties;\n title?: string | ReactElement;\n desc?: string | ReactElement;\n formLabelAlign?: 'left' | 'right';\n layoutType?: 'layer' | 'tight';\n};\n\nexport const SimpleLayout: FC<SimpleLayoutProps> = (props) => {\n const labelAlign = props.formLabelAlign || 'right';\n const className = classNames(\n 'simple-layout',\n {\n 'simple-layout-tight': props.layoutType === 'tight',\n 'simple-layout-formlabel-left': labelAlign === 'left',\n },\n props.className,\n );\n\n return (\n <div className={className} style={props.style}>\n {props.title ? <div className=\"simple-layout-title\">{props.title}</div> : null}\n {props.desc ? <div className=\"simple-layout-desc\">{props.desc}</div> : null}\n {props.children ? <div className=\"simple-layout-content\">{props.children}</div> : null}\n </div>\n );\n};\n","import { classNames } from '@dimjs/utils';\nimport { hooks } from '@wove/react';\nimport { FC, useEffect, useMemo, useState } from 'react';\n\nexport interface SmsCountDownProps {\n onSendRequest: () => Promise<void>; // 验证码请求函数\n totalTicks?: number; // 总倒计时,默认:60(s)\n duration?: number; // 倒计时间隔,默认:1000ms(1s)\n autoStart?: boolean; // 是否自动开始倒计时,默认:fasle,注意:不会自动调用 onSendRequest\n format?: string; // 倒计时格式化,默认:'{t}s'\n sendTxt?: string; // 文案,默认:'获取验证码'\n sentTxt?: string; // 倒计时完成文案,默认:'重新获取'\n processingTxt?: string; // 倒计时中文案,默认:'发送中...'\n onTick?: (time: number) => void; // 倒计时回调\n className?: string;\n}\nexport const SmsCountDown: FC<SmsCountDownProps> = (props) => {\n const [showMessage, setShowMessage] = useState<string>();\n\n const [running, setRunning] = useState(false);\n const [starting, setStarting] = useState(false);\n\n // 初始化设置有效\n const initConfig = useMemo<Omit<SmsCountDownProps, 'onSendRequest' | 'onTick' | 'className'>>(() => {\n return {\n sendTxt: props.sendTxt,\n sentTxt: props.sentTxt,\n processingTxt: props.processingTxt,\n format: props.format,\n autoStart: props.autoStart,\n totalTicks: props.totalTicks,\n duration: props.duration,\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const format = initConfig.format as string;\n const totalTicks = initConfig.totalTicks as number;\n const duration = initConfig.duration as number;\n\n const countdownFnc = hooks.useCountdownCallback(\n (num) => {\n const second = num / 1000;\n if (num > 0) {\n if (!running) {\n setRunning(true);\n }\n setShowMessage(format.replace('{t}', String(second)));\n props.onTick?.(second);\n } else if (num === 0) {\n setRunning(false);\n setStarting(false);\n props.onTick?.(second);\n setShowMessage(initConfig.sentTxt);\n }\n },\n totalTicks * 1000,\n { intervalTime: duration },\n );\n\n useEffect(() => {\n if (!initConfig.autoStart) {\n setShowMessage(initConfig.sendTxt);\n } else {\n countdownFnc();\n setStarting(true);\n setRunning(true);\n }\n }, [countdownFnc, initConfig]);\n\n const onStart = hooks.useCallbackRef(() => {\n if (running || starting) return;\n setStarting(true);\n setShowMessage(initConfig.processingTxt);\n void props\n .onSendRequest()\n .then(() => {\n setRunning(true);\n countdownFnc();\n })\n .catch(() => {\n setShowMessage(initConfig.sendTxt);\n setStarting(false);\n });\n });\n\n const className = classNames('v-count-down', props.className, {\n running,\n starting,\n });\n\n return (\n <div className={className} onClick={onStart}>\n {showMessage}\n </div>\n );\n};\n\nSmsCountDown.defaultProps = {\n totalTicks: 60,\n duration: 1000,\n autoStart: false,\n format: '{t}s',\n sendTxt: '获取验证码',\n sentTxt: '重新获取',\n processingTxt: '发送中...',\n};\n","import { classNames } from '@dimjs/utils';\nimport { Children, cloneElement, FC } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport './style.less';\n\ntype StaticMethods = {\n Condition: typeof Condition;\n Operate: typeof Operate;\n Table: typeof Table;\n Footer: typeof Footer;\n};\n\nconst overdueConsole = () => {\n console.error('@flatbiz/antd库【TableFilterLayout】组件已经过期,请使用【SimpleLayout】组件替代');\n};\n\nexport type TableFilterLayoutProps = {\n className?: string;\n isFixed?: boolean;\n fullIndex?: number;\n};\n\nexport const TableFilterLayout: FC<TableFilterLayoutProps> & StaticMethods = (props) => {\n useEffectCustom(() => {\n overdueConsole();\n }, []);\n\n return (\n <div\n className={classNames(\n 'table-filter-layout',\n { 'table-filter-layout-flex': props.isFixed },\n props.className,\n )}\n >\n {Children.map(props.children, (item, index) => {\n if (props.isFixed && index === props.fullIndex) {\n return cloneElement(item as JSX.Element, { className: 'table-filter-layout-flex-full' });\n }\n return item;\n })}\n </div>\n );\n};\n\nconst Condition: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-condition', props.className)}>{props.children}</div>;\n};\n\nconst Operate: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-operate', props.className)}>{props.children}</div>;\n};\n\nconst Table: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-table', props.className)}>{props.children}</div>;\n};\nconst Footer: FC<{ className?: string }> = (props) => {\n return <div className={classNames('table-filter-layout-footer', props.className)}>{props.children}</div>;\n};\n\nTableFilterLayout.Condition = Condition;\nTableFilterLayout.Operate = Operate;\nTableFilterLayout.Table = Table;\nTableFilterLayout.Footer = Footer;\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { TSetDefaultDefined } from '@flatbiz/utils';\nimport { TreeSelectProps } from 'antd';\n\nexport type ModelState = {\n treeSelectorList: TSetDefaultDefined<TreeSelectProps['treeData'], []>;\n queryIsEmpty: boolean;\n requestStatus?: 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setSelectBoxList: ModelState['treeSelectorList'];\n resetSelectBoxList: void;\n changeRequestStatus: ModelState['requestStatus'];\n};\n\nconst defaultState: ModelState = {\n treeSelectorList: [],\n queryIsEmpty: false,\n};\n\nconst TreeSelectorWrapperModel: ModelType<ModelState, ModelActionParams> = {\n actions: {\n setSelectBoxList: (params) => {\n return (state) => {\n state.treeSelectorList = params || [];\n state.requestStatus = 'request-success';\n };\n },\n resetSelectBoxList: () => {\n return (state) => {\n state.treeSelectorList = [];\n };\n },\n changeRequestStatus: (params) => {\n return (state) => {\n state.requestStatus = params;\n };\n },\n },\n state: defaultState,\n};\n\nconst treeSelectorWrapperModels: Record<string, API<ModelType<ModelState, ModelActionParams, any>>> = {};\n\n/**\n * ```\n * 使用方式\n * const [state, actions] = useTreeSelectorWrapperModel('key值').useStore();\n * ```\n */\nexport const treeSelectorWrapperModel = (key: string) => {\n if (!treeSelectorWrapperModels[key]) {\n treeSelectorWrapperModels[key] = Model(TreeSelectorWrapperModel);\n }\n return treeSelectorWrapperModels[key];\n};\n","import { isArray } from '@dimjs/lang';\nimport { TPlainObject, treeLeafParentsArray, treeToTiledArray } from '@flatbiz/utils';\nimport { TreeSelectProps } from 'antd';\n\nexport const getExpandedKeys = (\n value: string | number,\n treeList: TPlainObject[],\n fieldNames?: TreeSelectProps['fieldNames'],\n) => {\n if (!isArray(treeList) || treeList.length === 0) return [];\n const tiledArray = treeToTiledArray(treeList, fieldNames);\n return treeLeafParentsArray(value, tiledArray);\n};\n","import { RedoOutlined } from '@ant-design/icons';\nimport { isArray } from '@dimjs/lang';\nimport { extend } from '@dimjs/utils';\nimport { useEffectCustom } from '@flatbiz/antd';\nimport { isUndefinedOrNull, TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, Empty, message, TreeSelect, TreeSelectProps } from 'antd';\nimport { DependencyList, forwardRef, useEffect, useImperativeHandle, useMemo, useState } from 'react';\nimport { ModelState, treeSelectorWrapperModel } from './model';\nimport './style.less';\nimport { getExpandedKeys } from './utils';\ntype TreeSelectorServiceConfig = {\n params?: TPlainObject;\n requiredParamsKeys?: string[];\n onRequest?: (params?: any) => any;\n /**\n * 响应数据适配器\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject[];\n};\n\nexport type TreeSelectorWrapperProps = Omit<\n TreeSelectProps,\n 'treeExpandedKeys' | 'treeData' | 'loading' | 'onTreeExpand'\n> & {\n modelKey: string;\n effectDependencyList?: DependencyList;\n /**\n * 请求服务需求的数据,当设置`treeSelectorList`后无效果\n */\n serviceConfig?: TreeSelectorServiceConfig;\n /**\n * 当设置treeSelectorList后,serviceConfig、onTreeSelectorListChange将失效\n * ```\n * 1. 不支持异步数据,异步使用serviceConfig方式\n * ```\n */\n treeSelectorList?: TreeSelectProps['treeData'];\n /**\n * 通过服务获取数据后回调,当设置`treeSelectorList`后无效果\n */\n onTreeSelectorListChange?: (treeSelectorList?: TreeSelectProps['treeData']) => void;\n};\n\nexport type TreeSelectorWrapperRefApi = {\n onClearSelectorList: () => void;\n getTreeSelectorList: () => TreeSelectProps['treeData'];\n};\n\n/**\n * 树选择器包装组件\n * @param props\n * @returns\n * ```\n * 1. 当设置treeSelectorList属性后,serviceConfig、onTreeSelectorListChange将失效\n * ```\n */\nexport const TreeSelectorWrapper = forwardRef<TreeSelectorWrapperRefApi, TreeSelectorWrapperProps>(\n (props, ref) => {\n const {\n serviceConfig,\n effectDependencyList,\n onTreeSelectorListChange,\n treeSelectorList,\n modelKey,\n ...otherProps\n } = props;\n const newServiceConfig = serviceConfig || {};\n const newEffectDependencyList = effectDependencyList || [];\n const [loading, setLoading] = useState(false);\n const [treeExpandedKeys, setTreeExpandedKeys] = useState<React.Key[]>();\n const [state, actions] = treeSelectorWrapperModel(modelKey).useStore();\n const valueIsEmpty = (value: string | number) => {\n return value === '' || isUndefinedOrNull(value);\n };\n\n const serviceResponseHandle = (respData) => {\n const respDataList = (\n newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData\n ) as TPlainObject[];\n return respDataList;\n };\n\n const startDataSourceRequest = hooks.useCallbackRef(async () => {\n try {\n if (!newServiceConfig.onRequest) {\n throw new Error('onRequest 调用接口服务不能为空');\n }\n const requiredParamsKeys = newServiceConfig.requiredParamsKeys;\n const params = extend({}, newServiceConfig.params);\n if (requiredParamsKeys) {\n const isEmpty = requiredParamsKeys.find((key) => {\n return valueIsEmpty(params[key] as string | number);\n });\n if (isEmpty) {\n console.warn(`TreeSelectorWrapper组件:参数:${requiredParamsKeys.join('、')}不能为空`);\n return;\n }\n }\n try {\n setLoading(true);\n void actions.changeRequestStatus('request-pre');\n const _respData = await newServiceConfig.onRequest?.(params);\n const respData = serviceResponseHandle(_respData) as TreeSelectProps['treeData'];\n setLoading(false);\n onTreeSelectorListChange?.(respData);\n void actions.setSelectBoxList(respData || []);\n } catch (error) {\n setLoading(false);\n void actions.changeRequestStatus('request-error');\n }\n } catch (error) {\n setLoading(false);\n void message.error((error.message as string) || '数据查询异常...');\n }\n });\n\n useEffectCustom(() => {\n if (treeSelectorList) {\n void actions.setSelectBoxList(treeSelectorList);\n return;\n }\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = treeSelectorWrapperModel(modelKey).getState();\n console.log('realTimeState', realTimeState.requestStatus);\n if (\n newEffectDependencyList.length > 0 ||\n !realTimeState.requestStatus ||\n realTimeState.requestStatus === 'request-error'\n ) {\n void startDataSourceRequest();\n }\n }, newEffectDependencyList);\n\n useEffect(() => {\n if (!isUndefinedOrNull(props.value)) {\n const valueList = isArray(props.value) ? props.value : [props.value];\n if (valueList.length > 0 && state.treeSelectorList.length > 0) {\n let expandedKeys = [] as Array<string | number>;\n valueList.forEach((tempValue) => {\n const targetList = getExpandedKeys(\n tempValue as string | number,\n state.treeSelectorList,\n props.fieldNames,\n );\n expandedKeys = expandedKeys.concat(targetList.map((item) => item.value));\n });\n setTreeExpandedKeys((prev) => {\n const mergeList = expandedKeys.concat(prev || []);\n return Array.from(new Set(mergeList));\n });\n }\n }\n }, [state.treeSelectorList, props.fieldNames, props.value]);\n\n useImperativeHandle(ref, () => {\n return {\n onClearSelectorList: () => {\n void actions.setSelectBoxList([]);\n },\n getTreeSelectorList: () => {\n return state.treeSelectorList;\n },\n };\n });\n\n const onTreeExpand = hooks.useCallbackRef((expandedKeys) => {\n setTreeExpandedKeys(expandedKeys as string[]);\n });\n\n const onAgainRequest = hooks.useCallbackRef(() => {\n void startDataSourceRequest();\n });\n\n return (\n <TreeSelect\n dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}\n showSearch={true}\n treeLine={true}\n {...otherProps}\n value={isUndefinedOrNull(props.value) ? undefined : props.value}\n treeExpandedKeys={treeExpandedKeys}\n treeData={state.treeSelectorList}\n loading={loading}\n onTreeExpand={onTreeExpand}\n style={{ width: '100%', ...otherProps.style }}\n suffixIcon={\n state.requestStatus === 'request-error' ? (\n <RedoOutlined spin={loading} onClick={onAgainRequest} />\n ) : undefined\n }\n notFoundContent={\n <NotFoundContent requestStatus={state.requestStatus} onAgainRequest={onAgainRequest} />\n }\n />\n );\n },\n);\n\nconst NotFoundContent = (props: {\n requestStatus?: ModelState['requestStatus'];\n onAgainRequest: () => void;\n}) => {\n const description = useMemo(() => {\n if (props.requestStatus === 'request-error') {\n return '数据查询异常';\n } else if (props.requestStatus === 'request-success') {\n return '暂无数据';\n }\n return '数据查询中';\n }, [props.requestStatus]);\n return (\n <Empty\n image={Empty.PRESENTED_IMAGE_SIMPLE}\n description={description}\n className={'tree-selector-wrapper-empty'}\n >\n {props.requestStatus === 'request-error' && (\n <Button type=\"primary\" onClick={props.onAgainRequest}>\n 重新获取数据\n </Button>\n )}\n </Empty>\n );\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { TSetDefaultDefined } from '@flatbiz/utils';\nimport { TreeProps } from 'antd';\n\nexport type ModelState = {\n treeList: TSetDefaultDefined<TreeProps['treeData'], []>;\n queryIsEmpty: boolean;\n requestStatus?: 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setTreeList: ModelState['treeList'];\n resetTreeList: void;\n changeRequestStatus: ModelState['requestStatus'];\n};\n\nconst defaultState: ModelState = {\n treeList: [],\n queryIsEmpty: false,\n};\n\nconst TreeWrapperModel: ModelType<ModelState, ModelActionParams> = {\n actions: {\n setTreeList: (params) => {\n return (state) => {\n state.treeList = params || [];\n state.requestStatus = 'request-success';\n };\n },\n resetTreeList: () => {\n return (state) => {\n state.treeList = [];\n };\n },\n changeRequestStatus: (params) => {\n return (state) => {\n state.requestStatus = params;\n };\n },\n },\n state: defaultState,\n};\n\nconst treeWrapperModels: Record<string, API<ModelType<ModelState, ModelActionParams, any>>> = {};\n\n/**\n * ```\n * 使用方式\n * const [state, actions] = useTreeWrapperModel('key值').useStore();\n * ```\n */\nexport const treeWrapperModel = (key: string) => {\n if (!treeWrapperModels[key]) {\n treeWrapperModels[key] = Model(TreeWrapperModel);\n }\n return treeWrapperModels[key];\n};\n","import { TPlainObject, treeLeafParentsArray, treeToTiledArray } from '@flatbiz/utils';\n\nexport const getExpandedKeys = (\n value: string | number,\n treeList: TPlainObject[],\n fieldNames?: { label?: string; value?: string; children?: string },\n) => {\n const tiledArray = treeToTiledArray(treeList, fieldNames);\n return treeLeafParentsArray(value, tiledArray);\n};\n","import { isArray } from '@dimjs/lang';\nimport { extend } from '@dimjs/utils';\nimport { useEffectCustom } from '@flatbiz/antd';\nimport { isUndefinedOrNull, TPlainObject, treeToTiledArray } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, Empty, message, Spin, Tree, TreeProps } from 'antd';\nimport { DependencyList, forwardRef, useImperativeHandle, useMemo, useState } from 'react';\nimport { ModelState, treeWrapperModel } from './model';\nimport './style.less';\nimport { getExpandedKeys } from './utils';\n\ntype TreeServiceConfig = {\n params?: TPlainObject;\n requiredParamsKeys?: string[];\n onRequest?: (params?: any) => any;\n /**\n * 响应数据适配器\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject[];\n};\n\nexport type TreeWrapperProps = Omit<\n TreeProps,\n | 'expandedKeys'\n | 'treeData'\n | 'onExpand'\n | 'selectedKeys'\n | 'checkedKeys'\n | 'onCheck'\n | 'onSelect'\n | 'defaultCheckedKeys'\n | 'defaultSelectedKeys'\n | 'fieldNames'\n> & {\n modelKey: string;\n effectDependencyList?: DependencyList;\n /**\n * 请求服务需求的数据,当设置`selectorTreeList`后无效果\n */\n serviceConfig?: TreeServiceConfig;\n /**\n * 当设置selectorTreeList后,serviceConfig将失效\n * ```\n * 1. 不支持异步数据,异步使用serviceConfig方式\n * ```\n */\n selectorTreeList?: TreeProps['treeData'];\n value?: string | number | Array<string | number>;\n onChange?: (selectedKey: string | number | Array<string | number>) => void;\n fieldNames?: { label?: string; value?: string; children?: string };\n /**\n * 打开tree折叠过滤关键字\n */\n filterLabel?: string;\n};\n\nexport type TreeWrapperRefApi = {\n onClearSelectorList: () => void;\n getTreeDataList: () => TreeProps['treeData'];\n};\n\n/**\n * 树包装组件\n * @param props\n * @returns\n * ```\n * 1. 当设置selectorTreeList属性后,serviceConfig、onSelectorListChange将失效\n * ```\n */\nexport const TreeWrapper = forwardRef<TreeWrapperRefApi, TreeWrapperProps>((props, ref) => {\n const {\n serviceConfig,\n effectDependencyList,\n selectorTreeList,\n value,\n onChange,\n fieldNames,\n modelKey,\n ...otherProps\n } = props;\n const newServiceConfig = serviceConfig || {};\n const newEffectDependencyList = effectDependencyList || [];\n const [treeExpandedKeys, setTreeExpandedKeys] = useState<React.Key[]>();\n const [state, actions] = treeWrapperModel(modelKey).useStore();\n const [loading, setLoading] = useState(false);\n\n const valueList = useMemo(() => {\n if (isUndefinedOrNull(props.value)) return undefined;\n return (isArray(props.value) ? props.value : [props.value]) as Array<string | number>;\n }, [props.value]);\n\n const valueIsEmpty = (value: string | number) => {\n return value === '' || isUndefinedOrNull(value);\n };\n\n const serviceResponseHandle = (respData) => {\n const respDataList = (\n newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData\n ) as TPlainObject[];\n return respDataList;\n };\n\n const startDataSourceRequest = hooks.useCallbackRef(async () => {\n try {\n if (!newServiceConfig.onRequest) {\n throw new Error('onRequest 调用接口服务不能为空');\n }\n const requiredParamsKeys = newServiceConfig.requiredParamsKeys;\n const params = extend({}, newServiceConfig.params);\n if (requiredParamsKeys) {\n const isEmpty = requiredParamsKeys.find((key) => {\n return valueIsEmpty(params[key] as string | number);\n });\n if (isEmpty) {\n console.warn(`TreeWrapper组件:参数:${requiredParamsKeys.join('、')}不能为空`);\n return;\n }\n }\n try {\n setLoading(true);\n void actions.changeRequestStatus('request-pre');\n const _respData = await newServiceConfig.onRequest?.(params);\n const respData = serviceResponseHandle(_respData) as TreeProps['treeData'];\n void actions.setTreeList(respData || []);\n setLoading(false);\n } catch (error) {\n setLoading(false);\n void actions.changeRequestStatus('request-error');\n }\n } catch (error) {\n setLoading(false);\n void message.error((error.message as string) || '数据查询异常...');\n }\n });\n\n useEffectCustom(() => {\n if (selectorTreeList) {\n void actions.setTreeList(selectorTreeList);\n return;\n }\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = treeWrapperModel(modelKey).getState();\n if (\n newEffectDependencyList.length > 0 ||\n !realTimeState.requestStatus ||\n realTimeState.requestStatus === 'request-error'\n ) {\n void startDataSourceRequest();\n }\n }, newEffectDependencyList);\n\n useEffectCustom(() => {\n if (valueList && valueList.length > 0 && state.treeList.length > 0 && !treeExpandedKeys) {\n let expandedKeys = [] as Array<string | number>;\n valueList.forEach((tempValue) => {\n const targetList = getExpandedKeys(tempValue, state.treeList, props.fieldNames);\n expandedKeys = expandedKeys.concat(targetList.map((item) => item.value));\n });\n setTreeExpandedKeys((prev) => {\n const mergeList = expandedKeys.concat(prev || []);\n return Array.from(new Set(mergeList));\n });\n }\n }, [state.treeList, props.fieldNames, value]);\n\n hooks.useUpdateEffect(() => {\n if (props.filterLabel) {\n const tiledArray = treeToTiledArray(state.treeList || [], props.fieldNames);\n const targetList = tiledArray.filter((item) => item.label?.includes(props.filterLabel || ''));\n let expandedKeys = [] as Array<string | number>;\n targetList.map((tempItem) => {\n const targetValues = getExpandedKeys(\n tempItem.value as string,\n state.treeList || [],\n props.fieldNames,\n );\n const valueList = targetValues.map((item) => item.value);\n expandedKeys = expandedKeys.concat(valueList);\n });\n setTreeExpandedKeys(Array.from(new Set(expandedKeys)));\n } else {\n setTreeExpandedKeys([]);\n }\n }, [props.filterLabel]);\n\n useImperativeHandle(ref, () => {\n return {\n onClearSelectorList: () => {\n void actions.resetTreeList();\n },\n getTreeDataList: () => {\n return state.treeList;\n },\n };\n });\n\n const onExpand = hooks.useCallbackRef((expandedKeys) => {\n setTreeExpandedKeys(expandedKeys as string[]);\n });\n const onCheck = hooks.useCallbackRef((checkedKeys) => {\n onChange?.(checkedKeys as Array<string | number>);\n });\n const onSelect = hooks.useCallbackRef((checkedKeys) => {\n if (props.multiple) {\n onChange?.(checkedKeys as Array<string | number>);\n } else {\n onChange?.(checkedKeys[0] as string | number);\n }\n });\n\n const treeFieldNames = useMemo(() => {\n const newFieldNames = extend({ label: 'label', value: 'value', children: 'children' }, fieldNames);\n return { title: newFieldNames.label, key: newFieldNames.value, children: newFieldNames.children };\n }, [fieldNames]);\n\n if (state.treeList.length > 0) {\n return (\n <Tree\n showLine={otherProps.checkable ? false : { showLeafIcon: false }}\n {...otherProps}\n fieldNames={treeFieldNames}\n expandedKeys={treeExpandedKeys}\n treeData={state.treeList}\n onExpand={onExpand}\n selectedKeys={otherProps.checkable ? undefined : valueList}\n checkedKeys={otherProps.checkable ? valueList : undefined}\n onCheck={otherProps.checkable ? onCheck : undefined}\n onSelect={otherProps.checkable ? undefined : onSelect}\n style={{ width: '100%', ...otherProps.style }}\n />\n );\n }\n\n return (\n <NotFoundContent\n requestStatus={state.requestStatus}\n loading={loading}\n onAgainRequest={startDataSourceRequest}\n />\n );\n});\n\nconst NotFoundContent = (props: {\n requestStatus?: ModelState['requestStatus'];\n onAgainRequest: () => void;\n loading: boolean;\n}) => {\n const description = useMemo(() => {\n if (props.requestStatus === 'request-error') {\n return '数据查询异常';\n } else if (props.requestStatus === 'request-success') {\n return '暂无数据';\n }\n return '数据查询中';\n }, [props.requestStatus]);\n return (\n <div className=\"tree-wrapper-empty\">\n <Spin spinning={props.loading}></Spin>\n <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description={description}>\n {props.requestStatus === 'request-error' && (\n <Button type=\"primary\" onClick={props.onAgainRequest}>\n 重新获取数据\n </Button>\n )}\n </Empty>\n </div>\n );\n};\n"],"names":["styles","noop","getPermissionList","_getGlobalData","getGlobalData","elemAclLimits","permissionList","_isArray","hasPermission","name","includes","Permission","props","_jsx","Fragment","children","ButtonOperate","className","Space","split","Divider","type","size","wrap","_isUndefined","operateList","map","item","index","text","color","onClick","permission","needConfirm","confirmMessage","hidden","style","otherProps","_excluded","newStyle","_extends","Popconfirm","title","okText","cancelText","onConfirm","arrowPointAtCenter","Button","undefined","danger","_createElement","key","defaultProps","DatePickerWrapper","value","onChange","format","useMemo","showTime","onChangeDate","_hooks","useCallbackRef","moment","datePickerValue","flatbizDate","isDate","Date","DatePicker","width","DateRangePickerWrapper","values","value1","_ref","value2","date1","_ref2","date2","rangePickerValue","RangePicker","DrawerModel","actions","openDrawerForm","itemData","operateType","pageLoading","state","visible","closeDrawer","setDrawerItemData","params","DrawerOperation","_jsxs","cancelButtonProps","onCancel","hideOkBtn","icon","_SaveOutlined","okButtonProps","onOk","loading","PageLoader","DrawerWraper","_props$width","footer","operationProps","useEffect","console","error","Drawer","_classNames","keyboard","forceRender","destroyOnClose","contentWrapperStyle","maxWidth","drawerModels","createDrawerWraperModel","Model","useEffectCustom","fn","deps","useEffectCustomAsync","asyncFunction","Promise","$return","$error","then","$await_1","$boundEx","DrawerWrapperContent","DrawerWrapperFooter","DrawerWrapper","Error","Content","Footer","createDrawerWrapperModel","getEditable","editable","tableRowIndex","CheckboxGroupFormItemContent","fieldConfig","editableConfig","render","editableComptProps","viewLabelList","options","length","label","returnList","forEach","target","find","temp","push","Checkbox","Group","tag","Tag","CheckboxGroupFormItem","formItemProps","Form","Item","DatePickerWrapperFormItem","FormItemContent","viewLabel","join","DateRangePickerWrapperFormItem","InputFormItem","Input","InputNumberFormItem","InputNumber","RadioGroupFormItemContent","e","Radio","RadioGroupFormItem","defaultState","selectorList","queryIsEmpty","requestStatus","_SelectorWrapperModel","setSelectBoxList","resetSelectBoxList","changeRequestStatus","selectorWrapperModels","selectorWrapperModel","SelectorWrapper","forwardRef","ref","serviceConfig","showAllOption","effectDependencyList","onSelectorListChange","searchFieldName","modelKey","fieldNames","isSearch","newServiceConfig","newEffectDependencyList","changeOperateValueRef","useRef","useState","_useState","setLoading","_selectorWrapperModel","useStore","valueIsEmpty","isUndefinedOrNull","serviceRespDataTranslation","respData","respDataList","onRequestResultAdapter","arrayField2LabelValue","startDataSourceRequest","inputValue","searchId","requiredParamsKeys","_params","isEmpty","keyword","_respData","respDataTranslation","$Try_1_Post","$Try_1_Catch","message","onRequest","_extend","warn","$Try_2_Post","$Try_2_Catch","$await_3","realTimeState","getState","valueIsEqual","current","concat","useImperativeHandle","onClearSelectorList","getSelectorList","filterOption","input","option","toLowerCase","indexOf","onSearch","useDebounceCallback","_len","arguments","otherParams","Array","_key","onAgainRequest","selectOptionsAll","Select","Option","showSearch","allowClear","notFoundContent","NotFoundContent","suffixIcon","_RedoOutlined","spin","description","Empty","image","PRESENTED_IMAGE_SIMPLE","SelectorWrapperFormItem","FormItemTextContent","_props$fieldConfig2","_props$fieldConfig3","_props$fieldConfig","isBaseData","_isString","_isNumber","_isBoolean","JSON","stringify","TextFormItem","noStyle","TextAreaFormItem","TextArea","UploadWrapper","onUploadError","uploadList","setUploadList","uid","url","onUploadChange","info","fileList","file","status","response","code","result","data","maxCount","targetList","targetIndex","findIndex","tempUid","splice","Upload","disabled","UploadTrigger","listType","marginTop","ghost","UploadWrapperFormItemContent","_objectWithoutPropertiesLoose","_editableComptProps","UploadWrapperFormItem","FormItemAdapter","newEditable","commomProps","completeName","FormList","from","useFormInstance","formListConfig","onFormListBeforeRender","editableConfigList","onFormListAfterRender","onFormListItemBeforeRender","onFormListItemAfterRender","deleteOperateRender","List","fields","add","remove","_Fragment","getFieldValue","fieldChild","hasEditable","formListItemIndex","fieldItem","fieldName","DeleteFormListItem","_DeleteOutlined","FormListItem","EditableTable","_props$tableProps2","columns","columnItem","operateRender","otherColumnItem","onCell","_props$tableProps","valign","tableProps","cellVerticalAlign","_value","record","operation","dataIndex","rules","formListOperation","onTableBeforeRender","Table","scroll","x","pagination","dataSource","rowKey","onTableAfterRender","block","_PlusOutlined","FileImport","onImportFinish","showUploadList","accept","FileUpload","onPreview","uploadValue","setUploadValue","fileKey","fileName","thumbUrl","uploadItem","respValue","onUploadPreview","FlexLayout","childrens","direction","gap","fullIndexList","fullIndex","childrenStyle","flex","marginRight","marginBottom","cloneElement","Gap","height","IconWrapper","Tooltip","hoverTips","ModalModel","openModalForm","closeModal","setModalItemData","ModalOperation","_ref$okText","_ref$cancelText","ModalWraper","Modal","modalModels","createModalWraperModel","ModalWrapperContent","ModalWrapperFooter","ModalWrapper","createModalWrapperModel","PageFixedFooter","Page404","formClassName","label_width_70","label_width_80","label_width_90","label_width_100","label_width_110","label_width_120","label_width_130","label_width_auto","formItemClassName","preDefinedClassName","form","formItem","SimpleLayout","labelAlign","formLabelAlign","layoutType","desc","SmsCountDown","showMessage","setShowMessage","running","_useState2","setRunning","starting","_useState3","setStarting","initConfig","sendTxt","sentTxt","processingTxt","autoStart","totalTicks","duration","countdownFnc","useCountdownCallback","num","second","replace","String","onTick","intervalTime","onStart","onSendRequest","catch","overdueConsole","TableFilterLayout","isFixed","Children","Condition","Operate","treeSelectorList","TreeSelectorWrapperModel","treeSelectorWrapperModels","treeSelectorWrapperModel","getExpandedKeys","treeList","tiledArray","treeToTiledArray","treeLeafParentsArray","TreeSelectorWrapper","onTreeSelectorListChange","treeExpandedKeys","setTreeExpandedKeys","_treeSelectorWrapperM","serviceResponseHandle","_respData2","log","valueList","expandedKeys","tempValue","prev","mergeList","Set","getTreeSelectorList","onTreeExpand","TreeSelect","dropdownStyle","maxHeight","overflow","treeLine","treeData","TreeWrapperModel","setTreeList","resetTreeList","treeWrapperModels","treeWrapperModel","TreeWrapper","selectorTreeList","_treeWrapperModel$use","useUpdateEffect","filterLabel","filter","_item$label","tempItem","targetValues","getTreeDataList","onExpand","onCheck","checkedKeys","onSelect","multiple","treeFieldNames","newFieldNames","Tree","showLine","checkable","showLeafIcon","selectedKeys","Spin","spinning"],"mappings":";68CAIO,IAAMA,GAASC,kXCATC,IAAAA,GAAoB,SAApBA,IACX,IAAAC,EAA0BC,IAAlBC,IAAAA,cACR,IAAMC,EAA2BC,EAAQF,GAAiBA,EAAgB,GAC1E,OAAOC,OAGIE,GAAgB,SAAhBA,EAAiBC,GAC5B,IAAMH,EAAiBJ,KACvB,GAAII,EAAeI,SAASD,GAAO,CACjC,OAAO,KAET,OAAO,WAMIE,GAAkC,SAAlCA,EAAmCC,GAC9C,IAAMN,EAAiBJ,KACvB,GAAII,EAAeI,SAASE,EAAMH,MAAO,CACvC,OAAOI,EAACC,EAAD,CAAAC,SAAWH,EAAMG,WAE1B,OAAO,yGCJIC,GAAyC,SAAzCA,EAA0CJ,GACrD,OACEC,EAAA,MAAA,CAAKI,UAAU,gBAAfF,SACEF,EAACK,EAAD,CACEC,MAAON,EAACO,EAAD,CAASC,KAAK,aACrBC,KAAMV,EAAMU,KACZC,KAAMC,EAAYZ,EAAMW,MAAQ,KAAOX,EAAMW,KAH/CR,SAKGH,EAAMa,YAAYC,KAAI,SAACC,EAAMC,GAC5B,IAAKD,EAAM,OAAO,KAClB,IACEE,EASEF,EATFE,KACAC,EAQEH,EARFG,MACAC,EAOEJ,EAPFI,QACAC,EAMEL,EANFK,WACAC,EAKEN,EALFM,YACAC,EAIEP,EAJFO,eACAC,EAGER,EAHFQ,OACAC,EAEET,EAFFS,MACGC,KACDV,EAVJW,IAWA,GAAIH,EAAQ,OAAO,KACnB,GAAIH,IAAexB,GAAcwB,GAAa,OAAO,KACrD,IAAMO,EAAWT,EAAKU,GAAA,CAAKV,MAAAA,GAAUM,GAAUA,EAC/C,IAAMf,EAAOM,EAAKN,MAAQ,OAC1B,GAAIY,EAAa,CACf,OACEpB,EAAC4B,EAAD,CACEC,MAAOR,EACPS,OAAO,KACPC,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