@pisell/materials 2.2.1 → 2.2.2

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.
Files changed (48) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +142 -142
  7. package/build/lowcode/render/default/view.js +20 -20
  8. package/build/lowcode/view.js +20 -20
  9. package/es/components/page/index.js +12 -8
  10. package/es/components/table/Actions/component/ColumnsSetting/PopoverContent.js +1 -1
  11. package/es/components/table/Table/index.js +11 -2
  12. package/es/components/table/Table/utils.d.ts +10 -1
  13. package/es/components/table/Table/utils.js +5 -1
  14. package/es/components/table/hooks/useGenScroll.d.ts +1 -0
  15. package/es/components/table/hooks/useGenScroll.js +4 -3
  16. package/es/components/virtual-keyboard/VirtualKeyInput/index.js +1 -1
  17. package/es/locales/en-US.d.ts +1 -0
  18. package/es/locales/en-US.js +1 -0
  19. package/es/locales/zh-CN.d.ts +1 -0
  20. package/es/locales/zh-CN.js +1 -0
  21. package/es/locales/zh-TW.d.ts +1 -0
  22. package/es/locales/zh-TW.js +1 -0
  23. package/lib/components/page/index.js +6 -6
  24. package/lib/components/table/Actions/component/ColumnsSetting/PopoverContent.js +1 -1
  25. package/lib/components/table/Table/index.js +22 -3
  26. package/lib/components/table/Table/utils.d.ts +10 -1
  27. package/lib/components/table/Table/utils.js +4 -1
  28. package/lib/components/table/hooks/useGenScroll.d.ts +1 -0
  29. package/lib/components/table/hooks/useGenScroll.js +3 -3
  30. package/lib/components/virtual-keyboard/VirtualKeyInput/index.js +2 -2
  31. package/lib/locales/en-US.d.ts +1 -0
  32. package/lib/locales/en-US.js +1 -0
  33. package/lib/locales/zh-CN.d.ts +1 -0
  34. package/lib/locales/zh-CN.js +1 -0
  35. package/lib/locales/zh-TW.d.ts +1 -0
  36. package/lib/locales/zh-TW.js +1 -0
  37. package/lowcode/button/meta.ts +10 -5
  38. package/lowcode/list/meta.ts +6 -6
  39. package/lowcode/select-time/meta.ts +8 -8
  40. package/package.json +3 -3
  41. package/dist/umd/materials.min.css +0 -1
  42. package/dist/umd/materials.min.js +0 -1
  43. package/dist/umd/static/DotsSix.57d66266.svg +0 -1
  44. package/dist/umd/static/arrow-left.e542294f.svg +0 -1
  45. package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
  46. package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
  47. package/dist/umd/static/help-circle.31c9be40.svg +0 -1
  48. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
@@ -6,7 +6,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
6
6
  import React from "react";
7
7
  import ConfigProvider from "../config-provider";
8
8
  import { AdapterDayjs } from "@pisell/date-picker/es/AdapterDayjs";
9
- import { LocalizationProvider, createTheme, ThemeProvider } from "@pisell/date-picker";
9
+ import { LocalizationProvider, createTheme, ThemeProvider, LocaleProvider } from "@pisell/date-picker";
10
10
  import enUS from "antd/locale/en_US";
11
11
  import zhCN from "antd/locale/zh_CN";
12
12
  import zhTW from "antd/locale/zh_TW";
@@ -89,13 +89,13 @@ var theme = {
89
89
  colorBgContainerDisabled: "#F9FAFB",
90
90
  colorTextDisabled: "#98A2B3"
91
91
  },
92
- "Input": {
93
- "fontSizeIcon": 16
92
+ Input: {
93
+ fontSizeIcon: 16
94
94
  // "lineHeight": 1
95
95
  },
96
96
 
97
- "Select": {
98
- "fontSizeIcon": 16
97
+ Select: {
98
+ fontSizeIcon: 16
99
99
  // "lineHeight": 1
100
100
  }
101
101
  },
@@ -179,7 +179,7 @@ var localeDateMap = {
179
179
  "en-US": {
180
180
  adapterLocale: "en"
181
181
  },
182
- "en": {
182
+ en: {
183
183
  adapterLocale: "en"
184
184
  },
185
185
  "zh-TW": {
@@ -204,11 +204,15 @@ var Page = function Page(props) {
204
204
  theme: props.theme || theme
205
205
  }), /*#__PURE__*/React.createElement(LocalizationProvider, {
206
206
  dateAdapter: AdapterDayjs,
207
- adapterLocale: (localeDateMap === null || localeDateMap === void 0 ? void 0 : (_localeDateMap = localeDateMap[locale]) === null || _localeDateMap === void 0 ? void 0 : _localeDateMap.adapterLocale) || 'en'
207
+ adapterLocale: (localeDateMap === null || localeDateMap === void 0 ? void 0 : (_localeDateMap = localeDateMap[locale]) === null || _localeDateMap === void 0 ? void 0 : _localeDateMap.adapterLocale) || "en"
208
208
  }, /*#__PURE__*/React.createElement(ThemeProvider, {
209
209
  theme: datePickerTheme
210
+ }, /*#__PURE__*/React.createElement(LocaleProvider, {
211
+ value: {
212
+ locale: locale
213
+ }
210
214
  }, /*#__PURE__*/React.createElement("div", {
211
215
  style: style
212
- }, children))));
216
+ }, children)))));
213
217
  };
