@vtx/components 4.0.0-beta.37 → 4.0.0-beta.39

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.
@@ -135,11 +135,11 @@ function VtxTable(props) {
135
135
  }
136
136
  var tableHeight = (_bodyDiv$getElementsB = bodyDiv.getElementsByTagName('table')) === null || _bodyDiv$getElementsB === void 0 || (_bodyDiv$getElementsB = _bodyDiv$getElementsB[0]) === null || _bodyDiv$getElementsB === void 0 ? void 0 : _bodyDiv$getElementsB.clientHeight;
137
137
  if (tablePlaceholder) {
138
- tablePlaceholder.style.height = "".concat(bodyHeight - (rest.scrollY || 0) - 12 - 32, "px");
138
+ tablePlaceholder.style.height = "".concat(bodyHeight - (rest.scrollY || 0) - 48 - 12, "px");
139
139
  var tableCell = Array.prototype.filter.call(tablePlaceholder.getElementsByTagName('td'), function (dom) {
140
140
  return dom.className.includes('ant-table-cell');
141
141
  })[0];
142
- tableCell.style.height = "".concat(bodyHeight - (rest.scrollY || 0) - 12 - 32, "px");
142
+ tableCell.style.height = "".concat(bodyHeight - (rest.scrollY || 0) - 48 - 12, "px");
143
143
  }
144
144
  // antd6.x 的bug 如果table的高度 没有body 高 则没有滚动条
145
145
 
@@ -356,7 +356,7 @@ function VtxTable(props) {
356
356
  }) : null;
357
357
  return wrapSSR( /*#__PURE__*/_jsxs("div", {
358
358
  id: datagridId,
359
- className: classnames(prefixCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-fit"), autoFit), "".concat(prefixCls, "-noFit"), !autoFit), "".concat(prefixCls, "-nodata"), !(dataSource !== null && dataSource !== void 0 && dataSource.length)), "".concat(prefixCls, "-userAgent-mac"), isMac), "".concat(prefixCls, "-striped"), tableStyles.includes('striped')), "".concat(prefixCls, "-no-border"), !tableStyles.includes('border')), "".concat(prefixCls, "-header-background"), tableStyles.includes('header-background')), hashId),
359
+ className: classnames(prefixCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-fit"), autoFit), "".concat(prefixCls, "-noFit"), !autoFit), "".concat(prefixCls, "-nodata"), !(dataSource !== null && dataSource !== void 0 && dataSource.length)), "".concat(prefixCls, "-userAgent-mac"), isMac), "".concat(prefixCls, "-striped"), tableStyles.includes('striped')), "".concat(prefixCls, "-no-border"), !tableStyles.includes('border')), "".concat(prefixCls, "-no-data"), (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) === 0), "".concat(prefixCls, "-header-background"), tableStyles.includes('header-background')), "".concat(prefixCls, "-no-header-background"), !tableStyles.includes('header-background')), hashId),
360
360
  ref: rootDomRef,
361
361
  style: style,
362
362
  children: [toolbarRender, alertRender, /*#__PURE__*/_jsx(Table, _objectSpread(_objectSpread({
@@ -8,7 +8,7 @@ import { useStyle as useAntdStyle } from "../../vtx-provider";
8
8
  var genVtxStyle = function genVtxStyle(token) {
9
9
  var componentCls = token.componentCls,
10
10
  antCls = token.antCls;
11
- return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, componentCls, _defineProperty({
11
+ return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, componentCls, _defineProperty({
12
12
  position: 'relative',
13
13
  // overflow: 'hidden',
14
14
  display: 'flex',
@@ -26,7 +26,10 @@ var genVtxStyle = function genVtxStyle(token) {
26
26
  flex: 1
27
27
  }, '.ant-table-container', _defineProperty(_defineProperty({}, '.ant-table-body', {
28
28
  scrollbarWidth: "thin"
29
- }), '.ant-table-content', _defineProperty({}, 'table', {
29
+ }), '.ant-table-content', _defineProperty({
30
+ // height: '100%',
31
+ scrollbarWidth: "thin"
32
+ }, 'table', {
30
33
  // height: '100%',
31
34
  minWidth: "calc(100% - 1px) !important"
32
35
  })))))), '.ant-table', _defineProperty(_defineProperty(_defineProperty({}, '.ant-table-header', _defineProperty({}, '.ant-table-thead', {
@@ -44,8 +47,8 @@ var genVtxStyle = function genVtxStyle(token) {
44
47
  left: 0,
45
48
  backgroundColor: 'transparent',
46
49
  borderTop: 'none',
47
- borderInlineEnd: "var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)",
48
- borderBottom: "var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)",
50
+ // borderInlineEnd: "var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)",
51
+ // borderBottom: "var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)",
49
52
  '>td.ant-table-cell': {
50
53
  padding: 0,
51
54
  width: '100%',
@@ -101,7 +104,17 @@ var genVtxStyle = function genVtxStyle(token) {
101
104
  '>tr>th': {
102
105
  background: token.colorBgLayoutTable
103
106
  }
104
- })))));
107
+ }))))), "".concat(componentCls, "-no-header-background"), _defineProperty({}, "".concat(antCls, "-table-wrapper "), _defineProperty({}, '.ant-table-thead', {
108
+ '>tr>th': {
109
+ background: token.colorBgContainer
110
+ }
111
+ }))), "".concat(componentCls, "-no-data"), _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, '.ant-spin', _defineProperty({}, '.ant-spin-container', _defineProperty({}, '.ant-table', _defineProperty({}, '.ant-table-container', _defineProperty({}, '.ant-table-content', _defineProperty({
112
+ borderRight: "var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)",
113
+ borderBottom: "var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)"
114
+ }, 'table', {})))))))), "".concat(componentCls, "-no-data").concat(componentCls, "-no-border"), _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, '.ant-spin', _defineProperty({}, '.ant-spin-container', _defineProperty({}, '.ant-table', _defineProperty({}, '.ant-table-container', _defineProperty({}, '.ant-table-content', {
115
+ borderRight: "none",
116
+ borderBottom: "none"
117
+ })))))));
105
118
  };
