@pisell/materials 1.0.415 → 1.0.416
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 +4 -4
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +10 -10
- package/es/components/table/index.js +8 -1
- package/es/components/table/index.less +6 -0
- package/lib/components/table/index.js +41 -23
- package/lib/components/table/index.less +6 -0
- package/package.json +1 -1
- package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +0 -9
- package/es/components/table/Actions/component/ExportImport/utils/index.js +0 -11
- package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +0 -9
- package/lib/components/table/Actions/component/ExportImport/utils/index.js +0 -31
|
@@ -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, {
|
|
@@ -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(
|
|
303
|
-
|
|
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
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
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
|
);
|
package/package.json
CHANGED
|
@@ -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
|
-
});
|