@byteluck-fe/model-driven-settings 2.22.1-beta.0 → 2.22.1-beta.2
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/default/createBaseFields.js +28 -28
- package/dist/esm/default/createFormBaseFields.js +40 -40
- package/dist/esm/default/index.js +2 -2
- package/dist/esm/index.js +4 -4
- package/dist/esm/initSettings.js +18 -18
- package/dist/esm/props/checkbox.js +1 -1
- package/dist/esm/props/custom.js +2 -2
- package/dist/esm/props/input-number.js +4 -4
- package/dist/esm/props/input.js +4 -4
- package/dist/esm/props/radio.js +2 -2
- package/dist/esm/props/select.js +2 -2
- package/dist/esm/props/switch.js +3 -3
- package/dist/esm/props/textarea.js +6 -6
- package/dist/esm/schema/group.js +2 -2
- package/dist/esm/schema/index.js +3 -3
- package/dist/esm/schema/setting.js +3 -3
- package/dist/esm/schema/tab.js +2 -2
- package/package.json +4 -4
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
export function createBaseFields() {
|
|
2
2
|
return [
|
|
3
3
|
{
|
|
4
|
-
label:
|
|
5
|
-
key:
|
|
6
|
-
type:
|
|
7
|
-
component:
|
|
4
|
+
label: '隐藏',
|
|
5
|
+
key: 'isHide',
|
|
6
|
+
type: 'boolean',
|
|
7
|
+
component: 'switch'
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
|
-
key:
|
|
11
|
-
component:
|
|
10
|
+
key: 'superSetting',
|
|
11
|
+
component: 'super-setting'
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
|
-
key:
|
|
15
|
-
component:
|
|
14
|
+
key: 'style.width',
|
|
15
|
+
component: 'styleComponent',
|
|
16
16
|
props: {
|
|
17
|
-
configKey:
|
|
17
|
+
configKey: 'style.widthConfig',
|
|
18
18
|
options: [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
'px',
|
|
20
|
+
'%',
|
|
21
|
+
'fill',
|
|
22
|
+
'hug'
|
|
23
23
|
]
|
|
24
24
|
},
|
|
25
25
|
scopeEffect: function scopeEffect(driven, payload) {
|
|
26
26
|
var oldParent = payload.oldParent, newParent = payload.newParent, instance = payload.instance;
|
|
27
|
-
if ((oldParent === null || oldParent === void 0 ? void 0 : oldParent.type) ===
|
|
28
|
-
driven.setInstance(instance,
|
|
29
|
-
driven.setInstance(instance,
|
|
27
|
+
if ((oldParent === null || oldParent === void 0 ? void 0 : oldParent.type) === 'advanced-container' && newParent.type === 'positioning-container') {
|
|
28
|
+
driven.setInstance(instance, 'style.width', '');
|
|
29
|
+
driven.setInstance(instance, 'style.widthConfig', 'fill');
|
|
30
30
|
}
|
|
31
31
|
if (newParent) {
|
|
32
32
|
return {
|
|
33
|
-
visible: newParent.type ===
|
|
33
|
+
visible: newParent.type === 'advanced-container'
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
|
-
key:
|
|
40
|
-
component:
|
|
39
|
+
key: 'style.height',
|
|
40
|
+
component: 'styleComponent',
|
|
41
41
|
props: {
|
|
42
|
-
configKey:
|
|
42
|
+
configKey: 'style.heightConfig',
|
|
43
43
|
options: [
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
'px',
|
|
45
|
+
'%',
|
|
46
|
+
'fill',
|
|
47
|
+
'hug'
|
|
48
48
|
]
|
|
49
49
|
},
|
|
50
50
|
scopeEffect: function scopeEffect(driven, payload) {
|
|
51
51
|
var oldParent = payload.oldParent, newParent = payload.newParent, instance = payload.instance;
|
|
52
|
-
if ((oldParent === null || oldParent === void 0 ? void 0 : oldParent.type) ===
|
|
53
|
-
driven.setInstance(instance,
|
|
54
|
-
driven.setInstance(instance,
|
|
52
|
+
if ((oldParent === null || oldParent === void 0 ? void 0 : oldParent.type) === 'advanced-container' && newParent.type === 'positioning-container') {
|
|
53
|
+
driven.setInstance(instance, 'style.height', '');
|
|
54
|
+
driven.setInstance(instance, 'style.heightConfig', 'fill');
|
|
55
55
|
}
|
|
56
56
|
if (payload.newParent) {
|
|
57
57
|
return {
|
|
58
|
-
visible: payload.newParent.type ===
|
|
58
|
+
visible: payload.newParent.type === 'advanced-container'
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -23,19 +23,19 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
23
23
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
24
24
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
25
25
|
}
|
|
26
|
-
import { createBaseFields } from
|
|
26
|
+
import { createBaseFields } from './createBaseFields';
|
|
27
27
|
export function createFormBaseFields(defaultValues) {
|
|
28
28
|
return _to_consumable_array(createBaseFields()).concat([
|
|
29
29
|
{
|
|
30
|
-
type:
|
|
31
|
-
key:
|
|
32
|
-
component:
|
|
30
|
+
type: 'DataBind',
|
|
31
|
+
key: 'dataBind',
|
|
32
|
+
component: 'data-bind',
|
|
33
33
|
defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.dataBind
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
|
-
key:
|
|
37
|
-
type:
|
|
38
|
-
component:
|
|
36
|
+
key: 'caption',
|
|
37
|
+
type: 'string',
|
|
38
|
+
component: 'input',
|
|
39
39
|
props: {
|
|
40
40
|
maxLength: 80,
|
|
41
41
|
i18n: true
|
|
@@ -43,83 +43,83 @@ export function createFormBaseFields(defaultValues) {
|
|
|
43
43
|
defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.caption,
|
|
44
44
|
validator: function validator(value) {
|
|
45
45
|
if (!value) {
|
|
46
|
-
return
|
|
46
|
+
return '标题必填';
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
|
-
label:
|
|
52
|
-
key:
|
|
53
|
-
type:
|
|
54
|
-
component:
|
|
51
|
+
label: '隐藏标题',
|
|
52
|
+
key: 'isHideCaption',
|
|
53
|
+
type: 'boolean',
|
|
54
|
+
component: 'switch',
|
|
55
55
|
defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.isHideCaption,
|
|
56
56
|
props: {
|
|
57
|
-
showType:
|
|
57
|
+
showType: 'checkbox'
|
|
58
58
|
},
|
|
59
59
|
// 在明细表内隐藏
|
|
60
60
|
scopeEffect: function scopeEffect(driven, payload) {
|
|
61
61
|
var _payload_current, _payload_from;
|
|
62
62
|
if (((_payload_current = payload.current) === null || _payload_current === void 0 ? void 0 : _payload_current.type) !== ((_payload_from = payload.from) === null || _payload_from === void 0 ? void 0 : _payload_from.type)) {
|
|
63
63
|
//明细子表内默认开启
|
|
64
|
-
if (payload.current.type ===
|
|
65
|
-
driven.setInstance(payload.control,
|
|
64
|
+
if (payload.current.type === 'subtable') {
|
|
65
|
+
driven.setInstance(payload.control, 'isHideCaption', true);
|
|
66
66
|
}
|
|
67
67
|
return {
|
|
68
|
-
visible: payload.current.type !==
|
|
68
|
+
visible: payload.current.type !== 'subtable'
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
|
-
key:
|
|
75
|
-
type:
|
|
76
|
-
component:
|
|
74
|
+
key: 'labelPosition',
|
|
75
|
+
type: 'string',
|
|
76
|
+
component: 'radio',
|
|
77
77
|
defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.labelPosition,
|
|
78
78
|
props: {
|
|
79
|
-
showType:
|
|
79
|
+
showType: 'solid',
|
|
80
80
|
options: [
|
|
81
81
|
{
|
|
82
|
-
label:
|
|
83
|
-
value:
|
|
82
|
+
label: '上下布局',
|
|
83
|
+
value: 'top'
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
|
-
label:
|
|
87
|
-
value:
|
|
86
|
+
label: '左右布局',
|
|
87
|
+
value: 'left'
|
|
88
88
|
}
|
|
89
89
|
]
|
|
90
90
|
}
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
|
-
key:
|
|
94
|
-
type:
|
|
95
|
-
component:
|
|
93
|
+
key: 'defaultState',
|
|
94
|
+
type: 'string',
|
|
95
|
+
component: 'radio',
|
|
96
96
|
defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.defaultState,
|
|
97
97
|
props: {
|
|
98
|
-
showType:
|
|
98
|
+
showType: 'solid',
|
|
99
99
|
options: [
|
|
100
100
|
{
|
|
101
|
-
label:
|
|
102
|
-
value:
|
|
101
|
+
label: '普通',
|
|
102
|
+
value: 'default'
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
|
-
label:
|
|
106
|
-
value:
|
|
105
|
+
label: '只读',
|
|
106
|
+
value: 'readonly'
|
|
107
107
|
}
|
|
108
108
|
]
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
{
|
|
112
|
-
label:
|
|
113
|
-
key:
|
|
114
|
-
type:
|
|
115
|
-
component:
|
|
112
|
+
label: '必填',
|
|
113
|
+
key: 'required',
|
|
114
|
+
type: 'boolean',
|
|
115
|
+
component: 'switch',
|
|
116
116
|
defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.required
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
|
-
label:
|
|
120
|
-
key:
|
|
121
|
-
type:
|
|
122
|
-
component:
|
|
119
|
+
label: '提示文字',
|
|
120
|
+
key: 'placeholder',
|
|
121
|
+
type: 'string',
|
|
122
|
+
component: 'input',
|
|
123
123
|
defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.placeholder,
|
|
124
124
|
props: {
|
|
125
125
|
maxLength: 80,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from './createBaseFields';
|
|
2
|
+
export * from './createFormBaseFields';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from './defineInstance';
|
|
2
|
+
export * from './initSettings';
|
|
3
|
+
export * from './schema';
|
|
4
|
+
export * from './default';
|
package/dist/esm/initSettings.js
CHANGED
|
@@ -50,31 +50,31 @@ function _object_spread_props(target, source) {
|
|
|
50
50
|
}
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
|
-
import { Group, Setting } from
|
|
54
|
-
import { CustomProps } from
|
|
55
|
-
import { InputProps } from
|
|
56
|
-
import { InputNumberProps } from
|
|
57
|
-
import { SwitchProps } from
|
|
58
|
-
import { CheckboxProps } from
|
|
59
|
-
import { SelectProps } from
|
|
60
|
-
import { RadioProps } from
|
|
61
|
-
import { TextareaProps } from
|
|
62
|
-
import { isTabSchema, Tab } from
|
|
53
|
+
import { Group, Setting } from './schema';
|
|
54
|
+
import { CustomProps } from './props/custom';
|
|
55
|
+
import { InputProps } from './props/input';
|
|
56
|
+
import { InputNumberProps } from './props/input-number';
|
|
57
|
+
import { SwitchProps } from './props/switch';
|
|
58
|
+
import { CheckboxProps } from './props/checkbox';
|
|
59
|
+
import { SelectProps } from './props/select';
|
|
60
|
+
import { RadioProps } from './props/radio';
|
|
61
|
+
import { TextareaProps } from './props/textarea';
|
|
62
|
+
import { isTabSchema, Tab } from './schema/tab';
|
|
63
63
|
function propsFactory(component, props) {
|
|
64
64
|
switch(component){
|
|
65
|
-
case
|
|
65
|
+
case 'input':
|
|
66
66
|
return new InputProps(props);
|
|
67
|
-
case
|
|
67
|
+
case 'textarea':
|
|
68
68
|
return new TextareaProps(props);
|
|
69
|
-
case
|
|
69
|
+
case 'input-number':
|
|
70
70
|
return new InputNumberProps(props);
|
|
71
|
-
case
|
|
71
|
+
case 'switch':
|
|
72
72
|
return new SwitchProps(props);
|
|
73
|
-
case
|
|
73
|
+
case 'radio':
|
|
74
74
|
return new RadioProps(props);
|
|
75
|
-
case
|
|
75
|
+
case 'checkbox':
|
|
76
76
|
return new CheckboxProps(props);
|
|
77
|
-
case
|
|
77
|
+
case 'select':
|
|
78
78
|
return new SelectProps(props);
|
|
79
79
|
default:
|
|
80
80
|
return new CustomProps(props);
|
|
@@ -87,7 +87,7 @@ function buildSettingItem(settingMap) {
|
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
89
|
return new Setting(_object_spread_props(_object_spread({}, schema), {
|
|
90
|
-
props: propsFactory(schema.component,
|
|
90
|
+
props: propsFactory(schema.component, 'props' in schema ? schema.props : undefined)
|
|
91
91
|
}));
|
|
92
92
|
};
|
|
93
93
|
}
|
|
@@ -82,7 +82,7 @@ function _create_super(Derived) {
|
|
|
82
82
|
return _possible_constructor_return(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
import { BaseProps } from
|
|
85
|
+
import { BaseProps } from './base';
|
|
86
86
|
export var CheckboxProps = /*#__PURE__*/ function(BaseProps) {
|
|
87
87
|
"use strict";
|
|
88
88
|
_inherits(CheckboxProps, BaseProps);
|
package/dist/esm/props/custom.js
CHANGED
|
@@ -115,8 +115,8 @@ function _create_super(Derived) {
|
|
|
115
115
|
return _possible_constructor_return(this, result);
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
|
-
import { isPlainObject } from
|
|
119
|
-
import { BaseProps } from
|
|
118
|
+
import { isPlainObject } from '@byteluck-fe/model-driven-shared';
|
|
119
|
+
import { BaseProps } from './base';
|
|
120
120
|
export var CustomProps = /*#__PURE__*/ function(BaseProps) {
|
|
121
121
|
"use strict";
|
|
122
122
|
_inherits(CustomProps, BaseProps);
|
|
@@ -82,7 +82,7 @@ function _create_super(Derived) {
|
|
|
82
82
|
return _possible_constructor_return(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
import { BaseProps } from
|
|
85
|
+
import { BaseProps } from './base';
|
|
86
86
|
export var InputNumberProps = /*#__PURE__*/ function(BaseProps) {
|
|
87
87
|
"use strict";
|
|
88
88
|
_inherits(InputNumberProps, BaseProps);
|
|
@@ -95,11 +95,11 @@ export var InputNumberProps = /*#__PURE__*/ function(BaseProps) {
|
|
|
95
95
|
_define_property(_assert_this_initialized(_this), "min", void 0);
|
|
96
96
|
_define_property(_assert_this_initialized(_this), "placeholder", void 0);
|
|
97
97
|
var _props_max;
|
|
98
|
-
_this.max = (_props_max = props === null || props === void 0 ? void 0 : props.max) !== null && _props_max !== void 0 ? _props_max :
|
|
98
|
+
_this.max = (_props_max = props === null || props === void 0 ? void 0 : props.max) !== null && _props_max !== void 0 ? _props_max : '';
|
|
99
99
|
var _props_min;
|
|
100
|
-
_this.min = (_props_min = props === null || props === void 0 ? void 0 : props.min) !== null && _props_min !== void 0 ? _props_min :
|
|
100
|
+
_this.min = (_props_min = props === null || props === void 0 ? void 0 : props.min) !== null && _props_min !== void 0 ? _props_min : '';
|
|
101
101
|
var _props_placeholder;
|
|
102
|
-
_this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder :
|
|
102
|
+
_this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder : '';
|
|
103
103
|
return _this;
|
|
104
104
|
}
|
|
105
105
|
return InputNumberProps;
|
package/dist/esm/props/input.js
CHANGED
|
@@ -82,7 +82,7 @@ function _create_super(Derived) {
|
|
|
82
82
|
return _possible_constructor_return(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
import { BaseProps } from
|
|
85
|
+
import { BaseProps } from './base';
|
|
86
86
|
export var InputProps = /*#__PURE__*/ function(BaseProps) {
|
|
87
87
|
"use strict";
|
|
88
88
|
_inherits(InputProps, BaseProps);
|
|
@@ -96,11 +96,11 @@ export var InputProps = /*#__PURE__*/ function(BaseProps) {
|
|
|
96
96
|
_define_property(_assert_this_initialized(_this), "placeholder", void 0);
|
|
97
97
|
_define_property(_assert_this_initialized(_this), "i18n", void 0);
|
|
98
98
|
var _props_maxLength;
|
|
99
|
-
_this.maxLength = (_props_maxLength = props === null || props === void 0 ? void 0 : props.maxLength) !== null && _props_maxLength !== void 0 ? _props_maxLength :
|
|
99
|
+
_this.maxLength = (_props_maxLength = props === null || props === void 0 ? void 0 : props.maxLength) !== null && _props_maxLength !== void 0 ? _props_maxLength : '';
|
|
100
100
|
var _props_minLength;
|
|
101
|
-
_this.minLength = (_props_minLength = props === null || props === void 0 ? void 0 : props.minLength) !== null && _props_minLength !== void 0 ? _props_minLength :
|
|
101
|
+
_this.minLength = (_props_minLength = props === null || props === void 0 ? void 0 : props.minLength) !== null && _props_minLength !== void 0 ? _props_minLength : '';
|
|
102
102
|
var _props_placeholder;
|
|
103
|
-
_this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder :
|
|
103
|
+
_this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder : '';
|
|
104
104
|
var _props_i18n;
|
|
105
105
|
_this.i18n = (_props_i18n = props === null || props === void 0 ? void 0 : props.i18n) !== null && _props_i18n !== void 0 ? _props_i18n : false;
|
|
106
106
|
return _this;
|
package/dist/esm/props/radio.js
CHANGED
|
@@ -82,7 +82,7 @@ function _create_super(Derived) {
|
|
|
82
82
|
return _possible_constructor_return(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
import { BaseProps } from
|
|
85
|
+
import { BaseProps } from './base';
|
|
86
86
|
export var RadioProps = /*#__PURE__*/ function(BaseProps) {
|
|
87
87
|
"use strict";
|
|
88
88
|
_inherits(RadioProps, BaseProps);
|
|
@@ -96,7 +96,7 @@ export var RadioProps = /*#__PURE__*/ function(BaseProps) {
|
|
|
96
96
|
var _props_options;
|
|
97
97
|
_this.options = (_props_options = props === null || props === void 0 ? void 0 : props.options) !== null && _props_options !== void 0 ? _props_options : [];
|
|
98
98
|
var _props_showType;
|
|
99
|
-
_this.showType = (_props_showType = props === null || props === void 0 ? void 0 : props.showType) !== null && _props_showType !== void 0 ? _props_showType :
|
|
99
|
+
_this.showType = (_props_showType = props === null || props === void 0 ? void 0 : props.showType) !== null && _props_showType !== void 0 ? _props_showType : 'outline';
|
|
100
100
|
return _this;
|
|
101
101
|
}
|
|
102
102
|
return RadioProps;
|
package/dist/esm/props/select.js
CHANGED
|
@@ -82,7 +82,7 @@ function _create_super(Derived) {
|
|
|
82
82
|
return _possible_constructor_return(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
import { BaseProps } from
|
|
85
|
+
import { BaseProps } from './base';
|
|
86
86
|
export var SelectProps = /*#__PURE__*/ function(BaseProps) {
|
|
87
87
|
"use strict";
|
|
88
88
|
_inherits(SelectProps, BaseProps);
|
|
@@ -94,7 +94,7 @@ export var SelectProps = /*#__PURE__*/ function(BaseProps) {
|
|
|
94
94
|
_define_property(_assert_this_initialized(_this), "placeholder", void 0);
|
|
95
95
|
_define_property(_assert_this_initialized(_this), "options", void 0);
|
|
96
96
|
var _props_placeholder;
|
|
97
|
-
_this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder :
|
|
97
|
+
_this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder : '';
|
|
98
98
|
var _props_options;
|
|
99
99
|
_this.options = (_props_options = props === null || props === void 0 ? void 0 : props.options) !== null && _props_options !== void 0 ? _props_options : [];
|
|
100
100
|
return _this;
|
package/dist/esm/props/switch.js
CHANGED
|
@@ -82,7 +82,7 @@ function _create_super(Derived) {
|
|
|
82
82
|
return _possible_constructor_return(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
import { BaseProps } from
|
|
85
|
+
import { BaseProps } from './base';
|
|
86
86
|
export var SwitchProps = /*#__PURE__*/ function(BaseProps) {
|
|
87
87
|
"use strict";
|
|
88
88
|
_inherits(SwitchProps, BaseProps);
|
|
@@ -95,9 +95,9 @@ export var SwitchProps = /*#__PURE__*/ function(BaseProps) {
|
|
|
95
95
|
_define_property(_assert_this_initialized(_this), "tips", void 0);
|
|
96
96
|
_define_property(_assert_this_initialized(_this), "disabled", void 0);
|
|
97
97
|
var _props_showType;
|
|
98
|
-
_this.showType = (_props_showType = props === null || props === void 0 ? void 0 : props.showType) !== null && _props_showType !== void 0 ? _props_showType :
|
|
98
|
+
_this.showType = (_props_showType = props === null || props === void 0 ? void 0 : props.showType) !== null && _props_showType !== void 0 ? _props_showType : 'switch';
|
|
99
99
|
var _props_tips;
|
|
100
|
-
_this.tips = (_props_tips = props === null || props === void 0 ? void 0 : props.tips) !== null && _props_tips !== void 0 ? _props_tips :
|
|
100
|
+
_this.tips = (_props_tips = props === null || props === void 0 ? void 0 : props.tips) !== null && _props_tips !== void 0 ? _props_tips : '';
|
|
101
101
|
var _props_disabled;
|
|
102
102
|
_this.disabled = (_props_disabled = props === null || props === void 0 ? void 0 : props.disabled) !== null && _props_disabled !== void 0 ? _props_disabled : false;
|
|
103
103
|
return _this;
|
|
@@ -82,7 +82,7 @@ function _create_super(Derived) {
|
|
|
82
82
|
return _possible_constructor_return(this, result);
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
import { BaseProps } from
|
|
85
|
+
import { BaseProps } from './base';
|
|
86
86
|
export var TextareaProps = /*#__PURE__*/ function(BaseProps) {
|
|
87
87
|
"use strict";
|
|
88
88
|
_inherits(TextareaProps, BaseProps);
|
|
@@ -98,15 +98,15 @@ export var TextareaProps = /*#__PURE__*/ function(BaseProps) {
|
|
|
98
98
|
_define_property(_assert_this_initialized(_this), "maxRows", void 0);
|
|
99
99
|
_define_property(_assert_this_initialized(_this), "minRows", void 0);
|
|
100
100
|
var _props_maxLength;
|
|
101
|
-
_this.maxLength = (_props_maxLength = props === null || props === void 0 ? void 0 : props.maxLength) !== null && _props_maxLength !== void 0 ? _props_maxLength :
|
|
101
|
+
_this.maxLength = (_props_maxLength = props === null || props === void 0 ? void 0 : props.maxLength) !== null && _props_maxLength !== void 0 ? _props_maxLength : '';
|
|
102
102
|
var _props_minLength;
|
|
103
|
-
_this.minLength = (_props_minLength = props === null || props === void 0 ? void 0 : props.minLength) !== null && _props_minLength !== void 0 ? _props_minLength :
|
|
103
|
+
_this.minLength = (_props_minLength = props === null || props === void 0 ? void 0 : props.minLength) !== null && _props_minLength !== void 0 ? _props_minLength : '';
|
|
104
104
|
var _props_placeholder;
|
|
105
|
-
_this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder :
|
|
105
|
+
_this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder : '';
|
|
106
106
|
var _props_maxRows;
|
|
107
|
-
_this.maxRows = (_props_maxRows = props === null || props === void 0 ? void 0 : props.maxRows) !== null && _props_maxRows !== void 0 ? _props_maxRows :
|
|
107
|
+
_this.maxRows = (_props_maxRows = props === null || props === void 0 ? void 0 : props.maxRows) !== null && _props_maxRows !== void 0 ? _props_maxRows : '';
|
|
108
108
|
var _props_minRows;
|
|
109
|
-
_this.minRows = (_props_minRows = props === null || props === void 0 ? void 0 : props.minRows) !== null && _props_minRows !== void 0 ? _props_minRows :
|
|
109
|
+
_this.minRows = (_props_minRows = props === null || props === void 0 ? void 0 : props.minRows) !== null && _props_minRows !== void 0 ? _props_minRows : '';
|
|
110
110
|
var _props_i18n;
|
|
111
111
|
_this.i18n = (_props_i18n = props === null || props === void 0 ? void 0 : props.i18n) !== null && _props_i18n !== void 0 ? _props_i18n : false;
|
|
112
112
|
return _this;
|
package/dist/esm/schema/group.js
CHANGED
|
@@ -19,7 +19,7 @@ function _define_property(obj, key, value) {
|
|
|
19
19
|
export var Group = function Group(schema) {
|
|
20
20
|
"use strict";
|
|
21
21
|
_class_call_check(this, Group);
|
|
22
|
-
_define_property(this, "type",
|
|
22
|
+
_define_property(this, "type", 'group');
|
|
23
23
|
_define_property(this, "title", void 0);
|
|
24
24
|
_define_property(this, "required", void 0);
|
|
25
25
|
_define_property(this, "items", void 0);
|
|
@@ -27,7 +27,7 @@ export var Group = function Group(schema) {
|
|
|
27
27
|
_define_property(this, "fromId", void 0);
|
|
28
28
|
_define_property(this, "visible", void 0);
|
|
29
29
|
var _schema_title;
|
|
30
|
-
this.title = (_schema_title = schema.title) !== null && _schema_title !== void 0 ? _schema_title :
|
|
30
|
+
this.title = (_schema_title = schema.title) !== null && _schema_title !== void 0 ? _schema_title : '';
|
|
31
31
|
var _schema_required;
|
|
32
32
|
this.required = (_schema_required = schema.required) !== null && _schema_required !== void 0 ? _schema_required : false;
|
|
33
33
|
this.items = schema.items;
|
package/dist/esm/schema/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
1
|
+
export * from './setting';
|
|
2
|
+
export * from './group';
|
|
3
|
+
export * from './tab';
|
|
@@ -30,8 +30,8 @@ function _define_property(obj, key, value) {
|
|
|
30
30
|
}
|
|
31
31
|
return obj;
|
|
32
32
|
}
|
|
33
|
-
import { BaseProps } from
|
|
34
|
-
import { error, isPlainObject, noop } from
|
|
33
|
+
import { BaseProps } from '../props/base';
|
|
34
|
+
import { error, isPlainObject, noop } from '@byteluck-fe/model-driven-shared';
|
|
35
35
|
export var Setting = /*#__PURE__*/ function() {
|
|
36
36
|
"use strict";
|
|
37
37
|
function Setting(schema) {
|
|
@@ -66,7 +66,7 @@ export var Setting = /*#__PURE__*/ function() {
|
|
|
66
66
|
key: "filterEffects",
|
|
67
67
|
value: function filterEffects(effectKey) {
|
|
68
68
|
var _this = this;
|
|
69
|
-
if (effectKey ===
|
|
69
|
+
if (effectKey === '') {
|
|
70
70
|
return Object.values(this.effect);
|
|
71
71
|
}
|
|
72
72
|
return this.effectKeys.filter(function(key) {
|
package/dist/esm/schema/tab.js
CHANGED
|
@@ -17,12 +17,12 @@ function _define_property(obj, key, value) {
|
|
|
17
17
|
return obj;
|
|
18
18
|
}
|
|
19
19
|
export function isTabSchema(schema) {
|
|
20
|
-
return
|
|
20
|
+
return 'type' in schema && schema.type === 'tab';
|
|
21
21
|
}
|
|
22
22
|
export var Tab = function Tab(schema) {
|
|
23
23
|
"use strict";
|
|
24
24
|
_class_call_check(this, Tab);
|
|
25
|
-
_define_property(this, "type",
|
|
25
|
+
_define_property(this, "type", 'tab');
|
|
26
26
|
_define_property(this, "title", void 0);
|
|
27
27
|
_define_property(this, "items", void 0);
|
|
28
28
|
this.title = schema.title;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byteluck-fe/model-driven-settings",
|
|
3
|
-
"version": "2.22.1-beta.
|
|
3
|
+
"version": "2.22.1-beta.2",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "郝晨光 <2293885211@qq.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"postpublish": "node ../../scripts/postpublish.js"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@byteluck-fe/model-driven-core": "2.22.1-beta.
|
|
30
|
-
"@byteluck-fe/model-driven-shared": "2.22.1-beta.
|
|
29
|
+
"@byteluck-fe/model-driven-core": "2.22.1-beta.2",
|
|
30
|
+
"@byteluck-fe/model-driven-shared": "2.22.1-beta.2",
|
|
31
31
|
"tslib": "^2.1.0"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "108c1dfb59b8cdad804acc93aa3cb4e6d91c432e"
|
|
34
34
|
}
|