@firecms/collection_editor 3.0.0-beta.4.pre.1 → 3.0.0-beta.5
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 +61 -51
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/ui/collection_editor/CollectionEditorDialog.d.ts +1 -1
- package/package.json +12 -12
- package/src/ui/NewCollectionButton.tsx +12 -10
- package/src/ui/collection_editor/CollectionEditorDialog.tsx +5 -5
- package/src/ui/collection_editor/CollectionPropertiesEditorForm.tsx +6 -5
- package/src/ui/collection_editor/GetCodeDialog.tsx +15 -3
- package/src/useCollectionEditorPlugin.tsx +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as e, jsxs as a, Fragment as j } from "react/jsx-runtime";
|
|
2
|
-
import { FieldCaption as X, SearchIconsView as gr, toSnakeCase as Pt, singular as vr, IconForView as ot, ArrayContainer as yr, serializeRegExp as br, useSnackbarController as Ie, resolveEnumValues as Cr, isPropertyBuilder as ne, useCustomizationController as Ae, getFieldConfig as $e, ErrorBoundary as
|
|
2
|
+
import { FieldCaption as X, SearchIconsView as gr, toSnakeCase as Pt, singular as vr, IconForView as ot, ArrayContainer as yr, serializeRegExp as br, useSnackbarController as Ie, resolveEnumValues as Cr, isPropertyBuilder as ne, useCustomizationController as Ae, getFieldConfig as $e, ErrorBoundary as me, PropertyConfigBadge as Ye, unslugify as ut, useNavigationController as Pe, mergeDeep as W, DEFAULT_FIELD_CONFIGS as Gt, isValidRegExp as Pr, getFieldId as Kt, DeleteConfirmationDialog as lt, useLargeLayout as Nr, makePropertiesEditable as pt, resolveEntityView as xr, useSelectionController as wr, EntityCollectionTable as Tr, slugify as kr, useAuthController as _e, randomString as _t, CircularProgressCenter as Nt, removeUndefined as Ft, ErrorView as Wt, removeInitialAndTrailingSlashes as Or, getDefaultPropertiesOrder as Vr } from "@firecms/core";
|
|
3
3
|
import * as je from "react";
|
|
4
4
|
import Y, { useState as $, useEffect as de, useMemo as Zt, useCallback as Q, useRef as Le, useDeferredValue as Ir, useContext as Jt } from "react";
|
|
5
5
|
import ve from "react-fast-compare";
|
|
6
|
-
import { useAutoComplete as _r, Container as mt, Typography as O, Tooltip as te, IconButton as oe, Chip as st, TextField as Oe, cn as
|
|
6
|
+
import { useAutoComplete as _r, Container as mt, Typography as O, Tooltip as te, IconButton as oe, Chip as st, TextField as Oe, cn as fe, DebouncedTextField as Z, Autocomplete as Fr, AutocompleteItem as Sr, ExpandablePanel as xt, SettingsIcon as He, Select as be, SelectItem as ee, BooleanSwitchWithLabel as ct, Dialog as Fe, AutoAwesomeIcon as ht, Badge as Er, ListIcon as Ar, Button as z, CircularProgress as De, Paper as Ce, DialogContent as Be, DialogActions as ze, RuleIcon as Dr, FileUploadIcon as Br, MultiSelect as zr, MultiSelectItem as St, Checkbox as Et, cardMixin as Qt, cardClickableMixin as Xt, cardSelectedMixin as er, FunctionsIcon as Mr, RemoveCircleIcon as Rr, defaultBorderMixin as wt, RemoveIcon as Ur, DragHandleIcon as jr, AddIcon as se, SelectGroup as At, InfoLabel as Lr, DeleteIcon as dt, ContentCopyIcon as qr, CodeIcon as $r, Table as Dt, TableBody as Bt, TableRow as bt, TableCell as Ue, Alert as Yr, Icon as et, Card as tr, coolIconKeys as zt, Tabs as Hr, Tab as Ct, ArrowBackIcon as tt, LoadingButton as Mt, DoneIcon as Gr, UndoIcon as Kr, SaveIcon as Wr, Menu as Zr, MoreVertIcon as Jr, MenuItem as Qr, Collapse as Xr } from "@firecms/ui";
|
|
7
7
|
import * as rt from "yup";
|
|
8
8
|
import { useFormex as K, Field as H, getIn as I, useCreateFormex as Tt, Formex as kt } from "@firecms/formex";
|
|
9
9
|
import { extractEnumFromValues as ei, buildPropertyFromData as ti, buildEntityPropertiesFromData as ri } from "@firecms/schema_inference";
|
|
@@ -88,7 +88,7 @@ function yi({
|
|
|
88
88
|
),
|
|
89
89
|
/* @__PURE__ */ e(X, { error: m.name && !!s.name, children: m.name && s.name ? s.name : "Name of in this collection, usually a plural name (e.g. Products)" })
|
|
90
90
|
] }),
|
|
91
|
-
/* @__PURE__ */ a("div", { className:
|
|
91
|
+
/* @__PURE__ */ a("div", { className: fe("col-span-12 ", R ? "" : "sm:col-span-8"), children: [
|
|
92
92
|
/* @__PURE__ */ e(
|
|
93
93
|
H,
|
|
94
94
|
{
|
|
@@ -285,7 +285,7 @@ function yi({
|
|
|
285
285
|
)
|
|
286
286
|
] }) });
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function he(t) {
|
|
289
289
|
return "properties." + t.replaceAll(".", ".properties.");
|
|
290
290
|
}
|
|
291
291
|
function bi(t) {
|
|
@@ -299,7 +299,7 @@ function ae(t, r) {
|
|
|
299
299
|
}
|
|
300
300
|
function ir(t, r) {
|
|
301
301
|
const n = r ? `${r}.${t}` : t;
|
|
302
|
-
return
|
|
302
|
+
return he(n);
|
|
303
303
|
}
|
|
304
304
|
function Ci({
|
|
305
305
|
enumValues: t,
|
|
@@ -1044,7 +1044,7 @@ function nr({
|
|
|
1044
1044
|
const { propertyConfigs: d } = Ae(), u = $e(t, d);
|
|
1045
1045
|
qe(t);
|
|
1046
1046
|
const p = n ? "border-red-500 dark:border-red-500 border-opacity-100 dark:border-opacity-100 ring-0 dark:ring-0" : o ? "border-primary" : "border-transparent";
|
|
1047
|
-
return n && console.log("PropertyFieldPreview", t), /* @__PURE__ */ e(
|
|
1047
|
+
return n && console.log("PropertyFieldPreview", t), /* @__PURE__ */ e(me, { children: /* @__PURE__ */ a(
|
|
1048
1048
|
"div",
|
|
1049
1049
|
{
|
|
1050
1050
|
onClick: r,
|
|
@@ -1054,7 +1054,7 @@ function nr({
|
|
|
1054
1054
|
/* @__PURE__ */ a(
|
|
1055
1055
|
Ce,
|
|
1056
1056
|
{
|
|
1057
|
-
className:
|
|
1057
|
+
className: fe(
|
|
1058
1058
|
"border",
|
|
1059
1059
|
"pl-2 w-full flex flex-row gap-4 items-center",
|
|
1060
1060
|
Qt,
|
|
@@ -1065,7 +1065,7 @@ function nr({
|
|
|
1065
1065
|
),
|
|
1066
1066
|
children: [
|
|
1067
1067
|
/* @__PURE__ */ a("div", { className: "w-full flex flex-col", children: [
|
|
1068
|
-
i && /* @__PURE__ */ e(
|
|
1068
|
+
i && /* @__PURE__ */ e(me, { children: /* @__PURE__ */ e(
|
|
1069
1069
|
O,
|
|
1070
1070
|
{
|
|
1071
1071
|
variant: "body1",
|
|
@@ -1075,7 +1075,7 @@ function nr({
|
|
|
1075
1075
|
}
|
|
1076
1076
|
) }),
|
|
1077
1077
|
/* @__PURE__ */ a("div", { className: "flex flex-row items-center", children: [
|
|
1078
|
-
/* @__PURE__ */ e(
|
|
1078
|
+
/* @__PURE__ */ e(me, { children: /* @__PURE__ */ e(
|
|
1079
1079
|
O,
|
|
1080
1080
|
{
|
|
1081
1081
|
className: "flex-grow pr-2",
|
|
@@ -1085,7 +1085,7 @@ function nr({
|
|
|
1085
1085
|
children: u?.name
|
|
1086
1086
|
}
|
|
1087
1087
|
) }),
|
|
1088
|
-
/* @__PURE__ */ e(
|
|
1088
|
+
/* @__PURE__ */ e(me, { children: /* @__PURE__ */ e(
|
|
1089
1089
|
O,
|
|
1090
1090
|
{
|
|
1091
1091
|
variant: "body2",
|
|
@@ -1131,7 +1131,7 @@ function Ti({
|
|
|
1131
1131
|
/* @__PURE__ */ e(
|
|
1132
1132
|
Ce,
|
|
1133
1133
|
{
|
|
1134
|
-
className:
|
|
1134
|
+
className: fe(
|
|
1135
1135
|
"pl-2 w-full flex flex-row gap-4 items-center",
|
|
1136
1136
|
Qt,
|
|
1137
1137
|
n ? Xt : "",
|
|
@@ -1160,7 +1160,7 @@ function Ti({
|
|
|
1160
1160
|
children: o?.name
|
|
1161
1161
|
}
|
|
1162
1162
|
),
|
|
1163
|
-
i && !ne(i) && /* @__PURE__ */ e(
|
|
1163
|
+
i && !ne(i) && /* @__PURE__ */ e(me, { children: /* @__PURE__ */ e(
|
|
1164
1164
|
O,
|
|
1165
1165
|
{
|
|
1166
1166
|
variant: "body2",
|
|
@@ -1169,7 +1169,7 @@ function Ti({
|
|
|
1169
1169
|
children: i.dataType
|
|
1170
1170
|
}
|
|
1171
1171
|
) }),
|
|
1172
|
-
i && ne(i) && /* @__PURE__ */ e(
|
|
1172
|
+
i && ne(i) && /* @__PURE__ */ e(me, { children: /* @__PURE__ */ e(
|
|
1173
1173
|
O,
|
|
1174
1174
|
{
|
|
1175
1175
|
variant: "body2",
|
|
@@ -1178,7 +1178,7 @@ function Ti({
|
|
|
1178
1178
|
children: "This property is defined as a property builder in code"
|
|
1179
1179
|
}
|
|
1180
1180
|
) }),
|
|
1181
|
-
!i && /* @__PURE__ */ e(
|
|
1181
|
+
!i && /* @__PURE__ */ e(me, { children: /* @__PURE__ */ e(
|
|
1182
1182
|
O,
|
|
1183
1183
|
{
|
|
1184
1184
|
variant: "body2",
|
|
@@ -1230,7 +1230,7 @@ const ft = Y.memo(
|
|
|
1230
1230
|
{
|
|
1231
1231
|
draggableId: `array_field_${r}_${k}}`,
|
|
1232
1232
|
index: b,
|
|
1233
|
-
children: (g, w) => /* @__PURE__ */ e(
|
|
1233
|
+
children: (g, w) => /* @__PURE__ */ e(me, { children: /* @__PURE__ */ e(
|
|
1234
1234
|
ki,
|
|
1235
1235
|
{
|
|
1236
1236
|
propertyKey: k,
|
|
@@ -1379,7 +1379,7 @@ function Oi({ disabled: t, getData: r, allowDataInference: n, propertyConfigs: i
|
|
|
1379
1379
|
const w = N ? ae(N, g) : void 0;
|
|
1380
1380
|
if (!w)
|
|
1381
1381
|
throw Error("collection editor miss config");
|
|
1382
|
-
const _ =
|
|
1382
|
+
const _ = he(w), M = ye(g), R = I(o, M) ?? Object.keys(I(o, bi(g)));
|
|
1383
1383
|
d(_, void 0, !1), d(M, R.filter((D) => D !== N), !1), p(!1), m(void 0), f(void 0);
|
|
1384
1384
|
}, [d, o]), P = h ? ae(h, s) : void 0, k = P ? I(o.properties, P.replaceAll(".", ".properties.")) : void 0, b = !v || v.length < 1, C = Q((N, g) => {
|
|
1385
1385
|
d(ye(g), N, !1);
|
|
@@ -1734,7 +1734,7 @@ function Si({ disabled: t, getData: r, allowDataInference: n, propertyConfigs: i
|
|
|
1734
1734
|
const g = C ? ae(C, N) : void 0;
|
|
1735
1735
|
if (!g)
|
|
1736
1736
|
throw Error("collection editor miss config");
|
|
1737
|
-
d(`oneOf.${
|
|
1737
|
+
d(`oneOf.${he(g)}`, void 0, !1);
|
|
1738
1738
|
const w = `oneOf.${ye(N)}`, _ = I(o, w);
|
|
1739
1739
|
d(w, _.filter((M) => M !== C), !1), p(!1), m(void 0), f(void 0);
|
|
1740
1740
|
}, [d, o]), k = /* @__PURE__ */ a(
|
|
@@ -2368,7 +2368,7 @@ function or({ value: t, optionDisabled: r, propertyConfig: n, existing: i }) {
|
|
|
2368
2368
|
children: /* @__PURE__ */ a(
|
|
2369
2369
|
"div",
|
|
2370
2370
|
{
|
|
2371
|
-
className:
|
|
2371
|
+
className: fe(
|
|
2372
2372
|
"flex flex-row items-center text-base min-h-[52px]",
|
|
2373
2373
|
r ? "w-full" : ""
|
|
2374
2374
|
),
|
|
@@ -2809,7 +2809,7 @@ function ji({
|
|
|
2809
2809
|
onClick: (re) => {
|
|
2810
2810
|
we && (re.stopPropagation(), re.preventDefault());
|
|
2811
2811
|
},
|
|
2812
|
-
className:
|
|
2812
|
+
className: fe(
|
|
2813
2813
|
"flex items-center",
|
|
2814
2814
|
we ? "w-full pointer-events-none opacity-50" : ""
|
|
2815
2815
|
),
|
|
@@ -2912,10 +2912,14 @@ function $i(t) {
|
|
|
2912
2912
|
function Yi(t) {
|
|
2913
2913
|
return t ? (t.slice(0, 1).toLowerCase() + t.slice(1)).replace(/([-_ ]){1,}/g, " ").split(/[-_ ]/).reduce((r, n) => r + n[0].toUpperCase() + n.substring(1), "") : "";
|
|
2914
2914
|
}
|
|
2915
|
-
function Hi({
|
|
2916
|
-
|
|
2915
|
+
function Hi({
|
|
2916
|
+
collection: t,
|
|
2917
|
+
onOpenChange: r,
|
|
2918
|
+
open: n
|
|
2919
|
+
}) {
|
|
2920
|
+
const i = Ie(), l = t ? `import { EntityCollection } from "firecms";
|
|
2917
2921
|
|
|
2918
|
-
const ` + (t
|
|
2922
|
+
const ` + (t?.name ? Yi(t.name) : "my") + "Collection:EntityCollection = " + oi.stringify(cr(t), null, " ") : "No collection selected";
|
|
2919
2923
|
return /* @__PURE__ */ a(
|
|
2920
2924
|
Fe,
|
|
2921
2925
|
{
|
|
@@ -2946,7 +2950,13 @@ const ` + (t.name ? Yi(t.name) : "my") + "Collection:EntityCollection = " + oi.s
|
|
|
2946
2950
|
theme: si.vsDark,
|
|
2947
2951
|
code: l,
|
|
2948
2952
|
language: "typescript",
|
|
2949
|
-
children: ({
|
|
2953
|
+
children: ({
|
|
2954
|
+
className: o,
|
|
2955
|
+
style: d,
|
|
2956
|
+
tokens: u,
|
|
2957
|
+
getLineProps: p,
|
|
2958
|
+
getTokenProps: h
|
|
2959
|
+
}) => /* @__PURE__ */ e("pre", { style: d, className: "p-4 rounded text-sm", children: u.map((m, s) => /* @__PURE__ */ e("div", { ...p({ line: m }), children: m.map((f, v) => /* @__PURE__ */ e("span", { ...h({ token: f }) }, v)) }, s)) })
|
|
2950
2960
|
}
|
|
2951
2961
|
)
|
|
2952
2962
|
] }),
|
|
@@ -3050,21 +3060,21 @@ function Gi({
|
|
|
3050
3060
|
...U,
|
|
3051
3061
|
...f.propertiesOrder ?? []
|
|
3052
3062
|
];
|
|
3053
|
-
v("properties", T, !1),
|
|
3063
|
+
v("properties", T, !1), ge(S), Me(U);
|
|
3054
3064
|
}).finally(() => {
|
|
3055
3065
|
q(!1);
|
|
3056
3066
|
}));
|
|
3057
|
-
} : void 0, re = Q((F) => F ? we.current[F] ?? I(f, ye(F)) : we.current[""], [f]),
|
|
3067
|
+
} : void 0, re = Q((F) => F ? we.current[F] ?? I(f, ye(F)) : we.current[""], [f]), ge = Q((F, U) => {
|
|
3058
3068
|
const T = ye(U);
|
|
3059
3069
|
v(T, F, !1), we.current[U ?? ""] = F;
|
|
3060
3070
|
}, [v]), Te = Q((F, U) => {
|
|
3061
3071
|
const T = F ? ae(F, U) : void 0;
|
|
3062
3072
|
if (!T)
|
|
3063
3073
|
throw Error("collection editor miss config");
|
|
3064
|
-
v(
|
|
3074
|
+
v(he(T), void 0, !1);
|
|
3065
3075
|
const E = re(U).filter((ie) => ie !== F);
|
|
3066
|
-
|
|
3067
|
-
}, [re, v,
|
|
3076
|
+
ge(E, U), J(!1), w(void 0), M(void 0), D(void 0);
|
|
3077
|
+
}, [re, v, ge]), Ge = (F, U) => {
|
|
3068
3078
|
v(ye(U), F, !1);
|
|
3069
3079
|
}, gt = ({
|
|
3070
3080
|
id: F,
|
|
@@ -3077,14 +3087,14 @@ function Gi({
|
|
|
3077
3087
|
[F]: U
|
|
3078
3088
|
}, !1);
|
|
3079
3089
|
const T = [...f.propertiesOrder ?? Object.keys(f.properties), F];
|
|
3080
|
-
|
|
3090
|
+
ge(T), J(!1), C && (w(T.indexOf(F)), M(F)), D(void 0);
|
|
3081
3091
|
}, pe = ({
|
|
3082
3092
|
id: F,
|
|
3083
3093
|
property: U,
|
|
3084
3094
|
previousId: T,
|
|
3085
3095
|
namespace: S
|
|
3086
3096
|
}) => {
|
|
3087
|
-
const E = F ? ae(F, S) : void 0, ie = E ?
|
|
3097
|
+
const E = F ? ae(F, S) : void 0, ie = E ? he(E) : void 0;
|
|
3088
3098
|
if (T && T !== F) {
|
|
3089
3099
|
console.debug("onPropertyChanged, id change", {
|
|
3090
3100
|
id: F,
|
|
@@ -3092,8 +3102,8 @@ function Gi({
|
|
|
3092
3102
|
previousId: T,
|
|
3093
3103
|
namespace: S
|
|
3094
3104
|
});
|
|
3095
|
-
const ke = ae(T, S), Vt =
|
|
3096
|
-
|
|
3105
|
+
const ke = ae(T, S), Vt = he(ke), It = re(S).map((Xe) => Xe === T ? F : Xe).filter((Xe) => Xe !== void 0);
|
|
3106
|
+
ge(It, S), F && (w(It.indexOf(F)), M(F)), v(Vt, void 0, !1), y(Vt, !1, !1);
|
|
3097
3107
|
}
|
|
3098
3108
|
console.debug("onPropertyChanged", {
|
|
3099
3109
|
id: F,
|
|
@@ -3111,7 +3121,7 @@ function Gi({
|
|
|
3111
3121
|
propertyPath: S
|
|
3112
3122
|
}), S) {
|
|
3113
3123
|
const E = T && Object.keys(T).length > 0;
|
|
3114
|
-
i(F, U, E ? T : void 0), x(
|
|
3124
|
+
i(F, U, E ? T : void 0), x(he(S), E ? "Property error" : void 0);
|
|
3115
3125
|
}
|
|
3116
3126
|
}, []), We = () => {
|
|
3117
3127
|
w(void 0), M(void 0);
|
|
@@ -3121,7 +3131,7 @@ function Gi({
|
|
|
3121
3131
|
namespace: U
|
|
3122
3132
|
}), w(Re.indexOf(F)), M(F), D(U);
|
|
3123
3133
|
}, [Re]), yt = /* @__PURE__ */ a("div", { className: "grid grid-cols-12 gap-2 h-full bg-gray-50 dark:bg-gray-900", children: [
|
|
3124
|
-
/* @__PURE__ */ a("div", { className:
|
|
3134
|
+
/* @__PURE__ */ a("div", { className: fe(
|
|
3125
3135
|
"p-4 md:p-8 pb-20 md:pb-20",
|
|
3126
3136
|
"col-span-12 lg:col-span-5 h-full overflow-auto",
|
|
3127
3137
|
!N && "border-r " + wt
|
|
@@ -3185,7 +3195,7 @@ function Gi({
|
|
|
3185
3195
|
) })
|
|
3186
3196
|
] })
|
|
3187
3197
|
] }),
|
|
3188
|
-
/* @__PURE__ */ e(
|
|
3198
|
+
/* @__PURE__ */ e(me, { children: /* @__PURE__ */ e(
|
|
3189
3199
|
ft,
|
|
3190
3200
|
{
|
|
3191
3201
|
className: "pl-8",
|
|
@@ -3304,14 +3314,14 @@ function Gi({
|
|
|
3304
3314
|
existingPropertyKeys: f.propertiesOrder
|
|
3305
3315
|
}
|
|
3306
3316
|
),
|
|
3307
|
-
/* @__PURE__ */ e(
|
|
3317
|
+
/* @__PURE__ */ e(me, { children: /* @__PURE__ */ e(
|
|
3308
3318
|
Hi,
|
|
3309
3319
|
{
|
|
3310
3320
|
collection: f,
|
|
3311
3321
|
open: V,
|
|
3312
3322
|
onOpenChange: G
|
|
3313
3323
|
}
|
|
3314
|
-
)
|
|
3324
|
+
) })
|
|
3315
3325
|
] });
|
|
3316
3326
|
}
|
|
3317
3327
|
function Ki({
|
|
@@ -4142,7 +4152,7 @@ function nt({
|
|
|
4142
4152
|
tr,
|
|
4143
4153
|
{
|
|
4144
4154
|
onClick: i,
|
|
4145
|
-
className:
|
|
4155
|
+
className: fe(
|
|
4146
4156
|
"my-2 rounded-md border mx-0 p-6 px-4 focus:outline-none transition ease-in-out duration-150 flex flex-row gap-4 items-center",
|
|
4147
4157
|
"text-gray-700 dark:text-slate-300",
|
|
4148
4158
|
"hover:border-primary-dark hover:text-primary-dark dark:hover:text-primary focus:ring-primary hover:ring-1 hover:ring-primary",
|
|
@@ -4170,12 +4180,12 @@ function Qi({
|
|
|
4170
4180
|
previousId: y,
|
|
4171
4181
|
namespace: P
|
|
4172
4182
|
}) => {
|
|
4173
|
-
const k = v ? ae(v, P) : void 0, b = k ?
|
|
4183
|
+
const k = v ? ae(v, P) : void 0, b = k ? he(k) : void 0, C = (g) => g ? p.current[g] ?? I(o, ye(g)) : p.current[""], N = (g, w) => {
|
|
4174
4184
|
const _ = ye(w);
|
|
4175
4185
|
i(_, g, !1), p.current[w ?? ""] = g;
|
|
4176
4186
|
};
|
|
4177
4187
|
if (y && y !== v) {
|
|
4178
|
-
const g = ae(y, P), w =
|
|
4188
|
+
const g = ae(y, P), w = he(g), M = C(P).map((D) => D === y ? v : D).filter((D) => D !== void 0);
|
|
4179
4189
|
N(M, P);
|
|
4180
4190
|
const R = { ...t.headersMapping };
|
|
4181
4191
|
Object.keys(R).forEach((D) => {
|
|
@@ -4189,7 +4199,7 @@ function Qi({
|
|
|
4189
4199
|
property: y,
|
|
4190
4200
|
namespace: P
|
|
4191
4201
|
}) => {
|
|
4192
|
-
const k = v ? ae(v, P) : void 0, b = k ?
|
|
4202
|
+
const k = v ? ae(v, P) : void 0, b = k ? he(k) : void 0, C = t.importData.map((g) => I(g, x)), N = {
|
|
4193
4203
|
...ti(C, y, rr),
|
|
4194
4204
|
editable: !0
|
|
4195
4205
|
};
|
|
@@ -4569,7 +4579,7 @@ function rn({
|
|
|
4569
4579
|
}
|
|
4570
4580
|
}), {
|
|
4571
4581
|
values: re,
|
|
4572
|
-
setFieldValue:
|
|
4582
|
+
setFieldValue: ge,
|
|
4573
4583
|
isSubmitting: Te,
|
|
4574
4584
|
dirty: Ge,
|
|
4575
4585
|
submitCount: gt
|
|
@@ -4580,19 +4590,19 @@ function rn({
|
|
|
4580
4590
|
function Qe(T) {
|
|
4581
4591
|
_.setInUse(!0), ri(T, rr).then((S) => {
|
|
4582
4592
|
const E = dr(S);
|
|
4583
|
-
|
|
4593
|
+
ge("properties", E.properties), ge("propertiesOrder", Object.keys(E.properties)), _.setIdColumn(E.idColumn), _.setImportData(T), _.setHeadersMapping(E.headersMapping), _.setOriginProperties(E.properties);
|
|
4584
4594
|
});
|
|
4585
4595
|
}
|
|
4586
4596
|
const vt = !!re.name && !!re.id, yt = () => {
|
|
4587
4597
|
const T = { ...re.properties };
|
|
4588
|
-
_.idColumn && delete T[_.idColumn],
|
|
4598
|
+
_.idColumn && delete T[_.idColumn], ge("properties", T), L();
|
|
4589
4599
|
}, U = b?.editable === void 0 || b?.editable === !0 || t;
|
|
4590
4600
|
return /* @__PURE__ */ e(Be, { fullHeight: !0, children: /* @__PURE__ */ e(kt, { value: ue, children: /* @__PURE__ */ a(j, { children: [
|
|
4591
4601
|
!t && /* @__PURE__ */ a(
|
|
4592
4602
|
Hr,
|
|
4593
4603
|
{
|
|
4594
4604
|
value: c,
|
|
4595
|
-
className:
|
|
4605
|
+
className: fe(wt, "justify-end bg-gray-50 dark:bg-gray-950 border-b"),
|
|
4596
4606
|
onValueChange: (T) => V(T),
|
|
4597
4607
|
children: [
|
|
4598
4608
|
/* @__PURE__ */ e(Ct, { value: "details", children: "Details" }),
|
|
@@ -4606,7 +4616,7 @@ function rn({
|
|
|
4606
4616
|
{
|
|
4607
4617
|
noValidate: !0,
|
|
4608
4618
|
onSubmit: ue.handleSubmit,
|
|
4609
|
-
className:
|
|
4619
|
+
className: fe(
|
|
4610
4620
|
t ? "h-full" : "h-[calc(100%-48px)]",
|
|
4611
4621
|
"flex-grow flex flex-col relative"
|
|
4612
4622
|
),
|
|
@@ -5187,7 +5197,7 @@ function cn({
|
|
|
5187
5197
|
return /* @__PURE__ */ e(
|
|
5188
5198
|
tr,
|
|
5189
5199
|
{
|
|
5190
|
-
className:
|
|
5200
|
+
className: fe("h-full p-4 min-h-[124px]"),
|
|
5191
5201
|
onClick: i && l ? () => i.createCollection({
|
|
5192
5202
|
initialValues: t ? { group: t } : void 0,
|
|
5193
5203
|
parentCollectionIds: [],
|
|
@@ -5324,7 +5334,7 @@ function pn({
|
|
|
5324
5334
|
}
|
|
5325
5335
|
function mn() {
|
|
5326
5336
|
const t = xe();
|
|
5327
|
-
return /* @__PURE__ */ a(
|
|
5337
|
+
return /* @__PURE__ */ e("div", { className: "bg-gray-50 dark:bg-gray-900 min-w-fit rounded", children: /* @__PURE__ */ a(
|
|
5328
5338
|
z,
|
|
5329
5339
|
{
|
|
5330
5340
|
className: "min-w-fit",
|
|
@@ -5339,7 +5349,7 @@ function mn() {
|
|
|
5339
5349
|
"New collection"
|
|
5340
5350
|
]
|
|
5341
5351
|
}
|
|
5342
|
-
);
|
|
5352
|
+
) });
|
|
5343
5353
|
}
|
|
5344
5354
|
function In({
|
|
5345
5355
|
collectionConfigController: t,
|
|
@@ -5354,7 +5364,7 @@ function In({
|
|
|
5354
5364
|
onAnalyticsEvent: h
|
|
5355
5365
|
}) {
|
|
5356
5366
|
return {
|
|
5357
|
-
|
|
5367
|
+
key: "collection_editor",
|
|
5358
5368
|
loading: t.loading,
|
|
5359
5369
|
provider: {
|
|
5360
5370
|
Component: on,
|
|
@@ -5443,7 +5453,7 @@ export {
|
|
|
5443
5453
|
qe as editableProperty,
|
|
5444
5454
|
ae as getFullId,
|
|
5445
5455
|
ir as getFullIdPath,
|
|
5446
|
-
|
|
5456
|
+
he as idToPropertiesPath,
|
|
5447
5457
|
ye as namespaceToPropertiesOrderPath,
|
|
5448
5458
|
bi as namespaceToPropertiesPath,
|
|
5449
5459
|
wi as removeNonEditableProperties,
|