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

feat(form): remove idFetcher #57

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Formule includes a variety of predefined field types, grouped in three categorie
- `Accordion`: When containing a `List`, it works as a `List` with collapsible entries.
- `Layer`: When containing a `List`, it works as a `List` whose entries will open in a dialog window.
- `Tab`: It's commonly supposed to be used as a wrapper around the rest of the elements. You will normally want to add an `Object` inside and you can use it to separate the form in different pages or sections.
- **Advanced fields**: More complex or situational fields such as `URI`, `Rich/Latex editor`, `Tags`, `ID Fetcher` and `Code Editor`.
- **Advanced fields**: More complex or situational fields such as `URI`, `Rich/Latex editor`, `Tags` and `Code Editor`.

You can freely remove some of these predefined fields and add your own custom fields and widgets following the JSON Schema specifications. More details below.

Expand Down
56 changes: 0 additions & 56 deletions src/admin/utils/fieldTypes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
BorderTopOutlined,
CalendarOutlined,
CheckSquareOutlined,
CloudDownloadOutlined,
CodeOutlined,
ContainerOutlined,
FontSizeOutlined,
Expand Down Expand Up @@ -1051,61 +1050,6 @@ const advanced = {
},
},
},
idFetcher: {
title: "ID Fetcher",
icon: <CloudDownloadOutlined />,
description: "Fetch data from ZENODO, ORCiD or ROR",
child: {},
optionsSchema: {
type: "object",
title: "ID Fetcher Schema",
properties: {
...common.optionsSchema,
readOnly: extra.optionsSchema.readOnly,
isRequired: extra.optionsSchema.isRequired,
},
},
optionsSchemaUiSchema: {
readOnly: extra.optionsSchemaUiSchema.readOnly,
isRequired: extra.optionsSchemaUiSchema.isRequired,
},
optionsUiSchema: {
type: "object",
title: "UI Schema",
properties: {
...common.optionsUiSchema.properties,
"ui:servicesList": {
title: "Select the services you want to allow",
type: "array",
items: {
type: "string",
oneOf: [
{ const: "orcid", title: "ORCiD" },
{ const: "ror", title: "ROR" },
{ const: "zenodo", title: "Zenodo" },
],
},
uniqueItems: true,
},
},
},
optionsUiSchemaUiSchema: {
...common.optionsUiSchemaUiSchema,
"ui:servicesList": {
"ui:widget": "checkbox",
},
},
default: {
schema: {
type: "object",
properties: {},
},
uiSchema: {
"ui:servicesList": ["orcid", "ror", "zenodo"],
"ui:field": "idFetcher",
},
},
},
codeEditor: {
title: "Code Editor",
icon: <CodeOutlined />,
Expand Down
153 changes: 0 additions & 153 deletions src/forms/fields/IdFetcher.jsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/forms/fields/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import CodeEditorField from "./CodeEditorField";
import IdFetcher from "./IdFetcher";
import TagsField from "./TagsField";

const fields = {
tags: TagsField,
idFetcher: IdFetcher,
codeEditor: CodeEditorField,
};

Expand Down
42 changes: 0 additions & 42 deletions src/forms/fields/services/Orcid.jsx

This file was deleted.

34 changes: 0 additions & 34 deletions src/forms/fields/services/Ror.jsx

This file was deleted.

21 changes: 0 additions & 21 deletions src/forms/fields/services/Zenodo.jsx

This file was deleted.

30 changes: 0 additions & 30 deletions src/forms/fields/services/svg/OrcidSvg.jsx

This file was deleted.

Loading
Loading