From 2d8902c10c5e11b9a6c2a4477debe9fec05b2be8 Mon Sep 17 00:00:00 2001 From: Andrii Kostenko Date: Fri, 14 Nov 2025 09:58:48 +0000 Subject: [PATCH] more esm imports --- frontend/package.json | 1 + frontend/src/app/components/company/company.component.ts | 2 +- .../db-table-ai-panel/db-table-ai-panel.component.ts | 2 +- frontend/src/app/validators/hostname.validator.ts | 4 ++-- frontend/yarn.lock | 1 + 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index b616601d4..66500e303 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -46,6 +46,7 @@ "json5": "^2.2.3", "libphonenumber-js": "^1.12.9", "lodash": "^4.17.21", + "lodash-es": "^4.17.21", "mermaid": "^11.12.1", "monaco-editor": "0.44.0", "ng-dynamic-component": "^10.7.0", diff --git a/frontend/src/app/components/company/company.component.ts b/frontend/src/app/components/company/company.component.ts index 173bb8039..e3fe89b65 100644 --- a/frontend/src/app/components/company/company.component.ts +++ b/frontend/src/app/components/company/company.component.ts @@ -28,7 +28,7 @@ import { SubscriptionPlans } from 'src/app/models/user'; import { Title } from '@angular/platform-browser'; import { UserService } from 'src/app/services/user.service'; import { environment } from 'src/environments/environment'; -import { orderBy } from "lodash"; +import { orderBy } from "lodash-es"; @Component({ selector: 'app-company', diff --git a/frontend/src/app/components/dashboard/db-table-view/db-table-ai-panel/db-table-ai-panel.component.ts b/frontend/src/app/components/dashboard/db-table-view/db-table-ai-panel/db-table-ai-panel.component.ts index f21ae3eab..638cbf310 100644 --- a/frontend/src/app/components/dashboard/db-table-view/db-table-ai-panel/db-table-ai-panel.component.ts +++ b/frontend/src/app/components/dashboard/db-table-view/db-table-ai-panel/db-table-ai-panel.component.ts @@ -74,7 +74,7 @@ export class DbTableAiPanelComponent implements OnInit, OnDestroy { async ngAfterViewInit() { const mermaid = await import("mermaid") //@ts-expect-error dynamic load of mermaid - window.mermaid = mermaid; + window.mermaid = mermaid.default ?? mermaid; }; ngOnDestroy() { diff --git a/frontend/src/app/validators/hostname.validator.ts b/frontend/src/app/validators/hostname.validator.ts index 79784c1b8..19ec23e44 100644 --- a/frontend/src/app/validators/hostname.validator.ts +++ b/frontend/src/app/validators/hostname.validator.ts @@ -1,7 +1,7 @@ import { AbstractControl, ValidationErrors, ValidatorFn } from "@angular/forms"; -import isFQDN from 'validator/lib/isFQDN'; -import isIP from 'validator/lib/isIP'; +import isFQDN from 'validator/es/lib/isFQDN'; +import isIP from 'validator/es/lib/isIP'; import is_ip_private from 'private-ip'; import { DBtype } from "../models/connection"; diff --git a/frontend/yarn.lock b/frontend/yarn.lock index c64fa4d11..5a081f5a2 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -6726,6 +6726,7 @@ __metadata: karma-jasmine-html-reporter: ^2.1.0 libphonenumber-js: ^1.12.9 lodash: ^4.17.21 + lodash-es: ^4.17.21 mermaid: ^11.12.1 monaco-editor: 0.44.0 ng-dynamic-component: ^10.7.0