@firecms/core 3.0.0-rc.1 → 3.0.0-rc.2
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/components/UserDisplay.d.ts +7 -0
- package/dist/components/VirtualTable/fields/VirtualTableUserSelect.d.ts +12 -0
- package/dist/contexts/InternalUserManagementContext.d.ts +3 -0
- package/dist/core/FireCMS.d.ts +0 -1
- package/dist/core/field_configs.d.ts +1 -1
- package/dist/form/field_bindings/UserSelectFieldBinding.d.ts +12 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useCollapsedGroups.d.ts +9 -0
- package/dist/hooks/useInternalUserManagementController.d.ts +12 -0
- package/dist/index.es.js +617 -208
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +615 -206
- package/dist/index.umd.js.map +1 -1
- package/dist/preview/components/UserPreview.d.ts +8 -0
- package/dist/preview/index.d.ts +1 -0
- package/dist/types/collections.d.ts +2 -0
- package/dist/types/entities.d.ts +5 -1
- package/dist/types/firecms.d.ts +15 -0
- package/dist/types/firecms_context.d.ts +16 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/internal_user_management.d.ts +20 -0
- package/dist/types/plugins.d.ts +2 -0
- package/dist/types/properties.d.ts +9 -0
- package/dist/types/property_config.d.ts +1 -1
- package/dist/types/user.d.ts +1 -1
- package/package.json +5 -5
- package/src/components/EntityCollectionTable/PropertyTableCell.tsx +12 -0
- package/src/components/ErrorView.tsx +1 -1
- package/src/components/HomePage/DefaultHomePage.tsx +9 -26
- package/src/components/HomePage/HomePageDnD.tsx +3 -45
- package/src/components/HomePage/RenameGroupDialog.tsx +9 -3
- package/src/components/PropertyConfigBadge.tsx +2 -2
- package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +1 -1
- package/src/components/UserDisplay.tsx +55 -0
- package/src/components/VirtualTable/fields/VirtualTableUserSelect.tsx +99 -0
- package/src/components/common/useColumnsIds.tsx +1 -8
- package/src/contexts/InternalUserManagementContext.tsx +4 -0
- package/src/core/FireCMS.tsx +22 -13
- package/src/core/field_configs.tsx +15 -1
- package/src/form/PropertyFieldBinding.tsx +4 -0
- package/src/form/field_bindings/UserSelectFieldBinding.tsx +94 -0
- package/src/hooks/index.tsx +3 -0
- package/src/hooks/useBrowserTitleAndIcon.tsx +1 -1
- package/src/hooks/useCollapsedGroups.ts +64 -0
- package/src/hooks/useFireCMSContext.tsx +6 -2
- package/src/hooks/useInternalUserManagementController.tsx +16 -0
- package/src/preview/PropertyPreview.tsx +8 -0
- package/src/preview/components/ReferencePreview.tsx +4 -2
- package/src/preview/components/UserPreview.tsx +27 -0
- package/src/preview/index.ts +1 -0
- package/src/preview/property_previews/ArrayPropertyPreview.tsx +1 -1
- package/src/types/collections.ts +2 -0
- package/src/types/entities.ts +7 -1
- package/src/types/firecms.tsx +16 -0
- package/src/types/firecms_context.tsx +17 -0
- package/src/types/index.ts +1 -0
- package/src/types/internal_user_management.ts +24 -0
- package/src/types/plugins.tsx +3 -0
- package/src/types/properties.ts +10 -0
- package/src/types/property_config.tsx +1 -0
- package/src/types/user.ts +1 -1
- package/src/util/entities.ts +1 -1
- package/src/util/entity_cache.ts +2 -2
package/dist/index.es.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import React__default, { useRef, useEffect, useContext, useCallback, useMemo, useState, createElement, createRef, createContext, forwardRef, useLayoutEffect, useDeferredValue } from "react";
|
|
5
|
-
import { getColorSchemeForSeed, CHIP_COLORS, FunctionsIcon, CircleIcon, iconKeys, coolIconKeys, Icon, Tooltip, ErrorIcon, Typography, IconButton, ContentCopyIcon, OpenInNewIcon, DescriptionIcon, cls, Skeleton, Chip, defaultBorderMixin, KeyboardTabIcon, Checkbox, Markdown, TextareaAutosize, focusedDisabled, MultiSelect, MultiSelectItem, Select, SelectItem, BooleanSwitch, DateTimeField, paperMixin, EditIcon, DoNotDisturbOnIcon, Menu, MenuItem, MoreVertIcon, CircularProgress, SearchBar, Badge, ArrowUpwardIcon, Popover, FilterListIcon, Button, CenteredView, AssignmentIcon, Label, CloseIcon, TextField, BooleanSwitchWithLabel, useOutsideAlerter, Dialog, DialogTitle, DialogContent, DialogActions, FileCopyIcon, DeleteIcon, AddIcon, StarIcon, Collapse, ExpandablePanel, ArrowForwardIcon, Card, cardMixin, cardClickableMixin, Container, LoadingButton, Alert, CheckIcon, NotesIcon, InfoIcon, fieldBackgroundMixin, RemoveIcon, fieldBackgroundDisabledMixin, fieldBackgroundHoverMixin, ArrowDropDownIcon, FilterListOffIcon, SearchIcon, Avatar, DarkModeIcon, LightModeIcon, BrightnessMediumIcon, LogoutIcon, HandleIcon, KeyboardArrowUpIcon, KeyboardArrowDownIcon, debounce, Sheet, Tab, Tabs, CodeIcon, OpenInFullIcon, ViewStreamIcon, RepeatIcon, BallotIcon, ScheduleIcon, AddLinkIcon, LinkIcon, DriveFolderUploadIcon, UploadFileIcon, FormatListNumberedIcon, NumbersIcon, ListAltIcon, ListIcon, FlagIcon, MailIcon, HttpIcon, FormatQuoteIcon, SubjectIcon, ShortTextIcon, MenuIcon, ChevronLeftIcon } from "@firecms/ui";
|
|
5
|
+
import { getColorSchemeForSeed, CHIP_COLORS, FunctionsIcon, CircleIcon, iconKeys, coolIconKeys, Icon, Tooltip, ErrorIcon, Typography, IconButton, ContentCopyIcon, OpenInNewIcon, DescriptionIcon, cls, Skeleton, Chip, defaultBorderMixin, KeyboardTabIcon, Checkbox, AccountCircleIcon, Markdown, TextareaAutosize, focusedDisabled, MultiSelect, MultiSelectItem, Select, SelectItem, BooleanSwitch, DateTimeField, paperMixin, EditIcon, DoNotDisturbOnIcon, Menu, MenuItem, MoreVertIcon, CircularProgress, SearchBar, Badge, ArrowUpwardIcon, Popover, FilterListIcon, Button, CenteredView, AssignmentIcon, Label, CloseIcon, TextField, BooleanSwitchWithLabel, useOutsideAlerter, Dialog, DialogTitle, DialogContent, DialogActions, FileCopyIcon, DeleteIcon, AddIcon, StarIcon, Collapse, ExpandablePanel, ArrowForwardIcon, Card, cardMixin, cardClickableMixin, Container, LoadingButton, Alert, CheckIcon, NotesIcon, InfoIcon, fieldBackgroundMixin, RemoveIcon, fieldBackgroundDisabledMixin, fieldBackgroundHoverMixin, ArrowDropDownIcon, FilterListOffIcon, SearchIcon, Avatar, DarkModeIcon, LightModeIcon, BrightnessMediumIcon, LogoutIcon, HandleIcon, KeyboardArrowUpIcon, KeyboardArrowDownIcon, debounce, Sheet, Tab, Tabs, CodeIcon, OpenInFullIcon, ViewStreamIcon, RepeatIcon, BallotIcon, ScheduleIcon, AddLinkIcon, LinkIcon, DriveFolderUploadIcon, UploadFileIcon, FormatListNumberedIcon, NumbersIcon, PersonIcon, ListAltIcon, ListIcon, FlagIcon, MailIcon, HttpIcon, FormatQuoteIcon, SubjectIcon, ShortTextIcon, MenuIcon, ChevronLeftIcon } from "@firecms/ui";
|
|
6
6
|
import { SnackbarProvider as SnackbarProvider$1, useSnackbar } from "notistack";
|
|
7
7
|
import hash from "object-hash";
|
|
8
8
|
import { getIn, useFormex, setIn, useCreateFormex, Formex, Field } from "@firecms/formex";
|
|
@@ -14,7 +14,7 @@ import * as locales from "date-fns/locale";
|
|
|
14
14
|
import useMeasure from "react-use-measure";
|
|
15
15
|
import * as yup from "yup";
|
|
16
16
|
import { FixedSizeList } from "react-window";
|
|
17
|
-
import { useSensor, MouseSensor, TouchSensor, KeyboardSensor, useSensors,
|
|
17
|
+
import { useSensor, MouseSensor, TouchSensor, KeyboardSensor, useSensors, closestCenter, pointerWithin, closestCorners, getFirstCollision, rectIntersection, useDroppable, useDndMonitor, DndContext, MeasuringStrategy, DragOverlay, PointerSensor } from "@dnd-kit/core";
|
|
18
18
|
import { useSortable, defaultAnimateLayoutChanges, arrayMove as arrayMove$1, SortableContext, rectSortingStrategy, verticalListSortingStrategy, sortableKeyboardCoordinates, horizontalListSortingStrategy } from "@dnd-kit/sortable";
|
|
19
19
|
import { CSS } from "@dnd-kit/utilities";
|
|
20
20
|
import { restrictToVerticalAxis, restrictToWindowEdges } from "@dnd-kit/modifiers";
|
|
@@ -210,9 +210,14 @@ class EntityReference {
|
|
|
210
210
|
* to the root of the database).
|
|
211
211
|
*/
|
|
212
212
|
path;
|
|
213
|
-
|
|
213
|
+
/**
|
|
214
|
+
* Optional database ID where the entity is stored (if multiple databases are used)
|
|
215
|
+
*/
|
|
216
|
+
databaseId;
|
|
217
|
+
constructor(id, path, databaseId) {
|
|
214
218
|
this.id = id;
|
|
215
219
|
this.path = path;
|
|
220
|
+
this.databaseId = databaseId;
|
|
216
221
|
}
|
|
217
222
|
get pathWithId() {
|
|
218
223
|
return `${this.path}/${this.id}`;
|
|
@@ -517,7 +522,7 @@ function sanitizeData(values, properties) {
|
|
|
517
522
|
return result;
|
|
518
523
|
}
|
|
519
524
|
function getReferenceFrom(entity) {
|
|
520
|
-
return new EntityReference(entity.id, entity.path);
|
|
525
|
+
return new EntityReference(entity.id, entity.path, entity.databaseId);
|
|
521
526
|
}
|
|
522
527
|
function traverseValuesProperties(inputValues, properties, operation) {
|
|
523
528
|
const updatedValues = Object.entries(properties).map(([key, property]) => {
|
|
@@ -4068,6 +4073,10 @@ const AnalyticsContext = React__default.createContext({});
|
|
|
4068
4073
|
const useAnalyticsController = () => {
|
|
4069
4074
|
return useContext(AnalyticsContext);
|
|
4070
4075
|
};
|
|
4076
|
+
const InternalUserManagementContext = React__default.createContext({});
|
|
4077
|
+
const useInternalUserManagementController = () => {
|
|
4078
|
+
return useContext(InternalUserManagementContext);
|
|
4079
|
+
};
|
|
4071
4080
|
const useFireCMSContext = () => {
|
|
4072
4081
|
const authController = useAuthController();
|
|
4073
4082
|
const sideDialogsController = useSideDialogsController();
|
|
@@ -4080,6 +4089,7 @@ const useFireCMSContext = () => {
|
|
|
4080
4089
|
const dialogsController = useDialogsController();
|
|
4081
4090
|
const customizationController = useCustomizationController();
|
|
4082
4091
|
const analyticsController = useAnalyticsController();
|
|
4092
|
+
const userManagement = useInternalUserManagementController();
|
|
4083
4093
|
const fireCMSContextRef = React__default.useRef({
|
|
4084
4094
|
authController,
|
|
4085
4095
|
sideDialogsController,
|
|
@@ -4091,7 +4101,8 @@ const useFireCMSContext = () => {
|
|
|
4091
4101
|
userConfigPersistence,
|
|
4092
4102
|
dialogsController,
|
|
4093
4103
|
customizationController,
|
|
4094
|
-
analyticsController
|
|
4104
|
+
analyticsController,
|
|
4105
|
+
userManagement
|
|
4095
4106
|
});
|
|
4096
4107
|
useEffect(() => {
|
|
4097
4108
|
fireCMSContextRef.current = {
|
|
@@ -4105,7 +4116,8 @@ const useFireCMSContext = () => {
|
|
|
4105
4116
|
userConfigPersistence,
|
|
4106
4117
|
dialogsController,
|
|
4107
4118
|
customizationController,
|
|
4108
|
-
analyticsController
|
|
4119
|
+
analyticsController,
|
|
4120
|
+
userManagement
|
|
4109
4121
|
};
|
|
4110
4122
|
}, [authController, dialogsController, navigation, sideDialogsController]);
|
|
4111
4123
|
return fireCMSContextRef.current;
|
|
@@ -4166,7 +4178,7 @@ function useCollectionFetch(t0) {
|
|
|
4166
4178
|
}
|
|
4167
4179
|
setDataLoading(false);
|
|
4168
4180
|
setDataLoadingError(void 0);
|
|
4169
|
-
setData(entities.map(_temp$
|
|
4181
|
+
setData(entities.map(_temp$t));
|
|
4170
4182
|
setNoMoreToLoad(!itemCount || entities.length < itemCount);
|
|
4171
4183
|
};
|
|
4172
4184
|
const onError = (error) => {
|
|
@@ -4199,7 +4211,7 @@ function useCollectionFetch(t0) {
|
|
|
4199
4211
|
orderBy: sortByProperty,
|
|
4200
4212
|
order: currentSort
|
|
4201
4213
|
}).then(onEntitiesUpdate).catch(onError);
|
|
4202
|
-
return _temp2$
|
|
4214
|
+
return _temp2$e;
|
|
4203
4215
|
}
|
|
4204
4216
|
};
|
|
4205
4217
|
$[4] = collection;
|
|
@@ -4247,9 +4259,9 @@ function useCollectionFetch(t0) {
|
|
|
4247
4259
|
}
|
|
4248
4260
|
return t5;
|
|
4249
4261
|
}
|
|
4250
|
-
function _temp2$
|
|
4262
|
+
function _temp2$e() {
|
|
4251
4263
|
}
|
|
4252
|
-
function _temp$
|
|
4264
|
+
function _temp$t(e_0) {
|
|
4253
4265
|
return {
|
|
4254
4266
|
...e_0
|
|
4255
4267
|
};
|
|
@@ -4314,7 +4326,7 @@ function useEntityFetch(t0) {
|
|
|
4314
4326
|
setEntity(CACHE[`${path}/${entityId}`]);
|
|
4315
4327
|
setDataLoading(false);
|
|
4316
4328
|
setDataLoadingError(void 0);
|
|
4317
|
-
return _temp$
|
|
4329
|
+
return _temp$s;
|
|
4318
4330
|
} else {
|
|
4319
4331
|
if (entityId && path && collection) {
|
|
4320
4332
|
if (dataSource.listenEntity) {
|
|
@@ -4333,7 +4345,7 @@ function useEntityFetch(t0) {
|
|
|
4333
4345
|
databaseId,
|
|
4334
4346
|
collection
|
|
4335
4347
|
}).then(onEntityUpdate).catch(onError);
|
|
4336
|
-
return _temp2$
|
|
4348
|
+
return _temp2$d;
|
|
4337
4349
|
}
|
|
4338
4350
|
} else {
|
|
4339
4351
|
onEntityUpdate(void 0);
|
|
@@ -4380,9 +4392,9 @@ function useEntityFetch(t0) {
|
|
|
4380
4392
|
}
|
|
4381
4393
|
function _temp3$4() {
|
|
4382
4394
|
}
|
|
4383
|
-
function _temp2$
|
|
4395
|
+
function _temp2$d() {
|
|
4384
4396
|
}
|
|
4385
|
-
function _temp$
|
|
4397
|
+
function _temp$s() {
|
|
4386
4398
|
}
|
|
4387
4399
|
async function saveEntityWithCallbacks({
|
|
4388
4400
|
collection,
|
|
@@ -4762,6 +4774,48 @@ function checkLargeLayout(breakpoint = "lg") {
|
|
|
4762
4774
|
if (typeof window === "undefined") return false;
|
|
4763
4775
|
return window.matchMedia(`(min-width: ${breakpoints[breakpoint] + 1}px)`).matches;
|
|
4764
4776
|
}
|
|
4777
|
+
function useCollapsedGroups(groupNames) {
|
|
4778
|
+
const [collapsedGroups, setCollapsedGroups] = useState(() => {
|
|
4779
|
+
try {
|
|
4780
|
+
const stored = localStorage.getItem("firecms-collapsed-groups");
|
|
4781
|
+
return stored ? JSON.parse(stored) : {};
|
|
4782
|
+
} catch {
|
|
4783
|
+
return {};
|
|
4784
|
+
}
|
|
4785
|
+
});
|
|
4786
|
+
useEffect(() => {
|
|
4787
|
+
try {
|
|
4788
|
+
localStorage.setItem("firecms-collapsed-groups", JSON.stringify(collapsedGroups));
|
|
4789
|
+
} catch {
|
|
4790
|
+
}
|
|
4791
|
+
}, [collapsedGroups]);
|
|
4792
|
+
useEffect(() => {
|
|
4793
|
+
if (groupNames.length === 0) return;
|
|
4794
|
+
const currentGroupNames = new Set(groupNames);
|
|
4795
|
+
setCollapsedGroups((prev) => {
|
|
4796
|
+
const cleaned = Object.fromEntries(Object.entries(prev).filter(([groupName]) => currentGroupNames.has(groupName)));
|
|
4797
|
+
const prevKeys = Object.keys(prev);
|
|
4798
|
+
const cleanedKeys = Object.keys(cleaned);
|
|
4799
|
+
if (prevKeys.length === cleanedKeys.length && prevKeys.every((key) => cleanedKeys.includes(key))) {
|
|
4800
|
+
return prev;
|
|
4801
|
+
}
|
|
4802
|
+
return cleaned;
|
|
4803
|
+
});
|
|
4804
|
+
}, [groupNames]);
|
|
4805
|
+
const isGroupCollapsed = useCallback((name) => {
|
|
4806
|
+
return !!collapsedGroups[name];
|
|
4807
|
+
}, [collapsedGroups]);
|
|
4808
|
+
const toggleGroupCollapsed = useCallback((name_0) => {
|
|
4809
|
+
setCollapsedGroups((prev_0) => ({
|
|
4810
|
+
...prev_0,
|
|
4811
|
+
[name_0]: !prev_0[name_0]
|
|
4812
|
+
}));
|
|
4813
|
+
}, []);
|
|
4814
|
+
return {
|
|
4815
|
+
isGroupCollapsed,
|
|
4816
|
+
toggleGroupCollapsed
|
|
4817
|
+
};
|
|
4818
|
+
}
|
|
4765
4819
|
function ErrorTooltip(props) {
|
|
4766
4820
|
const $ = c(2);
|
|
4767
4821
|
let t0;
|
|
@@ -4782,6 +4836,7 @@ function ErrorView(t0) {
|
|
|
4782
4836
|
tooltip
|
|
4783
4837
|
} = t0;
|
|
4784
4838
|
const component = error instanceof Error ? error.message : error;
|
|
4839
|
+
console.warn("ErrorView", JSON.stringify(error));
|
|
4785
4840
|
let t1;
|
|
4786
4841
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
4787
4842
|
t1 = /* @__PURE__ */ jsx(ErrorIcon, { className: "mx-2", size: "small", color: "error" });
|
|
@@ -4966,7 +5021,7 @@ function ImagePreview(t0) {
|
|
|
4966
5021
|
}
|
|
4967
5022
|
let t9;
|
|
4968
5023
|
if ($[16] !== url) {
|
|
4969
|
-
t9 = /* @__PURE__ */ jsx(Tooltip, { title: "Open image in new tab", side: "bottom", children: /* @__PURE__ */ jsx(IconButton, { className: "invisible group-hover:visible", variant: "filled", component: "a", href: url, rel: "noopener noreferrer", target: "_blank", size: "smallest", onClick: _temp$
|
|
5024
|
+
t9 = /* @__PURE__ */ jsx(Tooltip, { title: "Open image in new tab", side: "bottom", children: /* @__PURE__ */ jsx(IconButton, { className: "invisible group-hover:visible", variant: "filled", component: "a", href: url, rel: "noopener noreferrer", target: "_blank", size: "smallest", onClick: _temp$r, children: t8 }) });
|
|
4970
5025
|
$[16] = url;
|
|
4971
5026
|
$[17] = t9;
|
|
4972
5027
|
} else {
|
|
@@ -5000,7 +5055,7 @@ function ImagePreview(t0) {
|
|
|
5000
5055
|
}
|
|
5001
5056
|
return t11;
|
|
5002
5057
|
}
|
|
5003
|
-
function _temp$
|
|
5058
|
+
function _temp$r(e_0) {
|
|
5004
5059
|
return e_0.stopPropagation();
|
|
5005
5060
|
}
|
|
5006
5061
|
function UrlComponentPreview(t0) {
|
|
@@ -5033,7 +5088,7 @@ function UrlComponentPreview(t0) {
|
|
|
5033
5088
|
}
|
|
5034
5089
|
let t3;
|
|
5035
5090
|
if ($[2] !== url) {
|
|
5036
|
-
t3 = /* @__PURE__ */ jsxs("a", { className: "flex gap-4 break-words items-center font-medium text-primary visited:text-primary dark:visited:text-primary dark:text-primary", href: url, rel: "noopener noreferrer", onMouseDown: _temp$
|
|
5091
|
+
t3 = /* @__PURE__ */ jsxs("a", { className: "flex gap-4 break-words items-center font-medium text-primary visited:text-primary dark:visited:text-primary dark:text-primary", href: url, rel: "noopener noreferrer", onMouseDown: _temp$q, target: "_blank", children: [
|
|
5037
5092
|
t2,
|
|
5038
5093
|
url
|
|
5039
5094
|
] });
|
|
@@ -5136,7 +5191,7 @@ function UrlComponentPreview(t0) {
|
|
|
5136
5191
|
}
|
|
5137
5192
|
let t7;
|
|
5138
5193
|
if ($[24] !== t4 || $[25] !== t6 || $[26] !== url) {
|
|
5139
|
-
t7 = /* @__PURE__ */ jsxs("a", { href: url, rel: "noopener noreferrer", target: "_blank", onClick: _temp2$
|
|
5194
|
+
t7 = /* @__PURE__ */ jsxs("a", { href: url, rel: "noopener noreferrer", target: "_blank", onClick: _temp2$c, className: "flex flex-col items-center justify-center", style: t4, children: [
|
|
5140
5195
|
t5,
|
|
5141
5196
|
t6
|
|
5142
5197
|
] });
|
|
@@ -5161,10 +5216,10 @@ function UrlComponentPreview(t0) {
|
|
|
5161
5216
|
}
|
|
5162
5217
|
}
|
|
5163
5218
|
}
|
|
5164
|
-
function _temp2$
|
|
5219
|
+
function _temp2$c(e_0) {
|
|
5165
5220
|
return e_0.stopPropagation();
|
|
5166
5221
|
}
|
|
5167
|
-
function _temp$
|
|
5222
|
+
function _temp$q(e) {
|
|
5168
5223
|
e.preventDefault();
|
|
5169
5224
|
}
|
|
5170
5225
|
function VideoPreview(t0) {
|
|
@@ -5298,7 +5353,7 @@ function SkeletonPropertyComponent(t0) {
|
|
|
5298
5353
|
if (Array.isArray(arrayProperty.of)) {
|
|
5299
5354
|
let t1;
|
|
5300
5355
|
if ($[6] !== arrayProperty.of) {
|
|
5301
|
-
t1 = arrayProperty.of.map(_temp$
|
|
5356
|
+
t1 = arrayProperty.of.map(_temp$p);
|
|
5302
5357
|
$[6] = arrayProperty.of;
|
|
5303
5358
|
$[7] = t1;
|
|
5304
5359
|
} else {
|
|
@@ -5436,7 +5491,7 @@ function SkeletonPropertyComponent(t0) {
|
|
|
5436
5491
|
}
|
|
5437
5492
|
return content || null;
|
|
5438
5493
|
}
|
|
5439
|
-
function _temp$
|
|
5494
|
+
function _temp$p(p, i) {
|
|
5440
5495
|
return renderGenericArrayCell(p, i);
|
|
5441
5496
|
}
|
|
5442
5497
|
function renderMap(property, size) {
|
|
@@ -5795,7 +5850,7 @@ function ArrayPropertyPreview(t0) {
|
|
|
5795
5850
|
}
|
|
5796
5851
|
let t3;
|
|
5797
5852
|
if ($[11] !== t2) {
|
|
5798
|
-
t3 = /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: t2 });
|
|
5853
|
+
t3 = /* @__PURE__ */ jsx("div", { className: "w-full flex flex-col gap-2", children: t2 });
|
|
5799
5854
|
$[11] = t2;
|
|
5800
5855
|
$[12] = t3;
|
|
5801
5856
|
} else {
|
|
@@ -6007,7 +6062,7 @@ const ReferencePreview = function ReferencePreview2(props) {
|
|
|
6007
6062
|
}
|
|
6008
6063
|
let t0;
|
|
6009
6064
|
if ($[8] !== props) {
|
|
6010
|
-
t0 = /* @__PURE__ */ jsx(ReferencePreviewInternal, { ...props });
|
|
6065
|
+
t0 = /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(ReferencePreviewInternal, { ...props }) });
|
|
6011
6066
|
$[8] = props;
|
|
6012
6067
|
$[9] = t0;
|
|
6013
6068
|
} else {
|
|
@@ -6619,7 +6674,7 @@ function KeyValuePreview(t0) {
|
|
|
6619
6674
|
}
|
|
6620
6675
|
let t1;
|
|
6621
6676
|
if ($[1] !== value) {
|
|
6622
|
-
t1 = Object.entries(value).map(_temp$
|
|
6677
|
+
t1 = Object.entries(value).map(_temp$o);
|
|
6623
6678
|
$[1] = value;
|
|
6624
6679
|
$[2] = t1;
|
|
6625
6680
|
} else {
|
|
@@ -6635,7 +6690,7 @@ function KeyValuePreview(t0) {
|
|
|
6635
6690
|
}
|
|
6636
6691
|
return t2;
|
|
6637
6692
|
}
|
|
6638
|
-
function _temp$
|
|
6693
|
+
function _temp$o(t0) {
|
|
6639
6694
|
const [key, childValue] = t0;
|
|
6640
6695
|
return /* @__PURE__ */ jsxs("div", { className: cls(defaultBorderMixin, "last:border-b-0 border-b"), children: [
|
|
6641
6696
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-row pt-0.5 pb-0.5 gap-2", children: [
|
|
@@ -6768,6 +6823,141 @@ function NumberPropertyPreview(t0) {
|
|
|
6768
6823
|
return t1;
|
|
6769
6824
|
}
|
|
6770
6825
|
}
|
|
6826
|
+
function UserDisplay(t0) {
|
|
6827
|
+
const $ = c(18);
|
|
6828
|
+
const {
|
|
6829
|
+
user
|
|
6830
|
+
} = t0;
|
|
6831
|
+
if (!user) {
|
|
6832
|
+
let t12;
|
|
6833
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6834
|
+
t12 = /* @__PURE__ */ jsx(EmptyValue, {});
|
|
6835
|
+
$[0] = t12;
|
|
6836
|
+
} else {
|
|
6837
|
+
t12 = $[0];
|
|
6838
|
+
}
|
|
6839
|
+
return t12;
|
|
6840
|
+
}
|
|
6841
|
+
let t1;
|
|
6842
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6843
|
+
t1 = cls("inline-flex items-center gap-4 px-2 py-1 rounded-xl", "bg-surface-accent-100 dark:bg-surface-accent-800", "border", defaultBorderMixin);
|
|
6844
|
+
$[1] = t1;
|
|
6845
|
+
} else {
|
|
6846
|
+
t1 = $[1];
|
|
6847
|
+
}
|
|
6848
|
+
let t2;
|
|
6849
|
+
if ($[2] !== user.displayName || $[3] !== user.email || $[4] !== user.photoURL) {
|
|
6850
|
+
t2 = user.photoURL ? /* @__PURE__ */ jsx("img", { src: user.photoURL, alt: user.displayName || user.email || "User", className: cls("rounded-full object-cover", "w-6 h-6") }) : /* @__PURE__ */ jsx(AccountCircleIcon, { className: cls("text-text-secondary dark:text-text-secondary-dark", "w-6 h-6") });
|
|
6851
|
+
$[2] = user.displayName;
|
|
6852
|
+
$[3] = user.email;
|
|
6853
|
+
$[4] = user.photoURL;
|
|
6854
|
+
$[5] = t2;
|
|
6855
|
+
} else {
|
|
6856
|
+
t2 = $[5];
|
|
6857
|
+
}
|
|
6858
|
+
let t3;
|
|
6859
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6860
|
+
t3 = cls("font-regular truncate", "text-sm");
|
|
6861
|
+
$[6] = t3;
|
|
6862
|
+
} else {
|
|
6863
|
+
t3 = $[6];
|
|
6864
|
+
}
|
|
6865
|
+
const t4 = user.displayName || user.email || "-";
|
|
6866
|
+
let t5;
|
|
6867
|
+
if ($[7] !== t4) {
|
|
6868
|
+
t5 = /* @__PURE__ */ jsx("span", { className: t3, children: t4 });
|
|
6869
|
+
$[7] = t4;
|
|
6870
|
+
$[8] = t5;
|
|
6871
|
+
} else {
|
|
6872
|
+
t5 = $[8];
|
|
6873
|
+
}
|
|
6874
|
+
let t6;
|
|
6875
|
+
if ($[9] !== user.displayName || $[10] !== user.email) {
|
|
6876
|
+
t6 = user.displayName && user.email && /* @__PURE__ */ jsx("span", { className: cls("text-text-secondary dark:text-text-secondary-dark truncate", "text-xs"), children: user.email });
|
|
6877
|
+
$[9] = user.displayName;
|
|
6878
|
+
$[10] = user.email;
|
|
6879
|
+
$[11] = t6;
|
|
6880
|
+
} else {
|
|
6881
|
+
t6 = $[11];
|
|
6882
|
+
}
|
|
6883
|
+
let t7;
|
|
6884
|
+
if ($[12] !== t5 || $[13] !== t6) {
|
|
6885
|
+
t7 = /* @__PURE__ */ jsxs("div", { className: "flex flex-col min-w-0", children: [
|
|
6886
|
+
t5,
|
|
6887
|
+
t6
|
|
6888
|
+
] });
|
|
6889
|
+
$[12] = t5;
|
|
6890
|
+
$[13] = t6;
|
|
6891
|
+
$[14] = t7;
|
|
6892
|
+
} else {
|
|
6893
|
+
t7 = $[14];
|
|
6894
|
+
}
|
|
6895
|
+
let t8;
|
|
6896
|
+
if ($[15] !== t2 || $[16] !== t7) {
|
|
6897
|
+
t8 = /* @__PURE__ */ jsxs("div", { className: t1, children: [
|
|
6898
|
+
t2,
|
|
6899
|
+
t7
|
|
6900
|
+
] });
|
|
6901
|
+
$[15] = t2;
|
|
6902
|
+
$[16] = t7;
|
|
6903
|
+
$[17] = t8;
|
|
6904
|
+
} else {
|
|
6905
|
+
t8 = $[17];
|
|
6906
|
+
}
|
|
6907
|
+
return t8;
|
|
6908
|
+
}
|
|
6909
|
+
function UserPreview(t0) {
|
|
6910
|
+
const $ = c(8);
|
|
6911
|
+
const {
|
|
6912
|
+
value
|
|
6913
|
+
} = t0;
|
|
6914
|
+
const {
|
|
6915
|
+
getUser
|
|
6916
|
+
} = useInternalUserManagementController();
|
|
6917
|
+
if (!value) {
|
|
6918
|
+
let t12;
|
|
6919
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6920
|
+
t12 = /* @__PURE__ */ jsx(EmptyValue, {});
|
|
6921
|
+
$[0] = t12;
|
|
6922
|
+
} else {
|
|
6923
|
+
t12 = $[0];
|
|
6924
|
+
}
|
|
6925
|
+
return t12;
|
|
6926
|
+
}
|
|
6927
|
+
let t1;
|
|
6928
|
+
if ($[1] !== getUser || $[2] !== value) {
|
|
6929
|
+
t1 = getUser(value);
|
|
6930
|
+
$[1] = getUser;
|
|
6931
|
+
$[2] = value;
|
|
6932
|
+
$[3] = t1;
|
|
6933
|
+
} else {
|
|
6934
|
+
t1 = $[3];
|
|
6935
|
+
}
|
|
6936
|
+
const user = t1;
|
|
6937
|
+
if (!user) {
|
|
6938
|
+
let t22;
|
|
6939
|
+
if ($[4] !== value) {
|
|
6940
|
+
t22 = /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", children: [
|
|
6941
|
+
"User not found: ",
|
|
6942
|
+
value
|
|
6943
|
+
] });
|
|
6944
|
+
$[4] = value;
|
|
6945
|
+
$[5] = t22;
|
|
6946
|
+
} else {
|
|
6947
|
+
t22 = $[5];
|
|
6948
|
+
}
|
|
6949
|
+
return t22;
|
|
6950
|
+
}
|
|
6951
|
+
let t2;
|
|
6952
|
+
if ($[6] !== user) {
|
|
6953
|
+
t2 = /* @__PURE__ */ jsx(UserDisplay, { user });
|
|
6954
|
+
$[6] = user;
|
|
6955
|
+
$[7] = t2;
|
|
6956
|
+
} else {
|
|
6957
|
+
t2 = $[7];
|
|
6958
|
+
}
|
|
6959
|
+
return t2;
|
|
6960
|
+
}
|
|
6771
6961
|
const PropertyPreview = React__default.memo(function PropertyPreview2(props) {
|
|
6772
6962
|
const $ = c(31);
|
|
6773
6963
|
const authController = useAuthController();
|
|
@@ -6868,21 +7058,25 @@ const PropertyPreview = React__default.memo(function PropertyPreview2(props) {
|
|
|
6868
7058
|
}
|
|
6869
7059
|
content = t02;
|
|
6870
7060
|
} else {
|
|
6871
|
-
if (stringProperty.
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
t02 = /* @__PURE__ */ jsx(EmptyValue, {});
|
|
6878
|
-
$[23] = t02;
|
|
7061
|
+
if (stringProperty.userSelect) {
|
|
7062
|
+
content = /* @__PURE__ */ jsx(UserPreview, { value, property: stringProperty, propertyKey, size: props.size });
|
|
7063
|
+
} else {
|
|
7064
|
+
if (stringProperty.reference) {
|
|
7065
|
+
if (typeof stringProperty.reference.path === "string") {
|
|
7066
|
+
content = /* @__PURE__ */ jsx(ReferencePreview, { disabled: !stringProperty.reference.path, previewProperties: stringProperty.reference.previewProperties, includeId: stringProperty.reference.includeId, includeEntityLink: stringProperty.reference.includeEntityLink, size: props.size, reference: new EntityReference(value, stringProperty.reference.path) });
|
|
6879
7067
|
} else {
|
|
6880
|
-
t02
|
|
7068
|
+
let t02;
|
|
7069
|
+
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
7070
|
+
t02 = /* @__PURE__ */ jsx(EmptyValue, {});
|
|
7071
|
+
$[23] = t02;
|
|
7072
|
+
} else {
|
|
7073
|
+
t02 = $[23];
|
|
7074
|
+
}
|
|
7075
|
+
content = t02;
|
|
6881
7076
|
}
|
|
6882
|
-
|
|
7077
|
+
} else {
|
|
7078
|
+
content = /* @__PURE__ */ jsx(StringPropertyPreview, { ...props, property: stringProperty, value });
|
|
6883
7079
|
}
|
|
6884
|
-
} else {
|
|
6885
|
-
content = /* @__PURE__ */ jsx(StringPropertyPreview, { ...props, property: stringProperty, value });
|
|
6886
7080
|
}
|
|
6887
7081
|
}
|
|
6888
7082
|
}
|
|
@@ -7403,7 +7597,7 @@ function VirtualTableSelect(props) {
|
|
|
7403
7597
|
console.trace("onChange");
|
|
7404
7598
|
if (valueType === "number") {
|
|
7405
7599
|
if (multiple) {
|
|
7406
|
-
const newValue = updatedValue.map(_temp$
|
|
7600
|
+
const newValue = updatedValue.map(_temp$n);
|
|
7407
7601
|
updateValue(newValue);
|
|
7408
7602
|
} else {
|
|
7409
7603
|
updateValue(parseFloat(updatedValue));
|
|
@@ -7440,7 +7634,7 @@ function VirtualTableSelect(props) {
|
|
|
7440
7634
|
const renderValue = t3;
|
|
7441
7635
|
let t4;
|
|
7442
7636
|
if ($[10] !== disabled || $[11] !== enumValues || $[12] !== internalValue || $[13] !== multiple || $[14] !== onChange || $[15] !== renderValue || $[16] !== small || $[17] !== validValue) {
|
|
7443
|
-
t4 = multiple ? /* @__PURE__ */ jsx(MultiSelect, { inputRef: ref, className: "w-full h-full p-0 bg-transparent", position: "item-aligned", disabled, includeClear: false, useChips: false, value: validValue ? internalValue.map(_temp2$
|
|
7637
|
+
t4 = multiple ? /* @__PURE__ */ jsx(MultiSelect, { inputRef: ref, className: "w-full h-full p-0 bg-transparent", position: "item-aligned", disabled, includeClear: false, useChips: false, value: validValue ? internalValue.map(_temp2$b) : [], onValueChange: onChange, children: enumValues?.map((enumConfig) => /* @__PURE__ */ jsx(MultiSelectItem, { value: String(enumConfig.id), children: /* @__PURE__ */ jsx(EnumValuesChip, { enumKey: enumConfig.id, enumValues, size: small ? "small" : "medium" }) }, enumConfig.id)) }) : /* @__PURE__ */ jsx(Select, { inputRef: ref, size: "large", fullWidth: true, className: "w-full h-full p-0 bg-transparent", position: "item-aligned", disabled, padding: false, value: validValue ? internalValue?.toString() : "", onValueChange: onChange, renderValue, children: enumValues?.map((enumConfig_0) => /* @__PURE__ */ jsx(SelectItem, { value: String(enumConfig_0.id), children: /* @__PURE__ */ jsx(EnumValuesChip, { enumKey: enumConfig_0.id, enumValues, size: small ? "small" : "medium" }) }, enumConfig_0.id)) });
|
|
7444
7638
|
$[10] = disabled;
|
|
7445
7639
|
$[11] = enumValues;
|
|
7446
7640
|
$[12] = internalValue;
|
|
@@ -7455,10 +7649,10 @@ function VirtualTableSelect(props) {
|
|
|
7455
7649
|
}
|
|
7456
7650
|
return t4;
|
|
7457
7651
|
}
|
|
7458
|
-
function _temp2$
|
|
7652
|
+
function _temp2$b(v_0) {
|
|
7459
7653
|
return v_0.toString();
|
|
7460
7654
|
}
|
|
7461
|
-
function _temp$
|
|
7655
|
+
function _temp$n(v) {
|
|
7462
7656
|
return parseFloat(v);
|
|
7463
7657
|
}
|
|
7464
7658
|
function VirtualTableNumberInput(props) {
|
|
@@ -7589,6 +7783,89 @@ function VirtualTableDateField(props) {
|
|
|
7589
7783
|
}
|
|
7590
7784
|
return t4;
|
|
7591
7785
|
}
|
|
7786
|
+
function VirtualTableUserSelect(props) {
|
|
7787
|
+
const $ = c(15);
|
|
7788
|
+
const {
|
|
7789
|
+
internalValue,
|
|
7790
|
+
disabled,
|
|
7791
|
+
focused,
|
|
7792
|
+
updateValue,
|
|
7793
|
+
multiple
|
|
7794
|
+
} = props;
|
|
7795
|
+
const {
|
|
7796
|
+
users,
|
|
7797
|
+
getUser
|
|
7798
|
+
} = useInternalUserManagementController();
|
|
7799
|
+
const validValue = Array.isArray(internalValue) && multiple || !Array.isArray(internalValue) && !multiple;
|
|
7800
|
+
const ref = React__default.useRef(null);
|
|
7801
|
+
let t0;
|
|
7802
|
+
let t1;
|
|
7803
|
+
if ($[0] !== focused) {
|
|
7804
|
+
t0 = () => {
|
|
7805
|
+
if (ref.current && focused) {
|
|
7806
|
+
ref.current?.focus({
|
|
7807
|
+
preventScroll: true
|
|
7808
|
+
});
|
|
7809
|
+
}
|
|
7810
|
+
};
|
|
7811
|
+
t1 = [focused, ref];
|
|
7812
|
+
$[0] = focused;
|
|
7813
|
+
$[1] = t0;
|
|
7814
|
+
$[2] = t1;
|
|
7815
|
+
} else {
|
|
7816
|
+
t0 = $[1];
|
|
7817
|
+
t1 = $[2];
|
|
7818
|
+
}
|
|
7819
|
+
useEffect(t0, t1);
|
|
7820
|
+
let t2;
|
|
7821
|
+
if ($[3] !== updateValue) {
|
|
7822
|
+
t2 = (updatedValue) => {
|
|
7823
|
+
if (!updatedValue) {
|
|
7824
|
+
updateValue(null);
|
|
7825
|
+
} else {
|
|
7826
|
+
updateValue(updatedValue);
|
|
7827
|
+
}
|
|
7828
|
+
};
|
|
7829
|
+
$[3] = updateValue;
|
|
7830
|
+
$[4] = t2;
|
|
7831
|
+
} else {
|
|
7832
|
+
t2 = $[4];
|
|
7833
|
+
}
|
|
7834
|
+
const onChange = t2;
|
|
7835
|
+
let t3;
|
|
7836
|
+
if ($[5] !== getUser) {
|
|
7837
|
+
t3 = (userId) => {
|
|
7838
|
+
const user = getUser(userId);
|
|
7839
|
+
return /* @__PURE__ */ jsx(UserDisplay, { user });
|
|
7840
|
+
};
|
|
7841
|
+
$[5] = getUser;
|
|
7842
|
+
$[6] = t3;
|
|
7843
|
+
} else {
|
|
7844
|
+
t3 = $[6];
|
|
7845
|
+
}
|
|
7846
|
+
const renderValue = t3;
|
|
7847
|
+
let t4;
|
|
7848
|
+
if ($[7] !== disabled || $[8] !== internalValue || $[9] !== multiple || $[10] !== onChange || $[11] !== renderValue || $[12] !== users || $[13] !== validValue) {
|
|
7849
|
+
t4 = multiple ? /* @__PURE__ */ jsx(MultiSelect, { inputRef: ref, className: "w-full h-full p-0 bg-transparent", position: "item-aligned", disabled, includeClear: false, useChips: false, value: validValue ? internalValue : [], onValueChange: onChange, children: users?.map(_temp$m) }) : /* @__PURE__ */ jsx(Select, { inputRef: ref, size: "large", fullWidth: true, className: "w-full h-full p-0 bg-transparent", position: "item-aligned", disabled, padding: false, value: validValue ? internalValue : "", onValueChange: onChange, renderValue, children: users?.map(_temp2$a) });
|
|
7850
|
+
$[7] = disabled;
|
|
7851
|
+
$[8] = internalValue;
|
|
7852
|
+
$[9] = multiple;
|
|
7853
|
+
$[10] = onChange;
|
|
7854
|
+
$[11] = renderValue;
|
|
7855
|
+
$[12] = users;
|
|
7856
|
+
$[13] = validValue;
|
|
7857
|
+
$[14] = t4;
|
|
7858
|
+
} else {
|
|
7859
|
+
t4 = $[14];
|
|
7860
|
+
}
|
|
7861
|
+
return t4;
|
|
7862
|
+
}
|
|
7863
|
+
function _temp2$a(user_1) {
|
|
7864
|
+
return /* @__PURE__ */ jsx(SelectItem, { value: user_1.uid, children: /* @__PURE__ */ jsx(UserDisplay, { user: user_1 }) }, user_1.uid);
|
|
7865
|
+
}
|
|
7866
|
+
function _temp$m(user_0) {
|
|
7867
|
+
return /* @__PURE__ */ jsx(MultiSelectItem, { value: user_0.uid, children: /* @__PURE__ */ jsx(UserDisplay, { user: user_0 }) }, user_0.uid);
|
|
7868
|
+
}
|
|
7592
7869
|
class ErrorBoundary extends React__default.Component {
|
|
7593
7870
|
constructor(props) {
|
|
7594
7871
|
super(props);
|
|
@@ -8017,7 +8294,7 @@ function StorageUpload$1(t0) {
|
|
|
8017
8294
|
const snackbarContext = useSnackbarController();
|
|
8018
8295
|
let t1;
|
|
8019
8296
|
if ($[0] !== storage.acceptedFiles) {
|
|
8020
|
-
t1 = storage.acceptedFiles ? storage.acceptedFiles.map(_temp$
|
|
8297
|
+
t1 = storage.acceptedFiles ? storage.acceptedFiles.map(_temp$l).reduce(_temp2$9, {}) : void 0;
|
|
8021
8298
|
$[0] = storage.acceptedFiles;
|
|
8022
8299
|
$[1] = t1;
|
|
8023
8300
|
} else {
|
|
@@ -8246,7 +8523,7 @@ function _temp2$9(a, b) {
|
|
|
8246
8523
|
...b
|
|
8247
8524
|
};
|
|
8248
8525
|
}
|
|
8249
|
-
function _temp$
|
|
8526
|
+
function _temp$l(e) {
|
|
8250
8527
|
return {
|
|
8251
8528
|
[e]: []
|
|
8252
8529
|
};
|
|
@@ -8353,7 +8630,7 @@ const TableReferenceFieldInternal = React__default.memo(function TableReferenceF
|
|
|
8353
8630
|
let t1;
|
|
8354
8631
|
if ($[2] !== updateValue) {
|
|
8355
8632
|
t1 = (entities) => {
|
|
8356
|
-
updateValue(entities.map(_temp$
|
|
8633
|
+
updateValue(entities.map(_temp$k));
|
|
8357
8634
|
};
|
|
8358
8635
|
$[2] = updateValue;
|
|
8359
8636
|
$[3] = t1;
|
|
@@ -8514,7 +8791,7 @@ const TableReferenceFieldInternal = React__default.memo(function TableReferenceF
|
|
|
8514
8791
|
}
|
|
8515
8792
|
return t10;
|
|
8516
8793
|
}, equal);
|
|
8517
|
-
function _temp$
|
|
8794
|
+
function _temp$k(e) {
|
|
8518
8795
|
return getReferenceFrom(e);
|
|
8519
8796
|
}
|
|
8520
8797
|
function _temp2$8(ref) {
|
|
@@ -9376,6 +9653,9 @@ const PropertyTableCell = React__default.memo(function PropertyTableCell2({
|
|
|
9376
9653
|
if (stringProperty_0.enumValues) {
|
|
9377
9654
|
innerComponent = /* @__PURE__ */ jsx(VirtualTableSelect, { name: propertyKey, multiple: false, focused: selected, disabled, valueType: "string", small: getPreviewSizeFrom(size) !== "medium", enumValues: stringProperty_0.enumValues, error: validationError ?? error, internalValue, updateValue });
|
|
9378
9655
|
fullHeight = true;
|
|
9656
|
+
} else if (stringProperty_0.userSelect) {
|
|
9657
|
+
innerComponent = /* @__PURE__ */ jsx(VirtualTableUserSelect, { name: propertyKey, multiple: false, focused: selected, disabled, small: getPreviewSizeFrom(size) !== "medium", error: validationError ?? error, internalValue, updateValue });
|
|
9658
|
+
fullHeight = true;
|
|
9379
9659
|
} else if (stringProperty_0.markdown || !stringProperty_0.storage || !stringProperty_0.reference) {
|
|
9380
9660
|
const multiline = Boolean(stringProperty_0.multiline) || Boolean(stringProperty_0.markdown);
|
|
9381
9661
|
innerComponent = /* @__PURE__ */ jsx(VirtualTableInput, { error: validationError ?? error, disabled, multiline, focused: selected, value: internalValue, updateValue });
|
|
@@ -9440,7 +9720,8 @@ function customReplacer(key) {
|
|
|
9440
9720
|
return {
|
|
9441
9721
|
__type: "EntityReference",
|
|
9442
9722
|
id: value.id,
|
|
9443
|
-
path: value.path
|
|
9723
|
+
path: value.path,
|
|
9724
|
+
databaseId: value.databaseId
|
|
9444
9725
|
};
|
|
9445
9726
|
}
|
|
9446
9727
|
if (value instanceof GeoPoint) {
|
|
@@ -9464,7 +9745,7 @@ function customReviver(key, value) {
|
|
|
9464
9745
|
case "Date":
|
|
9465
9746
|
return new Date(value.value);
|
|
9466
9747
|
case "EntityReference":
|
|
9467
|
-
return new EntityReference(value.id, value.path);
|
|
9748
|
+
return new EntityReference(value.id, value.path, value.databaseId);
|
|
9468
9749
|
case "GeoPoint":
|
|
9469
9750
|
return new GeoPoint(value.latitude, value.longitude);
|
|
9470
9751
|
case "Vector":
|
|
@@ -9676,7 +9957,7 @@ function CollectionTableToolbar(t0) {
|
|
|
9676
9957
|
}
|
|
9677
9958
|
let t6;
|
|
9678
9959
|
if ($[6] !== t3 || $[7] !== t4) {
|
|
9679
|
-
t6 = /* @__PURE__ */ jsx(Tooltip, { title: "Table row size", side: "right", sideOffset: 4, children: /* @__PURE__ */ jsx(Select, { value: t3, className: "w-16 ml-2", size: "small", onValueChange: t4, renderValue: _temp$
|
|
9960
|
+
t6 = /* @__PURE__ */ jsx(Tooltip, { title: "Table row size", side: "right", sideOffset: 4, children: /* @__PURE__ */ jsx(Select, { value: t3, className: "w-16 ml-2", size: "small", onValueChange: t4, renderValue: _temp$j, children: t5 }) });
|
|
9680
9961
|
$[6] = t3;
|
|
9681
9962
|
$[7] = t4;
|
|
9682
9963
|
$[8] = t6;
|
|
@@ -9763,7 +10044,7 @@ function CollectionTableToolbar(t0) {
|
|
|
9763
10044
|
function _temp2$7(size_0) {
|
|
9764
10045
|
return /* @__PURE__ */ jsx(SelectItem, { value: size_0, className: "w-12 font-medium text-center", children: size_0.toUpperCase() }, size_0);
|
|
9765
10046
|
}
|
|
9766
|
-
function _temp$
|
|
10047
|
+
function _temp$j(v_0) {
|
|
9767
10048
|
return /* @__PURE__ */ jsx("div", { className: "font-medium", children: v_0.toUpperCase() });
|
|
9768
10049
|
}
|
|
9769
10050
|
function getTableCellAlignment(property) {
|
|
@@ -9835,21 +10116,15 @@ function useColumnIds(collection, includeSubcollections) {
|
|
|
9835
10116
|
let t0;
|
|
9836
10117
|
bb0: {
|
|
9837
10118
|
if (collection.propertiesOrder) {
|
|
9838
|
-
let
|
|
10119
|
+
let t12;
|
|
9839
10120
|
if ($[0] !== collection) {
|
|
9840
|
-
|
|
9841
|
-
if (collection.collectionGroup) {
|
|
9842
|
-
propertyColumnConfigs.push({
|
|
9843
|
-
key: COLLECTION_GROUP_PARENT_ID,
|
|
9844
|
-
disabled: true
|
|
9845
|
-
});
|
|
9846
|
-
}
|
|
10121
|
+
t12 = hideAndExpandKeys(collection, collection.propertiesOrder);
|
|
9847
10122
|
$[0] = collection;
|
|
9848
|
-
$[1] =
|
|
10123
|
+
$[1] = t12;
|
|
9849
10124
|
} else {
|
|
9850
|
-
|
|
10125
|
+
t12 = $[1];
|
|
9851
10126
|
}
|
|
9852
|
-
t0 =
|
|
10127
|
+
t0 = t12;
|
|
9853
10128
|
break bb0;
|
|
9854
10129
|
}
|
|
9855
10130
|
let t1;
|
|
@@ -10883,7 +11158,7 @@ const SafeLinkRenderer = (t0) => {
|
|
|
10883
11158
|
let t1;
|
|
10884
11159
|
if ($[0] !== text) {
|
|
10885
11160
|
const urlRegex = /https?:\/\/[^\s]+/g;
|
|
10886
|
-
t1 = text.replace(urlRegex, _temp$
|
|
11161
|
+
t1 = text.replace(urlRegex, _temp$i);
|
|
10887
11162
|
$[0] = text;
|
|
10888
11163
|
$[1] = t1;
|
|
10889
11164
|
} else {
|
|
@@ -10902,7 +11177,7 @@ const SafeLinkRenderer = (t0) => {
|
|
|
10902
11177
|
}
|
|
10903
11178
|
return t2;
|
|
10904
11179
|
};
|
|
10905
|
-
function _temp$
|
|
11180
|
+
function _temp$i(url) {
|
|
10906
11181
|
return `<a href="${url}" class="underline" target="_blank">Link</a><br/>`;
|
|
10907
11182
|
}
|
|
10908
11183
|
const operationLabels$2 = {
|
|
@@ -11110,7 +11385,7 @@ function StringNumberFilterField(t0) {
|
|
|
11110
11385
|
}
|
|
11111
11386
|
let t6;
|
|
11112
11387
|
if ($[16] !== operation || $[17] !== t4 || $[18] !== t5) {
|
|
11113
|
-
t6 = /* @__PURE__ */ jsx("div", { className: "w-[80px]", children: /* @__PURE__ */ jsx(Select, { value: operation, fullWidth: true, position: "item-aligned", onValueChange: t4, renderValue: _temp$
|
|
11388
|
+
t6 = /* @__PURE__ */ jsx("div", { className: "w-[80px]", children: /* @__PURE__ */ jsx(Select, { value: operation, fullWidth: true, position: "item-aligned", onValueChange: t4, renderValue: _temp$h, children: t5 }) });
|
|
11114
11389
|
$[16] = operation;
|
|
11115
11390
|
$[17] = t4;
|
|
11116
11391
|
$[18] = t5;
|
|
@@ -11123,7 +11398,7 @@ function StringNumberFilterField(t0) {
|
|
|
11123
11398
|
t7 = !enumValues && /* @__PURE__ */ jsx(TextField, { type: dataType === "number" ? "number" : void 0, value: internalValue !== void 0 && internalValue != null ? String(internalValue) : "", onChange: (evt) => {
|
|
11124
11399
|
const val_0 = dataType === "number" ? parseFloat(evt.target.value) : evt.target.value;
|
|
11125
11400
|
updateFilter(operation, val_0);
|
|
11126
|
-
}, endAdornment: internalValue && /* @__PURE__ */ jsx(IconButton, { onClick: (e) => updateFilter(operation, void 0), children: /* @__PURE__ */ jsx(CloseIcon, {}) }) });
|
|
11401
|
+
}, endAdornment: internalValue !== void 0 && internalValue != null && /* @__PURE__ */ jsx(IconButton, { onClick: (e) => updateFilter(operation, void 0), children: /* @__PURE__ */ jsx(CloseIcon, {}) }) });
|
|
11127
11402
|
$[20] = dataType;
|
|
11128
11403
|
$[21] = enumValues;
|
|
11129
11404
|
$[22] = internalValue;
|
|
@@ -11234,7 +11509,7 @@ function _temp3$3(e_1) {
|
|
|
11234
11509
|
function _temp2$6(op_1) {
|
|
11235
11510
|
return /* @__PURE__ */ jsx(SelectItem, { value: op_1, children: operationLabels$1[op_1] }, op_1);
|
|
11236
11511
|
}
|
|
11237
|
-
function _temp$
|
|
11512
|
+
function _temp$h(op_0) {
|
|
11238
11513
|
return operationLabels$1[op_0];
|
|
11239
11514
|
}
|
|
11240
11515
|
function BooleanFilterField(t0) {
|
|
@@ -11373,7 +11648,7 @@ function DateTimeFilterField(t0) {
|
|
|
11373
11648
|
}
|
|
11374
11649
|
let t6;
|
|
11375
11650
|
if ($[13] !== operation || $[14] !== t4 || $[15] !== t5) {
|
|
11376
|
-
t6 = /* @__PURE__ */ jsx("div", { className: "w-[80px]", children: /* @__PURE__ */ jsx(Select, { value: operation, size: "large", fullWidth: true, onValueChange: t4, renderValue: _temp$
|
|
11651
|
+
t6 = /* @__PURE__ */ jsx("div", { className: "w-[80px]", children: /* @__PURE__ */ jsx(Select, { value: operation, size: "large", fullWidth: true, onValueChange: t4, renderValue: _temp$g, children: t5 }) });
|
|
11377
11652
|
$[13] = operation;
|
|
11378
11653
|
$[14] = t4;
|
|
11379
11654
|
$[15] = t5;
|
|
@@ -11462,7 +11737,7 @@ function DateTimeFilterField(t0) {
|
|
|
11462
11737
|
function _temp2$5(op_1) {
|
|
11463
11738
|
return /* @__PURE__ */ jsx(SelectItem, { value: op_1, children: operationLabels[op_1] }, op_1);
|
|
11464
11739
|
}
|
|
11465
|
-
function _temp$
|
|
11740
|
+
function _temp$g(op_0) {
|
|
11466
11741
|
return operationLabels[op_0];
|
|
11467
11742
|
}
|
|
11468
11743
|
const SelectableTable = function SelectableTable2({
|
|
@@ -12166,7 +12441,7 @@ function useTableSearchHelper(t0) {
|
|
|
12166
12441
|
const searchBlocked = t12;
|
|
12167
12442
|
let t2;
|
|
12168
12443
|
if ($[15] !== customizationController.plugins || $[16] !== dataSource?.initTextSearch) {
|
|
12169
|
-
t2 = Boolean(dataSource?.initTextSearch) || customizationController.plugins?.find(_temp$
|
|
12444
|
+
t2 = Boolean(dataSource?.initTextSearch) || customizationController.plugins?.find(_temp$f);
|
|
12170
12445
|
$[15] = customizationController.plugins;
|
|
12171
12446
|
$[16] = dataSource?.initTextSearch;
|
|
12172
12447
|
$[17] = t2;
|
|
@@ -12258,7 +12533,7 @@ function useTableSearchHelper(t0) {
|
|
|
12258
12533
|
}
|
|
12259
12534
|
return t1;
|
|
12260
12535
|
}
|
|
12261
|
-
function _temp$
|
|
12536
|
+
function _temp$f(p_0) {
|
|
12262
12537
|
return Boolean(p_0.collectionView?.onTextSearchClick);
|
|
12263
12538
|
}
|
|
12264
12539
|
function DeleteEntityDialog({
|
|
@@ -12851,7 +13126,7 @@ function FavouritesView(t0) {
|
|
|
12851
13126
|
T0 = Collapse;
|
|
12852
13127
|
t4 = favouriteCollections.length > 0;
|
|
12853
13128
|
t2 = "flex flex-row flex-wrap gap-2 pb-2 min-h-[32px]";
|
|
12854
|
-
t3 = favouriteCollections.map(_temp$
|
|
13129
|
+
t3 = favouriteCollections.map(_temp$e);
|
|
12855
13130
|
$[2] = navigationController;
|
|
12856
13131
|
$[3] = t1;
|
|
12857
13132
|
$[4] = T0;
|
|
@@ -12885,7 +13160,7 @@ function FavouritesView(t0) {
|
|
|
12885
13160
|
}
|
|
12886
13161
|
return t6;
|
|
12887
13162
|
}
|
|
12888
|
-
function _temp$
|
|
13163
|
+
function _temp$e(entry_0) {
|
|
12889
13164
|
return /* @__PURE__ */ jsx(NavigationChip, { entry: entry_0 }, entry_0.path);
|
|
12890
13165
|
}
|
|
12891
13166
|
const scrollsMap = {};
|
|
@@ -13102,7 +13377,7 @@ const NavigationCard = React__default.memo(function NavigationCard2(t0) {
|
|
|
13102
13377
|
}
|
|
13103
13378
|
let t4;
|
|
13104
13379
|
if ($[4] !== actions) {
|
|
13105
|
-
t4 = /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1", onClick: _temp$
|
|
13380
|
+
t4 = /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1", onClick: _temp$d, children: actions });
|
|
13106
13381
|
$[4] = actions;
|
|
13107
13382
|
$[5] = t4;
|
|
13108
13383
|
} else {
|
|
@@ -13189,7 +13464,7 @@ const NavigationCard = React__default.memo(function NavigationCard2(t0) {
|
|
|
13189
13464
|
}
|
|
13190
13465
|
return t12;
|
|
13191
13466
|
});
|
|
13192
|
-
function _temp$
|
|
13467
|
+
function _temp$d(event) {
|
|
13193
13468
|
event.preventDefault();
|
|
13194
13469
|
event.stopPropagation();
|
|
13195
13470
|
}
|
|
@@ -13651,32 +13926,6 @@ function useHomePageDnd({
|
|
|
13651
13926
|
if (activeIsGroup) {
|
|
13652
13927
|
const groups = args.droppableContainers.filter((c2) => dndItems.some((g_2) => g_2.name === c2.id));
|
|
13653
13928
|
if (!groups.length) return [];
|
|
13654
|
-
if (groups.length > 0) {
|
|
13655
|
-
const firstGroup = groups[0];
|
|
13656
|
-
const firstGroupRect = firstGroup.rect.current;
|
|
13657
|
-
const {
|
|
13658
|
-
x,
|
|
13659
|
-
y
|
|
13660
|
-
} = args.pointerCoordinates || {
|
|
13661
|
-
x: 0,
|
|
13662
|
-
y: 0
|
|
13663
|
-
};
|
|
13664
|
-
if (firstGroupRect && y < firstGroupRect.top + 20) {
|
|
13665
|
-
return [{
|
|
13666
|
-
id: firstGroup.id,
|
|
13667
|
-
data: {
|
|
13668
|
-
insertBefore: true
|
|
13669
|
-
}
|
|
13670
|
-
}];
|
|
13671
|
-
}
|
|
13672
|
-
}
|
|
13673
|
-
const cornersResult = closestCorners({
|
|
13674
|
-
...args,
|
|
13675
|
-
droppableContainers: groups
|
|
13676
|
-
});
|
|
13677
|
-
if (cornersResult.length) {
|
|
13678
|
-
return cornersResult;
|
|
13679
|
-
}
|
|
13680
13929
|
return closestCenter({
|
|
13681
13930
|
...args,
|
|
13682
13931
|
droppableContainers: groups
|
|
@@ -13784,46 +14033,37 @@ function useHomePageDnd({
|
|
|
13784
14033
|
const activeIdNow_0 = active_1.id;
|
|
13785
14034
|
const overIdNow_0 = over_0.id;
|
|
13786
14035
|
if (activeIsGroup) {
|
|
13787
|
-
|
|
13788
|
-
if (insertBefore && activeIdNow_0 !== overIdNow_0) {
|
|
14036
|
+
if (activeIdNow_0 !== overIdNow_0 && dndItems.some((g_12) => g_12.name === overIdNow_0)) {
|
|
13789
14037
|
const from = dndItems.findIndex((g_10) => g_10.name === activeIdNow_0);
|
|
13790
|
-
|
|
13791
|
-
|
|
14038
|
+
const to = dndItems.findIndex((g_11) => g_11.name === overIdNow_0);
|
|
14039
|
+
if (from !== -1 && to !== -1) {
|
|
14040
|
+
const newState_0 = arrayMove$1(dndItems, from, to);
|
|
13792
14041
|
setDndItems(newState_0);
|
|
13793
14042
|
onPersist?.(newState_0);
|
|
13794
|
-
onGroupMoved?.(activeIdNow_0, from,
|
|
13795
|
-
}
|
|
13796
|
-
} else if (activeIdNow_0 !== overIdNow_0 && dndItems.some((g_13) => g_13.name === overIdNow_0)) {
|
|
13797
|
-
const from_0 = dndItems.findIndex((g_11) => g_11.name === activeIdNow_0);
|
|
13798
|
-
const to = dndItems.findIndex((g_12) => g_12.name === overIdNow_0);
|
|
13799
|
-
if (from_0 !== -1 && to !== -1) {
|
|
13800
|
-
const newState_1 = arrayMove$1(dndItems, from_0, to);
|
|
13801
|
-
setDndItems(newState_1);
|
|
13802
|
-
onPersist?.(newState_1);
|
|
13803
|
-
onGroupMoved?.(activeIdNow_0, from_0, to);
|
|
14043
|
+
onGroupMoved?.(activeIdNow_0, from, to);
|
|
13804
14044
|
}
|
|
13805
14045
|
}
|
|
13806
14046
|
} else {
|
|
13807
14047
|
const activeCont_0 = findDndContainer(activeIdNow_0);
|
|
13808
14048
|
if (overIdNow_0 === "new-group-drop-zone") {
|
|
13809
14049
|
if (activeCont_0) {
|
|
13810
|
-
const
|
|
13811
|
-
const srcIdx_0 =
|
|
14050
|
+
const newState_1 = cloneItemsForDnd(dndItems);
|
|
14051
|
+
const srcIdx_0 = newState_1.findIndex((g_13) => g_13.name === activeCont_0);
|
|
13812
14052
|
if (srcIdx_0 !== -1) {
|
|
13813
|
-
const src_0 =
|
|
14053
|
+
const src_0 = newState_1[srcIdx_0];
|
|
13814
14054
|
const idxInSrc_0 = src_0.entries.findIndex((e_3) => e_3.url === activeIdNow_0);
|
|
13815
14055
|
if (idxInSrc_0 !== -1) {
|
|
13816
14056
|
const [dragged] = src_0.entries.splice(idxInSrc_0, 1);
|
|
13817
|
-
if (src_0.entries.length === 0)
|
|
14057
|
+
if (src_0.entries.length === 0) newState_1.splice(srcIdx_0, 1);
|
|
13818
14058
|
let tentative = "New Group";
|
|
13819
14059
|
let counter = 1;
|
|
13820
|
-
while (
|
|
13821
|
-
|
|
14060
|
+
while (newState_1.some((g_14) => g_14.name === tentative)) tentative = `New Group ${counter++}`;
|
|
14061
|
+
newState_1.push({
|
|
13822
14062
|
name: tentative,
|
|
13823
14063
|
entries: [dragged]
|
|
13824
14064
|
});
|
|
13825
|
-
setDndItems(
|
|
13826
|
-
onPersist?.(
|
|
14065
|
+
setDndItems(newState_1);
|
|
14066
|
+
onPersist?.(newState_1);
|
|
13827
14067
|
setDialogOpenForGroup(tentative);
|
|
13828
14068
|
onNewGroupDrop?.();
|
|
13829
14069
|
}
|
|
@@ -13832,7 +14072,7 @@ function useHomePageDnd({
|
|
|
13832
14072
|
} else {
|
|
13833
14073
|
const overCont_0 = findDndContainer(overIdNow_0);
|
|
13834
14074
|
if (activeCont_0 === overCont_0) {
|
|
13835
|
-
const grpIdx = dndItems.findIndex((
|
|
14075
|
+
const grpIdx = dndItems.findIndex((g_15) => g_15.name === activeCont_0);
|
|
13836
14076
|
if (grpIdx !== -1) {
|
|
13837
14077
|
const group_0 = dndItems[grpIdx];
|
|
13838
14078
|
const oldIdx = group_0.entries.findIndex((e_4) => e_4.url === activeIdNow_0);
|
|
@@ -13840,19 +14080,19 @@ function useHomePageDnd({
|
|
|
13840
14080
|
if (newIdx === -1 && overIdNow_0 === activeCont_0) newIdx = group_0.entries.length - 1;
|
|
13841
14081
|
if (oldIdx !== -1 && newIdx !== -1 && oldIdx !== newIdx) {
|
|
13842
14082
|
const reordered = arrayMove$1(group_0.entries, oldIdx, newIdx);
|
|
13843
|
-
const
|
|
13844
|
-
|
|
14083
|
+
const newState_2 = [...dndItems];
|
|
14084
|
+
newState_2[grpIdx] = {
|
|
13845
14085
|
...group_0,
|
|
13846
14086
|
entries: reordered
|
|
13847
14087
|
};
|
|
13848
|
-
setDndItems(
|
|
13849
|
-
onPersist?.(
|
|
14088
|
+
setDndItems(newState_2);
|
|
14089
|
+
onPersist?.(newState_2);
|
|
13850
14090
|
}
|
|
13851
14091
|
}
|
|
13852
14092
|
} else if (recentlyMovedToNewContainer.current && interimItemsRef.current) {
|
|
13853
14093
|
onPersist?.(interimItemsRef.current);
|
|
13854
14094
|
}
|
|
13855
|
-
onCardMovedBetweenGroups?.(dndItems.flatMap((
|
|
14095
|
+
onCardMovedBetweenGroups?.(dndItems.flatMap((g_16) => g_16.entries).find((e_6) => e_6.url === activeIdNow_0));
|
|
13856
14096
|
}
|
|
13857
14097
|
}
|
|
13858
14098
|
resetDragState();
|
|
@@ -13865,14 +14105,12 @@ function useHomePageDnd({
|
|
|
13865
14105
|
setIsDraggingCardOnly(false);
|
|
13866
14106
|
recentlyMovedToNewContainer.current = false;
|
|
13867
14107
|
};
|
|
13868
|
-
const handleDragCancel = () =>
|
|
13869
|
-
resetDragState();
|
|
13870
|
-
};
|
|
14108
|
+
const handleDragCancel = () => resetDragState();
|
|
13871
14109
|
const handleRenameGroup = (oldName, newName) => {
|
|
13872
14110
|
setDndItems((current) => {
|
|
13873
|
-
const idx = current.findIndex((
|
|
14111
|
+
const idx = current.findIndex((g_17) => g_17.name === oldName);
|
|
13874
14112
|
if (idx === -1) return current;
|
|
13875
|
-
if (current.some((
|
|
14113
|
+
if (current.some((g_18) => g_18.name === newName && g_18.name !== oldName)) return current;
|
|
13876
14114
|
const updated = [...current];
|
|
13877
14115
|
updated[idx] = {
|
|
13878
14116
|
...updated[idx],
|
|
@@ -13881,9 +14119,10 @@ function useHomePageDnd({
|
|
|
13881
14119
|
onPersist?.(updated);
|
|
13882
14120
|
return updated;
|
|
13883
14121
|
});
|
|
14122
|
+
setDialogOpenForGroup(null);
|
|
13884
14123
|
};
|
|
13885
|
-
const activeItemForOverlay = disabled || !activeId || activeIsGroup ? null : dndItems.flatMap((
|
|
13886
|
-
const activeGroupData = disabled || !activeId || !activeIsGroup ? null : dndItems.find((
|
|
14124
|
+
const activeItemForOverlay = disabled || !activeId || activeIsGroup ? null : dndItems.flatMap((g_19) => g_19.entries).find((e_7) => e_7.url === activeId) || null;
|
|
14125
|
+
const activeGroupData = disabled || !activeId || !activeIsGroup ? null : dndItems.find((g_20) => g_20.name === activeId) || null;
|
|
13887
14126
|
return {
|
|
13888
14127
|
sensors,
|
|
13889
14128
|
collisionDetection,
|
|
@@ -14001,7 +14240,7 @@ function NewGroupDropZone(t0) {
|
|
|
14001
14240
|
return t8;
|
|
14002
14241
|
}
|
|
14003
14242
|
function RenameGroupDialog(t0) {
|
|
14004
|
-
const $ = c(
|
|
14243
|
+
const $ = c(40);
|
|
14005
14244
|
const {
|
|
14006
14245
|
open,
|
|
14007
14246
|
initialName,
|
|
@@ -14193,19 +14432,18 @@ function RenameGroupDialog(t0) {
|
|
|
14193
14432
|
t15 = $[35];
|
|
14194
14433
|
}
|
|
14195
14434
|
let t16;
|
|
14196
|
-
if ($[36] !==
|
|
14197
|
-
t16 = /* @__PURE__ */ jsxs(Dialog, { open,
|
|
14435
|
+
if ($[36] !== open || $[37] !== t11 || $[38] !== t15) {
|
|
14436
|
+
t16 = /* @__PURE__ */ jsxs(Dialog, { open, children: [
|
|
14198
14437
|
t6,
|
|
14199
14438
|
t11,
|
|
14200
14439
|
t15
|
|
14201
14440
|
] });
|
|
14202
|
-
$[36] =
|
|
14203
|
-
$[37] =
|
|
14204
|
-
$[38] =
|
|
14205
|
-
$[39] =
|
|
14206
|
-
$[40] = t16;
|
|
14441
|
+
$[36] = open;
|
|
14442
|
+
$[37] = t11;
|
|
14443
|
+
$[38] = t15;
|
|
14444
|
+
$[39] = t16;
|
|
14207
14445
|
} else {
|
|
14208
|
-
t16 = $[
|
|
14446
|
+
t16 = $[39];
|
|
14209
14447
|
}
|
|
14210
14448
|
return t16;
|
|
14211
14449
|
}
|
|
@@ -14305,16 +14543,11 @@ function DefaultHomePage({
|
|
|
14305
14543
|
}] : draggable;
|
|
14306
14544
|
onNavigationEntriesUpdate(all);
|
|
14307
14545
|
};
|
|
14308
|
-
const [
|
|
14309
|
-
const
|
|
14310
|
-
|
|
14311
|
-
|
|
14312
|
-
|
|
14313
|
-
setCollapsedGroups((prev) => ({
|
|
14314
|
-
...prev,
|
|
14315
|
-
[name_1]: !prev[name_1]
|
|
14316
|
-
}));
|
|
14317
|
-
}, []);
|
|
14546
|
+
const groupNames = useMemo(() => [...items.map((item) => item.name), ...adminGroupData ? [adminGroupData.name] : []], [items, adminGroupData]);
|
|
14547
|
+
const {
|
|
14548
|
+
isGroupCollapsed,
|
|
14549
|
+
toggleGroupCollapsed
|
|
14550
|
+
} = useCollapsedGroups(groupNames);
|
|
14318
14551
|
const {
|
|
14319
14552
|
sensors,
|
|
14320
14553
|
collisionDetection,
|
|
@@ -14343,18 +14576,9 @@ function DefaultHomePage({
|
|
|
14343
14576
|
onGroupMoved: (g_8) => context.analyticsController?.onAnalyticsEvent?.("home_move_group", {
|
|
14344
14577
|
name: g_8
|
|
14345
14578
|
}),
|
|
14346
|
-
onCardMovedBetweenGroups: (card) => {
|
|
14347
|
-
|
|
14348
|
-
|
|
14349
|
-
targetGroup = adminGroupData;
|
|
14350
|
-
}
|
|
14351
|
-
if (targetGroup && isGroupCollapsed(targetGroup.name)) {
|
|
14352
|
-
toggleGroupCollapsed(targetGroup.name);
|
|
14353
|
-
}
|
|
14354
|
-
context.analyticsController?.onAnalyticsEvent?.("home_move_card", {
|
|
14355
|
-
id: card.id
|
|
14356
|
-
});
|
|
14357
|
-
},
|
|
14579
|
+
onCardMovedBetweenGroups: (card) => context.analyticsController?.onAnalyticsEvent?.("home_move_card", {
|
|
14580
|
+
id: card.id
|
|
14581
|
+
}),
|
|
14358
14582
|
onNewGroupDrop: () => context.analyticsController?.onAnalyticsEvent?.("home_drop_new_group")
|
|
14359
14583
|
});
|
|
14360
14584
|
const {
|
|
@@ -14410,15 +14634,15 @@ function DefaultHomePage({
|
|
|
14410
14634
|
if (dndDisabled) return;
|
|
14411
14635
|
setDialogOpenForGroup(groupKey);
|
|
14412
14636
|
}, collapsed: isGroupCollapsed(groupKey), onToggleCollapsed: () => toggleGroupCollapsed(groupKey), children: /* @__PURE__ */ jsx(NavigationGroupDroppable, { id: groupKey, itemIds: entriesInGroup.map((e_4) => e_4.url), isPotentialCardDropTarget: isDraggingCardOnly, children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 ", children: [
|
|
14413
|
-
entriesInGroup.map((
|
|
14637
|
+
entriesInGroup.map((entry) => /* @__PURE__ */ jsx(SortableNavigationCard, { entry, onClick: () => {
|
|
14414
14638
|
let event = "unmapped_event";
|
|
14415
|
-
if (
|
|
14416
|
-
else if (
|
|
14417
|
-
else if (
|
|
14639
|
+
if (entry.type === "collection") event = "home_navigate_to_collection";
|
|
14640
|
+
else if (entry.type === "view") event = "home_navigate_to_view";
|
|
14641
|
+
else if (entry.type === "admin") event = "home_navigate_to_admin_view";
|
|
14418
14642
|
context.analyticsController?.onAnalyticsEvent?.(event, {
|
|
14419
|
-
path:
|
|
14643
|
+
path: entry.path
|
|
14420
14644
|
});
|
|
14421
|
-
} },
|
|
14645
|
+
} }, entry.url)),
|
|
14422
14646
|
!performingSearch && groupKey.toLowerCase() !== ADMIN_GROUP_NAME.toLowerCase() && AdditionalCards.map((C, i_1) => /* @__PURE__ */ jsx(C, { ...actionProps }, `extra_${groupKey}_${i_1}`))
|
|
14423
14647
|
] }) }) }) }, groupKey);
|
|
14424
14648
|
}) }, JSON.stringify(containers)),
|
|
@@ -14428,22 +14652,21 @@ function DefaultHomePage({
|
|
|
14428
14652
|
margin: 0
|
|
14429
14653
|
}, children: /* @__PURE__ */ jsx(NavigationGroup, { group: activeGroupData.name === DEFAULT_GROUP_NAME ? void 0 : activeGroupData.name, isPreview: false, minimised: true }) }) : activeItemForOverlay ? /* @__PURE__ */ jsx(NavigationCardBinding, { ...activeItemForOverlay, shrink: isHoveringNewGroupDropZone }) : null })
|
|
14430
14654
|
] }),
|
|
14431
|
-
!performingSearch && adminGroupData && /* @__PURE__ */ jsx(NavigationGroup, { group: adminGroupData.name, collapsed: isGroupCollapsed(adminGroupData.name), onToggleCollapsed: () => toggleGroupCollapsed(adminGroupData.name), children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 ", children: adminGroupData.entries.map((
|
|
14655
|
+
!performingSearch && adminGroupData && /* @__PURE__ */ jsx(NavigationGroup, { group: adminGroupData.name, collapsed: isGroupCollapsed(adminGroupData.name), onToggleCollapsed: () => toggleGroupCollapsed(adminGroupData.name), children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 ", children: adminGroupData.entries.map((entry_0) => /* @__PURE__ */ jsx(NavigationCardBinding, { ...entry_0, onClick: () => {
|
|
14432
14656
|
let event_0 = "unmapped_event";
|
|
14433
|
-
if (
|
|
14434
|
-
else if (
|
|
14435
|
-
else if (
|
|
14657
|
+
if (entry_0.type === "collection") event_0 = "home_navigate_to_collection";
|
|
14658
|
+
else if (entry_0.type === "view") event_0 = "home_navigate_to_view";
|
|
14659
|
+
else if (entry_0.type === "admin") event_0 = "home_navigate_to_admin_view";
|
|
14436
14660
|
context.analyticsController?.onAnalyticsEvent?.(event_0, {
|
|
14437
|
-
path:
|
|
14661
|
+
path: entry_0.path
|
|
14438
14662
|
});
|
|
14439
|
-
} },
|
|
14663
|
+
} }, entry_0.url)) }) }),
|
|
14440
14664
|
additionalPluginSections,
|
|
14441
14665
|
additionalPluginChildrenEnd,
|
|
14442
14666
|
additionalChildrenEnd
|
|
14443
14667
|
] }),
|
|
14444
14668
|
dialogOpenForGroup && /* @__PURE__ */ jsx(RenameGroupDialog, { open: true, initialName: dialogOpenForGroup, existingGroupNames: items.map((g_9) => g_9.name).filter((n) => n !== dialogOpenForGroup), onClose: () => setDialogOpenForGroup(null), onRename: (newName) => {
|
|
14445
14669
|
handleRenameGroup(dialogOpenForGroup, newName);
|
|
14446
|
-
setDialogOpenForGroup(null);
|
|
14447
14670
|
} })
|
|
14448
14671
|
] });
|
|
14449
14672
|
}
|
|
@@ -16115,7 +16338,7 @@ function StorageItemPreview(t0) {
|
|
|
16115
16338
|
}
|
|
16116
16339
|
let t5;
|
|
16117
16340
|
if ($[14] !== placeholder) {
|
|
16118
|
-
t5 = placeholder && /* @__PURE__ */ jsx("div", { onClick: _temp$
|
|
16341
|
+
t5 = placeholder && /* @__PURE__ */ jsx("div", { onClick: _temp$c, className: "flex flex-col items-center justify-center w-full h-full", children: /* @__PURE__ */ jsx(DescriptionIcon, { className: "text-surface-700 dark:text-surface-300" }) });
|
|
16119
16342
|
$[14] = placeholder;
|
|
16120
16343
|
$[15] = t5;
|
|
16121
16344
|
} else {
|
|
@@ -16138,7 +16361,7 @@ function StorageItemPreview(t0) {
|
|
|
16138
16361
|
}
|
|
16139
16362
|
return t6;
|
|
16140
16363
|
}
|
|
16141
|
-
function _temp$
|
|
16364
|
+
function _temp$c(e) {
|
|
16142
16365
|
return e.stopPropagation();
|
|
16143
16366
|
}
|
|
16144
16367
|
const dropZoneClasses = "box-border relative pt-[2px] items-center border border-transparent min-h-[254px] outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid";
|
|
@@ -16356,7 +16579,7 @@ function SortableStorageItem(t0) {
|
|
|
16356
16579
|
t4 = $[7];
|
|
16357
16580
|
}
|
|
16358
16581
|
const style = t4;
|
|
16359
|
-
const getImageSizeNumber = _temp$
|
|
16582
|
+
const getImageSizeNumber = _temp$b;
|
|
16360
16583
|
let child;
|
|
16361
16584
|
if (entry.storagePathOrDownloadUrl) {
|
|
16362
16585
|
const t52 = `storage_preview_${entry.storagePathOrDownloadUrl}`;
|
|
@@ -16431,7 +16654,7 @@ function SortableStorageItem(t0) {
|
|
|
16431
16654
|
}
|
|
16432
16655
|
return t6;
|
|
16433
16656
|
}
|
|
16434
|
-
function _temp$
|
|
16657
|
+
function _temp$b(previewSize) {
|
|
16435
16658
|
switch (previewSize) {
|
|
16436
16659
|
case "small": {
|
|
16437
16660
|
return 40;
|
|
@@ -17576,6 +17799,13 @@ function PropertyFieldBindingInternal(t0) {
|
|
|
17576
17799
|
} = t0;
|
|
17577
17800
|
const authController = useAuthController();
|
|
17578
17801
|
const customizationController = useCustomizationController();
|
|
17802
|
+
if (propertyKey === "created_by") {
|
|
17803
|
+
console.log("Rendering field for created_by", {
|
|
17804
|
+
propertyKey,
|
|
17805
|
+
property,
|
|
17806
|
+
context
|
|
17807
|
+
});
|
|
17808
|
+
}
|
|
17579
17809
|
let t1;
|
|
17580
17810
|
if ($[0] !== authController || $[1] !== autoFocus || $[2] !== context || $[3] !== customizationController.propertyConfigs || $[4] !== disabledProp || $[5] !== includeDescription || $[6] !== index || $[7] !== minimalistView || $[8] !== onPropertyChange || $[9] !== partOfArray || $[10] !== property || $[11] !== propertyKey || $[12] !== size || $[13] !== underlyingValueHasChanged) {
|
|
17581
17811
|
t1 = (fieldProps) => {
|
|
@@ -17887,7 +18117,7 @@ function MapFieldBinding(t0) {
|
|
|
17887
18117
|
} else {
|
|
17888
18118
|
t42 = $[20];
|
|
17889
18119
|
}
|
|
17890
|
-
t3 = Object.entries(mapProperties).filter(_temp$
|
|
18120
|
+
t3 = Object.entries(mapProperties).filter(_temp$a).map(t42);
|
|
17891
18121
|
$[6] = autoFocus;
|
|
17892
18122
|
$[7] = context;
|
|
17893
18123
|
$[8] = disabled;
|
|
@@ -17957,7 +18187,7 @@ function MapFieldBinding(t0) {
|
|
|
17957
18187
|
}
|
|
17958
18188
|
return t10;
|
|
17959
18189
|
}
|
|
17960
|
-
function _temp$
|
|
18190
|
+
function _temp$a(t0) {
|
|
17961
18191
|
const [, property_0] = t0;
|
|
17962
18192
|
return !isHidden(property_0);
|
|
17963
18193
|
}
|
|
@@ -19027,7 +19257,7 @@ function BlockEntry(t0) {
|
|
|
19027
19257
|
const property = t4;
|
|
19028
19258
|
let t5;
|
|
19029
19259
|
if ($[9] !== properties) {
|
|
19030
|
-
t5 = Object.entries(properties).map(_temp$
|
|
19260
|
+
t5 = Object.entries(properties).map(_temp$9);
|
|
19031
19261
|
$[9] = properties;
|
|
19032
19262
|
$[10] = t5;
|
|
19033
19263
|
} else {
|
|
@@ -19118,7 +19348,7 @@ function BlockEntry(t0) {
|
|
|
19118
19348
|
}
|
|
19119
19349
|
return t11;
|
|
19120
19350
|
}
|
|
19121
|
-
function _temp$
|
|
19351
|
+
function _temp$9(t0) {
|
|
19122
19352
|
const [key, property_0] = t0;
|
|
19123
19353
|
return {
|
|
19124
19354
|
id: key,
|
|
@@ -20440,7 +20670,7 @@ function PropertyConfigBadge(t0) {
|
|
|
20440
20670
|
propertyConfig,
|
|
20441
20671
|
disabled
|
|
20442
20672
|
} = t0;
|
|
20443
|
-
const classes = "h-8 w-8
|
|
20673
|
+
const classes = "h-8 w-8 flex items-center justify-center rounded-full shadow text-white " + (disabled ? "bg-surface-400 dark:bg-surface-600" : "");
|
|
20444
20674
|
let t1;
|
|
20445
20675
|
if ($[0] !== classes || $[1] !== disabled || $[2] !== propertyConfig) {
|
|
20446
20676
|
const defaultPropertyConfig = typeof propertyConfig?.property === "object" ? getDefaultFieldConfig(propertyConfig.property) : void 0;
|
|
@@ -20455,7 +20685,7 @@ function PropertyConfigBadge(t0) {
|
|
|
20455
20685
|
} else {
|
|
20456
20686
|
t3 = $[5];
|
|
20457
20687
|
}
|
|
20458
|
-
t1 = /* @__PURE__ */ jsx("div", { className: classes, style: t3, children: propertyConfig?.Icon ? getIconForWidget(propertyConfig, "
|
|
20688
|
+
t1 = /* @__PURE__ */ jsx("div", { className: classes, style: t3, children: propertyConfig?.Icon ? getIconForWidget(propertyConfig, "small") : getIconForWidget(defaultPropertyConfig, "small") });
|
|
20459
20689
|
$[0] = classes;
|
|
20460
20690
|
$[1] = disabled;
|
|
20461
20691
|
$[2] = propertyConfig;
|
|
@@ -20775,7 +21005,7 @@ const DefaultAppBar = function DefaultAppBar2(t0) {
|
|
|
20775
21005
|
}
|
|
20776
21006
|
let t7;
|
|
20777
21007
|
if ($[18] !== breadcrumbs.breadcrumbs) {
|
|
20778
|
-
t7 = (breadcrumbs.breadcrumbs ?? []).length > 0 && /* @__PURE__ */ jsx("div", { className: "mr-8 hidden lg:block", children: /* @__PURE__ */ jsx("div", { className: "flex flex-row gap-2", children: breadcrumbs.breadcrumbs.map(_temp$
|
|
21008
|
+
t7 = (breadcrumbs.breadcrumbs ?? []).length > 0 && /* @__PURE__ */ jsx("div", { className: "mr-8 hidden lg:block", children: /* @__PURE__ */ jsx("div", { className: "flex flex-row gap-2", children: breadcrumbs.breadcrumbs.map(_temp$8) }) });
|
|
20779
21009
|
$[18] = breadcrumbs.breadcrumbs;
|
|
20780
21010
|
$[19] = t7;
|
|
20781
21011
|
} else {
|
|
@@ -20887,7 +21117,7 @@ const DefaultAppBar = function DefaultAppBar2(t0) {
|
|
|
20887
21117
|
}
|
|
20888
21118
|
return t14;
|
|
20889
21119
|
};
|
|
20890
|
-
function _temp$
|
|
21120
|
+
function _temp$8(breadcrumb, index) {
|
|
20891
21121
|
return /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
|
|
20892
21122
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "/" }),
|
|
20893
21123
|
/* @__PURE__ */ jsx(Link, { className: "visited:text-inherit visited:dark:text-inherit block", to: breadcrumb.url, children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: breadcrumb.title }) }, index)
|
|
@@ -21321,7 +21551,7 @@ function SearchIconsView(t0) {
|
|
|
21321
21551
|
} else {
|
|
21322
21552
|
const searchResult = iconsSearch.search(value);
|
|
21323
21553
|
const limited = searchResult.slice(0, 50);
|
|
21324
|
-
setKeys(limited.map(_temp$
|
|
21554
|
+
setKeys(limited.map(_temp$7));
|
|
21325
21555
|
}
|
|
21326
21556
|
}, UPDATE_SEARCH_INDEX_WAIT_MS);
|
|
21327
21557
|
$[0] = t3;
|
|
@@ -21388,7 +21618,7 @@ function SearchIconsView(t0) {
|
|
|
21388
21618
|
}
|
|
21389
21619
|
return t8;
|
|
21390
21620
|
}
|
|
21391
|
-
function _temp$
|
|
21621
|
+
function _temp$7(e) {
|
|
21392
21622
|
return e.item.key;
|
|
21393
21623
|
}
|
|
21394
21624
|
function FieldCaption(t0) {
|
|
@@ -21472,7 +21702,7 @@ function useReferenceDialog(referenceDialogProps) {
|
|
|
21472
21702
|
}
|
|
21473
21703
|
return t2;
|
|
21474
21704
|
}
|
|
21475
|
-
const fireCMSLogo = "data:image/png;base64,
|
|
21705
|
+
const fireCMSLogo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAa9SURBVHgB7Z1NbBNHFMf/a7uBEgMOHy2pSlnUql+oEG7lgNgcqZAgR9RKSU5tT9mcqp6SXNoj5tBzHAmk3ggSUo/Ziko9skXqoVIlJm3Von4IhzhAIIk7b9ab+COJvZ63610nP8netWx5Z//73syb2Zm3BjqJXc4BixaQMgHjDFCWW5iVb83aH5eL8jdC7lS2a/Ny3wGyLvJGER3CQJRsCHZBfrqCBpHaRkCJuXYb2O9EKWg0AtpKtDF5gnJr5BA+BSVm/sAsQiY8AZW1PSHR7IhE2wwhX1NAWlrlywIhwC9gPISrR8iyFJDvnQIzvALapRH5PgG+uo0bAbLIfLYAJngEtJ+awOq03LOQCAxZN6bGOdw6BV3GyV1X7iEx4hFlGQGs3qt4jBbtW6Cq65bIXW0km7x06XG0SXsCei57S+4NoDtwZUs91I5LBxfQE28O8W0o2kVIEQeDihhMwO4Vz0cEFbF1AbtfPB8RRMTWBNw54vmIVkVsMYxRDYaJnYOpztl+1LQn1VxAu3QN3dPaBkGe80sTzX60vQt7geY0IsDcMw8r+wPO9N6H2TOPXHpBbn9DcfWgehHu09OYf/YGnNJ5uE9OIyJkjyWb3+rLrQVU9R71MMIbELD238XlvjsYOXQTuUywIbziSg6zC5cw8+/HcBbPI0RkwdJnt6oPtxFw6ZbX5eFn5PANDB+5qQTkQCyfwNSfX6Lw3ycICTkclh3c7IvNBQzJdUmwide+YhOunpCFHN1sFGcrAR+AsdUl95zo/xr2q98gCkhAEpIEZUQAL6Qr99XUNY2tsL3EOp5HjcPc2x9FJh5BVQQdk47NiAlkGgZOai2QOWD2xWM+kZah1nvwl+84W2xpfS9OVlthnQWuWugS8QgKhebeuYiBfffBRK7eCutduGng2ApxEM+HX0RjrPrThoD2Y7b7tHERz4dEvPXmVbXl+DvvNq1HlQWmLoMBClPiJJ4PlWn65KfgIbVuhV4jojrNLz2CJlTIBx+cQpwZ+vVbzBYvQZP1xqRigWkLDEybnyHuXDv+BYcrS4PrsWinIqC++17J3Qmth8EJeQlPTErTVDbqQAuajEUYKOsyfPgm9DGU0Rkc9V8S6r56KMDWH8V50SctMKM9WErumzSGj9yAPj0WubAFTXhcIlp4LnrZTFVmhbYNtWiMXaXI4Cm3cUYKmNIa80mieD76UYOyQGgN2SdZQLrnovsXJKAJDRgK0TE4upzaFpjLsHTQO8JB/R6JmYEuyz3A4gEkkuW90EVfwLvyZtXffUgkB03gfWihP0N1h0MCCmhQTOu7QadY0C97UdsCxd64rGQIjtijXXahbYHuvn4kFbf3GDQhC1zTCobcfdqF6Bhur+7FN8gCUy40KGb2wjlgImmQ++pf/LV5skABTb6ncCBhMF10Rwq46kCT/LFzSBozr5yFPituqjJNQUCDpLkxuS9DeUXVXbnybWgydXwQSWHquAUGHHrzBXSgCV3RJFghWV/hKIf7GsroKgKqelB7mfzoW0OIO0zWJ3nu0LsnoKoH9a2Qru64eRFxpXB0gMn6UPCnuFV35a6DgXz/h7F0Zd6La6y3GXUTLEt0f1i7g2guFzH387TaxgESb/DUKEffV/0d8tmT/oe6wYQyixUyF1gLCrGG3r3KWZaavAt1Aq7QghIWs4mDiCQelYGxvy5UBpAqagX0GhMWK1RHq4jIMOrR1rHPnv6cebCjPFO/4KZxmYM3V4ZyIJhgZPIPBxO/zyEKrvefw+TrlrJARmrqPp9IF9qE3biQ1VEsGlIUEGChDWGXyFwshMDIPy7G/voRA0sPwQFVEddl+MQU422CMYt876a9hCaLDVfJlUNrBQaePIQthbywIAJbJbnnjAyMZw+9F3LcSVnjMm0sNiTsEq2JuIYIIDHNZ0VYjx/gxPMicivPar4nweZ7cmoUmSwuwpHw0e0yHTVf8m8v5uvXRuwcZESS379tXpwW7sqtTELlVdlxuM3EI5oLqGLDNFWgAjsHUTnnpuymPWlE8Kc98dlNvNNAMAGJ3dRPNQSf2qEOkKYbIN3UsLjtiEcEt8BquiLEocGT7GS7mX/1BCS8fjMF2wmbZaTyUk9tlxOmFfQFJLwcM1JE4wqSgSNddpQjBSiPgD67SWiZsBcn5V8PIzZCkrvSTTPprsxZzsMRkPDCHQsdtcjwhPMJT8BqvHwM8pUaRuiQaCkHWKOBAAchE42APusPI1Bi0gMJTPAgvPk9NDmgGx9GsBVK0NIA1Mg3rdlTCx9z3rYha5zY2NLjMMo/eXMboxWsnv8Br15XnnLWoGsAAAAASUVORK5CYII=";
|
|
21476
21706
|
function useBrowserTitleAndIcon(name, logo) {
|
|
21477
21707
|
const $ = c(4);
|
|
21478
21708
|
let t0;
|
|
@@ -22014,7 +22244,7 @@ function useBuildLocalConfigurationPersistence() {
|
|
|
22014
22244
|
t0 = $[0];
|
|
22015
22245
|
}
|
|
22016
22246
|
const configCache = useRef(t0);
|
|
22017
|
-
const getCollectionFromStorage = _temp$
|
|
22247
|
+
const getCollectionFromStorage = _temp$6;
|
|
22018
22248
|
let t1;
|
|
22019
22249
|
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
22020
22250
|
t1 = (path) => {
|
|
@@ -22137,7 +22367,7 @@ function useBuildLocalConfigurationPersistence() {
|
|
|
22137
22367
|
}
|
|
22138
22368
|
return t11;
|
|
22139
22369
|
}
|
|
22140
|
-
function _temp$
|
|
22370
|
+
function _temp$6(storageKey) {
|
|
22141
22371
|
const item = localStorage.getItem(storageKey);
|
|
22142
22372
|
return item ? JSON.parse(item) : {};
|
|
22143
22373
|
}
|
|
@@ -23472,7 +23702,7 @@ function useBuildSideDialogsController() {
|
|
|
23472
23702
|
t3 = () => {
|
|
23473
23703
|
const state = location.state;
|
|
23474
23704
|
const panelKeys = state?.panels ?? [];
|
|
23475
|
-
const newPanels_0 = panelKeys.map((key) => routesStore.current[key]).filter(_temp$
|
|
23705
|
+
const newPanels_0 = panelKeys.map((key) => routesStore.current[key]).filter(_temp$5);
|
|
23476
23706
|
if (!equal(sidePanelsRef.current.map(_temp2$3), newPanels_0.map(_temp3$1))) {
|
|
23477
23707
|
updateSidePanels(newPanels_0);
|
|
23478
23708
|
}
|
|
@@ -23620,7 +23850,7 @@ function _temp3$1(p_1) {
|
|
|
23620
23850
|
function _temp2$3(p_0) {
|
|
23621
23851
|
return p_0.key;
|
|
23622
23852
|
}
|
|
23623
|
-
function _temp$
|
|
23853
|
+
function _temp$5(p) {
|
|
23624
23854
|
return Boolean(p);
|
|
23625
23855
|
}
|
|
23626
23856
|
function useBuildDataSource({
|
|
@@ -23915,7 +24145,7 @@ function useProjectLog(t0) {
|
|
|
23915
24145
|
const dataSourceKey = dataSourceDelegate.key;
|
|
23916
24146
|
let t1;
|
|
23917
24147
|
if ($[0] !== plugins) {
|
|
23918
|
-
t1 = plugins?.map(_temp$
|
|
24148
|
+
t1 = plugins?.map(_temp$4);
|
|
23919
24149
|
$[0] = plugins;
|
|
23920
24150
|
$[1] = t1;
|
|
23921
24151
|
} else {
|
|
@@ -23951,7 +24181,7 @@ function useProjectLog(t0) {
|
|
|
23951
24181
|
useEffect(t2, t3);
|
|
23952
24182
|
return accessResponse;
|
|
23953
24183
|
}
|
|
23954
|
-
function _temp$
|
|
24184
|
+
function _temp$4(plugin) {
|
|
23955
24185
|
return plugin.key;
|
|
23956
24186
|
}
|
|
23957
24187
|
function FireCMS(props) {
|
|
@@ -23964,22 +24194,27 @@ function FireCMS(props) {
|
|
|
23964
24194
|
authController,
|
|
23965
24195
|
storageSource,
|
|
23966
24196
|
dataSourceDelegate,
|
|
23967
|
-
plugins:
|
|
24197
|
+
plugins: _pluginsProp,
|
|
23968
24198
|
onAnalyticsEvent,
|
|
23969
24199
|
propertyConfigs,
|
|
23970
24200
|
entityViews,
|
|
23971
24201
|
entityActions,
|
|
23972
24202
|
components,
|
|
23973
24203
|
navigationController,
|
|
23974
|
-
apiKey
|
|
24204
|
+
apiKey,
|
|
24205
|
+
userManagement: _userManagement
|
|
23975
24206
|
} = props;
|
|
23976
|
-
if (
|
|
24207
|
+
if (_pluginsProp) {
|
|
23977
24208
|
console.warn("The `plugins` prop is deprecated in the FireCMS component. You should pass your plugins to `useBuildNavigationController` instead.");
|
|
23978
24209
|
}
|
|
23979
|
-
const plugins = navigationController.plugins ??
|
|
24210
|
+
const plugins = navigationController.plugins ?? _pluginsProp;
|
|
24211
|
+
const userManagement = plugins?.find((p) => p.userManagement)?.userManagement ?? _userManagement ?? {
|
|
24212
|
+
users: [],
|
|
24213
|
+
getUser: (uid) => null
|
|
24214
|
+
};
|
|
23980
24215
|
const sideDialogsController = useBuildSideDialogsController();
|
|
23981
24216
|
const sideEntityController = useBuildSideEntityController(navigationController, sideDialogsController, authController);
|
|
23982
|
-
const pluginsLoading = plugins?.some((
|
|
24217
|
+
const pluginsLoading = plugins?.some((p_0) => p_0.loading) ?? false;
|
|
23983
24218
|
const loading = authController.initialLoading || navigationController.loading || pluginsLoading;
|
|
23984
24219
|
const customizationController = {
|
|
23985
24220
|
dateTimeFormat,
|
|
@@ -24026,7 +24261,7 @@ function FireCMS(props) {
|
|
|
24026
24261
|
accessResponse?.message && /* @__PURE__ */ jsx(Typography, { children: accessResponse?.message })
|
|
24027
24262
|
] });
|
|
24028
24263
|
}
|
|
24029
|
-
return /* @__PURE__ */ jsx(AnalyticsContext.Provider, { value: analyticsController, children: /* @__PURE__ */ jsx(CustomizationControllerContext.Provider, { value: customizationController, children: /* @__PURE__ */ jsx(UserConfigurationPersistenceContext.Provider, { value: userConfigPersistence, children: /* @__PURE__ */ jsx(StorageSourceContext.Provider, { value: storageSource, children: /* @__PURE__ */ jsx(DataSourceContext.Provider, { value: dataSource, children: /* @__PURE__ */ jsx(AuthControllerContext.Provider, { value: authController, children: /* @__PURE__ */ jsx(SideDialogsControllerContext.Provider, { value: sideDialogsController, children: /* @__PURE__ */ jsx(SideEntityControllerContext.Provider, { value: sideEntityController, children: /* @__PURE__ */ jsx(NavigationContext.Provider, { value: navigationController, children: /* @__PURE__ */ jsx(DialogsProvider, { children: /* @__PURE__ */ jsx(BreadcrumbsProvider, { children: /* @__PURE__ */ jsx(FireCMSInternal, { loading, children }) }) }) }) }) }) }) }) }) }) }) });
|
|
24264
|
+
return /* @__PURE__ */ jsx(AnalyticsContext.Provider, { value: analyticsController, children: /* @__PURE__ */ jsx(CustomizationControllerContext.Provider, { value: customizationController, children: /* @__PURE__ */ jsx(UserConfigurationPersistenceContext.Provider, { value: userConfigPersistence, children: /* @__PURE__ */ jsx(StorageSourceContext.Provider, { value: storageSource, children: /* @__PURE__ */ jsx(DataSourceContext.Provider, { value: dataSource, children: /* @__PURE__ */ jsx(AuthControllerContext.Provider, { value: authController, children: /* @__PURE__ */ jsx(SideDialogsControllerContext.Provider, { value: sideDialogsController, children: /* @__PURE__ */ jsx(SideEntityControllerContext.Provider, { value: sideEntityController, children: /* @__PURE__ */ jsx(NavigationContext.Provider, { value: navigationController, children: /* @__PURE__ */ jsx(InternalUserManagementContext.Provider, { value: userManagement, children: /* @__PURE__ */ jsx(DialogsProvider, { children: /* @__PURE__ */ jsx(BreadcrumbsProvider, { children: /* @__PURE__ */ jsx(FireCMSInternal, { loading, children }) }) }) }) }) }) }) }) }) }) }) }) });
|
|
24030
24265
|
}
|
|
24031
24266
|
function FireCMSInternal(t0) {
|
|
24032
24267
|
const $ = c(7);
|
|
@@ -24196,7 +24431,7 @@ function DefaultDrawer(t0) {
|
|
|
24196
24431
|
} = navigation.topLevelNavigation;
|
|
24197
24432
|
let t1;
|
|
24198
24433
|
if ($[0] !== adminMenuOpen || $[1] !== analyticsController || $[2] !== className || $[3] !== closeDrawer || $[4] !== drawerOpen || $[5] !== groups || $[6] !== largeLayout || $[7] !== logo || $[8] !== navigate || $[9] !== navigationEntries || $[10] !== style || $[11] !== tooltipsOpen) {
|
|
24199
|
-
const adminViews = navigationEntries.filter(_temp$
|
|
24434
|
+
const adminViews = navigationEntries.filter(_temp$3) ?? [];
|
|
24200
24435
|
let t2;
|
|
24201
24436
|
let t3;
|
|
24202
24437
|
let t4;
|
|
@@ -24349,7 +24584,7 @@ function DefaultDrawer(t0) {
|
|
|
24349
24584
|
function _temp2$2(g) {
|
|
24350
24585
|
return g !== "Admin";
|
|
24351
24586
|
}
|
|
24352
|
-
function _temp$
|
|
24587
|
+
function _temp$3(e) {
|
|
24353
24588
|
return e.type === "admin";
|
|
24354
24589
|
}
|
|
24355
24590
|
function DrawerLogo(t0) {
|
|
@@ -24409,6 +24644,165 @@ function DrawerLogo(t0) {
|
|
|
24409
24644
|
}
|
|
24410
24645
|
return t6;
|
|
24411
24646
|
}
|
|
24647
|
+
function UserSelectFieldBinding(t0) {
|
|
24648
|
+
const $ = c(43);
|
|
24649
|
+
const {
|
|
24650
|
+
propertyKey,
|
|
24651
|
+
value,
|
|
24652
|
+
setValue,
|
|
24653
|
+
error,
|
|
24654
|
+
showError,
|
|
24655
|
+
disabled,
|
|
24656
|
+
property,
|
|
24657
|
+
includeDescription,
|
|
24658
|
+
size: t1
|
|
24659
|
+
} = t0;
|
|
24660
|
+
const size = t1 === void 0 ? "large" : t1;
|
|
24661
|
+
const {
|
|
24662
|
+
users,
|
|
24663
|
+
getUser
|
|
24664
|
+
} = useInternalUserManagementController();
|
|
24665
|
+
let t2;
|
|
24666
|
+
if ($[0] !== setValue) {
|
|
24667
|
+
t2 = (e) => {
|
|
24668
|
+
e.stopPropagation();
|
|
24669
|
+
e.preventDefault();
|
|
24670
|
+
setValue(null);
|
|
24671
|
+
};
|
|
24672
|
+
$[0] = setValue;
|
|
24673
|
+
$[1] = t2;
|
|
24674
|
+
} else {
|
|
24675
|
+
t2 = $[1];
|
|
24676
|
+
}
|
|
24677
|
+
const handleClearClick = t2;
|
|
24678
|
+
let t3;
|
|
24679
|
+
if ($[2] !== value) {
|
|
24680
|
+
t3 = value !== void 0 && value != null ? value.toString() : "";
|
|
24681
|
+
$[2] = value;
|
|
24682
|
+
$[3] = t3;
|
|
24683
|
+
} else {
|
|
24684
|
+
t3 = $[3];
|
|
24685
|
+
}
|
|
24686
|
+
let t4;
|
|
24687
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
24688
|
+
t4 = cls("w-full");
|
|
24689
|
+
$[4] = t4;
|
|
24690
|
+
} else {
|
|
24691
|
+
t4 = $[4];
|
|
24692
|
+
}
|
|
24693
|
+
let t5;
|
|
24694
|
+
if ($[5] !== property) {
|
|
24695
|
+
t5 = getIconForProperty(property, "small");
|
|
24696
|
+
$[5] = property;
|
|
24697
|
+
$[6] = t5;
|
|
24698
|
+
} else {
|
|
24699
|
+
t5 = $[6];
|
|
24700
|
+
}
|
|
24701
|
+
const t6 = property.validation?.required;
|
|
24702
|
+
let t7;
|
|
24703
|
+
if ($[7] !== property.name || $[8] !== t5 || $[9] !== t6) {
|
|
24704
|
+
t7 = /* @__PURE__ */ jsx(LabelWithIcon, { icon: t5, required: t6, title: property.name, className: "h-8 text-text-secondary dark:text-text-secondary-dark ml-3.5 my-0" });
|
|
24705
|
+
$[7] = property.name;
|
|
24706
|
+
$[8] = t5;
|
|
24707
|
+
$[9] = t6;
|
|
24708
|
+
$[10] = t7;
|
|
24709
|
+
} else {
|
|
24710
|
+
t7 = $[10];
|
|
24711
|
+
}
|
|
24712
|
+
let t8;
|
|
24713
|
+
if ($[11] !== propertyKey || $[12] !== t7) {
|
|
24714
|
+
t8 = /* @__PURE__ */ jsx(PropertyIdCopyTooltip, { propertyKey, children: t7 });
|
|
24715
|
+
$[11] = propertyKey;
|
|
24716
|
+
$[12] = t7;
|
|
24717
|
+
$[13] = t8;
|
|
24718
|
+
} else {
|
|
24719
|
+
t8 = $[13];
|
|
24720
|
+
}
|
|
24721
|
+
let t9;
|
|
24722
|
+
if ($[14] !== disabled || $[15] !== handleClearClick || $[16] !== property.clearable || $[17] !== value) {
|
|
24723
|
+
t9 = property.clearable && !disabled && value && /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: handleClearClick, children: /* @__PURE__ */ jsx(CloseIcon, { size: "small" }) });
|
|
24724
|
+
$[14] = disabled;
|
|
24725
|
+
$[15] = handleClearClick;
|
|
24726
|
+
$[16] = property.clearable;
|
|
24727
|
+
$[17] = value;
|
|
24728
|
+
$[18] = t9;
|
|
24729
|
+
} else {
|
|
24730
|
+
t9 = $[18];
|
|
24731
|
+
}
|
|
24732
|
+
let t10;
|
|
24733
|
+
if ($[19] !== setValue) {
|
|
24734
|
+
t10 = (updatedValue) => {
|
|
24735
|
+
const newValue = updatedValue || null;
|
|
24736
|
+
return setValue(newValue);
|
|
24737
|
+
};
|
|
24738
|
+
$[19] = setValue;
|
|
24739
|
+
$[20] = t10;
|
|
24740
|
+
} else {
|
|
24741
|
+
t10 = $[20];
|
|
24742
|
+
}
|
|
24743
|
+
let t11;
|
|
24744
|
+
if ($[21] !== getUser) {
|
|
24745
|
+
t11 = (userId) => {
|
|
24746
|
+
const user = getUser(userId);
|
|
24747
|
+
return /* @__PURE__ */ jsx(UserDisplay, { user });
|
|
24748
|
+
};
|
|
24749
|
+
$[21] = getUser;
|
|
24750
|
+
$[22] = t11;
|
|
24751
|
+
} else {
|
|
24752
|
+
t11 = $[22];
|
|
24753
|
+
}
|
|
24754
|
+
let t12;
|
|
24755
|
+
if ($[23] !== users) {
|
|
24756
|
+
t12 = users && users.map(_temp$2);
|
|
24757
|
+
$[23] = users;
|
|
24758
|
+
$[24] = t12;
|
|
24759
|
+
} else {
|
|
24760
|
+
t12 = $[24];
|
|
24761
|
+
}
|
|
24762
|
+
let t13;
|
|
24763
|
+
if ($[25] !== disabled || $[26] !== size || $[27] !== t10 || $[28] !== t11 || $[29] !== t12 || $[30] !== t3 || $[31] !== t8 || $[32] !== t9) {
|
|
24764
|
+
t13 = /* @__PURE__ */ jsx(Select, { value: t3, disabled, size, fullWidth: true, position: "item-aligned", inputClassName: t4, label: t8, endAdornment: t9, onValueChange: t10, renderValue: t11, children: t12 });
|
|
24765
|
+
$[25] = disabled;
|
|
24766
|
+
$[26] = size;
|
|
24767
|
+
$[27] = t10;
|
|
24768
|
+
$[28] = t11;
|
|
24769
|
+
$[29] = t12;
|
|
24770
|
+
$[30] = t3;
|
|
24771
|
+
$[31] = t8;
|
|
24772
|
+
$[32] = t9;
|
|
24773
|
+
$[33] = t13;
|
|
24774
|
+
} else {
|
|
24775
|
+
t13 = $[33];
|
|
24776
|
+
}
|
|
24777
|
+
let t14;
|
|
24778
|
+
if ($[34] !== disabled || $[35] !== error || $[36] !== includeDescription || $[37] !== property || $[38] !== showError) {
|
|
24779
|
+
t14 = /* @__PURE__ */ jsx(FieldHelperText, { includeDescription, showError, error, disabled, property });
|
|
24780
|
+
$[34] = disabled;
|
|
24781
|
+
$[35] = error;
|
|
24782
|
+
$[36] = includeDescription;
|
|
24783
|
+
$[37] = property;
|
|
24784
|
+
$[38] = showError;
|
|
24785
|
+
$[39] = t14;
|
|
24786
|
+
} else {
|
|
24787
|
+
t14 = $[39];
|
|
24788
|
+
}
|
|
24789
|
+
let t15;
|
|
24790
|
+
if ($[40] !== t13 || $[41] !== t14) {
|
|
24791
|
+
t15 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24792
|
+
t13,
|
|
24793
|
+
t14
|
|
24794
|
+
] });
|
|
24795
|
+
$[40] = t13;
|
|
24796
|
+
$[41] = t14;
|
|
24797
|
+
$[42] = t15;
|
|
24798
|
+
} else {
|
|
24799
|
+
t15 = $[42];
|
|
24800
|
+
}
|
|
24801
|
+
return t15;
|
|
24802
|
+
}
|
|
24803
|
+
function _temp$2(user_0) {
|
|
24804
|
+
return /* @__PURE__ */ jsx(SelectItem, { value: user_0.uid, children: /* @__PURE__ */ jsx(UserDisplay, { user: user_0 }) }, user_0.uid);
|
|
24805
|
+
}
|
|
24412
24806
|
function isDefaultFieldConfigId(id) {
|
|
24413
24807
|
return Object.keys(DEFAULT_FIELD_CONFIGS).includes(id);
|
|
24414
24808
|
}
|
|
@@ -24510,6 +24904,16 @@ const DEFAULT_FIELD_CONFIGS = {
|
|
|
24510
24904
|
Field: MultiSelectFieldBinding
|
|
24511
24905
|
}
|
|
24512
24906
|
},
|
|
24907
|
+
user_select: {
|
|
24908
|
+
key: "user_select",
|
|
24909
|
+
name: "User select",
|
|
24910
|
+
description: "Select a user from the user management system. Store the user ID.",
|
|
24911
|
+
Icon: PersonIcon,
|
|
24912
|
+
property: {
|
|
24913
|
+
dataType: "string",
|
|
24914
|
+
Field: UserSelectFieldBinding
|
|
24915
|
+
}
|
|
24916
|
+
},
|
|
24513
24917
|
number_input: {
|
|
24514
24918
|
key: "number_input",
|
|
24515
24919
|
name: "Number input",
|
|
@@ -24724,6 +25128,8 @@ function getDefaultFieldId(property) {
|
|
|
24724
25128
|
return "email";
|
|
24725
25129
|
} else if (property.enumValues) {
|
|
24726
25130
|
return "select";
|
|
25131
|
+
} else if (property.userSelect) {
|
|
25132
|
+
return "user_select";
|
|
24727
25133
|
} else if (property.reference) {
|
|
24728
25134
|
return "reference_as_string";
|
|
24729
25135
|
} else {
|
|
@@ -25763,6 +26169,7 @@ export {
|
|
|
25763
26169
|
SwitchFieldBinding,
|
|
25764
26170
|
TextFieldBinding,
|
|
25765
26171
|
UrlComponentPreview,
|
|
26172
|
+
UserPreview,
|
|
25766
26173
|
Vector,
|
|
25767
26174
|
VirtualTable,
|
|
25768
26175
|
addInitialSlash,
|
|
@@ -25897,6 +26304,7 @@ export {
|
|
|
25897
26304
|
useBuildNavigationController,
|
|
25898
26305
|
useClearRestoreValue,
|
|
25899
26306
|
useClipboard,
|
|
26307
|
+
useCollapsedGroups,
|
|
25900
26308
|
useCollectionFetch,
|
|
25901
26309
|
useColumnIds,
|
|
25902
26310
|
useCustomizationController,
|
|
@@ -25907,6 +26315,7 @@ export {
|
|
|
25907
26315
|
useDialogsController,
|
|
25908
26316
|
useEntityFetch,
|
|
25909
26317
|
useFireCMSContext,
|
|
26318
|
+
useInternalUserManagementController,
|
|
25910
26319
|
useLargeLayout,
|
|
25911
26320
|
useModeController,
|
|
25912
26321
|
useNavigationController,
|