@creekjs/web-components 1.0.2 → 1.0.4

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 (154) hide show
  1. package/.fatherrc.ts +1 -5
  2. package/.turbo/turbo-father$colon$build.log +39 -0
  3. package/.turbo/turbo-father$colon$dev.log +33 -0
  4. package/dist/creek-config-provider/CreekConfigContext.js +31 -2
  5. package/dist/creek-config-provider/CreekConfigContext.js.map +7 -0
  6. package/dist/creek-config-provider/index.js +35 -13
  7. package/dist/creek-config-provider/index.js.map +7 -0
  8. package/dist/creek-hooks/index.d.ts +1 -0
  9. package/dist/creek-hooks/index.js +26 -1
  10. package/dist/creek-hooks/index.js.map +7 -0
  11. package/dist/creek-hooks/useApp/DrawerHelper.d.ts +9 -0
  12. package/dist/creek-hooks/useApp/DrawerHelper.js +62 -0
  13. package/dist/creek-hooks/useApp/DrawerHelper.js.map +7 -0
  14. package/dist/creek-hooks/useApp/ModalHelper.d.ts +9 -0
  15. package/dist/creek-hooks/useApp/ModalHelper.js +62 -0
  16. package/dist/creek-hooks/useApp/ModalHelper.js.map +7 -0
  17. package/dist/creek-hooks/useApp/index.d.ts +25 -0
  18. package/dist/creek-hooks/useApp/index.js +118 -0
  19. package/dist/creek-hooks/useApp/index.js.map +7 -0
  20. package/dist/creek-hooks/useApp/types.d.ts +26 -0
  21. package/dist/creek-hooks/useApp/types.js +18 -0
  22. package/dist/creek-hooks/useApp/types.js.map +7 -0
  23. package/dist/creek-hooks/useViewportHeight.js +99 -97
  24. package/dist/creek-hooks/useViewportHeight.js.map +7 -0
  25. package/dist/creek-icon/index.js +53 -31
  26. package/dist/creek-icon/index.js.map +7 -0
  27. package/dist/creek-keep-alive/index.js +36 -18
  28. package/dist/creek-keep-alive/index.js.map +7 -0
  29. package/dist/creek-layout/CollapseButton.js +69 -47
  30. package/dist/creek-layout/CollapseButton.js.map +7 -0
  31. package/dist/creek-layout/Exception/NotFound.js +42 -13
  32. package/dist/creek-layout/Exception/NotFound.js.map +7 -0
  33. package/dist/creek-layout/Exception/NotFoundPage.js +30 -5
  34. package/dist/creek-layout/Exception/NotFoundPage.js.map +7 -0
  35. package/dist/creek-layout/Exception/index.js +37 -8
  36. package/dist/creek-layout/Exception/index.js.map +7 -0
  37. package/dist/creek-layout/HeaderContent/FullScreen.js +45 -39
  38. package/dist/creek-layout/HeaderContent/FullScreen.js.map +7 -0
  39. package/dist/creek-layout/HeaderContent/UserInfo.js +75 -53
  40. package/dist/creek-layout/HeaderContent/UserInfo.js.map +7 -0
  41. package/dist/creek-layout/HeaderContent/index.js +48 -28
  42. package/dist/creek-layout/HeaderContent/index.js.map +7 -0
  43. package/dist/creek-layout/index.js +117 -81
  44. package/dist/creek-layout/index.js.map +7 -0
  45. package/dist/creek-loading/index.js +55 -48
  46. package/dist/creek-loading/index.js.map +7 -0
  47. package/dist/creek-table/SearchTable.js +118 -114
  48. package/dist/creek-table/SearchTable.js.map +7 -0
  49. package/dist/creek-table/TableOptionRender.js +69 -60
  50. package/dist/creek-table/TableOptionRender.js.map +7 -0
  51. package/dist/creek-table/hooks/index.d.ts +2 -1
  52. package/dist/creek-table/hooks/index.js +30 -3
  53. package/dist/creek-table/hooks/index.js.map +7 -0
  54. package/dist/creek-table/hooks/useAdaptiveToolBar.js +48 -36
  55. package/dist/creek-table/hooks/useAdaptiveToolBar.js.map +7 -0
  56. package/dist/creek-table/hooks/useAutoWidthColumns.d.ts +6 -0
  57. package/dist/creek-table/hooks/useAutoWidthColumns.js +187 -0
  58. package/dist/creek-table/hooks/useAutoWidthColumns.js.map +7 -0
  59. package/dist/creek-table/hooks/useElementDistance.js +51 -39
  60. package/dist/creek-table/hooks/useElementDistance.js.map +7 -0
  61. package/dist/creek-table/hooks/useTableScrollHeight.d.ts +1 -0
  62. package/dist/creek-table/hooks/useTableScrollHeight.js +72 -0
  63. package/dist/creek-table/hooks/useTableScrollHeight.js.map +7 -0
  64. package/dist/creek-table/index.js +35 -25
  65. package/dist/creek-table/index.js.map +7 -0
  66. package/dist/creek-table/toolBarRender.d.ts +1 -0
  67. package/dist/creek-table/toolBarRender.js +55 -33
  68. package/dist/creek-table/toolBarRender.js.map +7 -0
  69. package/dist/creek-table/type.d.ts +1 -1
  70. package/dist/creek-table/type.js +18 -1
  71. package/dist/creek-table/type.js.map +7 -0
  72. package/dist/index.d.ts +1 -2
  73. package/dist/index.js +34 -7
  74. package/dist/index.js.map +7 -0
  75. package/package.json +2 -2
  76. package/src/creek-hooks/index.ts +2 -0
  77. package/src/creek-hooks/useApp/DrawerHelper.tsx +43 -0
  78. package/src/creek-hooks/useApp/ModalHelper.tsx +43 -0
  79. package/src/creek-hooks/useApp/index.tsx +119 -0
  80. package/src/creek-hooks/useApp/types.ts +25 -0
  81. package/src/creek-hooks/useViewportHeight.tsx +34 -5
  82. package/src/creek-layout/index.tsx +2 -2
  83. package/src/creek-table/SearchTable.tsx +69 -77
  84. package/src/creek-table/hooks/index.ts +3 -1
  85. package/src/creek-table/hooks/useAutoWidthColumns.tsx +212 -0
  86. package/src/creek-table/hooks/useTableScrollHeight.tsx +63 -0
  87. package/src/creek-table/index.tsx +2 -6
  88. package/src/creek-table/toolBarRender.tsx +3 -3
  89. package/src/creek-table/type.ts +1 -1
  90. package/src/index.tsx +2 -2
  91. package/dist/bg-center/index.d.ts +0 -5
  92. package/dist/bg-center/index.d.ts.map +0 -1
  93. package/dist/bg-center/index.js +0 -28
  94. package/dist/creek-config-provider/CreekConfigContext.d.ts.map +0 -1
  95. package/dist/creek-config-provider/index.d.ts.map +0 -1
  96. package/dist/creek-hooks/index.d.ts.map +0 -1
  97. package/dist/creek-hooks/useViewportHeight.d.ts.map +0 -1
  98. package/dist/creek-icon/index.d.ts.map +0 -1
  99. package/dist/creek-keep-alive/index.d.ts.map +0 -1
  100. package/dist/creek-layout/CollapseButton.d.ts.map +0 -1
  101. package/dist/creek-layout/Exception/NotFound.d.ts.map +0 -1
  102. package/dist/creek-layout/Exception/NotFoundPage.d.ts.map +0 -1
  103. package/dist/creek-layout/Exception/index.d.ts.map +0 -1
  104. package/dist/creek-layout/HeaderContent/FullScreen.d.ts.map +0 -1
  105. package/dist/creek-layout/HeaderContent/UserInfo.d.ts.map +0 -1
  106. package/dist/creek-layout/HeaderContent/index.d.ts.map +0 -1
  107. package/dist/creek-layout/index.d.ts.map +0 -1
  108. package/dist/creek-loading/index.d.ts.map +0 -1
  109. package/dist/creek-search/CreekSearch.d.ts +0 -7
  110. package/dist/creek-search/CreekSearch.d.ts.map +0 -1
  111. package/dist/creek-search/CreekSearch.js +0 -51
  112. package/dist/creek-search/CreekSearchContext.d.ts +0 -54
  113. package/dist/creek-search/CreekSearchContext.d.ts.map +0 -1
  114. package/dist/creek-search/CreekSearchContext.js +0 -546
  115. package/dist/creek-search/CreekSearchFilterDisplay.d.ts +0 -5
  116. package/dist/creek-search/CreekSearchFilterDisplay.d.ts.map +0 -1
  117. package/dist/creek-search/CreekSearchFilterDisplay.js +0 -97
  118. package/dist/creek-search/CreekSearchInput.d.ts +0 -4
  119. package/dist/creek-search/CreekSearchInput.d.ts.map +0 -1
  120. package/dist/creek-search/CreekSearchInput.js +0 -96
  121. package/dist/creek-search/CreekSearchValueSelector.d.ts +0 -5
  122. package/dist/creek-search/CreekSearchValueSelector.d.ts.map +0 -1
  123. package/dist/creek-search/CreekSearchValueSelector.js +0 -422
  124. package/dist/creek-search/index.d.ts +0 -5
  125. package/dist/creek-search/index.d.ts.map +0 -1
  126. package/dist/creek-search/index.js +0 -5
  127. package/dist/creek-search/type.d.ts +0 -8
  128. package/dist/creek-search/type.d.ts.map +0 -1
  129. package/dist/creek-search/type.js +0 -1
  130. package/dist/creek-table/SearchTable.d.ts.map +0 -1
  131. package/dist/creek-table/TableOptionRender.d.ts.map +0 -1
  132. package/dist/creek-table/TableViewContent.d.ts +0 -4
  133. package/dist/creek-table/TableViewContent.d.ts.map +0 -1
  134. package/dist/creek-table/TableViewContent.js +0 -47
  135. package/dist/creek-table/hooks/index.d.ts.map +0 -1
  136. package/dist/creek-table/hooks/useAdaptiveToolBar.d.ts.map +0 -1
  137. package/dist/creek-table/hooks/useAutoAddFilterToColumns.d.ts +0 -12
  138. package/dist/creek-table/hooks/useAutoAddFilterToColumns.d.ts.map +0 -1
  139. package/dist/creek-table/hooks/useAutoAddFilterToColumns.js +0 -96
  140. package/dist/creek-table/hooks/useElementDistance.d.ts.map +0 -1
  141. package/dist/creek-table/index.d.ts.map +0 -1
  142. package/dist/creek-table/toolBarRender.d.ts.map +0 -1
  143. package/dist/creek-table/type.d.ts.map +0 -1
  144. package/dist/index.d.ts.map +0 -1
  145. package/src/bg-center/index.tsx +0 -26
  146. package/src/creek-search/CreekSearch.tsx +0 -60
  147. package/src/creek-search/CreekSearchContext.tsx +0 -593
  148. package/src/creek-search/CreekSearchFilterDisplay.tsx +0 -84
  149. package/src/creek-search/CreekSearchInput.tsx +0 -75
  150. package/src/creek-search/CreekSearchValueSelector.tsx +0 -324
  151. package/src/creek-search/index.tsx +0 -5
  152. package/src/creek-search/type.ts +0 -9
  153. package/src/creek-table/TableViewContent.tsx +0 -46
  154. package/src/creek-table/hooks/useAutoAddFilterToColumns.tsx +0 -90
