@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.umd.js CHANGED
@@ -169,7 +169,7 @@
169
169
  return t18;
170
170
  }
171
171
  function CollectionDetailsForm(t0) {
172
- const $ = reactCompilerRuntime.c(196);
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
- const groupOptions = groups?.filter((group) => !reservedGroups?.includes(group));
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
- const {
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 = "overflow-auto my-auto";
289
- const T0 = ui.Container;
290
- const t8 = "4xl";
291
- const t9 = "flex flex-col gap-4 p-8 m-auto";
292
- const t10 = !isNewCollection ? "h5" : "h4";
293
- const t11 = isNewCollection ? "New collection" : `${values?.name} collection`;
294
- let t12;
295
- if ($[12] !== t10 || $[13] !== t11) {
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
- t12 = $[14];
293
+ t9 = $[14];
302
294
  }
303
- let t13;
295
+ let t10;
304
296
  if ($[15] !== updateDatabaseId || $[16] !== values.databaseId) {
305
- t13 = /* @__PURE__ */ jsxRuntime.jsx(DefaultDatabaseField, { databaseId: values.databaseId, onDatabaseIdUpdate: updateDatabaseId });
297
+ t10 = /* @__PURE__ */ jsxRuntime.jsx(DefaultDatabaseField, { databaseId: values.databaseId, onDatabaseIdUpdate: updateDatabaseId });
306
298
  $[15] = updateDatabaseId;
307
299
  $[16] = values.databaseId;
308
- $[17] = t13;
300
+ $[17] = t10;
309
301
  } else {
310
- t13 = $[17];
302
+ t10 = $[17];
311
303
  }
312
- let t14;
304
+ let t11;
313
305
  if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
314
- t14 = () => setIconDialogOpen(true);
315
- $[18] = t14;
306
+ t11 = () => setIconDialogOpen(true);
307
+ $[18] = t11;
316
308
  } else {
317
- t14 = $[18];
309
+ t11 = $[18];
318
310
  }
319
- let t15;
311
+ let t12;
320
312
  if ($[19] !== collectionIcon) {
321
- t15 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Change icon", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { shape: "square", onClick: t14, children: collectionIcon }) });
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] = t15;
315
+ $[20] = t12;
324
316
  } else {
325
- t15 = $[20];
317
+ t12 = $[20];
326
318
  }
327
- let t16;
328
- if ($[21] !== t12 || $[22] !== t13 || $[23] !== t15) {
329
- t16 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row gap-2 py-2 pt-3 items-center", children: [
330
- t12,
331
- t13,
332
- t15
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] = t12;
335
- $[22] = t13;
336
- $[23] = t15;
337
- $[24] = t16;
326
+ $[21] = t10;
327
+ $[22] = t12;
328
+ $[23] = t9;
329
+ $[24] = t13;
338
330
  } else {
339
- t16 = $[24];
331
+ t13 = $[24];
340
332
  }
341
- let t17;
333
+ let t14;
342
334
  if ($[25] !== parentCollection) {
343
- t17 = parentCollection && /* @__PURE__ */ jsxRuntime.jsx(ui.Chip, { colorScheme: "tealDarker", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "caption", children: [
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] = t17;
340
+ $[26] = t14;
349
341
  } else {
350
- t17 = $[26];
342
+ t14 = $[26];
351
343
  }
352
- let t18;
353
- if ($[27] !== t16 || $[28] !== t17) {
354
- t18 = /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
355
- t16,
356
- t17
344
+ let t15;
345
+ if ($[27] !== t13 || $[28] !== t14) {
346
+ t15 = /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
347
+ t13,
348
+ t14
357
349
  ] });
358
- $[27] = t16;
359
- $[28] = t17;
360
- $[29] = t18;
350
+ $[27] = t13;
351
+ $[28] = t14;
352
+ $[29] = t15;
361
353
  } else {
362
- t18 = $[29];
354
+ t15 = $[29];
363
355
  }
