@epam/ai-dial-ui-kit 0.10.0-dev.5 → 0.10.0-dev.6

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.
@@ -24,5 +24,6 @@ import { SchemaFieldProps } from '../types';
24
24
  * @param [level=0] - Nesting depth; object/array fields render as collapsible sections
25
25
  * @param [required] - Whether the field is required (shows error when empty)
26
26
  * @param [label] - Display label; falls back to schema title or path segment
27
+ * @param [skipUntouched] - When `true`, required-field errors are only shown after the user has interacted with a field.
27
28
  */
28
29
  export declare const SchemaField: FC<SchemaFieldProps>;
@@ -9,6 +9,7 @@ interface SchemaRendererContextValue {
9
9
  renderField?: (path: string[], schema: JsonSchemaDef, defaultElement: React.ReactElement) => React.ReactNode;
10
10
  touchedPaths?: ReadonlySet<string>;
11
11
  markTouched?: (path: string) => void;
12
+ skipUntouched?: boolean;
12
13
  }
13
14
  export declare const SchemaRendererContext: React.Context<SchemaRendererContextValue | null>;
14
15
  export declare function useSchemaContext(): SchemaRendererContextValue;
@@ -1,7 +1,8 @@
1
1
  import { default as React } from 'react';
2
2
  export declare enum SchemaRendererVariant {
3
3
  Sections = "sections",
4
- Flat = "flat"
4
+ Flat = "flat",
5
+ FlatSections = "flat-sections"
5
6
  }
6
7
  export declare enum SchemaDisplayMode {
7
8
  Select = "select",
@@ -87,6 +88,11 @@ export interface DialSchemaRendererProps {
87
88
  * properties still use collapsible sections.
88
89
  */
89
90
  variant?: SchemaRendererVariant;
91
+ /**
92
+ * When `true`, required-field errors are only shown after the user has interacted
93
+ * with a field. When `false` (default), all unfilled required fields are highlighted immediately.
94
+ */
95
+ skipUntouched?: boolean;
90
96
  onChange?: (value: Record<string, unknown>) => void;
91
97
  onPropertyChange?: (path: string, value: unknown) => void;
92
98
  onDefaultValues?: (value: Record<string, unknown>) => void;
@@ -1,5 +1,6 @@
1
1
  import { JsonSchema, JsonSchemaDef, ValidationError } from './types';
2
2
  export declare function resolveRef(schema: JsonSchemaDef, rootSchema: JsonSchema, depth?: number): JsonSchemaDef;
3
+ export declare function isMissingRequiredValue(value: unknown): boolean;
3
4
  export declare function isObjectType(schema: JsonSchemaDef): boolean;
4
5
  export declare function toFieldLabel(key: string): string;
5
6
  export declare function getOptionLabel(schema: JsonSchemaDef, rootSchema: JsonSchema): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-ui-kit",
3
- "version": "0.10.0-dev.5",
3
+ "version": "0.10.0-dev.6",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "A modern UI kit for building AI DIAL interfaces with React",