@creekjs/web-components 1.0.5 → 1.0.7

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 (162) hide show
  1. package/.turbo/turbo-father$colon$build.log +32 -16
  2. package/README.md +117 -66
  3. package/dist/creek-config-provider/CreekConfigContext.d.ts +4 -0
  4. package/dist/creek-config-provider/CreekConfigContext.js.map +2 -2
  5. package/dist/creek-config-provider/CreekI18nProvider.d.ts +22 -0
  6. package/dist/creek-config-provider/CreekI18nProvider.js +92 -0
  7. package/dist/creek-config-provider/CreekI18nProvider.js.map +7 -0
  8. package/dist/creek-config-provider/index.d.ts +5 -3
  9. package/dist/creek-config-provider/index.js +47 -4
  10. package/dist/creek-config-provider/index.js.map +3 -3
  11. package/dist/creek-hooks/useApp/index.d.ts +3 -3
  12. package/dist/creek-keep-alive/index.d.ts +24 -1
  13. package/dist/creek-keep-alive/index.js +141 -4
  14. package/dist/creek-keep-alive/index.js.map +2 -2
  15. package/dist/creek-layout/ActionRender/FullScreen.js +3 -1
  16. package/dist/creek-layout/ActionRender/FullScreen.js.map +2 -2
  17. package/dist/creek-layout/ActionRender/LayoutSettings.d.ts +5 -0
  18. package/dist/creek-layout/ActionRender/LayoutSettings.js +73 -0
  19. package/dist/creek-layout/ActionRender/LayoutSettings.js.map +7 -0
  20. package/dist/creek-layout/ActionRender/UserInfo.js.map +2 -2
  21. package/dist/creek-layout/ActionRender/index.d.ts +1 -0
  22. package/dist/creek-layout/ActionRender/index.js +3 -0
  23. package/dist/creek-layout/ActionRender/index.js.map +2 -2
  24. package/dist/creek-layout/index.d.ts +5 -5
  25. package/dist/creek-layout/index.js +79 -16
  26. package/dist/creek-layout/index.js.map +3 -3
  27. package/dist/creek-layout/useLayoutSettingsStore.d.ts +20 -0
  28. package/dist/creek-layout/useLayoutSettingsStore.js +45 -0
  29. package/dist/creek-layout/useLayoutSettingsStore.js.map +7 -0
  30. package/dist/creek-locale-button/index.d.ts +1 -0
  31. package/dist/creek-locale-button/index.js +66 -0
  32. package/dist/creek-locale-button/index.js.map +7 -0
  33. package/dist/creek-page-container/index.d.ts +4 -0
  34. package/dist/creek-page-container/index.js +68 -0
  35. package/dist/creek-page-container/index.js.map +7 -0
  36. package/dist/creek-style/index.d.ts +1 -0
  37. package/dist/creek-style/index.js +24 -0
  38. package/dist/creek-style/index.js.map +7 -0
  39. package/dist/creek-style/scrollbar.d.ts +2 -0
  40. package/dist/creek-style/scrollbar.js +55 -0
  41. package/dist/creek-style/scrollbar.js.map +7 -0
  42. package/dist/creek-table/SearchTable.d.ts +9 -0
  43. package/dist/creek-table/SearchTable.js +109 -72
  44. package/dist/creek-table/SearchTable.js.map +3 -3
  45. package/dist/creek-table/components/DensityIcon.d.ts +9 -0
  46. package/dist/creek-table/components/DensityIcon.js +77 -0
  47. package/dist/creek-table/components/DensityIcon.js.map +7 -0
  48. package/dist/creek-table/components/EllipsisTooltip.d.ts +9 -0
  49. package/dist/creek-table/components/EllipsisTooltip.js +122 -0
  50. package/dist/creek-table/components/EllipsisTooltip.js.map +7 -0
  51. package/dist/creek-table/components/index.d.ts +2 -0
  52. package/dist/creek-table/components/index.js +26 -0
  53. package/dist/creek-table/components/index.js.map +7 -0
  54. package/dist/creek-table/hooks/index.d.ts +5 -0
  55. package/dist/creek-table/hooks/index.js +10 -0
  56. package/dist/creek-table/hooks/index.js.map +2 -2
  57. package/dist/creek-table/hooks/useAutoWidthColumns.d.ts +1 -1
  58. package/dist/creek-table/hooks/useAutoWidthColumns.js +76 -17
  59. package/dist/creek-table/hooks/useAutoWidthColumns.js.map +2 -2
  60. package/dist/creek-table/hooks/useEllipsisColumns.d.ts +8 -0
  61. package/dist/creek-table/hooks/useEllipsisColumns.js +58 -0
  62. package/dist/creek-table/hooks/useEllipsisColumns.js.map +7 -0
  63. package/dist/creek-table/hooks/useIndexColumn.d.ts +2 -0
  64. package/dist/creek-table/hooks/useIndexColumn.js +52 -0
  65. package/dist/creek-table/hooks/useIndexColumn.js.map +7 -0
  66. package/dist/creek-table/hooks/useResizableColumns.d.ts +20 -0
  67. package/dist/creek-table/hooks/useResizableColumns.js +279 -0
  68. package/dist/creek-table/hooks/useResizableColumns.js.map +7 -0
  69. package/dist/creek-table/hooks/useStatusColumns.d.ts +2 -0
  70. package/dist/creek-table/hooks/useStatusColumns.js +215 -0
  71. package/dist/creek-table/hooks/useStatusColumns.js.map +7 -0
  72. package/dist/creek-table/hooks/useTableOptions.d.ts +15 -0
  73. package/dist/creek-table/hooks/useTableOptions.js +78 -0
  74. package/dist/creek-table/hooks/useTableOptions.js.map +7 -0
  75. package/dist/creek-table/hooks/useTableScrollHeight.d.ts +6 -1
  76. package/dist/creek-table/hooks/useTableScrollHeight.js +44 -5
  77. package/dist/creek-table/hooks/useTableScrollHeight.js.map +2 -2
  78. package/dist/creek-table/type.d.ts +4 -6
  79. package/dist/creek-table/type.js.map +1 -1
  80. package/dist/index.d.ts +4 -0
  81. package/dist/index.js +8 -0
  82. package/dist/index.js.map +2 -2
  83. package/dist/locales/en-US.d.ts +25 -0
  84. package/dist/locales/en-US.js +49 -0
  85. package/dist/locales/en-US.js.map +7 -0
  86. package/dist/locales/zh-CN.d.ts +25 -0
  87. package/dist/locales/zh-CN.js +49 -0
  88. package/dist/locales/zh-CN.js.map +7 -0
  89. package/dist/utils/i18n.d.ts +2 -0
  90. package/dist/utils/i18n.js +34 -0
  91. package/dist/utils/i18n.js.map +7 -0
  92. package/i18n.config.ts +27 -0
  93. package/package.json +22 -8
  94. package/src/creek-config-provider/CreekConfigContext.tsx +5 -1
  95. package/src/creek-config-provider/CreekI18nProvider.tsx +87 -0
  96. package/src/creek-config-provider/index.tsx +53 -4
  97. package/src/creek-keep-alive/index.tsx +225 -6
  98. package/src/creek-layout/ActionRender/FullScreen.tsx +10 -6
  99. package/src/creek-layout/ActionRender/LayoutSettings.tsx +67 -0
  100. package/src/creek-layout/ActionRender/UserInfo.tsx +1 -1
  101. package/src/creek-layout/ActionRender/index.tsx +1 -0
  102. package/src/creek-layout/index.tsx +89 -22
  103. package/src/creek-layout/useLayoutSettingsStore.ts +25 -0
  104. package/src/creek-locale-button/index.tsx +42 -0
  105. package/src/creek-page-container/index.tsx +32 -0
  106. package/src/creek-style/index.ts +1 -0
  107. package/src/creek-style/scrollbar.ts +29 -0
  108. package/src/creek-table/SearchTable.tsx +125 -72
  109. package/src/creek-table/components/DensityIcon.tsx +63 -0
  110. package/src/creek-table/components/EllipsisTooltip.tsx +116 -0
  111. package/src/creek-table/components/index.tsx +3 -0
  112. package/src/creek-table/hooks/index.ts +5 -1
  113. package/src/creek-table/hooks/useAutoWidthColumns.tsx +93 -19
  114. package/src/creek-table/hooks/useEllipsisColumns.tsx +47 -0
  115. package/src/creek-table/hooks/useIndexColumn.tsx +27 -0
  116. package/src/creek-table/hooks/useResizableColumns.tsx +323 -0
  117. package/src/creek-table/hooks/useStatusColumns.tsx +252 -0
  118. package/src/creek-table/hooks/useTableOptions.tsx +81 -0
  119. package/src/creek-table/hooks/useTableScrollHeight.tsx +61 -6
  120. package/src/creek-table/type.ts +5 -7
  121. package/src/index.tsx +4 -0
  122. package/src/locales/en-US.ts +24 -0
  123. package/src/locales/zh-CN.ts +24 -0
  124. package/src/utils/i18n.ts +4 -0
  125. package/dist/creek-config-provider/CreekConfigContext.d.ts.map +0 -1
  126. package/dist/creek-config-provider/index.d.ts.map +0 -1
  127. package/dist/creek-hooks/index.d.ts.map +0 -1
  128. package/dist/creek-hooks/useApp/DrawerHelper.d.ts.map +0 -1
  129. package/dist/creek-hooks/useApp/ModalHelper.d.ts.map +0 -1
  130. package/dist/creek-hooks/useApp/index.d.ts.map +0 -1
  131. package/dist/creek-hooks/useApp/types.d.ts.map +0 -1
  132. package/dist/creek-hooks/useViewportHeight.d.ts.map +0 -1
  133. package/dist/creek-icon/index.d.ts.map +0 -1
  134. package/dist/creek-keep-alive/index.d.ts.map +0 -1
  135. package/dist/creek-layout/ActionRender/FullScreen.d.ts.map +0 -1
  136. package/dist/creek-layout/ActionRender/UserInfo.d.ts.map +0 -1
  137. package/dist/creek-layout/ActionRender/index.d.ts.map +0 -1
  138. package/dist/creek-layout/CollapseButton.d.ts.map +0 -1
  139. package/dist/creek-layout/Exception/NotFound.d.ts.map +0 -1
  140. package/dist/creek-layout/Exception/NotFoundPage.d.ts.map +0 -1
  141. package/dist/creek-layout/Exception/index.d.ts.map +0 -1
  142. package/dist/creek-layout/index.d.ts.map +0 -1
  143. package/dist/creek-loading/index.d.ts.map +0 -1
  144. package/dist/creek-table/SearchTable.d.ts.map +0 -1
  145. package/dist/creek-table/TableOptionRender.d.ts +0 -9
  146. package/dist/creek-table/TableOptionRender.d.ts.map +0 -1
  147. package/dist/creek-table/TableOptionRender.js +0 -74
  148. package/dist/creek-table/TableOptionRender.js.map +0 -7
  149. package/dist/creek-table/hooks/index.d.ts.map +0 -1
  150. package/dist/creek-table/hooks/useAdaptiveToolBar.d.ts.map +0 -1
  151. package/dist/creek-table/hooks/useAutoWidthColumns.d.ts.map +0 -1
  152. package/dist/creek-table/hooks/useElementDistance.d.ts.map +0 -1
  153. package/dist/creek-table/hooks/useTableScrollHeight.d.ts.map +0 -1
  154. package/dist/creek-table/index.d.ts.map +0 -1
  155. package/dist/creek-table/toolBarRender.d.ts +0 -5
  156. package/dist/creek-table/toolBarRender.d.ts.map +0 -1
  157. package/dist/creek-table/toolBarRender.js +0 -58
  158. package/dist/creek-table/toolBarRender.js.map +0 -7
  159. package/dist/creek-table/type.d.ts.map +0 -1
  160. package/dist/index.d.ts.map +0 -1
  161. package/src/creek-table/TableOptionRender.tsx +0 -57
  162. package/src/creek-table/toolBarRender.tsx +0 -28
