@luck-design-biz/luckda 0.0.25-10 → 0.0.25-11

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.
Files changed (29) hide show
  1. package/es/lowcode/engine/meta/fieldyear.props.json +18 -1
  2. package/es/lowcode/engine/tools/diff.js +5 -5
  3. package/es/lowcode/engine/tools/helper.js +1 -3
  4. package/es/lowcode/painter/style/design.less +5 -2
  5. package/es/lowcode/view/lc-components/Dialog/index.js +3 -0
  6. package/es/lowcode/view/lc-components/FieldColor/meta.json +1 -1
  7. package/es/lowcode/view/lc-components/FieldNumber/meta.json +1 -1
  8. package/es/lowcode/view/lc-components/FieldString/meta.json +1 -1
  9. package/es/lowcode/view/lc-components/FieldSwitch/meta.json +1 -1
  10. package/es/lowcode/view/lc-components/FieldTextarea/meta.json +1 -1
  11. package/es/lowcode/view/lc-components/FieldYear/meta.json +16 -1
  12. package/es/lowcode/view/lc-components/Form/index.js +2 -2
  13. package/es/lowcode/view/lc-components/Tabs/index.js +24 -11
  14. package/es/upload/FormItem/index.js +3 -3
  15. package/lib/lowcode/engine/meta/fieldyear.props.json +18 -1
  16. package/lib/lowcode/engine/tools/diff.js +5 -5
  17. package/lib/lowcode/engine/tools/helper.js +1 -3
  18. package/lib/lowcode/painter/style/design.less +5 -2
  19. package/lib/lowcode/view/lc-components/Dialog/index.js +3 -0
  20. package/lib/lowcode/view/lc-components/FieldColor/meta.json +1 -1
  21. package/lib/lowcode/view/lc-components/FieldNumber/meta.json +1 -1
  22. package/lib/lowcode/view/lc-components/FieldString/meta.json +1 -1
  23. package/lib/lowcode/view/lc-components/FieldSwitch/meta.json +1 -1
  24. package/lib/lowcode/view/lc-components/FieldTextarea/meta.json +1 -1
  25. package/lib/lowcode/view/lc-components/FieldYear/meta.json +16 -1
  26. package/lib/lowcode/view/lc-components/Form/index.js +2 -2
  27. package/lib/lowcode/view/lc-components/Tabs/index.js +23 -10
  28. package/lib/upload/FormItem/index.js +3 -3
  29. package/package.json +175 -173
@@ -6,7 +6,24 @@
6
6
  "icon": "icon-fieldstring",
7
7
  "groupName": "表单项",
8
8
  "order": 1,
