@payloadcms/next 3.0.0-beta.70 → 3.0.0-beta.71
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/prod/styles.css +1 -1
- package/dist/routes/graphql/handler.d.ts.map +1 -1
- package/dist/routes/graphql/handler.js +1 -4
- package/dist/routes/graphql/handler.js.map +1 -1
- package/dist/routes/rest/index.d.ts.map +1 -1
- package/dist/routes/rest/index.js +30 -5
- package/dist/routes/rest/index.js.map +1 -1
- package/dist/utilities/mergeHeaders.d.ts +1 -1
- package/dist/utilities/mergeHeaders.d.ts.map +1 -1
- package/dist/utilities/mergeHeaders.js +7 -33
- package/dist/utilities/mergeHeaders.js.map +1 -1
- package/dist/views/LivePreview/index.client.d.ts.map +1 -1
- package/dist/views/LivePreview/index.client.js.map +1 -1
- package/dist/views/Version/Default/SetStepNav.d.ts +1 -2
- package/dist/views/Version/Default/SetStepNav.d.ts.map +1 -1
- package/dist/views/Version/Default/SetStepNav.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.d.ts +1 -2
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.d.ts +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/index.d.ts +3 -3
- package/dist/views/Version/RenderFieldsToDiff/fields/types.d.ts +1 -2
- package/dist/views/Version/RenderFieldsToDiff/fields/types.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/types.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/types.d.ts +1 -2
- package/dist/views/Version/RenderFieldsToDiff/types.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/types.js.map +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Relationship/index.tsx"],"sourcesContent":["'use client'\nimport type { ClientCollectionConfig } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Relationship/index.tsx"],"sourcesContent":["'use client'\nimport type { ClientCollectionConfig, MappedField } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport { useConfig } from '@payloadcms/ui'\nimport { fieldAffectsData, fieldIsPresentationalOnly } from 'payload/shared'\nimport React from 'react'\nimport ReactDiffViewerImport from 'react-diff-viewer-continued'\n\nimport type { Props } from '../types.js'\n\nimport Label from '../../Label/index.js'\nimport { diffStyles } from '../styles.js'\nimport './index.scss'\n\nconst ReactDiffViewer = (ReactDiffViewerImport.default ||\n ReactDiffViewerImport) as unknown as typeof ReactDiffViewerImport.default\n\nconst baseClass = 'relationship-diff'\n\ntype RelationshipValue = Record<string, any>\n\nconst generateLabelFromValue = (\n collections: ClientCollectionConfig[],\n field: MappedField,\n locale: string,\n value: { relationTo: string; value: RelationshipValue } | RelationshipValue,\n): string => {\n let relation: string\n let relatedDoc: RelationshipValue\n let valueToReturn = '' as any\n\n const relationTo =\n 'relationTo' in field.fieldComponentProps ? field.fieldComponentProps.relationTo : undefined\n\n if (value === null || typeof value === 'undefined') {\n return String(value)\n }\n\n if (Array.isArray(relationTo)) {\n if (typeof value === 'object') {\n relation = value.relationTo\n relatedDoc = value.value\n }\n } else {\n relation = relationTo\n relatedDoc = value\n }\n\n const relatedCollection = collections.find((c) => c.slug === relation)\n\n if (relatedCollection) {\n const useAsTitle = relatedCollection?.admin?.useAsTitle\n const useAsTitleField = relatedCollection.fields.find(\n (f) => fieldAffectsData(f) && !fieldIsPresentationalOnly(f) && f.name === useAsTitle,\n )\n let titleFieldIsLocalized = false\n\n if (useAsTitleField && fieldAffectsData(useAsTitleField))\n titleFieldIsLocalized = useAsTitleField.localized\n\n if (typeof relatedDoc?.[useAsTitle] !== 'undefined') {\n valueToReturn = relatedDoc[useAsTitle]\n } else if (typeof relatedDoc?.id !== 'undefined') {\n valueToReturn = relatedDoc.id\n }\n\n if (typeof valueToReturn === 'object' && titleFieldIsLocalized) {\n valueToReturn = valueToReturn[locale]\n }\n }\n\n return valueToReturn\n}\n\nconst Relationship: React.FC<Props> = ({ comparison, field, i18n, locale, version }) => {\n let placeholder = ''\n\n const { collections } = useConfig()\n\n if (version === comparison) placeholder = `[${i18n.t('general:noValue')}]`\n\n let versionToRender = version\n let comparisonToRender = comparison\n\n if ('hasMany' in field && field.hasMany) {\n if (Array.isArray(version))\n versionToRender = version\n .map((val) => generateLabelFromValue(collections, field, locale, val))\n .join(', ')\n if (Array.isArray(comparison))\n comparisonToRender = comparison\n .map((val) => generateLabelFromValue(collections, field, locale, val))\n .join(', ')\n } else {\n versionToRender = generateLabelFromValue(collections, field, locale, version)\n comparisonToRender = generateLabelFromValue(collections, field, locale, comparison)\n }\n\n const label =\n 'label' in field.fieldComponentProps &&\n typeof field.fieldComponentProps.label !== 'boolean' &&\n typeof field.fieldComponentProps.label !== 'function'\n ? field.fieldComponentProps.label\n : ''\n\n return (\n <div className={baseClass}>\n <Label>\n {locale && <span className={`${baseClass}__locale-label`}>{locale}</span>}\n {getTranslation(label, i18n)}\n </Label>\n <ReactDiffViewer\n hideLineNumbers\n newValue={typeof versionToRender !== 'undefined' ? String(versionToRender) : placeholder}\n oldValue={\n typeof comparisonToRender !== 'undefined' ? String(comparisonToRender) : placeholder\n }\n showDiffOnly={false}\n splitView\n styles={diffStyles}\n />\n </div>\n )\n}\n\nexport default Relationship\n"],"names":["getTranslation","useConfig","fieldAffectsData","fieldIsPresentationalOnly","React","ReactDiffViewerImport","Label","diffStyles","ReactDiffViewer","default","baseClass","generateLabelFromValue","collections","field","locale","value","relation","relatedDoc","valueToReturn","relationTo","fieldComponentProps","undefined","String","Array","isArray","relatedCollection","find","c","slug","useAsTitle","admin","useAsTitleField","fields","f","name","titleFieldIsLocalized","localized","id","Relationship","comparison","i18n","version","placeholder","t","versionToRender","comparisonToRender","hasMany","map","val","join","label","div","className","span","hideLineNumbers","newValue","oldValue","showDiffOnly","splitView","styles"],"mappings":"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"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { SelectFieldProps } from '
|
|
2
|
-
import type { MappedField } from '@payloadcms/ui/utilities/buildComponentMap';
|
|
1
|
+
import type { MappedField, SelectFieldProps } from 'payload';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import type { Props } from '../types.js';
|
|
5
4
|
import './index.scss';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Select/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Select/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAA6B,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAGvF,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAKxC,OAAO,cAAc,CAAA;AAmCrB,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CACpB;IACE,KAAK,EAAE,WAAW,GAAG,gBAAgB,CAAA;CACtC,GAAG,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAiCzB,CAAA;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Select/index.tsx"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\nimport type {
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Select/index.tsx"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\nimport type { MappedField, OptionObject, SelectField, SelectFieldProps } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport React from 'react'\n\nimport type { Props } from '../types.js'\n\nimport Label from '../../Label/index.js'\nimport { diffStyles } from '../styles.js'\nimport { DiffViewer } from './DiffViewer/index.js'\nimport './index.scss'\n\nconst baseClass = 'select-diff'\n\nconst getOptionsToRender = (\n value: string,\n options: SelectField['options'],\n hasMany: boolean,\n): (OptionObject | string)[] | OptionObject | string => {\n if (hasMany && Array.isArray(value)) {\n return value.map(\n (val) =>\n options.find((option) => (typeof option === 'string' ? option : option.value) === val) ||\n String(val),\n )\n }\n return (\n options.find((option) => (typeof option === 'string' ? option : option.value) === value) ||\n String(value)\n )\n}\n\nconst getTranslatedOptions = (\n options: (OptionObject | string)[] | OptionObject | string,\n i18n: I18nClient,\n): string => {\n if (Array.isArray(options)) {\n return options\n .map((option) => (typeof option === 'string' ? option : getTranslation(option.label, i18n)))\n .join(', ')\n }\n\n return typeof options === 'string' ? options : getTranslation(options.label, i18n)\n}\n\nconst Select: React.FC<\n {\n field: MappedField & SelectFieldProps\n } & Omit<Props, 'field'>\n> = ({ comparison, diffMethod, field, i18n, locale, version }) => {\n let placeholder = ''\n\n if (version === comparison) placeholder = `[${i18n.t('general:noValue')}]`\n\n const options = 'options' in field.fieldComponentProps && field.fieldComponentProps.options\n\n const comparisonToRender =\n typeof comparison !== 'undefined'\n ? getTranslatedOptions(getOptionsToRender(comparison, options, field.hasMany), i18n)\n : placeholder\n\n const versionToRender =\n typeof version !== 'undefined'\n ? getTranslatedOptions(getOptionsToRender(version, options, field.hasMany), i18n)\n : placeholder\n\n return (\n <div className={baseClass}>\n <Label>\n {locale && <span className={`${baseClass}__locale-label`}>{locale}</span>}\n {'label' in field && getTranslation(field.label || '', i18n)}\n </Label>\n <DiffViewer\n comparisonToRender={comparisonToRender}\n diffMethod={diffMethod}\n diffStyles={diffStyles}\n placeholder={placeholder}\n versionToRender={versionToRender}\n />\n </div>\n )\n}\n\nexport default Select\n"],"names":["getTranslation","React","Label","diffStyles","DiffViewer","baseClass","getOptionsToRender","value","options","hasMany","Array","isArray","map","val","find","option","String","getTranslatedOptions","i18n","label","join","Select","comparison","diffMethod","field","locale","version","placeholder","t","fieldComponentProps","comparisonToRender","versionToRender","div","className","span"],"mappings":";AAGA,SAASA,cAAc,QAAQ,2BAA0B;AACzD,OAAOC,WAAW,QAAO;AAIzB,OAAOC,WAAW,uBAAsB;AACxC,SAASC,UAAU,QAAQ,eAAc;AACzC,SAASC,UAAU,QAAQ,wBAAuB;AAGlD,MAAMC,YAAY;AAElB,MAAMC,qBAAqB,CACzBC,OACAC,SACAC;IAEA,IAAIA,WAAWC,MAAMC,OAAO,CAACJ,QAAQ;QACnC,OAAOA,MAAMK,GAAG,CACd,CAACC,MACCL,QAAQM,IAAI,CAAC,CAACC,SAAW,AAAC,CAAA,OAAOA,WAAW,WAAWA,SAASA,OAAOR,KAAK,AAAD,MAAOM,QAClFG,OAAOH;IAEb;IACA,OACEL,QAAQM,IAAI,CAAC,CAACC,SAAW,AAAC,CAAA,OAAOA,WAAW,WAAWA,SAASA,OAAOR,KAAK,AAAD,MAAOA,UAClFS,OAAOT;AAEX;AAEA,MAAMU,uBAAuB,CAC3BT,SACAU;IAEA,IAAIR,MAAMC,OAAO,CAACH,UAAU;QAC1B,OAAOA,QACJI,GAAG,CAAC,CAACG,SAAY,OAAOA,WAAW,WAAWA,SAASf,eAAee,OAAOI,KAAK,EAAED,OACpFE,IAAI,CAAC;IACV;IAEA,OAAO,OAAOZ,YAAY,WAAWA,UAAUR,eAAeQ,QAAQW,KAAK,EAAED;AAC/E;AAEA,MAAMG,SAIF,CAAC,EAAEC,UAAU,EAAEC,UAAU,EAAEC,KAAK,EAAEN,IAAI,EAAEO,MAAM,EAAEC,OAAO,EAAE;IAC3D,IAAIC,cAAc;IAElB,IAAID,YAAYJ,YAAYK,cAAc,CAAC,CAAC,EAAET,KAAKU,CAAC,CAAC,mBAAmB,CAAC,CAAC;IAE1E,MAAMpB,UAAU,aAAagB,MAAMK,mBAAmB,IAAIL,MAAMK,mBAAmB,CAACrB,OAAO;IAE3F,MAAMsB,qBACJ,OAAOR,eAAe,cAClBL,qBAAqBX,mBAAmBgB,YAAYd,SAASgB,MAAMf,OAAO,GAAGS,QAC7ES;IAEN,MAAMI,kBACJ,OAAOL,YAAY,cACfT,qBAAqBX,mBAAmBoB,SAASlB,SAASgB,MAAMf,OAAO,GAAGS,QAC1ES;IAEN,qBACE,MAACK;QAAIC,WAAW5B;;0BACd,MAACH;;oBACEuB,wBAAU,KAACS;wBAAKD,WAAW,CAAC,EAAE5B,UAAU,cAAc,CAAC;kCAAGoB;;oBAC1D,WAAWD,SAASxB,eAAewB,MAAML,KAAK,IAAI,IAAID;;;0BAEzD,KAACd;gBACC0B,oBAAoBA;gBACpBP,YAAYA;gBACZpB,YAAYA;gBACZwB,aAAaA;gBACbI,iBAAiBA;;;;AAIzB;AAEA,eAAeV,OAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Tabs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Tabs/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE1D,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAOxC,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAClB;IACE,KAAK,EAAE,WAAW,GAAG,cAAc,CAAA;CACpC,GAAG,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAuCzB,CAAA;AAED,eAAe,IAAI,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Tabs/index.tsx"],"sourcesContent":["import type { MappedField, TabsFieldProps } from '
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Tabs/index.tsx"],"sourcesContent":["import type { MappedField, TabsFieldProps } from 'payload'\n\nimport React from 'react'\n\nimport type { Props } from '../types.js'\n\nimport RenderFieldsToDiff from '../../index.js'\nimport Nested from '../Nested/index.js'\n\nconst baseClass = 'tabs-diff'\n\nconst Tabs: React.FC<\n {\n field: MappedField & TabsFieldProps\n } & Omit<Props, 'field'>\n> = ({ comparison, diffComponents, field, i18n, locale, locales, permissions, version }) => {\n return (\n <div className={baseClass}>\n <div className={`${baseClass}__wrap`}>\n {field.tabs.map((tab, i) => {\n if ('name' in tab) {\n return (\n <Nested\n comparison={comparison?.[tab.name]}\n diffComponents={diffComponents}\n field={field}\n fieldMap={tab.fieldMap}\n i18n={i18n}\n key={i}\n locale={locale}\n locales={locales}\n permissions={permissions}\n version={version?.[tab.name]}\n />\n )\n }\n\n return (\n <RenderFieldsToDiff\n comparison={comparison}\n diffComponents={diffComponents}\n fieldMap={tab.fieldMap}\n fieldPermissions={permissions}\n i18n={i18n}\n key={i}\n locales={locales}\n version={version}\n />\n )\n })}\n </div>\n </div>\n )\n}\n\nexport default Tabs\n"],"names":["React","RenderFieldsToDiff","Nested","baseClass","Tabs","comparison","diffComponents","field","i18n","locale","locales","permissions","version","div","className","tabs","map","tab","i","name","fieldMap","fieldPermissions"],"mappings":";AAEA,OAAOA,WAAW,QAAO;AAIzB,OAAOC,wBAAwB,iBAAgB;AAC/C,OAAOC,YAAY,qBAAoB;AAEvC,MAAMC,YAAY;AAElB,MAAMC,OAIF,CAAC,EAAEC,UAAU,EAAEC,cAAc,EAAEC,KAAK,EAAEC,IAAI,EAAEC,MAAM,EAAEC,OAAO,EAAEC,WAAW,EAAEC,OAAO,EAAE;IACrF,qBACE,KAACC;QAAIC,WAAWX;kBACd,cAAA,KAACU;YAAIC,WAAW,CAAC,EAAEX,UAAU,MAAM,CAAC;sBACjCI,MAAMQ,IAAI,CAACC,GAAG,CAAC,CAACC,KAAKC;gBACpB,IAAI,UAAUD,KAAK;oBACjB,qBACE,KAACf;wBACCG,YAAYA,YAAY,CAACY,IAAIE,IAAI,CAAC;wBAClCb,gBAAgBA;wBAChBC,OAAOA;wBACPa,UAAUH,IAAIG,QAAQ;wBACtBZ,MAAMA;wBAENC,QAAQA;wBACRC,SAASA;wBACTC,aAAaA;wBACbC,SAASA,SAAS,CAACK,IAAIE,IAAI,CAAC;uBAJvBD;gBAOX;gBAEA,qBACE,KAACjB;oBACCI,YAAYA;oBACZC,gBAAgBA;oBAChBc,UAAUH,IAAIG,QAAQ;oBACtBC,kBAAkBV;oBAClBH,MAAMA;oBAENE,SAASA;oBACTE,SAASA;mBAFJM;YAKX;;;AAIR;AAEA,eAAed,KAAI"}
|
|
@@ -11,16 +11,16 @@ declare const _default: {
|
|
|
11
11
|
number: import("react").FC<import("./types.js").Props>;
|
|
12
12
|
point: import("react").FC<import("./types.js").Props>;
|
|
13
13
|
radio: import("react").FC<{
|
|
14
|
-
field: import("
|
|
14
|
+
field: import("packages/payload/src/index.js").MappedField & import("packages/payload/src/index.js").SelectFieldProps;
|
|
15
15
|
} & Omit<import("./types.js").Props, "field">>;
|
|
16
16
|
relationship: any;
|
|
17
17
|
richText: import("react").FC<import("./types.js").Props>;
|
|
18
18
|
row: import("react").FC<import("./types.js").Props>;
|
|
19
19
|
select: import("react").FC<{
|
|
20
|
-
field: import("
|
|
20
|
+
field: import("packages/payload/src/index.js").MappedField & import("packages/payload/src/index.js").SelectFieldProps;
|
|
21
21
|
} & Omit<import("./types.js").Props, "field">>;
|
|
22
22
|
tabs: import("react").FC<{
|
|
23
|
-
field: import("
|
|
23
|
+
field: import("packages/payload/src/index.js").MappedField & import("packages/payload/src/index.js").TabsFieldProps;
|
|
24
24
|
} & Omit<import("./types.js").Props, "field">>;
|
|
25
25
|
text: import("react").FC<import("./types.js").Props>;
|
|
26
26
|
textarea: import("react").FC<import("./types.js").Props>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { I18nClient } from '@payloadcms/translations';
|
|
2
|
-
import type { FieldMap, MappedField } from '
|
|
3
|
-
import type { FieldPermissions } from 'payload';
|
|
2
|
+
import type { FieldMap, FieldPermissions, MappedField } from 'payload';
|
|
4
3
|
import type React from 'react';
|
|
5
4
|
import type { DiffMethod } from 'react-diff-viewer-continued';
|
|
6
5
|
export type DiffComponents = Record<string, React.FC<Props>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/views/Version/RenderFieldsToDiff/fields/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/views/Version/RenderFieldsToDiff/fields/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACtE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAE7D,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;AAE5D,MAAM,MAAM,KAAK,GAAG;IAClB,UAAU,EAAE,GAAG,CAAA;IACf,cAAc,EAAE,cAAc,CAAA;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,KAAK,EAAE,WAAW,CAAA;IAClB,QAAQ,EAAE,QAAQ,CAAA;IAClB,IAAI,EAAE,UAAU,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;IAC9C,OAAO,EAAE,GAAG,CAAA;CACb,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/views/Version/RenderFieldsToDiff/fields/types.ts"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\nimport type { FieldMap, MappedField } from '
|
|
1
|
+
{"version":3,"sources":["../../../../../src/views/Version/RenderFieldsToDiff/fields/types.ts"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\nimport type { FieldMap, FieldPermissions, MappedField } from 'payload'\nimport type React from 'react'\nimport type { DiffMethod } from 'react-diff-viewer-continued'\n\nexport type DiffComponents = Record<string, React.FC<Props>>\n\nexport type Props = {\n comparison: any\n diffComponents: DiffComponents\n diffMethod?: DiffMethod\n disableGutter?: boolean\n field: MappedField\n fieldMap: FieldMap\n i18n: I18nClient\n isRichText?: boolean\n locale?: string\n locales?: string[]\n permissions?: Record<string, FieldPermissions>\n version: any\n}\n"],"names":[],"mappings":"AAOA,WAaC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { I18nClient } from '@payloadcms/translations';
|
|
2
|
-
import type { FieldMap, MappedField } from '
|
|
3
|
-
import type { FieldPermissions } from 'payload';
|
|
2
|
+
import type { FieldMap, FieldPermissions, MappedField } from 'payload';
|
|
4
3
|
import type { DiffMethod } from 'react-diff-viewer-continued';
|
|
5
4
|
import type { DiffComponents } from './fields/types.js';
|
|
6
5
|
export type Props = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/views/Version/RenderFieldsToDiff/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/views/Version/RenderFieldsToDiff/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAE7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,MAAM,MAAM,KAAK,GAAG;IAClB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC/B,cAAc,EAAE,cAAc,CAAA;IAC9B,QAAQ,EAAE,QAAQ,CAAA;IAClB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;IAClD,IAAI,EAAE,UAAU,CAAA;IAChB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,UAAU,EAAE,UAAU,CAAA;IACtB,KAAK,EAAE,WAAW,CAAA;IAClB,UAAU,EAAE,OAAO,CAAA;CACpB,GAAG,KAAK,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/views/Version/RenderFieldsToDiff/types.ts"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\nimport type { FieldMap, MappedField } from '
|
|
1
|
+
{"version":3,"sources":["../../../../src/views/Version/RenderFieldsToDiff/types.ts"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\nimport type { FieldMap, FieldPermissions, MappedField } from 'payload'\nimport type { DiffMethod } from 'react-diff-viewer-continued'\n\nimport type { DiffComponents } from './fields/types.js'\n\nexport type Props = {\n comparison: Record<string, any>\n diffComponents: DiffComponents\n fieldMap: FieldMap\n fieldPermissions: Record<string, FieldPermissions>\n i18n: I18nClient\n locales: string[]\n version: Record<string, any>\n}\n\nexport type FieldDiffProps = {\n diffMethod: DiffMethod\n field: MappedField\n isRichText: boolean\n} & Props\n"],"names":[],"mappings":"AAgBA,WAIS"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/next",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.71",
|
|
4
4
|
"homepage": "https://payloadcms.com",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"sonner": "^1.5.0",
|
|
64
64
|
"uuid": "10.0.0",
|
|
65
65
|
"ws": "^8.16.0",
|
|
66
|
-
"@payloadcms/graphql": "3.0.0-beta.
|
|
67
|
-
"@payloadcms/translations": "3.0.0-beta.
|
|
68
|
-
"@payloadcms/ui": "3.0.0-beta.
|
|
66
|
+
"@payloadcms/graphql": "3.0.0-beta.71",
|
|
67
|
+
"@payloadcms/translations": "3.0.0-beta.71",
|
|
68
|
+
"@payloadcms/ui": "3.0.0-beta.71"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@next/eslint-plugin-next": "^14.1.0",
|
|
@@ -77,13 +77,13 @@
|
|
|
77
77
|
"esbuild": "0.23.0",
|
|
78
78
|
"esbuild-sass-plugin": "3.3.1",
|
|
79
79
|
"swc-plugin-transform-remove-imports": "1.14.0",
|
|
80
|
-
"
|
|
81
|
-
"
|
|
80
|
+
"payload": "3.0.0-beta.71",
|
|
81
|
+
"@payloadcms/eslint-config": "3.0.0-beta.59"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
84
|
"graphql": "^16.8.1",
|
|
85
85
|
"next": "^15.0.0-canary.53",
|
|
86
|
-
"payload": "3.0.0-beta.
|
|
86
|
+
"payload": "3.0.0-beta.71"
|
|
87
87
|
},
|
|
88
88
|
"engines": {
|
|
89
89
|
"node": "^18.20.2 || >=20.9.0"
|