@cozeloop/components 0.0.2 → 0.0.3-beta-1769665914778

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 (235) hide show
  1. package/README.md +82 -1
  2. package/dist/es/index.css +645 -0
  3. package/dist/es/index.mjs +6089 -0
  4. package/dist/es/loopIcons.mjs +3 -0
  5. package/dist/es/rslib-runtime.mjs +40 -0
  6. package/dist/es/static/svg/select.svg +1 -0
  7. package/dist/lib/base-search-select/base-search-form-select.d.ts +3 -0
  8. package/dist/lib/base-search-select/base-search-select.d.ts +12 -0
  9. package/dist/lib/base-search-select/index.d.ts +3 -0
  10. package/dist/lib/base-search-select/types.d.ts +13 -0
  11. package/dist/lib/base-search-select/utils.d.ts +8 -0
  12. package/dist/lib/basic-card/index.d.ts +7 -0
  13. package/dist/lib/card-pane/index.d.ts +5 -0
  14. package/dist/lib/chip-select/index.d.ts +2 -0
  15. package/dist/lib/code-editor/index.d.ts +3 -0
  16. package/dist/lib/code-editor-with-loading/index.d.ts +10 -0
  17. package/dist/lib/codemirror-editor/code-editor.d.ts +23 -0
  18. package/dist/lib/codemirror-editor/index.d.ts +6 -0
  19. package/dist/lib/codemirror-editor/json-editor.d.ts +19 -0
  20. package/dist/lib/codemirror-editor/raw-code-editor.d.ts +20 -0
  21. package/dist/lib/codemirror-editor/raw-text-editor.d.ts +11 -0
  22. package/dist/lib/codemirror-editor/text-editor.d.ts +23 -0
  23. package/dist/lib/codemirror-editor/themes/coze-dark.d.ts +1 -0
  24. package/dist/lib/codemirror-editor/themes/coze-light.d.ts +1 -0
  25. package/dist/lib/collapse-card/index.d.ts +14 -0
  26. package/dist/lib/collapse-item/index.d.ts +7 -0
  27. package/dist/lib/collapsible-card/index.d.ts +13 -0
  28. package/dist/{types → lib}/column-manage-storage/index.d.ts +6 -6
  29. package/dist/lib/columns-select/index.d.ts +19 -0
  30. package/dist/lib/copyable/index.d.ts +5 -0
  31. package/dist/lib/edit-icon-button/index.d.ts +8 -0
  32. package/dist/lib/footer-actions/index.d.ts +15 -0
  33. package/dist/{types → lib}/hooks/use-infinite-scroll.d.ts +12 -12
  34. package/dist/lib/hooks/use-mouse-down-offset.d.ts +9 -0
  35. package/dist/lib/hooks/use-unsave-leave-warning.d.ts +15 -0
  36. package/dist/lib/id-render/icon-button-container.d.ts +8 -0
  37. package/dist/lib/id-render/index.d.ts +7 -0
  38. package/dist/lib/index-controller/record-navigation.d.ts +6 -0
  39. package/dist/lib/index-controller/use-item-index-controller.d.ts +47 -0
  40. package/dist/lib/index.d.ts +71 -0
  41. package/dist/{types → lib}/infinite-scroll-table/index.d.ts +6 -6
  42. package/dist/lib/info-tooltip/index.d.ts +9 -0
  43. package/dist/lib/input-components/radio-button.d.ts +14 -0
  44. package/dist/lib/input-slider/index.d.ts +15 -0
  45. package/dist/lib/input-with-count/index.d.ts +2 -0
  46. package/dist/lib/jump-button/jump-icon-button.d.ts +4 -0
  47. package/dist/{types → lib}/large-txt-render/index.d.ts +2 -2
  48. package/dist/lib/layout/content.d.ts +7 -0
  49. package/dist/lib/layout/header.d.ts +7 -0
  50. package/dist/lib/layout/index.d.ts +12 -0
  51. package/dist/lib/layout/tabs.d.ts +6 -0
  52. package/dist/lib/lazy-load-component/index.d.ts +5 -0
  53. package/dist/lib/logic-editor/index.d.ts +3 -0
  54. package/dist/lib/logic-editor/logic-editor.d.ts +15 -0
  55. package/dist/lib/logic-editor/logic-left-render.d.ts +3 -0
  56. package/dist/lib/logic-editor/logic-operator-render.d.ts +3 -0
  57. package/dist/lib/logic-editor/logic-right-render.d.ts +3 -0
  58. package/dist/lib/logic-editor/logic-types.d.ts +53 -0
  59. package/dist/lib/logic-editor/utils.d.ts +2 -0
  60. package/dist/lib/logic-expr/consts.d.ts +2 -0
  61. package/dist/lib/logic-expr/expr-group-render.d.ts +2 -0
  62. package/dist/lib/logic-expr/expr-render.d.ts +2 -0
  63. package/dist/lib/logic-expr/index.d.ts +2 -0
  64. package/dist/lib/logic-expr/logic-expr.d.ts +2 -0
  65. package/dist/lib/logic-expr/logic-not.d.ts +10 -0
  66. package/dist/lib/logic-expr/logic-toggle.d.ts +12 -0
  67. package/dist/lib/logic-expr/types.d.ts +79 -0
  68. package/dist/lib/loop-icons/index.d.ts +1 -0
  69. package/dist/lib/loop-radio-group/index.d.ts +2 -0
  70. package/dist/lib/multi-part-editor/components/image-item-renderer.d.ts +14 -0
  71. package/dist/lib/multi-part-editor/components/multipart-item-renderer.d.ts +10 -0
  72. package/dist/lib/multi-part-editor/components/url-input-modal.d.ts +14 -0
  73. package/dist/lib/multi-part-editor/components/video-item-renderer.d.ts +14 -0
  74. package/dist/lib/multi-part-editor/index.d.ts +3 -0
  75. package/dist/lib/multi-part-editor/multi-part-render.d.ts +10 -0
  76. package/dist/lib/multi-part-editor/type.d.ts +81 -0
  77. package/dist/lib/multi-part-editor/upload-button.d.ts +23 -0
  78. package/dist/lib/multi-part-editor/utils.d.ts +16 -0
  79. package/dist/lib/open-detail-button/index.d.ts +6 -0
  80. package/dist/lib/page-content/index.d.ts +20 -0
  81. package/dist/lib/primary-page/index.d.ts +1 -0
  82. package/dist/lib/primary-page/primary-header.d.ts +14 -0
  83. package/dist/lib/primary-title/index.d.ts +6 -0
  84. package/dist/lib/resizable-side-sheet/index.d.ts +10 -0
  85. package/dist/{types → lib}/resize-sidesheet/index.d.ts +4 -3
  86. package/dist/lib/resize-sidesheet/use-drag.d.ts +11 -0
  87. package/dist/lib/schema-editor/index.d.ts +11 -0
  88. package/dist/lib/semi-schema-form/components/tmpls/array-field-item.d.ts +6 -0
  89. package/dist/lib/semi-schema-form/components/tmpls/array-field.d.ts +6 -0
  90. package/dist/lib/semi-schema-form/components/tmpls/base-input.d.ts +8 -0
  91. package/dist/lib/semi-schema-form/components/tmpls/description-field.d.ts +6 -0
  92. package/dist/lib/semi-schema-form/components/tmpls/error-list.d.ts +6 -0
  93. package/dist/lib/semi-schema-form/components/tmpls/field-error.d.ts +6 -0
  94. package/dist/lib/semi-schema-form/components/tmpls/field.d.ts +7 -0
  95. package/dist/lib/semi-schema-form/components/tmpls/icon-button.d.ts +11 -0
  96. package/dist/lib/semi-schema-form/components/tmpls/index.d.ts +2 -0
  97. package/dist/lib/semi-schema-form/components/tmpls/object-field.d.ts +8 -0
  98. package/dist/lib/semi-schema-form/components/tmpls/submit.d.ts +4 -0
  99. package/dist/lib/semi-schema-form/components/tmpls/title-field.d.ts +6 -0
  100. package/dist/lib/semi-schema-form/components/widgets/checkbox.d.ts +7 -0
  101. package/dist/lib/semi-schema-form/components/widgets/checkboxs.d.ts +7 -0
  102. package/dist/lib/semi-schema-form/components/widgets/index.d.ts +2 -0
  103. package/dist/lib/semi-schema-form/components/widgets/radio.d.ts +7 -0
  104. package/dist/lib/semi-schema-form/components/widgets/range.d.ts +7 -0
  105. package/dist/lib/semi-schema-form/components/widgets/select.d.ts +7 -0
  106. package/dist/lib/semi-schema-form/components/widgets/textarea.d.ts +6 -0
  107. package/dist/lib/semi-schema-form/index.d.ts +4 -0
  108. package/dist/lib/sentinel-form/enum.d.ts +8 -0
  109. package/dist/lib/sentinel-form/index.d.ts +20 -0
  110. package/dist/lib/step-nav/index.d.ts +12 -0
  111. package/dist/{types → lib}/table/index.d.ts +1 -1
  112. package/dist/lib/table/sort-icon.d.ts +8 -0
  113. package/dist/lib/table/table-with-pagination.d.ts +21 -0
  114. package/dist/lib/table/table-without-pagniation.d.ts +6 -0
  115. package/dist/lib/table-batch-operate/table-batch-operation.d.ts +9 -0
  116. package/dist/lib/table-batch-operate/use-batch-operate.d.ts +30 -0
  117. package/dist/lib/table-col-actions/index.d.ts +24 -0
  118. package/dist/lib/table-cols-config/index.d.ts +11 -0
  119. package/dist/lib/table-cols-config/type.d.ts +6 -0
  120. package/dist/lib/table-cols-config/use-hidden-col-keys.d.ts +5 -0
  121. package/dist/lib/table-cols-config/util.d.ts +3 -0
  122. package/dist/lib/table-empty/index.d.ts +2 -0
  123. package/dist/lib/table-header/index.d.ts +14 -0
  124. package/dist/{types → lib}/tabs/index.d.ts +1 -1
  125. package/dist/lib/text-area-pro/index.d.ts +6 -0
  126. package/dist/lib/text-with-copy/index.d.ts +14 -0
  127. package/dist/lib/title-with-sub/index.d.ts +7 -0
  128. package/dist/lib/tooltip-when-disabled/index.d.ts +6 -0
  129. package/dist/lib/tooltip-with-disabled/index.d.ts +5 -0
  130. package/dist/lib/upload/index.d.ts +9 -0
  131. package/dist/lib/user-profile/index.d.ts +9 -0
  132. package/dist/lib/utils/basic.d.ts +2 -0
  133. package/dist/lib/version-list/version-descriptions.d.ts +15 -0
  134. package/dist/lib/version-list/version-item.d.ts +9 -0
  135. package/dist/lib/version-list/version-list.d.ts +11 -0
  136. package/dist/lib/version-list/version-switch-panel.d.ts +5 -0
  137. package/package.json +47 -35
  138. package/dist/es/collapsible-card/index.js +0 -45
  139. package/dist/es/collapsible-card/index.module.js +0 -5
  140. package/dist/es/collapsible-card/index_module.css +0 -48
  141. package/dist/es/column-manage-storage/index.js +0 -73
  142. package/dist/es/columns-select/index.js +0 -219
  143. package/dist/es/hooks/use-infinite-scroll.js +0 -178
  144. package/dist/es/hooks/use-mouse-down-offset.js +0 -41
  145. package/dist/es/id-render/icon-button-container.js +0 -61
  146. package/dist/es/id-render/index.js +0 -78
  147. package/dist/es/index.js +0 -66
  148. package/dist/es/infinite-scroll-table/index.js +0 -98
  149. package/dist/es/input-slider/index.js +0 -123
  150. package/dist/es/input-slider/index.module.js +0 -5
  151. package/dist/es/input-slider/index_module.css +0 -21
  152. package/dist/es/large-txt-render/index.js +0 -38
  153. package/dist/es/page-content/index.js +0 -108
  154. package/dist/es/primary-page/index.js +0 -4
  155. package/dist/es/primary-page/primary-header.js +0 -38
  156. package/dist/es/resize-sidesheet/index.js +0 -100
  157. package/dist/es/resize-sidesheet/index.module.js +0 -5
  158. package/dist/es/resize-sidesheet/index_module.css +0 -9
  159. package/dist/es/resize-sidesheet/use-drag.js +0 -31
  160. package/dist/es/table/index.js +0 -56
  161. package/dist/es/table/index.module.js +0 -5
  162. package/dist/es/table/index_module.css +0 -90
  163. package/dist/es/table/sort-icon.js +0 -105
  164. package/dist/es/table/table-with-pagination.js +0 -112
  165. package/dist/es/table/table-without-pagniation.js +0 -74
  166. package/dist/es/table-col-actions/index.js +0 -103
  167. package/dist/es/table-header/index.js +0 -68
  168. package/dist/es/table-header/index.module.js +0 -5
  169. package/dist/es/table-header/index_module.css +0 -3
  170. package/dist/es/tabs/index.js +0 -42
  171. package/dist/es/tabs/index.module.js +0 -5
  172. package/dist/es/tabs/index_module.css +0 -37
  173. package/dist/es/text-with-copy/index.js +0 -71
  174. package/dist/es/tooltip-with-disabled/index.js +0 -49
  175. package/dist/es/utils/basic.js +0 -44
  176. package/dist/es/utils/rect.js +0 -37
  177. package/dist/lib/collapsible-card/index.js +0 -79
  178. package/dist/lib/collapsible-card/index.module.js +0 -25
  179. package/dist/lib/collapsible-card/index_module.css +0 -48
  180. package/dist/lib/column-manage-storage/index.js +0 -98
  181. package/dist/lib/columns-select/index.js +0 -241
  182. package/dist/lib/hooks/use-infinite-scroll.js +0 -195
  183. package/dist/lib/hooks/use-mouse-down-offset.js +0 -65
  184. package/dist/lib/id-render/icon-button-container.js +0 -89
  185. package/dist/lib/id-render/index.js +0 -112
  186. package/dist/lib/index.js +0 -110
  187. package/dist/lib/infinite-scroll-table/index.js +0 -126
  188. package/dist/lib/input-slider/index.js +0 -154
  189. package/dist/lib/input-slider/index.module.js +0 -25
  190. package/dist/lib/input-slider/index_module.css +0 -21
  191. package/dist/lib/large-txt-render/index.js +0 -62
  192. package/dist/lib/page-content/index.js +0 -136
  193. package/dist/lib/primary-page/index.js +0 -28
  194. package/dist/lib/primary-page/primary-header.js +0 -72
  195. package/dist/lib/resize-sidesheet/index.js +0 -129
  196. package/dist/lib/resize-sidesheet/index.module.js +0 -25
  197. package/dist/lib/resize-sidesheet/index_module.css +0 -9
  198. package/dist/lib/resize-sidesheet/use-drag.js +0 -55
  199. package/dist/lib/table/index.js +0 -88
  200. package/dist/lib/table/index.module.js +0 -25
  201. package/dist/lib/table/index_module.css +0 -90
  202. package/dist/lib/table/sort-icon.js +0 -137
  203. package/dist/lib/table/table-with-pagination.js +0 -146
  204. package/dist/lib/table/table-without-pagniation.js +0 -108
  205. package/dist/lib/table-col-actions/index.js +0 -123
  206. package/dist/lib/table-header/index.js +0 -96
  207. package/dist/lib/table-header/index.module.js +0 -25
  208. package/dist/lib/table-header/index_module.css +0 -3
  209. package/dist/lib/tabs/index.js +0 -74
  210. package/dist/lib/tabs/index.module.js +0 -25
  211. package/dist/lib/tabs/index_module.css +0 -37
  212. package/dist/lib/text-with-copy/index.js +0 -105
  213. package/dist/lib/tooltip-with-disabled/index.js +0 -71
  214. package/dist/lib/utils/basic.js +0 -78
  215. package/dist/lib/utils/rect.js +0 -65
  216. package/dist/types/collapsible-card/index.d.ts +0 -22
  217. package/dist/types/columns-select/index.d.ts +0 -29
  218. package/dist/types/hooks/use-mouse-down-offset.d.ts +0 -9
  219. package/dist/types/id-render/icon-button-container.d.ts +0 -12
  220. package/dist/types/id-render/index.d.ts +0 -13
  221. package/dist/types/index.d.ts +0 -19
  222. package/dist/types/input-slider/index.d.ts +0 -14
  223. package/dist/types/page-content/index.d.ts +0 -36
  224. package/dist/types/primary-page/index.d.ts +0 -1
  225. package/dist/types/primary-page/primary-header.d.ts +0 -17
  226. package/dist/types/resize-sidesheet/use-drag.d.ts +0 -10
  227. package/dist/types/table/sort-icon.d.ts +0 -13
  228. package/dist/types/table/table-with-pagination.d.ts +0 -14
  229. package/dist/types/table/table-without-pagniation.d.ts +0 -8
  230. package/dist/types/table-col-actions/index.d.ts +0 -21
  231. package/dist/types/table-header/index.d.ts +0 -20
  232. package/dist/types/text-with-copy/index.d.ts +0 -24
  233. package/dist/types/tooltip-with-disabled/index.d.ts +0 -9
  234. package/dist/types/utils/basic.d.ts +0 -1
  235. package/dist/types/utils/rect.d.ts +0 -10