9
- "props": [],
9
+ "props": [
10
+ {
11
+ "key": "allowClear",
12
+ "name": "允许清除",
13
+ "type": "switch"
14
+ },
15
+ {
16
+ "key": "disabledDate",
17
+ "name": "不可选日期",
18
+ "type": "_JSEditor",
19
+ "defaultCode": "function disabledDate(currentDate) {return true}",
20
+ "mustConfirm": true,
21
+ "wrapper": "collapse",
22
+ "wrapperProps": {
23
+ "suppressIcon": true
24
+ }
25
+ }
26
+ ],
10
27
  "advance": {
11
28
  "events": [
12
29
  {
@@ -18,14 +18,14 @@ export default function diff(obj, newObj) {
18
18
  var path = isObjArray ? +key : key;
19
19
  if (!(key in newObj)) {
20
20
  diffs.push({
21
- type: "REMOVE",
21
+ type: 'REMOVE',
22
22
  path: [path],
23
23
  oldValue: obj[key]
24
24
  });
25
25
  return 1; // continue
26
26
  }
27
27
  var newObjKey = newObj[key];
28
- var areCompatibleObjects = _typeof(objKey) === "object" && _typeof(newObjKey) === "object" && Array.isArray(objKey) === Array.isArray(newObjKey);
28
+ var areCompatibleObjects = _typeof(objKey) === 'object' && _typeof(newObjKey) === 'object' && Array.isArray(objKey) === Array.isArray(newObjKey);
29
29
  if (objKey && newObjKey && areCompatibleObjects && !richTypes[(_Object$getPrototypeO = Object.getPrototypeOf(objKey)) === null || _Object$getPrototypeO === void 0 || (_Object$getPrototypeO = _Object$getPrototypeO.constructor) === null || _Object$getPrototypeO === void 0 ? void 0 : _Object$getPrototypeO.name] && (!options.cyclesFix || !_stack.includes(objKey))) {
30
30
  var nestedDiffs = diff(objKey, newObjKey, options, options.cyclesFix ? _stack.concat([objKey]) : []);
31
31
  diffs.push.apply(diffs, nestedDiffs.map(function (difference) {
@@ -34,10 +34,10 @@ export default function diff(obj, newObj) {
34
34
  }));
35
35
  } else if (objKey !== newObjKey &&
36
36
  // treat NaN values as equivalent
37
- !(Number.isNaN(objKey) && Number.isNaN(newObjKey)) && !(areCompatibleObjects && (isNaN(objKey) ? objKey + "" === newObjKey + "" : +objKey === +newObjKey))) {
37
+ !(Number.isNaN(objKey) && Number.isNaN(newObjKey)) && !(areCompatibleObjects && (isNaN(objKey) ? objKey + '' === newObjKey + '' : +objKey === +newObjKey))) {
38
38
  diffs.push({
39
39
  path: [path],
40
- type: "CHANGE",
40
+ type: 'CHANGE',
41
41
  value: newObjKey,
42
42
  oldValue: objKey
43
43
  });
@@ -50,7 +50,7 @@ export default function diff(obj, newObj) {
50
50
  for (var _key in newObj) {
51
51
  if (!(_key in obj)) {
52
52
  diffs.push({
53
- type: "CREATE",
53
+ type: 'CREATE',
54
54
  path: [isNewObjArray ? +_key : _key],
55
55
  value: newObj[_key]
56
56
  });
@@ -143,7 +143,6 @@ export function parseCSS(cssString) {
143
143
  // 返回包含所有样式的对象
144
144
  return parsedStyles;
145
145
  }
146
- ;
147
146
  export function isColor(str) {
148
147
  var hexRegex = /^#(?:[A-Fa-f0-9]{3,4}){1,2}$/;
149
148
  var rgbaRegex = /^rgba?\(\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})(,\s*(0|1|0?\.\d+))?\s*\)$/;
@@ -168,5 +167,4 @@ export function getLDMetaAttr(name) {
168
167
  });
169
168
  }
170
169
  return params.get(name);
171
- }
172
- ;
170
+ }
@@ -83,7 +83,10 @@
83
83
  &-simulator {
84
84
  min-height: 100%;
85
85
  :global {
86
- .ant-form-item, .ant-collapse-header, .resizer, .ant-tree-node-content-wrapper {
86
+ .ant-form-item,
87
+ .ant-collapse-header,
88
+ .resizer,
89
+ .ant-tree-node-content-wrapper {
87
90
  pointer-events: none;
88
91
  }
89
92
  .luck-grid-table {
@@ -100,7 +103,7 @@
100
103
  background-color: color-mix(in sRGB, var(--ant-primary-color), transparent 95%);
101
104
  .box();
102
105
 
103
- &-name{
106
+ &-name {
104
107
  position: absolute;
105
108
  color: var(--ant-primary-color);
106
109
  font-size: 12px;
@@ -57,6 +57,9 @@ var LCDialog = function LCDialog(_ref) {
57
57
  ctx.doAction(advance.events.onClose);
58
58
  }
59
59
  }, [open]);
60
+ useUpdateEffect(function () {
61
+ _setTitle(title);
62
+ }, [title]);
60
63
  var handleOk = useMemoizedFn(function () {
61
64
  ctx.doAction(advance.events.onOk);
62
65
  });
@@ -60,4 +60,4 @@
60
60
  }
61
61
  ]
62
62
  }
63
- }
63
+ }
@@ -45,4 +45,4 @@
45
45
  }
46
46
  ]
47
47
  }
48
- }
48
+ }
@@ -59,4 +59,4 @@
59
59
  }
60
60
  ]
61
61
  }
62
- }
62
+ }
@@ -28,4 +28,4 @@
28
28
  }
29
29
  ]
30
30
  }
31
- }
31
+ }
@@ -46,4 +46,4 @@
46
46
  }
47
47
  ]
48
48
  }
49
- }
49
+ }
@@ -6,7 +6,22 @@
6
6
  "icon": "icon-fieldstring",
7
7
  "groupName": "表单项",
8
8
  "order": 1,
9
- "props": [],
9
+ "props": [
10
+ {
11
+ "key": "allowClear",
12
+ "name": "允许清除",
13
+ "type": "switch"
14
+ },
15
+ {
16
+ "key": "disabledDate",
17
+ "name": "不可选日期",
18
+ "type": "_JSEditor",
19
+ "defaultCode": "function disabledDate(currentDate) {return true}",
20
+ "mustConfirm": true,
21
+ "wrapper": "collapse",
22
+ "wrapperProps": { "suppressIcon": true }
23
+ }
24
+ ],
10
25
  "advance": {
11
26
  "events": [
12
27
  {
@@ -228,7 +228,7 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
228
228
  return props;
229
229
  };
230
230
  var transEventsInfields = function transEventsInfields(fields) {
231
- return fields.map(function (setting) {
231
+ return (fields === null || fields === void 0 ? void 0 : fields.map(function (setting) {
232
232
  var advance = setting.advance,
233
233
  rest = _objectWithoutProperties(setting, _excluded);
234
234
  var props = reduce(rest, function (result, value, key) {
@@ -257,7 +257,7 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
257
257
  }, {})
258
258
  });
259
259
  return props;
260
- });
260
+ })) || [];
261
261
  };
