@uipath/apollo-react 3.45.2 → 3.45.3-pr280.9de6175

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.
Files changed (18) hide show
  1. package/dist/canvas/components/AgentCanvas/nodes/ResourceNode.cjs +14 -4
  2. package/dist/canvas/components/AgentCanvas/nodes/ResourceNode.d.ts.map +1 -1
  3. package/dist/canvas/components/AgentCanvas/nodes/ResourceNode.js +14 -4
  4. package/dist/material/components/ap-chat/components/input/tiptap/resource-chip-node-view.cjs +3 -1
  5. package/dist/material/components/ap-chat/components/input/tiptap/resource-chip-node-view.d.ts.map +1 -1
  6. package/dist/material/components/ap-chat/components/input/tiptap/resource-chip-node-view.js +3 -1
  7. package/dist/material/components/ap-chat/components/input/tiptap/tiptap-editor.styles.cjs +11 -7
  8. package/dist/material/components/ap-chat/components/input/tiptap/tiptap-editor.styles.d.ts.map +1 -1
  9. package/dist/material/components/ap-chat/components/input/tiptap/tiptap-editor.styles.js +11 -7
  10. package/dist/material/components/ap-chat/components/input/tiptap/tiptap-resource-suggestion.cjs +3 -6
  11. package/dist/material/components/ap-chat/components/input/tiptap/tiptap-resource-suggestion.d.ts.map +1 -1
  12. package/dist/material/components/ap-chat/components/input/tiptap/tiptap-resource-suggestion.js +3 -6
  13. package/dist/material/components/ap-chat/components/input/tiptap/tiptap.utils.cjs +0 -25
  14. package/dist/material/components/ap-chat/components/input/tiptap/tiptap.utils.d.ts +0 -5
  15. package/dist/material/components/ap-chat/components/input/tiptap/tiptap.utils.d.ts.map +1 -1
  16. package/dist/material/components/ap-chat/components/input/tiptap/tiptap.utils.js +1 -23
  17. package/dist/material/components/ap-tool-call/locales/ro.json +1 -1
  18. package/package.json +1 -1
@@ -28,6 +28,7 @@ __webpack_require__.d(__webpack_exports__, {
28
28
  });
29
29
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
30
  const index_cjs_namespaceObject = require("../../../icons/index.cjs");
31
+ const external_utils_index_cjs_namespaceObject = require("../../../utils/index.cjs");
31
32
  const external_layouts_index_cjs_namespaceObject = require("../../../layouts/index.cjs");
32
33
  const react_cjs_namespaceObject = require("../../../xyflow/react.cjs");
33
34
  const components_index_cjs_namespaceObject = require("../../../../material/components/index.cjs");
@@ -177,19 +178,25 @@ const ResourceNode = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ d
177
178
  data
178
179
  ]);
