@isardsat/editorial-server 6.18.1 → 6.19.0
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/lib/schema.d.ts
CHANGED
|
@@ -8,9 +8,9 @@ export declare function createSchema(configDirectory: string): Promise<Record<st
|
|
|
8
8
|
displayExtra?: string | undefined;
|
|
9
9
|
placeholder?: string | undefined;
|
|
10
10
|
showInSummary?: boolean | undefined;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
choicesFixed?: string[] | undefined;
|
|
12
|
+
maxSelectedChoices?: number | undefined;
|
|
13
|
+
minSelectedChoices?: number | undefined;
|
|
14
14
|
isUploadedFile?: boolean | undefined;
|
|
15
15
|
}>;
|
|
16
16
|
filterBy?: string | undefined;
|
package/dist/lib/storage.d.ts
CHANGED
|
@@ -10,9 +10,9 @@ export declare function createStorage(dataDirectory: string): {
|
|
|
10
10
|
displayExtra?: string | undefined;
|
|
11
11
|
placeholder?: string | undefined;
|
|
12
12
|
showInSummary?: boolean | undefined;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
choicesFixed?: string[] | undefined;
|
|
14
|
+
maxSelectedChoices?: number | undefined;
|
|
15
|
+
minSelectedChoices?: number | undefined;
|
|
16
16
|
isUploadedFile?: boolean | undefined;
|
|
17
17
|
}>;
|
|
18
18
|
filterBy?: string | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {} from "@isardsat/editorial-common";
|
|
2
|
-
import { getOptionsReference } from "@isardsat/editorial-common";
|
|
1
|
+
import { getChoicesReference, } from "@isardsat/editorial-common";
|
|
3
2
|
/**
|
|
4
3
|
* Resolves uploaded file paths to full URLs for an item.
|
|
5
4
|
*/
|
|
@@ -39,7 +38,7 @@ export function resolveReferences(item, schema, itemType, content, origin, resol
|
|
|
39
38
|
if (fieldConfig.type !== "select" && fieldConfig.type !== "multiselect") {
|
|
40
39
|
continue;
|
|
41
40
|
}
|
|
42
|
-
const referencedType =
|
|
41
|
+
const referencedType = getChoicesReference(fieldConfig.choicesFixed);
|
|
43
42
|
if (!referencedType)
|
|
44
43
|
continue;
|
|
45
44
|
const referencedCollection = content[referencedType];
|
package/dist/routes/data.js
CHANGED
|
@@ -511,6 +511,10 @@ export function createDataRoutes(config, storage) {
|
|
|
511
511
|
else if (previewItem?.updatedAt !== productionItem?.updatedAt) {
|
|
512
512
|
// Singleton has different updatedAt = modified
|
|
513
513
|
const changedFields = getChangedFields(previewItem, productionItem);
|
|
514
|
+
if (changedFields.length === 0) {
|
|
515
|
+
// If there are no changed fields other than updatedAt, we can consider it as not modified
|
|
516
|
+
continue;
|
|
517
|
+
}
|
|
514
518
|
result.singles[itemType] = {
|
|
515
519
|
status: "modified",
|
|
516
520
|
preview: previewItem,
|
|
@@ -540,6 +544,10 @@ export function createDataRoutes(config, storage) {
|
|
|
540
544
|
else if (previewItem.updatedAt !== productionItem.updatedAt) {
|
|
541
545
|
// Item has different updatedAt = modified (not yet published)
|
|
542
546
|
const changedFields = getChangedFields(previewItem, productionItem);
|
|
547
|
+
if (changedFields.length === 0) {
|
|
548
|
+
// If there are no changed fields other than updatedAt, we can consider it as not modified
|
|
549
|
+
continue;
|
|
550
|
+
}
|
|
543
551
|
modified.push({
|
|
544
552
|
id,
|
|
545
553
|
preview: previewItem,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isardsat/editorial-server",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.19.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"jose": "^6.1.3",
|
|
16
16
|
"yaml": "^2.8.1",
|
|
17
17
|
"zod": "^4.1.11",
|
|
18
|
-
"@isardsat/editorial-admin": "^6.
|
|
19
|
-
"@isardsat/editorial-common": "^6.
|
|
18
|
+
"@isardsat/editorial-admin": "^6.19.0",
|
|
19
|
+
"@isardsat/editorial-common": "^6.19.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@tsconfig/node22": "^22.0.0",
|