@firecms/core 3.0.0-canary.201 → 3.0.0-canary.202

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@firecms/core",
3
3
  "type": "module",
4
- "version": "3.0.0-canary.201",
4
+ "version": "3.0.0-canary.202",
5
5
  "description": "Awesome Firebase/Firestore-based headless open-source CMS",
6
6
  "funding": {
7
7
  "url": "https://github.com/sponsors/firecmsco"
@@ -50,9 +50,9 @@
50
50
  "./package.json": "./package.json"
51
51
  },
52
52
  "dependencies": {
53
- "@firecms/editor": "^3.0.0-canary.201",
54
- "@firecms/formex": "^3.0.0-canary.201",
55
- "@firecms/ui": "^3.0.0-canary.201",
53
+ "@firecms/editor": "^3.0.0-canary.202",
54
+ "@firecms/formex": "^3.0.0-canary.202",
55
+ "@firecms/ui": "^3.0.0-canary.202",
56
56
  "@hello-pangea/dnd": "^17.0.0",
57
57
  "@radix-ui/react-portal": "^1.1.3",
58
58
  "clsx": "^2.1.1",
@@ -104,7 +104,7 @@
104
104
  "dist",
105
105
  "src"
106
106
  ],
107
- "gitHead": "39d8cd5c2397a004c233c96a798e16133ec8590c",
107
+ "gitHead": "6e21f87de35d34c8c4fcb15d1e5f1d07b0f69488",
108
108
  "publishConfig": {
109
109
  "access": "public"
110
110
  },
@@ -643,7 +643,8 @@ function getInitialEntityValues<M extends object>(
643
643
  if (!collection.alwaysApplyDefaultValues) {
644
644
  return entity.values ?? getDefaultValuesFor(properties);
645
645
  } else {
646
- return mergeDeep(getDefaultValuesFor(properties), entity.values ?? {});
646
+ const defaultValues = getDefaultValuesFor(properties);
647
+ return mergeDeep(defaultValues, entity.values ?? {});
647
648
  }
648
649
  } else if (status === "new") {
649
650
  return getDefaultValuesFor(properties);
@@ -18,7 +18,10 @@ export function mergeDeep<T extends Record<any, any>, U extends Record<any, any>
18
18
  if (targetIsObject && isObject(source)) {
19
19
  Object.keys(source).forEach(key => {
20
20
  const sourceElement = source[key];
21
- if (isObject(sourceElement)) {
21
+ if (sourceElement instanceof Date) {
22
+ // Assign a new Date instance with the same time value
23
+ Object.assign(output, { [key]: new Date(sourceElement.getTime()) });
24
+ } else if (isObject(sourceElement)) {
22
25
  if (!(key in target))
23
26
  Object.assign(output, { [key]: sourceElement });
24
27
  else