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
|
@@ -5348,25 +5348,27 @@ var CommandSearchSource = class extends BaseSearchSourceSync {
|
|
|
5348
5348
|
const selectedCommands = commands.filter(
|
|
5349
5349
|
(command) => !!(command.name && command.name.toLowerCase().indexOf(searchQuery.toLowerCase()) !== -1)
|
|
5350
5350
|
);
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
nameA
|
|
5356
|
-
|
|
5357
|
-
if (nameB?.indexOf(searchQuery) === 0) {
|
|
5358
|
-
nameB = `0${nameB}`;
|
|
5359
|
-
}
|
|
5360
|
-
if (nameA != null && nameB != null) {
|
|
5361
|
-
if (nameA < nameB) {
|
|
5362
|
-
return -1;
|
|
5351
|
+
if (searchQuery) {
|
|
5352
|
+
selectedCommands.sort((a, b) => {
|
|
5353
|
+
let nameA = a.name?.toLowerCase();
|
|
5354
|
+
let nameB = b.name?.toLowerCase();
|
|
5355
|
+
if (nameA?.indexOf(searchQuery) === 0) {
|
|
5356
|
+
nameA = `0${nameA}`;
|
|
5363
5357
|
}
|
|
5364
|
-
if (
|
|
5365
|
-
|
|
5358
|
+
if (nameB?.indexOf(searchQuery) === 0) {
|
|
5359
|
+
nameB = `0${nameB}`;
|
|
5366
5360
|
}
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5361
|
+
if (nameA != null && nameB != null) {
|
|
5362
|
+
if (nameA < nameB) {
|
|
5363
|
+
return -1;
|
|
5364
|
+
}
|
|
5365
|
+
if (nameA > nameB) {
|
|
5366
|
+
return 1;
|
|
5367
|
+
}
|
|
5368
|
+
}
|
|
5369
|
+
return 0;
|
|
5370
|
+
});
|
|
5371
|
+
}
|
|
5370
5372
|
return {
|
|
5371
5373
|
items: selectedCommands.map((command) => ({
|
|
5372
5374
|
...command,
|
|
@@ -16750,7 +16752,7 @@ var StreamChat = class _StreamChat {
|
|
|
16750
16752
|
if (this.userAgent) {
|
|
16751
16753
|
return this.userAgent;
|
|
16752
16754
|
}
|
|
16753
|
-
const version = "9.47.
|
|
16755
|
+
const version = "9.47.1";
|
|
16754
16756
|
const clientBundle = "browser-cjs";
|
|
16755
16757
|
let userAgentString = "";
|
|
16756
16758
|
if (this.sdkIdentifier) {
|