@nokecy/qc-ui 0.3.25 → 0.3.27
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.
|
@@ -110,6 +110,7 @@ ArrayBase.Copy = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
110
110
|
var value = (0, _shared.clone)(array === null || array === void 0 ? void 0 : (_array$field2 = array.field) === null || _array$field2 === void 0 ? void 0 : _array$field2.value[index]);
|
|
111
111
|
var distIndex = index + 1;
|
|
112
112
|
(_array$field3 = array.field) === null || _array$field3 === void 0 ? void 0 : (_array$field3$insert = _array$field3.insert) === null || _array$field3$insert === void 0 ? void 0 : _array$field3$insert.call(_array$field3, distIndex, _objectSpread(_objectSpread({}, value), {}, {
|
|
113
|
+
id: undefined,
|
|
113
114
|
_id: (0, _uniqueId.default)(),
|
|
114
115
|
_isNew: true
|
|
115
116
|
}));
|
|
@@ -64,7 +64,13 @@ var ArrayTable = (0, _react2.observer)(function (props) {
|
|
|
64
64
|
var dataSource = Array.isArray(field.value) ? field.value.slice() : [];
|
|
65
65
|
var sources = (0, _utils.useArrayTableSources)();
|
|
66
66
|
var columns = (0, _utils.useArrayTableColumns)(dataSource, field, sources);
|
|
67
|
-
var schema = (0, _react2.useFieldSchema)();
|
|
67
|
+
var schema = (0, _react2.useFieldSchema)(); //@ts-ignore
|
|
68
|
+
|
|
69
|
+
var onAdd = props.onAdd,
|
|
70
|
+
onCopy = props.onCopy,
|
|
71
|
+
onRemove = props.onRemove,
|
|
72
|
+
onMoveDown = props.onMoveDown,
|
|
73
|
+
onMoveUp = props.onMoveUp;
|
|
68
74
|
var addition = (0, _utils.useAddition)();
|
|
69
75
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_antd.Space, {
|
|
70
76
|
style: {
|
|
@@ -86,7 +92,13 @@ var ArrayTable = (0, _react2.observer)(function (props) {
|
|
|
86
92
|
style: {
|
|
87
93
|
height: height ? height : 400
|
|
88
94
|
}
|
|
89
|
-
}, /*#__PURE__*/_react.default.createElement(_arrayBase.default,
|
|
95
|
+
}, /*#__PURE__*/_react.default.createElement(_arrayBase.default, {
|
|
96
|
+
onAdd: onAdd,
|
|
97
|
+
onCopy: onCopy,
|
|
98
|
+
onRemove: onRemove,
|
|
99
|
+
onMoveUp: onMoveUp,
|
|
100
|
+
onMoveDown: onMoveDown
|
|
101
|
+
}, /*#__PURE__*/_react.default.createElement(_agGridReact.AgGridReact, {
|
|
90
102
|
onGridReady: function onGridReady(params) {
|
|
91
103
|
params.api.hidePopupMenu();
|
|
92
104
|
apiRef.current = params.api;
|
|
@@ -85,6 +85,7 @@ ArrayBase.Copy = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
85
85
|
var value = clone(array === null || array === void 0 ? void 0 : (_array$field2 = array.field) === null || _array$field2 === void 0 ? void 0 : _array$field2.value[index]);
|
|
86
86
|
var distIndex = index + 1;
|
|
87
87
|
(_array$field3 = array.field) === null || _array$field3 === void 0 ? void 0 : (_array$field3$insert = _array$field3.insert) === null || _array$field3$insert === void 0 ? void 0 : _array$field3$insert.call(_array$field3, distIndex, _objectSpread(_objectSpread({}, value), {}, {
|
|
88
|
+
id: undefined,
|
|
88
89
|
_id: uniqueId(),
|
|
89
90
|
_isNew: true
|
|
90
91
|
}));
|
|
@@ -42,7 +42,13 @@ var ArrayTable = observer(function (props) {
|
|
|
42
42
|
var dataSource = Array.isArray(field.value) ? field.value.slice() : [];
|
|
43
43
|
var sources = useArrayTableSources();
|
|
44
44
|
var columns = useArrayTableColumns(dataSource, field, sources);
|
|
45
|
-
var schema = useFieldSchema();
|
|
45
|
+
var schema = useFieldSchema(); //@ts-ignore
|
|
46
|
+
|
|
47
|
+
var onAdd = props.onAdd,
|
|
48
|
+
onCopy = props.onCopy,
|
|
49
|
+
onRemove = props.onRemove,
|
|
50
|
+
onMoveDown = props.onMoveDown,
|
|
51
|
+
onMoveUp = props.onMoveUp;
|
|
46
52
|
var addition = useAddition();
|
|
47
53
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Space, {
|
|
48
54
|
style: {
|
|
@@ -64,7 +70,13 @@ var ArrayTable = observer(function (props) {
|
|
|
64
70
|
style: {
|
|
65
71
|
height: height ? height : 400
|
|
66
72
|
}
|
|
67
|
-
}, /*#__PURE__*/React.createElement(ArrayBase,
|
|
73
|
+
}, /*#__PURE__*/React.createElement(ArrayBase, {
|
|
74
|
+
onAdd: onAdd,
|
|
75
|
+
onCopy: onCopy,
|
|
76
|
+
onRemove: onRemove,
|
|
77
|
+
onMoveUp: onMoveUp,
|
|
78
|
+
onMoveDown: onMoveDown
|
|
79
|
+
}, /*#__PURE__*/React.createElement(AgGridReact, {
|
|
68
80
|
onGridReady: function onGridReady(params) {
|
|
69
81
|
params.api.hidePopupMenu();
|
|
70
82
|
apiRef.current = params.api;
|