@pisell/materials 1.0.415 → 1.0.417

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.
@@ -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
  }
@@ -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
  }
@@ -49,6 +49,13 @@ export default {
49
49
  defaultValue: false,
50
50
  setter: 'BoolSetter',
51
51
  },
52
+ {
53
+ name: 'readOnly',
54
+ title: { label: '是否只读', tip: '是否为只读状态' },
55
+ propType: 'bool',
56
+ defaultValue: false,
57
+ setter: 'BoolSetter',
58
+ },
52
59
  {
53
60
  name: 'placeholder',
54
61
  title: { label: '占位提示', tip: '占位提示' },
@@ -151,6 +158,16 @@ export default {
151
158
  title: { label: '失去焦点回调', tip: '失去焦点回调' },
152
159
  propType: 'func',
153
160
  },
161
+ {
162
+ name: 'onClick',
163
+ title: { label: '点击回调', tip: '点击回调' },
164
+ propType: 'func',
165
+ },
166
+ {
167
+ name: 'onClear',
168
+ title: { label: '按下清除按钮的回调', tip: '按下清除按钮的回调' },
169
+ propType: 'func',
170
+ },
154
171
  ],
155
172
  configure: {
156
173
  supports: {
@@ -188,6 +205,14 @@ export default {
188
205
  name: 'onBlur',
189
206
  template: "onBlur(event,${extParams}){\n// 按键释放回调\nconsole.log('onBlur',event);}",
190
207
  },
208
+ {
209
+ name: 'onClick',
210
+ template: "onClick(event,${extParams}){\n// 点击回调\nconsole.log('onClick',event);}",
211
+ },
212
+ {
213
+ name: 'onClear',
214
+ template: "onClear(event,${extParams}){\n// 按下清除按钮的回调\nconsole.log('onClear',event);}",
215
+ },
191
216
  ],
192
217
  },
193
218
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "1.0.415",
3
+ "version": "1.0.417",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",