@uipath/apollo-react 5.1.0 → 5.2.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/StageNode/TaskContent.cjs +2 -2
- package/dist/canvas/components/StageNode/TaskContent.js +2 -2
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/dist/core/tokens/css/theme-variables.css +12 -0
- package/dist/core/tokens/css/variables.css +13 -1
- package/dist/core/tokens/jss/palette.cjs +36 -0
- package/dist/core/tokens/jss/palette.d.ts +2 -0
- package/dist/core/tokens/less/_variables.less +12 -0
- package/dist/core/tokens/scss/_css-variables.scss +1355 -0
- package/dist/core/tokens/scss/_scoped-theme-variables.scss +823 -0
- package/dist/core/tokens/scss/_variables.scss +28 -0
- package/dist/core/tokens/scss/base-host.scss +12 -0
- package/dist/core/tokens/scss/helpers.scss +26 -0
- package/dist/core/tokens/scss/mixins.scss +5 -0
- package/dist/core/tokens/scss/theme-variables.scss +12 -0
- package/dist/core/tokens/scss/theme.scss +12 -0
- package/dist/material/components/ap-model-picker/ModelPicker.cjs +20 -11
- package/dist/material/components/ap-model-picker/ModelPicker.d.ts +5 -0
- package/dist/material/components/ap-model-picker/ModelPicker.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/ModelPicker.js +20 -11
- package/dist/material/components/ap-model-picker/i18n.cjs +3 -0
- package/dist/material/components/ap-model-picker/i18n.d.ts +1 -0
- package/dist/material/components/ap-model-picker/i18n.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/i18n.js +3 -0
- package/dist/material/components/ap-model-picker/index.d.ts +1 -1
- package/dist/material/components/ap-model-picker/index.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/locales/en.cjs +1 -1
- package/dist/material/components/ap-model-picker/locales/en.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/locales/en.js +1 -1
- package/dist/material/components/ap-model-picker/primitives/ModelOptionRow.cjs +56 -17
- package/dist/material/components/ap-model-picker/primitives/ModelOptionRow.d.ts +1 -0
- package/dist/material/components/ap-model-picker/primitives/ModelOptionRow.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/primitives/ModelOptionRow.js +56 -18
- package/dist/material/components/ap-model-picker/primitives/PickerPopup.cjs +3 -1
- package/dist/material/components/ap-model-picker/primitives/PickerPopup.d.ts +3 -0
- package/dist/material/components/ap-model-picker/primitives/PickerPopup.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/primitives/PickerPopup.js +3 -1
- package/dist/material/components/ap-model-picker/types.d.ts +1 -1
- package/dist/material/components/ap-model-picker/types.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/usePlatformAccess.cjs +17 -10
- package/dist/material/components/ap-model-picker/usePlatformAccess.d.ts +3 -1
- package/dist/material/components/ap-model-picker/usePlatformAccess.d.ts.map +1 -1
- package/dist/material/components/ap-model-picker/usePlatformAccess.js +17 -10
- package/package.json +2 -2
|
@@ -39,6 +39,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
39
39
|
ModelOptionRow: ()=>ModelOptionRow
|
|
40
40
|
});
|
|
41
41
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
42
|
+
const DeleteOutline_namespaceObject = require("@mui/icons-material/DeleteOutline");
|
|
43
|
+
var DeleteOutline_default = /*#__PURE__*/ __webpack_require__.n(DeleteOutline_namespaceObject);
|
|
42
44
|
const EditOutlined_namespaceObject = require("@mui/icons-material/EditOutlined");
|
|
43
45
|
var EditOutlined_default = /*#__PURE__*/ __webpack_require__.n(EditOutlined_namespaceObject);
|
|
44
46
|
const Box_namespaceObject = require("@mui/material/Box");
|
|
@@ -100,6 +102,7 @@ const ModelOptionRowInner = ({ model, index, active, selected, onSelect, onActiv
|
|
|
100
102
|
justifyContent: 'flex-start',
|
|
101
103
|
textAlign: 'left',
|
|
102
104
|
position: 'relative',
|
|
105
|
+
containerType: 'inline-size',
|
|
103
106
|
boxShadow: selected ? `inset 3px 0px 0px var(--color-primary, ${apollo_core_namespaceObject.Colors.ColorBlue500})` : 'none',
|
|
104
107
|
backgroundColor: selected ? `var(--color-background-selected, ${apollo_core_namespaceObject.Colors.ColorBlue050})` : active ? "var(--color-background-hover, rgba(82, 96, 105, 0.078))" : 'transparent',
|
|
105
108
|
'&:hover': {
|
|
@@ -139,7 +142,17 @@ const ModelOptionRowInner = ({ model, index, active, selected, onSelect, onActiv
|
|
|
139
142
|
}),
|
|
140
143
|
inlineTags.map((t)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Box_default(), {
|
|
141
144
|
sx: {
|
|
142
|
-
flexShrink:
|
|
145
|
+
flexShrink: 1,
|
|
146
|
+
minWidth: 0,
|
|
147
|
+
overflow: 'hidden',
|
|
148
|
+
'& .MuiChip-root': {
|
|
149
|
+
maxWidth: '100%'
|
|
150
|
+
},
|
|
151
|
+
'& .MuiChip-label': {
|
|
152
|
+
overflow: 'hidden',
|
|
153
|
+
textOverflow: 'ellipsis',
|
|
154
|
+
whiteSpace: 'nowrap'
|
|
155
|
+
}
|
|
143
156
|
},
|
|
144
157
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ModelTagChip_cjs_namespaceObject.ModelTagChip, {
|
|
145
158
|
tag: t,
|
|
@@ -185,7 +198,10 @@ const ModelOptionRowInner = ({ model, index, active, selected, onSelect, onActiv
|
|
|
185
198
|
flexDirection: 'column',
|
|
186
199
|
alignItems: 'flex-end',
|
|
187
200
|
gap: 0.5,
|
|
188
|
-
pt: 0.125
|
|
201
|
+
pt: 0.125,
|
|
202
|
+
'@container (max-width: 380px)': {
|
|
203
|
+
display: 'none'
|
|
204
|
+
}
|
|
189
205
|
},
|
|
190
206
|
onClick: (e)=>e.stopPropagation(),
|
|
191
207
|
children: [
|
|
@@ -219,28 +235,51 @@ const ModelOptionRowInner = ({ model, index, active, selected, onSelect, onActiv
|
|
|
219
235
|
const ModelOptionRow = /*#__PURE__*/ external_react_default().memo(ModelOptionRowInner);
|
|
220
236
|
ModelOptionRow.displayName = 'ModelOptionRow';
|
|
221
237
|
function defaultRowActions(model, options = {}) {
|
|
222
|
-
const { i18n, onEdit } = options;
|
|
223
|
-
if (!onEdit) return null;
|
|
238
|
+
const { i18n, onEdit, onDelete } = options;
|
|
239
|
+
if (!onEdit && !onDelete) return null;
|
|
224
240
|
const isByo = 'BYOMAdded' === model.modelSubscriptionType || 'BYOMReplacedAlternative' === model.modelSubscriptionType || 'BYOMReplacedLikeForLike' === model.modelSubscriptionType;
|
|
225
241
|
if (!isByo) return null;
|
|
226
242
|
const editTitle = i18n ? i18n._({
|
|
227
243
|
id: 'modelPicker.row.editConfiguration',
|
|
228
244
|
message: 'Edit configuration'
|
|
229
245
|
}) : 'Edit configuration';
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
246
|
+
const deleteTitle = i18n ? i18n._({
|
|
247
|
+
id: 'modelPicker.row.deleteConfiguration',
|
|
248
|
+
message: 'Delete configuration'
|
|
249
|
+
}) : 'Delete configuration';
|
|
250
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
251
|
+
children: [
|
|
252
|
+
onEdit && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Tooltip_default(), {
|
|
253
|
+
title: editTitle,
|
|
254
|
+
arrow: true,
|
|
255
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(IconButton_default(), {
|
|
256
|
+
size: "small",
|
|
257
|
+
sx: {
|
|
258
|
+
color: 'inherit'
|
|
259
|
+
},
|
|
260
|
+
"aria-label": editTitle,
|
|
261
|
+
onClick: ()=>onEdit(model),
|
|
262
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(EditOutlined_default(), {
|
|
263
|
+
fontSize: "small"
|
|
264
|
+
})
|
|
265
|
+
})
|
|
266
|
+
}),
|
|
267
|
+
onDelete && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Tooltip_default(), {
|
|
268
|
+
title: deleteTitle,
|
|
269
|
+
arrow: true,
|
|
270
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(IconButton_default(), {
|
|
271
|
+
size: "small",
|
|
272
|
+
sx: {
|
|
273
|
+
color: 'inherit'
|
|
274
|
+
},
|
|
275
|
+
"aria-label": deleteTitle,
|
|
276
|
+
onClick: ()=>onDelete(model),
|
|
277
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DeleteOutline_default(), {
|
|
278
|
+
fontSize: "small"
|
|
279
|
+
})
|
|
280
|
+
})
|
|
242
281
|
})
|
|
243
|
-
|
|
282
|
+
]
|
|
244
283
|
});
|
|
245
284
|
}
|
|
246
285
|
exports.DENSE_OPTION_HEIGHT = __webpack_exports__.DENSE_OPTION_HEIGHT;
|
|
@@ -24,6 +24,7 @@ export declare const ModelOptionRow: React.NamedExoticComponent<ModelOptionRowPr
|
|
|
24
24
|
export declare function defaultRowActions(model: DiscoveryModel, options?: {
|
|
25
25
|
i18n?: PickerTranslator;
|
|
26
26
|
onEdit?: (model: DiscoveryModel) => void;
|
|
27
|
+
onDelete?: (model: DiscoveryModel) => void;
|
|
27
28
|
}): React.ReactNode;
|
|
28
29
|
export { FULL_OPTION_HEIGHT, DENSE_OPTION_HEIGHT };
|
|
29
30
|
//# sourceMappingURL=ModelOptionRow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelOptionRow.d.ts","sourceRoot":"","sources":["../../../../../src/material/components/ap-model-picker/primitives/ModelOptionRow.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ModelOptionRow.d.ts","sourceRoot":"","sources":["../../../../../src/material/components/ap-model-picker/primitives/ModelOptionRow.tsx"],"names":[],"mappings":"AAQA,OAA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C,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CACvC,GACL,KAAK,CAAC,SAAS,CAgDjB;AAED,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import DeleteOutline from "@mui/icons-material/DeleteOutline";
|
|
2
3
|
import EditOutlined from "@mui/icons-material/EditOutlined";
|
|
3
4
|
import Box from "@mui/material/Box";
|
|
4
5
|
import ButtonBase from "@mui/material/ButtonBase";
|
|
@@ -53,6 +54,7 @@ const ModelOptionRowInner = ({ model, index, active, selected, onSelect, onActiv
|
|
|
53
54
|
justifyContent: 'flex-start',
|
|
54
55
|
textAlign: 'left',
|
|
55
56
|
position: 'relative',
|
|
57
|
+
containerType: 'inline-size',
|
|
56
58
|
boxShadow: selected ? `inset 3px 0px 0px var(--color-primary, ${Colors.ColorBlue500})` : 'none',
|
|
57
59
|
backgroundColor: selected ? `var(--color-background-selected, ${Colors.ColorBlue050})` : active ? "var(--color-background-hover, rgba(82, 96, 105, 0.078))" : 'transparent',
|
|
58
60
|
'&:hover': {
|
|
@@ -92,7 +94,17 @@ const ModelOptionRowInner = ({ model, index, active, selected, onSelect, onActiv
|
|
|
92
94
|
}),
|
|
93
95
|
inlineTags.map((t)=>/*#__PURE__*/ jsx(Box, {
|
|
94
96
|
sx: {
|
|
95
|
-
flexShrink:
|
|
97
|
+
flexShrink: 1,
|
|
98
|
+
minWidth: 0,
|
|
99
|
+
overflow: 'hidden',
|
|
100
|
+
'& .MuiChip-root': {
|
|
101
|
+
maxWidth: '100%'
|
|
102
|
+
},
|
|
103
|
+
'& .MuiChip-label': {
|
|
104
|
+
overflow: 'hidden',
|
|
105
|
+
textOverflow: 'ellipsis',
|
|
106
|
+
whiteSpace: 'nowrap'
|
|
107
|
+
}
|
|
96
108
|
},
|
|
97
109
|
children: /*#__PURE__*/ jsx(ModelTagChip, {
|
|
98
110
|
tag: t,
|
|
@@ -138,7 +150,10 @@ const ModelOptionRowInner = ({ model, index, active, selected, onSelect, onActiv
|
|
|
138
150
|
flexDirection: 'column',
|
|
139
151
|
alignItems: 'flex-end',
|
|
140
152
|
gap: 0.5,
|
|
141
|
-
pt: 0.125
|
|
153
|
+
pt: 0.125,
|
|
154
|
+
'@container (max-width: 380px)': {
|
|
155
|
+
display: 'none'
|
|
156
|
+
}
|
|
142
157
|
},
|
|
143
158
|
onClick: (e)=>e.stopPropagation(),
|
|
144
159
|
children: [
|
|
@@ -172,28 +187,51 @@ const ModelOptionRowInner = ({ model, index, active, selected, onSelect, onActiv
|
|
|
172
187
|
const ModelOptionRow = /*#__PURE__*/ react.memo(ModelOptionRowInner);
|
|
173
188
|
ModelOptionRow.displayName = 'ModelOptionRow';
|
|
174
189
|
function defaultRowActions(model, options = {}) {
|
|
175
|
-
const { i18n, onEdit } = options;
|
|
176
|
-
if (!onEdit) return null;
|
|
190
|
+
const { i18n, onEdit, onDelete } = options;
|
|
191
|
+
if (!onEdit && !onDelete) return null;
|
|
177
192
|
const isByo = 'BYOMAdded' === model.modelSubscriptionType || 'BYOMReplacedAlternative' === model.modelSubscriptionType || 'BYOMReplacedLikeForLike' === model.modelSubscriptionType;
|
|
178
193
|
if (!isByo) return null;
|
|
179
194
|
const editTitle = i18n ? i18n._({
|
|
180
195
|
id: 'modelPicker.row.editConfiguration',
|
|
181
196
|
message: 'Edit configuration'
|
|
182
197
|
}) : 'Edit configuration';
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
198
|
+
const deleteTitle = i18n ? i18n._({
|
|
199
|
+
id: 'modelPicker.row.deleteConfiguration',
|
|
200
|
+
message: 'Delete configuration'
|
|
201
|
+
}) : 'Delete configuration';
|
|
202
|
+
return /*#__PURE__*/ jsxs(Fragment, {
|
|
203
|
+
children: [
|
|
204
|
+
onEdit && /*#__PURE__*/ jsx(Tooltip, {
|
|
205
|
+
title: editTitle,
|
|
206
|
+
arrow: true,
|
|
207
|
+
children: /*#__PURE__*/ jsx(IconButton, {
|
|
208
|
+
size: "small",
|
|
209
|
+
sx: {
|
|
210
|
+
color: 'inherit'
|
|
211
|
+
},
|
|
212
|
+
"aria-label": editTitle,
|
|
213
|
+
onClick: ()=>onEdit(model),
|
|
214
|
+
children: /*#__PURE__*/ jsx(EditOutlined, {
|
|
215
|
+
fontSize: "small"
|
|
216
|
+
})
|
|
217
|
+
})
|
|
218
|
+
}),
|
|
219
|
+
onDelete && /*#__PURE__*/ jsx(Tooltip, {
|
|
220
|
+
title: deleteTitle,
|
|
221
|
+
arrow: true,
|
|
222
|
+
children: /*#__PURE__*/ jsx(IconButton, {
|
|
223
|
+
size: "small",
|
|
224
|
+
sx: {
|
|
225
|
+
color: 'inherit'
|
|
226
|
+
},
|
|
227
|
+
"aria-label": deleteTitle,
|
|
228
|
+
onClick: ()=>onDelete(model),
|
|
229
|
+
children: /*#__PURE__*/ jsx(DeleteOutline, {
|
|
230
|
+
fontSize: "small"
|
|
231
|
+
})
|
|
232
|
+
})
|
|
195
233
|
})
|
|
196
|
-
|
|
234
|
+
]
|
|
197
235
|
});
|
|
198
236
|
}
|
|
199
237
|
export { DENSE_OPTION_HEIGHT, FULL_OPTION_HEIGHT, ModelOptionRow, defaultRowActions };
|
|
@@ -45,10 +45,12 @@ var Paper_default = /*#__PURE__*/ __webpack_require__.n(Paper_namespaceObject);
|
|
|
45
45
|
const Popper_namespaceObject = require("@mui/material/Popper");
|
|
46
46
|
var Popper_default = /*#__PURE__*/ __webpack_require__.n(Popper_namespaceObject);
|
|
47
47
|
const apollo_core_namespaceObject = require("@uipath/apollo-core");
|
|
48
|
-
const PickerPopup = ({ open, anchorEl, onClose, width, placement = 'bottom-start', zIndex = 1400, header, footer, className, 'data-testid': dataTestId, children })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Popper_default(), {
|
|
48
|
+
const PickerPopup = ({ open, anchorEl, onClose, width, placement = 'bottom-start', zIndex = 1400, header, footer, className, container, disablePortal, 'data-testid': dataTestId, children })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Popper_default(), {
|
|
49
49
|
open: open,
|
|
50
50
|
anchorEl: anchorEl,
|
|
51
51
|
placement: placement,
|
|
52
|
+
container: container,
|
|
53
|
+
disablePortal: disablePortal,
|
|
52
54
|
style: {
|
|
53
55
|
zIndex,
|
|
54
56
|
width: width ?? anchorEl?.clientWidth
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Popper from '@mui/material/Popper';
|
|
1
2
|
import type React from 'react';
|
|
2
3
|
export interface PickerPopupProps {
|
|
3
4
|
open: boolean;
|
|
@@ -9,6 +10,8 @@ export interface PickerPopupProps {
|
|
|
9
10
|
header?: React.ReactNode;
|
|
10
11
|
footer?: React.ReactNode;
|
|
11
12
|
className?: string;
|
|
13
|
+
container?: React.ComponentProps<typeof Popper>['container'];
|
|
14
|
+
disablePortal?: boolean;
|
|
12
15
|
'data-testid'?: string;
|
|
13
16
|
children: React.ReactNode;
|
|
14
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PickerPopup.d.ts","sourceRoot":"","sources":["../../../../../src/material/components/ap-model-picker/primitives/PickerPopup.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PickerPopup.d.ts","sourceRoot":"","sources":["../../../../../src/material/components/ap-model-picker/primitives/PickerPopup.tsx"],"names":[],"mappings":"AAGA,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAE1C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,cAAc,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS,CAAC;IAGpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEzB,SAAS,CAAC,EAAE,MAAM,CAAC;IAOnB,SAAS,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC;IAO7D,aAAa,CAAC,EAAE,OAAO,CAAC;IAGxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAYD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA8DlD,CAAC"}
|
|
@@ -4,10 +4,12 @@ import ClickAwayListener from "@mui/material/ClickAwayListener";
|
|
|
4
4
|
import Paper from "@mui/material/Paper";
|
|
5
5
|
import Popper from "@mui/material/Popper";
|
|
6
6
|
import { Colors } from "@uipath/apollo-core";
|
|
7
|
-
const PickerPopup = ({ open, anchorEl, onClose, width, placement = 'bottom-start', zIndex = 1400, header, footer, className, 'data-testid': dataTestId, children })=>/*#__PURE__*/ jsx(Popper, {
|
|
7
|
+
const PickerPopup = ({ open, anchorEl, onClose, width, placement = 'bottom-start', zIndex = 1400, header, footer, className, container, disablePortal, 'data-testid': dataTestId, children })=>/*#__PURE__*/ jsx(Popper, {
|
|
8
8
|
open: open,
|
|
9
9
|
anchorEl: anchorEl,
|
|
10
10
|
placement: placement,
|
|
11
|
+
container: container,
|
|
12
|
+
disablePortal: disablePortal,
|
|
11
13
|
style: {
|
|
12
14
|
zIndex,
|
|
13
15
|
width: width ?? anchorEl?.clientWidth
|
|
@@ -10,7 +10,7 @@ export interface ByomDetails {
|
|
|
10
10
|
integrationServiceConnectionId?: string;
|
|
11
11
|
defaultModel?: string;
|
|
12
12
|
customFieldMappings?: Record<string, string> | null;
|
|
13
|
-
|
|
13
|
+
byoConfigurationId?: string;
|
|
14
14
|
}
|
|
15
15
|
export interface ModelCostDetails {
|
|
16
16
|
inputTokenCost?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/material/components/ap-model-picker/types.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,aAAa,GACb,iBAAiB,GACjB,YAAY,GACZ,UAAU,GACV,QAAQ,GACR,MAAM,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAC7B,aAAa,GACb,yBAAyB,GACzB,yBAAyB,GACzB,WAAW,GACX,MAAM,CAAC;AAEX,MAAM,MAAM,cAAc,GACtB,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,IAAI,GACJ,QAAQ,GACR,MAAM,CAAC;AAEX,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC;IACnC,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAQpD,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/material/components/ap-model-picker/types.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,aAAa,GACb,iBAAiB,GACjB,YAAY,G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AAuB;IAEtC,KAAK,EAAE,MAAM,CAAC;IAEd,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,SAAS,EAAE,MAAM,CAAC;IAElB,QAAQ,EAAE,MAAM,CAAC;IAEjB,iBAAiB,EAAE,MAAM,CAAC;IAE1B,iBAAiB,EAAE,MAAM,CAAC;IAE1B,aAAa,CAAC,EAAE,MAAM,CAAC;IAKvB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B"}
|
|
@@ -30,6 +30,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
30
30
|
useCanManageByo: ()=>useCanManageByo
|
|
31
31
|
});
|
|
32
32
|
const external_react_namespaceObject = require("react");
|
|
33
|
+
const resolveToken = async (token)=>'function' == typeof token ? token() : token;
|
|
33
34
|
const FOLDERS_PAGE_SIZE = 100;
|
|
34
35
|
function useUserFolders(ctx) {
|
|
35
36
|
const [folders, setFolders] = (0, external_react_namespaceObject.useState)([]);
|
|
@@ -46,16 +47,18 @@ function useUserFolders(ctx) {
|
|
|
46
47
|
const base = (ctx.baseUrl ?? '').replace(/\/$/, '');
|
|
47
48
|
const url = `${base}/${ctx.tenantName}/orchestrator_/api/FoldersNavigation/GetFoldersForCurrentUser?take=${FOLDERS_PAGE_SIZE}`;
|
|
48
49
|
try {
|
|
50
|
+
const bearer = await resolveToken(ctx.token);
|
|
49
51
|
const res = await fetch(url, {
|
|
50
52
|
headers: {
|
|
51
|
-
Authorization: `Bearer ${
|
|
52
|
-
Accept: 'application/json'
|
|
53
|
+
Authorization: `Bearer ${bearer}`,
|
|
54
|
+
Accept: 'application/json',
|
|
55
|
+
'Content-Type': 'application/json'
|
|
53
56
|
},
|
|
54
57
|
signal: ctrl.signal
|
|
55
58
|
});
|
|
56
59
|
if (!res.ok) throw new Error(`FoldersNavigation API ${res.status} ${res.statusText}`);
|
|
57
60
|
const data = await res.json();
|
|
58
|
-
if (!ctrl.signal.aborted) setFolders((data.PageItems ?? []).map((f)=>({
|
|
61
|
+
if (!ctrl.signal.aborted) setFolders((data.PageItems ?? []).filter((f)=>'Personal' !== f.FolderType).map((f)=>({
|
|
59
62
|
id: f.Key,
|
|
60
63
|
label: f.DisplayName,
|
|
61
64
|
numericId: f.Id
|
|
@@ -115,13 +118,14 @@ function useCanManageByo(ctx) {
|
|
|
115
118
|
setError(null);
|
|
116
119
|
const base = (ctx.baseUrl ?? '').replace(/\/$/, '');
|
|
117
120
|
const url = `${base}/portal_/api/organization/UserOrganizationInfo`;
|
|
118
|
-
fetch(url, {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
resolveToken(ctx.token).then((bearer)=>fetch(url, {
|
|
122
|
+
headers: {
|
|
123
|
+
Authorization: `Bearer ${bearer}`,
|
|
124
|
+
Accept: 'application/json',
|
|
125
|
+
'Content-Type': 'application/json'
|
|
126
|
+
},
|
|
127
|
+
signal: ctrl.signal
|
|
128
|
+
})).then(async (res)=>{
|
|
125
129
|
if (!res.ok) throw new Error(`UserOrganizationInfo API ${res.status} ${res.statusText}`);
|
|
126
130
|
const data = await res.json();
|
|
127
131
|
if (!ctrl.signal.aborted) setCanManage(ORG_ADMIN_ROLES.includes(data.accountRoleType ?? ''));
|
|
@@ -167,6 +171,9 @@ function buildLlmConfigurationsUrl(ctx, options) {
|
|
|
167
171
|
const platformNavigation = {
|
|
168
172
|
assign (url) {
|
|
169
173
|
globalThis.location?.assign(url);
|
|
174
|
+
},
|
|
175
|
+
openInNewTab (url) {
|
|
176
|
+
globalThis.open?.(url, '_blank', 'noopener,noreferrer');
|
|
170
177
|
}
|
|
171
178
|
};
|
|
172
179
|
exports.buildLlmConfigurationsUrl = __webpack_exports__.buildLlmConfigurationsUrl;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { FolderSwitcherFolder } from './primitives/FolderSwitcher';
|
|
2
|
+
export type PlatformToken = string | (() => string | Promise<string>);
|
|
2
3
|
export interface PlatformRequestContext {
|
|
3
|
-
token:
|
|
4
|
+
token: PlatformToken;
|
|
4
5
|
baseUrl?: string;
|
|
5
6
|
tenantName: string;
|
|
6
7
|
tenantId?: string;
|
|
@@ -28,5 +29,6 @@ export interface LlmConfigurationsLinkOptions {
|
|
|
28
29
|
export declare function buildLlmConfigurationsUrl(ctx: PlatformRequestContext, options: LlmConfigurationsLinkOptions): string;
|
|
29
30
|
export declare const platformNavigation: {
|
|
30
31
|
assign(url: string): void;
|
|
32
|
+
openInNewTab(url: string): void;
|
|
31
33
|
};
|
|
32
34
|
//# sourceMappingURL=usePlatformAccess.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePlatformAccess.d.ts","sourceRoot":"","sources":["../../../../src/material/components/ap-model-picker/usePlatformAccess.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"usePlatformAccess.d.ts","sourceRoot":"","sources":["../../../../src/material/components/ap-model-picker/usePlatformAccess.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAexE,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;AAKtE,MAAM,WAAW,sBAAsB;IAErC,KAAK,EAAE,aAAa,CAAC;IAWrB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,UAAU,EAAE,MAAM,CAAC;IAOnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAMlB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAqBD,MAAM,WAAW,oBAAoB;IAMnC,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AA2BD,wBAAgB,cAAc,CAAC,GAAG,EAAE,sBAAsB,GAAG,IAAI,GAAG,oBAAoB,CAyEvF;AAeD,MAAM,WAAW,qBAAqB;IAMpC,SAAS,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAiBD,wBAAgB,eAAe,CAAC,GAAG,EAAE,sBAAsB,GAAG,IAAI,GAAG,qBAAqB,CAoEzF;AAMD,MAAM,WAAW,4BAA4B;IAE3C,MAAM,EAAE,KAAK,GAAG,MAAM,CAAC;IAEvB,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAcD,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,sBAAsB,EAC3B,OAAO,EAAE,4BAA4B,GACpC,MAAM,CAuBR;AAcD,eAAO,MAAM,kBAAkB;gBACjB,MAAM,GAAG,IAAI;sBAGP,MAAM,GAAG,IAAI;CAGhC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
2
|
+
const resolveToken = async (token)=>'function' == typeof token ? token() : token;
|
|
2
3
|
const FOLDERS_PAGE_SIZE = 100;
|
|
3
4
|
function useUserFolders(ctx) {
|
|
4
5
|
const [folders, setFolders] = useState([]);
|
|
@@ -15,16 +16,18 @@ function useUserFolders(ctx) {
|
|
|
15
16
|
const base = (ctx.baseUrl ?? '').replace(/\/$/, '');
|
|
16
17
|
const url = `${base}/${ctx.tenantName}/orchestrator_/api/FoldersNavigation/GetFoldersForCurrentUser?take=${FOLDERS_PAGE_SIZE}`;
|
|
17
18
|
try {
|
|
19
|
+
const bearer = await resolveToken(ctx.token);
|
|
18
20
|
const res = await fetch(url, {
|
|
19
21
|
headers: {
|
|
20
|
-
Authorization: `Bearer ${
|
|
21
|
-
Accept: 'application/json'
|
|
22
|
+
Authorization: `Bearer ${bearer}`,
|
|
23
|
+
Accept: 'application/json',
|
|
24
|
+
'Content-Type': 'application/json'
|
|
22
25
|
},
|
|
23
26
|
signal: ctrl.signal
|
|
24
27
|
});
|
|
25
28
|
if (!res.ok) throw new Error(`FoldersNavigation API ${res.status} ${res.statusText}`);
|
|
26
29
|
const data = await res.json();
|
|
27
|
-
if (!ctrl.signal.aborted) setFolders((data.PageItems ?? []).map((f)=>({
|
|
30
|
+
if (!ctrl.signal.aborted) setFolders((data.PageItems ?? []).filter((f)=>'Personal' !== f.FolderType).map((f)=>({
|
|
28
31
|
id: f.Key,
|
|
29
32
|
label: f.DisplayName,
|
|
30
33
|
numericId: f.Id
|
|
@@ -84,13 +87,14 @@ function useCanManageByo(ctx) {
|
|
|
84
87
|
setError(null);
|
|
85
88
|
const base = (ctx.baseUrl ?? '').replace(/\/$/, '');
|
|
86
89
|
const url = `${base}/portal_/api/organization/UserOrganizationInfo`;
|
|
87
|
-
fetch(url, {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
resolveToken(ctx.token).then((bearer)=>fetch(url, {
|
|
91
|
+
headers: {
|
|
92
|
+
Authorization: `Bearer ${bearer}`,
|
|
93
|
+
Accept: 'application/json',
|
|
94
|
+
'Content-Type': 'application/json'
|
|
95
|
+
},
|
|
96
|
+
signal: ctrl.signal
|
|
97
|
+
})).then(async (res)=>{
|
|
94
98
|
if (!res.ok) throw new Error(`UserOrganizationInfo API ${res.status} ${res.statusText}`);
|
|
95
99
|
const data = await res.json();
|
|
96
100
|
if (!ctrl.signal.aborted) setCanManage(ORG_ADMIN_ROLES.includes(data.accountRoleType ?? ''));
|
|
@@ -136,6 +140,9 @@ function buildLlmConfigurationsUrl(ctx, options) {
|
|
|
136
140
|
const platformNavigation = {
|
|
137
141
|
assign (url) {
|
|
138
142
|
globalThis.location?.assign(url);
|
|
143
|
+
},
|
|
144
|
+
openInNewTab (url) {
|
|
145
|
+
globalThis.open?.(url, '_blank', 'noopener,noreferrer');
|
|
139
146
|
}
|
|
140
147
|
};
|
|
141
148
|
export { buildLlmConfigurationsUrl, platformNavigation, useCanManageByo, useUserFolders };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/apollo-react",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "Apollo Design System - React component library with Material UI theming",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
"use-sync-external-store": "^1.2.0",
|
|
218
218
|
"zod": "^4.3.5",
|
|
219
219
|
"zustand": "^5.0.9",
|
|
220
|
-
"@uipath/apollo-core": "5.
|
|
220
|
+
"@uipath/apollo-core": "5.11.1",
|
|
221
221
|
"@uipath/apollo-wind": "2.29.0"
|
|
222
222
|
},
|
|
223
223
|
"devDependencies": {
|