@payloadcms/next 3.0.0-alpha.42 → 3.0.0-alpha.44
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":"withPayload.d.ts","sourceRoot":"","sources":["../src/withPayload.js"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,2BADW,OAAO,MAAM,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"withPayload.d.ts","sourceRoot":"","sources":["../src/withPayload.js"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,2BADW,OAAO,MAAM,EAAE,UAAU,CAiEnC"}
|
package/dist/withPayload.js
CHANGED
package/dist/withPayload.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/withPayload.js"],"sourcesContent":["/** @type {import('next').NextConfig} */\nconst withPayload = (nextConfig = {}) => {\n return {\n ...nextConfig,\n experimental: {\n ...(nextConfig?.experimental || {}),\n outputFileTracingExcludes: {\n '**/*': [\n ...(nextConfig.experimental?.outputFileTracingExcludes?.['**/*'] || []),\n 'drizzle-kit',\n 'drizzle-kit/payload',\n 'libsql',\n ],\n },\n serverComponentsExternalPackages: [\n ...(nextConfig?.experimental?.serverComponentsExternalPackages || []),\n 'drizzle-kit',\n 'drizzle-kit/payload',\n 'libsql',\n 'pino',\n 'pino-pretty',\n ],\n },\n webpack: (webpackConfig, webpackOptions) => {\n const incomingWebpackConfig =\n typeof nextConfig.webpack === 'function'\n ? nextConfig.webpack(webpackConfig, webpackOptions)\n : webpackConfig\n\n return {\n ...incomingWebpackConfig,\n externals: [\n ...(incomingWebpackConfig?.externals || []),\n 'drizzle-kit',\n 'drizzle-kit/payload',\n '
|
|
1
|
+
{"version":3,"sources":["../src/withPayload.js"],"sourcesContent":["/** @type {import('next').NextConfig} */\nconst withPayload = (nextConfig = {}) => {\n return {\n ...nextConfig,\n experimental: {\n ...(nextConfig?.experimental || {}),\n outputFileTracingExcludes: {\n '**/*': [\n ...(nextConfig.experimental?.outputFileTracingExcludes?.['**/*'] || []),\n 'drizzle-kit',\n 'drizzle-kit/payload',\n 'libsql',\n ],\n },\n serverComponentsExternalPackages: [\n ...(nextConfig?.experimental?.serverComponentsExternalPackages || []),\n 'drizzle-kit',\n 'drizzle-kit/payload',\n 'libsql',\n 'pino',\n 'pino-pretty',\n ],\n },\n webpack: (webpackConfig, webpackOptions) => {\n const incomingWebpackConfig =\n typeof nextConfig.webpack === 'function'\n ? nextConfig.webpack(webpackConfig, webpackOptions)\n : webpackConfig\n\n return {\n ...incomingWebpackConfig,\n externals: [\n ...(incomingWebpackConfig?.externals || []),\n 'drizzle-kit',\n 'drizzle-kit/payload',\n 'sharp',\n 'libsql',\n ],\n ignoreWarnings: [\n ...(incomingWebpackConfig?.ignoreWarnings || []),\n { module: /node_modules\\/mongodb\\/lib\\/utils\\.js/ },\n { file: /node_modules\\/mongodb\\/lib\\/utils\\.js/ },\n { module: /node_modules\\/mongodb\\/lib\\/bson\\.js/ },\n { file: /node_modules\\/mongodb\\/lib\\/bson\\.js/ },\n ],\n resolve: {\n ...(incomingWebpackConfig?.resolve || {}),\n alias: {\n ...(incomingWebpackConfig?.resolve?.alias || {}),\n },\n fallback: {\n ...(incomingWebpackConfig?.resolve?.fallback || {}),\n '@aws-sdk/credential-providers': false,\n '@mongodb-js/zstd': false,\n aws4: false,\n kerberos: false,\n 'mongodb-client-encryption': false,\n snappy: false,\n 'supports-color': false,\n 'yocto-queue': false,\n },\n },\n }\n },\n }\n}\n\nexport default withPayload\n"],"names":["withPayload","nextConfig","experimental","outputFileTracingExcludes","serverComponentsExternalPackages","webpack","webpackConfig","webpackOptions","incomingWebpackConfig","externals","ignoreWarnings","module","file","resolve","alias","fallback","aws4","kerberos","snappy"],"mappings":"AAAA,sCAAsC,GACtC,MAAMA,cAAc,CAACC,aAAa,CAAC,CAAC;IAClC,OAAO;QACL,GAAGA,UAAU;QACbC,cAAc;YACZ,GAAID,YAAYC,gBAAgB,CAAC,CAAC;YAClCC,2BAA2B;gBACzB,QAAQ;uBACFF,WAAWC,YAAY,EAAEC,2BAA2B,CAAC,OAAO,IAAI,EAAE;oBACtE;oBACA;oBACA;iBACD;YACH;YACAC,kCAAkC;mBAC5BH,YAAYC,cAAcE,oCAAoC,EAAE;gBACpE;gBACA;gBACA;gBACA;gBACA;aACD;QACH;QACAC,SAAS,CAACC,eAAeC;YACvB,MAAMC,wBACJ,OAAOP,WAAWI,OAAO,KAAK,aAC1BJ,WAAWI,OAAO,CAACC,eAAeC,kBAClCD;YAEN,OAAO;gBACL,GAAGE,qBAAqB;gBACxBC,WAAW;uBACLD,uBAAuBC,aAAa,EAAE;oBAC1C;oBACA;oBACA;oBACA;iBACD;gBACDC,gBAAgB;uBACVF,uBAAuBE,kBAAkB,EAAE;oBAC/C;wBAAEC,QAAQ;oBAAwC;oBAClD;wBAAEC,MAAM;oBAAwC;oBAChD;wBAAED,QAAQ;oBAAuC;oBACjD;wBAAEC,MAAM;oBAAuC;iBAChD;gBACDC,SAAS;oBACP,GAAIL,uBAAuBK,WAAW,CAAC,CAAC;oBACxCC,OAAO;wBACL,GAAIN,uBAAuBK,SAASC,SAAS,CAAC,CAAC;oBACjD;oBACAC,UAAU;wBACR,GAAIP,uBAAuBK,SAASE,YAAY,CAAC,CAAC;wBAClD,iCAAiC;wBACjC,oBAAoB;wBACpBC,MAAM;wBACNC,UAAU;wBACV,6BAA6B;wBAC7BC,QAAQ;wBACR,kBAAkB;wBAClB,eAAe;oBACjB;gBACF;YACF;QACF;IACF;AACF;AAEA,eAAelB,YAAW"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payloadcms/next",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.44",
|
|
4
4
|
"main": "./dist/exports/index.js",
|
|
5
5
|
"types": "./dist/exports/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"webpack": "^5.78.0",
|
|
67
67
|
"webpack-cli": "^5.1.4",
|
|
68
68
|
"@payloadcms/eslint-config": "1.1.1",
|
|
69
|
-
"payload": "3.0.0-alpha.
|
|
69
|
+
"payload": "3.0.0-alpha.44"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@dnd-kit/core": "6.0.8",
|
|
@@ -82,14 +82,14 @@
|
|
|
82
82
|
"react-toastify": "8.2.0",
|
|
83
83
|
"sass": "^1.71.1",
|
|
84
84
|
"ws": "^8.16.0",
|
|
85
|
-
"@payloadcms/graphql": "3.0.0-alpha.
|
|
86
|
-
"@payloadcms/translations": "3.0.0-alpha.
|
|
87
|
-
"@payloadcms/ui": "3.0.0-alpha.
|
|
85
|
+
"@payloadcms/graphql": "3.0.0-alpha.44",
|
|
86
|
+
"@payloadcms/translations": "3.0.0-alpha.44",
|
|
87
|
+
"@payloadcms/ui": "3.0.0-alpha.44"
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
90
|
"http-status": "1.6.2",
|
|
91
91
|
"next": "14.2.0-canary.7",
|
|
92
|
-
"payload": "3.0.0-alpha.
|
|
92
|
+
"payload": "3.0.0-alpha.44"
|
|
93
93
|
},
|
|
94
94
|
"publishConfig": {
|
|
95
95
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
import { render } from '@testing-library/react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { BlocksCell } from './fields/Blocks';
|
|
4
|
-
import { Checkbox } from './fields/Checkbox';
|
|
5
|
-
import { DateCell } from './fields/Date';
|
|
6
|
-
import { Select } from './fields/Select';
|
|
7
|
-
import { Textarea } from './fields/Textarea';
|
|
8
|
-
jest.mock('../../../../utilities/Config', ()=>({
|
|
9
|
-
useConfig: ()=>({
|
|
10
|
-
admin: {
|
|
11
|
-
dateFormat: 'MMMM do yyyy, h:mm a'
|
|
12
|
-
}
|
|
13
|
-
})
|
|
14
|
-
}));
|
|
15
|
-
jest.mock('../../../../providers/Translation', ()=>({
|
|
16
|
-
useTranslation: ()=>({
|
|
17
|
-
t: (string)=>string
|
|
18
|
-
})
|
|
19
|
-
}));
|
|
20
|
-
describe('Cell Types', ()=>{
|
|
21
|
-
describe('Blocks', ()=>{
|
|
22
|
-
const field = {
|
|
23
|
-
blocks: [
|
|
24
|
-
{
|
|
25
|
-
fields: [],
|
|
26
|
-
labels: {
|
|
27
|
-
plural: 'Numbers',
|
|
28
|
-
singular: 'Number'
|
|
29
|
-
},
|
|
30
|
-
slug: 'number'
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
label: 'Blocks Content',
|
|
34
|
-
labels: {
|
|
35
|
-
plural: 'Blocks Content',
|
|
36
|
-
singular: 'Block'
|
|
37
|
-
},
|
|
38
|
-
name: 'blocks',
|
|
39
|
-
type: 'blocks'
|
|
40
|
-
};
|
|
41
|
-
it('renders multiple', ()=>{
|
|
42
|
-
const data = [
|
|
43
|
-
{
|
|
44
|
-
blockType: 'number'
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
blockType: 'number'
|
|
48
|
-
}
|
|
49
|
-
];
|
|
50
|
-
const { container } = render(/*#__PURE__*/ React.createElement(BlocksCell, {
|
|
51
|
-
data: data,
|
|
52
|
-
field: field
|
|
53
|
-
}));
|
|
54
|
-
const el = container.querySelector('span');
|
|
55
|
-
expect(el).toHaveTextContent('2 Blocks Content - Number, Number');
|
|
56
|
-
});
|
|
57
|
-
it('renders zero', ()=>{
|
|
58
|
-
const data = [];
|
|
59
|
-
const { container } = render(/*#__PURE__*/ React.createElement(BlocksCell, {
|
|
60
|
-
data: data,
|
|
61
|
-
field: field
|
|
62
|
-
}));
|
|
63
|
-
const el = container.querySelector('span');
|
|
64
|
-
expect(el).toHaveTextContent('0 Blocks Content');
|
|
65
|
-
});
|
|
66
|
-
it('renders "and X more" if over maximum of 5', ()=>{
|
|
67
|
-
const data = [
|
|
68
|
-
{
|
|
69
|
-
blockType: 'number'
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
blockType: 'number'
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
blockType: 'number'
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
blockType: 'number'
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
blockType: 'number'
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
blockType: 'number'
|
|
85
|
-
}
|
|
86
|
-
];
|
|
87
|
-
const { container } = render(/*#__PURE__*/ React.createElement(BlocksCell, {
|
|
88
|
-
data: data,
|
|
89
|
-
field: field
|
|
90
|
-
}));
|
|
91
|
-
const el = container.querySelector('span');
|
|
92
|
-
expect(el).toHaveTextContent('fields:itemsAndMore');
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
describe('Date', ()=>{
|
|
96
|
-
const field = {
|
|
97
|
-
admin: {
|
|
98
|
-
date: {
|
|
99
|
-
pickerAppearance: 'dayOnly'
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
name: 'dayOnly',
|
|
103
|
-
type: 'date'
|
|
104
|
-
};
|
|
105
|
-
it('renders date', ()=>{
|
|
106
|
-
const timeStamp = '2020-10-06T14:07:39.033Z';
|
|
107
|
-
const { container } = render(/*#__PURE__*/ React.createElement(DateCell, {
|
|
108
|
-
data: timeStamp,
|
|
109
|
-
field: field
|
|
110
|
-
}));
|
|
111
|
-
const dateMatch = /October\s6th\s2020,\s\d{1,2}:07\s[A|P]M/ // Had to account for timezones in CI
|
|
112
|
-
;
|
|
113
|
-
const el = container.querySelector('span');
|
|
114
|
-
expect(el.textContent).toMatch(dateMatch);
|
|
115
|
-
});
|
|
116
|
-
it('handles undefined', ()=>{
|
|
117
|
-
const timeStamp = undefined;
|
|
118
|
-
const { container } = render(/*#__PURE__*/ React.createElement(DateCell, {
|
|
119
|
-
data: timeStamp,
|
|
120
|
-
field: field
|
|
121
|
-
}));
|
|
122
|
-
const el = container.querySelector('span');
|
|
123
|
-
expect(el.textContent).toBe('');
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
describe('Checkbox', ()=>{
|
|
127
|
-
it('renders true', ()=>{
|
|
128
|
-
const { container } = render(/*#__PURE__*/ React.createElement(Checkbox, {
|
|
129
|
-
data: true
|
|
130
|
-
}));
|
|
131
|
-
const el = container.querySelector('span');
|
|
132
|
-
expect(el).toHaveTextContent('true');
|
|
133
|
-
});
|
|
134
|
-
it('renders false', ()=>{
|
|
135
|
-
const { container } = render(/*#__PURE__*/ React.createElement(Checkbox, {
|
|
136
|
-
data: false
|
|
137
|
-
}));
|
|
138
|
-
const el = container.querySelector('span');
|
|
139
|
-
expect(el).toHaveTextContent('false');
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
describe('Textarea', ()=>{
|
|
143
|
-
it('renders data', ()=>{
|
|
144
|
-
const { container } = render(/*#__PURE__*/ React.createElement(Textarea, {
|
|
145
|
-
data: "data"
|
|
146
|
-
}));
|
|
147
|
-
const el = container.querySelector('span');
|
|
148
|
-
expect(el).toHaveTextContent('data');
|
|
149
|
-
});
|
|
150
|
-
it('handle undefined - bug/13', ()=>{
|
|
151
|
-
const { container } = render(/*#__PURE__*/ React.createElement(Textarea, {
|
|
152
|
-
data: undefined
|
|
153
|
-
}));
|
|
154
|
-
const el = container.querySelector('span');
|
|
155
|
-
expect(el).toHaveTextContent('');
|
|
156
|
-
});
|
|
157
|
-
});
|
|
158
|
-
describe('Select', ()=>{
|
|
159
|
-
const fieldWithOptionsObject = {
|
|
160
|
-
name: 'selectObject',
|
|
161
|
-
options: [
|
|
162
|
-
{
|
|
163
|
-
label: 'One',
|
|
164
|
-
value: 'one'
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
label: 'Two',
|
|
168
|
-
value: 'two'
|
|
169
|
-
}
|
|
170
|
-
],
|
|
171
|
-
type: 'select'
|
|
172
|
-
};
|
|
173
|
-
const fieldWithStringsOptions = {
|
|
174
|
-
name: 'selectString',
|
|
175
|
-
options: [
|
|
176
|
-
'blue',
|
|
177
|
-
'green',
|
|
178
|
-
'yellow'
|
|
179
|
-
],
|
|
180
|
-
type: 'select'
|
|
181
|
-
};
|
|
182
|
-
it('renders options objects', ()=>{
|
|
183
|
-
const { container } = render(/*#__PURE__*/ React.createElement(Select, {
|
|
184
|
-
data: "one",
|
|
185
|
-
field: fieldWithOptionsObject
|
|
186
|
-
}));
|
|
187
|
-
const el = container.querySelector('span');
|
|
188
|
-
expect(el).toHaveTextContent('One');
|
|
189
|
-
});
|
|
190
|
-
it('renders option strings', ()=>{
|
|
191
|
-
const { container } = render(/*#__PURE__*/ React.createElement(Select, {
|
|
192
|
-
data: "blue",
|
|
193
|
-
field: fieldWithStringsOptions
|
|
194
|
-
}));
|
|
195
|
-
const el = container.querySelector('span');
|
|
196
|
-
expect(el).toHaveTextContent('blue');
|
|
197
|
-
});
|
|
198
|
-
describe('HasMany', ()=>{
|
|
199
|
-
it('renders options objects', ()=>{
|
|
200
|
-
const { container } = render(/*#__PURE__*/ React.createElement(Select, {
|
|
201
|
-
data: [
|
|
202
|
-
'one',
|
|
203
|
-
'two'
|
|
204
|
-
],
|
|
205
|
-
field: fieldWithOptionsObject
|
|
206
|
-
}));
|
|
207
|
-
const el = container.querySelector('span');
|
|
208
|
-
expect(el).toHaveTextContent('One, Two');
|
|
209
|
-
});
|
|
210
|
-
it('renders option strings', ()=>{
|
|
211
|
-
const { container } = render(/*#__PURE__*/ React.createElement(Select, {
|
|
212
|
-
data: [
|
|
213
|
-
'blue',
|
|
214
|
-
'green'
|
|
215
|
-
],
|
|
216
|
-
field: fieldWithStringsOptions
|
|
217
|
-
}));
|
|
218
|
-
const el = container.querySelector('span');
|
|
219
|
-
expect(el).toHaveTextContent('blue, green');
|
|
220
|
-
});
|
|
221
|
-
});
|
|
222
|
-
});
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
-
//# sourceMappingURL=cellTypes.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/views/List/Default/Cell/cellTypes.spec.tsx"],"sourcesContent":["import { render } from '@testing-library/react'\nimport React from 'react'\n\nimport type { BlockField, DateField, SelectField } from 'payload/types'\n\nimport { BlocksCell } from './fields/Blocks'\nimport { Checkbox } from './fields/Checkbox'\nimport { DateCell } from './fields/Date'\nimport { Select } from './fields/Select'\nimport { Textarea } from './fields/Textarea'\n\njest.mock('../../../../utilities/Config', () => ({\n useConfig: () => ({ admin: { dateFormat: 'MMMM do yyyy, h:mm a' } }),\n}))\n\njest.mock('../../../../providers/Translation', () => ({\n useTranslation: () => ({ t: (string) => string }),\n}))\n\ndescribe('Cell Types', () => {\n describe('Blocks', () => {\n const field: BlockField = {\n blocks: [\n {\n fields: [],\n labels: {\n plural: 'Numbers',\n singular: 'Number',\n },\n slug: 'number',\n },\n ],\n label: 'Blocks Content',\n labels: {\n plural: 'Blocks Content',\n singular: 'Block',\n },\n name: 'blocks',\n type: 'blocks',\n }\n\n it('renders multiple', () => {\n const data = [{ blockType: 'number' }, { blockType: 'number' }]\n const { container } = render(<BlocksCell data={data} field={field} />)\n const el = container.querySelector('span')\n expect(el).toHaveTextContent('2 Blocks Content - Number, Number')\n })\n\n it('renders zero', () => {\n const data = []\n const { container } = render(<BlocksCell data={data} field={field} />)\n const el = container.querySelector('span')\n expect(el).toHaveTextContent('0 Blocks Content')\n })\n\n it('renders \"and X more\" if over maximum of 5', () => {\n const data = [\n { blockType: 'number' },\n { blockType: 'number' },\n { blockType: 'number' },\n { blockType: 'number' },\n { blockType: 'number' },\n { blockType: 'number' },\n ]\n\n const { container } = render(<BlocksCell data={data} field={field} />)\n const el = container.querySelector('span')\n expect(el).toHaveTextContent('fields:itemsAndMore')\n })\n })\n\n describe('Date', () => {\n const field: DateField = {\n admin: {\n date: {\n pickerAppearance: 'dayOnly',\n },\n },\n name: 'dayOnly',\n type: 'date',\n }\n\n it('renders date', () => {\n const timeStamp = '2020-10-06T14:07:39.033Z'\n const { container } = render(<DateCell data={timeStamp} field={field} />)\n const dateMatch = /October\\s6th\\s2020,\\s\\d{1,2}:07\\s[A|P]M/ // Had to account for timezones in CI\n const el = container.querySelector('span')\n expect(el.textContent).toMatch(dateMatch)\n })\n\n it('handles undefined', () => {\n const timeStamp = undefined\n const { container } = render(<DateCell data={timeStamp} field={field} />)\n const el = container.querySelector('span')\n expect(el.textContent).toBe('')\n })\n })\n\n describe('Checkbox', () => {\n it('renders true', () => {\n const { container } = render(<Checkbox data />)\n const el = container.querySelector('span')\n expect(el).toHaveTextContent('true')\n })\n it('renders false', () => {\n const { container } = render(<Checkbox data={false} />)\n const el = container.querySelector('span')\n expect(el).toHaveTextContent('false')\n })\n })\n\n describe('Textarea', () => {\n it('renders data', () => {\n const { container } = render(<Textarea data=\"data\" />)\n const el = container.querySelector('span')\n expect(el).toHaveTextContent('data')\n })\n it('handle undefined - bug/13', () => {\n const { container } = render(<Textarea data={undefined} />)\n const el = container.querySelector('span')\n expect(el).toHaveTextContent('')\n })\n })\n describe('Select', () => {\n const fieldWithOptionsObject: SelectField = {\n name: 'selectObject',\n options: [\n {\n label: 'One',\n value: 'one',\n },\n {\n label: 'Two',\n value: 'two',\n },\n ],\n type: 'select',\n }\n const fieldWithStringsOptions: SelectField = {\n name: 'selectString',\n options: ['blue', 'green', 'yellow'],\n type: 'select',\n }\n it('renders options objects', () => {\n const { container } = render(<Select data=\"one\" field={fieldWithOptionsObject} />)\n const el = container.querySelector('span')\n expect(el).toHaveTextContent('One')\n })\n it('renders option strings', () => {\n const { container } = render(<Select data=\"blue\" field={fieldWithStringsOptions} />)\n const el = container.querySelector('span')\n expect(el).toHaveTextContent('blue')\n })\n\n describe('HasMany', () => {\n it('renders options objects', () => {\n const { container } = render(\n <Select data={['one', 'two']} field={fieldWithOptionsObject} />,\n )\n const el = container.querySelector('span')\n expect(el).toHaveTextContent('One, Two')\n })\n it('renders option strings', () => {\n const { container } = render(\n <Select data={['blue', 'green']} field={fieldWithStringsOptions} />,\n )\n const el = container.querySelector('span')\n expect(el).toHaveTextContent('blue, green')\n })\n })\n })\n})\n"],"names":["render","React","BlocksCell","Checkbox","DateCell","Select","Textarea","jest","mock","useConfig","admin","dateFormat","useTranslation","t","string","describe","field","blocks","fields","labels","plural","singular","slug","label","name","type","it","data","blockType","container","el","querySelector","expect","toHaveTextContent","date","pickerAppearance","timeStamp","dateMatch","textContent","toMatch","undefined","toBe","fieldWithOptionsObject","options","value","fieldWithStringsOptions"],"mappings":"AAAA,SAASA,MAAM,QAAQ,yBAAwB;AAC/C,OAAOC,WAAW,QAAO;AAIzB,SAASC,UAAU,QAAQ,kBAAiB;AAC5C,SAASC,QAAQ,QAAQ,oBAAmB;AAC5C,SAASC,QAAQ,QAAQ,gBAAe;AACxC,SAASC,MAAM,QAAQ,kBAAiB;AACxC,SAASC,QAAQ,QAAQ,oBAAmB;AAE5CC,KAAKC,IAAI,CAAC,gCAAgC,IAAO,CAAA;QAC/CC,WAAW,IAAO,CAAA;gBAAEC,OAAO;oBAAEC,YAAY;gBAAuB;YAAE,CAAA;IACpE,CAAA;AAEAJ,KAAKC,IAAI,CAAC,qCAAqC,IAAO,CAAA;QACpDI,gBAAgB,IAAO,CAAA;gBAAEC,GAAG,CAACC,SAAWA;YAAO,CAAA;IACjD,CAAA;AAEAC,SAAS,cAAc;IACrBA,SAAS,UAAU;QACjB,MAAMC,QAAoB;YACxBC,QAAQ;gBACN;oBACEC,QAAQ,EAAE;oBACVC,QAAQ;wBACNC,QAAQ;wBACRC,UAAU;oBACZ;oBACAC,MAAM;gBACR;aACD;YACDC,OAAO;YACPJ,QAAQ;gBACNC,QAAQ;gBACRC,UAAU;YACZ;YACAG,MAAM;YACNC,MAAM;QACR;QAEAC,GAAG,oBAAoB;YACrB,MAAMC,OAAO;gBAAC;oBAAEC,WAAW;gBAAS;gBAAG;oBAAEA,WAAW;gBAAS;aAAE;YAC/D,MAAM,EAAEC,SAAS,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