@ccs-ui/rc-pro 2.3.6-beta-40 → 2.4.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/docs-dist/154.1dfbf448.async.js +137 -0
  2. package/docs-dist/27.cf0e6aaf.async.js +11 -0
  3. package/docs-dist/272.98b3528d.async.js +15 -0
  4. package/docs-dist/272.e8c51481.chunk.css +5 -0
  5. package/docs-dist/313.ee13d2ba.async.js +5 -0
  6. package/docs-dist/387.c3734c23.async.js +573 -0
  7. package/docs-dist/404.html +15 -0
  8. package/docs-dist/859.2ac4ce6d.async.js +18 -0
  9. package/docs-dist/auth__demos.106c6ce7.async.js +1 -0
  10. package/docs-dist/button__demos.4c22be73.async.js +1 -0
  11. package/docs-dist/cascader__demos.46cb399e.async.js +1 -0
  12. package/docs-dist/date-picker__demos.cb7b5f00.async.js +1 -0
  13. package/docs-dist/dialog__demos.e4f54d6e.async.js +1 -0
  14. package/docs-dist/docs__guide.md.33be0665.chunk.css +1 -0
  15. package/docs-dist/docs__guide.md.fa186b09.async.js +1 -0
  16. package/docs-dist/docs__index.md.22217718.async.js +1 -0
  17. package/docs-dist/docs__index.md.33be0665.chunk.css +1 -0
  18. package/docs-dist/dumi__tmp-production__dumi__theme__ContextWrapper.a5f4a8dc.async.js +1 -0
  19. package/docs-dist/editor__demos.0b8f6819.async.js +6 -0
  20. package/docs-dist/favicon.png +0 -0
  21. package/docs-dist/group-form-item__demos.121f2381.async.js +1 -0
  22. package/docs-dist/guide/index.html +15 -0
  23. package/docs-dist/index.html +15 -0
  24. package/docs-dist/interval-button__demos.a9fa2598.async.js +1 -0
  25. package/docs-dist/loading__demos.0b2a0a1e.async.js +1 -0
  26. package/docs-dist/logo.svg +48 -0
  27. package/docs-dist/meta__docs.58d867fc.async.js +1 -0
  28. package/docs-dist/meta__packages.20ad7ce8.async.js +10079 -0
  29. package/docs-dist/meta__packages.9ed2b563.chunk.css +1 -0
  30. package/docs-dist/nm__dumi__dist__client__pages__404.28f3e467.async.js +1 -0
  31. package/docs-dist/nm__dumi__dist__client__pages__404.8b85f2d9.chunk.css +1 -0
  32. package/docs-dist/nm__dumi__dist__client__pages__Demo__index.1d26abae.async.js +1 -0
  33. package/docs-dist/nm__dumi__dist__client__pages__Demo__index.578aa5c0.chunk.css +1 -0
  34. package/docs-dist/nm__dumi__theme-default__layouts__DocLayout__index.626881d5.async.js +1 -0
  35. package/docs-dist/packages__rc-pro__src__auth__index.md.33be0665.chunk.css +1 -0
  36. package/docs-dist/packages__rc-pro__src__auth__index.md.80345bcc.async.js +1 -0
  37. package/docs-dist/packages__rc-pro__src__button__index.md.05cb5ebc.async.js +1 -0
  38. package/docs-dist/packages__rc-pro__src__button__index.md.33be0665.chunk.css +1 -0
  39. package/docs-dist/packages__rc-pro__src__cascader__index.md.33be0665.chunk.css +1 -0
  40. package/docs-dist/packages__rc-pro__src__cascader__index.md.d8535a05.async.js +1 -0
  41. package/docs-dist/packages__rc-pro__src__date-picker__index.md.33be0665.chunk.css +1 -0
  42. package/docs-dist/packages__rc-pro__src__date-picker__index.md.bab3c69e.async.js +1 -0
  43. package/docs-dist/packages__rc-pro__src__dialog__index.md.33be0665.chunk.css +1 -0
  44. package/docs-dist/packages__rc-pro__src__dialog__index.md.64ec2666.async.js +1 -0
  45. package/docs-dist/packages__rc-pro__src__editor__index.md.33be0665.chunk.css +1 -0
  46. package/docs-dist/packages__rc-pro__src__editor__index.md.a18cb4dc.async.js +1 -0
  47. package/docs-dist/packages__rc-pro__src__group-form-item__index.md.33be0665.chunk.css +1 -0
  48. package/docs-dist/packages__rc-pro__src__group-form-item__index.md.7d1da762.async.js +1 -0
  49. package/docs-dist/packages__rc-pro__src__index.md.33be0665.chunk.css +1 -0
  50. package/docs-dist/packages__rc-pro__src__index.md.d9449737.async.js +1 -0
  51. package/docs-dist/packages__rc-pro__src__interval-button__index.md.33be0665.chunk.css +1 -0
  52. package/docs-dist/packages__rc-pro__src__interval-button__index.md.c725522b.async.js +1 -0
  53. package/docs-dist/packages__rc-pro__src__layout-keep-alive__index.md.33be0665.chunk.css +1 -0
  54. package/docs-dist/packages__rc-pro__src__layout-keep-alive__index.md.d39a1325.async.js +1 -0
  55. package/docs-dist/packages__rc-pro__src__loading__index.md.33be0665.chunk.css +1 -0
  56. package/docs-dist/packages__rc-pro__src__loading__index.md.893eb1e0.async.js +1 -0
  57. package/docs-dist/packages__rc-pro__src__pro-table__index.md.33be0665.chunk.css +1 -0
  58. package/docs-dist/packages__rc-pro__src__pro-table__index.md.352db0a4.async.js +1 -0
  59. package/docs-dist/packages__rc-pro__src__pro-tabs__index.md.33be0665.chunk.css +1 -0
  60. package/docs-dist/packages__rc-pro__src__pro-tabs__index.md.f6578fee.async.js +1 -0
  61. package/docs-dist/packages__rc-pro__src__result__index.md.33be0665.chunk.css +1 -0
  62. package/docs-dist/packages__rc-pro__src__result__index.md.737b704c.async.js +2 -0
  63. package/docs-dist/packages__rc-pro__src__select__index.md.33be0665.chunk.css +1 -0
  64. package/docs-dist/packages__rc-pro__src__select__index.md.35981c54.async.js +2 -0
  65. package/docs-dist/packages__rc-pro__src__time-picker__index.md.33be0665.chunk.css +1 -0
  66. package/docs-dist/packages__rc-pro__src__time-picker__index.md.b525b352.async.js +1 -0
  67. package/docs-dist/packages__rc-pro__src__water-mark__index.md.33be0665.chunk.css +1 -0
  68. package/docs-dist/packages__rc-pro__src__water-mark__index.md.8e548df5.async.js +1 -0
  69. package/docs-dist/preload_helper.5f80f118.js +1 -0
  70. package/docs-dist/pro-table__demos.09e87ab4.async.js +1 -0
  71. package/docs-dist/pro-tabs__demos.eff953d6.async.js +1 -0
  72. package/docs-dist/rc-pros/auth/index.html +15 -0
  73. package/docs-dist/rc-pros/button/index.html +15 -0
  74. package/docs-dist/rc-pros/cascader/index.html +15 -0
  75. package/docs-dist/rc-pros/date-picker/index.html +15 -0
  76. package/docs-dist/rc-pros/dialog/index.html +15 -0
  77. package/docs-dist/rc-pros/editor/index.html +15 -0
  78. package/docs-dist/rc-pros/group-form-item/index.html +15 -0
  79. package/docs-dist/rc-pros/index.html +15 -0
  80. package/docs-dist/rc-pros/interval-button/index.html +15 -0
  81. package/docs-dist/rc-pros/layout-keep-alive/index.html +15 -0
  82. package/docs-dist/rc-pros/loading/index.html +15 -0
  83. package/docs-dist/rc-pros/pro-table/index.html +15 -0
  84. package/docs-dist/rc-pros/pro-tabs/index.html +15 -0
  85. package/docs-dist/rc-pros/result/index.html +15 -0
  86. package/docs-dist/rc-pros/select/index.html +15 -0
  87. package/docs-dist/rc-pros/time-picker/index.html +15 -0
  88. package/docs-dist/rc-pros/water-mark/index.html +15 -0
  89. package/docs-dist/result__demos.4832bcb4.async.js +1 -0
  90. package/docs-dist/select__demos.e57e694a.async.js +1 -0
  91. package/docs-dist/time-picker__demos.518f8acb.async.js +1 -0
  92. package/docs-dist/umi.4e0bcd92.css +1 -0
  93. package/docs-dist/umi.cc941610.js +108 -0
  94. package/docs-dist/water-mark__demos.4e7773cd.async.js +1 -0
  95. package/docs-dist/~demos/:id/index.html +15 -0
  96. package/docs-dist/~demos/auth-demo-basic/index.html +15 -0
  97. package/docs-dist/~demos/button-demo-button/index.html +15 -0
  98. package/docs-dist/~demos/button-demo-group/index.html +15 -0
  99. package/docs-dist/~demos/cascader-demo-basic/index.html +15 -0
  100. package/docs-dist/~demos/cascader-demo-cache/index.html +15 -0
  101. package/docs-dist/~demos/date-picker-demo-basic/index.html +15 -0
  102. package/docs-dist/~demos/date-picker-demo-range/index.html +15 -0
  103. package/docs-dist/~demos/dialog-demo-demos/index.html +15 -0
  104. package/docs-dist/~demos/editor-demo-demos/index.html +15 -0
  105. package/docs-dist/~demos/group-form-item-demo-basic/index.html +15 -0
  106. package/docs-dist/~demos/interval-button-demo-basic/index.html +15 -0
  107. package/docs-dist/~demos/loading-demo-basic/index.html +15 -0
  108. package/docs-dist/~demos/pro-table-demo-basic/index.html +15 -0
  109. package/docs-dist/~demos/pro-table-demo-fixed/index.html +15 -0
  110. package/docs-dist/~demos/pro-table-demo-selection/index.html +15 -0
  111. package/docs-dist/~demos/pro-tabs-demo-basic/index.html +15 -0
  112. package/docs-dist/~demos/pro-tabs-demo-tab/index.html +15 -0
  113. package/docs-dist/~demos/result-demo-basic/index.html +15 -0
  114. package/docs-dist/~demos/select-demo-api/index.html +15 -0
  115. package/docs-dist/~demos/select-demo-basic/index.html +15 -0
  116. package/docs-dist/~demos/select-demo-customize/index.html +15 -0
  117. package/docs-dist/~demos/select-demo-customize-label/index.html +15 -0
  118. package/docs-dist/~demos/time-picker-demo-basic/index.html +15 -0
  119. package/docs-dist/~demos/water-mark-demo-basic/index.html +15 -0
  120. package/es/Foo/d +0 -0
  121. package/es/aj-captcha/index.less +9 -23
  122. package/es/auth/index.d.ts +7 -0
  123. package/es/auth/index.js +14 -0
  124. package/es/cascader/index.js +4 -4
  125. package/es/ccs.d.ts +7 -13
  126. package/es/config.js +33 -11
  127. package/es/context/index.d.ts +2 -2
  128. package/es/date-picker/index.js +20 -0
  129. package/es/dialog/button.d.ts +1 -1
  130. package/es/dialog/button.js +4 -4
  131. package/es/dialog/index.d.ts +0 -1
  132. package/es/dialog/index.js +0 -1
  133. package/es/ellipsis/index.js +4 -2
  134. package/es/ellipsis/useResizeEffect.js +10 -24
  135. package/es/group-form-item/index.d.ts +11 -0
  136. package/es/group-form-item/index.js +124 -0
  137. package/es/hooks/use-page.d.ts +1 -1
  138. package/es/hooks/use-selection.d.ts +12 -23
  139. package/es/hooks/use-selection.js +51 -25
  140. package/es/index.d.ts +1 -3
  141. package/es/index.js +1 -3
  142. package/es/interval-button/index.js +4 -4
  143. package/es/layout-keep-alive/index.d.ts +1 -1
  144. package/es/layout-keep-alive/index.js +26 -20
  145. package/es/layout-keep-alive/index.less +19 -23
  146. package/es/layout-keep-alive/page.d.ts +3 -2
  147. package/es/layout-keep-alive/page.js +4 -3
  148. package/es/layout-single-page/index.d.ts +5 -3
  149. package/es/layout-single-page/index.js +12 -5
  150. package/es/layout-single-page/index.less +2 -8
  151. package/es/layout-single-page/page.d.ts +3 -1
  152. package/es/layout-single-page/page.js +2 -1
  153. package/es/pro-table/_utils.d.ts +1 -1
  154. package/es/pro-table/_utils.js +7 -7
  155. package/es/pro-table/form-item.d.ts +5 -3
  156. package/es/pro-table/form-item.js +28 -11
  157. package/es/pro-table/head.js +88 -63
  158. package/es/pro-table/index.less +20 -175
  159. package/es/pro-table/selection-alert.d.ts +4 -2
  160. package/es/pro-table/selection-alert.js +16 -4
  161. package/es/pro-table/table.d.ts +13 -24
  162. package/es/pro-table/table.js +128 -250
  163. package/es/pro-table/tree.d.ts +3 -3
  164. package/es/pro-table/tree.js +28 -17
  165. package/es/select/ modal.d.ts +3 -9
  166. package/es/select/ modal.js +63 -22
  167. package/es/select/customize.d.ts +7 -15
  168. package/es/select/customize.js +58 -48
  169. package/es/select/index.d.ts +2 -1
  170. package/es/select/index.js +9 -9
  171. package/es/table/index.js +12 -14
  172. package/es/table/index.less +0 -129
  173. package/package.json +13 -32
  174. package/LICENSE +0 -21
  175. package/README.md +0 -37
  176. package/es/breadcrumb.d.ts +0 -8
  177. package/es/breadcrumb.js +0 -40
  178. package/es/dialog/index.less +0 -16
  179. package/es/pro-grid/index.d.ts +0 -15
  180. package/es/pro-grid/index.js +0 -58
  181. package/es/trigger/index.d.ts +0 -43
  182. package/es/trigger/index.js +0 -298
  183. package/es/trigger/index.less +0 -42
  184. package/es/virtual-list/index.d.ts +0 -51
  185. package/es/virtual-list/index.js +0 -132
