@firecms/collection_editor 3.0.0-beta.14 → 3.0.0-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +1345 -870
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1343 -868
- package/dist/index.umd.js.map +1 -1
- package/dist/types/collection_inference.d.ts +3 -0
- package/dist/types/config_controller.d.ts +3 -1
- package/dist/ui/EditorEntityAction.d.ts +2 -0
- package/dist/ui/collection_editor/CollectionPropertiesEditorForm.d.ts +1 -1
- package/dist/ui/collection_editor/EntityActionsEditTab.d.ts +4 -0
- package/dist/ui/collection_editor/EntityActionsSelectDialog.d.ts +4 -0
- package/dist/ui/collection_editor/properties/ReferencePropertyField.d.ts +2 -1
- package/package.json +8 -8
- package/src/types/collection_inference.ts +3 -0
- package/src/types/config_controller.tsx +4 -1
- package/src/ui/EditorCollectionAction.tsx +2 -7
- package/src/ui/EditorEntityAction.tsx +51 -0
- package/src/ui/collection_editor/CollectionDetailsForm.tsx +36 -38
- package/src/ui/collection_editor/CollectionEditorDialog.tsx +18 -5
- package/src/ui/collection_editor/CollectionEditorWelcomeView.tsx +10 -4
- package/src/ui/collection_editor/CollectionPropertiesEditorForm.tsx +3 -2
- package/src/ui/collection_editor/EntityActionsEditTab.tsx +163 -0
- package/src/ui/collection_editor/EntityActionsSelectDialog.tsx +41 -0
- package/src/ui/collection_editor/EntityCustomViewsSelectDialog.tsx +5 -2
- package/src/ui/collection_editor/GetCodeDialog.tsx +5 -3
- package/src/ui/collection_editor/PropertyEditView.tsx +10 -1
- package/src/ui/collection_editor/PropertyFieldPreview.tsx +1 -0
- package/src/ui/collection_editor/UnsavedChangesDialog.tsx +6 -2
- package/src/ui/collection_editor/properties/ReferencePropertyField.tsx +5 -3
- package/src/ui/collection_editor/utils/supported_fields.tsx +1 -0
- package/src/ui/collection_editor/utils/update_property_for_widget.ts +9 -0
- package/src/useCollectionEditorPlugin.tsx +7 -1
- package/src/utils/collections.ts +14 -5
package/dist/index.umd.js
CHANGED
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
return t18;
|
|
170
170
|
}
|
|
171
171
|
function CollectionDetailsForm(t0) {
|
|
172
|
-
const $ = reactCompilerRuntime.c(
|
|
172
|
+
const $ = reactCompilerRuntime.c(192);
|
|
173
173
|
const {
|
|
174
174
|
isNewCollection,
|
|
175
175
|
reservedGroups,
|
|
@@ -185,7 +185,6 @@
|
|
|
185
185
|
touched,
|
|
186
186
|
errors,
|
|
187
187
|
setFieldTouched,
|
|
188
|
-
isSubmitting,
|
|
189
188
|
submitCount
|
|
190
189
|
} = formex.useFormex();
|
|
191
190
|
useCollectionEditorController();
|
|
@@ -253,7 +252,7 @@
|
|
|
253
252
|
t5 = $[10];
|
|
254
253
|
}
|
|
255
254
|
const collectionIcon = t5;
|
|
256
|
-
|
|
255
|
+
groups?.filter((group) => !reservedGroups?.includes(group));
|
|
257
256
|
let t6;
|
|
258
257
|
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
259
258
|
t6 = {
|
|
@@ -263,10 +262,7 @@
|
|
|
263
262
|
} else {
|
|
264
263
|
t6 = $[11];
|
|
265
264
|
}
|
|
266
|
-
|
|
267
|
-
autoCompleteOpen,
|
|
268
|
-
setAutoCompleteOpen
|
|
269
|
-
} = ui.useAutoComplete(t6);
|
|
265
|
+
ui.useAutoComplete(t6);
|
|
270
266
|
const isSubcollection = !!parentCollection;
|
|
271
267
|
let customIdValue;
|
|
272
268
|
if (typeof values.customId === "object") {
|
|
@@ -285,333 +281,317 @@
|
|
|
285
281
|
}
|
|
286
282
|
}
|
|
287
283
|
const showErrors = submitCount > 0;
|
|
288
|
-
const t7 = "
|
|
289
|
-
const
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
t12 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: t10, className: "flex-grow", children: t11 });
|
|
297
|
-
$[12] = t10;
|
|
298
|
-
$[13] = t11;
|
|
299
|
-
$[14] = t12;
|
|
284
|
+
const t7 = !isNewCollection ? "h5" : "h4";
|
|
285
|
+
const t8 = isNewCollection ? "New collection" : `${values?.name} collection`;
|
|
286
|
+
let t9;
|
|
287
|
+
if ($[12] !== t7 || $[13] !== t8) {
|
|
288
|
+
t9 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: t7, className: "flex-grow", children: t8 });
|
|
289
|
+
$[12] = t7;
|
|
290
|
+
$[13] = t8;
|
|
291
|
+
$[14] = t9;
|
|
300
292
|
} else {
|
|
301
|
-
|
|
293
|
+
t9 = $[14];
|
|
302
294
|
}
|
|
303
|
-
let
|
|
295
|
+
let t10;
|
|
304
296
|
if ($[15] !== updateDatabaseId || $[16] !== values.databaseId) {
|
|
305
|
-
|
|
297
|
+
t10 = /* @__PURE__ */ jsxRuntime.jsx(DefaultDatabaseField, { databaseId: values.databaseId, onDatabaseIdUpdate: updateDatabaseId });
|
|
306
298
|
$[15] = updateDatabaseId;
|
|
307
299
|
$[16] = values.databaseId;
|
|
308
|
-
$[17] =
|
|
300
|
+
$[17] = t10;
|
|
309
301
|
} else {
|
|
310
|
-
|
|
302
|
+
t10 = $[17];
|
|
311
303
|
}
|
|
312
|
-
let
|
|
304
|
+
let t11;
|
|
313
305
|
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
314
|
-
|
|
315
|
-
$[18] =
|
|
306
|
+
t11 = () => setIconDialogOpen(true);
|
|
307
|
+
$[18] = t11;
|
|
316
308
|
} else {
|
|
317
|
-
|
|
309
|
+
t11 = $[18];
|
|
318
310
|
}
|
|
319
|
-
let
|
|
311
|
+
let t12;
|
|
320
312
|
if ($[19] !== collectionIcon) {
|
|
321
|
-
|
|
313
|
+
t12 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Change icon", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { shape: "square", onClick: t11, children: collectionIcon }) });
|
|
322
314
|
$[19] = collectionIcon;
|
|
323
|
-
$[20] =
|
|
315
|
+
$[20] = t12;
|
|
324
316
|
} else {
|
|
325
|
-
|
|
317
|
+
t12 = $[20];
|
|
326
318
|
}
|
|
327
|
-
let
|
|
328
|
-
if ($[21] !==
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
319
|
+
let t13;
|
|
320
|
+
if ($[21] !== t10 || $[22] !== t12 || $[23] !== t9) {
|
|
321
|
+
t13 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row gap-2 py-2 pt-3 items-center", children: [
|
|
322
|
+
t9,
|
|
323
|
+
t10,
|
|
324
|
+
t12
|
|
333
325
|
] });
|
|
334
|
-
$[21] =
|
|
335
|
-
$[22] =
|
|
336
|
-
$[23] =
|
|
337
|
-
$[24] =
|
|
326
|
+
$[21] = t10;
|
|
327
|
+
$[22] = t12;
|
|
328
|
+
$[23] = t9;
|
|
329
|
+
$[24] = t13;
|
|
338
330
|
} else {
|
|
339
|
-
|
|
331
|
+
t13 = $[24];
|
|
340
332
|
}
|
|
341
|
-
let
|
|
333
|
+
let t14;
|
|
342
334
|
if ($[25] !== parentCollection) {
|
|
343
|
-
|
|
335
|
+
t14 = parentCollection && /* @__PURE__ */ jsxRuntime.jsx(ui.Chip, { colorScheme: "tealDarker", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "caption", children: [
|
|
344
336
|
"This is a subcollection of ",
|
|
345
337
|
/* @__PURE__ */ jsxRuntime.jsx("b", { children: parentCollection.name })
|
|
346
338
|
] }) });
|
|
347
339
|
$[25] = parentCollection;
|
|
348
|
-
$[26] =
|
|
340
|
+
$[26] = t14;
|
|
349
341
|
} else {
|
|
350
|
-
|
|
342
|
+
t14 = $[26];
|
|
351
343
|
}
|
|
352
|
-
let
|
|
353
|
-
if ($[27] !==
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
344
|
+
let t15;
|
|
345
|
+
if ($[27] !== t13 || $[28] !== t14) {
|
|
346
|
+
t15 = /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
347
|
+
t13,
|
|
348
|
+
t14
|
|
357
349
|
] });
|
|
358
|
-
$[27] =
|
|
359
|
-
$[28] =
|
|
360
|
-
$[29] =
|
|
350
|
+
$[27] = t13;
|
|
351
|
+
$[28] = t14;
|
|
352
|
+
$[29] = t15;
|
|
361
353
|
} else {
|
|
362
|
-
|
|
354
|
+
t15 = $[29];
|
|
363
355
|
}
|
|
364
|
-
const
|
|
365
|
-
|
|
366
|
-
let t21;
|
|
356
|
+
const t16 = values.name ?? "";
|
|
357
|
+
let t17;
|
|
367
358
|
if ($[30] !== updateName) {
|
|
368
|
-
|
|
359
|
+
t17 = (e) => updateName(e.target.value);
|
|
369
360
|
$[30] = updateName;
|
|
370
|
-
$[31] =
|
|
361
|
+
$[31] = t17;
|
|
362
|
+
} else {
|
|
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;
|
|
371
384
|
} else {
|
|
372
|
-
|
|
385
|
+
t22 = $[38];
|
|
373
386
|
}
|
|
374
|
-
const t22 = showErrors && Boolean(errors.name);
|
|
375
387
|
let t23;
|
|
376
|
-
if ($[
|
|
377
|
-
t23 = /* @__PURE__ */ jsxRuntime.
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
$[
|
|
388
|
+
if ($[39] !== t19 || $[40] !== t22) {
|
|
389
|
+
t23 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
390
|
+
t19,
|
|
391
|
+
t22
|
|
392
|
+
] });
|
|
393
|
+
$[39] = t19;
|
|
394
|
+
$[40] = t22;
|
|
395
|
+
$[41] = t23;
|
|
382
396
|
} else {
|
|
383
|
-
t23 = $[
|
|
397
|
+
t23 = $[41];
|
|
384
398
|
}
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
t26 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t24, children: t25 });
|
|
390
|
-
$[36] = t24;
|
|
391
|
-
$[37] = t25;
|
|
392
|
-
$[38] = t26;
|
|
399
|
+
let t24;
|
|
400
|
+
if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
|
|
401
|
+
t24 = ui.cls("col-span-12 ");
|
|
402
|
+
$[42] = t24;
|
|
393
403
|
} else {
|
|
394
|
-
|
|
404
|
+
t24 = $[42];
|
|
395
405
|
}
|
|
406
|
+
const t25 = !isNewCollection;
|
|
407
|
+
const t26 = showErrors && Boolean(errors.path);
|
|
396
408
|
let t27;
|
|
397
|
-
if ($[
|
|
398
|
-
t27 = /* @__PURE__ */ jsxRuntime.
|
|
399
|
-
|
|
400
|
-
|
|
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;
|
|
414
|
+
} else {
|
|
415
|
+
t27 = $[45];
|
|
416
|
+
}
|
|
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];
|
|
427
|
+
}
|
|
428
|
+
let t31;
|
|
429
|
+
if ($[49] !== t27 || $[50] !== t30) {
|
|
430
|
+
t31 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t24, children: [
|
|
431
|
+
t27,
|
|
432
|
+
t30
|
|
401
433
|
] });
|
|
402
|
-
$[
|
|
403
|
-
$[
|
|
404
|
-
$[
|
|
434
|
+
$[49] = t27;
|
|
435
|
+
$[50] = t30;
|
|
436
|
+
$[51] = t31;
|
|
405
437
|
} else {
|
|
406
|
-
|
|
438
|
+
t31 = $[51];
|
|
407
439
|
}
|
|
408
|
-
const
|
|
409
|
-
let
|
|
410
|
-
if ($[
|
|
411
|
-
|
|
412
|
-
$[
|
|
413
|
-
$[
|
|
414
|
-
} else {
|
|
415
|
-
|
|
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];
|
|
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;
|
|
446
|
+
} else {
|
|
447
|
+
t33 = $[53];
|
|
438
448
|
}
|
|
439
|
-
let
|
|
440
|
-
if ($[
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
]
|
|
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;
|
|
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;
|
|
466
455
|
} else {
|
|
467
|
-
|
|
456
|
+
t34 = $[56];
|
|
468
457
|
}
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
$[57] =
|
|
474
|
-
$[58] =
|
|
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;
|
|
475
464
|
} else {
|
|
476
|
-
|
|
465
|
+
t36 = $[58];
|
|
477
466
|
}
|
|
478
|
-
const
|
|
479
|
-
let
|
|
480
|
-
if ($[59] !==
|
|
481
|
-
|
|
482
|
-
$[59] =
|
|
483
|
-
$[60] =
|
|
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;
|
|
484
475
|
} else {
|
|
485
|
-
|
|
476
|
+
t38 = $[62];
|
|
486
477
|
}
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
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: [
|
|
478
|
+
let t39;
|
|
479
|
+
if ($[63] === Symbol.for("react.memo_cache_sentinel")) {
|
|
480
|
+
t39 = /* @__PURE__ */ jsxRuntime.jsxs(core.FieldCaption, { children: [
|
|
501
481
|
"When enabled, each document in this collection will have a history of changes. This is useful for auditing purposes. The data is stored in a subcollection of the document in your database, called ",
|
|
502
482
|
/* @__PURE__ */ jsxRuntime.jsx("b", { children: "__history" }),
|
|
503
483
|
"."
|
|
504
484
|
] });
|
|
505
|
-
$[
|
|
485
|
+
$[63] = t39;
|
|
506
486
|
} else {
|
|
507
|
-
|
|
487
|
+
t39 = $[63];
|
|
508
488
|
}
|
|
509
|
-
let
|
|
510
|
-
if ($[
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
489
|
+
let t40;
|
|
490
|
+
if ($[64] !== t38) {
|
|
491
|
+
t40 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
492
|
+
t38,
|
|
493
|
+
t39
|
|
514
494
|
] });
|
|
515
|
-
$[
|
|
516
|
-
$[
|
|
495
|
+
$[64] = t38;
|
|
496
|
+
$[65] = t40;
|
|
517
497
|
} else {
|
|
518
|
-
|
|
498
|
+
t40 = $[65];
|
|
519
499
|
}
|
|
520
|
-
let
|
|
521
|
-
if ($[
|
|
522
|
-
|
|
500
|
+
let t41;
|
|
501
|
+
if ($[66] === Symbol.for("react.memo_cache_sentinel")) {
|
|
502
|
+
t41 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row text-surface-500", children: [
|
|
523
503
|
/* @__PURE__ */ jsxRuntime.jsx(ui.SettingsIcon, {}),
|
|
524
504
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "ml-2", children: "Advanced" })
|
|
525
505
|
] });
|
|
526
|
-
$[
|
|
506
|
+
$[66] = t41;
|
|
527
507
|
} else {
|
|
528
|
-
|
|
508
|
+
t41 = $[66];
|
|
529
509
|
}
|
|
530
|
-
const
|
|
531
|
-
const
|
|
532
|
-
let
|
|
533
|
-
if ($[
|
|
534
|
-
|
|
535
|
-
$[
|
|
536
|
-
$[
|
|
537
|
-
$[
|
|
538
|
-
} else {
|
|
539
|
-
t50 = $[71];
|
|
540
|
-
}
|
|
541
|
-
const t51 = touched.id && Boolean(errors.id);
|
|
542
|
-
const t52 = touched.id && Boolean(errors.id) ? errors.id : "This id identifies this collection. Typically the same as the path.";
|
|
543
|
-
let t53;
|
|
544
|
-
if ($[72] !== t51 || $[73] !== t52) {
|
|
545
|
-
t53 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t51, children: t52 });
|
|
546
|
-
$[72] = t51;
|
|
547
|
-
$[73] = t52;
|
|
548
|
-
$[74] = t53;
|
|
549
|
-
} else {
|
|
550
|
-
t53 = $[74];
|
|
551
|
-
}
|
|
552
|
-
let t54;
|
|
553
|
-
if ($[75] !== t50 || $[76] !== t53) {
|
|
554
|
-
t54 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
555
|
-
t50,
|
|
556
|
-
t53
|
|
557
|
-
] });
|
|
558
|
-
$[75] = t50;
|
|
559
|
-
$[76] = t53;
|
|
560
|
-
$[77] = t54;
|
|
561
|
-
} else {
|
|
562
|
-
t54 = $[77];
|
|
563
|
-
}
|
|
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;
|
|
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;
|
|
574
518
|
} else {
|
|
575
|
-
|
|
519
|
+
t44 = $[69];
|
|
576
520
|
}
|
|
577
|
-
const
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
$[
|
|
583
|
-
$[
|
|
584
|
-
$[
|
|
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;
|
|
585
529
|
} else {
|
|
586
|
-
|
|
530
|
+
t47 = $[72];
|
|
587
531
|
}
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
$[
|
|
595
|
-
$[
|
|
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;
|
|
596
541
|
} else {
|
|
597
|
-
|
|
542
|
+
t48 = $[75];
|
|
598
543
|
}
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
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];
|
|
578
|
+
}
|
|
579
|
+
let t56;
|
|
580
|
+
if ($[86] !== t52 || $[87] !== t55) {
|
|
581
|
+
t56 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
582
|
+
t52,
|
|
583
|
+
t55
|
|
604
584
|
] });
|
|
605
|
-
$[
|
|
606
|
-
$[
|
|
607
|
-
$[
|
|
585
|
+
$[86] = t52;
|
|
586
|
+
$[87] = t55;
|
|
587
|
+
$[88] = t56;
|
|
608
588
|
} else {
|
|
609
|
-
|
|
589
|
+
t56 = $[88];
|
|
610
590
|
}
|
|
611
|
-
const
|
|
612
|
-
let
|
|
613
|
-
if ($[
|
|
614
|
-
|
|
591
|
+
const t57 = showErrors && Boolean(errors.sideDialogWidth);
|
|
592
|
+
let t58;
|
|
593
|
+
if ($[89] !== setFieldTouched || $[90] !== setFieldValue) {
|
|
594
|
+
t58 = (e_1) => {
|
|
615
595
|
setFieldTouched("sideDialogWidth", true);
|
|
616
596
|
const value_0 = e_1.target.value;
|
|
617
597
|
if (!value_0) {
|
|
@@ -622,404 +602,402 @@
|
|
|
622
602
|
}
|
|
623
603
|
}
|
|
624
604
|
};
|
|
625
|
-
$[
|
|
626
|
-
$[
|
|
627
|
-
$[
|
|
605
|
+
$[89] = setFieldTouched;
|
|
606
|
+
$[90] = setFieldValue;
|
|
607
|
+
$[91] = t58;
|
|
628
608
|
} else {
|
|
629
|
-
|
|
609
|
+
t58 = $[91];
|
|
630
610
|
}
|
|
631
|
-
let
|
|
632
|
-
if ($[
|
|
633
|
-
|
|
611
|
+
let t59;
|
|
612
|
+
if ($[92] !== setFieldValue) {
|
|
613
|
+
t59 = () => {
|
|
634
614
|
setFieldValue("sideDialogWidth", null);
|
|
635
615
|
};
|
|
636
|
-
$[
|
|
637
|
-
$[
|
|
616
|
+
$[92] = setFieldValue;
|
|
617
|
+
$[93] = t59;
|
|
618
|
+
} else {
|
|
619
|
+
t59 = $[93];
|
|
620
|
+
}
|
|
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;
|
|
626
|
+
} else {
|
|
627
|
+
t61 = $[94];
|
|
628
|
+
}
|
|
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;
|
|
638
635
|
} else {
|
|
639
|
-
|
|
636
|
+
t62 = $[97];
|
|
640
637
|
}
|
|
641
|
-
const
|
|
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";
|
|
642
652
|
let t67;
|
|
643
|
-
if ($[
|
|
644
|
-
t67 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
645
|
-
$[
|
|
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;
|
|
646
658
|
} else {
|
|
647
|
-
t67 = $[
|
|
659
|
+
t67 = $[105];
|
|
648
660
|
}
|
|
649
661
|
let t68;
|
|
650
|
-
if ($[
|
|
651
|
-
t68 = /* @__PURE__ */ jsxRuntime.
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
$[
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
$[105] = t71;
|
|
676
|
-
$[106] = t72;
|
|
677
|
-
$[107] = t73;
|
|
678
|
-
} else {
|
|
679
|
-
t73 = $[107];
|
|
680
|
-
}
|
|
662
|
+
if ($[106] !== t64 || $[107] !== t67) {
|
|
663
|
+
t68 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
664
|
+
t64,
|
|
665
|
+
t67
|
|
666
|
+
] });
|
|
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";
|
|
681
687
|
let t74;
|
|
682
|
-
if ($[
|
|
683
|
-
t74 = /* @__PURE__ */ jsxRuntime.
|
|
684
|
-
|
|
685
|
-
|
|
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
|
|
686
701
|
] });
|
|
687
|
-
$[
|
|
688
|
-
$[
|
|
689
|
-
$[
|
|
702
|
+
$[116] = t71;
|
|
703
|
+
$[117] = t74;
|
|
704
|
+
$[118] = t75;
|
|
690
705
|
} else {
|
|
691
|
-
|
|
706
|
+
t75 = $[118];
|
|
692
707
|
}
|
|
693
|
-
const
|
|
694
|
-
const t76 = values.description ?? "";
|
|
708
|
+
const t76 = values.defaultSize ?? "";
|
|
695
709
|
let t77;
|
|
696
|
-
if ($[
|
|
697
|
-
t77 =
|
|
698
|
-
$[
|
|
699
|
-
|
|
700
|
-
$[
|
|
701
|
-
|
|
710
|
+
if ($[119] === Symbol.for("react.memo_cache_sentinel")) {
|
|
711
|
+
t77 = ["xs", "s", "m", "l", "xl"].map(_temp2$8);
|
|
712
|
+
$[119] = t77;
|
|
713
|
+
} else {
|
|
714
|
+
t77 = $[119];
|
|
715
|
+
}
|
|
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$c, children: t77 }) });
|
|
719
|
+
$[120] = handleChange;
|
|
720
|
+
$[121] = t76;
|
|
721
|
+
$[122] = t78;
|
|
702
722
|
} else {
|
|
703
|
-
|
|
723
|
+
t78 = $[122];
|
|
704
724
|
}
|
|
705
|
-
const
|
|
706
|
-
const t79 = showErrors && Boolean(errors.description) ? errors.description : "Description of the collection, you can use markdown";
|
|
725
|
+
const t79 = values.includeJsonView === void 0 || values.includeJsonView ? "Include JSON view" : "Do not include JSON view";
|
|
707
726
|
let t80;
|
|
708
|
-
if ($[
|
|
709
|
-
t80 =
|
|
710
|
-
$[
|
|
711
|
-
$[
|
|
712
|
-
$[117] = t80;
|
|
727
|
+
if ($[123] !== setFieldValue) {
|
|
728
|
+
t80 = (v_0) => setFieldValue("includeJsonView", v_0);
|
|
729
|
+
$[123] = setFieldValue;
|
|
730
|
+
$[124] = t80;
|
|
713
731
|
} else {
|
|
714
|
-
t80 = $[
|
|
732
|
+
t80 = $[124];
|
|
715
733
|
}
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
]
|
|
722
|
-
$[
|
|
723
|
-
$[
|
|
724
|
-
$[120] = t81;
|
|
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;
|
|
725
742
|
} else {
|
|
726
|
-
|
|
743
|
+
t82 = $[128];
|
|
727
744
|
}
|
|
728
|
-
const t82 = values.defaultSize ?? "";
|
|
729
745
|
let t83;
|
|
730
|
-
if ($[
|
|
731
|
-
t83 =
|
|
732
|
-
$[
|
|
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;
|
|
733
749
|
} else {
|
|
734
|
-
t83 = $[
|
|
750
|
+
t83 = $[129];
|
|
735
751
|
}
|
|
736
752
|
let t84;
|
|
737
|
-
if ($[
|
|
738
|
-
t84 = /* @__PURE__ */ jsxRuntime.
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
753
|
+
if ($[130] !== t82) {
|
|
754
|
+
t84 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
755
|
+
t82,
|
|
756
|
+
t83
|
|
757
|
+
] });
|
|
758
|
+
$[130] = t82;
|
|
759
|
+
$[131] = t84;
|
|
742
760
|
} else {
|
|
743
|
-
t84 = $[
|
|
761
|
+
t84 = $[131];
|
|
744
762
|
}
|
|
745
|
-
const t85 =
|
|
763
|
+
const t85 = customIdValue === "code_defined";
|
|
746
764
|
let t86;
|
|
747
|
-
if ($[
|
|
748
|
-
t86 = (
|
|
749
|
-
|
|
750
|
-
|
|
765
|
+
if ($[132] !== setFieldValue) {
|
|
766
|
+
t86 = (v_1) => {
|
|
767
|
+
if (v_1 === "code_defined") {
|
|
768
|
+
throw new Error("This should not happen");
|
|
769
|
+
}
|
|
770
|
+
setFieldValue("customId", v_1);
|
|
771
|
+
};
|
|
772
|
+
$[132] = setFieldValue;
|
|
773
|
+
$[133] = t86;
|
|
751
774
|
} else {
|
|
752
|
-
t86 = $[
|
|
775
|
+
t86 = $[133];
|
|
753
776
|
}
|
|
754
|
-
const t87 =
|
|
777
|
+
const t87 = customIdValue ?? "";
|
|
755
778
|
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;
|
|
762
|
-
} else {
|
|
763
|
-
t88 = $[130];
|
|
764
|
-
}
|
|
765
779
|
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;
|
|
769
|
-
} else {
|
|
770
|
-
t89 = $[131];
|
|
771
|
-
}
|
|
772
780
|
let t90;
|
|
773
|
-
if ($[
|
|
774
|
-
|
|
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$5, children: [
|
|
775
796
|
t88,
|
|
776
|
-
t89
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
$[
|
|
797
|
+
t89,
|
|
798
|
+
t90
|
|
799
|
+
] }) });
|
|
800
|
+
$[137] = t85;
|
|
801
|
+
$[138] = t86;
|
|
802
|
+
$[139] = t87;
|
|
803
|
+
$[140] = t91;
|
|
780
804
|
} else {
|
|
781
|
-
|
|
805
|
+
t91 = $[140];
|
|
782
806
|
}
|
|
783
|
-
const t91 = customIdValue === "code_defined";
|
|
784
807
|
let t92;
|
|
785
|
-
if ($[
|
|
786
|
-
t92 = (
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
}
|
|
790
|
-
setFieldValue("customId", v_1);
|
|
791
|
-
};
|
|
792
|
-
$[134] = setFieldValue;
|
|
793
|
-
$[135] = t92;
|
|
808
|
+
if ($[141] !== setFieldValue) {
|
|
809
|
+
t92 = (v_2) => setFieldValue("collectionGroup", v_2);
|
|
810
|
+
$[141] = setFieldValue;
|
|
811
|
+
$[142] = t92;
|
|
794
812
|
} else {
|
|
795
|
-
t92 = $[
|
|
813
|
+
t92 = $[142];
|
|
796
814
|
}
|
|
797
|
-
const t93 =
|
|
815
|
+
const t93 = values.collectionGroup ?? false;
|
|
798
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;
|
|
822
|
+
} else {
|
|
823
|
+
t94 = $[145];
|
|
824
|
+
}
|
|
799
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;
|
|
829
|
+
} else {
|
|
830
|
+
t95 = $[146];
|
|
831
|
+
}
|
|
800
832
|
let t96;
|
|
801
|
-
if ($[
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
$[
|
|
807
|
-
$[
|
|
808
|
-
} else {
|
|
809
|
-
|
|
810
|
-
t95 = $[137];
|
|
811
|
-
t96 = $[138];
|
|
833
|
+
if ($[147] !== t94) {
|
|
834
|
+
t96 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-4", children: [
|
|
835
|
+
t94,
|
|
836
|
+
t95
|
|
837
|
+
] });
|
|
838
|
+
$[147] = t94;
|
|
839
|
+
$[148] = t96;
|
|
840
|
+
} else {
|
|
841
|
+
t96 = $[148];
|
|
812
842
|
}
|
|
813
843
|
let t97;
|
|
814
|
-
if ($[
|
|
815
|
-
t97 =
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
t96
|
|
819
|
-
] }) });
|
|
820
|
-
$[139] = t91;
|
|
821
|
-
$[140] = t92;
|
|
822
|
-
$[141] = t93;
|
|
823
|
-
$[142] = t97;
|
|
844
|
+
if ($[149] !== setFieldValue) {
|
|
845
|
+
t97 = (v_3) => setFieldValue("textSearchEnabled", v_3);
|
|
846
|
+
$[149] = setFieldValue;
|
|
847
|
+
$[150] = t97;
|
|
824
848
|
} else {
|
|
825
|
-
t97 = $[
|
|
849
|
+
t97 = $[150];
|
|
826
850
|
}
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
$[
|
|
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;
|
|
832
858
|
} else {
|
|
833
|
-
|
|
859
|
+
t99 = $[153];
|
|
834
860
|
}
|
|
835
|
-
const t99 = values.collectionGroup ?? false;
|
|
836
861
|
let t100;
|
|
837
|
-
if ($[
|
|
838
|
-
t100 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
839
|
-
$[
|
|
840
|
-
$[146] = t99;
|
|
841
|
-
$[147] = 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;
|
|
842
865
|
} else {
|
|
843
|
-
t100 = $[
|
|
866
|
+
t100 = $[154];
|
|
844
867
|
}
|
|
845
868
|
let t101;
|
|
846
|
-
if ($[
|
|
847
|
-
t101 = /* @__PURE__ */ jsxRuntime.
|
|
848
|
-
|
|
869
|
+
if ($[155] !== t99) {
|
|
870
|
+
t101 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
871
|
+
t99,
|
|
872
|
+
t100
|
|
873
|
+
] });
|
|
874
|
+
$[155] = t99;
|
|
875
|
+
$[156] = t101;
|
|
849
876
|
} else {
|
|
850
|
-
t101 = $[
|
|
877
|
+
t101 = $[156];
|
|
851
878
|
}
|
|
852
879
|
let t102;
|
|
853
|
-
if ($[
|
|
854
|
-
t102 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "
|
|
855
|
-
|
|
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,
|
|
887
|
+
t84,
|
|
888
|
+
t91,
|
|
889
|
+
t96,
|
|
856
890
|
t101
|
|
857
891
|
] });
|
|
858
|
-
$[
|
|
859
|
-
$[
|
|
860
|
-
|
|
861
|
-
|
|
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];
|
|
862
904
|
}
|
|
863
905
|
let t103;
|
|
864
|
-
if ($[
|
|
865
|
-
t103 =
|
|
866
|
-
$[
|
|
867
|
-
$[
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
let
|
|
873
|
-
if ($[
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
$[154] = t104;
|
|
877
|
-
$[155] = t105;
|
|
878
|
-
} else {
|
|
879
|
-
t105 = $[155];
|
|
880
|
-
}
|
|
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;
|
|
885
|
-
} else {
|
|
886
|
-
t106 = $[156];
|
|
887
|
-
}
|
|
888
|
-
let t107;
|
|
889
|
-
if ($[157] !== t105) {
|
|
890
|
-
t107 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
891
|
-
t105,
|
|
892
|
-
t106
|
|
893
|
-
] });
|
|
894
|
-
$[157] = t105;
|
|
895
|
-
$[158] = t107;
|
|
896
|
-
} else {
|
|
897
|
-
t107 = $[158];
|
|
898
|
-
}
|
|
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,
|
|
906
|
-
t84,
|
|
907
|
-
t90,
|
|
908
|
-
t97,
|
|
909
|
-
t102,
|
|
910
|
-
t107
|
|
911
|
-
] });
|
|
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];
|
|
933
|
-
}
|
|
934
|
-
let t110;
|
|
935
|
-
if ($[172] !== children || $[173] !== t109) {
|
|
936
|
-
t110 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-8", children: [
|
|
937
|
-
t109,
|
|
906
|
+
if ($[167] !== advancedPanelExpanded || $[168] !== t102) {
|
|
907
|
+
t103 = /* @__PURE__ */ jsxRuntime.jsx(ui.ExpandablePanel, { expanded: advancedPanelExpanded, onExpandedChange: setAdvancedPanelExpanded, title: t41, initiallyExpanded: false, children: t102 });
|
|
908
|
+
$[167] = advancedPanelExpanded;
|
|
909
|
+
$[168] = t102;
|
|
910
|
+
$[169] = t103;
|
|
911
|
+
} else {
|
|
912
|
+
t103 = $[169];
|
|
913
|
+
}
|
|
914
|
+
let t104;
|
|
915
|
+
if ($[170] !== children || $[171] !== t103) {
|
|
916
|
+
t104 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-8", children: [
|
|
917
|
+
t103,
|
|
938
918
|
children
|
|
939
919
|
] });
|
|
940
|
-
$[
|
|
941
|
-
$[
|
|
942
|
-
$[
|
|
920
|
+
$[170] = children;
|
|
921
|
+
$[171] = t103;
|
|
922
|
+
$[172] = t104;
|
|
943
923
|
} else {
|
|
944
|
-
|
|
924
|
+
t104 = $[172];
|
|
945
925
|
}
|
|
946
|
-
let
|
|
947
|
-
if ($[
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
926
|
+
let t105;
|
|
927
|
+
if ($[173] !== t104 || $[174] !== t23 || $[175] !== t31 || $[176] !== t34 || $[177] !== t40) {
|
|
928
|
+
t105 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-4", children: [
|
|
929
|
+
t23,
|
|
930
|
+
t31,
|
|
931
|
+
t34,
|
|
952
932
|
t40,
|
|
953
|
-
|
|
954
|
-
t110
|
|
933
|
+
t104
|
|
955
934
|
] });
|
|
956
|
-
$[
|
|
957
|
-
$[
|
|
958
|
-
$[
|
|
959
|
-
$[
|
|
960
|
-
$[
|
|
961
|
-
$[
|
|
962
|
-
$[181] = t111;
|
|
935
|
+
$[173] = t104;
|
|
936
|
+
$[174] = t23;
|
|
937
|
+
$[175] = t31;
|
|
938
|
+
$[176] = t34;
|
|
939
|
+
$[177] = t40;
|
|
940
|
+
$[178] = t105;
|
|
963
941
|
} else {
|
|
964
|
-
|
|
942
|
+
t105 = $[178];
|
|
965
943
|
}
|
|
966
|
-
let
|
|
967
|
-
if ($[
|
|
968
|
-
|
|
944
|
+
let t106;
|
|
945
|
+
if ($[179] === Symbol.for("react.memo_cache_sentinel")) {
|
|
946
|
+
t106 = /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
969
947
|
height: "52px"
|
|
970
948
|
} });
|
|
971
|
-
$[
|
|
949
|
+
$[179] = t106;
|
|
972
950
|
} else {
|
|
973
|
-
|
|
951
|
+
t106 = $[179];
|
|
974
952
|
}
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
953
|
+
const t107 = typeof values.icon === "string" ? values.icon : void 0;
|
|
954
|
+
let t108;
|
|
955
|
+
if ($[180] !== setFieldValue) {
|
|
956
|
+
t108 = (icon) => {
|
|
978
957
|
setIconDialogOpen(false);
|
|
979
958
|
setFieldValue("icon", icon);
|
|
980
959
|
};
|
|
981
|
-
$[
|
|
982
|
-
$[
|
|
960
|
+
$[180] = setFieldValue;
|
|
961
|
+
$[181] = t108;
|
|
983
962
|
} else {
|
|
984
|
-
|
|
963
|
+
t108 = $[181];
|
|
985
964
|
}
|
|
986
|
-
let
|
|
987
|
-
if ($[
|
|
988
|
-
|
|
989
|
-
$[
|
|
990
|
-
$[
|
|
991
|
-
$[
|
|
965
|
+
let t109;
|
|
966
|
+
if ($[182] !== t107 || $[183] !== t108) {
|
|
967
|
+
t109 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsxRuntime.jsx(core.SearchIconsView, { selectedIcon: t107, onIconSelected: t108 }) });
|
|
968
|
+
$[182] = t107;
|
|
969
|
+
$[183] = t108;
|
|
970
|
+
$[184] = t109;
|
|
992
971
|
} else {
|
|
993
|
-
|
|
972
|
+
t109 = $[184];
|
|
994
973
|
}
|
|
995
|
-
let
|
|
996
|
-
if ($[
|
|
997
|
-
|
|
998
|
-
$[
|
|
999
|
-
$[
|
|
1000
|
-
$[
|
|
974
|
+
let t110;
|
|
975
|
+
if ($[185] !== iconDialogOpen || $[186] !== t109) {
|
|
976
|
+
t110 = /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t109 });
|
|
977
|
+
$[185] = iconDialogOpen;
|
|
978
|
+
$[186] = t109;
|
|
979
|
+
$[187] = t110;
|
|
1001
980
|
} else {
|
|
1002
|
-
|
|
981
|
+
t110 = $[187];
|
|
1003
982
|
}
|
|
1004
|
-
let
|
|
1005
|
-
if ($[
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
983
|
+
let t111;
|
|
984
|
+
if ($[188] !== t105 || $[189] !== t110 || $[190] !== t15) {
|
|
985
|
+
t111 = /* @__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: [
|
|
986
|
+
t15,
|
|
987
|
+
t105,
|
|
988
|
+
t106,
|
|
989
|
+
t110
|
|
1011
990
|
] }) });
|
|
1012
|
-
$[
|
|
1013
|
-
$[
|
|
1014
|
-
$[
|
|
1015
|
-
$[
|
|
1016
|
-
$[195] = t116;
|
|
991
|
+
$[188] = t105;
|
|
992
|
+
$[189] = t110;
|
|
993
|
+
$[190] = t15;
|
|
994
|
+
$[191] = t111;
|
|
1017
995
|
} else {
|
|
1018
|
-
|
|
996
|
+
t111 = $[191];
|
|
1019
997
|
}
|
|
1020
|
-
return
|
|
998
|
+
return t111;
|
|
1021
999
|
}
|
|
1022
|
-
function _temp3$
|
|
1000
|
+
function _temp3$5(value_3) {
|
|
1023
1001
|
if (value_3 === "code_defined") {
|
|
1024
1002
|
return "Code defined";
|
|
1025
1003
|
} else {
|
|
@@ -1034,10 +1012,10 @@
|
|
|
1034
1012
|
}
|
|
1035
1013
|
}
|
|
1036
1014
|
}
|
|
1037
|
-
function _temp2$
|
|
1015
|
+
function _temp2$8(value_2) {
|
|
1038
1016
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: value_2, children: value_2.toUpperCase() }, `size-select-${value_2}`);
|
|
1039
1017
|
}
|
|
1040
|
-
function _temp$
|
|
1018
|
+
function _temp$c(value_1) {
|
|
1041
1019
|
return value_1.toUpperCase();
|
|
1042
1020
|
}
|
|
1043
1021
|
function DefaultDatabaseField(t0) {
|
|
@@ -1262,7 +1240,7 @@
|
|
|
1262
1240
|
inferredValues.add(enumValue_0.id);
|
|
1263
1241
|
});
|
|
1264
1242
|
setFieldValue(enumValuesPath, [...newEnumValues, ...currentEnumValues], true);
|
|
1265
|
-
}).catch(_temp$
|
|
1243
|
+
}).catch(_temp$b).finally(() => setInferring(false));
|
|
1266
1244
|
};
|
|
1267
1245
|
$[8] = enumValuesPath;
|
|
1268
1246
|
$[9] = getData;
|
|
@@ -1385,7 +1363,7 @@
|
|
|
1385
1363
|
}
|
|
1386
1364
|
return t15;
|
|
1387
1365
|
}
|
|
1388
|
-
function _temp$
|
|
1366
|
+
function _temp$b(e) {
|
|
1389
1367
|
console.error(e);
|
|
1390
1368
|
}
|
|
1391
1369
|
const EnumEntry = React.memo(function EnumEntryInternal(t0) {
|
|
@@ -2174,7 +2152,7 @@
|
|
|
2174
2152
|
t192 = $[42];
|
|
2175
2153
|
}
|
|
2176
2154
|
if ($[43] !== acceptedFiles || $[44] !== disabled || $[45] !== handleTypesChange || $[46] !== t172 || $[47] !== t182 || $[48] !== t192) {
|
|
2177
|
-
t10 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsx(ui.MultiSelect, { className: "w-full", placeholder: "All file types allowed", disabled, name: acceptedFiles, value: t172, onValueChange: handleTypesChange, label: t182, renderValues: _temp3$
|
|
2155
|
+
t10 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsx(ui.MultiSelect, { className: "w-full", placeholder: "All file types allowed", disabled, name: acceptedFiles, value: t172, onValueChange: handleTypesChange, label: t182, renderValues: _temp3$4, children: t192 }) });
|
|
2178
2156
|
$[43] = acceptedFiles;
|
|
2179
2157
|
$[44] = disabled;
|
|
2180
2158
|
$[45] = handleTypesChange;
|
|
@@ -2437,16 +2415,16 @@
|
|
|
2437
2415
|
}
|
|
2438
2416
|
return t24;
|
|
2439
2417
|
}
|
|
2440
|
-
function _temp3$
|
|
2418
|
+
function _temp3$4(selected) {
|
|
2441
2419
|
if (!selected || selected.length === 0) {
|
|
2442
2420
|
return "All file types allowed";
|
|
2443
2421
|
}
|
|
2444
|
-
return selected.map(_temp$
|
|
2422
|
+
return selected.map(_temp$a).filter(_temp2$7).join(", ");
|
|
2445
2423
|
}
|
|
2446
|
-
function _temp2$
|
|
2424
|
+
function _temp2$7(v_0) {
|
|
2447
2425
|
return Boolean(v_0);
|
|
2448
2426
|
}
|
|
2449
|
-
function _temp$
|
|
2427
|
+
function _temp$a(v) {
|
|
2450
2428
|
return fileTypes[v];
|
|
2451
2429
|
}
|
|
2452
2430
|
function editableProperty(property) {
|
|
@@ -2518,7 +2496,7 @@
|
|
|
2518
2496
|
const t4 = selected ? ui.cardSelectedMixin : "";
|
|
2519
2497
|
let t5;
|
|
2520
2498
|
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);
|
|
2499
|
+
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
2500
|
$[5] = borderColorClass;
|
|
2523
2501
|
$[6] = t3;
|
|
2524
2502
|
$[7] = t4;
|
|
@@ -4412,7 +4390,8 @@
|
|
|
4412
4390
|
existing,
|
|
4413
4391
|
multiple,
|
|
4414
4392
|
disabled,
|
|
4415
|
-
showErrors
|
|
4393
|
+
showErrors,
|
|
4394
|
+
asString
|
|
4416
4395
|
} = t0;
|
|
4417
4396
|
const {
|
|
4418
4397
|
values,
|
|
@@ -4430,7 +4409,7 @@
|
|
|
4430
4409
|
}
|
|
4431
4410
|
return t12;
|
|
4432
4411
|
}
|
|
4433
|
-
const pathPath = multiple ? "of.path" : "path";
|
|
4412
|
+
const pathPath = asString ? "reference.path" : multiple ? "of.path" : "path";
|
|
4434
4413
|
let t1;
|
|
4435
4414
|
if ($[1] !== pathPath || $[2] !== values) {
|
|
4436
4415
|
t1 = formex.getIn(values, pathPath);
|
|
@@ -4521,8 +4500,8 @@
|
|
|
4521
4500
|
const collections = t1;
|
|
4522
4501
|
let t2;
|
|
4523
4502
|
if ($[10] !== collections || $[11] !== disabled || $[12] !== error || $[13] !== handleChange || $[14] !== pathPath || $[15] !== props || $[16] !== value) {
|
|
4524
|
-
const groups = Array.from(new Set(Object.values(collections).map(_temp$
|
|
4525
|
-
const ungroupedCollections = collections.filter(_temp2$
|
|
4503
|
+
const groups = Array.from(new Set(Object.values(collections).map(_temp$9).filter(Boolean)).values());
|
|
4504
|
+
const ungroupedCollections = collections.filter(_temp2$6);
|
|
4526
4505
|
let t32;
|
|
4527
4506
|
if ($[18] !== collections) {
|
|
4528
4507
|
t32 = (selected) => {
|
|
@@ -4553,7 +4532,7 @@
|
|
|
4553
4532
|
}
|
|
4554
4533
|
t2 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Select, { error: Boolean(error), disabled, value: value ?? "", position: "item-aligned", name: pathPath, size: "large", fullWidth: true, onChange: handleChange, label: "Target collection", renderValue: t32, ...props, children: [
|
|
4555
4534
|
groups.flatMap(t42),
|
|
4556
|
-
ungroupedCollections && /* @__PURE__ */ jsxRuntime.jsx(ui.SelectGroup, { label: "Views", children: ungroupedCollections.map(_temp3$
|
|
4535
|
+
ungroupedCollections && /* @__PURE__ */ jsxRuntime.jsx(ui.SelectGroup, { label: "Views", children: ungroupedCollections.map(_temp3$3) })
|
|
4557
4536
|
] });
|
|
4558
4537
|
$[10] = collections;
|
|
4559
4538
|
$[11] = disabled;
|
|
@@ -4586,16 +4565,16 @@
|
|
|
4586
4565
|
}
|
|
4587
4566
|
return t4;
|
|
4588
4567
|
}
|
|
4589
|
-
function _temp3$
|
|
4568
|
+
function _temp3$3(collection_2) {
|
|
4590
4569
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: collection_2.id ?? collection_2.path, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row", children: [
|
|
4591
4570
|
/* @__PURE__ */ jsxRuntime.jsx(core.IconForView, { collectionOrView: collection_2 }),
|
|
4592
4571
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "font-medium ml-4", children: collection_2?.name.toUpperCase() })
|
|
4593
4572
|
] }) }, collection_2.id ?? collection_2.path);
|
|
4594
4573
|
}
|
|
4595
|
-
function _temp2$
|
|
4574
|
+
function _temp2$6(col) {
|
|
4596
4575
|
return !col.group;
|
|
4597
4576
|
}
|
|
4598
|
-
function _temp$
|
|
4577
|
+
function _temp$9(e) {
|
|
4599
4578
|
return e.group;
|
|
4600
4579
|
}
|
|
4601
4580
|
function DateTimePropertyField(t0) {
|
|
@@ -4670,7 +4649,7 @@
|
|
|
4670
4649
|
}
|
|
4671
4650
|
let t10;
|
|
4672
4651
|
if ($[14] !== disabled || $[15] !== t5 || $[16] !== t6 || $[17] !== t7) {
|
|
4673
|
-
t10 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Select, { name: "mode", value: t5, error: t6, size: "large", onValueChange: t7, label: "Mode", fullWidth: true, renderValue: _temp$
|
|
4652
|
+
t10 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Select, { name: "mode", value: t5, error: t6, size: "large", onValueChange: t7, label: "Mode", fullWidth: true, renderValue: _temp$8, disabled, children: [
|
|
4674
4653
|
t8,
|
|
4675
4654
|
t9
|
|
4676
4655
|
] });
|
|
@@ -4731,7 +4710,7 @@
|
|
|
4731
4710
|
}
|
|
4732
4711
|
let t20;
|
|
4733
4712
|
if ($[30] !== disabled || $[31] !== t14 || $[32] !== t15 || $[33] !== t16) {
|
|
4734
|
-
t20 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Select, { name: "autoValue", disabled, size: "large", fullWidth: true, value: t14, onValueChange: t15, renderValue: _temp2$
|
|
4713
|
+
t20 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Select, { name: "autoValue", disabled, size: "large", fullWidth: true, value: t14, onValueChange: t15, renderValue: _temp2$5, error: t16, label: "Automatic value", children: [
|
|
4735
4714
|
t17,
|
|
4736
4715
|
t18,
|
|
4737
4716
|
t19
|
|
@@ -4801,7 +4780,7 @@
|
|
|
4801
4780
|
}
|
|
4802
4781
|
return t27;
|
|
4803
4782
|
}
|
|
4804
|
-
function _temp2$
|
|
4783
|
+
function _temp2$5(v_2) {
|
|
4805
4784
|
switch (v_2) {
|
|
4806
4785
|
case "on_create": {
|
|
4807
4786
|
return "On create";
|
|
@@ -4814,7 +4793,7 @@
|
|
|
4814
4793
|
}
|
|
4815
4794
|
}
|
|
4816
4795
|
}
|
|
4817
|
-
function _temp$
|
|
4796
|
+
function _temp$8(v_0) {
|
|
4818
4797
|
switch (v_0) {
|
|
4819
4798
|
case "date_time": {
|
|
4820
4799
|
return "Date/Time";
|
|
@@ -5039,6 +5018,12 @@
|
|
|
5039
5018
|
propertyConfig: "reference",
|
|
5040
5019
|
editable: propertyData.editable !== void 0 ? propertyData.editable : true
|
|
5041
5020
|
});
|
|
5021
|
+
} else if (selectedWidgetId === "reference_as_string") {
|
|
5022
|
+
updatedProperty = core.mergeDeep(propertyData, {
|
|
5023
|
+
dataType: "string",
|
|
5024
|
+
propertyConfig: "reference_as_string",
|
|
5025
|
+
editable: propertyData.editable !== void 0 ? propertyData.editable : true
|
|
5026
|
+
});
|
|
5042
5027
|
} else if (selectedWidgetId === "multi_references") {
|
|
5043
5028
|
updatedProperty = core.mergeDeep(propertyData, {
|
|
5044
5029
|
dataType: "array",
|
|
@@ -5139,7 +5124,7 @@
|
|
|
5139
5124
|
}
|
|
5140
5125
|
let t8;
|
|
5141
5126
|
if ($[8] !== disabled || $[9] !== t2 || $[10] !== t3) {
|
|
5142
|
-
t8 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Select, { disabled, position: "item-aligned", fullWidth: true, onValueChange: t2, label: "Preview type", renderValue: _temp$
|
|
5127
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Select, { disabled, position: "item-aligned", fullWidth: true, onValueChange: t2, label: "Preview type", renderValue: _temp$7, value: t3, children: [
|
|
5143
5128
|
t4,
|
|
5144
5129
|
t5,
|
|
5145
5130
|
t6,
|
|
@@ -5205,7 +5190,7 @@
|
|
|
5205
5190
|
}
|
|
5206
5191
|
return t13;
|
|
5207
5192
|
}
|
|
5208
|
-
function _temp$
|
|
5193
|
+
function _temp$7(value_0) {
|
|
5209
5194
|
switch (value_0) {
|
|
5210
5195
|
case "image": {
|
|
5211
5196
|
return "Image";
|
|
@@ -5221,7 +5206,7 @@
|
|
|
5221
5206
|
}
|
|
5222
5207
|
}
|
|
5223
5208
|
}
|
|
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"];
|
|
5209
|
+
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
5210
|
const supportedFields = Object.entries(core.DEFAULT_FIELD_CONFIGS).filter(([id]) => supportedFieldsIds.includes(id)).map(([id, config]) => ({
|
|
5226
5211
|
[id]: config
|
|
5227
5212
|
})).reduce((a, b) => ({
|
|
@@ -5845,7 +5830,7 @@
|
|
|
5845
5830
|
}
|
|
5846
5831
|
let t7;
|
|
5847
5832
|
if ($[20] !== onCancel) {
|
|
5848
|
-
t7 = onCancel && /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", onClick: () => {
|
|
5833
|
+
t7 = onCancel && /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", color: "primary", onClick: () => {
|
|
5849
5834
|
onCancel();
|
|
5850
5835
|
formexRef.current?.resetForm();
|
|
5851
5836
|
}, children: "Cancel" });
|
|
@@ -5897,7 +5882,7 @@
|
|
|
5897
5882
|
return t11;
|
|
5898
5883
|
}
|
|
5899
5884
|
function PropertyEditFormFields(t0) {
|
|
5900
|
-
const $ = reactCompilerRuntime.c(
|
|
5885
|
+
const $ = reactCompilerRuntime.c(146);
|
|
5901
5886
|
const {
|
|
5902
5887
|
values,
|
|
5903
5888
|
errors,
|
|
@@ -6186,59 +6171,73 @@
|
|
|
6186
6171
|
}
|
|
6187
6172
|
childComponent = t102;
|
|
6188
6173
|
} else {
|
|
6189
|
-
if (selectedFieldConfigId === "
|
|
6174
|
+
if (selectedFieldConfigId === "reference_as_string") {
|
|
6190
6175
|
let t102;
|
|
6191
|
-
if ($[75] !== disabled) {
|
|
6192
|
-
t102 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
6176
|
+
if ($[75] !== disabled || $[76] !== existing || $[77] !== showErrors) {
|
|
6177
|
+
t102 = /* @__PURE__ */ jsxRuntime.jsx(ReferencePropertyField, { showErrors, existing, asString: true, multiple: false, disabled });
|
|
6193
6178
|
$[75] = disabled;
|
|
6194
|
-
$[76] =
|
|
6179
|
+
$[76] = existing;
|
|
6180
|
+
$[77] = showErrors;
|
|
6181
|
+
$[78] = t102;
|
|
6195
6182
|
} else {
|
|
6196
|
-
t102 = $[
|
|
6183
|
+
t102 = $[78];
|
|
6197
6184
|
}
|
|
6198
6185
|
childComponent = t102;
|
|
6199
6186
|
} else {
|
|
6200
|
-
if (selectedFieldConfigId === "
|
|
6187
|
+
if (selectedFieldConfigId === "date_time") {
|
|
6201
6188
|
let t102;
|
|
6202
|
-
if ($[
|
|
6203
|
-
t102 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
6204
|
-
$[
|
|
6205
|
-
$[78] = existing;
|
|
6206
|
-
$[79] = showErrors;
|
|
6189
|
+
if ($[79] !== disabled) {
|
|
6190
|
+
t102 = /* @__PURE__ */ jsxRuntime.jsx(DateTimePropertyField, { disabled });
|
|
6191
|
+
$[79] = disabled;
|
|
6207
6192
|
$[80] = t102;
|
|
6208
6193
|
} else {
|
|
6209
6194
|
t102 = $[80];
|
|
6210
6195
|
}
|
|
6211
6196
|
childComponent = t102;
|
|
6212
6197
|
} else {
|
|
6213
|
-
if (selectedFieldConfigId === "
|
|
6198
|
+
if (selectedFieldConfigId === "multi_references") {
|
|
6214
6199
|
let t102;
|
|
6215
|
-
if ($[81] !==
|
|
6216
|
-
t102 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
6217
|
-
$[81] =
|
|
6218
|
-
$[82] =
|
|
6219
|
-
$[83] =
|
|
6220
|
-
$[84] =
|
|
6221
|
-
$[85] = getData;
|
|
6222
|
-
$[86] = propertyConfigs;
|
|
6223
|
-
$[87] = showErrors;
|
|
6224
|
-
$[88] = t102;
|
|
6200
|
+
if ($[81] !== disabled || $[82] !== existing || $[83] !== showErrors) {
|
|
6201
|
+
t102 = /* @__PURE__ */ jsxRuntime.jsx(ReferencePropertyField, { showErrors, existing, multiple: true, disabled });
|
|
6202
|
+
$[81] = disabled;
|
|
6203
|
+
$[82] = existing;
|
|
6204
|
+
$[83] = showErrors;
|
|
6205
|
+
$[84] = t102;
|
|
6225
6206
|
} else {
|
|
6226
|
-
t102 = $[
|
|
6207
|
+
t102 = $[84];
|
|
6227
6208
|
}
|
|
6228
6209
|
childComponent = t102;
|
|
6229
6210
|
} else {
|
|
6230
|
-
if (selectedFieldConfigId === "
|
|
6211
|
+
if (selectedFieldConfigId === "repeat") {
|
|
6231
6212
|
let t102;
|
|
6232
|
-
if ($[89] !==
|
|
6233
|
-
t102 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
6234
|
-
$[
|
|
6235
|
-
$[
|
|
6213
|
+
if ($[85] !== allowDataInference || $[86] !== collectionEditable || $[87] !== disabled || $[88] !== existing || $[89] !== getData || $[90] !== propertyConfigs || $[91] !== showErrors) {
|
|
6214
|
+
t102 = /* @__PURE__ */ jsxRuntime.jsx(RepeatPropertyField, { showErrors, existing, getData, allowDataInference, disabled, collectionEditable, propertyConfigs });
|
|
6215
|
+
$[85] = allowDataInference;
|
|
6216
|
+
$[86] = collectionEditable;
|
|
6217
|
+
$[87] = disabled;
|
|
6218
|
+
$[88] = existing;
|
|
6219
|
+
$[89] = getData;
|
|
6220
|
+
$[90] = propertyConfigs;
|
|
6221
|
+
$[91] = showErrors;
|
|
6222
|
+
$[92] = t102;
|
|
6236
6223
|
} else {
|
|
6237
|
-
t102 = $[
|
|
6224
|
+
t102 = $[92];
|
|
6238
6225
|
}
|
|
6239
6226
|
childComponent = t102;
|
|
6240
6227
|
} else {
|
|
6241
|
-
|
|
6228
|
+
if (selectedFieldConfigId === "key_value") {
|
|
6229
|
+
let t102;
|
|
6230
|
+
if ($[93] !== disabled) {
|
|
6231
|
+
t102 = /* @__PURE__ */ jsxRuntime.jsx(KeyValuePropertyField, { disabled });
|
|
6232
|
+
$[93] = disabled;
|
|
6233
|
+
$[94] = t102;
|
|
6234
|
+
} else {
|
|
6235
|
+
t102 = $[94];
|
|
6236
|
+
}
|
|
6237
|
+
childComponent = t102;
|
|
6238
|
+
} else {
|
|
6239
|
+
childComponent = null;
|
|
6240
|
+
}
|
|
6242
6241
|
}
|
|
6243
6242
|
}
|
|
6244
6243
|
}
|
|
@@ -6256,7 +6255,7 @@
|
|
|
6256
6255
|
}
|
|
6257
6256
|
}
|
|
6258
6257
|
let t10;
|
|
6259
|
-
if ($[
|
|
6258
|
+
if ($[95] !== disabled) {
|
|
6260
6259
|
t10 = disabled && /* @__PURE__ */ jsxRuntime.jsxs(ui.InfoLabel, { mode: "warn", children: [
|
|
6261
6260
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { children: "This property can't be edited" }),
|
|
6262
6261
|
/* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "caption", children: [
|
|
@@ -6265,157 +6264,157 @@
|
|
|
6265
6264
|
" flag"
|
|
6266
6265
|
] })
|
|
6267
6266
|
] });
|
|
6268
|
-
$[
|
|
6269
|
-
$[
|
|
6267
|
+
$[95] = disabled;
|
|
6268
|
+
$[96] = t10;
|
|
6270
6269
|
} else {
|
|
6271
|
-
t10 = $[
|
|
6270
|
+
t10 = $[96];
|
|
6272
6271
|
}
|
|
6273
6272
|
const t11 = selectedFieldConfigId;
|
|
6274
6273
|
let t12;
|
|
6275
|
-
if ($[
|
|
6274
|
+
if ($[97] !== onWidgetSelectChanged) {
|
|
6276
6275
|
t12 = (value) => onWidgetSelectChanged(value);
|
|
6277
|
-
$[
|
|
6278
|
-
$[
|
|
6276
|
+
$[97] = onWidgetSelectChanged;
|
|
6277
|
+
$[98] = t12;
|
|
6279
6278
|
} else {
|
|
6280
|
-
t12 = $[
|
|
6279
|
+
t12 = $[98];
|
|
6281
6280
|
}
|
|
6282
6281
|
let t13;
|
|
6283
|
-
if ($[
|
|
6282
|
+
if ($[99] !== onDismiss) {
|
|
6284
6283
|
t13 = (open, hasValue) => {
|
|
6285
6284
|
if (!hasValue) {
|
|
6286
6285
|
onDismiss?.();
|
|
6287
6286
|
}
|
|
6288
6287
|
setSelectOpen(open);
|
|
6289
6288
|
};
|
|
6290
|
-
$[
|
|
6291
|
-
$[
|
|
6289
|
+
$[99] = onDismiss;
|
|
6290
|
+
$[100] = t13;
|
|
6292
6291
|
} else {
|
|
6293
|
-
t13 = $[
|
|
6292
|
+
t13 = $[100];
|
|
6294
6293
|
}
|
|
6295
6294
|
const t14 = Boolean(selectedWidgetError);
|
|
6296
6295
|
let t15;
|
|
6297
|
-
if ($[
|
|
6296
|
+
if ($[101] !== disabled || $[102] !== existing || $[103] !== inArray || $[104] !== propertyConfigs || $[105] !== selectOpen || $[106] !== t11 || $[107] !== t12 || $[108] !== t13 || $[109] !== t14 || $[110] !== values) {
|
|
6298
6297
|
t15 = /* @__PURE__ */ jsxRuntime.jsx(WidgetSelectView, { initialProperty: values, value: t11, onValueChange: t12, open: selectOpen, onOpenChange: t13, disabled, showError: t14, existing, propertyConfigs, inArray });
|
|
6299
|
-
$[
|
|
6300
|
-
$[
|
|
6301
|
-
$[
|
|
6302
|
-
$[
|
|
6303
|
-
$[
|
|
6304
|
-
$[
|
|
6305
|
-
$[
|
|
6306
|
-
$[
|
|
6307
|
-
$[
|
|
6308
|
-
$[
|
|
6309
|
-
$[
|
|
6310
|
-
} else {
|
|
6311
|
-
t15 = $[
|
|
6298
|
+
$[101] = disabled;
|
|
6299
|
+
$[102] = existing;
|
|
6300
|
+
$[103] = inArray;
|
|
6301
|
+
$[104] = propertyConfigs;
|
|
6302
|
+
$[105] = selectOpen;
|
|
6303
|
+
$[106] = t11;
|
|
6304
|
+
$[107] = t12;
|
|
6305
|
+
$[108] = t13;
|
|
6306
|
+
$[109] = t14;
|
|
6307
|
+
$[110] = values;
|
|
6308
|
+
$[111] = t15;
|
|
6309
|
+
} else {
|
|
6310
|
+
t15 = $[111];
|
|
6312
6311
|
}
|
|
6313
6312
|
let t16;
|
|
6314
|
-
if ($[
|
|
6313
|
+
if ($[112] !== selectedWidgetError) {
|
|
6315
6314
|
t16 = selectedWidgetError && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "ml-3.5", color: "error", children: "Required" });
|
|
6316
|
-
$[
|
|
6317
|
-
$[
|
|
6315
|
+
$[112] = selectedWidgetError;
|
|
6316
|
+
$[113] = t16;
|
|
6318
6317
|
} else {
|
|
6319
|
-
t16 = $[
|
|
6318
|
+
t16 = $[113];
|
|
6320
6319
|
}
|
|
6321
6320
|
let t17;
|
|
6322
|
-
if ($[
|
|
6321
|
+
if ($[114] !== t15 || $[115] !== t16) {
|
|
6323
6322
|
t17 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex flex-col gap-2", children: [
|
|
6324
6323
|
t15,
|
|
6325
6324
|
t16
|
|
6326
6325
|
] });
|
|
6327
|
-
$[
|
|
6328
|
-
$[
|
|
6329
|
-
$[
|
|
6326
|
+
$[114] = t15;
|
|
6327
|
+
$[115] = t16;
|
|
6328
|
+
$[116] = t17;
|
|
6330
6329
|
} else {
|
|
6331
|
-
t17 = $[
|
|
6330
|
+
t17 = $[116];
|
|
6332
6331
|
}
|
|
6333
6332
|
let t18;
|
|
6334
|
-
if ($[
|
|
6333
|
+
if ($[117] !== disabled || $[118] !== onDelete || $[119] !== values?.id) {
|
|
6335
6334
|
t18 = onDelete && values?.id && /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { variant: "ghost", className: "m-4", disabled, onClick: () => setDeleteDialogOpen(true), children: /* @__PURE__ */ jsxRuntime.jsx(ui.DeleteIcon, {}) });
|
|
6336
|
-
$[
|
|
6337
|
-
$[
|
|
6338
|
-
$[
|
|
6339
|
-
$[
|
|
6335
|
+
$[117] = disabled;
|
|
6336
|
+
$[118] = onDelete;
|
|
6337
|
+
$[119] = values?.id;
|
|
6338
|
+
$[120] = t18;
|
|
6340
6339
|
} else {
|
|
6341
|
-
t18 = $[
|
|
6340
|
+
t18 = $[120];
|
|
6342
6341
|
}
|
|
6343
6342
|
let t19;
|
|
6344
|
-
if ($[
|
|
6343
|
+
if ($[121] !== t17 || $[122] !== t18) {
|
|
6345
6344
|
t19 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex mt-2 justify-between", children: [
|
|
6346
6345
|
t17,
|
|
6347
6346
|
t18
|
|
6348
6347
|
] });
|
|
6349
|
-
$[
|
|
6350
|
-
$[
|
|
6351
|
-
$[
|
|
6348
|
+
$[121] = t17;
|
|
6349
|
+
$[122] = t18;
|
|
6350
|
+
$[123] = t19;
|
|
6352
6351
|
} else {
|
|
6353
|
-
t19 = $[
|
|
6352
|
+
t19 = $[123];
|
|
6354
6353
|
}
|
|
6355
6354
|
let t20;
|
|
6356
|
-
if ($[
|
|
6355
|
+
if ($[124] !== autoUpdateId || $[125] !== disabled || $[126] !== existing || $[127] !== includeIdAndTitle || $[128] !== showErrors) {
|
|
6357
6356
|
t20 = includeIdAndTitle && /* @__PURE__ */ jsxRuntime.jsx(CommonPropertyFields, { showErrors, disabledId: existing, isNewProperty: !existing, disabled, autoUpdateId, ref: nameFieldRef });
|
|
6358
|
-
$[
|
|
6359
|
-
$[
|
|
6360
|
-
$[
|
|
6361
|
-
$[
|
|
6362
|
-
$[
|
|
6363
|
-
$[
|
|
6357
|
+
$[124] = autoUpdateId;
|
|
6358
|
+
$[125] = disabled;
|
|
6359
|
+
$[126] = existing;
|
|
6360
|
+
$[127] = includeIdAndTitle;
|
|
6361
|
+
$[128] = showErrors;
|
|
6362
|
+
$[129] = t20;
|
|
6364
6363
|
} else {
|
|
6365
|
-
t20 = $[
|
|
6364
|
+
t20 = $[129];
|
|
6366
6365
|
}
|
|
6367
6366
|
let t21;
|
|
6368
|
-
if ($[
|
|
6367
|
+
if ($[130] !== disabled) {
|
|
6369
6368
|
t21 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsx(AdvancedPropertyValidation, { disabled }) });
|
|
6370
|
-
$[
|
|
6371
|
-
$[
|
|
6369
|
+
$[130] = disabled;
|
|
6370
|
+
$[131] = t21;
|
|
6372
6371
|
} else {
|
|
6373
|
-
t21 = $[
|
|
6372
|
+
t21 = $[131];
|
|
6374
6373
|
}
|
|
6375
6374
|
let t22;
|
|
6376
|
-
if ($[
|
|
6375
|
+
if ($[132] !== childComponent || $[133] !== t20 || $[134] !== t21) {
|
|
6377
6376
|
t22 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-y-12 mt-8 mb-8", children: [
|
|
6378
6377
|
t20,
|
|
6379
6378
|
childComponent,
|
|
6380
6379
|
t21
|
|
6381
6380
|
] });
|
|
6382
|
-
$[
|
|
6383
|
-
$[
|
|
6384
|
-
$[
|
|
6385
|
-
$[
|
|
6381
|
+
$[132] = childComponent;
|
|
6382
|
+
$[133] = t20;
|
|
6383
|
+
$[134] = t21;
|
|
6384
|
+
$[135] = t22;
|
|
6386
6385
|
} else {
|
|
6387
|
-
t22 = $[
|
|
6386
|
+
t22 = $[135];
|
|
6388
6387
|
}
|
|
6389
6388
|
let t23;
|
|
6390
|
-
if ($[
|
|
6389
|
+
if ($[136] !== deleteDialogOpen || $[137] !== onDelete || $[138] !== propertyNamespace || $[139] !== values?.id) {
|
|
6391
6390
|
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
6391
|
" This will ",
|
|
6393
6392
|
/* @__PURE__ */ jsxRuntime.jsx("b", { children: "not delete any data" }),
|
|
6394
6393
|
", only modify the collection."
|
|
6395
6394
|
] }) });
|
|
6396
|
-
$[
|
|
6397
|
-
$[
|
|
6398
|
-
$[
|
|
6399
|
-
$[
|
|
6400
|
-
$[
|
|
6395
|
+
$[136] = deleteDialogOpen;
|
|
6396
|
+
$[137] = onDelete;
|
|
6397
|
+
$[138] = propertyNamespace;
|
|
6398
|
+
$[139] = values?.id;
|
|
6399
|
+
$[140] = t23;
|
|
6401
6400
|
} else {
|
|
6402
|
-
t23 = $[
|
|
6401
|
+
t23 = $[140];
|
|
6403
6402
|
}
|
|
6404
6403
|
let t24;
|
|
6405
|
-
if ($[
|
|
6404
|
+
if ($[141] !== t10 || $[142] !== t19 || $[143] !== t22 || $[144] !== t23) {
|
|
6406
6405
|
t24 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6407
6406
|
t10,
|
|
6408
6407
|
t19,
|
|
6409
6408
|
t22,
|
|
6410
6409
|
t23
|
|
6411
6410
|
] });
|
|
6412
|
-
$[
|
|
6413
|
-
$[
|
|
6414
|
-
$[
|
|
6415
|
-
$[
|
|
6416
|
-
$[
|
|
6411
|
+
$[141] = t10;
|
|
6412
|
+
$[142] = t19;
|
|
6413
|
+
$[143] = t22;
|
|
6414
|
+
$[144] = t23;
|
|
6415
|
+
$[145] = t24;
|
|
6417
6416
|
} else {
|
|
6418
|
-
t24 = $[
|
|
6417
|
+
t24 = $[145];
|
|
6419
6418
|
}
|
|
6420
6419
|
return t24;
|
|
6421
6420
|
}
|
|
@@ -6455,6 +6454,7 @@
|
|
|
6455
6454
|
file_upload: "File",
|
|
6456
6455
|
multi_file_upload: "File",
|
|
6457
6456
|
reference: "Reference",
|
|
6457
|
+
reference_as_string: "Text",
|
|
6458
6458
|
multi_references: "Reference",
|
|
6459
6459
|
date_time: "Date",
|
|
6460
6460
|
group: "Group",
|
|
@@ -6486,7 +6486,7 @@
|
|
|
6486
6486
|
let t6;
|
|
6487
6487
|
if ($[0] !== disabled || $[1] !== existing || $[2] !== inArray || $[3] !== initialProperty || $[4] !== onOpenChange || $[5] !== onValueChange || $[6] !== open || $[7] !== propertyConfigs || $[8] !== value) {
|
|
6488
6488
|
const allSupportedFields = Object.entries(supportedFields).concat(Object.entries(propertyConfigs));
|
|
6489
|
-
const displayedWidgets = (inArray ? allSupportedFields.filter(_temp$
|
|
6489
|
+
const displayedWidgets = (inArray ? allSupportedFields.filter(_temp$6) : allSupportedFields).map(_temp2$4).reduce(_temp3$2, {});
|
|
6490
6490
|
const key_0 = value;
|
|
6491
6491
|
const propertyConfig_1 = key_0 ? core.DEFAULT_FIELD_CONFIGS[key_0] ?? propertyConfigs[key_0] : void 0;
|
|
6492
6492
|
const baseProperty = propertyConfig_1?.property;
|
|
@@ -6668,19 +6668,19 @@
|
|
|
6668
6668
|
}
|
|
6669
6669
|
return "Custom/Other";
|
|
6670
6670
|
}
|
|
6671
|
-
function _temp3$
|
|
6671
|
+
function _temp3$2(a, b) {
|
|
6672
6672
|
return {
|
|
6673
6673
|
...a,
|
|
6674
6674
|
...b
|
|
6675
6675
|
};
|
|
6676
6676
|
}
|
|
6677
|
-
function _temp2$
|
|
6677
|
+
function _temp2$4(t0) {
|
|
6678
6678
|
const [key, propertyConfig_0] = t0;
|
|
6679
6679
|
return {
|
|
6680
6680
|
[key]: propertyConfig_0
|
|
6681
6681
|
};
|
|
6682
6682
|
}
|
|
6683
|
-
function _temp$
|
|
6683
|
+
function _temp$6(t0) {
|
|
6684
6684
|
const [, propertyConfig] = t0;
|
|
6685
6685
|
return !core.isPropertyBuilder(propertyConfig.property) && propertyConfig.property?.dataType !== "array";
|
|
6686
6686
|
}
|
|
@@ -6774,7 +6774,7 @@
|
|
|
6774
6774
|
}
|
|
6775
6775
|
let t10;
|
|
6776
6776
|
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 });
|
|
6777
|
+
t10 = /* @__PURE__ */ jsxRuntime.jsx(ui.Card, { onClick, className: "flex flex-row items-center px-4 py-2 m-1", children: t9 });
|
|
6778
6778
|
$[20] = onClick;
|
|
6779
6779
|
$[21] = t9;
|
|
6780
6780
|
$[22] = t10;
|
|
@@ -6828,7 +6828,7 @@
|
|
|
6828
6828
|
if ($[3] !== code) {
|
|
6829
6829
|
t3 = /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogContent, { children: [
|
|
6830
6830
|
t2,
|
|
6831
|
-
/* @__PURE__ */ jsxRuntime.jsx(prismReactRenderer.Highlight, { theme: prismReactRenderer.themes.vsDark, code, language: "typescript", children: _temp$
|
|
6831
|
+
/* @__PURE__ */ jsxRuntime.jsx(prismReactRenderer.Highlight, { theme: prismReactRenderer.themes.vsDark, code, language: "typescript", children: _temp$5 })
|
|
6832
6832
|
] });
|
|
6833
6833
|
$[3] = code;
|
|
6834
6834
|
$[4] = t3;
|
|
@@ -6842,7 +6842,7 @@
|
|
|
6842
6842
|
e.preventDefault();
|
|
6843
6843
|
snackbarController.open({
|
|
6844
6844
|
type: "success",
|
|
6845
|
-
message:
|
|
6845
|
+
message: "Copied"
|
|
6846
6846
|
});
|
|
6847
6847
|
return navigator.clipboard.writeText(code);
|
|
6848
6848
|
};
|
|
@@ -6861,7 +6861,7 @@
|
|
|
6861
6861
|
}
|
|
6862
6862
|
let t6;
|
|
6863
6863
|
if ($[9] !== t4) {
|
|
6864
|
-
t6 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", size: "small", onClick: t4, children: [
|
|
6864
|
+
t6 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", size: "small", color: "primary", onClick: t4, children: [
|
|
6865
6865
|
t5,
|
|
6866
6866
|
"Copy to clipboard"
|
|
6867
6867
|
] });
|
|
@@ -6908,7 +6908,7 @@
|
|
|
6908
6908
|
}
|
|
6909
6909
|
return t9;
|
|
6910
6910
|
}
|
|
6911
|
-
function _temp$
|
|
6911
|
+
function _temp$5(t0) {
|
|
6912
6912
|
const {
|
|
6913
6913
|
style,
|
|
6914
6914
|
tokens,
|
|
@@ -7021,6 +7021,7 @@
|
|
|
7021
7021
|
const inferPropertiesFromData = doCollectionInference ? () => {
|
|
7022
7022
|
if (!doCollectionInference) return;
|
|
7023
7023
|
setInferringProperties(true);
|
|
7024
|
+
console.debug("CollectionEditor: inferring properties from data", doCollectionInference, values);
|
|
7024
7025
|
doCollectionInference(values).then((newCollection) => {
|
|
7025
7026
|
if (newCollection) core.makePropertiesEditable(newCollection.properties);
|
|
7026
7027
|
if (!newCollection) {
|
|
@@ -7257,7 +7258,7 @@
|
|
|
7257
7258
|
}
|
|
7258
7259
|
let t7;
|
|
7259
7260
|
if ($[10] !== handleCancel) {
|
|
7260
|
-
t7 = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", onClick: handleCancel, autoFocus: true, children: " Cancel " });
|
|
7261
|
+
t7 = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", color: "primary", onClick: handleCancel, autoFocus: true, children: " Cancel " });
|
|
7261
7262
|
$[10] = handleCancel;
|
|
7262
7263
|
$[11] = t7;
|
|
7263
7264
|
} else {
|
|
@@ -7265,7 +7266,7 @@
|
|
|
7265
7266
|
}
|
|
7266
7267
|
let t8;
|
|
7267
7268
|
if ($[12] !== handleOk) {
|
|
7268
|
-
t8 = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: handleOk, children: " Ok " });
|
|
7269
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { color: "primary", onClick: handleOk, children: " Ok " });
|
|
7269
7270
|
$[12] = handleOk;
|
|
7270
7271
|
$[13] = t8;
|
|
7271
7272
|
} else {
|
|
@@ -7333,7 +7334,7 @@
|
|
|
7333
7334
|
}
|
|
7334
7335
|
let t3;
|
|
7335
7336
|
if ($[4] !== entityViews) {
|
|
7336
|
-
t3 = (entityViews ?? []).length === 0 && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", children: "No custom views defined" });
|
|
7337
|
+
t3 = (entityViews ?? []).length === 0 && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", children: "No custom views defined. Define your custom views in the customization settings, before using this dialog." });
|
|
7337
7338
|
$[4] = entityViews;
|
|
7338
7339
|
$[5] = t3;
|
|
7339
7340
|
} else {
|
|
@@ -7353,7 +7354,7 @@
|
|
|
7353
7354
|
}
|
|
7354
7355
|
let t5;
|
|
7355
7356
|
if ($[9] !== onClose) {
|
|
7356
|
-
t5 = /* @__PURE__ */ jsxRuntime.jsx(ui.DialogActions, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "outlined", onClick: () => onClose(), children: "Cancel" }) });
|
|
7357
|
+
t5 = /* @__PURE__ */ jsxRuntime.jsx(ui.DialogActions, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "outlined", color: "primary", onClick: () => onClose(), children: "Cancel" }) });
|
|
7357
7358
|
$[9] = onClose;
|
|
7358
7359
|
$[10] = t5;
|
|
7359
7360
|
} else {
|
|
@@ -7420,8 +7421,8 @@
|
|
|
7420
7421
|
let t8;
|
|
7421
7422
|
let t9;
|
|
7422
7423
|
if ($[2] !== collection.entityViews || $[3] !== contextEntityViews || $[4] !== subcollections || $[5] !== values.entityViews || $[6] !== values.name) {
|
|
7423
|
-
const resolvedEntityViews = values.entityViews?.filter(_temp$
|
|
7424
|
-
const hardCodedEntityViews = collection.entityViews?.filter(_temp2$
|
|
7424
|
+
const resolvedEntityViews = values.entityViews?.filter(_temp$4).map((e_0) => core.resolveEntityView(e_0, contextEntityViews)).filter(Boolean) ?? [];
|
|
7425
|
+
const hardCodedEntityViews = collection.entityViews?.filter(_temp2$3) ?? [];
|
|
7425
7426
|
const totalEntityViews = resolvedEntityViews.length + hardCodedEntityViews.length;
|
|
7426
7427
|
t12 = "overflow-auto my-auto";
|
|
7427
7428
|
T3 = ui.Container;
|
|
@@ -7530,7 +7531,7 @@
|
|
|
7530
7531
|
t182 = $[36];
|
|
7531
7532
|
}
|
|
7532
7533
|
t2 = resolvedEntityViews.map(t182);
|
|
7533
|
-
t3 = hardCodedEntityViews.map(_temp3);
|
|
7534
|
+
t3 = hardCodedEntityViews.map(_temp3$1);
|
|
7534
7535
|
$[2] = collection.entityViews;
|
|
7535
7536
|
$[3] = contextEntityViews;
|
|
7536
7537
|
$[4] = subcollections;
|
|
@@ -7804,7 +7805,7 @@
|
|
|
7804
7805
|
function _temp4(e_6) {
|
|
7805
7806
|
return e_6.id;
|
|
7806
7807
|
}
|
|
7807
|
-
function _temp3(view_0) {
|
|
7808
|
+
function _temp3$1(view_0) {
|
|
7808
7809
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.TableRow, { children: /* @__PURE__ */ jsxRuntime.jsxs(ui.TableCell, { align: "left", children: [
|
|
7809
7810
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "flex-grow", children: view_0.name }),
|
|
7810
7811
|
/* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "caption", className: "flex-grow", children: [
|
|
@@ -7813,10 +7814,10 @@
|
|
|
7813
7814
|
] })
|
|
7814
7815
|
] }) }, view_0.key);
|
|
7815
7816
|
}
|
|
7816
|
-
function _temp2$
|
|
7817
|
+
function _temp2$3(e_1) {
|
|
7817
7818
|
return typeof e_1 !== "string";
|
|
7818
7819
|
}
|
|
7819
|
-
function _temp$
|
|
7820
|
+
function _temp$4(e) {
|
|
7820
7821
|
return typeof e === "string";
|
|
7821
7822
|
}
|
|
7822
7823
|
const productsCollectionTemplate = {
|
|
@@ -8258,7 +8259,7 @@
|
|
|
8258
8259
|
}
|
|
8259
8260
|
};
|
|
8260
8261
|
function CollectionEditorWelcomeView(t0) {
|
|
8261
|
-
const $ = reactCompilerRuntime.c(
|
|
8262
|
+
const $ = reactCompilerRuntime.c(56);
|
|
8262
8263
|
const {
|
|
8263
8264
|
path,
|
|
8264
8265
|
pathSuggestions,
|
|
@@ -8350,162 +8351,173 @@
|
|
|
8350
8351
|
t7 = $[15];
|
|
8351
8352
|
}
|
|
8352
8353
|
let t8;
|
|
8353
|
-
if ($[16] !==
|
|
8354
|
-
t8 = /* @__PURE__ */ jsxRuntime.
|
|
8355
|
-
|
|
8356
|
-
|
|
8357
|
-
t6,
|
|
8358
|
-
t7
|
|
8359
|
-
] })
|
|
8360
|
-
] });
|
|
8361
|
-
$[16] = t6;
|
|
8362
|
-
$[17] = t7;
|
|
8354
|
+
if ($[16] !== filteredPathSuggestions || $[17] !== loadingPathSuggestions) {
|
|
8355
|
+
t8 = (filteredPathSuggestions ?? []).length === 0 && !loadingPathSuggestions && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", children: "No existing paths found" });
|
|
8356
|
+
$[16] = filteredPathSuggestions;
|
|
8357
|
+
$[17] = loadingPathSuggestions;
|
|
8363
8358
|
$[18] = t8;
|
|
8364
8359
|
} else {
|
|
8365
8360
|
t8 = $[18];
|
|
8366
8361
|
}
|
|
8367
8362
|
let t9;
|
|
8368
|
-
if ($[19]
|
|
8369
|
-
t9 = /* @__PURE__ */ jsxRuntime.
|
|
8370
|
-
|
|
8363
|
+
if ($[19] !== t6 || $[20] !== t7 || $[21] !== t8) {
|
|
8364
|
+
t9 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2", children: [
|
|
8365
|
+
t5,
|
|
8366
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-x-2 gap-y-1 items-center my-2 min-h-7", children: [
|
|
8367
|
+
t6,
|
|
8368
|
+
t7,
|
|
8369
|
+
t8
|
|
8370
|
+
] })
|
|
8371
|
+
] });
|
|
8372
|
+
$[19] = t6;
|
|
8373
|
+
$[20] = t7;
|
|
8374
|
+
$[21] = t8;
|
|
8375
|
+
$[22] = t9;
|
|
8371
8376
|
} else {
|
|
8372
|
-
t9 = $[
|
|
8377
|
+
t9 = $[22];
|
|
8373
8378
|
}
|
|
8374
8379
|
let t10;
|
|
8375
|
-
if ($[
|
|
8376
|
-
t10 = /* @__PURE__ */ jsxRuntime.jsx(ui.
|
|
8377
|
-
$[
|
|
8380
|
+
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8381
|
+
t10 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", children: "● Select a template:" });
|
|
8382
|
+
$[23] = t10;
|
|
8378
8383
|
} else {
|
|
8379
|
-
t10 = $[
|
|
8384
|
+
t10 = $[23];
|
|
8380
8385
|
}
|
|
8381
8386
|
let t11;
|
|
8382
|
-
if ($[21] !== onContinue || $[22] !== setValues) {
|
|
8383
|
-
t11 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Products", subtitle: "A collection of products with images, prices and stock", icon: t10, onClick: () => {
|
|
8384
|
-
setValues(productsCollectionTemplate);
|
|
8385
|
-
onContinue();
|
|
8386
|
-
} });
|
|
8387
|
-
$[21] = onContinue;
|
|
8388
|
-
$[22] = setValues;
|
|
8389
|
-
$[23] = t11;
|
|
8390
|
-
} else {
|
|
8391
|
-
t11 = $[23];
|
|
8392
|
-
}
|
|
8393
|
-
let t12;
|
|
8394
8387
|
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8395
|
-
|
|
8396
|
-
$[24] =
|
|
8388
|
+
t11 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: productsCollectionTemplate.icon });
|
|
8389
|
+
$[24] = t11;
|
|
8397
8390
|
} else {
|
|
8398
|
-
|
|
8391
|
+
t11 = $[24];
|
|
8399
8392
|
}
|
|
8400
|
-
let
|
|
8393
|
+
let t12;
|
|
8401
8394
|
if ($[25] !== onContinue || $[26] !== setValues) {
|
|
8402
|
-
|
|
8403
|
-
setValues(
|
|
8395
|
+
t12 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Products", subtitle: "A collection of products with images, prices and stock", icon: t11, onClick: () => {
|
|
8396
|
+
setValues(productsCollectionTemplate);
|
|
8404
8397
|
onContinue();
|
|
8405
8398
|
} });
|
|
8406
8399
|
$[25] = onContinue;
|
|
8407
8400
|
$[26] = setValues;
|
|
8408
|
-
$[27] =
|
|
8401
|
+
$[27] = t12;
|
|
8409
8402
|
} else {
|
|
8410
|
-
|
|
8403
|
+
t12 = $[27];
|
|
8411
8404
|
}
|
|
8412
|
-
let
|
|
8405
|
+
let t13;
|
|
8413
8406
|
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8414
|
-
|
|
8415
|
-
$[28] =
|
|
8407
|
+
t13 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: usersCollectionTemplate.icon });
|
|
8408
|
+
$[28] = t13;
|
|
8416
8409
|
} else {
|
|
8417
|
-
|
|
8410
|
+
t13 = $[28];
|
|
8418
8411
|
}
|
|
8419
|
-
let
|
|
8412
|
+
let t14;
|
|
8420
8413
|
if ($[29] !== onContinue || $[30] !== setValues) {
|
|
8421
|
-
|
|
8422
|
-
setValues(
|
|
8414
|
+
t14 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Users", subtitle: "A collection of users with emails, names and roles", icon: t13, onClick: () => {
|
|
8415
|
+
setValues(usersCollectionTemplate);
|
|
8423
8416
|
onContinue();
|
|
8424
8417
|
} });
|
|
8425
8418
|
$[29] = onContinue;
|
|
8426
8419
|
$[30] = setValues;
|
|
8427
|
-
$[31] =
|
|
8420
|
+
$[31] = t14;
|
|
8428
8421
|
} else {
|
|
8429
|
-
|
|
8422
|
+
t14 = $[31];
|
|
8430
8423
|
}
|
|
8431
|
-
let
|
|
8424
|
+
let t15;
|
|
8432
8425
|
if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8433
|
-
|
|
8434
|
-
$[32] =
|
|
8426
|
+
t15 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: blogCollectionTemplate.icon });
|
|
8427
|
+
$[32] = t15;
|
|
8435
8428
|
} else {
|
|
8436
|
-
|
|
8429
|
+
t15 = $[32];
|
|
8437
8430
|
}
|
|
8438
|
-
let
|
|
8431
|
+
let t16;
|
|
8439
8432
|
if ($[33] !== onContinue || $[34] !== setValues) {
|
|
8440
|
-
|
|
8441
|
-
setValues(
|
|
8433
|
+
t16 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Blog posts", subtitle: "A collection of blog posts with images, authors and complex content", icon: t15, onClick: () => {
|
|
8434
|
+
setValues(blogCollectionTemplate);
|
|
8442
8435
|
onContinue();
|
|
8443
8436
|
} });
|
|
8444
8437
|
$[33] = onContinue;
|
|
8445
8438
|
$[34] = setValues;
|
|
8446
|
-
$[35] =
|
|
8439
|
+
$[35] = t16;
|
|
8440
|
+
} else {
|
|
8441
|
+
t16 = $[35];
|
|
8442
|
+
}
|
|
8443
|
+
let t17;
|
|
8444
|
+
if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8445
|
+
t17 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { size: "small", iconKey: pagesCollectionTemplate.icon });
|
|
8446
|
+
$[36] = t17;
|
|
8447
8447
|
} else {
|
|
8448
|
-
t17 = $[
|
|
8448
|
+
t17 = $[36];
|
|
8449
8449
|
}
|
|
8450
8450
|
let t18;
|
|
8451
|
-
if ($[
|
|
8452
|
-
t18 = /* @__PURE__ */ jsxRuntime.
|
|
8453
|
-
|
|
8451
|
+
if ($[37] !== onContinue || $[38] !== setValues) {
|
|
8452
|
+
t18 = /* @__PURE__ */ jsxRuntime.jsx(TemplateButton, { title: "Pages", subtitle: "A collection of pages with images, authors and complex content", icon: t17, onClick: () => {
|
|
8453
|
+
setValues(pagesCollectionTemplate);
|
|
8454
|
+
onContinue();
|
|
8455
|
+
} });
|
|
8456
|
+
$[37] = onContinue;
|
|
8457
|
+
$[38] = setValues;
|
|
8458
|
+
$[39] = t18;
|
|
8459
|
+
} else {
|
|
8460
|
+
t18 = $[39];
|
|
8461
|
+
}
|
|
8462
|
+
let t19;
|
|
8463
|
+
if ($[40] !== t12 || $[41] !== t14 || $[42] !== t16 || $[43] !== t18) {
|
|
8464
|
+
t19 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-2", children: [
|
|
8465
|
+
t10,
|
|
8454
8466
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4", children: [
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
|
|
8467
|
+
t12,
|
|
8468
|
+
t14,
|
|
8469
|
+
t16,
|
|
8470
|
+
t18
|
|
8459
8471
|
] })
|
|
8460
8472
|
] });
|
|
8461
|
-
$[
|
|
8462
|
-
$[
|
|
8463
|
-
$[
|
|
8464
|
-
$[
|
|
8465
|
-
$[
|
|
8473
|
+
$[40] = t12;
|
|
8474
|
+
$[41] = t14;
|
|
8475
|
+
$[42] = t16;
|
|
8476
|
+
$[43] = t18;
|
|
8477
|
+
$[44] = t19;
|
|
8466
8478
|
} else {
|
|
8467
|
-
|
|
8479
|
+
t19 = $[44];
|
|
8468
8480
|
}
|
|
8469
|
-
let
|
|
8470
|
-
if ($[
|
|
8471
|
-
|
|
8481
|
+
let t20;
|
|
8482
|
+
if ($[45] !== onContinue || $[46] !== parentCollection) {
|
|
8483
|
+
t20 = !parentCollection && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
8472
8484
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", className: "mb-2", children: "● Create a collection from a file (csv, json, xls, xslx...)" }),
|
|
8473
8485
|
/* @__PURE__ */ jsxRuntime.jsx(data_import_export.ImportFileUpload, { onDataAdded: (data, propertiesOrder) => onContinue(data, propertiesOrder) })
|
|
8474
8486
|
] });
|
|
8475
|
-
$[
|
|
8476
|
-
$[
|
|
8477
|
-
$[
|
|
8487
|
+
$[45] = onContinue;
|
|
8488
|
+
$[46] = parentCollection;
|
|
8489
|
+
$[47] = t20;
|
|
8478
8490
|
} else {
|
|
8479
|
-
|
|
8491
|
+
t20 = $[47];
|
|
8480
8492
|
}
|
|
8481
|
-
let
|
|
8482
|
-
if ($[
|
|
8483
|
-
|
|
8484
|
-
$[
|
|
8485
|
-
$[
|
|
8493
|
+
let t21;
|
|
8494
|
+
if ($[48] !== onContinue) {
|
|
8495
|
+
t21 = /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", onClick: () => onContinue(), className: "my-2", children: "Continue from scratch" }) });
|
|
8496
|
+
$[48] = onContinue;
|
|
8497
|
+
$[49] = t21;
|
|
8486
8498
|
} else {
|
|
8487
|
-
|
|
8499
|
+
t21 = $[49];
|
|
8488
8500
|
}
|
|
8489
|
-
let
|
|
8490
|
-
if ($[
|
|
8491
|
-
|
|
8501
|
+
let t22;
|
|
8502
|
+
if ($[50] !== t19 || $[51] !== t20 || $[52] !== t21 || $[53] !== t4 || $[54] !== t9) {
|
|
8503
|
+
t22 = /* @__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: [
|
|
8492
8504
|
t3,
|
|
8493
8505
|
t4,
|
|
8494
|
-
|
|
8495
|
-
t18,
|
|
8506
|
+
t9,
|
|
8496
8507
|
t19,
|
|
8497
|
-
t20
|
|
8508
|
+
t20,
|
|
8509
|
+
t21
|
|
8498
8510
|
] }) });
|
|
8499
|
-
$[
|
|
8500
|
-
$[
|
|
8501
|
-
$[
|
|
8502
|
-
$[
|
|
8503
|
-
$[
|
|
8504
|
-
$[
|
|
8511
|
+
$[50] = t19;
|
|
8512
|
+
$[51] = t20;
|
|
8513
|
+
$[52] = t21;
|
|
8514
|
+
$[53] = t4;
|
|
8515
|
+
$[54] = t9;
|
|
8516
|
+
$[55] = t22;
|
|
8505
8517
|
} else {
|
|
8506
|
-
|
|
8518
|
+
t22 = $[55];
|
|
8507
8519
|
}
|
|
8508
|
-
return
|
|
8520
|
+
return t22;
|
|
8509
8521
|
}
|
|
8510
8522
|
function TemplateButton(t0) {
|
|
8511
8523
|
const $ = reactCompilerRuntime.c(10);
|
|
@@ -8606,7 +8618,7 @@
|
|
|
8606
8618
|
const previousFullId = getFullId(previousId, namespace);
|
|
8607
8619
|
const previousPropertyPath = idToPropertiesPath(previousFullId);
|
|
8608
8620
|
const currentPropertiesOrder = getCurrentPropertiesOrder(namespace);
|
|
8609
|
-
const newPropertiesOrder_0 = currentPropertiesOrder.map((p) => p === previousId ? id : p).filter(_temp$
|
|
8621
|
+
const newPropertiesOrder_0 = currentPropertiesOrder.map((p) => p === previousId ? id : p).filter(_temp$3);
|
|
8610
8622
|
updatePropertiesOrder(newPropertiesOrder_0, namespace);
|
|
8611
8623
|
const newHeadersMapping = {
|
|
8612
8624
|
...importConfig.headersMapping
|
|
@@ -8772,7 +8784,7 @@
|
|
|
8772
8784
|
}
|
|
8773
8785
|
return t13;
|
|
8774
8786
|
}
|
|
8775
|
-
function _temp$
|
|
8787
|
+
function _temp$3(p_0) {
|
|
8776
8788
|
return p_0 !== void 0;
|
|
8777
8789
|
}
|
|
8778
8790
|
function PropertySelect(t0) {
|
|
@@ -8845,7 +8857,7 @@
|
|
|
8845
8857
|
}
|
|
8846
8858
|
let t9;
|
|
8847
8859
|
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8848
|
-
t9 = Object.entries(supportedFields).map(_temp2$
|
|
8860
|
+
t9 = Object.entries(supportedFields).map(_temp2$2);
|
|
8849
8861
|
$[12] = t9;
|
|
8850
8862
|
} else {
|
|
8851
8863
|
t9 = $[12];
|
|
@@ -8875,7 +8887,7 @@
|
|
|
8875
8887
|
}
|
|
8876
8888
|
return t11;
|
|
8877
8889
|
}
|
|
8878
|
-
function _temp2$
|
|
8890
|
+
function _temp2$2(t0) {
|
|
8879
8891
|
const [key, widget_0] = t0;
|
|
8880
8892
|
return /* @__PURE__ */ jsxRuntime.jsx(PropertySelectItem, { value: key, optionDisabled: false, propertyConfig: widget_0, existing: false }, key);
|
|
8881
8893
|
}
|
|
@@ -9041,7 +9053,7 @@
|
|
|
9041
9053
|
}
|
|
9042
9054
|
let t7;
|
|
9043
9055
|
if ($[12] !== propertiesOrder) {
|
|
9044
|
-
t7 = propertiesOrder.map(_temp$
|
|
9056
|
+
t7 = propertiesOrder.map(_temp$2);
|
|
9045
9057
|
$[12] = propertiesOrder;
|
|
9046
9058
|
$[13] = t7;
|
|
9047
9059
|
} else {
|
|
@@ -9060,7 +9072,7 @@
|
|
|
9060
9072
|
}
|
|
9061
9073
|
return t8;
|
|
9062
9074
|
}
|
|
9063
|
-
function _temp$
|
|
9075
|
+
function _temp$2(p) {
|
|
9064
9076
|
return {
|
|
9065
9077
|
key: p,
|
|
9066
9078
|
disabled: false
|
|
@@ -9114,6 +9126,355 @@
|
|
|
9114
9126
|
idColumn
|
|
9115
9127
|
};
|
|
9116
9128
|
}
|
|
9129
|
+
function EntityActionsSelectDialog(t0) {
|
|
9130
|
+
const $ = reactCompilerRuntime.c(15);
|
|
9131
|
+
const {
|
|
9132
|
+
open,
|
|
9133
|
+
onClose
|
|
9134
|
+
} = t0;
|
|
9135
|
+
const {
|
|
9136
|
+
entityActions
|
|
9137
|
+
} = core.useCustomizationController();
|
|
9138
|
+
let t1;
|
|
9139
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9140
|
+
t1 = /* @__PURE__ */ jsxRuntime.jsx(ui.DialogTitle, { children: "Select custom action" });
|
|
9141
|
+
$[0] = t1;
|
|
9142
|
+
} else {
|
|
9143
|
+
t1 = $[0];
|
|
9144
|
+
}
|
|
9145
|
+
let t2;
|
|
9146
|
+
if ($[1] !== entityActions || $[2] !== onClose) {
|
|
9147
|
+
t2 = entityActions?.map((action) => /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { onClick: () => onClose(action.key), fullWidth: true, variant: "text", children: [
|
|
9148
|
+
action.name,
|
|
9149
|
+
" (",
|
|
9150
|
+
action.key,
|
|
9151
|
+
")"
|
|
9152
|
+
] }, action.key));
|
|
9153
|
+
$[1] = entityActions;
|
|
9154
|
+
$[2] = onClose;
|
|
9155
|
+
$[3] = t2;
|
|
9156
|
+
} else {
|
|
9157
|
+
t2 = $[3];
|
|
9158
|
+
}
|
|
9159
|
+
let t3;
|
|
9160
|
+
if ($[4] !== entityActions) {
|
|
9161
|
+
t3 = (entityActions ?? []).length === 0 && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", children: "No custom actions defined. Define your custom actions in the customization settings, before using this dialog." });
|
|
9162
|
+
$[4] = entityActions;
|
|
9163
|
+
$[5] = t3;
|
|
9164
|
+
} else {
|
|
9165
|
+
t3 = $[5];
|
|
9166
|
+
}
|
|
9167
|
+
let t4;
|
|
9168
|
+
if ($[6] !== t2 || $[7] !== t3) {
|
|
9169
|
+
t4 = /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogContent, { className: "flex flex-col gap-4", children: [
|
|
9170
|
+
t2,
|
|
9171
|
+
t3
|
|
9172
|
+
] });
|
|
9173
|
+
$[6] = t2;
|
|
9174
|
+
$[7] = t3;
|
|
9175
|
+
$[8] = t4;
|
|
9176
|
+
} else {
|
|
9177
|
+
t4 = $[8];
|
|
9178
|
+
}
|
|
9179
|
+
let t5;
|
|
9180
|
+
if ($[9] !== onClose) {
|
|
9181
|
+
t5 = /* @__PURE__ */ jsxRuntime.jsx(ui.DialogActions, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "outlined", color: "primary", onClick: () => onClose(), children: "Cancel" }) });
|
|
9182
|
+
$[9] = onClose;
|
|
9183
|
+
$[10] = t5;
|
|
9184
|
+
} else {
|
|
9185
|
+
t5 = $[10];
|
|
9186
|
+
}
|
|
9187
|
+
let t6;
|
|
9188
|
+
if ($[11] !== open || $[12] !== t4 || $[13] !== t5) {
|
|
9189
|
+
t6 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Dialog, { maxWidth: "md", open, children: [
|
|
9190
|
+
t1,
|
|
9191
|
+
t4,
|
|
9192
|
+
t5
|
|
9193
|
+
] });
|
|
9194
|
+
$[11] = open;
|
|
9195
|
+
$[12] = t4;
|
|
9196
|
+
$[13] = t5;
|
|
9197
|
+
$[14] = t6;
|
|
9198
|
+
} else {
|
|
9199
|
+
t6 = $[14];
|
|
9200
|
+
}
|
|
9201
|
+
return t6;
|
|
9202
|
+
}
|
|
9203
|
+
function EntityActionsEditTab(t0) {
|
|
9204
|
+
const $ = reactCompilerRuntime.c(64);
|
|
9205
|
+
const {
|
|
9206
|
+
collection
|
|
9207
|
+
} = t0;
|
|
9208
|
+
const {
|
|
9209
|
+
entityActions: contextEntityActions
|
|
9210
|
+
} = core.useCustomizationController();
|
|
9211
|
+
const [addEntityActionDialogOpen, setAddEntityActionDialogOpen] = React.useState(false);
|
|
9212
|
+
const [actionToDelete, setActionToDelete] = React.useState();
|
|
9213
|
+
const {
|
|
9214
|
+
values,
|
|
9215
|
+
setFieldValue
|
|
9216
|
+
} = formex.useFormex();
|
|
9217
|
+
let T0;
|
|
9218
|
+
let T1;
|
|
9219
|
+
let T2;
|
|
9220
|
+
let T3;
|
|
9221
|
+
let t1;
|
|
9222
|
+
let t10;
|
|
9223
|
+
let t2;
|
|
9224
|
+
let t3;
|
|
9225
|
+
let t4;
|
|
9226
|
+
let t5;
|
|
9227
|
+
let t6;
|
|
9228
|
+
let t7;
|
|
9229
|
+
let t8;
|
|
9230
|
+
let t9;
|
|
9231
|
+
if ($[0] !== collection.entityActions || $[1] !== contextEntityActions || $[2] !== values.entityActions) {
|
|
9232
|
+
const resolvedEntityActions = values.entityActions?.filter(_temp$1).map((e_0) => core.resolveEntityAction(e_0, contextEntityActions)).filter(Boolean) ?? [];
|
|
9233
|
+
const hardCodedEntityActions = collection.entityActions?.filter(_temp2$1) ?? [];
|
|
9234
|
+
const totalEntityActions = resolvedEntityActions.length + hardCodedEntityActions.length;
|
|
9235
|
+
t10 = "overflow-auto my-auto";
|
|
9236
|
+
T3 = ui.Container;
|
|
9237
|
+
t8 = "2xl";
|
|
9238
|
+
t9 = "flex flex-col gap-4 p-8 m-auto";
|
|
9239
|
+
t7 = "flex flex-col gap-16";
|
|
9240
|
+
t4 = "flex-grow flex flex-col gap-4 items-start";
|
|
9241
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9242
|
+
t5 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "h5", children: "Custom actions" });
|
|
9243
|
+
$[17] = t5;
|
|
9244
|
+
} else {
|
|
9245
|
+
t5 = $[17];
|
|
9246
|
+
}
|
|
9247
|
+
if ($[18] !== totalEntityActions) {
|
|
9248
|
+
t6 = totalEntityActions === 0 && /* @__PURE__ */ jsxRuntime.jsx(ui.Alert, { action: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", size: "small", href: "https://firecms.co/docs/custom_actions", component: "a", rel: "noopener noreferrer", target: "_blank", children: "More info" }), children: "Define your own custom actions by uploading them with the CLI." });
|
|
9249
|
+
$[18] = totalEntityActions;
|
|
9250
|
+
$[19] = t6;
|
|
9251
|
+
} else {
|
|
9252
|
+
t6 = $[19];
|
|
9253
|
+
}
|
|
9254
|
+
T2 = ui.Paper;
|
|
9255
|
+
t3 = "flex flex-col gap-4 p-2 w-full";
|
|
9256
|
+
T1 = ui.Table;
|
|
9257
|
+
T0 = ui.TableBody;
|
|
9258
|
+
let t112;
|
|
9259
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9260
|
+
t112 = (action) => /* @__PURE__ */ jsxRuntime.jsxs(ui.TableRow, { children: [
|
|
9261
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.TableCell, { align: "left", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "flex-grow", children: action.name }) }),
|
|
9262
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.TableCell, { align: "right", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Remove", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { size: "small", onClick: (e_2) => {
|
|
9263
|
+
e_2.preventDefault();
|
|
9264
|
+
e_2.stopPropagation();
|
|
9265
|
+
setActionToDelete(action.key);
|
|
9266
|
+
}, color: "inherit", children: /* @__PURE__ */ jsxRuntime.jsx(ui.DeleteIcon, { size: "small" }) }) }) })
|
|
9267
|
+
] }, action.key);
|
|
9268
|
+
$[20] = t112;
|
|
9269
|
+
} else {
|
|
9270
|
+
t112 = $[20];
|
|
9271
|
+
}
|
|
9272
|
+
t1 = resolvedEntityActions.map(t112);
|
|
9273
|
+
t2 = hardCodedEntityActions.map(_temp3);
|
|
9274
|
+
$[0] = collection.entityActions;
|
|
9275
|
+
$[1] = contextEntityActions;
|
|
9276
|
+
$[2] = values.entityActions;
|
|
9277
|
+
$[3] = T0;
|
|
9278
|
+
$[4] = T1;
|
|
9279
|
+
$[5] = T2;
|
|
9280
|
+
$[6] = T3;
|
|
9281
|
+
$[7] = t1;
|
|
9282
|
+
$[8] = t10;
|
|
9283
|
+
$[9] = t2;
|
|
9284
|
+
$[10] = t3;
|
|
9285
|
+
$[11] = t4;
|
|
9286
|
+
$[12] = t5;
|
|
9287
|
+
$[13] = t6;
|
|
9288
|
+
$[14] = t7;
|
|
9289
|
+
$[15] = t8;
|
|
9290
|
+
$[16] = t9;
|
|
9291
|
+
} else {
|
|
9292
|
+
T0 = $[3];
|
|
9293
|
+
T1 = $[4];
|
|
9294
|
+
T2 = $[5];
|
|
9295
|
+
T3 = $[6];
|
|
9296
|
+
t1 = $[7];
|
|
9297
|
+
t10 = $[8];
|
|
9298
|
+
t2 = $[9];
|
|
9299
|
+
t3 = $[10];
|
|
9300
|
+
t4 = $[11];
|
|
9301
|
+
t5 = $[12];
|
|
9302
|
+
t6 = $[13];
|
|
9303
|
+
t7 = $[14];
|
|
9304
|
+
t8 = $[15];
|
|
9305
|
+
t9 = $[16];
|
|
9306
|
+
}
|
|
9307
|
+
let t11;
|
|
9308
|
+
if ($[21] !== T0 || $[22] !== t1 || $[23] !== t2) {
|
|
9309
|
+
t11 = /* @__PURE__ */ jsxRuntime.jsxs(T0, { children: [
|
|
9310
|
+
t1,
|
|
9311
|
+
t2
|
|
9312
|
+
] });
|
|
9313
|
+
$[21] = T0;
|
|
9314
|
+
$[22] = t1;
|
|
9315
|
+
$[23] = t2;
|
|
9316
|
+
$[24] = t11;
|
|
9317
|
+
} else {
|
|
9318
|
+
t11 = $[24];
|
|
9319
|
+
}
|
|
9320
|
+
let t12;
|
|
9321
|
+
if ($[25] !== T1 || $[26] !== t11) {
|
|
9322
|
+
t12 = /* @__PURE__ */ jsxRuntime.jsx(T1, { children: t11 });
|
|
9323
|
+
$[25] = T1;
|
|
9324
|
+
$[26] = t11;
|
|
9325
|
+
$[27] = t12;
|
|
9326
|
+
} else {
|
|
9327
|
+
t12 = $[27];
|
|
9328
|
+
}
|
|
9329
|
+
let t13;
|
|
9330
|
+
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9331
|
+
t13 = () => {
|
|
9332
|
+
setAddEntityActionDialogOpen(true);
|
|
9333
|
+
};
|
|
9334
|
+
$[28] = t13;
|
|
9335
|
+
} else {
|
|
9336
|
+
t13 = $[28];
|
|
9337
|
+
}
|
|
9338
|
+
let t14;
|
|
9339
|
+
if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9340
|
+
t14 = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: t13, variant: "text", startIcon: /* @__PURE__ */ jsxRuntime.jsx(ui.AddIcon, {}), children: "Add custom entity action" });
|
|
9341
|
+
$[29] = t14;
|
|
9342
|
+
} else {
|
|
9343
|
+
t14 = $[29];
|
|
9344
|
+
}
|
|
9345
|
+
let t15;
|
|
9346
|
+
if ($[30] !== T2 || $[31] !== t12 || $[32] !== t3) {
|
|
9347
|
+
t15 = /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(T2, { className: t3, children: [
|
|
9348
|
+
t12,
|
|
9349
|
+
t14
|
|
9350
|
+
] }) });
|
|
9351
|
+
$[30] = T2;
|
|
9352
|
+
$[31] = t12;
|
|
9353
|
+
$[32] = t3;
|
|
9354
|
+
$[33] = t15;
|
|
9355
|
+
} else {
|
|
9356
|
+
t15 = $[33];
|
|
9357
|
+
}
|
|
9358
|
+
let t16;
|
|
9359
|
+
if ($[34] !== t15 || $[35] !== t4 || $[36] !== t5 || $[37] !== t6) {
|
|
9360
|
+
t16 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t4, children: [
|
|
9361
|
+
t5,
|
|
9362
|
+
t6,
|
|
9363
|
+
t15
|
|
9364
|
+
] });
|
|
9365
|
+
$[34] = t15;
|
|
9366
|
+
$[35] = t4;
|
|
9367
|
+
$[36] = t5;
|
|
9368
|
+
$[37] = t6;
|
|
9369
|
+
$[38] = t16;
|
|
9370
|
+
} else {
|
|
9371
|
+
t16 = $[38];
|
|
9372
|
+
}
|
|
9373
|
+
let t17;
|
|
9374
|
+
if ($[39] !== t16 || $[40] !== t7) {
|
|
9375
|
+
t17 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t7, children: t16 });
|
|
9376
|
+
$[39] = t16;
|
|
9377
|
+
$[40] = t7;
|
|
9378
|
+
$[41] = t17;
|
|
9379
|
+
} else {
|
|
9380
|
+
t17 = $[41];
|
|
9381
|
+
}
|
|
9382
|
+
let t18;
|
|
9383
|
+
if ($[42] !== T3 || $[43] !== t17 || $[44] !== t8 || $[45] !== t9) {
|
|
9384
|
+
t18 = /* @__PURE__ */ jsxRuntime.jsx(T3, { maxWidth: t8, className: t9, children: t17 });
|
|
9385
|
+
$[42] = T3;
|
|
9386
|
+
$[43] = t17;
|
|
9387
|
+
$[44] = t8;
|
|
9388
|
+
$[45] = t9;
|
|
9389
|
+
$[46] = t18;
|
|
9390
|
+
} else {
|
|
9391
|
+
t18 = $[46];
|
|
9392
|
+
}
|
|
9393
|
+
let t19;
|
|
9394
|
+
if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9395
|
+
t19 = /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
9396
|
+
height: "52px"
|
|
9397
|
+
} });
|
|
9398
|
+
$[47] = t19;
|
|
9399
|
+
} else {
|
|
9400
|
+
t19 = $[47];
|
|
9401
|
+
}
|
|
9402
|
+
let t20;
|
|
9403
|
+
if ($[48] !== actionToDelete || $[49] !== setFieldValue || $[50] !== values.entityActions) {
|
|
9404
|
+
t20 = actionToDelete && /* @__PURE__ */ jsxRuntime.jsx(core.ConfirmationDialog, { open: Boolean(actionToDelete), onAccept: () => {
|
|
9405
|
+
setFieldValue("entityActions", values.entityActions?.filter((e_3) => e_3 !== actionToDelete));
|
|
9406
|
+
setActionToDelete(void 0);
|
|
9407
|
+
}, onCancel: () => setActionToDelete(void 0), title: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: "Remove this action?" }), body: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9408
|
+
"This will ",
|
|
9409
|
+
/* @__PURE__ */ jsxRuntime.jsx("b", { children: "not delete any data" }),
|
|
9410
|
+
", only the action in the CMS"
|
|
9411
|
+
] }) });
|
|
9412
|
+
$[48] = actionToDelete;
|
|
9413
|
+
$[49] = setFieldValue;
|
|
9414
|
+
$[50] = values.entityActions;
|
|
9415
|
+
$[51] = t20;
|
|
9416
|
+
} else {
|
|
9417
|
+
t20 = $[51];
|
|
9418
|
+
}
|
|
9419
|
+
let t21;
|
|
9420
|
+
if ($[52] !== contextEntityActions || $[53] !== setFieldValue || $[54] !== values.entityActions) {
|
|
9421
|
+
t21 = (selectedActionKey) => {
|
|
9422
|
+
if (selectedActionKey) {
|
|
9423
|
+
console.log("Selected action key:", selectedActionKey);
|
|
9424
|
+
const value = [...values.entityActions ?? [], selectedActionKey].filter((e_4) => typeof e_4 === "string" && (contextEntityActions ?? []).some((action_1) => action_1.key === e_4));
|
|
9425
|
+
setFieldValue("entityActions", value);
|
|
9426
|
+
}
|
|
9427
|
+
setAddEntityActionDialogOpen(false);
|
|
9428
|
+
};
|
|
9429
|
+
$[52] = contextEntityActions;
|
|
9430
|
+
$[53] = setFieldValue;
|
|
9431
|
+
$[54] = values.entityActions;
|
|
9432
|
+
$[55] = t21;
|
|
9433
|
+
} else {
|
|
9434
|
+
t21 = $[55];
|
|
9435
|
+
}
|
|
9436
|
+
let t22;
|
|
9437
|
+
if ($[56] !== addEntityActionDialogOpen || $[57] !== t21) {
|
|
9438
|
+
t22 = /* @__PURE__ */ jsxRuntime.jsx(EntityActionsSelectDialog, { open: addEntityActionDialogOpen, onClose: t21 });
|
|
9439
|
+
$[56] = addEntityActionDialogOpen;
|
|
9440
|
+
$[57] = t21;
|
|
9441
|
+
$[58] = t22;
|
|
9442
|
+
} else {
|
|
9443
|
+
t22 = $[58];
|
|
9444
|
+
}
|
|
9445
|
+
let t23;
|
|
9446
|
+
if ($[59] !== t10 || $[60] !== t18 || $[61] !== t20 || $[62] !== t22) {
|
|
9447
|
+
t23 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t10, children: [
|
|
9448
|
+
t18,
|
|
9449
|
+
t19,
|
|
9450
|
+
t20,
|
|
9451
|
+
t22
|
|
9452
|
+
] });
|
|
9453
|
+
$[59] = t10;
|
|
9454
|
+
$[60] = t18;
|
|
9455
|
+
$[61] = t20;
|
|
9456
|
+
$[62] = t22;
|
|
9457
|
+
$[63] = t23;
|
|
9458
|
+
} else {
|
|
9459
|
+
t23 = $[63];
|
|
9460
|
+
}
|
|
9461
|
+
return t23;
|
|
9462
|
+
}
|
|
9463
|
+
function _temp3(action_0) {
|
|
9464
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ui.TableRow, { children: /* @__PURE__ */ jsxRuntime.jsxs(ui.TableCell, { align: "left", children: [
|
|
9465
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "flex-grow", children: action_0.name }),
|
|
9466
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "caption", className: "flex-grow", children: [
|
|
9467
|
+
"This action is defined in code with key ",
|
|
9468
|
+
/* @__PURE__ */ jsxRuntime.jsx("code", { children: action_0.key })
|
|
9469
|
+
] })
|
|
9470
|
+
] }) }, action_0.key);
|
|
9471
|
+
}
|
|
9472
|
+
function _temp2$1(e_1) {
|
|
9473
|
+
return typeof e_1 !== "string";
|
|
9474
|
+
}
|
|
9475
|
+
function _temp$1(e) {
|
|
9476
|
+
return typeof e === "string";
|
|
9477
|
+
}
|
|
9117
9478
|
function CollectionEditorDialog(props) {
|
|
9118
9479
|
const $ = reactCompilerRuntime.c(24);
|
|
9119
9480
|
const open = props.open;
|
|
@@ -9352,10 +9713,10 @@
|
|
|
9352
9713
|
setCurrentView("details");
|
|
9353
9714
|
}
|
|
9354
9715
|
};
|
|
9355
|
-
const doCollectionInference = (collection_0) => {
|
|
9716
|
+
const doCollectionInference = collectionInference ? (collection_0) => {
|
|
9356
9717
|
if (!collectionInference) return void 0;
|
|
9357
9718
|
return collectionInference?.(collection_0.path, collection_0.collectionGroup ?? false, parentPaths ?? []);
|
|
9358
|
-
};
|
|
9719
|
+
} : void 0;
|
|
9359
9720
|
const inferCollectionFromData = async (newCollection) => {
|
|
9360
9721
|
try {
|
|
9361
9722
|
if (!doCollectionInference) {
|
|
@@ -9574,7 +9935,8 @@
|
|
|
9574
9935
|
!isNewCollection && /* @__PURE__ */ jsxRuntime.jsxs(ui.Tabs, { value: currentView, innerClassName: ui.cls(ui.defaultBorderMixin, "px-4 h-14 w-full justify-end bg-surface-50 dark:bg-surface-950 border-b"), onValueChange: (v) => setCurrentView(v), children: [
|
|
9575
9936
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Tab, { value: "details", children: "Details" }),
|
|
9576
9937
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Tab, { value: "properties", children: "Properties" }),
|
|
9577
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Tab, { value: "subcollections", children: "Additional views" })
|
|
9938
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Tab, { value: "subcollections", children: "Additional views" }),
|
|
9939
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Tab, { value: "custom_actions", children: "Custom actions" })
|
|
9578
9940
|
] }),
|
|
9579
9941
|
/* @__PURE__ */ jsxRuntime.jsxs("form", { noValidate: true, onSubmit: formController.handleSubmit, className: ui.cls(isNewCollection ? "h-full" : "h-[calc(100%-48px)]", "flex-grow flex flex-col relative"), children: [
|
|
9580
9942
|
currentView === "loading" && /* @__PURE__ */ jsxRuntime.jsx(core.CircularProgressCenter, {}),
|
|
@@ -9603,6 +9965,7 @@
|
|
|
9603
9965
|
setDeleteRequested(true);
|
|
9604
9966
|
}, children: "Reset to code" })
|
|
9605
9967
|
] }) }),
|
|
9968
|
+
currentView === "custom_actions" && collection && /* @__PURE__ */ jsxRuntime.jsx(EntityActionsEditTab, { collection }),
|
|
9606
9969
|
currentView === "subcollections" && collection && /* @__PURE__ */ jsxRuntime.jsx(SubcollectionsEditTab, { parentCollection, configController, getUser, collectionInference, parentCollectionIds, collection }),
|
|
9607
9970
|
currentView === "properties" && /* @__PURE__ */ jsxRuntime.jsx(CollectionPropertiesEditorForm, { showErrors: submitCount > 0, isNewCollection, reservedGroups, onPropertyError: (propertyKey, namespace, error_0) => {
|
|
9608
9971
|
const current = core.removeUndefined({
|
|
@@ -9614,28 +9977,28 @@
|
|
|
9614
9977
|
}, getUser, getData: getDataWithPath, doCollectionInference, propertyConfigs, collectionEditable, extraIcon: extraView?.icon && /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { color: "primary", onClick: () => setCurrentView("extra_view"), children: extraView.icon }) }),
|
|
9615
9978
|
currentView !== "welcome" && /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogActions, { position: "absolute", children: [
|
|
9616
9979
|
error && /* @__PURE__ */ jsxRuntime.jsx(core.ErrorView, { error }),
|
|
9617
|
-
isNewCollection && includeTemplates && currentView === "import_data_mapping" && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", type: "button", onClick: () => {
|
|
9980
|
+
isNewCollection && includeTemplates && currentView === "import_data_mapping" && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", type: "button", color: "primary", onClick: () => {
|
|
9618
9981
|
importConfig.setInUse(false);
|
|
9619
9982
|
return setCurrentView("welcome");
|
|
9620
9983
|
}, children: [
|
|
9621
9984
|
/* @__PURE__ */ jsxRuntime.jsx(ui.ArrowBackIcon, {}),
|
|
9622
9985
|
"Back"
|
|
9623
9986
|
] }),
|
|
9624
|
-
isNewCollection && includeTemplates && currentView === "import_data_preview" && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", type: "button", onClick: () => {
|
|
9987
|
+
isNewCollection && includeTemplates && currentView === "import_data_preview" && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", type: "button", color: "primary", onClick: () => {
|
|
9625
9988
|
setCurrentView("import_data_mapping");
|
|
9626
9989
|
}, children: [
|
|
9627
9990
|
/* @__PURE__ */ jsxRuntime.jsx(ui.ArrowBackIcon, {}),
|
|
9628
9991
|
"Back"
|
|
9629
9992
|
] }),
|
|
9630
|
-
isNewCollection && includeTemplates && currentView === "details" && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", type: "button", onClick: () => setCurrentView("welcome"), children: [
|
|
9993
|
+
isNewCollection && includeTemplates && currentView === "details" && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", color: "primary", type: "button", onClick: () => setCurrentView("welcome"), children: [
|
|
9631
9994
|
/* @__PURE__ */ jsxRuntime.jsx(ui.ArrowBackIcon, {}),
|
|
9632
9995
|
"Back"
|
|
9633
9996
|
] }),
|
|
9634
|
-
isNewCollection && currentView === "properties" && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", type: "button", onClick: () => setCurrentView("details"), children: [
|
|
9997
|
+
isNewCollection && currentView === "properties" && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", type: "button", color: "primary", onClick: () => setCurrentView("details"), children: [
|
|
9635
9998
|
/* @__PURE__ */ jsxRuntime.jsx(ui.ArrowBackIcon, {}),
|
|
9636
9999
|
"Back"
|
|
9637
10000
|
] }),
|
|
9638
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", onClick: () => {
|
|
10001
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", color: "primary", onClick: () => {
|
|
9639
10002
|
handleCancel();
|
|
9640
10003
|
}, children: "Cancel" }),
|
|
9641
10004
|
isNewCollection && currentView === "import_data_mapping" && /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "filled", color: "primary", onClick: onImportMappingComplete, children: "Next" }),
|
|
@@ -10128,14 +10491,14 @@
|
|
|
10128
10491
|
}
|
|
10129
10492
|
let t6;
|
|
10130
10493
|
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10131
|
-
t6 = /* @__PURE__ */ jsxRuntime.jsx(ui.SettingsIcon, {});
|
|
10494
|
+
t6 = /* @__PURE__ */ jsxRuntime.jsx(ui.SettingsIcon, { size: "small" });
|
|
10132
10495
|
$[15] = t6;
|
|
10133
10496
|
} else {
|
|
10134
10497
|
t6 = $[15];
|
|
10135
10498
|
}
|
|
10136
10499
|
let t7;
|
|
10137
10500
|
if ($[16] !== t4 || $[17] !== t5) {
|
|
10138
|
-
t7 = /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { color: "primary", disabled: t4, onClick: t5, children: t6 });
|
|
10501
|
+
t7 = /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { size: "small", color: "primary", disabled: t4, onClick: t5, children: t6 });
|
|
10139
10502
|
$[16] = t4;
|
|
10140
10503
|
$[17] = t5;
|
|
10141
10504
|
$[18] = t7;
|
|
@@ -10670,8 +11033,100 @@
|
|
|
10670
11033
|
}
|
|
10671
11034
|
return t8;
|
|
10672
11035
|
}
|
|
11036
|
+
function EditorEntityAction(t0) {
|
|
11037
|
+
const $ = reactCompilerRuntime.c(23);
|
|
11038
|
+
const {
|
|
11039
|
+
path: fullPath,
|
|
11040
|
+
parentCollectionIds,
|
|
11041
|
+
collection,
|
|
11042
|
+
formContext
|
|
11043
|
+
} = t0;
|
|
11044
|
+
const authController = core.useAuthController();
|
|
11045
|
+
const navigationController = core.useNavigationController();
|
|
11046
|
+
const collectionEditorController = useCollectionEditorController();
|
|
11047
|
+
let t1;
|
|
11048
|
+
if ($[0] !== navigationController || $[1] !== parentCollectionIds) {
|
|
11049
|
+
t1 = navigationController.getCollectionFromIds(parentCollectionIds);
|
|
11050
|
+
$[0] = navigationController;
|
|
11051
|
+
$[1] = parentCollectionIds;
|
|
11052
|
+
$[2] = t1;
|
|
11053
|
+
} else {
|
|
11054
|
+
t1 = $[2];
|
|
11055
|
+
}
|
|
11056
|
+
const parentCollection = t1;
|
|
11057
|
+
let t2;
|
|
11058
|
+
if ($[3] !== authController || $[4] !== collection || $[5] !== collectionEditorController) {
|
|
11059
|
+
t2 = collectionEditorController.configPermissions ? collectionEditorController.configPermissions({
|
|
11060
|
+
user: authController.user,
|
|
11061
|
+
collection
|
|
11062
|
+
}).editCollections : true;
|
|
11063
|
+
$[3] = authController;
|
|
11064
|
+
$[4] = collection;
|
|
11065
|
+
$[5] = collectionEditorController;
|
|
11066
|
+
$[6] = t2;
|
|
11067
|
+
} else {
|
|
11068
|
+
t2 = $[6];
|
|
11069
|
+
}
|
|
11070
|
+
const canEditCollection = t2;
|
|
11071
|
+
const isDirty = formContext?.formex.dirty ?? false;
|
|
11072
|
+
const t3 = canEditCollection ? isDirty ? "You need to save the document before changing the schema" : "Edit schema for this form" : "You don't have permissions to edit this collection";
|
|
11073
|
+
const t4 = !canEditCollection || isDirty;
|
|
11074
|
+
let t5;
|
|
11075
|
+
if ($[7] !== canEditCollection || $[8] !== collection || $[9] !== collectionEditorController || $[10] !== fullPath || $[11] !== parentCollection || $[12] !== parentCollectionIds) {
|
|
11076
|
+
t5 = canEditCollection ? () => collectionEditorController?.editCollection({
|
|
11077
|
+
id: collection.id,
|
|
11078
|
+
fullPath,
|
|
11079
|
+
parentCollectionIds,
|
|
11080
|
+
parentCollection
|
|
11081
|
+
}) : void 0;
|
|
11082
|
+
$[7] = canEditCollection;
|
|
11083
|
+
$[8] = collection;
|
|
11084
|
+
$[9] = collectionEditorController;
|
|
11085
|
+
$[10] = fullPath;
|
|
11086
|
+
$[11] = parentCollection;
|
|
11087
|
+
$[12] = parentCollectionIds;
|
|
11088
|
+
$[13] = t5;
|
|
11089
|
+
} else {
|
|
11090
|
+
t5 = $[13];
|
|
11091
|
+
}
|
|
11092
|
+
let t6;
|
|
11093
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
11094
|
+
t6 = /* @__PURE__ */ jsxRuntime.jsx(ui.SettingsIcon, { size: "small" });
|
|
11095
|
+
$[14] = t6;
|
|
11096
|
+
} else {
|
|
11097
|
+
t6 = $[14];
|
|
11098
|
+
}
|
|
11099
|
+
let t7;
|
|
11100
|
+
if ($[15] !== t4 || $[16] !== t5) {
|
|
11101
|
+
t7 = /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { color: "primary", disabled: t4, onClick: t5, children: t6 });
|
|
11102
|
+
$[15] = t4;
|
|
11103
|
+
$[16] = t5;
|
|
11104
|
+
$[17] = t7;
|
|
11105
|
+
} else {
|
|
11106
|
+
t7 = $[17];
|
|
11107
|
+
}
|
|
11108
|
+
let t8;
|
|
11109
|
+
if ($[18] !== t3 || $[19] !== t7) {
|
|
11110
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { asChild: true, title: t3, children: t7 });
|
|
11111
|
+
$[18] = t3;
|
|
11112
|
+
$[19] = t7;
|
|
11113
|
+
$[20] = t8;
|
|
11114
|
+
} else {
|
|
11115
|
+
t8 = $[20];
|
|
11116
|
+
}
|
|
11117
|
+
const editorButton = t8;
|
|
11118
|
+
let t9;
|
|
11119
|
+
if ($[21] !== editorButton) {
|
|
11120
|
+
t9 = /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: editorButton });
|
|
11121
|
+
$[21] = editorButton;
|
|
11122
|
+
$[22] = t9;
|
|
11123
|
+
} else {
|
|
11124
|
+
t9 = $[22];
|
|
11125
|
+
}
|
|
11126
|
+
return t9;
|
|
11127
|
+
}
|
|
10673
11128
|
function useCollectionEditorPlugin(t0) {
|
|
10674
|
-
const $ = reactCompilerRuntime.c(
|
|
11129
|
+
const $ = reactCompilerRuntime.c(22);
|
|
10675
11130
|
const {
|
|
10676
11131
|
collectionConfigController,
|
|
10677
11132
|
configPermissions,
|
|
@@ -10727,47 +11182,59 @@
|
|
|
10727
11182
|
t4 = $[11];
|
|
10728
11183
|
}
|
|
10729
11184
|
let t5;
|
|
10730
|
-
if ($[12] !== t4) {
|
|
11185
|
+
if ($[12] !== collectionConfigController.navigationEntries || $[13] !== collectionConfigController.saveNavigationEntries || $[14] !== t4) {
|
|
10731
11186
|
t5 = {
|
|
10732
11187
|
additionalActions: t3,
|
|
10733
11188
|
additionalChildrenStart: t4,
|
|
10734
11189
|
CollectionActions: HomePageEditorCollectionAction,
|
|
10735
|
-
AdditionalCards: NewCollectionCard
|
|
11190
|
+
AdditionalCards: NewCollectionCard,
|
|
11191
|
+
allowDragAndDrop: true,
|
|
11192
|
+
navigationEntries: collectionConfigController.navigationEntries,
|
|
11193
|
+
onNavigationEntriesUpdate: collectionConfigController.saveNavigationEntries
|
|
10736
11194
|
};
|
|
10737
|
-
$[12] =
|
|
10738
|
-
$[13] =
|
|
11195
|
+
$[12] = collectionConfigController.navigationEntries;
|
|
11196
|
+
$[13] = collectionConfigController.saveNavigationEntries;
|
|
11197
|
+
$[14] = t4;
|
|
11198
|
+
$[15] = t5;
|
|
10739
11199
|
} else {
|
|
10740
|
-
t5 = $[
|
|
11200
|
+
t5 = $[15];
|
|
10741
11201
|
}
|
|
10742
11202
|
let t6;
|
|
10743
|
-
|
|
11203
|
+
let t7;
|
|
11204
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10744
11205
|
t6 = {
|
|
10745
11206
|
CollectionActionsStart: EditorCollectionActionStart,
|
|
10746
11207
|
CollectionActions: EditorCollectionAction,
|
|
10747
11208
|
HeaderAction: CollectionViewHeaderAction,
|
|
10748
11209
|
AddColumnComponent: PropertyAddColumnComponent
|
|
10749
11210
|
};
|
|
10750
|
-
|
|
11211
|
+
t7 = {
|
|
11212
|
+
ActionsTop: EditorEntityAction
|
|
11213
|
+
};
|
|
11214
|
+
$[16] = t6;
|
|
11215
|
+
$[17] = t7;
|
|
10751
11216
|
} else {
|
|
10752
|
-
t6 = $[
|
|
11217
|
+
t6 = $[16];
|
|
11218
|
+
t7 = $[17];
|
|
10753
11219
|
}
|
|
10754
|
-
let
|
|
10755
|
-
if ($[
|
|
10756
|
-
|
|
11220
|
+
let t8;
|
|
11221
|
+
if ($[18] !== collectionConfigController.loading || $[19] !== t2 || $[20] !== t5) {
|
|
11222
|
+
t8 = {
|
|
10757
11223
|
key: "collection_editor",
|
|
10758
11224
|
loading: collectionConfigController.loading,
|
|
10759
11225
|
provider: t2,
|
|
10760
11226
|
homePage: t5,
|
|
10761
|
-
collectionView: t6
|
|
11227
|
+
collectionView: t6,
|
|
11228
|
+
form: t7
|
|
10762
11229
|
};
|
|
10763
|
-
$[
|
|
10764
|
-
$[
|
|
10765
|
-
$[
|
|
10766
|
-
$[
|
|
11230
|
+
$[18] = collectionConfigController.loading;
|
|
11231
|
+
$[19] = t2;
|
|
11232
|
+
$[20] = t5;
|
|
11233
|
+
$[21] = t8;
|
|
10767
11234
|
} else {
|
|
10768
|
-
|
|
11235
|
+
t8 = $[21];
|
|
10769
11236
|
}
|
|
10770
|
-
return
|
|
11237
|
+
return t8;
|
|
10771
11238
|
}
|
|
10772
11239
|
function IntroWidget() {
|
|
10773
11240
|
const $ = reactCompilerRuntime.c(11);
|
|
@@ -10848,11 +11315,19 @@
|
|
|
10848
11315
|
};
|
|
10849
11316
|
backendCollections.forEach(markAsEditable);
|
|
10850
11317
|
const result = core.joinCollectionLists(baseCollections, backendCollections, [], modifyCollection);
|
|
10851
|
-
result.sort((a, b) =>
|
|
10852
|
-
|
|
10853
|
-
baseCollections
|
|
10854
|
-
|
|
10855
|
-
|
|
11318
|
+
result.sort((a, b) => {
|
|
11319
|
+
const indexA = baseCollections.findIndex((c) => c.id === a.id);
|
|
11320
|
+
const indexB = baseCollections.findIndex((c) => c.id === b.id);
|
|
11321
|
+
if (indexA === -1 && indexB === -1) {
|
|
11322
|
+
return 0;
|
|
11323
|
+
}
|
|
11324
|
+
if (indexA === -1) {
|
|
11325
|
+
return 1;
|
|
11326
|
+
}
|
|
11327
|
+
if (indexB === -1) {
|
|
11328
|
+
return -1;
|
|
11329
|
+
}
|
|
11330
|
+
return indexA - indexB;
|
|
10856
11331
|
});
|
|
10857
11332
|
return result;
|
|
10858
11333
|
};
|