@firecms/collection_editor 3.0.0-canary.183 → 3.0.0-canary.186
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/ConfigControllerProvider.d.ts +0 -9
- package/dist/index.es.js +391 -399
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +391 -399
- package/dist/index.umd.js.map +1 -1
- package/dist/types/collection_editor_controller.d.ts +0 -10
- package/dist/useCollectionEditorPlugin.d.ts +1 -10
- package/package.json +8 -8
- package/src/ConfigControllerProvider.tsx +0 -9
- package/src/types/collection_editor_controller.tsx +0 -7
- package/src/ui/collection_editor/CollectionDetailsForm.tsx +2 -4
- package/src/useCollectionEditorPlugin.tsx +0 -9
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(176);
|
|
173
173
|
const {
|
|
174
174
|
isNewCollection,
|
|
175
175
|
reservedGroups,
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
isSubmitting,
|
|
189
189
|
submitCount
|
|
190
190
|
} = formex.useFormex();
|
|
191
|
-
|
|
191
|
+
useCollectionEditorController();
|
|
192
192
|
const [iconDialogOpen, setIconDialogOpen] = React.useState(false);
|
|
193
193
|
const [advancedPanelExpanded, setAdvancedPanelExpanded] = React.useState(false);
|
|
194
194
|
let t1;
|
|
@@ -244,7 +244,6 @@
|
|
|
244
244
|
t4 = $[8];
|
|
245
245
|
}
|
|
246
246
|
React.useEffect(t3, t4);
|
|
247
|
-
const DatabaseField = collectionEditor.components?.DatabaseField ?? DefaultDatabaseField;
|
|
248
247
|
let t5;
|
|
249
248
|
if ($[9] !== values) {
|
|
250
249
|
t5 = /* @__PURE__ */ jsxRuntime.jsx(core.IconForView, { collectionOrView: values });
|
|
@@ -302,154 +301,153 @@
|
|
|
302
301
|
t12 = $[14];
|
|
303
302
|
}
|
|
304
303
|
let t13;
|
|
305
|
-
if ($[15] !==
|
|
306
|
-
t13 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
307
|
-
$[15] =
|
|
308
|
-
$[16] =
|
|
309
|
-
$[17] =
|
|
310
|
-
$[18] = t13;
|
|
304
|
+
if ($[15] !== updateDatabaseId || $[16] !== values.databaseId) {
|
|
305
|
+
t13 = /* @__PURE__ */ jsxRuntime.jsx(DefaultDatabaseField, { databaseId: values.databaseId, onDatabaseIdUpdate: updateDatabaseId });
|
|
306
|
+
$[15] = updateDatabaseId;
|
|
307
|
+
$[16] = values.databaseId;
|
|
308
|
+
$[17] = t13;
|
|
311
309
|
} else {
|
|
312
|
-
t13 = $[
|
|
310
|
+
t13 = $[17];
|
|
313
311
|
}
|
|
314
312
|
let t14;
|
|
315
|
-
if ($[
|
|
313
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
316
314
|
t14 = () => setIconDialogOpen(true);
|
|
317
|
-
$[
|
|
315
|
+
$[18] = t14;
|
|
318
316
|
} else {
|
|
319
|
-
t14 = $[
|
|
317
|
+
t14 = $[18];
|
|
320
318
|
}
|
|
321
319
|
let t15;
|
|
322
|
-
if ($[
|
|
320
|
+
if ($[19] !== collectionIcon) {
|
|
323
321
|
t15 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Change icon", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { shape: "square", onClick: t14, children: collectionIcon }) });
|
|
324
|
-
$[
|
|
325
|
-
$[
|
|
322
|
+
$[19] = collectionIcon;
|
|
323
|
+
$[20] = t15;
|
|
326
324
|
} else {
|
|
327
|
-
t15 = $[
|
|
325
|
+
t15 = $[20];
|
|
328
326
|
}
|
|
329
327
|
let t16;
|
|
330
|
-
if ($[
|
|
328
|
+
if ($[21] !== t12 || $[22] !== t13 || $[23] !== t15) {
|
|
331
329
|
t16 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row gap-2 py-2 pt-3 items-center", children: [
|
|
332
330
|
t12,
|
|
333
331
|
t13,
|
|
334
332
|
t15
|
|
335
333
|
] });
|
|
336
|
-
$[
|
|
337
|
-
$[
|
|
338
|
-
$[
|
|
339
|
-
$[
|
|
334
|
+
$[21] = t12;
|
|
335
|
+
$[22] = t13;
|
|
336
|
+
$[23] = t15;
|
|
337
|
+
$[24] = t16;
|
|
340
338
|
} else {
|
|
341
|
-
t16 = $[
|
|
339
|
+
t16 = $[24];
|
|
342
340
|
}
|
|
343
341
|
let t17;
|
|
344
|
-
if ($[
|
|
342
|
+
if ($[25] !== parentCollection) {
|
|
345
343
|
t17 = parentCollection && /* @__PURE__ */ jsxRuntime.jsx(ui.Chip, { colorScheme: "tealDarker", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "caption", children: [
|
|
346
344
|
"This is a subcollection of ",
|
|
347
345
|
/* @__PURE__ */ jsxRuntime.jsx("b", { children: parentCollection.name })
|
|
348
346
|
] }) });
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
347
|
+
$[25] = parentCollection;
|
|
348
|
+
$[26] = t17;
|
|
351
349
|
} else {
|
|
352
|
-
t17 = $[
|
|
350
|
+
t17 = $[26];
|
|
353
351
|
}
|
|
354
352
|
let t18;
|
|
355
|
-
if ($[
|
|
353
|
+
if ($[27] !== t16 || $[28] !== t17) {
|
|
356
354
|
t18 = /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
357
355
|
t16,
|
|
358
356
|
t17
|
|
359
357
|
] });
|
|
360
|
-
$[
|
|
361
|
-
$[
|
|
362
|
-
$[
|
|
358
|
+
$[27] = t16;
|
|
359
|
+
$[28] = t17;
|
|
360
|
+
$[29] = t18;
|
|
363
361
|
} else {
|
|
364
|
-
t18 = $[
|
|
362
|
+
t18 = $[29];
|
|
365
363
|
}
|
|
366
364
|
const t19 = "grid grid-cols-12 gap-4";
|
|
367
365
|
const t20 = values.name ?? "";
|
|
368
366
|
let t21;
|
|
369
|
-
if ($[
|
|
367
|
+
if ($[30] !== updateName) {
|
|
370
368
|
t21 = (e) => updateName(e.target.value);
|
|
371
|
-
$[
|
|
372
|
-
$[
|
|
369
|
+
$[30] = updateName;
|
|
370
|
+
$[31] = t21;
|
|
373
371
|
} else {
|
|
374
|
-
t21 = $[
|
|
372
|
+
t21 = $[31];
|
|
375
373
|
}
|
|
376
374
|
const t22 = showErrors && Boolean(errors.name);
|
|
377
375
|
let t23;
|
|
378
|
-
if ($[
|
|
376
|
+
if ($[32] !== t20 || $[33] !== t21 || $[34] !== t22) {
|
|
379
377
|
t23 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { value: t20, onChange: t21, label: "Name", autoFocus: true, required: true, error: t22 });
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
378
|
+
$[32] = t20;
|
|
379
|
+
$[33] = t21;
|
|
380
|
+
$[34] = t22;
|
|
381
|
+
$[35] = t23;
|
|
384
382
|
} else {
|
|
385
|
-
t23 = $[
|
|
383
|
+
t23 = $[35];
|
|
386
384
|
}
|
|
387
385
|
const t24 = touched.name && Boolean(errors.name);
|
|
388
386
|
const t25 = touched.name && Boolean(errors.name) ? errors.name : "Name of this collection, usually a plural name (e.g. Products)";
|
|
389
387
|
let t26;
|
|
390
|
-
if ($[
|
|
388
|
+
if ($[36] !== t24 || $[37] !== t25) {
|
|
391
389
|
t26 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t24, children: t25 });
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
390
|
+
$[36] = t24;
|
|
391
|
+
$[37] = t25;
|
|
392
|
+
$[38] = t26;
|
|
395
393
|
} else {
|
|
396
|
-
t26 = $[
|
|
394
|
+
t26 = $[38];
|
|
397
395
|
}
|
|
398
396
|
let t27;
|
|
399
|
-
if ($[
|
|
397
|
+
if ($[39] !== t23 || $[40] !== t26) {
|
|
400
398
|
t27 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
401
399
|
t23,
|
|
402
400
|
t26
|
|
403
401
|
] });
|
|
404
|
-
$[
|
|
405
|
-
$[
|
|
406
|
-
$[
|
|
402
|
+
$[39] = t23;
|
|
403
|
+
$[40] = t26;
|
|
404
|
+
$[41] = t27;
|
|
407
405
|
} else {
|
|
408
|
-
t27 = $[
|
|
406
|
+
t27 = $[41];
|
|
409
407
|
}
|
|
410
408
|
const t28 = isSubcollection ? "" : "sm:col-span-8";
|
|
411
409
|
let t29;
|
|
412
|
-
if ($[
|
|
410
|
+
if ($[42] !== t28) {
|
|
413
411
|
t29 = ui.cls("col-span-12 ", t28);
|
|
414
|
-
$[
|
|
415
|
-
$[
|
|
412
|
+
$[42] = t28;
|
|
413
|
+
$[43] = t29;
|
|
416
414
|
} else {
|
|
417
|
-
t29 = $[
|
|
415
|
+
t29 = $[43];
|
|
418
416
|
}
|
|
419
417
|
const t30 = !isNewCollection;
|
|
420
418
|
const t31 = showErrors && Boolean(errors.path);
|
|
421
419
|
let t32;
|
|
422
|
-
if ($[
|
|
420
|
+
if ($[44] !== t30 || $[45] !== t31) {
|
|
423
421
|
t32 = /* @__PURE__ */ jsxRuntime.jsx(formex.Field, { name: "path", as: ui.DebouncedTextField, label: "Path", disabled: t30, required: true, error: t31 });
|
|
424
|
-
$[
|
|
425
|
-
$[
|
|
426
|
-
$[
|
|
422
|
+
$[44] = t30;
|
|
423
|
+
$[45] = t31;
|
|
424
|
+
$[46] = t32;
|
|
427
425
|
} else {
|
|
428
|
-
t32 = $[
|
|
426
|
+
t32 = $[46];
|
|
429
427
|
}
|
|
430
428
|
const t33 = touched.path && Boolean(errors.path);
|
|
431
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";
|
|
432
430
|
let t35;
|
|
433
|
-
if ($[
|
|
431
|
+
if ($[47] !== t33 || $[48] !== t34) {
|
|
434
432
|
t35 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t33, children: t34 });
|
|
435
|
-
$[
|
|
436
|
-
$[
|
|
437
|
-
$[
|
|
433
|
+
$[47] = t33;
|
|
434
|
+
$[48] = t34;
|
|
435
|
+
$[49] = t35;
|
|
438
436
|
} else {
|
|
439
|
-
t35 = $[
|
|
437
|
+
t35 = $[49];
|
|
440
438
|
}
|
|
441
439
|
let t36;
|
|
442
|
-
if ($[
|
|
440
|
+
if ($[50] !== t29 || $[51] !== t32 || $[52] !== t35) {
|
|
443
441
|
t36 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t29, children: [
|
|
444
442
|
t32,
|
|
445
443
|
t35
|
|
446
444
|
] });
|
|
447
|
-
$[
|
|
448
|
-
$[
|
|
449
|
-
$[
|
|
450
|
-
$[
|
|
445
|
+
$[50] = t29;
|
|
446
|
+
$[51] = t32;
|
|
447
|
+
$[52] = t35;
|
|
448
|
+
$[53] = t36;
|
|
451
449
|
} else {
|
|
452
|
-
t36 = $[
|
|
450
|
+
t36 = $[53];
|
|
453
451
|
}
|
|
454
452
|
const t37 = !isSubcollection && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 sm:col-span-4 relative", children: [
|
|
455
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" }),
|
|
@@ -461,116 +459,116 @@
|
|
|
461
459
|
] });
|
|
462
460
|
const t38 = values.openEntityMode ?? "side_panel";
|
|
463
461
|
let t39;
|
|
464
|
-
if ($[
|
|
462
|
+
if ($[54] !== setFieldValue) {
|
|
465
463
|
t39 = (value) => setFieldValue("openEntityMode", value);
|
|
466
|
-
$[
|
|
467
|
-
$[
|
|
464
|
+
$[54] = setFieldValue;
|
|
465
|
+
$[55] = t39;
|
|
468
466
|
} else {
|
|
469
|
-
t39 = $[
|
|
467
|
+
t39 = $[55];
|
|
470
468
|
}
|
|
471
469
|
let t40;
|
|
472
|
-
if ($[
|
|
470
|
+
if ($[56] !== t38 || $[57] !== t39) {
|
|
473
471
|
t40 = /* @__PURE__ */ jsxRuntime.jsx(LayoutModeSwitch, { className: "col-span-12", value: t38, onChange: t39 });
|
|
474
|
-
$[
|
|
475
|
-
$[
|
|
476
|
-
$[
|
|
472
|
+
$[56] = t38;
|
|
473
|
+
$[57] = t39;
|
|
474
|
+
$[58] = t40;
|
|
477
475
|
} else {
|
|
478
|
-
t40 = $[
|
|
476
|
+
t40 = $[58];
|
|
479
477
|
}
|
|
480
478
|
let t41;
|
|
481
|
-
if ($[
|
|
479
|
+
if ($[59] === Symbol.for("react.memo_cache_sentinel")) {
|
|
482
480
|
t41 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row text-surface-500", children: [
|
|
483
481
|
/* @__PURE__ */ jsxRuntime.jsx(ui.SettingsIcon, {}),
|
|
484
482
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "ml-2", children: "Advanced" })
|
|
485
483
|
] });
|
|
486
|
-
$[
|
|
484
|
+
$[59] = t41;
|
|
487
485
|
} else {
|
|
488
|
-
t41 = $[
|
|
486
|
+
t41 = $[59];
|
|
489
487
|
}
|
|
490
488
|
const t42 = !isNewCollection;
|
|
491
489
|
const t43 = showErrors && Boolean(errors.id);
|
|
492
490
|
let t44;
|
|
493
|
-
if ($[
|
|
491
|
+
if ($[60] !== t42 || $[61] !== t43) {
|
|
494
492
|
t44 = /* @__PURE__ */ jsxRuntime.jsx(formex.Field, { name: "id", as: ui.DebouncedTextField, disabled: t42, label: "Collection id", error: t43 });
|
|
495
|
-
$[
|
|
496
|
-
$[
|
|
497
|
-
$[
|
|
493
|
+
$[60] = t42;
|
|
494
|
+
$[61] = t43;
|
|
495
|
+
$[62] = t44;
|
|
498
496
|
} else {
|
|
499
|
-
t44 = $[
|
|
497
|
+
t44 = $[62];
|
|
500
498
|
}
|
|
501
499
|
const t45 = touched.id && Boolean(errors.id);
|
|
502
500
|
const t46 = touched.id && Boolean(errors.id) ? errors.id : "This id identifies this collection. Typically the same as the path.";
|
|
503
501
|
let t47;
|
|
504
|
-
if ($[
|
|
502
|
+
if ($[63] !== t45 || $[64] !== t46) {
|
|
505
503
|
t47 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t45, children: t46 });
|
|
506
|
-
$[
|
|
507
|
-
$[
|
|
508
|
-
$[
|
|
504
|
+
$[63] = t45;
|
|
505
|
+
$[64] = t46;
|
|
506
|
+
$[65] = t47;
|
|
509
507
|
} else {
|
|
510
|
-
t47 = $[
|
|
508
|
+
t47 = $[65];
|
|
511
509
|
}
|
|
512
510
|
let t48;
|
|
513
|
-
if ($[
|
|
511
|
+
if ($[66] !== t44 || $[67] !== t47) {
|
|
514
512
|
t48 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
515
513
|
t44,
|
|
516
514
|
t47
|
|
517
515
|
] });
|
|
518
|
-
$[
|
|
519
|
-
$[
|
|
520
|
-
$[
|
|
516
|
+
$[66] = t44;
|
|
517
|
+
$[67] = t47;
|
|
518
|
+
$[68] = t48;
|
|
521
519
|
} else {
|
|
522
|
-
t48 = $[
|
|
520
|
+
t48 = $[68];
|
|
523
521
|
}
|
|
524
522
|
const t49 = showErrors && Boolean(errors.singularName);
|
|
525
523
|
let t50;
|
|
526
|
-
if ($[
|
|
524
|
+
if ($[69] !== handleChange || $[70] !== setFieldTouched) {
|
|
527
525
|
t50 = (e_0) => {
|
|
528
526
|
setFieldTouched("singularName", true);
|
|
529
527
|
return handleChange(e_0);
|
|
530
528
|
};
|
|
531
|
-
$[
|
|
532
|
-
$[
|
|
533
|
-
$[
|
|
529
|
+
$[69] = handleChange;
|
|
530
|
+
$[70] = setFieldTouched;
|
|
531
|
+
$[71] = t50;
|
|
534
532
|
} else {
|
|
535
|
-
t50 = $[
|
|
533
|
+
t50 = $[71];
|
|
536
534
|
}
|
|
537
535
|
const t51 = values.singularName ?? "";
|
|
538
536
|
let t52;
|
|
539
|
-
if ($[
|
|
537
|
+
if ($[72] !== t49 || $[73] !== t50 || $[74] !== t51) {
|
|
540
538
|
t52 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t49, name: "singularName", "aria-describedby": "singularName-helper", onChange: t50, value: t51, label: "Singular name" });
|
|
541
|
-
$[
|
|
542
|
-
$[
|
|
543
|
-
$[
|
|
544
|
-
$[
|
|
539
|
+
$[72] = t49;
|
|
540
|
+
$[73] = t50;
|
|
541
|
+
$[74] = t51;
|
|
542
|
+
$[75] = t52;
|
|
545
543
|
} else {
|
|
546
|
-
t52 = $[
|
|
544
|
+
t52 = $[75];
|
|
547
545
|
}
|
|
548
546
|
const t53 = showErrors && Boolean(errors.singularName);
|
|
549
547
|
const t54 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define a singular name for your entities";
|
|
550
548
|
let t55;
|
|
551
|
-
if ($[
|
|
549
|
+
if ($[76] !== t53 || $[77] !== t54) {
|
|
552
550
|
t55 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t53, children: t54 });
|
|
553
|
-
$[
|
|
554
|
-
$[
|
|
555
|
-
$[
|
|
551
|
+
$[76] = t53;
|
|
552
|
+
$[77] = t54;
|
|
553
|
+
$[78] = t55;
|
|
556
554
|
} else {
|
|
557
|
-
t55 = $[
|
|
555
|
+
t55 = $[78];
|
|
558
556
|
}
|
|
559
557
|
let t56;
|
|
560
|
-
if ($[
|
|
558
|
+
if ($[79] !== t52 || $[80] !== t55) {
|
|
561
559
|
t56 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
562
560
|
t52,
|
|
563
561
|
t55
|
|
564
562
|
] });
|
|
565
|
-
$[
|
|
566
|
-
$[
|
|
567
|
-
$[
|
|
563
|
+
$[79] = t52;
|
|
564
|
+
$[80] = t55;
|
|
565
|
+
$[81] = t56;
|
|
568
566
|
} else {
|
|
569
|
-
t56 = $[
|
|
567
|
+
t56 = $[81];
|
|
570
568
|
}
|
|
571
569
|
const t57 = showErrors && Boolean(errors.sideDialogWidth);
|
|
572
570
|
let t58;
|
|
573
|
-
if ($[
|
|
571
|
+
if ($[82] !== setFieldTouched || $[83] !== setFieldValue) {
|
|
574
572
|
t58 = (e_1) => {
|
|
575
573
|
setFieldTouched("sideDialogWidth", true);
|
|
576
574
|
const value_0 = e_1.target.value;
|
|
@@ -582,129 +580,129 @@
|
|
|
582
580
|
}
|
|
583
581
|
}
|
|
584
582
|
};
|
|
585
|
-
$[
|
|
586
|
-
$[
|
|
587
|
-
$[
|
|
583
|
+
$[82] = setFieldTouched;
|
|
584
|
+
$[83] = setFieldValue;
|
|
585
|
+
$[84] = t58;
|
|
588
586
|
} else {
|
|
589
|
-
t58 = $[
|
|
587
|
+
t58 = $[84];
|
|
590
588
|
}
|
|
591
589
|
let t59;
|
|
592
|
-
if ($[
|
|
590
|
+
if ($[85] !== setFieldValue) {
|
|
593
591
|
t59 = () => {
|
|
594
592
|
setFieldValue("sideDialogWidth", null);
|
|
595
593
|
};
|
|
596
|
-
$[
|
|
597
|
-
$[
|
|
594
|
+
$[85] = setFieldValue;
|
|
595
|
+
$[86] = t59;
|
|
598
596
|
} else {
|
|
599
|
-
t59 = $[
|
|
597
|
+
t59 = $[86];
|
|
600
598
|
}
|
|
601
599
|
const t60 = !values.sideDialogWidth;
|
|
602
600
|
let t61;
|
|
603
|
-
if ($[
|
|
601
|
+
if ($[87] === Symbol.for("react.memo_cache_sentinel")) {
|
|
604
602
|
t61 = /* @__PURE__ */ jsxRuntime.jsx(ui.CloseIcon, { size: "small" });
|
|
605
|
-
$[
|
|
603
|
+
$[87] = t61;
|
|
606
604
|
} else {
|
|
607
|
-
t61 = $[
|
|
605
|
+
t61 = $[87];
|
|
608
606
|
}
|
|
609
607
|
let t62;
|
|
610
|
-
if ($[
|
|
608
|
+
if ($[88] !== t59 || $[89] !== t60) {
|
|
611
609
|
t62 = /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { size: "small", onClick: t59, disabled: t60, children: t61 });
|
|
612
|
-
$[
|
|
613
|
-
$[
|
|
614
|
-
$[
|
|
610
|
+
$[88] = t59;
|
|
611
|
+
$[89] = t60;
|
|
612
|
+
$[90] = t62;
|
|
615
613
|
} else {
|
|
616
|
-
t62 = $[
|
|
614
|
+
t62 = $[90];
|
|
617
615
|
}
|
|
618
616
|
const t63 = values.sideDialogWidth ?? "";
|
|
619
617
|
let t64;
|
|
620
|
-
if ($[
|
|
618
|
+
if ($[91] !== t57 || $[92] !== t58 || $[93] !== t62 || $[94] !== t63) {
|
|
621
619
|
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" });
|
|
622
|
-
$[
|
|
623
|
-
$[
|
|
624
|
-
$[
|
|
625
|
-
$[
|
|
626
|
-
$[
|
|
620
|
+
$[91] = t57;
|
|
621
|
+
$[92] = t58;
|
|
622
|
+
$[93] = t62;
|
|
623
|
+
$[94] = t63;
|
|
624
|
+
$[95] = t64;
|
|
627
625
|
} else {
|
|
628
|
-
t64 = $[
|
|
626
|
+
t64 = $[95];
|
|
629
627
|
}
|
|
630
628
|
const t65 = showErrors && Boolean(errors.singularName);
|
|
631
629
|
const t66 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define the width (in pixels) of entities side dialog. Default is 768px";
|
|
632
630
|
let t67;
|
|
633
|
-
if ($[
|
|
631
|
+
if ($[96] !== t65 || $[97] !== t66) {
|
|
634
632
|
t67 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t65, children: t66 });
|
|
635
|
-
$[
|
|
636
|
-
$[
|
|
637
|
-
$[
|
|
633
|
+
$[96] = t65;
|
|
634
|
+
$[97] = t66;
|
|
635
|
+
$[98] = t67;
|
|
638
636
|
} else {
|
|
639
|
-
t67 = $[
|
|
637
|
+
t67 = $[98];
|
|
640
638
|
}
|
|
641
639
|
let t68;
|
|
642
|
-
if ($[
|
|
640
|
+
if ($[99] !== t64 || $[100] !== t67) {
|
|
643
641
|
t68 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
644
642
|
t64,
|
|
645
643
|
t67
|
|
646
644
|
] });
|
|
647
|
-
$[
|
|
648
|
-
$[
|
|
649
|
-
$[
|
|
645
|
+
$[99] = t64;
|
|
646
|
+
$[100] = t67;
|
|
647
|
+
$[101] = t68;
|
|
650
648
|
} else {
|
|
651
|
-
t68 = $[
|
|
649
|
+
t68 = $[101];
|
|
652
650
|
}
|
|
653
651
|
const t69 = showErrors && Boolean(errors.description);
|
|
654
652
|
const t70 = values.description ?? "";
|
|
655
653
|
let t71;
|
|
656
|
-
if ($[
|
|
654
|
+
if ($[102] !== handleChange || $[103] !== t69 || $[104] !== t70) {
|
|
657
655
|
t71 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t69, name: "description", value: t70, onChange: handleChange, multiline: true, rows: 2, "aria-describedby": "description-helper-text", label: "Description" });
|
|
658
|
-
$[
|
|
659
|
-
$[
|
|
660
|
-
$[
|
|
661
|
-
$[
|
|
656
|
+
$[102] = handleChange;
|
|
657
|
+
$[103] = t69;
|
|
658
|
+
$[104] = t70;
|
|
659
|
+
$[105] = t71;
|
|
662
660
|
} else {
|
|
663
|
-
t71 = $[
|
|
661
|
+
t71 = $[105];
|
|
664
662
|
}
|
|
665
663
|
const t72 = showErrors && Boolean(errors.description);
|
|
666
664
|
const t73 = showErrors && Boolean(errors.description) ? errors.description : "Description of the collection, you can use markdown";
|
|
667
665
|
let t74;
|
|
668
|
-
if ($[
|
|
666
|
+
if ($[106] !== t72 || $[107] !== t73) {
|
|
669
667
|
t74 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t72, children: t73 });
|
|
670
|
-
$[
|
|
671
|
-
$[
|
|
672
|
-
$[
|
|
668
|
+
$[106] = t72;
|
|
669
|
+
$[107] = t73;
|
|
670
|
+
$[108] = t74;
|
|
673
671
|
} else {
|
|
674
|
-
t74 = $[
|
|
672
|
+
t74 = $[108];
|
|
675
673
|
}
|
|
676
674
|
let t75;
|
|
677
|
-
if ($[
|
|
675
|
+
if ($[109] !== t71 || $[110] !== t74) {
|
|
678
676
|
t75 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
679
677
|
t71,
|
|
680
678
|
t74
|
|
681
679
|
] });
|
|
682
|
-
$[
|
|
683
|
-
$[
|
|
684
|
-
$[
|
|
680
|
+
$[109] = t71;
|
|
681
|
+
$[110] = t74;
|
|
682
|
+
$[111] = t75;
|
|
685
683
|
} else {
|
|
686
|
-
t75 = $[
|
|
684
|
+
t75 = $[111];
|
|
687
685
|
}
|
|
688
686
|
const t76 = values.defaultSize ?? "";
|
|
689
687
|
let t77;
|
|
690
|
-
if ($[
|
|
688
|
+
if ($[112] === Symbol.for("react.memo_cache_sentinel")) {
|
|
691
689
|
t77 = ["xs", "s", "m", "l", "xl"].map(_temp2$7);
|
|
692
|
-
$[
|
|
690
|
+
$[112] = t77;
|
|
693
691
|
} else {
|
|
694
|
-
t77 = $[
|
|
692
|
+
t77 = $[112];
|
|
695
693
|
}
|
|
696
694
|
let t78;
|
|
697
|
-
if ($[
|
|
695
|
+
if ($[113] !== handleChange || $[114] !== t76) {
|
|
698
696
|
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 }) });
|
|
699
|
-
$[
|
|
700
|
-
$[
|
|
701
|
-
$[
|
|
697
|
+
$[113] = handleChange;
|
|
698
|
+
$[114] = t76;
|
|
699
|
+
$[115] = t78;
|
|
702
700
|
} else {
|
|
703
|
-
t78 = $[
|
|
701
|
+
t78 = $[115];
|
|
704
702
|
}
|
|
705
703
|
const t79 = customIdValue === "code_defined";
|
|
706
704
|
let t80;
|
|
707
|
-
if ($[
|
|
705
|
+
if ($[116] !== setFieldValue) {
|
|
708
706
|
t80 = (v) => {
|
|
709
707
|
if (v === "code_defined") {
|
|
710
708
|
throw new Error("This should not happen");
|
|
@@ -722,115 +720,115 @@
|
|
|
722
720
|
}
|
|
723
721
|
}
|
|
724
722
|
};
|
|
725
|
-
$[
|
|
726
|
-
$[
|
|
723
|
+
$[116] = setFieldValue;
|
|
724
|
+
$[117] = t80;
|
|
727
725
|
} else {
|
|
728
|
-
t80 = $[
|
|
726
|
+
t80 = $[117];
|
|
729
727
|
}
|
|
730
728
|
const t81 = customIdValue ?? "";
|
|
731
729
|
let t82;
|
|
732
730
|
let t83;
|
|
733
731
|
let t84;
|
|
734
|
-
if ($[
|
|
732
|
+
if ($[118] === Symbol.for("react.memo_cache_sentinel")) {
|
|
735
733
|
t82 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "false", children: "Document ID is generated automatically" });
|
|
736
734
|
t83 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "true", children: "Users must define an ID" });
|
|
737
735
|
t84 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
|
|
738
|
-
$[
|
|
739
|
-
$[
|
|
740
|
-
$[
|
|
736
|
+
$[118] = t82;
|
|
737
|
+
$[119] = t83;
|
|
738
|
+
$[120] = t84;
|
|
741
739
|
} else {
|
|
742
|
-
t82 = $[
|
|
743
|
-
t83 = $[
|
|
744
|
-
t84 = $[
|
|
740
|
+
t82 = $[118];
|
|
741
|
+
t83 = $[119];
|
|
742
|
+
t84 = $[120];
|
|
745
743
|
}
|
|
746
744
|
let t85;
|
|
747
|
-
if ($[
|
|
745
|
+
if ($[121] !== t79 || $[122] !== t80 || $[123] !== t81) {
|
|
748
746
|
t85 = /* @__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: t79, onValueChange: t80, value: t81, renderValue: _temp3$4, children: [
|
|
749
747
|
t82,
|
|
750
748
|
t83,
|
|
751
749
|
t84
|
|
752
750
|
] }) });
|
|
753
|
-
$[
|
|
754
|
-
$[
|
|
755
|
-
$[
|
|
756
|
-
$[
|
|
751
|
+
$[121] = t79;
|
|
752
|
+
$[122] = t80;
|
|
753
|
+
$[123] = t81;
|
|
754
|
+
$[124] = t85;
|
|
757
755
|
} else {
|
|
758
|
-
t85 = $[
|
|
756
|
+
t85 = $[124];
|
|
759
757
|
}
|
|
760
758
|
let t86;
|
|
761
|
-
if ($[
|
|
759
|
+
if ($[125] !== setFieldValue) {
|
|
762
760
|
t86 = (v_0) => setFieldValue("collectionGroup", v_0);
|
|
763
|
-
$[
|
|
764
|
-
$[
|
|
761
|
+
$[125] = setFieldValue;
|
|
762
|
+
$[126] = t86;
|
|
765
763
|
} else {
|
|
766
|
-
t86 = $[
|
|
764
|
+
t86 = $[126];
|
|
767
765
|
}
|
|
768
766
|
const t87 = values.collectionGroup ?? false;
|
|
769
767
|
let t88;
|
|
770
|
-
if ($[
|
|
768
|
+
if ($[127] !== t86 || $[128] !== t87) {
|
|
771
769
|
t88 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", label: "Collection group", onValueChange: t86, value: t87 });
|
|
772
|
-
$[
|
|
773
|
-
$[
|
|
774
|
-
$[
|
|
770
|
+
$[127] = t86;
|
|
771
|
+
$[128] = t87;
|
|
772
|
+
$[129] = t88;
|
|
775
773
|
} else {
|
|
776
|
-
t88 = $[
|
|
774
|
+
t88 = $[129];
|
|
777
775
|
}
|
|
778
776
|
let t89;
|
|
779
|
-
if ($[
|
|
777
|
+
if ($[130] === Symbol.for("react.memo_cache_sentinel")) {
|
|
780
778
|
t89 = /* @__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." });
|
|
781
|
-
$[
|
|
779
|
+
$[130] = t89;
|
|
782
780
|
} else {
|
|
783
|
-
t89 = $[
|
|
781
|
+
t89 = $[130];
|
|
784
782
|
}
|
|
785
783
|
let t90;
|
|
786
|
-
if ($[
|
|
784
|
+
if ($[131] !== t88) {
|
|
787
785
|
t90 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
788
786
|
t88,
|
|
789
787
|
t89
|
|
790
788
|
] });
|
|
791
|
-
$[
|
|
792
|
-
$[
|
|
789
|
+
$[131] = t88;
|
|
790
|
+
$[132] = t90;
|
|
793
791
|
} else {
|
|
794
|
-
t90 = $[
|
|
792
|
+
t90 = $[132];
|
|
795
793
|
}
|
|
796
794
|
let t91;
|
|
797
|
-
if ($[
|
|
795
|
+
if ($[133] !== setFieldValue) {
|
|
798
796
|
t91 = (v_1) => setFieldValue("textSearchEnabled", v_1);
|
|
799
|
-
$[
|
|
800
|
-
$[
|
|
797
|
+
$[133] = setFieldValue;
|
|
798
|
+
$[134] = t91;
|
|
801
799
|
} else {
|
|
802
|
-
t91 = $[
|
|
800
|
+
t91 = $[134];
|
|
803
801
|
}
|
|
804
802
|
const t92 = values.textSearchEnabled ?? false;
|
|
805
803
|
let t93;
|
|
806
|
-
if ($[
|
|
804
|
+
if ($[135] !== t91 || $[136] !== t92) {
|
|
807
805
|
t93 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", label: "Enable text search for this collection", onValueChange: t91, value: t92 });
|
|
808
|
-
$[
|
|
809
|
-
$[
|
|
810
|
-
$[
|
|
806
|
+
$[135] = t91;
|
|
807
|
+
$[136] = t92;
|
|
808
|
+
$[137] = t93;
|
|
811
809
|
} else {
|
|
812
|
-
t93 = $[
|
|
810
|
+
t93 = $[137];
|
|
813
811
|
}
|
|
814
812
|
let t94;
|
|
815
|
-
if ($[
|
|
813
|
+
if ($[138] === Symbol.for("react.memo_cache_sentinel")) {
|
|
816
814
|
t94 = /* @__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." });
|
|
817
|
-
$[
|
|
815
|
+
$[138] = t94;
|
|
818
816
|
} else {
|
|
819
|
-
t94 = $[
|
|
817
|
+
t94 = $[138];
|
|
820
818
|
}
|
|
821
819
|
let t95;
|
|
822
|
-
if ($[
|
|
820
|
+
if ($[139] !== t93) {
|
|
823
821
|
t95 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
824
822
|
t93,
|
|
825
823
|
t94
|
|
826
824
|
] });
|
|
827
|
-
$[
|
|
828
|
-
$[
|
|
825
|
+
$[139] = t93;
|
|
826
|
+
$[140] = t95;
|
|
829
827
|
} else {
|
|
830
|
-
t95 = $[
|
|
828
|
+
t95 = $[140];
|
|
831
829
|
}
|
|
832
830
|
let t96;
|
|
833
|
-
if ($[
|
|
831
|
+
if ($[141] !== t48 || $[142] !== t56 || $[143] !== t68 || $[144] !== t75 || $[145] !== t78 || $[146] !== t85 || $[147] !== t90 || $[148] !== t95) {
|
|
834
832
|
t96 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-4 p-4", children: [
|
|
835
833
|
t48,
|
|
836
834
|
t56,
|
|
@@ -841,41 +839,41 @@
|
|
|
841
839
|
t90,
|
|
842
840
|
t95
|
|
843
841
|
] });
|
|
844
|
-
$[
|
|
845
|
-
$[
|
|
846
|
-
$[
|
|
847
|
-
$[
|
|
848
|
-
$[
|
|
849
|
-
$[
|
|
850
|
-
$[
|
|
851
|
-
$[
|
|
852
|
-
$[
|
|
853
|
-
} else {
|
|
854
|
-
t96 = $[
|
|
842
|
+
$[141] = t48;
|
|
843
|
+
$[142] = t56;
|
|
844
|
+
$[143] = t68;
|
|
845
|
+
$[144] = t75;
|
|
846
|
+
$[145] = t78;
|
|
847
|
+
$[146] = t85;
|
|
848
|
+
$[147] = t90;
|
|
849
|
+
$[148] = t95;
|
|
850
|
+
$[149] = t96;
|
|
851
|
+
} else {
|
|
852
|
+
t96 = $[149];
|
|
855
853
|
}
|
|
856
854
|
let t97;
|
|
857
|
-
if ($[
|
|
855
|
+
if ($[150] !== advancedPanelExpanded || $[151] !== t96) {
|
|
858
856
|
t97 = /* @__PURE__ */ jsxRuntime.jsx(ui.ExpandablePanel, { expanded: advancedPanelExpanded, onExpandedChange: setAdvancedPanelExpanded, title: t41, initiallyExpanded: false, children: t96 });
|
|
859
|
-
$[
|
|
860
|
-
$[
|
|
861
|
-
$[
|
|
857
|
+
$[150] = advancedPanelExpanded;
|
|
858
|
+
$[151] = t96;
|
|
859
|
+
$[152] = t97;
|
|
862
860
|
} else {
|
|
863
|
-
t97 = $[
|
|
861
|
+
t97 = $[152];
|
|
864
862
|
}
|
|
865
863
|
let t98;
|
|
866
|
-
if ($[
|
|
864
|
+
if ($[153] !== children || $[154] !== t97) {
|
|
867
865
|
t98 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-8", children: [
|
|
868
866
|
t97,
|
|
869
867
|
children
|
|
870
868
|
] });
|
|
871
|
-
$[
|
|
872
|
-
$[
|
|
873
|
-
$[
|
|
869
|
+
$[153] = children;
|
|
870
|
+
$[154] = t97;
|
|
871
|
+
$[155] = t98;
|
|
874
872
|
} else {
|
|
875
|
-
t98 = $[
|
|
873
|
+
t98 = $[155];
|
|
876
874
|
}
|
|
877
875
|
let t99;
|
|
878
|
-
if ($[
|
|
876
|
+
if ($[156] !== t27 || $[157] !== t36 || $[158] !== t37 || $[159] !== t40 || $[160] !== t98) {
|
|
879
877
|
t99 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t19, children: [
|
|
880
878
|
t27,
|
|
881
879
|
t36,
|
|
@@ -883,68 +881,68 @@
|
|
|
883
881
|
t40,
|
|
884
882
|
t98
|
|
885
883
|
] });
|
|
886
|
-
$[
|
|
887
|
-
$[
|
|
888
|
-
$[
|
|
889
|
-
$[
|
|
890
|
-
$[
|
|
891
|
-
$[
|
|
884
|
+
$[156] = t27;
|
|
885
|
+
$[157] = t36;
|
|
886
|
+
$[158] = t37;
|
|
887
|
+
$[159] = t40;
|
|
888
|
+
$[160] = t98;
|
|
889
|
+
$[161] = t99;
|
|
892
890
|
} else {
|
|
893
|
-
t99 = $[
|
|
891
|
+
t99 = $[161];
|
|
894
892
|
}
|
|
895
893
|
let t100;
|
|
896
|
-
if ($[
|
|
894
|
+
if ($[162] === Symbol.for("react.memo_cache_sentinel")) {
|
|
897
895
|
t100 = /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
898
896
|
height: "52px"
|
|
899
897
|
} });
|
|
900
|
-
$[
|
|
898
|
+
$[162] = t100;
|
|
901
899
|
} else {
|
|
902
|
-
t100 = $[
|
|
900
|
+
t100 = $[162];
|
|
903
901
|
}
|
|
904
902
|
let t101;
|
|
905
|
-
if ($[
|
|
903
|
+
if ($[163] !== setFieldValue) {
|
|
906
904
|
t101 = (icon) => {
|
|
907
905
|
setIconDialogOpen(false);
|
|
908
906
|
setFieldValue("icon", icon);
|
|
909
907
|
};
|
|
910
|
-
$[
|
|
911
|
-
$[
|
|
908
|
+
$[163] = setFieldValue;
|
|
909
|
+
$[164] = t101;
|
|
912
910
|
} else {
|
|
913
|
-
t101 = $[
|
|
911
|
+
t101 = $[164];
|
|
914
912
|
}
|
|
915
913
|
let t102;
|
|
916
|
-
if ($[
|
|
914
|
+
if ($[165] !== t101 || $[166] !== values.icon) {
|
|
917
915
|
t102 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsxRuntime.jsx(core.SearchIconsView, { selectedIcon: values.icon, onIconSelected: t101 }) });
|
|
918
|
-
$[
|
|
919
|
-
$[
|
|
920
|
-
$[
|
|
916
|
+
$[165] = t101;
|
|
917
|
+
$[166] = values.icon;
|
|
918
|
+
$[167] = t102;
|
|
921
919
|
} else {
|
|
922
|
-
t102 = $[
|
|
920
|
+
t102 = $[167];
|
|
923
921
|
}
|
|
924
922
|
let t103;
|
|
925
|
-
if ($[
|
|
923
|
+
if ($[168] !== iconDialogOpen || $[169] !== t102) {
|
|
926
924
|
t103 = /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t102 });
|
|
927
|
-
$[
|
|
928
|
-
$[
|
|
929
|
-
$[
|
|
925
|
+
$[168] = iconDialogOpen;
|
|
926
|
+
$[169] = t102;
|
|
927
|
+
$[170] = t103;
|
|
930
928
|
} else {
|
|
931
|
-
t103 = $[
|
|
929
|
+
t103 = $[170];
|
|
932
930
|
}
|
|
933
931
|
let t104;
|
|
934
|
-
if ($[
|
|
932
|
+
if ($[171] !== T0 || $[172] !== t103 || $[173] !== t18 || $[174] !== t99) {
|
|
935
933
|
t104 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t7, children: /* @__PURE__ */ jsxRuntime.jsxs(T0, { maxWidth: t8, className: t9, children: [
|
|
936
934
|
t18,
|
|
937
935
|
t99,
|
|
938
936
|
t100,
|
|
939
937
|
t103
|
|
940
938
|
] }) });
|
|
941
|
-
$[
|
|
942
|
-
$[
|
|
943
|
-
$[
|
|
944
|
-
$[
|
|
945
|
-
$[
|
|
939
|
+
$[171] = T0;
|
|
940
|
+
$[172] = t103;
|
|
941
|
+
$[173] = t18;
|
|
942
|
+
$[174] = t99;
|
|
943
|
+
$[175] = t104;
|
|
946
944
|
} else {
|
|
947
|
-
t104 = $[
|
|
945
|
+
t104 = $[175];
|
|
948
946
|
}
|
|
949
947
|
return t104;
|
|
950
948
|
}
|
|
@@ -9550,7 +9548,7 @@
|
|
|
9550
9548
|
const ConfigControllerContext = React.createContext({});
|
|
9551
9549
|
const CollectionEditorContext = React.createContext({});
|
|
9552
9550
|
const ConfigControllerProvider = React.memo(function ConfigControllerProvider2(t0) {
|
|
9553
|
-
const $ = reactCompilerRuntime.c(
|
|
9551
|
+
const $ = reactCompilerRuntime.c(67);
|
|
9554
9552
|
const {
|
|
9555
9553
|
children,
|
|
9556
9554
|
collectionConfigController,
|
|
@@ -9561,8 +9559,7 @@
|
|
|
9561
9559
|
getPathSuggestions,
|
|
9562
9560
|
getUser,
|
|
9563
9561
|
getData,
|
|
9564
|
-
onAnalyticsEvent
|
|
9565
|
-
components
|
|
9562
|
+
onAnalyticsEvent
|
|
9566
9563
|
} = t0;
|
|
9567
9564
|
const navigation = core.useNavigationController();
|
|
9568
9565
|
const navigate = reactRouter.useNavigate();
|
|
@@ -9680,28 +9677,26 @@
|
|
|
9680
9677
|
const createCollection = t3;
|
|
9681
9678
|
const t4 = configPermissions ?? defaultConfigPermissions;
|
|
9682
9679
|
let t5;
|
|
9683
|
-
if ($[6] !==
|
|
9680
|
+
if ($[6] !== createCollection || $[7] !== editCollection || $[8] !== editProperty || $[9] !== getPathSuggestions || $[10] !== t4) {
|
|
9684
9681
|
t5 = {
|
|
9685
9682
|
editCollection,
|
|
9686
9683
|
createCollection,
|
|
9687
9684
|
editProperty,
|
|
9688
9685
|
configPermissions: t4,
|
|
9689
|
-
getPathSuggestions
|
|
9690
|
-
components
|
|
9686
|
+
getPathSuggestions
|
|
9691
9687
|
};
|
|
9692
|
-
$[6] =
|
|
9693
|
-
$[7] =
|
|
9694
|
-
$[8] =
|
|
9695
|
-
$[9] =
|
|
9696
|
-
$[10] =
|
|
9697
|
-
$[11] =
|
|
9698
|
-
$[12] = t5;
|
|
9688
|
+
$[6] = createCollection;
|
|
9689
|
+
$[7] = editCollection;
|
|
9690
|
+
$[8] = editProperty;
|
|
9691
|
+
$[9] = getPathSuggestions;
|
|
9692
|
+
$[10] = t4;
|
|
9693
|
+
$[11] = t5;
|
|
9699
9694
|
} else {
|
|
9700
|
-
t5 = $[
|
|
9695
|
+
t5 = $[11];
|
|
9701
9696
|
}
|
|
9702
9697
|
const t6 = Boolean(currentDialog);
|
|
9703
9698
|
let t7;
|
|
9704
|
-
if ($[
|
|
9699
|
+
if ($[12] !== currentDialog || $[13] !== navigate || $[14] !== navigation) {
|
|
9705
9700
|
t7 = (collection_0) => {
|
|
9706
9701
|
if (currentDialog?.redirect) {
|
|
9707
9702
|
if (collection_0 && currentDialog?.isNewCollection && !currentDialog.parentCollectionIds.length) {
|
|
@@ -9711,29 +9706,29 @@
|
|
|
9711
9706
|
}
|
|
9712
9707
|
setCurrentDialog(void 0);
|
|
9713
9708
|
};
|
|
9714
|
-
$[
|
|
9715
|
-
$[
|
|
9716
|
-
$[
|
|
9717
|
-
$[
|
|
9709
|
+
$[12] = currentDialog;
|
|
9710
|
+
$[13] = navigate;
|
|
9711
|
+
$[14] = navigation;
|
|
9712
|
+
$[15] = t7;
|
|
9718
9713
|
} else {
|
|
9719
|
-
t7 = $[
|
|
9714
|
+
t7 = $[15];
|
|
9720
9715
|
}
|
|
9721
9716
|
let t8;
|
|
9722
|
-
if ($[
|
|
9717
|
+
if ($[16] !== collectionConfigController || $[17] !== collectionInference || $[18] !== currentDialog || $[19] !== extraView || $[20] !== getData || $[21] !== getPathSuggestions || $[22] !== getUser || $[23] !== reservedGroups || $[24] !== t6 || $[25] !== t7) {
|
|
9723
9718
|
t8 = /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorDialog, { open: t6, configController: collectionConfigController, isNewCollection: false, collectionInference, ...currentDialog, getData, reservedGroups, extraView, pathSuggestions: getPathSuggestions, getUser, handleClose: t7 });
|
|
9724
|
-
$[
|
|
9725
|
-
$[
|
|
9726
|
-
$[
|
|
9727
|
-
$[
|
|
9728
|
-
$[
|
|
9729
|
-
$[
|
|
9730
|
-
$[
|
|
9731
|
-
$[
|
|
9732
|
-
$[
|
|
9733
|
-
$[
|
|
9734
|
-
$[
|
|
9719
|
+
$[16] = collectionConfigController;
|
|
9720
|
+
$[17] = collectionInference;
|
|
9721
|
+
$[18] = currentDialog;
|
|
9722
|
+
$[19] = extraView;
|
|
9723
|
+
$[20] = getData;
|
|
9724
|
+
$[21] = getPathSuggestions;
|
|
9725
|
+
$[22] = getUser;
|
|
9726
|
+
$[23] = reservedGroups;
|
|
9727
|
+
$[24] = t6;
|
|
9728
|
+
$[25] = t7;
|
|
9729
|
+
$[26] = t8;
|
|
9735
9730
|
} else {
|
|
9736
|
-
t8 = $[
|
|
9731
|
+
t8 = $[26];
|
|
9737
9732
|
}
|
|
9738
9733
|
const t9 = Boolean(currentPropertyDialog);
|
|
9739
9734
|
const t10 = Boolean(currentPropertyDialog?.propertyKey);
|
|
@@ -9741,21 +9736,21 @@
|
|
|
9741
9736
|
const t12 = !currentPropertyDialog ? false : !currentPropertyDialog?.propertyKey;
|
|
9742
9737
|
const t13 = currentPropertyDialog?.collectionEditable ?? false;
|
|
9743
9738
|
let t14;
|
|
9744
|
-
if ($[
|
|
9739
|
+
if ($[27] !== currentPropertyDialog || $[28] !== getData || $[29] !== navigation) {
|
|
9745
9740
|
t14 = getData && currentPropertyDialog?.editedCollectionId ? () => {
|
|
9746
9741
|
console.debug("get data for property", currentPropertyDialog?.editedCollectionId);
|
|
9747
9742
|
const resolvedPath = navigation.resolveIdsFrom(currentPropertyDialog.editedCollectionId);
|
|
9748
9743
|
return getData(resolvedPath, []);
|
|
9749
9744
|
} : void 0;
|
|
9750
|
-
$[
|
|
9751
|
-
$[
|
|
9752
|
-
$[
|
|
9753
|
-
$[
|
|
9745
|
+
$[27] = currentPropertyDialog;
|
|
9746
|
+
$[28] = getData;
|
|
9747
|
+
$[29] = navigation;
|
|
9748
|
+
$[30] = t14;
|
|
9754
9749
|
} else {
|
|
9755
|
-
t14 = $[
|
|
9750
|
+
t14 = $[30];
|
|
9756
9751
|
}
|
|
9757
9752
|
let t15;
|
|
9758
|
-
if ($[
|
|
9753
|
+
if ($[31] !== collectionConfigController || $[32] !== currentPropertyDialog || $[33] !== snackbarController) {
|
|
9759
9754
|
t15 = (t162) => {
|
|
9760
9755
|
const {
|
|
9761
9756
|
id: id_0,
|
|
@@ -9784,15 +9779,15 @@
|
|
|
9784
9779
|
return false;
|
|
9785
9780
|
});
|
|
9786
9781
|
};
|
|
9787
|
-
$[
|
|
9788
|
-
$[
|
|
9789
|
-
$[
|
|
9790
|
-
$[
|
|
9782
|
+
$[31] = collectionConfigController;
|
|
9783
|
+
$[32] = currentPropertyDialog;
|
|
9784
|
+
$[33] = snackbarController;
|
|
9785
|
+
$[34] = t15;
|
|
9791
9786
|
} else {
|
|
9792
|
-
t15 = $[
|
|
9787
|
+
t15 = $[34];
|
|
9793
9788
|
}
|
|
9794
9789
|
let t16;
|
|
9795
|
-
if ($[
|
|
9790
|
+
if ($[35] !== collectionConfigController || $[36] !== currentPropertyDialog?.currentPropertiesOrder || $[37] !== currentPropertyDialog?.editedCollectionId || $[38] !== currentPropertyDialog?.namespace || $[39] !== currentPropertyDialog?.parentCollectionIds || $[40] !== currentPropertyDialog?.propertyKey || $[41] !== snackbarController) {
|
|
9796
9791
|
t16 = () => {
|
|
9797
9792
|
if (!currentPropertyDialog?.propertyKey) {
|
|
9798
9793
|
return;
|
|
@@ -9815,21 +9810,21 @@
|
|
|
9815
9810
|
return false;
|
|
9816
9811
|
});
|
|
9817
9812
|
};
|
|
9818
|
-
$[
|
|
9819
|
-
$[
|
|
9820
|
-
$[
|
|
9821
|
-
$[
|
|
9822
|
-
$[
|
|
9823
|
-
$[
|
|
9824
|
-
$[
|
|
9825
|
-
$[
|
|
9813
|
+
$[35] = collectionConfigController;
|
|
9814
|
+
$[36] = currentPropertyDialog?.currentPropertiesOrder;
|
|
9815
|
+
$[37] = currentPropertyDialog?.editedCollectionId;
|
|
9816
|
+
$[38] = currentPropertyDialog?.namespace;
|
|
9817
|
+
$[39] = currentPropertyDialog?.parentCollectionIds;
|
|
9818
|
+
$[40] = currentPropertyDialog?.propertyKey;
|
|
9819
|
+
$[41] = snackbarController;
|
|
9820
|
+
$[42] = t16;
|
|
9826
9821
|
} else {
|
|
9827
|
-
t16 = $[
|
|
9822
|
+
t16 = $[42];
|
|
9828
9823
|
}
|
|
9829
9824
|
let t17;
|
|
9830
9825
|
let t18;
|
|
9831
9826
|
let t19;
|
|
9832
|
-
if ($[
|
|
9827
|
+
if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9833
9828
|
t17 = () => {
|
|
9834
9829
|
setCurrentPropertyDialog(void 0);
|
|
9835
9830
|
};
|
|
@@ -9837,64 +9832,64 @@
|
|
|
9837
9832
|
setCurrentPropertyDialog(void 0);
|
|
9838
9833
|
};
|
|
9839
9834
|
t19 = {};
|
|
9840
|
-
$[
|
|
9841
|
-
$[
|
|
9842
|
-
$[
|
|
9835
|
+
$[43] = t17;
|
|
9836
|
+
$[44] = t18;
|
|
9837
|
+
$[45] = t19;
|
|
9843
9838
|
} else {
|
|
9844
|
-
t17 = $[
|
|
9845
|
-
t18 = $[
|
|
9846
|
-
t19 = $[
|
|
9839
|
+
t17 = $[43];
|
|
9840
|
+
t18 = $[44];
|
|
9841
|
+
t19 = $[45];
|
|
9847
9842
|
}
|
|
9848
9843
|
let t20;
|
|
9849
|
-
if ($[
|
|
9844
|
+
if ($[46] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9850
9845
|
t20 = [];
|
|
9851
|
-
$[
|
|
9846
|
+
$[46] = t20;
|
|
9852
9847
|
} else {
|
|
9853
|
-
t20 = $[
|
|
9848
|
+
t20 = $[46];
|
|
9854
9849
|
}
|
|
9855
9850
|
const t21 = currentPropertyDialog?.property;
|
|
9856
9851
|
const t22 = currentPropertyDialog?.propertyKey;
|
|
9857
9852
|
let t23;
|
|
9858
|
-
if ($[
|
|
9853
|
+
if ($[47] !== propertyConfigs || $[48] !== t10 || $[49] !== t11 || $[50] !== t12 || $[51] !== t13 || $[52] !== t14 || $[53] !== t15 || $[54] !== t16 || $[55] !== t21 || $[56] !== t22 || $[57] !== t9) {
|
|
9859
9854
|
t23 = /* @__PURE__ */ jsxRuntime.jsx(PropertyFormDialog, { open: t9, includeIdAndName: true, existingProperty: t10, autoUpdateId: t11, autoOpenTypeSelect: t12, inArray: false, collectionEditable: t13, getData: t14, onPropertyChanged: t15, onPropertyChangedImmediate: false, onDelete: t16, onError: _temp2, onOkClicked: t17, onCancel: t18, initialErrors: t19, forceShowErrors: false, existingPropertyKeys: t20, allowDataInference: true, propertyConfigs, property: t21, propertyKey: t22 });
|
|
9860
|
-
$[
|
|
9861
|
-
$[
|
|
9862
|
-
$[
|
|
9863
|
-
$[
|
|
9864
|
-
$[
|
|
9865
|
-
$[
|
|
9866
|
-
$[
|
|
9867
|
-
$[
|
|
9868
|
-
$[
|
|
9869
|
-
$[
|
|
9870
|
-
$[
|
|
9871
|
-
$[
|
|
9872
|
-
} else {
|
|
9873
|
-
t23 = $[
|
|
9855
|
+
$[47] = propertyConfigs;
|
|
9856
|
+
$[48] = t10;
|
|
9857
|
+
$[49] = t11;
|
|
9858
|
+
$[50] = t12;
|
|
9859
|
+
$[51] = t13;
|
|
9860
|
+
$[52] = t14;
|
|
9861
|
+
$[53] = t15;
|
|
9862
|
+
$[54] = t16;
|
|
9863
|
+
$[55] = t21;
|
|
9864
|
+
$[56] = t22;
|
|
9865
|
+
$[57] = t9;
|
|
9866
|
+
$[58] = t23;
|
|
9867
|
+
} else {
|
|
9868
|
+
t23 = $[58];
|
|
9874
9869
|
}
|
|
9875
9870
|
let t24;
|
|
9876
|
-
if ($[
|
|
9871
|
+
if ($[59] !== children || $[60] !== t23 || $[61] !== t5 || $[62] !== t8) {
|
|
9877
9872
|
t24 = /* @__PURE__ */ jsxRuntime.jsxs(CollectionEditorContext.Provider, { value: t5, children: [
|
|
9878
9873
|
children,
|
|
9879
9874
|
t8,
|
|
9880
9875
|
t23
|
|
9881
9876
|
] });
|
|
9882
|
-
$[
|
|
9883
|
-
$[
|
|
9884
|
-
$[
|
|
9885
|
-
$[
|
|
9886
|
-
$[
|
|
9877
|
+
$[59] = children;
|
|
9878
|
+
$[60] = t23;
|
|
9879
|
+
$[61] = t5;
|
|
9880
|
+
$[62] = t8;
|
|
9881
|
+
$[63] = t24;
|
|
9887
9882
|
} else {
|
|
9888
|
-
t24 = $[
|
|
9883
|
+
t24 = $[63];
|
|
9889
9884
|
}
|
|
9890
9885
|
let t25;
|
|
9891
|
-
if ($[
|
|
9886
|
+
if ($[64] !== collectionConfigController || $[65] !== t24) {
|
|
9892
9887
|
t25 = /* @__PURE__ */ jsxRuntime.jsx(ConfigControllerContext.Provider, { value: collectionConfigController, children: t24 });
|
|
9893
|
-
$[
|
|
9894
|
-
$[
|
|
9895
|
-
$[
|
|
9888
|
+
$[64] = collectionConfigController;
|
|
9889
|
+
$[65] = t24;
|
|
9890
|
+
$[66] = t25;
|
|
9896
9891
|
} else {
|
|
9897
|
-
t25 = $[
|
|
9892
|
+
t25 = $[66];
|
|
9898
9893
|
}
|
|
9899
9894
|
return t25;
|
|
9900
9895
|
}, equal);
|
|
@@ -10509,7 +10504,7 @@
|
|
|
10509
10504
|
return t8;
|
|
10510
10505
|
}
|
|
10511
10506
|
function useCollectionEditorPlugin(t0) {
|
|
10512
|
-
const $ = reactCompilerRuntime.c(
|
|
10507
|
+
const $ = reactCompilerRuntime.c(15);
|
|
10513
10508
|
const {
|
|
10514
10509
|
collectionConfigController,
|
|
10515
10510
|
configPermissions,
|
|
@@ -10519,11 +10514,10 @@
|
|
|
10519
10514
|
getUser,
|
|
10520
10515
|
collectionInference,
|
|
10521
10516
|
getData,
|
|
10522
|
-
onAnalyticsEvent
|
|
10523
|
-
components
|
|
10517
|
+
onAnalyticsEvent
|
|
10524
10518
|
} = t0;
|
|
10525
10519
|
let t1;
|
|
10526
|
-
if ($[0] !== collectionConfigController || $[1] !== collectionInference || $[2] !==
|
|
10520
|
+
if ($[0] !== collectionConfigController || $[1] !== collectionInference || $[2] !== configPermissions || $[3] !== extraView || $[4] !== getData || $[5] !== getPathSuggestions || $[6] !== getUser || $[7] !== onAnalyticsEvent || $[8] !== reservedGroups) {
|
|
10527
10521
|
t1 = {
|
|
10528
10522
|
Component: ConfigControllerProvider,
|
|
10529
10523
|
props: {
|
|
@@ -10535,27 +10529,25 @@
|
|
|
10535
10529
|
getPathSuggestions,
|
|
10536
10530
|
getUser,
|
|
10537
10531
|
getData,
|
|
10538
|
-
onAnalyticsEvent
|
|
10539
|
-
components
|
|
10532
|
+
onAnalyticsEvent
|
|
10540
10533
|
}
|
|
10541
10534
|
};
|
|
10542
10535
|
$[0] = collectionConfigController;
|
|
10543
10536
|
$[1] = collectionInference;
|
|
10544
|
-
$[2] =
|
|
10545
|
-
$[3] =
|
|
10546
|
-
$[4] =
|
|
10547
|
-
$[5] =
|
|
10548
|
-
$[6] =
|
|
10549
|
-
$[7] =
|
|
10550
|
-
$[8] =
|
|
10551
|
-
$[9] =
|
|
10552
|
-
$[10] = t1;
|
|
10537
|
+
$[2] = configPermissions;
|
|
10538
|
+
$[3] = extraView;
|
|
10539
|
+
$[4] = getData;
|
|
10540
|
+
$[5] = getPathSuggestions;
|
|
10541
|
+
$[6] = getUser;
|
|
10542
|
+
$[7] = onAnalyticsEvent;
|
|
10543
|
+
$[8] = reservedGroups;
|
|
10544
|
+
$[9] = t1;
|
|
10553
10545
|
} else {
|
|
10554
|
-
t1 = $[
|
|
10546
|
+
t1 = $[9];
|
|
10555
10547
|
}
|
|
10556
10548
|
let t2;
|
|
10557
10549
|
let t3;
|
|
10558
|
-
if ($[
|
|
10550
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10559
10551
|
t2 = {
|
|
10560
10552
|
additionalActions: /* @__PURE__ */ jsxRuntime.jsx(NewCollectionButton, {}),
|
|
10561
10553
|
additionalChildrenStart: /* @__PURE__ */ jsxRuntime.jsx(IntroWidget, {}),
|
|
@@ -10568,14 +10560,14 @@
|
|
|
10568
10560
|
HeaderAction: CollectionViewHeaderAction,
|
|
10569
10561
|
AddColumnComponent: PropertyAddColumnComponent
|
|
10570
10562
|
};
|
|
10571
|
-
$[
|
|
10572
|
-
$[
|
|
10563
|
+
$[10] = t2;
|
|
10564
|
+
$[11] = t3;
|
|
10573
10565
|
} else {
|
|
10574
|
-
t2 = $[
|
|
10575
|
-
t3 = $[
|
|
10566
|
+
t2 = $[10];
|
|
10567
|
+
t3 = $[11];
|
|
10576
10568
|
}
|
|
10577
10569
|
let t4;
|
|
10578
|
-
if ($[
|
|
10570
|
+
if ($[12] !== collectionConfigController.loading || $[13] !== t1) {
|
|
10579
10571
|
t4 = {
|
|
10580
10572
|
key: "collection_editor",
|
|
10581
10573
|
loading: collectionConfigController.loading,
|
|
@@ -10583,11 +10575,11 @@
|
|
|
10583
10575
|
homePage: t2,
|
|
10584
10576
|
collectionView: t3
|
|
10585
10577
|
};
|
|
10586
|
-
$[
|
|
10587
|
-
$[
|
|
10588
|
-
$[
|
|
10578
|
+
$[12] = collectionConfigController.loading;
|
|
10579
|
+
$[13] = t1;
|
|
10580
|
+
$[14] = t4;
|
|
10589
10581
|
} else {
|
|
10590
|
-
t4 = $[
|
|
10582
|
+
t4 = $[14];
|
|
10591
10583
|
}
|
|
10592
10584
|
return t4;
|
|
10593
10585
|
}
|