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