@uipath/apollo-wind 2.55.0 → 2.57.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 (111) hide show
  1. package/dist/components/ui/combobox.cjs +33 -15
  2. package/dist/components/ui/combobox.js +33 -15
  3. package/dist/components/ui/date-picker.cjs +62 -26
  4. package/dist/components/ui/date-picker.js +62 -26
  5. package/dist/components/ui/datetime-picker.cjs +29 -12
  6. package/dist/components/ui/datetime-picker.js +29 -12
  7. package/dist/components/ui/dropdown-menu.cjs +12 -8
  8. package/dist/components/ui/dropdown-menu.js +12 -8
  9. package/dist/components/ui/field-actions/ai-assist-action.cjs +121 -0
  10. package/dist/components/ui/field-actions/ai-assist-action.d.ts +21 -0
  11. package/dist/components/ui/field-actions/ai-assist-action.js +84 -0
  12. package/dist/components/ui/field-actions/collapse.cjs +44 -0
  13. package/dist/components/ui/field-actions/collapse.d.ts +6 -0
  14. package/dist/components/ui/field-actions/collapse.js +4 -0
  15. package/dist/components/ui/field-actions/index.cjs +46 -0
  16. package/dist/components/ui/field-actions/index.d.ts +2 -0
  17. package/dist/components/ui/field-actions/index.js +3 -0
  18. package/dist/components/ui/field-actions/insert-variable-action.cjs +94 -0
  19. package/dist/components/ui/field-actions/insert-variable-action.d.ts +22 -0
  20. package/dist/components/ui/field-actions/insert-variable-action.js +57 -0
  21. package/dist/components/ui/field-addons/index.cjs +50 -0
  22. package/dist/components/ui/field-addons/index.d.ts +3 -0
  23. package/dist/components/ui/field-addons/index.js +4 -0
  24. package/dist/components/ui/field-addons/value-mode-indicator.cjs +57 -0
  25. package/dist/components/ui/field-addons/value-mode-indicator.d.ts +13 -0
  26. package/dist/components/ui/field-addons/value-mode-indicator.js +23 -0
  27. package/dist/components/ui/field-addons/value-mode-menu.cjs +149 -0
  28. package/dist/components/ui/field-addons/value-mode-menu.d.ts +69 -0
  29. package/dist/components/ui/field-addons/value-mode-menu.js +112 -0
  30. package/dist/components/ui/field-addons/value-mode-strings.cjs +69 -0
  31. package/dist/components/ui/field-addons/value-mode-strings.d.ts +32 -0
  32. package/dist/components/ui/field-addons/value-mode-strings.js +29 -0
  33. package/dist/components/ui/form-field.cjs +42 -5
  34. package/dist/components/ui/form-field.d.ts +21 -1
  35. package/dist/components/ui/form-field.js +36 -2
  36. package/dist/components/ui/index.cjs +156 -126
  37. package/dist/components/ui/index.d.ts +3 -0
  38. package/dist/components/ui/index.js +3 -0
  39. package/dist/components/ui/input-group-context.cjs +91 -0
  40. package/dist/components/ui/input-group-context.d.ts +69 -0
  41. package/dist/components/ui/input-group-context.js +42 -0
  42. package/dist/components/ui/input-group.cjs +303 -56
  43. package/dist/components/ui/input-group.d.ts +70 -3
  44. package/dist/components/ui/input-group.js +285 -56
  45. package/dist/components/ui/input.cjs +28 -17
  46. package/dist/components/ui/input.js +28 -17
  47. package/dist/components/ui/lockable-value-field/components/field-header.cjs +16 -114
  48. package/dist/components/ui/lockable-value-field/components/field-header.js +14 -112
  49. package/dist/components/ui/lockable-value-field/lockable-value-field.cjs +4 -12
  50. package/dist/components/ui/lockable-value-field/lockable-value-field.js +4 -12
  51. package/dist/components/ui/model-picker/ModelPicker.cjs +495 -0
  52. package/dist/components/ui/model-picker/ModelPicker.d.ts +304 -0
  53. package/dist/components/ui/model-picker/ModelPicker.js +451 -0
  54. package/dist/components/ui/model-picker/ModelTagChip.cjs +101 -0
  55. package/dist/components/ui/model-picker/ModelTagChip.d.ts +29 -0
  56. package/dist/components/ui/model-picker/ModelTagChip.js +67 -0
  57. package/dist/components/ui/model-picker/badges.cjs +52 -0
  58. package/dist/components/ui/model-picker/badges.d.ts +41 -0
  59. package/dist/components/ui/model-picker/badges.js +18 -0
  60. package/dist/components/ui/model-picker/index.cjs +117 -0
  61. package/dist/components/ui/model-picker/index.d.ts +27 -0
  62. package/dist/components/ui/model-picker/index.js +14 -0
  63. package/dist/components/ui/model-picker/labels.cjs +107 -0
  64. package/dist/components/ui/model-picker/labels.d.ts +81 -0
  65. package/dist/components/ui/model-picker/labels.js +67 -0
  66. package/dist/components/ui/model-picker/primitives/FolderSwitcher.cjs +108 -0
  67. package/dist/components/ui/model-picker/primitives/FolderSwitcher.d.ts +38 -0
  68. package/dist/components/ui/model-picker/primitives/FolderSwitcher.js +74 -0
  69. package/dist/components/ui/model-picker/primitives/GroupHeader.cjs +84 -0
  70. package/dist/components/ui/model-picker/primitives/GroupHeader.d.ts +64 -0
  71. package/dist/components/ui/model-picker/primitives/GroupHeader.js +50 -0
  72. package/dist/components/ui/model-picker/primitives/ModelOptionRow.cjs +178 -0
  73. package/dist/components/ui/model-picker/primitives/ModelOptionRow.d.ts +95 -0
  74. package/dist/components/ui/model-picker/primitives/ModelOptionRow.js +135 -0
  75. package/dist/components/ui/model-picker/primitives/OptionList.cjs +295 -0
  76. package/dist/components/ui/model-picker/primitives/OptionList.d.ts +87 -0
  77. package/dist/components/ui/model-picker/primitives/OptionList.js +242 -0
  78. package/dist/components/ui/{lockable-value-field/components/mode-menu-item.cjs → model-picker/primitives/PickerPopup.cjs} +25 -24
  79. package/dist/components/ui/model-picker/primitives/PickerPopup.d.ts +39 -0
  80. package/dist/components/ui/model-picker/primitives/PickerPopup.js +30 -0
  81. package/dist/components/ui/model-picker/primitives/PickerSearchInput.cjs +77 -0
  82. package/dist/components/ui/model-picker/primitives/PickerSearchInput.d.ts +43 -0
  83. package/dist/components/ui/model-picker/primitives/PickerSearchInput.js +43 -0
  84. package/dist/components/ui/model-picker/primitives/PickerTrigger.cjs +112 -0
  85. package/dist/components/ui/model-picker/primitives/PickerTrigger.d.ts +73 -0
  86. package/dist/components/ui/model-picker/primitives/PickerTrigger.js +78 -0
  87. package/dist/components/ui/model-picker/types.cjs +18 -0
  88. package/dist/components/ui/model-picker/types.d.ts +154 -0
  89. package/dist/components/ui/model-picker/types.js +0 -0
  90. package/dist/components/ui/model-picker/useModelPickerState.cjs +250 -0
  91. package/dist/components/ui/model-picker/useModelPickerState.d.ts +135 -0
  92. package/dist/components/ui/model-picker/useModelPickerState.js +216 -0
  93. package/dist/components/ui/model-picker/utils.cjs +327 -0
  94. package/dist/components/ui/model-picker/utils.d.ts +121 -0
  95. package/dist/components/ui/model-picker/utils.js +272 -0
  96. package/dist/components/ui/multi-select.cjs +82 -58
  97. package/dist/components/ui/multi-select.js +84 -60
  98. package/dist/components/ui/popover.cjs +13 -9
  99. package/dist/components/ui/popover.js +13 -9
  100. package/dist/components/ui/select.cjs +89 -27
  101. package/dist/components/ui/select.d.ts +4 -0
  102. package/dist/components/ui/select.js +90 -28
  103. package/dist/components/ui/textarea.cjs +16 -11
  104. package/dist/components/ui/textarea.js +16 -11
  105. package/dist/index.cjs +144 -21
  106. package/dist/index.d.ts +10 -4
  107. package/dist/index.js +6 -3
  108. package/dist/styles.css +350 -5
  109. package/package.json +2 -1
  110. package/dist/components/ui/lockable-value-field/components/mode-menu-item.d.ts +0 -9
  111. package/dist/components/ui/lockable-value-field/components/mode-menu-item.js +0 -29
