@codeleap/utils 5.8.21 → 6.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codeleap/utils",
3
- "version": "5.8.21",
3
+ "version": "6.1.2",
4
4
  "main": "src/index.ts",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -9,19 +9,19 @@
9
9
  "directory": "packages/utils"
10
10
  },
11
11
  "devDependencies": {
12
- "@codeleap/config": "5.8.21",
13
- "@codeleap/types": "5.8.21",
12
+ "@codeleap/config": "6.1.2",
13
+ "@codeleap/types": "6.1.2",
14
14
  "ts-node-dev": "1.1.8"
15
15
  },
16
16
  "scripts": {
17
17
  "build": "echo 'No build needed'"
18
18
  },
19
19
  "peerDependencies": {
20
- "@codeleap/types": "5.8.21",
20
+ "@codeleap/types": "6.1.2",
21
21
  "axios": "^1.7.9",
22
- "dayjs": "1.11.13",
22
+ "dayjs": "1.11.18",
23
23
  "typescript": "5.5.2",
24
- "react": "18.2.0",
24
+ "react": "19.1.0",
25
25
  "@tanstack/react-query": "5.89.0"
26
26
  },
27
27
  "dependencies": {
package/package.json.bak CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codeleap/utils",
3
- "version": "5.8.21",
3
+ "version": "6.1.2",
4
4
  "main": "src/index.ts",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -19,9 +19,9 @@
19
19
  "peerDependencies": {
20
20
  "@codeleap/types": "workspace:*",
21
21
  "axios": "^1.7.9",
22
- "dayjs": "1.11.13",
22
+ "dayjs": "1.11.18",
23
23
  "typescript": "5.5.2",
24
- "react": "18.2.0",
24
+ "react": "19.1.0",
25
25
  "@tanstack/react-query": "5.89.0"
26
26
  },
27
27
  "dependencies": {
package/src/react.tsx CHANGED
@@ -68,21 +68,24 @@ export function getRenderedComponent<P = any>(
68
68
  DefaultComponent: React.ComponentType<P>,
69
69
  props?: P,
70
70
  ): React.ReactNode {
71
+ const _ComponentOrProps = ComponentOrProps as any
72
+ const _DefaultComponent = DefaultComponent as any
73
+
71
74
  if (TypeGuards.isNil(ComponentOrProps) || Object.keys(ComponentOrProps).length === 0) {
72
75
  return null
73
76
  }
74
77
 
75
78
  if (TypeGuards.isFunction(ComponentOrProps)) {
76
- return <ComponentOrProps {...props} />
79
+ return <_ComponentOrProps {...props as unknown as P} />
77
80
  }
78
81
 
79
82
  if (React.isValidElement(ComponentOrProps)) {
80
83
  return ComponentOrProps
81
84
  }
82
85
 
83
- const _props = ComponentOrProps as P
86
+ const _props = ComponentOrProps as unknown as P
84
87
 
85
- return <DefaultComponent {...props} {..._props} />
88
+ return <_DefaultComponent {...props as unknown as P} {..._props} />
86
89
  }
87
90
 
88
91
  /**