@payloadcms/next 3.20.0-canary.75e9839 → 3.20.0-canary.8eef7db

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.
Files changed (111) hide show
  1. package/dist/prod/styles.css +1 -1
  2. package/dist/views/Account/index.d.ts.map +1 -1
  3. package/dist/views/Account/index.js +2 -1
  4. package/dist/views/Account/index.js.map +1 -1
  5. package/dist/views/CreateFirstUser/index.client.d.ts.map +1 -1
  6. package/dist/views/CreateFirstUser/index.client.js +4 -2
  7. package/dist/views/CreateFirstUser/index.client.js.map +1 -1
  8. package/dist/views/CreateFirstUser/index.d.ts.map +1 -1
  9. package/dist/views/CreateFirstUser/index.js +2 -1
  10. package/dist/views/CreateFirstUser/index.js.map +1 -1
  11. package/dist/views/Document/getDocumentPermissions.js +2 -2
  12. package/dist/views/Document/getDocumentPermissions.js.map +1 -1
  13. package/dist/views/Document/index.d.ts.map +1 -1
  14. package/dist/views/Document/index.js +2 -1
  15. package/dist/views/Document/index.js.map +1 -1
  16. package/dist/views/LivePreview/index.client.d.ts.map +1 -1
  17. package/dist/views/LivePreview/index.client.js +5 -2
  18. package/dist/views/LivePreview/index.client.js.map +1 -1
  19. package/dist/views/Version/Default/SelectedLocalesContext.d.ts +8 -0
  20. package/dist/views/Version/Default/SelectedLocalesContext.d.ts.map +1 -0
  21. package/dist/views/Version/Default/SelectedLocalesContext.js +10 -0
  22. package/dist/views/Version/Default/SelectedLocalesContext.js.map +1 -0
  23. package/dist/views/Version/Default/index.d.ts.map +1 -1
  24. package/dist/views/Version/Default/index.js +89 -159
  25. package/dist/views/Version/Default/index.js.map +1 -1
  26. package/dist/views/Version/Default/types.d.ts +4 -4
  27. package/dist/views/Version/Default/types.d.ts.map +1 -1
  28. package/dist/views/Version/Default/types.js.map +1 -1
  29. package/dist/views/Version/RenderFieldsToDiff/RenderVersionFieldsToDiff.d.ts +6 -0
  30. package/dist/views/Version/RenderFieldsToDiff/RenderVersionFieldsToDiff.d.ts.map +1 -0
  31. package/dist/views/Version/RenderFieldsToDiff/RenderVersionFieldsToDiff.js +36 -0
  32. package/dist/views/Version/RenderFieldsToDiff/RenderVersionFieldsToDiff.js.map +1 -0
  33. package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.d.ts +30 -0
  34. package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.d.ts.map +1 -0
  35. package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.js +300 -0
  36. package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.js.map +1 -0
  37. package/dist/views/Version/RenderFieldsToDiff/fields/Collapsible/index.d.ts +2 -3
  38. package/dist/views/Version/RenderFieldsToDiff/fields/Collapsible/index.d.ts.map +1 -1
  39. package/dist/views/Version/RenderFieldsToDiff/fields/Collapsible/index.js +54 -31
  40. package/dist/views/Version/RenderFieldsToDiff/fields/Collapsible/index.js.map +1 -1
  41. package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.d.ts +2 -3
  42. package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.d.ts.map +1 -1
  43. package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.js +59 -35
  44. package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.js.map +1 -1
  45. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.d.ts +3 -3
  46. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.d.ts.map +1 -1
  47. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js +97 -65
  48. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js.map +1 -1
  49. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.d.ts +2 -4
  50. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.d.ts.map +1 -1
  51. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js +17 -15
  52. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js.map +1 -1
  53. package/dist/views/Version/RenderFieldsToDiff/fields/Row/index.d.ts +2 -3
  54. package/dist/views/Version/RenderFieldsToDiff/fields/Row/index.d.ts.map +1 -1
  55. package/dist/views/Version/RenderFieldsToDiff/fields/Row/index.js +7 -24
  56. package/dist/views/Version/RenderFieldsToDiff/fields/Row/index.js.map +1 -1
  57. package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.d.ts +2 -4
  58. package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.d.ts.map +1 -1
  59. package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js +56 -27
  60. package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js.map +1 -1
  61. package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.d.ts +2 -4
  62. package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.d.ts.map +1 -1
  63. package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js +137 -80
  64. package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js.map +1 -1
  65. package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.d.ts +2 -4
  66. package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.d.ts.map +1 -1
  67. package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.js +71 -36
  68. package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.js.map +1 -1
  69. package/dist/views/Version/RenderFieldsToDiff/fields/index.d.ts +2 -22
  70. package/dist/views/Version/RenderFieldsToDiff/fields/index.d.ts.map +1 -1
  71. package/dist/views/Version/RenderFieldsToDiff/fields/index.js +2 -0
  72. package/dist/views/Version/RenderFieldsToDiff/fields/index.js.map +1 -1
  73. package/dist/views/Version/RenderFieldsToDiff/index.d.ts +2 -4
  74. package/dist/views/Version/RenderFieldsToDiff/index.d.ts.map +1 -1
  75. package/dist/views/Version/RenderFieldsToDiff/index.js +8 -111
  76. package/dist/views/Version/RenderFieldsToDiff/index.js.map +1 -1
  77. package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.d.ts.map +1 -1
  78. package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.js +7 -1
  79. package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.js.map +1 -1
  80. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldPathsModified.d.ts +27 -0
  81. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldPathsModified.d.ts.map +1 -0
  82. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldPathsModified.js +30 -0
  83. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldPathsModified.js.map +1 -0
  84. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.d.ts +8 -3
  85. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.d.ts.map +1 -1
  86. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.js +12 -3
  87. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.js.map +1 -1
  88. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.spec.js +27 -9
  89. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.spec.js.map +1 -1
  90. package/dist/views/Version/Restore/index.d.ts.map +1 -1
  91. package/dist/views/Version/Restore/index.js +2 -2
  92. package/dist/views/Version/Restore/index.js.map +1 -1
  93. package/dist/views/Version/SelectComparison/index.d.ts.map +1 -1
  94. package/dist/views/Version/SelectComparison/index.js +7 -3
  95. package/dist/views/Version/SelectComparison/index.js.map +1 -1
  96. package/dist/views/Version/index.d.ts.map +1 -1
  97. package/dist/views/Version/index.js +117 -15
  98. package/dist/views/Version/index.js.map +1 -1
  99. package/dist/views/Versions/getLatestVersion.d.ts +4 -1
  100. package/dist/views/Versions/getLatestVersion.d.ts.map +1 -1
  101. package/dist/views/Versions/getLatestVersion.js +6 -0
  102. package/dist/views/Versions/getLatestVersion.js.map +1 -1
  103. package/package.json +7 -7
  104. package/dist/views/Version/RenderFieldsToDiff/fields/types.d.ts +0 -21
  105. package/dist/views/Version/RenderFieldsToDiff/fields/types.d.ts.map +0 -1
  106. package/dist/views/Version/RenderFieldsToDiff/fields/types.js +0 -2
  107. package/dist/views/Version/RenderFieldsToDiff/fields/types.js.map +0 -1
  108. package/dist/views/Version/RenderFieldsToDiff/types.d.ts +0 -21
  109. package/dist/views/Version/RenderFieldsToDiff/types.d.ts.map +0 -1
  110. package/dist/views/Version/RenderFieldsToDiff/types.js +0 -2
  111. package/dist/views/Version/RenderFieldsToDiff/types.js.map +0 -1
