@gravity-ui/dynamic-forms 5.17.1 → 5.19.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/kit/components/Inputs/ColorPicker/ColorPicker.js +7 -0
- package/build/cjs/lib/kit/components/Inputs/TextContent/TextContent.js +2 -2
- package/build/cjs/lib/unstable/core/Entity/Entity.js +78 -0
- package/build/cjs/lib/unstable/core/Entity/index.js +5 -0
- package/build/cjs/lib/unstable/core/Entity/types.js +2 -0
- package/build/cjs/lib/unstable/core/Entity/utils.js +40 -0
- package/build/cjs/lib/unstable/core/SchemaRenderer/SchemaRenderer.js +12 -0
- package/build/cjs/lib/unstable/core/SchemaRenderer/index.js +5 -0
- package/build/cjs/lib/unstable/core/constants.js +28 -0
- package/build/cjs/lib/unstable/core/index.js +15 -0
- package/build/cjs/lib/unstable/core/types/components.js +2 -0
- package/build/cjs/lib/unstable/core/types/config.js +2 -0
- package/build/cjs/lib/unstable/core/types/helpers.js +2 -0
- package/build/cjs/lib/unstable/core/types/index.js +8 -0
- package/build/cjs/lib/unstable/core/types/schema.js +2 -0
- package/build/cjs/lib/unstable/core/types/validation.js +2 -0
- package/build/cjs/lib/unstable/core/types/values.js +2 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/constants.js +4 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/hooks/index.js +7 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/hooks/useEntitiesState.js +25 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/hooks/useSchemaRendererMutators.js +17 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/index.js +10 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/async-validation/async-validation.js +35 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/async-validation/index.js +5 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/async-validation/types.js +2 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/external-errors/external-errors.js +60 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/external-errors/index.js +5 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/external-errors/types.js +2 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/index.js +16 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/schema-mutators/index.js +5 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/schema-mutators/schema-mutators.js +81 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/schema-mutators/types.js +2 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/trigger-fields/index.js +5 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/trigger-fields/trigger-fields.js +12 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/mutators/trigger-fields/types.js +2 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/types.js +2 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/useSchemaRenderer.js +86 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/utils/common.js +11 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/utils/get-ajv-validate.js +39 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/utils/get-validate.js +67 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/utils/index.js +7 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/utils/process-ajv-error.js +51 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/utils/process-ajv-validate-errors.js +43 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/utils/process-entity-parameters-error.js +36 -0
- package/build/cjs/lib/unstable/core/useSchemaRenderer/utils/process-errors-state.js +17 -0
- package/build/cjs/lib/unstable/core/utils/common.js +180 -0
- package/build/cjs/lib/unstable/core/utils/index.js +4 -0
- package/build/cjs/lib/unstable/kit/Accordeon.js +31 -0
- package/build/cjs/lib/unstable/kit/Any.js +21 -0
- package/build/cjs/lib/unstable/kit/ArrayBase.css +23 -0
- package/build/cjs/lib/unstable/kit/ArrayBase.js +101 -0
- package/build/cjs/lib/unstable/kit/MultiSelect.css +6 -0
- package/build/cjs/lib/unstable/kit/MultiSelect.js +66 -0
- package/build/cjs/lib/unstable/kit/ObjectBase.css +10 -0
- package/build/cjs/lib/unstable/kit/ObjectBase.js +71 -0
- package/build/cjs/lib/unstable/kit/Row.css +73 -0
- package/build/cjs/lib/unstable/kit/Row.js +50 -0
- package/build/cjs/lib/unstable/kit/Text.js +259 -0
- package/build/cjs/lib/unstable/kit/components/ArrayRemoveButton/ArrayRemoveButton.js +29 -0
- package/build/cjs/lib/unstable/kit/components/ArrayRemoveButton/index.js +5 -0
- package/build/cjs/lib/unstable/kit/components/ControlError/ControlError.css +33 -0
- package/build/cjs/lib/unstable/kit/components/ControlError/ControlError.js +15 -0
- package/build/cjs/lib/unstable/kit/components/ControlError/index.js +5 -0
- package/build/cjs/lib/unstable/kit/components/HTMLContent/HTMLContent.js +11 -0
- package/build/cjs/lib/unstable/kit/components/HTMLContent/index.js +5 -0
- package/build/cjs/lib/unstable/kit/components/index.js +9 -0
- package/build/cjs/lib/unstable/kit/config.js +68 -0
- package/build/cjs/lib/unstable/kit/constants/config.js +62 -0
- package/build/cjs/lib/unstable/kit/constants/index.js +6 -0
- package/build/cjs/lib/unstable/kit/controls/ArrayBase/ArrayBase.js +46 -0
- package/build/cjs/lib/unstable/kit/controls/ArrayBase/index.js +4 -0
- package/build/cjs/lib/unstable/kit/controls/Checkbox/Checkbox.css +5 -0
- package/build/cjs/lib/unstable/kit/controls/Checkbox/Checkbox.js +16 -0
- package/build/cjs/lib/unstable/kit/controls/Checkbox/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/CheckboxGroup/CheckboxGroup.css +3 -0
- package/build/cjs/lib/unstable/kit/controls/CheckboxGroup/CheckboxGroup.js +37 -0
- package/build/cjs/lib/unstable/kit/controls/CheckboxGroup/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/ColorPicker/ColorPicker.js +24 -0
- package/build/cjs/lib/unstable/kit/controls/ColorPicker/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/DateInput/DateInput.css +3 -0
- package/build/cjs/lib/unstable/kit/controls/DateInput/DateInput.js +55 -0
- package/build/cjs/lib/unstable/kit/controls/DateInput/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/MultiSelect/MultiSelect.js +35 -0
- package/build/cjs/lib/unstable/kit/controls/MultiSelect/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/NumberBase/Number.js +12 -0
- package/build/cjs/lib/unstable/kit/controls/NumberBase/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/ObjectBase/ObjectBase.js +33 -0
- package/build/cjs/lib/unstable/kit/controls/ObjectBase/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/Password/Password.js +12 -0
- package/build/cjs/lib/unstable/kit/controls/Password/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/RadioGroup/RadioGroup.css +3 -0
- package/build/cjs/lib/unstable/kit/controls/RadioGroup/RadioGroup.js +24 -0
- package/build/cjs/lib/unstable/kit/controls/RadioGroup/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/RangeSlider/RangeSlider.css +3 -0
- package/build/cjs/lib/unstable/kit/controls/RangeSlider/RangeSlider.js +33 -0
- package/build/cjs/lib/unstable/kit/controls/RangeSlider/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/Select/Select.js +32 -0
- package/build/cjs/lib/unstable/kit/controls/Select/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/Slider/Slider.css +3 -0
- package/build/cjs/lib/unstable/kit/controls/Slider/Slider.js +19 -0
- package/build/cjs/lib/unstable/kit/controls/Slider/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/StringBase/StringBase.js +12 -0
- package/build/cjs/lib/unstable/kit/controls/StringBase/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/Switch/Switch.css +5 -0
- package/build/cjs/lib/unstable/kit/controls/Switch/Switch.js +16 -0
- package/build/cjs/lib/unstable/kit/controls/Switch/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/TextArea/TextArea.js +12 -0
- package/build/cjs/lib/unstable/kit/controls/TextArea/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/index.js +35 -0
- package/build/cjs/lib/unstable/kit/styles/functions.css +0 -0
- package/build/cjs/lib/unstable/kit/styles/variables.css +0 -0
- package/build/cjs/lib/unstable/kit/utils/cn.js +6 -0
- package/build/cjs/lib/unstable/kit/utils/common.js +27 -0
- package/build/cjs/lib/unstable/kit/utils/index.js +11 -0
- package/build/cjs/lib/unstable/kit/wrappers/Row/Row.css +27 -0
- package/build/cjs/lib/unstable/kit/wrappers/Row/Row.js +34 -0
- package/build/cjs/lib/unstable/kit/wrappers/Row/index.js +5 -0
- package/build/cjs/lib/unstable/kit/wrappers/Transparent/Transparent.css +6 -0
- package/build/cjs/lib/unstable/kit/wrappers/Transparent/Transparent.js +15 -0
- package/build/cjs/lib/unstable/kit/wrappers/Transparent/index.js +5 -0
- package/build/cjs/lib/unstable/kit/wrappers/index.js +7 -0
- package/build/cjs/unstable.js +10 -0
- package/build/esm/lib/kit/components/Inputs/ColorPicker/ColorPicker.d.ts +15 -0
- package/build/esm/lib/kit/components/Inputs/ColorPicker/ColorPicker.js +7 -0
- package/build/esm/lib/kit/components/Inputs/TextContent/TextContent.js +1 -1
- package/build/esm/lib/unstable/core/Entity/Entity.d.ts +10 -0
- package/build/esm/lib/unstable/core/Entity/Entity.js +74 -0
- package/build/esm/lib/unstable/core/Entity/index.d.ts +2 -0
- package/build/esm/lib/unstable/core/Entity/index.js +1 -0
- package/build/esm/lib/unstable/core/Entity/types.d.ts +27 -0
- package/build/esm/lib/unstable/core/Entity/types.js +1 -0
- package/build/esm/lib/unstable/core/Entity/utils.d.ts +3 -0
- package/build/esm/lib/unstable/core/Entity/utils.js +35 -0
- package/build/esm/lib/unstable/core/SchemaRenderer/SchemaRenderer.d.ts +5 -0
- package/build/esm/lib/unstable/core/SchemaRenderer/SchemaRenderer.js +8 -0
- package/build/esm/lib/unstable/core/SchemaRenderer/index.d.ts +1 -0
- package/build/esm/lib/unstable/core/SchemaRenderer/index.js +1 -0
- package/build/esm/lib/unstable/core/constants.d.ts +22 -0
- package/build/esm/lib/unstable/core/constants.js +25 -0
- package/build/esm/lib/unstable/core/index.d.ts +5 -0
- package/build/esm/lib/unstable/core/index.js +4 -0
- package/build/esm/lib/unstable/core/types/components.d.ts +29 -0
- package/build/esm/lib/unstable/core/types/components.js +1 -0
- package/build/esm/lib/unstable/core/types/config.d.ts +36 -0
- package/build/esm/lib/unstable/core/types/config.js +1 -0
- package/build/esm/lib/unstable/core/types/helpers.d.ts +18 -0
- package/build/esm/lib/unstable/core/types/helpers.js +1 -0
- package/build/esm/lib/unstable/core/types/index.d.ts +5 -0
- package/build/esm/lib/unstable/core/types/index.js +5 -0
- package/build/esm/lib/unstable/core/types/schema.d.ts +1186 -0
- package/build/esm/lib/unstable/core/types/schema.js +1 -0
- package/build/esm/lib/unstable/core/types/validation.d.ts +39 -0
- package/build/esm/lib/unstable/core/types/validation.js +1 -0
- package/build/esm/lib/unstable/core/types/values.d.ts +4 -0
- package/build/esm/lib/unstable/core/types/values.js +1 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/constants.d.ts +1 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/constants.js +1 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/hooks/index.d.ts +2 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/hooks/index.js +2 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/hooks/useEntitiesState.d.ts +7 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/hooks/useEntitiesState.js +20 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/hooks/useSchemaRendererMutators.d.ts +10 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/hooks/useSchemaRendererMutators.js +13 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/index.d.ts +3 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/index.js +3 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/async-validation/async-validation.d.ts +3 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/async-validation/async-validation.js +29 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/async-validation/index.d.ts +2 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/async-validation/index.js +2 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/async-validation/types.d.ts +34 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/async-validation/types.js +1 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/external-errors/external-errors.d.ts +3 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/external-errors/external-errors.js +54 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/external-errors/index.d.ts +2 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/external-errors/index.js +2 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/external-errors/types.d.ts +25 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/external-errors/types.js +1 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/index.d.ts +13 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/index.js +13 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/schema-mutators/index.d.ts +2 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/schema-mutators/index.js +2 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/schema-mutators/schema-mutators.d.ts +3 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/schema-mutators/schema-mutators.js +75 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/schema-mutators/types.d.ts +26 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/schema-mutators/types.js +1 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/trigger-fields/index.d.ts +2 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/trigger-fields/index.js +2 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/trigger-fields/trigger-fields.d.ts +2 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/trigger-fields/trigger-fields.js +8 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/trigger-fields/types.d.ts +6 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/mutators/trigger-fields/types.js +1 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/types.d.ts +22 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/types.js +1 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/useSchemaRenderer.d.ts +37 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/useSchemaRenderer.js +81 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/utils/common.d.ts +1 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/utils/common.js +7 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/utils/get-ajv-validate.d.ts +11 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/utils/get-ajv-validate.js +34 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/utils/get-validate.d.ts +14 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/utils/get-validate.js +62 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/utils/index.d.ts +2 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/utils/index.js +2 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/utils/process-ajv-error.d.ts +10 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/utils/process-ajv-error.js +46 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/utils/process-ajv-validate-errors.d.ts +20 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/utils/process-ajv-validate-errors.js +39 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/utils/process-entity-parameters-error.d.ts +15 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/utils/process-entity-parameters-error.js +31 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/utils/process-errors-state.d.ts +12 -0
- package/build/esm/lib/unstable/core/useSchemaRenderer/utils/process-errors-state.js +12 -0
- package/build/esm/lib/unstable/core/utils/common.d.ts +49 -0
- package/build/esm/lib/unstable/core/utils/common.js +165 -0
- package/build/esm/lib/unstable/core/utils/index.d.ts +1 -0
- package/build/esm/lib/unstable/core/utils/index.js +1 -0
- package/build/esm/lib/unstable/kit/Accordeon.d.ts +3 -0
- package/build/esm/lib/unstable/kit/Accordeon.js +26 -0
- package/build/esm/lib/unstable/kit/Any.d.ts +2 -0
- package/build/esm/lib/unstable/kit/Any.js +16 -0
- package/build/esm/lib/unstable/kit/ArrayBase.css +23 -0
- package/build/esm/lib/unstable/kit/ArrayBase.d.ts +3 -0
- package/build/esm/lib/unstable/kit/ArrayBase.js +97 -0
- package/build/esm/lib/unstable/kit/MultiSelect.css +6 -0
- package/build/esm/lib/unstable/kit/MultiSelect.d.ts +7 -0
- package/build/esm/lib/unstable/kit/MultiSelect.js +62 -0
- package/build/esm/lib/unstable/kit/ObjectBase.css +10 -0
- package/build/esm/lib/unstable/kit/ObjectBase.d.ts +8 -0
- package/build/esm/lib/unstable/kit/ObjectBase.js +66 -0
- package/build/esm/lib/unstable/kit/Row.css +73 -0
- package/build/esm/lib/unstable/kit/Row.d.ts +11 -0
- package/build/esm/lib/unstable/kit/Row.js +47 -0
- package/build/esm/lib/unstable/kit/Text.d.ts +6 -0
- package/build/esm/lib/unstable/kit/Text.js +255 -0
- package/build/esm/lib/unstable/kit/components/ArrayRemoveButton/ArrayRemoveButton.d.ts +5 -0
- package/build/esm/lib/unstable/kit/components/ArrayRemoveButton/ArrayRemoveButton.js +24 -0
- package/build/esm/lib/unstable/kit/components/ArrayRemoveButton/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/components/ArrayRemoveButton/index.js +1 -0
- package/build/esm/lib/unstable/kit/components/ControlError/ControlError.css +33 -0
- package/build/esm/lib/unstable/kit/components/ControlError/ControlError.d.ts +9 -0
- package/build/esm/lib/unstable/kit/components/ControlError/ControlError.js +11 -0
- package/build/esm/lib/unstable/kit/components/ControlError/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/components/ControlError/index.js +1 -0
- package/build/esm/lib/unstable/kit/components/HTMLContent/HTMLContent.d.ts +6 -0
- package/build/esm/lib/unstable/kit/components/HTMLContent/HTMLContent.js +7 -0
- package/build/esm/lib/unstable/kit/components/HTMLContent/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/components/HTMLContent/index.js +1 -0
- package/build/esm/lib/unstable/kit/components/index.d.ts +3 -0
- package/build/esm/lib/unstable/kit/components/index.js +3 -0
- package/build/esm/lib/unstable/kit/config.d.ts +95 -0
- package/build/esm/lib/unstable/kit/config.js +65 -0
- package/build/esm/lib/unstable/kit/constants/config.d.ts +112 -0
- package/build/esm/lib/unstable/kit/constants/config.js +59 -0
- package/build/esm/lib/unstable/kit/constants/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/constants/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/ArrayBase/ArrayBase.d.ts +8 -0
- package/build/esm/lib/unstable/kit/controls/ArrayBase/ArrayBase.js +42 -0
- package/build/esm/lib/unstable/kit/controls/ArrayBase/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/ArrayBase/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/Checkbox/Checkbox.css +5 -0
- package/build/esm/lib/unstable/kit/controls/Checkbox/Checkbox.d.ts +7 -0
- package/build/esm/lib/unstable/kit/controls/Checkbox/Checkbox.js +13 -0
- package/build/esm/lib/unstable/kit/controls/Checkbox/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/Checkbox/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/CheckboxGroup/CheckboxGroup.css +3 -0
- package/build/esm/lib/unstable/kit/controls/CheckboxGroup/CheckboxGroup.d.ts +10 -0
- package/build/esm/lib/unstable/kit/controls/CheckboxGroup/CheckboxGroup.js +34 -0
- package/build/esm/lib/unstable/kit/controls/CheckboxGroup/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/CheckboxGroup/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/ColorPicker/ColorPicker.d.ts +6 -0
- package/build/esm/lib/unstable/kit/controls/ColorPicker/ColorPicker.js +21 -0
- package/build/esm/lib/unstable/kit/controls/ColorPicker/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/ColorPicker/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/DateInput/DateInput.css +3 -0
- package/build/esm/lib/unstable/kit/controls/DateInput/DateInput.d.ts +9 -0
- package/build/esm/lib/unstable/kit/controls/DateInput/DateInput.js +53 -0
- package/build/esm/lib/unstable/kit/controls/DateInput/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/DateInput/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/MultiSelect/MultiSelect.d.ts +8 -0
- package/build/esm/lib/unstable/kit/controls/MultiSelect/MultiSelect.js +32 -0
- package/build/esm/lib/unstable/kit/controls/MultiSelect/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/MultiSelect/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/NumberBase/Number.d.ts +6 -0
- package/build/esm/lib/unstable/kit/controls/NumberBase/Number.js +8 -0
- package/build/esm/lib/unstable/kit/controls/NumberBase/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/NumberBase/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/ObjectBase/ObjectBase.d.ts +8 -0
- package/build/esm/lib/unstable/kit/controls/ObjectBase/ObjectBase.js +29 -0
- package/build/esm/lib/unstable/kit/controls/ObjectBase/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/ObjectBase/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/Password/Password.d.ts +6 -0
- package/build/esm/lib/unstable/kit/controls/Password/Password.js +8 -0
- package/build/esm/lib/unstable/kit/controls/Password/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/Password/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/RadioGroup/RadioGroup.css +3 -0
- package/build/esm/lib/unstable/kit/controls/RadioGroup/RadioGroup.d.ts +9 -0
- package/build/esm/lib/unstable/kit/controls/RadioGroup/RadioGroup.js +22 -0
- package/build/esm/lib/unstable/kit/controls/RadioGroup/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/RadioGroup/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/RangeSlider/RangeSlider.css +3 -0
- package/build/esm/lib/unstable/kit/controls/RangeSlider/RangeSlider.d.ts +8 -0
- package/build/esm/lib/unstable/kit/controls/RangeSlider/RangeSlider.js +31 -0
- package/build/esm/lib/unstable/kit/controls/RangeSlider/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/RangeSlider/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/Select/Select.d.ts +9 -0
- package/build/esm/lib/unstable/kit/controls/Select/Select.js +29 -0
- package/build/esm/lib/unstable/kit/controls/Select/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/Select/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/Slider/Slider.css +3 -0
- package/build/esm/lib/unstable/kit/controls/Slider/Slider.d.ts +7 -0
- package/build/esm/lib/unstable/kit/controls/Slider/Slider.js +16 -0
- package/build/esm/lib/unstable/kit/controls/Slider/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/Slider/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/StringBase/StringBase.d.ts +6 -0
- package/build/esm/lib/unstable/kit/controls/StringBase/StringBase.js +8 -0
- package/build/esm/lib/unstable/kit/controls/StringBase/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/StringBase/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/Switch/Switch.css +5 -0
- package/build/esm/lib/unstable/kit/controls/Switch/Switch.d.ts +7 -0
- package/build/esm/lib/unstable/kit/controls/Switch/Switch.js +13 -0
- package/build/esm/lib/unstable/kit/controls/Switch/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/Switch/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/TextArea/TextArea.d.ts +6 -0
- package/build/esm/lib/unstable/kit/controls/TextArea/TextArea.js +8 -0
- package/build/esm/lib/unstable/kit/controls/TextArea/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/TextArea/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/index.d.ts +16 -0
- package/build/esm/lib/unstable/kit/controls/index.js +16 -0
- package/build/esm/lib/unstable/kit/styles/functions.css +0 -0
- package/build/esm/lib/unstable/kit/styles/variables.css +0 -0
- package/build/esm/lib/unstable/kit/utils/cn.d.ts +1 -0
- package/build/esm/lib/unstable/kit/utils/cn.js +3 -0
- package/build/esm/lib/unstable/kit/utils/common.d.ts +7 -0
- package/build/esm/lib/unstable/kit/utils/common.js +19 -0
- package/build/esm/lib/unstable/kit/utils/index.d.ts +2 -0
- package/build/esm/lib/unstable/kit/utils/index.js +2 -0
- package/build/esm/lib/unstable/kit/wrappers/Row/Row.css +27 -0
- package/build/esm/lib/unstable/kit/wrappers/Row/Row.d.ts +7 -0
- package/build/esm/lib/unstable/kit/wrappers/Row/Row.js +31 -0
- package/build/esm/lib/unstable/kit/wrappers/Row/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/wrappers/Row/index.js +1 -0
- package/build/esm/lib/unstable/kit/wrappers/Transparent/Transparent.css +6 -0
- package/build/esm/lib/unstable/kit/wrappers/Transparent/Transparent.d.ts +4 -0
- package/build/esm/lib/unstable/kit/wrappers/Transparent/Transparent.js +12 -0
- package/build/esm/lib/unstable/kit/wrappers/Transparent/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/wrappers/Transparent/index.js +1 -0
- package/build/esm/lib/unstable/kit/wrappers/index.d.ts +2 -0
- package/build/esm/lib/unstable/kit/wrappers/index.js +2 -0
- package/build/esm/unstable.d.ts +4 -0
- package/build/esm/unstable.js +4 -0
- package/package.json +24 -2
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PasswordInput, TextInput, } from '@gravity-ui/uikit';
|
|
3
|
+
import isNil from 'lodash/isNil';
|
|
4
|
+
import { useSchemaRendererMutators } from '../core';
|
|
5
|
+
const Component = ({ input, meta, schema, }) => {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
// const {setErrors, removeErrors} = useSetErrors();
|
|
8
|
+
const { setSchemaMutators, removeSchemaMutators } = useSchemaRendererMutators(); // setExternalErrors
|
|
9
|
+
const props = {
|
|
10
|
+
hasClear: true,
|
|
11
|
+
// ...inputProps,
|
|
12
|
+
value: isNil(input.value) ? '' : `${input.value}`,
|
|
13
|
+
onBlur: input.onBlur,
|
|
14
|
+
onFocus: input.onFocus,
|
|
15
|
+
onUpdate: input.onChange,
|
|
16
|
+
// disabled: spec.viewSpec.disabled,
|
|
17
|
+
disabled: schema.readOnly,
|
|
18
|
+
// placeholder: spec.viewSpec.placeholder,
|
|
19
|
+
placeholder: `${(_a = schema.examples) === null || _a === void 0 ? void 0 : _a[0]}`,
|
|
20
|
+
qa: input.name,
|
|
21
|
+
error: meta.error,
|
|
22
|
+
// errorMessage: meta.error,
|
|
23
|
+
};
|
|
24
|
+
React.useEffect(() => {
|
|
25
|
+
if (input.name === 'qwe.test.jajaja.stringMaxLength' ||
|
|
26
|
+
input.name === 'qwe.test.bocembocembocem.stringMaxLength') {
|
|
27
|
+
// if (input.value === '1') {
|
|
28
|
+
// setExternalErrors?.({
|
|
29
|
+
// headName: 'qwe.test.jajaja',
|
|
30
|
+
// priorityErrors: {
|
|
31
|
+
// [input.name]: 'bbbbbbbbbbb priority',
|
|
32
|
+
// 'qwe.test.jajaja': {
|
|
33
|
+
// numberMaximum: 'bbbbbbbbbbb priority',
|
|
34
|
+
// objectPropertyNames: {
|
|
35
|
+
// stringEnum: 'bbbbbbbbbbb priority',
|
|
36
|
+
// },
|
|
37
|
+
// },
|
|
38
|
+
// 'qwe.test.jajaja.objectPropertyNames': 'bbbbbbbbbbb priority',
|
|
39
|
+
// },
|
|
40
|
+
// });
|
|
41
|
+
// setSchemaMutators?.({
|
|
42
|
+
// headName: 'qwe.test.jajaja',
|
|
43
|
+
// // mutators: {
|
|
44
|
+
// // [input.name]: {
|
|
45
|
+
// // title: 'Aaaaaaaa',
|
|
46
|
+
// // },
|
|
47
|
+
// // 'qwe.test.jajaja.stringPattern': {
|
|
48
|
+
// // title: 'OOOOOOO',
|
|
49
|
+
// // },
|
|
50
|
+
// // 'qwe.test.jajaja.numberMinimum': {
|
|
51
|
+
// // minimum: 0,
|
|
52
|
+
// // },
|
|
53
|
+
// // },
|
|
54
|
+
// mutators: [
|
|
55
|
+
// {
|
|
56
|
+
// name: input.name,
|
|
57
|
+
// schema: {
|
|
58
|
+
// title: 'QWEQWEQWEQWE',
|
|
59
|
+
// },
|
|
60
|
+
// },
|
|
61
|
+
// {
|
|
62
|
+
// name: 'qwe.test.jajaja.stringPattern',
|
|
63
|
+
// schema: {
|
|
64
|
+
// title: 'QWEQWEQWEQWE',
|
|
65
|
+
// },
|
|
66
|
+
// },
|
|
67
|
+
// {
|
|
68
|
+
// name: 'qwe.test.jajaja.numberMaximum',
|
|
69
|
+
// schema: {
|
|
70
|
+
// maximum: 10,
|
|
71
|
+
// },
|
|
72
|
+
// },
|
|
73
|
+
// ],
|
|
74
|
+
// });
|
|
75
|
+
// } else if (input.value === '2') {
|
|
76
|
+
// setExternalErrors?.({
|
|
77
|
+
// headName: 'qwe.test.jajaja',
|
|
78
|
+
// priorityErrors: {
|
|
79
|
+
// [input.name]: 'priorityError',
|
|
80
|
+
// 'qwe.test.jajaja': {
|
|
81
|
+
// numberMaximum: 'priorityError',
|
|
82
|
+
// objectPropertyNames: {
|
|
83
|
+
// stringEnum: 'priorityError',
|
|
84
|
+
// },
|
|
85
|
+
// },
|
|
86
|
+
// 'qwe.test.jajaja.objectPropertyNames': 'priorityError',
|
|
87
|
+
// },
|
|
88
|
+
// });
|
|
89
|
+
// setSchemaMutators?.({
|
|
90
|
+
// headName: 'qwe.test.jajaja',
|
|
91
|
+
// // mutators: {
|
|
92
|
+
// // [input.name]: {
|
|
93
|
+
// // title: 'Aaaaaaaa',
|
|
94
|
+
// // },
|
|
95
|
+
// // 'qwe.test.jajaja.stringPattern': {
|
|
96
|
+
// // title: 'OOOOOOO',
|
|
97
|
+
// // },
|
|
98
|
+
// // 'qwe.test.jajaja.numberMinimum': {
|
|
99
|
+
// // minimum: 0,
|
|
100
|
+
// // },
|
|
101
|
+
// // },
|
|
102
|
+
// mutators: [
|
|
103
|
+
// {
|
|
104
|
+
// name: input.name,
|
|
105
|
+
// schema: {
|
|
106
|
+
// title: 'Aaaaaaaa',
|
|
107
|
+
// },
|
|
108
|
+
// },
|
|
109
|
+
// {
|
|
110
|
+
// name: 'qwe.test.jajaja.stringPattern',
|
|
111
|
+
// schema: {
|
|
112
|
+
// title: 'OOOOOOO',
|
|
113
|
+
// },
|
|
114
|
+
// },
|
|
115
|
+
// {
|
|
116
|
+
// name: 'qwe.test.jajaja.numberMinimum',
|
|
117
|
+
// schema: {
|
|
118
|
+
// minimum: 0,
|
|
119
|
+
// },
|
|
120
|
+
// },
|
|
121
|
+
// ],
|
|
122
|
+
// });
|
|
123
|
+
// } else if (input.value === '3') {
|
|
124
|
+
// setExternalErrors?.({
|
|
125
|
+
// headName: 'qwe.test.jajaja',
|
|
126
|
+
// priorityErrors: {
|
|
127
|
+
// [input.name]: 'EXTERNAL_ERROR',
|
|
128
|
+
// },
|
|
129
|
+
// });
|
|
130
|
+
// removeSchemaMutators?.({
|
|
131
|
+
// headName: 'qwe.test.jajaja',
|
|
132
|
+
// // mutatorsToRemove: {
|
|
133
|
+
// // 'qwe.test.jajaja.numberMinimum': {
|
|
134
|
+
// // minimum: 0,
|
|
135
|
+
// // },
|
|
136
|
+
// // 'qwe.test.jajaja.stringPattern': true,
|
|
137
|
+
// // },
|
|
138
|
+
// mutatorsToRemove: [
|
|
139
|
+
// {
|
|
140
|
+
// name: input.name,
|
|
141
|
+
// schema: true,
|
|
142
|
+
// },
|
|
143
|
+
// {
|
|
144
|
+
// name: 'qwe.test.jajaja.numberMinimum',
|
|
145
|
+
// schema: {
|
|
146
|
+
// minimum: 0,
|
|
147
|
+
// },
|
|
148
|
+
// },
|
|
149
|
+
// {
|
|
150
|
+
// name: 'qwe.test.jajaja.stringPattern',
|
|
151
|
+
// schema: {
|
|
152
|
+
// title: 'OOOOOOO',
|
|
153
|
+
// },
|
|
154
|
+
// },
|
|
155
|
+
// ],
|
|
156
|
+
// });
|
|
157
|
+
// // removeExternalErrors?.({
|
|
158
|
+
// // headName: 'qwe.test.jajaja',
|
|
159
|
+
// // removeFunctionOrNames: [input.name],
|
|
160
|
+
// // });
|
|
161
|
+
// // removeExternalErrors?.({
|
|
162
|
+
// // headName: 'qwe.test.jajaja',
|
|
163
|
+
// // removeFunctionOrNames: (params) => ({
|
|
164
|
+
// // ...params,
|
|
165
|
+
// // priorityErrors: omit(params.priorityErrors, input.name),
|
|
166
|
+
// // }),
|
|
167
|
+
// // });
|
|
168
|
+
// }
|
|
169
|
+
if (input.value === '1') {
|
|
170
|
+
removeSchemaMutators === null || removeSchemaMutators === void 0 ? void 0 : removeSchemaMutators({
|
|
171
|
+
mutatorsToRemove: [
|
|
172
|
+
{
|
|
173
|
+
name: 'qwe.test.jajaja.stringPattern',
|
|
174
|
+
schema: true,
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: 'qwe.test.jajaja',
|
|
178
|
+
schema: {
|
|
179
|
+
definitions: {
|
|
180
|
+
jajaja: {
|
|
181
|
+
title: `jajaja`,
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
],
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
setSchemaMutators === null || setSchemaMutators === void 0 ? void 0 : setSchemaMutators({
|
|
191
|
+
// mutators: {
|
|
192
|
+
// [input.name]: {
|
|
193
|
+
// title: 'Aaaaaaaa',
|
|
194
|
+
// },
|
|
195
|
+
// 'qwe.test.jajaja.stringPattern': {
|
|
196
|
+
// title: 'OOOOOOO',
|
|
197
|
+
// },
|
|
198
|
+
// 'qwe.test.jajaja.numberMinimum': {
|
|
199
|
+
// minimum: 0,
|
|
200
|
+
// },
|
|
201
|
+
// },
|
|
202
|
+
mutators: [
|
|
203
|
+
{
|
|
204
|
+
name: input.name,
|
|
205
|
+
schema: {
|
|
206
|
+
title: `${input.value}`,
|
|
207
|
+
maxLength: `${input.value}`.length - 1,
|
|
208
|
+
entityParameters: {
|
|
209
|
+
validatorType: '',
|
|
210
|
+
errorMessages: {
|
|
211
|
+
maxLength: `${input.value}`.length - 1 + ' maxLength',
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
name: 'qwe.test.jajaja.stringPattern',
|
|
218
|
+
schema: {
|
|
219
|
+
title: `${input.value}`,
|
|
220
|
+
entityParameters: {
|
|
221
|
+
validatorType: '',
|
|
222
|
+
errorMessages: {
|
|
223
|
+
pattern: `${input.value}`.length - 1 + ' pattern',
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
name: 'qwe.test.jajaja',
|
|
230
|
+
schema: {
|
|
231
|
+
definitions: {
|
|
232
|
+
jajaja: {
|
|
233
|
+
title: `${input.value}`,
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
],
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
// setExternalErrors?.({
|
|
242
|
+
// headName: 'qwe.test.jajaja',
|
|
243
|
+
// priorityErrors: {
|
|
244
|
+
// 'qwe.test.jajaja.stringEnum': `${input.value}`,
|
|
245
|
+
// },
|
|
246
|
+
// });
|
|
247
|
+
}
|
|
248
|
+
}, [input.value]);
|
|
249
|
+
// if (spec.viewSpec.type === 'password') {
|
|
250
|
+
if (((_b = schema.entityParameters) === null || _b === void 0 ? void 0 : _b.viewType) === 'password') {
|
|
251
|
+
return React.createElement(PasswordInput, Object.assign({}, props, { autoComplete: "new-password" }));
|
|
252
|
+
}
|
|
253
|
+
return React.createElement(TextInput, Object.assign({}, props, { type: "text" }));
|
|
254
|
+
};
|
|
255
|
+
export const Text = React.memo(Component);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TrashBin } from '@gravity-ui/icons';
|
|
3
|
+
import { Button, Icon } from '@gravity-ui/uikit';
|
|
4
|
+
import { useForm } from 'react-final-form';
|
|
5
|
+
import { getArrayItemIndex, getArrayItemParentName, isArrayItem, isTupleItem } from '../../utils';
|
|
6
|
+
export const ArrayRemoveButton = ({ name }) => {
|
|
7
|
+
const form = useForm();
|
|
8
|
+
const arrayItem = isArrayItem(name);
|
|
9
|
+
const tupleItem = isTupleItem(name, form);
|
|
10
|
+
const removeItem = React.useCallback(() => {
|
|
11
|
+
var _a;
|
|
12
|
+
const parentName = getArrayItemParentName(name);
|
|
13
|
+
const parentValue = (_a = form.getFieldState(parentName)) === null || _a === void 0 ? void 0 : _a.value;
|
|
14
|
+
const index = Number(getArrayItemIndex(name));
|
|
15
|
+
if (Array.isArray(parentValue)) {
|
|
16
|
+
form.change(parentName, parentValue.filter((_, i) => i !== index));
|
|
17
|
+
}
|
|
18
|
+
}, [form, name]);
|
|
19
|
+
if (arrayItem && !tupleItem) {
|
|
20
|
+
return (React.createElement(Button, { view: "flat-secondary", onClick: removeItem, qa: `${name}-remove-item` },
|
|
21
|
+
React.createElement(Icon, { data: TrashBin, size: 16 })));
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ArrayRemoveButton, type ArrayRemoveButtonProps } from './ArrayRemoveButton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ArrayRemoveButton } from './ArrayRemoveButton';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.sr-control-error__children {
|
|
2
|
+
width: 100%;
|
|
3
|
+
}
|
|
4
|
+
.sr-control-error__children_errors .g-control-label:not(.g-control-label_disabled) .g-checkbox__indicator:hover::before {
|
|
5
|
+
border: 1px solid var(--g-color-text-danger);
|
|
6
|
+
}
|
|
7
|
+
.sr-control-error__children_errors .g-control-label:not(.g-control-label_disabled) .g-checkbox__indicator::before {
|
|
8
|
+
border: 1px solid var(--g-color-text-danger);
|
|
9
|
+
}
|
|
10
|
+
.sr-control-error__children_errors .g-text-input:not(.g-text-input_disabled) .g-text-input__content {
|
|
11
|
+
border-color: var(--g-color-text-danger);
|
|
12
|
+
}
|
|
13
|
+
.sr-control-error__children_errors .g-text-input:not(.g-text-input_disabled) .g-text-input__content:hover {
|
|
14
|
+
border-color: var(--g-color-text-danger);
|
|
15
|
+
}
|
|
16
|
+
.sr-control-error__children_errors .g-text-area__content {
|
|
17
|
+
border-color: var(--g-color-text-danger);
|
|
18
|
+
}
|
|
19
|
+
.sr-control-error__children_errors .g-text-area__content:hover {
|
|
20
|
+
border-color: var(--g-color-text-danger);
|
|
21
|
+
}
|
|
22
|
+
.sr-control-error__children_errors .g-select-control:not(.g-select-control_disabled) .g-select-control__button:hover::before {
|
|
23
|
+
border: 1px solid var(--g-color-text-danger) !important;
|
|
24
|
+
}
|
|
25
|
+
.sr-control-error__children_errors .g-select-control:not(.g-select-control_disabled) .g-select-control__button::before {
|
|
26
|
+
border: 1px solid var(--g-color-text-danger) !important;
|
|
27
|
+
}
|
|
28
|
+
.sr-control-error__children_errors .g-segmented-radio-group:not([aria-disabled=true]) .g-segmented-radio-group__option_checked:hover::after {
|
|
29
|
+
border: 1px solid var(--g-color-text-danger);
|
|
30
|
+
}
|
|
31
|
+
.sr-control-error__children_errors .g-segmented-radio-group:not([aria-disabled=true]) .g-segmented-radio-group__option_checked::after {
|
|
32
|
+
border: 1px solid var(--g-color-text-danger);
|
|
33
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './ControlError.css';
|
|
3
|
+
export interface ControlErrorProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
errorMessage?: string;
|
|
6
|
+
validationState?: 'invalid';
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const ControlError: React.FC<ControlErrorProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Flex, Text } from '@gravity-ui/uikit';
|
|
3
|
+
import { block } from '../../utils';
|
|
4
|
+
import './ControlError.css';
|
|
5
|
+
const b = block('control-error');
|
|
6
|
+
export const ControlError = ({ className, errorMessage, validationState, children, }) => {
|
|
7
|
+
const error = validationState === 'invalid' && errorMessage ? (React.createElement(Text, { color: "danger" }, errorMessage)) : null;
|
|
8
|
+
return (React.createElement(Flex, { className: b(null, className), width: "100%", direction: "column", alignItems: "flex-start" },
|
|
9
|
+
React.createElement("div", { className: b('children', { errors: Boolean(error) }) }, children),
|
|
10
|
+
error));
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ControlError, type ControlErrorProps } from './ControlError';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ControlError } from './ControlError';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Text } from '@gravity-ui/uikit';
|
|
4
|
+
export const HTMLContent = (_a) => {
|
|
5
|
+
var { html } = _a, restProps = __rest(_a, ["html"]);
|
|
6
|
+
return React.createElement(Text, Object.assign({}, restProps, { dangerouslySetInnerHTML: { __html: html } }));
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { HTMLContent, type HTMLContentProps } from './HTMLContent';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { HTMLContent } from './HTMLContent';
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { AsyncValidator, SchemaRendererConfig, SyncValidator } from '../core/types';
|
|
2
|
+
import type { JsonSchemaArray, JsonSchemaBoolean, JsonSchemaNumber, JsonSchemaObject, JsonSchemaString } from '../core/types/schema';
|
|
3
|
+
export declare const untypedConfig: {
|
|
4
|
+
readonly any: {
|
|
5
|
+
readonly controls: {
|
|
6
|
+
readonly baseAny: {
|
|
7
|
+
readonly Component: import("../core/types").Control<import("../core/types").JsonSchemaAny<any>>;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
readonly views: {};
|
|
11
|
+
readonly wrappers: {};
|
|
12
|
+
readonly validators: {};
|
|
13
|
+
};
|
|
14
|
+
readonly array: {
|
|
15
|
+
readonly controls: {
|
|
16
|
+
readonly selectArray: {
|
|
17
|
+
readonly Component: import("../core/types").Control<JsonSchemaArray<any>>;
|
|
18
|
+
};
|
|
19
|
+
readonly baseArray: {
|
|
20
|
+
readonly Component: import("../core/types").Control<JsonSchemaArray<any>>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
readonly views: {};
|
|
24
|
+
readonly wrappers: {
|
|
25
|
+
readonly accordeonArray: <Schema extends import("../core/types").JsonSchema>({ schema, input, meta, children, wrapperProps, }: import("../core/types").WrapperProps<Schema>) => React.ReactNode;
|
|
26
|
+
readonly rowArray: import("react").MemoExoticComponent<(<Schema extends import("../core/types").JsonSchema>(props: import("../core/types").WrapperProps<Schema, {
|
|
27
|
+
qtest: boolean;
|
|
28
|
+
qwa?: string;
|
|
29
|
+
}>) => import("react").JSX.Element)>;
|
|
30
|
+
};
|
|
31
|
+
readonly validators: {
|
|
32
|
+
readonly baseArray: SyncValidator<JsonSchemaArray>;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
readonly boolean: {
|
|
36
|
+
readonly controls: {};
|
|
37
|
+
readonly views: {};
|
|
38
|
+
readonly wrappers: {};
|
|
39
|
+
readonly validators: {
|
|
40
|
+
readonly baseBoolean: SyncValidator<JsonSchemaBoolean>;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
readonly number: {
|
|
44
|
+
readonly controls: {
|
|
45
|
+
readonly baseNumber: {
|
|
46
|
+
readonly Component: import("react").MemoExoticComponent<(<T extends import("../core/types").ControlProps<JsonSchemaNumber, import("./Text").TextProps> | import("../core/types").ControlProps<JsonSchemaString, import("./Text").TextProps>>({ input, meta, schema, }: T) => import("react").JSX.Element)>;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
readonly views: {};
|
|
50
|
+
readonly wrappers: {
|
|
51
|
+
readonly rowNumber: import("react").MemoExoticComponent<(<Schema extends import("../core/types").JsonSchema>(props: import("../core/types").WrapperProps<Schema, {
|
|
52
|
+
qtest: boolean;
|
|
53
|
+
qwa?: string;
|
|
54
|
+
}>) => import("react").JSX.Element)>;
|
|
55
|
+
};
|
|
56
|
+
readonly validators: {
|
|
57
|
+
readonly baseNumber: () => boolean;
|
|
58
|
+
readonly asyncNumber: AsyncValidator<JsonSchemaNumber>;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
readonly object: {
|
|
62
|
+
readonly controls: {
|
|
63
|
+
readonly baseObject: {
|
|
64
|
+
readonly Component: import("react").FC<import("./ObjectBase").ObjectBaseProps>;
|
|
65
|
+
readonly independent: true;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
readonly views: {};
|
|
69
|
+
readonly wrappers: {
|
|
70
|
+
readonly accordeonObject: <Schema extends import("../core/types").JsonSchema>({ schema, input, meta, children, wrapperProps, }: import("../core/types").WrapperProps<Schema>) => React.ReactNode;
|
|
71
|
+
};
|
|
72
|
+
readonly validators: {
|
|
73
|
+
readonly baseObject: SyncValidator<JsonSchemaObject>;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
readonly string: {
|
|
77
|
+
readonly controls: {
|
|
78
|
+
readonly baseString: {
|
|
79
|
+
readonly Component: import("react").MemoExoticComponent<(<T extends import("../core/types").ControlProps<JsonSchemaNumber, import("./Text").TextProps> | import("../core/types").ControlProps<JsonSchemaString, import("./Text").TextProps>>({ input, meta, schema, }: T) => import("react").JSX.Element)>;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
readonly views: {};
|
|
83
|
+
readonly wrappers: {
|
|
84
|
+
readonly rowString: import("react").MemoExoticComponent<(<Schema extends import("../core/types").JsonSchema>(props: import("../core/types").WrapperProps<Schema, {
|
|
85
|
+
qtest: boolean;
|
|
86
|
+
qwa?: string;
|
|
87
|
+
}>) => import("react").JSX.Element)>;
|
|
88
|
+
};
|
|
89
|
+
readonly validators: {
|
|
90
|
+
readonly baseString: SyncValidator<JsonSchemaString>;
|
|
91
|
+
readonly cccString: SyncValidator<JsonSchemaString>;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
export declare const config: SchemaRendererConfig;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { EntityType } from '../core/constants';
|
|
2
|
+
import { Accordeon } from './Accordeon';
|
|
3
|
+
import { AnyInput } from './Any';
|
|
4
|
+
import { ArrayBase } from './ArrayBase';
|
|
5
|
+
import { MultiSelect } from './MultiSelect';
|
|
6
|
+
import { ObjectBase } from './ObjectBase';
|
|
7
|
+
import { Row } from './Row';
|
|
8
|
+
import { Text } from './Text';
|
|
9
|
+
export const untypedConfig = {
|
|
10
|
+
[EntityType.Any]: {
|
|
11
|
+
controls: {
|
|
12
|
+
baseAny: { Component: AnyInput },
|
|
13
|
+
},
|
|
14
|
+
views: {},
|
|
15
|
+
wrappers: {},
|
|
16
|
+
validators: {},
|
|
17
|
+
},
|
|
18
|
+
[EntityType.Array]: {
|
|
19
|
+
controls: { selectArray: { Component: MultiSelect }, baseArray: { Component: ArrayBase } },
|
|
20
|
+
views: {},
|
|
21
|
+
wrappers: { accordeonArray: Accordeon, rowArray: Row },
|
|
22
|
+
validators: { baseArray: (() => false) },
|
|
23
|
+
},
|
|
24
|
+
[EntityType.Boolean]: {
|
|
25
|
+
controls: {},
|
|
26
|
+
views: {},
|
|
27
|
+
wrappers: {},
|
|
28
|
+
validators: { baseBoolean: (() => false) },
|
|
29
|
+
},
|
|
30
|
+
[EntityType.Number]: {
|
|
31
|
+
controls: { baseNumber: { Component: Text } },
|
|
32
|
+
views: {},
|
|
33
|
+
wrappers: { rowNumber: Row },
|
|
34
|
+
validators: {
|
|
35
|
+
baseNumber: () => false,
|
|
36
|
+
asyncNumber: (() => new Promise((resolve) => {
|
|
37
|
+
setTimeout(() => {
|
|
38
|
+
resolve('bocembocembocem');
|
|
39
|
+
}, 2000);
|
|
40
|
+
})),
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
[EntityType.Object]: {
|
|
44
|
+
controls: { baseObject: { Component: ObjectBase, independent: true } },
|
|
45
|
+
views: {},
|
|
46
|
+
wrappers: { accordeonObject: Accordeon },
|
|
47
|
+
validators: { baseObject: (() => false) },
|
|
48
|
+
},
|
|
49
|
+
[EntityType.String]: {
|
|
50
|
+
controls: { baseString: { Component: Text } },
|
|
51
|
+
views: {},
|
|
52
|
+
wrappers: { rowString: Row },
|
|
53
|
+
validators: {
|
|
54
|
+
baseString: (() => 'jajaja'),
|
|
55
|
+
// async: (() =>
|
|
56
|
+
// new Promise((resolve) => {
|
|
57
|
+
// setTimeout(() => {
|
|
58
|
+
// resolve('bocembocembocem');
|
|
59
|
+
// }, 2000);
|
|
60
|
+
// })) as AsyncValidator<JsonSchemaString>,
|
|
61
|
+
cccString: (() => 'ccc'),
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
export const config = untypedConfig;
|