@uipath/apollo-react 6.30.1 → 6.30.2
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.
|
@@ -128,21 +128,6 @@ const ListViewRow = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ in
|
|
|
128
128
|
}), [
|
|
129
129
|
style
|
|
130
130
|
]);
|
|
131
|
-
const nameRef = (0, external_react_namespaceObject.useRef)(null);
|
|
132
|
-
const descriptionRef = (0, external_react_namespaceObject.useRef)(null);
|
|
133
|
-
const [truncated, setTruncated] = (0, external_react_namespaceObject.useState)({
|
|
134
|
-
name: false,
|
|
135
|
-
description: false
|
|
136
|
-
});
|
|
137
|
-
const measureTruncation = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
138
|
-
const n = nameRef.current;
|
|
139
|
-
const d = descriptionRef.current;
|
|
140
|
-
const next = {
|
|
141
|
-
name: !!n && n.scrollWidth > n.clientWidth,
|
|
142
|
-
description: !!d && d.scrollWidth > d.clientWidth
|
|
143
|
-
};
|
|
144
|
-
setTruncated((prev)=>prev.name === next.name && prev.description === next.description ? prev : next);
|
|
145
|
-
}, []);
|
|
146
131
|
const handleButtonClick = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
147
132
|
const clickTarget = renderedItems[index];
|
|
148
133
|
if (clickTarget?.type === 'item') onItemClick(clickTarget.item, index);
|
|
@@ -152,11 +137,9 @@ const ListViewRow = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ in
|
|
|
152
137
|
index
|
|
153
138
|
]);
|
|
154
139
|
const handleButtonHover = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
155
|
-
measureTruncation();
|
|
156
140
|
const hoverTarget = renderedItems[index];
|
|
157
141
|
if (hoverTarget?.type === 'item') onItemHover?.(hoverTarget.item);
|
|
158
142
|
}, [
|
|
159
|
-
measureTruncation,
|
|
160
143
|
onItemHover,
|
|
161
144
|
renderedItems,
|
|
162
145
|
index
|
|
@@ -230,7 +213,6 @@ const ListViewRow = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ in
|
|
|
230
213
|
overflow: "hidden",
|
|
231
214
|
children: [
|
|
232
215
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
233
|
-
ref: nameRef,
|
|
234
216
|
className: "text-sm list-view-item-name",
|
|
235
217
|
style: item.contentColor ? {
|
|
236
218
|
color: item.contentColor
|
|
@@ -238,7 +220,6 @@ const ListViewRow = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ in
|
|
|
238
220
|
children: item.name
|
|
239
221
|
}),
|
|
240
222
|
item.description && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
241
|
-
ref: descriptionRef,
|
|
242
223
|
className: "text-xs list-view-item-name text-foreground-muted",
|
|
243
224
|
children: item.description
|
|
244
225
|
})
|
|
@@ -265,32 +246,27 @@ const ListViewRow = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ in
|
|
|
265
246
|
})
|
|
266
247
|
]
|
|
267
248
|
});
|
|
268
|
-
const showName = truncated.name;
|
|
269
|
-
const showDescription = !!item.description && truncated.description;
|
|
270
|
-
const showPopover = truncated.name || truncated.description || !!item.detail;
|
|
271
|
-
const popover = showPopover ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
272
|
-
className: "flex flex-col gap-0.5",
|
|
273
|
-
children: [
|
|
274
|
-
showName && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
275
|
-
className: "text-sm",
|
|
276
|
-
children: item.name
|
|
277
|
-
}),
|
|
278
|
-
showDescription && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
279
|
-
className: "text-xs text-foreground-inv-de-emp",
|
|
280
|
-
children: item.description
|
|
281
|
-
}),
|
|
282
|
-
item.detail && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
283
|
-
className: "text-xs",
|
|
284
|
-
children: item.detail
|
|
285
|
-
})
|
|
286
|
-
]
|
|
287
|
-
}) : null;
|
|
288
249
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CanvasTooltip_cjs_namespaceObject.CanvasTooltip, {
|
|
289
|
-
content:
|
|
250
|
+
content: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
251
|
+
className: "flex flex-col gap-0.5",
|
|
252
|
+
children: [
|
|
253
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
254
|
+
className: "text-sm",
|
|
255
|
+
children: item.name
|
|
256
|
+
}),
|
|
257
|
+
!!item.description && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
258
|
+
className: "text-xs text-foreground-inv-de-emp",
|
|
259
|
+
children: item.description
|
|
260
|
+
}),
|
|
261
|
+
!!item.detail && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
262
|
+
className: "text-xs",
|
|
263
|
+
children: item.detail
|
|
264
|
+
})
|
|
265
|
+
]
|
|
266
|
+
}),
|
|
290
267
|
placement: "right",
|
|
291
268
|
delay: true,
|
|
292
269
|
contentClassName: "max-w-64",
|
|
293
|
-
hide: !showPopover,
|
|
294
270
|
disableSkipDelay: true,
|
|
295
271
|
children: button
|
|
296
272
|
}, item.id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListView.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Toolbox/ListView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListView.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/Toolbox/ListView.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAqB,MAAM,cAAc,CAAC;AAMzE,MAAM,WAAW,YAAY;IAI3B,IAAI,CAAC,EAAE,MAAM,CAAC;IAId,GAAG,CAAC,EAAE,MAAM,CAAC;IAIb,SAAS,CAAC,EAAE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AAC;IACrB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACpD,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;IAChD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IAQxB,gBAAgB,CAAC,EAAE,MAAM,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;IACnD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IAOzB,eAAe,CAAC,EAAE,OAAO,GAAG,mBAAmB,CAAC;CACjD;AA4FD,eAAO,MAAM,QAAQ,EAA0B,CAAC,CAAC,SAAS,QAAQ,EAChE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA;CAAE,KAC7D,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Column } from "../../layouts/index.js";
|
|
3
3
|
import { CanvasIcon, partition } from "../../utils/index.js";
|
|
4
4
|
import { Skeleton } from "@uipath/apollo-wind";
|
|
5
|
-
import { forwardRef, memo, useCallback, useImperativeHandle, useMemo
|
|
5
|
+
import { forwardRef, memo, useCallback, useImperativeHandle, useMemo } from "react";
|
|
6
6
|
import { useCanvasTheme } from "../BaseCanvas/CanvasThemeContext.js";
|
|
7
7
|
import { CanvasTooltip } from "../CanvasTooltip.js";
|
|
8
8
|
import { InitialsBadge } from "../shared/InitialsBadge.js";
|
|
@@ -93,21 +93,6 @@ const ListViewRow = /*#__PURE__*/ memo(({ index, style, ariaAttributes, rendered
|
|
|
93
93
|
}), [
|
|
94
94
|
style
|
|
95
95
|
]);
|
|
96
|
-
const nameRef = useRef(null);
|
|
97
|
-
const descriptionRef = useRef(null);
|
|
98
|
-
const [truncated, setTruncated] = useState({
|
|
99
|
-
name: false,
|
|
100
|
-
description: false
|
|
101
|
-
});
|
|
102
|
-
const measureTruncation = useCallback(()=>{
|
|
103
|
-
const n = nameRef.current;
|
|
104
|
-
const d = descriptionRef.current;
|
|
105
|
-
const next = {
|
|
106
|
-
name: !!n && n.scrollWidth > n.clientWidth,
|
|
107
|
-
description: !!d && d.scrollWidth > d.clientWidth
|
|
108
|
-
};
|
|
109
|
-
setTruncated((prev)=>prev.name === next.name && prev.description === next.description ? prev : next);
|
|
110
|
-
}, []);
|
|
111
96
|
const handleButtonClick = useCallback(()=>{
|
|
112
97
|
const clickTarget = renderedItems[index];
|
|
113
98
|
if (clickTarget?.type === 'item') onItemClick(clickTarget.item, index);
|
|
@@ -117,11 +102,9 @@ const ListViewRow = /*#__PURE__*/ memo(({ index, style, ariaAttributes, rendered
|
|
|
117
102
|
index
|
|
118
103
|
]);
|
|
119
104
|
const handleButtonHover = useCallback(()=>{
|
|
120
|
-
measureTruncation();
|
|
121
105
|
const hoverTarget = renderedItems[index];
|
|
122
106
|
if (hoverTarget?.type === 'item') onItemHover?.(hoverTarget.item);
|
|
123
107
|
}, [
|
|
124
|
-
measureTruncation,
|
|
125
108
|
onItemHover,
|
|
126
109
|
renderedItems,
|
|
127
110
|
index
|
|
@@ -195,7 +178,6 @@ const ListViewRow = /*#__PURE__*/ memo(({ index, style, ariaAttributes, rendered
|
|
|
195
178
|
overflow: "hidden",
|
|
196
179
|
children: [
|
|
197
180
|
/*#__PURE__*/ jsx("span", {
|
|
198
|
-
ref: nameRef,
|
|
199
181
|
className: "text-sm list-view-item-name",
|
|
200
182
|
style: item.contentColor ? {
|
|
201
183
|
color: item.contentColor
|
|
@@ -203,7 +185,6 @@ const ListViewRow = /*#__PURE__*/ memo(({ index, style, ariaAttributes, rendered
|
|
|
203
185
|
children: item.name
|
|
204
186
|
}),
|
|
205
187
|
item.description && /*#__PURE__*/ jsx("span", {
|
|
206
|
-
ref: descriptionRef,
|
|
207
188
|
className: "text-xs list-view-item-name text-foreground-muted",
|
|
208
189
|
children: item.description
|
|
209
190
|
})
|
|
@@ -230,32 +211,27 @@ const ListViewRow = /*#__PURE__*/ memo(({ index, style, ariaAttributes, rendered
|
|
|
230
211
|
})
|
|
231
212
|
]
|
|
232
213
|
});
|
|
233
|
-
const showName = truncated.name;
|
|
234
|
-
const showDescription = !!item.description && truncated.description;
|
|
235
|
-
const showPopover = truncated.name || truncated.description || !!item.detail;
|
|
236
|
-
const popover = showPopover ? /*#__PURE__*/ jsxs("div", {
|
|
237
|
-
className: "flex flex-col gap-0.5",
|
|
238
|
-
children: [
|
|
239
|
-
showName && /*#__PURE__*/ jsx("span", {
|
|
240
|
-
className: "text-sm",
|
|
241
|
-
children: item.name
|
|
242
|
-
}),
|
|
243
|
-
showDescription && /*#__PURE__*/ jsx("span", {
|
|
244
|
-
className: "text-xs text-foreground-inv-de-emp",
|
|
245
|
-
children: item.description
|
|
246
|
-
}),
|
|
247
|
-
item.detail && /*#__PURE__*/ jsx("span", {
|
|
248
|
-
className: "text-xs",
|
|
249
|
-
children: item.detail
|
|
250
|
-
})
|
|
251
|
-
]
|
|
252
|
-
}) : null;
|
|
253
214
|
return /*#__PURE__*/ jsx(CanvasTooltip, {
|
|
254
|
-
content:
|
|
215
|
+
content: /*#__PURE__*/ jsxs("div", {
|
|
216
|
+
className: "flex flex-col gap-0.5",
|
|
217
|
+
children: [
|
|
218
|
+
/*#__PURE__*/ jsx("span", {
|
|
219
|
+
className: "text-sm",
|
|
220
|
+
children: item.name
|
|
221
|
+
}),
|
|
222
|
+
!!item.description && /*#__PURE__*/ jsx("span", {
|
|
223
|
+
className: "text-xs text-foreground-inv-de-emp",
|
|
224
|
+
children: item.description
|
|
225
|
+
}),
|
|
226
|
+
!!item.detail && /*#__PURE__*/ jsx("span", {
|
|
227
|
+
className: "text-xs",
|
|
228
|
+
children: item.detail
|
|
229
|
+
})
|
|
230
|
+
]
|
|
231
|
+
}),
|
|
255
232
|
placement: "right",
|
|
256
233
|
delay: true,
|
|
257
234
|
contentClassName: "max-w-64",
|
|
258
|
-
hide: !showPopover,
|
|
259
235
|
disableSkipDelay: true,
|
|
260
236
|
children: button
|
|
261
237
|
}, item.id);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/apollo-react",
|
|
3
|
-
"version": "6.30.
|
|
3
|
+
"version": "6.30.2",
|
|
4
4
|
"description": "Apollo Design System - React component library with Material UI theming",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -221,8 +221,8 @@
|
|
|
221
221
|
"zod": "^4.3.5",
|
|
222
222
|
"zustand": "^5.0.9",
|
|
223
223
|
"@uipath/apollo-core": "5.13.0",
|
|
224
|
-
"@uipath/apollo-
|
|
225
|
-
"@uipath/apollo-
|
|
224
|
+
"@uipath/apollo-wind": "2.36.0",
|
|
225
|
+
"@uipath/apollo-ui-icons": "1.0.0"
|
|
226
226
|
},
|
|
227
227
|
"devDependencies": {
|
|
228
228
|
"@lingui/cli": "^5.6.1",
|