Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add @wordpress/fields package #65230

Merged
merged 7 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -1697,6 +1697,12 @@
"markdown_source": "../packages/eslint-plugin/README.md",
"parent": "packages"
},
{
"title": "@wordpress/fields",
"slug": "packages-fields",
"markdown_source": "../packages/fields/README.md",
"parent": "packages"
},
{
"title": "@wordpress/format-library",
"slug": "packages-format-library",
Expand Down
26 changes: 26 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"@wordpress/editor": "file:packages/editor",
"@wordpress/element": "file:packages/element",
"@wordpress/escape-html": "file:packages/escape-html",
"@wordpress/fields": "file:packages/fields",
"@wordpress/format-library": "file:packages/format-library",
"@wordpress/hooks": "file:packages/hooks",
"@wordpress/html-entities": "file:packages/html-entities",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const BUNDLED_PACKAGES = [
'@wordpress/interface',
'@wordpress/sync',
'@wordpress/undo-manager',
'@wordpress/fields',
];

/**
Expand Down
1 change: 1 addition & 0 deletions packages/fields/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
5 changes: 5 additions & 0 deletions packages/fields/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- Learn how to maintain this file at https://github.com/WordPress/gutenberg/tree/HEAD/packages#maintaining-changelogs. -->

## Unreleased

Initial release.
27 changes: 27 additions & 0 deletions packages/fields/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Fields

This package provides core elements for the DataView library, designed to simplify the creation and management of data display elements in WordPress.

## Installation

Install the module

```bash
npm install @wordpress/fields --save
```

## Usage

<!-- START TOKEN(Autogenerated API docs) -->

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add the README's API docs autogeneration markers (see other package README's)

Copy link
Contributor Author

@gigitux gigitux Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with 6e71a98 and e5fd361

Nothing to document.

<!-- END TOKEN(Autogenerated API docs) -->

## Contributing to this package

This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to [npm](https://www.npmjs.com/) and used by [WordPress](https://make.wordpress.org/core/) as well as other software projects.

To find out more about contributing to this package or Gutenberg as a whole, please read the project's main [contributor guide](https://github.com/WordPress/gutenberg/tree/HEAD/CONTRIBUTING.md).

<br /><br /><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>
41 changes: 41 additions & 0 deletions packages/fields/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "@wordpress/fields",
"version": "0.0.1",
"description": "DataViews is a component that provides an API to render datasets using different types of layouts (table, grid, list, etc.).",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
"keywords": [
"wordpress",
"gutenberg",
"dataviews"
],
"homepage": "https://github.com/WordPress/gutenberg/tree/HEAD/packages/fields/README.md",
"repository": {
"type": "git",
"url": "https://github.com/WordPress/gutenberg.git",
"directory": "packages/fields"
},
"bugs": {
"url": "https://github.com/WordPress/gutenberg/issues"
},
"engines": {
"node": ">=18.12.0",
"npm": ">=8.19.2"
},
"main": "build/index.js",
"module": "build-module/index.js",
"types": "build-types",
"sideEffects": [
"build-style/**",
"src/**/*.scss"
],
"dependencies": {
"@babel/runtime": "^7.16.0"
},
"peerDependencies": {
"react": "^18.0.0"
},
"publishConfig": {
"access": "public"
}
}
Empty file added packages/fields/src/index.ts
Empty file.
11 changes: 11 additions & 0 deletions packages/fields/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://json.schemastore.org/tsconfig.json",
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "src",
"declarationDir": "build-types",
"checkJs": false
},
"references": [],
"include": [ "src" ]
}
1 change: 1 addition & 0 deletions packages/private-apis/src/implementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const CORE_MODULES_USING_PRIVATE_APIS = [
'@wordpress/reusable-blocks',
'@wordpress/router',
'@wordpress/dataviews',
'@wordpress/fields',
];

/**
Expand Down
1 change: 1 addition & 0 deletions tools/webpack/packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const BUNDLED_PACKAGES = [
'@wordpress/interface',
'@wordpress/sync',
'@wordpress/undo-manager',
'@wordpress/fields',
];

// PHP files in packages that have to be copied during build.
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
{ "path": "packages/element" },
{ "path": "packages/escape-html" },
{ "path": "packages/eslint-plugin" },
{ "path": "packages/fields" },
{ "path": "packages/hooks" },
{ "path": "packages/html-entities" },
{ "path": "packages/html-entities" },
Expand Down
Loading