@epam/ai-dial-ui-kit 0.9.0-rc.8 → 0.9.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/README.md +7 -0
- package/dist/components-manifest.json +4732 -0
- package/dist/dial-ui-kit.cjs.js +40 -35
- package/dist/dial-ui-kit.es.js +22571 -18395
- package/dist/index.css +2 -2
- package/dist/mcp-server.cjs +357 -0
- package/dist/src/components/Alert/Alert.d.ts +1 -0
- package/dist/src/components/Alert/constants.d.ts +1 -1
- package/dist/src/components/AutocompleteInput/AutocompleteInputValue.d.ts +8 -3
- package/dist/src/components/Breadcrumb/Breadcrumb.d.ts +1 -0
- package/dist/src/components/Breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/dist/src/components/Breadcrumb/constants.d.ts +1 -1
- package/dist/src/components/Button/Button.d.ts +1 -0
- package/dist/src/components/ButtonDropdown/ButtonDropdown.d.ts +1 -0
- package/dist/src/components/CaptionText/CaptionText.d.ts +1 -0
- package/dist/src/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/src/components/CloseButton/CloseButton.d.ts +1 -0
- package/dist/src/components/CollapsibleSidebar/CollapsibleSidebar.d.ts +2 -0
- package/dist/src/components/ConfirmationPopup/ConfirmationPopup.d.ts +1 -0
- package/dist/src/components/DraggableItem/DraggableItem.d.ts +1 -0
- package/dist/src/components/Dropdown/Dropdown.d.ts +2 -0
- package/dist/src/components/EllipsisTooltip/EllipsisTooltip.d.ts +2 -0
- package/dist/src/components/FileIcon/FileIcon.d.ts +1 -0
- package/dist/src/components/FileManager/FileManager.d.ts +20 -13
- package/dist/src/components/FileManager/FileManagerContext.d.ts +5 -0
- package/dist/src/components/FileManager/FileManagerProvider.d.ts +1 -0
- package/dist/src/components/FileManager/FileManagerTooltip.d.ts +11 -0
- package/dist/src/components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup.d.ts +2 -0
- package/dist/src/components/FileManager/hooks/use-file-download.d.ts +2 -1
- package/dist/src/components/FileManager/hooks/use-file-manager-columns.d.ts +1 -0
- package/dist/src/components/FileManager/hooks/use-file-upload.d.ts +13 -0
- package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +3 -1
- package/dist/src/components/FileManager/utils.d.ts +4 -0
- package/dist/src/components/FileManager/utils.spec.d.ts +1 -0
- package/dist/src/components/FileName/FileName.d.ts +2 -0
- package/dist/src/components/FolderName/FolderName.d.ts +2 -0
- package/dist/src/components/FormItem/FormItem.d.ts +1 -0
- package/dist/src/components/FormPopup/FormPopup.d.ts +1 -0
- package/dist/src/components/Grid/Grid.d.ts +2 -3
- package/dist/src/components/Icon/Icon.d.ts +1 -0
- package/dist/src/components/IconButton/IconButton.d.ts +1 -0
- package/dist/src/components/InfoButton/constants.d.ts +1 -1
- package/dist/src/components/Input/Input.d.ts +2 -0
- package/dist/src/components/InputPopup/InputPopup.d.ts +9 -0
- package/dist/src/components/Label/Label.d.ts +1 -0
- package/dist/src/components/LabelledText/LabelledText.d.ts +1 -0
- package/dist/src/components/LoadFileArea/LoadFileArea.d.ts +2 -0
- package/dist/src/components/LoadFileArea/LoadFileAreaField.d.ts +2 -0
- package/dist/src/components/Loader/Loader.d.ts +1 -0
- package/dist/src/components/NoDataContent/NoDataContent.d.ts +1 -0
- package/dist/src/components/NumberInput/NumberInput.d.ts +8 -0
- package/dist/src/components/PasswordInput/PasswordInput.d.ts +1 -0
- package/dist/src/components/Popup/Popup.d.ts +1 -0
- package/dist/src/components/RadioButton/RadioButton.d.ts +1 -0
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +1 -0
- package/dist/src/components/RadioGroupPopupField/RadioGroupPopupField.d.ts +1 -0
- package/dist/src/components/RemoveButton/RemoveButton.d.ts +1 -0
- package/dist/src/components/ResizableContainer/ConditionalResizableContainer.d.ts +1 -0
- package/dist/src/components/ResizableContainer/ResizableContainer.d.ts +2 -0
- package/dist/src/components/SchemeRenderer/SchemeRenderer.d.ts +26 -0
- package/dist/src/components/SchemeRenderer/components/SchemaAnyOfEditor.d.ts +31 -0
- package/dist/src/components/SchemeRenderer/components/SchemaArrayEditor.d.ts +31 -0
- package/dist/src/components/SchemeRenderer/components/SchemaField.d.ts +28 -0
- package/dist/src/components/SchemeRenderer/components/SchemaFieldContent.d.ts +25 -0
- package/dist/src/components/SchemeRenderer/components/SchemaKeyValueEditor.d.ts +25 -0
- package/dist/src/components/SchemeRenderer/components/SchemaObjectEditor.d.ts +31 -0
- package/dist/src/components/SchemeRenderer/components/SchemaOneOfEditor.d.ts +31 -0
- package/dist/src/components/SchemeRenderer/components/SchemaPrimitiveField.d.ts +27 -0
- package/dist/src/components/SchemeRenderer/components/SchemaSection.d.ts +33 -0
- package/dist/src/components/SchemeRenderer/context.d.ts +11 -0
- package/dist/src/components/SchemeRenderer/tests/utils.spec.d.ts +1 -0
- package/dist/src/components/SchemeRenderer/types.d.ts +71 -0
- package/dist/src/components/SchemeRenderer/utils.d.ts +11 -0
- package/dist/src/components/Search/Search.d.ts +2 -0
- package/dist/src/components/Select/Select.d.ts +2 -0
- package/dist/src/components/Select/constants.d.ts +2 -2
- package/dist/src/components/SelectField/SelectField.d.ts +1 -0
- package/dist/src/components/SharedEntityIndicator/SharedEntityIndicator.d.ts +1 -0
- package/dist/src/components/Skeleton/Skeleton.d.ts +1 -0
- package/dist/src/components/Steps/Steps.d.ts +1 -0
- package/dist/src/components/Switch/Switch.d.ts +1 -0
- package/dist/src/components/Tabs/Tabs.d.ts +2 -0
- package/dist/src/components/Tag/Tag.d.ts +2 -0
- package/dist/src/components/TagInput/TagInput.d.ts +9 -1
- package/dist/src/components/Textarea/Textarea.d.ts +1 -0
- package/dist/src/components/Tooltip/Tooltip.d.ts +1 -0
- package/dist/src/constants/storybook/input.d.ts +3 -1
- package/dist/src/index.d.ts +3 -1
- package/dist/src/mcp/generate-manifest.d.ts +1 -0
- package/dist/src/mcp/server.d.ts +1 -0
- package/dist/src/mcp/types.d.ts +54 -0
- package/dist/src/types/file-manager.d.ts +4 -2
- package/package.json +19 -3
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { DialSchemeRendererProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Renders a JSON Schema as a form UI with collapsible sections, validation, and default values.
|
|
5
|
+
* aliases: SchemaRenderer|JsonSchemaForm
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <DialSchemeRenderer
|
|
10
|
+
* schema={mySchema}
|
|
11
|
+
* onChange={(v) => console.log(v)}
|
|
12
|
+
* onDefaultValues={(defaults) => console.log(defaults)}
|
|
13
|
+
* />
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @param schema - The root JSON Schema to render
|
|
17
|
+
* @param [defaultValue] - Initial form value; if omitted, defaults are extracted from schema
|
|
18
|
+
* @param [texts] - Override any user-visible strings rendered by the component
|
|
19
|
+
* @param [className] - Additional CSS classes for the root container
|
|
20
|
+
* @param [readonly=false] - When true all inputs are disabled; sections remain collapsible
|
|
21
|
+
* @param [defaultExpanded=true] - Initial expanded state for all collapsible sections
|
|
22
|
+
* @param [onChange] - Called with the full form value on every change
|
|
23
|
+
* @param [onPropertyChange] - Called with `(path, value)` for each individual property change
|
|
24
|
+
* @param [onDefaultValues] - Called once on mount with the resolved default values
|
|
25
|
+
*/
|
|
26
|
+
export declare const DialSchemeRenderer: FC<DialSchemeRendererProps>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { JsonSchemaDef } from '../types';
|
|
3
|
+
export interface SchemaAnyOfEditorProps {
|
|
4
|
+
schema: JsonSchemaDef;
|
|
5
|
+
value: unknown;
|
|
6
|
+
onChange: (value: unknown) => void;
|
|
7
|
+
path: string[];
|
|
8
|
+
level: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Renders an `anyOf` schema field as a type-selector dropdown with an inline sub-editor.
|
|
12
|
+
* aliases: AnyOfSchemaEditor|SchemaUnionEditor
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <SchemaAnyOfEditor
|
|
17
|
+
* schema={{ anyOf: [{ type: 'null' }, { type: 'string' }] }}
|
|
18
|
+
* value={null}
|
|
19
|
+
* onChange={(v) => console.log(v)}
|
|
20
|
+
* path={['field']}
|
|
21
|
+
* level={1}
|
|
22
|
+
* />
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @param schema - The JSON Schema definition containing an `anyOf` array
|
|
26
|
+
* @param value - Current field value
|
|
27
|
+
* @param onChange - Called with the new value when the type or sub-value changes
|
|
28
|
+
* @param path - Field path segments used for validation error tracking
|
|
29
|
+
* @param level - Nesting depth passed to child field components
|
|
30
|
+
*/
|
|
31
|
+
export declare const SchemaAnyOfEditor: FC<SchemaAnyOfEditorProps>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { JsonSchemaDef } from '../types';
|
|
3
|
+
export interface SchemaArrayEditorProps {
|
|
4
|
+
schema: JsonSchemaDef;
|
|
5
|
+
value: unknown;
|
|
6
|
+
onChange: (value: unknown) => void;
|
|
7
|
+
path: string[];
|
|
8
|
+
level: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Renders a JSON Schema array as a list of collapsible items with add and remove controls.
|
|
12
|
+
* aliases: ArraySchemaEditor|SchemaListEditor
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <SchemaArrayEditor
|
|
17
|
+
* schema={{ type: 'array', items: { type: 'string' } }}
|
|
18
|
+
* value={['foo', 'bar']}
|
|
19
|
+
* onChange={(v) => console.log(v)}
|
|
20
|
+
* path={['tags']}
|
|
21
|
+
* level={1}
|
|
22
|
+
* />
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @param schema - The JSON Schema array definition (must include an `items` sub-schema)
|
|
26
|
+
* @param value - Current array value
|
|
27
|
+
* @param onChange - Called with the updated array when items are added, removed, or changed
|
|
28
|
+
* @param path - Field path segments used for validation error tracking
|
|
29
|
+
* @param level - Nesting depth passed to child section components
|
|
30
|
+
*/
|
|
31
|
+
export declare const SchemaArrayEditor: FC<SchemaArrayEditorProps>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { SchemaFieldProps } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Renders a single schema property as a labeled field or a collapsible section.
|
|
5
|
+
* aliases: SchemaPropertyField|SchemaFormField
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <SchemaField
|
|
10
|
+
* schema={{ type: 'string' }}
|
|
11
|
+
* value="hello"
|
|
12
|
+
* onChange={(v) => console.log(v)}
|
|
13
|
+
* path={['name']}
|
|
14
|
+
* level={1}
|
|
15
|
+
* required
|
|
16
|
+
* label="Name"
|
|
17
|
+
* />
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @param schema - The JSON Schema definition for this field
|
|
21
|
+
* @param value - Current field value
|
|
22
|
+
* @param onChange - Called with the updated value when the field changes
|
|
23
|
+
* @param path - Field path segments used for validation error tracking
|
|
24
|
+
* @param [level=0] - Nesting depth; object/array fields render as collapsible sections
|
|
25
|
+
* @param [required] - Whether the field is required (shows error when empty)
|
|
26
|
+
* @param [label] - Display label; falls back to schema title or path segment
|
|
27
|
+
*/
|
|
28
|
+
export declare const SchemaField: FC<SchemaFieldProps>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { SchemaFieldContentProps } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Routes a resolved schema to the appropriate editor component.
|
|
5
|
+
* aliases: SchemaEditorRouter|SchemaContentDispatcher
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <SchemaFieldContent
|
|
10
|
+
* schema={{ type: 'string' }}
|
|
11
|
+
* value="hello"
|
|
12
|
+
* onChange={(v) => console.log(v)}
|
|
13
|
+
* path={['name']}
|
|
14
|
+
* level={1}
|
|
15
|
+
* />
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @param schema - The JSON Schema definition to render
|
|
19
|
+
* @param value - Current field value
|
|
20
|
+
* @param onChange - Called with the updated value when the field changes
|
|
21
|
+
* @param path - Field path segments used for validation error tracking
|
|
22
|
+
* @param level - Nesting depth passed to child editor components
|
|
23
|
+
* @param [required] - Whether the field is required (passed to primitive fields for error styling)
|
|
24
|
+
*/
|
|
25
|
+
export declare const SchemaFieldContent: FC<SchemaFieldContentProps>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { JsonSchemaDef } from '../types';
|
|
3
|
+
export interface SchemaKeyValueEditorProps {
|
|
4
|
+
schema: JsonSchemaDef;
|
|
5
|
+
value: unknown;
|
|
6
|
+
onChange: (value: unknown) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Renders an `additionalProperties` object schema as an editable key-value list.
|
|
10
|
+
* aliases: KeyValueSchemaEditor|AdditionalPropertiesEditor
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <SchemaKeyValueEditor
|
|
15
|
+
* schema={{ type: 'object', additionalProperties: { type: 'string' } }}
|
|
16
|
+
* value={{ foo: 'bar' }}
|
|
17
|
+
* onChange={(v) => console.log(v)}
|
|
18
|
+
* />
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @param schema - The JSON Schema object definition with `additionalProperties`
|
|
22
|
+
* @param value - Current object value (treated as a key-value map)
|
|
23
|
+
* @param onChange - Called with the updated object when pairs are added, removed, or changed
|
|
24
|
+
*/
|
|
25
|
+
export declare const SchemaKeyValueEditor: FC<SchemaKeyValueEditorProps>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { JsonSchemaDef } from '../types';
|
|
3
|
+
export interface SchemaObjectEditorProps {
|
|
4
|
+
schema: JsonSchemaDef;
|
|
5
|
+
value: unknown;
|
|
6
|
+
onChange: (value: unknown) => void;
|
|
7
|
+
path: string[];
|
|
8
|
+
level: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Renders the properties of a JSON Schema object as labeled form fields.
|
|
12
|
+
* aliases: ObjectSchemaEditor|SchemaPropertiesEditor
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <SchemaObjectEditor
|
|
17
|
+
* schema={{ type: 'object', properties: { name: { type: 'string' } } }}
|
|
18
|
+
* value={{ name: 'Alice' }}
|
|
19
|
+
* onChange={(v) => console.log(v)}
|
|
20
|
+
* path={['config']}
|
|
21
|
+
* level={1}
|
|
22
|
+
* />
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @param schema - The JSON Schema object definition
|
|
26
|
+
* @param value - Current object value
|
|
27
|
+
* @param onChange - Called with the updated object when any property changes
|
|
28
|
+
* @param path - Field path segments used for validation error tracking
|
|
29
|
+
* @param level - Nesting depth passed to child SchemaField instances
|
|
30
|
+
*/
|
|
31
|
+
export declare const SchemaObjectEditor: FC<SchemaObjectEditorProps>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { JsonSchemaDef } from '../types';
|
|
3
|
+
export interface SchemaOneOfEditorProps {
|
|
4
|
+
schema: JsonSchemaDef;
|
|
5
|
+
value: unknown;
|
|
6
|
+
onChange: (value: unknown) => void;
|
|
7
|
+
path: string[];
|
|
8
|
+
level: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Renders a `oneOf` schema field as a type-selector dropdown with an inline sub-editor.
|
|
12
|
+
* aliases: OneOfSchemaEditor|SchemaDiscriminatorEditor
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <SchemaOneOfEditor
|
|
17
|
+
* schema={{ oneOf: [...], discriminator: { propertyName: 'type', mapping: {...} } }}
|
|
18
|
+
* value={{ type: 'foo' }}
|
|
19
|
+
* onChange={(v) => console.log(v)}
|
|
20
|
+
* path={['config']}
|
|
21
|
+
* level={1}
|
|
22
|
+
* />
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @param schema - The JSON Schema definition containing a `oneOf` array and optional `discriminator`
|
|
26
|
+
* @param value - Current field value
|
|
27
|
+
* @param onChange - Called with the new value when the selected type or sub-value changes
|
|
28
|
+
* @param path - Field path segments used for validation error tracking
|
|
29
|
+
* @param level - Nesting depth passed to child editor components
|
|
30
|
+
*/
|
|
31
|
+
export declare const SchemaOneOfEditor: FC<SchemaOneOfEditorProps>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { JsonSchemaDef } from '../types';
|
|
3
|
+
export interface SchemaPrimitiveFieldProps {
|
|
4
|
+
schema: JsonSchemaDef;
|
|
5
|
+
value: unknown;
|
|
6
|
+
onChange: (value: unknown) => void;
|
|
7
|
+
invalid?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Renders a single primitive schema field: string, integer, number, boolean, enum, or const.
|
|
11
|
+
* aliases: SchemaInputField|PrimitiveSchemaField
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <SchemaPrimitiveField
|
|
16
|
+
* schema={{ type: 'string', enum: ['a', 'b'] }}
|
|
17
|
+
* value="a"
|
|
18
|
+
* onChange={(v) => console.log(v)}
|
|
19
|
+
* />
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @param schema - The resolved JSON Schema definition for this field
|
|
23
|
+
* @param value - Current field value
|
|
24
|
+
* @param onChange - Called with the new value when the field changes
|
|
25
|
+
* @param [invalid] - Whether the field has a validation error (applies error styling)
|
|
26
|
+
*/
|
|
27
|
+
export declare const SchemaPrimitiveField: FC<SchemaPrimitiveFieldProps>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
export interface SchemaSectionProps {
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
summary?: string;
|
|
6
|
+
errorCount?: number;
|
|
7
|
+
level?: number;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
onRemove?: () => void;
|
|
10
|
+
defaultExpanded?: boolean;
|
|
11
|
+
removeItemAriaLabel?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A collapsible section card used to wrap schema property groups.
|
|
15
|
+
* aliases: CollapsibleSchemaSection|SchemaCard
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <SchemaSection title="Settings" level={0} summary="3/4 fields" errorCount={1}>
|
|
20
|
+
* <p>Content</p>
|
|
21
|
+
* </SchemaSection>
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @param title - Section header title
|
|
25
|
+
* @param [description] - Optional description shown in collapsed state
|
|
26
|
+
* @param [summary] - Short summary text shown in the header (e.g. "3/4 fields", "2 items")
|
|
27
|
+
* @param [errorCount=0] - Number of validation errors; shows error badge when > 0
|
|
28
|
+
* @param [level=0] - Nesting depth; 0 = top-level card style, 1+ = nested style
|
|
29
|
+
* @param [children] - Section body content rendered when expanded
|
|
30
|
+
* @param [onRemove] - If provided, shows a remove button in the section header
|
|
31
|
+
* @param [defaultExpanded=true] - Whether the section starts in the expanded state
|
|
32
|
+
*/
|
|
33
|
+
export declare const SchemaSection: FC<SchemaSectionProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JsonSchema, SchemaRendererTexts } from './types';
|
|
2
|
+
interface SchemaRendererContextValue {
|
|
3
|
+
rootSchema: JsonSchema;
|
|
4
|
+
texts: SchemaRendererTexts;
|
|
5
|
+
readonly?: boolean;
|
|
6
|
+
defaultExpanded?: boolean;
|
|
7
|
+
inputClassName?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const SchemaRendererContext: import('react').Context<SchemaRendererContextValue | null>;
|
|
10
|
+
export declare function useSchemaContext(): SchemaRendererContextValue;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export interface JsonSchemaDef {
|
|
2
|
+
$ref?: string;
|
|
3
|
+
type?: string | string[];
|
|
4
|
+
title?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
default?: unknown;
|
|
7
|
+
const?: unknown;
|
|
8
|
+
enum?: unknown[];
|
|
9
|
+
properties?: Record<string, JsonSchemaDef>;
|
|
10
|
+
required?: string[];
|
|
11
|
+
items?: JsonSchemaDef;
|
|
12
|
+
oneOf?: JsonSchemaDef[];
|
|
13
|
+
anyOf?: JsonSchemaDef[];
|
|
14
|
+
discriminator?: {
|
|
15
|
+
propertyName: string;
|
|
16
|
+
mapping: Record<string, string>;
|
|
17
|
+
};
|
|
18
|
+
'dial:meta'?: Record<string, unknown>;
|
|
19
|
+
'dial:resource'?: boolean;
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
}
|
|
22
|
+
export interface JsonSchema extends JsonSchemaDef {
|
|
23
|
+
$defs?: Record<string, JsonSchemaDef>;
|
|
24
|
+
}
|
|
25
|
+
export interface ValidationError {
|
|
26
|
+
path: string;
|
|
27
|
+
message: string;
|
|
28
|
+
}
|
|
29
|
+
export interface SchemaRendererTexts {
|
|
30
|
+
noItemSchema: string;
|
|
31
|
+
noItemsYet: string;
|
|
32
|
+
addItem: string;
|
|
33
|
+
selectTypeToAdd: string;
|
|
34
|
+
noConfigurableProperties: string;
|
|
35
|
+
noFieldsYet: string;
|
|
36
|
+
keyColumnHeader: string;
|
|
37
|
+
valueColumnHeader: string;
|
|
38
|
+
addField: string;
|
|
39
|
+
keyInputPlaceholder: string;
|
|
40
|
+
stringInputPlaceholder: string;
|
|
41
|
+
integerInputPlaceholder: string;
|
|
42
|
+
numberInputPlaceholder: string;
|
|
43
|
+
enumSelectPlaceholder: string;
|
|
44
|
+
selectTypePlaceholder: string;
|
|
45
|
+
removeItemAriaLabel: string;
|
|
46
|
+
removeFieldAriaLabel: string;
|
|
47
|
+
}
|
|
48
|
+
export declare const DEFAULT_SCHEMA_TEXTS: SchemaRendererTexts;
|
|
49
|
+
export interface DialSchemeRendererProps {
|
|
50
|
+
schema: JsonSchema;
|
|
51
|
+
defaultValue?: Record<string, unknown>;
|
|
52
|
+
texts?: Partial<SchemaRendererTexts>;
|
|
53
|
+
className?: string;
|
|
54
|
+
readonly?: boolean;
|
|
55
|
+
defaultExpanded?: boolean;
|
|
56
|
+
inputClassName?: string;
|
|
57
|
+
onChange?: (value: Record<string, unknown>) => void;
|
|
58
|
+
onPropertyChange?: (path: string, value: unknown) => void;
|
|
59
|
+
onDefaultValues?: (value: Record<string, unknown>) => void;
|
|
60
|
+
}
|
|
61
|
+
export interface SchemaFieldContentProps {
|
|
62
|
+
schema: JsonSchemaDef;
|
|
63
|
+
value: unknown;
|
|
64
|
+
onChange: (value: unknown) => void;
|
|
65
|
+
path: string[];
|
|
66
|
+
level: number;
|
|
67
|
+
required?: boolean;
|
|
68
|
+
}
|
|
69
|
+
export interface SchemaFieldProps extends SchemaFieldContentProps {
|
|
70
|
+
label?: string;
|
|
71
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { JsonSchema, JsonSchemaDef, ValidationError } from './types';
|
|
2
|
+
export declare function resolveRef(schema: JsonSchemaDef, rootSchema: JsonSchema, depth?: number): JsonSchemaDef;
|
|
3
|
+
export declare function isObjectType(schema: JsonSchemaDef): boolean;
|
|
4
|
+
export declare function toFieldLabel(key: string): string;
|
|
5
|
+
export declare function getOptionLabel(schema: JsonSchemaDef, rootSchema: JsonSchema): string;
|
|
6
|
+
export declare function extractDefaults(schema: JsonSchemaDef, rootSchema: JsonSchema, depth?: number): unknown;
|
|
7
|
+
export declare function validateRequired(value: unknown, schema: JsonSchemaDef, rootSchema: JsonSchema, path?: string, depth?: number): ValidationError[];
|
|
8
|
+
export declare function buildSummary(value: unknown, schema: JsonSchemaDef, rootSchema: JsonSchema): string;
|
|
9
|
+
export declare function detectAnyOfVariant(value: unknown, schemas: JsonSchemaDef[], rootSchema: JsonSchema): number;
|
|
10
|
+
export declare function getItemTitle(item: unknown, discriminatorProp: string | undefined, index: number): string;
|
|
11
|
+
export declare function getSchemaDefault(schema: JsonSchemaDef): unknown;
|
|
@@ -7,6 +7,8 @@ export interface DialSearchProps extends Omit<DialInputProps, 'type' | 'size' |
|
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* A search input component with a customizable placeholder, icons, flexible props, and the ability
|
|
10
|
+
* aliases: SearchField|QueryInput
|
|
11
|
+
*
|
|
10
12
|
* to clear the input value via a clear button. Supports multiple sizes for flexible layouts.
|
|
11
13
|
*
|
|
12
14
|
* @example
|
|
@@ -34,9 +34,11 @@ export interface DialSelectProps {
|
|
|
34
34
|
onChange?: (next: string | string[]) => void;
|
|
35
35
|
inlineSearch?: boolean;
|
|
36
36
|
onFooterClick?: (e: MouseEvent<HTMLDivElement>) => void;
|
|
37
|
+
customMultiSelectTagsRenderer?: (options: SelectOption[], selectedValues: string[], handleRemoveTag: (event: MouseEvent<HTMLButtonElement, globalThis.MouseEvent>, val: string) => void) => ReactNode;
|
|
37
38
|
}
|
|
38
39
|
/**
|
|
39
40
|
* A versatile select supporting single and multiple selections.
|
|
41
|
+
* aliases: OptionPicker|ChoiceSelector
|
|
40
42
|
*
|
|
41
43
|
* Single mode mirrors the legacy visual:
|
|
42
44
|
* - Trigger shows the selected option's leading icon + label.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const selectTriggerBaseClassName = "dial-input flex w-full items-center justify-between gap-2 dial-small cursor-pointer";
|
|
1
|
+
export declare const selectTriggerBaseClassName = "dial-input flex w-full items-center justify-between gap-2 dial-small-text cursor-pointer";
|
|
2
2
|
export declare const selectOverlayBaseClassName = "w-full rounded flex flex-col";
|
|
3
|
-
export declare const selectOptionBaseClassName = "flex w-full items-center justify-between gap-2 px-3 h-[34px] dial-small text-primary truncate hover:bg-accent-primary-alpha focus:bg-accent-primary-alpha focus:outline-none";
|
|
3
|
+
export declare const selectOptionBaseClassName = "flex w-full items-center justify-between gap-2 px-3 h-[34px] dial-small-text text-primary truncate hover:bg-accent-primary-alpha focus:bg-accent-primary-alpha focus:outline-none";
|
|
4
4
|
export declare const selectOptionSelectedClassName = "bg-accent-primary-alpha";
|
|
5
5
|
export declare const selectOptionSingleSelectedClassName = "bg-accent-primary-alpha border-l border-accent-primary border-1";
|
|
6
6
|
export declare const selectOptionDisabledClassName = "opacity-75";
|
|
@@ -8,6 +8,7 @@ export interface DialSelectFieldProps extends Omit<DialSelectProps, 'className'
|
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* A Select field wrapper that composes `DialFormItem` and `DialSelect`.
|
|
11
|
+
* aliases: SelectInput|ComboField
|
|
11
12
|
*
|
|
12
13
|
* Provides unified label, description, error rendering and a readonly view that shows
|
|
13
14
|
* the selected option labels (comma-separated in single mode, list in multiple).
|
|
@@ -21,6 +21,7 @@ export interface DialSkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* DialSkeleton
|
|
24
|
+
* aliases: PlaceholderUI|ShimmerLoader
|
|
24
25
|
*
|
|
25
26
|
* A placeholder component to show while content is loading.
|
|
26
27
|
* Provides various skeleton shapes and configurations.
|
|
@@ -14,6 +14,8 @@ export interface DialTabsProps {
|
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* A responsive and overflow-aware tabs component that automatically adapts its layout
|
|
17
|
+
* aliases: TabNavigation|TabBar
|
|
18
|
+
*
|
|
17
19
|
* between a scrollable tab bar and a dropdown menu on smaller screens.
|
|
18
20
|
*
|
|
19
21
|
* When there are too many tabs to fit in a single line, it introduces a dropdown button
|
|
@@ -10,6 +10,8 @@ export interface DialTagProps {
|
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* A small tag component used to display labeled items such as categories, filters, or selections.
|
|
13
|
+
* aliases: Badge|Chip
|
|
14
|
+
*
|
|
13
15
|
* Optionally supports removal via a close button and multiple colors variants defined by {@link TagVariant}.
|
|
14
16
|
*
|
|
15
17
|
* @example
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { DialLabelProps } from '../Label/Label';
|
|
3
3
|
export interface DialTagInputProps extends DialLabelProps {
|
|
4
|
-
elementId
|
|
4
|
+
elementId?: string;
|
|
5
5
|
initialTags?: string[];
|
|
6
6
|
placeholder?: string;
|
|
7
7
|
captionDescription?: string;
|
|
@@ -9,10 +9,15 @@ export interface DialTagInputProps extends DialLabelProps {
|
|
|
9
9
|
invalid?: boolean;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
collapseTagOverflow?: boolean;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
containerClassName?: string;
|
|
14
|
+
tagClassName?: string;
|
|
12
15
|
onChange?: (tags: string[]) => void;
|
|
13
16
|
}
|
|
14
17
|
/**
|
|
15
18
|
* A tag input field that allows users to add multiple tags using the Enter or comma key.
|
|
19
|
+
* aliases: MultiTag|TagField
|
|
20
|
+
*
|
|
16
21
|
* Supports removing tags, displaying field labels, optional indicators, validation states,
|
|
17
22
|
* and dynamic layout adjustment when tags wrap to multiple lines.
|
|
18
23
|
*
|
|
@@ -38,6 +43,9 @@ export interface DialTagInputProps extends DialLabelProps {
|
|
|
38
43
|
* @param [invalid=false] - Whether the field should be styled as invalid.
|
|
39
44
|
* @param [disabled=false] - Whether the input and remove buttons are disabled.
|
|
40
45
|
* @param [collapseTagOverflow=false] - When true, keeps tags on one line and shows `+N` for overflow.
|
|
46
|
+
* @param [readOnly=false] - When true, hides the text input (no new tags can be added). The outer wrapper and label/caption are also omitted so the component can be embedded inside an existing container.
|
|
47
|
+
* @param [containerClassName] - Additional CSS classes applied to the tag container (the flex row wrapping all tags).
|
|
48
|
+
* @param [tagClassName] - Additional CSS classes applied to each individual tag.
|
|
41
49
|
* @param [onChange] - Callback fired whenever the tag list changes (tag added or removed).
|
|
42
50
|
*/
|
|
43
51
|
export declare const DialTagInput: FC<DialTagInputProps>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ArgTypes } from '@storybook/react';
|
|
2
2
|
import { DialInputProps } from '../../components/Input/Input';
|
|
3
3
|
export declare const inputBaseArgTypes: Partial<ArgTypes<DialInputProps>>;
|
|
4
|
-
export declare const numberInputBaseArgTypes: Partial<ArgTypes<DialInputProps
|
|
4
|
+
export declare const numberInputBaseArgTypes: Partial<ArgTypes<DialInputProps>> & {
|
|
5
|
+
integer?: ArgTypes[string];
|
|
6
|
+
};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -93,5 +93,7 @@ export { GridSelectionMode } from './models/selection-mode';
|
|
|
93
93
|
export { mergeClasses } from './utils/merge-classes';
|
|
94
94
|
export { wrapInRootFolder } from './utils/flat-to-hierarchy-convertor.ts';
|
|
95
95
|
export { NAME_COLUMN, SIZE_COLUMN, UPDATED_AT_COLUMN, } from './constants/file-grid-columns';
|
|
96
|
-
export
|
|
96
|
+
export { DIAL_ICON_SIZE, BASE_ICON_PROPS, BASE_ICON_SIZE, } from './constants/icon.ts';
|
|
97
97
|
export { NOT_ALLOWED_SYMBOLS, NOT_ALLOWED_SPACES, NOT_ALLOWED_SYMBOLS_REGEXP, NOT_ALLOWED_SPACES_REGEXP, } from './constants/validation.ts';
|
|
98
|
+
export { DialSchemeRenderer } from './components/SchemeRenderer/SchemeRenderer';
|
|
99
|
+
export type { DialSchemeRendererProps, JsonSchema, JsonSchemaDef, ValidationError, } from './components/SchemeRenderer/types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export interface PropEntry {
|
|
2
|
+
name: string;
|
|
3
|
+
type: string;
|
|
4
|
+
required: boolean;
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ComponentEntry {
|
|
9
|
+
name: string;
|
|
10
|
+
category: string;
|
|
11
|
+
description: string;
|
|
12
|
+
props: PropEntry[];
|
|
13
|
+
examples: string[];
|
|
14
|
+
sourceFile: string;
|
|
15
|
+
}
|
|
16
|
+
export interface TypeMember {
|
|
17
|
+
name: string;
|
|
18
|
+
value: string;
|
|
19
|
+
comment?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface TypeEntry {
|
|
22
|
+
name: string;
|
|
23
|
+
kind: 'enum' | 'interface' | 'type';
|
|
24
|
+
description?: string;
|
|
25
|
+
members?: TypeMember[];
|
|
26
|
+
typeBody?: string;
|
|
27
|
+
sourceFile: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ExportEntry {
|
|
30
|
+
name: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
signature?: string;
|
|
33
|
+
sourceFile: string;
|
|
34
|
+
}
|
|
35
|
+
export interface KitInfo {
|
|
36
|
+
name: string;
|
|
37
|
+
description: string;
|
|
38
|
+
installation: string;
|
|
39
|
+
cssImport: string;
|
|
40
|
+
peerDependencies: Record<string, string>;
|
|
41
|
+
setupNotes: string;
|
|
42
|
+
}
|
|
43
|
+
export interface Manifest {
|
|
44
|
+
version: string;
|
|
45
|
+
generatedAt: string;
|
|
46
|
+
kit: KitInfo;
|
|
47
|
+
styles: string;
|
|
48
|
+
theming: string;
|
|
49
|
+
components: ComponentEntry[];
|
|
50
|
+
types: TypeEntry[];
|
|
51
|
+
hooks: ExportEntry[];
|
|
52
|
+
utils: ExportEntry[];
|
|
53
|
+
constants: ExportEntry[];
|
|
54
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export declare enum DialFileManagerTabs {
|
|
2
2
|
MyFiles = "my_files",
|
|
3
3
|
Shared = "shared",
|
|
4
|
-
Organization = "organization"
|
|
4
|
+
Organization = "organization",
|
|
5
|
+
Review = "review"
|
|
5
6
|
}
|
|
6
7
|
export declare enum DialFileManagerActions {
|
|
7
8
|
AddSibling = "addSibling",
|
|
@@ -16,7 +17,8 @@ export declare enum DialFileManagerActions {
|
|
|
16
17
|
Unshare = "unshare",
|
|
17
18
|
RemoveAccess = "removeAccess",
|
|
18
19
|
ManagePermissions = "managePermissions",
|
|
19
|
-
Preview = "preview"
|
|
20
|
+
Preview = "preview",
|
|
21
|
+
OpenInNewTab = "openInNewTab"
|
|
20
22
|
}
|
|
21
23
|
export declare enum DialFileManagerConflictActions {
|
|
22
24
|
Replace = "replace",
|