@flatbiz/antd 5.0.54 → 5.0.56

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.
Files changed (104) hide show
  1. package/dist/cascader-wrapper/index.css +1 -1
  2. package/dist/cascader-wrapper/index.js +3 -3
  3. package/dist/{cascader-wrapper-CMYrmR6L.js → cascader-wrapper-DcAI5V70.js} +2 -2
  4. package/dist/{cascader-wrapper-CMYrmR6L.js.map → cascader-wrapper-DcAI5V70.js.map} +1 -1
  5. package/dist/{cell-render-1gunNiMm.js → cell-render-Dgbpd4Zn.js} +3 -2
  6. package/dist/cell-render-Dgbpd4Zn.js.map +1 -0
  7. package/dist/{color-picker-D8Tiiut0.js → color-picker-CaMpidJU.js} +2 -2
  8. package/dist/color-picker-CaMpidJU.js.map +1 -0
  9. package/dist/color-picker-wrapper/index.d.ts +1 -1
  10. package/dist/color-picker-wrapper/index.js +1 -1
  11. package/dist/{date-picker-wrapper-D0_g483p.js → date-BpBhtJIk.js} +2 -1
  12. package/dist/date-BpBhtJIk.js.map +1 -0
  13. package/dist/date-picker-wrapper/index.d.ts +4 -2
  14. package/dist/date-picker-wrapper/index.js +1 -1
  15. package/dist/date-range-picker-wrapper/index.d.ts +3 -2
  16. package/dist/date-range-picker-wrapper/index.js +1 -1
  17. package/dist/{date-range-picker-wrapper-BYOsf0I5.js → date-range-picker-wrapper-DMQLIXbV.js} +2 -1
  18. package/dist/date-range-picker-wrapper-DMQLIXbV.js.map +1 -0
  19. package/dist/date-range-picker-wrapper-form-item/index.d.ts +2 -2
  20. package/dist/date-range-picker-wrapper-form-item/index.js +2 -2
  21. package/dist/{drag-BwrUqnt-.js → drag-Bt_Onr60.js} +2 -2
  22. package/dist/{drag-BwrUqnt-.js.map → drag-Bt_Onr60.js.map} +1 -1
  23. package/dist/{drag-DT_ZyPqJ.js → drag-CBKS7dDq.js} +2 -2
  24. package/dist/{drag-DT_ZyPqJ.js.map → drag-CBKS7dDq.js.map} +1 -1
  25. package/dist/drag-collapse/index.css +1 -1
  26. package/dist/drag-collapse/index.js +1 -1
  27. package/dist/{drag-collapse-Bwf56R_4.js → drag-collapse-DT1RclKl.js} +5 -4
  28. package/dist/drag-collapse-DT1RclKl.js.map +1 -0
  29. package/dist/{drag-collapse-1Y9ZTDMT.js → drag-collapse-DXDZYoVh.js} +9 -7
  30. package/dist/drag-collapse-DXDZYoVh.js.map +1 -0
  31. package/dist/drag-collapse-form-list/index.css +1 -1
  32. package/dist/drag-collapse-form-list/index.d.ts +13 -2
  33. package/dist/drag-collapse-form-list/index.js +1 -1
  34. package/dist/drag-editable-card/index.d.ts +1 -0
  35. package/dist/drag-editable-card/index.js +1 -1
  36. package/dist/drag-editable-table/index.d.ts +20 -4
  37. package/dist/drag-editable-table/index.js +8 -8
  38. package/dist/drag-editable-table-pro/index.d.ts +3 -1
  39. package/dist/drag-editable-table-pro/index.js +2 -2
  40. package/dist/easy-table/index.d.ts +26 -1
  41. package/dist/easy-table/index.js +73 -11
  42. package/dist/easy-table/index.js.map +1 -1
  43. package/dist/editable-card/index.d.ts +1 -1
  44. package/dist/{editable-card-DwtvwP2a.js → editable-card-Bbav4SQe.js} +7 -4
  45. package/dist/editable-card-Bbav4SQe.js.map +1 -0
  46. package/dist/editable-card-eG4iQx89.js.map +1 -1
  47. package/dist/editable-table/index.d.ts +20 -4
  48. package/dist/editable-table/index.js +7 -7
  49. package/dist/{editable-table-0f-H4DHt.js → editable-table-DUIw-2er.js} +5 -5
  50. package/dist/editable-table-DUIw-2er.js.map +1 -0
  51. package/dist/editable-table-pro/index.d.ts +3 -1
  52. package/dist/editable-table-pro/index.js +1 -1
  53. package/dist/{editable-table-pro-TuKFc80d.js → editable-table-pro-CIa0-oBZ.js} +3 -2
  54. package/dist/editable-table-pro-CIa0-oBZ.js.map +1 -0
  55. package/dist/{date-range-picker-wrapper-form-item-C_ClxVlZ.js → form-item-BQtYYsfl.js} +2 -2
  56. package/dist/form-item-BQtYYsfl.js.map +1 -0
  57. package/dist/form-item-text/index.css +1 -1
  58. package/dist/form-item-text/index.js +2 -2
  59. package/dist/{form-item-text-bxy5q8tw.js → form-item-text-lMeRus2l.js} +2 -2
  60. package/dist/{form-item-text-bxy5q8tw.js.map → form-item-text-lMeRus2l.js.map} +1 -1
  61. package/dist/index.d.ts +74 -15
  62. package/dist/index.js +21 -21
  63. package/dist/{label-value-CPMPh7s-.js → label-value-Cuj8aeW7.js} +2 -2
  64. package/dist/{label-value-CPMPh7s-.js.map → label-value-Cuj8aeW7.js.map} +1 -1
  65. package/dist/label-value-render/index.js +2 -2
  66. package/dist/request-status/index.css +1 -1
  67. package/dist/request-status/index.js +2 -2
  68. package/dist/{request-status-CTleOQtX.js → request-status-Cjtei7Bl.js} +2 -2
  69. package/dist/{request-status-CTleOQtX.js.map → request-status-Cjtei7Bl.js.map} +1 -1
  70. package/dist/rule-describe/index.css +1 -1
  71. package/dist/{selector-fu9imgsR.js → selector-TwlWqZ0E.js} +2 -2
  72. package/dist/{selector-fu9imgsR.js.map → selector-TwlWqZ0E.js.map} +1 -1
  73. package/dist/selector-wrapper/index.js +3 -3
  74. package/dist/{selector-wrapper-B5PUm15M.js → selector-wrapper-BJEilqPP.js} +2 -2
  75. package/dist/{selector-wrapper-B5PUm15M.js.map → selector-wrapper-BJEilqPP.js.map} +1 -1
  76. package/dist/selector-wrapper-search/index.js +3 -3
  77. package/dist/{selector-wrapper-search-BMyOMlZl.js → selector-wrapper-search-AldFMfJK.js} +2 -2
  78. package/dist/{selector-wrapper-search-BMyOMlZl.js.map → selector-wrapper-search-AldFMfJK.js.map} +1 -1
  79. package/dist/selector-wrapper-simple/index.js +3 -3
  80. package/dist/{selector-wrapper-simple-Vbt4cYNm.js → selector-wrapper-simple-DYfXLpbR.js} +2 -2
  81. package/dist/{selector-wrapper-simple-Vbt4cYNm.js.map → selector-wrapper-simple-DYfXLpbR.js.map} +1 -1
  82. package/dist/table-cell-render/index.js +2 -2
  83. package/dist/text-overflow/index.css +1 -1
  84. package/dist/text-overflow/index.d.ts +1 -0
  85. package/dist/text-overflow/index.js +1 -1
  86. package/dist/{text-overflow-C42UFIyh.js → text-overflow-B4NevAuv.js} +5 -5
  87. package/dist/text-overflow-B4NevAuv.js.map +1 -0
  88. package/dist/time-picker-wrapper-AQg6UCts.js.map +1 -1
  89. package/dist/tree-modal/index.js +2 -2
  90. package/dist/tree-modal-selector/index.js +2 -2
  91. package/dist/tree-selector-wrapper/index.js +3 -3
  92. package/dist/tree-wrapper/index.js +2 -2
  93. package/package.json +2 -2
  94. package/dist/cell-render-1gunNiMm.js.map +0 -1
  95. package/dist/color-picker-D8Tiiut0.js.map +0 -1
  96. package/dist/date-picker-wrapper-D0_g483p.js.map +0 -1
  97. package/dist/date-range-picker-wrapper-BYOsf0I5.js.map +0 -1
  98. package/dist/date-range-picker-wrapper-form-item-C_ClxVlZ.js.map +0 -1
  99. package/dist/drag-collapse-1Y9ZTDMT.js.map +0 -1
  100. package/dist/drag-collapse-Bwf56R_4.js.map +0 -1
  101. package/dist/editable-card-DwtvwP2a.js.map +0 -1
  102. package/dist/editable-table-0f-H4DHt.js.map +0 -1
  103. package/dist/editable-table-pro-TuKFc80d.js.map +0 -1
  104. package/dist/text-overflow-C42UFIyh.js.map +0 -1
@@ -5,7 +5,7 @@ import { Form } from 'antd';
5
5
  import { useSensors, useSensor, PointerSensor, DndContext } from '@dnd-kit/core';
6
6
  import { restrictToVerticalAxis } from '@dnd-kit/modifiers';
7
7
  import { useSortable, SortableContext, verticalListSortingStrategy, arrayMove } from '@dnd-kit/sortable';
8
- import { E as EditableTable } from './editable-table-0f-H4DHt.js';
8
+ import { E as EditableTable } from './editable-table-DUIw-2er.js';
9
9
  import { createCtx } from '@wove/react/create-ctx';
10
10
  import _DragOutlined from '@ant-design/icons/es/icons/DragOutlined.js';
11
11
  import { createElement, Children, cloneElement } from 'react';
@@ -178,4 +178,4 @@ var DragEditableTable = function DragEditableTable(props) {
178
178
  };
179
179
 
180
180
  export { DragEditableTable as D };
