From 05f6a2fc503d93bd54491b8679e27c7343ac750b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20D=C4=9Bdi=C4=8D?= Date: Mon, 14 Oct 2024 12:26:46 +0200 Subject: [PATCH] Using bundled bootstrap.native types --- frontend/ts/ModalExtension.ts | 4 ++-- frontend/ts/ajax.ts | 4 ++-- frontend/types/bootstrap.native/index.d.ts | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 frontend/types/bootstrap.native/index.d.ts diff --git a/frontend/ts/ModalExtension.ts b/frontend/ts/ModalExtension.ts index de62aca98..a579b46cc 100644 --- a/frontend/ts/ModalExtension.ts +++ b/frontend/ts/ModalExtension.ts @@ -1,4 +1,4 @@ -import BSN from 'bootstrap.native'; +import { Modal } from 'bootstrap.native'; export class ModalExtension { constructor(naja: any) { @@ -10,7 +10,7 @@ export class ModalExtension { return; } - const modal = new BSN.Modal(snippet); + const modal = new Modal(snippet); if (snippet.innerHTML === '') { modal.hide(); diff --git a/frontend/ts/ajax.ts b/frontend/ts/ajax.ts index d4b618842..0f60d7cec 100644 --- a/frontend/ts/ajax.ts +++ b/frontend/ts/ajax.ts @@ -1,4 +1,4 @@ -import BSN from "bootstrap.native"; +import { initCallback } from "bootstrap.native"; import naja from 'naja'; // @ts-ignore import {ProgressBar} from './ProgressBar'; @@ -27,7 +27,7 @@ export default function (): void { initializeSendMassForm(snippet, 'chits-'); initializeEditForm(snippet,'chits-'); snippet.querySelectorAll('.date').forEach(initializeDatePicker); - BSN.initCallback(snippet); + initCallback(snippet); }); naja.registerExtension(DataGridExtension); diff --git a/frontend/types/bootstrap.native/index.d.ts b/frontend/types/bootstrap.native/index.d.ts deleted file mode 100644 index 1dad19e0c..000000000 --- a/frontend/types/bootstrap.native/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare module "bootstrap.native";