@epam/ai-dial-ui-kit 0.12.0-dev.9 → 0.12.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/CHANGELOG.md +9 -0
- package/dist/JsonEditor-ClTI8-LY.cjs +1 -0
- package/dist/{JsonEditor-BUSVL8Nf.js → JsonEditor-DjEsE74s.js} +3 -4
- package/dist/MarkdownEditor-BMApEDVP.cjs +1 -0
- package/dist/MarkdownEditor-DlKjo9LA.js +35 -0
- package/dist/components-manifest.json +314 -3
- package/dist/dial-ui-kit.cjs.js +1 -1
- package/dist/dial-ui-kit.es.js +95 -93
- package/dist/{index-D1Mdz55f.cjs → index-Bl2M9QgI.cjs} +31 -31
- package/dist/{index-D1DPfPQX.js → index-bLYIiSd_.js} +11491 -10984
- package/dist/index.css +2 -2
- package/dist/migration-guides/0.12.0/legacy-typography-classes-removal.md +57 -0
- package/dist/migration-guides/README.md +1 -0
- package/dist/src/components/Accordion/Accordion.d.ts +6 -0
- package/dist/src/components/Analytics/Bar/Bar.d.ts +18 -0
- package/dist/src/components/Analytics/BarGroup/BarGroup.d.ts +50 -0
- package/dist/src/components/Analytics/Card/Card.d.ts +40 -12
- package/dist/src/components/Analytics/Histogram/Histogram.d.ts +12 -0
- package/dist/src/components/Analytics/Histogram/utils.d.ts +2 -0
- package/dist/src/components/Analytics/index.d.ts +1 -1
- package/dist/src/components/Breadcrumb/BreadcrumbItem.d.ts +1 -0
- package/dist/src/components/Breadcrumb/constants.d.ts +2 -3
- package/dist/src/components/ConfirmationPopup/constants.d.ts +1 -1
- package/dist/src/components/Dropdown/Dropdown.d.ts +2 -0
- package/dist/src/components/FileManager/FileManager.d.ts +2 -0
- package/dist/src/components/FileManager/errors.d.ts +3 -0
- package/dist/src/components/FileManager/hooks/use-file-upload.d.ts +2 -1
- package/dist/src/components/FileManager/hooks/use-folder-creation.d.ts +1 -0
- package/dist/src/components/FileManager/hooks/use-item-renaming.d.ts +1 -0
- package/dist/src/components/InfoButton/constants.d.ts +1 -1
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +2 -0
- package/dist/src/components/RadioGroupPopupField/RadioGroupPopupField.d.ts +1 -0
- package/dist/src/components/SchemaRenderer/SchemaRenderer.d.ts +1 -0
- package/dist/src/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.d.ts +20 -0
- package/dist/src/components/SchemaRenderer/context.d.ts +3 -0
- package/dist/src/components/SchemaRenderer/types.d.ts +14 -0
- package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +39 -0
- package/dist/src/components/SegmentedControl/constants.d.ts +5 -0
- package/dist/src/components/Select/Select.d.ts +3 -0
- package/dist/src/components/Slider/Slider.d.ts +3 -0
- package/dist/src/index.d.ts +5 -1
- package/dist/src/models/analytics.d.ts +7 -0
- package/dist/src/models/segmented-control.d.ts +7 -0
- package/dist/src/models/select.d.ts +6 -0
- package/package.json +1 -1
- package/dist/JsonEditor-bH9iEgeS.cjs +0 -1
- package/dist/MarkdownEditor-DMYUcSTi.cjs +0 -1
- package/dist/MarkdownEditor-DlQ9Xilh.js +0 -36
- package/dist/editor-Ba3vCFHk.cjs +0 -1
- package/dist/editor-Cu1dRT39.js +0 -4
|
@@ -164,6 +164,7 @@ export interface DialFileManagerProps {
|
|
|
164
164
|
fileTooLargeTooltip?: string;
|
|
165
165
|
unsupportedFileTypeTooltip?: string;
|
|
166
166
|
onUploadFiles?: (files: DialUploadFileItem[], destinationFolder: string) => void;
|
|
167
|
+
prepareUploadFileName?: (name: string) => string;
|
|
167
168
|
onValidateUpload?: (files: DialUploadFileItem[], existingFiles: DialFile[], destinationFolder: string) => FileUploadValidationResult | Promise<FileUploadValidationResult>;
|
|
168
169
|
maxFileSize?: number;
|
|
169
170
|
uploadValidationMessages?: FileUploadValidationMessages;
|
|
@@ -286,6 +287,7 @@ export interface DialFileManagerProps {
|
|
|
286
287
|
*
|
|
287
288
|
* @param [onUploadArchive] - Callback fired when archive files are uploaded
|
|
288
289
|
* @param [onUploadFiles] - Callback fired when files are uploaded
|
|
290
|
+
* @param [prepareUploadFileName] - Optional mapper applied to each uploaded item's name before conflict resolution runs and before `onUploadFiles`/`onUploadArchive` are called. Use it to sanitize or normalize names (e.g. stripping forbidden symbols). Conflict detection is performed against the mapped names, so renames take place before the conflict check.
|
|
289
291
|
* @param [onValidateUpload] - Callback to validate files before upload
|
|
290
292
|
* @param [maxFileSize] - Maximum allowed file size for uploads in bytes
|
|
291
293
|
* @param [uploadValidationMessages] - Custom validation messages for file uploads. Consumers can customize these strings for a11y and copy consistency.
|
|
@@ -34,9 +34,10 @@ export interface UseFileUploadOptions {
|
|
|
34
34
|
allowedFileTypes?: DialFileAcceptType[];
|
|
35
35
|
validationMessages?: FileUploadValidationMessages;
|
|
36
36
|
onUploadArchive?: (file: File, name: string, destinationFolder: string) => void;
|
|
37
|
+
prepareUploadFileName?: (name: string) => string;
|
|
37
38
|
currentFolder?: DialFile;
|
|
38
39
|
}
|
|
39
|
-
export declare const useFileUpload: ({ onUploadFiles, onValidateUpload, maxFileSize, allowedFileTypes, validationMessages, onUploadArchive, uploadEnabled, currentFolder, }?: UseFileUploadOptions) => {
|
|
40
|
+
export declare const useFileUpload: ({ onUploadFiles, onValidateUpload, maxFileSize, allowedFileTypes, validationMessages, onUploadArchive, prepareUploadFileName, uploadEnabled, currentFolder, }?: UseFileUploadOptions) => {
|
|
40
41
|
isDragging: boolean;
|
|
41
42
|
isDraggingOverWindow: boolean;
|
|
42
43
|
uploadError: string | undefined;
|
|
@@ -4,6 +4,7 @@ export interface RenameValidationMessages {
|
|
|
4
4
|
emptyName?: string;
|
|
5
5
|
duplicateName?: string;
|
|
6
6
|
hiddenItemWarning?: string;
|
|
7
|
+
consecutiveDotsError?: string;
|
|
7
8
|
}
|
|
8
9
|
export declare const useItemRenaming: ({ items, onRenameValidate, validationMessages, onMoveToFiles, }: {
|
|
9
10
|
items?: DialFile[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const infoButtonClassName = "w-[24px] h-[24px] border border-solid rounded-[6px] border-transparent flex items-center justify-center text-secondary hover:text-controls-accent-primary-hover active:text-controls-accent-primary-active
|
|
1
|
+
export declare const infoButtonClassName = "w-[24px] h-[24px] border border-solid rounded-[6px] border-transparent flex items-center justify-center text-secondary hover:text-controls-accent-primary-hover active:text-controls-accent-primary-active";
|
|
@@ -8,6 +8,7 @@ export interface DialRadioGroupProps {
|
|
|
8
8
|
radioButtons: RadioButtonWithContent[];
|
|
9
9
|
activeRadioButton: string;
|
|
10
10
|
orientation: RadioGroupOrientation;
|
|
11
|
+
labelDescription?: string;
|
|
11
12
|
onChange: (radioId: string) => void;
|
|
12
13
|
radioClassName?: string;
|
|
13
14
|
groupLabelClassName?: string;
|
|
@@ -55,6 +56,7 @@ export interface DialRadioGroupProps {
|
|
|
55
56
|
* @param [selectedLabelClassName] - Additional classes applied to the selected option's label
|
|
56
57
|
* @param [radioGroupClassName] - Additional classes applied to the radio group container
|
|
57
58
|
* @param [disabled] - Disables all child radios when set
|
|
59
|
+
* @param [labelDescription] - Optional description rendered by `DialFormItem`
|
|
58
60
|
* @param radioButtons - Array of options with ids, labels, and optional content
|
|
59
61
|
* @param activeRadioButton - The id of the currently selected radio
|
|
60
62
|
* @param orientation - Layout direction of radios: row or column
|
|
@@ -53,6 +53,7 @@ export interface RadioGroupPopupFieldProps extends Pick<DialLabelProps, 'label'
|
|
|
53
53
|
* @param [selectedValue] - Current value id used to resolve the displayed option name
|
|
54
54
|
* @param radioButtons - Collection of radio options (id/name)
|
|
55
55
|
* @param [customInputValue] - Custom value text to display instead of a radio option name
|
|
56
|
+
* @param [placeholder] - Placeholder text shown in the field when no value is selected; unlike `emptyValueText`, it suppresses the tooltip
|
|
56
57
|
* @param [valueClassName] - Extra classes applied to the value text in the collapsed field
|
|
57
58
|
* @param [inputClassName] - Extra classes applied to the collapsed input container
|
|
58
59
|
* @param emptyValueText - Placeholder text when no value is selected
|
|
@@ -24,5 +24,6 @@ import { DialSchemaRendererProps } from './types';
|
|
|
24
24
|
* @param [onChange] - Called with the full form value on every change
|
|
25
25
|
* @param [onPropertyChange] - Called with `(path, value)` for each individual property change
|
|
26
26
|
* @param [onDefaultValues] - Called once on mount with the resolved default values
|
|
27
|
+
* @param [jsonEditorTheme] - Theme for the JSON editor shown for value keys absent from the schema
|
|
27
28
|
*/
|
|
28
29
|
export declare const DialSchemaRenderer: FC<DialSchemaRendererProps>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { EditorThemes } from '../../../types/editor';
|
|
3
|
+
export interface SchemaAdditionalPropertiesEditorProps {
|
|
4
|
+
value: unknown;
|
|
5
|
+
onChange: (value: unknown) => void;
|
|
6
|
+
theme?: EditorThemes;
|
|
7
|
+
height?: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Renders a single value key that is not declared in the schema's `properties` as a raw JSON
|
|
11
|
+
* editor, letting users inspect and manually edit it. The Monaco-based editor is dynamically
|
|
12
|
+
* imported on the client only, keeping the parent SchemaRenderer SSR-safe.
|
|
13
|
+
* aliases: SchemaExtraPropertyEditor|SchemaUnknownPropertyEditor
|
|
14
|
+
*
|
|
15
|
+
* @param value - The current value of the property (any JSON type)
|
|
16
|
+
* @param onChange - Called with the parsed value whenever the edited JSON is valid
|
|
17
|
+
* @param [theme=EditorThemes.dark] - Theme applied to the JSON editor
|
|
18
|
+
* @param [height=240] - Editor height in pixels
|
|
19
|
+
*/
|
|
20
|
+
export declare const SchemaAdditionalPropertiesEditor: FC<SchemaAdditionalPropertiesEditorProps>;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { JsonSchema, JsonSchemaDef, SchemaRendererTexts } from './types';
|
|
3
|
+
import { EditorThemes } from '../../types/editor';
|
|
3
4
|
interface SchemaRendererContextValue {
|
|
4
5
|
rootSchema: JsonSchema;
|
|
5
6
|
texts: SchemaRendererTexts;
|
|
6
7
|
readonly?: boolean;
|
|
7
8
|
defaultExpanded?: boolean;
|
|
8
9
|
inputClassName?: string;
|
|
10
|
+
jsonEditorTheme?: EditorThemes;
|
|
11
|
+
acceptableResourceTypes?: Record<string, unknown>;
|
|
9
12
|
renderField?: (path: string[], schema: JsonSchemaDef, defaultElement: React.ReactElement) => React.ReactNode;
|
|
10
13
|
touchedPaths?: ReadonlySet<string>;
|
|
11
14
|
markTouched?: (path: string) => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { EditorThemes } from '../../types/editor';
|
|
2
3
|
export declare enum SchemaRendererVariant {
|
|
3
4
|
Sections = "sections",
|
|
4
5
|
Flat = "flat",
|
|
@@ -46,6 +47,7 @@ export interface JsonSchemaDef {
|
|
|
46
47
|
};
|
|
47
48
|
'dial:meta'?: Record<string, unknown>;
|
|
48
49
|
'dial:resource'?: boolean;
|
|
50
|
+
acceptableResourceTypes?: string[];
|
|
49
51
|
[key: string]: unknown;
|
|
50
52
|
}
|
|
51
53
|
export interface JsonSchema extends JsonSchemaDef {
|
|
@@ -94,6 +96,18 @@ export interface DialSchemaRendererProps {
|
|
|
94
96
|
* with a field. When `false` (default), all unfilled required fields are highlighted immediately.
|
|
95
97
|
*/
|
|
96
98
|
skipUntouched?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Theme applied to the JSON editor shown for value keys that are not declared in the
|
|
101
|
+
* schema's `properties`. Defaults to `EditorThemes.dark`.
|
|
102
|
+
*/
|
|
103
|
+
jsonEditorTheme?: EditorThemes;
|
|
104
|
+
/**
|
|
105
|
+
* Live resource options for schema properties flagged with `dial:resource: true`.
|
|
106
|
+
* Keyed by the resource type name referenced in a property's `acceptableResourceTypes`
|
|
107
|
+
* array; each value provides the selectable entries for that resource type (a string
|
|
108
|
+
* array for string-typed properties).
|
|
109
|
+
*/
|
|
110
|
+
acceptableResourceTypes?: Record<string, unknown>;
|
|
97
111
|
onChange?: (value: Record<string, unknown>) => void;
|
|
98
112
|
onPropertyChange?: (path: string, value: unknown) => void;
|
|
99
113
|
onDefaultValues?: (value: Record<string, unknown>) => void;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { SegmentedControlOption } from '../../models/segmented-control';
|
|
2
|
+
export interface DialSegmentedControlProps<T extends string> {
|
|
3
|
+
options: SegmentedControlOption<T>[];
|
|
4
|
+
value: T;
|
|
5
|
+
onChange: (value: T) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
ariaLabel?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A single-select control for switching between a small set of mutually exclusive,
|
|
12
|
+
* equally-sized options (e.g. view switchers).
|
|
13
|
+
* aliases: SegmentedButton|ViewSwitcher
|
|
14
|
+
*
|
|
15
|
+
* Renders a horizontal group of segments where every option is always visible and
|
|
16
|
+
* equally sized. Supports 2 or more segments, optional per-option icons, and
|
|
17
|
+
* keyboard navigation (Arrow keys, Home, End).
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <DialSegmentedControl
|
|
22
|
+
* ariaLabel="View"
|
|
23
|
+
* value={view}
|
|
24
|
+
* onChange={setView}
|
|
25
|
+
* options={[
|
|
26
|
+
* { value: 'list', label: 'List' },
|
|
27
|
+
* { value: 'grid', label: 'Grid' },
|
|
28
|
+
* ]}
|
|
29
|
+
* />
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @param options - Segments to render. Each option needs a unique `value` and may include a `label`, `icon`, and `disabled` flag.
|
|
33
|
+
* @param value - The currently selected option `value`.
|
|
34
|
+
* @param onChange - Callback fired with the selected option `value`.
|
|
35
|
+
* @param [disabled] - Disables the entire control when set.
|
|
36
|
+
* @param [className] - Additional classes applied to the container.
|
|
37
|
+
* @param [ariaLabel] - Accessible label for the control (applied to the `tablist`).
|
|
38
|
+
*/
|
|
39
|
+
export declare const DialSegmentedControl: <T extends string>({ options, value, onChange, disabled, className, ariaLabel, }: DialSegmentedControlProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const containerBaseClassName = "inline-flex items-center rounded bg-layer-3";
|
|
2
|
+
export declare const segmentBaseClassName = "flex flex-1 items-center justify-center gap-2 h-7 px-3 py-1 border border-primary dial-small-text whitespace-nowrap focus-visible:outline outline-offset-0 focus-visible:relative focus-visible:z-10";
|
|
3
|
+
export declare const segmentSelectedClassName = "relative z-10 bg-controls-accent-primary-alpha-active text-primary";
|
|
4
|
+
export declare const segmentUnselectedClassName = "text-secondary hover:text-primary";
|
|
5
|
+
export declare const segmentDisabledClassName = "text-controls-disable-accent cursor-not-allowed hover:text-controls-disable-accent";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FC, ReactNode, MouseEvent, Ref } from 'react';
|
|
2
2
|
import { SelectOption } from '../../models/select';
|
|
3
3
|
import { SelectSize, SelectVariant } from '../../types/select';
|
|
4
|
+
import { ElementSize } from '../../types/size';
|
|
4
5
|
export interface DialSelectProps {
|
|
5
6
|
options: SelectOption[];
|
|
6
7
|
multiple?: boolean;
|
|
@@ -13,6 +14,7 @@ export interface DialSelectProps {
|
|
|
13
14
|
defaultValue?: string | string[];
|
|
14
15
|
placeholder?: string;
|
|
15
16
|
searchable?: boolean;
|
|
17
|
+
searchSize?: ElementSize;
|
|
16
18
|
searchPlaceholder?: string;
|
|
17
19
|
selectAll?: boolean;
|
|
18
20
|
selectAllLabel?: string;
|
|
@@ -71,6 +73,7 @@ export interface DialSelectProps {
|
|
|
71
73
|
* @param [defaultValue] - Uncontrolled initial selected value(s).
|
|
72
74
|
* @param [placeholder="Select..."] - Placeholder text when no selection is made.
|
|
73
75
|
* @param [searchable=false] - Show a search field in the overlay header.
|
|
76
|
+
* @param [searchSize=ElementSize.Standard] - Size of the overlay search input when `searchable` is enabled.
|
|
74
77
|
* @param [searchPlaceholder] - Placeholder for the search input (overlay/inline).
|
|
75
78
|
* @param [selectAll=false] - Show a "Select All" checkbox in multiple mode.
|
|
76
79
|
* @param [selectAllLabel="Select all"] - Label for the "Select All" checkbox.
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { FC, HTMLAttributes } from 'react';
|
|
2
|
+
import { DialLabelProps } from '../Label/Label';
|
|
2
3
|
export interface DialSliderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
3
4
|
value: number;
|
|
4
5
|
min?: number;
|
|
5
6
|
max?: number;
|
|
6
7
|
step?: number;
|
|
7
8
|
disabled?: boolean;
|
|
9
|
+
labelProps?: DialLabelProps;
|
|
8
10
|
/** 2-element or 3-element label tuple rendered below the track */
|
|
9
11
|
labels?: [string, string] | [string, string, string];
|
|
10
12
|
/** Custom formatter for the thumb value; defaults to fixed-decimal based on step */
|
|
@@ -41,6 +43,7 @@ export interface DialSliderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'o
|
|
|
41
43
|
* @param [max=1] - Maximum value
|
|
42
44
|
* @param [step=0.1] - Step increment
|
|
43
45
|
* @param [disabled=false] - Disables interaction
|
|
46
|
+
* @param [labelProps] - Props forwarded to DialLabel rendered above the slider
|
|
44
47
|
* @param [labels] - 2 or 3 strings rendered below the track (start, [middle,] end)
|
|
45
48
|
* @param [formatValue] - Custom value formatter for the thumb display
|
|
46
49
|
* @param [onChange] - Callback fired with the new value on interaction
|
package/dist/src/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { AnalyticsCardVariant } from './types/analytics';
|
|
|
5
5
|
export { DialAnalyticsBar } from './components/Analytics';
|
|
6
6
|
export type { DialAnalyticsBarProps } from './components/Analytics';
|
|
7
7
|
export { DEFAULT_ANALYTICS_BAR_COLOR_MAP } from './components/Analytics';
|
|
8
|
-
export type { AnalyticsBarColorStop } from './models/analytics';
|
|
8
|
+
export type { AnalyticsBarColorStop, AnalyticsCardCompareItem, } from './models/analytics';
|
|
9
9
|
export { DialAnalyticsErrorTag } from './components/Analytics';
|
|
10
10
|
export type { DialAnalyticsErrorTagProps } from './components/Analytics';
|
|
11
11
|
export { DialAnalyticsBarGroup } from './components/Analytics';
|
|
@@ -62,6 +62,8 @@ export type { DialFabButtonProps } from './components/FabButton/FabButton';
|
|
|
62
62
|
export { DialTextarea } from './components/Textarea/Textarea';
|
|
63
63
|
export { DialTooltip } from './components/Tooltip/Tooltip';
|
|
64
64
|
export { DialSwitch } from './components/Switch/Switch';
|
|
65
|
+
export { DialSegmentedControl } from './components/SegmentedControl/SegmentedControl';
|
|
66
|
+
export type { DialSegmentedControlProps } from './components/SegmentedControl/SegmentedControl';
|
|
65
67
|
export { DialPopup } from './components/Popup/Popup';
|
|
66
68
|
export { DialConfirmationPopup } from './components/ConfirmationPopup/ConfirmationPopup';
|
|
67
69
|
export { DialRadioGroupPopupField } from './components/RadioGroupPopupField/RadioGroupPopupField';
|
|
@@ -87,6 +89,7 @@ export { DialFileManager } from './components/FileManager/FileManager';
|
|
|
87
89
|
export type { FileManagerGridRow } from './components/FileManager/FileManagerContext';
|
|
88
90
|
export type { GridOptions, ToolbarOptions, BulkActionsToolbarOptions, } from './components/FileManager/FileManager';
|
|
89
91
|
export { DialDestinationFolderPopup } from './components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup';
|
|
92
|
+
export { DialFoldersTree } from './components/FileManager/components/FoldersTree/FoldersTree.tsx';
|
|
90
93
|
export { NotificationVariant } from './types/notification.ts';
|
|
91
94
|
export { ButtonVariant, ButtonAppearance } from './types/button';
|
|
92
95
|
export { RadioGroupOrientation } from './types/radio-group';
|
|
@@ -111,6 +114,7 @@ export { StepStatus } from './models/step';
|
|
|
111
114
|
export type { Step } from './models/step';
|
|
112
115
|
export type { RadioButtonWithContent } from './models/radio';
|
|
113
116
|
export type { SelectOption } from './models/select';
|
|
117
|
+
export type { SegmentedControlOption } from './models/segmented-control';
|
|
114
118
|
export type { TabModel } from './models/tab';
|
|
115
119
|
export type { DropdownItem } from './models/dropdown';
|
|
116
120
|
export type { DialModifiedEntity } from './models/base-entity';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
export interface AnalyticsBarColorStop {
|
|
2
3
|
/** Lower bound of the band (exclusive), as a ratio of value to maxValue (0–1). */
|
|
3
4
|
from: number;
|
|
@@ -6,3 +7,9 @@ export interface AnalyticsBarColorStop {
|
|
|
6
7
|
/** CSS color applied to the fill when the ratio falls within this band. */
|
|
7
8
|
color: string;
|
|
8
9
|
}
|
|
10
|
+
export interface AnalyticsCardCompareItem {
|
|
11
|
+
/** Sub-title shown above the value in compare mode. */
|
|
12
|
+
title: ReactNode;
|
|
13
|
+
/** The metric value to display. */
|
|
14
|
+
value: ReactNode;
|
|
15
|
+
}
|
|
@@ -2,6 +2,12 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
export interface SelectOption {
|
|
3
3
|
value: string;
|
|
4
4
|
label: string;
|
|
5
|
+
/**
|
|
6
|
+
* Custom node rendered in place of `label` in the option list, trigger and
|
|
7
|
+
* submenu. `label` is still used for filtering/search matching and as the
|
|
8
|
+
* accessible name, so keep it as a plain-text representation of `labelNode`.
|
|
9
|
+
*/
|
|
10
|
+
labelNode?: ReactNode;
|
|
5
11
|
description?: string;
|
|
6
12
|
disabled?: boolean;
|
|
7
13
|
icon?: ReactNode;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-D1Mdz55f.cjs"),o=require("./editor-Ba3vCFHk.cjs"),u=require("@monaco-editor/react"),c={[o.EditorThemes.dark]:{base:"vs-dark",inherit:!1,rules:[{token:"string.key.json",foreground:"#37BABC"},{token:"string.value.json",foreground:"#5C8DEA"},{token:"number",foreground:"#D97C27"},{token:"keyword.json",foreground:"#F4CE46"},{token:"delimiter",foreground:"#EEF1F7"},{token:"delimiter.bracket.json",foreground:"#A972FF"},{token:"delimiter.parenthesis",foreground:"#A972FF"}],colors:{"editor.foreground":"#F76464","editor.background":"#161B2D","editorCursor.foreground":"#EEF1F7","editor.selectionBackground":"#5C8DEA2B","editorLineNumber.foreground":"#242C42","scrollbarSlider.background":"#242C42","scrollbarSlider.hoverBackground":"#242C42","scrollbarSlider.activeBackground":"#242C42"}},[o.EditorThemes.light]:{base:"vs",inherit:!1,rules:[{token:"string.key.json",foreground:"#009D9F"},{token:"string.value.json",foreground:"#2764D9"},{token:"number",foreground:"#B25500"},{token:"keyword.json",foreground:"#3F3D25"},{token:"delimiter",foreground:"#161B2D"},{token:"delimiter.bracket.json",foreground:"#7E39EC"},{token:"delimiter.parenthesis",foreground:"#7E39EC"}],colors:{"editor.foreground":"#AE2F2F","editor.background":"#EEF1F7","editorCursor.foreground":"#161B2D","editor.selectionBackground":"#5C8DEA2B","editorLineNumber.foreground":"#242C42","scrollbarSlider.background":"#242C42","scrollbarSlider.hoverBackground":"#242C42","scrollbarSlider.activeBackground":"#242C42"}}},g=({value:t,onChange:n,onValidateJSON:i,options:s,currentTheme:e,themesConfig:d=c})=>{function a(r){r?.editor?.defineTheme(e,d[e]),r.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,enableSchemaRequest:!1,schemas:[{uri:"http://custom-schema/object-required.json",fileMatch:["*"],schema:{type:"object",description:"Top-level value must be an object",additionalProperties:!0}}]})}return l.jsxRuntimeExports.jsx(u.Editor,{beforeMount:a,height:"100%",defaultLanguage:"json",value:t,onChange:n,theme:e,onValidate:i,options:{minimap:{enabled:!1},formatOnType:!0,formatOnPaste:!0,selectOnLineNumbers:!1,automaticLayout:!0,scrollBeyondLastLine:!1,wordWrap:"on",smoothScrolling:!0,overviewRulerLanes:0,scrollbar:{horizontal:"hidden",verticalScrollbarSize:4,verticalSliderSize:4},...s??{}}})};exports.DialJsonEditor=g;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-D1Mdz55f.cjs"),c=require("@uiw/react-md-editor"),x=require("./editor-Ba3vCFHk.cjs"),m=({value:t,onChange:r,height:s=300,preview:i="edit",theme:n=x.EditorThemes.dark,className:d,placeholder:o})=>{const a=o!==void 0&&!t;return e.jsxRuntimeExports.jsxs("div",{"data-color-mode":n,className:e.mergeClasses("relative",d),children:[e.jsxRuntimeExports.jsx(c,{value:t,onChange:l=>r?.(l||""),height:s,preview:i}),a&&e.jsxRuntimeExports.jsx("div",{className:"pointer-events-none absolute left-0 top-8 px-2 dial-small-text text-secondary opacity-40",children:o})]})};exports.DialMarkdownEditor=m;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { j as o, m as l } from "./index-D1DPfPQX.js";
|
|
2
|
-
import c from "@uiw/react-md-editor";
|
|
3
|
-
import { E as x } from "./editor-Cu1dRT39.js";
|
|
4
|
-
const E = ({
|
|
5
|
-
value: e,
|
|
6
|
-
onChange: s,
|
|
7
|
-
height: r = 300,
|
|
8
|
-
preview: a = "edit",
|
|
9
|
-
theme: i = x.dark,
|
|
10
|
-
className: d,
|
|
11
|
-
placeholder: t
|
|
12
|
-
}) => {
|
|
13
|
-
const m = t !== void 0 && !e;
|
|
14
|
-
return /* @__PURE__ */ o.jsxs(
|
|
15
|
-
"div",
|
|
16
|
-
{
|
|
17
|
-
"data-color-mode": i,
|
|
18
|
-
className: l("relative", d),
|
|
19
|
-
children: [
|
|
20
|
-
/* @__PURE__ */ o.jsx(
|
|
21
|
-
c,
|
|
22
|
-
{
|
|
23
|
-
value: e,
|
|
24
|
-
onChange: (n) => s?.(n || ""),
|
|
25
|
-
height: r,
|
|
26
|
-
preview: a
|
|
27
|
-
}
|
|
28
|
-
),
|
|
29
|
-
m && /* @__PURE__ */ o.jsx("div", { className: "pointer-events-none absolute left-0 top-8 px-2 dial-small-text text-secondary opacity-40", children: t })
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
export {
|
|
35
|
-
E as DialMarkdownEditor
|
|
36
|
-
};
|
package/dist/editor-Ba3vCFHk.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var t=(r=>(r.dark="dark",r.light="light",r))(t||{});exports.EditorThemes=t;
|
package/dist/editor-Cu1dRT39.js
DELETED