@@ -23,6 +23,8 @@ export * from './drawer';
23
23
  export * from './dropdown-menu';
24
24
  export * from './editable-cell';
25
25
  export * from './empty-state';
26
+ export * from './field-actions';
27
+ export * from './field-addons';
26
28
  export * from './file-upload';
27
29
  export * from './form-field';
28
30
  export * from './hover-card';
@@ -32,6 +34,7 @@ export * from './input-group';
32
34
  export * from './label';
33
35
  export * from './layout';
34
36
  export * from './lockable-value-field';
37
+ export * from './model-picker';
35
38
  export * from './multi-select';
36
39
  export * from './pagination';
37
40
  export * from './popover';
@@ -24,6 +24,8 @@ export * from "./drawer.js";
24
24
  export * from "./dropdown-menu.js";
25
25
  export * from "./editable-cell.js";
26
26
  export * from "./empty-state.js";
27
+ export * from "./field-actions/index.js";
28
+ export * from "./field-addons/index.js";
27
29
  export * from "./file-upload.js";
28
30
  export * from "./form-field.js";
29
31
  export * from "./hover-card.js";
@@ -33,6 +35,7 @@ export * from "./input-group.js";
33
35
  export * from "./label.js";
34
36
  export * from "./layout/index.js";
35
37
  export * from "./lockable-value-field/index.js";
