@firecms/collection_editor 3.0.0-canary.248 → 3.0.0-canary.249
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/index.es.js +713 -709
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +711 -707
- package/dist/index.umd.js.map +1 -1
- package/dist/types/config_controller.d.ts +3 -1
- package/dist/ui/collection_editor/properties/ReferencePropertyField.d.ts +2 -1
- package/package.json +8 -8
- package/src/types/config_controller.tsx +4 -1
- package/src/ui/collection_editor/CollectionDetailsForm.tsx +35 -35
- package/src/ui/collection_editor/CollectionEditorDialog.tsx +2 -2
- package/src/ui/collection_editor/PropertyEditView.tsx +9 -1
- package/src/ui/collection_editor/PropertyFieldPreview.tsx +1 -0
- package/src/ui/collection_editor/properties/ReferencePropertyField.tsx +5 -3
- package/src/ui/collection_editor/utils/supported_fields.tsx +1 -0
- package/src/ui/collection_editor/utils/update_property_for_widget.ts +9 -0
- package/src/useCollectionEditorPlugin.tsx +3 -1
package/dist/index.umd.js
CHANGED
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
return t18;
|
|
170
170
|
}
|
|
171
171
|
function CollectionDetailsForm(t0) {
|
|
172
|
-
const $ = reactCompilerRuntime.c(
|
|
172
|
+
const $ = reactCompilerRuntime.c(192);
|
|
173
173
|
const {
|
|
174
174
|
isNewCollection,
|
|
175
175
|
reservedGroups,
|
|
@@ -185,7 +185,6 @@
|
|
|
185
185
|
touched,
|
|
186
186
|
errors,
|
|
187
187
|
setFieldTouched,
|
|
188
|
-
isSubmitting,
|
|
189
188
|
submitCount
|
|
190
189
|
} = formex.useFormex();
|
|
191
190
|
useCollectionEditorController();
|
|
@@ -253,7 +252,7 @@
|
|
|
253
252
|
t5 = $[10];
|
|
254
253
|
}
|
|
255
254
|
const collectionIcon = t5;
|
|
256
|
-
|
|
255
|
+
groups?.filter((group) => !reservedGroups?.includes(group));
|
|
257
256
|
let t6;
|
|
258
257
|
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
259
258
|
t6 = {
|
|
@@ -263,10 +262,7 @@
|
|
|
263
262
|
} else {
|
|
264
263
|
t6 = $[11];
|
|
265
264
|
}
|
|
266
|
-
|
|
267
|
-
autoCompleteOpen,
|
|
268
|
-
setAutoCompleteOpen
|
|
269
|
-
} = ui.useAutoComplete(t6);
|
|
265
|
+
ui.useAutoComplete(t6);
|
|
270
266
|
const isSubcollection = !!parentCollection;
|
|
271
267
|
let customIdValue;
|
|
272
268
|
if (typeof values.customId === "object") {
|
|
@@ -285,333 +281,317 @@
|
|
|
285
281
|
}
|
|
286
282
|
}
|
|
287
283
|
const showErrors = submitCount > 0;
|
|
288
|
-
const t7 = "
|
|
289
|
-
const
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
t12 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: t10, className: "flex-grow", children: t11 });
|
|
297
|
-
$[12] = t10;
|
|
298
|
-
$[13] = t11;
|
|
299
|
-
$[14] = t12;
|
|
284
|
+
const t7 = !isNewCollection ? "h5" : "h4";
|
|
285
|
+
const t8 = isNewCollection ? "New collection" : `${values?.name} collection`;
|
|
286
|
+
let t9;
|
|
287
|
+
if ($[12] !== t7 || $[13] !== t8) {
|
|
288
|
+
t9 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: t7, className: "flex-grow", children: t8 });
|
|
289
|
+
$[12] = t7;
|
|
290
|
+
$[13] = t8;
|
|
291
|
+
$[14] = t9;
|
|
300
292
|
} else {
|
|
301
|
-
|
|
293
|
+
t9 = $[14];
|
|
302
294
|
}
|
|
303
|
-
let
|
|
295
|
+
let t10;
|
|
304
296
|
if ($[15] !== updateDatabaseId || $[16] !== values.databaseId) {
|
|
305
|
-
|
|
297
|
+
t10 = /* @__PURE__ */ jsxRuntime.jsx(DefaultDatabaseField, { databaseId: values.databaseId, onDatabaseIdUpdate: updateDatabaseId });
|
|
306
298
|
$[15] = updateDatabaseId;
|
|
307
299
|
$[16] = values.databaseId;
|
|
308
|
-
$[17] =
|
|
300
|
+
$[17] = t10;
|
|
309
301
|
} else {
|
|
310
|
-
|
|
302
|
+
t10 = $[17];
|
|
311
303
|
}
|
|
312
|
-
let
|
|
304
|
+
let t11;
|
|
313
305
|
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
314
|
-
|
|
315
|
-
$[18] =
|
|
306
|
+
t11 = () => setIconDialogOpen(true);
|
|
307
|
+
$[18] = t11;
|
|
316
308
|
} else {
|
|
317
|
-
|
|
309
|
+
t11 = $[18];
|
|
318
310
|
}
|
|
319
|
-
let
|
|
311
|
+
let t12;
|
|
320
312
|
if ($[19] !== collectionIcon) {
|
|
321
|
-
|
|
313
|
+
t12 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Change icon", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { shape: "square", onClick: t11, children: collectionIcon }) });
|
|
322
314
|
$[19] = collectionIcon;
|
|
323
|
-
$[20] =
|
|
315
|
+
$[20] = t12;
|
|
324
316
|
} else {
|
|
325
|
-
|
|
317
|
+
t12 = $[20];
|
|
326
318
|
}
|
|
327
|
-
let
|
|
328
|
-
if ($[21] !==
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
319
|
+
let t13;
|
|
320
|
+
if ($[21] !== t10 || $[22] !== t12 || $[23] !== t9) {
|
|
321
|
+
t13 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row gap-2 py-2 pt-3 items-center", children: [
|
|
322
|
+
t9,
|
|
323
|
+
t10,
|
|
324
|
+
t12
|
|
333
325
|
] });
|
|
334
|
-
$[21] =
|
|
335
|
-
$[22] =
|
|
336
|
-
$[23] =
|
|
337
|
-
$[24] =
|
|
326
|
+
$[21] = t10;
|
|
327
|
+
$[22] = t12;
|
|
328
|
+
$[23] = t9;
|
|
329
|
+
$[24] = t13;
|
|
338
330
|
} else {
|
|
339
|
-
|
|
331
|
+
t13 = $[24];
|
|
340
332
|
}
|
|
341
|
-
let
|
|
333
|
+
let t14;
|
|
342
334
|
if ($[25] !== parentCollection) {
|
|
343
|
-
|
|
335
|
+
t14 = parentCollection && /* @__PURE__ */ jsxRuntime.jsx(ui.Chip, { colorScheme: "tealDarker", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "caption", children: [
|
|
344
336
|
"This is a subcollection of ",
|
|
345
337
|
/* @__PURE__ */ jsxRuntime.jsx("b", { children: parentCollection.name })
|
|
346
338
|
] }) });
|
|
347
339
|
$[25] = parentCollection;
|
|
348
|
-
$[26] =
|
|
340
|
+
$[26] = t14;
|
|
349
341
|
} else {
|
|
350
|
-
|
|
342
|
+
t14 = $[26];
|
|
351
343
|
}
|
|
352
|
-
let
|
|
353
|
-
if ($[27] !==
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
344
|
+
let t15;
|
|
345
|
+
if ($[27] !== t13 || $[28] !== t14) {
|
|
346
|
+
t15 = /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
347
|
+
t13,
|
|
348
|
+
t14
|
|
357
349
|
] });
|
|
358
|
-
$[27] =
|
|
359
|
-
$[28] =
|
|
360
|
-
$[29] =
|
|
350
|
+
$[27] = t13;
|
|
351
|
+
$[28] = t14;
|
|
352
|
+
$[29] = t15;
|
|
361
353
|
} else {
|
|
362
|
-
|
|
354
|
+
t15 = $[29];
|
|
363
355
|
}
|
|
364
|
-
const
|
|
365
|
-
|
|
366
|
-
let t21;
|
|
356
|
+
const t16 = values.name ?? "";
|
|
357
|
+
let t17;
|
|
367
358
|
if ($[30] !== updateName) {
|
|
368
|
-
|
|
359
|
+
t17 = (e) => updateName(e.target.value);
|
|
369
360
|
$[30] = updateName;
|
|
370
|
-
$[31] =
|
|
361
|
+
$[31] = t17;
|
|
371
362
|
} else {
|
|
372
|
-
|
|
363
|
+
t17 = $[31];
|
|
364
|
+
}
|
|
365
|
+
const t18 = showErrors && Boolean(errors.name);
|
|
366
|
+
let t19;
|
|
367
|
+
if ($[32] !== t16 || $[33] !== t17 || $[34] !== t18) {
|
|
368
|
+
t19 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { value: t16, onChange: t17, label: "Name", autoFocus: true, required: true, error: t18 });
|
|
369
|
+
$[32] = t16;
|
|
370
|
+
$[33] = t17;
|
|
371
|
+
$[34] = t18;
|
|
372
|
+
$[35] = t19;
|
|
373
|
+
} else {
|
|
374
|
+
t19 = $[35];
|
|
375
|
+
}
|
|
376
|
+
const t20 = touched.name && Boolean(errors.name);
|
|
377
|
+
const t21 = touched.name && Boolean(errors.name) ? errors.name : "Name of this collection, usually a plural name (e.g. Products)";
|
|
378
|
+
let t22;
|
|
379
|
+
if ($[36] !== t20 || $[37] !== t21) {
|
|
380
|
+
t22 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t20, children: t21 });
|
|
381
|
+
$[36] = t20;
|
|
382
|
+
$[37] = t21;
|
|
383
|
+
$[38] = t22;
|
|
384
|
+
} else {
|
|
385
|
+
t22 = $[38];
|
|
373
386
|
}
|
|
374
|
-
const t22 = showErrors && Boolean(errors.name);
|
|
375
387
|
let t23;
|
|
376
|
-
if ($[
|
|
377
|
-
t23 = /* @__PURE__ */ jsxRuntime.
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
$[
|
|
388
|
+
if ($[39] !== t19 || $[40] !== t22) {
|
|
389
|
+
t23 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
390
|
+
t19,
|
|
391
|
+
t22
|
|
392
|
+
] });
|
|
393
|
+
$[39] = t19;
|
|
394
|
+
$[40] = t22;
|
|
395
|
+
$[41] = t23;
|
|
382
396
|
} else {
|
|
383
|
-
t23 = $[
|
|
397
|
+
t23 = $[41];
|
|
384
398
|
}
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
t26 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t24, children: t25 });
|
|
390
|
-
$[36] = t24;
|
|
391
|
-
$[37] = t25;
|
|
392
|
-
$[38] = t26;
|
|
399
|
+
let t24;
|
|
400
|
+
if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
|
|
401
|
+
t24 = ui.cls("col-span-12 ");
|
|
402
|
+
$[42] = t24;
|
|
393
403
|
} else {
|
|
394
|
-
|
|
404
|
+
t24 = $[42];
|
|
395
405
|
}
|
|
406
|
+
const t25 = !isNewCollection;
|
|
407
|
+
const t26 = showErrors && Boolean(errors.path);
|
|
396
408
|
let t27;
|
|
397
|
-
if ($[
|
|
398
|
-
t27 = /* @__PURE__ */ jsxRuntime.
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
]
|
|
402
|
-
$[39] = t23;
|
|
403
|
-
$[40] = t26;
|
|
404
|
-
$[41] = t27;
|
|
409
|
+
if ($[43] !== t25 || $[44] !== t26) {
|
|
410
|
+
t27 = /* @__PURE__ */ jsxRuntime.jsx(formex.Field, { name: "path", as: ui.DebouncedTextField, label: "Path", disabled: t25, required: true, error: t26 });
|
|
411
|
+
$[43] = t25;
|
|
412
|
+
$[44] = t26;
|
|
413
|
+
$[45] = t27;
|
|
405
414
|
} else {
|
|
406
|
-
t27 = $[
|
|
415
|
+
t27 = $[45];
|
|
407
416
|
}
|
|
408
|
-
const t28 =
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
$[
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
const t31 = showErrors && Boolean(errors.path);
|
|
419
|
-
let t32;
|
|
420
|
-
if ($[44] !== t30 || $[45] !== t31) {
|
|
421
|
-
t32 = /* @__PURE__ */ jsxRuntime.jsx(formex.Field, { name: "path", as: ui.DebouncedTextField, label: "Path", disabled: t30, required: true, error: t31 });
|
|
422
|
-
$[44] = t30;
|
|
423
|
-
$[45] = t31;
|
|
424
|
-
$[46] = t32;
|
|
425
|
-
} else {
|
|
426
|
-
t32 = $[46];
|
|
427
|
-
}
|
|
428
|
-
const t33 = touched.path && Boolean(errors.path);
|
|
429
|
-
const t34 = touched.path && Boolean(errors.path) ? errors.path : isSubcollection ? "Relative path to the parent (no need to include the parent path)" : "Path that this collection is stored in, in the database";
|
|
430
|
-
let t35;
|
|
431
|
-
if ($[47] !== t33 || $[48] !== t34) {
|
|
432
|
-
t35 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t33, children: t34 });
|
|
433
|
-
$[47] = t33;
|
|
434
|
-
$[48] = t34;
|
|
435
|
-
$[49] = t35;
|
|
436
|
-
} else {
|
|
437
|
-
t35 = $[49];
|
|
417
|
+
const t28 = touched.path && Boolean(errors.path);
|
|
418
|
+
const t29 = touched.path && Boolean(errors.path) ? errors.path : isSubcollection ? "Relative path to the parent (no need to include the parent path)" : "Path that this collection is stored in, in the database";
|
|
419
|
+
let t30;
|
|
420
|
+
if ($[46] !== t28 || $[47] !== t29) {
|
|
421
|
+
t30 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t28, children: t29 });
|
|
422
|
+
$[46] = t28;
|
|
423
|
+
$[47] = t29;
|
|
424
|
+
$[48] = t30;
|
|
425
|
+
} else {
|
|
426
|
+
t30 = $[48];
|
|
438
427
|
}
|
|
439
|
-
let
|
|
440
|
-
if ($[
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
428
|
+
let t31;
|
|
429
|
+
if ($[49] !== t27 || $[50] !== t30) {
|
|
430
|
+
t31 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t24, children: [
|
|
431
|
+
t27,
|
|
432
|
+
t30
|
|
444
433
|
] });
|
|
445
|
-
$[
|
|
446
|
-
$[
|
|
447
|
-
$[
|
|
448
|
-
$[53] = t36;
|
|
449
|
-
} else {
|
|
450
|
-
t36 = $[53];
|
|
451
|
-
}
|
|
452
|
-
const t37 = !isSubcollection && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 sm:col-span-4 relative", children: [
|
|
453
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: showErrors && Boolean(errors.group), disabled: isSubmitting, value: values.group ?? "", autoComplete: "off", onChange: (event) => setFieldValue("group", event.target.value), name: "group", inputRef: groupRef, label: "Group" }),
|
|
454
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Autocomplete, { open: autoCompleteOpen && (groupOptions ?? []).length > 0, setOpen: setAutoCompleteOpen, children: groupOptions?.map((group_0, index) => /* @__PURE__ */ jsxRuntime.jsx(ui.AutocompleteItem, { className: "pr-6 pl-14", onClick: () => {
|
|
455
|
-
setAutoCompleteOpen(false);
|
|
456
|
-
setFieldValue("group", group_0 ?? null);
|
|
457
|
-
}, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow", children: group_0 }) }, index + "_" + group_0)) }),
|
|
458
|
-
/* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { children: showErrors && Boolean(errors.group) ? errors.group : "Group in the home page" })
|
|
459
|
-
] });
|
|
460
|
-
const t38 = values.openEntityMode ?? "side_panel";
|
|
461
|
-
let t39;
|
|
462
|
-
if ($[54] !== setFieldValue) {
|
|
463
|
-
t39 = (value) => setFieldValue("openEntityMode", value);
|
|
464
|
-
$[54] = setFieldValue;
|
|
465
|
-
$[55] = t39;
|
|
434
|
+
$[49] = t27;
|
|
435
|
+
$[50] = t30;
|
|
436
|
+
$[51] = t31;
|
|
466
437
|
} else {
|
|
467
|
-
|
|
438
|
+
t31 = $[51];
|
|
468
439
|
}
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
$[
|
|
474
|
-
$[
|
|
440
|
+
const t32 = values.openEntityMode ?? "side_panel";
|
|
441
|
+
let t33;
|
|
442
|
+
if ($[52] !== setFieldValue) {
|
|
443
|
+
t33 = (value) => setFieldValue("openEntityMode", value);
|
|
444
|
+
$[52] = setFieldValue;
|
|
445
|
+
$[53] = t33;
|
|
475
446
|
} else {
|
|
476
|
-
|
|
447
|
+
t33 = $[53];
|
|
477
448
|
}
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
$[
|
|
483
|
-
$[
|
|
449
|
+
let t34;
|
|
450
|
+
if ($[54] !== t32 || $[55] !== t33) {
|
|
451
|
+
t34 = /* @__PURE__ */ jsxRuntime.jsx(LayoutModeSwitch, { className: "col-span-12", value: t32, onChange: t33 });
|
|
452
|
+
$[54] = t32;
|
|
453
|
+
$[55] = t33;
|
|
454
|
+
$[56] = t34;
|
|
484
455
|
} else {
|
|
485
|
-
|
|
456
|
+
t34 = $[56];
|
|
486
457
|
}
|
|
487
|
-
const
|
|
488
|
-
let
|
|
489
|
-
if ($[
|
|
490
|
-
|
|
491
|
-
$[
|
|
492
|
-
$[
|
|
493
|
-
|
|
494
|
-
$[
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
458
|
+
const t35 = values.history === null || values.history === void 0 ? "Document history revisions enabled if enabled globally" : values.history ? "Document history revisions ENABLED" : "Document history revisions NOT enabled";
|
|
459
|
+
let t36;
|
|
460
|
+
if ($[57] !== setFieldValue) {
|
|
461
|
+
t36 = (v) => setFieldValue("history", v);
|
|
462
|
+
$[57] = setFieldValue;
|
|
463
|
+
$[58] = t36;
|
|
464
|
+
} else {
|
|
465
|
+
t36 = $[58];
|
|
466
|
+
}
|
|
467
|
+
const t37 = values.history === void 0 ? null : values.history;
|
|
468
|
+
let t38;
|
|
469
|
+
if ($[59] !== t35 || $[60] !== t36 || $[61] !== t37) {
|
|
470
|
+
t38 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", allowIndeterminate: true, label: t35, onValueChange: t36, value: t37 });
|
|
471
|
+
$[59] = t35;
|
|
472
|
+
$[60] = t36;
|
|
473
|
+
$[61] = t37;
|
|
474
|
+
$[62] = t38;
|
|
475
|
+
} else {
|
|
476
|
+
t38 = $[62];
|
|
477
|
+
}
|
|
478
|
+
let t39;
|
|
479
|
+
if ($[63] === Symbol.for("react.memo_cache_sentinel")) {
|
|
480
|
+
t39 = /* @__PURE__ */ jsxRuntime.jsxs(core.FieldCaption, { children: [
|
|
501
481
|
"When enabled, each document in this collection will have a history of changes. This is useful for auditing purposes. The data is stored in a subcollection of the document in your database, called ",
|
|
502
482
|
/* @__PURE__ */ jsxRuntime.jsx("b", { children: "__history" }),
|
|
503
483
|
"."
|
|
504
484
|
] });
|
|
505
|
-
$[
|
|
485
|
+
$[63] = t39;
|
|
506
486
|
} else {
|
|
507
|
-
|
|
487
|
+
t39 = $[63];
|
|
508
488
|
}
|
|
509
|
-
let
|
|
510
|
-
if ($[
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
489
|
+
let t40;
|
|
490
|
+
if ($[64] !== t38) {
|
|
491
|
+
t40 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
492
|
+
t38,
|
|
493
|
+
t39
|
|
514
494
|
] });
|
|
515
|
-
$[
|
|
516
|
-
$[
|
|
495
|
+
$[64] = t38;
|
|
496
|
+
$[65] = t40;
|
|
517
497
|
} else {
|
|
518
|
-
|
|
498
|
+
t40 = $[65];
|
|
519
499
|
}
|
|
520
|
-
let
|
|
521
|
-
if ($[
|
|
522
|
-
|
|
500
|
+
let t41;
|
|
501
|
+
if ($[66] === Symbol.for("react.memo_cache_sentinel")) {
|
|
502
|
+
t41 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row text-surface-500", children: [
|
|
523
503
|
/* @__PURE__ */ jsxRuntime.jsx(ui.SettingsIcon, {}),
|
|
524
504
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "ml-2", children: "Advanced" })
|
|
525
505
|
] });
|
|
526
|
-
$[
|
|
506
|
+
$[66] = t41;
|
|
527
507
|
} else {
|
|
528
|
-
|
|
508
|
+
t41 = $[66];
|
|
529
509
|
}
|
|
530
|
-
const
|
|
531
|
-
const
|
|
532
|
-
let
|
|
533
|
-
if ($[
|
|
534
|
-
|
|
535
|
-
$[
|
|
536
|
-
$[
|
|
537
|
-
$[
|
|
538
|
-
} else {
|
|
539
|
-
t50 = $[71];
|
|
540
|
-
}
|
|
541
|
-
const t51 = touched.id && Boolean(errors.id);
|
|
542
|
-
const t52 = touched.id && Boolean(errors.id) ? errors.id : "This id identifies this collection. Typically the same as the path.";
|
|
543
|
-
let t53;
|
|
544
|
-
if ($[72] !== t51 || $[73] !== t52) {
|
|
545
|
-
t53 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t51, children: t52 });
|
|
546
|
-
$[72] = t51;
|
|
547
|
-
$[73] = t52;
|
|
548
|
-
$[74] = t53;
|
|
549
|
-
} else {
|
|
550
|
-
t53 = $[74];
|
|
551
|
-
}
|
|
552
|
-
let t54;
|
|
553
|
-
if ($[75] !== t50 || $[76] !== t53) {
|
|
554
|
-
t54 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
555
|
-
t50,
|
|
556
|
-
t53
|
|
557
|
-
] });
|
|
558
|
-
$[75] = t50;
|
|
559
|
-
$[76] = t53;
|
|
560
|
-
$[77] = t54;
|
|
510
|
+
const t42 = !isNewCollection;
|
|
511
|
+
const t43 = showErrors && Boolean(errors.id);
|
|
512
|
+
let t44;
|
|
513
|
+
if ($[67] !== t42 || $[68] !== t43) {
|
|
514
|
+
t44 = /* @__PURE__ */ jsxRuntime.jsx(formex.Field, { name: "id", as: ui.DebouncedTextField, disabled: t42, label: "Collection id", error: t43 });
|
|
515
|
+
$[67] = t42;
|
|
516
|
+
$[68] = t43;
|
|
517
|
+
$[69] = t44;
|
|
561
518
|
} else {
|
|
562
|
-
|
|
519
|
+
t44 = $[69];
|
|
563
520
|
}
|
|
564
|
-
const
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
$[
|
|
572
|
-
$[79] = setFieldTouched;
|
|
573
|
-
$[80] = t56;
|
|
521
|
+
const t45 = touched.id && Boolean(errors.id);
|
|
522
|
+
const t46 = touched.id && Boolean(errors.id) ? errors.id : "This id identifies this collection. Typically the same as the path.";
|
|
523
|
+
let t47;
|
|
524
|
+
if ($[70] !== t45 || $[71] !== t46) {
|
|
525
|
+
t47 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t45, children: t46 });
|
|
526
|
+
$[70] = t45;
|
|
527
|
+
$[71] = t46;
|
|
528
|
+
$[72] = t47;
|
|
574
529
|
} else {
|
|
575
|
-
|
|
530
|
+
t47 = $[72];
|
|
576
531
|
}
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
$[
|
|
584
|
-
$[
|
|
532
|
+
let t48;
|
|
533
|
+
if ($[73] !== t44 || $[74] !== t47) {
|
|
534
|
+
t48 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
535
|
+
t44,
|
|
536
|
+
t47
|
|
537
|
+
] });
|
|
538
|
+
$[73] = t44;
|
|
539
|
+
$[74] = t47;
|
|
540
|
+
$[75] = t48;
|
|
585
541
|
} else {
|
|
586
|
-
|
|
542
|
+
t48 = $[75];
|
|
587
543
|
}
|
|
588
|
-
const
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
$[
|
|
596
|
-
|
|
597
|
-
|
|
544
|
+
const t49 = showErrors && Boolean(errors.singularName);
|
|
545
|
+
let t50;
|
|
546
|
+
if ($[76] !== handleChange || $[77] !== setFieldTouched) {
|
|
547
|
+
t50 = (e_0) => {
|
|
548
|
+
setFieldTouched("singularName", true);
|
|
549
|
+
return handleChange(e_0);
|
|
550
|
+
};
|
|
551
|
+
$[76] = handleChange;
|
|
552
|
+
$[77] = setFieldTouched;
|
|
553
|
+
$[78] = t50;
|
|
554
|
+
} else {
|
|
555
|
+
t50 = $[78];
|
|
556
|
+
}
|
|
557
|
+
const t51 = values.singularName ?? "";
|
|
558
|
+
let t52;
|
|
559
|
+
if ($[79] !== t49 || $[80] !== t50 || $[81] !== t51) {
|
|
560
|
+
t52 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t49, name: "singularName", "aria-describedby": "singularName-helper", onChange: t50, value: t51, label: "Singular name" });
|
|
561
|
+
$[79] = t49;
|
|
562
|
+
$[80] = t50;
|
|
563
|
+
$[81] = t51;
|
|
564
|
+
$[82] = t52;
|
|
565
|
+
} else {
|
|
566
|
+
t52 = $[82];
|
|
567
|
+
}
|
|
568
|
+
const t53 = showErrors && Boolean(errors.singularName);
|
|
569
|
+
const t54 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define a singular name for your entities";
|
|
570
|
+
let t55;
|
|
571
|
+
if ($[83] !== t53 || $[84] !== t54) {
|
|
572
|
+
t55 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t53, children: t54 });
|
|
573
|
+
$[83] = t53;
|
|
574
|
+
$[84] = t54;
|
|
575
|
+
$[85] = t55;
|
|
576
|
+
} else {
|
|
577
|
+
t55 = $[85];
|
|
598
578
|
}
|
|
599
|
-
let
|
|
600
|
-
if ($[
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
579
|
+
let t56;
|
|
580
|
+
if ($[86] !== t52 || $[87] !== t55) {
|
|
581
|
+
t56 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
582
|
+
t52,
|
|
583
|
+
t55
|
|
604
584
|
] });
|
|
605
|
-
$[
|
|
606
|
-
$[
|
|
607
|
-
$[
|
|
585
|
+
$[86] = t52;
|
|
586
|
+
$[87] = t55;
|
|
587
|
+
$[88] = t56;
|
|
608
588
|
} else {
|
|
609
|
-
|
|
589
|
+
t56 = $[88];
|
|
610
590
|
}
|
|
611
|
-
const
|
|
612
|
-
let
|
|
613
|
-
if ($[
|
|
614
|
-
|
|
591
|
+
const t57 = showErrors && Boolean(errors.sideDialogWidth);
|
|
592
|
+
let t58;
|
|
593
|
+
if ($[89] !== setFieldTouched || $[90] !== setFieldValue) {
|
|
594
|
+
t58 = (e_1) => {
|
|
615
595
|
setFieldTouched("sideDialogWidth", true);
|
|
616
596
|
const value_0 = e_1.target.value;
|
|
617
597
|
if (!value_0) {
|
|
@@ -622,402 +602,399 @@
|
|
|
622
602
|
}
|
|
623
603
|
}
|
|
624
604
|
};
|
|
625
|
-
$[
|
|
626
|
-
$[
|
|
627
|
-
$[
|
|
605
|
+
$[89] = setFieldTouched;
|
|
606
|
+
$[90] = setFieldValue;
|
|
607
|
+
$[91] = t58;
|
|
628
608
|
} else {
|
|
629
|
-
|
|
609
|
+
t58 = $[91];
|
|
630
610
|
}
|
|
631
|
-
let
|
|
632
|
-
if ($[
|
|
633
|
-
|
|
611
|
+
let t59;
|
|
612
|
+
if ($[92] !== setFieldValue) {
|
|
613
|
+
t59 = () => {
|
|
634
614
|
setFieldValue("sideDialogWidth", null);
|
|
635
615
|
};
|
|
636
|
-
$[
|
|
637
|
-
$[
|
|
616
|
+
$[92] = setFieldValue;
|
|
617
|
+
$[93] = t59;
|
|
638
618
|
} else {
|
|
639
|
-
|
|
619
|
+
t59 = $[93];
|
|
640
620
|
}
|
|
641
|
-
const
|
|
642
|
-
let
|
|
643
|
-
if ($[
|
|
644
|
-
|
|
645
|
-
$[
|
|
621
|
+
const t60 = !values.sideDialogWidth;
|
|
622
|
+
let t61;
|
|
623
|
+
if ($[94] === Symbol.for("react.memo_cache_sentinel")) {
|
|
624
|
+
t61 = /* @__PURE__ */ jsxRuntime.jsx(ui.CloseIcon, { size: "small" });
|
|
625
|
+
$[94] = t61;
|
|
646
626
|
} else {
|
|
647
|
-
|
|
627
|
+
t61 = $[94];
|
|
648
628
|
}
|
|
649
|
-
let
|
|
650
|
-
if ($[
|
|
651
|
-
|
|
652
|
-
$[
|
|
653
|
-
$[
|
|
654
|
-
$[
|
|
655
|
-
} else {
|
|
656
|
-
t68 = $[99];
|
|
657
|
-
}
|
|
658
|
-
const t69 = values.sideDialogWidth ?? "";
|
|
659
|
-
let t70;
|
|
660
|
-
if ($[100] !== t63 || $[101] !== t64 || $[102] !== t68 || $[103] !== t69) {
|
|
661
|
-
t70 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t63, name: "sideDialogWidth", type: "number", "aria-describedby": "sideDialogWidth-helper", onChange: t64, endAdornment: t68, value: t69, label: "Side dialog width" });
|
|
662
|
-
$[100] = t63;
|
|
663
|
-
$[101] = t64;
|
|
664
|
-
$[102] = t68;
|
|
665
|
-
$[103] = t69;
|
|
666
|
-
$[104] = t70;
|
|
667
|
-
} else {
|
|
668
|
-
t70 = $[104];
|
|
669
|
-
}
|
|
670
|
-
const t71 = showErrors && Boolean(errors.singularName);
|
|
671
|
-
const t72 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define the width (in pixels) of entities side dialog. Default is 768px";
|
|
672
|
-
let t73;
|
|
673
|
-
if ($[105] !== t71 || $[106] !== t72) {
|
|
674
|
-
t73 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t71, children: t72 });
|
|
675
|
-
$[105] = t71;
|
|
676
|
-
$[106] = t72;
|
|
677
|
-
$[107] = t73;
|
|
678
|
-
} else {
|
|
679
|
-
t73 = $[107];
|
|
680
|
-
}
|
|
681
|
-
let t74;
|
|
682
|
-
if ($[108] !== t70 || $[109] !== t73) {
|
|
683
|
-
t74 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
684
|
-
t70,
|
|
685
|
-
t73
|
|
686
|
-
] });
|
|
687
|
-
$[108] = t70;
|
|
688
|
-
$[109] = t73;
|
|
689
|
-
$[110] = t74;
|
|
629
|
+
let t62;
|
|
630
|
+
if ($[95] !== t59 || $[96] !== t60) {
|
|
631
|
+
t62 = /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { size: "small", onClick: t59, disabled: t60, children: t61 });
|
|
632
|
+
$[95] = t59;
|
|
633
|
+
$[96] = t60;
|
|
634
|
+
$[97] = t62;
|
|
690
635
|
} else {
|
|
691
|
-
|
|
636
|
+
t62 = $[97];
|
|
692
637
|
}
|
|
693
|
-
const
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
$[
|
|
699
|
-
$[
|
|
700
|
-
$[
|
|
701
|
-
$[
|
|
638
|
+
const t63 = values.sideDialogWidth ?? "";
|
|
639
|
+
let t64;
|
|
640
|
+
if ($[98] !== t57 || $[99] !== t58 || $[100] !== t62 || $[101] !== t63) {
|
|
641
|
+
t64 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t57, name: "sideDialogWidth", type: "number", "aria-describedby": "sideDialogWidth-helper", onChange: t58, endAdornment: t62, value: t63, label: "Side dialog width" });
|
|
642
|
+
$[98] = t57;
|
|
643
|
+
$[99] = t58;
|
|
644
|
+
$[100] = t62;
|
|
645
|
+
$[101] = t63;
|
|
646
|
+
$[102] = t64;
|
|
647
|
+
} else {
|
|
648
|
+
t64 = $[102];
|
|
649
|
+
}
|
|
650
|
+
const t65 = showErrors && Boolean(errors.singularName);
|
|
651
|
+
const t66 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define the width (in pixels) of entities side dialog. Default is 768px";
|
|
652
|
+
let t67;
|
|
653
|
+
if ($[103] !== t65 || $[104] !== t66) {
|
|
654
|
+
t67 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t65, children: t66 });
|
|
655
|
+
$[103] = t65;
|
|
656
|
+
$[104] = t66;
|
|
657
|
+
$[105] = t67;
|
|
702
658
|
} else {
|
|
703
|
-
|
|
659
|
+
t67 = $[105];
|
|
704
660
|
}
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
$[115] = t78;
|
|
711
|
-
$[116] = t79;
|
|
712
|
-
$[117] = t80;
|
|
713
|
-
} else {
|
|
714
|
-
t80 = $[117];
|
|
715
|
-
}
|
|
716
|
-
let t81;
|
|
717
|
-
if ($[118] !== t77 || $[119] !== t80) {
|
|
718
|
-
t81 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
719
|
-
t77,
|
|
720
|
-
t80
|
|
661
|
+
let t68;
|
|
662
|
+
if ($[106] !== t64 || $[107] !== t67) {
|
|
663
|
+
t68 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
664
|
+
t64,
|
|
665
|
+
t67
|
|
721
666
|
] });
|
|
722
|
-
$[
|
|
723
|
-
$[
|
|
724
|
-
$[
|
|
667
|
+
$[106] = t64;
|
|
668
|
+
$[107] = t67;
|
|
669
|
+
$[108] = t68;
|
|
670
|
+
} else {
|
|
671
|
+
t68 = $[108];
|
|
672
|
+
}
|
|
673
|
+
const t69 = showErrors && Boolean(errors.description);
|
|
674
|
+
const t70 = values.description ?? "";
|
|
675
|
+
let t71;
|
|
676
|
+
if ($[109] !== handleChange || $[110] !== t69 || $[111] !== t70) {
|
|
677
|
+
t71 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t69, name: "description", value: t70, onChange: handleChange, multiline: true, minRows: 2, "aria-describedby": "description-helper-text", label: "Description" });
|
|
678
|
+
$[109] = handleChange;
|
|
679
|
+
$[110] = t69;
|
|
680
|
+
$[111] = t70;
|
|
681
|
+
$[112] = t71;
|
|
682
|
+
} else {
|
|
683
|
+
t71 = $[112];
|
|
684
|
+
}
|
|
685
|
+
const t72 = showErrors && Boolean(errors.description);
|
|
686
|
+
const t73 = showErrors && Boolean(errors.description) ? errors.description : "Description of the collection, you can use markdown";
|
|
687
|
+
let t74;
|
|
688
|
+
if ($[113] !== t72 || $[114] !== t73) {
|
|
689
|
+
t74 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t72, children: t73 });
|
|
690
|
+
$[113] = t72;
|
|
691
|
+
$[114] = t73;
|
|
692
|
+
$[115] = t74;
|
|
693
|
+
} else {
|
|
694
|
+
t74 = $[115];
|
|
695
|
+
}
|
|
696
|
+
let t75;
|
|
697
|
+
if ($[116] !== t71 || $[117] !== t74) {
|
|
698
|
+
t75 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
699
|
+
t71,
|
|
700
|
+
t74
|
|
701
|
+
] });
|
|
702
|
+
$[116] = t71;
|
|
703
|
+
$[117] = t74;
|
|
704
|
+
$[118] = t75;
|
|
725
705
|
} else {
|
|
726
|
-
|
|
706
|
+
t75 = $[118];
|
|
727
707
|
}
|
|
728
|
-
const
|
|
729
|
-
let
|
|
730
|
-
if ($[
|
|
731
|
-
|
|
732
|
-
$[
|
|
708
|
+
const t76 = values.defaultSize ?? "";
|
|
709
|
+
let t77;
|
|
710
|
+
if ($[119] === Symbol.for("react.memo_cache_sentinel")) {
|
|
711
|
+
t77 = ["xs", "s", "m", "l", "xl"].map(_temp2$7);
|
|
712
|
+
$[119] = t77;
|
|
733
713
|
} else {
|
|
734
|
-
|
|
714
|
+
t77 = $[119];
|
|
735
715
|
}
|
|
736
|
-
let
|
|
737
|
-
if ($[
|
|
738
|
-
|
|
739
|
-
$[
|
|
740
|
-
$[
|
|
741
|
-
$[
|
|
716
|
+
let t78;
|
|
717
|
+
if ($[120] !== handleChange || $[121] !== t76) {
|
|
718
|
+
t78 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { name: "defaultSize", size: "large", fullWidth: true, label: "Default row size", position: "item-aligned", onChange: handleChange, value: t76, renderValue: _temp$b, children: t77 }) });
|
|
719
|
+
$[120] = handleChange;
|
|
720
|
+
$[121] = t76;
|
|
721
|
+
$[122] = t78;
|
|
742
722
|
} else {
|
|
743
|
-
|
|
723
|
+
t78 = $[122];
|
|
744
724
|
}
|
|
745
|
-
const
|
|
746
|
-
let
|
|
747
|
-
if ($[
|
|
748
|
-
|
|
749
|
-
$[
|
|
750
|
-
$[
|
|
725
|
+
const t79 = values.includeJsonView === void 0 || values.includeJsonView ? "Include JSON view" : "Do not include JSON view";
|
|
726
|
+
let t80;
|
|
727
|
+
if ($[123] !== setFieldValue) {
|
|
728
|
+
t80 = (v_0) => setFieldValue("includeJsonView", v_0);
|
|
729
|
+
$[123] = setFieldValue;
|
|
730
|
+
$[124] = t80;
|
|
751
731
|
} else {
|
|
752
|
-
|
|
732
|
+
t80 = $[124];
|
|
753
733
|
}
|
|
754
|
-
const
|
|
755
|
-
let
|
|
756
|
-
if ($[
|
|
757
|
-
|
|
758
|
-
$[
|
|
759
|
-
$[
|
|
760
|
-
$[
|
|
761
|
-
$[
|
|
734
|
+
const t81 = values.includeJsonView === void 0 ? true : values.includeJsonView;
|
|
735
|
+
let t82;
|
|
736
|
+
if ($[125] !== t79 || $[126] !== t80 || $[127] !== t81) {
|
|
737
|
+
t82 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: t79, onValueChange: t80, value: t81 });
|
|
738
|
+
$[125] = t79;
|
|
739
|
+
$[126] = t80;
|
|
740
|
+
$[127] = t81;
|
|
741
|
+
$[128] = t82;
|
|
762
742
|
} else {
|
|
763
|
-
|
|
743
|
+
t82 = $[128];
|
|
764
744
|
}
|
|
765
|
-
let
|
|
766
|
-
if ($[
|
|
767
|
-
|
|
768
|
-
$[
|
|
745
|
+
let t83;
|
|
746
|
+
if ($[129] === Symbol.for("react.memo_cache_sentinel")) {
|
|
747
|
+
t83 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { children: "Include the JSON representation of the document." });
|
|
748
|
+
$[129] = t83;
|
|
769
749
|
} else {
|
|
770
|
-
|
|
750
|
+
t83 = $[129];
|
|
771
751
|
}
|
|
772
|
-
let
|
|
773
|
-
if ($[
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
752
|
+
let t84;
|
|
753
|
+
if ($[130] !== t82) {
|
|
754
|
+
t84 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
755
|
+
t82,
|
|
756
|
+
t83
|
|
777
757
|
] });
|
|
778
|
-
$[
|
|
779
|
-
$[
|
|
758
|
+
$[130] = t82;
|
|
759
|
+
$[131] = t84;
|
|
780
760
|
} else {
|
|
781
|
-
|
|
761
|
+
t84 = $[131];
|
|
782
762
|
}
|
|
783
|
-
const
|
|
784
|
-
let
|
|
785
|
-
if ($[
|
|
786
|
-
|
|
763
|
+
const t85 = customIdValue === "code_defined";
|
|
764
|
+
let t86;
|
|
765
|
+
if ($[132] !== setFieldValue) {
|
|
766
|
+
t86 = (v_1) => {
|
|
787
767
|
if (v_1 === "code_defined") {
|
|
788
768
|
throw new Error("This should not happen");
|
|
789
769
|
}
|
|
790
770
|
setFieldValue("customId", v_1);
|
|
791
771
|
};
|
|
792
|
-
$[
|
|
793
|
-
$[
|
|
772
|
+
$[132] = setFieldValue;
|
|
773
|
+
$[133] = t86;
|
|
794
774
|
} else {
|
|
795
|
-
|
|
796
|
-
}
|
|
797
|
-
const t93 = customIdValue ?? "";
|
|
798
|
-
let t94;
|
|
799
|
-
let t95;
|
|
800
|
-
let t96;
|
|
801
|
-
if ($[136] === Symbol.for("react.memo_cache_sentinel")) {
|
|
802
|
-
t94 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "false", children: "Document ID is generated automatically" });
|
|
803
|
-
t95 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "true", children: "Users must define an ID" });
|
|
804
|
-
t96 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
|
|
805
|
-
$[136] = t94;
|
|
806
|
-
$[137] = t95;
|
|
807
|
-
$[138] = t96;
|
|
808
|
-
} else {
|
|
809
|
-
t94 = $[136];
|
|
810
|
-
t95 = $[137];
|
|
811
|
-
t96 = $[138];
|
|
775
|
+
t86 = $[133];
|
|
812
776
|
}
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
777
|
+
const t87 = customIdValue ?? "";
|
|
778
|
+
let t88;
|
|
779
|
+
let t89;
|
|
780
|
+
let t90;
|
|
781
|
+
if ($[134] === Symbol.for("react.memo_cache_sentinel")) {
|
|
782
|
+
t88 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "false", children: "Document ID is generated automatically" });
|
|
783
|
+
t89 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "true", children: "Users must define an ID" });
|
|
784
|
+
t90 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
|
|
785
|
+
$[134] = t88;
|
|
786
|
+
$[135] = t89;
|
|
787
|
+
$[136] = t90;
|
|
788
|
+
} else {
|
|
789
|
+
t88 = $[134];
|
|
790
|
+
t89 = $[135];
|
|
791
|
+
t90 = $[136];
|
|
792
|
+
}
|
|
793
|
+
let t91;
|
|
794
|
+
if ($[137] !== t85 || $[138] !== t86 || $[139] !== t87) {
|
|
795
|
+
t91 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Select, { name: "customId", label: "Document IDs generation", position: "item-aligned", size: "large", fullWidth: true, disabled: t85, onValueChange: t86, value: t87, renderValue: _temp3$4, children: [
|
|
796
|
+
t88,
|
|
797
|
+
t89,
|
|
798
|
+
t90
|
|
819
799
|
] }) });
|
|
820
|
-
$[
|
|
821
|
-
$[
|
|
822
|
-
$[
|
|
823
|
-
$[
|
|
800
|
+
$[137] = t85;
|
|
801
|
+
$[138] = t86;
|
|
802
|
+
$[139] = t87;
|
|
803
|
+
$[140] = t91;
|
|
824
804
|
} else {
|
|
825
|
-
|
|
805
|
+
t91 = $[140];
|
|
826
806
|
}
|
|
827
|
-
let
|
|
828
|
-
if ($[
|
|
829
|
-
|
|
830
|
-
$[
|
|
831
|
-
$[
|
|
807
|
+
let t92;
|
|
808
|
+
if ($[141] !== setFieldValue) {
|
|
809
|
+
t92 = (v_2) => setFieldValue("collectionGroup", v_2);
|
|
810
|
+
$[141] = setFieldValue;
|
|
811
|
+
$[142] = t92;
|
|
832
812
|
} else {
|
|
833
|
-
|
|
813
|
+
t92 = $[142];
|
|
834
814
|
}
|
|
835
|
-
const
|
|
836
|
-
let
|
|
837
|
-
if ($[
|
|
838
|
-
|
|
839
|
-
$[
|
|
840
|
-
$[
|
|
841
|
-
$[
|
|
815
|
+
const t93 = values.collectionGroup ?? false;
|
|
816
|
+
let t94;
|
|
817
|
+
if ($[143] !== t92 || $[144] !== t93) {
|
|
818
|
+
t94 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: "Collection group", onValueChange: t92, value: t93 });
|
|
819
|
+
$[143] = t92;
|
|
820
|
+
$[144] = t93;
|
|
821
|
+
$[145] = t94;
|
|
842
822
|
} else {
|
|
843
|
-
|
|
823
|
+
t94 = $[145];
|
|
844
824
|
}
|
|
845
|
-
let
|
|
846
|
-
if ($[
|
|
847
|
-
|
|
848
|
-
$[
|
|
825
|
+
let t95;
|
|
826
|
+
if ($[146] === Symbol.for("react.memo_cache_sentinel")) {
|
|
827
|
+
t95 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { children: "A collection group consists of all collections with the same path. This allows you to query over multiple collections at once." });
|
|
828
|
+
$[146] = t95;
|
|
849
829
|
} else {
|
|
850
|
-
|
|
830
|
+
t95 = $[146];
|
|
851
831
|
}
|
|
852
|
-
let
|
|
853
|
-
if ($[
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
832
|
+
let t96;
|
|
833
|
+
if ($[147] !== t94) {
|
|
834
|
+
t96 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-4", children: [
|
|
835
|
+
t94,
|
|
836
|
+
t95
|
|
857
837
|
] });
|
|
858
|
-
$[
|
|
859
|
-
$[
|
|
838
|
+
$[147] = t94;
|
|
839
|
+
$[148] = t96;
|
|
860
840
|
} else {
|
|
861
|
-
|
|
841
|
+
t96 = $[148];
|
|
862
842
|
}
|
|
863
|
-
let
|
|
864
|
-
if ($[
|
|
865
|
-
|
|
866
|
-
$[
|
|
867
|
-
$[
|
|
843
|
+
let t97;
|
|
844
|
+
if ($[149] !== setFieldValue) {
|
|
845
|
+
t97 = (v_3) => setFieldValue("textSearchEnabled", v_3);
|
|
846
|
+
$[149] = setFieldValue;
|
|
847
|
+
$[150] = t97;
|
|
868
848
|
} else {
|
|
869
|
-
|
|
849
|
+
t97 = $[150];
|
|
870
850
|
}
|
|
871
|
-
const
|
|
872
|
-
let
|
|
873
|
-
if ($[
|
|
874
|
-
|
|
875
|
-
$[
|
|
876
|
-
$[
|
|
877
|
-
$[
|
|
851
|
+
const t98 = values.textSearchEnabled ?? false;
|
|
852
|
+
let t99;
|
|
853
|
+
if ($[151] !== t97 || $[152] !== t98) {
|
|
854
|
+
t99 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: "Enable text search for this collection", onValueChange: t97, value: t98 });
|
|
855
|
+
$[151] = t97;
|
|
856
|
+
$[152] = t98;
|
|
857
|
+
$[153] = t99;
|
|
878
858
|
} else {
|
|
879
|
-
|
|
859
|
+
t99 = $[153];
|
|
880
860
|
}
|
|
881
|
-
let
|
|
882
|
-
if ($[
|
|
883
|
-
|
|
884
|
-
$[
|
|
861
|
+
let t100;
|
|
862
|
+
if ($[154] === Symbol.for("react.memo_cache_sentinel")) {
|
|
863
|
+
t100 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { children: "Allow text search for this collection. If you have not specified a text search delegate, this will use the built-in local text search. This is not recommended for large collections, as it may incur in performance and cost issues." });
|
|
864
|
+
$[154] = t100;
|
|
885
865
|
} else {
|
|
886
|
-
|
|
866
|
+
t100 = $[154];
|
|
887
867
|
}
|
|
888
|
-
let
|
|
889
|
-
if ($[
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
868
|
+
let t101;
|
|
869
|
+
if ($[155] !== t99) {
|
|
870
|
+
t101 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
871
|
+
t99,
|
|
872
|
+
t100
|
|
893
873
|
] });
|
|
894
|
-
$[
|
|
895
|
-
$[
|
|
874
|
+
$[155] = t99;
|
|
875
|
+
$[156] = t101;
|
|
896
876
|
} else {
|
|
897
|
-
|
|
877
|
+
t101 = $[156];
|
|
898
878
|
}
|
|
899
|
-
let
|
|
900
|
-
if ($[
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
879
|
+
let t102;
|
|
880
|
+
if ($[157] !== t101 || $[158] !== t48 || $[159] !== t56 || $[160] !== t68 || $[161] !== t75 || $[162] !== t78 || $[163] !== t84 || $[164] !== t91 || $[165] !== t96) {
|
|
881
|
+
t102 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-4 p-4", children: [
|
|
882
|
+
t48,
|
|
883
|
+
t56,
|
|
884
|
+
t68,
|
|
885
|
+
t75,
|
|
886
|
+
t78,
|
|
906
887
|
t84,
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
t107
|
|
888
|
+
t91,
|
|
889
|
+
t96,
|
|
890
|
+
t101
|
|
911
891
|
] });
|
|
912
|
-
$[
|
|
913
|
-
$[
|
|
914
|
-
$[
|
|
915
|
-
$[
|
|
916
|
-
$[
|
|
917
|
-
$[
|
|
918
|
-
$[
|
|
919
|
-
$[
|
|
920
|
-
$[
|
|
921
|
-
$[
|
|
922
|
-
} else {
|
|
923
|
-
|
|
924
|
-
}
|
|
925
|
-
let t109;
|
|
926
|
-
if ($[169] !== advancedPanelExpanded || $[170] !== t108) {
|
|
927
|
-
t109 = /* @__PURE__ */ jsxRuntime.jsx(ui.ExpandablePanel, { expanded: advancedPanelExpanded, onExpandedChange: setAdvancedPanelExpanded, title: t47, initiallyExpanded: false, children: t108 });
|
|
928
|
-
$[169] = advancedPanelExpanded;
|
|
929
|
-
$[170] = t108;
|
|
930
|
-
$[171] = t109;
|
|
931
|
-
} else {
|
|
932
|
-
t109 = $[171];
|
|
892
|
+
$[157] = t101;
|
|
893
|
+
$[158] = t48;
|
|
894
|
+
$[159] = t56;
|
|
895
|
+
$[160] = t68;
|
|
896
|
+
$[161] = t75;
|
|
897
|
+
$[162] = t78;
|
|
898
|
+
$[163] = t84;
|
|
899
|
+
$[164] = t91;
|
|
900
|
+
$[165] = t96;
|
|
901
|
+
$[166] = t102;
|
|
902
|
+
} else {
|
|
903
|
+
t102 = $[166];
|
|
933
904
|
}
|
|
934
|
-
let
|
|
935
|
-
if ($[
|
|
936
|
-
|
|
937
|
-
|
|
905
|
+
let t103;
|
|
906
|
+
if ($[167] !== advancedPanelExpanded || $[168] !== t102) {
|
|
907
|
+
t103 = /* @__PURE__ */ jsxRuntime.jsx(ui.ExpandablePanel, { expanded: advancedPanelExpanded, onExpandedChange: setAdvancedPanelExpanded, title: t41, initiallyExpanded: false, children: t102 });
|
|
908
|
+
$[167] = advancedPanelExpanded;
|
|
909
|
+
$[168] = t102;
|
|
910
|
+
$[169] = t103;
|
|
911
|
+
} else {
|
|
912
|
+
t103 = $[169];
|
|
913
|
+
}
|
|
914
|
+
let t104;
|
|
915
|
+
if ($[170] !== children || $[171] !== t103) {
|
|
916
|
+
t104 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-8", children: [
|
|
917
|
+
t103,
|
|
938
918
|
children
|
|
939
919
|
] });
|
|
940
|
-
$[
|
|
941
|
-
$[
|
|
942
|
-
$[
|
|
920
|
+
$[170] = children;
|
|
921
|
+
$[171] = t103;
|
|
922
|
+
$[172] = t104;
|
|
943
923
|
} else {
|
|
944
|
-
|
|
924
|
+
t104 = $[172];
|
|
945
925
|
}
|
|
946
|
-
let
|
|
947
|
-
if ($[
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
926
|
+
let t105;
|
|
927
|
+
if ($[173] !== t104 || $[174] !== t23 || $[175] !== t31 || $[176] !== t34 || $[177] !== t40) {
|
|
928
|
+
t105 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-4", children: [
|
|
929
|
+
t23,
|
|
930
|
+
t31,
|
|
931
|
+
t34,
|
|
952
932
|
t40,
|
|
953
|
-
|
|
954
|
-
t110
|
|
933
|
+
t104
|
|
955
934
|
] });
|
|
956
|
-
$[
|
|
957
|
-
$[
|
|
958
|
-
$[
|
|
959
|
-
$[
|
|
960
|
-
$[
|
|
961
|
-
$[
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
t112 = /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
935
|
+
$[173] = t104;
|
|
936
|
+
$[174] = t23;
|
|
937
|
+
$[175] = t31;
|
|
938
|
+
$[176] = t34;
|
|
939
|
+
$[177] = t40;
|
|
940
|
+
$[178] = t105;
|
|
941
|
+
} else {
|
|
942
|
+
t105 = $[178];
|
|
943
|
+
}
|
|
944
|
+
let t106;
|
|
945
|
+
if ($[179] === Symbol.for("react.memo_cache_sentinel")) {
|
|
946
|
+
t106 = /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
969
947
|
height: "52px"
|
|
970
948
|
} });
|
|
971
|
-
$[
|
|
949
|
+
$[179] = t106;
|
|
972
950
|
} else {
|
|
973
|
-
|
|
951
|
+
t106 = $[179];
|
|
974
952
|
}
|
|
975
|
-
let
|
|
976
|
-
if ($[
|
|
977
|
-
|
|
953
|
+
let t107;
|
|
954
|
+
if ($[180] !== setFieldValue) {
|
|
955
|
+
t107 = (icon) => {
|
|
978
956
|
setIconDialogOpen(false);
|
|
979
957
|
setFieldValue("icon", icon);
|
|
980
958
|
};
|
|
981
|
-
$[
|
|
982
|
-
$[
|
|
959
|
+
$[180] = setFieldValue;
|
|
960
|
+
$[181] = t107;
|
|
983
961
|
} else {
|
|
984
|
-
|
|
962
|
+
t107 = $[181];
|
|
985
963
|
}
|
|
986
|
-
let
|
|
987
|
-
if ($[
|
|
988
|
-
|
|
989
|
-
$[
|
|
990
|
-
$[
|
|
991
|
-
$[
|
|
964
|
+
let t108;
|
|
965
|
+
if ($[182] !== t107 || $[183] !== values.icon) {
|
|
966
|
+
t108 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsxRuntime.jsx(core.SearchIconsView, { selectedIcon: values.icon, onIconSelected: t107 }) });
|
|
967
|
+
$[182] = t107;
|
|
968
|
+
$[183] = values.icon;
|
|
969
|
+
$[184] = t108;
|
|
992
970
|
} else {
|
|
993
|
-
|
|
971
|
+
t108 = $[184];
|
|
994
972
|
}
|
|
995
|
-
let
|
|
996
|
-
if ($[
|
|
997
|
-
|
|
998
|
-
$[
|
|
999
|
-
$[
|
|
1000
|
-
$[
|
|
973
|
+
let t109;
|
|
974
|
+
if ($[185] !== iconDialogOpen || $[186] !== t108) {
|
|
975
|
+
t109 = /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t108 });
|
|
976
|
+
$[185] = iconDialogOpen;
|
|
977
|
+
$[186] = t108;
|
|
978
|
+
$[187] = t109;
|
|
1001
979
|
} else {
|
|
1002
|
-
|
|
980
|
+
t109 = $[187];
|
|
1003
981
|
}
|
|
1004
|
-
let
|
|
1005
|
-
if ($[
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
982
|
+
let t110;
|
|
983
|
+
if ($[188] !== t105 || $[189] !== t109 || $[190] !== t15) {
|
|
984
|
+
t110 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-auto my-auto", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Container, { maxWidth: "4xl", className: "flex flex-col gap-4 p-8 m-auto", children: [
|
|
985
|
+
t15,
|
|
986
|
+
t105,
|
|
987
|
+
t106,
|
|
988
|
+
t109
|
|
1011
989
|
] }) });
|
|
1012
|
-
$[
|
|
1013
|
-
$[
|
|
1014
|
-
$[
|
|
1015
|
-
$[
|
|
1016
|
-
$[195] = t116;
|
|
990
|
+
$[188] = t105;
|
|
991
|
+
$[189] = t109;
|
|
992
|
+
$[190] = t15;
|
|
993
|
+
$[191] = t110;
|
|
1017
994
|
} else {
|
|
1018
|
-
|
|
995
|
+
t110 = $[191];
|
|
1019
996
|
}
|
|
1020
|
-
return
|
|
997
|
+
return t110;
|
|
1021
998
|
}
|
|
1022
999
|
function _temp3$4(value_3) {
|
|
1023
1000
|
if (value_3 === "code_defined") {
|
|
@@ -2518,7 +2495,7 @@
|
|
|
2518
2495
|
const t4 = selected ? ui.cardSelectedMixin : "";
|
|
2519
2496
|
let t5;
|
|
2520
2497
|
if ($[5] !== borderColorClass || $[6] !== t3 || $[7] !== t4) {
|
|
2521
|
-
t5 = ui.cls("border", "pl-2 w-full flex flex-row gap-4 items-center", ui.cardMixin, t3, t4, "flex-grow p-4 border transition-colors duration-200", borderColorClass);
|
|
2498
|
+
t5 = ui.cls("m-1", "border", "pl-2 w-full flex flex-row gap-4 items-center", ui.cardMixin, t3, t4, "flex-grow p-4 border transition-colors duration-200", borderColorClass);
|
|
2522
2499
|
$[5] = borderColorClass;
|
|
2523
2500
|
$[6] = t3;
|
|
2524
2501
|
$[7] = t4;
|
|
@@ -4412,7 +4389,8 @@
|
|
|
4412
4389
|
existing,
|
|
4413
4390
|
multiple,
|
|
4414
4391
|
disabled,
|
|
4415
|
-
showErrors
|
|
4392
|
+
showErrors,
|
|
4393
|
+
asString
|
|
4416
4394
|
} = t0;
|
|
4417
4395
|
const {
|
|
4418
4396
|
values,
|
|
@@ -4430,7 +4408,7 @@
|
|
|
4430
4408
|
}
|
|
4431
4409
|
return t12;
|
|
4432
4410
|
}
|
|
4433
|
-
const pathPath = multiple ? "of.path" : "path";
|
|
4411
|
+
const pathPath = asString ? "reference.path" : multiple ? "of.path" : "path";
|
|
4434
4412
|
let t1;
|
|
4435
4413
|
if ($[1] !== pathPath || $[2] !== values) {
|
|
4436
4414
|
t1 = formex.getIn(values, pathPath);
|
|
@@ -5039,6 +5017,12 @@
|
|
|
5039
5017
|
propertyConfig: "reference",
|
|
5040
5018
|
editable: propertyData.editable !== void 0 ? propertyData.editable : true
|
|
5041
5019
|
});
|
|
5020
|
+
} else if (selectedWidgetId === "reference_as_string") {
|
|
5021
|
+
updatedProperty = core.mergeDeep(propertyData, {
|
|
5022
|
+
dataType: "string",
|
|
5023
|
+
propertyConfig: "reference_as_string",
|
|
5024
|
+
editable: propertyData.editable !== void 0 ? propertyData.editable : true
|
|
5025
|
+
});
|
|
5042
5026
|
} else if (selectedWidgetId === "multi_references") {
|
|
5043
5027
|
updatedProperty = core.mergeDeep(propertyData, {
|
|
5044
5028
|
dataType: "array",
|
|
@@ -5221,7 +5205,7 @@
|
|
|
5221
5205
|
}
|
|
5222
5206
|
}
|
|
5223
5207
|
}
|
|
5224
|
-
const supportedFieldsIds = ["text_field", "multiline", "markdown", "url", "email", "select", "multi_select", "number_input", "number_select", "multi_number_select", "file_upload", "multi_file_upload", "reference", "multi_references", "switch", "date_time", "group", "key_value", "repeat", "block"];
|
|
5208
|
+
const supportedFieldsIds = ["text_field", "multiline", "markdown", "url", "email", "select", "multi_select", "number_input", "number_select", "multi_number_select", "file_upload", "multi_file_upload", "reference", "reference_as_string", "multi_references", "switch", "date_time", "group", "key_value", "repeat", "block"];
|
|
5225
5209
|
const supportedFields = Object.entries(core.DEFAULT_FIELD_CONFIGS).filter(([id]) => supportedFieldsIds.includes(id)).map(([id, config]) => ({
|
|
5226
5210
|
[id]: config
|
|
5227
5211
|
})).reduce((a, b) => ({
|
|
@@ -5897,7 +5881,7 @@
|
|
|
5897
5881
|
return t11;
|
|
5898
5882
|
}
|
|
5899
5883
|
function PropertyEditFormFields(t0) {
|
|
5900
|
-
const $ = reactCompilerRuntime.c(
|
|
5884
|
+
const $ = reactCompilerRuntime.c(146);
|
|
5901
5885
|
const {
|
|
5902
5886
|
values,
|
|
5903
5887
|
errors,
|
|
@@ -6186,59 +6170,73 @@
|
|
|
6186
6170
|
}
|
|
6187
6171
|
childComponent = t102;
|
|
6188
6172
|
} else {
|
|
6189
|
-
if (selectedFieldConfigId === "
|
|
6173
|
+
if (selectedFieldConfigId === "reference_as_string") {
|
|
6190
6174
|
let t102;
|
|
6191
|
-
if ($[75] !== disabled) {
|
|
6192
|
-
t102 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
6175
|
+
if ($[75] !== disabled || $[76] !== existing || $[77] !== showErrors) {
|
|
6176
|
+
t102 = /* @__PURE__ */ jsxRuntime.jsx(ReferencePropertyField, { showErrors, existing, asString: true, multiple: false, disabled });
|
|
6193
6177
|
$[75] = disabled;
|
|
6194
|
-
$[76] =
|
|
6178
|
+
$[76] = existing;
|
|
6179
|
+
$[77] = showErrors;
|
|
6180
|
+
$[78] = t102;
|
|
6195
6181
|
} else {
|
|
6196
|
-
t102 = $[
|
|
6182
|
+
t102 = $[78];
|
|
6197
6183
|
}
|
|
6198
6184
|
childComponent = t102;
|
|
6199
6185
|
} else {
|
|
6200
|
-
if (selectedFieldConfigId === "
|
|
6186
|
+
if (selectedFieldConfigId === "date_time") {
|
|
6201
6187
|
let t102;
|
|
6202
|
-
if ($[
|
|
6203
|
-
t102 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
6204
|
-
$[
|
|
6205
|
-
$[78] = existing;
|
|
6206
|
-
$[79] = showErrors;
|
|
6188
|
+
if ($[79] !== disabled) {
|
|
6189
|
+
t102 = /* @__PURE__ */ jsxRuntime.jsx(DateTimePropertyField, { disabled });
|
|
6190
|
+
$[79] = disabled;
|
|
6207
6191
|
$[80] = t102;
|
|
6208
6192
|
} else {
|
|
6209
6193
|
t102 = $[80];
|
|
6210
6194
|
}
|
|
6211
6195
|
childComponent = t102;
|
|
6212
6196
|
} else {
|
|
6213
|
-
if (selectedFieldConfigId === "
|
|
6197
|
+
if (selectedFieldConfigId === "multi_references") {
|
|
6214
6198
|
let t102;
|
|
6215
|
-
if ($[81] !==
|
|
6216
|
-
t102 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
6217
|
-
$[81] =
|
|
6218
|
-
$[82] =
|
|
6219
|
-
$[83] =
|
|
6220
|
-
$[84] =
|
|
6221
|
-
$[85] = getData;
|
|
6222
|
-
$[86] = propertyConfigs;
|
|
6223
|
-
$[87] = showErrors;
|
|
6224
|
-
$[88] = t102;
|
|
6199
|
+
if ($[81] !== disabled || $[82] !== existing || $[83] !== showErrors) {
|
|
6200
|
+
t102 = /* @__PURE__ */ jsxRuntime.jsx(ReferencePropertyField, { showErrors, existing, multiple: true, disabled });
|
|
6201
|
+
$[81] = disabled;
|
|
6202
|
+
$[82] = existing;
|
|
6203
|
+
$[83] = showErrors;
|
|
6204
|
+
$[84] = t102;
|
|
6225
6205
|
} else {
|
|
6226
|
-
t102 = $[
|
|
6206
|
+
t102 = $[84];
|
|
6227
6207
|
}
|
|
6228
6208
|
childComponent = t102;
|
|
6229
6209
|
} else {
|
|
6230
|
-
if (selectedFieldConfigId === "
|
|
6210
|
+
if (selectedFieldConfigId === "repeat") {
|
|
6231
6211
|
let t102;
|
|
6232
|
-
if ($[89] !==
|
|
6233
|
-
t102 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
6234
|
-
$[
|
|
6235
|
-
$[
|
|
6212
|
+
if ($[85] !== allowDataInference || $[86] !== collectionEditable || $[87] !== disabled || $[88] !== existing || $[89] !== getData || $[90] !== propertyConfigs || $[91] !== showErrors) {
|
|
6213
|
+
t102 = /* @__PURE__ */ jsxRuntime.jsx(RepeatPropertyField, { showErrors, existing, getData, allowDataInference, disabled, collectionEditable, propertyConfigs });
|
|
6214
|
+
$[85] = allowDataInference;
|
|
6215
|
+
$[86] = collectionEditable;
|
|
6216
|
+
$[87] = disabled;
|
|
6217
|
+
$[88] = existing;
|
|
6218
|
+
$[89] = getData;
|
|
6219
|
+
$[90] = propertyConfigs;
|
|
6220
|
+
$[91] = showErrors;
|
|
6221
|
+
$[92] = t102;
|
|
6236
6222
|
} else {
|
|
6237
|
-
t102 = $[
|
|
6223
|
+
t102 = $[92];
|
|
6238
6224
|
}
|
|
6239
6225
|
childComponent = t102;
|
|
6240
6226
|
} else {
|
|
6241
|
-
|
|
6227
|
+
if (selectedFieldConfigId === "key_value") {
|
|
6228
|
+
let t102;
|
|
6229
|
+
if ($[93] !== disabled) {
|
|
6230
|
+
t102 = /* @__PURE__ */ jsxRuntime.jsx(KeyValuePropertyField, { disabled });
|
|
6231
|
+
$[93] = disabled;
|
|
6232
|
+
$[94] = t102;
|
|
6233
|
+
} else {
|
|
6234
|
+
t102 = $[94];
|
|
6235
|
+
}
|
|
6236
|
+
childComponent = t102;
|
|
6237
|
+
} else {
|
|
6238
|
+
childComponent = null;
|
|
6239
|
+
}
|
|
6242
6240
|
}
|
|
6243
6241
|
}
|
|
6244
6242
|
}
|
|
@@ -6256,7 +6254,7 @@
|
|
|
6256
6254
|
}
|
|
6257
6255
|
}
|
|
6258
6256
|
let t10;
|
|
6259
|
-
if ($[
|
|
6257
|
+
if ($[95] !== disabled) {
|
|
6260
6258
|
t10 = disabled && /* @__PURE__ */ jsxRuntime.jsxs(ui.InfoLabel, { mode: "warn", children: [
|
|
6261
6259
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { children: "This property can't be edited" }),
|
|
6262
6260
|
/* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "caption", children: [
|
|
@@ -6265,157 +6263,157 @@
|
|
|
6265
6263
|
" flag"
|
|
6266
6264
|
] })
|
|
6267
6265
|
] });
|
|
6268
|
-
$[
|
|
6269
|
-
$[
|
|
6266
|
+
$[95] = disabled;
|
|
6267
|
+
$[96] = t10;
|
|
6270
6268
|
} else {
|
|
6271
|
-
t10 = $[
|
|
6269
|
+
t10 = $[96];
|
|
6272
6270
|
}
|
|
6273
6271
|
const t11 = selectedFieldConfigId;
|
|
6274
6272
|
let t12;
|
|
6275
|
-
if ($[
|
|
6273
|
+
if ($[97] !== onWidgetSelectChanged) {
|
|
6276
6274
|
t12 = (value) => onWidgetSelectChanged(value);
|
|
6277
|
-
$[
|
|
6278
|
-
$[
|
|
6275
|
+
$[97] = onWidgetSelectChanged;
|
|
6276
|
+
$[98] = t12;
|
|
6279
6277
|
} else {
|
|
6280
|
-
t12 = $[
|
|
6278
|
+
t12 = $[98];
|
|
6281
6279
|
}
|
|
6282
6280
|
let t13;
|
|
6283
|
-
if ($[
|
|
6281
|
+
if ($[99] !== onDismiss) {
|
|
6284
6282
|
t13 = (open, hasValue) => {
|
|
6285
6283
|
if (!hasValue) {
|
|
6286
6284
|
onDismiss?.();
|
|
6287
6285
|
}
|
|
6288
6286
|
setSelectOpen(open);
|
|
6289
6287
|
};
|
|
6290
|
-
$[
|
|
6291
|
-
$[
|
|
6288
|
+
$[99] = onDismiss;
|
|
6289
|
+
$[100] = t13;
|
|
6292
6290
|
} else {
|
|
6293
|
-
t13 = $[
|
|
6291
|
+
t13 = $[100];
|
|
6294
6292
|
}
|
|
6295
6293
|
const t14 = Boolean(selectedWidgetError);
|
|
6296
6294
|
let t15;
|
|
6297
|
-
if ($[
|
|
6295
|
+
if ($[101] !== disabled || $[102] !== existing || $[103] !== inArray || $[104] !== propertyConfigs || $[105] !== selectOpen || $[106] !== t11 || $[107] !== t12 || $[108] !== t13 || $[109] !== t14 || $[110] !== values) {
|
|
6298
6296
|
t15 = /* @__PURE__ */ jsxRuntime.jsx(WidgetSelectView, { initialProperty: values, value: t11, onValueChange: t12, open: selectOpen, onOpenChange: t13, disabled, showError: t14, existing, propertyConfigs, inArray });
|
|
6299
|
-
$[
|
|
6300
|
-
$[
|
|
6301
|
-
$[
|
|
6302
|
-
$[
|
|
6303
|
-
$[
|
|
6304
|
-
$[
|
|
6305
|
-
$[
|
|
6306
|
-
$[
|
|
6307
|
-
$[
|
|
6308
|
-
$[
|
|
6309
|
-
$[
|
|
6310
|
-
} else {
|
|
6311
|
-
t15 = $[
|
|
6297
|
+
$[101] = disabled;
|
|
6298
|
+
$[102] = existing;
|
|
6299
|
+
$[103] = inArray;
|
|
6300
|
+
$[104] = propertyConfigs;
|
|
6301
|
+
$[105] = selectOpen;
|
|
6302
|
+
$[106] = t11;
|
|
6303
|
+
$[107] = t12;
|
|
6304
|
+
$[108] = t13;
|
|
6305
|
+
$[109] = t14;
|
|
6306
|
+
$[110] = values;
|
|
6307
|
+
$[111] = t15;
|
|
6308
|
+
} else {
|
|
6309
|
+
t15 = $[111];
|
|
6312
6310
|
}
|
|
6313
6311
|
let t16;
|
|
6314
|
-
if ($[
|
|
6312
|
+
if ($[112] !== selectedWidgetError) {
|
|
6315
6313
|
t16 = selectedWidgetError && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "ml-3.5", color: "error", children: "Required" });
|
|
6316
|
-
$[
|
|
6317
|
-
$[
|
|
6314
|
+
$[112] = selectedWidgetError;
|
|
6315
|
+
$[113] = t16;
|
|
6318
6316
|
} else {
|
|
6319
|
-
t16 = $[
|
|
6317
|
+
t16 = $[113];
|
|
6320
6318
|
}
|
|
6321
6319
|
let t17;
|
|
6322
|
-
if ($[
|
|
6320
|
+
if ($[114] !== t15 || $[115] !== t16) {
|
|
6323
6321
|
t17 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex flex-col gap-2", children: [
|
|
6324
6322
|
t15,
|
|
6325
6323
|
t16
|
|
6326
6324
|
] });
|
|
6327
|
-
$[
|
|
6328
|
-
$[
|
|
6329
|
-
$[
|
|
6325
|
+
$[114] = t15;
|
|
6326
|
+
$[115] = t16;
|
|
6327
|
+
$[116] = t17;
|
|
6330
6328
|
} else {
|
|
6331
|
-
t17 = $[
|
|
6329
|
+
t17 = $[116];
|
|
6332
6330
|
}
|
|
6333
6331
|
let t18;
|
|
6334
|
-
if ($[
|
|
6332
|
+
if ($[117] !== disabled || $[118] !== onDelete || $[119] !== values?.id) {
|
|
6335
6333
|
t18 = onDelete && values?.id && /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { variant: "ghost", className: "m-4", disabled, onClick: () => setDeleteDialogOpen(true), children: /* @__PURE__ */ jsxRuntime.jsx(ui.DeleteIcon, {}) });
|
|
6336
|
-
$[
|
|
6337
|
-
$[
|
|
6338
|
-
$[
|
|
6339
|
-
$[
|
|
6334
|
+
$[117] = disabled;
|
|
6335
|
+
$[118] = onDelete;
|
|
6336
|
+
$[119] = values?.id;
|
|
6337
|
+
$[120] = t18;
|
|
6340
6338
|
} else {
|
|
6341
|
-
t18 = $[
|
|
6339
|
+
t18 = $[120];
|
|
6342
6340
|
}
|
|
6343
6341
|
let t19;
|
|
6344
|
-
if ($[
|
|
6342
|
+
if ($[121] !== t17 || $[122] !== t18) {
|
|
6345
6343
|
t19 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex mt-2 justify-between", children: [
|
|
6346
6344
|
t17,
|
|
6347
6345
|
t18
|
|
6348
6346
|
] });
|
|
6349
|
-
$[
|
|
6350
|
-
$[
|
|
6351
|
-
$[
|
|
6347
|
+
$[121] = t17;
|
|
6348
|
+
$[122] = t18;
|
|
6349
|
+
$[123] = t19;
|
|
6352
6350
|
} else {
|
|
6353
|
-
t19 = $[
|
|
6351
|
+
t19 = $[123];
|
|
6354
6352
|
}
|
|
6355
6353
|
let t20;
|
|
6356
|
-
if ($[
|
|
6354
|
+
if ($[124] !== autoUpdateId || $[125] !== disabled || $[126] !== existing || $[127] !== includeIdAndTitle || $[128] !== showErrors) {
|
|
6357
6355
|
t20 = includeIdAndTitle && /* @__PURE__ */ jsxRuntime.jsx(CommonPropertyFields, { showErrors, disabledId: existing, isNewProperty: !existing, disabled, autoUpdateId, ref: nameFieldRef });
|
|
6358
|
-
$[
|
|
6359
|
-
$[
|
|
6360
|
-
$[
|
|
6361
|
-
$[
|
|
6362
|
-
$[
|
|
6363
|
-
$[
|
|
6356
|
+
$[124] = autoUpdateId;
|
|
6357
|
+
$[125] = disabled;
|
|
6358
|
+
$[126] = existing;
|
|
6359
|
+
$[127] = includeIdAndTitle;
|
|
6360
|
+
$[128] = showErrors;
|
|
6361
|
+
$[129] = t20;
|
|
6364
6362
|
} else {
|
|
6365
|
-
t20 = $[
|
|
6363
|
+
t20 = $[129];
|
|
6366
6364
|
}
|
|
6367
6365
|
let t21;
|
|
6368
|
-
if ($[
|
|
6366
|
+
if ($[130] !== disabled) {
|
|
6369
6367
|
t21 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsx(AdvancedPropertyValidation, { disabled }) });
|
|
6370
|
-
$[
|
|
6371
|
-
$[
|
|
6368
|
+
$[130] = disabled;
|
|
6369
|
+
$[131] = t21;
|
|
6372
6370
|
} else {
|
|
6373
|
-
t21 = $[
|
|
6371
|
+
t21 = $[131];
|
|
6374
6372
|
}
|
|
6375
6373
|
let t22;
|
|
6376
|
-
if ($[
|
|
6374
|
+
if ($[132] !== childComponent || $[133] !== t20 || $[134] !== t21) {
|
|
6377
6375
|
t22 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-y-12 mt-8 mb-8", children: [
|
|
6378
6376
|
t20,
|
|
6379
6377
|
childComponent,
|
|
6380
6378
|
t21
|
|
6381
6379
|
] });
|
|
6382
|
-
$[
|
|
6383
|
-
$[
|
|
6384
|
-
$[
|
|
6385
|
-
$[
|
|
6380
|
+
$[132] = childComponent;
|
|
6381
|
+
$[133] = t20;
|
|
6382
|
+
$[134] = t21;
|
|
6383
|
+
$[135] = t22;
|
|
6386
6384
|
} else {
|
|
6387
|
-
t22 = $[
|
|
6385
|
+
t22 = $[135];
|
|
6388
6386
|
}
|
|
6389
6387
|
let t23;
|
|
6390
|
-
if ($[
|
|
6388
|
+
if ($[136] !== deleteDialogOpen || $[137] !== onDelete || $[138] !== propertyNamespace || $[139] !== values?.id) {
|
|
6391
6389
|
t23 = onDelete && /* @__PURE__ */ jsxRuntime.jsx(core.ConfirmationDialog, { open: deleteDialogOpen, onAccept: () => onDelete(values?.id, propertyNamespace), onCancel: () => setDeleteDialogOpen(false), title: /* @__PURE__ */ jsxRuntime.jsx("div", { children: "Delete this property?" }), body: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
6392
6390
|
" This will ",
|
|
6393
6391
|
/* @__PURE__ */ jsxRuntime.jsx("b", { children: "not delete any data" }),
|
|
6394
6392
|
", only modify the collection."
|
|
6395
6393
|
] }) });
|
|
6396
|
-
$[
|
|
6397
|
-
$[
|
|
6398
|
-
$[
|
|
6399
|
-
$[
|
|
6400
|
-
$[
|
|
6394
|
+
$[136] = deleteDialogOpen;
|
|
6395
|
+
$[137] = onDelete;
|
|
6396
|
+
$[138] = propertyNamespace;
|
|
6397
|
+
$[139] = values?.id;
|
|
6398
|
+
$[140] = t23;
|
|
6401
6399
|
} else {
|
|
6402
|
-
t23 = $[
|
|
6400
|
+
t23 = $[140];
|
|
6403
6401
|
}
|
|
6404
6402
|
let t24;
|
|
6405
|
-
if ($[
|
|
6403
|
+
if ($[141] !== t10 || $[142] !== t19 || $[143] !== t22 || $[144] !== t23) {
|
|
6406
6404
|
t24 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6407
6405
|
t10,
|
|
6408
6406
|
t19,
|
|
6409
6407
|
t22,
|
|
6410
6408
|
t23
|
|
6411
6409
|
] });
|
|
6412
|
-
$[
|
|
6413
|
-
$[
|
|
6414
|
-
$[
|
|
6415
|
-
$[
|
|
6416
|
-
$[
|
|
6410
|
+
$[141] = t10;
|
|
6411
|
+
$[142] = t19;
|
|
6412
|
+
$[143] = t22;
|
|
6413
|
+
$[144] = t23;
|
|
6414
|
+
$[145] = t24;
|
|
6417
6415
|
} else {
|
|
6418
|
-
t24 = $[
|
|
6416
|
+
t24 = $[145];
|
|
6419
6417
|
}
|
|
6420
6418
|
return t24;
|
|
6421
6419
|
}
|
|
@@ -6455,6 +6453,7 @@
|
|
|
6455
6453
|
file_upload: "File",
|
|
6456
6454
|
multi_file_upload: "File",
|
|
6457
6455
|
reference: "Reference",
|
|
6456
|
+
reference_as_string: "Text",
|
|
6458
6457
|
multi_references: "Reference",
|
|
6459
6458
|
date_time: "Date",
|
|
6460
6459
|
group: "Group",
|
|
@@ -6774,7 +6773,7 @@
|
|
|
6774
6773
|
}
|
|
6775
6774
|
let t10;
|
|
6776
6775
|
if ($[20] !== onClick || $[21] !== t9) {
|
|
6777
|
-
t10 = /* @__PURE__ */ jsxRuntime.jsx(ui.Card, { onClick, className: "flex flex-row items-center px-4 py-2", children: t9 });
|
|
6776
|
+
t10 = /* @__PURE__ */ jsxRuntime.jsx(ui.Card, { onClick, className: "flex flex-row items-center px-4 py-2 m-1", children: t9 });
|
|
6778
6777
|
$[20] = onClick;
|
|
6779
6778
|
$[21] = t9;
|
|
6780
6779
|
$[22] = t10;
|
|
@@ -10671,7 +10670,7 @@
|
|
|
10671
10670
|
return t8;
|
|
10672
10671
|
}
|
|
10673
10672
|
function useCollectionEditorPlugin(t0) {
|
|
10674
|
-
const $ = reactCompilerRuntime.c(
|
|
10673
|
+
const $ = reactCompilerRuntime.c(21);
|
|
10675
10674
|
const {
|
|
10676
10675
|
collectionConfigController,
|
|
10677
10676
|
configPermissions,
|
|
@@ -10727,32 +10726,37 @@
|
|
|
10727
10726
|
t4 = $[11];
|
|
10728
10727
|
}
|
|
10729
10728
|
let t5;
|
|
10730
|
-
if ($[12] !== t4) {
|
|
10729
|
+
if ($[12] !== collectionConfigController.navigationEntries || $[13] !== collectionConfigController.saveNavigationEntries || $[14] !== t4) {
|
|
10731
10730
|
t5 = {
|
|
10732
10731
|
additionalActions: t3,
|
|
10733
10732
|
additionalChildrenStart: t4,
|
|
10734
10733
|
CollectionActions: HomePageEditorCollectionAction,
|
|
10735
|
-
AdditionalCards: NewCollectionCard
|
|
10734
|
+
AdditionalCards: NewCollectionCard,
|
|
10735
|
+
allowDragAndDrop: true,
|
|
10736
|
+
navigationEntries: collectionConfigController.navigationEntries,
|
|
10737
|
+
onNavigationEntriesUpdate: collectionConfigController.saveNavigationEntries
|
|
10736
10738
|
};
|
|
10737
|
-
$[12] =
|
|
10738
|
-
$[13] =
|
|
10739
|
+
$[12] = collectionConfigController.navigationEntries;
|
|
10740
|
+
$[13] = collectionConfigController.saveNavigationEntries;
|
|
10741
|
+
$[14] = t4;
|
|
10742
|
+
$[15] = t5;
|
|
10739
10743
|
} else {
|
|
10740
|
-
t5 = $[
|
|
10744
|
+
t5 = $[15];
|
|
10741
10745
|
}
|
|
10742
10746
|
let t6;
|
|
10743
|
-
if ($[
|
|
10747
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10744
10748
|
t6 = {
|
|
10745
10749
|
CollectionActionsStart: EditorCollectionActionStart,
|
|
10746
10750
|
CollectionActions: EditorCollectionAction,
|
|
10747
10751
|
HeaderAction: CollectionViewHeaderAction,
|
|
10748
10752
|
AddColumnComponent: PropertyAddColumnComponent
|
|
10749
10753
|
};
|
|
10750
|
-
$[
|
|
10754
|
+
$[16] = t6;
|
|
10751
10755
|
} else {
|
|
10752
|
-
t6 = $[
|
|
10756
|
+
t6 = $[16];
|
|
10753
10757
|
}
|
|
10754
10758
|
let t7;
|
|
10755
|
-
if ($[
|
|
10759
|
+
if ($[17] !== collectionConfigController.loading || $[18] !== t2 || $[19] !== t5) {
|
|
10756
10760
|
t7 = {
|
|
10757
10761
|
key: "collection_editor",
|
|
10758
10762
|
loading: collectionConfigController.loading,
|
|
@@ -10760,12 +10764,12 @@
|
|
|
10760
10764
|
homePage: t5,
|
|
10761
10765
|
collectionView: t6
|
|
10762
10766
|
};
|
|
10763
|
-
$[
|
|
10764
|
-
$[
|
|
10765
|
-
$[
|
|
10766
|
-
$[
|
|
10767
|
+
$[17] = collectionConfigController.loading;
|
|
10768
|
+
$[18] = t2;
|
|
10769
|
+
$[19] = t5;
|
|
10770
|
+
$[20] = t7;
|
|
10767
10771
|
} else {
|
|
10768
|
-
t7 = $[
|
|
10772
|
+
t7 = $[20];
|
|
10769
10773
|
}
|
|
10770
10774
|
return t7;
|
|
10771
10775
|
}
|