364
- const t19 = "grid grid-cols-12 gap-4";
365
- const t20 = values.name ?? "";
366
- let t21;
356
+ const t16 = values.name ?? "";
357
+ let t17;
367
358
  if ($[30] !== updateName) {
368
- t21 = (e) => updateName(e.target.value);
359
+ t17 = (e) => updateName(e.target.value);
369
360
  $[30] = updateName;
370
- $[31] = t21;
361
+ $[31] = t17;
371
362
  } else {
372
- t21 = $[31];
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 ($[32] !== t20 || $[33] !== t21 || $[34] !== t22) {
377
- t23 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { value: t20, onChange: t21, label: "Name", autoFocus: true, required: true, error: t22 });
378
- $[32] = t20;
379
- $[33] = t21;
380
- $[34] = t22;
381
- $[35] = t23;
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 = $[35];
397
+ t23 = $[41];
384
398
  }
385
- const t24 = touched.name && Boolean(errors.name);
386
- const t25 = touched.name && Boolean(errors.name) ? errors.name : "Name of this collection, usually a plural name (e.g. Products)";
387
- let t26;
388
- if ($[36] !== t24 || $[37] !== t25) {
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
- t26 = $[38];
404
+ t24 = $[42];
395
405
  }
406
+ const t25 = !isNewCollection;
407
+ const t26 = showErrors && Boolean(errors.path);
396
408
  let t27;
397
- if ($[39] !== t23 || $[40] !== t26) {
398
- t27 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
399
- t23,
400
- t26
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 = $[41];
415
+ t27 = $[45];
407
416
  }