262
262
  var renderFormList = useMemoizedFn(function (formConfig) {
263
263
  return reduce(blocks, function (result, item) {
@@ -1,7 +1,8 @@
1
- import React, { useRef } from 'react';
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import React, { useRef, useState, useImperativeHandle } from 'react';
2
3
  import { findDOMNode } from 'react-dom';
3
4
  import PropTypes from 'prop-types';
4
- import { useMemoizedFn, useCreation, useMount, useUnmount } from 'ahooks';
5
+ import { useMemoizedFn, useMount, useUnmount } from 'ahooks';
5
6
  import styled from 'styled-components';
6
7
  import { Tabs } from 'luck-design/antd';
7
8
  import { useContext } from "../../../engine/provider/ContextProvider";
@@ -28,14 +29,17 @@ var LCTabs = function LCTabs(_ref) {
28
29
  css = _ref.css,
29
30
  advance = _ref.advance;
30
31
  var ref = useRef();
32
+ var apiRef = useRef();
31
33
  var ctx = useContext();
32
- var _defaultActiveKey = useCreation(function () {
33
- var _items$find;
34
- return (_items$find = items.find(function (_ref2) {
35
- var active = _ref2.active;
36
- return active;
37
- })) === null || _items$find === void 0 ? void 0 : _items$find.id;
38
- }, [items]);
34
+ var _useState = useState(function () {
35
+ return (items.find(function (_ref2) {
36
+ var active = _ref2.active;
37
+ return active;
38
+ }) || items[0]).id;
39
+ }),
40
+ _useState2 = _slicedToArray(_useState, 2),
41
+ activeKey = _useState2[0],
42
+ setActiveKey = _useState2[1];
39
43
  useMount(function () {
40
44
  ctx.doAction(advance.events.onMount, {
41
45
  instance: ref.current
@@ -47,6 +51,7 @@ var LCTabs = function LCTabs(_ref) {
47
51
  });
48
52
  });
49
53
  var handleTabClick = useMemoizedFn(function (tabKey, e) {
54
+ setActiveKey(tabKey);
50
55
  ctx.doAction(advance.events.onTabClick, {
51
56
  tabKey: tabKey,
52
57
  e: e
@@ -55,13 +60,21 @@ var LCTabs = function LCTabs(_ref) {
55
60
  var getTargetDom = useMemoizedFn(function () {
56
61
  return findDOMNode(ref.current);
57
62
  });
63
+ useImperativeHandle(apiRef, function () {
64
+ return {
65
+ getInstance: function getInstance() {
66
+ return ref.current;
67
+ }
68
+ };
69
+ });
58
70
  return /*#__PURE__*/React.createElement(Wrapper, {
59
71
  id: id,
60
72
  displayName: "Tabs",
61
- getTargetDom: getTargetDom
73
+ getTargetDom: getTargetDom,
74
+ api: apiRef
62
75
  }, /*#__PURE__*/React.createElement(StyledTabs, {
63
76
  ref: ref,
64
- defaultActiveKey: _defaultActiveKey,
77
+ activeKey: activeKey,
65
78
  type: type,
66
79
  tabPosition: tabPosition,
67
80
  tabBarGutter: tabBarGutter,
@@ -12,13 +12,13 @@ import { getBehaviorUrl } from "../../lowcode/constants/api-url";
12
12
  * 是否实体字段: 是
13
13
  * 是否接受tag: 是
14
14
  * 是否虚拟主键: 否
15
- * 接受参数:
15
+ * 接受参数:
16
16
  * name: 附件名称逗号拼接
17
17
  * name_virtual: [{...// 附件所有参数}]
18
18
  * ### name=name_virtual ###
19
- * 传参:
19
+ * 传参:
20
20
  * name: [{objectName, marker},...]
21
- * 其他需求:
21
+ * 其他需求:
22
22
  * 支持beforeUpload禁止附加类型
23
23
  * =>beforeUpload禁止类型全覆盖
24
24
  * =>forbiddenTypes和配置管理中禁止类型合并
@@ -6,7 +6,24 @@
6
6
  "icon": "icon-fieldstring",
7
7
  "groupName": "表单项",
8
8
  "order": 1,
9
- "props": [],
9
+ "props": [
10
+ {
11
+ "key": "allowClear",
12
+ "name": "允许清除",
13
+ "type": "switch"
14
+ },
15
+ {
16
+ "key": "disabledDate",
17
+ "name": "不可选日期",
18
+ "type": "_JSEditor",
19
+ "defaultCode": "function disabledDate(currentDate) {return true}",
20
+ "mustConfirm": true,
21
+ "wrapper": "collapse",
22
+ "wrapperProps": {
23
+ "suppressIcon": true
24
+ }
25
+ }
26
+ ],
10
27
  "advance": {
11
28
  "events": [
12
29
  {
@@ -25,14 +25,14 @@ function diff(obj, newObj) {
25
25
  var path = isObjArray ? +key : key;
26
26
  if (!(key in newObj)) {
27
27
  diffs.push({
28
- type: "REMOVE",
28
+ type: 'REMOVE',
29
29
  path: [path],
30
30
  oldValue: obj[key]
31
31
  });
32
32
  return 1; // continue
33
33
  }
34
34
  var newObjKey = newObj[key];
35
- var areCompatibleObjects = (0, _typeof2.default)(objKey) === "object" && (0, _typeof2.default)(newObjKey) === "object" && Array.isArray(objKey) === Array.isArray(newObjKey);
35
+ var areCompatibleObjects = (0, _typeof2.default)(objKey) === 'object' && (0, _typeof2.default)(newObjKey) === 'object' && Array.isArray(objKey) === Array.isArray(newObjKey);
36
36
  if (objKey && newObjKey && areCompatibleObjects && !richTypes[(_Object$getPrototypeO = Object.getPrototypeOf(objKey)) === null || _Object$getPrototypeO === void 0 || (_Object$getPrototypeO = _Object$getPrototypeO.constructor) === null || _Object$getPrototypeO === void 0 ? void 0 : _Object$getPrototypeO.name] && (!options.cyclesFix || !_stack.includes(objKey))) {
37
37
  var nestedDiffs = diff(objKey, newObjKey, options, options.cyclesFix ? _stack.concat([objKey]) : []);
38
38
  diffs.push.apply(diffs, nestedDiffs.map(function (difference) {
@@ -41,10 +41,10 @@ function diff(obj, newObj) {
41
41
  }));
42
42
  } else if (objKey !== newObjKey &&
43
43
  // treat NaN values as equivalent
44
- !(Number.isNaN(objKey) && Number.isNaN(newObjKey)) && !(areCompatibleObjects && (isNaN(objKey) ? objKey + "" === newObjKey + "" : +objKey === +newObjKey))) {
44
+ !(Number.isNaN(objKey) && Number.isNaN(newObjKey)) && !(areCompatibleObjects && (isNaN(objKey) ? objKey + '' === newObjKey + '' : +objKey === +newObjKey))) {
45
45
  diffs.push({
46
46
  path: [path],
47
- type: "CHANGE",
47
+ type: 'CHANGE',
48
48
  value: newObjKey,
49
49
  oldValue: objKey
50
50
  });
@@ -57,7 +57,7 @@ function diff(obj, newObj) {
57
57
  for (var _key in newObj) {
58
58
  if (!(_key in obj)) {
59
59
  diffs.push({
60
- type: "CREATE",
60
+ type: 'CREATE',
61
61
  path: [isNewObjArray ? +_key : _key],
62
62
  value: newObj[_key]
63
63
  });
@@ -159,7 +159,6 @@ function parseCSS(cssString) {
159
159
  // 返回包含所有样式的对象
160
160
  return parsedStyles;
161
161
  }
162
- ;
163
162
  function isColor(str) {
164
163
  var hexRegex = /^#(?:[A-Fa-f0-9]{3,4}){1,2}$/;
165
164
  var rgbaRegex = /^rgba?\(\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})(,\s*(0|1|0?\.\d+))?\s*\)$/;
@@ -184,5 +183,4 @@ function getLDMetaAttr(name) {
184
183
  });
185
184
  }
186
185
  return params.get(name);
187
- }
188
- ;
186
+ }
@@ -83,7 +83,10 @@
83
83
  &-simulator {
84
84
  min-height: 100%;
85
85
  :global {
86
- .ant-form-item, .ant-collapse-header, .resizer, .ant-tree-node-content-wrapper {
86
+ .ant-form-item,
87
+ .ant-collapse-header,
88
+ .resizer,
89
+ .ant-tree-node-content-wrapper {
87
90
  pointer-events: none;
88
91
  }
89
92
  .luck-grid-table {
@@ -100,7 +103,7 @@
100
103
  background-color: color-mix(in sRGB, var(--ant-primary-color), transparent 95%);
101
104
  .box();
102
105
 
103
- &-name{
106
+ &-name {
104
107
  position: absolute;
105
108
  color: var(--ant-primary-color);
106
109
  font-size: 12px;
@@ -65,6 +65,9 @@ var LCDialog = function LCDialog(_ref) {
65
65
  ctx.doAction(advance.events.onClose);
66
66
  }
67
67
  }, [open]);
68
+ (0, _ahooks.useUpdateEffect)(function () {
69
+ _setTitle(title);
70
+ }, [title]);
68
71
  var handleOk = (0, _ahooks.useMemoizedFn)(function () {
69
72
  ctx.doAction(advance.events.onOk);
70
73
  });
@@ -60,4 +60,4 @@
60
60
  }
61
61
  ]
62
62
  }
63
- }
63
+ }
@@ -45,4 +45,4 @@
45
45
  }
46
46
  ]
47
47
  }
48
- }
48
+ }
@@ -59,4 +59,4 @@
59
59
  }
60
60
  ]
61
61
  }
62
- }
62
+ }
@@ -28,4 +28,4 @@
28
28
  }
29
29
  ]
30
30
  }
31
- }
31
+ }
@@ -46,4 +46,4 @@
46
46
  }
47
47
  ]
48
48
  }
49
- }
49
+ }
@@ -6,7 +6,22 @@
6
6
  "icon": "icon-fieldstring",
