@byteluck-fe/model-driven-controls 7.0.0-props.47 → 7.0.0-props.49

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.
@@ -22,6 +22,8 @@ export { default as OperationButton } from './baseControls/OperationButton/prope
22
22
  export { default as BatchDeleteButton } from './baseControls/BatchDeleteButton/property';
23
23
  export { default as Switch } from './formControls/Switch/property';
24
24
  export { default as Tag } from './formControls/Tag/property';
25
+ export { default as Barcode } from './formControls/Barcode/property';
26
+ export { default as QrCode } from './formControls/QrCode/property';
25
27
  export { default as VarcharColumn } from './columnControls/VarcharColumn/property';
26
28
  export { default as TextColumn } from './columnControls/TextColumn/property';
27
29
  export { default as DecimalColumn } from './columnControls/DecimalColumn/property';
@@ -0,0 +1,252 @@
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 { DesignerFormControl, COMMON_SETTING_TYPE } from '@byteluck-fe/model-driven-core';
88
+ import { FieldTypes } from '@byteluck-fe/model-driven-shared';
89
+ import BarcodeProperty from './property';
90
+ import { getLocaleText } from '@byteluck-fe/locale-message';
91
+ var BarcodeControl = /*#__PURE__*/ function(DesignerFormControl) {
92
+ "use strict";
93
+ _inherits(BarcodeControl, DesignerFormControl);
94
+ function BarcodeControl(props) {
95
+ _class_call_check(this, BarcodeControl);
96
+ var _this;
97
+ _this = _call_super(this, BarcodeControl, [
98
+ props
99
+ ]), _define_property(_this, "props", void 0);
100
+ _this.props = new BarcodeProperty(props === null || props === void 0 ? void 0 : props.props);
101
+ return _this;
102
+ }
103
+ _create_class(BarcodeControl, null, [
104
+ {
105
+ key: "controlName",
106
+ get: function get() {
107
+ return getLocaleText('CMD.barcode', null, '条形码');
108
+ }
109
+ },
110
+ {
111
+ key: "controlIcon",
112
+ get: function get() {
113
+ return 'icontiaoxingma';
114
+ }
115
+ },
116
+ {
117
+ key: "controlType",
118
+ get: function get() {
119
+ return 'barcode';
120
+ }
121
+ }
122
+ ]);
123
+ return BarcodeControl;
124
+ }(DesignerFormControl);
125
+ _define_property(BarcodeControl, "controlEventKeys", [
126
+ 'on_change',
127
+ 'on_click'
128
+ ]);
129
+ _define_property(BarcodeControl, "controlFieldType", FieldTypes.VARCHAR);
130
+ _define_property(BarcodeControl, "setting", [
131
+ {
132
+ key: 'data-bind',
133
+ visible: true
134
+ },
135
+ {
136
+ key: 'field-type',
137
+ visible: true
138
+ },
139
+ {
140
+ key: 'caption',
141
+ showItems: [
142
+ COMMON_SETTING_TYPE.CAPTION,
143
+ COMMON_SETTING_TYPE.IS_HIDE_CAPTION
144
+ ],
145
+ visible: true
146
+ },
147
+ {
148
+ key: 'label-position',
149
+ visible: true
150
+ },
151
+ {
152
+ key: 'default-state',
153
+ visible: true
154
+ },
155
+ {
156
+ key: 'common-setting',
157
+ visible: true,
158
+ showItems: [
159
+ COMMON_SETTING_TYPE.REQUIRED,
160
+ COMMON_SETTING_TYPE.IS_HIDE,
161
+ COMMON_SETTING_TYPE.IS_HIDE_CAPTION,
162
+ COMMON_SETTING_TYPE.IS_SHOW_CAPTION_TIP
163
+ ]
164
+ },
165
+ {
166
+ key: 'default-value',
167
+ visible: true
168
+ },
169
+ {
170
+ key: 'common-group',
171
+ visible: true,
172
+ label: getLocaleText('CMD.propsSetting', null, '属性设置'),
173
+ children: [
174
+ {
175
+ key: 'common-input',
176
+ visible: true,
177
+ name: 'codeContent',
178
+ layout: 'horizontal',
179
+ label: getLocaleText('CMD.barcodeContent', null, '条码内容')
180
+ },
181
+ {
182
+ key: 'common-input-number',
183
+ visible: true,
184
+ name: 'codeHeight',
185
+ layout: 'horizontal',
186
+ label: getLocaleText('CMD.barcodeHeightPx', null, '条码高度(px)')
187
+ },
188
+ {
189
+ key: 'common-input-number',
190
+ visible: true,
191
+ name: 'codeWidth',
192
+ layout: 'horizontal',
193
+ label: getLocaleText('CMD.barcodeWidthPx', null, '条码宽度(px)')
194
+ },
195
+ {
196
+ key: 'common-input-number',
197
+ visible: true,
198
+ name: 'codeMargin',
199
+ layout: 'horizontal',
200
+ label: getLocaleText('CMD.barcodeMarginPx', null, '边距(px)')
201
+ }
202
+ ]
203
+ },
204
+ {
205
+ key: 'common-group',
206
+ visible: true,
207
+ label: getLocaleText('CMD.styleSetting', null, '样式设置'),
208
+ children: [
209
+ {
210
+ key: 'color',
211
+ visible: true,
212
+ name: 'backgroundColor',
213
+ layout: 'horizontal',
214
+ label: getLocaleText('CMD.backgroundColor', null, '背景色')
215
+ },
216
+ {
217
+ key: 'color',
218
+ visible: true,
219
+ name: 'barcodeColor',
220
+ layout: 'horizontal',
221
+ label: getLocaleText('CMD.barcodeColor', null, '条码颜色')
222
+ },
223
+ {
224
+ key: 'common-button-radio',
225
+ visible: true,
226
+ name: 'align',
227
+ label: getLocaleText('CMD.align', null, '对齐'),
228
+ default: 'left',
229
+ options: [
230
+ {
231
+ value: 'left',
232
+ label: getLocaleText('CMD.left', null, '左对齐')
233
+ },
234
+ {
235
+ value: 'center',
236
+ label: getLocaleText('CMD.center', null, '居中')
237
+ },
238
+ {
239
+ value: 'right',
240
+ label: getLocaleText('CMD.right', null, '右对齐')
241
+ }
242
+ ]
243
+ }
244
+ ]
245
+ },
246
+ {
247
+ key: 'super-setting',
248
+ visible: true
249
+ }
250
+ ]);
251
+ export default BarcodeControl;
252
+ export { BarcodeControl as DesignerBarcodeControl };
@@ -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,133 @@
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
+ /**
74
+ * name: rok_barcode
75
+ * description: 条形码组件,用于展示或绑定一维条码内容。支持条码尺寸、边距、前景/背景色与对齐方式配置,适合物料编码、单据号等场景。
76
+ */ import BarcodeControl from './designer';
77
+ import { BaseControlProperty, BaseControlPropertyRules, BaseControlPropertyRuntimeRules } from '@byteluck-fe/model-driven-core';
78
+ import { getLocaleText } from '@byteluck-fe/locale-message';
79
+ var BarcodePropertyRules = /*#__PURE__*/ function(BaseControlPropertyRules) {
80
+ "use strict";
81
+ _inherits(BarcodePropertyRules, BaseControlPropertyRules);
82
+ function BarcodePropertyRules(props) {
83
+ _class_call_check(this, BarcodePropertyRules);
84
+ return _call_super(this, BarcodePropertyRules, [
85
+ props
86
+ ]);
87
+ }
88
+ return BarcodePropertyRules;
89
+ }(BaseControlPropertyRules);
90
+ var BarcodePropertyRuntimeRules = /*#__PURE__*/ function(BaseControlPropertyRuntimeRules) {
91
+ "use strict";
92
+ _inherits(BarcodePropertyRuntimeRules, BaseControlPropertyRuntimeRules);
93
+ function BarcodePropertyRuntimeRules(props) {
94
+ _class_call_check(this, BarcodePropertyRuntimeRules);
95
+ var _this;
96
+ _this = _call_super(this, BarcodePropertyRuntimeRules, [
97
+ props
98
+ ]);
99
+ if (_this[0] !== undefined) {
100
+ _this[0].type = 'string';
101
+ }
102
+ return _this;
103
+ }
104
+ return BarcodePropertyRuntimeRules;
105
+ }(BaseControlPropertyRuntimeRules);
106
+ var BarcodeProperty = /*#__PURE__*/ function(BaseControlProperty) {
107
+ "use strict";
108
+ _inherits(BarcodeProperty, BaseControlProperty);
109
+ function BarcodeProperty(props) {
110
+ _class_call_check(this, BarcodeProperty);
111
+ var _this;
112
+ var _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;
113
+ _this = _call_super(this, BarcodeProperty, [
114
+ props
115
+ ]), _define_property(_this, "defaultValue", void 0), _define_property(_this, "codeContent", void 0), _define_property(_this, "codeHeight", void 0), _define_property(_this, "codeWidth", void 0), _define_property(_this, "codeMargin", void 0), _define_property(_this, "backgroundColor", void 0), _define_property(_this, "barcodeColor", void 0), _define_property(_this, "align", void 0);
116
+ _this.caption = (_ref = props === null || props === void 0 ? void 0 : props.caption) !== null && _ref !== void 0 ? _ref : BarcodeControl.controlName;
117
+ _this.placeholder = (_ref1 = props === null || props === void 0 ? void 0 : props.placeholder) !== null && _ref1 !== void 0 ? _ref1 : getLocaleText('CMD.pleaseEnter', null, '请输入');
118
+ _this.defaultValue = (_ref2 = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _ref2 !== void 0 ? _ref2 : '';
119
+ _this.codeContent = (_ref3 = props === null || props === void 0 ? void 0 : props.codeContent) !== null && _ref3 !== void 0 ? _ref3 : '';
120
+ _this.codeHeight = (_ref4 = props === null || props === void 0 ? void 0 : props.codeHeight) !== null && _ref4 !== void 0 ? _ref4 : 40;
121
+ _this.codeWidth = (_ref5 = props === null || props === void 0 ? void 0 : props.codeWidth) !== null && _ref5 !== void 0 ? _ref5 : 200;
122
+ _this.codeMargin = (_ref6 = props === null || props === void 0 ? void 0 : props.codeMargin) !== null && _ref6 !== void 0 ? _ref6 : 0;
123
+ _this.backgroundColor = (_ref7 = props === null || props === void 0 ? void 0 : props.backgroundColor) !== null && _ref7 !== void 0 ? _ref7 : '#ffffff';
124
+ _this.barcodeColor = (_ref8 = props === null || props === void 0 ? void 0 : props.barcodeColor) !== null && _ref8 !== void 0 ? _ref8 : '#000000';
125
+ _this.align = (_ref9 = props === null || props === void 0 ? void 0 : props.align) !== null && _ref9 !== void 0 ? _ref9 : 'left';
126
+ return _this;
127
+ }
128
+ return BarcodeProperty;
129
+ }(BaseControlProperty);
130
+ _define_property(BarcodeProperty, "Rules", BarcodePropertyRules);
131
+ _define_property(BarcodeProperty, "RuntimeRules", BarcodePropertyRuntimeRules);
132
+ export default BarcodeProperty;
133
+ export { BarcodeProperty, BarcodePropertyRules, BarcodePropertyRuntimeRules, };
@@ -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 { FieldTypes } from '@byteluck-fe/model-driven-shared';
89
+ import BarcodeProperty from './property';
90
+ var BarcodeControl = /*#__PURE__*/ function(RuntimeFormControl) {
91
+ "use strict";
92
+ _inherits(BarcodeControl, RuntimeFormControl);
93
+ function BarcodeControl(props) {
94
+ _class_call_check(this, BarcodeControl);
95
+ var _this;
96
+ _this = _call_super(this, BarcodeControl, [
97
+ props
98
+ ]), _define_property(_this, "props", void 0);
99
+ _this.props = new BarcodeProperty(props === null || props === void 0 ? void 0 : props.props);
100
+ return _this;
101
+ }
102
+ _create_class(BarcodeControl, null, [
103
+ {
104
+ key: "controlType",
105
+ get: function get() {
106
+ return 'barcode';
107
+ }
108
+ }
109
+ ]);
110
+ return BarcodeControl;
111
+ }(RuntimeFormControl);
112
+ _define_property(BarcodeControl, "controlFieldType", FieldTypes.VARCHAR);
113
+ export default BarcodeControl;
114
+ export { BarcodeControl as RuntimeBarcodeControl };