408
- const t28 = isSubcollection ? "" : "sm:col-span-8";
409
- let t29;
410
- if ($[42] !== t28) {
411
- t29 = ui.cls("col-span-12 ", t28);
412
- $[42] = t28;
413
- $[43] = t29;
414
- } else {
415
- t29 = $[43];
416
- }
417
- const t30 = !isNewCollection;
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 t36;
440
- if ($[50] !== t29 || $[51] !== t32 || $[52] !== t35) {
441
- t36 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t29, children: [
442
- t32,
443
- t35
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
- $[50] = t29;
446
- $[51] = t32;
447
- $[52] = t35;
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
- t39 = $[55];
438
+ t31 = $[51];
468
439
  }
469
- let t40;
470
- if ($[56] !== t38 || $[57] !== t39) {
471
- t40 = /* @__PURE__ */ jsxRuntime.jsx(LayoutModeSwitch, { className: "col-span-12", value: t38, onChange: t39 });
472
- $[56] = t38;
473
- $[57] = t39;
474
- $[58] = t40;
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
- t40 = $[58];
447
+ t33 = $[53];
477
448
  }
478
- const t41 = 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";
479
- let t42;
480
- if ($[59] !== setFieldValue) {
481
- t42 = (v) => setFieldValue("history", v);
482
- $[59] = setFieldValue;
483
- $[60] = t42;
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
- t42 = $[60];
456
+ t34 = $[56];
486
457
  }
487
- const t43 = values.history === void 0 ? null : values.history;
488
- let t44;
489
- if ($[61] !== t41 || $[62] !== t42 || $[63] !== t43) {
490
- t44 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", allowIndeterminate: true, label: t41, onValueChange: t42, value: t43 });
491
- $[61] = t41;
492
- $[62] = t42;
493
- $[63] = t43;
494
- $[64] = t44;
495
- } else {
496
- t44 = $[64];
497
- }
498
- let t45;
499
- if ($[65] === Symbol.for("react.memo_cache_sentinel")) {
500
- t45 = /* @__PURE__ */ jsxRuntime.jsxs(core.FieldCaption, { children: [
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
- $[65] = t45;
485
+ $[63] = t39;
506
486
  } else {
507
- t45 = $[65];
487
+ t39 = $[63];
508
488
  }
509
- let t46;
510
- if ($[66] !== t44) {
511
- t46 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
512
- t44,
513
- t45
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
- $[66] = t44;
516
- $[67] = t46;
495
+ $[64] = t38;
496
+ $[65] = t40;
517
497
  } else {
518
- t46 = $[67];
498
+ t40 = $[65];
519
499
  }
520
- let t47;
521
- if ($[68] === Symbol.for("react.memo_cache_sentinel")) {
522
- t47 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row text-surface-500", children: [
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
- $[68] = t47;
506
+ $[66] = t41;
527
507
  } else {
528
- t47 = $[68];
508
+ t41 = $[66];
529
509
  }
530
- const t48 = !isNewCollection;
531
- const t49 = showErrors && Boolean(errors.id);
532
- let t50;
533
- if ($[69] !== t48 || $[70] !== t49) {
534
- t50 = /* @__PURE__ */ jsxRuntime.jsx(formex.Field, { name: "id", as: ui.DebouncedTextField, disabled: t48, label: "Collection id", error: t49 });
535
- $[69] = t48;
536
- $[70] = t49;
537
- $[71] = t50;
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
- t54 = $[77];
519
+ t44 = $[69];
563
520
  }
564
- const t55 = showErrors && Boolean(errors.singularName);
565
- let t56;
566
- if ($[78] !== handleChange || $[79] !== setFieldTouched) {
567
- t56 = (e_0) => {
568
- setFieldTouched("singularName", true);
569
- return handleChange(e_0);
570
- };
571
- $[78] = handleChange;
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
- t56 = $[80];
530
+ t47 = $[72];
576
531
  }
577
- const t57 = values.singularName ?? "";
578
- let t58;
579
- if ($[81] !== t55 || $[82] !== t56 || $[83] !== t57) {
580
- t58 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t55, name: "singularName", "aria-describedby": "singularName-helper", onChange: t56, value: t57, label: "Singular name" });
581
- $[81] = t55;
582
- $[82] = t56;
583
- $[83] = t57;
584
- $[84] = t58;
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
- t58 = $[84];
542
+ t48 = $[75];
587
543
  }
588
- const t59 = showErrors && Boolean(errors.singularName);
589
- const t60 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define a singular name for your entities";
590
- let t61;
591
- if ($[85] !== t59 || $[86] !== t60) {
592
- t61 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t59, children: t60 });
593
- $[85] = t59;
594
- $[86] = t60;
595
- $[87] = t61;
596
- } else {
597
- t61 = $[87];
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 t62;
600
- if ($[88] !== t58 || $[89] !== t61) {
601
- t62 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
602
- t58,
603
- t61
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
- $[88] = t58;
606
- $[89] = t61;
607
- $[90] = t62;
585
+ $[86] = t52;
586
+ $[87] = t55;
587
+ $[88] = t56;
608
588
  } else {
609
- t62 = $[90];
589
+ t56 = $[88];
610
590
  }
611
- const t63 = showErrors && Boolean(errors.sideDialogWidth);
612
- let t64;
613
- if ($[91] !== setFieldTouched || $[92] !== setFieldValue) {
614
- t64 = (e_1) => {
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
- $[91] = setFieldTouched;
626
- $[92] = setFieldValue;
627
- $[93] = t64;
605
+ $[89] = setFieldTouched;
606
+ $[90] = setFieldValue;
607
+ $[91] = t58;
628
608
  } else {
629
- t64 = $[93];
609
+ t58 = $[91];
630
610
  }
631
- let t65;
632
- if ($[94] !== setFieldValue) {
633
- t65 = () => {
611
+ let t59;
612
+ if ($[92] !== setFieldValue) {
613
+ t59 = () => {
634
614
  setFieldValue("sideDialogWidth", null);
635
615
  };
636
- $[94] = setFieldValue;
637
- $[95] = t65;
616
+ $[92] = setFieldValue;
617
+ $[93] = t59;
638
618
  } else {
639
- t65 = $[95];
619
+ t59 = $[93];
640
620
  }
641
- const t66 = !values.sideDialogWidth;
642
- let t67;
643
- if ($[96] === Symbol.for("react.memo_cache_sentinel")) {
644
- t67 = /* @__PURE__ */ jsxRuntime.jsx(ui.CloseIcon, { size: "small" });
645
- $[96] = t67;
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
- t67 = $[96];
627
+ t61 = $[94];
648
628
  }
649
- let t68;
650
- if ($[97] !== t65 || $[98] !== t66) {
651
- t68 = /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { size: "small", onClick: t65, disabled: t66, children: t67 });
652
- $[97] = t65;
653
- $[98] = t66;
654
- $[99] = t68;
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
- t74 = $[110];
636
+ t62 = $[97];
692
637
  }
693
- const t75 = showErrors && Boolean(errors.description);
694
- const t76 = values.description ?? "";
695
- let t77;
696
- if ($[111] !== handleChange || $[112] !== t75 || $[113] !== t76) {
697
- t77 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t75, name: "description", value: t76, onChange: handleChange, multiline: true, minRows: 2, "aria-describedby": "description-helper-text", label: "Description" });
698
- $[111] = handleChange;
699
- $[112] = t75;
700
- $[113] = t76;
701
- $[114] = t77;
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
- t77 = $[114];
659
+ t67 = $[105];
704
660
  }
705
- const t78 = showErrors && Boolean(errors.description);
706
- const t79 = showErrors && Boolean(errors.description) ? errors.description : "Description of the collection, you can use markdown";
707
- let t80;
708
- if ($[115] !== t78 || $[116] !== t79) {
709
- t80 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t78, children: t79 });
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
- $[118] = t77;
723
- $[119] = t80;
724
- $[120] = t81;
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
- t81 = $[120];
706
+ t75 = $[118];
727
707
  }