214
218
  export default Page;
@@ -34,7 +34,7 @@ var DragItem = /*#__PURE__*/React.forwardRef(function (props, ref) {
34
34
  style: style,
35
35
  className: "".concat(prefix, "table-action-column-drag-item")
36
36
  }), isLock ? /*#__PURE__*/React.createElement(Tooltip, {
37
- title: "\u56FA\u5B9A\u5217\u4E0D\u53EF\u79FB\u52A8\u987A\u5E8F"
37
+ title: getText("table-column-group-lock-tip")
38
38
  }, /*#__PURE__*/React.createElement(Lock01, {
39
39
  className: "".concat(prefix, "table-action-column-drag-bar")
40
40
  })) : /*#__PURE__*/React.createElement(DotsSix, _extends({
@@ -28,7 +28,7 @@ import useGenScroll from "../hooks/useGenScroll";
28
28
  import { useSharedState, useResponsive } from "../../../hooks";
29
29
  import "./index.less";
30
30
  var GridViewTable = function GridViewTable(_ref) {
31
- var _tableProps$paginatio, _tableProps$paginatio2;
31
+ var _tableProps$paginatio, _tableProps$paginatio2, _tableProps$paginatio7, _tableProps$paginatio8, _tableProps$paginatio9, _tableProps$paginatio10;
32
32
  var tableProps = _ref.tableProps,
33
33
  filter = _ref.filter,
34
34
  setTableSetting = _ref.setTableSetting,
@@ -93,10 +93,19 @@ var GridViewTable = function GridViewTable(_ref) {
93
93
  var components = useGenTableComponents({
94
94
  form: form
95
95
  });
96
+ var isShowPagination = useMemo(function () {
97
+ var _tableProps$paginatio3, _tableProps$paginatio4, _tableProps$paginatio5, _tableProps$paginatio6;
98
+ var total = (tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$paginatio3 = tableProps.pagination) === null || _tableProps$paginatio3 === void 0 ? void 0 : _tableProps$paginatio3.total) || (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) || 0;
99
+ if (tableProps !== null && tableProps !== void 0 && (_tableProps$paginatio4 = tableProps.pagination) !== null && _tableProps$paginatio4 !== void 0 && _tableProps$paginatio4.localPagination) {
100
+ total = (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) || 0;
101
+ }
102
+ return total > ((tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$paginatio5 = tableProps.pagination) === null || _tableProps$paginatio5 === void 0 ? void 0 : (_tableProps$paginatio6 = _tableProps$paginatio5.pageSizeOptions) === null || _tableProps$paginatio6 === void 0 ? void 0 : _tableProps$paginatio6[0]) || 10);
103
+ }, [tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$paginatio7 = tableProps.pagination) === null || _tableProps$paginatio7 === void 0 ? void 0 : _tableProps$paginatio7.localPagination, tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$paginatio8 = tableProps.pagination) === null || _tableProps$paginatio8 === void 0 ? void 0 : _tableProps$paginatio8.total, dataSource.length, tableProps === null || tableProps === void 0 ? void 0 : (_tableProps$paginatio9 = tableProps.pagination) === null || _tableProps$paginatio9 === void 0 ? void 0 : (_tableProps$paginatio10 = _tableProps$paginatio9.pageSizeOptions) === null || _tableProps$paginatio10 === void 0 ? void 0 : _tableProps$paginatio10[0]]);
96
104
  var scroll = useGenScroll({
97
105
  wrapHeight: height || 500,
98
106
  scroll: tableProps.scroll,
99
- columns: columns
107
+ columns: columns,
108
+ isShowPagination: isShowPagination
100
109
  });
101
110
  var showTotal = useCallback(function (total, range, pageSize) {
102
111
  var start = range[0] - 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
- }) => Record<string, any>[];
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];
@@ -7,6 +7,7 @@ declare type useGenScrollParams = {
7
7
  autoCalc?: boolean;
8
8
  };
9
9
  columns: any[];
10
+ isShowPagination: boolean;
10
11
  };
