{"ast":null,"code":"\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { INTERNAL_HOOKS } from 'rc-table';\nimport { convertChildrenToColumns } from \"rc-table/es/hooks/useColumns\";\nimport omit from \"rc-util/es/omit\";\nimport useProxyImperativeHandle from '../_util/hooks/useProxyImperativeHandle';\nimport scrollTo from '../_util/scrollTo';\nimport { devUseWarning } from '../_util/warning';\nimport { ConfigContext } from '../config-provider/context';\nimport DefaultRenderEmpty from '../config-provider/defaultRenderEmpty';\nimport useCSSVarCls from '../config-provider/hooks/useCSSVarCls';\nimport useSize from '../config-provider/hooks/useSize';\nimport useBreakpoint from '../grid/hooks/useBreakpoint';\nimport defaultLocale from '../locale/en_US';\nimport Pagination from '../pagination';\nimport Spin from '../spin';\nimport { useToken } from '../theme/internal';\nimport renderExpandIcon from './ExpandIcon';\nimport useContainerWidth from './hooks/useContainerWidth';\nimport useFilter, { getFilterData } from './hooks/useFilter';\nimport useLazyKVMap from './hooks/useLazyKVMap';\nimport usePagination, { DEFAULT_PAGE_SIZE, getPaginationParam } from './hooks/usePagination';\nimport useSelection from './hooks/useSelection';\nimport useSorter, { getSortData } from './hooks/useSorter';\nimport useTitleColumns from './hooks/useTitleColumns';\nimport RcTable from './RcTable';\nimport RcVirtualTable from './RcTable/VirtualTable';\nimport useStyle from './style';\nconst EMPTY_LIST = [];\nconst InternalTable = (props, ref) => {\n var _a, _b;\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n style,\n size: customizeSize,\n bordered,\n dropdownPrefixCls: customizeDropdownPrefixCls,\n dataSource,\n pagination,\n rowSelection,\n rowKey = 'key',\n rowClassName,\n columns,\n children,\n childrenColumnName: legacyChildrenColumnName,\n onChange,\n getPopupContainer,\n loading,\n expandIcon,\n expandable,\n expandedRowRender,\n expandIconColumnIndex,\n indentSize,\n scroll,\n sortDirections,\n locale,\n showSorterTooltip = {\n target: 'full-header'\n },\n virtual\n } = props;\n const warning = devUseWarning('Table');\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof rowKey === 'function' && rowKey.length > 1), 'usage', '`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected.') : void 0;\n }\n const baseColumns = React.useMemo(() => columns || convertChildrenToColumns(children), [columns, children]);\n const needResponsive = React.useMemo(() => baseColumns.some(col => col.responsive), [baseColumns]);\n const screens = useBreakpoint(needResponsive);\n const mergedColumns = React.useMemo(() => {\n const matched = new Set(Object.keys(screens).filter(m => screens[m]));\n return baseColumns.filter(c => !c.responsive || c.responsive.some(r => matched.has(r)));\n }, [baseColumns, screens]);\n const tableProps = omit(props, ['className', 'style', 'columns']);\n const {\n locale: contextLocale = defaultLocale,\n direction,\n table,\n renderEmpty,\n getPrefixCls,\n getPopupContainer: getContextPopupContainer\n } = React.useContext(ConfigContext);\n const mergedSize = useSize(customizeSize);\n const tableLocale = Object.assign(Object.assign({}, contextLocale.Table), locale);\n const rawData = dataSource || EMPTY_LIST;\n const prefixCls = getPrefixCls('table', customizePrefixCls);\n const dropdownPrefixCls = getPrefixCls('dropdown', customizeDropdownPrefixCls);\n const [, token] = useToken();\n const rootCls = useCSSVarCls(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls, rootCls);\n const mergedExpandable = Object.assign(Object.assign({\n childrenColumnName: legacyChildrenColumnName,\n expandIconColumnIndex\n }, expandable), {\n expandIcon: (_a = expandable === null || expandable === void 0 ? void 0 : expandable.expandIcon) !== null && _a !== void 0 ? _a : (_b = table === null || table === void 0 ? void 0 : table.expandable) === null || _b === void 0 ? void 0 : _b.expandIcon\n });\n const {\n childrenColumnName = 'children'\n } = mergedExpandable;\n const expandType = React.useMemo(() => {\n if (rawData.some(item => item === null || item === void 0 ? void 0 : item[childrenColumnName])) {\n return 'nest';\n }\n if (expandedRowRender || (expandable === null || expandable === void 0 ? void 0 : expandable.expandedRowRender)) {\n return 'row';\n }\n return null;\n }, [rawData]);\n const internalRefs = {\n body: React.useRef()\n };\n // ============================ Width =============================\n const getContainerWidth = useContainerWidth(prefixCls);\n // ============================= Refs =============================\n const rootRef = React.useRef(null);\n const tblRef = React.useRef(null);\n useProxyImperativeHandle(ref, () => Object.assign(Object.assign({}, tblRef.current), {\n nativeElement: rootRef.current\n }));\n // ============================ RowKey ============================\n const getRowKey = React.useMemo(() => {\n if (typeof rowKey === 'function') {\n return rowKey;\n }\n return record => record === null || record === void 0 ? void 0 : record[rowKey];\n }, [rowKey]);\n const [getRecordByKey] = useLazyKVMap(rawData, childrenColumnName, getRowKey);\n // ============================ Events =============================\n const changeEventInfo = {};\n const triggerOnChange = function (info, action) {\n let reset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var _a, _b, _c, _d;\n const changeInfo = Object.assign(Object.assign({}, changeEventInfo), info);\n if (reset) {\n (_a = changeEventInfo.resetPagination) === null || _a === void 0 ? void 0 : _a.call(changeEventInfo);\n // Reset event param\n if ((_b = changeInfo.pagination) === null || _b === void 0 ? void 0 : _b.current) {\n changeInfo.pagination.current = 1;\n }\n // Trigger pagination events\n if (pagination) {\n (_c = pagination.onChange) === null || _c === void 0 ? void 0 : _c.call(pagination, 1, (_d = changeInfo.pagination) === null || _d === void 0 ? void 0 : _d.pageSize);\n }\n }\n if (scroll && scroll.scrollToFirstRowOnChange !== false && internalRefs.body.current) {\n scrollTo(0, {\n getContainer: () => internalRefs.body.current\n });\n }\n onChange === null || onChange === void 0 ? void 0 : onChange(changeInfo.pagination, changeInfo.filters, changeInfo.sorter, {\n currentDataSource: getFilterData(getSortData(rawData, changeInfo.sorterStates, childrenColumnName), changeInfo.filterStates, childrenColumnName),\n action\n });\n };\n /**\n * Controlled state in `columns` is not a good idea that makes too many code (1000+ line?) to read\n * state out and then put it back to title render. Move these code into `hooks` but still too\n * complex. We should provides Table props like `sorter` & `filter` to handle control in next big\n * version.\n */\n // ============================ Sorter =============================\n const onSorterChange = (sorter, sorterStates) => {\n triggerOnChange({\n sorter,\n sorterStates\n }, 'sort', false);\n };\n const [transformSorterColumns, sortStates, sorterTitleProps, getSorters] = useSorter({\n prefixCls,\n mergedColumns,\n onSorterChange,\n sortDirections: sortDirections || ['ascend', 'descend'],\n tableLocale,\n showSorterTooltip\n });\n const sortedData = React.useMemo(() => getSortData(rawData, sortStates, childrenColumnName), [rawData, sortStates]);\n changeEventInfo.sorter = getSorters();\n changeEventInfo.sorterStates = sortStates;\n // ============================ Filter ============================\n const onFilterChange = (filters, filterStates) => {\n triggerOnChange({\n filters,\n filterStates\n }, 'filter', true);\n };\n const [transformFilterColumns, filterStates, filters] = useFilter({\n prefixCls,\n locale: tableLocale,\n dropdownPrefixCls,\n mergedColumns,\n onFilterChange,\n getPopupContainer: getPopupContainer || getContextPopupContainer,\n rootClassName: classNames(rootClassName, rootCls)\n });\n const mergedData = getFilterData(sortedData, filterStates, childrenColumnName);\n changeEventInfo.filters = filters;\n changeEventInfo.filterStates = filterStates;\n // ============================ Column ============================\n const columnTitleProps = React.useMemo(() => {\n const mergedFilters = {};\n Object.keys(filters).forEach(filterKey => {\n if (filters[filterKey] !== null) {\n mergedFilters[filterKey] = filters[filterKey];\n }\n });\n return Object.assign(Object.assign({}, sorterTitleProps), {\n filters: mergedFilters\n });\n }, [sorterTitleProps, filters]);\n const [transformTitleColumns] = useTitleColumns(columnTitleProps);\n // ========================== Pagination ==========================\n const onPaginationChange = (current, pageSize) => {\n triggerOnChange({\n pagination: Object.assign(Object.assign({}, changeEventInfo.pagination), {\n current,\n pageSize\n })\n }, 'paginate');\n };\n const [mergedPagination, resetPagination] = usePagination(mergedData.length, onPaginationChange, pagination);\n changeEventInfo.pagination = pagination === false ? {} : getPaginationParam(mergedPagination, pagination);\n changeEventInfo.resetPagination = resetPagination;\n // ============================= Data =============================\n const pageData = React.useMemo(() => {\n if (pagination === false || !mergedPagination.pageSize) {\n return mergedData;\n }\n const {\n current = 1,\n total,\n pageSize = DEFAULT_PAGE_SIZE\n } = mergedPagination;\n process.env.NODE_ENV !== \"production\" ? warning(current > 0, 'usage', '`current` should be positive number.') : void 0;\n // Dynamic table data\n if (mergedData.length < total) {\n if (mergedData.length > pageSize) {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'usage', '`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode.') : void 0;\n return mergedData.slice((current - 1) * pageSize, current * pageSize);\n }\n return mergedData;\n }\n return mergedData.slice((current - 1) * pageSize, current * pageSize);\n }, [!!pagination, mergedData, mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.current, mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.pageSize, mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.total]);\n // ========================== Selections ==========================\n const [transformSelectionColumns, selectedKeySet] = useSelection({\n prefixCls,\n data: mergedData,\n pageData,\n getRowKey,\n getRecordByKey,\n expandType,\n childrenColumnName,\n locale: tableLocale,\n getPopupContainer: getPopupContainer || getContextPopupContainer\n }, rowSelection);\n const internalRowClassName = (record, index, indent) => {\n let mergedRowClassName;\n if (typeof rowClassName === 'function') {\n mergedRowClassName = classNames(rowClassName(record, index, indent));\n } else {\n mergedRowClassName = classNames(rowClassName);\n }\n return classNames({\n [`${prefixCls}-row-selected`]: selectedKeySet.has(getRowKey(record, index))\n }, mergedRowClassName);\n };\n // ========================== Expandable ==========================\n // Pass origin render status into `rc-table`, this can be removed when refactor with `rc-table`\n mergedExpandable.__PARENT_RENDER_ICON__ = mergedExpandable.expandIcon;\n // Customize expandable icon\n mergedExpandable.expandIcon = mergedExpandable.expandIcon || expandIcon || renderExpandIcon(tableLocale);\n // Adjust expand icon index, no overwrite expandIconColumnIndex if set.\n if (expandType === 'nest' && mergedExpandable.expandIconColumnIndex === undefined) {\n mergedExpandable.expandIconColumnIndex = rowSelection ? 1 : 0;\n } else if (mergedExpandable.expandIconColumnIndex > 0 && rowSelection) {\n mergedExpandable.expandIconColumnIndex -= 1;\n }\n // Indent size\n if (typeof mergedExpandable.indentSize !== 'number') {\n mergedExpandable.indentSize = typeof indentSize === 'number' ? indentSize : 15;\n }\n // ============================ Render ============================\n const transformColumns = React.useCallback(innerColumns => transformTitleColumns(transformSelectionColumns(transformFilterColumns(transformSorterColumns(innerColumns)))), [transformSorterColumns, transformFilterColumns, transformSelectionColumns]);\n let topPaginationNode;\n let bottomPaginationNode;\n if (pagination !== false && (mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.total)) {\n let paginationSize;\n if (mergedPagination.size) {\n paginationSize = mergedPagination.size;\n } else {\n paginationSize = mergedSize === 'small' || mergedSize === 'middle' ? 'small' : undefined;\n }\n const renderPagination = position => ( /*#__PURE__*/React.createElement(Pagination, Object.assign({}, mergedPagination, {\n className: classNames(`${prefixCls}-pagination ${prefixCls}-pagination-${position}`, mergedPagination.className),\n size: paginationSize\n })));\n const defaultPosition = direction === 'rtl' ? 'left' : 'right';\n const {\n position\n } = mergedPagination;\n if (position !== null && Array.isArray(position)) {\n const topPos = position.find(p => p.includes('top'));\n const bottomPos = position.find(p => p.includes('bottom'));\n const isDisable = position.every(p => `${p}` === 'none');\n if (!topPos && !bottomPos && !isDisable) {\n bottomPaginationNode = renderPagination(defaultPosition);\n }\n if (topPos) {\n topPaginationNode = renderPagination(topPos.toLowerCase().replace('top', ''));\n }\n if (bottomPos) {\n bottomPaginationNode = renderPagination(bottomPos.toLowerCase().replace('bottom', ''));\n }\n } else {\n bottomPaginationNode = renderPagination(defaultPosition);\n }\n }\n // >>>>>>>>> Spinning\n let spinProps;\n if (typeof loading === 'boolean') {\n spinProps = {\n spinning: loading\n };\n } else if (typeof loading === 'object') {\n spinProps = Object.assign({\n spinning: true\n }, loading);\n }\n const wrapperClassNames = classNames(cssVarCls, rootCls, `${prefixCls}-wrapper`, table === null || table === void 0 ? void 0 : table.className, {\n [`${prefixCls}-wrapper-rtl`]: direction === 'rtl'\n }, className, rootClassName, hashId);\n const mergedStyle = Object.assign(Object.assign({}, table === null || table === void 0 ? void 0 : table.style), style);\n const emptyText = typeof (locale === null || locale === void 0 ? void 0 : locale.emptyText) !== 'undefined' ? locale.emptyText : (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Table')) || /*#__PURE__*/React.createElement(DefaultRenderEmpty, {\n componentName: \"Table\"\n });\n // ========================== Render ==========================\n const TableComponent = virtual ? RcVirtualTable : RcTable;\n // >>> Virtual Table props. We set height here since it will affect height collection\n const virtualProps = {};\n const listItemHeight = React.useMemo(() => {\n const {\n fontSize,\n lineHeight,\n padding,\n paddingXS,\n paddingSM\n } = token;\n const fontHeight = Math.floor(fontSize * lineHeight);\n switch (mergedSize) {\n case 'large':\n return padding * 2 + fontHeight;\n case 'small':\n return paddingXS * 2 + fontHeight;\n default:\n return paddingSM * 2 + fontHeight;\n }\n }, [token, mergedSize]);\n if (virtual) {\n virtualProps.listItemHeight = listItemHeight;\n }\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"div\", {\n ref: rootRef,\n className: wrapperClassNames,\n style: mergedStyle\n }, /*#__PURE__*/React.createElement(Spin, Object.assign({\n spinning: false\n }, spinProps), topPaginationNode, /*#__PURE__*/React.createElement(TableComponent, Object.assign({}, virtualProps, tableProps, {\n ref: tblRef,\n columns: mergedColumns,\n direction: direction,\n expandable: mergedExpandable,\n prefixCls: prefixCls,\n className: classNames({\n [`${prefixCls}-middle`]: mergedSize === 'middle',\n [`${prefixCls}-small`]: mergedSize === 'small',\n [`${prefixCls}-bordered`]: bordered,\n [`${prefixCls}-empty`]: rawData.length === 0\n }, cssVarCls, rootCls, hashId),\n data: pageData,\n rowKey: getRowKey,\n rowClassName: internalRowClassName,\n emptyText: emptyText,\n // Internal\n internalHooks: INTERNAL_HOOKS,\n internalRefs: internalRefs,\n transformColumns: transformColumns,\n getContainerWidth: getContainerWidth\n })), bottomPaginationNode)));\n};\nexport default /*#__PURE__*/React.forwardRef(InternalTable);","map":{"version":3,"names":["React","classNames","INTERNAL_HOOKS","convertChildrenToColumns","omit","useProxyImperativeHandle","scrollTo","devUseWarning","ConfigContext","DefaultRenderEmpty","useCSSVarCls","useSize","useBreakpoint","defaultLocale","Pagination","Spin","useToken","renderExpandIcon","useContainerWidth","useFilter","getFilterData","useLazyKVMap","usePagination","DEFAULT_PAGE_SIZE","getPaginationParam","useSelection","useSorter","getSortData","useTitleColumns","RcTable","RcVirtualTable","useStyle","EMPTY_LIST","InternalTable","props","ref","_a","_b","prefixCls","customizePrefixCls","className","rootClassName","style","size","customizeSize","bordered","dropdownPrefixCls","customizeDropdownPrefixCls","dataSource","pagination","rowSelection","rowKey","rowClassName","columns","children","childrenColumnName","legacyChildrenColumnName","onChange","getPopupContainer","loading","expandIcon","expandable","expandedRowRender","expandIconColumnIndex","indentSize","scroll","sortDirections","locale","showSorterTooltip","target","virtual","warning","process","env","NODE_ENV","length","baseColumns","useMemo","needResponsive","some","col","responsive","screens","mergedColumns","matched","Set","Object","keys","filter","m","c","r","has","tableProps","contextLocale","direction","table","renderEmpty","getPrefixCls","getContextPopupContainer","useContext","mergedSize","tableLocale","assign","Table","rawData","token","rootCls","wrapCSSVar","hashId","cssVarCls","mergedExpandable","expandType","item","internalRefs","body","useRef","getContainerWidth","rootRef","tblRef","current","nativeElement","getRowKey","record","getRecordByKey","changeEventInfo","triggerOnChange","info","action","reset","arguments","undefined","_c","_d","changeInfo","resetPagination","call","pageSize","scrollToFirstRowOnChange","getContainer","filters","sorter","currentDataSource","sorterStates","filterStates","onSorterChange","transformSorterColumns","sortStates","sorterTitleProps","getSorters","sortedData","onFilterChange","transformFilterColumns","mergedData","columnTitleProps","mergedFilters","forEach","filterKey","transformTitleColumns","onPaginationChange","mergedPagination","pageData","total","slice","transformSelectionColumns","selectedKeySet","data","internalRowClassName","index","indent","mergedRowClassName","__PARENT_RENDER_ICON__","transformColumns","useCallback","innerColumns","topPaginationNode","bottomPaginationNode","paginationSize","renderPagination","position","createElement","defaultPosition","Array","isArray","topPos","find","p","includes","bottomPos","isDisable","every","toLowerCase","replace","spinProps","spinning","wrapperClassNames","mergedStyle","emptyText","componentName","TableComponent","virtualProps","listItemHeight","fontSize","lineHeight","padding","paddingXS","paddingSM","fontHeight","Math","floor","internalHooks","forwardRef"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/table/InternalTable.js"],"sourcesContent":["\"use client\";\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { INTERNAL_HOOKS } from 'rc-table';\nimport { convertChildrenToColumns } from \"rc-table/es/hooks/useColumns\";\nimport omit from \"rc-util/es/omit\";\nimport useProxyImperativeHandle from '../_util/hooks/useProxyImperativeHandle';\nimport scrollTo from '../_util/scrollTo';\nimport { devUseWarning } from '../_util/warning';\nimport { ConfigContext } from '../config-provider/context';\nimport DefaultRenderEmpty from '../config-provider/defaultRenderEmpty';\nimport useCSSVarCls from '../config-provider/hooks/useCSSVarCls';\nimport useSize from '../config-provider/hooks/useSize';\nimport useBreakpoint from '../grid/hooks/useBreakpoint';\nimport defaultLocale from '../locale/en_US';\nimport Pagination from '../pagination';\nimport Spin from '../spin';\nimport { useToken } from '../theme/internal';\nimport renderExpandIcon from './ExpandIcon';\nimport useContainerWidth from './hooks/useContainerWidth';\nimport useFilter, { getFilterData } from './hooks/useFilter';\nimport useLazyKVMap from './hooks/useLazyKVMap';\nimport usePagination, { DEFAULT_PAGE_SIZE, getPaginationParam } from './hooks/usePagination';\nimport useSelection from './hooks/useSelection';\nimport useSorter, { getSortData } from './hooks/useSorter';\nimport useTitleColumns from './hooks/useTitleColumns';\nimport RcTable from './RcTable';\nimport RcVirtualTable from './RcTable/VirtualTable';\nimport useStyle from './style';\nconst EMPTY_LIST = [];\nconst InternalTable = (props, ref) => {\n var _a, _b;\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n style,\n size: customizeSize,\n bordered,\n dropdownPrefixCls: customizeDropdownPrefixCls,\n dataSource,\n pagination,\n rowSelection,\n rowKey = 'key',\n rowClassName,\n columns,\n children,\n childrenColumnName: legacyChildrenColumnName,\n onChange,\n getPopupContainer,\n loading,\n expandIcon,\n expandable,\n expandedRowRender,\n expandIconColumnIndex,\n indentSize,\n scroll,\n sortDirections,\n locale,\n showSorterTooltip = {\n target: 'full-header'\n },\n virtual\n } = props;\n const warning = devUseWarning('Table');\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof rowKey === 'function' && rowKey.length > 1), 'usage', '`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected.') : void 0;\n }\n const baseColumns = React.useMemo(() => columns || convertChildrenToColumns(children), [columns, children]);\n const needResponsive = React.useMemo(() => baseColumns.some(col => col.responsive), [baseColumns]);\n const screens = useBreakpoint(needResponsive);\n const mergedColumns = React.useMemo(() => {\n const matched = new Set(Object.keys(screens).filter(m => screens[m]));\n return baseColumns.filter(c => !c.responsive || c.responsive.some(r => matched.has(r)));\n }, [baseColumns, screens]);\n const tableProps = omit(props, ['className', 'style', 'columns']);\n const {\n locale: contextLocale = defaultLocale,\n direction,\n table,\n renderEmpty,\n getPrefixCls,\n getPopupContainer: getContextPopupContainer\n } = React.useContext(ConfigContext);\n const mergedSize = useSize(customizeSize);\n const tableLocale = Object.assign(Object.assign({}, contextLocale.Table), locale);\n const rawData = dataSource || EMPTY_LIST;\n const prefixCls = getPrefixCls('table', customizePrefixCls);\n const dropdownPrefixCls = getPrefixCls('dropdown', customizeDropdownPrefixCls);\n const [, token] = useToken();\n const rootCls = useCSSVarCls(prefixCls);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls, rootCls);\n const mergedExpandable = Object.assign(Object.assign({\n childrenColumnName: legacyChildrenColumnName,\n expandIconColumnIndex\n }, expandable), {\n expandIcon: (_a = expandable === null || expandable === void 0 ? void 0 : expandable.expandIcon) !== null && _a !== void 0 ? _a : (_b = table === null || table === void 0 ? void 0 : table.expandable) === null || _b === void 0 ? void 0 : _b.expandIcon\n });\n const {\n childrenColumnName = 'children'\n } = mergedExpandable;\n const expandType = React.useMemo(() => {\n if (rawData.some(item => item === null || item === void 0 ? void 0 : item[childrenColumnName])) {\n return 'nest';\n }\n if (expandedRowRender || (expandable === null || expandable === void 0 ? void 0 : expandable.expandedRowRender)) {\n return 'row';\n }\n return null;\n }, [rawData]);\n const internalRefs = {\n body: React.useRef()\n };\n // ============================ Width =============================\n const getContainerWidth = useContainerWidth(prefixCls);\n // ============================= Refs =============================\n const rootRef = React.useRef(null);\n const tblRef = React.useRef(null);\n useProxyImperativeHandle(ref, () => Object.assign(Object.assign({}, tblRef.current), {\n nativeElement: rootRef.current\n }));\n // ============================ RowKey ============================\n const getRowKey = React.useMemo(() => {\n if (typeof rowKey === 'function') {\n return rowKey;\n }\n return record => record === null || record === void 0 ? void 0 : record[rowKey];\n }, [rowKey]);\n const [getRecordByKey] = useLazyKVMap(rawData, childrenColumnName, getRowKey);\n // ============================ Events =============================\n const changeEventInfo = {};\n const triggerOnChange = function (info, action) {\n let reset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var _a, _b, _c, _d;\n const changeInfo = Object.assign(Object.assign({}, changeEventInfo), info);\n if (reset) {\n (_a = changeEventInfo.resetPagination) === null || _a === void 0 ? void 0 : _a.call(changeEventInfo);\n // Reset event param\n if ((_b = changeInfo.pagination) === null || _b === void 0 ? void 0 : _b.current) {\n changeInfo.pagination.current = 1;\n }\n // Trigger pagination events\n if (pagination) {\n (_c = pagination.onChange) === null || _c === void 0 ? void 0 : _c.call(pagination, 1, (_d = changeInfo.pagination) === null || _d === void 0 ? void 0 : _d.pageSize);\n }\n }\n if (scroll && scroll.scrollToFirstRowOnChange !== false && internalRefs.body.current) {\n scrollTo(0, {\n getContainer: () => internalRefs.body.current\n });\n }\n onChange === null || onChange === void 0 ? void 0 : onChange(changeInfo.pagination, changeInfo.filters, changeInfo.sorter, {\n currentDataSource: getFilterData(getSortData(rawData, changeInfo.sorterStates, childrenColumnName), changeInfo.filterStates, childrenColumnName),\n action\n });\n };\n /**\n * Controlled state in `columns` is not a good idea that makes too many code (1000+ line?) to read\n * state out and then put it back to title render. Move these code into `hooks` but still too\n * complex. We should provides Table props like `sorter` & `filter` to handle control in next big\n * version.\n */\n // ============================ Sorter =============================\n const onSorterChange = (sorter, sorterStates) => {\n triggerOnChange({\n sorter,\n sorterStates\n }, 'sort', false);\n };\n const [transformSorterColumns, sortStates, sorterTitleProps, getSorters] = useSorter({\n prefixCls,\n mergedColumns,\n onSorterChange,\n sortDirections: sortDirections || ['ascend', 'descend'],\n tableLocale,\n showSorterTooltip\n });\n const sortedData = React.useMemo(() => getSortData(rawData, sortStates, childrenColumnName), [rawData, sortStates]);\n changeEventInfo.sorter = getSorters();\n changeEventInfo.sorterStates = sortStates;\n // ============================ Filter ============================\n const onFilterChange = (filters, filterStates) => {\n triggerOnChange({\n filters,\n filterStates\n }, 'filter', true);\n };\n const [transformFilterColumns, filterStates, filters] = useFilter({\n prefixCls,\n locale: tableLocale,\n dropdownPrefixCls,\n mergedColumns,\n onFilterChange,\n getPopupContainer: getPopupContainer || getContextPopupContainer,\n rootClassName: classNames(rootClassName, rootCls)\n });\n const mergedData = getFilterData(sortedData, filterStates, childrenColumnName);\n changeEventInfo.filters = filters;\n changeEventInfo.filterStates = filterStates;\n // ============================ Column ============================\n const columnTitleProps = React.useMemo(() => {\n const mergedFilters = {};\n Object.keys(filters).forEach(filterKey => {\n if (filters[filterKey] !== null) {\n mergedFilters[filterKey] = filters[filterKey];\n }\n });\n return Object.assign(Object.assign({}, sorterTitleProps), {\n filters: mergedFilters\n });\n }, [sorterTitleProps, filters]);\n const [transformTitleColumns] = useTitleColumns(columnTitleProps);\n // ========================== Pagination ==========================\n const onPaginationChange = (current, pageSize) => {\n triggerOnChange({\n pagination: Object.assign(Object.assign({}, changeEventInfo.pagination), {\n current,\n pageSize\n })\n }, 'paginate');\n };\n const [mergedPagination, resetPagination] = usePagination(mergedData.length, onPaginationChange, pagination);\n changeEventInfo.pagination = pagination === false ? {} : getPaginationParam(mergedPagination, pagination);\n changeEventInfo.resetPagination = resetPagination;\n // ============================= Data =============================\n const pageData = React.useMemo(() => {\n if (pagination === false || !mergedPagination.pageSize) {\n return mergedData;\n }\n const {\n current = 1,\n total,\n pageSize = DEFAULT_PAGE_SIZE\n } = mergedPagination;\n process.env.NODE_ENV !== \"production\" ? warning(current > 0, 'usage', '`current` should be positive number.') : void 0;\n // Dynamic table data\n if (mergedData.length < total) {\n if (mergedData.length > pageSize) {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'usage', '`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode.') : void 0;\n return mergedData.slice((current - 1) * pageSize, current * pageSize);\n }\n return mergedData;\n }\n return mergedData.slice((current - 1) * pageSize, current * pageSize);\n }, [!!pagination, mergedData, mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.current, mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.pageSize, mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.total]);\n // ========================== Selections ==========================\n const [transformSelectionColumns, selectedKeySet] = useSelection({\n prefixCls,\n data: mergedData,\n pageData,\n getRowKey,\n getRecordByKey,\n expandType,\n childrenColumnName,\n locale: tableLocale,\n getPopupContainer: getPopupContainer || getContextPopupContainer\n }, rowSelection);\n const internalRowClassName = (record, index, indent) => {\n let mergedRowClassName;\n if (typeof rowClassName === 'function') {\n mergedRowClassName = classNames(rowClassName(record, index, indent));\n } else {\n mergedRowClassName = classNames(rowClassName);\n }\n return classNames({\n [`${prefixCls}-row-selected`]: selectedKeySet.has(getRowKey(record, index))\n }, mergedRowClassName);\n };\n // ========================== Expandable ==========================\n // Pass origin render status into `rc-table`, this can be removed when refactor with `rc-table`\n mergedExpandable.__PARENT_RENDER_ICON__ = mergedExpandable.expandIcon;\n // Customize expandable icon\n mergedExpandable.expandIcon = mergedExpandable.expandIcon || expandIcon || renderExpandIcon(tableLocale);\n // Adjust expand icon index, no overwrite expandIconColumnIndex if set.\n if (expandType === 'nest' && mergedExpandable.expandIconColumnIndex === undefined) {\n mergedExpandable.expandIconColumnIndex = rowSelection ? 1 : 0;\n } else if (mergedExpandable.expandIconColumnIndex > 0 && rowSelection) {\n mergedExpandable.expandIconColumnIndex -= 1;\n }\n // Indent size\n if (typeof mergedExpandable.indentSize !== 'number') {\n mergedExpandable.indentSize = typeof indentSize === 'number' ? indentSize : 15;\n }\n // ============================ Render ============================\n const transformColumns = React.useCallback(innerColumns => transformTitleColumns(transformSelectionColumns(transformFilterColumns(transformSorterColumns(innerColumns)))), [transformSorterColumns, transformFilterColumns, transformSelectionColumns]);\n let topPaginationNode;\n let bottomPaginationNode;\n if (pagination !== false && (mergedPagination === null || mergedPagination === void 0 ? void 0 : mergedPagination.total)) {\n let paginationSize;\n if (mergedPagination.size) {\n paginationSize = mergedPagination.size;\n } else {\n paginationSize = mergedSize === 'small' || mergedSize === 'middle' ? 'small' : undefined;\n }\n const renderPagination = position => ( /*#__PURE__*/React.createElement(Pagination, Object.assign({}, mergedPagination, {\n className: classNames(`${prefixCls}-pagination ${prefixCls}-pagination-${position}`, mergedPagination.className),\n size: paginationSize\n })));\n const defaultPosition = direction === 'rtl' ? 'left' : 'right';\n const {\n position\n } = mergedPagination;\n if (position !== null && Array.isArray(position)) {\n const topPos = position.find(p => p.includes('top'));\n const bottomPos = position.find(p => p.includes('bottom'));\n const isDisable = position.every(p => `${p}` === 'none');\n if (!topPos && !bottomPos && !isDisable) {\n bottomPaginationNode = renderPagination(defaultPosition);\n }\n if (topPos) {\n topPaginationNode = renderPagination(topPos.toLowerCase().replace('top', ''));\n }\n if (bottomPos) {\n bottomPaginationNode = renderPagination(bottomPos.toLowerCase().replace('bottom', ''));\n }\n } else {\n bottomPaginationNode = renderPagination(defaultPosition);\n }\n }\n // >>>>>>>>> Spinning\n let spinProps;\n if (typeof loading === 'boolean') {\n spinProps = {\n spinning: loading\n };\n } else if (typeof loading === 'object') {\n spinProps = Object.assign({\n spinning: true\n }, loading);\n }\n const wrapperClassNames = classNames(cssVarCls, rootCls, `${prefixCls}-wrapper`, table === null || table === void 0 ? void 0 : table.className, {\n [`${prefixCls}-wrapper-rtl`]: direction === 'rtl'\n }, className, rootClassName, hashId);\n const mergedStyle = Object.assign(Object.assign({}, table === null || table === void 0 ? void 0 : table.style), style);\n const emptyText = typeof (locale === null || locale === void 0 ? void 0 : locale.emptyText) !== 'undefined' ? locale.emptyText : (renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Table')) || /*#__PURE__*/React.createElement(DefaultRenderEmpty, {\n componentName: \"Table\"\n });\n // ========================== Render ==========================\n const TableComponent = virtual ? RcVirtualTable : RcTable;\n // >>> Virtual Table props. We set height here since it will affect height collection\n const virtualProps = {};\n const listItemHeight = React.useMemo(() => {\n const {\n fontSize,\n lineHeight,\n padding,\n paddingXS,\n paddingSM\n } = token;\n const fontHeight = Math.floor(fontSize * lineHeight);\n switch (mergedSize) {\n case 'large':\n return padding * 2 + fontHeight;\n case 'small':\n return paddingXS * 2 + fontHeight;\n default:\n return paddingSM * 2 + fontHeight;\n }\n }, [token, mergedSize]);\n if (virtual) {\n virtualProps.listItemHeight = listItemHeight;\n }\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"div\", {\n ref: rootRef,\n className: wrapperClassNames,\n style: mergedStyle\n }, /*#__PURE__*/React.createElement(Spin, Object.assign({\n spinning: false\n }, spinProps), topPaginationNode, /*#__PURE__*/React.createElement(TableComponent, Object.assign({}, virtualProps, tableProps, {\n ref: tblRef,\n columns: mergedColumns,\n direction: direction,\n expandable: mergedExpandable,\n prefixCls: prefixCls,\n className: classNames({\n [`${prefixCls}-middle`]: mergedSize === 'middle',\n [`${prefixCls}-small`]: mergedSize === 'small',\n [`${prefixCls}-bordered`]: bordered,\n [`${prefixCls}-empty`]: rawData.length === 0\n }, cssVarCls, rootCls, hashId),\n data: pageData,\n rowKey: getRowKey,\n rowClassName: internalRowClassName,\n emptyText: emptyText,\n // Internal\n internalHooks: INTERNAL_HOOKS,\n internalRefs: internalRefs,\n transformColumns: transformColumns,\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