@pisell/materials 2.2.26 → 2.2.28

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 (32) 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/render/default/view.css +1 -1
  7. package/build/lowcode/render/default/view.js +9 -9
  8. package/build/lowcode/view.css +1 -1
  9. package/build/lowcode/view.js +3 -3
  10. package/es/components/filter/components/Dropdown/index.d.ts +7 -4
  11. package/es/components/filter/components/Dropdown/index.js +26 -14
  12. package/es/components/filter/components/FilterButton/index.d.ts +2 -2
  13. package/es/components/filter/components/FilterButton/index.js +34 -5
  14. package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +14 -4
  15. package/es/components/table/Table/utils.d.ts +1 -1
  16. package/es/components/table/index.js +8 -1
  17. package/es/components/table/index.less +6 -0
  18. package/es/components/table/serve.js +7 -0
  19. package/lib/components/filter/components/Dropdown/index.d.ts +7 -4
  20. package/lib/components/filter/components/Dropdown/index.js +13 -1
  21. package/lib/components/filter/components/FilterButton/index.d.ts +2 -2
  22. package/lib/components/filter/components/FilterButton/index.js +13 -2
  23. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +9 -2
  24. package/lib/components/table/Table/utils.d.ts +1 -1
  25. package/lib/components/table/index.js +41 -23
  26. package/lib/components/table/index.less +6 -0
  27. package/lib/components/table/serve.js +5 -0
  28. package/package.json +3 -3
  29. package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +0 -9
  30. package/es/components/table/Actions/component/ExportImport/utils/index.js +0 -11
  31. package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +0 -9
  32. package/lib/components/table/Actions/component/ExportImport/utils/index.js +0 -31
@@ -1,5 +1,8 @@
1
- import React from "react";
2
- import "./index.less";
3
- import { DropdownProps } from "./types";
4
- declare const Dropdown: React.FC<DropdownProps>;
1
+ import React from 'react';
2
+ import './index.less';
3
+ import { DropdownProps } from './types';
4
+ declare const Dropdown: React.FC<DropdownProps & {
5
+ onOpen: () => void;
6
+ onClose: () => void;
7
+ }>;
5
8
  export default Dropdown;
@@ -5,21 +5,21 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
7
  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); }
8
- import React, { useCallback, useMemo } from "react";
9
- import DotsSix from "@pisell/icon/es/DotsSix";
10
- import HelpCircle from "@pisell/icon/es/HelpCircle";
8
+ import React, { useCallback, useMemo } from 'react';
9
+ import DotsSix from '@pisell/icon/es/DotsSix';
10
+ import HelpCircle from '@pisell/icon/es/HelpCircle';
11
11
  import "./index.less";
12
12
  import FilterItem from "../FilterItem";
13
- import { Tooltip } from "antd";
13
+ import { Tooltip } from 'antd';
14
14
  import MultipleContainersSortList from "../../../MultipleContainersSortList";
15
15
  import { getText } from "../../../../locales";
16
16
  var titleMap = {
17
- quickFilter: getText("table-action-filter-quick-filter"),
18
- otherFilter: getText("table-action-filter-other-filter")
17
+ quickFilter: getText('table-action-filter-quick-filter'),
18
+ otherFilter: getText('table-action-filter-other-filter')
19
19
  };
20
20
  var tooltipMap = {
21
- quickFilter: getText("table-action-filter-quick-filter-tip"),
22
- otherFilter: getText("table-action-filter-other-filter-tip")
21
+ quickFilter: getText('table-action-filter-quick-filter-tip'),
22
+ otherFilter: getText('table-action-filter-other-filter-tip')
23
23
  };