@@ -0,0 +1,300 @@
1
+ import { RenderServerComponent } from '@payloadcms/ui/elements/RenderServerComponent';
2
+ import { fieldIsID, getUniqueListBy, tabHasName } from 'payload/shared';
3
+ import { diffMethods } from './fields/diffMethods.js';
4
+ import { diffComponents } from './fields/index.js';
5
+ import { getFieldPathsModified } from './utilities/getFieldPathsModified.js';
6
+ /**
7
+ * Build up an object that contains rendered diff components for each field.
8
+ * This is then sent to the client to be rendered.
9
+ *
10
+ * Here, the server is responsible for traversing through the document data and building up this
11
+ * version state object.
12
+ */
13
+ export const buildVersionFields = ({
14
+ clientSchemaMap,
15
+ comparisonSiblingData,
16
+ customDiffComponents,
17
+ entitySlug,
18
+ fieldPermissions,
19
+ fields,
20
+ i18n,
21
+ parentIndexPath,
22
+ parentPath,
23
+ parentSchemaPath,
24
+ req,
25
+ selectedLocales,
26
+ versionSiblingData
27
+ }) => {
28
+ const versionFields = [];
29
+ let fieldIndex = -1;
30
+ for (const field of fields) {
31
+ fieldIndex++;
32
+ if (fieldIsID(field)) {
33
+ continue;
34
+ }
35
+ const {
36
+ indexPath,
37
+ path,
38
+ schemaPath
39
+ } = getFieldPathsModified({
40
+ field,
41
+ index: fieldIndex,
42
+ parentIndexPath: 'name' in field ? '' : parentIndexPath,
43
+ parentPath,
44
+ parentSchemaPath
45
+ });
46
+ const clientField = clientSchemaMap.get(entitySlug + '.' + schemaPath);
47
+ if (!clientField) {
48
+ req.payload.logger.error({
49
+ clientFieldKey: entitySlug + '.' + schemaPath,
50
+ clientSchemaMapKeys: Array.from(clientSchemaMap.keys()),
51
+ msg: 'No client field found for ' + entitySlug + '.' + schemaPath,
52
+ parentPath,
53
+ parentSchemaPath,
54
+ path,
55
+ schemaPath
56
+ });
57
+ throw new Error('No client field found for ' + entitySlug + '.' + schemaPath);
58
+ }
59
+ const versionField = {
60
+ type: field.type
61
+ };
62
+ const isLocalized = 'localized' in field && field.localized;
63
+ const fieldName = 'name' in field ? field.name : null;
64
+ const versionValue = fieldName ? versionSiblingData?.[fieldName] : versionSiblingData;
65
+ const comparisonValue = fieldName ? comparisonSiblingData?.[fieldName] : comparisonSiblingData;
66
+ if (isLocalized) {
67
+ versionField.fieldByLocale = {};
68
+ for (const locale of selectedLocales) {
69
+ versionField.fieldByLocale[locale] = buildVersionField({
70
+ clientField: clientField,
71
+ clientSchemaMap,
72
+ comparisonValue: comparisonValue?.[locale],
73
+ customDiffComponents,
74
+ entitySlug,
75
+ field,
76
+ fieldPermissions,
77
+ i18n,
78
+ indexPath,
79
+ locale,
80
+ parentPath,
81
+ parentSchemaPath,
82
+ path,
83
+ req,
84
+ schemaPath,
85
+ selectedLocales,
86
+ versionValue: versionValue?.[locale]
87
+ });
88
+ }
89
+ } else {
90
+ versionField.field = buildVersionField({
91
+ clientField: clientField,
92
+ clientSchemaMap,
93
+ comparisonValue,
94
+ customDiffComponents,
95
+ entitySlug,
96
+ field,
97
+ fieldPermissions,
98
+ i18n,
99
+ indexPath,
100
+ parentPath,
101
+ parentSchemaPath,
102
+ path,
103
+ req,
104
+ schemaPath,
105
+ selectedLocales,
106
+ versionValue
107
+ });
108
+ }
109
+ versionFields.push(versionField);
110
+ }
111
+ return {
112
+ versionFields
113
+ };
114
+ };
115
+ const buildVersionField = ({
116
+ clientField,
117
+ clientSchemaMap,
118
+ comparisonValue,
119
+ customDiffComponents,
120
+ entitySlug,
121
+ field,
122
+ fieldPermissions,
123
+ i18n,
124
+ indexPath,
125
+ locale,
126
+ parentPath,
127
+ parentSchemaPath,
128
+ path,
129
+ req,
130
+ schemaPath,
131
+ selectedLocales,
132
+ versionValue
133
+ }) => {
134
+ const fieldName = 'name' in field ? field.name : null;
135
+ const diffMethod = diffMethods[field.type] || 'CHARS';
136
+ const hasPermission = fieldPermissions === true || !fieldName || fieldPermissions?.[fieldName] === true || fieldPermissions?.[fieldName]?.read;
137
+ const subFieldPermissions = fieldPermissions === true || !fieldName || fieldPermissions?.[fieldName] === true || fieldPermissions?.[fieldName]?.fields;
138
+ if (!hasPermission) {
139
+ return null;
140
+ }
141
+ const CustomComponent = field?.admin?.components?.Diff ?? customDiffComponents?.[field.type];
142
+ const DefaultComponent = diffComponents?.[field.type];
143
+ const baseVersionField = {
144
+ fields: []
145
+ };
146
+ if (field.type === 'tabs' && 'tabs' in field) {
147
+ baseVersionField.tabs = [];
148
+ let tabIndex = -1;
149
+ for (const tab of field.tabs) {
150
+ tabIndex++;
151
+ const isNamedTab = tabHasName(tab);
152
+ const {
153
+ indexPath: tabIndexPath,
154
+ path: tabPath,
155
+ schemaPath: tabSchemaPath
156
+ } = getFieldPathsModified({
157
+ field: {
158
+ ...tab,
159
+ type: 'tab'
160
+ },
161
+ index: tabIndex,
162
+ parentIndexPath: indexPath,
163
+ parentPath,
164
+ parentSchemaPath
165
+ });
166
+ baseVersionField.tabs.push({
167
+ name: 'name' in tab ? tab.name : null,
168
+ fields: buildVersionFields({
169
+ clientSchemaMap,
170
+ comparisonSiblingData: 'name' in tab ? comparisonValue?.[tab.name] : comparisonValue,
171
+ customDiffComponents,
172
+ entitySlug,
173
+ fieldPermissions,
174
+ fields: tab.fields,
175
+ i18n,
176
+ parentIndexPath: isNamedTab ? '' : tabIndexPath,
177
+ parentPath: tabPath,
178
+ parentSchemaPath: tabSchemaPath,
179
+ req,
180
+ selectedLocales,
181
+ versionSiblingData: 'name' in tab ? versionValue?.[tab.name] : versionValue
182
+ }).versionFields,
183
+ label: tab.label
184
+ });
185
+ }
186
+ } else if ('fields' in field) {
187
+ if (field.type === 'array') {
188
+ if (!Array.isArray(versionValue)) {
189
+ throw new Error('Expected versionValue to be an array');
190
+ }
191
+ baseVersionField.rows = [];
192
+ for (let i = 0; i < versionValue.length; i++) {
193
+ const comparisonRow = comparisonValue?.[i] || {};
194
+ const versionRow = versionValue?.[i] || {};
195
+ baseVersionField.rows[i] = buildVersionFields({
196
+ clientSchemaMap,
197
+ comparisonSiblingData: comparisonRow,
198
+ customDiffComponents,
199
+ entitySlug,
200
+ fieldPermissions,
201
+ fields: field.fields,
202
+ i18n,
203
+ parentIndexPath: 'name' in field ? '' : indexPath,
204
+ parentPath: path + '.' + i,
205
+ parentSchemaPath: schemaPath,
206
+ req,
207
+ selectedLocales,
208
+ versionSiblingData: versionRow
209
+ }).versionFields;
210
+ }
211
+ } else {
212
+ baseVersionField.fields = buildVersionFields({
213
+ clientSchemaMap,
214
+ comparisonSiblingData: comparisonValue,
215
+ customDiffComponents,
216
+ entitySlug,
217
+ fieldPermissions,
218
+ fields: field.fields,
219
+ i18n,
220
+ parentIndexPath: 'name' in field ? '' : indexPath,
221
+ parentPath: path,
222
+ parentSchemaPath: schemaPath,
223
+ req,
224
+ selectedLocales,
225
+ versionSiblingData: versionValue
226
+ }).versionFields;
227
+ }
228
+ } else if (field.type === 'blocks') {
229
+ baseVersionField.rows = [];
230
+ if (!Array.isArray(versionValue)) {
231
+ throw new Error('Expected versionValue to be an array');
232
+ }
233
+ for (let i = 0; i < versionValue.length; i++) {
234
+ const comparisonRow = comparisonValue?.[i] || {};
235
+ const versionRow = versionValue[i] || {};
236
+ const versionBlock = field.blocks.find(block => block.slug === versionRow.blockType);
237
+ let fields = [];
238
+ if (versionRow.blockType === comparisonRow.blockType) {
239
+ fields = versionBlock.fields;
240
+ } else {
241
+ const comparisonBlock = field.blocks.find(block => block.slug === comparisonRow.blockType);
242
+ if (comparisonBlock) {
243
+ fields = getUniqueListBy([...versionBlock.fields, ...comparisonBlock.fields], 'name');
244
+ } else {
245
+ fields = versionBlock.fields;
246
+ }
247
+ }
248
+ baseVersionField.rows[i] = buildVersionFields({
249
+ clientSchemaMap,
250
+ comparisonSiblingData: comparisonRow,
251
+ customDiffComponents,
252
+ entitySlug,
253
+ fieldPermissions,
254
+ fields,
255
+ i18n,
256
+ parentIndexPath: 'name' in field ? '' : indexPath,
257
+ parentPath: path + '.' + i,
258
+ parentSchemaPath: schemaPath + '.' + versionBlock.slug,
259
+ req,
260
+ selectedLocales,
261
+ versionSiblingData: versionRow
262
+ }).versionFields;
263
+ }
264
+ }
265
+ const clientCellProps = {
266
+ baseVersionField: {
267
+ ...baseVersionField,
268
+ CustomComponent: undefined
269
+ },
270
+ comparisonValue,
271
+ diffMethod,
272
+ field: clientField,
273
+ fieldPermissions: subFieldPermissions,
274
+ versionValue
275
+ };
276
+ const serverCellProps = {
277
+ ...clientCellProps,
278
+ clientField,
279
+ field,
280
+ i18n,
281
+ req,
282
+ selectedLocales
283
+ };
284
+ baseVersionField.CustomComponent = RenderServerComponent({
285
+ clientProps: locale ? {
286
+ ...clientCellProps,
287
+ locale
288
+ } : clientCellProps,
289
+ Component: CustomComponent,
290
+ Fallback: DefaultComponent,
291
+ importMap: req.payload.importMap,
292
+ key: 'diff component',
293
+ serverProps: locale ? {
294
+ ...serverCellProps,
295
+ locale
296
+ } : serverCellProps
297
+ });
298
+ return baseVersionField;
299
+ };
300
+ //# sourceMappingURL=buildVersionFields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildVersionFields.js","names":["RenderServerComponent","fieldIsID","getUniqueListBy","tabHasName","diffMethods","diffComponents","getFieldPathsModified","buildVersionFields","clientSchemaMap","comparisonSiblingData","customDiffComponents","entitySlug","fieldPermissions","fields","i18n","parentIndexPath","parentPath","parentSchemaPath","req","selectedLocales","versionSiblingData","versionFields","fieldIndex","field","indexPath","path","schemaPath","index","clientField","get","payload","logger","error","clientFieldKey","clientSchemaMapKeys","Array","from","keys","msg","Error","versionField","type","isLocalized","localized","fieldName","name","versionValue","comparisonValue","fieldByLocale","locale","buildVersionField","push","diffMethod","hasPermission","read","subFieldPermissions","CustomComponent","admin","components","Diff","DefaultComponent","baseVersionField","tabs","tabIndex","tab","isNamedTab","tabIndexPath","tabPath","tabSchemaPath","label","isArray","rows","i","length","comparisonRow","versionRow","versionBlock","blocks","find","block","slug","blockType","comparisonBlock","clientCellProps","undefined","serverCellProps","clientProps","Component","Fallback","importMap","key","serverProps"],"sources":["../../../../src/views/Version/RenderFieldsToDiff/buildVersionFields.tsx"],"sourcesContent":["import type { I18nClient } from '@payloadcms/translations'\nimport type {\n BaseVersionField,\n ClientField,\n ClientFieldSchemaMap,\n Field,\n FieldDiffClientProps,\n FieldDiffServerProps,\n FieldTypes,\n PayloadComponent,\n PayloadRequest,\n SanitizedFieldPermissions,\n VersionField,\n} from 'payload'\nimport type { DiffMethod } from 'react-diff-viewer-continued'\n\nimport { RenderServerComponent } from '@payloadcms/ui/elements/RenderServerComponent'\nimport { fieldIsID, getUniqueListBy, tabHasName } from 'payload/shared'\n\nimport { diffMethods } from './fields/diffMethods.js'\nimport { diffComponents } from './fields/index.js'\nimport { getFieldPathsModified } from './utilities/getFieldPathsModified.js'\n\nexport type BuildVersionFieldsArgs = {\n clientSchemaMap: ClientFieldSchemaMap\n comparisonSiblingData: object\n customDiffComponents: Partial<\n Record<FieldTypes, PayloadComponent<FieldDiffServerProps, FieldDiffClientProps>>\n >\n entitySlug: string\n fieldPermissions:\n | {\n [key: string]: SanitizedFieldPermissions\n }\n | true\n fields: Field[]\n i18n: I18nClient\n parentIndexPath: string\n parentPath: string\n parentSchemaPath: string\n req: PayloadRequest\n selectedLocales: string[]\n versionSiblingData: object\n}\n\n/**\n * Build up an object that contains rendered diff components for each field.\n * This is then sent to the client to be rendered.\n *\n * Here, the server is responsible for traversing through the document data and building up this\n * version state object.\n */\nexport const buildVersionFields = ({\n clientSchemaMap,\n comparisonSiblingData,\n customDiffComponents,\n entitySlug,\n fieldPermissions,\n fields,\n i18n,\n parentIndexPath,\n parentPath,\n parentSchemaPath,\n req,\n selectedLocales,\n versionSiblingData,\n}: BuildVersionFieldsArgs): {\n versionFields: VersionField[]\n} => {\n const versionFields: VersionField[] = []\n let fieldIndex = -1\n for (const field of fields) {\n fieldIndex++\n if (fieldIsID(field)) {\n continue\n }\n\n const { indexPath, path, schemaPath } = getFieldPathsModified({\n field,\n index: fieldIndex,\n parentIndexPath: 'name' in field ? '' : parentIndexPath,\n parentPath,\n parentSchemaPath,\n })\n\n const clientField = clientSchemaMap.get(entitySlug + '.' + schemaPath)\n\n if (!clientField) {\n req.payload.logger.error({\n clientFieldKey: entitySlug + '.' + schemaPath,\n clientSchemaMapKeys: Array.from(clientSchemaMap.keys()),\n msg: 'No client field found for ' + entitySlug + '.' + schemaPath,\n parentPath,\n parentSchemaPath,\n path,\n schemaPath,\n })\n throw new Error('No client field found for ' + entitySlug + '.' + schemaPath)\n }\n\n const versionField: VersionField = {\n type: field.type,\n }\n const isLocalized = 'localized' in field && field.localized\n const fieldName: null | string = 'name' in field ? field.name : null\n\n const versionValue = fieldName ? versionSiblingData?.[fieldName] : versionSiblingData\n\n const comparisonValue = fieldName ? comparisonSiblingData?.[fieldName] : comparisonSiblingData\n\n if (isLocalized) {\n versionField.fieldByLocale = {}\n\n for (const locale of selectedLocales) {\n versionField.fieldByLocale[locale] = buildVersionField({\n clientField: clientField as ClientField,\n clientSchemaMap,\n comparisonValue: comparisonValue?.[locale],\n customDiffComponents,\n entitySlug,\n field,\n fieldPermissions,\n i18n,\n indexPath,\n locale,\n parentPath,\n parentSchemaPath,\n path,\n req,\n schemaPath,\n selectedLocales,\n versionValue: versionValue?.[locale],\n })\n }\n } else {\n versionField.field = buildVersionField({\n clientField: clientField as ClientField,\n clientSchemaMap,\n comparisonValue,\n customDiffComponents,\n entitySlug,\n field,\n fieldPermissions,\n i18n,\n indexPath,\n parentPath,\n parentSchemaPath,\n path,\n req,\n schemaPath,\n selectedLocales,\n versionValue,\n })\n }\n\n versionFields.push(versionField)\n }\n\n return {\n versionFields,\n }\n}\n\nconst buildVersionField = ({\n clientField,\n clientSchemaMap,\n comparisonValue,\n customDiffComponents,\n entitySlug,\n field,\n fieldPermissions,\n i18n,\n indexPath,\n locale,\n parentPath,\n parentSchemaPath,\n path,\n req,\n schemaPath,\n selectedLocales,\n versionValue,\n}: {\n clientField: ClientField\n comparisonValue: unknown\n field: Field\n indexPath: string\n locale?: string\n path: string\n schemaPath: string\n versionValue: unknown\n} & Omit<\n BuildVersionFieldsArgs,\n 'comparisonSiblingData' | 'fields' | 'parentIndexPath' | 'versionSiblingData'\n>): BaseVersionField | null => {\n const fieldName: null | string = 'name' in field ? field.name : null\n\n const diffMethod: DiffMethod = diffMethods[field.type] || 'CHARS'\n\n const hasPermission =\n fieldPermissions === true ||\n !fieldName ||\n fieldPermissions?.[fieldName] === true ||\n fieldPermissions?.[fieldName]?.read\n\n const subFieldPermissions =\n fieldPermissions === true ||\n !fieldName ||\n fieldPermissions?.[fieldName] === true ||\n fieldPermissions?.[fieldName]?.fields\n\n if (!hasPermission) {\n return null\n }\n\n const CustomComponent = field?.admin?.components?.Diff ?? customDiffComponents?.[field.type]\n const DefaultComponent = diffComponents?.[field.type]\n\n const baseVersionField: BaseVersionField = {\n fields: [],\n }\n\n if (field.type === 'tabs' && 'tabs' in field) {\n baseVersionField.tabs = []\n let tabIndex = -1\n for (const tab of field.tabs) {\n tabIndex++\n const isNamedTab = tabHasName(tab)\n\n const {\n indexPath: tabIndexPath,\n path: tabPath,\n schemaPath: tabSchemaPath,\n } = getFieldPathsModified({\n field: {\n ...tab,\n type: 'tab',\n },\n index: tabIndex,\n parentIndexPath: indexPath,\n parentPath,\n parentSchemaPath,\n })\n baseVersionField.tabs.push({\n name: 'name' in tab ? tab.name : null,\n fields: buildVersionFields({\n clientSchemaMap,\n comparisonSiblingData: 'name' in tab ? comparisonValue?.[tab.name] : comparisonValue,\n customDiffComponents,\n entitySlug,\n fieldPermissions,\n fields: tab.fields,\n i18n,\n parentIndexPath: isNamedTab ? '' : tabIndexPath,\n parentPath: tabPath,\n parentSchemaPath: tabSchemaPath,\n req,\n selectedLocales,\n versionSiblingData: 'name' in tab ? versionValue?.[tab.name] : versionValue,\n }).versionFields,\n label: tab.label,\n })\n }\n } // At this point, we are dealing with a `row`, etc\n else if ('fields' in field) {\n if (field.type === 'array') {\n if (!Array.isArray(versionValue)) {\n throw new Error('Expected versionValue to be an array')\n }\n baseVersionField.rows = []\n\n for (let i = 0; i < versionValue.length; i++) {\n const comparisonRow = comparisonValue?.[i] || {}\n const versionRow = versionValue?.[i] || {}\n baseVersionField.rows[i] = buildVersionFields({\n clientSchemaMap,\n comparisonSiblingData: comparisonRow,\n customDiffComponents,\n entitySlug,\n fieldPermissions,\n fields: field.fields,\n i18n,\n parentIndexPath: 'name' in field ? '' : indexPath,\n parentPath: path + '.' + i,\n parentSchemaPath: schemaPath,\n req,\n selectedLocales,\n versionSiblingData: versionRow,\n }).versionFields\n }\n } else {\n baseVersionField.fields = buildVersionFields({\n clientSchemaMap,\n comparisonSiblingData: comparisonValue as object,\n customDiffComponents,\n entitySlug,\n fieldPermissions,\n fields: field.fields,\n i18n,\n parentIndexPath: 'name' in field ? '' : indexPath,\n parentPath: path,\n parentSchemaPath: schemaPath,\n req,\n selectedLocales,\n versionSiblingData: versionValue as object,\n }).versionFields\n }\n } else if (field.type === 'blocks') {\n baseVersionField.rows = []\n\n if (!Array.isArray(versionValue)) {\n throw new Error('Expected versionValue to be an array')\n }\n\n for (let i = 0; i < versionValue.length; i++) {\n const comparisonRow = comparisonValue?.[i] || {}\n const versionRow = versionValue[i] || {}\n const versionBlock = field.blocks.find((block) => block.slug === versionRow.blockType)\n\n let fields = []\n\n if (versionRow.blockType === comparisonRow.blockType) {\n fields = versionBlock.fields\n } else {\n const comparisonBlock = field.blocks.find((block) => block.slug === comparisonRow.blockType)\n if (comparisonBlock) {\n fields = getUniqueListBy<Field>(\n [...versionBlock.fields, ...comparisonBlock.fields],\n 'name',\n )\n } else {\n fields = versionBlock.fields\n }\n }\n\n baseVersionField.rows[i] = buildVersionFields({\n clientSchemaMap,\n comparisonSiblingData: comparisonRow,\n customDiffComponents,\n entitySlug,\n fieldPermissions,\n fields,\n i18n,\n parentIndexPath: 'name' in field ? '' : indexPath,\n parentPath: path + '.' + i,\n parentSchemaPath: schemaPath + '.' + versionBlock.slug,\n req,\n selectedLocales,\n versionSiblingData: versionRow,\n }).versionFields\n }\n }\n\n const clientCellProps: FieldDiffClientProps = {\n baseVersionField: {\n ...baseVersionField,\n CustomComponent: undefined,\n },\n comparisonValue,\n diffMethod,\n field: clientField,\n fieldPermissions: subFieldPermissions,\n versionValue,\n }\n\n const serverCellProps: FieldDiffServerProps = {\n ...clientCellProps,\n clientField,\n field,\n i18n,\n req,\n selectedLocales,\n }\n\n baseVersionField.CustomComponent = RenderServerComponent({\n clientProps: locale\n ? ({\n ...clientCellProps,\n locale,\n } as FieldDiffClientProps)\n : clientCellProps,\n Component: CustomComponent,\n Fallback: DefaultComponent,\n importMap: req.payload.importMap,\n key: 'diff component',\n serverProps: locale\n ? ({\n ...serverCellProps,\n locale,\n } as FieldDiffServerProps)\n : serverCellProps,\n })\n\n return baseVersionField\n}\n"],"mappings":"AAgBA,SAASA,qBAAqB,QAAQ;AACtC,SAASC,SAAS,EAAEC,eAAe,EAAEC,UAAU,QAAQ;AAEvD,SAASC,WAAW,QAAQ;AAC5B,SAASC,cAAc,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ;AAwBtC;;;;;;;AAOA,OAAO,MAAMC,kBAAA,GAAqBA,CAAC;EACjCC,eAAe;EACfC,qBAAqB;EACrBC,oBAAoB;EACpBC,UAAU;EACVC,gBAAgB;EAChBC,MAAM;EACNC,IAAI;EACJC,eAAe;EACfC,UAAU;EACVC,gBAAgB;EAChBC,GAAG;EACHC,eAAe;EACfC;AAAkB,CACK;EAGvB,MAAMC,aAAA,GAAgC,EAAE;EACxC,IAAIC,UAAA,GAAa,CAAC;EAClB,KAAK,MAAMC,KAAA,IAASV,MAAA,EAAQ;IAC1BS,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AS;IAChCC,GAAA,EAAK;IACLC,WAAA,EAAa1C,MAAA,GACR;MACC,GAAGoC,eAAe;MAClBpC;IACF,IACAoC;EACN;EAEA,OAAOxB,gBAAA;AACT","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
- import type { DiffComponentProps } from '../types.js';
3
- export declare const Collapsible: React.FC<DiffComponentProps>;
1
+ import type { CollapsibleFieldDiffClientComponent } from 'payload';
2
+ export declare const Collapsible: CollapsibleFieldDiffClientComponent;
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Collapsible/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAOrD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAmCpD,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Collapsible/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,SAAS,CAAA;AAYlE,eAAO,MAAM,WAAW,EAAE,mCA0BzB,CAAA"}
@@ -1,41 +1,64 @@
1
1
  'use client';
