@uipath/apollo-wind 2.70.0 → 2.72.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/README.md +25 -0
- package/dist/components/forms/field-control.cjs +3 -2
- package/dist/components/forms/field-control.js +3 -2
- package/dist/components/forms/validation-converter.cjs +14 -5
- package/dist/components/forms/validation-converter.js +14 -5
- package/dist/components/ui/chat-hero.cjs +244 -0
- package/dist/components/ui/chat-hero.d.ts +51 -0
- package/dist/components/ui/chat-hero.js +189 -0
- package/dist/components/ui/date-picker.cjs +6 -5
- package/dist/components/ui/date-picker.js +7 -6
- package/dist/components/ui/datetime-picker.cjs +7 -10
- package/dist/components/ui/datetime-picker.js +8 -11
- package/dist/components/ui/index.cjs +629 -413
- package/dist/components/ui/index.d.ts +6 -2
- package/dist/components/ui/index.js +7 -3
- package/dist/components/ui/prompt-editor/components/MarkdownPreview.cjs +4 -2
- package/dist/components/ui/prompt-editor/components/MarkdownPreview.js +4 -2
- package/dist/components/ui/prompt-editor/components/TokenPill.cjs +13 -68
- package/dist/components/ui/prompt-editor/components/TokenPill.js +14 -69
- package/dist/components/ui/prompt-editor/types.cjs +2 -14
- package/dist/components/ui/prompt-editor/types.d.ts +14 -1
- package/dist/components/ui/prompt-editor/types.js +2 -14
- package/dist/components/ui/prompt-suggestions.cjs +133 -0
- package/dist/components/ui/prompt-suggestions.d.ts +52 -0
- package/dist/components/ui/prompt-suggestions.js +90 -0
- package/dist/components/ui/quick-form-field/components/field-header.cjs +9 -4
- package/dist/components/ui/quick-form-field/components/field-header.d.ts +4 -1
- package/dist/components/ui/quick-form-field/components/field-header.js +9 -4
- package/dist/components/ui/quick-form-field/components/lock-toggle-button.cjs +2 -2
- package/dist/components/ui/quick-form-field/components/lock-toggle-button.d.ts +5 -4
- package/dist/components/ui/quick-form-field/components/lock-toggle-button.js +2 -2
- package/dist/components/ui/quick-form-field/index.d.ts +1 -1
- package/dist/components/ui/quick-form-field/quick-form-field.cjs +158 -222
- package/dist/components/ui/quick-form-field/quick-form-field.d.ts +6 -4
- package/dist/components/ui/quick-form-field/quick-form-field.js +159 -223
- package/dist/components/ui/quick-form-field/types.cjs +2 -2
- package/dist/components/ui/quick-form-field/types.d.ts +39 -32
- package/dist/components/ui/quick-form-field/types.js +2 -2
- package/dist/components/ui/quick-form-field/utils.cjs +5 -59
- package/dist/components/ui/quick-form-field/utils.d.ts +2 -24
- package/dist/components/ui/quick-form-field/utils.js +3 -48
- package/dist/components/ui/reference-chip-colors.cjs +49 -0
- package/dist/components/ui/reference-chip-colors.d.ts +15 -0
- package/dist/components/ui/reference-chip-colors.js +15 -0
- package/dist/components/ui/reference-chip.cjs +104 -0
- package/dist/components/ui/reference-chip.d.ts +17 -0
- package/dist/components/ui/reference-chip.js +70 -0
- package/dist/components/ui/variable-value-control.cjs +5 -3
- package/dist/components/ui/variable-value-control.js +5 -3
- package/dist/index.cjs +50 -4
- package/dist/index.d.ts +12 -6
- package/dist/index.js +7 -3
- package/dist/lib/date-value.cjs +46 -0
- package/dist/lib/date-value.d.ts +8 -0
- package/dist/lib/date-value.js +12 -0
- package/dist/styles.css +110 -43
- package/dist/tailwind.utilities.css +15 -0
- package/package.json +1 -1
- package/dist/components/custom/chat-first-experience.cjs +0 -87
- package/dist/components/custom/chat-first-experience.d.ts +0 -24
- package/dist/components/custom/chat-first-experience.js +0 -53
- package/dist/components/custom/chat-prompt-suggestions.cjs +0 -49
- package/dist/components/custom/chat-prompt-suggestions.d.ts +0 -18
- package/dist/components/custom/chat-prompt-suggestions.js +0 -15
|
@@ -42,6 +42,7 @@ const external_input_group_context_cjs_namespaceObject = require("./input-group-
|
|
|
42
42
|
const date_picker_DatePicker = /*#__PURE__*/ external_react_namespaceObject.forwardRef(function({ id, value, onValueChange, disabled, placeholder = 'Pick a date', className, calendarProps, error, errorId, 'aria-labelledby': ariaLabelledBy, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage }, ref) {
|
|
43
43
|
const generatedId = external_react_namespaceObject.useId();
|
|
44
44
|
const validationId = errorId ?? `${id ?? `date-picker-${generatedId.replace(/:/g, '')}`}-error`;
|
|
45
|
+
const date = value instanceof Date && (0, external_date_fns_namespaceObject.isValid)(value) ? value : void 0;
|
|
45
46
|
const group = (0, external_input_group_context_cjs_namespaceObject.useInputGroup)();
|
|
46
47
|
const grouped = group.inGroup;
|
|
47
48
|
const validation = (0, external_input_group_context_cjs_namespaceObject.useControlValidation)(group, {
|
|
@@ -53,7 +54,7 @@ const date_picker_DatePicker = /*#__PURE__*/ external_react_namespaceObject.forw
|
|
|
53
54
|
});
|
|
54
55
|
const triggerProps = {
|
|
55
56
|
id,
|
|
56
|
-
'aria-label': id || ariaLabelledBy ? void 0 :
|
|
57
|
+
'aria-label': id || ariaLabelledBy ? void 0 : date ? `Selected date: ${(0, external_date_fns_namespaceObject.format)(date, 'PPP')}` : placeholder,
|
|
57
58
|
'aria-labelledby': ariaLabelledBy,
|
|
58
59
|
...validation.aria,
|
|
59
60
|
disabled: disabled || group.disabled
|
|
@@ -68,9 +69,9 @@ const date_picker_DatePicker = /*#__PURE__*/ external_react_namespaceObject.forw
|
|
|
68
69
|
...triggerProps,
|
|
69
70
|
className: className,
|
|
70
71
|
placeholder: placeholder,
|
|
71
|
-
children:
|
|
72
|
+
children: date && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
72
73
|
className: "truncate",
|
|
73
|
-
children: (0, external_date_fns_namespaceObject.format)(
|
|
74
|
+
children: (0, external_date_fns_namespaceObject.format)(date, 'PPP')
|
|
74
75
|
})
|
|
75
76
|
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger, {
|
|
76
77
|
asChild: true,
|
|
@@ -81,7 +82,7 @@ const date_picker_DatePicker = /*#__PURE__*/ external_react_namespaceObject.forw
|
|
|
81
82
|
className: (0, index_cjs_namespaceObject.cn)('w-full justify-start text-left font-normal [&>svg]:text-foreground-muted hover:[&>svg]:text-accent-foreground', 'future:h-10 future:rounded-xl future:border-0 future:bg-surface-overlay future:px-4 future:gap-4 future:text-foreground future:hover:bg-surface-hover future:focus-visible:ring-offset-2 future:focus-visible:ring-offset-background', className),
|
|
82
83
|
children: [
|
|
83
84
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.CalendarIcon, {}),
|
|
84
|
-
|
|
85
|
+
date ? (0, external_date_fns_namespaceObject.format)(date, 'PPP') : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
85
86
|
className: "text-foreground-muted",
|
|
86
87
|
children: placeholder
|
|
87
88
|
})
|
|
@@ -93,7 +94,7 @@ const date_picker_DatePicker = /*#__PURE__*/ external_react_namespaceObject.forw
|
|
|
93
94
|
align: grouped ? 'start' : void 0,
|
|
94
95
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_calendar_cjs_namespaceObject.Calendar, {
|
|
95
96
|
mode: "single",
|
|
96
|
-
selected:
|
|
97
|
+
selected: date,
|
|
97
98
|
onSelect: onValueChange,
|
|
98
99
|
initialFocus: true,
|
|
99
100
|
...calendarProps
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { format } from "date-fns";
|
|
3
|
+
import { format, isValid } from "date-fns";
|
|
4
4
|
import { CalendarIcon } from "lucide-react";
|
|
5
5
|
import { forwardRef, useId } from "react";
|
|
6
6
|
import { Button } from "./button.js";
|
|
@@ -13,6 +13,7 @@ import { useControlValidation, useInputGroup } from "./input-group-context.js";
|
|
|
13
13
|
const date_picker_DatePicker = /*#__PURE__*/ forwardRef(function({ id, value, onValueChange, disabled, placeholder = 'Pick a date', className, calendarProps, error, errorId, 'aria-labelledby': ariaLabelledBy, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage }, ref) {
|
|
14
14
|
const generatedId = useId();
|
|
15
15
|
const validationId = errorId ?? `${id ?? `date-picker-${generatedId.replace(/:/g, '')}`}-error`;
|
|
16
|
+
const date = value instanceof Date && isValid(value) ? value : void 0;
|
|
16
17
|
const group = useInputGroup();
|
|
17
18
|
const grouped = group.inGroup;
|
|
18
19
|
const validation = useControlValidation(group, {
|
|
@@ -24,7 +25,7 @@ const date_picker_DatePicker = /*#__PURE__*/ forwardRef(function({ id, value, on
|
|
|
24
25
|
});
|
|
25
26
|
const triggerProps = {
|
|
26
27
|
id,
|
|
27
|
-
'aria-label': id || ariaLabelledBy ? void 0 :
|
|
28
|
+
'aria-label': id || ariaLabelledBy ? void 0 : date ? `Selected date: ${format(date, 'PPP')}` : placeholder,
|
|
28
29
|
'aria-labelledby': ariaLabelledBy,
|
|
29
30
|
...validation.aria,
|
|
30
31
|
disabled: disabled || group.disabled
|
|
@@ -39,9 +40,9 @@ const date_picker_DatePicker = /*#__PURE__*/ forwardRef(function({ id, value, on
|
|
|
39
40
|
...triggerProps,
|
|
40
41
|
className: className,
|
|
41
42
|
placeholder: placeholder,
|
|
42
|
-
children:
|
|
43
|
+
children: date && /*#__PURE__*/ jsx("span", {
|
|
43
44
|
className: "truncate",
|
|
44
|
-
children: format(
|
|
45
|
+
children: format(date, 'PPP')
|
|
45
46
|
})
|
|
46
47
|
}) : /*#__PURE__*/ jsx(PopoverTrigger, {
|
|
47
48
|
asChild: true,
|
|
@@ -52,7 +53,7 @@ const date_picker_DatePicker = /*#__PURE__*/ forwardRef(function({ id, value, on
|
|
|
52
53
|
className: cn('w-full justify-start text-left font-normal [&>svg]:text-foreground-muted hover:[&>svg]:text-accent-foreground', 'future:h-10 future:rounded-xl future:border-0 future:bg-surface-overlay future:px-4 future:gap-4 future:text-foreground future:hover:bg-surface-hover future:focus-visible:ring-offset-2 future:focus-visible:ring-offset-background', className),
|
|
53
54
|
children: [
|
|
54
55
|
/*#__PURE__*/ jsx(CalendarIcon, {}),
|
|
55
|
-
|
|
56
|
+
date ? format(date, 'PPP') : /*#__PURE__*/ jsx("span", {
|
|
56
57
|
className: "text-foreground-muted",
|
|
57
58
|
children: placeholder
|
|
58
59
|
})
|
|
@@ -64,7 +65,7 @@ const date_picker_DatePicker = /*#__PURE__*/ forwardRef(function({ id, value, on
|
|
|
64
65
|
align: grouped ? 'start' : void 0,
|
|
65
66
|
children: /*#__PURE__*/ jsx(Calendar, {
|
|
66
67
|
mode: "single",
|
|
67
|
-
selected:
|
|
68
|
+
selected: date,
|
|
68
69
|
onSelect: onValueChange,
|
|
69
70
|
initialFocus: true,
|
|
70
71
|
...calendarProps
|
|
@@ -47,19 +47,15 @@ const datetime_picker_DateTimePicker = /*#__PURE__*/ external_react_namespaceObj
|
|
|
47
47
|
};
|
|
48
48
|
const generatedId = external_react_namespaceObject.useId();
|
|
49
49
|
const validationId = errorId ?? `${id ?? `datetime-picker-${generatedId.replace(/:/g, '')}`}-error`;
|
|
50
|
-
const
|
|
51
|
-
const [
|
|
52
|
-
const
|
|
50
|
+
const date = value instanceof Date && (0, external_date_fns_namespaceObject.isValid)(value) ? value : void 0;
|
|
51
|
+
const [selectedDate, setSelectedDate] = external_react_namespaceObject.useState(date);
|
|
52
|
+
const [timeValue, setTimeValue] = external_react_namespaceObject.useState(date ? (0, external_date_fns_namespaceObject.format)(date, 'HH:mm') : '');
|
|
53
|
+
const valueTime = date?.getTime();
|
|
53
54
|
const [seededTime, setSeededTime] = external_react_namespaceObject.useState(valueTime);
|
|
54
55
|
if (!Object.is(valueTime, seededTime)) {
|
|
55
56
|
setSeededTime(valueTime);
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
setTimeValue('');
|
|
59
|
-
} else if (!Number.isNaN(valueTime)) {
|
|
60
|
-
setSelectedDate(value);
|
|
61
|
-
setTimeValue((0, external_date_fns_namespaceObject.format)(value, 'HH:mm'));
|
|
62
|
-
}
|
|
57
|
+
setSelectedDate(date);
|
|
58
|
+
setTimeValue(date ? (0, external_date_fns_namespaceObject.format)(date, 'HH:mm') : '');
|
|
63
59
|
}
|
|
64
60
|
const handleDateSelect = (date)=>{
|
|
65
61
|
if (!date) return;
|
|
@@ -67,6 +63,7 @@ const datetime_picker_DateTimePicker = /*#__PURE__*/ external_react_namespaceObj
|
|
|
67
63
|
date.setHours(selectedDate.getHours());
|
|
68
64
|
date.setMinutes(selectedDate.getMinutes());
|
|
69
65
|
date.setSeconds(selectedDate.getSeconds());
|
|
66
|
+
date.setMilliseconds(selectedDate.getMilliseconds());
|
|
70
67
|
}
|
|
71
68
|
setSelectedDate(date);
|
|
72
69
|
onValueChange?.(date);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { format } from "date-fns";
|
|
2
|
+
import { format, isValid } from "date-fns";
|
|
3
3
|
import { CalendarIcon, Clock } from "lucide-react";
|
|
4
4
|
import { forwardRef, useId, useState } from "react";
|
|
5
5
|
import { Button } from "./button.js";
|
|
@@ -19,19 +19,15 @@ const datetime_picker_DateTimePicker = /*#__PURE__*/ forwardRef(function({ value
|
|
|
19
19
|
};
|
|
20
20
|
const generatedId = useId();
|
|
21
21
|
const validationId = errorId ?? `${id ?? `datetime-picker-${generatedId.replace(/:/g, '')}`}-error`;
|
|
22
|
-
const
|
|
23
|
-
const [
|
|
24
|
-
const
|
|
22
|
+
const date = value instanceof Date && isValid(value) ? value : void 0;
|
|
23
|
+
const [selectedDate, setSelectedDate] = useState(date);
|
|
24
|
+
const [timeValue, setTimeValue] = useState(date ? format(date, 'HH:mm') : '');
|
|
25
|
+
const valueTime = date?.getTime();
|
|
25
26
|
const [seededTime, setSeededTime] = useState(valueTime);
|
|
26
27
|
if (!Object.is(valueTime, seededTime)) {
|
|
27
28
|
setSeededTime(valueTime);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
setTimeValue('');
|
|
31
|
-
} else if (!Number.isNaN(valueTime)) {
|
|
32
|
-
setSelectedDate(value);
|
|
33
|
-
setTimeValue(format(value, 'HH:mm'));
|
|
34
|
-
}
|
|
29
|
+
setSelectedDate(date);
|
|
30
|
+
setTimeValue(date ? format(date, 'HH:mm') : '');
|
|
35
31
|
}
|
|
36
32
|
const handleDateSelect = (date)=>{
|
|
37
33
|
if (!date) return;
|
|
@@ -39,6 +35,7 @@ const datetime_picker_DateTimePicker = /*#__PURE__*/ forwardRef(function({ value
|
|
|
39
35
|
date.setHours(selectedDate.getHours());
|
|
40
36
|
date.setMinutes(selectedDate.getMinutes());
|
|
41
37
|
date.setSeconds(selectedDate.getSeconds());
|
|
38
|
+
date.setMilliseconds(selectedDate.getMilliseconds());
|
|
42
39
|
}
|
|
43
40
|
setSelectedDate(date);
|
|
44
41
|
onValueChange?.(date);
|