7
7
  "groupName": "表单项",
8
8
  "order": 1,
9
- "props": [],
9
+ "props": [
10
+ {
11
+ "key": "allowClear",
12
+ "name": "允许清除",
13
+ "type": "switch"
14
+ },
15
+ {
16
+ "key": "disabledDate",
17
+ "name": "不可选日期",
18
+ "type": "_JSEditor",
19
+ "defaultCode": "function disabledDate(currentDate) {return true}",
20
+ "mustConfirm": true,
21
+ "wrapper": "collapse",
22
+ "wrapperProps": { "suppressIcon": true }
23
+ }
24
+ ],
10
25
  "advance": {
11
26
  "events": [
12
27
  {
@@ -236,7 +236,7 @@ var LCForm = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
236
236
  return props;
237
237
  };
238
238
  var transEventsInfields = function transEventsInfields(fields) {
239
- return fields.map(function (setting) {
239
+ return (fields === null || fields === void 0 ? void 0 : fields.map(function (setting) {
240
240
  var advance = setting.advance,
241
241
  rest = (0, _objectWithoutProperties2.default)(setting, _excluded);
242
242
  var props = (0, _lodash.reduce)(rest, function (result, value, key) {
@@ -265,7 +265,7 @@ var LCForm = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
265
265
  }, {})
266
266
  });
267
267
  return props;
268
- });
268
+ })) || [];
269
269
  };
