@uipath/apollo-react 3.45.5-pr292.8555bd0 → 3.45.6

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.
@@ -130,40 +130,16 @@ class CategoryTree {
130
130
  }
131
131
  filterBySearch(searchTerm) {
132
132
  if (!searchTerm) return this;
133
- const searchWords = searchTerm.toLowerCase().split(/\s+/).filter(Boolean);
134
- if (0 === searchWords.length) return this;
135
- const matchesAllWords = (node, ancestorCategoryNames)=>{
136
- const searchableTexts = [
137
- node.display.label.toLowerCase(),
138
- node.nodeType.toLowerCase(),
139
- ...node.description ? [
140
- node.description.toLowerCase()
141
- ] : [],
142
- ...node.tags?.filter((tag)=>'string' == typeof tag).map((tag)=>tag.toLowerCase()) ?? [],
143
- ...ancestorCategoryNames
144
- ];
145
- return searchWords.every((word)=>searchableTexts.some((text)=>text.includes(word)));
146
- };
147
- const filterTree = (tree, ancestorNames)=>{
148
- const filtered = [];
149
- for (const item of tree){
150
- const categoryNames = [
151
- ...ancestorNames,
152
- item.name.toLowerCase()
153
- ];
154
- const nestedCategories = filterTree(item.nestedCategories, categoryNames);
155
- const nodes = item.nodes.filter((node)=>matchesAllWords(node, categoryNames));
156
- if (nestedCategories.length > 0 || nodes.length > 0) filtered.push({
157
- ...item,
158
- nestedCategories,
159
- nodes
160
- });
133
+ const searchLower = searchTerm.toLowerCase();
134
+ return this.filter({
135
+ nodeFilter: (node)=>{
136
+ const matchesLabel = node.display.label.toLowerCase().includes(searchLower);
137
+ const matchesType = node.nodeType.toLowerCase().includes(searchLower);
138
+ const matchesDescription = node.description?.toLowerCase().includes(searchLower);
139
+ const matchesTags = node.tags?.some((tag)=>'string' == typeof tag && tag.toLowerCase().includes(searchLower));
140
+ return matchesLabel || matchesType || matchesDescription || matchesTags;
161
141
  }
162
- return filtered;
163
- };
164
- const filteredRoots = filterTree(this.rootCategories, []);
165
- const filteredRootNodes = this.rootNodes.filter((node)=>matchesAllWords(node, []));
166
- return CategoryTree.fromPrebuilt(filteredRoots, filteredRootNodes);
142
+ });
167
143
  }
168
144
  filterByConnections(validator) {
169
145
  return this.filter({
@@ -1 +1 @@
1
- {"version":3,"file":"CategoryTree.d.ts","sourceRoot":"","sources":["../../../src/canvas/core/CategoryTree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAKhF,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACxD,gBAAgB,EAAE,gBAAgB,EAAE,CAAC;IACrC,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB;AAKD,MAAM,WAAW,yBAAyB;IAExC,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,OAAO,CAAC;IAEzD,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC;CAC9C;AAMD,MAAM,WAAW,mBAAmB;IAMlC,4BAA4B,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;IAO1D,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC3C;AA8BD,qBAAa,YAAY;IACvB,OAAO,CAAC,cAAc,CAAqB;IAC3C,OAAO,CAAC,SAAS,CAAiB;IAClC,OAAO,CAAC,WAAW,CAAgC;gBAQvC,UAAU,EAAE,gBAAgB,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE;IAYjE,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAmBxE,MAAM,CAAC,YAAY,CAAC,cAAc,EAAE,gBAAgB,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,YAAY;IAkBhG,SAAS,CACP,UAAU,EAAE,gBAAgB,EAAE,EAC9B,KAAK,EAAE,YAAY,EAAE,GACpB;QAAE,cAAc,EAAE,gBAAgB,EAAE,CAAC;QAAC,SAAS,EAAE,YA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OAAO,CAAC,SAAS,CAAiB;IAClC,OAAO,CAAC,WAAW,CAAgC;gBAQvC,UAAU,EAAE,gBAAgB,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE;IAYjE,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAmBxE,MAAM,CAAC,YAAY,CAAC,cAAc,EAAE,gBAAgB,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,YAAY;IAkBhG,SAAS,CACP,UAAU,EAAE,gBAAgB,EAAE,EAC9B,KAAK,EAAE,YAAY,EAAE,GACpB;QAAE,cAAc,EAAE,gBAAgB,EAAE,CAAC;QAAC,SAAS,EAAE,YAAY,EAAE,CAAA;KAAE;IAsFpE,iBAAiB,IAAI,gBAAgB,EAAE;IASvC,YAAY,IAAI,YAAY,EAAE;IAU9B,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI;IAWzD,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY;IAuB5C,MAAM,CAAC,OAAO,GAAE,yBAA8B,GAAG,YAAY;IA6C7D,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY;IAiChD,mBAAmB,CAAC,SAAS,EAAE,mBAAmB,GAAG,YAAY;IAoBjE,iBAAiB,IAAI,YAAY;IA4BjC,OAAO,IAAI,YAAY;IAoBvB,OAAO,IAAI,OAAO;IASlB,gBAAgB,IAAI,gBAAgB,EAAE;IAStC,WAAW,IAAI,YAAY,EAAE;IAa7B,gBAAgB,IAAI,MAAM;IAS1B,YAAY,IAAI,MAAM;CAOvB"}
@@ -102,40 +102,16 @@ class CategoryTree {
102
102
  }
103
103
  filterBySearch(searchTerm) {
104
104
  if (!searchTerm) return this;
105
- const searchWords = searchTerm.toLowerCase().split(/\s+/).filter(Boolean);
106
- if (0 === searchWords.length) return this;
107
- const matchesAllWords = (node, ancestorCategoryNames)=>{
108
- const searchableTexts = [
109
- node.display.label.toLowerCase(),
110
- node.nodeType.toLowerCase(),
111
- ...node.description ? [
112
- node.description.toLowerCase()
113
- ] : [],
114
- ...node.tags?.filter((tag)=>'string' == typeof tag).map((tag)=>tag.toLowerCase()) ?? [],
115
- ...ancestorCategoryNames
116
- ];
117
- return searchWords.every((word)=>searchableTexts.some((text)=>text.includes(word)));
118
- };
119
- const filterTree = (tree, ancestorNames)=>{
120
- const filtered = [];
121
- for (const item of tree){
122
- const categoryNames = [
123
- ...ancestorNames,
124
- item.name.toLowerCase()
125
- ];
126
- const nestedCategories = filterTree(item.nestedCategories, categoryNames);
127
- const nodes = item.nodes.filter((node)=>matchesAllWords(node, categoryNames));
128
- if (nestedCategories.length > 0 || nodes.length > 0) filtered.push({
129
- ...item,
130
- nestedCategories,
131
- nodes
132
- });
105
+ const searchLower = searchTerm.toLowerCase();
106
+ return this.filter({
107
+ nodeFilter: (node)=>{
108
+ const matchesLabel = node.display.label.toLowerCase().includes(searchLower);
109
+ const matchesType = node.nodeType.toLowerCase().includes(searchLower);
110
+ const matchesDescription = node.description?.toLowerCase().includes(searchLower);
111
+ const matchesTags = node.tags?.some((tag)=>'string' == typeof tag && tag.toLowerCase().includes(searchLower));
112
+ return matchesLabel || matchesType || matchesDescription || matchesTags;
133
113
  }
134
- return filtered;
135
- };
136
- const filteredRoots = filterTree(this.rootCategories, []);
137
- const filteredRootNodes = this.rootNodes.filter((node)=>matchesAllWords(node, []));
138
- return CategoryTree.fromPrebuilt(filteredRoots, filteredRootNodes);
114
+ });
139
115
  }
140
116
  filterByConnections(validator) {
141
117
  return this.filter({
@@ -114,7 +114,8 @@ function contentPartsToMarkdown(messageId, contentParts) {
114
114
  messageId
115
115
  }));
116
116
  const encodedData = btoa(JSON.stringify(citationsData));
117
- text = `[[cite-start:${encodedData}]]${text}[[cite-end]]`;
117
+ const endsWithUrl = /https?:\/\/\S+$/.test(text);
118
+ text = `[[cite-start:${encodedData}]]${text}${endsWithUrl ? ' ' : ''}[[cite-end]]`;
118
119
  }
119
120
  return text;
120
121
  }).join('');
@@ -1 +1 @@
1
- {"version":3,"file":"citation-parser.d.ts","sourceRoot":"","sources":["../../../../../../../../src/material/components/ap-chat/components/message/markdown/parsers/citation-parser.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAK5E,wBAAgB,cAAc,KAIpB,MAAM,GAAG,UAmFlB;AAsCD,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,MAAM,CAyB7F"}
1
+ {"version":3,"file":"citation-parser.d.ts","sourceRoot":"","sources":["../../../../../../../../src/material/components/ap-chat/components/message/markdown/parsers/citation-parser.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAK5E,wBAAgB,cAAc,KAIpB,MAAM,GAAG,UAmFlB;AAsCD,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,MAAM,CA4B7F"}
@@ -85,7 +85,8 @@ function contentPartsToMarkdown(messageId, contentParts) {
85
85
  messageId
86
86
  }));
87
87
  const encodedData = btoa(JSON.stringify(citationsData));
88
- text = `[[cite-start:${encodedData}]]${text}[[cite-end]]`;
88
+ const endsWithUrl = /https?:\/\/\S+$/.test(text);
89
+ text = `[[cite-start:${encodedData}]]${text}${endsWithUrl ? ' ' : ''}[[cite-end]]`;
89
90
  }
90
91
  return text;
91
92
  }).join('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/apollo-react",
3
- "version": "3.45.5-pr292.8555bd0",
3
+ "version": "3.45.6",
4
4
  "description": "Apollo Design System - React component library with Material UI theming",
5
5
  "repository": {
6
6
  "type": "git",
@@ -200,8 +200,8 @@
200
200
  "use-sync-external-store": "^1.2.0",
201
201
  "zod": "^4.3.5",
202
202
  "zustand": "^5.0.9",
203
- "@uipath/apollo-core": "5.7.0",
204
- "@uipath/apollo-wind": "0.11.0"
203
+ "@uipath/apollo-wind": "0.11.0",
204
+ "@uipath/apollo-core": "5.7.0"
205
205
  },
206
206
  "devDependencies": {
207
207
  "@lingui/cli": "^5.6.1",