@aquera/nile-elements 1.0.1-beta-1.9 → 1.0.1
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/README.md +30 -0
- package/dist/index.js +154 -105
- package/dist/internal/resizable-table-styles.cjs.js +1 -1
- package/dist/internal/resizable-table-styles.cjs.js.map +1 -1
- package/dist/internal/resizable-table-styles.esm.js +32 -17
- package/dist/nile-code-editor/extensionSetup.cjs.js +2 -2
- package/dist/nile-code-editor/extensionSetup.esm.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
- package/dist/nile-code-editor/nile-code-editor.esm.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.cjs.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.cjs.js.map +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js.map +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.css.esm.js +12 -2
- package/dist/nile-filter-chip/nile-filter-chip.esm.js +3 -3
- package/dist/nile-input/nile-input.cjs.js +1 -1
- package/dist/nile-input/nile-input.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.esm.js +2 -2
- package/dist/nile-loader/nile-loader.cjs.js +1 -1
- package/dist/nile-loader/nile-loader.cjs.js.map +1 -1
- package/dist/nile-loader/nile-loader.esm.js +3 -3
- package/dist/nile-option/nile-option.cjs.js +1 -1
- package/dist/nile-option/nile-option.cjs.js.map +1 -1
- package/dist/nile-option/nile-option.esm.js +2 -2
- package/dist/nile-option-group/nile-option-group.cjs.js +1 -1
- package/dist/nile-option-group/nile-option-group.cjs.js.map +1 -1
- package/dist/nile-option-group/nile-option-group.esm.js +1 -1
- package/dist/nile-radio/nile-radio.cjs.js +1 -1
- package/dist/nile-radio/nile-radio.cjs.js.map +1 -1
- package/dist/nile-radio/nile-radio.esm.js +2 -2
- package/dist/nile-radio-group/nile-radio-group.cjs.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.cjs.js.map +1 -1
- package/dist/nile-radio-group/nile-radio-group.esm.js +2 -2
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.esm.js +11 -9
- package/dist/nile-select/virtual-scroll-helper.cjs.js +1 -1
- package/dist/nile-select/virtual-scroll-helper.cjs.js.map +1 -1
- package/dist/nile-select/virtual-scroll-helper.esm.js +21 -0
- package/dist/nile-table-body/nile-table-body.css.cjs.js +1 -1
- package/dist/nile-table-body/nile-table-body.css.cjs.js.map +1 -1
- package/dist/nile-table-body/nile-table-body.css.esm.js +1 -1
- package/dist/nile-table-cell-item/nile-table-cell-item.css.cjs.js +1 -1
- package/dist/nile-table-cell-item/nile-table-cell-item.css.cjs.js.map +1 -1
- package/dist/nile-table-cell-item/nile-table-cell-item.css.esm.js +5 -5
- package/dist/nile-table-header-item/nile-table-header-item.css.cjs.js +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.css.cjs.js.map +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.css.esm.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js.map +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.esm.js +2 -2
- package/dist/nile-virtual-select/renderer.cjs.js +1 -1
- package/dist/nile-virtual-select/renderer.cjs.js.map +1 -1
- package/dist/nile-virtual-select/renderer.esm.js +11 -10
- package/dist/src/internal/resizable-table-styles.d.ts +2 -1
- package/dist/src/internal/resizable-table-styles.js +27 -11
- package/dist/src/internal/resizable-table-styles.js.map +1 -1
- package/dist/src/nile-code-editor/nile-code-editor.d.ts +1 -0
- package/dist/src/nile-code-editor/nile-code-editor.js +5 -0
- package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
- package/dist/src/nile-filter-chip/nile-filter-chip.css.js +10 -0
- package/dist/src/nile-filter-chip/nile-filter-chip.css.js.map +1 -1
- package/dist/src/nile-filter-chip/nile-filter-chip.js +1 -1
- package/dist/src/nile-filter-chip/nile-filter-chip.js.map +1 -1
- package/dist/src/nile-input/nile-input.d.ts +1 -0
- package/dist/src/nile-input/nile-input.js +4 -1
- package/dist/src/nile-input/nile-input.js.map +1 -1
- package/dist/src/nile-loader/nile-loader.js +3 -3
- package/dist/src/nile-loader/nile-loader.js.map +1 -1
- package/dist/src/nile-option/nile-option.js +6 -6
- package/dist/src/nile-option/nile-option.js.map +1 -1
- package/dist/src/nile-option-group/nile-option-group.js +1 -1
- package/dist/src/nile-option-group/nile-option-group.js.map +1 -1
- package/dist/src/nile-radio/nile-radio.d.ts +1 -0
- package/dist/src/nile-radio/nile-radio.js +8 -1
- package/dist/src/nile-radio/nile-radio.js.map +1 -1
- package/dist/src/nile-radio-group/nile-radio-group.d.ts +4 -1
- package/dist/src/nile-radio-group/nile-radio-group.js +25 -2
- package/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
- package/dist/src/nile-select/nile-select.d.ts +11 -1
- package/dist/src/nile-select/nile-select.js +59 -1
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/src/nile-select/virtual-scroll-helper.js +21 -0
- package/dist/src/nile-select/virtual-scroll-helper.js.map +1 -1
- package/dist/src/nile-table-body/nile-table-body.css.js +2 -2
- package/dist/src/nile-table-body/nile-table-body.css.js.map +1 -1
- package/dist/src/nile-table-cell-item/nile-table-cell-item.css.js +4 -4
- package/dist/src/nile-table-cell-item/nile-table-cell-item.css.js.map +1 -1
- package/dist/src/nile-table-header-item/nile-table-header-item.css.js +2 -2
- package/dist/src/nile-table-header-item/nile-table-header-item.css.js.map +1 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.js +2 -2
- package/dist/src/nile-virtual-select/nile-virtual-select.js.map +1 -1
- package/dist/src/nile-virtual-select/renderer.js +3 -2
- package/dist/src/nile-virtual-select/renderer.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/internal/resizable-table-styles.ts +28 -11
- package/src/nile-code-editor/nile-code-editor.ts +6 -0
- package/src/nile-filter-chip/nile-filter-chip.css.ts +10 -0
- package/src/nile-filter-chip/nile-filter-chip.ts +1 -1
- package/src/nile-input/nile-input.ts +5 -1
- package/src/nile-loader/nile-loader.ts +3 -3
- package/src/nile-option/nile-option.ts +6 -7
- package/src/nile-option-group/nile-option-group.ts +1 -1
- package/src/nile-radio/nile-radio.ts +7 -1
- package/src/nile-radio-group/nile-radio-group.ts +26 -4
- package/src/nile-select/nile-select.ts +65 -2
- package/src/nile-select/virtual-scroll-helper.ts +21 -0
- package/src/nile-table-body/nile-table-body.css.ts +2 -2
- package/src/nile-table-cell-item/nile-table-cell-item.css.ts +4 -4
- package/src/nile-table-header-item/nile-table-header-item.css.ts +2 -2
- package/src/nile-virtual-select/nile-virtual-select.ts +2 -2
- package/src/nile-virtual-select/renderer.ts +3 -2
- package/vscode-html-custom-data.json +34 -3
package/dist/index.js
CHANGED
@@ -1505,7 +1505,7 @@ const Ze=e=>e??B;function Ve(e,t){const M={waitUntilFirstUpdate:!1,...t};return(
|
|
1505
1505
|
* @license
|
1506
1506
|
* Copyright 2020 Google LLC
|
1507
1507
|
* SPDX-License-Identifier: BSD-3-Clause
|
1508
|
-
*/,{I:He}=oe,Xe=e=>void 0===e.strings,$e=()=>document.createComment(""),qe=(e,t,M)=>{const i=e._$AA.parentNode,n=void 0===t?e._$AB:t._$AA;if(void 0===M){const t=i.insertBefore($e(),n),o=i.insertBefore($e(),n);M=new He(t,o,e,e.options)}else{const t=M._$AB.nextSibling,o=M._$AM,N=o!==e;if(N){let t;M._$AQ?.(e),M._$AM=e,void 0!==M._$AP&&(t=e._$AU)!==o._$AU&&M._$AP(t)}if(t!==n||N){let e=M._$AA;for(;e!==t;){const t=e.nextSibling;i.insertBefore(e,n),e=t}}}return M},Ke=(e,t,M=e)=>(e._$AI(t,M),e),et={},tt=(e,t=et)=>e._$AH=t,Mt=e=>{e._$AP?.(!1,!0);let t=e._$AA;const M=e._$AB.nextSibling;for(;t!==M;){const e=t.nextSibling;t.remove(),t=e}},it=Oe(class extends he{constructor(e){if(super(e),e.type!==ye&&e.type!==Te&&e.type!==Ae)throw Error("The `live` directive is not allowed on child or event bindings");if(!Xe(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===G||t===B)return t;const M=e.element,i=e.name;if(e.type===ye){if(t===M[i])return G}else if(e.type===Ae){if(!!t===M.hasAttribute(i))return G}else if(e.type===Te&&M.getAttribute(i)===t+"")return G;return tt(e),t}});let nt=class extends Pe{constructor(){super(...arguments),this.formControlController=new fe(this,{assumeInteractionOn:["nile-blur","nile-input"]}),this.hasSlotController=new ve(this,"help-text","label"),this.hasFocus=!1,this.title="",this.type="text",this.name="",this.value="",this.checkNonPrintableChar=!1,this.defaultValue="",this.size="medium",this.filled=!1,this.warning=!1,this.error=!1,this.success=!1,this.destructive=!1,this.pill=!1,this.label="",this.helpText="",this.errorMessage="",this.clearable=!1,this.disabled=!1,this.placeholder="",this.readonly=!1,this.passwordToggle=!1,this.passwordVisible=!1,this.noSpinButtons=!1,this.form="",this.required=!1,this.autocomplete="off",this.spellcheck=!0,this.canSavePassword=!1,this.hasPrintableCharacters=!1,this.noOutline=!1,this.noPadding=!1}connectedCallback(){super.connectedCallback(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}get valueAsDate(){const e=document.createElement("input");return e.type="date",e.value=this.value,e.valueAsDate}set valueAsDate(e){const t=document.createElement("input");t.type="date",t.valueAsDate=e,this.value=t.value}get valueAsNumber(){const e=document.createElement("input");return e.type="number",e.value=this.value,e.valueAsNumber}set valueAsNumber(e){const t=document.createElement("input");t.type="number",t.valueAsNumber=e,this.value=t.value}get validity(){return this.input.validity}get validationMessage(){return this.input.validationMessage}firstUpdated(){this.emit("nile-after-init"),this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("nile-blur",{value:this.value})}handleChange(){this.value=this.input.value,this.emit("nile-change",{value:this.value})}handleClearClick(e){this.value="",this.emit("nile-clear",{value:this.value}),this.emit("nile-input",{value:this.value}),this.emit("nile-change",{value:this.value}),this.input.focus(),e.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("nile-focus",{value:this.value}),this.checkNonPrintableChar&&this.markNonPrintableCharacters()}handleInput(){this.value=this.input.value,this.formControlController.updateValidity(),this.emit("nile-input",{value:this.value})}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}handleKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;"Enter"!==e.key||t||setTimeout((()=>{e.defaultPrevented||e.isComposing||this.formControlController.submit()}))}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step)}async handleValueChange(){await this.updateComplete,this.checkNonPrintableChar&&this.markNonPrintableCharacters()}markNonPrintableCharacters(){let e="";if(this.hasPrintableCharacters=!1,this.value)for(let t=0,M=this.value.length;t<M;t++){this.value.charCodeAt(t)>127?(e+=`<span class="input__srtiked-text">${this.value.charAt(t)}</span>`,this.hasPrintableCharacters=!0):e+=this.value.charAt(t)}this.markedValue=e,this.emit("nile-value-marked",{value:this.markedValue,hasNonPrintableCharacters:this.hasPrintableCharacters})}removeAllNonPrintableCharacters(){let e="";if(this.value)for(let t=0,M=this.value.length;t<M;t++){this.value.charCodeAt(t)<128&&(e+=this.value.charAt(t))}this.value=e,this.emit("nile-npchar-removed",{value:this.value})}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(e,t,M="none"){this.input.setSelectionRange(e,t,M)}setRangeText(e,t,M,i){this.input.setRangeText(e,t,M,i),this.value!==this.input.value&&(this.value=this.input.value)}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){const e=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const t=!!this.label||!!e,M=this.hasSlotController.test("label-suffix"),i=!!this.helpText,n=!!this.errorMessage,o=this.clearable&&!this.disabled&&!this.readonly&&("number"==typeof this.value||this.value.length>0);return R`
|
1508
|
+
*/,{I:He}=oe,Xe=e=>void 0===e.strings,$e=()=>document.createComment(""),qe=(e,t,M)=>{const i=e._$AA.parentNode,n=void 0===t?e._$AB:t._$AA;if(void 0===M){const t=i.insertBefore($e(),n),o=i.insertBefore($e(),n);M=new He(t,o,e,e.options)}else{const t=M._$AB.nextSibling,o=M._$AM,N=o!==e;if(N){let t;M._$AQ?.(e),M._$AM=e,void 0!==M._$AP&&(t=e._$AU)!==o._$AU&&M._$AP(t)}if(t!==n||N){let e=M._$AA;for(;e!==t;){const t=e.nextSibling;i.insertBefore(e,n),e=t}}}return M},Ke=(e,t,M=e)=>(e._$AI(t,M),e),et={},tt=(e,t=et)=>e._$AH=t,Mt=e=>{e._$AP?.(!1,!0);let t=e._$AA;const M=e._$AB.nextSibling;for(;t!==M;){const e=t.nextSibling;t.remove(),t=e}},it=Oe(class extends he{constructor(e){if(super(e),e.type!==ye&&e.type!==Te&&e.type!==Ae)throw Error("The `live` directive is not allowed on child or event bindings");if(!Xe(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===G||t===B)return t;const M=e.element,i=e.name;if(e.type===ye){if(t===M[i])return G}else if(e.type===Ae){if(!!t===M.hasAttribute(i))return G}else if(e.type===Te&&M.getAttribute(i)===t+"")return G;return tt(e),t}});let nt=class extends Pe{constructor(){super(...arguments),this.formControlController=new fe(this,{assumeInteractionOn:["nile-blur","nile-input"]}),this.hasSlotController=new ve(this,"help-text","label"),this.hasFocus=!1,this.title="",this.type="text",this.name="",this.value="",this.checkNonPrintableChar=!1,this.defaultValue="",this.size="medium",this.filled=!1,this.warning=!1,this.error=!1,this.success=!1,this.destructive=!1,this.pill=!1,this.label="",this.helpText="",this.errorMessage="",this.clearable=!1,this.disabled=!1,this.placeholder="",this.readonly=!1,this.passwordToggle=!1,this.passwordVisible=!1,this.noSpinButtons=!1,this.form="",this.required=!1,this.autocomplete="off",this.spellcheck=!0,this.canSavePassword=!1,this.hasPrintableCharacters=!1,this.noOutline=!1,this.noPadding=!1}connectedCallback(){super.connectedCallback(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}get valueAsDate(){const e=document.createElement("input");return e.type="date",e.value=this.value,e.valueAsDate}set valueAsDate(e){const t=document.createElement("input");t.type="date",t.valueAsDate=e,this.value=t.value}get valueAsNumber(){const e=document.createElement("input");return e.type="number",e.value=this.value,e.valueAsNumber}set valueAsNumber(e){const t=document.createElement("input");t.type="number",t.valueAsNumber=e,this.value=t.value}get validity(){return this.input.validity}get validationMessage(){return this.input.validationMessage}firstUpdated(){this.emit("nile-after-init"),this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("nile-blur",{value:this.value})}handleChange(){this.value=this.input.value,this.emit("nile-change",{value:this.value})}handleClearClick(e){this.value="",this.emit("nile-clear",{value:this.value}),this.emit("nile-input",{value:this.value}),this.emit("nile-change",{value:this.value}),this.input.focus(),e.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("nile-focus",{value:this.value}),this.checkNonPrintableChar&&this.markNonPrintableCharacters()}handleInput(){this.value=this.input.value,this.formControlController.updateValidity(),this.emit("nile-input",{value:this.value})}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}handleKeyDown(e){const t=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;"Enter"!==e.key||t||setTimeout((()=>{e.defaultPrevented||e.isComposing||this.formControlController.submit()}))}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step)}async handleValueChange(){await this.updateComplete,this.checkNonPrintableChar&&this.markNonPrintableCharacters()}markNonPrintableCharacters(){let e="";if(this.hasPrintableCharacters=!1,this.value)for(let t=0,M=this.value.length;t<M;t++){this.value.charCodeAt(t)>127?(e+=`<span class="input__srtiked-text">${this.value.charAt(t)}</span>`,this.hasPrintableCharacters=!0):e+=this.value.charAt(t)}this.markedValue=e,this.emit("nile-value-marked",{value:this.markedValue,hasNonPrintableCharacters:this.hasPrintableCharacters})}removeAllNonPrintableCharacters(){let e="";if(this.value)for(let t=0,M=this.value.length;t<M;t++){this.value.charCodeAt(t)<128&&(e+=this.value.charAt(t))}this.value=e,this.emit("nile-npchar-removed",{value:this.value})}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(e,t,M="none"){this.input.setSelectionRange(e,t,M)}setRangeText(e,t,M,i){this.input.setRangeText(e,t,M,i),this.value!==this.input.value&&(this.value=this.input.value)}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}inputFocus(){this.input.focus()}render(){const e=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const t=!!this.label||!!e,M=this.hasSlotController.test("label-suffix"),i=!!this.helpText,n=!!this.errorMessage,o=this.clearable&&!this.disabled&&!this.readonly&&("number"==typeof this.value||this.value.length>0);return R`
|
1509
1509
|
<div
|
1510
1510
|
part="form-control"
|
1511
1511
|
class=${Le({"form-control":!0,"form-control--small":"small"===this.size,"form-control--medium":"medium"===this.size,"form-control--large":"large"===this.size,"form-control--has-label":t,"form-control--has-help-text":i})}
|
@@ -1637,7 +1637,7 @@ const Ze=e=>e??B;function Ve(e,t){const M={waitUntilFirstUpdate:!1,...t};return(
|
|
1637
1637
|
`:""}
|
1638
1638
|
</div>
|
1639
1639
|
</div>
|
1640
|
-
`}};nt.styles=Fe,e([Ie(".input__control")],nt.prototype,"input",void 0),e([je()],nt.prototype,"hasFocus",void 0),e([ue()],nt.prototype,"title",void 0),e([ue({reflect:!0})],nt.prototype,"type",void 0),e([ue()],nt.prototype,"name",void 0),e([ue()],nt.prototype,"value",void 0),e([ue({type:Boolean})],nt.prototype,"checkNonPrintableChar",void 0),e([Je()],nt.prototype,"defaultValue",void 0),e([ue({reflect:!0})],nt.prototype,"size",void 0),e([ue({type:Boolean,reflect:!0})],nt.prototype,"filled",void 0),e([ue({type:Boolean})],nt.prototype,"warning",void 0),e([ue({type:Boolean})],nt.prototype,"error",void 0),e([ue({type:Boolean})],nt.prototype,"success",void 0),e([ue({type:Boolean})],nt.prototype,"destructive",void 0),e([ue({type:Boolean,reflect:!0})],nt.prototype,"pill",void 0),e([ue()],nt.prototype,"label",void 0),e([ue({attribute:"help-text",reflect:!0})],nt.prototype,"helpText",void 0),e([ue({attribute:"error-message",reflect:!0})],nt.prototype,"errorMessage",void 0),e([ue({type:Boolean})],nt.prototype,"clearable",void 0),e([ue({type:Boolean,reflect:!0})],nt.prototype,"disabled",void 0),e([ue()],nt.prototype,"placeholder",void 0),e([ue({type:Boolean,reflect:!0})],nt.prototype,"readonly",void 0),e([ue({attribute:"password-toggle",type:Boolean})],nt.prototype,"passwordToggle",void 0),e([ue({attribute:"password-visible",type:Boolean})],nt.prototype,"passwordVisible",void 0),e([ue({attribute:"no-spin-buttons",type:Boolean})],nt.prototype,"noSpinButtons",void 0),e([ue({reflect:!0})],nt.prototype,"form",void 0),e([ue({type:Boolean,reflect:!0})],nt.prototype,"required",void 0),e([ue()],nt.prototype,"pattern",void 0),e([ue({type:Number})],nt.prototype,"minlength",void 0),e([ue({type:Number})],nt.prototype,"maxlength",void 0),e([ue()],nt.prototype,"min",void 0),e([ue()],nt.prototype,"max",void 0),e([ue()],nt.prototype,"step",void 0),e([ue()],nt.prototype,"autocapitalize",void 0),e([ue()],nt.prototype,"autocorrect",void 0),e([ue()],nt.prototype,"autocomplete",void 0),e([ue({type:Boolean})],nt.prototype,"autofocus",void 0),e([ue()],nt.prototype,"enterkeyhint",void 0),e([ue({type:Boolean,converter:{fromAttribute:e=>!(!e||"false"===e),toAttribute:e=>e?"true":"false"}})],nt.prototype,"spellcheck",void 0),e([ue({type:Boolean,reflect:!0})],nt.prototype,"canSavePassword",void 0),e([ue()],nt.prototype,"inputmode",void 0),e([je()],nt.prototype,"hasPrintableCharacters",void 0),e([je()],nt.prototype,"markedValue",void 0),e([ue()],nt.prototype,"noOutline",void 0),e([ue()],nt.prototype,"noPadding",void 0),e([Ve("disabled",{waitUntilFirstUpdate:!0})],nt.prototype,"handleDisabledChange",null),e([Ve("step",{waitUntilFirstUpdate:!0})],nt.prototype,"handleStepChange",null),e([Ve("value",{waitUntilFirstUpdate:!0})],nt.prototype,"handleValueChange",null),nt=e([ge("nile-input")],nt);let ot=class extends se{constructor(){super(...arguments),this.title="",this.showSidebar=!1}get buttonClassMap(){return{"nds-menu--active":this.showSidebar}}render(){return R`
|
1640
|
+
`}};nt.styles=Fe,e([Ie(".input__control")],nt.prototype,"input",void 0),e([je()],nt.prototype,"hasFocus",void 0),e([ue()],nt.prototype,"title",void 0),e([ue({reflect:!0})],nt.prototype,"type",void 0),e([ue()],nt.prototype,"name",void 0),e([ue()],nt.prototype,"value",void 0),e([ue({type:Boolean})],nt.prototype,"checkNonPrintableChar",void 0),e([Je()],nt.prototype,"defaultValue",void 0),e([ue({reflect:!0})],nt.prototype,"size",void 0),e([ue({type:Boolean,reflect:!0})],nt.prototype,"filled",void 0),e([ue({type:Boolean})],nt.prototype,"warning",void 0),e([ue({type:Boolean})],nt.prototype,"error",void 0),e([ue({type:Boolean})],nt.prototype,"success",void 0),e([ue({type:Boolean})],nt.prototype,"destructive",void 0),e([ue({type:Boolean,reflect:!0})],nt.prototype,"pill",void 0),e([ue()],nt.prototype,"label",void 0),e([ue({attribute:"help-text",reflect:!0})],nt.prototype,"helpText",void 0),e([ue({attribute:"error-message",reflect:!0})],nt.prototype,"errorMessage",void 0),e([ue({type:Boolean})],nt.prototype,"clearable",void 0),e([ue({type:Boolean,reflect:!0})],nt.prototype,"disabled",void 0),e([ue()],nt.prototype,"placeholder",void 0),e([ue({type:Boolean,reflect:!0})],nt.prototype,"readonly",void 0),e([ue({attribute:"password-toggle",type:Boolean})],nt.prototype,"passwordToggle",void 0),e([ue({attribute:"password-visible",type:Boolean})],nt.prototype,"passwordVisible",void 0),e([ue({attribute:"no-spin-buttons",type:Boolean})],nt.prototype,"noSpinButtons",void 0),e([ue({reflect:!0})],nt.prototype,"form",void 0),e([ue({type:Boolean,reflect:!0})],nt.prototype,"required",void 0),e([ue()],nt.prototype,"pattern",void 0),e([ue({type:Number})],nt.prototype,"minlength",void 0),e([ue({type:Number})],nt.prototype,"maxlength",void 0),e([ue()],nt.prototype,"min",void 0),e([ue()],nt.prototype,"max",void 0),e([ue()],nt.prototype,"step",void 0),e([ue()],nt.prototype,"autocapitalize",void 0),e([ue()],nt.prototype,"autocorrect",void 0),e([ue()],nt.prototype,"autocomplete",void 0),e([ue({type:Boolean,attribute:!0,reflect:!0})],nt.prototype,"autofocus",void 0),e([ue()],nt.prototype,"enterkeyhint",void 0),e([ue({type:Boolean,converter:{fromAttribute:e=>!(!e||"false"===e),toAttribute:e=>e?"true":"false"}})],nt.prototype,"spellcheck",void 0),e([ue({type:Boolean,reflect:!0})],nt.prototype,"canSavePassword",void 0),e([ue()],nt.prototype,"inputmode",void 0),e([je()],nt.prototype,"hasPrintableCharacters",void 0),e([je()],nt.prototype,"markedValue",void 0),e([ue()],nt.prototype,"noOutline",void 0),e([ue()],nt.prototype,"noPadding",void 0),e([Ve("disabled",{waitUntilFirstUpdate:!0})],nt.prototype,"handleDisabledChange",null),e([Ve("step",{waitUntilFirstUpdate:!0})],nt.prototype,"handleStepChange",null),e([Ve("value",{waitUntilFirstUpdate:!0})],nt.prototype,"handleValueChange",null),nt=e([ge("nile-input")],nt);let ot=class extends se{constructor(){super(...arguments),this.title="",this.showSidebar=!1}get buttonClassMap(){return{"nds-menu--active":this.showSidebar}}render(){return R`
|
1641
1641
|
<div class="nile-menu--wrapper ${Le(this.buttonClassMap)}" >
|
1642
1642
|
<div class="nile-menu-group">
|
1643
1643
|
<a class="nile-logo" href="/">
|
@@ -2745,7 +2745,7 @@ const Ze=e=>e??B;function Ve(e,t){const M={waitUntilFirstUpdate:!1,...t};return(
|
|
2745
2745
|
border-radius: var(--nile-radius-sm, var(--ng-radius-xl));
|
2746
2746
|
border: var(--nile-border-width-1, var(--ng-border-width-1)) solid var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
2747
2747
|
}
|
2748
|
-
`;let Yt=class extends Pe{constructor(){super(...arguments),this.checked=!1,this.hasFocus=!1,this.value="",this.size="medium",this.disabled=!1,this.islabelborder=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners(),this.emit("nile-init")}disconnectedCallback(){this.removeEventListeners(),this.emit("nile-destroy")}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("nile-blur")}handleClick(){this.disabled||(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("nile-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return R`
|
2748
|
+
`;let Yt=class extends Pe{constructor(){super(...arguments),this.checked=!1,this.hasFocus=!1,this.value="",this.size="medium",this.disabled=!1,this.islabelborder=!1,this.allowUncheck=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners(),this.emit("nile-init")}disconnectedCallback(){this.removeEventListeners(),this.emit("nile-destroy")}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("nile-blur")}handleClick(){this.allowUncheck&&!this.disabled?this.checked=!this.checked:this.disabled||(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("nile-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return R`
|
2749
2749
|
<span
|
2750
2750
|
part="base"
|
2751
2751
|
class=${Le({radio:!0,"radio--checked":this.checked,"radio--disabled":this.disabled,"radio--focused":this.hasFocus,"radio--medium":"medium"===this.size,radio__label_border:this.islabelborder})}
|
@@ -2756,7 +2756,7 @@ const Ze=e=>e??B;function Ve(e,t){const M={waitUntilFirstUpdate:!1,...t};return(
|
|
2756
2756
|
|
2757
2757
|
<slot part="label" class="radio__label"></slot>
|
2758
2758
|
</span>
|
2759
|
-
`}};Yt.styles=ft,e([ue({type:Boolean})],Yt.prototype,"checked",void 0),e([je()],Yt.prototype,"hasFocus",void 0),e([ue()],Yt.prototype,"value",void 0),e([ue({reflect:!0})],Yt.prototype,"size",void 0),e([ue({type:Boolean,reflect:!0})],Yt.prototype,"disabled",void 0),e([ue({type:Boolean,reflect:!0})],Yt.prototype,"islabelborder",void 0),e([Ve("checked")],Yt.prototype,"handleCheckedChange",null),e([Ve("disabled",{waitUntilFirstUpdate:!0})],Yt.prototype,"handleDisabledChange",null),Yt=e([ge("nile-radio")],Yt);var vt=N`
|
2759
|
+
`}};Yt.styles=ft,e([ue({type:Boolean})],Yt.prototype,"checked",void 0),e([je()],Yt.prototype,"hasFocus",void 0),e([ue()],Yt.prototype,"value",void 0),e([ue({reflect:!0})],Yt.prototype,"size",void 0),e([ue({type:Boolean,reflect:!0})],Yt.prototype,"disabled",void 0),e([ue({type:Boolean,reflect:!0})],Yt.prototype,"islabelborder",void 0),e([ue({type:Boolean,reflect:!0})],Yt.prototype,"allowUncheck",void 0),e([Ve("checked")],Yt.prototype,"handleCheckedChange",null),e([Ve("disabled",{waitUntilFirstUpdate:!0})],Yt.prototype,"handleDisabledChange",null),Yt=e([ge("nile-radio")],Yt);var vt=N`
|
2760
2760
|
|
2761
2761
|
:host {
|
2762
2762
|
display: block;
|
@@ -2803,7 +2803,7 @@ const Ze=e=>e??B;function Ve(e,t){const M={waitUntilFirstUpdate:!1,...t};return(
|
|
2803
2803
|
white-space: nowrap;
|
2804
2804
|
border: 0;
|
2805
2805
|
}
|
2806
|
-
`;let Zt=class extends Pe{constructor(){super(...arguments),this.hasSlotController=new ve(this,"help-text","label"),this.customValidityMessage="",this.hasButtonGroup=!1,this.defaultValue="",this.label="",this.name="option",this.value="",this.form="",this.required=!1,this.labelInline=!1,this.disabled=!1,this.helpText="",this.errorMessage="",this.islabelborder=!1}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value,this.handleInitialDisabledState(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}getAllRadios(){return[...this.querySelectorAll("nile-radio")]}handleRadioClick(e){const t=e.target.closest("nile-radio"),M=this.getAllRadios(),i=this.value;t.disabled||this.disabled||(this.value=t.value,M.forEach((e=>e.checked=e===t)),this.value
|
2806
|
+
`;let Zt=class extends Pe{constructor(){super(...arguments),this.hasSlotController=new ve(this,"help-text","label"),this.customValidityMessage="",this.hasButtonGroup=!1,this.defaultValue="",this.label="",this.name="option",this.value="",this.form="",this.required=!1,this.labelInline=!1,this.disabled=!1,this.helpText="",this.errorMessage="",this.islabelborder=!1,this.allowUncheckGroup=!1}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value,this.handleInitialDisabledState(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}getAllRadios(){return[...this.querySelectorAll("nile-radio")]}handleRadioClick(e){const t=e.target.closest("nile-radio"),M=this.getAllRadios(),i=this.value;t.disabled||this.disabled||(this.value=t.value,this.allowUncheckGroup||M.forEach((e=>{e.checked=e===t})),this.allowUncheckGroup||this.value===i?this.allowUncheckGroup&&(this.emit("change",{value:this.value,checked:t.checked}),this.emit("input")):(this.emit("change",{value:this.value}),this.emit("input")))}updated(e){super.updated(e),e.has("allowUncheckGroup")&&this.allowUncheckGroup&&this.getAllRadios().forEach((e=>{e.allowUncheck=!0}))}handleDisabledChange(){this.getAllRadios().forEach((e=>{e.disabled=this.disabled}))}handleInitialDisabledState(){this.getAllRadios().forEach((e=>{e.disabled=e.hasAttribute("disabled")?e.disabled:this.disabled}))}handleKeyDown(e){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(e.key))return;const t=this.getAllRadios().filter((e=>!e.disabled)),M=t.find((e=>e.checked))??t[0],i=" "===e.key?0:["ArrowUp","ArrowLeft"].includes(e.key)?-1:1,n=this.value;let o=t.indexOf(M)+i;o<0&&(o=t.length-1),o>t.length-1&&(o=0),this.getAllRadios().forEach((e=>{e.checked=!1,this.hasButtonGroup||(e.tabIndex=-1)})),this.value=t[o].value,t[o].checked=!0,this.hasButtonGroup?t[o].shadowRoot.querySelector("button").focus():(t[o].tabIndex=0,t[o].focus()),this.value!==n&&(this.emit("change"),this.emit("input")),e.preventDefault()}handleLabelClick(){const e=this.getAllRadios(),t=e.find((e=>e.checked)),M=t||e[0];M&&M.focus()}handleSlotChange(){const e=this.getAllRadios();e.forEach((e=>{e.checked=e.value===this.value,this.islabelborder&&(e.islabelborder=!0)}));if(this.hasButtonGroup=e.some((e=>"nile-radio-button"===e.tagName.toLowerCase())),!e.some((e=>e.checked)))if(this.hasButtonGroup){e[0].shadowRoot.querySelector("button").tabIndex=0}else e[0].tabIndex=0;this.hasButtonGroup&&this.shadowRoot?.querySelector("nile-button-group")}updateCheckedRadio(){this.getAllRadios().forEach((e=>e.checked=e.value===this.value))}handleValueChange(){this.hasUpdated&&this.updateCheckedRadio()}render(){const e=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const t=this.hasSlotController.test("label-suffix"),M=!!this.label||!!e,i=!!this.helpText,n=!!this.errorMessage,o=R`
|
2807
2807
|
<slot
|
2808
2808
|
@click=${this.handleRadioClick}
|
2809
2809
|
@keydown=${this.handleKeyDown}
|
@@ -2861,7 +2861,7 @@ const Ze=e=>e??B;function Ve(e,t){const M={waitUntilFirstUpdate:!1,...t};return(
|
|
2861
2861
|
`:""}
|
2862
2862
|
|
2863
2863
|
</fieldset>
|
2864
|
-
`}};Zt.styles=vt,e([Ie("slot:not([name])")],Zt.prototype,"defaultSlot",void 0),e([je()],Zt.prototype,"hasButtonGroup",void 0),e([je()],Zt.prototype,"defaultValue",void 0),e([ue()],Zt.prototype,"label",void 0),e([ue()],Zt.prototype,"name",void 0),e([ue({reflect:!0})],Zt.prototype,"value",void 0),e([ue({reflect:!0})],Zt.prototype,"form",void 0),e([ue({type:Boolean,reflect:!0})],Zt.prototype,"required",void 0),e([ue({type:Boolean,reflect:!0})],Zt.prototype,"labelInline",void 0),e([ue({type:Boolean,reflect:!0})],Zt.prototype,"disabled",void 0),e([ue({attribute:"help-text",reflect:!0})],Zt.prototype,"helpText",void 0),e([ue({attribute:"error-message",reflect:!0})],Zt.prototype,"errorMessage",void 0),e([ue({type:Boolean,reflect:!0})],Zt.prototype,"islabelborder",void 0),e([Ve("disabled",{waitUntilFirstUpdate:!0})],Zt.prototype,"handleDisabledChange",null),e([Ve("value")],Zt.prototype,"handleValueChange",null),Zt=e([ge("nile-radio-group")],Zt);const Vt=Math.min,Wt=Math.max,Pt=Math.round,Rt=Math.floor,Gt=e=>({x:e,y:e}),Bt={left:"right",right:"left",bottom:"top",top:"bottom"},_t={start:"end",end:"start"};function Ft(e,t,M){return Wt(e,Vt(t,M))}function Jt(e,t){return"function"==typeof e?e(t):e}function Ht(e){return e.split("-")[0]}function Xt(e){return e.split("-")[1]}function $t(e){return"x"===e?"y":"x"}function qt(e){return"y"===e?"height":"width"}function Kt(e){return["top","bottom"].includes(Ht(e))?"y":"x"}function eM(e){return $t(Kt(e))}function tM(e){return e.replace(/start|end/g,(e=>_t[e]))}function MM(e){return e.replace(/left|right|bottom|top/g,(e=>Bt[e]))}function iM(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function nM(e){const{x:t,y:M,width:i,height:n}=e;return{width:i,height:n,top:M,left:t,right:t+i,bottom:M+n,x:t,y:M}}function oM(e,t,M){let{reference:i,floating:n}=e;const o=Kt(t),N=eM(t),r=qt(N),s=Ht(t),a="y"===o,g=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2,D=i[r]/2-n[r]/2;let u;switch(s){case"top":u={x:g,y:i.y-n.height};break;case"bottom":u={x:g,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:l};break;case"left":u={x:i.x-n.width,y:l};break;default:u={x:i.x,y:i.y}}switch(Xt(t)){case"start":u[N]-=D*(M&&a?-1:1);break;case"end":u[N]+=D*(M&&a?-1:1)}return u}async function NM(e,t){var M;void 0===t&&(t={});const{x:i,y:n,platform:o,rects:N,elements:r,strategy:s}=e,{boundary:a="clippingAncestors",rootBoundary:g="viewport",elementContext:l="floating",altBoundary:D=!1,padding:u=0}=Jt(t,e),j=iM(u),c=r[D?"floating"===l?"reference":"floating":l],I=nM(await o.getClippingRect({element:null==(M=await(null==o.isElement?void 0:o.isElement(c)))||M?c:c.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(r.floating)),boundary:a,rootBoundary:g,strategy:s})),z="floating"===l?{x:i,y:n,width:N.floating.width,height:N.floating.height}:N.reference,T=await(null==o.getOffsetParent?void 0:o.getOffsetParent(r.floating)),d=await(null==o.isElement?void 0:o.isElement(T))&&await(null==o.getScale?void 0:o.getScale(T))||{x:1,y:1},y=nM(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:z,offsetParent:T,strategy:s}):z);return{top:(I.top-y.top+j.top)/d.y,bottom:(y.bottom-I.bottom+j.bottom)/d.y,left:(I.left-y.left+j.left)/d.x,right:(y.right-I.right+j.right)/d.x}}function rM(){return"undefined"!=typeof window}function sM(e){return lM(e)?(e.nodeName||"").toLowerCase():"#document"}function aM(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function gM(e){var t;return null==(t=(lM(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function lM(e){return!!rM()&&(e instanceof Node||e instanceof aM(e).Node)}function DM(e){return!!rM()&&(e instanceof Element||e instanceof aM(e).Element)}function uM(e){return!!rM()&&(e instanceof HTMLElement||e instanceof aM(e).HTMLElement)}function jM(e){return!(!rM()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof aM(e).ShadowRoot)}function cM(e){const{overflow:t,overflowX:M,overflowY:i,display:n}=AM(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+M)&&!["inline","contents"].includes(n)}function IM(e){return["table","td","th"].includes(sM(e))}function zM(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function TM(e){const t=dM(),M=DM(e)?AM(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!M[e]&&"none"!==M[e]))||!!M.containerType&&"normal"!==M.containerType||!t&&!!M.backdropFilter&&"none"!==M.backdropFilter||!t&&!!M.filter&&"none"!==M.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(M.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(M.contain||"").includes(e)))}function dM(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function yM(e){return["html","body","#document"].includes(sM(e))}function AM(e){return aM(e).getComputedStyle(e)}function OM(e){return DM(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hM(e){if("html"===sM(e))return e;const t=e.assignedSlot||e.parentNode||jM(e)&&e.host||gM(e);return jM(t)?t.host:t}function LM(e){const t=hM(e);return yM(t)?e.ownerDocument?e.ownerDocument.body:e.body:uM(t)&&cM(t)?t:LM(t)}function xM(e,t,M){var i;void 0===t&&(t=[]),void 0===M&&(M=!0);const n=LM(e),o=n===(null==(i=e.ownerDocument)?void 0:i.body),N=aM(n);if(o){const e=pM(N);return t.concat(N,N.visualViewport||[],cM(n)?n:[],e&&M?xM(e):[])}return t.concat(n,xM(n,[],M))}function pM(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function SM(e){const t=AM(e);let M=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const n=uM(e),o=n?e.offsetWidth:M,N=n?e.offsetHeight:i,r=Pt(M)!==o||Pt(i)!==N;return r&&(M=o,i=N),{width:M,height:i,$:r}}function EM(e){return DM(e)?e:e.contextElement}function QM(e){const t=EM(e);if(!uM(t))return Gt(1);const M=t.getBoundingClientRect(),{width:i,height:n,$:o}=SM(t);let N=(o?Pt(M.width):M.width)/i,r=(o?Pt(M.height):M.height)/n;return N&&Number.isFinite(N)||(N=1),r&&Number.isFinite(r)||(r=1),{x:N,y:r}}const wM=Gt(0);function kM(e){const t=aM(e);return dM()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:wM}function mM(e,t,M,i){void 0===t&&(t=!1),void 0===M&&(M=!1);const n=e.getBoundingClientRect(),o=EM(e);let N=Gt(1);t&&(i?DM(i)&&(N=QM(i)):N=QM(e));const r=function(e,t,M){return void 0===t&&(t=!1),!(!M||t&&M!==aM(e))&&t}(o,M,i)?kM(o):Gt(0);let s=(n.left+r.x)/N.x,a=(n.top+r.y)/N.y,g=n.width/N.x,l=n.height/N.y;if(o){const e=aM(o),t=i&&DM(i)?aM(i):i;let M=e,n=pM(M);for(;n&&i&&t!==M;){const e=QM(n),t=n.getBoundingClientRect(),i=AM(n),o=t.left+(n.clientLeft+parseFloat(i.paddingLeft))*e.x,N=t.top+(n.clientTop+parseFloat(i.paddingTop))*e.y;s*=e.x,a*=e.y,g*=e.x,l*=e.y,s+=o,a+=N,M=aM(n),n=pM(M)}}return nM({width:g,height:l,x:s,y:a})}function CM(e,t){const M=OM(e).scrollLeft;return t?t.left+M:mM(gM(e)).left+M}function UM(e,t,M){void 0===M&&(M=!1);const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-(M?0:CM(e,i)),y:i.top+t.scrollTop}}function bM(e,t,M){let i;if("viewport"===t)i=function(e,t){const M=aM(e),i=gM(e),n=M.visualViewport;let o=i.clientWidth,N=i.clientHeight,r=0,s=0;if(n){o=n.width,N=n.height;const e=dM();(!e||e&&"fixed"===t)&&(r=n.offsetLeft,s=n.offsetTop)}return{width:o,height:N,x:r,y:s}}(e,M);else if("document"===t)i=function(e){const t=gM(e),M=OM(e),i=e.ownerDocument.body,n=Wt(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=Wt(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let N=-M.scrollLeft+CM(e);const r=-M.scrollTop;return"rtl"===AM(i).direction&&(N+=Wt(t.clientWidth,i.clientWidth)-n),{width:n,height:o,x:N,y:r}}(gM(e));else if(DM(t))i=function(e,t){const M=mM(e,!0,"fixed"===t),i=M.top+e.clientTop,n=M.left+e.clientLeft,o=uM(e)?QM(e):Gt(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:n*o.x,y:i*o.y}}(t,M);else{const M=kM(e);i={x:t.x-M.x,y:t.y-M.y,width:t.width,height:t.height}}return nM(i)}function fM(e,t){const M=hM(e);return!(M===t||!DM(M)||yM(M))&&("fixed"===AM(M).position||fM(M,t))}function YM(e,t,M){const i=uM(t),n=gM(t),o="fixed"===M,N=mM(e,!0,o,t);let r={scrollLeft:0,scrollTop:0};const s=Gt(0);if(i||!i&&!o)if(("body"!==sM(t)||cM(n))&&(r=OM(t)),i){const e=mM(t,!0,o,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else n&&(s.x=CM(n));const a=!n||i||o?Gt(0):UM(n,r);return{x:N.left+r.scrollLeft-s.x-a.x,y:N.top+r.scrollTop-s.y-a.y,width:N.width,height:N.height}}function vM(e){return"static"===AM(e).position}function ZM(e,t){if(!uM(e)||"fixed"===AM(e).position)return null;if(t)return t(e);let M=e.offsetParent;return gM(e)===M&&(M=M.ownerDocument.body),M}function VM(e,t){const M=aM(e);if(zM(e))return M;if(!uM(e)){let t=hM(e);for(;t&&!yM(t);){if(DM(t)&&!vM(t))return t;t=hM(t)}return M}let i=ZM(e,t);for(;i&&IM(i)&&vM(i);)i=ZM(i,t);return i&&yM(i)&&vM(i)&&!TM(i)?M:i||function(e){let t=hM(e);for(;uM(t)&&!yM(t);){if(TM(t))return t;if(zM(t))return null;t=hM(t)}return null}(e)||M}const WM={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:M,offsetParent:i,strategy:n}=e;const o="fixed"===n,N=gM(i),r=!!t&&zM(t.floating);if(i===N||r&&o)return M;let s={scrollLeft:0,scrollTop:0},a=Gt(1);const g=Gt(0),l=uM(i);if((l||!l&&!o)&&(("body"!==sM(i)||cM(N))&&(s=OM(i)),uM(i))){const e=mM(i);a=QM(i),g.x=e.x+i.clientLeft,g.y=e.y+i.clientTop}const D=!N||l||o?Gt(0):UM(N,s,!0);return{width:M.width*a.x,height:M.height*a.y,x:M.x*a.x-s.scrollLeft*a.x+g.x+D.x,y:M.y*a.y-s.scrollTop*a.y+g.y+D.y}},getDocumentElement:gM,getClippingRect:function(e){let{element:t,boundary:M,rootBoundary:i,strategy:n}=e;const o="clippingAncestors"===M?zM(t)?[]:function(e,t){const M=t.get(e);if(M)return M;let i=xM(e,[],!1).filter((e=>DM(e)&&"body"!==sM(e))),n=null;const o="fixed"===AM(e).position;let N=o?hM(e):e;for(;DM(N)&&!yM(N);){const t=AM(N),M=TM(N);M||"fixed"!==t.position||(n=null),(o?!M&&!n:!M&&"static"===t.position&&n&&["absolute","fixed"].includes(n.position)||cM(N)&&!M&&fM(e,N))?i=i.filter((e=>e!==N)):n=t,N=hM(N)}return t.set(e,i),i}(t,this._c):[].concat(M),N=[...o,i],r=N[0],s=N.reduce(((e,M)=>{const i=bM(t,M,n);return e.top=Wt(i.top,e.top),e.right=Vt(i.right,e.right),e.bottom=Vt(i.bottom,e.bottom),e.left=Wt(i.left,e.left),e}),bM(t,r,n));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:VM,getElementRects:async function(e){const t=this.getOffsetParent||VM,M=this.getDimensions,i=await M(e.floating);return{reference:YM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:M}=SM(e);return{width:t,height:M}},getScale:QM,isElement:DM,isRTL:function(e){return"rtl"===AM(e).direction}};function PM(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function RM(e,t,M,i){void 0===i&&(i={});const{ancestorScroll:n=!0,ancestorResize:o=!0,elementResize:N="function"==typeof ResizeObserver,layoutShift:r="function"==typeof IntersectionObserver,animationFrame:s=!1}=i,a=EM(e),g=n||o?[...a?xM(a):[],...xM(t)]:[];g.forEach((e=>{n&&e.addEventListener("scroll",M,{passive:!0}),o&&e.addEventListener("resize",M)}));const l=a&&r?function(e,t){let M,i=null;const n=gM(e);function o(){var e;clearTimeout(M),null==(e=i)||e.disconnect(),i=null}return function N(r,s){void 0===r&&(r=!1),void 0===s&&(s=1),o();const a=e.getBoundingClientRect(),{left:g,top:l,width:D,height:u}=a;if(r||t(),!D||!u)return;const j={rootMargin:-Rt(l)+"px "+-Rt(n.clientWidth-(g+D))+"px "+-Rt(n.clientHeight-(l+u))+"px "+-Rt(g)+"px",threshold:Wt(0,Vt(1,s))||1};let c=!0;function I(t){const i=t[0].intersectionRatio;if(i!==s){if(!c)return N();i?N(!1,i):M=setTimeout((()=>{N(!1,1e-7)}),1e3)}1!==i||PM(a,e.getBoundingClientRect())||N(),c=!1}try{i=new IntersectionObserver(I,{...j,root:n.ownerDocument})}catch(e){i=new IntersectionObserver(I,j)}i.observe(e)}(!0),o}(a,M):null;let D,u=-1,j=null;N&&(j=new ResizeObserver((e=>{let[i]=e;i&&i.target===a&&j&&(j.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame((()=>{var e;null==(e=j)||e.observe(t)}))),M()})),a&&!s&&j.observe(a),j.observe(t));let c=s?mM(e):null;return s&&function t(){const i=mM(e);c&&!PM(c,i)&&M();c=i,D=requestAnimationFrame(t)}(),M(),()=>{var e;g.forEach((e=>{n&&e.removeEventListener("scroll",M),o&&e.removeEventListener("resize",M)})),null==l||l(),null==(e=j)||e.disconnect(),j=null,s&&cancelAnimationFrame(D)}}const GM=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var M,i;const{x:n,y:o,placement:N,middlewareData:r}=t,s=await async function(e,t){const{placement:M,platform:i,elements:n}=e,o=await(null==i.isRTL?void 0:i.isRTL(n.floating)),N=Ht(M),r=Xt(M),s="y"===Kt(M),a=["left","top"].includes(N)?-1:1,g=o&&s?-1:1,l=Jt(t,e);let{mainAxis:D,crossAxis:u,alignmentAxis:j}="number"==typeof l?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return r&&"number"==typeof j&&(u="end"===r?-1*j:j),s?{x:u*g,y:D*a}:{x:D*a,y:u*g}}(t,e);return N===(null==(M=r.offset)?void 0:M.placement)&&null!=(i=r.arrow)&&i.alignmentOffset?{}:{x:n+s.x,y:o+s.y,data:{...s,placement:N}}}}},BM=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:M,y:i,placement:n}=t,{mainAxis:o=!0,crossAxis:N=!1,limiter:r={fn:e=>{let{x:t,y:M}=e;return{x:t,y:M}}},...s}=Jt(e,t),a={x:M,y:i},g=await NM(t,s),l=Kt(Ht(n)),D=$t(l);let u=a[D],j=a[l];if(o){const e="y"===D?"bottom":"right";u=Ft(u+g["y"===D?"top":"left"],u,u-g[e])}if(N){const e="y"===l?"bottom":"right";j=Ft(j+g["y"===l?"top":"left"],j,j-g[e])}const c=r.fn({...t,[D]:u,[l]:j});return{...c,data:{x:c.x-M,y:c.y-i,enabled:{[D]:o,[l]:N}}}}}},_M=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var M,i;const{placement:n,middlewareData:o,rects:N,initialPlacement:r,platform:s,elements:a}=t,{mainAxis:g=!0,crossAxis:l=!0,fallbackPlacements:D,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:j="none",flipAlignment:c=!0,...I}=Jt(e,t);if(null!=(M=o.arrow)&&M.alignmentOffset)return{};const z=Ht(n),T=Kt(r),d=Ht(r)===r,y=await(null==s.isRTL?void 0:s.isRTL(a.floating)),A=D||(d||!c?[MM(r)]:function(e){const t=MM(e);return[tM(e),t,tM(t)]}(r)),O="none"!==j;!D&&O&&A.push(...function(e,t,M,i){const n=Xt(e);let o=function(e,t,M){const i=["left","right"],n=["right","left"],o=["top","bottom"],N=["bottom","top"];switch(e){case"top":case"bottom":return M?t?n:i:t?i:n;case"left":case"right":return t?o:N;default:return[]}}(Ht(e),"start"===M,i);return n&&(o=o.map((e=>e+"-"+n)),t&&(o=o.concat(o.map(tM)))),o}(r,c,j,y));const h=[r,...A],L=await NM(t,I),x=[];let p=(null==(i=o.flip)?void 0:i.overflows)||[];if(g&&x.push(L[z]),l){const e=function(e,t,M){void 0===M&&(M=!1);const i=Xt(e),n=eM(e),o=qt(n);let N="x"===n?i===(M?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[o]>t.floating[o]&&(N=MM(N)),[N,MM(N)]}(n,N,y);x.push(L[e[0]],L[e[1]])}if(p=[...p,{placement:n,overflows:x}],!x.every((e=>e<=0))){var S,E;const e=((null==(S=o.flip)?void 0:S.index)||0)+1,t=h[e];if(t)return{data:{index:e,overflows:p},reset:{placement:t}};let M=null==(E=p.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:E.placement;if(!M)switch(u){case"bestFit":{var Q;const e=null==(Q=p.filter((e=>{if(O){const t=Kt(e.placement);return t===T||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:Q[0];e&&(M=e);break}case"initialPlacement":M=r}if(n!==M)return{reset:{placement:M}}}return{}}}},FM=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var M,i;const{placement:n,rects:o,platform:N,elements:r}=t,{apply:s=()=>{},...a}=Jt(e,t),g=await NM(t,a),l=Ht(n),D=Xt(n),u="y"===Kt(n),{width:j,height:c}=o.floating;let I,z;"top"===l||"bottom"===l?(I=l,z=D===(await(null==N.isRTL?void 0:N.isRTL(r.floating))?"start":"end")?"left":"right"):(z=l,I="end"===D?"top":"bottom");const T=c-g.top-g.bottom,d=j-g.left-g.right,y=Vt(c-g[I],T),A=Vt(j-g[z],d),O=!t.middlewareData.shift;let h=y,L=A;if(null!=(M=t.middlewareData.shift)&&M.enabled.x&&(L=d),null!=(i=t.middlewareData.shift)&&i.enabled.y&&(h=T),O&&!D){const e=Wt(g.left,0),t=Wt(g.right,0),M=Wt(g.top,0),i=Wt(g.bottom,0);u?L=j-2*(0!==e||0!==t?e+t:Wt(g.left,g.right)):h=c-2*(0!==M||0!==i?M+i:Wt(g.top,g.bottom))}await s({...t,availableWidth:L,availableHeight:h});const x=await N.getDimensions(r.floating);return j!==x.width||c!==x.height?{reset:{rects:!0}}:{}}}},JM=e=>({name:"arrow",options:e,async fn(t){const{x:M,y:i,placement:n,rects:o,platform:N,elements:r,middlewareData:s}=t,{element:a,padding:g=0}=Jt(e,t)||{};if(null==a)return{};const l=iM(g),D={x:M,y:i},u=eM(n),j=qt(u),c=await N.getDimensions(a),I="y"===u,z=I?"top":"left",T=I?"bottom":"right",d=I?"clientHeight":"clientWidth",y=o.reference[j]+o.reference[u]-D[u]-o.floating[j],A=D[u]-o.reference[u],O=await(null==N.getOffsetParent?void 0:N.getOffsetParent(a));let h=O?O[d]:0;h&&await(null==N.isElement?void 0:N.isElement(O))||(h=r.floating[d]||o.floating[j]);const L=y/2-A/2,x=h/2-c[j]/2-1,p=Vt(l[z],x),S=Vt(l[T],x),E=p,Q=h-c[j]-S,w=h/2-c[j]/2+L,k=Ft(E,w,Q),m=!s.arrow&&null!=Xt(n)&&w!==k&&o.reference[j]/2-(w<E?p:S)-c[j]/2<0,C=m?w<E?w-E:w-Q:0;return{[u]:D[u]+C,data:{[u]:k,centerOffset:w-k-C,...m&&{alignmentOffset:C}},reset:m}}}),HM=(e,t,M)=>{const i=new Map,n={platform:WM,...M},o={...n.platform,_c:i};return(async(e,t,M)=>{const{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:N}=M,r=o.filter(Boolean),s=await(null==N.isRTL?void 0:N.isRTL(t));let a=await N.getElementRects({reference:e,floating:t,strategy:n}),{x:g,y:l}=oM(a,i,s),D=i,u={},j=0;for(let M=0;M<r.length;M++){const{name:o,fn:c}=r[M],{x:I,y:z,data:T,reset:d}=await c({x:g,y:l,initialPlacement:i,placement:D,strategy:n,middlewareData:u,rects:a,platform:N,elements:{reference:e,floating:t}});g=null!=I?I:g,l=null!=z?z:l,u={...u,[o]:{...u[o],...T}},d&&j<=50&&(j++,"object"==typeof d&&(d.placement&&(D=d.placement),d.rects&&(a=!0===d.rects?await N.getElementRects({reference:e,floating:t,strategy:n}):d.rects),({x:g,y:l}=oM(a,D,s))),M=-1)}return{x:g,y:l,placement:D,strategy:n,middlewareData:u}})(e,t,{...n,platform:o})};function XM(e){return function(e){for(let t=e;t;t=$M(t))if(t instanceof Element&&"none"===getComputedStyle(t).display)return null;for(let t=$M(e);t;t=$M(t)){if(!(t instanceof Element))continue;const e=getComputedStyle(t);if("contents"!==e.display){if("static"!==e.position||"none"!==e.filter)return t;if("BODY"===t.tagName)return t}}return null}(e)}function $M(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}const qM=N`
|
2864
|
+
`}};Zt.styles=vt,e([Ie("slot:not([name])")],Zt.prototype,"defaultSlot",void 0),e([je()],Zt.prototype,"hasButtonGroup",void 0),e([je()],Zt.prototype,"defaultValue",void 0),e([ue()],Zt.prototype,"label",void 0),e([ue()],Zt.prototype,"name",void 0),e([ue({reflect:!0})],Zt.prototype,"value",void 0),e([ue({reflect:!0})],Zt.prototype,"form",void 0),e([ue({type:Boolean,reflect:!0})],Zt.prototype,"required",void 0),e([ue({type:Boolean,reflect:!0})],Zt.prototype,"labelInline",void 0),e([ue({type:Boolean,reflect:!0})],Zt.prototype,"disabled",void 0),e([ue({attribute:"help-text",reflect:!0})],Zt.prototype,"helpText",void 0),e([ue({attribute:"error-message",reflect:!0})],Zt.prototype,"errorMessage",void 0),e([ue({type:Boolean,reflect:!0})],Zt.prototype,"islabelborder",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],Zt.prototype,"allowUncheckGroup",void 0),e([Ve("disabled",{waitUntilFirstUpdate:!0})],Zt.prototype,"handleDisabledChange",null),e([Ve("value")],Zt.prototype,"handleValueChange",null),Zt=e([ge("nile-radio-group")],Zt);const Vt=Math.min,Wt=Math.max,Pt=Math.round,Rt=Math.floor,Gt=e=>({x:e,y:e}),Bt={left:"right",right:"left",bottom:"top",top:"bottom"},_t={start:"end",end:"start"};function Ft(e,t,M){return Wt(e,Vt(t,M))}function Jt(e,t){return"function"==typeof e?e(t):e}function Ht(e){return e.split("-")[0]}function Xt(e){return e.split("-")[1]}function $t(e){return"x"===e?"y":"x"}function qt(e){return"y"===e?"height":"width"}function Kt(e){return["top","bottom"].includes(Ht(e))?"y":"x"}function eM(e){return $t(Kt(e))}function tM(e){return e.replace(/start|end/g,(e=>_t[e]))}function MM(e){return e.replace(/left|right|bottom|top/g,(e=>Bt[e]))}function iM(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function nM(e){const{x:t,y:M,width:i,height:n}=e;return{width:i,height:n,top:M,left:t,right:t+i,bottom:M+n,x:t,y:M}}function oM(e,t,M){let{reference:i,floating:n}=e;const o=Kt(t),N=eM(t),r=qt(N),s=Ht(t),a="y"===o,g=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2,D=i[r]/2-n[r]/2;let u;switch(s){case"top":u={x:g,y:i.y-n.height};break;case"bottom":u={x:g,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:l};break;case"left":u={x:i.x-n.width,y:l};break;default:u={x:i.x,y:i.y}}switch(Xt(t)){case"start":u[N]-=D*(M&&a?-1:1);break;case"end":u[N]+=D*(M&&a?-1:1)}return u}async function NM(e,t){var M;void 0===t&&(t={});const{x:i,y:n,platform:o,rects:N,elements:r,strategy:s}=e,{boundary:a="clippingAncestors",rootBoundary:g="viewport",elementContext:l="floating",altBoundary:D=!1,padding:u=0}=Jt(t,e),j=iM(u),c=r[D?"floating"===l?"reference":"floating":l],I=nM(await o.getClippingRect({element:null==(M=await(null==o.isElement?void 0:o.isElement(c)))||M?c:c.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(r.floating)),boundary:a,rootBoundary:g,strategy:s})),z="floating"===l?{x:i,y:n,width:N.floating.width,height:N.floating.height}:N.reference,T=await(null==o.getOffsetParent?void 0:o.getOffsetParent(r.floating)),d=await(null==o.isElement?void 0:o.isElement(T))&&await(null==o.getScale?void 0:o.getScale(T))||{x:1,y:1},y=nM(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:z,offsetParent:T,strategy:s}):z);return{top:(I.top-y.top+j.top)/d.y,bottom:(y.bottom-I.bottom+j.bottom)/d.y,left:(I.left-y.left+j.left)/d.x,right:(y.right-I.right+j.right)/d.x}}function rM(){return"undefined"!=typeof window}function sM(e){return lM(e)?(e.nodeName||"").toLowerCase():"#document"}function aM(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function gM(e){var t;return null==(t=(lM(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function lM(e){return!!rM()&&(e instanceof Node||e instanceof aM(e).Node)}function DM(e){return!!rM()&&(e instanceof Element||e instanceof aM(e).Element)}function uM(e){return!!rM()&&(e instanceof HTMLElement||e instanceof aM(e).HTMLElement)}function jM(e){return!(!rM()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof aM(e).ShadowRoot)}function cM(e){const{overflow:t,overflowX:M,overflowY:i,display:n}=AM(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+M)&&!["inline","contents"].includes(n)}function IM(e){return["table","td","th"].includes(sM(e))}function zM(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function TM(e){const t=dM(),M=DM(e)?AM(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!M[e]&&"none"!==M[e]))||!!M.containerType&&"normal"!==M.containerType||!t&&!!M.backdropFilter&&"none"!==M.backdropFilter||!t&&!!M.filter&&"none"!==M.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(M.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(M.contain||"").includes(e)))}function dM(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function yM(e){return["html","body","#document"].includes(sM(e))}function AM(e){return aM(e).getComputedStyle(e)}function OM(e){return DM(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hM(e){if("html"===sM(e))return e;const t=e.assignedSlot||e.parentNode||jM(e)&&e.host||gM(e);return jM(t)?t.host:t}function LM(e){const t=hM(e);return yM(t)?e.ownerDocument?e.ownerDocument.body:e.body:uM(t)&&cM(t)?t:LM(t)}function xM(e,t,M){var i;void 0===t&&(t=[]),void 0===M&&(M=!0);const n=LM(e),o=n===(null==(i=e.ownerDocument)?void 0:i.body),N=aM(n);if(o){const e=pM(N);return t.concat(N,N.visualViewport||[],cM(n)?n:[],e&&M?xM(e):[])}return t.concat(n,xM(n,[],M))}function pM(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function SM(e){const t=AM(e);let M=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const n=uM(e),o=n?e.offsetWidth:M,N=n?e.offsetHeight:i,r=Pt(M)!==o||Pt(i)!==N;return r&&(M=o,i=N),{width:M,height:i,$:r}}function EM(e){return DM(e)?e:e.contextElement}function QM(e){const t=EM(e);if(!uM(t))return Gt(1);const M=t.getBoundingClientRect(),{width:i,height:n,$:o}=SM(t);let N=(o?Pt(M.width):M.width)/i,r=(o?Pt(M.height):M.height)/n;return N&&Number.isFinite(N)||(N=1),r&&Number.isFinite(r)||(r=1),{x:N,y:r}}const wM=Gt(0);function kM(e){const t=aM(e);return dM()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:wM}function mM(e,t,M,i){void 0===t&&(t=!1),void 0===M&&(M=!1);const n=e.getBoundingClientRect(),o=EM(e);let N=Gt(1);t&&(i?DM(i)&&(N=QM(i)):N=QM(e));const r=function(e,t,M){return void 0===t&&(t=!1),!(!M||t&&M!==aM(e))&&t}(o,M,i)?kM(o):Gt(0);let s=(n.left+r.x)/N.x,a=(n.top+r.y)/N.y,g=n.width/N.x,l=n.height/N.y;if(o){const e=aM(o),t=i&&DM(i)?aM(i):i;let M=e,n=pM(M);for(;n&&i&&t!==M;){const e=QM(n),t=n.getBoundingClientRect(),i=AM(n),o=t.left+(n.clientLeft+parseFloat(i.paddingLeft))*e.x,N=t.top+(n.clientTop+parseFloat(i.paddingTop))*e.y;s*=e.x,a*=e.y,g*=e.x,l*=e.y,s+=o,a+=N,M=aM(n),n=pM(M)}}return nM({width:g,height:l,x:s,y:a})}function CM(e,t){const M=OM(e).scrollLeft;return t?t.left+M:mM(gM(e)).left+M}function UM(e,t,M){void 0===M&&(M=!1);const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-(M?0:CM(e,i)),y:i.top+t.scrollTop}}function bM(e,t,M){let i;if("viewport"===t)i=function(e,t){const M=aM(e),i=gM(e),n=M.visualViewport;let o=i.clientWidth,N=i.clientHeight,r=0,s=0;if(n){o=n.width,N=n.height;const e=dM();(!e||e&&"fixed"===t)&&(r=n.offsetLeft,s=n.offsetTop)}return{width:o,height:N,x:r,y:s}}(e,M);else if("document"===t)i=function(e){const t=gM(e),M=OM(e),i=e.ownerDocument.body,n=Wt(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=Wt(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let N=-M.scrollLeft+CM(e);const r=-M.scrollTop;return"rtl"===AM(i).direction&&(N+=Wt(t.clientWidth,i.clientWidth)-n),{width:n,height:o,x:N,y:r}}(gM(e));else if(DM(t))i=function(e,t){const M=mM(e,!0,"fixed"===t),i=M.top+e.clientTop,n=M.left+e.clientLeft,o=uM(e)?QM(e):Gt(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:n*o.x,y:i*o.y}}(t,M);else{const M=kM(e);i={x:t.x-M.x,y:t.y-M.y,width:t.width,height:t.height}}return nM(i)}function fM(e,t){const M=hM(e);return!(M===t||!DM(M)||yM(M))&&("fixed"===AM(M).position||fM(M,t))}function YM(e,t,M){const i=uM(t),n=gM(t),o="fixed"===M,N=mM(e,!0,o,t);let r={scrollLeft:0,scrollTop:0};const s=Gt(0);if(i||!i&&!o)if(("body"!==sM(t)||cM(n))&&(r=OM(t)),i){const e=mM(t,!0,o,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else n&&(s.x=CM(n));const a=!n||i||o?Gt(0):UM(n,r);return{x:N.left+r.scrollLeft-s.x-a.x,y:N.top+r.scrollTop-s.y-a.y,width:N.width,height:N.height}}function vM(e){return"static"===AM(e).position}function ZM(e,t){if(!uM(e)||"fixed"===AM(e).position)return null;if(t)return t(e);let M=e.offsetParent;return gM(e)===M&&(M=M.ownerDocument.body),M}function VM(e,t){const M=aM(e);if(zM(e))return M;if(!uM(e)){let t=hM(e);for(;t&&!yM(t);){if(DM(t)&&!vM(t))return t;t=hM(t)}return M}let i=ZM(e,t);for(;i&&IM(i)&&vM(i);)i=ZM(i,t);return i&&yM(i)&&vM(i)&&!TM(i)?M:i||function(e){let t=hM(e);for(;uM(t)&&!yM(t);){if(TM(t))return t;if(zM(t))return null;t=hM(t)}return null}(e)||M}const WM={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:M,offsetParent:i,strategy:n}=e;const o="fixed"===n,N=gM(i),r=!!t&&zM(t.floating);if(i===N||r&&o)return M;let s={scrollLeft:0,scrollTop:0},a=Gt(1);const g=Gt(0),l=uM(i);if((l||!l&&!o)&&(("body"!==sM(i)||cM(N))&&(s=OM(i)),uM(i))){const e=mM(i);a=QM(i),g.x=e.x+i.clientLeft,g.y=e.y+i.clientTop}const D=!N||l||o?Gt(0):UM(N,s,!0);return{width:M.width*a.x,height:M.height*a.y,x:M.x*a.x-s.scrollLeft*a.x+g.x+D.x,y:M.y*a.y-s.scrollTop*a.y+g.y+D.y}},getDocumentElement:gM,getClippingRect:function(e){let{element:t,boundary:M,rootBoundary:i,strategy:n}=e;const o="clippingAncestors"===M?zM(t)?[]:function(e,t){const M=t.get(e);if(M)return M;let i=xM(e,[],!1).filter((e=>DM(e)&&"body"!==sM(e))),n=null;const o="fixed"===AM(e).position;let N=o?hM(e):e;for(;DM(N)&&!yM(N);){const t=AM(N),M=TM(N);M||"fixed"!==t.position||(n=null),(o?!M&&!n:!M&&"static"===t.position&&n&&["absolute","fixed"].includes(n.position)||cM(N)&&!M&&fM(e,N))?i=i.filter((e=>e!==N)):n=t,N=hM(N)}return t.set(e,i),i}(t,this._c):[].concat(M),N=[...o,i],r=N[0],s=N.reduce(((e,M)=>{const i=bM(t,M,n);return e.top=Wt(i.top,e.top),e.right=Vt(i.right,e.right),e.bottom=Vt(i.bottom,e.bottom),e.left=Wt(i.left,e.left),e}),bM(t,r,n));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:VM,getElementRects:async function(e){const t=this.getOffsetParent||VM,M=this.getDimensions,i=await M(e.floating);return{reference:YM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:M}=SM(e);return{width:t,height:M}},getScale:QM,isElement:DM,isRTL:function(e){return"rtl"===AM(e).direction}};function PM(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function RM(e,t,M,i){void 0===i&&(i={});const{ancestorScroll:n=!0,ancestorResize:o=!0,elementResize:N="function"==typeof ResizeObserver,layoutShift:r="function"==typeof IntersectionObserver,animationFrame:s=!1}=i,a=EM(e),g=n||o?[...a?xM(a):[],...xM(t)]:[];g.forEach((e=>{n&&e.addEventListener("scroll",M,{passive:!0}),o&&e.addEventListener("resize",M)}));const l=a&&r?function(e,t){let M,i=null;const n=gM(e);function o(){var e;clearTimeout(M),null==(e=i)||e.disconnect(),i=null}return function N(r,s){void 0===r&&(r=!1),void 0===s&&(s=1),o();const a=e.getBoundingClientRect(),{left:g,top:l,width:D,height:u}=a;if(r||t(),!D||!u)return;const j={rootMargin:-Rt(l)+"px "+-Rt(n.clientWidth-(g+D))+"px "+-Rt(n.clientHeight-(l+u))+"px "+-Rt(g)+"px",threshold:Wt(0,Vt(1,s))||1};let c=!0;function I(t){const i=t[0].intersectionRatio;if(i!==s){if(!c)return N();i?N(!1,i):M=setTimeout((()=>{N(!1,1e-7)}),1e3)}1!==i||PM(a,e.getBoundingClientRect())||N(),c=!1}try{i=new IntersectionObserver(I,{...j,root:n.ownerDocument})}catch(e){i=new IntersectionObserver(I,j)}i.observe(e)}(!0),o}(a,M):null;let D,u=-1,j=null;N&&(j=new ResizeObserver((e=>{let[i]=e;i&&i.target===a&&j&&(j.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame((()=>{var e;null==(e=j)||e.observe(t)}))),M()})),a&&!s&&j.observe(a),j.observe(t));let c=s?mM(e):null;return s&&function t(){const i=mM(e);c&&!PM(c,i)&&M();c=i,D=requestAnimationFrame(t)}(),M(),()=>{var e;g.forEach((e=>{n&&e.removeEventListener("scroll",M),o&&e.removeEventListener("resize",M)})),null==l||l(),null==(e=j)||e.disconnect(),j=null,s&&cancelAnimationFrame(D)}}const GM=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var M,i;const{x:n,y:o,placement:N,middlewareData:r}=t,s=await async function(e,t){const{placement:M,platform:i,elements:n}=e,o=await(null==i.isRTL?void 0:i.isRTL(n.floating)),N=Ht(M),r=Xt(M),s="y"===Kt(M),a=["left","top"].includes(N)?-1:1,g=o&&s?-1:1,l=Jt(t,e);let{mainAxis:D,crossAxis:u,alignmentAxis:j}="number"==typeof l?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return r&&"number"==typeof j&&(u="end"===r?-1*j:j),s?{x:u*g,y:D*a}:{x:D*a,y:u*g}}(t,e);return N===(null==(M=r.offset)?void 0:M.placement)&&null!=(i=r.arrow)&&i.alignmentOffset?{}:{x:n+s.x,y:o+s.y,data:{...s,placement:N}}}}},BM=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:M,y:i,placement:n}=t,{mainAxis:o=!0,crossAxis:N=!1,limiter:r={fn:e=>{let{x:t,y:M}=e;return{x:t,y:M}}},...s}=Jt(e,t),a={x:M,y:i},g=await NM(t,s),l=Kt(Ht(n)),D=$t(l);let u=a[D],j=a[l];if(o){const e="y"===D?"bottom":"right";u=Ft(u+g["y"===D?"top":"left"],u,u-g[e])}if(N){const e="y"===l?"bottom":"right";j=Ft(j+g["y"===l?"top":"left"],j,j-g[e])}const c=r.fn({...t,[D]:u,[l]:j});return{...c,data:{x:c.x-M,y:c.y-i,enabled:{[D]:o,[l]:N}}}}}},_M=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var M,i;const{placement:n,middlewareData:o,rects:N,initialPlacement:r,platform:s,elements:a}=t,{mainAxis:g=!0,crossAxis:l=!0,fallbackPlacements:D,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:j="none",flipAlignment:c=!0,...I}=Jt(e,t);if(null!=(M=o.arrow)&&M.alignmentOffset)return{};const z=Ht(n),T=Kt(r),d=Ht(r)===r,y=await(null==s.isRTL?void 0:s.isRTL(a.floating)),A=D||(d||!c?[MM(r)]:function(e){const t=MM(e);return[tM(e),t,tM(t)]}(r)),O="none"!==j;!D&&O&&A.push(...function(e,t,M,i){const n=Xt(e);let o=function(e,t,M){const i=["left","right"],n=["right","left"],o=["top","bottom"],N=["bottom","top"];switch(e){case"top":case"bottom":return M?t?n:i:t?i:n;case"left":case"right":return t?o:N;default:return[]}}(Ht(e),"start"===M,i);return n&&(o=o.map((e=>e+"-"+n)),t&&(o=o.concat(o.map(tM)))),o}(r,c,j,y));const h=[r,...A],L=await NM(t,I),x=[];let p=(null==(i=o.flip)?void 0:i.overflows)||[];if(g&&x.push(L[z]),l){const e=function(e,t,M){void 0===M&&(M=!1);const i=Xt(e),n=eM(e),o=qt(n);let N="x"===n?i===(M?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[o]>t.floating[o]&&(N=MM(N)),[N,MM(N)]}(n,N,y);x.push(L[e[0]],L[e[1]])}if(p=[...p,{placement:n,overflows:x}],!x.every((e=>e<=0))){var S,E;const e=((null==(S=o.flip)?void 0:S.index)||0)+1,t=h[e];if(t)return{data:{index:e,overflows:p},reset:{placement:t}};let M=null==(E=p.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:E.placement;if(!M)switch(u){case"bestFit":{var Q;const e=null==(Q=p.filter((e=>{if(O){const t=Kt(e.placement);return t===T||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:Q[0];e&&(M=e);break}case"initialPlacement":M=r}if(n!==M)return{reset:{placement:M}}}return{}}}},FM=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var M,i;const{placement:n,rects:o,platform:N,elements:r}=t,{apply:s=()=>{},...a}=Jt(e,t),g=await NM(t,a),l=Ht(n),D=Xt(n),u="y"===Kt(n),{width:j,height:c}=o.floating;let I,z;"top"===l||"bottom"===l?(I=l,z=D===(await(null==N.isRTL?void 0:N.isRTL(r.floating))?"start":"end")?"left":"right"):(z=l,I="end"===D?"top":"bottom");const T=c-g.top-g.bottom,d=j-g.left-g.right,y=Vt(c-g[I],T),A=Vt(j-g[z],d),O=!t.middlewareData.shift;let h=y,L=A;if(null!=(M=t.middlewareData.shift)&&M.enabled.x&&(L=d),null!=(i=t.middlewareData.shift)&&i.enabled.y&&(h=T),O&&!D){const e=Wt(g.left,0),t=Wt(g.right,0),M=Wt(g.top,0),i=Wt(g.bottom,0);u?L=j-2*(0!==e||0!==t?e+t:Wt(g.left,g.right)):h=c-2*(0!==M||0!==i?M+i:Wt(g.top,g.bottom))}await s({...t,availableWidth:L,availableHeight:h});const x=await N.getDimensions(r.floating);return j!==x.width||c!==x.height?{reset:{rects:!0}}:{}}}},JM=e=>({name:"arrow",options:e,async fn(t){const{x:M,y:i,placement:n,rects:o,platform:N,elements:r,middlewareData:s}=t,{element:a,padding:g=0}=Jt(e,t)||{};if(null==a)return{};const l=iM(g),D={x:M,y:i},u=eM(n),j=qt(u),c=await N.getDimensions(a),I="y"===u,z=I?"top":"left",T=I?"bottom":"right",d=I?"clientHeight":"clientWidth",y=o.reference[j]+o.reference[u]-D[u]-o.floating[j],A=D[u]-o.reference[u],O=await(null==N.getOffsetParent?void 0:N.getOffsetParent(a));let h=O?O[d]:0;h&&await(null==N.isElement?void 0:N.isElement(O))||(h=r.floating[d]||o.floating[j]);const L=y/2-A/2,x=h/2-c[j]/2-1,p=Vt(l[z],x),S=Vt(l[T],x),E=p,Q=h-c[j]-S,w=h/2-c[j]/2+L,k=Ft(E,w,Q),m=!s.arrow&&null!=Xt(n)&&w!==k&&o.reference[j]/2-(w<E?p:S)-c[j]/2<0,C=m?w<E?w-E:w-Q:0;return{[u]:D[u]+C,data:{[u]:k,centerOffset:w-k-C,...m&&{alignmentOffset:C}},reset:m}}}),HM=(e,t,M)=>{const i=new Map,n={platform:WM,...M},o={...n.platform,_c:i};return(async(e,t,M)=>{const{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:N}=M,r=o.filter(Boolean),s=await(null==N.isRTL?void 0:N.isRTL(t));let a=await N.getElementRects({reference:e,floating:t,strategy:n}),{x:g,y:l}=oM(a,i,s),D=i,u={},j=0;for(let M=0;M<r.length;M++){const{name:o,fn:c}=r[M],{x:I,y:z,data:T,reset:d}=await c({x:g,y:l,initialPlacement:i,placement:D,strategy:n,middlewareData:u,rects:a,platform:N,elements:{reference:e,floating:t}});g=null!=I?I:g,l=null!=z?z:l,u={...u,[o]:{...u[o],...T}},d&&j<=50&&(j++,"object"==typeof d&&(d.placement&&(D=d.placement),d.rects&&(a=!0===d.rects?await N.getElementRects({reference:e,floating:t,strategy:n}):d.rects),({x:g,y:l}=oM(a,D,s))),M=-1)}return{x:g,y:l,placement:D,strategy:n,middlewareData:u}})(e,t,{...n,platform:o})};function XM(e){return function(e){for(let t=e;t;t=$M(t))if(t instanceof Element&&"none"===getComputedStyle(t).display)return null;for(let t=$M(e);t;t=$M(t)){if(!(t instanceof Element))continue;const e=getComputedStyle(t);if("contents"!==e.display){if("static"!==e.position||"none"!==e.filter)return t;if("BODY"===t.tagName)return t}}return null}(e)}function $M(e){return e.assignedSlot?e.assignedSlot:e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}const qM=N`
|
2865
2865
|
:host {
|
2866
2866
|
--arrow-color: var(--nile-colors-dark-200);
|
2867
2867
|
-webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));
|
@@ -3259,9 +3259,9 @@ const Ze=e=>e??B;function Ve(e,t){const M={waitUntilFirstUpdate:!1,...t};return(
|
|
3259
3259
|
}
|
3260
3260
|
}
|
3261
3261
|
`;let oi=class extends se{constructor(){super(...arguments),this.propHeight="",this.propWidth="",this.label="",this.size="lg",this.margin="",this.variant="v1",this.color="var(--nile-colors-primary-600,var(--ng-colors-fg-brand-primary-600))"}connectedCallback(){super.connectedCallback(),this.setSvgDimensions(),"v1"==this.variant&&"var(--nile-colors-primary-600,var(--ng-colors-fg-brand-primary-600))"==this.color&&(this.color="var(--nile-colors-blue-500,var(--ng-colors-fg-brand-primary-600))")}setSvgDimensions(){if(parseInt(this.propHeight)&&parseInt(this.propWidth))this.height=this.propHeight,this.width=this.propWidth;else switch(this.size){case"sm":this.height="32",this.width="32";break;case"md":this.height="48",this.width="48";break;case"lg":this.height="56",this.width="56";break;default:this.height="64",this.width="64"}}render(){return R`
|
3262
|
-
<div class="loader__container" class=${Le({loader__container:!0,"loader__container--sm":"sm"==this.size,"loader__container--md":"md"==this.size,"loader__container--lg":"lg"==this.size,"loader__container--xl":"xl"==this.size})}>
|
3263
|
-
<div class=${Le({svg__container:"v1"!==this.variant})}>${this.getVariant()}</div>
|
3264
|
-
${this.label?R`<div class="loader__label">${this.label}</div>`:B}
|
3262
|
+
<div class="loader__container" part="loader-container" class=${Le({loader__container:!0,"loader__container--sm":"sm"==this.size,"loader__container--md":"md"==this.size,"loader__container--lg":"lg"==this.size,"loader__container--xl":"xl"==this.size})}>
|
3263
|
+
<div part="svg-container" class=${Le({svg__container:"v1"!==this.variant})}>${this.getVariant()}</div>
|
3264
|
+
${this.label?R`<div part="loader-label" class="loader__label">${this.label}</div>`:B}
|
3265
3265
|
</div>
|
3266
3266
|
`}getVariant(){switch(this.variant){case"v1":default:return this.renderV1();case"v2":return this.renderV2();case"v3":return this.renderV3()}}renderV1(){return R`
|
3267
3267
|
<div
|
@@ -4650,14 +4650,15 @@ class $i{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
4650
4650
|
* Copyright 2021 Google LLC
|
4651
4651
|
* SPDX-License-Identifier: BSD-3-Clause
|
4652
4652
|
*/(this._hostElement,e),this._scrollerController=new qi(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0}_observeAndListen(){this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach((e=>{e.addEventListener("scroll",this,this._scrollEventListenerOptions),this._scrollEventListeners.push(e),this._hostElementRO.observe(e)})),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach((e=>this._childrenRO.observe(e))),this._scrollEventListeners.forEach((e=>e.addEventListener("scroll",this,this._scrollEventListenerOptions)))}disconnected(){this._scrollEventListeners.forEach((e=>e.removeEventListener("scroll",this,this._scrollEventListenerOptions))),this._scrollEventListeners=[],this._clippingAncestors=[],this._scrollerController?.detach(this),this._scrollerController=null,this._mutationObserver?.disconnect(),this._mutationObserver=null,this._hostElementRO?.disconnect(),this._hostElementRO=null,this._childrenRO?.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1}_applyVirtualizerStyles(){const e=this._hostElement.style;e.display=e.display||"block",e.position=e.position||"relative",e.contain=e.contain||"size layout",this._isScroller&&(e.overflow=e.overflow||"auto",e.minHeight=e.minHeight||"150px")}_getSizer(){const e=this._hostElement;if(!this._sizer){let t=e.querySelector(`[${tn}]`);t||(t=document.createElement("div"),t.setAttribute(tn,""),e.appendChild(t)),Object.assign(t.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),t.textContent=" ",t.setAttribute(tn,""),this._sizer=t}return this._sizer}async updateLayoutConfig(e){await this._layoutInitialized;const t=e.type||Mn;if("function"==typeof t&&this._layout instanceof t){const t={...e};return delete t.type,this._layout.config=t,!0}return!1}async _initLayout(e){let t,M;if("function"==typeof e.type){M=e.type;const i={...e};delete i.type,t=i}else t=e;void 0===M&&(Mn=M=(await Promise.resolve().then((function(){return Jp}))).FlowLayout),this._layout=new M((e=>this._handleLayoutMessage(e)),t),this._layout.measureChildren&&"function"==typeof this._layout.updateItemSizes&&("function"==typeof this._layout.measureChildren&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout)),this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0),this._schedule(this._updateLayout)}startBenchmarking(){null===this._benchmarkStart&&(this._benchmarkStart=window.performance.now())}stopBenchmarking(){if(null!==this._benchmarkStart){const e=window.performance.now(),t=e-this._benchmarkStart,M=performance.getEntriesByName("uv-virtualizing","measure").filter((t=>t.startTime>=this._benchmarkStart&&t.startTime<e)).reduce(((e,t)=>e+t.duration),0);return this._benchmarkStart=null,{timeElapsed:t,virtualizationTime:M}}return null}_measureChildren(){const e={},t=this._children,M=this._measureChildOverride||this._measureChild;for(let i=0;i<t.length;i++){const n=t[i],o=this._first+i;(this._itemsChanged||this._toBeMeasured.has(n))&&(e[o]=M.call(this,n,this._items[o]))}this._childMeasurements=e,this._schedule(this._updateLayout),this._toBeMeasured.clear()}_measureChild(e){const{width:t,height:M}=e.getBoundingClientRect();return Object.assign({width:t,height:M},function(e){const t=window.getComputedStyle(e);return{marginTop:on(t.marginTop),marginRight:on(t.marginRight),marginBottom:on(t.marginBottom),marginLeft:on(t.marginLeft)}}(e))}async _schedule(e){this._scheduled.has(e)||(this._scheduled.add(e),await Promise.resolve(),this._scheduled.delete(e),e.call(this))}async _updateDOM(e){this._scrollSize=e.scrollSize,this._adjustRange(e.range),this._childrenPos=e.childPositions,this._scrollError=e.scrollError||null;const{_rangeChanged:t,_itemsChanged:M}=this;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(t||M)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate()}_finishDOMUpdate(){this._connected&&(this._children.forEach((e=>this._childrenRO.observe(e))),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),null!==this._childMeasurements&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_handleScrollEvent(){if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end")}catch(e){console.warn("Error measuring performance data: ",e)}window.performance.mark("uv-start")}!1===this._scrollerController.correctingScrollError&&this._layout?.unpin(),this._schedule(this._updateLayout)}handleEvent(e){if("scroll"===e.type)(e.currentTarget===window||this._clippingAncestors.includes(e.currentTarget))&&this._handleScrollEvent();else console.warn("event not handled",e)}_handleLayoutMessage(e){"stateChanged"===e.type?this._updateDOM(e):"visibilityChanged"===e.type?(this._firstVisible=e.firstVisible,this._lastVisible=e.lastVisible,this._notifyVisibility()):"unpinned"===e.type&&this._hostElement.dispatchEvent(new Xi)}get _children(){const e=[];let t=this._hostElement.firstElementChild;for(;t;)t.hasAttribute(tn)||e.push(t),t=t.nextElementSibling;return e}_updateView(){const e=this._hostElement,t=this._scrollerController?.element,M=this._layout;if(e&&t&&M){let i,n,o,N;const r=e.getBoundingClientRect();i=0,n=0,o=window.innerHeight,N=window.innerWidth;const s=this._clippingAncestors.map((e=>e.getBoundingClientRect()));s.unshift(r);for(const e of s)i=Math.max(i,e.top),n=Math.max(n,e.left),o=Math.min(o,e.bottom),N=Math.min(N,e.right);const a=t.getBoundingClientRect(),g={left:r.left-a.left,top:r.top-a.top},l={width:t.scrollWidth,height:t.scrollHeight},D=i-r.top+e.scrollTop,u=n-r.left+e.scrollLeft,j=Math.max(0,o-i),c=Math.max(0,N-n);M.viewportSize={width:c,height:j},M.viewportScroll={top:D,left:u},M.totalScrollSize=l,M.offsetWithinScroller=g}}_sizeHostElement(e){const t=82e5,M=e&&null!==e.width?Math.min(t,e.width):0,i=e&&null!==e.height?Math.min(t,e.height):0;if(this._isScroller)this._getSizer().style.transform=`translate(${M}px, ${i}px)`;else{const e=this._hostElement.style;e.minWidth=M?`${M}px`:"100%",e.minHeight=i?`${i}px`:"100%"}}_positionChildren(e){e&&e.forEach((({top:e,left:t,width:M,height:i,xOffset:n,yOffset:o},N)=>{const r=this._children[N-this._first];r&&(r.style.position="absolute",r.style.boxSizing="border-box",r.style.transform=`translate(${t}px, ${e}px)`,void 0!==M&&(r.style.width=M+"px"),void 0!==i&&(r.style.height=i+"px"),r.style.left=void 0===n?null:n+"px",r.style.top=void 0===o?null:o+"px")}))}async _adjustRange(e){const{_first:t,_last:M,_firstVisible:i,_lastVisible:n}=this;this._first=e.first,this._last=e.last,this._firstVisible=e.firstVisible,this._lastVisible=e.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==t||this._last!==M,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==i||this._lastVisible!==n}_correctScrollError(){if(this._scrollError){const{scrollTop:e,scrollLeft:t}=this._scrollerController,{top:M,left:i}=this._scrollError;this._scrollError=null,this._scrollerController.correctScrollError({top:e-M,left:t-i})}}element(e){return e===1/0&&(e=this._items.length-1),void 0===this._items?.[e]?void 0:{scrollIntoView:(t={})=>this._scrollElementIntoView({...t,index:e})}}_scrollElementIntoView(e){if(e.index>=this._first&&e.index<=this._last)this._children[e.index-this._first].scrollIntoView(e);else if(e.index=Math.min(e.index,this._items.length-1),"smooth"===e.behavior){const t=this._layout.getScrollIntoViewCoordinates(e),{behavior:M}=e;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(t,{behavior:M}),(()=>this._layout.getScrollIntoViewCoordinates(e)),(()=>this._scrollIntoViewTarget=null)),this._scrollIntoViewTarget=e}else this._layout.pin=e}_checkScrollIntoViewTarget(e){const{index:t}=this._scrollIntoViewTarget||{};t&&e?.has(t)&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget))}_notifyRange(){this._hostElement.dispatchEvent(new Ji({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new Hi({first:this._firstVisible,last:this._lastVisible}))}get layoutComplete(){return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise(((e,t)=>{this._layoutCompleteResolver=e,this._layoutCompleteRejecter=t}))),this._layoutCompletePromise}_rejectLayoutCompletePromise(e){null!==this._layoutCompleteRejecter&&this._layoutCompleteRejecter(e),this._resetLayoutCompleteState()}_scheduleLayoutComplete(){this._layoutCompletePromise&&null===this._pendingLayoutComplete&&(this._pendingLayoutComplete=requestAnimationFrame((()=>requestAnimationFrame((()=>this._resolveLayoutCompletePromise())))))}_resolveLayoutCompletePromise(){null!==this._layoutCompleteResolver&&this._layoutCompleteResolver(),this._resetLayoutCompleteState()}_resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null}_hostElementSizeChanged(){this._schedule(this._updateLayout)}_childLoaded(){}_childrenSizeChanged(e){if(this._layout?.measureChildren){for(const t of e)this._toBeMeasured.set(t.target,t.contentRect);this._measureChildren()}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1}}function on(e){const t=e?parseFloat(e):NaN;return Number.isNaN(t)?0:t}function Nn(e){if(null!==e.assignedSlot)return e.assignedSlot;if(null!==e.parentElement)return e.parentElement;const t=e.parentNode;return t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host||null}const rn=Oe(class extends Bi{constructor(e){if(super(e),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(e,t)=>((e,t)=>R`${t}: ${JSON.stringify(e,null,2)}`)(e,t+this._first),this._keyFunction=(e,t)=>(e=>e)(e,this._first),this._items=[],e.type!==de)throw new Error("The virtualize directive can only be used in child expressions")}render(e){e&&this._setFunctions(e);const t=[];if(this._first>=0&&this._last>=this._first)for(let e=this._first;e<=this._last;e++)t.push(this._items[e]);return Fi(t,this._keyFunction,this._renderItem)}update(e,[t]){this._setFunctions(t);const M=this._items!==t.items;return this._items=t.items||[],this._virtualizer?this._updateVirtualizerConfig(e,t):this._initialize(e,t),M?G:this.render()}async _updateVirtualizerConfig(e,t){if(!await this._virtualizer.updateLayoutConfig(t.layout||{})){const M=e.parentNode;this._makeVirtualizer(M,t)}this._virtualizer.items=this._items}_setFunctions(e){const{renderItem:t,keyFunction:M}=e;t&&(this._renderItem=(e,M)=>t(e,M+this._first)),M&&(this._keyFunction=(e,t)=>M(e,t+this._first))}_makeVirtualizer(e,t){this._virtualizer&&this._virtualizer.disconnected();const{layout:M,scroller:i,items:n}=t;this._virtualizer=new nn({hostElement:e,layout:M,scroller:i}),this._virtualizer.items=n,this._virtualizer.connected()}_initialize(e,t){const M=e.parentNode;M&&1===M.nodeType&&(M.addEventListener("rangeChanged",(e=>{this._first=e.first,this._last=e.last,this.setValue(this.render())})),this._makeVirtualizer(M,t))}disconnected(){this._virtualizer?.disconnected()}reconnected(){this._virtualizer?.connected()}});class sn{static getVirtualizedContent(e,t,M,i,n,o,N,r,s,a){return R`
|
4653
|
-
<div class="select__options ${t?"select__options__search-enabled":""}">
|
4653
|
+
<div part="select-options" class="select__options ${t?"select__options__search-enabled":""}">
|
4654
4654
|
${r&&!a?R`
|
4655
|
-
<div class="select__no-results">
|
4655
|
+
<div part="select-no-results" class="select__no-results">
|
4656
4656
|
${s||"No results found"}
|
4657
4657
|
</div>
|
4658
4658
|
`:R`
|
4659
4659
|
<div
|
4660
4660
|
class="virtualized"
|
4661
|
+
part="virtualized"
|
4661
4662
|
>
|
4662
4663
|
${sn.shouldUseVirtualizer(e)?R`
|
4663
4664
|
${rn({items:e,renderItem:e=>sn.getItemRenderFunction(e,M,i,n,o,N),scroller:!0})}
|
@@ -4849,7 +4850,7 @@ class $i{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
4849
4850
|
${this.renderFooter()}
|
4850
4851
|
</div>
|
4851
4852
|
`}renderSearch(){return this.searchEnabled?R`
|
4852
|
-
<div class="select__search">
|
4853
|
+
<div part="search" class="select__search">
|
4853
4854
|
<nile-input
|
4854
4855
|
size="small"
|
4855
4856
|
clearable
|
@@ -4863,7 +4864,7 @@ class $i{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
4863
4864
|
</nile-input>
|
4864
4865
|
</div>
|
4865
4866
|
`:R``}renderLoader(){return this.optionsLoading?R`
|
4866
|
-
<span class="select__loader">
|
4867
|
+
<span part="loader" class="select__loader">
|
4867
4868
|
<nile-icon
|
4868
4869
|
class="select__loader--icon"
|
4869
4870
|
name="var(--nile-icon-button-loading-blue, var(--ng-icon-button-loading-blue))"
|
@@ -4936,11 +4937,32 @@ class $i{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
4936
4937
|
.noWidthSync=${e.noWidthSync}
|
4937
4938
|
.maxOptionsVisible=${e.maxOptionsVisible}
|
4938
4939
|
.data=${e.data}
|
4940
|
+
.open=${e.open}
|
4941
|
+
exportparts="
|
4942
|
+
select-options,
|
4943
|
+
select-no-results,
|
4944
|
+
virtualized,
|
4945
|
+
form-control,
|
4946
|
+
form-control-label,
|
4947
|
+
form-control-input,
|
4948
|
+
combobox,
|
4949
|
+
prefix,
|
4950
|
+
display-input,
|
4951
|
+
tags,
|
4952
|
+
tag,
|
4953
|
+
clear-button,
|
4954
|
+
suffix,
|
4955
|
+
expand-icon,
|
4956
|
+
listbox,
|
4957
|
+
search,
|
4958
|
+
loader,
|
4959
|
+
footer
|
4960
|
+
"
|
4939
4961
|
>
|
4940
4962
|
<slot name="prefix" slot="prefix"></slot>
|
4941
4963
|
</nile-virtual-select>
|
4942
4964
|
</div>
|
4943
|
-
`}}let ln=class extends Pe{get validity(){return this.valueInput?.validity}get validationMessage(){return this.valueInput?.validationMessage}constructor(){super(),this.hasSlotController=new ve(this,"help-text","label"),this.typeToSelectString="",this.hasFocus=!1,this.displayLabel="",this.selectedOptions=[],this.oldValue="",this.name="",this.value="",this.defaultValue="",this.size="medium",this.placeholder="Select...",this.searchValue="",this.searchEnabled=!1,this.internalSearchPlaceHolder="Search...",this.blockValueChange=!1,this.disableLocalSearch=!1,this.optionsLoading=!1,this.noWidthSync=!1,this.multiple=!1,this.helpText="",this.help_text="",this.errorMessage="",this.warning=!1,this.error=!1,this.success=!1,this.maxOptionsVisible=3,this.disabled=!1,this.clearable=!1,this.open=!1,this.hoist=!1,this.filled=!1,this.pill=!1,this.label="",this.placement="bottom",this.form="",this.required=!1,this.showSelected=!1,this.oldMaxOptionsVisible=1,this.showNoResults=!1,this.noResultsMessage="No results found",this.data=[],this.enableVirtualScroll=!1,this.enableGroupHeader=!1,this.options=[]}connectedCallback(){super.connectedCallback(),this.enableVirtualScroll||(this.formControlController=new fe(this,{assumeInteractionOn:["nile-blur","nile-input"]})),this.virtualScrollHelper=new gn(this),this.handleDocumentFocusIn=this.handleDocumentFocusIn.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.open=!1,this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}updated(e){e.has("multiple")&&this.setCheckBoxInOption(this.multiple)}firstUpdated(e){this.enableGroupHeader&&this.handleGroupSearchChange(),e.has("multiple")&&this.setCheckBoxInOption(this.multiple)}setCheckBoxInOption(e){this.options.length||(this.options=this.getAllOptions()),this.options.forEach((t=>{t.showCheckbox=e}))}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("nile-focus",{value:this.value,name:this.name})}handleBlur(){this.hasFocus=!1,this.emit("nile-blur",{value:this.value,name:this.name})}handleDocumentFocusIn(e){const t=e.composedPath();this&&!t.includes(this)&&this.hide()}handleFooterClick(e){e.stopPropagation(),e.preventDefault()}toggleShowSelected(e){if(e.stopPropagation(),e.preventDefault(),0===this.selectedOptions?.length)return;this.showSelected=!this.showSelected;this.getAllOptions().forEach((e=>{e.selected||(e.hidden=this.showSelected)})),this.enableGroupHeader&&this.handleGroupShowSelected()}unSlectAll(){this.showSelected=!1;this.getAllOptions().forEach((e=>{e.selected=!1,e.hidden=!1})),this.enableGroupHeader&&this.handleGroupShowSelected(),this.value="",this.selectionChanged(),this.emit("nile-change",{value:this.value,name:this.name}),this.emit("nile-clear",{value:this.multiple?this.value:"",name:this.name})}handleDocumentKeyDown(e){const t=e.target,M=null!==t.closest(".select__clear"),i=null!==t.closest("nile-icon-button");if(!M&&!i){if("Escape"===e.key&&this.open&&(e.preventDefault(),e.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})),"Enter"===e.key||" "===e.key&&""===this.typeToSelectString)return e.preventDefault(),e.stopImmediatePropagation(),this.open?void(this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then((()=>{this.nileInput({value:this.value,name:this.name}),this.nileChange({value:this.value,name:this.name})})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))):void this.show();if(1===e.key.length||"Backspace"===e.key){const t=this.getAllOptions();if(e.metaKey||e.ctrlKey||e.altKey)return;if(!this.open){if("Backspace"===e.key)return;this.show()}e.stopPropagation(),e.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout((()=>this.typeToSelectString=""),1e3),"Backspace"===e.key?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=e.key.toLowerCase();for(const e of t){if(e.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(e);break}}}}}handleDocumentMouseDown(e){const t=e.composedPath();this&&!t.includes(this)&&this.hide()}handleLabelClick(){this.displayInput.focus(),this.hide()}handleComboboxMouseDown(e){const t=e.composedPath().some((e=>e instanceof Element&&"nile-icon-button"===e.tagName.toLowerCase()));this.disabled||t||(e.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open)}handleComboboxKeyDown(e){e.stopPropagation(),this.handleDocumentKeyDown(e)}handleClearClick(e){e.stopPropagation(),""!==this.value&&(this.setSelectedOptions([]),this.showSelected=!1,this.value="",this.displayInput.focus({preventScroll:!0}),this.enableGroupHeader&&this.handleGroupShowSelected(),this.updateComplete.then((()=>{const e={value:this.multiple?this.value:"",name:this.name};this.emit("nile-clear",e),this.nileInput(e),this.nileChange(e)})))}handleClearMouseDown(e){e.stopPropagation(),e.preventDefault()}handleOptionClick(e){const t=e.target.closest("nile-option");if(this.blockValueChange&&t)return this.emit("nile-block-change",{value:t?.value,name:this.name}),void this.hide();const M=this.value;if(this.oldValue=M,t&&!t.disabled&&(this.multiple?this.toggleOptionSelection(t):this.setSelectedOptions(t),this.updateComplete.then((()=>this.displayInput.focus({preventScroll:!0}))),this.value!==M&&this.updateComplete.then((()=>{this.nileInput({value:this.value,name:this.name}),this.nileChange({value:this.value,name:this.name})})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0}))),this.showSelected){this.getAllOptions().forEach((e=>{e.selected||(e.hidden=this.showSelected)})),this.enableGroupHeader&&this.handleGroupShowSelected(),this.requestUpdate()}}handleDefaultSlotChange(){const e=this.getAllOptions(),t=Array.isArray(this.value)?this.value:[this.value],M=[];customElements.get("nile-option")?(e.forEach((e=>M.push(e.value))),this.setSelectedOptions(e.filter((e=>t.map(String).includes(e.value))))):customElements.whenDefined("nile-option").then((()=>this.handleDefaultSlotChange()))}handleTagRemove(e,t){if(e.stopPropagation(),!this.disabled){this.toggleOptionSelection(t,!1);this.getAllOptions().forEach((e=>{e.selected||(e.hidden=this.showSelected)})),this.enableGroupHeader&&this.handleGroupShowSelected(),this.updateComplete.then((()=>{this.nileInput({value:this.value,name:this.name}),this.nileChange({value:this.value,name:this.name}),this.emit("nile-tag-remove",{value:this.value,name:this.name,removedtagvalue:t.value})}))}}getAllOptions(){const e=[...this.querySelectorAll("nile-option")];return this.multiple&&this.oldValue?.length>0&&e.sort(((e,t)=>{let M=this.oldValue.indexOf(e.value),i=this.oldValue.indexOf(t.value);return-1===M&&(M=1/0),-1===i&&(i=1/0),M<i?-1:M>i?1:0})),e}getOptionPrefix(e){const t=e.shadowRoot?.querySelector('slot[name="prefix"]');if(!t)return"";const M=t.assignedNodes(),i=[];return M.forEach((e=>{e instanceof HTMLElement?i.push(e.outerHTML):e.nodeType===Node.TEXT_NODE&&i.push(e.textContent||"")})),i.join("")}getFirstOption(){return this.querySelector("nile-option")}setCurrentOption(e){this.getAllOptions().forEach((e=>{e.current=!1,e.tabIndex=-1})),e&&(this.currentOption=e,e.current=!0,e.tabIndex=0,e.focus())}setSelectedOptions(e){const t=this.getAllOptions(),M=Array.isArray(e)?e:[e];t.forEach((e=>e.selected=!1)),M.length&&M.forEach((e=>e.selected=!0)),this.selectionChanged()}toggleOptionSelection(e,t){e.selected=!0===t||!1===t?t:!e.selected,this.selectionChanged()}selectionChanged(){if(this.selectedOptions=this.getAllOptions().filter((e=>e.selected)),this.multiple){if(this.value=this.selectedOptions.map((e=>e.value)),this.placeholder&&0===this.value.length?this.displayLabel="":this.displayLabel=this.selectedOptions.length+" selected",0===this.selectedOptions.length){this.showSelected=!1;this.getAllOptions().forEach((e=>{e.selected||(e.hidden=this.showSelected)})),this.requestUpdate()}}else this.value=this.selectedOptions[0]?.value??this.value,this.displayLabel=this.selectedOptions[0]?.getTextLabel()?this.selectedOptions[0].getTextLabel():this.value??"";this.updateComplete.then((()=>{this.formControlController?.updateValidity()})),this.calculateTotalWidthOfTags()}handleSearchFocus(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleSearchBlur(){document.addEventListener("keydown",this.handleDocumentKeyDown)}handleSearchChange(e){if(this.searchValue=e.detail.value,this.enableGroupHeader&&this.handleGroupSearchChange(),!this.disableLocalSearch){0===this.filterOptions(this.searchValue).length?this.showNoResults=!0:this.showNoResults=!1}}filterOptions(e){const t=this.getAllOptions(),M=e.toLowerCase();let i=[];return t.forEach((e=>{const t=e.getTextLabel().toLowerCase(),n=(e.value||"").toLowerCase();t.includes(M)||n.includes(M)?(e.hidden=!1,i.push(e)):e.hidden=!0})),i}handleInvalid(e){this.formControlController?.setValidity(!1),this.formControlController?.emitInvalidEvent(e)}handleDisabledChange(){this.disabled&&(this.open=!1,this.handleOpenChange())}handleValueChange(){const e=this.getAllOptions(),t=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(e.filter((e=>t.includes(e.value))))}async handleOpenChange(){if(this.open&&!this.disabled){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("nile-show",{value:this.value,name:this.name}),this.enableGroupHeader&&this.getAllGroupAttributes().forEach((e=>{e.element.classList.remove("nile-group-hidden")})),this.addOpenListeners(),this.showNoResults=!this.getAllOptions()?.length,await ct(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame((()=>{this.setCurrentOption(this.currentOption)}));const{keyframes:e,options:t}=At(this,"select.show",{dir:"ltr"});await Dt(this.popup.popup,e,t),this.currentOption&&xt(this.currentOption,this.listbox,"vertical","auto"),this.searchValue="",this.filterOptions(this.searchValue),this.emit("nile-after-show",{value:this.value,name:this.name})}else{this.emit("nile-hide",{value:this.value,name:this.name}),this.showSelected=!1,this.removeOpenListeners(),await ct(this);const{keyframes:e,options:t}=At(this,"select.hide",{dir:"ltr"});await Dt(this.popup.popup,e,t),this.listbox.hidden=!0,this.popup.active=!1,this.searchValue="",this.emit("nile-after-hide",{value:this.value,name:this.name})}}getAllGroupAttributes(){return Array.from(this.querySelectorAll("nile-option-group[name]")).map((e=>({name:e?.getAttribute("name")||"",data:e?.getAttribute("data"),element:e})))}getUniqueGroupNames(e){return Array.from(new Set(e.map((e=>e?.groupName))))}handleGroupSearchChange(){const e=new Set(this.getUniqueGroupNames(this.filterOptions(this.searchValue)));this.getAllGroupAttributes().forEach((({name:t,element:M})=>{M?.classList.toggle("nile-group-hidden",!e.has(t))}))}handleGroupShowSelected(){const e=new Set;this.showSelected&&this.getAllOptions().forEach((t=>{t.hidden||e.add(t.groupName)})),this.getAllGroupAttributes().forEach((({name:t,element:M})=>{M?.classList.toggle("nile-group-hidden",this.showSelected&&!e.has(t))}))}async show(){if(!this.open&&!this.disabled)return this.open=!0,St(this,"nile-after-show");this.open=!1}async hide(){if(this.open&&!this.disabled)return this.open=!1,St(this,"nile-after-hide");this.open=!1}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController?.getForm()||null}reportValidity(){return this.valueInput.reportValidity()}setCustomValidity(e){this.valueInput.setCustomValidity(e),this.formControlController?.updateValidity()}focus(e){this.displayInput.focus(e)}blur(){this.displayInput.blur()}onInputChange(e){e.stopPropagation()}calculateWidthOfSelectTagsDiv(){if(this.shadowRoot){const e=this.shadowRoot.querySelector("div.select__tags");if(e instanceof HTMLElement){return e.offsetWidth-70}}}calculateTotalWidthOfTags(){this.maxOptionsVisible!==1/0&&(this.oldMaxOptionsVisible=this.maxOptionsVisible),this.maxOptionsVisible=1/0,setTimeout((()=>{let e=[];if(this.shadowRoot){this.shadowRoot.querySelectorAll("nile-tag").forEach((t=>{t instanceof HTMLElement&&e.push(t.offsetWidth)}))}if(this.value.length!==e.length)return;const t=this.calculateWidthOfSelectTagsDiv();if(!t)return;let M=0,i=0;for(let n=0;n<e.length;n++)if(M+=e[n],M>t){i=n;break}this.maxOptionsVisible=i}),1)}render(){if(this.enableVirtualScroll)return this.virtualScrollHelper.renderVirtualizedContent();const e=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const t=this.hasSlotController.test("label-suffix"),M=this.hasSlotController.test("custom-select"),i=!!this.label||!!e,n=this.clearable&&!this.disabled&&this.value.length>0,o=this.placeholder&&0===this.value.length,N=!(!this.helpText&&!this.help_text),r=!!this.errorMessage,s=this.selectedOptions[0]?this.getOptionPrefix(this.selectedOptions[0]):"";return R`
|
4965
|
+
`}}let ln=class extends Pe{get validity(){return this.valueInput?.validity}get validationMessage(){return this.valueInput?.validationMessage}constructor(){super(),this.hasSlotController=new ve(this,"help-text","label"),this.typeToSelectString="",this.scrolling=!1,this.options=[],this.hasFocus=!1,this.displayLabel="",this.selectedOptions=[],this.oldValue="",this.name="",this.value="",this.defaultValue="",this.size="medium",this.placeholder="Select...",this.searchValue="",this.searchEnabled=!1,this.internalSearchPlaceHolder="Search...",this.blockValueChange=!1,this.disableLocalSearch=!1,this.optionsLoading=!1,this.noWidthSync=!1,this.multiple=!1,this.helpText="",this.help_text="",this.errorMessage="",this.warning=!1,this.error=!1,this.success=!1,this.maxOptionsVisible=3,this.disabled=!1,this.clearable=!1,this.open=!1,this.hoist=!1,this.filled=!1,this.pill=!1,this.label="",this.placement="bottom",this.form="",this.required=!1,this.showSelected=!1,this.oldMaxOptionsVisible=1,this.showNoResults=!1,this.noResultsMessage="No results found",this.data=[],this.enableVirtualScroll=!1,this.enableGroupHeader=!1,this.autoFocusSearch=!1}connectedCallback(){super.connectedCallback(),this.enableVirtualScroll||(this.formControlController=new fe(this,{assumeInteractionOn:["nile-blur","nile-input"]})),this.virtualScrollHelper=new gn(this),this.handleDocumentFocusIn=this.handleDocumentFocusIn.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.open=!1,this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.scrollTimeout&&(clearTimeout(this.scrollTimeout),this.scrollTimeout=void 0),this.emit("nile-destroy")}updated(e){e.has("multiple")&&this.setCheckBoxInOption(this.multiple)}firstUpdated(e){this.enableGroupHeader&&this.handleGroupSearchChange(),e.has("multiple")&&this.setCheckBoxInOption(this.multiple)}setCheckBoxInOption(e){this.options.length||(this.options=this.getAllOptions()),this.options.forEach((t=>{t.showCheckbox=e}))}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("nile-focus",{value:this.value,name:this.name})}handleBlur(){this.hasFocus=!1,this.emit("nile-blur",{value:this.value,name:this.name})}handleDocumentFocusIn(e){const t=e.composedPath();this&&!t.includes(this)&&this.hide()}handleFooterClick(e){e.stopPropagation(),e.preventDefault()}toggleShowSelected(e){if(e.stopPropagation(),e.preventDefault(),0===this.selectedOptions?.length)return;this.showSelected=!this.showSelected;this.getAllOptions().forEach((e=>{e.selected||(e.hidden=this.showSelected)})),this.enableGroupHeader&&this.handleGroupShowSelected()}unSlectAll(){this.showSelected=!1;this.getAllOptions().forEach((e=>{e.selected=!1,e.hidden=!1})),this.enableGroupHeader&&this.handleGroupShowSelected(),this.value="",this.selectionChanged(),this.emit("nile-change",{value:this.value,name:this.name}),this.emit("nile-clear",{value:this.multiple?this.value:"",name:this.name})}handleDocumentKeyDown(e){const t=e.target,M=null!==t.closest(".select__clear"),i=null!==t.closest("nile-icon-button");if(!M&&!i){if("Escape"===e.key&&this.open&&(e.preventDefault(),e.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})),"Enter"===e.key||" "===e.key&&""===this.typeToSelectString)return e.preventDefault(),e.stopImmediatePropagation(),this.open?void(this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then((()=>{this.nileInput({value:this.value,name:this.name}),this.nileChange({value:this.value,name:this.name})})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))):void this.show();if(1===e.key.length||"Backspace"===e.key){const t=this.getAllOptions();if(e.metaKey||e.ctrlKey||e.altKey)return;if(!this.open){if("Backspace"===e.key)return;this.show()}e.stopPropagation(),e.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout((()=>this.typeToSelectString=""),1e3),"Backspace"===e.key?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=e.key.toLowerCase();for(const e of t){if(e.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(e);break}}}}}handleDocumentMouseDown(e){const t=e.composedPath();this&&!t.includes(this)&&this.hide()}handleLabelClick(){this.displayInput.focus(),this.hide()}handleComboboxMouseDown(e){const t=e.composedPath().some((e=>e instanceof Element&&"nile-icon-button"===e.tagName.toLowerCase()));this.disabled||t||(e.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open)}handleComboboxKeyDown(e){e.stopPropagation(),this.handleDocumentKeyDown(e)}handleClearClick(e){e.stopPropagation(),""!==this.value&&(this.setSelectedOptions([]),this.showSelected=!1,this.value="",this.displayInput.focus({preventScroll:!0}),this.enableGroupHeader&&this.handleGroupShowSelected(),this.updateComplete.then((()=>{const e={value:this.multiple?this.value:"",name:this.name};this.emit("nile-clear",e),this.nileInput(e),this.nileChange(e)})))}handleClearMouseDown(e){e.stopPropagation(),e.preventDefault()}handleOptionClick(e){const t=e.target.closest("nile-option");if(this.blockValueChange&&t)return this.emit("nile-block-change",{value:t?.value,name:this.name}),void this.hide();const M=this.value;if(this.oldValue=M,t&&!t.disabled&&(this.multiple?this.toggleOptionSelection(t):this.setSelectedOptions(t),this.updateComplete.then((()=>this.displayInput.focus({preventScroll:!0}))),this.value!==M&&this.updateComplete.then((()=>{this.nileInput({value:this.value,name:this.name}),this.nileChange({value:this.value,name:this.name})})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0}))),this.showSelected){this.getAllOptions().forEach((e=>{e.selected||(e.hidden=this.showSelected)})),this.enableGroupHeader&&this.handleGroupShowSelected(),this.requestUpdate()}}handleDefaultSlotChange(){const e=this.getAllOptions(),t=Array.isArray(this.value)?this.value:[this.value],M=[];customElements.get("nile-option")?(e.forEach((e=>M.push(e.value))),this.setSelectedOptions(e.filter((e=>t.map(String).includes(e.value))))):customElements.whenDefined("nile-option").then((()=>this.handleDefaultSlotChange()))}handleTagRemove(e,t){if(e.stopPropagation(),!this.disabled){this.toggleOptionSelection(t,!1);this.getAllOptions().forEach((e=>{e.selected||(e.hidden=this.showSelected)})),this.enableGroupHeader&&this.handleGroupShowSelected(),this.updateComplete.then((()=>{this.nileInput({value:this.value,name:this.name}),this.nileChange({value:this.value,name:this.name}),this.emit("nile-tag-remove",{value:this.value,name:this.name,removedtagvalue:t.value})}))}}getAllOptions(){const e=[...this.querySelectorAll("nile-option")];return this.multiple&&this.oldValue?.length>0&&e.sort(((e,t)=>{let M=this.oldValue.indexOf(e.value),i=this.oldValue.indexOf(t.value);return-1===M&&(M=1/0),-1===i&&(i=1/0),M<i?-1:M>i?1:0})),e}getOptionPrefix(e){const t=e.shadowRoot?.querySelector('slot[name="prefix"]');if(!t)return"";const M=t.assignedNodes(),i=[];return M.forEach((e=>{e instanceof HTMLElement?i.push(e.outerHTML):e.nodeType===Node.TEXT_NODE&&i.push(e.textContent||"")})),i.join("")}getFirstOption(){return this.querySelector("nile-option")}setCurrentOption(e){this.getAllOptions().forEach((e=>{e.current=!1,e.tabIndex=-1})),e&&(this.currentOption=e,e.current=!0,e.tabIndex=0,e.focus())}setSelectedOptions(e){const t=this.getAllOptions(),M=Array.isArray(e)?e:[e];t.forEach((e=>e.selected=!1)),M.length&&M.forEach((e=>e.selected=!0)),this.selectionChanged()}toggleOptionSelection(e,t){e.selected=!0===t||!1===t?t:!e.selected,this.selectionChanged()}selectionChanged(){if(this.selectedOptions=this.getAllOptions().filter((e=>e.selected)),this.multiple){if(this.value=this.selectedOptions.map((e=>e.value)),this.placeholder&&0===this.value.length?this.displayLabel="":this.displayLabel=this.selectedOptions.length+" selected",0===this.selectedOptions.length){this.showSelected=!1;this.getAllOptions().forEach((e=>{e.selected||(e.hidden=this.showSelected)})),this.requestUpdate()}}else this.value=this.selectedOptions[0]?.value??this.value,this.displayLabel=this.selectedOptions[0]?.getTextLabel()?this.selectedOptions[0].getTextLabel():this.value??"";this.updateComplete.then((()=>{this.formControlController?.updateValidity()})),this.calculateTotalWidthOfTags()}handleSearchFocus(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleSearchBlur(){document.addEventListener("keydown",this.handleDocumentKeyDown)}handleSearchChange(e){if(this.searchValue=e.detail.value,this.emit("nile-search",{query:this.searchValue,name:this.name}),this.enableGroupHeader&&this.handleGroupSearchChange(),!this.disableLocalSearch){0===this.filterOptions(this.searchValue).length?this.showNoResults=!0:this.showNoResults=!1}}handleScroll(e){const t=e.target;this.emit("nile-scroll",{scrollTop:t.scrollTop,scrollLeft:t.scrollLeft,name:this.name}),this.scrolling||(this.scrolling=!0,this.emit("nile-scroll-start",{scrollTop:t.scrollTop,scrollLeft:t.scrollLeft,name:this.name})),clearTimeout(this.scrollTimeout),this.scrollTimeout=window.setTimeout((()=>{this.scrolling&&(this.scrolling=!1)}),300);Math.ceil(t.scrollTop)>=Math.floor(t.scrollHeight-t.offsetHeight)&&this.emit("nile-scroll-end",{scrollTop:t.scrollTop,scrollLeft:t.scrollLeft,name:this.name,isAtBottom:!0})}filterOptions(e){const t=this.getAllOptions(),M=e.toLowerCase();let i=[];return t.forEach((e=>{const t=e.getTextLabel().toLowerCase(),n=(e.value||"").toLowerCase();t.includes(M)||n.includes(M)?(e.hidden=!1,i.push(e)):e.hidden=!0})),i}handleInvalid(e){this.formControlController?.setValidity(!1),this.formControlController?.emitInvalidEvent(e)}handleDisabledChange(){this.disabled&&(this.open=!1,this.handleOpenChange())}handleValueChange(){const e=this.getAllOptions(),t=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(e.filter((e=>t.includes(e.value))))}async handleOpenChange(){if(this.open&&!this.disabled){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("nile-show",{value:this.value,name:this.name}),this.enableGroupHeader&&this.getAllGroupAttributes().forEach((e=>{e.element.classList.remove("nile-group-hidden")})),this.addOpenListeners(),this.showNoResults=!this.getAllOptions()?.length,await ct(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame((()=>{this.setCurrentOption(this.currentOption)}));const{keyframes:e,options:t}=At(this,"select.show",{dir:"ltr"});await Dt(this.popup.popup,e,t),this.currentOption&&xt(this.currentOption,this.listbox,"vertical","auto"),this.searchValue="",this.filterOptions(this.searchValue),this.emit("nile-after-show",{value:this.value,name:this.name}),this.autoFocusSearch&&this.handleInputAfterInit()}else{this.emit("nile-hide",{value:this.value,name:this.name}),this.showSelected=!1,this.removeOpenListeners(),await ct(this);const{keyframes:e,options:t}=At(this,"select.hide",{dir:"ltr"});await Dt(this.popup.popup,e,t),this.listbox.hidden=!0,this.popup.active=!1,this.searchValue="",this.emit("nile-after-hide",{value:this.value,name:this.name})}}getAllGroupAttributes(){return Array.from(this.querySelectorAll("nile-option-group[name]")).map((e=>({name:e?.getAttribute("name")||"",data:e?.getAttribute("data"),element:e})))}getUniqueGroupNames(e){return Array.from(new Set(e.map((e=>e?.groupName))))}handleGroupSearchChange(){const e=new Set(this.getUniqueGroupNames(this.filterOptions(this.searchValue)));this.getAllGroupAttributes().forEach((({name:t,element:M})=>{M?.classList.toggle("nile-group-hidden",!e.has(t))}))}handleGroupShowSelected(){const e=new Set;this.showSelected&&this.getAllOptions().forEach((t=>{t.hidden||e.add(t.groupName)})),this.getAllGroupAttributes().forEach((({name:t,element:M})=>{M?.classList.toggle("nile-group-hidden",this.showSelected&&!e.has(t))}))}async show(){if(!this.open&&!this.disabled)return this.open=!0,St(this,"nile-after-show");this.open=!1}async hide(){if(this.open&&!this.disabled)return this.open=!1,St(this,"nile-after-hide");this.open=!1}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController?.getForm()||null}reportValidity(){return this.valueInput.reportValidity()}setCustomValidity(e){this.valueInput.setCustomValidity(e),this.formControlController?.updateValidity()}focus(e){this.displayInput.focus(e)}blur(){this.displayInput.blur()}onInputChange(e){e.stopPropagation()}calculateWidthOfSelectTagsDiv(){if(this.shadowRoot){const e=this.shadowRoot.querySelector("div.select__tags");if(e instanceof HTMLElement){return e.offsetWidth-70}}}calculateTotalWidthOfTags(){this.maxOptionsVisible!==1/0&&(this.oldMaxOptionsVisible=this.maxOptionsVisible),this.maxOptionsVisible=1/0,setTimeout((()=>{let e=[];if(this.shadowRoot){this.shadowRoot.querySelectorAll("nile-tag").forEach((t=>{t instanceof HTMLElement&&e.push(t.offsetWidth)}))}if(this.value.length!==e.length)return;const t=this.calculateWidthOfSelectTagsDiv();if(!t)return;let M=0,i=0;for(let n=0;n<e.length;n++)if(M+=e[n],M>t){i=n;break}this.maxOptionsVisible=i}),1)}handleInputAfterInit(){this.shadowRoot?.querySelector("nile-input")?.inputFocus()}render(){if(this.enableVirtualScroll)return this.virtualScrollHelper.renderVirtualizedContent();const e=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const t=this.hasSlotController.test("label-suffix"),M=this.hasSlotController.test("custom-select"),i=!!this.label||!!e,n=this.clearable&&!this.disabled&&this.value.length>0,o=this.placeholder&&0===this.value.length,N=!(!this.helpText&&!this.help_text),r=!!this.errorMessage,s=this.selectedOptions[0]?this.getOptionPrefix(this.selectedOptions[0]):"";return R`
|
4944
4966
|
<div
|
4945
4967
|
part="form-control"
|
4946
4968
|
class=${Le({"form-control":!0,"form-control--small":"small"===this.size,"form-control--medium":"medium"===this.size,"form-control--large":"large"===this.size,"form-control--has-label":i,"form-control--has-help-text":N})}
|
@@ -5098,6 +5120,7 @@ class $i{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
5098
5120
|
tabindex="-1"
|
5099
5121
|
@mouseup=${this.handleOptionClick}
|
5100
5122
|
@slotchange=${this.handleDefaultSlotChange}
|
5123
|
+
@scroll=${this.handleScroll}
|
5101
5124
|
>
|
5102
5125
|
${this.searchEnabled?R` <div class="select__search">
|
5103
5126
|
<nile-input
|
@@ -5108,6 +5131,7 @@ class $i{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
5108
5131
|
@nile-input=${this.handleSearchChange}
|
5109
5132
|
@nile-focus=${this.handleSearchFocus}
|
5110
5133
|
@nile-change="${this.onInputChange}"
|
5134
|
+
@nile-after-init=${this.handleInputAfterInit}
|
5111
5135
|
>
|
5112
5136
|
<nile-icon name="var(--nile-icon-search, var(--ng-icon-search-lg))" method="var(--nile-svg-method-fill, var(--ng-svg-method-stroke))" slot="suffix"> </nile-icon>
|
5113
5137
|
</nile-input>
|
@@ -5166,7 +5190,7 @@ class $i{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
5166
5190
|
>
|
5167
5191
|
`:""}
|
5168
5192
|
</div>
|
5169
|
-
`}nileInput(e){this.emit("nile-input",e)}nileChange(e){this.emit("nile-change",e)}};ln.styles=gi,e([Ie(".select")],ln.prototype,"popup",void 0),e([Ie(".select__combobox")],ln.prototype,"combobox",void 0),e([Ie(".select__display-input")],ln.prototype,"displayInput",void 0),e([Ie(".select__value-input")],ln.prototype,"valueInput",void 0),e([Ie(".select__listbox")],ln.prototype,"listbox",void 0),e([je()],ln.prototype,"hasFocus",void 0),e([je()],ln.prototype,"displayLabel",void 0),e([je()],ln.prototype,"currentOption",void 0),e([je()],ln.prototype,"selectedOptions",void 0),e([je()],ln.prototype,"oldValue",void 0),e([ue()],ln.prototype,"name",void 0),e([ue({converter:{fromAttribute:e=>e.split(" "),toAttribute:e=>e.join(" ")}})],ln.prototype,"value",void 0),e([Je()],ln.prototype,"defaultValue",void 0),e([ue()],ln.prototype,"size",void 0),e([ue()],ln.prototype,"placeholder",void 0),e([je()],ln.prototype,"searchValue",void 0),e([ue({type:Boolean,reflect:!0})],ln.prototype,"searchEnabled",void 0),e([ue({attribute:"internal-search-placeholder"})],ln.prototype,"internalSearchPlaceHolder",void 0),e([ue({type:Boolean,reflect:!0})],ln.prototype,"blockValueChange",void 0),e([ue({type:Boolean,reflect:!0})],ln.prototype,"disableLocalSearch",void 0),e([ue({type:Boolean,reflect:!0})],ln.prototype,"optionsLoading",void 0),e([ue({type:Boolean,reflect:!0})],ln.prototype,"noWidthSync",void 0),e([ue({reflect:!0,converter:{fromAttribute:e=>""===e||"true"===e||"false"!==e&&e,toAttribute:e=>"boolean"==typeof e?String(e):e}})],ln.prototype,"multiple",void 0),e([ue({attribute:!0,reflect:!0})],ln.prototype,"helpText",void 0),e([ue({attribute:"help-text",reflect:!0})],ln.prototype,"help_text",void 0),e([ue({attribute:"error-message",reflect:!0})],ln.prototype,"errorMessage",void 0),e([ue({type:Boolean})],ln.prototype,"warning",void 0),e([ue({type:Boolean})],ln.prototype,"error",void 0),e([ue({type:Boolean})],ln.prototype,"success",void 0),e([ue({attribute:"max-options-visible",type:Number})],ln.prototype,"maxOptionsVisible",void 0),e([ue({type:Boolean,reflect:!0})],ln.prototype,"disabled",void 0),e([ue({type:Boolean})],ln.prototype,"clearable",void 0),e([ue({type:Boolean,reflect:!0})],ln.prototype,"open",void 0),e([ue({type:Boolean})],ln.prototype,"hoist",void 0),e([ue({type:Boolean,reflect:!0})],ln.prototype,"filled",void 0),e([ue({type:Boolean,reflect:!0})],ln.prototype,"pill",void 0),e([ue()],ln.prototype,"label",void 0),e([ue({reflect:!0})],ln.prototype,"placement",void 0),e([ue({reflect:!0})],ln.prototype,"form",void 0),e([ue({type:Boolean,reflect:!0})],ln.prototype,"required",void 0),e([ue({type:Boolean})],ln.prototype,"showSelected",void 0),e([je()],ln.prototype,"oldMaxOptionsVisible",void 0),e([ue({type:Boolean})],ln.prototype,"showNoResults",void 0),e([ue({type:String})],ln.prototype,"noResultsMessage",void 0),e([ue({attribute:!1})],ln.prototype,"renderItemConfig",void 0),e([ue({type:Array})],ln.prototype,"data",void 0),e([ue({type:Boolean})],ln.prototype,"enableVirtualScroll",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],ln.prototype,"enableGroupHeader",void 0),e([Ve("disabled",{waitUntilFirstUpdate:!0})],ln.prototype,"handleDisabledChange",null),e([Ve("value",{waitUntilFirstUpdate:!0})],ln.prototype,"handleValueChange",null),e([Ve("open",{waitUntilFirstUpdate:!0})],ln.prototype,"handleOpenChange",null),ln=e([ge("nile-select")],ln),yt("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),yt("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});const Dn=N`
|
5193
|
+
`}nileInput(e){this.emit("nile-input",e)}nileChange(e){this.emit("nile-change",e)}};ln.styles=gi,e([Ie(".select")],ln.prototype,"popup",void 0),e([Ie(".select__combobox")],ln.prototype,"combobox",void 0),e([Ie(".select__display-input")],ln.prototype,"displayInput",void 0),e([Ie(".select__value-input")],ln.prototype,"valueInput",void 0),e([Ie(".select__listbox")],ln.prototype,"listbox",void 0),e([je()],ln.prototype,"hasFocus",void 0),e([je()],ln.prototype,"displayLabel",void 0),e([je()],ln.prototype,"currentOption",void 0),e([je()],ln.prototype,"selectedOptions",void 0),e([je()],ln.prototype,"oldValue",void 0),e([ue()],ln.prototype,"name",void 0),e([ue({converter:{fromAttribute:e=>e.split(" "),toAttribute:e=>e.join(" ")}})],ln.prototype,"value",void 0),e([Je()],ln.prototype,"defaultValue",void 0),e([ue()],ln.prototype,"size",void 0),e([ue()],ln.prototype,"placeholder",void 0),e([je()],ln.prototype,"searchValue",void 0),e([ue({type:Boolean,reflect:!0})],ln.prototype,"searchEnabled",void 0),e([ue({attribute:"internal-search-placeholder"})],ln.prototype,"internalSearchPlaceHolder",void 0),e([ue({type:Boolean,reflect:!0})],ln.prototype,"blockValueChange",void 0),e([ue({type:Boolean,reflect:!0})],ln.prototype,"disableLocalSearch",void 0),e([ue({type:Boolean,reflect:!0})],ln.prototype,"optionsLoading",void 0),e([ue({type:Boolean,reflect:!0})],ln.prototype,"noWidthSync",void 0),e([ue({reflect:!0,converter:{fromAttribute:e=>""===e||"true"===e||"false"!==e&&e,toAttribute:e=>"boolean"==typeof e?String(e):e}})],ln.prototype,"multiple",void 0),e([ue({attribute:!0,reflect:!0})],ln.prototype,"helpText",void 0),e([ue({attribute:"help-text",reflect:!0})],ln.prototype,"help_text",void 0),e([ue({attribute:"error-message",reflect:!0})],ln.prototype,"errorMessage",void 0),e([ue({type:Boolean})],ln.prototype,"warning",void 0),e([ue({type:Boolean})],ln.prototype,"error",void 0),e([ue({type:Boolean})],ln.prototype,"success",void 0),e([ue({attribute:"max-options-visible",type:Number})],ln.prototype,"maxOptionsVisible",void 0),e([ue({type:Boolean,reflect:!0})],ln.prototype,"disabled",void 0),e([ue({type:Boolean})],ln.prototype,"clearable",void 0),e([ue({type:Boolean,reflect:!0})],ln.prototype,"open",void 0),e([ue({type:Boolean})],ln.prototype,"hoist",void 0),e([ue({type:Boolean,reflect:!0})],ln.prototype,"filled",void 0),e([ue({type:Boolean,reflect:!0})],ln.prototype,"pill",void 0),e([ue()],ln.prototype,"label",void 0),e([ue({reflect:!0})],ln.prototype,"placement",void 0),e([ue({reflect:!0})],ln.prototype,"form",void 0),e([ue({type:Boolean,reflect:!0})],ln.prototype,"required",void 0),e([ue({type:Boolean})],ln.prototype,"showSelected",void 0),e([je()],ln.prototype,"oldMaxOptionsVisible",void 0),e([ue({type:Boolean})],ln.prototype,"showNoResults",void 0),e([ue({type:String})],ln.prototype,"noResultsMessage",void 0),e([ue({attribute:!1})],ln.prototype,"renderItemConfig",void 0),e([ue({type:Array})],ln.prototype,"data",void 0),e([ue({type:Boolean})],ln.prototype,"enableVirtualScroll",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],ln.prototype,"enableGroupHeader",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],ln.prototype,"autoFocusSearch",void 0),e([Ve("disabled",{waitUntilFirstUpdate:!0})],ln.prototype,"handleDisabledChange",null),e([Ve("value",{waitUntilFirstUpdate:!0})],ln.prototype,"handleValueChange",null),e([Ve("open",{waitUntilFirstUpdate:!0})],ln.prototype,"handleOpenChange",null),ln=e([ge("nile-select")],ln),yt("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),yt("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});const Dn=N`
|
5170
5194
|
:host {
|
5171
5195
|
display: block;
|
5172
5196
|
user-select: none;
|
@@ -5273,7 +5297,7 @@ class $i{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
5273
5297
|
outline-offset: -1px;
|
5274
5298
|
}
|
5275
5299
|
}
|
5276
|
-
`;let un=class extends Pe{constructor(){super(...arguments),this.current=!1,this.hasHover=!1,this.hidden=!1,this.isMultipleSelect=!1,this.value="",this.showCheckbox=!1,this.disabled=!1,this.selected=!1,this.groupName=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false"),this.
|
5300
|
+
`;let un=class extends Pe{constructor(){super(...arguments),this.current=!1,this.hasHover=!1,this.hidden=!1,this.isMultipleSelect=!1,this.value="",this.showCheckbox=!1,this.disabled=!1,this.selected=!1,this.groupName=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false"),this.checkIfMultipleSelect()}checkIfMultipleSelect(){const e=this.closest("nile-select");e&&e.hasAttribute("multiple")?e.hasAttribute("multiple")&&""===e.getAttribute("multiple")||"true"===e.getAttribute("multiple")?this.isMultipleSelect=!0:this.isMultipleSelect=!1:this.isMultipleSelect=this.showCheckbox}updated(e){this.checkIfMultipleSelect()}handleDefaultSlotChange(){const e=this.getTextLabel();void 0!==this.cachedTextLabel?e!==this.cachedTextLabel&&(this.cachedTextLabel=e,this.emit("slotchange")):this.cachedTextLabel=e}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){"string"!=typeof this.value&&(this.value=String(this.value))}getTextLabel(){const e=this.querySelector("label");return e?e.textContent?.trim()??"":(this.textContent??"").trim()}render(){return R`
|
5277
5301
|
${this.hidden?"":R` <div
|
5278
5302
|
part="base"
|
5279
5303
|
class=${Le({option:!0,"option--single-select":!this.isMultipleSelect,"option--current":this.selected&&!this.isMultipleSelect,"option--disabled":this.disabled,"option--selected":this.selected&&!this.isMultipleSelect,"option--hover":this.hasHover})}
|
@@ -5291,7 +5315,7 @@ class $i{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
5291
5315
|
></slot>
|
5292
5316
|
<slot part="suffix" name="suffix" class="option__suffix"></slot>
|
5293
5317
|
</div>`}
|
5294
|
-
`}};un.styles=Dn,e([Ie(".option__label")],un.prototype,"defaultSlot",void 0),e([je()],un.prototype,"current",void 0),e([je()],un.prototype,"hasHover",void 0),e([je()],un.prototype,"hidden",void 0),e([je()],un.prototype,"isMultipleSelect",void 0),e([ue({reflect:!0})],un.prototype,"value",void 0),e([ue({type:Boolean})],un.prototype,"showCheckbox",void 0),e([ue({type:Boolean,reflect:!0})],un.prototype,"disabled",void 0),e([ue({type:Boolean,reflect:!0})],un.prototype,"selected",void 0),e([ue({type:String,reflect:!0})],un.prototype,"groupName",void 0),e([Ve("disabled")],un.prototype,"handleDisabledChange",null),e([Ve("selected")],un.prototype,"handleSelectedChange",null),e([Ve("value")],un.prototype,"handleValueChange",null),un=e([ge("nile-option")],un);const jn=N`
|
5318
|
+
`}};un.styles=Dn,e([Ie(".option__label")],un.prototype,"defaultSlot",void 0),e([je()],un.prototype,"current",void 0),e([je()],un.prototype,"hasHover",void 0),e([je()],un.prototype,"hidden",void 0),e([je()],un.prototype,"isMultipleSelect",void 0),e([ue({reflect:!0})],un.prototype,"value",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],un.prototype,"showCheckbox",void 0),e([ue({type:Boolean,reflect:!0})],un.prototype,"disabled",void 0),e([ue({type:Boolean,reflect:!0})],un.prototype,"selected",void 0),e([ue({type:String,reflect:!0,attribute:!0})],un.prototype,"groupName",void 0),e([Ve("disabled")],un.prototype,"handleDisabledChange",null),e([Ve("selected")],un.prototype,"handleSelectedChange",null),e([Ve("value")],un.prototype,"handleValueChange",null),un=e([ge("nile-option")],un);const jn=N`
|
5295
5319
|
:host {
|
5296
5320
|
box-sizing: border-box;
|
5297
5321
|
-webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));
|
@@ -8199,7 +8223,7 @@ class $i{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
8199
8223
|
<nile-form-error-message
|
8200
8224
|
>${this.errorMessage}</nile-form-error-message
|
8201
8225
|
>
|
8202
|
-
`:""}`}createNewView(e=!0){this.view&&this.view.destroy(),this.createState(),this.view=new Dl({state:this.viewState,parent:this.codeEditor}),this.view.dom.addEventListener("keydown",(e=>{this.checkForSpaceKey(e),this.handleEscapeKey(e)}),!0),e&&this.emit("nile-after-update",{createNewView:this.createNewView,codeMirrorInstance:this.view},!1)}checkForSpaceKey(e){"Space"!==e.code||e.ctrlKey?this.isSpacePressed=!1:this.isSpacePressed=!0}handleEscapeKey(e){"Escape"===e.key&&this.view&&null!==function(e){let t=e.field(od,!1);return t&&t.active.some((e=>e.isPending))?"pending":t&&t.active.some((e=>0!=e.state))?"active":null}(this.view.state)&&(e.stopPropagation(),e.preventDefault(),ld(this.view))}createState(){const e=this.lineNumbersComp.of(this.getLineNumbersExension()),t=this.readOnlyComp.of(this.getReadOnlyExtension()),M=this.restrictSingleLineComp.of(this.getSingleLineExtension()),i=this.placeholderComp.of(this.getPlaceholderExtension()),n=this.themeComp.of(this.getCustomThemeExtension()),o=this.defaultSyntaxHighlightingComp.of(this.getDefaultSyntaxHighlightingExtension()),N=this.getLanguageExtension(),r=this.customCompletionComp.of(yA.data.of({autocomplete:this.customAutocomplete}));return this.viewState=vN.create({doc:this.multiline?this.value:gL(this.value),extensions:[NL({highlightActiveLine:!1,foldGutter:this.enableFoldGutters,enableSearch:this.enableSearch}),e,t,M,r,i,o,this.autoCompletionComp.of($d({aboveCursor:this.aboveCursor})),N,n,this.getTabCompletionKeymap(),Dl.updateListener.of((e=>{e.docChanged&&(this.debounce?this.emitAfterTimeout({value:this.view.state.doc.toString()}):this.emit("nile-change",{value:this.view.state.doc.toString()}))})),Dl.domEventHandlers({focus:()=>this.dispatchEvent(new Event("nile-focus")),blur:()=>this.dispatchEvent(new Event("nile-blur"))})]}),this.viewState}getNestedSuggestions(e,t,M){if(!function(e){return/^([a-zA-Z_$][\w$]*)(\.[a-zA-Z_$][\w$]*|\[\s*(['"]?[a-zA-Z0-9_$]*['"]?)\s*\])*([\.\[])?$/.test(e)}(t)||![".","["].includes(t.at(-1)))return null;const i=function(e){const t=/([a-zA-Z_$][\w$]*)(\[(?:[^\]]+)\]|\.[a-zA-Z_$][\w$]*)*/g,M=[...e.matchAll(t)];if(M.length>0){const t=[M[0][1]],i=e.match(/\[(.*?)\]|\.(\w+)/g)||[];for(const e of i)e.startsWith("[")?t.push(e.slice(1,-1).replace(/['"]/g,"")):e.startsWith(".")&&t.push(e.slice(1));return t}return null}(t);if(!i)return null;const n=M.replace(/["'\[]/g,""),o=n!==M,N="["===t.at(-1);if("."===t.at(-1)&&o)return null;let r=function(e,t){return t.reduce(((e,t)=>e&&"object"==typeof e?e[t]:null),e)}(this.customAutoCompletions,i);return r&&"object"==typeof r?(n&&(r=Object.fromEntries(Object.entries(r).filter((([e])=>e.toLowerCase().startsWith(n.toLowerCase()))))),{from:e.pos-n.length,options:Object.keys(r).map((e=>({label:e,type:"property",info:`Key of ${i[i.length-1]}`,apply:this.allowVariableInCustomSuggestion||!N||o?e:`'${e}'`,boost:999})))}):null}getTopLevelSuggestions(e,t){const M=t.match(/([a-zA-Z_$][\w$]*)$/);if(!M){if(""===t.trim()&&!this.isSpacePressed){const t=Object.keys(this.customAutoCompletions).filter((e=>Object.keys(this.customAutoCompletions[e]).length)).map((e=>({label:e,type:"property",apply:e,boost:999})));return this.customCompletionsPaths.length&&this.customCompletionsPaths.forEach((e=>{t.push({label:""+e,type:"property",apply:""+e,boost:998})})),{from:e.pos,options:t}}return null}const i=Object.keys(this.customAutoCompletions).filter((e=>Object.keys(this.customAutoCompletions[e]).length&&e.toLowerCase().startsWith(t.toLowerCase()))).map((e=>({label:e,type:"property",apply:e,boost:999})));return this.customCompletionsPaths.length&&this.customCompletionsPaths.filter((e=>e.toLocaleLowerCase().includes(t.toLocaleLowerCase()))).forEach((e=>{i.push({label:""+e,type:"property",apply:""+e,boost:998})})),{from:e.pos-M[1].length,options:i}}emitAfterTimeout(e){this.timeOut&&clearTimeout(this.timeOut),this.timeOut=setTimeout((()=>this.emit("nile-change",e,!1)),this.debounceTimeout)}focusAtPosition(e=this.view.state.doc.toString().length){this.view&&(this.view.dispatch({selection:{anchor:e}}),this.view.focus())}singleLineMultiLineToggle(){this.view.dispatch({changes:{from:0,to:this.view.state.doc.length,insert:this.multiline?this.value:gL(this.value)}})}getLineNumbersExension(){return!this.multiline&&this.lineNumbers||this.multiline&&this.lineNumbersMultiline?function(e={}){return[JD.of(e),ZD(),$D]}():[]}getLanguageExtension(){switch(this.language){case"sql":return function(e={}){let t=e.dialect||sO;return new fj(t.language,[rO(e),oO(t,!!e.upperCaseKeywords)])}();case"json":return new fj(lO);case"html":return function(e={}){let t,M="";!1===e.matchClosingTags&&(M="noMatch"),!0===e.selfClosingTags&&(M=(M?M+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(t=YO((e.nestedLanguages||[]).concat(Kh),(e.nestedAttributes||[]).concat(eL)));let i=t?tL.configure({wrap:t,dialect:M}):M?ML.configure({dialect:M}):ML;return new fj(i,[ML.data.of({autocomplete:$h(e)}),!1!==e.autoCloseTags?nL:[],Qh().support,new fj(ah,ah.data.of({autocomplete:sh})).support])}();default:return function(e={}){let t=e.jsx?e.typescript?LA:hA:e.typescript?OA:yA,M=e.typescript?gA.concat(SA):aA.concat(pA);return new fj(t,[yA.data.of({autocomplete:wT(TA,QT(M))}),yA.data.of({autocomplete:dA}),e.jsx?wA:[]])}()}}getReadOnlyExtension(){return this.readonly?vN.readOnly.of(!0):[]}getSingleLineExtension(){return this.multiline?[]:vN.transactionFilter.of((e=>e.newDoc.lines>1?[]:e))}getPlaceholderExtension(){return this.placeholder?function(e){return ua.fromClass(class{constructor(t){this.view=t,this.placeholder=e?zs.set([zs.widget({widget:new MD(e),side:1}).range(0)]):zs.none}get decorations(){return this.view.state.doc.length?zs.none:this.placeholder}},{decorations:e=>e.decorations})}(this.placeholder):[]}getDefaultSyntaxHighlightingExtension(){return this.disableSyntaxHighlighting?[]:function(e,t){let M,i=[Ec];return e instanceof hc&&(e.module&&i.push(Dl.styleModule.of(e.module)),M=e.themeType),(null==t?void 0:t.fallback)?i.push(xc.of(e)):M?i.push(Lc.computeN([Dl.darkTheme],(t=>t.facet(Dl.darkTheme)==("dark"==M)?[e]:[]))):i.push(Lc.of(e)),i}(Qc,{fallback:!0})}getCustomThemeExtension(){return this.customThemeCSS?this.defaultFont?[Dl.theme(this.customThemeCSS),Dl.theme(sL),Dl.theme(rL)]:[Dl.theme(this.customThemeCSS),Dl.theme(sL)]:this.defaultFont?[Dl.theme(sL),Dl.theme(rL)]:[Dl.theme(sL)]}restrictSingleLine(){return vN.transactionFilter.of((e=>e.newDoc.lines>1?[]:e))}};function gL(e){return e?e.replace(/\s+/g," ").trim():""}e([Ie(".code__editor__container")],aL.prototype,"codeEditor",void 0),e([ue({type:String,reflect:!0,attribute:!0})],aL.prototype,"value",void 0),e([ue({type:String,reflect:!0,attribute:!0})],aL.prototype,"expandIcon",void 0),e([ue({type:String,reflect:!0,attribute:!0})],aL.prototype,"placeholder",void 0),e([ue({type:Object,reflect:!0,attribute:!0})],aL.prototype,"customAutoCompletions",void 0),e([ue({type:Array,reflect:!0,attribute:!0})],aL.prototype,"customCompletionsPaths",void 0),e([ue({type:String,reflect:!0,attribute:!0})],aL.prototype,"language",void 0),e([ue({type:String,reflect:!0,attribute:"error-message"})],aL.prototype,"errorMessage",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"error",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"enableSearch",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"noborder",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"multiline",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"enableFoldGutters",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"allowVariableInCustomSuggestion",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"lineNumbers",void 0),e([ue({type:Boolean,reflect:!0,attribute:!1})],aL.prototype,"disableSyntaxHighlighting",void 0),e([ue({type:Object,attribute:!1})],aL.prototype,"customThemeCSS",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"lineNumbersMultiline",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"hasScroller",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"expandable",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"readonly",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"debounce",void 0),e([ue({type:Number,reflect:!0,attribute:!0})],aL.prototype,"debounceTimeout",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"aboveCursor",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"tabCompletion",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"defaultFont",void 0),aL=e([ge("nile-code-editor")],aL);const lL=N`
|
8226
|
+
`:""}`}createNewView(e=!0){this.view&&this.view.destroy(),this.createState(),this.view=new Dl({state:this.viewState,parent:this.codeEditor}),this.view.dom.addEventListener("keydown",(e=>{this.checkForSpaceKey(e),this.handleEscapeKey(e)}),!0),e&&this.emit("nile-after-update",{createNewView:this.createNewView,codeMirrorInstance:this.view},!1)}checkForSpaceKey(e){"Space"!==e.code||e.ctrlKey?this.isSpacePressed=!1:this.isSpacePressed=!0}closeCompletion(){this.view&&ld(this.view)}handleEscapeKey(e){"Escape"===e.key&&this.view&&null!==function(e){let t=e.field(od,!1);return t&&t.active.some((e=>e.isPending))?"pending":t&&t.active.some((e=>0!=e.state))?"active":null}(this.view.state)&&(e.stopPropagation(),e.preventDefault(),ld(this.view))}createState(){const e=this.lineNumbersComp.of(this.getLineNumbersExension()),t=this.readOnlyComp.of(this.getReadOnlyExtension()),M=this.restrictSingleLineComp.of(this.getSingleLineExtension()),i=this.placeholderComp.of(this.getPlaceholderExtension()),n=this.themeComp.of(this.getCustomThemeExtension()),o=this.defaultSyntaxHighlightingComp.of(this.getDefaultSyntaxHighlightingExtension()),N=this.getLanguageExtension(),r=this.customCompletionComp.of(yA.data.of({autocomplete:this.customAutocomplete}));return this.viewState=vN.create({doc:this.multiline?this.value:gL(this.value),extensions:[NL({highlightActiveLine:!1,foldGutter:this.enableFoldGutters,enableSearch:this.enableSearch}),e,t,M,r,i,o,this.autoCompletionComp.of($d({aboveCursor:this.aboveCursor})),N,n,this.getTabCompletionKeymap(),Dl.updateListener.of((e=>{e.docChanged&&(this.debounce?this.emitAfterTimeout({value:this.view.state.doc.toString()}):this.emit("nile-change",{value:this.view.state.doc.toString()}))})),Dl.domEventHandlers({focus:()=>this.dispatchEvent(new Event("nile-focus")),blur:()=>this.dispatchEvent(new Event("nile-blur"))})]}),this.viewState}getNestedSuggestions(e,t,M){if(!function(e){return/^([a-zA-Z_$][\w$]*)(\.[a-zA-Z_$][\w$]*|\[\s*(['"]?[a-zA-Z0-9_$]*['"]?)\s*\])*([\.\[])?$/.test(e)}(t)||![".","["].includes(t.at(-1)))return null;const i=function(e){const t=/([a-zA-Z_$][\w$]*)(\[(?:[^\]]+)\]|\.[a-zA-Z_$][\w$]*)*/g,M=[...e.matchAll(t)];if(M.length>0){const t=[M[0][1]],i=e.match(/\[(.*?)\]|\.(\w+)/g)||[];for(const e of i)e.startsWith("[")?t.push(e.slice(1,-1).replace(/['"]/g,"")):e.startsWith(".")&&t.push(e.slice(1));return t}return null}(t);if(!i)return null;const n=M.replace(/["'\[]/g,""),o=n!==M,N="["===t.at(-1);if("."===t.at(-1)&&o)return null;let r=function(e,t){return t.reduce(((e,t)=>e&&"object"==typeof e?e[t]:null),e)}(this.customAutoCompletions,i);return r&&"object"==typeof r?(n&&(r=Object.fromEntries(Object.entries(r).filter((([e])=>e.toLowerCase().startsWith(n.toLowerCase()))))),{from:e.pos-n.length,options:Object.keys(r).map((e=>({label:e,type:"property",info:`Key of ${i[i.length-1]}`,apply:this.allowVariableInCustomSuggestion||!N||o?e:`'${e}'`,boost:999})))}):null}getTopLevelSuggestions(e,t){const M=t.match(/([a-zA-Z_$][\w$]*)$/);if(!M){if(""===t.trim()&&!this.isSpacePressed){const t=Object.keys(this.customAutoCompletions).filter((e=>Object.keys(this.customAutoCompletions[e]).length)).map((e=>({label:e,type:"property",apply:e,boost:999})));return this.customCompletionsPaths.length&&this.customCompletionsPaths.forEach((e=>{t.push({label:""+e,type:"property",apply:""+e,boost:998})})),{from:e.pos,options:t}}return null}const i=Object.keys(this.customAutoCompletions).filter((e=>Object.keys(this.customAutoCompletions[e]).length&&e.toLowerCase().startsWith(t.toLowerCase()))).map((e=>({label:e,type:"property",apply:e,boost:999})));return this.customCompletionsPaths.length&&this.customCompletionsPaths.filter((e=>e.toLocaleLowerCase().includes(t.toLocaleLowerCase()))).forEach((e=>{i.push({label:""+e,type:"property",apply:""+e,boost:998})})),{from:e.pos-M[1].length,options:i}}emitAfterTimeout(e){this.timeOut&&clearTimeout(this.timeOut),this.timeOut=setTimeout((()=>this.emit("nile-change",e,!1)),this.debounceTimeout)}focusAtPosition(e=this.view.state.doc.toString().length){this.view&&(this.view.dispatch({selection:{anchor:e}}),this.view.focus())}singleLineMultiLineToggle(){this.view.dispatch({changes:{from:0,to:this.view.state.doc.length,insert:this.multiline?this.value:gL(this.value)}})}getLineNumbersExension(){return!this.multiline&&this.lineNumbers||this.multiline&&this.lineNumbersMultiline?function(e={}){return[JD.of(e),ZD(),$D]}():[]}getLanguageExtension(){switch(this.language){case"sql":return function(e={}){let t=e.dialect||sO;return new fj(t.language,[rO(e),oO(t,!!e.upperCaseKeywords)])}();case"json":return new fj(lO);case"html":return function(e={}){let t,M="";!1===e.matchClosingTags&&(M="noMatch"),!0===e.selfClosingTags&&(M=(M?M+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(t=YO((e.nestedLanguages||[]).concat(Kh),(e.nestedAttributes||[]).concat(eL)));let i=t?tL.configure({wrap:t,dialect:M}):M?ML.configure({dialect:M}):ML;return new fj(i,[ML.data.of({autocomplete:$h(e)}),!1!==e.autoCloseTags?nL:[],Qh().support,new fj(ah,ah.data.of({autocomplete:sh})).support])}();default:return function(e={}){let t=e.jsx?e.typescript?LA:hA:e.typescript?OA:yA,M=e.typescript?gA.concat(SA):aA.concat(pA);return new fj(t,[yA.data.of({autocomplete:wT(TA,QT(M))}),yA.data.of({autocomplete:dA}),e.jsx?wA:[]])}()}}getReadOnlyExtension(){return this.readonly?vN.readOnly.of(!0):[]}getSingleLineExtension(){return this.multiline?[]:vN.transactionFilter.of((e=>e.newDoc.lines>1?[]:e))}getPlaceholderExtension(){return this.placeholder?function(e){return ua.fromClass(class{constructor(t){this.view=t,this.placeholder=e?zs.set([zs.widget({widget:new MD(e),side:1}).range(0)]):zs.none}get decorations(){return this.view.state.doc.length?zs.none:this.placeholder}},{decorations:e=>e.decorations})}(this.placeholder):[]}getDefaultSyntaxHighlightingExtension(){return this.disableSyntaxHighlighting?[]:function(e,t){let M,i=[Ec];return e instanceof hc&&(e.module&&i.push(Dl.styleModule.of(e.module)),M=e.themeType),(null==t?void 0:t.fallback)?i.push(xc.of(e)):M?i.push(Lc.computeN([Dl.darkTheme],(t=>t.facet(Dl.darkTheme)==("dark"==M)?[e]:[]))):i.push(Lc.of(e)),i}(Qc,{fallback:!0})}getCustomThemeExtension(){return this.customThemeCSS?this.defaultFont?[Dl.theme(this.customThemeCSS),Dl.theme(sL),Dl.theme(rL)]:[Dl.theme(this.customThemeCSS),Dl.theme(sL)]:this.defaultFont?[Dl.theme(sL),Dl.theme(rL)]:[Dl.theme(sL)]}restrictSingleLine(){return vN.transactionFilter.of((e=>e.newDoc.lines>1?[]:e))}};function gL(e){return e?e.replace(/\s+/g," ").trim():""}e([Ie(".code__editor__container")],aL.prototype,"codeEditor",void 0),e([ue({type:String,reflect:!0,attribute:!0})],aL.prototype,"value",void 0),e([ue({type:String,reflect:!0,attribute:!0})],aL.prototype,"expandIcon",void 0),e([ue({type:String,reflect:!0,attribute:!0})],aL.prototype,"placeholder",void 0),e([ue({type:Object,reflect:!0,attribute:!0})],aL.prototype,"customAutoCompletions",void 0),e([ue({type:Array,reflect:!0,attribute:!0})],aL.prototype,"customCompletionsPaths",void 0),e([ue({type:String,reflect:!0,attribute:!0})],aL.prototype,"language",void 0),e([ue({type:String,reflect:!0,attribute:"error-message"})],aL.prototype,"errorMessage",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"error",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"enableSearch",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"noborder",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"multiline",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"enableFoldGutters",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"allowVariableInCustomSuggestion",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"lineNumbers",void 0),e([ue({type:Boolean,reflect:!0,attribute:!1})],aL.prototype,"disableSyntaxHighlighting",void 0),e([ue({type:Object,attribute:!1})],aL.prototype,"customThemeCSS",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"lineNumbersMultiline",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"hasScroller",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"expandable",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"readonly",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"debounce",void 0),e([ue({type:Number,reflect:!0,attribute:!0})],aL.prototype,"debounceTimeout",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"aboveCursor",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"tabCompletion",void 0),e([ue({type:Boolean,reflect:!0,attribute:!0})],aL.prototype,"defaultFont",void 0),aL=e([ge("nile-code-editor")],aL);const lL=N`
|
8203
8227
|
:host {
|
8204
8228
|
display: contents;
|
8205
8229
|
-webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));
|
@@ -9168,98 +9192,42 @@ class $i{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
9168
9192
|
</slot>
|
9169
9193
|
</div>
|
9170
9194
|
`}};e([ue({type:Boolean,reflect:!0})],CL.prototype,"overlaysidebar",void 0),e([ue({reflect:!0})],CL.prototype,"placement",void 0),e([ue({type:Boolean,reflect:!0})],CL.prototype,"isopen",void 0),CL=e([ge("nile-sidebar-wrapper")],CL);const UL=N`
|
9171
|
-
:host([resizable]) {
|
9172
|
-
|
9195
|
+
:host([resizable]) .base {
|
9196
|
+
overflow: unset;
|
9173
9197
|
}
|
9174
|
-
|
9175
|
-
|
9176
|
-
|
9198
|
+
:host([resizable]) .nile__table__body {
|
9199
|
+
display: table;
|
9200
|
+
table-layout: fixed;
|
9201
|
+
border-collapse: collapse;
|
9202
|
+
width: 100%;
|
9177
9203
|
position: relative;
|
9178
9204
|
}
|
9179
9205
|
`,bL=N`
|
9180
|
-
.
|
9181
|
-
|
9182
|
-
|
9183
|
-
|
9184
|
-
|
9185
|
-
|
9186
|
-
cursor: ew-resize;
|
9187
|
-
user-select: none;
|
9188
|
-
transition: background-color 0.2s;
|
9189
|
-
z-index: 10;
|
9190
|
-
opacity: 0;
|
9191
|
-
transition: opacity 0.2s ease;
|
9192
|
-
}
|
9193
|
-
|
9194
|
-
:host([resizable]):hover .resizer {
|
9195
|
-
opacity: 1;
|
9196
|
-
}
|
9197
|
-
|
9198
|
-
.resizer::before {
|
9199
|
-
content: '';
|
9200
|
-
position: absolute;
|
9201
|
-
height: 100%;
|
9202
|
-
opacity: 0.8;
|
9206
|
+
:host([resizable]) .headers {
|
9207
|
+
overflow: hidden;
|
9208
|
+
white-space: nowrap;
|
9209
|
+
text-overflow: ellipsis;
|
9210
|
+
padding: var(--nile-spacing-xs, var(--ng-spacing-xs)) var(--nile-spacing-md, var(--ng-spacing-md));
|
9211
|
+
position: relative;
|
9203
9212
|
}
|
9204
9213
|
|
9205
|
-
.
|
9206
|
-
border-right:
|
9207
|
-
|
9208
|
-
opacity: 1;
|
9214
|
+
:host([resizable]) .header__item__wrapper {
|
9215
|
+
border-right: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
9216
|
+
position: relative;
|
9209
9217
|
}
|
9210
9218
|
|
9211
9219
|
:host([resizable]) .headers {
|
9220
|
+
overflow: hidden;
|
9212
9221
|
text-overflow: ellipsis;
|
9213
9222
|
white-space: nowrap;
|
9223
|
+
display: block;
|
9214
9224
|
}
|
9215
9225
|
`,fL=N`
|
9216
|
-
.nile__table__body[resizable] {
|
9217
|
-
table-layout: fixed;
|
9218
|
-
}
|
9219
|
-
`,YL=N`
|
9220
|
-
:host {
|
9221
|
-
--min-cell-width:auto;
|
9222
|
-
--cell-width:auto;
|
9223
|
-
--min--height: 52px;
|
9224
|
-
--max--cell-width: auto;
|
9225
|
-
box-sizing: border-box;
|
9226
|
-
display: table-cell;
|
9227
|
-
vertical-align: middle;
|
9228
|
-
padding: var(--nile-spacing-xl , var(--ng-spacing-lg)) var(--nile-spacing-3xl , var(--ng-spacing-3xl));
|
9229
|
-
max-width: var(--max--cell-width);
|
9230
|
-
min-height: var(--min--height);
|
9231
|
-
-webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));
|
9232
|
-
-moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));
|
9233
|
-
text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));
|
9234
|
-
}
|
9235
|
-
|
9236
|
-
.column {
|
9237
|
-
min-width:var(--min-cell-width);
|
9238
|
-
width:var(--cell-width);
|
9239
|
-
height: 100%;
|
9240
|
-
color: var(--nile-colors-gray-light-mode-600 , var(--ng-colors-text-tertiary-600));
|
9241
|
-
font-family: var(--nile-font-family-serif , var(--ng-font-family-body));
|
9242
|
-
font-size: var(--nile-type-scale-3 , var(--ng-font-size-text-sm));
|
9243
|
-
font-style: normal;
|
9244
|
-
font-weight: var(--nile-font-weight-regular , var(--ng-font-weight-regular));
|
9245
|
-
/* line-height: var(--nile-type-scale-6); */
|
9246
|
-
line-height: normal;
|
9247
|
-
letter-spacing: 0.2px;
|
9248
|
-
}
|
9249
|
-
|
9250
|
-
${N`
|
9251
|
-
:host([resizable]) {
|
9252
|
-
position: relative;
|
9253
|
-
overflow: hidden;
|
9254
|
-
table-layout: fixed;
|
9255
|
-
}
|
9256
|
-
`}
|
9257
|
-
${N`
|
9258
9226
|
.resizer {
|
9259
9227
|
position: absolute;
|
9260
9228
|
right: 0;
|
9261
|
-
top:
|
9262
|
-
bottom:
|
9229
|
+
top: 0px;
|
9230
|
+
bottom: 0px;
|
9263
9231
|
width: 8px;
|
9264
9232
|
cursor: col-resize;
|
9265
9233
|
user-select: none;
|
@@ -9268,7 +9236,6 @@ class $i{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
9268
9236
|
z-index: 10;
|
9269
9237
|
opacity: 0;
|
9270
9238
|
transition: opacity 0.2s ease;
|
9271
|
-
pointer-events: none;
|
9272
9239
|
}
|
9273
9240
|
|
9274
9241
|
:host([resizable]):hover .resizer {
|
@@ -9279,7 +9246,7 @@ class $i{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
9279
9246
|
.resizer::before {
|
9280
9247
|
content: '';
|
9281
9248
|
position: absolute;
|
9282
|
-
right:
|
9249
|
+
right: 0px;
|
9283
9250
|
top: 0;
|
9284
9251
|
width: 2px;
|
9285
9252
|
height: 100%;
|
@@ -9307,15 +9274,43 @@ class $i{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
9307
9274
|
opacity: 1;
|
9308
9275
|
width: 3px;
|
9309
9276
|
}
|
9277
|
+
`;N`
|
9278
|
+
.resizer {
|
9279
|
+
position: absolute;
|
9280
|
+
right: -2px;
|
9281
|
+
top: -1000px;
|
9282
|
+
bottom: -1000px;
|
9283
|
+
width: 8px;
|
9284
|
+
cursor: ew-resize;
|
9285
|
+
user-select: none;
|
9286
|
+
transition: background-color 0.2s;
|
9287
|
+
z-index: 10;
|
9288
|
+
opacity: 0;
|
9289
|
+
transition: opacity 0.2s ease;
|
9290
|
+
}
|
9310
9291
|
|
9311
|
-
:host([resizable]) .
|
9312
|
-
|
9292
|
+
:host([resizable]):hover .resizer {
|
9293
|
+
opacity: 1;
|
9294
|
+
}
|
9295
|
+
|
9296
|
+
.resizer::before {
|
9297
|
+
content: '';
|
9298
|
+
position: absolute;
|
9299
|
+
height: 100%;
|
9300
|
+
opacity: 0.8;
|
9301
|
+
}
|
9302
|
+
|
9303
|
+
.resizer.resizing {
|
9304
|
+
border-right: 4px double var(--nile-colors-neutral-400);
|
9305
|
+
background-color: transparent;
|
9306
|
+
opacity: 1;
|
9307
|
+
}
|
9308
|
+
|
9309
|
+
:host([resizable]) .headers {
|
9313
9310
|
text-overflow: ellipsis;
|
9314
9311
|
white-space: nowrap;
|
9315
|
-
display: block;
|
9316
9312
|
}
|
9317
|
-
`
|
9318
|
-
${N`
|
9313
|
+
`,N`
|
9319
9314
|
:host([resizable]) ::slotted(*) {
|
9320
9315
|
overflow: hidden;
|
9321
9316
|
text-overflow: ellipsis;
|
@@ -9331,7 +9326,51 @@ class $i{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
9331
9326
|
white-space: nowrap;
|
9332
9327
|
display: block;
|
9333
9328
|
}
|
9329
|
+
`,N`
|
9330
|
+
.nile__table__body[resizable] {
|
9331
|
+
table-layout: fixed;
|
9332
|
+
}
|
9333
|
+
`;const YL=N`
|
9334
|
+
:host {
|
9335
|
+
--min-cell-width:auto;
|
9336
|
+
--cell-width:auto;
|
9337
|
+
--min--height: 52px;
|
9338
|
+
--max--cell-width: auto;
|
9339
|
+
--padding: var(--nile-spacing-xl , var(--ng-spacing-lg)) var(--nile-spacing-3xl , var(--ng-spacing-3xl));
|
9340
|
+
box-sizing: border-box;
|
9341
|
+
display: table-cell;
|
9342
|
+
vertical-align: middle;
|
9343
|
+
padding: var(--padding);
|
9344
|
+
max-width: var(--max--cell-width);
|
9345
|
+
min-height: var(--min--height);
|
9346
|
+
-webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));
|
9347
|
+
-moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));
|
9348
|
+
text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));
|
9349
|
+
}
|
9350
|
+
|
9351
|
+
.column {
|
9352
|
+
min-width:var(--min-cell-width);
|
9353
|
+
width:var(--cell-width);
|
9354
|
+
height: 100%;
|
9355
|
+
color: var(--nile-colors-gray-light-mode-600 , var(--ng-colors-text-tertiary-600));
|
9356
|
+
font-family: var(--nile-font-family-serif , var(--ng-font-family-body));
|
9357
|
+
font-size: var(--nile-type-scale-3 , var(--ng-font-size-text-sm));
|
9358
|
+
font-style: normal;
|
9359
|
+
font-weight: var(--nile-font-weight-regular , var(--ng-font-weight-regular));
|
9360
|
+
/* line-height: var(--nile-type-scale-6); */
|
9361
|
+
line-height: normal;
|
9362
|
+
letter-spacing: 0.2px;
|
9363
|
+
}
|
9364
|
+
|
9365
|
+
${N`
|
9366
|
+
:host([resizable]) .column {
|
9367
|
+
overflow: hidden;
|
9368
|
+
text-overflow: ellipsis;
|
9369
|
+
white-space: nowrap;
|
9370
|
+
display: block;
|
9371
|
+
}
|
9334
9372
|
`}
|
9373
|
+
${fL}
|
9335
9374
|
`;function vL(e,t){e.preventDefault(),e.stopPropagation();const{minWidth:M=50,startX:i,startWidth:n,element:o}=t,N=e.target;N.classList.add("resizing");const r=e=>{e.preventDefault(),e.stopPropagation();const t=e.pageX-i,N=Math.max(M,n+t);o.style.width=N+"px",function(e,t){const M=e.closest("nile-table-body");if(!M)return;const i="nile-table-header-item"===e.tagName.toLowerCase(),n="nile-table-cell-item",o=function(e,t){const M=e.closest("nile-table-row");if(M){const i=M.querySelectorAll(t);return Array.from(i).indexOf(e)}return 0}(e,i?"nile-table-header-item":"nile-table-cell-item");M.querySelectorAll("nile-table-row").forEach((e=>{const M=e.querySelectorAll(n);M[o]&&(M[o].style.width=t+"px")}))}(o,N)},s=()=>{N.classList.remove("resizing"),document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",s)};return document.addEventListener("mousemove",r),document.addEventListener("mouseup",s),()=>{document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",s)}}function ZL(e){const t=e.querySelectorAll("nile-table-header-item"),M=e.querySelectorAll("nile-table-cell-item");t.forEach((e=>{e.style.removeProperty("width")})),M.forEach((e=>{e.style.removeProperty("width")}))}function VL(e,t=50){return M=>{vL(M,{minWidth:t,startX:M.pageX,startWidth:e.offsetWidth,element:e})}}let WL=class extends Pe{constructor(){super(...arguments),this.hasSlotController=new ve(this,"[default]"),this.resizable=!1,this.handleResizeStart=VL(this,50)}static get styles(){return[YL]}updated(e){if(super.updated(e),e.has("resizable")&&!this.resizable){const e=this.closest("nile-table-body");e&&ZL(e)}}render(){return this.resizable?R`
|
9336
9375
|
<div class="cell__wrapper" part="nile__table-cell">
|
9337
9376
|
${this.hasSlotController.test("[default]")?R` <div class="column" part="nile__table-cell"><slot></slot></div>`:""}
|
@@ -9403,7 +9442,7 @@ class $i{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
9403
9442
|
border-bottom: 0px;
|
9404
9443
|
}
|
9405
9444
|
|
9406
|
-
${
|
9445
|
+
${UL}
|
9407
9446
|
`;let BL=class extends Pe{constructor(){super(...arguments),this.type="primary",this.rows_data=[],this.header_rows_data=[],this.hasResizableColumns=!1}static get styles(){return[GL]}firstUpdated(e){this.emit("nile-body-load",{value:this.type,comp:this},!0,!1)}getChildren(e,t){return e.querySelectorAll(t)}getIndexValue(e){return this.header_rows_data.indexOf(e)}checkForResizableColumns(){this.hasResizableColumns=function(e){const t=Array.from(e.children),M=t.some((e=>"nile-table-header-item"===e.tagName.toLowerCase()&&e.hasAttribute("resizable"))),i=t.some((e=>"nile-table-cell-item"===e.tagName.toLowerCase()&&e.hasAttribute("resizable")));return M||i}(this)}handleSlotchange(e){let t=[];this._childNodes.forEach((e=>{if(e.tagName&&"nile-table-row"===e?.tagName?.toLowerCase()){let M=this.getChildren(e,"nile-table-cell-item");if(M.length>0)M.forEach((e=>{t.push(e.innerHTML)})),this.rows_data.push(t);else{let t=this.getChildren(e,"nile-table-header-item");t.length>0&&t.forEach(((e,t)=>{this.header_rows_data.push(e.innerHTML)}))}t=[]}})),this.checkForResizableColumns()}handleSort(e){const{curr_sort_string:t,order:M}=e.detail.value,i=this.getIndexValue(t);this.emit("nile-sort",{value:{header_index:i,curr_sort_string:t,order:M}})}handleSearch(e){const t=e.detail.value;this.search__index=this.getIndexValue(e.target.textContent),this.emit("nile-table-search",{index:this.search__index,value:t})}render(){return R`
|
9408
9447
|
<div class="base" part="base">
|
9409
9448
|
<slot name="table__header" class="table__header"></slot>
|
@@ -9483,8 +9522,8 @@ class $i{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
9483
9522
|
--nile-svg-stroke-width: var(--nile-icon-stroke-width-1-3, var(--ng-icon-stroke-width-2-5));
|
9484
9523
|
}
|
9485
9524
|
|
9486
|
-
${UL}
|
9487
9525
|
${bL}
|
9526
|
+
${fL}
|
9488
9527
|
`;let FL=class extends Pe{constructor(){super(...arguments),this.hasSlotController=new ve(this,"[default]"),this.havesort=!1,this.havefilter=!1,this.iconName="",this.resizable=!1,this.sorting_ct=0,this.handleResizeStart=VL(this,50)}static get styles(){return[_L]}updated(e){if(super.updated(e),e.has("resizable")&&!this.resizable){const e=this.closest("nile-table-body");e&&ZL(e)}}handleSort(e){this.sorting_ct++;let t=this.hasSlotController.host.innerHTML;this.emit("nile-click-sort",{value:{curr_sort_string:t,order:["normal","asc","des"][this.sorting_ct%3]}})}handleSearch(e){this.emit("nile-search",{value:e.detail.value})}render(){return R`
|
9489
9528
|
<div class="header__item__wrapper" part="nile__table-header-cell">
|
9490
9529
|
<div class="headers">
|
@@ -11506,6 +11545,16 @@ class $i{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
11506
11545
|
margin-right: 12px;
|
11507
11546
|
}
|
11508
11547
|
|
11548
|
+
.badge{
|
11549
|
+
display: inline-flex;
|
11550
|
+
align-items: center;
|
11551
|
+
height: 20px;
|
11552
|
+
}
|
11553
|
+
|
11554
|
+
nile-badge::part(content) {
|
11555
|
+
line-height: 20px;
|
11556
|
+
}
|
11557
|
+
|
11509
11558
|
`;var Px;let Rx=Px=class extends Pe{constructor(){super(...arguments),this.label="",this.value="",this.viewMoreCount=0,this.editable=!1,this.closable=!1,this.icon="",this.removeIcon="",this.active=!1}static get styles(){return[Wx]}connectedCallback(){super.connectedCallback(),this.registerChip()}disconnectedCallback(){super.disconnectedCallback(),this.unregisterChip()}registerChip(){Px.activeChips.push(this)}unregisterChip(){Px.activeChips=Px.activeChips.filter((e=>e!==this))}handleClose(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent("nile-close",{detail:{value:this.value,viewMoreCount:this.viewMoreCount}})),this.remove()}handleClick(){this.dispatchEvent(new CustomEvent("nile-click",{detail:{value:this.value,viewMoreCount:this.viewMoreCount}}))}getLabelSlot(){return R`
|
11510
11559
|
<span class="label-wrapper">
|
11511
11560
|
<slot name="label">
|
@@ -11524,7 +11573,7 @@ class $i{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
11524
11573
|
<slot name="suffix">
|
11525
11574
|
${this.viewMoreCount?R`
|
11526
11575
|
<span class="badge-wrapper">
|
11527
|
-
<nile-badge variant="primary" pilltype="pill-color">
|
11576
|
+
<nile-badge class="badge" part="badge" variant="primary" pilltype="pill-color" exportparts="content, base">
|
11528
11577
|
+${this.viewMoreCount}
|
11529
11578
|
</nile-badge>
|
11530
11579
|
</span>
|
@@ -13694,7 +13743,7 @@ class $i{constructor(e){this._element=null;const t=e??window;this._node=t,e&&(th
|
|
13694
13743
|
<!-- suffix content -->
|
13695
13744
|
${this.data?.suffix?.icon?.name?R`<nile-icon part="suffix-icon" name="${this.data?.suffix?.icon?.name}" size="${this.data?.suffix?.icon?.size||"16"}" color="${this.data?.suffix?.icon?.color||"var(--nile-colors-dark-500)"}" method="${this.data?.suffix?.icon?.method||"fill"}"></nile-icon>`:this.data?.suffix?.suffixText?R`<span part="suffix-text">${this.data?.suffix?.suffixText}</span>`:this.data?.suffix?.image?.src?R`<img part="suffix-image" src="${this.data?.prefix?.image?.src}" width="${this.normalizeImageDimension(this.data?.suffix?.image?.width)}" height="${this.normalizeImageDimension(this.data?.suffix?.image?.height)}">`:R`<slot part="suffix" name="suffix" class="option-group-suffix"></slot>`}
|
13696
13745
|
</div>
|
13697
|
-
`}};e([ue({type:String,reflect:!0,attribute:!0})],Zp.prototype,"name",void 0),e([ue({type:Object,attribute:!0})],Zp.prototype,"data",void 0),Zp=e([ge("nile-option-group")],Zp);
|
13746
|
+
`}};e([ue({type:String,reflect:!0,attribute:!0})],Zp.prototype,"name",void 0),e([ue({type:Object,reflect:!0,attribute:!0})],Zp.prototype,"data",void 0),Zp=e([ge("nile-option-group")],Zp);
|
13698
13747
|
/**
|
13699
13748
|
* @license
|
13700
13749
|
* Copyright 2021 Google LLC
|