@firecms/collection_editor 3.0.0-alpha.32 → 3.0.0-alpha.33
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.d.ts +2 -2
- package/dist/index.es.js +320 -275
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/ui/collection_editor/GetCodeDialog.d.ts +5 -0
- package/package.json +4 -4
- package/src/ConfigControllerProvider.tsx +2 -2
- package/src/index.ts +2 -2
- package/src/{components → ui}/collection_editor/CollectionPropertiesEditorForm.tsx +2 -49
- package/src/ui/collection_editor/GetCodeDialog.tsx +118 -0
- package/src/{components → ui}/collection_editor/PropertyFieldPreview.tsx +0 -4
- package/src/{components → ui}/collection_editor/PropertyTree.tsx +1 -1
- package/src/useCollectionEditorPlugin.tsx +6 -6
- package/src/utils/join_collections.ts +10 -2
- /package/dist/{components → ui}/CollectionViewHeaderAction.d.ts +0 -0
- /package/dist/{components → ui}/EditorCollectionAction.d.ts +0 -0
- /package/dist/{components → ui}/HomePageEditorCollectionAction.d.ts +0 -0
- /package/dist/{components → ui}/MissingReferenceWidget.d.ts +0 -0
- /package/dist/{components → ui}/NewCollectionCard.d.ts +0 -0
- /package/dist/{components → ui}/PropertyAddColumnComponent.d.ts +0 -0
- /package/dist/{components → ui}/RootCollectionSuggestions.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/CollectionDetailsForm.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/CollectionEditorDialog.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/CollectionEditorWelcomeView.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/CollectionPropertiesEditorForm.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/CollectionYupValidation.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/EntityCustomViewsSelectDialog.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/EnumForm.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/PropertyEditView.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/PropertyFieldPreview.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/PropertySelectItem.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/PropertyTree.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/SelectIcons.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/SubcollectionsEditTab.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/UnsavedChangesDialog.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/import/CollectionEditorImportDataPreview.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/import/CollectionEditorImportMapping.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/import/clean_import_data.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/properties/BlockPropertyField.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/properties/BooleanPropertyField.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/properties/CommonPropertyFields.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/properties/DateTimePropertyField.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/properties/EnumPropertyField.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/properties/FieldHelperView.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/properties/KeyValuePropertyField.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/properties/MapPropertyField.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/properties/NumberPropertyField.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/properties/ReferencePropertyField.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/properties/RepeatPropertyField.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/properties/StoragePropertyField.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/properties/StringPropertyField.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/properties/advanced/AdvancedPropertyValidation.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/properties/validation/ArrayPropertyValidation.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/properties/validation/GeneralPropertyValidation.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/properties/validation/NumberPropertyValidation.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/properties/validation/StringPropertyValidation.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/properties/validation/ValidationPanel.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/templates/blog_template.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/templates/products_template.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/templates/users_template.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/util.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/utils/strings.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/utils/supported_fields.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/utils/update_property_for_widget.d.ts +0 -0
- /package/dist/{components → ui}/collection_editor/utils/useTraceUpdate.d.ts +0 -0
- /package/src/{components → ui}/CollectionViewHeaderAction.tsx +0 -0
- /package/src/{components → ui}/EditorCollectionAction.tsx +0 -0
- /package/src/{components → ui}/HomePageEditorCollectionAction.tsx +0 -0
- /package/src/{components → ui}/MissingReferenceWidget.tsx +0 -0
- /package/src/{components → ui}/NewCollectionCard.tsx +0 -0
- /package/src/{components → ui}/PropertyAddColumnComponent.tsx +0 -0
- /package/src/{components → ui}/RootCollectionSuggestions.tsx +0 -0
- /package/src/{components → ui}/collection_editor/CollectionDetailsForm.tsx +0 -0
- /package/src/{components → ui}/collection_editor/CollectionEditorDialog.tsx +0 -0
- /package/src/{components → ui}/collection_editor/CollectionEditorWelcomeView.tsx +0 -0
- /package/src/{components → ui}/collection_editor/CollectionYupValidation.tsx +0 -0
- /package/src/{components → ui}/collection_editor/EntityCustomViewsSelectDialog.tsx +0 -0
- /package/src/{components → ui}/collection_editor/EnumForm.tsx +0 -0
- /package/src/{components → ui}/collection_editor/PropertyEditView.tsx +0 -0
- /package/src/{components → ui}/collection_editor/PropertySelectItem.tsx +0 -0
- /package/src/{components → ui}/collection_editor/SelectIcons.tsx +0 -0
- /package/src/{components → ui}/collection_editor/SubcollectionsEditTab.tsx +0 -0
- /package/src/{components → ui}/collection_editor/UnsavedChangesDialog.tsx +0 -0
- /package/src/{components → ui}/collection_editor/import/CollectionEditorImportDataPreview.tsx +0 -0
- /package/src/{components → ui}/collection_editor/import/CollectionEditorImportMapping.tsx +0 -0
- /package/src/{components → ui}/collection_editor/import/clean_import_data.ts +0 -0
- /package/src/{components → ui}/collection_editor/properties/BlockPropertyField.tsx +0 -0
- /package/src/{components → ui}/collection_editor/properties/BooleanPropertyField.tsx +0 -0
- /package/src/{components → ui}/collection_editor/properties/CommonPropertyFields.tsx +0 -0
- /package/src/{components → ui}/collection_editor/properties/DateTimePropertyField.tsx +0 -0
- /package/src/{components → ui}/collection_editor/properties/EnumPropertyField.tsx +0 -0
- /package/src/{components → ui}/collection_editor/properties/FieldHelperView.tsx +0 -0
- /package/src/{components → ui}/collection_editor/properties/KeyValuePropertyField.tsx +0 -0
- /package/src/{components → ui}/collection_editor/properties/MapPropertyField.tsx +0 -0
- /package/src/{components → ui}/collection_editor/properties/NumberPropertyField.tsx +0 -0
- /package/src/{components → ui}/collection_editor/properties/ReferencePropertyField.tsx +0 -0
- /package/src/{components → ui}/collection_editor/properties/RepeatPropertyField.tsx +0 -0
- /package/src/{components → ui}/collection_editor/properties/StoragePropertyField.tsx +0 -0
- /package/src/{components → ui}/collection_editor/properties/StringPropertyField.tsx +0 -0
- /package/src/{components → ui}/collection_editor/properties/advanced/AdvancedPropertyValidation.tsx +0 -0
- /package/src/{components → ui}/collection_editor/properties/validation/ArrayPropertyValidation.tsx +0 -0
- /package/src/{components → ui}/collection_editor/properties/validation/GeneralPropertyValidation.tsx +0 -0
- /package/src/{components → ui}/collection_editor/properties/validation/NumberPropertyValidation.tsx +0 -0
- /package/src/{components → ui}/collection_editor/properties/validation/StringPropertyValidation.tsx +0 -0
- /package/src/{components → ui}/collection_editor/properties/validation/ValidationPanel.tsx +0 -0
- /package/src/{components → ui}/collection_editor/templates/blog_template.ts +0 -0
- /package/src/{components → ui}/collection_editor/templates/products_template.ts +0 -0
- /package/src/{components → ui}/collection_editor/templates/users_template.ts +0 -0
- /package/src/{components → ui}/collection_editor/util.ts +0 -0
- /package/src/{components → ui}/collection_editor/utils/strings.ts +0 -0
- /package/src/{components → ui}/collection_editor/utils/supported_fields.tsx +0 -0
- /package/src/{components → ui}/collection_editor/utils/update_property_for_widget.ts +0 -0
- /package/src/{components → ui}/collection_editor/utils/useTraceUpdate.tsx +0 -0
package/dist/index.es.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsxs as n, Fragment as B, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import * as _e from "react";
|
|
3
|
-
import D, { useState as L, useCallback as J, useEffect as de, useMemo as $t, useRef as
|
|
4
|
-
import { iconKeys as Kt, debounce as ba, SearchBar as ya, Tooltip as ae, IconButton as re, Icon as st, coolIconKeys as _t, Typography as P, getIconForView as lt, useAutoComplete as va, Container as ut, Chip as ct, TextField as Ve, cn as xe, DebouncedTextField as
|
|
3
|
+
import D, { useState as L, useCallback as J, useEffect as de, useMemo as $t, useRef as Ge, useDeferredValue as fa, useContext as Lt } from "react";
|
|
4
|
+
import { iconKeys as Kt, debounce as ba, SearchBar as ya, Tooltip as ae, IconButton as re, Icon as st, coolIconKeys as _t, Typography as P, getIconForView as lt, useAutoComplete as va, Container as ut, Chip as ct, TextField as Ve, cn as xe, DebouncedTextField as H, Autocomplete as wa, AutocompleteItem as _a, ExpandablePanel as xt, SettingsIcon as Je, Select as je, SelectItem as we, BooleanSwitchWithLabel as Yt, Dialog as Ie, toSnakeCase as Gt, singular as ka, ListIcon as xa, Button as E, CircularProgress as Qe, AutoAwesomeIcon as ht, Paper as Se, FormikArrayContainer as Ca, DialogContent as De, DialogActions as Re, SwitchControl as ue, serializeRegExp as Oa, isValidRegExp as Pa, RuleIcon as Na, useSnackbarController as Ue, resolveEnumValues as Sa, FileUploadIcon as qa, MultiSelect as Aa, MultiSelectItem as qt, Checkbox as At, isPropertyBuilder as se, useFireCMSContext as Ae, getFieldConfig as We, ErrorBoundary as Pe, FieldConfigBadge as Ze, cardMixin as Ht, cardClickableMixin as Jt, cardSelectedMixin as Qt, FunctionsIcon as za, RemoveCircleIcon as Ta, defaultBorderMixin as Ct, RemoveIcon as Va, DragHandleIcon as ja, AddIcon as qe, useNavigationContext as $e, SelectGroup as zt, mergeDeep as $, getFieldId as Wt, DEFAULT_FIELD_CONFIGS as kt, InfoLabel as Zt, DeleteIcon as dt, DeleteConfirmationDialog as pt, ContentCopyIcon as Fa, useLargeLayout as Ia, CodeIcon as Ea, makePropertiesEditable as Xt, resolveEntityView as Ba, Table as Tt, TableBody as Vt, TableRow as bt, TableCell as Ye, unslugify as Ot, Card as ea, useSelectionController as Ma, EntityCollectionTable as Da, slugify as Ra, useAuthController as Le, CircularProgressCenter as jt, Tabs as Ua, Tab as yt, removeUndefined as $a, ErrorView as ta, ArrowBackIcon as rt, LoadingButton as Ft, DoneIcon as La, SaveIcon as Ka, Menu as Ya, MoreVertIcon as Ga, MenuItem as Ha, Collapse as Ja, sortProperties as Qa, getDefaultPropertiesOrder as Wa } from "@firecms/core";
|
|
5
5
|
import mt from "react-fast-compare";
|
|
6
|
-
import { useFormikContext as K, Field as be, getIn as N, Formik as Pt, FastField as le, Form as
|
|
6
|
+
import { useFormikContext as K, Field as be, getIn as N, Formik as Pt, FastField as le, Form as Za } from "formik";
|
|
7
7
|
import * as vt from "yup";
|
|
8
|
-
import * as
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import { ImportFileUpload as
|
|
14
|
-
import { useNavigate as
|
|
15
|
-
const
|
|
8
|
+
import * as Xa from "js-search";
|
|
9
|
+
import { extractEnumFromValues as ei, buildPropertyFromData as ti, buildEntityPropertiesFromData as ai } from "@firecms/schema_inference";
|
|
10
|
+
import { DragDropContext as ii, Droppable as ri, Draggable as oi } from "@hello-pangea/dnd";
|
|
11
|
+
import ni from "json5";
|
|
12
|
+
import { Highlight as si, themes as li } from "prism-react-renderer";
|
|
13
|
+
import { ImportFileUpload as ci, DataNewPropertiesMapping as di, ImportNewPropertyFieldPreview as pi, getInferenceType as aa, getPropertiesMapping as mi, convertDataToEntity as ui, useImportConfig as hi, ImportSaveInProgress as gi } from "@firecms/data_import";
|
|
14
|
+
import { useNavigate as fi } from "react-router";
|
|
15
|
+
const bi = vt.object().shape({
|
|
16
16
|
name: vt.string().required("Required"),
|
|
17
17
|
path: vt.string().required("Required")
|
|
18
|
-
}),
|
|
18
|
+
}), ia = {
|
|
19
19
|
abc: "alphabet character font letter symbol text type",
|
|
20
20
|
access_alarm: "clock time",
|
|
21
21
|
access_alarms: "clock time",
|
|
@@ -1964,18 +1964,18 @@ const gi = vt.object().shape({
|
|
|
1964
1964
|
zoom_in_map: "arrows destination location maps move place stop",
|
|
1965
1965
|
zoom_out: "find glass look magnifier magnifying minus negative scale search see size smaller",
|
|
1966
1966
|
zoom_out_map: "arrows destination location maps move place stop"
|
|
1967
|
-
}, Nt = new
|
|
1967
|
+
}, Nt = new Xa.Search("key");
|
|
1968
1968
|
Nt.addIndex("synonyms");
|
|
1969
1969
|
Nt.addDocuments(Kt.map((t) => ({
|
|
1970
1970
|
key: t,
|
|
1971
1971
|
// @ts-ignore
|
|
1972
|
-
synonyms:
|
|
1972
|
+
synonyms: ia[t] ?? []
|
|
1973
1973
|
})));
|
|
1974
|
-
const
|
|
1975
|
-
process.env.NODE_ENV !== "production" && Object.keys(
|
|
1974
|
+
const yi = 220;
|
|
1975
|
+
process.env.NODE_ENV !== "production" && Object.keys(ia).forEach((t) => {
|
|
1976
1976
|
Kt.includes(t) || console.warn(`The icon ${t} no longer exists. Remove it from \`synonyms\``);
|
|
1977
1977
|
});
|
|
1978
|
-
function
|
|
1978
|
+
function vi({ selectedIcon: t = "", onIconSelected: a }) {
|
|
1979
1979
|
const [r, i] = _e.useState(null), [s, o] = _e.useState(""), l = _e.useMemo(
|
|
1980
1980
|
() => ba((m) => {
|
|
1981
1981
|
if (!m || m === "")
|
|
@@ -1984,7 +1984,7 @@ function bi({ selectedIcon: t = "", onIconSelected: a }) {
|
|
|
1984
1984
|
const u = Nt.search(m);
|
|
1985
1985
|
i(u.map((c) => c.key));
|
|
1986
1986
|
}
|
|
1987
|
-
},
|
|
1987
|
+
}, yi),
|
|
1988
1988
|
[]
|
|
1989
1989
|
);
|
|
1990
1990
|
return _e.useEffect(() => (l(s), () => {
|
|
@@ -2017,7 +2017,7 @@ function te({
|
|
|
2017
2017
|
}) {
|
|
2018
2018
|
return a ? /* @__PURE__ */ e(P, { variant: "caption", color: t ? "error" : "secondary", className: "ml-3.5 mt-0.5", children: a }) : null;
|
|
2019
2019
|
}
|
|
2020
|
-
function
|
|
2020
|
+
function wi({
|
|
2021
2021
|
isNewCollection: t,
|
|
2022
2022
|
reservedGroups: a,
|
|
2023
2023
|
existingPaths: r,
|
|
@@ -2035,7 +2035,7 @@ function yi({
|
|
|
2035
2035
|
isSubmitting: f,
|
|
2036
2036
|
submitCount: y
|
|
2037
2037
|
} = K(), [k, _] = L(!1), O = (x) => {
|
|
2038
|
-
m("name", x), !N(c, "path") && t && x && m("path",
|
|
2038
|
+
m("name", x), !N(c, "path") && t && x && m("path", Gt(x)), !N(c, "singularName") && t && x && m("singularName", ka(x));
|
|
2039
2039
|
}, h = lt(d), w = J((x) => {
|
|
2040
2040
|
let C;
|
|
2041
2041
|
return x || (C = "You must specify a path in the database for this collection"), t && i?.includes(x.trim().toLowerCase()) && (C = "There is already a collection which uses this path as an alias"), t && r?.includes(x.trim().toLowerCase()) && !d.alias && (C = "There is already a collection with the specified path. If you want to have multiple collections referring to the same database path, you need to define an alias in at least one of the collections"), C;
|
|
@@ -2094,7 +2094,7 @@ function yi({
|
|
|
2094
2094
|
be,
|
|
2095
2095
|
{
|
|
2096
2096
|
name: "path",
|
|
2097
|
-
as:
|
|
2097
|
+
as: H,
|
|
2098
2098
|
label: "Path",
|
|
2099
2099
|
validate: w,
|
|
2100
2100
|
disabled: !t,
|
|
@@ -2141,7 +2141,7 @@ function yi({
|
|
|
2141
2141
|
xt,
|
|
2142
2142
|
{
|
|
2143
2143
|
title: /* @__PURE__ */ n("div", { className: "flex flex-row text-gray-500", children: [
|
|
2144
|
-
/* @__PURE__ */ e(
|
|
2144
|
+
/* @__PURE__ */ e(Je, {}),
|
|
2145
2145
|
/* @__PURE__ */ e(
|
|
2146
2146
|
P,
|
|
2147
2147
|
{
|
|
@@ -2188,7 +2188,7 @@ function yi({
|
|
|
2188
2188
|
be,
|
|
2189
2189
|
{
|
|
2190
2190
|
name: "alias",
|
|
2191
|
-
as:
|
|
2191
|
+
as: H,
|
|
2192
2192
|
disabled: !t,
|
|
2193
2193
|
label: "Alias",
|
|
2194
2194
|
validate: b,
|
|
@@ -2241,7 +2241,7 @@ function yi({
|
|
|
2241
2241
|
maxWidth: "xl",
|
|
2242
2242
|
fullWidth: !0,
|
|
2243
2243
|
children: /* @__PURE__ */ e("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ e(
|
|
2244
|
-
|
|
2244
|
+
vi,
|
|
2245
2245
|
{
|
|
2246
2246
|
selectedIcon: d.icon,
|
|
2247
2247
|
onIconSelected: (x) => {
|
|
@@ -2256,7 +2256,7 @@ function yi({
|
|
|
2256
2256
|
function ke(t) {
|
|
2257
2257
|
return "properties." + t.replaceAll(".", ".properties.");
|
|
2258
2258
|
}
|
|
2259
|
-
function
|
|
2259
|
+
function _i(t) {
|
|
2260
2260
|
return t ? "properties." + t.replaceAll(".", ".properties.") + ".properties" : "properties";
|
|
2261
2261
|
}
|
|
2262
2262
|
function Ne(t) {
|
|
@@ -2265,7 +2265,7 @@ function Ne(t) {
|
|
|
2265
2265
|
function ne(t, a) {
|
|
2266
2266
|
return a ? `${a}.${t}` : t;
|
|
2267
2267
|
}
|
|
2268
|
-
const
|
|
2268
|
+
const ki = D.memo(
|
|
2269
2269
|
function({
|
|
2270
2270
|
enumValues: a,
|
|
2271
2271
|
onValuesChanged: r,
|
|
@@ -2290,7 +2290,7 @@ const wi = D.memo(
|
|
|
2290
2290
|
}, [m.enumValues]), de(() => {
|
|
2291
2291
|
i && i(!!(u?.enumValues ?? !1));
|
|
2292
2292
|
}, [u]), /* @__PURE__ */ e(
|
|
2293
|
-
|
|
2293
|
+
xi,
|
|
2294
2294
|
{
|
|
2295
2295
|
enumValuesPath: "enumValues",
|
|
2296
2296
|
values: m,
|
|
@@ -2308,7 +2308,7 @@ const wi = D.memo(
|
|
|
2308
2308
|
return a.enumValues.length === r.enumValues.length && a.onValuesChanged === r.onValuesChanged && a.getData === r.getData;
|
|
2309
2309
|
}
|
|
2310
2310
|
);
|
|
2311
|
-
function
|
|
2311
|
+
function xi({
|
|
2312
2312
|
values: t,
|
|
2313
2313
|
errors: a,
|
|
2314
2314
|
disabled: r,
|
|
@@ -2322,7 +2322,7 @@ function _i({
|
|
|
2322
2322
|
} = K(), [m, u] = D.useState(), [c, p] = D.useState(), [g, f] = D.useState(!1), k = D.useRef(/* @__PURE__ */ new Set()).current, _ = (h, w) => {
|
|
2323
2323
|
const b = m === w;
|
|
2324
2324
|
return /* @__PURE__ */ e(
|
|
2325
|
-
|
|
2325
|
+
Ci,
|
|
2326
2326
|
{
|
|
2327
2327
|
index: h,
|
|
2328
2328
|
disabled: r,
|
|
@@ -2357,7 +2357,7 @@ function _i({
|
|
|
2357
2357
|
l && (f(!0), l?.().then((h) => {
|
|
2358
2358
|
if (!h)
|
|
2359
2359
|
return;
|
|
2360
|
-
const w = h.flat(), b = Array.from(new Set(w)), v = t.enumValues, F =
|
|
2360
|
+
const w = h.flat(), b = Array.from(new Set(w)), v = t.enumValues, F = ei(b).filter((A) => !v?.some((S) => S.id === A.id));
|
|
2361
2361
|
F.forEach((A) => {
|
|
2362
2362
|
k.add(A.id);
|
|
2363
2363
|
}), d(i, [...F, ...v]);
|
|
@@ -2366,7 +2366,7 @@ function _i({
|
|
|
2366
2366
|
}).finally(() => f(!1)));
|
|
2367
2367
|
},
|
|
2368
2368
|
children: [
|
|
2369
|
-
g ? /* @__PURE__ */ e(
|
|
2369
|
+
g ? /* @__PURE__ */ e(Qe, { size: "small" }) : /* @__PURE__ */ e(ht, {}),
|
|
2370
2370
|
"Infer values from data"
|
|
2371
2371
|
]
|
|
2372
2372
|
}
|
|
@@ -2388,7 +2388,7 @@ function _i({
|
|
|
2388
2388
|
}
|
|
2389
2389
|
),
|
|
2390
2390
|
/* @__PURE__ */ e(
|
|
2391
|
-
|
|
2391
|
+
Oi,
|
|
2392
2392
|
{
|
|
2393
2393
|
index: c,
|
|
2394
2394
|
open: c !== void 0,
|
|
@@ -2399,7 +2399,7 @@ function _i({
|
|
|
2399
2399
|
] })
|
|
2400
2400
|
] });
|
|
2401
2401
|
}
|
|
2402
|
-
const
|
|
2402
|
+
const Ci = D.memo(
|
|
2403
2403
|
function({
|
|
2404
2404
|
index: a,
|
|
2405
2405
|
shouldUpdateId: r,
|
|
@@ -2423,12 +2423,12 @@ const ki = D.memo(
|
|
|
2423
2423
|
le,
|
|
2424
2424
|
{
|
|
2425
2425
|
name: `${i}[${a}].label`,
|
|
2426
|
-
as:
|
|
2426
|
+
as: H,
|
|
2427
2427
|
className: "flex-grow",
|
|
2428
2428
|
required: !0,
|
|
2429
2429
|
disabled: l,
|
|
2430
2430
|
size: "small",
|
|
2431
|
-
validate:
|
|
2431
|
+
validate: Pi,
|
|
2432
2432
|
autoFocus: s,
|
|
2433
2433
|
autoComplete: "off",
|
|
2434
2434
|
endAdornment: d && /* @__PURE__ */ e(ht, { size: "small" }),
|
|
@@ -2442,7 +2442,7 @@ const ki = D.memo(
|
|
|
2442
2442
|
"aria-label": "edit",
|
|
2443
2443
|
className: "m-1",
|
|
2444
2444
|
onClick: () => o(),
|
|
2445
|
-
children: /* @__PURE__ */ e(
|
|
2445
|
+
children: /* @__PURE__ */ e(Je, { size: "small" })
|
|
2446
2446
|
}
|
|
2447
2447
|
)
|
|
2448
2448
|
] });
|
|
@@ -2451,7 +2451,7 @@ const ki = D.memo(
|
|
|
2451
2451
|
return a.index === r.index && a.enumValuesPath === r.enumValuesPath && a.shouldUpdateId === r.shouldUpdateId && a.inferredEntry === r.inferredEntry && a.autoFocus === r.autoFocus;
|
|
2452
2452
|
}
|
|
2453
2453
|
);
|
|
2454
|
-
function
|
|
2454
|
+
function Oi({
|
|
2455
2455
|
index: t,
|
|
2456
2456
|
open: a,
|
|
2457
2457
|
onClose: r,
|
|
@@ -2477,9 +2477,9 @@ function xi({
|
|
|
2477
2477
|
le,
|
|
2478
2478
|
{
|
|
2479
2479
|
name: `${i}[${t}]id`,
|
|
2480
|
-
as:
|
|
2480
|
+
as: H,
|
|
2481
2481
|
required: !0,
|
|
2482
|
-
validate:
|
|
2482
|
+
validate: Ni,
|
|
2483
2483
|
label: "ID",
|
|
2484
2484
|
size: "small",
|
|
2485
2485
|
autoComplete: "off",
|
|
@@ -2502,11 +2502,11 @@ function xi({
|
|
|
2502
2502
|
}
|
|
2503
2503
|
);
|
|
2504
2504
|
}
|
|
2505
|
-
function
|
|
2505
|
+
function Pi(t) {
|
|
2506
2506
|
let a;
|
|
2507
2507
|
return t || (a = "You must specify a label"), a;
|
|
2508
2508
|
}
|
|
2509
|
-
function
|
|
2509
|
+
function Ni(t) {
|
|
2510
2510
|
let a;
|
|
2511
2511
|
return t || (a = "You must specify an ID"), a;
|
|
2512
2512
|
}
|
|
@@ -2536,7 +2536,7 @@ function Ee({ disabled: t }) {
|
|
|
2536
2536
|
}
|
|
2537
2537
|
) }),
|
|
2538
2538
|
N(a, i) && /* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
|
|
2539
|
-
|
|
2539
|
+
H,
|
|
2540
2540
|
{
|
|
2541
2541
|
disabled: t,
|
|
2542
2542
|
value: N(a, s),
|
|
@@ -2600,7 +2600,7 @@ function Me({
|
|
|
2600
2600
|
] }),
|
|
2601
2601
|
/* @__PURE__ */ n("div", { className: "grid grid-cols-12 gap-2 col-span-12", children: [
|
|
2602
2602
|
t && /* @__PURE__ */ e("div", { className: "col-span-4", children: /* @__PURE__ */ e(
|
|
2603
|
-
|
|
2603
|
+
H,
|
|
2604
2604
|
{
|
|
2605
2605
|
value: N(u, g),
|
|
2606
2606
|
label: "Exact length",
|
|
@@ -2612,7 +2612,7 @@ function Me({
|
|
|
2612
2612
|
}
|
|
2613
2613
|
) }),
|
|
2614
2614
|
s && /* @__PURE__ */ e("div", { className: "col-span-4", children: /* @__PURE__ */ e(
|
|
2615
|
-
|
|
2615
|
+
H,
|
|
2616
2616
|
{
|
|
2617
2617
|
value: N(u, f),
|
|
2618
2618
|
label: "Min length",
|
|
@@ -2624,7 +2624,7 @@ function Me({
|
|
|
2624
2624
|
}
|
|
2625
2625
|
) }),
|
|
2626
2626
|
i && /* @__PURE__ */ e("div", { className: "col-span-4", children: /* @__PURE__ */ e(
|
|
2627
|
-
|
|
2627
|
+
H,
|
|
2628
2628
|
{
|
|
2629
2629
|
value: N(u, y),
|
|
2630
2630
|
label: "Max length",
|
|
@@ -2641,7 +2641,7 @@ function Me({
|
|
|
2641
2641
|
le,
|
|
2642
2642
|
{
|
|
2643
2643
|
name: _,
|
|
2644
|
-
as:
|
|
2644
|
+
as: H,
|
|
2645
2645
|
validate: (T) => T && !Pa(T),
|
|
2646
2646
|
label: "Matches regex",
|
|
2647
2647
|
size: "small",
|
|
@@ -2666,7 +2666,7 @@ function St({
|
|
|
2666
2666
|
return /* @__PURE__ */ n("div", { className: "grid grid-cols-12 gap-2", children: [
|
|
2667
2667
|
/* @__PURE__ */ e(Ee, { disabled: r }),
|
|
2668
2668
|
a && /* @__PURE__ */ e("div", { className: "col-span-6", children: /* @__PURE__ */ e(
|
|
2669
|
-
|
|
2669
|
+
H,
|
|
2670
2670
|
{
|
|
2671
2671
|
value: N(i, o),
|
|
2672
2672
|
disabled: r,
|
|
@@ -2678,7 +2678,7 @@ function St({
|
|
|
2678
2678
|
}
|
|
2679
2679
|
) }),
|
|
2680
2680
|
t && /* @__PURE__ */ e("div", { className: "col-span-6", children: /* @__PURE__ */ e(
|
|
2681
|
-
|
|
2681
|
+
H,
|
|
2682
2682
|
{
|
|
2683
2683
|
value: N(i, l),
|
|
2684
2684
|
disabled: r,
|
|
@@ -2730,10 +2730,10 @@ function It({
|
|
|
2730
2730
|
touched: u,
|
|
2731
2731
|
setFieldError: c,
|
|
2732
2732
|
setFieldValue: p
|
|
2733
|
-
} = K(), g =
|
|
2733
|
+
} = K(), g = Ue(), f = t ? "of.enumValues" : "enumValues", y = N(l, "defaultValue"), k = N(l, f), _ = $t(() => !k || typeof k == "boolean" ? [] : Sa(k) ?? [], [k]);
|
|
2734
2734
|
return /* @__PURE__ */ n(B, { children: [
|
|
2735
2735
|
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
|
|
2736
|
-
|
|
2736
|
+
ki,
|
|
2737
2737
|
{
|
|
2738
2738
|
enumValues: _,
|
|
2739
2739
|
updateIds: a,
|
|
@@ -2864,7 +2864,7 @@ function Et({
|
|
|
2864
2864
|
be,
|
|
2865
2865
|
{
|
|
2866
2866
|
name: d,
|
|
2867
|
-
as:
|
|
2867
|
+
as: H,
|
|
2868
2868
|
label: "File name",
|
|
2869
2869
|
size: "small",
|
|
2870
2870
|
disabled: _ || r,
|
|
@@ -2876,7 +2876,7 @@ function Et({
|
|
|
2876
2876
|
be,
|
|
2877
2877
|
{
|
|
2878
2878
|
name: m,
|
|
2879
|
-
as:
|
|
2879
|
+
as: H,
|
|
2880
2880
|
label: "Storage path",
|
|
2881
2881
|
disabled: O || r,
|
|
2882
2882
|
size: "small",
|
|
@@ -2925,19 +2925,19 @@ function He(t) {
|
|
|
2925
2925
|
return a.dataType === "array" && typeof a.of == "function" || a.dataType === "array" && Array.isArray(a.of) ? !1 : !!a.editable;
|
|
2926
2926
|
}
|
|
2927
2927
|
}
|
|
2928
|
-
function
|
|
2928
|
+
function Si(t) {
|
|
2929
2929
|
return Object.entries(t).filter(([a, r]) => He(r)).map(([a, r]) => {
|
|
2930
2930
|
const i = r;
|
|
2931
2931
|
if (He(i))
|
|
2932
2932
|
return i.dataType === "map" && i.properties ? {
|
|
2933
2933
|
[a]: {
|
|
2934
2934
|
...i,
|
|
2935
|
-
properties:
|
|
2935
|
+
properties: Si(i.properties)
|
|
2936
2936
|
}
|
|
2937
2937
|
} : { [a]: i };
|
|
2938
2938
|
}).filter((a) => !!a).reduce((a, r) => ({ ...a, ...r }), {});
|
|
2939
2939
|
}
|
|
2940
|
-
function
|
|
2940
|
+
function ra({
|
|
2941
2941
|
property: t,
|
|
2942
2942
|
onClick: a,
|
|
2943
2943
|
hasError: r,
|
|
@@ -2945,8 +2945,8 @@ function oa({
|
|
|
2945
2945
|
includeEditButton: s,
|
|
2946
2946
|
selected: o
|
|
2947
2947
|
}) {
|
|
2948
|
-
const { fields: l } = Ae(), d = We(t, l)
|
|
2949
|
-
return /* @__PURE__ */ e(Pe, { children: /* @__PURE__ */ n(
|
|
2948
|
+
const { fields: l } = Ae(), d = We(t, l);
|
|
2949
|
+
return He(t), /* @__PURE__ */ e(Pe, { children: /* @__PURE__ */ n(
|
|
2950
2950
|
"div",
|
|
2951
2951
|
{
|
|
2952
2952
|
onClick: a,
|
|
@@ -2958,7 +2958,7 @@ function oa({
|
|
|
2958
2958
|
{
|
|
2959
2959
|
className: xe(
|
|
2960
2960
|
"pl-2 w-full flex flex-row gap-4 items-center",
|
|
2961
|
-
|
|
2961
|
+
Ht,
|
|
2962
2962
|
a ? Jt : "",
|
|
2963
2963
|
o ? Qt : "",
|
|
2964
2964
|
"flex-grow p-4 border transition-colors duration-200",
|
|
@@ -2994,14 +2994,7 @@ function oa({
|
|
|
2994
2994
|
color: "disabled",
|
|
2995
2995
|
children: t.dataType
|
|
2996
2996
|
}
|
|
2997
|
-
) })
|
|
2998
|
-
m && /* @__PURE__ */ e(
|
|
2999
|
-
"div",
|
|
3000
|
-
{
|
|
3001
|
-
className: "text-xs h-3 ml-0.5",
|
|
3002
|
-
children: /* @__PURE__ */ e(Wt, { color: "disabled" })
|
|
3003
|
-
}
|
|
3004
|
-
)
|
|
2997
|
+
) })
|
|
3005
2998
|
] })
|
|
3006
2999
|
] }),
|
|
3007
3000
|
s && /* @__PURE__ */ e(P, { variant: "button", children: "EDIT" })
|
|
@@ -3012,7 +3005,7 @@ function oa({
|
|
|
3012
3005
|
}
|
|
3013
3006
|
) });
|
|
3014
3007
|
}
|
|
3015
|
-
function
|
|
3008
|
+
function qi({
|
|
3016
3009
|
name: t,
|
|
3017
3010
|
selected: a,
|
|
3018
3011
|
onClick: r,
|
|
@@ -3034,14 +3027,14 @@ function Ni({
|
|
|
3034
3027
|
children: /* @__PURE__ */ e(za, { color: "inherit", size: "medium" })
|
|
3035
3028
|
}
|
|
3036
3029
|
),
|
|
3037
|
-
/* @__PURE__ */ e(
|
|
3030
|
+
/* @__PURE__ */ e(Ta, { color: "disabled", size: "small", className: "absolute -right-2 -top-2" })
|
|
3038
3031
|
] }),
|
|
3039
3032
|
/* @__PURE__ */ e(
|
|
3040
3033
|
Se,
|
|
3041
3034
|
{
|
|
3042
3035
|
className: xe(
|
|
3043
3036
|
"pl-2 w-full flex flex-row gap-4 items-center",
|
|
3044
|
-
|
|
3037
|
+
Ht,
|
|
3045
3038
|
r ? Jt : "",
|
|
3046
3039
|
a ? Qt : "",
|
|
3047
3040
|
"flex-grow p-4 border transition-colors duration-200",
|
|
@@ -3123,7 +3116,7 @@ function gt({
|
|
|
3123
3116
|
const k = y.source.index, _ = y.destination.index, O = Array.from(g), [h] = O.splice(k, 1);
|
|
3124
3117
|
O.splice(_, 0, h), d && d(O, t);
|
|
3125
3118
|
}, [t, d, g]);
|
|
3126
|
-
return /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(
|
|
3119
|
+
return /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(ii, { onDragEnd: f, children: /* @__PURE__ */ e(ri, { droppableId: `droppable_${t}`, children: (y, k) => /* @__PURE__ */ n(
|
|
3127
3120
|
"div",
|
|
3128
3121
|
{
|
|
3129
3122
|
...y.droppableProps,
|
|
@@ -3131,14 +3124,14 @@ function gt({
|
|
|
3131
3124
|
className: u,
|
|
3132
3125
|
children: [
|
|
3133
3126
|
g && g.map((_, O) => {
|
|
3134
|
-
const h = i[_], w = o?.find((b) => b.
|
|
3127
|
+
const h = i[_], w = o?.find((b) => b.key === _);
|
|
3135
3128
|
return !h && !w ? (console.warn(`Property ${_} not found in properties or additionalFields`), null) : /* @__PURE__ */ e(
|
|
3136
|
-
|
|
3129
|
+
oi,
|
|
3137
3130
|
{
|
|
3138
3131
|
draggableId: `array_field_${t}_${_}}`,
|
|
3139
3132
|
index: O,
|
|
3140
3133
|
children: (b, v) => /* @__PURE__ */ e(Pe, { children: /* @__PURE__ */ e(
|
|
3141
|
-
|
|
3134
|
+
Ai,
|
|
3142
3135
|
{
|
|
3143
3136
|
propertyKey: _,
|
|
3144
3137
|
propertyOrBuilder: h,
|
|
@@ -3163,7 +3156,7 @@ function gt({
|
|
|
3163
3156
|
}
|
|
3164
3157
|
) }) }) });
|
|
3165
3158
|
}
|
|
3166
|
-
function
|
|
3159
|
+
function Ai({
|
|
3167
3160
|
propertyKey: t,
|
|
3168
3161
|
namespace: a,
|
|
3169
3162
|
propertyOrBuilder: r,
|
|
@@ -3217,7 +3210,7 @@ function Si({
|
|
|
3217
3210
|
}
|
|
3218
3211
|
),
|
|
3219
3212
|
!se(r) && !i && O ? /* @__PURE__ */ e(
|
|
3220
|
-
|
|
3213
|
+
ra,
|
|
3221
3214
|
{
|
|
3222
3215
|
property: r,
|
|
3223
3216
|
onClick: d ? () => d(t, a) : void 0,
|
|
@@ -3226,7 +3219,7 @@ function Si({
|
|
|
3226
3219
|
hasError: k
|
|
3227
3220
|
}
|
|
3228
3221
|
) : /* @__PURE__ */ e(
|
|
3229
|
-
|
|
3222
|
+
qi,
|
|
3230
3223
|
{
|
|
3231
3224
|
name: t,
|
|
3232
3225
|
property: r,
|
|
@@ -3242,7 +3235,7 @@ function Si({
|
|
|
3242
3235
|
size: "small",
|
|
3243
3236
|
color: "inherit",
|
|
3244
3237
|
onClick: () => u(t, a),
|
|
3245
|
-
children: /* @__PURE__ */ e(
|
|
3238
|
+
children: /* @__PURE__ */ e(Va, { size: "small" })
|
|
3246
3239
|
}
|
|
3247
3240
|
) }),
|
|
3248
3241
|
m && /* @__PURE__ */ e(ae, { title: "Move", children: /* @__PURE__ */ e(
|
|
@@ -3250,7 +3243,7 @@ function Si({
|
|
|
3250
3243
|
{
|
|
3251
3244
|
component: "span",
|
|
3252
3245
|
size: "small",
|
|
3253
|
-
children: /* @__PURE__ */ e(
|
|
3246
|
+
children: /* @__PURE__ */ e(ja, { size: "small" })
|
|
3254
3247
|
}
|
|
3255
3248
|
) })
|
|
3256
3249
|
] }),
|
|
@@ -3259,7 +3252,7 @@ function Si({
|
|
|
3259
3252
|
}
|
|
3260
3253
|
);
|
|
3261
3254
|
}
|
|
3262
|
-
function
|
|
3255
|
+
function zi({ disabled: t, getData: a, allowDataInference: r, customFields: i, collectionEditable: s }) {
|
|
3263
3256
|
const {
|
|
3264
3257
|
values: o,
|
|
3265
3258
|
setFieldValue: l
|
|
@@ -3277,7 +3270,7 @@ function qi({ disabled: t, getData: a, allowDataInference: r, customFields: i, c
|
|
|
3277
3270
|
const F = v ? ne(v, T) : void 0;
|
|
3278
3271
|
if (!F)
|
|
3279
3272
|
throw Error("collection editor miss config");
|
|
3280
|
-
const A = ke(F), S = Ne(T), x = N(o, S) ?? Object.keys(N(o,
|
|
3273
|
+
const A = ke(F), S = Ne(T), x = N(o, S) ?? Object.keys(N(o, _i(T)));
|
|
3281
3274
|
l(A, void 0, !1), l(S, x.filter((C) => C !== v), !1), m(!1), c(void 0), g(void 0);
|
|
3282
3275
|
}, [l, o]), _ = u ? ne(u, p) : void 0, O = _ ? N(o.properties, _.replaceAll(".", ".properties.")) : void 0, h = /* @__PURE__ */ n(
|
|
3283
3276
|
E,
|
|
@@ -3366,7 +3359,7 @@ function qi({ disabled: t, getData: a, allowDataInference: r, customFields: i, c
|
|
|
3366
3359
|
)
|
|
3367
3360
|
] });
|
|
3368
3361
|
}
|
|
3369
|
-
function
|
|
3362
|
+
function Ti({
|
|
3370
3363
|
showErrors: t,
|
|
3371
3364
|
existing: a,
|
|
3372
3365
|
disabled: r,
|
|
@@ -3395,7 +3388,7 @@ function Ai({
|
|
|
3395
3388
|
validate: (w) => w?.dataType ? void 0 : "You need to specify a repeat field",
|
|
3396
3389
|
children: () => /* @__PURE__ */ n(Se, { className: "p-2 mt-4", children: [
|
|
3397
3390
|
k && /* @__PURE__ */ e(
|
|
3398
|
-
|
|
3391
|
+
ra,
|
|
3399
3392
|
{
|
|
3400
3393
|
property: k,
|
|
3401
3394
|
onClick: r ? void 0 : () => y(!0),
|
|
@@ -3444,7 +3437,7 @@ function Ai({
|
|
|
3444
3437
|
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(ze, { children: /* @__PURE__ */ e(St, { disabled: r }) }) })
|
|
3445
3438
|
] });
|
|
3446
3439
|
}
|
|
3447
|
-
const
|
|
3440
|
+
const Vi = D.forwardRef(
|
|
3448
3441
|
function({
|
|
3449
3442
|
showErrors: a,
|
|
3450
3443
|
disabledId: r,
|
|
@@ -3462,9 +3455,9 @@ const zi = D.forwardRef(
|
|
|
3462
3455
|
{
|
|
3463
3456
|
inputRef: l,
|
|
3464
3457
|
name: m,
|
|
3465
|
-
as:
|
|
3458
|
+
as: H,
|
|
3466
3459
|
style: { fontSize: 20 },
|
|
3467
|
-
validate:
|
|
3460
|
+
validate: Ii,
|
|
3468
3461
|
placeholder: "Field name",
|
|
3469
3462
|
required: !0,
|
|
3470
3463
|
disabled: s,
|
|
@@ -3480,7 +3473,7 @@ const zi = D.forwardRef(
|
|
|
3480
3473
|
name: c,
|
|
3481
3474
|
as: Ve,
|
|
3482
3475
|
label: "ID",
|
|
3483
|
-
validate: (y) =>
|
|
3476
|
+
validate: (y) => Fi(y, i),
|
|
3484
3477
|
disabled: r || s,
|
|
3485
3478
|
required: !0,
|
|
3486
3479
|
size: "small",
|
|
@@ -3494,7 +3487,7 @@ const zi = D.forwardRef(
|
|
|
3494
3487
|
be,
|
|
3495
3488
|
{
|
|
3496
3489
|
name: g,
|
|
3497
|
-
as:
|
|
3490
|
+
as: H,
|
|
3498
3491
|
label: "Description",
|
|
3499
3492
|
disabled: s,
|
|
3500
3493
|
error: !!f
|
|
@@ -3504,16 +3497,16 @@ const zi = D.forwardRef(
|
|
|
3504
3497
|
] })
|
|
3505
3498
|
] });
|
|
3506
3499
|
}
|
|
3507
|
-
),
|
|
3508
|
-
function
|
|
3500
|
+
), ji = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
|
|
3501
|
+
function Fi(t, a) {
|
|
3509
3502
|
let r;
|
|
3510
|
-
return t || (r = "You must specify an id for the field"), t && !t.match(
|
|
3503
|
+
return t || (r = "You must specify an id for the field"), t && !t.match(ji) && (r = "The id can only contain letters, numbers and underscores (_), and not start with a number"), t && a && a.includes(t) && (r = "There is another field with this ID already"), r;
|
|
3511
3504
|
}
|
|
3512
|
-
function
|
|
3505
|
+
function Ii(t) {
|
|
3513
3506
|
let a;
|
|
3514
3507
|
return t || (a = "You must specify a title for the field"), a;
|
|
3515
3508
|
}
|
|
3516
|
-
function
|
|
3509
|
+
function Ei({
|
|
3517
3510
|
widgetId: t,
|
|
3518
3511
|
disabled: a,
|
|
3519
3512
|
showErrors: r
|
|
@@ -3596,7 +3589,7 @@ function Fi({
|
|
|
3596
3589
|
) })
|
|
3597
3590
|
] });
|
|
3598
3591
|
}
|
|
3599
|
-
function
|
|
3592
|
+
function Bi({ disabled: t }) {
|
|
3600
3593
|
const { values: a } = K(), r = N(a, "defaultValue");
|
|
3601
3594
|
return /* @__PURE__ */ n(B, { children: [
|
|
3602
3595
|
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(ze, { children: /* @__PURE__ */ e(Ee, { disabled: t }) }) }),
|
|
@@ -3613,7 +3606,7 @@ function Ii({ disabled: t }) {
|
|
|
3613
3606
|
) })
|
|
3614
3607
|
] });
|
|
3615
3608
|
}
|
|
3616
|
-
function
|
|
3609
|
+
function Mi({ disabled: t, getData: a, allowDataInference: r, customFields: i, collectionEditable: s }) {
|
|
3617
3610
|
const {
|
|
3618
3611
|
values: o,
|
|
3619
3612
|
setFieldValue: l
|
|
@@ -3701,7 +3694,7 @@ function Ei({ disabled: t, getData: a, allowDataInference: r, customFields: i, c
|
|
|
3701
3694
|
)
|
|
3702
3695
|
] });
|
|
3703
3696
|
}
|
|
3704
|
-
function
|
|
3697
|
+
function Di({ disabled: t }) {
|
|
3705
3698
|
const {
|
|
3706
3699
|
values: a,
|
|
3707
3700
|
handleChange: r
|
|
@@ -3709,7 +3702,7 @@ function Bi({ disabled: t }) {
|
|
|
3709
3702
|
return /* @__PURE__ */ n("div", { className: "grid grid-cols-12 gap-2", children: [
|
|
3710
3703
|
/* @__PURE__ */ e(Ee, { disabled: t }),
|
|
3711
3704
|
/* @__PURE__ */ e("div", { className: "col-span-6", children: /* @__PURE__ */ e(
|
|
3712
|
-
|
|
3705
|
+
H,
|
|
3713
3706
|
{
|
|
3714
3707
|
value: N(a, i),
|
|
3715
3708
|
label: "Min value",
|
|
@@ -3721,7 +3714,7 @@ function Bi({ disabled: t }) {
|
|
|
3721
3714
|
}
|
|
3722
3715
|
) }),
|
|
3723
3716
|
/* @__PURE__ */ e("div", { className: "col-span-6", children: /* @__PURE__ */ e(
|
|
3724
|
-
|
|
3717
|
+
H,
|
|
3725
3718
|
{
|
|
3726
3719
|
value: N(a, s),
|
|
3727
3720
|
label: "Max value",
|
|
@@ -3733,7 +3726,7 @@ function Bi({ disabled: t }) {
|
|
|
3733
3726
|
}
|
|
3734
3727
|
) }),
|
|
3735
3728
|
/* @__PURE__ */ e("div", { className: "col-span-6", children: /* @__PURE__ */ e(
|
|
3736
|
-
|
|
3729
|
+
H,
|
|
3737
3730
|
{
|
|
3738
3731
|
value: N(a, o),
|
|
3739
3732
|
label: "Less than",
|
|
@@ -3745,7 +3738,7 @@ function Bi({ disabled: t }) {
|
|
|
3745
3738
|
}
|
|
3746
3739
|
) }),
|
|
3747
3740
|
/* @__PURE__ */ e("div", { className: "col-span-6", children: /* @__PURE__ */ e(
|
|
3748
|
-
|
|
3741
|
+
H,
|
|
3749
3742
|
{
|
|
3750
3743
|
value: N(a, l),
|
|
3751
3744
|
label: "More than",
|
|
@@ -3788,10 +3781,10 @@ function Bi({ disabled: t }) {
|
|
|
3788
3781
|
) })
|
|
3789
3782
|
] });
|
|
3790
3783
|
}
|
|
3791
|
-
function
|
|
3784
|
+
function Ri({ disabled: t }) {
|
|
3792
3785
|
const { values: a, setFieldValue: r } = K();
|
|
3793
3786
|
return /* @__PURE__ */ n(B, { children: [
|
|
3794
|
-
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(ze, { children: /* @__PURE__ */ e(
|
|
3787
|
+
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(ze, { children: /* @__PURE__ */ e(Di, { disabled: t }) }) }),
|
|
3795
3788
|
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
|
|
3796
3789
|
Ve,
|
|
3797
3790
|
{
|
|
@@ -3821,8 +3814,8 @@ function Bt({
|
|
|
3821
3814
|
setFieldError: m,
|
|
3822
3815
|
setFieldValue: u
|
|
3823
3816
|
} = K();
|
|
3824
|
-
if (
|
|
3825
|
-
return /* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
|
|
3817
|
+
if (!$e())
|
|
3818
|
+
return /* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(Qe, {}) });
|
|
3826
3819
|
const p = a ? "of.path" : "path", g = N(s, p), f = i && N(l, p);
|
|
3827
3820
|
return console.log("pathError", l, f), /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
|
|
3828
3821
|
be,
|
|
@@ -3831,20 +3824,20 @@ function Bt({
|
|
|
3831
3824
|
name: p,
|
|
3832
3825
|
pathPath: p,
|
|
3833
3826
|
type: "select",
|
|
3834
|
-
validate:
|
|
3827
|
+
validate: Ui,
|
|
3835
3828
|
disabled: t || r,
|
|
3836
3829
|
value: g,
|
|
3837
3830
|
error: f,
|
|
3838
3831
|
handleChange: o,
|
|
3839
|
-
component:
|
|
3832
|
+
component: $i
|
|
3840
3833
|
}
|
|
3841
3834
|
) }) });
|
|
3842
3835
|
}
|
|
3843
|
-
function
|
|
3836
|
+
function Ui(t) {
|
|
3844
3837
|
let a;
|
|
3845
3838
|
return t || (a = "You must specify a target collection for the field"), a;
|
|
3846
3839
|
}
|
|
3847
|
-
function
|
|
3840
|
+
function $i({
|
|
3848
3841
|
disabled: t,
|
|
3849
3842
|
pathPath: a,
|
|
3850
3843
|
value: r,
|
|
@@ -3853,9 +3846,9 @@ function Ri({
|
|
|
3853
3846
|
...o
|
|
3854
3847
|
}) {
|
|
3855
3848
|
console.log("error", s);
|
|
3856
|
-
const l =
|
|
3849
|
+
const l = $e();
|
|
3857
3850
|
if (!l)
|
|
3858
|
-
return /* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
|
|
3851
|
+
return /* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(Qe, {}) });
|
|
3859
3852
|
const d = l?.collections ?? [], m = Array.from(new Set(
|
|
3860
3853
|
Object.values(d).map((c) => c.group).filter(Boolean)
|
|
3861
3854
|
).values()), u = d.filter((c) => !c.group);
|
|
@@ -3944,7 +3937,7 @@ function Ri({
|
|
|
3944
3937
|
/* @__PURE__ */ e(te, { children: "You can only edit the reference collection upon field creation." })
|
|
3945
3938
|
] });
|
|
3946
3939
|
}
|
|
3947
|
-
function
|
|
3940
|
+
function Li({ disabled: t }) {
|
|
3948
3941
|
const {
|
|
3949
3942
|
values: a,
|
|
3950
3943
|
errors: r,
|
|
@@ -4010,7 +4003,7 @@ function Ui({ disabled: t }) {
|
|
|
4010
4003
|
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(ze, { children: /* @__PURE__ */ e(Ee, { disabled: t }) }) })
|
|
4011
4004
|
] });
|
|
4012
4005
|
}
|
|
4013
|
-
function
|
|
4006
|
+
function Ki({ disabled: t }) {
|
|
4014
4007
|
return K(), /* @__PURE__ */ n("div", { className: "grid grid-cols-12 gap-2", children: [
|
|
4015
4008
|
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
|
|
4016
4009
|
le,
|
|
@@ -4036,10 +4029,10 @@ function $i({ disabled: t }) {
|
|
|
4036
4029
|
) })
|
|
4037
4030
|
] });
|
|
4038
4031
|
}
|
|
4039
|
-
function
|
|
4032
|
+
function Yi({ disabled: t }) {
|
|
4040
4033
|
return /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(ze, { children: /* @__PURE__ */ e(Ee, { disabled: t }) }) }) });
|
|
4041
4034
|
}
|
|
4042
|
-
function
|
|
4035
|
+
function oa(t, a, r) {
|
|
4043
4036
|
let i;
|
|
4044
4037
|
return a === "text_field" ? i = $(
|
|
4045
4038
|
t,
|
|
@@ -4248,7 +4241,7 @@ function na(t, a, r) {
|
|
|
4248
4241
|
}
|
|
4249
4242
|
) : a && r[a] && (i = { ...r[a].property, propertyConfig: a }), i;
|
|
4250
4243
|
}
|
|
4251
|
-
function
|
|
4244
|
+
function na({ value: t, optionDisabled: a, propertyConfig: r, existing: i }) {
|
|
4252
4245
|
return /* @__PURE__ */ e(
|
|
4253
4246
|
we,
|
|
4254
4247
|
{
|
|
@@ -4282,7 +4275,7 @@ function sa({ value: t, optionDisabled: a, propertyConfig: r, existing: i }) {
|
|
|
4282
4275
|
}
|
|
4283
4276
|
);
|
|
4284
4277
|
}
|
|
4285
|
-
const
|
|
4278
|
+
const sa = D.memo(
|
|
4286
4279
|
function({
|
|
4287
4280
|
includeIdAndName: a = !0,
|
|
4288
4281
|
autoOpenTypeSelect: r,
|
|
@@ -4310,7 +4303,7 @@ const la = D.memo(
|
|
|
4310
4303
|
name: ""
|
|
4311
4304
|
}, T = !!(m && !He(m)) && !b;
|
|
4312
4305
|
console.log("PropertyForm disabled", T);
|
|
4313
|
-
const F =
|
|
4306
|
+
const F = Ge(m ? {
|
|
4314
4307
|
id: l,
|
|
4315
4308
|
previousId: l,
|
|
4316
4309
|
property: m
|
|
@@ -4345,7 +4338,7 @@ const la = D.memo(
|
|
|
4345
4338
|
children: (S) => (de(() => {
|
|
4346
4339
|
O?.(S);
|
|
4347
4340
|
}, [S]), /* @__PURE__ */ e(
|
|
4348
|
-
|
|
4341
|
+
Gi,
|
|
4349
4342
|
{
|
|
4350
4343
|
onPropertyChanged: c ? A : void 0,
|
|
4351
4344
|
onDelete: p,
|
|
@@ -4381,7 +4374,7 @@ function Fe({
|
|
|
4381
4374
|
collectionEditable: o,
|
|
4382
4375
|
...l
|
|
4383
4376
|
}) {
|
|
4384
|
-
const d =
|
|
4377
|
+
const d = Ge();
|
|
4385
4378
|
return /* @__PURE__ */ n(
|
|
4386
4379
|
Ie,
|
|
4387
4380
|
{
|
|
@@ -4390,7 +4383,7 @@ function Fe({
|
|
|
4390
4383
|
fullWidth: !0,
|
|
4391
4384
|
children: [
|
|
4392
4385
|
/* @__PURE__ */ e(De, { children: /* @__PURE__ */ e(
|
|
4393
|
-
|
|
4386
|
+
sa,
|
|
4394
4387
|
{
|
|
4395
4388
|
...l,
|
|
4396
4389
|
onPropertyChanged: (u) => {
|
|
@@ -4429,7 +4422,7 @@ function Fe({
|
|
|
4429
4422
|
}
|
|
4430
4423
|
);
|
|
4431
4424
|
}
|
|
4432
|
-
function
|
|
4425
|
+
function Gi({
|
|
4433
4426
|
values: t,
|
|
4434
4427
|
errors: a,
|
|
4435
4428
|
touched: r,
|
|
@@ -4452,9 +4445,9 @@ function Ki({
|
|
|
4452
4445
|
customFields: w,
|
|
4453
4446
|
collectionEditable: b
|
|
4454
4447
|
}) {
|
|
4455
|
-
const [v, T] = L(d), [F, A] = L(!1), [S, x] = L(t?.dataType ?
|
|
4448
|
+
const [v, T] = L(d), [F, A] = L(!1), [S, x] = L(t?.dataType ? Wt(t) : void 0), C = Object.entries(kt).concat(Object.entries(w)), j = k ? C.filter(([Q, ee]) => !se(ee.property) && ee.property?.dataType !== "array") : C, Z = fa(t), q = Ge(null), M = Ge(t), he = "id", Ce = f && N(a, "selectedWidget");
|
|
4456
4449
|
de(() => {
|
|
4457
|
-
!N(r, he) && l && t?.name && s(he,
|
|
4450
|
+
!N(r, he) && l && t?.name && s(he, Gt(t.name));
|
|
4458
4451
|
}, [l, r, t?.name]), de(() => {
|
|
4459
4452
|
if (u && (!m || Z.id)) {
|
|
4460
4453
|
const {
|
|
@@ -4471,13 +4464,13 @@ function Ki({
|
|
|
4471
4464
|
t?.id && g && Object.keys(a).length > 0 && g(t?.id, p, a);
|
|
4472
4465
|
}, [a, g, p, t?.id]);
|
|
4473
4466
|
const ie = (Q) => {
|
|
4474
|
-
x(Q), i(
|
|
4467
|
+
x(Q), i(oa(t, Q, w)), setTimeout(() => {
|
|
4475
4468
|
q.current?.focus();
|
|
4476
4469
|
}, 0);
|
|
4477
4470
|
};
|
|
4478
4471
|
let R;
|
|
4479
4472
|
return S === "text_field" || S === "multiline" || S === "markdown" || S === "url" || S === "email" ? R = /* @__PURE__ */ e(
|
|
4480
|
-
|
|
4473
|
+
Ei,
|
|
4481
4474
|
{
|
|
4482
4475
|
widgetId: S,
|
|
4483
4476
|
disabled: y,
|
|
@@ -4517,8 +4510,8 @@ function Ki({
|
|
|
4517
4510
|
multiple: !0,
|
|
4518
4511
|
disabled: y
|
|
4519
4512
|
}
|
|
4520
|
-
) : S === "switch" ? R = /* @__PURE__ */ e(
|
|
4521
|
-
|
|
4513
|
+
) : S === "switch" ? R = /* @__PURE__ */ e(Bi, { disabled: y }) : S === "number_input" ? R = /* @__PURE__ */ e(Ri, { disabled: y }) : S === "group" ? R = /* @__PURE__ */ e(
|
|
4514
|
+
zi,
|
|
4522
4515
|
{
|
|
4523
4516
|
disabled: y,
|
|
4524
4517
|
getData: O,
|
|
@@ -4527,7 +4520,7 @@ function Ki({
|
|
|
4527
4520
|
customFields: w
|
|
4528
4521
|
}
|
|
4529
4522
|
) : S === "block" ? R = /* @__PURE__ */ e(
|
|
4530
|
-
|
|
4523
|
+
Mi,
|
|
4531
4524
|
{
|
|
4532
4525
|
disabled: y,
|
|
4533
4526
|
getData: O,
|
|
@@ -4543,7 +4536,7 @@ function Ki({
|
|
|
4543
4536
|
multiple: !1,
|
|
4544
4537
|
disabled: y
|
|
4545
4538
|
}
|
|
4546
|
-
) : S === "date_time" ? R = /* @__PURE__ */ e(
|
|
4539
|
+
) : S === "date_time" ? R = /* @__PURE__ */ e(Li, { disabled: y }) : S === "multi_references" ? R = /* @__PURE__ */ e(
|
|
4547
4540
|
Bt,
|
|
4548
4541
|
{
|
|
4549
4542
|
showErrors: f,
|
|
@@ -4552,7 +4545,7 @@ function Ki({
|
|
|
4552
4545
|
disabled: y
|
|
4553
4546
|
}
|
|
4554
4547
|
) : S === "repeat" ? R = /* @__PURE__ */ e(
|
|
4555
|
-
|
|
4548
|
+
Ti,
|
|
4556
4549
|
{
|
|
4557
4550
|
showErrors: f,
|
|
4558
4551
|
existing: o,
|
|
@@ -4562,8 +4555,8 @@ function Ki({
|
|
|
4562
4555
|
collectionEditable: b,
|
|
4563
4556
|
customFields: w
|
|
4564
4557
|
}
|
|
4565
|
-
) : S === "key_value" ? R = /* @__PURE__ */ e(
|
|
4566
|
-
y && /* @__PURE__ */ n(
|
|
4558
|
+
) : S === "key_value" ? R = /* @__PURE__ */ e(Yi, { disabled: y }) : R = null, /* @__PURE__ */ n(B, { children: [
|
|
4559
|
+
y && /* @__PURE__ */ n(Zt, { mode: "warn", children: [
|
|
4567
4560
|
/* @__PURE__ */ e(P, { children: "This property can't be edited" }),
|
|
4568
4561
|
/* @__PURE__ */ n(P, { variant: "caption", children: [
|
|
4569
4562
|
"You may not have permission to edit it or it is defined in code with no ",
|
|
@@ -4621,7 +4614,7 @@ function Ki({
|
|
|
4621
4614
|
children: j.map(([Q, ee]) => {
|
|
4622
4615
|
const pe = ee.property, me = o && !se(pe) && pe.dataType !== t?.dataType;
|
|
4623
4616
|
return /* @__PURE__ */ e(
|
|
4624
|
-
|
|
4617
|
+
na,
|
|
4625
4618
|
{
|
|
4626
4619
|
value: Q,
|
|
4627
4620
|
optionDisabled: me,
|
|
@@ -4656,7 +4649,7 @@ function Ki({
|
|
|
4656
4649
|
] }),
|
|
4657
4650
|
/* @__PURE__ */ n("div", { className: "grid grid-cols-12 gap-y-12 mt-8 mb-8", children: [
|
|
4658
4651
|
m && /* @__PURE__ */ e(
|
|
4659
|
-
|
|
4652
|
+
Vi,
|
|
4660
4653
|
{
|
|
4661
4654
|
showErrors: f,
|
|
4662
4655
|
disabledId: o,
|
|
@@ -4667,7 +4660,7 @@ function Ki({
|
|
|
4667
4660
|
}
|
|
4668
4661
|
),
|
|
4669
4662
|
R,
|
|
4670
|
-
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(
|
|
4663
|
+
/* @__PURE__ */ e("div", { className: "col-span-12", children: /* @__PURE__ */ e(Ki, { disabled: y }) })
|
|
4671
4664
|
] }),
|
|
4672
4665
|
c && /* @__PURE__ */ e(
|
|
4673
4666
|
pt,
|
|
@@ -4685,11 +4678,11 @@ function Ki({
|
|
|
4685
4678
|
)
|
|
4686
4679
|
] });
|
|
4687
4680
|
}
|
|
4688
|
-
function
|
|
4681
|
+
function Hi(t) {
|
|
4689
4682
|
return (t.slice(0, 1).toLowerCase() + t.slice(1)).replace(/([-_ ]){1,}/g, " ").split(/[-_ ]/).reduce((a, r) => a + r[0].toUpperCase() + r.substring(1));
|
|
4690
4683
|
}
|
|
4691
|
-
function
|
|
4692
|
-
const i = "const " +
|
|
4684
|
+
function Ji({ collection: t, onOpenChange: a, open: r }) {
|
|
4685
|
+
const i = Ue(), s = "const " + Hi(t.name) + "Collection = " + ni.stringify(la(t), null, " ");
|
|
4693
4686
|
return /* @__PURE__ */ n(
|
|
4694
4687
|
Ie,
|
|
4695
4688
|
{
|
|
@@ -4715,21 +4708,67 @@ function Hi({ collection: t, onOpenChange: a, open: r }) {
|
|
|
4715
4708
|
"."
|
|
4716
4709
|
] }),
|
|
4717
4710
|
/* @__PURE__ */ e(
|
|
4718
|
-
|
|
4711
|
+
si,
|
|
4719
4712
|
{
|
|
4720
|
-
theme:
|
|
4721
|
-
code:
|
|
4713
|
+
theme: li.vsDark,
|
|
4714
|
+
code: s,
|
|
4722
4715
|
language: "typescript",
|
|
4723
|
-
children: ({ className:
|
|
4716
|
+
children: ({ className: o, style: l, tokens: d, getLineProps: m, getTokenProps: u }) => /* @__PURE__ */ e("pre", { style: l, className: "p-4 rounded text-sm", children: d.map((c, p) => /* @__PURE__ */ e("div", { ...m({ line: c }), children: c.map((g, f) => /* @__PURE__ */ e("span", { ...u({ token: g }) }, f)) }, p)) })
|
|
4724
4717
|
}
|
|
4725
4718
|
)
|
|
4726
4719
|
] }),
|
|
4727
|
-
/* @__PURE__ */
|
|
4720
|
+
/* @__PURE__ */ n(Re, { children: [
|
|
4721
|
+
/* @__PURE__ */ n(
|
|
4722
|
+
E,
|
|
4723
|
+
{
|
|
4724
|
+
variant: "text",
|
|
4725
|
+
size: "small",
|
|
4726
|
+
onClick: (o) => (o.stopPropagation(), o.preventDefault(), i.open({
|
|
4727
|
+
type: "success",
|
|
4728
|
+
message: "Copied}"
|
|
4729
|
+
}), navigator.clipboard.writeText(s)),
|
|
4730
|
+
children: [
|
|
4731
|
+
/* @__PURE__ */ e(Fa, { size: "small" }),
|
|
4732
|
+
"Copy to clipboard"
|
|
4733
|
+
]
|
|
4734
|
+
}
|
|
4735
|
+
),
|
|
4736
|
+
/* @__PURE__ */ e(E, { onClick: () => a(!1), children: "Close" })
|
|
4737
|
+
] })
|
|
4728
4738
|
]
|
|
4729
4739
|
}
|
|
4730
4740
|
);
|
|
4731
4741
|
}
|
|
4732
|
-
function
|
|
4742
|
+
function la(t) {
|
|
4743
|
+
const a = (r) => {
|
|
4744
|
+
const i = {
|
|
4745
|
+
...r
|
|
4746
|
+
};
|
|
4747
|
+
return delete i.fromBuilder, delete i.resolved, delete i.propertiesOrder, delete i.editable, i.type === "map" ? {
|
|
4748
|
+
...i,
|
|
4749
|
+
properties: i.properties.map(a)
|
|
4750
|
+
} : i;
|
|
4751
|
+
};
|
|
4752
|
+
return {
|
|
4753
|
+
name: t.name,
|
|
4754
|
+
singularName: t.singularName,
|
|
4755
|
+
description: t.description,
|
|
4756
|
+
path: t.path,
|
|
4757
|
+
editable: !0,
|
|
4758
|
+
collectionGroup: t.collectionGroup,
|
|
4759
|
+
alias: t.alias,
|
|
4760
|
+
icon: t.icon,
|
|
4761
|
+
group: t.group,
|
|
4762
|
+
customId: t.customId,
|
|
4763
|
+
initialFilter: t.initialFilter,
|
|
4764
|
+
initialSort: t.initialSort,
|
|
4765
|
+
properties: Object.entries(t.properties).map(([r, i]) => ({
|
|
4766
|
+
[r]: a(i)
|
|
4767
|
+
})).reduce((r, i) => ({ ...r, ...i }), {}),
|
|
4768
|
+
subcollections: (t.subcollections ?? []).map(la)
|
|
4769
|
+
};
|
|
4770
|
+
}
|
|
4771
|
+
function Qi({
|
|
4733
4772
|
showErrors: t,
|
|
4734
4773
|
isNewCollection: a,
|
|
4735
4774
|
propertyErrorsRef: r,
|
|
@@ -4750,13 +4789,13 @@ function Gi({
|
|
|
4750
4789
|
setFieldTouched: k,
|
|
4751
4790
|
errors: _,
|
|
4752
4791
|
dirty: O
|
|
4753
|
-
} = K(), h =
|
|
4792
|
+
} = K(), h = Ue(), w = Ia("lg"), b = !w, [v, T] = L(), [F, A] = L(), [S, x] = L(), C = F ? ne(F, S) : void 0, j = C ? N(g.properties, C.replaceAll(".", ".properties.")) : void 0, [Z, q] = L(!1), [M, he] = L(!1), [Ce, ie] = L(!1), [R, Q] = L([]), ee = D.useRef(g.propertiesOrder ? { "": g.propertiesOrder } : {});
|
|
4754
4793
|
de(() => {
|
|
4755
4794
|
s && s(O);
|
|
4756
4795
|
}, [O]);
|
|
4757
4796
|
const pe = u ? () => {
|
|
4758
4797
|
u && (he(!0), u(g).then((V) => {
|
|
4759
|
-
if (V &&
|
|
4798
|
+
if (V && Xt(V.properties), !V) {
|
|
4760
4799
|
h.open({
|
|
4761
4800
|
type: "error",
|
|
4762
4801
|
message: "Could not infer properties from data"
|
|
@@ -4771,25 +4810,25 @@ function Gi({
|
|
|
4771
4810
|
});
|
|
4772
4811
|
return;
|
|
4773
4812
|
}
|
|
4774
|
-
const
|
|
4813
|
+
const G = {
|
|
4775
4814
|
...I.reduce((oe, ye) => (oe[ye] = V.properties[ye], oe), {}),
|
|
4776
4815
|
...g.properties
|
|
4777
4816
|
}, ce = [
|
|
4778
4817
|
...I,
|
|
4779
4818
|
...g.propertiesOrder ?? []
|
|
4780
4819
|
];
|
|
4781
|
-
f("properties",
|
|
4820
|
+
f("properties", G, !1), ge(ce), Q(I);
|
|
4782
4821
|
}).finally(() => {
|
|
4783
4822
|
he(!1);
|
|
4784
4823
|
}));
|
|
4785
4824
|
} : void 0, me = (V) => V ? ee.current[V] ?? N(g, Ne(V)) : ee.current[""], ge = (V, I) => {
|
|
4786
|
-
const
|
|
4787
|
-
f(
|
|
4825
|
+
const G = Ne(I);
|
|
4826
|
+
f(G, V, !1), ee.current[I ?? ""] = V;
|
|
4788
4827
|
}, fe = (V, I) => {
|
|
4789
|
-
const
|
|
4790
|
-
if (!
|
|
4828
|
+
const G = V ? ne(V, I) : void 0;
|
|
4829
|
+
if (!G)
|
|
4791
4830
|
throw Error("collection editor miss config");
|
|
4792
|
-
f(ke(
|
|
4831
|
+
f(ke(G), void 0, !1);
|
|
4793
4832
|
const oe = me(I).filter((ye) => ye !== V);
|
|
4794
4833
|
ge(oe, I), ie(!1), T(void 0), A(void 0), x(void 0);
|
|
4795
4834
|
}, X = (V, I) => {
|
|
@@ -4807,38 +4846,38 @@ function Gi({
|
|
|
4807
4846
|
...g.properties ?? {},
|
|
4808
4847
|
[V]: I
|
|
4809
4848
|
}, !1);
|
|
4810
|
-
const
|
|
4849
|
+
const G = [...g.propertiesOrder ?? Object.keys(g.properties), V];
|
|
4811
4850
|
console.log("onPropertyCreated", {
|
|
4812
4851
|
id: V,
|
|
4813
4852
|
property: I,
|
|
4814
|
-
newPropertiesOrder:
|
|
4815
|
-
}), ge(
|
|
4853
|
+
newPropertiesOrder: G
|
|
4854
|
+
}), ge(G), ie(!1), w && (T(G.indexOf(V)), A(V)), x(void 0);
|
|
4816
4855
|
}, Xe = ({
|
|
4817
4856
|
id: V,
|
|
4818
4857
|
property: I,
|
|
4819
|
-
previousId:
|
|
4858
|
+
previousId: G,
|
|
4820
4859
|
namespace: ce
|
|
4821
4860
|
}) => {
|
|
4822
4861
|
const oe = V ? ne(V, ce) : void 0, ye = oe ? ke(oe) : void 0;
|
|
4823
|
-
if (
|
|
4824
|
-
const at = ne(
|
|
4862
|
+
if (G && G !== V) {
|
|
4863
|
+
const at = ne(G, ce), W = ke(at), ve = me(ce).map((it) => it === G ? V : it).filter((it) => it !== void 0);
|
|
4825
4864
|
ge(ve, ce), V && (T(ve.indexOf(V)), A(V)), f(W, void 0, !1), k(W, !1, !1);
|
|
4826
4865
|
}
|
|
4827
4866
|
ye && (f(ye, I, !1), k(ye, !0, !1));
|
|
4828
|
-
}, et = (V, I,
|
|
4867
|
+
}, et = (V, I, G) => {
|
|
4829
4868
|
const ce = V ? ne(V, I) : void 0;
|
|
4830
4869
|
if (console.warn("onPropertyErrorInternal", {
|
|
4831
4870
|
id: V,
|
|
4832
4871
|
namespace: I,
|
|
4833
|
-
error:
|
|
4872
|
+
error: G,
|
|
4834
4873
|
propertyPath: ce
|
|
4835
4874
|
}), ce) {
|
|
4836
|
-
const oe =
|
|
4837
|
-
i(V, I, oe ?
|
|
4875
|
+
const oe = G && Object.keys(G).length > 0;
|
|
4876
|
+
i(V, I, oe ? G : void 0), y(ke(ce), oe ? "Property error" : void 0);
|
|
4838
4877
|
}
|
|
4839
4878
|
}, z = () => {
|
|
4840
4879
|
T(void 0), A(void 0);
|
|
4841
|
-
}, Y = F && r?.current?.properties ? r.current.properties[F] : void 0, U = g?.propertiesOrder === void 0 || g.propertiesOrder.length === 0,
|
|
4880
|
+
}, Y = F && r?.current?.properties ? r.current.properties[F] : void 0, U = g?.propertiesOrder === void 0 || g.propertiesOrder.length === 0, Ke = g.propertiesOrder ? g.propertiesOrder : Object.keys(g.properties), tt = $t(() => d(g.ownerId), [d, g.ownerId]), Te = /* @__PURE__ */ n("div", { className: "grid grid-cols-12 gap-2 h-full bg-gray-50 dark:bg-gray-900", children: [
|
|
4842
4881
|
/* @__PURE__ */ n("div", { className: xe(
|
|
4843
4882
|
"p-4 md:p-8 pb-20 md:pb-20",
|
|
4844
4883
|
"col-span-12 lg:col-span-5 h-full overflow-auto",
|
|
@@ -4850,7 +4889,7 @@ function Gi({
|
|
|
4850
4889
|
be,
|
|
4851
4890
|
{
|
|
4852
4891
|
name: "name",
|
|
4853
|
-
as:
|
|
4892
|
+
as: H,
|
|
4854
4893
|
invisible: !0,
|
|
4855
4894
|
className: "-ml-1",
|
|
4856
4895
|
inputClassName: "text-2xl font-headers",
|
|
@@ -4875,13 +4914,13 @@ function Gi({
|
|
|
4875
4914
|
] }),
|
|
4876
4915
|
l && /* @__PURE__ */ e("div", { className: "ml-4", children: l }),
|
|
4877
4916
|
/* @__PURE__ */ n("div", { className: "ml-1 mt-2 flex flex-row gap-2", children: [
|
|
4878
|
-
/* @__PURE__ */ e(ae, { title: "Get the code
|
|
4917
|
+
/* @__PURE__ */ e(ae, { title: "Get the code for this collection", children: /* @__PURE__ */ e(
|
|
4879
4918
|
re,
|
|
4880
4919
|
{
|
|
4881
4920
|
variant: "filled",
|
|
4882
4921
|
disabled: M,
|
|
4883
4922
|
onClick: () => q(!0),
|
|
4884
|
-
children: /* @__PURE__ */ e(
|
|
4923
|
+
children: /* @__PURE__ */ e(Ea, {})
|
|
4885
4924
|
}
|
|
4886
4925
|
) }),
|
|
4887
4926
|
pe && /* @__PURE__ */ e(ae, { title: "Add new properties based on data", children: /* @__PURE__ */ e(
|
|
@@ -4890,7 +4929,7 @@ function Gi({
|
|
|
4890
4929
|
variant: "filled",
|
|
4891
4930
|
disabled: M,
|
|
4892
4931
|
onClick: pe,
|
|
4893
|
-
children: M ? /* @__PURE__ */ e(
|
|
4932
|
+
children: M ? /* @__PURE__ */ e(Qe, { size: "small" }) : /* @__PURE__ */ e(ht, {})
|
|
4894
4933
|
}
|
|
4895
4934
|
) }),
|
|
4896
4935
|
/* @__PURE__ */ e(ae, { title: "Add new property", children: /* @__PURE__ */ e(
|
|
@@ -4908,13 +4947,13 @@ function Gi({
|
|
|
4908
4947
|
{
|
|
4909
4948
|
className: "pl-8",
|
|
4910
4949
|
onPropertyClick: (V, I) => {
|
|
4911
|
-
T(
|
|
4950
|
+
T(Ke.indexOf(V)), A(V), x(I);
|
|
4912
4951
|
},
|
|
4913
4952
|
inferredPropertyKeys: R,
|
|
4914
4953
|
selectedPropertyKey: F ? ne(F, S) : void 0,
|
|
4915
4954
|
properties: g.properties,
|
|
4916
4955
|
additionalFields: g.additionalFields,
|
|
4917
|
-
propertiesOrder:
|
|
4956
|
+
propertiesOrder: Ke,
|
|
4918
4957
|
onPropertyMove: X,
|
|
4919
4958
|
onPropertyRemove: a ? fe : void 0,
|
|
4920
4959
|
collectionEditable: p,
|
|
@@ -4940,7 +4979,7 @@ function Gi({
|
|
|
4940
4979
|
className: "sticky top-8 p-4 min-h-full border border-transparent w-full flex flex-col justify-center ",
|
|
4941
4980
|
children: [
|
|
4942
4981
|
C && j && !se(j) && /* @__PURE__ */ e(
|
|
4943
|
-
|
|
4982
|
+
sa,
|
|
4944
4983
|
{
|
|
4945
4984
|
inArray: !1,
|
|
4946
4985
|
existingProperty: !a,
|
|
@@ -5012,7 +5051,7 @@ function Gi({
|
|
|
5012
5051
|
}
|
|
5013
5052
|
),
|
|
5014
5053
|
/* @__PURE__ */ e(
|
|
5015
|
-
|
|
5054
|
+
Ji,
|
|
5016
5055
|
{
|
|
5017
5056
|
collection: g,
|
|
5018
5057
|
open: Z,
|
|
@@ -5021,7 +5060,7 @@ function Gi({
|
|
|
5021
5060
|
)
|
|
5022
5061
|
] });
|
|
5023
5062
|
}
|
|
5024
|
-
function
|
|
5063
|
+
function Wi({
|
|
5025
5064
|
open: t,
|
|
5026
5065
|
handleOk: a,
|
|
5027
5066
|
handleCancel: r,
|
|
@@ -5049,7 +5088,7 @@ function Ji({
|
|
|
5049
5088
|
}
|
|
5050
5089
|
);
|
|
5051
5090
|
}
|
|
5052
|
-
function
|
|
5091
|
+
function Zi({ open: t, onClose: a }) {
|
|
5053
5092
|
const { entityViews: r } = Ae();
|
|
5054
5093
|
return /* @__PURE__ */ n(
|
|
5055
5094
|
Ie,
|
|
@@ -5080,7 +5119,7 @@ function Qi({ open: t, onClose: a }) {
|
|
|
5080
5119
|
}
|
|
5081
5120
|
);
|
|
5082
5121
|
}
|
|
5083
|
-
function
|
|
5122
|
+
function Xi({
|
|
5084
5123
|
collection: t,
|
|
5085
5124
|
parentCollection: a,
|
|
5086
5125
|
configController: r,
|
|
@@ -5091,7 +5130,7 @@ function Wi({
|
|
|
5091
5130
|
const { entityViews: l } = Ae(), [d, m] = D.useState(), [u, c] = D.useState(!1), [p, g] = D.useState(), [f, y] = D.useState(), {
|
|
5092
5131
|
values: k,
|
|
5093
5132
|
setFieldValue: _
|
|
5094
|
-
} = K(), O = t.subcollections ?? [], h = k.entityViews?.filter((v) => typeof v == "string").map((v) =>
|
|
5133
|
+
} = K(), O = t.subcollections ?? [], h = k.entityViews?.filter((v) => typeof v == "string").map((v) => Ba(v, l)).filter(Boolean) ?? [], w = t.entityViews?.filter((v) => typeof v != "string") ?? [], b = h.length + w.length;
|
|
5095
5134
|
return /* @__PURE__ */ n("div", { className: "overflow-auto my-auto", children: [
|
|
5096
5135
|
/* @__PURE__ */ e(ut, { maxWidth: "2xl", className: "flex flex-col gap-4 p-8 m-auto", children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-16", children: [
|
|
5097
5136
|
/* @__PURE__ */ n("div", { className: "flex-grow flex flex-col gap-4 items-start", children: [
|
|
@@ -5108,14 +5147,14 @@ function Wi({
|
|
|
5108
5147
|
}),
|
|
5109
5148
|
children: [
|
|
5110
5149
|
/* @__PURE__ */ e(
|
|
5111
|
-
|
|
5150
|
+
Ye,
|
|
5112
5151
|
{
|
|
5113
5152
|
align: "left",
|
|
5114
5153
|
children: /* @__PURE__ */ e(P, { variant: "subtitle2", className: "flex-grow", children: v.name })
|
|
5115
5154
|
}
|
|
5116
5155
|
),
|
|
5117
5156
|
/* @__PURE__ */ e(
|
|
5118
|
-
|
|
5157
|
+
Ye,
|
|
5119
5158
|
{
|
|
5120
5159
|
align: "right",
|
|
5121
5160
|
children: /* @__PURE__ */ e(ae, { title: "Remove", children: /* @__PURE__ */ e(
|
|
@@ -5154,14 +5193,14 @@ function Wi({
|
|
|
5154
5193
|
b > 0 && /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(Se, { className: "flex flex-col gap-4 p-2 w-full", children: /* @__PURE__ */ e(Tt, { children: /* @__PURE__ */ n(Vt, { children: [
|
|
5155
5194
|
h.map((v) => /* @__PURE__ */ n(bt, { children: [
|
|
5156
5195
|
/* @__PURE__ */ e(
|
|
5157
|
-
|
|
5196
|
+
Ye,
|
|
5158
5197
|
{
|
|
5159
5198
|
align: "left",
|
|
5160
5199
|
children: /* @__PURE__ */ e(P, { variant: "subtitle2", className: "flex-grow", children: v.name })
|
|
5161
5200
|
}
|
|
5162
5201
|
),
|
|
5163
5202
|
/* @__PURE__ */ e(
|
|
5164
|
-
|
|
5203
|
+
Ye,
|
|
5165
5204
|
{
|
|
5166
5205
|
align: "right",
|
|
5167
5206
|
children: /* @__PURE__ */ e(ae, { title: "Remove", children: /* @__PURE__ */ e(
|
|
@@ -5179,7 +5218,7 @@ function Wi({
|
|
|
5179
5218
|
)
|
|
5180
5219
|
] }, v.key)),
|
|
5181
5220
|
w.map((v) => /* @__PURE__ */ e(bt, { children: /* @__PURE__ */ n(
|
|
5182
|
-
|
|
5221
|
+
Ye,
|
|
5183
5222
|
{
|
|
5184
5223
|
align: "left",
|
|
5185
5224
|
children: [
|
|
@@ -5192,7 +5231,7 @@ function Wi({
|
|
|
5192
5231
|
}
|
|
5193
5232
|
) }, v.key))
|
|
5194
5233
|
] }) }) }) }),
|
|
5195
|
-
b === 0 && /* @__PURE__ */ e(
|
|
5234
|
+
b === 0 && /* @__PURE__ */ e(Zt, { children: "COMING SOON: You can define your own custom views by uploading it with the CLI" }),
|
|
5196
5235
|
/* @__PURE__ */ e(
|
|
5197
5236
|
E,
|
|
5198
5237
|
{
|
|
@@ -5258,7 +5297,7 @@ function Wi({
|
|
|
5258
5297
|
}
|
|
5259
5298
|
),
|
|
5260
5299
|
/* @__PURE__ */ e(
|
|
5261
|
-
|
|
5300
|
+
Zi,
|
|
5262
5301
|
{
|
|
5263
5302
|
open: u,
|
|
5264
5303
|
onClose: (v) => {
|
|
@@ -5497,7 +5536,7 @@ const Mt = {
|
|
|
5497
5536
|
}
|
|
5498
5537
|
}
|
|
5499
5538
|
};
|
|
5500
|
-
function
|
|
5539
|
+
function er({
|
|
5501
5540
|
path: t,
|
|
5502
5541
|
pathSuggestions: a,
|
|
5503
5542
|
parentCollection: r,
|
|
@@ -5544,7 +5583,7 @@ function Zi({
|
|
|
5544
5583
|
}
|
|
5545
5584
|
),
|
|
5546
5585
|
/* @__PURE__ */ n("div", { className: "flex flex-wrap gap-x-2 gap-y-1 items-center my-2 min-h-7", children: [
|
|
5547
|
-
o && !d && /* @__PURE__ */ e(
|
|
5586
|
+
o && !d && /* @__PURE__ */ e(Qe, { size: "small" }),
|
|
5548
5587
|
d?.map((h, w) => /* @__PURE__ */ e(
|
|
5549
5588
|
ct,
|
|
5550
5589
|
{
|
|
@@ -5615,7 +5654,7 @@ function Zi({
|
|
|
5615
5654
|
children: "● Create a collection from a file (csv, json, xls, xslx...)"
|
|
5616
5655
|
}
|
|
5617
5656
|
),
|
|
5618
|
-
/* @__PURE__ */ e(
|
|
5657
|
+
/* @__PURE__ */ e(ci, { onDataAdded: (h) => i(h) })
|
|
5619
5658
|
] }),
|
|
5620
5659
|
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(E, { variant: "text", onClick: () => i(), className: "my-2", children: "Continue from scratch" }) })
|
|
5621
5660
|
] }) });
|
|
@@ -5627,7 +5666,7 @@ function wt({
|
|
|
5627
5666
|
onClick: i
|
|
5628
5667
|
}) {
|
|
5629
5668
|
return /* @__PURE__ */ e(ae, { title: a, children: /* @__PURE__ */ n(
|
|
5630
|
-
|
|
5669
|
+
ea,
|
|
5631
5670
|
{
|
|
5632
5671
|
onClick: i,
|
|
5633
5672
|
className: xe(
|
|
@@ -5651,7 +5690,7 @@ function wt({
|
|
|
5651
5690
|
}
|
|
5652
5691
|
) });
|
|
5653
5692
|
}
|
|
5654
|
-
const
|
|
5693
|
+
const tr = [
|
|
5655
5694
|
"text_field",
|
|
5656
5695
|
"multiline",
|
|
5657
5696
|
"markdown",
|
|
@@ -5672,10 +5711,10 @@ const Xi = [
|
|
|
5672
5711
|
"date_time",
|
|
5673
5712
|
"repeat",
|
|
5674
5713
|
"block"
|
|
5675
|
-
],
|
|
5676
|
-
([t]) =>
|
|
5714
|
+
], ar = Object.entries(kt).filter(
|
|
5715
|
+
([t]) => tr.includes(t)
|
|
5677
5716
|
);
|
|
5678
|
-
function
|
|
5717
|
+
function ir({
|
|
5679
5718
|
importConfig: t,
|
|
5680
5719
|
customFields: a,
|
|
5681
5720
|
collectionEditable: r
|
|
@@ -5710,7 +5749,7 @@ function tr({
|
|
|
5710
5749
|
namespace: _
|
|
5711
5750
|
}) => {
|
|
5712
5751
|
const O = f ? ne(f, _) : void 0, h = O ? ke(O) : void 0, w = t.importData.map((v) => N(v, y)), b = {
|
|
5713
|
-
...
|
|
5752
|
+
...ti(w, k, aa),
|
|
5714
5753
|
editable: !0
|
|
5715
5754
|
};
|
|
5716
5755
|
h && (b ? (console.log("updating inferredNewProperty", {
|
|
@@ -5722,7 +5761,7 @@ function tr({
|
|
|
5722
5761
|
/* @__PURE__ */ n(ut, { maxWidth: "6xl", className: "flex flex-col gap-4 p-8 m-auto", children: [
|
|
5723
5762
|
/* @__PURE__ */ e(P, { variant: "h6", className: "mt-4", children: "Data property mapping" }),
|
|
5724
5763
|
/* @__PURE__ */ e(
|
|
5725
|
-
|
|
5764
|
+
di,
|
|
5726
5765
|
{
|
|
5727
5766
|
headersMapping: t.headersMapping,
|
|
5728
5767
|
idColumn: t.idColumn,
|
|
@@ -5734,7 +5773,7 @@ function tr({
|
|
|
5734
5773
|
propertyKey: y,
|
|
5735
5774
|
importKey: k
|
|
5736
5775
|
}) => /* @__PURE__ */ e(
|
|
5737
|
-
|
|
5776
|
+
pi,
|
|
5738
5777
|
{
|
|
5739
5778
|
property: f,
|
|
5740
5779
|
propertyKey: y,
|
|
@@ -5747,7 +5786,7 @@ function tr({
|
|
|
5747
5786
|
});
|
|
5748
5787
|
},
|
|
5749
5788
|
propertyTypeView: /* @__PURE__ */ e(
|
|
5750
|
-
|
|
5789
|
+
rr,
|
|
5751
5790
|
{
|
|
5752
5791
|
property: f,
|
|
5753
5792
|
disabled: !1,
|
|
@@ -5789,14 +5828,14 @@ function tr({
|
|
|
5789
5828
|
/* @__PURE__ */ e("div", { style: { height: "52px" } })
|
|
5790
5829
|
] });
|
|
5791
5830
|
}
|
|
5792
|
-
function
|
|
5831
|
+
function rr({
|
|
5793
5832
|
property: t,
|
|
5794
5833
|
onPropertyChanged: a,
|
|
5795
5834
|
propertyKey: r,
|
|
5796
5835
|
customFields: i,
|
|
5797
5836
|
disabled: s
|
|
5798
5837
|
}) {
|
|
5799
|
-
const { fields: o } = Ae(), l = t ?
|
|
5838
|
+
const { fields: o } = Ae(), l = t ? Wt(t) : null, d = t ? We(t, o) : null, [m, u] = L(!1);
|
|
5800
5839
|
return /* @__PURE__ */ e(
|
|
5801
5840
|
ae,
|
|
5802
5841
|
{
|
|
@@ -5816,7 +5855,7 @@ function ar({
|
|
|
5816
5855
|
position: "item-aligned",
|
|
5817
5856
|
renderValue: (c) => d ? /* @__PURE__ */ e(Ze, { propertyConfig: d }) : null,
|
|
5818
5857
|
onValueChange: (c) => {
|
|
5819
|
-
const p =
|
|
5858
|
+
const p = oa(t, c, i);
|
|
5820
5859
|
r && (a({
|
|
5821
5860
|
id: r,
|
|
5822
5861
|
property: p,
|
|
@@ -5824,8 +5863,8 @@ function ar({
|
|
|
5824
5863
|
namespace: void 0
|
|
5825
5864
|
}), console.log("newSelectedWidgetId", c));
|
|
5826
5865
|
},
|
|
5827
|
-
children:
|
|
5828
|
-
|
|
5866
|
+
children: ar.map(([c, p]) => /* @__PURE__ */ e(
|
|
5867
|
+
na,
|
|
5829
5868
|
{
|
|
5830
5869
|
value: c,
|
|
5831
5870
|
optionDisabled: !1,
|
|
@@ -5839,14 +5878,14 @@ function ar({
|
|
|
5839
5878
|
}
|
|
5840
5879
|
);
|
|
5841
5880
|
}
|
|
5842
|
-
function
|
|
5881
|
+
function or({ importConfig: t, properties: a, propertiesOrder: r }) {
|
|
5843
5882
|
de(() => {
|
|
5844
|
-
const s =
|
|
5883
|
+
const s = mi(t.originProperties, a), o = t.importData.map((l) => ui(l, t.idColumn, t.headersMapping, a, s, "TEMP_PATH"));
|
|
5845
5884
|
t.setEntities(o), console.log("res", { propertiesMapping: s, mappedData: o });
|
|
5846
5885
|
}, []);
|
|
5847
|
-
const i =
|
|
5886
|
+
const i = Ma();
|
|
5848
5887
|
return /* @__PURE__ */ e(
|
|
5849
|
-
|
|
5888
|
+
Da,
|
|
5850
5889
|
{
|
|
5851
5890
|
title: /* @__PURE__ */ n("div", { children: [
|
|
5852
5891
|
/* @__PURE__ */ e(P, { variant: "subtitle2", children: "Imported data preview" }),
|
|
@@ -5868,7 +5907,7 @@ function ir({ importConfig: t, properties: a, propertiesOrder: r }) {
|
|
|
5868
5907
|
}
|
|
5869
5908
|
function ca(t, a = "") {
|
|
5870
5909
|
const r = Object.keys(t).reduce((o, l) => {
|
|
5871
|
-
const d = t[l], m =
|
|
5910
|
+
const d = t[l], m = Ra(l), u = a ? `${a}.${m}` : m;
|
|
5872
5911
|
if (d.dataType === "map" && d.properties) {
|
|
5873
5912
|
const g = ca(d.properties, u);
|
|
5874
5913
|
return {
|
|
@@ -5915,7 +5954,7 @@ function da(t) {
|
|
|
5915
5954
|
onOpenChange: (d) => d ? void 0 : l(),
|
|
5916
5955
|
children: [
|
|
5917
5956
|
a && /* @__PURE__ */ e(
|
|
5918
|
-
|
|
5957
|
+
nr,
|
|
5919
5958
|
{
|
|
5920
5959
|
...t,
|
|
5921
5960
|
handleCancel: l,
|
|
@@ -5923,7 +5962,7 @@ function da(t) {
|
|
|
5923
5962
|
}
|
|
5924
5963
|
),
|
|
5925
5964
|
/* @__PURE__ */ e(
|
|
5926
|
-
|
|
5965
|
+
Wi,
|
|
5927
5966
|
{
|
|
5928
5967
|
open: s,
|
|
5929
5968
|
handleOk: () => t.handleClose(void 0),
|
|
@@ -5935,7 +5974,7 @@ function da(t) {
|
|
|
5935
5974
|
}
|
|
5936
5975
|
);
|
|
5937
5976
|
}
|
|
5938
|
-
function
|
|
5977
|
+
function nr({
|
|
5939
5978
|
isNewCollection: t,
|
|
5940
5979
|
initialValues: a,
|
|
5941
5980
|
configController: r,
|
|
@@ -5953,15 +5992,15 @@ function rr({
|
|
|
5953
5992
|
parentCollection: y,
|
|
5954
5993
|
getData: k
|
|
5955
5994
|
}) {
|
|
5956
|
-
const { fields: _ } = Ae(), O =
|
|
5995
|
+
const { fields: _ } = Ae(), O = $e(), {
|
|
5957
5996
|
topLevelNavigation: h,
|
|
5958
5997
|
collections: w
|
|
5959
|
-
} = O, b = !a?.path && (s ?? []).length === 0, v = (y ? y.subcollections : w) ?? [], T = v.map((z) => z.path.trim().toLowerCase()), F = v.map((z) => z.alias?.trim().toLowerCase()).filter(Boolean), A =
|
|
5998
|
+
} = O, b = !a?.path && (s ?? []).length === 0, v = (y ? y.subcollections : w) ?? [], T = v.map((z) => z.path.trim().toLowerCase()), F = v.map((z) => z.alias?.trim().toLowerCase()).filter(Boolean), A = hi();
|
|
5960
5999
|
if (!h)
|
|
5961
6000
|
throw Error("Internal: Navigation not ready in collection editor");
|
|
5962
6001
|
const {
|
|
5963
6002
|
groups: S
|
|
5964
|
-
} = h, x =
|
|
6003
|
+
} = h, x = Ue(), C = Le(), j = Ge({}), Z = t ? b ? "welcome" : "details" : "properties", [q, M] = L(Z), [he, Ce] = _e.useState(), [ie, R] = _e.useState(), [Q, ee] = _e.useState(!1), [pe, me] = _e.useState();
|
|
5965
6004
|
de(() => {
|
|
5966
6005
|
try {
|
|
5967
6006
|
O.initialised && (R(i ? O.getCollectionFromPaths([...s ?? [], i]) : void 0), ee(!0));
|
|
@@ -6039,7 +6078,7 @@ function rr({
|
|
|
6039
6078
|
Pt,
|
|
6040
6079
|
{
|
|
6041
6080
|
initialValues: fe,
|
|
6042
|
-
validationSchema: (q === "properties" || q === "subcollections" || q === "details") &&
|
|
6081
|
+
validationSchema: (q === "properties" || q === "subcollections" || q === "details") && bi,
|
|
6043
6082
|
validate: () => {
|
|
6044
6083
|
if (q === "properties")
|
|
6045
6084
|
return j.current;
|
|
@@ -6049,15 +6088,15 @@ function rr({
|
|
|
6049
6088
|
values: z,
|
|
6050
6089
|
setFieldValue: Y,
|
|
6051
6090
|
isSubmitting: U,
|
|
6052
|
-
dirty:
|
|
6091
|
+
dirty: Ke,
|
|
6053
6092
|
submitCount: tt
|
|
6054
6093
|
}) => {
|
|
6055
|
-
const Te = z.path ?? i, V = o?.includes("/") ? o?.split("/").slice(0, -1).join("/") + "/" + Te : Te, I = O.resolveAliasesFrom(V),
|
|
6094
|
+
const Te = z.path ?? i, V = o?.includes("/") ? o?.split("/").slice(0, -1).join("/") + "/" + Te : Te, I = O.resolveAliasesFrom(V), G = I && k ? () => k(I) : void 0;
|
|
6056
6095
|
de(() => {
|
|
6057
|
-
p(
|
|
6058
|
-
}, [
|
|
6096
|
+
p(Ke);
|
|
6097
|
+
}, [Ke]);
|
|
6059
6098
|
function ce(W) {
|
|
6060
|
-
A.setInUse(!0),
|
|
6099
|
+
A.setInUse(!0), ai(W, aa).then((ft) => {
|
|
6061
6100
|
const ve = ca(ft);
|
|
6062
6101
|
Y("properties", ve.properties), Y("propertiesOrder", Object.keys(ve.properties)), A.setIdColumn(ve.idColumn), A.setImportData(W), A.setHeadersMapping(ve.headersMapping), A.setOriginProperties(ve.properties);
|
|
6063
6102
|
});
|
|
@@ -6071,7 +6110,7 @@ function rr({
|
|
|
6071
6110
|
}, at = ie?.editable || t;
|
|
6072
6111
|
return /* @__PURE__ */ n(B, { children: [
|
|
6073
6112
|
!t && /* @__PURE__ */ n(
|
|
6074
|
-
|
|
6113
|
+
Ua,
|
|
6075
6114
|
{
|
|
6076
6115
|
value: q,
|
|
6077
6116
|
className: xe(Ct, "justify-end bg-gray-50 dark:bg-gray-950 border-b"),
|
|
@@ -6084,7 +6123,7 @@ function rr({
|
|
|
6084
6123
|
}
|
|
6085
6124
|
),
|
|
6086
6125
|
/* @__PURE__ */ n(
|
|
6087
|
-
|
|
6126
|
+
Za,
|
|
6088
6127
|
{
|
|
6089
6128
|
noValidate: !0,
|
|
6090
6129
|
className: xe(
|
|
@@ -6095,7 +6134,7 @@ function rr({
|
|
|
6095
6134
|
q === "loading" && /* @__PURE__ */ e(jt, {}),
|
|
6096
6135
|
q === "extra_view" && Te && u?.View && /* @__PURE__ */ e(u.View, { path: Te }),
|
|
6097
6136
|
q === "welcome" && /* @__PURE__ */ e(
|
|
6098
|
-
|
|
6137
|
+
er,
|
|
6099
6138
|
{
|
|
6100
6139
|
path: Te,
|
|
6101
6140
|
onContinue: (W) => {
|
|
@@ -6107,7 +6146,7 @@ function rr({
|
|
|
6107
6146
|
}
|
|
6108
6147
|
),
|
|
6109
6148
|
q === "import_data_mapping" && A && /* @__PURE__ */ e(
|
|
6110
|
-
|
|
6149
|
+
ir,
|
|
6111
6150
|
{
|
|
6112
6151
|
importConfig: A,
|
|
6113
6152
|
collectionEditable: at,
|
|
@@ -6115,7 +6154,7 @@ function rr({
|
|
|
6115
6154
|
}
|
|
6116
6155
|
),
|
|
6117
6156
|
q === "import_data_preview" && A && /* @__PURE__ */ e(
|
|
6118
|
-
|
|
6157
|
+
or,
|
|
6119
6158
|
{
|
|
6120
6159
|
importConfig: A,
|
|
6121
6160
|
properties: z.properties,
|
|
@@ -6123,7 +6162,7 @@ function rr({
|
|
|
6123
6162
|
}
|
|
6124
6163
|
),
|
|
6125
6164
|
q === "import_data_saving" && A && /* @__PURE__ */ e(
|
|
6126
|
-
|
|
6165
|
+
gi,
|
|
6127
6166
|
{
|
|
6128
6167
|
importConfig: A,
|
|
6129
6168
|
collection: z,
|
|
@@ -6136,7 +6175,7 @@ function rr({
|
|
|
6136
6175
|
}
|
|
6137
6176
|
),
|
|
6138
6177
|
q === "details" && /* @__PURE__ */ e(
|
|
6139
|
-
|
|
6178
|
+
wi,
|
|
6140
6179
|
{
|
|
6141
6180
|
existingPaths: T,
|
|
6142
6181
|
existingAliases: F,
|
|
@@ -6146,7 +6185,7 @@ function rr({
|
|
|
6146
6185
|
}
|
|
6147
6186
|
),
|
|
6148
6187
|
q === "subcollections" && ie && /* @__PURE__ */ e(
|
|
6149
|
-
|
|
6188
|
+
Xi,
|
|
6150
6189
|
{
|
|
6151
6190
|
parentCollection: y,
|
|
6152
6191
|
configController: r,
|
|
@@ -6157,19 +6196,19 @@ function rr({
|
|
|
6157
6196
|
}
|
|
6158
6197
|
),
|
|
6159
6198
|
q === "properties" && /* @__PURE__ */ e(
|
|
6160
|
-
|
|
6199
|
+
Qi,
|
|
6161
6200
|
{
|
|
6162
6201
|
showErrors: tt > 0,
|
|
6163
6202
|
isNewCollection: t,
|
|
6164
6203
|
reservedGroups: m,
|
|
6165
6204
|
onPropertyError: (W, ft, ve) => {
|
|
6166
|
-
j.current =
|
|
6205
|
+
j.current = $a({
|
|
6167
6206
|
...j.current,
|
|
6168
6207
|
[W]: ve
|
|
6169
6208
|
}, !0);
|
|
6170
6209
|
},
|
|
6171
6210
|
getUser: f,
|
|
6172
|
-
getData:
|
|
6211
|
+
getData: G,
|
|
6173
6212
|
doCollectionInference: Oe,
|
|
6174
6213
|
customFields: _,
|
|
6175
6214
|
collectionEditable: at,
|
|
@@ -6188,7 +6227,7 @@ function rr({
|
|
|
6188
6227
|
{
|
|
6189
6228
|
position: "absolute",
|
|
6190
6229
|
children: [
|
|
6191
|
-
he && /* @__PURE__ */ e(
|
|
6230
|
+
he && /* @__PURE__ */ e(ta, { error: he }),
|
|
6192
6231
|
t && b && q === "import_data_mapping" && /* @__PURE__ */ n(
|
|
6193
6232
|
E,
|
|
6194
6233
|
{
|
|
@@ -6277,7 +6316,7 @@ function rr({
|
|
|
6277
6316
|
type: "submit",
|
|
6278
6317
|
loading: U,
|
|
6279
6318
|
disabled: U || q === "details" && !oe,
|
|
6280
|
-
startIcon: q === "properties" ? /* @__PURE__ */ e(
|
|
6319
|
+
startIcon: q === "properties" ? /* @__PURE__ */ e(La, {}) : void 0,
|
|
6281
6320
|
children: [
|
|
6282
6321
|
q === "details" && "Next",
|
|
6283
6322
|
q === "properties" && "Create collection"
|
|
@@ -6305,7 +6344,7 @@ function rr({
|
|
|
6305
6344
|
}
|
|
6306
6345
|
) });
|
|
6307
6346
|
}
|
|
6308
|
-
const pa = D.createContext({}), ma = D.createContext({}),
|
|
6347
|
+
const pa = D.createContext({}), ma = D.createContext({}), sr = D.memo(
|
|
6309
6348
|
function({
|
|
6310
6349
|
children: a,
|
|
6311
6350
|
collectionConfigController: r,
|
|
@@ -6317,7 +6356,7 @@ const pa = D.createContext({}), ma = D.createContext({}), or = D.memo(
|
|
|
6317
6356
|
getUser: m,
|
|
6318
6357
|
getData: u
|
|
6319
6358
|
}) {
|
|
6320
|
-
const c =
|
|
6359
|
+
const c = $e(), p = fi(), g = Ue(), { fields: f } = Ae(), {
|
|
6321
6360
|
collections: y
|
|
6322
6361
|
} = c, k = y.map((C) => C.path.trim().toLowerCase()), [_, O] = D.useState();
|
|
6323
6362
|
de(() => {
|
|
@@ -6483,13 +6522,13 @@ const pa = D.createContext({}), ma = D.createContext({}), or = D.memo(
|
|
|
6483
6522
|
},
|
|
6484
6523
|
mt
|
|
6485
6524
|
), Be = () => Lt(ma), ua = () => Lt(pa);
|
|
6486
|
-
function
|
|
6525
|
+
function lr({
|
|
6487
6526
|
path: t,
|
|
6488
6527
|
parentPathSegments: a,
|
|
6489
6528
|
collection: r,
|
|
6490
6529
|
tableController: i
|
|
6491
6530
|
}) {
|
|
6492
|
-
const s =
|
|
6531
|
+
const s = Le(), o = $e(), l = Be(), d = ua(), m = Ue(), u = o.getCollectionFromPaths(a), c = l.configPermissions ? l.configPermissions({
|
|
6493
6532
|
user: s.user,
|
|
6494
6533
|
collection: r
|
|
6495
6534
|
}).editCollections : !0;
|
|
@@ -6520,7 +6559,7 @@ function nr({
|
|
|
6520
6559
|
message: "Default config saved"
|
|
6521
6560
|
});
|
|
6522
6561
|
}),
|
|
6523
|
-
children: /* @__PURE__ */ e(
|
|
6562
|
+
children: /* @__PURE__ */ e(Ka, {})
|
|
6524
6563
|
}
|
|
6525
6564
|
)
|
|
6526
6565
|
}
|
|
@@ -6536,7 +6575,7 @@ function nr({
|
|
|
6536
6575
|
color: "primary",
|
|
6537
6576
|
disabled: !c,
|
|
6538
6577
|
onClick: c ? () => l?.editCollection({ path: r.path, fullPath: t, parentPathSegments: a, parentCollection: u }) : void 0,
|
|
6539
|
-
children: /* @__PURE__ */ e(
|
|
6578
|
+
children: /* @__PURE__ */ e(Je, {})
|
|
6540
6579
|
}
|
|
6541
6580
|
)
|
|
6542
6581
|
}
|
|
@@ -6546,11 +6585,11 @@ function nr({
|
|
|
6546
6585
|
function nt(t) {
|
|
6547
6586
|
return t && Object.keys(t).length === 0 ? t : t ?? null;
|
|
6548
6587
|
}
|
|
6549
|
-
function
|
|
6588
|
+
function cr({
|
|
6550
6589
|
path: t,
|
|
6551
6590
|
collection: a
|
|
6552
6591
|
}) {
|
|
6553
|
-
const r =
|
|
6592
|
+
const r = Le(), i = ua(), s = Be(), o = s.configPermissions({
|
|
6554
6593
|
user: r.user,
|
|
6555
6594
|
collection: a
|
|
6556
6595
|
}), l = J(() => {
|
|
@@ -6561,10 +6600,10 @@ function sr({
|
|
|
6561
6600
|
return /* @__PURE__ */ n(B, { children: [
|
|
6562
6601
|
/* @__PURE__ */ n("div", { children: [
|
|
6563
6602
|
o.deleteCollections && /* @__PURE__ */ e(
|
|
6564
|
-
|
|
6603
|
+
Ya,
|
|
6565
6604
|
{
|
|
6566
|
-
trigger: /* @__PURE__ */ e(re, { children: /* @__PURE__ */ e(
|
|
6567
|
-
children: /* @__PURE__ */ n(
|
|
6605
|
+
trigger: /* @__PURE__ */ e(re, { children: /* @__PURE__ */ e(Ga, { size: "small" }) }),
|
|
6606
|
+
children: /* @__PURE__ */ n(Ha, { onClick: (c) => {
|
|
6568
6607
|
c.preventDefault(), c.stopPropagation(), m(!0);
|
|
6569
6608
|
}, children: [
|
|
6570
6609
|
/* @__PURE__ */ e(dt, {}),
|
|
@@ -6578,7 +6617,7 @@ function sr({
|
|
|
6578
6617
|
onClick: (c) => {
|
|
6579
6618
|
l();
|
|
6580
6619
|
},
|
|
6581
|
-
children: /* @__PURE__ */ e(
|
|
6620
|
+
children: /* @__PURE__ */ e(Je, { size: "small" })
|
|
6582
6621
|
}
|
|
6583
6622
|
)
|
|
6584
6623
|
] }),
|
|
@@ -6598,17 +6637,17 @@ function sr({
|
|
|
6598
6637
|
)
|
|
6599
6638
|
] });
|
|
6600
6639
|
}
|
|
6601
|
-
function
|
|
6640
|
+
function dr({
|
|
6602
6641
|
group: t,
|
|
6603
6642
|
context: a
|
|
6604
6643
|
}) {
|
|
6605
6644
|
if (!a.navigation.topLevelNavigation)
|
|
6606
6645
|
throw Error("Navigation not ready in FireCMSHomePage");
|
|
6607
|
-
const r =
|
|
6646
|
+
const r = Le(), i = Be(), s = i.configPermissions ? i.configPermissions({
|
|
6608
6647
|
user: r.user
|
|
6609
6648
|
}).createCollections : !0;
|
|
6610
6649
|
return /* @__PURE__ */ e(
|
|
6611
|
-
|
|
6650
|
+
ea,
|
|
6612
6651
|
{
|
|
6613
6652
|
className: xe("h-full p-4 min-h-[124px]"),
|
|
6614
6653
|
onClick: i && s ? () => i.createCollection({
|
|
@@ -6638,12 +6677,12 @@ function lr({
|
|
|
6638
6677
|
}
|
|
6639
6678
|
);
|
|
6640
6679
|
}
|
|
6641
|
-
function
|
|
6642
|
-
const t =
|
|
6680
|
+
function pr() {
|
|
6681
|
+
const t = Le(), a = $e(), r = Be(), i = r.configPermissions ? r.configPermissions({
|
|
6643
6682
|
user: t.user
|
|
6644
6683
|
}).createCollections : !0, s = r.rootPathSuggestions ?? [], o = s.length > 3 || a.collections.length === 0 && s.length > 0;
|
|
6645
6684
|
return /* @__PURE__ */ e(
|
|
6646
|
-
|
|
6685
|
+
Ja,
|
|
6647
6686
|
{
|
|
6648
6687
|
in: o,
|
|
6649
6688
|
children: /* @__PURE__ */ n(
|
|
@@ -6681,11 +6720,11 @@ function cr() {
|
|
|
6681
6720
|
function ha(t, a) {
|
|
6682
6721
|
const r = (a ?? []).map((s) => {
|
|
6683
6722
|
const o = t?.find((l) => l.path === s.path || l.alias && s.alias && l.alias === s.alias);
|
|
6684
|
-
return o ?
|
|
6723
|
+
return o ? mr(o, s) : s;
|
|
6685
6724
|
}), i = t.filter((s) => !r.map((o) => o.path).includes(s.path) || !r.map((o) => o.alias).includes(s.alias));
|
|
6686
6725
|
return [...r, ...i];
|
|
6687
6726
|
}
|
|
6688
|
-
function
|
|
6727
|
+
function mr(t, a) {
|
|
6689
6728
|
const r = ha(t?.subcollections ?? [], a?.subcollections ?? []), i = { ...t.properties };
|
|
6690
6729
|
Object.keys(a.properties).forEach((u) => {
|
|
6691
6730
|
const c = t.properties[u];
|
|
@@ -6695,7 +6734,7 @@ function dr(t, a) {
|
|
|
6695
6734
|
return {
|
|
6696
6735
|
...s,
|
|
6697
6736
|
subcollections: r,
|
|
6698
|
-
properties:
|
|
6737
|
+
properties: Qa(i, d),
|
|
6699
6738
|
propertiesOrder: d,
|
|
6700
6739
|
entityViews: m
|
|
6701
6740
|
};
|
|
@@ -6716,12 +6755,18 @@ function ga(t, a) {
|
|
|
6716
6755
|
}
|
|
6717
6756
|
}
|
|
6718
6757
|
function Ut(t) {
|
|
6719
|
-
|
|
6758
|
+
if (t.propertiesOrder && t.propertiesOrder.length > 0) {
|
|
6759
|
+
const a = t.propertiesOrder;
|
|
6760
|
+
return t.additionalFields && t.additionalFields.forEach((r) => {
|
|
6761
|
+
a.includes(r.key) || a.push(r.key);
|
|
6762
|
+
}), a;
|
|
6763
|
+
}
|
|
6764
|
+
return [
|
|
6720
6765
|
...Object.keys(t.properties),
|
|
6721
|
-
...(t.additionalFields ?? [])?.map((a) => a.
|
|
6766
|
+
...(t.additionalFields ?? [])?.map((a) => a.key)
|
|
6722
6767
|
];
|
|
6723
6768
|
}
|
|
6724
|
-
function
|
|
6769
|
+
function ur({
|
|
6725
6770
|
propertyKey: t,
|
|
6726
6771
|
onHover: a,
|
|
6727
6772
|
property: r,
|
|
@@ -6744,16 +6789,16 @@ function pr({
|
|
|
6744
6789
|
});
|
|
6745
6790
|
},
|
|
6746
6791
|
size: "small",
|
|
6747
|
-
children: /* @__PURE__ */ e(
|
|
6792
|
+
children: /* @__PURE__ */ e(Je, { size: "small" })
|
|
6748
6793
|
}
|
|
6749
6794
|
) });
|
|
6750
6795
|
}
|
|
6751
|
-
function
|
|
6796
|
+
function hr({
|
|
6752
6797
|
fullPath: t,
|
|
6753
6798
|
parentPathSegments: a,
|
|
6754
6799
|
collection: r
|
|
6755
6800
|
}) {
|
|
6756
|
-
const i =
|
|
6801
|
+
const i = Le(), s = Be(), o = s.configPermissions ? s.configPermissions({
|
|
6757
6802
|
user: i.user,
|
|
6758
6803
|
collection: r
|
|
6759
6804
|
}).editCollections : !0;
|
|
@@ -6765,7 +6810,7 @@ function mr({
|
|
|
6765
6810
|
s.editProperty({
|
|
6766
6811
|
editedCollectionPath: t,
|
|
6767
6812
|
parentPathSegments: a,
|
|
6768
|
-
currentPropertiesOrder:
|
|
6813
|
+
currentPropertiesOrder: Wa(r),
|
|
6769
6814
|
collection: r
|
|
6770
6815
|
});
|
|
6771
6816
|
},
|
|
@@ -6773,7 +6818,7 @@ function mr({
|
|
|
6773
6818
|
}
|
|
6774
6819
|
) });
|
|
6775
6820
|
}
|
|
6776
|
-
function
|
|
6821
|
+
function Sr({
|
|
6777
6822
|
collectionConfigController: t,
|
|
6778
6823
|
configPermissions: a,
|
|
6779
6824
|
reservedGroups: r,
|
|
@@ -6786,7 +6831,7 @@ function Pr({
|
|
|
6786
6831
|
const m = J(
|
|
6787
6832
|
(u) => {
|
|
6788
6833
|
const c = (g) => {
|
|
6789
|
-
|
|
6834
|
+
Xt(g.properties), g.subcollections?.forEach(c);
|
|
6790
6835
|
}, p = t.collections ?? [];
|
|
6791
6836
|
return p.forEach(c), console.debug("Injecting collections", { editableCollections: p, collections: u }), ha(p, u);
|
|
6792
6837
|
},
|
|
@@ -6797,10 +6842,10 @@ function Pr({
|
|
|
6797
6842
|
loading: t.loading,
|
|
6798
6843
|
collections: {
|
|
6799
6844
|
injectCollections: m,
|
|
6800
|
-
CollectionActions:
|
|
6845
|
+
CollectionActions: lr
|
|
6801
6846
|
},
|
|
6802
6847
|
provider: {
|
|
6803
|
-
Component:
|
|
6848
|
+
Component: sr,
|
|
6804
6849
|
props: {
|
|
6805
6850
|
collectionConfigController: t,
|
|
6806
6851
|
configPermissions: a,
|
|
@@ -6813,20 +6858,20 @@ function Pr({
|
|
|
6813
6858
|
}
|
|
6814
6859
|
},
|
|
6815
6860
|
homePage: {
|
|
6816
|
-
additionalChildrenStart: /* @__PURE__ */ e(
|
|
6817
|
-
CollectionActions:
|
|
6818
|
-
AdditionalCards:
|
|
6861
|
+
additionalChildrenStart: /* @__PURE__ */ e(pr, {}),
|
|
6862
|
+
CollectionActions: cr,
|
|
6863
|
+
AdditionalCards: dr
|
|
6819
6864
|
},
|
|
6820
6865
|
collectionView: {
|
|
6821
|
-
HeaderAction:
|
|
6822
|
-
AddColumnComponent:
|
|
6866
|
+
HeaderAction: ur,
|
|
6867
|
+
AddColumnComponent: hr
|
|
6823
6868
|
}
|
|
6824
6869
|
};
|
|
6825
6870
|
}
|
|
6826
|
-
function
|
|
6827
|
-
const a =
|
|
6871
|
+
function qr({ path: t }) {
|
|
6872
|
+
const a = fr(t), r = gr(t), i = Be();
|
|
6828
6873
|
return /* @__PURE__ */ n("div", { className: "p-1 flex flex-col items-center", children: [
|
|
6829
|
-
/* @__PURE__ */ e(
|
|
6874
|
+
/* @__PURE__ */ e(ta, { error: "No collection for path: " + a }),
|
|
6830
6875
|
/* @__PURE__ */ e(
|
|
6831
6876
|
E,
|
|
6832
6877
|
{
|
|
@@ -6845,24 +6890,24 @@ function Nr({ path: t }) {
|
|
|
6845
6890
|
)
|
|
6846
6891
|
] });
|
|
6847
6892
|
}
|
|
6848
|
-
function
|
|
6893
|
+
function gr(t) {
|
|
6849
6894
|
const a = t.split("/");
|
|
6850
6895
|
return a.filter((r, i) => i % 2 === 0 && i !== a.length - 1);
|
|
6851
6896
|
}
|
|
6852
|
-
function
|
|
6897
|
+
function fr(t) {
|
|
6853
6898
|
const a = t.split("/");
|
|
6854
6899
|
return a[a.length - 1];
|
|
6855
6900
|
}
|
|
6856
6901
|
export {
|
|
6857
|
-
|
|
6902
|
+
qr as MissingReferenceWidget,
|
|
6858
6903
|
He as editableProperty,
|
|
6859
6904
|
ne as getFullId,
|
|
6860
6905
|
ke as idToPropertiesPath,
|
|
6861
6906
|
Ne as namespaceToPropertiesOrderPath,
|
|
6862
|
-
|
|
6863
|
-
|
|
6907
|
+
_i as namespaceToPropertiesPath,
|
|
6908
|
+
Si as removeNonEditableProperties,
|
|
6864
6909
|
Be as useCollectionEditorController,
|
|
6865
|
-
|
|
6910
|
+
Sr as useCollectionEditorPlugin,
|
|
6866
6911
|
ua as useCollectionsConfigController
|
|
6867
6912
|
};
|
|
6868
6913
|
//# sourceMappingURL=index.es.js.map
|