From 7f7240bc35e849a37f3605b0eba4f7c5a9f92fb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andi=20P=C3=A4tzold?= Date: Fri, 21 Jul 2023 15:17:26 +0200 Subject: [PATCH] feat: remove deprecated props & methods [EXT-4467] (#1597) feat: remove deprecated props & methods BREAKING CHANGE: removed deprecated props & methods --- lib/editor.ts | 6 ------ lib/types/api.types.ts | 9 --------- lib/types/app.types.ts | 4 ---- lib/types/entry.types.ts | 5 ----- test/constants.ts | 2 -- 5 files changed, 26 deletions(-) diff --git a/lib/editor.ts b/lib/editor.ts index e268edae93..04e9ffb81b 100644 --- a/lib/editor.ts +++ b/lib/editor.ts @@ -27,12 +27,6 @@ export default function createEditor( onLocaleSettingsChanged: (handler) => { return localeSettingsSignal.attach(handler) }, - /** - * @deprecated - */ - onShowDisabledFieldsChanged: (handler) => { - return showHiddenFieldsSignal.attach(handler) - }, getShowHiddenFields(): boolean { return showHiddenFieldsSignal.getMemoizedArgs()[0] }, diff --git a/lib/types/api.types.ts b/lib/types/api.types.ts index e32b9b1b3a..e83402cb5b 100644 --- a/lib/types/api.types.ts +++ b/lib/types/api.types.ts @@ -158,15 +158,6 @@ export interface SharedEditorSDK { callback: (localeSettings: EditorLocaleSettings) => void ) => () => void - /** - * Subscribes to changes of whether or not disabled fields are displayed - * - * @param callback Function that is called every time the setting whether or not disabled fields are displayed changes. Called immediately with the current state. - * @returns Function to unsubscribe. `callback` won't be called anymore. - * @deprecated Use {@link onShowHiddenFieldsChanged} instead - */ - onShowDisabledFieldsChanged: (callback: (showDisabledFields: boolean) => void) => () => void - /** * Returns whether or not hidden fields are displayed * diff --git a/lib/types/app.types.ts b/lib/types/app.types.ts index 3bb7a20434..a4409bf0ac 100644 --- a/lib/types/app.types.ts +++ b/lib/types/app.types.ts @@ -4,10 +4,6 @@ interface AppStateEditorInterfaceItem { controls?: Array<{ fieldId: string; settings?: Record }> sidebar?: { position: number; settings?: Record } editors?: { position: number; settings?: Record } - /** - * @deprecated use `editors` instead - */ - editor?: boolean } export interface AppState { diff --git a/lib/types/entry.types.ts b/lib/types/entry.types.ts index 16930c6f6c..741c56a872 100644 --- a/lib/types/entry.types.ts +++ b/lib/types/entry.types.ts @@ -38,11 +38,6 @@ export interface EntryAPI extends TaskAPI { onSysChanged: (callback: (sys: EntrySys) => void) => () => void /** Allows to control the values of all other fields in the current entry. */ fields: { [key: string]: EntryFieldAPI } - /** - * Optional metadata on an entry - * @deprecated - */ - metadata?: Metadata getMetadata: () => Metadata | undefined onMetadataChanged: (callback: (metadata?: Metadata) => void) => VoidFunction } diff --git a/test/constants.ts b/test/constants.ts index e8db09a089..3039f78887 100644 --- a/test/constants.ts +++ b/test/constants.ts @@ -19,8 +19,6 @@ export const actionSelectors = { export const widgetLocation = { entryField: 'entry-field', - /** @deprecated */ - entryFieldSidebar: 'entry-field-sidebar', entrySidebar: 'entry-sidebar', dialog: 'dialog', entryEditor: 'entry-editor',