@pisell/materials 6.8.17 → 6.8.19
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.js +15 -15
- package/build/lowcode/view.js +15 -15
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +8 -8
- package/es/components/pisellDataSourceContainer/components/ColumnsSetting/index.d.ts +7 -1
- package/es/components/pisellDataSourceContainer/components/ColumnsSetting/index.js +30 -3
- package/es/components/pisellDataSourceContainer/components/ColumnsSetting/utils.d.ts +22 -0
- package/es/components/pisellDataSourceContainer/components/ColumnsSetting/utils.js +117 -0
- package/es/components/pisellDataSourceContainer/components/Pagination/index.js +15 -11
- package/es/components/pisellDataSourceContainer/components/Table/index.d.ts +1 -0
- package/es/components/pisellDataSourceContainer/components/Table/index.js +5 -3
- package/es/components/pisellDataSourceContainer/components/Table/useColumns.d.ts +1 -0
- package/es/components/pisellDataSourceContainer/components/Table/useColumns.js +37 -15
- package/es/components/table/Table/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +8 -8
- package/lib/components/pisellDataSourceContainer/components/ColumnsSetting/index.d.ts +7 -1
- package/lib/components/pisellDataSourceContainer/components/ColumnsSetting/index.js +18 -2
- package/lib/components/pisellDataSourceContainer/components/ColumnsSetting/utils.d.ts +22 -0
- package/lib/components/pisellDataSourceContainer/components/ColumnsSetting/utils.js +121 -0
- package/lib/components/pisellDataSourceContainer/components/Pagination/index.js +18 -11
- package/lib/components/pisellDataSourceContainer/components/Table/index.d.ts +1 -0
- package/lib/components/pisellDataSourceContainer/components/Table/index.js +3 -1
- package/lib/components/pisellDataSourceContainer/components/Table/useColumns.d.ts +1 -0
- package/lib/components/pisellDataSourceContainer/components/Table/useColumns.js +25 -14
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/package.json +2 -2
|
@@ -54,7 +54,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
54
54
|
width: number;
|
|
55
55
|
align: "center" | "left" | "right";
|
|
56
56
|
fixed: false | "left" | "right";
|
|
57
|
-
type: "
|
|
57
|
+
type: "link" | "button";
|
|
58
58
|
items: OperationItem[];
|
|
59
59
|
} | undefined;
|
|
60
60
|
operationContent?: {
|
|
@@ -72,7 +72,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
72
72
|
useCustomAction: boolean;
|
|
73
73
|
actionType: string;
|
|
74
74
|
openMode: "modal" | "drawer";
|
|
75
|
-
openContentSize: "
|
|
75
|
+
openContentSize: "large" | "middle" | "small";
|
|
76
76
|
openTitle: string;
|
|
77
77
|
key: string;
|
|
78
78
|
} | undefined;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
declare const Subdomain: React.FC<import("antd").InputProps & {
|
|
3
3
|
onChange: (value: string) => void;
|
|
4
4
|
onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
5
|
-
rootDomain: "custom" | "
|
|
5
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
6
6
|
customDomain?: string | undefined;
|
|
7
7
|
value?: string | undefined;
|
|
8
8
|
tenantId: string;
|
|
@@ -19,7 +19,7 @@ declare const formFieldMap: {
|
|
|
19
19
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
20
20
|
onChange: (value: string) => void;
|
|
21
21
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
22
|
-
rootDomain: "custom" | "
|
|
22
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
23
23
|
customDomain?: string | undefined;
|
|
24
24
|
value?: string | undefined;
|
|
25
25
|
tenantId: string;
|
|
@@ -59,13 +59,11 @@ declare const formFieldMap: {
|
|
|
59
59
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
60
60
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
61
|
};
|
|
62
|
-
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("
|
|
62
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
|
|
63
63
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
64
64
|
} & {
|
|
65
65
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
66
|
-
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> |
|
|
67
|
-
onChange: (value: string) => void;
|
|
68
|
-
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
66
|
+
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
69
67
|
JSON: import("react").FC<any>;
|
|
70
68
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
71
69
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
@@ -78,14 +76,14 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
78
76
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
79
77
|
onChange: (value: string) => void;
|
|
80
78
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
81
|
-
rootDomain: "custom" | "
|
|
79
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
82
80
|
customDomain?: string | undefined;
|
|
83
81
|
value?: string | undefined;
|
|
84
82
|
tenantId: string;
|
|
85
83
|
name?: string | undefined;
|
|
86
84
|
fieldKey?: string | undefined;
|
|
87
85
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
88
|
-
}) |
|
|
86
|
+
}) | (import("react").FC<{}> & {
|
|
89
87
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
90
88
|
} & {
|
|
91
89
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -97,5 +95,7 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
97
95
|
extraParams?: Record<string, any> | undefined;
|
|
98
96
|
} & {
|
|
99
97
|
dataSource?: any;
|
|
100
|
-
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./
|
|
98
|
+
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
99
|
+
onChange: (value: string) => void;
|
|
100
|
+
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
101
101
|
export { getFieldComponent, formFieldMap };
|
|
@@ -6,6 +6,7 @@ export declare const COLUMNS_SHARED_STATE_KEYS: {
|
|
|
6
6
|
};
|
|
7
7
|
export interface ColumnsSettingProps {
|
|
8
8
|
scopeId?: string;
|
|
9
|
+
__id?: string;
|
|
9
10
|
}
|
|
10
11
|
export interface ColumnSettingItem {
|
|
11
12
|
key: string;
|
|
@@ -16,7 +17,12 @@ export interface ColumnSettingItem {
|
|
|
16
17
|
sortIndex?: number;
|
|
17
18
|
fixed?: 'left' | 'right' | boolean;
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
+
/**
|
|
21
|
+
* 暴露给父组件的 ref 方法
|
|
22
|
+
*/
|
|
23
|
+
export interface ColumnsSettingRef {
|
|
24
|
+
}
|
|
25
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<ColumnsSettingProps & DataSourceContainerContextType & React.RefAttributes<ColumnsSettingRef> & {
|
|
20
26
|
refId?: string | undefined;
|
|
21
27
|
}, "ref"> & React.RefAttributes<any>>;
|
|
22
28
|
export default _default;
|
|
@@ -4,9 +4,10 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
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; }
|
|
5
5
|
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; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import React, { forwardRef, useState, useEffect } from 'react';
|
|
7
|
+
import React, { forwardRef, useState, useEffect, useImperativeHandle } from 'react';
|
|
8
8
|
import withContainer from "../../utils/withContainer";
|
|
9
9
|
import ColumnsSetting from "../../../table/Actions/component/ColumnsSetting";
|
|
10
|
+
import { saveColumnSettingToLocal } from "./utils";
|
|
10
11
|
export var COLUMNS_SHARED_STATE_KEYS = {
|
|
11
12
|
columnsValue: function columnsValue(instanceId) {
|
|
12
13
|
return "".concat(instanceId, ":columns:value");
|
|
@@ -15,14 +16,23 @@ export var COLUMNS_SHARED_STATE_KEYS = {
|
|
|
15
16
|
return "".concat(instanceId, ":columns:change");
|
|
16
17
|
}
|
|
17
18
|
};
|
|
18
|
-
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 暴露给父组件的 ref 方法
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
var WithColumnsSetting = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
19
25
|
var refManager = props.refManager,
|
|
20
26
|
_props$scopeId = props.scopeId,
|
|
21
|
-
scopeId = _props$scopeId === void 0 ? 'table' : _props$scopeId
|
|
27
|
+
scopeId = _props$scopeId === void 0 ? 'table' : _props$scopeId,
|
|
28
|
+
__id = props.__id;
|
|
22
29
|
var _useState = useState([]),
|
|
23
30
|
_useState2 = _slicedToArray(_useState, 2),
|
|
24
31
|
value = _useState2[0],
|
|
25
32
|
setValue = _useState2[1];
|
|
33
|
+
useImperativeHandle(ref, function () {
|
|
34
|
+
return {};
|
|
35
|
+
}, []);
|
|
26
36
|
useEffect(function () {
|
|
27
37
|
var unsubscribe = refManager.subscribeSharedState(COLUMNS_SHARED_STATE_KEYS.columnsValue(scopeId), setValue);
|
|
28
38
|
return unsubscribe;
|
|
@@ -31,6 +41,23 @@ var WithColumnsSetting = /*#__PURE__*/forwardRef(function (props) {
|
|
|
31
41
|
var typedValue = newValue;
|
|
32
42
|
setValue(typedValue);
|
|
33
43
|
refManager.setSharedState(COLUMNS_SHARED_STATE_KEYS.columnsChange(scopeId), typedValue);
|
|
44
|
+
if (__id) {
|
|
45
|
+
saveColumnSettingToLocal({
|
|
46
|
+
componentId: __id,
|
|
47
|
+
columnSetting: typedValue.map(function (col, index) {
|
|
48
|
+
var _col$sortIndex;
|
|
49
|
+
return {
|
|
50
|
+
key: col.key,
|
|
51
|
+
dataIndex: col.dataIndex,
|
|
52
|
+
title: col.title,
|
|
53
|
+
titleString: col.titleString,
|
|
54
|
+
isShow: col.isShow,
|
|
55
|
+
sortIndex: (_col$sortIndex = col.sortIndex) !== null && _col$sortIndex !== void 0 ? _col$sortIndex : index,
|
|
56
|
+
fixed: col.fixed
|
|
57
|
+
};
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
}
|
|
34
61
|
};
|
|
35
62
|
return /*#__PURE__*/React.createElement(ColumnsSetting, {
|
|
36
63
|
value: value,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const saveColumnSettingToLocal: ({ componentId, columnSetting, }: {
|
|
3
|
+
componentId: string;
|
|
4
|
+
columnSetting: Array<{
|
|
5
|
+
key: string;
|
|
6
|
+
dataIndex: string;
|
|
7
|
+
title?: React.ReactNode;
|
|
8
|
+
titleString?: string;
|
|
9
|
+
isShow: boolean;
|
|
10
|
+
sortIndex?: number;
|
|
11
|
+
fixed?: 'left' | 'right' | boolean;
|
|
12
|
+
}>;
|
|
13
|
+
}) => void;
|
|
14
|
+
export declare const getColumnSettingFromLocal: (componentId?: string) => any;
|
|
15
|
+
export declare const mergeColumnSettingSimple: ({ columns, componentId, }: {
|
|
16
|
+
columns: Record<string, any>[];
|
|
17
|
+
componentId?: string | undefined;
|
|
18
|
+
}) => {
|
|
19
|
+
isShow: any;
|
|
20
|
+
sortIndex: any;
|
|
21
|
+
}[];
|
|
22
|
+
export declare const clearColumnSettingFromLocal: (componentId?: string) => void;
|
|
@@ -0,0 +1,117 @@
|
|
|
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
|
+
import { isJson } from '@pisell/utils';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 复制过来的功能
|
|
11
|
+
*/
|
|
12
|
+
var getTableKey = function getTableKey(componentId) {
|
|
13
|
+
// 兼容非浏览器环境(如SSR/测试)
|
|
14
|
+
if (typeof window === 'undefined' || typeof window.location === 'undefined') {
|
|
15
|
+
return "table-setting-".concat(componentId);
|
|
16
|
+
}
|
|
17
|
+
var _window$location = window.location,
|
|
18
|
+
pathname = _window$location.pathname,
|
|
19
|
+
search = _window$location.search;
|
|
20
|
+
var appendPath = pathname || '/';
|
|
21
|
+
|
|
22
|
+
// 仅用于读取 memory_key,其余查询参数忽略
|
|
23
|
+
var memoryKey = '';
|
|
24
|
+
try {
|
|
25
|
+
var params = new URLSearchParams(search || '');
|
|
26
|
+
var mk = params.get('memory_key');
|
|
27
|
+
if (mk && mk.trim() !== '') {
|
|
28
|
+
memoryKey = mk.trim();
|
|
29
|
+
}
|
|
30
|
+
} catch (e) {
|
|
31
|
+
// 忽略解析异常,降级为仅使用 pathname
|
|
32
|
+
}
|
|
33
|
+
var urlPart = memoryKey ? "".concat(appendPath, "#").concat(memoryKey) : appendPath;
|
|
34
|
+
return "table-setting-".concat(componentId, "-").concat(urlPart);
|
|
35
|
+
};
|
|
36
|
+
export var saveColumnSettingToLocal = function saveColumnSettingToLocal(_ref) {
|
|
37
|
+
var componentId = _ref.componentId,
|
|
38
|
+
columnSetting = _ref.columnSetting;
|
|
39
|
+
if (!componentId) return;
|
|
40
|
+
var storageKey = getTableKey(componentId);
|
|
41
|
+
var data = {
|
|
42
|
+
column_setting: columnSetting,
|
|
43
|
+
updatedAt: Date.now()
|
|
44
|
+
};
|
|
45
|
+
localStorage.setItem(storageKey, JSON.stringify(data));
|
|
46
|
+
};
|
|
47
|
+
export var getColumnSettingFromLocal = function getColumnSettingFromLocal(componentId) {
|
|
48
|
+
if (!componentId) return null;
|
|
49
|
+
var storageKey = getTableKey(componentId);
|
|
50
|
+
var originData = localStorage.getItem(storageKey);
|
|
51
|
+
if (originData && isJson(originData)) {
|
|
52
|
+
var data = JSON.parse(originData);
|
|
53
|
+
return data.column_setting;
|
|
54
|
+
}
|
|
55
|
+
return null;
|
|
56
|
+
};
|
|
57
|
+
export var mergeColumnSettingSimple = function mergeColumnSettingSimple(_ref2) {
|
|
58
|
+
var columns = _ref2.columns,
|
|
59
|
+
componentId = _ref2.componentId;
|
|
60
|
+
// 没有 componentId,直接返回默认配置
|
|
61
|
+
if (!componentId) {
|
|
62
|
+
return columns.map(function (item, index) {
|
|
63
|
+
var _item$isShow;
|
|
64
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
65
|
+
isShow: (_item$isShow = item.isShow) !== null && _item$isShow !== void 0 ? _item$isShow : true,
|
|
66
|
+
sortIndex: index
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// 从本地存储读取
|
|
72
|
+
var cachedColumns = getColumnSettingFromLocal(componentId);
|
|
73
|
+
if (!cachedColumns || !Array.isArray(cachedColumns)) {
|
|
74
|
+
return columns.map(function (item, index) {
|
|
75
|
+
var _item$isShow2;
|
|
76
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
77
|
+
isShow: (_item$isShow2 = item.isShow) !== null && _item$isShow2 !== void 0 ? _item$isShow2 : true,
|
|
78
|
+
sortIndex: index
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// 构建本地缓存的 Map(使用 dataIndex 作为 key)
|
|
84
|
+
var cachedMap = new Map(cachedColumns.map(function (item) {
|
|
85
|
+
return [item.dataIndex, item];
|
|
86
|
+
}));
|
|
87
|
+
|
|
88
|
+
// 合并配置:本地缓存优先
|
|
89
|
+
var mergedColumns = columns.map(function (item, index) {
|
|
90
|
+
var _item$isShow3;
|
|
91
|
+
var cached = cachedMap.get(item.dataIndex);
|
|
92
|
+
if (cached) {
|
|
93
|
+
var _cached$isShow, _cached$sortIndex;
|
|
94
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
95
|
+
isShow: (_cached$isShow = cached.isShow) !== null && _cached$isShow !== void 0 ? _cached$isShow : true,
|
|
96
|
+
sortIndex: (_cached$sortIndex = cached.sortIndex) !== null && _cached$sortIndex !== void 0 ? _cached$sortIndex : index
|
|
97
|
+
// 注意:fixed 等特殊字段不从缓存中覆盖,保持 props 传入的值
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
101
|
+
isShow: (_item$isShow3 = item.isShow) !== null && _item$isShow3 !== void 0 ? _item$isShow3 : true,
|
|
102
|
+
sortIndex: index
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
// 按 sortIndex 排序
|
|
107
|
+
mergedColumns.sort(function (a, b) {
|
|
108
|
+
var _a$sortIndex, _b$sortIndex;
|
|
109
|
+
return ((_a$sortIndex = a.sortIndex) !== null && _a$sortIndex !== void 0 ? _a$sortIndex : 0) - ((_b$sortIndex = b.sortIndex) !== null && _b$sortIndex !== void 0 ? _b$sortIndex : 0);
|
|
110
|
+
});
|
|
111
|
+
return mergedColumns;
|
|
112
|
+
};
|
|
113
|
+
export var clearColumnSettingFromLocal = function clearColumnSettingFromLocal(componentId) {
|
|
114
|
+
if (!componentId) return;
|
|
115
|
+
var storageKey = getTableKey(componentId);
|
|
116
|
+
localStorage.removeItem(storageKey);
|
|
117
|
+
};
|
|
@@ -2,7 +2,7 @@ var _excluded = ["serverActions", "refManager"];
|
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
-
import React, { forwardRef } from 'react';
|
|
5
|
+
import React, { forwardRef, useMemo } from 'react';
|
|
6
6
|
import Pagination from "../../../Pagination";
|
|
7
7
|
import withContainer from "../../utils/withContainer";
|
|
8
8
|
import { getText } from "../../../../locales";
|
|
@@ -12,19 +12,23 @@ var WithPagination = /*#__PURE__*/forwardRef(function (props) {
|
|
|
12
12
|
otherProps = _objectWithoutProperties(props, _excluded);
|
|
13
13
|
var pagination = listAction.pagination,
|
|
14
14
|
data = listAction.data;
|
|
15
|
+
|
|
16
|
+
/** 分页配置属性 */
|
|
17
|
+
var paginationProps = useMemo(function () {
|
|
18
|
+
return {
|
|
19
|
+
showTotal: function showTotal(total) {
|
|
20
|
+
return getText('table-pagination-total')((pagination === null || pagination === void 0 ? void 0 : pagination.pageNumber) || 1, Math.ceil(total / ((pagination === null || pagination === void 0 ? void 0 : pagination.pageSize) || 10)));
|
|
21
|
+
},
|
|
22
|
+
total: (data === null || data === void 0 ? void 0 : data.count) || 0,
|
|
23
|
+
current: (pagination === null || pagination === void 0 ? void 0 : pagination.pageNumber) || 1,
|
|
24
|
+
pageSize: (pagination === null || pagination === void 0 ? void 0 : pagination.pageSize) || 10,
|
|
25
|
+
onChange: listAction.onPageChange
|
|
26
|
+
};
|
|
27
|
+
}, [pagination === null || pagination === void 0 ? void 0 : pagination.pageNumber, pagination === null || pagination === void 0 ? void 0 : pagination.pageSize, data === null || data === void 0 ? void 0 : data.count, listAction.onPageChange]);
|
|
15
28
|
if (!pagination) {
|
|
16
29
|
console.error('分页功能未启用');
|
|
17
30
|
return null;
|
|
18
31
|
}
|
|
19
|
-
return /*#__PURE__*/React.createElement(Pagination, _extends({
|
|
20
|
-
showTotal: function showTotal(total) {
|
|
21
|
-
return getText('table-pagination-total')((pagination === null || pagination === void 0 ? void 0 : pagination.pageNumber) || 1, total);
|
|
22
|
-
}
|
|
23
|
-
}, otherProps, {
|
|
24
|
-
total: (data === null || data === void 0 ? void 0 : data.count) || 0,
|
|
25
|
-
current: (pagination === null || pagination === void 0 ? void 0 : pagination.pageNumber) || 1,
|
|
26
|
-
pageSize: (pagination === null || pagination === void 0 ? void 0 : pagination.pageSize) || 10,
|
|
27
|
-
onChange: listAction.onPageChange
|
|
28
|
-
}));
|
|
32
|
+
return /*#__PURE__*/React.createElement(Pagination, _extends({}, otherProps, paginationProps));
|
|
29
33
|
});
|
|
30
34
|
export default withContainer(WithPagination, 'pagination');
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { DataSourceContainerContextType } from '../../type';
|
|
3
3
|
declare const _default: React.ForwardRefExoticComponent<Omit<Partial<import("antd").TableProps<any>> & DataSourceContainerContextType & {
|
|
4
4
|
scopeId?: string | undefined;
|
|
5
|
+
__id?: string | undefined;
|
|
5
6
|
} & React.RefAttributes<unknown> & {
|
|
6
7
|
refId?: string | undefined;
|
|
7
8
|
}, "ref"> & React.RefAttributes<any>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["serverActions", "refManager", "columns", "scopeId"];
|
|
2
|
+
var _excluded = ["serverActions", "refManager", "columns", "scopeId", "__id"];
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -19,14 +19,16 @@ var WithTable = /*#__PURE__*/forwardRef(function (props) {
|
|
|
19
19
|
columns = props.columns,
|
|
20
20
|
_props$scopeId = props.scopeId,
|
|
21
21
|
scopeId = _props$scopeId === void 0 ? 'table' : _props$scopeId,
|
|
22
|
+
__id = props.__id,
|
|
22
23
|
otherProps = _objectWithoutProperties(props, _excluded);
|
|
23
24
|
var data = listAction.data,
|
|
24
25
|
loading = listAction.loading;
|
|
25
|
-
// 🔥 使用 useColumns hook
|
|
26
|
+
// 🔥 使用 useColumns hook 管理列状态(支持本地缓存)
|
|
26
27
|
var _useColumns = useColumns({
|
|
27
28
|
columns: columns || [],
|
|
28
29
|
scopeId: scopeId,
|
|
29
|
-
refManager: refManager
|
|
30
|
+
refManager: refManager,
|
|
31
|
+
__id: __id
|
|
30
32
|
}),
|
|
31
33
|
visibleColumns = _useColumns.visibleColumns;
|
|
32
34
|
return /*#__PURE__*/React.createElement(Table, _extends({}, otherProps, {
|
|
@@ -6,6 +6,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import { useState, useEffect, useMemo } from 'react';
|
|
8
8
|
import { COLUMNS_SHARED_STATE_KEYS } from "../ColumnsSetting";
|
|
9
|
+
import { mergeColumnSettingSimple } from "../ColumnsSetting/utils";
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* useColumns Hook 参数
|
|
@@ -14,7 +15,8 @@ import { COLUMNS_SHARED_STATE_KEYS } from "../ColumnsSetting";
|
|
|
14
15
|
var useColumns = function useColumns(params) {
|
|
15
16
|
var columns = params.columns,
|
|
16
17
|
scopeId = params.scopeId,
|
|
17
|
-
refManager = params.refManager
|
|
18
|
+
refManager = params.refManager,
|
|
19
|
+
__id = params.__id;
|
|
18
20
|
|
|
19
21
|
// 本地状态:存储列配置
|
|
20
22
|
var _useState = useState([]),
|
|
@@ -23,14 +25,30 @@ var useColumns = function useColumns(params) {
|
|
|
23
25
|
setColumnSettings = _useState2[1];
|
|
24
26
|
useEffect(function () {
|
|
25
27
|
if (!(columns !== null && columns !== void 0 && columns.length)) return;
|
|
26
|
-
|
|
28
|
+
|
|
29
|
+
// 🔄 合并本地缓存和默认配置
|
|
30
|
+
var mergedColumns = mergeColumnSettingSimple({
|
|
31
|
+
columns: columns.map(function (col, index) {
|
|
32
|
+
return {
|
|
33
|
+
key: col.key || col.dataIndex,
|
|
34
|
+
dataIndex: col.dataIndex,
|
|
35
|
+
title: col.title,
|
|
36
|
+
titleString: typeof col.title === 'string' ? col.title : col.dataIndex,
|
|
37
|
+
isShow: typeof col.isShow === 'boolean' ? col.isShow : true,
|
|
38
|
+
sortIndex: index,
|
|
39
|
+
fixed: col.fixed
|
|
40
|
+
};
|
|
41
|
+
}),
|
|
42
|
+
componentId: __id
|
|
43
|
+
});
|
|
44
|
+
var settings = mergedColumns.map(function (col) {
|
|
27
45
|
return {
|
|
28
|
-
key: col.key
|
|
46
|
+
key: col.key,
|
|
29
47
|
dataIndex: col.dataIndex,
|
|
30
48
|
title: col.title,
|
|
31
|
-
titleString:
|
|
32
|
-
isShow:
|
|
33
|
-
sortIndex:
|
|
49
|
+
titleString: col.titleString,
|
|
50
|
+
isShow: col.isShow,
|
|
51
|
+
sortIndex: col.sortIndex,
|
|
34
52
|
fixed: col.fixed
|
|
35
53
|
};
|
|
36
54
|
});
|
|
@@ -38,7 +56,7 @@ var useColumns = function useColumns(params) {
|
|
|
38
56
|
// 写入共享状态(使用统一的 key,供 ColumnsSetting 读取)
|
|
39
57
|
refManager.setSharedState(COLUMNS_SHARED_STATE_KEYS.columnsValue(scopeId), settings);
|
|
40
58
|
setColumnSettings(settings);
|
|
41
|
-
}, [columns, refManager, scopeId]);
|
|
59
|
+
}, [columns, refManager, scopeId, __id]);
|
|
42
60
|
|
|
43
61
|
/**
|
|
44
62
|
* 订阅:监听 ColumnsSetting 的修改
|
|
@@ -47,22 +65,26 @@ var useColumns = function useColumns(params) {
|
|
|
47
65
|
var unsubscribe = refManager.subscribeSharedState(COLUMNS_SHARED_STATE_KEYS.columnsChange(scopeId), setColumnSettings);
|
|
48
66
|
return unsubscribe;
|
|
49
67
|
}, [refManager, scopeId]);
|
|
50
|
-
|
|
51
|
-
if (!(columns !== null && columns !== void 0 && columns.length)) return
|
|
52
|
-
|
|
68
|
+
return useMemo(function () {
|
|
69
|
+
if (!(columns !== null && columns !== void 0 && columns.length)) return {
|
|
70
|
+
visibleColumns: []
|
|
71
|
+
};
|
|
72
|
+
if (!(columnSettings !== null && columnSettings !== void 0 && columnSettings.length)) return {
|
|
73
|
+
visibleColumns: columns
|
|
74
|
+
};
|
|
53
75
|
|
|
54
76
|
// 创建 dataIndex 到原始 column 的映射
|
|
55
77
|
var columnMap = new Map(columns.map(function (col) {
|
|
56
78
|
return [col.dataIndex, col];
|
|
57
79
|
}));
|
|
58
|
-
|
|
80
|
+
var visibleColumns = columnSettings.filter(function (setting) {
|
|
59
81
|
return setting.isShow;
|
|
60
82
|
}).map(function (setting) {
|
|
61
83
|
return columnMap.get(setting.dataIndex);
|
|
62
|
-
}).filter(Boolean);
|
|
84
|
+
}).filter(Boolean);
|
|
85
|
+
return {
|
|
86
|
+
visibleColumns: visibleColumns
|
|
87
|
+
};
|
|
63
88
|
}, [columns, columnSettings]);
|
|
64
|
-
return {
|
|
65
|
-
visibleColumns: visibleColumns
|
|
66
|
-
};
|
|
67
89
|
};
|
|
68
90
|
export default useColumns;
|
|
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
155
155
|
sort?: SortType | undefined;
|
|
156
156
|
mode: "" | "localStorage" | "remote";
|
|
157
157
|
currentViewMode: ModeType;
|
|
158
|
-
}) => ("filters" | "
|
|
158
|
+
}) => ("filters" | "filter_setting" | "order_by" | "group_by" | "column_setting" | "gallery_setting" | "view_mode")[];
|
|
159
159
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
160
160
|
export declare const stringify: (obj: Record<string, any>) => string;
|
|
161
161
|
export {};
|
|
@@ -54,7 +54,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
54
54
|
width: number;
|
|
55
55
|
align: "center" | "left" | "right";
|
|
56
56
|
fixed: false | "left" | "right";
|
|
57
|
-
type: "
|
|
57
|
+
type: "link" | "button";
|
|
58
58
|
items: OperationItem[];
|
|
59
59
|
} | undefined;
|
|
60
60
|
operationContent?: {
|
|
@@ -72,7 +72,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
72
72
|
useCustomAction: boolean;
|
|
73
73
|
actionType: string;
|
|
74
74
|
openMode: "modal" | "drawer";
|
|
75
|
-
openContentSize: "
|
|
75
|
+
openContentSize: "large" | "middle" | "small";
|
|
76
76
|
openTitle: string;
|
|
77
77
|
key: string;
|
|
78
78
|
} | undefined;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
declare const Subdomain: React.FC<import("antd").InputProps & {
|
|
3
3
|
onChange: (value: string) => void;
|
|
4
4
|
onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
5
|
-
rootDomain: "custom" | "
|
|
5
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
6
6
|
customDomain?: string | undefined;
|
|
7
7
|
value?: string | undefined;
|
|
8
8
|
tenantId: string;
|
|
@@ -19,7 +19,7 @@ declare const formFieldMap: {
|
|
|
19
19
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
20
20
|
onChange: (value: string) => void;
|
|
21
21
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
22
|
-
rootDomain: "custom" | "
|
|
22
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
23
23
|
customDomain?: string | undefined;
|
|
24
24
|
value?: string | undefined;
|
|
25
25
|
tenantId: string;
|
|
@@ -59,13 +59,11 @@ declare const formFieldMap: {
|
|
|
59
59
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
60
60
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
61
|
};
|
|
62
|
-
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("
|
|
62
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
|
|
63
63
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
64
64
|
} & {
|
|
65
65
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
66
|
-
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> |
|
|
67
|
-
onChange: (value: string) => void;
|
|
68
|
-
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
66
|
+
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
69
67
|
JSON: import("react").FC<any>;
|
|
70
68
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
71
69
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
@@ -78,14 +76,14 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
78
76
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
79
77
|
onChange: (value: string) => void;
|
|
80
78
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
81
|
-
rootDomain: "custom" | "
|
|
79
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
82
80
|
customDomain?: string | undefined;
|
|
83
81
|
value?: string | undefined;
|
|
84
82
|
tenantId: string;
|
|
85
83
|
name?: string | undefined;
|
|
86
84
|
fieldKey?: string | undefined;
|
|
87
85
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
88
|
-
}) |
|
|
86
|
+
}) | (import("react").FC<{}> & {
|
|
89
87
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
90
88
|
} & {
|
|
91
89
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -97,5 +95,7 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
97
95
|
extraParams?: Record<string, any> | undefined;
|
|
98
96
|
} & {
|
|
99
97
|
dataSource?: any;
|
|
100
|
-
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./
|
|
98
|
+
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
99
|
+
onChange: (value: string) => void;
|
|
100
|
+
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
101
101
|
export { getFieldComponent, formFieldMap };
|
|
@@ -6,6 +6,7 @@ export declare const COLUMNS_SHARED_STATE_KEYS: {
|
|
|
6
6
|
};
|
|
7
7
|
export interface ColumnsSettingProps {
|
|
8
8
|
scopeId?: string;
|
|
9
|
+
__id?: string;
|
|
9
10
|
}
|
|
10
11
|
export interface ColumnSettingItem {
|
|
11
12
|
key: string;
|
|
@@ -16,7 +17,12 @@ export interface ColumnSettingItem {
|
|
|
16
17
|
sortIndex?: number;
|
|
17
18
|
fixed?: 'left' | 'right' | boolean;
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
+
/**
|
|
21
|
+
* 暴露给父组件的 ref 方法
|
|
22
|
+
*/
|
|
23
|
+
export interface ColumnsSettingRef {
|
|
24
|
+
}
|
|
25
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<ColumnsSettingProps & DataSourceContainerContextType & React.RefAttributes<ColumnsSettingRef> & {
|
|
20
26
|
refId?: string | undefined;
|
|
21
27
|
}, "ref"> & React.RefAttributes<any>>;
|
|
22
28
|
export default _default;
|