@byteluck-fe/model-driven-controls 2.8.1-alpha.14 → 2.8.1-alpha.16
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/formControls/VueFormItem/designer.js +5 -1
- package/dist/esm/listControls/GridTable/designer.js +27 -1
- package/dist/esm/searchControls/SimpleSearch/designer.js +3 -0
- package/dist/index.umd.js +1 -1
- package/dist/types/formControls/VueFormItem/designer.d.ts +1 -0
- package/dist/types/listControls/GridTable/designer.d.ts +5 -0
- package/dist/types/searchControls/SimpleSearch/designer.d.ts +3 -0
- package/package.json +2 -2
|
@@ -98,7 +98,7 @@ function _create_super(Derived) {
|
|
|
98
98
|
}
|
|
99
99
|
import { DesignerFormControl, COMMON_SETTING_TYPE } from "@byteluck-fe/model-driven-core";
|
|
100
100
|
import VueFormItemProperty from "./property";
|
|
101
|
-
import { FieldTypes } from "@byteluck-fe/model-driven-shared";
|
|
101
|
+
import { DESIGNER_SLOT, FieldTypes } from "@byteluck-fe/model-driven-shared";
|
|
102
102
|
var VueFormItemControl = /*#__PURE__*/ function(DesignerFormControl) {
|
|
103
103
|
"use strict";
|
|
104
104
|
_inherits(VueFormItemControl, DesignerFormControl);
|
|
@@ -135,6 +135,10 @@ var VueFormItemControl = /*#__PURE__*/ function(DesignerFormControl) {
|
|
|
135
135
|
}(DesignerFormControl);
|
|
136
136
|
_define_property(VueFormItemControl, "controlFieldType", FieldTypes.ANY);
|
|
137
137
|
_define_property(VueFormItemControl, "controlEventKeys", []);
|
|
138
|
+
_define_property(VueFormItemControl, "slots", [
|
|
139
|
+
"grid-table-toolbar-slot",
|
|
140
|
+
DESIGNER_SLOT.DEFAULT
|
|
141
|
+
]);
|
|
138
142
|
_define_property(VueFormItemControl, "setting", [
|
|
139
143
|
{
|
|
140
144
|
key: "data-bind-vue",
|
|
@@ -100,6 +100,13 @@ function _inherits(subClass, superClass) {
|
|
|
100
100
|
});
|
|
101
101
|
if (superClass) _set_prototype_of(subClass, superClass);
|
|
102
102
|
}
|
|
103
|
+
function _instanceof(left, right) {
|
|
104
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
105
|
+
return !!right[Symbol.hasInstance](left);
|
|
106
|
+
} else {
|
|
107
|
+
return left instanceof right;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
103
110
|
function _object_spread(target) {
|
|
104
111
|
for(var i = 1; i < arguments.length; i++){
|
|
105
112
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -286,7 +293,9 @@ import { GridTableControlProperty } from "./property";
|
|
|
286
293
|
import { DesignerListControl, defineControlArrayToProperty } from "@byteluck-fe/model-driven-core";
|
|
287
294
|
import { DesignerOrderColumnControl } from "../../columnControls/OrderColumn";
|
|
288
295
|
import { DesignerOperationColumnControl } from "../../columnControls/OperationColumn";
|
|
289
|
-
|
|
296
|
+
import { JSONCopy } from "@byteluck-fe/model-driven-shared";
|
|
297
|
+
var CHILDREN_MAX_LENGTH = 10000;
|
|
298
|
+
var GridTableControl = /*#__PURE__*/ function _target(DesignerListControl) {
|
|
290
299
|
"use strict";
|
|
291
300
|
_inherits(GridTableControl, DesignerListControl);
|
|
292
301
|
var _super = _create_super(GridTableControl);
|
|
@@ -297,6 +306,9 @@ var GridTableControl = /*#__PURE__*/ function(DesignerListControl) {
|
|
|
297
306
|
_this = _super.call(this, props);
|
|
298
307
|
_define_property(_assert_this_initialized(_this), "props", void 0);
|
|
299
308
|
_define_property(_assert_this_initialized(_this), "children", void 0);
|
|
309
|
+
_define_property(_assert_this_initialized(_this), "excludes", void 0);
|
|
310
|
+
_define_property(_assert_this_initialized(_this), "childrenMaxLength", void 0);
|
|
311
|
+
var _ref = _instanceof(this, GridTableControl) ? this.constructor : void 0, excludes = _ref.excludes, childrenMaxLength = _ref.childrenMaxLength;
|
|
300
312
|
_this.props = new GridTableControlProperty(_assert_this_initialized(_this), props === null || props === void 0 ? void 0 : props.props);
|
|
301
313
|
defineControlArrayToProperty(_assert_this_initialized(_this), "children", props === null || props === void 0 ? void 0 : props.children, undefined, "Designer");
|
|
302
314
|
if ((props === null || props === void 0 ? void 0 : props.props.headers) === undefined) {
|
|
@@ -308,9 +320,21 @@ var GridTableControl = /*#__PURE__*/ function(DesignerListControl) {
|
|
|
308
320
|
if ((props === null || props === void 0 ? void 0 : (_props_props = props.props) === null || _props_props === void 0 ? void 0 : _props_props.footers) === undefined) {
|
|
309
321
|
_this.props.footers = [];
|
|
310
322
|
}
|
|
323
|
+
_this.excludes = JSONCopy(excludes);
|
|
324
|
+
_this.childrenMaxLength = childrenMaxLength;
|
|
311
325
|
return _this;
|
|
312
326
|
}
|
|
313
327
|
_create_class(GridTableControl, [
|
|
328
|
+
{
|
|
329
|
+
key: "judgeJoinChildren",
|
|
330
|
+
value: function judgeJoinChildren(type) {
|
|
331
|
+
var canJoin = this.excludes === false || Array.isArray(this.excludes) && !this.excludes.includes(type);
|
|
332
|
+
if (canJoin) {
|
|
333
|
+
return this.childrenMaxLength > this.children.length;
|
|
334
|
+
}
|
|
335
|
+
return canJoin;
|
|
336
|
+
}
|
|
337
|
+
},
|
|
314
338
|
{
|
|
315
339
|
key: "toSchema",
|
|
316
340
|
value: function toSchema() {
|
|
@@ -393,5 +417,7 @@ _define_property(GridTableControl, "setting", [
|
|
|
393
417
|
visible: true
|
|
394
418
|
}
|
|
395
419
|
]);
|
|
420
|
+
_define_property(GridTableControl, "excludes", []);
|
|
421
|
+
_define_property(GridTableControl, "childrenMaxLength", CHILDREN_MAX_LENGTH);
|
|
396
422
|
export default GridTableControl;
|
|
397
423
|
export { GridTableControl as DesignerGridTableControl };
|
|
@@ -99,6 +99,9 @@ var SimpleSearchControl = /*#__PURE__*/ function(DesignerSearchControl) {
|
|
|
99
99
|
return SimpleSearchControl;
|
|
100
100
|
}(DesignerSearchControl);
|
|
101
101
|
_define_property(SimpleSearchControl, "controlType", "simple-search");
|
|
102
|
+
_define_property(SimpleSearchControl, "slotPosition", {
|
|
103
|
+
default: "search"
|
|
104
|
+
});
|
|
102
105
|
_define_property(SimpleSearchControl, "setting", [
|
|
103
106
|
{
|
|
104
107
|
key: "grid-child-min-width",
|