From c8128c55f3a68e2d28c6c96c76c8ea2209ef19d9 Mon Sep 17 00:00:00 2001 From: Romain Lenzotti Date: Sun, 29 Dec 2024 13:03:52 +0100 Subject: [PATCH] fix(react-formio): use @formio/js package instead formiojs --- package.json | 2 +- packages/integration/package.json | 2 +- packages/react-formio-container/package.json | 8 +- packages/react-formio-stores/package.json | 2 +- .../action-info/action-info.actions.spec.ts | 4 +- .../stores/action-info/action-info.actions.ts | 2 +- .../src/stores/action/action.actions.spec.ts | 4 +- .../src/stores/action/action.actions.ts | 2 +- .../stores/actions/actions.actions.spec.ts | 4 +- .../src/stores/actions/actions.actions.ts | 2 +- .../src/stores/auth/getAccess.action.spec.ts | 2 +- .../src/stores/auth/getAccess.action.ts | 2 +- .../stores/auth/getProjectAccess.action.ts | 2 +- .../src/stores/auth/initAuth.action.spec.ts | 2 +- .../src/stores/auth/initAuth.action.ts | 2 +- .../src/stores/auth/logout.action.spec.ts | 4 +- .../src/stores/auth/logout.action.ts | 2 +- .../src/stores/auth/setUser.action.spec.ts | 2 +- .../src/stores/auth/setUser.action.ts | 2 +- .../src/stores/form/form.actions.spec.ts | 4 +- .../src/stores/form/form.actions.ts | 2 +- .../src/stores/forms/forms.actions.spec.ts | 4 +- .../src/stores/forms/forms.actions.ts | 2 +- .../submission/submission.actions.spec.ts | 4 +- .../stores/submission/submission.actions.ts | 2 +- .../submissions/submissions.actions.spec.ts | 4 +- .../stores/submissions/submissions.actions.ts | 2 +- packages/react-formio-stores/src/utils/url.ts | 2 +- packages/react-formio/package.json | 2 +- .../form-access/formAccess.schema.ts | 2 +- .../form-access/formAccess.utils.ts | 2 +- .../form-builder/formBuilder.component.tsx | 2 +- .../src/components/form/form.component.tsx | 2 +- .../src/components/form/useForm.hook.ts | 2 +- .../table/utils/mapFormToColumns.tsx | 4 +- packages/react-formio/src/index.ts | 2 +- .../react-formio/src/interfaces/FormSchema.ts | 2 +- packages/react-formio/src/typings.d.ts | 2 +- packages/react-formio/src/utils/iconClass.ts | 2 +- yarn.lock | 106 +++++++++--------- 40 files changed, 104 insertions(+), 104 deletions(-) diff --git a/package.json b/package.json index 04305e66..02d7ac7d 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ }, "dependencies": { "@formio/choices.js": "^9.0.1", + "@formio/js": "4.21.6", "@types/classnames": "^2.2.11", "@types/react": "^18.2.8", "@types/react-dnd": "3.0.2", @@ -45,7 +46,6 @@ "@types/react-router-dom": "^5.3.3", "@types/react-table": "^7.7.14", "connected-react-router": "6.9.1", - "formiojs": "4.21.6", "history": "5.3.0", "lerna": "8.1.2", "lodash": "4.17.21", diff --git a/packages/integration/package.json b/packages/integration/package.json index c5ada4dd..1b35b111 100644 --- a/packages/integration/package.json +++ b/packages/integration/package.json @@ -14,7 +14,7 @@ }, "peerDependencies": { "@formio/choices.js": ">=9.0.1", - "formiojs": ">=4.0.0", + "@formio/js": ">=4.0.0", "lodash": ">=4.17.20", "react": ">=16.14.0", "react-dnd": ">=16.0.1", diff --git a/packages/react-formio-container/package.json b/packages/react-formio-container/package.json index 4cdfa135..c917ecc3 100644 --- a/packages/react-formio-container/package.json +++ b/packages/react-formio-container/package.json @@ -26,12 +26,12 @@ }, "peerDependencies": { "@formio/choices.js": "^9.0.1", + "@formio/js": "^4.21.6", "@tsed/react-formio": "3.0.0-alpha.1", "@tsed/react-formio-stores": "3.0.0-alpha.1", "classnames": "^2.3.1", "connected-react-router": "^6.9.1", "file-saver": "^2.0.5", - "formiojs": "^4.21.6", "lodash": "^4.17.21", "react": "^18.3.1", "react-dom": "^18.3.1", @@ -52,6 +52,9 @@ "vitest": "2.1.8" }, "peerDependenciesMeta": { + "@formio/js": { + "optional": false + }, "choices.js": { "optional": false }, @@ -64,9 +67,6 @@ "file-saver": { "optional": false }, - "formiojs": { - "optional": false - }, "lodash": { "optional": false }, diff --git a/packages/react-formio-stores/package.json b/packages/react-formio-stores/package.json index c7964d24..bae730c0 100644 --- a/packages/react-formio-stores/package.json +++ b/packages/react-formio-stores/package.json @@ -24,7 +24,7 @@ }, "peerDependencies": { "@formio/choices.js": ">=9.0.1", - "formiojs": ">=4.0.0", + "@formio/js": ">=4.0.0", "lodash": ">=4.17.20", "react": ">=16.14.0", "react-dom": ">=16.14.0", diff --git a/packages/react-formio-stores/src/stores/action-info/action-info.actions.spec.ts b/packages/react-formio-stores/src/stores/action-info/action-info.actions.spec.ts index 55c97ac3..63ccdf45 100644 --- a/packages/react-formio-stores/src/stores/action-info/action-info.actions.spec.ts +++ b/packages/react-formio-stores/src/stores/action-info/action-info.actions.spec.ts @@ -1,8 +1,8 @@ -import { Formio } from "formiojs"; +import { Formio } from "@formio/js"; import { getActionInfo, receiveActionInfo, requestActionInfo } from "./action-info.actions"; -vi.mock("formiojs", async (originalImport) => { +vi.mock("@formio/js", async (originalImport) => { return { ...(await originalImport()), Formio: class { diff --git a/packages/react-formio-stores/src/stores/action-info/action-info.actions.ts b/packages/react-formio-stores/src/stores/action-info/action-info.actions.ts index 63137884..5e8f509d 100644 --- a/packages/react-formio-stores/src/stores/action-info/action-info.actions.ts +++ b/packages/react-formio-stores/src/stores/action-info/action-info.actions.ts @@ -1,5 +1,5 @@ +import { Formio } from "@formio/js"; import { createAction } from "@tsed/redux-utils"; -import { Formio } from "formiojs"; import noop from "lodash/noop"; import { getFormUrl } from "../../utils/url"; diff --git a/packages/react-formio-stores/src/stores/action/action.actions.spec.ts b/packages/react-formio-stores/src/stores/action/action.actions.spec.ts index bc19b00a..2b4b78ac 100644 --- a/packages/react-formio-stores/src/stores/action/action.actions.spec.ts +++ b/packages/react-formio-stores/src/stores/action/action.actions.spec.ts @@ -1,4 +1,4 @@ -import { Formio } from "formiojs"; +import { Formio } from "@formio/js"; import { getActionInfo } from "../action-info"; import { @@ -12,7 +12,7 @@ import { sendAction } from "./action.actions"; -vi.mock("formiojs", async (originalImport) => { +vi.mock("@formio/js", async (originalImport) => { return { ...(await originalImport()), Formio: class { diff --git a/packages/react-formio-stores/src/stores/action/action.actions.ts b/packages/react-formio-stores/src/stores/action/action.actions.ts index 7f6f2b71..a3271635 100644 --- a/packages/react-formio-stores/src/stores/action/action.actions.ts +++ b/packages/react-formio-stores/src/stores/action/action.actions.ts @@ -1,5 +1,5 @@ +import { Formio } from "@formio/js"; import { createAction } from "@tsed/redux-utils"; -import { Formio } from "formiojs"; import get from "lodash/get"; import noop from "lodash/noop"; diff --git a/packages/react-formio-stores/src/stores/actions/actions.actions.spec.ts b/packages/react-formio-stores/src/stores/actions/actions.actions.spec.ts index 9cf945be..bede56dd 100644 --- a/packages/react-formio-stores/src/stores/actions/actions.actions.spec.ts +++ b/packages/react-formio-stores/src/stores/actions/actions.actions.spec.ts @@ -1,8 +1,8 @@ -import { Formio } from "formiojs"; +import { Formio } from "@formio/js"; import { getActions, receiveActions, requestActions, resetActions } from "./actions.actions"; -vi.mock("formiojs", async (originalImport) => { +vi.mock("@formio/js", async (originalImport) => { return { ...(await originalImport()), Formio: class { diff --git a/packages/react-formio-stores/src/stores/actions/actions.actions.ts b/packages/react-formio-stores/src/stores/actions/actions.actions.ts index d087a33b..eeea69c9 100644 --- a/packages/react-formio-stores/src/stores/actions/actions.actions.ts +++ b/packages/react-formio-stores/src/stores/actions/actions.actions.ts @@ -1,5 +1,5 @@ +import { Formio } from "@formio/js"; import { createAction } from "@tsed/redux-utils"; -import { Formio } from "formiojs"; import noop from "lodash/noop"; import { getFormUrl } from "../../utils/url"; diff --git a/packages/react-formio-stores/src/stores/auth/getAccess.action.spec.ts b/packages/react-formio-stores/src/stores/auth/getAccess.action.spec.ts index 91f1f65c..e3aa59f2 100644 --- a/packages/react-formio-stores/src/stores/auth/getAccess.action.spec.ts +++ b/packages/react-formio-stores/src/stores/auth/getAccess.action.spec.ts @@ -1,4 +1,4 @@ -import { Formio } from "formiojs"; +import { Formio } from "@formio/js"; import { formAccessUser, submissionAccessUser, userForms, userRoles } from "./auth.actions"; import { AUTH } from "./auth.constant"; diff --git a/packages/react-formio-stores/src/stores/auth/getAccess.action.ts b/packages/react-formio-stores/src/stores/auth/getAccess.action.ts index 1476d75f..8778f9e7 100644 --- a/packages/react-formio-stores/src/stores/auth/getAccess.action.ts +++ b/packages/react-formio-stores/src/stores/auth/getAccess.action.ts @@ -1,5 +1,5 @@ +import { Formio } from "@formio/js"; import type { FormSchema, RoleSchema } from "@tsed/react-formio"; -import { Formio } from "formiojs"; import { formAccessUser, submissionAccessUser, userForms, userRoles } from "./auth.actions"; import { AUTH } from "./auth.constant"; diff --git a/packages/react-formio-stores/src/stores/auth/getProjectAccess.action.ts b/packages/react-formio-stores/src/stores/auth/getProjectAccess.action.ts index b6162c2d..32d889ac 100644 --- a/packages/react-formio-stores/src/stores/auth/getProjectAccess.action.ts +++ b/packages/react-formio-stores/src/stores/auth/getProjectAccess.action.ts @@ -1,4 +1,4 @@ -import { Formio } from "formiojs"; +import { Formio } from "@formio/js"; import { projectAccessUser } from "./auth.actions"; import { AUTH } from "./auth.constant"; diff --git a/packages/react-formio-stores/src/stores/auth/initAuth.action.spec.ts b/packages/react-formio-stores/src/stores/auth/initAuth.action.spec.ts index e7ed661e..e85c6bd0 100644 --- a/packages/react-formio-stores/src/stores/auth/initAuth.action.spec.ts +++ b/packages/react-formio-stores/src/stores/auth/initAuth.action.spec.ts @@ -1,4 +1,4 @@ -import { Formio } from "formiojs"; +import { Formio } from "@formio/js"; import { requestUser } from "./auth.actions"; import { AUTH } from "./auth.constant"; diff --git a/packages/react-formio-stores/src/stores/auth/initAuth.action.ts b/packages/react-formio-stores/src/stores/auth/initAuth.action.ts index f987f57d..9d2e7315 100644 --- a/packages/react-formio-stores/src/stores/auth/initAuth.action.ts +++ b/packages/react-formio-stores/src/stores/auth/initAuth.action.ts @@ -1,4 +1,4 @@ -import { Formio } from "formiojs"; +import { Formio } from "@formio/js"; import noop from "lodash/noop"; import { failUser, requestUser } from "./auth.actions"; diff --git a/packages/react-formio-stores/src/stores/auth/logout.action.spec.ts b/packages/react-formio-stores/src/stores/auth/logout.action.spec.ts index bf7e4f00..995925d1 100644 --- a/packages/react-formio-stores/src/stores/auth/logout.action.spec.ts +++ b/packages/react-formio-stores/src/stores/auth/logout.action.spec.ts @@ -1,11 +1,11 @@ -import { Formio } from "formiojs"; +import { Formio } from "@formio/js"; import { logoutUser } from "./auth.actions"; import { AUTH } from "./auth.constant"; import { logout } from "./logout.action"; vi.mock("./auth.actions"); -vi.mock("formiojs"); +vi.mock("@formio/js"); describe("logout()", () => { beforeEach(() => { diff --git a/packages/react-formio-stores/src/stores/auth/logout.action.ts b/packages/react-formio-stores/src/stores/auth/logout.action.ts index 201b1688..5674a442 100644 --- a/packages/react-formio-stores/src/stores/auth/logout.action.ts +++ b/packages/react-formio-stores/src/stores/auth/logout.action.ts @@ -1,4 +1,4 @@ -import { Formio } from "formiojs"; +import { Formio } from "@formio/js"; import { logoutUser } from "./auth.actions"; import { AUTH } from "./auth.constant"; diff --git a/packages/react-formio-stores/src/stores/auth/setUser.action.spec.ts b/packages/react-formio-stores/src/stores/auth/setUser.action.spec.ts index aa3c134f..25596a8f 100644 --- a/packages/react-formio-stores/src/stores/auth/setUser.action.spec.ts +++ b/packages/react-formio-stores/src/stores/auth/setUser.action.spec.ts @@ -1,4 +1,4 @@ -import { Formio } from "formiojs"; +import { Formio } from "@formio/js"; import { receiveUser } from "./auth.actions"; import { AUTH } from "./auth.constant"; diff --git a/packages/react-formio-stores/src/stores/auth/setUser.action.ts b/packages/react-formio-stores/src/stores/auth/setUser.action.ts index f60fd8f4..c1965d39 100644 --- a/packages/react-formio-stores/src/stores/auth/setUser.action.ts +++ b/packages/react-formio-stores/src/stores/auth/setUser.action.ts @@ -1,4 +1,4 @@ -import { Formio } from "formiojs"; +import { Formio } from "@formio/js"; import { receiveUser } from "./auth.actions"; import { AUTH } from "./auth.constant"; diff --git a/packages/react-formio-stores/src/stores/form/form.actions.spec.ts b/packages/react-formio-stores/src/stores/form/form.actions.spec.ts index 3a216f23..19fa4573 100644 --- a/packages/react-formio-stores/src/stores/form/form.actions.spec.ts +++ b/packages/react-formio-stores/src/stores/form/form.actions.spec.ts @@ -1,8 +1,8 @@ -import { Formio } from "formiojs"; +import { Formio } from "@formio/js"; import { deleteForm, failForm, getForm, receiveForm, requestForm, resetForm, saveForm, sendForm } from "./form.actions"; -vi.mock("formiojs", async (originalImport) => { +vi.mock("@formio/js", async (originalImport) => { return { ...(await originalImport()), Formio: class { diff --git a/packages/react-formio-stores/src/stores/form/form.actions.ts b/packages/react-formio-stores/src/stores/form/form.actions.ts index 3386ec3c..f7736860 100644 --- a/packages/react-formio-stores/src/stores/form/form.actions.ts +++ b/packages/react-formio-stores/src/stores/form/form.actions.ts @@ -1,6 +1,6 @@ +import { Formio } from "@formio/js"; import type { FormSchema } from "@tsed/react-formio"; import { createAction } from "@tsed/redux-utils"; -import { Formio } from "formiojs"; import noop from "lodash/noop"; import { getFormUrl } from "../../utils/url"; diff --git a/packages/react-formio-stores/src/stores/forms/forms.actions.spec.ts b/packages/react-formio-stores/src/stores/forms/forms.actions.spec.ts index 4f02eb32..9494eeaf 100644 --- a/packages/react-formio-stores/src/stores/forms/forms.actions.spec.ts +++ b/packages/react-formio-stores/src/stores/forms/forms.actions.spec.ts @@ -1,9 +1,9 @@ -import { Formio } from "formiojs"; +import { Formio } from "@formio/js"; import { mapRequestParams } from "../../utils/mapRequestParams"; import { failForms, getForms, receiveForms, requestForms } from "./forms.actions"; -vi.mock("formiojs", async (originalImport) => { +vi.mock("@formio/js", async (originalImport) => { return { ...(await originalImport()), Formio: class { diff --git a/packages/react-formio-stores/src/stores/forms/forms.actions.ts b/packages/react-formio-stores/src/stores/forms/forms.actions.ts index f10383ec..39bef337 100644 --- a/packages/react-formio-stores/src/stores/forms/forms.actions.ts +++ b/packages/react-formio-stores/src/stores/forms/forms.actions.ts @@ -1,6 +1,6 @@ +import { Formio } from "@formio/js"; import type { FormSchema } from "@tsed/react-formio"; import { createAction } from "@tsed/redux-utils"; -import { Formio } from "formiojs"; import noop from "lodash/noop"; import { mapRequestParams, RequestParamsOptions } from "../../utils/mapRequestParams"; diff --git a/packages/react-formio-stores/src/stores/submission/submission.actions.spec.ts b/packages/react-formio-stores/src/stores/submission/submission.actions.spec.ts index 0fc203e7..9e2d4215 100644 --- a/packages/react-formio-stores/src/stores/submission/submission.actions.spec.ts +++ b/packages/react-formio-stores/src/stores/submission/submission.actions.spec.ts @@ -1,4 +1,4 @@ -import { Formio } from "formiojs"; +import { Formio } from "@formio/js"; import { clearSubmissionError, @@ -12,7 +12,7 @@ import { sendSubmission } from "./submission.actions"; -vi.mock("formiojs", async (originalImport) => { +vi.mock("@formio/js", async (originalImport) => { return { ...(await originalImport()), Formio: class { diff --git a/packages/react-formio-stores/src/stores/submission/submission.actions.ts b/packages/react-formio-stores/src/stores/submission/submission.actions.ts index 6fd90f5f..5038a0f9 100644 --- a/packages/react-formio-stores/src/stores/submission/submission.actions.ts +++ b/packages/react-formio-stores/src/stores/submission/submission.actions.ts @@ -1,6 +1,6 @@ +import { Formio } from "@formio/js"; import { Submission } from "@tsed/react-formio"; import { createAction } from "@tsed/redux-utils"; -import { Formio } from "formiojs"; import noop from "lodash/noop"; import { getSubmissionUrl } from "../../utils/url"; diff --git a/packages/react-formio-stores/src/stores/submissions/submissions.actions.spec.ts b/packages/react-formio-stores/src/stores/submissions/submissions.actions.spec.ts index d3beca4b..1d566a91 100644 --- a/packages/react-formio-stores/src/stores/submissions/submissions.actions.spec.ts +++ b/packages/react-formio-stores/src/stores/submissions/submissions.actions.spec.ts @@ -1,9 +1,9 @@ -import { Formio } from "formiojs"; +import { Formio } from "@formio/js"; import { mapRequestParams } from "../../utils/mapRequestParams"; import { failSubmissions, getSubmissions, receiveSubmissions, requestSubmissions } from "./submissions.actions"; -vi.mock("formiojs", async (originalImport) => { +vi.mock("@formio/js", async (originalImport) => { return { ...(await originalImport()), Formio: class { diff --git a/packages/react-formio-stores/src/stores/submissions/submissions.actions.ts b/packages/react-formio-stores/src/stores/submissions/submissions.actions.ts index 8f1ad4c8..b956e601 100644 --- a/packages/react-formio-stores/src/stores/submissions/submissions.actions.ts +++ b/packages/react-formio-stores/src/stores/submissions/submissions.actions.ts @@ -1,5 +1,5 @@ +import { Formio } from "@formio/js"; import { createAction } from "@tsed/redux-utils"; -import { Formio } from "formiojs"; import noop from "lodash/noop"; import { mapRequestParams } from "../../utils/mapRequestParams"; diff --git a/packages/react-formio-stores/src/utils/url.ts b/packages/react-formio-stores/src/utils/url.ts index b2e7aa25..db684bc4 100644 --- a/packages/react-formio-stores/src/utils/url.ts +++ b/packages/react-formio-stores/src/utils/url.ts @@ -1,4 +1,4 @@ -import { Formio, Utils } from "formiojs"; +import { Formio, Utils } from "@formio/js"; export function getFormUrl(formId: string): string { const url = [Formio.getProjectUrl()]; diff --git a/packages/react-formio/package.json b/packages/react-formio/package.json index ea881244..904610fc 100644 --- a/packages/react-formio/package.json +++ b/packages/react-formio/package.json @@ -30,7 +30,7 @@ }, "peerDependencies": { "@formio/choices.js": ">=9.0.1", - "formiojs": ">=4.0.0", + "@formio/js": ">=4.0.0", "lodash": ">=4.17.20", "moment": ">=2.30.1", "react": ">=16.14.0", diff --git a/packages/react-formio/src/components/form-access/formAccess.schema.ts b/packages/react-formio/src/components/form-access/formAccess.schema.ts index b04844cc..d5a4c9a8 100644 --- a/packages/react-formio/src/components/form-access/formAccess.schema.ts +++ b/packages/react-formio/src/components/form-access/formAccess.schema.ts @@ -1,4 +1,4 @@ -import { ExtendedComponentSchema } from "formiojs"; +import { ExtendedComponentSchema } from "@formio/js"; import { FormSchema } from "../../interfaces/FormSchema"; diff --git a/packages/react-formio/src/components/form-access/formAccess.utils.ts b/packages/react-formio/src/components/form-access/formAccess.utils.ts index a5cd696d..70c324e1 100644 --- a/packages/react-formio/src/components/form-access/formAccess.utils.ts +++ b/packages/react-formio/src/components/form-access/formAccess.utils.ts @@ -1,4 +1,4 @@ -import { ExtendedComponentSchema } from "formiojs"; +import { ExtendedComponentSchema } from "@formio/js"; import cloneDeep from "lodash/cloneDeep"; import isEqual from "lodash/isEqual"; import noop from "lodash/noop"; diff --git a/packages/react-formio/src/components/form-builder/formBuilder.component.tsx b/packages/react-formio/src/components/form-builder/formBuilder.component.tsx index fc0f92e3..67c5f54b 100755 --- a/packages/react-formio/src/components/form-builder/formBuilder.component.tsx +++ b/packages/react-formio/src/components/form-builder/formBuilder.component.tsx @@ -1,4 +1,4 @@ -import { ComponentSchema } from "formiojs"; +import { ComponentSchema } from "@formio/js"; import AllComponents from "formiojs/components"; import Components from "formiojs/components/Components"; import FormioFormBuilder from "formiojs/FormBuilder"; diff --git a/packages/react-formio/src/components/form/form.component.tsx b/packages/react-formio/src/components/form/form.component.tsx index 4bde4f4c..f137e622 100755 --- a/packages/react-formio/src/components/form/form.component.tsx +++ b/packages/react-formio/src/components/form/form.component.tsx @@ -1,4 +1,4 @@ -import { Components } from "formiojs"; +import { Components } from "@formio/js"; import AllComponents from "formiojs/components"; import { useForm, UseFormHookProps } from "./useForm.hook"; diff --git a/packages/react-formio/src/components/form/useForm.hook.ts b/packages/react-formio/src/components/form/useForm.hook.ts index d2f4b2a4..2ee8b9c9 100644 --- a/packages/react-formio/src/components/form/useForm.hook.ts +++ b/packages/react-formio/src/components/form/useForm.hook.ts @@ -1,4 +1,4 @@ -import { ExtendedComponentSchema, Form } from "formiojs"; +import { ExtendedComponentSchema, Form } from "@formio/js"; import cloneDeep from "lodash/cloneDeep"; import isEqual from "lodash/isEqual"; import { useEffect, useRef } from "react"; diff --git a/packages/react-formio/src/components/table/utils/mapFormToColumns.tsx b/packages/react-formio/src/components/table/utils/mapFormToColumns.tsx index e7de18ad..c01074ac 100644 --- a/packages/react-formio/src/components/table/utils/mapFormToColumns.tsx +++ b/packages/react-formio/src/components/table/utils/mapFormToColumns.tsx @@ -1,5 +1,5 @@ -import { Components, ExtendedComponentSchema } from "formiojs"; -import FormioUtils from "formiojs/utils"; +import { Components, ExtendedComponentSchema } from "@formio/js"; +import FormioUtils from "@formio/js/utils"; import { FormSchema } from "../../../interfaces"; import { DefaultCell } from "../components/defaultCell.component"; diff --git a/packages/react-formio/src/index.ts b/packages/react-formio/src/index.ts index a7f13584..043158f2 100644 --- a/packages/react-formio/src/index.ts +++ b/packages/react-formio/src/index.ts @@ -17,4 +17,4 @@ export * from "./utils/callLast"; export * from "./utils/iconClass"; export * from "./utils/mapPagination"; export * from "./utils/stopPropagationWrapper"; -export { Components, Formio, Templates, Utils } from "formiojs"; +export { Components, Formio, Templates, Utils } from "@formio/js"; diff --git a/packages/react-formio/src/interfaces/FormSchema.ts b/packages/react-formio/src/interfaces/FormSchema.ts index b1696396..1accde38 100644 --- a/packages/react-formio/src/interfaces/FormSchema.ts +++ b/packages/react-formio/src/interfaces/FormSchema.ts @@ -1,4 +1,4 @@ -import { ExtendedComponentSchema } from "formiojs"; +import { ExtendedComponentSchema } from "@formio/js"; export type FormSchema = { _id?: string; diff --git a/packages/react-formio/src/typings.d.ts b/packages/react-formio/src/typings.d.ts index 5bc2bd11..e261d4b0 100644 --- a/packages/react-formio/src/typings.d.ts +++ b/packages/react-formio/src/typings.d.ts @@ -1,3 +1,3 @@ -declare module "formiojs/*" { +declare module "@formio/js/*" { export = {} as any; } diff --git a/packages/react-formio/src/utils/iconClass.ts b/packages/react-formio/src/utils/iconClass.ts index 5ffdda35..d9bc68a8 100644 --- a/packages/react-formio/src/utils/iconClass.ts +++ b/packages/react-formio/src/utils/iconClass.ts @@ -1,4 +1,4 @@ -import * as formio from "formiojs"; +import * as formio from "@formio/js"; const { Templates } = formio; diff --git a/yarn.lock b/yarn.lock index 9ffe03a3..9a4ff28a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2449,6 +2449,52 @@ __metadata: languageName: node linkType: hard +"@formio/js@npm:4.21.6": + version: 4.21.6 + resolution: "formiojs@npm:4.21.6" + dependencies: + "@formio/bootstrap3": "npm:2.12.4-rc.1" + "@formio/choices.js": "npm:10.2.1" + "@formio/semantic": "npm:2.6.1" + "@formio/text-mask-addons": "npm:^3.8.0-formio.4" + "@formio/vanilla-text-mask": "npm:^5.1.1-formio.1" + abortcontroller-polyfill: "npm:^1.7.5" + autocompleter: "npm:^7.0.1" + browser-cookies: "npm:^1.2.0" + browser-md5-file: "npm:^1.1.1" + compare-versions: "npm:^5.0.1" + core-js: "npm:^3.26.1" + custom-event-polyfill: "npm:^1.0.7" + dialog-polyfill: "npm:^0.5.6" + dom-autoscroller: "npm:^2.3.4" + dompurify: "npm:^3.0.5" + downloadjs: "npm:^1.4.7" + dragula: "npm:^3.7.3" + eventemitter3: "npm:^4.0.7" + fast-deep-equal: "npm:^3.1.3" + fast-json-patch: "npm:^3.1.1" + fetch-ponyfill: "npm:^7.1.0" + i18next: "npm:22.4.12" + idb: "npm:^7.1.1" + inputmask: "npm:^5.0.9" + ismobilejs: "npm:^1.1.1" + json-logic-js: "npm:^2.0.2" + jstimezonedetect: "npm:^1.0.7" + jwt-decode: "npm:^3.1.2" + lodash: "npm:^4.17.21" + moment: "npm:^2.29.4" + moment-timezone: "npm:^0.5.40" + native-promise-only: "npm:^0.8.1" + quill: "npm:^2.0.0-dev.3" + signature_pad: "npm:^4.1.4" + string-hash: "npm:^1.1.3" + tippy.js: "npm:^6.3.7" + uuid: "npm:^9.0.0" + vanilla-picker: "npm:^2.12.1" + checksum: 10c0/2293e1a8cc7d4c7eb478e3b5caec175e70b285ba13e013a9c8a1767afd81add7d208bc60604e2ec5e7b5fa70310d825f82dcd42d5293da425f1e3146171f0ca4 + languageName: node + linkType: hard + "@formio/semantic@npm:2.6.1": version: 2.6.1 resolution: "@formio/semantic@npm:2.6.1" @@ -5346,12 +5392,12 @@ __metadata: vitest: "npm:2.1.8" peerDependencies: "@formio/choices.js": ^9.0.1 + "@formio/js": ^4.21.6 "@tsed/react-formio": 3.0.0-alpha.1 "@tsed/react-formio-stores": 3.0.0-alpha.1 classnames: ^2.3.1 connected-react-router: ^6.9.1 file-saver: ^2.0.5 - formiojs: ^4.21.6 lodash: ^4.17.21 react: ^18.3.1 react-dom: ^18.3.1 @@ -5363,6 +5409,8 @@ __metadata: redux-thunk: ^2.4.1 tooltip.js: ^1.3.3 peerDependenciesMeta: + "@formio/js": + optional: false choices.js: optional: false classnames: @@ -5371,8 +5419,6 @@ __metadata: optional: false file-saver: optional: false - formiojs: - optional: false lodash: optional: false react: @@ -5410,7 +5456,7 @@ __metadata: vitest: "npm:2.1.8" peerDependencies: "@formio/choices.js": ">=9.0.1" - formiojs: ">=4.0.0" + "@formio/js": ">=4.0.0" lodash: ">=4.17.20" react: ">=16.14.0" react-dnd: ">=16.0.1" @@ -5432,7 +5478,7 @@ __metadata: vitest: "npm:2.1.8" peerDependencies: "@formio/choices.js": ">=9.0.1" - formiojs: ">=4.0.0" + "@formio/js": ">=4.0.0" lodash: ">=4.17.20" react: ">=16.14.0" react-dom: ">=16.14.0" @@ -5454,7 +5500,7 @@ __metadata: vitest: "npm:2.1.8" peerDependencies: "@formio/choices.js": ">=9.0.1" - formiojs: ">=4.0.0" + "@formio/js": ">=4.0.0" lodash: ">=4.17.20" moment: ">=2.30.1" react: ">=16.14.0" @@ -5486,6 +5532,7 @@ __metadata: "@commitlint/cli": "npm:19.6.1" "@commitlint/config-conventional": "npm:19.6.0" "@formio/choices.js": "npm:^9.0.1" + "@formio/js": "npm:4.21.6" "@storybook/addon-a11y": "npm:^8.4.7" "@storybook/addon-essentials": "npm:^8.4.7" "@storybook/addon-interactions": "npm:^8.4.7" @@ -5536,7 +5583,6 @@ __metadata: eslint-plugin-storybook: "npm:0.11.1" eslint-plugin-testing-library: "npm:7.1.1" eslint-plugin-workspaces: "npm:0.10.1" - formiojs: "npm:4.21.6" fs-extra: "npm:10.1.0" globby: "npm:^14.0.2" history: "npm:5.3.0" @@ -11271,52 +11317,6 @@ __metadata: languageName: node linkType: hard -"formiojs@npm:4.21.6": - version: 4.21.6 - resolution: "formiojs@npm:4.21.6" - dependencies: - "@formio/bootstrap3": "npm:2.12.4-rc.1" - "@formio/choices.js": "npm:10.2.1" - "@formio/semantic": "npm:2.6.1" - "@formio/text-mask-addons": "npm:^3.8.0-formio.4" - "@formio/vanilla-text-mask": "npm:^5.1.1-formio.1" - abortcontroller-polyfill: "npm:^1.7.5" - autocompleter: "npm:^7.0.1" - browser-cookies: "npm:^1.2.0" - browser-md5-file: "npm:^1.1.1" - compare-versions: "npm:^5.0.1" - core-js: "npm:^3.26.1" - custom-event-polyfill: "npm:^1.0.7" - dialog-polyfill: "npm:^0.5.6" - dom-autoscroller: "npm:^2.3.4" - dompurify: "npm:^3.0.5" - downloadjs: "npm:^1.4.7" - dragula: "npm:^3.7.3" - eventemitter3: "npm:^4.0.7" - fast-deep-equal: "npm:^3.1.3" - fast-json-patch: "npm:^3.1.1" - fetch-ponyfill: "npm:^7.1.0" - i18next: "npm:22.4.12" - idb: "npm:^7.1.1" - inputmask: "npm:^5.0.9" - ismobilejs: "npm:^1.1.1" - json-logic-js: "npm:^2.0.2" - jstimezonedetect: "npm:^1.0.7" - jwt-decode: "npm:^3.1.2" - lodash: "npm:^4.17.21" - moment: "npm:^2.29.4" - moment-timezone: "npm:^0.5.40" - native-promise-only: "npm:^0.8.1" - quill: "npm:^2.0.0-dev.3" - signature_pad: "npm:^4.1.4" - string-hash: "npm:^1.1.3" - tippy.js: "npm:^6.3.7" - uuid: "npm:^9.0.0" - vanilla-picker: "npm:^2.12.1" - checksum: 10c0/2293e1a8cc7d4c7eb478e3b5caec175e70b285ba13e013a9c8a1767afd81add7d208bc60604e2ec5e7b5fa70310d825f82dcd42d5293da425f1e3146171f0ca4 - languageName: node - linkType: hard - "fraction.js@npm:^4.2.0": version: 4.2.0 resolution: "fraction.js@npm:4.2.0"