@everymatrix/general-input 1.65.3 → 1.66.0
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 +7 -5
- package/dist/cjs/general-input.cjs.entry.js +258 -258
- package/dist/collection/components/text-input/text-input.js +7 -5
- package/dist/esm/checkbox-group-input_10.entry.js +7 -5
- package/dist/esm/general-input.entry.js +258 -258
- package/dist/general-input/general-input.esm.js +1 -1
- package/dist/general-input/{p-e6ce8179.entry.js → p-224076b9.entry.js} +1 -1
- package/dist/general-input/{p-d60ab9f7.entry.js → p-b78847ce.entry.js} +217 -217
- package/package.json +1 -1
- /package/dist/types/Users/{raul.vasile/workspace/everymatrix → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-input/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
- /package/dist/types/Users/{raul.vasile/workspace/everymatrix → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.d.ts +0 -0
- /package/dist/types/Users/{raul.vasile/workspace/everymatrix → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.dev.d.ts +0 -0
- /package/dist/types/Users/{raul.vasile/workspace/everymatrix → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/storybook/main.d.ts +0 -0
- /package/dist/types/Users/{raul.vasile/workspace/everymatrix → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/storybook/preview.d.ts +0 -0
- /package/dist/types/Users/{raul.vasile/workspace/everymatrix → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{raul.vasile/workspace/everymatrix → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{raul.vasile/workspace/everymatrix → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{raul.vasile/workspace/everymatrix → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -125,13 +125,15 @@ export class TextInput {
|
|
|
125
125
|
this.isValid = this.setValidity();
|
|
126
126
|
}
|
|
127
127
|
setValidity() {
|
|
128
|
-
var _a;
|
|
129
128
|
if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
|
|
130
129
|
return false;
|
|
131
130
|
}
|
|
132
|
-
|
|
133
|
-
return
|
|
131
|
+
if (!this.inputReference) {
|
|
132
|
+
return false;
|
|
134
133
|
}
|
|
134
|
+
const inputIsValid = this.inputReference.validity.valid;
|
|
135
|
+
const inputMatchValidation = !this.inputReference.value || this.inputReference.value.match(this.validationPattern) !== null;
|
|
136
|
+
return inputIsValid && inputMatchValidation;
|
|
135
137
|
}
|
|
136
138
|
setPattern() {
|
|
137
139
|
var _a, _b;
|
|
@@ -169,8 +171,8 @@ export class TextInput {
|
|
|
169
171
|
if (this.touched) {
|
|
170
172
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
171
173
|
}
|
|
172
|
-
return h("div", { key: '
|
|
173
|
-
h("img", { key: '
|
|
174
|
+
return h("div", { key: '2ec10d73e5c4f98498da30137bc5aa7e7a2bdd3d', class: `text__wrapper ${this.name}__input ${this.autofilled ? 'text__wrapper--autofilled' : ''}`, ref: el => this.stylingContainer = el }, h("div", { key: '920b3d13c49ff0c445ae05f7f613185fa211d17a', class: 'text__wrapper--flex' }, h("label", { key: '0133d6982eeadb94d7ec1012a4d29a606d8798d0', class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { key: '53155bf52cf3145ccb89f4d262d6127bbb316163', class: 'text__wrapper--relative' }, this.tooltip &&
|
|
175
|
+
h("img", { key: 'a6e0e575bb2a4732e55f10429c6fea0692f90fc1', class: 'text__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("input", { key: '5e0678f82cebd2a682854b877c5412d106c871d8', name: this.name, id: `${this.name}__input`, value: this.defaultValue, type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }), h("small", { key: '1ff3d090a3d26c422bb60bda942015315462e1da', class: 'text__error-message' }, this.errorMessage));
|
|
174
176
|
}
|
|
175
177
|
static get is() { return "text-input"; }
|
|
176
178
|
static get encapsulation() { return "shadow"; }
|
|
@@ -6559,13 +6559,15 @@ const TextInput = class {
|
|
|
6559
6559
|
this.isValid = this.setValidity();
|
|
6560
6560
|
}
|
|
6561
6561
|
setValidity() {
|
|
6562
|
-
var _a;
|
|
6563
6562
|
if (this.isDuplicateInput && this.duplicateInputValue !== this.value) {
|
|
6564
6563
|
return false;
|
|
6565
6564
|
}
|
|
6566
|
-
|
|
6567
|
-
return
|
|
6565
|
+
if (!this.inputReference) {
|
|
6566
|
+
return false;
|
|
6568
6567
|
}
|
|
6568
|
+
const inputIsValid = this.inputReference.validity.valid;
|
|
6569
|
+
const inputMatchValidation = !this.inputReference.value || this.inputReference.value.match(this.validationPattern) !== null;
|
|
6570
|
+
return inputIsValid && inputMatchValidation;
|
|
6569
6571
|
}
|
|
6570
6572
|
setPattern() {
|
|
6571
6573
|
var _a, _b;
|
|
@@ -6603,8 +6605,8 @@ const TextInput = class {
|
|
|
6603
6605
|
if (this.touched) {
|
|
6604
6606
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
6605
6607
|
}
|
|
6606
|
-
return h("div", { key: '
|
|
6607
|
-
h("img", { key: '
|
|
6608
|
+
return h("div", { key: '2ec10d73e5c4f98498da30137bc5aa7e7a2bdd3d', class: `text__wrapper ${this.name}__input ${this.autofilled ? 'text__wrapper--autofilled' : ''}`, ref: el => this.stylingContainer = el }, h("div", { key: '920b3d13c49ff0c445ae05f7f613185fa211d17a', class: 'text__wrapper--flex' }, h("label", { key: '0133d6982eeadb94d7ec1012a4d29a606d8798d0', class: `text__label ${this.validation.mandatory ? 'text__label--required' : ''}`, htmlFor: `${this.name}__input` }, this.displayName), h("div", { key: '53155bf52cf3145ccb89f4d262d6127bbb316163', class: 'text__wrapper--relative' }, this.tooltip &&
|
|
6609
|
+
h("img", { key: 'a6e0e575bb2a4732e55f10429c6fea0692f90fc1', class: 'text__tooltip-icon', src: tooltipIconSvg, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip())), h("input", { key: '5e0678f82cebd2a682854b877c5412d106c871d8', name: this.name, id: `${this.name}__input`, value: this.defaultValue, type: 'text', class: `text__input ${invalidClass}`, placeholder: `${this.placeholder}`, ref: (el) => this.inputReference = el, readOnly: this.autofilled, required: this.validation.mandatory, minlength: this.validation.minLength, maxlength: this.validation.maxLength, onInput: this.handleInput, onBlur: this.handleBlur }), h("small", { key: '1ff3d090a3d26c422bb60bda942015315462e1da', class: 'text__error-message' }, this.errorMessage));
|
|
6608
6610
|
}
|
|
6609
6611
|
static get watchers() { return {
|
|
6610
6612
|
"clientStyling": ["handleStylingChange"],
|