Releases: dhis2/ui
Releases · dhis2/ui
v5.1.0
v5.0.7
v5.0.6
v5.0.5
v5.0.4
v5.0.3
v5.0.2
v5.0.1
v5.0.0
5.0.0 (2020-05-28)
Bug Fixes
- headerbar: correctly select and use user locale and application title text (1c9d055)
- headerbar: escape regex special chars in search (2f11c96)
- field: fix prop-type warning (d55d049)
- icons: add missing icon file (de0a157)
- popover: fix arrow rotation (880395b)
- field: no top margin if no label for field (a2d0bad)
- noticebox: add missing export (ec2a739)
- prop-types: add missing dhis2 prop-types for ui-icons (c207524)
- select: debounce menu width measurement (0e17c59)
- widgets: add translated default texts (c85342d)
- forms: display submit errors (9f74e89)
- forms: update final-form to fix setstate warning (1bc62b9)
- createnumberrange: update number range validation error to match actual bounds (646f782)
Code Refactoring
- transfer: align with select & monorepo structure (c15477d), closes #50
- transfer: align with select & monorepo structure (d50f960)
- layering: layers and overlay components (24ead4c)
- menu: make menu click-based and reorganise related components (a8b26a0)
- forms: move to more explicit final-form api (a76da00)
- popover: rename popover prop (f7d5c20)
- checkboxfield: move to ui-widgets (d979d96)
- core: add forward refs to base components (699b194)
- core: move fields to widgets (3b763fa)
- core: reimplement Field (fbdafb8)
- forms: namespace final-form and react-final-form re-exports (c59e0bb)
- select: use string based selection in multi- and single-select (e3627a4)
- fileinputfield: move to ui-widgets (6059625)
- fileinputfieldwithlist: move to ui-widgets (a512f00)
- inputfield: move to ui-widgets (50d9009)
- multiselectfield: move to ui-widgets (c3d42ad)
- singleselectfield: move to ui-widgets (e09c70c)
- switchfield: move to ui-widgets (2baa52a)
- textareafield: move to ui-widgets (3ef63da)
- togglegroupfield: migrate to ui-widgets (db55448)
- ui: list breaking changes (7ceddf0)
- forms: rename form components (7479f613)
Features
- constants: export constants as well (51c2eb0)
- noticebox: add noticebox component (357ef6d)
- constants: move and expose the common proptypes (1bb0f9d)
- forms: integrate @dhis2/ui-forms (af49144)
- ui: expose @dhis2/ui-forms through metapackage (88a3782)
BREAKING CHANGES
- transfer: The Transfer component now expects options to be passed in as objects, not as children. Custom components can be provided via the optionComponent prop for all options or via the component property on an individual option.
- transfer: The Transfer component now expects strings as selected values instead of option objects.
- transfer: The Transfer component is now part of
widgets
- popover: The Popover's
onBackdropClick
prop has been renamed toonClickOutside
- menu: MenuList was renamed to Menu
- menu: Menu was renamed to FlyoutMenu
- menu: The sub-menus now open on click instead of hover
- menu: We have introduced a dedicated
MenuDivider
andMenuSectionHeader
- menu: To create sub-menus, you can now add MenuItems directly under a parent MenuItem, no need to wrap them in a Menu/FlyoutMenu anymore
- core: Relocate all *Field components to @dhis2/ui-widgets. They can be accessed from
@dhis2/ui
using named exports. - core: Field has been reimplemented to compose a field control, it now adds the Label, Help, Validation components instead of being a simple div wrapper, which allows us to avoid the code duplication in each *Field component.
- core: ToggleGroup has been removed. Use a FieldSet for grouping form controls.
- togglegroupfield: ToggleGroupField has been renamed to FieldSetField, which adds the necessary Label, Help, and Validation components to an entire group of components.
- field: Field now provides a composition to provide all necessary things for a *Field component.
- radiogroup: RadioGroup has been deleted.
- checkboxgroup: CheckboxGroup has been deleted.
- checkboxgroupcontrol: CheckboxGroupControl has been deleted.
- radiogroupcontrol: RadioGroupControl has been deleted.
- forms: final-form and react-final-form exports are now re-exported under the named exports FinalForm and ReactFinalForm respectively.
- layering: We changed the set of components used to produce various types of overlays:
Layer
is an overlay component that fills the entire screen/page. Besides that it is also a key component to stack various components on top of one another.ComponentCover
is a similar component that only fills its parent, provided that has a non-static position. Both theLayer
and theComponentCover
accept anonClick
and atranslucent
prop.CenterContent
is a component that does exactly what it says on the tin. It also has aposition
prop which can be used to vertically align the content at thetop
,middle
(default), orbottom
. These new components replace theBackdrop
and theScreenCover
, which had a slightly unclear scope and have now been removed. TheLayer
uses theLayerContext
internally to control the stacking logic. This context has also been exposed via theuseLayerContext
hook, which can be used to append portals to the current layer-node. - singleselect: SingleSelect selection is now a string instead of an object with a value and label property
- multiselect: MultiSelect selection is now an array of strings instead of an array of objects with a value and label property
- core: base components can hold a ref.
- forms: Postfix all the
@dhis2/ui-forms
components with 'FieldFF' to avoid conflicts with the base components in@dhis2/ui-core
and@dhis2/ui-widgets
, since all components are now exported in@dhis2/ui
. The FF stands for final-form, clarifying that the component is tied to final-form and making the relation with our regular Field components more clear. So, for example, instead of the regular<Input />
we used to export fromui-forms
we now have<InputFieldFF />
- widgets: The
<FieldSetField />
component has been renamed to<FieldGroup />
- forms: The
<GroupControl />
component has been renamed to<FieldGroupFF />
- textareafield: Import path changes from @dhis2/ui-core to @dhis2/ui or @dhis2/ui-widgets.
- switchfield: Import path for SwichField changes from @dhis2/ui-core to @dhis2/ui or @dhis2/ui-widgets.
- singleselectfield: Import path for SingleSelectField changes from @dhis2/ui-core to @dhis2/ui or @dhis2/ui-widgets.
- multiselectfield: MultiSelectField import path ch...