Browse Source

chore: remove useless tsx support (#39934)

* chore: remove useless tsx support

* add

* revert

* add

* fix

* fix

* add test case

* fix
pull/39945/head
lijianan 2 years ago
committed by GitHub
parent
commit
5d3381334c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .gitignore
  2. 0
      components/index.ts
  3. 0
      components/style/compact-item-vertical.ts
  4. 0
      components/style/compact-item.ts
  5. 0
      components/style/index.ts
  6. 0
      components/style/motion/collapse.ts
  7. 0
      components/style/motion/fade.ts
  8. 0
      components/style/motion/motion.ts
  9. 0
      components/style/motion/move.ts
  10. 0
      components/style/motion/slide.ts
  11. 0
      components/style/motion/zoom.ts
  12. 0
      components/style/operationUnit.ts
  13. 0
      components/style/placementArrow.ts
  14. 0
      components/style/roundedArrow.ts
  15. 0
      components/switch/style/index.ts
  16. 0
      components/table/Column.ts
  17. 0
      components/table/ColumnGroup.ts
  18. 11
      components/table/__tests__/Table.test.tsx
  19. 101
      components/table/__tests__/__snapshots__/Table.test.tsx.snap
  20. 0
      components/table/hooks/useTitleColumns.ts
  21. 0
      components/table/index.ts
  22. 0
      components/table/interface.ts
  23. 0
      components/table/style/bordered.ts
  24. 0
      components/table/style/ellipsis.ts
  25. 0
      components/table/style/empty.ts
  26. 0
      components/table/style/expand.ts
  27. 0
      components/table/style/filter.ts
  28. 0
      components/table/style/fixed.ts
  29. 0
      components/table/style/index.ts
  30. 0
      components/table/style/pagination.ts
  31. 0
      components/table/style/radius.ts
  32. 0
      components/table/style/rtl.ts
  33. 0
      components/table/style/selection.ts
  34. 0
      components/table/style/size.ts
  35. 0
      components/table/style/sorter.ts
  36. 0
      components/table/style/sticky.ts
  37. 0
      components/table/style/summary.ts
  38. 0
      components/tabs/TabPane.ts
  39. 0
      components/tabs/style/index.ts
  40. 0
      components/tabs/style/motion.ts
  41. 0
      components/tag/style/index.ts
  42. 0
      components/theme/internal.ts
  43. 0
      components/time-picker/locale/ar_EG.ts
  44. 0
      components/time-picker/locale/az_AZ.ts
  45. 0
      components/time-picker/locale/bg_BG.ts
  46. 0
      components/time-picker/locale/bn_BD.ts
  47. 0
      components/time-picker/locale/by_BY.ts
  48. 0
      components/time-picker/locale/ca_ES.ts
  49. 0
      components/time-picker/locale/cs_CZ.ts
  50. 0
      components/time-picker/locale/da_DK.ts
  51. 0
      components/time-picker/locale/de_DE.ts
  52. 0
      components/time-picker/locale/el_GR.ts
  53. 0
      components/time-picker/locale/en_GB.ts
  54. 0
      components/time-picker/locale/en_US.ts
  55. 0
      components/time-picker/locale/es_ES.ts
  56. 0
      components/time-picker/locale/et_EE.ts
  57. 0
      components/time-picker/locale/eu_ES.ts
  58. 0
      components/time-picker/locale/fa_IR.ts
  59. 0
      components/time-picker/locale/fi_FI.ts
  60. 0
      components/time-picker/locale/fr_BE.ts
  61. 0
      components/time-picker/locale/fr_CA.ts
  62. 0
      components/time-picker/locale/fr_FR.ts
  63. 0
      components/time-picker/locale/ga_IE.ts
  64. 0
      components/time-picker/locale/gl_ES.ts
  65. 0
      components/time-picker/locale/he_IL.ts
  66. 0
      components/time-picker/locale/hi_IN.ts
  67. 0
      components/time-picker/locale/hr_HR.ts
  68. 0
      components/time-picker/locale/hu_HU.ts
  69. 0
      components/time-picker/locale/id_ID.ts
  70. 0
      components/time-picker/locale/is_IS.ts
  71. 0
      components/time-picker/locale/it_IT.ts
  72. 0
      components/time-picker/locale/ja_JP.ts
  73. 0
      components/time-picker/locale/ka_GE.ts
  74. 0
      components/time-picker/locale/kk_KZ.ts
  75. 0
      components/time-picker/locale/km_KH.ts
  76. 0
      components/time-picker/locale/kmr_IQ.ts
  77. 0
      components/time-picker/locale/kn_IN.ts
  78. 0
      components/time-picker/locale/ko_KR.ts
  79. 0
      components/time-picker/locale/lt_LT.ts
  80. 0
      components/time-picker/locale/lv_LV.ts
  81. 0
      components/time-picker/locale/mk_MK.ts
  82. 0
      components/time-picker/locale/ml_IN.ts
  83. 0
      components/time-picker/locale/mn_MN.ts
  84. 0
      components/time-picker/locale/ms_MY.ts
  85. 0
      components/time-picker/locale/nb_NO.ts
  86. 0
      components/time-picker/locale/nl_BE.ts
  87. 0
      components/time-picker/locale/nl_NL.ts
  88. 0
      components/time-picker/locale/pl_PL.ts
  89. 0
      components/time-picker/locale/pt_BR.ts
  90. 0
      components/time-picker/locale/pt_PT.ts
  91. 0
      components/time-picker/locale/ro_RO.ts
  92. 0
      components/time-picker/locale/ru_RU.ts
  93. 0
      components/time-picker/locale/si_LK.ts
  94. 0
      components/time-picker/locale/sk_SK.ts
  95. 0
      components/time-picker/locale/sl_SI.ts
  96. 0
      components/time-picker/locale/sr_RS.ts
  97. 0
      components/time-picker/locale/sv_SE.ts
  98. 0
      components/time-picker/locale/ta_IN.ts
  99. 0
      components/time-picker/locale/th_TH.ts
  100. 0
      components/time-picker/locale/tk_TK.ts

2
.gitignore

@ -47,7 +47,7 @@ server/
# Docs templates
scripts/previewEditor/index.html
components/version/version.tsx
components/version/version.ts
components/version/token.json
components/version/token-meta.json
.dumi/tmp

0
components/index.tsx → components/index.ts

0
components/style/compact-item-vertical.tsx → components/style/compact-item-vertical.ts

0
components/style/compact-item.tsx → components/style/compact-item.ts

0
components/style/index.tsx → components/style/index.ts

0
components/style/motion/collapse.tsx → components/style/motion/collapse.ts

0
components/style/motion/fade.tsx → components/style/motion/fade.ts

0
components/style/motion/motion.tsx → components/style/motion/motion.ts

0
components/style/motion/move.tsx → components/style/motion/move.ts

0
components/style/motion/slide.tsx → components/style/motion/slide.ts

0
components/style/motion/zoom.tsx → components/style/motion/zoom.ts

0
components/style/operationUnit.tsx → components/style/operationUnit.ts

0
components/style/placementArrow.tsx → components/style/placementArrow.ts

0
components/style/roundedArrow.tsx → components/style/roundedArrow.ts

0
components/switch/style/index.tsx → components/switch/style/index.ts

0
components/table/Column.tsx → components/table/Column.ts

0
components/table/ColumnGroup.tsx → components/table/ColumnGroup.ts

11
components/table/__tests__/Table.test.tsx

@ -1,3 +1,4 @@
import { ConfigProvider } from 'antd';
import React from 'react';
import type { TableProps } from '..';
import Table from '..';
@ -360,4 +361,14 @@ describe('Table', () => {
expect(container.querySelector('table')?.getAttribute('aria-label')).toBe('label');
expect(container.querySelector('.ant-table')?.getAttribute('data-number')).toBe('123');
});
it('support wireframe', () => {
const columns = [{ title: 'Name', key: 'name', dataIndex: 'name' }];
const { container } = render(
<ConfigProvider theme={{ token: { wireframe: true } }}>
<Table columns={columns} />
</ConfigProvider>,
);
expect(container.firstChild).toMatchSnapshot();
});
});