181
- //# sourceMappingURL=drag-DT_ZyPqJ.js.map
181
+ //# sourceMappingURL=drag-CBKS7dDq.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"drag-DT_ZyPqJ.js","sources":["@flatbiz/antd/src/drag-editable-table/context.ts","@flatbiz/antd/src/drag-editable-table/table-tr-handle.tsx","@flatbiz/antd/src/drag-editable-table/row.tsx","@flatbiz/antd/src/drag-editable-table/drag.tsx"],"sourcesContent":["import { type ReactElement } from 'react';\nimport { createCtx } from '@wove/react';\n\nexport const [getCtx, CtxProvider] = createCtx<{\n dragIcon?: ReactElement;\n uidFieldKey: string;\n}>();\n","import {\n Children,\n cloneElement,\n type CSSProperties,\n type ReactElement,\n} from 'react';\nimport { type RowProps } from 'antd';\nimport { DragOutlined } from '@ant-design/icons';\nimport { useSortable } from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\nimport { isUndefinedOrNull, noop } from '@flatbiz/utils';\nimport { IconWrapper } from '../icon-wrapper/icon-wrapper.jsx';\n\ntype TableTrHandleProps = RowProps & {\n dragIcon?: ReactElement;\n};\nexport const TableTrHandle = (props: TableTrHandleProps) => {\n const { dragIcon, ...innerProps } = props;\n const rowId = innerProps['data-row-key'] as number;\n\n const {\n setActivatorNodeRef,\n listeners,\n setNodeRef,\n transform,\n transition,\n isDragging,\n } = useSortable({\n id: rowId,\n });\n\n if (isUndefinedOrNull(rowId)) {\n return <tr {...innerProps} />;\n }\n const style: CSSProperties = {\n ...innerProps.style,\n transform: CSS.Transform.toString(transform && { ...transform, scaleY: 1 }),\n transition,\n cursor: 'move',\n ...(isDragging\n ? {\n position: 'relative',\n zIndex: 9999,\n boxShadow: ' 0px 0px 12px 4px rgba(34, 33, 81, 0.1)',\n backgroundColor: 'var(--block-bg-color)',\n }\n : {}),\n };\n const iconElement = dragIcon || <DragOutlined />;\n return (\n <tr {...innerProps} ref={setNodeRef} style={style} key={rowId}>\n {Children.map(props.children, (child) => {\n if ((child as ReactElement).key === '__sort') {\n return cloneElement(child as ReactElement, {\n children: (\n <span\n ref={setActivatorNodeRef}\n style={{\n touchAction: 'none',\n cursor: 'move',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n }}\n {...listeners}\n >\n <IconWrapper\n style={{\n touchAction: 'none',\n cursor: 'move',\n padding: '1px 0px',\n margin: 0,\n justifyContent: 'center',\n color: '#787878',\n }}\n icon={iconElement}\n onClick={noop}\n size=\"small\"\n />\n </span>\n ),\n });\n }\n return child;\n })}\n </tr>\n );\n};\n","import { getCtx } from './context.js';\nimport { TableTrHandle } from './table-tr-handle.jsx';\n\nexport const Row = (props) => {\n const ctx = getCtx();\n return <TableTrHandle {...props} dragIcon={ctx.dragIcon} />;\n};\n","import { type ReactElement } from 'react';\nimport { Form } from 'antd';\nimport {\n DndContext,\n type DragEndEvent,\n PointerSensor,\n useSensor,\n useSensors,\n} from '@dnd-kit/core';\nimport { restrictToVerticalAxis } from '@dnd-kit/modifiers';\nimport {\n arrayMove,\n SortableContext,\n verticalListSortingStrategy,\n} from '@dnd-kit/sortable';\nimport { type TPlainObject } from '@flatbiz/utils';\nimport type {\n EditableTableColumn,\n EditableTableProps,\n} from '../editable-table/editable-table.jsx';\nimport { EditableTable } from '../editable-table/editable-table.jsx';\nimport { CtxProvider } from './context.js';\nimport { Row } from './row.jsx';\n\nexport type DragEditableTableProps = EditableTableProps & {\n /**\n * 拖拽图标自定义,默认使用 DragOutlined 图标\n */\n dragIcon?: ReactElement;\n\n /** 禁用拖拽 */\n disabledDrag?: boolean;\n /**\n * 表格数据唯一值字段Key\n * ```\n * ```\n */\n uidFieldKey: string;\n /**\n * 拖拽结束事件\n * ```\n * dataSource: 拖拽完成后的数据源\n * dragData\n * 1. activeId 拖拽ID\n * 2. activeIndex 拖拽起始表格数组索引值\n * 3. overIndex 拖拽结束表格数组索引值\n * ```\n */\n onDragChange?: (\n dataSource: TPlainObject[],\n dragData: {\n activeId: string | number;\n overId?: string | number;\n activeIndex: number;\n overIndex: number;\n }\n ) => void;\n};\n\n/**\n * 可拖拽编辑表格\n * @deprecated 已过期,请使用 DragEditableTablePro组件\n * ```\n * 1. 表格数据必须要有唯一值字段,通过参数 uidFieldKey 告诉组件\n * 2. Table 参数 components.body.row 被组件内部使用\n * ```\n */\nexport const DragEditableTable = (props: DragEditableTableProps) => {\n const { dragIcon, uidFieldKey, onDragChange, disabledDrag, ...otherProps } =\n props;\n const form = Form.useFormInstance();\n const dataList = Form.useWatch(\n props.completeName ? props.completeName : props.name,\n form\n );\n\n const sensors = useSensors(\n useSensor(PointerSensor, {\n activationConstraint: {\n // 当拖拽触发区域有其他点击事件时,需要延迟触发拖拽动作\n delay: 0,\n tolerance: 0,\n },\n })\n );\n\n const onDragEnd = ({ active, over }: DragEndEvent) => {\n if (active.id !== over?.id) {\n const activeIndex = dataList.findIndex(\n (i) => i[uidFieldKey] === active.id\n );\n const overIndex = dataList.findIndex((i) => i[uidFieldKey] === over?.id);\n const dataListNew = arrayMove(dataList, activeIndex, overIndex);\n form.setFields([\n {\n name: props.completeName ? props.completeName : props.name,\n value: dataListNew,\n },\n ]);\n onDragChange?.(dataListNew as TPlainObject[], {\n activeId: active.id,\n overId: over?.id,\n activeIndex,\n overIndex,\n });\n }\n };\n\n const columns: EditableTableColumn[] = disabledDrag\n ? otherProps.columns\n : [\n {\n dataIndex: '__sort',\n width: 40,\n key: '__sort',\n align: 'center',\n } as EditableTableColumn,\n ].concat(otherProps.columns || []);\n\n return (\n <CtxProvider\n value={{\n dragIcon,\n uidFieldKey,\n }}\n >\n <DndContext\n sensors={sensors}\n modifiers={[restrictToVerticalAxis]}\n onDragEnd={onDragEnd}\n >\n <SortableContext\n items={dataList?.map((i) => i[uidFieldKey]) || []}\n strategy={verticalListSortingStrategy}\n >\n <EditableTable\n {...otherProps}\n uidFieldKey={uidFieldKey}\n columns={columns}\n tableProps={{\n ...otherProps.tableProps,\n components: {\n ...otherProps.tableProps?.components,\n body: {\n ...otherProps.tableProps?.components?.body,\n row: disabledDrag ? undefined : Row,\n },\n },\n }}\n />\n </SortableContext>\n </DndContext>\n </CtxProvider>\n );\n};\n"],"names":["_createCtx","_createCtx3","_createCtx2","_slicedToArray","getCtx","CtxProvider","TableTrHandle","props","dragIcon","innerProps","_objectWithoutProperties","_excluded","rowId","_useSortable","useSortable","id","setActivatorNodeRef","listeners","setNodeRef","transform","transition","isDragging","isUndefinedOrNull","_jsx","_objectSpread","style","CSS","Transform","toString","scaleY","cursor","position","zIndex","boxShadow","backgroundColor","iconElement","_DragOutlined","_createElement","ref","key","Children","map","children","child","cloneElement","touchAction","display","alignItems","justifyContent","IconWrapper","padding","margin","color","icon","onClick","noop","size","Row","ctx","DragEditableTable","_otherProps$tableProp","_otherProps$tableProp2","uidFieldKey","onDragChange","disabledDrag","otherProps","form","Form","useFormInstance","dataList","useWatch","completeName","name","sensors","useSensors","useSensor","PointerSensor","activationConstraint","delay","tolerance","onDragEnd","_ref","active","over","activeIndex","findIndex","i","overIndex","dataListNew","arrayMove","setFields","value","activeId","overId","columns","dataIndex","width","align","concat","DndContext","modifiers","restrictToVerticalAxis","SortableContext","items","strategy","verticalListSortingStrategy","EditableTable","tableProps","components","body","row","undefined"],"mappings":";;;;;;;;;;;;;;;;AAGO,IAAAA,UAAA,GAA8BC,SAAA,EAGjC;EAAAC,WAAA,GAAAC,cAAA,CAAAH,UAAA,EAAA,CAAA,CAAA;AAHUI,EAAAA,MAAM,GAAAF,WAAA,CAAA,CAAA,CAAA;AAAEG,EAAAA,WAAW,GAAAH,WAAA,CAAA,CAAA,CAAA;;;ACa1B,IAAMI,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,KAAyB,EAAK;AAC1D,EAAA,IAAQC,QAAQ,GAAoBD,KAAK,CAAjCC,QAAQ;AAAKC,IAAAA,UAAU,GAAAC,wBAAA,CAAKH,KAAK,EAAAI,WAAA,CAAA;AACzC,EAAA,IAAMC,KAAK,GAAGH,UAAU,CAAC,cAAc,CAAW;EAElD,IAAAI,YAAA,GAO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C,UAAU,cAAA/C,sBAAA,KAAA,MAAA,GAAA,MAAA,GAAjCA,sBAAA,CAAmCgD,IAAI,CAAA,EAAA,EAAA,EAAA;AAC1CC,gBAAAA,GAAG,EAAE9C,YAAY,GAAG+C,SAAS,GAAGtD;AAAG,eAAA;AACpC,aAAA;AACF,WAAA;SACD,CACH;OACc;KACP;AAAC,GACF,CAAC;AAElB;;;;"}
1
+ {"version":3,"file":"drag-CBKS7dDq.js","sources":["@flatbiz/antd/src/drag-editable-table/context.ts","@flatbiz/antd/src/drag-editable-table/table-tr-handle.tsx","@flatbiz/antd/src/drag-editable-table/row.tsx","@flatbiz/antd/src/drag-editable-table/drag.tsx"],"sourcesContent":["import { type ReactElement } from 'react';\nimport { createCtx } from '@wove/react';\n\nexport const [getCtx, CtxProvider] = createCtx<{\n dragIcon?: ReactElement;\n uidFieldKey: string;\n}>();\n","import {\n Children,\n cloneElement,\n type CSSProperties,\n type ReactElement,\n} from 'react';\nimport { type RowProps } from 'antd';\nimport { DragOutlined } from '@ant-design/icons';\nimport { useSortable } from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\nimport { isUndefinedOrNull, noop } from '@flatbiz/utils';\nimport { IconWrapper } from '../icon-wrapper/icon-wrapper.jsx';\n\ntype TableTrHandleProps = RowProps & {\n dragIcon?: ReactElement;\n};\nexport const TableTrHandle = (props: TableTrHandleProps) => {\n const { dragIcon, ...innerProps } = props;\n const rowId = innerProps['data-row-key'] as number;\n\n const {\n setActivatorNodeRef,\n listeners,\n setNodeRef,\n transform,\n transition,\n isDragging,\n } = useSortable({\n id: rowId,\n });\n\n if (isUndefinedOrNull(rowId)) {\n return <tr {...innerProps} />;\n }\n const style: CSSProperties = {\n ...innerProps.style,\n transform: CSS.Transform.toString(transform && { ...transform, scaleY: 1 }),\n transition,\n cursor: 'move',\n ...(isDragging\n ? {\n position: 'relative',\n zIndex: 9999,\n boxShadow: ' 0px 0px 12px 4px rgba(34, 33, 81, 0.1)',\n backgroundColor: 'var(--block-bg-color)',\n }\n : {}),\n };\n const iconElement = dragIcon || <DragOutlined />;\n return (\n <tr {...innerProps} ref={setNodeRef} style={style} key={rowId}>\n {Children.map(props.children, (child) => {\n if ((child as ReactElement).key === '__sort') {\n return cloneElement(child as ReactElement, {\n children: (\n <span\n ref={setActivatorNodeRef}\n style={{\n touchAction: 'none',\n cursor: 'move',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n }}\n {...listeners}\n >\n <IconWrapper\n style={{\n touchAction: 'none',\n cursor: 'move',\n padding: '1px 0px',\n margin: 0,\n justifyContent: 'center',\n color: '#787878',\n }}\n icon={iconElement}\n onClick={noop}\n size=\"small\"\n />\n </span>\n ),\n });\n }\n return child;\n })}\n </tr>\n );\n};\n","import { getCtx } from './context.js';\nimport { TableTrHandle } from './table-tr-handle.jsx';\n\nexport const Row = (props) => {\n const ctx = getCtx();\n return <TableTrHandle {...props} dragIcon={ctx.dragIcon} />;\n};\n","import { type ReactElement } from 'react';\nimport { Form } from 'antd';\nimport {\n DndContext,\n type DragEndEvent,\n PointerSensor,\n useSensor,\n useSensors,\n} from '@dnd-kit/core';\nimport { restrictToVerticalAxis } from '@dnd-kit/modifiers';\nimport {\n arrayMove,\n SortableContext,\n verticalListSortingStrategy,\n} from '@dnd-kit/sortable';\nimport { type TPlainObject } from '@flatbiz/utils';\nimport type {\n EditableTableColumn,\n EditableTableProps,\n} from '../editable-table/editable-table.jsx';\nimport { EditableTable } from '../editable-table/editable-table.jsx';\nimport { CtxProvider } from './context.js';\nimport { Row } from './row.jsx';\n\nexport type DragEditableTableProps = EditableTableProps & {\n /**\n * 拖拽图标自定义,默认使用 DragOutlined 图标\n */\n dragIcon?: ReactElement;\n\n /** 禁用拖拽 */\n disabledDrag?: boolean;\n /**\n * 表格数据唯一值字段Key\n * ```\n * ```\n */\n uidFieldKey: string;\n /**\n * 拖拽结束事件\n * ```\n * dataSource: 拖拽完成后的数据源\n * dragData\n * 1. activeId 拖拽ID\n * 2. activeIndex 拖拽起始表格数组索引值\n * 3. overIndex 拖拽结束表格数组索引值\n * ```\n */\n onDragChange?: (\n dataSource: TPlainObject[],\n dragData: {\n activeId: string | number;\n overId?: string | number;\n activeIndex: number;\n overIndex: number;\n }\n ) => void;\n};\n\n/**\n * 可拖拽编辑表格\n * @deprecated 已过期,请使用 DragEditableTablePro组件\n * ```\n * 1. 表格数据必须要有唯一值字段,通过参数 uidFieldKey 告诉组件\n * 2. Table 参数 components.body.row 被组件内部使用\n * ```\n */\nexport const DragEditableTable = (props: DragEditableTableProps) => {\n const { dragIcon, uidFieldKey, onDragChange, disabledDrag, ...otherProps } =\n props;\n const form = Form.useFormInstance();\n const dataList = Form.useWatch(\n props.completeName ? props.completeName : props.name,\n form\n );\n\n const sensors = useSensors(\n useSensor(PointerSensor, {\n activationConstraint: {\n // 当拖拽触发区域有其他点击事件时,需要延迟触发拖拽动作\n delay: 0,\n tolerance: 0,\n },\n })\n );\n\n const onDragEnd = ({ active, over }: DragEndEvent) => {\n if (active.id !== over?.id) {\n const activeIndex = dataList.findIndex(\n (i) => i[uidFieldKey] === active.id\n );\n const overIndex = dataList.findIndex((i) => i[uidFieldKey] === over?.id);\n const dataListNew = arrayMove(dataList, activeIndex, overIndex);\n form.setFields([\n {\n name: props.completeName ? props.completeName : props.name,\n value: dataListNew,\n },\n ]);\n onDragChange?.(dataListNew as TPlainObject[], {\n activeId: active.id,\n overId: over?.id,\n activeIndex,\n overIndex,\n });\n }\n };\n\n const columns: EditableTableColumn[] = disabledDrag\n ? otherProps.columns\n : [\n {\n dataIndex: '__sort',\n width: 40,\n key: '__sort',\n align: 'center',\n } as EditableTableColumn,\n ].concat(otherProps.columns || []);\n\n return (\n <CtxProvider\n value={{\n dragIcon,\n uidFieldKey,\n }}\n >\n <DndContext\n sensors={sensors}\n modifiers={[restrictToVerticalAxis]}\n onDragEnd={onDragEnd}\n >\n <SortableContext\n items={dataList?.map((i) => i[uidFieldKey]) || []}\n strategy={verticalListSortingStrategy}\n >\n <EditableTable\n {...otherProps}\n uidFieldKey={uidFieldKey}\n columns={columns}\n tableProps={{\n ...otherProps.tableProps,\n components: {\n ...otherProps.tableProps?.components,\n body: {\n ...otherProps.tableProps?.components?.body,\n row: disabledDrag ? undefined : Row,\n },\n },\n }}\n />\n </SortableContext>\n </DndContext>\n </CtxProvider>\n );\n};\n"],"names":["_createCtx","_createCtx3","_createCtx2","_slicedToArray","getCtx","CtxProvider","TableTrHandle","props","dragIcon","innerProps","_objectWithoutProperties","_excluded","rowId","_useSortable","useSortable","id","setActivatorNodeRef","listeners","setNodeRef","transform","transition","isDragging","isUndefinedOrNull","_jsx","_objectSpread","style","CSS","Transform","toString","scaleY","cursor","position","zIndex","boxShadow","backgroundColor","iconElement","_DragOutlined","_createElement","ref","key","Children","map","children","child","cloneElement","touchAction","display","alignItems","justifyContent","IconWrapper","padding","margin","color","icon","onClick","noop","size","Row","ctx","DragEditableTable","_otherProps$tableProp","_otherProps$tableProp2","uidFieldKey","onDragChange","disabledDrag","otherProps","form","Form","useFormInstance","dataList","useWatch","completeName","name","sensors","useSensors","useSensor","PointerSensor","activationConstraint","delay","tolerance","onDragEnd","_ref","active","over","activeIndex","findIndex","i","overIndex","dataListNew","arrayMove","setFields","value","activeId","overId","columns","dataIndex","width","align","concat","DndContext","modifiers","restrictToVerticalAxis","SortableContext","items","strategy","verticalListSortingStrategy","EditableTable","tableProps","components","body","row","undefined"],"mappings":";;;;;;;;;;;;;;;;AAGO,IAAAA,UAAA,GAA8BC,SAAA,EAGjC;EAAAC,WAAA,GAAAC,cAAA,CAAAH,UAAA,EAAA,CAAA,CAAA;AAHUI,EAAAA,MAAM,GAAAF,WAAA,CAAA,CAAA,CAAA;AAAEG,EAAAA,WAAW,GAAAH,WAAA,CAAA,CAAA,CAAA;;;ACa1B,IAAMI,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,KAAyB,EAAK;AAC1D,EAAA,IAAQC,QAAQ,GAAoBD,KAAK,CAAjCC,QAAQ;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ArF,cAAA,CAAAA,cAAA,MAAAqC,sBAAA,GACCI,UAAU,CAAC0C,UAAU,MAAA,IAAA,IAAA9C,sBAAA,KAAA,MAAA,IAAA,CAAAA,sBAAA,GAArBA,sBAAA,CAAuB+C,UAAU,cAAA/C,sBAAA,KAAA,MAAA,GAAA,MAAA,GAAjCA,sBAAA,CAAmCgD,IAAI,CAAA,EAAA,EAAA,EAAA;AAC1CC,gBAAAA,GAAG,EAAE9C,YAAY,GAAG+C,SAAS,GAAGtD;AAAG,eAAA;AACpC,aAAA;AACF,WAAA;SACD,CACH;OACc;KACP;AAAC,GACF,CAAC;AAElB;;;;"}
@@ -1 +1 @@
1
- .drag-collapse-wrapper{border:1px solid #d9d9d9;border-radius:8px;overflow:hidden}.drag-collapse-wrapper .drag-collapse{background-color:#fafafa}.drag-collapse-wrapper .drag-collapse>.ant-collapse-item{border-radius:0}.drag-collapse-wrapper .drag-collapse .ant-collapse-header{align-items:center;border-radius:0}.drag-collapse-wrapper .drag-collapse .ant-collapse-content{border-radius:0}.drag-collapse-wrapper .drag-collapse .ant-collapse-header-text{align-items:center;display:flex}.drag-collapse-wrapper .drag-collapse .dc-drag-header-content{flex:1}.drag-collapse-wrapper .drag-collapse:not(.overlay-sortable-item){border:none;border-radius:0}.drag-collapse-wrapper .dc-drag-trigger{align-items:center;border-radius:6px;cursor:move;display:inline-flex;font-size:16px;height:30px;justify-content:center;margin-right:5px;width:30px}.drag-collapse-wrapper .dc-drag-trigger:hover{background-color:rgba(0,0,0,.1)}.drag-collapse-wrapper .drag-collapse-grap *{opacity:.7!important}.drag-collapse-wrapper .overlay-sortable-item{border:none;border-radius:6px;box-shadow:0 0 12px 4px rgba(34,33,81,.1)}.drag-collapse-wrapper .overlay-sortable-item .ant-collapse-item{border-bottom:none}.drag-collapse-wrapper .overlay-sortable-item .dc-drag-trigger{background-color:transparent}.drag-collapse-wrapper .drag-collapse-last .ant-collapse-item{border-bottom:none}
1
+ .drag-collapse-wrapper{border:1px solid #d9d9d9;border-radius:8px;overflow:hidden}.drag-collapse-wrapper .drag-collapse{background-color:#fafafa}.drag-collapse-wrapper .drag-collapse>.ant-collapse-item{border-bottom:none;border-radius:0}.drag-collapse-wrapper .drag-collapse .ant-collapse-header{align-items:center;border-radius:0}.drag-collapse-wrapper .drag-collapse .ant-collapse-content{border-radius:0}.drag-collapse-wrapper .drag-collapse .ant-collapse-header-text{align-items:center;display:flex}.drag-collapse-wrapper .drag-collapse .dc-drag-header-content{flex:1}.drag-collapse-wrapper .drag-collapse:not(.overlay-sortable-item){border:none;border-bottom:1px solid #d9d9d9;border-radius:0}.drag-collapse-wrapper .drag-collapse:not(.overlay-sortable-item).drag-collapse-last{border-bottom:none}.drag-collapse-wrapper .dc-drag-trigger{align-items:center;border-radius:6px;cursor:move;display:inline-flex;font-size:16px;height:30px;justify-content:center;margin-right:5px;width:30px}.drag-collapse-wrapper .dc-drag-trigger:hover{background-color:rgba(0,0,0,.1)}.drag-collapse-wrapper .drag-collapse-grap *{opacity:.7!important}.drag-collapse-wrapper .overlay-sortable-item{border:none;border-radius:6px;box-shadow:0 0 12px 4px rgba(34,33,81,.1)}.drag-collapse-wrapper .overlay-sortable-item .ant-collapse-item{border-bottom:none}.drag-collapse-wrapper .overlay-sortable-item .dc-drag-trigger{background-color:transparent}.drag-collapse-wrapper .drag-collapse-last .ant-collapse-item{border-bottom:none}
@@ -3,7 +3,7 @@ import './../fba-hooks/index.css';
3
3
  import './index.css';
4
4
  /*! @flatjs/forge MIT @flatbiz/antd */
5
5
 
6
- export { D as DragCollapse } from '../drag-collapse-Bwf56R_4.js';
6
+ export { D as DragCollapse } from '../drag-collapse-DT1RclKl.js';
7
7
  import '@dimjs/utils/class-names/class-names';
8
8
  import '../_rollupPluginBabelHelpers-BspM60Sw.js';
9
9
  import '@dimjs/utils/array/array-remove';
@@ -59,7 +59,8 @@ function SortableItem(props) {
59
59
  items: [{
60
60
  key: props.item.key,
61
61
  label: header(props.item),
62
- children: props.item.content
62
+ children: props.item.content,
63
+ forceRender: true
63
64
  }]
64
65
  });
65
66
  }
