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(types): changeFieldControl builtin overload #930

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
47 changes: 47 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,53 @@ export interface ContentType {
settings?: IEditorInterfaceOptions
): void

/**
* Changes the control of given field's ID.
*
* @param fieldId The ID of the field.
* @param widgetNamespace The namespace of the widget. Use 'builtin' for standard widgets, 'extension' for UI extensions or 'app' for installed apps.
* @param widgetId The new widget ID for the field.
* @param settings Widget settings
*/
changeFieldControl(fieldId: string,
widgetNamespace: 'builtin',
widgetId:
| 'assetLinkEditor'
| 'assetLinksEditor'
| 'assetGalleryEditor'
| 'boolean'
| 'datePicker'
| 'entryLinkEditor'
| 'entryLinksEditor'
| 'entryCardEditor'
| 'entryCardsEditor'
| 'numberEditor'
| 'rating'
| 'locationEditor'
| 'objectEditor'
| 'urlEditor'
| 'slugEditor'
| 'listInput'
| 'checkbox'
| 'tagEditor'
| 'multipleLine'
| 'markdown'
| 'singleLine'
| 'dropdown'
| 'radio'
| 'richTextEditor',
settings?: IEditorInterfaceOptions): void;

/**
* Changes the control of given field's ID.
*
* @param fieldId The ID of the field.
* @param widgetNamespace The namespace of the widget. Use 'builtin' for standard widgets, 'extension' for UI extensions or 'app' for installed apps.
* @param widgetId The new widget ID for the field.
* @param settings Widget settings
*/
changeFieldControl(fieldId: string, widgetNamespace: 'extension' | 'app', widgetId: string, settings?: IEditorInterfaceOptions): void;

/**
* Changes the control of given field's ID.
*
Expand Down