@pisell/materials 2.2.3 → 2.2.5
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 +2 -2
- package/build/lowcode/preview.js +4 -4
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +8 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +6 -6
- package/es/components/MultipleContainersSortList/index.d.ts +5 -5
- package/es/components/MultipleContainersSortList/index.js +10 -10
- 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/Actions/component/ExportImport/index.js +9 -5
- package/es/components/table/Actions/component/Group/PopoverContent.d.ts +2 -2
- package/es/components/table/Actions/component/Group/PopoverContent.js +11 -7
- package/es/components/table/index.d.ts +2 -2
- package/es/components/table/index.js +27 -25
- package/es/components/table/types.d.ts +6 -1
- package/es/components/virtual-keyboard/Time/index.js +1 -1
- package/lib/components/MultipleContainersSortList/index.d.ts +5 -5
- package/lib/components/MultipleContainersSortList/index.js +16 -11
- 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/Actions/component/ExportImport/index.js +9 -6
- package/lib/components/table/Actions/component/Group/PopoverContent.d.ts +2 -2
- package/lib/components/table/Actions/component/Group/PopoverContent.js +2 -1
- package/lib/components/table/index.d.ts +2 -2
- package/lib/components/table/index.js +4 -2
- package/lib/components/table/types.d.ts +6 -1
- package/lib/components/virtual-keyboard/Time/index.js +1 -1
- package/lowcode/table/meta.ts +42 -0
- package/lowcode/table/snippets.ts +6 -0
- package/package.json +1 -1
|
@@ -48,6 +48,7 @@ var import_function = require("./components/ExportTable/function");
|
|
|
48
48
|
var import_ImportLog = __toESM(require("./components/ImportLog"));
|
|
49
49
|
var import_ImportTable = __toESM(require("./components/ImportTable"));
|
|
50
50
|
var import_hooks = require("../../../../../hooks");
|
|
51
|
+
var import_locale = require("../../../../../utils/locale");
|
|
51
52
|
var import_model = require("../../../model");
|
|
52
53
|
var import_index = require("./index.less");
|
|
53
54
|
var Com = {
|
|
@@ -57,6 +58,7 @@ var Com = {
|
|
|
57
58
|
import_log: import_ImportLog.default
|
|
58
59
|
};
|
|
59
60
|
var ExportImport = ({ exportImport }) => {
|
|
61
|
+
var _a, _b;
|
|
60
62
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
61
63
|
const [file, setFile] = (0, import_react.useState)(null);
|
|
62
64
|
const [type, setType] = (0, import_react.useState)(import_status.defaultOptions.exportType);
|
|
@@ -65,7 +67,7 @@ var ExportImport = ({ exportImport }) => {
|
|
|
65
67
|
const { state } = (0, import_hooks.useSharedState)(import_model.Context);
|
|
66
68
|
const { originResultDataSource, currentDataSource } = state;
|
|
67
69
|
const context = (0, import_useEngineContext.default)();
|
|
68
|
-
import_utils.request.setRequest(context.appHelper.utils.request);
|
|
70
|
+
import_utils.request.setRequest((_b = (_a = context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.request);
|
|
69
71
|
const _items = (0, import_react.useMemo)(() => {
|
|
70
72
|
const result = Object.entries(import_status.exportImportOptions).map(([key, value2]) => {
|
|
71
73
|
return {
|
|
@@ -76,10 +78,9 @@ var ExportImport = ({ exportImport }) => {
|
|
|
76
78
|
return result;
|
|
77
79
|
}, []);
|
|
78
80
|
const Content = (0, import_react.useMemo)(() => {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}, [value]);
|
|
81
|
+
const _value = value || import_status.defaultOptions.importValue;
|
|
82
|
+
return Com[_value];
|
|
83
|
+
}, [value, import_status.defaultOptions.importValue]);
|
|
83
84
|
const _footer = (0, import_react.useMemo)(() => {
|
|
84
85
|
const types = import_status.defaultOptions.footerHintTypes;
|
|
85
86
|
if (types.includes(value)) {
|
|
@@ -94,8 +95,10 @@ var ExportImport = ({ exportImport }) => {
|
|
|
94
95
|
if (!value)
|
|
95
96
|
return null;
|
|
96
97
|
const types = import_status.defaultOptions.okShowButtonTypes;
|
|
98
|
+
const lang = (0, import_locale.getCurrentLocale)();
|
|
99
|
+
const isEn = lang === "en-US" || lang === "en";
|
|
97
100
|
if (types.includes(value) && (exportImport == null ? void 0 : exportImport.title)) {
|
|
98
|
-
return `${import_status.exportImportOptions[value]}${exportImport.title}`;
|
|
101
|
+
return `${import_status.exportImportOptions[value]}${isEn ? " " : ""}${exportImport.title}`;
|
|
99
102
|
}
|
|
100
103
|
return import_status.exportImportOptions[value];
|
|
101
104
|
}, [value, exportImport == null ? void 0 : exportImport.title]);
|
|
@@ -53,7 +53,8 @@ var PopoverContent = (props) => {
|
|
|
53
53
|
]);
|
|
54
54
|
};
|
|
55
55
|
const options = (0, import_react.useMemo)(() => {
|
|
56
|
-
|
|
56
|
+
const _lists = (columns || []).filter((item) => !(item == null ? void 0 : item.isHidden));
|
|
57
|
+
return _lists.map((item) => ({
|
|
57
58
|
label: item.label,
|
|
58
59
|
value: `${item.name}`
|
|
59
60
|
}));
|
|
@@ -76,6 +76,7 @@ var GridView = (0, import_model.Provider)(
|
|
|
76
76
|
currentSettingKey,
|
|
77
77
|
// pagination,
|
|
78
78
|
exportImport,
|
|
79
|
+
currentComponentId,
|
|
79
80
|
...other
|
|
80
81
|
} = props;
|
|
81
82
|
const modal = (0, import_hooks.useSharedState)(import_model.Context);
|
|
@@ -90,11 +91,12 @@ var GridView = (0, import_model.Provider)(
|
|
|
90
91
|
const { width } = (0, import_ahooks.useSize)(wrapRef) || {};
|
|
91
92
|
const utils = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils;
|
|
92
93
|
const tableId = (0, import_react.useMemo)(() => {
|
|
94
|
+
console.log(props, "wh");
|
|
93
95
|
if (props.__designMode === "design") {
|
|
94
96
|
return "designMode-mock-table-id";
|
|
95
97
|
}
|
|
96
|
-
return props.__id;
|
|
97
|
-
}, [props.__id, props.__designMode]);
|
|
98
|
+
return (props == null ? void 0 : props.currentComponentId) || props.__id;
|
|
99
|
+
}, [props.__id, props.__designMode, props == null ? void 0 : props.currentComponentId]);
|
|
98
100
|
const columns = (0, import_react.useMemo)(() => {
|
|
99
101
|
return propsColumns.filter((item) => !item.hidden);
|
|
100
102
|
}, [propsColumns]);
|
|
@@ -26,6 +26,7 @@ declare type DataSourceListItemType = {
|
|
|
26
26
|
columnKey?: string;
|
|
27
27
|
label?: string;
|
|
28
28
|
name?: string | string[];
|
|
29
|
+
isHidden?: boolean;
|
|
29
30
|
};
|
|
30
31
|
/**
|
|
31
32
|
* 数据源分组总配置
|
|
@@ -211,7 +212,11 @@ export declare type GridViewProps = {
|
|
|
211
212
|
/**
|
|
212
213
|
* 当前本地配置的key 用此hash是否改变用来判断是否清空本地配置 不填默认使用columns数据生成hash
|
|
213
214
|
*/
|
|
214
|
-
currentSettingKey?:
|
|
215
|
+
currentSettingKey?: string;
|
|
216
|
+
/**
|
|
217
|
+
* 当前本地配置的唯一值, 不填默认使用currentSettingKey
|
|
218
|
+
*/
|
|
219
|
+
currentComponentId?: string;
|
|
215
220
|
/**
|
|
216
221
|
* 当前表格中数据发生变化事件 包含本地筛选和外部传入数据变化
|
|
217
222
|
* @param currentDataSource
|
|
@@ -35,7 +35,7 @@ module.exports = __toCommonJS(Time_exports);
|
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import__ = __toESM(require("../index"));
|
|
37
37
|
var import_index = require("./index.less");
|
|
38
|
-
var import_utils = require("./utils
|
|
38
|
+
var import_utils = require("./utils");
|
|
39
39
|
var import_locales = require("../../../locales");
|
|
40
40
|
var import_dayjs = __toESM(require("dayjs"));
|
|
41
41
|
var items = [
|
package/lowcode/table/meta.ts
CHANGED
|
@@ -81,6 +81,15 @@ export default {
|
|
|
81
81
|
},
|
|
82
82
|
propType: "string",
|
|
83
83
|
setter: "StringSetter",
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: "currentComponentId",
|
|
87
|
+
title: {
|
|
88
|
+
label: "currentComponentId",
|
|
89
|
+
tip: "currentComponentId | 当前本地配置的唯一值 不填默认使用currentSettingKey",
|
|
90
|
+
},
|
|
91
|
+
propType: "string",
|
|
92
|
+
setter: "StringSetter",
|
|
84
93
|
}
|
|
85
94
|
],
|
|
86
95
|
},
|
|
@@ -1518,6 +1527,16 @@ export default {
|
|
|
1518
1527
|
setter: "BoolSetter",
|
|
1519
1528
|
defaultValue: false,
|
|
1520
1529
|
},
|
|
1530
|
+
{
|
|
1531
|
+
name: "isHidden",
|
|
1532
|
+
title: {
|
|
1533
|
+
label: "是否隐藏",
|
|
1534
|
+
tip: "开启时,当前项展示, 关闭时,当前项隐藏",
|
|
1535
|
+
},
|
|
1536
|
+
propType: "bool",
|
|
1537
|
+
setter: "BoolSetter",
|
|
1538
|
+
defaultValue: false,
|
|
1539
|
+
},
|
|
1521
1540
|
{
|
|
1522
1541
|
name: "columnKey",
|
|
1523
1542
|
title: {
|
|
@@ -1586,6 +1605,7 @@ export default {
|
|
|
1586
1605
|
name: "",
|
|
1587
1606
|
columnKey: "",
|
|
1588
1607
|
isCustom: false,
|
|
1608
|
+
isHidden: false
|
|
1589
1609
|
},
|
|
1590
1610
|
},
|
|
1591
1611
|
},
|
|
@@ -1810,6 +1830,16 @@ export default {
|
|
|
1810
1830
|
setter: "BoolSetter",
|
|
1811
1831
|
defaultValue: false,
|
|
1812
1832
|
},
|
|
1833
|
+
{
|
|
1834
|
+
name: "isHidden",
|
|
1835
|
+
title: {
|
|
1836
|
+
label: "是否隐藏",
|
|
1837
|
+
tip: "开启时,当前项展示, 关闭时,当前项隐藏",
|
|
1838
|
+
},
|
|
1839
|
+
propType: "bool",
|
|
1840
|
+
setter: "BoolSetter",
|
|
1841
|
+
defaultValue: false,
|
|
1842
|
+
},
|
|
1813
1843
|
{
|
|
1814
1844
|
name: "other",
|
|
1815
1845
|
title: {
|
|
@@ -1828,6 +1858,7 @@ export default {
|
|
|
1828
1858
|
key: "name",
|
|
1829
1859
|
columnKey: "",
|
|
1830
1860
|
isCustom: false,
|
|
1861
|
+
isHidden: false
|
|
1831
1862
|
},
|
|
1832
1863
|
},
|
|
1833
1864
|
},
|
|
@@ -1986,6 +2017,16 @@ export default {
|
|
|
1986
2017
|
return target.parent.getPropValue("isCustom");
|
|
1987
2018
|
},
|
|
1988
2019
|
},
|
|
2020
|
+
{
|
|
2021
|
+
name: "isHidden",
|
|
2022
|
+
title: {
|
|
2023
|
+
label: "是否隐藏",
|
|
2024
|
+
tip: "开启时,当前项展示, 关闭时,当前项隐藏",
|
|
2025
|
+
},
|
|
2026
|
+
propType: "bool",
|
|
2027
|
+
setter: "BoolSetter",
|
|
2028
|
+
defaultValue: false,
|
|
2029
|
+
},
|
|
1989
2030
|
{
|
|
1990
2031
|
name: "type",
|
|
1991
2032
|
title: { label: "字段类型", tip: "所排序的字段类型" },
|
|
@@ -2021,6 +2062,7 @@ export default {
|
|
|
2021
2062
|
type: "date",
|
|
2022
2063
|
columnKey: "",
|
|
2023
2064
|
isCustom: false,
|
|
2065
|
+
isHidden: false
|
|
2024
2066
|
},
|
|
2025
2067
|
},
|
|
2026
2068
|
},
|
|
@@ -330,12 +330,14 @@ export default [
|
|
|
330
330
|
type: "string",
|
|
331
331
|
columnKey: "name",
|
|
332
332
|
isCustom: false,
|
|
333
|
+
isHidden: false
|
|
333
334
|
},
|
|
334
335
|
{
|
|
335
336
|
label: "标题",
|
|
336
337
|
type: "number",
|
|
337
338
|
columnKey: "age",
|
|
338
339
|
isCustom: false,
|
|
340
|
+
isHidden: false
|
|
339
341
|
},
|
|
340
342
|
],
|
|
341
343
|
},
|
|
@@ -348,12 +350,14 @@ export default [
|
|
|
348
350
|
name: "",
|
|
349
351
|
columnKey: "name",
|
|
350
352
|
isCustom: false,
|
|
353
|
+
isHidden: false
|
|
351
354
|
},
|
|
352
355
|
{
|
|
353
356
|
label: "标题",
|
|
354
357
|
name: "",
|
|
355
358
|
columnKey: "age",
|
|
356
359
|
isCustom: false,
|
|
360
|
+
isHidden: false
|
|
357
361
|
},
|
|
358
362
|
],
|
|
359
363
|
},
|
|
@@ -371,6 +375,7 @@ export default [
|
|
|
371
375
|
isCustom: false,
|
|
372
376
|
sort: true,
|
|
373
377
|
localFilter: true,
|
|
378
|
+
isHidden: false
|
|
374
379
|
},
|
|
375
380
|
{
|
|
376
381
|
label: "标题",
|
|
@@ -380,6 +385,7 @@ export default [
|
|
|
380
385
|
isCustom: false,
|
|
381
386
|
sort: true,
|
|
382
387
|
localFilter: true,
|
|
388
|
+
isHidden: false
|
|
383
389
|
},
|
|
384
390
|
],
|
|
385
391
|
},
|