106
119
  export function useStyle(prefix) {
107
120
  return useAntdStyle(prefix, function (token) {
@@ -298,7 +298,9 @@ var VtxExportAsync = function VtxExportAsync(props) {
298
298
  subtitle: TextEnum.modalTitleText
299
299
  }) : TextEnum.modalTitleText,
300
300
  open: state.visible,
301
- maskClosable: false,
301
+ mask: {
302
+ closable: false
303
+ },
302
304
  onCancel: close,
303
305
  footer: [/*#__PURE__*/_jsx(Button, {
304
306
  onClick: close,
@@ -328,7 +328,10 @@ function VtxImport(props) {
328
328
  onCancel: function onCancel() {
329
329
  return closeModal();
330
330
  },
331
- maskClosable: false,
331
+ // maskClosable: false,
332
+ mask: {
333
+ closable: false
334
+ },
332
335
  footer: [templateURL ? /*#__PURE__*/_jsx(Button, {
333
336
  onClick: function onClick() {
334
337
  window.open(templateURL);
@@ -40,7 +40,10 @@ function VtxImportResult(props) {
40
40
  }
41
41
  },
42
42
  width: state.modalWidth,
43
- maskClosable: false,
43
+ // maskClosable: false,
44
+ mask: {
45
+ closable: false
46
+ },
44
47
  footer: [/*#__PURE__*/_jsx(Button, {
45
48
  onClick: function onClick() {
46
49
  if (typeof props.hideVisible === 'function') {
@@ -371,7 +371,10 @@ var VtxImport2 = function VtxImport2(props) {
371
371
  var modelProps = {
372
372
  open: visible,
373
373
  width: width || 392,
374
- maskClosable: false,
374
+ // maskClosable: false,
375
+ mask: {
376
+ closable: false
377
+ },
375
378
  footer: [/*#__PURE__*/_jsx(Button, {
376
379
  onClick: close,
377
380
  children: "".concat(TextEnum.btnCloseText).concat(status === 1 && result ? '(' + countdown + ')' : '')
@@ -195,7 +195,10 @@ function VtxModal(props) {
195
195
  destroyOnHidden: (_props$destroyOnClose = props.destroyOnClose) !== null && _props$destroyOnClose !== void 0 ? _props$destroyOnClose : true
196
196
  };
197
197
  var newProps = _objectSpread(_objectSpread(_objectSpread({
198
- maskClosable: false,
198
+ // maskClosable: false,
199
+ mask: {
200
+ closable: false
201
+ },
199
202
  // destroyOnClose: true,
200
203
  width: 700
201
204
  }, props), legacyProps), {}, {
@@ -145,11 +145,11 @@ function VtxTable(props) {
145
145
  }
146
146
  var tableHeight = (_bodyDiv$getElementsB = bodyDiv.getElementsByTagName('table')) === null || _bodyDiv$getElementsB === void 0 || (_bodyDiv$getElementsB = _bodyDiv$getElementsB[0]) === null || _bodyDiv$getElementsB === void 0 ? void 0 : _bodyDiv$getElementsB.clientHeight;
147
147
  if (tablePlaceholder) {
148
- tablePlaceholder.style.height = "".concat(bodyHeight - (rest.scrollY || 0) - 12 - 32, "px");
148
+ tablePlaceholder.style.height = "".concat(bodyHeight - (rest.scrollY || 0) - 48 - 12, "px");
149
149
  var tableCell = Array.prototype.filter.call(tablePlaceholder.getElementsByTagName('td'), function (dom) {
150
150
  return dom.className.includes('ant-table-cell');
151
151
  })[0];
152
- tableCell.style.height = "".concat(bodyHeight - (rest.scrollY || 0) - 12 - 32, "px");
152
+ tableCell.style.height = "".concat(bodyHeight - (rest.scrollY || 0) - 48 - 12, "px");
153
153
  }
154
154
  // antd6.x 的bug 如果table的高度 没有body 高 则没有滚动条
155
155
 
@@ -366,7 +366,7 @@ function VtxTable(props) {
366
366
  }) : null;
367
367
  return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
368
368
  id: datagridId,
369
- className: (0, _classnames2.default)(prefixCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-fit"), autoFit), "".concat(prefixCls, "-noFit"), !autoFit), "".concat(prefixCls, "-nodata"), !(dataSource !== null && dataSource !== void 0 && dataSource.length)), "".concat(prefixCls, "-userAgent-mac"), isMac), "".concat(prefixCls, "-striped"), tableStyles.includes('striped')), "".concat(prefixCls, "-no-border"), !tableStyles.includes('border')), "".concat(prefixCls, "-header-background"), tableStyles.includes('header-background')), hashId),
369
+ className: (0, _classnames2.default)(prefixCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-fit"), autoFit), "".concat(prefixCls, "-noFit"), !autoFit), "".concat(prefixCls, "-nodata"), !(dataSource !== null && dataSource !== void 0 && dataSource.length)), "".concat(prefixCls, "-userAgent-mac"), isMac), "".concat(prefixCls, "-striped"), tableStyles.includes('striped')), "".concat(prefixCls, "-no-border"), !tableStyles.includes('border')), "".concat(prefixCls, "-no-data"), (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) === 0), "".concat(prefixCls, "-header-background"), tableStyles.includes('header-background')), "".concat(prefixCls, "-no-header-background"), !tableStyles.includes('header-background')), hashId),
370
370
  ref: rootDomRef,
371
371
  style: style,
372
372
  children: [toolbarRender, alertRender, /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Table, _objectSpread(_objectSpread({
@@ -14,7 +14,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
14
14
  var genVtxStyle = function genVtxStyle(token) {
15
15
  var componentCls = token.componentCls,
16
16
  antCls = token.antCls;
17
- return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, componentCls, _defineProperty({
17
+ return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, componentCls, _defineProperty({
18
18
  position: 'relative',
19
19
  // overflow: 'hidden',
20
20
  display: 'flex',
@@ -32,7 +32,10 @@ var genVtxStyle = function genVtxStyle(token) {
32
32
  flex: 1
33
33
  }, '.ant-table-container', _defineProperty(_defineProperty({}, '.ant-table-body', {
34
34
  scrollbarWidth: "thin"
35
- }), '.ant-table-content', _defineProperty({}, 'table', {
35
+ }), '.ant-table-content', _defineProperty({
36
+ // height: '100%',
37
+ scrollbarWidth: "thin"
38
+ }, 'table', {
36
39
  // height: '100%',
37
40
  minWidth: "calc(100% - 1px) !important"
38
41
  })))))), '.ant-table', _defineProperty(_defineProperty(_defineProperty({}, '.ant-table-header', _defineProperty({}, '.ant-table-thead', {
@@ -50,8 +53,8 @@ var genVtxStyle = function genVtxStyle(token) {
50
53
  left: 0,
51
54
  backgroundColor: 'transparent',
52
55
  borderTop: 'none',
53
- borderInlineEnd: "var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)",
54
- borderBottom: "var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)",
56
+ // borderInlineEnd: "var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)",
57
+ // borderBottom: "var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)",
55
58
  '>td.ant-table-cell': {
56
59
  padding: 0,
57
60
  width: '100%',
@@ -107,7 +110,17 @@ var genVtxStyle = function genVtxStyle(token) {
107
110
  '>tr>th': {
108
111
  background: token.colorBgLayoutTable
109
112
  }
110
- })))));
113
+ }))))), "".concat(componentCls, "-no-header-background"), _defineProperty({}, "".concat(antCls, "-table-wrapper "), _defineProperty({}, '.ant-table-thead', {
114
+ '>tr>th': {
115
+ background: token.colorBgContainer
116
+ }
117
+ }))), "".concat(componentCls, "-no-data"), _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, '.ant-spin', _defineProperty({}, '.ant-spin-container', _defineProperty({}, '.ant-table', _defineProperty({}, '.ant-table-container', _defineProperty({}, '.ant-table-content', _defineProperty({
118
+ borderRight: "var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)",
119
+ borderBottom: "var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)"
120
+ }, 'table', {})))))))), "".concat(componentCls, "-no-data").concat(componentCls, "-no-border"), _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, '.ant-spin', _defineProperty({}, '.ant-spin-container', _defineProperty({}, '.ant-table', _defineProperty({}, '.ant-table-container', _defineProperty({}, '.ant-table-content', {
121
+ borderRight: "none",
122
+ borderBottom: "none"
123
+ })))))));
111
124
  };
112
125
  function useStyle(prefix) {
113
126
  return (0, _vtxProvider.useStyle)(prefix, function (token) {
@@ -306,7 +306,9 @@ var VtxExportAsync = exports.VtxExportAsync = function VtxExportAsync(props) {
306
306
  subtitle: TextEnum.modalTitleText
307
307
  }) : TextEnum.modalTitleText,
308
308
  open: state.visible,
309
- maskClosable: false,
309
+ mask: {
310
+ closable: false
311
+ },
310
312
  onCancel: close,
311
313
  footer: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, {
312
314
  onClick: close,
@@ -337,7 +337,10 @@ function VtxImport(props) {
337
337
  onCancel: function onCancel() {
338
338
  return closeModal();
339
339
  },
340
- maskClosable: false,
340
+ // maskClosable: false,
341
+ mask: {
342
+ closable: false
343
+ },
341
344
  footer: [templateURL ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, {
342
345
  onClick: function onClick() {
343
346
  window.open(templateURL);
@@ -47,7 +47,10 @@ function VtxImportResult(props) {
47
47
  }
48
48
  },
49
49
  width: state.modalWidth,
50
- maskClosable: false,
50
+ // maskClosable: false,
51
+ mask: {
52
+ closable: false
53
+ },
51
54
  footer: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, {
52
55
  onClick: function onClick() {
53
56
  if (typeof props.hideVisible === 'function') {
@@ -377,7 +377,10 @@ var VtxImport2 = exports.VtxImport2 = function VtxImport2(props) {
377
377
  var modelProps = {
378
378
  open: visible,
379
379
  width: width || 392,
380
- maskClosable: false,
380
+ // maskClosable: false,
381
+ mask: {
382
+ closable: false
383
+ },
381
384
  footer: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Button, {
382
385
  onClick: close,
383
386
  children: "".concat(TextEnum.btnCloseText).concat(status === 1 && result ? '(' + countdown + ')' : '')
@@ -202,7 +202,10 @@ function VtxModal(props) {
202
202
  destroyOnHidden: (_props$destroyOnClose = props.destroyOnClose) !== null && _props$destroyOnClose !== void 0 ? _props$destroyOnClose : true
203
203
  };
204
204
  var newProps = _objectSpread(_objectSpread(_objectSpread({
205
- maskClosable: false,
205
+ // maskClosable: false,
206
+ mask: {
207
+ closable: false
208
+ },
206
209
  // destroyOnClose: true,
207
210
  width: 700
208
211
  }, props), legacyProps), {}, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtx/components",
3
- "version": "4.0.0-beta.37",
3
+ "version": "4.0.0-beta.39",
4
4
  "description": "React components for Vortex",
5
5
  "keywords": [
6
6
  "react",