@everymatrix/general-input 1.27.6 → 1.27.8
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/cjs/checkbox-group-input_10.cjs.entry.js +12152 -11622
- package/dist/components/active-mixin.js +6 -6
- package/dist/components/checkbox-group-input2.js +260 -307
- package/dist/components/date-input2.js +3461 -2218
- package/dist/components/field-mixin.js +2188 -2474
- package/dist/components/input-field-shared-styles.js +308 -211
- package/dist/components/password-input2.js +119 -72
- package/dist/components/vaadin-button.js +102 -73
- package/dist/components/vaadin-combo-box.js +988 -805
- package/dist/components/virtual-keyboard-controller.js +1114 -1771
- package/dist/esm/checkbox-group-input_10.entry.js +12152 -11622
- package/dist/general-input/general-input.esm.js +1 -1
- package/dist/general-input/p-e322bf39.entry.js +3646 -0
- package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/emfe-widgets/widgets-stencil/packages/general-input/.stencil/packages/general-input/stencil.config.d.ts +2 -0
- package/package.json +1 -1
- package/dist/components/pattern-mixin.js +0 -85
- package/dist/general-input/p-de2b2f7b.entry.js +0 -3581
- package/dist/types/Users/sebastian.strulea/Documents/work/widgets-stencil/packages/general-input/.stencil/packages/general-input/stencil.config.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { y as Debouncer, z as timeOut } from './field-mixin.js';
|
|
2
|
-
import { I as InputConstraintsMixin } from './input-field-shared-styles.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @license
|
|
6
|
-
* Copyright (c) 2021 - 2022 Vaadin Ltd.
|
|
7
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* A mixin to provide `pattern` and `preventInvalidInput` properties.
|
|
12
|
-
*
|
|
13
|
-
* @polymerMixin
|
|
14
|
-
* @mixes InputConstraintsMixin
|
|
15
|
-
*/
|
|
16
|
-
const PatternMixin = (superclass) =>
|
|
17
|
-
class PatternMixinClass extends InputConstraintsMixin(superclass) {
|
|
18
|
-
static get properties() {
|
|
19
|
-
return {
|
|
20
|
-
/**
|
|
21
|
-
* A regular expression that the value is checked against.
|
|
22
|
-
* The pattern must match the entire value, not just some subset.
|
|
23
|
-
*/
|
|
24
|
-
pattern: {
|
|
25
|
-
type: String,
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* When set to true, user is prevented from typing a value that
|
|
30
|
-
* conflicts with the given `pattern`.
|
|
31
|
-
* @attr {boolean} prevent-invalid-input
|
|
32
|
-
* @deprecated Please use `allowedCharPattern` instead.
|
|
33
|
-
*/
|
|
34
|
-
preventInvalidInput: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
observer: '_preventInvalidInputChanged',
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
static get delegateAttrs() {
|
|
42
|
-
return [...super.delegateAttrs, 'pattern'];
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
static get constraints() {
|
|
46
|
-
return [...super.constraints, 'pattern'];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/** @private */
|
|
50
|
-
_checkInputValue() {
|
|
51
|
-
if (this.preventInvalidInput) {
|
|
52
|
-
const input = this.inputElement;
|
|
53
|
-
if (input && input.value.length > 0 && !this.checkValidity()) {
|
|
54
|
-
input.value = this.value || '';
|
|
55
|
-
// Add input-prevented attribute for 200ms
|
|
56
|
-
this.setAttribute('input-prevented', '');
|
|
57
|
-
this._inputDebouncer = Debouncer.debounce(this._inputDebouncer, timeOut.after(200), () => {
|
|
58
|
-
this.removeAttribute('input-prevented');
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* @param {Event} event
|
|
66
|
-
* @protected
|
|
67
|
-
* @override
|
|
68
|
-
*/
|
|
69
|
-
_onInput(event) {
|
|
70
|
-
this._checkInputValue();
|
|
71
|
-
|
|
72
|
-
super._onInput(event);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/** @private */
|
|
76
|
-
_preventInvalidInputChanged(preventInvalidInput) {
|
|
77
|
-
if (preventInvalidInput) {
|
|
78
|
-
console.warn(
|
|
79
|
-
`WARNING: Since Vaadin 23.2, "preventInvalidInput" is deprecated. Please use "allowedCharPattern" instead.`,
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export { PatternMixin as P };
|