From 34ca5f3855220162c3ce758e8c1bfeedad898448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Grabowski?= Date: Wed, 22 Jul 2026 13:39:36 +0200 Subject: [PATCH 1/3] IBX-12116: Implement TS types configuration --- src/bundle/Resources/types/richText.d.ts | 42 ++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/bundle/Resources/types/richText.d.ts diff --git a/src/bundle/Resources/types/richText.d.ts b/src/bundle/Resources/types/richText.d.ts new file mode 100644 index 00000000..aa6644f7 --- /dev/null +++ b/src/bundle/Resources/types/richText.d.ts @@ -0,0 +1,42 @@ +declare global { + interface IbexaRichText { + CKEditor: IbexaRichTextCKEditor; + customTags: Record; + customStyles: Record; + } + + interface IbexaRichTextCKEditor { + toolbar: string[]; + extraPlugins?: unknown[]; + extraConfig?: Record; + customTags?: IbexaRichTextCKEditorCustomTagMethods; + } + + interface IbexaRichTextCKEditorCustomTagMethods { + attributeRenderMethods?: Record; + setValueMethods?: Record; + getValueMethods?: Record; + getValueLabelMethods?: Record; + } + + type IbexaRichTextAttributeRenderMethod = (config: unknown, locale: string) => unknown; + + type IbexaRichTextSetValueMethod = (attributeView: unknown, value: unknown) => void; + + type IbexaRichTextGetValueMethod = (attributeView: unknown) => unknown; + + type IbexaRichTextGetValueLabelMethod = (value: unknown, config?: unknown) => string; + + interface IbexaRichTextCustomTag { + isInline: boolean; + label: string; + attributes: Record; + } + + interface IbexaRichTextCustomStyle { + inline: boolean; + label: string; + } +} + +export {}; From 14dda7faeca728b09e267acd3571f57c61da5363 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Grabowski?= Date: Wed, 22 Jul 2026 13:43:28 +0200 Subject: [PATCH 2/3] IBX-12116: Removed ibexa.tsconfig.json in favor of autogenerated --- ibexa.tsconfig.json | 7 ------- package.json | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 ibexa.tsconfig.json diff --git a/ibexa.tsconfig.json b/ibexa.tsconfig.json deleted file mode 100644 index ad45c073..00000000 --- a/ibexa.tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "@ibexa/ts-config", - "include": [ - "src/bundle/**/*.ts", - "src/bundle/**/*.tsx" - ] -} diff --git a/package.json b/package.json index 1bb6825a..afbc6c17 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "devDependencies": { "@ibexa/eslint-config": "https://github.com/ibexa/eslint-config-ibexa.git#~v2.0.0", "@ibexa/frontend-config": "https://github.com/ibexa/frontend-config#^v5.0.0-beta1", - "@ibexa/ts-config": "https://github.com/ibexa/ts-config-ibexa#~v1.1.0", + "@ibexa/ts-config": "https://github.com/ibexa/ts-config-ibexa#~v2.0.0", "@types/react": "^19.1.2", "@types/react-dom": "^19.1.2" }, From 915f7d301bb2d861b424786e36d1ca6fc303c040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Grabowski?= Date: Wed, 22 Jul 2026 16:00:23 +0200 Subject: [PATCH 3/3] IBX-12116: Point TypeScript loader at tsconfig.ibexa.json --- src/bundle/Resources/encore/ibexa.webpack.richtext.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bundle/Resources/encore/ibexa.webpack.richtext.config.js b/src/bundle/Resources/encore/ibexa.webpack.richtext.config.js index f42f2b10..8e6e0964 100644 --- a/src/bundle/Resources/encore/ibexa.webpack.richtext.config.js +++ b/src/bundle/Resources/encore/ibexa.webpack.richtext.config.js @@ -8,7 +8,7 @@ module.exports = (Encore) => { .setPublicPath('/assets/richtext/build') .enableSassLoader() .enableTypeScriptLoader((tsConfig) => { - tsConfig.configFile = path.resolve('tsconfig.json'); + tsConfig.configFile = path.resolve('tsconfig.ibexa.json'); tsConfig.onlyCompileBundledFiles = true; }) .disableSingleRuntimeChunk()