ydb-components-material 0.1.98 → 0.1.100
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.
- package/build/docs/404.html +3 -3
- package/build/docs/_demos/:uuid +3 -3
- package/build/docs/colorful-button.html +3 -3
- package/build/docs/colorful-input.html +3 -3
- package/build/docs/index.html +3 -3
- package/build/docs/umi.00fb7912.js +1 -0
- package/build/docs/{umi.6979d68b.css → umi.475dd297.css} +1 -1
- package/build/docs/~demos/:uuid.html +3 -3
- package/build/docs/~demos/colorful-button-demo.html +3 -3
- package/build/docs/~demos/colorful-input-demo.html +3 -3
- package/build/lowcode/3.js +2 -2
- package/build/lowcode/4.js +1 -1
- package/build/lowcode/5.js +1 -1
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +9 -9
- package/build/lowcode/render/default/1.js +2 -2
- package/build/lowcode/render/default/2.js +1 -1
- package/build/lowcode/render/default/3.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +21 -21
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +21 -21
- package/dist/1.js +2 -2
- package/dist/2.js +1 -1
- package/dist/3.js +1 -1
- package/dist/BizComps.css +1 -1
- package/dist/BizComps.js +26 -26
- package/dist/BizComps.js.map +1 -1
- package/es/components/message/index.d.ts +4 -5
- package/es/components/message/index.js +13 -35
- package/es/components/message/index.scss +22 -19
- package/es/components/scene-tree/index.js +104 -17
- package/es/components/scene-tree/index.scss +7 -0
- package/es/style.js +1 -1
- package/lib/components/message/index.d.ts +4 -5
- package/lib/components/message/index.js +13 -36
- package/lib/components/message/index.scss +22 -19
- package/lib/components/scene-tree/index.js +104 -17
- package/lib/components/scene-tree/index.scss +7 -0
- package/lib/style.js +1 -1
- package/lowcode/message/meta.ts +30 -0
- package/lowcode_es/message/meta.js +28 -0
- package/lowcode_es/meta.js +1 -1
- package/lowcode_lib/message/meta.js +28 -0
- package/lowcode_lib/meta.js +1 -1
- package/package.json +3 -3
- package/build/docs/umi.19ae92a3.js +0 -1
|
@@ -4,6 +4,8 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
exports.__esModule = true;
|
|
5
5
|
exports["default"] = void 0;
|
|
6
6
|
var _checkbox = _interopRequireDefault(require("@alifd/next/lib/checkbox"));
|
|
7
|
+
var _balloon = _interopRequireDefault(require("@alifd/next/lib/balloon"));
|
|
8
|
+
var _icon = _interopRequireDefault(require("@alifd/next/lib/icon"));
|
|
7
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
8
10
|
var _radio = _interopRequireDefault(require("@alifd/next/lib/radio"));
|
|
9
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -70,16 +72,40 @@ var SceneTree = function SceneTree(_ref) {
|
|
|
70
72
|
var targetNodeOfCurTree = _findNodeById(curTree, targetId, targetPId);
|
|
71
73
|
// 删除当前题目的子题目先 可能还留有上次带出来的题目
|
|
72
74
|
targetNodeOfCurTree.children = [];
|
|
75
|
+
// 如果不是初始化的时候就禁用了 重置一下禁用状态和
|
|
76
|
+
targetNodeOfOriginTree.options.forEach(function (option) {
|
|
77
|
+
if (option.preDisabled !== true) {
|
|
78
|
+
option.disabled = false;
|
|
79
|
+
option.showMutuallyExclusivePrompt = false;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
73
82
|
console.log('targetNodeOfCurTree----', targetNodeOfCurTree);
|
|
74
83
|
// 可能是个多选题 val会是个数组
|
|
75
84
|
if (Array.isArray(val)) {
|
|
76
85
|
if (val.length) {
|
|
77
86
|
var optionNameList = [];
|
|
78
87
|
val.forEach(function (item) {
|
|
88
|
+
// 找到当前选项在当前树中
|
|
89
|
+
var curOption = targetNodeOfCurTree.options.find(function (option) {
|
|
90
|
+
return option.id === item;
|
|
91
|
+
});
|
|
92
|
+
curOption.showMutuallyExclusivePrompt = true;
|
|
79
93
|
// 找到对应的选项在源数据中
|
|
80
94
|
var targetOption = targetNodeOfOriginTree.options.find(function (option) {
|
|
81
95
|
return option.id === item;
|
|
82
96
|
});
|
|
97
|
+
// 如果当前选项有互斥选项,找出来禁用掉
|
|
98
|
+
if (Array.isArray(targetOption.mutuallyExclusiveOptions) && targetOption.mutuallyExclusiveOptions.length) {
|
|
99
|
+
targetOption.mutuallyExclusiveOptions.forEach(function (mutuallyExclusiveOption) {
|
|
100
|
+
var targetMutuallyExclusiveOption = targetNodeOfCurTree.options.find(function (option) {
|
|
101
|
+
return option.id === mutuallyExclusiveOption;
|
|
102
|
+
});
|
|
103
|
+
console.log('targetMutuallyExclusiveOption--', targetMutuallyExclusiveOption);
|
|
104
|
+
if (targetMutuallyExclusiveOption) {
|
|
105
|
+
targetMutuallyExclusiveOption.disabled = true;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
}
|
|
83
109
|
optionNameList.push(targetOption.name);
|
|
84
110
|
// 拿到这个选中的选项会带出来的子题目 虽然是个数组。但是只有一项 只会带出来一个题目
|
|
85
111
|
var targetNodeChildList = (targetOption.children || []).filter(Boolean).map(function (n) {
|
|
@@ -148,6 +174,13 @@ var SceneTree = function SceneTree(_ref) {
|
|
|
148
174
|
setCurTree((0, _extends2["default"])({}, curTree));
|
|
149
175
|
valChange(curTree);
|
|
150
176
|
};
|
|
177
|
+
var trigger = function trigger(style) {
|
|
178
|
+
return /*#__PURE__*/React.createElement(_icon["default"], {
|
|
179
|
+
type: "help",
|
|
180
|
+
size: "xs",
|
|
181
|
+
style: style
|
|
182
|
+
});
|
|
183
|
+
};
|
|
151
184
|
var _TreeNode = function TreeNode(_ref2) {
|
|
152
185
|
var node = _ref2.node,
|
|
153
186
|
otherStyle = _ref2.style;
|
|
@@ -167,40 +200,94 @@ var SceneTree = function SceneTree(_ref) {
|
|
|
167
200
|
className: !isPC ? 'title' : 'title_pc'
|
|
168
201
|
}, /*#__PURE__*/React.createElement("span", {
|
|
169
202
|
className: "required"
|
|
170
|
-
}, "*"), node.title, !!+node.isMultipleChoice && '(多选)'
|
|
203
|
+
}, "*"), node.title, !!+node.isMultipleChoice && '(多选)', node.description && /*#__PURE__*/React.createElement(_balloon["default"], {
|
|
204
|
+
v2: true,
|
|
205
|
+
trigger: trigger({
|
|
206
|
+
color: '#666',
|
|
207
|
+
marginTop: '-4px',
|
|
208
|
+
marginLeft: '5px'
|
|
209
|
+
}),
|
|
210
|
+
triggerType: "click",
|
|
211
|
+
align: "t",
|
|
212
|
+
arrowPointToCenter: true,
|
|
213
|
+
title: "",
|
|
214
|
+
delay: 20
|
|
215
|
+
}, node.description)), !+node.isMultipleChoice ? /*#__PURE__*/React.createElement(RadioGroup, {
|
|
171
216
|
className: isPC && 'options_pc',
|
|
172
217
|
value: node.value,
|
|
173
218
|
onChange: onValChange,
|
|
174
219
|
"aria-labelledby": "groupId"
|
|
175
220
|
}, node.options.map(function (option, index) {
|
|
176
221
|
console.log('optionsVal', option.value);
|
|
177
|
-
|
|
178
|
-
|
|
222
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
223
|
+
key: index,
|
|
224
|
+
style: {
|
|
225
|
+
display: 'flex',
|
|
226
|
+
alignItems: 'center',
|
|
227
|
+
width: '100%',
|
|
228
|
+
marginTop: index > 0 ? '10px' : '',
|
|
229
|
+
flexWrap: 'wrap'
|
|
230
|
+
}
|
|
231
|
+
}, /*#__PURE__*/React.createElement(_radio["default"], {
|
|
179
232
|
id: option.pid + "+" + node.pid,
|
|
180
233
|
key: option.id + node.pid + option.value + index,
|
|
181
234
|
value: option.id,
|
|
182
|
-
disabled:
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
235
|
+
disabled: option.disabled
|
|
236
|
+
}, option.name), option.description && /*#__PURE__*/React.createElement(_balloon["default"], {
|
|
237
|
+
v2: true,
|
|
238
|
+
trigger: trigger({
|
|
239
|
+
color: '#666',
|
|
240
|
+
left: '-10px',
|
|
241
|
+
position: 'relative',
|
|
242
|
+
top: '1px'
|
|
243
|
+
}),
|
|
244
|
+
triggerType: "click",
|
|
245
|
+
align: "t",
|
|
246
|
+
arrowPointToCenter: true,
|
|
247
|
+
title: "",
|
|
248
|
+
delay: 20
|
|
249
|
+
}, option.description));
|
|
188
250
|
})) : /*#__PURE__*/React.createElement(_checkbox["default"].Group, {
|
|
189
251
|
value: node.value,
|
|
190
252
|
onChange: onValChange,
|
|
191
253
|
className: isPC && 'options_pc'
|
|
192
254
|
}, node.options.map(function (option, index) {
|
|
193
|
-
|
|
194
|
-
|
|
255
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
256
|
+
style: {
|
|
257
|
+
display: 'flex',
|
|
258
|
+
alignItems: 'center',
|
|
259
|
+
width: '100%',
|
|
260
|
+
marginTop: index > 0 ? '10px' : '',
|
|
261
|
+
flexWrap: 'wrap'
|
|
262
|
+
}
|
|
263
|
+
}, /*#__PURE__*/React.createElement(_checkbox["default"], {
|
|
195
264
|
id: option.pid + "+" + node.pid,
|
|
196
265
|
key: option.id + node.pid + option.value + index,
|
|
197
266
|
value: option.id,
|
|
198
|
-
disabled:
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
267
|
+
disabled: option.disabled
|
|
268
|
+
}, option.name), option.description && /*#__PURE__*/React.createElement(_balloon["default"], {
|
|
269
|
+
v2: true,
|
|
270
|
+
trigger: trigger({
|
|
271
|
+
color: '#666',
|
|
272
|
+
left: '-10px',
|
|
273
|
+
position: 'relative',
|
|
274
|
+
top: '1px'
|
|
275
|
+
}),
|
|
276
|
+
triggerType: "click",
|
|
277
|
+
align: "t",
|
|
278
|
+
arrowPointToCenter: true,
|
|
279
|
+
title: "",
|
|
280
|
+
delay: 20
|
|
281
|
+
}, option.description), option.showMutuallyExclusivePrompt && option.mutualExclusionPrompt && /*#__PURE__*/React.createElement("div", {
|
|
282
|
+
className: "mutualExclusionPrompt"
|
|
283
|
+
}, /*#__PURE__*/React.createElement(_icon["default"], {
|
|
284
|
+
type: "prompt",
|
|
285
|
+
size: "xs",
|
|
286
|
+
style: {
|
|
287
|
+
color: '#FF6237',
|
|
288
|
+
marginRight: '4px'
|
|
289
|
+
}
|
|
290
|
+
}), option.mutualExclusionPrompt));
|
|
204
291
|
}))), node.children && (node.children || []).map(function (item, index) {
|
|
205
292
|
var _node$children, _node$children2, _node$children3, _node$children4;
|
|
206
293
|
console.log('----', ((_node$children = node.children) === null || _node$children === void 0 ? void 0 : _node$children.length) > 1 && index !== ((_node$children2 = node.children) === null || _node$children2 === void 0 ? void 0 : _node$children2.length) - 1);
|
package/lib/style.js
CHANGED
|
@@ -2,6 +2,6 @@ require('@alifd/next/lib/icon/style');
|
|
|
2
2
|
require('@alifd/next/lib/message/style');
|
|
3
3
|
require('@alifd/next/lib/radio/style');
|
|
4
4
|
require('@alifd/next/lib/checkbox/style');
|
|
5
|
-
require('antd/lib/cascader/style');
|
|
6
5
|
require('@alifd/next/lib/balloon/style');
|
|
6
|
+
require('antd/lib/cascader/style');
|
|
7
7
|
require('./index.scss');
|
package/lowcode/message/meta.ts
CHANGED
|
@@ -93,6 +93,36 @@ const MessageMeta: IPublicTypeComponentMetadata = {
|
|
|
93
93
|
"initialValue": ""
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
|
+
{
|
|
97
|
+
"title": {
|
|
98
|
+
"label": {
|
|
99
|
+
"type": "i18n",
|
|
100
|
+
"en-US": "cancelText",
|
|
101
|
+
"zh-CN": "cancelText"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"name": "cancelText",
|
|
105
|
+
"setter": {
|
|
106
|
+
"componentName": "StringSetter",
|
|
107
|
+
"isRequired": true,
|
|
108
|
+
"initialValue": ""
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"title": {
|
|
113
|
+
"label": {
|
|
114
|
+
"type": "i18n",
|
|
115
|
+
"en-US": "okText",
|
|
116
|
+
"zh-CN": "okText"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"name": "okText",
|
|
120
|
+
"setter": {
|
|
121
|
+
"componentName": "StringSetter",
|
|
122
|
+
"isRequired": true,
|
|
123
|
+
"initialValue": ""
|
|
124
|
+
}
|
|
125
|
+
},
|
|
96
126
|
{
|
|
97
127
|
"title": {
|
|
98
128
|
"label": {
|
|
@@ -79,6 +79,34 @@ var MessageMeta = {
|
|
|
79
79
|
"isRequired": true,
|
|
80
80
|
"initialValue": ""
|
|
81
81
|
}
|
|
82
|
+
}, {
|
|
83
|
+
"title": {
|
|
84
|
+
"label": {
|
|
85
|
+
"type": "i18n",
|
|
86
|
+
"en-US": "cancelText",
|
|
87
|
+
"zh-CN": "cancelText"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"name": "cancelText",
|
|
91
|
+
"setter": {
|
|
92
|
+
"componentName": "StringSetter",
|
|
93
|
+
"isRequired": true,
|
|
94
|
+
"initialValue": ""
|
|
95
|
+
}
|
|
96
|
+
}, {
|
|
97
|
+
"title": {
|
|
98
|
+
"label": {
|
|
99
|
+
"type": "i18n",
|
|
100
|
+
"en-US": "okText",
|
|
101
|
+
"zh-CN": "okText"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"name": "okText",
|
|
105
|
+
"setter": {
|
|
106
|
+
"componentName": "StringSetter",
|
|
107
|
+
"isRequired": true,
|
|
108
|
+
"initialValue": ""
|
|
109
|
+
}
|
|
82
110
|
}, {
|
|
83
111
|
"title": {
|
|
84
112
|
"label": {
|
package/lowcode_es/meta.js
CHANGED
|
@@ -94,7 +94,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
|
|
|
94
94
|
packageName = 'ydb-components-material';
|
|
95
95
|
}
|
|
96
96
|
if (version === void 0) {
|
|
97
|
-
version = '0.1.
|
|
97
|
+
version = '0.1.100';
|
|
98
98
|
}
|
|
99
99
|
if (basicLibraryVersion === void 0) {
|
|
100
100
|
basicLibraryVersion = {
|
|
@@ -84,6 +84,34 @@ var MessageMeta = {
|
|
|
84
84
|
"isRequired": true,
|
|
85
85
|
"initialValue": ""
|
|
86
86
|
}
|
|
87
|
+
}, {
|
|
88
|
+
"title": {
|
|
89
|
+
"label": {
|
|
90
|
+
"type": "i18n",
|
|
91
|
+
"en-US": "cancelText",
|
|
92
|
+
"zh-CN": "cancelText"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"name": "cancelText",
|
|
96
|
+
"setter": {
|
|
97
|
+
"componentName": "StringSetter",
|
|
98
|
+
"isRequired": true,
|
|
99
|
+
"initialValue": ""
|
|
100
|
+
}
|
|
101
|
+
}, {
|
|
102
|
+
"title": {
|
|
103
|
+
"label": {
|
|
104
|
+
"type": "i18n",
|
|
105
|
+
"en-US": "okText",
|
|
106
|
+
"zh-CN": "okText"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"name": "okText",
|
|
110
|
+
"setter": {
|
|
111
|
+
"componentName": "StringSetter",
|
|
112
|
+
"isRequired": true,
|
|
113
|
+
"initialValue": ""
|
|
114
|
+
}
|
|
87
115
|
}, {
|
|
88
116
|
"title": {
|
|
89
117
|
"label": {
|
package/lowcode_lib/meta.js
CHANGED
|
@@ -99,7 +99,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
|
|
|
99
99
|
packageName = 'ydb-components-material';
|
|
100
100
|
}
|
|
101
101
|
if (version === void 0) {
|
|
102
|
-
version = '0.1.
|
|
102
|
+
version = '0.1.100';
|
|
103
103
|
}
|
|
104
104
|
if (basicLibraryVersion === void 0) {
|
|
105
105
|
basicLibraryVersion = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ydb-components-material",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.100",
|
|
4
4
|
"description": "ydb-components-material",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -100,10 +100,10 @@
|
|
|
100
100
|
},
|
|
101
101
|
"componentConfig": {
|
|
102
102
|
"isComponentLibrary": true,
|
|
103
|
-
"materialSchema": "https://unpkg.com/ydb-components-material@0.1.
|
|
103
|
+
"materialSchema": "https://unpkg.com/ydb-components-material@0.1.100/build/lowcode/assets-prod.json"
|
|
104
104
|
},
|
|
105
105
|
"lcMeta": {
|
|
106
106
|
"type": "component"
|
|
107
107
|
},
|
|
108
|
-
"homepage": "https://unpkg.com/ydb-components-material@0.1.
|
|
108
|
+
"homepage": "https://unpkg.com/ydb-components-material@0.1.100/build/index.html"
|
|
109
109
|
}
|