Files
payloadcms/docs
Jacob Fletcher 0a2ecf8a4a fix!: exports getSiblingData, getDataByPath, and reduceFieldsToValues from payload (#7070)
## Description

Exports `getSiblingData`, `getDataByPath`, `reduceFieldsToValues`, and
`unflatten` from `payload`. These utilities were previously accessible
using direct import paths from `@payloadcms/ui`—but this is no longer
advised since moving to a pre-bundled UI library pattern. Instead of
simply exporting these from the `@payloadcms/ui` package, these exports
have been moved to Payload itself to provision for use outside of React
environments.

This is considered a breaking change. If you were previously importing
any of these utilities, the imports paths have changed as follows:

Old: 

```ts
import { getSiblingData, getDataByPath, reduceFieldsToValues } from '@payloadcms/ui/forms/Form'
import { unflatten } from '@payloadcms/ui/utilities'
```

New:

```ts
import { getSiblingData, getDataByPath, reduceFieldsToValues, unflatten } from 'payload/shared'
```

The `is-buffer` dependency was also removed in this PR.

- [x] I have read and understand the
[CONTRIBUTING.md](https://github.com/payloadcms/payload/blob/main/CONTRIBUTING.md)
document in this repository.

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)

## Checklist:

- [x] Existing test suite passes locally with my changes
2024-07-08 17:28:05 -04:00
..
2024-06-24 13:17:50 -04:00
2024-06-25 10:38:12 -04:00
2024-05-13 10:29:59 -04:00
2024-06-27 21:22:01 +00:00
2024-06-24 14:12:50 -04:00
2024-06-24 13:57:01 -04:00
2024-05-13 10:29:59 -04:00
2024-05-13 10:29:59 -04:00
2024-06-24 13:17:50 -04:00