101
components/table/__tests__/__snapshots__/Table.test.tsx.snap

@ -632,6 +632,107 @@ exports[`Table should render title 1`] = `
</div>
`;
exports[`Table support wireframe 1`] = `
<div
class="ant-table-wrapper"
>
<div
class="ant-spin-nested-loading"
>
<div
class="ant-spin-container"
>
<div
class="ant-table ant-table-empty"
>
<div
class="ant-table-container"
>
<div
class="ant-table-content"
>
<table
style="table-layout: auto;"
>
<colgroup />
<thead
class="ant-table-thead"
>
<tr>
<th
class="ant-table-cell"
scope="col"
>
Name
</th>
</tr>
</thead>
<tbody
class="ant-table-tbody"
>
<tr
class="ant-table-placeholder"
>
<td
class="ant-table-cell"
>
<div
class="ant-empty ant-empty-normal"
>
<div
class="ant-empty-image"
>
<svg
height="41"
viewBox="0 0 64 41"
width="64"
xmlns="http://www.w3.org/2000/svg"
>
<g
fill="none"
fill-rule="evenodd"
transform="translate(0 1)"
>
<ellipse
cx="32"
cy="33"
fill="#f5f5f5"
rx="32"
ry="7"
/>
<g
fill-rule="nonzero"
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
fill="#fafafa"
/>
</g>
</g>
</svg>
</div>
<div
class="ant-empty-description"
>
No data
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
`;
exports[`Table title should support ReactNode 1`] = `
<th
class="ant-table-cell"

0
components/table/hooks/useTitleColumns.tsx → components/table/hooks/useTitleColumns.ts

0
components/table/index.tsx → components/table/index.ts

0
components/table/interface.tsx → components/table/interface.ts

0
components/table/style/bordered.tsx → components/table/style/bordered.ts

0
components/table/style/ellipsis.tsx → components/table/style/ellipsis.ts

0
components/table/style/empty.tsx → components/table/style/empty.ts

0
components/table/style/expand.tsx → components/table/style/expand.ts

0
components/table/style/filter.tsx → components/table/style/filter.ts

0
components/table/style/fixed.tsx → components/table/style/fixed.ts

0
components/table/style/index.tsx → components/table/style/index.ts

0
components/table/style/pagination.tsx → components/table/style/pagination.ts

0
components/table/style/radius.tsx → components/table/style/radius.ts

0
components/table/style/rtl.tsx → components/table/style/rtl.ts

0
components/table/style/selection.tsx → components/table/style/selection.ts

0
components/table/style/size.tsx → components/table/style/size.ts

0
components/table/style/sorter.tsx → components/table/style/sorter.ts

0
components/table/style/sticky.tsx → components/table/style/sticky.ts

0
components/table/style/summary.tsx → components/table/style/summary.ts

0
components/tabs/TabPane.tsx → components/tabs/TabPane.ts

0
components/tabs/style/index.tsx → components/tabs/style/index.ts

0
components/tabs/style/motion.tsx → components/tabs/style/motion.ts

0
components/tag/style/index.tsx → components/tag/style/index.ts

0
components/theme/internal.tsx → components/theme/internal.ts

0
components/time-picker/locale/ar_EG.tsx → components/time-picker/locale/ar_EG.ts

0
components/time-picker/locale/az_AZ.tsx → components/time-picker/locale/az_AZ.ts

0
components/time-picker/locale/bg_BG.tsx → components/time-picker/locale/bg_BG.ts

0
components/time-picker/locale/bn_BD.tsx → components/time-picker/locale/bn_BD.ts

0
components/time-picker/locale/by_BY.tsx → components/time-picker/locale/by_BY.ts

0
components/time-picker/locale/ca_ES.tsx → components/time-picker/locale/ca_ES.ts

0
components/time-picker/locale/cs_CZ.tsx → components/time-picker/locale/cs_CZ.ts

0
components/time-picker/locale/da_DK.tsx → components/time-picker/locale/da_DK.ts

0
components/time-picker/locale/de_DE.tsx → components/time-picker/locale/de_DE.ts

0
components/time-picker/locale/el_GR.tsx → components/time-picker/locale/el_GR.ts

0
components/time-picker/locale/en_GB.tsx → components/time-picker/locale/en_GB.ts

0
components/time-picker/locale/en_US.tsx → components/time-picker/locale/en_US.ts

0
components/time-picker/locale/es_ES.tsx → components/time-picker/locale/es_ES.ts

0
components/time-picker/locale/et_EE.tsx → components/time-picker/locale/et_EE.ts

0
components/time-picker/locale/eu_ES.tsx → components/time-picker/locale/eu_ES.ts

0
components/time-picker/locale/fa_IR.tsx → components/time-picker/locale/fa_IR.ts

0
components/time-picker/locale/fi_FI.tsx → components/time-picker/locale/fi_FI.ts

0
components/time-picker/locale/fr_BE.tsx → components/time-picker/locale/fr_BE.ts

0
components/time-picker/locale/fr_CA.tsx → components/time-picker/locale/fr_CA.ts

0
components/time-picker/locale/fr_FR.tsx → components/time-picker/locale/fr_FR.ts

0
components/time-picker/locale/ga_IE.tsx → components/time-picker/locale/ga_IE.ts

0
components/time-picker/locale/gl_ES.tsx → components/time-picker/locale/gl_ES.ts

0
components/time-picker/locale/he_IL.tsx → components/time-picker/locale/he_IL.ts

0
components/time-picker/locale/hi_IN.tsx → components/time-picker/locale/hi_IN.ts

0
components/time-picker/locale/hr_HR.tsx → components/time-picker/locale/hr_HR.ts

0
components/time-picker/locale/hu_HU.tsx → components/time-picker/locale/hu_HU.ts

0
components/time-picker/locale/id_ID.tsx → components/time-picker/locale/id_ID.ts

0
components/time-picker/locale/is_IS.tsx → components/time-picker/locale/is_IS.ts

0
components/time-picker/locale/it_IT.tsx → components/time-picker/locale/it_IT.ts

0
components/time-picker/locale/ja_JP.tsx → components/time-picker/locale/ja_JP.ts

0
components/time-picker/locale/ka_GE.tsx → components/time-picker/locale/ka_GE.ts

0
components/time-picker/locale/kk_KZ.tsx → components/time-picker/locale/kk_KZ.ts

0
components/time-picker/locale/km_KH.tsx → components/time-picker/locale/km_KH.ts

0
components/time-picker/locale/kmr_IQ.tsx → components/time-picker/locale/kmr_IQ.ts

0
components/time-picker/locale/kn_IN.tsx → components/time-picker/locale/kn_IN.ts

0
components/time-picker/locale/ko_KR.tsx → components/time-picker/locale/ko_KR.ts

0
components/time-picker/locale/lt_LT.tsx → components/time-picker/locale/lt_LT.ts

0
components/time-picker/locale/lv_LV.tsx → components/time-picker/locale/lv_LV.ts

0
components/time-picker/locale/mk_MK.tsx → components/time-picker/locale/mk_MK.ts

0
components/time-picker/locale/ml_IN.tsx → components/time-picker/locale/ml_IN.ts

0
components/time-picker/locale/mn_MN.tsx → components/time-picker/locale/mn_MN.ts

0
components/time-picker/locale/ms_MY.tsx → components/time-picker/locale/ms_MY.ts

0
components/time-picker/locale/nb_NO.tsx → components/time-picker/locale/nb_NO.ts

0
components/time-picker/locale/nl_BE.tsx → components/time-picker/locale/nl_BE.ts

0
components/time-picker/locale/nl_NL.tsx → components/time-picker/locale/nl_NL.ts

0
components/time-picker/locale/pl_PL.tsx → components/time-picker/locale/pl_PL.ts

0
components/time-picker/locale/pt_BR.tsx → components/time-picker/locale/pt_BR.ts

0
components/time-picker/locale/pt_PT.tsx → components/time-picker/locale/pt_PT.ts

0
components/time-picker/locale/ro_RO.tsx → components/time-picker/locale/ro_RO.ts

0
components/time-picker/locale/ru_RU.tsx → components/time-picker/locale/ru_RU.ts

0
components/time-picker/locale/si_LK.tsx → components/time-picker/locale/si_LK.ts

0
components/time-picker/locale/sk_SK.tsx → components/time-picker/locale/sk_SK.ts

0
components/time-picker/locale/sl_SI.tsx → components/time-picker/locale/sl_SI.ts

0
components/time-picker/locale/sr_RS.tsx → components/time-picker/locale/sr_RS.ts

0
components/time-picker/locale/sv_SE.tsx → components/time-picker/locale/sv_SE.ts

0
components/time-picker/locale/ta_IN.tsx → components/time-picker/locale/ta_IN.ts

0
components/time-picker/locale/th_TH.tsx → components/time-picker/locale/th_TH.ts

0
components/time-picker/locale/tk_TK.tsx → components/time-picker/locale/tk_TK.ts

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save