@@ -1,8 +1,11 @@
1
1
  import { useDebounceFn, useEventListener } from 'ahooks';
2
2
  import { useEffect, useState } from 'react';
3
3
 
4
- export const useTableScrollHeight = (prefixCls: string, tableRef: React.RefObject<HTMLDivElement>, pageFixedBottom: boolean = true, contentPadding: number = 16, offsetBottom: number = 16) => {
4
+ export const useTableScrollHeight = (prefixCls: string, tableRef: React.RefObject<HTMLDivElement>, pageFixedBottom: boolean = true, offsetBottom: number = 0) => {
5
5
  const [scrollY, setScrollY] = useState<number | undefined>(undefined);
6
+ const [tableHeight, setTableHeight] = useState<number | undefined>(undefined);
7
+ const [tableContainerHeight, setTableContainerHeight] = useState<number | undefined>(0);
8
+ const [hasScroll, setHasScroll] = useState<boolean>(false);
6
9
 
7
10
  const { run: calcHeight } = useDebounceFn(
8
11
  () => {
@@ -10,8 +13,41 @@ export const useTableScrollHeight = (prefixCls: string, tableRef: React.RefObjec
10
13
 
11
14
  const tableEl = tableRef.current;
12
15
 
16
+ // 如果元素不可见(例如在 display: none 的 tab 中),不进行计算,防止计算出错误的高度
17
+ if (tableEl.offsetParent === null) return;
18
+
13
19
  const tableHeader = tableEl.querySelector(`.${prefixCls}-table-thead`);
14
- const tableBody = tableEl.querySelector(`.${prefixCls}-table-body`);
20
+ const tableBody = tableEl.querySelector(`.${prefixCls}-table-tbody`);
21
+
22
+ // 尝试动态获取 layout content padding
23
+ // Ant Design Pro Layout 的 content 容器通常有 class 包含 'pro-layout-content'
24
+ // 例如:ant-pro-layout-content, my-prefix-pro-layout-content
25
+ let currentContentPadding = 0; // 默认使用传入的
26
+
27
+ const layoutContentEl = tableEl.closest(`div[class*="pro-layout-content"]`);
28
+ if (layoutContentEl) {
29
+ const style = window.getComputedStyle(layoutContentEl);
30
+ // 我们主要关心底部的 padding,因为它影响到底部留白
31
+ const paddingBottom = parseFloat(style.paddingBottom);
32
+ if (!isNaN(paddingBottom)) {
33
+ currentContentPadding = paddingBottom;
34
+ }
35
+ }
36
+
37
+ // 尝试动态获取 layout content padding
38
+ // Ant Design Pro Layout 的 content 容器通常有 class 包含 'pro-layout-content'
39
+ // 例如:ant-pro-layout-content, my-prefix-pro-layout-content
40
+ let currentCardContentPadding = 0; // 默认使用传入的
41
+
42
+ const cardContentEl = tableEl.querySelector(`.${prefixCls}-pro-card-body`);
43
+ if (cardContentEl) {
44
+ const style = window.getComputedStyle(cardContentEl);
45
+ // 我们主要关心底部的 padding,因为它影响到底部留白
46
+ const paddingBottom = parseFloat(style.paddingBottom);
47
+ if (!isNaN(paddingBottom)) {
48
+ currentCardContentPadding = paddingBottom;
49
+ }
50
+ }
15
51
 
16
52
  let top = 0;
17
53
  if (tableHeader) {
@@ -21,8 +57,9 @@ export const useTableScrollHeight = (prefixCls: string, tableRef: React.RefObjec
21
57
  }
22
58
 
23
59
  const windowHeight = window.innerHeight;
24
-
25
- let height = windowHeight - top - contentPadding - offsetBottom;
60
+
61
+ let height = windowHeight - top - currentContentPadding - currentCardContentPadding - offsetBottom;
62
+ let currentTableHeight = windowHeight - tableEl.getBoundingClientRect().top;
26
63
 
27
64
  const pagination = tableEl.querySelector(`.${prefixCls}-pagination`);
28
65
 
@@ -33,16 +70,29 @@ export const useTableScrollHeight = (prefixCls: string, tableRef: React.RefObjec
33
70
  const totalPaginationMargin = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
34
71
 
35
72
  height = height - paginationHeight - totalPaginationMargin;
73
+ setTableHeight(0);
36
74
  } else {
37
75
  // 如果没有找到分页,预留一个高度(假设分页高度为 24px + margin 16px = 40px)
38
76
  // 这样可以避免初始加载时高度过大,导致出现滚动条,然后分页出现后高度又变小
39
77
  height = height - 40;
78
+
79
+ setTableHeight(currentTableHeight);
80
+ }
81
+
82
+ let currentHasScroll = false;
83
+ if (tableBody) {
84
+ currentHasScroll = tableBody.scrollHeight > height;
40
85
  }
86
+ setHasScroll(currentHasScroll);
41
87
 
42
88
  // Minimum height to avoid crashes or ugly rendering
43
89
  setScrollY(height);
90
+
91
+ if (tableHeader) {
92
+ setTableContainerHeight(height + tableHeader?.clientHeight);
93
+ }
44
94
  },
45
- { wait: 100 },
95
+ { wait: 16,leading: true },
46
96
  );
47
97
 
48
98
  useEffect(() => {
@@ -59,5 +109,10 @@ export const useTableScrollHeight = (prefixCls: string, tableRef: React.RefObjec
59
109
 
60
110
  useEventListener('resize', calcHeight);
61
111
 
62
- return scrollY;
112
+ return {
113
+ scrollY,
114
+ tableHeight,
115
+ tableContainerHeight,
116
+ hasScroll,
117
+ };
63
118
  };
@@ -6,16 +6,14 @@ export type OptionRenderCustom = {
6
6
  onClick?: () => void;
7
7
  };
8
8
 
9
- export type CreekTableProps<T extends ParamsType, U extends ParamsType, ValueType = 'text'> = Omit<ProTableProps<T, U, ValueType>, 'options'> & {
9
+ export type CreekTableProps<T extends ParamsType, U extends ParamsType, ValueType = 'text'> = ProTableProps<T, U, ValueType> & {
10
10
  pageFixedBottom?: boolean; // 是否固定分页在底部
11
11
  pageFixedBottomConfig?: {
12
12
  /** 底部保留空间(如固定在底部的元素高度),默认 0 */
13
13
  bottomFix?: number;
14
14
  };
15
- options?: ProTableProps<T, U, ValueType>['options'] & {
16
- importConfig?: OptionRenderCustom;
17
- exportConfig?: OptionRenderCustom;
18
- };
19
- // 是否自动为列添加筛选功能,默认 true
20
- autoAddFilterForColumn?: boolean;
15
+ // 是否显示序号列,默认 true
16
+ showIndex?: boolean;
17
+ /** 是否可拖动列宽,默认 true */
18
+ resizable?: boolean;
21
19
  };
package/src/index.tsx CHANGED
@@ -2,7 +2,11 @@
2
2
  export * from './creek-config-provider';
3
3
  export * from './creek-hooks';
4
4
  export * from './creek-icon';
5
+ export * from './creek-keep-alive';
5
6
  export * from './creek-layout';
6
7
  export * from './creek-loading';
8
+ export * from './creek-locale-button';
9
+ export * from './creek-page-container';
10
+ export * from './creek-style';
7
11
  export * from './creek-table';
8
12
 
@@ -0,0 +1,24 @@
1
+ export default {
2
+ 'creek-keep-alive.index.guanBiDangQian': 'Close Current',
3
+ 'creek-keep-alive.index.guanBiQiTa': 'Close Others',
4
+ 'creek-keep-alive.index.guanBiYouCe': 'Close Right',
5
+ 'creek-layout.ActionRender.FullScreen.tuiChuQuanPing': 'Exit Full Screen',
6
+ 'creek-layout.ActionRender.FullScreen.quanPing': 'Full Screen',
7
+ 'creek-table.components.DensityIcon.kuanSong': 'Loose',
8
+ 'creek-table.components.DensityIcon.zhongDeng': 'Medium',
9
+ 'creek-table.components.DensityIcon.jinCou': 'Compact',
10
+ 'creek-table.components.DensityIcon.biaoGeMiDu(KuanSong)': 'Table Density (Loose)',
11
+ 'creek-table.components.DensityIcon.biaoGeMiDu(ZhongDeng)': 'Table Density (Medium)',
12
+ 'creek-table.components.DensityIcon.biaoGeMiDu(JinCou)': 'Table Density (Compact)',
13
+ 'creek-table.components.DensityIcon.biaoGeMiDu': 'Table Density',
14
+ 'creek-table.components.EllipsisTooltip.fuZhiChengGong': 'Copied Successfully',
15
+ 'creek-table.components.EllipsisTooltip.fuZhiShiBai': 'Copy Failed',
16
+ 'creek-table.components.EllipsisTooltip.fuZhi': 'Copy',
17
+ 'creek-table.hooks.useIndexColumn.xuHao': 'No.',
18
+ 'creek-layout.ActionRender.LayoutSettings.title': 'System Settings',
19
+ 'creek-layout.ActionRender.LayoutSettings.themeColor': 'Theme Color',
20
+ 'creek-layout.ActionRender.LayoutSettings.showFullScreen': 'Show Full Screen Button',
21
+ 'creek-layout.ActionRender.LayoutSettings.showLocaleButton': 'Show Locale Button',
22
+ 'creek-locale-button.index.jianTiZhongWen': 'Simplified Chinese',
23
+ 'creek-layout.ActionRender.LayoutSettings.keepAlive': 'Enable Page Cache (Keep Alive)',
24
+ };
@@ -0,0 +1,24 @@
1
+ export default {
2
+ "creek-keep-alive.index.guanBiDangQian": "关闭当前",
3
+ "creek-keep-alive.index.guanBiQiTa": "关闭其他",
4
+ "creek-keep-alive.index.guanBiYouCe": "关闭右侧",
5
+ "creek-layout.ActionRender.FullScreen.tuiChuQuanPing": "退出全屏",
6
+ "creek-layout.ActionRender.FullScreen.quanPing": "全屏",
7
+ "creek-table.components.DensityIcon.kuanSong": "宽松",
8
+ "creek-table.components.DensityIcon.zhongDeng": "中等",
9
+ "creek-table.components.DensityIcon.jinCou": "紧凑",
10
+ "creek-table.components.DensityIcon.biaoGeMiDu(KuanSong)": "表格密度 (宽松)",
11
+ "creek-table.components.DensityIcon.biaoGeMiDu(ZhongDeng)": "表格密度 (中等)",
12
+ "creek-table.components.DensityIcon.biaoGeMiDu(JinCou)": "表格密度 (紧凑)",
13
+ "creek-table.components.DensityIcon.biaoGeMiDu": "表格密度",
14
+ "creek-table.components.EllipsisTooltip.fuZhiChengGong": "复制成功",
15
+ "creek-table.components.EllipsisTooltip.fuZhiShiBai": "复制失败",
16
+ "creek-table.components.EllipsisTooltip.fuZhi": "复制",
17
+ "creek-table.hooks.useIndexColumn.xuHao": "序号",
18
+ "creek-layout.ActionRender.LayoutSettings.title": "系统设置",
19
+ "creek-layout.ActionRender.LayoutSettings.themeColor": "主题色",
20
+ "creek-layout.ActionRender.LayoutSettings.showFullScreen": "展示全屏按钮",
21
+ "creek-layout.ActionRender.LayoutSettings.showLocaleButton": "展示国际化按钮",
22
+ "creek-locale-button.index.jianTiZhongWen": "简体中文",
23
+ "creek-layout.ActionRender.LayoutSettings.keepAlive": "开启页面缓存 (Keep Alive)"
24
+ };
@@ -0,0 +1,4 @@
1
+ import { setLocaleMessages, t, useT } from '@creekjs/i18n/react';
2
+
3
+ export { setLocaleMessages, t, useT };
4
+
@@ -1 +0,0 @@
1
- {"version":3,"file":"CreekConfigContext.d.ts","sourceRoot":"","sources":["../../src/creek-config-provider/CreekConfigContext.tsx"],"names":[],"mappings":";AAEA,MAAM,MAAM,uBAAuB,GAAG;IACpC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CACvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,kDAA6C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/creek-config-provider/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAsB,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEnF,MAAM,MAAM,wBAAwB,GAAG,uBAAuB,GAAG;IAC/D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,mBAAmB;YAAW,wBAAwB;;CAGlE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/creek-hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DrawerHelper.d.ts","sourceRoot":"","sources":["../../../src/creek-hooks/useApp/DrawerHelper.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAwC,MAAM,SAAS,CAAC;AAE7E,UAAU,iBAAiB;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA8BpD,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ModalHelper.d.ts","sourceRoot":"","sources":["../../../src/creek-hooks/useApp/ModalHelper.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAmB,WAAW,EAAqB,MAAM,SAAS,CAAC;AAE1E,UAAU,gBAAgB;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA8BlD,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/creek-hooks/useApp/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAI5E,OAAO,EAGL,gBAAgB,EAChB,eAAe,EAEf,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAsBjB,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CA6B/D,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;CAiDlB,CAAC;AAEF,cAAc,SAAS,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/creek-hooks/useApp/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAGF,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,UAAU,GAAG;IAAE,IAAI,CAAC,EAAE,QAAQ,CAAA;CAAE,CAAC;AAC9E,MAAM,MAAM,eAAe,CAAC,CAAC,GAAG,GAAG,IAAI,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAC1G,MAAM,MAAM,WAAW,GAAG,iBAAiB,GAAG,eAAe,CAAC;AAG9D,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,WAAW,GAAG;IAAE,IAAI,CAAC,EAAE,QAAQ,CAAA;CAAE,CAAC;AAChF,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,GAAG,IAAI,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAC5G,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG,gBAAgB,CAAC;AAEjE,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAC3C,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,SAAS,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useViewportHeight.d.ts","sourceRoot":"","sources":["../../src/creek-hooks/useViewportHeight.tsx"],"names":[],"mappings":";AAGA,UAAU,wBAAwB;IAChC,+BAA+B;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gBAAgB;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,yBAAyB;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mCAAmC;IACnC,IAAI,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC;IAE5B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,iBAAiB,aAAa,wBAAwB;IAuJ/D,wBAAwB;;IAExB,kBAAkB;;IAElB,kBAAkB;;IAElB,gBAAgB;;CAGnB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/creek-icon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,IAA8B,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAIrC,OAAO,EAAuB,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEzF,KAAK,wBAAwB,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEtD,MAAM,MAAM,cAAc,GAAG,wBAAwB,GAAG;IACtD,WAAW,CAAC,EAAE,wBAAwB,CAAC,aAAa,CAAC,CAAC;IACtD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,wBAAwB,CAAC,WAAW,CAAC,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,cAAc,mDAkB9C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/creek-keep-alive/index.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,+CAQ1B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FullScreen.d.ts","sourceRoot":"","sources":["../../../src/creek-layout/ActionRender/FullScreen.tsx"],"names":[],"mappings":"AAKA,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,8EAU7B,CAAC;AAEH,eAAO,MAAM,UAAU,+CAuBtB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserInfo.d.ts","sourceRoot":"","sources":["../../../src/creek-layout/ActionRender/UserInfo.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAoB,aAAa,EAAS,MAAM,MAAM,CAAC;AAsB9D,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAC9B;AAED,eAAO,MAAM,QAAQ,UAAW,aAAa,4CAc5C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/creek-layout/ActionRender/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"CollapseButton.d.ts","sourceRoot":"","sources":["../../src/creek-layout/CollapseButton.tsx"],"names":[],"mappings":"AAKA,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAiBF,eAAO,MAAM,iBAAiB,mFAU5B,CAAC;AAEH,eAAO,MAAM,eAAe,UAAW,oBAAoB,4CAwB1D,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NotFound.d.ts","sourceRoot":"","sources":["../../../src/creek-layout/Exception/NotFound.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,+CASpB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NotFoundPage.d.ts","sourceRoot":"","sources":["../../../src/creek-layout/Exception/NotFoundPage.tsx"],"names":[],"mappings":";AACA,wBAEE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/creek-layout/Exception/index.tsx"],"names":[],"mappings":";AAAA,cAAc,YAAY,CAAC;AAE3B,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,cAAc,4CAG9C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/creek-layout/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,cAAc,EAAE,MAAM,4BAA4B,CAAC;AASvE,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG;IACzC,aAAa,EAAE,cAAc,CAAC;IAC9B,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE;QACT,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,GAAG,CAAC;KACZ,CAAC;IACF,WAAW,CAAC,EAAE;QACZ,YAAY,EAAE,GAAG,CAAC;QAClB,OAAO,EAAE,OAAO,CAAC;QACjB,eAAe,EAAE,MAAM,IAAI,CAAC;KAC7B,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,WAAW,UAAW,WAAW,4CAuE7C,CAAC;AAEF,cAAc,aAAa,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/creek-loading/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,qBAAa,OAAO;IAClB,OAAO,CAAC,MAAM,CAAC,SAAS,CAA+B;IACvD,OAAO,CAAC,MAAM,CAAC,IAAI,CAA8C;IAEjE,OAAO,CAAC,MAAM,CAAC,eAAe;IAS9B,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC;IAMtD,MAAM,CAAC,KAAK;CAWb"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SearchTable.d.ts","sourceRoot":"","sources":["../../src/creek-table/SearchTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAY,MAAM,4BAA4B,CAAC;AAUlE,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AA6CzC,eAAO,MAAM,cAAc,0EAA2E,gBAAgB,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,4CAmDrI,CAAC"}
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { ParamsType } from '@ant-design/pro-components';
3
- import { OptionRenderCustom } from './type';
4
- export type TableOptionRenderProps<T extends ParamsType, U extends ParamsType, ValueType = 'text'> = {
5
- defaultDom?: React.ReactNode[];
6
- importConfig?: OptionRenderCustom;
7
- exportConfig?: OptionRenderCustom;
8
- };
9
- export declare const TableOptionRender: <T extends ParamsType, U extends ParamsType, ValueType = "text">(props: TableOptionRenderProps<T, U, ValueType>) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableOptionRender.d.ts","sourceRoot":"","sources":["../../src/creek-table/TableOptionRender.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAIxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAa5C,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,UAAU,EAAE,SAAS,GAAG,MAAM,IAAI;IACnG,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IAC/B,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,YAAY,CAAC,EAAE,kBAAkB,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,iBAAiB,0EAA2E,uBAAuB,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,4CAgC/I,CAAC"}
@@ -1,74 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/creek-table/TableOptionRender.tsx
20
- var TableOptionRender_exports = {};
21
- __export(TableOptionRender_exports, {
22
- TableOptionRender: () => TableOptionRender
23
- });
24
- module.exports = __toCommonJS(TableOptionRender_exports);
25
- var import_icons = require("@ant-design/icons");
26
- var import_antd = require("antd");
27
- var import_antd_style = require("antd-style");
28
- var import_jsx_runtime = require("react/jsx-runtime");
29
- var useStyles = (0, import_antd_style.createStyles)(({ prefixCls, token }) => {
30
- return {
31
- "table-option-render-item": {
32
- border: `1px solid ${token.colorBorder}`,
33
- borderRadius: token.borderRadius,
34
- padding: "8px",
35
- cursor: "pointer"
36
- }
37
- };
38
- });
39
- var TableOptionRender = (props) => {
40
- const { defaultDom, importConfig, exportConfig } = props;
41
- const { styles } = useStyles();
42
- const [reload, dis, setting] = defaultDom || [];
43
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Space, { size: 8, children: [
44
- importConfig && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
45
- "span",
46
- {
47
- className: styles["table-option-render-item"],
48
- onClick: () => {
49
- var _a;
50
- (_a = importConfig.onClick) == null ? void 0 : _a.call(importConfig);
51
- },
52
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Tooltip, { title: importConfig.text || "导入", children: importConfig.icon || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.ImportOutlined, {}) })
53
- }
54
- ),
55
- exportConfig && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
56
- "span",
57
- {
58
- className: styles["table-option-render-item"],
59
- onClick: () => {
60
- var _a;
61
- (_a = exportConfig.onClick) == null ? void 0 : _a.call(exportConfig);
62
- },
63
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Tooltip, { title: exportConfig.text || "导出", children: exportConfig.icon || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.ExportOutlined, {}) })
64
- }
65
- ),
66
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: styles["table-option-render-item"], children: reload }),
67
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: styles["table-option-render-item"], children: setting })
68
- ] });
69
- };
70
- // Annotate the CommonJS export names for ESM import in node:
71
- 0 && (module.exports = {
72
- TableOptionRender
73
- });
74
- //# sourceMappingURL=TableOptionRender.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/creek-table/TableOptionRender.tsx"],
4
- "sourcesContent": ["import { ExportOutlined, ImportOutlined } from '@ant-design/icons';\nimport { ParamsType } from '@ant-design/pro-components';\nimport { Space, Tooltip } from 'antd';\nimport { createStyles } from 'antd-style';\n\nimport { OptionRenderCustom } from './type';\n\nconst useStyles = createStyles(({ prefixCls, token }) => {\n return {\n 'table-option-render-item': {\n border: `1px solid ${token.colorBorder}`,\n borderRadius: token.borderRadius,\n padding: '8px',\n cursor: 'pointer',\n },\n };\n});\n\nexport type TableOptionRenderProps<T extends ParamsType, U extends ParamsType, ValueType = 'text'> = {\n defaultDom?: React.ReactNode[];\n importConfig?: OptionRenderCustom;\n exportConfig?: OptionRenderCustom;\n};\n\nexport const TableOptionRender = <T extends ParamsType, U extends ParamsType, ValueType = 'text'>(props: TableOptionRenderProps<T, U, ValueType>) => {\n const { defaultDom, importConfig, exportConfig } = props;\n\n const { styles } = useStyles();\n\n const [reload, dis, setting] = defaultDom || [];\n return (\n <Space size={8}>\n {importConfig && (\n <span\n className={styles['table-option-render-item']}\n onClick={() => {\n importConfig.onClick?.();\n }}\n >\n <Tooltip title={importConfig.text || '导入'}>{importConfig.icon || <ImportOutlined />}</Tooltip>\n </span>\n )}\n {exportConfig && (\n <span\n className={styles['table-option-render-item']}\n onClick={() => {\n exportConfig.onClick?.();\n }}\n >\n <Tooltip title={exportConfig.text || '导出'}>{exportConfig.icon || <ExportOutlined />}</Tooltip>\n </span>\n )}\n <span className={styles['table-option-render-item']}>{reload}</span>\n <span className={styles['table-option-render-item']}>{setting}</span>\n </Space>\n );\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA+C;AAE/C,kBAA+B;AAC/B,wBAA6B;AA4BzB;AAxBJ,IAAM,gBAAY,gCAAa,CAAC,EAAE,WAAW,MAAM,MAAM;AACvD,SAAO;AAAA,IACL,4BAA4B;AAAA,MAC1B,QAAQ,aAAa,MAAM;AAAA,MAC3B,cAAc,MAAM;AAAA,MACpB,SAAS;AAAA,MACT,QAAQ;AAAA,IACV;AAAA,EACF;AACF,CAAC;AAQM,IAAM,oBAAoB,CAAiE,UAAmD;AACnJ,QAAM,EAAE,YAAY,cAAc,aAAa,IAAI;AAEnD,QAAM,EAAE,OAAO,IAAI,UAAU;AAE7B,QAAM,CAAC,QAAQ,KAAK,OAAO,IAAI,cAAc,CAAC;AAC9C,SACE,6CAAC,qBAAM,MAAM,GACV;AAAA,oBACC;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,OAAO,0BAA0B;AAAA,QAC5C,SAAS,MAAM;AAnCzB;AAoCY,6BAAa,YAAb;AAAA,QACF;AAAA,QAEA,sDAAC,uBAAQ,OAAO,aAAa,QAAQ,MAAO,uBAAa,QAAQ,4CAAC,+BAAe,GAAG;AAAA;AAAA,IACtF;AAAA,IAED,gBACC;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,OAAO,0BAA0B;AAAA,QAC5C,SAAS,MAAM;AA7CzB;AA8CY,6BAAa,YAAb;AAAA,QACF;AAAA,QAEA,sDAAC,uBAAQ,OAAO,aAAa,QAAQ,MAAO,uBAAa,QAAQ,4CAAC,+BAAe,GAAG;AAAA;AAAA,IACtF;AAAA,IAEF,4CAAC,UAAK,WAAW,OAAO,0BAA0B,GAAI,kBAAO;AAAA,IAC7D,4CAAC,UAAK,WAAW,OAAO,0BAA0B,GAAI,mBAAQ;AAAA,KAChE;AAEJ;",
6
- "names": []
7
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/creek-table/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAdaptiveToolBar.d.ts","sourceRoot":"","sources":["../../../src/creek-table/hooks/useAdaptiveToolBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAA+B,MAAM,OAAO,CAAC;AAGtE,eAAO,MAAM,kBAAkB,YAAa;IAC1C,YAAY,EAAE,iBAAiB,WAAW,GAAG,IAAI,CAAC,CAAC;IACnD,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;;CAoCA,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAutoWidthColumns.d.ts","sourceRoot":"","sources":["../../../src/creek-table/hooks/useAutoWidthColumns.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAGxD,OAAO,EAAE,SAAS,EAAwC,MAAM,OAAO,CAAC;AA4ExE,eAAO,MAAM,mBAAmB,0BACrB,WAAW,CAAC,EAAE,SAAS,CAAC,EAAE,GAAG,SAAS,YACrC,UAAU,cAAc,CAAC;aACvB,WAAW,CAAC,EAAE,SAAS,CAAC,EAAE,GAAG,SAAS;gBAAc,MAAM,GAAG,SAAS;CAiInF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useElementDistance.d.ts","sourceRoot":"","sources":["../../../src/creek-table/hooks/useElementDistance.tsx"],"names":[],"mappings":";AAGA,KAAK,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;AAO/C,UAAU,QAAQ;IAChB,CAAC,EAAE,MAAM,CAAC;CACX;AAeD,eAAO,MAAM,kBAAkB,wDAAuD,QAAQ,GAAG,IAoChG,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useTableScrollHeight.d.ts","sourceRoot":"","sources":["../../../src/creek-table/hooks/useTableScrollHeight.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,cAAe,MAAM,YAAY,MAAM,SAAS,CAAC,cAAc,CAAC,oBAAmB,OAAO,mBAAyB,MAAM,iBAAqB,MAAM,uBA2DpL,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/creek-table/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAGxD,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC,eAAO,MAAM,UAAU,0EAA2E,gBAAgB,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,4CAMjI,CAAC"}
@@ -1,5 +0,0 @@
1
- export declare const toolBarRender: (options: {
2
- shouldCollapse: boolean;
3
- restProps: any;
4
- args?: any[];
5
- }) => any;
@@ -1 +0,0 @@
1
- {"version":3,"file":"toolBarRender.d.ts","sourceRoot":"","sources":["../../src/creek-table/toolBarRender.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,YAAa;IAAE,cAAc,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,GAAG,CAAC;IAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;CAAE,QAwB/F,CAAC"}
@@ -1,58 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/creek-table/toolBarRender.tsx
20
- var toolBarRender_exports = {};
21
- __export(toolBarRender_exports, {
22
- toolBarRender: () => toolBarRender
23
- });
24
- module.exports = __toCommonJS(toolBarRender_exports);
25
- var import_icons = require("@ant-design/icons");
26
- var import_antd = require("antd");
27
- var import_jsx_runtime = require("react/jsx-runtime");
28
- var toolBarRender = (options) => {
29
- var _a;
30
- const { shouldCollapse, restProps, args = [] } = options;
31
- const baseActions = ((_a = restProps.toolBarRender) == null ? void 0 : _a.call(restProps, ...args)) || [];
32
- if (!shouldCollapse || baseActions.length <= 1) {
33
- return baseActions;
34
- }
35
- const [first, ...rest] = baseActions;
36
- return [
37
- first,
38
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
39
- import_antd.Dropdown,
40
- {
41
- menu: {
42
- items: rest.map((item, index) => ({ key: index, label: item }))
43
- },
44
- trigger: ["click"],
45
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Button, { children: [
46
- "更多 ",
47
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.DownOutlined, {})
48
- ] })
49
- },
50
- "more"
51
- )
52
- ];
53
- };
54
- // Annotate the CommonJS export names for ESM import in node:
55
- 0 && (module.exports = {
56
- toolBarRender
57
- });
58
- //# sourceMappingURL=toolBarRender.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/creek-table/toolBarRender.tsx"],
4
- "sourcesContent": ["import { DownOutlined } from '@ant-design/icons';\nimport { Button, Dropdown } from 'antd';\n\nexport const toolBarRender = (options: { shouldCollapse: boolean; restProps: any; args?: any[] }) => {\n const { shouldCollapse, restProps, args = [] } = options;\n\n const baseActions = restProps.toolBarRender?.(...args) || [];\n if (!shouldCollapse || baseActions.length <= 1) {\n return baseActions;\n }\n\n const [first, ...rest] = baseActions;\n\n return [\n first,\n <Dropdown\n key=\"more\"\n menu={{\n items: rest.map((item: React.ReactDOM, index: number) => ({ key: index, label: item })),\n }}\n trigger={['click']}\n >\n <Button>\n 更多 <DownOutlined />\n </Button>\n </Dropdown>,\n ];\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA6B;AAC7B,kBAAiC;AAqB3B;AAnBC,IAAM,gBAAgB,CAAC,YAAuE;AAHrG;AAIE,QAAM,EAAE,gBAAgB,WAAW,OAAO,CAAC,EAAE,IAAI;AAEjD,QAAM,gBAAc,eAAU,kBAAV,mCAA0B,GAAG,UAAS,CAAC;AAC3D,MAAI,CAAC,kBAAkB,YAAY,UAAU,GAAG;AAC9C,WAAO;AAAA,EACT;AAEA,QAAM,CAAC,OAAO,GAAG,IAAI,IAAI;AAEzB,SAAO;AAAA,IACL;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QAEC,MAAM;AAAA,UACJ,OAAO,KAAK,IAAI,CAAC,MAAsB,WAAmB,EAAE,KAAK,OAAO,OAAO,KAAK,EAAE;AAAA,QACxF;AAAA,QACA,SAAS,CAAC,OAAO;AAAA,QAEjB,uDAAC,sBAAO;AAAA;AAAA,UACH,4CAAC,6BAAa;AAAA,WACnB;AAAA;AAAA,MARI;AAAA,IASN;AAAA,EACF;AACF;",
6
- "names": []
7
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/creek-table/type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEvE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,UAAU,EAAE,CAAC,SAAS,UAAU,EAAE,SAAS,GAAG,MAAM,IAAI,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,EAAG,SAAS,CAAC,GAAG;IAC/I,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qBAAqB,CAAC,EAAE;QACtB,+BAA+B;QAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,OAAO,CAAC,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC,SAAS,CAAC,GAAG;QACpD,YAAY,CAAC,EAAE,kBAAkB,CAAC;QAClC,YAAY,CAAC,EAAE,kBAAkB,CAAC;KACnC,CAAC;IAEF,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
@@ -1,57 +0,0 @@
1
- import { ExportOutlined, ImportOutlined } from '@ant-design/icons';
2
- import { ParamsType } from '@ant-design/pro-components';
3
- import { Space, Tooltip } from 'antd';
4
- import { createStyles } from 'antd-style';
5
-
6
- import { OptionRenderCustom } from './type';
7
-
8
- const useStyles = createStyles(({ prefixCls, token }) => {
9
- return {
10
- 'table-option-render-item': {
11
- border: `1px solid ${token.colorBorder}`,
12
- borderRadius: token.borderRadius,
13
- padding: '8px',
14
- cursor: 'pointer',
15
- },
16
- };
17
- });
18
-
19
- export type TableOptionRenderProps<T extends ParamsType, U extends ParamsType, ValueType = 'text'> = {
20
- defaultDom?: React.ReactNode[];
21
- importConfig?: OptionRenderCustom;
22
- exportConfig?: OptionRenderCustom;
23
- };
24
-
25
- export const TableOptionRender = <T extends ParamsType, U extends ParamsType, ValueType = 'text'>(props: TableOptionRenderProps<T, U, ValueType>) => {
26
- const { defaultDom, importConfig, exportConfig } = props;
27
-
28
- const { styles } = useStyles();
29
-
30
- const [reload, dis, setting] = defaultDom || [];
31
- return (
32
- <Space size={8}>
33
- {importConfig && (
34
- <span
35
- className={styles['table-option-render-item']}
36
- onClick={() => {
37
- importConfig.onClick?.();
38
- }}
39
- >
40
- <Tooltip title={importConfig.text || '导入'}>{importConfig.icon || <ImportOutlined />}</Tooltip>
41
- </span>
42
- )}
43
- {exportConfig && (
44
- <span
45
- className={styles['table-option-render-item']}
46
- onClick={() => {
47
- exportConfig.onClick?.();
48
- }}
49
- >
50
- <Tooltip title={exportConfig.text || '导出'}>{exportConfig.icon || <ExportOutlined />}</Tooltip>
51
- </span>
52
- )}
53
- <span className={styles['table-option-render-item']}>{reload}</span>
54
- <span className={styles['table-option-render-item']}>{setting}</span>
55
- </Space>
56
- );
57
- };
@@ -1,28 +0,0 @@
1
- import { DownOutlined } from '@ant-design/icons';
2
- import { Button, Dropdown } from 'antd';
3
-
4
- export const toolBarRender = (options: { shouldCollapse: boolean; restProps: any; args?: any[] }) => {
5
- const { shouldCollapse, restProps, args = [] } = options;
6
-
7
- const baseActions = restProps.toolBarRender?.(...args) || [];
8
- if (!shouldCollapse || baseActions.length <= 1) {
9
- return baseActions;
10
- }
11
-
12
- const [first, ...rest] = baseActions;
13
-
14
- return [
15
- first,
16
- <Dropdown
17
- key="more"
18
- menu={{
19
- items: rest.map((item: React.ReactDOM, index: number) => ({ key: index, label: item })),
20
- }}
21
- trigger={['click']}
22
- >
23
- <Button>
24
- 更多 <DownOutlined />
25
- </Button>
26
- </Dropdown>,
27
- ];
28
- };