@pisell/materials 1.0.241 → 1.0.243
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 +1 -1
- package/build/lowcode/preview.js +3 -3
- package/build/lowcode/render/default/view.js +4 -4
- package/build/lowcode/view.js +4 -4
- package/es/components/MultipleContainersSortList/index.js +2 -1
- package/es/components/filter/index.js +3 -2
- package/es/components/sort/index.js +3 -2
- package/es/locales/en-US.d.ts +1 -0
- package/es/locales/en-US.js +2 -1
- package/es/locales/zh-CN.d.ts +1 -0
- package/es/locales/zh-CN.js +2 -1
- package/es/locales/zh-TW.d.ts +1 -0
- package/es/locales/zh-TW.js +2 -1
- package/lib/components/MultipleContainersSortList/index.js +2 -1
- package/lib/components/filter/index.js +3 -2
- package/lib/components/sort/index.js +3 -2
- package/lib/locales/en-US.d.ts +1 -0
- package/lib/locales/en-US.js +2 -1
- package/lib/locales/zh-CN.d.ts +1 -0
- package/lib/locales/zh-CN.js +2 -1
- package/lib/locales/zh-TW.d.ts +1 -0
- package/lib/locales/zh-TW.js +2 -1
- package/package.json +3 -3
|
@@ -20,6 +20,7 @@ import { isFunction } from "@pisell/utils";
|
|
|
20
20
|
import React, { useCallback, useEffect, useState } from "react";
|
|
21
21
|
import { SortableItem } from "../DragSortList";
|
|
22
22
|
import "./index.less";
|
|
23
|
+
import { getText } from "../../locales";
|
|
23
24
|
export var TRASH_ID = "void";
|
|
24
25
|
var DefaultRenderContainer = function DefaultRenderContainer(props) {
|
|
25
26
|
var id = props.id,
|
|
@@ -159,7 +160,7 @@ var MultipleContainersSortList = function MultipleContainersSortList(props) {
|
|
|
159
160
|
}, children);
|
|
160
161
|
}) : /*#__PURE__*/React.createElement("span", {
|
|
161
162
|
className: "materials-sort-list-empty"
|
|
162
|
-
}, "
|
|
163
|
+
}, getText("table-action-filter-no-filter"))));
|
|
163
164
|
})));
|
|
164
165
|
};
|
|
165
166
|
export default MultipleContainersSortList;
|
|
@@ -14,13 +14,14 @@ var Filter = function Filter(props) {
|
|
|
14
14
|
quickFilterMaxLength = _ref.quickFilterMaxLength,
|
|
15
15
|
sortButtonShow = _ref.sortButtonShow,
|
|
16
16
|
list = _ref.list;
|
|
17
|
+
var isMobileBool = isMobile();
|
|
17
18
|
var isShowQuickFilter = useMemo(function () {
|
|
18
19
|
// 移动端 并且 开启filter按钮 并且 开启filter排序时 不显示快速筛选
|
|
19
|
-
if (
|
|
20
|
+
if (isMobileBool && show && sortButtonShow) {
|
|
20
21
|
return false;
|
|
21
22
|
}
|
|
22
23
|
return true;
|
|
23
|
-
}, [show, sortButtonShow]);
|
|
24
|
+
}, [show, sortButtonShow, isMobileBool]);
|
|
24
25
|
var content = /*#__PURE__*/React.createElement(React.Fragment, null, isShowQuickFilter && /*#__PURE__*/React.createElement(Form.Item, {
|
|
25
26
|
name: "filter_setting",
|
|
26
27
|
noStyle: true
|
|
@@ -99,14 +99,15 @@ var Sort = function Sort(_ref2) {
|
|
|
99
99
|
}
|
|
100
100
|
onChange === null || onChange === void 0 ? void 0 : onChange(detail === null || detail === void 0 ? void 0 : (_detail$keyPath2 = detail.keyPath) === null || _detail$keyPath2 === void 0 ? void 0 : _detail$keyPath2[0], detail);
|
|
101
101
|
};
|
|
102
|
+
var isMobileBool = isMobile();
|
|
102
103
|
var btnContent = useMemo(function () {
|
|
103
104
|
return button || /*#__PURE__*/React.createElement(Button, {
|
|
104
105
|
icon: /*#__PURE__*/React.createElement(SwitchVertical01, null),
|
|
105
106
|
style: style,
|
|
106
107
|
className: classNames(_defineProperty({}, "".concat(prefix, "sort-button-active"), !!value)),
|
|
107
108
|
size: "large"
|
|
108
|
-
},
|
|
109
|
-
}, [button, style, value]);
|
|
109
|
+
}, isMobileBool ? null : getText("sort-button-text"));
|
|
110
|
+
}, [button, style, value, isMobileBool]);
|
|
110
111
|
var content = useMemo(function () {
|
|
111
112
|
return /*#__PURE__*/React.createElement(InlineMenu, {
|
|
112
113
|
items: sortItems,
|
package/es/locales/en-US.d.ts
CHANGED
package/es/locales/en-US.js
CHANGED
|
@@ -32,5 +32,6 @@ export default {
|
|
|
32
32
|
"table-action-group-by-title-tip": "Please select the field from the dropdown menu to group the data for better organization and browsing.",
|
|
33
33
|
"table-action-column-title": "Header settings",
|
|
34
34
|
"table-column-group-records": "records",
|
|
35
|
-
"table-column-drag-sort-disabled-tip": "Automatic sorting is enabled, manual dragging is disabled."
|
|
35
|
+
"table-column-drag-sort-disabled-tip": "Automatic sorting is enabled, manual dragging is disabled.",
|
|
36
|
+
"table-action-filter-no-filter": "No filter options available."
|
|
36
37
|
};
|
package/es/locales/zh-CN.d.ts
CHANGED
package/es/locales/zh-CN.js
CHANGED
|
@@ -32,5 +32,6 @@ export default {
|
|
|
32
32
|
"table-action-group-by-title-tip": "请从下拉菜单中选择要分组的字段,以便更好地组织和浏览数据。",
|
|
33
33
|
"table-action-column-title": "表头设置",
|
|
34
34
|
"table-column-group-records": "条记录",
|
|
35
|
-
"table-column-drag-sort-disabled-tip": "已开启自动排序,无法手动拖拽"
|
|
35
|
+
"table-column-drag-sort-disabled-tip": "已开启自动排序,无法手动拖拽",
|
|
36
|
+
"table-action-filter-no-filter": "没有可用的筛选器。"
|
|
36
37
|
};
|
package/es/locales/zh-TW.d.ts
CHANGED
package/es/locales/zh-TW.js
CHANGED
|
@@ -32,5 +32,6 @@ export default {
|
|
|
32
32
|
"table-action-group-by-title-tip": "請從下拉式選單中選擇要分組的字段,以便更好地組織和瀏覽數據。",
|
|
33
33
|
"table-action-column-title": "表頭設置",
|
|
34
34
|
"table-column-group-records": "條記錄",
|
|
35
|
-
"table-column-drag-sort-disabled-tip": "已開啟自動排序,無法手動拖曳"
|
|
35
|
+
"table-column-drag-sort-disabled-tip": "已開啟自動排序,無法手動拖曳",
|
|
36
|
+
"table-action-filter-no-filter": "沒有可用的篩選器。"
|
|
36
37
|
};
|
|
@@ -39,6 +39,7 @@ var import_utils = require("@pisell/utils");
|
|
|
39
39
|
var import_react = __toESM(require("react"));
|
|
40
40
|
var import_DragSortList = require("../DragSortList");
|
|
41
41
|
var import_index = require("./index.less");
|
|
42
|
+
var import_locales = require("../../locales");
|
|
42
43
|
var TRASH_ID = "void";
|
|
43
44
|
var DefaultRenderContainer = (props) => {
|
|
44
45
|
const { id, children, renderContainer } = props;
|
|
@@ -182,7 +183,7 @@ var MultipleContainersSortList = (props) => {
|
|
|
182
183
|
index
|
|
183
184
|
},
|
|
184
185
|
children
|
|
185
|
-
)) : /* @__PURE__ */ import_react.default.createElement("span", { className: "materials-sort-list-empty" },
|
|
186
|
+
)) : /* @__PURE__ */ import_react.default.createElement("span", { className: "materials-sort-list-empty" }, (0, import_locales.getText)("table-action-filter-no-filter"))
|
|
186
187
|
)
|
|
187
188
|
))));
|
|
188
189
|
};
|
|
@@ -41,12 +41,13 @@ var formFiltersPrefix = "filters";
|
|
|
41
41
|
var Filter = (props) => {
|
|
42
42
|
const { filter, isRenderFormContent = true, onValuesChange } = props;
|
|
43
43
|
const { show, quickFilterMaxLength, sortButtonShow, list } = filter || {};
|
|
44
|
+
const isMobileBool = (0, import_platform.isMobile)();
|
|
44
45
|
const isShowQuickFilter = (0, import_react.useMemo)(() => {
|
|
45
|
-
if (
|
|
46
|
+
if (isMobileBool && show && sortButtonShow) {
|
|
46
47
|
return false;
|
|
47
48
|
}
|
|
48
49
|
return true;
|
|
49
|
-
}, [show, sortButtonShow]);
|
|
50
|
+
}, [show, sortButtonShow, isMobileBool]);
|
|
50
51
|
const content = /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, isShowQuickFilter && /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { name: "filter_setting", noStyle: true }, /* @__PURE__ */ import_react.default.createElement(
|
|
51
52
|
import_QuickFilter.default,
|
|
52
53
|
{
|
|
@@ -114,6 +114,7 @@ var Sort = ({
|
|
|
114
114
|
}
|
|
115
115
|
onChange == null ? void 0 : onChange((_b = detail == null ? void 0 : detail.keyPath) == null ? void 0 : _b[0], detail);
|
|
116
116
|
};
|
|
117
|
+
const isMobileBool = (0, import_platform.isMobile)();
|
|
117
118
|
const btnContent = (0, import_react.useMemo)(() => {
|
|
118
119
|
return button || /* @__PURE__ */ import_react.default.createElement(
|
|
119
120
|
import_antd.Button,
|
|
@@ -125,9 +126,9 @@ var Sort = ({
|
|
|
125
126
|
}),
|
|
126
127
|
size: "large"
|
|
127
128
|
},
|
|
128
|
-
|
|
129
|
+
isMobileBool ? null : (0, import_locales.getText)("sort-button-text")
|
|
129
130
|
);
|
|
130
|
-
}, [button, style, value]);
|
|
131
|
+
}, [button, style, value, isMobileBool]);
|
|
131
132
|
const content = (0, import_react.useMemo)(() => {
|
|
132
133
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
133
134
|
import_InlineMenu.default,
|
package/lib/locales/en-US.d.ts
CHANGED
package/lib/locales/en-US.js
CHANGED
|
@@ -50,5 +50,6 @@ var en_US_default = {
|
|
|
50
50
|
"table-action-group-by-title-tip": "Please select the field from the dropdown menu to group the data for better organization and browsing.",
|
|
51
51
|
"table-action-column-title": "Header settings",
|
|
52
52
|
"table-column-group-records": "records",
|
|
53
|
-
"table-column-drag-sort-disabled-tip": "Automatic sorting is enabled, manual dragging is disabled."
|
|
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
55
|
};
|
package/lib/locales/zh-CN.d.ts
CHANGED
package/lib/locales/zh-CN.js
CHANGED
|
@@ -50,5 +50,6 @@ var zh_CN_default = {
|
|
|
50
50
|
"table-action-group-by-title-tip": "请从下拉菜单中选择要分组的字段,以便更好地组织和浏览数据。",
|
|
51
51
|
"table-action-column-title": "表头设置",
|
|
52
52
|
"table-column-group-records": "条记录",
|
|
53
|
-
"table-column-drag-sort-disabled-tip": "已开启自动排序,无法手动拖拽"
|
|
53
|
+
"table-column-drag-sort-disabled-tip": "已开启自动排序,无法手动拖拽",
|
|
54
|
+
"table-action-filter-no-filter": "没有可用的筛选器。"
|
|
54
55
|
};
|
package/lib/locales/zh-TW.d.ts
CHANGED
package/lib/locales/zh-TW.js
CHANGED
|
@@ -50,5 +50,6 @@ var zh_TW_default = {
|
|
|
50
50
|
"table-action-group-by-title-tip": "請從下拉式選單中選擇要分組的字段,以便更好地組織和瀏覽數據。",
|
|
51
51
|
"table-action-column-title": "表頭設置",
|
|
52
52
|
"table-column-group-records": "條記錄",
|
|
53
|
-
"table-column-drag-sort-disabled-tip": "已開啟自動排序,無法手動拖曳"
|
|
53
|
+
"table-column-drag-sort-disabled-tip": "已開啟自動排序,無法手動拖曳",
|
|
54
|
+
"table-action-filter-no-filter": "沒有可用的篩選器。"
|
|
54
55
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.243",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"react-virtualized-auto-sizer": "^1.0.20",
|
|
64
64
|
"crypto-js": "^4.2.0",
|
|
65
65
|
"@pisell/utils": "1.0.23",
|
|
66
|
-
"@pisell/
|
|
67
|
-
"@pisell/
|
|
66
|
+
"@pisell/date-picker": "1.0.69",
|
|
67
|
+
"@pisell/icon": "0.0.8"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"react": "^18.0.0",
|