11
12
  declare const useGenScroll: (params: useGenScrollParams) => {
12
13
  x: number;
@@ -2,19 +2,20 @@ import { useMemo } from "react";
2
2
  var useGenScroll = function useGenScroll(params) {
3
3
  var wrapHeight = params.wrapHeight,
4
4
  propsScroll = params.scroll,
5
- columns = params.columns;
5
+ columns = params.columns,
6
+ isShowPagination = params.isShowPagination;
6
7
  var scroll = useMemo(function () {
7
8
  if (propsScroll !== null && propsScroll !== void 0 && propsScroll.autoCalc) {
8
9
  return {
9
10
  x: (propsScroll === null || propsScroll === void 0 ? void 0 : propsScroll.x) || columns.reduce(function (p, c) {
10
11
  return p + (c.width || 250);
11
12
  }, 0) || 2000,
12
- y: (propsScroll === null || propsScroll === void 0 ? void 0 : propsScroll.y) || Math.max(wrapHeight - 48 - 50 - 24, 100),
13
+ y: (propsScroll === null || propsScroll === void 0 ? void 0 : propsScroll.y) || Math.max(wrapHeight - 48 - (isShowPagination ? 50 + 24 : 0), 100),
13
14
  scrollToFirstRowOnChange: propsScroll === null || propsScroll === void 0 ? void 0 : propsScroll.scrollToFirstRowOnChange
14
15
  };
15
16
  }
16
17
  return propsScroll;
17
- }, [propsScroll, wrapHeight, columns]);
18
+ }, [propsScroll, wrapHeight, columns, isShowPagination]);
18
19
  return scroll;
19
20
  };
20
21
  export default useGenScroll;
@@ -7,7 +7,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
7
7
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
8
  import React, { useEffect, useState } from "react";
9
9
  import { Input } from "antd";
10
- import { Delete } from "@pisell/icon";
10
+ import Delete from "@pisell/icon/es/Delete";
11
11
  import { useEventListener } from "ahooks";
12
12
  import classNames from "classnames";
13
13
  import "./index.less";