@@ -1,96 +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
- 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; }
3
- 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; }
4
- 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; }
5
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
- 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); }
7
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
- import { useMemoizedFn, useSafeState } from 'ahooks';
14
- import { useMemo } from 'react';
15
- import { CreekSearchValueSelector, useSearchContext } from "../../creek-search";
16
- import { jsx as _jsx } from "react/jsx-runtime";
17
- export var useAutoAddFilterToColumns = function useAutoAddFilterToColumns(_ref) {
18
- var columns = _ref.columns,
19
- autoAddFilterForColumn = _ref.autoAddFilterForColumn;
20
- var _useSearchContext = useSearchContext(),
21
- hasOptions = _useSearchContext.hasOptions,
22
- setSelectedColumn = _useSearchContext.setSelectedColumn,
23
- filters = _useSearchContext.filters,
24
- filterOptions = _useSearchContext.filterOptions;
25
-
26
- // 管理每列的下拉框状态
27
- var _useSafeState = useSafeState({}),
28
- _useSafeState2 = _slicedToArray(_useSafeState, 2),
29
- filterOpenMap = _useSafeState2[0],
30
- setFilterOpenMap = _useSafeState2[1];
31
-
32
- // 获取列的唯一标识
33
- var getColumnKey = useMemoizedFn(function (column) {
34
- return column.dataIndex;
35
- });
36
-
37
- // 控制特定列的下拉框开关
38
- var setColumnFilterOpen = useMemoizedFn(function (columnKey, open) {
39
- setFilterOpenMap(function (prev) {
40
- return _objectSpread(_objectSpread({}, prev), {}, _defineProperty({}, columnKey, open));
41
- });
42
- });
43
-
44
- // 关闭特定列的下拉框
45
- var closeColumnFilter = useMemoizedFn(function (columnKey) {
46
- setFilterOpenMap(function (prev) {
47
- return _objectSpread(_objectSpread({}, prev), {}, _defineProperty({}, columnKey, false));
48
- });
49
- });
50
-
51
- // 自动为列添加筛选功能
52
- var autoAddFilterToColumns = useMemoizedFn(function () {
53
- var columns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
54
- return columns.map(function (column) {
55
- if (hasOptions(column) && filterOptions !== null && filterOptions !== void 0 && filterOptions.map(function (item) {
56
- return item.dataIndex;
57
- }).includes(column.dataIndex)) {
58
- var newColumn = _objectSpread({}, column);
59
- var columnKey = getColumnKey(newColumn);
60
- return _objectSpread(_objectSpread({}, newColumn), {}, {
61
- filters: (newColumn === null || newColumn === void 0 ? void 0 : newColumn.filters) || true,
62
- onFilter: (newColumn === null || newColumn === void 0 ? void 0 : newColumn.onFilter) || false,
63
- filtered: filters.map(function (item) {
64
- return item.dataIndex;
65
- }).includes(columnKey),
66
- filterDropdown: /*#__PURE__*/_jsx(CreekSearchValueSelector, {
67
- onConfirm: function onConfirm() {
68
- // 点击确认时关闭当前列的下拉框
69
- closeColumnFilter(columnKey);
70
- }
71
- }),
72
- filterDropdownProps: {
73
- open: filterOpenMap[columnKey] || false,
74
- onOpenChange: function onOpenChange(open) {
75
- if (open) {
76
- var selectedColumn = columns.find(function (item) {
77
- return item.dataIndex === columnKey;
78
- });
79
- setSelectedColumn(selectedColumn);
80
- }
81
- setColumnFilterOpen(columnKey, open);
82
- }
83
- }
84
- });
85
- }
86
- return column;
87
- });
88
- });
89
- var columnsWithFilter = useMemo(function () {
90
- return autoAddFilterForColumn ? autoAddFilterToColumns(columns) : columns;
91
- }, [columns, filters, autoAddFilterToColumns, filterOpenMap]);
92
- return {
93
- columnsWithFilter: columnsWithFilter,
94
- getColumnKey: getColumnKey
95
- };
96
- };
@@ -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":"index.d.ts","sourceRoot":"","sources":["../../src/creek-table/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAKxD,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC,eAAO,MAAM,UAAU,0EAA2E,gBAAgB,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,4CAQjI,CAAC"}
@@ -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,CAAA;CAAE,QAwBjF,CAAC"}
@@ -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,EAAE,QAAQ,GAAG,SAAS,CAAC,GAAG;IACzJ,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":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
@@ -1,26 +0,0 @@
1
- import { createStyles } from 'antd-style';
2
-
3
- export type BgCenterProps = {
4
- children: React.ReactNode;
5
- };
6
-
7
- export const BgCenter = ({ children }: BgCenterProps) => {
8
- const useStyles = createStyles(({ token }) => ({
9
- bgCenterContianer: {
10
- display: 'flex',
11
- alignItems: 'center',
12
- justifyContent: 'center',
13
- position: 'fixed',
14
- top: 0,
15
- left: 0,
16
- right: 0,
17
- bottom: 0,
18
- backgroundColor: 'rgba(255, 255, 255, 0.7)',
19
- zIndex: token.zIndexBase,
20
- },
21
- }));
22
-
23
- const { styles } = useStyles();
24
-
25
- return <div className={styles.bgCenterContianer}>{children}</div>;
26
- };
@@ -1,60 +0,0 @@
1
- import { ParamsType, ProColumnType } from '@ant-design/pro-components';
2
- import { createStyles } from 'antd-style';
3
- import classnames from 'classnames';
4
-
5
- import { CreekSearchProvider } from './CreekSearchContext';
6
- import { CreekFilterDisplay } from './CreekSearchFilterDisplay';
7
- import { CreekSearchInput } from './CreekSearchInput';
8
-
9
- const useStyles = createStyles(
10
- (
11
- { token, prefixCls },
12
- props: {
13
- justify: 'start' | 'end';
14
- },
15
- ) => {
16
- return {
17
- creekSearchContainer: {
18
- padding: '20px 20px 0 20px',
19
- width: '100%',
20
- display: 'flex',
21
- flexDirection: 'column',
22
- alignItems: props.justify === 'end' ? 'flex-end' : 'flex-start',
23
- },
24
-
25
- creekSearchContainerEnd: {
26
- [`& .${prefixCls}-tag`]: {
27
- marginInlineEnd: 0,
28
- },
29
- },
30
-
31
- creekSearchFilterDisplay: {
32
- marginTop: '10px',
33
- },
34
- };
35
- },
36
- );
37
-
38
- export type CreekSearchProps<T> = {
39
- columns: ProColumnType<T>[];
40
- onSubmit?: (values: Record<string, any>) => void;
41
- justify?: 'start' | 'end';
42
- };
43
-
44
- export const CreekSearch = <T extends ParamsType>(props: CreekSearchProps<T>) => {
45
- const { columns = [], onSubmit, justify = 'start' } = props;
46
-
47
- const { styles } = useStyles({
48
- justify,
49
- });
50
-
51
-
52
- return (
53
- <CreekSearchProvider columns={columns} onSubmit={onSubmit}>
54
- <div className={classnames(styles.creekSearchContainer, justify === 'end' && styles.creekSearchContainerEnd)}>
55
- <CreekSearchInput />
56
- <CreekFilterDisplay className={styles.creekSearchFilterDisplay} />
57
- </div>
58
- </CreekSearchProvider>
59
- );
60
- };