@@ -1,9 +0,0 @@
1
- .sheet_935c5 .semi-sidesheet-header {
2
- display: flex;
3
- align-items: flex-start;
4
- padding: 18px 24px;
5
- border-bottom: 1px solid var(--semi-color-border);
6
- }
7
- .sheet_935c5 .semi-sidesheet-footer {
8
- border-top: 1px solid var(--semi-color-border);
9
- }
@@ -1,31 +0,0 @@
1
- import { useEffect, useRef, useState } from "react";
2
- import { useMouseDownOffset } from "../hooks/use-mouse-down-offset";
3
- const DEFAULT_WIDTH = 500;
4
- const MAX_WIDTH = 800;
5
- const MIN_WIDTH = 300;
6
- const useDrag = (options = {}) => {
7
- const {
8
- defaultWidth = DEFAULT_WIDTH,
9
- maxWidth = MAX_WIDTH,
10
- minWidth = MIN_WIDTH
11
- } = options;
12
- const [sidePaneWidth, setSidePaneWidth] = useState(defaultWidth);
13
- const prevWidthRef = useRef(sidePaneWidth);
14
- const { ref, isActive } = useMouseDownOffset(({ offsetX }) => {
15
- const newWidth = prevWidthRef.current - offsetX;
16
- setSidePaneWidth([maxWidth, newWidth, minWidth].sort((a, b) => a - b)[1]);
17
- });
18
- useEffect(() => {
19
- prevWidthRef.current = sidePaneWidth;
20
- document.body.style.cursor = isActive ? "col-resize" : "";
21
- document.body.style.userSelect = isActive ? "none" : "auto";
22
- }, [isActive]);
23
- return {
24
- sidePaneWidth,
25
- containerRef: ref,
26
- isActive
27
- };
28
- };
29
- export {
30
- useDrag
31
- };
@@ -1,56 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __objRest = (source, exclude) => {
21
- var target = {};
22
- for (var prop in source)
23
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
- target[prop] = source[prop];
25
- if (source != null && __getOwnPropSymbols)
26
- for (var prop of __getOwnPropSymbols(source)) {
27
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
- target[prop] = source[prop];
29
- }
30
- return target;
31
- };
32
- import { jsx } from "react/jsx-runtime";
33
- import { IconCozIllusEmpty } from "@coze-arch/coze-design/illustrations";
34
- import { EmptyState, Table } from "@coze-arch/coze-design";
35
- import styles from "./index.module";
36
- const LoopTable = (_a) => {
37
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
38
- return /* @__PURE__ */ jsx(
39
- Table,
40
- __spreadProps(__spreadValues({
41
- empty: /* @__PURE__ */ jsx(
42
- EmptyState,
43
- {
44
- size: "full_screen",
45
- icon: /* @__PURE__ */ jsx(IconCozIllusEmpty, {}),
46
- title: "暂无数据"
47
- }
48
- )
49
- }, props), {
50
- id: styles["fornax-table"]
51
- })
52
- );
53
- };
54
- export {
55
- LoopTable
56
- };
@@ -1,5 +0,0 @@
1
- import "./index_module.css";
2
- var index_module_default = { "fornax-table": "fornax-table_8eb2d" };
3
- export {
4
- index_module_default as default
5
- };
@@ -1,90 +0,0 @@
1
- #fornax-table_8eb2d {
2
- /* stylelint-disable declaration-no-important */
3
- /* stylelint-disable no-descending-specificity */
4
- }
5
- #fornax-table_8eb2d .semi-table-container {
6
- overflow: hidden;
7
- border: 1px solid var(--line-color-border-2, #eaedf1);
8
- border-radius: 6px;
9
- }
10
- #fornax-table_8eb2d .semi-table-header {
11
- background-color: var(--coz-bg, #f0f0f7);
12
- }
13
- #fornax-table_8eb2d .semi-spin-wrapper svg {
14
- width: 20px;
15
- height: 20px;
16
- }
17
- #fornax-table_8eb2d .semi-table-row:hover > .semi-table-row-cell:first-child {
18
- border-top-left-radius: 0;
19
- border-bottom-left-radius: 0;
20
- }
21
- #fornax-table_8eb2d .semi-table-row:hover > .semi-table-row-cell:last-child {
22
- border-top-right-radius: 0;
23
- border-bottom-right-radius: 0;
24
- }
25
- #fornax-table_8eb2d .semi-table-tbody .semi-table-row:last-child .semi-table-row-cell {
26
- border-bottom: none;
27
- }
28
- #fornax-table_8eb2d .semi-table-row-head {
29
- box-sizing: border-box;
30
- height: 42px;
31
- padding: 5px 20px;
32
- font-size: 13px;
33
- font-weight: 500;
34
- line-height: 20px;
35
- color: var(--coz-fg-plus);
36
- background: var(--coz-bg, #f0f0f7);
37
- background-color: var(--coz-bg, #f0f0f7) !important;
38
- border-bottom: 1px solid var(--line-color-border-2, #eaedf1);
39
- }
40
- #fornax-table_8eb2d .semi-table-row-head::before {
41
- background-color: var(--coz-bg, #f0f0f7) !important;
42
- }
43
- #fornax-table_8eb2d .semi-table-row {
44
- background-color: var(--coz-bg-max);
45
- }
46
- #fornax-table_8eb2d .semi-table-row:hover {
47
- border-radius: 0 !important;
48
- }
49
- #fornax-table_8eb2d .semi-table-row:hover .semi-table-row-cell {
50
- background-color: var(--coz-bg);
51
- }
52
- #fornax-table_8eb2d .semi-table-row:hover .semi-table-cell-fixed-left {
53
- background-image: linear-gradient(0deg, var(--coz-bg), var(--coz-bg));
54
- }
55
- #fornax-table_8eb2d .semi-table-row:hover .semi-table-cell-fixed-right {
56
- background-image: linear-gradient(0deg, var(--coz-bg), var(--coz-bg));
57
- }
58
- #fornax-table_8eb2d .semi-table-row-cell {
59
- overflow: hidden;
60
- box-sizing: border-box;
61
- height: 42px;
62
- padding: 10px 20px;
63
- font-size: 13px;
64
- font-weight: 400;
65
- color: var(--coz-fg-primary);
66
- vertical-align: top;
67
- background-color: #fff;
68
- border-radius: 0;
69
- vertical-align: middle;
70
- }
71
- #fornax-table_8eb2d .semi-table-tbody > .semi-table-row > .semi-table-cell-fixed-left-last,
72
- #fornax-table_8eb2d .semi-table-thead > .semi-table-row > .semi-table-row-head.semi-table-cell-fixed-left-last {
73
- border-right: none;
74
- box-shadow: 2px 0 8px rgba(0, 0, 0, 0.06);
75
- }
76
- #fornax-table_8eb2d .semi-table-tbody > .semi-table-row > .semi-table-cell-fixed-right-first,
77
- #fornax-table_8eb2d .semi-table-thead > .semi-table-row > .semi-table-row-head.semi-table-cell-fixed-right-first {
78
- border-left: none;
79
- box-shadow: -2px 0 8px rgba(0, 0, 0, 0.06);
80
- }
81
- #fornax-table_8eb2d .semi-table-scroll-position-left .semi-table-tbody > .semi-table-row > .semi-table-cell-fixed-left-last,
82
- #fornax-table_8eb2d .semi-table-scroll-position-left .semi-table-thead > .semi-table-row > .semi-table-cell-fixed-left-last,
83
- #fornax-table_8eb2d .semi-table-scroll-position-right .semi-table-tbody > .semi-table-row > .semi-table-cell-fixed-right-first,
84
- #fornax-table_8eb2d .semi-table-scroll-position-right .semi-table-thead > .semi-table-row > .semi-table-cell-fixed-right-first {
85
- box-shadow: none !important;
86
- }
87
- #fornax-table_8eb2d .semi-table-bordered .semi-table-thead > .semi-table-row > .semi-table-row-head:last-child,
88
- #fornax-table_8eb2d .semi-table-bordered .semi-table-tbody > .semi-table-row > .semi-table-row-cell:last-child {
89
- border-right: none;
90
- }
@@ -1,105 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __objRest = (source, exclude) => {
21
- var target = {};
22
- for (var prop in source)
23
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
- target[prop] = source[prop];
25
- if (source != null && __getOwnPropSymbols)
26
- for (var prop of __getOwnPropSymbols(source)) {
27
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
- target[prop] = source[prop];
29
- }
30
- return target;
31
- };
32
- import { jsx, jsxs } from "react/jsx-runtime";
33
- import { Tooltip } from "@coze-arch/coze-design";
34
- import IconButtonContainer from "../id-render/icon-button-container";
35
- const activeColor = "rgb(var(--coze-up-brand-9))";
36
- const unActiveColor = "var(--coz-fg-dim)";
37
- const IconSortArrow = (_a) => {
38
- var _b = _a, {
39
- sortOrder
40
- } = _b, rest = __objRest(_b, [
41
- "sortOrder"
42
- ]);
43
- let descendColor = "currentColor";
44
- let ascendColor = "currentColor";
45
- if (sortOrder === "descend") {
46
- descendColor = activeColor;
47
- ascendColor = unActiveColor;
48
- } else if (sortOrder === "ascend") {
49
- descendColor = unActiveColor;
50
- ascendColor = activeColor;
51
- }
52
- return /* @__PURE__ */ jsxs(
53
- "svg",
54
- __spreadProps(__spreadValues({
55
- width: "14",
56
- height: "14",
57
- viewBox: "0 0 24 24",
58
- fill: "currentColor",
59
- xmlns: "http://www.w3.org/2000/svg"
60
- }, rest), {
61
- children: [
62
- /* @__PURE__ */ jsx(
63
- "path",
64
- {
65
- d: "M7.00012 1.99976C7.55241 1.99976 8.00012 2.44747 8.00012 2.99976V17.2677L9.6341 14.4376C9.91024 13.9593 10.5218 13.7954 11.0001 14.0715C11.4784 14.3477 11.6423 14.9593 11.3661 15.4376L7.8758 21.483C7.85628 21.5183 7.83468 21.5523 7.81118 21.5849C7.72727 21.7015 7.62174 21.7953 7.50337 21.8641C7.38229 21.9347 7.24502 21.9807 7.09848 21.995C7.06439 21.9984 7.03007 22 6.99566 21.9999C6.64882 22.0011 6.31102 21.8217 6.12517 21.4998L2.62517 15.4376C2.34903 14.9593 2.5129 14.3477 2.99119 14.0715C3.46949 13.7954 4.08108 13.9593 4.35722 14.4376L6.00012 17.2832V2.99976C6.00012 2.44747 6.44784 1.99976 7.00012 1.99976Z",
66
- fill: descendColor
67
- }
68
- ),
69
- /* @__PURE__ */ jsx(
70
- "path",
71
- {
72
- d: "M17.001 21.9999C16.4487 21.9999 16.001 21.5522 16.001 20.9999L16.001 6.73198L14.367 9.5621C14.0909 10.0404 13.4793 10.2043 13.001 9.92813C12.5227 9.65199 12.3589 9.04039 12.635 8.5621L16.1253 2.51665C16.1449 2.48135 16.1665 2.44735 16.19 2.41482C16.2739 2.29823 16.3794 2.20436 16.4978 2.13559C16.6189 2.06494 16.7561 2.019 16.9027 2.0047C16.9368 2.0013 16.9711 1.99964 17.0055 1.99977C17.3523 1.99854 17.6901 2.17802 17.876 2.49993L21.376 8.5621C21.6521 9.0404 21.4882 9.65199 21.0099 9.92813C20.5317 10.2043 19.9201 10.0404 19.6439 9.5621L18.001 6.71652L18.001 20.9999C18.001 21.5522 17.5533 21.9999 17.001 21.9999Z",
73
- fill: ascendColor
74
- }
75
- )
76
- ]
77
- })
78
- );
79
- };
80
- function LoopTableSortIcon({
81
- sortOrder
82
- }) {
83
- let tooltip = "点击升序";
84
- if (sortOrder === "ascend") {
85
- tooltip = "点击降序";
86
- } else if (sortOrder === "descend") {
87
- tooltip = "点击恢复默认排序";
88
- }
89
- return /* @__PURE__ */ jsx(Tooltip, { theme: "dark", content: tooltip, children: /* @__PURE__ */ jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsx(
90
- IconButtonContainer,
91
- {
92
- icon: /* @__PURE__ */ jsx(
93
- IconSortArrow,
94
- {
95
- sortOrder,
96
- className: "text-[var(--coz-fg-secondary)]"
97
- }
98
- )
99
- }
100
- ) }) });
101
- }
102
- export {
103
- IconSortArrow,
104
- LoopTableSortIcon as default
105
- };
@@ -1,112 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
21
- import { useEffect, useMemo, useRef } from "react";
22
- import { useSize } from "ahooks";
23
- import { CozPagination } from "@coze-arch/coze-design";
24
- import LoopTableSortIcon from "./sort-icon";
25
- import { LoopTable } from "./index";
26
- const PAGE_SIZE_OPTIONS = [10, 20, 50];
27
- const DEFAULT_PAGE_SIZE = 10;
28
- function TableWithPagination(props) {
29
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
30
- const {
31
- pageSizeOpts,
32
- service,
33
- header,
34
- heightFull = false,
35
- footerWithPagination
36
- } = props;
37
- const { columns } = (_a = props.tableProps) != null ? _a : {};
38
- const tableContainerRef = useRef(null);
39
- const size = useSize(tableContainerRef.current);
40
- const tableHeaderSize = useSize(
41
- (_b = tableContainerRef.current) == null ? void 0 : _b.querySelector(".semi-table-header")
42
- );
43
- const tablePagination = useMemo(
44
- () => ({
45
- currentPage: service.pagination.current,
46
- pageSize: service.pagination.pageSize,
47
- total: Number(service.pagination.total),
48
- onChange: (page, pageSize) => {
49
- service.pagination.onChange(page, pageSize);
50
- },
51
- showSizeChanger: true,
52
- pageSizeOpts: pageSizeOpts != null ? pageSizeOpts : PAGE_SIZE_OPTIONS
53
- }),
54
- [service.pagination, pageSizeOpts]
55
- );
56
- useEffect(() => {
57
- var _a2, _b2;
58
- if (service.pagination.current > 1 && ((_b2 = (_a2 = service == null ? void 0 : service.data) == null ? void 0 : _a2.list) == null ? void 0 : _b2.length) === 0) {
59
- service.pagination.changeCurrent(1);
60
- }
61
- }, [service.pagination.current, (_c = service == null ? void 0 : service.data) == null ? void 0 : _c.list]);
62
- const tableHeaderHeight = (_d = tableHeaderSize == null ? void 0 : tableHeaderSize.height) != null ? _d : 56;
63
- return /* @__PURE__ */ jsxs(
64
- "div",
65
- {
66
- className: `${heightFull ? "h-full flex overflow-hidden" : ""} flex flex-col gap-3`,
67
- children: [
68
- header ? header : null,
69
- /* @__PURE__ */ jsx(
70
- "div",
71
- {
72
- ref: tableContainerRef,
73
- className: heightFull ? "flex-1 overflow-hidden" : "",
74
- children: /* @__PURE__ */ jsx(
75
- LoopTable,
76
- __spreadProps(__spreadValues({}, props), {
77
- tableProps: __spreadProps(__spreadValues({
78
- empty: /* @__PURE__ */ jsx(Fragment, {})
79
- }, (_e = props.tableProps) != null ? _e : {}), {
80
- scroll: __spreadValues({
81
- // 表格容器的高度减去表格头的高度
82
- y: (size == null ? void 0 : size.height) === void 0 || !heightFull ? void 0 : size.height - tableHeaderHeight - 2
83
- }, (_g = (_f = props.tableProps) == null ? void 0 : _f.scroll) != null ? _g : {}),
84
- loading: service == null ? void 0 : service.loading,
85
- columns: (_h = columns == null ? void 0 : columns.filter(
86
- (column) => column.hidden !== true && column.checked !== false
87
- )) == null ? void 0 : _h.map((column) => __spreadValues(__spreadValues({}, column), column.sorter && !column.sortIcon ? { sortIcon: LoopTableSortIcon } : {})),
88
- dataSource: (_j = (_i = service == null ? void 0 : service.data) == null ? void 0 : _i.list) != null ? _j : []
89
- })
90
- })
91
- )
92
- }
93
- ),
94
- service.pagination.current > 1 || ((_l = (_k = service == null ? void 0 : service.data) == null ? void 0 : _k.list) == null ? void 0 : _l.length) && ((_n = (_m = service == null ? void 0 : service.data) == null ? void 0 : _m.list) == null ? void 0 : _n.length) > 0 ? /* @__PURE__ */ jsxs("div", { className: "shrink-0 flex flex-row-reverse justify-between items-center", children: [
95
- /* @__PURE__ */ jsx(
96
- CozPagination,
97
- __spreadProps(__spreadValues({}, tablePagination), {
98
- showTotal: true,
99
- showSizeChanger: true
100
- })
101
- ),
102
- footerWithPagination
103
- ] }) : null
104
- ]
105
- }
106
- );
107
- }
108
- export {
109
- DEFAULT_PAGE_SIZE,
110
- PAGE_SIZE_OPTIONS,
111
- TableWithPagination
112
- };
@@ -1,74 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
21
- import { useRef } from "react";
22
- import { useSize } from "ahooks";
23
- import LoopTableSortIcon from "./sort-icon";
24
- import { LoopTable } from "./index";
25
- const PAGE_SIZE_OPTIONS = [10, 20, 50];
26
- const DEFAULT_PAGE_SIZE = 10;
27
- function TableWithoutPagination(props) {
28
- var _a, _b, _c, _d, _e, _f, _g;
29
- const { header, heightFull = false } = props;
30
- const { columns } = (_a = props.tableProps) != null ? _a : {};
31
- const tableContainerRef = useRef(null);
32
- const size = useSize(tableContainerRef.current);
33
- const tableHeaderSize = useSize(
34
- (_b = tableContainerRef.current) == null ? void 0 : _b.querySelector(".semi-table-header")
35
- );
36
- const tableHeaderHeight = (_c = tableHeaderSize == null ? void 0 : tableHeaderSize.height) != null ? _c : 56;
37
- return /* @__PURE__ */ jsxs(
38
- "div",
39
- {
40
- className: `${heightFull ? "h-full flex overflow-hidden" : ""} flex flex-col gap-3`,
41
- children: [
42
- header ? header : null,
43
- /* @__PURE__ */ jsx(
44
- "div",
45
- {
46
- ref: tableContainerRef,
47
- className: heightFull ? "flex-1 overflow-hidden" : "",
48
- children: /* @__PURE__ */ jsx(
49
- LoopTable,
50
- __spreadProps(__spreadValues({}, props), {
51
- tableProps: __spreadProps(__spreadValues({
52
- empty: /* @__PURE__ */ jsx(Fragment, {})
53
- }, (_d = props.tableProps) != null ? _d : {}), {
54
- scroll: __spreadValues({
55
- // 表格容器的高度减去表格头的高度
56
- y: (size == null ? void 0 : size.height) === void 0 || !heightFull ? void 0 : size.height - tableHeaderHeight - 2
57
- }, (_f = (_e = props.tableProps) == null ? void 0 : _e.scroll) != null ? _f : {}),
58
- columns: (_g = columns == null ? void 0 : columns.filter(
59
- (column) => column.hidden !== true && column.checked !== false
60
- )) == null ? void 0 : _g.map((column) => __spreadValues(__spreadValues({}, column), column.sorter && !column.sortIcon ? { sortIcon: LoopTableSortIcon } : {}))
61
- })
62
- })
63
- )
64
- }
65
- )
66
- ]
67
- }
68
- );
69
- }
70
- export {
71
- DEFAULT_PAGE_SIZE,
72
- PAGE_SIZE_OPTIONS,
73
- TableWithoutPagination
74
- };
@@ -1,103 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { useState } from "react";
3
- import { IconCozMore } from "@coze-arch/coze-design/icons";
4
- import {
5
- Dropdown,
6
- Space,
7
- Typography
8
- } from "@coze-arch/coze-design";
9
- import { TooltipWhenDisabled } from "../tooltip-with-disabled";
10
- function TableColActions({ actions, maxCount = 2, disabled }) {
11
- const [visible, setVisible] = useState(false);
12
- const filteredActions = actions.filter((action) => !action.hide);
13
- const firstActions = filteredActions.slice(0, maxCount);
14
- const moreActions = filteredActions.slice(maxCount);
15
- return /* @__PURE__ */ jsx(
16
- "div",
17
- {
18
- onClick: (e) => {
19
- e.stopPropagation();
20
- },
21
- children: /* @__PURE__ */ jsxs(Space, { spacing: 12, children: [
22
- firstActions.map((action, index) => {
23
- var _a;
24
- return /* @__PURE__ */ jsx(
25
- TooltipWhenDisabled,
26
- {
27
- content: action.disabledTooltip || action.label,
28
- disabled: Boolean(action.disabled),
29
- children: /* @__PURE__ */ jsx(
30
- Typography.Text,
31
- {
32
- size: "small",
33
- className: "!text-[13px]",
34
- type: action.type,
35
- disabled: (_a = action.disabled) != null ? _a : disabled,
36
- onClick: () => {
37
- var _a2, _b;
38
- if (!((_a2 = action.disabled) != null ? _a2 : disabled)) {
39
- (_b = action.onClick) == null ? void 0 : _b.call(action);
40
- }
41
- },
42
- link: !action.type,
43
- children: action.icon ? null : action.label
44
- }
45
- )
46
- },
47
- index
48
- );
49
- }),
50
- moreActions.length > 0 && /* @__PURE__ */ jsx(
51
- Dropdown,
52
- {
53
- position: "bottomLeft",
54
- visible,
55
- trigger: "custom",
56
- onClickOutSide: () => setVisible(false),
57
- render: /* @__PURE__ */ jsx(Dropdown.Menu, { mode: "menu", children: moreActions.map((action, index) => {
58
- var _a;
59
- return /* @__PURE__ */ jsx(
60
- Dropdown.Item,
61
- {
62
- disabled: (_a = action.disabled) != null ? _a : disabled,
63
- onClick: () => {
64
- var _a2, _b;
65
- if (!((_a2 = action.disabled) != null ? _a2 : disabled)) {
66
- setVisible(false);
67
- (_b = action.onClick) == null ? void 0 : _b.call(action);
68
- }
69
- },
70
- className: "min-w-[90px] !p-0 !pl-2",
71
- icon: action.icon,
72
- style: { minWidth: "90px" },
73
- children: /* @__PURE__ */ jsx(
74
- Typography.Text,
75
- {
76
- type: action.type,
77
- size: "small",
78
- className: "!text-[13px]",
79
- link: !action.type,
80
- children: action.label
81
- }
82
- )
83
- },
84
- index
85
- );
86
- }) }),
87
- children: /* @__PURE__ */ jsx(
88
- "div",
89
- {
90
- className: "flex items-center justify-center",
91
- onClick: () => setVisible(true),
92
- children: /* @__PURE__ */ jsx(IconCozMore, { className: "text-[#5A4DED]" })
93
- }
94
- )
95
- }
96
- )
97
- ] })
98
- }
99
- );
100
- }
101
- export {
102
- TableColActions
103
- };
@@ -1,68 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { jsx, jsxs } from "react/jsx-runtime";
21
- import classNames from "classnames";
22
- import { IconCozRefresh } from "@coze-arch/coze-design/icons";
23
- import {
24
- Button,
25
- Space,
26
- Tooltip
27
- } from "@coze-arch/coze-design";
28
- import { ColumnSelector } from "../columns-select";
29
- import styles from "./index.module";
30
- function TableHeader({
31
- columnSelectorConfigProps,
32
- filterForm,
33
- actions,
34
- className,
35
- style,
36
- spaceProps,
37
- refreshButtonPros
38
- }) {
39
- return /* @__PURE__ */ jsxs(
40
- "div",
41
- {
42
- className: classNames("flex flex-row justify-between w-full ", className),
43
- style,
44
- children: [
45
- /* @__PURE__ */ jsx("div", { className: classNames("flex flex-row", styles["table-header-form"]), children: filterForm }),
46
- /* @__PURE__ */ jsxs(Space, __spreadProps(__spreadValues({}, spaceProps || {}), { children: [
47
- refreshButtonPros ? /* @__PURE__ */ jsx(Tooltip, { content: "刷新", theme: "dark", children: /* @__PURE__ */ jsx(
48
- Button,
49
- __spreadValues({
50
- color: "primary",
51
- icon: /* @__PURE__ */ jsx(IconCozRefresh, {})
52
- }, refreshButtonPros)
53
- ) }) : null,
54
- columnSelectorConfigProps ? /* @__PURE__ */ jsx(
55
- ColumnSelector,
56
- __spreadValues({
57
- className: classNames(columnSelectorConfigProps.className)
58
- }, columnSelectorConfigProps)
59
- ) : null,
60
- actions
61
- ] }))
62
- ]
63
- }
64
- );
65
- }
66
- export {
67
- TableHeader
68
- };
@@ -1,5 +0,0 @@
1
- import "./index_module.css";
2
- var index_module_default = { "table-header-form": "table-header-form_47d15" };
3
- export {
4
- index_module_default as default
5
- };
@@ -1,3 +0,0 @@
1
- .table-header-form_47d15 .semi-form-horizontal .semi-form-field {
2
- padding-right: 8px;
3
- }