🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@formio/react

Package Overview
Dependencies
Maintainers
7
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@formio/react - npm Package Compare versions

Comparing version

to
6.0.0-dev.607.71918a4

10

lib/components/__tests__/Form.test.js

@@ -14,2 +14,3 @@ "use strict";

const react_1 = require("@testing-library/react");
const dom_1 = require("@testing-library/dom");
require("@testing-library/jest-dom");

@@ -39,2 +40,3 @@ const Form_1 = require("../Form");

key: 'submit',
input: true,
disableOnInvalid: true,

@@ -46,8 +48,8 @@ },

const executeTests = () => __awaiter(void 0, void 0, void 0, function* () {
expect(react_1.screen.getByText('First Name')).toBeInTheDocument();
expect(react_1.screen.getByText('Last Name')).toBeInTheDocument();
expect(react_1.screen.getByText('Submit')).toBeInTheDocument();
expect(yield react_1.screen.findByRole('button')).toBeDisabled();
expect(dom_1.screen.getByText('First Name')).toBeInTheDocument();
expect(dom_1.screen.getByText('Last Name')).toBeInTheDocument();
expect(dom_1.screen.getByText('Submit')).toBeInTheDocument();
expect(yield dom_1.screen.findByRole('button')).toBeDisabled();
});
(0, react_1.render)((0, jsx_runtime_1.jsx)(Form_1.Form, { src: simpleForm, onFormReady: executeTests }));
}));

@@ -5,7 +5,6 @@ export default Errors;

namespace propTypes {
let errors: PropTypes.Requireable<any>;
let type: PropTypes.Requireable<string>;
let errors: any;
let type: any;
}
}
import PropTypes from 'prop-types';
//# sourceMappingURL=Errors.d.ts.map

1

lib/components/FormEdit.js

@@ -38,2 +38,3 @@ "use strict";

theme: 'primary',
input: true,
},

@@ -40,0 +41,0 @@ ],

import { Form as FormType } from '@formio/core';
import { JSON } from './Form';
import { ReactNode } from 'react';
import type { JSX } from 'react';
export type Action = {

@@ -5,0 +6,0 @@ name: string;

export function Report(props: ReportProps): JSX.Element;
export namespace Report {
namespace propTypes {
let src: PropTypes.Requireable<string>;
let projectEndpoint: PropTypes.Requireable<string>;
let report: PropTypes.Requireable<object>;
let options: PropTypes.Requireable<PropTypes.InferProps<{
readOnly: PropTypes.Requireable<boolean>;
noAlerts: PropTypes.Requireable<boolean>;
i18n: PropTypes.Requireable<object>;
template: PropTypes.Requireable<string>;
language: PropTypes.Requireable<string>;
}>>;
let onRowClick: PropTypes.Requireable<(...args: any[]) => any>;
let onRowSelectChange: PropTypes.Requireable<(...args: any[]) => any>;
let onFetchDataError: PropTypes.Requireable<(...args: any[]) => any>;
let onChangeItemsPerPage: PropTypes.Requireable<(...args: any[]) => any>;
let onPage: PropTypes.Requireable<(...args: any[]) => any>;
let onChange: PropTypes.Requireable<(...args: any[]) => any>;
let onFormLoad: PropTypes.Requireable<(...args: any[]) => any>;
let onError: PropTypes.Requireable<(...args: any[]) => any>;
let onRender: PropTypes.Requireable<(...args: any[]) => any>;
let onFocus: PropTypes.Requireable<(...args: any[]) => any>;
let onBlur: PropTypes.Requireable<(...args: any[]) => any>;
let onInitialized: PropTypes.Requireable<(...args: any[]) => any>;
let onReportReady: PropTypes.Requireable<(...args: any[]) => any>;
let src: any;
let projectEndpoint: any;
let report: any;
let options: any;
let onRowClick: any;
let onRowSelectChange: any;
let onFetchDataError: any;
let onChangeItemsPerPage: any;
let onPage: any;
let onChange: any;
let onFormLoad: any;
let onError: any;
let onRender: any;
let onFocus: any;
let onBlur: any;
let onInitialized: any;
let onReportReady: any;
}

@@ -60,4 +54,3 @@ function getDefaultEmitter(): EventEmitter;

};
import PropTypes from 'prop-types';
import { EventEmitter } from '@formio/js';
//# sourceMappingURL=Report.d.ts.map

@@ -13,2 +13,3 @@ "use strict";

const react_1 = require("@testing-library/react");
const dom_1 = require("@testing-library/dom");
const usePagination_1 = require("../usePagination");

@@ -29,3 +30,3 @@ it('should return correct paginated data when passed a static array', () => {

const { result } = (0, react_1.renderHook)(() => (0, usePagination_1.usePagination)(1, 10, fetchFunction));
(0, react_1.waitFor)(() => {
(0, dom_1.waitFor)(() => {
const { data } = result.current;

@@ -32,0 +33,0 @@ expect(data).toEqual([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);

{
"name": "@formio/react",
"version": "6.0.0-dev.600.9001656",
"version": "6.0.0-dev.607.71918a4",
"description": "React renderer for form.io forms.",

@@ -37,9 +37,10 @@ "main": "lib/index.js",

"devDependencies": {
"@formio/core": "2.2.2-rc.5",
"@formio/js": "5.0.0-rc.76",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.2.2",
"@formio/core": "^2.4.0",
"@formio/js": "^5.1.1",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.2",
"@testing-library/react": "^16.1.1",
"@types/jest": "^29.5.12",
"@types/lodash": "^4.14.202",
"@types/react": "^18.2.55",
"@types/react": "^19.0.0",
"@types/ungap__structured-clone": "^1.2.0",

@@ -60,4 +61,4 @@ "@typescript-eslint/eslint-plugin": "^7.0.1",

"prettier": "3.2.4",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"ts-jest": "^29.1.2",

@@ -73,7 +74,7 @@ "ts-node": "^10.9.2",

"peerDependencies": {
"@formio/core": "2.2.2-rc.5",
"@formio/js": "5.0.0-rc.76",
"react": "^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.1.0",
"react-dom": "^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.1.0"
"@formio/core": "2.4.0",
"@formio/js": "5.1.1",
"react": "^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.1.0 || ^19.0.0",
"react-dom": "^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.1.0 || ^19.0.0"
}
}

@@ -20,2 +20,23 @@ # @formio/react

## Usage with Vite (Note: When using frameworks like Next.js or Create React App, no extra Vite configuration is necessary)
When using @formio/react in a project built with Vite (especially for React 18 and 19), make sure you install the @vitejs/plugin-react package and configure it in your vite.config.js file.
Install Vite React Plugin
```bash
yarn add --dev @vitejs/plugin-react
```
In your vite.config.js, add the React plugin:
```bash
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
});
```
## Hooks

@@ -22,0 +43,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet