@pisell/materials 3.0.3 → 3.0.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/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/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +16 -16
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +20 -20
- package/dist/umd/materials.min.css +1 -0
- package/dist/umd/materials.min.js +1 -0
- package/dist/umd/static/DotsSix.57d66266.svg +1 -0
- package/dist/umd/static/arrow-left.e542294f.svg +1 -0
- package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
- package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
- package/dist/umd/static/help-circle.31c9be40.svg +1 -0
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
- package/es/components/auto-complete-number/index.d.ts +10 -0
- package/es/components/auto-complete-number/index.js +28 -0
- package/es/components/filter/components/FilterButton/index.js +0 -1
- package/es/components/sort/index.js +1 -1
- package/es/components/sort/types.d.ts +1 -0
- package/es/components/table/Gallery/index.js +6 -2
- package/es/components/table/Gallery/types.d.ts +2 -1
- package/es/components/table/Table/fields/rangePicker/Edit/index.js +8 -7
- package/es/components/table/Table/fields/search/Edit/index.js +1 -0
- package/es/components/table/Table/index.js +6 -2
- package/es/components/table/Table/index.less +1 -0
- package/es/components/table/Table/tableConfig/body/index.less +0 -2
- package/es/components/table/Table/tableConfig/header/index.js +1 -3
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/View/index.js +7 -4
- package/es/components/table/hooks/useTransColumns.js +2 -1
- package/es/components/table/hooks/useTransSortSetting.js +4 -1
- package/es/components/table/hooks/useTriggerValuesChange.js +24 -2
- package/es/components/table/index.js +4 -3
- package/es/components/table/index.less +12 -0
- package/es/components/table/types.d.ts +9 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/locales/en-US.d.ts +7 -0
- package/es/locales/en-US.js +8 -1
- package/es/locales/zh-CN.d.ts +7 -0
- package/es/locales/zh-CN.js +8 -1
- package/es/locales/zh-TW.d.ts +7 -0
- package/es/locales/zh-TW.js +8 -1
- package/lib/components/auto-complete-number/index.d.ts +10 -0
- package/lib/components/auto-complete-number/index.js +48 -0
- package/lib/components/filter/components/FilterButton/index.js +0 -1
- package/lib/components/sort/index.js +1 -1
- package/lib/components/sort/types.d.ts +1 -0
- package/lib/components/table/Gallery/index.js +4 -1
- package/lib/components/table/Gallery/types.d.ts +2 -1
- package/lib/components/table/Table/fields/rangePicker/Edit/index.js +8 -7
- package/lib/components/table/Table/fields/search/Edit/index.js +1 -0
- package/lib/components/table/Table/index.js +4 -1
- package/lib/components/table/Table/index.less +1 -0
- package/lib/components/table/Table/tableConfig/body/index.less +0 -2
- package/lib/components/table/Table/tableConfig/header/index.js +2 -2
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/View/index.js +12 -2
- package/lib/components/table/hooks/useTransColumns.js +2 -1
- package/lib/components/table/hooks/useTransSortSetting.js +3 -1
- package/lib/components/table/hooks/useTriggerValuesChange.js +18 -3
- package/lib/components/table/index.js +3 -2
- package/lib/components/table/index.less +12 -0
- package/lib/components/table/types.d.ts +9 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/locales/en-US.d.ts +7 -0
- package/lib/locales/en-US.js +8 -1
- package/lib/locales/zh-CN.d.ts +7 -0
- package/lib/locales/zh-CN.js +8 -1
- package/lib/locales/zh-TW.d.ts +7 -0
- package/lib/locales/zh-TW.js +8 -1
- package/lowcode/auto-complete/meta.ts +5 -0
- package/lowcode/auto-complete-number/__screenshots__/auto-complete-1.png +0 -0
- package/lowcode/auto-complete-number/meta.ts +75 -0
- package/lowcode/auto-complete-number/snippets.ts +26 -0
- package/lowcode/table/meta.ts +33 -0
- package/package.json +3 -3
|
@@ -44,7 +44,7 @@ var import_constant = require("./constant");
|
|
|
44
44
|
var import_index = require("./index.less");
|
|
45
45
|
var prefix = "pisell-lowcode-";
|
|
46
46
|
var Gallery = (props) => {
|
|
47
|
-
const { gallery, filter, pagination, rowKey, loading } = props;
|
|
47
|
+
const { gallery, filter, pagination, rowKey, loading, onDataSourceChange } = props;
|
|
48
48
|
const {
|
|
49
49
|
horizontalGutter,
|
|
50
50
|
verticalGutter,
|
|
@@ -73,6 +73,9 @@ var Gallery = (props) => {
|
|
|
73
73
|
rowKey,
|
|
74
74
|
filter
|
|
75
75
|
});
|
|
76
|
+
(0, import_react.useEffect)(() => {
|
|
77
|
+
onDataSourceChange == null ? void 0 : onDataSourceChange(dataSource);
|
|
78
|
+
}, [JSON.stringify(dataSource)]);
|
|
76
79
|
const columnsMap = (0, import_react.useMemo)(() => {
|
|
77
80
|
return new Map(originColumns.map((item) => [item.key, item]));
|
|
78
81
|
}, [originColumns]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GallerySettingType } from "../types";
|
|
1
|
+
import { GallerySettingType, GridViewProps } from "../types";
|
|
2
2
|
import { FilterType } from "../../filter/types";
|
|
3
3
|
export declare type GalleryProps = {
|
|
4
4
|
gallery: GallerySettingType;
|
|
@@ -6,4 +6,5 @@ export declare type GalleryProps = {
|
|
|
6
6
|
pagination: any;
|
|
7
7
|
rowKey: ((record: Record<string, any>) => string) | string;
|
|
8
8
|
loading: boolean;
|
|
9
|
+
onDataSourceChange: GridViewProps['onDataSourceChange'];
|
|
9
10
|
};
|
|
@@ -36,6 +36,7 @@ var import_utils = require("@pisell/utils");
|
|
|
36
36
|
var import_dayjs = __toESM(require("dayjs"));
|
|
37
37
|
var import_react = __toESM(require("react"));
|
|
38
38
|
var import_date_picker = __toESM(require("../../../../../date-picker"));
|
|
39
|
+
var import_locales = require("../../../../../../locales");
|
|
39
40
|
var { RangePicker } = import_date_picker.default;
|
|
40
41
|
var defaultFormat = "YYYY-MM-DD HH:mm:ss";
|
|
41
42
|
var Edit = (props, ref) => {
|
|
@@ -64,32 +65,32 @@ var Edit = (props, ref) => {
|
|
|
64
65
|
return value;
|
|
65
66
|
}, [value]);
|
|
66
67
|
const rangePresets = [
|
|
67
|
-
{ label: "
|
|
68
|
+
{ label: (0, import_locales.getText)("table-action-range-picker-presets-today"), value: [(0, import_dayjs.default)().startOf("day"), (0, import_dayjs.default)().endOf("day")] },
|
|
68
69
|
{
|
|
69
|
-
label: "
|
|
70
|
+
label: (0, import_locales.getText)("table-action-range-picker-presets-yesterday"),
|
|
70
71
|
value: [
|
|
71
72
|
(0, import_dayjs.default)().add(-1, "d").startOf("day"),
|
|
72
73
|
(0, import_dayjs.default)().add(-1, "d").endOf("day")
|
|
73
74
|
]
|
|
74
75
|
},
|
|
75
76
|
{
|
|
76
|
-
label: "
|
|
77
|
+
label: (0, import_locales.getText)("table-action-range-picker-presets-last-3-day"),
|
|
77
78
|
value: [(0, import_dayjs.default)().add(-3, "d").startOf("day"), (0, import_dayjs.default)().endOf("day")]
|
|
78
79
|
},
|
|
79
80
|
{
|
|
80
|
-
label: "
|
|
81
|
+
label: (0, import_locales.getText)("table-action-range-picker-presets-last-7-day"),
|
|
81
82
|
value: [(0, import_dayjs.default)().add(-7, "d").startOf("day"), (0, import_dayjs.default)().endOf("day")]
|
|
82
83
|
},
|
|
83
84
|
{
|
|
84
|
-
label: "
|
|
85
|
+
label: (0, import_locales.getText)("table-action-range-picker-presets-last-14-day"),
|
|
85
86
|
value: [(0, import_dayjs.default)().add(-14, "d").startOf("day"), (0, import_dayjs.default)().endOf("day")]
|
|
86
87
|
},
|
|
87
88
|
{
|
|
88
|
-
label: "
|
|
89
|
+
label: (0, import_locales.getText)("table-action-range-picker-presets-last-30-day"),
|
|
89
90
|
value: [(0, import_dayjs.default)().add(-30, "d").startOf("day"), (0, import_dayjs.default)().endOf("day")]
|
|
90
91
|
},
|
|
91
92
|
{
|
|
92
|
-
label: "
|
|
93
|
+
label: (0, import_locales.getText)("table-action-range-picker-presets-last-90-day"),
|
|
93
94
|
value: [(0, import_dayjs.default)().add(-90, "d").startOf("day"), (0, import_dayjs.default)().endOf("day")]
|
|
94
95
|
}
|
|
95
96
|
];
|
|
@@ -46,7 +46,7 @@ var import_useGenTableComponents = __toESM(require("../hooks/useGenTableComponen
|
|
|
46
46
|
var import_useGenScroll = __toESM(require("../hooks/useGenScroll"));
|
|
47
47
|
var import_hooks = require("../../../hooks");
|
|
48
48
|
var import_index = require("./index.less");
|
|
49
|
-
var GridViewTable = ({ tableProps, filter, setTableSetting }) => {
|
|
49
|
+
var GridViewTable = ({ tableProps, filter, setTableSetting, onDataSourceChange }) => {
|
|
50
50
|
var _a, _b;
|
|
51
51
|
const responsive = (0, import_hooks.useResponsive)();
|
|
52
52
|
const { state, dispatch } = (0, import_hooks.useSharedState)(import_model.Context);
|
|
@@ -92,6 +92,9 @@ var GridViewTable = ({ tableProps, filter, setTableSetting }) => {
|
|
|
92
92
|
rowKey: tableProps.rowKey,
|
|
93
93
|
filter
|
|
94
94
|
});
|
|
95
|
+
(0, import_react.useEffect)(() => {
|
|
96
|
+
onDataSourceChange == null ? void 0 : onDataSourceChange(dataSource);
|
|
97
|
+
}, [JSON.stringify(dataSource)]);
|
|
95
98
|
const components = (0, import_useGenTableComponents.default)({
|
|
96
99
|
form
|
|
97
100
|
});
|
|
@@ -85,8 +85,8 @@ var CustomHeaderCell = (props) => {
|
|
|
85
85
|
const isCheckbox = !props.record;
|
|
86
86
|
if (isCheckbox) {
|
|
87
87
|
restProps.style = {
|
|
88
|
-
...restProps.style
|
|
89
|
-
paddingInlineStart: 8
|
|
88
|
+
...restProps.style
|
|
89
|
+
// paddingInlineStart: 8,
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -146,7 +146,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
146
146
|
sort?: SortType | undefined;
|
|
147
147
|
mode: "" | "localStorage" | "remote";
|
|
148
148
|
currentViewMode: ModeType;
|
|
149
|
-
}) => ("filter_setting" | "
|
|
149
|
+
}) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
|
|
150
150
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
151
151
|
export declare const stringify: (obj: Record<string, any>) => string;
|
|
152
152
|
export {};
|
|
@@ -54,6 +54,7 @@ var View = (props) => {
|
|
|
54
54
|
view,
|
|
55
55
|
gallery,
|
|
56
56
|
setTableSetting,
|
|
57
|
+
onDataSourceChange,
|
|
57
58
|
...other
|
|
58
59
|
} = props;
|
|
59
60
|
const form = import_antd.Form.useFormInstance();
|
|
@@ -61,14 +62,23 @@ var View = (props) => {
|
|
|
61
62
|
form,
|
|
62
63
|
preserve: true
|
|
63
64
|
});
|
|
64
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, viewMode === "grid" && /* @__PURE__ */ import_react.default.createElement(
|
|
65
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, viewMode === "grid" && /* @__PURE__ */ import_react.default.createElement(
|
|
66
|
+
import_Table.default,
|
|
67
|
+
{
|
|
68
|
+
tableProps: other,
|
|
69
|
+
filter,
|
|
70
|
+
setTableSetting,
|
|
71
|
+
onDataSourceChange
|
|
72
|
+
}
|
|
73
|
+
), viewMode === "gallery" && /* @__PURE__ */ import_react.default.createElement(
|
|
65
74
|
import_Gallery.default,
|
|
66
75
|
{
|
|
67
76
|
loading: other == null ? void 0 : other.loading,
|
|
68
77
|
gallery,
|
|
69
78
|
pagination: other.pagination,
|
|
70
79
|
filter,
|
|
71
|
-
rowKey: other.rowKey
|
|
80
|
+
rowKey: other.rowKey,
|
|
81
|
+
onDataSourceChange
|
|
72
82
|
}
|
|
73
83
|
));
|
|
74
84
|
};
|
|
@@ -23,6 +23,7 @@ __export(useTransSortSetting_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(useTransSortSetting_exports);
|
|
25
25
|
var import_react = require("react");
|
|
26
|
+
var import_utils = require("@pisell/utils");
|
|
26
27
|
var useTransSortSetting = (params) => {
|
|
27
28
|
const { sort, originColumnsMap } = params;
|
|
28
29
|
return (0, import_react.useMemo)(() => {
|
|
@@ -30,7 +31,7 @@ var useTransSortSetting = (params) => {
|
|
|
30
31
|
return {
|
|
31
32
|
...sort,
|
|
32
33
|
list: sort.list.map((item) => {
|
|
33
|
-
let { name, label, columnKey, isCustom } = item;
|
|
34
|
+
let { name, label, columnKey, isCustom, localFilter } = item;
|
|
34
35
|
if (!isCustom && columnKey && originColumnsMap.has(columnKey)) {
|
|
35
36
|
const column = originColumnsMap.get(columnKey);
|
|
36
37
|
name = column.dataIndex || name;
|
|
@@ -38,6 +39,7 @@ var useTransSortSetting = (params) => {
|
|
|
38
39
|
}
|
|
39
40
|
return {
|
|
40
41
|
...item,
|
|
42
|
+
localFilter: (0, import_utils.isBoolean)(localFilter) ? localFilter : true,
|
|
41
43
|
name,
|
|
42
44
|
label
|
|
43
45
|
};
|
|
@@ -27,9 +27,10 @@ var import_utils = require("../Table/utils");
|
|
|
27
27
|
var useTriggerValuesChange = (params) => {
|
|
28
28
|
const { filter, columnSetting, dataSourceGroup, sort, currentViewMode } = params;
|
|
29
29
|
const { list, show } = filter || {};
|
|
30
|
+
const { list: sortList, show: sortShow } = sort || {};
|
|
30
31
|
const getIsTriggerValuesChange = (0, import_react.useCallback)(
|
|
31
32
|
(changedValues, values) => {
|
|
32
|
-
var _a;
|
|
33
|
+
var _a, _b, _c;
|
|
33
34
|
const keys = (0, import_utils.getSettingKeyArrByMode)({
|
|
34
35
|
filter,
|
|
35
36
|
columnSetting,
|
|
@@ -45,10 +46,24 @@ var useTriggerValuesChange = (params) => {
|
|
|
45
46
|
if (changedKey === "view_mode") {
|
|
46
47
|
return false;
|
|
47
48
|
}
|
|
49
|
+
if (changedKey === "order_by") {
|
|
50
|
+
if (sortShow && (sortList == null ? void 0 : sortList.length)) {
|
|
51
|
+
const value = changedValues[changedKey];
|
|
52
|
+
const sortField = ((_b = (_a = value == null ? void 0 : value.split) == null ? void 0 : _a.call(value, ":")) == null ? void 0 : _b[0]) || "";
|
|
53
|
+
const remoteSortKeys = sortList.filter((item) => !item.localFilter).map((item) => {
|
|
54
|
+
var _a2;
|
|
55
|
+
return (_a2 = item.name) == null ? void 0 : _a2.toString();
|
|
56
|
+
});
|
|
57
|
+
return remoteSortKeys.includes(sortField);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
48
60
|
if (changedKey === "filters") {
|
|
49
|
-
const filterKey = ((
|
|
61
|
+
const filterKey = ((_c = Object.keys(changedValues.filters)) == null ? void 0 : _c[0]) || "";
|
|
50
62
|
if (show && (list == null ? void 0 : list.length)) {
|
|
51
|
-
const remoteFilterKeys = list.filter((item) => !item.localFilter).map((item) =>
|
|
63
|
+
const remoteFilterKeys = list.filter((item) => !item.localFilter).map((item) => {
|
|
64
|
+
var _a2;
|
|
65
|
+
return (_a2 = item.name) == null ? void 0 : _a2.toString();
|
|
66
|
+
});
|
|
52
67
|
return remoteFilterKeys.includes(filterKey);
|
|
53
68
|
}
|
|
54
69
|
}
|
|
@@ -72,6 +72,7 @@ var GridView = (0, import_model.Provider)(
|
|
|
72
72
|
dataSourceGroup: propsDataSourceGroup,
|
|
73
73
|
view = defaultView,
|
|
74
74
|
gallery,
|
|
75
|
+
currentSettingKey,
|
|
75
76
|
// pagination,
|
|
76
77
|
...other
|
|
77
78
|
} = props;
|
|
@@ -117,8 +118,8 @@ var GridView = (0, import_model.Provider)(
|
|
|
117
118
|
return viewMode || defaultViewMode;
|
|
118
119
|
}, [viewMode, defaultViewMode, multiple]);
|
|
119
120
|
const currentSettingHash = (0, import_react.useMemo)(() => {
|
|
120
|
-
return (0, import_utils.getHash)(columns) || "";
|
|
121
|
-
}, [JSON.stringify(columns)]);
|
|
121
|
+
return currentSettingKey || (0, import_utils.getHash)(columns) || "";
|
|
122
|
+
}, [currentSettingKey, JSON.stringify(columns)]);
|
|
122
123
|
(0, import_react.useEffect)(() => {
|
|
123
124
|
const setting = (0, import_utils.getTableSettingFromLocalStorage)(tableId);
|
|
124
125
|
if (setting.currentSettingHash !== currentSettingHash) {
|
|
@@ -75,4 +75,16 @@
|
|
|
75
75
|
.pisell-lowcode-table-wrapper .pisell-lowcode-table-thead tr th:first-child {
|
|
76
76
|
border-left: 1px solid #EAECF0;
|
|
77
77
|
}
|
|
78
|
+
div.pisell-lowcode-table-selection-column {
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
}
|
|
83
|
+
.drag-sort-cell {
|
|
84
|
+
.editable-cell-value-wrap {
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
78
90
|
}
|
|
@@ -188,5 +188,14 @@ export declare type GridViewProps = {
|
|
|
188
188
|
onSortChange?: (detail: SortDetail) => boolean;
|
|
189
189
|
__id?: string;
|
|
190
190
|
__designMode?: "design";
|
|
191
|
+
/**
|
|
192
|
+
* 当前本地配置的key 用此hash是否改变用来判断是否清空本地配置 不填默认使用columns数据生成hash
|
|
193
|
+
*/
|
|
194
|
+
currentSettingKey?: "";
|
|
195
|
+
/**
|
|
196
|
+
* 当前表格中数据发生变化事件 包含本地筛选和外部传入数据变化
|
|
197
|
+
* @param currentDataSource
|
|
198
|
+
*/
|
|
199
|
+
onDataSourceChange?: (currentDataSource: Record<string, any>[]) => void;
|
|
191
200
|
};
|
|
192
201
|
export {};
|
package/lib/index.d.ts
CHANGED
|
@@ -73,3 +73,4 @@ 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
75
|
export { default as Segmented } from "./components/segmented";
|
|
76
|
+
export { default as AutoCompleteNumber } from "./components/auto-complete-number";
|
package/lib/index.js
CHANGED
|
@@ -33,6 +33,7 @@ __export(src_exports, {
|
|
|
33
33
|
Alert: () => import_antd3.Alert,
|
|
34
34
|
Anchor: () => import_antd2.Anchor,
|
|
35
35
|
AutoComplete: () => import_auto_complete.default,
|
|
36
|
+
AutoCompleteNumber: () => import_auto_complete_number.default,
|
|
36
37
|
Avatar: () => import_antd4.Avatar,
|
|
37
38
|
Badge: () => import_antd5.Badge,
|
|
38
39
|
Breadcrumb: () => import_antd6.Breadcrumb,
|
|
@@ -181,12 +182,14 @@ var import_sort = __toESM(require("./components/sort"));
|
|
|
181
182
|
var import_input_number_range = __toESM(require("./components/input-number-range"));
|
|
182
183
|
var import_lowCodePage = __toESM(require("./components/lowCodePage"));
|
|
183
184
|
var import_segmented = __toESM(require("./components/segmented"));
|
|
185
|
+
var import_auto_complete_number = __toESM(require("./components/auto-complete-number"));
|
|
184
186
|
// Annotate the CommonJS export names for ESM import in node:
|
|
185
187
|
0 && (module.exports = {
|
|
186
188
|
Affix,
|
|
187
189
|
Alert,
|
|
188
190
|
Anchor,
|
|
189
191
|
AutoComplete,
|
|
192
|
+
AutoCompleteNumber,
|
|
190
193
|
Avatar,
|
|
191
194
|
Badge,
|
|
192
195
|
Breadcrumb,
|
package/lib/locales/en-US.d.ts
CHANGED
|
@@ -28,5 +28,12 @@ declare const _default: {
|
|
|
28
28
|
"table-column-group-records": string;
|
|
29
29
|
"table-column-drag-sort-disabled-tip": string;
|
|
30
30
|
"table-action-filter-no-filter": string;
|
|
31
|
+
"table-action-range-picker-presets-today": string;
|
|
32
|
+
"table-action-range-picker-presets-yesterday": string;
|
|
33
|
+
"table-action-range-picker-presets-last-3-day": string;
|
|
34
|
+
"table-action-range-picker-presets-last-7-day": string;
|
|
35
|
+
"table-action-range-picker-presets-last-14-day": string;
|
|
36
|
+
"table-action-range-picker-presets-last-30-day": string;
|
|
37
|
+
"table-action-range-picker-presets-last-90-day": string;
|
|
31
38
|
};
|
|
32
39
|
export default _default;
|
package/lib/locales/en-US.js
CHANGED
|
@@ -51,5 +51,12 @@ var en_US_default = {
|
|
|
51
51
|
"table-action-column-title": "Header settings",
|
|
52
52
|
"table-column-group-records": "records",
|
|
53
53
|
"table-column-drag-sort-disabled-tip": "Automatic sorting is enabled, manual dragging is disabled.",
|
|
54
|
-
"table-action-filter-no-filter": "No filter options available."
|
|
54
|
+
"table-action-filter-no-filter": "No filter options available.",
|
|
55
|
+
"table-action-range-picker-presets-today": "Today",
|
|
56
|
+
"table-action-range-picker-presets-yesterday": "Yesterday",
|
|
57
|
+
"table-action-range-picker-presets-last-3-day": "Last 3 Days",
|
|
58
|
+
"table-action-range-picker-presets-last-7-day": "Last 7 Days",
|
|
59
|
+
"table-action-range-picker-presets-last-14-day": "Last 14 Days",
|
|
60
|
+
"table-action-range-picker-presets-last-30-day": "Last 30 Days",
|
|
61
|
+
"table-action-range-picker-presets-last-90-day": "Last 90 Days"
|
|
55
62
|
};
|
package/lib/locales/zh-CN.d.ts
CHANGED
|
@@ -28,5 +28,12 @@ declare const _default: {
|
|
|
28
28
|
"table-column-group-records": string;
|
|
29
29
|
"table-column-drag-sort-disabled-tip": string;
|
|
30
30
|
"table-action-filter-no-filter": string;
|
|
31
|
+
"table-action-range-picker-presets-today": string;
|
|
32
|
+
"table-action-range-picker-presets-yesterday": string;
|
|
33
|
+
"table-action-range-picker-presets-last-3-day": string;
|
|
34
|
+
"table-action-range-picker-presets-last-7-day": string;
|
|
35
|
+
"table-action-range-picker-presets-last-14-day": string;
|
|
36
|
+
"table-action-range-picker-presets-last-30-day": string;
|
|
37
|
+
"table-action-range-picker-presets-last-90-day": string;
|
|
31
38
|
};
|
|
32
39
|
export default _default;
|
package/lib/locales/zh-CN.js
CHANGED
|
@@ -51,5 +51,12 @@ var zh_CN_default = {
|
|
|
51
51
|
"table-action-column-title": "表头设置",
|
|
52
52
|
"table-column-group-records": "条记录",
|
|
53
53
|
"table-column-drag-sort-disabled-tip": "已开启自动排序,无法手动拖拽",
|
|
54
|
-
"table-action-filter-no-filter": "没有可用的筛选器。"
|
|
54
|
+
"table-action-filter-no-filter": "没有可用的筛选器。",
|
|
55
|
+
"table-action-range-picker-presets-today": "今天",
|
|
56
|
+
"table-action-range-picker-presets-yesterday": "昨天",
|
|
57
|
+
"table-action-range-picker-presets-last-3-day": "过去3天",
|
|
58
|
+
"table-action-range-picker-presets-last-7-day": "过去7天",
|
|
59
|
+
"table-action-range-picker-presets-last-14-day": "过去14天",
|
|
60
|
+
"table-action-range-picker-presets-last-30-day": "过去30天",
|
|
61
|
+
"table-action-range-picker-presets-last-90-day": "过去90天"
|
|
55
62
|
};
|
package/lib/locales/zh-TW.d.ts
CHANGED
|
@@ -28,5 +28,12 @@ declare const _default: {
|
|
|
28
28
|
"table-column-group-records": string;
|
|
29
29
|
"table-column-drag-sort-disabled-tip": string;
|
|
30
30
|
"table-action-filter-no-filter": string;
|
|
31
|
+
"table-action-range-picker-presets-today": string;
|
|
32
|
+
"table-action-range-picker-presets-yesterday": string;
|
|
33
|
+
"table-action-range-picker-presets-last-3-day": string;
|
|
34
|
+
"table-action-range-picker-presets-last-7-day": string;
|
|
35
|
+
"table-action-range-picker-presets-last-14-day": string;
|
|
36
|
+
"table-action-range-picker-presets-last-30-day": string;
|
|
37
|
+
"table-action-range-picker-presets-last-90-day": string;
|
|
31
38
|
};
|
|
32
39
|
export default _default;
|
package/lib/locales/zh-TW.js
CHANGED
|
@@ -51,5 +51,12 @@ var zh_TW_default = {
|
|
|
51
51
|
"table-action-column-title": "表頭設置",
|
|
52
52
|
"table-column-group-records": "條記錄",
|
|
53
53
|
"table-column-drag-sort-disabled-tip": "已開啟自動排序,無法手動拖曳",
|
|
54
|
-
"table-action-filter-no-filter": "沒有可用的篩選器。"
|
|
54
|
+
"table-action-filter-no-filter": "沒有可用的篩選器。",
|
|
55
|
+
"table-action-range-picker-presets-today": "今天",
|
|
56
|
+
"table-action-range-picker-presets-yesterday": "昨天",
|
|
57
|
+
"table-action-range-picker-presets-last-3-day": "過去3天",
|
|
58
|
+
"table-action-range-picker-presets-last-7-day": "過去7天",
|
|
59
|
+
"table-action-range-picker-presets-last-14-day": "過去14天",
|
|
60
|
+
"table-action-range-picker-presets-last-30-day": "過去30天",
|
|
61
|
+
"table-action-range-picker-presets-last-90-day": "過去90天"
|
|
55
62
|
};
|
|
@@ -157,6 +157,11 @@ export default {
|
|
|
157
157
|
title: { label: "无数据展示", tip: "当下拉列表为空时显示的内容" },
|
|
158
158
|
setter: "PisellI18nSetter",
|
|
159
159
|
},
|
|
160
|
+
{
|
|
161
|
+
name: "children",
|
|
162
|
+
title: { label: "自定义输入框", tip: "自定义输入框" },
|
|
163
|
+
setter: ['SlotSetter']
|
|
164
|
+
},
|
|
160
165
|
],
|
|
161
166
|
configure: {
|
|
162
167
|
/*props: [
|
|
Binary file
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { uuid } from "../_utils/utils";
|
|
2
|
+
|
|
3
|
+
import snippets from "./snippets";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
snippets,
|
|
7
|
+
componentName: "AutoCompleteNumber",
|
|
8
|
+
title: "辅助提示数字框",
|
|
9
|
+
category: "表单",
|
|
10
|
+
docUrl: "",
|
|
11
|
+
screenshot: "",
|
|
12
|
+
devMode: "proCode",
|
|
13
|
+
npm: {
|
|
14
|
+
package: "@pisell/materials",
|
|
15
|
+
version: "1.0.1",
|
|
16
|
+
exportName: "AutoCompleteNumber",
|
|
17
|
+
main: "src/index.tsx",
|
|
18
|
+
destructuring: true,
|
|
19
|
+
subName: "",
|
|
20
|
+
},
|
|
21
|
+
props: [
|
|
22
|
+
{
|
|
23
|
+
name: "value",
|
|
24
|
+
title: { label: "当前值", tip: "当前选中值" },
|
|
25
|
+
setter: "StringSetter",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: "autoCompleteProps",
|
|
29
|
+
title: { label: "辅助提示数字框Props" },
|
|
30
|
+
setter: ["JsonSetter", "VariableSetter"],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "inputNumberProps",
|
|
34
|
+
title: { label: "数字框Props" },
|
|
35
|
+
setter: ["JsonSetter", "VariableSetter"],
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
configure: {
|
|
39
|
+
supports: {
|
|
40
|
+
style: true,
|
|
41
|
+
events: [
|
|
42
|
+
{
|
|
43
|
+
name: "onBlur",
|
|
44
|
+
template:
|
|
45
|
+
"onBlur(${extParams}){\n// 失去焦点时的回调\nconsole.log('onBlur');}",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "onChange",
|
|
49
|
+
template:
|
|
50
|
+
"onChange(value,${extParams}){\n// 选中 option,或 input 的 value 变化时,调用此函数\nconsole.log('onChange', value);}",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "onFocus",
|
|
54
|
+
template:
|
|
55
|
+
"onFocus(${extParams}){\n// 选中 option,或 input 的 value 变化时,调用此函数\nconsole.log('onFocus')}",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: "onSearch",
|
|
59
|
+
template:
|
|
60
|
+
"onSearch(value,${extParams}){\n// 搜索补全项的时候调用\nconsole.log('onSearch',value);}",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: "onSelect",
|
|
64
|
+
template:
|
|
65
|
+
"onSelect(value,option,${extParams}){\n// 被选中时调用\nconsole.log('onSelect', value, option);}",
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: "onDropdownVisibleChange",
|
|
69
|
+
template:
|
|
70
|
+
"onDropdownVisibleChange(open,${extParams}){\n// 展开下拉菜单的回调\nconsole.log('onDropdownVisibleChange', open);}",
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
title: '辅助提示数字框',
|
|
4
|
+
screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/auto-complete-1.png',
|
|
5
|
+
schema: {
|
|
6
|
+
componentName: 'AutoCompleteNumber',
|
|
7
|
+
props: {
|
|
8
|
+
placeholder: '请输入',
|
|
9
|
+
options: [
|
|
10
|
+
{
|
|
11
|
+
label: '测试1',
|
|
12
|
+
value: 'aaa',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
label: '测试2',
|
|
16
|
+
value: 'bbb',
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
filterOption: true,
|
|
20
|
+
style: {
|
|
21
|
+
width: '200px',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
];
|
package/lowcode/table/meta.ts
CHANGED
|
@@ -73,6 +73,15 @@ export default {
|
|
|
73
73
|
],
|
|
74
74
|
defaultValue: "id",
|
|
75
75
|
},
|
|
76
|
+
{
|
|
77
|
+
name: "currentSettingKey",
|
|
78
|
+
title: {
|
|
79
|
+
label: "currentSettingKey",
|
|
80
|
+
tip: "currentSettingKey | 当前本地配置的key 用此hash是否改变用来判断是否清空本地配置 不填默认使用columns数据生成hash",
|
|
81
|
+
},
|
|
82
|
+
propType: "string",
|
|
83
|
+
setter: "StringSetter",
|
|
84
|
+
}
|
|
76
85
|
],
|
|
77
86
|
},
|
|
78
87
|
{
|
|
@@ -1175,6 +1184,16 @@ export default {
|
|
|
1175
1184
|
value: 'target => !!target.getProps().getPropValue("rowSelection")',
|
|
1176
1185
|
},
|
|
1177
1186
|
},
|
|
1187
|
+
{
|
|
1188
|
+
name: "rowSelection.columnWidth",
|
|
1189
|
+
title: { label: "自定义列表选择框宽度", tip: "rowSelection.columnWidth | 自定义列表选择框宽度" },
|
|
1190
|
+
propType: {
|
|
1191
|
+
type: "oneOfType",
|
|
1192
|
+
value: ["number", "string"],
|
|
1193
|
+
},
|
|
1194
|
+
setter: ["NumberSetter", "StringSetter", "VariableSetter"],
|
|
1195
|
+
defaultValue: 48,
|
|
1196
|
+
},
|
|
1178
1197
|
{
|
|
1179
1198
|
name: "rowSelection.selectedRowKeys",
|
|
1180
1199
|
title: {
|
|
@@ -1909,6 +1928,16 @@ export default {
|
|
|
1909
1928
|
"StringSetter",
|
|
1910
1929
|
],
|
|
1911
1930
|
},
|
|
1931
|
+
{
|
|
1932
|
+
name: "localFilter",
|
|
1933
|
+
title: {
|
|
1934
|
+
label: "开启本地排序",
|
|
1935
|
+
tip: "开启本地排序时,排序改变会走本地前端排序,关闭时是调用接口对数据更新。",
|
|
1936
|
+
},
|
|
1937
|
+
propType: "bool",
|
|
1938
|
+
setter: "BoolSetter",
|
|
1939
|
+
defaultValue: true,
|
|
1940
|
+
},
|
|
1912
1941
|
{
|
|
1913
1942
|
name: "label",
|
|
1914
1943
|
title: { label: "排序项", tip: "排序项展示文案" },
|
|
@@ -2146,6 +2175,10 @@ export default {
|
|
|
2146
2175
|
name: "onValuesChange",
|
|
2147
2176
|
template: "onValuesChange(changedValues, values){}",
|
|
2148
2177
|
},
|
|
2178
|
+
{
|
|
2179
|
+
name: "onDataSourceChange",
|
|
2180
|
+
template: "onDataSourceChange(currentDataSource) {}"
|
|
2181
|
+
},
|
|
2149
2182
|
{
|
|
2150
2183
|
name: "rowSelection.onChange",
|
|
2151
2184
|
template:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"react-virtualized-auto-sizer": "^1.0.20",
|
|
63
63
|
"crypto-js": "^4.2.0",
|
|
64
64
|
"@pisell/icon": "0.0.8",
|
|
65
|
-
"@pisell/
|
|
66
|
-
"@pisell/
|
|
65
|
+
"@pisell/utils": "1.0.24",
|
|
66
|
+
"@pisell/date-picker": "1.0.69"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"react": "^18.0.0",
|