270
270
  var renderFormList = (0, _ahooks.useMemoizedFn)(function (formConfig) {
271
271
  return (0, _lodash.reduce)(blocks, function (result, item) {
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
10
  var _react = _interopRequireWildcard(require("react"));
10
11
  var _reactDom = require("react-dom");
11
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
@@ -36,14 +37,17 @@ var LCTabs = function LCTabs(_ref) {
36
37
  css = _ref.css,
37
38
  advance = _ref.advance;
38
39
  var ref = (0, _react.useRef)();
40
+ var apiRef = (0, _react.useRef)();
39
41
  var ctx = (0, _ContextProvider.useContext)();
40
- var _defaultActiveKey = (0, _ahooks.useCreation)(function () {
41
- var _items$find;
42
- return (_items$find = items.find(function (_ref2) {
43
- var active = _ref2.active;
44
- return active;
45
- })) === null || _items$find === void 0 ? void 0 : _items$find.id;
46
- }, [items]);
42
+ var _useState = (0, _react.useState)(function () {
43
+ return (items.find(function (_ref2) {
44
+ var active = _ref2.active;
45
+ return active;
46
+ }) || items[0]).id;
47
+ }),
48
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
49
+ activeKey = _useState2[0],
50
+ setActiveKey = _useState2[1];
47
51
  (0, _ahooks.useMount)(function () {
48
52
  ctx.doAction(advance.events.onMount, {
49
53
  instance: ref.current
@@ -55,6 +59,7 @@ var LCTabs = function LCTabs(_ref) {
55
59
  });
56
60
  });
57
61
  var handleTabClick = (0, _ahooks.useMemoizedFn)(function (tabKey, e) {
62
+ setActiveKey(tabKey);
58
63
  ctx.doAction(advance.events.onTabClick, {
59
64
  tabKey: tabKey,
60
65
  e: e
@@ -63,13 +68,21 @@ var LCTabs = function LCTabs(_ref) {
63
68
  var getTargetDom = (0, _ahooks.useMemoizedFn)(function () {
64
69
  return (0, _reactDom.findDOMNode)(ref.current);
65
70
  });
71
+ (0, _react.useImperativeHandle)(apiRef, function () {
72
+ return {
73
+ getInstance: function getInstance() {
74
+ return ref.current;
75
+ }
76
+ };
77
+ });
66
78
  return /*#__PURE__*/_react.default.createElement(_Wrapper.default, {
67
79
  id: id,
68
80
  displayName: "Tabs",
69
- getTargetDom: getTargetDom
81
+ getTargetDom: getTargetDom,
82
+ api: apiRef
70
83
  }, /*#__PURE__*/_react.default.createElement(StyledTabs, {
71
84
  ref: ref,
72
- defaultActiveKey: _defaultActiveKey,
85
+ activeKey: activeKey,
73
86
  type: type,
74
87
  tabPosition: tabPosition,
75
88
  tabBarGutter: tabBarGutter,
@@ -18,13 +18,13 @@ var _excluded = ["uploadUrl", "moduleCode", "bucket", "tag", "note", "config", "
18
18
  * 是否实体字段: 是
19
19
  * 是否接受tag: 是
20
20
  * 是否虚拟主键: 否
21
- * 接受参数:
21
+ * 接受参数:
22
22
  * name: 附件名称逗号拼接
23
23
  * name_virtual: [{...// 附件所有参数}]
24
24
  * ### name=name_virtual ###
25
- * 传参:
25
+ * 传参:
26
26
  * name: [{objectName, marker},...]
27
- * 其他需求:
27
+ * 其他需求:
28
28
  * 支持beforeUpload禁止附加类型
29
29
  * =>beforeUpload禁止类型全覆盖
30
30
  * =>forbiddenTypes和配置管理中禁止类型合并
package/package.json CHANGED
@@ -1,173 +1,175 @@
1
- {
2
- "name": "@luck-design-biz/luckda",
3
- "version": "0.0.25-10",
4
- "description": "前端配置管理中心业务组件库",
5
- "scripts": {
6
- "start": "cross-env NODE_OPTIONS=--max-old-space-size=10240 USER_RUNTIME=SITE RUNTIME=dev umi dev",
7
- "build": "umi build",
8
- "build-biz": "npm run meta && father build",
9
- "async": "npm run build-biz && yalc push",
10
- "lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx",
11
- "release": "npm run build-biz && npm publish",
12
- "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
13
- "test": "umi-test",
14
- "test:coverage": "umi-test --coverage",
15
- "watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e js,jsx,less --debug -x 'tnpm run async'",
16
- "meta": "node ./scripts/generateMeta.js && node ./scripts/extractLocals.js && node ./scripts/generateAutoComplete.js"
17
- },
18
- "files": [
19
- "es",
20
- "lib",
21
- "utils.js",
22
- "upload.js",
23
- "lowcode.js"
24
- ],
25
- "main": "lib/index.js",
26
- "module": "es/index.js",
27
- "gitHooks": {
28
- "pre-commit": "lint-staged"
29
- },
30
- "engines": {
31
- "node": ">=16",
32
- "pnpm": ">=7.14.0"
33
- },
34
- "license": "MIT",
35
- "repository": {
36
- "type": "git",
37
- "url": "git+https://github.com/xieyt203/luck-biz-components.git",
38
- "branch": "main"
39
- },
40
- "lint-staged": {
41
- "**/*.less": "stylelint --syntax less",
42
- "**/*.{js,jsx,tsx,ts,less,md,json}": [
43
- "prettier --write",
44
- "git add"
45
- ],
46
- "**/*.{js,ts,jsx,tsx}": "npm run lint-staged:js"
47
- },
48
- "dependencies": {
49
- "@ahooksjs/use-url-state": "^3.5.1",
50
- "@babel/runtime": "^7.18.9",
51
- "@babel/standalone": "^7.24.0",
52
- "@dnd-kit/core": "^6.1.0",
53
- "@dnd-kit/sortable": "^8.0.0",
54
- "@dnd-kit/utilities": "^3.2.2",
55
- "ahooks": "^3.7.11",
56
- "classnames": "^2.3.1",
57
- "fast-deep-equal": "^3.1.3",
58
- "lodash": "^4.17.11",
59
- "lz-string": "^1.5.0",
60
- "moment": "^2.24.0",
61
- "monaco-editor": "0.30.*",
62
- "postcss": "^8.4.38",
63
- "prop-types": "^15.8.1",
64
- "querystring": "^0.2.0",
65
- "react": "^16.12.0",
66
- "react-color": "^2.19.3",
67
- "styled-components": "^6.1.8",
68
- "zustand": "^4.5.2"
69
- },
70
- "devDependencies": {
71
- "@amap/amap-jsapi-loader": "^0.0.7",
72
- "@ant-design/pro-cli": "^1.0.28",
73
- "@babel/core": "^7.20.2",
74
- "@babel/eslint-parser": "^7.19.1",
75
- "@babel/parser": "^7.24.4",
76
- "@babel/plugin-proposal-class-properties": "^7.18.6",
77
- "@babel/plugin-proposal-decorators": "^7.20.2",
78
- "@babel/plugin-transform-strict-mode": "^7.18.6",
79
- "@babel/polyfill": "^7.12.1",
80
- "@babel/traverse": "^7.24.1",
81
- "@luck-design-biz/base": "0.0.46-6",
82
- "@luck-design-biz/bpm": "0.0.5",
83
- "@luck-helper/ui-design": "0.0.6",
84
- "@types/classnames": "^2.3.1",
85
- "@types/express": "^4.17.14",
86
- "@types/history": "^4.7.11",
87
- "@types/lodash": "^4.14.189",
88
- "@types/qs": "^6.9.7",
89
- "@types/react": "^16.14.34",
90
- "@types/react-dom": "^16.9.17",
91
- "@types/react-helmet": "^5.0.20",
92
- "@umijs/fabric": "^2.14.0",
93
- "@umijs/plugin-qiankun": "^2.41.0",
94
- "@umijs/preset-react": "~1.8.31",
95
- "bpmn-js": "^7.5.0",
96
- "bpmn-js-properties-panel": "^0.35.0",
97
- "chalk": "^3.0.0",
98
- "check-prettier": "^1.0.3",
99
- "comment-parser": "^1.4.1",
100
- "compression-webpack-plugin": "^6.1.1",
101
- "core-js": "^3.26.1",
102
- "cross-env": "^6.0.3",
103
- "cross-port-killer": "^1.4.0",
104
- "cross-var": "^1.1.0",
105
- "d3-selection": "^1.4.2",
106
- "dry-dry": "^0.4.0",
107
- "enzyme": "^3.11.0",
108
- "eslint": "^7.32.0",
109
- "eslint-plugin-babel": "^5.3.1",
110
- "eslint-plugin-react": "^7.31.10",
111
- "eslint-plugin-react-hooks": "^4.6.0",
112
- "express": "^4.18.2",
113
- "father": "^4.3.1",
114
- "fs-extra": "^11.2.0",
115
- "gh-pages": "^2.2.0",
116
- "glob": "^10.3.12",
117
- "gm-crypt": "^0.0.2",
118
- "husky": "^7.0.4",
119
- "import-sort-cli": "^6.0.0",
120
- "import-sort-parser-babylon": "^6.0.0",
121
- "import-sort-parser-typescript": "^6.0.0",
122
- "import-sort-style-module": "^6.0.0",
123
- "js-cookie": "^2.2.1",
124
- "jsdom-global": "^3.0.2",
125
- "lint-staged": "^11.2.6",
126
- "luck-design": "0.1.77-2",
127
- "monaco-editor-webpack-plugin": "6.*.*",
128
- "node-fetch": "^2.6.7",
129
- "nprogress": "^0.2.0",
130
- "only-allow": "^1.1.1",
131
- "prettier": "^2.7.1",
132
- "pro-download": "1.0.1",
133
- "promise-sequential": "^1.1.1",
134
- "qrcode.react": "^1.0.1",
135
- "qs": "^6.11.0",
136
- "raphael": "^2.3.0",
137
- "react-copy-to-clipboard": "^5.1.0",
138
- "react-device-detect": "^1.17.0",
139
- "react-dnd": "^9.5.1",
140
- "react-dnd-html5-backend": "^9.5.1",
141
- "react-dom": "^16.14.0",
142
- "react-helmet": "^5.2.1",
143
- "react-iframe": "^1.8.5",
144
- "react-loading": "^2.0.3",
145
- "react-viewer": "^3.2.2",
146
- "resizable": "^1.2.1",
147
- "slash2": "^2.0.0",
148
- "stylelint": "^13.13.1",
149
- "umi": "^3.5.35",
150
- "umi-types": "^0.5.14",
151
- "yorkie": "2.0.0"
152
- },
153
- "peerDependencies": {
154
- "@luck-design-biz/base": ">= 0.0.10",
155
- "@luck-design-biz/bpm": ">= 0.0.1",
156
- "luck-design": ">=0.1.51",
157
- "uuid": "^9.0.1"
158
- },
159
- "pnpm": {
160
- "overrides": {
161
- "immer": "^2.1.1"
162
- }
163
- },
164
- "bugs": {
165
- "url": "https://github.com/xieyt203/luck-biz-components/issues"
166
- },
167
- "homepage": "https://github.com/xieyt203/luck-biz-components#readme",
168
- "directories": {
169
- "doc": "docs",
170
- "lib": "lib"
171
- },
172
- "author": ""
173
- }
1
+ {
2
+ "name": "@luck-design-biz/luckda",
3
+ "version": "0.0.25-11",
4
+ "description": "前端配置管理中心业务组件库",
5
+ "scripts": {
6
+ "start": "cross-env NODE_OPTIONS=--max-old-space-size=10240 USER_RUNTIME=SITE RUNTIME=dev umi dev",
7
+ "start:test": "cross-env NODE_OPTIONS=--max-old-space-size=10240 USER_RUNTIME=SITE RUNTIME=test umi dev",
8
+ "build": "umi build",
9
+ "build-biz": "npm run meta && father build",
10
+ "async": "npm run build-biz && yalc push",
11
+ "lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx",
12
+ "release": "npm run build-biz && npm publish",
13
+ "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
14
+ "test": "umi-test",
15
+ "test:coverage": "umi-test --coverage",
16
+ "watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e js,jsx,less --debug -x 'tnpm run async'",
17
+ "meta": "node ./scripts/generateMeta.js && node ./scripts/extractLocals.js && node ./scripts/generateAutoComplete.js"
18
+ },
19
+ "files": [
20
+ "es",
21
+ "lib",
22
+ "utils.js",
23
+ "upload.js",
24
+ "lowcode.js"
25
+ ],
26
+ "main": "lib/index.js",
27
+ "module": "es/index.js",
28
+ "gitHooks": {
29
+ "pre-commit": "lint-staged"
30
+ },
31
+ "engines": {
32
+ "node": ">=16",
33
+ "pnpm": ">=7.14.0"
34
+ },
35
+ "license": "MIT",
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "git+https://github.com/xieyt203/luck-biz-components.git",
39
+ "branch": "main"
40
+ },
41
+ "lint-staged": {
42
+ "**/*.less": "stylelint --syntax less",
43
+ "**/*.{js,jsx,tsx,ts,less,md,json}": [
44
+ "prettier --write",
45
+ "git add"
46
+ ],
47
+ "**/*.{js,ts,jsx,tsx}": "npm run lint-staged:js"
48
+ },
49
+ "dependencies": {
50
+ "@ahooksjs/use-url-state": "^3.5.1",
51
+ "@babel/runtime": "^7.18.9",
52
+ "@babel/standalone": "^7.24.0",
53
+ "@dnd-kit/core": "^6.1.0",
54
+ "@dnd-kit/sortable": "^8.0.0",
55
+ "@dnd-kit/utilities": "^3.2.2",
56
+ "ahooks": "^3.7.11",
57
+ "classnames": "^2.3.1",
58
+ "fast-deep-equal": "^3.1.3",
59
+ "lodash": "^4.17.11",
60
+ "lz-string": "^1.5.0",
61
+ "moment": "^2.24.0",
62
+ "monaco-editor": "0.30.*",
63
+ "postcss": "^8.4.38",
64
+ "prop-types": "^15.8.1",
65
+ "querystring": "^0.2.0",
66
+ "react": "^16.12.0",
67
+ "react-color": "^2.19.3",
68
+ "react-error-boundary": "^4.0.13",
69
+ "styled-components": "^6.1.8",
70
+ "zustand": "^4.5.2"
71
+ },
72
+ "devDependencies": {
73
+ "@amap/amap-jsapi-loader": "^0.0.7",
74
+ "@ant-design/pro-cli": "^1.0.28",
75
+ "@babel/core": "^7.20.2",
76
+ "@babel/eslint-parser": "^7.19.1",
77
+ "@babel/parser": "^7.24.4",
78
+ "@babel/plugin-proposal-class-properties": "^7.18.6",
79
+ "@babel/plugin-proposal-decorators": "^7.20.2",
80
+ "@babel/plugin-transform-strict-mode": "^7.18.6",
81
+ "@babel/polyfill": "^7.12.1",
82
+ "@babel/traverse": "^7.24.1",
83
+ "@luck-design-biz/base": "0.0.46-6",
84
+ "@luck-design-biz/bpm": "0.0.5",
85
+ "@luck-helper/ui-design": "0.0.6",
86
+ "@types/classnames": "^2.3.1",
87
+ "@types/express": "^4.17.14",
88
+ "@types/history": "^4.7.11",
89
+ "@types/lodash": "^4.14.189",
90
+ "@types/qs": "^6.9.7",
91
+ "@types/react": "^16.14.34",
92
+ "@types/react-dom": "^16.9.17",
93
+ "@types/react-helmet": "^5.0.20",
94
+ "@umijs/fabric": "^2.14.0",
95
+ "@umijs/plugin-qiankun": "^2.41.0",
96
+ "@umijs/preset-react": "~1.8.31",
97
+ "bpmn-js": "^7.5.0",
98
+ "bpmn-js-properties-panel": "^0.35.0",
99
+ "chalk": "^3.0.0",
100
+ "check-prettier": "^1.0.3",
101
+ "comment-parser": "^1.4.1",
102
+ "compression-webpack-plugin": "^6.1.1",
103
+ "core-js": "^3.26.1",
104
+ "cross-env": "^6.0.3",
105
+ "cross-port-killer": "^1.4.0",
106
+ "cross-var": "^1.1.0",
107
+ "d3-selection": "^1.4.2",
108
+ "dry-dry": "^0.4.0",
109
+ "enzyme": "^3.11.0",
110
+ "eslint": "^7.32.0",
111
+ "eslint-plugin-babel": "^5.3.1",
112
+ "eslint-plugin-react": "^7.31.10",
113
+ "eslint-plugin-react-hooks": "^4.6.0",
114
+ "express": "^4.18.2",
115
+ "father": "^4.3.1",
116
+ "fs-extra": "^11.2.0",
117
+ "gh-pages": "^2.2.0",
118
+ "glob": "^10.3.12",
119
+ "gm-crypt": "^0.0.2",
120
+ "husky": "^7.0.4",
121
+ "import-sort-cli": "^6.0.0",
122
+ "import-sort-parser-babylon": "^6.0.0",
123
+ "import-sort-parser-typescript": "^6.0.0",
124
+ "import-sort-style-module": "^6.0.0",
125
+ "js-cookie": "^2.2.1",
126
+ "jsdom-global": "^3.0.2",
127
+ "lint-staged": "^11.2.6",
128
+ "luck-design": "0.1.77-2",
129
+ "monaco-editor-webpack-plugin": "6.*.*",
130
+ "node-fetch": "^2.6.7",
131
+ "nprogress": "^0.2.0",
132
+ "only-allow": "^1.1.1",
133
+ "prettier": "^2.7.1",
134
+ "pro-download": "1.0.1",
135
+ "promise-sequential": "^1.1.1",
136
+ "qrcode.react": "^1.0.1",
137
+ "qs": "^6.11.0",
138
+ "raphael": "^2.3.0",
139
+ "react-copy-to-clipboard": "^5.1.0",
140
+ "react-device-detect": "^1.17.0",
141
+ "react-dnd": "^9.5.1",
142
+ "react-dnd-html5-backend": "^9.5.1",
143
+ "react-dom": "^16.14.0",
144
+ "react-helmet": "^5.2.1",
145
+ "react-iframe": "^1.8.5",
146
+ "react-loading": "^2.0.3",
147
+ "react-viewer": "^3.2.2",
148
+ "resizable": "^1.2.1",
149
+ "slash2": "^2.0.0",
150
+ "stylelint": "^13.13.1",
151
+ "umi": "^3.5.35",
152
+ "umi-types": "^0.5.14",
153
+ "yorkie": "2.0.0"
154
+ },
155
+ "peerDependencies": {
156
+ "@luck-design-biz/base": ">= 0.0.10",
157
+ "@luck-design-biz/bpm": ">= 0.0.1",
158
+ "luck-design": ">=0.1.51",
159
+ "uuid": "^9.0.1"
160
+ },
161
+ "pnpm": {
162
+ "overrides": {
163
+ "immer": "^2.1.1"
164
+ }
165
+ },
166
+ "bugs": {
167
+ "url": "https://github.com/xieyt203/luck-biz-components/issues"
168
+ },
169
+ "homepage": "https://github.com/xieyt203/luck-biz-components#readme",
170
+ "directories": {
171
+ "doc": "docs",
172
+ "lib": "lib"
173
+ },
174
+ "author": ""
175
+ }