@firecms/core 3.0.0-canary.75 → 3.0.0-canary.77

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.
@@ -8,6 +8,6 @@ export type IconViewProps = {
8
8
  icon?: string;
9
9
  };
10
10
  export declare const IconForView: React.NamedExoticComponent<{
11
- collectionOrView?: IconViewProps | undefined;
12
- className?: string | undefined;
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.75",
4
+ "version": "3.0.0-canary.77",
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.75",
50
- "@firecms/ui": "^3.0.0-canary.75",
49
+ "@firecms/formex": "^3.0.0-canary.77",
50
+ "@firecms/ui": "^3.0.0-canary.77",
51
51
  "@fontsource/jetbrains-mono": "^5.0.20",
52
52
  "@hello-pangea/dnd": "^16.6.0",
53
- "@radix-ui/react-portal": "^1.0.4",
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.12.13",
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.11.0",
89
- "@typescript-eslint/parser": "^7.11.0",
90
- "@vitejs/plugin-react": "^4.3.0",
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": "^8.57.0",
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.2.0",
97
- "eslint-plugin-react": "^7.34.2",
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.23.1",
103
- "react-router-dom": "^6.23.1",
104
- "ts-jest": "^29.1.4",
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.0",
107
- "typescript": "^5.4.5",
108
- "vite": "^5.2.12"
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": "0ea6abe4e3b3d017e31062ae6184902ae7a425de",
114
+ "gitHead": "2eb2e7d18eb036aa68f2c6c633093fc67417cba5",
115
115
  "publishConfig": {
116
116
  "access": "public"
117
117
  },
@@ -141,15 +141,25 @@ export function removePropsIfExisting(source: any, comparison: any) {
141
141
 
142
142
  const res = isArray(source) ? [...source] : { ...source };
143
143
 
144
- Object.keys(comparison).forEach(key => {
145
- if (key in res) {
146
- if (isObject(res[key]) && isObject(comparison[key])) {
147
- res[key] = removePropsIfExisting(res[key], comparison[key]);
148
- } else if (res[key] === comparison[key]) {
149
- isArray(res) ? res.splice(key, 1) : delete res[key];
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
  }