@uipath/apollo-wind 2.60.1 → 2.61.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-actions.cjs +181 -0
- package/dist/components/forms/field-actions.d.ts +131 -0
- package/dist/components/forms/field-actions.js +129 -0
- package/dist/components/forms/field-control.cjs +415 -0
- package/dist/components/forms/field-control.d.ts +52 -0
- package/dist/components/forms/field-control.js +372 -0
- package/dist/components/forms/field-renderer.cjs +77 -420
- package/dist/components/forms/field-renderer.d.ts +2 -3
- package/dist/components/forms/field-renderer.js +78 -421
- package/dist/components/forms/form-designer.cjs +7 -1
- package/dist/components/forms/form-designer.js +7 -1
- package/dist/components/forms/form-schema.d.ts +121 -2
- package/dist/components/forms/form-strings.cjs +67 -0
- package/dist/components/forms/form-strings.d.ts +30 -0
- package/dist/components/forms/form-strings.js +30 -0
- package/dist/components/forms/index.cjs +53 -9
- package/dist/components/forms/index.d.ts +6 -1
- package/dist/components/forms/index.js +6 -1
- package/dist/components/forms/literal-value-context.cjs +37 -0
- package/dist/components/forms/literal-value-context.d.ts +5 -0
- package/dist/components/forms/literal-value-context.js +3 -0
- package/dist/components/forms/metadata-form.cjs +100 -21
- package/dist/components/forms/metadata-form.d.ts +5 -0
- package/dist/components/forms/metadata-form.js +101 -22
- package/dist/components/forms/mode-aware-field.cjs +589 -0
- package/dist/components/forms/mode-aware-field.d.ts +15 -0
- package/dist/components/forms/mode-aware-field.js +555 -0
- package/dist/components/forms/opaque-value.cjs +44 -0
- package/dist/components/forms/opaque-value.d.ts +7 -0
- package/dist/components/forms/opaque-value.js +7 -0
- package/dist/components/forms/rules-engine.cjs +13 -0
- package/dist/components/forms/rules-engine.js +13 -0
- package/dist/components/forms/schema-serializer.cjs +8 -0
- package/dist/components/forms/schema-serializer.js +8 -0
- package/dist/components/forms/string-list-field.cjs +36 -18
- package/dist/components/forms/string-list-field.d.ts +6 -0
- package/dist/components/forms/string-list-field.js +35 -20
- package/dist/components/forms/validation-converter.cjs +32 -2
- package/dist/components/forms/validation-converter.d.ts +17 -1
- package/dist/components/forms/validation-converter.js +30 -3
- package/dist/components/forms/value-modes.cjs +253 -0
- package/dist/components/forms/value-modes.d.ts +236 -0
- package/dist/components/forms/value-modes.js +180 -0
- package/dist/components/ui/avatar.d.ts +1 -1
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/boolean-radio-group.cjs +114 -0
- package/dist/components/ui/boolean-radio-group.d.ts +24 -0
- package/dist/components/ui/boolean-radio-group.js +77 -0
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/command.d.ts +7 -7
- package/dist/components/ui/field-addons/field-menu.cjs +1 -0
- package/dist/components/ui/field-addons/field-menu.d.ts +2 -0
- package/dist/components/ui/field-addons/field-menu.js +1 -0
- package/dist/components/ui/field-addons/index.cjs +4 -0
- package/dist/components/ui/field-addons/index.d.ts +1 -0
- package/dist/components/ui/field-addons/index.js +2 -1
- package/dist/components/ui/field-addons/value-mode-strings.cjs +7 -1
- package/dist/components/ui/field-addons/value-mode-strings.d.ts +9 -0
- package/dist/components/ui/field-addons/value-mode-strings.js +7 -1
- package/dist/components/ui/field-addons/value-mode-switch-dialog.cjs +73 -0
- package/dist/components/ui/field-addons/value-mode-switch-dialog.d.ts +16 -0
- package/dist/components/ui/field-addons/value-mode-switch-dialog.js +39 -0
- package/dist/components/ui/form-field.cjs +2 -1
- package/dist/components/ui/form-field.d.ts +2 -0
- package/dist/components/ui/form-field.js +2 -1
- package/dist/components/ui/index.cjs +230 -186
- package/dist/components/ui/index.d.ts +4 -0
- package/dist/components/ui/index.js +4 -0
- package/dist/components/ui/input-group.cjs +6 -3
- package/dist/components/ui/input-group.d.ts +6 -5
- package/dist/components/ui/input-group.js +6 -3
- package/dist/components/ui/json-tree-view/DecorationChip.cjs +81 -0
- package/dist/components/ui/json-tree-view/DecorationChip.d.ts +4 -0
- package/dist/components/ui/json-tree-view/DecorationChip.js +47 -0
- package/dist/components/ui/json-tree-view/EditorChrome.cjs +88 -0
- package/dist/components/ui/json-tree-view/EditorChrome.d.ts +21 -0
- package/dist/components/ui/json-tree-view/EditorChrome.js +51 -0
- package/dist/components/ui/json-tree-view/JsonContainerEditor.cjs +95 -0
- package/dist/components/ui/json-tree-view/JsonContainerEditor.d.ts +18 -0
- package/dist/components/ui/json-tree-view/JsonContainerEditor.js +61 -0
- package/dist/components/ui/json-tree-view/JsonLeafValueEditor.cjs +86 -0
- package/dist/components/ui/json-tree-view/JsonLeafValueEditor.d.ts +12 -0
- package/dist/components/ui/json-tree-view/JsonLeafValueEditor.js +52 -0
- package/dist/components/ui/json-tree-view/JsonMultilineLeafEditor.cjs +74 -0
- package/dist/components/ui/json-tree-view/JsonMultilineLeafEditor.d.ts +13 -0
- package/dist/components/ui/json-tree-view/JsonMultilineLeafEditor.js +40 -0
- package/dist/components/ui/json-tree-view/JsonTree.cjs +253 -0
- package/dist/components/ui/json-tree-view/JsonTree.d.ts +81 -0
- package/dist/components/ui/json-tree-view/JsonTree.js +219 -0
- package/dist/components/ui/json-tree-view/JsonTree.types.cjs +18 -0
- package/dist/components/ui/json-tree-view/JsonTree.types.d.ts +253 -0
- package/dist/components/ui/json-tree-view/JsonTree.types.js +0 -0
- package/dist/components/ui/json-tree-view/JsonTreeRow.cjs +284 -0
- package/dist/components/ui/json-tree-view/JsonTreeRow.d.ts +50 -0
- package/dist/components/ui/json-tree-view/JsonTreeRow.js +244 -0
- package/dist/components/ui/json-tree-view/JsonTreeToolbar.cjs +209 -0
- package/dist/components/ui/json-tree-view/JsonTreeToolbar.d.ts +35 -0
- package/dist/components/ui/json-tree-view/JsonTreeToolbar.js +175 -0
- package/dist/components/ui/json-tree-view/JsonTreeTooltip.cjs +84 -0
- package/dist/components/ui/json-tree-view/JsonTreeTooltip.d.ts +21 -0
- package/dist/components/ui/json-tree-view/JsonTreeTooltip.js +47 -0
- package/dist/components/ui/json-tree-view/JsonTypeBadge.cjs +70 -0
- package/dist/components/ui/json-tree-view/JsonTypeBadge.d.ts +17 -0
- package/dist/components/ui/json-tree-view/JsonTypeBadge.js +36 -0
- package/dist/components/ui/json-tree-view/NodeKey.cjs +77 -0
- package/dist/components/ui/json-tree-view/NodeKey.d.ts +16 -0
- package/dist/components/ui/json-tree-view/NodeKey.js +43 -0
- package/dist/components/ui/json-tree-view/RowActions.cjs +120 -0
- package/dist/components/ui/json-tree-view/RowActions.d.ts +15 -0
- package/dist/components/ui/json-tree-view/RowActions.js +86 -0
- package/dist/components/ui/json-tree-view/ScalarValueCell.cjs +112 -0
- package/dist/components/ui/json-tree-view/ScalarValueCell.d.ts +18 -0
- package/dist/components/ui/json-tree-view/ScalarValueCell.js +75 -0
- package/dist/components/ui/json-tree-view/buildJsonTree.cjs +324 -0
- package/dist/components/ui/json-tree-view/buildJsonTree.d.ts +75 -0
- package/dist/components/ui/json-tree-view/buildJsonTree.js +257 -0
- package/dist/components/ui/json-tree-view/clipboard.cjs +63 -0
- package/dist/components/ui/json-tree-view/clipboard.d.ts +6 -0
- package/dist/components/ui/json-tree-view/clipboard.js +29 -0
- package/dist/components/ui/json-tree-view/index.cjs +175 -0
- package/dist/components/ui/json-tree-view/index.d.ts +10 -0
- package/dist/components/ui/json-tree-view/index.js +11 -0
- package/dist/components/ui/json-tree-view/leafEditTypes.cjs +74 -0
- package/dist/components/ui/json-tree-view/leafEditTypes.d.ts +12 -0
- package/dist/components/ui/json-tree-view/leafEditTypes.js +34 -0
- package/dist/components/ui/json-tree-view/strings.cjs +122 -0
- package/dist/components/ui/json-tree-view/strings.d.ts +65 -0
- package/dist/components/ui/json-tree-view/strings.js +79 -0
- package/dist/components/ui/prompt-value-control.cjs +70 -0
- package/dist/components/ui/prompt-value-control.d.ts +28 -0
- package/dist/components/ui/prompt-value-control.js +36 -0
- package/dist/components/ui/sheet.d.ts +1 -1
- package/dist/components/ui/spinner.d.ts +1 -1
- package/dist/components/ui/switch.d.ts +2 -2
- package/dist/components/ui/textarea.cjs +1 -1
- package/dist/components/ui/textarea.js +1 -1
- package/dist/components/ui/toggle-group.d.ts +2 -2
- package/dist/components/ui/toggle.d.ts +2 -2
- package/dist/components/ui/variable-value-control.cjs +98 -0
- package/dist/components/ui/variable-value-control.d.ts +35 -0
- package/dist/components/ui/variable-value-control.js +64 -0
- package/dist/index.cjs +145 -16
- package/dist/index.d.ts +21 -3
- package/dist/index.js +11 -2
- package/dist/lib/index.cjs +4 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +2 -2
- package/dist/lib/utils.cjs +21 -1
- package/dist/lib/utils.d.ts +8 -0
- package/dist/lib/utils.js +18 -1
- package/dist/styles.css +225 -0
- package/package.json +1 -1
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { FieldValues, UseFormReturn } from 'react-hook-form';
|
|
2
|
+
import type { ValueMode } from '../ui/field-addons/value-mode-strings';
|
|
3
|
+
import type { VariablePickerItem } from '../ui/variable-picker';
|
|
4
|
+
import type { FieldActionRegistry, FieldActionsPluginConfig } from './field-actions';
|
|
5
|
+
import type { MetadataFormStringOverrides, MetadataFormStrings } from './form-strings';
|
|
6
|
+
import type { FieldControlRegistration, ValueModeControlHandle, ValueModeRegistry, ValueModesPluginConfig } from './value-modes';
|
|
2
7
|
/**
|
|
3
8
|
* Core Schema Types for Apollo-Wind Metadata Forms
|
|
4
9
|
* Designed for enterprise automation workflows with extensibility
|
|
@@ -133,6 +138,65 @@ export interface ValidationConfig {
|
|
|
133
138
|
custom?: string;
|
|
134
139
|
messages?: ValidationMessages;
|
|
135
140
|
}
|
|
141
|
+
/** A value mode's id. apollo-wind ships `literal`, `expression`, `variable` and `prompt`. */
|
|
142
|
+
/** A built-in mode or one a plugin defines. Built-in ids autocomplete; any string is accepted. */
|
|
143
|
+
export type ValueModeId = ValueMode | (string & {});
|
|
144
|
+
/**
|
|
145
|
+
* A control by the name it is registered under in `FormPlugin.valueModes.controlRegistry`, optionally
|
|
146
|
+
* with props of its own. A name rather than the component keeps the schema JSON-serializable.
|
|
147
|
+
*
|
|
148
|
+
* @example 'rich-text'
|
|
149
|
+
* @example { component: 'rich-text', componentProps: { toolbar: false } }
|
|
150
|
+
*/
|
|
151
|
+
export type ValueModeControlRef = string | {
|
|
152
|
+
component: string;
|
|
153
|
+
componentProps?: Record<string, unknown>;
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* The modes a field's value can be written in, such as a fixed value or an expression.
|
|
157
|
+
* JSON-serializable: behaviour and geometry come from `FormPlugin.valueModes`.
|
|
158
|
+
*
|
|
159
|
+
* Stored shape, with the default codec:
|
|
160
|
+
* - every write is an envelope, `{ $mode, value }`, fixed values included;
|
|
161
|
+
* - a cleared value keeps its envelope without `value`, `{ $mode }`, so its mode survives;
|
|
162
|
+
* - a raw value is read as a fixed value, on read only: it lets existing data load, and the first
|
|
163
|
+
* write wraps it. Whatever reads the form's values (submit handlers, plugins, saved drafts) must
|
|
164
|
+
* expect the envelope once a field adopts value modes; that migration is the host's to make.
|
|
165
|
+
*
|
|
166
|
+
* Rules, conditions and data sources read a field's fixed value only. In any other mode its value
|
|
167
|
+
* is `VALUE_MODE_OPAQUE`: set, but equal to nothing, whatever the codec stores.
|
|
168
|
+
*/
|
|
169
|
+
export interface ValueModesConfig {
|
|
170
|
+
/** Offered modes in menu order. The first is the mode of an empty value without `defaultMode`. */
|
|
171
|
+
modes: ValueModeId[];
|
|
172
|
+
/** The mode of an empty value. */
|
|
173
|
+
defaultMode?: ValueModeId;
|
|
174
|
+
/** Whether the menu offers the modes. Defaults to more than one mode. */
|
|
175
|
+
switchable?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* The value's type as the modes describe it, such as `object` or `array`. Picks the built-in
|
|
178
|
+
* Fixed value description and reaches the codec as `CodecContext.expectedType`. Defaults to
|
|
179
|
+
* the field type's own (`number`, `boolean`) or a custom field's `valueType`.
|
|
180
|
+
*/
|
|
181
|
+
expectedType?: string;
|
|
182
|
+
/** Whether a glyph ahead of the value marks a mode other than `literal`. Defaults to true. */
|
|
183
|
+
indicator?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* This field's control per mode, `literal` included: keys are mode ids, values name controls
|
|
186
|
+
* registered in `FormPlugin.valueModes.controlRegistry`. Takes precedence over the plugin's
|
|
187
|
+
* `literalControls` and the mode definition's `control`.
|
|
188
|
+
*
|
|
189
|
+
* @example { literal: 'rich-text', expression: 'code' }
|
|
190
|
+
*/
|
|
191
|
+
controls?: Partial<Record<ValueModeId, ValueModeControlRef>>;
|
|
192
|
+
/** A codec registered in `FormPlugin.valueModes.codecs`. Defaults to `'default'`. */
|
|
193
|
+
codec?: string;
|
|
194
|
+
/** Per-field overrides of a mode's title and description. */
|
|
195
|
+
labels?: Partial<Record<ValueModeId, {
|
|
196
|
+
title?: string;
|
|
197
|
+
description?: string;
|
|
198
|
+
}>>;
|
|
199
|
+
}
|
|
136
200
|
/**
|
|
137
201
|
* Base metadata common to all field types
|
|
138
202
|
*/
|
|
@@ -152,6 +216,14 @@ interface BaseFieldMetadata {
|
|
|
152
216
|
tooltip?: string;
|
|
153
217
|
/** Accessible name of the tooltip trigger (default 'More information'). */
|
|
154
218
|
tooltipAriaLabel?: string;
|
|
219
|
+
/** Renders the field with a mode menu and writes its value through a codec. */
|
|
220
|
+
valueModes?: ValueModesConfig;
|
|
221
|
+
/** Actions behind the label, by id from `FormPlugin.fieldActions.header`, in render order. */
|
|
222
|
+
headerActions?: string[];
|
|
223
|
+
/** Rows of the trailing menu, by id from `FormPlugin.fieldActions.menu`, in render order. */
|
|
224
|
+
menuActions?: string[];
|
|
225
|
+
/** Text after the label, such as the value's type. Renders the field anatomy's header. */
|
|
226
|
+
badge?: string;
|
|
155
227
|
}
|
|
156
228
|
export interface TextFieldMetadata extends BaseFieldMetadata {
|
|
157
229
|
type: 'text';
|
|
@@ -196,6 +268,13 @@ export interface CheckboxFieldMetadata extends BaseFieldMetadata {
|
|
|
196
268
|
export interface SwitchFieldMetadata extends BaseFieldMetadata {
|
|
197
269
|
type: 'switch';
|
|
198
270
|
}
|
|
271
|
+
/**
|
|
272
|
+
* True / False radios with an unset state: a boolean that may have no value, which a switch or
|
|
273
|
+
* checkbox cannot show.
|
|
274
|
+
*/
|
|
275
|
+
export interface BooleanFieldMetadata extends BaseFieldMetadata {
|
|
276
|
+
type: 'boolean';
|
|
277
|
+
}
|
|
199
278
|
/**
|
|
200
279
|
* Reference to another form field's value, used to drive a numeric property
|
|
201
280
|
* (e.g. a slider's `max`) at render time.
|
|
@@ -265,7 +344,7 @@ export interface CustomFieldMetadata extends BaseFieldMetadata {
|
|
|
265
344
|
* Discriminated union of all field types
|
|
266
345
|
* TypeScript will enforce that only valid properties exist for each type
|
|
267
346
|
*/
|
|
268
|
-
export type FieldMetadata = TextFieldMetadata | EmailFieldMetadata | TextareaFieldMetadata | NumberFieldMetadata | SelectFieldMetadata | MultiSelectFieldMetadata | RadioFieldMetadata | CheckboxFieldMetadata | SwitchFieldMetadata | SliderFieldMetadata | DateFieldMetadata | DateTimeFieldMetadata | FileFieldMetadata | StringListFieldMetadata | CustomFieldMetadata;
|
|
347
|
+
export type FieldMetadata = TextFieldMetadata | EmailFieldMetadata | TextareaFieldMetadata | NumberFieldMetadata | SelectFieldMetadata | MultiSelectFieldMetadata | RadioFieldMetadata | CheckboxFieldMetadata | SwitchFieldMetadata | BooleanFieldMetadata | SliderFieldMetadata | DateFieldMetadata | DateTimeFieldMetadata | FileFieldMetadata | StringListFieldMetadata | CustomFieldMetadata;
|
|
269
348
|
/**
|
|
270
349
|
* Extract the field type from FieldMetadata
|
|
271
350
|
*/
|
|
@@ -347,6 +426,10 @@ export interface MultiStepFormSchema extends BaseFormSchema {
|
|
|
347
426
|
*/
|
|
348
427
|
export type FormSchema = SinglePageFormSchema | MultiStepFormSchema;
|
|
349
428
|
export interface CustomFieldComponentProps {
|
|
429
|
+
/**
|
|
430
|
+
* The stored value; in the field anatomy (a field with `valueModes`, field actions or a badge),
|
|
431
|
+
* the fixed value, decoded.
|
|
432
|
+
*/
|
|
350
433
|
value: unknown;
|
|
351
434
|
onChange: (value: unknown) => void;
|
|
352
435
|
onBlur: () => void;
|
|
@@ -355,8 +438,17 @@ export interface CustomFieldComponentProps {
|
|
|
355
438
|
disabled?: boolean;
|
|
356
439
|
required?: boolean;
|
|
357
440
|
error?: string;
|
|
441
|
+
/**
|
|
442
|
+
* In the field anatomy: the handle Insert variable writes through. A component registered as
|
|
443
|
+
* `insertable` without a text input carrying the field's name as its id attaches one.
|
|
444
|
+
*/
|
|
445
|
+
controlRef?: React.Ref<ValueModeControlHandle>;
|
|
446
|
+
/** In the field anatomy: the label's id, for a component registered with `labelTarget: 'labelledby'`. */
|
|
447
|
+
labelId?: string;
|
|
358
448
|
[key: string]: unknown;
|
|
359
449
|
}
|
|
450
|
+
/** Custom components by name, each bare or with its geometry inside the field anatomy. */
|
|
451
|
+
export type CustomComponents = Record<string, React.ComponentType<CustomFieldComponentProps> | FieldControlRegistration<CustomFieldComponentProps>>;
|
|
360
452
|
export interface FormContext<T extends FieldValues = FieldValues> {
|
|
361
453
|
schema: FormSchema;
|
|
362
454
|
form: UseFormReturn<T>;
|
|
@@ -368,7 +460,23 @@ export interface FormContext<T extends FieldValues = FieldValues> {
|
|
|
368
460
|
evaluateConditions: (conditions: FieldCondition[]) => boolean;
|
|
369
461
|
fetchData: (source: DataSource) => Promise<FieldOption[]>;
|
|
370
462
|
registerCustomComponent: (name: string, component: React.ComponentType<CustomFieldComponentProps>) => void;
|
|
463
|
+
/** Codecs, mode definitions and controls merged from every plugin. */
|
|
464
|
+
valueModes?: ValueModeRegistry;
|
|
465
|
+
/** Field actions merged from every plugin. */
|
|
466
|
+
fieldActions?: FieldActionRegistry;
|
|
467
|
+
/** Every plugin's `strings` over the English defaults. */
|
|
468
|
+
strings?: MetadataFormStrings;
|
|
469
|
+
/** The last plugin's `variables`. */
|
|
470
|
+
variables?: FormVariables;
|
|
371
471
|
}
|
|
472
|
+
/**
|
|
473
|
+
* The variables a form offers, rendered as supplied, to Insert variable and the `variable` mode's
|
|
474
|
+
* control. A function is called each time a picker opens, never during render, so a host can hand
|
|
475
|
+
* over a live source without re-rendering its fields.
|
|
476
|
+
*/
|
|
477
|
+
export type FormVariables = VariablePickerItem[] | ((ctx: {
|
|
478
|
+
field: FieldMetadata;
|
|
479
|
+
}) => VariablePickerItem[]);
|
|
372
480
|
export interface FormPlugin<T extends FieldValues = FieldValues> {
|
|
373
481
|
name: string;
|
|
374
482
|
version?: string;
|
|
@@ -377,7 +485,18 @@ export interface FormPlugin<T extends FieldValues = FieldValues> {
|
|
|
377
485
|
onValueChange?: (fieldName: string, value: unknown, context: FormContext<T>) => void;
|
|
378
486
|
onSubmit?: (data: T, context: FormContext<T>) => T | Promise<T>;
|
|
379
487
|
validators?: Record<string, ValidationConfig>;
|
|
380
|
-
components?:
|
|
488
|
+
components?: CustomComponents;
|
|
489
|
+
/** Codecs, mode definitions and controls for fields with `valueModes`. */
|
|
490
|
+
valueModes?: ValueModesPluginConfig;
|
|
491
|
+
/** Actions for fields with `headerActions` or `menuActions`. */
|
|
492
|
+
fieldActions?: FieldActionsPluginConfig;
|
|
493
|
+
/**
|
|
494
|
+
* Strings for every built-in, by group; later plugins win per string. A factory's own
|
|
495
|
+
* `strings` still override these for its action.
|
|
496
|
+
*/
|
|
497
|
+
strings?: MetadataFormStringOverrides;
|
|
498
|
+
/** The form's variables; the last plugin that gives them wins. */
|
|
499
|
+
variables?: FormVariables;
|
|
381
500
|
customConditions?: Record<string, (value: unknown, condition: unknown) => boolean>;
|
|
382
501
|
customEffects?: Record<string, (field: FieldMetadata, context: FormContext<T>) => void>;
|
|
383
502
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
buildFormStrings: ()=>buildFormStrings,
|
|
28
|
+
DEFAULT_METADATA_FORM_STRINGS: ()=>DEFAULT_METADATA_FORM_STRINGS
|
|
29
|
+
});
|
|
30
|
+
const boolean_radio_group_cjs_namespaceObject = require("../ui/boolean-radio-group.cjs");
|
|
31
|
+
const ai_assist_action_cjs_namespaceObject = require("../ui/field-actions/ai-assist-action.cjs");
|
|
32
|
+
const insert_variable_action_cjs_namespaceObject = require("../ui/field-actions/insert-variable-action.cjs");
|
|
33
|
+
const value_mode_strings_cjs_namespaceObject = require("../ui/field-addons/value-mode-strings.cjs");
|
|
34
|
+
const DEFAULT_METADATA_FORM_STRINGS = {
|
|
35
|
+
valueModes: value_mode_strings_cjs_namespaceObject.DEFAULT_VALUE_MODE_STRINGS,
|
|
36
|
+
boolean: boolean_radio_group_cjs_namespaceObject.DEFAULT_BOOLEAN_RADIO_GROUP_STRINGS,
|
|
37
|
+
insertVariable: insert_variable_action_cjs_namespaceObject.DEFAULT_INSERT_VARIABLE_ACTION_STRINGS,
|
|
38
|
+
aiAssist: ai_assist_action_cjs_namespaceObject.DEFAULT_AI_ASSIST_ACTION_STRINGS,
|
|
39
|
+
clear: {
|
|
40
|
+
label: 'Clear value'
|
|
41
|
+
},
|
|
42
|
+
validation: {
|
|
43
|
+
required: 'This field is required'
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
function buildFormStrings(plugins) {
|
|
47
|
+
const strings = {
|
|
48
|
+
...DEFAULT_METADATA_FORM_STRINGS
|
|
49
|
+
};
|
|
50
|
+
for (const plugin of plugins)for (const [group, overrides] of Object.entries(plugin.strings ?? {})){
|
|
51
|
+
const key = group;
|
|
52
|
+
strings[key] = {
|
|
53
|
+
...strings[key],
|
|
54
|
+
...overrides
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
return strings;
|
|
58
|
+
}
|
|
59
|
+
exports.DEFAULT_METADATA_FORM_STRINGS = __webpack_exports__.DEFAULT_METADATA_FORM_STRINGS;
|
|
60
|
+
exports.buildFormStrings = __webpack_exports__.buildFormStrings;
|
|
61
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
62
|
+
"DEFAULT_METADATA_FORM_STRINGS",
|
|
63
|
+
"buildFormStrings"
|
|
64
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
65
|
+
Object.defineProperty(exports, '__esModule', {
|
|
66
|
+
value: true
|
|
67
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type BooleanRadioGroupStrings } from '../ui/boolean-radio-group';
|
|
2
|
+
import { type AiAssistActionStrings } from '../ui/field-actions/ai-assist-action';
|
|
3
|
+
import { type InsertVariableActionStrings } from '../ui/field-actions/insert-variable-action';
|
|
4
|
+
import { type ValueModeStrings } from '../ui/field-addons/value-mode-strings';
|
|
5
|
+
import type { FormPlugin } from './form-schema';
|
|
6
|
+
export interface ClearActionStrings {
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
export interface FormValidationStrings {
|
|
10
|
+
/** A required field with no value, in any mode. */
|
|
11
|
+
required: string;
|
|
12
|
+
}
|
|
13
|
+
/** Every string MetadataForm's built-ins show, by the built-in that shows it. */
|
|
14
|
+
export interface MetadataFormStrings {
|
|
15
|
+
/** Mode titles and descriptions, the mode menu and the lossy-switch dialog. */
|
|
16
|
+
valueModes: ValueModeStrings;
|
|
17
|
+
/** The `boolean` field type's radios, with or without value modes. */
|
|
18
|
+
boolean: BooleanRadioGroupStrings;
|
|
19
|
+
insertVariable: InsertVariableActionStrings;
|
|
20
|
+
aiAssist: AiAssistActionStrings;
|
|
21
|
+
clear: ClearActionStrings;
|
|
22
|
+
validation: FormValidationStrings;
|
|
23
|
+
}
|
|
24
|
+
/** Any subset of any group, as `FormPlugin.strings` takes them. */
|
|
25
|
+
export type MetadataFormStringOverrides = {
|
|
26
|
+
[Group in keyof MetadataFormStrings]?: Partial<MetadataFormStrings[Group]>;
|
|
27
|
+
};
|
|
28
|
+
export declare const DEFAULT_METADATA_FORM_STRINGS: MetadataFormStrings;
|
|
29
|
+
/** Every plugin's `strings` over the English defaults, later plugins winning per string. */
|
|
30
|
+
export declare function buildFormStrings(plugins: readonly FormPlugin[]): MetadataFormStrings;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DEFAULT_BOOLEAN_RADIO_GROUP_STRINGS } from "../ui/boolean-radio-group.js";
|
|
2
|
+
import { DEFAULT_AI_ASSIST_ACTION_STRINGS } from "../ui/field-actions/ai-assist-action.js";
|
|
3
|
+
import { DEFAULT_INSERT_VARIABLE_ACTION_STRINGS } from "../ui/field-actions/insert-variable-action.js";
|
|
4
|
+
import { DEFAULT_VALUE_MODE_STRINGS } from "../ui/field-addons/value-mode-strings.js";
|
|
5
|
+
const DEFAULT_METADATA_FORM_STRINGS = {
|
|
6
|
+
valueModes: DEFAULT_VALUE_MODE_STRINGS,
|
|
7
|
+
boolean: DEFAULT_BOOLEAN_RADIO_GROUP_STRINGS,
|
|
8
|
+
insertVariable: DEFAULT_INSERT_VARIABLE_ACTION_STRINGS,
|
|
9
|
+
aiAssist: DEFAULT_AI_ASSIST_ACTION_STRINGS,
|
|
10
|
+
clear: {
|
|
11
|
+
label: 'Clear value'
|
|
12
|
+
},
|
|
13
|
+
validation: {
|
|
14
|
+
required: 'This field is required'
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
function buildFormStrings(plugins) {
|
|
18
|
+
const strings = {
|
|
19
|
+
...DEFAULT_METADATA_FORM_STRINGS
|
|
20
|
+
};
|
|
21
|
+
for (const plugin of plugins)for (const [group, overrides] of Object.entries(plugin.strings ?? {})){
|
|
22
|
+
const key = group;
|
|
23
|
+
strings[key] = {
|
|
24
|
+
...strings[key],
|
|
25
|
+
...overrides
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
return strings;
|
|
29
|
+
}
|
|
30
|
+
export { DEFAULT_METADATA_FORM_STRINGS, buildFormStrings };
|
|
@@ -24,86 +24,130 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
|
|
27
|
+
isValueModeEnvelope: ()=>external_value_modes_cjs_namespaceObject.isValueModeEnvelope,
|
|
28
|
+
ModeAwareField: ()=>external_mode_aware_field_cjs_namespaceObject.ModeAwareField,
|
|
28
29
|
formattingPlugin: ()=>external_form_plugins_cjs_namespaceObject.formattingPlugin,
|
|
29
30
|
isCustomField: ()=>external_form_schema_cjs_namespaceObject.isCustomField,
|
|
30
31
|
isFileField: ()=>external_form_schema_cjs_namespaceObject.isFileField,
|
|
31
|
-
validationPlugin: ()=>external_form_plugins_cjs_namespaceObject.validationPlugin,
|
|
32
32
|
StringListField: ()=>external_string_list_field_cjs_namespaceObject.StringListField,
|
|
33
|
+
MetadataForm: ()=>external_metadata_form_cjs_namespaceObject.MetadataForm,
|
|
34
|
+
FetchAdapter: ()=>external_data_fetcher_cjs_namespaceObject.FetchAdapter,
|
|
35
|
+
FormStateViewer: ()=>external_form_state_viewer_cjs_namespaceObject.FormStateViewer,
|
|
36
|
+
FIELD_CONTROL_GEOMETRY: ()=>external_field_control_cjs_namespaceObject.FIELD_CONTROL_GEOMETRY,
|
|
37
|
+
formatTemplate: ()=>external_string_list_field_cjs_namespaceObject.formatTemplate,
|
|
38
|
+
createInsertVariableAction: ()=>external_field_actions_cjs_namespaceObject.createInsertVariableAction,
|
|
39
|
+
resolveVariables: ()=>external_field_actions_cjs_namespaceObject.resolveVariables,
|
|
40
|
+
FormDesigner: ()=>external_form_designer_cjs_namespaceObject.FormDesigner,
|
|
41
|
+
FieldControl: ()=>external_field_control_cjs_namespaceObject.FieldControl,
|
|
42
|
+
auditPlugin: ()=>external_form_plugins_cjs_namespaceObject.auditPlugin,
|
|
43
|
+
createClearAction: ()=>external_field_actions_cjs_namespaceObject.createClearAction,
|
|
44
|
+
envelopeCodec: ()=>external_value_modes_cjs_namespaceObject.envelopeCodec,
|
|
45
|
+
useWatch: ()=>external_metadata_form_cjs_namespaceObject.useWatch,
|
|
46
|
+
validationPlugin: ()=>external_form_plugins_cjs_namespaceObject.validationPlugin,
|
|
47
|
+
DEFAULT_METADATA_FORM_STRINGS: ()=>external_form_strings_cjs_namespaceObject.DEFAULT_METADATA_FORM_STRINGS,
|
|
33
48
|
FormFieldRenderer: ()=>external_field_renderer_cjs_namespaceObject.FormFieldRenderer,
|
|
34
49
|
analyticsPlugin: ()=>external_form_plugins_cjs_namespaceObject.analyticsPlugin,
|
|
35
|
-
|
|
50
|
+
VALUE_MODE_OPAQUE: ()=>external_value_modes_cjs_namespaceObject.VALUE_MODE_OPAQUE,
|
|
36
51
|
hasOptions: ()=>external_form_schema_cjs_namespaceObject.hasOptions,
|
|
37
52
|
DataFetcher: ()=>external_data_fetcher_cjs_namespaceObject.DataFetcher,
|
|
38
53
|
DataTransformers: ()=>external_data_fetcher_cjs_namespaceObject.DataTransformers,
|
|
39
|
-
|
|
40
|
-
FormStateViewer: ()=>external_form_state_viewer_cjs_namespaceObject.FormStateViewer,
|
|
41
|
-
formatTemplate: ()=>external_string_list_field_cjs_namespaceObject.formatTemplate,
|
|
54
|
+
createAiAssistAction: ()=>external_field_actions_cjs_namespaceObject.createAiAssistAction,
|
|
42
55
|
RulesEngine: ()=>external_rules_engine_cjs_namespaceObject.RulesEngine,
|
|
43
56
|
RuleBuilder: ()=>external_rules_engine_cjs_namespaceObject.RuleBuilder,
|
|
44
|
-
auditPlugin: ()=>external_form_plugins_cjs_namespaceObject.auditPlugin,
|
|
45
|
-
FormDesigner: ()=>external_form_designer_cjs_namespaceObject.FormDesigner,
|
|
46
57
|
DataSourceBuilder: ()=>external_data_fetcher_cjs_namespaceObject.DataSourceBuilder,
|
|
47
|
-
ExpressionBuilder: ()=>external_rules_engine_cjs_namespaceObject.ExpressionBuilder,
|
|
48
58
|
autoSavePlugin: ()=>external_form_plugins_cjs_namespaceObject.autoSavePlugin,
|
|
59
|
+
ExpressionBuilder: ()=>external_rules_engine_cjs_namespaceObject.ExpressionBuilder,
|
|
60
|
+
literalValues: ()=>external_value_modes_cjs_namespaceObject.literalValues,
|
|
49
61
|
hasMinMaxStep: ()=>external_form_schema_cjs_namespaceObject.hasMinMaxStep,
|
|
62
|
+
isEmptyModeValue: ()=>external_value_modes_cjs_namespaceObject.isEmptyModeValue,
|
|
50
63
|
workflowPlugin: ()=>external_form_plugins_cjs_namespaceObject.workflowPlugin
|
|
51
64
|
});
|
|
52
65
|
const external_data_fetcher_cjs_namespaceObject = require("./data-fetcher.cjs");
|
|
66
|
+
const external_field_actions_cjs_namespaceObject = require("./field-actions.cjs");
|
|
67
|
+
const external_field_control_cjs_namespaceObject = require("./field-control.cjs");
|
|
53
68
|
const external_field_renderer_cjs_namespaceObject = require("./field-renderer.cjs");
|
|
54
69
|
const external_form_designer_cjs_namespaceObject = require("./form-designer.cjs");
|
|
55
70
|
const external_form_plugins_cjs_namespaceObject = require("./form-plugins.cjs");
|
|
56
71
|
const external_form_schema_cjs_namespaceObject = require("./form-schema.cjs");
|
|
57
72
|
const external_form_state_viewer_cjs_namespaceObject = require("./form-state-viewer.cjs");
|
|
73
|
+
const external_form_strings_cjs_namespaceObject = require("./form-strings.cjs");
|
|
58
74
|
const external_metadata_form_cjs_namespaceObject = require("./metadata-form.cjs");
|
|
75
|
+
const external_mode_aware_field_cjs_namespaceObject = require("./mode-aware-field.cjs");
|
|
59
76
|
const external_rules_engine_cjs_namespaceObject = require("./rules-engine.cjs");
|
|
60
77
|
const external_string_list_field_cjs_namespaceObject = require("./string-list-field.cjs");
|
|
78
|
+
const external_value_modes_cjs_namespaceObject = require("./value-modes.cjs");
|
|
79
|
+
exports.DEFAULT_METADATA_FORM_STRINGS = __webpack_exports__.DEFAULT_METADATA_FORM_STRINGS;
|
|
61
80
|
exports.DataFetcher = __webpack_exports__.DataFetcher;
|
|
62
81
|
exports.DataSourceBuilder = __webpack_exports__.DataSourceBuilder;
|
|
63
82
|
exports.DataTransformers = __webpack_exports__.DataTransformers;
|
|
64
83
|
exports.ExpressionBuilder = __webpack_exports__.ExpressionBuilder;
|
|
84
|
+
exports.FIELD_CONTROL_GEOMETRY = __webpack_exports__.FIELD_CONTROL_GEOMETRY;
|
|
65
85
|
exports.FetchAdapter = __webpack_exports__.FetchAdapter;
|
|
86
|
+
exports.FieldControl = __webpack_exports__.FieldControl;
|
|
66
87
|
exports.FormDesigner = __webpack_exports__.FormDesigner;
|
|
67
88
|
exports.FormFieldRenderer = __webpack_exports__.FormFieldRenderer;
|
|
68
89
|
exports.FormStateViewer = __webpack_exports__.FormStateViewer;
|
|
69
90
|
exports.MetadataForm = __webpack_exports__.MetadataForm;
|
|
91
|
+
exports.ModeAwareField = __webpack_exports__.ModeAwareField;
|
|
70
92
|
exports.RuleBuilder = __webpack_exports__.RuleBuilder;
|
|
71
93
|
exports.RulesEngine = __webpack_exports__.RulesEngine;
|
|
72
94
|
exports.StringListField = __webpack_exports__.StringListField;
|
|
95
|
+
exports.VALUE_MODE_OPAQUE = __webpack_exports__.VALUE_MODE_OPAQUE;
|
|
73
96
|
exports.analyticsPlugin = __webpack_exports__.analyticsPlugin;
|
|
74
97
|
exports.auditPlugin = __webpack_exports__.auditPlugin;
|
|
75
98
|
exports.autoSavePlugin = __webpack_exports__.autoSavePlugin;
|
|
99
|
+
exports.createAiAssistAction = __webpack_exports__.createAiAssistAction;
|
|
100
|
+
exports.createClearAction = __webpack_exports__.createClearAction;
|
|
101
|
+
exports.createInsertVariableAction = __webpack_exports__.createInsertVariableAction;
|
|
102
|
+
exports.envelopeCodec = __webpack_exports__.envelopeCodec;
|
|
76
103
|
exports.formatTemplate = __webpack_exports__.formatTemplate;
|
|
77
104
|
exports.formattingPlugin = __webpack_exports__.formattingPlugin;
|
|
78
105
|
exports.hasMinMaxStep = __webpack_exports__.hasMinMaxStep;
|
|
79
106
|
exports.hasOptions = __webpack_exports__.hasOptions;
|
|
80
107
|
exports.isCustomField = __webpack_exports__.isCustomField;
|
|
108
|
+
exports.isEmptyModeValue = __webpack_exports__.isEmptyModeValue;
|
|
81
109
|
exports.isFileField = __webpack_exports__.isFileField;
|
|
110
|
+
exports.isValueModeEnvelope = __webpack_exports__.isValueModeEnvelope;
|
|
111
|
+
exports.literalValues = __webpack_exports__.literalValues;
|
|
112
|
+
exports.resolveVariables = __webpack_exports__.resolveVariables;
|
|
82
113
|
exports.useWatch = __webpack_exports__.useWatch;
|
|
83
114
|
exports.validationPlugin = __webpack_exports__.validationPlugin;
|
|
84
115
|
exports.workflowPlugin = __webpack_exports__.workflowPlugin;
|
|
85
116
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
117
|
+
"DEFAULT_METADATA_FORM_STRINGS",
|
|
86
118
|
"DataFetcher",
|
|
87
119
|
"DataSourceBuilder",
|
|
88
120
|
"DataTransformers",
|
|
89
121
|
"ExpressionBuilder",
|
|
122
|
+
"FIELD_CONTROL_GEOMETRY",
|
|
90
123
|
"FetchAdapter",
|
|
124
|
+
"FieldControl",
|
|
91
125
|
"FormDesigner",
|
|
92
126
|
"FormFieldRenderer",
|
|
93
127
|
"FormStateViewer",
|
|
94
128
|
"MetadataForm",
|
|
129
|
+
"ModeAwareField",
|
|
95
130
|
"RuleBuilder",
|
|
96
131
|
"RulesEngine",
|
|
97
132
|
"StringListField",
|
|
133
|
+
"VALUE_MODE_OPAQUE",
|
|
98
134
|
"analyticsPlugin",
|
|
99
135
|
"auditPlugin",
|
|
100
136
|
"autoSavePlugin",
|
|
137
|
+
"createAiAssistAction",
|
|
138
|
+
"createClearAction",
|
|
139
|
+
"createInsertVariableAction",
|
|
140
|
+
"envelopeCodec",
|
|
101
141
|
"formatTemplate",
|
|
102
142
|
"formattingPlugin",
|
|
103
143
|
"hasMinMaxStep",
|
|
104
144
|
"hasOptions",
|
|
105
145
|
"isCustomField",
|
|
146
|
+
"isEmptyModeValue",
|
|
106
147
|
"isFileField",
|
|
148
|
+
"isValueModeEnvelope",
|
|
149
|
+
"literalValues",
|
|
150
|
+
"resolveVariables",
|
|
107
151
|
"useWatch",
|
|
108
152
|
"validationPlugin",
|
|
109
153
|
"workflowPlugin"
|
|
@@ -3,12 +3,17 @@
|
|
|
3
3
|
* Enterprise-grade metadata-driven form system
|
|
4
4
|
*/
|
|
5
5
|
export { type AdapterRequest, type AdapterResponse, type DataAdapter, DataFetcher, DataSourceBuilder, DataTransformers, FetchAdapter, } from './data-fetcher';
|
|
6
|
+
export { type AiAssistActionOptions, type ClearActionOptions, createAiAssistAction, createClearAction, createInsertVariableAction, type FieldActionContext, type FieldActionGenerate, type FieldActionRegistry, type FieldActionsPluginConfig, type FieldHeaderAction, type FieldMenuAction, type InsertVariableActionOptions, resolveVariables, type ValueModeVariable, } from './field-actions';
|
|
7
|
+
export { FIELD_CONTROL_GEOMETRY, FieldControl, type FieldControlFormField, type FieldControlGeometry, type FieldControlLabelTarget, type FieldControlProps, } from './field-control';
|
|
6
8
|
export { FormFieldRenderer } from './field-renderer';
|
|
7
9
|
export { FormDesigner } from './form-designer';
|
|
8
10
|
export { analyticsPlugin, auditPlugin, autoSavePlugin, formattingPlugin, validationPlugin, workflowPlugin, } from './form-plugins';
|
|
9
|
-
export type { CustomFieldComponentProps, CustomValueType, DataSource, FieldCondition, FieldMetadata, FieldOption, FieldRule, FieldType, FormAction, FormContext, FormPlugin, FormSchema, FormSection, FormStep, StringListFieldMetadata, } from './form-schema';
|
|
11
|
+
export type { CustomComponents, CustomFieldComponentProps, CustomValueType, DataSource, FieldCondition, FieldMetadata, FieldOption, FieldRule, FieldType, FormAction, FormContext, FormPlugin, FormSchema, FormSection, FormStep, FormVariables, StringListFieldMetadata, ValueModeControlRef, ValueModeId, ValueModesConfig, } from './form-schema';
|
|
10
12
|
export { hasMinMaxStep, hasOptions, isCustomField, isFileField, } from './form-schema';
|
|
11
13
|
export { FormStateViewer } from './form-state-viewer';
|
|
14
|
+
export { type ClearActionStrings, DEFAULT_METADATA_FORM_STRINGS, type FormValidationStrings, type MetadataFormStringOverrides, type MetadataFormStrings, } from './form-strings';
|
|
12
15
|
export { MetadataForm, type MetadataFormProps, useWatch } from './metadata-form';
|
|
16
|
+
export { ModeAwareField, type ModeAwareFieldProps, } from './mode-aware-field';
|
|
13
17
|
export { ExpressionBuilder, RuleBuilder, RulesEngine } from './rules-engine';
|
|
14
18
|
export { formatTemplate, StringListField, type StringListFieldProps } from './string-list-field';
|
|
19
|
+
export { type CodecContext, type ConvertResult, type DecodedValue, envelopeCodec, type FieldControlRegistration, isEmptyModeValue, isValueModeEnvelope, literalValues, VALUE_MODE_OPAQUE, type ValueModeCodec, type ValueModeControlHandle, type ValueModeControlProps, type ValueModeControlRegistration, type ValueModeDefinition, type ValueModeEnvelope, type ValueModeRegistry, type ValueModesPluginConfig, } from './value-modes';
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { DataFetcher, DataSourceBuilder, DataTransformers, FetchAdapter } from "./data-fetcher.js";
|
|
2
|
+
import { createAiAssistAction, createClearAction, createInsertVariableAction, resolveVariables } from "./field-actions.js";
|
|
3
|
+
import { FIELD_CONTROL_GEOMETRY, FieldControl } from "./field-control.js";
|
|
2
4
|
import { FormFieldRenderer } from "./field-renderer.js";
|
|
3
5
|
import { FormDesigner } from "./form-designer.js";
|
|
4
6
|
import { analyticsPlugin, auditPlugin, autoSavePlugin, formattingPlugin, validationPlugin, workflowPlugin } from "./form-plugins.js";
|
|
5
7
|
import { hasMinMaxStep, hasOptions, isCustomField, isFileField } from "./form-schema.js";
|
|
6
8
|
import { FormStateViewer } from "./form-state-viewer.js";
|
|
9
|
+
import { DEFAULT_METADATA_FORM_STRINGS } from "./form-strings.js";
|
|
7
10
|
import { MetadataForm, useWatch } from "./metadata-form.js";
|
|
11
|
+
import { ModeAwareField } from "./mode-aware-field.js";
|
|
8
12
|
import { ExpressionBuilder, RuleBuilder, RulesEngine } from "./rules-engine.js";
|
|
9
13
|
import { StringListField, formatTemplate } from "./string-list-field.js";
|
|
10
|
-
|
|
14
|
+
import { VALUE_MODE_OPAQUE, envelopeCodec, isEmptyModeValue, isValueModeEnvelope, literalValues } from "./value-modes.js";
|
|
15
|
+
export { DEFAULT_METADATA_FORM_STRINGS, DataFetcher, DataSourceBuilder, DataTransformers, ExpressionBuilder, FIELD_CONTROL_GEOMETRY, FetchAdapter, FieldControl, FormDesigner, FormFieldRenderer, FormStateViewer, MetadataForm, ModeAwareField, RuleBuilder, RulesEngine, StringListField, VALUE_MODE_OPAQUE, analyticsPlugin, auditPlugin, autoSavePlugin, createAiAssistAction, createClearAction, createInsertVariableAction, envelopeCodec, formatTemplate, formattingPlugin, hasMinMaxStep, hasOptions, isCustomField, isEmptyModeValue, isFileField, isValueModeEnvelope, literalValues, resolveVariables, useWatch, validationPlugin, workflowPlugin };
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
LiteralValueContext: ()=>LiteralValueContext
|
|
28
|
+
});
|
|
29
|
+
const external_react_namespaceObject = require("react");
|
|
30
|
+
const LiteralValueContext = (0, external_react_namespaceObject.createContext)((_name, stored)=>stored);
|
|
31
|
+
exports.LiteralValueContext = __webpack_exports__.LiteralValueContext;
|
|
32
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
33
|
+
"LiteralValueContext"
|
|
34
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
35
|
+
Object.defineProperty(exports, '__esModule', {
|
|
36
|
+
value: true
|
|
37
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads another field's value the way rules and data sources do: its fixed value when it has value
|
|
3
|
+
* modes. MetadataForm provides it; a control outside one reads values as stored.
|
|
4
|
+
*/
|
|
5
|
+
export declare const LiteralValueContext: import("react").Context<(name: string, stored: unknown) => unknown>;
|