@ni/spright-components 5.5.0 → 5.5.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/dist/all-components-bundle.js +9 -1
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +4 -2
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/chat/input/index.d.ts +1 -0
- package/dist/esm/chat/input/index.js +8 -2
- package/dist/esm/chat/input/index.js.map +1 -1
- package/dist/esm/chat/input/template.js +2 -0
- package/dist/esm/chat/input/template.js.map +1 -1
- package/dist/esm/chat/input/testing/chat-input.pageobject.d.ts +2 -0
- package/dist/esm/chat/input/testing/chat-input.pageobject.js +6 -0
- package/dist/esm/chat/input/testing/chat-input.pageobject.js.map +1 -1
- package/package.json +1 -1
|
@@ -15245,6 +15245,7 @@ const uJ=Mt`
|
|
|
15245
15245
|
${Ut("textArea")}
|
|
15246
15246
|
placeholder="${t=>t.placeholder}"
|
|
15247
15247
|
rows="1"
|
|
15248
|
+
tabindex="${t=>t.tabIndex}"
|
|
15248
15249
|
@keydown="${(t,e)=>t.textAreaKeydownHandler(e.event)}"
|
|
15249
15250
|
@input="${t=>t.textAreaInputHandler()}"
|
|
15250
15251
|
></textarea>
|
|
@@ -15254,6 +15255,7 @@ const uJ=Mt`
|
|
|
15254
15255
|
appearance-variant="accent"
|
|
15255
15256
|
?disabled=${t=>t.disableSendButton}
|
|
15256
15257
|
@click=${t=>t.sendButtonClickHandler()}
|
|
15258
|
+
tabindex="${t=>t.tabIndex}"
|
|
15257
15259
|
title=${t=>t.sendButtonLabel}
|
|
15258
15260
|
content-hidden
|
|
15259
15261
|
>
|
|
@@ -15263,8 +15265,8 @@ const uJ=Mt`
|
|
|
15263
15265
|
</div>`
|
|
15264
15266
|
class fJ extends je{constructor(){super(...arguments),this.value="",this.disableSendButton=!0}resetInput(){this.value="",this.disableSendButton=!0,this.textArea&&(this.textArea.value="",this.textArea.focus())}textAreaKeydownHandler(t){return!(t.key===dn&&!t.shiftKey)||(this.sendButtonClickHandler(),!1)}textAreaInputHandler(){this.value=this.textArea.value,this.disableSendButton=this.shouldDisableSendButton()}valueChanged(){this.textArea&&(this.textArea.value=this.value,this.disableSendButton=this.shouldDisableSendButton())}connectedCallback(){super.connectedCallback(),this.textArea.value=this.value,this.disableSendButton=this.shouldDisableSendButton()}sendButtonClickHandler(){if(this.shouldDisableSendButton())return
|
|
15265
15267
|
const t={text:this.textArea.value}
|
|
15266
|
-
this.$emit("send",t)}shouldDisableSendButton(){return 0===this.textArea.value.length}}t([ft],fJ.prototype,"placeholder",void 0),t([ft({attribute:"send-button-label"})],fJ.prototype,"sendButtonLabel",void 0),t([ft],fJ.prototype,"value",void 0),t([C],fJ.prototype,"textArea",void 0),t([C],fJ.prototype,"disableSendButton",void 0)
|
|
15267
|
-
const mJ=fJ.compose({baseName:"chat-input",template:pJ,styles:uJ})
|
|
15268
|
+
this.$emit("send",t)}shouldDisableSendButton(){return 0===this.textArea.value.length}}t([ft],fJ.prototype,"placeholder",void 0),t([ft({attribute:"send-button-label"})],fJ.prototype,"sendButtonLabel",void 0),t([ft],fJ.prototype,"value",void 0),t([ft({attribute:"tabindex",converter:ut})],fJ.prototype,"tabIndex",void 0),t([C],fJ.prototype,"textArea",void 0),t([C],fJ.prototype,"disableSendButton",void 0)
|
|
15269
|
+
const mJ=fJ.compose({baseName:"chat-input",template:pJ,styles:uJ,shadowOptions:{delegatesFocus:!0}})
|
|
15268
15270
|
Di.getOrCreate().withPrefix("spright").register(mJ())
|
|
15269
15271
|
const gJ={system:void 0,outbound:"outbound",inbound:"inbound"},vJ=Mt`
|
|
15270
15272
|
${lJ("flex")}
|