@descope/web-components-ui 1.0.391 → 1.0.392
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.cjs.js +24 -4
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +24 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/descope-scopes-list-index-js.js +1 -1
- package/package.json +1 -1
- package/src/components/descope-scopes-list/ScopesListClass.js +24 -4
package/dist/index.esm.js
CHANGED
@@ -14574,11 +14574,31 @@ class RawScopesList extends createBaseClass({ componentName: componentName$2, ba
|
|
14574
14574
|
return this.getAttribute('size') || 'sm';
|
14575
14575
|
}
|
14576
14576
|
|
14577
|
+
#getChildNodes() {
|
14578
|
+
return Array.from(this.shadowRoot.querySelector('div').children);
|
14579
|
+
}
|
14580
|
+
|
14581
|
+
// eslint-disable-next-line class-methods-use-this
|
14582
|
+
reportValidity() {
|
14583
|
+
this.checkValidity();
|
14584
|
+
}
|
14585
|
+
|
14586
|
+
// eslint-disable-next-line class-methods-use-this
|
14587
|
+
checkValidity() {
|
14588
|
+
return this.data.every((item) => !item.required || this.value.includes(item.id));
|
14589
|
+
}
|
14590
|
+
|
14577
14591
|
get value() {
|
14578
|
-
return
|
14579
|
-
(
|
14580
|
-
|
14581
|
-
|
14592
|
+
return this.#getChildNodes()
|
14593
|
+
.filter((node) => node.checked)
|
14594
|
+
.map((node) => node.getAttribute('data-id'));
|
14595
|
+
}
|
14596
|
+
|
14597
|
+
set value(val = []) {
|
14598
|
+
this.#getChildNodes().forEach((node) => {
|
14599
|
+
// eslint-disable-next-line no-param-reassign
|
14600
|
+
node.checked = val.includes(node.getAttribute('data-id'));
|
14601
|
+
});
|
14582
14602
|
}
|
14583
14603
|
|
14584
14604
|
get variant() {
|