38
+ export * from "./model-picker/index.js";
36
39
  export * from "./multi-select.js";
37
40
  export * from "./pagination.js";
38
41
  export * from "./popover.js";
@@ -0,0 +1,91 @@
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
+ NO_GROUP_DISABLED: ()=>NO_GROUP_DISABLED,
28
+ useInputGroup: ()=>useInputGroup,
29
+ NO_GROUP: ()=>NO_GROUP,
30
+ controlValidation: ()=>controlValidation,
31
+ useControlValidation: ()=>useControlValidation,
32
+ InputGroupContext: ()=>InputGroupContext
33
+ });
34
+ const external_react_namespaceObject = require("react");
35
+ const NO_GROUP = {
36
+ inGroup: false,
37
+ anchor: null
38
+ };
39
+ const NO_GROUP_DISABLED = {
40
+ ...NO_GROUP,
41
+ disabled: true
42
+ };
43
+ const InputGroupContext = (0, external_react_namespaceObject.createContext)(NO_GROUP);
44
+ function useInputGroup() {
45
+ return (0, external_react_namespaceObject.useContext)(InputGroupContext);
46
+ }
47
+ function controlValidation(group, { error, errorId, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage }) {
48
+ const messageId = group.reportError ? group.error || error ? group.errorId : void 0 : error ? errorId : void 0;
49
+ const invalid = Boolean(error) || group.inGroup && Boolean(group.error || group.invalid);
50
+ const describedBy = [
51
+ ...new Set(`${ariaDescribedBy ?? ''} ${messageId ?? ''}`.split(/\s+/))
52
+ ].filter(Boolean).join(' ');
53
+ return {
54
+ 'aria-invalid': invalid ? true : ariaInvalid,
55
+ 'aria-describedby': describedBy || void 0,
56
+ 'aria-errormessage': messageId ?? ariaErrorMessage
57
+ };
58
+ }
59
+ function useControlValidation(group, input) {
60
+ const { reportError } = group;
61
+ const { error } = input;
62
+ (0, external_react_namespaceObject.useEffect)(()=>{
63
+ if (!reportError) return;
64
+ reportError(error);
65
+ return ()=>reportError(void 0);
66
+ }, [
67
+ reportError,
68
+ error
69
+ ]);
70
+ return {
71
+ aria: controlValidation(group, input),
72
+ ownMessage: !reportError
73
+ };
74
+ }
75
+ exports.InputGroupContext = __webpack_exports__.InputGroupContext;
76
+ exports.NO_GROUP = __webpack_exports__.NO_GROUP;
77
+ exports.NO_GROUP_DISABLED = __webpack_exports__.NO_GROUP_DISABLED;
78
+ exports.controlValidation = __webpack_exports__.controlValidation;
79
+ exports.useControlValidation = __webpack_exports__.useControlValidation;
80
+ exports.useInputGroup = __webpack_exports__.useInputGroup;
81
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
82
+ "InputGroupContext",
83
+ "NO_GROUP",
84
+ "NO_GROUP_DISABLED",
85
+ "controlValidation",
86
+ "useControlValidation",
87
+ "useInputGroup"
88
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
89
+ Object.defineProperty(exports, '__esModule', {
90
+ value: true
91
+ });
@@ -0,0 +1,69 @@
1
+ import { type AriaAttributes, type ReactNode, type RefObject } from 'react';
2
+ /** How tall the group may grow. `row` is the single-row control; the others override only sizing
3
+ * and alignment, so border, fill and rings stay identical across all four. */
4
+ export type InputGroupLayout = 'row' | 'grow' | 'block' | 'fill';
5
+ /** The enclosing InputGroup, as a control inside it sees it. */
6
+ export interface InputGroupState {
7
+ /**
8
+ * Whether the control is the group's control. `false` outside a group, and inside an
9
+ * `InputGroupAddon` or `InputGroupBody`, whose contents are not the group's control.
10
+ */
11
+ inGroup: boolean;
12
+ layout?: InputGroupLayout;
13
+ /** The group's validation message, which the group renders below its box. */
14
+ error?: ReactNode;
15
+ errorId?: string;
16
+ /** The group's `invalid`, which marks its control invalid without a message. */
17
+ invalid?: boolean;
18
+ /** The group's `disabled`. Holds for everything inside it, addons and body included. */
19
+ disabled?: boolean;
20
+ /** The group's box, for a popover opened by the control to anchor to. */
21
+ anchor: RefObject<HTMLElement | null> | null;
22
+ /**
23
+ * Shows the control's own `error` in the group's message slot, below the box, when the group has
24
+ * no `error` of its own. Absent where nothing renders the message for the control.
25
+ */
26
+ reportError?: (error: ReactNode) => void;
27
+ }
28
+ export declare const NO_GROUP: InputGroupState;
29
+ /** Not the group's control, but inside a disabled group. */
30
+ export declare const NO_GROUP_DISABLED: InputGroupState;
31
+ export declare const InputGroupContext: import("react").Context<InputGroupState>;
32
+ /**
33
+ * The enclosing InputGroup. Apollo's controls read it to become the group's control on their own;
34
+ * a custom control that also renders standalone can do the same.
35
+ */
36
+ export declare function useInputGroup(): InputGroupState;
37
+ interface ControlValidationInput {
38
+ /** The control's own `error`. */
39
+ error?: ReactNode;
40
+ /** The id of the control's own message. */
41
+ errorId?: string;
42
+ 'aria-invalid'?: AriaAttributes['aria-invalid'];
43
+ 'aria-describedby'?: string;
44
+ 'aria-errormessage'?: string;
45
+ }
46
+ /**
47
+ * A control's validation attributes. Standalone, they point at the message the control renders
48
+ * below itself. Inside a group they point at the group's message instead, since a message the
49
+ * control rendered would land inside the group's box; the group shows the control's own `error`
50
+ * there when it has none of its own.
51
+ */
52
+ export declare function controlValidation(group: InputGroupState, { error, errorId, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, }: ControlValidationInput): {
53
+ 'aria-invalid': boolean | "true" | "false" | "grammar" | "spelling" | undefined;
54
+ 'aria-describedby': string | undefined;
55
+ 'aria-errormessage': string | undefined;
56
+ };
57
+ /**
58
+ * {@link controlValidation} for a control that takes an `error`, and whether it renders that message
59
+ * itself. Inside a group it hands the message to the group, which renders it below the box.
60
+ */
61
+ export declare function useControlValidation(group: InputGroupState, input: ControlValidationInput): {
62
+ aria: {
63
+ 'aria-invalid': boolean | "true" | "false" | "grammar" | "spelling" | undefined;
64
+ 'aria-describedby': string | undefined;
65
+ 'aria-errormessage': string | undefined;
66
+ };
67
+ ownMessage: boolean;
68
+ };
69
+ export {};
@@ -0,0 +1,42 @@
1
+ import { createContext, useContext, useEffect } from "react";
2
+ const NO_GROUP = {
3
+ inGroup: false,
4
+ anchor: null
5
+ };
6
+ const NO_GROUP_DISABLED = {
7
+ ...NO_GROUP,
8
+ disabled: true
9
+ };
10
+ const InputGroupContext = createContext(NO_GROUP);
11
+ function useInputGroup() {
12
+ return useContext(InputGroupContext);
13
+ }
14
+ function controlValidation(group, { error, errorId, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage }) {
15
+ const messageId = group.reportError ? group.error || error ? group.errorId : void 0 : error ? errorId : void 0;
16
+ const invalid = Boolean(error) || group.inGroup && Boolean(group.error || group.invalid);
17
+ const describedBy = [
18
+ ...new Set(`${ariaDescribedBy ?? ''} ${messageId ?? ''}`.split(/\s+/))
19
+ ].filter(Boolean).join(' ');
20
+ return {
21
+ 'aria-invalid': invalid ? true : ariaInvalid,
22
+ 'aria-describedby': describedBy || void 0,
23
+ 'aria-errormessage': messageId ?? ariaErrorMessage
24
+ };
25
+ }
26
+ function useControlValidation(group, input) {
27
+ const { reportError } = group;
28
+ const { error } = input;
29
+ useEffect(()=>{
30
+ if (!reportError) return;
31
+ reportError(error);
32
+ return ()=>reportError(void 0);
33
+ }, [
34
+ reportError,
35
+ error
36
+ ]);
37
+ return {
38
+ aria: controlValidation(group, input),
39
+ ownMessage: !reportError
40
+ };
41
+ }
42
+ export { InputGroupContext, NO_GROUP, NO_GROUP_DISABLED, controlValidation, useControlValidation, useInputGroup };