@firecms/core 3.0.0-canary.75 → 3.0.0-canary.76
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/dist/index.es.js +525 -557
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/dist/util/icons.d.ts +2 -2
- package/package.json +18 -18
- package/src/util/objects.ts +17 -7
package/dist/util/icons.d.ts
CHANGED
|
@@ -8,6 +8,6 @@ export type IconViewProps = {
|
|
|
8
8
|
icon?: string;
|
|
9
9
|
};
|
|
10
10
|
export declare const IconForView: React.NamedExoticComponent<{
|
|
11
|
-
collectionOrView?: IconViewProps
|
|
12
|
-
className?: string
|
|
11
|
+
collectionOrView?: IconViewProps;
|
|
12
|
+
className?: string;
|
|
13
13
|
}>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firecms/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.0-canary.
|
|
4
|
+
"version": "3.0.0-canary.76",
|
|
5
5
|
"description": "Awesome Firebase/Firestore-based headless open-source CMS",
|
|
6
6
|
"funding": {
|
|
7
7
|
"url": "https://github.com/sponsors/firecmsco"
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"./package.json": "./package.json"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@firecms/formex": "^3.0.0-canary.
|
|
50
|
-
"@firecms/ui": "^3.0.0-canary.
|
|
49
|
+
"@firecms/formex": "^3.0.0-canary.76",
|
|
50
|
+
"@firecms/ui": "^3.0.0-canary.76",
|
|
51
51
|
"@fontsource/jetbrains-mono": "^5.0.20",
|
|
52
52
|
"@hello-pangea/dnd": "^16.6.0",
|
|
53
|
-
"@radix-ui/react-portal": "^1.
|
|
53
|
+
"@radix-ui/react-portal": "^1.1.1",
|
|
54
54
|
"clsx": "^2.1.1",
|
|
55
55
|
"date-fns": "^3.6.0",
|
|
56
56
|
"history": "^5.3.0",
|
|
@@ -80,38 +80,38 @@
|
|
|
80
80
|
"@testing-library/react": "^15.0.7",
|
|
81
81
|
"@testing-library/user-event": "^14.5.2",
|
|
82
82
|
"@types/jest": "^29.5.12",
|
|
83
|
-
"@types/node": "^20.
|
|
83
|
+
"@types/node": "^20.14.9",
|
|
84
84
|
"@types/object-hash": "^3.0.6",
|
|
85
85
|
"@types/react": "^18.3.3",
|
|
86
86
|
"@types/react-dom": "^18.3.0",
|
|
87
87
|
"@types/react-measure": "^2.0.12",
|
|
88
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
89
|
-
"@typescript-eslint/parser": "^7.
|
|
90
|
-
"@vitejs/plugin-react": "^4.3.
|
|
88
|
+
"@typescript-eslint/eslint-plugin": "^7.15.0",
|
|
89
|
+
"@typescript-eslint/parser": "^7.15.0",
|
|
90
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
91
91
|
"cross-env": "^7.0.3",
|
|
92
|
-
"eslint": "^
|
|
92
|
+
"eslint": "^9.6.0",
|
|
93
93
|
"eslint-config-standard": "^17.1.0",
|
|
94
94
|
"eslint-plugin-import": "^2.29.1",
|
|
95
95
|
"eslint-plugin-n": "^16.6.2",
|
|
96
|
-
"eslint-plugin-promise": "^6.
|
|
97
|
-
"eslint-plugin-react": "^7.34.
|
|
96
|
+
"eslint-plugin-promise": "^6.4.0",
|
|
97
|
+
"eslint-plugin-react": "^7.34.3",
|
|
98
98
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
99
99
|
"firebase": "^10.12.2",
|
|
100
100
|
"jest": "^29.7.0",
|
|
101
101
|
"npm-run-all": "^4.1.5",
|
|
102
|
-
"react-router": "^6.
|
|
103
|
-
"react-router-dom": "^6.
|
|
104
|
-
"ts-jest": "^29.1.
|
|
102
|
+
"react-router": "^6.24.0",
|
|
103
|
+
"react-router-dom": "^6.24.0",
|
|
104
|
+
"ts-jest": "^29.1.5",
|
|
105
105
|
"ts-node": "^10.9.2",
|
|
106
|
-
"tsd": "^0.31.
|
|
107
|
-
"typescript": "^5.
|
|
108
|
-
"vite": "^5.2
|
|
106
|
+
"tsd": "^0.31.1",
|
|
107
|
+
"typescript": "^5.5.3",
|
|
108
|
+
"vite": "^5.3.2"
|
|
109
109
|
},
|
|
110
110
|
"files": [
|
|
111
111
|
"dist",
|
|
112
112
|
"src"
|
|
113
113
|
],
|
|
114
|
-
"gitHead": "
|
|
114
|
+
"gitHead": "df54d6590d1c0db76feb6d24be3573477d54e85f",
|
|
115
115
|
"publishConfig": {
|
|
116
116
|
"access": "public"
|
|
117
117
|
},
|
package/src/util/objects.ts
CHANGED
|
@@ -141,15 +141,25 @@ export function removePropsIfExisting(source: any, comparison: any) {
|
|
|
141
141
|
|
|
142
142
|
const res = isArray(source) ? [...source] : { ...source };
|
|
143
143
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
if (
|
|
147
|
-
res
|
|
148
|
-
} else if (res[
|
|
149
|
-
|
|
144
|
+
if (isArray(res)) {
|
|
145
|
+
for (let i = res.length - 1; i >= 0; i--) {
|
|
146
|
+
if (res[i] === comparison[i]) {
|
|
147
|
+
res.splice(i, 1);
|
|
148
|
+
} else if (isObject(res[i]) && isObject(comparison[i])) {
|
|
149
|
+
res[i] = removePropsIfExisting(res[i], comparison[i]);
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
}
|
|
152
|
+
} else {
|
|
153
|
+
Object.keys(comparison).forEach(key => {
|
|
154
|
+
if (key in res) {
|
|
155
|
+
if (isObject(res[key]) && isObject(comparison[key])) {
|
|
156
|
+
res[key] = removePropsIfExisting(res[key], comparison[key]);
|
|
157
|
+
} else if (res[key] === comparison[key]) {
|
|
158
|
+
delete res[key];
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}
|
|
153
163
|
|
|
154
164
|
return res;
|
|
155
165
|
}
|