@@ -95,8 +96,8 @@ var DragCollapse = function DragCollapse(props) {
95
96
  } else {
96
97
  var has = openKeys.includes(key);
97
98
  if (has) {
98
- arrayRemove(openKeys, key);
99
- openKeysNew = _toConsumableArray(openKeys);
99
+ var result = arrayRemove(openKeys, key);
100
+ openKeysNew = _toConsumableArray(result);
100
101
  } else {
101
102
  openKeysNew = openKeys.concat(key);
102
103
  }
@@ -180,4 +181,4 @@ var DragCollapse = function DragCollapse(props) {
180
181
  };
181
182
 
182
183
  export { DragCollapse as D };
183
- //# sourceMappingURL=drag-collapse-Bwf56R_4.js.map
184
+ //# sourceMappingURL=drag-collapse-DT1RclKl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drag-collapse-DT1RclKl.js","sources":["@flatbiz/antd/src/drag-collapse/sortable-item.tsx","@flatbiz/antd/src/drag-collapse/drag-collapse.tsx"],"sourcesContent":["import type { CSSProperties } from 'react';\nimport { Fragment } from 'react';\nimport { Collapse } from 'antd';\nimport { DragOutlined } from '@ant-design/icons';\nimport { classNames } from '@dimjs/utils';\nimport { useSortable } from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\nimport type {\n DragCollapseItem,\n DragCollapseItemKey,\n DragCollapseProps,\n} from './types.js';\ntype SortableItemProps = {\n openKeys: DragCollapseItemKey[];\n style?: CSSProperties;\n item: DragCollapseItem;\n collapsible?: DragCollapseProps['collapsible'];\n expandIcon?: DragCollapseProps['expandIcon'];\n expandIconPosition?: DragCollapseProps['expandIconPosition'];\n size?: DragCollapseProps['size'];\n dragIcon?: DragCollapseProps['dragIcon'];\n hideDragIcon?: DragCollapseProps['hideDragIcon'];\n onChange: (activeKey: DragCollapseItemKey) => void;\n isGray?: boolean;\n className?: string;\n isLast?: boolean;\n};\nexport function SortableItem(props: SortableItemProps) {\n const { listeners, setNodeRef, transform, transition } = useSortable({\n id: props.item.key,\n });\n\n const header = (item: DragCollapseItem) => {\n const dragIcon = props.dragIcon ? props.dragIcon : <DragOutlined />;\n return props.hideDragIcon ? (\n item.header\n ) : (\n <Fragment>\n <span className=\"dc-drag-trigger\" {...listeners}>\n {dragIcon}\n </span>\n <span className=\"dc-drag-header-content\">{item.header}</span>\n </Fragment>\n );\n };\n\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n ...props.style,\n };\n\n const isActive = props.openKeys.includes(props.item.key);\n const cname = classNames(\n 'drag-collapse',\n { 'drag-collapse-grap': props.isGray, 'drag-collapse-last': props.isLast },\n props.className\n );\n return (\n <Collapse\n activeKey={isActive ? props.item.key : undefined}\n accordion\n className={cname}\n collapsible={props.collapsible}\n expandIcon={props.expandIcon}\n expandIconPosition={props.expandIconPosition}\n size={props.size}\n onChange={props.onChange?.bind(null, props.item.key)}\n style={{ ...style }}\n ref={setNodeRef}\n items={[\n {\n key: props.item.key,\n label: header(props.item),\n children: props.item.content,\n forceRender: true,\n },\n ]}\n />\n );\n}\n","import { useState } from 'react';\nimport { arrayRemove, classNames } from '@dimjs/utils';\nimport { closestCenter, DndContext, DragOverlay } from '@dnd-kit/core';\nimport {\n arrayMove,\n SortableContext,\n verticalListSortingStrategy,\n} from '@dnd-kit/sortable';\nimport { toArray } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { fbaHooks } from '../fba-hooks/index.js';\nimport { SortableItem } from './sortable-item.jsx';\nimport type { DragCollapseItemKey, DragCollapseProps } from './types.js';\nimport './style.less';\n\n/**\n * 可拖拽 折叠面板\n * @param props\n * @returns\n */\nexport const DragCollapse = (props: DragCollapseProps) => {\n const [dragActiveId, setDragActiveId] = useState<string | number>();\n const [openKeys, setOpenKeys] = useState<DragCollapseItemKey[]>([]);\n\n fbaHooks.useEffectCustom(() => {\n const defaultActiveKeys = toArray<string | number>(props.defaultActiveKey);\n if (!props.activeKey && defaultActiveKeys.length > 0) {\n setOpenKeys(defaultActiveKeys);\n } else {\n setOpenKeys(toArray(props.activeKey));\n }\n }, []);\n\n hooks.useUpdateEffect(() => {\n setOpenKeys(toArray(props.activeKey));\n }, [props.activeKey]);\n\n const onChange = hooks.useCallbackRef((key: DragCollapseItemKey) => {\n let openKeysNew: DragCollapseItemKey[] = [];\n if (props.accordion) {\n if (openKeys[0] && openKeys[0] === key) {\n openKeysNew = [];\n } else {\n openKeysNew = [key];\n }\n } else {\n const has = openKeys.includes(key);\n if (has) {\n const result = arrayRemove(openKeys, key);\n openKeysNew = [...result];\n } else {\n openKeysNew = openKeys.concat(key);\n }\n }\n setOpenKeys(openKeysNew);\n if (props.accordion) {\n props.onChange?.(openKeysNew.length ? openKeysNew[0] : undefined);\n } else {\n props.onChange?.(openKeysNew.length ? openKeysNew : undefined);\n }\n });\n\n function handleDragStart(event) {\n const { active } = event;\n setDragActiveId(active.id);\n }\n\n function handleDragEnd(event) {\n const { active, over } = event;\n if (active.id !== over.id) {\n const oldIndex = props.items.findIndex((item) => item.key === active.id);\n const newIndex = props.items.findIndex((item) => item.key === over.id);\n const newList = arrayMove(props.items, oldIndex, newIndex);\n props.onDropChange(newList);\n }\n setDragActiveId(undefined);\n }\n\n return (\n <div\n className={classNames('drag-collapse-wrapper', props.className)}\n style={props.style}\n >\n <DndContext\n collisionDetection={closestCenter}\n onDragStart={handleDragStart}\n onDragEnd={handleDragEnd}\n >\n <SortableContext\n items={props.items.map((item) => item.key)}\n strategy={verticalListSortingStrategy}\n >\n {props.items.map((item, index) => (\n <SortableItem\n key={item.key}\n item={item}\n openKeys={openKeys}\n collapsible={props.collapsible}\n expandIcon={props.expandIcon}\n expandIconPosition={props.expandIconPosition}\n size={props.size}\n dragIcon={props.dragIcon}\n hideDragIcon={props.hideDragIcon}\n onChange={onChange}\n isGray={item.key === dragActiveId}\n isLast={index === props.items.length - 1}\n />\n ))}\n </SortableContext>\n\n <DragOverlay dropAnimation={{ duration: 0 }}>\n {dragActiveId ? (\n <SortableItem\n className=\"overlay-sortable-item\"\n key={dragActiveId}\n item={props.items.filter((item) => item.key === dragActiveId)[0]}\n openKeys={openKeys}\n collapsible={props.collapsible}\n expandIcon={props.expandIcon}\n expandIconPosition={props.expandIconPosition}\n size={props.size}\n dragIcon={props.dragIcon}\n hideDragIcon={props.hideDragIcon}\n onChange={onChange}\n />\n ) : null}\n </DragOverlay>\n </DndContext>\n </div>\n );\n};\n"],"names":["SortableItem","props","_props$onChange","_useSortable","useSortable","id","item","key","listeners","setNodeRef","transform","transition","header","dragIcon","_jsx","_DragOutlined","hideDragIcon","_jsxs","Fragment","children","_objectSpread","className","style","CSS","Transform","toString","isActive","openKeys","includes","cname","_classNames","isGray","isLast","Collapse","activeKey","undefined","accordion","collapsible","expandIcon","expandIconPosition","size","onChange","bind","ref","items","label","content","forceRender","DragCollapse","_useState","useState","_useState2","_slicedToArray","dragActiveId","setDragActiveId","_useState3","_useState4","setOpenKeys","fbaHooks","useEffectCustom","defaultActiveKeys","toArray","defaultActiveKey","length","_hooks","useUpdateEffect","useCallbackRef","openKeysNew","has","result","_arrayRemove","_toConsumableArray","concat","call","_props$onChange2","handleDragStart","event","active","handleDragEnd","over","oldIndex","findIndex","newIndex","newList","arrayMove","onDropChange","DndContext","collisionDetection","closestCenter","onDragStart","onDragEnd","SortableContext","map","strategy","verticalListSortingStrategy","index","DragOverlay","dropAnimation","duration","filter"],"mappings":";;;;;;;;;;;;;;;;AA2BO,SAASA,YAAYA,CAACC,KAAwB,EAAE;AAAA,EAAA,IAAAC,eAAA;EACrD,IAAAC,YAAA,GAAyDC,WAAW,CAAC;AACnEC,MAAAA,EAAE,EAAEJ,KAAK,CAACK,IAAI,CAACC;AACjB,KAAC,CAAC;IAFMC,SAAS,GAAAL,YAAA,CAATK,SAAS;IAAEC,UAAU,GAAAN,YAAA,CAAVM,UAAU;IAAEC,SAAS,GAAAP,YAAA,CAATO,SAAS;IAAEC,UAAU,GAAAR,YAAA,CAAVQ,UAAU;AAIpD,EAAA,IAAMC,MAAM,GAAG,SAATA,MAAMA,CAAIN,IAAsB,EAAK;AACzC,IAAA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AK,CAACe,YAAa;AACjCyB,YAAAA,QAAQ,EAAEA,QAAS;AACnBV,YAAAA,MAAM,EAAEzB,IAAI,CAACC,GAAG,KAAK8C,YAAa;YAClCrB,MAAM,EAAE+D,KAAK,KAAK9F,KAAK,CAAC2C,KAAK,CAACmB,MAAM,GAAG;WAAE,EAXpCzD,IAAI,CAACC,GAYX,CAAC;QAAA,CACH;AAAC,OACa,CAAC,eAElBO,GAAA,CAACkF,WAAW,EAAA;AAACC,QAAAA,aAAa,EAAE;AAAEC,UAAAA,QAAQ,EAAE;SAAI;AAAA/E,QAAAA,QAAA,EACzCkC,YAAY,gBACXvC,GAAA,CAACd,YAAY,EAAA;AACXqB,UAAAA,SAAS,EAAC,uBAAuB;UAEjCf,IAAI,EAAEL,KAAK,CAAC2C,KAAK,CAACuD,MAAM,CAAC,UAAC7F,IAAI,EAAA;AAAA,YAAA,OAAKA,IAAI,CAACC,GAAG,KAAK8C,YAAY;UAAA,CAAA,CAAC,CAAC,CAAC,CAAE;AACjE1B,UAAAA,QAAQ,EAAEA,QAAS;UACnBU,WAAW,EAAEpC,KAAK,CAACoC,WAAY;UAC/BC,UAAU,EAAErC,KAAK,CAACqC,UAAW;UAC7BC,kBAAkB,EAAEtC,KAAK,CAACsC,kBAAmB;UAC7CC,IAAI,EAAEvC,KAAK,CAACuC,IAAK;UACjB3B,QAAQ,EAAEZ,KAAK,CAACY,QAAS;UACzBG,YAAY,EAAEf,KAAK,CAACe,YAAa;AACjCyB,UAAAA,QAAQ,EAAEA;SAAS,EATdY,YAUN,CAAC,GACA;AAAI,OACG,CAAC;KACJ;AAAC,GACV,CAAC;AAEV;;;;"}
@@ -106,7 +106,9 @@ var DragCollapseFormList = function DragCollapseFormList(props) {
106
106
  setOpenKeys = _useState4[1];
107
107
  var form = Form.useFormInstance();
108
108
  var formListOperationRef = useRef([]);
109
- var formListValue = Form.useWatch(props.formListName, form);
109
+ var formListCompleteName = props.formListCompleteName || props.formListName;
110
+ var formListName = props.formListName;
111
+ var formListValue = Form.useWatch(formListCompleteName, form);
110
112
  var getUidValue = hooks.useCallbackRef(function (item) {
111
113
  return item === null || item === void 0 ? void 0 : item[props.uidFieldName || 'uid'];
112
114
  });
@@ -152,7 +154,7 @@ var DragCollapseFormList = function DragCollapseFormList(props) {
152
154
  setDragActiveId(active.id);
153
155
  }
154
156
  var getItems = hooks.useCallbackRef(function () {
155
- return form.getFieldValue(props.formListName) || [];
157
+ return form.getFieldValue(formListCompleteName) || [];
156
158
  });
157
159
  function handleDragEnd(event) {
158
160
  var active = event.active,
@@ -168,7 +170,7 @@ var DragCollapseFormList = function DragCollapseFormList(props) {
168
170
  });
169
171
  var newList = arrayMove(items, oldIndex, newIndex);
170
172
  form.setFields([{
171
- name: props.formListName,
173
+ name: formListCompleteName,
172
174
  value: newList
173
175
  }]);
174
176
  (_props$onDropChange = props.onDropChange) === null || _props$onDropChange === void 0 || _props$onDropChange.call(props, newList);
@@ -196,7 +198,7 @@ var DragCollapseFormList = function DragCollapseFormList(props) {
196
198
  onDragStart: handleDragStart,
197
199
  onDragEnd: handleDragEnd,
198
200
  children: /*#__PURE__*/jsx(Form.List, {
199
- name: props.formListName,
201
+ name: formListName,
200
202
  rules: props.rules,
201
203
  children: function children(fields, operate) {
202
204
  formListOperationRef.current = fields;
@@ -227,7 +229,7 @@ var DragCollapseFormList = function DragCollapseFormList(props) {
227
229
  header: props.header,
228
230
  content: props.content,
229
231
  index: index,
230
- formStageCompleteName: [].concat(_toConsumableArray(toArray(props.formListName)), [item.name])
232
+ formStageCompleteName: [].concat(_toConsumableArray(toArray(formListCompleteName)), [item.name])
231
233
  }, "".concat(uid, "-").concat(item.key));
232
234
  })
233
235
  })
@@ -251,7 +253,7 @@ var DragCollapseFormList = function DragCollapseFormList(props) {
251
253
  content: props.content,
252
254
  formListOperate: null,
253
255
  index: 0,
254
- formStageCompleteName: [].concat(_toConsumableArray(toArray(props.formListName)), [dragOverlayItem.name])
256
+ formStageCompleteName: [].concat(_toConsumableArray(toArray(formListCompleteName)), [dragOverlayItem.name])
255
257
  }, dragActiveId) : null
