@byteluck-fe/model-driven-controls 4.34.0-lx3 → 4.35.0-lx1
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.
|
@@ -40,6 +40,22 @@ function _define_property(obj, key, value) {
|
|
|
40
40
|
}
|
|
41
41
|
return obj;
|
|
42
42
|
}
|
|
43
|
+
function _get(target, property, receiver) {
|
|
44
|
+
if (typeof Reflect !== "undefined" && Reflect.get) {
|
|
45
|
+
_get = Reflect.get;
|
|
46
|
+
} else {
|
|
47
|
+
_get = function get(target, property, receiver) {
|
|
48
|
+
var base = _super_prop_base(target, property);
|
|
49
|
+
if (!base) return;
|
|
50
|
+
var desc = Object.getOwnPropertyDescriptor(base, property);
|
|
51
|
+
if (desc.get) {
|
|
52
|
+
return desc.get.call(receiver || target);
|
|
53
|
+
}
|
|
54
|
+
return desc.value;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
return _get(target, property, receiver || target);
|
|
58
|
+
}
|
|
43
59
|
function _get_prototype_of(o) {
|
|
44
60
|
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
45
61
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
@@ -72,6 +88,13 @@ function _set_prototype_of(o, p) {
|
|
|
72
88
|
};
|
|
73
89
|
return _set_prototype_of(o, p);
|
|
74
90
|
}
|
|
91
|
+
function _super_prop_base(object, property) {
|
|
92
|
+
while(!Object.prototype.hasOwnProperty.call(object, property)){
|
|
93
|
+
object = _get_prototype_of(object);
|
|
94
|
+
if (object === null) break;
|
|
95
|
+
}
|
|
96
|
+
return object;
|
|
97
|
+
}
|
|
75
98
|
function _type_of(obj) {
|
|
76
99
|
"@swc/helpers - typeof";
|
|
77
100
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
@@ -99,7 +122,20 @@ var AttachmentControl = /*#__PURE__*/ function(DesignerFormControl) {
|
|
|
99
122
|
_this.props = new AttachmentProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
100
123
|
return _this;
|
|
101
124
|
}
|
|
102
|
-
_create_class(AttachmentControl,
|
|
125
|
+
_create_class(AttachmentControl, [
|
|
126
|
+
{
|
|
127
|
+
key: "toDataBindModel",
|
|
128
|
+
value: function toDataBindModel(parentId) {
|
|
129
|
+
var dataBindModel = _get(_get_prototype_of(AttachmentControl.prototype), "toDataBindModel", this).call(this, parentId);
|
|
130
|
+
if (dataBindModel && !Array.isArray(dataBindModel)) {
|
|
131
|
+
var _this_props = this.props, forbidDownload = _this_props.forbidDownload, accessControl = _this_props.accessControl;
|
|
132
|
+
dataBindModel.props.forbidDownload = forbidDownload !== null && forbidDownload !== void 0 ? forbidDownload : false;
|
|
133
|
+
dataBindModel.props.accessControl = accessControl !== null && accessControl !== void 0 ? accessControl : false;
|
|
134
|
+
}
|
|
135
|
+
return dataBindModel;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
], [
|
|
103
139
|
{
|
|
104
140
|
key: "controlName",
|
|
105
141
|
get: function get() {
|
|
@@ -93,6 +93,7 @@ function _is_native_reflect_construct() {
|
|
|
93
93
|
import { DesignerAttachmentControl } from '../Attachment';
|
|
94
94
|
import { COMMON_SETTING_TYPE } from '@byteluck-fe/model-driven-core';
|
|
95
95
|
import { FieldTypes } from '@byteluck-fe/model-driven-shared';
|
|
96
|
+
import ImageProperty from './property';
|
|
96
97
|
var ImageControl = /*#__PURE__*/ function(DesignerAttachmentControl) {
|
|
97
98
|
"use strict";
|
|
98
99
|
_inherits(ImageControl, DesignerAttachmentControl);
|
|
@@ -102,7 +103,8 @@ var ImageControl = /*#__PURE__*/ function(DesignerAttachmentControl) {
|
|
|
102
103
|
var _props_props, _props_props1;
|
|
103
104
|
_this = _call_super(this, ImageControl, [
|
|
104
105
|
props
|
|
105
|
-
]);
|
|
106
|
+
]), _define_property(_this, "props", void 0);
|
|
107
|
+
_this.props = new ImageProperty(props === null || props === void 0 ? void 0 : props.props);
|
|
106
108
|
_this.props.showType = 'image';
|
|
107
109
|
var _props_props_caption;
|
|
108
110
|
_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;
|