diff --git a/api/js/etemplate/Et2Date/Et2Date.ts b/api/js/etemplate/Et2Date/Et2Date.ts index c3b3d4e087..256c731968 100644 --- a/api/js/etemplate/Et2Date/Et2Date.ts +++ b/api/js/etemplate/Et2Date/Et2Date.ts @@ -12,12 +12,12 @@ import {css, html} from "@lion/core"; import 'lit-flatpickr'; import {dateStyles} from "./DateStyles"; -import {Instance} from 'flatpickr/dist/types/instance'; -import "flatpickr/dist/plugins/scrollPlugin.js"; -import "shortcut-buttons-flatpickr/dist/shortcut-buttons-flatpickr"; +import type {Instance} from 'flatpickr/dist/types/instance'; +import {default as scrollPlugin} from "flatpickr/dist/plugins/scrollPlugin.js"; +import {default as ShortcutButtonsPlugin} from "shortcut-buttons-flatpickr/dist/shortcut-buttons-flatpickr"; import flatpickr from "flatpickr"; import {egw} from "../../jsapi/egw_global"; -import {HTMLElementWithValue} from "@lion/form-core/types/FormControlMixinTypes"; +import type {HTMLElementWithValue} from "@lion/form-core/types/FormControlMixinTypes"; import {Et2Textbox} from "../Et2Textbox/Et2Textbox"; import {Et2ButtonIcon} from "../Et2Button/Et2ButtonIcon"; import {FormControlMixin} from "@lion/form-core"; diff --git a/api/js/etemplate/Et2Date/Et2DateTime.ts b/api/js/etemplate/Et2Date/Et2DateTime.ts index 85017852ce..760c448db4 100644 --- a/api/js/etemplate/Et2Date/Et2DateTime.ts +++ b/api/js/etemplate/Et2Date/Et2DateTime.ts @@ -11,7 +11,8 @@ import {css} from "@lion/core"; import {Et2Date} from "./Et2Date"; -import {Instance} from "flatpickr/dist/types/instance"; +import type {Instance} from "flatpickr/dist/types/instance"; +import {default as ShortcutButtonsPlugin} from "shortcut-buttons-flatpickr/dist/shortcut-buttons-flatpickr"; export class Et2DateTime extends Et2Date @@ -115,7 +116,6 @@ export class Et2DateTime extends Et2Date */ protected _buttonPlugin() { - // @ts-ignore TypeScript can't find ShortcutButtonsPlugin, but rollup does return ShortcutButtonsPlugin({ button: [ {label: this.egw().lang("ok")}, @@ -144,4 +144,4 @@ export class Et2DateTime extends Et2Date } // @ts-ignore TypeScript is not recognizing that Et2DateTime is a LitElement -customElements.define("et2-date-time", Et2DateTime); +customElements.define("et2-date-time", Et2DateTime); \ No newline at end of file