@kodaris/krubble-app-components 1.0.165 → 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
package/dist/krubble-app.umd.js
CHANGED
|
@@ -3677,6 +3677,28 @@
|
|
|
3677
3677
|
this._inputValue = payload.message;
|
|
3678
3678
|
this._handleSubmit();
|
|
3679
3679
|
}
|
|
3680
|
+
/**
|
|
3681
|
+
* Open the panel and place `payload.message` in the composer, selected, without sending it.
|
|
3682
|
+
*
|
|
3683
|
+
* For a host app that wants to suggest an opening message rather than send one (e.g. a site
|
|
3684
|
+
* editor deep link): Enter sends it as is, typing replaces it. Nothing is persisted beyond the
|
|
3685
|
+
* composer draft state any typed text gets.
|
|
3686
|
+
*/
|
|
3687
|
+
draft(payload) {
|
|
3688
|
+
this.open();
|
|
3689
|
+
this._inputValue = payload.message;
|
|
3690
|
+
this._saveState();
|
|
3691
|
+
// Same delay as the open-focus in `updated`: the panel has to finish showing before the
|
|
3692
|
+
// textarea can take focus, and this has to run after that focus so the selection sticks.
|
|
3693
|
+
this.updateComplete.then(() => {
|
|
3694
|
+
setTimeout(() => {
|
|
3695
|
+
if (this._inputEl) {
|
|
3696
|
+
this._inputEl.focus();
|
|
3697
|
+
this._inputEl.select();
|
|
3698
|
+
}
|
|
3699
|
+
}, 200);
|
|
3700
|
+
});
|
|
3701
|
+
}
|
|
3680
3702
|
// --- Private methods ---
|
|
3681
3703
|
/**
|
|
3682
3704
|
* Shows a full-viewport transparent overlay during drag/resize operations.
|