@pronto-tools-and-more/components 6.18.0 → 6.19.0
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +3 -17
- package/src/parts/Components/Components.tsx +2 -1
- package/src/parts/JsonComponent/JsonComponent.tsx +6 -0
- package/src/parts/Login/Login.tsx +6 -2
- package/src/parts/MenuItems/MenuItems.tsx +4 -1
- package/src/parts/MockReact/MockReact.tsx +21 -0
- package/src/parts/NoSearchResults/NoSearchResults.tsx +4 -1
- package/src/parts/SearchField/SearchField.tsx +7 -2
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pronto-tools-and-more/components",
|
3
|
-
"version": "6.
|
3
|
+
"version": "6.19.0",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/main.js",
|
6
6
|
"types": "dist/main.d.ts",
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"type-check": "tsc",
|
10
10
|
"test": "node --unhandled-rejections=warn --experimental-vm-modules ./node_modules/jest/bin/jest.js --detectOpenHandles --forceExit",
|
11
11
|
"test:watch": "node --unhandled-rejections=warn --experimental-vm-modules ./node_modules/jest/bin/jest.js --watch",
|
12
|
-
"build": "esbuild src/main.ts --bundle --format=esm --outfile=dist/main.js && rm tsconfig.tsbuildinfo && npx tsc -
|
12
|
+
"build": "esbuild src/main.ts --bundle --format=esm --outfile=dist/main.js && rm -f tsconfig.tsbuildinfo && npx tsc -p tsconfig.build.json",
|
13
13
|
"build:watch": "esbuild src/main.ts --bundle --format=esm --outfile=dist/main.js --watch"
|
14
14
|
},
|
15
15
|
"keywords": [],
|
@@ -19,21 +19,7 @@
|
|
19
19
|
"@types/node": "^22.5.0",
|
20
20
|
"@types/react": "^18.3.4",
|
21
21
|
"esbuild": "^0.24.0",
|
22
|
+
"react": "^18.3.1",
|
22
23
|
"ts-jest": "^29.2.5"
|
23
|
-
},
|
24
|
-
"jest": {
|
25
|
-
"injectGlobals": false,
|
26
|
-
"extensionsToTreatAsEsm": [
|
27
|
-
".ts"
|
28
|
-
],
|
29
|
-
"moduleNameMapper": {},
|
30
|
-
"transform": {
|
31
|
-
"^.+\\.tsx?$": [
|
32
|
-
"ts-jest",
|
33
|
-
{
|
34
|
-
"useESM": true
|
35
|
-
}
|
36
|
-
]
|
37
|
-
}
|
38
24
|
}
|
39
25
|
}
|
@@ -1,5 +1,9 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import type React from "react";
|
2
|
+
import { JsonComponent } from "../JsonComponent/JsonComponent.tsx";
|
3
|
+
|
4
|
+
export const Login = (): React.ReactNode => {
|
5
|
+
const json = {
|
3
6
|
type: "login",
|
4
7
|
};
|
8
|
+
return <JsonComponent json={json} />;
|
5
9
|
};
|
@@ -1,5 +1,7 @@
|
|
1
|
+
import { JsonComponent } from "../JsonComponent/JsonComponent.tsx";
|
2
|
+
|
1
3
|
export const MenuItems = ({ menuName }: { menuName: string }) => {
|
2
|
-
|
4
|
+
const json = {
|
3
5
|
dataSource: {
|
4
6
|
type: "menu",
|
5
7
|
filter: {
|
@@ -11,4 +13,5 @@ export const MenuItems = ({ menuName }: { menuName: string }) => {
|
|
11
13
|
type: "menu",
|
12
14
|
template: "STATIC",
|
13
15
|
};
|
16
|
+
return <JsonComponent json={json} />;
|
14
17
|
};
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { jest } from "@jest/globals";
|
2
|
+
|
3
|
+
// jest.unstable_mockModule("react", () => {
|
4
|
+
// return {
|
5
|
+
// createElement(key, props, children) {
|
6
|
+
// return {
|
7
|
+
// key,
|
8
|
+
// props,
|
9
|
+
// children,
|
10
|
+
// };
|
11
|
+
// },
|
12
|
+
// };
|
13
|
+
// });
|
14
|
+
|
15
|
+
// jest.unstable_mockModule("react/jsx-runtime", () => {
|
16
|
+
// return {
|
17
|
+
// jsx(fn, props) {
|
18
|
+
// return fn(props);
|
19
|
+
// },
|
20
|
+
// };
|
21
|
+
// });
|
@@ -1,5 +1,7 @@
|
|
1
|
+
import { JsonComponent } from "../JsonComponent/JsonComponent.tsx";
|
2
|
+
|
1
3
|
export const NoSearchResults = () => {
|
2
|
-
|
4
|
+
const json = {
|
3
5
|
tag: "p",
|
4
6
|
type: "html",
|
5
7
|
content: "SEARCH_RESULT_NO_SEARCH",
|
@@ -9,4 +11,5 @@ export const NoSearchResults = () => {
|
|
9
11
|
operation: "NOT_SET",
|
10
12
|
},
|
11
13
|
};
|
14
|
+
return <JsonComponent json={json} />;
|
12
15
|
};
|
@@ -1,6 +1,11 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import React from "react";
|
2
|
+
import { JsonComponent } from "../JsonComponent/JsonComponent.tsx";
|
3
|
+
|
4
|
+
export const SearchField = (): React.ReactElement => {
|
5
|
+
const json = {
|
3
6
|
type: "search-field",
|
4
7
|
className: "searchfield",
|
8
|
+
key: "",
|
5
9
|
};
|
10
|
+
return <JsonComponent json={json} />;
|
6
11
|
};
|