@pisell/materials 1.0.359 → 1.0.360
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 +13 -13
- package/build/lowcode/assets-dev.json +4 -4
- package/build/lowcode/assets-prod.json +13 -13
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +18 -27
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +20 -29
- package/es/components/date-picker/index.js +2 -2
- package/es/components/drag-sort-tree/index.d.ts +1 -0
- package/es/components/drag-sort-tree/index.js +1 -2
- package/es/components/table/Actions/component/ExportImport/index.js +4 -5
- package/es/components/table/BasicTable/index.d.ts +2 -2
- package/es/components/table/BasicTable/index.js +10 -10
- package/es/components/table/Table/utils.d.ts +2 -14
- package/es/components/table/Table/utils.js +2 -6
- package/es/components/table/hooks/useTableSetting.js +5 -26
- package/es/index.d.ts +0 -1
- package/es/index.js +0 -1
- package/es/locales/en-US.d.ts +0 -12
- package/es/locales/en-US.js +1 -14
- package/es/locales/zh-CN.d.ts +0 -12
- package/es/locales/zh-CN.js +1 -14
- package/es/locales/zh-TW.d.ts +0 -12
- package/es/locales/zh-TW.js +1 -14
- package/lib/components/date-picker/index.js +2 -2
- package/lib/components/drag-sort-tree/index.d.ts +1 -0
- package/lib/components/drag-sort-tree/index.js +1 -0
- package/lib/components/table/Actions/component/ExportImport/index.js +5 -5
- package/lib/components/table/BasicTable/index.d.ts +2 -2
- package/lib/components/table/BasicTable/index.js +2 -5
- package/lib/components/table/Table/utils.d.ts +2 -14
- package/lib/components/table/Table/utils.js +1 -7
- package/lib/components/table/hooks/useTableSetting.js +9 -23
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -3
- package/lib/locales/en-US.d.ts +0 -12
- package/lib/locales/en-US.js +1 -14
- package/lib/locales/zh-CN.d.ts +0 -12
- package/lib/locales/zh-CN.js +1 -14
- package/lib/locales/zh-TW.d.ts +0 -12
- package/lib/locales/zh-TW.js +1 -14
- package/package.json +4 -4
- package/es/components/browserSelect/chevron-down.png +0 -0
- package/es/components/browserSelect/index.d.ts +0 -15
- package/es/components/browserSelect/index.js +0 -36
- package/es/components/browserSelect/index.less +0 -18
- package/es/components/date-picker/constants.d.ts +0 -39
- package/es/components/date-picker/constants.js +0 -76
- package/es/components/date-picker/datePickerCpt.d.ts +0 -8
- package/es/components/date-picker/datePickerCpt.js +0 -290
- package/es/components/date-picker/hooks/useMediaQuery.d.ts +0 -2
- package/es/components/date-picker/hooks/useMediaQuery.js +0 -28
- package/es/components/date-picker/index.less +0 -1847
- package/es/components/picker-view/index.d.ts +0 -2
- package/es/components/picker-view/index.js +0 -2
- package/lib/components/browserSelect/chevron-down.png +0 -0
- package/lib/components/browserSelect/index.d.ts +0 -15
- package/lib/components/browserSelect/index.js +0 -59
- package/lib/components/browserSelect/index.less +0 -18
- package/lib/components/date-picker/constants.d.ts +0 -39
- package/lib/components/date-picker/constants.js +0 -78
- package/lib/components/date-picker/datePickerCpt.d.ts +0 -8
- package/lib/components/date-picker/datePickerCpt.js +0 -297
- package/lib/components/date-picker/hooks/useMediaQuery.d.ts +0 -2
- package/lib/components/date-picker/hooks/useMediaQuery.js +0 -43
- package/lib/components/date-picker/index.less +0 -1847
- package/lib/components/picker-view/index.d.ts +0 -2
- package/lib/components/picker-view/index.js +0 -36
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import { DatePicker as OriginalDatePicker } from 'antd';
|
|
1
2
|
import { withMomentProps } from "../../utils/hoc";
|
|
2
3
|
import dayjs from 'dayjs';
|
|
3
4
|
import { RangePicker, OldPisellDateRangePicker } from "@pisell/date-picker";
|
|
4
5
|
import localeData from 'dayjs/plugin/localeData';
|
|
5
6
|
import weekday from 'dayjs/plugin/weekday';
|
|
6
|
-
import DatePickerCpt from "./datePickerCpt";
|
|
7
7
|
dayjs.extend(weekday);
|
|
8
8
|
dayjs.extend(localeData);
|
|
9
9
|
|
|
10
10
|
// const OriginalRangePicker = OriginalDatePicker.RangePicker;
|
|
11
11
|
|
|
12
|
-
var DatePicker = withMomentProps(
|
|
12
|
+
var DatePicker = withMomentProps(OriginalDatePicker, ['defaultPickerValue', 'defaultValue', 'showTime.defaultValue', 'value']);
|
|
13
13
|
|
|
14
14
|
// const RangePicker = withMomentProps(OriginalRangePicker, [
|
|
15
15
|
// 'defaultPickerValue',
|
|
@@ -13,8 +13,7 @@ import { DndContext, useSensor, useSensors, PointerSensor } from '@dnd-kit/core'
|
|
|
13
13
|
import { SortableContext, verticalListSortingStrategy, arrayMove } from '@dnd-kit/sortable';
|
|
14
14
|
import TreeItem from "./TreeItem";
|
|
15
15
|
import { restrictToVerticalAxis, restrictToParentElement } from '@dnd-kit/modifiers';
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
import "./index.less";
|
|
18
17
|
var DragSortTree = function DragSortTree(props) {
|
|
19
18
|
var value = props.value,
|
|
20
19
|
rowKey = props.rowKey,
|
|
@@ -34,7 +34,6 @@ var Com = {
|
|
|
34
34
|
import_log: ImportLog
|
|
35
35
|
};
|
|
36
36
|
var ExportImport = function ExportImport(_ref) {
|
|
37
|
-
var _context$appHelper, _context$appHelper$ut;
|
|
38
37
|
var exportImport = _ref.exportImport;
|
|
39
38
|
var _useState = useState(false),
|
|
40
39
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -61,7 +60,7 @@ var ExportImport = function ExportImport(_ref) {
|
|
|
61
60
|
var originResultDataSource = state.originResultDataSource,
|
|
62
61
|
currentDataSource = state.currentDataSource;
|
|
63
62
|
var context = useEngineContext();
|
|
64
|
-
request.setRequest(
|
|
63
|
+
request.setRequest(context.appHelper.utils.request);
|
|
65
64
|
var _items = useMemo(function () {
|
|
66
65
|
// 将对象转成数组
|
|
67
66
|
var result = Object.entries(exportImportOptions).map(function (_ref2) {
|
|
@@ -76,9 +75,9 @@ var ExportImport = function ExportImport(_ref) {
|
|
|
76
75
|
return result;
|
|
77
76
|
}, []);
|
|
78
77
|
var Content = useMemo(function () {
|
|
79
|
-
|
|
80
|
-
return Com[
|
|
81
|
-
}, [value
|
|
78
|
+
if (!value) return null;
|
|
79
|
+
return Com[value];
|
|
80
|
+
}, [value]);
|
|
82
81
|
var _footer = useMemo(function () {
|
|
83
82
|
var types = defaultOptions.footerHintTypes;
|
|
84
83
|
if (types.includes(value)) {
|
|
@@ -14,13 +14,13 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
14
14
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
15
|
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; }
|
|
16
16
|
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; }
|
|
17
|
-
import { Table, Form } from
|
|
18
|
-
import React, { useState, useMemo, useCallback, useEffect } from
|
|
17
|
+
import { Table, Form } from "antd";
|
|
18
|
+
import React, { useState, useMemo, useCallback, useEffect } from "react";
|
|
19
19
|
import { FormPagination } from "../../Pagination";
|
|
20
20
|
import { calcFilterSort } from "../Table/utils";
|
|
21
21
|
import { useSharedState } from "../../../hooks";
|
|
22
22
|
import { Context } from "../model";
|
|
23
|
-
import { isArr } from
|
|
23
|
+
import { isArr } from "@pisell/utils";
|
|
24
24
|
var BasicTable = function BasicTable(props) {
|
|
25
25
|
var _pagination$pageSizeO;
|
|
26
26
|
var dataSource = props.dataSource,
|
|
@@ -37,14 +37,14 @@ var BasicTable = function BasicTable(props) {
|
|
|
37
37
|
sort = _useState4[0],
|
|
38
38
|
setSort = _useState4[1];
|
|
39
39
|
var form = Form.useFormInstance();
|
|
40
|
-
var formPagination = Form.useWatch(
|
|
40
|
+
var formPagination = Form.useWatch("pagination", {
|
|
41
41
|
form: form,
|
|
42
42
|
preserve: true
|
|
43
43
|
}) || {
|
|
44
44
|
page: 1,
|
|
45
45
|
size: 10
|
|
46
46
|
};
|
|
47
|
-
var group = Form.useWatch(
|
|
47
|
+
var group = Form.useWatch("group_by", {
|
|
48
48
|
form: form,
|
|
49
49
|
preserve: true
|
|
50
50
|
});
|
|
@@ -99,19 +99,19 @@ var BasicTable = function BasicTable(props) {
|
|
|
99
99
|
var _expandedRowKeys = [];
|
|
100
100
|
_dataSource === null || _dataSource === void 0 ? void 0 : (_dataSource$list = _dataSource.list) === null || _dataSource$list === void 0 ? void 0 : _dataSource$list.forEach(function (item) {
|
|
101
101
|
if (item.__is_group) {
|
|
102
|
-
_expandedRowKeys.push(item[
|
|
102
|
+
_expandedRowKeys.push(item["__rowKey"]);
|
|
103
103
|
}
|
|
104
104
|
});
|
|
105
105
|
return _expandedRowKeys;
|
|
106
106
|
}, [_dataSource === null || _dataSource === void 0 ? void 0 : _dataSource.list]);
|
|
107
107
|
useEffect(function () {
|
|
108
108
|
dispatch({
|
|
109
|
-
type:
|
|
109
|
+
type: "setCurrentDataSource",
|
|
110
110
|
payload: (_dataSource === null || _dataSource === void 0 ? void 0 : _dataSource.list) || []
|
|
111
111
|
});
|
|
112
112
|
}, [_dataSource === null || _dataSource === void 0 ? void 0 : _dataSource.list]);
|
|
113
113
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Table, _extends({
|
|
114
|
-
key: defaultExpandedRowKeys.join(
|
|
114
|
+
key: defaultExpandedRowKeys.join("-")
|
|
115
115
|
}, other, {
|
|
116
116
|
// 开启分组条件后关闭行选择功能
|
|
117
117
|
rowSelection: isGroup ? false : other === null || other === void 0 ? void 0 : other.rowSelection,
|
|
@@ -132,13 +132,13 @@ var BasicTable = function BasicTable(props) {
|
|
|
132
132
|
return _objectSpread(_objectSpread({}, (other === null || other === void 0 ? void 0 : (_other$onRow = other.onRow) === null || _other$onRow === void 0 ? void 0 : _other$onRow.call(other, record, index)) || {}), {}, {
|
|
133
133
|
__is_group: record.__is_group,
|
|
134
134
|
__is_drag_sort: other.dragSort,
|
|
135
|
-
className: record.__is_group ?
|
|
135
|
+
className: record.__is_group ? "pisell-lowcode-table-group-row-wrap" : ""
|
|
136
136
|
});
|
|
137
137
|
},
|
|
138
138
|
expandable: {
|
|
139
139
|
defaultExpandAllRows: true
|
|
140
140
|
}
|
|
141
|
-
})), total > ((pagination === null || pagination === void 0 ? void 0 : pagination.pageSize) || (pagination === null || pagination === void 0 ? void 0 : (_pagination$pageSizeO = pagination.pageSizeOptions) === null || _pagination$pageSizeO === void 0 ? void 0 : _pagination$pageSizeO[0]) || 10)
|
|
141
|
+
})), total > ((pagination === null || pagination === void 0 ? void 0 : pagination.pageSize) || (pagination === null || pagination === void 0 ? void 0 : (_pagination$pageSizeO = pagination.pageSizeOptions) === null || _pagination$pageSizeO === void 0 ? void 0 : _pagination$pageSizeO[0]) || 10) ? /*#__PURE__*/React.createElement(Form.Item, {
|
|
142
142
|
name: "pagination"
|
|
143
143
|
}, /*#__PURE__*/React.createElement(FormPagination, _extends({}, pagination, {
|
|
144
144
|
showTotal: _showTotal,
|
|
@@ -81,10 +81,7 @@ export declare const setTableSettingToLocalStorage: ({ tableId, tableSettingObj,
|
|
|
81
81
|
}>;
|
|
82
82
|
currentViewMode: ModeType;
|
|
83
83
|
currentSettingHash: string;
|
|
84
|
-
}) =>
|
|
85
|
-
key: string;
|
|
86
|
-
value: Record<string, any>;
|
|
87
|
-
} | undefined;
|
|
84
|
+
}) => void;
|
|
88
85
|
export declare const clearTableSettingToLocalStorage: (tableId?: string) => void;
|
|
89
86
|
/**
|
|
90
87
|
* 从本地存储中获取表格设置, 全部配置
|
|
@@ -115,16 +112,7 @@ export declare const setFormValuesToLocalStorage: ({ tableId, allValues, keys, c
|
|
|
115
112
|
keys?: string[] | undefined;
|
|
116
113
|
currentViewMode: ModeType;
|
|
117
114
|
currentSettingHash: string;
|
|
118
|
-
}) =>
|
|
119
|
-
key: string;
|
|
120
|
-
value: Record<string, any>;
|
|
121
|
-
} | undefined;
|
|
122
|
-
/**
|
|
123
|
-
* 获取表格键值
|
|
124
|
-
* @param tableId 表格ID
|
|
125
|
-
* @returns 返回格式化后的表格键值
|
|
126
|
-
*/
|
|
127
|
-
export declare const getTableKey: (tableId: string) => string;
|
|
115
|
+
}) => void;
|
|
128
116
|
/**
|
|
129
117
|
* 合并筛选设置
|
|
130
118
|
* @param list 列表数据
|
|
@@ -271,10 +271,6 @@ export var setTableSettingToLocalStorage = function setTableSettingToLocalStorag
|
|
|
271
271
|
currentSettingHash: currentSettingHash
|
|
272
272
|
}, currentViewMode, _objectSpread(_objectSpread({}, newData[currentViewMode] || {}), itemSetting)));
|
|
273
273
|
localStorage.setItem(getTableKey(tableId), JSON.stringify(newData));
|
|
274
|
-
return {
|
|
275
|
-
key: getTableKey(tableId),
|
|
276
|
-
value: newData
|
|
277
|
-
};
|
|
278
274
|
};
|
|
279
275
|
export var clearTableSettingToLocalStorage = function clearTableSettingToLocalStorage(tableId) {
|
|
280
276
|
if (!tableId) return;
|
|
@@ -331,7 +327,7 @@ export var setFormValuesToLocalStorage = function setFormValuesToLocalStorage(_r
|
|
|
331
327
|
keys === null || keys === void 0 ? void 0 : keys.forEach(function (key) {
|
|
332
328
|
obj[key] = allValues === null || allValues === void 0 ? void 0 : allValues[key];
|
|
333
329
|
});
|
|
334
|
-
|
|
330
|
+
setTableSettingToLocalStorage({
|
|
335
331
|
tableId: tableId,
|
|
336
332
|
tableSettingObj: obj,
|
|
337
333
|
currentViewMode: currentViewMode,
|
|
@@ -344,7 +340,7 @@ export var setFormValuesToLocalStorage = function setFormValuesToLocalStorage(_r
|
|
|
344
340
|
* @param tableId 表格ID
|
|
345
341
|
* @returns 返回格式化后的表格键值
|
|
346
342
|
*/
|
|
347
|
-
|
|
343
|
+
var getTableKey = function getTableKey(tableId) {
|
|
348
344
|
return "".concat(tableKeyPrefix, "-").concat(tableId);
|
|
349
345
|
};
|
|
350
346
|
|
|
@@ -6,9 +6,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
7
|
import { useMemo } from "react";
|
|
8
8
|
import { getSettingKeyArrByMode, getTableSettingByCurrentViewMode, getTableSettingFromLocalStorage, mergeColumnSetting, mergeFilterSetting, setFormValuesToLocalStorage } from "../Table/utils";
|
|
9
|
-
import useEngineContext from "../../../hooks/useEngineContext";
|
|
10
9
|
var useTableSetting = function useTableSetting(params) {
|
|
11
|
-
var _context$appHelper;
|
|
12
10
|
var tableId = params.tableId,
|
|
13
11
|
filter = params.filter,
|
|
14
12
|
columnSetting = params.columnSetting,
|
|
@@ -20,10 +18,6 @@ var useTableSetting = function useTableSetting(params) {
|
|
|
20
18
|
gallery = params.gallery,
|
|
21
19
|
currentSettingHash = params.currentSettingHash,
|
|
22
20
|
exportImport = params.exportImport;
|
|
23
|
-
var context = useEngineContext();
|
|
24
|
-
var _ref = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {},
|
|
25
|
-
isTerminal = _ref.isTerminal,
|
|
26
|
-
interaction = _ref.interaction;
|
|
27
21
|
var columnsMap = useMemo(function () {
|
|
28
22
|
return new Map(propsColumns.map(function (item) {
|
|
29
23
|
return [item.key, item];
|
|
@@ -44,10 +38,10 @@ var useTableSetting = function useTableSetting(params) {
|
|
|
44
38
|
}
|
|
45
39
|
return propsColumns;
|
|
46
40
|
}, [propsColumns, currentViewMode, gallery, columnsMap]);
|
|
47
|
-
var
|
|
48
|
-
list =
|
|
49
|
-
quickFilterMaxLength =
|
|
50
|
-
sortButtonShow =
|
|
41
|
+
var _ref = filter || {},
|
|
42
|
+
list = _ref.list,
|
|
43
|
+
quickFilterMaxLength = _ref.quickFilterMaxLength,
|
|
44
|
+
sortButtonShow = _ref.sortButtonShow;
|
|
51
45
|
var defaultGalleryCoverSetting = useMemo(function () {
|
|
52
46
|
var _gallery$cover, _columns$find;
|
|
53
47
|
return {
|
|
@@ -163,29 +157,14 @@ var useTableSetting = function useTableSetting(params) {
|
|
|
163
157
|
* @param values
|
|
164
158
|
*/
|
|
165
159
|
var setTableSetting = function setTableSetting(values) {
|
|
166
|
-
|
|
160
|
+
setFormValuesToLocalStorage({
|
|
167
161
|
tableId: tableId,
|
|
168
162
|
allValues: values,
|
|
169
163
|
keys: localStorageSettingKeyArr,
|
|
170
164
|
currentViewMode: currentViewMode,
|
|
171
165
|
currentSettingHash: currentSettingHash
|
|
172
166
|
});
|
|
173
|
-
/*
|
|
174
|
-
if (isTerminal?.() && result) {
|
|
175
|
-
interaction?.utils?.postMessageToApp?.({
|
|
176
|
-
module: "global",
|
|
177
|
-
key: "local_storage",
|
|
178
|
-
data: {
|
|
179
|
-
type: "set",
|
|
180
|
-
value: {
|
|
181
|
-
[result.key]: result.value
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
})
|
|
185
|
-
}
|
|
186
|
-
*/
|
|
187
167
|
};
|
|
188
|
-
|
|
189
168
|
var tableSetting = useMemo(function () {
|
|
190
169
|
return _objectSpread(_objectSpread({}, tableLocalSetting), defaultTableSetting);
|
|
191
170
|
}, [tableLocalSetting, defaultTableSetting]);
|
package/es/index.d.ts
CHANGED
|
@@ -72,7 +72,6 @@ export { default as List } from './components/list';
|
|
|
72
72
|
export { default as Sort } from './components/sort';
|
|
73
73
|
export { default as InputNumberRange } from './components/input-number-range';
|
|
74
74
|
export { default as LowCodePage } from './components/lowCodePage';
|
|
75
|
-
export { default as PickerView } from "./components/picker-view";
|
|
76
75
|
export { default as Segmented } from './components/segmented';
|
|
77
76
|
export { default as VirtualKeyboard } from './components/virtual-keyboard';
|
|
78
77
|
export { default as VirtualKeyboardTime } from './components/virtual-keyboard/Time';
|
package/es/index.js
CHANGED
|
@@ -92,7 +92,6 @@ export { default as List } from "./components/list";
|
|
|
92
92
|
export { default as Sort } from "./components/sort";
|
|
93
93
|
export { default as InputNumberRange } from "./components/input-number-range";
|
|
94
94
|
export { default as LowCodePage } from "./components/lowCodePage";
|
|
95
|
-
export { default as PickerView } from "./components/picker-view";
|
|
96
95
|
export { default as Segmented } from "./components/segmented";
|
|
97
96
|
export { default as VirtualKeyboard } from "./components/virtual-keyboard";
|
|
98
97
|
export { default as VirtualKeyboardTime } from "./components/virtual-keyboard/Time";
|
package/es/locales/en-US.d.ts
CHANGED
|
@@ -97,17 +97,5 @@ declare const _default: {
|
|
|
97
97
|
'table-action-export-import-log-copy': string;
|
|
98
98
|
'table-action-export-import-table-success-copy': string;
|
|
99
99
|
'drag-sort-tree-unavailable-today-tip': string;
|
|
100
|
-
'date-picker-today': string;
|
|
101
|
-
'date-picker-yesterday': string;
|
|
102
|
-
'date-picker-tomorrow': string;
|
|
103
|
-
'date-picker-next_monday': string;
|
|
104
|
-
'date-picker-last_friday': string;
|
|
105
|
-
'date-picker-first_day_of_this_month': string;
|
|
106
|
-
'date-picker-last_day_of_this_month': string;
|
|
107
|
-
'date-picker-first_day_of_next_month': string;
|
|
108
|
-
'date-picker-last_day_of_last_month': string;
|
|
109
|
-
'date-picker-invalid-date': string;
|
|
110
|
-
"date-picker-apply": string;
|
|
111
|
-
'date-picker-shortcut-custom': string;
|
|
112
100
|
};
|
|
113
101
|
export default _default;
|
package/es/locales/en-US.js
CHANGED
|
@@ -118,18 +118,5 @@ export default {
|
|
|
118
118
|
'table-action-export-import-log-err-log': 'Failure Log',
|
|
119
119
|
'table-action-export-import-log-copy': 'Copy',
|
|
120
120
|
'table-action-export-import-table-success-copy': 'Copy Success',
|
|
121
|
-
'drag-sort-tree-unavailable-today-tip': 'Unavailable today'
|
|
122
|
-
// 日期组件
|
|
123
|
-
'date-picker-today': 'Today',
|
|
124
|
-
'date-picker-yesterday': 'Yesterday',
|
|
125
|
-
'date-picker-tomorrow': 'Tomorrow',
|
|
126
|
-
'date-picker-next_monday': 'Next monday',
|
|
127
|
-
'date-picker-last_friday': 'Last friday',
|
|
128
|
-
'date-picker-first_day_of_this_month': 'First day of this month',
|
|
129
|
-
'date-picker-last_day_of_this_month': 'Last day of this month',
|
|
130
|
-
'date-picker-first_day_of_next_month': 'First day of next month',
|
|
131
|
-
'date-picker-last_day_of_last_month': 'Last day of last month',
|
|
132
|
-
'date-picker-invalid-date': 'Invalid date',
|
|
133
|
-
"date-picker-apply": "Apply",
|
|
134
|
-
'date-picker-shortcut-custom': 'Custom'
|
|
121
|
+
'drag-sort-tree-unavailable-today-tip': 'Unavailable today'
|
|
135
122
|
};
|
package/es/locales/zh-CN.d.ts
CHANGED
|
@@ -97,17 +97,5 @@ declare const _default: {
|
|
|
97
97
|
'table-action-export-import-log-copy': string;
|
|
98
98
|
'table-action-export-import-table-success-copy': string;
|
|
99
99
|
'drag-sort-tree-unavailable-today-tip': string;
|
|
100
|
-
'date-picker-today': string;
|
|
101
|
-
'date-picker-yesterday': string;
|
|
102
|
-
'date-picker-tomorrow': string;
|
|
103
|
-
'date-picker-next_monday': string;
|
|
104
|
-
'date-picker-last_friday': string;
|
|
105
|
-
'date-picker-first_day_of_this_month': string;
|
|
106
|
-
'date-picker-last_day_of_this_month': string;
|
|
107
|
-
'date-picker-first_day_of_next_month': string;
|
|
108
|
-
'date-picker-last_day_of_last_month': string;
|
|
109
|
-
'date-picker-invalid-date': string;
|
|
110
|
-
"date-picker-apply": string;
|
|
111
|
-
'date-picker-shortcut-custom': string;
|
|
112
100
|
};
|
|
113
101
|
export default _default;
|
package/es/locales/zh-CN.js
CHANGED
|
@@ -118,18 +118,5 @@ export default {
|
|
|
118
118
|
'table-action-export-import-log-err-log': '失败日志',
|
|
119
119
|
'table-action-export-import-log-copy': '复制',
|
|
120
120
|
'table-action-export-import-table-success-copy': '复制成功',
|
|
121
|
-
'drag-sort-tree-unavailable-today-tip': '今日不可用'
|
|
122
|
-
// 日期组件
|
|
123
|
-
'date-picker-today': '今天',
|
|
124
|
-
'date-picker-yesterday': '昨天',
|
|
125
|
-
'date-picker-tomorrow': '明天',
|
|
126
|
-
'date-picker-next_monday': '下个星期一',
|
|
127
|
-
'date-picker-last_friday': '上个星期五',
|
|
128
|
-
'date-picker-first_day_of_this_month': '本月的第一天',
|
|
129
|
-
'date-picker-last_day_of_this_month': '本月的最后一天',
|
|
130
|
-
'date-picker-first_day_of_next_month': '下个月的第一天',
|
|
131
|
-
'date-picker-last_day_of_last_month': '上个月的最后一天',
|
|
132
|
-
'date-picker-invalid-date': '无效日期',
|
|
133
|
-
"date-picker-apply": "确定",
|
|
134
|
-
'date-picker-shortcut-custom': '自定义'
|
|
121
|
+
'drag-sort-tree-unavailable-today-tip': '今日不可用'
|
|
135
122
|
};
|
package/es/locales/zh-TW.d.ts
CHANGED
|
@@ -97,17 +97,5 @@ declare const _default: {
|
|
|
97
97
|
'table-action-export-import-log-copy': string;
|
|
98
98
|
'table-action-export-import-table-success-copy': string;
|
|
99
99
|
'drag-sort-tree-unavailable-today-tip': string;
|
|
100
|
-
'date-picker-today': string;
|
|
101
|
-
'date-picker-yesterday': string;
|
|
102
|
-
'date-picker-tomorrow': string;
|
|
103
|
-
'date-picker-next_monday': string;
|
|
104
|
-
'date-picker-last_friday': string;
|
|
105
|
-
'date-picker-first_day_of_this_month': string;
|
|
106
|
-
'date-picker-last_day_of_this_month': string;
|
|
107
|
-
'date-picker-first_day_of_next_month': string;
|
|
108
|
-
'date-picker-last_day_of_last_month': string;
|
|
109
|
-
'date-picker-invalid-date': string;
|
|
110
|
-
"date-picker-apply": string;
|
|
111
|
-
'date-picker-shortcut-custom': string;
|
|
112
100
|
};
|
|
113
101
|
export default _default;
|
package/es/locales/zh-TW.js
CHANGED
|
@@ -118,18 +118,5 @@ export default {
|
|
|
118
118
|
'table-action-export-import-log-err-log': '失敗日誌',
|
|
119
119
|
'table-action-export-import-log-copy': '復製',
|
|
120
120
|
'table-action-export-import-table-success-copy': '復製成功',
|
|
121
|
-
'drag-sort-tree-unavailable-today-tip': '今日不可用'
|
|
122
|
-
// 日期组件
|
|
123
|
-
'date-picker-today': '今天',
|
|
124
|
-
'date-picker-yesterday': '昨天',
|
|
125
|
-
'date-picker-tomorrow': '明天',
|
|
126
|
-
'date-picker-next_monday': '下個星期一',
|
|
127
|
-
'date-picker-last_friday': '上個星期五',
|
|
128
|
-
'date-picker-first_day_of_this_month': '本月的第一天',
|
|
129
|
-
'date-picker-last_day_of_this_month': '本月的最後一天',
|
|
130
|
-
'date-picker-first_day_of_next_month': '下個月的第一天',
|
|
131
|
-
'date-picker-last_day_of_last_month': '上個月的最後一天',
|
|
132
|
-
'date-picker-invalid-date': '無效日期',
|
|
133
|
-
"date-picker-apply": "确定",
|
|
134
|
-
'date-picker-shortcut-custom': '自定義'
|
|
121
|
+
'drag-sort-tree-unavailable-today-tip': '今日不可用'
|
|
135
122
|
};
|
|
@@ -32,15 +32,15 @@ __export(date_picker_exports, {
|
|
|
32
32
|
default: () => date_picker_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(date_picker_exports);
|
|
35
|
+
var import_antd = require("antd");
|
|
35
36
|
var import_hoc = require("../../utils/hoc");
|
|
36
37
|
var import_dayjs = __toESM(require("dayjs"));
|
|
37
38
|
var import_date_picker = require("@pisell/date-picker");
|
|
38
39
|
var import_localeData = __toESM(require("dayjs/plugin/localeData"));
|
|
39
40
|
var import_weekday = __toESM(require("dayjs/plugin/weekday"));
|
|
40
|
-
var import_datePickerCpt = __toESM(require("./datePickerCpt"));
|
|
41
41
|
import_dayjs.default.extend(import_weekday.default);
|
|
42
42
|
import_dayjs.default.extend(import_localeData.default);
|
|
43
|
-
var DatePicker = (0, import_hoc.withMomentProps)(
|
|
43
|
+
var DatePicker = (0, import_hoc.withMomentProps)(import_antd.DatePicker, [
|
|
44
44
|
"defaultPickerValue",
|
|
45
45
|
"defaultValue",
|
|
46
46
|
"showTime.defaultValue",
|
|
@@ -37,6 +37,7 @@ var import_core = require("@dnd-kit/core");
|
|
|
37
37
|
var import_sortable = require("@dnd-kit/sortable");
|
|
38
38
|
var import_TreeItem = __toESM(require("./TreeItem"));
|
|
39
39
|
var import_modifiers = require("@dnd-kit/modifiers");
|
|
40
|
+
var import_index = require("./index.less");
|
|
40
41
|
var DragSortTree = (props) => {
|
|
41
42
|
const { value, rowKey, tabKey, hiddenKeys, onChange } = props;
|
|
42
43
|
const [items, setItems] = (0, import_react.useState)(value || []);
|
|
@@ -58,7 +58,6 @@ var Com = {
|
|
|
58
58
|
import_log: import_ImportLog.default
|
|
59
59
|
};
|
|
60
60
|
var ExportImport = ({ exportImport }) => {
|
|
61
|
-
var _a, _b;
|
|
62
61
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
63
62
|
const [file, setFile] = (0, import_react.useState)(null);
|
|
64
63
|
const [type, setType] = (0, import_react.useState)(import_status.defaultOptions.exportType);
|
|
@@ -67,7 +66,7 @@ var ExportImport = ({ exportImport }) => {
|
|
|
67
66
|
const { state } = (0, import_hooks.useSharedState)(import_model.Context);
|
|
68
67
|
const { originResultDataSource, currentDataSource } = state;
|
|
69
68
|
const context = (0, import_useEngineContext.default)();
|
|
70
|
-
import_utils.request.setRequest(
|
|
69
|
+
import_utils.request.setRequest(context.appHelper.utils.request);
|
|
71
70
|
const _items = (0, import_react.useMemo)(() => {
|
|
72
71
|
const result = Object.entries(import_status.exportImportOptions).map(([key, value2]) => {
|
|
73
72
|
return {
|
|
@@ -78,9 +77,10 @@ var ExportImport = ({ exportImport }) => {
|
|
|
78
77
|
return result;
|
|
79
78
|
}, []);
|
|
80
79
|
const Content = (0, import_react.useMemo)(() => {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
if (!value)
|
|
81
|
+
return null;
|
|
82
|
+
return Com[value];
|
|
83
|
+
}, [value]);
|
|
84
84
|
const _footer = (0, import_react.useMemo)(() => {
|
|
85
85
|
const types = import_status.defaultOptions.footerHintTypes;
|
|
86
86
|
if (types.includes(value)) {
|
|
@@ -45,10 +45,7 @@ var BasicTable = (props) => {
|
|
|
45
45
|
const [filter, setFilter] = (0, import_react.useState)();
|
|
46
46
|
const [sort, setSort] = (0, import_react.useState)();
|
|
47
47
|
const form = import_antd.Form.useFormInstance();
|
|
48
|
-
const formPagination = import_antd.Form.useWatch("pagination", {
|
|
49
|
-
form,
|
|
50
|
-
preserve: true
|
|
51
|
-
}) || {
|
|
48
|
+
const formPagination = import_antd.Form.useWatch("pagination", { form, preserve: true }) || {
|
|
52
49
|
page: 1,
|
|
53
50
|
size: 10
|
|
54
51
|
};
|
|
@@ -147,7 +144,7 @@ var BasicTable = (props) => {
|
|
|
147
144
|
defaultExpandAllRows: true
|
|
148
145
|
}
|
|
149
146
|
}
|
|
150
|
-
), total > ((pagination == null ? void 0 : pagination.pageSize) || ((_a = pagination == null ? void 0 : pagination.pageSizeOptions) == null ? void 0 : _a[0]) || 10)
|
|
147
|
+
), total > ((pagination == null ? void 0 : pagination.pageSize) || ((_a = pagination == null ? void 0 : pagination.pageSizeOptions) == null ? void 0 : _a[0]) || 10) ? /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "pagination" }, /* @__PURE__ */ import_react.default.createElement(
|
|
151
148
|
import_Pagination.FormPagination,
|
|
152
149
|
{
|
|
153
150
|
...pagination,
|
|
@@ -81,10 +81,7 @@ export declare const setTableSettingToLocalStorage: ({ tableId, tableSettingObj,
|
|
|
81
81
|
}>;
|
|
82
82
|
currentViewMode: ModeType;
|
|
83
83
|
currentSettingHash: string;
|
|
84
|
-
}) =>
|
|
85
|
-
key: string;
|
|
86
|
-
value: Record<string, any>;
|
|
87
|
-
} | undefined;
|
|
84
|
+
}) => void;
|
|
88
85
|
export declare const clearTableSettingToLocalStorage: (tableId?: string) => void;
|
|
89
86
|
/**
|
|
90
87
|
* 从本地存储中获取表格设置, 全部配置
|
|
@@ -115,16 +112,7 @@ export declare const setFormValuesToLocalStorage: ({ tableId, allValues, keys, c
|
|
|
115
112
|
keys?: string[] | undefined;
|
|
116
113
|
currentViewMode: ModeType;
|
|
117
114
|
currentSettingHash: string;
|
|
118
|
-
}) =>
|
|
119
|
-
key: string;
|
|
120
|
-
value: Record<string, any>;
|
|
121
|
-
} | undefined;
|
|
122
|
-
/**
|
|
123
|
-
* 获取表格键值
|
|
124
|
-
* @param tableId 表格ID
|
|
125
|
-
* @returns 返回格式化后的表格键值
|
|
126
|
-
*/
|
|
127
|
-
export declare const getTableKey: (tableId: string) => string;
|
|
115
|
+
}) => void;
|
|
128
116
|
/**
|
|
129
117
|
* 合并筛选设置
|
|
130
118
|
* @param list 列表数据
|
|
@@ -36,7 +36,6 @@ __export(utils_exports, {
|
|
|
36
36
|
getHash: () => getHash,
|
|
37
37
|
getIdByRowKey: () => getIdByRowKey,
|
|
38
38
|
getSettingKeyArrByMode: () => getSettingKeyArrByMode,
|
|
39
|
-
getTableKey: () => getTableKey,
|
|
40
39
|
getTableSettingByCurrentViewMode: () => getTableSettingByCurrentViewMode,
|
|
41
40
|
getTableSettingFromLocalStorage: () => getTableSettingFromLocalStorage,
|
|
42
41
|
groupDataSource: () => groupDataSource,
|
|
@@ -271,10 +270,6 @@ var setTableSettingToLocalStorage = ({
|
|
|
271
270
|
}
|
|
272
271
|
};
|
|
273
272
|
localStorage.setItem(getTableKey(tableId), JSON.stringify(newData));
|
|
274
|
-
return {
|
|
275
|
-
key: getTableKey(tableId),
|
|
276
|
-
value: newData
|
|
277
|
-
};
|
|
278
273
|
};
|
|
279
274
|
var clearTableSettingToLocalStorage = (tableId) => {
|
|
280
275
|
if (!tableId)
|
|
@@ -311,7 +306,7 @@ var setFormValuesToLocalStorage = ({
|
|
|
311
306
|
keys == null ? void 0 : keys.forEach((key) => {
|
|
312
307
|
obj[key] = allValues == null ? void 0 : allValues[key];
|
|
313
308
|
});
|
|
314
|
-
|
|
309
|
+
setTableSettingToLocalStorage({
|
|
315
310
|
tableId,
|
|
316
311
|
tableSettingObj: obj,
|
|
317
312
|
currentViewMode,
|
|
@@ -465,7 +460,6 @@ var stringify = (obj) => {
|
|
|
465
460
|
getHash,
|
|
466
461
|
getIdByRowKey,
|
|
467
462
|
getSettingKeyArrByMode,
|
|
468
|
-
getTableKey,
|
|
469
463
|
getTableSettingByCurrentViewMode,
|
|
470
464
|
getTableSettingFromLocalStorage,
|
|
471
465
|
groupDataSource,
|