Skip to content

Commit

Permalink
chrome: update snapshot (#8864)
Browse files Browse the repository at this point in the history
* chrome: update snapshot

* fix(TextArea): omit showCount from fieldProps in render function

fix(Item): handle expandedRowClassName type correctly
  • Loading branch information
chenshuai2144 authored Nov 14, 2024
1 parent f64090a commit 3497642
Show file tree
Hide file tree
Showing 19 changed files with 7,605 additions and 6,858 deletions.
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@
"@ant-design/antd-theme-variable": "^1.0.0",
"@ant-design/cssinjs": "^1.21.1",
"@ant-design/icons": "^5.5.1",
"@babel/core": "^7.25.8",
"@babel/eslint-plugin": "^7.25.7",
"@babel/parser": "^7.25.8",
"@babel/core": "^7.26.0",
"@babel/eslint-plugin": "^7.25.9",
"@babel/parser": "^7.26.2",
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
"@babel/preset-env": "^7.25.8",
"@babel/preset-react": "^7.25.7",
"@babel/preset-typescript": "^7.25.7",
"@babel/traverse": "^7.25.7",
"@babel/preset-env": "^7.26.0",
"@babel/preset-react": "^7.25.9",
"@babel/preset-typescript": "^7.26.0",
"@babel/traverse": "^7.25.9",
"@emotion/babel-plugin": "^11.12.0",
"@emotion/cache": "^11.13.1",
"@emotion/css": "^11.13.4",
Expand All @@ -74,11 +74,11 @@
"@types/chroma-js": "^2.4.4",
"@types/glob": "^8.1.0",
"@types/history": "^4.7.11",
"@types/lodash": "^4.17.10",
"@types/lodash": "^4.17.13",
"@types/lodash-es": "^4.17.12",
"@types/mockjs": "^1.0.10",
"@types/node": "^14.18.63",
"@types/react": "^18.3.11",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react-helmet": "^6.1.11",
"@types/react-responsive": "^8.0.8",
Expand All @@ -90,11 +90,11 @@
"@umijs/plugin-analytics": "^0.2.4",
"@umijs/test": "^3.5.43",
"@umijs/test-utils": "^3.5.43",
"@umijs/utils": "^4.3.27",
"@umijs/utils": "^4.3.31",
"@vitest/coverage-istanbul": "^0.34.6",
"animated-scroll-to": "^2.3.0",
"antd": "^5.21.4",
"antd-style": "^3.7.0",
"antd": "^5.22.1",
"antd-style": "^3.7.1",
"babel-loader": "^9.2.1",
"babel-types": "^6.26.0",
"chalk": "^4.1.2",
Expand All @@ -107,13 +107,13 @@
"esbuild": "^0.15.18",
"eslint": "^8.57.1",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-react": "^7.37.1",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-unicorn": "^47.0.0",
"execa": "^5.1.1",
"express": "^4.21.1",
"fast-deep-equal": "^3.1.3",
"father": "^4.5.0",
"father": "^4.5.1",
"gh-pages": "^5.0.0",
"glob": "^8.1.0",
"identity-obj-proxy": "^3.0.0",
Expand All @@ -137,7 +137,7 @@
"prettier-plugin-packagejson": "^2.5.3",
"pretty-quick": "^3.3.1",
"query-string": "^6.14.1",
"rc-field-form": "^2.4.0",
"rc-field-form": "^2.5.1",
"rc-footer": "^0.6.8",
"rc-resize-observer": "^1.4.0",
"rc-steps": "^6.0.1",
Expand All @@ -160,7 +160,7 @@
"timezone-mock": "^1.3.6",
"ts-node": "^10.9.2",
"typescript": "^5.6.3",
"umi": "^4.3.27",
"umi": "^4.3.31",
"umi-request": "^1.4.0",
"unified": "^11.0.5",
"unist-util-visit": "^5.0.0",
Expand Down
9 changes: 7 additions & 2 deletions packages/field/src/components/TextArea/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useIntl } from '@ant-design/pro-provider';
import { Input } from 'antd';
import omit from 'omit.js';
import React from 'react';
import type { ProFieldFC } from '../../index';
import FieldTextAreaReadonly from './readonly';
Expand All @@ -15,13 +16,17 @@ import 'antd/lib/input/style';
const FieldTextArea: ProFieldFC<{
text: string;
}> = (props, ref) => {
const { text, mode, render, , fieldProps } = props;
const { text, mode, render, renderFormItem, fieldProps } = props;
const intl = useIntl();

if (mode === 'read') {
const dom = <FieldTextAreaReadonly {...props} ref={ref} />;
if (render) {
return render(text, { mode, ...omit(fieldProps, ['showCount']) }, dom);
return render(
text,
{ mode, ...(omit(fieldProps, ['showCount']) as any) },
dom,
);
}
return dom;
}
Expand Down
4 changes: 3 additions & 1 deletion packages/list/src/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,9 @@ function ProListItem<RecordType>(props: ItemProps<RecordType>) {
<div
className={
expandedRowClassName &&
expandedRowClassName(record, index, indentSize)
typeof expandedRowClassName !== 'string'
? expandedRowClassName(record, index, indentSize)
: expandedRowClassName
}
>
{expandedRowDom}
Expand Down
4,499 changes: 2,269 additions & 2,230 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

190 changes: 103 additions & 87 deletions tests/__snapshots__/doc.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -730,29 +730,33 @@ exports[`docs/components demos > 📸 renders ./docs/components/valueEnum-map.ts
class="ant-select-selector"
>
<span
class="ant-select-selection-search"
>
<input
aria-autocomplete="list"
aria-controls="status1_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="status1_list"
autocomplete="off"
class="ant-select-selection-search-input"
id="status1"
readonly=""
role="combobox"
style="opacity: 0;"
type="search"
unselectable="on"
value=""
/>
</span>
<span
class="ant-select-selection-placeholder"
class="ant-select-selection-wrap"
>
请选择
<span
class="ant-select-selection-search"
>
<input
aria-autocomplete="list"
aria-controls="status1_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="status1_list"
autocomplete="off"
class="ant-select-selection-search-input"
id="status1"
readonly=""
role="combobox"
style="opacity: 0;"
type="search"
unselectable="on"
value=""
/>
</span>
<span
class="ant-select-selection-placeholder"
>
请选择
</span>
</span>
</div>
<span
Expand Down Expand Up @@ -829,29 +833,33 @@ exports[`docs/components demos > 📸 renders ./docs/components/valueEnum-map.ts
class="ant-select-selector"
>
<span
class="ant-select-selection-search"
class="ant-select-selection-wrap"
>
<input
aria-autocomplete="list"
aria-controls="status2_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="status2_list"
autocomplete="off"
class="ant-select-selection-search-input"
id="status2"
readonly=""
role="combobox"
style="opacity: 0;"
type="search"
unselectable="on"
value=""
/>
</span>
<span
class="ant-select-selection-placeholder"
>
请选择
<span
class="ant-select-selection-search"
>
<input
aria-autocomplete="list"
aria-controls="status2_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="status2_list"
autocomplete="off"
class="ant-select-selection-search-input"
id="status2"
readonly=""
role="combobox"
style="opacity: 0;"
type="search"
unselectable="on"
value=""
/>
</span>
<span
class="ant-select-selection-placeholder"
>
请选择
</span>
</span>
</div>
<span
Expand Down Expand Up @@ -924,29 +932,33 @@ exports[`docs/components demos > 📸 renders ./docs/components/valueEnum-map.ts
class="ant-select-selector"
>
<span
class="ant-select-selection-search"
>
<input
aria-autocomplete="list"
aria-controls="status3_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="status3_list"
autocomplete="off"
class="ant-select-selection-search-input"
id="status3"
readonly=""
role="combobox"
style="opacity: 0;"
type="search"
unselectable="on"
value=""
/>
</span>
<span
class="ant-select-selection-placeholder"
class="ant-select-selection-wrap"
>
请选择
<span
class="ant-select-selection-search"
>
<input
aria-autocomplete="list"
aria-controls="status3_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="status3_list"
autocomplete="off"
class="ant-select-selection-search-input"
id="status3"
readonly=""
role="combobox"
style="opacity: 0;"
type="search"
unselectable="on"
value=""
/>
</span>
<span
class="ant-select-selection-placeholder"
>
请选择
</span>
</span>
</div>
<span
Expand Down Expand Up @@ -1248,7 +1260,7 @@ exports[`docs/components demos > 📸 renders ./docs/components/valueEnum-map.ts
xmlns="http://www.w3.org/2000/svg"
>
<title>
Simple Empty
暂无数据
</title>
<g
fill="none"
Expand Down Expand Up @@ -1341,27 +1353,31 @@ exports[`docs/components demos > 📸 renders ./docs/components/valueType.tsx co
class="ant-select-selector"
>
<span
class="ant-select-selection-search"
>
<input
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
class="ant-select-selection-search-input"
id="rc_select_TEST_OR_SSR"
role="combobox"
type="search"
value=""
/>
</span>
<span
class="ant-select-selection-item"
title="文本框"
class="ant-select-selection-wrap"
>
文本框
<span
class="ant-select-selection-search"
>
<input
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
class="ant-select-selection-search-input"
id="rc_select_TEST_OR_SSR"
role="combobox"
type="search"
value=""
/>
</span>
<span
class="ant-select-selection-item"
title="文本框"
>
文本框
</span>
</span>
</div>
<span
Expand Down
Loading

0 comments on commit 3497642

Please sign in to comment.