@byteluck-fe/model-driven-controls 2.22.4-beta.10 → 2.22.4-beta.13
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/columnControls/TimescopeColumn/property.js +4 -1
- package/dist/esm/columnControls/TimestampColumn/property.js +4 -1
- package/dist/esm/formControls/DatePicker/designer.js +2 -1
- package/dist/esm/formControls/DatePicker/property.js +3 -0
- package/dist/esm/formControls/DateRange/designer.js +2 -1
- package/dist/esm/formControls/DateRange/property.js +4 -1
- package/dist/esm/formControls/Image/designer.js +7 -7
- package/dist/esm/formControls/Image/property.js +36 -2
- package/dist/esm/formControls/Image/runtime.js +16 -10
- package/dist/esm/framework.js +8 -0
- package/dist/index.umd.js +1 -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/package.json +4 -4
|
@@ -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;
|
|
@@ -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;
|
|
@@ -203,7 +203,8 @@ _define_property(DatePickerControl, "setting", [
|
|
|
203
203
|
COMMON_SETTING_TYPE.IS_HIDE,
|
|
204
204
|
// COMMON_SETTING_TYPE.MULTIPLE,
|
|
205
205
|
COMMON_SETTING_TYPE.IS_HIDE_CAPTION,
|
|
206
|
-
COMMON_SETTING_TYPE.IS_SHOW_CAPTION_TIP
|
|
206
|
+
COMMON_SETTING_TYPE.IS_SHOW_CAPTION_TIP,
|
|
207
|
+
COMMON_SETTING_TYPE.IS_INTERNATIONAL
|
|
207
208
|
]
|
|
208
209
|
},
|
|
209
210
|
{
|
|
@@ -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;
|
|
@@ -202,7 +202,8 @@ _define_property(DateRangeControl, "setting", [
|
|
|
202
202
|
COMMON_SETTING_TYPE.REQUIRED,
|
|
203
203
|
COMMON_SETTING_TYPE.IS_HIDE,
|
|
204
204
|
COMMON_SETTING_TYPE.IS_HIDE_CAPTION,
|
|
205
|
-
COMMON_SETTING_TYPE.IS_SHOW_CAPTION_TIP
|
|
205
|
+
COMMON_SETTING_TYPE.IS_SHOW_CAPTION_TIP,
|
|
206
|
+
COMMON_SETTING_TYPE.IS_INTERNATIONAL
|
|
206
207
|
]
|
|
207
208
|
},
|
|
208
209
|
{
|
|
@@ -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, [
|
|
@@ -170,6 +166,10 @@ _define_property(ImageControl, "setting", [
|
|
|
170
166
|
COMMON_SETTING_TYPE.IS_SHOW_WATERMARK
|
|
171
167
|
]
|
|
172
168
|
},
|
|
169
|
+
{
|
|
170
|
+
key: 'compression-setting',
|
|
171
|
+
visible: true
|
|
172
|
+
},
|
|
173
173
|
{
|
|
174
174
|
key: 'attachment-limit',
|
|
175
175
|
visible: true
|
|
@@ -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 : 9;
|
|
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, [
|
package/dist/esm/framework.js
CHANGED
|
@@ -390,3 +390,11 @@ export var FlexStyleConfig = function FlexStyleConfig(props) {
|
|
|
390
390
|
InternalType["ADMIN"] = "admin";
|
|
391
391
|
return InternalType;
|
|
392
392
|
}({});
|
|
393
|
+
/**
|
|
394
|
+
* 图片压缩类型
|
|
395
|
+
*/ export var ImageCompressType = /*#__PURE__*/ function(ImageCompressType) {
|
|
396
|
+
ImageCompressType["NO_COMPRESS"] = "0";
|
|
397
|
+
ImageCompressType["RATIO_COMPRESS"] = "1";
|
|
398
|
+
ImageCompressType["PIXEL_COMPRESS"] = "2";
|
|
399
|
+
return ImageCompressType;
|
|
400
|
+
}({});
|