@payloadcms/ui 3.13.0 → 3.14.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.
- package/dist/elements/PublishButton/index.d.ts.map +1 -1
- package/dist/elements/PublishButton/index.js +11 -4
- package/dist/elements/PublishButton/index.js.map +1 -1
- package/dist/elements/SaveButton/index.d.ts.map +1 -1
- package/dist/elements/SaveButton/index.js +12 -4
- package/dist/elements/SaveButton/index.js.map +1 -1
- package/dist/elements/SaveDraftButton/index.d.ts.map +1 -1
- package/dist/elements/SaveDraftButton/index.js +3 -2
- package/dist/elements/SaveDraftButton/index.js.map +1 -1
- package/dist/elements/Upload/index.d.ts.map +1 -1
- package/dist/elements/Upload/index.js +6 -2
- package/dist/elements/Upload/index.js.map +1 -1
- package/dist/exports/client/index.js +22 -22
- package/dist/exports/client/index.js.map +3 -3
- package/dist/exports/shared/index.js +2 -2
- package/dist/exports/shared/index.js.map +3 -3
- package/dist/fields/Upload/HasMany/index.d.ts.map +1 -1
- package/dist/fields/Upload/HasMany/index.js +6 -4
- package/dist/fields/Upload/HasMany/index.js.map +1 -1
- package/dist/fields/Upload/Input.d.ts.map +1 -1
- package/dist/fields/Upload/Input.js +166 -143
- package/dist/fields/Upload/Input.js.map +1 -1
- package/dist/fields/Upload/RelationshipContent/index.d.ts +1 -1
- package/dist/fields/Upload/RelationshipContent/index.d.ts.map +1 -1
- package/dist/fields/Upload/RelationshipContent/index.js +55 -45
- package/dist/fields/Upload/RelationshipContent/index.js.map +1 -1
- package/dist/forms/fieldSchemasToFormState/addFieldStatePromise.d.ts +3 -0
- package/dist/forms/fieldSchemasToFormState/addFieldStatePromise.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/addFieldStatePromise.js +22 -24
- package/dist/forms/fieldSchemasToFormState/addFieldStatePromise.js.map +1 -1
- package/dist/forms/fieldSchemasToFormState/calculateDefaultValues/promise.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/calculateDefaultValues/promise.js +14 -7
- package/dist/forms/fieldSchemasToFormState/calculateDefaultValues/promise.js.map +1 -1
- package/dist/forms/fieldSchemasToFormState/index.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/index.js.map +1 -1
- package/dist/forms/fieldSchemasToFormState/iterateFields.d.ts.map +1 -1
- package/dist/forms/fieldSchemasToFormState/iterateFields.js +26 -3
- package/dist/forms/fieldSchemasToFormState/iterateFields.js.map +1 -1
- package/dist/providers/DocumentInfo/index.d.ts.map +1 -1
- package/dist/providers/DocumentInfo/index.js +6 -0
- package/dist/providers/DocumentInfo/index.js.map +1 -1
- package/dist/providers/DocumentInfo/types.d.ts +3 -0
- package/dist/providers/DocumentInfo/types.d.ts.map +1 -1
- package/dist/providers/DocumentInfo/types.js.map +1 -1
- package/dist/providers/ServerFunctions/index.d.ts +5 -2
- package/dist/providers/ServerFunctions/index.d.ts.map +1 -1
- package/dist/providers/ServerFunctions/index.js +1 -0
- package/dist/providers/ServerFunctions/index.js.map +1 -1
- package/dist/utilities/abortAndIgnore.d.ts +8 -0
- package/dist/utilities/abortAndIgnore.d.ts.map +1 -1
- package/dist/utilities/abortAndIgnore.js +11 -5
- package/dist/utilities/abortAndIgnore.js.map +1 -1
- package/dist/utilities/buildClientFieldSchemaMap/index.d.ts.map +1 -1
- package/dist/utilities/buildClientFieldSchemaMap/index.js +4 -6
- package/dist/utilities/buildClientFieldSchemaMap/index.js.map +1 -1
- package/dist/utilities/buildFieldSchemaMap/index.d.ts.map +1 -1
- package/dist/utilities/buildFieldSchemaMap/index.js +4 -6
- package/dist/utilities/buildFieldSchemaMap/index.js.map +1 -1
- package/dist/utilities/schedulePublishHandler.d.ts +1 -1
- package/dist/utilities/schedulePublishHandler.d.ts.map +1 -1
- package/dist/utilities/schedulePublishHandler.js +25 -4
- package/dist/utilities/schedulePublishHandler.js.map +1 -1
- package/dist/views/Edit/Auth/index.d.ts.map +1 -1
- package/dist/views/Edit/Auth/index.js +79 -90
- package/dist/views/Edit/Auth/index.js.map +1 -1
- package/dist/views/Edit/Auth/types.d.ts +0 -1
- package/dist/views/Edit/Auth/types.d.ts.map +1 -1
- package/dist/views/Edit/Auth/types.js.map +1 -1
- package/dist/views/Edit/index.d.ts.map +1 -1
- package/dist/views/Edit/index.js +2 -8
- package/dist/views/Edit/index.js.map +1 -1
- package/package.json +5 -5
|
@@ -24,7 +24,7 @@ import { UploadComponentHasOne } from './HasOne/index.js';
|
|
|
24
24
|
import './index.scss';
|
|
25
25
|
export const baseClass = 'upload';
|
|
26
26
|
export function UploadInput(props) {
|
|
27
|
-
const $ = _c(
|
|
27
|
+
const $ = _c(134);
|
|
28
28
|
const {
|
|
29
29
|
AfterInput,
|
|
30
30
|
allowCreate,
|
|
@@ -220,7 +220,7 @@ export function UploadInput(props) {
|
|
|
220
220
|
}
|
|
221
221
|
const onChange = t14;
|
|
222
222
|
let t15;
|
|
223
|
-
if ($[31] !== api || $[32] !== code || $[33] !== i18n.language || $[
|
|
223
|
+
if ($[31] !== api || $[32] !== code || $[33] !== hasMany || $[34] !== i18n.language || $[35] !== serverURL || $[36] !== t) {
|
|
224
224
|
t15 = async (ids, relatedCollectionSlug) => {
|
|
225
225
|
const query = {
|
|
226
226
|
depth: 0,
|
|
@@ -247,7 +247,14 @@ export function UploadInput(props) {
|
|
|
247
247
|
});
|
|
248
248
|
if (response.ok) {
|
|
249
249
|
const json = await response.json();
|
|
250
|
-
|
|
250
|
+
let sortedDocs = ids.map(id => json.docs.find(doc => String(doc.id) === String(id)));
|
|
251
|
+
if (sortedDocs.includes(undefined) && hasMany) {
|
|
252
|
+
sortedDocs = sortedDocs.map((doc_0, index) => doc_0 ? doc_0 : {
|
|
253
|
+
id: ids[index],
|
|
254
|
+
filename: `${t("general:untitled")} - ID: ${ids[index]}`,
|
|
255
|
+
isPlaceholder: true
|
|
256
|
+
});
|
|
257
|
+
}
|
|
251
258
|
return {
|
|
252
259
|
...json,
|
|
253
260
|
docs: sortedDocs
|
|
@@ -257,22 +264,24 @@ export function UploadInput(props) {
|
|
|
257
264
|
};
|
|
258
265
|
$[31] = api;
|
|
259
266
|
$[32] = code;
|
|
260
|
-
$[33] =
|
|
261
|
-
$[34] =
|
|
262
|
-
$[35] =
|
|
267
|
+
$[33] = hasMany;
|
|
268
|
+
$[34] = i18n.language;
|
|
269
|
+
$[35] = serverURL;
|
|
270
|
+
$[36] = t;
|
|
271
|
+
$[37] = t15;
|
|
263
272
|
} else {
|
|
264
|
-
t15 = $[
|
|
273
|
+
t15 = $[37];
|
|
265
274
|
}
|
|
266
275
|
const populateDocs = t15;
|
|
267
276
|
let t16;
|
|
268
|
-
if ($[
|
|
277
|
+
if ($[38] !== activeRelationTo || $[39] !== hasMany || $[40] !== onChange || $[41] !== value) {
|
|
269
278
|
t16 = newDocs => {
|
|
270
279
|
if (hasMany) {
|
|
271
280
|
const mergedValue = [...(Array.isArray(value) ? value : []), ...newDocs.map(_temp)];
|
|
272
281
|
onChange(mergedValue);
|
|
273
|
-
setPopulatedDocs(currentDocs => [...(currentDocs || []), ...newDocs.map(
|
|
282
|
+
setPopulatedDocs(currentDocs => [...(currentDocs || []), ...newDocs.map(doc_2 => ({
|
|
274
283
|
relationTo: activeRelationTo,
|
|
275
|
-
value:
|
|
284
|
+
value: doc_2
|
|
276
285
|
}))]);
|
|
277
286
|
} else {
|
|
278
287
|
const firstDoc = newDocs[0];
|
|
@@ -283,17 +292,17 @@ export function UploadInput(props) {
|
|
|
283
292
|
}]);
|
|
284
293
|
}
|
|
285
294
|
};
|
|
286
|
-
$[
|
|
287
|
-
$[
|
|
288
|
-
$[
|
|
289
|
-
$[
|
|
290
|
-
$[
|
|
295
|
+
$[38] = activeRelationTo;
|
|
296
|
+
$[39] = hasMany;
|
|
297
|
+
$[40] = onChange;
|
|
298
|
+
$[41] = value;
|
|
299
|
+
$[42] = t16;
|
|
291
300
|
} else {
|
|
292
|
-
t16 = $[
|
|
301
|
+
t16 = $[42];
|
|
293
302
|
}
|
|
294
303
|
const onUploadSuccess = t16;
|
|
295
304
|
let t17;
|
|
296
|
-
if ($[
|
|
305
|
+
if ($[43] !== drawerSlug || $[44] !== hasMany || $[45] !== maxRows || $[46] !== openModal || $[47] !== path || $[48] !== relationTo || $[49] !== setCollectionSlug || $[50] !== setCurrentActivePath || $[51] !== setInitialFiles || $[52] !== setMaxFiles) {
|
|
297
306
|
t17 = fileList => {
|
|
298
307
|
let fileListToUse = fileList;
|
|
299
308
|
if (!hasMany && fileList && fileList.length > 1) {
|
|
@@ -311,23 +320,23 @@ export function UploadInput(props) {
|
|
|
311
320
|
setCurrentActivePath(path);
|
|
312
321
|
openModal(drawerSlug);
|
|
313
322
|
};
|
|
314
|
-
$[
|
|
315
|
-
$[
|
|
316
|
-
$[
|
|
317
|
-
$[
|
|
318
|
-
$[
|
|
319
|
-
$[
|
|
320
|
-
$[
|
|
321
|
-
$[
|
|
322
|
-
$[
|
|
323
|
-
$[
|
|
324
|
-
$[
|
|
323
|
+
$[43] = drawerSlug;
|
|
324
|
+
$[44] = hasMany;
|
|
325
|
+
$[45] = maxRows;
|
|
326
|
+
$[46] = openModal;
|
|
327
|
+
$[47] = path;
|
|
328
|
+
$[48] = relationTo;
|
|
329
|
+
$[49] = setCollectionSlug;
|
|
330
|
+
$[50] = setCurrentActivePath;
|
|
331
|
+
$[51] = setInitialFiles;
|
|
332
|
+
$[52] = setMaxFiles;
|
|
333
|
+
$[53] = t17;
|
|
325
334
|
} else {
|
|
326
|
-
t17 = $[
|
|
335
|
+
t17 = $[53];
|
|
327
336
|
}
|
|
328
337
|
const onLocalFileSelection = t17;
|
|
329
338
|
let t18;
|
|
330
|
-
if ($[
|
|
339
|
+
if ($[54] !== activeRelationTo || $[55] !== closeListDrawer || $[56] !== onChange || $[57] !== populateDocs || $[58] !== value) {
|
|
331
340
|
t18 = async docs => {
|
|
332
341
|
const selectedDocIDs = [];
|
|
333
342
|
for (const [id_0, isSelected] of docs) {
|
|
@@ -337,26 +346,26 @@ export function UploadInput(props) {
|
|
|
337
346
|
}
|
|
338
347
|
const loadedDocs = await populateDocs(selectedDocIDs, activeRelationTo);
|
|
339
348
|
if (loadedDocs) {
|
|
340
|
-
setPopulatedDocs(currentDocs_0 => [...(currentDocs_0 || []), ...loadedDocs.docs.map(
|
|
349
|
+
setPopulatedDocs(currentDocs_0 => [...(currentDocs_0 || []), ...loadedDocs.docs.map(doc_3 => ({
|
|
341
350
|
relationTo: activeRelationTo,
|
|
342
|
-
value:
|
|
351
|
+
value: doc_3
|
|
343
352
|
}))]);
|
|
344
353
|
}
|
|
345
354
|
onChange([...(Array.isArray(value) ? value : []), ...selectedDocIDs]);
|
|
346
355
|
closeListDrawer();
|
|
347
356
|
};
|
|
348
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
352
|
-
$[
|
|
353
|
-
$[
|
|
357
|
+
$[54] = activeRelationTo;
|
|
358
|
+
$[55] = closeListDrawer;
|
|
359
|
+
$[56] = onChange;
|
|
360
|
+
$[57] = populateDocs;
|
|
361
|
+
$[58] = value;
|
|
362
|
+
$[59] = t18;
|
|
354
363
|
} else {
|
|
355
|
-
t18 = $[
|
|
364
|
+
t18 = $[59];
|
|
356
365
|
}
|
|
357
366
|
const onListBulkSelect = t18;
|
|
358
367
|
let t19;
|
|
359
|
-
if ($[
|
|
368
|
+
if ($[60] !== activeRelationTo || $[61] !== closeCreateDocDrawer || $[62] !== onChange) {
|
|
360
369
|
t19 = data => {
|
|
361
370
|
if (data.doc) {
|
|
362
371
|
setPopulatedDocs(currentDocs_1 => [...(currentDocs_1 || []), {
|
|
@@ -367,16 +376,16 @@ export function UploadInput(props) {
|
|
|
367
376
|
}
|
|
368
377
|
closeCreateDocDrawer();
|
|
369
378
|
};
|
|
370
|
-
$[
|
|
371
|
-
$[
|
|
372
|
-
$[
|
|
373
|
-
$[
|
|
379
|
+
$[60] = activeRelationTo;
|
|
380
|
+
$[61] = closeCreateDocDrawer;
|
|
381
|
+
$[62] = onChange;
|
|
382
|
+
$[63] = t19;
|
|
374
383
|
} else {
|
|
375
|
-
t19 = $[
|
|
384
|
+
t19 = $[63];
|
|
376
385
|
}
|
|
377
386
|
const onDocCreate = t19;
|
|
378
387
|
let t20;
|
|
379
|
-
if ($[
|
|
388
|
+
if ($[64] !== activeRelationTo || $[65] !== closeListDrawer || $[66] !== hasMany || $[67] !== onChange || $[68] !== populateDocs || $[69] !== value) {
|
|
380
389
|
t20 = async t21 => {
|
|
381
390
|
const {
|
|
382
391
|
collectionSlug,
|
|
@@ -406,82 +415,93 @@ export function UploadInput(props) {
|
|
|
406
415
|
}
|
|
407
416
|
closeListDrawer();
|
|
408
417
|
};
|
|
409
|
-
$[
|
|
410
|
-
$[
|
|
411
|
-
$[
|
|
412
|
-
$[
|
|
413
|
-
$[
|
|
414
|
-
$[
|
|
415
|
-
$[
|
|
418
|
+
$[64] = activeRelationTo;
|
|
419
|
+
$[65] = closeListDrawer;
|
|
420
|
+
$[66] = hasMany;
|
|
421
|
+
$[67] = onChange;
|
|
422
|
+
$[68] = populateDocs;
|
|
423
|
+
$[69] = value;
|
|
424
|
+
$[70] = t20;
|
|
416
425
|
} else {
|
|
417
|
-
t20 = $[
|
|
426
|
+
t20 = $[70];
|
|
418
427
|
}
|
|
419
428
|
const onListSelect = t20;
|
|
420
429
|
let t21;
|
|
421
|
-
if ($[
|
|
430
|
+
if ($[71] !== hasMany || $[72] !== onChange || $[73] !== populateDocs) {
|
|
422
431
|
t21 = async (docID_0, collectionSlug_0) => {
|
|
423
432
|
const {
|
|
424
433
|
docs: docs_0
|
|
425
434
|
} = await populateDocs([docID_0], collectionSlug_0);
|
|
426
435
|
if (docs_0[0]) {
|
|
436
|
+
let updatedDocsToPropogate;
|
|
437
|
+
updatedDocsToPropogate = [];
|
|
427
438
|
setPopulatedDocs(currentDocs_3 => {
|
|
428
|
-
const existingDocIndex = currentDocs_3?.findIndex(
|
|
439
|
+
const existingDocIndex = currentDocs_3?.findIndex(doc_4 => {
|
|
440
|
+
const hasExisting = doc_4.value?.id === docs_0[0].id || doc_4.value?.isPlaceholder;
|
|
441
|
+
return hasExisting && doc_4.relationTo === collectionSlug_0;
|
|
442
|
+
});
|
|
429
443
|
if (existingDocIndex > -1) {
|
|
430
444
|
const updatedDocs = [...currentDocs_3];
|
|
431
445
|
updatedDocs[existingDocIndex] = {
|
|
432
446
|
relationTo: collectionSlug_0,
|
|
433
447
|
value: docs_0[0]
|
|
434
448
|
};
|
|
449
|
+
updatedDocsToPropogate = updatedDocs;
|
|
435
450
|
return updatedDocs;
|
|
436
451
|
}
|
|
437
452
|
});
|
|
453
|
+
if (updatedDocsToPropogate.length && hasMany) {
|
|
454
|
+
onChange(updatedDocsToPropogate.map(_temp2));
|
|
455
|
+
}
|
|
438
456
|
}
|
|
439
457
|
};
|
|
440
|
-
$[
|
|
441
|
-
$[
|
|
458
|
+
$[71] = hasMany;
|
|
459
|
+
$[72] = onChange;
|
|
460
|
+
$[73] = populateDocs;
|
|
461
|
+
$[74] = t21;
|
|
442
462
|
} else {
|
|
443
|
-
t21 = $[
|
|
463
|
+
t21 = $[74];
|
|
444
464
|
}
|
|
445
465
|
const reloadDoc = t21;
|
|
446
466
|
let t22;
|
|
447
|
-
if ($[
|
|
467
|
+
if ($[75] !== onChange) {
|
|
448
468
|
t22 = newValue_0 => {
|
|
449
|
-
const newValueIDs = newValue_0.map(
|
|
469
|
+
const newValueIDs = newValue_0.map(_temp3);
|
|
450
470
|
onChange(newValueIDs);
|
|
451
471
|
setPopulatedDocs(newValue_0);
|
|
452
472
|
};
|
|
453
|
-
$[
|
|
454
|
-
$[
|
|
473
|
+
$[75] = onChange;
|
|
474
|
+
$[76] = t22;
|
|
455
475
|
} else {
|
|
456
|
-
t22 = $[
|
|
476
|
+
t22 = $[76];
|
|
457
477
|
}
|
|
458
478
|
const onReorder = t22;
|
|
459
479
|
let t23;
|
|
460
|
-
if ($[
|
|
480
|
+
if ($[77] !== hasMany || $[78] !== onChange) {
|
|
461
481
|
t23 = newValue_1 => {
|
|
462
|
-
const newValueIDs_0 = newValue_1 ? newValue_1.map(
|
|
482
|
+
const newValueIDs_0 = newValue_1 ? newValue_1.map(_temp4) : null;
|
|
463
483
|
onChange(hasMany ? newValueIDs_0 : newValueIDs_0 ? newValueIDs_0[0] : null);
|
|
464
484
|
setPopulatedDocs(newValue_1 ? newValue_1 : []);
|
|
465
485
|
};
|
|
466
|
-
$[
|
|
467
|
-
$[
|
|
468
|
-
$[
|
|
486
|
+
$[77] = hasMany;
|
|
487
|
+
$[78] = onChange;
|
|
488
|
+
$[79] = t23;
|
|
469
489
|
} else {
|
|
470
|
-
t23 = $[
|
|
490
|
+
t23 = $[79];
|
|
471
491
|
}
|
|
472
492
|
const onRemove = t23;
|
|
473
493
|
let t24;
|
|
474
494
|
let t25;
|
|
475
|
-
if ($[
|
|
495
|
+
if ($[80] !== activeRelationTo || $[81] !== populateDocs || $[82] !== value) {
|
|
476
496
|
t24 = () => {
|
|
477
497
|
const loadInitialDocs = async function loadInitialDocs() {
|
|
478
498
|
if (value) {
|
|
479
499
|
loadedValueDocsRef.current = true;
|
|
480
500
|
const loadedDocs_1 = await populateDocs(Array.isArray(value) ? value : [value], activeRelationTo);
|
|
481
501
|
if (loadedDocs_1) {
|
|
482
|
-
setPopulatedDocs(loadedDocs_1.docs.map(
|
|
502
|
+
setPopulatedDocs(loadedDocs_1.docs.map(doc_6 => ({
|
|
483
503
|
relationTo: activeRelationTo,
|
|
484
|
-
value:
|
|
504
|
+
value: doc_6
|
|
485
505
|
})));
|
|
486
506
|
}
|
|
487
507
|
}
|
|
@@ -491,57 +511,57 @@ export function UploadInput(props) {
|
|
|
491
511
|
}
|
|
492
512
|
};
|
|
493
513
|
t25 = [populateDocs, activeRelationTo, value];
|
|
494
|
-
$[
|
|
495
|
-
$[
|
|
496
|
-
$[
|
|
497
|
-
$[
|
|
498
|
-
$[
|
|
514
|
+
$[80] = activeRelationTo;
|
|
515
|
+
$[81] = populateDocs;
|
|
516
|
+
$[82] = value;
|
|
517
|
+
$[83] = t24;
|
|
518
|
+
$[84] = t25;
|
|
499
519
|
} else {
|
|
500
|
-
t24 = $[
|
|
501
|
-
t25 = $[
|
|
520
|
+
t24 = $[83];
|
|
521
|
+
t25 = $[84];
|
|
502
522
|
}
|
|
503
523
|
useEffect(t24, t25);
|
|
504
524
|
let t26;
|
|
505
|
-
if ($[
|
|
525
|
+
if ($[85] !== onUploadSuccess || $[86] !== path || $[87] !== setOnSuccess) {
|
|
506
526
|
t26 = () => {
|
|
507
527
|
setOnSuccess(path, onUploadSuccess);
|
|
508
528
|
};
|
|
509
|
-
$[
|
|
510
|
-
$[
|
|
511
|
-
$[
|
|
512
|
-
$[
|
|
529
|
+
$[85] = onUploadSuccess;
|
|
530
|
+
$[86] = path;
|
|
531
|
+
$[87] = setOnSuccess;
|
|
532
|
+
$[88] = t26;
|
|
513
533
|
} else {
|
|
514
|
-
t26 = $[
|
|
534
|
+
t26 = $[88];
|
|
515
535
|
}
|
|
516
536
|
let t27;
|
|
517
|
-
if ($[
|
|
537
|
+
if ($[89] !== onUploadSuccess || $[90] !== path || $[91] !== setOnSuccess || $[92] !== value) {
|
|
518
538
|
t27 = [value, path, onUploadSuccess, setOnSuccess];
|
|
519
|
-
$[
|
|
520
|
-
$[
|
|
521
|
-
$[
|
|
522
|
-
$[
|
|
523
|
-
$[
|
|
539
|
+
$[89] = onUploadSuccess;
|
|
540
|
+
$[90] = path;
|
|
541
|
+
$[91] = setOnSuccess;
|
|
542
|
+
$[92] = value;
|
|
543
|
+
$[93] = t27;
|
|
524
544
|
} else {
|
|
525
|
-
t27 = $[
|
|
545
|
+
t27 = $[93];
|
|
526
546
|
}
|
|
527
547
|
useEffect(t26, t27);
|
|
528
548
|
const showDropzone = !value || hasMany && Array.isArray(value) && (typeof maxRows !== "number" || value.length < maxRows) || !hasMany && populatedDocs?.[0] && typeof populatedDocs[0].value === "undefined";
|
|
529
549
|
const t28 = showError && "error";
|
|
530
550
|
const t29 = readOnly && "read-only";
|
|
531
551
|
let t30;
|
|
532
|
-
if ($[
|
|
552
|
+
if ($[94] !== className || $[95] !== t28 || $[96] !== t29) {
|
|
533
553
|
t30 = [fieldBaseClass, baseClass, className, t28, t29].filter(Boolean);
|
|
534
|
-
$[
|
|
535
|
-
$[
|
|
536
|
-
$[
|
|
537
|
-
$[
|
|
554
|
+
$[94] = className;
|
|
555
|
+
$[95] = t28;
|
|
556
|
+
$[96] = t29;
|
|
557
|
+
$[97] = t30;
|
|
538
558
|
} else {
|
|
539
|
-
t30 = $[
|
|
559
|
+
t30 = $[97];
|
|
540
560
|
}
|
|
541
561
|
const t31 = t30.join(" ");
|
|
542
562
|
const t32 = `field-${path?.replace(/\./g, "__")}`;
|
|
543
563
|
let t33;
|
|
544
|
-
if ($[
|
|
564
|
+
if ($[98] !== AfterInput || $[99] !== BeforeInput || $[100] !== CreateDocDrawer || $[101] !== Description || $[102] !== Error || $[103] !== Label || $[104] !== ListDrawer || $[105] !== canCreate || $[106] !== description || $[107] !== hasMany || $[108] !== isSortable || $[109] !== label || $[110] !== localized || $[111] !== maxRows || $[112] !== onDocCreate || $[113] !== onListBulkSelect || $[114] !== onListSelect || $[115] !== onLocalFileSelection || $[116] !== onRemove || $[117] !== onReorder || $[118] !== openCreateDocDrawer || $[119] !== openListDrawer || $[120] !== path || $[121] !== populatedDocs || $[122] !== readOnly || $[123] !== reloadDoc || $[124] !== required || $[125] !== serverURL || $[126] !== showDropzone || $[127] !== showError || $[128] !== style || $[129] !== t || $[130] !== t31 || $[131] !== t32 || $[132] !== value) {
|
|
545
565
|
t33 = _jsxs("div", {
|
|
546
566
|
className: t31,
|
|
547
567
|
id: t32,
|
|
@@ -576,7 +596,7 @@ export function UploadInput(props) {
|
|
|
576
596
|
serverURL
|
|
577
597
|
}) : _jsx("div", {
|
|
578
598
|
className: `${baseClass}__loadingRows`,
|
|
579
|
-
children: value.map(
|
|
599
|
+
children: value.map(_temp5)
|
|
580
600
|
})
|
|
581
601
|
}) : null, !hasMany && value ? _jsx(_Fragment, {
|
|
582
602
|
children: populatedDocs && populatedDocs?.length > 0 && populatedDocs[0].value ? _jsx(UploadComponentHasOne, {
|
|
@@ -651,65 +671,68 @@ export function UploadInput(props) {
|
|
|
651
671
|
})
|
|
652
672
|
})]
|
|
653
673
|
});
|
|
654
|
-
$[
|
|
655
|
-
$[
|
|
656
|
-
$[
|
|
657
|
-
$[
|
|
658
|
-
$[
|
|
659
|
-
$[
|
|
660
|
-
$[
|
|
661
|
-
$[
|
|
662
|
-
$[
|
|
663
|
-
$[
|
|
664
|
-
$[
|
|
665
|
-
$[
|
|
666
|
-
$[
|
|
667
|
-
$[
|
|
668
|
-
$[
|
|
669
|
-
$[
|
|
670
|
-
$[
|
|
671
|
-
$[
|
|
672
|
-
$[
|
|
673
|
-
$[
|
|
674
|
-
$[
|
|
675
|
-
$[
|
|
676
|
-
$[
|
|
677
|
-
$[
|
|
678
|
-
$[
|
|
679
|
-
$[
|
|
680
|
-
$[
|
|
681
|
-
$[
|
|
682
|
-
$[
|
|
683
|
-
$[
|
|
684
|
-
$[
|
|
685
|
-
$[
|
|
686
|
-
$[
|
|
687
|
-
$[
|
|
688
|
-
$[
|
|
689
|
-
$[
|
|
674
|
+
$[98] = AfterInput;
|
|
675
|
+
$[99] = BeforeInput;
|
|
676
|
+
$[100] = CreateDocDrawer;
|
|
677
|
+
$[101] = Description;
|
|
678
|
+
$[102] = Error;
|
|
679
|
+
$[103] = Label;
|
|
680
|
+
$[104] = ListDrawer;
|
|
681
|
+
$[105] = canCreate;
|
|
682
|
+
$[106] = description;
|
|
683
|
+
$[107] = hasMany;
|
|
684
|
+
$[108] = isSortable;
|
|
685
|
+
$[109] = label;
|
|
686
|
+
$[110] = localized;
|
|
687
|
+
$[111] = maxRows;
|
|
688
|
+
$[112] = onDocCreate;
|
|
689
|
+
$[113] = onListBulkSelect;
|
|
690
|
+
$[114] = onListSelect;
|
|
691
|
+
$[115] = onLocalFileSelection;
|
|
692
|
+
$[116] = onRemove;
|
|
693
|
+
$[117] = onReorder;
|
|
694
|
+
$[118] = openCreateDocDrawer;
|
|
695
|
+
$[119] = openListDrawer;
|
|
696
|
+
$[120] = path;
|
|
697
|
+
$[121] = populatedDocs;
|
|
698
|
+
$[122] = readOnly;
|
|
699
|
+
$[123] = reloadDoc;
|
|
700
|
+
$[124] = required;
|
|
701
|
+
$[125] = serverURL;
|
|
702
|
+
$[126] = showDropzone;
|
|
703
|
+
$[127] = showError;
|
|
704
|
+
$[128] = style;
|
|
705
|
+
$[129] = t;
|
|
706
|
+
$[130] = t31;
|
|
707
|
+
$[131] = t32;
|
|
708
|
+
$[132] = value;
|
|
709
|
+
$[133] = t33;
|
|
690
710
|
} else {
|
|
691
|
-
t33 = $[
|
|
711
|
+
t33 = $[133];
|
|
692
712
|
}
|
|
693
713
|
return t33;
|
|
694
714
|
}
|
|
695
|
-
function
|
|
715
|
+
function _temp5(id_1) {
|
|
696
716
|
return _jsx(ShimmerEffect, {
|
|
697
717
|
height: "40px"
|
|
698
718
|
}, id_1);
|
|
699
719
|
}
|
|
700
|
-
function
|
|
720
|
+
function _temp4(t0) {
|
|
701
721
|
const {
|
|
702
722
|
value: value_1
|
|
703
723
|
} = t0;
|
|
704
724
|
return value_1.id;
|
|
705
725
|
}
|
|
706
|
-
function
|
|
726
|
+
function _temp3(t0) {
|
|
707
727
|
const {
|
|
708
728
|
value: value_0
|
|
709
729
|
} = t0;
|
|
710
730
|
return value_0.id;
|
|
711
731
|
}
|
|
712
|
-
function
|
|
713
|
-
return
|
|
732
|
+
function _temp2(doc_5) {
|
|
733
|
+
return doc_5.value?.id;
|
|
734
|
+
}
|
|
735
|
+
function _temp(doc_1) {
|
|
736
|
+
return doc_1.id;
|
|
714
737
|
}
|
|
715
738
|
//# sourceMappingURL=Input.js.map
|