package/es/table/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  var _excluded = ["onResize", "width"],
2
- _excluded2 = ["data", "style", "scroll", "rowKey", "columns", "tableRef", "pagination", "rowSelection", "className", "tableContentRef"];
2
+ _excluded2 = ["data", "style", "scroll", "rowKey", "columns", "tableRef", "pagination", "rowSelection", "tableContentRef"];
3
3
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -10,8 +10,8 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
10
10
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
11
  import { useDebounceFn, useUpdate } from 'ahooks';
12
12
  import { Table, theme } from 'antd';
13
- import classNames from 'classnames';
14
- import { useEffect, useImperativeHandle } from 'react';
13
+ import { ConfigContext } from 'antd/es/config-provider';
14
+ import { useContext, useEffect, useImperativeHandle } from 'react';
15
15
  import { Resizable } from 'react-resizable';
16
16
  import CcsEllipsis2 from "../ellipsis";
17
17
  import useTabs from "../hooks/use-tabs";
@@ -50,8 +50,6 @@ var CustomTable = function CustomTable(props) {
50
50
  tableRef = props.tableRef,
51
51
  pagination = props.pagination,
52
52
  rowSelection = props.rowSelection,
53
- _props$className = props.className,
54
- className = _props$className === void 0 ? '' : _props$className,
55
53
  tableContentRef = props.tableContentRef,
56
54
  restProps = _objectWithoutProperties(props, _excluded2);
57
55
  var update = useUpdate();
@@ -65,6 +63,7 @@ var CustomTable = function CustomTable(props) {
65
63
  _ref$total = _ref.total,
66
64
  total = _ref$total === void 0 ? 0 : _ref$total;
67
65
  var inTabs = useTabs();
66
+ var config = useContext(ConfigContext);
68
67
 
69
68
  // table 固定表头,内容滚动
70
69
  var _useDebounceFn = useDebounceFn(function () {
@@ -83,15 +82,16 @@ var CustomTable = function CustomTable(props) {
83
82
 
84
83
  // 容器最大高度
85
84
  var maxHeight = (_tableContentRef$curr = tableContentRef.current) === null || _tableContentRef$curr === void 0 ? void 0 : _tableContentRef$curr.clientHeight;
85
+ var prefixCls = config.getPrefixCls();
86
86
 
87
87
  // 计算所有dom高度
88
- var tableEle = tableTarget.getElementsByClassName('ant-table')[0];
88
+ var tableEle = tableTarget.getElementsByClassName("".concat(prefixCls, "-table"))[0];
89
89
  var childHeights = [];
90
90
  var antTablebody = undefined;
91
91
  tableEle.childNodes.forEach(function (e) {
92
- if (e.classList.contains('ant-table-container')) {
92
+ if (e.classList.contains("".concat(prefixCls, "-table-container"))) {
93
93
  e.childNodes.forEach(function (node) {
94
- if (node.classList.contains('ant-table-body')) {
94
+ if (node.classList.contains("".concat(prefixCls, "-table-body"))) {
95
95
  antTablebody = node;
96
96
  } else {
97
97
  childHeights.push(node.clientHeight || 0);
@@ -103,7 +103,7 @@ var CustomTable = function CustomTable(props) {
103
103
  });
104
104
 
105
105
  // 分页高度
106
- var pagination = tableTarget.getElementsByClassName('ant-pagination');
106
+ var pagination = tableTarget.getElementsByClassName("".concat(prefixCls, "-pagination"));
107
107
  if (pagination && pagination.length > 0) {
108
108
  childHeights.push(pagination[0].clientHeight);
109
109
  }
@@ -124,9 +124,6 @@ var CustomTable = function CustomTable(props) {
124
124
  onFixedThead();
125
125
  }, [total]);
126
126
 
127
- // 监听窗口变化
128
- // useEventListener('resize', onFixedThead, { target: window });
129
-
130
127
  // 监听列筛选事件
131
128
  useImperativeHandle(tableRef, function () {
132
129
  return {
@@ -216,6 +213,7 @@ var CustomTable = function CustomTable(props) {
216
213
  children: /*#__PURE__*/_jsx(Table, _objectSpread(_objectSpread({
217
214
  rowKey: rowKey || tableRowKey,
218
215
  dataSource: dataSource,
216
+ sortDirections: ['ascend', 'descend'],
219
217
  pagination: pagination === false ? false : _objectSpread({
220
218
  total: total,
221
219
  pageSize: pageSize,
@@ -227,7 +225,8 @@ var CustomTable = function CustomTable(props) {
227
225
  },
228
226
  pageSizeOptions: ['10', '20', '30', '50', '100'],
229
227
  size: restProps.size === 'small' ? 'small' : 'default',
230
- simple: restProps.size === 'small'
228
+ simple: restProps.size === 'small',
229
+ className: 'ccs-table-pagination'
231
230
  }, pagination),
232
231
  rowSelection: rowSelection ? _objectSpread(_objectSpread({}, rowSelection), {}, {
233
232
  columnWidth: 60
@@ -240,7 +239,6 @@ var CustomTable = function CustomTable(props) {
240
239
  }
241
240
  }, restProps), {}, {
242
241
  size: restProps.size || 'middle',
243
- className: classNames(_defineProperty(_defineProperty(_defineProperty({}, 'ccs-table-nodata', !dataSource || dataSource.length === 0), 'ccs-table-wrapper', !rowSelection), "className", className)),
244
242
  scroll: scroll,
245
243
  summary: restProps !== null && restProps !== void 0 && restProps.summary ? function (e) {
246
244
  var _restProps$summary;
@@ -1,106 +1,5 @@
1
1
  .ccs-table {
2
2
  &-card {
3
- .ccs-table-wrapper {
4
- .ant-table-middle,
5
- .ant-table-small {
6
- .ant-table-tbody > tr > td:first-child {
7
- padding-left: 16px !important;
8
- }
9
-
10
- .ant-table-thead > tr > th:first-child {
11
- padding-left: 16px !important;
12
- }
13
- }
14
- }
15
-
16
- .ant-table-container {
17
- padding: 0 1px;
18
- }
19
-
20
- .ant-table-middle
21
- > .ant-table-content
22
- > .ant-table-body
23
- > table
24
- > .ant-table-tbody
25
- > tr
26
- > td,
27
- .ant-table-middle
28
- > .ant-table-content
29
- > .ant-table-body
30
- > table
31
- > .ant-table-thead
32
- > tr
33
- > th,
34
- .ant-table-middle
35
- > .ant-table-content
36
- > .ant-table-scroll
37
- > .ant-table-body
38
- > table
39
- > .ant-table-tbody
40
- > tr
41
- > td,
42
- .ant-table-middle
43
- > .ant-table-content
44
- > .ant-table-scroll
45
- > .ant-table-body
46
- > table
47
- > .ant-table-thead
48
- > tr
49
- > th,
50
- .ant-table-content
51
- > .ant-table-fixed-right
52
- > .ant-table-body-outer
53
- > .ant-table-body-inner
54
- > table
55
- > .ant-table-tbody
56
- > tr
57
- > td,
58
- .ant-table-middle
59
- > .ant-table-content
60
- > .ant-table-scroll
61
- > .ant-table-header
62
- > table
63
- > .ant-table-thead
64
- > tr
65
- > th,
66
- .ant-table-middle
67
- > .ant-table-content
68
- > .ant-table-fixed-right
69
- > .ant-table-header
70
- > table
71
- > .ant-table-thead
72
- > tr
73
- > th,
74
- .ant-table-middle
75
- > .ant-table-content
76
- > .ant-table-fixed-right
77
- > .ant-table-body-outer
78
- > .ant-table-body-inner
79
- > table
80
- > .ant-table-thead
81
- > tr
82
- > th {
83
- padding: 8px;
84
- }
85
-
86
- .ant-pagination {
87
- margin: 0;
88
- padding: 16px;
89
- text-align: right;
90
- }
91
-
92
- .ant-table-cell {
93
- .ant-btn-link {
94
- height: auto;
95
- padding: 0;
96
- line-height: initial;
97
- }
98
- }
99
-
100
- .ant-table-sticky-holder {
101
- z-index: 100;
102
- }
103
-
104
3
  .react-resizable {
105
4
  position: relative;
106
5
  background-clip: padding-box;
@@ -116,39 +15,11 @@
116
15
  cursor: col-resize;
117
16
  }
118
17
  }
119
-
120
- &-nodata {
121
- color: red;
122
-
123
- .ant-table-content {
124
- overflow: hidden !important;
125
- }
126
-
127
- .ant-table-body {
128
- overflow: hidden !important;
129
- }
130
- }
131
18
  }
132
19
 
133
20
  .ccs-tabs-auto-height {
134
21
  flex: 1 1 auto;
135
22
  overflow: hidden;
136
-
137
- > .ant-tabs-content-holder {
138
- height: 100%;
139
-
140
- > .ant-tabs-content {
141
- height: 100%;
142
-
143
- > div {
144
- height: 100%;
145
-
146
- > .ccs-pl {
147
- height: 100%;
148
- }
149
- }
150
- }
151
- }
152
23
  }
153
24
 
154
25
  .ccs-table-ellipsis {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccs-ui/rc-pro",
3
- "version": "2.3.6-beta-40",
3
+ "version": "2.4.0-beta.1",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -12,10 +12,11 @@
12
12
  "module": "es/index.js",
13
13
  "types": "es/index.d.ts",
14
14
  "files": [
15
- "es"
15
+ "es",
16
+ "docs-dist"
16
17
  ],
17
18
  "scripts": {
18
- "build": "father build",
19
+ "build": "cd ../.. && dumi build && cd packages/rc-pro && father build",
19
20
  "build:watch": "father dev",
20
21
  "dev": "dumi dev",
21
22
  "docs:build": "dumi build",
@@ -25,8 +26,8 @@
25
26
  "lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
26
27
  "prepare": "husky install && dumi setup",
27
28
  "prepublishOnly": "father doctor && npm run build",
28
- "publish:beta": "father build && npm publish --tag=beta && cnpm sync @ccs-ui/rc-pro",
29
- "publish:prod": "father build && npm publish && cnpm sync @ccs-ui/rc-pro",
29
+ "publish:beta": "npm run build && npm publish --tag=beta && cnpm sync @ccs-ui/rc-pro",
30
+ "publish:prod": "npm run build && npm publish && cnpm sync @ccs-ui/rc-pro",
30
31
  "start": "npm run dev",
31
32
  "sync": "cnpm sync @ccs-ui/rc-pro"
32
33
  },
@@ -62,6 +63,7 @@
62
63
  "@uiw/react-codemirror": "^4.23.0",
63
64
  "antd-img-crop": "^4.12.2",
64
65
  "immutability-helper": "^3.1.1",
66
+ "insert-css": "^2.0.0",
65
67
  "lodash.clonedeep": "^4.5.0",
66
68
  "lodash.debounce": "^4.0.8",
67
69
  "lodash.isarray": "^4.0.0",
@@ -71,6 +73,8 @@
71
73
  "react-draggable": "^4.4.5",
72
74
  "react-error-overlay": "^6.0.11",
73
75
  "react-resizable": "^3.0.5",
76
+ "react-router": "^6.11.2",
77
+ "react-router-dom": "^6.11.2",
74
78
  "runes2": "^1.1.4",
75
79
  "tiny-pinyin": "^1.3.2"
76
80
  },
@@ -78,48 +82,27 @@
78
82
  "@ant-design/compatible": "^5.1.2",
79
83
  "@ant-design/icons": "^5.1.4",
80
84
  "@ccs-ui/utils": "^0.1.3",
81
- "@commitlint/cli": "^17.1.2",
82
- "@commitlint/config-conventional": "^17.1.0",
85
+ "@types/insert-css": "^2.0.3",
83
86
  "@types/lodash.clonedeep": "^4.5.9",
84
87
  "@types/lodash.debounce": "^4.0.9",
85
88
  "@types/lodash.isarray": "^4.0.9",
86
89
  "@types/lodash.isnil": "^4.0.9",
87
90
  "@types/lodash.uniqueid": "^4.0.9",
88
- "@types/react": "^18.0.0",
89
91
  "@types/react-custom-scrollbars": "^4.0.10",
90
- "@types/react-dom": "^18.0.0",
91
92
  "@types/react-lines-ellipsis": "^0.15.6",
92
93
  "@types/react-resizable": "^3.0.7",
93
- "@umijs/lint": "^4.0.0",
94
- "ahooks": "^3.7.7",
95
- "antd": "^5.24.6",
96
- "classnames": "^2.3.2",
97
- "cross-env": "^7.0.3",
98
94
  "dayjs": "^1.11.7",
99
- "dumi": "^2.2.0",
100
- "eslint": "^8.23.0",
101
- "father": "^4.1.0",
102
- "husky": "^8.0.1",
103
- "lint-staged": "^13.0.3",
104
- "prettier": "^2.7.1",
105
- "prettier-plugin-organize-imports": "^3.0.0",
106
- "prettier-plugin-packagejson": "^2.2.18",
107
95
  "rc-menu": "^9.15.1",
108
96
  "rc-table": "^7.47.5",
109
97
  "rc-trigger": "^5.3.4",
110
- "rc-util": "^5.32.4",
111
- "react": "^18.0.0",
112
- "react-dom": "^18.0.0",
113
- "react-router": "^6.11.2",
114
- "react-router-dom": "^6.11.2",
115
- "stylelint": "^14.9.1"
98
+ "rc-util": "^5.32.4"
116
99
  },
117
100
  "peerDependencies": {
118
101
  "@ant-design/compatible": "^5.1.2",
119
102
  "@ant-design/icons": "^5.1.4",
120
103
  "@ccs-ui/utils": "^0.1.3",
121
104
  "ahooks": "^3.7.7",
122
- "antd": "^5.22.7",
105
+ "antd": "^5.24.6",
123
106
  "classnames": "^2.3.2",
124
107
  "dayjs": "^1.11.7",
125
108
  "rc-menu": "^9.15.1",
@@ -127,9 +110,7 @@
127
110
  "rc-trigger": "^5.3.4",
128
111
  "rc-util": "^5.32.4",
129
112
  "react": ">=16.9.0",
130
- "react-dom": ">=16.9.0",
131
- "react-router": "^6.11.2",
132
- "react-router-dom": "^6.11.2"
113
+ "react-dom": ">=16.9.0"
133
114
  },
134
115
  "publishConfig": {
135
116
  "access": "public"
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) Dx
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/README.md DELETED
@@ -1,37 +0,0 @@
1
- # @ccs-ui/rc-pro
2
-
3
- A react library developed with dumi
4
-
5
- ## Usage
6
-
7
- TODO
8
-
9
- ## Options
10
-
11
- TODO
12
-
13
- ## Development
14
-
15
- ```bash
16
- # install dependencies
17
- $ yarn install
18
-
19
- # develop library by docs demo
20
- $ yarn start
21
-
22
- # build library source code
23
- $ yarn run build
24
-
25
- # build library source code in watch mode
26
- $ yarn run build:watch
27
-
28
- # build docs
29
- $ yarn run docs:build
30
-
31
- # check your project for potential problems
32
- $ yarn run doctor
33
- ```
34
-
35
- ## LICENSE
36
-
37
- MIT
@@ -1,8 +0,0 @@
1
- import { BreadcrumbProps } from 'antd/lib';
2
- import { CSSProperties } from 'react';
3
- export default function CcsBreadcrumb({ items, style, className, history, }: {
4
- style?: CSSProperties;
5
- className?: string;
6
- history: any;
7
- items: BreadcrumbProps['items'];
8
- }): import("react/jsx-runtime").JSX.Element;
package/es/breadcrumb.js DELETED
@@ -1,40 +0,0 @@
1
- import { Space } from 'antd';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { Fragment as _Fragment } from "react/jsx-runtime";
4
- import { jsxs as _jsxs } from "react/jsx-runtime";
5
- export default function CcsBreadcrumb(_ref) {
6
- var _ref$items = _ref.items,
7
- items = _ref$items === void 0 ? [] : _ref$items,
8
- style = _ref.style,
9
- className = _ref.className,
10
- history = _ref.history;
11
- var _onClick = function onClick(href) {
12
- if (!href || !history) return;
13
- history.push(href);
14
- };
15
- return /*#__PURE__*/_jsx(Space, {
16
- className: className,
17
- style: style,
18
- children: items.map(function (item, index) {
19
- var isLast = index === items.length - 1;
20
- var grayColor = 'rgba(0, 0, 0, 0.45)';
21
- return /*#__PURE__*/_jsxs(_Fragment, {
22
- children: [/*#__PURE__*/_jsx("div", {
23
- style: {
24
- color: !isLast ? grayColor : undefined,
25
- cursor: !!item.href ? 'pointer' : 'unset'
26
- },
27
- onClick: function onClick() {
28
- return _onClick(item.href);
29
- },
30
- children: item.title
31
- }, index), !isLast && /*#__PURE__*/_jsx("div", {
32
- style: {
33
- color: grayColor
34
- },
35
- children: "/"
36
- })]
37
- });
38
- })
39
- });
40
- }
@@ -1,16 +0,0 @@
1
- .ant-drawer-extra {
2
- .ant-btn + .ant-btn:not(.ant-dropdown-trigger) {
3
- margin-bottom: 0;
4
- margin-inline-start: 8px;
5
- }
6
- }
7
-
8
- .ant-drawer-footer {
9
- overflow: hidden;
10
- }
11
-
12
- .ccs-dialog-drawer {
13
- .ant-drawer-footer {
14
- padding: 0;
15
- }
16
- }
@@ -1,15 +0,0 @@
1
- import { CardProps } from 'antd';
2
- import { FC } from 'react';
3
- import { PropsWithCss, PropsWithNodeChildren } from '../ccs';
4
- type CcsProGridProps = PropsWithCss & PropsWithNodeChildren & {
5
- gutter?: number;
6
- };
7
- type ColProps = CardProps & PropsWithNodeChildren & {
8
- colWidth?: number;
9
- };
10
- type GridInstance = FC<CcsProGridProps> & {
11
- Col: typeof GridCol;
12
- };
13
- declare const GridCol: ({ children, colWidth, style, className, ...restProps }: ColProps) => import("react/jsx-runtime").JSX.Element;
14
- declare const ProGrid: GridInstance;
15
- export default ProGrid;
@@ -1,58 +0,0 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["children", "colWidth", "style", "className"],
3
- _excluded2 = ["children", "gutter"];
4
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
8
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
- import React from 'react';
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- import { Fragment as _Fragment } from "react/jsx-runtime";
14
- var GridCol = function GridCol(_ref) {
15
- var children = _ref.children,
16
- colWidth = _ref.colWidth,
17
- style = _ref.style,
18
- className = _ref.className,
19
- restProps = _objectWithoutProperties(_ref, _excluded);
20
- var styles = _objectSpread({}, style);
21
- if (colWidth) {
22
- styles.width = colWidth;
23
- styles.flex = "0 0 ".concat(colWidth, "px");
24
- } else {
25
- styles.flex = "1 1 auto";
26
- }
27
- var _ref2 = restProps,
28
- gutter = _ref2.gutter;
29
- if (gutter) {
30
- styles.marginLeft = gutter;
31
- }
32
- return /*#__PURE__*/_jsx("div", {
33
- style: styles,
34
- className: className,
35
- children: children
36
- });
37
- };
38
- var Grid = function Grid(_ref3) {
39
- var children = _ref3.children,
40
- gutter = _ref3.gutter,
41
- restProps = _objectWithoutProperties(_ref3, _excluded2);
42
- return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
43
- style: {
44
- display: 'flex'
45
- }
46
- }, restProps), {}, {
47
- children: gutter ? React.Children.map(children, function (child, index) {
48
- return /*#__PURE__*/_jsx(_Fragment, {
49
- children: /*#__PURE__*/React.isValidElement(child) && /*#__PURE__*/React.cloneElement(child, {
50
- gutter: index !== 0 ? gutter : 0
51
- })
52
- });
53
- }) : children
54
- }));
55
- };
56
- var ProGrid = Grid;
57
- ProGrid.Col = GridCol;
58
- export default ProGrid;
@@ -1,43 +0,0 @@
1
- import { SizeType } from 'antd/es/config-provider/SizeContext';
2
- import { PropsWithCss, PropsWithElementChildren } from '../ccs';
3
- import './index.less';
4
- export type CcsTriggerProps = PropsWithCss & PropsWithElementChildren & {
5
- /** 下拉框宽度 */
6
- width?: number;
7
- /** 下拉框高度 */
8
- height?: number;
9
- /**
10
- * @description input size:'small' | 'middle' | 'large'
11
- * @default 'middle'
12
- */
13
- size?: SizeType;
14
- /**
15
- * @description 禁用选择
16
- * @default false
17
- */
18
- disabled?: boolean;
19
- /** Form.Item value */
20
- value?: any;
21
- /** input placeholder */
22
- placeholder?: string;
23
- /**
24
- * 是否在首次显示前渲染弹出内容
25
- * @default false
26
- */
27
- forceRender?: boolean;
28
- /**
29
- * @description popup挂载的html节点,默认:document.body、true:当前dom
30
- * @default document.body
31
- */
32
- popupContainer?: boolean;
33
- /** Form.Item onChange */
34
- onChange?: (value?: any) => void;
35
- };
36
- /**
37
- * 适用于Form.Item中的 trigger组件,其内容自行定义,遵循ant form 自定义组件规范
38
- * @deprecated
39
- * @param CcsTriggerPropsType
40
- * @returns
41
- */
42
- declare const TriggerComponent: (props: CcsTriggerProps) => import("react/jsx-runtime").JSX.Element;
43
- export default TriggerComponent;