256
258
  })]
257
259
  });
@@ -262,4 +264,4 @@ var DragCollapseFormList = function DragCollapseFormList(props) {
262
264
  };
263
265
 
264
266
  export { DragCollapseFormList as D };
265
- //# sourceMappingURL=drag-collapse-1Y9ZTDMT.js.map
267
+ //# sourceMappingURL=drag-collapse-DXDZYoVh.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drag-collapse-DXDZYoVh.js","sources":["@flatbiz/antd/src/drag-collapse-form-list/sortable-item.tsx","@flatbiz/antd/src/drag-collapse-form-list/drag-collapse.tsx"],"sourcesContent":["import type { CSSProperties } from 'react';\nimport { Fragment } from 'react';\nimport type { FormListFieldData, FormListOperation } from 'antd';\nimport { Collapse, Form } from 'antd';\nimport { DragOutlined } from '@ant-design/icons';\nimport { classNames } from '@dimjs/utils';\nimport { useSortable } from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\nimport { toArray } from '@flatbiz/utils';\nimport type { DragCollapseFormListProps } from './types.js';\nexport type SortableItemProps = {\n formListFieldData: FormListFieldData;\n formListOperate: FormListOperation;\n onChange: (activeKey: number | string) => void;\n header: DragCollapseFormListProps['header'];\n content: DragCollapseFormListProps['content'];\n collapsible?: DragCollapseFormListProps['collapsible'];\n expandIcon?: DragCollapseFormListProps['expandIcon'];\n expandIconPosition?: DragCollapseFormListProps['expandIconPosition'];\n size?: DragCollapseFormListProps['size'];\n dragIcon?: DragCollapseFormListProps['dragIcon'];\n getItemDragDisabled?: DragCollapseFormListProps['getItemDragDisabled'];\n dragDisabled?: DragCollapseFormListProps['dragDisabled'];\n isGray?: boolean;\n isLast?: boolean;\n className?: string;\n style?: CSSProperties;\n uid: string | number;\n isActive?: boolean;\n headerStyle?: CSSProperties;\n index: number;\n isOverlay?: boolean;\n formStageCompleteName: Array<string | number>;\n};\nexport function SortableItem(props: SortableItemProps) {\n const form = Form.useFormInstance();\n const isDisabled = props.isOverlay\n ? false\n : props.getItemDragDisabled?.(props.uid, props.index);\n const { listeners, setNodeRef, transform, transition } = useSortable({\n id: props.uid,\n disabled: isDisabled,\n });\n\n const header = () => {\n const dragIcon = props.dragIcon ? props.dragIcon : <DragOutlined />;\n const headerContent = props.header({\n formListFieldData: props.formListFieldData,\n operation: props.formListOperate,\n uid: props.uid,\n formStageCompleteName: props.formStageCompleteName,\n getInsideFormItemName: (key: string | string[]) => {\n return [props.formListFieldData.name, ...toArray(key)] as (\n | string\n | number\n )[];\n },\n getInsideFormItemData: () => {\n return form.getFieldValue(props.formStageCompleteName) || {};\n },\n index: props.index,\n });\n return props.dragDisabled ? (\n headerContent\n ) : (\n <Fragment>\n <span className=\"dc-drag-trigger\" {...listeners}>\n {dragIcon}\n </span>\n <span className=\"dc-drag-header-content\" style={props.headerStyle}>\n {headerContent}\n </span>\n </Fragment>\n );\n };\n\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n ...props.style,\n };\n\n const cname = classNames(\n 'drag-collapse',\n {\n 'drag-collapse-grap': props.isGray,\n 'drag-collapse-last': props.isLast,\n 'drag-collapse-drag-disabled': isDisabled,\n },\n props.className\n );\n return (\n <Collapse\n activeKey={props.isActive ? props.uid : undefined}\n accordion\n className={cname}\n collapsible={props.collapsible}\n expandIcon={props.expandIcon}\n expandIconPosition={props.expandIconPosition}\n size={props.size}\n onChange={props.onChange?.bind(null, props.uid)}\n style={{ ...style }}\n ref={setNodeRef}\n items={[\n {\n key: props.uid,\n label: header(),\n children: (\n <Fragment>\n {props.content({\n formListFieldData: props.formListFieldData,\n operation: props.formListOperate,\n uid: props.uid,\n formStageCompleteName: props.formStageCompleteName,\n getInsideFormItemName: (key: string | string[]) => {\n return [props.formListFieldData.name, ...toArray(key)] as (\n | string\n | number\n )[];\n },\n getInsideFormItemData: () => {\n return form.getFieldValue(props.formStageCompleteName) || {};\n },\n index: props.index,\n })}\n </Fragment>\n ),\n },\n ]}\n />\n );\n}\n","import { Fragment, useMemo, useRef, useState } from 'react';\nimport type { FormListFieldData } from 'antd';\nimport { Form } from 'antd';\nimport { arrayRemove, classNames } from '@dimjs/utils';\nimport { closestCenter, DndContext, DragOverlay } from '@dnd-kit/core';\nimport {\n arrayMove,\n SortableContext,\n verticalListSortingStrategy,\n} from '@dnd-kit/sortable';\nimport type { TAny, TPlainObject } from '@flatbiz/utils';\nimport { toArray } from '@flatbiz/utils';\nimport { hooks } from '@wove/react';\nimport { fbaHooks } from '../fba-hooks/index.js';\nimport { SortableItem } from './sortable-item.jsx';\nimport type { DragCollapseFormListProps } from './types.js';\nimport './style.less';\n\n/**\n * 可拖拽 折叠面板+FormList\n * ```\n * 1. FormList数组中必须要有唯一值字段,默认值字段名称uid,可通过uidFieldName自定义设置名称\n * ```\n */\nexport const DragCollapseFormList = (props: DragCollapseFormListProps) => {\n const [dragActiveId, setDragActiveId] = useState<string | number>();\n const [openKeys, setOpenKeys] = useState<(number | string)[]>([]);\n const form = Form.useFormInstance();\n const formListOperationRef = useRef<FormListFieldData[]>([]);\n\n const formListCompleteName = props.formListCompleteName || props.formListName;\n const formListName = props.formListName;\n\n const formListValue = Form.useWatch(formListCompleteName, form);\n\n const getUidValue = hooks.useCallbackRef((item) => {\n return item?.[props.uidFieldName || 'uid'] as string | number;\n });\n\n fbaHooks.useEffectCustom(() => {\n const defaultActiveKeys = toArray<string | number>(props.defaultActiveKey);\n if (!props.activeKey && defaultActiveKeys.length > 0) {\n setOpenKeys(defaultActiveKeys);\n } else {\n setOpenKeys(toArray(props.activeKey));\n }\n }, []);\n\n hooks.useUpdateEffect(() => {\n setOpenKeys(toArray(props.activeKey));\n }, [props.activeKey]);\n\n const onChange = (key: number | string) => {\n let openKeysNew: (number | string)[] = [];\n if (props.accordion) {\n if (openKeys[0] && openKeys[0] === key) {\n openKeysNew = [];\n } else {\n openKeysNew = [key];\n }\n } else {\n const has = openKeys.includes(key);\n if (has) {\n const result = arrayRemove(openKeys, key);\n openKeysNew = [...result];\n } else {\n openKeysNew = openKeys.concat(key);\n }\n }\n setOpenKeys(openKeysNew);\n if (props.accordion) {\n props.onChange?.(openKeysNew.length ? openKeysNew[0] : undefined);\n } else {\n props.onChange?.(openKeysNew.length ? openKeysNew : undefined);\n }\n };\n\n function handleDragStart(event) {\n const { active } = event;\n setDragActiveId(active.id);\n }\n\n const getItems = hooks.useCallbackRef(() => {\n return (form.getFieldValue(formListCompleteName) || []) as TPlainObject[];\n });\n\n function handleDragEnd(event) {\n const { active, over } = event;\n const items = getItems();\n if (active.id !== over.id) {\n const oldIndex = items.findIndex(\n (item) => getUidValue(item) === active.id\n );\n const newIndex = items.findIndex((item) => getUidValue(item) === over.id);\n const newList = arrayMove<TPlainObject>(items, oldIndex, newIndex);\n form.setFields([{ name: formListCompleteName, value: newList }]);\n props.onDropChange?.(newList);\n }\n setDragActiveId(undefined);\n }\n\n const dragOverlayItem = useMemo(() => {\n if (!dragActiveId) return undefined;\n const items = getItems();\n const targetIndex = items.findIndex(\n (item) => getUidValue(item) === dragActiveId\n );\n return formListOperationRef.current.find(\n (item) => item.name === targetIndex\n );\n }, [dragActiveId, getItems, getUidValue]);\n\n const cName = classNames(\n 'drag-collapse-formlist-wrapper',\n { 'dcfw-isEmpty': toArray(formListValue).length === 0 },\n props.className\n );\n return (\n <div className={cName} style={props.style}>\n <DndContext\n collisionDetection={closestCenter}\n onDragStart={handleDragStart}\n onDragEnd={handleDragEnd}\n >\n <Form.List name={formListName} rules={props.rules}>\n {(fields, operate) => {\n formListOperationRef.current = fields;\n return (\n <Fragment>\n <SortableContext\n items={getItems().map((temp) => getUidValue(temp))}\n strategy={verticalListSortingStrategy}\n >\n <Fragment>\n {fields.map((item, index) => {\n const uid = getUidValue(getItems()[index]);\n return (\n <SortableItem\n formListOperate={operate}\n formListFieldData={item}\n uid={uid}\n key={`${uid}-${item.key}`}\n isActive={openKeys.includes(uid)}\n collapsible={props.collapsible}\n expandIcon={props.expandIcon}\n expandIconPosition={props.expandIconPosition}\n size={props.size}\n dragIcon={props.dragIcon}\n getItemDragDisabled={props.getItemDragDisabled}\n dragDisabled={props.dragDisabled}\n onChange={onChange}\n isGray={uid === dragActiveId}\n isLast={index === getItems().length - 1}\n header={props.header}\n content={props.content}\n index={index}\n formStageCompleteName={[\n ...toArray<string | number>(formListCompleteName),\n item.name,\n ]}\n />\n );\n })}\n </Fragment>\n </SortableContext>\n <DragOverlay dropAnimation={{ duration: 0 }}>\n {dragActiveId && dragOverlayItem ? (\n <SortableItem\n isOverlay={true}\n uid={dragActiveId}\n key={dragActiveId}\n className=\"overlay-sortable-item\"\n formListFieldData={dragOverlayItem}\n isActive={openKeys.includes(dragActiveId)}\n collapsible={props.collapsible}\n expandIcon={props.expandIcon}\n expandIconPosition={props.expandIconPosition}\n size={props.size}\n dragIcon={props.dragIcon}\n onChange={onChange}\n header={props.header}\n content={props.content}\n formListOperate={null as TAny}\n index={0}\n formStageCompleteName={[\n ...toArray<string | number>(formListCompleteName),\n dragOverlayItem.name,\n ]}\n />\n ) : null}\n </DragOverlay>\n </Fragment>\n );\n }}\n </Form.List>\n </DndContext>\n </div>\n );\n};\n"],"names":["SortableItem","props","_props$getItemDragDis","_props$onChange","form","Form","useFormInstance","isDisabled","isOverlay","getItemDragDisabled","call","uid","index","_useSortable","useSortable","id","disabled","listeners","setNodeRef","transform","transition","header","dragIcon","_jsx","_DragOutlined","headerContent","formListFieldData","operation","formListOperate","formStageCompleteName","getInsideFormItemName","key","name","concat","_toConsumableArray","toArray","getInsideFormItemData","getFieldValue","dragDisabled","_jsxs","Fragment","children","_objectSpread","className","style","headerStyle","CSS","Transform","toString","cname","_classNames","isGray","isLast","Collapse","activeKey","isActive","undefined","accordion","collapsible","expandIcon","expandIconPosition","size","onChange","bind","ref","items","label","content","DragCollapseFormList","_useState","useState","_useState2","_slicedToArray","dragActiveId","setDragActiveId","_useState3","_useState4","openKeys","setOpenKeys","formListOperationRef","useRef","formListCompleteName","formListName","formListValue","useWatch","getUidValue","_hooks","useCallbackRef","item","uidFieldName","fbaHooks","useEffectCustom","defaultActiveKeys","defaultActiveKey","length","useUpdateEffect","openKeysNew","has","includes","result","_arrayRemove","_props$onChange2","handleDragStart","event","active","getItems","handleDragEnd","over","_props$onDropChange","oldIndex","findIndex","newIndex","newList","arrayMove","setFields","value","onDropChange","dragOverlayItem","useMemo","targetIndex","current","find","cName","DndContext","collisionDetection","closestCenter","onDragStart","onDragEnd","List","rules","fields","operate","SortableContext","map","temp","strategy","verticalListSortingStrategy","DragOverlay","dropAnimation","duration"],"mappings":";;;;;;;;;;;;;;;;AAkCO,SAASA,YAAYA,CAACC,KAAwB,EAAE;EAAA,IAAAC,qBAAA,EAAAC,eAAA;AACrD,EAAA,IAAMC,IAAI,GAAGC,IAAI,CAACC,eAAe,EAAE;AACnC,EAAA,IAAMC,UAAU,GAAGN,KAAK,CAACO,SAAS,GAC9B,KAAK,GAAA,CAAAN,qBAAA,GACLD,KAAK,CAACQ,mBAAmB,MAAA,IAAA,IAAAP,qBAAA,KAAA,MAAA,GAAA,MAAA,GAAzBA,qBAAA,CAAAQ,IAAA,CAAAT,KAAK,EAAuBA,KAAK,CAACU,GAAG,EAAEV,KAAK,CAACW,KAAK,CAAC;EACvD,IAAAC,YAAA,GAAyDC,WAAW,CAAC;MACnEC,EAAE,EAAEd,KAAK,CAACU,GAAG;AACbK,MAAAA,QAAQ,EAAET;AACZ,KAAC,CAAC;IAHMU,SAAS,GAAAJ,YAAA,CAATI,SAAS;IAAEC,UAAU,GAAAL,YAAA,CAAVK,UAAU;IAAEC,SAAS,GAAAN,YAAA,CAATM,SAAS;IAAEC,UAAU,GAAAP,YAAA,CAAVO,UAAU;AAKpD,EAAA,IAAMC,MAAM,GAAG,SAATA,MAAMA,GAAS;AACnB,IAAA,IAAMC,QAAQ,GAAGrB,KAAK,CAACqB,QAAQ,GAAGrB,KAAK,CAACqB,QAAQ,gBAAGC,GAAA,CAAAC,aAAA,IAAe,CAAC;AACnE,IAAA,IAAMC,aAAa,GAAGxB,KAAK,CAACoB,MAAM,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;OACS;KACD;AAAC,GACV,CAAC;AAEV;;;;"}
@@ -1 +1 @@
1
- .drag-collapse-formlist-wrapper.dcfw-isEmpty{border:none}.drag-collapse-formlist-wrapper{border:1px solid #d9d9d9;border-radius:8px;overflow:hidden}.drag-collapse-formlist-wrapper .drag-collapse{background-color:#fafafa}.drag-collapse-formlist-wrapper .drag-collapse>.ant-collapse-item{border-radius:0}.drag-collapse-formlist-wrapper .drag-collapse .ant-collapse-header{align-items:center;border-radius:0}.drag-collapse-formlist-wrapper .drag-collapse .ant-collapse-content{border-radius:0}.drag-collapse-formlist-wrapper .drag-collapse .ant-collapse-header-text{align-items:center;display:flex}.drag-collapse-formlist-wrapper .drag-collapse .dc-drag-header-content{flex:1}.drag-collapse-formlist-wrapper .drag-collapse:not(.overlay-sortable-item){border:none;border-radius:0}.drag-collapse-formlist-wrapper .dc-drag-trigger{align-items:center;border-radius:6px;cursor:move;display:inline-flex;font-size:16px;height:30px;justify-content:center;margin-right:5px;width:30px}.drag-collapse-formlist-wrapper .dc-drag-trigger:hover{background-color:rgba(0,0,0,.1)}.drag-collapse-formlist-wrapper .drag-collapse-grap *{opacity:.7!important}.drag-collapse-formlist-wrapper .overlay-sortable-item{border:none;border-radius:6px;box-shadow:0 0 12px 4px rgba(34,33,81,.1)}.drag-collapse-formlist-wrapper .overlay-sortable-item .ant-collapse-item{border-bottom:none}.drag-collapse-formlist-wrapper .overlay-sortable-item .dc-drag-trigger{background-color:transparent}.drag-collapse-formlist-wrapper .drag-collapse-last .ant-collapse-item{border-bottom:none}.drag-collapse-formlist-wrapper .drag-collapse-drag-disabled .dc-drag-trigger{cursor:no-drop;opacity:.6}
1
+ .drag-collapse-formlist-wrapper.dcfw-isEmpty{border:none}.drag-collapse-formlist-wrapper{border:1px solid #d9d9d9;border-radius:8px;overflow:hidden}.drag-collapse-formlist-wrapper .drag-collapse{background-color:#fafafa}.drag-collapse-formlist-wrapper .drag-collapse>.ant-collapse-item{border-bottom:none;border-radius:0}.drag-collapse-formlist-wrapper .drag-collapse .ant-collapse-header{align-items:center;border-radius:0}.drag-collapse-formlist-wrapper .drag-collapse .ant-collapse-content{border-radius:0}.drag-collapse-formlist-wrapper .drag-collapse .ant-collapse-header-text{align-items:center;display:flex}.drag-collapse-formlist-wrapper .drag-collapse .dc-drag-header-content{flex:1}.drag-collapse-formlist-wrapper .drag-collapse:not(.overlay-sortable-item){border:none;border-bottom:1px solid #d9d9d9;border-radius:0}.drag-collapse-formlist-wrapper .drag-collapse:not(.overlay-sortable-item).drag-collapse-last{border-bottom:none}.drag-collapse-formlist-wrapper .dc-drag-trigger{align-items:center;border-radius:6px;cursor:move;display:inline-flex;font-size:16px;height:30px;justify-content:center;margin-right:5px;width:30px}.drag-collapse-formlist-wrapper .dc-drag-trigger:hover{background-color:rgba(0,0,0,.1)}.drag-collapse-formlist-wrapper .drag-collapse-grap *{opacity:.7!important}.drag-collapse-formlist-wrapper .overlay-sortable-item{border:none;border-radius:6px;box-shadow:0 0 12px 4px rgba(34,33,81,.1)}.drag-collapse-formlist-wrapper .overlay-sortable-item .ant-collapse-item{border-bottom:none}.drag-collapse-formlist-wrapper .overlay-sortable-item .dc-drag-trigger{background-color:transparent}.drag-collapse-formlist-wrapper .drag-collapse-last .ant-collapse-item{border-bottom:none}.drag-collapse-formlist-wrapper .drag-collapse-drag-disabled .dc-drag-trigger{cursor:no-drop;opacity:.6}
@@ -1,6 +1,6 @@
1
1
  import { TPlainObject } from '@flatbiz/utils';
2
2
  import { CollapseProps, FormListFieldData, FormListOperation } from 'antd';
3
- import { FormListProps } from 'antd/lib/form/index.js';
3
+ import { FormListProps } from 'antd/es/form/FormList.js';
4
4
  import { CSSProperties, ReactElement } from 'react';
5
5
 
6
6
  export type DragCollapseFormListContentProps = {
@@ -26,12 +26,23 @@ export type DragCollapseFormListProps = {
26
26
  style?: CSSProperties;
27
27
  /** formList name */
28
28
  formListName: string | number | (string | number)[];
29
+ /**
30
+ * 当前组件嵌套在formList内部时,必传
31
+ * ```
32
+ * 1. 外层formList name:dataList
33
+ * 则
34
+ * 第一种情况 formListCompleteName = [...formStageCompleteName, 'innerList']
35
+ * 第二种情况 formListCompleteName = ['dataList', formListFieldData.name, 'innerList']
36
+ * ```
37
+ * 例如:
38
+ */
39
+ formListCompleteName?: (string | number)[];
29
40
  /** 拖拽面板回调 */
30
41
  onDropChange?: (items: TPlainObject[]) => void;
31
42
  /** 手风琴模式,只允许单个内容区域展开 */
32
43
  accordion?: boolean;
33
44
  /** 当前激活 tab 面板的key */
34
- activeKey?: (string | number)[];
45
+ activeKey?: number | number[];
35
46
  /** 所有子面板是否可折叠或指定可折叠触发区域,可选: header | icon | disabled */
36
47
  collapsible?: CollapseProps["collapsible"];
37
48
  /** 初始化选中面板的 key */
@@ -3,7 +3,7 @@ import './../fba-hooks/index.css';
3
3
  import './index.css';
4
4
  /*! @flatjs/forge MIT @flatbiz/antd */
5
5
 
6
- export { D as DragCollapseFormList } from '../drag-collapse-1Y9ZTDMT.js';
6
+ export { D as DragCollapseFormList } from '../drag-collapse-DXDZYoVh.js';
7
7
  import '@dimjs/utils/class-names/class-names';
8
8
  import '../_rollupPluginBabelHelpers-BspM60Sw.js';
9
9
  import '@dimjs/utils/array/array-remove';
@@ -426,6 +426,7 @@ export type DragEditableCardProps = Omit<EditableCardProps, "onCustomWrapper"> &
426
426
  * 可拖拽编辑卡片
427
427
  * ```
428
428
  * 1. 卡片数组必须有唯一值字段,通过参数 uidFieldKey 告诉组件
429
+ * 2. Demo: https://fex.qa.tcshuke.com/docs/admin/main/form/list
429
430
  * ```
430
431
  */
431
432
  export declare const DragEditableCard: (props: DragEditableCardProps) => import("react").JSX.Element;
@@ -5,7 +5,7 @@ import './../pre-defined-class-name/index.css';
5
5
  import './index.css';
6
6
  /*! @flatjs/forge MIT @flatbiz/antd */
7
7
 
8
- export { D as DragEditableCard } from '../editable-card-DwtvwP2a.js';
8
+ export { D as DragEditableCard } from '../editable-card-Bbav4SQe.js';
9
9
  import '../_rollupPluginBabelHelpers-BspM60Sw.js';
10
10
  import 'antd';
11
11
  import '@dnd-kit/core';
@@ -1,7 +1,6 @@
1
1
  import { TAny, TPlainObject } from '@flatbiz/utils';
2
2
  import { DatePicker, FormItemProps, FormListFieldData, FormListOperation, GetProps, InputNumberProps, InputProps, PopoverProps, RadioGroupProps, SelectProps, SwitchProps, TableProps, TooltipProps, UploadFile, UploadProps } from 'antd';
3
3
  import { CheckboxGroupProps } from 'antd/lib/checkbox/index.js';
4
- import { PickerProps } from 'antd/lib/date-picker/generatePicker/index.js';
5
4
  import { FormListProps } from 'antd/lib/form/index.js';
6
5
  import { TextAreaProps } from 'antd/lib/input/index.js';
7
6
  import { ColumnsType } from 'antd/lib/table/index.js';
@@ -29,7 +28,8 @@ export type TipsWrapperProps = {
29
28
  trigger?: "icon" | "all";
30
29
  };
31
30
  export type TDayjsDateType = "YYYY-MM-DD HH:mm:ss" | "YYYY-MM-DD HH:mm" | "YYYY-MM-DD HH" | "YYYY-MM-DD" | (string & {});
32
- export type DatePickerWrapperProps = Omit<PickerProps<TAny>, "value" | "onChange" | "format"> & {
31
+ export type DatePickerType = GetProps<typeof DatePicker>;
32
+ export type DatePickerWrapperProps = Omit<DatePickerType, "value" | "onChange" | "format" | "picker"> & {
33
33
  /** 默认格式为 'YYYY-MM-DD' */
34
34
  value?: string;
35
35
  onChange?: (value?: string) => void;
@@ -50,8 +50,8 @@ export type DatePickerWrapperProps = Omit<PickerProps<TAny>, "value" | "onChange
50
50
  /** value 输入适配 */
51
51
  inputNormalize?: (value?: TAny) => string | undefined;
52
52
  };
53
- export type RangePickerDateProps = GetProps<typeof DatePicker.RangePicker>;
54
- export type DateRangePickerWrapperProps = Omit<RangePickerDateProps, "value" | "onChange" | "onCalendarChange" | "format"> & {
53
+ export type DateRangePickerType = GetProps<typeof DatePicker.RangePicker>;
54
+ export type DateRangePickerWrapperProps = Omit<DateRangePickerType, "value" | "onChange" | "onCalendarChange" | "format" | "picker"> & {
55
55
  value?: [
56
56
  string,
57
57
  string
@@ -395,6 +395,22 @@ export type EditableTableColumn = Omit<ColumnsType["0"], "render"> & {
395
395
  * 1. title为string类型有效
396
396
  * 2. 可为icon添加提示效果
397
397
  * 3. 可为icon添加点击事件
398
+ *
399
+ * 例如
400
+ * tipsWrapperProps: {
401
+ * tipType: 'tooltip',
402
+ * tooltipProps: {
403
+ * title: '我是内容',
404
+ * },
405
+ * }
406
+ *
407
+ * tipsWrapperProps: {
408
+ * tipType: 'popover',
409
+ * popoverProps: {
410
+ * title: '我是标题',
411
+ * content: '我是内容',
412
+ * },
413
+ * },
398
414
  * ```
399
415
  */
400
416
  tipsWrapperProps?: string | TipsWrapperProps;
@@ -9,13 +9,13 @@ import './../tag-list-render/index.css';
9
9
  import './index.css';
10
10
  /*! @flatjs/forge MIT @flatbiz/antd */
11
11
 
12
- export { D as DragEditableTable } from '../drag-DT_ZyPqJ.js';
12
+ export { D as DragEditableTable } from '../drag-CBKS7dDq.js';
13
13
  import '../_rollupPluginBabelHelpers-BspM60Sw.js';
14
14
  import 'antd';
15
15
  import '@dnd-kit/core';
16
16
  import '@dnd-kit/modifiers';
17
17
  import '@dnd-kit/sortable';
18
- import '../editable-table-0f-H4DHt.js';
18
+ import '../editable-table-DUIw-2er.js';
19
19
  import '@ant-design/icons/es/icons/PlusOutlined.js';
20
20
  import '@dimjs/utils/class-names/class-names';
21
21
  import 'react';
@@ -49,7 +49,7 @@ import '../symbol-DcM8okBP.js';
49
49
  import '../tips-wrapper-DvbgHMwl.js';
50
50
  import '@ant-design/icons/es/icons/QuestionCircleOutlined.js';
51
51
  import '../form-item-hidden-BtQvJEx7.js';
52
- import '../cell-render-1gunNiMm.js';
52
+ import '../cell-render-Dgbpd4Zn.js';
53
53
  import '@dimjs/lang/is-string';
54
54
  import '@dimjs/lang/is-object';
55
55
  import '@dimjs/utils/get/get';
@@ -67,16 +67,16 @@ import 'ahooks';
67
67
  import '../flex-layout-BGtMe7zr.js';
68
68
  import '@wove/react/create-ctx';
69
69
  import '../tag-list-DrmpuEDJ.js';
70
- import '../date-picker-wrapper-D0_g483p.js';
70
+ import '../date-BpBhtJIk.js';
71
71
  import '../time-Cv4_lLXu.js';
72
- import '../date-range-picker-wrapper-BYOsf0I5.js';
72
+ import '../date-range-picker-wrapper-DMQLIXbV.js';
73
73
  import '../input-wrapper-hEJP2UIk.js';
74
- import '../selector-wrapper-B5PUm15M.js';
74
+ import '../selector-wrapper-BJEilqPP.js';
75
75
  import '@ant-design/icons/es/icons/RedoOutlined.js';
76
76
  import '../index-C6y8q2MK.js';
77
77
  import '../_commonjsHelpers-a3yINl_6.js';
78
- import '../request-status-CTleOQtX.js';
79
- import '../text-overflow-C42UFIyh.js';
78
+ import '../request-status-Cjtei7Bl.js';
79
+ import '../text-overflow-B4NevAuv.js';
80
80
  import '@ant-design/icons/es/icons/SyncOutlined.js';
81
81
  import '../icon-wrapper-DE97bI14.js';
82
82
  import '@dimjs/lang/is-deep-equal';
@@ -117,9 +117,11 @@ export interface EditableTableProOperation {
117
117
  /** 当前行表单验证,需要自行指定nameList(dataIndex数组) */
118
118
  validateRowFields: (nameList: EditableTableProDataIndex[]) => Promise<void>;
119
119
  }
120
- export type EditableTableProColumnItem = Omit<ColumnsType[0], "render" | "title" | "dataIndex"> & {
120
+ export type EditableTableProColumnItem = Omit<ColumnsType[0], "render" | "title" | "dataIndex" | "hidden"> & {
121
121
  title?: ReactElement | string;
122
122
  dataIndex?: EditableTableProDataIndex;
123
+ /** 是否隐藏 */
124
+ hidden?: boolean;
123
125
  /** Form.Item props */
124
126
  formItemProps?: Omit<FormItemWrapperProps, "children" | "name"> | ((value: TAny, record: TPlainObject, index: number, operation: EditableTableProOperation) => Omit<FormItemWrapperProps, "children" | "name">);
125
127
  /**
@@ -4,13 +4,13 @@ import './../pre-defined-class-name/index.css';
4
4
  import './index.css';
5
5
  /*! @flatjs/forge MIT @flatbiz/antd */
6
6
 
7
- export { D as DragEditableTablePro } from '../drag-BwrUqnt-.js';
7
+ export { D as DragEditableTablePro } from '../drag-Bt_Onr60.js';
8
8
  import '../_rollupPluginBabelHelpers-BspM60Sw.js';
9
9
  import 'antd';
10
10
  import '@dnd-kit/core';
11
11
  import '@dnd-kit/modifiers';
12
12
  import '@dnd-kit/sortable';
13
- import '../editable-table-pro-TuKFc80d.js';
13
+ import '../editable-table-pro-CIa0-oBZ.js';
14
14
  import '@ant-design/icons/es/icons/PlusOutlined.js';
15
15
  import '@ant-design/icons/es/icons/CloseCircleFilled.js';
16
16
  import '@dimjs/utils/class-names/class-names';
@@ -44,6 +44,22 @@ export type TEasyTableTableColumn<T> = ColumnsType<T>[0] & {
44
44
  * 1. title为string类型有效
45
45
  * 2. 可为icon添加提示效果
46
46
  * 3. 可为icon添加点击事件
47
+ *
48
+ * 例如
49
+ * tipsWrapperProps: {
50
+ * tipType: 'tooltip',
51
+ * tooltipProps: {
52
+ * title: '我是内容',
53
+ * },
54
+ * }
55
+ *
56
+ * tipsWrapperProps: {
57
+ * tipType: 'popover',
58
+ * popoverProps: {
59
+ * title: '我是标题',
60
+ * content: '我是内容',
61
+ * },
62
+ * },
47
63
  * ```
48
64
  */
49
65
  tipsWrapperProps?: string | TipsWrapperProps;
@@ -236,6 +252,13 @@ export type EasyTableProps = {
236
252
  * ```
237
253
  */
238
254
  breforeRequest?: (form: FormInstance) => Promise<void>;
255
+ /**
256
+ * 指定查询条件验证的formItemKeys,设置后条件回车查询事件失效
257
+ * ```
258
+ * 1. 当EasyTable处在Form内部时,设置此函数可控制验证字段、控制获取数据
259
+ * ```
260
+ */
261
+ filterFormItemKeys?: string[];
239
262
  };
240
263
  export type EasyTableRefApi = {
241
264
  /** 外部发起请求服务 */
@@ -261,13 +284,15 @@ export type EasyTableRefApi = {
261
284
  */
262
285
  dataSource: TAny;
263
286
  /**
264
- * 接口数据源
287
+ * 接口数据源,完整的接口数据
265
288
  * ```
266
289
  * 1. 每次获取到的都是新的实例
267
290
  * 2. 可使用 easyTableRefApi.dataSource,获取不变实例
268
291
  * ```
269
292
  */
270
293
  getDataSource: () => TAny;
294
+ /** 获取表格列表数据 */
295
+ getTableDataList: () => TPlainObject[];
271
296
  /** 过滤表格数据源,不会触发 onDataSourceChange 函数 */
272
297
  onFilterDataSource: (dataSource: TPlainObject[]) => void;
273
298
  /** 清空表格数据 */