@k2b/ui 0.32.0 → 0.33.0
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/browser/actions/Dropdown.js +159 -99
- package/dist/browser/actions/Dropdown.js.map +1 -1
- package/dist/browser/actions/FilterChip.js +113 -56
- package/dist/browser/actions/FilterChip.js.map +1 -1
- package/dist/browser/actions/filter-messages.js +26 -2
- package/dist/browser/actions/filter-messages.js.map +1 -1
- package/dist/browser/actions/menu-rows.js +23 -3
- package/dist/browser/actions/menu-rows.js.map +1 -1
- package/dist/browser/actions/menu-sheet.js +2 -7
- package/dist/browser/actions/menu-sheet.js.map +1 -1
- package/dist/browser/chat/ChatComposer.js +480 -403
- package/dist/browser/chat/ChatComposer.js.map +1 -1
- package/dist/browser/chat/chat-messages.js +14 -0
- package/dist/browser/chat/chat-messages.js.map +1 -1
- package/dist/browser/chat/index.js.map +1 -1
- package/dist/browser/content/Calendar.js +39 -29
- package/dist/browser/content/Calendar.js.map +1 -1
- package/dist/browser/content/CalendarDayView.js +159 -165
- package/dist/browser/content/CalendarDayView.js.map +1 -1
- package/dist/browser/content/MessageRow.js +607 -343
- package/dist/browser/content/MessageRow.js.map +1 -1
- package/dist/browser/content/ReactionBar.js +17 -0
- package/dist/browser/content/ReactionBar.js.map +1 -1
- package/dist/browser/content/index.js +1 -1
- package/dist/browser/content/index.js.map +1 -1
- package/dist/browser/feedback/dialog-core.js +6 -0
- package/dist/browser/feedback/dialog-core.js.map +1 -1
- package/dist/browser/inputs/TextInput.js +4 -1
- package/dist/browser/inputs/TextInput.js.map +1 -1
- package/dist/browser/intl/shortcut-messages.js +4 -0
- package/dist/browser/intl/shortcut-messages.js.map +1 -1
- package/dist/browser/intl/shortcut.js +4 -0
- package/dist/browser/intl/shortcut.js.map +1 -1
- package/dist/browser/layout/AppWorkspace.js +529 -512
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/browser/layout/MobileShell.js +213 -38
- package/dist/browser/layout/MobileShell.js.map +1 -1
- package/dist/browser/layout/index.js +1 -0
- package/dist/browser/layout/index.js.map +1 -1
- package/dist/browser/layout/scroll-fade.js +32 -5
- package/dist/browser/layout/scroll-fade.js.map +1 -1
- package/dist/browser/surfaces/NoticeCard.js +46 -30
- package/dist/browser/surfaces/NoticeCard.js.map +1 -1
- package/dist/browser/surfaces/resource-messages.js +2 -2
- package/dist/browser/surfaces/resource-messages.js.map +1 -1
- package/dist/ssr/actions/Dropdown.js +51 -27
- package/dist/ssr/actions/Dropdown.js.map +1 -1
- package/dist/ssr/actions/FilterChip.js +67 -16
- package/dist/ssr/actions/FilterChip.js.map +1 -1
- package/dist/ssr/actions/filter-messages.js +26 -2
- package/dist/ssr/actions/filter-messages.js.map +1 -1
- package/dist/ssr/actions/menu-rows.js +23 -3
- package/dist/ssr/actions/menu-rows.js.map +1 -1
- package/dist/ssr/actions/menu-sheet.js +2 -7
- package/dist/ssr/actions/menu-sheet.js.map +1 -1
- package/dist/ssr/chat/ChatComposer.js +96 -67
- package/dist/ssr/chat/ChatComposer.js.map +1 -1
- package/dist/ssr/chat/chat-messages.js +14 -0
- package/dist/ssr/chat/chat-messages.js.map +1 -1
- package/dist/ssr/chat/index.js.map +1 -1
- package/dist/ssr/content/Calendar.js +40 -31
- package/dist/ssr/content/Calendar.js.map +1 -1
- package/dist/ssr/content/CalendarDayView.js +40 -48
- package/dist/ssr/content/CalendarDayView.js.map +1 -1
- package/dist/ssr/content/MessageRow.js +264 -91
- package/dist/ssr/content/MessageRow.js.map +1 -1
- package/dist/ssr/content/ReactionBar.js +17 -0
- package/dist/ssr/content/ReactionBar.js.map +1 -1
- package/dist/ssr/content/index.js +1 -1
- package/dist/ssr/content/index.js.map +1 -1
- package/dist/ssr/feedback/dialog-core.js +6 -0
- package/dist/ssr/feedback/dialog-core.js.map +1 -1
- package/dist/ssr/inputs/TextInput.js +4 -1
- package/dist/ssr/inputs/TextInput.js.map +1 -1
- package/dist/ssr/intl/shortcut-messages.js +4 -0
- package/dist/ssr/intl/shortcut-messages.js.map +1 -1
- package/dist/ssr/intl/shortcut.js +4 -0
- package/dist/ssr/intl/shortcut.js.map +1 -1
- package/dist/ssr/layout/AppWorkspace.js +134 -122
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/layout/MobileShell.js +100 -20
- package/dist/ssr/layout/MobileShell.js.map +1 -1
- package/dist/ssr/layout/index.js +1 -0
- package/dist/ssr/layout/index.js.map +1 -1
- package/dist/ssr/layout/scroll-fade.js +32 -5
- package/dist/ssr/layout/scroll-fade.js.map +1 -1
- package/dist/ssr/surfaces/NoticeCard.js +21 -12
- package/dist/ssr/surfaces/NoticeCard.js.map +1 -1
- package/dist/ssr/surfaces/resource-messages.js +2 -2
- package/dist/ssr/surfaces/resource-messages.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/actions/Dropdown.d.ts +14 -0
- package/dist/types/actions/FilterChip.d.ts +11 -0
- package/dist/types/actions/filter-messages.d.ts +12 -0
- package/dist/types/actions/menu-rows.d.ts +7 -2
- package/dist/types/chat/ChatComposer.d.ts +13 -0
- package/dist/types/chat/chat-messages.d.ts +7 -0
- package/dist/types/chat/index.d.ts +1 -1
- package/dist/types/content/Calendar.d.ts +7 -0
- package/dist/types/content/MessageRow.d.ts +64 -2
- package/dist/types/content/index.d.ts +2 -2
- package/dist/types/feedback/dialog-core.d.ts +3 -0
- package/dist/types/intl/shortcut-messages.d.ts +2 -0
- package/dist/types/layout/AppWorkspace.d.ts +2 -0
- package/dist/types/layout/MobileShell.d.ts +52 -5
- package/dist/types/layout/index.d.ts +2 -1
- package/dist/types/layout/scroll-fade.d.ts +5 -0
- package/dist/types/surfaces/NoticeCard.d.ts +3 -0
- package/package.json +2 -2
|
@@ -30,37 +30,42 @@ var _tmpl$ = /*#__PURE__*/_$template(`<span><strong>`),
|
|
|
30
30
|
_tmpl$13 = /*#__PURE__*/_$template(`<button class=k2b-chat-composer__command type=button role=option tabindex=-1><i aria-hidden=true></i><span class=k2b-chat-composer__command-text><strong></strong><!$><!/></span><!$><!/>`),
|
|
31
31
|
_tmpl$14 = /*#__PURE__*/_$template(`<b>`),
|
|
32
32
|
_tmpl$15 = /*#__PURE__*/_$template(`<small>`),
|
|
33
|
-
_tmpl$16 = /*#__PURE__*/_$template(`<
|
|
34
|
-
_tmpl$17 = /*#__PURE__*/_$template(`<
|
|
35
|
-
_tmpl$18 = /*#__PURE__*/_$template(`<div
|
|
36
|
-
_tmpl$19 = /*#__PURE__*/_$template(`<
|
|
37
|
-
_tmpl$20 = /*#__PURE__*/_$template(`<div role=status>`),
|
|
38
|
-
_tmpl$21 = /*#__PURE__*/_$template(`<div
|
|
39
|
-
_tmpl$22 = /*#__PURE__*/_$template(`<div
|
|
40
|
-
_tmpl$23 = /*#__PURE__*/_$template(`<div class=k2b-chat-
|
|
41
|
-
_tmpl$24 = /*#__PURE__*/_$template(`<div class=k2b-chat-
|
|
42
|
-
_tmpl$25 = /*#__PURE__*/_$template(`<div class=k2b-chat-
|
|
43
|
-
_tmpl$26 = /*#__PURE__*/_$template(`<div class=k2b-chat-
|
|
44
|
-
_tmpl$27 = /*#__PURE__*/_$template(`<div class=k2b-chat-
|
|
45
|
-
_tmpl$28 = /*#__PURE__*/_$template(`<
|
|
46
|
-
_tmpl$29 = /*#__PURE__*/_$template(`<
|
|
47
|
-
_tmpl$30 = /*#__PURE__*/_$template(`<
|
|
48
|
-
_tmpl$31 = /*#__PURE__*/_$template(`<
|
|
49
|
-
_tmpl$32 = /*#__PURE__*/_$template(`<
|
|
50
|
-
_tmpl$33 = /*#__PURE__*/_$template(`<
|
|
51
|
-
_tmpl$34 = /*#__PURE__*/_$template(`<
|
|
52
|
-
_tmpl$35 = /*#__PURE__*/_$template(`<
|
|
53
|
-
_tmpl$36 = /*#__PURE__*/_$template(`<
|
|
54
|
-
_tmpl$37 = /*#__PURE__*/_$template(`<
|
|
55
|
-
_tmpl$38 = /*#__PURE__*/_$template(`<
|
|
56
|
-
_tmpl$39 = /*#__PURE__*/_$template(`<div class=k2b-
|
|
57
|
-
_tmpl$40 = /*#__PURE__*/_$template(`<
|
|
58
|
-
_tmpl$41 = /*#__PURE__*/_$template(`<button type=button class=k2b-chat-composer__attachment-
|
|
59
|
-
_tmpl$42 = /*#__PURE__*/_$template(`<
|
|
60
|
-
_tmpl$43 = /*#__PURE__*/_$template(`<
|
|
61
|
-
_tmpl$44 = /*#__PURE__*/_$template(`<div class=k2b-chat-
|
|
62
|
-
_tmpl$45 = /*#__PURE__*/_$template(`<
|
|
63
|
-
_tmpl$46 = /*#__PURE__*/_$template(`<
|
|
33
|
+
_tmpl$16 = /*#__PURE__*/_$template(`<span class=k2b-message-row__quote-author><span class=k2b-sr-only><!$><!/> </span><!$><!/>`),
|
|
34
|
+
_tmpl$17 = /*#__PURE__*/_$template(`<span class=k2b-message-row__quote-text>`),
|
|
35
|
+
_tmpl$18 = /*#__PURE__*/_$template(`<div class=k2b-chat-composer-accessory><div class=k2b-chat-composer__commands role=listbox>`),
|
|
36
|
+
_tmpl$19 = /*#__PURE__*/_$template(`<label class=k2b-chat-composer__command-search><i class="ti ti-search"aria-hidden=true></i><input type=text role=combobox aria-autocomplete=list aria-expanded=true autocomplete=off autocapitalize=off>`),
|
|
37
|
+
_tmpl$20 = /*#__PURE__*/_$template(`<div role=status class=k2b-chat-composer__loading><i class="ti ti-loader-2 k2b-spin"aria-hidden=true></i><strong>`),
|
|
38
|
+
_tmpl$21 = /*#__PURE__*/_$template(`<div role=status><i class="ti ti-alert-circle"></i> <!$><!/>`),
|
|
39
|
+
_tmpl$22 = /*#__PURE__*/_$template(`<div role=status>`),
|
|
40
|
+
_tmpl$23 = /*#__PURE__*/_$template(`<div class=k2b-chat-composer-accessory data-commands><!$><!/><div class=k2b-chat-composer__commands role=listbox><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/>`),
|
|
41
|
+
_tmpl$24 = /*#__PURE__*/_$template(`<div class=k2b-chat-composer-slot><div></div><!$><!/><!$><!/>`),
|
|
42
|
+
_tmpl$25 = /*#__PURE__*/_$template(`<div class=k2b-chat-composer__hint aria-live=polite>`),
|
|
43
|
+
_tmpl$26 = /*#__PURE__*/_$template(`<div class=k2b-chat-composer__attachments role=list tabindex=0>`),
|
|
44
|
+
_tmpl$27 = /*#__PURE__*/_$template(`<div class=k2b-chat-composer__error role=alert><i class="ti ti-alert-circle"aria-hidden=true></i><!$><!/>`),
|
|
45
|
+
_tmpl$28 = /*#__PURE__*/_$template(`<div class=k2b-chat-composer__row><!$><!/><!$><!/><div class=k2b-chat-composer__field><!$><!/><div class=k2b-chat-composer__field-tools><!$><!/><!$><!/><!$><!/></div></div><!$><!/>`),
|
|
46
|
+
_tmpl$29 = /*#__PURE__*/_$template(`<div class=k2b-chat-composer-shell><!$><!/><section role=group><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/></section><div class=k2b-sr-only role=status aria-live=polite></div><div class=k2b-chat-composer__status role=status><!$><!/><!$><!/>`),
|
|
47
|
+
_tmpl$30 = /*#__PURE__*/_$template(`<button type=button role=option tabindex=-1><span class=k2b-chat-composer__emoji-glyph aria-hidden=true></span><strong></strong><!$><!/>`),
|
|
48
|
+
_tmpl$31 = /*#__PURE__*/_$template(`<small>:<!$><!/>:`),
|
|
49
|
+
_tmpl$32 = /*#__PURE__*/_$template(`<i class="ti ti-loader-2 k2b-spin"aria-hidden=true>`),
|
|
50
|
+
_tmpl$33 = /*#__PURE__*/_$template(`<div class=k2b-chat-composer__command-group role=group><div class=k2b-chat-composer__command-heading role=presentation><span></span><!$><!/></div><!$><!/><!$><!/>`),
|
|
51
|
+
_tmpl$34 = /*#__PURE__*/_$template(`<div class=k2b-chat-composer__command-placeholder aria-hidden=true><span></span><span><span></span><span>`),
|
|
52
|
+
_tmpl$35 = /*#__PURE__*/_$template(`<span class=k2b-chat-composer__hint-text>`),
|
|
53
|
+
_tmpl$36 = /*#__PURE__*/_$template(`<span class=k2b-chat-composer__dictation><i aria-hidden=true></i><span>`),
|
|
54
|
+
_tmpl$37 = /*#__PURE__*/_$template(`<button type=button class=k2b-chat-composer__hint-action>`),
|
|
55
|
+
_tmpl$38 = /*#__PURE__*/_$template(`<div class=k2b-chat-composer__reply><!$><!/><button type=button class="k2b-chat-composer__icon-action k2b-chat-composer__reply-cancel"><i class="ti ti-x"aria-hidden=true>`),
|
|
56
|
+
_tmpl$39 = /*#__PURE__*/_$template(`<div class=k2b-message-row__quote>`),
|
|
57
|
+
_tmpl$40 = /*#__PURE__*/_$template(`<button type=button class=k2b-message-row__quote>`),
|
|
58
|
+
_tmpl$41 = /*#__PURE__*/_$template(`<button type=button class=k2b-chat-composer__attachment-remove><i class="ti ti-x"aria-hidden=true>`),
|
|
59
|
+
_tmpl$42 = /*#__PURE__*/_$template(`<div class=k2b-chat-composer__attachment role=listitem><div class=k2b-chat-composer__attachment-content><!$><!/><!$><!/></div><!$><!/>`),
|
|
60
|
+
_tmpl$43 = /*#__PURE__*/_$template(`<img>`),
|
|
61
|
+
_tmpl$44 = /*#__PURE__*/_$template(`<div class=k2b-chat-composer__attachment-identity><!$><!/><!$><!/>`),
|
|
62
|
+
_tmpl$45 = /*#__PURE__*/_$template(`<a class=k2b-chat-composer__attachment-link target=_blank rel="noopener noreferrer"><!$><!/><!$><!/>`),
|
|
63
|
+
_tmpl$46 = /*#__PURE__*/_$template(`<button type=button class=k2b-chat-composer__attachment-action><!$><!/><!$><!/>`),
|
|
64
|
+
_tmpl$47 = /*#__PURE__*/_$template(`<footer class=k2b-chat-composer__footer>`),
|
|
65
|
+
_tmpl$48 = /*#__PURE__*/_$template(`<div class=k2b-chat-composer__tools><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/>`),
|
|
66
|
+
_tmpl$49 = /*#__PURE__*/_$template(`<div class=k2b-chat-composer__submit><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/>`),
|
|
67
|
+
_tmpl$50 = /*#__PURE__*/_$template(`<div class=k2b-chat-composer__status-line><i aria-hidden=true></i><span>`),
|
|
68
|
+
_tmpl$51 = /*#__PURE__*/_$template(`<span class=k2b-sr-only>`);
|
|
64
69
|
import { batch, children, createEffect, createMemo, createSignal, createUniqueId, For, Index, on, onCleanup, onMount, Show, untrack } from "solid-js";
|
|
65
70
|
import { Dropdown } from "../actions/Dropdown";
|
|
66
71
|
import { dialogHistorySettled, holdDialogHistory } from "../feedback/dialog-core";
|
|
@@ -811,7 +816,16 @@ export function ChatComposer(props) {
|
|
|
811
816
|
label: action.label,
|
|
812
817
|
variant: action.variant,
|
|
813
818
|
disabled: action.disabled,
|
|
814
|
-
action: () => reportChatFailure(() =>
|
|
819
|
+
action: () => reportChatFailure(async () => {
|
|
820
|
+
await executeChatAction(action);
|
|
821
|
+
// Like attaching files, an add action returns to the field when the focus is still on this composer's add
|
|
822
|
+
// button or nowhere; focus the action moved somewhere on purpose stays there.
|
|
823
|
+
queueMicrotask(() => {
|
|
824
|
+
const active = textareaRef?.ownerDocument.activeElement;
|
|
825
|
+
const root = textareaRef?.closest(".k2b-chat-composer");
|
|
826
|
+
if (!active || active === active.ownerDocument.body || root?.contains(active) && active.matches("[data-chat-composer-add]")) focus();
|
|
827
|
+
});
|
|
828
|
+
}, props.onError)
|
|
815
829
|
});
|
|
816
830
|
}
|
|
817
831
|
return items;
|
|
@@ -1546,6 +1560,7 @@ export function ChatComposer(props) {
|
|
|
1546
1560
|
return _$createComponent(Dropdown.Trigger, {
|
|
1547
1561
|
appearance: "plain",
|
|
1548
1562
|
"class": `k2b-chat-composer__icon-action${extraClass}`,
|
|
1563
|
+
"data-chat-composer-add": "",
|
|
1549
1564
|
get label() {
|
|
1550
1565
|
return chatMessages().addToChat;
|
|
1551
1566
|
},
|
|
@@ -2159,86 +2174,104 @@ export function ChatComposer(props) {
|
|
|
2159
2174
|
return _el$30;
|
|
2160
2175
|
})();
|
|
2161
2176
|
};
|
|
2177
|
+
const replyQuote = reply => [(() => {
|
|
2178
|
+
var _el$49 = _$getNextElement(_tmpl$16),
|
|
2179
|
+
_el$50 = _el$49.firstChild,
|
|
2180
|
+
_el$52 = _el$50.firstChild,
|
|
2181
|
+
[_el$53, _co$9] = _$getNextMarker(_el$52.nextSibling),
|
|
2182
|
+
_el$51 = _el$53.nextSibling,
|
|
2183
|
+
_el$54 = _el$50.nextSibling,
|
|
2184
|
+
[_el$55, _co$0] = _$getNextMarker(_el$54.nextSibling);
|
|
2185
|
+
_$insert(_el$50, () => chatMessages().replyingTo, _el$53, _co$9);
|
|
2186
|
+
_$insert(_el$49, () => reply.author, _el$55, _co$0);
|
|
2187
|
+
return _el$49;
|
|
2188
|
+
})(), (() => {
|
|
2189
|
+
var _el$56 = _$getNextElement(_tmpl$17);
|
|
2190
|
+
_$insert(_el$56, () => reply.text);
|
|
2191
|
+
return _el$56;
|
|
2192
|
+
})()];
|
|
2162
2193
|
return (() => {
|
|
2163
|
-
var _el$
|
|
2164
|
-
_el$
|
|
2165
|
-
[_el$
|
|
2166
|
-
_el$
|
|
2167
|
-
_el$
|
|
2168
|
-
[_el$
|
|
2169
|
-
_el$
|
|
2170
|
-
[_el$
|
|
2171
|
-
_el$112 = _el$111.nextSibling,
|
|
2172
|
-
[_el$113, _co$26] = _$getNextMarker(_el$112.nextSibling),
|
|
2173
|
-
_el$114 = _el$113.nextSibling,
|
|
2174
|
-
[_el$115, _co$27] = _$getNextMarker(_el$114.nextSibling),
|
|
2175
|
-
_el$116 = _el$84.nextSibling,
|
|
2176
|
-
_el$117 = _el$116.nextSibling,
|
|
2177
|
-
_el$118 = _el$117.firstChild,
|
|
2178
|
-
[_el$119, _co$28] = _$getNextMarker(_el$118.nextSibling),
|
|
2194
|
+
var _el$57 = _$getNextElement(_tmpl$29),
|
|
2195
|
+
_el$132 = _el$57.firstChild,
|
|
2196
|
+
[_el$133, _co$33] = _$getNextMarker(_el$132.nextSibling),
|
|
2197
|
+
_el$92 = _el$133.nextSibling,
|
|
2198
|
+
_el$116 = _el$92.firstChild,
|
|
2199
|
+
[_el$117, _co$26] = _$getNextMarker(_el$116.nextSibling),
|
|
2200
|
+
_el$118 = _el$117.nextSibling,
|
|
2201
|
+
[_el$119, _co$27] = _$getNextMarker(_el$118.nextSibling),
|
|
2179
2202
|
_el$120 = _el$119.nextSibling,
|
|
2180
|
-
[_el$121, _co$
|
|
2203
|
+
[_el$121, _co$28] = _$getNextMarker(_el$120.nextSibling),
|
|
2204
|
+
_el$122 = _el$121.nextSibling,
|
|
2205
|
+
[_el$123, _co$29] = _$getNextMarker(_el$122.nextSibling),
|
|
2206
|
+
_el$124 = _el$123.nextSibling,
|
|
2207
|
+
[_el$125, _co$30] = _$getNextMarker(_el$124.nextSibling),
|
|
2208
|
+
_el$126 = _el$92.nextSibling,
|
|
2209
|
+
_el$127 = _el$126.nextSibling,
|
|
2210
|
+
_el$128 = _el$127.firstChild,
|
|
2211
|
+
[_el$129, _co$31] = _$getNextMarker(_el$128.nextSibling),
|
|
2212
|
+
_el$130 = _el$129.nextSibling,
|
|
2213
|
+
[_el$131, _co$32] = _$getNextMarker(_el$130.nextSibling);
|
|
2181
2214
|
var _ref$7 = shellRef;
|
|
2182
|
-
typeof _ref$7 === "function" ? _$use(_ref$7, _el$
|
|
2183
|
-
_$insert(_el$
|
|
2215
|
+
typeof _ref$7 === "function" ? _$use(_ref$7, _el$57) : shellRef = _el$57;
|
|
2216
|
+
_$insert(_el$57, _$createComponent(Show, {
|
|
2184
2217
|
get when() {
|
|
2185
2218
|
return suggestionsOpen() || hasAccessory();
|
|
2186
2219
|
},
|
|
2187
2220
|
get children() {
|
|
2188
|
-
var _el$
|
|
2189
|
-
_el$
|
|
2190
|
-
_el$
|
|
2191
|
-
[_el$
|
|
2192
|
-
_el$
|
|
2193
|
-
[_el$
|
|
2194
|
-
_$insert(_el$
|
|
2195
|
-
_$insert(_el$
|
|
2221
|
+
var _el$58 = _$getNextElement(_tmpl$24),
|
|
2222
|
+
_el$59 = _el$58.firstChild,
|
|
2223
|
+
_el$88 = _el$59.nextSibling,
|
|
2224
|
+
[_el$89, _co$16] = _$getNextMarker(_el$88.nextSibling),
|
|
2225
|
+
_el$90 = _el$89.nextSibling,
|
|
2226
|
+
[_el$91, _co$17] = _$getNextMarker(_el$90.nextSibling);
|
|
2227
|
+
_$insert(_el$59, accessory);
|
|
2228
|
+
_$insert(_el$58, _$createComponent(Show, {
|
|
2196
2229
|
get when() {
|
|
2197
2230
|
return emojiOpen();
|
|
2198
2231
|
},
|
|
2199
2232
|
get children() {
|
|
2200
|
-
var _el$
|
|
2201
|
-
_el$
|
|
2233
|
+
var _el$60 = _$getNextElement(_tmpl$18),
|
|
2234
|
+
_el$61 = _el$60.firstChild;
|
|
2202
2235
|
var _ref$8 = commandListRef;
|
|
2203
|
-
typeof _ref$8 === "function" ? _$use(_ref$8, _el$
|
|
2204
|
-
_$setAttribute(_el$
|
|
2205
|
-
_$insert(_el$
|
|
2236
|
+
typeof _ref$8 === "function" ? _$use(_ref$8, _el$61) : commandListRef = _el$61;
|
|
2237
|
+
_$setAttribute(_el$61, "id", commandListId);
|
|
2238
|
+
_$insert(_el$61, _$createComponent(For, {
|
|
2206
2239
|
get each() {
|
|
2207
2240
|
return emojiMatches();
|
|
2208
2241
|
},
|
|
2209
2242
|
children: (entry, index) => (() => {
|
|
2210
|
-
var _el$
|
|
2211
|
-
_el$
|
|
2212
|
-
_el$
|
|
2213
|
-
_el$
|
|
2214
|
-
[_el$
|
|
2215
|
-
_el$
|
|
2216
|
-
_el$
|
|
2217
|
-
_$insert(_el$
|
|
2218
|
-
_$insert(_el$
|
|
2219
|
-
_$insert(_el$
|
|
2243
|
+
var _el$134 = _$getNextElement(_tmpl$30),
|
|
2244
|
+
_el$135 = _el$134.firstChild,
|
|
2245
|
+
_el$136 = _el$135.nextSibling,
|
|
2246
|
+
_el$137 = _el$136.nextSibling,
|
|
2247
|
+
[_el$138, _co$34] = _$getNextMarker(_el$137.nextSibling);
|
|
2248
|
+
_el$134.$$click = () => pickEmojiSuggestion(index());
|
|
2249
|
+
_el$134.$$mousedown = keepFieldFocus;
|
|
2250
|
+
_$insert(_el$135, () => emojiInTone(entry, props.emoji?.skinTone ?? 0));
|
|
2251
|
+
_$insert(_el$136, () => emojiName(entry, locale()));
|
|
2252
|
+
_$insert(_el$134, _$createComponent(Show, {
|
|
2220
2253
|
get when() {
|
|
2221
2254
|
return entry.shortcodes[0];
|
|
2222
2255
|
},
|
|
2223
2256
|
children: code => (() => {
|
|
2224
|
-
var _el$
|
|
2225
|
-
_el$
|
|
2226
|
-
_el$
|
|
2227
|
-
[_el$
|
|
2228
|
-
_el$
|
|
2229
|
-
_$insert(_el$
|
|
2230
|
-
return _el$
|
|
2257
|
+
var _el$139 = _$getNextElement(_tmpl$31),
|
|
2258
|
+
_el$140 = _el$139.firstChild,
|
|
2259
|
+
_el$142 = _el$140.nextSibling,
|
|
2260
|
+
[_el$143, _co$35] = _$getNextMarker(_el$142.nextSibling),
|
|
2261
|
+
_el$141 = _el$143.nextSibling;
|
|
2262
|
+
_$insert(_el$139, code, _el$143, _co$35);
|
|
2263
|
+
return _el$139;
|
|
2231
2264
|
})()
|
|
2232
|
-
}), _el$
|
|
2265
|
+
}), _el$138, _co$34);
|
|
2233
2266
|
_$effect(_p$ => {
|
|
2234
2267
|
var _v$38 = `${commandListId}-${index()}`,
|
|
2235
2268
|
_v$39 = index() === selectedCommandIndex(),
|
|
2236
2269
|
_v$40 = emojiName(entry, locale()),
|
|
2237
2270
|
_v$41 = index() === selectedCommandIndex() ? "true" : undefined;
|
|
2238
|
-
_v$38 !== _p$.e && _$setAttribute(_el$
|
|
2239
|
-
_v$39 !== _p$.t && _$setAttribute(_el$
|
|
2240
|
-
_v$40 !== _p$.a && _$setAttribute(_el$
|
|
2241
|
-
_v$41 !== _p$.o && _$setAttribute(_el$
|
|
2271
|
+
_v$38 !== _p$.e && _$setAttribute(_el$134, "id", _p$.e = _v$38);
|
|
2272
|
+
_v$39 !== _p$.t && _$setAttribute(_el$134, "aria-selected", _p$.t = _v$39);
|
|
2273
|
+
_v$40 !== _p$.a && _$setAttribute(_el$134, "aria-label", _p$.a = _v$40);
|
|
2274
|
+
_v$41 !== _p$.o && _$setAttribute(_el$134, "data-active", _p$.o = _v$41);
|
|
2242
2275
|
return _p$;
|
|
2243
2276
|
}, {
|
|
2244
2277
|
e: undefined,
|
|
@@ -2247,44 +2280,44 @@ export function ChatComposer(props) {
|
|
|
2247
2280
|
o: undefined
|
|
2248
2281
|
});
|
|
2249
2282
|
_$runHydrationEvents();
|
|
2250
|
-
return _el$
|
|
2283
|
+
return _el$134;
|
|
2251
2284
|
})()
|
|
2252
2285
|
}));
|
|
2253
|
-
_$effect(() => _$setAttribute(_el$
|
|
2254
|
-
return _el$
|
|
2286
|
+
_$effect(() => _$setAttribute(_el$61, "aria-label", chatMessages().emojiSuggestions));
|
|
2287
|
+
return _el$60;
|
|
2255
2288
|
}
|
|
2256
|
-
}), _el$
|
|
2257
|
-
_$insert(_el$
|
|
2289
|
+
}), _el$89, _co$16);
|
|
2290
|
+
_$insert(_el$58, _$createComponent(Show, {
|
|
2258
2291
|
get when() {
|
|
2259
2292
|
return commandsOpen();
|
|
2260
2293
|
},
|
|
2261
2294
|
get children() {
|
|
2262
|
-
var _el$
|
|
2263
|
-
_el$
|
|
2264
|
-
[_el$
|
|
2265
|
-
_el$
|
|
2266
|
-
_el$
|
|
2267
|
-
[_el$
|
|
2268
|
-
_el$
|
|
2269
|
-
[_el$
|
|
2270
|
-
_el$
|
|
2271
|
-
[_el$
|
|
2272
|
-
_el$
|
|
2273
|
-
[_el$
|
|
2274
|
-
_el$
|
|
2275
|
-
[_el$
|
|
2276
|
-
_el$
|
|
2295
|
+
var _el$62 = _$getNextElement(_tmpl$23),
|
|
2296
|
+
_el$86 = _el$62.firstChild,
|
|
2297
|
+
[_el$87, _co$15] = _$getNextMarker(_el$86.nextSibling),
|
|
2298
|
+
_el$66 = _el$87.nextSibling,
|
|
2299
|
+
_el$76 = _el$66.firstChild,
|
|
2300
|
+
[_el$77, _co$10] = _$getNextMarker(_el$76.nextSibling),
|
|
2301
|
+
_el$78 = _el$77.nextSibling,
|
|
2302
|
+
[_el$79, _co$11] = _$getNextMarker(_el$78.nextSibling),
|
|
2303
|
+
_el$80 = _el$79.nextSibling,
|
|
2304
|
+
[_el$81, _co$12] = _$getNextMarker(_el$80.nextSibling),
|
|
2305
|
+
_el$82 = _el$81.nextSibling,
|
|
2306
|
+
[_el$83, _co$13] = _$getNextMarker(_el$82.nextSibling),
|
|
2307
|
+
_el$84 = _el$83.nextSibling,
|
|
2308
|
+
[_el$85, _co$14] = _$getNextMarker(_el$84.nextSibling);
|
|
2309
|
+
_el$62.$$mousedown = event => {
|
|
2277
2310
|
if (addSearch() && event.target !== addSearchRef) event.preventDefault();
|
|
2278
2311
|
};
|
|
2279
|
-
_$insert(_el$
|
|
2312
|
+
_$insert(_el$62, _$createComponent(Show, {
|
|
2280
2313
|
get when() {
|
|
2281
2314
|
return addSearch();
|
|
2282
2315
|
},
|
|
2283
2316
|
get children() {
|
|
2284
|
-
var _el$
|
|
2285
|
-
_el$
|
|
2286
|
-
_el$
|
|
2287
|
-
_el$
|
|
2317
|
+
var _el$63 = _$getNextElement(_tmpl$19),
|
|
2318
|
+
_el$64 = _el$63.firstChild,
|
|
2319
|
+
_el$65 = _el$64.nextSibling;
|
|
2320
|
+
_el$65.$$focusout = event => {
|
|
2288
2321
|
const next = event.relatedTarget;
|
|
2289
2322
|
if (next instanceof Node && commandListRef?.parentElement?.contains(next)) return;
|
|
2290
2323
|
// Focus that leaves another way, such as with Shift+Tab, closes the list and stays where it went.
|
|
@@ -2292,27 +2325,27 @@ export function ChatComposer(props) {
|
|
|
2292
2325
|
if (addSearch() && document.activeElement !== addSearchRef) endAddSearch(false);
|
|
2293
2326
|
});
|
|
2294
2327
|
};
|
|
2295
|
-
_el$
|
|
2328
|
+
_el$65.addEventListener("compositionend", () => {
|
|
2296
2329
|
addComposing = false;
|
|
2297
2330
|
});
|
|
2298
|
-
_el$
|
|
2331
|
+
_el$65.addEventListener("compositionstart", () => {
|
|
2299
2332
|
addComposing = true;
|
|
2300
2333
|
});
|
|
2301
|
-
_el$
|
|
2302
|
-
_el$
|
|
2334
|
+
_el$65.$$keydown = onAddSearchKeyDown;
|
|
2335
|
+
_el$65.$$input = event => setAddQuery(event.currentTarget.value);
|
|
2303
2336
|
var _ref$9 = addSearchRef;
|
|
2304
|
-
typeof _ref$9 === "function" ? _$use(_ref$9, _el$
|
|
2305
|
-
_$setAttribute(_el$
|
|
2306
|
-
_$setAttribute(_el$
|
|
2337
|
+
typeof _ref$9 === "function" ? _$use(_ref$9, _el$65) : addSearchRef = _el$65;
|
|
2338
|
+
_$setAttribute(_el$65, "aria-controls", commandListId);
|
|
2339
|
+
_$setAttribute(_el$65, "spellcheck", false);
|
|
2307
2340
|
_$effect(_p$ => {
|
|
2308
2341
|
var _v$24 = chatMessages().commandSearch,
|
|
2309
2342
|
_v$25 = chatMessages().commandSearchLabel,
|
|
2310
2343
|
_v$26 = selectedCommand() ? commandOptionId(selectedCommand()) : undefined,
|
|
2311
2344
|
_v$27 = openingRow() !== undefined;
|
|
2312
|
-
_v$24 !== _p$.e && _$setAttribute(_el$
|
|
2313
|
-
_v$25 !== _p$.t && _$setAttribute(_el$
|
|
2314
|
-
_v$26 !== _p$.a && _$setAttribute(_el$
|
|
2315
|
-
_v$27 !== _p$.o && _$setProperty(_el$
|
|
2345
|
+
_v$24 !== _p$.e && _$setAttribute(_el$65, "placeholder", _p$.e = _v$24);
|
|
2346
|
+
_v$25 !== _p$.t && _$setAttribute(_el$65, "aria-label", _p$.t = _v$25);
|
|
2347
|
+
_v$26 !== _p$.a && _$setAttribute(_el$65, "aria-activedescendant", _p$.a = _v$26);
|
|
2348
|
+
_v$27 !== _p$.o && _$setProperty(_el$65, "readOnly", _p$.o = _v$27);
|
|
2316
2349
|
return _p$;
|
|
2317
2350
|
}, {
|
|
2318
2351
|
e: undefined,
|
|
@@ -2320,15 +2353,15 @@ export function ChatComposer(props) {
|
|
|
2320
2353
|
a: undefined,
|
|
2321
2354
|
o: undefined
|
|
2322
2355
|
});
|
|
2323
|
-
_$effect(() => _$setProperty(_el$
|
|
2356
|
+
_$effect(() => _$setProperty(_el$65, "value", addQuery()));
|
|
2324
2357
|
_$runHydrationEvents();
|
|
2325
|
-
return _el$
|
|
2358
|
+
return _el$63;
|
|
2326
2359
|
}
|
|
2327
|
-
}), _el$
|
|
2360
|
+
}), _el$87, _co$15);
|
|
2328
2361
|
var _ref$0 = commandListRef;
|
|
2329
|
-
typeof _ref$0 === "function" ? _$use(_ref$0, _el$
|
|
2330
|
-
_$setAttribute(_el$
|
|
2331
|
-
_$insert(_el$
|
|
2362
|
+
typeof _ref$0 === "function" ? _$use(_ref$0, _el$66) : commandListRef = _el$66;
|
|
2363
|
+
_$setAttribute(_el$66, "id", commandListId);
|
|
2364
|
+
_$insert(_el$66, _$createComponent(For, {
|
|
2332
2365
|
get each() {
|
|
2333
2366
|
return commandModel().groups.map(commandGroupKey);
|
|
2334
2367
|
},
|
|
@@ -2347,108 +2380,108 @@ export function ChatComposer(props) {
|
|
|
2347
2380
|
});
|
|
2348
2381
|
},
|
|
2349
2382
|
get children() {
|
|
2350
|
-
var _el$
|
|
2351
|
-
_el$
|
|
2352
|
-
_el$
|
|
2353
|
-
_el$
|
|
2354
|
-
[_el$
|
|
2355
|
-
_el$
|
|
2356
|
-
[_el$
|
|
2357
|
-
_el$
|
|
2358
|
-
[_el$
|
|
2359
|
-
_$insert(_el$
|
|
2360
|
-
_$insert(_el$
|
|
2383
|
+
var _el$144 = _$getNextElement(_tmpl$33),
|
|
2384
|
+
_el$145 = _el$144.firstChild,
|
|
2385
|
+
_el$146 = _el$145.firstChild,
|
|
2386
|
+
_el$148 = _el$146.nextSibling,
|
|
2387
|
+
[_el$149, _co$36] = _$getNextMarker(_el$148.nextSibling),
|
|
2388
|
+
_el$150 = _el$145.nextSibling,
|
|
2389
|
+
[_el$151, _co$37] = _$getNextMarker(_el$150.nextSibling),
|
|
2390
|
+
_el$152 = _el$151.nextSibling,
|
|
2391
|
+
[_el$153, _co$38] = _$getNextMarker(_el$152.nextSibling);
|
|
2392
|
+
_$insert(_el$146, () => group()?.scopeTitle ?? group()?.section?.label);
|
|
2393
|
+
_$insert(_el$145, _$createComponent(Show, {
|
|
2361
2394
|
get when() {
|
|
2362
2395
|
return group()?.loading;
|
|
2363
2396
|
},
|
|
2364
2397
|
get children() {
|
|
2365
|
-
return _$getNextElement(_tmpl$
|
|
2398
|
+
return _$getNextElement(_tmpl$32);
|
|
2366
2399
|
}
|
|
2367
|
-
}), _el$
|
|
2368
|
-
_$insert(_el$
|
|
2400
|
+
}), _el$149, _co$36);
|
|
2401
|
+
_$insert(_el$144, _$createComponent(For, {
|
|
2369
2402
|
get each() {
|
|
2370
2403
|
return rows();
|
|
2371
2404
|
},
|
|
2372
2405
|
children: renderCommandRow
|
|
2373
|
-
}), _el$
|
|
2374
|
-
_$insert(_el$
|
|
2406
|
+
}), _el$151, _co$37);
|
|
2407
|
+
_$insert(_el$144, _$createComponent(Index, {
|
|
2375
2408
|
get each() {
|
|
2376
2409
|
return Array.from({
|
|
2377
2410
|
length: Math.max(group()?.placeholder ? 1 : 0, group()?.pendingRows ?? 0)
|
|
2378
2411
|
});
|
|
2379
2412
|
},
|
|
2380
|
-
children: () => _$getNextElement(_tmpl$
|
|
2381
|
-
}), _el$
|
|
2413
|
+
children: () => _$getNextElement(_tmpl$34)
|
|
2414
|
+
}), _el$153, _co$38);
|
|
2382
2415
|
_$effect(_p$ => {
|
|
2383
2416
|
var _v$42 = headingId(),
|
|
2384
2417
|
_v$43 = headingId();
|
|
2385
|
-
_v$42 !== _p$.e && _$setAttribute(_el$
|
|
2386
|
-
_v$43 !== _p$.t && _$setAttribute(_el$
|
|
2418
|
+
_v$42 !== _p$.e && _$setAttribute(_el$144, "aria-labelledby", _p$.e = _v$42);
|
|
2419
|
+
_v$43 !== _p$.t && _$setAttribute(_el$145, "id", _p$.t = _v$43);
|
|
2387
2420
|
return _p$;
|
|
2388
2421
|
}, {
|
|
2389
2422
|
e: undefined,
|
|
2390
2423
|
t: undefined
|
|
2391
2424
|
});
|
|
2392
|
-
return _el$
|
|
2425
|
+
return _el$144;
|
|
2393
2426
|
}
|
|
2394
2427
|
});
|
|
2395
2428
|
}
|
|
2396
|
-
}), _el$
|
|
2397
|
-
_$insert(_el$
|
|
2429
|
+
}), _el$77, _co$10);
|
|
2430
|
+
_$insert(_el$66, _$createComponent(Show, {
|
|
2398
2431
|
get when() {
|
|
2399
2432
|
return _$memo(() => !!(searching() && foundCommandCount() === 0))() && !commandModel().groups.some(group => group.section || group.scopeTitle);
|
|
2400
2433
|
},
|
|
2401
2434
|
get children() {
|
|
2402
|
-
var _el$
|
|
2403
|
-
_el$
|
|
2404
|
-
_el$
|
|
2405
|
-
_$insert(_el$
|
|
2406
|
-
return _el$
|
|
2435
|
+
var _el$67 = _$getNextElement(_tmpl$20),
|
|
2436
|
+
_el$68 = _el$67.firstChild,
|
|
2437
|
+
_el$69 = _el$68.nextSibling;
|
|
2438
|
+
_$insert(_el$69, () => messages().loading);
|
|
2439
|
+
return _el$67;
|
|
2407
2440
|
}
|
|
2408
|
-
}), _el$
|
|
2409
|
-
_$insert(_el$
|
|
2441
|
+
}), _el$79, _co$11);
|
|
2442
|
+
_$insert(_el$66, _$createComponent(Show, {
|
|
2410
2443
|
get when() {
|
|
2411
2444
|
return searchError();
|
|
2412
2445
|
},
|
|
2413
2446
|
get children() {
|
|
2414
|
-
var _el$
|
|
2415
|
-
_el$
|
|
2416
|
-
_el$
|
|
2417
|
-
_el$
|
|
2418
|
-
[_el$
|
|
2419
|
-
_$insert(_el$
|
|
2420
|
-
return _el$
|
|
2447
|
+
var _el$70 = _$getNextElement(_tmpl$21),
|
|
2448
|
+
_el$71 = _el$70.firstChild,
|
|
2449
|
+
_el$72 = _el$71.nextSibling,
|
|
2450
|
+
_el$73 = _el$72.nextSibling,
|
|
2451
|
+
[_el$74, _co$1] = _$getNextMarker(_el$73.nextSibling);
|
|
2452
|
+
_$insert(_el$70, () => messages().error, _el$74, _co$1);
|
|
2453
|
+
return _el$70;
|
|
2421
2454
|
}
|
|
2422
|
-
}), _el$
|
|
2423
|
-
_$insert(_el$
|
|
2455
|
+
}), _el$81, _co$12);
|
|
2456
|
+
_$insert(_el$66, _$createComponent(Show, {
|
|
2424
2457
|
get when() {
|
|
2425
2458
|
return _$memo(() => !!(!searching() && !searchError() && foundCommandCount() === 0))() && !commandModel().groups.some(group => group.pendingRows);
|
|
2426
2459
|
},
|
|
2427
2460
|
get children() {
|
|
2428
|
-
var _el$
|
|
2429
|
-
_$insert(_el$
|
|
2461
|
+
var _el$75 = _$getNextElement(_tmpl$22);
|
|
2462
|
+
_$insert(_el$75, (() => {
|
|
2430
2463
|
var _c$ = _$memo(() => !!!parsedCommandQuery().query.trim());
|
|
2431
2464
|
return () => _c$() ? messages().noResults : chatMessages().commandsNothingFound({
|
|
2432
2465
|
query: parsedCommandQuery().query.trim()
|
|
2433
2466
|
});
|
|
2434
2467
|
})());
|
|
2435
|
-
return _el$
|
|
2468
|
+
return _el$75;
|
|
2436
2469
|
}
|
|
2437
|
-
}), _el$
|
|
2438
|
-
_$insert(_el$
|
|
2470
|
+
}), _el$83, _co$13);
|
|
2471
|
+
_$insert(_el$66, _$createComponent(Show, {
|
|
2439
2472
|
get when() {
|
|
2440
2473
|
return commandModel().fallback?.command;
|
|
2441
2474
|
},
|
|
2442
2475
|
keyed: true,
|
|
2443
2476
|
children: command => renderCommandRow(command)
|
|
2444
|
-
}), _el$
|
|
2477
|
+
}), _el$85, _co$14);
|
|
2445
2478
|
_$effect(_p$ => {
|
|
2446
2479
|
var _v$28 = addSearch() ? "" : undefined,
|
|
2447
2480
|
_v$29 = chatMessages().commands,
|
|
2448
2481
|
_v$30 = searching() ? "true" : undefined;
|
|
2449
|
-
_v$28 !== _p$.e && _$setAttribute(_el$
|
|
2450
|
-
_v$29 !== _p$.t && _$setAttribute(_el$
|
|
2451
|
-
_v$30 !== _p$.a && _$setAttribute(_el$
|
|
2482
|
+
_v$28 !== _p$.e && _$setAttribute(_el$62, "data-search", _p$.e = _v$28);
|
|
2483
|
+
_v$29 !== _p$.t && _$setAttribute(_el$66, "aria-label", _p$.t = _v$29);
|
|
2484
|
+
_v$30 !== _p$.a && _$setAttribute(_el$66, "aria-busy", _p$.a = _v$30);
|
|
2452
2485
|
return _p$;
|
|
2453
2486
|
}, {
|
|
2454
2487
|
e: undefined,
|
|
@@ -2456,245 +2489,289 @@ export function ChatComposer(props) {
|
|
|
2456
2489
|
a: undefined
|
|
2457
2490
|
});
|
|
2458
2491
|
_$runHydrationEvents();
|
|
2459
|
-
return _el$
|
|
2492
|
+
return _el$62;
|
|
2460
2493
|
}
|
|
2461
|
-
}), _el$
|
|
2494
|
+
}), _el$91, _co$17);
|
|
2462
2495
|
_$effect(_p$ => {
|
|
2463
2496
|
var _v$31 = hasAccessory() ? undefined : "true",
|
|
2464
2497
|
_v$32 = suggestionsOpen() ? "hidden" : undefined,
|
|
2465
2498
|
_v$33 = suggestionsOpen();
|
|
2466
|
-
_v$31 !== _p$.e && _$setAttribute(_el$
|
|
2467
|
-
_v$32 !== _p$.t && _$setStyleProperty(_el$
|
|
2468
|
-
_v$33 !== _p$.a && _$setProperty(_el$
|
|
2499
|
+
_v$31 !== _p$.e && _$setAttribute(_el$58, "data-overlay", _p$.e = _v$31);
|
|
2500
|
+
_v$32 !== _p$.t && _$setStyleProperty(_el$59, "visibility", _p$.t = _v$32);
|
|
2501
|
+
_v$33 !== _p$.a && _$setProperty(_el$59, "inert", _p$.a = _v$33);
|
|
2469
2502
|
return _p$;
|
|
2470
2503
|
}, {
|
|
2471
2504
|
e: undefined,
|
|
2472
2505
|
t: undefined,
|
|
2473
2506
|
a: undefined
|
|
2474
2507
|
});
|
|
2475
|
-
return _el$
|
|
2508
|
+
return _el$58;
|
|
2476
2509
|
}
|
|
2477
|
-
}), _el$
|
|
2510
|
+
}), _el$133, _co$33);
|
|
2478
2511
|
var _ref$1 = composerRef;
|
|
2479
|
-
typeof _ref$1 === "function" ? _$use(_ref$1, _el$
|
|
2480
|
-
_$insert(_el$
|
|
2512
|
+
typeof _ref$1 === "function" ? _$use(_ref$1, _el$92) : composerRef = _el$92;
|
|
2513
|
+
_$insert(_el$92, _$createComponent(Show, {
|
|
2481
2514
|
get when() {
|
|
2482
2515
|
return showHint();
|
|
2483
2516
|
},
|
|
2484
2517
|
get children() {
|
|
2485
|
-
var _el$
|
|
2486
|
-
_$insert(_el$
|
|
2518
|
+
var _el$93 = _$getNextElement(_tmpl$25);
|
|
2519
|
+
_$insert(_el$93, _$createComponent(Show, {
|
|
2487
2520
|
get when() {
|
|
2488
2521
|
return dictationStatus();
|
|
2489
2522
|
},
|
|
2490
2523
|
get fallback() {
|
|
2491
2524
|
return (() => {
|
|
2492
|
-
var _el$
|
|
2493
|
-
_$insert(_el$
|
|
2494
|
-
return _el$
|
|
2525
|
+
var _el$155 = _$getNextElement(_tmpl$35);
|
|
2526
|
+
_$insert(_el$155, hint);
|
|
2527
|
+
return _el$155;
|
|
2495
2528
|
})();
|
|
2496
2529
|
},
|
|
2497
2530
|
children: status => [(() => {
|
|
2498
|
-
var _el$
|
|
2499
|
-
_el$
|
|
2500
|
-
_el$
|
|
2501
|
-
_$insert(_el$
|
|
2531
|
+
var _el$156 = _$getNextElement(_tmpl$36),
|
|
2532
|
+
_el$157 = _el$156.firstChild,
|
|
2533
|
+
_el$158 = _el$157.nextSibling;
|
|
2534
|
+
_$insert(_el$158, () => status().text);
|
|
2502
2535
|
_$effect(_p$ => {
|
|
2503
2536
|
var _v$44 = dictation() ?? undefined,
|
|
2504
2537
|
_v$45 = status().icon;
|
|
2505
|
-
_v$44 !== _p$.e && _$setAttribute(_el$
|
|
2506
|
-
_v$45 !== _p$.t && _$className(_el$
|
|
2538
|
+
_v$44 !== _p$.e && _$setAttribute(_el$156, "data-state", _p$.e = _v$44);
|
|
2539
|
+
_v$45 !== _p$.t && _$className(_el$157, _p$.t = _v$45);
|
|
2507
2540
|
return _p$;
|
|
2508
2541
|
}, {
|
|
2509
2542
|
e: undefined,
|
|
2510
2543
|
t: undefined
|
|
2511
2544
|
});
|
|
2512
|
-
return _el$
|
|
2545
|
+
return _el$156;
|
|
2513
2546
|
})(), _$createComponent(Show, {
|
|
2514
2547
|
get when() {
|
|
2515
2548
|
return _$memo(() => dictation() === "refined")() ? props.microphone?.onRestoreOriginal : undefined;
|
|
2516
2549
|
},
|
|
2517
2550
|
children: restore => (() => {
|
|
2518
|
-
var _el$
|
|
2519
|
-
_el$
|
|
2520
|
-
_el$
|
|
2521
|
-
_$insert(_el$
|
|
2522
|
-
_$effect(() => _$setProperty(_el$
|
|
2551
|
+
var _el$159 = _$getNextElement(_tmpl$37);
|
|
2552
|
+
_el$159.$$click = () => reportChatFailure(restore(), props.onError);
|
|
2553
|
+
_el$159.$$mousedown = keepFieldFocus;
|
|
2554
|
+
_$insert(_el$159, () => chatMessages().restoreOriginal);
|
|
2555
|
+
_$effect(() => _$setProperty(_el$159, "disabled", microphoneDisabled()));
|
|
2523
2556
|
_$runHydrationEvents();
|
|
2524
|
-
return _el$
|
|
2557
|
+
return _el$159;
|
|
2525
2558
|
})()
|
|
2526
2559
|
})]
|
|
2527
2560
|
}));
|
|
2528
|
-
return _el$
|
|
2561
|
+
return _el$93;
|
|
2529
2562
|
}
|
|
2530
|
-
}), _el$
|
|
2531
|
-
_$insert(_el$
|
|
2563
|
+
}), _el$117, _co$26);
|
|
2564
|
+
_$insert(_el$92, _$createComponent(Show, {
|
|
2565
|
+
get when() {
|
|
2566
|
+
return props.reply;
|
|
2567
|
+
},
|
|
2568
|
+
children: reply => (() => {
|
|
2569
|
+
var _el$160 = _$getNextElement(_tmpl$38),
|
|
2570
|
+
_el$162 = _el$160.firstChild,
|
|
2571
|
+
[_el$163, _co$39] = _$getNextMarker(_el$162.nextSibling),
|
|
2572
|
+
_el$161 = _el$163.nextSibling;
|
|
2573
|
+
_$insert(_el$160, _$createComponent(Show, {
|
|
2574
|
+
get when() {
|
|
2575
|
+
return reply().onSelect;
|
|
2576
|
+
},
|
|
2577
|
+
get fallback() {
|
|
2578
|
+
return (() => {
|
|
2579
|
+
var _el$164 = _$getNextElement(_tmpl$39);
|
|
2580
|
+
_$insert(_el$164, () => replyQuote(reply()));
|
|
2581
|
+
return _el$164;
|
|
2582
|
+
})();
|
|
2583
|
+
},
|
|
2584
|
+
children: select => (() => {
|
|
2585
|
+
var _el$165 = _$getNextElement(_tmpl$40);
|
|
2586
|
+
_el$165.$$click = () => select()();
|
|
2587
|
+
_$insert(_el$165, () => replyQuote(reply()));
|
|
2588
|
+
_$runHydrationEvents();
|
|
2589
|
+
return _el$165;
|
|
2590
|
+
})()
|
|
2591
|
+
}), _el$163, _co$39);
|
|
2592
|
+
_el$161.$$click = () => reply().onCancel();
|
|
2593
|
+
_el$161.$$mousedown = keepFieldFocus;
|
|
2594
|
+
_$effect(_p$ => {
|
|
2595
|
+
var _v$46 = chatMessages().cancelReply,
|
|
2596
|
+
_v$47 = chatMessages().cancelReply;
|
|
2597
|
+
_v$46 !== _p$.e && _$setAttribute(_el$161, "aria-label", _p$.e = _v$46);
|
|
2598
|
+
_v$47 !== _p$.t && _$setAttribute(_el$161, "title", _p$.t = _v$47);
|
|
2599
|
+
return _p$;
|
|
2600
|
+
}, {
|
|
2601
|
+
e: undefined,
|
|
2602
|
+
t: undefined
|
|
2603
|
+
});
|
|
2604
|
+
_$runHydrationEvents();
|
|
2605
|
+
return _el$160;
|
|
2606
|
+
})()
|
|
2607
|
+
}), _el$119, _co$27);
|
|
2608
|
+
_$insert(_el$92, _$createComponent(Show, {
|
|
2532
2609
|
get when() {
|
|
2533
2610
|
return attachments().length > 0;
|
|
2534
2611
|
},
|
|
2535
2612
|
get children() {
|
|
2536
|
-
var _el$
|
|
2537
|
-
_$insert(_el$
|
|
2613
|
+
var _el$94 = _$getNextElement(_tmpl$26);
|
|
2614
|
+
_$insert(_el$94, _$createComponent(For, {
|
|
2538
2615
|
get each() {
|
|
2539
2616
|
return attachments();
|
|
2540
2617
|
},
|
|
2541
2618
|
children: attachment => (() => {
|
|
2542
|
-
var _el$
|
|
2543
|
-
_el$
|
|
2544
|
-
_el$
|
|
2545
|
-
[_el$
|
|
2546
|
-
_el$
|
|
2547
|
-
[_el$
|
|
2548
|
-
_el$
|
|
2549
|
-
[_el$
|
|
2550
|
-
_$insert(_el$
|
|
2619
|
+
var _el$166 = _$getNextElement(_tmpl$42),
|
|
2620
|
+
_el$167 = _el$166.firstChild,
|
|
2621
|
+
_el$168 = _el$167.firstChild,
|
|
2622
|
+
[_el$169, _co$40] = _$getNextMarker(_el$168.nextSibling),
|
|
2623
|
+
_el$170 = _el$169.nextSibling,
|
|
2624
|
+
[_el$171, _co$41] = _$getNextMarker(_el$170.nextSibling),
|
|
2625
|
+
_el$173 = _el$167.nextSibling,
|
|
2626
|
+
[_el$174, _co$42] = _$getNextMarker(_el$173.nextSibling);
|
|
2627
|
+
_$insert(_el$167, _$createComponent(Show, {
|
|
2551
2628
|
get when() {
|
|
2552
2629
|
return attachment.href;
|
|
2553
2630
|
},
|
|
2554
2631
|
get fallback() {
|
|
2555
2632
|
return (() => {
|
|
2556
|
-
var _el$
|
|
2557
|
-
_el$
|
|
2558
|
-
[_el$
|
|
2559
|
-
_el$
|
|
2560
|
-
[_el$
|
|
2561
|
-
_$insert(_el$
|
|
2633
|
+
var _el$175 = _$getNextElement(_tmpl$44),
|
|
2634
|
+
_el$177 = _el$175.firstChild,
|
|
2635
|
+
[_el$178, _co$43] = _$getNextMarker(_el$177.nextSibling),
|
|
2636
|
+
_el$179 = _el$178.nextSibling,
|
|
2637
|
+
[_el$180, _co$44] = _$getNextMarker(_el$179.nextSibling);
|
|
2638
|
+
_$insert(_el$175, _$createComponent(Show, {
|
|
2562
2639
|
get when() {
|
|
2563
2640
|
return _$memo(() => attachment.kind === "image")() && attachment.previewUrl;
|
|
2564
2641
|
},
|
|
2565
2642
|
get fallback() {
|
|
2566
2643
|
return (() => {
|
|
2567
|
-
var _el$
|
|
2568
|
-
_$effect(() => _$className(_el$
|
|
2569
|
-
return _el$
|
|
2644
|
+
var _el$181 = _$getNextElement(_tmpl$3);
|
|
2645
|
+
_$effect(() => _$className(_el$181, attachmentIcon(attachment)));
|
|
2646
|
+
return _el$181;
|
|
2570
2647
|
})();
|
|
2571
2648
|
},
|
|
2572
2649
|
get children() {
|
|
2573
|
-
var _el$
|
|
2650
|
+
var _el$176 = _$getNextElement(_tmpl$43);
|
|
2574
2651
|
_$effect(_p$ => {
|
|
2575
|
-
var _v$
|
|
2576
|
-
_v$
|
|
2577
|
-
_v$
|
|
2578
|
-
_v$
|
|
2652
|
+
var _v$50 = attachment.previewUrl,
|
|
2653
|
+
_v$51 = attachment.alt ?? "";
|
|
2654
|
+
_v$50 !== _p$.e && _$setAttribute(_el$176, "src", _p$.e = _v$50);
|
|
2655
|
+
_v$51 !== _p$.t && _$setAttribute(_el$176, "alt", _p$.t = _v$51);
|
|
2579
2656
|
return _p$;
|
|
2580
2657
|
}, {
|
|
2581
2658
|
e: undefined,
|
|
2582
2659
|
t: undefined
|
|
2583
2660
|
});
|
|
2584
|
-
return _el$
|
|
2661
|
+
return _el$176;
|
|
2585
2662
|
}
|
|
2586
|
-
}), _el$
|
|
2587
|
-
_$insert(_el$
|
|
2588
|
-
return _el$
|
|
2663
|
+
}), _el$178, _co$43);
|
|
2664
|
+
_$insert(_el$175, () => renderAttachmentCopy(attachment), _el$180, _co$44);
|
|
2665
|
+
return _el$175;
|
|
2589
2666
|
})();
|
|
2590
2667
|
},
|
|
2591
2668
|
children: href => (() => {
|
|
2592
|
-
var _el$
|
|
2593
|
-
_el$
|
|
2594
|
-
[_el$
|
|
2595
|
-
_el$
|
|
2596
|
-
[_el$
|
|
2597
|
-
_$insert(_el$
|
|
2669
|
+
var _el$182 = _$getNextElement(_tmpl$45),
|
|
2670
|
+
_el$184 = _el$182.firstChild,
|
|
2671
|
+
[_el$185, _co$45] = _$getNextMarker(_el$184.nextSibling),
|
|
2672
|
+
_el$186 = _el$185.nextSibling,
|
|
2673
|
+
[_el$187, _co$46] = _$getNextMarker(_el$186.nextSibling);
|
|
2674
|
+
_$insert(_el$182, _$createComponent(Show, {
|
|
2598
2675
|
get when() {
|
|
2599
2676
|
return _$memo(() => attachment.kind === "image")() && attachment.previewUrl;
|
|
2600
2677
|
},
|
|
2601
2678
|
get fallback() {
|
|
2602
2679
|
return (() => {
|
|
2603
|
-
var _el$
|
|
2604
|
-
_$effect(() => _$className(_el$
|
|
2605
|
-
return _el$
|
|
2680
|
+
var _el$188 = _$getNextElement(_tmpl$3);
|
|
2681
|
+
_$effect(() => _$className(_el$188, attachmentIcon(attachment)));
|
|
2682
|
+
return _el$188;
|
|
2606
2683
|
})();
|
|
2607
2684
|
},
|
|
2608
2685
|
get children() {
|
|
2609
|
-
var _el$
|
|
2686
|
+
var _el$183 = _$getNextElement(_tmpl$43);
|
|
2610
2687
|
_$effect(_p$ => {
|
|
2611
|
-
var _v$
|
|
2612
|
-
_v$
|
|
2613
|
-
_v$
|
|
2614
|
-
_v$
|
|
2688
|
+
var _v$52 = attachment.previewUrl,
|
|
2689
|
+
_v$53 = attachment.alt ?? "";
|
|
2690
|
+
_v$52 !== _p$.e && _$setAttribute(_el$183, "src", _p$.e = _v$52);
|
|
2691
|
+
_v$53 !== _p$.t && _$setAttribute(_el$183, "alt", _p$.t = _v$53);
|
|
2615
2692
|
return _p$;
|
|
2616
2693
|
}, {
|
|
2617
2694
|
e: undefined,
|
|
2618
2695
|
t: undefined
|
|
2619
2696
|
});
|
|
2620
|
-
return _el$
|
|
2697
|
+
return _el$183;
|
|
2621
2698
|
}
|
|
2622
|
-
}), _el$
|
|
2623
|
-
_$insert(_el$
|
|
2699
|
+
}), _el$185, _co$45);
|
|
2700
|
+
_$insert(_el$182, () => renderAttachmentCopy(attachment), _el$187, _co$46);
|
|
2624
2701
|
_$effect(_p$ => {
|
|
2625
|
-
var _v$
|
|
2626
|
-
_v$
|
|
2702
|
+
var _v$54 = href(),
|
|
2703
|
+
_v$55 = chatMessages().openInNewTab({
|
|
2627
2704
|
name: attachment.name
|
|
2628
2705
|
});
|
|
2629
|
-
_v$
|
|
2630
|
-
_v$
|
|
2706
|
+
_v$54 !== _p$.e && _$setAttribute(_el$182, "href", _p$.e = _v$54);
|
|
2707
|
+
_v$55 !== _p$.t && _$setAttribute(_el$182, "aria-label", _p$.t = _v$55);
|
|
2631
2708
|
return _p$;
|
|
2632
2709
|
}, {
|
|
2633
2710
|
e: undefined,
|
|
2634
2711
|
t: undefined
|
|
2635
2712
|
});
|
|
2636
|
-
return _el$
|
|
2713
|
+
return _el$182;
|
|
2637
2714
|
})()
|
|
2638
|
-
}), _el$
|
|
2639
|
-
_$insert(_el$
|
|
2715
|
+
}), _el$169, _co$40);
|
|
2716
|
+
_$insert(_el$167, _$createComponent(Show, {
|
|
2640
2717
|
get when() {
|
|
2641
2718
|
return attachment.action;
|
|
2642
2719
|
},
|
|
2643
2720
|
children: action => (() => {
|
|
2644
|
-
var _el$
|
|
2645
|
-
_el$
|
|
2646
|
-
[_el$
|
|
2647
|
-
_el$
|
|
2648
|
-
[_el$
|
|
2649
|
-
_el$
|
|
2650
|
-
_$insert(_el$
|
|
2721
|
+
var _el$189 = _$getNextElement(_tmpl$46),
|
|
2722
|
+
_el$190 = _el$189.firstChild,
|
|
2723
|
+
[_el$191, _co$47] = _$getNextMarker(_el$190.nextSibling),
|
|
2724
|
+
_el$192 = _el$191.nextSibling,
|
|
2725
|
+
[_el$193, _co$48] = _$getNextMarker(_el$192.nextSibling);
|
|
2726
|
+
_el$189.$$click = () => reportChatFailure(() => executeChatAction(action()), props.onError);
|
|
2727
|
+
_$insert(_el$189, _$createComponent(Show, {
|
|
2651
2728
|
get when() {
|
|
2652
2729
|
return action().icon;
|
|
2653
2730
|
},
|
|
2654
2731
|
children: icon => (() => {
|
|
2655
|
-
var _el$
|
|
2656
|
-
_$effect(() => _$className(_el$
|
|
2657
|
-
return _el$
|
|
2732
|
+
var _el$194 = _$getNextElement(_tmpl$3);
|
|
2733
|
+
_$effect(() => _$className(_el$194, icon()));
|
|
2734
|
+
return _el$194;
|
|
2658
2735
|
})()
|
|
2659
|
-
}), _el$
|
|
2660
|
-
_$insert(_el$
|
|
2661
|
-
_$effect(() => _$setProperty(_el$
|
|
2736
|
+
}), _el$191, _co$47);
|
|
2737
|
+
_$insert(_el$189, () => action().label, _el$193, _co$48);
|
|
2738
|
+
_$effect(() => _$setProperty(_el$189, "disabled", blocked() || action().disabled));
|
|
2662
2739
|
_$runHydrationEvents();
|
|
2663
|
-
return _el$
|
|
2740
|
+
return _el$189;
|
|
2664
2741
|
})()
|
|
2665
|
-
}), _el$
|
|
2666
|
-
_$insert(_el$
|
|
2742
|
+
}), _el$171, _co$41);
|
|
2743
|
+
_$insert(_el$166, _$createComponent(Show, {
|
|
2667
2744
|
get when() {
|
|
2668
2745
|
return props.onAttachmentsChange;
|
|
2669
2746
|
},
|
|
2670
2747
|
get children() {
|
|
2671
|
-
var _el$
|
|
2672
|
-
_el$
|
|
2748
|
+
var _el$172 = _$getNextElement(_tmpl$41);
|
|
2749
|
+
_el$172.$$click = () => setAttachments(attachments().filter(candidate => candidate.id !== attachment.id));
|
|
2673
2750
|
_$effect(_p$ => {
|
|
2674
|
-
var _v$
|
|
2751
|
+
var _v$48 = selectMessages().removeNamed({
|
|
2675
2752
|
name: attachment.name
|
|
2676
2753
|
}),
|
|
2677
|
-
_v$
|
|
2678
|
-
_v$
|
|
2679
|
-
_v$
|
|
2754
|
+
_v$49 = blocked();
|
|
2755
|
+
_v$48 !== _p$.e && _$setAttribute(_el$172, "aria-label", _p$.e = _v$48);
|
|
2756
|
+
_v$49 !== _p$.t && _$setProperty(_el$172, "disabled", _p$.t = _v$49);
|
|
2680
2757
|
return _p$;
|
|
2681
2758
|
}, {
|
|
2682
2759
|
e: undefined,
|
|
2683
2760
|
t: undefined
|
|
2684
2761
|
});
|
|
2685
2762
|
_$runHydrationEvents();
|
|
2686
|
-
return _el$
|
|
2763
|
+
return _el$172;
|
|
2687
2764
|
}
|
|
2688
|
-
}), _el$
|
|
2689
|
-
_$effect(() => _el$
|
|
2690
|
-
return _el$
|
|
2765
|
+
}), _el$174, _co$42);
|
|
2766
|
+
_$effect(() => _el$167.classList.toggle("k2b-chat-composer__attachment-content--action", !!Boolean(attachment.action)));
|
|
2767
|
+
return _el$166;
|
|
2691
2768
|
})()
|
|
2692
2769
|
}));
|
|
2693
|
-
_$effect(() => _$setAttribute(_el$
|
|
2694
|
-
return _el$
|
|
2770
|
+
_$effect(() => _$setAttribute(_el$94, "aria-label", chatMessages().attachments));
|
|
2771
|
+
return _el$94;
|
|
2695
2772
|
}
|
|
2696
|
-
}), _el$
|
|
2697
|
-
_$insert(_el$
|
|
2773
|
+
}), _el$121, _co$28);
|
|
2774
|
+
_$insert(_el$92, _$createComponent(Show, {
|
|
2698
2775
|
get when() {
|
|
2699
2776
|
return conversation();
|
|
2700
2777
|
},
|
|
@@ -2704,38 +2781,38 @@ export function ChatComposer(props) {
|
|
|
2704
2781
|
return props.error;
|
|
2705
2782
|
},
|
|
2706
2783
|
get children() {
|
|
2707
|
-
var _el$
|
|
2708
|
-
_el$
|
|
2709
|
-
_el$
|
|
2710
|
-
[_el$
|
|
2711
|
-
_$insert(_el$
|
|
2712
|
-
return _el$
|
|
2784
|
+
var _el$195 = _$getNextElement(_tmpl$27),
|
|
2785
|
+
_el$196 = _el$195.firstChild,
|
|
2786
|
+
_el$197 = _el$196.nextSibling,
|
|
2787
|
+
[_el$198, _co$49] = _$getNextMarker(_el$197.nextSibling);
|
|
2788
|
+
_$insert(_el$195, () => props.error, _el$198, _co$49);
|
|
2789
|
+
return _el$195;
|
|
2713
2790
|
}
|
|
2714
2791
|
}), _$memo(formatRow), (() => {
|
|
2715
|
-
var _el$
|
|
2716
|
-
_$insert(_el$
|
|
2792
|
+
var _el$199 = _$getNextElement(_tmpl$47);
|
|
2793
|
+
_$insert(_el$199, _$createComponent(Show, {
|
|
2717
2794
|
get when() {
|
|
2718
2795
|
return footer();
|
|
2719
2796
|
},
|
|
2720
2797
|
get fallback() {
|
|
2721
2798
|
return [(() => {
|
|
2722
|
-
var _el$
|
|
2723
|
-
_el$
|
|
2724
|
-
[_el$
|
|
2725
|
-
_el$
|
|
2726
|
-
[_el$
|
|
2727
|
-
_el$
|
|
2728
|
-
[_el$
|
|
2729
|
-
_el$
|
|
2730
|
-
[_el$
|
|
2731
|
-
_el$
|
|
2732
|
-
[_el$
|
|
2733
|
-
_el$
|
|
2734
|
-
[_el$
|
|
2735
|
-
_el$
|
|
2736
|
-
[_el$
|
|
2737
|
-
_$insert(_el$
|
|
2738
|
-
_$insert(_el$
|
|
2799
|
+
var _el$200 = _$getNextElement(_tmpl$48),
|
|
2800
|
+
_el$201 = _el$200.firstChild,
|
|
2801
|
+
[_el$202, _co$50] = _$getNextMarker(_el$201.nextSibling),
|
|
2802
|
+
_el$203 = _el$202.nextSibling,
|
|
2803
|
+
[_el$204, _co$51] = _$getNextMarker(_el$203.nextSibling),
|
|
2804
|
+
_el$205 = _el$204.nextSibling,
|
|
2805
|
+
[_el$206, _co$52] = _$getNextMarker(_el$205.nextSibling),
|
|
2806
|
+
_el$207 = _el$206.nextSibling,
|
|
2807
|
+
[_el$208, _co$53] = _$getNextMarker(_el$207.nextSibling),
|
|
2808
|
+
_el$209 = _el$208.nextSibling,
|
|
2809
|
+
[_el$210, _co$54] = _$getNextMarker(_el$209.nextSibling),
|
|
2810
|
+
_el$211 = _el$210.nextSibling,
|
|
2811
|
+
[_el$212, _co$55] = _$getNextMarker(_el$211.nextSibling),
|
|
2812
|
+
_el$213 = _el$212.nextSibling,
|
|
2813
|
+
[_el$214, _co$56] = _$getNextMarker(_el$213.nextSibling);
|
|
2814
|
+
_$insert(_el$200, () => props.footerTools, _el$202, _co$50);
|
|
2815
|
+
_$insert(_el$200, _$createComponent(Show, {
|
|
2739
2816
|
get when() {
|
|
2740
2817
|
return addOpensCommands();
|
|
2741
2818
|
},
|
|
@@ -2752,11 +2829,11 @@ export function ChatComposer(props) {
|
|
|
2752
2829
|
get children() {
|
|
2753
2830
|
return addSearchButton();
|
|
2754
2831
|
}
|
|
2755
|
-
}), _el$
|
|
2756
|
-
_$insert(_el$
|
|
2757
|
-
_$insert(_el$
|
|
2758
|
-
_$insert(_el$
|
|
2759
|
-
_$insert(_el$
|
|
2832
|
+
}), _el$204, _co$51);
|
|
2833
|
+
_$insert(_el$200, fileInput, _el$206, _co$52);
|
|
2834
|
+
_$insert(_el$200, formatToggle, _el$208, _co$53);
|
|
2835
|
+
_$insert(_el$200, emojiButton, _el$210, _co$54);
|
|
2836
|
+
_$insert(_el$200, _$createComponent(Show, {
|
|
2760
2837
|
get when() {
|
|
2761
2838
|
return (props.models?.length ?? 0) > 0;
|
|
2762
2839
|
},
|
|
@@ -2802,22 +2879,22 @@ export function ChatComposer(props) {
|
|
|
2802
2879
|
}
|
|
2803
2880
|
});
|
|
2804
2881
|
}
|
|
2805
|
-
}), _el$
|
|
2806
|
-
_$insert(_el$
|
|
2807
|
-
return _el$
|
|
2882
|
+
}), _el$212, _co$55);
|
|
2883
|
+
_$insert(_el$200, () => props.modelDetails, _el$214, _co$56);
|
|
2884
|
+
return _el$200;
|
|
2808
2885
|
})(), (() => {
|
|
2809
|
-
var _el$
|
|
2810
|
-
_el$
|
|
2811
|
-
[_el$
|
|
2812
|
-
_el$
|
|
2813
|
-
[_el$
|
|
2814
|
-
_el$
|
|
2815
|
-
[_el$
|
|
2816
|
-
_el$
|
|
2817
|
-
[_el$
|
|
2818
|
-
_el$
|
|
2819
|
-
[_el$
|
|
2820
|
-
_$insert(_el$
|
|
2886
|
+
var _el$215 = _$getNextElement(_tmpl$49),
|
|
2887
|
+
_el$216 = _el$215.firstChild,
|
|
2888
|
+
[_el$217, _co$57] = _$getNextMarker(_el$216.nextSibling),
|
|
2889
|
+
_el$218 = _el$217.nextSibling,
|
|
2890
|
+
[_el$219, _co$58] = _$getNextMarker(_el$218.nextSibling),
|
|
2891
|
+
_el$220 = _el$219.nextSibling,
|
|
2892
|
+
[_el$221, _co$59] = _$getNextMarker(_el$220.nextSibling),
|
|
2893
|
+
_el$222 = _el$221.nextSibling,
|
|
2894
|
+
[_el$223, _co$60] = _$getNextMarker(_el$222.nextSibling),
|
|
2895
|
+
_el$224 = _el$223.nextSibling,
|
|
2896
|
+
[_el$225, _co$61] = _$getNextMarker(_el$224.nextSibling);
|
|
2897
|
+
_$insert(_el$215, _$createComponent(For, {
|
|
2821
2898
|
get each() {
|
|
2822
2899
|
return props.contextActions;
|
|
2823
2900
|
},
|
|
@@ -2841,13 +2918,13 @@ export function ChatComposer(props) {
|
|
|
2841
2918
|
},
|
|
2842
2919
|
onClick: () => reportChatFailure(() => executeChatAction(action), props.onError),
|
|
2843
2920
|
get children() {
|
|
2844
|
-
var _el$
|
|
2845
|
-
_$effect(() => _$className(_el$
|
|
2846
|
-
return _el$
|
|
2921
|
+
var _el$226 = _$getNextElement(_tmpl$3);
|
|
2922
|
+
_$effect(() => _$className(_el$226, action.icon ?? "ti ti-dots"));
|
|
2923
|
+
return _el$226;
|
|
2847
2924
|
}
|
|
2848
2925
|
})
|
|
2849
|
-
}), _el$
|
|
2850
|
-
_$insert(_el$
|
|
2926
|
+
}), _el$217, _co$57);
|
|
2927
|
+
_$insert(_el$215, _$createComponent(Show, {
|
|
2851
2928
|
get when() {
|
|
2852
2929
|
return _$memo(() => !!hasContextUsage())() ? props.contextUsage ?? {} : undefined;
|
|
2853
2930
|
},
|
|
@@ -2859,18 +2936,18 @@ export function ChatComposer(props) {
|
|
|
2859
2936
|
return props.onError;
|
|
2860
2937
|
}
|
|
2861
2938
|
}))
|
|
2862
|
-
}), _el$
|
|
2863
|
-
_$insert(_el$
|
|
2864
|
-
_$insert(_el$
|
|
2865
|
-
_$insert(_el$
|
|
2866
|
-
return _el$
|
|
2939
|
+
}), _el$219, _co$58);
|
|
2940
|
+
_$insert(_el$215, () => props.submitTools, _el$221, _co$59);
|
|
2941
|
+
_$insert(_el$215, microphoneControl, _el$223, _co$60);
|
|
2942
|
+
_$insert(_el$215, sendControl, _el$225, _co$61);
|
|
2943
|
+
return _el$215;
|
|
2867
2944
|
})()];
|
|
2868
2945
|
},
|
|
2869
2946
|
get children() {
|
|
2870
2947
|
return footer();
|
|
2871
2948
|
}
|
|
2872
2949
|
}));
|
|
2873
|
-
return _el$
|
|
2950
|
+
return _el$199;
|
|
2874
2951
|
})()];
|
|
2875
2952
|
},
|
|
2876
2953
|
get children() {
|
|
@@ -2879,43 +2956,43 @@ export function ChatComposer(props) {
|
|
|
2879
2956
|
return props.error;
|
|
2880
2957
|
},
|
|
2881
2958
|
get children() {
|
|
2882
|
-
var _el$
|
|
2883
|
-
_el$
|
|
2884
|
-
_el$
|
|
2885
|
-
[_el$
|
|
2886
|
-
_$insert(_el$
|
|
2887
|
-
return _el$
|
|
2959
|
+
var _el$95 = _$getNextElement(_tmpl$27),
|
|
2960
|
+
_el$96 = _el$95.firstChild,
|
|
2961
|
+
_el$97 = _el$96.nextSibling,
|
|
2962
|
+
[_el$98, _co$18] = _$getNextMarker(_el$97.nextSibling);
|
|
2963
|
+
_$insert(_el$95, () => props.error, _el$98, _co$18);
|
|
2964
|
+
return _el$95;
|
|
2888
2965
|
}
|
|
2889
2966
|
}), _$memo(() => formatRow()), (() => {
|
|
2890
|
-
var _el$
|
|
2891
|
-
_el$
|
|
2892
|
-
[_el$
|
|
2967
|
+
var _el$99 = _$getNextElement(_tmpl$28),
|
|
2968
|
+
_el$110 = _el$99.firstChild,
|
|
2969
|
+
[_el$111, _co$23] = _$getNextMarker(_el$110.nextSibling),
|
|
2970
|
+
_el$112 = _el$111.nextSibling,
|
|
2971
|
+
[_el$113, _co$24] = _$getNextMarker(_el$112.nextSibling),
|
|
2972
|
+
_el$100 = _el$113.nextSibling,
|
|
2973
|
+
_el$108 = _el$100.firstChild,
|
|
2974
|
+
[_el$109, _co$22] = _$getNextMarker(_el$108.nextSibling),
|
|
2975
|
+
_el$101 = _el$109.nextSibling,
|
|
2976
|
+
_el$102 = _el$101.firstChild,
|
|
2977
|
+
[_el$103, _co$19] = _$getNextMarker(_el$102.nextSibling),
|
|
2893
2978
|
_el$104 = _el$103.nextSibling,
|
|
2894
|
-
[_el$105, _co$
|
|
2895
|
-
_el$
|
|
2896
|
-
_el$
|
|
2897
|
-
|
|
2898
|
-
_el$
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
_$insert(_el$91, attachControl, _el$103, _co$21);
|
|
2908
|
-
_$insert(_el$91, fileInput, _el$105, _co$22);
|
|
2909
|
-
_$insert(_el$92, field, _el$101, _co$20);
|
|
2910
|
-
_$insert(_el$93, formatToggle, _el$95, _co$17);
|
|
2911
|
-
_$insert(_el$93, emojiButton, _el$97, _co$18);
|
|
2912
|
-
_$insert(_el$93, microphoneControl, _el$99, _co$19);
|
|
2913
|
-
_$insert(_el$91, sendControl, _el$107, _co$23);
|
|
2914
|
-
return _el$91;
|
|
2979
|
+
[_el$105, _co$20] = _$getNextMarker(_el$104.nextSibling),
|
|
2980
|
+
_el$106 = _el$105.nextSibling,
|
|
2981
|
+
[_el$107, _co$21] = _$getNextMarker(_el$106.nextSibling),
|
|
2982
|
+
_el$114 = _el$100.nextSibling,
|
|
2983
|
+
[_el$115, _co$25] = _$getNextMarker(_el$114.nextSibling);
|
|
2984
|
+
_$insert(_el$99, attachControl, _el$111, _co$23);
|
|
2985
|
+
_$insert(_el$99, fileInput, _el$113, _co$24);
|
|
2986
|
+
_$insert(_el$100, field, _el$109, _co$22);
|
|
2987
|
+
_$insert(_el$101, formatToggle, _el$103, _co$19);
|
|
2988
|
+
_$insert(_el$101, emojiButton, _el$105, _co$20);
|
|
2989
|
+
_$insert(_el$101, microphoneControl, _el$107, _co$21);
|
|
2990
|
+
_$insert(_el$99, sendControl, _el$115, _co$25);
|
|
2991
|
+
return _el$99;
|
|
2915
2992
|
})()];
|
|
2916
2993
|
}
|
|
2917
|
-
}), _el$
|
|
2918
|
-
_$insert(_el$
|
|
2994
|
+
}), _el$123, _co$29);
|
|
2995
|
+
_$insert(_el$92, _$createComponent(Show, {
|
|
2919
2996
|
get when() {
|
|
2920
2997
|
return props.fileSelection;
|
|
2921
2998
|
},
|
|
@@ -2934,60 +3011,60 @@ export function ChatComposer(props) {
|
|
|
2934
3011
|
},
|
|
2935
3012
|
onDrop: files => void runFiles(files)
|
|
2936
3013
|
})
|
|
2937
|
-
}), _el$
|
|
2938
|
-
_$insert(_el$
|
|
3014
|
+
}), _el$125, _co$30);
|
|
3015
|
+
_$insert(_el$126, _$createComponent(Show, {
|
|
2939
3016
|
get when() {
|
|
2940
3017
|
return suggestionAnnouncement();
|
|
2941
3018
|
},
|
|
2942
3019
|
keyed: true,
|
|
2943
3020
|
children: announced => (() => {
|
|
2944
|
-
var _el$
|
|
2945
|
-
_$insert(_el$
|
|
2946
|
-
return _el$
|
|
3021
|
+
var _el$227 = _$getNextElement(_tmpl$10);
|
|
3022
|
+
_$insert(_el$227, () => announced.text);
|
|
3023
|
+
return _el$227;
|
|
2947
3024
|
})()
|
|
2948
3025
|
}));
|
|
2949
|
-
_$insert(_el$
|
|
3026
|
+
_$insert(_el$127, _$createComponent(Show, {
|
|
2950
3027
|
get when() {
|
|
2951
3028
|
return _$memo(() => !!!suggestionsOpen())() && commandStatus();
|
|
2952
3029
|
},
|
|
2953
3030
|
children: status => (() => {
|
|
2954
|
-
var _el$
|
|
2955
|
-
_el$
|
|
2956
|
-
_el$
|
|
2957
|
-
_$insert(_el$
|
|
3031
|
+
var _el$228 = _$getNextElement(_tmpl$50),
|
|
3032
|
+
_el$229 = _el$228.firstChild,
|
|
3033
|
+
_el$230 = _el$229.nextSibling;
|
|
3034
|
+
_$insert(_el$230, () => status().text);
|
|
2958
3035
|
_$effect(_p$ => {
|
|
2959
|
-
var _v$
|
|
2960
|
-
_v$
|
|
2961
|
-
_v$
|
|
2962
|
-
_v$
|
|
3036
|
+
var _v$56 = status().tone,
|
|
3037
|
+
_v$57 = status().tone === "busy" ? "ti ti-loader-2 k2b-spin" : status().tone === "done" ? "ti ti-check" : "ti ti-alert-circle";
|
|
3038
|
+
_v$56 !== _p$.e && _$setAttribute(_el$228, "data-tone", _p$.e = _v$56);
|
|
3039
|
+
_v$57 !== _p$.t && _$className(_el$229, _p$.t = _v$57);
|
|
2963
3040
|
return _p$;
|
|
2964
3041
|
}, {
|
|
2965
3042
|
e: undefined,
|
|
2966
3043
|
t: undefined
|
|
2967
3044
|
});
|
|
2968
|
-
return _el$
|
|
3045
|
+
return _el$228;
|
|
2969
3046
|
})()
|
|
2970
|
-
}), _el$
|
|
2971
|
-
_$insert(_el$
|
|
3047
|
+
}), _el$129, _co$31);
|
|
3048
|
+
_$insert(_el$127, _$createComponent(Show, {
|
|
2972
3049
|
get when() {
|
|
2973
3050
|
return _$memo(() => !!suggestionsOpen())() && announcement();
|
|
2974
3051
|
},
|
|
2975
3052
|
keyed: true,
|
|
2976
3053
|
children: announced => (() => {
|
|
2977
|
-
var _el$
|
|
2978
|
-
_$insert(_el$
|
|
2979
|
-
return _el$
|
|
3054
|
+
var _el$231 = _$getNextElement(_tmpl$51);
|
|
3055
|
+
_$insert(_el$231, () => announced.text);
|
|
3056
|
+
return _el$231;
|
|
2980
3057
|
})()
|
|
2981
|
-
}), _el$
|
|
3058
|
+
}), _el$131, _co$32);
|
|
2982
3059
|
_$effect(_p$ => {
|
|
2983
3060
|
var _v$34 = `k2b-chat-composer ${props.class ?? ""}`,
|
|
2984
3061
|
_v$35 = running() ? "true" : undefined,
|
|
2985
3062
|
_v$36 = conversation() ? "conversation" : undefined,
|
|
2986
3063
|
_v$37 = props.label ?? chatMessages().messageComposer;
|
|
2987
|
-
_v$34 !== _p$.e && _$className(_el$
|
|
2988
|
-
_v$35 !== _p$.t && _$setAttribute(_el$
|
|
2989
|
-
_v$36 !== _p$.a && _$setAttribute(_el$
|
|
2990
|
-
_v$37 !== _p$.o && _$setAttribute(_el$
|
|
3064
|
+
_v$34 !== _p$.e && _$className(_el$92, _p$.e = _v$34);
|
|
3065
|
+
_v$35 !== _p$.t && _$setAttribute(_el$92, "data-running", _p$.t = _v$35);
|
|
3066
|
+
_v$36 !== _p$.a && _$setAttribute(_el$92, "data-variant", _p$.a = _v$36);
|
|
3067
|
+
_v$37 !== _p$.o && _$setAttribute(_el$92, "aria-label", _p$.o = _v$37);
|
|
2991
3068
|
return _p$;
|
|
2992
3069
|
}, {
|
|
2993
3070
|
e: undefined,
|
|
@@ -2995,7 +3072,7 @@ export function ChatComposer(props) {
|
|
|
2995
3072
|
a: undefined,
|
|
2996
3073
|
o: undefined
|
|
2997
3074
|
});
|
|
2998
|
-
return _el$
|
|
3075
|
+
return _el$57;
|
|
2999
3076
|
})();
|
|
3000
3077
|
}
|
|
3001
3078
|
_$delegateEvents(["input", "click", "keyup", "beforeinput", "keydown", "mousedown", "focusout"]);
|