@firecms/collection_editor 3.0.0-canary.165 → 3.0.0-canary.166
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 +1 -0
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -0
- package/dist/index.umd.js.map +1 -1
- package/package.json +8 -8
- package/src/utils/collections.ts +4 -0
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firecms/collection_editor",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.0-canary.
|
|
4
|
+
"version": "3.0.0-canary.166",
|
|
5
5
|
"main": "./dist/index.umd.js",
|
|
6
6
|
"module": "./dist/index.es.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"source": "src/index.ts",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@firecms/data_export": "^3.0.0-canary.
|
|
11
|
-
"@firecms/data_import": "^3.0.0-canary.
|
|
12
|
-
"@firecms/data_import_export": "^3.0.0-canary.
|
|
13
|
-
"@firecms/formex": "^3.0.0-canary.
|
|
14
|
-
"@firecms/schema_inference": "^3.0.0-canary.
|
|
15
|
-
"@firecms/ui": "^3.0.0-canary.
|
|
10
|
+
"@firecms/data_export": "^3.0.0-canary.166",
|
|
11
|
+
"@firecms/data_import": "^3.0.0-canary.166",
|
|
12
|
+
"@firecms/data_import_export": "^3.0.0-canary.166",
|
|
13
|
+
"@firecms/formex": "^3.0.0-canary.166",
|
|
14
|
+
"@firecms/schema_inference": "^3.0.0-canary.166",
|
|
15
|
+
"@firecms/ui": "^3.0.0-canary.166",
|
|
16
16
|
"json5": "^2.2.3",
|
|
17
17
|
"prism-react-renderer": "^2.4.0"
|
|
18
18
|
},
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"publishConfig": {
|
|
70
70
|
"access": "public"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "c01f9b33c2738db9c1ffe8079f85ea70894ead41"
|
|
73
73
|
}
|
package/src/utils/collections.ts
CHANGED
|
@@ -25,6 +25,10 @@ export const mergeCollections = (baseCollections: EntityCollection[],
|
|
|
25
25
|
console.debug("Collections specified in code:", baseCollections);
|
|
26
26
|
console.debug("Collections stored in the backend", storedCollections);
|
|
27
27
|
const result = joinCollectionLists(baseCollections, storedCollections, [], modifyCollection);
|
|
28
|
+
|
|
29
|
+
// sort the collections so they are in the same order as the base collections
|
|
30
|
+
result.sort((a, b) => baseCollections.findIndex(c => c.id === a.id) - baseCollections.findIndex(c => c.id === b.id));
|
|
31
|
+
|
|
28
32
|
console.debug("Collections after joining:", result);
|
|
29
33
|
return result;
|
|
30
34
|
}
|