2
2
 
3
+ import { c as _c } from "react/compiler-runtime";
3
4
  import { jsx as _jsx } from "react/jsx-runtime";
4
5
  import { getTranslation } from '@payloadcms/translations';
6
+ import { useTranslation } from '@payloadcms/ui';
5
7
  import React from 'react';
8
+ import { useSelectedLocales } from '../../../Default/SelectedLocalesContext.js';
6
9
  import { DiffCollapser } from '../../DiffCollapser/index.js';
7
- import { RenderFieldsToDiff } from '../../index.js';
10
+ import { RenderVersionFieldsToDiff } from '../../RenderVersionFieldsToDiff.js';
8
11
  const baseClass = 'collapsible-diff';
9
- export const Collapsible = ({
10
- comparison,
11
- diffComponents,
12
- field,
13
- fieldPermissions,
14
- fields,
15
- i18n,
16
- locales,
17
- version
18
- }) => {
19
- return /*#__PURE__*/_jsx("div", {
20
- className: baseClass,
21
- children: /*#__PURE__*/_jsx(DiffCollapser, {
22
- comparison: comparison,
23
- fields: fields,
24
- label: 'label' in field && field.label && typeof field.label !== 'function' && /*#__PURE__*/_jsx("span", {
25
- children: getTranslation(field.label, i18n)
26
- }),
27
- locales: locales,
28
- version: version,
29
- children: /*#__PURE__*/_jsx(RenderFieldsToDiff, {
30
- comparison: comparison,
31
- diffComponents: diffComponents,
32
- fieldPermissions: fieldPermissions,
33
- fields: fields,
34
- i18n: i18n,
35
- locales: locales,
36
- version: version
12
+ export const Collapsible = t0 => {
13
+ const $ = _c(10);
14
+ const {
15
+ baseVersionField,
16
+ comparisonValue,
17
+ field,
18
+ versionValue
19
+ } = t0;
20
+ const {
21
+ i18n
22
+ } = useTranslation();
23
+ const {
24
+ selectedLocales
25
+ } = useSelectedLocales();
26
+ let t1;
27
+ if ($[0] !== field || $[1] !== i18n) {
28
+ t1 = "label" in field && field.label && typeof field.label !== "function" && _jsx("span", {
29
+ children: getTranslation(field.label, i18n)
30
+ });
31
+ $[0] = field;
32
+ $[1] = i18n;
33
+ $[2] = t1;
34
+ } else {
35
+ t1 = $[2];
36
+ }
37
+ let t2;
38
+ if ($[3] !== baseVersionField.fields || $[4] !== comparisonValue || $[5] !== field.fields || $[6] !== selectedLocales || $[7] !== t1 || $[8] !== versionValue) {
39
+ t2 = _jsx("div", {
40
+ className: baseClass,
41
+ children: _jsx(DiffCollapser, {
42
+ comparison: comparisonValue,
43
+ fields: field.fields,
44
+ label: t1,
45
+ locales: selectedLocales,
46
+ version: versionValue,
47
+ children: _jsx(RenderVersionFieldsToDiff, {
48
+ versionFields: baseVersionField.fields
49
+ })
37
50
  })
38
- })
39
- });
51
+ });
52
+ $[3] = baseVersionField.fields;
53
+ $[4] = comparisonValue;
54
+ $[5] = field.fields;
55
+ $[6] = selectedLocales;
56
+ $[7] = t1;
57
+ $[8] = versionValue;
58
+ $[9] = t2;
59
+ } else {
60
+ t2 = $[9];
61
+ }
62
+ return t2;
40
63
  };
41
64
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["getTranslation","React","DiffCollapser","RenderFieldsToDiff","baseClass","Collapsible","comparison","diffComponents","field","fieldPermissions","fields","i18n","locales","version","_jsx","className","label"],"sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Collapsible/index.tsx"],"sourcesContent":["'use client'\nimport { getTranslation } from '@payloadcms/translations'\nimport React from 'react'\n\nimport type { DiffComponentProps } from '../types.js'\n\nimport { DiffCollapser } from '../../DiffCollapser/index.js'\nimport { RenderFieldsToDiff } from '../../index.js'\n\nconst baseClass = 'collapsible-diff'\n\nexport const Collapsible: React.FC<DiffComponentProps> = ({\n comparison,\n diffComponents,\n field,\n fieldPermissions,\n fields,\n i18n,\n locales,\n version,\n}) => {\n return (\n <div className={baseClass}>\n <DiffCollapser\n comparison={comparison}\n fields={fields}\n label={\n 'label' in field &&\n field.label &&\n typeof field.label !== 'function' && <span>{getTranslation(field.label, i18n)}</span>\n }\n locales={locales}\n version={version}\n >\n <RenderFieldsToDiff\n comparison={comparison}\n diffComponents={diffComponents}\n fieldPermissions={fieldPermissions}\n fields={fields}\n i18n={i18n}\n locales={locales}\n version={version}\n />\n </DiffCollapser>\n </div>\n )\n}\n"],"mappings":"AAAA;;;AACA,SAASA,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAIlB,SAASC,aAAa,QAAQ;AAC9B,SAASC,kBAAkB,QAAQ;AAEnC,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,WAAA,GAA4CA,CAAC;EACxDC,UAAU;EACVC,cAAc;EACdC,KAAK;EACLC,gBAAgB;EAChBC,MAAM;EACNC,IAAI;EACJC,OAAO;EACPC;AAAO,CACR;EACC,oBACEC,IAAA,CAAC;IAAIC,SAAA,EAAWX,SAAA;cACd,aAAAU,IAAA,CAACZ,aAAA;MACCI,UAAA,EAAYA,UAAA;MACZI,MAAA,EAAQA,MAAA;MACRM,KAAA,EACE,WAAWR,KAAA,IACXA,KAAA,CAAMQ,KAAK,IACX,OAAOR,KAAA,CAAMQ,KAAK,KAAK,2BAAcF,IAAA,CAAC;kBAAMd,cAAA,CAAeQ,KAAA,CAAMQ,KAAK,EAAEL,IAAA;;MAE1EC,OAAA,EAASA,OAAA;MACTC,OAAA,EAASA,OAAA;gBAET,aAAAC,IAAA,CAACX,kBAAA;QACCG,UAAA,EAAYA,UAAA;QACZC,cAAA,EAAgBA,cAAA;QAChBE,gBAAA,EAAkBA,gBAAA;QAClBC,MAAA,EAAQA,MAAA;QACRC,IAAA,EAAMA,IAAA;QACNC,OAAA,EAASA,OAAA;QACTC,OAAA,EAASA;;;;AAKnB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["c","_c","getTranslation","useTranslation","React","useSelectedLocales","DiffCollapser","RenderVersionFieldsToDiff","baseClass","Collapsible","t0","$","baseVersionField","comparisonValue","field","versionValue","i18n","selectedLocales","t1","label","_jsx","children","t2","className","comparison","fields","version","versionFields"],"sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Collapsible/index.tsx"],"sourcesContent":["'use client'\nimport type { CollapsibleFieldDiffClientComponent } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport { useTranslation } from '@payloadcms/ui'\nimport React from 'react'\n\nimport { useSelectedLocales } from '../../../Default/SelectedLocalesContext.js'\nimport { DiffCollapser } from '../../DiffCollapser/index.js'\nimport { RenderVersionFieldsToDiff } from '../../RenderVersionFieldsToDiff.js'\n\nconst baseClass = 'collapsible-diff'\n\nexport const Collapsible: CollapsibleFieldDiffClientComponent = ({\n baseVersionField,\n comparisonValue,\n field,\n versionValue,\n}) => {\n const { i18n } = useTranslation()\n const { selectedLocales } = useSelectedLocales()\n\n return (\n <div className={baseClass}>\n <DiffCollapser\n comparison={comparisonValue}\n fields={field.fields}\n label={\n 'label' in field &&\n field.label &&\n typeof field.label !== 'function' && <span>{getTranslation(field.label, i18n)}</span>\n }\n locales={selectedLocales}\n version={versionValue}\n >\n <RenderVersionFieldsToDiff versionFields={baseVersionField.fields} />\n </DiffCollapser>\n </div>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,cAAc,QAAQ;AAC/B,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAElB,SAASC,kBAAkB,QAAQ;AACnC,SAASC,aAAa,QAAQ;AAC9B,SAASC,yBAAyB,QAAQ;AAE1C,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,WAAA,GAAmDC,EAAA;EAAA,MAAAC,CAAA,GAAAV,EAAA;EAAC;IAAAW,gBAAA;IAAAC,eAAA;IAAAC,KAAA;IAAAC;EAAA,IAAAL,EAKhE;EACC;IAAAM;EAAA,IAAiBb,cAAA;EACjB;IAAAc;EAAA,IAA4BZ,kBAAA;EAAA,IAAAa,EAAA;EAAA,IAAAP,CAAA,QAAAG,KAAA,IAAAH,CAAA,QAAAK,IAAA;IAQpBE,EAAA,cAAWJ,KAAA,IACXA,KAAA,CAAAK,KAAW,IACX,OAAOL,KAAA,CAAAK,KAAA,KAAgB,cAAcC,IAAA,CAAC;MAAAC,QAAA,EAAMnB,cAAA,CAAeY,KAAA,CAAAK,KAAA,EAAaH,IAAA;IAAA,C;;;;;;;;;IAP9EM,EAAA,GAAAF,IAAA,CAAC;MAAAG,SAAA,EAAAf,SAAA;MAAAa,QAAA,EACCD,IAAA,CAAAd,aAAA;QAAAkB,UAAA,EACcX,eAAA;QAAAY,MAAA,EACJX,KAAA,CAAAW,MAAA;QAAAN,KAAA,EAEND,E;iBAIOD,eAAA;QAAAS,OAAA,EACAX,YAAA;QAAAM,QAAA,EAETD,IAAA,CAAAb,yBAAA;UAAAoB,aAAA,EAA0Cf,gBAAA,CAAAa;QAAA,C;;;;;;;;;;;;;SAZ9CH,E;CAgBJ","ignoreList":[]}
@@ -1,5 +1,4 @@
1
- import React from 'react';
1
+ import type { GroupFieldDiffClientComponent } from 'payload';
2
2
  import './index.scss';
3
- import type { DiffComponentProps } from '../types.js';
4
- export declare const Group: React.FC<DiffComponentProps>;
3
+ export declare const Group: GroupFieldDiffClientComponent;
5
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Group/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,cAAc,CAAA;AAErB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAOrD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAyC9C,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Group/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAA;AAI5D,OAAO,cAAc,CAAA;AAWrB,eAAO,MAAM,KAAK,EAAE,6BAgCnB,CAAA"}
@@ -1,45 +1,69 @@
1
1
  'use client';
2
2
 
3
+ import { c as _c } from "react/compiler-runtime";
3
4
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
5
  import { getTranslation } from '@payloadcms/translations';
6
+ import { useTranslation } from '@payloadcms/ui';
5
7
  import React from 'react';
8
+ import { useSelectedLocales } from '../../../Default/SelectedLocalesContext.js';
6
9
  import { DiffCollapser } from '../../DiffCollapser/index.js';
7
- import { RenderFieldsToDiff } from '../../index.js';
10
+ import { RenderVersionFieldsToDiff } from '../../RenderVersionFieldsToDiff.js';
8
11
  const baseClass = 'group-diff';
9
- export const Group = ({
10
- comparison,
11
- diffComponents,
12
- field,
13
- fieldPermissions,
14
- fields,
15
- i18n,
16
- locale,
17
- locales,
18
- version
19
- }) => {
20
- return /*#__PURE__*/_jsx("div", {
21
- className: baseClass,
22
- children: /*#__PURE__*/_jsx(DiffCollapser, {
23
- comparison: comparison,
24
- fields: fields,
25
- label: 'label' in field && field.label && typeof field.label !== 'function' && /*#__PURE__*/_jsxs("span", {
26
- children: [locale && /*#__PURE__*/_jsx("span", {
27
- className: `${baseClass}__locale-label`,
28
- children: locale
29
- }), getTranslation(field.label, i18n)]
30
- }),
31
- locales: locales,
32
- version: version,
33
- children: /*#__PURE__*/_jsx(RenderFieldsToDiff, {
34
- comparison: comparison,
35
- diffComponents: diffComponents,
36
- fieldPermissions: fieldPermissions,
37
- fields: fields,
38
- i18n: i18n,
39
- locales: locales,
40
- version: version
12
+ export const Group = t0 => {
13
+ const $ = _c(11);
14
+ const {
15
+ baseVersionField,
16
+ comparisonValue,
17
+ field,
18
+ locale,
19
+ versionValue
20
+ } = t0;
21
+ const {
22
+ i18n
23
+ } = useTranslation();
24
+ const {
25
+ selectedLocales
26
+ } = useSelectedLocales();
27
+ let t1;
28
+ if ($[0] !== field || $[1] !== i18n || $[2] !== locale) {
29
+ t1 = "label" in field && field.label && typeof field.label !== "function" && _jsxs("span", {
30
+ children: [locale && _jsx("span", {
31
+ className: `${baseClass}__locale-label`,
32
+ children: locale
33
+ }), getTranslation(field.label, i18n)]
34
+ });
35
+ $[0] = field;
36
+ $[1] = i18n;
37
+ $[2] = locale;
38
+ $[3] = t1;
39
+ } else {
40
+ t1 = $[3];
41
+ }
42
+ let t2;
43
+ if ($[4] !== baseVersionField.fields || $[5] !== comparisonValue || $[6] !== field.fields || $[7] !== selectedLocales || $[8] !== t1 || $[9] !== versionValue) {
44
+ t2 = _jsx("div", {
45
+ className: baseClass,
46
+ children: _jsx(DiffCollapser, {
47
+ comparison: comparisonValue,
48
+ fields: field.fields,
49
+ label: t1,
50
+ locales: selectedLocales,
51
+ version: versionValue,
52
+ children: _jsx(RenderVersionFieldsToDiff, {
53
+ versionFields: baseVersionField.fields
54
+ })
41
55
  })
42
- })
43
- });
56
+ });
57
+ $[4] = baseVersionField.fields;
58
+ $[5] = comparisonValue;
59
+ $[6] = field.fields;
60
+ $[7] = selectedLocales;
61
+ $[8] = t1;
62
+ $[9] = versionValue;
63
+ $[10] = t2;
64
+ } else {
65
+ t2 = $[10];
66
+ }
67
+ return t2;
44
68
  };
45
69
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["getTranslation","React","DiffCollapser","RenderFieldsToDiff","baseClass","Group","comparison","diffComponents","field","fieldPermissions","fields","i18n","locale","locales","version","_jsx","className","label","_jsxs"],"sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Group/index.tsx"],"sourcesContent":["'use client'\nimport { getTranslation } from '@payloadcms/translations'\nimport React from 'react'\n\nimport './index.scss'\n\nimport type { DiffComponentProps } from '../types.js'\n\nimport { DiffCollapser } from '../../DiffCollapser/index.js'\nimport { RenderFieldsToDiff } from '../../index.js'\n\nconst baseClass = 'group-diff'\n\nexport const Group: React.FC<DiffComponentProps> = ({\n comparison,\n diffComponents,\n field,\n fieldPermissions,\n fields,\n i18n,\n locale,\n locales,\n version,\n}) => {\n return (\n <div className={baseClass}>\n <DiffCollapser\n comparison={comparison}\n fields={fields}\n label={\n 'label' in field &&\n field.label &&\n typeof field.label !== 'function' && (\n <span>\n {locale && <span className={`${baseClass}__locale-label`}>{locale}</span>}\n {getTranslation(field.label, i18n)}\n </span>\n )\n }\n locales={locales}\n version={version}\n >\n <RenderFieldsToDiff\n comparison={comparison}\n diffComponents={diffComponents}\n fieldPermissions={fieldPermissions}\n fields={fields}\n i18n={i18n}\n locales={locales}\n version={version}\n />\n </DiffCollapser>\n </div>\n )\n}\n"],"mappings":"AAAA;;;AACA,SAASA,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAMlB,SAASC,aAAa,QAAQ;AAC9B,SAASC,kBAAkB,QAAQ;AAEnC,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,KAAA,GAAsCA,CAAC;EAClDC,UAAU;EACVC,cAAc;EACdC,KAAK;EACLC,gBAAgB;EAChBC,MAAM;EACNC,IAAI;EACJC,MAAM;EACNC,OAAO;EACPC;AAAO,CACR;EACC,oBACEC,IAAA,CAAC;IAAIC,SAAA,EAAWZ,SAAA;cACd,aAAAW,IAAA,CAACb,aAAA;MACCI,UAAA,EAAYA,UAAA;MACZI,MAAA,EAAQA,MAAA;MACRO,KAAA,EACE,WAAWT,KAAA,IACXA,KAAA,CAAMS,KAAK,IACX,OAAOT,KAAA,CAAMS,KAAK,KAAK,2BACrBC,KAAA,CAAC;mBACEN,MAAA,iBAAUG,IAAA,CAAC;UAAKC,SAAA,EAAW,GAAGZ,SAAA,gBAAyB;oBAAGQ;YAC1DZ,cAAA,CAAeQ,KAAA,CAAMS,KAAK,EAAEN,IAAA;;MAInCE,OAAA,EAASA,OAAA;MACTC,OAAA,EAASA,OAAA;gBAET,aAAAC,IAAA,CAACZ,kBAAA;QACCG,UAAA,EAAYA,UAAA;QACZC,cAAA,EAAgBA,cAAA;QAChBE,gBAAA,EAAkBA,gBAAA;QAClBC,MAAA,EAAQA,MAAA;QACRC,IAAA,EAAMA,IAAA;QACNE,OAAA,EAASA,OAAA;QACTC,OAAA,EAASA;;;;AAKnB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["c","_c","getTranslation","useTranslation","React","useSelectedLocales","DiffCollapser","RenderVersionFieldsToDiff","baseClass","Group","t0","$","baseVersionField","comparisonValue","field","locale","versionValue","i18n","selectedLocales","t1","label","_jsxs","children","_jsx","className","t2","comparison","fields","version","versionFields"],"sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Group/index.tsx"],"sourcesContent":["'use client'\nimport type { GroupFieldDiffClientComponent } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\n\nimport './index.scss'\n\nimport { useTranslation } from '@payloadcms/ui'\nimport React from 'react'\n\nimport { useSelectedLocales } from '../../../Default/SelectedLocalesContext.js'\nimport { DiffCollapser } from '../../DiffCollapser/index.js'\nimport { RenderVersionFieldsToDiff } from '../../RenderVersionFieldsToDiff.js'\n\nconst baseClass = 'group-diff'\n\nexport const Group: GroupFieldDiffClientComponent = ({\n baseVersionField,\n comparisonValue,\n field,\n locale,\n versionValue,\n}) => {\n const { i18n } = useTranslation()\n const { selectedLocales } = useSelectedLocales()\n\n return (\n <div className={baseClass}>\n <DiffCollapser\n comparison={comparisonValue}\n fields={field.fields}\n label={\n 'label' in field &&\n field.label &&\n typeof field.label !== 'function' && (\n <span>\n {locale && <span className={`${baseClass}__locale-label`}>{locale}</span>}\n {getTranslation(field.label, i18n)}\n </span>\n )\n }\n locales={selectedLocales}\n version={versionValue}\n >\n <RenderVersionFieldsToDiff versionFields={baseVersionField.fields} />\n </DiffCollapser>\n </div>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,cAAc,QAAQ;AAI/B,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAElB,SAASC,kBAAkB,QAAQ;AACnC,SAASC,aAAa,QAAQ;AAC9B,SAASC,yBAAyB,QAAQ;AAE1C,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,KAAA,GAAuCC,EAAA;EAAA,MAAAC,CAAA,GAAAV,EAAA;EAAC;IAAAW,gBAAA;IAAAC,eAAA;IAAAC,KAAA;IAAAC,MAAA;IAAAC;EAAA,IAAAN,EAMpD;EACC;IAAAO;EAAA,IAAiBd,cAAA;EACjB;IAAAe;EAAA,IAA4Bb,kBAAA;EAAA,IAAAc,EAAA;EAAA,IAAAR,CAAA,QAAAG,KAAA,IAAAH,CAAA,QAAAM,IAAA,IAAAN,CAAA,QAAAI,MAAA;IAQpBI,EAAA,cAAWL,KAAA,IACXA,KAAA,CAAAM,KAAW,IACX,OAAON,KAAA,CAAAM,KAAA,KAAgB,cACrBC,KAAA,CAAC;MAAAC,QAAA,GACEP,MAAA,IAAUQ,IAAA,CAAC;QAAAC,SAAA,EAAgB,GAAAhB,SAAA,gBAA4B;QAAAc,QAAA,EAAGP;MAAA,C,GAC1Db,cAAA,CAAeY,KAAA,CAAAM,KAAA,EAAaH,IAAA;IAAA,C;;;;;;;;;;IAVvCQ,EAAA,GAAAF,IAAA,CAAC;MAAAC,SAAA,EAAAhB,SAAA;MAAAc,QAAA,EACCC,IAAA,CAAAjB,aAAA;QAAAoB,UAAA,EACcb,eAAA;QAAAc,MAAA,EACJb,KAAA,CAAAa,MAAA;QAAAP,KAAA,EAEND,E;iBASOD,eAAA;QAAAU,OAAA,EACAZ,YAAA;QAAAM,QAAA,EAETC,IAAA,CAAAhB,yBAAA;UAAAsB,aAAA,EAA0CjB,gBAAA,CAAAe;QAAA,C;;;;;;;;;;;;;SAjB9CF,E;CAqBJ","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import type { DiffComponentProps } from '../types.js';
1
+ import type { FieldDiffClientProps } from 'payload';
3
2
  import './index.scss';
4
- export declare const Iterable: React.FC<DiffComponentProps>;
3
+ import React from 'react';
4
+ export declare const Iterable: React.FC<FieldDiffClientProps>;
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Iterable/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAGrD,OAAO,cAAc,CAAA;AAMrB,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAyFjD,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/views/Version/RenderFieldsToDiff/fields/Iterable/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAKnD,OAAO,cAAc,CAAA;AAGrB,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAmFnD,CAAA"}