@uipath/apollo-wind 2.93.0 → 2.94.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/components/forms/field-renderer.cjs +1 -1
- package/dist/components/forms/field-renderer.js +1 -1
- package/dist/components/forms/field-rules-strings.cjs +40 -0
- package/dist/components/forms/field-rules-strings.d.ts +17 -0
- package/dist/components/forms/field-rules-strings.js +6 -0
- package/dist/components/forms/field-rules.cjs +526 -0
- package/dist/components/forms/field-rules.d.ts +97 -0
- package/dist/components/forms/field-rules.js +468 -0
- package/dist/components/forms/form-designer.cjs +208 -592
- package/dist/components/forms/form-designer.js +210 -594
- package/dist/components/forms/form-schema.d.ts +5 -0
- package/dist/components/forms/index.cjs +43 -3
- package/dist/components/forms/index.d.ts +4 -0
- package/dist/components/forms/index.js +5 -1
- package/dist/components/forms/metadata-form.cjs +1 -1
- package/dist/components/forms/metadata-form.js +1 -1
- package/dist/components/forms/rules-engine-dialect.cjs +644 -0
- package/dist/components/forms/rules-engine-dialect.d.ts +90 -0
- package/dist/components/forms/rules-engine-dialect.js +537 -0
- package/dist/components/forms/rules-engine.cjs +99 -10
- package/dist/components/forms/rules-engine.d.ts +5 -0
- package/dist/components/forms/rules-engine.js +99 -10
- package/dist/components/forms/use-field-rules.cjs +122 -0
- package/dist/components/forms/use-field-rules.d.ts +31 -0
- package/dist/components/forms/use-field-rules.js +88 -0
- package/dist/components/ui/conditions-editor/condition-row.cjs +458 -0
- package/dist/components/ui/conditions-editor/condition-row.d.ts +23 -0
- package/dist/components/ui/conditions-editor/condition-row.js +421 -0
- package/dist/components/ui/conditions-editor/conditions-editor.cjs +363 -0
- package/dist/components/ui/conditions-editor/conditions-editor.d.ts +67 -0
- package/dist/components/ui/conditions-editor/conditions-editor.js +329 -0
- package/dist/components/ui/conditions-editor/context.cjs +45 -0
- package/dist/components/ui/conditions-editor/context.d.ts +54 -0
- package/dist/components/ui/conditions-editor/context.js +8 -0
- package/dist/components/ui/conditions-editor/index.cjs +55 -0
- package/dist/components/ui/conditions-editor/index.d.ts +6 -0
- package/dist/components/ui/conditions-editor/index.js +6 -0
- package/dist/components/ui/conditions-editor/model.cjs +126 -0
- package/dist/components/ui/conditions-editor/model.d.ts +39 -0
- package/dist/components/ui/conditions-editor/model.js +71 -0
- package/dist/components/ui/conditions-editor/status.cjs +198 -0
- package/dist/components/ui/conditions-editor/status.d.ts +44 -0
- package/dist/components/ui/conditions-editor/status.js +131 -0
- package/dist/components/ui/conditions-editor/strings.cjs +86 -0
- package/dist/components/ui/conditions-editor/strings.d.ts +62 -0
- package/dist/components/ui/conditions-editor/strings.js +52 -0
- package/dist/components/ui/conditions-editor/vocabulary.cjs +163 -0
- package/dist/components/ui/conditions-editor/vocabulary.d.ts +51 -0
- package/dist/components/ui/conditions-editor/vocabulary.js +129 -0
- package/dist/components/ui/field-actions/index.cjs +9 -2
- package/dist/components/ui/field-actions/index.d.ts +1 -0
- package/dist/components/ui/field-actions/index.js +2 -1
- package/dist/components/ui/field-actions/insert-variable-action.cjs +3 -1
- package/dist/components/ui/field-actions/insert-variable-action.d.ts +4 -1
- package/dist/components/ui/field-actions/insert-variable-action.js +3 -1
- package/dist/components/ui/field-actions/rules-action.cjs +244 -0
- package/dist/components/ui/field-actions/rules-action.d.ts +42 -0
- package/dist/components/ui/field-actions/rules-action.js +207 -0
- package/dist/components/ui/index.cjs +273 -234
- package/dist/components/ui/index.d.ts +3 -0
- package/dist/components/ui/index.js +3 -0
- package/dist/components/ui/quick-form-field/components/field-header.cjs +137 -167
- package/dist/components/ui/quick-form-field/components/field-header.d.ts +1 -1
- package/dist/components/ui/quick-form-field/components/field-header.js +138 -168
- package/dist/components/ui/quick-form-field/components/header-actions.cjs +187 -0
- package/dist/components/ui/quick-form-field/components/header-actions.d.ts +59 -0
- package/dist/components/ui/quick-form-field/components/header-actions.js +138 -0
- package/dist/components/ui/quick-form-field/components/header-context.cjs +59 -0
- package/dist/components/ui/quick-form-field/components/header-context.d.ts +33 -0
- package/dist/components/ui/quick-form-field/components/header-context.js +16 -0
- package/dist/components/ui/quick-form-field/index.cjs +18 -4
- package/dist/components/ui/quick-form-field/index.d.ts +2 -0
- package/dist/components/ui/quick-form-field/index.js +3 -1
- package/dist/components/ui/quick-form-field/quick-form-field.cjs +1 -1
- package/dist/components/ui/quick-form-field/quick-form-field.d.ts +6 -6
- package/dist/components/ui/quick-form-field/quick-form-field.js +1 -1
- package/dist/components/ui/quick-form-field/types.d.ts +42 -11
- package/dist/components/ui/row-groups/add-row-button.cjs +54 -0
- package/dist/components/ui/row-groups/add-row-button.d.ts +10 -0
- package/dist/components/ui/row-groups/add-row-button.js +20 -0
- package/dist/components/ui/row-groups/after-press.cjs +73 -0
- package/dist/components/ui/row-groups/after-press.d.ts +7 -0
- package/dist/components/ui/row-groups/after-press.js +36 -0
- package/dist/components/ui/row-groups/collapsible-row-group.cjs +83 -0
- package/dist/components/ui/row-groups/collapsible-row-group.d.ts +13 -0
- package/dist/components/ui/row-groups/collapsible-row-group.js +49 -0
- package/dist/components/ui/row-groups/empty-rows.cjs +42 -0
- package/dist/components/ui/row-groups/empty-rows.d.ts +7 -0
- package/dist/components/ui/row-groups/empty-rows.js +8 -0
- package/dist/components/ui/row-groups/group-mode-toggle.cjs +80 -0
- package/dist/components/ui/row-groups/group-mode-toggle.d.ts +26 -0
- package/dist/components/ui/row-groups/group-mode-toggle.js +40 -0
- package/dist/components/ui/row-groups/index.cjs +62 -0
- package/dist/components/ui/row-groups/index.d.ts +6 -0
- package/dist/components/ui/row-groups/index.js +7 -0
- package/dist/components/ui/row-groups/row-delete-button.cjs +54 -0
- package/dist/components/ui/row-groups/row-delete-button.d.ts +18 -0
- package/dist/components/ui/row-groups/row-delete-button.js +20 -0
- package/dist/components/ui/row-groups/use-row-focus.cjs +82 -0
- package/dist/components/ui/row-groups/use-row-focus.d.ts +17 -0
- package/dist/components/ui/row-groups/use-row-focus.js +48 -0
- package/dist/components/ui/rules-editor/context.cjs +45 -0
- package/dist/components/ui/rules-editor/context.d.ts +52 -0
- package/dist/components/ui/rules-editor/context.js +8 -0
- package/dist/components/ui/rules-editor/index.cjs +56 -0
- package/dist/components/ui/rules-editor/index.d.ts +4 -0
- package/dist/components/ui/rules-editor/index.js +4 -0
- package/dist/components/ui/rules-editor/model.cjs +205 -0
- package/dist/components/ui/rules-editor/model.d.ts +128 -0
- package/dist/components/ui/rules-editor/model.js +144 -0
- package/dist/components/ui/rules-editor/rule-card.cjs +470 -0
- package/dist/components/ui/rules-editor/rule-card.d.ts +14 -0
- package/dist/components/ui/rules-editor/rule-card.js +436 -0
- package/dist/components/ui/rules-editor/rules-editor.cjs +160 -0
- package/dist/components/ui/rules-editor/rules-editor.d.ts +66 -0
- package/dist/components/ui/rules-editor/rules-editor.js +126 -0
- package/dist/components/ui/rules-editor/strings.cjs +68 -0
- package/dist/components/ui/rules-editor/strings.d.ts +56 -0
- package/dist/components/ui/rules-editor/strings.js +34 -0
- package/dist/index.cjs +129 -8
- package/dist/index.d.ts +17 -4
- package/dist/index.js +10 -3
- package/dist/styles.css +97 -24
- package/package.json +2 -2
|
@@ -21,6 +21,7 @@ export * from './code-block';
|
|
|
21
21
|
export * from './collapsible';
|
|
22
22
|
export * from './combobox';
|
|
23
23
|
export * from './command';
|
|
24
|
+
export * from './conditions-editor';
|
|
24
25
|
export * from './connection-picker';
|
|
25
26
|
export * from './context-menu';
|
|
26
27
|
export * from './data-table';
|
|
@@ -72,6 +73,8 @@ export { ReferenceChip, type ReferenceChipProps } from './reference-chip';
|
|
|
72
73
|
export { getReferenceChipColors, type ReferenceChipVariant } from './reference-chip-colors';
|
|
73
74
|
export * from './resizable';
|
|
74
75
|
export * from './resource-picker';
|
|
76
|
+
export * from './row-groups';
|
|
77
|
+
export * from './rules-editor';
|
|
75
78
|
export * from './scroll-area';
|
|
76
79
|
export * from './search';
|
|
77
80
|
export * from './select';
|
|
@@ -24,6 +24,7 @@ export * from "./code-block.js";
|
|
|
24
24
|
export * from "./collapsible.js";
|
|
25
25
|
export * from "./combobox.js";
|
|
26
26
|
export * from "./command.js";
|
|
27
|
+
export * from "./conditions-editor/index.js";
|
|
27
28
|
export * from "./connection-picker/index.js";
|
|
28
29
|
export * from "./context-menu.js";
|
|
29
30
|
export * from "./data-table.js";
|
|
@@ -73,6 +74,8 @@ export * from "./quick-form-field/index.js";
|
|
|
73
74
|
export * from "./radio-group.js";
|
|
74
75
|
export * from "./resizable.js";
|
|
75
76
|
export * from "./resource-picker/index.js";
|
|
77
|
+
export * from "./row-groups/index.js";
|
|
78
|
+
export * from "./rules-editor/index.js";
|
|
76
79
|
export * from "./scroll-area.js";
|
|
77
80
|
export * from "./search.js";
|
|
78
81
|
export * from "./select.js";
|
|
@@ -29,24 +29,63 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29
29
|
});
|
|
30
30
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
31
|
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
32
|
+
const external_react_namespaceObject = require("react");
|
|
32
33
|
const external_button_cjs_namespaceObject = require("../../button.cjs");
|
|
33
|
-
const external_dropdown_menu_cjs_namespaceObject = require("../../dropdown-menu.cjs");
|
|
34
34
|
const external_form_field_cjs_namespaceObject = require("../../form-field.cjs");
|
|
35
35
|
const external_info_tooltip_cjs_namespaceObject = require("../../info-tooltip.cjs");
|
|
36
36
|
const external_popover_cjs_namespaceObject = require("../../popover.cjs");
|
|
37
37
|
const external_switch_cjs_namespaceObject = require("../../switch.cjs");
|
|
38
38
|
const external_tooltip_cjs_namespaceObject = require("../../tooltip.cjs");
|
|
39
39
|
const index_cjs_namespaceObject = require("../../../../lib/index.cjs");
|
|
40
|
-
const ai_assist_action_cjs_namespaceObject = require("../../field-actions/ai-assist-action.cjs");
|
|
41
40
|
const collapse_cjs_namespaceObject = require("../../field-actions/collapse.cjs");
|
|
42
|
-
const
|
|
43
|
-
const
|
|
41
|
+
const external_header_actions_cjs_namespaceObject = require("./header-actions.cjs");
|
|
42
|
+
const external_header_context_cjs_namespaceObject = require("./header-context.cjs");
|
|
43
|
+
const NO_CLAIMS = {
|
|
44
|
+
type: 0,
|
|
45
|
+
ai: 0,
|
|
46
|
+
insert: 0
|
|
47
|
+
};
|
|
44
48
|
const GROW_WHILE_EDITING = 'has-[[data-slot=editable-text-input]]:flex-1';
|
|
45
|
-
function FieldHeader({ label, labelAddon, tooltip, fieldId, fieldLabel, required, fieldType, fieldTypes
|
|
46
|
-
const typeMeta = external_types_cjs_namespaceObject.FIELD_TYPE_META[fieldType];
|
|
47
|
-
const typeLabel = strings.typeLabels[fieldType] ?? typeMeta.label;
|
|
49
|
+
function FieldHeader({ label, labelAddon, tooltip, fieldId, fieldLabel, required, fieldType, fieldTypes, onFieldTypeChange, onRequiredChange, compact, disabled, isExpression, showFieldActions, onValueChange, variables, onGenerateWithAi, onInsertVariable, strings, headerActions }) {
|
|
48
50
|
const collapsedTextClass = (0, index_cjs_namespaceObject.cn)(collapse_cjs_namespaceObject.COLLAPSED_HIDDEN, compact && '!hidden');
|
|
49
51
|
const compactOnlyClass = (0, index_cjs_namespaceObject.cn)(collapse_cjs_namespaceObject.COLLAPSED_ONLY, compact && '!flex');
|
|
52
|
+
const [claims, setClaims] = (0, external_react_namespaceObject.useState)(NO_CLAIMS);
|
|
53
|
+
const claim = (0, external_react_namespaceObject.useCallback)((kind)=>{
|
|
54
|
+
setClaims((c)=>({
|
|
55
|
+
...c,
|
|
56
|
+
[kind]: c[kind] + 1
|
|
57
|
+
}));
|
|
58
|
+
return ()=>setClaims((c)=>({
|
|
59
|
+
...c,
|
|
60
|
+
[kind]: c[kind] - 1
|
|
61
|
+
}));
|
|
62
|
+
}, []);
|
|
63
|
+
const claimed = {
|
|
64
|
+
type: claims.type > 0,
|
|
65
|
+
ai: claims.ai > 0,
|
|
66
|
+
insert: claims.insert > 0
|
|
67
|
+
};
|
|
68
|
+
const header = (0, external_react_namespaceObject.useMemo)(()=>({
|
|
69
|
+
fieldType,
|
|
70
|
+
isExpression,
|
|
71
|
+
disabled,
|
|
72
|
+
compact: !!compact,
|
|
73
|
+
strings,
|
|
74
|
+
variables,
|
|
75
|
+
insertVariable: onInsertVariable,
|
|
76
|
+
canInsert: !!onValueChange,
|
|
77
|
+
claim
|
|
78
|
+
}), [
|
|
79
|
+
fieldType,
|
|
80
|
+
isExpression,
|
|
81
|
+
disabled,
|
|
82
|
+
compact,
|
|
83
|
+
strings,
|
|
84
|
+
variables,
|
|
85
|
+
onInsertVariable,
|
|
86
|
+
onValueChange,
|
|
87
|
+
claim
|
|
88
|
+
]);
|
|
50
89
|
const hasActions = !!onFieldTypeChange || !!onRequiredChange || showFieldActions || null != headerActions;
|
|
51
90
|
const hasTooltip = null != tooltip && false !== tooltip && !('string' == typeof tooltip && !tooltip.trim());
|
|
52
91
|
const ownLabel = null != label && hasTooltip ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
|
|
@@ -75,87 +114,91 @@ function FieldHeader({ label, labelAddon, tooltip, fieldId, fieldLabel, required
|
|
|
75
114
|
children: alone
|
|
76
115
|
}) : alone;
|
|
77
116
|
}
|
|
78
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
79
|
-
|
|
80
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
117
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_header_context_cjs_namespaceObject.HeaderContext.Provider, {
|
|
118
|
+
value: header,
|
|
119
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipProvider, {
|
|
120
|
+
delayDuration: 300,
|
|
121
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_form_field_cjs_namespaceObject.FormFieldHeader, {
|
|
122
|
+
className: "[&:has([data-slot=editable-text-input])>:first-child]:flex-1 [&:has([data-slot=editable-text-input])>:nth-child(2)]:!hidden",
|
|
123
|
+
label: null == label ? fieldLabel : void 0,
|
|
124
|
+
htmlFor: fieldId,
|
|
125
|
+
required: required,
|
|
126
|
+
tooltip: null == label ? tooltip : void 0,
|
|
127
|
+
tooltipAriaLabel: strings.tooltipAriaLabel,
|
|
128
|
+
leading: leading,
|
|
129
|
+
actions: hasActions ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
130
|
+
className: "flex items-center gap-0.5",
|
|
131
|
+
children: [
|
|
132
|
+
onFieldTypeChange && !claimed.type && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_header_actions_cjs_namespaceObject.TypePickerControl, {
|
|
133
|
+
header: header,
|
|
134
|
+
value: fieldType,
|
|
135
|
+
types: fieldTypes,
|
|
136
|
+
onValueChange: onFieldTypeChange
|
|
137
|
+
}),
|
|
138
|
+
onRequiredChange && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
139
|
+
children: [
|
|
140
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
141
|
+
className: collapsedTextClass,
|
|
142
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_tooltip_cjs_namespaceObject.Tooltip, {
|
|
96
143
|
children: [
|
|
97
144
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipTrigger, {
|
|
98
145
|
asChild: true,
|
|
99
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
100
|
-
|
|
101
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
"aria-label": strings.fieldTypeAriaLabel,
|
|
146
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
147
|
+
className: "inline-flex",
|
|
148
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_switch_cjs_namespaceObject.Switch, {
|
|
149
|
+
size: "sm",
|
|
150
|
+
checked: !!required,
|
|
151
|
+
onCheckedChange: onRequiredChange,
|
|
106
152
|
disabled: disabled,
|
|
107
|
-
className:
|
|
108
|
-
|
|
109
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(typeMeta.icon, {}),
|
|
110
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
111
|
-
className: collapsedTextClass,
|
|
112
|
-
children: typeLabel
|
|
113
|
-
}),
|
|
114
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDown, {
|
|
115
|
-
className: (0, index_cjs_namespaceObject.cn)('!size-2.5', collapsedTextClass)
|
|
116
|
-
})
|
|
117
|
-
]
|
|
153
|
+
className: "data-[state=checked]:bg-brand data-[state=unchecked]:bg-foreground-subtle",
|
|
154
|
+
"aria-label": required ? strings.requiredAriaLabel : strings.optionalAriaLabel
|
|
118
155
|
})
|
|
119
156
|
})
|
|
120
157
|
}),
|
|
121
158
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipContent, {
|
|
122
|
-
children: strings.
|
|
159
|
+
children: strings.requiredTooltip
|
|
123
160
|
})
|
|
124
161
|
]
|
|
125
|
-
})
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_dropdown_menu_cjs_namespaceObject.DropdownMenuItem, {
|
|
133
|
-
onClick: ()=>onFieldTypeChange(type),
|
|
162
|
+
})
|
|
163
|
+
}),
|
|
164
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
165
|
+
className: compactOnlyClass,
|
|
166
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover, {
|
|
167
|
+
children: [
|
|
168
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_tooltip_cjs_namespaceObject.Tooltip, {
|
|
134
169
|
children: [
|
|
135
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
136
|
-
|
|
170
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipTrigger, {
|
|
171
|
+
asChild: true,
|
|
172
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger, {
|
|
173
|
+
asChild: true,
|
|
174
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button, {
|
|
175
|
+
type: "button",
|
|
176
|
+
variant: "ghost",
|
|
177
|
+
size: "3xs",
|
|
178
|
+
icon: true,
|
|
179
|
+
"aria-label": required ? strings.requiredAriaLabel : strings.optionalAriaLabel,
|
|
180
|
+
disabled: disabled,
|
|
181
|
+
className: collapse_cjs_namespaceObject.FIELD_ACTION_CLASS,
|
|
182
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Asterisk, {})
|
|
183
|
+
})
|
|
184
|
+
})
|
|
137
185
|
}),
|
|
138
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
139
|
-
|
|
140
|
-
children: strings.typeLabels[type] ?? meta.label
|
|
186
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipContent, {
|
|
187
|
+
children: strings.requiredTooltip
|
|
141
188
|
})
|
|
142
189
|
]
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
asChild: true,
|
|
156
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
157
|
-
className: "inline-flex",
|
|
158
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_switch_cjs_namespaceObject.Switch, {
|
|
190
|
+
}),
|
|
191
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverContent, {
|
|
192
|
+
align: "end",
|
|
193
|
+
className: "w-48",
|
|
194
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
195
|
+
className: "flex items-center justify-between gap-3",
|
|
196
|
+
children: [
|
|
197
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
198
|
+
className: "text-xs font-medium text-foreground",
|
|
199
|
+
children: strings.requiredTooltip
|
|
200
|
+
}),
|
|
201
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_switch_cjs_namespaceObject.Switch, {
|
|
159
202
|
size: "sm",
|
|
160
203
|
checked: !!required,
|
|
161
204
|
onCheckedChange: onRequiredChange,
|
|
@@ -163,102 +206,29 @@ function FieldHeader({ label, labelAddon, tooltip, fieldId, fieldLabel, required
|
|
|
163
206
|
className: "data-[state=checked]:bg-brand data-[state=unchecked]:bg-foreground-subtle",
|
|
164
207
|
"aria-label": required ? strings.requiredAriaLabel : strings.optionalAriaLabel
|
|
165
208
|
})
|
|
166
|
-
})
|
|
167
|
-
}),
|
|
168
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipContent, {
|
|
169
|
-
children: strings.requiredTooltip
|
|
170
|
-
})
|
|
171
|
-
]
|
|
172
|
-
})
|
|
173
|
-
}),
|
|
174
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
175
|
-
className: compactOnlyClass,
|
|
176
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_popover_cjs_namespaceObject.Popover, {
|
|
177
|
-
children: [
|
|
178
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_tooltip_cjs_namespaceObject.Tooltip, {
|
|
179
|
-
children: [
|
|
180
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipTrigger, {
|
|
181
|
-
asChild: true,
|
|
182
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverTrigger, {
|
|
183
|
-
asChild: true,
|
|
184
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button, {
|
|
185
|
-
type: "button",
|
|
186
|
-
variant: "ghost",
|
|
187
|
-
size: "3xs",
|
|
188
|
-
icon: true,
|
|
189
|
-
"aria-label": required ? strings.requiredAriaLabel : strings.optionalAriaLabel,
|
|
190
|
-
disabled: disabled,
|
|
191
|
-
className: collapse_cjs_namespaceObject.FIELD_ACTION_CLASS,
|
|
192
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.Asterisk, {})
|
|
193
|
-
})
|
|
194
|
-
})
|
|
195
|
-
}),
|
|
196
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_tooltip_cjs_namespaceObject.TooltipContent, {
|
|
197
|
-
children: strings.requiredTooltip
|
|
198
|
-
})
|
|
199
209
|
]
|
|
200
|
-
}),
|
|
201
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_popover_cjs_namespaceObject.PopoverContent, {
|
|
202
|
-
align: "end",
|
|
203
|
-
className: "w-48",
|
|
204
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
205
|
-
className: "flex items-center justify-between gap-3",
|
|
206
|
-
children: [
|
|
207
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
208
|
-
className: "text-xs font-medium text-foreground",
|
|
209
|
-
children: strings.requiredTooltip
|
|
210
|
-
}),
|
|
211
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_switch_cjs_namespaceObject.Switch, {
|
|
212
|
-
size: "sm",
|
|
213
|
-
checked: !!required,
|
|
214
|
-
onCheckedChange: onRequiredChange,
|
|
215
|
-
disabled: disabled,
|
|
216
|
-
className: "data-[state=checked]:bg-brand data-[state=unchecked]:bg-foreground-subtle",
|
|
217
|
-
"aria-label": required ? strings.requiredAriaLabel : strings.optionalAriaLabel
|
|
218
|
-
})
|
|
219
|
-
]
|
|
220
|
-
})
|
|
221
210
|
})
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
})
|
|
225
|
-
]
|
|
226
|
-
}),
|
|
227
|
-
showFieldActions && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
228
|
-
children: [
|
|
229
|
-
onGenerateWithAi && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ai_assist_action_cjs_namespaceObject.AiAssistAction, {
|
|
230
|
-
onGenerate: onGenerateWithAi,
|
|
231
|
-
disabled: disabled,
|
|
232
|
-
hint: strings.aiOutputHint(strings.aiOutputLabel(typeLabel, isExpression)),
|
|
233
|
-
strings: {
|
|
234
|
-
trigger: strings.aiAssistAriaLabel,
|
|
235
|
-
tooltip: strings.aiAssistTooltip,
|
|
236
|
-
prompt: strings.aiPromptLabel,
|
|
237
|
-
promptPlaceholder: strings.aiPromptPlaceholder,
|
|
238
|
-
generate: strings.aiGenerate,
|
|
239
|
-
generating: strings.aiGenerating,
|
|
240
|
-
error: strings.aiError
|
|
241
|
-
}
|
|
242
|
-
}),
|
|
243
|
-
onInsertVariable && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(insert_variable_action_cjs_namespaceObject.InsertVariableAction, {
|
|
244
|
-
variables: variables.items,
|
|
245
|
-
compact: compact,
|
|
246
|
-
disabled: !onValueChange,
|
|
247
|
-
strings: {
|
|
248
|
-
label: strings.insertLabel,
|
|
249
|
-
ariaLabel: strings.insertAriaLabel,
|
|
250
|
-
searchPlaceholder: strings.insertSearchPlaceholder,
|
|
251
|
-
empty: strings.insertEmpty
|
|
252
|
-
},
|
|
253
|
-
onInsert: (_, item)=>onInsertVariable(variables.resolve(item))
|
|
211
|
+
})
|
|
212
|
+
]
|
|
254
213
|
})
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
214
|
+
})
|
|
215
|
+
]
|
|
216
|
+
}),
|
|
217
|
+
showFieldActions && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
218
|
+
children: [
|
|
219
|
+
onGenerateWithAi && !claimed.ai && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_header_actions_cjs_namespaceObject.AiAssistControl, {
|
|
220
|
+
header: header,
|
|
221
|
+
onGenerate: onGenerateWithAi
|
|
222
|
+
}),
|
|
223
|
+
!claimed.insert && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_header_actions_cjs_namespaceObject.InsertVariableControl, {
|
|
224
|
+
header: header
|
|
225
|
+
})
|
|
226
|
+
]
|
|
227
|
+
}),
|
|
228
|
+
headerActions
|
|
229
|
+
]
|
|
230
|
+
}) : void 0
|
|
231
|
+
})
|
|
262
232
|
})
|
|
263
233
|
});
|
|
264
234
|
}
|