@uipath/apollo-wind 2.59.0 → 2.60.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/ui/datetime-picker.cjs +19 -3
- package/dist/components/ui/datetime-picker.d.ts +2 -0
- package/dist/components/ui/datetime-picker.js +19 -3
- package/dist/components/ui/field-actions/insert-variable-action.cjs +1 -1
- package/dist/components/ui/field-actions/insert-variable-action.d.ts +5 -2
- package/dist/components/ui/field-actions/insert-variable-action.js +1 -1
- package/dist/components/ui/field-addons/field-menu.cjs +2 -2
- package/dist/components/ui/field-addons/field-menu.d.ts +4 -2
- package/dist/components/ui/field-addons/field-menu.js +2 -2
- package/dist/components/ui/index.cjs +100 -89
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.js +1 -0
- package/dist/components/ui/lockable-value-field/index.cjs +5 -5
- package/dist/components/ui/lockable-value-field/index.d.ts +18 -3
- package/dist/components/ui/lockable-value-field/index.js +2 -2
- package/dist/components/ui/quick-form-field/components/field-header.cjs +265 -0
- package/dist/components/ui/quick-form-field/components/field-header.d.ts +23 -0
- package/dist/components/ui/quick-form-field/components/field-header.js +231 -0
- package/dist/components/ui/{lockable-value-field → quick-form-field}/components/lock-toggle-button.cjs +3 -3
- package/dist/components/ui/{lockable-value-field → quick-form-field}/components/lock-toggle-button.d.ts +4 -1
- package/dist/components/ui/{lockable-value-field → quick-form-field}/components/lock-toggle-button.js +3 -3
- package/dist/components/ui/quick-form-field/index.cjs +46 -0
- package/dist/components/ui/quick-form-field/index.d.ts +3 -0
- package/dist/components/ui/quick-form-field/index.js +3 -0
- package/dist/components/ui/{lockable-value-field/lockable-value-field.cjs → quick-form-field/quick-form-field.cjs} +190 -119
- package/dist/components/ui/quick-form-field/quick-form-field.d.ts +26 -0
- package/dist/components/ui/{lockable-value-field/lockable-value-field.js → quick-form-field/quick-form-field.js} +194 -123
- package/dist/components/ui/{lockable-value-field → quick-form-field}/types.cjs +70 -0
- package/dist/components/ui/quick-form-field/types.d.ts +245 -0
- package/dist/components/ui/quick-form-field/types.js +137 -0
- package/dist/components/ui/{lockable-value-field → quick-form-field}/utils.cjs +21 -3
- package/dist/components/ui/{lockable-value-field → quick-form-field}/utils.d.ts +8 -3
- package/dist/components/ui/{lockable-value-field → quick-form-field}/utils.js +19 -4
- package/dist/index.cjs +9 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +3 -2
- package/package.json +1 -1
- package/dist/components/ui/lockable-value-field/components/field-header.cjs +0 -242
- package/dist/components/ui/lockable-value-field/components/field-header.d.ts +0 -19
- package/dist/components/ui/lockable-value-field/components/field-header.js +0 -208
- package/dist/components/ui/lockable-value-field/lockable-value-field.d.ts +0 -14
- package/dist/components/ui/lockable-value-field/types.d.ts +0 -109
- package/dist/components/ui/lockable-value-field/types.js +0 -70
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { type LucideIcon } from 'lucide-react';
|
|
2
|
+
import type { AriaAttributes, ReactNode } from 'react';
|
|
3
|
+
import type { ValueMode } from '../field-addons/value-mode-strings';
|
|
4
|
+
export type QuickFormFieldMode = ValueMode;
|
|
5
|
+
export type QuickFieldType = 'string' | 'integer' | 'double' | 'date' | 'datetime' | 'boolean' | 'single-select' | 'multi-select' | 'array' | 'file' | 'object';
|
|
6
|
+
interface FieldTypeMeta {
|
|
7
|
+
label: string;
|
|
8
|
+
icon: LucideIcon;
|
|
9
|
+
supportsExpression: boolean;
|
|
10
|
+
fixedLabel: string;
|
|
11
|
+
fixedDescription: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const FIELD_TYPE_META: Record<QuickFieldType, FieldTypeMeta>;
|
|
14
|
+
export declare const FIELD_TYPE_ORDER: QuickFieldType[];
|
|
15
|
+
/**
|
|
16
|
+
* Every piece of user-visible text the component renders. The component owns no
|
|
17
|
+
* translation catalog, so a localized consumer supplies its own words; the
|
|
18
|
+
* defaults are English.
|
|
19
|
+
*
|
|
20
|
+
* Type labels live here rather than in FIELD_TYPE_META: the meta table defines
|
|
21
|
+
* the vocabulary, these are display strings.
|
|
22
|
+
*/
|
|
23
|
+
export interface QuickFormFieldStrings {
|
|
24
|
+
fieldTypeTooltip: string;
|
|
25
|
+
fieldTypeAriaLabel: string;
|
|
26
|
+
typeLabels: Partial<Record<QuickFieldType, string>>;
|
|
27
|
+
/** The literal mode item's label per type; falls back to FIELD_TYPE_META's `fixedLabel`. */
|
|
28
|
+
literalLabels: Partial<Record<QuickFieldType, string>>;
|
|
29
|
+
/** The literal mode item's description per type; falls back to FIELD_TYPE_META's `fixedDescription`. */
|
|
30
|
+
literalDescriptions: Partial<Record<QuickFieldType, string>>;
|
|
31
|
+
/** The computed field name in literal mode, from the (localized) type label. */
|
|
32
|
+
valueFieldLabel: (typeLabel: string) => string;
|
|
33
|
+
/** The computed field name in expression mode, from the (localized) type label. */
|
|
34
|
+
expressionFieldLabel: (typeLabel: string) => string;
|
|
35
|
+
/** A locked boolean's displayed text. */
|
|
36
|
+
trueLabel: string;
|
|
37
|
+
falseLabel: string;
|
|
38
|
+
requiredTooltip: string;
|
|
39
|
+
requiredAriaLabel: string;
|
|
40
|
+
optionalAriaLabel: string;
|
|
41
|
+
insertLabel: string;
|
|
42
|
+
insertAriaLabel: string;
|
|
43
|
+
/** The variable picker's search box. */
|
|
44
|
+
insertSearchPlaceholder: string;
|
|
45
|
+
/** The variable picker with nothing to show. */
|
|
46
|
+
insertEmpty: string;
|
|
47
|
+
valueModeAriaLabel: string;
|
|
48
|
+
expressionLabel: string;
|
|
49
|
+
expressionDescription: string;
|
|
50
|
+
pickDate: string;
|
|
51
|
+
selectOption: string;
|
|
52
|
+
selectOptions: string;
|
|
53
|
+
moreActionsAriaLabel: string;
|
|
54
|
+
clearValue: string;
|
|
55
|
+
forceRefresh: string;
|
|
56
|
+
aiAssistAriaLabel: string;
|
|
57
|
+
aiAssistTooltip: string;
|
|
58
|
+
aiPromptLabel: string;
|
|
59
|
+
aiPromptPlaceholder: string;
|
|
60
|
+
aiGenerate: string;
|
|
61
|
+
/** Replaces `aiGenerate` while a returned promise is pending. */
|
|
62
|
+
aiGenerating: string;
|
|
63
|
+
/** Shown when a returned promise rejects. */
|
|
64
|
+
aiError: string;
|
|
65
|
+
/** What the AI produces for the field, from the (localized) type label. */
|
|
66
|
+
aiOutputLabel: (typeLabel: string, isExpression: boolean) => string;
|
|
67
|
+
aiOutputHint: (output: string) => string;
|
|
68
|
+
lockedLabel: string;
|
|
69
|
+
unlockedLabel: string;
|
|
70
|
+
lockedHint: string;
|
|
71
|
+
unlockedHint: string;
|
|
72
|
+
}
|
|
73
|
+
export declare const DEFAULT_QUICK_FORM_FIELD_STRINGS: QuickFormFieldStrings;
|
|
74
|
+
export interface QuickFormFieldOption {
|
|
75
|
+
label: string;
|
|
76
|
+
value: string;
|
|
77
|
+
/**
|
|
78
|
+
* Nested entries for the Insert-variable tree, rendered as supplied. Only the
|
|
79
|
+
* consumer knows whether the path a grouping implies is real, so the tree
|
|
80
|
+
* invents neither a root nor a type.
|
|
81
|
+
*/
|
|
82
|
+
children?: QuickFormFieldOption[];
|
|
83
|
+
/** Type badge shown against the entry. */
|
|
84
|
+
type?: string;
|
|
85
|
+
}
|
|
86
|
+
export interface QuickFormFieldMoreActions {
|
|
87
|
+
onClear?: () => void;
|
|
88
|
+
onRefresh?: () => void;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Where the caret was when a variable was chosen, so the consumer can splice
|
|
92
|
+
* rather than append. The component tracks it because it owns the input;
|
|
93
|
+
* `caret` is null when the author has not placed one, which means "append".
|
|
94
|
+
*/
|
|
95
|
+
export interface VariableInsertContext {
|
|
96
|
+
value: string;
|
|
97
|
+
caret: {
|
|
98
|
+
start: number;
|
|
99
|
+
end: number;
|
|
100
|
+
} | null;
|
|
101
|
+
}
|
|
102
|
+
export interface QuickFormFieldProps {
|
|
103
|
+
/** Current field value. Encoding depends on fieldType (e.g. multi-select is a JSON array string). */
|
|
104
|
+
value?: string;
|
|
105
|
+
/** Called when the user edits the value (only fires while unlocked). */
|
|
106
|
+
onValueChange?: (value: string) => void;
|
|
107
|
+
/** Called when the active value control loses focus. */
|
|
108
|
+
onValueBlur?: () => void;
|
|
109
|
+
/** Whether the field is read-only. Defaults to true. */
|
|
110
|
+
locked?: boolean;
|
|
111
|
+
/** Called when the user toggles the lock. */
|
|
112
|
+
onLockedChange?: (locked: boolean) => void;
|
|
113
|
+
/** Whether the built-in lock control renders. Defaults to true. */
|
|
114
|
+
showLock?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Replaces the leading lock toggle with a semantic prefix such as `=`.
|
|
117
|
+
* Pass `null` to suppress the built-in toggle; omitting the prop preserves it.
|
|
118
|
+
*/
|
|
119
|
+
leadingAddon?: ReactNode;
|
|
120
|
+
/**
|
|
121
|
+
* Replaces the trailing fixed/expression menu with a consumer-provided action
|
|
122
|
+
* for expression-capable field types. Pass `null` to suppress the built-in
|
|
123
|
+
* menu; omitting the prop preserves it.
|
|
124
|
+
*/
|
|
125
|
+
trailingAddon?: ReactNode;
|
|
126
|
+
/** Adds a field-level overflow menu beside the value control. */
|
|
127
|
+
more?: QuickFormFieldMoreActions;
|
|
128
|
+
/** How the value is expressed. Defaults to 'literal'; `expression` falls back to `literal` for types that cannot hold one. */
|
|
129
|
+
mode?: QuickFormFieldMode;
|
|
130
|
+
/** Called when the user switches modes. */
|
|
131
|
+
onModeChange?: (mode: QuickFormFieldMode) => void;
|
|
132
|
+
/**
|
|
133
|
+
* Optional expression editor used in place of the built-in monospace input.
|
|
134
|
+
* Consumers can use this to supply a syntax-aware editor such as Monaco.
|
|
135
|
+
*
|
|
136
|
+
* Superseded by `renderModeControl`, which covers every mode. Kept for
|
|
137
|
+
* existing callers; `renderModeControl` wins when both are supplied and it
|
|
138
|
+
* returns something for `expression`.
|
|
139
|
+
*/
|
|
140
|
+
renderExpressionEditor?: (props: {
|
|
141
|
+
id: string;
|
|
142
|
+
value: string;
|
|
143
|
+
onValueChange?: (value: string) => void;
|
|
144
|
+
onBlur?: () => void;
|
|
145
|
+
readOnly: boolean;
|
|
146
|
+
placeholder: string;
|
|
147
|
+
fieldType: QuickFieldType;
|
|
148
|
+
'aria-invalid'?: AriaAttributes['aria-invalid'];
|
|
149
|
+
'aria-describedby'?: string;
|
|
150
|
+
'aria-errormessage'?: string;
|
|
151
|
+
'data-slot'?: string;
|
|
152
|
+
}) => ReactNode;
|
|
153
|
+
/**
|
|
154
|
+
* Renders the value control for a given mode, replacing the built-in one.
|
|
155
|
+
* `variable` and `prompt` have no built-in editor, and a surface that authors
|
|
156
|
+
* its own choices can replace the `literal` control too.
|
|
157
|
+
*
|
|
158
|
+
* Returning nothing (or omitting this) falls back to the built-in control
|
|
159
|
+
* for the field's type, so an unhandled mode degrades to the literal editor
|
|
160
|
+
* rather than rendering an empty row.
|
|
161
|
+
*/
|
|
162
|
+
renderModeControl?: (mode: QuickFormFieldMode, props: {
|
|
163
|
+
id: string;
|
|
164
|
+
value: string;
|
|
165
|
+
onValueChange?: (value: string) => void;
|
|
166
|
+
onBlur?: () => void;
|
|
167
|
+
readOnly: boolean;
|
|
168
|
+
placeholder: string;
|
|
169
|
+
fieldType: QuickFieldType;
|
|
170
|
+
'aria-invalid'?: AriaAttributes['aria-invalid'];
|
|
171
|
+
'aria-describedby'?: string;
|
|
172
|
+
'aria-errormessage'?: string;
|
|
173
|
+
'data-slot'?: string;
|
|
174
|
+
}) => ReactNode;
|
|
175
|
+
/**
|
|
176
|
+
* Takes over what choosing a variable does to the value. The component owns
|
|
177
|
+
* the picker and hands back the chosen entry exactly as supplied in
|
|
178
|
+
* `variables`, with the caret.
|
|
179
|
+
*
|
|
180
|
+
* A value that is one reference must be replaced rather than appended, and a
|
|
181
|
+
* variable may carry its type onto the field, so the consumer decides. Omit
|
|
182
|
+
* to splice at the caret, or append when no caret has been placed.
|
|
183
|
+
*/
|
|
184
|
+
onInsertVariable?: (variable: QuickFormFieldOption,
|
|
185
|
+
/**
|
|
186
|
+
* Where the caret was, so the consumer can splice rather than append.
|
|
187
|
+
* The component tracks this because it owns the input; `caret` is null
|
|
188
|
+
* when the author has not placed one, which means "append".
|
|
189
|
+
*/
|
|
190
|
+
context: VariableInsertContext) => void;
|
|
191
|
+
/** The field's data type. Defaults to 'string'. Determines which control renders the value. */
|
|
192
|
+
fieldType?: QuickFieldType;
|
|
193
|
+
/**
|
|
194
|
+
* Which types the picker offers, in display order. Defaults to
|
|
195
|
+
* `FIELD_TYPE_ORDER`, every type the component can render; a surface with a
|
|
196
|
+
* narrower vocabulary of its own offers fewer.
|
|
197
|
+
*/
|
|
198
|
+
fieldTypes?: readonly QuickFieldType[];
|
|
199
|
+
/** Called when the user switches the field type. */
|
|
200
|
+
onFieldTypeChange?: (fieldType: QuickFieldType) => void;
|
|
201
|
+
/** Shows a required-field asterisk next to the default label. Ignored when `label` is provided. */
|
|
202
|
+
required?: boolean;
|
|
203
|
+
/** Called when the user toggles required/optional. Renders the Required switch when provided. */
|
|
204
|
+
onRequiredChange?: (required: boolean) => void;
|
|
205
|
+
/** Overrides the default mode-based label (e.g. a field name instead of "String value"). */
|
|
206
|
+
label?: ReactNode;
|
|
207
|
+
/**
|
|
208
|
+
* Overrides the placeholder on the value control. The computed default names
|
|
209
|
+
* only the type; the accessible label still falls back to it.
|
|
210
|
+
*/
|
|
211
|
+
placeholder?: string;
|
|
212
|
+
/** Overrides for any subset of the user-visible text; see QuickFormFieldStrings. */
|
|
213
|
+
strings?: Partial<QuickFormFieldStrings>;
|
|
214
|
+
/** Field-specific validation feedback rendered immediately below the active control. */
|
|
215
|
+
error?: ReactNode;
|
|
216
|
+
/** Optional id for the inline validation message. */
|
|
217
|
+
errorId?: string;
|
|
218
|
+
/** Content rendered below the value control, such as a related checkbox or help text. */
|
|
219
|
+
belowValue?: ReactNode;
|
|
220
|
+
/** Accessible name for the file-upload dropzone. Defaults to a string `label`, then the computed field label. */
|
|
221
|
+
fileUploadAriaLabel?: string;
|
|
222
|
+
/** Extra content rendered after the built-in AI assist / Insert variable buttons (e.g. a delete button). */
|
|
223
|
+
headerActions?: ReactNode;
|
|
224
|
+
/** Forces the header row into its narrow-container icon-only layout, regardless of actual width. For demos/comparisons. */
|
|
225
|
+
compact?: boolean;
|
|
226
|
+
/** Whether the AI-assist and Insert-variable actions render at all. Set to false for read-only reviewer contexts where field configuration isn't editable. Defaults to true. */
|
|
227
|
+
showFieldActions?: boolean;
|
|
228
|
+
/** Options for 'single-select' / 'multi-select' field types. Defaults to a small set of demo options. */
|
|
229
|
+
options?: QuickFormFieldOption[];
|
|
230
|
+
/**
|
|
231
|
+
* Called with the entered prompt when the user clicks Generate.
|
|
232
|
+
*
|
|
233
|
+
* Its presence also decides whether the AI-assist button renders: without a
|
|
234
|
+
* handler the button would have nothing to do.
|
|
235
|
+
*/
|
|
236
|
+
onGenerateWithAi?: (prompt: string) => void;
|
|
237
|
+
/**
|
|
238
|
+
* Variables offered by the "Insert variable" popover; clicking one appends its value to the
|
|
239
|
+
* current value. The button is disabled when this is empty (the default).
|
|
240
|
+
*/
|
|
241
|
+
variables?: QuickFormFieldOption[];
|
|
242
|
+
id?: string;
|
|
243
|
+
className?: string;
|
|
244
|
+
}
|
|
245
|
+
export {};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { ALargeSmall, Braces, Brackets, Calendar, CalendarClock, File, Hash, List, ListChecks, Sigma, ToggleLeft } from "lucide-react";
|
|
2
|
+
const FIELD_TYPE_META = {
|
|
3
|
+
string: {
|
|
4
|
+
label: 'String',
|
|
5
|
+
icon: ALargeSmall,
|
|
6
|
+
supportsExpression: true,
|
|
7
|
+
fixedLabel: 'Fixed value',
|
|
8
|
+
fixedDescription: 'Use a literal string value'
|
|
9
|
+
},
|
|
10
|
+
integer: {
|
|
11
|
+
label: 'Integer',
|
|
12
|
+
icon: Hash,
|
|
13
|
+
supportsExpression: true,
|
|
14
|
+
fixedLabel: 'Fixed value',
|
|
15
|
+
fixedDescription: 'Use a literal number value'
|
|
16
|
+
},
|
|
17
|
+
double: {
|
|
18
|
+
label: 'Decimal number',
|
|
19
|
+
icon: Sigma,
|
|
20
|
+
supportsExpression: true,
|
|
21
|
+
fixedLabel: 'Fixed value',
|
|
22
|
+
fixedDescription: 'Use a literal decimal value'
|
|
23
|
+
},
|
|
24
|
+
date: {
|
|
25
|
+
label: 'Date',
|
|
26
|
+
icon: Calendar,
|
|
27
|
+
supportsExpression: true,
|
|
28
|
+
fixedLabel: 'Fixed date',
|
|
29
|
+
fixedDescription: 'Use a literal date value'
|
|
30
|
+
},
|
|
31
|
+
datetime: {
|
|
32
|
+
label: 'Date and time',
|
|
33
|
+
icon: CalendarClock,
|
|
34
|
+
supportsExpression: true,
|
|
35
|
+
fixedLabel: 'Fixed date and time',
|
|
36
|
+
fixedDescription: 'Use a literal date and time value'
|
|
37
|
+
},
|
|
38
|
+
boolean: {
|
|
39
|
+
label: 'Boolean',
|
|
40
|
+
icon: ToggleLeft,
|
|
41
|
+
supportsExpression: true,
|
|
42
|
+
fixedLabel: 'Fixed value',
|
|
43
|
+
fixedDescription: 'Use a literal true or false value'
|
|
44
|
+
},
|
|
45
|
+
'single-select': {
|
|
46
|
+
label: 'Single select',
|
|
47
|
+
icon: List,
|
|
48
|
+
supportsExpression: false,
|
|
49
|
+
fixedLabel: 'Fixed value',
|
|
50
|
+
fixedDescription: 'Choose one option'
|
|
51
|
+
},
|
|
52
|
+
'multi-select': {
|
|
53
|
+
label: 'Multi select',
|
|
54
|
+
icon: ListChecks,
|
|
55
|
+
supportsExpression: false,
|
|
56
|
+
fixedLabel: 'Fixed value',
|
|
57
|
+
fixedDescription: 'Choose one or more options'
|
|
58
|
+
},
|
|
59
|
+
array: {
|
|
60
|
+
label: 'Array',
|
|
61
|
+
icon: Brackets,
|
|
62
|
+
supportsExpression: true,
|
|
63
|
+
fixedLabel: 'Fixed value',
|
|
64
|
+
fixedDescription: 'Use a literal JSON array'
|
|
65
|
+
},
|
|
66
|
+
file: {
|
|
67
|
+
label: 'File',
|
|
68
|
+
icon: File,
|
|
69
|
+
supportsExpression: true,
|
|
70
|
+
fixedLabel: 'Fixed value',
|
|
71
|
+
fixedDescription: 'Upload a file'
|
|
72
|
+
},
|
|
73
|
+
object: {
|
|
74
|
+
label: 'Object',
|
|
75
|
+
icon: Braces,
|
|
76
|
+
supportsExpression: true,
|
|
77
|
+
fixedLabel: 'Fixed value',
|
|
78
|
+
fixedDescription: 'Use a literal object value'
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
const FIELD_TYPE_ORDER = [
|
|
82
|
+
'string',
|
|
83
|
+
'integer',
|
|
84
|
+
'double',
|
|
85
|
+
'date',
|
|
86
|
+
'datetime',
|
|
87
|
+
'boolean',
|
|
88
|
+
'single-select',
|
|
89
|
+
'multi-select',
|
|
90
|
+
'array',
|
|
91
|
+
'file',
|
|
92
|
+
'object'
|
|
93
|
+
];
|
|
94
|
+
const DEFAULT_QUICK_FORM_FIELD_STRINGS = {
|
|
95
|
+
fieldTypeTooltip: 'Type',
|
|
96
|
+
fieldTypeAriaLabel: 'Field type',
|
|
97
|
+
typeLabels: {},
|
|
98
|
+
literalLabels: {},
|
|
99
|
+
literalDescriptions: {},
|
|
100
|
+
valueFieldLabel: (typeLabel)=>`${typeLabel} value`,
|
|
101
|
+
expressionFieldLabel: (typeLabel)=>{
|
|
102
|
+
const type = typeLabel.toLowerCase();
|
|
103
|
+
return `Write ${/^[aeiou]/.test(type) ? 'an' : 'a'} ${type} expression`;
|
|
104
|
+
},
|
|
105
|
+
trueLabel: 'True',
|
|
106
|
+
falseLabel: 'False',
|
|
107
|
+
requiredTooltip: 'Required',
|
|
108
|
+
requiredAriaLabel: 'Required field',
|
|
109
|
+
optionalAriaLabel: 'Optional field',
|
|
110
|
+
insertLabel: 'Insert',
|
|
111
|
+
insertAriaLabel: 'Insert variable',
|
|
112
|
+
insertSearchPlaceholder: 'Search variables...',
|
|
113
|
+
insertEmpty: 'No variables found.',
|
|
114
|
+
valueModeAriaLabel: 'Choose value mode',
|
|
115
|
+
expressionLabel: 'Expression',
|
|
116
|
+
expressionDescription: 'Use a JS expression',
|
|
117
|
+
pickDate: 'Pick a date',
|
|
118
|
+
selectOption: 'Select an option',
|
|
119
|
+
selectOptions: 'Select options...',
|
|
120
|
+
moreActionsAriaLabel: 'More value actions',
|
|
121
|
+
clearValue: 'Clear value',
|
|
122
|
+
forceRefresh: 'Force refresh',
|
|
123
|
+
aiAssistAriaLabel: 'AI assist',
|
|
124
|
+
aiAssistTooltip: 'Generate with AI',
|
|
125
|
+
aiPromptLabel: 'Describe what you want',
|
|
126
|
+
aiPromptPlaceholder: 'Display a value from the previous step',
|
|
127
|
+
aiGenerate: 'Generate',
|
|
128
|
+
aiGenerating: 'Generating',
|
|
129
|
+
aiError: 'Could not generate a value. Try again.',
|
|
130
|
+
aiOutputLabel: (typeLabel, isExpression)=>`${typeLabel} ${isExpression ? 'expression' : 'value'}`,
|
|
131
|
+
aiOutputHint: (output)=>`Output: ${output}`,
|
|
132
|
+
lockedLabel: 'Read-only',
|
|
133
|
+
unlockedLabel: 'Editable',
|
|
134
|
+
lockedHint: 'Read-only. Click to make editable.',
|
|
135
|
+
unlockedHint: 'Editable. Click to make read-only.'
|
|
136
|
+
};
|
|
137
|
+
export { DEFAULT_QUICK_FORM_FIELD_STRINGS, FIELD_TYPE_META, FIELD_TYPE_ORDER };
|
|
@@ -25,6 +25,7 @@ var __webpack_exports__ = {};
|
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
27
|
DEFAULT_SELECT_OPTIONS: ()=>DEFAULT_SELECT_OPTIONS,
|
|
28
|
+
formatDateTimeValue: ()=>formatDateTimeValue,
|
|
28
29
|
formatDateValue: ()=>formatDateValue,
|
|
29
30
|
getLockedDisplayValue: ()=>getLockedDisplayValue,
|
|
30
31
|
parseDateValue: ()=>parseDateValue,
|
|
@@ -78,14 +79,29 @@ function formatDateValue(value) {
|
|
|
78
79
|
day: 'numeric'
|
|
79
80
|
}) : value;
|
|
80
81
|
}
|
|
81
|
-
function
|
|
82
|
+
function formatDateTimeValue(value) {
|
|
83
|
+
const date = parseDateValue(value);
|
|
84
|
+
return date ? date.toLocaleString(void 0, {
|
|
85
|
+
year: 'numeric',
|
|
86
|
+
month: 'long',
|
|
87
|
+
day: 'numeric',
|
|
88
|
+
hour: 'numeric',
|
|
89
|
+
minute: '2-digit'
|
|
90
|
+
}) : value;
|
|
91
|
+
}
|
|
92
|
+
function getLockedDisplayValue(fieldType, value, options, booleanLabels = {
|
|
93
|
+
trueLabel: 'True',
|
|
94
|
+
falseLabel: 'False'
|
|
95
|
+
}) {
|
|
82
96
|
switch(fieldType){
|
|
83
97
|
case 'boolean':
|
|
84
|
-
if ('true' === value) return
|
|
85
|
-
if ('false' === value) return
|
|
98
|
+
if ('true' === value) return booleanLabels.trueLabel;
|
|
99
|
+
if ('false' === value) return booleanLabels.falseLabel;
|
|
86
100
|
return '';
|
|
87
101
|
case 'date':
|
|
88
102
|
return value ? formatDateValue(value) : '';
|
|
103
|
+
case 'datetime':
|
|
104
|
+
return value ? formatDateTimeValue(value) : '';
|
|
89
105
|
case 'single-select':
|
|
90
106
|
return options.find((option)=>option.value === value)?.label ?? value;
|
|
91
107
|
case 'multi-select':
|
|
@@ -99,6 +115,7 @@ function getLockedDisplayValue(fieldType, value, options) {
|
|
|
99
115
|
}
|
|
100
116
|
}
|
|
101
117
|
exports.DEFAULT_SELECT_OPTIONS = __webpack_exports__.DEFAULT_SELECT_OPTIONS;
|
|
118
|
+
exports.formatDateTimeValue = __webpack_exports__.formatDateTimeValue;
|
|
102
119
|
exports.formatDateValue = __webpack_exports__.formatDateValue;
|
|
103
120
|
exports.getLockedDisplayValue = __webpack_exports__.getLockedDisplayValue;
|
|
104
121
|
exports.parseDateValue = __webpack_exports__.parseDateValue;
|
|
@@ -106,6 +123,7 @@ exports.parseListValue = __webpack_exports__.parseListValue;
|
|
|
106
123
|
exports.toDateOnlyString = __webpack_exports__.toDateOnlyString;
|
|
107
124
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
108
125
|
"DEFAULT_SELECT_OPTIONS",
|
|
126
|
+
"formatDateTimeValue",
|
|
109
127
|
"formatDateValue",
|
|
110
128
|
"getLockedDisplayValue",
|
|
111
129
|
"parseDateValue",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const DEFAULT_SELECT_OPTIONS:
|
|
1
|
+
import type { QuickFieldType, QuickFormFieldOption } from './types';
|
|
2
|
+
export declare const DEFAULT_SELECT_OPTIONS: QuickFormFieldOption[];
|
|
3
3
|
export declare function parseListValue(value: string): string[];
|
|
4
4
|
/**
|
|
5
5
|
* Parses a date field's stored value, returning undefined for empty or invalid input.
|
|
@@ -15,10 +15,15 @@ export declare function parseDateValue(value: string): Date | undefined;
|
|
|
15
15
|
export declare function toDateOnlyString(date: Date): string;
|
|
16
16
|
/** Formats a date field's value for display, falling back to the raw value if it isn't a valid date. */
|
|
17
17
|
export declare function formatDateValue(value: string): string;
|
|
18
|
+
/** Formats a datetime field's value, falling back to the raw value when unparseable. */
|
|
19
|
+
export declare function formatDateTimeValue(value: string): string;
|
|
18
20
|
/**
|
|
19
21
|
* Computes the plain-text shown in place of the real control once a field is locked.
|
|
20
22
|
* Boolean/single-select/multi-select resolve their stored value to a display label;
|
|
21
23
|
* everything else (including an invalid date, so the component never throws on
|
|
22
24
|
* external input) falls back to the raw value.
|
|
23
25
|
*/
|
|
24
|
-
export declare function getLockedDisplayValue(fieldType:
|
|
26
|
+
export declare function getLockedDisplayValue(fieldType: QuickFieldType, value: string, options: QuickFormFieldOption[], booleanLabels?: {
|
|
27
|
+
trueLabel: string;
|
|
28
|
+
falseLabel: string;
|
|
29
|
+
}): string;
|
|
@@ -45,14 +45,29 @@ function formatDateValue(value) {
|
|
|
45
45
|
day: 'numeric'
|
|
46
46
|
}) : value;
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function formatDateTimeValue(value) {
|
|
49
|
+
const date = parseDateValue(value);
|
|
50
|
+
return date ? date.toLocaleString(void 0, {
|
|
51
|
+
year: 'numeric',
|
|
52
|
+
month: 'long',
|
|
53
|
+
day: 'numeric',
|
|
54
|
+
hour: 'numeric',
|
|
55
|
+
minute: '2-digit'
|
|
56
|
+
}) : value;
|
|
57
|
+
}
|
|
58
|
+
function getLockedDisplayValue(fieldType, value, options, booleanLabels = {
|
|
59
|
+
trueLabel: 'True',
|
|
60
|
+
falseLabel: 'False'
|
|
61
|
+
}) {
|
|
49
62
|
switch(fieldType){
|
|
50
63
|
case 'boolean':
|
|
51
|
-
if ('true' === value) return
|
|
52
|
-
if ('false' === value) return
|
|
64
|
+
if ('true' === value) return booleanLabels.trueLabel;
|
|
65
|
+
if ('false' === value) return booleanLabels.falseLabel;
|
|
53
66
|
return '';
|
|
54
67
|
case 'date':
|
|
55
68
|
return value ? formatDateValue(value) : '';
|
|
69
|
+
case 'datetime':
|
|
70
|
+
return value ? formatDateTimeValue(value) : '';
|
|
56
71
|
case 'single-select':
|
|
57
72
|
return options.find((option)=>option.value === value)?.label ?? value;
|
|
58
73
|
case 'multi-select':
|
|
@@ -65,4 +80,4 @@ function getLockedDisplayValue(fieldType, value, options) {
|
|
|
65
80
|
return value;
|
|
66
81
|
}
|
|
67
82
|
}
|
|
68
|
-
export { DEFAULT_SELECT_OPTIONS, formatDateValue, getLockedDisplayValue, parseDateValue, parseListValue, toDateOnlyString };
|
|
83
|
+
export { DEFAULT_SELECT_OPTIONS, formatDateTimeValue, formatDateValue, getLockedDisplayValue, parseDateValue, parseListValue, toDateOnlyString };
|
package/dist/index.cjs
CHANGED
|
@@ -43,7 +43,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
43
43
|
DropdownMenuSubContent: ()=>dropdown_menu_cjs_namespaceObject.DropdownMenuSubContent,
|
|
44
44
|
CommandEmpty: ()=>command_cjs_namespaceObject.CommandEmpty,
|
|
45
45
|
Skeleton: ()=>skeleton_cjs_namespaceObject.Skeleton,
|
|
46
|
-
FIELD_TYPE_ORDER: ()=>
|
|
46
|
+
FIELD_TYPE_ORDER: ()=>quick_form_field_index_cjs_namespaceObject.FIELD_TYPE_ORDER,
|
|
47
47
|
FormFieldHeader: ()=>form_field_cjs_namespaceObject.FormFieldHeader,
|
|
48
48
|
auditPlugin: ()=>form_plugins_cjs_namespaceObject.auditPlugin,
|
|
49
49
|
ContextMenuLabel: ()=>context_menu_cjs_namespaceObject.ContextMenuLabel,
|
|
@@ -232,6 +232,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
232
232
|
DrawerTitle: ()=>drawer_cjs_namespaceObject.DrawerTitle,
|
|
233
233
|
EditableCell: ()=>editable_cell_cjs_namespaceObject.EditableCell,
|
|
234
234
|
ScrollableTabsList: ()=>tabs_cjs_namespaceObject.ScrollableTabsList,
|
|
235
|
+
QuickFormField: ()=>quick_form_field_index_cjs_namespaceObject.QuickFormField,
|
|
235
236
|
TabsContent: ()=>tabs_cjs_namespaceObject.TabsContent,
|
|
236
237
|
TooltipContent: ()=>tooltip_cjs_namespaceObject.TooltipContent,
|
|
237
238
|
DropdownMenuGroup: ()=>dropdown_menu_cjs_namespaceObject.DropdownMenuGroup,
|
|
@@ -322,6 +323,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
322
323
|
PaginationPrevious: ()=>pagination_cjs_namespaceObject.PaginationPrevious,
|
|
323
324
|
SheetPortal: ()=>sheet_cjs_namespaceObject.SheetPortal,
|
|
324
325
|
isFileField: ()=>form_schema_cjs_namespaceObject.isFileField,
|
|
326
|
+
DEFAULT_QUICK_FORM_FIELD_STRINGS: ()=>quick_form_field_index_cjs_namespaceObject.DEFAULT_QUICK_FORM_FIELD_STRINGS,
|
|
325
327
|
AlertDialogDescription: ()=>alert_dialog_cjs_namespaceObject.AlertDialogDescription,
|
|
326
328
|
groupModels: ()=>model_picker_index_cjs_namespaceObject.groupModels,
|
|
327
329
|
CommandInput: ()=>command_cjs_namespaceObject.CommandInput,
|
|
@@ -347,7 +349,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
347
349
|
InputGroupRow: ()=>input_group_cjs_namespaceObject.InputGroupRow,
|
|
348
350
|
ResourceTokenNode: ()=>prompt_editor_index_cjs_namespaceObject.ResourceTokenNode,
|
|
349
351
|
$insertTokenAtCursor: ()=>prompt_editor_index_cjs_namespaceObject.$insertTokenAtCursor,
|
|
350
|
-
FIELD_TYPE_META: ()=>
|
|
352
|
+
FIELD_TYPE_META: ()=>quick_form_field_index_cjs_namespaceObject.FIELD_TYPE_META,
|
|
351
353
|
SelectTrigger: ()=>select_cjs_namespaceObject.SelectTrigger,
|
|
352
354
|
DataTransformers: ()=>data_fetcher_cjs_namespaceObject.DataTransformers,
|
|
353
355
|
DrawerTrigger: ()=>drawer_cjs_namespaceObject.DrawerTrigger,
|
|
@@ -416,6 +418,7 @@ const popover_cjs_namespaceObject = require("./components/ui/popover.cjs");
|
|
|
416
418
|
const portal_container_cjs_namespaceObject = require("./components/ui/portal-container.cjs");
|
|
417
419
|
const progress_cjs_namespaceObject = require("./components/ui/progress.cjs");
|
|
418
420
|
const prompt_editor_index_cjs_namespaceObject = require("./components/ui/prompt-editor/index.cjs");
|
|
421
|
+
const quick_form_field_index_cjs_namespaceObject = require("./components/ui/quick-form-field/index.cjs");
|
|
419
422
|
const radio_group_cjs_namespaceObject = require("./components/ui/radio-group.cjs");
|
|
420
423
|
const resizable_cjs_namespaceObject = require("./components/ui/resizable.cjs");
|
|
421
424
|
const scroll_area_cjs_namespaceObject = require("./components/ui/scroll-area.cjs");
|
|
@@ -524,6 +527,7 @@ exports.DEFAULT_AI_ASSIST_ACTION_STRINGS = __webpack_exports__.DEFAULT_AI_ASSIST
|
|
|
524
527
|
exports.DEFAULT_INSERT_VARIABLE_ACTION_STRINGS = __webpack_exports__.DEFAULT_INSERT_VARIABLE_ACTION_STRINGS;
|
|
525
528
|
exports.DEFAULT_MODEL_PICKER_LABELS = __webpack_exports__.DEFAULT_MODEL_PICKER_LABELS;
|
|
526
529
|
exports.DEFAULT_PROMPT_EDITOR_STRINGS = __webpack_exports__.DEFAULT_PROMPT_EDITOR_STRINGS;
|
|
530
|
+
exports.DEFAULT_QUICK_FORM_FIELD_STRINGS = __webpack_exports__.DEFAULT_QUICK_FORM_FIELD_STRINGS;
|
|
527
531
|
exports.DEFAULT_VALUE_MODE_STRINGS = __webpack_exports__.DEFAULT_VALUE_MODE_STRINGS;
|
|
528
532
|
exports.DataFetcher = __webpack_exports__.DataFetcher;
|
|
529
533
|
exports.DataSourceBuilder = __webpack_exports__.DataSourceBuilder;
|
|
@@ -644,6 +648,7 @@ exports.PopoverTrigger = __webpack_exports__.PopoverTrigger;
|
|
|
644
648
|
exports.PortalContainerProvider = __webpack_exports__.PortalContainerProvider;
|
|
645
649
|
exports.Progress = __webpack_exports__.Progress;
|
|
646
650
|
exports.PromptEditor = __webpack_exports__.PromptEditor;
|
|
651
|
+
exports.QuickFormField = __webpack_exports__.QuickFormField;
|
|
647
652
|
exports.RadioGroup = __webpack_exports__.RadioGroup;
|
|
648
653
|
exports.RadioGroupItem = __webpack_exports__.RadioGroupItem;
|
|
649
654
|
exports.RequiredIndicator = __webpack_exports__.RequiredIndicator;
|
|
@@ -853,6 +858,7 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
|
853
858
|
"DEFAULT_INSERT_VARIABLE_ACTION_STRINGS",
|
|
854
859
|
"DEFAULT_MODEL_PICKER_LABELS",
|
|
855
860
|
"DEFAULT_PROMPT_EDITOR_STRINGS",
|
|
861
|
+
"DEFAULT_QUICK_FORM_FIELD_STRINGS",
|
|
856
862
|
"DEFAULT_VALUE_MODE_STRINGS",
|
|
857
863
|
"DataFetcher",
|
|
858
864
|
"DataSourceBuilder",
|
|
@@ -973,6 +979,7 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
|
973
979
|
"PortalContainerProvider",
|
|
974
980
|
"Progress",
|
|
975
981
|
"PromptEditor",
|
|
982
|
+
"QuickFormField",
|
|
976
983
|
"RadioGroup",
|
|
977
984
|
"RadioGroupItem",
|
|
978
985
|
"RequiredIndicator",
|
package/dist/index.d.ts
CHANGED
|
@@ -69,8 +69,8 @@ export type { GridProps } from './components/ui/layout/grid';
|
|
|
69
69
|
export { Grid } from './components/ui/layout/grid';
|
|
70
70
|
export type { RowProps } from './components/ui/layout/row';
|
|
71
71
|
export { Row } from './components/ui/layout/row';
|
|
72
|
-
export type { LockableFieldType, LockableValueFieldMode, LockableValueFieldMoreActions, LockableValueFieldOption, LockableValueFieldProps, } from './components/ui/lockable-value-field';
|
|
73
|
-
export {
|
|
72
|
+
export type { LockableFieldType, LockableValueFieldMode, LockableValueFieldMoreActions, LockableValueFieldOption, LockableValueFieldProps, LockableValueFieldStrings, } from './components/ui/lockable-value-field';
|
|
73
|
+
export { LockableValueField } from './components/ui/lockable-value-field';
|
|
74
74
|
export type { AnnotatedModel, ByomDetails, CostTier, DeprecationDetails, DeriveModelTagsContext, DiscoveryModel, FolderSwitcherFolder, FolderSwitcherProps, GroupHeaderProps, GroupModelsContext, GroupStrategy, ModelBadgeDefinition, ModelBadgeKind, ModelCostDetails, ModelDetails, ModelFlatCosts, ModelGeography, ModelGroup, ModelOptionRowProps, ModelPickerChangeHandler, ModelPickerLabels, ModelPickerProps, ModelPickerSlotContext, ModelPickerSlots, ModelPickerVariant, ModelSubscriptionType, ModelTag, ModelTagChipProps, ModelTagKind, ModelTieredCost, ModelType, ModelVendor, OptionListProps, PickerPopupProps, PickerSearchInputProps, PickerTriggerProps, RoutingDetails, StaticLabelKey, UseModelPickerStateOptions, UseModelPickerStateResult, } from './components/ui/model-picker';
|
|
75
75
|
export { DEFAULT_MODEL_PICKER_LABELS, defaultCostTier, defaultRowActions, deriveModelTags, FolderSwitcher, filterModels, formatContextWindow, GroupedOptionList, GroupHeader, getSubstitutionTarget, groupModels, isTextGenerationModel, MODEL_BADGES, ModelOptionRow, ModelPicker, ModelTagChip, optionDomId, PickerPopup, PickerSearchInput, PickerTrigger, resolveHomeGeography, resolveLabels, useModelPickerState, VirtualOptionList, } from './components/ui/model-picker';
|
|
76
76
|
export type { MultiSelectProps } from './components/ui/multi-select';
|
|
@@ -82,6 +82,8 @@ export { PortalContainerProvider } from './components/ui/portal-container';
|
|
|
82
82
|
export { Progress } from './components/ui/progress';
|
|
83
83
|
export type { MarkdownPreviewTokenOverride, PromptEditorAutoCompleteOption, PromptEditorAutocompleteMenuProps, PromptEditorDiffType, PromptEditorMode, PromptEditorProps, PromptEditorRef, PromptEditorRenderTokenPill, PromptEditorStrings, PromptEditorToken, PromptEditorTokenPillSlotProps, PromptEditorTokenType, PromptEditorToolbarActiveFormats, PromptTokenNode, TokenPillProps, TokenPillWithTooltipProps, } from './components/ui/prompt-editor';
|
|
84
84
|
export { $insertTokenAtCursor, createInputTokenNode, createOutputTokenNode, createResourceTokenNode, createStateTokenNode, createTokenNodeForOption, DEFAULT_PROMPT_EDITOR_STRINGS, getAllPromptTokenNodes, getEditorTokens, getPromptEditorTokenColors, getPromptEditorTokenTypeLabel, InputTokenNode, inferTokenTypeFromPath, isPromptTokenNode, normalizeRichTextTokens, normalizeVariablePath, OutputTokenNode, PROMPT_EDITOR_RICH_TRANSFORMERS, PromptEditor, ResourceTokenNode, StateTokenNode, setEditorTokens, TokenPill, TokenPillWithTooltip, VARIABLE_DRAG_MIME, VARIABLE_PATH_REGEX, WORD_JOINER, } from './components/ui/prompt-editor';
|
|
85
|
+
export type { QuickFieldType, QuickFormFieldMode, QuickFormFieldMoreActions, QuickFormFieldOption, QuickFormFieldProps, QuickFormFieldStrings, VariableInsertContext, } from './components/ui/quick-form-field';
|
|
86
|
+
export { DEFAULT_QUICK_FORM_FIELD_STRINGS, FIELD_TYPE_META, FIELD_TYPE_ORDER, QuickFormField, } from './components/ui/quick-form-field';
|
|
85
87
|
export { RadioGroup, RadioGroupItem } from './components/ui/radio-group';
|
|
86
88
|
export { ResizableHandle, ResizablePanel, ResizablePanelGroup, } from './components/ui/resizable';
|
|
87
89
|
export { ScrollArea, ScrollBar } from './components/ui/scroll-area';
|
package/dist/index.js
CHANGED
|
@@ -44,7 +44,7 @@ import { Label, RequiredIndicator } from "./components/ui/label.js";
|
|
|
44
44
|
import { Column } from "./components/ui/layout/column.js";
|
|
45
45
|
import { Grid } from "./components/ui/layout/grid.js";
|
|
46
46
|
import { Row } from "./components/ui/layout/row.js";
|
|
47
|
-
import {
|
|
47
|
+
import { LockableValueField } from "./components/ui/lockable-value-field/index.js";
|
|
48
48
|
import { DEFAULT_MODEL_PICKER_LABELS, FolderSwitcher, GroupHeader, GroupedOptionList, MODEL_BADGES, ModelOptionRow, ModelPicker, ModelTagChip, PickerPopup, PickerSearchInput, PickerTrigger, VirtualOptionList, defaultCostTier, defaultRowActions, deriveModelTags, filterModels, formatContextWindow, getSubstitutionTarget, groupModels, isTextGenerationModel, optionDomId, resolveHomeGeography, resolveLabels, useModelPickerState } from "./components/ui/model-picker/index.js";
|
|
49
49
|
import { MultiSelect } from "./components/ui/multi-select.js";
|
|
50
50
|
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "./components/ui/pagination.js";
|
|
@@ -52,6 +52,7 @@ import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "./compon
|
|
|
52
52
|
import { PortalContainerProvider } from "./components/ui/portal-container.js";
|
|
53
53
|
import { Progress } from "./components/ui/progress.js";
|
|
54
54
|
import { $insertTokenAtCursor, DEFAULT_PROMPT_EDITOR_STRINGS, InputTokenNode, OutputTokenNode, PROMPT_EDITOR_RICH_TRANSFORMERS, PromptEditor, ResourceTokenNode, StateTokenNode, TokenPill, TokenPillWithTooltip, VARIABLE_DRAG_MIME, VARIABLE_PATH_REGEX, WORD_JOINER, createInputTokenNode, createOutputTokenNode, createResourceTokenNode, createStateTokenNode, createTokenNodeForOption, getAllPromptTokenNodes, getEditorTokens, getPromptEditorTokenColors, getPromptEditorTokenTypeLabel, inferTokenTypeFromPath, isPromptTokenNode, normalizeRichTextTokens, normalizeVariablePath, setEditorTokens } from "./components/ui/prompt-editor/index.js";
|
|
55
|
+
import { DEFAULT_QUICK_FORM_FIELD_STRINGS, FIELD_TYPE_META, FIELD_TYPE_ORDER, QuickFormField } from "./components/ui/quick-form-field/index.js";
|
|
55
56
|
import { RadioGroup, RadioGroupItem } from "./components/ui/radio-group.js";
|
|
56
57
|
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "./components/ui/resizable.js";
|
|
57
58
|
import { ScrollArea, ScrollBar } from "./components/ui/scroll-area.js";
|
|
@@ -75,4 +76,4 @@ import { Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger
|
|
|
75
76
|
import tree_view, { TreeView } from "./components/ui/tree-view.js";
|
|
76
77
|
import { VariablePicker, VariablePickerContent } from "./components/ui/variable-picker/index.js";
|
|
77
78
|
import { cn } from "./lib/utils.js";
|
|
78
|
-
export { $insertTokenAtCursor, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AiAssistAction, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, BUILTIN_VALUE_MODES, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Column, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DEFAULT_AI_ASSIST_ACTION_STRINGS, DEFAULT_INSERT_VARIABLE_ACTION_STRINGS, DEFAULT_MODEL_PICKER_LABELS, DEFAULT_PROMPT_EDITOR_STRINGS, DEFAULT_VALUE_MODE_STRINGS, DataFetcher, DataSourceBuilder, DataTable, DataTableColumnHeader, DataTableSelectColumn, DataTransformers, DatePicker, DateRangePicker, DateTimePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableCell, EmptyState, ExpressionBuilder, FIELD_TYPE_META, FIELD_TYPE_ORDER, FetchAdapter, FieldMenu, tree_view as FileTreeView, FileUpload, FolderSwitcher, FormDesigner, FormField, FormFieldDescription, FormFieldError, FormFieldHeader, FormFieldLabel, FormFieldRenderer, FormStateViewer, Grid, GroupHeader, GroupedOptionList, HoverCard, HoverCardContent, HoverCardTrigger, InfoTooltip, Input, InputGroup, InputGroupAddon, InputGroupBody, InputGroupButton, InputGroupInput, InputGroupPopoverTrigger, InputGroupRow, InputGroupText, InputGroupTextarea, InputGroupTrigger, InputTokenNode, InsertVariableAction, Label, LockableValueField, MODEL_BADGES, MetadataForm, Modal, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, ModelOptionRow, ModelPicker, ModelTagChip, MultiSelect, OutputTokenNode, PROMPT_EDITOR_RICH_TRANSFORMERS, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PickerPopup, PickerSearchInput, PickerTrigger, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalContainerProvider, Progress, PromptEditor, RadioGroup, RadioGroupItem, RequiredIndicator, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResourceTokenNode, Row, RuleBuilder, RulesEngine, ScrollArea, ScrollBar, ScrollableTabsList, Search, SearchWithSuggestions, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, Spinner, StateTokenNode, StatsCard, Stepper, StringListField, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, TokenPill, TokenPillWithTooltip, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, TreeView, VARIABLE_DRAG_MIME, VARIABLE_PATH_REGEX, ValueModeIndicator, VariablePicker, VariablePickerContent, VirtualOptionList, WORD_JOINER, analyticsPlugin, auditPlugin, autoSavePlugin, badgeVariants, builtInValueModes, buttonVariants, cn, createEditableColumn, createInputTokenNode, createOutputTokenNode, createResourceTokenNode, createStateTokenNode, createTokenNodeForOption, defaultCostTier, defaultRowActions, deriveModelTags, filterModels, formatContextWindow, formatTemplate, formattingPlugin, getAllPromptTokenNodes, getEditorTokens, getPromptEditorTokenColors, getPromptEditorTokenTypeLabel, getSubstitutionTarget, groupModels, hasMinMaxStep, hasOptions, inferTokenTypeFromPath, inputGroupVariants, isCustomField, isFileField, isPromptTokenNode, isTextGenerationModel, normalizeRichTextTokens, normalizeVariablePath, optionDomId, resolveHomeGeography, resolveLabels, setEditorTokens, spinnerVariants, toast, toggleVariants, useInputGroup, useModelPickerState, useWatch, validationPlugin, workflowPlugin };
|
|
79
|
+
export { $insertTokenAtCursor, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AiAssistAction, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, BUILTIN_VALUE_MODES, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Column, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DEFAULT_AI_ASSIST_ACTION_STRINGS, DEFAULT_INSERT_VARIABLE_ACTION_STRINGS, DEFAULT_MODEL_PICKER_LABELS, DEFAULT_PROMPT_EDITOR_STRINGS, DEFAULT_QUICK_FORM_FIELD_STRINGS, DEFAULT_VALUE_MODE_STRINGS, DataFetcher, DataSourceBuilder, DataTable, DataTableColumnHeader, DataTableSelectColumn, DataTransformers, DatePicker, DateRangePicker, DateTimePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableCell, EmptyState, ExpressionBuilder, FIELD_TYPE_META, FIELD_TYPE_ORDER, FetchAdapter, FieldMenu, tree_view as FileTreeView, FileUpload, FolderSwitcher, FormDesigner, FormField, FormFieldDescription, FormFieldError, FormFieldHeader, FormFieldLabel, FormFieldRenderer, FormStateViewer, Grid, GroupHeader, GroupedOptionList, HoverCard, HoverCardContent, HoverCardTrigger, InfoTooltip, Input, InputGroup, InputGroupAddon, InputGroupBody, InputGroupButton, InputGroupInput, InputGroupPopoverTrigger, InputGroupRow, InputGroupText, InputGroupTextarea, InputGroupTrigger, InputTokenNode, InsertVariableAction, Label, LockableValueField, MODEL_BADGES, MetadataForm, Modal, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, ModelOptionRow, ModelPicker, ModelTagChip, MultiSelect, OutputTokenNode, PROMPT_EDITOR_RICH_TRANSFORMERS, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PickerPopup, PickerSearchInput, PickerTrigger, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalContainerProvider, Progress, PromptEditor, QuickFormField, RadioGroup, RadioGroupItem, RequiredIndicator, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResourceTokenNode, Row, RuleBuilder, RulesEngine, ScrollArea, ScrollBar, ScrollableTabsList, Search, SearchWithSuggestions, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, Spinner, StateTokenNode, StatsCard, Stepper, StringListField, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, TokenPill, TokenPillWithTooltip, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, TreeView, VARIABLE_DRAG_MIME, VARIABLE_PATH_REGEX, ValueModeIndicator, VariablePicker, VariablePickerContent, VirtualOptionList, WORD_JOINER, analyticsPlugin, auditPlugin, autoSavePlugin, badgeVariants, builtInValueModes, buttonVariants, cn, createEditableColumn, createInputTokenNode, createOutputTokenNode, createResourceTokenNode, createStateTokenNode, createTokenNodeForOption, defaultCostTier, defaultRowActions, deriveModelTags, filterModels, formatContextWindow, formatTemplate, formattingPlugin, getAllPromptTokenNodes, getEditorTokens, getPromptEditorTokenColors, getPromptEditorTokenTypeLabel, getSubstitutionTarget, groupModels, hasMinMaxStep, hasOptions, inferTokenTypeFromPath, inputGroupVariants, isCustomField, isFileField, isPromptTokenNode, isTextGenerationModel, normalizeRichTextTokens, normalizeVariablePath, optionDomId, resolveHomeGeography, resolveLabels, setEditorTokens, spinnerVariants, toast, toggleVariants, useInputGroup, useModelPickerState, useWatch, validationPlugin, workflowPlugin };
|