@firecms/collection_editor 3.0.0-beta.11 → 3.0.0-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ConfigControllerProvider.d.ts +0 -9
- package/dist/index.es.js +852 -668
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +850 -666
- package/dist/index.umd.js.map +1 -1
- package/dist/types/collection_editor_controller.d.ts +0 -10
- package/dist/ui/collection_editor/CollectionDetailsForm.d.ts +3 -1
- package/dist/ui/collection_editor/LayoutModeSwitch.d.ts +5 -0
- package/dist/useCollectionEditorPlugin.d.ts +1 -10
- package/dist/utils/collections.d.ts +1 -1
- package/package.json +18 -17
- package/src/ConfigControllerProvider.tsx +1 -10
- package/src/types/collection_editor_controller.tsx +0 -7
- package/src/ui/HomePageEditorCollectionAction.tsx +1 -0
- package/src/ui/collection_editor/CollectionDetailsForm.tsx +24 -14
- package/src/ui/collection_editor/CollectionEditorDialog.tsx +42 -4
- package/src/ui/collection_editor/CollectionPropertiesEditorForm.tsx +0 -2
- package/src/ui/collection_editor/EnumForm.tsx +2 -2
- package/src/ui/collection_editor/GetCodeDialog.tsx +1 -1
- package/src/ui/collection_editor/LayoutModeSwitch.tsx +54 -0
- package/src/ui/collection_editor/PropertyEditView.tsx +2 -1
- package/src/ui/collection_editor/import/CollectionEditorImportDataPreview.tsx +10 -2
- package/src/ui/collection_editor/utils/strings.ts +13 -6
- package/src/useCollectionEditorPlugin.tsx +0 -9
- package/src/utils/collections.ts +13 -7
package/dist/index.umd.js
CHANGED
|
@@ -28,13 +28,154 @@
|
|
|
28
28
|
const useCollectionEditorController = () => {
|
|
29
29
|
return React.useContext(CollectionEditorContext);
|
|
30
30
|
};
|
|
31
|
+
function LayoutModeSwitch(t0) {
|
|
32
|
+
const $ = reactCompilerRuntime.c(29);
|
|
33
|
+
const {
|
|
34
|
+
value,
|
|
35
|
+
onChange,
|
|
36
|
+
className
|
|
37
|
+
} = t0;
|
|
38
|
+
let t1;
|
|
39
|
+
if ($[0] !== className) {
|
|
40
|
+
t1 = ui.cls(className);
|
|
41
|
+
$[0] = className;
|
|
42
|
+
$[1] = t1;
|
|
43
|
+
} else {
|
|
44
|
+
t1 = $[1];
|
|
45
|
+
}
|
|
46
|
+
let t2;
|
|
47
|
+
let t3;
|
|
48
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
49
|
+
t2 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "label", color: "secondary", className: "ml-3.5", children: "Document view" });
|
|
50
|
+
t3 = ui.cls("flex flex-row gap-4");
|
|
51
|
+
$[2] = t2;
|
|
52
|
+
$[3] = t3;
|
|
53
|
+
} else {
|
|
54
|
+
t2 = $[2];
|
|
55
|
+
t3 = $[3];
|
|
56
|
+
}
|
|
57
|
+
let t4;
|
|
58
|
+
if ($[4] !== onChange) {
|
|
59
|
+
t4 = () => onChange("side_panel");
|
|
60
|
+
$[4] = onChange;
|
|
61
|
+
$[5] = t4;
|
|
62
|
+
} else {
|
|
63
|
+
t4 = $[5];
|
|
64
|
+
}
|
|
65
|
+
const t5 = value === "side_panel" ? "border-primary dark:border-primary" : "border-surface-400 dark:border-surface-600";
|
|
66
|
+
let t6;
|
|
67
|
+
if ($[6] !== t5) {
|
|
68
|
+
t6 = ui.cls("my-2 rounded-md mx-0 p-4 focus:outline-none transition ease-in-out duration-150 flex flex-row gap-4 items-center", "text-surface-700 dark:text-surface-accent-300", "hover:text-primary-dark dark:hover:text-primary focus:ring-primary hover:ring-1 hover:ring-primary", t5);
|
|
69
|
+
$[6] = t5;
|
|
70
|
+
$[7] = t6;
|
|
71
|
+
} else {
|
|
72
|
+
t6 = $[7];
|
|
73
|
+
}
|
|
74
|
+
let t7;
|
|
75
|
+
let t8;
|
|
76
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
77
|
+
t7 = /* @__PURE__ */ jsxRuntime.jsx(ui.VerticalSplitIcon, {});
|
|
78
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "label", children: "Side panel" });
|
|
79
|
+
$[8] = t7;
|
|
80
|
+
$[9] = t8;
|
|
81
|
+
} else {
|
|
82
|
+
t7 = $[8];
|
|
83
|
+
t8 = $[9];
|
|
84
|
+
}
|
|
85
|
+
let t9;
|
|
86
|
+
if ($[10] !== t4 || $[11] !== t6) {
|
|
87
|
+
t9 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Documents are open in a side panel", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Card, { onClick: t4, className: t6, children: [
|
|
88
|
+
t7,
|
|
89
|
+
t8
|
|
90
|
+
] }) });
|
|
91
|
+
$[10] = t4;
|
|
92
|
+
$[11] = t6;
|
|
93
|
+
$[12] = t9;
|
|
94
|
+
} else {
|
|
95
|
+
t9 = $[12];
|
|
96
|
+
}
|
|
97
|
+
let t10;
|
|
98
|
+
if ($[13] !== onChange) {
|
|
99
|
+
t10 = () => onChange("full_screen");
|
|
100
|
+
$[13] = onChange;
|
|
101
|
+
$[14] = t10;
|
|
102
|
+
} else {
|
|
103
|
+
t10 = $[14];
|
|
104
|
+
}
|
|
105
|
+
const t11 = value === "full_screen" ? "border-primary dark:border-primary" : "border-surface-400 dark:border-surface-600";
|
|
106
|
+
let t12;
|
|
107
|
+
if ($[15] !== t11) {
|
|
108
|
+
t12 = ui.cls("my-2 rounded-md mx-0 p-4 focus:outline-none transition ease-in-out duration-150 flex flex-row gap-4 items-center", "text-surface-700 dark:text-surface-accent-300", "hover:text-primary-dark dark:hover:text-primary focus:ring-primary hover:ring-1 hover:ring-primary", t11);
|
|
109
|
+
$[15] = t11;
|
|
110
|
+
$[16] = t12;
|
|
111
|
+
} else {
|
|
112
|
+
t12 = $[16];
|
|
113
|
+
}
|
|
114
|
+
let t13;
|
|
115
|
+
let t14;
|
|
116
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
117
|
+
t13 = /* @__PURE__ */ jsxRuntime.jsx(ui.SquareIcon, {});
|
|
118
|
+
t14 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "label", children: "Full screen" });
|
|
119
|
+
$[17] = t13;
|
|
120
|
+
$[18] = t14;
|
|
121
|
+
} else {
|
|
122
|
+
t13 = $[17];
|
|
123
|
+
t14 = $[18];
|
|
124
|
+
}
|
|
125
|
+
let t15;
|
|
126
|
+
if ($[19] !== t10 || $[20] !== t12) {
|
|
127
|
+
t15 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Documents are open full-screen", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Card, { onClick: t10, className: t12, children: [
|
|
128
|
+
t13,
|
|
129
|
+
t14
|
|
130
|
+
] }) });
|
|
131
|
+
$[19] = t10;
|
|
132
|
+
$[20] = t12;
|
|
133
|
+
$[21] = t15;
|
|
134
|
+
} else {
|
|
135
|
+
t15 = $[21];
|
|
136
|
+
}
|
|
137
|
+
let t16;
|
|
138
|
+
if ($[22] !== t15 || $[23] !== t9) {
|
|
139
|
+
t16 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t3, children: [
|
|
140
|
+
t9,
|
|
141
|
+
t15
|
|
142
|
+
] });
|
|
143
|
+
$[22] = t15;
|
|
144
|
+
$[23] = t9;
|
|
145
|
+
$[24] = t16;
|
|
146
|
+
} else {
|
|
147
|
+
t16 = $[24];
|
|
148
|
+
}
|
|
149
|
+
let t17;
|
|
150
|
+
if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
|
|
151
|
+
t17 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", className: "ml-3.5", children: "Should documents be opened full screen or in an inline side dialog" });
|
|
152
|
+
$[25] = t17;
|
|
153
|
+
} else {
|
|
154
|
+
t17 = $[25];
|
|
155
|
+
}
|
|
156
|
+
let t18;
|
|
157
|
+
if ($[26] !== t1 || $[27] !== t16) {
|
|
158
|
+
t18 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t1, children: [
|
|
159
|
+
t2,
|
|
160
|
+
t16,
|
|
161
|
+
t17
|
|
162
|
+
] });
|
|
163
|
+
$[26] = t1;
|
|
164
|
+
$[27] = t16;
|
|
165
|
+
$[28] = t18;
|
|
166
|
+
} else {
|
|
167
|
+
t18 = $[28];
|
|
168
|
+
}
|
|
169
|
+
return t18;
|
|
170
|
+
}
|
|
31
171
|
function CollectionDetailsForm(t0) {
|
|
32
|
-
const $ = reactCompilerRuntime.c(
|
|
172
|
+
const $ = reactCompilerRuntime.c(176);
|
|
33
173
|
const {
|
|
34
174
|
isNewCollection,
|
|
35
175
|
reservedGroups,
|
|
36
176
|
groups,
|
|
37
|
-
parentCollection
|
|
177
|
+
parentCollection,
|
|
178
|
+
children
|
|
38
179
|
} = t0;
|
|
39
180
|
const groupRef = React.useRef(null);
|
|
40
181
|
const {
|
|
@@ -47,7 +188,7 @@
|
|
|
47
188
|
isSubmitting,
|
|
48
189
|
submitCount
|
|
49
190
|
} = formex.useFormex();
|
|
50
|
-
|
|
191
|
+
useCollectionEditorController();
|
|
51
192
|
const [iconDialogOpen, setIconDialogOpen] = React.useState(false);
|
|
52
193
|
const [advancedPanelExpanded, setAdvancedPanelExpanded] = React.useState(false);
|
|
53
194
|
let t1;
|
|
@@ -103,7 +244,6 @@
|
|
|
103
244
|
t4 = $[8];
|
|
104
245
|
}
|
|
105
246
|
React.useEffect(t3, t4);
|
|
106
|
-
const DatabaseField = collectionEditor.components?.DatabaseField ?? DefaultDatabaseField;
|
|
107
247
|
let t5;
|
|
108
248
|
if ($[9] !== values) {
|
|
109
249
|
t5 = /* @__PURE__ */ jsxRuntime.jsx(core.IconForView, { collectionOrView: values });
|
|
@@ -161,154 +301,153 @@
|
|
|
161
301
|
t12 = $[14];
|
|
162
302
|
}
|
|
163
303
|
let t13;
|
|
164
|
-
if ($[15] !==
|
|
165
|
-
t13 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
166
|
-
$[15] =
|
|
167
|
-
$[16] =
|
|
168
|
-
$[17] =
|
|
169
|
-
$[18] = t13;
|
|
304
|
+
if ($[15] !== updateDatabaseId || $[16] !== values.databaseId) {
|
|
305
|
+
t13 = /* @__PURE__ */ jsxRuntime.jsx(DefaultDatabaseField, { databaseId: values.databaseId, onDatabaseIdUpdate: updateDatabaseId });
|
|
306
|
+
$[15] = updateDatabaseId;
|
|
307
|
+
$[16] = values.databaseId;
|
|
308
|
+
$[17] = t13;
|
|
170
309
|
} else {
|
|
171
|
-
t13 = $[
|
|
310
|
+
t13 = $[17];
|
|
172
311
|
}
|
|
173
312
|
let t14;
|
|
174
|
-
if ($[
|
|
313
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
175
314
|
t14 = () => setIconDialogOpen(true);
|
|
176
|
-
$[
|
|
315
|
+
$[18] = t14;
|
|
177
316
|
} else {
|
|
178
|
-
t14 = $[
|
|
317
|
+
t14 = $[18];
|
|
179
318
|
}
|
|
180
319
|
let t15;
|
|
181
|
-
if ($[
|
|
320
|
+
if ($[19] !== collectionIcon) {
|
|
182
321
|
t15 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Change icon", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { shape: "square", onClick: t14, children: collectionIcon }) });
|
|
183
|
-
$[
|
|
184
|
-
$[
|
|
322
|
+
$[19] = collectionIcon;
|
|
323
|
+
$[20] = t15;
|
|
185
324
|
} else {
|
|
186
|
-
t15 = $[
|
|
325
|
+
t15 = $[20];
|
|
187
326
|
}
|
|
188
327
|
let t16;
|
|
189
|
-
if ($[
|
|
328
|
+
if ($[21] !== t12 || $[22] !== t13 || $[23] !== t15) {
|
|
190
329
|
t16 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row gap-2 py-2 pt-3 items-center", children: [
|
|
191
330
|
t12,
|
|
192
331
|
t13,
|
|
193
332
|
t15
|
|
194
333
|
] });
|
|
195
|
-
$[
|
|
196
|
-
$[
|
|
197
|
-
$[
|
|
198
|
-
$[
|
|
334
|
+
$[21] = t12;
|
|
335
|
+
$[22] = t13;
|
|
336
|
+
$[23] = t15;
|
|
337
|
+
$[24] = t16;
|
|
199
338
|
} else {
|
|
200
|
-
t16 = $[
|
|
339
|
+
t16 = $[24];
|
|
201
340
|
}
|
|
202
341
|
let t17;
|
|
203
|
-
if ($[
|
|
342
|
+
if ($[25] !== parentCollection) {
|
|
204
343
|
t17 = parentCollection && /* @__PURE__ */ jsxRuntime.jsx(ui.Chip, { colorScheme: "tealDarker", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "caption", children: [
|
|
205
344
|
"This is a subcollection of ",
|
|
206
345
|
/* @__PURE__ */ jsxRuntime.jsx("b", { children: parentCollection.name })
|
|
207
346
|
] }) });
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
347
|
+
$[25] = parentCollection;
|
|
348
|
+
$[26] = t17;
|
|
210
349
|
} else {
|
|
211
|
-
t17 = $[
|
|
350
|
+
t17 = $[26];
|
|
212
351
|
}
|
|
213
352
|
let t18;
|
|
214
|
-
if ($[
|
|
353
|
+
if ($[27] !== t16 || $[28] !== t17) {
|
|
215
354
|
t18 = /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
216
355
|
t16,
|
|
217
356
|
t17
|
|
218
357
|
] });
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
$[
|
|
358
|
+
$[27] = t16;
|
|
359
|
+
$[28] = t17;
|
|
360
|
+
$[29] = t18;
|
|
222
361
|
} else {
|
|
223
|
-
t18 = $[
|
|
362
|
+
t18 = $[29];
|
|
224
363
|
}
|
|
225
364
|
const t19 = "grid grid-cols-12 gap-4";
|
|
226
365
|
const t20 = values.name ?? "";
|
|
227
366
|
let t21;
|
|
228
|
-
if ($[
|
|
367
|
+
if ($[30] !== updateName) {
|
|
229
368
|
t21 = (e) => updateName(e.target.value);
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
369
|
+
$[30] = updateName;
|
|
370
|
+
$[31] = t21;
|
|
232
371
|
} else {
|
|
233
|
-
t21 = $[
|
|
372
|
+
t21 = $[31];
|
|
234
373
|
}
|
|
235
374
|
const t22 = showErrors && Boolean(errors.name);
|
|
236
375
|
let t23;
|
|
237
|
-
if ($[
|
|
376
|
+
if ($[32] !== t20 || $[33] !== t21 || $[34] !== t22) {
|
|
238
377
|
t23 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { value: t20, onChange: t21, label: "Name", autoFocus: true, required: true, error: t22 });
|
|
239
|
-
$[
|
|
240
|
-
$[
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
378
|
+
$[32] = t20;
|
|
379
|
+
$[33] = t21;
|
|
380
|
+
$[34] = t22;
|
|
381
|
+
$[35] = t23;
|
|
243
382
|
} else {
|
|
244
|
-
t23 = $[
|
|
383
|
+
t23 = $[35];
|
|
245
384
|
}
|
|
246
385
|
const t24 = touched.name && Boolean(errors.name);
|
|
247
386
|
const t25 = touched.name && Boolean(errors.name) ? errors.name : "Name of this collection, usually a plural name (e.g. Products)";
|
|
248
387
|
let t26;
|
|
249
|
-
if ($[
|
|
388
|
+
if ($[36] !== t24 || $[37] !== t25) {
|
|
250
389
|
t26 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t24, children: t25 });
|
|
251
|
-
$[
|
|
252
|
-
$[
|
|
253
|
-
$[
|
|
390
|
+
$[36] = t24;
|
|
391
|
+
$[37] = t25;
|
|
392
|
+
$[38] = t26;
|
|
254
393
|
} else {
|
|
255
|
-
t26 = $[
|
|
394
|
+
t26 = $[38];
|
|
256
395
|
}
|
|
257
396
|
let t27;
|
|
258
|
-
if ($[
|
|
397
|
+
if ($[39] !== t23 || $[40] !== t26) {
|
|
259
398
|
t27 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
260
399
|
t23,
|
|
261
400
|
t26
|
|
262
401
|
] });
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
402
|
+
$[39] = t23;
|
|
403
|
+
$[40] = t26;
|
|
404
|
+
$[41] = t27;
|
|
266
405
|
} else {
|
|
267
|
-
t27 = $[
|
|
406
|
+
t27 = $[41];
|
|
268
407
|
}
|
|
269
408
|
const t28 = isSubcollection ? "" : "sm:col-span-8";
|
|
270
409
|
let t29;
|
|
271
|
-
if ($[
|
|
410
|
+
if ($[42] !== t28) {
|
|
272
411
|
t29 = ui.cls("col-span-12 ", t28);
|
|
273
|
-
$[
|
|
274
|
-
$[
|
|
412
|
+
$[42] = t28;
|
|
413
|
+
$[43] = t29;
|
|
275
414
|
} else {
|
|
276
|
-
t29 = $[
|
|
415
|
+
t29 = $[43];
|
|
277
416
|
}
|
|
278
417
|
const t30 = !isNewCollection;
|
|
279
418
|
const t31 = showErrors && Boolean(errors.path);
|
|
280
419
|
let t32;
|
|
281
|
-
if ($[
|
|
420
|
+
if ($[44] !== t30 || $[45] !== t31) {
|
|
282
421
|
t32 = /* @__PURE__ */ jsxRuntime.jsx(formex.Field, { name: "path", as: ui.DebouncedTextField, label: "Path", disabled: t30, required: true, error: t31 });
|
|
283
|
-
$[
|
|
284
|
-
$[
|
|
285
|
-
$[
|
|
422
|
+
$[44] = t30;
|
|
423
|
+
$[45] = t31;
|
|
424
|
+
$[46] = t32;
|
|
286
425
|
} else {
|
|
287
|
-
t32 = $[
|
|
426
|
+
t32 = $[46];
|
|
288
427
|
}
|
|
289
428
|
const t33 = touched.path && Boolean(errors.path);
|
|
290
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";
|
|
291
430
|
let t35;
|
|
292
|
-
if ($[
|
|
431
|
+
if ($[47] !== t33 || $[48] !== t34) {
|
|
293
432
|
t35 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t33, children: t34 });
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
296
|
-
$[
|
|
433
|
+
$[47] = t33;
|
|
434
|
+
$[48] = t34;
|
|
435
|
+
$[49] = t35;
|
|
297
436
|
} else {
|
|
298
|
-
t35 = $[
|
|
437
|
+
t35 = $[49];
|
|
299
438
|
}
|
|
300
439
|
let t36;
|
|
301
|
-
if ($[
|
|
440
|
+
if ($[50] !== t29 || $[51] !== t32 || $[52] !== t35) {
|
|
302
441
|
t36 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t29, children: [
|
|
303
442
|
t32,
|
|
304
443
|
t35
|
|
305
444
|
] });
|
|
306
|
-
$[
|
|
307
|
-
$[
|
|
308
|
-
$[
|
|
309
|
-
$[
|
|
445
|
+
$[50] = t29;
|
|
446
|
+
$[51] = t32;
|
|
447
|
+
$[52] = t35;
|
|
448
|
+
$[53] = t36;
|
|
310
449
|
} else {
|
|
311
|
-
t36 = $[
|
|
450
|
+
t36 = $[53];
|
|
312
451
|
}
|
|
313
452
|
const t37 = !isSubcollection && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 sm:col-span-4 relative", children: [
|
|
314
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" }),
|
|
@@ -318,471 +457,492 @@
|
|
|
318
457
|
}, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow", children: group_0 }) }, index + "_" + group_0)) }),
|
|
319
458
|
/* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { children: showErrors && Boolean(errors.group) ? errors.group : "Group in the home page" })
|
|
320
459
|
] });
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
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;
|
|
466
|
+
} else {
|
|
467
|
+
t39 = $[55];
|
|
468
|
+
}
|
|
469
|
+
let t40;
|
|
470
|
+
if ($[56] !== t38 || $[57] !== t39) {
|
|
471
|
+
t40 = /* @__PURE__ */ jsxRuntime.jsx(LayoutModeSwitch, { className: "col-span-12", value: t38, onChange: t39 });
|
|
472
|
+
$[56] = t38;
|
|
473
|
+
$[57] = t39;
|
|
474
|
+
$[58] = t40;
|
|
475
|
+
} else {
|
|
476
|
+
t40 = $[58];
|
|
477
|
+
}
|
|
478
|
+
let t41;
|
|
479
|
+
if ($[59] === Symbol.for("react.memo_cache_sentinel")) {
|
|
480
|
+
t41 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row text-surface-500", children: [
|
|
324
481
|
/* @__PURE__ */ jsxRuntime.jsx(ui.SettingsIcon, {}),
|
|
325
482
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "ml-2", children: "Advanced" })
|
|
326
483
|
] });
|
|
327
|
-
$[
|
|
484
|
+
$[59] = t41;
|
|
328
485
|
} else {
|
|
329
|
-
|
|
486
|
+
t41 = $[59];
|
|
330
487
|
}
|
|
331
|
-
const
|
|
332
|
-
const
|
|
333
|
-
let
|
|
334
|
-
if ($[
|
|
335
|
-
|
|
336
|
-
$[
|
|
337
|
-
$[
|
|
338
|
-
$[
|
|
488
|
+
const t42 = !isNewCollection;
|
|
489
|
+
const t43 = showErrors && Boolean(errors.id);
|
|
490
|
+
let t44;
|
|
491
|
+
if ($[60] !== t42 || $[61] !== t43) {
|
|
492
|
+
t44 = /* @__PURE__ */ jsxRuntime.jsx(formex.Field, { name: "id", as: ui.DebouncedTextField, disabled: t42, label: "Collection id", error: t43 });
|
|
493
|
+
$[60] = t42;
|
|
494
|
+
$[61] = t43;
|
|
495
|
+
$[62] = t44;
|
|
339
496
|
} else {
|
|
340
|
-
|
|
497
|
+
t44 = $[62];
|
|
341
498
|
}
|
|
342
|
-
const
|
|
343
|
-
const
|
|
344
|
-
let
|
|
345
|
-
if ($[
|
|
346
|
-
|
|
347
|
-
$[
|
|
348
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
} else {
|
|
351
|
-
|
|
352
|
-
}
|
|
353
|
-
let
|
|
354
|
-
if ($[
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
499
|
+
const t45 = touched.id && Boolean(errors.id);
|
|
500
|
+
const t46 = touched.id && Boolean(errors.id) ? errors.id : "This id identifies this collection. Typically the same as the path.";
|
|
501
|
+
let t47;
|
|
502
|
+
if ($[63] !== t45 || $[64] !== t46) {
|
|
503
|
+
t47 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t45, children: t46 });
|
|
504
|
+
$[63] = t45;
|
|
505
|
+
$[64] = t46;
|
|
506
|
+
$[65] = t47;
|
|
507
|
+
} else {
|
|
508
|
+
t47 = $[65];
|
|
509
|
+
}
|
|
510
|
+
let t48;
|
|
511
|
+
if ($[66] !== t44 || $[67] !== t47) {
|
|
512
|
+
t48 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
513
|
+
t44,
|
|
514
|
+
t47
|
|
358
515
|
] });
|
|
359
|
-
$[
|
|
360
|
-
$[
|
|
361
|
-
$[
|
|
516
|
+
$[66] = t44;
|
|
517
|
+
$[67] = t47;
|
|
518
|
+
$[68] = t48;
|
|
362
519
|
} else {
|
|
363
|
-
|
|
520
|
+
t48 = $[68];
|
|
364
521
|
}
|
|
365
|
-
const
|
|
366
|
-
let
|
|
367
|
-
if ($[
|
|
368
|
-
|
|
522
|
+
const t49 = showErrors && Boolean(errors.singularName);
|
|
523
|
+
let t50;
|
|
524
|
+
if ($[69] !== handleChange || $[70] !== setFieldTouched) {
|
|
525
|
+
t50 = (e_0) => {
|
|
369
526
|
setFieldTouched("singularName", true);
|
|
370
527
|
return handleChange(e_0);
|
|
371
528
|
};
|
|
372
|
-
$[
|
|
373
|
-
$[
|
|
374
|
-
$[
|
|
529
|
+
$[69] = handleChange;
|
|
530
|
+
$[70] = setFieldTouched;
|
|
531
|
+
$[71] = t50;
|
|
375
532
|
} else {
|
|
376
|
-
|
|
533
|
+
t50 = $[71];
|
|
377
534
|
}
|
|
378
|
-
const
|
|
379
|
-
let
|
|
380
|
-
if ($[
|
|
381
|
-
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
535
|
+
const t51 = values.singularName ?? "";
|
|
536
|
+
let t52;
|
|
537
|
+
if ($[72] !== t49 || $[73] !== t50 || $[74] !== t51) {
|
|
538
|
+
t52 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t49, name: "singularName", "aria-describedby": "singularName-helper", onChange: t50, value: t51, label: "Singular name" });
|
|
539
|
+
$[72] = t49;
|
|
540
|
+
$[73] = t50;
|
|
541
|
+
$[74] = t51;
|
|
542
|
+
$[75] = t52;
|
|
386
543
|
} else {
|
|
387
|
-
|
|
544
|
+
t52 = $[75];
|
|
388
545
|
}
|
|
389
|
-
const
|
|
390
|
-
const
|
|
391
|
-
let
|
|
392
|
-
if ($[
|
|
393
|
-
|
|
394
|
-
$[
|
|
395
|
-
$[
|
|
396
|
-
$[
|
|
397
|
-
} else {
|
|
398
|
-
|
|
399
|
-
}
|
|
400
|
-
let
|
|
401
|
-
if ($[
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
546
|
+
const t53 = showErrors && Boolean(errors.singularName);
|
|
547
|
+
const t54 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define a singular name for your entities";
|
|
548
|
+
let t55;
|
|
549
|
+
if ($[76] !== t53 || $[77] !== t54) {
|
|
550
|
+
t55 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t53, children: t54 });
|
|
551
|
+
$[76] = t53;
|
|
552
|
+
$[77] = t54;
|
|
553
|
+
$[78] = t55;
|
|
554
|
+
} else {
|
|
555
|
+
t55 = $[78];
|
|
556
|
+
}
|
|
557
|
+
let t56;
|
|
558
|
+
if ($[79] !== t52 || $[80] !== t55) {
|
|
559
|
+
t56 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
560
|
+
t52,
|
|
561
|
+
t55
|
|
405
562
|
] });
|
|
406
|
-
$[
|
|
407
|
-
$[
|
|
408
|
-
$[
|
|
563
|
+
$[79] = t52;
|
|
564
|
+
$[80] = t55;
|
|
565
|
+
$[81] = t56;
|
|
409
566
|
} else {
|
|
410
|
-
|
|
567
|
+
t56 = $[81];
|
|
411
568
|
}
|
|
412
|
-
const
|
|
413
|
-
let
|
|
414
|
-
if ($[
|
|
415
|
-
|
|
569
|
+
const t57 = showErrors && Boolean(errors.sideDialogWidth);
|
|
570
|
+
let t58;
|
|
571
|
+
if ($[82] !== setFieldTouched || $[83] !== setFieldValue) {
|
|
572
|
+
t58 = (e_1) => {
|
|
416
573
|
setFieldTouched("sideDialogWidth", true);
|
|
417
|
-
const
|
|
418
|
-
if (!
|
|
574
|
+
const value_0 = e_1.target.value;
|
|
575
|
+
if (!value_0) {
|
|
419
576
|
setFieldValue("sideDialogWidth", null);
|
|
420
577
|
} else {
|
|
421
|
-
if (!isNaN(Number(
|
|
422
|
-
setFieldValue("sideDialogWidth", Number(
|
|
578
|
+
if (!isNaN(Number(value_0))) {
|
|
579
|
+
setFieldValue("sideDialogWidth", Number(value_0));
|
|
423
580
|
}
|
|
424
581
|
}
|
|
425
582
|
};
|
|
426
|
-
$[
|
|
427
|
-
$[
|
|
428
|
-
$[
|
|
583
|
+
$[82] = setFieldTouched;
|
|
584
|
+
$[83] = setFieldValue;
|
|
585
|
+
$[84] = t58;
|
|
429
586
|
} else {
|
|
430
|
-
|
|
587
|
+
t58 = $[84];
|
|
431
588
|
}
|
|
432
|
-
let
|
|
433
|
-
if ($[
|
|
434
|
-
|
|
589
|
+
let t59;
|
|
590
|
+
if ($[85] !== setFieldValue) {
|
|
591
|
+
t59 = () => {
|
|
435
592
|
setFieldValue("sideDialogWidth", null);
|
|
436
593
|
};
|
|
437
|
-
$[
|
|
438
|
-
$[
|
|
594
|
+
$[85] = setFieldValue;
|
|
595
|
+
$[86] = t59;
|
|
439
596
|
} else {
|
|
440
|
-
|
|
597
|
+
t59 = $[86];
|
|
441
598
|
}
|
|
442
|
-
const
|
|
443
|
-
let
|
|
444
|
-
if ($[
|
|
445
|
-
|
|
446
|
-
$[
|
|
599
|
+
const t60 = !values.sideDialogWidth;
|
|
600
|
+
let t61;
|
|
601
|
+
if ($[87] === Symbol.for("react.memo_cache_sentinel")) {
|
|
602
|
+
t61 = /* @__PURE__ */ jsxRuntime.jsx(ui.CloseIcon, { size: "small" });
|
|
603
|
+
$[87] = t61;
|
|
447
604
|
} else {
|
|
448
|
-
|
|
605
|
+
t61 = $[87];
|
|
449
606
|
}
|
|
450
|
-
let
|
|
451
|
-
if ($[
|
|
452
|
-
|
|
453
|
-
$[
|
|
454
|
-
$[
|
|
455
|
-
$[
|
|
607
|
+
let t62;
|
|
608
|
+
if ($[88] !== t59 || $[89] !== t60) {
|
|
609
|
+
t62 = /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { size: "small", onClick: t59, disabled: t60, children: t61 });
|
|
610
|
+
$[88] = t59;
|
|
611
|
+
$[89] = t60;
|
|
612
|
+
$[90] = t62;
|
|
456
613
|
} else {
|
|
457
|
-
|
|
614
|
+
t62 = $[90];
|
|
458
615
|
}
|
|
459
|
-
const
|
|
460
|
-
let t61;
|
|
461
|
-
if ($[87] !== t54 || $[88] !== t55 || $[89] !== t59 || $[90] !== t60) {
|
|
462
|
-
t61 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t54, name: "sideDialogWidth", type: "number", "aria-describedby": "sideDialogWidth-helper", onChange: t55, endAdornment: t59, value: t60, label: "Side dialog width" });
|
|
463
|
-
$[87] = t54;
|
|
464
|
-
$[88] = t55;
|
|
465
|
-
$[89] = t59;
|
|
466
|
-
$[90] = t60;
|
|
467
|
-
$[91] = t61;
|
|
468
|
-
} else {
|
|
469
|
-
t61 = $[91];
|
|
470
|
-
}
|
|
471
|
-
const t62 = showErrors && Boolean(errors.singularName);
|
|
472
|
-
const t63 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define the width (in pixels) of entities side dialog. Default is 768px";
|
|
616
|
+
const t63 = values.sideDialogWidth ?? "";
|
|
473
617
|
let t64;
|
|
474
|
-
if ($[92] !==
|
|
475
|
-
t64 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
476
|
-
$[
|
|
477
|
-
$[
|
|
478
|
-
$[
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
$[96] =
|
|
490
|
-
$[97] =
|
|
491
|
-
|
|
492
|
-
|
|
618
|
+
if ($[91] !== t57 || $[92] !== t58 || $[93] !== t62 || $[94] !== t63) {
|
|
619
|
+
t64 = /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { error: t57, name: "sideDialogWidth", type: "number", "aria-describedby": "sideDialogWidth-helper", onChange: t58, endAdornment: t62, value: t63, label: "Side dialog width" });
|
|
620
|
+
$[91] = t57;
|
|
621
|
+
$[92] = t58;
|
|
622
|
+
$[93] = t62;
|
|
623
|
+
$[94] = t63;
|
|
624
|
+
$[95] = t64;
|
|
625
|
+
} else {
|
|
626
|
+
t64 = $[95];
|
|
627
|
+
}
|
|
628
|
+
const t65 = showErrors && Boolean(errors.singularName);
|
|
629
|
+
const t66 = showErrors && Boolean(errors.singularName) ? errors.singularName : "Optionally define the width (in pixels) of entities side dialog. Default is 768px";
|
|
630
|
+
let t67;
|
|
631
|
+
if ($[96] !== t65 || $[97] !== t66) {
|
|
632
|
+
t67 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t65, children: t66 });
|
|
633
|
+
$[96] = t65;
|
|
634
|
+
$[97] = t66;
|
|
635
|
+
$[98] = t67;
|
|
636
|
+
} else {
|
|
637
|
+
t67 = $[98];
|
|
493
638
|
}
|
|
494
|
-
const t66 = showErrors && Boolean(errors.description);
|
|
495
|
-
const t67 = values.description ?? "";
|
|
496
639
|
let t68;
|
|
497
|
-
if ($[
|
|
498
|
-
t68 = /* @__PURE__ */ jsxRuntime.
|
|
499
|
-
|
|
500
|
-
|
|
640
|
+
if ($[99] !== t64 || $[100] !== t67) {
|
|
641
|
+
t68 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
642
|
+
t64,
|
|
643
|
+
t67
|
|
644
|
+
] });
|
|
645
|
+
$[99] = t64;
|
|
501
646
|
$[100] = t67;
|
|
502
647
|
$[101] = t68;
|
|
503
648
|
} else {
|
|
504
649
|
t68 = $[101];
|
|
505
650
|
}
|
|
506
651
|
const t69 = showErrors && Boolean(errors.description);
|
|
507
|
-
const t70 =
|
|
652
|
+
const t70 = values.description ?? "";
|
|
508
653
|
let t71;
|
|
509
|
-
if ($[102] !==
|
|
510
|
-
t71 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
511
|
-
$[102] =
|
|
512
|
-
$[103] =
|
|
513
|
-
$[104] =
|
|
514
|
-
|
|
515
|
-
t71 = $[104];
|
|
516
|
-
}
|
|
517
|
-
let t72;
|
|
518
|
-
if ($[105] !== t68 || $[106] !== t71) {
|
|
519
|
-
t72 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
520
|
-
t68,
|
|
521
|
-
t71
|
|
522
|
-
] });
|
|
523
|
-
$[105] = t68;
|
|
524
|
-
$[106] = t71;
|
|
525
|
-
$[107] = t72;
|
|
654
|
+
if ($[102] !== handleChange || $[103] !== t69 || $[104] !== t70) {
|
|
655
|
+
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" });
|
|
656
|
+
$[102] = handleChange;
|
|
657
|
+
$[103] = t69;
|
|
658
|
+
$[104] = t70;
|
|
659
|
+
$[105] = t71;
|
|
526
660
|
} else {
|
|
527
|
-
|
|
661
|
+
t71 = $[105];
|
|
528
662
|
}
|
|
529
|
-
const
|
|
663
|
+
const t72 = showErrors && Boolean(errors.description);
|
|
664
|
+
const t73 = showErrors && Boolean(errors.description) ? errors.description : "Description of the collection, you can use markdown";
|
|
530
665
|
let t74;
|
|
531
|
-
if ($[
|
|
532
|
-
t74 =
|
|
666
|
+
if ($[106] !== t72 || $[107] !== t73) {
|
|
667
|
+
t74 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { error: t72, children: t73 });
|
|
668
|
+
$[106] = t72;
|
|
669
|
+
$[107] = t73;
|
|
533
670
|
$[108] = t74;
|
|
534
671
|
} else {
|
|
535
672
|
t74 = $[108];
|
|
536
673
|
}
|
|
537
674
|
let t75;
|
|
538
|
-
if ($[109] !==
|
|
539
|
-
t75 = /* @__PURE__ */ jsxRuntime.
|
|
540
|
-
|
|
541
|
-
|
|
675
|
+
if ($[109] !== t71 || $[110] !== t74) {
|
|
676
|
+
t75 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
677
|
+
t71,
|
|
678
|
+
t74
|
|
679
|
+
] });
|
|
680
|
+
$[109] = t71;
|
|
681
|
+
$[110] = t74;
|
|
542
682
|
$[111] = t75;
|
|
543
683
|
} else {
|
|
544
684
|
t75 = $[111];
|
|
545
685
|
}
|
|
546
|
-
const t76 =
|
|
686
|
+
const t76 = values.defaultSize ?? "";
|
|
547
687
|
let t77;
|
|
548
|
-
if ($[112]
|
|
549
|
-
t77 = (
|
|
688
|
+
if ($[112] === Symbol.for("react.memo_cache_sentinel")) {
|
|
689
|
+
t77 = ["xs", "s", "m", "l", "xl"].map(_temp2$7);
|
|
690
|
+
$[112] = t77;
|
|
691
|
+
} else {
|
|
692
|
+
t77 = $[112];
|
|
693
|
+
}
|
|
694
|
+
let t78;
|
|
695
|
+
if ($[113] !== handleChange || $[114] !== t76) {
|
|
696
|
+
t78 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { name: "defaultSize", size: "large", fullWidth: true, label: "Default row size", position: "item-aligned", onChange: handleChange, value: t76, renderValue: _temp$b, children: t77 }) });
|
|
697
|
+
$[113] = handleChange;
|
|
698
|
+
$[114] = t76;
|
|
699
|
+
$[115] = t78;
|
|
700
|
+
} else {
|
|
701
|
+
t78 = $[115];
|
|
702
|
+
}
|
|
703
|
+
const t79 = customIdValue === "code_defined";
|
|
704
|
+
let t80;
|
|
705
|
+
if ($[116] !== setFieldValue) {
|
|
706
|
+
t80 = (v) => {
|
|
550
707
|
if (v === "code_defined") {
|
|
551
708
|
throw new Error("This should not happen");
|
|
552
|
-
} else {
|
|
553
|
-
if (v === "true") {
|
|
554
|
-
setFieldValue("customId", true);
|
|
555
|
-
} else {
|
|
556
|
-
if (v === "false") {
|
|
557
|
-
setFieldValue("customId", false);
|
|
558
|
-
} else {
|
|
559
|
-
if (v === "optional") {
|
|
560
|
-
setFieldValue("customId", "optional");
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
709
|
}
|
|
710
|
+
setFieldValue("customId", v);
|
|
565
711
|
};
|
|
566
|
-
$[
|
|
567
|
-
$[
|
|
712
|
+
$[116] = setFieldValue;
|
|
713
|
+
$[117] = t80;
|
|
568
714
|
} else {
|
|
569
|
-
|
|
570
|
-
}
|
|
571
|
-
const t78 = customIdValue ?? "";
|
|
572
|
-
let t79;
|
|
573
|
-
let t80;
|
|
574
|
-
let t81;
|
|
575
|
-
if ($[114] === Symbol.for("react.memo_cache_sentinel")) {
|
|
576
|
-
t79 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "false", children: "Document ID is generated automatically" });
|
|
577
|
-
t80 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "true", children: "Users must define an ID" });
|
|
578
|
-
t81 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
|
|
579
|
-
$[114] = t79;
|
|
580
|
-
$[115] = t80;
|
|
581
|
-
$[116] = t81;
|
|
582
|
-
} else {
|
|
583
|
-
t79 = $[114];
|
|
584
|
-
t80 = $[115];
|
|
585
|
-
t81 = $[116];
|
|
715
|
+
t80 = $[117];
|
|
586
716
|
}
|
|
717
|
+
const t81 = customIdValue ?? "";
|
|
587
718
|
let t82;
|
|
588
|
-
if ($[117] !== t76 || $[118] !== t77 || $[119] !== t78) {
|
|
589
|
-
t82 = /* @__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: t76, onValueChange: t77, value: t78, renderValue: _temp3$4, children: [
|
|
590
|
-
t79,
|
|
591
|
-
t80,
|
|
592
|
-
t81
|
|
593
|
-
] }) });
|
|
594
|
-
$[117] = t76;
|
|
595
|
-
$[118] = t77;
|
|
596
|
-
$[119] = t78;
|
|
597
|
-
$[120] = t82;
|
|
598
|
-
} else {
|
|
599
|
-
t82 = $[120];
|
|
600
|
-
}
|
|
601
719
|
let t83;
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
720
|
+
let t84;
|
|
721
|
+
if ($[118] === Symbol.for("react.memo_cache_sentinel")) {
|
|
722
|
+
t82 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "false", children: "Document ID is generated automatically" });
|
|
723
|
+
t83 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "true", children: "Users must define an ID" });
|
|
724
|
+
t84 = /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: "optional", children: "Users can define an ID, but it is not required" });
|
|
725
|
+
$[118] = t82;
|
|
726
|
+
$[119] = t83;
|
|
727
|
+
$[120] = t84;
|
|
728
|
+
} else {
|
|
729
|
+
t82 = $[118];
|
|
730
|
+
t83 = $[119];
|
|
731
|
+
t84 = $[120];
|
|
608
732
|
}
|
|
609
|
-
const t84 = values.collectionGroup ?? false;
|
|
610
733
|
let t85;
|
|
611
|
-
if ($[
|
|
612
|
-
t85 = /* @__PURE__ */ jsxRuntime.jsx(ui.
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
734
|
+
if ($[121] !== t79 || $[122] !== t80 || $[123] !== t81) {
|
|
735
|
+
t85 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-12", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Select, { name: "customId", label: "Document IDs generation", position: "item-aligned", size: "large", fullWidth: true, disabled: t79, onValueChange: t80, value: t81, renderValue: _temp3$4, children: [
|
|
736
|
+
t82,
|
|
737
|
+
t83,
|
|
738
|
+
t84
|
|
739
|
+
] }) });
|
|
740
|
+
$[121] = t79;
|
|
741
|
+
$[122] = t80;
|
|
742
|
+
$[123] = t81;
|
|
743
|
+
$[124] = t85;
|
|
616
744
|
} else {
|
|
617
|
-
t85 = $[
|
|
745
|
+
t85 = $[124];
|
|
618
746
|
}
|
|
619
747
|
let t86;
|
|
620
|
-
if ($[
|
|
621
|
-
t86 =
|
|
748
|
+
if ($[125] !== setFieldValue) {
|
|
749
|
+
t86 = (v_0) => setFieldValue("collectionGroup", v_0);
|
|
750
|
+
$[125] = setFieldValue;
|
|
622
751
|
$[126] = t86;
|
|
623
752
|
} else {
|
|
624
753
|
t86 = $[126];
|
|
625
754
|
}
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
] });
|
|
632
|
-
$[127] = t85;
|
|
755
|
+
const t87 = values.collectionGroup ?? false;
|
|
756
|
+
let t88;
|
|
757
|
+
if ($[127] !== t86 || $[128] !== t87) {
|
|
758
|
+
t88 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: "Collection group", onValueChange: t86, value: t87 });
|
|
759
|
+
$[127] = t86;
|
|
633
760
|
$[128] = t87;
|
|
761
|
+
$[129] = t88;
|
|
634
762
|
} else {
|
|
635
|
-
|
|
763
|
+
t88 = $[129];
|
|
636
764
|
}
|
|
637
|
-
let
|
|
638
|
-
if ($[
|
|
639
|
-
|
|
640
|
-
$[
|
|
641
|
-
$[130] = t88;
|
|
765
|
+
let t89;
|
|
766
|
+
if ($[130] === Symbol.for("react.memo_cache_sentinel")) {
|
|
767
|
+
t89 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { children: "A collection group consists of all collections with the same path. This allows you to query over multiple collections at once." });
|
|
768
|
+
$[130] = t89;
|
|
642
769
|
} else {
|
|
643
|
-
|
|
770
|
+
t89 = $[130];
|
|
644
771
|
}
|
|
645
|
-
const t89 = values.textSearchEnabled ?? false;
|
|
646
772
|
let t90;
|
|
647
|
-
if ($[131] !== t88
|
|
648
|
-
t90 = /* @__PURE__ */ jsxRuntime.
|
|
773
|
+
if ($[131] !== t88) {
|
|
774
|
+
t90 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-4", children: [
|
|
775
|
+
t88,
|
|
776
|
+
t89
|
|
777
|
+
] });
|
|
649
778
|
$[131] = t88;
|
|
650
|
-
$[132] =
|
|
651
|
-
$[133] = t90;
|
|
779
|
+
$[132] = t90;
|
|
652
780
|
} else {
|
|
653
|
-
t90 = $[
|
|
781
|
+
t90 = $[132];
|
|
654
782
|
}
|
|
655
783
|
let t91;
|
|
656
|
-
if ($[
|
|
657
|
-
t91 =
|
|
784
|
+
if ($[133] !== setFieldValue) {
|
|
785
|
+
t91 = (v_1) => setFieldValue("textSearchEnabled", v_1);
|
|
786
|
+
$[133] = setFieldValue;
|
|
658
787
|
$[134] = t91;
|
|
659
788
|
} else {
|
|
660
789
|
t91 = $[134];
|
|
661
790
|
}
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
] });
|
|
668
|
-
$[135] = t90;
|
|
791
|
+
const t92 = values.textSearchEnabled ?? false;
|
|
792
|
+
let t93;
|
|
793
|
+
if ($[135] !== t91 || $[136] !== t92) {
|
|
794
|
+
t93 = /* @__PURE__ */ jsxRuntime.jsx(ui.BooleanSwitchWithLabel, { position: "start", size: "large", label: "Enable text search for this collection", onValueChange: t91, value: t92 });
|
|
795
|
+
$[135] = t91;
|
|
669
796
|
$[136] = t92;
|
|
797
|
+
$[137] = t93;
|
|
670
798
|
} else {
|
|
671
|
-
|
|
799
|
+
t93 = $[137];
|
|
672
800
|
}
|
|
673
|
-
let
|
|
674
|
-
if ($[
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
801
|
+
let t94;
|
|
802
|
+
if ($[138] === Symbol.for("react.memo_cache_sentinel")) {
|
|
803
|
+
t94 = /* @__PURE__ */ jsxRuntime.jsx(core.FieldCaption, { children: "Allow text search for this collection. If you have not specified a text search delegate, this will use the built-in local text search. This is not recommended for large collections, as it may incur in performance and cost issues." });
|
|
804
|
+
$[138] = t94;
|
|
805
|
+
} else {
|
|
806
|
+
t94 = $[138];
|
|
807
|
+
}
|
|
808
|
+
let t95;
|
|
809
|
+
if ($[139] !== t93) {
|
|
810
|
+
t95 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12", children: [
|
|
811
|
+
t93,
|
|
812
|
+
t94
|
|
813
|
+
] });
|
|
814
|
+
$[139] = t93;
|
|
815
|
+
$[140] = t95;
|
|
816
|
+
} else {
|
|
817
|
+
t95 = $[140];
|
|
818
|
+
}
|
|
819
|
+
let t96;
|
|
820
|
+
if ($[141] !== t48 || $[142] !== t56 || $[143] !== t68 || $[144] !== t75 || $[145] !== t78 || $[146] !== t85 || $[147] !== t90 || $[148] !== t95) {
|
|
821
|
+
t96 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-12 gap-4 p-4", children: [
|
|
822
|
+
t48,
|
|
823
|
+
t56,
|
|
824
|
+
t68,
|
|
680
825
|
t75,
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
826
|
+
t78,
|
|
827
|
+
t85,
|
|
828
|
+
t90,
|
|
829
|
+
t95
|
|
684
830
|
] });
|
|
685
|
-
$[
|
|
686
|
-
$[
|
|
687
|
-
$[
|
|
688
|
-
$[
|
|
689
|
-
$[
|
|
690
|
-
$[
|
|
691
|
-
$[
|
|
692
|
-
$[
|
|
693
|
-
$[
|
|
694
|
-
} else {
|
|
695
|
-
|
|
831
|
+
$[141] = t48;
|
|
832
|
+
$[142] = t56;
|
|
833
|
+
$[143] = t68;
|
|
834
|
+
$[144] = t75;
|
|
835
|
+
$[145] = t78;
|
|
836
|
+
$[146] = t85;
|
|
837
|
+
$[147] = t90;
|
|
838
|
+
$[148] = t95;
|
|
839
|
+
$[149] = t96;
|
|
840
|
+
} else {
|
|
841
|
+
t96 = $[149];
|
|
696
842
|
}
|
|
697
|
-
let
|
|
698
|
-
if ($[
|
|
699
|
-
|
|
700
|
-
$[
|
|
701
|
-
$[
|
|
702
|
-
$[
|
|
843
|
+
let t97;
|
|
844
|
+
if ($[150] !== advancedPanelExpanded || $[151] !== t96) {
|
|
845
|
+
t97 = /* @__PURE__ */ jsxRuntime.jsx(ui.ExpandablePanel, { expanded: advancedPanelExpanded, onExpandedChange: setAdvancedPanelExpanded, title: t41, initiallyExpanded: false, children: t96 });
|
|
846
|
+
$[150] = advancedPanelExpanded;
|
|
847
|
+
$[151] = t96;
|
|
848
|
+
$[152] = t97;
|
|
703
849
|
} else {
|
|
704
|
-
|
|
850
|
+
t97 = $[152];
|
|
705
851
|
}
|
|
706
|
-
let
|
|
707
|
-
if ($[
|
|
708
|
-
|
|
852
|
+
let t98;
|
|
853
|
+
if ($[153] !== children || $[154] !== t97) {
|
|
854
|
+
t98 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-12 mt-8", children: [
|
|
855
|
+
t97,
|
|
856
|
+
children
|
|
857
|
+
] });
|
|
858
|
+
$[153] = children;
|
|
859
|
+
$[154] = t97;
|
|
860
|
+
$[155] = t98;
|
|
861
|
+
} else {
|
|
862
|
+
t98 = $[155];
|
|
863
|
+
}
|
|
864
|
+
let t99;
|
|
865
|
+
if ($[156] !== t27 || $[157] !== t36 || $[158] !== t37 || $[159] !== t40 || $[160] !== t98) {
|
|
866
|
+
t99 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t19, children: [
|
|
709
867
|
t27,
|
|
710
868
|
t36,
|
|
711
869
|
t37,
|
|
712
|
-
|
|
870
|
+
t40,
|
|
871
|
+
t98
|
|
713
872
|
] });
|
|
714
|
-
$[
|
|
715
|
-
$[
|
|
716
|
-
$[
|
|
717
|
-
$[
|
|
718
|
-
$[
|
|
873
|
+
$[156] = t27;
|
|
874
|
+
$[157] = t36;
|
|
875
|
+
$[158] = t37;
|
|
876
|
+
$[159] = t40;
|
|
877
|
+
$[160] = t98;
|
|
878
|
+
$[161] = t99;
|
|
719
879
|
} else {
|
|
720
|
-
|
|
880
|
+
t99 = $[161];
|
|
721
881
|
}
|
|
722
|
-
let
|
|
723
|
-
if ($[
|
|
724
|
-
|
|
882
|
+
let t100;
|
|
883
|
+
if ($[162] === Symbol.for("react.memo_cache_sentinel")) {
|
|
884
|
+
t100 = /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
725
885
|
height: "52px"
|
|
726
886
|
} });
|
|
727
|
-
$[
|
|
887
|
+
$[162] = t100;
|
|
728
888
|
} else {
|
|
729
|
-
|
|
889
|
+
t100 = $[162];
|
|
730
890
|
}
|
|
731
|
-
let
|
|
732
|
-
if ($[
|
|
733
|
-
|
|
891
|
+
let t101;
|
|
892
|
+
if ($[163] !== setFieldValue) {
|
|
893
|
+
t101 = (icon) => {
|
|
734
894
|
setIconDialogOpen(false);
|
|
735
895
|
setFieldValue("icon", icon);
|
|
736
896
|
};
|
|
737
|
-
$[
|
|
738
|
-
$[
|
|
897
|
+
$[163] = setFieldValue;
|
|
898
|
+
$[164] = t101;
|
|
739
899
|
} else {
|
|
740
|
-
|
|
900
|
+
t101 = $[164];
|
|
741
901
|
}
|
|
742
|
-
let
|
|
743
|
-
if ($[
|
|
744
|
-
|
|
745
|
-
$[
|
|
746
|
-
$[
|
|
747
|
-
$[
|
|
902
|
+
let t102;
|
|
903
|
+
if ($[165] !== t101 || $[166] !== values.icon) {
|
|
904
|
+
t102 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsxRuntime.jsx(core.SearchIconsView, { selectedIcon: values.icon, onIconSelected: t101 }) });
|
|
905
|
+
$[165] = t101;
|
|
906
|
+
$[166] = values.icon;
|
|
907
|
+
$[167] = t102;
|
|
748
908
|
} else {
|
|
749
|
-
|
|
909
|
+
t102 = $[167];
|
|
750
910
|
}
|
|
751
|
-
let
|
|
752
|
-
if ($[
|
|
753
|
-
|
|
754
|
-
$[
|
|
755
|
-
$[
|
|
756
|
-
$[
|
|
911
|
+
let t103;
|
|
912
|
+
if ($[168] !== iconDialogOpen || $[169] !== t102) {
|
|
913
|
+
t103 = /* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t102 });
|
|
914
|
+
$[168] = iconDialogOpen;
|
|
915
|
+
$[169] = t102;
|
|
916
|
+
$[170] = t103;
|
|
757
917
|
} else {
|
|
758
|
-
|
|
918
|
+
t103 = $[170];
|
|
759
919
|
}
|
|
760
|
-
let
|
|
761
|
-
if ($[
|
|
762
|
-
|
|
920
|
+
let t104;
|
|
921
|
+
if ($[171] !== T0 || $[172] !== t103 || $[173] !== t18 || $[174] !== t99) {
|
|
922
|
+
t104 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: t7, children: /* @__PURE__ */ jsxRuntime.jsxs(T0, { maxWidth: t8, className: t9, children: [
|
|
763
923
|
t18,
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
924
|
+
t99,
|
|
925
|
+
t100,
|
|
926
|
+
t103
|
|
767
927
|
] }) });
|
|
768
|
-
$[
|
|
769
|
-
$[
|
|
770
|
-
$[
|
|
771
|
-
$[
|
|
772
|
-
$[
|
|
928
|
+
$[171] = T0;
|
|
929
|
+
$[172] = t103;
|
|
930
|
+
$[173] = t18;
|
|
931
|
+
$[174] = t99;
|
|
932
|
+
$[175] = t104;
|
|
773
933
|
} else {
|
|
774
|
-
|
|
934
|
+
t104 = $[175];
|
|
775
935
|
}
|
|
776
|
-
return
|
|
936
|
+
return t104;
|
|
777
937
|
}
|
|
778
|
-
function _temp3$4(
|
|
779
|
-
if (
|
|
938
|
+
function _temp3$4(value_3) {
|
|
939
|
+
if (value_3 === "code_defined") {
|
|
780
940
|
return "Code defined";
|
|
781
941
|
} else {
|
|
782
|
-
if (
|
|
942
|
+
if (value_3 === "true") {
|
|
783
943
|
return "Users must define an ID";
|
|
784
944
|
} else {
|
|
785
|
-
if (
|
|
945
|
+
if (value_3 === "optional") {
|
|
786
946
|
return "Users can define an ID, but it is not required";
|
|
787
947
|
} else {
|
|
788
948
|
return "Document ID is generated automatically";
|
|
@@ -790,11 +950,11 @@
|
|
|
790
950
|
}
|
|
791
951
|
}
|
|
792
952
|
}
|
|
793
|
-
function _temp2$7(
|
|
794
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value:
|
|
953
|
+
function _temp2$7(value_2) {
|
|
954
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: value_2, children: value_2.toUpperCase() }, `size-select-${value_2}`);
|
|
795
955
|
}
|
|
796
|
-
function _temp$b(
|
|
797
|
-
return
|
|
956
|
+
function _temp$b(value_1) {
|
|
957
|
+
return value_1.toUpperCase();
|
|
798
958
|
}
|
|
799
959
|
function DefaultDatabaseField(t0) {
|
|
800
960
|
const $ = reactCompilerRuntime.c(5);
|
|
@@ -1043,7 +1203,7 @@
|
|
|
1043
1203
|
let t6;
|
|
1044
1204
|
if ($[15] !== allowDataInference || $[16] !== disabled || $[17] !== inferValues || $[18] !== inferring) {
|
|
1045
1205
|
t6 = allowDataInference && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { loading: inferring, disabled: disabled || inferring, variant: "text", size: "small", onClick: inferValues, children: [
|
|
1046
|
-
inferring ? /* @__PURE__ */ jsxRuntime.jsx(ui.CircularProgress, { size: "
|
|
1206
|
+
inferring ? /* @__PURE__ */ jsxRuntime.jsx(ui.CircularProgress, { size: "smallest" }) : /* @__PURE__ */ jsxRuntime.jsx(ui.AutorenewIcon, {}),
|
|
1047
1207
|
"Infer values from data"
|
|
1048
1208
|
] });
|
|
1049
1209
|
$[15] = allowDataInference;
|
|
@@ -1087,7 +1247,7 @@
|
|
|
1087
1247
|
}
|
|
1088
1248
|
let t10;
|
|
1089
1249
|
if ($[26] !== buildEntry || $[27] !== disabled || $[28] !== enumValuesPath || $[29] !== t8 || $[30] !== values.enumValues) {
|
|
1090
|
-
t10 = /* @__PURE__ */ jsxRuntime.jsx(core.ArrayContainer, { droppableId: enumValuesPath, addLabel: "Add enum value", value: values.enumValues, disabled, size: "small", buildEntry, onInternalIdAdded: setLastInternalIdAdded,
|
|
1250
|
+
t10 = /* @__PURE__ */ jsxRuntime.jsx(core.ArrayContainer, { droppableId: enumValuesPath, addLabel: "Add enum value", value: values.enumValues, disabled, size: "small", buildEntry, onInternalIdAdded: setLastInternalIdAdded, canAddElements: true, onValueChange: t8, newDefaultEntry: t9 });
|
|
1091
1251
|
$[26] = buildEntry;
|
|
1092
1252
|
$[27] = disabled;
|
|
1093
1253
|
$[28] = enumValuesPath;
|
|
@@ -6439,9 +6599,11 @@
|
|
|
6439
6599
|
}
|
|
6440
6600
|
function camelCase(str) {
|
|
6441
6601
|
if (!str) return "";
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6602
|
+
if (str.length === 1) return str.toLowerCase();
|
|
6603
|
+
const parts = str.split(/[-_ ]+/).filter(Boolean);
|
|
6604
|
+
if (parts.length === 0) return "";
|
|
6605
|
+
return parts[0].toLowerCase() + // Transform remaining parts to have first letter uppercase
|
|
6606
|
+
parts.slice(1).map((part) => part.charAt(0).toUpperCase() + part.substring(1).toLowerCase()).join("");
|
|
6445
6607
|
}
|
|
6446
6608
|
function GetCodeDialog(t0) {
|
|
6447
6609
|
const $ = reactCompilerRuntime.c(22);
|
|
@@ -6469,7 +6631,7 @@
|
|
|
6469
6631
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6470
6632
|
t2 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "body2", className: "my-4 mb-8", children: [
|
|
6471
6633
|
"If you want to customise the collection in code, you can add this collection code to your CMS app configuration. More info in the ",
|
|
6472
|
-
/* @__PURE__ */ jsxRuntime.jsx("a", { rel: "noopener noreferrer", href: "https://firecms.co/docs/
|
|
6634
|
+
/* @__PURE__ */ jsxRuntime.jsx("a", { rel: "noopener noreferrer", href: "https://firecms.co/docs/cloud/quickstart", children: "docs" }),
|
|
6473
6635
|
"."
|
|
6474
6636
|
] });
|
|
6475
6637
|
$[2] = t2;
|
|
@@ -6757,7 +6919,6 @@
|
|
|
6757
6919
|
previousId,
|
|
6758
6920
|
namespace: namespace_3
|
|
6759
6921
|
}) => {
|
|
6760
|
-
console.log("!!!!!! onPropertyChanged", property_0);
|
|
6761
6922
|
const fullId_0 = id_0 ? getFullId(id_0, namespace_3) : void 0;
|
|
6762
6923
|
const propertyPath = fullId_0 ? idToPropertiesPath(fullId_0) : void 0;
|
|
6763
6924
|
if (previousId && previousId !== id_0) {
|
|
@@ -8311,10 +8472,8 @@
|
|
|
8311
8472
|
editable: true
|
|
8312
8473
|
};
|
|
8313
8474
|
if (propertyPath_0) {
|
|
8314
|
-
|
|
8475
|
+
{
|
|
8315
8476
|
setFieldValue(propertyPath_0, inferredNewProperty, false);
|
|
8316
|
-
} else {
|
|
8317
|
-
setFieldValue(propertyPath_0, property_1, false);
|
|
8318
8477
|
}
|
|
8319
8478
|
setFieldTouched(propertyPath_0, true, false);
|
|
8320
8479
|
}
|
|
@@ -8621,102 +8780,104 @@
|
|
|
8621
8780
|
return t9;
|
|
8622
8781
|
}
|
|
8623
8782
|
function CollectionEditorImportDataPreview(t0) {
|
|
8624
|
-
const $ = reactCompilerRuntime.c(
|
|
8783
|
+
const $ = reactCompilerRuntime.c(19);
|
|
8625
8784
|
const {
|
|
8626
8785
|
importConfig,
|
|
8627
8786
|
properties,
|
|
8628
8787
|
propertiesOrder
|
|
8629
8788
|
} = t0;
|
|
8789
|
+
const authController = core.useAuthController();
|
|
8630
8790
|
const [loading, setLoading] = React.useState(false);
|
|
8631
8791
|
let t1;
|
|
8632
|
-
if ($[0] !==
|
|
8792
|
+
if ($[0] !== authController || $[1] !== importConfig || $[2] !== properties) {
|
|
8633
8793
|
t1 = async function loadEntities2() {
|
|
8634
|
-
const mappedData = importConfig.importData.map((d) => data_import_export.convertDataToEntity(d, importConfig.idColumn, importConfig.headersMapping, properties, "TEMP_PATH", importConfig.defaultValues));
|
|
8794
|
+
const mappedData = importConfig.importData.map((d) => data_import_export.convertDataToEntity(authController, d, importConfig.idColumn, importConfig.headersMapping, properties, "TEMP_PATH", importConfig.defaultValues));
|
|
8635
8795
|
importConfig.setEntities(mappedData);
|
|
8636
8796
|
};
|
|
8637
|
-
$[0] =
|
|
8638
|
-
$[1] =
|
|
8639
|
-
$[2] =
|
|
8797
|
+
$[0] = authController;
|
|
8798
|
+
$[1] = importConfig;
|
|
8799
|
+
$[2] = properties;
|
|
8800
|
+
$[3] = t1;
|
|
8640
8801
|
} else {
|
|
8641
|
-
t1 = $[
|
|
8802
|
+
t1 = $[3];
|
|
8642
8803
|
}
|
|
8643
8804
|
const loadEntities = t1;
|
|
8644
8805
|
let t2;
|
|
8645
|
-
if ($[
|
|
8806
|
+
if ($[4] !== loadEntities) {
|
|
8646
8807
|
t2 = () => {
|
|
8647
8808
|
loadEntities().finally(() => setLoading(false));
|
|
8648
8809
|
};
|
|
8649
|
-
$[
|
|
8650
|
-
$[
|
|
8810
|
+
$[4] = loadEntities;
|
|
8811
|
+
$[5] = t2;
|
|
8651
8812
|
} else {
|
|
8652
|
-
t2 = $[
|
|
8813
|
+
t2 = $[5];
|
|
8653
8814
|
}
|
|
8654
8815
|
let t3;
|
|
8655
|
-
if ($[
|
|
8816
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8656
8817
|
t3 = [];
|
|
8657
|
-
$[
|
|
8818
|
+
$[6] = t3;
|
|
8658
8819
|
} else {
|
|
8659
|
-
t3 = $[
|
|
8820
|
+
t3 = $[6];
|
|
8660
8821
|
}
|
|
8661
8822
|
React.useEffect(t2, t3);
|
|
8662
8823
|
const selectionController = core.useSelectionController();
|
|
8663
8824
|
if (loading) {
|
|
8664
8825
|
let t42;
|
|
8665
|
-
if ($[
|
|
8826
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8666
8827
|
t42 = /* @__PURE__ */ jsxRuntime.jsx(core.CircularProgressCenter, {});
|
|
8667
|
-
$[
|
|
8828
|
+
$[7] = t42;
|
|
8668
8829
|
} else {
|
|
8669
|
-
t42 = $[
|
|
8830
|
+
t42 = $[7];
|
|
8670
8831
|
}
|
|
8671
8832
|
return t42;
|
|
8672
8833
|
}
|
|
8673
8834
|
let t4;
|
|
8674
|
-
if ($[
|
|
8835
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8675
8836
|
t4 = /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
8676
8837
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", children: "Imported data preview" }),
|
|
8677
8838
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", children: "Entities with the same id will be overwritten" })
|
|
8678
8839
|
] });
|
|
8679
|
-
$[
|
|
8840
|
+
$[8] = t4;
|
|
8680
8841
|
} else {
|
|
8681
|
-
t4 = $[
|
|
8842
|
+
t4 = $[8];
|
|
8682
8843
|
}
|
|
8683
8844
|
let t5;
|
|
8684
|
-
if ($[
|
|
8845
|
+
if ($[9] !== importConfig.entities) {
|
|
8685
8846
|
t5 = {
|
|
8686
8847
|
data: importConfig.entities,
|
|
8687
8848
|
dataLoading: false,
|
|
8688
8849
|
noMoreToLoad: false
|
|
8689
8850
|
};
|
|
8690
|
-
$[
|
|
8691
|
-
$[
|
|
8851
|
+
$[9] = importConfig.entities;
|
|
8852
|
+
$[10] = t5;
|
|
8692
8853
|
} else {
|
|
8693
|
-
t5 = $[
|
|
8854
|
+
t5 = $[10];
|
|
8694
8855
|
}
|
|
8695
8856
|
let t6;
|
|
8696
|
-
if ($[
|
|
8857
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
8697
8858
|
t6 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-12" });
|
|
8698
|
-
$[
|
|
8859
|
+
$[11] = t6;
|
|
8699
8860
|
} else {
|
|
8700
|
-
t6 = $[
|
|
8861
|
+
t6 = $[11];
|
|
8701
8862
|
}
|
|
8702
8863
|
let t7;
|
|
8703
|
-
if ($[
|
|
8864
|
+
if ($[12] !== propertiesOrder) {
|
|
8704
8865
|
t7 = propertiesOrder.map(_temp$1);
|
|
8705
|
-
$[
|
|
8706
|
-
$[
|
|
8866
|
+
$[12] = propertiesOrder;
|
|
8867
|
+
$[13] = t7;
|
|
8707
8868
|
} else {
|
|
8708
|
-
t7 = $[
|
|
8869
|
+
t7 = $[13];
|
|
8709
8870
|
}
|
|
8710
8871
|
let t8;
|
|
8711
|
-
if ($[
|
|
8712
|
-
t8 = /* @__PURE__ */ jsxRuntime.jsx(core.EntityCollectionTable, { title: t4, tableController: t5, endAdornment: t6, filterable: false, sortable: false, selectionController, displayedColumnIds: t7, properties, enablePopupIcon: false });
|
|
8713
|
-
$[
|
|
8714
|
-
$[
|
|
8715
|
-
$[
|
|
8716
|
-
$[
|
|
8717
|
-
$[
|
|
8872
|
+
if ($[14] !== properties || $[15] !== selectionController || $[16] !== t5 || $[17] !== t7) {
|
|
8873
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsx(core.EntityCollectionTable, { title: t4, tableController: t5, endAdornment: t6, filterable: false, sortable: false, selectionController, displayedColumnIds: t7, openEntityMode: "side_panel", properties, enablePopupIcon: false });
|
|
8874
|
+
$[14] = properties;
|
|
8875
|
+
$[15] = selectionController;
|
|
8876
|
+
$[16] = t5;
|
|
8877
|
+
$[17] = t7;
|
|
8878
|
+
$[18] = t8;
|
|
8718
8879
|
} else {
|
|
8719
|
-
t8 = $[
|
|
8880
|
+
t8 = $[18];
|
|
8720
8881
|
}
|
|
8721
8882
|
return t8;
|
|
8722
8883
|
}
|
|
@@ -9176,7 +9337,7 @@
|
|
|
9176
9337
|
const updatedFullPath = fullPath?.includes("/") ? fullPath?.split("/").slice(0, -1).join("/") + "/" + path : path;
|
|
9177
9338
|
const pathError_0 = validatePath(path, isNewCollection, existingPaths, values_1.id);
|
|
9178
9339
|
const parentPaths = !pathError_0 && parentCollectionIds ? navigation.convertIdsToPaths(parentCollectionIds) : void 0;
|
|
9179
|
-
const resolvedPath = !pathError_0 ? navigation.
|
|
9340
|
+
const resolvedPath = !pathError_0 ? navigation.resolveIdsFrom(updatedFullPath) : void 0;
|
|
9180
9341
|
const getDataWithPath = resolvedPath && getData ? async () => {
|
|
9181
9342
|
const data = await getData(resolvedPath, parentPaths ?? []);
|
|
9182
9343
|
if (existingEntities) {
|
|
@@ -9213,82 +9374,109 @@
|
|
|
9213
9374
|
setNextMode();
|
|
9214
9375
|
};
|
|
9215
9376
|
const editable = collection?.editable === void 0 || collection?.editable === true;
|
|
9377
|
+
const isMergedCollection = collection?.merged ?? false;
|
|
9216
9378
|
const collectionEditable = editable || isNewCollection;
|
|
9217
|
-
|
|
9218
|
-
|
|
9219
|
-
|
|
9220
|
-
|
|
9221
|
-
|
|
9222
|
-
|
|
9223
|
-
|
|
9224
|
-
|
|
9225
|
-
|
|
9226
|
-
|
|
9227
|
-
|
|
9228
|
-
|
|
9229
|
-
|
|
9230
|
-
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
|
|
9234
|
-
|
|
9235
|
-
|
|
9236
|
-
|
|
9237
|
-
|
|
9238
|
-
|
|
9239
|
-
|
|
9240
|
-
})
|
|
9241
|
-
|
|
9242
|
-
|
|
9243
|
-
|
|
9244
|
-
|
|
9245
|
-
|
|
9246
|
-
|
|
9247
|
-
|
|
9248
|
-
|
|
9249
|
-
|
|
9250
|
-
|
|
9251
|
-
|
|
9252
|
-
|
|
9253
|
-
|
|
9254
|
-
|
|
9255
|
-
|
|
9256
|
-
|
|
9257
|
-
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.
|
|
9261
|
-
"
|
|
9262
|
-
|
|
9263
|
-
|
|
9264
|
-
|
|
9265
|
-
|
|
9266
|
-
|
|
9267
|
-
|
|
9268
|
-
|
|
9269
|
-
|
|
9270
|
-
|
|
9271
|
-
|
|
9272
|
-
|
|
9273
|
-
|
|
9274
|
-
|
|
9275
|
-
|
|
9276
|
-
|
|
9277
|
-
|
|
9278
|
-
|
|
9279
|
-
|
|
9280
|
-
|
|
9281
|
-
|
|
9282
|
-
|
|
9283
|
-
|
|
9284
|
-
|
|
9285
|
-
|
|
9286
|
-
|
|
9287
|
-
|
|
9288
|
-
|
|
9379
|
+
const [deleteRequested, setDeleteRequested] = React.useState(false);
|
|
9380
|
+
const deleteCollection = () => {
|
|
9381
|
+
if (!collection) return;
|
|
9382
|
+
configController?.deleteCollection({
|
|
9383
|
+
id: collection.id
|
|
9384
|
+
}).then(() => {
|
|
9385
|
+
setDeleteRequested(false);
|
|
9386
|
+
handleCancel();
|
|
9387
|
+
snackbarController.open({
|
|
9388
|
+
message: "Collection deleted",
|
|
9389
|
+
type: "success"
|
|
9390
|
+
});
|
|
9391
|
+
});
|
|
9392
|
+
};
|
|
9393
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogContent, { fullHeight: true, children: [
|
|
9394
|
+
/* @__PURE__ */ jsxRuntime.jsx(formex.Formex, { value: formController, children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9395
|
+
!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: [
|
|
9396
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Tab, { value: "details", children: "Details" }),
|
|
9397
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Tab, { value: "properties", children: "Properties" }),
|
|
9398
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Tab, { value: "subcollections", children: "Additional views" })
|
|
9399
|
+
] }),
|
|
9400
|
+
/* @__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: [
|
|
9401
|
+
currentView === "loading" && /* @__PURE__ */ jsxRuntime.jsx(core.CircularProgressCenter, {}),
|
|
9402
|
+
currentView === "extra_view" && path && extraView?.View && /* @__PURE__ */ jsxRuntime.jsx(extraView.View, { path }),
|
|
9403
|
+
currentView === "welcome" && /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorWelcomeView, { path, onContinue: (importData, propertiesOrder_0) => {
|
|
9404
|
+
if (importData) {
|
|
9405
|
+
onImportDataSet(importData, propertiesOrder_0);
|
|
9406
|
+
setCurrentView("import_data_mapping");
|
|
9407
|
+
} else {
|
|
9408
|
+
setCurrentView("details");
|
|
9409
|
+
}
|
|
9410
|
+
}, existingCollectionPaths: existingPaths, parentCollection, pathSuggestions }),
|
|
9411
|
+
currentView === "import_data_mapping" && importConfig && /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorImportMapping, { importConfig, collectionEditable, propertyConfigs }),
|
|
9412
|
+
currentView === "import_data_preview" && importConfig && /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorImportDataPreview, { importConfig, properties: values_1.properties, propertiesOrder: values_1.propertiesOrder }),
|
|
9413
|
+
currentView === "import_data_saving" && importConfig && /* @__PURE__ */ jsxRuntime.jsx(data_import_export.ImportSaveInProgress, { importConfig, collection: values_1, path, onImportSuccess: async (importedCollection) => {
|
|
9414
|
+
snackbarController.open({
|
|
9415
|
+
type: "info",
|
|
9416
|
+
message: "Data imported successfully"
|
|
9417
|
+
});
|
|
9418
|
+
await saveCollection(values_1);
|
|
9419
|
+
handleClose(importedCollection);
|
|
9420
|
+
} }),
|
|
9421
|
+
currentView === "details" && /* @__PURE__ */ jsxRuntime.jsx(CollectionDetailsForm, { existingPaths, existingIds, groups, parentCollectionIds, parentCollection, isNewCollection, children: !isNewCollection && isMergedCollection && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 mt-8", children: [
|
|
9422
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", color: "secondary", children: "This collection is defined in code. The changes done in this editor will override the properties defined in code. You can delete the overridden values to revert to the state defined in code." }),
|
|
9423
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { color: "neutral", onClick: () => {
|
|
9424
|
+
setDeleteRequested(true);
|
|
9425
|
+
}, children: "Reset to code" })
|
|
9426
|
+
] }) }),
|
|
9427
|
+
currentView === "subcollections" && collection && /* @__PURE__ */ jsxRuntime.jsx(SubcollectionsEditTab, { parentCollection, configController, getUser, collectionInference, parentCollectionIds, collection }),
|
|
9428
|
+
currentView === "properties" && /* @__PURE__ */ jsxRuntime.jsx(CollectionPropertiesEditorForm, { showErrors: submitCount > 0, isNewCollection, reservedGroups, onPropertyError: (propertyKey, namespace, error_0) => {
|
|
9429
|
+
const current = core.removeUndefined({
|
|
9430
|
+
...propertyErrorsRef.current,
|
|
9431
|
+
[getFullIdPath(propertyKey, namespace)]: core.removeUndefined(error_0, true)
|
|
9432
|
+
}, true);
|
|
9433
|
+
propertyErrorsRef.current = current;
|
|
9434
|
+
formController.validate();
|
|
9435
|
+
}, getUser, getData: getDataWithPath, doCollectionInference, propertyConfigs, collectionEditable, extraIcon: extraView?.icon && /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { color: "primary", onClick: () => setCurrentView("extra_view"), children: extraView.icon }) }),
|
|
9436
|
+
currentView !== "welcome" && /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogActions, { position: "absolute", children: [
|
|
9437
|
+
error && /* @__PURE__ */ jsxRuntime.jsx(core.ErrorView, { error }),
|
|
9438
|
+
isNewCollection && includeTemplates && currentView === "import_data_mapping" && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", type: "button", onClick: () => {
|
|
9439
|
+
importConfig.setInUse(false);
|
|
9440
|
+
return setCurrentView("welcome");
|
|
9441
|
+
}, children: [
|
|
9442
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.ArrowBackIcon, {}),
|
|
9443
|
+
"Back"
|
|
9444
|
+
] }),
|
|
9445
|
+
isNewCollection && includeTemplates && currentView === "import_data_preview" && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", type: "button", onClick: () => {
|
|
9446
|
+
setCurrentView("import_data_mapping");
|
|
9447
|
+
}, children: [
|
|
9448
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.ArrowBackIcon, {}),
|
|
9449
|
+
"Back"
|
|
9450
|
+
] }),
|
|
9451
|
+
isNewCollection && includeTemplates && currentView === "details" && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", type: "button", onClick: () => setCurrentView("welcome"), children: [
|
|
9452
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.ArrowBackIcon, {}),
|
|
9453
|
+
"Back"
|
|
9454
|
+
] }),
|
|
9455
|
+
isNewCollection && currentView === "properties" && /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "text", type: "button", onClick: () => setCurrentView("details"), children: [
|
|
9456
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.ArrowBackIcon, {}),
|
|
9457
|
+
"Back"
|
|
9458
|
+
] }),
|
|
9459
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", onClick: () => {
|
|
9460
|
+
handleCancel();
|
|
9461
|
+
}, children: "Cancel" }),
|
|
9462
|
+
isNewCollection && currentView === "import_data_mapping" && /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "filled", color: "primary", onClick: onImportMappingComplete, children: "Next" }),
|
|
9463
|
+
isNewCollection && currentView === "import_data_preview" && /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "filled", color: "primary", onClick: () => {
|
|
9464
|
+
setNextMode();
|
|
9465
|
+
}, children: "Next" }),
|
|
9466
|
+
isNewCollection && (currentView === "details" || currentView === "properties") && /* @__PURE__ */ jsxRuntime.jsxs(ui.LoadingButton, { variant: "filled", color: "primary", type: "submit", loading: isSubmitting, disabled: isSubmitting || currentView === "details" && !validValues, startIcon: currentView === "properties" ? /* @__PURE__ */ jsxRuntime.jsx(ui.CheckIcon, {}) : void 0, children: [
|
|
9467
|
+
currentView === "details" && "Next",
|
|
9468
|
+
currentView === "properties" && "Create collection"
|
|
9469
|
+
] }),
|
|
9470
|
+
!isNewCollection && /* @__PURE__ */ jsxRuntime.jsx(ui.LoadingButton, { variant: "filled", color: "primary", type: "submit", loading: isSubmitting, children: "Update collection" })
|
|
9471
|
+
] })
|
|
9289
9472
|
] })
|
|
9290
|
-
] })
|
|
9291
|
-
|
|
9473
|
+
] }) }),
|
|
9474
|
+
/* @__PURE__ */ jsxRuntime.jsx(core.ConfirmationDialog, { open: deleteRequested, onAccept: deleteCollection, onCancel: () => setDeleteRequested(false), title: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: "Delete the stored config?" }), body: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9475
|
+
" This will ",
|
|
9476
|
+
/* @__PURE__ */ jsxRuntime.jsx("b", { children: "not delete any data" }),
|
|
9477
|
+
", only the stored config, and reset to the code state."
|
|
9478
|
+
] }) })
|
|
9479
|
+
] });
|
|
9292
9480
|
}
|
|
9293
9481
|
function applyPropertyConfigs(collection, propertyConfigs) {
|
|
9294
9482
|
const {
|
|
@@ -9352,7 +9540,7 @@
|
|
|
9352
9540
|
const ConfigControllerContext = React.createContext({});
|
|
9353
9541
|
const CollectionEditorContext = React.createContext({});
|
|
9354
9542
|
const ConfigControllerProvider = React.memo(function ConfigControllerProvider2(t0) {
|
|
9355
|
-
const $ = reactCompilerRuntime.c(
|
|
9543
|
+
const $ = reactCompilerRuntime.c(67);
|
|
9356
9544
|
const {
|
|
9357
9545
|
children,
|
|
9358
9546
|
collectionConfigController,
|
|
@@ -9363,8 +9551,7 @@
|
|
|
9363
9551
|
getPathSuggestions,
|
|
9364
9552
|
getUser,
|
|
9365
9553
|
getData,
|
|
9366
|
-
onAnalyticsEvent
|
|
9367
|
-
components
|
|
9554
|
+
onAnalyticsEvent
|
|
9368
9555
|
} = t0;
|
|
9369
9556
|
const navigation = core.useNavigationController();
|
|
9370
9557
|
const navigate = reactRouter.useNavigate();
|
|
@@ -9482,28 +9669,26 @@
|
|
|
9482
9669
|
const createCollection = t3;
|
|
9483
9670
|
const t4 = configPermissions ?? defaultConfigPermissions;
|
|
9484
9671
|
let t5;
|
|
9485
|
-
if ($[6] !==
|
|
9672
|
+
if ($[6] !== createCollection || $[7] !== editCollection || $[8] !== editProperty || $[9] !== getPathSuggestions || $[10] !== t4) {
|
|
9486
9673
|
t5 = {
|
|
9487
9674
|
editCollection,
|
|
9488
9675
|
createCollection,
|
|
9489
9676
|
editProperty,
|
|
9490
9677
|
configPermissions: t4,
|
|
9491
|
-
getPathSuggestions
|
|
9492
|
-
components
|
|
9678
|
+
getPathSuggestions
|
|
9493
9679
|
};
|
|
9494
|
-
$[6] =
|
|
9495
|
-
$[7] =
|
|
9496
|
-
$[8] =
|
|
9497
|
-
$[9] =
|
|
9498
|
-
$[10] =
|
|
9499
|
-
$[11] =
|
|
9500
|
-
$[12] = t5;
|
|
9680
|
+
$[6] = createCollection;
|
|
9681
|
+
$[7] = editCollection;
|
|
9682
|
+
$[8] = editProperty;
|
|
9683
|
+
$[9] = getPathSuggestions;
|
|
9684
|
+
$[10] = t4;
|
|
9685
|
+
$[11] = t5;
|
|
9501
9686
|
} else {
|
|
9502
|
-
t5 = $[
|
|
9687
|
+
t5 = $[11];
|
|
9503
9688
|
}
|
|
9504
9689
|
const t6 = Boolean(currentDialog);
|
|
9505
9690
|
let t7;
|
|
9506
|
-
if ($[
|
|
9691
|
+
if ($[12] !== currentDialog || $[13] !== navigate || $[14] !== navigation) {
|
|
9507
9692
|
t7 = (collection_0) => {
|
|
9508
9693
|
if (currentDialog?.redirect) {
|
|
9509
9694
|
if (collection_0 && currentDialog?.isNewCollection && !currentDialog.parentCollectionIds.length) {
|
|
@@ -9513,29 +9698,29 @@
|
|
|
9513
9698
|
}
|
|
9514
9699
|
setCurrentDialog(void 0);
|
|
9515
9700
|
};
|
|
9516
|
-
$[
|
|
9517
|
-
$[
|
|
9518
|
-
$[
|
|
9519
|
-
$[
|
|
9701
|
+
$[12] = currentDialog;
|
|
9702
|
+
$[13] = navigate;
|
|
9703
|
+
$[14] = navigation;
|
|
9704
|
+
$[15] = t7;
|
|
9520
9705
|
} else {
|
|
9521
|
-
t7 = $[
|
|
9706
|
+
t7 = $[15];
|
|
9522
9707
|
}
|
|
9523
9708
|
let t8;
|
|
9524
|
-
if ($[
|
|
9709
|
+
if ($[16] !== collectionConfigController || $[17] !== collectionInference || $[18] !== currentDialog || $[19] !== extraView || $[20] !== getData || $[21] !== getPathSuggestions || $[22] !== getUser || $[23] !== reservedGroups || $[24] !== t6 || $[25] !== t7) {
|
|
9525
9710
|
t8 = /* @__PURE__ */ jsxRuntime.jsx(CollectionEditorDialog, { open: t6, configController: collectionConfigController, isNewCollection: false, collectionInference, ...currentDialog, getData, reservedGroups, extraView, pathSuggestions: getPathSuggestions, getUser, handleClose: t7 });
|
|
9526
|
-
$[
|
|
9527
|
-
$[
|
|
9528
|
-
$[
|
|
9529
|
-
$[
|
|
9530
|
-
$[
|
|
9531
|
-
$[
|
|
9532
|
-
$[
|
|
9533
|
-
$[
|
|
9534
|
-
$[
|
|
9535
|
-
$[
|
|
9536
|
-
$[
|
|
9711
|
+
$[16] = collectionConfigController;
|
|
9712
|
+
$[17] = collectionInference;
|
|
9713
|
+
$[18] = currentDialog;
|
|
9714
|
+
$[19] = extraView;
|
|
9715
|
+
$[20] = getData;
|
|
9716
|
+
$[21] = getPathSuggestions;
|
|
9717
|
+
$[22] = getUser;
|
|
9718
|
+
$[23] = reservedGroups;
|
|
9719
|
+
$[24] = t6;
|
|
9720
|
+
$[25] = t7;
|
|
9721
|
+
$[26] = t8;
|
|
9537
9722
|
} else {
|
|
9538
|
-
t8 = $[
|
|
9723
|
+
t8 = $[26];
|
|
9539
9724
|
}
|
|
9540
9725
|
const t9 = Boolean(currentPropertyDialog);
|
|
9541
9726
|
const t10 = Boolean(currentPropertyDialog?.propertyKey);
|
|
@@ -9543,21 +9728,21 @@
|
|
|
9543
9728
|
const t12 = !currentPropertyDialog ? false : !currentPropertyDialog?.propertyKey;
|
|
9544
9729
|
const t13 = currentPropertyDialog?.collectionEditable ?? false;
|
|
9545
9730
|
let t14;
|
|
9546
|
-
if ($[
|
|
9731
|
+
if ($[27] !== currentPropertyDialog || $[28] !== getData || $[29] !== navigation) {
|
|
9547
9732
|
t14 = getData && currentPropertyDialog?.editedCollectionId ? () => {
|
|
9548
9733
|
console.debug("get data for property", currentPropertyDialog?.editedCollectionId);
|
|
9549
|
-
const resolvedPath = navigation.
|
|
9734
|
+
const resolvedPath = navigation.resolveIdsFrom(currentPropertyDialog.editedCollectionId);
|
|
9550
9735
|
return getData(resolvedPath, []);
|
|
9551
9736
|
} : void 0;
|
|
9552
|
-
$[
|
|
9553
|
-
$[
|
|
9554
|
-
$[
|
|
9555
|
-
$[
|
|
9737
|
+
$[27] = currentPropertyDialog;
|
|
9738
|
+
$[28] = getData;
|
|
9739
|
+
$[29] = navigation;
|
|
9740
|
+
$[30] = t14;
|
|
9556
9741
|
} else {
|
|
9557
|
-
t14 = $[
|
|
9742
|
+
t14 = $[30];
|
|
9558
9743
|
}
|
|
9559
9744
|
let t15;
|
|
9560
|
-
if ($[
|
|
9745
|
+
if ($[31] !== collectionConfigController || $[32] !== currentPropertyDialog || $[33] !== snackbarController) {
|
|
9561
9746
|
t15 = (t162) => {
|
|
9562
9747
|
const {
|
|
9563
9748
|
id: id_0,
|
|
@@ -9586,15 +9771,15 @@
|
|
|
9586
9771
|
return false;
|
|
9587
9772
|
});
|
|
9588
9773
|
};
|
|
9589
|
-
$[
|
|
9590
|
-
$[
|
|
9591
|
-
$[
|
|
9592
|
-
$[
|
|
9774
|
+
$[31] = collectionConfigController;
|
|
9775
|
+
$[32] = currentPropertyDialog;
|
|
9776
|
+
$[33] = snackbarController;
|
|
9777
|
+
$[34] = t15;
|
|
9593
9778
|
} else {
|
|
9594
|
-
t15 = $[
|
|
9779
|
+
t15 = $[34];
|
|
9595
9780
|
}
|
|
9596
9781
|
let t16;
|
|
9597
|
-
if ($[
|
|
9782
|
+
if ($[35] !== collectionConfigController || $[36] !== currentPropertyDialog?.currentPropertiesOrder || $[37] !== currentPropertyDialog?.editedCollectionId || $[38] !== currentPropertyDialog?.namespace || $[39] !== currentPropertyDialog?.parentCollectionIds || $[40] !== currentPropertyDialog?.propertyKey || $[41] !== snackbarController) {
|
|
9598
9783
|
t16 = () => {
|
|
9599
9784
|
if (!currentPropertyDialog?.propertyKey) {
|
|
9600
9785
|
return;
|
|
@@ -9617,21 +9802,21 @@
|
|
|
9617
9802
|
return false;
|
|
9618
9803
|
});
|
|
9619
9804
|
};
|
|
9620
|
-
$[
|
|
9621
|
-
$[
|
|
9622
|
-
$[
|
|
9623
|
-
$[
|
|
9624
|
-
$[
|
|
9625
|
-
$[
|
|
9626
|
-
$[
|
|
9627
|
-
$[
|
|
9805
|
+
$[35] = collectionConfigController;
|
|
9806
|
+
$[36] = currentPropertyDialog?.currentPropertiesOrder;
|
|
9807
|
+
$[37] = currentPropertyDialog?.editedCollectionId;
|
|
9808
|
+
$[38] = currentPropertyDialog?.namespace;
|
|
9809
|
+
$[39] = currentPropertyDialog?.parentCollectionIds;
|
|
9810
|
+
$[40] = currentPropertyDialog?.propertyKey;
|
|
9811
|
+
$[41] = snackbarController;
|
|
9812
|
+
$[42] = t16;
|
|
9628
9813
|
} else {
|
|
9629
|
-
t16 = $[
|
|
9814
|
+
t16 = $[42];
|
|
9630
9815
|
}
|
|
9631
9816
|
let t17;
|
|
9632
9817
|
let t18;
|
|
9633
9818
|
let t19;
|
|
9634
|
-
if ($[
|
|
9819
|
+
if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9635
9820
|
t17 = () => {
|
|
9636
9821
|
setCurrentPropertyDialog(void 0);
|
|
9637
9822
|
};
|
|
@@ -9639,64 +9824,64 @@
|
|
|
9639
9824
|
setCurrentPropertyDialog(void 0);
|
|
9640
9825
|
};
|
|
9641
9826
|
t19 = {};
|
|
9642
|
-
$[
|
|
9643
|
-
$[
|
|
9644
|
-
$[
|
|
9827
|
+
$[43] = t17;
|
|
9828
|
+
$[44] = t18;
|
|
9829
|
+
$[45] = t19;
|
|
9645
9830
|
} else {
|
|
9646
|
-
t17 = $[
|
|
9647
|
-
t18 = $[
|
|
9648
|
-
t19 = $[
|
|
9831
|
+
t17 = $[43];
|
|
9832
|
+
t18 = $[44];
|
|
9833
|
+
t19 = $[45];
|
|
9649
9834
|
}
|
|
9650
9835
|
let t20;
|
|
9651
|
-
if ($[
|
|
9836
|
+
if ($[46] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9652
9837
|
t20 = [];
|
|
9653
|
-
$[
|
|
9838
|
+
$[46] = t20;
|
|
9654
9839
|
} else {
|
|
9655
|
-
t20 = $[
|
|
9840
|
+
t20 = $[46];
|
|
9656
9841
|
}
|
|
9657
9842
|
const t21 = currentPropertyDialog?.property;
|
|
9658
9843
|
const t22 = currentPropertyDialog?.propertyKey;
|
|
9659
9844
|
let t23;
|
|
9660
|
-
if ($[
|
|
9845
|
+
if ($[47] !== propertyConfigs || $[48] !== t10 || $[49] !== t11 || $[50] !== t12 || $[51] !== t13 || $[52] !== t14 || $[53] !== t15 || $[54] !== t16 || $[55] !== t21 || $[56] !== t22 || $[57] !== t9) {
|
|
9661
9846
|
t23 = /* @__PURE__ */ jsxRuntime.jsx(PropertyFormDialog, { open: t9, includeIdAndName: true, existingProperty: t10, autoUpdateId: t11, autoOpenTypeSelect: t12, inArray: false, collectionEditable: t13, getData: t14, onPropertyChanged: t15, onPropertyChangedImmediate: false, onDelete: t16, onError: _temp2, onOkClicked: t17, onCancel: t18, initialErrors: t19, forceShowErrors: false, existingPropertyKeys: t20, allowDataInference: true, propertyConfigs, property: t21, propertyKey: t22 });
|
|
9662
|
-
$[
|
|
9663
|
-
$[
|
|
9664
|
-
$[
|
|
9665
|
-
$[
|
|
9666
|
-
$[
|
|
9667
|
-
$[
|
|
9668
|
-
$[
|
|
9669
|
-
$[
|
|
9670
|
-
$[
|
|
9671
|
-
$[
|
|
9672
|
-
$[
|
|
9673
|
-
$[
|
|
9674
|
-
} else {
|
|
9675
|
-
t23 = $[
|
|
9847
|
+
$[47] = propertyConfigs;
|
|
9848
|
+
$[48] = t10;
|
|
9849
|
+
$[49] = t11;
|
|
9850
|
+
$[50] = t12;
|
|
9851
|
+
$[51] = t13;
|
|
9852
|
+
$[52] = t14;
|
|
9853
|
+
$[53] = t15;
|
|
9854
|
+
$[54] = t16;
|
|
9855
|
+
$[55] = t21;
|
|
9856
|
+
$[56] = t22;
|
|
9857
|
+
$[57] = t9;
|
|
9858
|
+
$[58] = t23;
|
|
9859
|
+
} else {
|
|
9860
|
+
t23 = $[58];
|
|
9676
9861
|
}
|
|
9677
9862
|
let t24;
|
|
9678
|
-
if ($[
|
|
9863
|
+
if ($[59] !== children || $[60] !== t23 || $[61] !== t5 || $[62] !== t8) {
|
|
9679
9864
|
t24 = /* @__PURE__ */ jsxRuntime.jsxs(CollectionEditorContext.Provider, { value: t5, children: [
|
|
9680
9865
|
children,
|
|
9681
9866
|
t8,
|
|
9682
9867
|
t23
|
|
9683
9868
|
] });
|
|
9684
|
-
$[
|
|
9685
|
-
$[
|
|
9686
|
-
$[
|
|
9687
|
-
$[
|
|
9688
|
-
$[
|
|
9869
|
+
$[59] = children;
|
|
9870
|
+
$[60] = t23;
|
|
9871
|
+
$[61] = t5;
|
|
9872
|
+
$[62] = t8;
|
|
9873
|
+
$[63] = t24;
|
|
9689
9874
|
} else {
|
|
9690
|
-
t24 = $[
|
|
9875
|
+
t24 = $[63];
|
|
9691
9876
|
}
|
|
9692
9877
|
let t25;
|
|
9693
|
-
if ($[
|
|
9878
|
+
if ($[64] !== collectionConfigController || $[65] !== t24) {
|
|
9694
9879
|
t25 = /* @__PURE__ */ jsxRuntime.jsx(ConfigControllerContext.Provider, { value: collectionConfigController, children: t24 });
|
|
9695
|
-
$[
|
|
9696
|
-
$[
|
|
9697
|
-
$[
|
|
9880
|
+
$[64] = collectionConfigController;
|
|
9881
|
+
$[65] = t24;
|
|
9882
|
+
$[66] = t25;
|
|
9698
9883
|
} else {
|
|
9699
|
-
t25 = $[
|
|
9884
|
+
t25 = $[66];
|
|
9700
9885
|
}
|
|
9701
9886
|
return t25;
|
|
9702
9887
|
}, equal);
|
|
@@ -10311,7 +10496,7 @@
|
|
|
10311
10496
|
return t8;
|
|
10312
10497
|
}
|
|
10313
10498
|
function useCollectionEditorPlugin(t0) {
|
|
10314
|
-
const $ = reactCompilerRuntime.c(
|
|
10499
|
+
const $ = reactCompilerRuntime.c(15);
|
|
10315
10500
|
const {
|
|
10316
10501
|
collectionConfigController,
|
|
10317
10502
|
configPermissions,
|
|
@@ -10321,11 +10506,10 @@
|
|
|
10321
10506
|
getUser,
|
|
10322
10507
|
collectionInference,
|
|
10323
10508
|
getData,
|
|
10324
|
-
onAnalyticsEvent
|
|
10325
|
-
components
|
|
10509
|
+
onAnalyticsEvent
|
|
10326
10510
|
} = t0;
|
|
10327
10511
|
let t1;
|
|
10328
|
-
if ($[0] !== collectionConfigController || $[1] !== collectionInference || $[2] !==
|
|
10512
|
+
if ($[0] !== collectionConfigController || $[1] !== collectionInference || $[2] !== configPermissions || $[3] !== extraView || $[4] !== getData || $[5] !== getPathSuggestions || $[6] !== getUser || $[7] !== onAnalyticsEvent || $[8] !== reservedGroups) {
|
|
10329
10513
|
t1 = {
|
|
10330
10514
|
Component: ConfigControllerProvider,
|
|
10331
10515
|
props: {
|
|
@@ -10337,27 +10521,25 @@
|
|
|
10337
10521
|
getPathSuggestions,
|
|
10338
10522
|
getUser,
|
|
10339
10523
|
getData,
|
|
10340
|
-
onAnalyticsEvent
|
|
10341
|
-
components
|
|
10524
|
+
onAnalyticsEvent
|
|
10342
10525
|
}
|
|
10343
10526
|
};
|
|
10344
10527
|
$[0] = collectionConfigController;
|
|
10345
10528
|
$[1] = collectionInference;
|
|
10346
|
-
$[2] =
|
|
10347
|
-
$[3] =
|
|
10348
|
-
$[4] =
|
|
10349
|
-
$[5] =
|
|
10350
|
-
$[6] =
|
|
10351
|
-
$[7] =
|
|
10352
|
-
$[8] =
|
|
10353
|
-
$[9] =
|
|
10354
|
-
$[10] = t1;
|
|
10529
|
+
$[2] = configPermissions;
|
|
10530
|
+
$[3] = extraView;
|
|
10531
|
+
$[4] = getData;
|
|
10532
|
+
$[5] = getPathSuggestions;
|
|
10533
|
+
$[6] = getUser;
|
|
10534
|
+
$[7] = onAnalyticsEvent;
|
|
10535
|
+
$[8] = reservedGroups;
|
|
10536
|
+
$[9] = t1;
|
|
10355
10537
|
} else {
|
|
10356
|
-
t1 = $[
|
|
10538
|
+
t1 = $[9];
|
|
10357
10539
|
}
|
|
10358
10540
|
let t2;
|
|
10359
10541
|
let t3;
|
|
10360
|
-
if ($[
|
|
10542
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10361
10543
|
t2 = {
|
|
10362
10544
|
additionalActions: /* @__PURE__ */ jsxRuntime.jsx(NewCollectionButton, {}),
|
|
10363
10545
|
additionalChildrenStart: /* @__PURE__ */ jsxRuntime.jsx(IntroWidget, {}),
|
|
@@ -10370,14 +10552,14 @@
|
|
|
10370
10552
|
HeaderAction: CollectionViewHeaderAction,
|
|
10371
10553
|
AddColumnComponent: PropertyAddColumnComponent
|
|
10372
10554
|
};
|
|
10373
|
-
$[
|
|
10374
|
-
$[
|
|
10555
|
+
$[10] = t2;
|
|
10556
|
+
$[11] = t3;
|
|
10375
10557
|
} else {
|
|
10376
|
-
t2 = $[
|
|
10377
|
-
t3 = $[
|
|
10558
|
+
t2 = $[10];
|
|
10559
|
+
t3 = $[11];
|
|
10378
10560
|
}
|
|
10379
10561
|
let t4;
|
|
10380
|
-
if ($[
|
|
10562
|
+
if ($[12] !== collectionConfigController.loading || $[13] !== t1) {
|
|
10381
10563
|
t4 = {
|
|
10382
10564
|
key: "collection_editor",
|
|
10383
10565
|
loading: collectionConfigController.loading,
|
|
@@ -10385,11 +10567,11 @@
|
|
|
10385
10567
|
homePage: t2,
|
|
10386
10568
|
collectionView: t3
|
|
10387
10569
|
};
|
|
10388
|
-
$[
|
|
10389
|
-
$[
|
|
10390
|
-
$[
|
|
10570
|
+
$[12] = collectionConfigController.loading;
|
|
10571
|
+
$[13] = t1;
|
|
10572
|
+
$[14] = t4;
|
|
10391
10573
|
} else {
|
|
10392
|
-
t4 = $[
|
|
10574
|
+
t4 = $[14];
|
|
10393
10575
|
}
|
|
10394
10576
|
return t4;
|
|
10395
10577
|
}
|
|
@@ -10465,17 +10647,19 @@
|
|
|
10465
10647
|
}
|
|
10466
10648
|
return t6;
|
|
10467
10649
|
}
|
|
10468
|
-
const mergeCollections = (baseCollections, backendCollections, modifyCollection) => {
|
|
10650
|
+
const mergeCollections = (baseCollections, backendCollections = [], modifyCollection) => {
|
|
10469
10651
|
const markAsEditable = (c) => {
|
|
10470
10652
|
core.makePropertiesEditable(c.properties);
|
|
10471
10653
|
c.subcollections?.forEach(markAsEditable);
|
|
10472
10654
|
};
|
|
10473
|
-
|
|
10474
|
-
|
|
10475
|
-
|
|
10476
|
-
console.debug("Collections
|
|
10477
|
-
|
|
10478
|
-
|
|
10655
|
+
backendCollections.forEach(markAsEditable);
|
|
10656
|
+
const result = core.joinCollectionLists(baseCollections, backendCollections, [], modifyCollection);
|
|
10657
|
+
result.sort((a, b) => baseCollections.findIndex((c) => c.id === a.id) - baseCollections.findIndex((c) => c.id === b.id));
|
|
10658
|
+
console.debug("Collections result", {
|
|
10659
|
+
baseCollections,
|
|
10660
|
+
backendCollections,
|
|
10661
|
+
result
|
|
10662
|
+
});
|
|
10479
10663
|
return result;
|
|
10480
10664
|
};
|
|
10481
10665
|
function MissingReferenceWidget(t0) {
|