Skip to content

Commit

Permalink
refactor(multiselectfield): move to ui-widgets
Browse files Browse the repository at this point in the history
BREAKING CHANGE: MultiSelectField import path changes from
@dhis2/ui-core to @dhis2/ui-widgets or @dhis2/ui
  • Loading branch information
varl committed Mar 9, 2020
1 parent 1dadf93 commit c3d42ad
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
1 change: 0 additions & 1 deletion packages/core/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ export { ToggleGroup } from './ToggleGroup/ToggleGroup.js'
/* widgets */
export { Menu } from './Menu/Menu.js'
export { Modal } from './Modal/Modal.js'
export { MultiSelectField } from './MultiSelectField/MultiSelectField.js'
export { SingleSelectField } from './SingleSelectField/SingleSelectField.js'
export { SwitchField } from './SwitchField/SwitchField.js'
export { TextAreaField } from './TextAreaField/TextAreaField.js'
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
import propTypes from '@dhis2/prop-types'
import React from 'react'

import { statusPropType, multiSelectedPropType } from '../common-prop-types.js'
import { Field, Label, Help, Box, MultiSelect } from '@dhis2/ui-core'

import { Field } from '../Field/Field.js'
import { Label } from '../Label/Label.js'
import { Help } from '../Help/Help.js'
import { Box } from '../Box/Box.js'
const statusPropType = propTypes.mutuallyExclusive(
['valid', 'warning', 'error'],
propTypes.bool
)

import { MultiSelect } from '../MultiSelect/MultiSelect.js'
;('') // TODO: https://github.com/jsdoc/jsdoc/issues/1718
const multiSelectedPropType = propTypes.arrayOf(
propTypes.shape({
label: propTypes.string,
value: propTypes.string,
})
)

/**
* @module
Expand Down
1 change: 1 addition & 0 deletions packages/widgets/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ export { CheckboxField } from './CheckboxField/CheckboxField.js'
export { FileInputField } from './FileInputField/FileInputField.js'
export { FileInputFieldWithList } from './FileInputFieldWithList/FileInputFieldWithList.js'
export { InputField } from './InputField/InputField.js'
export { MultiSelectField } from './MultiSelectField/MultiSelectField.js'
export { ToggleGroupField } from './ToggleGroupField/ToggleGroupField.js'

0 comments on commit c3d42ad

Please sign in to comment.