@uipath/apollo-react 4.58.0 → 4.59.0
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/canvas/components/AddNodePanel/AddNodePanelEmptyMessage.cjs +84 -0
- package/dist/canvas/components/AddNodePanel/AddNodePanelEmptyMessage.d.ts +24 -0
- package/dist/canvas/components/AddNodePanel/AddNodePanelEmptyMessage.d.ts.map +1 -0
- package/dist/canvas/components/AddNodePanel/AddNodePanelEmptyMessage.js +50 -0
- package/dist/canvas/components/AddNodePanel/index.cjs +4 -0
- package/dist/canvas/components/AddNodePanel/index.d.ts +1 -0
- package/dist/canvas/components/AddNodePanel/index.d.ts.map +1 -1
- package/dist/canvas/components/AddNodePanel/index.js +2 -1
- package/dist/canvas/components/AgentCanvas/agent-flow.manifest.d.ts +1 -0
- package/dist/canvas/components/AgentCanvas/agent-flow.manifest.d.ts.map +1 -1
- package/dist/canvas/components/CanvasTooltip.cjs +7 -4
- package/dist/canvas/components/CanvasTooltip.d.ts +5 -1
- package/dist/canvas/components/CanvasTooltip.d.ts.map +1 -1
- package/dist/canvas/components/CanvasTooltip.js +7 -4
- package/dist/canvas/components/CaseFlow/case-flow.manifest.d.ts +1 -0
- package/dist/canvas/components/CaseFlow/case-flow.manifest.d.ts.map +1 -1
- package/dist/canvas/components/HierarchicalCanvas/HierarchicalCanvas.cjs +3 -3
- package/dist/canvas/components/HierarchicalCanvas/HierarchicalCanvas.js +1 -1
- package/dist/canvas/components/Toolbox/ListView.cjs +152 -50
- package/dist/canvas/components/Toolbox/ListView.d.ts +17 -0
- package/dist/canvas/components/Toolbox/ListView.d.ts.map +1 -1
- package/dist/canvas/components/Toolbox/ListView.js +136 -52
- package/dist/canvas/components/Toolbox/ListView.styles.cjs +12 -23
- package/dist/canvas/components/Toolbox/ListView.styles.d.ts +0 -4
- package/dist/canvas/components/Toolbox/ListView.styles.d.ts.map +1 -1
- package/dist/canvas/components/Toolbox/ListView.styles.js +11 -19
- package/dist/canvas/constants.cjs +1 -1
- package/dist/canvas/constants.d.ts +1 -1
- package/dist/canvas/constants.d.ts.map +1 -1
- package/dist/canvas/constants.js +1 -1
- package/dist/canvas/core/CategoryTreeAdapter.cjs +1 -0
- package/dist/canvas/core/CategoryTreeAdapter.d.ts.map +1 -1
- package/dist/canvas/core/CategoryTreeAdapter.js +1 -0
- package/dist/canvas/schema/node-definition/category-manifest.cjs +1 -0
- package/dist/canvas/schema/node-definition/category-manifest.d.ts +1 -0
- package/dist/canvas/schema/node-definition/category-manifest.d.ts.map +1 -1
- package/dist/canvas/schema/node-definition/category-manifest.js +1 -0
- package/dist/canvas/storybook-utils/manifests/index.d.ts +1 -0
- package/dist/canvas/storybook-utils/manifests/index.d.ts.map +1 -1
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/package.json +2 -2
|
@@ -24,7 +24,13 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
getRenderItemHeight: ()=>getRenderItemHeight,
|
|
28
|
+
ROW_HEIGHT_ITEM: ()=>ROW_HEIGHT_ITEM,
|
|
29
|
+
ROW_HEIGHT_SECTION: ()=>ROW_HEIGHT_SECTION,
|
|
30
|
+
ROW_HEIGHT_SECTION_FIRST: ()=>ROW_HEIGHT_SECTION_FIRST,
|
|
27
31
|
ListView: ()=>ListView_ListView,
|
|
32
|
+
ROW_HEIGHT_DIVIDER: ()=>ROW_HEIGHT_DIVIDER,
|
|
33
|
+
ROW_HEIGHT_ITEM_TWO_LINE: ()=>ROW_HEIGHT_ITEM_TWO_LINE,
|
|
28
34
|
buildRenderedItems: ()=>buildRenderedItems
|
|
29
35
|
});
|
|
30
36
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
@@ -37,6 +43,24 @@ const external_CanvasTooltip_cjs_namespaceObject = require("../CanvasTooltip.cjs
|
|
|
37
43
|
const InitialsBadge_cjs_namespaceObject = require("../shared/InitialsBadge.cjs");
|
|
38
44
|
const external_ListView_styles_cjs_namespaceObject = require("./ListView.styles.cjs");
|
|
39
45
|
const DEFAULT_SKELETON_COUNT = 3;
|
|
46
|
+
const ROW_HEIGHT_ITEM = 32;
|
|
47
|
+
const ROW_HEIGHT_ITEM_TWO_LINE = 44;
|
|
48
|
+
const ROW_HEIGHT_SECTION = 30;
|
|
49
|
+
const ROW_HEIGHT_SECTION_FIRST = 22;
|
|
50
|
+
const ROW_HEIGHT_DIVIDER = 13;
|
|
51
|
+
function getRenderItemHeight(renderItem) {
|
|
52
|
+
if (!renderItem) return ROW_HEIGHT_ITEM;
|
|
53
|
+
switch(renderItem.type){
|
|
54
|
+
case 'divider':
|
|
55
|
+
return ROW_HEIGHT_DIVIDER;
|
|
56
|
+
case 'section':
|
|
57
|
+
return renderItem.first ? ROW_HEIGHT_SECTION_FIRST : ROW_HEIGHT_SECTION;
|
|
58
|
+
case 'skeleton':
|
|
59
|
+
return ROW_HEIGHT_ITEM;
|
|
60
|
+
default:
|
|
61
|
+
return renderItem.item.description ? ROW_HEIGHT_ITEM_TWO_LINE : ROW_HEIGHT_ITEM;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
40
64
|
function buildRenderedItems(items, enableSections, loadingSkeleton) {
|
|
41
65
|
const result = [];
|
|
42
66
|
const skeletonConfig = 'object' == typeof loadingSkeleton ? loadingSkeleton : loadingSkeleton ? {} : void 0;
|
|
@@ -46,6 +70,15 @@ function buildRenderedItems(items, enableSections, loadingSkeleton) {
|
|
|
46
70
|
type: 'skeleton'
|
|
47
71
|
});
|
|
48
72
|
};
|
|
73
|
+
const pushItem = (item)=>{
|
|
74
|
+
if (item.dividerBefore && result.length > 0) result.push({
|
|
75
|
+
type: 'divider'
|
|
76
|
+
});
|
|
77
|
+
result.push({
|
|
78
|
+
type: 'item',
|
|
79
|
+
item
|
|
80
|
+
});
|
|
81
|
+
};
|
|
49
82
|
if (!enableSections) {
|
|
50
83
|
for (const item of items)result.push({
|
|
51
84
|
type: 'item',
|
|
@@ -55,10 +88,7 @@ function buildRenderedItems(items, enableSections, loadingSkeleton) {
|
|
|
55
88
|
return result;
|
|
56
89
|
}
|
|
57
90
|
const [itemsWithSection, itemsWithoutSection] = (0, external_utils_index_cjs_namespaceObject.partition)(items, (item)=>!!item.section);
|
|
58
|
-
for (const item of itemsWithoutSection)
|
|
59
|
-
type: 'item',
|
|
60
|
-
item
|
|
61
|
-
});
|
|
91
|
+
for (const item of itemsWithoutSection)pushItem(item);
|
|
62
92
|
const itemsBySection = new Map();
|
|
63
93
|
for (const item of itemsWithSection){
|
|
64
94
|
const name = item.section;
|
|
@@ -79,12 +109,10 @@ function buildRenderedItems(items, enableSections, loadingSkeleton) {
|
|
|
79
109
|
for (const sectionName of sectionNames){
|
|
80
110
|
result.push({
|
|
81
111
|
type: 'section',
|
|
82
|
-
sectionName
|
|
83
|
-
|
|
84
|
-
for (const item of itemsBySection.get(sectionName) ?? [])result.push({
|
|
85
|
-
type: 'item',
|
|
86
|
-
item
|
|
112
|
+
sectionName,
|
|
113
|
+
first: 0 === result.length
|
|
87
114
|
});
|
|
115
|
+
for (const item of itemsBySection.get(sectionName) ?? [])pushItem(item);
|
|
88
116
|
const skeletonForSection = skeletonBySection.get(sectionName);
|
|
89
117
|
if (skeletonForSection) pushSkeletons(skeletonForSection.count ?? baseSkeletonCount);
|
|
90
118
|
}
|
|
@@ -100,6 +128,21 @@ const ListViewRow = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ in
|
|
|
100
128
|
}), [
|
|
101
129
|
style
|
|
102
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
|
+
}, []);
|
|
103
146
|
const handleButtonClick = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
104
147
|
const clickTarget = renderedItems[index];
|
|
105
148
|
if (clickTarget?.type === 'item') onItemClick(clickTarget.item, index);
|
|
@@ -109,18 +152,22 @@ const ListViewRow = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ in
|
|
|
109
152
|
index
|
|
110
153
|
]);
|
|
111
154
|
const handleButtonHover = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
155
|
+
measureTruncation();
|
|
112
156
|
const hoverTarget = renderedItems[index];
|
|
113
157
|
if (hoverTarget?.type === 'item') onItemHover?.(hoverTarget.item);
|
|
114
158
|
}, [
|
|
159
|
+
measureTruncation,
|
|
115
160
|
onItemHover,
|
|
116
161
|
renderedItems,
|
|
117
162
|
index
|
|
118
163
|
]);
|
|
119
|
-
if ('section' === renderItem.type) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
120
|
-
|
|
164
|
+
if ('section' === renderItem.type) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
165
|
+
role: "presentation",
|
|
121
166
|
style: style,
|
|
167
|
+
className: `flex items-end box-border ${renderItem.first ? 'px-2 py-1' : 'px-2 pt-3 pb-1'}`,
|
|
168
|
+
"data-testid": "list-section-header",
|
|
122
169
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
123
|
-
className: "text-xs",
|
|
170
|
+
className: "uppercase text-foreground-muted font-bold text-xs",
|
|
124
171
|
children: renderItem.sectionName
|
|
125
172
|
})
|
|
126
173
|
});
|
|
@@ -128,10 +175,20 @@ const ListViewRow = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ in
|
|
|
128
175
|
style: style,
|
|
129
176
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ListItemSkeleton, {})
|
|
130
177
|
});
|
|
178
|
+
if ('divider' === renderItem.type) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
179
|
+
role: "presentation",
|
|
180
|
+
"aria-hidden": "true",
|
|
181
|
+
"data-testid": "list-item-divider",
|
|
182
|
+
style: style,
|
|
183
|
+
className: "flex items-center box-border px-1.5",
|
|
184
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
185
|
+
className: "w-full border-t border-border-de-emp"
|
|
186
|
+
})
|
|
187
|
+
});
|
|
131
188
|
const item = renderItem.item;
|
|
132
189
|
const bgColor = isDarkMode ? item.colorDark ?? item.color : item.color;
|
|
133
190
|
const isActive = index === activeIndex;
|
|
134
|
-
|
|
191
|
+
const button = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_ListView_styles_cjs_namespaceObject.ListItemButton, {
|
|
135
192
|
...ariaAttributes,
|
|
136
193
|
tabIndex: -1,
|
|
137
194
|
id: `toolbox-item-${item.id}`,
|
|
@@ -145,24 +202,24 @@ const ListViewRow = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ in
|
|
|
145
202
|
children: [
|
|
146
203
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(IconContainerMemoized, {
|
|
147
204
|
bgColor: bgColor,
|
|
148
|
-
|
|
205
|
+
style: item.contentColor ? {
|
|
206
|
+
color: item.contentColor
|
|
207
|
+
} : void 0,
|
|
149
208
|
"data-testid": "list-item-icon",
|
|
150
209
|
children: [
|
|
151
210
|
item.icon?.url && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("img", {
|
|
152
211
|
src: item.icon?.url,
|
|
153
212
|
alt: item.name,
|
|
154
|
-
|
|
155
|
-
width: 24,
|
|
156
|
-
height: 24
|
|
157
|
-
}
|
|
213
|
+
className: "w-5 h-5"
|
|
158
214
|
}),
|
|
159
215
|
item.icon?.name && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_utils_index_cjs_namespaceObject.CanvasIcon, {
|
|
160
216
|
icon: item.icon.name,
|
|
161
|
-
size:
|
|
217
|
+
size: 20
|
|
162
218
|
}),
|
|
163
219
|
item.icon?.Component && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(item.icon.Component, {}),
|
|
164
220
|
!item.icon?.url && !item.icon?.name && !item.icon?.Component && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(InitialsBadge_cjs_namespaceObject.InitialsBadge, {
|
|
165
221
|
name: item.name,
|
|
222
|
+
size: "20px",
|
|
166
223
|
"data-testid": "list-item-initials-badge"
|
|
167
224
|
})
|
|
168
225
|
]
|
|
@@ -171,53 +228,83 @@ const ListViewRow = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ in
|
|
|
171
228
|
flex: 1,
|
|
172
229
|
overflow: "hidden",
|
|
173
230
|
children: [
|
|
174
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
})
|
|
231
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
232
|
+
ref: nameRef,
|
|
233
|
+
className: "text-sm list-view-item-name",
|
|
234
|
+
style: item.contentColor ? {
|
|
235
|
+
color: item.contentColor
|
|
236
|
+
} : void 0,
|
|
237
|
+
children: item.name
|
|
182
238
|
}),
|
|
183
|
-
item.description && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
188
|
-
className: "text-xs list-view-item-name text-foreground-muted",
|
|
189
|
-
children: item.description
|
|
190
|
-
})
|
|
239
|
+
item.description && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
240
|
+
ref: descriptionRef,
|
|
241
|
+
className: "text-xs list-view-item-name text-foreground-muted",
|
|
242
|
+
children: item.description
|
|
191
243
|
})
|
|
192
244
|
]
|
|
193
245
|
}),
|
|
246
|
+
item.badge && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
247
|
+
className: "shrink-0 uppercase font-semibold text-[10px] py-px px-1 rounded border border-border text-foreground-muted",
|
|
248
|
+
"data-testid": "list-item-badge",
|
|
249
|
+
children: item.badge
|
|
250
|
+
}),
|
|
251
|
+
item.trailingIcon && !item.children && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
252
|
+
"data-testid": "list-item-trailing-icon",
|
|
253
|
+
className: "flex shrink-0",
|
|
254
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_utils_index_cjs_namespaceObject.CanvasIcon, {
|
|
255
|
+
icon: item.trailingIcon.name,
|
|
256
|
+
size: 16,
|
|
257
|
+
color: item.trailingIcon.color ?? 'var(--canvas-foreground-de-emp)'
|
|
258
|
+
})
|
|
259
|
+
}),
|
|
194
260
|
!!item.children && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_utils_index_cjs_namespaceObject.CanvasIcon, {
|
|
195
261
|
icon: "chevron-right",
|
|
196
|
-
size:
|
|
262
|
+
size: 16,
|
|
197
263
|
color: "var(--canvas-foreground-de-emp)"
|
|
198
264
|
})
|
|
199
265
|
]
|
|
200
266
|
});
|
|
267
|
+
const showName = truncated.name;
|
|
268
|
+
const showDescription = !!item.description && truncated.description;
|
|
269
|
+
const showPopover = truncated.name || truncated.description || !!item.detail;
|
|
270
|
+
const popover = showPopover ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
271
|
+
className: "flex flex-col gap-0.5",
|
|
272
|
+
children: [
|
|
273
|
+
showName && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
274
|
+
className: "text-sm",
|
|
275
|
+
children: item.name
|
|
276
|
+
}),
|
|
277
|
+
showDescription && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
278
|
+
className: "text-xs text-foreground-muted",
|
|
279
|
+
children: item.description
|
|
280
|
+
}),
|
|
281
|
+
item.detail && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
282
|
+
className: "text-xs",
|
|
283
|
+
children: item.detail
|
|
284
|
+
})
|
|
285
|
+
]
|
|
286
|
+
}) : null;
|
|
287
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CanvasTooltip_cjs_namespaceObject.CanvasTooltip, {
|
|
288
|
+
content: popover,
|
|
289
|
+
placement: "right",
|
|
290
|
+
delay: true,
|
|
291
|
+
contentClassName: "max-w-64",
|
|
292
|
+
hide: !showPopover,
|
|
293
|
+
disableSkipDelay: true,
|
|
294
|
+
children: button
|
|
295
|
+
}, item.id);
|
|
201
296
|
});
|
|
202
297
|
const ListItemSkeleton = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
203
|
-
className: "flex items-center gap-2.5 h-8",
|
|
298
|
+
className: "flex items-center gap-2.5 h-8 px-1.5",
|
|
204
299
|
role: "presentation",
|
|
205
300
|
"aria-hidden": "true",
|
|
206
301
|
"data-testid": "list-item-skeleton",
|
|
207
302
|
children: [
|
|
208
303
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Skeleton, {
|
|
209
|
-
className: "h-
|
|
304
|
+
className: "h-6 w-6 shrink-0 rounded-md"
|
|
210
305
|
}),
|
|
211
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
212
|
-
className: "
|
|
213
|
-
children: [
|
|
214
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Skeleton, {
|
|
215
|
-
className: "h-3.5 w-1/3"
|
|
216
|
-
}),
|
|
217
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Skeleton, {
|
|
218
|
-
className: "h-3 w-2/3"
|
|
219
|
-
})
|
|
220
|
-
]
|
|
306
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(apollo_wind_namespaceObject.Skeleton, {
|
|
307
|
+
className: "h-3.5 w-1/2"
|
|
221
308
|
})
|
|
222
309
|
]
|
|
223
310
|
});
|
|
@@ -249,6 +336,9 @@ const ListViewInner = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRe
|
|
|
249
336
|
onItemClick,
|
|
250
337
|
onItemHover
|
|
251
338
|
]);
|
|
339
|
+
const getRowHeight = (0, external_react_namespaceObject.useCallback)((index)=>getRenderItemHeight(renderedItems[index]), [
|
|
340
|
+
renderedItems
|
|
341
|
+
]);
|
|
252
342
|
if (0 === renderedItems.length) {
|
|
253
343
|
if (renderEmptyState) return renderEmptyState();
|
|
254
344
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
@@ -280,17 +370,29 @@ const ListViewInner = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRe
|
|
|
280
370
|
rowProps: rowProps,
|
|
281
371
|
rowComponent: ListViewRow,
|
|
282
372
|
rowCount: renderedItems.length,
|
|
283
|
-
rowHeight:
|
|
373
|
+
rowHeight: getRowHeight,
|
|
284
374
|
overscanCount: 20,
|
|
285
375
|
onScroll: onScroll
|
|
286
376
|
});
|
|
287
377
|
});
|
|
288
378
|
const ListView_ListView = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(ListViewInner);
|
|
289
379
|
exports.ListView = __webpack_exports__.ListView;
|
|
380
|
+
exports.ROW_HEIGHT_DIVIDER = __webpack_exports__.ROW_HEIGHT_DIVIDER;
|
|
381
|
+
exports.ROW_HEIGHT_ITEM = __webpack_exports__.ROW_HEIGHT_ITEM;
|
|
382
|
+
exports.ROW_HEIGHT_ITEM_TWO_LINE = __webpack_exports__.ROW_HEIGHT_ITEM_TWO_LINE;
|
|
383
|
+
exports.ROW_HEIGHT_SECTION = __webpack_exports__.ROW_HEIGHT_SECTION;
|
|
384
|
+
exports.ROW_HEIGHT_SECTION_FIRST = __webpack_exports__.ROW_HEIGHT_SECTION_FIRST;
|
|
290
385
|
exports.buildRenderedItems = __webpack_exports__.buildRenderedItems;
|
|
386
|
+
exports.getRenderItemHeight = __webpack_exports__.getRenderItemHeight;
|
|
291
387
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
292
388
|
"ListView",
|
|
293
|
-
"
|
|
389
|
+
"ROW_HEIGHT_DIVIDER",
|
|
390
|
+
"ROW_HEIGHT_ITEM",
|
|
391
|
+
"ROW_HEIGHT_ITEM_TWO_LINE",
|
|
392
|
+
"ROW_HEIGHT_SECTION",
|
|
393
|
+
"ROW_HEIGHT_SECTION_FIRST",
|
|
394
|
+
"buildRenderedItems",
|
|
395
|
+
"getRenderItemHeight"
|
|
294
396
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
295
397
|
Object.defineProperty(exports, '__esModule', {
|
|
296
398
|
value: true
|
|
@@ -17,6 +17,14 @@ export type ListItem<T = any> = {
|
|
|
17
17
|
data: T;
|
|
18
18
|
section?: string;
|
|
19
19
|
description?: string;
|
|
20
|
+
detail?: string;
|
|
21
|
+
badge?: string;
|
|
22
|
+
dividerBefore?: boolean;
|
|
23
|
+
contentColor?: string;
|
|
24
|
+
trailingIcon?: {
|
|
25
|
+
name: string;
|
|
26
|
+
color?: string;
|
|
27
|
+
};
|
|
20
28
|
icon?: ListItemIcon;
|
|
21
29
|
color?: string;
|
|
22
30
|
colorDark?: string;
|
|
@@ -26,12 +34,21 @@ export type ListItem<T = any> = {
|
|
|
26
34
|
export type RenderItem<T extends ListItem> = {
|
|
27
35
|
type: 'section';
|
|
28
36
|
sectionName: string;
|
|
37
|
+
first: boolean;
|
|
29
38
|
} | {
|
|
30
39
|
type: 'item';
|
|
31
40
|
item: T;
|
|
32
41
|
} | {
|
|
33
42
|
type: 'skeleton';
|
|
43
|
+
} | {
|
|
44
|
+
type: 'divider';
|
|
34
45
|
};
|
|
46
|
+
export declare const ROW_HEIGHT_ITEM = 32;
|
|
47
|
+
export declare const ROW_HEIGHT_ITEM_TWO_LINE = 44;
|
|
48
|
+
export declare const ROW_HEIGHT_SECTION = 30;
|
|
49
|
+
export declare const ROW_HEIGHT_SECTION_FIRST = 22;
|
|
50
|
+
export declare const ROW_HEIGHT_DIVIDER = 13;
|
|
51
|
+
export declare function getRenderItemHeight<T extends ListItem>(renderItem: RenderItem<T> | undefined): number;
|
|
35
52
|
export declare function buildRenderedItems<T extends ListItem>(items: T[], enableSections: boolean, loadingSkeleton?: boolean | ChildrenLoadingSpec): RenderItem<T>[];
|
|
36
53
|
export interface ListViewRowProps<T extends ListItem> {
|
|
37
54
|
renderedItems: RenderItem<T>[];
|
|
@@ -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":"AAYA,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,KAAK,CAAC,aAAa,CAAC;CACjC;AAUD,MAAM,MAAM,mBAAmB,GAAG;IAKhC,KAAK,CAAC,EAAE,MAAM,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