@payloadcms/live-preview 3.44.0-canary.9 → 3.44.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.
@@ -1 +1 @@
1
- {"version":3,"file":"handleMessage.d.ts","sourceRoot":"","sources":["../src/handleMessage.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kCAAkC,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA;AAwB7F,eAAO,MAAM,aAAa,GAAU,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,uBAAuB,CAAC,CAAC,CAAC,CAAA;IACjC,WAAW,EAAE,CAAC,CAAA;IACd,cAAc,CAAC,EAAE,kCAAkC,CAAA;IACnD,SAAS,EAAE,MAAM,CAAA;CAClB,KAAG,OAAO,CAAC,CAAC,CAqCZ,CAAA"}
1
+ {"version":3,"file":"handleMessage.d.ts","sourceRoot":"","sources":["../src/handleMessage.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kCAAkC,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA;AAwB7F,eAAO,MAAM,aAAa,GAAU,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,uBAAuB,CAAC,CAAC,CAAC,CAAA;IACjC,WAAW,EAAE,CAAC,CAAA;IACd,cAAc,CAAC,EAAE,kCAAkC,CAAA;IACnD,SAAS,EAAE,MAAM,CAAA;CAClB,KAAG,OAAO,CAAC,CAAC,CAyCZ,CAAA"}
@@ -38,7 +38,10 @@ export const handleMessage = async (args)=>{
38
38
  _payloadLivePreview.previousData = mergedData;
39
39
  return mergedData;
40
40
  }
41
- return initialData;
41
+ if (!_payloadLivePreview.previousData) {
42
+ _payloadLivePreview.previousData = initialData;
43
+ }
44
+ return _payloadLivePreview.previousData;
42
45
  };
43
46
 
44
47
  //# sourceMappingURL=handleMessage.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/handleMessage.ts"],"sourcesContent":["import type { FieldSchemaJSON } from 'payload'\n\nimport type { CollectionPopulationRequestHandler, LivePreviewMessageEvent } from './types.js'\n\nimport { isLivePreviewEvent } from './isLivePreviewEvent.js'\nimport { mergeData } from './mergeData.js'\n\nconst _payloadLivePreview: {\n fieldSchema: FieldSchemaJSON | undefined\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n previousData: any\n} = {\n /**\n * For performance reasons, `fieldSchemaJSON` will only be sent once on the initial message\n * We need to cache this value so that it can be used across subsequent messages\n * To do this, save `fieldSchemaJSON` when it arrives as a global variable\n * Send this cached value to `mergeData`, instead of `eventData.fieldSchemaJSON` directly\n */\n fieldSchema: undefined,\n /**\n * Each time the data is merged, cache the result as a `previousData` variable\n * This will ensure changes compound overtop of each other\n */\n previousData: undefined,\n}\n\nexport const handleMessage = async <T extends Record<string, any>>(args: {\n apiRoute?: string\n depth?: number\n event: LivePreviewMessageEvent<T>\n initialData: T\n requestHandler?: CollectionPopulationRequestHandler\n serverURL: string\n}): Promise<T> => {\n const { apiRoute, depth, event, initialData, requestHandler, serverURL } = args\n\n if (isLivePreviewEvent(event, serverURL)) {\n const { data, externallyUpdatedRelationship, fieldSchemaJSON, locale } = event.data\n\n if (!_payloadLivePreview?.fieldSchema && fieldSchemaJSON) {\n _payloadLivePreview.fieldSchema = fieldSchemaJSON\n }\n\n if (!_payloadLivePreview?.fieldSchema) {\n // eslint-disable-next-line no-console\n console.warn(\n 'Payload Live Preview: No `fieldSchemaJSON` was received from the parent window. Unable to merge data.',\n )\n\n return initialData\n }\n\n const mergedData = await mergeData<T>({\n apiRoute,\n depth,\n externallyUpdatedRelationship,\n fieldSchema: _payloadLivePreview.fieldSchema,\n incomingData: data,\n initialData: _payloadLivePreview?.previousData || initialData,\n locale,\n requestHandler,\n serverURL,\n })\n\n _payloadLivePreview.previousData = mergedData\n\n return mergedData\n }\n\n return initialData\n}\n"],"names":["isLivePreviewEvent","mergeData","_payloadLivePreview","fieldSchema","undefined","previousData","handleMessage","args","apiRoute","depth","event","initialData","requestHandler","serverURL","data","externallyUpdatedRelationship","fieldSchemaJSON","locale","console","warn","mergedData","incomingData"],"mappings":"AAIA,SAASA,kBAAkB,QAAQ,0BAAyB;AAC5D,SAASC,SAAS,QAAQ,iBAAgB;AAE1C,MAAMC,sBAIF;IACF;;;;;GAKC,GACDC,aAAaC;IACb;;;GAGC,GACDC,cAAcD;AAChB;AAEA,OAAO,MAAME,gBAAgB,OAAsCC;IAQjE,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,KAAK,EAAEC,WAAW,EAAEC,cAAc,EAAEC,SAAS,EAAE,GAAGN;IAE3E,IAAIP,mBAAmBU,OAAOG,YAAY;QACxC,MAAM,EAAEC,IAAI,EAAEC,6BAA6B,EAAEC,eAAe,EAAEC,MAAM,EAAE,GAAGP,MAAMI,IAAI;QAEnF,IAAI,CAACZ,qBAAqBC,eAAea,iBAAiB;YACxDd,oBAAoBC,WAAW,GAAGa;QACpC;QAEA,IAAI,CAACd,qBAAqBC,aAAa;YACrC,sCAAsC;YACtCe,QAAQC,IAAI,CACV;YAGF,OAAOR;QACT;QAEA,MAAMS,aAAa,MAAMnB,UAAa;YACpCO;YACAC;YACAM;YACAZ,aAAaD,oBAAoBC,WAAW;YAC5CkB,cAAcP;YACdH,aAAaT,qBAAqBG,gBAAgBM;YAClDM;YACAL;YACAC;QACF;QAEAX,oBAAoBG,YAAY,GAAGe;QAEnC,OAAOA;IACT;IAEA,OAAOT;AACT,EAAC"}
1
+ {"version":3,"sources":["../src/handleMessage.ts"],"sourcesContent":["import type { FieldSchemaJSON } from 'payload'\n\nimport type { CollectionPopulationRequestHandler, LivePreviewMessageEvent } from './types.js'\n\nimport { isLivePreviewEvent } from './isLivePreviewEvent.js'\nimport { mergeData } from './mergeData.js'\n\nconst _payloadLivePreview: {\n fieldSchema: FieldSchemaJSON | undefined\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n previousData: any\n} = {\n /**\n * For performance reasons, `fieldSchemaJSON` will only be sent once on the initial message\n * We need to cache this value so that it can be used across subsequent messages\n * To do this, save `fieldSchemaJSON` when it arrives as a global variable\n * Send this cached value to `mergeData`, instead of `eventData.fieldSchemaJSON` directly\n */\n fieldSchema: undefined,\n /**\n * Each time the data is merged, cache the result as a `previousData` variable\n * This will ensure changes compound overtop of each other\n */\n previousData: undefined,\n}\n\nexport const handleMessage = async <T extends Record<string, any>>(args: {\n apiRoute?: string\n depth?: number\n event: LivePreviewMessageEvent<T>\n initialData: T\n requestHandler?: CollectionPopulationRequestHandler\n serverURL: string\n}): Promise<T> => {\n const { apiRoute, depth, event, initialData, requestHandler, serverURL } = args\n\n if (isLivePreviewEvent(event, serverURL)) {\n const { data, externallyUpdatedRelationship, fieldSchemaJSON, locale } = event.data\n\n if (!_payloadLivePreview?.fieldSchema && fieldSchemaJSON) {\n _payloadLivePreview.fieldSchema = fieldSchemaJSON\n }\n\n if (!_payloadLivePreview?.fieldSchema) {\n // eslint-disable-next-line no-console\n console.warn(\n 'Payload Live Preview: No `fieldSchemaJSON` was received from the parent window. Unable to merge data.',\n )\n\n return initialData\n }\n\n const mergedData = await mergeData<T>({\n apiRoute,\n depth,\n externallyUpdatedRelationship,\n fieldSchema: _payloadLivePreview.fieldSchema,\n incomingData: data,\n initialData: _payloadLivePreview?.previousData || initialData,\n locale,\n requestHandler,\n serverURL,\n })\n\n _payloadLivePreview.previousData = mergedData\n\n return mergedData\n }\n\n if (!_payloadLivePreview.previousData) {\n _payloadLivePreview.previousData = initialData\n }\n\n return _payloadLivePreview.previousData as T\n}\n"],"names":["isLivePreviewEvent","mergeData","_payloadLivePreview","fieldSchema","undefined","previousData","handleMessage","args","apiRoute","depth","event","initialData","requestHandler","serverURL","data","externallyUpdatedRelationship","fieldSchemaJSON","locale","console","warn","mergedData","incomingData"],"mappings":"AAIA,SAASA,kBAAkB,QAAQ,0BAAyB;AAC5D,SAASC,SAAS,QAAQ,iBAAgB;AAE1C,MAAMC,sBAIF;IACF;;;;;GAKC,GACDC,aAAaC;IACb;;;GAGC,GACDC,cAAcD;AAChB;AAEA,OAAO,MAAME,gBAAgB,OAAsCC;IAQjE,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EAAEC,KAAK,EAAEC,WAAW,EAAEC,cAAc,EAAEC,SAAS,EAAE,GAAGN;IAE3E,IAAIP,mBAAmBU,OAAOG,YAAY;QACxC,MAAM,EAAEC,IAAI,EAAEC,6BAA6B,EAAEC,eAAe,EAAEC,MAAM,EAAE,GAAGP,MAAMI,IAAI;QAEnF,IAAI,CAACZ,qBAAqBC,eAAea,iBAAiB;YACxDd,oBAAoBC,WAAW,GAAGa;QACpC;QAEA,IAAI,CAACd,qBAAqBC,aAAa;YACrC,sCAAsC;YACtCe,QAAQC,IAAI,CACV;YAGF,OAAOR;QACT;QAEA,MAAMS,aAAa,MAAMnB,UAAa;YACpCO;YACAC;YACAM;YACAZ,aAAaD,oBAAoBC,WAAW;YAC5CkB,cAAcP;YACdH,aAAaT,qBAAqBG,gBAAgBM;YAClDM;YACAL;YACAC;QACF;QAEAX,oBAAoBG,YAAY,GAAGe;QAEnC,OAAOA;IACT;IAEA,IAAI,CAAClB,oBAAoBG,YAAY,EAAE;QACrCH,oBAAoBG,YAAY,GAAGM;IACrC;IAEA,OAAOT,oBAAoBG,YAAY;AACzC,EAAC"}
package/dist/mergeData.js CHANGED
@@ -33,7 +33,7 @@ export const mergeData = async (args)=>{
33
33
  try {
34
34
  res = await requestHandler({
35
35
  apiPath: apiRoute || '/api',
36
- endpoint: encodeURI(`${collection}?depth=${depth}&where[id][in]=${Array.from(ids).join(',')}${locale ? `&locale=${locale}` : ''}`),
36
+ endpoint: encodeURI(`${collection}?depth=${depth}&limit=${ids.size}&where[id][in]=${Array.from(ids).join(',')}${locale ? `&locale=${locale}` : ''}`),
37
37
  serverURL
38
38
  }).then((res)=>res.json());
39
39
  if (res?.docs?.length > 0) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/mergeData.ts"],"sourcesContent":["import type { DocumentEvent, FieldSchemaJSON, PaginatedDocs } from 'payload'\n\nimport type { CollectionPopulationRequestHandler, PopulationsByCollection } from './types.js'\n\nimport { traverseFields } from './traverseFields.js'\n\nconst defaultRequestHandler = ({\n apiPath,\n endpoint,\n serverURL,\n}: {\n apiPath: string\n endpoint: string\n serverURL: string\n}) => {\n const url = `${serverURL}${apiPath}/${endpoint}`\n return fetch(url, {\n credentials: 'include',\n headers: {\n 'Content-Type': 'application/json',\n },\n })\n}\n\n// Relationships are only updated when their `id` or `relationTo` changes, by comparing the old and new values\n// This needs to also happen when locale changes, except this is not not part of the API response\n// Instead, we keep track of the old locale ourselves and trigger a re-population when it changes\nlet prevLocale: string | undefined\n\nexport const mergeData = async <T extends Record<string, any>>(args: {\n apiRoute?: string\n /**\n * @deprecated Use `requestHandler` instead\n */\n collectionPopulationRequestHandler?: CollectionPopulationRequestHandler\n depth?: number\n externallyUpdatedRelationship?: DocumentEvent\n fieldSchema: FieldSchemaJSON\n incomingData: Partial<T>\n initialData: T\n locale?: string\n requestHandler?: CollectionPopulationRequestHandler\n returnNumberOfRequests?: boolean\n serverURL: string\n}): Promise<\n {\n _numberOfRequests?: number\n } & T\n> => {\n const {\n apiRoute,\n depth,\n externallyUpdatedRelationship,\n fieldSchema,\n incomingData,\n initialData,\n locale,\n returnNumberOfRequests,\n serverURL,\n } = args\n\n const result = { ...initialData }\n\n const populationsByCollection: PopulationsByCollection = {}\n\n traverseFields({\n externallyUpdatedRelationship,\n fieldSchema,\n incomingData,\n localeChanged: prevLocale !== locale,\n populationsByCollection,\n result,\n })\n\n await Promise.all(\n Object.entries(populationsByCollection).map(async ([collection, populations]) => {\n let res: PaginatedDocs\n\n const ids = new Set(populations.map(({ id }) => id))\n const requestHandler =\n args.collectionPopulationRequestHandler || args.requestHandler || defaultRequestHandler\n\n try {\n res = await requestHandler({\n apiPath: apiRoute || '/api',\n endpoint: encodeURI(\n `${collection}?depth=${depth}&where[id][in]=${Array.from(ids).join(',')}${locale ? `&locale=${locale}` : ''}`,\n ),\n serverURL,\n }).then((res) => res.json())\n\n if (res?.docs?.length > 0) {\n res.docs.forEach((doc) => {\n populationsByCollection[collection]?.forEach((population) => {\n if (population.id === doc.id) {\n population.ref[population.accessor] = doc\n }\n })\n })\n }\n } catch (err) {\n console.error(err) // eslint-disable-line no-console\n }\n }),\n )\n\n prevLocale = locale\n\n return {\n ...result,\n ...(returnNumberOfRequests\n ? { _numberOfRequests: Object.keys(populationsByCollection).length }\n : {}),\n }\n}\n"],"names":["traverseFields","defaultRequestHandler","apiPath","endpoint","serverURL","url","fetch","credentials","headers","prevLocale","mergeData","args","apiRoute","depth","externallyUpdatedRelationship","fieldSchema","incomingData","initialData","locale","returnNumberOfRequests","result","populationsByCollection","localeChanged","Promise","all","Object","entries","map","collection","populations","res","ids","Set","id","requestHandler","collectionPopulationRequestHandler","encodeURI","Array","from","join","then","json","docs","length","forEach","doc","population","ref","accessor","err","console","error","_numberOfRequests","keys"],"mappings":"AAIA,SAASA,cAAc,QAAQ,sBAAqB;AAEpD,MAAMC,wBAAwB,CAAC,EAC7BC,OAAO,EACPC,QAAQ,EACRC,SAAS,EAKV;IACC,MAAMC,MAAM,GAAGD,YAAYF,QAAQ,CAAC,EAAEC,UAAU;IAChD,OAAOG,MAAMD,KAAK;QAChBE,aAAa;QACbC,SAAS;YACP,gBAAgB;QAClB;IACF;AACF;AAEA,8GAA8G;AAC9G,iGAAiG;AACjG,iGAAiG;AACjG,IAAIC;AAEJ,OAAO,MAAMC,YAAY,OAAsCC;IAoB7D,MAAM,EACJC,QAAQ,EACRC,KAAK,EACLC,6BAA6B,EAC7BC,WAAW,EACXC,YAAY,EACZC,WAAW,EAC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IACjE,CAAC,CAAC;IACR;AACF,EAAC"}
1
+ {"version":3,"sources":["../src/mergeData.ts"],"sourcesContent":["import type { DocumentEvent, FieldSchemaJSON, PaginatedDocs } from 'payload'\n\nimport type { CollectionPopulationRequestHandler, PopulationsByCollection } from './types.js'\n\nimport { traverseFields } from './traverseFields.js'\n\nconst defaultRequestHandler = ({\n apiPath,\n endpoint,\n serverURL,\n}: {\n apiPath: string\n endpoint: string\n serverURL: string\n}) => {\n const url = `${serverURL}${apiPath}/${endpoint}`\n return fetch(url, {\n credentials: 'include',\n headers: {\n 'Content-Type': 'application/json',\n },\n })\n}\n\n// Relationships are only updated when their `id` or `relationTo` changes, by comparing the old and new values\n// This needs to also happen when locale changes, except this is not not part of the API response\n// Instead, we keep track of the old locale ourselves and trigger a re-population when it changes\nlet prevLocale: string | undefined\n\nexport const mergeData = async <T extends Record<string, any>>(args: {\n apiRoute?: string\n /**\n * @deprecated Use `requestHandler` instead\n */\n collectionPopulationRequestHandler?: CollectionPopulationRequestHandler\n depth?: number\n externallyUpdatedRelationship?: DocumentEvent\n fieldSchema: FieldSchemaJSON\n incomingData: Partial<T>\n initialData: T\n locale?: string\n requestHandler?: CollectionPopulationRequestHandler\n returnNumberOfRequests?: boolean\n serverURL: string\n}): Promise<\n {\n _numberOfRequests?: number\n } & T\n> => {\n const {\n apiRoute,\n depth,\n externallyUpdatedRelationship,\n fieldSchema,\n incomingData,\n initialData,\n locale,\n returnNumberOfRequests,\n serverURL,\n } = args\n\n const result = { ...initialData }\n\n const populationsByCollection: PopulationsByCollection = {}\n\n traverseFields({\n externallyUpdatedRelationship,\n fieldSchema,\n incomingData,\n localeChanged: prevLocale !== locale,\n populationsByCollection,\n result,\n })\n\n await Promise.all(\n Object.entries(populationsByCollection).map(async ([collection, populations]) => {\n let res: PaginatedDocs\n\n const ids = new Set(populations.map(({ id }) => id))\n const requestHandler =\n args.collectionPopulationRequestHandler || args.requestHandler || defaultRequestHandler\n\n try {\n res = await requestHandler({\n apiPath: apiRoute || '/api',\n endpoint: encodeURI(\n `${collection}?depth=${depth}&limit=${ids.size}&where[id][in]=${Array.from(ids).join(',')}${locale ? `&locale=${locale}` : ''}`,\n ),\n serverURL,\n }).then((res) => res.json())\n\n if (res?.docs?.length > 0) {\n res.docs.forEach((doc) => {\n populationsByCollection[collection]?.forEach((population) => {\n if (population.id === doc.id) {\n population.ref[population.accessor] = doc\n }\n })\n })\n }\n } catch (err) {\n console.error(err) // eslint-disable-line no-console\n }\n }),\n )\n\n prevLocale = locale\n\n return {\n ...result,\n ...(returnNumberOfRequests\n ? { _numberOfRequests: Object.keys(populationsByCollection).length }\n : {}),\n }\n}\n"],"names":["traverseFields","defaultRequestHandler","apiPath","endpoint","serverURL","url","fetch","credentials","headers","prevLocale","mergeData","args","apiRoute","depth","externallyUpdatedRelationship","fieldSchema","incomingData","initialData","locale","returnNumberOfRequests","result","populationsByCollection","localeChanged","Promise","all","Object","entries","map","collection","populations","res","ids","Set","id","requestHandler","collectionPopulationRequestHandler","encodeURI","size","Array","from","join","then","json","docs","length","forEach","doc","population","ref","accessor","err","console","error","_numberOfRequests","keys"],"mappings":"AAIA,SAASA,cAAc,QAAQ,sBAAqB;AAEpD,MAAMC,wBAAwB,CAAC,EAC7BC,OAAO,EACPC,QAAQ,EACRC,SAAS,EAKV;IACC,MAAMC,MAAM,GAAGD,YAAYF,QAAQ,CAAC,EAAEC,UAAU;IAChD,OAAOG,MAAMD,KAAK;QAChBE,aAAa;QACbC,SAAS;YACP,gBAAgB;QAClB;IACF;AACF;AAEA,8GAA8G;AAC9G,iGAAiG;AACjG,iGAAiG;AACjG,IAAIC;AAEJ,OAAO,MAAMC,YAAY,OAAsCC;IAoB7D,MAAM,EACJC,QAAQ,EACRC,KAAK,EACLC,6BAA6B,EAC7BC,WAAW,EACXC,YAAY,EACZC,WAAW,EACXC,MAAM,EACNC,sBAAsB,EACtBf,SAAS,EACV,GAAGO;IAEJ,MAAMS,SAAS;QAAE,GAAGH,WAAW;IAA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 @@
1
1
  {
2
2
  "name": "@payloadcms/live-preview",
3
- "version": "3.44.0-canary.9",
3
+ "version": "3.44.0",
4
4
  "description": "The official live preview JavaScript SDK for Payload",
5
5
  "homepage": "https://payloadcms.com",
6
6
  "repository": {
@@ -33,7 +33,7 @@
33
33
  ],
34
34
  "devDependencies": {
35
35
  "@payloadcms/eslint-config": "3.28.0",
36
- "payload": "3.44.0-canary.9"
36
+ "payload": "3.44.0"
37
37
  },
38
38
  "publishConfig": {
39
39
  "registry": "https://registry.npmjs.org/"