| 1 |
/** |
| 2 |
* External dependencies. |
| 3 |
*/ |
| 4 |
import { setLocaleData } from '@wordpress/i18n'; |
| 5 |
import { doAction } from '@wordpress/hooks'; |
| 6 |
|
| 7 |
/** |
| 8 |
* Internal dependencies. |
| 9 |
*/ |
| 10 |
import './store'; |
| 11 |
import './fields'; |
| 12 |
|
| 13 |
/** |
| 14 |
* Sets the locale data for the package type |
| 15 |
*/ |
| 16 |
setLocaleData( window.cf.config.locale, 'carbon-fields-ui' ); |
| 17 |
|
| 18 |
/** |
| 19 |
* Public API. |
| 20 |
*/ |
| 21 |
export { createRegistry } from './registry'; |
| 22 |
export { getFieldType, registerFieldType } from './registry/fields'; |
| 23 |
export { default as Field } from './components/field'; |
| 24 |
export { default as withFilters } from './hocs/with-filters'; |
| 25 |
export { default as withProps } from './hocs/with-props'; |
| 26 |
export { default as withValidation } from './hocs/with-validation'; |
| 27 |
export { default as withConditionalLogic } from './hocs/with-conditional-logic'; |
| 28 |
export { default as uniqueId } from './utils/unique-id'; |
| 29 |
export { default as fromSelector } from './utils/from-selector'; |
| 30 |
|
| 31 |
/** |
| 32 |
* Triggers the initialization of Carbon Fields. |
| 33 |
* |
| 34 |
* @return {void} |
| 35 |
*/ |
| 36 |
export function initialize() { |
| 37 |
doAction( 'carbon-fields.init' ); |
| 38 |
} |
| 39 |
|