stream-chat 9.47.0 → 9.47.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/cjs/index.browser.js +20 -18
- package/dist/cjs/index.browser.js.map +2 -2
- package/dist/cjs/index.node.js +20 -18
- package/dist/cjs/index.node.js.map +2 -2
- package/dist/esm/index.mjs +20 -18
- package/dist/esm/index.mjs.map +2 -2
- package/dist/types/types.d.ts +4 -0
- package/package.json +2 -2
- package/src/messageComposer/middleware/textComposer/commands.ts +21 -19
- package/src/types.ts +4 -0
package/dist/esm/index.mjs
CHANGED
|
@@ -5133,25 +5133,27 @@ var CommandSearchSource = class extends BaseSearchSourceSync {
|
|
|
5133
5133
|
const selectedCommands = commands.filter(
|
|
5134
5134
|
(command) => !!(command.name && command.name.toLowerCase().indexOf(searchQuery.toLowerCase()) !== -1)
|
|
5135
5135
|
);
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
nameA
|
|
5141
|
-
|
|
5142
|
-
if (nameB?.indexOf(searchQuery) === 0) {
|
|
5143
|
-
nameB = `0${nameB}`;
|
|
5144
|
-
}
|
|
5145
|
-
if (nameA != null && nameB != null) {
|
|
5146
|
-
if (nameA < nameB) {
|
|
5147
|
-
return -1;
|
|
5136
|
+
if (searchQuery) {
|
|
5137
|
+
selectedCommands.sort((a, b) => {
|
|
5138
|
+
let nameA = a.name?.toLowerCase();
|
|
5139
|
+
let nameB = b.name?.toLowerCase();
|
|
5140
|
+
if (nameA?.indexOf(searchQuery) === 0) {
|
|
5141
|
+
nameA = `0${nameA}`;
|
|
5148
5142
|
}
|
|
5149
|
-
if (
|
|
5150
|
-
|
|
5143
|
+
if (nameB?.indexOf(searchQuery) === 0) {
|
|
5144
|
+
nameB = `0${nameB}`;
|
|
5151
5145
|
}
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5146
|
+
if (nameA != null && nameB != null) {
|
|
5147
|
+
if (nameA < nameB) {
|
|
5148
|
+
return -1;
|
|
5149
|
+
}
|
|
5150
|
+
if (nameA > nameB) {
|
|
5151
|
+
return 1;
|
|
5152
|
+
}
|
|
5153
|
+
}
|
|
5154
|
+
return 0;
|
|
5155
|
+
});
|
|
5156
|
+
}
|
|
5155
5157
|
return {
|
|
5156
5158
|
items: selectedCommands.map((command) => ({
|
|
5157
5159
|
...command,
|
|
@@ -16535,7 +16537,7 @@ var StreamChat = class _StreamChat {
|
|
|
16535
16537
|
if (this.userAgent) {
|
|
16536
16538
|
return this.userAgent;
|
|
16537
16539
|
}
|
|
16538
|
-
const version = "9.47.
|
|
16540
|
+
const version = "9.47.1";
|
|
16539
16541
|
const clientBundle = "browser-esm";
|
|
16540
16542
|
let userAgentString = "";
|
|
16541
16543
|
if (this.sdkIdentifier) {
|