ronds-metadata 1.3.52 → 1.3.54

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.
@@ -20,7 +20,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
20
20
  /*
21
21
  * @Author: wangxian
22
22
  * @Date: 2021-09-18 14:15:04
23
- * @LastEditTime: 2024-07-15 10:56:36
23
+ * @LastEditTime: 2024-07-16 15:37:30
24
24
  */
25
25
  import React from 'react';
26
26
  import { UploadOutlined } from '@ant-design/icons';
@@ -134,9 +134,6 @@ function Index(props) {
134
134
  return /*#__PURE__*/React.createElement(_AutoComplete, {
135
135
  maxLength: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxLength,
136
136
  options: httpOptions,
137
- style: {
138
- width: 200
139
- },
140
137
  filterOption: function filterOption(inputValue, option) {
141
138
  var _option$value;
142
139
  return ((_option$value = option.value) === null || _option$value === void 0 ? void 0 : _option$value.toString().toUpperCase().indexOf(inputValue.toUpperCase())) !== -1;
@@ -1,6 +1,8 @@
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/button/style";
5
+ import _Button from "antd/es/button";
4
6
  import "antd/es/radio/style";
5
7
  import _Radio from "antd/es/radio";
6
8
  import "antd/es/row/style";
@@ -37,9 +39,10 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
37
39
  /*
38
40
  * @Author:wangxian
39
41
  * @Date: 2021-09-18 14:15:04
40
- * @LastEditTime: 2024-04-17 09:50:12
42
+ * @LastEditTime: 2024-07-23 10:48:19
41
43
  */
42
44
  import React from 'react';
45
+ import { SyncOutlined } from '@ant-design/icons';
43
46
  import { MetadataFormContext, MetadataRefContext } from '../interface';
44
47
  import { useGetExtraInfo } from '../hooks';
45
48
  import { MetadataService } from '../../../framework/metadata/MetadataService';
@@ -78,19 +81,23 @@ function Index(props) {
78
81
  treeselectOpen = _React$useState6[0],
79
82
  setTreeselectOpen = _React$useState6[1];
80
83
  var treeRef = React.useRef(null);
81
- var _React$useState7 = React.useState(),
84
+ var _React$useState7 = React.useState(false),
82
85
  _React$useState8 = _slicedToArray(_React$useState7, 2),
83
- watchValue = _React$useState8[0],
84
- setWatchValue = _React$useState8[1];
85
- var watchValueRef = React.useRef();
86
- var _React$useState9 = React.useState([]),
86
+ isRefreshHttp = _React$useState8[0],
87
+ setIsRefreshHttp = _React$useState8[1];
88
+ var _React$useState9 = React.useState(),
87
89
  _React$useState10 = _slicedToArray(_React$useState9, 2),
88
- mutiSelect = _React$useState10[0],
89
- setMutiSelect = _React$useState10[1];
90
+ watchValue = _React$useState10[0],
91
+ setWatchValue = _React$useState10[1];
92
+ var watchValueRef = React.useRef();
90
93
  var _React$useState11 = React.useState([]),
91
94
  _React$useState12 = _slicedToArray(_React$useState11, 2),
92
- expandedKeys = _React$useState12[0],
93
- setExpandedKeys = _React$useState12[1];
95
+ mutiSelect = _React$useState12[0],
96
+ setMutiSelect = _React$useState12[1];
97
+ var _React$useState13 = React.useState([]),
98
+ _React$useState14 = _slicedToArray(_React$useState13, 2),
99
+ expandedKeys = _React$useState14[0],
100
+ setExpandedKeys = _React$useState14[1];
94
101
  var firstLoadTreeSelectRef = React.useRef(true);
95
102
  var pageRef = React.useRef(1);
96
103
  var totalRef = React.useRef();
@@ -311,7 +318,7 @@ function Index(props) {
311
318
  return _context2.stop();
312
319
  }
313
320
  }, _callee2);
314
- })), [extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.http, watchValue]);
321
+ })), [extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.http, watchValue, isRefreshHttp]);
315
322
  var myOptions = React.useMemo(function () {
316
323
  var _options = options;
317
324
  if (httpOptions && httpOptions.length > 0) {
@@ -512,7 +519,17 @@ function Index(props) {
512
519
  })));
513
520
  } else {
514
521
  var _extraInfo$disabled4;
515
- return /*#__PURE__*/React.createElement(_Select, {
522
+ return /*#__PURE__*/React.createElement("div", {
523
+ className: "w-full",
524
+ style: {
525
+ display: 'flex'
526
+ }
527
+ }, /*#__PURE__*/React.createElement("div", {
528
+ className: "flex-1",
529
+ style: {
530
+ width: "".concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.http) && (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.http.url) ? 'calc(100% - 32px)' : '100%')
531
+ }
532
+ }, /*#__PURE__*/React.createElement(_Select, {
516
533
  mode: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.isMutiple) ? 'multiple' : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.mode,
517
534
  onSelect: onSelect,
518
535
  disabled: (_extraInfo$disabled4 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled4 !== void 0 ? _extraInfo$disabled4 : disabled,
@@ -532,7 +549,17 @@ function Index(props) {
532
549
  maxTagCount: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxTagCount,
533
550
  maxTagTextLength: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxTagTextLength,
534
551
  maxTagPlaceholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxTagPlaceholder) || maxTagPlaceholder
535
- });
552
+ })), (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.http) && (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.http.url) && /*#__PURE__*/React.createElement("div", {
553
+ style: {
554
+ width: '32px'
555
+ }
556
+ }, /*#__PURE__*/React.createElement(_Button, {
557
+ type: "link",
558
+ icon: /*#__PURE__*/React.createElement(SyncOutlined, null),
559
+ onClick: function onClick() {
560
+ setIsRefreshHttp(!isRefreshHttp);
561
+ }
562
+ })));
536
563
  }
537
564
  };
538
565
  if (isObj && isRefForm && field) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "public": true,
3
3
  "name": "ronds-metadata",
4
- "version": "1.3.52",
4
+ "version": "1.3.54",
5
5
  "scripts": {
6
6
  "start": "dumi dev",
7
7
  "docs:build": "dumi build",