![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@great-expectations/jsonforms-antd-renderers
Advanced tools
ant design renderer set for the jsonforms declarative form framework
jsonforms
jsonforms is "a declarative framework for efficiently building form-based web UIs." jsonforms
has multiple renderer packages for different frameworks and component libraries, and this is one such package.
You can preview the renderers via storybook here.
npm install @great-expectations/jsonforms-antd-renderers
In order to use this package you need to import the renderer registry entries from this package and provide them to the @jsonforms/react
JsonForms
component:
import { JsonForms } from "@jsonforms/react"
import {
rendererRegistryEntries,
cellRegistryEntries,
} from "@great-expectations/jsonforms-antd-renderers"
function MyForm({ data }: { data: Record<string, unknown> }) {
return (
<JsonForms
data={data}
schema={schema}
renderers={rendererRegistryEntries}
cells={cellRegistryEntries}
/>
)
}
This package expands upon the types and configurability of jsonforms UISchemas. When writing UISchemas, you'll want to provide your jsonschema's type to our UISchema
type to take advantage of advanced typechecking & UI configurability. See our storybooks (instructions for running storybooks under Contributing
) for more examples.
import { useState } from "react"
import { Form, Button } from "antd"
import { JsonForms } from "@jsonforms/react"
import {
rendererRegistryEntries,
UISchema,
} from "@great-expectations/jsonforms-antd-renderers"
const schema = {
type: "object",
properties: { password: { type: "string" } },
} as const
// Be sure to use an `as const` assertion so that UISchema
// can see the specific types of `type` fields within a schema.
// i.e. without `as const`, the value "object" is interpreted
// as a string type, and not the string literal type "object"
const uischema: UISchema<typeof schema> = {
type: "VerticalLayout",
elements: [
{
type: "Control",
scope: "#/properties/password",
// Properties like type: "password" here are unique to this renderer package.
// This allows you more declarative control over how your forms render.
// In this case, the password field will be rendered with AntD's password input component.
options: { type: "password" },
},
],
}
function MyForm() {
const [data, setData] = useState<Record<string, unknown>>({})
return (
<Form onFinish={() => myApiCall(data)}>
<JsonForms
data={data}
onChange={(result) => setData(result.data as Record<string, unknown>)}
schema={schema}
uischema={uischema}
renderers={rendererRegistryEntries}
/>
<Form.Item>
<Button htmlType="submit">Submit</Button>
</Form.Item>
</Form>
)
}
packageManager
field in package.json
pnpm i --frozen-lockfile
pnpm test
pnpm test:cov
npx vite preview --outDir html
o
+ enter
to open the results in a browserpnpm storybook
pnpm test
pnpm storybook
pnpm format:write
pnpm lint
pnpm pack
npm uninstall @great-expectations/jsonforms-antd-renderers
and possibly clear your package manager's cachenpm install /path/to/jsonforms-antd-renderers-0.0.0-semantic-release.tgz
FAQs
ant design renderer set for the jsonforms declarative form framework
The npm package @great-expectations/jsonforms-antd-renderers receives a total of 172 weekly downloads. As such, @great-expectations/jsonforms-antd-renderers popularity was classified as not popular.
We found that @great-expectations/jsonforms-antd-renderers demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.