From 76e2d14a17eaf5cd83d0cc43196241d9c10fd198 Mon Sep 17 00:00:00 2001 From: zhanglei66 <38252062+zhanglei66@users.noreply.github.com> Date: Mon, 17 Jan 2022 15:36:55 +0800 Subject: [PATCH] feat: Sync antd 4.18.3 version update (#33) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: Use getKeyThenIncreaseKey in message notice function (#32642) * fix: Avoid selecting the placeholder of input control on Chrome browser, keep consistent of selection behavior with Firefox browser (#32639) * feat: add showCancel prop for popconfirm (#32620) Co-authored-by: machixian * fix: Collapse style issue when expandIconPosition is right (#32648) Co-authored-by: ext.zhangtianyi3 * style: fix Upload picture loading style (#32664) * docs: form register demo add textarea item (#32669) Co-authored-by: machixian * feat: Modal.xxx support wrapClassName prop (#32676) Co-authored-by: machixian * chore(ci): update release workflow (#32668) * chore(ci): update release workflow * chore(ci): update release-helper workflow Co-authored-by: zwlafk * docs: add Version (#32678) Co-authored-by: machixian * docs: fix List demo close #32685 * feat: Form.Item no longer need `fieldKey` anymore (#32689) * chore:Update Form to remove fieldKey * fix: fieldKey cache logic * test: Update snapshot * chore: clean up * style: fix Card tabs of left position (#32695) close #32673 * feat: input number support prefix (#32600) * docs(:sparkles:): release 4.17.0-alpha.9 (#32705) * fix: table loading css error when sticky is true (#32703) * Table loading css error when sticky is true * [CodeFactor] Apply fixes to commit dc1a930 [ci skip] [skip ci] * fix Table loading css error when sticky is true * Fix table loading css error when sticky is true bug * Update index.less Co-authored-by: Miloud Belaabed Co-authored-by: codefactor-io Co-authored-by: afc163 * chore: improve overview card style * chore: Create bug-report.yml (#32716) * Create bug-report.yml * Update bug-report.yml * Rename bug-report.yml to 1-bug-report.yml * Rename 1-bug-report.yml to template-1-bug-report.yml * chore: add ISSUE_TEMPLATE * chore: add ISSUE_TEMPLATE * chore: update ISSUE_TEMPLATE * chore: update ISSUE_TEMPLATE * fix: Typography ellipsis with 1 row doesn't wrap (#32735) Co-authored-by: ext.zhangtianyi3 * fix: Input disabled should not keep focus style (#32739) * fix: tweak Steps vertical progressDot style (#32742) close #32737 * chore: update issue template (#32749) * Update template-1-bug-report.yml * Update template-2-feature-request.yml * Update template-2-feature-request.yml * Update template-1-bug-report.yml * Update template-1-bug-report.yml * Update template-2-feature-request.yml * chore(💄): fix issue template * chore: update form demo * refactor: Move part mixins less to theme instead (#32763) * refactor: Move theme related variables * chore: move rest motion * chore: trigger CI * chore: steps by steps * chore: back order * docs: Update docs * chore(deps-dev): bump @types/gtag.js from 0.0.7 to 0.0.8 (#32746) Bumps [@types/gtag.js](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/gtag.js) from 0.0.7 to 0.0.8. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/gtag.js) --- updated-dependencies: - dependency-name: "@types/gtag.js" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: Spin tip can be react node (#32733) Though this may be opposed to the design. It may be useful to people who want to have complicated tip content. * fix: opening animation of the bottom drawer (#32761) Co-authored-by: Korra <1178115756@qq.com> close #32621 * chore(deps-dev): bump eslint-plugin-unicorn from 37.0.1 to 38.0.0 (#32765) Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 37.0.1 to 38.0.0. - [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases) - [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v37.0.1...v38.0.0) --- updated-dependencies: - dependency-name: eslint-plugin-unicorn dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs: add 4.17.0-alpha.10 changelog (#32775) * fix: codepen demo error using hooks (#32766) * docs: Fix the link in Table's API doc (#32779) - Fix FilterDropdownProps link in table/index.en-US.md - Fix FilterDropdownProps link in table/index.zh-CN.md * fix: Form horizontal broken style when select item is too long (#32778) close #32777 * docs: fix Spin API ts description (#32786) Co-authored-by: DanielLeefu * chore(Tag): update tween-one (#32800) close #32731 * fix: tag animation demo (#32804) * fix: if breadcrumbRender return false, breadcrumb will hidden (#32738) * fix: if breadcrumbRender return false, breadcrumb will hidden * add testd * chore: extends limit (#32814) * feat: ConfigProvider add form colon (#32818) * feat: ConfigProvider add form colon * add: test for ant-design#32799 * fix: Modify FormItemLabel get ConfigColon from From * refactor: Simplify the code * style: fix Tree icon align bug (#32822) * docs: update customize-theme-variable.zh-CN.md * chore: Upgrade react router v6 (#32821) * chore: upgrade react-router to v6 close #32809 close #32774 * fix test * fix test * fix test * fix test * docs: Version Robin (#32830) * docs: add demo for Input.Group (#32837) https://weibo.com/2259174311/L0gtIjb3Z * fix: borderLeftRadius error for Input.Search #32808 (#32812) close #32808 * chore(.gitignore):add ignore for pnpm (#32860) * chore(deps-dev): bump stylelint-config-standard from 23.0.0 to 24.0.0 (#32866) Bumps [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard) from 23.0.0 to 24.0.0. - [Release notes](https://github.com/stylelint/stylelint-config-standard/releases) - [Changelog](https://github.com/stylelint/stylelint-config-standard/blob/main/CHANGELOG.md) - [Commits](https://github.com/stylelint/stylelint-config-standard/compare/23.0.0...24.0.0) --- updated-dependencies: - dependency-name: stylelint-config-standard dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs: 4.17.0 changelog (#32859) * docs: 4.17.0 changelog * test: Update snapshot * docs: Update desc * docs: merge changelog * style: use @height-base in PageHeader (#32883) close #32871 * chore: fix site in IE11 (#32868) * chore: fix site in IE11 * chore: fix site in IE11 * chore: fix site in IE11 * chore: fix site in IE11 * fix: Move variable related code to theme file (#32887) * chore: 4.17.1-alpha.0 * test: Patch test case of mixins (#32889) * docs: Update Cascader changeOnSelect desc close #32886 * feat: Expand pl_PL translations to latest translation spec (#32896) Co-authored-by: Michał Podeszwa <178679-michalpodeszwa@users.noreply.gitlab.com> * style: fix placholder color missing (#32915) * chore(deps-dev): bump eslint-plugin-compat from 3.13.0 to 4.0.0 (#32917) Bumps [eslint-plugin-compat](https://github.com/amilajack/eslint-plugin-compat) from 3.13.0 to 4.0.0. - [Release notes](https://github.com/amilajack/eslint-plugin-compat/releases) - [Changelog](https://github.com/amilajack/eslint-plugin-compat/blob/main/CHANGELOG.md) - [Commits](https://github.com/amilajack/eslint-plugin-compat/compare/v3.13.0...v4.0.0) --- updated-dependencies: - dependency-name: eslint-plugin-compat dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: Tabs editable missing remove icon style in dropdown (#32919) * refatcor: Move mixins back (#32920) * chore: bump 4.17.1-alpha.1 * fix: `Submit` typo (#32933) close #32928 * fix: inherit `itemRender` typing from `rc-pagination` (#32931) fix #32878 * chore: fix types declaration (#32935) * chore: remove unused css code * fix: Modal.method bodyStyle not working (#32934) * fix: Modal.method bodyStyle失效 * test: Modal.method bodyStyle失效 * Apply suggestions from code review Co-authored-by: 晋文涛 Co-authored-by: afc163 * chore(deps-dev): bump typescript from 4.4.4 to 4.5.2 (#32940) Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.4.4 to 4.5.2. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](https://github.com/Microsoft/TypeScript/compare/v4.4.4...v4.5.2) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs: Update customize-theme-variable document (#32930) * Update customize-theme-variable.zh-CN.md * Update customize-theme-variable.en-US.md * Update customize-theme-variable.zh-CN.md * Update customize-theme-variable.en-US.md * refactor: Remove unnecessary div containers (#31492) * feat: Add km_KH locale to component (#32853) * Add km_KH locale to component * Add test and docs * Fix typo * Add test snapshot * style: fix menu link color in collapsed tooltip (#32956) close #32950 * docs: 4.17.1 changelog (#32968) * docs: 4.17.1 changelog * chore: bump version to 4.7.1 * docs: use flag for intl changelog * docs: remove useless changelog * docs: remove useless changelog * fix: remove space (#32974) Co-authored-by: machixian * chore(deps-dev): bump eslint-plugin-unicorn from 38.0.1 to 39.0.0 (#32975) Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 38.0.1 to 39.0.0. - [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases) - [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v38.0.1...v39.0.0) --- updated-dependencies: - dependency-name: eslint-plugin-unicorn dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: Form layout span 24 usage (#32981) close #32980 * docs: site build script update (#32984) * chore: rm color-less * refactor: MV theme to variable * docs: fix header * chore: clean up * chore: enable esbuild * refactor: Tree support generic (#32992) * chore: bump rc-tree * test: add test case * test: Add ts check * fix: Input.Search enterButton don't trigger click event (#32999) close #32993 * test: Update snapshot * fix: Cascader typescript (#33008) * chore: Cascsader add missing suffixIcon * chore: export CascaderRef * chore: Casacer type * fix: Updated translations in et_EE.tsx (#33005) * Updated translations in et_EE.tsx Added missing Estonian translations. * Updated et_EE.tsx Defined typeTemplate * chore: fix eslint * docs: fix Drawer closable description (#33018) 关闭按钮移至左上角了 * fix: Modal centered not centered (#33022) close #33021 * chore: use https://new-issue.ant.design back (#33029) * Rename template-1-bug-report.yml to template-1-bug-report.yml.close * Update config.yml * Rename template-2-feature-request.yml to template-2-feature-request.yml.close * docs: fix Drawer onClose description (#33031) Drawer 抽屉现在关闭按钮都在左上角了,描述不对 * fix: en-US#docs-fix Drawer closable description (#33035) * Update index.en-US.md * Update index.en-US.md * Update index.en-US.md * chore: upgrade @ant-design/bisheng-plugin * chore(deps-dev): bump eslint-config-airbnb from 18.2.1 to 19.0.0 (#32824) * chore(deps-dev): bump eslint-config-airbnb from 18.2.1 to 19.0.0 Bumps [eslint-config-airbnb](https://github.com/airbnb/javascript) from 18.2.1 to 19.0.0. - [Release notes](https://github.com/airbnb/javascript/releases) - [Commits](https://github.com/airbnb/javascript/compare/eslint-config-airbnb-v18.2.1...eslint-config-airbnb-v19.0.0) --- updated-dependencies: - dependency-name: eslint-config-airbnb dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * fix lint * fix lint * fix lint * fix lint * fix lint * fix lint * fix lint * fix lint * fix lint * chore: code style * memoize-one * add comment * fix lint * fix lint * fix lint * fix lint * fix lint * fix lint * fix lint * fix lint * fix lint * improve useMemo deps Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: afc163 * chore: opt of theme gen * chore: speed up site build mode * test: Update snapshot * chore: fix lint * docs(✨): release 4.17.2 (#33051) * docs(:sparkles:): release 4.17.2 * docs(:sparkles:): release 4.17.2 * feat: Support Table.EXPAND_COLUMN & Table.SELECTION_COLUMN (#33026) * feat: Table support Table.EXPAND_COLUMN & Table.SELECTION_COLUMN * docs: Update docs * feat: support Form labelWrap (#33048) * feat: form label can be wrap * fix api doc * fix ts * fix: TextArea height bug (#33055) * fix: TextArea height bug when has `showCount` close #33049 * fix snapshot * revert form demo * ci: fix site deploy * fix: Back of relative (#33070) * docs: Cascader displayRender data (#33087) * docs: Cascader displayRender data * ts: clean up * test: Update rc-resize-observer version * test: fix resize related test case * chore: fix ts error * test: Fix resize logic * docs: update demo * docs: clarify select option title doc close https://github.com/ant-design/ant-design/issues/33105 * fix(locale): Add missing zh-TW translation for Form.optional, fix #30361 (#33108) Co-authored-by: 诸岳 * fix: carousel type declaration (#33109) fix: CarouselRef["autoPlay"] is a method instead of a boolean value * chore: refactor some code (#33034) * Refactor some code * Apply suggestions from code review Co-authored-by: afc163 * [CodeFactor] Apply fixes [ci skip] [skip ci] * rename abbr to sizeClassNameMap * refactor: Button size class name Co-authored-by: afc163 Co-authored-by: codefactor-io * refactor: Move Table `rowSpan` & `colSpan` demo to `onCell` instead (#33114) * docs: change doc of span demo * docs: clear render props * fix: Radio dot offset when zooming (#33086) Co-authored-by: hydraZty * chore: bump version (#33124) * fix: Select width bug when searching (#32988) * fix: select placeholder should take place when searching close #27688 * fix snapshot * test: add test helper for accessibility As proposed in #22343, the components can be automatically validated for accessibility. This adds a test helper that runs Axe to check for accessibility violations. * chore(deps-dev): bump react-helmet-async from 1.1.2 to 1.2.0 (#33133) Bumps [react-helmet-async](https://github.com/staylor/react-helmet-async) from 1.1.2 to 1.2.0. - [Release notes](https://github.com/staylor/react-helmet-async/releases) - [Commits](https://github.com/staylor/react-helmet-async/commits) --- updated-dependencies: - dependency-name: react-helmet-async dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: fix ci in npm 8 * chore: remove react-virtualized from demo * refactor: replace let with const (#33134) * refactor: replace let with const * refactor: replace let with const * refactor: replace let with const * refactor: replace let with const new * Update components/affix/index.tsx * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: afc163 * chore(deps-dev): bump jsdom from 18.1.1 to 19.0.0 (#33156) Bumps [jsdom](https://github.com/jsdom/jsdom) from 18.1.1 to 19.0.0. - [Release notes](https://github.com/jsdom/jsdom/releases) - [Changelog](https://github.com/jsdom/jsdom/blob/master/Changelog.md) - [Commits](https://github.com/jsdom/jsdom/compare/18.1.1...19.0.0) --- updated-dependencies: - dependency-name: jsdom dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * test: fix ci warnings (#33160) * fix: anchor add prefixCls (#33085) Co-authored-by: undefined * docs: update badge * ci: fix checkout version (#33164) * ci: fix checkout version * chore: add more * test: fix test error * Revert "test: fix test error" This reverts commit 3881e5d7873eb62e6c28647a5fc7346184fa0508. * fix: fix badge animation end not trigger when parent is display:none (#33083) Co-authored-by: songlin.chen * test: fix Alert test (#33167) * text: fix Alert test * test: style * test: up snap * test: up * docs: Update index.zh-CN.md (#33184) 修复文档中 FormInstance 的 scrollToField方法 第二个参数 options 错误的类型 * fix: Upload `data` type (#33193) * fix: Upload `data` type * fix eslint errors * fix: radio cursor style (#33198) * fix: radio cursor style * [CodeFactor] Apply fixes to commit 38721bb [ci skip] [skip ci] Co-authored-by: codefactor-io * fix: Drawer title position (#33205) * fix(locale): Add missing zh-TW translation for Transfer (#33209) Co-authored-by: 诸岳 * fix: Button loading style missing in Firefox (#33199) * docs(:sparkles:): release 4.17.3 (#33213) * ci: fix footer click (#33214) * New Pull Request for README-sp_MX.md (#33226) * Create README-sp_MX.md Translation of README to Spanish. * Update README.md * Update README-zh_CN.md * Update README-uk_UA.md * Update README-pt_BR.md * fix: Form.Item的name属性改为parentNode,dom-align 死循环,内存溢出的bug (#31846) * Form.Item的name属性改为parentNode,dom-align 死循环,内存溢出的bug * Form.Item的name属性改为parentNode,dom-align 死循环,内存溢出的bug * fixed lint issues. * change: add black list for form item name * keep the definition the same as before * update snapshot * change formItemNameBlackList type to array * add test case for form item is in black list * add test condition * prettier it * change: add black list for form item name * keep the definition the same as before * merege from upstream * rebase this branch * change formItemNameBlackList type to array * add test case for form item is in black list * add test condition * prettier it * fix test case that casing by rebase * docs: update customize-theme-variable.md (#33272) * fix: Revert "fix: TextArea missing maxLength attr." (#33312) * Revert "fix: TextArea missing maxLength attribute (#32448)" This reverts commit ee703c187efb0c69f62bc7bae30a9d3c2215b489. * fix: snapshot * test: fix initial test case (#33313) * test: fix initial test case * chore: replace with exist fn * chore: rm dep conflict * chore: fix dev jest env * test: Update snapshot * docs(faq): correct 'Ant Design Mobile' (#33341) * chore(deps): update dependency antd-img-crop to v4 (#33352) Co-authored-by: Renovate Bot * docs: add 4.17.4 changelog (#33354) * docs: add 4.17.4 changelog * update changelog * chore: remove whitespace * fix(slider): disabled rail background-color error (#33369) Co-authored-by: chenjingjie * docs: improve changelog * Add Capture prop to Upload Component Typescript Definition (#33370) Co-authored-by: Michał Podeszwa <178679-michalpodeszwa@users.noreply.gitlab.com> * chore: add sorting translations for fi_FI (#33372) * chore: Bump Select related deps (#33364) * chore: bump select related version * test: Fix test case * chore: bump rc-select version * test: Update snapshot * chore: Update Select ts * test: Update snapshot * test: Update snapshot * test: Update snapshot * chore: Update ts definition * chore: fix internal ts def * test: update auto complete snapshot * chore: update snapshot * chore: bump version * chore: fix demo ts * chore: Move ValueType to the first place * test: Update test case * fix: Missing Catalan (ca_ES) translation key: Form.optional #33280 (#33377) Co-authored-by: zengguhao.zgh * docs: fixing document issues (#33259) * test: Demo check popup content (#33378) * auto demo * chore: update demo snapshot * fix: trigger mock ref logic * chore: try 2 test case * chore: more snapshot * chore: update snapshot * chore: fix ts * chore: split test * test: Update test case * chore: fix test order * fix: Descriptions default overflow value (#33392) close #33316 * chore: Internal Menu interface for ProLayout usage (#33399) * test: Update snapshot * chore: disable tooltip * chore: rename * fix: Skeleton missing style (#33405) * chore(deps): update dependency scrollama to v3 (#33418) Co-authored-by: Renovate Bot * docs: Update practical-projects.zh-CN.md (#33419) * test: update snapshot * chore: 4.18.0 changelog (#33424) * fix: not allow setState in Popconfirm if unmounted * Docs: fix fieldNames options typo (#33241) * docs: tree-select fieldNames error * docs: fix docs error * fix: docs typo * docs: fix fieldNames * fix: The current change of pagination triggers onChange (#33411) * fix: table pagination onChange error (#33374) * test: add test case for this (#33374) * docs: Update use-in-typescript.zh-CN.md (#33434) 这里有点不对 /* src/App.ts */ 应该是 /* src/App.tsx */ 执行npx create-react-app my-project-name --template typescript后也只有App.tsx文件 * docs: fix version error (#33443) Co-authored-by: machixian * fix: Dropdown button destroyPopupOnHide prop not working #33433 (#33442) Co-authored-by: zengguhao.zgh * docs: update changelog * test: Update snapshot * feat: add useMountedRef hook * chore: revert import order change * fix(Divider): with text dashed border color error (#33452) * test: add test for react memory leak warning in Popconfirm * fix: input not support number value (#33462) * docs: Update index.en-US.md (#33464) provide correct hash link for row selection docs to selection config anchor tag * refactor: refactor useMountedRef to useMounted * refactor: refactor useMounted to useDestroyed * docs: 4.18.1 changelog (#33476) * docs: 4.18.1 changelog * Update CHANGELOG.zh-CN.md Co-authored-by: afc163 Co-authored-by: afc163 * docs: improve Cascader API documentation (#33484) close #33477 * docs: improve changelog * Revert "fix: The current change of pagination triggers onChange (#33411)" (#33489) This reverts commit 629caccaae797af67dadbce60e9b2ff9ec3215b3. * docs: release 4.18.2 (#33491) * test: add test case for #33487 (#33492) * chore: remove whitespace * fix: Form should have default validateMessages in en locale (#33511) * fix missing words in commets (#33514) Lol * chore(deps): update dependency eslint-plugin-unicorn to v40 (#33520) Co-authored-by: Renovate Bot * fix: image demo test in argo-ci (#33523) close #33512 * Update README-sp_MX.md (#33535) The other title doesn't make sense. "Medio ambiente" is the environment, as in environmental pollution, nothing to do with computers. * fix: Select tag margin issue when using tagRender (#33539) close #33531 * docs: update upload-png-only demo (#33544) [[English Template / 英文模板](https://github.com/ant-design/ant-design/blob/master/.github/PULL_REQUEST_TEMPLATE.md)] ### 🤔 这个变动的性质是? - [ ] 新特性提交 - [ ] 日常 bug 修复 - [ ] 站点、文档改进 - [x] 演示代码改进 - [ ] 组件样式/交互改进 - [ ] TypeScript 定义更新 - [ ] 包体积优化 - [ ] 性能优化 - [ ] 功能增强 - [ ] 国际化改进 - [ ] 重构 - [ ] 代码风格优化 - [ ] 测试用例 - [ ] 分支合并 - [ ] 其他改动(是关于什么的改动?) ### 🔗 相关 Issue 无 ### 💡 需求背景和解决方案 无 ### 📝 更新日志 | 语言 | 更新描述 | | ------- | -------- | | 🇺🇸 英文 | | | 🇨🇳 中文 | | ### ☑️ 请求合并前的自查清单 ⚠️ 请自检并全部**勾选全部选项**。⚠️ - [x] 文档已补充或无须补充 - [x] 代码演示已提供或无须提供 - [x] TypeScript 定义已补充或无须补充 - [x] Changelog 已提供或无须提供 * docs: fix update demo * docs: correct react-router usage for breadcrumb (#33551) * ci: update verify-files-modify (#33552) * docs: correct semicolon in upload demo (#33544) (#33553) * fix: PageHeader state update error (#33546) * fix: Avoid mutating Event properties that are supposed to be getters (#33536) * Avoid mutating Event properties that are supposed to be getters React's synthetic Event objects have mutable `target` and `currentTarget` properties. These are an incorrect emulation of the corresponding DOM Event properties, which are _getters_ and cannot be assigned-to. AntD's input handling attempts to assign to these getters, which fails in Preact because it uses native Event objects. The solution is to replace the simple property assignments with property definitions, which is likely smaller anyway due to the existing use of `Object.create()` to construct a prototypal facade of Event objects. * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: afc163 * perf: upgrade rc-table (#33554) * fix: Upload types for pass generic (#33543) * fix: Upload types for pass generic * fix: Upload type * refactor: Upload type * feat: add Upload type test case * fix: CardGridProps should expose Div Properties like onClick #33264 (#33563) Co-authored-by: zengguhao.zgh * style: remove svg reset styles (#33579) see reason: https://github.com/necolas/normalize.css/commit/004d58b2f2e0ac3d03d075f8de46ce7c8234742f close #33573 * chore: classnames now provides its own type definitions, so we do not need a stub types definition (#33612) * chore(deps): update dependency concurrently to v7 (#33630) Co-authored-by: Renovate Bot * fix: Table emptynode fixed display (#33610) * docs(TreeSelect): add one missing field (#33619) * fix: table tree hover error #33453 (#33638) * fix: fix the table tree hover error #33453 * Update package.json Co-authored-by: afc163 Co-authored-by: zengguhao.zgh Co-authored-by: xrkffgg Co-authored-by: afc163 * feat: menu support home & end key (#33642) * fix: Form.Item shaking when `help` is empty string (#33644) * fix: empty help takes the line * test: test case * docs: add changelog 4.18.3 (#33639) * docs: add changelog 4.18.3 * docs: add * docs: add * docs: add user * Update CHANGELOG.en-US.md Co-authored-by: afc163 * Update CHANGELOG.zh-CN.md * docs: add Co-authored-by: afc163 * docs: add ProComponents cards (#33647) * merge * merge * docs: add ProComponents cards Co-authored-by: 期贤 * docs: fix changelog page build issue * docs: improve changelog of 4.18.3 (#33668) * refactor: opt for typography Tooltip perf (#33669) * fix: Warning: Encountered two children with the same key, 'seperator' (#33649) * fix: Warning: Encountered two children with the same key, 'seperator' #33183 * eslint-disable-next-line react/no-array-index-key Co-authored-by: dimbslmh * test: improve layout demo (#33653) * test: improve layout demo * test: improve layout demo * update snapshot * fix: checkbox group support options other than string (#33678) * fix: checkbox group support options other than string * docs: update checkbox docs * fix: radio group support value other than string * fix: only support number and string * docs: update group options type * fix: Image 图片底部空白 #30825 (#33631) * fix: remove input showCount attribute from parent component (#33686) * ci: simple files check actions * ci: preview-deploy download add run_id (#33680) * fix: Form validateMessages in nested ConfigProvider (#33705) close #33691 * fix: Input can not be hidden when prefix is set (#33706) * fix: Input can not be hidden when prefix is set * test: jest case for #33692 Co-authored-by: hydraZty * fix: align issue (#33709) * fix: align issue close #33703 * update snapshot * fix: Steps tail shouldn't show when type is navigation and labelPlacement is vertical (fix #33681) (#33716) * Steps tail shouldn't show when type is navigation and labelPlacement is vertical (fix #33681) * fix: Steps tail shouldn't show when type is navigation and labelPlacement is vertical close #33681 * fix: Steps tail shouldn't show when type is navigation and labelPlacement is vertical close #33681 * fix: shake issue. (#33726) * docs: add controlled preview demo for Image (#33727) * docs: add controlled preview demo for Image * test: update snapshot * test: fix lint error * fix: Invalid memoized context value in LocaleProvider (#33723) * fix: Invalid memoized context value in LocaleProvider * Add button type in test case. * fix: Invalid memoized context value in Anchor * docs(table): upgrade react-sortable-hoc usage (#33729) Co-authored-by: 亦逊 * fix Input及相关组件设置 hidden 时展示问题 (#33735) * fix: Image 图片底部空白 #30825 * feat: Input、Input.search、Input.Textarea、Input.password 设置 hidden 时 所有 prefix or suffix or showCount or allowClear or addonBefore or addonAfter 都应该隐藏 * fix: lint * fix: test * fix: test ui Co-authored-by: Jtree03 Co-authored-by: Chang Wei <867597730@qq.com> Co-authored-by: WeijieChen Co-authored-by: machixian Co-authored-by: hydraZty <670688667@qq.com> Co-authored-by: ext.zhangtianyi3 Co-authored-by: afc163 Co-authored-by: zwlafk <24400915+zwlafk@users.noreply.github.com> Co-authored-by: zwlafk Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: 二货机器人 Co-authored-by: Austaras Co-authored-by: Miloud Belaabed <60562443+miloudbelaabed@users.noreply.github.com> Co-authored-by: Miloud Belaabed Co-authored-by: codefactor-io Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jiajun Chen Co-authored-by: solitia7125 <39177579+solitia7125@users.noreply.github.com> Co-authored-by: 陈帅 Co-authored-by: X-Jagger Co-authored-by: Pob Ch <590650@gmail.com> Co-authored-by: 九思⚡⚡⚡ <2228429150@qq.com> Co-authored-by: DanielLeefu Co-authored-by: jiang Co-authored-by: seaSuper <90687224+seaSuper@users.noreply.github.com> Co-authored-by: Karott Schu Co-authored-by: Sepush Co-authored-by: Michał Podeszwa Co-authored-by: Michał Podeszwa <178679-michalpodeszwa@users.noreply.gitlab.com> Co-authored-by: JounQin Co-authored-by: huangkairan <56213366+huangkairan@users.noreply.github.com> Co-authored-by: benben Co-authored-by: 晋文涛 Co-authored-by: Sunny Luo Co-authored-by: ppbl <33046279+ppbl@users.noreply.github.com> Co-authored-by: VIREAK KEOSOKVIBOL <46261326+vireakkeosokvibol@users.noreply.github.com> Co-authored-by: Peach Co-authored-by: wedeso <35111662+wedeso@users.noreply.github.com> Co-authored-by: GannonSun Co-authored-by: shuchang <44997670+dreampasss@users.noreply.github.com> Co-authored-by: Gabriel Mendez Reyes Co-authored-by: xrkffgg Co-authored-by: 诸岳 Co-authored-by: 诸岳 Co-authored-by: Qiuxu <76635711+q1uxu@users.noreply.github.com> Co-authored-by: Frank Fang Co-authored-by: hydraZty Co-authored-by: Stef Schenkelaars Co-authored-by: Tom And Jerry <45513363+sunkuangdong@users.noreply.github.com> Co-authored-by: tangjinzhou <415800467@qq.com> Co-authored-by: songlinn <17741492+songlinn@users.noreply.github.com> Co-authored-by: songlin.chen Co-authored-by: zhichenshaw <37165714+zhichenshaw@users.noreply.github.com> Co-authored-by: mursulis <49298354+mursulis@users.noreply.github.com> Co-authored-by: James Co-authored-by: 谭真 <736420282@qq.com> Co-authored-by: Curly Brackets <76864176+curly210102@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Renovate Bot Co-authored-by: chen-jingjie <2383844893@qq.com> Co-authored-by: chenjingjie Co-authored-by: Sami Mäkinen Co-authored-by: guhao.zeng <45565100+ZzGGitter@users.noreply.github.com> Co-authored-by: zengguhao.zgh Co-authored-by: binyellow <571704908@qq.com> Co-authored-by: Nmaxwiver <9283555+hxmwr@users.noreply.github.com> Co-authored-by: MadCcc <1075746765@qq.com> Co-authored-by: dengqing <1247748612@qq.com> Co-authored-by: 2724635499 <2724635499@qq.com> Co-authored-by: 麦谷 <1141453778@qq.com> Co-authored-by: chen-jingjie <35401187+chen-jingjie@users.noreply.github.com> Co-authored-by: Garrick Crouch Co-authored-by: Xi Ming <46511237+seki2020@users.noreply.github.com> Co-authored-by: Pablo Recalde Co-authored-by: Ryan Lee Co-authored-by: Wuif <5678318+wuifdesign@users.noreply.github.com> Co-authored-by: Jason Miller Co-authored-by: uchanlee Co-authored-by: Long Hao (龙濠) <45565100+LongHaoo@users.noreply.github.com> Co-authored-by: Amumu Co-authored-by: NothingToDo <49073282+hemengke1997@users.noreply.github.com> Co-authored-by: Shanjie Chen Co-authored-by: xrkffgg Co-authored-by: 期贤 Co-authored-by: dimbslmh <745635+dimbslmh@users.noreply.github.com> Co-authored-by: dimbslmh Co-authored-by: zhenfan.yu Co-authored-by: whwangms Co-authored-by: ZhouZhen <503633021@qq.com> Co-authored-by: toSayNothing <91143836+toSayNothing@users.noreply.github.com> Co-authored-by: PlayerWho Co-authored-by: Di Wu Co-authored-by: yanm1ng <644169721@qq.com> Co-authored-by: 亦逊 Co-authored-by: zhang lay --- .github/workflows/preview-deploy.yml | 4 +- .github/workflows/verify-files-modify.yml | 9 +- CHANGELOG.en-US.md | 20 + CHANGELOG.zh-CN.md | 20 + components/anchor/Anchor.tsx | 18 +- .../anchor/__tests__/cached-context.test.tsx | 51 ++ .../__snapshots__/demo-extend.test.ts.snap | 136 +++++ .../__tests__/__snapshots__/demo.test.js.snap | 37 ++ components/avatar/demo/group.md | 14 + components/breadcrumb/demo/react-router.md | 4 +- components/card/Grid.tsx | 2 +- components/cascader/index.tsx | 3 +- components/checkbox/Group.tsx | 4 +- components/checkbox/__tests__/group.test.js | 9 + components/checkbox/index.en-US.md | 10 +- components/checkbox/index.zh-CN.md | 26 +- components/form/FormItem.tsx | 3 +- components/form/__tests__/index.test.js | 41 +- .../__snapshots__/demo-extend.test.ts.snap | 562 ++++++++++++++++++ .../__tests__/__snapshots__/demo.test.ts.snap | 562 ++++++++++++++++++ components/icon/__tests__/demo-extend.test.ts | 3 + components/icon/__tests__/demo.test.ts | 3 + components/icon/demo/basic.md | 16 +- components/icon/demo/custom.md | 19 +- components/icon/demo/iconfont.md | 5 +- components/icon/demo/scriptUrl.md | 5 +- components/icon/demo/two-tone.md | 5 +- .../__snapshots__/demo-extend.test.ts.snap | 51 ++ .../__tests__/__snapshots__/demo.test.js.snap | 51 ++ components/image/demo/controlled-preview.md | 44 ++ components/image/style/index.less | 2 +- components/input/ClearableLabeledInput.tsx | 11 +- components/input/Input.tsx | 18 +- components/input/TextArea.tsx | 2 + components/input/__tests__/index.test.js | 70 +++ .../__snapshots__/demo-extend.test.ts.snap | 2 +- .../__tests__/__snapshots__/demo.test.js.snap | 2 +- components/layout/demo/fixed-sider.md | 2 + .../__tests__/cached-context.test.tsx | 53 ++ components/locale-provider/index.tsx | 10 +- components/page-header/index.tsx | 6 +- components/radio/group.tsx | 4 +- components/radio/index.en-US.md | 10 +- components/radio/index.zh-CN.md | 22 +- components/select/style/multiple.less | 2 - components/steps/style/nav.less | 8 + components/style/core/global.less | 4 - components/style/core/iconfont.less | 6 + components/table/demo/drag-sorting-handler.md | 10 +- components/tree-select/index.en-US.md | 1 + components/tree-select/index.zh-CN.md | 1 + components/typography/Base.tsx | 95 +-- .../__snapshots__/demo-extend.test.ts.snap | 2 +- .../__tests__/__snapshots__/demo.test.js.snap | 2 +- components/typography/__tests__/index.test.js | 19 +- components/typography/demo/basic.md | 2 +- components/upload/Upload.tsx | 15 +- components/upload/__tests__/type.test.tsx | 25 +- components/upload/demo/upload-png-only.md | 5 +- components/upload/interface.tsx | 4 +- package.json | 7 +- .../template/Content/ComponentOverview.jsx | 23 +- site/theme/template/Content/MainContent.jsx | 77 ++- site/themeConfig.js | 2 + 64 files changed, 2069 insertions(+), 192 deletions(-) create mode 100644 components/anchor/__tests__/cached-context.test.tsx create mode 100644 components/icon/__tests__/__snapshots__/demo-extend.test.ts.snap create mode 100644 components/icon/__tests__/__snapshots__/demo.test.ts.snap create mode 100644 components/icon/__tests__/demo-extend.test.ts create mode 100644 components/icon/__tests__/demo.test.ts create mode 100644 components/image/demo/controlled-preview.md create mode 100644 components/locale-provider/__tests__/cached-context.test.tsx diff --git a/.github/workflows/preview-deploy.yml b/.github/workflows/preview-deploy.yml index c0203b6da160..6ed0f06f0526 100644 --- a/.github/workflows/preview-deploy.yml +++ b/.github/workflows/preview-deploy.yml @@ -21,6 +21,7 @@ jobs: uses: dawidd6/action-download-artifact@v2 with: workflow: ${{ github.event.workflow_run.workflow_id }} + run_id: ${{ github.event.workflow_run.id }} name: pr # Save PR id to output @@ -33,7 +34,7 @@ jobs: uses: dawidd6/action-download-artifact@v2 with: workflow: ${{ github.event.workflow_run.workflow_id }} - workflow_conclusion: success + run_id: ${{ github.event.workflow_run.id }} name: site - name: upload surge service @@ -75,6 +76,7 @@ jobs: uses: dawidd6/action-download-artifact@v2 with: workflow: ${{ github.event.workflow_run.workflow_id }} + run_id: ${{ github.event.workflow_run.id }} name: pr # Save PR id to output diff --git a/.github/workflows/verify-files-modify.yml b/.github/workflows/verify-files-modify.yml index ba06cf3b1df6..e536da38fa48 100644 --- a/.github/workflows/verify-files-modify.yml +++ b/.github/workflows/verify-files-modify.yml @@ -2,7 +2,7 @@ name: Verify Files modify on: pull_request_target: - types: [opened, edited, synchronize, ready_for_review] + types: [opened, synchronize] jobs: verify: @@ -25,7 +25,8 @@ jobs: forbid-files: 'components/style/themes/default.less' skip-verify-authority: 'admin' comment: | - 🚨 Hi @${{ github.event.pull_request.user.login }}. Thanks for your contribution, as the `default.less` file is currently being upgraded, changes will not be accepted for the time being. + 🚨 Hi @${{ github.event.pull_request.user.login }}. Thanks for your contribution, as the `default.less` file is currently being upgraded, changes are not recommended. - 🚨 你好,@${{ github.event.pull_request.user.login }}。感谢你的贡献,由于 `default.less` 文件近期处于升级状态,暂不接受更改。 - close: true + 🚨 你好,@${{ github.event.pull_request.user.login }}。感谢你的贡献,由于 `default.less` 文件近期处于升级状态,不建议进行更改。 + close: false + set-failed: false diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 66e6dedc8a02..547a3062d903 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -25,6 +25,26 @@ if you have some problem, welcome to connect `taofeng.yang@shopee.com` or `lay.z --- +## 4.18.3 + +`2022-01-10` + +- 🆕 Menu support `home` and `end` keyboard navigate. [#33642](https://github.com/ant-design/ant-design/pull/33642) [@dartamonov-vertex](https://github.com/dartamonov-vertex) +- Table + - ⚡️ Improve Table perfermance significantly when mount and unmount. [#33554](https://github.com/ant-design/ant-design/pull/33554) + - 🐞 Fix Table emptynode fixed display. [#33610](https://github.com/ant-design/ant-design/pull/33610) [@hemengke1997](https://github.com/hemengke1997) + - 🐞 Fix Table tree data hover error. [#33638](https://github.com/ant-design/ant-design/pull/33638) [@LongHaoo](https://github.com/LongHaoo) +- Form + - 🐞 Fix Form validateMessages is not correct in default locale. [#33511](https://github.com/ant-design/ant-design/pull/33511) + - 🐞 Fix Form.Item help with empty string makes layout shaking. [#33644](https://github.com/ant-design/ant-design/pull/33644) +- 🐞 Fix Input.Textarea throws error on preact. [#33536](https://github.com/ant-design/ant-design/pull/33536) [@developit](https://github.com/developit) +- 🐞 Fix PageHeader state update error after unmounted. [#33546](https://github.com/ant-design/ant-design/pull/33546) [@wuifdesign](https://github.com/wuifdesign) +- 💄 Fix Select tag margin issue when using `tagRender`. [#33539](https://github.com/ant-design/ant-design/pull/33539) +- 💄 Remove svg reset style for IE9-, fix svg elements being cutting style problem. [#33579](https://github.com/ant-design/ant-design/pull/33579) +- TypeScript + - 🤖 Fix Upload types for pass generic. [#33543](https://github.com/ant-design/ant-design/pull/33543) [@woochanleee](https://github.com/woochanleee) + - 🤖 Fix Card.Grid props should expose Div Properties like `onClick`. [#33563](https://github.com/ant-design/ant-design/pull/33563) [@LongHaoo](https://github.com/LongHaoo) + ## 4.18.2 `2021-12-30` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index c71de22354d9..f3f747088e97 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -25,6 +25,26 @@ timeline: true --- +## 4.18.3 + +`2022-01-10` + +- 🆕 Menu 组件支持 `home`(跳转到第一项)和 `end`(跳转到最后一项)的键盘操作。[#33642](https://github.com/ant-design/ant-design/pull/33642) [@dartamonov-vertex](https://github.com/dartamonov-vertex) +- Table + - ⚡️ 大幅优化 Table 渲染时和卸载时的性能。[#33554](https://github.com/ant-design/ant-design/pull/33554) + - 🐞 修复 Table 空状态未居中显示。[#33610](https://github.com/ant-design/ant-design/pull/33610) [@hemengke1997](https://github.com/hemengke1997) + - 🐞 修复 Table 树形数据展示 hover 高亮异常的问题。[#33638](https://github.com/ant-design/ant-design/pull/33638) [@LongHaoo](https://github.com/LongHaoo) +- Form + - 🐞 修复 Form 在英文语言包下错误提示文案不生效的问题。[#33511](https://github.com/ant-design/ant-design/pull/33511) + - 🐞 修复 Form.Item `help` 使用空字符串的时候布局抖动的问题。[#33644](https://github.com/ant-design/ant-design/pull/33644) +- 🐞 修复 Input.Textarea 在 preact 下报错的问题。[#33536](https://github.com/ant-design/ant-design/pull/33536) [@developit](https://github.com/developit) +- 🐞 修复 PageHeader unmounted 后报 `React state update on an unmounted component` 的错误。[#33546](https://github.com/ant-design/ant-design/pull/33546) [@wuifdesign](https://github.com/wuifdesign) +- 💄 修复 Select 使用 `tagRender` 时标签上下边距不统一的问题。[#33539](https://github.com/ant-design/ant-design/pull/33539) +- 💄 移除 svg 针对 IE9- 的重设样式,修复全局样式影响部分 svg 元素的问题。[#33579](https://github.com/ant-design/ant-design/pull/33579) +- TypeScript + - 🤖 修复 Upload 泛型定义。[#33543](https://github.com/ant-design/ant-design/pull/33543) [@woochanleee](https://github.com/woochanleee) + - 🤖 修复 Card.Grid 未能正常支持 `onClick` 的问题。[#33563](https://github.com/ant-design/ant-design/pull/33563) [@LongHaoo](https://github.com/LongHaoo) + ## 4.18.2 `2021-12-30` diff --git a/components/anchor/Anchor.tsx b/components/anchor/Anchor.tsx index 82b871267c77..851a2b965392 100644 --- a/components/anchor/Anchor.tsx +++ b/components/anchor/Anchor.tsx @@ -257,6 +257,16 @@ export default class Anchor extends React.Component ({ + registerLink: this.registerLink, + unregisterLink: this.unregisterLink, + scrollTo: this.handleScrollTo, + activeLink: link, + onClick: onClickFn, + }), + ); + render() { const { getPrefixCls, direction } = this.context; const { @@ -310,13 +320,7 @@ export default class Anchor extends React.Component ); - const contextValue = memoizeOne((link, onClickFn) => ({ - registerLink: this.registerLink, - unregisterLink: this.unregisterLink, - scrollTo: this.handleScrollTo, - activeLink: link, - onClick: onClickFn, - }))(activeLink, onClick); + const contextValue = this.getMemoizedContextValue(activeLink, onClick); return ( diff --git a/components/anchor/__tests__/cached-context.test.tsx b/components/anchor/__tests__/cached-context.test.tsx new file mode 100644 index 000000000000..0fa0db6f93b6 --- /dev/null +++ b/components/anchor/__tests__/cached-context.test.tsx @@ -0,0 +1,51 @@ +import React, { memo, useState, useRef, useContext } from 'react'; +import { mount } from 'enzyme'; +import Anchor from '../Anchor'; +import AnchorContext from '../context'; + +// we use'memo' here in order to only render inner component while context changed. +const CacheInner = memo(() => { + const countRef = useRef(0); + countRef.current++; + // subscribe anchor context + useContext(AnchorContext); + return ( +
+ Child Rendering Count: {countRef.current} +
+ ); +}); + +const CacheOuter = () => { + // We use 'useState' here in order to trigger parent component rendering. + const [count, setCount] = useState(1); + const handleClick = () => { + setCount(count + 1); + }; + // During each rendering phase, the cached context value returned from method 'Anchor#getMemoizedContextValue' will take effect. + // So 'CacheInner' component won't rerender. + return ( +
+ + Parent Rendering Count: {count} + + + +
+ ); +}; + +it("Rendering on Anchor without changed AnchorContext won't trigger rendering on child component.", () => { + const wrapper = mount(); + const childCount = wrapper.find('#child_count').text(); + wrapper.find('#parent_btn').at(0).simulate('click'); + expect(wrapper.find('#parent_count').text()).toBe('2'); + // child component won't rerender + expect(wrapper.find('#child_count').text()).toBe(childCount); + wrapper.find('#parent_btn').at(0).simulate('click'); + expect(wrapper.find('#parent_count').text()).toBe('3'); + // child component won't rerender + expect(wrapper.find('#child_count').text()).toBe(childCount); +}); diff --git a/components/avatar/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/avatar/__tests__/__snapshots__/demo-extend.test.ts.snap index 9b77bfac5d3f..6fb974fcc82f 100644 --- a/components/avatar/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/avatar/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -737,6 +737,142 @@ Array [ +2 +
+
+
+
+ +
+ +
+
+
+ , +