@byteluck-fe/model-driven-controls 6.1.0-1-beta.1 → 6.1.0-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/baseControls/Dashboard/designer.js +4 -0
- package/dist/esm/baseControls/Dashboard/property.js +10 -1
- package/dist/esm/columnControls/EmployeeColumn/designer.js +1 -1
- package/dist/esm/columnControls/TimescopeColumn/designer.js +2 -1
- package/dist/esm/columnControls/TimescopeColumn/property.js +4 -1
- package/dist/esm/columnControls/TimestampColumn/designer.js +2 -1
- package/dist/esm/columnControls/TimestampColumn/property.js +4 -1
- package/dist/esm/formControls/Address/runtime.js +1 -1
- package/dist/esm/formControls/Amount/property.js +1 -1
- package/dist/esm/formControls/DatePicker/designer.js +4 -2
- package/dist/esm/formControls/DatePicker/property.js +3 -0
- package/dist/esm/formControls/DateRange/designer.js +4 -2
- package/dist/esm/formControls/DateRange/property.js +4 -1
- package/dist/esm/formControls/Department2/designer.js +1 -1
- package/dist/esm/formControls/Employee2/designer.js +1 -1
- package/dist/esm/formControls/Image/designer.js +4 -12
- package/dist/esm/formControls/Image/property.js +36 -2
- package/dist/esm/formControls/Image/runtime.js +16 -10
- package/dist/esm/formControls/Number/property.js +1 -1
- package/dist/esm/formControls/OrganizationSelection/designer.js +1 -1
- package/dist/esm/formControls/Tree/designer.js +2 -2
- package/dist/esm/framework.js +8 -0
- package/dist/esm/layoutControls/AdvancedContainer/Setting.js +3 -3
- package/dist/esm/layoutControls/GridTableColumn/designer.js +1 -1
- package/dist/esm/layoutControls/Page/Setting.js +5 -5
- package/dist/esm/layoutControls/PositioningContainer/Setting.js +3 -3
- package/dist/esm/layoutControls/Step/designer.js +166 -0
- package/dist/esm/layoutControls/Step/index.js +11 -0
- package/dist/esm/layoutControls/Step/property.js +103 -0
- package/dist/esm/layoutControls/Step/runtime.js +112 -0
- package/dist/esm/layoutControls/Step/types.js +0 -0
- package/dist/esm/layoutControls/StepPane/designer.js +130 -0
- package/dist/esm/layoutControls/StepPane/index.js +11 -0
- package/dist/esm/layoutControls/StepPane/property.js +123 -0
- package/dist/esm/layoutControls/StepPane/runtime.js +112 -0
- package/dist/esm/layoutControls/StepPane/types.js +0 -0
- package/dist/esm/layoutControls/index.js +2 -0
- package/dist/index.umd.js +1 -1
- package/dist/types/baseControls/Dashboard/property.d.ts +5 -1
- package/dist/types/columnControls/TimescopeColumn/property.d.ts +1 -0
- package/dist/types/columnControls/TimestampColumn/property.d.ts +1 -0
- package/dist/types/formControls/DatePicker/property.d.ts +1 -0
- package/dist/types/formControls/DateRange/property.d.ts +1 -0
- package/dist/types/formControls/Image/designer.d.ts +2 -0
- package/dist/types/formControls/Image/property.d.ts +3 -0
- package/dist/types/formControls/Image/runtime.d.ts +2 -0
- package/dist/types/framework.d.ts +8 -0
- package/dist/types/layoutControls/Step/designer.d.ts +14 -0
- package/dist/types/layoutControls/Step/index.d.ts +12 -0
- package/dist/types/layoutControls/Step/property.d.ts +11 -0
- package/dist/types/layoutControls/Step/runtime.d.ts +9 -0
- package/dist/types/layoutControls/Step/types.d.ts +0 -0
- package/dist/types/layoutControls/StepPane/designer.d.ts +14 -0
- package/dist/types/layoutControls/StepPane/index.d.ts +12 -0
- package/dist/types/layoutControls/StepPane/property.d.ts +14 -0
- package/dist/types/layoutControls/StepPane/runtime.d.ts +9 -0
- package/dist/types/layoutControls/StepPane/types.d.ts +0 -0
- package/dist/types/layoutControls/index.d.ts +2 -0
- package/dist/types/type.d.ts +3 -1
- package/package.json +5 -5
|
@@ -100,6 +100,11 @@ var DashboardPropertyRules = /*#__PURE__*/ function(PropertyRules) {
|
|
|
100
100
|
type: 'string',
|
|
101
101
|
required: false,
|
|
102
102
|
message: getLocaleText('CMD.pleaseEnterCaptionTip', null, '请输入气泡提示语')
|
|
103
|
+
}), _define_property(_this, "isShowReportParams", {
|
|
104
|
+
type: 'boolean'
|
|
105
|
+
}), _define_property(_this, "reportParams", {
|
|
106
|
+
type: 'array',
|
|
107
|
+
min: 0
|
|
103
108
|
});
|
|
104
109
|
if (props.isShowCaptionTip) {
|
|
105
110
|
_this.captionTip.required = true;
|
|
@@ -116,7 +121,7 @@ var DashboardProperty = /*#__PURE__*/ function(Property) {
|
|
|
116
121
|
var _this;
|
|
117
122
|
_this = _call_super(this, DashboardProperty, [
|
|
118
123
|
props
|
|
119
|
-
]), _define_property(_this, "dashboardKey", void 0), _define_property(_this, "caption", void 0), _define_property(_this, "isHideCaption", void 0), _define_property(_this, "isShowCaptionTip", void 0), _define_property(_this, "captionTip", void 0), _define_property(_this, "labelPosition", void 0);
|
|
124
|
+
]), _define_property(_this, "dashboardKey", void 0), _define_property(_this, "caption", void 0), _define_property(_this, "isHideCaption", void 0), _define_property(_this, "isShowCaptionTip", void 0), _define_property(_this, "captionTip", void 0), _define_property(_this, "labelPosition", void 0), _define_property(_this, "isShowReportParams", void 0), _define_property(_this, "reportParams", void 0);
|
|
120
125
|
var _props_dashboardKey;
|
|
121
126
|
_this.dashboardKey = (_props_dashboardKey = props === null || props === void 0 ? void 0 : props.dashboardKey) !== null && _props_dashboardKey !== void 0 ? _props_dashboardKey : '';
|
|
122
127
|
var _props_caption;
|
|
@@ -129,6 +134,10 @@ var DashboardProperty = /*#__PURE__*/ function(Property) {
|
|
|
129
134
|
_this.captionTip = (_props_captionTip = props === null || props === void 0 ? void 0 : props.captionTip) !== null && _props_captionTip !== void 0 ? _props_captionTip : '';
|
|
130
135
|
var _props_labelPosition;
|
|
131
136
|
_this.labelPosition = (_props_labelPosition = props === null || props === void 0 ? void 0 : props.labelPosition) !== null && _props_labelPosition !== void 0 ? _props_labelPosition : 'top';
|
|
137
|
+
var _props_isShowReportParams;
|
|
138
|
+
_this.isShowReportParams = (_props_isShowReportParams = props === null || props === void 0 ? void 0 : props.isShowReportParams) !== null && _props_isShowReportParams !== void 0 ? _props_isShowReportParams : false;
|
|
139
|
+
var _props_reportParams;
|
|
140
|
+
_this.reportParams = (_props_reportParams = props === null || props === void 0 ? void 0 : props.reportParams) !== null && _props_reportParams !== void 0 ? _props_reportParams : [];
|
|
132
141
|
return _this;
|
|
133
142
|
}
|
|
134
143
|
return DashboardProperty;
|
|
@@ -107,7 +107,7 @@ var EmployeeColumnControl = /*#__PURE__*/ function(DesignerColumnControl) {
|
|
|
107
107
|
return [
|
|
108
108
|
{
|
|
109
109
|
key: 'displayBoList',
|
|
110
|
-
name: getLocaleText('CMD.
|
|
110
|
+
name: getLocaleText('CMD.81231751712162319'),
|
|
111
111
|
required: true
|
|
112
112
|
}
|
|
113
113
|
];
|
|
@@ -129,8 +129,9 @@ var TimescopeColumnControl = /*#__PURE__*/ function(DesignerColumnControl) {
|
|
|
129
129
|
value: function toDataBindModel(parentId) {
|
|
130
130
|
var dataBindModel = _get(_get_prototype_of(TimescopeColumnControl.prototype), "toDataBindModel", this).call(this, parentId);
|
|
131
131
|
if (dataBindModel) {
|
|
132
|
-
var
|
|
132
|
+
var _this_props = this.props, dateType = _this_props.dateType, isInternational = _this_props.isInternational;
|
|
133
133
|
dataBindModel.props.dateType = dateType;
|
|
134
|
+
dataBindModel.props.isInternational = isInternational;
|
|
134
135
|
}
|
|
135
136
|
return dataBindModel;
|
|
136
137
|
}
|
|
@@ -108,7 +108,8 @@ var TimescopeColumnControlPropertyRules = /*#__PURE__*/ function(ColumnControlPr
|
|
|
108
108
|
*/ _define_property(_this, "showLinkOperation", void 0), /**
|
|
109
109
|
* 链接操作配置
|
|
110
110
|
* @public
|
|
111
|
-
*/ _define_property(_this, "linkOperationOption", void 0)
|
|
111
|
+
*/ _define_property(_this, "linkOperationOption", void 0), _define_property(_this, "isInternational", void 0 //是否国际化
|
|
112
|
+
);
|
|
112
113
|
var _props_dateType;
|
|
113
114
|
_this.dateType = (_props_dateType = props === null || props === void 0 ? void 0 : props.dateType) !== null && _props_dateType !== void 0 ? _props_dateType : DateType.DATE;
|
|
114
115
|
var _props_showLinkOperation;
|
|
@@ -116,6 +117,8 @@ var TimescopeColumnControlPropertyRules = /*#__PURE__*/ function(ColumnControlPr
|
|
|
116
117
|
_this.linkOperationOption = new LinkOperationOption(props === null || props === void 0 ? void 0 : props.linkOperationOption);
|
|
117
118
|
var _props_caption;
|
|
118
119
|
_this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : DesignerTimescopeColumnControl.controlName;
|
|
120
|
+
var _props_isInternational;
|
|
121
|
+
_this.isInternational = (_props_isInternational = props === null || props === void 0 ? void 0 : props.isInternational) !== null && _props_isInternational !== void 0 ? _props_isInternational : false;
|
|
119
122
|
return _this;
|
|
120
123
|
}
|
|
121
124
|
return TimescopeColumnControlProperty;
|
|
@@ -129,8 +129,9 @@ var TimestampColumnControl = /*#__PURE__*/ function(DesignerColumnControl) {
|
|
|
129
129
|
value: function toDataBindModel(parentId) {
|
|
130
130
|
var dataBindModel = _get(_get_prototype_of(TimestampColumnControl.prototype), "toDataBindModel", this).call(this, parentId);
|
|
131
131
|
if (dataBindModel) {
|
|
132
|
-
var
|
|
132
|
+
var _this_props = this.props, dateType = _this_props.dateType, isInternational = _this_props.isInternational;
|
|
133
133
|
dataBindModel.props.dateType = dateType;
|
|
134
|
+
dataBindModel.props.isInternational = isInternational;
|
|
134
135
|
}
|
|
135
136
|
return dataBindModel;
|
|
136
137
|
}
|
|
@@ -108,7 +108,8 @@ var TimestampColumnControlPropertyRules = /*#__PURE__*/ function(ColumnControlPr
|
|
|
108
108
|
*/ _define_property(_this, "showLinkOperation", void 0), /**
|
|
109
109
|
* 链接操作配置
|
|
110
110
|
* @public
|
|
111
|
-
*/ _define_property(_this, "linkOperationOption", void 0)
|
|
111
|
+
*/ _define_property(_this, "linkOperationOption", void 0), _define_property(_this, "isInternational", void 0 //是否国际化
|
|
112
|
+
);
|
|
112
113
|
var _props_dateType;
|
|
113
114
|
_this.dateType = (_props_dateType = props === null || props === void 0 ? void 0 : props.dateType) !== null && _props_dateType !== void 0 ? _props_dateType : DateType.DATE;
|
|
114
115
|
var _props_showLinkOperation;
|
|
@@ -116,6 +117,8 @@ var TimestampColumnControlPropertyRules = /*#__PURE__*/ function(ColumnControlPr
|
|
|
116
117
|
_this.linkOperationOption = new LinkOperationOption(props === null || props === void 0 ? void 0 : props.linkOperationOption);
|
|
117
118
|
var _props_caption;
|
|
118
119
|
_this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : DesignerTimestampColumnControl.controlName;
|
|
120
|
+
var _props_isInternational;
|
|
121
|
+
_this.isInternational = (_props_isInternational = props === null || props === void 0 ? void 0 : props.isInternational) !== null && _props_isInternational !== void 0 ? _props_isInternational : false;
|
|
119
122
|
return _this;
|
|
120
123
|
}
|
|
121
124
|
return TimestampColumnControlProperty;
|
|
@@ -182,7 +182,7 @@ var AmountPropertyRuntimeRules = /*#__PURE__*/ function(BaseControlPropertyRunti
|
|
|
182
182
|
message: getLocaleText(amountMax === undefined ? 'CMD.pleaseEnterAValueGreaterThanMin' : amountMin === undefined ? 'CMD.pleaseEnterAValueLessThanMax' : 'CMD.pleaseEnterNumberRange', {
|
|
183
183
|
max: amountMax,
|
|
184
184
|
min: amountMin
|
|
185
|
-
}, amountMax === undefined ? getLocaleText('CMD.
|
|
185
|
+
}, amountMax === undefined ? getLocaleText('CMD.51051751712133507') : amountMin === undefined ? getLocaleText('CMD.41d01751712135567') : getLocaleText('CMD.affe1751712129045'))
|
|
186
186
|
}
|
|
187
187
|
],
|
|
188
188
|
currency: {
|
|
@@ -129,8 +129,9 @@ var DatePickerControl = /*#__PURE__*/ function(DesignerFormControl) {
|
|
|
129
129
|
value: function toDataBindModel(parentId) {
|
|
130
130
|
var dataBindModel = _get(_get_prototype_of(DatePickerControl.prototype), "toDataBindModel", this).call(this, parentId);
|
|
131
131
|
if (dataBindModel && !Array.isArray(dataBindModel)) {
|
|
132
|
-
var
|
|
132
|
+
var _this_props = this.props, dateType = _this_props.dateType, isInternational = _this_props.isInternational;
|
|
133
133
|
dataBindModel.props.dateType = dateType;
|
|
134
|
+
dataBindModel.props.isInternational = isInternational;
|
|
134
135
|
}
|
|
135
136
|
return dataBindModel;
|
|
136
137
|
}
|
|
@@ -203,7 +204,8 @@ _define_property(DatePickerControl, "setting", [
|
|
|
203
204
|
COMMON_SETTING_TYPE.IS_HIDE,
|
|
204
205
|
// COMMON_SETTING_TYPE.MULTIPLE,
|
|
205
206
|
COMMON_SETTING_TYPE.IS_HIDE_CAPTION,
|
|
206
|
-
COMMON_SETTING_TYPE.IS_SHOW_CAPTION_TIP
|
|
207
|
+
COMMON_SETTING_TYPE.IS_SHOW_CAPTION_TIP,
|
|
208
|
+
COMMON_SETTING_TYPE.IS_INTERNATIONAL
|
|
207
209
|
]
|
|
208
210
|
},
|
|
209
211
|
{
|
|
@@ -92,6 +92,7 @@ var DatePickerProperty = /*#__PURE__*/ function(BaseControlProperty) {
|
|
|
92
92
|
// public multiple: boolean // 允许选中多个日期
|
|
93
93
|
_define_property(_this, "allowDateRange", void 0 // 允许选中多个日期范围
|
|
94
94
|
), _define_property(_this, "filterWeekend", void 0 // 是否过滤周末
|
|
95
|
+
), _define_property(_this, "isInternational", void 0 //是否国际化
|
|
95
96
|
);
|
|
96
97
|
var _props_dateType;
|
|
97
98
|
_this.dateType = (_props_dateType = props === null || props === void 0 ? void 0 : props.dateType) !== null && _props_dateType !== void 0 ? _props_dateType : DateType.DATE;
|
|
@@ -119,6 +120,8 @@ var DatePickerProperty = /*#__PURE__*/ function(BaseControlProperty) {
|
|
|
119
120
|
];
|
|
120
121
|
var _props_filterWeekend;
|
|
121
122
|
_this.filterWeekend = (_props_filterWeekend = props === null || props === void 0 ? void 0 : props.filterWeekend) !== null && _props_filterWeekend !== void 0 ? _props_filterWeekend : false;
|
|
123
|
+
var _props_isInternational;
|
|
124
|
+
_this.isInternational = (_props_isInternational = props === null || props === void 0 ? void 0 : props.isInternational) !== null && _props_isInternational !== void 0 ? _props_isInternational : false;
|
|
122
125
|
return _this;
|
|
123
126
|
}
|
|
124
127
|
return DatePickerProperty;
|
|
@@ -129,8 +129,9 @@ var DateRangeControl = /*#__PURE__*/ function(DesignerFormControl) {
|
|
|
129
129
|
value: function toDataBindModel(parentId) {
|
|
130
130
|
var dataBindModel = _get(_get_prototype_of(DateRangeControl.prototype), "toDataBindModel", this).call(this, parentId);
|
|
131
131
|
if (dataBindModel && !Array.isArray(dataBindModel)) {
|
|
132
|
-
var
|
|
132
|
+
var _this_props = this.props, dateType = _this_props.dateType, isInternational = _this_props.isInternational;
|
|
133
133
|
dataBindModel.props.dateType = dateType;
|
|
134
|
+
dataBindModel.props.isInternational = isInternational;
|
|
134
135
|
}
|
|
135
136
|
return dataBindModel;
|
|
136
137
|
}
|
|
@@ -202,7 +203,8 @@ _define_property(DateRangeControl, "setting", [
|
|
|
202
203
|
COMMON_SETTING_TYPE.REQUIRED,
|
|
203
204
|
COMMON_SETTING_TYPE.IS_HIDE,
|
|
204
205
|
COMMON_SETTING_TYPE.IS_HIDE_CAPTION,
|
|
205
|
-
COMMON_SETTING_TYPE.IS_SHOW_CAPTION_TIP
|
|
206
|
+
COMMON_SETTING_TYPE.IS_SHOW_CAPTION_TIP,
|
|
207
|
+
COMMON_SETTING_TYPE.IS_INTERNATIONAL
|
|
206
208
|
]
|
|
207
209
|
},
|
|
208
210
|
{
|
|
@@ -162,7 +162,8 @@ var DateRangePropertyRuntimeRules = /*#__PURE__*/ function(BaseControlPropertyRu
|
|
|
162
162
|
* 日期限制范围
|
|
163
163
|
* @defaultValue []
|
|
164
164
|
* @public
|
|
165
|
-
*/ _define_property(_this, "limitDateList", void 0)
|
|
165
|
+
*/ _define_property(_this, "limitDateList", void 0), _define_property(_this, "isInternational", void 0 //是否国际化
|
|
166
|
+
);
|
|
166
167
|
_this.dataBind = new RangeDataBind(props === null || props === void 0 ? void 0 : props.dataBind);
|
|
167
168
|
_this.defaultValue = new RangeDateValue(props === null || props === void 0 ? void 0 : props.defaultValue);
|
|
168
169
|
var _props_dateType;
|
|
@@ -187,6 +188,8 @@ var DateRangePropertyRuntimeRules = /*#__PURE__*/ function(BaseControlPropertyRu
|
|
|
187
188
|
_this.limitDateList = (_props_limitDateList_map = props === null || props === void 0 ? void 0 : (_props_limitDateList = props.limitDateList) === null || _props_limitDateList === void 0 ? void 0 : _props_limitDateList.map(function(item) {
|
|
188
189
|
return new LimitDate(item);
|
|
189
190
|
})) !== null && _props_limitDateList_map !== void 0 ? _props_limitDateList_map : [];
|
|
191
|
+
var _props_isInternational;
|
|
192
|
+
_this.isInternational = (_props_isInternational = props === null || props === void 0 ? void 0 : props.isInternational) !== null && _props_isInternational !== void 0 ? _props_isInternational : false;
|
|
190
193
|
return _this;
|
|
191
194
|
}
|
|
192
195
|
return DateRangeProperty;
|
|
@@ -92,6 +92,7 @@ function _is_native_reflect_construct() {
|
|
|
92
92
|
}
|
|
93
93
|
import { getLocaleText } from '@byteluck-fe/locale-message';
|
|
94
94
|
import { DesignerAttachmentControl } from '../Attachment';
|
|
95
|
+
import { ImageProperty } from './property';
|
|
95
96
|
import { COMMON_SETTING_TYPE } from '@byteluck-fe/model-driven-core';
|
|
96
97
|
import { FieldTypes } from '@byteluck-fe/model-driven-shared';
|
|
97
98
|
var ImageControl = /*#__PURE__*/ function(DesignerAttachmentControl) {
|
|
@@ -100,15 +101,10 @@ var ImageControl = /*#__PURE__*/ function(DesignerAttachmentControl) {
|
|
|
100
101
|
function ImageControl(props) {
|
|
101
102
|
_class_call_check(this, ImageControl);
|
|
102
103
|
var _this;
|
|
103
|
-
var _props_props, _props_props1;
|
|
104
104
|
_this = _call_super(this, ImageControl, [
|
|
105
105
|
props
|
|
106
|
-
]);
|
|
107
|
-
_this.props
|
|
108
|
-
var _props_props_caption;
|
|
109
|
-
_this.props.caption = (_props_props_caption = props === null || props === void 0 ? void 0 : (_props_props = props.props) === null || _props_props === void 0 ? void 0 : _props_props.caption) !== null && _props_props_caption !== void 0 ? _props_props_caption : ImageControl.controlName;
|
|
110
|
-
var _props_props_placeholder;
|
|
111
|
-
_this.props.placeholder = (_props_props_placeholder = props === null || props === void 0 ? void 0 : (_props_props1 = props.props) === null || _props_props1 === void 0 ? void 0 : _props_props1.placeholder) !== null && _props_props_placeholder !== void 0 ? _props_props_placeholder : getLocaleText('CMD.uploadImg', null, '上传图片');
|
|
106
|
+
]), _define_property(_this, "props", void 0);
|
|
107
|
+
_this.props = new ImageProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
112
108
|
return _this;
|
|
113
109
|
}
|
|
114
110
|
_create_class(ImageControl, null, [
|
|
@@ -171,11 +167,7 @@ _define_property(ImageControl, "setting", [
|
|
|
171
167
|
]
|
|
172
168
|
},
|
|
173
169
|
{
|
|
174
|
-
key: '
|
|
175
|
-
visible: true
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
key: 'attachment-storage',
|
|
170
|
+
key: 'compression-setting',
|
|
179
171
|
visible: true
|
|
180
172
|
},
|
|
181
173
|
{
|
|
@@ -19,6 +19,19 @@ function _class_call_check(instance, Constructor) {
|
|
|
19
19
|
throw new TypeError("Cannot call a class as a function");
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
function _define_property(obj, key, value) {
|
|
23
|
+
if (key in obj) {
|
|
24
|
+
Object.defineProperty(obj, key, {
|
|
25
|
+
value: value,
|
|
26
|
+
enumerable: true,
|
|
27
|
+
configurable: true,
|
|
28
|
+
writable: true
|
|
29
|
+
});
|
|
30
|
+
} else {
|
|
31
|
+
obj[key] = value;
|
|
32
|
+
}
|
|
33
|
+
return obj;
|
|
34
|
+
}
|
|
22
35
|
function _get_prototype_of(o) {
|
|
23
36
|
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
24
37
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
@@ -63,15 +76,36 @@ function _is_native_reflect_construct() {
|
|
|
63
76
|
return !!result;
|
|
64
77
|
})();
|
|
65
78
|
}
|
|
79
|
+
import { getLocaleText } from '@byteluck-fe/locale-message';
|
|
66
80
|
import { AttachmentProperty } from '../Attachment';
|
|
81
|
+
import { ImageCompressType } from '../../framework';
|
|
82
|
+
import ImageControl from './designer';
|
|
67
83
|
var ImageProperty = /*#__PURE__*/ function(AttachmentProperty) {
|
|
68
84
|
"use strict";
|
|
69
85
|
_inherits(ImageProperty, AttachmentProperty);
|
|
70
86
|
function ImageProperty(props) {
|
|
71
87
|
_class_call_check(this, ImageProperty);
|
|
72
|
-
|
|
88
|
+
var _this;
|
|
89
|
+
_this = _call_super(this, ImageProperty, [
|
|
73
90
|
props
|
|
74
|
-
]);
|
|
91
|
+
]), _define_property(_this, "compressTypeCode", void 0), _define_property(_this, "compressRatio", void 0), _define_property(_this, "maxPixel", void 0);
|
|
92
|
+
_this.showType = 'image';
|
|
93
|
+
var _props_maxLimit;
|
|
94
|
+
_this.maxLimit = (_props_maxLimit = props === null || props === void 0 ? void 0 : props.maxLimit) !== null && _props_maxLimit !== void 0 ? _props_maxLimit : 10;
|
|
95
|
+
var _props_caption, _ref;
|
|
96
|
+
_this.caption = (_ref = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : ImageControl.controlName) !== null && _ref !== void 0 ? _ref : getLocaleText('CMD.image', null, '图片');
|
|
97
|
+
var _props_placeholder;
|
|
98
|
+
_this.placeholder = (_props_placeholder = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _props_placeholder !== void 0 ? _props_placeholder : getLocaleText('CMD.uploadImg', null, '上传图片');
|
|
99
|
+
var _props_compressTypeCode;
|
|
100
|
+
_this.compressTypeCode = (_props_compressTypeCode = props === null || props === void 0 ? void 0 : props.compressTypeCode) !== null && _props_compressTypeCode !== void 0 ? _props_compressTypeCode : ImageCompressType.NO_COMPRESS // 默认不压缩
|
|
101
|
+
;
|
|
102
|
+
var _props_compressRatio;
|
|
103
|
+
_this.compressRatio = (_props_compressRatio = props === null || props === void 0 ? void 0 : props.compressRatio) !== null && _props_compressRatio !== void 0 ? _props_compressRatio : 1 // 默认压缩比例1
|
|
104
|
+
;
|
|
105
|
+
var _props_maxPixel;
|
|
106
|
+
_this.maxPixel = (_props_maxPixel = props === null || props === void 0 ? void 0 : props.maxPixel) !== null && _props_maxPixel !== void 0 ? _props_maxPixel : 1080 // 默认最大像素1080
|
|
107
|
+
;
|
|
108
|
+
return _this;
|
|
75
109
|
}
|
|
76
110
|
return ImageProperty;
|
|
77
111
|
}(AttachmentProperty);
|
|
@@ -27,6 +27,19 @@ function _create_class(Constructor, protoProps, staticProps) {
|
|
|
27
27
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
28
28
|
return Constructor;
|
|
29
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
|
+
}
|
|
30
43
|
function _get_prototype_of(o) {
|
|
31
44
|
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
32
45
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
@@ -72,24 +85,17 @@ function _is_native_reflect_construct() {
|
|
|
72
85
|
})();
|
|
73
86
|
}
|
|
74
87
|
import { RuntimeAttachmentControl } from '../Attachment';
|
|
75
|
-
import {
|
|
88
|
+
import { ImageProperty } from './property';
|
|
76
89
|
var ImageControl = /*#__PURE__*/ function(RuntimeAttachmentControl) {
|
|
77
90
|
"use strict";
|
|
78
91
|
_inherits(ImageControl, RuntimeAttachmentControl);
|
|
79
92
|
function ImageControl(props) {
|
|
80
93
|
_class_call_check(this, ImageControl);
|
|
81
94
|
var _this;
|
|
82
|
-
var _props_props, _props_props1, _props_props2;
|
|
83
95
|
_this = _call_super(this, ImageControl, [
|
|
84
96
|
props
|
|
85
|
-
]);
|
|
86
|
-
_this.props
|
|
87
|
-
var _props_props_maxLimit;
|
|
88
|
-
_this.props.maxLimit = (_props_props_maxLimit = props === null || props === void 0 ? void 0 : (_props_props = props.props) === null || _props_props === void 0 ? void 0 : _props_props.maxLimit) !== null && _props_props_maxLimit !== void 0 ? _props_props_maxLimit : 9;
|
|
89
|
-
var _props_props_caption;
|
|
90
|
-
_this.props.caption = (_props_props_caption = props === null || props === void 0 ? void 0 : (_props_props1 = props.props) === null || _props_props1 === void 0 ? void 0 : _props_props1.caption) !== null && _props_props_caption !== void 0 ? _props_props_caption : getLocaleText('CMD.image', null, '图片');
|
|
91
|
-
var _props_props_placeholder;
|
|
92
|
-
_this.props.placeholder = (_props_props_placeholder = props === null || props === void 0 ? void 0 : (_props_props2 = props.props) === null || _props_props2 === void 0 ? void 0 : _props_props2.placeholder) !== null && _props_props_placeholder !== void 0 ? _props_props_placeholder : getLocaleText('CMD.uploadImg', null, '上传图片');
|
|
97
|
+
]), _define_property(_this, "props", void 0);
|
|
98
|
+
_this.props = new ImageProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
93
99
|
return _this;
|
|
94
100
|
}
|
|
95
101
|
_create_class(ImageControl, null, [
|
|
@@ -138,7 +138,7 @@ var NumberControlPropertyRuntimeRules = /*#__PURE__*/ function(BaseControlProper
|
|
|
138
138
|
message: getLocaleText(max === undefined ? 'CMD.pleaseEnterAValueGreaterThanMin' : min === undefined ? 'CMD.pleaseEnterAValueLessThanMax' : 'CMD.pleaseEnterNumberRange', {
|
|
139
139
|
max: max,
|
|
140
140
|
min: min
|
|
141
|
-
}, max === undefined ? getLocaleText('CMD.
|
|
141
|
+
}, max === undefined ? getLocaleText('CMD.16921751712133509') : min === undefined ? getLocaleText('CMD.f0231751712135569') : getLocaleText('CMD.78ab1751712129046'))
|
|
142
142
|
});
|
|
143
143
|
if (props.regularRules.expression && props.regularRules.errMessage) {
|
|
144
144
|
_this.push({
|
|
@@ -161,7 +161,7 @@ var OrganizationSelectionControl = /*#__PURE__*/ function(DesignerFormControl) {
|
|
|
161
161
|
return [
|
|
162
162
|
{
|
|
163
163
|
key: 'displayBoList',
|
|
164
|
-
name: getLocaleText('CMD.
|
|
164
|
+
name: getLocaleText('CMD.895a1751712162322'),
|
|
165
165
|
required: true
|
|
166
166
|
}
|
|
167
167
|
];
|
|
@@ -125,12 +125,12 @@ var TreeControl = /*#__PURE__*/ function(DesignerFormControl) {
|
|
|
125
125
|
return [
|
|
126
126
|
{
|
|
127
127
|
key: 'displayBoList',
|
|
128
|
-
name: getLocaleText('CMD.
|
|
128
|
+
name: getLocaleText('CMD.6cb51751712162323'),
|
|
129
129
|
required: true
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
132
|
key: 'parentField',
|
|
133
|
-
name: getLocaleText('CMD.
|
|
133
|
+
name: getLocaleText('CMD.33ee1751712159752'),
|
|
134
134
|
required: true
|
|
135
135
|
}
|
|
136
136
|
];
|
package/dist/esm/framework.js
CHANGED
|
@@ -446,3 +446,11 @@ export var FlexStyleConfig = function FlexStyleConfig(props) {
|
|
|
446
446
|
InternalType["ADMIN"] = "admin";
|
|
447
447
|
return InternalType;
|
|
448
448
|
}({});
|
|
449
|
+
/**
|
|
450
|
+
* 图片压缩类型
|
|
451
|
+
*/ export var ImageCompressType = /*#__PURE__*/ function(ImageCompressType) {
|
|
452
|
+
ImageCompressType["NO_COMPRESS"] = "0";
|
|
453
|
+
ImageCompressType["RATIO_COMPRESS"] = "1";
|
|
454
|
+
ImageCompressType["PIXEL_COMPRESS"] = "2";
|
|
455
|
+
return ImageCompressType;
|
|
456
|
+
}({});
|
|
@@ -30,7 +30,7 @@ export default defineInstance({
|
|
|
30
30
|
groups: [
|
|
31
31
|
{
|
|
32
32
|
type: 'tab',
|
|
33
|
-
title: getLocaleText('CMD.
|
|
33
|
+
title: getLocaleText('CMD.ed651751712165076'),
|
|
34
34
|
items: [
|
|
35
35
|
{
|
|
36
36
|
items: [
|
|
@@ -46,10 +46,10 @@ export default defineInstance({
|
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
type: 'tab',
|
|
49
|
-
title: getLocaleText('CMD.
|
|
49
|
+
title: getLocaleText('CMD.12741751712166176'),
|
|
50
50
|
items: [
|
|
51
51
|
{
|
|
52
|
-
title: getLocaleText('CMD.
|
|
52
|
+
title: getLocaleText('CMD.acab1751712167281'),
|
|
53
53
|
items: [
|
|
54
54
|
'style.width',
|
|
55
55
|
'style.height'
|
|
@@ -88,7 +88,7 @@ var GridTableColumnControl = /*#__PURE__*/ function(DesignerLayoutControl) {
|
|
|
88
88
|
}
|
|
89
89
|
return GridTableColumnControl;
|
|
90
90
|
}(DesignerLayoutControl);
|
|
91
|
-
_define_property(GridTableColumnControl, "controlName", getLocaleText('CMD.
|
|
91
|
+
_define_property(GridTableColumnControl, "controlName", getLocaleText('CMD.8ba01751712155518'));
|
|
92
92
|
_define_property(GridTableColumnControl, "controlType", 'gridtable-column');
|
|
93
93
|
_define_property(GridTableColumnControl, "controlIcon", 'gridtable-column');
|
|
94
94
|
_define_property(GridTableColumnControl, "childrenMaxLength", 1);
|
|
@@ -31,7 +31,7 @@ export default defineInstance({
|
|
|
31
31
|
key: 'hideHeader',
|
|
32
32
|
type: 'boolean',
|
|
33
33
|
component: 'switch',
|
|
34
|
-
label: getLocaleText('CMD.
|
|
34
|
+
label: getLocaleText('CMD.53f31751712152595')
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
key: 'size',
|
|
@@ -45,7 +45,7 @@ export default defineInstance({
|
|
|
45
45
|
groups: [
|
|
46
46
|
{
|
|
47
47
|
type: 'tab',
|
|
48
|
-
title: getLocaleText('CMD.
|
|
48
|
+
title: getLocaleText('CMD.86031751712165077'),
|
|
49
49
|
items: [
|
|
50
50
|
{
|
|
51
51
|
items: [
|
|
@@ -61,16 +61,16 @@ export default defineInstance({
|
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
type: 'tab',
|
|
64
|
-
title: getLocaleText('CMD.
|
|
64
|
+
title: getLocaleText('CMD.89071751712166177'),
|
|
65
65
|
items: [
|
|
66
66
|
{
|
|
67
|
-
title: getLocaleText('CMD.
|
|
67
|
+
title: getLocaleText('CMD.363f1751712167282'),
|
|
68
68
|
items: [
|
|
69
69
|
'size'
|
|
70
70
|
]
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
|
-
title: getLocaleText('CMD.
|
|
73
|
+
title: getLocaleText('CMD.ebf11751712161036'),
|
|
74
74
|
items: [
|
|
75
75
|
'background'
|
|
76
76
|
]
|
|
@@ -30,7 +30,7 @@ export default defineInstance({
|
|
|
30
30
|
groups: [
|
|
31
31
|
{
|
|
32
32
|
type: 'tab',
|
|
33
|
-
title: getLocaleText('CMD.
|
|
33
|
+
title: getLocaleText('CMD.6f161751712165078'),
|
|
34
34
|
items: [
|
|
35
35
|
{
|
|
36
36
|
items: [
|
|
@@ -46,10 +46,10 @@ export default defineInstance({
|
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
type: 'tab',
|
|
49
|
-
title: getLocaleText('CMD.
|
|
49
|
+
title: getLocaleText('CMD.3aa21751712166178'),
|
|
50
50
|
items: [
|
|
51
51
|
{
|
|
52
|
-
title: getLocaleText('CMD.
|
|
52
|
+
title: getLocaleText('CMD.888d1751712167283'),
|
|
53
53
|
items: [
|
|
54
54
|
'style.width',
|
|
55
55
|
'style.height'
|