@byteluck-fe/model-driven-controls 7.0.0-props.36 → 7.0.0-props.38
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/dist/esm/api-doc-index.js +1 -0
- package/dist/esm/formControls/Slider/designer.js +0 -7
- package/dist/esm/formControls/Tag/designer.js +275 -0
- package/dist/esm/formControls/Tag/index.js +11 -0
- package/dist/esm/formControls/Tag/property.js +138 -0
- package/dist/esm/formControls/Tag/runtime.js +114 -0
- package/dist/esm/formControls/Tag/schema.json +1001 -0
- package/dist/esm/formControls/index.js +1 -0
- package/dist/index.umd.js +1 -1
- package/dist/types/api-doc-index.d.ts +1 -0
- package/dist/types/formControls/Tag/designer.d.ts +15 -0
- package/dist/types/formControls/Tag/index.d.ts +12 -0
- package/dist/types/formControls/Tag/property.d.ts +79 -0
- package/dist/types/formControls/Tag/runtime.d.ts +12 -0
- package/dist/types/formControls/index.d.ts +2 -0
- package/dist/types/type.d.ts +2 -1
- package/package.json +5 -5
|
@@ -20,6 +20,7 @@ export { default as BatchPrintListButton } from './baseControls/BatchPrintListBu
|
|
|
20
20
|
export { default as BatchPrintRecordListButton } from './baseControls/BatchPrintRecordListButton/property';
|
|
21
21
|
export { default as OperationButton } from './baseControls/OperationButton/property';
|
|
22
22
|
export { default as BatchDeleteButton } from './baseControls/BatchDeleteButton/property';
|
|
23
|
+
export { default as Tag } from './formControls/Tag/property';
|
|
23
24
|
export { default as VarcharColumn } from './columnControls/VarcharColumn/property';
|
|
24
25
|
export { default as TextColumn } from './columnControls/TextColumn/property';
|
|
25
26
|
export { default as DecimalColumn } from './columnControls/DecimalColumn/property';
|
|
@@ -176,13 +176,6 @@ _define_property(SliderControl, "setting", [
|
|
|
176
176
|
key: 'slider-setting',
|
|
177
177
|
visible: true
|
|
178
178
|
},
|
|
179
|
-
{
|
|
180
|
-
key: 'common-switch',
|
|
181
|
-
visible: true,
|
|
182
|
-
name: 'showTooltip',
|
|
183
|
-
label: getLocaleText('CMD.showPromptLabel', null, '是否显示提示标签'),
|
|
184
|
-
default: true
|
|
185
|
-
},
|
|
186
179
|
{
|
|
187
180
|
key: 'super-setting',
|
|
188
181
|
visible: true
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
function _assert_this_initialized(self) {
|
|
2
|
+
if (self === void 0) {
|
|
3
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
|
+
}
|
|
5
|
+
return self;
|
|
6
|
+
}
|
|
7
|
+
function _call_super(_this, derived, args) {
|
|
8
|
+
derived = _get_prototype_of(derived);
|
|
9
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
10
|
+
}
|
|
11
|
+
function _class_call_check(instance, Constructor) {
|
|
12
|
+
if (!(instance instanceof Constructor)) {
|
|
13
|
+
throw new TypeError("Cannot call a class as a function");
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function _defineProperties(target, props) {
|
|
17
|
+
for(var i = 0; i < props.length; i++){
|
|
18
|
+
var descriptor = props[i];
|
|
19
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
20
|
+
descriptor.configurable = true;
|
|
21
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
22
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
26
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
27
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
28
|
+
return Constructor;
|
|
29
|
+
}
|
|
30
|
+
function _define_property(obj, key, value) {
|
|
31
|
+
if (key in obj) {
|
|
32
|
+
Object.defineProperty(obj, key, {
|
|
33
|
+
value: value,
|
|
34
|
+
enumerable: true,
|
|
35
|
+
configurable: true,
|
|
36
|
+
writable: true
|
|
37
|
+
});
|
|
38
|
+
} else {
|
|
39
|
+
obj[key] = value;
|
|
40
|
+
}
|
|
41
|
+
return obj;
|
|
42
|
+
}
|
|
43
|
+
function _get_prototype_of(o) {
|
|
44
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
45
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
46
|
+
};
|
|
47
|
+
return _get_prototype_of(o);
|
|
48
|
+
}
|
|
49
|
+
function _inherits(subClass, superClass) {
|
|
50
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
51
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
52
|
+
}
|
|
53
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
54
|
+
constructor: {
|
|
55
|
+
value: subClass,
|
|
56
|
+
writable: true,
|
|
57
|
+
configurable: true
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
61
|
+
}
|
|
62
|
+
function _possible_constructor_return(self, call) {
|
|
63
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
64
|
+
return call;
|
|
65
|
+
}
|
|
66
|
+
return _assert_this_initialized(self);
|
|
67
|
+
}
|
|
68
|
+
function _set_prototype_of(o, p) {
|
|
69
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
70
|
+
o.__proto__ = p;
|
|
71
|
+
return o;
|
|
72
|
+
};
|
|
73
|
+
return _set_prototype_of(o, p);
|
|
74
|
+
}
|
|
75
|
+
function _type_of(obj) {
|
|
76
|
+
"@swc/helpers - typeof";
|
|
77
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
78
|
+
}
|
|
79
|
+
function _is_native_reflect_construct() {
|
|
80
|
+
try {
|
|
81
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
82
|
+
} catch (_) {}
|
|
83
|
+
return (_is_native_reflect_construct = function() {
|
|
84
|
+
return !!result;
|
|
85
|
+
})();
|
|
86
|
+
}
|
|
87
|
+
import { DesignerFormControl, COMMON_SETTING_TYPE } from '@byteluck-fe/model-driven-core';
|
|
88
|
+
import { FieldTypes } from '@byteluck-fe/model-driven-shared';
|
|
89
|
+
import TagProperty from './property';
|
|
90
|
+
import { getLocaleText } from '@byteluck-fe/locale-message';
|
|
91
|
+
var TagControl = /*#__PURE__*/ function(DesignerFormControl) {
|
|
92
|
+
"use strict";
|
|
93
|
+
_inherits(TagControl, DesignerFormControl);
|
|
94
|
+
function TagControl(props) {
|
|
95
|
+
_class_call_check(this, TagControl);
|
|
96
|
+
var _this;
|
|
97
|
+
_this = _call_super(this, TagControl, [
|
|
98
|
+
props
|
|
99
|
+
]), _define_property(_this, "props", void 0);
|
|
100
|
+
_this.props = new TagProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
101
|
+
return _this;
|
|
102
|
+
}
|
|
103
|
+
_create_class(TagControl, null, [
|
|
104
|
+
{
|
|
105
|
+
key: "controlName",
|
|
106
|
+
get: function get() {
|
|
107
|
+
return getLocaleText('CMD.tag', null, '标签');
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
key: "controlIcon",
|
|
112
|
+
get: function get() {
|
|
113
|
+
return 'iconbiaoqian';
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
key: "controlType",
|
|
118
|
+
get: function get() {
|
|
119
|
+
return 'tag';
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
]);
|
|
123
|
+
return TagControl;
|
|
124
|
+
}(DesignerFormControl);
|
|
125
|
+
_define_property(TagControl, "controlEventKeys", [
|
|
126
|
+
'on_click'
|
|
127
|
+
]);
|
|
128
|
+
_define_property(TagControl, "controlFieldType", FieldTypes.VARCHAR);
|
|
129
|
+
_define_property(TagControl, "setting", [
|
|
130
|
+
{
|
|
131
|
+
key: 'data-bind',
|
|
132
|
+
visible: true
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
key: 'field-type',
|
|
136
|
+
visible: true
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
key: 'caption',
|
|
140
|
+
showItems: [
|
|
141
|
+
COMMON_SETTING_TYPE.CAPTION,
|
|
142
|
+
COMMON_SETTING_TYPE.IS_HIDE_CAPTION
|
|
143
|
+
],
|
|
144
|
+
visible: true
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
key: 'label-position',
|
|
148
|
+
visible: true
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
key: 'default-state',
|
|
152
|
+
visible: true
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
key: 'common-setting',
|
|
156
|
+
visible: true,
|
|
157
|
+
showItems: [
|
|
158
|
+
COMMON_SETTING_TYPE.IS_HIDE,
|
|
159
|
+
COMMON_SETTING_TYPE.IS_HIDE_CAPTION,
|
|
160
|
+
COMMON_SETTING_TYPE.IS_SHOW_CAPTION_TIP
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
key: 'common-button-radio',
|
|
165
|
+
visible: true,
|
|
166
|
+
name: 'displayType',
|
|
167
|
+
label: getLocaleText('CMD.tagDisplayType', null, '展示形式'),
|
|
168
|
+
default: 'tag',
|
|
169
|
+
options: [
|
|
170
|
+
{
|
|
171
|
+
value: 'tag',
|
|
172
|
+
label: getLocaleText('CMD.tagDisplayTag', null, '标签')
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
value: 'text',
|
|
176
|
+
label: getLocaleText('CMD.tagDisplayText', null, '文本')
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
key: 'common-button-radio',
|
|
182
|
+
visible: true,
|
|
183
|
+
name: 'tagStyle',
|
|
184
|
+
label: getLocaleText('CMD.tagStyle', null, '标签样式'),
|
|
185
|
+
default: 'default',
|
|
186
|
+
options: [
|
|
187
|
+
{
|
|
188
|
+
value: 'default',
|
|
189
|
+
label: getLocaleText('CMD.tagDefault', null, '默认')
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
value: 'success',
|
|
193
|
+
label: getLocaleText('CMD.success', null, '成功')
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
value: 'processing',
|
|
197
|
+
label: getLocaleText('CMD.processing', null, '处理中')
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
value: 'error',
|
|
201
|
+
label: getLocaleText('CMD.error', null, '错误')
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
value: 'warning',
|
|
205
|
+
label: getLocaleText('CMD.warning', null, '警告')
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
key: 'common-button-radio',
|
|
211
|
+
visible: true,
|
|
212
|
+
name: 'size',
|
|
213
|
+
label: getLocaleText('CMD.size', null, '标签尺寸'),
|
|
214
|
+
default: 'middle',
|
|
215
|
+
options: [
|
|
216
|
+
{
|
|
217
|
+
value: 'large',
|
|
218
|
+
label: getLocaleText('CMD.large', null, '大')
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
value: 'middle',
|
|
222
|
+
label: getLocaleText('CMD.middle', null, '中')
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
value: 'small',
|
|
226
|
+
label: getLocaleText('CMD.small', null, '小')
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
key: 'caption-style',
|
|
232
|
+
showItems: [
|
|
233
|
+
COMMON_SETTING_TYPE.CAPTION_SIZE,
|
|
234
|
+
COMMON_SETTING_TYPE.CAPTION_COLOR,
|
|
235
|
+
COMMON_SETTING_TYPE.IS_CAPTION_ITALIC,
|
|
236
|
+
COMMON_SETTING_TYPE.CAPTION_FONT_WEIGHT
|
|
237
|
+
],
|
|
238
|
+
visible: true
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
key: 'common-button-radio',
|
|
242
|
+
visible: true,
|
|
243
|
+
name: 'align',
|
|
244
|
+
label: getLocaleText('CMD.position', null, '位置'),
|
|
245
|
+
default: 'left',
|
|
246
|
+
options: [
|
|
247
|
+
{
|
|
248
|
+
value: 'left',
|
|
249
|
+
label: getLocaleText('CMD.left', null, '居左')
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
value: 'center',
|
|
253
|
+
label: getLocaleText('CMD.center', null, '居中')
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
value: 'right',
|
|
257
|
+
label: getLocaleText('CMD.right', null, '居右')
|
|
258
|
+
}
|
|
259
|
+
]
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
key: 'options-setting',
|
|
263
|
+
visible: true
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
key: 'default-value',
|
|
267
|
+
visible: true
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
key: 'super-setting',
|
|
271
|
+
visible: true
|
|
272
|
+
}
|
|
273
|
+
]);
|
|
274
|
+
export default TagControl;
|
|
275
|
+
export { TagControl as DesignerTagControl };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Designer from './designer';
|
|
2
|
+
import Runtime from './runtime';
|
|
3
|
+
import Property from './property';
|
|
4
|
+
export default {
|
|
5
|
+
Designer: Designer,
|
|
6
|
+
Runtime: Runtime,
|
|
7
|
+
Property: Property
|
|
8
|
+
};
|
|
9
|
+
export * from './designer';
|
|
10
|
+
export * from './runtime';
|
|
11
|
+
export * from './property';
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
function _assert_this_initialized(self) {
|
|
2
|
+
if (self === void 0) {
|
|
3
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
|
+
}
|
|
5
|
+
return self;
|
|
6
|
+
}
|
|
7
|
+
function _call_super(_this, derived, args) {
|
|
8
|
+
derived = _get_prototype_of(derived);
|
|
9
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
10
|
+
}
|
|
11
|
+
function _class_call_check(instance, Constructor) {
|
|
12
|
+
if (!(instance instanceof Constructor)) {
|
|
13
|
+
throw new TypeError("Cannot call a class as a function");
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function _define_property(obj, key, value) {
|
|
17
|
+
if (key in obj) {
|
|
18
|
+
Object.defineProperty(obj, key, {
|
|
19
|
+
value: value,
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true
|
|
23
|
+
});
|
|
24
|
+
} else {
|
|
25
|
+
obj[key] = value;
|
|
26
|
+
}
|
|
27
|
+
return obj;
|
|
28
|
+
}
|
|
29
|
+
function _get_prototype_of(o) {
|
|
30
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
31
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
32
|
+
};
|
|
33
|
+
return _get_prototype_of(o);
|
|
34
|
+
}
|
|
35
|
+
function _inherits(subClass, superClass) {
|
|
36
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
37
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
38
|
+
}
|
|
39
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
40
|
+
constructor: {
|
|
41
|
+
value: subClass,
|
|
42
|
+
writable: true,
|
|
43
|
+
configurable: true
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
47
|
+
}
|
|
48
|
+
function _possible_constructor_return(self, call) {
|
|
49
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
50
|
+
return call;
|
|
51
|
+
}
|
|
52
|
+
return _assert_this_initialized(self);
|
|
53
|
+
}
|
|
54
|
+
function _set_prototype_of(o, p) {
|
|
55
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
56
|
+
o.__proto__ = p;
|
|
57
|
+
return o;
|
|
58
|
+
};
|
|
59
|
+
return _set_prototype_of(o, p);
|
|
60
|
+
}
|
|
61
|
+
function _type_of(obj) {
|
|
62
|
+
"@swc/helpers - typeof";
|
|
63
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
64
|
+
}
|
|
65
|
+
function _is_native_reflect_construct() {
|
|
66
|
+
try {
|
|
67
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
68
|
+
} catch (_) {}
|
|
69
|
+
return (_is_native_reflect_construct = function() {
|
|
70
|
+
return !!result;
|
|
71
|
+
})();
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* name: rok_tag
|
|
75
|
+
* description: 标签组件,参考 ant-design-vue 标签能力。支持标签/文本两种展示形式、样式主题、尺寸、字体风格和对齐方式配置,适合状态展示与轻量信息标记场景。
|
|
76
|
+
*/ import TagControl from './designer';
|
|
77
|
+
import { BaseControlProperty, BaseControlPropertyRuntimeRules, OptionAndDataSourcePropertyRules, DataSourceBind, MultistageFillingItem } from '@byteluck-fe/model-driven-core';
|
|
78
|
+
var TagPropertyRules = /*#__PURE__*/ function(OptionAndDataSourcePropertyRules) {
|
|
79
|
+
"use strict";
|
|
80
|
+
_inherits(TagPropertyRules, OptionAndDataSourcePropertyRules);
|
|
81
|
+
function TagPropertyRules(props) {
|
|
82
|
+
_class_call_check(this, TagPropertyRules);
|
|
83
|
+
return _call_super(this, TagPropertyRules, [
|
|
84
|
+
props
|
|
85
|
+
]);
|
|
86
|
+
}
|
|
87
|
+
return TagPropertyRules;
|
|
88
|
+
}(OptionAndDataSourcePropertyRules);
|
|
89
|
+
var TagPropertyRuntimeRules = /*#__PURE__*/ function(BaseControlPropertyRuntimeRules) {
|
|
90
|
+
"use strict";
|
|
91
|
+
_inherits(TagPropertyRuntimeRules, BaseControlPropertyRuntimeRules);
|
|
92
|
+
function TagPropertyRuntimeRules(props) {
|
|
93
|
+
_class_call_check(this, TagPropertyRuntimeRules);
|
|
94
|
+
var _this;
|
|
95
|
+
_this = _call_super(this, TagPropertyRuntimeRules, [
|
|
96
|
+
props
|
|
97
|
+
]);
|
|
98
|
+
if (_this[0] !== undefined) {
|
|
99
|
+
_this[0].type = 'array';
|
|
100
|
+
}
|
|
101
|
+
return _this;
|
|
102
|
+
}
|
|
103
|
+
return TagPropertyRuntimeRules;
|
|
104
|
+
}(BaseControlPropertyRuntimeRules);
|
|
105
|
+
var TagProperty = /*#__PURE__*/ function(BaseControlProperty) {
|
|
106
|
+
"use strict";
|
|
107
|
+
_inherits(TagProperty, BaseControlProperty);
|
|
108
|
+
function TagProperty(props) {
|
|
109
|
+
_class_call_check(this, TagProperty);
|
|
110
|
+
var _this;
|
|
111
|
+
var _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;
|
|
112
|
+
_this = _call_super(this, TagProperty, [
|
|
113
|
+
props
|
|
114
|
+
]), _define_property(_this, "defaultValue", void 0), _define_property(_this, "displayType", void 0), _define_property(_this, "tagStyle", void 0), _define_property(_this, "size", void 0), _define_property(_this, "align", void 0), _define_property(_this, "optionConfig", void 0), _define_property(_this, "datasourceBind", void 0), _define_property(_this, "multistageFilling", void 0), _define_property(_this, "openMultistageFilling", void 0);
|
|
115
|
+
_this.caption = (_ref = props === null || props === void 0 ? void 0 : props.caption) !== null && _ref !== void 0 ? _ref : TagControl.controlName;
|
|
116
|
+
_this.defaultValue = (_ref1 = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _ref1 !== void 0 ? _ref1 : [];
|
|
117
|
+
_this.displayType = (_ref2 = props === null || props === void 0 ? void 0 : props.displayType) !== null && _ref2 !== void 0 ? _ref2 : 'tag';
|
|
118
|
+
_this.tagStyle = (_ref3 = props === null || props === void 0 ? void 0 : props.tagStyle) !== null && _ref3 !== void 0 ? _ref3 : 'default';
|
|
119
|
+
_this.size = (_ref4 = props === null || props === void 0 ? void 0 : props.size) !== null && _ref4 !== void 0 ? _ref4 : 'middle';
|
|
120
|
+
_this.align = (_ref5 = props === null || props === void 0 ? void 0 : props.align) !== null && _ref5 !== void 0 ? _ref5 : 'left';
|
|
121
|
+
_this.optionConfig = (_ref6 = props === null || props === void 0 ? void 0 : props.optionConfig) !== null && _ref6 !== void 0 ? _ref6 : 'custom';
|
|
122
|
+
_this.datasourceBind = new DataSourceBind(props === null || props === void 0 ? void 0 : props.datasourceBind);
|
|
123
|
+
_this.openMultistageFilling = (_ref7 = props === null || props === void 0 ? void 0 : props.openMultistageFilling) !== null && _ref7 !== void 0 ? _ref7 : false;
|
|
124
|
+
_this.multistageFilling = [];
|
|
125
|
+
if (Array.isArray(props === null || props === void 0 ? void 0 : props.multistageFilling)) {
|
|
126
|
+
props === null || props === void 0 ? void 0 : props.multistageFilling.forEach(function(item) {
|
|
127
|
+
var _this_multistageFilling;
|
|
128
|
+
(_this_multistageFilling = _this.multistageFilling) === null || _this_multistageFilling === void 0 ? void 0 : _this_multistageFilling.push(new MultistageFillingItem(item));
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
return _this;
|
|
132
|
+
}
|
|
133
|
+
return TagProperty;
|
|
134
|
+
}(BaseControlProperty);
|
|
135
|
+
_define_property(TagProperty, "Rules", TagPropertyRules);
|
|
136
|
+
_define_property(TagProperty, "RuntimeRules", TagPropertyRuntimeRules);
|
|
137
|
+
export default TagProperty;
|
|
138
|
+
export { TagProperty, TagPropertyRules, TagPropertyRuntimeRules, };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
function _assert_this_initialized(self) {
|
|
2
|
+
if (self === void 0) {
|
|
3
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
|
+
}
|
|
5
|
+
return self;
|
|
6
|
+
}
|
|
7
|
+
function _call_super(_this, derived, args) {
|
|
8
|
+
derived = _get_prototype_of(derived);
|
|
9
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
10
|
+
}
|
|
11
|
+
function _class_call_check(instance, Constructor) {
|
|
12
|
+
if (!(instance instanceof Constructor)) {
|
|
13
|
+
throw new TypeError("Cannot call a class as a function");
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function _defineProperties(target, props) {
|
|
17
|
+
for(var i = 0; i < props.length; i++){
|
|
18
|
+
var descriptor = props[i];
|
|
19
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
20
|
+
descriptor.configurable = true;
|
|
21
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
22
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
26
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
27
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
28
|
+
return Constructor;
|
|
29
|
+
}
|
|
30
|
+
function _define_property(obj, key, value) {
|
|
31
|
+
if (key in obj) {
|
|
32
|
+
Object.defineProperty(obj, key, {
|
|
33
|
+
value: value,
|
|
34
|
+
enumerable: true,
|
|
35
|
+
configurable: true,
|
|
36
|
+
writable: true
|
|
37
|
+
});
|
|
38
|
+
} else {
|
|
39
|
+
obj[key] = value;
|
|
40
|
+
}
|
|
41
|
+
return obj;
|
|
42
|
+
}
|
|
43
|
+
function _get_prototype_of(o) {
|
|
44
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
45
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
46
|
+
};
|
|
47
|
+
return _get_prototype_of(o);
|
|
48
|
+
}
|
|
49
|
+
function _inherits(subClass, superClass) {
|
|
50
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
51
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
52
|
+
}
|
|
53
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
54
|
+
constructor: {
|
|
55
|
+
value: subClass,
|
|
56
|
+
writable: true,
|
|
57
|
+
configurable: true
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
61
|
+
}
|
|
62
|
+
function _possible_constructor_return(self, call) {
|
|
63
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
64
|
+
return call;
|
|
65
|
+
}
|
|
66
|
+
return _assert_this_initialized(self);
|
|
67
|
+
}
|
|
68
|
+
function _set_prototype_of(o, p) {
|
|
69
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
70
|
+
o.__proto__ = p;
|
|
71
|
+
return o;
|
|
72
|
+
};
|
|
73
|
+
return _set_prototype_of(o, p);
|
|
74
|
+
}
|
|
75
|
+
function _type_of(obj) {
|
|
76
|
+
"@swc/helpers - typeof";
|
|
77
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
78
|
+
}
|
|
79
|
+
function _is_native_reflect_construct() {
|
|
80
|
+
try {
|
|
81
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
82
|
+
} catch (_) {}
|
|
83
|
+
return (_is_native_reflect_construct = function() {
|
|
84
|
+
return !!result;
|
|
85
|
+
})();
|
|
86
|
+
}
|
|
87
|
+
import { RuntimeFormControl } from '@byteluck-fe/model-driven-core';
|
|
88
|
+
import { FieldTypes } from '@byteluck-fe/model-driven-shared';
|
|
89
|
+
import TagProperty from './property';
|
|
90
|
+
var TagControl = /*#__PURE__*/ function(RuntimeFormControl) {
|
|
91
|
+
"use strict";
|
|
92
|
+
_inherits(TagControl, RuntimeFormControl);
|
|
93
|
+
function TagControl(props) {
|
|
94
|
+
_class_call_check(this, TagControl);
|
|
95
|
+
var _this;
|
|
96
|
+
_this = _call_super(this, TagControl, [
|
|
97
|
+
props
|
|
98
|
+
]), _define_property(_this, "props", void 0);
|
|
99
|
+
_this.props = new TagProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
100
|
+
return _this;
|
|
101
|
+
}
|
|
102
|
+
_create_class(TagControl, null, [
|
|
103
|
+
{
|
|
104
|
+
key: "controlType",
|
|
105
|
+
get: function get() {
|
|
106
|
+
return 'tag';
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
]);
|
|
110
|
+
return TagControl;
|
|
111
|
+
}(RuntimeFormControl);
|
|
112
|
+
_define_property(TagControl, "controlFieldType", FieldTypes.VARCHAR);
|
|
113
|
+
export default TagControl;
|
|
114
|
+
export { TagControl as RuntimeTagControl };
|