@vtx/components 4.0.0-beta.25 → 4.0.0-beta.26
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.
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["confirm"]
|
|
2
|
+
var _excluded = ["confirm"],
|
|
3
|
+
_excluded2 = ["confirm"];
|
|
4
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
5
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
+
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); }
|
|
7
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
8
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
9
|
+
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; }
|
|
3
10
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
11
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
12
|
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; }
|
|
@@ -7,12 +14,6 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
7
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
15
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
16
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
11
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
|
-
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); }
|
|
13
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
14
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
15
|
-
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; }
|
|
16
17
|
import { DownOutlined } from '@ant-design/icons';
|
|
17
18
|
import { Divider, Dropdown, Popconfirm } from 'antd';
|
|
18
19
|
import Icon from "../vtx-icon";
|
|
@@ -45,14 +46,32 @@ var renderColumnButtons = function renderColumnButtons(_ref) {
|
|
|
45
46
|
/* eslint-disable */
|
|
46
47
|
moreRender = /*#__PURE__*/_jsx(Dropdown, {
|
|
47
48
|
menu: {
|
|
48
|
-
items: (moreActions === null || moreActions === void 0 ? void 0 : moreActions.map(function (item,
|
|
49
|
+
items: (moreActions === null || moreActions === void 0 ? void 0 : moreActions.map(function (item, index) {
|
|
50
|
+
var name = item.name,
|
|
51
|
+
popconfirm = item.popconfirm;
|
|
52
|
+
if (popconfirm) {
|
|
53
|
+
var confirm = popconfirm.confirm,
|
|
54
|
+
rest = _objectWithoutProperties(popconfirm, _excluded);
|
|
55
|
+
return {
|
|
56
|
+
key: item.name,
|
|
57
|
+
label: /*#__PURE__*/_jsx(Popconfirm, _objectSpread(_objectSpread({
|
|
58
|
+
trigger: ['hover'],
|
|
59
|
+
onConfirm: confirm ? function () {
|
|
60
|
+
return confirm(record, index);
|
|
61
|
+
} : undefined
|
|
62
|
+
}, rest), {}, {
|
|
63
|
+
children: name
|
|
64
|
+
}))
|
|
65
|
+
};
|
|
66
|
+
}
|
|
49
67
|
return {
|
|
50
|
-
key:
|
|
68
|
+
key: item.name,
|
|
51
69
|
label: item.name
|
|
52
70
|
};
|
|
53
71
|
})) || [],
|
|
54
72
|
onClick: function onClick(e) {
|
|
55
|
-
|
|
73
|
+
var _moreActions$e$key;
|
|
74
|
+
(_moreActions$e$key = moreActions[e.key]) === null || _moreActions$e$key === void 0 || _moreActions$e$key.onClick(record, index);
|
|
56
75
|
}
|
|
57
76
|
},
|
|
58
77
|
children: /*#__PURE__*/_jsxs("a", {
|
|
@@ -82,7 +101,7 @@ var renderColumnButtons = function renderColumnButtons(_ref) {
|
|
|
82
101
|
}, name);
|
|
83
102
|
if (popconfirm) {
|
|
84
103
|
var confirm = popconfirm.confirm,
|
|
85
|
-
rest = _objectWithoutProperties(popconfirm,
|
|
104
|
+
rest = _objectWithoutProperties(popconfirm, _excluded2);
|
|
86
105
|
btnNode = /*#__PURE__*/_createElement(Popconfirm, _objectSpread(_objectSpread({}, rest), {}, {
|
|
87
106
|
onConfirm: confirm ? function () {
|
|
88
107
|
return confirm(record, index);
|
|
@@ -10,8 +10,15 @@ var _antd = require("antd");
|
|
|
10
10
|
var _vtxIcon = _interopRequireDefault(require("../vtx-icon"));
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
var _react = require("react");
|
|
13
|
-
var _excluded = ["confirm"]
|
|
13
|
+
var _excluded = ["confirm"],
|
|
14
|
+
_excluded2 = ["confirm"];
|
|
14
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
17
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
18
|
+
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); }
|
|
19
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
20
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
21
|
+
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; }
|
|
15
22
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
23
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
24
|
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; }
|
|
@@ -19,12 +26,6 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
19
26
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
27
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
21
28
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
22
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
23
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
24
|
-
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); }
|
|
25
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
26
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
27
|
-
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; }
|
|
28
29
|
var renderColumnButtons = function renderColumnButtons(_ref) {
|
|
29
30
|
var _renderButtons;
|
|
30
31
|
var renderButtons = _ref.renderButtons,
|
|
@@ -51,14 +52,32 @@ var renderColumnButtons = function renderColumnButtons(_ref) {
|
|
|
51
52
|
/* eslint-disable */
|
|
52
53
|
moreRender = /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Dropdown, {
|
|
53
54
|
menu: {
|
|
54
|
-
items: (moreActions === null || moreActions === void 0 ? void 0 : moreActions.map(function (item,
|
|
55
|
+
items: (moreActions === null || moreActions === void 0 ? void 0 : moreActions.map(function (item, index) {
|
|
56
|
+
var name = item.name,
|
|
57
|
+
popconfirm = item.popconfirm;
|
|
58
|
+
if (popconfirm) {
|
|
59
|
+
var confirm = popconfirm.confirm,
|
|
60
|
+
rest = _objectWithoutProperties(popconfirm, _excluded);
|
|
61
|
+
return {
|
|
62
|
+
key: item.name,
|
|
63
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Popconfirm, _objectSpread(_objectSpread({
|
|
64
|
+
trigger: ['hover'],
|
|
65
|
+
onConfirm: confirm ? function () {
|
|
66
|
+
return confirm(record, index);
|
|
67
|
+
} : undefined
|
|
68
|
+
}, rest), {}, {
|
|
69
|
+
children: name
|
|
70
|
+
}))
|
|
71
|
+
};
|
|
72
|
+
}
|
|
55
73
|
return {
|
|
56
|
-
key:
|
|
74
|
+
key: item.name,
|
|
57
75
|
label: item.name
|
|
58
76
|
};
|
|
59
77
|
})) || [],
|
|
60
78
|
onClick: function onClick(e) {
|
|
61
|
-
|
|
79
|
+
var _moreActions$e$key;
|
|
80
|
+
(_moreActions$e$key = moreActions[e.key]) === null || _moreActions$e$key === void 0 || _moreActions$e$key.onClick(record, index);
|
|
62
81
|
}
|
|
63
82
|
},
|
|
64
83
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("a", {
|
|
@@ -88,7 +107,7 @@ var renderColumnButtons = function renderColumnButtons(_ref) {
|
|
|
88
107
|
}, name);
|
|
89
108
|
if (popconfirm) {
|
|
90
109
|
var confirm = popconfirm.confirm,
|
|
91
|
-
rest = _objectWithoutProperties(popconfirm,
|
|
110
|
+
rest = _objectWithoutProperties(popconfirm, _excluded2);
|
|
92
111
|
btnNode = /*#__PURE__*/(0, _react.createElement)(_antd.Popconfirm, _objectSpread(_objectSpread({}, rest), {}, {
|
|
93
112
|
onConfirm: confirm ? function () {
|
|
94
113
|
return confirm(record, index);
|