@pisell/materials 1.0.306 → 1.0.307
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 +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.js +3 -3
- package/es/components/table/Table/utils.d.ts +10 -1
- package/es/components/table/Table/utils.js +5 -1
- package/es/components/table/index.js +3 -11
- package/es/components/virtual-keyboard/Time/index.js +1 -1
- package/lib/components/table/Table/utils.d.ts +10 -1
- package/lib/components/table/Table/utils.js +4 -1
- package/lib/components/table/index.js +3 -12
- package/lowcode/list/meta.ts +6 -6
- package/package.json +1 -1
|
@@ -13,7 +13,16 @@ export declare const mergeColumnSetting: ({ columns, tableId, currentViewMode, }
|
|
|
13
13
|
columns: Record<string, any>[];
|
|
14
14
|
tableId?: string | undefined;
|
|
15
15
|
currentViewMode: ModeType;
|
|
16
|
-
}) =>
|
|
16
|
+
}) => {
|
|
17
|
+
isShow: boolean;
|
|
18
|
+
}[] | ({
|
|
19
|
+
width: any;
|
|
20
|
+
isShow: any;
|
|
21
|
+
sortIndex: number;
|
|
22
|
+
} | {
|
|
23
|
+
isShow: boolean;
|
|
24
|
+
sortIndex: number;
|
|
25
|
+
})[];
|
|
17
26
|
/**
|
|
18
27
|
* 对数据源进行排序
|
|
19
28
|
* @param dataSource 数据源数组
|
|
@@ -121,7 +121,11 @@ export var mergeColumnSetting = function mergeColumnSetting(_ref3) {
|
|
|
121
121
|
var columns = _ref3.columns,
|
|
122
122
|
tableId = _ref3.tableId,
|
|
123
123
|
currentViewMode = _ref3.currentViewMode;
|
|
124
|
-
if (!tableId) return columns
|
|
124
|
+
if (!tableId) return columns.map(function (item) {
|
|
125
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
126
|
+
isShow: true
|
|
127
|
+
});
|
|
128
|
+
});
|
|
125
129
|
var colKeyMap = getColumnsFromLocalStorage(tableId, currentViewMode);
|
|
126
130
|
var newColumns = columns.map(function (item, index) {
|
|
127
131
|
var col = colKeyMap[item.key];
|
|
@@ -110,17 +110,9 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
110
110
|
}
|
|
111
111
|
return viewMode || defaultViewMode;
|
|
112
112
|
}, [viewMode, defaultViewMode, multiple]);
|
|
113
|
-
var removeTitleColumns = useMemo(function () {
|
|
114
|
-
var _columns = columns.map(function (item) {
|
|
115
|
-
return _objectSpread(_objectSpread({}, item), {}, {
|
|
116
|
-
title: undefined
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
return _columns;
|
|
120
|
-
}, [columns]);
|
|
121
113
|
var currentSettingHash = useMemo(function () {
|
|
122
|
-
return currentSettingKey || getHash(
|
|
123
|
-
}, [currentSettingKey, JSON.stringify(
|
|
114
|
+
return currentSettingKey || getHash(columns) || "";
|
|
115
|
+
}, [currentSettingKey, JSON.stringify(columns)]);
|
|
124
116
|
useEffect(function () {
|
|
125
117
|
var setting = getTableSettingFromLocalStorage(tableId);
|
|
126
118
|
if (setting.currentSettingHash !== currentSettingHash) {
|
|
@@ -240,7 +232,7 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
240
232
|
form.setFieldValue("column_setting", {});
|
|
241
233
|
form.setFieldValue("column_setting", tableSettingRef.current.column_setting);
|
|
242
234
|
// JSON.stringify会丢失 render函数变更的监听 使用自定义stringify处理
|
|
243
|
-
}, [stringify(
|
|
235
|
+
}, [stringify(columns)]);
|
|
244
236
|
useEffect(function () {
|
|
245
237
|
form.setFieldsValue(initialValuesRef.current);
|
|
246
238
|
// ArraySetter在面板state变更时指针改变
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useMemo, useEffect } from "react";
|
|
2
2
|
import VirtualKeyboard from "../index";
|
|
3
3
|
import "./index.less";
|
|
4
|
-
import { formatStringToTime } from "./utils.
|
|
4
|
+
import { formatStringToTime } from "./utils.tsx";
|
|
5
5
|
import { getText } from "../../../locales";
|
|
6
6
|
import dayjs from "dayjs";
|
|
7
7
|
var items = [{
|
|
@@ -13,7 +13,16 @@ export declare const mergeColumnSetting: ({ columns, tableId, currentViewMode, }
|
|
|
13
13
|
columns: Record<string, any>[];
|
|
14
14
|
tableId?: string | undefined;
|
|
15
15
|
currentViewMode: ModeType;
|
|
16
|
-
}) =>
|
|
16
|
+
}) => {
|
|
17
|
+
isShow: boolean;
|
|
18
|
+
}[] | ({
|
|
19
|
+
width: any;
|
|
20
|
+
isShow: any;
|
|
21
|
+
sortIndex: number;
|
|
22
|
+
} | {
|
|
23
|
+
isShow: boolean;
|
|
24
|
+
sortIndex: number;
|
|
25
|
+
})[];
|
|
17
26
|
/**
|
|
18
27
|
* 对数据源进行排序
|
|
19
28
|
* @param dataSource 数据源数组
|
|
@@ -153,7 +153,10 @@ var mergeColumnSetting = ({
|
|
|
153
153
|
currentViewMode
|
|
154
154
|
}) => {
|
|
155
155
|
if (!tableId)
|
|
156
|
-
return columns
|
|
156
|
+
return columns.map((item) => ({
|
|
157
|
+
...item,
|
|
158
|
+
isShow: true
|
|
159
|
+
}));
|
|
157
160
|
const colKeyMap = getColumnsFromLocalStorage(tableId, currentViewMode);
|
|
158
161
|
const newColumns = columns.map((item, index) => {
|
|
159
162
|
const col = colKeyMap[item.key];
|
|
@@ -122,18 +122,9 @@ var GridView = (0, import_model.Provider)(
|
|
|
122
122
|
}
|
|
123
123
|
return viewMode || defaultViewMode;
|
|
124
124
|
}, [viewMode, defaultViewMode, multiple]);
|
|
125
|
-
const removeTitleColumns = (0, import_react.useMemo)(() => {
|
|
126
|
-
let _columns = columns.map((item) => {
|
|
127
|
-
return {
|
|
128
|
-
...item,
|
|
129
|
-
title: void 0
|
|
130
|
-
};
|
|
131
|
-
});
|
|
132
|
-
return _columns;
|
|
133
|
-
}, [columns]);
|
|
134
125
|
const currentSettingHash = (0, import_react.useMemo)(() => {
|
|
135
|
-
return currentSettingKey || (0, import_utils.getHash)(
|
|
136
|
-
}, [currentSettingKey, JSON.stringify(
|
|
126
|
+
return currentSettingKey || (0, import_utils.getHash)(columns) || "";
|
|
127
|
+
}, [currentSettingKey, JSON.stringify(columns)]);
|
|
137
128
|
(0, import_react.useEffect)(() => {
|
|
138
129
|
const setting = (0, import_utils.getTableSettingFromLocalStorage)(tableId);
|
|
139
130
|
if (setting.currentSettingHash !== currentSettingHash) {
|
|
@@ -255,7 +246,7 @@ var GridView = (0, import_model.Provider)(
|
|
|
255
246
|
"column_setting",
|
|
256
247
|
tableSettingRef.current.column_setting
|
|
257
248
|
);
|
|
258
|
-
}, [(0, import_utils.stringify)(
|
|
249
|
+
}, [(0, import_utils.stringify)(columns)]);
|
|
259
250
|
(0, import_react.useEffect)(() => {
|
|
260
251
|
form.setFieldsValue(initialValuesRef.current);
|
|
261
252
|
}, [JSON.stringify(propsFilter)]);
|
package/lowcode/list/meta.ts
CHANGED
|
@@ -575,7 +575,7 @@ export default {
|
|
|
575
575
|
tip: 'header | 列表头部',
|
|
576
576
|
},
|
|
577
577
|
propType: 'node',
|
|
578
|
-
setter: {
|
|
578
|
+
setter: [{
|
|
579
579
|
componentName: 'SlotSetter',
|
|
580
580
|
initialValue: {
|
|
581
581
|
type: 'JSSlot',
|
|
@@ -588,7 +588,7 @@ export default {
|
|
|
588
588
|
},
|
|
589
589
|
],
|
|
590
590
|
},
|
|
591
|
-
},
|
|
591
|
+
}],
|
|
592
592
|
},
|
|
593
593
|
{
|
|
594
594
|
name: 'footer',
|
|
@@ -597,7 +597,7 @@ export default {
|
|
|
597
597
|
tip: 'footer | 列表底部',
|
|
598
598
|
},
|
|
599
599
|
propType: 'node',
|
|
600
|
-
setter: {
|
|
600
|
+
setter: [{
|
|
601
601
|
componentName: 'SlotSetter',
|
|
602
602
|
initialValue: {
|
|
603
603
|
type: 'JSSlot',
|
|
@@ -610,7 +610,7 @@ export default {
|
|
|
610
610
|
},
|
|
611
611
|
],
|
|
612
612
|
},
|
|
613
|
-
},
|
|
613
|
+
}],
|
|
614
614
|
},
|
|
615
615
|
{
|
|
616
616
|
name: 'loadMore',
|
|
@@ -619,7 +619,7 @@ export default {
|
|
|
619
619
|
tip: 'loadMore | 加载更多',
|
|
620
620
|
},
|
|
621
621
|
propType: 'node',
|
|
622
|
-
setter: {
|
|
622
|
+
setter: [{
|
|
623
623
|
componentName: 'SlotSetter',
|
|
624
624
|
initialValue: {
|
|
625
625
|
type: 'JSSlot',
|
|
@@ -632,7 +632,7 @@ export default {
|
|
|
632
632
|
},
|
|
633
633
|
],
|
|
634
634
|
},
|
|
635
|
-
},
|
|
635
|
+
}],
|
|
636
636
|
},
|
|
637
637
|
],
|
|
638
638
|
},
|