@gravity-ui/dynamic-forms 5.19.1 → 5.20.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/unstable/core/Entity/index.d.ts +1 -0
- package/build/cjs/lib/unstable/core/Entity/index.js +3 -1
- package/build/cjs/lib/unstable/core/index.d.ts +2 -2
- package/build/cjs/lib/unstable/core/index.js +3 -1
- package/build/cjs/lib/unstable/kit/components/ArrayRemoveButton/ArrayRemoveButton.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/components/ArrayRemoveButton/ArrayRemoveButton.js +12 -5
- package/build/cjs/lib/unstable/kit/components/ControlContainer/ControlContainer.css +20 -0
- package/build/cjs/lib/unstable/kit/components/ControlContainer/ControlContainer.d.ts +7 -0
- package/build/cjs/lib/unstable/kit/components/ControlContainer/ControlContainer.js +14 -0
- package/build/cjs/lib/unstable/kit/components/ControlContainer/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/components/ControlContainer/index.js +5 -0
- package/build/cjs/lib/unstable/kit/components/ControlError/ControlError.css +2 -32
- package/build/cjs/lib/unstable/kit/components/ControlError/ControlError.d.ts +0 -2
- package/build/cjs/lib/unstable/kit/components/ControlError/ControlError.js +5 -5
- package/build/cjs/lib/unstable/kit/components/WrapperContainer/WrapperContainer.css +8 -0
- package/build/cjs/lib/unstable/kit/components/WrapperContainer/WrapperContainer.d.ts +6 -0
- package/build/cjs/lib/unstable/kit/components/WrapperContainer/WrapperContainer.js +13 -0
- package/build/cjs/lib/unstable/kit/components/WrapperContainer/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/components/WrapperContainer/index.js +5 -0
- package/build/cjs/lib/unstable/kit/components/index.d.ts +2 -0
- package/build/cjs/lib/unstable/kit/components/index.js +5 -1
- package/build/cjs/lib/unstable/kit/constants/config.d.ts +43 -0
- package/build/cjs/lib/unstable/kit/constants/config.js +45 -6
- package/build/cjs/lib/unstable/kit/controls/Alert/Alert.d.ts +9 -0
- package/build/cjs/lib/unstable/kit/controls/Alert/Alert.js +27 -0
- package/build/cjs/lib/unstable/kit/controls/Alert/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/controls/Alert/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/ArrayBase/ArrayBase.js +20 -17
- package/build/cjs/lib/unstable/kit/controls/ArrayTable/ArrayTable.css +39 -0
- package/build/cjs/lib/unstable/kit/controls/ArrayTable/ArrayTable.d.ts +8 -0
- package/build/cjs/lib/unstable/kit/controls/ArrayTable/ArrayTable.js +88 -0
- package/build/cjs/lib/unstable/kit/controls/ArrayTable/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/controls/ArrayTable/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/Checkbox/Checkbox.css +7 -1
- package/build/cjs/lib/unstable/kit/controls/Checkbox/Checkbox.d.ts +2 -2
- package/build/cjs/lib/unstable/kit/controls/Checkbox/Checkbox.js +8 -4
- package/build/cjs/lib/unstable/kit/controls/CheckboxGroup/CheckboxGroup.css +8 -2
- package/build/cjs/lib/unstable/kit/controls/CheckboxGroup/CheckboxGroup.js +11 -6
- package/build/cjs/lib/unstable/kit/controls/ColorPicker/ColorPicker.css +6 -0
- package/build/cjs/lib/unstable/kit/controls/ColorPicker/ColorPicker.d.ts +2 -2
- package/build/cjs/lib/unstable/kit/controls/ColorPicker/ColorPicker.js +7 -6
- package/build/cjs/lib/unstable/kit/controls/DateInput/DateInput.css +2 -2
- package/build/cjs/lib/unstable/kit/controls/DateInput/DateInput.d.ts +2 -2
- package/build/cjs/lib/unstable/kit/controls/DateInput/DateInput.js +14 -13
- package/build/cjs/lib/unstable/kit/controls/DotValue/DotValue.d.ts +5 -0
- package/build/cjs/lib/unstable/kit/controls/DotValue/DotValue.js +30 -0
- package/build/cjs/lib/unstable/kit/controls/DotValue/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/controls/DotValue/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/FewOfNested/FewOfNested.css +14 -0
- package/build/cjs/lib/unstable/kit/controls/FewOfNested/FewOfNested.d.ts +8 -0
- package/build/cjs/lib/unstable/kit/controls/FewOfNested/FewOfNested.js +63 -0
- package/build/cjs/lib/unstable/kit/controls/FewOfNested/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/controls/FewOfNested/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/FileInput/FileInput.d.ts +7 -0
- package/build/cjs/lib/unstable/kit/controls/FileInput/FileInput.js +53 -0
- package/build/cjs/lib/unstable/kit/controls/FileInput/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/controls/FileInput/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/Label/Label.d.ts +9 -0
- package/build/cjs/lib/unstable/kit/controls/Label/Label.js +28 -0
- package/build/cjs/lib/unstable/kit/controls/Label/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/controls/Label/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/MultiSelect/MultiSelect.d.ts +2 -2
- package/build/cjs/lib/unstable/kit/controls/MultiSelect/MultiSelect.js +5 -2
- package/build/cjs/lib/unstable/kit/controls/NumberBase/NumberBase.css +3 -0
- package/build/{esm/lib/unstable/kit/controls/NumberBase/Number.d.ts → cjs/lib/unstable/kit/controls/NumberBase/NumberBase.d.ts} +1 -1
- package/build/cjs/lib/unstable/kit/controls/NumberBase/NumberBase.js +16 -0
- package/build/cjs/lib/unstable/kit/controls/NumberBase/index.d.ts +1 -1
- package/build/cjs/lib/unstable/kit/controls/NumberBase/index.js +2 -2
- package/build/cjs/lib/unstable/kit/controls/ObjectBase/ObjectBase.d.ts +0 -1
- package/build/cjs/lib/unstable/kit/controls/ObjectBase/ObjectBase.js +6 -24
- package/build/cjs/lib/unstable/kit/controls/ObjectInline/ObjectInline.css +8 -0
- package/build/cjs/lib/unstable/kit/controls/ObjectInline/ObjectInline.d.ts +8 -0
- package/build/cjs/lib/unstable/kit/controls/ObjectInline/ObjectInline.js +25 -0
- package/build/cjs/lib/unstable/kit/controls/ObjectInline/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/controls/ObjectInline/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/OneOfNested/OneOfNested.css +14 -0
- package/build/cjs/lib/unstable/kit/controls/OneOfNested/OneOfNested.d.ts +12 -0
- package/build/cjs/lib/unstable/kit/controls/OneOfNested/OneOfNested.js +64 -0
- package/build/cjs/lib/unstable/kit/controls/OneOfNested/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/controls/OneOfNested/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/Password/Password.css +3 -0
- package/build/cjs/lib/unstable/kit/controls/Password/Password.d.ts +1 -1
- package/build/cjs/lib/unstable/kit/controls/Password/Password.js +6 -2
- package/build/cjs/lib/unstable/kit/controls/RadioGroup/RadioGroup.css +12 -2
- package/build/cjs/lib/unstable/kit/controls/RadioGroup/RadioGroup.d.ts +2 -2
- package/build/cjs/lib/unstable/kit/controls/RadioGroup/RadioGroup.js +4 -4
- package/build/cjs/lib/unstable/kit/controls/RangeSlider/RangeSlider.d.ts +2 -2
- package/build/cjs/lib/unstable/kit/controls/RangeSlider/RangeSlider.js +11 -9
- package/build/cjs/lib/unstable/kit/controls/SegmentedRadioGroup/SegmentedRadioGroup.css +6 -0
- package/build/cjs/lib/unstable/kit/controls/SegmentedRadioGroup/SegmentedRadioGroup.d.ts +8 -0
- package/build/cjs/lib/unstable/kit/controls/SegmentedRadioGroup/SegmentedRadioGroup.js +29 -0
- package/build/cjs/lib/unstable/kit/controls/SegmentedRadioGroup/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/controls/SegmentedRadioGroup/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/Select/Select.d.ts +3 -3
- package/build/cjs/lib/unstable/kit/controls/Select/Select.js +6 -3
- package/build/cjs/lib/unstable/kit/controls/Slider/Slider.d.ts +2 -2
- package/build/cjs/lib/unstable/kit/controls/Slider/Slider.js +7 -5
- package/build/cjs/lib/unstable/kit/controls/StringBase/StringBase.css +3 -0
- package/build/cjs/lib/unstable/kit/controls/StringBase/StringBase.d.ts +1 -1
- package/build/cjs/lib/unstable/kit/controls/StringBase/StringBase.js +4 -1
- package/build/cjs/lib/unstable/kit/controls/Switch/Switch.css +8 -2
- package/build/cjs/lib/unstable/kit/controls/Switch/Switch.d.ts +2 -2
- package/build/cjs/lib/unstable/kit/controls/Switch/Switch.js +8 -4
- package/build/cjs/lib/unstable/kit/controls/TextArea/TextArea.css +3 -0
- package/build/cjs/lib/unstable/kit/controls/TextArea/TextArea.d.ts +2 -2
- package/build/cjs/lib/unstable/kit/controls/TextArea/TextArea.js +4 -1
- package/build/cjs/lib/unstable/kit/controls/TextContent/TextContent.css +10 -0
- package/build/cjs/lib/unstable/kit/controls/TextContent/TextContent.d.ts +9 -0
- package/build/cjs/lib/unstable/kit/controls/TextContent/TextContent.js +29 -0
- package/build/cjs/lib/unstable/kit/controls/TextContent/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/controls/TextContent/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/index.d.ts +10 -0
- package/build/cjs/lib/unstable/kit/controls/index.js +21 -1
- package/build/cjs/lib/unstable/kit/utils/common.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/utils/common.js +5 -1
- package/build/cjs/lib/unstable/kit/utils/index.d.ts +1 -1
- package/build/cjs/lib/unstable/kit/utils/index.js +2 -1
- package/build/cjs/lib/unstable/kit/wrappers/Accordeon/Accordeon.css +35 -0
- package/build/cjs/lib/unstable/kit/wrappers/Accordeon/Accordeon.d.ts +10 -0
- package/build/cjs/lib/unstable/kit/wrappers/Accordeon/Accordeon.js +39 -0
- package/build/cjs/lib/unstable/kit/wrappers/Accordeon/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/wrappers/Accordeon/index.js +5 -0
- package/build/cjs/lib/unstable/kit/wrappers/Row/Row.css +3 -6
- package/build/cjs/lib/unstable/kit/wrappers/Row/Row.js +7 -6
- package/build/cjs/lib/unstable/kit/wrappers/Section/Section.css +23 -0
- package/build/cjs/lib/unstable/kit/wrappers/Section/Section.d.ts +8 -0
- package/build/cjs/lib/unstable/kit/wrappers/Section/Section.js +36 -0
- package/build/cjs/lib/unstable/kit/wrappers/Section/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/wrappers/Section/index.js +5 -0
- package/build/cjs/lib/unstable/kit/wrappers/Transparent/Transparent.js +6 -4
- package/build/cjs/lib/unstable/kit/wrappers/index.d.ts +2 -0
- package/build/cjs/lib/unstable/kit/wrappers/index.js +5 -1
- package/build/esm/lib/unstable/core/Entity/index.d.ts +1 -0
- package/build/esm/lib/unstable/core/Entity/index.js +1 -0
- package/build/esm/lib/unstable/core/index.d.ts +2 -2
- package/build/esm/lib/unstable/core/index.js +2 -2
- package/build/esm/lib/unstable/kit/components/ArrayRemoveButton/ArrayRemoveButton.d.ts +1 -0
- package/build/esm/lib/unstable/kit/components/ArrayRemoveButton/ArrayRemoveButton.js +12 -5
- package/build/esm/lib/unstable/kit/components/ControlContainer/ControlContainer.css +20 -0
- package/build/esm/lib/unstable/kit/components/ControlContainer/ControlContainer.d.ts +8 -0
- package/build/esm/lib/unstable/kit/components/ControlContainer/ControlContainer.js +12 -0
- package/build/esm/lib/unstable/kit/components/ControlContainer/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/components/ControlContainer/index.js +1 -0
- package/build/esm/lib/unstable/kit/components/ControlError/ControlError.css +2 -32
- package/build/esm/lib/unstable/kit/components/ControlError/ControlError.d.ts +0 -2
- package/build/esm/lib/unstable/kit/components/ControlError/ControlError.js +6 -6
- package/build/esm/lib/unstable/kit/components/WrapperContainer/WrapperContainer.css +8 -0
- package/build/esm/lib/unstable/kit/components/WrapperContainer/WrapperContainer.d.ts +7 -0
- package/build/esm/lib/unstable/kit/components/WrapperContainer/WrapperContainer.js +11 -0
- package/build/esm/lib/unstable/kit/components/WrapperContainer/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/components/WrapperContainer/index.js +1 -0
- package/build/esm/lib/unstable/kit/components/index.d.ts +2 -0
- package/build/esm/lib/unstable/kit/components/index.js +2 -0
- package/build/esm/lib/unstable/kit/constants/config.d.ts +43 -0
- package/build/esm/lib/unstable/kit/constants/config.js +47 -8
- package/build/esm/lib/unstable/kit/controls/Alert/Alert.d.ts +9 -0
- package/build/esm/lib/unstable/kit/controls/Alert/Alert.js +24 -0
- package/build/esm/lib/unstable/kit/controls/Alert/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/Alert/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/ArrayBase/ArrayBase.js +21 -18
- package/build/esm/lib/unstable/kit/controls/ArrayTable/ArrayTable.css +39 -0
- package/build/esm/lib/unstable/kit/controls/ArrayTable/ArrayTable.d.ts +9 -0
- package/build/esm/lib/unstable/kit/controls/ArrayTable/ArrayTable.js +85 -0
- package/build/esm/lib/unstable/kit/controls/ArrayTable/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/ArrayTable/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/Checkbox/Checkbox.css +7 -1
- package/build/esm/lib/unstable/kit/controls/Checkbox/Checkbox.d.ts +2 -2
- package/build/esm/lib/unstable/kit/controls/Checkbox/Checkbox.js +11 -7
- package/build/esm/lib/unstable/kit/controls/CheckboxGroup/CheckboxGroup.css +8 -2
- package/build/esm/lib/unstable/kit/controls/CheckboxGroup/CheckboxGroup.js +13 -8
- package/build/esm/lib/unstable/kit/controls/ColorPicker/ColorPicker.css +6 -0
- package/build/esm/lib/unstable/kit/controls/ColorPicker/ColorPicker.d.ts +3 -2
- package/build/esm/lib/unstable/kit/controls/ColorPicker/ColorPicker.js +11 -9
- package/build/esm/lib/unstable/kit/controls/DateInput/DateInput.css +2 -2
- package/build/esm/lib/unstable/kit/controls/DateInput/DateInput.d.ts +2 -2
- package/build/esm/lib/unstable/kit/controls/DateInput/DateInput.js +16 -15
- package/build/esm/lib/unstable/kit/controls/DotValue/DotValue.d.ts +5 -0
- package/build/esm/lib/unstable/kit/controls/DotValue/DotValue.js +26 -0
- package/build/esm/lib/unstable/kit/controls/DotValue/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/DotValue/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/FewOfNested/FewOfNested.css +14 -0
- package/build/esm/lib/unstable/kit/controls/FewOfNested/FewOfNested.d.ts +9 -0
- package/build/esm/lib/unstable/kit/controls/FewOfNested/FewOfNested.js +60 -0
- package/build/esm/lib/unstable/kit/controls/FewOfNested/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/FewOfNested/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/FileInput/FileInput.d.ts +7 -0
- package/build/esm/lib/unstable/kit/controls/FileInput/FileInput.js +50 -0
- package/build/esm/lib/unstable/kit/controls/FileInput/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/FileInput/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/Label/Label.d.ts +9 -0
- package/build/esm/lib/unstable/kit/controls/Label/Label.js +25 -0
- package/build/esm/lib/unstable/kit/controls/Label/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/Label/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/MultiSelect/MultiSelect.d.ts +2 -2
- package/build/esm/lib/unstable/kit/controls/MultiSelect/MultiSelect.js +6 -3
- package/build/esm/lib/unstable/kit/controls/NumberBase/NumberBase.css +3 -0
- package/build/{cjs/lib/unstable/kit/controls/NumberBase/Number.d.ts → esm/lib/unstable/kit/controls/NumberBase/NumberBase.d.ts} +2 -1
- package/build/esm/lib/unstable/kit/controls/NumberBase/NumberBase.js +13 -0
- package/build/esm/lib/unstable/kit/controls/NumberBase/index.d.ts +1 -1
- package/build/esm/lib/unstable/kit/controls/NumberBase/index.js +1 -1
- package/build/esm/lib/unstable/kit/controls/ObjectBase/ObjectBase.d.ts +0 -1
- package/build/esm/lib/unstable/kit/controls/ObjectBase/ObjectBase.js +7 -25
- package/build/esm/lib/unstable/kit/controls/ObjectInline/ObjectInline.css +8 -0
- package/build/esm/lib/unstable/kit/controls/ObjectInline/ObjectInline.d.ts +9 -0
- package/build/esm/lib/unstable/kit/controls/ObjectInline/ObjectInline.js +22 -0
- package/build/esm/lib/unstable/kit/controls/ObjectInline/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/ObjectInline/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/OneOfNested/OneOfNested.css +14 -0
- package/build/esm/lib/unstable/kit/controls/OneOfNested/OneOfNested.d.ts +13 -0
- package/build/esm/lib/unstable/kit/controls/OneOfNested/OneOfNested.js +61 -0
- package/build/esm/lib/unstable/kit/controls/OneOfNested/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/OneOfNested/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/Password/Password.css +3 -0
- package/build/esm/lib/unstable/kit/controls/Password/Password.d.ts +2 -1
- package/build/esm/lib/unstable/kit/controls/Password/Password.js +8 -3
- package/build/esm/lib/unstable/kit/controls/RadioGroup/RadioGroup.css +12 -2
- package/build/esm/lib/unstable/kit/controls/RadioGroup/RadioGroup.d.ts +2 -2
- package/build/esm/lib/unstable/kit/controls/RadioGroup/RadioGroup.js +7 -7
- package/build/esm/lib/unstable/kit/controls/RangeSlider/RangeSlider.d.ts +2 -3
- package/build/esm/lib/unstable/kit/controls/RangeSlider/RangeSlider.js +13 -12
- package/build/esm/lib/unstable/kit/controls/SegmentedRadioGroup/SegmentedRadioGroup.css +6 -0
- package/build/esm/lib/unstable/kit/controls/SegmentedRadioGroup/SegmentedRadioGroup.d.ts +9 -0
- package/build/esm/lib/unstable/kit/controls/SegmentedRadioGroup/SegmentedRadioGroup.js +27 -0
- package/build/esm/lib/unstable/kit/controls/SegmentedRadioGroup/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/SegmentedRadioGroup/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/Select/Select.d.ts +3 -3
- package/build/esm/lib/unstable/kit/controls/Select/Select.js +7 -4
- package/build/esm/lib/unstable/kit/controls/Slider/Slider.d.ts +2 -3
- package/build/esm/lib/unstable/kit/controls/Slider/Slider.js +9 -8
- package/build/esm/lib/unstable/kit/controls/StringBase/StringBase.css +3 -0
- package/build/esm/lib/unstable/kit/controls/StringBase/StringBase.d.ts +2 -1
- package/build/esm/lib/unstable/kit/controls/StringBase/StringBase.js +6 -2
- package/build/esm/lib/unstable/kit/controls/Switch/Switch.css +8 -2
- package/build/esm/lib/unstable/kit/controls/Switch/Switch.d.ts +2 -2
- package/build/esm/lib/unstable/kit/controls/Switch/Switch.js +11 -7
- package/build/esm/lib/unstable/kit/controls/TextArea/TextArea.css +3 -0
- package/build/esm/lib/unstable/kit/controls/TextArea/TextArea.d.ts +3 -2
- package/build/esm/lib/unstable/kit/controls/TextArea/TextArea.js +7 -3
- package/build/esm/lib/unstable/kit/controls/TextContent/TextContent.css +10 -0
- package/build/esm/lib/unstable/kit/controls/TextContent/TextContent.d.ts +10 -0
- package/build/esm/lib/unstable/kit/controls/TextContent/TextContent.js +27 -0
- package/build/esm/lib/unstable/kit/controls/TextContent/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/TextContent/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/index.d.ts +10 -0
- package/build/esm/lib/unstable/kit/controls/index.js +10 -0
- package/build/esm/lib/unstable/kit/utils/common.d.ts +1 -0
- package/build/esm/lib/unstable/kit/utils/common.js +3 -0
- package/build/esm/lib/unstable/kit/utils/index.d.ts +1 -1
- package/build/esm/lib/unstable/kit/utils/index.js +1 -1
- package/build/esm/lib/unstable/kit/wrappers/Accordeon/Accordeon.css +35 -0
- package/build/esm/lib/unstable/kit/wrappers/Accordeon/Accordeon.d.ts +11 -0
- package/build/esm/lib/unstable/kit/wrappers/Accordeon/Accordeon.js +37 -0
- package/build/esm/lib/unstable/kit/wrappers/Accordeon/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/wrappers/Accordeon/index.js +1 -0
- package/build/esm/lib/unstable/kit/wrappers/Row/Row.css +3 -6
- package/build/esm/lib/unstable/kit/wrappers/Row/Row.js +9 -8
- package/build/esm/lib/unstable/kit/wrappers/Section/Section.css +23 -0
- package/build/esm/lib/unstable/kit/wrappers/Section/Section.d.ts +9 -0
- package/build/esm/lib/unstable/kit/wrappers/Section/Section.js +34 -0
- package/build/esm/lib/unstable/kit/wrappers/Section/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/wrappers/Section/index.js +1 -0
- package/build/esm/lib/unstable/kit/wrappers/Transparent/Transparent.js +8 -6
- package/build/esm/lib/unstable/kit/wrappers/index.d.ts +2 -0
- package/build/esm/lib/unstable/kit/wrappers/index.js +2 -0
- package/package.json +1 -1
- package/build/cjs/lib/unstable/kit/Accordeon.d.ts +0 -3
- package/build/cjs/lib/unstable/kit/Accordeon.js +0 -31
- package/build/cjs/lib/unstable/kit/Any.d.ts +0 -2
- package/build/cjs/lib/unstable/kit/Any.js +0 -21
- package/build/cjs/lib/unstable/kit/ArrayBase.css +0 -23
- package/build/cjs/lib/unstable/kit/ArrayBase.d.ts +0 -2
- package/build/cjs/lib/unstable/kit/ArrayBase.js +0 -101
- package/build/cjs/lib/unstable/kit/MultiSelect.css +0 -6
- package/build/cjs/lib/unstable/kit/MultiSelect.d.ts +0 -6
- package/build/cjs/lib/unstable/kit/MultiSelect.js +0 -66
- package/build/cjs/lib/unstable/kit/ObjectBase.css +0 -10
- package/build/cjs/lib/unstable/kit/ObjectBase.d.ts +0 -7
- package/build/cjs/lib/unstable/kit/ObjectBase.js +0 -71
- package/build/cjs/lib/unstable/kit/Row.css +0 -73
- package/build/cjs/lib/unstable/kit/Row.d.ts +0 -10
- package/build/cjs/lib/unstable/kit/Row.js +0 -50
- package/build/cjs/lib/unstable/kit/Text.d.ts +0 -6
- package/build/cjs/lib/unstable/kit/Text.js +0 -259
- package/build/cjs/lib/unstable/kit/config.d.ts +0 -95
- package/build/cjs/lib/unstable/kit/config.js +0 -68
- package/build/cjs/lib/unstable/kit/controls/NumberBase/Number.js +0 -12
- package/build/cjs/lib/unstable/kit/controls/RangeSlider/RangeSlider.css +0 -3
- package/build/cjs/lib/unstable/kit/controls/Slider/Slider.css +0 -3
- package/build/esm/lib/unstable/kit/Accordeon.d.ts +0 -3
- package/build/esm/lib/unstable/kit/Accordeon.js +0 -26
- package/build/esm/lib/unstable/kit/Any.d.ts +0 -2
- package/build/esm/lib/unstable/kit/Any.js +0 -16
- package/build/esm/lib/unstable/kit/ArrayBase.css +0 -23
- package/build/esm/lib/unstable/kit/ArrayBase.d.ts +0 -3
- package/build/esm/lib/unstable/kit/ArrayBase.js +0 -97
- package/build/esm/lib/unstable/kit/MultiSelect.css +0 -6
- package/build/esm/lib/unstable/kit/MultiSelect.d.ts +0 -7
- package/build/esm/lib/unstable/kit/MultiSelect.js +0 -62
- package/build/esm/lib/unstable/kit/ObjectBase.css +0 -10
- package/build/esm/lib/unstable/kit/ObjectBase.d.ts +0 -8
- package/build/esm/lib/unstable/kit/ObjectBase.js +0 -66
- package/build/esm/lib/unstable/kit/Row.css +0 -73
- package/build/esm/lib/unstable/kit/Row.d.ts +0 -11
- package/build/esm/lib/unstable/kit/Row.js +0 -47
- package/build/esm/lib/unstable/kit/Text.d.ts +0 -6
- package/build/esm/lib/unstable/kit/Text.js +0 -255
- package/build/esm/lib/unstable/kit/config.d.ts +0 -95
- package/build/esm/lib/unstable/kit/config.js +0 -65
- package/build/esm/lib/unstable/kit/controls/NumberBase/Number.js +0 -8
- package/build/esm/lib/unstable/kit/controls/RangeSlider/RangeSlider.css +0 -3
- package/build/esm/lib/unstable/kit/controls/Slider/Slider.css +0 -3
|
@@ -1,259 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Text = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const uikit_1 = require("@gravity-ui/uikit");
|
|
7
|
-
const isNil_1 = tslib_1.__importDefault(require("lodash/isNil"));
|
|
8
|
-
const core_1 = require("../core");
|
|
9
|
-
const Component = ({ input, meta, schema, }) => {
|
|
10
|
-
var _a, _b;
|
|
11
|
-
// const {setErrors, removeErrors} = useSetErrors();
|
|
12
|
-
const { setSchemaMutators, removeSchemaMutators } = (0, core_1.useSchemaRendererMutators)(); // setExternalErrors
|
|
13
|
-
const props = {
|
|
14
|
-
hasClear: true,
|
|
15
|
-
// ...inputProps,
|
|
16
|
-
value: (0, isNil_1.default)(input.value) ? '' : `${input.value}`,
|
|
17
|
-
onBlur: input.onBlur,
|
|
18
|
-
onFocus: input.onFocus,
|
|
19
|
-
onUpdate: input.onChange,
|
|
20
|
-
// disabled: spec.viewSpec.disabled,
|
|
21
|
-
disabled: schema.readOnly,
|
|
22
|
-
// placeholder: spec.viewSpec.placeholder,
|
|
23
|
-
placeholder: `${(_a = schema.examples) === null || _a === void 0 ? void 0 : _a[0]}`,
|
|
24
|
-
qa: input.name,
|
|
25
|
-
error: meta.error,
|
|
26
|
-
// errorMessage: meta.error,
|
|
27
|
-
};
|
|
28
|
-
react_1.default.useEffect(() => {
|
|
29
|
-
if (input.name === 'qwe.test.jajaja.stringMaxLength' ||
|
|
30
|
-
input.name === 'qwe.test.bocembocembocem.stringMaxLength') {
|
|
31
|
-
// if (input.value === '1') {
|
|
32
|
-
// setExternalErrors?.({
|
|
33
|
-
// headName: 'qwe.test.jajaja',
|
|
34
|
-
// priorityErrors: {
|
|
35
|
-
// [input.name]: 'bbbbbbbbbbb priority',
|
|
36
|
-
// 'qwe.test.jajaja': {
|
|
37
|
-
// numberMaximum: 'bbbbbbbbbbb priority',
|
|
38
|
-
// objectPropertyNames: {
|
|
39
|
-
// stringEnum: 'bbbbbbbbbbb priority',
|
|
40
|
-
// },
|
|
41
|
-
// },
|
|
42
|
-
// 'qwe.test.jajaja.objectPropertyNames': 'bbbbbbbbbbb priority',
|
|
43
|
-
// },
|
|
44
|
-
// });
|
|
45
|
-
// setSchemaMutators?.({
|
|
46
|
-
// headName: 'qwe.test.jajaja',
|
|
47
|
-
// // mutators: {
|
|
48
|
-
// // [input.name]: {
|
|
49
|
-
// // title: 'Aaaaaaaa',
|
|
50
|
-
// // },
|
|
51
|
-
// // 'qwe.test.jajaja.stringPattern': {
|
|
52
|
-
// // title: 'OOOOOOO',
|
|
53
|
-
// // },
|
|
54
|
-
// // 'qwe.test.jajaja.numberMinimum': {
|
|
55
|
-
// // minimum: 0,
|
|
56
|
-
// // },
|
|
57
|
-
// // },
|
|
58
|
-
// mutators: [
|
|
59
|
-
// {
|
|
60
|
-
// name: input.name,
|
|
61
|
-
// schema: {
|
|
62
|
-
// title: 'QWEQWEQWEQWE',
|
|
63
|
-
// },
|
|
64
|
-
// },
|
|
65
|
-
// {
|
|
66
|
-
// name: 'qwe.test.jajaja.stringPattern',
|
|
67
|
-
// schema: {
|
|
68
|
-
// title: 'QWEQWEQWEQWE',
|
|
69
|
-
// },
|
|
70
|
-
// },
|
|
71
|
-
// {
|
|
72
|
-
// name: 'qwe.test.jajaja.numberMaximum',
|
|
73
|
-
// schema: {
|
|
74
|
-
// maximum: 10,
|
|
75
|
-
// },
|
|
76
|
-
// },
|
|
77
|
-
// ],
|
|
78
|
-
// });
|
|
79
|
-
// } else if (input.value === '2') {
|
|
80
|
-
// setExternalErrors?.({
|
|
81
|
-
// headName: 'qwe.test.jajaja',
|
|
82
|
-
// priorityErrors: {
|
|
83
|
-
// [input.name]: 'priorityError',
|
|
84
|
-
// 'qwe.test.jajaja': {
|
|
85
|
-
// numberMaximum: 'priorityError',
|
|
86
|
-
// objectPropertyNames: {
|
|
87
|
-
// stringEnum: 'priorityError',
|
|
88
|
-
// },
|
|
89
|
-
// },
|
|
90
|
-
// 'qwe.test.jajaja.objectPropertyNames': 'priorityError',
|
|
91
|
-
// },
|
|
92
|
-
// });
|
|
93
|
-
// setSchemaMutators?.({
|
|
94
|
-
// headName: 'qwe.test.jajaja',
|
|
95
|
-
// // mutators: {
|
|
96
|
-
// // [input.name]: {
|
|
97
|
-
// // title: 'Aaaaaaaa',
|
|
98
|
-
// // },
|
|
99
|
-
// // 'qwe.test.jajaja.stringPattern': {
|
|
100
|
-
// // title: 'OOOOOOO',
|
|
101
|
-
// // },
|
|
102
|
-
// // 'qwe.test.jajaja.numberMinimum': {
|
|
103
|
-
// // minimum: 0,
|
|
104
|
-
// // },
|
|
105
|
-
// // },
|
|
106
|
-
// mutators: [
|
|
107
|
-
// {
|
|
108
|
-
// name: input.name,
|
|
109
|
-
// schema: {
|
|
110
|
-
// title: 'Aaaaaaaa',
|
|
111
|
-
// },
|
|
112
|
-
// },
|
|
113
|
-
// {
|
|
114
|
-
// name: 'qwe.test.jajaja.stringPattern',
|
|
115
|
-
// schema: {
|
|
116
|
-
// title: 'OOOOOOO',
|
|
117
|
-
// },
|
|
118
|
-
// },
|
|
119
|
-
// {
|
|
120
|
-
// name: 'qwe.test.jajaja.numberMinimum',
|
|
121
|
-
// schema: {
|
|
122
|
-
// minimum: 0,
|
|
123
|
-
// },
|
|
124
|
-
// },
|
|
125
|
-
// ],
|
|
126
|
-
// });
|
|
127
|
-
// } else if (input.value === '3') {
|
|
128
|
-
// setExternalErrors?.({
|
|
129
|
-
// headName: 'qwe.test.jajaja',
|
|
130
|
-
// priorityErrors: {
|
|
131
|
-
// [input.name]: 'EXTERNAL_ERROR',
|
|
132
|
-
// },
|
|
133
|
-
// });
|
|
134
|
-
// removeSchemaMutators?.({
|
|
135
|
-
// headName: 'qwe.test.jajaja',
|
|
136
|
-
// // mutatorsToRemove: {
|
|
137
|
-
// // 'qwe.test.jajaja.numberMinimum': {
|
|
138
|
-
// // minimum: 0,
|
|
139
|
-
// // },
|
|
140
|
-
// // 'qwe.test.jajaja.stringPattern': true,
|
|
141
|
-
// // },
|
|
142
|
-
// mutatorsToRemove: [
|
|
143
|
-
// {
|
|
144
|
-
// name: input.name,
|
|
145
|
-
// schema: true,
|
|
146
|
-
// },
|
|
147
|
-
// {
|
|
148
|
-
// name: 'qwe.test.jajaja.numberMinimum',
|
|
149
|
-
// schema: {
|
|
150
|
-
// minimum: 0,
|
|
151
|
-
// },
|
|
152
|
-
// },
|
|
153
|
-
// {
|
|
154
|
-
// name: 'qwe.test.jajaja.stringPattern',
|
|
155
|
-
// schema: {
|
|
156
|
-
// title: 'OOOOOOO',
|
|
157
|
-
// },
|
|
158
|
-
// },
|
|
159
|
-
// ],
|
|
160
|
-
// });
|
|
161
|
-
// // removeExternalErrors?.({
|
|
162
|
-
// // headName: 'qwe.test.jajaja',
|
|
163
|
-
// // removeFunctionOrNames: [input.name],
|
|
164
|
-
// // });
|
|
165
|
-
// // removeExternalErrors?.({
|
|
166
|
-
// // headName: 'qwe.test.jajaja',
|
|
167
|
-
// // removeFunctionOrNames: (params) => ({
|
|
168
|
-
// // ...params,
|
|
169
|
-
// // priorityErrors: omit(params.priorityErrors, input.name),
|
|
170
|
-
// // }),
|
|
171
|
-
// // });
|
|
172
|
-
// }
|
|
173
|
-
if (input.value === '1') {
|
|
174
|
-
removeSchemaMutators === null || removeSchemaMutators === void 0 ? void 0 : removeSchemaMutators({
|
|
175
|
-
mutatorsToRemove: [
|
|
176
|
-
{
|
|
177
|
-
name: 'qwe.test.jajaja.stringPattern',
|
|
178
|
-
schema: true,
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
name: 'qwe.test.jajaja',
|
|
182
|
-
schema: {
|
|
183
|
-
definitions: {
|
|
184
|
-
jajaja: {
|
|
185
|
-
title: `jajaja`,
|
|
186
|
-
},
|
|
187
|
-
},
|
|
188
|
-
},
|
|
189
|
-
},
|
|
190
|
-
],
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
setSchemaMutators === null || setSchemaMutators === void 0 ? void 0 : setSchemaMutators({
|
|
195
|
-
// mutators: {
|
|
196
|
-
// [input.name]: {
|
|
197
|
-
// title: 'Aaaaaaaa',
|
|
198
|
-
// },
|
|
199
|
-
// 'qwe.test.jajaja.stringPattern': {
|
|
200
|
-
// title: 'OOOOOOO',
|
|
201
|
-
// },
|
|
202
|
-
// 'qwe.test.jajaja.numberMinimum': {
|
|
203
|
-
// minimum: 0,
|
|
204
|
-
// },
|
|
205
|
-
// },
|
|
206
|
-
mutators: [
|
|
207
|
-
{
|
|
208
|
-
name: input.name,
|
|
209
|
-
schema: {
|
|
210
|
-
title: `${input.value}`,
|
|
211
|
-
maxLength: `${input.value}`.length - 1,
|
|
212
|
-
entityParameters: {
|
|
213
|
-
validatorType: '',
|
|
214
|
-
errorMessages: {
|
|
215
|
-
maxLength: `${input.value}`.length - 1 + ' maxLength',
|
|
216
|
-
},
|
|
217
|
-
},
|
|
218
|
-
},
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
name: 'qwe.test.jajaja.stringPattern',
|
|
222
|
-
schema: {
|
|
223
|
-
title: `${input.value}`,
|
|
224
|
-
entityParameters: {
|
|
225
|
-
validatorType: '',
|
|
226
|
-
errorMessages: {
|
|
227
|
-
pattern: `${input.value}`.length - 1 + ' pattern',
|
|
228
|
-
},
|
|
229
|
-
},
|
|
230
|
-
},
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
name: 'qwe.test.jajaja',
|
|
234
|
-
schema: {
|
|
235
|
-
definitions: {
|
|
236
|
-
jajaja: {
|
|
237
|
-
title: `${input.value}`,
|
|
238
|
-
},
|
|
239
|
-
},
|
|
240
|
-
},
|
|
241
|
-
},
|
|
242
|
-
],
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
// setExternalErrors?.({
|
|
246
|
-
// headName: 'qwe.test.jajaja',
|
|
247
|
-
// priorityErrors: {
|
|
248
|
-
// 'qwe.test.jajaja.stringEnum': `${input.value}`,
|
|
249
|
-
// },
|
|
250
|
-
// });
|
|
251
|
-
}
|
|
252
|
-
}, [input.value]);
|
|
253
|
-
// if (spec.viewSpec.type === 'password') {
|
|
254
|
-
if (((_b = schema.entityParameters) === null || _b === void 0 ? void 0 : _b.viewType) === 'password') {
|
|
255
|
-
return react_1.default.createElement(uikit_1.PasswordInput, Object.assign({}, props, { autoComplete: "new-password" }));
|
|
256
|
-
}
|
|
257
|
-
return react_1.default.createElement(uikit_1.TextInput, Object.assign({}, props, { type: "text" }));
|
|
258
|
-
};
|
|
259
|
-
exports.Text = react_1.default.memo(Component);
|
|
@@ -1,95 +0,0 @@
|
|
|
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;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.config = exports.untypedConfig = void 0;
|
|
4
|
-
const constants_1 = require("../core/constants");
|
|
5
|
-
const Accordeon_1 = require("./Accordeon");
|
|
6
|
-
const Any_1 = require("./Any");
|
|
7
|
-
const ArrayBase_1 = require("./ArrayBase");
|
|
8
|
-
const MultiSelect_1 = require("./MultiSelect");
|
|
9
|
-
const ObjectBase_1 = require("./ObjectBase");
|
|
10
|
-
const Row_1 = require("./Row");
|
|
11
|
-
const Text_1 = require("./Text");
|
|
12
|
-
exports.untypedConfig = {
|
|
13
|
-
[constants_1.EntityType.Any]: {
|
|
14
|
-
controls: {
|
|
15
|
-
baseAny: { Component: Any_1.AnyInput },
|
|
16
|
-
},
|
|
17
|
-
views: {},
|
|
18
|
-
wrappers: {},
|
|
19
|
-
validators: {},
|
|
20
|
-
},
|
|
21
|
-
[constants_1.EntityType.Array]: {
|
|
22
|
-
controls: { selectArray: { Component: MultiSelect_1.MultiSelect }, baseArray: { Component: ArrayBase_1.ArrayBase } },
|
|
23
|
-
views: {},
|
|
24
|
-
wrappers: { accordeonArray: Accordeon_1.Accordeon, rowArray: Row_1.Row },
|
|
25
|
-
validators: { baseArray: (() => false) },
|
|
26
|
-
},
|
|
27
|
-
[constants_1.EntityType.Boolean]: {
|
|
28
|
-
controls: {},
|
|
29
|
-
views: {},
|
|
30
|
-
wrappers: {},
|
|
31
|
-
validators: { baseBoolean: (() => false) },
|
|
32
|
-
},
|
|
33
|
-
[constants_1.EntityType.Number]: {
|
|
34
|
-
controls: { baseNumber: { Component: Text_1.Text } },
|
|
35
|
-
views: {},
|
|
36
|
-
wrappers: { rowNumber: Row_1.Row },
|
|
37
|
-
validators: {
|
|
38
|
-
baseNumber: () => false,
|
|
39
|
-
asyncNumber: (() => new Promise((resolve) => {
|
|
40
|
-
setTimeout(() => {
|
|
41
|
-
resolve('bocembocembocem');
|
|
42
|
-
}, 2000);
|
|
43
|
-
})),
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
[constants_1.EntityType.Object]: {
|
|
47
|
-
controls: { baseObject: { Component: ObjectBase_1.ObjectBase, independent: true } },
|
|
48
|
-
views: {},
|
|
49
|
-
wrappers: { accordeonObject: Accordeon_1.Accordeon },
|
|
50
|
-
validators: { baseObject: (() => false) },
|
|
51
|
-
},
|
|
52
|
-
[constants_1.EntityType.String]: {
|
|
53
|
-
controls: { baseString: { Component: Text_1.Text } },
|
|
54
|
-
views: {},
|
|
55
|
-
wrappers: { rowString: Row_1.Row },
|
|
56
|
-
validators: {
|
|
57
|
-
baseString: (() => 'jajaja'),
|
|
58
|
-
// async: (() =>
|
|
59
|
-
// new Promise((resolve) => {
|
|
60
|
-
// setTimeout(() => {
|
|
61
|
-
// resolve('bocembocembocem');
|
|
62
|
-
// }, 2000);
|
|
63
|
-
// })) as AsyncValidator<JsonSchemaString>,
|
|
64
|
-
cccString: (() => 'ccc'),
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
exports.config = exports.untypedConfig;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NumberBase = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const uikit_1 = require("@gravity-ui/uikit");
|
|
7
|
-
const utils_1 = require("../../utils");
|
|
8
|
-
const Component = ({ controlProps, input, meta, schema, }) => {
|
|
9
|
-
var _a;
|
|
10
|
-
return (react_1.default.createElement(uikit_1.NumberInput, Object.assign({ allowDecimal: true, hiddenControls: true, hasClear: true, disabled: schema.readOnly }, controlProps, { value: input.value, defaultValue: schema.default, onBlur: input.onBlur, onFocus: input.onFocus, onUpdate: input.onChange, errorMessage: meta.error, validationState: (0, utils_1.getValidationState)(meta), placeholder: `${((_a = schema.examples) === null || _a === void 0 ? void 0 : _a[0]) || ''}`, qa: input.name })));
|
|
11
|
-
};
|
|
12
|
-
exports.NumberBase = react_1.default.memo(Component);
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// import {ArrayLayoutProps, ObjectLayoutProps, isArrayItem} from '../../../../core';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ErrorWrapper } from '../../kit/components';
|
|
4
|
-
// import {useErrorChecker} from '../../../hooks';
|
|
5
|
-
// import {RemoveButton} from '../../kit/components/RemoveButton';
|
|
6
|
-
import { SimpleVerticalAccordeon } from '../../kit/components/SimpleVerticalAccordeon';
|
|
7
|
-
export const Accordeon = ({ schema, input, meta, children, wrapperProps, }) => {
|
|
8
|
-
const [open, setOpen] = React.useState(Boolean(wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.open));
|
|
9
|
-
// const onDrop = React.useCallback(() => {
|
|
10
|
-
// setOpen(false);
|
|
11
|
-
// input.onDrop();
|
|
12
|
-
// }, [input.onDrop, setOpen]);
|
|
13
|
-
// const removeButton = React.useMemo(() => {
|
|
14
|
-
// if (!isArrayItem(name) && (spec.required || !input.value)) {
|
|
15
|
-
// return null;
|
|
16
|
-
// }
|
|
17
|
-
// return <RemoveButton name={name} onDrop={onDrop} />;
|
|
18
|
-
// }, [spec.required, input.value, onDrop, name]);
|
|
19
|
-
// useErrorChecker({name, meta, open, setOpen});
|
|
20
|
-
return (React.createElement(SimpleVerticalAccordeon, { name: input.name, title: schema.title || '', note: schema.description || '', open: open, onOpenChange: setOpen,
|
|
21
|
-
// headerActionsTemplate={removeButton}
|
|
22
|
-
hideInsteadOfDestroy: true, withBranchView: true },
|
|
23
|
-
React.createElement(ErrorWrapper, { name: input.name, meta: meta,
|
|
24
|
-
// ff
|
|
25
|
-
withoutChildErrorStyles: true }, children)));
|
|
26
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Button } from '@gravity-ui/uikit';
|
|
3
|
-
import { Entity } from '../core';
|
|
4
|
-
export const AnyInput = ({ input, schema }) => {
|
|
5
|
-
var _a;
|
|
6
|
-
const [state, setState] = React.useState(true);
|
|
7
|
-
// React.useEffect(() => {
|
|
8
|
-
// input.onChange(undefined);
|
|
9
|
-
// }, []);
|
|
10
|
-
return (React.createElement(React.Fragment, null,
|
|
11
|
-
React.createElement(Entity, { name: `${input.name}.bla`, schema: (_a = schema.oneOf) === null || _a === void 0 ? void 0 : _a[state ? 0 : 1] }),
|
|
12
|
-
React.createElement(Button, { onClick: () => {
|
|
13
|
-
input.onChange(undefined);
|
|
14
|
-
setState(!state);
|
|
15
|
-
} }, "Toggle")));
|
|
16
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
.array-base_add-button-right {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: flex-end;
|
|
4
|
-
}
|
|
5
|
-
.array-base_add-button-right .transparent {
|
|
6
|
-
align-items: flex-end;
|
|
7
|
-
}
|
|
8
|
-
.array-base__items-wrapper_add-button-down {
|
|
9
|
-
margin-bottom: 15px;
|
|
10
|
-
}
|
|
11
|
-
.array-base__items-wrapper_items-primitive {
|
|
12
|
-
min-width: 100%;
|
|
13
|
-
}
|
|
14
|
-
.array-base__items-wrapper_items-primitive:empty {
|
|
15
|
-
min-width: unset;
|
|
16
|
-
}
|
|
17
|
-
.array-base__item-prefix {
|
|
18
|
-
margin-top: -7px;
|
|
19
|
-
margin-bottom: 8px;
|
|
20
|
-
}
|
|
21
|
-
.array-base__add-button_right {
|
|
22
|
-
margin-left: 4px;
|
|
23
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Plus } from '@gravity-ui/icons';
|
|
3
|
-
import { Button, Icon, Text } from '@gravity-ui/uikit';
|
|
4
|
-
// import {
|
|
5
|
-
// ArrayInput,
|
|
6
|
-
// ArrayValue,
|
|
7
|
-
// Controller,
|
|
8
|
-
// FieldArrayValue,
|
|
9
|
-
// FieldValue,
|
|
10
|
-
// OBJECT_ARRAY_CNT,
|
|
11
|
-
// OBJECT_ARRAY_FLAG,
|
|
12
|
-
// Spec,
|
|
13
|
-
// ValidateError,
|
|
14
|
-
// isBooleanSpec,
|
|
15
|
-
// isCorrectSpec,
|
|
16
|
-
// isNumberSpec,
|
|
17
|
-
// isStringSpec,
|
|
18
|
-
// transformArrIn,
|
|
19
|
-
// } from '../../../../core';
|
|
20
|
-
import { block } from '../../kit/utils';
|
|
21
|
-
import { Entity } from '../core';
|
|
22
|
-
import './ArrayBase.css';
|
|
23
|
-
const b = block('array-base');
|
|
24
|
-
export const ArrayBase = ({ input, schema, meta }) => {
|
|
25
|
-
// const keys = React.useMemo(
|
|
26
|
-
// () =>
|
|
27
|
-
// Object.keys(arrayInput.value || {})
|
|
28
|
-
// .filter((k) => k !== OBJECT_ARRAY_FLAG && k !== OBJECT_ARRAY_CNT)
|
|
29
|
-
// .map((k) => k.split('<').join('').split('>').join(''))
|
|
30
|
-
// .sort((a, b) => Number(a) - Number(b)),
|
|
31
|
-
// [arrayInput.value],
|
|
32
|
-
// );
|
|
33
|
-
// const itemSpecCorrect = React.useMemo(() => isCorrectSpec(spec.items), [spec.items]);
|
|
34
|
-
// const itemsPrimitive = React.useMemo(() => {
|
|
35
|
-
// return isBooleanSpec(spec.items) || isNumberSpec(spec.items) || isStringSpec(spec.items);
|
|
36
|
-
// }, [spec.items]);
|
|
37
|
-
const getItemSpec = React.useCallback((idx) => {
|
|
38
|
-
const itemSpec = Object.assign({}, schema.items);
|
|
39
|
-
// @ts-expect-error
|
|
40
|
-
itemSpec.title = itemSpec.title ? `${itemSpec.title} ${idx + 1}` : `${idx + 1}`;
|
|
41
|
-
return itemSpec;
|
|
42
|
-
}, [schema.items]);
|
|
43
|
-
// const parentOnChange = React.useCallback(
|
|
44
|
-
// (childName: string, childValue: FieldValue, childErrors?: Record<string, ValidateError>) =>
|
|
45
|
-
// input.onChange(
|
|
46
|
-
// (currentValue) =>
|
|
47
|
-
// set({...currentValue}, childName.split(`${input.name}.`).join(''), childValue),
|
|
48
|
-
// childErrors,
|
|
49
|
-
// ),
|
|
50
|
-
// [input.onChange, input.name],
|
|
51
|
-
// );
|
|
52
|
-
const AddButton = React.useCallback(() => {
|
|
53
|
-
let onClick = () => input.onChange([...(input.value || []), undefined]);
|
|
54
|
-
let qa = `${input.name}-add-item`;
|
|
55
|
-
let title = schema.title;
|
|
56
|
-
if (!input.value && schema.default) {
|
|
57
|
-
onClick = () => {
|
|
58
|
-
// input.onChange(transformArrIn<ArrayValue, FieldArrayValue>(spec.defaultValue!));
|
|
59
|
-
input.onChange(schema.default);
|
|
60
|
-
};
|
|
61
|
-
qa = `${name}-init-arr`;
|
|
62
|
-
title = schema.title;
|
|
63
|
-
}
|
|
64
|
-
return (React.createElement(Button, { onClick: onClick, disabled: schema.readOnly, qa: qa },
|
|
65
|
-
React.createElement(Icon, { data: Plus, size: 14 }),
|
|
66
|
-
title || null));
|
|
67
|
-
}, [
|
|
68
|
-
// arrayInput,
|
|
69
|
-
// input,
|
|
70
|
-
// name,
|
|
71
|
-
// spec.defaultValue,
|
|
72
|
-
// spec.viewSpec.disabled,
|
|
73
|
-
// spec.viewSpec.itemLabel,
|
|
74
|
-
// spec.viewSpec.layoutTitle,
|
|
75
|
-
// spec.viewSpec.addButtonPosition,
|
|
76
|
-
input,
|
|
77
|
-
schema,
|
|
78
|
-
]);
|
|
79
|
-
const items = React.useMemo(() => (input.value || []).map((_key, idx) => {
|
|
80
|
-
const itemSpec = getItemSpec(idx);
|
|
81
|
-
if (!itemSpec) {
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
// const showItemPrefix = idx !== 0 && spec.viewSpec.itemPrefix;
|
|
85
|
-
return (React.createElement(React.Fragment, { key: `${input.name}[${idx}]` },
|
|
86
|
-
React.createElement(Entity, { name: input.name + `[${idx}]`,
|
|
87
|
-
// @ts-expect-error
|
|
88
|
-
schema: itemSpec })));
|
|
89
|
-
}), [input, schema]);
|
|
90
|
-
// if (!itemSpecCorrect) {
|
|
91
|
-
// return null;
|
|
92
|
-
// }
|
|
93
|
-
return (React.createElement("div", { className: b() },
|
|
94
|
-
React.createElement("div", { className: b('items-wrapper') }, items),
|
|
95
|
-
React.createElement(AddButton, null),
|
|
96
|
-
meta.error ? React.createElement(Text, { color: "danger" }, meta.error) : null));
|
|
97
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { SelectProps as SelectBaseProps } from '@gravity-ui/uikit';
|
|
2
|
-
import type { Control, JsonSchemaArray } from '../core/types';
|
|
3
|
-
import './MultiSelect.css';
|
|
4
|
-
export interface MultiSelectProps extends Omit<SelectBaseProps, 'onUpdate' | 'value' | 'onOpenChange' | 'disabled' | 'placeholder' | 'filterPlaceholder' | 'multiple' | 'qa'> {
|
|
5
|
-
withCustomOptions?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare const MultiSelect: Control<JsonSchemaArray>;
|