@@ -26,6 +26,7 @@ declare const _default: {
26
26
  "table-action-group-by-title-tip": string;
27
27
  "table-action-column-title": string;
28
28
  "table-column-group-records": string;
29
+ "table-column-group-lock-tip": string;
29
30
  "table-column-drag-sort-disabled-tip": string;
30
31
  "table-action-filter-no-filter": string;
31
32
  "table-action-range-picker-presets-today": string;
@@ -32,6 +32,7 @@ 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-group-lock-tip": "Fixed column immutable order",
35
36
  "table-column-drag-sort-disabled-tip": "Automatic sorting is enabled, manual dragging is disabled.",
36
37
  "table-action-filter-no-filter": "No filter options available.",
37
38
  "table-action-range-picker-presets-today": "Today",
@@ -26,6 +26,7 @@ declare const _default: {
26
26
  "table-action-group-by-title-tip": string;
27
27
  "table-action-column-title": string;
28
28
  "table-column-group-records": string;
29
+ "table-column-group-lock-tip": string;
29
30
  "table-column-drag-sort-disabled-tip": string;
30
31
  "table-action-filter-no-filter": string;
31
32
  "table-action-range-picker-presets-today": string;
@@ -32,6 +32,7 @@ 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-group-lock-tip": "固定列不可移动顺序",
35
36
  "table-column-drag-sort-disabled-tip": "已开启自动排序,无法手动拖拽",
36
37
  "table-action-filter-no-filter": "没有可用的筛选器。",
37
38
  "table-action-range-picker-presets-today": "今天",
@@ -26,6 +26,7 @@ declare const _default: {
26
26
  "table-action-group-by-title-tip": string;
27
27
  "table-action-column-title": string;
28
28
  "table-column-group-records": string;
29
+ "table-column-group-lock-tip": string;
29
30
  "table-column-drag-sort-disabled-tip": string;
30
31
  "table-action-filter-no-filter": string;
31
32
  "table-action-range-picker-presets-today": string;
@@ -32,6 +32,7 @@ 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-group-lock-tip": "固定列不可移動順序",
35
36
  "table-column-drag-sort-disabled-tip": "已開啟自動排序,無法手動拖曳",
36
37
  "table-action-filter-no-filter": "沒有可用的篩選器。",
37
38
  "table-action-range-picker-presets-today": "今天",
@@ -118,12 +118,12 @@ var theme = {
118
118
  colorBgContainerDisabled: "#F9FAFB",
119
119
  colorTextDisabled: "#98A2B3"
120
120
  },
121
- "Input": {
122
- "fontSizeIcon": 16
121
+ Input: {
122
+ fontSizeIcon: 16
123
123
  // "lineHeight": 1
124
124
  },
125
- "Select": {
126
- "fontSizeIcon": 16
125
+ Select: {
126
+ fontSizeIcon: 16
127
127
  // "lineHeight": 1
128
128
  }
129
129
  },
@@ -205,7 +205,7 @@ var localeDateMap = {
205
205
  "en-US": {
206
206
  adapterLocale: "en"
207
207
  },
208
- "en": {
208
+ en: {
209
209
  adapterLocale: "en"
210
210
  },
211
211
  "zh-TW": {
@@ -235,7 +235,7 @@ var Page = (props) => {
235
235
  dateAdapter: import_AdapterDayjs.AdapterDayjs,
236
236
  adapterLocale: ((_a2 = localeDateMap == null ? void 0 : localeDateMap[locale]) == null ? void 0 : _a2.adapterLocale) || "en"
237
237
  },
238
- /* @__PURE__ */ import_react.default.createElement(import_date_picker.ThemeProvider, { theme: datePickerTheme }, /* @__PURE__ */ import_react.default.createElement("div", { style }, children))
238
+ /* @__PURE__ */ import_react.default.createElement(import_date_picker.ThemeProvider, { theme: datePickerTheme }, /* @__PURE__ */ import_react.default.createElement(import_date_picker.LocaleProvider, { value: { locale } }, /* @__PURE__ */ import_react.default.createElement("div", { style }, children)))
239
239
  )
240
240
  );
241
241
  };
@@ -53,7 +53,7 @@ var DragItem = import_react.default.forwardRef((props, ref) => {
53
53
  style,
54
54
  className: `${prefix}table-action-column-drag-item`
55
55
  },
56
- isLock ? /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: "固定列不可移动顺序" }, /* @__PURE__ */ import_react.default.createElement(import_Lock01.default, { className: `${prefix}table-action-column-drag-bar` })) : /* @__PURE__ */ import_react.default.createElement(
56
+ isLock ? /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: (0, import_locales.getText)("table-column-group-lock-tip") }, /* @__PURE__ */ import_react.default.createElement(import_Lock01.default, { className: `${prefix}table-action-column-drag-bar` })) : /* @__PURE__ */ import_react.default.createElement(
57
57
  import_DotsSix.default,
58
58
  {
59
59
  ref: setActivatorNodeRef,
@@ -46,8 +46,13 @@ 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, onDataSourceChange }) => {
50
- var _a, _b;
49
+ var GridViewTable = ({
50
+ tableProps,
51
+ filter,
52
+ setTableSetting,
53
+ onDataSourceChange
54
+ }) => {
55
+ var _a, _b, _c, _d, _e, _f;
51
56
  const responsive = (0, import_hooks.useResponsive)();
52
57
  const { state, dispatch } = (0, import_hooks.useSharedState)(import_model.Context);
53
58
  const form = import_antd.Form.useFormInstance();
@@ -99,10 +104,24 @@ var GridViewTable = ({ tableProps, filter, setTableSetting, onDataSourceChange }
99
104
  const components = (0, import_useGenTableComponents.default)({
100
105
  form
101
106
  });
107
+ const isShowPagination = (0, import_react.useMemo)(() => {
108
+ var _a2, _b2, _c2, _d2;
109
+ let total = ((_a2 = tableProps == null ? void 0 : tableProps.pagination) == null ? void 0 : _a2.total) || (dataSource == null ? void 0 : dataSource.length) || 0;
110
+ if ((_b2 = tableProps == null ? void 0 : tableProps.pagination) == null ? void 0 : _b2.localPagination) {
111
+ total = (dataSource == null ? void 0 : dataSource.length) || 0;
112
+ }
113
+ return total > (((_d2 = (_c2 = tableProps == null ? void 0 : tableProps.pagination) == null ? void 0 : _c2.pageSizeOptions) == null ? void 0 : _d2[0]) || 10);
114
+ }, [
115
+ (_c = tableProps == null ? void 0 : tableProps.pagination) == null ? void 0 : _c.localPagination,
116
+ (_d = tableProps == null ? void 0 : tableProps.pagination) == null ? void 0 : _d.total,
117
+ dataSource.length,
118
+ (_f = (_e = tableProps == null ? void 0 : tableProps.pagination) == null ? void 0 : _e.pageSizeOptions) == null ? void 0 : _f[0]
119
+ ]);
102
120
  const scroll = (0, import_useGenScroll.default)({
103
121
  wrapHeight: height || 500,
104
122
  scroll: tableProps.scroll,
105
- columns
123
+ columns,
124
+ isShowPagination
106
125
  });
107
126
  const showTotal = (0, import_react.useCallback)(
108
127
  (total, range, pageSize) => {
@@ -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
- }) => Record<string, any>[];
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 数据源数组
@@ -152,7 +152,10 @@ var mergeColumnSetting = ({
152
152
  currentViewMode
153
153
  }) => {
154
154
  if (!tableId)
155
- return columns;
155
+ return columns.map((item) => ({
156
+ ...item,
157
+ isShow: true
158
+ }));
156
159
  const colKeyMap = getColumnsFromLocalStorage(tableId, currentViewMode);
157
160
  const newColumns = columns.map((item, index) => {
158
161
  const col = colKeyMap[item.key];
@@ -7,6 +7,7 @@ declare type useGenScrollParams = {
7
7
  autoCalc?: boolean;
8
8
  };
9
9
  columns: any[];
10
+ isShowPagination: boolean;
10
11
  };
11
12
  declare const useGenScroll: (params: useGenScrollParams) => {
12
13
  x: number;
@@ -24,19 +24,19 @@ __export(useGenScroll_exports, {
24
24
  module.exports = __toCommonJS(useGenScroll_exports);
25
25
  var import_react = require("react");
26
26
  var useGenScroll = (params) => {
27
- const { wrapHeight, scroll: propsScroll, columns } = params;
27
+ const { wrapHeight, scroll: propsScroll, columns, isShowPagination } = params;
28
28
  const scroll = (0, import_react.useMemo)(() => {
29
29
  if (propsScroll == null ? void 0 : propsScroll.autoCalc) {
30
30
  return {
31
31
  x: (propsScroll == null ? void 0 : propsScroll.x) || columns.reduce((p, c) => {
32
32
  return p + (c.width || 250);
33
33
  }, 0) || 2e3,
34
- y: (propsScroll == null ? void 0 : propsScroll.y) || Math.max(wrapHeight - 48 - 50 - 24, 100),
34
+ y: (propsScroll == null ? void 0 : propsScroll.y) || Math.max(wrapHeight - 48 - (isShowPagination ? 50 + 24 : 0), 100),
35
35
  scrollToFirstRowOnChange: propsScroll == null ? void 0 : propsScroll.scrollToFirstRowOnChange
36
36
  };
37
37
  }
38
38
  return propsScroll;
39
- }, [propsScroll, wrapHeight, columns]);
39
+ }, [propsScroll, wrapHeight, columns, isShowPagination]);
40
40
  return scroll;
41
41
  };
42
42
  var useGenScroll_default = useGenScroll;
@@ -34,7 +34,7 @@ __export(VirtualKeyInput_exports, {
34
34
  module.exports = __toCommonJS(VirtualKeyInput_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_antd = require("antd");
37
- var import_icon = require("@pisell/icon");
37
+ var import_Delete = __toESM(require("@pisell/icon/es/Delete"));
38
38
  var import_ahooks = require("ahooks");
39
39
  var import_classnames = __toESM(require("classnames"));
40
40
  var import_index = require("./index.less");
@@ -85,6 +85,6 @@ var VirtualKeyInput = (props) => {
85
85
  readOnly: true,
86
86
  value: previewValue
87
87
  }
88
- ), (value == null ? void 0 : value.length) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "virtual-keyboard-input-delete", onClick: _onDelete }, /* @__PURE__ */ import_react.default.createElement(import_icon.Delete, { className: "virtual-keyboard-input-delete-icon" })) : null);
88
+ ), (value == null ? void 0 : value.length) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "virtual-keyboard-input-delete", onClick: _onDelete }, /* @__PURE__ */ import_react.default.createElement(import_Delete.default, { className: "virtual-keyboard-input-delete-icon" })) : null);
89
89
  };
90
90
  var VirtualKeyInput_default = VirtualKeyInput;
@@ -26,6 +26,7 @@ declare const _default: {
26
26
  "table-action-group-by-title-tip": string;
27
27
  "table-action-column-title": string;
28
28
  "table-column-group-records": string;
29
+ "table-column-group-lock-tip": string;
29
30
  "table-column-drag-sort-disabled-tip": string;
30
31
  "table-action-filter-no-filter": string;
31
32
  "table-action-range-picker-presets-today": string;
@@ -50,6 +50,7 @@ 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-group-lock-tip": "Fixed column immutable order",
53
54
  "table-column-drag-sort-disabled-tip": "Automatic sorting is enabled, manual dragging is disabled.",
54
55
  "table-action-filter-no-filter": "No filter options available.",
55
56
  "table-action-range-picker-presets-today": "Today",
@@ -26,6 +26,7 @@ declare const _default: {
26
26
  "table-action-group-by-title-tip": string;
27
27
  "table-action-column-title": string;
28
28
  "table-column-group-records": string;
29
+ "table-column-group-lock-tip": string;
29
30
  "table-column-drag-sort-disabled-tip": string;
30
31
  "table-action-filter-no-filter": string;
31
32
  "table-action-range-picker-presets-today": string;
@@ -50,6 +50,7 @@ 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-group-lock-tip": "固定列不可移动顺序",
53
54
  "table-column-drag-sort-disabled-tip": "已开启自动排序,无法手动拖拽",
54
55
  "table-action-filter-no-filter": "没有可用的筛选器。",
55
56
  "table-action-range-picker-presets-today": "今天",
@@ -26,6 +26,7 @@ declare const _default: {
26
26
  "table-action-group-by-title-tip": string;
27
27
  "table-action-column-title": string;
28
28
  "table-column-group-records": string;
29
+ "table-column-group-lock-tip": string;
29
30
  "table-column-drag-sort-disabled-tip": string;
30
31
  "table-action-filter-no-filter": string;
31
32
  "table-action-range-picker-presets-today": string;
@@ -50,6 +50,7 @@ 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-group-lock-tip": "固定列不可移動順序",
53
54
  "table-column-drag-sort-disabled-tip": "已開啟自動排序,無法手動拖曳",
54
55
  "table-action-filter-no-filter": "沒有可用的篩選器。",
55
56
  "table-action-range-picker-presets-today": "今天",
@@ -200,7 +200,7 @@ const ButtonMeta: ComponentMetadata = {
200
200
  },
201
201
  propType: {
202
202
  type: "oneOf",
203
- value: ["primary", "ghost", "dashed", "danger", "link", "text"],
203
+ value: ["primary", "default", "ghost", "dashed", "danger", "link", "text"],
204
204
  },
205
205
  setter: [
206
206
  {
@@ -211,6 +211,10 @@ const ButtonMeta: ComponentMetadata = {
211
211
  title: "primary button",
212
212
  value: "primary",
213
213
  },
214
+ {
215
+ title: "default button",
216
+ value: "default",
217
+ },
214
218
  {
215
219
  title: "dashed button",
216
220
  value: "dashed",
@@ -220,7 +224,7 @@ const ButtonMeta: ComponentMetadata = {
220
224
  value: "danger",
221
225
  },
222
226
  {
223
- title: "link butto",
227
+ title: "link button",
224
228
  value: "link",
225
229
  },
226
230
  {
@@ -305,8 +309,8 @@ const ButtonMeta: ComponentMetadata = {
305
309
  },
306
310
  tip: "icon | Set the icon component of the button",
307
311
  },
308
- propType: "node",
309
- setter: {
312
+ propType: { type: "oneOfType", value: ["node"] },
313
+ setter: [{
310
314
  componentName: "SlotSetter",
311
315
  initialValue: {
312
316
  type: "JSSlot",
@@ -322,7 +326,8 @@ const ButtonMeta: ComponentMetadata = {
322
326
  },
323
327
  ],
324
328
  },
325
- },
329
+ defaultValue: null
330
+ }],
326
331
  },
327
332
  {
328
333
  name: "block",
@@ -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
  },
@@ -22,23 +22,23 @@ const SelectTimeMeta: ComponentMetadata = {
22
22
  setter: ["JsonSetter", "VariableSetter"],
23
23
  },
24
24
  {
25
- title: "popoverProps",
26
- name: "弹层的配置项",
25
+ title: "弹层的配置项",
26
+ name: "popoverProps",
27
27
  setter: ["JsonSetter", "VariableSetter"],
28
28
  },
29
29
  {
30
- title: "timePickerProps",
31
- name: "虚拟键盘的配置项",
30
+ title: "虚拟键盘的配置项",
31
+ name: "timePickerProps",
32
32
  setter: ["JsonSetter", "VariableSetter"],
33
33
  },
34
34
  {
35
- title: "timeProps",
36
- name: "时间input框的配置项",
35
+ title: "时间input框的配置项",
36
+ name: "timeProps",
37
37
  setter: ["JsonSetter", "VariableSetter"],
38
38
  },
39
39
  {
40
- title: "slice",
41
- name: "时间切片",
40
+ title: "时间切片",
41
+ name: "slice",
42
42
  setter: ["JsonSetter", "VariableSetter"],
43
43
  },
44
44
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -61,8 +61,8 @@
61
61
  "react-window": "^1.8.10",
62
62
  "react-virtualized-auto-sizer": "^1.0.20",
63
63
  "crypto-js": "^4.2.0",
64
- "@pisell/utils": "1.0.24",
65
- "@pisell/date-picker": "1.0.69",
64
+ "@pisell/utils": "1.0.25",
65
+ "@pisell/date-picker": "1.0.74",
66
66
  "@pisell/icon": "0.0.8"
67
67
  },
68
68
  "peerDependencies": {
@@ -1 +0,0 @@
1
- .materials-grid{display:flex;flex-direction:column;height:100%;width:100%}.materials-grid-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.materials-grid-header .right-wrap{align-items:center;display:flex;gap:8px}.materials-grid-actions{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.materials-grid-actions .left-wrap{align-items:center;display:flex;flex:1 1}.materials-grid-actions .left-wrap .pisell-lowcode-form-item{margin-bottom:0}.materials-grid-actions .right-wrap{align-items:center;display:flex;gap:8px}.materials-grid-actions .right-wrap .icon{cursor:pointer;transition:.2s}.materials-grid-actions .right-wrap .icon:hover{color:var(--theme-color)}.materials-grid-actions .right-wrap .button{align-items:center;display:flex;font-size:12px;height:28px;justify-content:center}.filter-dropdown-wrap{display:flex;flex-direction:column;max-height:400px;max-width:calc(100vw - 24px);min-width:250px;padding:4px;width:400px}.filter-dropdown-wrap .filter-dropdown-wrap-content{flex:1 1;overflow:auto}.filter-dropdown-wrap .filter-dropdown-drag-item{align-items:center;background:#f9fafb;background:var(--gray-50,#f9fafb);border-radius:8px;display:flex;margin-bottom:12px;padding:8px 12px 12px}.filter-dropdown-wrap .filter-dropdown-drag-item .dots-six-icon{color:#98a2b3;cursor:pointer;font-size:24px}.filter-dropdown-wrap .filter-dropdown-drag-item .pisell-lowcode-form-item{margin-bottom:0}.filter-dropdown-wrap .filter-dropdown-drag-item .filter-dropdown-drag-item-right{flex:1 1;margin-left:16px}.filter-dropdown-wrap .filter-dropdown-drag-item .filter-dropdown-drag-item-right .filter-dropdown-drag-item-title{color:#777;color:var(--text-text-2,#777);font-size:14px;font-style:normal;font-weight:600;line-height:20px}.filter-dropdown-container-wrap{border-bottom:1px solid #e2e2e2;border-bottom:1px solid var(--surface-surface-4,#e2e2e2);margin-bottom:20px;min-height:70px}.filter-dropdown-container-wrap:last-child{border:none}.filter-dropdown-container-wrap .filter-dropdown-container-title-wrap{align-items:center;color:#919191;color:var(--text-text-3,#919191);display:flex;font-size:16px;font-style:normal;font-weight:600;line-height:22px;margin-bottom:12px}.filter-dropdown-container-wrap .filter-dropdown-container-title-wrap .filter-dropdown-container-title{color:#101828;color:var(--gray-900,#101828);font-size:16px;font-style:normal;font-weight:600;line-height:24px;margin-right:6px}.filter-dropdown-container-wrap .filter-dropdown-container-title-wrap .filter-dropdown-container-icon-help{color:#98a2b3;color:var(--gray-400,#98a2b3);font-size:20px}.filter-dropdown-container-wrap .filter-dropdown-container-filter-wrap{min-height:80px}.materials-sort-list-empty{color:#5a5a5a;display:block;padding-top:22px;text-align:center}.materials-grid-summary{margin-bottom:16px}.grid-view-table-wrap{position:relative}.materials-grid-paginator{align-items:center;background-color:#fff;border:1px solid #f0f0f0;border-radius:0 0 8px 8px;border-top:none;display:flex;height:50px;justify-content:center;margin:0!important;padding:0 20px;width:100%}.materials-grid-paginator .pisell-lowcode-pagination-total-text{color:#667085;color:var(--gray-500,#667085);font-size:14px;font-style:normal;font-weight:500;margin-right:auto}.materials-grid-paginator .pisell-lowcode-pagination-item{border:1px solid #d0d5dd;border-radius:0;border-right:0;margin:0;position:relative}.materials-grid-paginator .pisell-lowcode-pagination-jump-next,.materials-grid-paginator .pisell-lowcode-pagination-jump-prev{border:1px solid #d0d5dd;border-radius:0;border-right:none;margin:0}.materials-grid-paginator .pisell-lowcode-pagination-item-link:hover{color:rgba(0,0,0,.88)!important;font-weight:450!important}.materials-grid-paginator .pisell-lowcode-pagination-item-link:hover .pisell-lowcode-pagination-item-link-icon{color:rgba(0,0,0,.88)!important;font-weight:450!important}.materials-grid-paginator .pisell-lowcode-pagination-item-active:hover{border-color:#d0d5dd!important}.materials-grid-paginator .pisell-lowcode-pagination-item-active{background-color:rgba(0,0,0,.06)}.materials-grid-paginator .pisell-lowcode-pagination-item-active a{color:rgba(0,0,0,.88)!important;font-weight:450!important}.materials-grid-paginator .pisell-lowcode-pagination-prev{align-items:center;border:1px solid #d0d5dd;border-radius:8px 0 0 8px;border-right:none;display:flex;justify-content:center;margin:0;min-width:auto}.materials-grid-paginator .pisell-lowcode-pagination-next{align-items:center;border:1px solid #d0d5dd;border-radius:0 8px 8px 0;display:flex;justify-content:center;margin:0;min-width:auto}.paginator-page-btn{align-items:center;border-radius:4px 4px 4px 4px;color:#344054;color:var(--gray-700,#344054);cursor:pointer;display:flex;font-size:12px;font-weight:400;justify-content:center;padding:10px 16px;transition:.2s;-ms-user-select:none;user-select:none}.paginator-page-btn .paginator-page-btn-text{font-weight:600}.paginator-page-btn .paginator-page-btn-left-icon,.paginator-page-btn .paginator-page-btn-right-icon{font-size:20px}.paginator-page-btn .paginator-page-btn-left-icon{margin-right:8px}.paginator-page-btn .paginator-page-btn-right-icon{margin-left:8px}.paginator-page-btn.left{margin-right:auto}.paginator-page-btn.left .icon{font-size:18px;margin-right:8px}.paginator-page-btn.right{margin-left:auto}.paginator-page-btn.right .icon{font-size:18px;margin-left:8px;transform:rotate(180deg)}.materials-grid-paginator-mini{align-items:center;background-color:#fff;border:1px solid #f0f0f0;border-radius:0 0 8px 8px;border-top:none;display:flex;height:50px;justify-content:space-between;margin:0!important;overflow:hidden;padding:0 20px;width:100%}.materials-grid-paginator-mini .paginator-page-btn{padding:8px}.materials-grid-paginator-mini .materials-grid-paginator-center{align-items:center;display:flex;gap:4px;justify-content:center}.materials-grid-paginator-mini .materials-grid-paginator-center .materials-grid-paginator-center-text{color:#344054;color:var(--gray-700,#344054);font-size:14px;font-style:normal;font-weight:400}.materials-grid-paginator-mini .materials-grid-paginator-center .materials-grid-paginator-center-value{color:#344054;color:var(--gray-700,#344054);font-size:14px;font-style:normal;font-weight:500}.materials-grid-paginator-mini .pisell-lowcode-pagination-next,.materials-grid-paginator-mini .pisell-lowcode-pagination-prev{border:1px solid #d0d5dd;border-radius:8px;margin:0}.materials-grid-paginator-mini .pisell-lowcode-pagination-next .paginator-page-btn-left-icon,.materials-grid-paginator-mini .pisell-lowcode-pagination-prev .paginator-page-btn-left-icon{margin-right:0}.materials-grid-paginator-mini .pisell-lowcode-pagination-next .paginator-page-btn-right-icon,.materials-grid-paginator-mini .pisell-lowcode-pagination-prev .paginator-page-btn-right-icon{margin-left:0}.react-resizable{position:relative}.react-resizable-handle{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgd2lkdGg9IjYiIGhlaWdodD0iNiI+PHBhdGggZD0iTTYgNkgwVjQuMmg0LjJWMEg2djZaIiBvcGFjaXR5PSIuMzAyIi8+PC9zdmc+);background-origin:content-box;background-position:100% 100%;background-repeat:no-repeat;box-sizing:border-box;height:20px;padding:0 3px 3px 0;position:absolute;width:20px}.react-resizable-handle-sw{bottom:0;cursor:sw-resize;left:0;transform:rotate(90deg)}.react-resizable-handle-se{bottom:0;cursor:se-resize;right:0}.react-resizable-handle-nw{cursor:nw-resize;left:0;top:0;transform:rotate(180deg)}.react-resizable-handle-ne{cursor:ne-resize;right:0;top:0;transform:rotate(270deg)}.react-resizable-handle-e,.react-resizable-handle-w{cursor:ew-resize;margin-top:-10px;top:50%}.react-resizable-handle-w{left:0;transform:rotate(135deg)}.react-resizable-handle-e{right:0;transform:rotate(315deg)}.react-resizable-handle-n,.react-resizable-handle-s{cursor:ns-resize;left:50%;margin-left:-10px}.react-resizable-handle-n{top:0;transform:rotate(225deg)}.react-resizable-handle-s{bottom:0;transform:rotate(45deg)}.materials-grid-table-header-cell{align-items:center;display:flex;height:44px;padding:0 14px}.materials-grid-table-header-cell .field-icon{color:#777;font-size:18px}.materials-grid-table-header-cell .materials-grid-table-header-cell-content{color:#1b1b1b;flex:auto;font-size:14px;font-weight:600;overflow:hidden;padding-right:10px;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.materials-grid-table-header-cell .actions{align-items:center;display:flex;gap:8px}.materials-grid-table-header-cell .actions .action{color:#ababab;cursor:pointer;font-size:14px}.editable-cell-value-wrap{height:100%;width:100%}.materials-grid-table-cell{height:1px;padding:0!important}.cell-provider{align-items:center;border-radius:4px;cursor:pointer;display:flex;height:100%;justify-content:center;padding:12px;position:relative;width:100%}.cell-provider.focus{box-shadow:var(--theme-color) 0 0 0 1px!important}