@uipath/apollo-wind 2.87.0 → 2.88.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.
Files changed (56) hide show
  1. package/dist/components/ui/connection-picker/components/connection-actions-menu.cjs +129 -0
  2. package/dist/components/ui/connection-picker/components/connection-actions-menu.d.ts +21 -0
  3. package/dist/components/ui/connection-picker/components/connection-actions-menu.js +95 -0
  4. package/dist/components/ui/connection-picker/components/connection-status.cjs +81 -0
  5. package/dist/components/ui/connection-picker/components/connection-status.d.ts +22 -0
  6. package/dist/components/ui/connection-picker/components/connection-status.js +41 -0
  7. package/dist/components/ui/connection-picker/connection-picker.cjs +411 -0
  8. package/dist/components/ui/connection-picker/connection-picker.d.ts +12 -0
  9. package/dist/components/ui/connection-picker/connection-picker.js +374 -0
  10. package/dist/components/ui/connection-picker/index.cjs +39 -0
  11. package/dist/components/ui/connection-picker/index.d.ts +2 -0
  12. package/dist/components/ui/connection-picker/index.js +2 -0
  13. package/dist/components/ui/connection-picker/types.cjs +18 -0
  14. package/dist/components/ui/connection-picker/types.d.ts +124 -0
  15. package/dist/components/ui/connection-picker/types.js +0 -0
  16. package/dist/components/ui/folder-picker/folder-picker.cjs +4 -3
  17. package/dist/components/ui/folder-picker/folder-picker.js +4 -3
  18. package/dist/components/ui/index.cjs +270 -244
  19. package/dist/components/ui/index.d.ts +2 -0
  20. package/dist/components/ui/index.js +2 -0
  21. package/dist/components/ui/{folder-picker/components/folder-picker-empty-state.cjs → picker-empty-state.cjs} +11 -11
  22. package/dist/components/ui/picker-empty-state.d.ts +33 -0
  23. package/dist/components/ui/{folder-picker/components/folder-picker-empty-state.js → picker-empty-state.js} +9 -9
  24. package/dist/components/ui/resource-picker/command-value.cjs +48 -0
  25. package/dist/components/ui/resource-picker/command-value.d.ts +11 -0
  26. package/dist/components/ui/resource-picker/command-value.js +11 -0
  27. package/dist/components/ui/resource-picker/components/resource-group-header.cjs +102 -0
  28. package/dist/components/ui/resource-picker/components/resource-group-header.d.ts +44 -0
  29. package/dist/components/ui/resource-picker/components/resource-group-header.js +65 -0
  30. package/dist/components/ui/resource-picker/components/resource-picker-footer.cjs +55 -0
  31. package/dist/components/ui/resource-picker/components/resource-picker-footer.d.ts +14 -0
  32. package/dist/components/ui/resource-picker/components/resource-picker-footer.js +21 -0
  33. package/dist/components/ui/resource-picker/components/resource-row-actions-menu.cjs +136 -0
  34. package/dist/components/ui/resource-picker/components/resource-row-actions-menu.d.ts +30 -0
  35. package/dist/components/ui/resource-picker/components/resource-row-actions-menu.js +102 -0
  36. package/dist/components/ui/resource-picker/components/resource-row.cjs +115 -0
  37. package/dist/components/ui/resource-picker/components/resource-row.d.ts +16 -0
  38. package/dist/components/ui/resource-picker/components/resource-row.js +81 -0
  39. package/dist/components/ui/resource-picker/focus.cjs +66 -0
  40. package/dist/components/ui/resource-picker/focus.d.ts +1 -0
  41. package/dist/components/ui/resource-picker/focus.js +32 -0
  42. package/dist/components/ui/resource-picker/index.cjs +42 -0
  43. package/dist/components/ui/resource-picker/index.d.ts +2 -0
  44. package/dist/components/ui/resource-picker/index.js +2 -0
  45. package/dist/components/ui/resource-picker/resource-picker.cjs +606 -0
  46. package/dist/components/ui/resource-picker/resource-picker.d.ts +40 -0
  47. package/dist/components/ui/resource-picker/resource-picker.js +566 -0
  48. package/dist/components/ui/resource-picker/types.cjs +50 -0
  49. package/dist/components/ui/resource-picker/types.d.ts +209 -0
  50. package/dist/components/ui/resource-picker/types.js +16 -0
  51. package/dist/index.cjs +24 -7
  52. package/dist/index.d.ts +4 -0
  53. package/dist/index.js +3 -1
  54. package/dist/styles.css +75 -29
  55. package/package.json +1 -1
  56. package/dist/components/ui/folder-picker/components/folder-picker-empty-state.d.ts +0 -26
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ ConnectionActionsMenu: ()=>ConnectionActionsMenu
28
+ });
29
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
+ const external_lucide_react_namespaceObject = require("lucide-react");
31
+ const external_react_namespaceObject = require("react");
32
+ const external_dropdown_menu_cjs_namespaceObject = require("../../dropdown-menu.cjs");
33
+ const field_addon_button_cjs_namespaceObject = require("../../field-addons/field-addon-button.cjs");
34
+ const external_input_group_cjs_namespaceObject = require("../../input-group.cjs");
35
+ const index_cjs_namespaceObject = require("../../../../lib/index.cjs");
36
+ function ConnectionActionsMenu({ onRefreshSchema, onEdit, strings }) {
37
+ const [open, setOpen] = (0, external_react_namespaceObject.useState)(false);
38
+ const [state, setState] = (0, external_react_namespaceObject.useState)('idle');
39
+ const closeTimer = (0, external_react_namespaceObject.useRef)(void 0);
40
+ const mounted = (0, external_react_namespaceObject.useRef)(true);
41
+ const openRef = (0, external_react_namespaceObject.useRef)(false);
42
+ (0, external_react_namespaceObject.useEffect)(()=>{
43
+ mounted.current = true;
44
+ return ()=>{
45
+ mounted.current = false;
46
+ window.clearTimeout(closeTimer.current);
47
+ };
48
+ }, []);
49
+ const handleOpenChange = (next)=>{
50
+ openRef.current = next;
51
+ setOpen(next);
52
+ if (!next && 'refreshing' !== state) {
53
+ window.clearTimeout(closeTimer.current);
54
+ setState('idle');
55
+ }
56
+ };
57
+ const refresh = async ()=>{
58
+ if (!onRefreshSchema || 'idle' !== state) return;
59
+ setState('refreshing');
60
+ try {
61
+ await onRefreshSchema();
62
+ } catch {
63
+ if (mounted.current) setState('idle');
64
+ return;
65
+ }
66
+ if (!mounted.current) return;
67
+ if (!openRef.current) return void setState('idle');
68
+ setState('done');
69
+ closeTimer.current = window.setTimeout(()=>{
70
+ openRef.current = false;
71
+ setOpen(false);
72
+ setState('idle');
73
+ }, 900);
74
+ };
75
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_dropdown_menu_cjs_namespaceObject.DropdownMenu, {
76
+ open: open,
77
+ onOpenChange: handleOpenChange,
78
+ children: [
79
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_dropdown_menu_cjs_namespaceObject.DropdownMenuTrigger, {
80
+ asChild: true,
81
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupButton, {
82
+ size: "3xs",
83
+ "aria-label": strings.optionsLabel,
84
+ className: field_addon_button_cjs_namespaceObject.FIELD_ADDON_BUTTON_CLASS,
85
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.MoreHorizontal, {})
86
+ })
87
+ }),
88
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_dropdown_menu_cjs_namespaceObject.DropdownMenuContent, {
89
+ align: "end",
90
+ className: "min-w-44",
91
+ children: [
92
+ onEdit && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_dropdown_menu_cjs_namespaceObject.DropdownMenuItem, {
93
+ disabled: 'refreshing' === state,
94
+ onSelect: onEdit,
95
+ children: [
96
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Pencil, {}),
97
+ strings.editConnection
98
+ ]
99
+ }),
100
+ onRefreshSchema && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_dropdown_menu_cjs_namespaceObject.DropdownMenuItem, {
101
+ onSelect: (event)=>{
102
+ event.preventDefault();
103
+ refresh();
104
+ },
105
+ "aria-busy": 'refreshing' === state || void 0,
106
+ children: [
107
+ 'done' === state ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Check, {
108
+ className: "text-success"
109
+ }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.RefreshCw, {
110
+ className: (0, index_cjs_namespaceObject.cn)('refreshing' === state && 'animate-spin')
111
+ }),
112
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
113
+ "aria-live": "polite",
114
+ children: 'refreshing' === state ? strings.refreshingSchema : 'done' === state ? strings.schemaRefreshed : strings.refreshSchema
115
+ })
116
+ ]
117
+ })
118
+ ]
119
+ })
120
+ ]
121
+ });
122
+ }
123
+ exports.ConnectionActionsMenu = __webpack_exports__.ConnectionActionsMenu;
124
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
125
+ "ConnectionActionsMenu"
126
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
127
+ Object.defineProperty(exports, '__esModule', {
128
+ value: true
129
+ });
@@ -0,0 +1,21 @@
1
+ import type { ConnectionPickerStrings } from '../types';
2
+ export interface ConnectionActionsMenuProps {
3
+ onRefreshSchema?: () => void | Promise<void>;
4
+ /**
5
+ * Edits the chosen connection. The row's Edit control is a pointer shortcut
6
+ * inside an atomic listbox option, so this is the route that reaches it from
7
+ * the keyboard and assistive technology.
8
+ */
9
+ onEdit?: () => void;
10
+ strings: Pick<ConnectionPickerStrings, 'optionsLabel' | 'editConnection' | 'refreshSchema' | 'refreshingSchema' | 'schemaRefreshed'>;
11
+ }
12
+ /**
13
+ * The field's menu of operations on the chosen connection.
14
+ *
15
+ * Editing closes the menu and hands off at once. The refresh item keeps the
16
+ * menu open while it runs, so its progress and its outcome are seen in the
17
+ * place the action was taken, then the menu closes on its own. The menu can
18
+ * still be dismissed meanwhile: the refresh carries on, and reopening the
19
+ * menu shows it still in progress.
20
+ */
21
+ export declare function ConnectionActionsMenu({ onRefreshSchema, onEdit, strings, }: ConnectionActionsMenuProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,95 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Check, MoreHorizontal, Pencil, RefreshCw } from "lucide-react";
3
+ import { useEffect, useRef, useState } from "react";
4
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../../dropdown-menu.js";
5
+ import { FIELD_ADDON_BUTTON_CLASS } from "../../field-addons/field-addon-button.js";
6
+ import { InputGroupButton } from "../../input-group.js";
7
+ import { cn } from "../../../../lib/index.js";
8
+ function ConnectionActionsMenu({ onRefreshSchema, onEdit, strings }) {
9
+ const [open, setOpen] = useState(false);
10
+ const [state, setState] = useState('idle');
11
+ const closeTimer = useRef(void 0);
12
+ const mounted = useRef(true);
13
+ const openRef = useRef(false);
14
+ useEffect(()=>{
15
+ mounted.current = true;
16
+ return ()=>{
17
+ mounted.current = false;
18
+ window.clearTimeout(closeTimer.current);
19
+ };
20
+ }, []);
21
+ const handleOpenChange = (next)=>{
22
+ openRef.current = next;
23
+ setOpen(next);
24
+ if (!next && 'refreshing' !== state) {
25
+ window.clearTimeout(closeTimer.current);
26
+ setState('idle');
27
+ }
28
+ };
29
+ const refresh = async ()=>{
30
+ if (!onRefreshSchema || 'idle' !== state) return;
31
+ setState('refreshing');
32
+ try {
33
+ await onRefreshSchema();
34
+ } catch {
35
+ if (mounted.current) setState('idle');
36
+ return;
37
+ }
38
+ if (!mounted.current) return;
39
+ if (!openRef.current) return void setState('idle');
40
+ setState('done');
41
+ closeTimer.current = window.setTimeout(()=>{
42
+ openRef.current = false;
43
+ setOpen(false);
44
+ setState('idle');
45
+ }, 900);
46
+ };
47
+ return /*#__PURE__*/ jsxs(DropdownMenu, {
48
+ open: open,
49
+ onOpenChange: handleOpenChange,
50
+ children: [
51
+ /*#__PURE__*/ jsx(DropdownMenuTrigger, {
52
+ asChild: true,
53
+ children: /*#__PURE__*/ jsx(InputGroupButton, {
54
+ size: "3xs",
55
+ "aria-label": strings.optionsLabel,
56
+ className: FIELD_ADDON_BUTTON_CLASS,
57
+ children: /*#__PURE__*/ jsx(MoreHorizontal, {})
58
+ })
59
+ }),
60
+ /*#__PURE__*/ jsxs(DropdownMenuContent, {
61
+ align: "end",
62
+ className: "min-w-44",
63
+ children: [
64
+ onEdit && /*#__PURE__*/ jsxs(DropdownMenuItem, {
65
+ disabled: 'refreshing' === state,
66
+ onSelect: onEdit,
67
+ children: [
68
+ /*#__PURE__*/ jsx(Pencil, {}),
69
+ strings.editConnection
70
+ ]
71
+ }),
72
+ onRefreshSchema && /*#__PURE__*/ jsxs(DropdownMenuItem, {
73
+ onSelect: (event)=>{
74
+ event.preventDefault();
75
+ refresh();
76
+ },
77
+ "aria-busy": 'refreshing' === state || void 0,
78
+ children: [
79
+ 'done' === state ? /*#__PURE__*/ jsx(Check, {
80
+ className: "text-success"
81
+ }) : /*#__PURE__*/ jsx(RefreshCw, {
82
+ className: cn('refreshing' === state && 'animate-spin')
83
+ }),
84
+ /*#__PURE__*/ jsx("span", {
85
+ "aria-live": "polite",
86
+ children: 'refreshing' === state ? strings.refreshingSchema : 'done' === state ? strings.schemaRefreshed : strings.refreshSchema
87
+ })
88
+ ]
89
+ })
90
+ ]
91
+ })
92
+ ]
93
+ });
94
+ }
95
+ export { ConnectionActionsMenu };
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ STATUS_LABELS: ()=>STATUS_LABELS,
28
+ ConnectionStatusLine: ()=>ConnectionStatusLine,
29
+ ConnectionStatusDot: ()=>ConnectionStatusDot
30
+ });
31
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
32
+ const index_cjs_namespaceObject = require("../../../../lib/index.cjs");
33
+ const STATUS_LABELS = {
34
+ connected: 'Connected',
35
+ warning: 'Needs attention',
36
+ broken: 'Broken'
37
+ };
38
+ const DOT_CLASSES = {
39
+ connected: 'bg-success',
40
+ warning: 'bg-warning',
41
+ broken: 'bg-error'
42
+ };
43
+ const TEXT_CLASSES = {
44
+ connected: 'text-success',
45
+ warning: 'text-warning',
46
+ broken: 'text-error'
47
+ };
48
+ function ConnectionStatusDot({ status, label, className }) {
49
+ const name = label ?? STATUS_LABELS[status];
50
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
51
+ role: "img",
52
+ "aria-label": name,
53
+ title: name,
54
+ className: (0, index_cjs_namespaceObject.cn)('size-2 shrink-0 rounded-full', DOT_CLASSES[status], className)
55
+ });
56
+ }
57
+ function ConnectionStatusLine({ status, label }) {
58
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
59
+ className: (0, index_cjs_namespaceObject.cn)('flex min-w-0 items-center gap-1.5 font-medium', TEXT_CLASSES[status]),
60
+ children: [
61
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
62
+ className: "size-1.5 shrink-0 rounded-full bg-current"
63
+ }),
64
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
65
+ className: "min-w-0 truncate",
66
+ children: label ?? STATUS_LABELS[status]
67
+ })
68
+ ]
69
+ });
70
+ }
71
+ exports.ConnectionStatusDot = __webpack_exports__.ConnectionStatusDot;
72
+ exports.ConnectionStatusLine = __webpack_exports__.ConnectionStatusLine;
73
+ exports.STATUS_LABELS = __webpack_exports__.STATUS_LABELS;
74
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
75
+ "ConnectionStatusDot",
76
+ "ConnectionStatusLine",
77
+ "STATUS_LABELS"
78
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
79
+ Object.defineProperty(exports, '__esModule', {
80
+ value: true
81
+ });
@@ -0,0 +1,22 @@
1
+ import type { ConnectionStatus } from '../types';
2
+ /**
3
+ * Fallback names for each state. `warning` covers any degraded state, so its
4
+ * name stays generic; a connection's own reason names it more precisely.
5
+ */
6
+ export declare const STATUS_LABELS: Record<ConnectionStatus, string>;
7
+ export interface ConnectionStatusDotProps {
8
+ status: ConnectionStatus;
9
+ /** Spoken in place of the dot. Defaults to the status label. */
10
+ label?: string;
11
+ className?: string;
12
+ }
13
+ /** The field's leading glyph: health at a glance, named for assistive technology. */
14
+ export declare function ConnectionStatusDot({ status, label, className }: ConnectionStatusDotProps): import("react/jsx-runtime").JSX.Element;
15
+ /**
16
+ * A row's second line. The dot takes the text colour, so the pair can never
17
+ * disagree about which state they show.
18
+ */
19
+ export declare function ConnectionStatusLine({ status, label, }: {
20
+ status: ConnectionStatus;
21
+ label?: string;
22
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,41 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../../../../lib/index.js";
3
+ const STATUS_LABELS = {
4
+ connected: 'Connected',
5
+ warning: 'Needs attention',
6
+ broken: 'Broken'
7
+ };
8
+ const DOT_CLASSES = {
9
+ connected: 'bg-success',
10
+ warning: 'bg-warning',
11
+ broken: 'bg-error'
12
+ };
13
+ const TEXT_CLASSES = {
14
+ connected: 'text-success',
15
+ warning: 'text-warning',
16
+ broken: 'text-error'
17
+ };
18
+ function ConnectionStatusDot({ status, label, className }) {
19
+ const name = label ?? STATUS_LABELS[status];
20
+ return /*#__PURE__*/ jsx("span", {
21
+ role: "img",
22
+ "aria-label": name,
23
+ title: name,
24
+ className: cn('size-2 shrink-0 rounded-full', DOT_CLASSES[status], className)
25
+ });
26
+ }
27
+ function ConnectionStatusLine({ status, label }) {
28
+ return /*#__PURE__*/ jsxs("span", {
29
+ className: cn('flex min-w-0 items-center gap-1.5 font-medium', TEXT_CLASSES[status]),
30
+ children: [
31
+ /*#__PURE__*/ jsx("span", {
32
+ className: "size-1.5 shrink-0 rounded-full bg-current"
33
+ }),
34
+ /*#__PURE__*/ jsx("span", {
35
+ className: "min-w-0 truncate",
36
+ children: label ?? STATUS_LABELS[status]
37
+ })
38
+ ]
39
+ });
40
+ }
41
+ export { ConnectionStatusDot, ConnectionStatusLine, STATUS_LABELS };