@byteluck-fe/model-driven-controls 2.23.0-beta.23 → 2.23.0-beta.23-zt

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.
Files changed (38) hide show
  1. package/dist/esm/baseControls/Text/designer.js +4 -0
  2. package/dist/esm/baseControls/Text/property.js +3 -1
  3. package/dist/esm/baseControls/Title/designer.js +9 -4
  4. package/dist/esm/baseControls/Title/property.js +2 -5
  5. package/dist/esm/columnControls/DecimalColumn/property.js +32 -32
  6. package/dist/esm/columnControls/SignatureColumn/designer.js +120 -0
  7. package/dist/esm/columnControls/SignatureColumn/index.js +11 -0
  8. package/dist/esm/columnControls/SignatureColumn/property.js +78 -0
  9. package/dist/esm/columnControls/SignatureColumn/runtime.js +93 -0
  10. package/dist/esm/columnControls/SignatureColumn/types.js +0 -0
  11. package/dist/esm/columnControls/index.js +1 -0
  12. package/dist/esm/formControls/Department2/designer.js +1 -1
  13. package/dist/esm/formControls/Employee/property.js +1 -1
  14. package/dist/esm/formControls/Employee2/designer.js +1 -1
  15. package/dist/esm/formControls/Employee2/property.js +1 -1
  16. package/dist/esm/formControls/HandSignature/designer.js +157 -0
  17. package/dist/esm/formControls/HandSignature/index.js +11 -0
  18. package/dist/esm/formControls/HandSignature/property.js +132 -0
  19. package/dist/esm/formControls/HandSignature/runtime.js +114 -0
  20. package/dist/esm/formControls/HandSignature/types.js +0 -0
  21. package/dist/esm/formControls/index.js +1 -0
  22. package/dist/index.umd.js +1 -1
  23. package/dist/types/baseControls/Text/property.d.ts +1 -0
  24. package/dist/types/baseControls/Title/property.d.ts +0 -1
  25. package/dist/types/columnControls/SignatureColumn/designer.d.ts +14 -0
  26. package/dist/types/columnControls/SignatureColumn/index.d.ts +12 -0
  27. package/dist/types/columnControls/SignatureColumn/property.d.ts +6 -0
  28. package/dist/types/columnControls/SignatureColumn/runtime.d.ts +12 -0
  29. package/dist/types/columnControls/SignatureColumn/types.d.ts +0 -0
  30. package/dist/types/columnControls/index.d.ts +1 -0
  31. package/dist/types/formControls/HandSignature/designer.d.ts +14 -0
  32. package/dist/types/formControls/HandSignature/index.d.ts +12 -0
  33. package/dist/types/formControls/HandSignature/property.d.ts +19 -0
  34. package/dist/types/formControls/HandSignature/runtime.d.ts +12 -0
  35. package/dist/types/formControls/HandSignature/types.d.ts +0 -0
  36. package/dist/types/formControls/index.d.ts +1 -0
  37. package/dist/types/type.d.ts +4 -2
  38. package/package.json +5 -5