24
24
  var DragItem = /*#__PURE__*/React.forwardRef(function (props, ref) {
25
25
  var attributes = props.attributes,
@@ -35,7 +35,7 @@ var DragItem = /*#__PURE__*/React.forwardRef(function (props, ref) {
35
35
  ref: setActivatorNodeRef
36
36
  }, listeners, {
37
37
  style: _objectSpread(_objectSpread({}, listeners.style || {}), {}, {
38
- touchAction: "none"
38
+ touchAction: 'none'
39
39
  }),
40
40
  className: "dots-six-icon"
41
41
  }))), /*#__PURE__*/React.createElement("div", {
@@ -47,7 +47,9 @@ var Dropdown = function Dropdown(props) {
47
47
  otherFilter = props.otherFilter,
48
48
  onChange = props.onChange,
49
49
  quickFilterMaxLength = props.quickFilterMaxLength,
50
- formFiltersPrefix = props.formFiltersPrefix;
50
+ formFiltersPrefix = props.formFiltersPrefix,
51
+ _onOpen = props.onOpen,
52
+ _onClose = props.onClose;
51
53
  var list = useMemo(function () {
52
54
  return {
53
55
  quickFilter: quickFilter || [],
@@ -87,7 +89,7 @@ var Dropdown = function Dropdown(props) {
87
89
  onChange: handleSortChange,
88
90
  quickFilterMaxLength: quickFilterMaxLength
89
91
  }, function (_ref2) {
90
- var _item$name, _item$other;
92
+ var _item$name, _item$other3;
91
93
  var item = _ref2.item,
92
94
  index = _ref2.index,
93
95
  style = _ref2.style,
@@ -103,13 +105,23 @@ var Dropdown = function Dropdown(props) {
103
105
  listeners: listeners,
104
106
  style: style
105
107
  }), /*#__PURE__*/React.createElement(FilterItem, {
106
- key: name.join("-"),
108
+ key: name.join('-'),
107
109
  name: name,
108
110
  label: item.label,
109
111
  type: item.type,
110
112
  other: _objectSpread(_objectSpread({}, item.other), {}, {
111
- style: _objectSpread(_objectSpread({}, ((_item$other = item.other) === null || _item$other === void 0 ? void 0 : _item$other.style) || {}), {}, {
112
- width: "100%"
113
+ onOpen: function onOpen() {
114
+ var _item$other, _item$other$onOpen;
115
+ (_item$other = item.other) === null || _item$other === void 0 ? void 0 : (_item$other$onOpen = _item$other.onOpen) === null || _item$other$onOpen === void 0 ? void 0 : _item$other$onOpen.call(_item$other);
116
+ _onOpen === null || _onOpen === void 0 ? void 0 : _onOpen();
117
+ },
118
+ onClose: function onClose() {
119
+ var _item$other2, _item$other2$onClose;
120
+ (_item$other2 = item.other) === null || _item$other2 === void 0 ? void 0 : (_item$other2$onClose = _item$other2.onClose) === null || _item$other2$onClose === void 0 ? void 0 : _item$other2$onClose.call(_item$other2);
121
+ _onClose === null || _onClose === void 0 ? void 0 : _onClose();
122
+ },
123
+ style: _objectSpread(_objectSpread({}, ((_item$other3 = item.other) === null || _item$other3 === void 0 ? void 0 : _item$other3.style) || {}), {}, {
124
+ width: '100%'
113
125
  })
114
126
  }),
115
127
  props: item.props
@@ -1,4 +1,4 @@
1
- import React from "react";
2
- import { FilterListProps } from "./types";
1
+ import React from 'react';
2
+ import { FilterListProps } from './types';
3
3
  declare const Filter: React.FC<FilterListProps>;
4
4
  export default Filter;
@@ -4,9 +4,15 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
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
- import React, { useMemo, useRef } from "react";
8
- import { Button, Popover } from "antd";
9
- import FilterLines from "@pisell/icon/es/FilterLines";
7
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
12
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ import React, { useMemo, useRef, useState } from 'react';
14
+ import { Button, Popover } from 'antd';
15
+ import FilterLines from '@pisell/icon/es/FilterLines';
10
16
  import Dropdown from "../Dropdown";
11
17
  import { getText } from "../../../../locales";
12
18
  import { isMobile } from "../../../../utils/platform";
@@ -16,6 +22,15 @@ var Filter = function Filter(_ref) {
16
22
  quickFilterMaxLength = _ref.quickFilterMaxLength,
17
23
  formFiltersPrefix = _ref.formFiltersPrefix;
18
24
  var ref = useRef(null);
25
+ var _useState = useState(false),
26
+ _useState2 = _slicedToArray(_useState, 2),
27
+ open = _useState2[0],
28
+ setOpen = _useState2[1];
29
+ // 日期范围组件是否打开
30
+ var _useState3 = useState(false),
31
+ _useState4 = _slicedToArray(_useState3, 2),
32
+ dateRangeOpen = _useState4[0],
33
+ setDateRangeOpen = _useState4[1];
19
34
  var quickFilter = useMemo(function () {
20
35
  return (value === null || value === void 0 ? void 0 : value.quickFilter) || [];
21
36
  }, [value === null || value === void 0 ? void 0 : value.quickFilter]);
@@ -31,7 +46,13 @@ var Filter = function Filter(_ref) {
31
46
  otherFilter: otherFilter,
32
47
  onChange: handleChange,
33
48
  quickFilterMaxLength: quickFilterMaxLength,
34
- formFiltersPrefix: formFiltersPrefix
49
+ formFiltersPrefix: formFiltersPrefix,
50
+ onOpen: function onOpen() {
51
+ return setDateRangeOpen(true);
52
+ },
53
+ onClose: function onClose() {
54
+ return setDateRangeOpen(false);
55
+ }
35
56
  });
36
57
  }, [quickFilter, otherFilter, quickFilterMaxLength, formFiltersPrefix]);
37
58
  var isMobileBool = isMobile();
@@ -46,7 +67,15 @@ var Filter = function Filter(_ref) {
46
67
  getPopupContainer: function getPopupContainer() {
47
68
  return ref.current;
48
69
  },
49
- trigger: ['click']
70
+ trigger: ['click'],
71
+ open: open,
72
+ onOpenChange: function onOpenChange(visible) {
73
+ // 如果日期范围组件打开时 不关闭筛选
74
+ if (dateRangeOpen && !visible) {
75
+ return;
76
+ }
77
+ setOpen(visible);
78
+ }
50
79
  }, /*#__PURE__*/React.createElement(Button, {
51
80
  icon: /*#__PURE__*/React.createElement(FilterLines, null),
52
81
  size: "large"
@@ -70,10 +70,13 @@ export var batchExport = function batchExport(exportParams, exportImport) {
70
70
  // 所有记录
71
71
  if (type === "all-records") {
72
72
  _name = "".concat(getText("table-action-export-import-all-records")).concat(_name);
73
- var _lists = (exportParams === null || exportParams === void 0 ? void 0 : exportParams.originDataSource) || [];
74
- params.ids = _lists.map(function (item) {
75
- return (item === null || item === void 0 ? void 0 : item.id) || (item === null || item === void 0 ? void 0 : item.form_record_id);
76
- });
73
+ // 表单则直接导出
74
+ if (otherParams !== null && otherParams !== void 0 && otherParams.form_id || otherParams !== null && otherParams !== void 0 && otherParams.code) {
75
+ var _lists = (exportParams === null || exportParams === void 0 ? void 0 : exportParams.originDataSource) || [];
76
+ params.ids = _lists.map(function (item) {
77
+ return (item === null || item === void 0 ? void 0 : item.id) || (item === null || item === void 0 ? void 0 : item.form_record_id);
78
+ });
79
+ }
77
80
  params.file_name = _name;
78
81
  }
79
82
 
@@ -83,5 +86,12 @@ export var batchExport = function batchExport(exportParams, exportImport) {
83
86
  params.ids = selectLists || [];
84
87
  params.file_name = _name;
85
88
  }
89
+
90
+ // 不是所有记录则删除对应的参数
91
+ if (type !== 'all-records') {
92
+ params === null || params === void 0 ? true : delete params.shipping_status;
93
+ params === null || params === void 0 ? true : delete params.payment_status;
94
+ params === null || params === void 0 ? true : delete params.status;
95
+ }
86
96
  return _batchExport(params);
87
97
  };
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
155
155
  sort?: SortType | undefined;
156
156
  mode: "" | "localStorage" | "remote";
157
157
  currentViewMode: ModeType;
158
- }) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
158
+ }) => ("view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting" | "filter_setting")[];
159
159
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
160
160
  export declare const stringify: (obj: Record<string, any>) => string;
161
161
  export {};
@@ -17,6 +17,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
17
17
  import { useDebounce, useSize } from 'ahooks';
18
18
  import { Form } from 'antd';
19
19
  import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
20
+ import classNames from 'classNames';
20
21
  import { useSharedState } from "../../hooks";
21
22
  import useEngineContext from "../../hooks/useEngineContext";
22
23
  import Actions from "./Actions";
@@ -79,6 +80,10 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
79
80
  wait: 100
80
81
  });
81
82
  var utils = context === null || context === void 0 ? void 0 : (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils;
83
+ var isTerminal = useMemo(function () {
84
+ var _utils$isTerminal;
85
+ return utils === null || utils === void 0 ? void 0 : (_utils$isTerminal = utils.isTerminal) === null || _utils$isTerminal === void 0 ? void 0 : _utils$isTerminal.call(utils);
86
+ }, [utils]);
82
87
  var tableId = useMemo(function () {
83
88
  if (props.__designMode === 'design') {
84
89
  return 'designMode-mock-table-id';
@@ -285,7 +290,9 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
285
290
  },
286
291
  className: "materials-grid-form-wrap"
287
292
  }, /*#__PURE__*/React.createElement("div", {
288
- className: 'materials-grid',
293
+ className: classNames('materials-grid', {
294
+ 'materials-grid-terminal': isTerminal
295
+ }),
289
296
  style: style,
290
297
  ref: wrapRef
291
298
  }, /*#__PURE__*/React.createElement(Header, {
@@ -144,4 +144,10 @@
144
144
  justify-content: center;
145
145
  }
146
146
  }
147
+ }
148
+
149
+ .materials-grid-terminal {
150
+ .pisell-lowcode-table-cell-row-hover {
151
+ background-color: transparent !important;
152
+ }
147
153
  }
@@ -29,6 +29,13 @@ var formatApiParams = function formatApiParams(params, type) {
29
29
  var _url = (params === null || params === void 0 ? void 0 : params.url) || (defaultUrl === null || defaultUrl === void 0 ? void 0 : defaultUrl[type]);
30
30
  var _params = _objectSpread({}, params);
31
31
  delete _params.url;
32
+
33
+ // 删除无用数据
34
+ if (type !== 'export') {
35
+ _params === null || _params === void 0 ? true : delete _params.shipping_status;
36
+ _params === null || _params === void 0 ? true : delete _params.payment_status;
37
+ _params === null || _params === void 0 ? true : delete _params.status;
38
+ }
32
39
  return {
33
40
  url: _url,
34
41
  params: _objectSpread({}, _params)
@@ -1,5 +1,8 @@
1
- import React from "react";
2
- import "./index.less";
3
- import { DropdownProps } from "./types";
4
- declare const Dropdown: React.FC<DropdownProps>;
1
+ import React from 'react';
2
+ import './index.less';
3
+ import { DropdownProps } from './types';
4
+ declare const Dropdown: React.FC<DropdownProps & {
5
+ onOpen: () => void;
6
+ onClose: () => void;
7
+ }>;
5
8
  export default Dropdown;
@@ -79,7 +79,9 @@ var Dropdown = (props) => {
79
79
  otherFilter,
80
80
  onChange,
81
81
  quickFilterMaxLength,
82
- formFiltersPrefix
82
+ formFiltersPrefix,
83
+ onOpen,
84
+ onClose
83
85
  } = props;
84
86
  const list = (0, import_react.useMemo)(() => {
85
87
  return {
@@ -137,6 +139,16 @@ var Dropdown = (props) => {
137
139
  type: item.type,
138
140
  other: {
139
141
  ...item.other,
142
+ onOpen: () => {
143
+ var _a2, _b2;
144
+ (_b2 = (_a2 = item.other) == null ? void 0 : _a2.onOpen) == null ? void 0 : _b2.call(_a2);
145
+ onOpen == null ? void 0 : onOpen();
146
+ },
147
+ onClose: () => {
148
+ var _a2, _b2;
149
+ (_b2 = (_a2 = item.other) == null ? void 0 : _a2.onClose) == null ? void 0 : _b2.call(_a2);
150
+ onClose == null ? void 0 : onClose();
151
+ },
140
152
  style: {
141
153
  ...((_b = item.other) == null ? void 0 : _b.style) || {},
142
154
  width: "100%"
@@ -1,4 +1,4 @@
1
- import React from "react";
2
- import { FilterListProps } from "./types";
1
+ import React from 'react';
2
+ import { FilterListProps } from './types';
3
3
  declare const Filter: React.FC<FilterListProps>;
4
4
  export default Filter;
@@ -45,6 +45,8 @@ var Filter = ({
45
45
  formFiltersPrefix
46
46
  }) => {
47
47
  const ref = (0, import_react.useRef)(null);
48
+ const [open, setOpen] = (0, import_react.useState)(false);
49
+ const [dateRangeOpen, setDateRangeOpen] = (0, import_react.useState)(false);
48
50
  const quickFilter = (0, import_react.useMemo)(() => {
49
51
  return (value == null ? void 0 : value.quickFilter) || [];
50
52
  }, [value == null ? void 0 : value.quickFilter]);
@@ -62,7 +64,9 @@ var Filter = ({
62
64
  otherFilter,
63
65
  onChange: handleChange,
64
66
  quickFilterMaxLength,
65
- formFiltersPrefix
67
+ formFiltersPrefix,
68
+ onOpen: () => setDateRangeOpen(true),
69
+ onClose: () => setDateRangeOpen(false)
66
70
  }
67
71
  );
68
72
  }, [quickFilter, otherFilter, quickFilterMaxLength, formFiltersPrefix]);
@@ -73,7 +77,14 @@ var Filter = ({
73
77
  content,
74
78
  arrow: false,
75
79
  getPopupContainer: () => ref.current,
76
- trigger: ["click"]
80
+ trigger: ["click"],
81
+ open,
82
+ onOpenChange: (visible) => {
83
+ if (dateRangeOpen && !visible) {
84
+ return;
85
+ }
86
+ setOpen(visible);
87
+ }
77
88
  },
78
89
  /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { icon: /* @__PURE__ */ import_react.default.createElement(import_FilterLines.default, null), size: "large" }, isMobileBool ? null : (0, import_locales.getText)("table-action-filter-button"))
79
90
  ));
@@ -54,8 +54,10 @@ var batchExport = (exportParams, exportImport) => {
54
54
  }
55
55
  if (type === "all-records") {
56
56
  _name = `${(0, import_locales.getText)("table-action-export-import-all-records")}${_name}`;
57
- const lists = (exportParams == null ? void 0 : exportParams.originDataSource) || [];
58
- params.ids = lists.map((item) => (item == null ? void 0 : item.id) || (item == null ? void 0 : item.form_record_id));
57
+ if ((otherParams == null ? void 0 : otherParams.form_id) || (otherParams == null ? void 0 : otherParams.code)) {
58
+ const lists = (exportParams == null ? void 0 : exportParams.originDataSource) || [];
59
+ params.ids = lists.map((item) => (item == null ? void 0 : item.id) || (item == null ? void 0 : item.form_record_id));
60
+ }
59
61
  params.file_name = _name;
60
62
  }
61
63
  if (type === "selected-records") {
@@ -65,6 +67,11 @@ var batchExport = (exportParams, exportImport) => {
65
67
  params.ids = selectLists || [];
66
68
  params.file_name = _name;
67
69
  }
70
+ if (type !== "all-records") {
71
+ params == null ? true : delete params.shipping_status;
72
+ params == null ? true : delete params.payment_status;
73
+ params == null ? true : delete params.status;
74
+ }
68
75
  return _batchExport(params);
69
76
  };
70
77
  // Annotate the CommonJS export names for ESM import in node:
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
155
155
  sort?: SortType | undefined;
156
156
  mode: "" | "localStorage" | "remote";
157
157
  currentViewMode: ModeType;
158
- }) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
158
+ }) => ("view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting" | "filter_setting")[];
159
159
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
160
160
  export declare const stringify: (obj: Record<string, any>) => string;
161
161
  export {};
@@ -35,6 +35,7 @@ module.exports = __toCommonJS(table_exports);
35
35
  var import_ahooks = require("ahooks");
36
36
  var import_antd = require("antd");
37
37
  var import_react = __toESM(require("react"));
38
+ var import_classNames = __toESM(require("classNames"));
38
39
  var import_hooks = require("../../hooks");
39
40
  var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
40
41
  var import_Actions = __toESM(require("./Actions"));
@@ -91,6 +92,10 @@ var GridView = (0, import_model.Provider)(
91
92
  const { width } = (0, import_ahooks.useSize)(wrapRef) || {};
92
93
  const debouncedWidth = (0, import_ahooks.useDebounce)(width, { wait: 100 });
93
94
  const utils = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils;
95
+ const isTerminal = (0, import_react.useMemo)(() => {
96
+ var _a2;
97
+ return (_a2 = utils == null ? void 0 : utils.isTerminal) == null ? void 0 : _a2.call(utils);
98
+ }, [utils]);
94
99
  const tableId = (0, import_react.useMemo)(() => {
95
100
  if (props.__designMode === "design") {
96
101
  return "designMode-mock-table-id";
@@ -299,30 +304,43 @@ var GridView = (0, import_model.Provider)(
299
304
  },
300
305
  className: "materials-grid-form-wrap"
301
306
  },
302
- /* @__PURE__ */ import_react.default.createElement("div", { className: "materials-grid", style, ref: wrapRef }, /* @__PURE__ */ import_react.default.createElement(import_Header.default, { title, buttons }), /* @__PURE__ */ import_react.default.createElement(
303
- import_Actions.default,
304
- {
305
- view,
306
- buttons: actionButtons,
307
- columnSetting,
308
- dataSourceGroup,
309
- filter,
310
- sort,
311
- tableId,
312
- localPagination: (_e = other == null ? void 0 : other.pagination) == null ? void 0 : _e.localPagination,
313
- gallery,
314
- exportImport
315
- }
316
- ), /* @__PURE__ */ import_react.default.createElement(import_Summary.default, { summary }), /* @__PURE__ */ import_react.default.createElement(
317
- import_View.default,
307
+ /* @__PURE__ */ import_react.default.createElement(
308
+ "div",
318
309
  {
319
- ...props,
320
- filter,
321
- sort,
322
- setTableSetting,
323
- dataSourceGroup
324
- }
325
- ))
310
+ className: (0, import_classNames.default)("materials-grid", {
311
+ "materials-grid-terminal": isTerminal
312
+ }),
313
+ style,
314
+ ref: wrapRef
315
+ },
316
+ /* @__PURE__ */ import_react.default.createElement(import_Header.default, { title, buttons }),
317
+ /* @__PURE__ */ import_react.default.createElement(
318
+ import_Actions.default,
319
+ {
320
+ view,
321
+ buttons: actionButtons,
322
+ columnSetting,
323
+ dataSourceGroup,
324
+ filter,
325
+ sort,
326
+ tableId,
327
+ localPagination: (_e = other == null ? void 0 : other.pagination) == null ? void 0 : _e.localPagination,
328
+ gallery,
329
+ exportImport
330
+ }
331
+ ),
332
+ /* @__PURE__ */ import_react.default.createElement(import_Summary.default, { summary }),
333
+ /* @__PURE__ */ import_react.default.createElement(
334
+ import_View.default,
335
+ {
336
+ ...props,
337
+ filter,
338
+ sort,
339
+ setTableSetting,
340
+ dataSourceGroup
341
+ }
342
+ )
343
+ )
326
344
  );
327
345
  })
328
346
  );
@@ -144,4 +144,10 @@
144
144
  justify-content: center;
145
145
  }
146
146
  }
147
+ }
148
+
149
+ .materials-grid-terminal {
150
+ .pisell-lowcode-table-cell-row-hover {
151
+ background-color: transparent !important;
152
+ }
147
153
  }
@@ -38,6 +38,11 @@ var formatApiParams = (params, type) => {
38
38
  const _url = (params == null ? void 0 : params.url) || (defaultUrl == null ? void 0 : defaultUrl[type]);
39
39
  let _params = { ...params };
40
40
  delete _params.url;
41
+ if (type !== "export") {
42
+ _params == null ? true : delete _params.shipping_status;
43
+ _params == null ? true : delete _params.payment_status;
44
+ _params == null ? true : delete _params.status;
45
+ }
41
46
  return {
42
47
  url: _url,
43
48
  params: { ..._params }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "2.2.26",
3
+ "version": "2.2.28",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -63,9 +63,9 @@
63
63
  "react-virtualized-auto-sizer": "^1.0.20",
64
64
  "crypto-js": "^4.2.0",
65
65
  "@zxing/library": "0.21.2",
66
- "@pisell/utils": "2.0.1",
67
66
  "@pisell/icon": "0.0.11",
68
- "@pisell/date-picker": "1.0.102"
67
+ "@pisell/date-picker": "1.0.100",
68
+ "@pisell/utils": "2.0.1"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "react": "^18.0.0",
@@ -1,9 +0,0 @@
1
- /**
2
- * @title: 格式化导出导入接口地址
3
- * @description:
4
- * @param {string} url
5
- * @return {*}
6
- * @Author: WangHan
7
- * @Date: 2024-09-05 11:39
8
- */
9
- export declare const formatApiUrl: (url: string) => string;
@@ -1,11 +0,0 @@
1
- /**
2
- * @title: 格式化导出导入接口地址
3
- * @description:
4
- * @param {string} url
5
- * @return {*}
6
- * @Author: WangHan
7
- * @Date: 2024-09-05 11:39
8
- */
9
- export var formatApiUrl = function formatApiUrl(url) {
10
- return url || '/shop/form/data';
11
- };
@@ -1,9 +0,0 @@
1
- /**
2
- * @title: 格式化导出导入接口地址
3
- * @description:
4
- * @param {string} url
5
- * @return {*}
6
- * @Author: WangHan
7
- * @Date: 2024-09-05 11:39
8
- */
9
- export declare const formatApiUrl: (url: string) => string;
@@ -1,31 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/components/table/Actions/component/ExportImport/utils/index.ts
20
- var utils_exports = {};
21
- __export(utils_exports, {
22
- formatApiUrl: () => formatApiUrl
23
- });
24
- module.exports = __toCommonJS(utils_exports);
25
- var formatApiUrl = (url) => {
26
- return url || "/shop/form/data";
27
- };
28
- // Annotate the CommonJS export names for ESM import in node:
29
- 0 && (module.exports = {
30
- formatApiUrl
31
- });