@everymatrix/general-input 1.74.1 → 1.74.2
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_13.cjs.entry.js +432 -2339
- package/dist/collection/components/date-input/date-input.js +8 -7
- package/dist/esm/checkbox-group-input_13.entry.js +432 -2339
- package/dist/general-input/checkbox-group-input_13.entry.js +439 -2368
- package/package.json +1 -1
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.dev.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/storybook/main.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/storybook/preview.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -10,10 +10,10 @@ export class DateInput {
|
|
|
10
10
|
this.formatDate = (dateParts) => {
|
|
11
11
|
const { year, month, day } = dateParts;
|
|
12
12
|
const date = new Date(year, month, day);
|
|
13
|
-
return dateFnsFormat(date, this.dateFormat
|
|
13
|
+
return dateFnsFormat(date, this.dateFormat);
|
|
14
14
|
};
|
|
15
15
|
this.parseDate = (inputValue) => {
|
|
16
|
-
const date = dateFnsParse(inputValue, this.dateFormat
|
|
16
|
+
const date = dateFnsParse(inputValue, this.dateFormat, new Date());
|
|
17
17
|
return { year: date.getFullYear(), month: date.getMonth(), day: date.getDate() };
|
|
18
18
|
};
|
|
19
19
|
this.setClientStyling = () => {
|
|
@@ -31,7 +31,7 @@ export class DateInput {
|
|
|
31
31
|
this.language = undefined;
|
|
32
32
|
this.emitValue = undefined;
|
|
33
33
|
this.clientStyling = '';
|
|
34
|
-
this.dateFormat =
|
|
34
|
+
this.dateFormat = 'yyyy-MM-dd';
|
|
35
35
|
this.emitOnClick = false;
|
|
36
36
|
this.errorMessage = undefined;
|
|
37
37
|
this.isValid = undefined;
|
|
@@ -42,7 +42,7 @@ export class DateInput {
|
|
|
42
42
|
if (!this.value)
|
|
43
43
|
return '';
|
|
44
44
|
const parsedDate = dateFnsParse(this.value, 'yyyy-MM-dd', new Date());
|
|
45
|
-
return dateFnsFormat(parsedDate, this.dateFormat
|
|
45
|
+
return dateFnsFormat(parsedDate, this.dateFormat);
|
|
46
46
|
}
|
|
47
47
|
handleStylingChange(newValue, oldValue) {
|
|
48
48
|
if (newValue !== oldValue)
|
|
@@ -158,8 +158,8 @@ export class DateInput {
|
|
|
158
158
|
if (this.touched) {
|
|
159
159
|
invalidClass = this.isValid == true || this.isValid == undefined ? '' : 'text__input--invalid';
|
|
160
160
|
}
|
|
161
|
-
return h("div", { key: '
|
|
162
|
-
h("img", { key: '
|
|
161
|
+
return h("div", { key: 'ccbdcfd1e145373d0fb24f7c1e6e5ae1184a80f2', class: `date__wrapper ${this.autofilled ? 'date__wrapper--autofilled' : ''} ${this.name}__input`, ref: el => this.stylingContainer = el }, h("label", { key: '960db248a2f7418ed87b25de57b58cc8a4902a25', class: `date__label ${this.validation.mandatory ? 'date__label--required' : ''}}`, htmlFor: `${this.name}__input` }, this.displayName, " ", this.validation.mandatory ? '*' : ''), h("vaadin-date-picker", { key: '660961b240cc0cff03d8d4bf3687b398cd07befd', id: `${this.name}__input`, type: 'date', class: `date__input ${invalidClass}`, value: this.defaultValue, readOnly: this.autofilled, placeholder: `${this.placeholder}`, required: this.validation.mandatory, max: this.validation.max, min: this.validation.min, onChange: (e) => this.handleInput(e) }), h("small", { key: 'ba06bb3d85bb4441ae92a642464a47b798b287eb', class: 'date__error-message' }, this.errorMessage), this.tooltip &&
|
|
162
|
+
h("img", { key: '7ccb422e319e2a08963e99b242495ba9115517bd', class: 'date__tooltip-icon', src: tooltipIcon, alt: "", ref: (el) => this.tooltipIconReference = el, onClick: () => this.showTooltip = !this.showTooltip }), this.renderTooltip());
|
|
163
163
|
}
|
|
164
164
|
static get is() { return "date-input"; }
|
|
165
165
|
static get encapsulation() { return "shadow"; }
|
|
@@ -365,7 +365,8 @@ export class DateInput {
|
|
|
365
365
|
"text": "Date format for date picker."
|
|
366
366
|
},
|
|
367
367
|
"attribute": "date-format",
|
|
368
|
-
"reflect": true
|
|
368
|
+
"reflect": true,
|
|
369
|
+
"defaultValue": "'yyyy-MM-dd'"
|
|
369
370
|
},
|
|
370
371
|
"emitOnClick": {
|
|
371
372
|
"type": "boolean",
|