1 line
48 KiB
JSON
1 line
48 KiB
JSON
{"ast":null,"code":"\"use client\";\n\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport FilterFilled from \"@ant-design/icons/es/icons/FilterFilled\";\nimport classNames from 'classnames';\nimport isEqual from \"rc-util/es/isEqual\";\nimport useSyncState from '../../../_util/hooks/useSyncState';\nimport { devUseWarning } from '../../../_util/warning';\nimport Button from '../../../button';\nimport Checkbox from '../../../checkbox';\nimport { ConfigContext } from '../../../config-provider/context';\nimport Dropdown from '../../../dropdown';\nimport Empty from '../../../empty';\nimport Menu from '../../../menu';\nimport { OverrideProvider } from '../../../menu/OverrideContext';\nimport Radio from '../../../radio';\nimport Tree from '../../../tree';\nimport FilterSearch from './FilterSearch';\nimport FilterDropdownMenuWrapper from './FilterWrapper';\nexport function flattenKeys(filters) {\n let keys = [];\n (filters || []).forEach(_ref => {\n let {\n value,\n children\n } = _ref;\n keys.push(value);\n if (children) {\n keys = [].concat(_toConsumableArray(keys), _toConsumableArray(flattenKeys(children)));\n }\n });\n return keys;\n}\nfunction hasSubMenu(filters) {\n return filters.some(_ref2 => {\n let {\n children\n } = _ref2;\n return children;\n });\n}\nfunction searchValueMatched(searchValue, text) {\n if (typeof text === 'string' || typeof text === 'number') {\n return text === null || text === void 0 ? void 0 : text.toString().toLowerCase().includes(searchValue.trim().toLowerCase());\n }\n return false;\n}\nfunction renderFilterItems(_ref3) {\n let {\n filters,\n prefixCls,\n filteredKeys,\n filterMultiple,\n searchValue,\n filterSearch\n } = _ref3;\n return filters.map((filter, index) => {\n const key = String(filter.value);\n if (filter.children) {\n return {\n key: key || index,\n label: filter.text,\n popupClassName: `${prefixCls}-dropdown-submenu`,\n children: renderFilterItems({\n filters: filter.children,\n prefixCls,\n filteredKeys,\n filterMultiple,\n searchValue,\n filterSearch\n })\n };\n }\n const Component = filterMultiple ? Checkbox : Radio;\n const item = {\n key: filter.value !== undefined ? key : index,\n label: ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Component, {\n checked: filteredKeys.includes(key)\n }), /*#__PURE__*/React.createElement(\"span\", null, filter.text)))\n };\n if (searchValue.trim()) {\n if (typeof filterSearch === 'function') {\n return filterSearch(searchValue, filter) ? item : null;\n }\n return searchValueMatched(searchValue, filter.text) ? item : null;\n }\n return item;\n });\n}\nfunction wrapStringListType(keys) {\n return keys || [];\n}\nconst FilterDropdown = props => {\n var _a, _b;\n const {\n tablePrefixCls,\n prefixCls,\n column,\n dropdownPrefixCls,\n columnKey,\n filterOnClose,\n filterMultiple,\n filterMode = 'menu',\n filterSearch = false,\n filterState,\n triggerFilter,\n locale,\n children,\n getPopupContainer,\n rootClassName\n } = props;\n const {\n filterDropdownOpen,\n onFilterDropdownOpenChange,\n filterResetToDefaultFilteredValue,\n defaultFilteredValue,\n // Deprecated\n filterDropdownVisible,\n onFilterDropdownVisibleChange\n } = column;\n const [visible, setVisible] = React.useState(false);\n const filtered = !!(filterState && (((_a = filterState.filteredKeys) === null || _a === void 0 ? void 0 : _a.length) || filterState.forceFiltered));\n const triggerVisible = newVisible => {\n setVisible(newVisible);\n onFilterDropdownOpenChange === null || onFilterDropdownOpenChange === void 0 ? void 0 : onFilterDropdownOpenChange(newVisible);\n onFilterDropdownVisibleChange === null || onFilterDropdownVisibleChange === void 0 ? void 0 : onFilterDropdownVisibleChange(newVisible);\n };\n if (process.env.NODE_ENV !== 'production') {\n const warning = devUseWarning('Table');\n [['filterDropdownVisible', 'filterDropdownOpen', filterDropdownVisible], ['onFilterDropdownVisibleChange', 'onFilterDropdownOpenChange', onFilterDropdownVisibleChange]].forEach(_ref4 => {\n let [deprecatedName, newName, prop] = _ref4;\n warning.deprecated(prop === undefined || prop === null, deprecatedName, newName);\n });\n }\n const mergedVisible = (_b = filterDropdownOpen !== null && filterDropdownOpen !== void 0 ? filterDropdownOpen : filterDropdownVisible) !== null && _b !== void 0 ? _b : visible;\n // ===================== Select Keys =====================\n const propFilteredKeys = filterState === null || filterState === void 0 ? void 0 : filterState.filteredKeys;\n const [getFilteredKeysSync, setFilteredKeysSync] = useSyncState(wrapStringListType(propFilteredKeys));\n const onSelectKeys = _ref5 => {\n let {\n selectedKeys\n } = _ref5;\n setFilteredKeysSync(selectedKeys);\n };\n const onCheck = (keys, _ref6) => {\n let {\n node,\n checked\n } = _ref6;\n if (!filterMultiple) {\n onSelectKeys({\n selectedKeys: checked && node.key ? [node.key] : []\n });\n } else {\n onSelectKeys({\n selectedKeys: keys\n });\n }\n };\n React.useEffect(() => {\n if (!visible) {\n return;\n }\n onSelectKeys({\n selectedKeys: wrapStringListType(propFilteredKeys)\n });\n }, [propFilteredKeys]);\n // ====================== Open Keys ======================\n const [openKeys, setOpenKeys] = React.useState([]);\n const onOpenChange = keys => {\n setOpenKeys(keys);\n };\n // search in tree mode column filter\n const [searchValue, setSearchValue] = React.useState('');\n const onSearch = e => {\n const {\n value\n } = e.target;\n setSearchValue(value);\n };\n // clear search value after close filter dropdown\n React.useEffect(() => {\n if (!visible) {\n setSearchValue('');\n }\n }, [visible]);\n // ======================= Submit ========================\n const internalTriggerFilter = keys => {\n const mergedKeys = (keys === null || keys === void 0 ? void 0 : keys.length) ? keys : null;\n if (mergedKeys === null && (!filterState || !filterState.filteredKeys)) {\n return null;\n }\n if (isEqual(mergedKeys, filterState === null || filterState === void 0 ? void 0 : filterState.filteredKeys, true)) {\n return null;\n }\n triggerFilter({\n column,\n key: columnKey,\n filteredKeys: mergedKeys\n });\n };\n const onConfirm = () => {\n triggerVisible(false);\n internalTriggerFilter(getFilteredKeysSync());\n };\n const onReset = function () {\n let {\n confirm,\n closeDropdown\n } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n confirm: false,\n closeDropdown: false\n };\n if (confirm) {\n internalTriggerFilter([]);\n }\n if (closeDropdown) {\n triggerVisible(false);\n }\n setSearchValue('');\n if (filterResetToDefaultFilteredValue) {\n setFilteredKeysSync((defaultFilteredValue || []).map(key => String(key)));\n } else {\n setFilteredKeysSync([]);\n }\n };\n const doFilter = function () {\n let {\n closeDropdown\n } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n closeDropdown: true\n };\n if (closeDropdown) {\n triggerVisible(false);\n }\n internalTriggerFilter(getFilteredKeysSync());\n };\n const onVisibleChange = (newVisible, info) => {\n if (info.source === 'trigger') {\n if (newVisible && propFilteredKeys !== undefined) {\n // Sync filteredKeys on appear in controlled mode (propFilteredKeys !== undefined)\n setFilteredKeysSync(wrapStringListType(propFilteredKeys));\n }\n triggerVisible(newVisible);\n if (!newVisible && !column.filterDropdown && filterOnClose) {\n onConfirm();\n }\n }\n };\n // ======================== Style ========================\n const dropdownMenuClass = classNames({\n [`${dropdownPrefixCls}-menu-without-submenu`]: !hasSubMenu(column.filters || [])\n });\n const onCheckAll = e => {\n if (e.target.checked) {\n const allFilterKeys = flattenKeys(column === null || column === void 0 ? void 0 : column.filters).map(key => String(key));\n setFilteredKeysSync(allFilterKeys);\n } else {\n setFilteredKeysSync([]);\n }\n };\n const getTreeData = _ref7 => {\n let {\n filters\n } = _ref7;\n return (filters || []).map((filter, index) => {\n const key = String(filter.value);\n const item = {\n title: filter.text,\n key: filter.value !== undefined ? key : String(index)\n };\n if (filter.children) {\n item.children = getTreeData({\n filters: filter.children\n });\n }\n return item;\n });\n };\n const getFilterData = node => {\n var _a;\n return Object.assign(Object.assign({}, node), {\n text: node.title,\n value: node.key,\n children: ((_a = node.children) === null || _a === void 0 ? void 0 : _a.map(item => getFilterData(item))) || []\n });\n };\n let dropdownContent;\n const {\n direction,\n renderEmpty\n } = React.useContext(ConfigContext);\n if (typeof column.filterDropdown === 'function') {\n dropdownContent = column.filterDropdown({\n prefixCls: `${dropdownPrefixCls}-custom`,\n setSelectedKeys: selectedKeys => onSelectKeys({\n selectedKeys: selectedKeys\n }),\n selectedKeys: getFilteredKeysSync(),\n confirm: doFilter,\n clearFilters: onReset,\n filters: column.filters,\n visible: mergedVisible,\n close: () => {\n triggerVisible(false);\n }\n });\n } else if (column.filterDropdown) {\n dropdownContent = column.filterDropdown;\n } else {\n const selectedKeys = getFilteredKeysSync() || [];\n const getFilterComponent = () => {\n var _a;\n const empty = (_a = renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Table.filter')) !== null && _a !== void 0 ? _a : ( /*#__PURE__*/React.createElement(Empty, {\n image: Empty.PRESENTED_IMAGE_SIMPLE,\n description: locale.filterEmptyText,\n imageStyle: {\n height: 24\n },\n style: {\n margin: 0,\n padding: '16px 0'\n }\n }));\n if ((column.filters || []).length === 0) {\n return empty;\n }\n if (filterMode === 'tree') {\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FilterSearch, {\n filterSearch: filterSearch,\n value: searchValue,\n onChange: onSearch,\n tablePrefixCls: tablePrefixCls,\n locale: locale\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: `${tablePrefixCls}-filter-dropdown-tree`\n }, filterMultiple ? ( /*#__PURE__*/React.createElement(Checkbox, {\n checked: selectedKeys.length === flattenKeys(column.filters).length,\n indeterminate: selectedKeys.length > 0 && selectedKeys.length < flattenKeys(column.filters).length,\n className: `${tablePrefixCls}-filter-dropdown-checkall`,\n onChange: onCheckAll\n }, locale.filterCheckall)) : null, /*#__PURE__*/React.createElement(Tree, {\n checkable: true,\n selectable: false,\n blockNode: true,\n multiple: filterMultiple,\n checkStrictly: !filterMultiple,\n className: `${dropdownPrefixCls}-menu`,\n onCheck: onCheck,\n checkedKeys: selectedKeys,\n selectedKeys: selectedKeys,\n showIcon: false,\n treeData: getTreeData({\n filters: column.filters\n }),\n autoExpandParent: true,\n defaultExpandAll: true,\n filterTreeNode: searchValue.trim() ? node => {\n if (typeof filterSearch === 'function') {\n return filterSearch(searchValue, getFilterData(node));\n }\n return searchValueMatched(searchValue, node.title);\n } : undefined\n })));\n }\n const items = renderFilterItems({\n filters: column.filters || [],\n filterSearch,\n prefixCls,\n filteredKeys: getFilteredKeysSync(),\n filterMultiple,\n searchValue\n });\n const isEmpty = items.every(item => item === null);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FilterSearch, {\n filterSearch: filterSearch,\n value: searchValue,\n onChange: onSearch,\n tablePrefixCls: tablePrefixCls,\n locale: locale\n }), isEmpty ? empty : ( /*#__PURE__*/React.createElement(Menu, {\n selectable: true,\n multiple: filterMultiple,\n prefixCls: `${dropdownPrefixCls}-menu`,\n className: dropdownMenuClass,\n onSelect: onSelectKeys,\n onDeselect: onSelectKeys,\n selectedKeys: selectedKeys,\n getPopupContainer: getPopupContainer,\n openKeys: openKeys,\n onOpenChange: onOpenChange,\n items: items\n })));\n };\n const getResetDisabled = () => {\n if (filterResetToDefaultFilteredValue) {\n return isEqual((defaultFilteredValue || []).map(key => String(key)), selectedKeys, true);\n }\n return selectedKeys.length === 0;\n };\n dropdownContent = /*#__PURE__*/React.createElement(React.Fragment, null, getFilterComponent(), /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-dropdown-btns`\n }, /*#__PURE__*/React.createElement(Button, {\n type: \"link\",\n size: \"small\",\n disabled: getResetDisabled(),\n onClick: () => onReset()\n }, locale.filterReset), /*#__PURE__*/React.createElement(Button, {\n type: \"primary\",\n size: \"small\",\n onClick: onConfirm\n }, locale.filterConfirm)));\n }\n // We should not block customize Menu with additional props\n if (column.filterDropdown) {\n dropdownContent = /*#__PURE__*/React.createElement(OverrideProvider, {\n selectable: undefined\n }, dropdownContent);\n }\n const menu = () => ( /*#__PURE__*/React.createElement(FilterDropdownMenuWrapper, {\n className: `${prefixCls}-dropdown`\n }, dropdownContent));\n let filterIcon;\n if (typeof column.filterIcon === 'function') {\n filterIcon = column.filterIcon(filtered);\n } else if (column.filterIcon) {\n filterIcon = column.filterIcon;\n } else {\n filterIcon = /*#__PURE__*/React.createElement(FilterFilled, null);\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-column`\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: `${tablePrefixCls}-column-title`\n }, children), /*#__PURE__*/React.createElement(Dropdown, {\n dropdownRender: menu,\n trigger: ['click'],\n open: mergedVisible,\n onOpenChange: onVisibleChange,\n getPopupContainer: getPopupContainer,\n placement: direction === 'rtl' ? 'bottomLeft' : 'bottomRight',\n rootClassName: rootClassName\n }, /*#__PURE__*/React.createElement(\"span\", {\n role: \"button\",\n tabIndex: -1,\n className: classNames(`${prefixCls}-trigger`, {\n active: filtered\n }),\n onClick: e => {\n e.stopPropagation();\n }\n }, filterIcon)));\n};\nexport default FilterDropdown;","map":{"version":3,"names":["_toConsumableArray","React","FilterFilled","classNames","isEqual","useSyncState","devUseWarning","Button","Checkbox","ConfigContext","Dropdown","Empty","Menu","OverrideProvider","Radio","Tree","FilterSearch","FilterDropdownMenuWrapper","flattenKeys","filters","keys","forEach","_ref","value","children","push","concat","hasSubMenu","some","_ref2","searchValueMatched","searchValue","text","toString","toLowerCase","includes","trim","renderFilterItems","_ref3","prefixCls","filteredKeys","filterMultiple","filterSearch","map","filter","index","key","String","label","popupClassName","Component","item","undefined","createElement","Fragment","checked","wrapStringListType","FilterDropdown","props","_a","_b","tablePrefixCls","column","dropdownPrefixCls","columnKey","filterOnClose","filterMode","filterState","triggerFilter","locale","getPopupContainer","rootClassName","filterDropdownOpen","onFilterDropdownOpenChange","filterResetToDefaultFilteredValue","defaultFilteredValue","filterDropdownVisible","onFilterDropdownVisibleChange","visible","setVisible","useState","filtered","length","forceFiltered","triggerVisible","newVisible","process","env","NODE_ENV","warning","_ref4","deprecatedName","newName","prop","deprecated","mergedVisible","propFilteredKeys","getFilteredKeysSync","setFilteredKeysSync","onSelectKeys","_ref5","selectedKeys","onCheck","_ref6","node","useEffect","openKeys","setOpenKeys","onOpenChange","setSearchValue","onSearch","e","target","internalTriggerFilter","mergedKeys","onConfirm","onReset","confirm","closeDropdown","arguments","doFilter","onVisibleChange","info","source","filterDropdown","dropdownMenuClass","onCheckAll","allFilterKeys","getTreeData","_ref7","title","getFilterData","Object","assign","dropdownContent","direction","renderEmpty","useContext","setSelectedKeys","clearFilters","close","getFilterComponent","empty","image","PRESENTED_IMAGE_SIMPLE","description","filterEmptyText","imageStyle","height","style","margin","padding","onChange","className","indeterminate","filterCheckall","checkable","selectable","blockNode","multiple","checkStrictly","checkedKeys","showIcon","treeData","autoExpandParent","defaultExpandAll","filterTreeNode","items","isEmpty","every","onSelect","onDeselect","getResetDisabled","type","size","disabled","onClick","filterReset","filterConfirm","menu","filterIcon","dropdownRender","trigger","open","placement","role","tabIndex","active","stopPropagation"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/table/hooks/useFilter/FilterDropdown.js"],"sourcesContent":["\"use client\";\n\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport FilterFilled from \"@ant-design/icons/es/icons/FilterFilled\";\nimport classNames from 'classnames';\nimport isEqual from \"rc-util/es/isEqual\";\nimport useSyncState from '../../../_util/hooks/useSyncState';\nimport { devUseWarning } from '../../../_util/warning';\nimport Button from '../../../button';\nimport Checkbox from '../../../checkbox';\nimport { ConfigContext } from '../../../config-provider/context';\nimport Dropdown from '../../../dropdown';\nimport Empty from '../../../empty';\nimport Menu from '../../../menu';\nimport { OverrideProvider } from '../../../menu/OverrideContext';\nimport Radio from '../../../radio';\nimport Tree from '../../../tree';\nimport FilterSearch from './FilterSearch';\nimport FilterDropdownMenuWrapper from './FilterWrapper';\nexport function flattenKeys(filters) {\n let keys = [];\n (filters || []).forEach(_ref => {\n let {\n value,\n children\n } = _ref;\n keys.push(value);\n if (children) {\n keys = [].concat(_toConsumableArray(keys), _toConsumableArray(flattenKeys(children)));\n }\n });\n return keys;\n}\nfunction hasSubMenu(filters) {\n return filters.some(_ref2 => {\n let {\n children\n } = _ref2;\n return children;\n });\n}\nfunction searchValueMatched(searchValue, text) {\n if (typeof text === 'string' || typeof text === 'number') {\n return text === null || text === void 0 ? void 0 : text.toString().toLowerCase().includes(searchValue.trim().toLowerCase());\n }\n return false;\n}\nfunction renderFilterItems(_ref3) {\n let {\n filters,\n prefixCls,\n filteredKeys,\n filterMultiple,\n searchValue,\n filterSearch\n } = _ref3;\n return filters.map((filter, index) => {\n const key = String(filter.value);\n if (filter.children) {\n return {\n key: key || index,\n label: filter.text,\n popupClassName: `${prefixCls}-dropdown-submenu`,\n children: renderFilterItems({\n filters: filter.children,\n prefixCls,\n filteredKeys,\n filterMultiple,\n searchValue,\n filterSearch\n })\n };\n }\n const Component = filterMultiple ? Checkbox : Radio;\n const item = {\n key: filter.value !== undefined ? key : index,\n label: ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Component, {\n checked: filteredKeys.includes(key)\n }), /*#__PURE__*/React.createElement(\"span\", null, filter.text)))\n };\n if (searchValue.trim()) {\n if (typeof filterSearch === 'function') {\n return filterSearch(searchValue, filter) ? item : null;\n }\n return searchValueMatched(searchValue, filter.text) ? item : null;\n }\n return item;\n });\n}\nfunction wrapStringListType(keys) {\n return keys || [];\n}\nconst FilterDropdown = props => {\n var _a, _b;\n const {\n tablePrefixCls,\n prefixCls,\n column,\n dropdownPrefixCls,\n columnKey,\n filterOnClose,\n filterMultiple,\n filterMode = 'menu',\n filterSearch = false,\n filterState,\n triggerFilter,\n locale,\n children,\n getPopupContainer,\n rootClassName\n } = props;\n const {\n filterDropdownOpen,\n onFilterDropdownOpenChange,\n filterResetToDefaultFilteredValue,\n defaultFilteredValue,\n // Deprecated\n filterDropdownVisible,\n onFilterDropdownVisibleChange\n } = column;\n const [visible, setVisible] = React.useState(false);\n const filtered = !!(filterState && (((_a = filterState.filteredKeys) === null || _a === void 0 ? void 0 : _a.length) || filterState.forceFiltered));\n const triggerVisible = newVisible => {\n setVisible(newVisible);\n onFilterDropdownOpenChange === null || onFilterDropdownOpenChange === void 0 ? void 0 : onFilterDropdownOpenChange(newVisible);\n onFilterDropdownVisibleChange === null || onFilterDropdownVisibleChange === void 0 ? void 0 : onFilterDropdownVisibleChange(newVisible);\n };\n if (process.env.NODE_ENV !== 'production') {\n const warning = devUseWarning('Table');\n [['filterDropdownVisible', 'filterDropdownOpen', filterDropdownVisible], ['onFilterDropdownVisibleChange', 'onFilterDropdownOpenChange', onFilterDropdownVisibleChange]].forEach(_ref4 => {\n let [deprecatedName, newName, prop] = _ref4;\n warning.deprecated(prop === undefined || prop === null, deprecatedName, newName);\n });\n }\n const mergedVisible = (_b = filterDropdownOpen !== null && filterDropdownOpen !== void 0 ? filterDropdownOpen : filterDropdownVisible) !== null && _b !== void 0 ? _b : visible;\n // ===================== Select Keys =====================\n const propFilteredKeys = filterState === null || filterState === void 0 ? void 0 : filterState.filteredKeys;\n const [getFilteredKeysSync, setFilteredKeysSync] = useSyncState(wrapStringListType(propFilteredKeys));\n const onSelectKeys = _ref5 => {\n let {\n selectedKeys\n } = _ref5;\n setFilteredKeysSync(selectedKeys);\n };\n const onCheck = (keys, _ref6) => {\n let {\n node,\n checked\n } = _ref6;\n if (!filterMultiple) {\n onSelectKeys({\n selectedKeys: checked && node.key ? [node.key] : []\n });\n } else {\n onSelectKeys({\n selectedKeys: keys\n });\n }\n };\n React.useEffect(() => {\n if (!visible) {\n return;\n }\n onSelectKeys({\n selectedKeys: wrapStringListType(propFilteredKeys)\n });\n }, [propFilteredKeys]);\n // ====================== Open Keys ======================\n const [openKeys, setOpenKeys] = React.useState([]);\n const onOpenChange = keys => {\n setOpenKeys(keys);\n };\n // search in tree mode column filter\n const [searchValue, setSearchValue] = React.useState('');\n const onSearch = e => {\n const {\n value\n } = e.target;\n setSearchValue(value);\n };\n // clear search value after close filter dropdown\n React.useEffect(() => {\n if (!visible) {\n setSearchValue('');\n }\n }, [visible]);\n // ======================= Submit ========================\n const internalTriggerFilter = keys => {\n const mergedKeys = (keys === null || keys === void 0 ? void 0 : keys.length) ? keys : null;\n if (mergedKeys === null && (!filterState || !filterState.filteredKeys)) {\n return null;\n }\n if (isEqual(mergedKeys, filterState === null || filterState === void 0 ? void 0 : filterState.filteredKeys, true)) {\n return null;\n }\n triggerFilter({\n column,\n key: columnKey,\n filteredKeys: mergedKeys\n });\n };\n const onConfirm = () => {\n triggerVisible(false);\n internalTriggerFilter(getFilteredKeysSync());\n };\n const onReset = function () {\n let {\n confirm,\n closeDropdown\n } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n confirm: false,\n closeDropdown: false\n };\n if (confirm) {\n internalTriggerFilter([]);\n }\n if (closeDropdown) {\n triggerVisible(false);\n }\n setSearchValue('');\n if (filterResetToDefaultFilteredValue) {\n setFilteredKeysSync((defaultFilteredValue || []).map(key => String(key)));\n } else {\n setFilteredKeysSync([]);\n }\n };\n const doFilter = function () {\n let {\n closeDropdown\n } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n closeDropdown: true\n };\n if (closeDropdown) {\n triggerVisible(false);\n }\n internalTriggerFilter(getFilteredKeysSync());\n };\n const onVisibleChange = (newVisible, info) => {\n if (info.source === 'trigger') {\n if (newVisible && propFilteredKeys !== undefined) {\n // Sync filteredKeys on appear in controlled mode (propFilteredKeys !== undefined)\n setFilteredKeysSync(wrapStringListType(propFilteredKeys));\n }\n triggerVisible(newVisible);\n if (!newVisible && !column.filterDropdown && filterOnClose) {\n onConfirm();\n }\n }\n };\n // ======================== Style ========================\n const dropdownMenuClass = classNames({\n [`${dropdownPrefixCls}-menu-without-submenu`]: !hasSubMenu(column.filters || [])\n });\n const onCheckAll = e => {\n if (e.target.checked) {\n const allFilterKeys = flattenKeys(column === null || column === void 0 ? void 0 : column.filters).map(key => String(key));\n setFilteredKeysSync(allFilterKeys);\n } else {\n setFilteredKeysSync([]);\n }\n };\n const getTreeData = _ref7 => {\n let {\n filters\n } = _ref7;\n return (filters || []).map((filter, index) => {\n const key = String(filter.value);\n const item = {\n title: filter.text,\n key: filter.value !== undefined ? key : String(index)\n };\n if (filter.children) {\n item.children = getTreeData({\n filters: filter.children\n });\n }\n return item;\n });\n };\n const getFilterData = node => {\n var _a;\n return Object.assign(Object.assign({}, node), {\n text: node.title,\n value: node.key,\n children: ((_a = node.children) === null || _a === void 0 ? void 0 : _a.map(item => getFilterData(item))) || []\n });\n };\n let dropdownContent;\n const {\n direction,\n renderEmpty\n } = React.useContext(ConfigContext);\n if (typeof column.filterDropdown === 'function') {\n dropdownContent = column.filterDropdown({\n prefixCls: `${dropdownPrefixCls}-custom`,\n setSelectedKeys: selectedKeys => onSelectKeys({\n selectedKeys: selectedKeys\n }),\n selectedKeys: getFilteredKeysSync(),\n confirm: doFilter,\n clearFilters: onReset,\n filters: column.filters,\n visible: mergedVisible,\n close: () => {\n triggerVisible(false);\n }\n });\n } else if (column.filterDropdown) {\n dropdownContent = column.filterDropdown;\n } else {\n const selectedKeys = getFilteredKeysSync() || [];\n const getFilterComponent = () => {\n var _a;\n const empty = (_a = renderEmpty === null || renderEmpty === void 0 ? void 0 : renderEmpty('Table.filter')) !== null && _a !== void 0 ? _a : ( /*#__PURE__*/React.createElement(Empty, {\n image: Empty.PRESENTED_IMAGE_SIMPLE,\n description: locale.filterEmptyText,\n imageStyle: {\n height: 24\n },\n style: {\n margin: 0,\n padding: '16px 0'\n }\n }));\n if ((column.filters || []).length === 0) {\n return empty;\n }\n if (filterMode === 'tree') {\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FilterSearch, {\n filterSearch: filterSearch,\n value: searchValue,\n onChange: onSearch,\n tablePrefixCls: tablePrefixCls,\n locale: locale\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: `${tablePrefixCls}-filter-dropdown-tree`\n }, filterMultiple ? ( /*#__PURE__*/React.createElement(Checkbox, {\n checked: selectedKeys.length === flattenKeys(column.filters).length,\n indeterminate: selectedKeys.length > 0 && selectedKeys.length < flattenKeys(column.filters).length,\n className: `${tablePrefixCls}-filter-dropdown-checkall`,\n onChange: onCheckAll\n }, locale.filterCheckall)) : null, /*#__PURE__*/React.createElement(Tree, {\n checkable: true,\n selectable: false,\n blockNode: true,\n multiple: filterMultiple,\n checkStrictly: !filterMultiple,\n className: `${dropdownPrefixCls}-menu`,\n onCheck: onCheck,\n checkedKeys: selectedKeys,\n selectedKeys: selectedKeys,\n showIcon: false,\n treeData: getTreeData({\n filters: column.filters\n }),\n autoExpandParent: true,\n defaultExpandAll: true,\n filterTreeNode: searchValue.trim() ? node => {\n if (typeof filterSearch === 'function') {\n return filterSearch(searchValue, getFilterData(node));\n }\n return searchValueMatched(searchValue, node.title);\n } : undefined\n })));\n }\n const items = renderFilterItems({\n filters: column.filters || [],\n filterSearch,\n prefixCls,\n filteredKeys: getFilteredKeysSync(),\n filterMultiple,\n searchValue\n });\n const isEmpty = items.every(item => item === null);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FilterSearch, {\n filterSearch: filterSearch,\n value: searchValue,\n onChange: onSearch,\n tablePrefixCls: tablePrefixCls,\n locale: locale\n }), isEmpty ? empty : ( /*#__PURE__*/React.createElement(Menu, {\n selectable: true,\n multiple: filterMultiple,\n prefixCls: `${dropdownPrefixCls}-menu`,\n className: dropdownMenuClass,\n onSelect: onSelectKeys,\n onDeselect: onSelectKeys,\n selectedKeys: selectedKeys,\n getPopupContainer: getPopupContainer,\n openKeys: openKeys,\n onOpenChange: onOpenChange,\n items: items\n })));\n };\n const getResetDisabled = () => {\n if (filterResetToDefaultFilteredValue) {\n return isEqual((defaultFilteredValue || []).map(key => String(key)), selectedKeys, true);\n }\n return selectedKeys.length === 0;\n };\n dropdownContent = /*#__PURE__*/React.createElement(React.Fragment, null, getFilterComponent(), /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-dropdown-btns`\n }, /*#__PURE__*/React.createElement(Button, {\n type: \"link\",\n size: \"small\",\n disabled: getResetDisabled(),\n onClick: () => onReset()\n }, locale.filterReset), /*#__PURE__*/React.createElement(Button, {\n type: \"primary\",\n size: \"small\",\n onClick: onConfirm\n }, locale.filterConfirm)));\n }\n // We should not block customize Menu with additional props\n if (column.filterDropdown) {\n dropdownContent = /*#__PURE__*/React.createElement(OverrideProvider, {\n selectable: undefined\n }, dropdownContent);\n }\n const menu = () => ( /*#__PURE__*/React.createElement(FilterDropdownMenuWrapper, {\n className: `${prefixCls}-dropdown`\n }, dropdownContent));\n let filterIcon;\n if (typeof column.filterIcon === 'function') {\n filterIcon = column.filterIcon(filtered);\n } else if (column.filterIcon) {\n filterIcon = column.filterIcon;\n } else {\n filterIcon = /*#__PURE__*/React.createElement(FilterFilled, null);\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n className: `${prefixCls}-column`\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: `${tablePrefixCls}-column-title`\n }, children), /*#__PURE__*/React.createElement(Dropdown, {\n dropdownRender: menu,\n trigger: ['click'],\n open: mergedVisible,\n onOpenChange: onVisibleChange,\n getPopupContainer: getPopupContainer,\n placement: direction === 'rtl' ? 'bottomLeft' : 'bottomRight',\n rootClassName: rootClassName\n }, /*#__PURE__*/React.createElement(\"span\", {\n role: \"button\",\n tabIndex: -1,\n className: classNames(`${prefixCls}-trigger`, {\n active: filtered\n }),\n onClick: e => {\n e.stopPropagation();\n }\n }, filterIcon)));\n};\nexport default FilterDropdown;"],"mappings":"AAAA,YAAY;;AAEZ,OAAOA,kBAAkB,MAAM,8CAA8C;AAC7E,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,YAAY,MAAM,yCAAyC;AAClE,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,OAAO,MAAM,oBAAoB;AACxC,OAAOC,YAAY,MAAM,mCAAmC;AAC5D,SAASC,aAAa,QAAQ,wBAAwB;AACtD,OAAOC,MAAM,MAAM,iBAAiB;AACpC,OAAOC,QAAQ,MAAM,mBAAmB;AACxC,SAASC,aAAa,QAAQ,kCAAkC;AAChE,OAAOC,QAAQ,MAAM,mBAAmB;AACxC,OAAOC,KAAK,MAAM,gBAAgB;AAClC,OAAOC,IAAI,MAAM,eAAe;AAChC,SAASC,gBAAgB,QAAQ,+BAA+B;AACh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