@ds-autonomie/web-components 2.21.1 → 2.21.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/CHANGELOG.md +6 -0
- package/cdn/chunks/chunk.5KKFNICD.js +121 -0
- package/cdn/chunks/{chunk.XXFCN6MW.js → chunk.EBMR5RUP.js} +1 -1
- package/cdn/chunks/{chunk.24NXLHSI.js → chunk.U4A36HDQ.js} +1 -1
- package/cdn/chunks/{chunk.3Q73BJS5.js → chunk.UUN3KGYB.js} +1 -1
- package/cdn/components/filter-counter/filter-counter.js +1 -1
- package/cdn/components/filter-date/filter-date.js +1 -1
- package/cdn/components/filter-select/filter-select.d.ts +0 -1
- package/cdn/components/filter-select/filter-select.js +1 -1
- package/cdn/components/tree/tree.js +1 -1
- package/cdn/custom-elements.json +261 -267
- package/cdn/design-system.js +1 -1
- package/cdn/vscode.html-custom-data.json +41 -41
- package/cdn/web-types.json +144 -148
- package/dist/chunks/{chunk.FTIQ3KCK.js → chunk.H7FCKWK4.js} +12 -24
- package/dist/components/filter-counter/filter-counter.js +2 -2
- package/dist/components/filter-date/filter-date.js +2 -2
- package/dist/components/filter-select/filter-select.d.ts +0 -1
- package/dist/components/filter-select/filter-select.js +2 -2
- package/dist/components/tree/tree.js +2 -2
- package/dist/custom-elements.json +261 -267
- package/dist/design-system.js +23 -23
- package/dist/vscode.html-custom-data.json +41 -41
- package/dist/web-types.json +144 -148
- package/package.json +1 -1
- package/cdn/chunks/chunk.DLQV224B.js +0 -121
- package/dist/chunks/{chunk.YOK7OXBS.js → chunk.4EG67OAK.js} +3 -3
- package/dist/chunks/{chunk.RKGIZ4JZ.js → chunk.BJPQ42FM.js} +3 -3
- package/dist/chunks/{chunk.Z4TGH2YA.js → chunk.XSZCCDGA.js} +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import{a as x}from"./chunk.RVJ7GEHV.js";import{a as f}from"./chunk.TMUGGTVF.js";import{a as O}from"./chunk.YQETGEXV.js";import{a as w}from"./chunk.2OZWUNZO.js";import{c as L}from"./chunk.3RLUYXJN.js";import{a as _}from"./chunk.PIG773U2.js";import{a as C}from"./chunk.W6E7LGND.js";import{c as $}from"./chunk.AM2ZR2Y2.js";import{a as m}from"./chunk.QTD6NQFL.js";import{a as v}from"./chunk.2RF4WD6T.js";import{a as c}from"./chunk.BWEPOOQP.js";import{a as y,b as h,c as r,d as u}from"./chunk.KBZ32KWP.js";import{a as o}from"./chunk.GP725TPQ.js";import{a as b,b as g,f as l}from"./chunk.IZ2HVRME.js";var d="dsa-option",i=class extends O{constructor(){super(...arguments);this.displayLabel="";this.allOptions=[];this.selectedOptions=[];this.displayedOptions=[];this.searchValue="";this.nbOptions=0;this.seeAll=!1;this.debounceTimerId=null;this.normalizedLabelsByValue=new Map;this.value="";this.multiple=!1;this.maxVisibleListLength=5;this.searchable=!1;this.debounceTimeout=300;this.optionGender="masculine";this.columnsFilter=!1}connectedCallback(){super.connectedCallback(),this.allOptions=this.getAllOptions(),this.nbOptions=this.allOptions.length,this.filterOptions()}disconnectedCallback(){super.disconnectedCallback(),this.debounceTimerId!==null&&(clearTimeout(this.debounceTimerId),this.debounceTimerId=null)}handleKeyDown(e){super.handleKeyDown(e);let a=e.composedPath(),s=a.some(n=>n instanceof w),t=a.some(n=>n instanceof f);if((e.key==="Enter"||e.key===" ")&&s&&this.currentOption&&!this.currentOption.disabled&&(e.preventDefault(),this.multiple||this.value.includes(this.currentOption.value)?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then(()=>{this.emit("dsa-change")}),!this.multiple&&!this.drawer&&(this.hide(),this.filterTrigger.focus({preventScroll:!0}))),!this.multiple&&s&&["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let n=this.displayedOptions.indexOf(this.currentOption),p=Math.max(0,n);!(n===0&&e.key==="ArrowUp")&&!(n===this.displayedOptions.length-1&&e.key==="ArrowDown")&&e.preventDefault(),e.key==="ArrowDown"&&n<this.displayedOptions.length-1?p=n+1:e.key==="ArrowUp"&&n>0?p=n-1:e.key==="Home"?p=0:e.key==="End"&&(p=this.displayedOptions.length-1),this.setCurrentOption(this.displayedOptions[p])}t&&e.stopPropagation()}handleSearchInput(e){e.stopPropagation(),this.searchValue=this.searchInput.value,this.debounceTimerId!==null&&clearTimeout(this.debounceTimerId),this.debounceTimerId=setTimeout(()=>{this.emit("dsa-input")},this.debounceTimeout)}handleOptionFocus(e){let s=e.target.closest(d);s&&this.setCurrentOption(s)}handleOptionClick(e){let s=e.target.closest(d),t=this.value;s&&!s.disabled&&(this.multiple||this.value.includes(s.value)?this.toggleOptionSelection(s):this.setSelectedOptions(s),this.value!==t&&this.updateComplete.then(()=>{this.emit("dsa-change")}),!this.multiple&&!this.drawer&&(this.updateComplete.then(()=>this.filterTrigger.focus({preventScroll:!0})),this.hide()))}filterOptions(){if(this.searchValue.length>0){let e=m(this.searchValue);this.displayedOptions=this.allOptions.filter(a=>{var t;return((t=this.normalizedLabelsByValue.get(a.value))!=null?t:m(a.innerText)).includes(e)})}else!this.seeAll&&this.maxVisibleListLength>0?this.displayedOptions=this.allOptions.slice(0,this.maxVisibleListLength):this.displayedOptions=this.allOptions;this.displayedOptions.forEach(e=>e.tabIndex=0)}handleMultipleHeaderButtonClick(){this.selectedOptions.length>0?this.allOptions.forEach(e=>e.selected=!1):this.allOptions.forEach(e=>e.selected=!0),this.selectionChanged(),this.updateComplete.then(()=>{this.emit("dsa-change")})}handleSearchClear(){this.searchValue=""}handleSeeAllClick(){this.seeAll=!0,this.filterOptions()}handleDefaultSlotChange(){if(customElements.get(d)){this.allOptions=this.getAllOptions(),this.nbOptions=this.allOptions.length;let e=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(this.allOptions.filter(a=>e.includes(a.value))),this.filterOptions()}else customElements.whenDefined(d).then(()=>this.handleDefaultSlotChange())}getAllOptions(){let e=this.querySelectorAll(d),a=[];return this.normalizedLabelsByValue.clear(),e.forEach(s=>{s.role=this.multiple?"checkbox":"radio";let t=s.cloneNode(!0);t.selected=s.selected,t.multiple=this.multiple,t.role=this.multiple?"checkbox":"radio",t.classList.add("filter-select__option"),t.onfocus=this.handleOptionFocus.bind(this),a.push(t),this.normalizedLabelsByValue.set(s.value,m(t.innerText))}),a}getFirstOption(){return this.querySelector(d)}setCurrentOption(e){this.displayedOptions.forEach(a=>{a.current=!1}),e&&(this.currentOption=e,e.current=!0,e.focus())}setSelectedOptions(e){let a=Array.isArray(e)?e:[e],s=new Set(a.map(t=>t.value));this.allOptions.forEach(t=>{t.selected=s.has(t.value)}),this.selectionChanged()}toggleOptionSelection(e,a){let s=this.allOptions.find(t=>t.value===e.value);s&&(s.selected=a!=null?a:!s.selected,this.selectionChanged())}selectionChanged(){var a,s;this.selectedOptions=this.allOptions.filter(t=>t.selected),this.filterOptions();let e=new Set(this.selectedOptions.map(t=>t.value));this.displayedOptions.forEach(t=>{t.selected=e.has(t.value)}),this.multiple?this.value=this.selectedOptions.map(t=>t.value):this.value=(s=(a=this.selectedOptions[0])==null?void 0:a.value)!=null?s:"",this.selectedOptions[0]?this.selectedOptions[0].updateComplete.then(()=>{var t,n;this.displayLabel=(n=(t=this.selectedOptions[0])==null?void 0:t.getTextLabel())!=null?n:""}):this.displayLabel=""}getDisplayedOptionsList(){return this.multiple?o`<div role="list">
|
|
2
|
+
${this.displayedOptions.map(e=>o`<div role="listitem">${e}</div>`)}
|
|
3
|
+
</div>`:this.displayedOptions}handleSearchValueChange(){this.searchValue.length>0&&(this.seeAll=!0),this.filterOptions()}handleValueChange(){let e=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(this.allOptions.filter(a=>e.includes(a.value)))}async handleOpenChange(){this.open&&(this.selectedOptions.length>0&&(this.seeAll=!0),this.filterOptions(),this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption())),await super.handleOpenChange(),this.open&&(requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)}),this.currentOption&&L(this.currentOption,this.listbox,"vertical","auto"))}handleSeeAllChange(){this.seeAll&&this.displayedOptions[this.maxVisibleListLength]!==void 0&&setTimeout(()=>this.displayedOptions[this.maxVisibleListLength].focus())}handleMultipleChange(){this.handleDefaultSlotChange()}async hide(){await super.hide(),this.searchValue=""}renderTrigger(){if(this.columnsFilter)return o`
|
|
4
|
+
<dsa-button
|
|
5
|
+
slot="anchor"
|
|
6
|
+
class="filter__trigger"
|
|
7
|
+
aria-expanded=${this.open?"true":"false"}
|
|
8
|
+
aria-controls="filter__panel"
|
|
9
|
+
?disabled=${this.disabled}
|
|
10
|
+
@focus=${this.handleFocus}
|
|
11
|
+
@blur=${this.handleBlur}
|
|
12
|
+
@mousedown=${this.handleFilterTriggerMouseDown}
|
|
13
|
+
variant="tertiary"
|
|
14
|
+
caret
|
|
15
|
+
>
|
|
16
|
+
<dsa-icon
|
|
17
|
+
name="view_column"
|
|
18
|
+
slot="prefix"
|
|
19
|
+
library="system"
|
|
20
|
+
></dsa-icon>
|
|
21
|
+
${this.label!==""?this.label:this.localize.term("columns")}
|
|
22
|
+
</dsa-button>
|
|
23
|
+
`;{let e=this.selectedOptions.length;return o`
|
|
24
|
+
<dsa-filter-button
|
|
25
|
+
slot="anchor"
|
|
26
|
+
class="filter__trigger"
|
|
27
|
+
label=${this.label}
|
|
28
|
+
selected-option=${e===1?this.displayLabel:""}
|
|
29
|
+
selection-count=${e}
|
|
30
|
+
aria-expanded=${this.open?"true":"false"}
|
|
31
|
+
aria-controls="filter__panel"
|
|
32
|
+
?disabled=${this.disabled}
|
|
33
|
+
?readonly=${this.readonly}
|
|
34
|
+
?drawer=${this.drawer}
|
|
35
|
+
@focus=${this.handleFocus}
|
|
36
|
+
@blur=${this.handleBlur}
|
|
37
|
+
@mousedown=${this.handleFilterTriggerMouseDown}
|
|
38
|
+
></dsa-filter-button>
|
|
39
|
+
`}}renderDeSelectAll(){let e=this.selectedOptions.length;return o`
|
|
40
|
+
<dsa-button
|
|
41
|
+
class="filter__multiselect-header__deselect-all"
|
|
42
|
+
variant="tertiary"
|
|
43
|
+
size="small"
|
|
44
|
+
@click=${this.handleMultipleHeaderButtonClick}
|
|
45
|
+
>
|
|
46
|
+
${e===0?o` ${this.localize.term("selectAll")} `:o`
|
|
47
|
+
<dsa-icon
|
|
48
|
+
name="restart_alt"
|
|
49
|
+
slot="prefix"
|
|
50
|
+
library="system"
|
|
51
|
+
></dsa-icon>
|
|
52
|
+
${this.localize.term("deselectAll")}
|
|
53
|
+
`}
|
|
54
|
+
</dsa-button>
|
|
55
|
+
`}renderPanelContent(){let e=this.selectedOptions.length;return o`
|
|
56
|
+
${this.multiple&&!this.drawer?o`
|
|
57
|
+
<div class="filter__multiselect-header">
|
|
58
|
+
<span role="status"
|
|
59
|
+
>${this.localize.term("numberSelected",e,this.optionGender)}</span
|
|
60
|
+
>
|
|
61
|
+
${this.renderDeSelectAll()}
|
|
62
|
+
</div>
|
|
63
|
+
`:""}
|
|
64
|
+
${this.searchable?o`
|
|
65
|
+
<dsa-input
|
|
66
|
+
type="search"
|
|
67
|
+
accessible-name=${this.localize.term("search")}
|
|
68
|
+
placeholder=${this.localize.term("search")}
|
|
69
|
+
variant="layer"
|
|
70
|
+
.value=${this.searchValue}
|
|
71
|
+
@input=${this.handleSearchInput}
|
|
72
|
+
clearable
|
|
73
|
+
@dsa-clear=${this.handleSearchClear}
|
|
74
|
+
></dsa-input>
|
|
75
|
+
<dsa-visually-hidden>
|
|
76
|
+
<span
|
|
77
|
+
role="status"
|
|
78
|
+
aria-live="polite"
|
|
79
|
+
aria-relevant="all"
|
|
80
|
+
.live=${this.searchValue}
|
|
81
|
+
>${this.searchValue.length>0?`${this.displayedOptions.length} ${this.localize.term("optionsAvailable")}`:""}</span
|
|
82
|
+
>
|
|
83
|
+
</dsa-visually-hidden>
|
|
84
|
+
`:""}
|
|
85
|
+
|
|
86
|
+
<div
|
|
87
|
+
id="listbox"
|
|
88
|
+
role=${this.multiple?"group":"radiogroup"}
|
|
89
|
+
aria-multiselectable=${v(this.multiple?"true":void 0)}
|
|
90
|
+
aria-label=${this.localize.term("selectValue",this.multiple)}
|
|
91
|
+
part="listbox"
|
|
92
|
+
class="filter__listbox"
|
|
93
|
+
@mouseup=${this.handleOptionClick}
|
|
94
|
+
>
|
|
95
|
+
${this.displayedOptions.length>0?this.getDisplayedOptionsList():o`<div class="filter__empty_text">
|
|
96
|
+
<p>${this.localize.term("noMatchFound")}</p>
|
|
97
|
+
</div>`}
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<div
|
|
101
|
+
class="filter__options"
|
|
102
|
+
tabindex="-1"
|
|
103
|
+
role=${this.multiple?"group":"radiogroup"}
|
|
104
|
+
>
|
|
105
|
+
<slot @slotchange=${this.handleDefaultSlotChange}></slot>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<div class="filter-select__footer">
|
|
109
|
+
${this.maxVisibleListLength>0&&this.nbOptions>this.maxVisibleListLength&&!this.seeAll?o`
|
|
110
|
+
<dsa-button
|
|
111
|
+
variant="tertiary"
|
|
112
|
+
size="small"
|
|
113
|
+
class="filter__see-all-button"
|
|
114
|
+
@click=${this.handleSeeAllClick}
|
|
115
|
+
>
|
|
116
|
+
${this.localize.term("seeAll",this.nbOptions)}
|
|
117
|
+
</dsa-button>
|
|
118
|
+
`:""}
|
|
119
|
+
${this.drawer&&this.multiple?this.renderDeSelectAll():""}
|
|
120
|
+
</div>
|
|
121
|
+
`}};i.styles=x,i.dependencies=g(b({},O.dependencies),{"dsa-button":C,"dsa-icon":$,"dsa-input":f,"dsa-visually-hidden":_}),l([u(".filter__multiselect-header__deselect-all")],i.prototype,"deselectAllButton",2),l([u("dsa-input")],i.prototype,"searchInput",2),l([u(".filter__listbox")],i.prototype,"listbox",2),l([u(".filter__see-all-button")],i.prototype,"seeAllButton",2),l([r()],i.prototype,"displayLabel",2),l([r()],i.prototype,"allOptions",2),l([r()],i.prototype,"currentOption",2),l([r()],i.prototype,"selectedOptions",2),l([r()],i.prototype,"displayedOptions",2),l([r()],i.prototype,"searchValue",2),l([r()],i.prototype,"nbOptions",2),l([r()],i.prototype,"seeAll",2),l([r()],i.prototype,"debounceTimerId",2),l([h({converter:{fromAttribute:e=>e.split(" "),toAttribute:e=>typeof e=="string"?e:e.join(" ")}})],i.prototype,"value",2),l([h({type:Boolean,reflect:!0})],i.prototype,"multiple",2),l([h({attribute:"max-visible-list-length",type:Number})],i.prototype,"maxVisibleListLength",2),l([h({type:Boolean})],i.prototype,"searchable",2),l([h({type:Number,attribute:"debounce-timeout"})],i.prototype,"debounceTimeout",2),l([h({attribute:"option-gender"})],i.prototype,"optionGender",2),l([h({type:Boolean,attribute:"columns-filter"})],i.prototype,"columnsFilter",2),l([c("searchValue",{waitUntilFirstUpdate:!0})],i.prototype,"handleSearchValueChange",1),l([c("value",{waitUntilFirstUpdate:!0})],i.prototype,"handleValueChange",1),l([c("seeAll")],i.prototype,"handleSeeAllChange",1),l([c("multiple")],i.prototype,"handleMultipleChange",1),i=l([y("dsa-filter-select")],i);export{i as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as A}from"./chunk.I5IBJET7.js";import{a as d}from"./chunk.LCXOBOTQ.js";import{a as T}from"./chunk.FC4RDJJF.js";import{a as g}from"./chunk.BWEPOOQP.js";import{a as p,b as u,d as I,f as b}from"./chunk.KBZ32KWP.js";import{a as f}from"./chunk.GP725TPQ.js";import{f as c}from"./chunk.IZ2HVRME.js";function S(h,m=!1){function e(s){let i=s.getChildrenItems({includeDisabled:!1});if(i.length){let l=i.every(r=>r.selected),a=i.every(r=>!r.selected&&!r.indeterminate);s.selected=l,s.indeterminate=!l&&!a}}function n(s){let i=s.parentElement;d.isTreeItem(i)&&(e(i),n(i))}function t(s){for(let i of s.getChildrenItems())i.selected=m?s.selected||i.selected:!i.disabled&&s.selected,t(i);m&&e(s)}t(h),n(h)}var o=class extends b{constructor(){super(...arguments);this.selection="single";this.disableCheckboxSync=!1;this.clickTarget=null;this.initTreeItem=e=>{e.selectable=this.selection==="multiple",this.selection==="parent"&&e.isLeaf&&e.setAttribute("aria-disabled","true")}}async connectedCallback(){super.connectedCallback(),this.handleTreeChanged=this.handleTreeChanged.bind(this),this.handleFocusIn=this.handleFocusIn.bind(this),this.handleFocusOut=this.handleFocusOut.bind(this),this.setAttribute("role","tree"),this.setAttribute("tabindex","0"),this.addEventListener("focusin",this.handleFocusIn),this.addEventListener("focusout",this.handleFocusOut),this.addEventListener("dsa-lazy-change",this.handleSlotChange),await this.updateComplete,this.mutationObserver=new MutationObserver(this.handleTreeChanged),this.mutationObserver.observe(this,{childList:!0,subtree:!0})}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver.disconnect(),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),this.removeEventListener("dsa-lazy-change",this.handleSlotChange)}handleTreeChanged(e){for(let n of e){let t=[...n.addedNodes].filter(d.isTreeItem),s=[...n.removedNodes].filter(d.isTreeItem);t.forEach(this.initTreeItem),s.includes(this.lastFocusedItem)&&this.focusItem(this.getFocusableItems()[0])}}selectItem(e){var s;let n=[...this.selectedItems];if(this.selection==="multiple")e.selected=!e.selected,e.lazy&&(e.expanded=!0),this.disableCheckboxSync||S(e);else if(this.selection==="single"||this.selection==="leaf"&&e.isLeaf||this.selection==="parent"&&!e.isLeaf){let i=this.getAllTreeItems();for(let l of i)l.selected=l===e}else if(this.selection==="leaf"&&!e.isLeaf)e.expanded=!e.expanded;else if(this.selection==="parent"&&e.isLeaf){let i=(s=e.parentElement)==null?void 0:s.closest("[role=treeitem]");if(i){let l=this.getAllTreeItems();for(let a of l)a.selected=a===i}}let t=this.selectedItems;(n.length!==t.length||t.some(i=>!n.includes(i)))&&Promise.all(t.map(i=>i.updateComplete)).then(()=>{this.emit("dsa-selection-change",{detail:{selection:t}})})}getAllTreeItems(){return[...this.querySelectorAll("dsa-tree-item")]}focusItem(e){e==null||e.focus()}handleKeyDown(e){if(!["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Home","End","Enter"," "].includes(e.key))return;let n=this.getFocusableItems();if(n.length>0){e.preventDefault();let t=n.findIndex(a=>a.matches(":focus")),s=n[t],i=a=>{let r=n[T(a,0,n.length-1)];this.focusItem(r)},l=a=>{s.expanded=a};e.key==="ArrowDown"?i(t+1):e.key==="ArrowUp"?i(t-1):e.key==="ArrowRight"?!s||s.disabled||s.expanded||s.isLeaf&&!s.lazy?i(t+1):l(!0):e.key==="ArrowLeft"?!s||s.disabled||s.isLeaf||!s.expanded?i(t-1):l(!1):e.key==="Home"?i(0):e.key==="End"?i(n.length-1):(e.key==="Enter"||e.key===" ")&&(s.disabled||this.selectItem(s))}}handleClick(e){let n=e.target,t=n.closest("dsa-tree-item"),s=e.composedPath().some(i=>{var l;return(l=i==null?void 0:i.classList)==null?void 0:l.contains("tree-item__expand-button")});!t||t.disabled||n!==this.clickTarget||(s?t.expanded=!t.expanded:this.selectItem(t))}handleMouseDown(e){this.clickTarget=e.target}handleFocusOut(e){let n=e.relatedTarget;(!n||!this.contains(n))&&(this.tabIndex=0)}handleFocusIn(e){let n=e.target;e.target===this&&this.focusItem(this.lastFocusedItem||this.getAllTreeItems()[0]),d.isTreeItem(n)&&!n.disabled&&(this.lastFocusedItem&&(this.lastFocusedItem.tabIndex=-1),this.lastFocusedItem=n,this.tabIndex=-1,n.tabIndex=0)}handleSlotChange(){customElements.get("dsa-tree-item")?this.getAllTreeItems().forEach(this.initTreeItem):customElements.whenDefined("dsa-tree-item").then(()=>this.handleSlotChange())}async handleSelectionChange(){let e=this.selection==="multiple",n=this.getAllTreeItems();this.setAttribute("aria-multiselectable",e?"true":"false");for(let t of n)t.selectable=e,t.setAttribute("aria-disabled",t.disabled||(t.isLeaf&&this.selection)==="parent"?"true":"false");e&&!this.disableCheckboxSync&&(await this.updateComplete,[...this.querySelectorAll(":scope > dsa-tree-item")].forEach(t=>{t instanceof d&&S(t,!0)}))}get selectedItems(){let e=this.getAllTreeItems(),n=t=>t.selected;return e.filter(n)}getFocusableItems(){let e=this.getAllTreeItems(),n=new Set;return e.filter(t=>{var i;if(t.disabled)return!1;let s=(i=t.parentElement)==null?void 0:i.closest("[role=treeitem]");return s&&(!s.expanded||s.loading||n.has(s))&&n.add(t),!n.has(t)})}render(){return f`
|
|
2
2
|
<div
|
|
3
3
|
part="base"
|
|
4
4
|
class="tree"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as O}from"./chunk.WADWJFMR.js";import{a as y}from"./chunk.YQETGEXV.js";import{a as I}from"./chunk.2TZ4LFPJ.js";import{a as T}from"./chunk.ONUDFMLG.js";import{a as $,b as D,c as E,d as u,f as l,g as x}from"./chunk.NHMFB7ET.js";import{a as L}from"./chunk.W6E7LGND.js";import{a as _}from"./chunk.2FPBPQUJ.js";import{a as v}from"./chunk.B4KFHYLS.js";import{a as m}from"./chunk.NIRNX67K.js";import{c as w}from"./chunk.AM2ZR2Y2.js";import{a as h}from"./chunk.2RF4WD6T.js";import{d as f}from"./chunk.ZBHHLRFH.js";import{a as g}from"./chunk.BWEPOOQP.js";import{a as S,b as r,c as p,d as o}from"./chunk.KBZ32KWP.js";import{a as d}from"./chunk.GP725TPQ.js";import{a as B,b as C,f as e}from"./chunk.IZ2HVRME.js";var t=class extends y{constructor(){super(...arguments);this.isIconButtonFocused=!1;this.isStartDateValid=!0;this.isEndDateValid=!0;this.value="";this.buttonLabel="";this.range=!1;this.placeholder="";this.hideCalendarButton=!1}connectedCallback(){super.connectedCallback(),this.handleSelectedDate=this.handleSelectedDate.bind(this),this.shouldDisableDate=this.shouldDisableDate.bind(this),this.handleLangChange(),this.currentLocale=this.lang||this.localize.lang()}firstUpdated(){super.firstUpdated(),this.updateComplete.then(()=>{!this.drawer&&this.filterTrigger&&this.filterTrigger.button.setAttribute("aria-expanded","false")})}handleSelectedDate(a){let{detail:i}=a;(!this.range||i.dates.length!==1)&&(this.value=i.dates.map(s=>E(s)).join(","),this.drawer||(this.hide(),this.filterTrigger.focus()),this.emit("dsa-change"))}addOpenListeners(){super.addOpenListeners(),this.addEventListener("dsa-date-selected",this.handleSelectedDate)}removeOpenListeners(){super.removeOpenListeners(),this.removeEventListener("dsa-date-selected",this.handleSelectedDate)}handleChange(){var b,n;let a="",i="";this.isStartDateValid=this.filterInputStart.validity.valid,this.isEndDateValid=(n=(b=this.filterInputEnd)==null?void 0:b.validity.valid)!=null?n:!0;let s=D(this.filterInputStart.value)&&u(this.filterInputStart.value);if(s&&this.shouldDisableDate(s)&&(this.isStartDateValid=!1),a=this.filterInputStart.value,this.range){let c=D(this.filterInputEnd.value)&&u(this.filterInputEnd.value);(c&&this.shouldDisableDate(c)||s&&c<s)&&(this.isEndDateValid=!1),i=this.filterInputEnd.value}this.errorMessages=[...this.isStartDateValid?[]:[this.localize.term(this.range?"invalidStartDate":"invalidDate")],...this.isEndDateValid?[]:[this.localize.term("invalidEndDate")]],this.value=this.range?x(a,i):a,this.emit("dsa-change")}handleChangeInDrawer(){var a,i;this.value=(i=(a=this.drawerFilter)==null?void 0:a.value)!=null?i:""}handleIconButtonFocus(){this.isIconButtonFocused=!0,this.emit("dsa-focus")}handleIconButtonBlur(){this.isIconButtonFocused=!1,this.emit("dsa-blur")}handleReset(){this.value="",this.drawerFilter.filterInputStart.clear(),this.drawerFilter.filterInputEnd.clear(),this.errorMessages=[],this.drawerFilter.filterInputStart.focus({preventScroll:!0}),this.emit("dsa-change")}getFullDateFromISO(a){return u(a).toLocaleDateString(this.lang||this.localize.lang(),{year:"numeric",month:"long",day:"numeric"})}getDescriptionText(a){let i=this.errorMessages.join(", "),s="";if(this.value!=="")if(a==="calendarButton"&&this.range){let n=l(this.value)[0],c=l(this.value)[1];s=`${this.localize.term("selectedDates")}${this.getFullDateFromISO(n)} - ${this.getFullDateFromISO(c)}`}else{let n="";a==="end"?n=l(this.value)[1]:n=this.range?l(this.value)[0]:this.value,s=`${this.localize.term("selectedDate")}${this.getFullDateFromISO(n)}`}return[...this.errorMessages.length>0?[i]:[],...this.value?[s]:[]].join(", ")}shouldDisableDate(a){let i=typeof this.min=="string"&&a<u(this.min),s=typeof this.max=="string"&&a>u(this.max);return i||s}handleFilterDateOpenChange(){this.drawer||(this.open?this.filterTrigger.button.setAttribute("aria-expanded","true"):this.filterTrigger.button.setAttribute("aria-expanded","false"))}handleLangChange(){this.currentLocale=this.lang||this.localize.lang()}handleHideCalendarButtonChange(){!this.drawer&&this.hideCalendarButton&&this.hide()}renderTrigger(){var i;if(this.label||v("<dsa-filter-date> require a label attribute for accessibility"),this.buttonLabel||v("<dsa-filter-date> require a button-label attribute for accessibility"),this.drawer){let s=this.value?`
|
|
2
2
|
${$(this.range?l(this.value)[0]:this.value,this.currentLocale)}
|
|
3
3
|
${this.range?" - ":""}
|
|
4
4
|
${this.range?$(l(this.value)[1],this.currentLocale):""}`:"";return d` <dsa-filter-button
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as o}from"./chunk.TMUGGTVF.js";import{a as n}from"./chunk.YQETGEXV.js";import{a as c}from"./chunk.CFBXGDPS.js";import{a as m}from"./chunk.W6E7LGND.js";import{a as p}from"./chunk.2FPBPQUJ.js";import{a as s}from"./chunk.BWEPOOQP.js";import{a as h,b as i,c as d,d as a}from"./chunk.KBZ32KWP.js";import{a as l}from"./chunk.GP725TPQ.js";import{a as u,b as r,f as e}from"./chunk.IZ2HVRME.js";var t=class extends n{constructor(){super(...arguments);this.value="";this.defaultValue=""}get hasMinBound(){return this.min!==void 0}get hasMaxBound(){return this.max!==void 0}connectedCallback(){super.connectedCallback(),this.tempValue=this.value===""?this.defaultValue:this.value}handleInput(f){f.stopPropagation(),this.tempValue=this.filterInput.value}handleDecrease(){this.tempValue===""?this.tempValue=this.defaultValue!==""?this.defaultValue:"0":(!this.hasMinBound||parseFloat(this.tempValue)>this.min)&&(this.tempValue=`${parseFloat(this.tempValue)-1}`,this.emit("dsa-input"))}handleIncrease(){this.tempValue===""?this.tempValue=this.defaultValue!==""?this.defaultValue:"0":(!this.hasMaxBound||parseFloat(this.tempValue)<this.max)&&(this.tempValue=`${parseFloat(this.tempValue)+1}`,this.emit("dsa-input"))}handleReset(){this.tempValue=this.defaultValue,this.emit("dsa-input"),this.filterInput.focus({preventScroll:!0})}handleSubmit(){this.value=this.tempValue,this.emit("dsa-submit"),this.hide(),this.filterTrigger.focus({preventScroll:!0})}handleValueChange(){this.value!==""&&(this.tempValue=this.value===""?this.defaultValue:this.value)}handleTempValueChange(){this.drawer&&(this.value=this.tempValue)}handleFilterCounterOpenChange(){this.open||(this.tempValue=this.value===""?this.defaultValue:this.value)}renderPanelContent(){return l`
|
|
2
2
|
<div class="filter__content">
|
|
3
3
|
<dsa-icon-button
|
|
4
4
|
name="remove"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.UUN3KGYB.js";import"../../chunks/chunk.TMUGGTVF.js";import"../../chunks/chunk.VILF2M2M.js";import"../../chunks/chunk.SK27PJHT.js";import"../../chunks/chunk.HFRREETM.js";import"../../chunks/chunk.IBACM3KM.js";import"../../chunks/chunk.I2EMSNY5.js";import"../../chunks/chunk.LEYHHYW4.js";import"../../chunks/chunk.4SRRFJ5K.js";import"../../chunks/chunk.EXQPVGOS.js";import"../../chunks/chunk.HYQVCAH7.js";import"../../chunks/chunk.HLXIBAA3.js";import"../../chunks/chunk.DYFOZ46Z.js";import"../../chunks/chunk.DFZPEZNV.js";import"../../chunks/chunk.A4WPNAA5.js";import"../../chunks/chunk.2YKQ7H24.js";import"../../chunks/chunk.UVI76N5N.js";import"../../chunks/chunk.YQETGEXV.js";import"../../chunks/chunk.5BVWK6K3.js";import"../../chunks/chunk.KUSB4WKX.js";import"../../chunks/chunk.QHSERCS2.js";import"../../chunks/chunk.CFBXGDPS.js";import"../../chunks/chunk.UZFGXWW3.js";import"../../chunks/chunk.FWFZG7TN.js";import"../../chunks/chunk.PAYML2WU.js";import"../../chunks/chunk.TYYYX2PR.js";import"../../chunks/chunk.3RLUYXJN.js";import"../../chunks/chunk.2TZ4LFPJ.js";import"../../chunks/chunk.U4TME7DS.js";import"../../chunks/chunk.PIG773U2.js";import"../../chunks/chunk.DPMHT2KP.js";import"../../chunks/chunk.WFPILKOS.js";import"../../chunks/chunk.SWSURKR7.js";import"../../chunks/chunk.SWEIVB73.js";import"../../chunks/chunk.ALIA5R6V.js";import"../../chunks/chunk.ONUDFMLG.js";import"../../chunks/chunk.NHMFB7ET.js";import"../../chunks/chunk.IDZ2RBHS.js";import"../../chunks/chunk.ODDQO2HD.js";import"../../chunks/chunk.W6E7LGND.js";import"../../chunks/chunk.FVTT4MMC.js";import"../../chunks/chunk.GLMWJUWZ.js";import"../../chunks/chunk.FWTZS7LK.js";import"../../chunks/chunk.LIC3WRPD.js";import"../../chunks/chunk.2FPBPQUJ.js";import"../../chunks/chunk.X4AWEYYO.js";import"../../chunks/chunk.KLRPP4NQ.js";import"../../chunks/chunk.HHVNQNCC.js";import"../../chunks/chunk.TV2TMO2H.js";import"../../chunks/chunk.B4KFHYLS.js";import"../../chunks/chunk.FDMPUSVV.js";import"../../chunks/chunk.NIRNX67K.js";import"../../chunks/chunk.Q54GPNUS.js";import"../../chunks/chunk.HJGLYEWV.js";import"../../chunks/chunk.AM2ZR2Y2.js";import"../../chunks/chunk.SARJ4UB5.js";import"../../chunks/chunk.D3S7D52C.js";import"../../chunks/chunk.LBRHB47I.js";import"../../chunks/chunk.QTD6NQFL.js";import"../../chunks/chunk.MHIIHFT3.js";import"../../chunks/chunk.2RF4WD6T.js";import"../../chunks/chunk.ZBHHLRFH.js";import"../../chunks/chunk.BWEPOOQP.js";import"../../chunks/chunk.KBZ32KWP.js";import"../../chunks/chunk.H544RQAW.js";import"../../chunks/chunk.UMC4I57R.js";import"../../chunks/chunk.6G2FNLAV.js";import"../../chunks/chunk.GP725TPQ.js";import"../../chunks/chunk.IZ2HVRME.js";export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.U4A36HDQ.js";import"../../chunks/chunk.WADWJFMR.js";import"../../chunks/chunk.YQETGEXV.js";import"../../chunks/chunk.5BVWK6K3.js";import"../../chunks/chunk.KUSB4WKX.js";import"../../chunks/chunk.QHSERCS2.js";import"../../chunks/chunk.UZFGXWW3.js";import"../../chunks/chunk.PAYML2WU.js";import"../../chunks/chunk.TYYYX2PR.js";import"../../chunks/chunk.2TZ4LFPJ.js";import"../../chunks/chunk.U4TME7DS.js";import"../../chunks/chunk.SWEIVB73.js";import"../../chunks/chunk.ONUDFMLG.js";import"../../chunks/chunk.NHMFB7ET.js";import"../../chunks/chunk.IDZ2RBHS.js";import"../../chunks/chunk.W6E7LGND.js";import"../../chunks/chunk.FVTT4MMC.js";import"../../chunks/chunk.GLMWJUWZ.js";import"../../chunks/chunk.FWTZS7LK.js";import"../../chunks/chunk.LIC3WRPD.js";import"../../chunks/chunk.2FPBPQUJ.js";import"../../chunks/chunk.X4AWEYYO.js";import"../../chunks/chunk.KLRPP4NQ.js";import"../../chunks/chunk.HHVNQNCC.js";import"../../chunks/chunk.TV2TMO2H.js";import"../../chunks/chunk.B4KFHYLS.js";import"../../chunks/chunk.FDMPUSVV.js";import"../../chunks/chunk.NIRNX67K.js";import"../../chunks/chunk.Q54GPNUS.js";import"../../chunks/chunk.HJGLYEWV.js";import"../../chunks/chunk.AM2ZR2Y2.js";import"../../chunks/chunk.SARJ4UB5.js";import"../../chunks/chunk.D3S7D52C.js";import"../../chunks/chunk.LBRHB47I.js";import"../../chunks/chunk.QTD6NQFL.js";import"../../chunks/chunk.MHIIHFT3.js";import"../../chunks/chunk.2RF4WD6T.js";import"../../chunks/chunk.ZBHHLRFH.js";import"../../chunks/chunk.BWEPOOQP.js";import"../../chunks/chunk.KBZ32KWP.js";import"../../chunks/chunk.H544RQAW.js";import"../../chunks/chunk.UMC4I57R.js";import"../../chunks/chunk.6G2FNLAV.js";import"../../chunks/chunk.GP725TPQ.js";import"../../chunks/chunk.IZ2HVRME.js";export{a as default};
|
|
@@ -50,7 +50,6 @@ export default class DSAFilterSelect extends FilterBase {
|
|
|
50
50
|
nbOptions: number;
|
|
51
51
|
seeAll: boolean;
|
|
52
52
|
private debounceTimerId;
|
|
53
|
-
private optionsByValue;
|
|
54
53
|
private normalizedLabelsByValue;
|
|
55
54
|
/**
|
|
56
55
|
* The current value of the filter, representing a list of the selected options (or single option if “multiple”
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.5KKFNICD.js";import"../../chunks/chunk.RVJ7GEHV.js";import"../../chunks/chunk.TMUGGTVF.js";import"../../chunks/chunk.VILF2M2M.js";import"../../chunks/chunk.SK27PJHT.js";import"../../chunks/chunk.HFRREETM.js";import"../../chunks/chunk.IBACM3KM.js";import"../../chunks/chunk.I2EMSNY5.js";import"../../chunks/chunk.LEYHHYW4.js";import"../../chunks/chunk.4SRRFJ5K.js";import"../../chunks/chunk.EXQPVGOS.js";import"../../chunks/chunk.HYQVCAH7.js";import"../../chunks/chunk.HLXIBAA3.js";import"../../chunks/chunk.DYFOZ46Z.js";import"../../chunks/chunk.DFZPEZNV.js";import"../../chunks/chunk.A4WPNAA5.js";import"../../chunks/chunk.2YKQ7H24.js";import"../../chunks/chunk.UVI76N5N.js";import"../../chunks/chunk.YQETGEXV.js";import"../../chunks/chunk.5BVWK6K3.js";import"../../chunks/chunk.KUSB4WKX.js";import"../../chunks/chunk.QHSERCS2.js";import"../../chunks/chunk.UZFGXWW3.js";import"../../chunks/chunk.2OZWUNZO.js";import"../../chunks/chunk.BXY7ZIT5.js";import"../../chunks/chunk.FWFZG7TN.js";import"../../chunks/chunk.PAYML2WU.js";import"../../chunks/chunk.TYYYX2PR.js";import"../../chunks/chunk.3RLUYXJN.js";import"../../chunks/chunk.2TZ4LFPJ.js";import"../../chunks/chunk.U4TME7DS.js";import"../../chunks/chunk.PIG773U2.js";import"../../chunks/chunk.DPMHT2KP.js";import"../../chunks/chunk.WFPILKOS.js";import"../../chunks/chunk.SWSURKR7.js";import"../../chunks/chunk.SWEIVB73.js";import"../../chunks/chunk.ALIA5R6V.js";import"../../chunks/chunk.ONUDFMLG.js";import"../../chunks/chunk.NHMFB7ET.js";import"../../chunks/chunk.IDZ2RBHS.js";import"../../chunks/chunk.ODDQO2HD.js";import"../../chunks/chunk.W6E7LGND.js";import"../../chunks/chunk.FVTT4MMC.js";import"../../chunks/chunk.GLMWJUWZ.js";import"../../chunks/chunk.FWTZS7LK.js";import"../../chunks/chunk.LIC3WRPD.js";import"../../chunks/chunk.2FPBPQUJ.js";import"../../chunks/chunk.X4AWEYYO.js";import"../../chunks/chunk.KLRPP4NQ.js";import"../../chunks/chunk.HHVNQNCC.js";import"../../chunks/chunk.TV2TMO2H.js";import"../../chunks/chunk.B4KFHYLS.js";import"../../chunks/chunk.FDMPUSVV.js";import"../../chunks/chunk.NIRNX67K.js";import"../../chunks/chunk.Q54GPNUS.js";import"../../chunks/chunk.HJGLYEWV.js";import"../../chunks/chunk.AM2ZR2Y2.js";import"../../chunks/chunk.SARJ4UB5.js";import"../../chunks/chunk.D3S7D52C.js";import"../../chunks/chunk.LBRHB47I.js";import"../../chunks/chunk.QTD6NQFL.js";import"../../chunks/chunk.MHIIHFT3.js";import"../../chunks/chunk.2RF4WD6T.js";import"../../chunks/chunk.ZBHHLRFH.js";import"../../chunks/chunk.BWEPOOQP.js";import"../../chunks/chunk.KBZ32KWP.js";import"../../chunks/chunk.H544RQAW.js";import"../../chunks/chunk.UMC4I57R.js";import"../../chunks/chunk.6G2FNLAV.js";import"../../chunks/chunk.GP725TPQ.js";import"../../chunks/chunk.IZ2HVRME.js";export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunks/chunk.
|
|
1
|
+
import{a}from"../../chunks/chunk.EBMR5RUP.js";import"../../chunks/chunk.I5IBJET7.js";import"../../chunks/chunk.LCXOBOTQ.js";import"../../chunks/chunk.KIBXAWKS.js";import"../../chunks/chunk.FC4RDJJF.js";import"../../chunks/chunk.2TZ4LFPJ.js";import"../../chunks/chunk.O7SAIPOG.js";import"../../chunks/chunk.FVTT4MMC.js";import"../../chunks/chunk.GLMWJUWZ.js";import"../../chunks/chunk.HHVNQNCC.js";import"../../chunks/chunk.TV2TMO2H.js";import"../../chunks/chunk.FDMPUSVV.js";import"../../chunks/chunk.Q54GPNUS.js";import"../../chunks/chunk.HJGLYEWV.js";import"../../chunks/chunk.AM2ZR2Y2.js";import"../../chunks/chunk.SARJ4UB5.js";import"../../chunks/chunk.D3S7D52C.js";import"../../chunks/chunk.LBRHB47I.js";import"../../chunks/chunk.QTD6NQFL.js";import"../../chunks/chunk.MHIIHFT3.js";import"../../chunks/chunk.2RF4WD6T.js";import"../../chunks/chunk.ZBHHLRFH.js";import"../../chunks/chunk.BWEPOOQP.js";import"../../chunks/chunk.KBZ32KWP.js";import"../../chunks/chunk.H544RQAW.js";import"../../chunks/chunk.UMC4I57R.js";import"../../chunks/chunk.6G2FNLAV.js";import"../../chunks/chunk.GP725TPQ.js";import"../../chunks/chunk.IZ2HVRME.js";export{a as default};
|