@kodaris/krubble-app-components 1.0.164 → 1.0.166
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/chatbot.d.ts +8 -0
- package/dist/chatbot.d.ts.map +1 -1
- package/dist/chatbot.js +22 -0
- package/dist/chatbot.js.map +1 -1
- package/dist/krubble-app.bundled.js +22 -0
- package/dist/krubble-app.bundled.js.map +1 -1
- package/dist/krubble-app.bundled.min.js +1 -1
- package/dist/krubble-app.bundled.min.js.map +1 -1
- package/dist/krubble-app.umd.js +22 -0
- package/dist/krubble-app.umd.js.map +1 -1
- package/dist/krubble-app.umd.min.js +5 -5
- package/dist/krubble-app.umd.min.js.map +1 -1
- package/dist/krubble-shell-chatbot.umd.js +22 -0
- package/dist/krubble-shell-chatbot.umd.js.map +1 -1
- package/dist/krubble-shell-chatbot.umd.min.js +1 -1
- package/dist/krubble-shell-chatbot.umd.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -21659,6 +21659,28 @@
|
|
|
21659
21659
|
this._inputValue = payload.message;
|
|
21660
21660
|
this._handleSubmit();
|
|
21661
21661
|
}
|
|
21662
|
+
/**
|
|
21663
|
+
* Open the panel and place `payload.message` in the composer, selected, without sending it.
|
|
21664
|
+
*
|
|
21665
|
+
* For a host app that wants to suggest an opening message rather than send one (e.g. a site
|
|
21666
|
+
* editor deep link): Enter sends it as is, typing replaces it. Nothing is persisted beyond the
|
|
21667
|
+
* composer draft state any typed text gets.
|
|
21668
|
+
*/
|
|
21669
|
+
draft(payload) {
|
|
21670
|
+
this.open();
|
|
21671
|
+
this._inputValue = payload.message;
|
|
21672
|
+
this._saveState();
|
|
21673
|
+
// Same delay as the open-focus in `updated`: the panel has to finish showing before the
|
|
21674
|
+
// textarea can take focus, and this has to run after that focus so the selection sticks.
|
|
21675
|
+
this.updateComplete.then(() => {
|
|
21676
|
+
setTimeout(() => {
|
|
21677
|
+
if (this._inputEl) {
|
|
21678
|
+
this._inputEl.focus();
|
|
21679
|
+
this._inputEl.select();
|
|
21680
|
+
}
|
|
21681
|
+
}, 200);
|
|
21682
|
+
});
|
|
21683
|
+
}
|
|
21662
21684
|
// --- Private methods ---
|
|
21663
21685
|
/**
|
|
21664
21686
|
* Shows a full-viewport transparent overlay during drag/resize operations.
|