@descope/web-components-ui 1.0.391 → 1.0.392
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/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/cjs/index.cjs.js
CHANGED
@@ -16060,11 +16060,31 @@ class RawScopesList extends createBaseClass({ componentName: componentName$3, ba
|
|
16060
16060
|
return this.getAttribute('size') || 'sm';
|
16061
16061
|
}
|
16062
16062
|
|
16063
|
+
#getChildNodes() {
|
16064
|
+
return Array.from(this.shadowRoot.querySelector('div').children);
|
16065
|
+
}
|
16066
|
+
|
16067
|
+
// eslint-disable-next-line class-methods-use-this
|
16068
|
+
reportValidity() {
|
16069
|
+
this.checkValidity();
|
16070
|
+
}
|
16071
|
+
|
16072
|
+
// eslint-disable-next-line class-methods-use-this
|
16073
|
+
checkValidity() {
|
16074
|
+
return this.data.every((item) => !item.required || this.value.includes(item.id));
|
16075
|
+
}
|
16076
|
+
|
16063
16077
|
get value() {
|
16064
|
-
return
|
16065
|
-
(
|
16066
|
-
|
16067
|
-
|
16078
|
+
return this.#getChildNodes()
|
16079
|
+
.filter((node) => node.checked)
|
16080
|
+
.map((node) => node.getAttribute('data-id'));
|
16081
|
+
}
|
16082
|
+
|
16083
|
+
set value(val = []) {
|
16084
|
+
this.#getChildNodes().forEach((node) => {
|
16085
|
+
// eslint-disable-next-line no-param-reassign
|
16086
|
+
node.checked = val.includes(node.getAttribute('data-id'));
|
16087
|
+
});
|
16068
16088
|
}
|
16069
16089
|
|
16070
16090
|
get variant() {
|