ronds-metadata 1.1.58 → 1.1.59

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,6 +1,10 @@
1
1
  import "antd/es/form/style";
2
2
  import _Form from "antd/es/form";
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import "antd/es/radio/style";
5
+ import _Radio from "antd/es/radio";
6
+ import "antd/es/checkbox/style";
7
+ import _Checkbox from "antd/es/checkbox";
4
8
  import "antd/es/select/style";
5
9
  import _Select from "antd/es/select";
6
10
  import "antd/es/space/style";
@@ -22,7 +26,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
22
26
  /*
23
27
  * @Author:wangxian
24
28
  * @Date: 2021-09-18 14:15:04
25
- * @LastEditTime: 2022-11-09 15:59:15
29
+ * @LastEditTime: 2022-11-21 14:21:20
26
30
  */
27
31
  import React from 'react';
28
32
  import { MetadataFormContext, MetadataRefContext } from '../interface';
@@ -270,6 +274,24 @@ function Index(props) {
270
274
  },
271
275
  allowClear: true
272
276
  });
277
+ } else if (extraInfo.type === 'checkbox') {
278
+ return (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.isMutiple) ? /*#__PURE__*/React.createElement(_Checkbox.Group, {
279
+ style: {
280
+ width: '100%'
281
+ }
282
+ }, (httpOptions && httpOptions.length > 0 ? httpOptions : options).map(function (it) {
283
+ return /*#__PURE__*/React.createElement(_Checkbox, {
284
+ value: it.value
285
+ }, it.label);
286
+ })) : /*#__PURE__*/React.createElement(_Radio.Group, {
287
+ style: {
288
+ width: '100%'
289
+ }
290
+ }, (httpOptions && httpOptions.length > 0 ? httpOptions : options).map(function (it) {
291
+ return /*#__PURE__*/React.createElement(_Radio, {
292
+ value: it.value
293
+ }, it.label);
294
+ }));
273
295
  } else {
274
296
  var _extraInfo$disabled3;
275
297
 
@@ -183,6 +183,8 @@ var TableArray = function TableArray(props) {
183
183
  var _columns = [];
184
184
 
185
185
  for (var i = 0; i < _properties.length; i++) {
186
+ var _extraInfo$disabled;
187
+
186
188
  var it = _properties[i];
187
189
  var extraInfo = refFieldsRef.current.get(it.id);
188
190
  var obj = {
@@ -190,7 +192,7 @@ var TableArray = function TableArray(props) {
190
192
  key: it.id,
191
193
  dataIndex: it.id,
192
194
  width: processColumnType(it, extraInfo) === 'buttonCell' ? 60 : 100,
193
- editable: true,
195
+ editable: (_extraInfo$disabled = !extraInfo.disabled) !== null && _extraInfo$disabled !== void 0 ? _extraInfo$disabled : true,
194
196
  type: processColumnType(it, extraInfo),
195
197
  enum: it.type === 'enum' ? processEnumData(it, extraInfo) : undefined
196
198
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "public": true,
3
3
  "name": "ronds-metadata",
4
- "version": "1.1.58",
4
+ "version": "1.1.59",
5
5
  "scripts": {
6
6
  "start": "dumi dev",
7
7
  "docs:build": "dumi build",