@byteluck-fe/model-driven-settings 2.7.0-beta → 2.7.0-beta.4

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.
@@ -23,9 +23,8 @@ export function createBaseFields() {
23
23
  ]
24
24
  },
25
25
  scopeEffect: function scopeEffect(driven, payload) {
26
- var _oldParent;
27
26
  var oldParent = payload.oldParent, newParent = payload.newParent, instance = payload.instance;
28
- if (((_oldParent = oldParent) === null || _oldParent === void 0 ? void 0 : _oldParent.type) === "advanced-container" && newParent.type === "positioning-container") {
27
+ if ((oldParent === null || oldParent === void 0 ? void 0 : oldParent.type) === "advanced-container" && newParent.type === "positioning-container") {
29
28
  driven.setInstance(instance, "style.width", "");
30
29
  driven.setInstance(instance, "style.widthConfig", "fill");
31
30
  }
@@ -49,9 +48,8 @@ export function createBaseFields() {
49
48
  ]
50
49
  },
51
50
  scopeEffect: function scopeEffect(driven, payload) {
52
- var _oldParent;
53
51
  var oldParent = payload.oldParent, newParent = payload.newParent, instance = payload.instance;
54
- if (((_oldParent = oldParent) === null || _oldParent === void 0 ? void 0 : _oldParent.type) === "advanced-container" && newParent.type === "positioning-container") {
52
+ if ((oldParent === null || oldParent === void 0 ? void 0 : oldParent.type) === "advanced-container" && newParent.type === "positioning-container") {
55
53
  driven.setInstance(instance, "style.height", "");
56
54
  driven.setInstance(instance, "style.heightConfig", "fill");
57
55
  }
@@ -25,13 +25,12 @@ function _unsupported_iterable_to_array(o, minLen) {
25
25
  }
26
26
  import { createBaseFields } from "./createBaseFields";
27
27
  export function createFormBaseFields(defaultValues) {
28
- var _defaultValues, _defaultValues1, _defaultValues2, _defaultValues3, _defaultValues4, _defaultValues5, _defaultValues6;
29
28
  return _to_consumable_array(createBaseFields()).concat([
30
29
  {
31
30
  type: "DataBind",
32
31
  key: "dataBind",
33
32
  component: "data-bind",
34
- defaultValue: (_defaultValues = defaultValues) === null || _defaultValues === void 0 ? void 0 : _defaultValues.dataBind
33
+ defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.dataBind
35
34
  },
36
35
  {
37
36
  key: "caption",
@@ -41,7 +40,7 @@ export function createFormBaseFields(defaultValues) {
41
40
  maxLength: 80,
42
41
  i18n: true
43
42
  },
44
- defaultValue: (_defaultValues1 = defaultValues) === null || _defaultValues1 === void 0 ? void 0 : _defaultValues1.caption,
43
+ defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.caption,
45
44
  validator: function validator(value) {
46
45
  if (!value) {
47
46
  return "标题必填";
@@ -53,7 +52,7 @@ export function createFormBaseFields(defaultValues) {
53
52
  key: "isHideCaption",
54
53
  type: "boolean",
55
54
  component: "switch",
56
- defaultValue: (_defaultValues2 = defaultValues) === null || _defaultValues2 === void 0 ? void 0 : _defaultValues2.isHideCaption,
55
+ defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.isHideCaption,
57
56
  props: {
58
57
  showType: "checkbox"
59
58
  },
@@ -75,7 +74,7 @@ export function createFormBaseFields(defaultValues) {
75
74
  key: "labelPosition",
76
75
  type: "string",
77
76
  component: "radio",
78
- defaultValue: (_defaultValues3 = defaultValues) === null || _defaultValues3 === void 0 ? void 0 : _defaultValues3.labelPosition,
77
+ defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.labelPosition,
79
78
  props: {
80
79
  showType: "solid",
81
80
  options: [
@@ -94,7 +93,7 @@ export function createFormBaseFields(defaultValues) {
94
93
  key: "defaultState",
95
94
  type: "string",
96
95
  component: "radio",
97
- defaultValue: (_defaultValues4 = defaultValues) === null || _defaultValues4 === void 0 ? void 0 : _defaultValues4.defaultState,
96
+ defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.defaultState,
98
97
  props: {
99
98
  showType: "solid",
100
99
  options: [
@@ -114,14 +113,14 @@ export function createFormBaseFields(defaultValues) {
114
113
  key: "required",
115
114
  type: "boolean",
116
115
  component: "switch",
117
- defaultValue: (_defaultValues5 = defaultValues) === null || _defaultValues5 === void 0 ? void 0 : _defaultValues5.required
116
+ defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.required
118
117
  },
119
118
  {
120
119
  label: "提示文字",
121
120
  key: "placeholder",
122
121
  type: "string",
123
122
  component: "input",
124
- defaultValue: (_defaultValues6 = defaultValues) === null || _defaultValues6 === void 0 ? void 0 : _defaultValues6.placeholder,
123
+ defaultValue: defaultValues === null || defaultValues === void 0 ? void 0 : defaultValues.placeholder,
125
124
  props: {
126
125
  maxLength: 80,
127
126
  i18n: true
@@ -34,7 +34,6 @@ export var BaseProps = /*#__PURE__*/ function() {
34
34
  "use strict";
35
35
  function BaseProps(props) {
36
36
  _class_call_check(this, BaseProps);
37
- var _props, _props1;
38
37
  /**
39
38
  * 显示隐藏
40
39
  * */ _define_property(this, "visible", void 0);
@@ -42,9 +41,9 @@ export var BaseProps = /*#__PURE__*/ function() {
42
41
  * 开启表达式
43
42
  * */ _define_property(this, "expression", void 0);
44
43
  var _props_visible;
45
- this.visible = (_props_visible = (_props = props) === null || _props === void 0 ? void 0 : _props.visible) !== null && _props_visible !== void 0 ? _props_visible : true;
44
+ this.visible = (_props_visible = props === null || props === void 0 ? void 0 : props.visible) !== null && _props_visible !== void 0 ? _props_visible : true;
46
45
  var _props_expression;
47
- this.expression = (_props_expression = (_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.expression) !== null && _props_expression !== void 0 ? _props_expression : false;
46
+ this.expression = (_props_expression = props === null || props === void 0 ? void 0 : props.expression) !== null && _props_expression !== void 0 ? _props_expression : false;
48
47
  }
49
48
  _create_class(BaseProps, [
50
49
  {
@@ -90,11 +90,10 @@ export var CheckboxProps = /*#__PURE__*/ function(BaseProps) {
90
90
  function CheckboxProps(props) {
91
91
  _class_call_check(this, CheckboxProps);
92
92
  var _this;
93
- var _props;
94
93
  _this = _super.call(this, props);
95
94
  _define_property(_assert_this_initialized(_this), "options", void 0);
96
95
  var _props_options;
97
- _this.options = (_props_options = (_props = props) === null || _props === void 0 ? void 0 : _props.options) !== null && _props_options !== void 0 ? _props_options : [];
96
+ _this.options = (_props_options = props === null || props === void 0 ? void 0 : props.options) !== null && _props_options !== void 0 ? _props_options : [];
98
97
  return _this;
99
98
  }
100
99
  return CheckboxProps;
@@ -90,17 +90,16 @@ export var InputNumberProps = /*#__PURE__*/ function(BaseProps) {
90
90
  function InputNumberProps(props) {
91
91
  _class_call_check(this, InputNumberProps);
92
92
  var _this;
93
- var _props, _props1, _props2;
94
93
  _this = _super.call(this, props);
95
94
  _define_property(_assert_this_initialized(_this), "max", void 0);
96
95
  _define_property(_assert_this_initialized(_this), "min", void 0);
97
96
  _define_property(_assert_this_initialized(_this), "placeholder", void 0);
98
97
  var _props_max;
99
- _this.max = (_props_max = (_props = 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 : "";
100
99
  var _props_min;
101
- _this.min = (_props_min = (_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.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 : "";
102
101
  var _props_placeholder;
103
- _this.placeholder = (_props_placeholder = (_props2 = props) === null || _props2 === void 0 ? void 0 : _props2.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 : "";
104
103
  return _this;
105
104
  }
106
105
  return InputNumberProps;
@@ -90,20 +90,19 @@ export var InputProps = /*#__PURE__*/ function(BaseProps) {
90
90
  function InputProps(props) {
91
91
  _class_call_check(this, InputProps);
92
92
  var _this;
93
- var _props, _props1, _props2, _props3;
94
93
  _this = _super.call(this, props);
95
94
  _define_property(_assert_this_initialized(_this), "maxLength", void 0);
96
95
  _define_property(_assert_this_initialized(_this), "minLength", void 0);
97
96
  _define_property(_assert_this_initialized(_this), "placeholder", void 0);
98
97
  _define_property(_assert_this_initialized(_this), "i18n", void 0);
99
98
  var _props_maxLength;
100
- _this.maxLength = (_props_maxLength = (_props = 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 : "";
101
100
  var _props_minLength;
102
- _this.minLength = (_props_minLength = (_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.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 : "";
103
102
  var _props_placeholder;
104
- _this.placeholder = (_props_placeholder = (_props2 = props) === null || _props2 === void 0 ? void 0 : _props2.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 : "";
105
104
  var _props_i18n;
106
- _this.i18n = (_props_i18n = (_props3 = props) === null || _props3 === void 0 ? void 0 : _props3.i18n) !== null && _props_i18n !== void 0 ? _props_i18n : false;
105
+ _this.i18n = (_props_i18n = props === null || props === void 0 ? void 0 : props.i18n) !== null && _props_i18n !== void 0 ? _props_i18n : false;
107
106
  return _this;
108
107
  }
109
108
  return InputProps;
@@ -90,14 +90,13 @@ export var RadioProps = /*#__PURE__*/ function(BaseProps) {
90
90
  function RadioProps(props) {
91
91
  _class_call_check(this, RadioProps);
92
92
  var _this;
93
- var _props, _props1;
94
93
  _this = _super.call(this, props);
95
94
  _define_property(_assert_this_initialized(_this), "options", void 0);
96
95
  _define_property(_assert_this_initialized(_this), "showType", void 0);
97
96
  var _props_options;
98
- _this.options = (_props_options = (_props = props) === null || _props === void 0 ? void 0 : _props.options) !== null && _props_options !== void 0 ? _props_options : [];
97
+ _this.options = (_props_options = props === null || props === void 0 ? void 0 : props.options) !== null && _props_options !== void 0 ? _props_options : [];
99
98
  var _props_showType;
100
- _this.showType = (_props_showType = (_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.showType) !== null && _props_showType !== void 0 ? _props_showType : "outline";
99
+ _this.showType = (_props_showType = props === null || props === void 0 ? void 0 : props.showType) !== null && _props_showType !== void 0 ? _props_showType : "outline";
101
100
  return _this;
102
101
  }
103
102
  return RadioProps;
@@ -90,14 +90,13 @@ export var SelectProps = /*#__PURE__*/ function(BaseProps) {
90
90
  function SelectProps(props) {
91
91
  _class_call_check(this, SelectProps);
92
92
  var _this;
93
- var _props, _props1;
94
93
  _this = _super.call(this, props);
95
94
  _define_property(_assert_this_initialized(_this), "placeholder", void 0);
96
95
  _define_property(_assert_this_initialized(_this), "options", void 0);
97
96
  var _props_placeholder;
98
- _this.placeholder = (_props_placeholder = (_props = 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 : "";
99
98
  var _props_options;
100
- _this.options = (_props_options = (_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.options) !== null && _props_options !== void 0 ? _props_options : [];
99
+ _this.options = (_props_options = props === null || props === void 0 ? void 0 : props.options) !== null && _props_options !== void 0 ? _props_options : [];
101
100
  return _this;
102
101
  }
103
102
  return SelectProps;
@@ -90,17 +90,16 @@ export var SwitchProps = /*#__PURE__*/ function(BaseProps) {
90
90
  function SwitchProps(props) {
91
91
  _class_call_check(this, SwitchProps);
92
92
  var _this;
93
- var _props, _props1, _props2;
94
93
  _this = _super.call(this, props);
95
94
  _define_property(_assert_this_initialized(_this), "showType", void 0);
96
95
  _define_property(_assert_this_initialized(_this), "tips", void 0);
97
96
  _define_property(_assert_this_initialized(_this), "disabled", void 0);
98
97
  var _props_showType;
99
- _this.showType = (_props_showType = (_props = props) === null || _props === void 0 ? void 0 : _props.showType) !== null && _props_showType !== void 0 ? _props_showType : "switch";
98
+ _this.showType = (_props_showType = props === null || props === void 0 ? void 0 : props.showType) !== null && _props_showType !== void 0 ? _props_showType : "switch";
100
99
  var _props_tips;
101
- _this.tips = (_props_tips = (_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.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 : "";
102
101
  var _props_disabled;
103
- _this.disabled = (_props_disabled = (_props2 = props) === null || _props2 === void 0 ? void 0 : _props2.disabled) !== null && _props_disabled !== void 0 ? _props_disabled : false;
102
+ _this.disabled = (_props_disabled = props === null || props === void 0 ? void 0 : props.disabled) !== null && _props_disabled !== void 0 ? _props_disabled : false;
104
103
  return _this;
105
104
  }
106
105
  return SwitchProps;
@@ -90,7 +90,6 @@ export var TextareaProps = /*#__PURE__*/ function(BaseProps) {
90
90
  function TextareaProps(props) {
91
91
  _class_call_check(this, TextareaProps);
92
92
  var _this;
93
- var _props, _props1, _props2, _props3, _props4, _props5;
94
93
  _this = _super.call(this, props);
95
94
  _define_property(_assert_this_initialized(_this), "maxLength", void 0);
96
95
  _define_property(_assert_this_initialized(_this), "minLength", void 0);
@@ -99,17 +98,17 @@ export var TextareaProps = /*#__PURE__*/ function(BaseProps) {
99
98
  _define_property(_assert_this_initialized(_this), "maxRows", void 0);
100
99
  _define_property(_assert_this_initialized(_this), "minRows", void 0);
101
100
  var _props_maxLength;
102
- _this.maxLength = (_props_maxLength = (_props = 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 : "";
103
102
  var _props_minLength;
104
- _this.minLength = (_props_minLength = (_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.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 : "";
105
104
  var _props_placeholder;
106
- _this.placeholder = (_props_placeholder = (_props2 = props) === null || _props2 === void 0 ? void 0 : _props2.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 : "";
107
106
  var _props_maxRows;
108
- _this.maxRows = (_props_maxRows = (_props3 = props) === null || _props3 === void 0 ? void 0 : _props3.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 : "";
109
108
  var _props_minRows;
110
- _this.minRows = (_props_minRows = (_props4 = props) === null || _props4 === void 0 ? void 0 : _props4.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 : "";
111
110
  var _props_i18n;
112
- _this.i18n = (_props_i18n = (_props5 = props) === null || _props5 === void 0 ? void 0 : _props5.i18n) !== null && _props_i18n !== void 0 ? _props_i18n : false;
111
+ _this.i18n = (_props_i18n = props === null || props === void 0 ? void 0 : props.i18n) !== null && _props_i18n !== void 0 ? _props_i18n : false;
113
112
  return _this;
114
113
  }
115
114
  return TextareaProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteluck-fe/model-driven-settings",
3
- "version": "2.7.0-beta",
3
+ "version": "2.7.0-beta.4",
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.7.0-beta",
30
- "@byteluck-fe/model-driven-shared": "2.5.0-beta.9",
29
+ "@byteluck-fe/model-driven-core": "2.7.0-beta.4",
30
+ "@byteluck-fe/model-driven-shared": "2.7.0-beta.4",
31
31
  "tslib": "^2.1.0"
32
32
  },
33
- "gitHead": "6d0dc842f3ea76fd922bc72fc4c2e66e86f9890e"
33
+ "gitHead": "1bf9f693724f41f144a37e4f81f2c06dfe2069de"
34
34
  }