728
- const t82 = values.defaultSize ?? "";
729
- let t83;
730
- if ($[121] === Symbol.for("react.memo_cache_sentinel")) {
731
- t83 = ["xs", "s", "m", "l", "xl"].map(_temp2$7);
732
- $[121] = t83;
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
- t83 = $[121];
714
+ t77 = $[119];
735
715
  }
736
- let t84;
737
- if ($[122] !== handleChange || $[123] !== t82) {
738
- t84 = /* @__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: t82, renderValue: _temp$b, children: t83 }) });
739
- $[122] = handleChange;
740
- $[123] = t82;
741
- $[124] = t84;
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
- t84 = $[124];
723
+ t78 = $[122];
744
724
  }
745
- const t85 = values.includeJsonView === void 0 || values.includeJsonView ? "Include JSON view" : "Do not include JSON view";
746
- let t86;
747
- if ($[125] !== setFieldValue) {
748
- t86 = (v_0) => setFieldValue("includeJsonView", v_0);
749
- $[125] = setFieldValue;
750
- $[126] = t86;
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
- t86 = $[126];
732
+ t80 = $[124];
753
733
  }
754
- const t87 = values.includeJsonView === void 0 ? true : values.includeJsonView;
755
- let t88;
756
- if ($[127] !== t85 || $[128] !== t86 || $[129] !== t87) {
757
- t88 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: t85, onValueChange: t86, value: t87 });
758
- $[127] = t85;
759
- $[128] = t86;
760
- $[129] = t87;
761
- $[130] = t88;
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
- t88 = $[130];
743
+ t82 = $[128];
764
744
  }
765
- let t89;
766
- if ($[131] === Symbol.for("react.memo_cache_sentinel")) {
767
- t89 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { children: "Include the JSON representation of the document." });
768
- $[131] = t89;
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
- t89 = $[131];
750
+ t83 = $[129];
771
751
  }
772
- let t90;
773
- if ($[132] !== t88) {
774
- t90 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
775
- t88,
776
- t89
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
- $[132] = t88;
779
- $[133] = t90;
758
+ $[130] = t82;
759
+ $[131] = t84;
780
760
  } else {
781
- t90 = $[133];
761
+ t84 = $[131];
782
762
  }
783
- const t91 = customIdValue === "code_defined";
784
- let t92;
785
- if ($[134] !== setFieldValue) {
786
- t92 = (v_1) => {
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
- $[134] = setFieldValue;
793
- $[135] = t92;
772
+ $[132] = setFieldValue;
773
+ $[133] = t86;
794
774
  } else {
795
- t92 = $[135];
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
- let t97;
814
- if ($[139] !== t91 || $[140] !== t92 || $[141] !== t93) {
815
- t97 = /* @__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: t91, onValueChange: t92, value: t93, renderValue: _temp3$4, children: [
816
- t94,
817
- t95,
818
- t96
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
- $[139] = t91;
821
- $[140] = t92;
822
- $[141] = t93;
823
- $[142] = t97;
800
+ $[137] = t85;
801
+ $[138] = t86;
802
+ $[139] = t87;
803
+ $[140] = t91;
824
804
  } else {
825
- t97 = $[142];
805
+ t91 = $[140];
826
806
  }
827
- let t98;
828
- if ($[143] !== setFieldValue) {
829
- t98 = (v_2) => setFieldValue("collectionGroup", v_2);
830
- $[143] = setFieldValue;
831
- $[144] = t98;
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
- t98 = $[144];
813
+ t92 = $[142];
834
814
  }
835
- const t99 = values.collectionGroup ?? false;
836
- let t100;
837
- if ($[145] !== t98 || $[146] !== t99) {
838
- t100 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: "Collection group", onValueChange: t98, value: t99 });
839
- $[145] = t98;
840
- $[146] = t99;
841
- $[147] = t100;
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
- t100 = $[147];
823
+ t94 = $[145];
844
824
  }
845
- let t101;
846
- if ($[148] === Symbol.for("react.memo_cache_sentinel")) {
847
- t101 = /* @__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." });
848
- $[148] = t101;
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
- t101 = $[148];
830
+ t95 = $[146];
851
831
  }
852
- let t102;
853
- if ($[149] !== t100) {
854
- t102 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-4", children: [
855
- t100,
856
- t101
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
- $[149] = t100;
859
- $[150] = t102;
838
+ $[147] = t94;
839
+ $[148] = t96;
860
840
  } else {
861
- t102 = $[150];
841
+ t96 = $[148];
862
842
  }
863
- let t103;
864
- if ($[151] !== setFieldValue) {
865
- t103 = (v_3) => setFieldValue("textSearchEnabled", v_3);
866
- $[151] = setFieldValue;
867
- $[152] = t103;
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
- t103 = $[152];
849
+ t97 = $[150];
870
850
  }
871
- const t104 = values.textSearchEnabled ?? false;
872
- let t105;
873
- if ($[153] !== t103 || $[154] !== t104) {
874
- t105 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: "Enable text search for this collection", onValueChange: t103, value: t104 });
875
- $[153] = t103;
876
- $[154] = t104;
877
- $[155] = t105;
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
- t105 = $[155];
859
+ t99 = $[153];
880
860
  }
881
- let t106;
882
- if ($[156] === Symbol.for("react.memo_cache_sentinel")) {
883
- t106 = /* @__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." });
884
- $[156] = t106;
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
- t106 = $[156];
866
+ t100 = $[154];
887
867
  }
888
- let t107;
889
- if ($[157] !== t105) {
890
- t107 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
891
- t105,
892
- t106
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
- $[157] = t105;
895
- $[158] = t107;
874
+ $[155] = t99;
875
+ $[156] = t101;
896
876
  } else {
897
- t107 = $[158];
877
+ t101 = $[156];
898
878
  }
899
- let t108;
900
- if ($[159] !== t102 || $[160] !== t107 || $[161] !== t54 || $[162] !== t62 || $[163] !== t74 || $[164] !== t81 || $[165] !== t84 || $[166] !== t90 || $[167] !== t97) {
901
- t108 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-4 p-4", children: [
902
- t54,
903
- t62,
904
- t74,
905
- t81,
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
- t90,
908
- t97,
909
- t102,
910
- t107
888
+ t91,
889
+ t96,
890
+ t101
911
891
  ] });
912
- $[159] = t102;
913
- $[160] = t107;
914
- $[161] = t54;
915
- $[162] = t62;
916
- $[163] = t74;
917
- $[164] = t81;
918
- $[165] = t84;
919
- $[166] = t90;
920
- $[167] = t97;
921
- $[168] = t108;
922
- } else {
923
- t108 = $[168];
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 t110;
935
- if ($[172] !== children || $[173] !== t109) {
936
- t110 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-8", children: [
937
- t109,
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
- $[172] = children;
941
- $[173] = t109;
942
- $[174] = t110;
920
+ $[170] = children;
921
+ $[171] = t103;
922
+ $[172] = t104;
943
923
  } else {
944
- t110 = $[174];
924
+ t104 = $[172];
945
925
  }
946
- let t111;
947
- if ($[175] !== t110 || $[176] !== t27 || $[177] !== t36 || $[178] !== t37 || $[179] !== t40 || $[180] !== t46) {
948
- t111 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t19, children: [
949
- t27,
950
- t36,
951
- t37,
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
- t46,
954
- t110
933
+ t104
955
934
  ] });
956
- $[175] = t110;
957
- $[176] = t27;
958
- $[177] = t36;
959
- $[178] = t37;
960
- $[179] = t40;
961
- $[180] = t46;
962
- $[181] = t111;
963
- } else {
964
- t111 = $[181];
965
- }
966
- let t112;
967
- if ($[182] === Symbol.for("react.memo_cache_sentinel")) {
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
- $[182] = t112;
949
+ $[179] = t106;
972
950
  } else {
973
- t112 = $[182];
951
+ t106 = $[179];
974
952
  }
975
- let t113;
976
- if ($[183] !== setFieldValue) {
977
- t113 = (icon) => {
953
+ let t107;
954
+ if ($[180] !== setFieldValue) {
955
+ t107 = (icon) => {
978
956
  setIconDialogOpen(false);
979
957
  setFieldValue("icon", icon);
980
958
  };
981
- $[183] = setFieldValue;
982
- $[184] = t113;
959
+ $[180] = setFieldValue;
960
+ $[181] = t107;
983
961
  } else {
984
- t113 = $[184];
962
+ t107 = $[181];
985
963
  }
986
- let t114;
987
- if ($[185] !== t113 || $[186] !== values.icon) {
988
- t114 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsxRuntime.jsx(core.SearchIconsView, { selectedIcon: values.icon, onIconSelected: t113 }) });
989
- $[185] = t113;
990
- $[186] = values.icon;
991
- $[187] = t114;
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
- t114 = $[187];
971
+ t108 = $[184];
994
972
  }
995
- let t115;
996
- if ($[188] !== iconDialogOpen || $[189] !== t114) {
997
- t115 = /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t114 });
998
- $[188] = iconDialogOpen;
999
- $[189] = t114;
1000
- $[190] = t115;
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
- t115 = $[190];
980
+ t109 = $[187];
1003
981
  }
1004
- let t116;
1005
- if ($[191] !== T0 || $[192] !== t111 || $[193] !== t115 || $[194] !== t18) {
1006
- t116 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t7, children: /* @__PURE__ */ jsxRuntime.jsxs(T0, { maxWidth: t8, className: t9, children: [
1007
- t18,
1008
- t111,
1009
- t112,
1010
- t115
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
- $[191] = T0;
1013
- $[192] = t111;
1014
- $[193] = t115;
1015
- $[194] = t18;
1016
- $[195] = t116;
990
+ $[188] = t105;
991
+ $[189] = t109;
992
+ $[190] = t15;
993
+ $[191] = t110;
1017
994
  } else {
1018
- t116 = $[195];
995
+ t110 = $[191];
1019
996
  }
1020
- return t116;
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(142);
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 === "date_time") {
6173
+ if (selectedFieldConfigId === "reference_as_string") {
6190
6174
  let t102;
6191
- if ($[75] !== disabled) {
6192
- t102 = /* @__PURE__ */ jsxRuntime.jsx(DateTimePropertyField, { disabled });
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] = t102;
6178
+ $[76] = existing;
6179
+ $[77] = showErrors;
6180
+ $[78] = t102;
6195
6181
  } else {
6196
- t102 = $[76];
6182
+ t102 = $[78];
6197
6183
  }
6198
6184
  childComponent = t102;
6199
6185
  } else {
6200
- if (selectedFieldConfigId === "multi_references") {
6186
+ if (selectedFieldConfigId === "date_time") {
6201
6187
  let t102;
6202
- if ($[77] !== disabled || $[78] !== existing || $[79] !== showErrors) {
6203
- t102 = /* @__PURE__ */ jsxRuntime.jsx(ReferencePropertyField, { showErrors, existing, multiple: true, disabled });
6204
- $[77] = disabled;
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 === "repeat") {
6197
+ if (selectedFieldConfigId === "multi_references") {
6214
6198
  let t102;
6215
- if ($[81] !== allowDataInference || $[82] !== collectionEditable || $[83] !== disabled || $[84] !== existing || $[85] !== getData || $[86] !== propertyConfigs || $[87] !== showErrors) {
6216
- t102 = /* @__PURE__ */ jsxRuntime.jsx(RepeatPropertyField, { showErrors, existing, getData, allowDataInference, disabled, collectionEditable, propertyConfigs });
6217
- $[81] = allowDataInference;
6218
- $[82] = collectionEditable;
6219
- $[83] = disabled;
6220
- $[84] = existing;
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 = $[88];
6206
+ t102 = $[84];
6227
6207
  }
6228
6208
  childComponent = t102;
6229
6209
  } else {
6230
- if (selectedFieldConfigId === "key_value") {
6210
+ if (selectedFieldConfigId === "repeat") {
6231
6211
  let t102;
6232
- if ($[89] !== disabled) {
6233
- t102 = /* @__PURE__ */ jsxRuntime.jsx(KeyValuePropertyField, { disabled });
6234
- $[89] = disabled;
6235
- $[90] = t102;
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 = $[90];
6223
+ t102 = $[92];
6238
6224
  }
6239
6225
  childComponent = t102;
6240
6226
  } else {
6241
- childComponent = null;
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 ($[91] !== disabled) {
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
- $[91] = disabled;
6269
- $[92] = t10;
6266
+ $[95] = disabled;
6267
+ $[96] = t10;
6270
6268
  } else {
6271
- t10 = $[92];
6269
+ t10 = $[96];
6272
6270
  }
6273
6271
  const t11 = selectedFieldConfigId;
6274
6272
  let t12;
6275
- if ($[93] !== onWidgetSelectChanged) {
6273
+ if ($[97] !== onWidgetSelectChanged) {
6276
6274
  t12 = (value) => onWidgetSelectChanged(value);
6277
- $[93] = onWidgetSelectChanged;
6278
- $[94] = t12;
6275
+ $[97] = onWidgetSelectChanged;
6276
+ $[98] = t12;
6279
6277
  } else {
6280
- t12 = $[94];
6278
+ t12 = $[98];
6281
6279
  }
6282
6280
  let t13;
6283
- if ($[95] !== onDismiss) {
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
- $[95] = onDismiss;
6291
- $[96] = t13;
6288
+ $[99] = onDismiss;
6289
+ $[100] = t13;
6292
6290
  } else {
6293
- t13 = $[96];
6291
+ t13 = $[100];
6294
6292
  }
6295
6293
  const t14 = Boolean(selectedWidgetError);
6296
6294
  let t15;
6297
- if ($[97] !== disabled || $[98] !== existing || $[99] !== inArray || $[100] !== propertyConfigs || $[101] !== selectOpen || $[102] !== t11 || $[103] !== t12 || $[104] !== t13 || $[105] !== t14 || $[106] !== values) {
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
- $[97] = disabled;
6300
- $[98] = existing;
6301
- $[99] = inArray;
6302
- $[100] = propertyConfigs;
6303
- $[101] = selectOpen;
6304
- $[102] = t11;
6305
- $[103] = t12;
6306
- $[104] = t13;
6307
- $[105] = t14;
6308
- $[106] = values;
6309
- $[107] = t15;
6310
- } else {
6311
- t15 = $[107];
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 ($[108] !== selectedWidgetError) {
6312
+ if ($[112] !== selectedWidgetError) {
6315
6313
  t16 = selectedWidgetError && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "ml-3.5", color: "error", children: "Required" });
6316
- $[108] = selectedWidgetError;
6317
- $[109] = t16;
6314
+ $[112] = selectedWidgetError;
6315
+ $[113] = t16;
6318
6316
  } else {
6319
- t16 = $[109];
6317
+ t16 = $[113];
6320
6318
  }
6321
6319
  let t17;
6322
- if ($[110] !== t15 || $[111] !== t16) {
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
- $[110] = t15;
6328
- $[111] = t16;
6329
- $[112] = t17;
6325
+ $[114] = t15;
6326
+ $[115] = t16;
6327
+ $[116] = t17;
6330
6328
  } else {
6331
- t17 = $[112];
6329
+ t17 = $[116];
6332
6330
  }
6333
6331
  let t18;
6334
- if ($[113] !== disabled || $[114] !== onDelete || $[115] !== values?.id) {
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
- $[113] = disabled;
6337
- $[114] = onDelete;
6338
- $[115] = values?.id;
6339
- $[116] = t18;
6334
+ $[117] = disabled;
6335
+ $[118] = onDelete;
6336
+ $[119] = values?.id;
6337
+ $[120] = t18;
6340
6338
  } else {
6341
- t18 = $[116];
6339
+ t18 = $[120];
6342
6340
  }
6343
6341
  let t19;
6344
- if ($[117] !== t17 || $[118] !== t18) {
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
- $[117] = t17;
6350
- $[118] = t18;
6351
- $[119] = t19;
6347
+ $[121] = t17;
6348
+ $[122] = t18;
6349
+ $[123] = t19;
6352
6350
  } else {
6353
- t19 = $[119];
6351
+ t19 = $[123];
6354
6352
  }
6355
6353
  let t20;
6356
- if ($[120] !== autoUpdateId || $[121] !== disabled || $[122] !== existing || $[123] !== includeIdAndTitle || $[124] !== showErrors) {
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
- $[120] = autoUpdateId;
6359
- $[121] = disabled;
6360
- $[122] = existing;
6361
- $[123] = includeIdAndTitle;
6362
- $[124] = showErrors;
6363
- $[125] = t20;
6356
+ $[124] = autoUpdateId;
6357
+ $[125] = disabled;
6358
+ $[126] = existing;
6359
+ $[127] = includeIdAndTitle;
6360
+ $[128] = showErrors;
6361
+ $[129] = t20;
6364
6362
  } else {
6365
- t20 = $[125];
6363
+ t20 = $[129];
6366
6364
  }
6367
6365
  let t21;
6368
- if ($[126] !== disabled) {
6366
+ if ($[130] !== disabled) {
6369
6367
  t21 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsx(AdvancedPropertyValidation, { disabled }) });
6370
- $[126] = disabled;
6371
- $[127] = t21;
6368
+ $[130] = disabled;
6369
+ $[131] = t21;
6372
6370
  } else {
6373
- t21 = $[127];
6371
+ t21 = $[131];
6374
6372
  }
6375
6373
  let t22;
6376
- if ($[128] !== childComponent || $[129] !== t20 || $[130] !== t21) {
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
- $[128] = childComponent;
6383
- $[129] = t20;
6384
- $[130] = t21;
6385
- $[131] = t22;
6380
+ $[132] = childComponent;
6381
+ $[133] = t20;
6382
+ $[134] = t21;
6383
+ $[135] = t22;
6386
6384
  } else {
6387
- t22 = $[131];
6385
+ t22 = $[135];
6388
6386
  }
6389
6387
  let t23;
6390
- if ($[132] !== deleteDialogOpen || $[133] !== onDelete || $[134] !== propertyNamespace || $[135] !== values?.id) {
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
- $[132] = deleteDialogOpen;
6397
- $[133] = onDelete;
6398
- $[134] = propertyNamespace;
6399
- $[135] = values?.id;
6400
- $[136] = t23;
6394
+ $[136] = deleteDialogOpen;
6395
+ $[137] = onDelete;
6396
+ $[138] = propertyNamespace;
6397
+ $[139] = values?.id;
6398
+ $[140] = t23;
6401
6399
  } else {
6402
- t23 = $[136];
6400
+ t23 = $[140];
6403
6401
  }
6404
6402
  let t24;
6405
- if ($[137] !== t10 || $[138] !== t19 || $[139] !== t22 || $[140] !== t23) {
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
- $[137] = t10;
6413
- $[138] = t19;
6414
- $[139] = t22;
6415
- $[140] = t23;
6416
- $[141] = t24;
6410
+ $[141] = t10;
6411
+ $[142] = t19;
6412
+ $[143] = t22;
6413
+ $[144] = t23;
6414
+ $[145] = t24;
6417
6415
  } else {
6418
- t24 = $[141];
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(19);
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] = t4;
10738
- $[13] = t5;
10739
+ $[12] = collectionConfigController.navigationEntries;
10740
+ $[13] = collectionConfigController.saveNavigationEntries;
10741
+ $[14] = t4;
10742
+ $[15] = t5;
10739
10743
  } else {
10740
- t5 = $[13];
10744
+ t5 = $[15];
10741
10745
  }
10742
10746
  let t6;
10743
- if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
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
- $[14] = t6;
10754
+ $[16] = t6;
10751
10755
  } else {
10752
- t6 = $[14];
10756
+ t6 = $[16];
10753
10757
  }
10754
10758
  let t7;
10755
- if ($[15] !== collectionConfigController.loading || $[16] !== t2 || $[17] !== t5) {
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
- $[15] = collectionConfigController.loading;
10764
- $[16] = t2;
10765
- $[17] = t5;
10766
- $[18] = t7;
10767
+ $[17] = collectionConfigController.loading;
10768
+ $[18] = t2;
10769
+ $[19] = t5;
10770
+ $[20] = t7;
10767
10771
  } else {
10768
- t7 = $[18];
10772
+ t7 = $[20];
10769
10773
  }
10770
10774
  return t7;
10771
10775
  }