@@ -0,0 +1,11 @@
1
+ import Designer from './designer';
2
+ import Runtime from './runtime';
3
+ import Property from './property';
4
+ export default {
5
+ Designer: Designer,
6
+ Runtime: Runtime,
7
+ Property: Property
8
+ };
9
+ export * from './designer';
10
+ export * from './runtime';
11
+ export * from './property';
@@ -0,0 +1,132 @@
1
+ function _assert_this_initialized(self) {
2
+ if (self === void 0) {
3
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4
+ }
5
+ return self;
6
+ }
7
+ function _call_super(_this, derived, args) {
8
+ derived = _get_prototype_of(derived);
9
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
10
+ }
11
+ function _class_call_check(instance, Constructor) {
12
+ if (!(instance instanceof Constructor)) {
13
+ throw new TypeError("Cannot call a class as a function");
14
+ }
15
+ }
16
+ function _define_property(obj, key, value) {
17
+ if (key in obj) {
18
+ Object.defineProperty(obj, key, {
19
+ value: value,
20
+ enumerable: true,
21
+ configurable: true,
22
+ writable: true
23
+ });
24
+ } else {
25
+ obj[key] = value;
26
+ }
27
+ return obj;
28
+ }
29
+ function _get_prototype_of(o) {
30
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
31
+ return o.__proto__ || Object.getPrototypeOf(o);
32
+ };
33
+ return _get_prototype_of(o);
34
+ }
35
+ function _inherits(subClass, superClass) {
36
+ if (typeof superClass !== "function" && superClass !== null) {
37
+ throw new TypeError("Super expression must either be null or a function");
38
+ }
39
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
40
+ constructor: {
41
+ value: subClass,
42
+ writable: true,
43
+ configurable: true
44
+ }
45
+ });
46
+ if (superClass) _set_prototype_of(subClass, superClass);
47
+ }
48
+ function _possible_constructor_return(self, call) {
49
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
50
+ return call;
51
+ }
52
+ return _assert_this_initialized(self);
53
+ }
54
+ function _set_prototype_of(o, p) {
55
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
56
+ o.__proto__ = p;
57
+ return o;
58
+ };
59
+ return _set_prototype_of(o, p);
60
+ }
61
+ function _type_of(obj) {
62
+ "@swc/helpers - typeof";
63
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
64
+ }
65
+ function _is_native_reflect_construct() {
66
+ try {
67
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
68
+ } catch (_) {}
69
+ return (_is_native_reflect_construct = function() {
70
+ return !!result;
71
+ })();
72
+ }
73
+ import { BaseControlProperty, BaseControlPropertyRules, BaseControlPropertyRuntimeRules } from '@byteluck-fe/model-driven-core';
74
+ import { DesignerHandSignatureControl } from './designer';
75
+ var HandSignaturePropertyRules = /*#__PURE__*/ function(BaseControlPropertyRules) {
76
+ "use strict";
77
+ _inherits(HandSignaturePropertyRules, BaseControlPropertyRules);
78
+ function HandSignaturePropertyRules(props) {
79
+ _class_call_check(this, HandSignaturePropertyRules);
80
+ return _call_super(this, HandSignaturePropertyRules, [
81
+ props
82
+ ]);
83
+ }
84
+ return HandSignaturePropertyRules;
85
+ }(BaseControlPropertyRules);
86
+ var HandSignatureControlPropertyRuntimeRules = /*#__PURE__*/ function(BaseControlPropertyRuntimeRules) {
87
+ "use strict";
88
+ _inherits(HandSignatureControlPropertyRuntimeRules, BaseControlPropertyRuntimeRules);
89
+ function HandSignatureControlPropertyRuntimeRules(props) {
90
+ _class_call_check(this, HandSignatureControlPropertyRuntimeRules);
91
+ var _this;
92
+ _this = _call_super(this, HandSignatureControlPropertyRuntimeRules, [
93
+ props
94
+ ]);
95
+ _this[0].type = 'array';
96
+ return _this;
97
+ }
98
+ return HandSignatureControlPropertyRuntimeRules;
99
+ }(BaseControlPropertyRuntimeRules);
100
+ var HandSignatureProperty = /*#__PURE__*/ function(BaseControlProperty) {
101
+ "use strict";
102
+ _inherits(HandSignatureProperty, BaseControlProperty);
103
+ function HandSignatureProperty(props) {
104
+ _class_call_check(this, HandSignatureProperty);
105
+ var _this;
106
+ _this = _call_super(this, HandSignatureProperty, [
107
+ props
108
+ ]), //minWidth:一条线的最小宽度,默认值是0.5
109
+ //maxWidth: 一条线的最大宽度,默认值是2.5
110
+ _define_property(_this, "minWidth", void 0), _define_property(_this, "maxWidth", void 0), _define_property(_this, "backgroundColor", void 0), _define_property(_this, "penColor", void 0), _define_property(_this, "labelPosition", void 0);
111
+ var _props_minWidth;
112
+ _this.minWidth = (_props_minWidth = props === null || props === void 0 ? void 0 : props.minWidth) !== null && _props_minWidth !== void 0 ? _props_minWidth : 0.5;
113
+ var _props_maxWidth;
114
+ _this.maxWidth = (_props_maxWidth = props === null || props === void 0 ? void 0 : props.maxWidth) !== null && _props_maxWidth !== void 0 ? _props_maxWidth : 2.5;
115
+ var _props_backgroundColor;
116
+ _this.backgroundColor = (_props_backgroundColor = props === null || props === void 0 ? void 0 : props.backgroundColor) !== null && _props_backgroundColor !== void 0 ? _props_backgroundColor : 'rgba(0,0,0,0)';
117
+ var _props_penColor;
118
+ _this.penColor = (_props_penColor = props === null || props === void 0 ? void 0 : props.penColor) !== null && _props_penColor !== void 0 ? _props_penColor : 'black';
119
+ var _props_labelPosition;
120
+ _this.labelPosition = (_props_labelPosition = props === null || props === void 0 ? void 0 : props.labelPosition) !== null && _props_labelPosition !== void 0 ? _props_labelPosition : 'top';
121
+ var _props_caption;
122
+ _this.caption = (_props_caption = props === null || props === void 0 ? void 0 : props.caption) !== null && _props_caption !== void 0 ? _props_caption : DesignerHandSignatureControl.controlName;
123
+ var _props_defaultValue;
124
+ _this.defaultValue = (_props_defaultValue = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : [];
125
+ return _this;
126
+ }
127
+ return HandSignatureProperty;
128
+ }(BaseControlProperty);
129
+ _define_property(HandSignatureProperty, "Rules", HandSignaturePropertyRules);
130
+ _define_property(HandSignatureProperty, "RuntimeRules", HandSignatureControlPropertyRuntimeRules);
131
+ export default HandSignatureProperty;
132
+ export { HandSignatureProperty };
@@ -0,0 +1,114 @@
1
+ function _assert_this_initialized(self) {
2
+ if (self === void 0) {
3
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4
+ }
5
+ return self;
6
+ }
7
+ function _call_super(_this, derived, args) {
8
+ derived = _get_prototype_of(derived);
9
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
10
+ }
11
+ function _class_call_check(instance, Constructor) {
12
+ if (!(instance instanceof Constructor)) {
13
+ throw new TypeError("Cannot call a class as a function");
14
+ }
15
+ }
16
+ function _defineProperties(target, props) {
17
+ for(var i = 0; i < props.length; i++){
18
+ var descriptor = props[i];
19
+ descriptor.enumerable = descriptor.enumerable || false;
20
+ descriptor.configurable = true;
21
+ if ("value" in descriptor) descriptor.writable = true;
22
+ Object.defineProperty(target, descriptor.key, descriptor);
23
+ }
24
+ }
25
+ function _create_class(Constructor, protoProps, staticProps) {
26
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
27
+ if (staticProps) _defineProperties(Constructor, staticProps);
28
+ return Constructor;
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
+ }
43
+ function _get_prototype_of(o) {
44
+ _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
45
+ return o.__proto__ || Object.getPrototypeOf(o);
46
+ };
47
+ return _get_prototype_of(o);
48
+ }
49
+ function _inherits(subClass, superClass) {
50
+ if (typeof superClass !== "function" && superClass !== null) {
51
+ throw new TypeError("Super expression must either be null or a function");
52
+ }
53
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
54
+ constructor: {
55
+ value: subClass,
56
+ writable: true,
57
+ configurable: true
58
+ }
59
+ });
60
+ if (superClass) _set_prototype_of(subClass, superClass);
61
+ }
62
+ function _possible_constructor_return(self, call) {
63
+ if (call && (_type_of(call) === "object" || typeof call === "function")) {
64
+ return call;
65
+ }
66
+ return _assert_this_initialized(self);
67
+ }
68
+ function _set_prototype_of(o, p) {
69
+ _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
70
+ o.__proto__ = p;
71
+ return o;
72
+ };
73
+ return _set_prototype_of(o, p);
74
+ }
75
+ function _type_of(obj) {
76
+ "@swc/helpers - typeof";
77
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
78
+ }
79
+ function _is_native_reflect_construct() {
80
+ try {
81
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
82
+ } catch (_) {}
83
+ return (_is_native_reflect_construct = function() {
84
+ return !!result;
85
+ })();
86
+ }
87
+ import { RuntimeFormControl } from '@byteluck-fe/model-driven-core';
88
+ import HandSignatureProperty from './property';
89
+ import { FieldTypes } from '@byteluck-fe/model-driven-shared';
90
+ var HandSignatureControl = /*#__PURE__*/ function(RuntimeFormControl) {
91
+ "use strict";
92
+ _inherits(HandSignatureControl, RuntimeFormControl);
93
+ function HandSignatureControl(props) {
94
+ _class_call_check(this, HandSignatureControl);
95
+ var _this;
96
+ _this = _call_super(this, HandSignatureControl, [
97
+ props
98
+ ]), _define_property(_this, "props", void 0);
99
+ _this.props = new HandSignatureProperty(props === null || props === void 0 ? void 0 : props.props);
100
+ return _this;
101
+ }
102
+ _create_class(HandSignatureControl, null, [
103
+ {
104
+ key: "controlType",
105
+ get: function get() {
106
+ return 'signature';
107
+ }
108
+ }
109
+ ]);
110
+ return HandSignatureControl;
111
+ }(RuntimeFormControl);
112
+ _define_property(HandSignatureControl, "controlFieldType", FieldTypes.SIGNATURE);
113
+ export default HandSignatureControl;
114
+ export { HandSignatureControl as RuntimeHandSignatureControl };
File without changes
@@ -24,6 +24,7 @@ export { default as SelectRelation } from './SelectRelation';
24
24
  export { default as SearchInput } from './SearchInput';
25
25
  export { default as Tree } from './Tree';
26
26
  export { default as Employee2 } from './Employee2';
27
+ export { default as HandSignature } from './HandSignature';
27
28
  export { default as ElectronicSignature } from './ElectronicSignature';
28
29
  export { default as WPS } from './WPS';
29
30
  export { default as Department2 } from './Department2';