@pisell/materials 1.0.317 → 1.0.318
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/meta.js +2 -2
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +2 -2
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +2 -2
- package/es/components/filter/components/FilterItem/index.js +5 -2
- package/es/components/filter/components/QuickFilter/index.js +2 -1
- package/es/components/filter/types.d.ts +1 -0
- package/es/components/sort/index.js +3 -1
- package/es/components/sort/index.less +3 -0
- package/es/components/sort/types.d.ts +1 -0
- package/es/components/table/Table/utils.d.ts +1 -1
- package/lib/components/filter/components/FilterItem/index.js +11 -2
- package/lib/components/filter/components/QuickFilter/index.js +2 -1
- package/lib/components/filter/types.d.ts +1 -0
- package/lib/components/sort/index.js +4 -9
- package/lib/components/sort/index.less +3 -0
- package/lib/components/sort/types.d.ts +1 -0
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lowcode/table/meta.ts +22 -0
- package/lowcode/table/snippets.ts +4 -0
- package/package.json +3 -3
|
@@ -7,7 +7,8 @@ var FilterItem = function FilterItem(props) {
|
|
|
7
7
|
var label = props.label,
|
|
8
8
|
type = props.type,
|
|
9
9
|
name = props.name,
|
|
10
|
-
other = props.other
|
|
10
|
+
other = props.other,
|
|
11
|
+
isHidden = props.isHidden;
|
|
11
12
|
var Com = useMemo(function () {
|
|
12
13
|
var _fieldMaps;
|
|
13
14
|
return (_fieldMaps = fieldMaps[type]) === null || _fieldMaps === void 0 ? void 0 : _fieldMaps.edit;
|
|
@@ -15,6 +16,8 @@ var FilterItem = function FilterItem(props) {
|
|
|
15
16
|
return /*#__PURE__*/React.createElement(Form.Item, _extends({
|
|
16
17
|
label: label,
|
|
17
18
|
name: name
|
|
18
|
-
}, (other === null || other === void 0 ? void 0 : other.formItemProps) || {}
|
|
19
|
+
}, (other === null || other === void 0 ? void 0 : other.formItemProps) || {}, {
|
|
20
|
+
hidden: !isHidden
|
|
21
|
+
}), /*#__PURE__*/React.createElement(Com, other));
|
|
19
22
|
};
|
|
20
23
|
export default FilterItem;
|
|
@@ -87,7 +87,9 @@ var Sort = function Sort(_ref2) {
|
|
|
87
87
|
key: d.name,
|
|
88
88
|
label: d.label,
|
|
89
89
|
children: sortChildrenMap[d.type](d.name, !!(d !== null && d !== void 0 && d.localFilter)),
|
|
90
|
-
popupClassName: "".concat(prefix, "sort-sub-menu-popup-wrap")
|
|
90
|
+
popupClassName: "".concat(prefix, "sort-sub-menu-popup-wrap"),
|
|
91
|
+
// 增加显示隐藏配置
|
|
92
|
+
className: "".concat(d.isHidden ? "" : "".concat(prefix, "sort-menu-wrap-hide"))
|
|
91
93
|
};
|
|
92
94
|
});
|
|
93
95
|
}, [list, localPagination]);
|
|
@@ -167,7 +167,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
167
167
|
sort?: SortType | undefined;
|
|
168
168
|
mode: "" | "localStorage" | "remote";
|
|
169
169
|
currentViewMode: ModeType;
|
|
170
|
-
}) => ("
|
|
170
|
+
}) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
|
|
171
171
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
172
172
|
export declare const stringify: (obj: Record<string, any>) => string;
|
|
173
173
|
export {};
|
|
@@ -37,11 +37,20 @@ var import_antd = require("antd");
|
|
|
37
37
|
var import_fields = require("../../../table/Table/fields");
|
|
38
38
|
var import_index = require("./index.less");
|
|
39
39
|
var FilterItem = (props) => {
|
|
40
|
-
const { label, type, name, other } = props;
|
|
40
|
+
const { label, type, name, other, isHidden } = props;
|
|
41
41
|
const Com = (0, import_react.useMemo)(() => {
|
|
42
42
|
var _a;
|
|
43
43
|
return (_a = import_fields.fieldMaps[type]) == null ? void 0 : _a.edit;
|
|
44
44
|
}, [type]);
|
|
45
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
45
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
46
|
+
import_antd.Form.Item,
|
|
47
|
+
{
|
|
48
|
+
label,
|
|
49
|
+
name,
|
|
50
|
+
...(other == null ? void 0 : other.formItemProps) || {},
|
|
51
|
+
hidden: !isHidden
|
|
52
|
+
},
|
|
53
|
+
/* @__PURE__ */ import_react.default.createElement(Com, { ...other })
|
|
54
|
+
);
|
|
46
55
|
};
|
|
47
56
|
var FilterItem_default = FilterItem;
|
|
@@ -102,7 +102,9 @@ var Sort = ({
|
|
|
102
102
|
key: d.name,
|
|
103
103
|
label: d.label,
|
|
104
104
|
children: sortChildrenMap[d.type](d.name, !!(d == null ? void 0 : d.localFilter)),
|
|
105
|
-
popupClassName: `${prefix}sort-sub-menu-popup-wrap
|
|
105
|
+
popupClassName: `${prefix}sort-sub-menu-popup-wrap`,
|
|
106
|
+
// 增加显示隐藏配置
|
|
107
|
+
className: `${d.isHidden ? "" : `${prefix}sort-menu-wrap-hide`}`
|
|
106
108
|
};
|
|
107
109
|
});
|
|
108
110
|
}, [list, localPagination]);
|
|
@@ -130,14 +132,7 @@ var Sort = ({
|
|
|
130
132
|
);
|
|
131
133
|
}, [button, style, value, isMobileBool]);
|
|
132
134
|
const content = (0, import_react.useMemo)(() => {
|
|
133
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
134
|
-
import_InlineMenu.default,
|
|
135
|
-
{
|
|
136
|
-
items: sortItems,
|
|
137
|
-
value: value || "",
|
|
138
|
-
onChange
|
|
139
|
-
}
|
|
140
|
-
);
|
|
135
|
+
return /* @__PURE__ */ import_react.default.createElement(import_InlineMenu.default, { items: sortItems, value: value || "", onChange });
|
|
141
136
|
}, [value, sortItems, onChange]);
|
|
142
137
|
if ((0, import_platform.isMobile)()) {
|
|
143
138
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -167,7 +167,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
167
167
|
sort?: SortType | undefined;
|
|
168
168
|
mode: "" | "localStorage" | "remote";
|
|
169
169
|
currentViewMode: ModeType;
|
|
170
|
-
}) => ("
|
|
170
|
+
}) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
|
|
171
171
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
172
172
|
export declare const stringify: (obj: Record<string, any>) => string;
|
|
173
173
|
export {};
|
package/lowcode/table/meta.ts
CHANGED
|
@@ -1810,6 +1810,16 @@ export default {
|
|
|
1810
1810
|
setter: "BoolSetter",
|
|
1811
1811
|
defaultValue: false,
|
|
1812
1812
|
},
|
|
1813
|
+
{
|
|
1814
|
+
name: "isHidden",
|
|
1815
|
+
title: {
|
|
1816
|
+
label: "是否隐藏",
|
|
1817
|
+
tip: "开启时,当前项展示, 关闭时,当前项隐藏",
|
|
1818
|
+
},
|
|
1819
|
+
propType: "bool",
|
|
1820
|
+
setter: "BoolSetter",
|
|
1821
|
+
defaultValue: true,
|
|
1822
|
+
},
|
|
1813
1823
|
{
|
|
1814
1824
|
name: "other",
|
|
1815
1825
|
title: {
|
|
@@ -1828,6 +1838,7 @@ export default {
|
|
|
1828
1838
|
key: "name",
|
|
1829
1839
|
columnKey: "",
|
|
1830
1840
|
isCustom: false,
|
|
1841
|
+
isHidden: true
|
|
1831
1842
|
},
|
|
1832
1843
|
},
|
|
1833
1844
|
},
|
|
@@ -1986,6 +1997,16 @@ export default {
|
|
|
1986
1997
|
return target.parent.getPropValue("isCustom");
|
|
1987
1998
|
},
|
|
1988
1999
|
},
|
|
2000
|
+
{
|
|
2001
|
+
name: "isHidden",
|
|
2002
|
+
title: {
|
|
2003
|
+
label: "是否隐藏",
|
|
2004
|
+
tip: "开启时,当前项展示, 关闭时,当前项隐藏",
|
|
2005
|
+
},
|
|
2006
|
+
propType: "bool",
|
|
2007
|
+
setter: "BoolSetter",
|
|
2008
|
+
defaultValue: true,
|
|
2009
|
+
},
|
|
1989
2010
|
{
|
|
1990
2011
|
name: "type",
|
|
1991
2012
|
title: { label: "字段类型", tip: "所排序的字段类型" },
|
|
@@ -2021,6 +2042,7 @@ export default {
|
|
|
2021
2042
|
type: "date",
|
|
2022
2043
|
columnKey: "",
|
|
2023
2044
|
isCustom: false,
|
|
2045
|
+
isHidden: true
|
|
2024
2046
|
},
|
|
2025
2047
|
},
|
|
2026
2048
|
},
|
|
@@ -330,12 +330,14 @@ export default [
|
|
|
330
330
|
type: "string",
|
|
331
331
|
columnKey: "name",
|
|
332
332
|
isCustom: false,
|
|
333
|
+
isHidden: true
|
|
333
334
|
},
|
|
334
335
|
{
|
|
335
336
|
label: "标题",
|
|
336
337
|
type: "number",
|
|
337
338
|
columnKey: "age",
|
|
338
339
|
isCustom: false,
|
|
340
|
+
isHidden: true
|
|
339
341
|
},
|
|
340
342
|
],
|
|
341
343
|
},
|
|
@@ -371,6 +373,7 @@ export default [
|
|
|
371
373
|
isCustom: false,
|
|
372
374
|
sort: true,
|
|
373
375
|
localFilter: true,
|
|
376
|
+
isHidden: true
|
|
374
377
|
},
|
|
375
378
|
{
|
|
376
379
|
label: "标题",
|
|
@@ -380,6 +383,7 @@ export default [
|
|
|
380
383
|
isCustom: false,
|
|
381
384
|
sort: true,
|
|
382
385
|
localFilter: true,
|
|
386
|
+
isHidden: true
|
|
383
387
|
},
|
|
384
388
|
],
|
|
385
389
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.318",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"react-virtualized-auto-sizer": "^1.0.20",
|
|
64
64
|
"crypto-js": "^4.2.0",
|
|
65
65
|
"@pisell/icon": "0.0.10",
|
|
66
|
-
"@pisell/
|
|
67
|
-
"@pisell/
|
|
66
|
+
"@pisell/utils": "1.0.27",
|
|
67
|
+
"@pisell/date-picker": "1.0.75"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"react": "^18.0.0",
|