Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/3551 Bumps [antd](https://github.com/ant-design/ant-design) from 4.18.5 to 4.19.2. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/ant-design/ant-design/releases">antd's releases</a>.</em></p> <blockquote> <h2>4.19.2</h2> <ul> <li>🐞 Fix Dropdown not auto adjust placement when position on the edge of window. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34390">#34390</a></li> <li>💄 Change PageHeader elements margin from <code>12px</code> to <code>8px</code> inside <code>extra</code>. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34428">#34428</a></li> <li>🛠 Export css variable function in <code>antd/es/config-provider</code> folder to enable ssr requirement. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34436">#34436</a></li> <li>🛠 Refactor Menu with React hooks. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34433">#34433</a></li> <li>Input <ul> <li>💄 Fix Input font-size when <code>size</code> is large. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34381">#34381</a></li> <li>💄 Fix Input.Group wrong border when status is error. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34412">#34412</a></li> </ul> </li> <li>Form <ul> <li>🐞 Fix Form.Item removed in <code>form.validateFields</code> throw <code>Can't perform a React state update on an unmounted component</code> warning. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34405">#34405</a></li> <li>🐞 Fix to Form that <code>initialValues</code> would change if <code>preserve</code> is false. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34411">#34411</a></li> </ul> </li> <li>Tooltip <ul> <li>💄 Fix Tooltip width in Safari. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34415">#34415</a> <a href="https://github.com/jiandandkl"><code>@jiandandkl</code></a></li> <li>💄 Fix arrow size of Tooltip/Popover/Popconfirm. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34407">#34407</a></li> </ul> </li> <li>💄 Remove Collapse bottom border in simple style. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34366">#34366</a> <a href="https://github.com/PanStar"><code>@PanStar</code></a></li> <li>TypeScript <ul> <li>� Fix Input <code>data-*</code> type definition. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34410">#34410</a> <a href="https://github.com/GitKou"><code>@GitKou</code></a></li> <li>� Fix Transfer <code>footer</code> type definition. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34337">#34337</a> <a href="https://github.com/zomixi"><code>@zomixi</code></a></li> </ul> </li> </ul> <hr /> <ul> <li>🐞 修复 Dropdown 在边界情况下不会自动调整展示位置的问题。<a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34390">#34390</a></li> <li>💄 缩小 PageHeader <code>extra</code> 内元素间距为 <code>8px</code>。<a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34428">#34428</a></li> <li>🛠 导出 antd/es/config-provider 目录下的 css variable 函数以支持 ssr 的需求。<a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34436">#34436</a></li> <li>🛠 使用 React hooks 重构 Menu。<a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34433">#34433</a></li> <li>Input <ul> <li>💄 修复大尺寸 Input 的字号问题。<a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34381">#34381</a></li> <li>💄 修复 Input.Group 多余的错误边框样式。<a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34412">#34412</a></li> </ul> </li> <li>Form <ul> <li>🐞 修复 Form.Item 在 <code>form.validateFields</code> 中移除时抛出 <code>Can't perform a React state update on an unmounted component</code> 警告的问题。<a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34405">#34405</a></li> <li>🐞 修复 Form 组件当 <code>preserve</code> 为 <code>false</code> 时 <code>initialValues</code> 会被更改的问题。<a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34411">#34411</a></li> </ul> </li> <li>Tooltip <ul> <li>💄 修复 Tooltip 在 Safari 下的内容宽度问题。<a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34415">#34415</a> <a href="https://github.com/jiandandkl"><code>@jiandandkl</code></a></li> <li>💄 修复 Tooltip/Popover/Popconfirm 等组件箭头大小问题。<a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34407">#34407</a></li> </ul> </li> <li>💄 优化 Collapse 简洁模式的底边框。<a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34366">#34366</a> <a href="https://github.com/PanStar"><code>@PanStar</code></a></li> <li>TypeScript <ul> <li>� 修复 Input 不支持 <code>data-*</code> TS 定义的问题。<a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34410">#34410</a> <a href="https://github.com/GitKou"><code>@GitKou</code></a></li> <li>� 修复 Transfer 的 <code>footer</code> 类型定义。<a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34337">#34337</a> <a href="https://github.com/zomixi"><code>@zomixi</code></a></li> </ul> </li> </ul> <h2>4.19.1</h2> <ul> <li>🐞 Fix less compile error related to custom status. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34350">#34350</a> <ul> <li>🐞 Fix error <code>ReferenceError: colorPalette is not defined</code> when customize theme.</li> <li>🐞 Fix error <code>Error: Invalid class or id selector syntax</code> when import <code>antd/dist/antd.css</code>.</li> </ul> </li> <li>🐞 Fix Input.Passowrd icon color in site. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34354">#34354</a></li> <li>🐞 Fix ConfigProvider <code>csp</code> sometime not effect on Icon. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34356">#34356</a></li> </ul> <hr /> <ul> <li>🐞 修复自定义状态相关的 less 编译错误 <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34350">#34350</a> <ul> <li>🐞 修复使用定制主题时 less 编译提示 <code>ReferenceError: colorPalette is not defined</code> 错误。</li> <li>🐞 修复引入 <code>antd/dist/antd.css</code> 时提示 <code>Error: Invalid class or id selector syntax</code> 错误。</li> </ul> </li> <li>🐞 修复 Input.Passowrd 图标颜色错误。<a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34354">#34354</a></li> <li>🐞 修复 ConfigProvider <code>csp</code> 有时在 Icon 上不会生效的问题。<a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34356">#34356</a></li> </ul> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/ant-design/ant-design/blob/master/CHANGELOG.en-US.md">antd's changelog</a>.</em></p> <blockquote> <h2>4.19.2</h2> <p><code>2022-03-13</code></p> <ul> <li>🐞 Fix Dropdown not auto adjust placement when position on the edge of window. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34390">#34390</a></li> <li>💄 Change PageHeader elements margin from <code>12px</code> to <code>8px</code> inside <code>extra</code>. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34428">#34428</a></li> <li>🛠 Export css variable function in <code>antd/es/config-provider</code> folder to enable ssr requirement. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34436">#34436</a></li> <li>🛠 Refactor Menu with React hooks. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34433">#34433</a></li> <li>Input <ul> <li>💄 Fix Input font-size when <code>size</code> is large. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34381">#34381</a></li> <li>💄 Fix Input.Group wrong border when status is error. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34412">#34412</a></li> </ul> </li> <li>Form <ul> <li>🐞 Fix Form.Item removed in <code>form.validateFields</code> throw <code>Can't perform a React state update on an unmounted component</code> warning. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34405">#34405</a></li> <li>🐞 Fix to Form that <code>initialValues</code> would change if <code>preserve</code> is false. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34411">#34411</a></li> </ul> </li> <li>Tooltip <ul> <li>💄 Fix Tooltip width in Safari. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34415">#34415</a> <a href="https://github.com/jiandandkl"><code>@jiandandkl</code></a></li> <li>💄 Fix arrow size of Tooltip/Popover/Popconfirm. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34407">#34407</a></li> </ul> </li> <li>💄 Remove Collapse bottom border in simple style. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34366">#34366</a> <a href="https://github.com/PanStar"><code>@PanStar</code></a></li> <li>TypeScript <ul> <li>� Fix Input <code>data-*</code> type definition. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34410">#34410</a> <a href="https://github.com/GitKou"><code>@GitKou</code></a></li> <li>� Fix Transfer <code>footer</code> type definition. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34337">#34337</a> <a href="https://github.com/zomixi"><code>@zomixi</code></a></li> </ul> </li> </ul> <h2>4.19.1</h2> <p><code>2022-03-08</code></p> <ul> <li>🐞 Fix less compile error related to custom status. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34350">#34350</a> <ul> <li>🐞 Fix error <code>ReferenceError: colorPalette is not defined</code> when customize theme.</li> <li>🐞 Fix error <code>Error: Invalid class or id selector syntax</code> when import <code>antd/dist/antd.css</code>.</li> </ul> </li> <li>🐞 Fix Input.Passowrd icon color in site. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34354">#34354</a></li> <li>🐞 Fix ConfigProvider <code>csp</code> sometime not effect on Icon. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34356">#34356</a></li> </ul> <h2>4.19.0</h2> <p><code>2022-03-08</code></p> <ul> <li> <p>💄 Optimize arrow style for some components. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/33710">#33710</a></p> </li> <li> <p>Input</p> <ul> <li>🛠 Refactor Input with rc-input. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34206">#34206</a> <ul> <li>Attention: The type and value of <code>ref</code> is modified because of refactoring from class component to function component. You can still get DOM node from <code>input</code>, and other methods such as <code>focus</code> and <code>blur</code> mentioned in document are also supported.</li> </ul> </li> <li>🆕 Support <code>clearIcon</code> prop for customizing clear icon. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34325">#34325</a></li> </ul> </li> <li> <p>Table</p> <ul> <li>🆕 <code>filterSearch</code> now support passing function to customize search. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34085">#34085</a> <a href="https://github.com/heiyu4585"><code>@heiyu4585</code></a></li> <li>🆕 <code>column.filterDropdown({ clearFilters })</code> support <code>clearFilters({ confirm: false, closeDropdown: false })</code>. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34120">#34120</a> <a href="https://github.com/heiyu4585"><code>@heiyu4585</code></a></li> <li>⌨️ Table adds <code>aria-sort</code> attribute for screen readers. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/33603">#33603</a> <a href="https://github.com/dgreene1"><code>@dgreene1</code></a></li> <li>🐞 Fix Table filters select-all Checkbox not changed when select item. <a href="https://github-redirect.dependabot.com/ant-design/ant-design/pull/34295">#34295</a></li> </ul> </li> <li> <p>🆕 Data entry components add <code>status</code> prop to support custom status.</p> </li> </ul> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="085a9e9235"><code>085a9e9</code></a> chore: upgrade rc-menu to 9.3.x (<a href="https://github-redirect.dependabot.com/ant-design/ant-design/issues/34473">#34473</a>)</li> <li><a href="01dceec0c7"><code>01dceec</code></a> docs(✨ ): changelog for 4.19.2 (<a href="https://github-redirect.dependabot.com/ant-design/ant-design/issues/34472">#34472</a>)</li> <li><a href="ed47a8e1ea"><code>ed47a8e</code></a> docs(module:timeline): fix typo (<a href="https://github-redirect.dependabot.com/ant-design/ant-design/issues/34389">#34389</a>)</li> <li><a href="2e27c00293"><code>2e27c00</code></a> chore: export css variable func (<a href="https://github-redirect.dependabot.com/ant-design/ant-design/issues/34436">#34436</a>)</li> <li><a href="c50bbe64bb"><code>c50bbe6</code></a> chore: refactor internal menu with hooks (<a href="https://github-redirect.dependabot.com/ant-design/ant-design/issues/34433">#34433</a>)</li> <li><a href="f987bd0479"><code>f987bd0</code></a> fix: PageHeader extra gutter (<a href="https://github-redirect.dependabot.com/ant-design/ant-design/issues/34428">#34428</a>)</li> <li><a href="86415ef8a2"><code>86415ef</code></a> docs(Table): replace the link of <code>TableComponents</code> prop with <code>rc-table</code> type ...</li> <li><a href="fca7210309"><code>fca7210</code></a> fix: Tooltip width in safari (<a href="https://github-redirect.dependabot.com/ant-design/ant-design/issues/34415">#34415</a>)</li> <li><a href="362a99e9d4"><code>362a99e</code></a> feat: hide the last border in borderless mode (<a href="https://github-redirect.dependabot.com/ant-design/ant-design/issues/34366">#34366</a>)</li> <li><a href="fbb98f2b4f"><code>fbb98f2</code></a> Fix InputProps supports data attributes (<a href="https://github-redirect.dependabot.com/ant-design/ant-design/issues/34410">#34410</a>)</li> <li>Additional commits viewable in <a href="https://github.com/ant-design/ant-design/compare/4.18.5...4.19.2">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `dependabot rebase` will rebase this PR - `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `dependabot merge` will merge this PR after your CI passes on it - `dependabot squash and merge` will squash and merge this PR after your CI passes on it - `dependabot cancel merge` will cancel a previously requested merge and block automerging - `dependabot reopen` will reopen this PR if it is closed - `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Pull Request resolved: https://github.com/facebook/flipper/pull/3531 Test Plan: Imported from GitHub, without a `Test Plan:` line. yarn start --no-launcher {F711751713} Reviewed By: mweststrate Differential Revision: D34867418 Pulled By: lblasa fbshipit-source-id: 6af37b791f4e232dc3ae7b7350d2091f4e2f246f
58 lines
2.1 KiB
Diff
58 lines
2.1 KiB
Diff
diff --git a/node_modules/antd/es/button/button.js b/node_modules/antd/es/button/button.js
|
|
index a1d8a28..f35bec9 100644
|
|
--- a/node_modules/antd/es/button/button.js
|
|
+++ b/node_modules/antd/es/button/button.js
|
|
@@ -197,6 +197,8 @@ var InternalButton = function InternalButton(props, ref) {
|
|
}, [loadingOrDelay]);
|
|
React.useEffect(fixTwoCNChar, [buttonRef]);
|
|
|
|
+ var scope = React.useContext(global.FlipperTrackingScopeContext);
|
|
+
|
|
var handleClick = function handleClick(e) {
|
|
var onClick = props.onClick,
|
|
disabled = props.disabled; // https://github.com/ant-design/ant-design/issues/30207
|
|
@@ -206,7 +208,13 @@ var InternalButton = function InternalButton(props, ref) {
|
|
return;
|
|
}
|
|
|
|
- onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
+ if (onClick !== null && onClick !== void 0) {
|
|
+ global.flipperTrackInteraction(
|
|
+ 'Button', 'onClick', scope, props.title || props.children || props.icon,
|
|
+ onClick,
|
|
+ e
|
|
+ );
|
|
+ }
|
|
};
|
|
|
|
devWarning(!(typeof icon === 'string' && icon.length > 2), 'Button', "`icon` is using ReactNode instead of string naming in v4. Please check `".concat(icon, "` at https://ant.design/components/icon"));
|
|
diff --git a/node_modules/antd/es/typography/Link.js b/node_modules/antd/es/typography/Link.js
|
|
index 5079ee6..43bf942 100644
|
|
--- a/node_modules/antd/es/typography/Link.js
|
|
+++ b/node_modules/antd/es/typography/Link.js
|
|
@@ -34,12 +34,23 @@ var Link = function Link(_a, ref) {
|
|
}); // https://github.com/ant-design/ant-design/issues/26622
|
|
// @ts-ignore
|
|
|
|
+ var onClick = React.useCallback((e) => {
|
|
+ if (mergedProps.onClick) {
|
|
+ return mergedProps.onClick(e);
|
|
+ }
|
|
+ if (mergedProps.href) {
|
|
+ global.flipperOpenLink(mergedProps.href);
|
|
+ e.preventDefault();
|
|
+ e.stopPropagation();
|
|
+ };
|
|
+ }, [mergedProps.href, mergedProps.onClick])
|
|
|
|
delete mergedProps.navigate;
|
|
return /*#__PURE__*/React.createElement(Base, _extends({}, mergedProps, {
|
|
ref: baseRef,
|
|
ellipsis: !!ellipsis,
|
|
- component: "a"
|
|
+ component: "a",
|
|
+ onClick: onClick,
|
|
}));
|
|
};
|
|
|