@payloadcms/live-preview
Advanced tools
Comparing version 3.0.0-canary.b750ebf to 3.0.0-canary.b8c9483
@@ -31,3 +31,3 @@ import { traverseFields } from './traverseFields.js'; | ||
apiPath: apiRoute || '/api', | ||
endpoint: `${collection}?depth=${depth}&where[id][in]=${Array.from(ids).join(',')}`, | ||
endpoint: encodeURI(`${collection}?depth=${depth}&where[id][in]=${Array.from(ids).join(',')}`), | ||
serverURL | ||
@@ -34,0 +34,0 @@ }).then((res)=>res.json()); |
@@ -8,10 +8,2 @@ import { traverseRichText } from './traverseRichText.js'; | ||
switch(fieldSchema.type){ | ||
case 'richText': | ||
result[fieldName] = traverseRichText({ | ||
externallyUpdatedRelationship, | ||
incomingData: incomingData[fieldName], | ||
populationsByCollection, | ||
result: result[fieldName] | ||
}); | ||
break; | ||
case 'array': | ||
@@ -62,4 +54,4 @@ if (Array.isArray(incomingData[fieldName])) { | ||
break; | ||
case 'group': | ||
case 'tabs': | ||
case 'group': | ||
if (!result[fieldName]) { | ||
@@ -76,4 +68,4 @@ result[fieldName] = {}; | ||
break; | ||
case 'relationship': | ||
case 'upload': | ||
case 'relationship': | ||
// Handle `hasMany` relationships | ||
@@ -189,2 +181,10 @@ if (fieldSchema.hasMany && Array.isArray(incomingData[fieldName])) { | ||
break; | ||
case 'richText': | ||
result[fieldName] = traverseRichText({ | ||
externallyUpdatedRelationship, | ||
incomingData: incomingData[fieldName], | ||
populationsByCollection, | ||
result: result[fieldName] | ||
}); | ||
break; | ||
default: | ||
@@ -191,0 +191,0 @@ result[fieldName] = incomingData[fieldName]; |
{ | ||
"name": "@payloadcms/live-preview", | ||
"version": "3.0.0-canary.b750ebf", | ||
"version": "3.0.0-canary.b8c9483", | ||
"description": "The official live preview JavaScript SDK for Payload", | ||
@@ -13,2 +13,9 @@ "homepage": "https://payloadcms.com", | ||
"author": "Payload <dev@payloadcms.com> (https://payloadcms.com)", | ||
"maintainers": [ | ||
{ | ||
"name": "Payload", | ||
"email": "info@payloadcms.com", | ||
"url": "https://payloadcms.com" | ||
} | ||
], | ||
"type": "module", | ||
@@ -28,4 +35,4 @@ "exports": { | ||
"devDependencies": { | ||
"@payloadcms/eslint-config": "3.0.0-beta.59", | ||
"payload": "3.0.0-canary.b750ebf" | ||
"@payloadcms/eslint-config": "3.0.0-beta.112", | ||
"payload": "3.0.0-canary.b8c9483" | ||
}, | ||
@@ -40,4 +47,6 @@ "publishConfig": { | ||
"clean": "rimraf {dist,*.tsbuildinfo}", | ||
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/" | ||
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,json}\" dist/", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint . --fix" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65087
46