@flatbiz/antd 2.4.8 → 2.4.9
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/cjs/index.css +64 -3
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/index.d.ts +65 -7
- package/package.json +3 -3
package/cjs/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/hooks/use-effect-custom.ts","@flatbiz/antd/src/hooks/use-effect-custom-async.ts","@flatbiz/antd/src/hooks/use-safe-state.ts","@flatbiz/antd/src/cascader-wrapper/model.ts","@flatbiz/antd/src/cascader-wrapper/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/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/editor-wrapper/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 && !otherProps.disabled) {\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 { 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 { hooks } from '@wove/react';\nimport { Dispatch, SetStateAction, useState } from 'react';\n\nexport const useSafeState = <S extends undefined | unknown>(\n initialState?: S | (() => S),\n): [S, Dispatch<SetStateAction<S>>] => {\n const [state, setState] = useState(initialState as S);\n const isMounted = hooks.useIsMounted();\n\n return [\n state,\n (value) => {\n if (isMounted.current) {\n return setState(value);\n }\n },\n ];\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { TPlainObject } from '@flatbiz/utils';\n\nexport type ModelState = {\n selectorList: TPlainObject[];\n queryIsEmpty: boolean;\n requestStatus: 'init' | 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setSelectBoxList: { selectorList: TPlainObject[] };\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.selectorList || [];\n state.requestStatus = 'request-success';\n };\n },\n changeRequestStatus: (params) => {\n return (state) => {\n state.requestStatus = params;\n };\n },\n },\n state: defaultState,\n};\n\nconst cascaderWrapperModels: Record<string, API<ModelType<ModelState, ModelActionParams, any>>> = {};\n\n/**\n * ```\n * 使用方式\n * const [state, actions] = selectorWrapperModel('key值').useStore();\n * ```\n */\nexport const cascaderWrapperModel = (key: string) => {\n if (!cascaderWrapperModels[key]) {\n cascaderWrapperModels[key] = Model(_SelectorWrapperModel);\n }\n return cascaderWrapperModels[key];\n};\n","import { RedoOutlined } from '@ant-design/icons';\nimport { cloneState } from '@dimjs/model';\nimport { extend } from '@dimjs/utils';\nimport { TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, Cascader, CascaderProps, Empty, message } from 'antd';\nimport { forwardRef, ReactElement, useImperativeHandle, useMemo, useState } from 'react';\nimport { useSafeState } from '../hooks';\nimport { useEffectCustom } from '../hooks/use-effect-custom';\nimport { cascaderWrapperModel, ModelState } from './model';\n\ntype CascaderWrapperServiceConfig = {\n params?: TPlainObject;\n onRequest?: (params?: any) => any;\n /**\n * 响应数据适配器\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject[];\n};\n\nexport type CascaderWrapperProps = Omit<CascaderProps<any>, 'loading' | 'notFoundContent' | 'options'> & {\n // 模型唯一值\n modelKey: string;\n /**\n * 请求服务需求的数据,当设置`selectorList`后无效果\n */\n serviceConfig?: CascaderWrapperServiceConfig;\n // label渲染适配器\n onLabelRenderAdapter?: (dataItem: TPlainObject) => string | ReactElement;\n /**\n * 是否动态加载选项\n */\n isDynamicLoad?: boolean;\n};\n\nexport type CascaderWrapperRefApi = {\n getCascaderList: () => TPlainObject[];\n};\n/**\n * 级联选择器包装组件\n * @param props\n * @returns\n * ```\n * 1. modelKey的配置是为了缓存数据,只缓存初始化数据,如果isDynamicLoad=true,动态获取的数据不再缓存\n * ```\n */\nexport const CascaderWrapper = forwardRef<CascaderWrapperRefApi, CascaderWrapperProps>((props, ref) => {\n const { serviceConfig, modelKey, fieldNames, isDynamicLoad, ...otherProps } = props;\n const [options, setOptions] = useState<any[]>([]);\n\n const newServiceConfig = serviceConfig || {};\n const [loading, setLoading] = useSafeState(false);\n const [state, actions] = cascaderWrapperModel(modelKey).useStore();\n const requestPreKey = `request-pre-${props.modelKey}`;\n const fieldNamesMerge = extend(true, { label: 'label', value: 'value', children: 'children' }, fieldNames);\n\n const serviceRespDataAdapter = (respData) => {\n const respDataList = newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData;\n return respDataList || [];\n };\n\n const startDataSourceRequest = hooks.useCallbackRef(async () => {\n if (!newServiceConfig.onRequest) {\n throw new Error('onRequest 调用接口服务不能为空');\n }\n try {\n setLoading(true);\n window[requestPreKey] = true;\n void actions.changeRequestStatus('request-pre');\n const respData = await newServiceConfig.onRequest?.(newServiceConfig.params);\n const respAdapterData = serviceRespDataAdapter(respData) as any[];\n if (isDynamicLoad) {\n respAdapterData.map((item) => {\n item.isLeaf = item.isLeaf || false;\n });\n }\n setLoading(false);\n window[requestPreKey] = false;\n void actions.setSelectBoxList({\n selectorList: respAdapterData || [],\n });\n } catch (error) {\n setLoading(false);\n window[requestPreKey] = false;\n void actions.changeRequestStatus('request-error');\n void message.error(error.message || '获取数据异常');\n }\n });\n\n useEffectCustom(() => {\n if (window[requestPreKey]) return;\n if (state.requestStatus === 'request-success') {\n setOptions(cloneState(state.selectorList));\n } else {\n void startDataSourceRequest();\n }\n }, []);\n\n useEffectCustom(() => {\n setOptions(cloneState(state.selectorList));\n }, [state.selectorList]);\n\n useImperativeHandle(ref, () => {\n return {\n getCascaderList: () => {\n return state.selectorList;\n },\n };\n });\n\n const onAgainRequest = hooks.useCallbackRef(() => {\n void startDataSourceRequest();\n });\n\n const loadData = async (selectedOptions: any[]) => {\n const targetOption = selectedOptions[selectedOptions.length - 1];\n targetOption.loading = true;\n\n const respData = await newServiceConfig.onRequest?.(newServiceConfig.params);\n const respAdapterData = serviceRespDataAdapter(respData);\n if (!respAdapterData || respAdapterData.length === 0) {\n targetOption.isLeaf = true;\n } else {\n respAdapterData.map((item) => {\n item.isLeaf = item.isLeaf || false;\n });\n targetOption.children = respAdapterData;\n }\n targetOption.loading = false;\n setOptions([...options]);\n };\n\n return (\n <Cascader\n showSearch={true}\n allowClear={true}\n {...(otherProps as any)}\n notFoundContent={\n <NotFoundContent requestStatus={state.requestStatus} onAgainRequest={onAgainRequest} />\n }\n loading={loading}\n loadData={isDynamicLoad ? loadData : undefined}\n fieldNames={fieldNamesMerge}\n suffixIcon={\n state.requestStatus === 'request-error' ? (\n <RedoOutlined spin={loading} onClick={onAgainRequest} />\n ) : undefined\n }\n options={options}\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 { 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 = Omit<PickerDateProps<moment.Moment>, 'value' | 'onChange'> & {\n value?: string;\n onChange?: (value?: string) => void;\n /**\n * minDate、maxDate设置格式:YYYY-MM-DD\n */\n disabledDateConfig?: {\n minDate?: string;\n maxDate?: string;\n };\n};\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 * 5. 设置disabledDate后,disabledDateConfig配置将失效\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((date, dateString: string) => {\n if (date) {\n onChange?.(dateString);\n } else {\n onChange?.(undefined);\n }\n });\n\n const getDisabledDate = hooks.useCallbackRef((current) => {\n const currentDate = current.format('YYYY-MM-DD');\n if (!props.disabledDateConfig) {\n return false;\n }\n const { minDate, maxDate } = props.disabledDateConfig;\n if (minDate && maxDate) {\n if (!flatbizDate.in(currentDate, minDate, maxDate)) {\n return true;\n }\n } else if (minDate) {\n if (!flatbizDate.gte(currentDate, minDate)) {\n return true;\n }\n } else if (maxDate) {\n if (!flatbizDate.gte(maxDate, currentDate)) {\n return true;\n }\n }\n return false;\n });\n\n const datePickerValue = useMemo(() => {\n if (value) {\n return moment(flatbizDate.dateNormalize(value));\n }\n return undefined;\n }, [value]);\n\n return (\n <DatePicker\n disabledDate={getDisabledDate}\n format={format}\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, { Moment } from 'moment';\nimport { useMemo, useState, VFC } from 'react';\n\nexport type DateRangePickerWrapperProps = Omit<\n RangePickerDateProps<moment.Moment>,\n 'value' | 'onChange' | 'onOpenChange' | 'onCalendarChange' | 'disabledDate'\n> & {\n value?: [string, string];\n onChange?: (value?: [string, string]) => void;\n /**\n * 1. minDate、maxDate设置格式:YYYY-MM-DD\n * 2. maxDays 最大可选的天数\n */\n disabledDateConfig?: {\n minDate?: string;\n maxDate?: string;\n maxDays?: number;\n };\n};\n\ntype RangeValue = [Moment | null, Moment | null] | null;\n\n/**\n * DatePicker.RangePicker包装组件\n * ```\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 * 5. 可设置disabledDateConfig,来控制日期项的disbaled状态\n *\n * TODO: 引用DatePicker.RangePicker TS有问题,待解决\n * TODO: 存在场景缺陷,当设置maxDays、showTime后,在选择单个日期不通过确认按钮直接切换输入框,无法获取回调,无法约束disabledDate\n * ```\n */\nexport const DateRangePickerWrapper: VFC<DateRangePickerWrapperProps> = (props) => {\n const { value, onChange, style, ...otherProps } = props;\n const maxDays = props.disabledDateConfig?.maxDays;\n\n const [dates, setDates] = useState<RangeValue>(null);\n const [hackValue, setHackValue] = useState<RangeValue>(null);\n\n const [date1, date2] = value || [];\n const rangePickerValue = useMemo(() => {\n if (date1 && date2) {\n const newDate1 = flatbizDate.dateNormalize(date1);\n const newDate2 = flatbizDate.dateNormalize(date2);\n return [moment(newDate1), moment(newDate2)];\n }\n return undefined;\n }, [date1, date2]) as [Moment, Moment];\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((dates, dateStrings) => {\n if (dates && dates[0] && dates[1]) {\n onChange?.(dateStrings);\n } else {\n onChange?.(undefined);\n }\n });\n\n const getDisabledDate = hooks.useCallbackRef((current) => {\n const currentDate = current.format('YYYY-MM-DD');\n if (!props.disabledDateConfig) {\n return false;\n }\n const { maxDays, minDate, maxDate } = props.disabledDateConfig;\n if (minDate && maxDate) {\n if (!flatbizDate.in(currentDate, minDate, maxDate)) {\n return true;\n }\n } else if (minDate) {\n if (!flatbizDate.gte(currentDate, minDate)) {\n return true;\n }\n } else if (maxDate) {\n if (!flatbizDate.gte(maxDate, currentDate)) {\n return true;\n }\n }\n\n if (!maxDays || (!dates?.[0] && !dates?.[1])) {\n return false;\n }\n\n const tooLate = dates?.[0] && current.diff(dates[0], 'days') > maxDays - 1;\n const tooEarly = dates?.[1] && dates[1].diff(current, 'days') > maxDays - 1;\n return !!tooEarly || !!tooLate;\n });\n\n const onOpenChange = (open: boolean) => {\n if (maxDays && maxDays > 0) {\n if (open) {\n setHackValue([null, null]);\n setDates([null, null]);\n } else {\n setHackValue(null);\n }\n }\n };\n\n return (\n <DatePicker.RangePicker\n format={format}\n {...otherProps}\n disabledDate={getDisabledDate}\n style={{ width: '100%', ...style }}\n value={hackValue || rangePickerValue}\n onChange={onChangeDate}\n onOpenChange={onOpenChange}\n onCalendarChange={(val) => setDates(val)}\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 { 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 { TPlainObject } from '@flatbiz/utils';\n\nexport type ModelState = {\n selectorList: TPlainObject[];\n // originalSelectorList: TPlainObject[];\n queryIsEmpty: boolean;\n requestStatus: 'init' | 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setSelectBoxList: { selectorList: TPlainObject[] };\n resetSelectBoxList: void;\n changeRequestStatus: ModelState['requestStatus'];\n};\n\nconst defaultState: ModelState = {\n selectorList: [],\n // originalSelectorList: [],\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.selectorList || [];\n // state.originalSelectorList = params.originalSelectorList || [];\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 { isArray, isString, isNumber } from '@dimjs/lang';\nimport { extend } from '@dimjs/utils';\nimport { isUndefinedOrNull, TPlainObject, valueIsEqual } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, Empty, message, Select, SelectProps } from 'antd';\nimport { DependencyList, forwardRef, ReactElement, useImperativeHandle, useMemo, useRef } from 'react';\nimport { useSafeState } from '../hooks';\nimport { useEffectCustom } from '../hooks/use-effect-custom';\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' | 'onChange'\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将失效\n * 2. 不支持异步数据,异步使用serviceConfig方式\n * 3. 如果配置fieldNames,会转换后使用\n * ```\n */\n selectorList?: TPlainObject[];\n /**\n * 通过服务获取数据后回调,当设置`selectorList`后无效果\n */\n onSelectorListChange?: (dataList: TPlainObject[]) => 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 // label渲染适配器\n onLabelRenderAdapter?: (dataItem: TPlainObject) => string | ReactElement;\n\n onChange?: (\n value?: string | number | string[] | number[],\n selectedList?: TPlainObject[] | TPlainObject,\n ) => void;\n};\n\nexport type SelectorWrapperRefApi = {\n onClearSelectorList: () => void;\n getSelectorList: () => TPlainObject[];\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将失效\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<any>();\n const [loading, setLoading] = useSafeState(false);\n const [state, actions] = selectorWrapperModel(modelKey).useStore();\n const requestPreKey = `request-pre-${props.modelKey}`;\n const fieldNamesMerge = extend(true, { label: 'label', value: 'value' }, fieldNames);\n\n const valueIsEmpty = (value: string | number) => {\n return value === '' || isUndefinedOrNull(value);\n };\n\n const serviceRespDataAdapter = (respData) => {\n const respDataList = newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData;\n return respDataList;\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 window[requestPreKey] = 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 respAdapterData = serviceRespDataAdapter(respData);\n setLoading(false);\n window[requestPreKey] = false;\n void actions.setSelectBoxList({\n selectorList: respAdapterData || [],\n });\n } catch (error) {\n console.error(error);\n setLoading(false);\n window[requestPreKey] = 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 (state.selectorList && state.requestStatus === 'request-success') {\n onSelectorListChange?.(state.selectorList);\n }\n }, [state.selectorList, state.requestStatus]);\n\n useEffectCustom(() => {\n if (selectorList) {\n void actions.setSelectBoxList({\n selectorList: selectorList || [],\n });\n return;\n }\n if (isSearch) return;\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = selectorWrapperModel(modelKey).getState();\n if (\n newEffectDependencyList.length > 0 ||\n (!window[requestPreKey] && realTimeState.requestStatus !== 'request-success')\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数据(但changeOperateValueRef.current为复杂类型?)\n if (\n props.value !== changeOperateValueRef.current &&\n (isNumber(props.value) || isString(props.value))\n ) {\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 | string[] | number[], otherParams) => {\n changeOperateValueRef.current = value;\n const selectedList = isArray(otherParams) ? otherParams : otherParams ? [otherParams] : [];\n const targetList = state.selectorList.filter((item) => {\n const value = item[fieldNamesMerge.value];\n return selectedList.filter((temp) => temp.value === value).length > 0;\n });\n if (valueIsEqual(props.mode, ['multiple', 'tags'])) {\n props.onChange?.(value, targetList);\n } else {\n props.onChange?.(value, targetList?.[0]);\n }\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 const value = item[fieldNamesMerge.value];\n const label = item[fieldNamesMerge.label];\n return (\n <Select.Option value={value} label={label} key={value}>\n {props.onLabelRenderAdapter ? props.onLabelRenderAdapter(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, TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Form, Tag } from 'antd';\nimport { Fragment, useEffect, useState } 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 const [selectorList, setSelectorList] = useState<LabelValueItem[]>([]);\n const [viewLabelList, setviewLabelList] = useState<LabelValueItem[]>([]);\n\n useEffect(() => {\n if (!editable) {\n const value = isArray(props.value) ? props.value : props.value === undefined ? [] : [props.value];\n if (selectorList.length === 0) {\n setviewLabelList(value.map((item) => ({ label: item as string, 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: String(item), value: item });\n });\n setviewLabelList(returnList);\n }\n }, [editable, editableComptProps.fieldNames, props.value, selectorList]);\n\n const onSelectorListChange = hooks.useCallbackRef((dataList: TPlainObject[]) => {\n setSelectorList(arrayField2LabelValue(dataList || [], editableComptProps.fieldNames));\n });\n\n if (editable) {\n return (\n <SelectorWrapper\n {...editableComptProps}\n value={props.value}\n onChange={props.onChange}\n onSelectorListChange={onSelectorListChange}\n />\n );\n }\n return (\n <Fragment>\n <div style={{ display: 'none' }}>\n <SelectorWrapper {...editableComptProps} onSelectorListChange={onSelectorListChange} />\n </div>\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 </Fragment>\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, Typography } 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 const viewText = props.fieldConfig?.render?.(props.value) || value;\n return (\n <Typography.Paragraph\n className=\"editable-text-view\"\n ellipsis={isString(viewText) ? { tooltip: viewText } : true}\n >\n {viewText}\n </Typography.Paragraph>\n );\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 * 渲染中间件,如果renderMiddleware返回值为ReactElement格式,则会终止后续逻辑,fieldConfig配置将失效\n * ```\n * 1. tableRowIndex: 当前row的索引值\n * 2. name: 当前table单元格的form.item的name值\n * 3. operation Form.List的操作函数\n * ```\n */\n renderMiddleware?: (item: {\n tableRowIndex: number;\n name: string | number | Array<string | number>;\n operation: FormListOperation;\n }) => ReactElement | null;\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, renderMiddleware, ...otherColumnItem } = columnItem;\n return {\n onCell: () => {\n return {\n valign: props.tableProps?.cellVerticalAlign || 'middle',\n };\n },\n ...otherColumnItem,\n render: (_value, record) => {\n const completeName = columnItem.dataIndex\n ? [...props.name, record.name, columnItem.dataIndex]\n : [...props.name, record.name];\n const customRender = renderMiddleware?.({\n name: completeName,\n tableRowIndex: record.name,\n operation: record.operation,\n });\n if (customRender) {\n return customRender;\n }\n return (\n <FormListItem\n name={columnItem.dataIndex ? [record.name, columnItem.dataIndex] : [record.name]}\n completeName={completeName}\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 { TPlainObject } from '@flatbiz/utils';\nimport { Editor, hooks } from '@wove/react';\nimport { useState } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport './style.less';\n\nexport type EditorWrapperProps = {\n onChange: (data?: string) => void;\n value?: string;\n editorProps?: TPlainObject;\n};\n\n/**\n * 富文本编辑器,配置参考tinymce\n * @param props\n * @returns\n */\nexport const EditorWrapper = (props) => {\n const [key, setKey] = useState(0);\n const [inputValue, setInputValue] = useState();\n\n const onChange = hooks.useCallbackRef((e) => {\n const content = e.target.$()?.html();\n const respValue = content ? content : undefined;\n setInputValue(respValue);\n props.onChange?.(respValue);\n });\n\n useEffectCustom(() => {\n if (props.value !== inputValue) {\n setKey(Date.now());\n }\n }, [props.value]);\n\n return (\n <div key={key} className=\"v-editor-wrapper\">\n <Editor\n initialValue={props.value}\n init={{\n menubar: true,\n language: 'zh_CN',\n height: '500px',\n paste_retain_style_properties: 'all',\n table_default_styles: {\n width: '100%',\n },\n plugins:\n ' advlist lists image charmap preview' +\n ' visualblocks code fullscreen' +\n ' media table paste help wordcount',\n toolbar:\n ' undo redo | formatselect | ' +\n ' bold italic backcolor bullist numlist | outdent indent alignleft aligncenter alignright alignjustify | textmark untextmark code preview |' +\n ' removeformat | help',\n fontsize_formats: '8px 10px 12px 14px 16px 18px 24px 36px 48px',\n }}\n cdnTinyMce=\"https://file.40017.cn/tcsk/tinymce/tinymce.min.js\"\n {...props.editorProps}\n onChange={onChange}\n />\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 | React.ReactElement;\n icon?: React.ReactNode;\n style?: CSSProperties;\n text?: string | React.ReactElement;\n className?: string;\n size?: 'small' | 'middle' | 'large';\n onClick?: () => void;\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 onClick={props.onClick}\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 titleLeftLine?: boolean;\n};\n\n/**\n * 简单布局\n * @param props\n * @returns\n * ```\n * 1. layoutType 布局类型\n * layer:分层布局\n * 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 const titleClassName = classNames('simple-layout-title', {\n 'simple-layout-title-sign': props.titleLeftLine,\n });\n\n return (\n <div className={className} style={props.style}>\n {props.title ? <div className={titleClassName}>{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\nSimpleLayout.defaultProps = {\n titleLeftLine: true,\n layoutType: 'layer',\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 { TPlainObject, TSetDefaultDefined } from '@flatbiz/utils';\nimport { TreeSelectProps } from 'antd';\n\nexport type ModelState = {\n treeSelectorList: TSetDefaultDefined<TreeSelectProps['treeData'], []>;\n treeSelectorTiledArray: TPlainObject[];\n queryIsEmpty: boolean;\n requestStatus?: 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setSelectBoxList: {\n treeSelectorList: ModelState['treeSelectorList'];\n treeSelectorTiledArray: ModelState['treeSelectorTiledArray'];\n };\n resetSelectBoxList: void;\n changeRequestStatus: ModelState['requestStatus'];\n};\n\nconst defaultState: ModelState = {\n treeSelectorList: [],\n treeSelectorTiledArray: [],\n queryIsEmpty: false,\n};\n\nconst TreeSelectorWrapperModel: ModelType<ModelState, ModelActionParams> = {\n actions: {\n setSelectBoxList: (params) => {\n return (state) => {\n state.treeSelectorList = params.treeSelectorList || [];\n state.treeSelectorTiledArray = params.treeSelectorTiledArray || [];\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, isObject } from '@dimjs/lang';\nimport { extend } from '@dimjs/utils';\nimport { isUndefinedOrNull, TPlainObject, treeToArray } 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 { useSafeState } from '../hooks';\nimport { useEffectCustom } from '../hooks/use-effect-custom';\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' | 'onChange'\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 * 添加全部选项\n * ```\n * 1. showAllOption = true,添加默认全部选项(value值为空字符串)\n * 2. 可自定义全部选项,例如:{ label: '全部', value: 'all' }\n * 3. 自定义字段会通过fieldNames转换后使用\n * 4. 多选操作时,最好不要设置全部选项\n * ```\n */\n showAllOption?: true | TPlainObject<string | number>;\n onChange?: (\n selectedValueList?: Array<string | number> | string | number,\n selectedList?: TPlainObject[] | TPlainObject,\n ) => 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] = useSafeState(false);\n const [treeExpandedKeys, setTreeExpandedKeys] = useState<React.Key[]>();\n const [state, actions] = treeSelectorWrapperModel(modelKey).useStore();\n const requestPreKey = `request-pre-${props.modelKey}`;\n const fieldNames = useMemo(() => {\n return { label: 'label', value: 'value', children: 'children', ...props.fieldNames };\n }, [props.fieldNames]);\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(`TreeSelectorWrapper组件:参数:${requiredParamsKeys.join('、')}不能为空`);\n return;\n }\n }\n try {\n setLoading(true);\n window[requestPreKey] = 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 window[requestPreKey] = false;\n void actions.setSelectBoxList({\n treeSelectorList: respData || [],\n treeSelectorTiledArray: treeToArray(respData || [], fieldNames.children),\n });\n } catch (error) {\n setLoading(false);\n window[requestPreKey] = 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 (state.treeSelectorList && state.requestStatus === 'request-success') {\n onTreeSelectorListChange?.(state.treeSelectorList);\n }\n }, [state.treeSelectorList, state.requestStatus]);\n\n useEffectCustom(() => {\n if (treeSelectorList) {\n void actions.setSelectBoxList({\n treeSelectorList: treeSelectorList,\n treeSelectorTiledArray: treeToArray(treeSelectorList || [], fieldNames.children),\n });\n return;\n }\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = treeSelectorWrapperModel(modelKey).getState();\n if (\n newEffectDependencyList.length > 0 ||\n (!window[requestPreKey] && realTimeState.requestStatus !== 'request-success')\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 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, fieldNames, props.value]);\n\n useImperativeHandle(ref, () => {\n return {\n onClearSelectorList: () => {\n void actions.setSelectBoxList({\n treeSelectorList: [],\n treeSelectorTiledArray: [],\n });\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 const treeData = useMemo(() => {\n if (state.treeSelectorList.length === 0) return undefined;\n if (props.showAllOption === true) {\n const selectOptionsAll = {\n [`${fieldNames.label}`]: '全部',\n [`${fieldNames.value}`]: '',\n } as unknown as ModelState['treeSelectorList'][0];\n return [selectOptionsAll, ...state.treeSelectorList];\n } else if (isObject(props.showAllOption)) {\n return [\n props.showAllOption as unknown as ModelState['treeSelectorList'][0],\n ...state.treeSelectorList,\n ];\n }\n return state.treeSelectorList;\n }, [fieldNames, props.showAllOption, state.treeSelectorList]);\n\n const onChange = hooks.useCallbackRef((changeValue: Array<string | number> | string | number) => {\n const valueList = isArray(changeValue) ? changeValue : changeValue ? [changeValue] : [];\n const selectedList =\n valueList.length > 0\n ? state.treeSelectorTiledArray.filter((item) => {\n return !!valueList.find((temp) => temp === item[fieldNames.value]);\n })\n : [];\n if (isArray(changeValue)) {\n props.onChange?.(changeValue || [], selectedList);\n } else {\n props.onChange?.(changeValue, selectedList?.[0]);\n }\n });\n\n return (\n <TreeSelect\n dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}\n showSearch={true}\n treeLine={true}\n treeNodeFilterProp={fieldNames.label}\n {...otherProps}\n onChange={onChange as TreeSelectProps['onChange']}\n value={isUndefinedOrNull(props.value) ? undefined : props.value}\n treeExpandedKeys={treeExpandedKeys}\n treeData={treeData}\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 { TPlainObject, TSetDefaultDefined } from '@flatbiz/utils';\nimport { TreeProps } from 'antd';\n\nexport type ModelState = {\n treeList: TSetDefaultDefined<TreeProps['treeData'], []>;\n treeTiledArray: TPlainObject[];\n queryIsEmpty: boolean;\n requestStatus?: 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setTreeList: {\n treeList: ModelState['treeList'];\n treeTiledArray: ModelState['treeTiledArray'];\n };\n resetTreeList: void;\n changeRequestStatus: ModelState['requestStatus'];\n};\n\nconst defaultState: ModelState = {\n treeList: [],\n treeTiledArray: [],\n queryIsEmpty: false,\n};\n\nconst TreeWrapperModel: ModelType<ModelState, ModelActionParams> = {\n actions: {\n setTreeList: (params) => {\n return (state) => {\n state.treeList = params.treeList || [];\n state.treeTiledArray = params.treeTiledArray || [];\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 { isUndefinedOrNull, TPlainObject, treeToArray, 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 { useSafeState } from '../hooks';\nimport { useEffectCustom } from '../hooks/use-effect-custom';\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 | 'multiple'\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?: (\n selectedKey?: string | number | Array<string | number>,\n selectedList?: TPlainObject[] | TPlainObject,\n ) => void;\n fieldNames?: { label?: string; value?: string; children?: string };\n /**\n * 打开tree折叠过滤关键字\n */\n filterLabel?: string;\n /**\n * checkable模式下,onChange是否返回父节点,默认值true\n */\n checkableResponseParentNode?: boolean;\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将失效\n * 2. checkable=true,为多选模式\n * ```\n */\nexport const TreeWrapper = forwardRef<TreeWrapperRefApi, TreeWrapperProps>((props, ref) => {\n const {\n serviceConfig,\n effectDependencyList,\n selectorTreeList,\n value,\n onChange,\n modelKey,\n checkableResponseParentNode = true,\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] = useSafeState(false);\n const requestPreKey = `request-pre-${props.modelKey}`;\n const fieldNames = useMemo(() => {\n return { label: 'label', value: 'value', children: 'children', ...props.fieldNames };\n }, [props.fieldNames]);\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 window[requestPreKey] = true;\n const _respData = await newServiceConfig.onRequest?.(params);\n const respData = serviceResponseHandle(_respData) as TreeProps['treeData'];\n void actions.setTreeList({\n treeList: respData || [],\n treeTiledArray: treeToArray(respData || [], fieldNames.children),\n });\n setLoading(false);\n window[requestPreKey] = false;\n } catch (error) {\n window[requestPreKey] = false;\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({\n treeList: selectorTreeList || [],\n treeTiledArray: treeToArray(selectorTreeList || [], fieldNames.children),\n });\n return;\n }\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = treeWrapperModel(modelKey).getState();\n\n if (\n newEffectDependencyList.length > 0 ||\n (!window[requestPreKey] && realTimeState.requestStatus !== 'request-success')\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, 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, fieldNames, value]);\n\n hooks.useUpdateEffect(() => {\n if (props.filterLabel) {\n const tiledArray = treeToTiledArray(state.treeList || [], 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(tempItem.value as string, state.treeList || [], fieldNames);\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\n const onChangeHandle = hooks.useCallbackRef((checkedKeys) => {\n const valueList = isArray(checkedKeys) ? checkedKeys : checkedKeys ? [checkedKeys] : [];\n const selectedList: TPlainObject[] = [];\n valueList.map((item) => {\n const target = state.treeTiledArray.find((temp) => {\n return item === temp[fieldNames.value];\n });\n if (target) {\n selectedList.push(target);\n }\n });\n\n if (otherProps.checkable) {\n if (!checkableResponseParentNode) {\n // checkedKeys中含有父节点 是否返回\n const checkedList = selectedList?.filter(\n (item) => !(isArray(item[fieldNames.children]) && item[fieldNames.children].length > 0),\n );\n onChange?.(\n checkedList.map((item) => item[fieldNames.value]),\n checkedList,\n );\n } else {\n onChange?.(checkedKeys, selectedList);\n }\n } else {\n const currentNode = selectedList[selectedList.length - 1];\n if (currentNode) {\n onChange?.(currentNode[fieldNames.value], currentNode);\n } else {\n onChange?.(undefined);\n }\n }\n });\n\n const onCheck = hooks.useCallbackRef((checkedKeys) => {\n onChangeHandle?.(checkedKeys);\n });\n\n const onSelect = hooks.useCallbackRef((checkedKeys) => {\n onChangeHandle?.(checkedKeys);\n });\n\n const treeFieldNames = useMemo(() => {\n return { title: fieldNames.label, key: fieldNames.value, children: fieldNames.children };\n }, [fieldNames]);\n\n if (state.treeList.length > 0) {\n return (\n <Tree\n showLine={{ 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 multiple={true}\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","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","disabled","Popconfirm","title","okText","cancelText","onConfirm","arrowPointAtCenter","Button","undefined","danger","_createElement","createElement","key","defaultProps","useEffectCustom","fn","deps","useEffect","useEffectCustomAsync","asyncFunction","Promise","$return","$error","then","$await_1","$boundEx","useSafeState","initialState","useState","state","_useState","setState","isMounted","_hooks","useIsMounted","value","current","defaultState","selectorList","queryIsEmpty","requestStatus","_SelectorWrapperModel","actions","setSelectBoxList","params","changeRequestStatus","cascaderWrapperModels","cascaderWrapperModel","Model","CascaderWrapper","forwardRef","ref","serviceConfig","modelKey","fieldNames","isDynamicLoad","options","setOptions","newServiceConfig","loading","_useSafeState","setLoading","_cascaderWrapperModel","useStore","requestPreKey","fieldNamesMerge","_extend","extend","label","serviceRespDataAdapter","respData","respDataList","onRequestResultAdapter","startDataSourceRequest","useCallbackRef","_respData","respAdapterData","onRequest","Error","$Try_1_Post","$Try_1_Catch","error","window","message","resolve","$await_2","isLeaf","cloneState","useImperativeHandle","getCascaderList","onAgainRequest","loadData","selectedOptions","targetOption","length","$await_3","concat","Cascader","showSearch","allowClear","notFoundContent","NotFoundContent","suffixIcon","_RedoOutlined","spin","description","useMemo","Empty","image","PRESENTED_IMAGE_SIMPLE","DatePickerWrapper","onChange","format","showTime","onChangeDate","date","dateString","getDisabledDate","currentDate","disabledDateConfig","minDate","maxDate","flatbizDate","in","gte","datePickerValue","moment","dateNormalize","DatePicker","disabledDate","width","DateRangePickerWrapper","_props$disabledDateCo","maxDays","dates","setDates","hackValue","_useState2","setHackValue","date1","_ref","date2","rangePickerValue","newDate1","newDate2","dateStrings","tooLate","diff","tooEarly","onOpenChange","open","RangePicker","onCalendarChange","val","DrawerModel","openDrawerForm","itemData","operateType","pageLoading","visible","closeDrawer","setDrawerItemData","DrawerOperation","_jsxs","cancelButtonProps","onCancel","hideOkBtn","icon","_SaveOutlined","okButtonProps","onOk","PageLoader","jsxs","jsx","DrawerWraper","_props$width","footer","operationProps","console","Drawer","_classNames","keyboard","forceRender","destroyOnClose","contentWrapperStyle","maxWidth","drawerModels","createDrawerWraperModel","DrawerWrapperContent","DrawerWrapperFooter","DrawerWrapper","Content","Footer","createDrawerWrapperModel","getEditable","editable","tableRowIndex","CheckboxGroupFormItemContent","fieldConfig","editableConfig","render","editableComptProps","viewLabelList","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","resetSelectBoxList","selectorWrapperModels","selectorWrapperModel","SelectorWrapper","showAllOption","effectDependencyList","onSelectorListChange","searchFieldName","isSearch","newEffectDependencyList","changeOperateValueRef","useRef","_selectorWrapperModel","valueIsEmpty","isUndefinedOrNull","inputValue","searchId","requiredParamsKeys","_params","isEmpty","keyword","warn","$Try_2_Post","$Try_2_Catch","realTimeState","getState","_isNumber","isNumber","_isString","onClearSelectorList","getSelectorList","filterOption","input","option","_option$children","toLowerCase","indexOf","onSearch","useDebounceCallback","otherParams","selectedList","targetList","filter","valueIsEqual","mode","selectOptionsAll","Select","Option","onLabelRenderAdapter","setSelectorList","setviewLabelList","String","dataList","arrayField2LabelValue","display","SelectorWrapperFormItem","FormItemTextContent","_props$fieldConfig2","_props$fieldConfig3","_props$fieldConfig","isBaseData","_isBoolean","JSON","stringify","viewText","Typography","Paragraph","ellipsis","tooltip","TextFormItem","noStyle","TextAreaFormItem","TextArea","UploadWrapper","onUploadError","uploadList","setUploadList","uid","url","onUploadChange","info","fileList","file","status","response","code","result","data","maxCount","targetIndex","findIndex","tempUid","splice","Upload","classNames","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","renderMiddleware","otherColumnItem","onCell","_props$tableProps","valign","tableProps","cellVerticalAlign","_value","record","dataIndex","customRender","operation","rules","formListOperation","onTableBeforeRender","Table","scroll","x","pagination","dataSource","rowKey","onTableAfterRender","block","_PlusOutlined","EditorWrapper","setKey","setInputValue","_e$target$$","content","$","html","respValue","Date","now","_Editor","Editor","initialValue","init","menubar","language","height","paste_retain_style_properties","table_default_styles","plugins","toolbar","fontsize_formats","cdnTinyMce","editorProps","FileImport","onImportFinish","showUploadList","accept","FileUpload","onPreview","uploadValue","setUploadValue","fileKey","fileName","thumbUrl","uploadItem","onUploadPreview","FlexLayout","childrens","direction","gap","fullIndexList","fullIndex","childrenStyle","flex","marginRight","marginBottom","cloneElement","Gap","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","titleClassName","titleLeftLine","desc","SmsCountDown","showMessage","setShowMessage","running","setRunning","starting","_useState3","setStarting","initConfig","sendTxt","sentTxt","processingTxt","autoStart","totalTicks","duration","countdownFnc","useCountdownCallback","num","second","replace","onTick","intervalTime","onStart","onSendRequest","catch","overdueConsole","TableFilterLayout","isFixed","Children","Condition","Operate","treeSelectorList","treeSelectorTiledArray","TreeSelectorWrapperModel","treeSelectorWrapperModels","treeSelectorWrapperModel","getExpandedKeys","treeList","tiledArray","treeToTiledArray","treeLeafParentsArray","TreeSelectorWrapper","onTreeSelectorListChange","treeExpandedKeys","setTreeExpandedKeys","_treeSelectorWrapperM","serviceResponseHandle","_respData2","treeToArray","valueList","expandedKeys","tempValue","prev","mergeList","Array","Set","getTreeSelectorList","onTreeExpand","treeData","_selectOptionsAll","_isObject","isObject","changeValue","TreeSelect","dropdownStyle","maxHeight","overflow","treeLine","treeNodeFilterProp","treeTiledArray","TreeWrapperModel","setTreeList","resetTreeList","treeWrapperModels","treeWrapperModel","TreeWrapper","selectorTreeList","checkableResponseParentNode","_props$checkableRespo","_treeWrapperModel$use","useUpdateEffect","filterLabel","_item$label","tempItem","targetValues","getTreeDataList","onExpand","onChangeHandle","checkedKeys","checkable","checkedList","currentNode","onCheck","onSelect","treeFieldNames","Tree","showLine","showLeafIcon","selectedKeys","multiple","Spin","spinning"],"mappings":";iiCAIO,IAAMA,EAASC,EAAAA,qYCATC,IAAAA,EAAoB,SAApBA,IACX,IAAAC,EAA0BC,EAAAA,gBAAlBC,IAAAA,cACR,IAAMC,EAA2BC,EAAAC,QAAQH,GAAiBA,EAAgB,GAC1E,OAAOC,OAGIG,EAAgB,SAAhBA,EAAiBC,GAC5B,IAAMJ,EAAiBJ,IACvB,GAAII,EAAeK,SAASD,GAAO,CACjC,OAAO,KAET,OAAO,WAMIE,EAAkC,SAAlCA,EAAmCC,GAC9C,IAAMP,EAAiBJ,IACvB,GAAII,EAAeK,SAASE,EAAMH,MAAO,CACvC,OAAOI,EAAAA,IAACC,EAAAA,SAAD,CAAAC,SAAWH,EAAMG,WAE1B,OAAO,wGCJIC,EAAyC,SAAzCA,EAA0CJ,GACrD,OACEC,EAAAA,IAAA,MAAA,CAAKI,UAAU,gBAAfF,SACEF,MAACK,QAAD,CACEC,MAAON,MAACO,UAAD,CAASC,KAAK,aACrBC,KAAMV,EAAMU,KACZC,KAAMC,EAAYZ,YAAAA,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,IACDV,EAVJW,GAWA,GAAIH,EAAQ,OAAO,KACnB,GAAIH,IAAexB,EAAcwB,GAAa,OAAO,KACrD,IAAMO,EAAWT,EAAKU,EAAA,CAAKV,MAAAA,GAAUM,GAAUA,EAC/C,IAAMf,EAAOM,EAAKN,MAAQ,OAC1B,GAAIY,IAAgBI,EAAWI,SAAU,CACvC,OACE5B,EAAAA,IAAC6B,EAA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,OAET,MAAO,UACN,CAACrE,EAAMqE,gBACV,OACE2H,EAAAA,KAAA,MAAA,CAAK3L,UAAU,qBAAfF,SAAA,CACEF,MAAC8lB,OAAD,CAAMC,SAAUhmB,EAAMwF,UACtBvF,MAACuI,QAAD,CAAOC,MAAOD,EAAKA,MAACE,uBAAwBJ,YAAaA,EAAzDnI,SACGH,EAAMqE,gBAAkB,iBACvBpE,EAAAA,IAACmC,EAAAA,OAAD,CAAQ3B,KAAK,UAAUU,QAASnB,EAAMuH,eAAtCpH,SAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["@flatbiz/antd/src/01-styles/index.ts","@flatbiz/antd/src/permission/index.tsx","@flatbiz/antd/src/dropdown-menu-wrapper/index.tsx","@flatbiz/antd/src/button-operate/index.tsx","@flatbiz/antd/src/hooks/use-effect-custom.ts","@flatbiz/antd/src/hooks/use-effect-custom-async.ts","@flatbiz/antd/src/hooks/use-safe-state.ts","@flatbiz/antd/src/cascader-wrapper/model.ts","@flatbiz/antd/src/cascader-wrapper/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/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/editor-wrapper/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 { isPromise } from '@dimjs/lang';\nimport { hooks } from '@wove/react';\nimport { Button, ButtonProps, Dropdown, DropdownProps, Menu, Popconfirm, PopconfirmProps } from 'antd';\nimport { ItemType } from 'antd/lib/menu/hooks/useItems';\nimport { FC, useState } from 'react';\nimport { hasPermission } from '../permission';\nimport './style.less';\n\nexport interface DropdownMenuItem extends ButtonProps {\n text: string;\n color?: string;\n onClick: (event: React.MouseEvent<HTMLElement>) => void | Promise<void>;\n permission?: string;\n needConfirm?: boolean;\n confirmMessage?: string;\n hidden?: boolean;\n popconfirmProps?: Pick<PopconfirmProps, 'placement' | 'okText' | 'cancelText' | 'trigger'>;\n}\n\nexport interface DropdownMenuWrapperProps extends Omit<DropdownProps, 'overlay'> {\n menuList: Array<DropdownMenuItem | null>;\n}\n\nexport const DropdownMenuWrapper: FC<DropdownMenuWrapperProps> = (props) => {\n const { menuList, ...dropdownOtherProps } = props;\n const menuItems: ItemType[] = [];\n const [visible, setVisible] = useState(false);\n const [loading, setLoading] = useState(false);\n\n const onConfirmtTriggerClick = hooks.useCallbackRef((event) => {\n event.stopPropagation();\n setVisible(true);\n });\n\n const onConfirm = hooks.useCallbackRef((item: DropdownMenuItem, event) => {\n event.stopPropagation();\n const result = item.onClick?.(event);\n if (result && isPromise(result)) {\n setLoading(true);\n result.finally(() => {\n setVisible(false);\n setLoading(false);\n });\n return;\n }\n setVisible(false);\n });\n\n menuList.forEach((item, index) => {\n if (!item) return;\n const {\n text,\n color,\n onClick,\n permission,\n needConfirm,\n confirmMessage,\n hidden,\n type,\n style,\n popconfirmProps,\n ...otherProps\n } = item;\n if (hidden) return;\n if (permission && !hasPermission(permission)) return;\n const newStyle = color ? { color, ...style } : style;\n const buttonType = type || 'link';\n const nromal = {\n key: index,\n label: (\n <Button size=\"small\" {...otherProps} type={buttonType} style={newStyle} key={index} onClick={onClick}>\n {text}\n </Button>\n ),\n };\n const confirm = {\n key: index,\n label: (\n <Popconfirm\n okText=\"确定\"\n cancelText=\"取消\"\n trigger={['click']}\n destroyTooltipOnHide={true}\n {...popconfirmProps}\n title={confirmMessage}\n onConfirm={onConfirm.bind(null, item)}\n onCancel={() => {\n setVisible(false);\n }}\n arrowPointAtCenter={true}\n key={index}\n overlayStyle={{ zIndex: 10 }}\n visible={visible}\n okButtonProps={{\n loading,\n }}\n >\n <Button\n size=\"small\"\n {...otherProps}\n onClick={onConfirmtTriggerClick}\n type={buttonType}\n danger\n style={newStyle}\n >\n {text}\n </Button>\n </Popconfirm>\n ),\n };\n if (needConfirm && !otherProps.disabled) {\n menuItems.push(confirm);\n } else {\n menuItems.push(nromal);\n }\n });\n\n return (\n <Dropdown\n trigger={dropdownOtherProps?.trigger || ['hover']}\n arrow={{ pointAtCenter: true }}\n {...dropdownOtherProps}\n overlayStyle={{ zIndex: 9, ...dropdownOtherProps.overlayStyle }}\n overlay={<Menu items={menuItems} />}\n onVisibleChange={(_visible) => {\n console.log(visible);\n if (!_visible) {\n setVisible(false);\n setLoading(false);\n }\n }}\n >\n {props.children}\n </Dropdown>\n );\n};\n","import { MoreOutlined } from '@ant-design/icons';\nimport { isPromise, isUndefined } from '@dimjs/lang';\nimport { hooks } from '@wove/react';\nimport { Button, ButtonProps, Divider, Popconfirm, PopconfirmProps, Space, SpaceProps } from 'antd';\nimport { ReactElement, useMemo, useState, VFC } from 'react';\nimport { DropdownMenuWrapper } from '../dropdown-menu-wrapper';\nimport { hasPermission } from '../permission';\nimport './style.less';\n\nexport interface ButtonOperateItem extends ButtonProps {\n text: string;\n color?: string;\n onClick: (event: React.MouseEvent<HTMLElement>) => void | Promise<void>;\n permission?: string;\n needConfirm?: boolean;\n confirmMessage?: string;\n hidden?: boolean;\n popconfirmProps?: Pick<PopconfirmProps, 'placement' | 'okText' | 'cancelText' | 'trigger'>;\n isFold?: boolean;\n}\n\nexport interface ButtonOperateProps {\n operateList: Array<ButtonOperateItem | null>;\n wrap?: boolean;\n size?: SpaceProps['size'];\n foldIcon?: ReactElement;\n}\n\nexport const ButtonOperate: VFC<ButtonOperateProps> = (props) => {\n const [loading, setLoading] = useState(false);\n const onConfirm = hooks.useCallbackRef((item: ButtonOperateItem, event) => {\n const result = item.onClick?.(event);\n if (result && isPromise(result)) {\n setLoading(true);\n return result.finally(() => {\n setLoading(false);\n });\n }\n return;\n });\n\n const foldList = useMemo(() => {\n return props.operateList.filter((item) => {\n const has = item && !item.hidden && item.isFold;\n if (item && item.permission) {\n return hasPermission(item.permission) && has;\n }\n return has;\n }) as ButtonOperateItem[];\n }, [props.operateList]);\n\n const viewList = useMemo(() => {\n return props.operateList.filter((item) => {\n const has = item && !item.hidden && !item.isFold;\n if (item && item.permission) {\n return hasPermission(item.permission) && has;\n }\n return has;\n }) as ButtonOperateItem[];\n }, [props.operateList]);\n\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 {viewList.map((item, index) => {\n const {\n text,\n color,\n onClick,\n permission,\n needConfirm,\n confirmMessage,\n hidden,\n style,\n popconfirmProps,\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 && !otherProps.disabled) {\n return (\n <Popconfirm\n okText=\"确定\"\n cancelText=\"取消\"\n trigger={['click']}\n placement=\"topRight\"\n arrowPointAtCenter={true}\n destroyTooltipOnHide={true}\n {...popconfirmProps}\n title={confirmMessage}\n onConfirm={onConfirm.bind(null, item)}\n key={index}\n okButtonProps={{\n loading,\n }}\n onVisibleChange={(_visible) => {\n if (!_visible) {\n setLoading(false);\n }\n }}\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 {foldList.length > 0 ? (\n <DropdownMenuWrapper menuList={foldList}>\n <Button type=\"link\" className=\"fold-more-button\">\n {props.foldIcon ? props.foldIcon : <MoreOutlined />}\n </Button>\n </DropdownMenuWrapper>\n ) : null}\n </Space>\n </div>\n );\n};\n\nButtonOperate.defaultProps = {\n size: 0,\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 { hooks } from '@wove/react';\nimport { Dispatch, SetStateAction, useState } from 'react';\n\nexport const useSafeState = <S extends undefined | unknown>(\n initialState?: S | (() => S),\n): [S, Dispatch<SetStateAction<S>>] => {\n const [state, setState] = useState(initialState as S);\n const isMounted = hooks.useIsMounted();\n\n return [\n state,\n (value) => {\n if (isMounted.current) {\n return setState(value);\n }\n },\n ];\n};\n","import { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { TPlainObject } from '@flatbiz/utils';\n\nexport type ModelState = {\n selectorList: TPlainObject[];\n queryIsEmpty: boolean;\n requestStatus: 'init' | 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setSelectBoxList: { selectorList: TPlainObject[] };\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.selectorList || [];\n state.requestStatus = 'request-success';\n };\n },\n changeRequestStatus: (params) => {\n return (state) => {\n state.requestStatus = params;\n };\n },\n },\n state: defaultState,\n};\n\nconst cascaderWrapperModels: Record<string, API<ModelType<ModelState, ModelActionParams, any>>> = {};\n\n/**\n * ```\n * 使用方式\n * const [state, actions] = selectorWrapperModel('key值').useStore();\n * ```\n */\nexport const cascaderWrapperModel = (key: string) => {\n if (!cascaderWrapperModels[key]) {\n cascaderWrapperModels[key] = Model(_SelectorWrapperModel);\n }\n return cascaderWrapperModels[key];\n};\n","import { RedoOutlined } from '@ant-design/icons';\nimport { cloneState } from '@dimjs/model';\nimport { extend } from '@dimjs/utils';\nimport { TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, Cascader, CascaderProps, Empty, message } from 'antd';\nimport { forwardRef, ReactElement, useImperativeHandle, useMemo, useState } from 'react';\nimport { useSafeState } from '../hooks';\nimport { useEffectCustom } from '../hooks/use-effect-custom';\nimport { cascaderWrapperModel, ModelState } from './model';\n\ntype CascaderWrapperServiceConfig = {\n params?: TPlainObject;\n onRequest?: (params?: any) => any;\n /**\n * 响应数据适配器\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject[];\n};\n\nexport type CascaderWrapperProps = Omit<CascaderProps<any>, 'loading' | 'notFoundContent' | 'options'> & {\n // 模型唯一值\n modelKey: string;\n /**\n * 请求服务需求的数据,当设置`selectorList`后无效果\n */\n serviceConfig?: CascaderWrapperServiceConfig;\n // label渲染适配器\n onLabelRenderAdapter?: (dataItem: TPlainObject) => string | ReactElement;\n /**\n * 是否动态加载选项\n */\n isDynamicLoad?: boolean;\n};\n\nexport type CascaderWrapperRefApi = {\n getCascaderList: () => TPlainObject[];\n};\n/**\n * 级联选择器包装组件\n * @param props\n * @returns\n * ```\n * 1. modelKey的配置是为了缓存数据,只缓存初始化数据,如果isDynamicLoad=true,动态获取的数据不再缓存\n * ```\n */\nexport const CascaderWrapper = forwardRef<CascaderWrapperRefApi, CascaderWrapperProps>((props, ref) => {\n const { serviceConfig, modelKey, fieldNames, isDynamicLoad, ...otherProps } = props;\n const [options, setOptions] = useState<any[]>([]);\n\n const newServiceConfig = serviceConfig || {};\n const [loading, setLoading] = useSafeState(false);\n const [state, actions] = cascaderWrapperModel(modelKey).useStore();\n const requestPreKey = `request-pre-${props.modelKey}`;\n const fieldNamesMerge = extend(true, { label: 'label', value: 'value', children: 'children' }, fieldNames);\n\n const serviceRespDataAdapter = (respData) => {\n const respDataList = newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData;\n return respDataList || [];\n };\n\n const startDataSourceRequest = hooks.useCallbackRef(async () => {\n if (!newServiceConfig.onRequest) {\n throw new Error('onRequest 调用接口服务不能为空');\n }\n try {\n setLoading(true);\n window[requestPreKey] = true;\n void actions.changeRequestStatus('request-pre');\n const respData = await newServiceConfig.onRequest?.(newServiceConfig.params);\n const respAdapterData = serviceRespDataAdapter(respData) as any[];\n if (isDynamicLoad) {\n respAdapterData.map((item) => {\n item.isLeaf = item.isLeaf || false;\n });\n }\n setLoading(false);\n window[requestPreKey] = false;\n void actions.setSelectBoxList({\n selectorList: respAdapterData || [],\n });\n } catch (error) {\n setLoading(false);\n window[requestPreKey] = false;\n void actions.changeRequestStatus('request-error');\n void message.error(error.message || '获取数据异常');\n }\n });\n\n useEffectCustom(() => {\n if (window[requestPreKey]) return;\n if (state.requestStatus === 'request-success') {\n setOptions(cloneState(state.selectorList));\n } else {\n void startDataSourceRequest();\n }\n }, []);\n\n useEffectCustom(() => {\n setOptions(cloneState(state.selectorList));\n }, [state.selectorList]);\n\n useImperativeHandle(ref, () => {\n return {\n getCascaderList: () => {\n return state.selectorList;\n },\n };\n });\n\n const onAgainRequest = hooks.useCallbackRef(() => {\n void startDataSourceRequest();\n });\n\n const loadData = async (selectedOptions: any[]) => {\n const targetOption = selectedOptions[selectedOptions.length - 1];\n targetOption.loading = true;\n\n const respData = await newServiceConfig.onRequest?.(newServiceConfig.params);\n const respAdapterData = serviceRespDataAdapter(respData);\n if (!respAdapterData || respAdapterData.length === 0) {\n targetOption.isLeaf = true;\n } else {\n respAdapterData.map((item) => {\n item.isLeaf = item.isLeaf || false;\n });\n targetOption.children = respAdapterData;\n }\n targetOption.loading = false;\n setOptions([...options]);\n };\n\n return (\n <Cascader\n showSearch={true}\n allowClear={true}\n {...(otherProps as any)}\n notFoundContent={\n <NotFoundContent requestStatus={state.requestStatus} onAgainRequest={onAgainRequest} />\n }\n loading={loading}\n loadData={isDynamicLoad ? loadData : undefined}\n fieldNames={fieldNamesMerge}\n suffixIcon={\n state.requestStatus === 'request-error' ? (\n <RedoOutlined spin={loading} onClick={onAgainRequest} />\n ) : undefined\n }\n options={options}\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 { 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 = Omit<PickerDateProps<moment.Moment>, 'value' | 'onChange'> & {\n value?: string;\n onChange?: (value?: string) => void;\n /**\n * minDate、maxDate设置格式:YYYY-MM-DD\n */\n disabledDateConfig?: {\n minDate?: string;\n maxDate?: string;\n };\n};\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 * 5. 设置disabledDate后,disabledDateConfig配置将失效\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((date, dateString: string) => {\n if (date) {\n onChange?.(dateString);\n } else {\n onChange?.(undefined);\n }\n });\n\n const getDisabledDate = hooks.useCallbackRef((current) => {\n const currentDate = current.format('YYYY-MM-DD');\n if (!props.disabledDateConfig) {\n return false;\n }\n const { minDate, maxDate } = props.disabledDateConfig;\n if (minDate && maxDate) {\n if (!flatbizDate.in(currentDate, minDate, maxDate)) {\n return true;\n }\n } else if (minDate) {\n if (!flatbizDate.gte(currentDate, minDate)) {\n return true;\n }\n } else if (maxDate) {\n if (!flatbizDate.gte(maxDate, currentDate)) {\n return true;\n }\n }\n return false;\n });\n\n const datePickerValue = useMemo(() => {\n if (value) {\n return moment(flatbizDate.dateNormalize(value));\n }\n return undefined;\n }, [value]);\n\n return (\n <DatePicker\n disabledDate={getDisabledDate}\n format={format}\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, { Moment } from 'moment';\nimport { useMemo, useState, VFC } from 'react';\n\nexport type DateRangePickerWrapperProps = Omit<\n RangePickerDateProps<moment.Moment>,\n 'value' | 'onChange' | 'onOpenChange' | 'onCalendarChange' | 'disabledDate'\n> & {\n value?: [string, string];\n onChange?: (value?: [string, string]) => void;\n /**\n * 1. minDate、maxDate设置格式:YYYY-MM-DD\n * 2. maxDays 最大可选的天数\n */\n disabledDateConfig?: {\n minDate?: string;\n maxDate?: string;\n maxDays?: number;\n };\n};\n\ntype RangeValue = [Moment | null, Moment | null] | null;\n\n/**\n * DatePicker.RangePicker包装组件\n * ```\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 * 5. 可设置disabledDateConfig,来控制日期项的disbaled状态\n *\n * TODO: 引用DatePicker.RangePicker TS有问题,待解决\n * TODO: 存在场景缺陷,当设置maxDays、showTime后,在选择单个日期不通过确认按钮直接切换输入框,无法获取回调,无法约束disabledDate\n * ```\n */\nexport const DateRangePickerWrapper: VFC<DateRangePickerWrapperProps> = (props) => {\n const { value, onChange, style, ...otherProps } = props;\n const maxDays = props.disabledDateConfig?.maxDays;\n\n const [dates, setDates] = useState<RangeValue>(null);\n const [hackValue, setHackValue] = useState<RangeValue>(null);\n\n const [date1, date2] = value || [];\n const rangePickerValue = useMemo(() => {\n if (date1 && date2) {\n const newDate1 = flatbizDate.dateNormalize(date1);\n const newDate2 = flatbizDate.dateNormalize(date2);\n return [moment(newDate1), moment(newDate2)];\n }\n return undefined;\n }, [date1, date2]) as [Moment, Moment];\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((dates, dateStrings) => {\n if (dates && dates[0] && dates[1]) {\n onChange?.(dateStrings);\n } else {\n onChange?.(undefined);\n }\n });\n\n const getDisabledDate = hooks.useCallbackRef((current) => {\n const currentDate = current.format('YYYY-MM-DD');\n if (!props.disabledDateConfig) {\n return false;\n }\n const { maxDays, minDate, maxDate } = props.disabledDateConfig;\n if (minDate && maxDate) {\n if (!flatbizDate.in(currentDate, minDate, maxDate)) {\n return true;\n }\n } else if (minDate) {\n if (!flatbizDate.gte(currentDate, minDate)) {\n return true;\n }\n } else if (maxDate) {\n if (!flatbizDate.gte(maxDate, currentDate)) {\n return true;\n }\n }\n\n if (!maxDays || (!dates?.[0] && !dates?.[1])) {\n return false;\n }\n\n const tooLate = dates?.[0] && current.diff(dates[0], 'days') > maxDays - 1;\n const tooEarly = dates?.[1] && dates[1].diff(current, 'days') > maxDays - 1;\n return !!tooEarly || !!tooLate;\n });\n\n const onOpenChange = (open: boolean) => {\n if (maxDays && maxDays > 0) {\n if (open) {\n setHackValue([null, null]);\n setDates([null, null]);\n } else {\n setHackValue(null);\n }\n }\n };\n\n return (\n <DatePicker.RangePicker\n format={format}\n {...otherProps}\n disabledDate={getDisabledDate}\n style={{ width: '100%', ...style }}\n value={hackValue || rangePickerValue}\n onChange={onChangeDate}\n onOpenChange={onOpenChange}\n onCalendarChange={(val) => setDates(val)}\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 { 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 { TPlainObject } from '@flatbiz/utils';\n\nexport type ModelState = {\n selectorList: TPlainObject[];\n // originalSelectorList: TPlainObject[];\n queryIsEmpty: boolean;\n requestStatus: 'init' | 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setSelectBoxList: { selectorList: TPlainObject[] };\n resetSelectBoxList: void;\n changeRequestStatus: ModelState['requestStatus'];\n};\n\nconst defaultState: ModelState = {\n selectorList: [],\n // originalSelectorList: [],\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.selectorList || [];\n // state.originalSelectorList = params.originalSelectorList || [];\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 { isArray, isNumber, isString } from '@dimjs/lang';\nimport { extend } from '@dimjs/utils';\nimport { isUndefinedOrNull, TPlainObject, valueIsEqual } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, Empty, message, Select, SelectProps } from 'antd';\nimport { DependencyList, forwardRef, ReactElement, useImperativeHandle, useMemo, useRef } from 'react';\nimport { useSafeState } from '../hooks';\nimport { useEffectCustom } from '../hooks/use-effect-custom';\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' | 'onChange'\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将失效\n * 2. 不支持异步数据,异步使用serviceConfig方式\n * 3. 如果配置fieldNames,会转换后使用\n * ```\n */\n selectorList?: TPlainObject[];\n /**\n * 通过服务获取数据后回调,当设置`selectorList`后无效果\n */\n onSelectorListChange?: (dataList: TPlainObject[]) => 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 // label渲染适配器\n onLabelRenderAdapter?: (dataItem: TPlainObject) => string | ReactElement;\n\n onChange?: (\n value?: string | number | string[] | number[],\n selectedList?: TPlainObject[] | TPlainObject,\n ) => void;\n};\n\nexport type SelectorWrapperRefApi = {\n onClearSelectorList: () => void;\n getSelectorList: () => TPlainObject[];\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将失效\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<any>();\n const [loading, setLoading] = useSafeState(false);\n const [state, actions] = selectorWrapperModel(modelKey).useStore();\n const requestPreKey = `request-pre-${props.modelKey}`;\n const fieldNamesMerge = extend(true, { label: 'label', value: 'value' }, fieldNames);\n\n const valueIsEmpty = (value: string | number) => {\n return value === '' || isUndefinedOrNull(value);\n };\n\n const serviceRespDataAdapter = (respData) => {\n const respDataList = newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData;\n return respDataList;\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 window[requestPreKey] = 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 respAdapterData = serviceRespDataAdapter(respData);\n setLoading(false);\n onSelectorListChange?.(respAdapterData);\n window[requestPreKey] = false;\n void actions.setSelectBoxList({\n selectorList: respAdapterData || [],\n });\n } catch (error) {\n console.error(error);\n setLoading(false);\n window[requestPreKey] = 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 // useEffectCustom(() => {\n // if (state.selectorList && state.requestStatus === 'request-success') {\n // onSelectorListChange?.(state.selectorList);\n // }\n // }, [state.selectorList, state.requestStatus]);\n\n useEffectCustom(() => {\n if (selectorList) {\n void actions.setSelectBoxList({\n selectorList: selectorList || [],\n });\n return;\n }\n if (isSearch) return;\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = selectorWrapperModel(modelKey).getState();\n if (\n newEffectDependencyList.length > 0 ||\n (!window[requestPreKey] && realTimeState.requestStatus !== 'request-success')\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数据(但changeOperateValueRef.current为复杂类型?)\n if (\n props.value !== changeOperateValueRef.current &&\n (isNumber(props.value) || isString(props.value))\n ) {\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 | string[] | number[], otherParams) => {\n changeOperateValueRef.current = value;\n const selectedList = isArray(otherParams) ? otherParams : otherParams ? [otherParams] : [];\n const targetList = state.selectorList.filter((item) => {\n const value = item[fieldNamesMerge.value];\n return selectedList.filter((temp) => temp.value === value).length > 0;\n });\n if (valueIsEqual(props.mode, ['multiple', 'tags'])) {\n props.onChange?.(value, targetList);\n } else {\n props.onChange?.(value, targetList?.[0]);\n }\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 const value = item[fieldNamesMerge.value];\n const label = item[fieldNamesMerge.label];\n return (\n <Select.Option value={value} label={label} key={value}>\n {props.onLabelRenderAdapter ? props.onLabelRenderAdapter(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, TPlainObject } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Form, Tag } from 'antd';\nimport { Fragment, useEffect, useState } 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 const [selectorList, setSelectorList] = useState<LabelValueItem[]>([]);\n const [viewLabelList, setviewLabelList] = useState<LabelValueItem[]>([]);\n\n useEffect(() => {\n if (!editable) {\n const value = isArray(props.value) ? props.value : props.value === undefined ? [] : [props.value];\n if (selectorList.length === 0) {\n setviewLabelList(value.map((item) => ({ label: item as string, 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: String(item), value: item });\n });\n setviewLabelList(returnList);\n }\n }, [editable, editableComptProps.fieldNames, props.value, selectorList]);\n\n const onSelectorListChange = hooks.useCallbackRef((dataList: TPlainObject[]) => {\n setSelectorList(arrayField2LabelValue(dataList || [], editableComptProps.fieldNames));\n });\n\n if (editable) {\n return (\n <SelectorWrapper\n {...editableComptProps}\n value={props.value}\n onChange={props.onChange}\n onSelectorListChange={onSelectorListChange}\n />\n );\n }\n return (\n <Fragment>\n <div style={{ display: 'none' }}>\n <SelectorWrapper {...editableComptProps} onSelectorListChange={onSelectorListChange} />\n </div>\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 </Fragment>\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, Typography } 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 const viewText = props.fieldConfig?.render?.(props.value) || value;\n return (\n <Typography.Paragraph\n className=\"editable-text-view\"\n ellipsis={isString(viewText) ? { tooltip: viewText } : true}\n >\n {viewText}\n </Typography.Paragraph>\n );\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 props.onUploadChange?.(info);\n // 此处不执行 setUploadList([...fileList]);\n return;\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 * 渲染中间件,如果renderMiddleware返回值为ReactElement格式,则会终止后续逻辑,fieldConfig配置将失效\n * ```\n * 1. tableRowIndex: 当前row的索引值\n * 2. name: 当前table单元格的form.item的name值\n * 3. operation Form.List的操作函数\n * ```\n */\n renderMiddleware?: (item: {\n tableRowIndex: number;\n name: string | number | Array<string | number>;\n operation: FormListOperation;\n }) => ReactElement | null;\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, renderMiddleware, ...otherColumnItem } = columnItem;\n return {\n onCell: () => {\n return {\n valign: props.tableProps?.cellVerticalAlign || 'middle',\n };\n },\n ...otherColumnItem,\n render: (_value, record) => {\n const completeName = columnItem.dataIndex\n ? [...props.name, record.name, columnItem.dataIndex]\n : [...props.name, record.name];\n const customRender = renderMiddleware?.({\n name: completeName,\n tableRowIndex: record.name,\n operation: record.operation,\n });\n if (customRender) {\n return customRender;\n }\n return (\n <FormListItem\n name={columnItem.dataIndex ? [record.name, columnItem.dataIndex] : [record.name]}\n completeName={completeName}\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 { TPlainObject } from '@flatbiz/utils';\nimport { Editor, hooks } from '@wove/react';\nimport { useState } from 'react';\nimport { useEffectCustom } from '../hooks';\nimport './style.less';\n\nexport type EditorWrapperProps = {\n onChange: (data?: string) => void;\n value?: string;\n editorProps?: TPlainObject;\n};\n\n/**\n * 富文本编辑器,配置参考tinymce\n * @param props\n * @returns\n */\nexport const EditorWrapper = (props) => {\n const [key, setKey] = useState(0);\n const [inputValue, setInputValue] = useState();\n\n const onChange = hooks.useCallbackRef((e) => {\n const content = e.target.$()?.html();\n const respValue = content ? content : undefined;\n setInputValue(respValue);\n props.onChange?.(respValue);\n });\n\n useEffectCustom(() => {\n if (props.value !== inputValue) {\n setKey(Date.now());\n }\n }, [props.value]);\n\n return (\n <div key={key} className=\"v-editor-wrapper\">\n <Editor\n initialValue={props.value}\n init={{\n menubar: true,\n language: 'zh_CN',\n height: '500px',\n paste_retain_style_properties: 'all',\n table_default_styles: {\n width: '100%',\n },\n plugins:\n ' advlist lists image charmap preview' +\n ' visualblocks code fullscreen' +\n ' media table paste help wordcount',\n toolbar:\n ' undo redo | formatselect | ' +\n ' bold italic backcolor bullist numlist | outdent indent alignleft aligncenter alignright alignjustify | textmark untextmark code preview |' +\n ' removeformat | help',\n fontsize_formats: '8px 10px 12px 14px 16px 18px 24px 36px 48px',\n }}\n cdnTinyMce=\"https://file.40017.cn/tcsk/tinymce/tinymce.min.js\"\n {...props.editorProps}\n onChange={onChange}\n />\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 width?: number;\n className?: string;\n style?: CSSProperties;\n inline?: boolean;\n};\n\n/**\n * 间隙组件\n * @param props\n * @returns\n */\nexport const Gap: VFC<GapProps> = (props) => {\n return (\n <div\n style={{\n height: props.height,\n ...props.style,\n display: props.inline ? 'inline-block' : 'block',\n width: props.width,\n }}\n className={props.className}\n />\n );\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 | React.ReactElement;\n icon?: React.ReactNode;\n style?: CSSProperties;\n text?: string | React.ReactElement;\n className?: string;\n size?: 'small' | 'middle' | 'large';\n onClick?: (event) => void;\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 onClick={props.onClick}\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 label_align_left: 'form-label-align-left',\n label_align_right: 'form-label-align-right',\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 label_align_left: 'form-item-label-align-left',\n label_align_right: 'form-item-label-align-right',\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 titleLeftLine?: boolean;\n};\n\n/**\n * 简单布局\n * @param props\n * @returns\n * ```\n * 1. layoutType 布局类型\n * layer:分层布局\n * 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 const titleClassName = classNames('simple-layout-title', {\n 'simple-layout-title-sign': props.titleLeftLine,\n });\n\n return (\n <div className={className} style={props.style}>\n {props.title ? <div className={titleClassName}>{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\nSimpleLayout.defaultProps = {\n titleLeftLine: true,\n layoutType: 'layer',\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 { TPlainObject, TSetDefaultDefined } from '@flatbiz/utils';\nimport { TreeSelectProps } from 'antd';\n\nexport type ModelState = {\n treeSelectorList: TSetDefaultDefined<TreeSelectProps['treeData'], []>;\n treeSelectorTiledArray: TPlainObject[];\n queryIsEmpty: boolean;\n requestStatus?: 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setSelectBoxList: {\n treeSelectorList: ModelState['treeSelectorList'];\n treeSelectorTiledArray: ModelState['treeSelectorTiledArray'];\n };\n resetSelectBoxList: void;\n changeRequestStatus: ModelState['requestStatus'];\n};\n\nconst defaultState: ModelState = {\n treeSelectorList: [],\n treeSelectorTiledArray: [],\n queryIsEmpty: false,\n};\n\nconst TreeSelectorWrapperModel: ModelType<ModelState, ModelActionParams> = {\n actions: {\n setSelectBoxList: (params) => {\n return (state) => {\n state.treeSelectorList = params.treeSelectorList || [];\n state.treeSelectorTiledArray = params.treeSelectorTiledArray || [];\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, isObject } from '@dimjs/lang';\nimport { extend } from '@dimjs/utils';\nimport { isUndefinedOrNull, TPlainObject, treeToArray } 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 { useSafeState } from '../hooks';\nimport { useEffectCustom } from '../hooks/use-effect-custom';\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' | 'onChange'\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 * 添加全部选项\n * ```\n * 1. showAllOption = true,添加默认全部选项(value值为空字符串)\n * 2. 可自定义全部选项,例如:{ label: '全部', value: 'all' }\n * 3. 自定义字段会通过fieldNames转换后使用\n * 4. 多选操作时,最好不要设置全部选项\n * ```\n */\n showAllOption?: true | TPlainObject<string | number>;\n onChange?: (\n selectedValueList?: Array<string | number> | string | number,\n selectedList?: TPlainObject[] | TPlainObject,\n ) => 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] = useSafeState(false);\n const [treeExpandedKeys, setTreeExpandedKeys] = useState<React.Key[]>();\n const [state, actions] = treeSelectorWrapperModel(modelKey).useStore();\n const requestPreKey = `request-pre-${props.modelKey}`;\n const fieldNames = useMemo(() => {\n return { label: 'label', value: 'value', children: 'children', ...props.fieldNames };\n }, [props.fieldNames]);\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(`TreeSelectorWrapper组件:参数:${requiredParamsKeys.join('、')}不能为空`);\n return;\n }\n }\n try {\n setLoading(true);\n window[requestPreKey] = 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 window[requestPreKey] = false;\n void actions.setSelectBoxList({\n treeSelectorList: respData || [],\n treeSelectorTiledArray: treeToArray(respData || [], fieldNames.children),\n });\n } catch (error) {\n setLoading(false);\n window[requestPreKey] = 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 (state.treeSelectorList && state.requestStatus === 'request-success') {\n onTreeSelectorListChange?.(state.treeSelectorList);\n }\n }, [state.treeSelectorList, state.requestStatus]);\n\n useEffectCustom(() => {\n if (treeSelectorList) {\n void actions.setSelectBoxList({\n treeSelectorList: treeSelectorList,\n treeSelectorTiledArray: treeToArray(treeSelectorList || [], fieldNames.children),\n });\n return;\n }\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = treeSelectorWrapperModel(modelKey).getState();\n if (\n newEffectDependencyList.length > 0 ||\n (!window[requestPreKey] && realTimeState.requestStatus !== 'request-success')\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 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, fieldNames, props.value]);\n\n useImperativeHandle(ref, () => {\n return {\n onClearSelectorList: () => {\n void actions.setSelectBoxList({\n treeSelectorList: [],\n treeSelectorTiledArray: [],\n });\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 const treeData = useMemo(() => {\n if (state.treeSelectorList.length === 0) return undefined;\n if (props.showAllOption === true) {\n const selectOptionsAll = {\n [`${fieldNames.label}`]: '全部',\n [`${fieldNames.value}`]: '',\n } as unknown as ModelState['treeSelectorList'][0];\n return [selectOptionsAll, ...state.treeSelectorList];\n } else if (isObject(props.showAllOption)) {\n return [\n props.showAllOption as unknown as ModelState['treeSelectorList'][0],\n ...state.treeSelectorList,\n ];\n }\n return state.treeSelectorList;\n }, [fieldNames, props.showAllOption, state.treeSelectorList]);\n\n const onChange = hooks.useCallbackRef((changeValue: Array<string | number> | string | number) => {\n const valueList = isArray(changeValue) ? changeValue : changeValue ? [changeValue] : [];\n const selectedList =\n valueList.length > 0\n ? state.treeSelectorTiledArray.filter((item) => {\n return !!valueList.find((temp) => temp === item[fieldNames.value]);\n })\n : [];\n if (isArray(changeValue)) {\n props.onChange?.(changeValue || [], selectedList);\n } else {\n props.onChange?.(changeValue, selectedList?.[0]);\n }\n });\n\n return (\n <TreeSelect\n dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}\n showSearch={true}\n treeLine={true}\n treeNodeFilterProp={fieldNames.label}\n {...otherProps}\n onChange={onChange as TreeSelectProps['onChange']}\n value={isUndefinedOrNull(props.value) ? undefined : props.value}\n treeExpandedKeys={treeExpandedKeys}\n treeData={treeData}\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 { isArray } from '@dimjs/lang';\nimport { API, ModelType } from '@dimjs/model';\nimport { Model } from '@dimjs/model-react';\nimport { TPlainObject, treeToArray, TSetDefaultDefined } from '@flatbiz/utils';\nimport { TreeProps } from 'antd';\n\nexport type ModelState = {\n treeList: TSetDefaultDefined<TreeProps['treeData'], []>;\n treeTiledArray: TPlainObject[];\n queryIsEmpty: boolean;\n requestStatus?: 'request-pre' | 'request-success' | 'request-error';\n};\n\ntype ModelActionParams = {\n setTreeList: {\n treeList: ModelState['treeList'];\n childrenName: string;\n };\n resetTreeList: void;\n changeRequestStatus: ModelState['requestStatus'];\n treeListAppendChildren: {\n value: string | number;\n appendList: TPlainObject[];\n childrenName: string;\n valueName: string;\n };\n};\n\nconst defaultState: ModelState = {\n treeList: [],\n treeTiledArray: [],\n queryIsEmpty: false,\n};\n\nconst TreeWrapperModel: ModelType<ModelState, ModelActionParams> = {\n actions: {\n setTreeList: (params) => {\n return (state) => {\n state.treeList = params.treeList || [];\n state.treeTiledArray = treeToArray(state.treeList, params.childrenName);\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 if (params === 'request-error') {\n state.treeList = [];\n }\n };\n },\n treeListAppendChildren: (params) => {\n return (state) => {\n const array = treeToArray(state.treeList, params.childrenName);\n const target = array.find((item) => item[params.valueName] === params.value);\n if (target) {\n if (isArray(params.appendList) && params.appendList.length > 0) {\n target[params.childrenName] = params.appendList;\n } else {\n target.isLeaf = true;\n }\n }\n state.treeTiledArray = treeToArray(state.treeList, params.childrenName);\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 { CaretDownFilled, MoreOutlined } from '@ant-design/icons';\nimport { isArray } from '@dimjs/lang';\nimport { cloneState } from '@dimjs/model';\nimport { classNames, extend } from '@dimjs/utils';\nimport { isUndefinedOrNull, TPlainObject, treeToTiledArray } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { Button, Empty, Input, message, Spin, Tree, TreeProps } from 'antd';\nimport {\n DependencyList,\n forwardRef,\n Fragment,\n ReactElement,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { DropdownMenuItem, DropdownMenuWrapper } from '../dropdown-menu-wrapper';\nimport { useSafeState } from '../hooks';\nimport { useEffectCustom } from '../hooks/use-effect-custom';\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};\ntype TreeLoadDataServiceConfig = {\n getParams: (dataItem: TPlainObject) => TPlainObject;\n onRequest: (params: TPlainObject) => any;\n /**\n * 响应数据适配器\n */\n onRequestResultAdapter?: (respData: any) => TPlainObject[];\n};\n\nexport type TreeWrapperMenuItem = {\n title: string;\n onClick: (dataItem: TPlainObject, event) => void;\n icon?: ReactElement;\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 | 'multiple'\n> & {\n modelKey: string;\n effectDependencyList?: DependencyList;\n /**\n * 请求服务需求的数据,当设置`selectorTreeList`后无效果\n */\n serviceConfig?: TreeServiceConfig;\n loadDataServiceConfig?: TreeLoadDataServiceConfig;\n /**\n * 当设置selectorTreeList后,serviceConfig将失效\n * ```\n * 1. 不支持异步数据,异步使用serviceConfig方式\n * ```\n */\n selectorTreeList?: TreeProps['treeData'];\n /**\n * 通过服务获取数据后回调,当设置`selectorList`后无效果\n */\n onSelectorTreeListChange?: (dataList: TPlainObject[]) => void;\n value?: string | number | Array<string | number>;\n onChange?: (\n selectedKey?: string | number | Array<string | number>,\n selectedList?: TPlainObject[] | TPlainObject,\n ) => void;\n fieldNames?: { label?: string; value?: string; children?: string };\n /**\n * 搜索关键字,打开tree折叠过滤关键字\n */\n searchValue?: string;\n /**\n * checkable模式下,onChange是否返回父节点,默认值true\n */\n checkableResponseParentNode?: boolean;\n loadDataFlag?: boolean;\n getMenuOptions?: (dataItem: TPlainObject) => DropdownMenuItem[];\n showSearch?: boolean;\n onSearchValueChange?: (searchValue?: string) => void;\n searchPlaceholder?: 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将失效\n * 2. checkable=true,为多选模式\n * 3. 设置value后,组件显示受控\n * 4. 设置loadDataFlag=true,会动态获取children,当dataItem中包含isLeaf=true字段,表示为叶子节点,没有children了\n * ```\n */\nexport const TreeWrapper = forwardRef<TreeWrapperRefApi, TreeWrapperProps>((props, ref) => {\n const {\n serviceConfig,\n effectDependencyList,\n selectorTreeList,\n value,\n onChange,\n modelKey,\n checkableResponseParentNode = true,\n checkable,\n onSelectorTreeListChange,\n searchValue,\n showSearch,\n searchPlaceholder,\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] = useSafeState(false);\n const requestPreKey = `request-pre-${props.modelKey}`;\n const fieldNames = useMemo(() => {\n return { label: 'label', value: 'value', children: 'children', ...props.fieldNames };\n }, [props.fieldNames]);\n const isControl = useRef(props.hasOwnProperty('value'));\n // tree 搜索值\n const [treeSearchValue, setTreeSearchValue] = useState<string>();\n // search输入框回填值\n const [searchInputValue, setSearchInputValue] = useState<string>();\n // 由于存在节流操作 treeSearchValue与searchInputValue不是同一个值\n\n useEffectCustom(() => {\n setTreeSearchValue(searchValue);\n setSearchInputValue(searchValue);\n }, [searchValue]);\n\n const valueList = useMemo(() => {\n if (isUndefinedOrNull(value)) return undefined;\n return (isArray(value) ? value : [value]) as Array<string | number>;\n }, [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 window[requestPreKey] = true;\n const _respData = await newServiceConfig.onRequest?.(params);\n const respData = serviceResponseHandle(_respData) as TreeProps['treeData'];\n void actions.setTreeList({\n treeList: respData || [],\n childrenName: fieldNames.children,\n });\n onSelectorTreeListChange?.(respData as TPlainObject[]);\n setLoading(false);\n window[requestPreKey] = false;\n } catch (error) {\n window[requestPreKey] = false;\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({\n treeList: selectorTreeList || [],\n childrenName: fieldNames.children,\n });\n return;\n }\n // 当无依赖项时,如果存在缓存数据,就不在调用接口\n const realTimeState = treeWrapperModel(modelKey).getState();\n\n if (\n newEffectDependencyList.length > 0 ||\n (!window[requestPreKey] && realTimeState.requestStatus !== 'request-success')\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, 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, fieldNames]);\n\n hooks.useUpdateEffect(() => {\n if (treeSearchValue) {\n const tiledArray = treeToTiledArray(state.treeList || [], fieldNames);\n const targetList = tiledArray.filter((item) => item.label?.includes(treeSearchValue || ''));\n let expandedKeys = [] as Array<string | number>;\n targetList.map((tempItem) => {\n const targetValues = getExpandedKeys(tempItem.value as string, state.treeList || [], fieldNames);\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 }, [treeSearchValue]);\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\n const onChangeHandle = hooks.useCallbackRef((checkedKeys) => {\n const checkedValueList = isArray(checkedKeys) ? checkedKeys : checkedKeys ? [checkedKeys] : [];\n const selectedList: TPlainObject[] = [];\n checkedValueList.map((item) => {\n const target = state.treeTiledArray.find((temp) => {\n return item === temp[fieldNames.value];\n });\n if (target) {\n selectedList.push(cloneState(target));\n }\n });\n\n if (checkable) {\n if (!checkableResponseParentNode) {\n // checkedKeys中含有父节点 是否返回\n const checkedList = selectedList?.filter(\n (item) => !(isArray(item[fieldNames.children]) && item[fieldNames.children].length > 0),\n );\n onChange?.(\n checkedList.map((item) => item[fieldNames.value]),\n checkedList,\n );\n } else {\n onChange?.(checkedKeys, selectedList);\n }\n } else {\n const currentNode = selectedList[selectedList.length - 1];\n if (currentNode) {\n onChange?.(currentNode[fieldNames.value], currentNode);\n } else {\n onChange?.(undefined);\n }\n }\n });\n\n const onCheck = hooks.useCallbackRef((checkedKeys) => {\n onChangeHandle?.(checkedKeys);\n });\n\n const onSelect = hooks.useCallbackRef((checkedKeys) => {\n onChangeHandle?.(checkedKeys);\n });\n\n const treeFieldNames = useMemo(() => {\n return { title: fieldNames.label, key: fieldNames.value, children: fieldNames.children };\n }, [fieldNames]);\n\n const treeData = useMemo(() => {\n if (treeSearchValue === '' || isUndefinedOrNull(treeSearchValue)) return state.treeList;\n const loop = (data: any[]): any[] =>\n data.map((item) => {\n const strTitle = item[fieldNames.label] as string;\n const index = strTitle.indexOf(treeSearchValue!);\n const beforeStr = strTitle.substring(0, index);\n const afterStr = strTitle.slice(index + treeSearchValue!.length);\n const title =\n index > -1 ? (\n <span>\n {beforeStr}\n <span className=\"site-tree-search-value\">{treeSearchValue}</span>\n {afterStr}\n </span>\n ) : (\n <span>{strTitle}</span>\n );\n if (item[fieldNames.children]) {\n return {\n ...item,\n [fieldNames.label]: title,\n _treeItemName: strTitle,\n [fieldNames.children]: loop(item[fieldNames.children]),\n };\n }\n\n return {\n ...item,\n [fieldNames.label]: title,\n };\n });\n const list = cloneState(state.treeList || []);\n return loop(list);\n }, [fieldNames.children, fieldNames.label, treeSearchValue, state.treeList]);\n\n const loadData = hooks.useCallbackRef((dataItem: TPlainObject) => {\n return new Promise<void>(async (resolve, reject) => {\n if (dataItem[fieldNames.children]) {\n resolve();\n return;\n }\n try {\n const respData = await props.loadDataServiceConfig?.onRequest?.(\n props.loadDataServiceConfig?.getParams?.(dataItem),\n );\n const respDataList = (\n newServiceConfig.onRequestResultAdapter\n ? newServiceConfig.onRequestResultAdapter(respData as unknown as TPlainObject)\n : respData\n ) as TPlainObject[];\n void actions\n .treeListAppendChildren({\n value: dataItem[fieldNames.value],\n appendList: respDataList,\n childrenName: fieldNames.children,\n valueName: fieldNames.value,\n })\n .then((allState) => {\n onSelectorTreeListChange?.(allState.treeList as TPlainObject[]);\n resolve();\n });\n } catch (error) {\n void message.error(error.message || '数据加载异常...');\n // 此处失败后,会重试“loadData”请求多次\n reject();\n }\n });\n });\n\n const titleRender = hooks.useCallbackRef((nodeData) => {\n const children = nodeData?.[fieldNames.children];\n // 当loadDataFlag=true,考虑叶子节点显示问题\n const loadDataFlag = props.loadDataFlag;\n const loadHasChildren = loadDataFlag ? !nodeData.isLeaf : false;\n const hasChildren = (children && children.length > 0) || loadHasChildren;\n const menuOptions = props.getMenuOptions?.({\n ...nodeData,\n [fieldNames.label]: nodeData._treeItemName || nodeData[fieldNames.label],\n });\n const className = classNames({\n 'tree-parent-icon': hasChildren,\n 'tree-child-icon': !hasChildren,\n });\n\n if (!menuOptions || menuOptions.length === 0) {\n return (\n <Fragment>\n <span className={className} />\n {nodeData?.[fieldNames.label]}\n </Fragment>\n );\n }\n\n return (\n <Fragment>\n <span className={className} />\n {nodeData?.[fieldNames.label]}\n <DropdownMenuWrapper menuList={menuOptions}>\n <MoreOutlined />\n </DropdownMenuWrapper>\n </Fragment>\n );\n });\n\n const onChangeDebounce = hooks.useDebounceCallback((value: string) => {\n setTreeSearchValue(value);\n props.onSearchValueChange?.(value);\n }, 300);\n\n const onSearchChange = hooks.useCallbackRef((e: React.ChangeEvent<HTMLInputElement>) => {\n setSearchInputValue(e.target.value);\n onChangeDebounce(e.target.value);\n });\n const onSearch = hooks.useCallbackRef((value: string) => {\n setSearchInputValue(value);\n onChangeDebounce(value);\n });\n\n if (state.treeList.length > 0 && state.requestStatus !== 'request-error') {\n const commonProps = {\n showLine: { showLeafIcon: false },\n titleRender,\n blockNode: true,\n switcherIcon: <CaretDownFilled />,\n ...otherProps,\n fieldNames: treeFieldNames,\n expandedKeys: treeExpandedKeys,\n treeData,\n onExpand,\n loadData: props.loadDataFlag ? loadData : undefined,\n style: { width: '100%', ...otherProps.style },\n };\n\n const checkedProps = {\n onCheck,\n checkable,\n };\n\n const selectedProps = {\n onSelect,\n multiple: false,\n };\n if (isControl.current) {\n checkedProps['checkedKeys'] = valueList;\n selectedProps['selectedKeys'] = valueList;\n }\n const sceneProps = checkable ? checkedProps : selectedProps;\n return (\n <div className=\"v-tree-wrapper\">\n <Spin spinning={loading} className=\"v-tree-wrapper-loading\"></Spin>\n {showSearch ? (\n <Input.Search\n className=\"v-tree-wrapper-search\"\n style={{ marginBottom: 12 }}\n placeholder={searchPlaceholder}\n onChange={onSearchChange}\n value={searchInputValue}\n onSearch={onSearch}\n allowClear\n />\n ) : null}\n <Tree {...sceneProps} {...commonProps} className=\"v-tree-wrapper-tree\"></Tree>\n </div>\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","isArray","hasPermission","name","includes","Permission","props","_jsx","Fragment","children","DropdownMenuWrapper","menuList","dropdownOtherProps","_excluded","menuItems","useState","visible","_useState","setVisible","loading","_useState2","setLoading","onConfirmtTriggerClick","_hooks","useCallbackRef","event","stopPropagation","onConfirm","item","result","onClick","_isPromise","finally","forEach","index","text","color","permission","needConfirm","confirmMessage","hidden","type","style","popconfirmProps","otherProps","_excluded2","newStyle","_extends","buttonType","nromal","key","label","_createElement","Button","size","confirm","Popconfirm","okText","cancelText","trigger","destroyTooltipOnHide","title","bind","onCancel","arrowPointAtCenter","overlayStyle","zIndex","okButtonProps","danger","disabled","push","Dropdown","arrow","pointAtCenter","overlay","Menu","items","onVisibleChange","_visible","console","log","ButtonOperate","foldList","useMemo","operateList","filter","has","isFold","viewList","className","_jsxs","Space","split","Divider","wrap","_isUndefined","map","placement","undefined","createElement","length","foldIcon","jsx","_MoreOutlined","defaultProps","useEffectCustom","fn","deps","useEffect","useEffectCustomAsync","asyncFunction","Promise","$return","$error","then","$await_1","$boundEx","useSafeState","initialState","state","setState","isMounted","useIsMounted","value","current","defaultState","selectorList","queryIsEmpty","requestStatus","_SelectorWrapperModel","actions","setSelectBoxList","params","changeRequestStatus","cascaderWrapperModels","cascaderWrapperModel","Model","CascaderWrapper","forwardRef","ref","serviceConfig","modelKey","fieldNames","isDynamicLoad","options","setOptions","newServiceConfig","_useSafeState","_cascaderWrapperModel","useStore","requestPreKey","fieldNamesMerge","_extend","extend","serviceRespDataAdapter","respData","respDataList","onRequestResultAdapter","startDataSourceRequest","_respData","respAdapterData","onRequest","Error","$Try_1_Post","$Try_1_Catch","error","window","message","resolve","$await_2","isLeaf","cloneState","useImperativeHandle","getCascaderList","onAgainRequest","loadData","selectedOptions","targetOption","$await_3","concat","Cascader","showSearch","allowClear","notFoundContent","NotFoundContent","suffixIcon","_RedoOutlined","spin","description","Empty","image","PRESENTED_IMAGE_SIMPLE","DatePickerWrapper","onChange","format","showTime","onChangeDate","date","dateString","getDisabledDate","currentDate","disabledDateConfig","minDate","maxDate","flatbizDate","in","gte","datePickerValue","moment","dateNormalize","DatePicker","disabledDate","width","DateRangePickerWrapper","_props$disabledDateCo","maxDays","dates","setDates","hackValue","setHackValue","date1","_ref","date2","rangePickerValue","newDate1","newDate2","dateStrings","tooLate","diff","tooEarly","onOpenChange","open","RangePicker","onCalendarChange","val","DrawerModel","openDrawerForm","itemData","operateType","pageLoading","closeDrawer","setDrawerItemData","DrawerOperation","cancelButtonProps","hideOkBtn","icon","_SaveOutlined","onOk","PageLoader","jsxs","DrawerWraper","_props$width","footer","operationProps","Drawer","_classNames","keyboard","forceRender","destroyOnClose","contentWrapperStyle","maxWidth","drawerModels","createDrawerWraperModel","DrawerWrapperContent","DrawerWrapperFooter","DrawerWrapper","Content","Footer","createDrawerWrapperModel","getEditable","editable","tableRowIndex","CheckboxGroupFormItemContent","fieldConfig","editableConfig","render","editableComptProps","viewLabelList","returnList","target","find","temp","Checkbox","Group","tag","Tag","CheckboxGroupFormItem","formItemProps","Form","Item","DatePickerWrapperFormItem","FormItemContent","viewLabel","join","DateRangePickerWrapperFormItem","InputFormItem","Input","InputNumberFormItem","InputNumber","RadioGroupFormItemContent","e","Radio","RadioGroupFormItem","resetSelectBoxList","selectorWrapperModels","selectorWrapperModel","SelectorWrapper","showAllOption","effectDependencyList","onSelectorListChange","searchFieldName","isSearch","newEffectDependencyList","changeOperateValueRef","useRef","_selectorWrapperModel","valueIsEmpty","isUndefinedOrNull","inputValue","searchId","requiredParamsKeys","_params","isEmpty","keyword","warn","$Try_2_Post","$Try_2_Catch","realTimeState","getState","_isNumber","isNumber","_isString","onClearSelectorList","getSelectorList","filterOption","input","option","_option$children","toLowerCase","indexOf","onSearch","useDebounceCallback","otherParams","selectedList","targetList","valueIsEqual","mode","selectOptionsAll","Select","Option","onLabelRenderAdapter","setSelectorList","setviewLabelList","String","dataList","arrayField2LabelValue","display","SelectorWrapperFormItem","FormItemTextContent","_props$fieldConfig2","_props$fieldConfig3","_props$fieldConfig","isBaseData","_isBoolean","JSON","stringify","viewText","Typography","Paragraph","ellipsis","tooltip","TextFormItem","noStyle","TextAreaFormItem","TextArea","UploadWrapper","onUploadError","uploadList","setUploadList","uid","url","onUploadChange","info","fileList","file","status","response","code","data","maxCount","targetIndex","findIndex","tempUid","splice","Upload","classNames","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","renderMiddleware","otherColumnItem","onCell","_props$tableProps","valign","tableProps","cellVerticalAlign","_value","record","dataIndex","customRender","operation","rules","formListOperation","onTableBeforeRender","Table","scroll","x","pagination","dataSource","rowKey","onTableAfterRender","block","_PlusOutlined","EditorWrapper","setKey","setInputValue","_e$target$$","content","$","html","respValue","Date","now","_Editor","Editor","initialValue","init","menubar","language","height","paste_retain_style_properties","table_default_styles","plugins","toolbar","fontsize_formats","cdnTinyMce","editorProps","FileImport","onImportFinish","showUploadList","accept","FileUpload","onPreview","uploadValue","setUploadValue","fileKey","fileName","thumbUrl","uploadItem","onUploadPreview","FlexLayout","childrens","direction","gap","fullIndexList","fullIndex","childrenStyle","flex","marginRight","marginBottom","cloneElement","Gap","inline","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","label_align_left","label_align_right","formItemClassName","preDefinedClassName","form","formItem","SimpleLayout","labelAlign","formLabelAlign","layoutType","titleClassName","titleLeftLine","desc","SmsCountDown","showMessage","setShowMessage","running","setRunning","starting","_useState3","setStarting","initConfig","sendTxt","sentTxt","processingTxt","autoStart","totalTicks","duration","countdownFnc","useCountdownCallback","num","second","replace","onTick","intervalTime","onStart","onSendRequest","catch","overdueConsole","TableFilterLayout","isFixed","Children","Condition","Operate","treeSelectorList","treeSelectorTiledArray","TreeSelectorWrapperModel","treeSelectorWrapperModels","treeSelectorWrapperModel","getExpandedKeys","treeList","tiledArray","treeToTiledArray","treeLeafParentsArray","TreeSelectorWrapper","onTreeSelectorListChange","treeExpandedKeys","setTreeExpandedKeys","_treeSelectorWrapperM","serviceResponseHandle","_respData2","treeToArray","valueList","expandedKeys","tempValue","prev","mergeList","Array","Set","getTreeSelectorList","onTreeExpand","treeData","_selectOptionsAll","_isObject","isObject","changeValue","TreeSelect","dropdownStyle","maxHeight","overflow","treeLine","treeNodeFilterProp","treeTiledArray","TreeWrapperModel","setTreeList","childrenName","resetTreeList","treeListAppendChildren","array","valueName","appendList","treeWrapperModels","treeWrapperModel","TreeWrapper","selectorTreeList","checkableResponseParentNode","_props$checkableRespo","checkable","onSelectorTreeListChange","searchValue","searchPlaceholder","_treeWrapperModel$use","isControl","hasOwnProperty","treeSearchValue","setTreeSearchValue","searchInputValue","setSearchInputValue","$await_4","useUpdateEffect","_item$label","tempItem","targetValues","getTreeDataList","onExpand","onChangeHandle","checkedKeys","checkedValueList","checkedList","currentNode","onCheck","onSelect","treeFieldNames","loop","_extends3","strTitle","beforeStr","substring","afterStr","slice","_extends2","_treeItemName","list","dataItem","reject","_props$loadDataServic","_props$loadDataServic2","_respData3","$Try_3_Post","$Try_3_Catch","loadDataServiceConfig","getParams","$await_5","allState","titleRender","nodeData","_extends4","loadDataFlag","loadHasChildren","hasChildren","menuOptions","getMenuOptions","onChangeDebounce","onSearchValueChange","onSearchChange","commonProps","showLine","showLeafIcon","blockNode","switcherIcon","_CaretDownFilled","checkedProps","selectedProps","multiple","sceneProps","Spin","spinning","Search","placeholder","Tree"],"mappings":";wtCAIO,IAAMA,EAASC,EAAAA,qYCATC,IAAAA,EAAoB,SAApBA,IACX,IAAAC,EAA0BC,EAAAA,gBAAlBC,IAAAA,cACR,IAAMC,EAA2BC,EAAAC,QAAQH,GAAiBA,EAAgB,GAC1E,OAAOC,OAGIG,EAAgB,SAAhBA,EAAiBC,GAC5B,IAAMJ,EAAiBJ,IACvB,GAAII,EAAeK,SAASD,GAAO,CACjC,OAAO,KAET,OAAO,WAMIE,EAAkC,SAAlCA,EAAmCC,GAC9C,IAAMP,EAAiBJ,IACvB,GAAII,EAAeK,SAASE,EAAMH,MAAO,CACvC,OAAOI,EAAAA,IAACC,EAAAA,SAAD,CAAAC,SAAWH,EAAMG,WAE1B,OAAO,gJCHIC,EAAoD,SAApDA,EAAqDJ,GAChE,IAAQK,EAAoCL,EAApCK,SAAaC,IAAuBN,EAA5CO,GACA,IAAMC,EAAwB,GAC9B,IAA8BC,EAAAA,EAAQA,SAAC,OAAhCC,EAAPC,EAAA,GAAgBC,EAAhBD,EAAA,GACA,IAA8BF,EAAAA,EAAQA,SAAC,OAAhCI,EAAPC,EAAA,GAAgBC,EAAhBD,EAAA,GAEA,IAAME,EAAyBC,EAAAA,MAAMC,gBAAe,SAACC,GACnDA,EAAMC,kBACNR,EAAW,SAGb,IAAMS,EAAYJ,EAAMC,MAAAA,gBAAe,SAACI,EAAwBH,GAC9DA,EAAMC,kBACN,IAAMG,EAASD,EAAKE,SAALF,UAAAA,EAAAA,EAAKE,QAAUL,GAC9B,GAAII,GAAUE,YAAUF,GAAS,CAC/BR,EAAW,MACXQ,EAAOG,SAAQ,WACbd,EAAW,OACXG,EAAW,UAEb,OAEFH,EAAW,UAGbP,EAASsB,SAAQ,SAACL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