@progress/kendo-vue-inputs 3.7.4-dev.202301120847 → 3.7.4-dev.202301131104
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/cdn/js/kendo-vue-inputs.js +1 -1
- package/dist/es/input/Input.d.ts +12 -3
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/signature/Signature.js +88 -130
- package/dist/es/signature/SignatureBottomActions.d.ts +42 -0
- package/dist/es/signature/SignatureBottomActions.js +70 -0
- package/dist/es/signature/SignatureCanvas.js +1 -0
- package/dist/es/signature/SignatureDialog.d.ts +51 -0
- package/dist/es/signature/SignatureDialog.js +281 -0
- package/dist/es/signature/SignatureLine.d.ts +39 -0
- package/dist/es/signature/SignatureLine.js +30 -0
- package/dist/es/signature/interfaces/SignatureCanvasProps.d.ts +1 -0
- package/dist/es/textarea/interfaces/TextAreaProps.d.ts +10 -0
- package/dist/esm/input/Input.d.ts +12 -3
- package/dist/esm/package-metadata.js +1 -1
- package/dist/esm/signature/Signature.js +88 -130
- package/dist/esm/signature/SignatureBottomActions.d.ts +42 -0
- package/dist/esm/signature/SignatureBottomActions.js +70 -0
- package/dist/esm/signature/SignatureCanvas.js +1 -0
- package/dist/esm/signature/SignatureDialog.d.ts +51 -0
- package/dist/esm/signature/SignatureDialog.js +281 -0
- package/dist/esm/signature/SignatureLine.d.ts +39 -0
- package/dist/esm/signature/SignatureLine.js +30 -0
- package/dist/esm/signature/interfaces/SignatureCanvasProps.d.ts +1 -0
- package/dist/esm/textarea/interfaces/TextAreaProps.d.ts +10 -0
- package/dist/npm/input/Input.d.ts +12 -3
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/signature/Signature.js +86 -128
- package/dist/npm/signature/SignatureBottomActions.d.ts +42 -0
- package/dist/npm/signature/SignatureBottomActions.js +77 -0
- package/dist/npm/signature/SignatureCanvas.js +1 -0
- package/dist/npm/signature/SignatureDialog.d.ts +51 -0
- package/dist/npm/signature/SignatureDialog.js +288 -0
- package/dist/npm/signature/SignatureLine.d.ts +39 -0
- package/dist/npm/signature/SignatureLine.js +37 -0
- package/dist/npm/signature/interfaces/SignatureCanvasProps.d.ts +1 -0
- package/dist/npm/textarea/interfaces/TextAreaProps.d.ts +10 -0
- package/package.json +13 -13
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import * as Vue from 'vue';
|
|
3
|
+
var allVue = Vue;
|
|
4
|
+
var gh = allVue.h;
|
|
5
|
+
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
6
|
+
import { Dialog } from '@progress/kendo-vue-dialogs';
|
|
7
|
+
import { SignatureBottomActions } from './SignatureBottomActions';
|
|
8
|
+
import { SignatureLine } from './SignatureLine';
|
|
9
|
+
import { Button } from '@progress/kendo-vue-buttons';
|
|
10
|
+
import { provideLocalizationService } from '@progress/kendo-vue-intl';
|
|
11
|
+
import { setRef } from '@progress/kendo-vue-common';
|
|
12
|
+
import { hyperlinkOpenIcon } from '@progress/kendo-svg-icons';
|
|
13
|
+
import { SignatureCanvas } from './SignatureCanvas';
|
|
14
|
+
import { messages, signatureClear, signatureMinimize } from '../messages/main';
|
|
15
|
+
/**
|
|
16
|
+
* @hidden
|
|
17
|
+
*/
|
|
18
|
+
var SignatureDialogVue2 = {
|
|
19
|
+
name: 'KendoSignatureDialog',
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
emits: {
|
|
22
|
+
change: null,
|
|
23
|
+
clear: null,
|
|
24
|
+
close: null,
|
|
25
|
+
focus: null,
|
|
26
|
+
blur: null,
|
|
27
|
+
overlayclick: null
|
|
28
|
+
},
|
|
29
|
+
props: {
|
|
30
|
+
openWrapperClass: Object,
|
|
31
|
+
size: String,
|
|
32
|
+
dir: String,
|
|
33
|
+
popupWidth: Number,
|
|
34
|
+
popupHeight: Number,
|
|
35
|
+
showClear: Boolean,
|
|
36
|
+
strokeWidth: Number,
|
|
37
|
+
popupScale: Number,
|
|
38
|
+
scale: Number,
|
|
39
|
+
value: String,
|
|
40
|
+
tabIndex: Number,
|
|
41
|
+
disabled: Boolean,
|
|
42
|
+
readOnly: Boolean,
|
|
43
|
+
color: String,
|
|
44
|
+
backgroundColor: String,
|
|
45
|
+
elementSize: Function,
|
|
46
|
+
smooth: Boolean
|
|
47
|
+
},
|
|
48
|
+
inject: {
|
|
49
|
+
kendoLocalizationService: {
|
|
50
|
+
default: null
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
// @ts-ignore
|
|
54
|
+
setup: !isV3 ? undefined : function () {
|
|
55
|
+
var v3 = !!isV3;
|
|
56
|
+
return {
|
|
57
|
+
v3: v3
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
// @ts-ignore
|
|
61
|
+
render: function render(createElement) {
|
|
62
|
+
var _this = this;
|
|
63
|
+
var h = gh || createElement;
|
|
64
|
+
var _a = this.$props,
|
|
65
|
+
showClear = _a.showClear,
|
|
66
|
+
popupWidth = _a.popupWidth,
|
|
67
|
+
popupHeight = _a.popupHeight,
|
|
68
|
+
dir = _a.dir,
|
|
69
|
+
size = _a.size,
|
|
70
|
+
value = _a.value,
|
|
71
|
+
tabIndex = _a.tabIndex,
|
|
72
|
+
disabled = _a.disabled,
|
|
73
|
+
readOnly = _a.readOnly,
|
|
74
|
+
color = _a.color,
|
|
75
|
+
backgroundColor = _a.backgroundColor,
|
|
76
|
+
strokeWidth = _a.strokeWidth,
|
|
77
|
+
smooth = _a.smooth,
|
|
78
|
+
popupScale = _a.popupScale,
|
|
79
|
+
scale = _a.scale,
|
|
80
|
+
elementSize = _a.elementSize;
|
|
81
|
+
var ls = provideLocalizationService(this);
|
|
82
|
+
var minimizeTitle = ls.toLanguageString(signatureMinimize, messages[signatureMinimize]);
|
|
83
|
+
var clearTitle = ls.toLanguageString(signatureClear, messages[signatureClear]);
|
|
84
|
+
var hideLine = !this.$props.hideLine && h(SignatureLine);
|
|
85
|
+
var bottomActions = h(SignatureBottomActions, {
|
|
86
|
+
showClear: showClear,
|
|
87
|
+
attrs: this.v3 ? undefined : {
|
|
88
|
+
showClear: showClear,
|
|
89
|
+
size: size,
|
|
90
|
+
title: clearTitle
|
|
91
|
+
},
|
|
92
|
+
size: size,
|
|
93
|
+
onClear: this.onClear,
|
|
94
|
+
on: this.v3 ? undefined : {
|
|
95
|
+
"clear": this.onClear
|
|
96
|
+
},
|
|
97
|
+
title: clearTitle
|
|
98
|
+
});
|
|
99
|
+
var dialog =
|
|
100
|
+
// @ts-ignore function children
|
|
101
|
+
h(Dialog, {
|
|
102
|
+
ref: setRef(this, 'dialog'),
|
|
103
|
+
onOverlayclick: this.onOverlayClick,
|
|
104
|
+
on: this.v3 ? undefined : {
|
|
105
|
+
"overlayclick": this.onOverlayClick
|
|
106
|
+
}
|
|
107
|
+
}, this.v3 ? function () {
|
|
108
|
+
return [h("div", {
|
|
109
|
+
style: {
|
|
110
|
+
width: popupWidth + 'px',
|
|
111
|
+
height: popupHeight + 'px'
|
|
112
|
+
},
|
|
113
|
+
dir: dir,
|
|
114
|
+
attrs: _this.v3 ? undefined : {
|
|
115
|
+
dir: dir
|
|
116
|
+
},
|
|
117
|
+
"class": _this.openWrapperClass,
|
|
118
|
+
onFocus: _this.onFocus,
|
|
119
|
+
on: _this.v3 ? undefined : {
|
|
120
|
+
"focus": _this.onFocus,
|
|
121
|
+
"blur": _this.onBlur
|
|
122
|
+
},
|
|
123
|
+
onBlur: _this.onBlur
|
|
124
|
+
}, [h(SignatureCanvas, {
|
|
125
|
+
ref: setRef(_this, 'openCanvas'),
|
|
126
|
+
value: value,
|
|
127
|
+
attrs: _this.v3 ? undefined : {
|
|
128
|
+
value: value,
|
|
129
|
+
tabIndex: tabIndex,
|
|
130
|
+
disabled: disabled,
|
|
131
|
+
readOnly: readOnly,
|
|
132
|
+
color: color,
|
|
133
|
+
backgroundColor: backgroundColor,
|
|
134
|
+
strokeWidth: strokeWidth,
|
|
135
|
+
smooth: smooth,
|
|
136
|
+
popupScale: popupScale,
|
|
137
|
+
scale: scale,
|
|
138
|
+
elementSize: elementSize
|
|
139
|
+
},
|
|
140
|
+
tabIndex: tabIndex,
|
|
141
|
+
disabled: disabled,
|
|
142
|
+
readOnly: readOnly,
|
|
143
|
+
color: color,
|
|
144
|
+
backgroundColor: backgroundColor,
|
|
145
|
+
strokeWidth: strokeWidth,
|
|
146
|
+
smooth: smooth,
|
|
147
|
+
popupScale: popupScale,
|
|
148
|
+
scale: scale,
|
|
149
|
+
onChange: _this.onValueChange,
|
|
150
|
+
on: _this.v3 ? undefined : {
|
|
151
|
+
"change": _this.onValueChange
|
|
152
|
+
},
|
|
153
|
+
elementSize: elementSize
|
|
154
|
+
}), h("div", {
|
|
155
|
+
"class": 'k-signature-actions k-signature-actions-top'
|
|
156
|
+
}, [
|
|
157
|
+
// @ts-ignore
|
|
158
|
+
h(Button, {
|
|
159
|
+
"class": 'k-signature-action k-signature-minimize k-rotate-180',
|
|
160
|
+
ref: setRef(_this, 'minimizeButton'),
|
|
161
|
+
icon: 'hyperlink-open',
|
|
162
|
+
attrs: _this.v3 ? undefined : {
|
|
163
|
+
icon: 'hyperlink-open',
|
|
164
|
+
svgIcon: hyperlinkOpenIcon,
|
|
165
|
+
shape: null,
|
|
166
|
+
fillMode: 'flat',
|
|
167
|
+
size: _this.$props.size,
|
|
168
|
+
"aria-label": minimizeTitle,
|
|
169
|
+
title: minimizeTitle
|
|
170
|
+
},
|
|
171
|
+
svgIcon: hyperlinkOpenIcon,
|
|
172
|
+
shape: null,
|
|
173
|
+
fillMode: 'flat',
|
|
174
|
+
size: _this.$props.size,
|
|
175
|
+
onClick: _this.onMinimizeClick,
|
|
176
|
+
on: _this.v3 ? undefined : {
|
|
177
|
+
"click": _this.onMinimizeClick
|
|
178
|
+
},
|
|
179
|
+
"aria-label": minimizeTitle,
|
|
180
|
+
title: minimizeTitle
|
|
181
|
+
})]), hideLine, bottomActions])];
|
|
182
|
+
} : [h("div", {
|
|
183
|
+
style: {
|
|
184
|
+
width: popupWidth + 'px',
|
|
185
|
+
height: popupHeight + 'px'
|
|
186
|
+
},
|
|
187
|
+
dir: dir,
|
|
188
|
+
attrs: _this.v3 ? undefined : {
|
|
189
|
+
dir: dir
|
|
190
|
+
},
|
|
191
|
+
"class": _this.openWrapperClass,
|
|
192
|
+
onFocus: _this.onFocus,
|
|
193
|
+
on: _this.v3 ? undefined : {
|
|
194
|
+
"focus": _this.onFocus,
|
|
195
|
+
"blur": _this.onBlur
|
|
196
|
+
},
|
|
197
|
+
onBlur: _this.onBlur
|
|
198
|
+
}, [h(SignatureCanvas, {
|
|
199
|
+
ref: setRef(_this, 'openCanvas'),
|
|
200
|
+
value: value,
|
|
201
|
+
attrs: _this.v3 ? undefined : {
|
|
202
|
+
value: value,
|
|
203
|
+
tabIndex: tabIndex,
|
|
204
|
+
disabled: disabled,
|
|
205
|
+
readOnly: readOnly,
|
|
206
|
+
color: color,
|
|
207
|
+
backgroundColor: backgroundColor,
|
|
208
|
+
strokeWidth: strokeWidth,
|
|
209
|
+
smooth: smooth,
|
|
210
|
+
popupScale: popupScale,
|
|
211
|
+
scale: scale,
|
|
212
|
+
elementSize: elementSize
|
|
213
|
+
},
|
|
214
|
+
tabIndex: tabIndex,
|
|
215
|
+
disabled: disabled,
|
|
216
|
+
readOnly: readOnly,
|
|
217
|
+
color: color,
|
|
218
|
+
backgroundColor: backgroundColor,
|
|
219
|
+
strokeWidth: strokeWidth,
|
|
220
|
+
smooth: smooth,
|
|
221
|
+
popupScale: popupScale,
|
|
222
|
+
scale: scale,
|
|
223
|
+
onChange: _this.onValueChange,
|
|
224
|
+
on: _this.v3 ? undefined : {
|
|
225
|
+
"change": _this.onValueChange
|
|
226
|
+
},
|
|
227
|
+
elementSize: elementSize
|
|
228
|
+
}), h("div", {
|
|
229
|
+
"class": 'k-signature-actions k-signature-actions-top'
|
|
230
|
+
}, [h(Button, {
|
|
231
|
+
"class": 'k-signature-action k-signature-minimize k-rotate-180',
|
|
232
|
+
ref: setRef(_this, 'minimizeButton'),
|
|
233
|
+
icon: 'hyperlink-open',
|
|
234
|
+
attrs: _this.v3 ? undefined : {
|
|
235
|
+
icon: 'hyperlink-open',
|
|
236
|
+
svgIcon: hyperlinkOpenIcon,
|
|
237
|
+
shape: null,
|
|
238
|
+
fillMode: 'flat',
|
|
239
|
+
size: _this.$props.size,
|
|
240
|
+
"aria-label": minimizeTitle,
|
|
241
|
+
title: minimizeTitle
|
|
242
|
+
},
|
|
243
|
+
svgIcon: hyperlinkOpenIcon,
|
|
244
|
+
shape: null,
|
|
245
|
+
fillMode: 'flat',
|
|
246
|
+
size: _this.$props.size,
|
|
247
|
+
onClick: _this.onMinimizeClick,
|
|
248
|
+
on: _this.v3 ? undefined : {
|
|
249
|
+
"click": _this.onMinimizeClick
|
|
250
|
+
},
|
|
251
|
+
"aria-label": minimizeTitle,
|
|
252
|
+
title: minimizeTitle
|
|
253
|
+
})]), hideLine, bottomActions])]);
|
|
254
|
+
return dialog;
|
|
255
|
+
},
|
|
256
|
+
methods: {
|
|
257
|
+
onValueChange: function onValueChange(nextValue) {
|
|
258
|
+
this.$emit('change', nextValue);
|
|
259
|
+
},
|
|
260
|
+
onClear: function onClear() {
|
|
261
|
+
this.$emit('clear');
|
|
262
|
+
},
|
|
263
|
+
onMinimizeClick: function onMinimizeClick() {
|
|
264
|
+
this.$emit('close');
|
|
265
|
+
},
|
|
266
|
+
onFocus: function onFocus(e) {
|
|
267
|
+
this.$emit('focus', e);
|
|
268
|
+
},
|
|
269
|
+
onBlur: function onBlur(e) {
|
|
270
|
+
this.$emit('blur', e);
|
|
271
|
+
},
|
|
272
|
+
onOverlayClick: function onOverlayClick(e) {
|
|
273
|
+
this.$emit('overlayclick', e);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
/**
|
|
278
|
+
* @hidden
|
|
279
|
+
*/
|
|
280
|
+
var SignatureDialog = SignatureDialogVue2;
|
|
281
|
+
export { SignatureDialog, SignatureDialogVue2 };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
2
|
+
declare type DefaultData<V> = object | ((this: V) => {});
|
|
3
|
+
declare type DefaultMethods<V> = {
|
|
4
|
+
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
export interface SignatureLineState {
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @hidden
|
|
13
|
+
*/
|
|
14
|
+
export interface SignatureLineComputed {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
export interface SignatureLineMethods {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
element: () => HTMLSpanElement | null;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @hidden
|
|
26
|
+
*/
|
|
27
|
+
export interface SignatureLineData {
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @hidden
|
|
31
|
+
*/
|
|
32
|
+
export interface SignatureLineAll extends Vue2type, SignatureLineMethods, SignatureLineData, SignatureLineComputed, SignatureLineState {
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @hidden
|
|
36
|
+
*/
|
|
37
|
+
declare let SignatureLineVue2: ComponentOptions<SignatureLineAll, DefaultData<SignatureLineData>, DefaultMethods<SignatureLineAll>, SignatureLineComputed, RecordPropsDefinition<{}>>;
|
|
38
|
+
declare const SignatureLine: DefineComponent<{}, any, SignatureLineData, SignatureLineComputed, SignatureLineMethods, {}, {}, {}, string, {}, {}, {}>;
|
|
39
|
+
export { SignatureLine, SignatureLineVue2 };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import * as Vue from 'vue';
|
|
3
|
+
var allVue = Vue;
|
|
4
|
+
var gh = allVue.h;
|
|
5
|
+
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
var SignatureLineVue2 = {
|
|
10
|
+
name: 'KendoSignatureLine',
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
setup: !isV3 ? undefined : function () {
|
|
13
|
+
var v3 = !!isV3;
|
|
14
|
+
return {
|
|
15
|
+
v3: v3
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
render: function render(createElement) {
|
|
19
|
+
var h = gh || createElement;
|
|
20
|
+
return h("div", {
|
|
21
|
+
"class": 'k-signature-line',
|
|
22
|
+
style: {
|
|
23
|
+
zIndex: 2,
|
|
24
|
+
pointerEvents: 'none'
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var SignatureLine = SignatureLineVue2;
|
|
30
|
+
export { SignatureLine, SignatureLineVue2 };
|
|
@@ -21,6 +21,16 @@ export interface TextAreaProps extends FormComponentProps {
|
|
|
21
21
|
* Identifies the title of the TextArea component.
|
|
22
22
|
*/
|
|
23
23
|
title?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Defines the built-in [minlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/minlength) property of the text inputs.
|
|
26
|
+
* * As the property is directly passed to the internal [input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input) element, when defining it, it should be written as it is - `minlength`. Camel-case and kebap-case won't work in this scenario.
|
|
27
|
+
*/
|
|
28
|
+
minlength?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Defines the built-in [maxlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/maxlength) property of the text inputs.
|
|
31
|
+
* * As the property is directly passed to the internal [input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input) element, when defining it, it should be written as it is - `maxlength`. Camel-case and kebap-case won't work in this scenario.
|
|
32
|
+
*/
|
|
33
|
+
maxlength?: string;
|
|
24
34
|
/**
|
|
25
35
|
* Specifies if the textarea element will resize its height automatically ([see example]({% slug sizing_textarea %})).
|
|
26
36
|
* Defaults to `false`.
|
|
@@ -126,14 +126,23 @@ export interface InputProps extends FormComponentProps {
|
|
|
126
126
|
*/
|
|
127
127
|
inputClass?: String;
|
|
128
128
|
/**
|
|
129
|
-
* Identifies the element(s) which will
|
|
130
|
-
* For example these elements could contain error or hint message.
|
|
129
|
+
* Identifies the element(s) which will label the component.
|
|
131
130
|
*/
|
|
132
131
|
ariaDescribedBy?: string;
|
|
133
132
|
/**
|
|
134
|
-
*
|
|
133
|
+
* Defines a string value that labels an interactive element.
|
|
135
134
|
*/
|
|
136
135
|
ariaLabelledBy?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Defines the built-in [minlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/minlength) property of the text inputs.
|
|
138
|
+
* * As the property is directly passed to the internal [input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input) element, when defining it, it should be written as it is - `minlength`. Camel-case and kebap-case won't work in this scenario.
|
|
139
|
+
*/
|
|
140
|
+
minlength?: string;
|
|
141
|
+
/**
|
|
142
|
+
* Defines the built-in [maxlength](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/maxlength) property of the text inputs.
|
|
143
|
+
* * As the property is directly passed to the internal [input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input) element, when defining it, it should be written as it is - `maxlength`. Camel-case and kebap-case won't work in this scenario.
|
|
144
|
+
*/
|
|
145
|
+
maxlength?: string;
|
|
137
146
|
}
|
|
138
147
|
/**
|
|
139
148
|
* @hidden
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-vue-inputs',
|
|
6
6
|
productName: 'Kendo UI for Vue',
|
|
7
7
|
productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1673606827,
|
|
9
9
|
version: '',
|
|
10
10
|
licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
|
|
11
11
|
};
|
|
@@ -135,13 +135,15 @@ var isV3 = allVue.version && allVue.version[0] === '3';
|
|
|
135
135
|
var ref = allVue.ref;
|
|
136
136
|
import { Button } from '@progress/kendo-vue-buttons';
|
|
137
137
|
import { kendoThemeMaps, setRef, getRef, validatePackage } from '@progress/kendo-vue-common';
|
|
138
|
-
import {
|
|
138
|
+
import { SignatureDialog } from './SignatureDialog.js';
|
|
139
|
+
import { SignatureBottomActions } from './SignatureBottomActions.js';
|
|
140
|
+
import { SignatureLine } from './SignatureLine.js';
|
|
139
141
|
import { provideLocalizationService } from '@progress/kendo-vue-intl';
|
|
140
|
-
import { messages, signatureClear, signatureMaximize
|
|
142
|
+
import { messages, signatureClear, signatureMaximize } from '../messages/main.js';
|
|
141
143
|
import { packageMetadata } from '../package-metadata.js';
|
|
142
144
|
import { SignatureCanvas } from './SignatureCanvas.js';
|
|
143
145
|
import { hasParent } from './utils.js';
|
|
144
|
-
import { hyperlinkOpenIcon
|
|
146
|
+
import { hyperlinkOpenIcon } from '@progress/kendo-svg-icons';
|
|
145
147
|
var DEFAULT_WIDTH = 250;
|
|
146
148
|
var DEFAULT_HEIGHT = 84;
|
|
147
149
|
var DEFAULT_POPUP_SCALE = 3;
|
|
@@ -304,48 +306,13 @@ var SignatureVue2 = {
|
|
|
304
306
|
};
|
|
305
307
|
},
|
|
306
308
|
render: function render(createElement) {
|
|
307
|
-
var _this = this;
|
|
308
309
|
var h = gh || createElement;
|
|
309
310
|
var ls = provideLocalizationService(this);
|
|
310
311
|
var showMaximize = !(this.computedOpen || this.isDrawing || !this.$props.maximizable || this.$props.disabled);
|
|
311
|
-
var showMinimize = this.computedOpen && !this.isDrawing;
|
|
312
312
|
var isEmpty = !this.computedValue;
|
|
313
313
|
var showClear = !(isEmpty || this.isDrawing || this.$props.readOnly || this.$props.disabled);
|
|
314
314
|
var maximizeTitle = ls.toLanguageString(signatureMaximize, messages[signatureMaximize]);
|
|
315
|
-
var minimizeTitle = ls.toLanguageString(signatureMinimize, messages[signatureMinimize]);
|
|
316
315
|
var clearTitle = ls.toLanguageString(signatureClear, messages[signatureClear]);
|
|
317
|
-
var renderCanvas = function renderCanvas(refName) {
|
|
318
|
-
return h(SignatureCanvas, {
|
|
319
|
-
ref: setRef(this, refName),
|
|
320
|
-
value: this.computedValue,
|
|
321
|
-
attrs: this.v3 ? undefined : {
|
|
322
|
-
value: this.computedValue,
|
|
323
|
-
tabIndex: this.tabIndex,
|
|
324
|
-
disabled: this.disabled,
|
|
325
|
-
color: this.computedColor,
|
|
326
|
-
backgroundColor: this.computedBgColor,
|
|
327
|
-
strokeWidth: this.strokeWidth,
|
|
328
|
-
smooth: this.smooth,
|
|
329
|
-
popupScale: refName === 'openCanvas' ? this.$props.popupScale : 1,
|
|
330
|
-
scale: refName === 'openCanvas' ? 1 / this.popupScale * this.exportScale : this.exportScale,
|
|
331
|
-
elementSize: this.elementSize
|
|
332
|
-
},
|
|
333
|
-
tabIndex: this.tabIndex,
|
|
334
|
-
disabled: this.disabled,
|
|
335
|
-
color: this.computedColor,
|
|
336
|
-
backgroundColor: this.computedBgColor,
|
|
337
|
-
strokeWidth: this.strokeWidth,
|
|
338
|
-
smooth: this.smooth,
|
|
339
|
-
popupScale: refName === 'openCanvas' ? this.$props.popupScale : 1,
|
|
340
|
-
scale: refName === 'openCanvas' ? 1 / this.popupScale * this.exportScale : this.exportScale,
|
|
341
|
-
onChange: this.onValueChange,
|
|
342
|
-
on: this.v3 ? undefined : {
|
|
343
|
-
"change": this.onValueChange
|
|
344
|
-
},
|
|
345
|
-
elementSize: this.elementSize
|
|
346
|
-
});
|
|
347
|
-
};
|
|
348
|
-
var canvasDiv = renderCanvas.call(this, 'canvas');
|
|
349
316
|
var actions = h("div", {
|
|
350
317
|
"class": 'k-signature-actions k-signature-actions-top'
|
|
351
318
|
}, [showMaximize &&
|
|
@@ -373,66 +340,22 @@ var SignatureVue2 = {
|
|
|
373
340
|
},
|
|
374
341
|
"aria-label": maximizeTitle,
|
|
375
342
|
title: maximizeTitle
|
|
376
|
-
}), showMinimize &&
|
|
377
|
-
// @ts-ignore
|
|
378
|
-
h(Button, {
|
|
379
|
-
"class": 'k-signature-action k-signature-minimize k-rotate-180',
|
|
380
|
-
ref: setRef(this, 'minimizeButton'),
|
|
381
|
-
icon: 'hyperlink-open',
|
|
382
|
-
attrs: this.v3 ? undefined : {
|
|
383
|
-
icon: 'hyperlink-open',
|
|
384
|
-
svgIcon: hyperlinkOpenIcon,
|
|
385
|
-
shape: null,
|
|
386
|
-
fillMode: 'flat',
|
|
387
|
-
size: this.$props.size,
|
|
388
|
-
"aria-label": minimizeTitle,
|
|
389
|
-
title: minimizeTitle
|
|
390
|
-
},
|
|
391
|
-
svgIcon: hyperlinkOpenIcon,
|
|
392
|
-
shape: null,
|
|
393
|
-
fillMode: 'flat',
|
|
394
|
-
size: this.$props.size,
|
|
395
|
-
onClick: this.onMinimizeClick,
|
|
396
|
-
on: this.v3 ? undefined : {
|
|
397
|
-
"click": this.onMinimizeClick
|
|
398
|
-
},
|
|
399
|
-
"aria-label": minimizeTitle,
|
|
400
|
-
title: minimizeTitle
|
|
401
343
|
})]);
|
|
402
|
-
var hideLine = !this.$props.hideLine && h(
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
zIndex: 2,
|
|
406
|
-
pointerEvents: 'none'
|
|
407
|
-
}
|
|
408
|
-
});
|
|
409
|
-
var bottomActions = h("div", {
|
|
410
|
-
"class": 'k-signature-actions k-signature-actions-bottom'
|
|
411
|
-
}, [showClear &&
|
|
412
|
-
// @ts-ignore
|
|
413
|
-
h(Button, {
|
|
414
|
-
"class": 'k-signature-action k-signature-clear',
|
|
415
|
-
icon: 'x',
|
|
344
|
+
var hideLine = !this.$props.hideLine && h(SignatureLine);
|
|
345
|
+
var bottomActions = h(SignatureBottomActions, {
|
|
346
|
+
showClear: showClear,
|
|
416
347
|
attrs: this.v3 ? undefined : {
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
shape: null,
|
|
420
|
-
fillMode: 'flat',
|
|
421
|
-
size: this.$props.size,
|
|
422
|
-
"aria-label": clearTitle,
|
|
348
|
+
showClear: showClear,
|
|
349
|
+
size: this.size,
|
|
423
350
|
title: clearTitle
|
|
424
351
|
},
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
fillMode: 'flat',
|
|
428
|
-
size: this.$props.size,
|
|
429
|
-
onClick: this.onClear,
|
|
352
|
+
size: this.size,
|
|
353
|
+
onClear: this.onClear,
|
|
430
354
|
on: this.v3 ? undefined : {
|
|
431
|
-
"
|
|
355
|
+
"clear": this.onClear
|
|
432
356
|
},
|
|
433
|
-
"aria-label": clearTitle,
|
|
434
357
|
title: clearTitle
|
|
435
|
-
})
|
|
358
|
+
});
|
|
436
359
|
return h("div", {
|
|
437
360
|
dir: this.$props.dir,
|
|
438
361
|
attrs: this.v3 ? undefined : {
|
|
@@ -445,49 +368,84 @@ var SignatureVue2 = {
|
|
|
445
368
|
"blur": this.onBlur
|
|
446
369
|
},
|
|
447
370
|
onBlur: this.onBlur
|
|
448
|
-
}, [
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
371
|
+
}, [h(SignatureCanvas, {
|
|
372
|
+
ref: setRef(this, 'canvas'),
|
|
373
|
+
value: this.computedValue,
|
|
374
|
+
attrs: this.v3 ? undefined : {
|
|
375
|
+
value: this.computedValue,
|
|
376
|
+
tabIndex: this.tabIndex,
|
|
377
|
+
disabled: this.disabled,
|
|
378
|
+
readOnly: this.readOnly,
|
|
379
|
+
color: this.computedColor,
|
|
380
|
+
backgroundColor: this.computedBgColor,
|
|
381
|
+
strokeWidth: this.strokeWidth,
|
|
382
|
+
smooth: this.smooth,
|
|
383
|
+
popupScale: 1,
|
|
384
|
+
scale: this.exportScale,
|
|
385
|
+
elementSize: this.elementSize
|
|
386
|
+
},
|
|
387
|
+
tabIndex: this.tabIndex,
|
|
388
|
+
disabled: this.disabled,
|
|
389
|
+
readOnly: this.readOnly,
|
|
390
|
+
color: this.computedColor,
|
|
391
|
+
backgroundColor: this.computedBgColor,
|
|
392
|
+
strokeWidth: this.strokeWidth,
|
|
393
|
+
smooth: this.smooth,
|
|
394
|
+
popupScale: 1,
|
|
395
|
+
scale: this.exportScale,
|
|
396
|
+
onChange: this.onValueChange,
|
|
453
397
|
on: this.v3 ? undefined : {
|
|
454
|
-
"
|
|
455
|
-
}
|
|
456
|
-
}, this.v3 ? function () {
|
|
457
|
-
return [h("div", {
|
|
458
|
-
style: {
|
|
459
|
-
width: _this.popupWidth + 'px',
|
|
460
|
-
height: _this.popupHeight + 'px'
|
|
461
|
-
},
|
|
462
|
-
dir: _this.$props.dir,
|
|
463
|
-
attrs: _this.v3 ? undefined : {
|
|
464
|
-
dir: _this.$props.dir
|
|
465
|
-
},
|
|
466
|
-
"class": _this.openWrapperClass,
|
|
467
|
-
onFocus: _this.onFocus,
|
|
468
|
-
on: _this.v3 ? undefined : {
|
|
469
|
-
"focus": _this.onFocus,
|
|
470
|
-
"blur": _this.onBlur
|
|
471
|
-
},
|
|
472
|
-
onBlur: _this.onBlur
|
|
473
|
-
}, [renderCanvas.call(_this, 'openCanvas'), actions, hideLine, bottomActions])];
|
|
474
|
-
} : [h("div", {
|
|
475
|
-
style: {
|
|
476
|
-
width: _this.popupWidth + 'px',
|
|
477
|
-
height: _this.popupHeight + 'px'
|
|
398
|
+
"change": this.onValueChange
|
|
478
399
|
},
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
400
|
+
elementSize: this.elementSize
|
|
401
|
+
}), actions, hideLine, bottomActions, this.computedOpen && h(SignatureDialog, {
|
|
402
|
+
openWrapperClass: this.openWrapperClass,
|
|
403
|
+
attrs: this.v3 ? undefined : {
|
|
404
|
+
openWrapperClass: this.openWrapperClass,
|
|
405
|
+
popupWidth: this.popupWidth,
|
|
406
|
+
popupHeight: this.popupHeight,
|
|
407
|
+
showClear: showClear,
|
|
408
|
+
value: this.computedValue,
|
|
409
|
+
tabIndex: this.tabIndex,
|
|
410
|
+
disabled: this.disabled,
|
|
411
|
+
readOnly: this.readOnly,
|
|
412
|
+
color: this.computedColor,
|
|
413
|
+
backgroundColor: this.computedBgColor,
|
|
414
|
+
strokeWidth: this.strokeWidth,
|
|
415
|
+
smooth: this.smooth,
|
|
416
|
+
popupScale: this.$props.popupScale,
|
|
417
|
+
scale: 1 / this.popupScale * this.exportScale,
|
|
418
|
+
elementSize: this.elementSize
|
|
482
419
|
},
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
420
|
+
popupWidth: this.popupWidth,
|
|
421
|
+
popupHeight: this.popupHeight,
|
|
422
|
+
showClear: showClear,
|
|
423
|
+
onClose: this.onMinimizeClick,
|
|
424
|
+
on: this.v3 ? undefined : {
|
|
425
|
+
"close": this.onMinimizeClick,
|
|
426
|
+
"clear": this.onClear,
|
|
427
|
+
"overlayclick": this.onOverlayClick,
|
|
428
|
+
"focus": this.onFocus,
|
|
429
|
+
"blur": this.onBlur,
|
|
430
|
+
"change": this.onValueChange
|
|
488
431
|
},
|
|
489
|
-
|
|
490
|
-
|
|
432
|
+
onClear: this.onClear,
|
|
433
|
+
onOverlayclick: this.onOverlayClick,
|
|
434
|
+
onFocus: this.onFocus,
|
|
435
|
+
onBlur: this.onBlur,
|
|
436
|
+
value: this.computedValue,
|
|
437
|
+
tabIndex: this.tabIndex,
|
|
438
|
+
disabled: this.disabled,
|
|
439
|
+
readOnly: this.readOnly,
|
|
440
|
+
color: this.computedColor,
|
|
441
|
+
backgroundColor: this.computedBgColor,
|
|
442
|
+
strokeWidth: this.strokeWidth,
|
|
443
|
+
smooth: this.smooth,
|
|
444
|
+
popupScale: this.$props.popupScale,
|
|
445
|
+
scale: 1 / this.popupScale * this.exportScale,
|
|
446
|
+
onChange: this.onValueChange,
|
|
447
|
+
elementSize: this.elementSize
|
|
448
|
+
})]);
|
|
491
449
|
},
|
|
492
450
|
methods: {
|
|
493
451
|
onOverlayClick: function onOverlayClick() {
|