@pisell/materials 1.0.280 → 1.0.282
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/antd/antd-css-compatible-5.17.2.min.js +346 -0
- 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.js +1 -1
- package/build/lowcode/view.js +15 -15
- package/es/components/table/hooks/useTableSetting.js +11 -7
- package/es/components/table/index.js +9 -9
- package/lib/components/table/hooks/useTableSetting.js +0 -13
- package/lib/components/table/index.js +0 -11
- package/lowcode/table/meta.ts +5 -1
- package/package.json +3 -3
|
@@ -169,18 +169,22 @@ var useTableSetting = function useTableSetting(params) {
|
|
|
169
169
|
currentViewMode: currentViewMode,
|
|
170
170
|
currentSettingHash: currentSettingHash
|
|
171
171
|
});
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
interaction
|
|
172
|
+
/*
|
|
173
|
+
if (isTerminal?.() && result) {
|
|
174
|
+
interaction?.utils?.postMessageToApp?.({
|
|
175
175
|
module: "global",
|
|
176
176
|
key: "local_storage",
|
|
177
177
|
data: {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
178
|
+
type: "set",
|
|
179
|
+
value: {
|
|
180
|
+
[result.key]: result.value
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
})
|
|
182
184
|
}
|
|
185
|
+
*/
|
|
183
186
|
};
|
|
187
|
+
|
|
184
188
|
var tableSetting = useMemo(function () {
|
|
185
189
|
return _objectSpread(_objectSpread({}, tableLocalSetting), defaultTableSetting);
|
|
186
190
|
}, [tableLocalSetting, defaultTableSetting]);
|
|
@@ -25,7 +25,7 @@ import { Provider, Context, formatColumn } from "./model";
|
|
|
25
25
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
26
26
|
import useTableSetting from "./hooks/useTableSetting";
|
|
27
27
|
import useTriggerValuesChange from "./hooks/useTriggerValuesChange";
|
|
28
|
-
import { clearTableSettingToLocalStorage, getCurrentViewModeFromLocalStorage, getHash,
|
|
28
|
+
import { clearTableSettingToLocalStorage, getCurrentViewModeFromLocalStorage, getHash, getTableSettingFromLocalStorage, mergeColumnSetting, omit, stringify } from "./Table/utils";
|
|
29
29
|
import useTransSortSetting from "./hooks/useTransSortSetting";
|
|
30
30
|
import useTransFilterSetting from "./hooks/useTransFilterSetting";
|
|
31
31
|
import useTransDataSourceGroupSetting from "./hooks/useTransDataSourceGroupSetting";
|
|
@@ -108,19 +108,19 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
108
108
|
useEffect(function () {
|
|
109
109
|
var setting = getTableSettingFromLocalStorage(tableId);
|
|
110
110
|
if (setting.currentSettingHash !== currentSettingHash) {
|
|
111
|
-
var _utils$isTerminal;
|
|
112
111
|
clearTableSettingToLocalStorage(tableId);
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
utils
|
|
112
|
+
/*
|
|
113
|
+
if (utils?.isTerminal?.() && tableId) {
|
|
114
|
+
utils?.interaction?.utils?.postMessageToApp?.({
|
|
116
115
|
module: "global",
|
|
117
116
|
key: "local_storage",
|
|
118
117
|
data: {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
})
|
|
118
|
+
type: "remove",
|
|
119
|
+
key: getTableKey(tableId),
|
|
120
|
+
},
|
|
121
|
+
})
|
|
123
122
|
}
|
|
123
|
+
*/
|
|
124
124
|
}
|
|
125
125
|
}, [currentSettingHash, tableId]);
|
|
126
126
|
var _useTableSetting = useTableSetting({
|
|
@@ -199,7 +199,6 @@ var useTableSetting = (params) => {
|
|
|
199
199
|
sortButtonShow
|
|
200
200
|
]);
|
|
201
201
|
const setTableSetting = (values) => {
|
|
202
|
-
var _a2, _b;
|
|
203
202
|
const result = (0, import_utils.setFormValuesToLocalStorage)({
|
|
204
203
|
tableId,
|
|
205
204
|
allValues: values,
|
|
@@ -207,18 +206,6 @@ var useTableSetting = (params) => {
|
|
|
207
206
|
currentViewMode,
|
|
208
207
|
currentSettingHash
|
|
209
208
|
});
|
|
210
|
-
if ((isTerminal == null ? void 0 : isTerminal()) && result) {
|
|
211
|
-
(_b = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.postMessageToApp) == null ? void 0 : _b.call(_a2, {
|
|
212
|
-
module: "global",
|
|
213
|
-
key: "local_storage",
|
|
214
|
-
data: {
|
|
215
|
-
type: "set",
|
|
216
|
-
value: {
|
|
217
|
-
[result.key]: result.value
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
209
|
};
|
|
223
210
|
const tableSetting = (0, import_react.useMemo)(() => {
|
|
224
211
|
return {
|
|
@@ -121,20 +121,9 @@ var GridView = (0, import_model.Provider)(
|
|
|
121
121
|
return currentSettingKey || (0, import_utils.getHash)(columns) || "";
|
|
122
122
|
}, [currentSettingKey, JSON.stringify(columns)]);
|
|
123
123
|
(0, import_react.useEffect)(() => {
|
|
124
|
-
var _a2, _b2, _c2, _d2;
|
|
125
124
|
const setting = (0, import_utils.getTableSettingFromLocalStorage)(tableId);
|
|
126
125
|
if (setting.currentSettingHash !== currentSettingHash) {
|
|
127
126
|
(0, import_utils.clearTableSettingToLocalStorage)(tableId);
|
|
128
|
-
if (((_a2 = utils == null ? void 0 : utils.isTerminal) == null ? void 0 : _a2.call(utils)) && tableId) {
|
|
129
|
-
(_d2 = (_c2 = (_b2 = utils == null ? void 0 : utils.interaction) == null ? void 0 : _b2.utils) == null ? void 0 : _c2.postMessageToApp) == null ? void 0 : _d2.call(_c2, {
|
|
130
|
-
module: "global",
|
|
131
|
-
key: "local_storage",
|
|
132
|
-
data: {
|
|
133
|
-
type: "remove",
|
|
134
|
-
key: (0, import_utils.getTableKey)(tableId)
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
127
|
}
|
|
139
128
|
}, [currentSettingHash, tableId]);
|
|
140
129
|
const { setTableSetting, tableSetting } = (0, import_useTableSetting.default)({
|
package/lowcode/table/meta.ts
CHANGED
|
@@ -1136,6 +1136,7 @@ export default {
|
|
|
1136
1136
|
if (value) {
|
|
1137
1137
|
target.parent.setPropValue("rowSelection", {
|
|
1138
1138
|
type: "radio",
|
|
1139
|
+
columnWidth: 48,
|
|
1139
1140
|
});
|
|
1140
1141
|
}
|
|
1141
1142
|
},
|
|
@@ -1192,7 +1193,10 @@ export default {
|
|
|
1192
1193
|
value: ["number", "string"],
|
|
1193
1194
|
},
|
|
1194
1195
|
setter: ["NumberSetter", "StringSetter", "VariableSetter"],
|
|
1195
|
-
|
|
1196
|
+
condition: {
|
|
1197
|
+
type: "JSFunction",
|
|
1198
|
+
value: 'target => !!target.getProps().getPropValue("rowSelection")',
|
|
1199
|
+
},
|
|
1196
1200
|
},
|
|
1197
1201
|
{
|
|
1198
1202
|
name: "rowSelection.selectedRowKeys",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.282",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"react-window": "^1.8.10",
|
|
63
63
|
"react-virtualized-auto-sizer": "^1.0.20",
|
|
64
64
|
"crypto-js": "^4.2.0",
|
|
65
|
-
"@pisell/utils": "1.0.25",
|
|
66
65
|
"@pisell/icon": "0.0.8",
|
|
67
|
-
"@pisell/date-picker": "1.0.72"
|
|
66
|
+
"@pisell/date-picker": "1.0.72",
|
|
67
|
+
"@pisell/utils": "1.0.25"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"react": "^18.0.0",
|