@vaadin/checkbox-group
Advanced tools
Comparing version 24.5.0-rc1 to 24.5.0-rc2
{ | ||
"name": "@vaadin/checkbox-group", | ||
"version": "24.5.0-rc1", | ||
"version": "24.5.0-rc2", | ||
"publishConfig": { | ||
@@ -42,13 +42,13 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/a11y-base": "24.5.0-rc1", | ||
"@vaadin/checkbox": "24.5.0-rc1", | ||
"@vaadin/component-base": "24.5.0-rc1", | ||
"@vaadin/field-base": "24.5.0-rc1", | ||
"@vaadin/vaadin-lumo-styles": "24.5.0-rc1", | ||
"@vaadin/vaadin-material-styles": "24.5.0-rc1", | ||
"@vaadin/vaadin-themable-mixin": "24.5.0-rc1", | ||
"@vaadin/a11y-base": "24.5.0-rc2", | ||
"@vaadin/checkbox": "24.5.0-rc2", | ||
"@vaadin/component-base": "24.5.0-rc2", | ||
"@vaadin/field-base": "24.5.0-rc2", | ||
"@vaadin/vaadin-lumo-styles": "24.5.0-rc2", | ||
"@vaadin/vaadin-material-styles": "24.5.0-rc2", | ||
"@vaadin/vaadin-themable-mixin": "24.5.0-rc2", | ||
"lit": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@vaadin/chai-plugins": "24.5.0-rc1", | ||
"@vaadin/chai-plugins": "24.5.0-rc2", | ||
"@vaadin/testing-helpers": "^1.0.0", | ||
@@ -61,3 +61,3 @@ "sinon": "^18.0.0" | ||
], | ||
"gitHead": "a8ae853ab69d7938cf507843784f1551a2eeb972" | ||
"gitHead": "be5bf40aec33761c6defdb5b3093c7b6dd5d97fd" | ||
} |
@@ -121,3 +121,3 @@ /** | ||
checkValidity() { | ||
return !this.required || this.value.length > 0; | ||
return !this.required || Boolean(this.value && this.value.length > 0); | ||
} | ||
@@ -169,3 +169,3 @@ | ||
this.__addCheckboxToValue(checkbox.value); | ||
} else if (this.value.includes(checkbox.value)) { | ||
} else if (this.value && this.value.includes(checkbox.value)) { | ||
checkbox.checked = true; | ||
@@ -220,3 +220,5 @@ } | ||
__addCheckboxToValue(value) { | ||
if (!this.value.includes(value)) { | ||
if (!this.value) { | ||
this.value = [value]; | ||
} else if (!this.value.includes(value)) { | ||
this.value = [...this.value, value]; | ||
@@ -231,3 +233,3 @@ } | ||
__removeCheckboxFromValue(value) { | ||
if (this.value.includes(value)) { | ||
if (this.value && this.value.includes(value)) { | ||
this.value = this.value.filter((v) => v !== value); | ||
@@ -252,4 +254,4 @@ } | ||
/** | ||
* @param {string | null | undefined} value | ||
* @param {string | null | undefined} oldValue | ||
* @param {string[] | null | undefined} value | ||
* @param {string[] | null | undefined} oldValue | ||
* @private | ||
@@ -259,10 +261,10 @@ */ | ||
// Setting initial value to empty array, skip validation | ||
if (value.length === 0 && oldValue === undefined) { | ||
if (value && value.length === 0 && oldValue === undefined) { | ||
return; | ||
} | ||
this.toggleAttribute('has-value', value.length > 0); | ||
this.toggleAttribute('has-value', value && value.length > 0); | ||
this.__checkboxes.forEach((checkbox) => { | ||
checkbox.checked = value.includes(checkbox.value); | ||
checkbox.checked = value && value.includes(checkbox.value); | ||
}); | ||
@@ -269,0 +271,0 @@ |
{ | ||
"$schema": "https://json.schemastore.org/web-types", | ||
"name": "@vaadin/checkbox-group", | ||
"version": "24.5.0-rc1", | ||
"version": "24.5.0-rc2", | ||
"description-markup": "markdown", | ||
@@ -6,0 +6,0 @@ "contributions": { |
{ | ||
"$schema": "https://json.schemastore.org/web-types", | ||
"name": "@vaadin/checkbox-group", | ||
"version": "24.5.0-rc1", | ||
"version": "24.5.0-rc2", | ||
"description-markup": "markdown", | ||
@@ -6,0 +6,0 @@ "framework": "lit", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55513
1072
+ Added@vaadin/a11y-base@24.5.0-rc2(transitive)
+ Added@vaadin/checkbox@24.5.0-rc2(transitive)
+ Added@vaadin/component-base@24.5.0-rc2(transitive)
+ Added@vaadin/field-base@24.5.0-rc2(transitive)
+ Added@vaadin/icon@24.5.0-rc2(transitive)
+ Added@vaadin/vaadin-lumo-styles@24.5.0-rc2(transitive)
+ Added@vaadin/vaadin-material-styles@24.5.0-rc2(transitive)
+ Added@vaadin/vaadin-themable-mixin@24.5.0-rc2(transitive)
- Removed@vaadin/a11y-base@24.5.0-rc1(transitive)
- Removed@vaadin/checkbox@24.5.0-rc1(transitive)
- Removed@vaadin/component-base@24.5.0-rc1(transitive)
- Removed@vaadin/field-base@24.5.0-rc1(transitive)
- Removed@vaadin/icon@24.5.0-rc1(transitive)
- Removed@vaadin/vaadin-lumo-styles@24.5.0-rc1(transitive)
- Removed@vaadin/vaadin-material-styles@24.5.0-rc1(transitive)
- Removed@vaadin/vaadin-themable-mixin@24.5.0-rc1(transitive)
Updated@vaadin/a11y-base@24.5.0-rc2
Updated@vaadin/checkbox@24.5.0-rc2