@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.
Files changed (64) hide show
  1. package/README.md +25 -0
  2. package/dist/components/forms/field-control.cjs +3 -2
  3. package/dist/components/forms/field-control.js +3 -2
  4. package/dist/components/forms/validation-converter.cjs +14 -5
  5. package/dist/components/forms/validation-converter.js +14 -5
  6. package/dist/components/ui/chat-hero.cjs +244 -0
  7. package/dist/components/ui/chat-hero.d.ts +51 -0
  8. package/dist/components/ui/chat-hero.js +189 -0
  9. package/dist/components/ui/date-picker.cjs +6 -5
  10. package/dist/components/ui/date-picker.js +7 -6
  11. package/dist/components/ui/datetime-picker.cjs +7 -10
  12. package/dist/components/ui/datetime-picker.js +8 -11
  13. package/dist/components/ui/index.cjs +629 -413
  14. package/dist/components/ui/index.d.ts +6 -2
  15. package/dist/components/ui/index.js +7 -3
  16. package/dist/components/ui/prompt-editor/components/MarkdownPreview.cjs +4 -2
  17. package/dist/components/ui/prompt-editor/components/MarkdownPreview.js +4 -2
  18. package/dist/components/ui/prompt-editor/components/TokenPill.cjs +13 -68
  19. package/dist/components/ui/prompt-editor/components/TokenPill.js +14 -69
  20. package/dist/components/ui/prompt-editor/types.cjs +2 -14
  21. package/dist/components/ui/prompt-editor/types.d.ts +14 -1
  22. package/dist/components/ui/prompt-editor/types.js +2 -14
  23. package/dist/components/ui/prompt-suggestions.cjs +133 -0
  24. package/dist/components/ui/prompt-suggestions.d.ts +52 -0
  25. package/dist/components/ui/prompt-suggestions.js +90 -0
  26. package/dist/components/ui/quick-form-field/components/field-header.cjs +9 -4
  27. package/dist/components/ui/quick-form-field/components/field-header.d.ts +4 -1
  28. package/dist/components/ui/quick-form-field/components/field-header.js +9 -4
  29. package/dist/components/ui/quick-form-field/components/lock-toggle-button.cjs +2 -2
  30. package/dist/components/ui/quick-form-field/components/lock-toggle-button.d.ts +5 -4
  31. package/dist/components/ui/quick-form-field/components/lock-toggle-button.js +2 -2
  32. package/dist/components/ui/quick-form-field/index.d.ts +1 -1
  33. package/dist/components/ui/quick-form-field/quick-form-field.cjs +158 -222
  34. package/dist/components/ui/quick-form-field/quick-form-field.d.ts +6 -4
  35. package/dist/components/ui/quick-form-field/quick-form-field.js +159 -223
  36. package/dist/components/ui/quick-form-field/types.cjs +2 -2
  37. package/dist/components/ui/quick-form-field/types.d.ts +39 -32
  38. package/dist/components/ui/quick-form-field/types.js +2 -2
  39. package/dist/components/ui/quick-form-field/utils.cjs +5 -59
  40. package/dist/components/ui/quick-form-field/utils.d.ts +2 -24
  41. package/dist/components/ui/quick-form-field/utils.js +3 -48
  42. package/dist/components/ui/reference-chip-colors.cjs +49 -0
  43. package/dist/components/ui/reference-chip-colors.d.ts +15 -0
  44. package/dist/components/ui/reference-chip-colors.js +15 -0
  45. package/dist/components/ui/reference-chip.cjs +104 -0
  46. package/dist/components/ui/reference-chip.d.ts +17 -0
  47. package/dist/components/ui/reference-chip.js +70 -0
  48. package/dist/components/ui/variable-value-control.cjs +5 -3
  49. package/dist/components/ui/variable-value-control.js +5 -3
  50. package/dist/index.cjs +50 -4
  51. package/dist/index.d.ts +12 -6
  52. package/dist/index.js +7 -3
  53. package/dist/lib/date-value.cjs +46 -0
  54. package/dist/lib/date-value.d.ts +8 -0
  55. package/dist/lib/date-value.js +12 -0
  56. package/dist/styles.css +110 -43
  57. package/dist/tailwind.utilities.css +15 -0
  58. package/package.json +1 -1
  59. package/dist/components/custom/chat-first-experience.cjs +0 -87
  60. package/dist/components/custom/chat-first-experience.d.ts +0 -24
  61. package/dist/components/custom/chat-first-experience.js +0 -53
  62. package/dist/components/custom/chat-prompt-suggestions.cjs +0 -49
  63. package/dist/components/custom/chat-prompt-suggestions.d.ts +0 -18
  64. 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 : value ? `Selected date: ${(0, external_date_fns_namespaceObject.format)(value, 'PPP')}` : placeholder,
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: value && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
72
+ children: date && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
72
73
  className: "truncate",
73
- children: (0, external_date_fns_namespaceObject.format)(value, 'PPP')
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
- value ? (0, external_date_fns_namespaceObject.format)(value, 'PPP') : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
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: value,
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 : value ? `Selected date: ${format(value, 'PPP')}` : placeholder,
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: value && /*#__PURE__*/ jsx("span", {
43
+ children: date && /*#__PURE__*/ jsx("span", {
43
44
  className: "truncate",
44
- children: format(value, 'PPP')
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
- value ? format(value, 'PPP') : /*#__PURE__*/ jsx("span", {
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: value,
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 [selectedDate, setSelectedDate] = external_react_namespaceObject.useState(value);
51
- const [timeValue, setTimeValue] = external_react_namespaceObject.useState(value ? (0, external_date_fns_namespaceObject.format)(value, 'HH:mm') : '');
52
- const valueTime = value?.getTime();
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
- if (void 0 === value) {
57
- setSelectedDate(void 0);
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 [selectedDate, setSelectedDate] = useState(value);
23
- const [timeValue, setTimeValue] = useState(value ? format(value, 'HH:mm') : '');
24
- const valueTime = value?.getTime();
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
- if (void 0 === value) {
29
- setSelectedDate(void 0);
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);