@gravity-ui/dynamic-forms 5.1.0 → 5.2.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/build/cjs/lib/core/components/Form/DynamicField.js +7 -2
- package/build/cjs/lib/core/components/Form/hooks/useIntegrationFF.js +3 -2
- package/build/cjs/lib/core/components/Form/types/value.js +0 -1
- package/build/cjs/lib/kit/components/Inputs/CheckboxGroup/CheckboxGroup.js +1 -1
- package/build/cjs/lib/kit/components/Inputs/TableArrayInput/TableArrayInput.js +1 -1
- package/build/cjs/lib/kit/components/Inputs/TextContent/TextContent.js +1 -1
- package/build/cjs/lib/kit/components/Inputs/TimeRangeSelector/components/TimeRangeSelect/TimeRangeSelect.js +1 -1
- package/build/cjs/lib/kit/components/Layouts/Column/Column.js +1 -1
- package/build/cjs/lib/kit/components/Layouts/Row/Row.js +1 -1
- package/build/cjs/lib/kit/components/Layouts/Section/Section.js +1 -1
- package/build/cjs/lib/kit/components/LongValue/LongValue.js +2 -4
- package/build/cjs/lib/kit/components/TogglerCard/TogglerCard.js +1 -1
- package/build/cjs/lib/kit/components/ViewLayouts/ViewColumn/ViewColumn.js +1 -1
- package/build/cjs/lib/kit/components/ViewLayouts/ViewRow/ViewRow.js +1 -1
- package/build/cjs/lib/kit/components/Views/DateView/DateView.js +1 -1
- package/build/cjs/lib/kit/components/Views/MultiOneOfView/MultiOneOfView.js +1 -1
- package/build/cjs/lib/kit/components/Views/MultiSelectView/MultiSelectView.js +1 -1
- package/build/cjs/lib/kit/components/Views/ObjectBaseView/ObjectBaseView.js +1 -1
- package/build/cjs/lib/kit/components/Views/TableArrayView/TableArrayView.js +1 -1
- package/build/cjs/lib/kit/utils/common.js +1 -1
- package/build/esm/lib/core/components/Form/Controller/Controller.d.ts +2 -2
- package/build/esm/lib/core/components/Form/Controller/types.d.ts +2 -2
- package/build/esm/lib/core/components/Form/Controller/utils.d.ts +3 -3
- package/build/esm/lib/core/components/Form/DynamicField.d.ts +3 -2
- package/build/esm/lib/core/components/Form/DynamicField.js +7 -2
- package/build/esm/lib/core/components/Form/hooks/useControllerMirror.d.ts +1 -1
- package/build/esm/lib/core/components/Form/hooks/useCreateContext.d.ts +1 -1
- package/build/esm/lib/core/components/Form/hooks/useCreateSearchContext.d.ts +1 -1
- package/build/esm/lib/core/components/Form/hooks/useDynamicFieldMirror.d.ts +1 -1
- package/build/esm/lib/core/components/Form/hooks/useIntegrationFF.d.ts +9 -2
- package/build/esm/lib/core/components/Form/hooks/useIntegrationFF.js +3 -2
- package/build/esm/lib/core/components/Form/hooks/useMutators.d.ts +1 -1
- package/build/esm/lib/core/components/Form/hooks/useSearch/useSearch.d.ts +2 -2
- package/build/esm/lib/core/components/Form/hooks/useStore.d.ts +1 -1
- package/build/esm/lib/core/components/Form/types/array.d.ts +2 -2
- package/build/esm/lib/core/components/Form/types/boolean.d.ts +2 -2
- package/build/esm/lib/core/components/Form/types/config.d.ts +2 -2
- package/build/esm/lib/core/components/Form/types/context.d.ts +3 -3
- package/build/esm/lib/core/components/Form/types/field.d.ts +2 -2
- package/build/esm/lib/core/components/Form/types/input.d.ts +3 -3
- package/build/esm/lib/core/components/Form/types/layout.d.ts +3 -3
- package/build/esm/lib/core/components/Form/types/mirror.d.ts +2 -2
- package/build/esm/lib/core/components/Form/types/mutators.d.ts +2 -2
- package/build/esm/lib/core/components/Form/types/number.d.ts +2 -2
- package/build/esm/lib/core/components/Form/types/object.d.ts +2 -2
- package/build/esm/lib/core/components/Form/types/search.d.ts +2 -2
- package/build/esm/lib/core/components/Form/types/store.d.ts +1 -1
- package/build/esm/lib/core/components/Form/types/string.d.ts +2 -2
- package/build/esm/lib/core/components/Form/types/validators.d.ts +1 -1
- package/build/esm/lib/core/components/Form/types/value.d.ts +1 -1
- package/build/esm/lib/core/components/Form/types/value.js +1 -1
- package/build/esm/lib/core/components/Form/utils/common.d.ts +1 -1
- package/build/esm/lib/core/components/Form/utils/search.d.ts +1 -1
- package/build/esm/lib/core/components/View/DynamicView.d.ts +2 -2
- package/build/esm/lib/core/components/View/ViewController.d.ts +1 -1
- package/build/esm/lib/core/components/View/hooks/useComponents.d.ts +2 -2
- package/build/esm/lib/core/components/View/hooks/useCreateContext.d.ts +1 -1
- package/build/esm/lib/core/components/View/hooks/useRender.d.ts +2 -2
- package/build/esm/lib/core/components/View/types/array.d.ts +2 -2
- package/build/esm/lib/core/components/View/types/boolean.d.ts +2 -2
- package/build/esm/lib/core/components/View/types/config.d.ts +2 -2
- package/build/esm/lib/core/components/View/types/context.d.ts +3 -3
- package/build/esm/lib/core/components/View/types/layout.d.ts +3 -3
- package/build/esm/lib/core/components/View/types/number.d.ts +2 -2
- package/build/esm/lib/core/components/View/types/object.d.ts +2 -2
- package/build/esm/lib/core/components/View/types/string.d.ts +2 -2
- package/build/esm/lib/core/components/View/types/views.d.ts +3 -3
- package/build/esm/lib/core/helpers.d.ts +1 -1
- package/build/esm/lib/core/types/specs.d.ts +3 -3
- package/build/esm/lib/kit/components/CopyButton/CopyButton.d.ts +1 -1
- package/build/esm/lib/kit/components/ErrorWrapper/ErrorWrapper.d.ts +1 -1
- package/build/esm/lib/kit/components/GenerateRandomValueButton/GenerateRandomValueButton.d.ts +1 -1
- package/build/esm/lib/kit/components/Inputs/ArrayBase/ArrayBase.d.ts +1 -1
- package/build/esm/lib/kit/components/Inputs/CardOneOf/CardOneOf.d.ts +1 -1
- package/build/esm/lib/kit/components/Inputs/CardOneOf/CardOneOf.js +1 -1
- package/build/esm/lib/kit/components/Inputs/Checkbox/Checkbox.d.ts +2 -2
- package/build/esm/lib/kit/components/Inputs/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/build/esm/lib/kit/components/Inputs/CheckboxGroup/CheckboxGroup.js +1 -1
- package/build/esm/lib/kit/components/Inputs/DateInput/DateInput.d.ts +2 -2
- package/build/esm/lib/kit/components/Inputs/FileInput/FileInput.d.ts +1 -1
- package/build/esm/lib/kit/components/Inputs/FileInput/utils.d.ts +1 -1
- package/build/esm/lib/kit/components/Inputs/MonacoInput/MonacoInputBase.d.ts +1 -1
- package/build/esm/lib/kit/components/Inputs/MultiOneOf/MultiOneOf.d.ts +1 -1
- package/build/esm/lib/kit/components/Inputs/MultiOneOf/MultiOneOf.js +1 -1
- package/build/esm/lib/kit/components/Inputs/MultiSelect/MultiSelect.d.ts +2 -2
- package/build/esm/lib/kit/components/Inputs/NumberWithScale/NumberWithScale.d.ts +1 -1
- package/build/esm/lib/kit/components/Inputs/NumberWithScale/useInitial.d.ts +1 -1
- package/build/esm/lib/kit/components/Inputs/ObjectBase/ObjectBase.d.ts +1 -1
- package/build/esm/lib/kit/components/Inputs/ObjectBase/ObjectBase.js +1 -1
- package/build/esm/lib/kit/components/Inputs/ObjectValueInput/ObjectValueInput.d.ts +1 -1
- package/build/esm/lib/kit/components/Inputs/OneOf/OneOf.d.ts +1 -1
- package/build/esm/lib/kit/components/Inputs/OneOf/OneOf.js +1 -1
- package/build/esm/lib/kit/components/Inputs/Secret/Secret.d.ts +1 -1
- package/build/esm/lib/kit/components/Inputs/Select/Select.d.ts +2 -2
- package/build/esm/lib/kit/components/Inputs/Switch/Switch.d.ts +1 -1
- package/build/esm/lib/kit/components/Inputs/TableArrayInput/TableArrayInput.d.ts +1 -1
- package/build/esm/lib/kit/components/Inputs/TableArrayInput/TableArrayInput.js +1 -1
- package/build/esm/lib/kit/components/Inputs/Text/Text.d.ts +2 -2
- package/build/esm/lib/kit/components/Inputs/TextArea/TextArea.d.ts +2 -2
- package/build/esm/lib/kit/components/Inputs/TextContent/TextContent.d.ts +1 -1
- package/build/esm/lib/kit/components/Inputs/TextContent/TextContent.js +1 -1
- package/build/esm/lib/kit/components/Inputs/TextLink/TextLink.d.ts +1 -1
- package/build/esm/lib/kit/components/Inputs/TextLink/TextLink.js +1 -1
- package/build/esm/lib/kit/components/Inputs/TimeRangeSelector/TimeRangeSelector.d.ts +1 -1
- package/build/esm/lib/kit/components/Inputs/TimeRangeSelector/TimeRangeSelector.js +1 -1
- package/build/esm/lib/kit/components/Inputs/TimeRangeSelector/components/TimeRangeSelect/TimeRangeSelect.d.ts +1 -1
- package/build/esm/lib/kit/components/Inputs/TimeRangeSelector/components/TimeRangeSelect/TimeRangeSelect.js +1 -1
- package/build/esm/lib/kit/components/Layouts/Accordeon/Accordeon.d.ts +2 -2
- package/build/esm/lib/kit/components/Layouts/AccordeonCard/AccordeonCardForm.d.ts +1 -1
- package/build/esm/lib/kit/components/Layouts/CardAccordeon.d.ts +1 -1
- package/build/esm/lib/kit/components/Layouts/CardSection.d.ts +1 -1
- package/build/esm/lib/kit/components/Layouts/Column/Column.d.ts +1 -1
- package/build/esm/lib/kit/components/Layouts/Column/Column.js +2 -2
- package/build/esm/lib/kit/components/Layouts/Row/Row.d.ts +1 -1
- package/build/esm/lib/kit/components/Layouts/Row/Row.js +2 -2
- package/build/esm/lib/kit/components/Layouts/Section/Section.d.ts +1 -1
- package/build/esm/lib/kit/components/Layouts/Section/Section.js +2 -2
- package/build/esm/lib/kit/components/Layouts/TableCell/TableCell.d.ts +1 -1
- package/build/esm/lib/kit/components/Layouts/Transparent/Transparent.d.ts +1 -1
- package/build/esm/lib/kit/components/Layouts/Transparent/Transparent.js +1 -1
- package/build/esm/lib/kit/components/LongValue/LongValue.js +2 -4
- package/build/esm/lib/kit/components/SimpleVerticalAccordeon/SimpleVerticalAccordeon.d.ts +1 -1
- package/build/esm/lib/kit/components/TogglerCard/TogglerCard.js +1 -1
- package/build/esm/lib/kit/components/ViewLayouts/ViewAccordeon/ViewAccordeon.d.ts +2 -2
- package/build/esm/lib/kit/components/ViewLayouts/ViewAccordeonCard/ViewAccordeonCard.d.ts +1 -1
- package/build/esm/lib/kit/components/ViewLayouts/ViewCardAccordeon.d.ts +1 -1
- package/build/esm/lib/kit/components/ViewLayouts/ViewCardSection.d.ts +1 -1
- package/build/esm/lib/kit/components/ViewLayouts/ViewColumn/ViewColumn.d.ts +1 -1
- package/build/esm/lib/kit/components/ViewLayouts/ViewColumn/ViewColumn.js +1 -1
- package/build/esm/lib/kit/components/ViewLayouts/ViewRow/ViewRow.d.ts +1 -1
- package/build/esm/lib/kit/components/ViewLayouts/ViewRow/ViewRow.js +1 -1
- package/build/esm/lib/kit/components/ViewLayouts/ViewSection/ViewSection.d.ts +1 -1
- package/build/esm/lib/kit/components/ViewLayouts/ViewTableCell/ViewTableCell.d.ts +1 -1
- package/build/esm/lib/kit/components/ViewLayouts/ViewTransparent/ViewTransparent.d.ts +1 -1
- package/build/esm/lib/kit/components/Views/ArrayBaseView/ArrayBaseView.d.ts +1 -1
- package/build/esm/lib/kit/components/Views/BaseView/BaseView.d.ts +1 -1
- package/build/esm/lib/kit/components/Views/CardOneOfView.d.ts +1 -1
- package/build/esm/lib/kit/components/Views/CheckboxGroupView/CheckboxGroupView.d.ts +1 -1
- package/build/esm/lib/kit/components/Views/DateView/DateView.d.ts +1 -1
- package/build/esm/lib/kit/components/Views/DateView/DateView.js +1 -1
- package/build/esm/lib/kit/components/Views/FileInputView/FileInputView.d.ts +1 -1
- package/build/esm/lib/kit/components/Views/MonacoInputView/MonacoBaseView.d.ts +1 -1
- package/build/esm/lib/kit/components/Views/MultiOneOfView/MultiOneOfView.d.ts +1 -1
- package/build/esm/lib/kit/components/Views/MultiOneOfView/MultiOneOfView.js +1 -1
- package/build/esm/lib/kit/components/Views/MultiSelectView/MultiSelectView.d.ts +1 -1
- package/build/esm/lib/kit/components/Views/MultiSelectView/MultiSelectView.js +1 -1
- package/build/esm/lib/kit/components/Views/NumberWithScaleView/NumberWithScaleView.d.ts +1 -1
- package/build/esm/lib/kit/components/Views/ObjectBaseView/ObjectBaseView.d.ts +1 -1
- package/build/esm/lib/kit/components/Views/ObjectBaseView/ObjectBaseView.js +1 -1
- package/build/esm/lib/kit/components/Views/ObjectValueInputView/ObjectValueInputView.d.ts +1 -1
- package/build/esm/lib/kit/components/Views/OneOfView/OneOfView.d.ts +1 -1
- package/build/esm/lib/kit/components/Views/TableArrayView/TableArrayView.d.ts +1 -1
- package/build/esm/lib/kit/components/Views/TableArrayView/TableArrayView.js +1 -1
- package/build/esm/lib/kit/components/Views/TextAreaView/TextAreaView.d.ts +1 -1
- package/build/esm/lib/kit/components/Views/TextContentView.d.ts +1 -1
- package/build/esm/lib/kit/components/Views/TextLinkView/TextLinkView.d.ts +1 -1
- package/build/esm/lib/kit/components/Views/TimeRangeSelectorView/TimeRangeSelectorView.d.ts +1 -1
- package/build/esm/lib/kit/constants/config.d.ts +1 -1
- package/build/esm/lib/kit/hooks/useErrorChecker.d.ts +1 -1
- package/build/esm/lib/kit/hooks/useOneOf/useOneOf.d.ts +1 -1
- package/build/esm/lib/kit/utils/common.d.ts +1 -1
- package/build/esm/lib/kit/utils/common.js +2 -2
- package/build/esm/lib/kit/utils/objectInline.d.ts +1 -1
- package/build/esm/lib/kit/validators/validators.d.ts +2 -2
- package/package.json +10 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import once from 'lodash/once';
|
|
4
3
|
import { Text } from '@gravity-ui/uikit';
|
|
4
|
+
import once from 'lodash/once';
|
|
5
5
|
import { block } from '../../utils';
|
|
6
6
|
import './LongValue.css';
|
|
7
7
|
const b = block('long-value');
|
|
@@ -54,7 +54,5 @@ export const LongValue = (_a) => {
|
|
|
54
54
|
}
|
|
55
55
|
return;
|
|
56
56
|
}, [value]);
|
|
57
|
-
return (React.createElement(Text, Object.assign({ as: "div" }, restProps, { ref: ref, className: b({ open, long }, className),
|
|
58
|
-
// @ts-ignore
|
|
59
|
-
onClick: long ? handleClick : undefined }), value));
|
|
57
|
+
return (React.createElement(Text, Object.assign({ as: "div" }, restProps, { ref: ref, className: b({ open, long }, className), onClick: long ? handleClick : undefined }), value));
|
|
60
58
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Card, HelpMark, Text } from '@gravity-ui/uikit';
|
|
3
|
-
import { block } from '../../utils';
|
|
4
3
|
import { COMMON_POPOVER_PLACEMENT } from '../../constants/common';
|
|
4
|
+
import { block } from '../../utils';
|
|
5
5
|
import './TogglerCard.css';
|
|
6
6
|
const b = block('toggler-card');
|
|
7
7
|
export const TogglerCard = ({ description, title, text, onClick, disabled, selected, }) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TextProps } from '@gravity-ui/uikit';
|
|
2
|
-
import { ArrayValue, ObjectValue, Spec, ViewLayoutProps } from '../../../../core';
|
|
1
|
+
import type { TextProps } from '@gravity-ui/uikit';
|
|
2
|
+
import type { ArrayValue, ObjectValue, Spec, ViewLayoutProps } from '../../../../core';
|
|
3
3
|
interface ViewAccordeonLayoutProps {
|
|
4
4
|
variantTitle?: TextProps['variant'];
|
|
5
5
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ArrayViewLayoutProps, ObjectViewLayoutProps } from '../../../../core';
|
|
1
|
+
import type { ArrayViewLayoutProps, ObjectViewLayoutProps } from '../../../../core';
|
|
2
2
|
export declare const ViewAccordeonCard: <T extends ArrayViewLayoutProps | ObjectViewLayoutProps>({ value, name, spec, children, }: T) => JSX.Element | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ArrayViewLayoutProps, ObjectViewLayoutProps } from '../../../core';
|
|
1
|
+
import type { ArrayViewLayoutProps, ObjectViewLayoutProps } from '../../../core';
|
|
2
2
|
export declare const ViewCardAccordeon: <T extends ArrayViewLayoutProps | ObjectViewLayoutProps>({ name, value, spec, children, }: T) => JSX.Element | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FormValue, Spec, ViewLayoutProps } from '../../../core';
|
|
1
|
+
import type { FormValue, Spec, ViewLayoutProps } from '../../../core';
|
|
2
2
|
export declare const ViewCardSection: <T extends FormValue, S extends Spec<any, undefined, undefined>>({ name, value, spec, children, }: ViewLayoutProps<T, S>) => JSX.Element | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FormValue, Spec, ViewLayoutProps } from '../../../../core';
|
|
1
|
+
import type { FormValue, Spec, ViewLayoutProps } from '../../../../core';
|
|
2
2
|
import './ViewColumn.css';
|
|
3
3
|
export declare const ViewColumn: <T extends FormValue, S extends Spec<any, undefined, undefined>>({ value, spec, children, }: ViewLayoutProps<T, S>) => JSX.Element | null;
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { HelpMark, Text } from '@gravity-ui/uikit';
|
|
3
3
|
import { useDynamicFormsCtx } from '../../../../core';
|
|
4
4
|
import { CopyButton } from '../../../../kit';
|
|
5
|
-
import { block, isNotEmptyValue } from '../../../utils';
|
|
6
5
|
import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
|
|
6
|
+
import { block, isNotEmptyValue } from '../../../utils';
|
|
7
7
|
import './ViewColumn.css';
|
|
8
8
|
const b = block('view-column');
|
|
9
9
|
export const ViewColumn = ({ value, spec, children, }) => {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FormValue, Spec, ViewLayoutProps } from '../../../../core';
|
|
1
|
+
import type { FormValue, Spec, ViewLayoutProps } from '../../../../core';
|
|
2
2
|
import './ViewRow.css';
|
|
3
3
|
export declare const ViewRow: <T extends FormValue, S extends Spec<any, undefined, undefined>>({ value, spec, children, }: ViewLayoutProps<T, S>) => JSX.Element | null;
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { HelpMark, Text } from '@gravity-ui/uikit';
|
|
3
3
|
import { useDynamicFormsCtx } from '../../../../core';
|
|
4
4
|
import { CopyButton } from '../../../../kit';
|
|
5
|
-
import { block, isNotEmptyValue } from '../../../utils';
|
|
6
5
|
import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
|
|
6
|
+
import { block, isNotEmptyValue } from '../../../utils';
|
|
7
7
|
import './ViewRow.css';
|
|
8
8
|
const b = block('view-row');
|
|
9
9
|
export const ViewRow = ({ value, spec, children, }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormValue, Spec, ViewLayoutProps } from '../../../../core';
|
|
1
|
+
import type { FormValue, Spec, ViewLayoutProps } from '../../../../core';
|
|
2
2
|
export declare const ViewSection: <T extends FormValue, S extends Spec<any, undefined, undefined>>(props: ViewLayoutProps<T, S>) => JSX.Element | null;
|
|
3
3
|
export declare const ViewSection2: <T extends FormValue, S extends Spec<any, undefined, undefined>>(props: ViewLayoutProps<T, S>) => JSX.Element | null;
|
|
4
4
|
export declare const ViewGroup: <T extends FormValue, S extends Spec<any, undefined, undefined>>(props: ViewLayoutProps<T, S>) => JSX.Element | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FormValue, Spec, ViewLayoutProps } from '../../../../core';
|
|
1
|
+
import type { FormValue, Spec, ViewLayoutProps } from '../../../../core';
|
|
2
2
|
import './ViewTableCell.css';
|
|
3
3
|
export declare const ViewTableCell: <T extends FormValue, S extends Spec<any, undefined, undefined>>({ value, spec, children, }: ViewLayoutProps<T, S>) => JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FormValue, Spec, ViewLayoutProps } from '../../../../core';
|
|
1
|
+
import type { FormValue, Spec, ViewLayoutProps } from '../../../../core';
|
|
2
2
|
import './ViewTransparent.css';
|
|
3
3
|
export declare const ViewTransparent: <T extends FormValue, S extends Spec<any, undefined, undefined>>({ value, spec, children, }: ViewLayoutProps<T, S>) => JSX.Element | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BooleanViewProps, NumberViewProps, StringViewProps } from '../../../../core';
|
|
2
|
+
import type { BooleanViewProps, NumberViewProps, StringViewProps } from '../../../../core';
|
|
3
3
|
export declare const BaseView: <T extends BooleanViewProps | NumberViewProps | StringViewProps>({ value, spec, linkValue, }: React.PropsWithChildren<T>) => JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ObjectIndependentView } from '../../../core';
|
|
1
|
+
import type { ObjectIndependentView } from '../../../core';
|
|
2
2
|
export declare const CardOneOfView: ObjectIndependentView;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { BaseView, DEFAULT_DATE_FORMAT } from '../../../components';
|
|
4
3
|
import { dateTimeParse } from '@gravity-ui/date-utils';
|
|
5
4
|
import isObject from 'lodash/isObject';
|
|
5
|
+
import { BaseView, DEFAULT_DATE_FORMAT } from '../../../components';
|
|
6
6
|
export const DateView = (_a) => {
|
|
7
7
|
var { value, spec } = _a, restProps = __rest(_a, ["value", "spec"]);
|
|
8
8
|
const { printFormat = DEFAULT_DATE_FORMAT, outputFormat, timeZone, } = spec.viewSpec.dateInput || {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ObjectIndependentView, ObjectIndependentViewProps } from '../../../../core';
|
|
2
|
+
import type { ObjectIndependentView, ObjectIndependentViewProps } from '../../../../core';
|
|
3
3
|
import './MultiOneOfView.css';
|
|
4
4
|
export interface MultiOneOfViewProps extends ObjectIndependentViewProps {
|
|
5
5
|
withoutIndent?: boolean;
|
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import { Popover, Text } from '@gravity-ui/uikit';
|
|
3
3
|
import isObjectLike from 'lodash/isObjectLike';
|
|
4
4
|
import { ViewController } from '../../../../core';
|
|
5
|
+
import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
|
|
5
6
|
import { block } from '../../../utils';
|
|
6
7
|
import { GroupIndent } from '../../GroupIndent';
|
|
7
|
-
import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
|
|
8
8
|
import './MultiOneOfView.css';
|
|
9
9
|
const b = block('multi-oneof-view');
|
|
10
10
|
export const MultiOneOfView = (props) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Popover, Text } from '@gravity-ui/uikit';
|
|
3
|
-
import { block } from '../../../utils';
|
|
4
3
|
import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
|
|
4
|
+
import { block } from '../../../utils';
|
|
5
5
|
import './MultiSelectView.css';
|
|
6
6
|
const b = block('multiselect-view');
|
|
7
7
|
export const MultiSelectView = ({ spec, value = [] }) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ObjectIndependentView, ObjectIndependentViewProps } from '../../../../core';
|
|
2
|
+
import type { ObjectIndependentView, ObjectIndependentViewProps } from '../../../../core';
|
|
3
3
|
import './ObjectBaseView.css';
|
|
4
4
|
export interface ObjectBaseViewProps extends ObjectIndependentViewProps {
|
|
5
5
|
inline?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import isObjectLike from 'lodash/isObjectLike';
|
|
4
3
|
import { Text } from '@gravity-ui/uikit';
|
|
4
|
+
import isObjectLike from 'lodash/isObjectLike';
|
|
5
5
|
import { ViewController } from '../../../../core';
|
|
6
6
|
import { block, filterPropertiesForObjectInline } from '../../../utils';
|
|
7
7
|
import './ObjectBaseView.css';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ObjectIndependentView } from '../../../../core';
|
|
1
|
+
import type { ObjectIndependentView } from '../../../../core';
|
|
2
2
|
export declare const ObjectValueInputView: ObjectIndependentView;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ObjectIndependentView, ObjectIndependentViewProps } from '../../../../core';
|
|
2
|
+
import type { ObjectIndependentView, ObjectIndependentViewProps } from '../../../../core';
|
|
3
3
|
import './OneOfView.css';
|
|
4
4
|
export interface OneOfViewProps extends ObjectIndependentViewProps {
|
|
5
5
|
withoutIndent?: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Flex, HelpMark, Table } from '@gravity-ui/uikit';
|
|
3
3
|
import { ViewController, isArraySpec, isBooleanSpec, isObjectSpec, useDynamicFormsCtx, } from '../../../../core';
|
|
4
|
-
import { block } from '../../../utils';
|
|
5
4
|
import { COMMON_POPOVER_PLACEMENT } from '../../../constants/common';
|
|
5
|
+
import { block } from '../../../utils';
|
|
6
6
|
import './TableArrayView.css';
|
|
7
7
|
const b = block('table-array-view');
|
|
8
8
|
export const TableArrayView = ({ value = [], spec, name }) => {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StringIndependentView } from '../../../core';
|
|
1
|
+
import type { StringIndependentView } from '../../../core';
|
|
2
2
|
export declare const TextContentView: StringIndependentView;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ObjectIndependentView } from '../../../../core';
|
|
1
|
+
import type { ObjectIndependentView } from '../../../../core';
|
|
2
2
|
export declare const TextLinkView: ObjectIndependentView;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ObjectIndependentView } from '../../../../core';
|
|
1
|
+
import type { ObjectIndependentView } from '../../../../core';
|
|
2
2
|
export declare const TimeRangeSelectorView: ObjectIndependentView;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormValue, Spec, StringSpec } from '../../core';
|
|
1
|
+
import type { FormValue, Spec, StringSpec } from '../../core';
|
|
2
2
|
export declare const isNotEmptyValue: (value: FormValue | undefined, spec: Spec | undefined) => boolean;
|
|
3
3
|
export declare const prepareSpec: <Type extends Spec<any, undefined, undefined>>(spec: Type, parseJsonDefaultValue?: boolean, overridePatternError?: ((pattern?: string) => string) | undefined) => Type;
|
|
4
4
|
export declare const isCorrectSizeParams: (spec: StringSpec) => boolean;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import cloneDeep from 'lodash/cloneDeep';
|
|
2
2
|
import isArray from 'lodash/isArray';
|
|
3
|
+
import isEmpty from 'lodash/isEmpty';
|
|
3
4
|
import isNil from 'lodash/isNil';
|
|
4
5
|
import isObject from 'lodash/isObject';
|
|
5
6
|
import isObjectLike from 'lodash/isObjectLike';
|
|
6
7
|
import isString from 'lodash/isString';
|
|
7
|
-
import
|
|
8
|
-
import { SpecTypes, isArraySpec, isObjectSpec, isStringSpec, } from '../../core';
|
|
8
|
+
import { SpecTypes, isArraySpec, isObjectSpec, isStringSpec } from '../../core';
|
|
9
9
|
import { isFloat } from '../validators/helpers';
|
|
10
10
|
import { divide } from './bigIntMath';
|
|
11
11
|
export const isNotEmptyValue = (value, spec) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ArraySpec, ArrayValue, BooleanSpec, NumberSpec, ObjectSpec, ObjectValue, StringSpec } from '../../core';
|
|
2
|
-
import { ErrorMessagesType } from './types';
|
|
1
|
+
import type { ArraySpec, ArrayValue, BooleanSpec, NumberSpec, ObjectSpec, ObjectValue, StringSpec } from '../../core';
|
|
2
|
+
import type { ErrorMessagesType } from './types';
|
|
3
3
|
interface CommonValidatorParams {
|
|
4
4
|
ignoreRequiredCheck?: boolean;
|
|
5
5
|
customErrorMessages?: Partial<ErrorMessagesType>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravity-ui/dynamic-forms",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "build/cjs/index.js",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"test": "jest",
|
|
32
32
|
"typecheck": "tsc --noEmit",
|
|
33
33
|
"build": "gulp",
|
|
34
|
-
"build-storybook": "
|
|
35
|
-
"dev": "
|
|
36
|
-
"start": "
|
|
34
|
+
"build-storybook": "storybook build",
|
|
35
|
+
"dev": "storybook dev -p 6006",
|
|
36
|
+
"start": "storybook dev",
|
|
37
37
|
"prepublishOnly": "npm run build",
|
|
38
38
|
"playwright:install": "playwright install --with-deps",
|
|
39
39
|
"playwright": "playwright test --config=playwright/playwright.config.ts",
|
|
@@ -56,17 +56,18 @@
|
|
|
56
56
|
"@babel/preset-typescript": "^7.18.6",
|
|
57
57
|
"@commitlint/cli": "^17.0.0",
|
|
58
58
|
"@commitlint/config-conventional": "^17.0.0",
|
|
59
|
-
"@gravity-ui/eslint-config": "^3.
|
|
59
|
+
"@gravity-ui/eslint-config": "^3.3.0",
|
|
60
60
|
"@gravity-ui/prettier-config": "^1.1.0",
|
|
61
61
|
"@gravity-ui/stylelint-config": "^4.0.1",
|
|
62
62
|
"@gravity-ui/tsconfig": "^1.0.0",
|
|
63
63
|
"@gravity-ui/uikit": "^7.1.0",
|
|
64
64
|
"@playwright/experimental-ct-react": "^1.40.0",
|
|
65
65
|
"@playwright/test": "^1.40.0",
|
|
66
|
-
"@storybook/addon-essentials": "^
|
|
66
|
+
"@storybook/addon-essentials": "^8.6.4",
|
|
67
|
+
"@storybook/addon-webpack5-compiler-swc": "^2.1.0",
|
|
67
68
|
"@storybook/preset-scss": "^1.0.3",
|
|
68
|
-
"@storybook/react": "^
|
|
69
|
-
"@storybook/react-webpack5": "^
|
|
69
|
+
"@storybook/react": "^8.6.4",
|
|
70
|
+
"@storybook/react-webpack5": "^8.6.4",
|
|
70
71
|
"@swc/core": "^1.5.0",
|
|
71
72
|
"@swc/jest": "^0.2.36",
|
|
72
73
|
"@testing-library/jest-dom": "^5.16.5",
|
|
@@ -105,7 +106,7 @@
|
|
|
105
106
|
"rimraf": "5.0.5",
|
|
106
107
|
"sass": "^1.57.1",
|
|
107
108
|
"sass-loader": "^10.1.1",
|
|
108
|
-
"storybook": "^
|
|
109
|
+
"storybook": "^8.6.4",
|
|
109
110
|
"style-loader": "^2.0.0",
|
|
110
111
|
"stylelint": "^15.10.3",
|
|
111
112
|
"stylelint-scss": "^5.1.0",
|