179
180
  const toolbarConfig = (0, external_react_namespaceObject.useMemo)(()=>{
180
- if ('view' === mode) return null;
181
+ if ('view' === mode || data.isPlaceholder && (!isSuggestion || !suggestionId)) return null;
181
182
  if (isSuggestion && suggestionId) {
182
183
  if ('0.0.1' === suggestionGroupVersion) return null;
183
184
  const rejectAction = {
184
185
  id: 'reject-suggestion',
185
- icon: 'close',
186
+ icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_utils_index_cjs_namespaceObject.NodeIcon, {
187
+ icon: "X",
188
+ size: 14
189
+ }),
186
190
  label: suggestTranslations.reject,
187
191
  disabled: false,
188
192
  onAction: ()=>handleActOnSuggestion(suggestionId, 'reject')
189
193
  };
190
194
  const acceptAction = {
191
195
  id: 'accept-suggestion',
192
- icon: 'check',
196
+ icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_utils_index_cjs_namespaceObject.NodeIcon, {
197
+ icon: "check",
198
+ size: 14
199
+ }),
193
200
  label: suggestTranslations.accept,
194
201
  disabled: false,
195
202
  onAction: ()=>handleActOnSuggestion(suggestionId, 'accept')
@@ -228,7 +235,10 @@ const ResourceNode = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ d
228
235
  };
229
236
  const removeAction = {
230
237
  id: 'remove',
231
- icon: 'delete',
238
+ icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_utils_index_cjs_namespaceObject.NodeIcon, {
239
+ icon: "trash",
240
+ size: 14
241
+ }),
232
242
  label: translations?.remove ?? '',
233
243
  disabled: false,
234
244
  onAction: handleClickRemove
@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Q,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACvF,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACnF,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACjF,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAClF,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACrF,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACvF,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,YAAY,CAAC,EAAE,wBAAwB,CAAC;IACxC,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAEhD,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,eAAO,MAAM,YAAY,0RAoBpB,iBAAiB,6CAocrB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { McpIcon, MemoryIcon } from "../../../icons/index.js";
3
+ import { NodeIcon } from "../../../utils/index.js";
3
4
  import { Row } from "../../../layouts/index.js";
4
5
  import { Position } from "../../../xyflow/react.js";
5
6
  import { ApIcon } from "../../../../material/components/index.js";
@@ -149,19 +150,25 @@ const ResourceNode = /*#__PURE__*/ memo(({ data, selected, id, mode, hasError =
149
150
  data
150
151
  ]);
151
152
  const toolbarConfig = useMemo(()=>{
152
- if ('view' === mode) return null;
153
+ if ('view' === mode || data.isPlaceholder && (!isSuggestion || !suggestionId)) return null;
153
154
  if (isSuggestion && suggestionId) {
154
155
  if ('0.0.1' === suggestionGroupVersion) return null;
155
156
  const rejectAction = {
156
157
  id: 'reject-suggestion',
157
- icon: 'close',
158
+ icon: /*#__PURE__*/ jsx(NodeIcon, {
159
+ icon: "X",
160
+ size: 14
161
+ }),
158
162
  label: suggestTranslations.reject,
159
163
  disabled: false,
160
164
  onAction: ()=>handleActOnSuggestion(suggestionId, 'reject')
161
165
  };
162
166
  const acceptAction = {
163
167
  id: 'accept-suggestion',
164
- icon: 'check',
168
+ icon: /*#__PURE__*/ jsx(NodeIcon, {
169
+ icon: "check",
170
+ size: 14
171
+ }),
165
172
  label: suggestTranslations.accept,
166
173
  disabled: false,
167
174
  onAction: ()=>handleActOnSuggestion(suggestionId, 'accept')
@@ -200,7 +207,10 @@ const ResourceNode = /*#__PURE__*/ memo(({ data, selected, id, mode, hasError =
200
207
  };
201
208
  const removeAction = {
202
209
  id: 'remove',
203
- icon: 'delete',
210
+ icon: /*#__PURE__*/ jsx(NodeIcon, {
211
+ icon: "trash",
212
+ size: 14
213
+ }),
204
214
  label: translations?.remove ?? '',
205
215
  disabled: false,
206
216
  onAction: handleClickRemove
@@ -166,7 +166,9 @@ const ResourceChipNodeView = /*#__PURE__*/ external_react_default().memo(({ node
166
166
  display: 'inline-flex',
167
167
  alignItems: 'center',
168
168
  height: lineHeight,
169
- verticalAlign: 'top'
169
+ lineHeight,
170
+ verticalAlign: 'top',
171
+ marginTop: apollo_core_default().Padding.PadXs
170
172
  },
171
173
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ResourceChipBase, {
172
174
  label: label,
@@ -1 +1 @@
1
- {"version":3,"file":"resource-chip-node-view.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/resource-chip-node-view.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,aAAa,EAAmB,MAAM,eAAe,CAAC;AAEpE,OAAO,KAAK,MAAM,OAAO,CAAC;AA4D1B,UAAU,qBAAqB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAmED,eAAO,MAAM,gBAAgB,mDAAoC,CAAC;AAGlE,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAmBvD,CAAC"}
1
+ {"version":3,"file":"resource-chip-node-view.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/resource-chip-node-view.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,aAAa,EAAmB,MAAM,eAAe,CAAC;AAEpE,OAAO,KAAK,MAAM,OAAO,CAAC;AA4D1B,UAAU,qBAAqB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAmED,eAAO,MAAM,gBAAgB,mDAAoC,CAAC;AAGlE,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAqBvD,CAAC"}
@@ -126,7 +126,9 @@ const ResourceChipNodeView = /*#__PURE__*/ react.memo(({ node, deleteNode })=>{
126
126
  display: 'inline-flex',
127
127
  alignItems: 'center',
128
128
  height: lineHeight,
129
- verticalAlign: 'top'
129
+ lineHeight,
130
+ verticalAlign: 'top',
131
+ marginTop: apollo_core.Padding.PadXs
130
132
  },
131
133
  children: /*#__PURE__*/ jsx(ResourceChipBase, {
132
134
  label: label,
@@ -39,20 +39,23 @@ const styles_namespaceObject = require("@mui/material/styles");
39
39
  const apollo_core_namespaceObject = require("@uipath/apollo-core");
40
40
  var apollo_core_default = /*#__PURE__*/ __webpack_require__.n(apollo_core_namespaceObject);
41
41
  const EDITOR_PADDING = apollo_core_default().Spacing.SpacingXs;
42
- const EditorContainer = (0, styles_namespaceObject.styled)('div')(({ minRows, maxRows, lineHeight })=>({
42
+ const LINE_GAP = apollo_core_default().Spacing.SpacingMicro;
43
+ const EditorContainer = (0, styles_namespaceObject.styled)('div')(({ minRows, maxRows, lineHeight })=>{
44
+ const rowHeight = `calc(${lineHeight} + ${LINE_GAP})`;
45
+ return {
43
46
  width: '100%',
44
- minHeight: `calc(${minRows} * ${lineHeight} + ${EDITOR_PADDING})`,
45
- maxHeight: `calc(${maxRows} * ${lineHeight} + ${EDITOR_PADDING})`,
47
+ minHeight: `calc(${minRows} * ${rowHeight} + ${EDITOR_PADDING})`,
48
+ maxHeight: `calc(${maxRows} * ${rowHeight} + ${EDITOR_PADDING})`,
46
49
  overflowY: 'auto',
47
50
  cursor: 'text',
48
51
  '& .tiptap': {
49
52
  outline: 'none',
50
- minHeight: `calc(${minRows} * ${lineHeight} + ${EDITOR_PADDING})`,
53
+ minHeight: `calc(${minRows} * ${rowHeight} + ${EDITOR_PADDING})`,
51
54
  paddingBottom: EDITOR_PADDING,
52
55
  '& p': {
53
56
  margin: 0,
54
- minHeight: lineHeight,
55
- lineHeight: lineHeight
57
+ minHeight: rowHeight,
58
+ lineHeight: rowHeight
56
59
  },
57
60
  '& p.is-editor-empty:first-of-type::before': {
58
61
  content: 'attr(data-placeholder)',
@@ -62,7 +65,8 @@ const EditorContainer = (0, styles_namespaceObject.styled)('div')(({ minRows, ma
62
65
  height: 0
63
66
  }
64
67
  }
65
- }));
68
+ };
69
+ });
66
70
  exports.EditorContainer = __webpack_exports__.EditorContainer;
67
71
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
68
72
  "EditorContainer"
@@ -1 +1 @@
1
- {"version":3,"file":"tiptap-editor.styles.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/tiptap-editor.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe;aACjB,MAAM;aACN,MAAM;gBACH,MAAM;yGA2BjB,CAAC"}
1
+ {"version":3,"file":"tiptap-editor.styles.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/tiptap-editor.styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe;aACjB,MAAM;aACN,MAAM;gBACH,MAAM;yGA+BlB,CAAC"}
@@ -1,20 +1,23 @@
1
1
  import { styled } from "@mui/material/styles";
2
2
  import apollo_core from "@uipath/apollo-core";
3
3
  const EDITOR_PADDING = apollo_core.Spacing.SpacingXs;
4
- const EditorContainer = styled('div')(({ minRows, maxRows, lineHeight })=>({
4
+ const LINE_GAP = apollo_core.Spacing.SpacingMicro;
5
+ const EditorContainer = styled('div')(({ minRows, maxRows, lineHeight })=>{
6
+ const rowHeight = `calc(${lineHeight} + ${LINE_GAP})`;
7
+ return {
5
8
  width: '100%',
6
- minHeight: `calc(${minRows} * ${lineHeight} + ${EDITOR_PADDING})`,
7
- maxHeight: `calc(${maxRows} * ${lineHeight} + ${EDITOR_PADDING})`,
9
+ minHeight: `calc(${minRows} * ${rowHeight} + ${EDITOR_PADDING})`,
10
+ maxHeight: `calc(${maxRows} * ${rowHeight} + ${EDITOR_PADDING})`,
8
11
  overflowY: 'auto',
9
12
  cursor: 'text',
10
13
  '& .tiptap': {
11
14
  outline: 'none',
12
- minHeight: `calc(${minRows} * ${lineHeight} + ${EDITOR_PADDING})`,
15
+ minHeight: `calc(${minRows} * ${rowHeight} + ${EDITOR_PADDING})`,
13
16
  paddingBottom: EDITOR_PADDING,
14
17
  '& p': {
15
18
  margin: 0,
16
- minHeight: lineHeight,
17
- lineHeight: lineHeight
19
+ minHeight: rowHeight,
20
+ lineHeight: rowHeight
18
21
  },
19
22
  '& p.is-editor-empty:first-of-type::before': {
20
23
  content: 'attr(data-placeholder)',
@@ -24,5 +27,6 @@ const EditorContainer = styled('div')(({ minRows, maxRows, lineHeight })=>({
24
27
  height: 0
25
28
  }
26
29
  }
27
- }));
30
+ };
31
+ });
28
32
  export { EditorContainer };
@@ -29,7 +29,6 @@ __webpack_require__.d(__webpack_exports__, {
29
29
  });
30
30
  const state_namespaceObject = require("@tiptap/pm/state");
31
31
  const index_cjs_namespaceObject = require("../../../service/index.cjs");
32
- const external_tiptap_utils_cjs_namespaceObject = require("./tiptap.utils.cjs");
33
32
  const ResourceMentionPluginKey = new state_namespaceObject.PluginKey('resourceMention');
34
33
  const RESOURCE_QUERY_START_PATTERN = /^[a-zA-Z0-9_./\\&]/;
35
34
  function getCursorCoordinates(editor, pos) {
@@ -60,13 +59,11 @@ function createResourceSuggestion(callbacks, suppressRef) {
60
59
  render: ()=>({
61
60
  onStart: (props)=>{
62
61
  const coords = getCursorCoordinates(props.editor, props.range.from);
63
- const { query, fullRange } = (0, external_tiptap_utils_cjs_namespaceObject.getFullMentionQuery)(props.editor, props.range);
64
- callbacks.onStart?.(fullRange, coords);
65
- callbacks.onQueryChange?.(query, fullRange);
62
+ callbacks.onStart?.(props.range, coords);
63
+ callbacks.onQueryChange?.(props.query, props.range);
66
64
  },
67
65
  onUpdate: (props)=>{
68
- const { query, fullRange } = (0, external_tiptap_utils_cjs_namespaceObject.getFullMentionQuery)(props.editor, props.range);
69
- callbacks.onQueryChange?.(query, fullRange);
66
+ callbacks.onQueryChange?.(props.query, props.range);
70
67
  },
71
68
  onExit: ()=>{
72
69
  callbacks.onExit?.();
@@ -1 +1 @@
1
- {"version":3,"file":"tiptap-resource-suggestion.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/tiptap-resource-suggestion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,KAAK,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAI7C,eAAO,MAAM,wBAAwB,gBAAmC,CAAC;AAKzE,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,2BAA2B;IACnC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5D,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACvD;AAUD,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,2BAA2B,EACtC,WAAW,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GAChC,cAAc,CAAC,YAAY,CAAC,CAmD9B"}
1
+ {"version":3,"file":"tiptap-resource-suggestion.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/tiptap-resource-suggestion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,KAAK,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7C,eAAO,MAAM,wBAAwB,gBAAmC,CAAC;AAKzE,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,2BAA2B;IACnC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5D,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACvD;AAUD,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,2BAA2B,EACtC,WAAW,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GAChC,cAAc,CAAC,YAAY,CAAC,CAiD9B"}
@@ -1,6 +1,5 @@
1
1
  import { PluginKey } from "@tiptap/pm/state";
2
2
  import { CHAT_RESOURCE_MENTION_TERMINATOR } from "../../../service/index.js";
3
- import { getFullMentionQuery } from "./tiptap.utils.js";
4
3
  const ResourceMentionPluginKey = new PluginKey('resourceMention');
5
4
  const RESOURCE_QUERY_START_PATTERN = /^[a-zA-Z0-9_./\\&]/;
6
5
  function getCursorCoordinates(editor, pos) {
@@ -31,13 +30,11 @@ function createResourceSuggestion(callbacks, suppressRef) {
31
30
  render: ()=>({
32
31
  onStart: (props)=>{
33
32
  const coords = getCursorCoordinates(props.editor, props.range.from);
34
- const { query, fullRange } = getFullMentionQuery(props.editor, props.range);
35
- callbacks.onStart?.(fullRange, coords);
36
- callbacks.onQueryChange?.(query, fullRange);
33
+ callbacks.onStart?.(props.range, coords);
34
+ callbacks.onQueryChange?.(props.query, props.range);
37
35
  },
38
36
  onUpdate: (props)=>{
39
- const { query, fullRange } = getFullMentionQuery(props.editor, props.range);
40
- callbacks.onQueryChange?.(query, fullRange);
37
+ callbacks.onQueryChange?.(props.query, props.range);
41
38
  },
42
39
  onExit: ()=>{
43
40
  callbacks.onExit?.();
@@ -24,31 +24,8 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- getFullMentionQuery: ()=>getFullMentionQuery,
28
27
  textToDocument: ()=>textToDocument
29
28
  });
30
- const index_cjs_namespaceObject = require("../../../service/index.cjs");
31
- function getFullMentionQuery(editor, range) {
32
- const textFrom = range.from + 1;
33
- const parentEnd = editor.state.doc.resolve(textFrom).end();
34
- if (textFrom >= parentEnd) return {
35
- query: '',
36
- fullRange: range
37
- };
38
- const fullText = editor.state.doc.textBetween(textFrom, parentEnd, '', '');
39
- if (fullText.length > 0 && ' ' === fullText.charAt(0)) return {
40
- query: '',
41
- fullRange: range
42
- };
43
- const query = fullText.split(index_cjs_namespaceObject.CHAT_RESOURCE_MENTION_TERMINATOR)[0] ?? '';
44
- return {
45
- query,
46
- fullRange: {
47
- from: range.from,
48
- to: textFrom + query.length
49
- }
50
- };
51
- }
52
29
  function textToDocument(text) {
53
30
  if (!text) return {
54
31
  type: 'doc',
@@ -71,10 +48,8 @@ function textToDocument(text) {
71
48
  content: paragraphs
72
49
  };
73
50
  }
74
- exports.getFullMentionQuery = __webpack_exports__.getFullMentionQuery;
75
51
  exports.textToDocument = __webpack_exports__.textToDocument;
76
52
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
77
- "getFullMentionQuery",
78
53
  "textToDocument"
79
54
  ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
80
55
  Object.defineProperty(exports, '__esModule', {
@@ -1,8 +1,3 @@
1
- import type { Editor, Range } from '@tiptap/core';
2
- export declare function getFullMentionQuery(editor: Editor, range: Range): {
3
- query: string;
4
- fullRange: Range;
5
- };
6
1
  export declare function textToDocument(text: string): {
7
2
  type: 'doc';
8
3
  content: Array<{
@@ -1 +1 @@
1
- {"version":3,"file":"tiptap.utils.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/tiptap.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AASlD,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,GACX;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,KAAK,CAAA;CAAE,CAiBrC;AAOD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG;IAC5C,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,WAAW,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC,CAAC;CACxF,CAaA"}
1
+ {"version":3,"file":"tiptap.utils.d.ts","sourceRoot":"","sources":["../../../../../../../src/material/components/ap-chat/components/input/tiptap/tiptap.utils.ts"],"names":[],"mappings":"AAKA,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG;IAC5C,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,WAAW,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC,CAAC;CACxF,CAaA"}
@@ -1,25 +1,3 @@
1
- import { CHAT_RESOURCE_MENTION_TERMINATOR } from "../../../service/index.js";
2
- function getFullMentionQuery(editor, range) {
3
- const textFrom = range.from + 1;
4
- const parentEnd = editor.state.doc.resolve(textFrom).end();
5
- if (textFrom >= parentEnd) return {
6
- query: '',
7
- fullRange: range
8
- };
9
- const fullText = editor.state.doc.textBetween(textFrom, parentEnd, '', '');
10
- if (fullText.length > 0 && ' ' === fullText.charAt(0)) return {
11
- query: '',
12
- fullRange: range
13
- };
14
- const query = fullText.split(CHAT_RESOURCE_MENTION_TERMINATOR)[0] ?? '';
15
- return {
16
- query,
17
- fullRange: {
18
- from: range.from,
19
- to: textFrom + query.length
20
- }
21
- };
22
- }
23
1
  function textToDocument(text) {
24
2
  if (!text) return {
25
3
  type: 'doc',
@@ -42,4 +20,4 @@ function textToDocument(text) {
42
20
  content: paragraphs
43
21
  };
44
22
  }
45
- export { getFullMentionQuery, textToDocument };
23
+ export { textToDocument };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "tool-call.running": "Rulând {toolName}...",
3
3
  "tool-call.ran": "A rulat {toolName} ({duration}s)",
4
- "tool-call.input": "Intrare",
4
+ "tool-call.input": "Input",
5
5
  "tool-call.execution": "Execuție",
6
6
  "tool-call.escalation": "Escaladare",
7
7
  "tool-call.errors": "Erori",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/apollo-react",
3
- "version": "3.45.2",
3
+ "version": "3.45.3-pr280.9de6175",
4
4
  "description": "Apollo Design System - React component library with Material UI theming",
5
5
  "repository": {
6
6
  "type": "git",