@creekjs/web-components 1.0.2 → 1.0.3
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.
- package/.fatherrc.ts +1 -5
- package/.turbo/turbo-father$colon$build.log +5 -0
- package/.turbo/turbo-father$colon$dev.log +33 -0
- package/dist/creek-config-provider/CreekConfigContext.js +31 -2
- package/dist/creek-config-provider/CreekConfigContext.js.map +7 -0
- package/dist/creek-config-provider/index.js +35 -13
- package/dist/creek-config-provider/index.js.map +7 -0
- package/dist/creek-hooks/index.d.ts +1 -0
- package/dist/creek-hooks/index.js +26 -1
- package/dist/creek-hooks/index.js.map +7 -0
- package/dist/creek-hooks/useApp/DrawerHelper.d.ts +9 -0
- package/dist/creek-hooks/useApp/DrawerHelper.js +62 -0
- package/dist/creek-hooks/useApp/DrawerHelper.js.map +7 -0
- package/dist/creek-hooks/useApp/ModalHelper.d.ts +9 -0
- package/dist/creek-hooks/useApp/ModalHelper.js +62 -0
- package/dist/creek-hooks/useApp/ModalHelper.js.map +7 -0
- package/dist/creek-hooks/useApp/index.d.ts +25 -0
- package/dist/creek-hooks/useApp/index.js +118 -0
- package/dist/creek-hooks/useApp/index.js.map +7 -0
- package/dist/creek-hooks/useApp/types.d.ts +26 -0
- package/dist/creek-hooks/useApp/types.js +18 -0
- package/dist/creek-hooks/useApp/types.js.map +7 -0
- package/dist/creek-hooks/useViewportHeight.js +99 -97
- package/dist/creek-hooks/useViewportHeight.js.map +7 -0
- package/dist/creek-icon/index.js +53 -31
- package/dist/creek-icon/index.js.map +7 -0
- package/dist/creek-keep-alive/index.js +36 -18
- package/dist/creek-keep-alive/index.js.map +7 -0
- package/dist/creek-layout/CollapseButton.js +69 -47
- package/dist/creek-layout/CollapseButton.js.map +7 -0
- package/dist/creek-layout/Exception/NotFound.js +42 -13
- package/dist/creek-layout/Exception/NotFound.js.map +7 -0
- package/dist/creek-layout/Exception/NotFoundPage.js +30 -5
- package/dist/creek-layout/Exception/NotFoundPage.js.map +7 -0
- package/dist/creek-layout/Exception/index.js +37 -8
- package/dist/creek-layout/Exception/index.js.map +7 -0
- package/dist/creek-layout/HeaderContent/FullScreen.js +45 -39
- package/dist/creek-layout/HeaderContent/FullScreen.js.map +7 -0
- package/dist/creek-layout/HeaderContent/UserInfo.js +75 -53
- package/dist/creek-layout/HeaderContent/UserInfo.js.map +7 -0
- package/dist/creek-layout/HeaderContent/index.js +48 -28
- package/dist/creek-layout/HeaderContent/index.js.map +7 -0
- package/dist/creek-layout/index.js +117 -81
- package/dist/creek-layout/index.js.map +7 -0
- package/dist/creek-loading/index.js +55 -48
- package/dist/creek-loading/index.js.map +7 -0
- package/dist/creek-table/SearchTable.js +107 -116
- package/dist/creek-table/SearchTable.js.map +7 -0
- package/dist/creek-table/TableOptionRender.js +69 -60
- package/dist/creek-table/TableOptionRender.js.map +7 -0
- package/dist/creek-table/TableViewContent.js +59 -40
- package/dist/creek-table/TableViewContent.js.map +7 -0
- package/dist/creek-table/hooks/index.d.ts +1 -1
- package/dist/creek-table/hooks/index.js +28 -3
- package/dist/creek-table/hooks/index.js.map +7 -0
- package/dist/creek-table/hooks/useAdaptiveToolBar.js +48 -36
- package/dist/creek-table/hooks/useAdaptiveToolBar.js.map +7 -0
- package/dist/creek-table/hooks/useAutoWidthColumns.d.ts +6 -0
- package/dist/creek-table/hooks/useAutoWidthColumns.js +187 -0
- package/dist/creek-table/hooks/useAutoWidthColumns.js.map +7 -0
- package/dist/creek-table/hooks/useElementDistance.js +51 -39
- package/dist/creek-table/hooks/useElementDistance.js.map +7 -0
- package/dist/creek-table/index.js +35 -25
- package/dist/creek-table/index.js.map +7 -0
- package/dist/creek-table/toolBarRender.js +55 -33
- package/dist/creek-table/toolBarRender.js.map +7 -0
- package/dist/creek-table/type.d.ts +1 -1
- package/dist/creek-table/type.js +18 -1
- package/dist/creek-table/type.js.map +7 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.js +34 -7
- package/dist/index.js.map +7 -0
- package/package.json +2 -2
- package/src/creek-hooks/index.ts +2 -0
- package/src/creek-hooks/useApp/DrawerHelper.tsx +43 -0
- package/src/creek-hooks/useApp/ModalHelper.tsx +43 -0
- package/src/creek-hooks/useApp/index.tsx +119 -0
- package/src/creek-hooks/useApp/types.ts +25 -0
- package/src/creek-hooks/useViewportHeight.tsx +34 -5
- package/src/creek-table/SearchTable.tsx +16 -37
- package/src/creek-table/TableViewContent.tsx +21 -14
- package/src/creek-table/hooks/index.ts +1 -1
- package/src/creek-table/hooks/useAutoWidthColumns.tsx +212 -0
- package/src/creek-table/index.tsx +1 -5
- package/src/creek-table/type.ts +1 -1
- package/src/index.tsx +2 -2
- package/dist/bg-center/index.d.ts +0 -5
- package/dist/bg-center/index.d.ts.map +0 -1
- package/dist/bg-center/index.js +0 -28
- package/dist/creek-config-provider/CreekConfigContext.d.ts.map +0 -1
- package/dist/creek-config-provider/index.d.ts.map +0 -1
- package/dist/creek-hooks/index.d.ts.map +0 -1
- package/dist/creek-hooks/useViewportHeight.d.ts.map +0 -1
- package/dist/creek-icon/index.d.ts.map +0 -1
- package/dist/creek-keep-alive/index.d.ts.map +0 -1
- package/dist/creek-layout/CollapseButton.d.ts.map +0 -1
- package/dist/creek-layout/Exception/NotFound.d.ts.map +0 -1
- package/dist/creek-layout/Exception/NotFoundPage.d.ts.map +0 -1
- package/dist/creek-layout/Exception/index.d.ts.map +0 -1
- package/dist/creek-layout/HeaderContent/FullScreen.d.ts.map +0 -1
- package/dist/creek-layout/HeaderContent/UserInfo.d.ts.map +0 -1
- package/dist/creek-layout/HeaderContent/index.d.ts.map +0 -1
- package/dist/creek-layout/index.d.ts.map +0 -1
- package/dist/creek-loading/index.d.ts.map +0 -1
- package/dist/creek-search/CreekSearch.d.ts +0 -7
- package/dist/creek-search/CreekSearch.d.ts.map +0 -1
- package/dist/creek-search/CreekSearch.js +0 -51
- package/dist/creek-search/CreekSearchContext.d.ts +0 -54
- package/dist/creek-search/CreekSearchContext.d.ts.map +0 -1
- package/dist/creek-search/CreekSearchContext.js +0 -546
- package/dist/creek-search/CreekSearchFilterDisplay.d.ts +0 -5
- package/dist/creek-search/CreekSearchFilterDisplay.d.ts.map +0 -1
- package/dist/creek-search/CreekSearchFilterDisplay.js +0 -97
- package/dist/creek-search/CreekSearchInput.d.ts +0 -4
- package/dist/creek-search/CreekSearchInput.d.ts.map +0 -1
- package/dist/creek-search/CreekSearchInput.js +0 -96
- package/dist/creek-search/CreekSearchValueSelector.d.ts +0 -5
- package/dist/creek-search/CreekSearchValueSelector.d.ts.map +0 -1
- package/dist/creek-search/CreekSearchValueSelector.js +0 -422
- package/dist/creek-search/index.d.ts +0 -5
- package/dist/creek-search/index.d.ts.map +0 -1
- package/dist/creek-search/index.js +0 -5
- package/dist/creek-search/type.d.ts +0 -8
- package/dist/creek-search/type.d.ts.map +0 -1
- package/dist/creek-search/type.js +0 -1
- package/dist/creek-table/SearchTable.d.ts.map +0 -1
- package/dist/creek-table/TableOptionRender.d.ts.map +0 -1
- package/dist/creek-table/TableViewContent.d.ts.map +0 -1
- package/dist/creek-table/hooks/index.d.ts.map +0 -1
- package/dist/creek-table/hooks/useAdaptiveToolBar.d.ts.map +0 -1
- package/dist/creek-table/hooks/useAutoAddFilterToColumns.d.ts +0 -12
- package/dist/creek-table/hooks/useAutoAddFilterToColumns.d.ts.map +0 -1
- package/dist/creek-table/hooks/useAutoAddFilterToColumns.js +0 -96
- package/dist/creek-table/hooks/useElementDistance.d.ts.map +0 -1
- package/dist/creek-table/index.d.ts.map +0 -1
- package/dist/creek-table/toolBarRender.d.ts.map +0 -1
- package/dist/creek-table/type.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/src/bg-center/index.tsx +0 -26
- package/src/creek-search/CreekSearch.tsx +0 -60
- package/src/creek-search/CreekSearchContext.tsx +0 -593
- package/src/creek-search/CreekSearchFilterDisplay.tsx +0 -84
- package/src/creek-search/CreekSearchInput.tsx +0 -75
- package/src/creek-search/CreekSearchValueSelector.tsx +0 -324
- package/src/creek-search/index.tsx +0 -5
- package/src/creek-search/type.ts +0 -9
- package/src/creek-table/hooks/useAutoAddFilterToColumns.tsx +0 -90
|
@@ -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":"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":"FullScreen.d.ts","sourceRoot":"","sources":["../../../src/creek-layout/HeaderContent/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/HeaderContent/UserInfo.tsx"],"names":[],"mappings":"AAuBA,eAAO,MAAM,QAAQ,+CA8BpB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/creek-layout/HeaderContent/index.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,aAAa,+CAWzB,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,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,4CA4E7C,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,7 +0,0 @@
|
|
|
1
|
-
import { ParamsType, ProColumnType } from '@ant-design/pro-components';
|
|
2
|
-
export type CreekSearchProps<T> = {
|
|
3
|
-
columns: ProColumnType<T>[];
|
|
4
|
-
onSubmit?: (values: Record<string, any>) => void;
|
|
5
|
-
justify?: 'start' | 'end';
|
|
6
|
-
};
|
|
7
|
-
export declare const CreekSearch: <T extends ParamsType>(props: CreekSearchProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CreekSearch.d.ts","sourceRoot":"","sources":["../../src/creek-search/CreekSearch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAqCvE,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAChC,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;IACjD,OAAO,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,WAAW,gCAAiC,iBAAiB,CAAC,CAAC,4CAgB3E,CAAC"}
|
|
@@ -1,51 +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 _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; }
|
|
3
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
|
-
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); }
|
|
5
|
-
import { createStyles } from 'antd-style';
|
|
6
|
-
import classnames from 'classnames';
|
|
7
|
-
import { CreekSearchProvider } from "./CreekSearchContext";
|
|
8
|
-
import { CreekFilterDisplay } from "./CreekSearchFilterDisplay";
|
|
9
|
-
import { CreekSearchInput } from "./CreekSearchInput";
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
var useStyles = createStyles(function (_ref, props) {
|
|
13
|
-
var token = _ref.token,
|
|
14
|
-
prefixCls = _ref.prefixCls;
|
|
15
|
-
return {
|
|
16
|
-
creekSearchContainer: {
|
|
17
|
-
padding: '20px 20px 0 20px',
|
|
18
|
-
width: '100%',
|
|
19
|
-
display: 'flex',
|
|
20
|
-
flexDirection: 'column',
|
|
21
|
-
alignItems: props.justify === 'end' ? 'flex-end' : 'flex-start'
|
|
22
|
-
},
|
|
23
|
-
creekSearchContainerEnd: _defineProperty({}, "& .".concat(prefixCls, "-tag"), {
|
|
24
|
-
marginInlineEnd: 0
|
|
25
|
-
}),
|
|
26
|
-
creekSearchFilterDisplay: {
|
|
27
|
-
marginTop: '10px'
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
export var CreekSearch = function CreekSearch(props) {
|
|
32
|
-
var _props$columns = props.columns,
|
|
33
|
-
columns = _props$columns === void 0 ? [] : _props$columns,
|
|
34
|
-
onSubmit = props.onSubmit,
|
|
35
|
-
_props$justify = props.justify,
|
|
36
|
-
justify = _props$justify === void 0 ? 'start' : _props$justify;
|
|
37
|
-
var _useStyles = useStyles({
|
|
38
|
-
justify: justify
|
|
39
|
-
}),
|
|
40
|
-
styles = _useStyles.styles;
|
|
41
|
-
return /*#__PURE__*/_jsx(CreekSearchProvider, {
|
|
42
|
-
columns: columns,
|
|
43
|
-
onSubmit: onSubmit,
|
|
44
|
-
children: /*#__PURE__*/_jsxs("div", {
|
|
45
|
-
className: classnames(styles.creekSearchContainer, justify === 'end' && styles.creekSearchContainerEnd),
|
|
46
|
-
children: [/*#__PURE__*/_jsx(CreekSearchInput, {}), /*#__PURE__*/_jsx(CreekFilterDisplay, {
|
|
47
|
-
className: styles.creekSearchFilterDisplay
|
|
48
|
-
})]
|
|
49
|
-
})
|
|
50
|
-
});
|
|
51
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { ParamsType, ProColumnType, ProTableProps } from '@ant-design/pro-components';
|
|
2
|
-
import React, { ReactNode } from 'react';
|
|
3
|
-
import { CreekSearchAddFilterOption, CreekSearchFilter } from './type';
|
|
4
|
-
interface ValueTypeConfig {
|
|
5
|
-
showValueSelector: boolean;
|
|
6
|
-
dateFormat?: string;
|
|
7
|
-
isRange?: boolean;
|
|
8
|
-
isDateTime?: boolean;
|
|
9
|
-
displayName: string;
|
|
10
|
-
componentType: 'input' | 'select' | 'date' | 'dateRange' | 'time' | 'timeRange' | 'number' | 'switch' | 'radio' | 'checkbox';
|
|
11
|
-
}
|
|
12
|
-
export interface SearchContextValue<T extends ParamsType, U extends ParamsType, ValueType = 'text'> {
|
|
13
|
-
searchValue: string;
|
|
14
|
-
filters: CreekSearchFilter[];
|
|
15
|
-
showValueSelector: boolean;
|
|
16
|
-
selectedColumn: ProColumnType<T, U>;
|
|
17
|
-
tempValue: any;
|
|
18
|
-
inputRef: React.RefObject<any>;
|
|
19
|
-
columns: ProTableProps<T, U, ValueType>['columns'];
|
|
20
|
-
filterOptions: ProTableProps<T, U, ValueType>['columns'];
|
|
21
|
-
onSubmit?: (params: U) => void;
|
|
22
|
-
beforeSearchSubmit?: (params: Record<string, any>) => Record<string, any>;
|
|
23
|
-
setSearchValue: (value: string) => void;
|
|
24
|
-
setFilters: React.Dispatch<React.SetStateAction<CreekSearchFilter[]>>;
|
|
25
|
-
setShowValueSelector: (show: boolean) => void;
|
|
26
|
-
setSelectedColumn: (column: any) => void;
|
|
27
|
-
setTempValue: (value: any) => void;
|
|
28
|
-
handleSearch: (value: string) => void;
|
|
29
|
-
handleSelectColumn: (value: string) => void;
|
|
30
|
-
addFilter: (key: string, option: CreekSearchAddFilterOption) => void;
|
|
31
|
-
confirmAddFilter: () => void;
|
|
32
|
-
cancelValueSelector: () => void;
|
|
33
|
-
removeFilter: (filterId: string) => void;
|
|
34
|
-
handelRest: () => void;
|
|
35
|
-
getColumnOptions: (column: any) => Array<{
|
|
36
|
-
label: string;
|
|
37
|
-
value: string;
|
|
38
|
-
}>;
|
|
39
|
-
getDisplayText: (column: any, value: any) => any;
|
|
40
|
-
hasOptions: (column: any) => boolean;
|
|
41
|
-
filtersToParams: (filters: CreekSearchFilter[]) => ParamsType;
|
|
42
|
-
getValueTypeConfig: (valueType?: ProColumnType<T, U>['valueType']) => ValueTypeConfig;
|
|
43
|
-
formatDateValue: (value: any, config: ValueTypeConfig) => string | string[];
|
|
44
|
-
shouldShowValueSelector: (column: any) => boolean;
|
|
45
|
-
}
|
|
46
|
-
export declare const useSearchContext: <T extends ParamsType, U extends ParamsType, ValueType = "text">() => SearchContextValue<T, U, ValueType>;
|
|
47
|
-
interface CreekSearchProviderProps<T extends ParamsType, U extends ParamsType, ValueType = 'text'> {
|
|
48
|
-
columns: ProTableProps<T, U, ValueType>['columns'];
|
|
49
|
-
onSubmit?: (params: U) => void;
|
|
50
|
-
beforeSearchSubmit?: (params: Record<string, any>) => Record<string, any>;
|
|
51
|
-
children: ReactNode;
|
|
52
|
-
}
|
|
53
|
-
export declare const CreekSearchProvider: <T extends ParamsType, U extends ParamsType, ValueType = "text">({ columns, onSubmit, beforeSearchSubmit, children, }: CreekSearchProviderProps<T, U, ValueType>) => import("react/jsx-runtime").JSX.Element;
|
|
54
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CreekSearchContext.d.ts","sourceRoot":"","sources":["../../src/creek-search/CreekSearchContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAGtF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