@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.umd.js
CHANGED
|
@@ -208,9 +208,14 @@
|
|
|
208
208
|
* to the root of the database).
|
|
209
209
|
*/
|
|
210
210
|
path;
|
|
211
|
-
|
|
211
|
+
/**
|
|
212
|
+
* Optional database ID where the entity is stored (if multiple databases are used)
|
|
213
|
+
*/
|
|
214
|
+
databaseId;
|
|
215
|
+
constructor(id, path, databaseId) {
|
|
212
216
|
this.id = id;
|
|
213
217
|
this.path = path;
|
|
218
|
+
this.databaseId = databaseId;
|
|
214
219
|
}
|
|
215
220
|
get pathWithId() {
|
|
216
221
|
return `${this.path}/${this.id}`;
|
|
@@ -515,7 +520,7 @@
|
|
|
515
520
|
return result;
|
|
516
521
|
}
|
|
517
522
|
function getReferenceFrom(entity) {
|
|
518
|
-
return new EntityReference(entity.id, entity.path);
|
|
523
|
+
return new EntityReference(entity.id, entity.path, entity.databaseId);
|
|
519
524
|
}
|
|
520
525
|
function traverseValuesProperties(inputValues, properties, operation) {
|
|
521
526
|
const updatedValues = Object.entries(properties).map(([key, property]) => {
|
|
@@ -4066,6 +4071,10 @@
|
|
|
4066
4071
|
const useAnalyticsController = () => {
|
|
4067
4072
|
return React.useContext(AnalyticsContext);
|
|
4068
4073
|
};
|
|
4074
|
+
const InternalUserManagementContext = React.createContext({});
|
|
4075
|
+
const useInternalUserManagementController = () => {
|
|
4076
|
+
return React.useContext(InternalUserManagementContext);
|
|
4077
|
+
};
|
|
4069
4078
|
const useFireCMSContext = () => {
|
|
4070
4079
|
const authController = useAuthController();
|
|
4071
4080
|
const sideDialogsController = useSideDialogsController();
|
|
@@ -4078,6 +4087,7 @@
|
|
|
4078
4087
|
const dialogsController = useDialogsController();
|
|
4079
4088
|
const customizationController = useCustomizationController();
|
|
4080
4089
|
const analyticsController = useAnalyticsController();
|
|
4090
|
+
const userManagement = useInternalUserManagementController();
|
|
4081
4091
|
const fireCMSContextRef = React.useRef({
|
|
4082
4092
|
authController,
|
|
4083
4093
|
sideDialogsController,
|
|
@@ -4089,7 +4099,8 @@
|
|
|
4089
4099
|
userConfigPersistence,
|
|
4090
4100
|
dialogsController,
|
|
4091
4101
|
customizationController,
|
|
4092
|
-
analyticsController
|
|
4102
|
+
analyticsController,
|
|
4103
|
+
userManagement
|
|
4093
4104
|
});
|
|
4094
4105
|
React.useEffect(() => {
|
|
4095
4106
|
fireCMSContextRef.current = {
|
|
@@ -4103,7 +4114,8 @@
|
|
|
4103
4114
|
userConfigPersistence,
|
|
4104
4115
|
dialogsController,
|
|
4105
4116
|
customizationController,
|
|
4106
|
-
analyticsController
|
|
4117
|
+
analyticsController,
|
|
4118
|
+
userManagement
|
|
4107
4119
|
};
|
|
4108
4120
|
}, [authController, dialogsController, navigation, sideDialogsController]);
|
|
4109
4121
|
return fireCMSContextRef.current;
|
|
@@ -4164,7 +4176,7 @@
|
|
|
4164
4176
|
}
|
|
4165
4177
|
setDataLoading(false);
|
|
4166
4178
|
setDataLoadingError(void 0);
|
|
4167
|
-
setData(entities.map(_temp$
|
|
4179
|
+
setData(entities.map(_temp$t));
|
|
4168
4180
|
setNoMoreToLoad(!itemCount || entities.length < itemCount);
|
|
4169
4181
|
};
|
|
4170
4182
|
const onError = (error) => {
|
|
@@ -4197,7 +4209,7 @@
|
|
|
4197
4209
|
orderBy: sortByProperty,
|
|
4198
4210
|
order: currentSort
|
|
4199
4211
|
}).then(onEntitiesUpdate).catch(onError);
|
|
4200
|
-
return _temp2$
|
|
4212
|
+
return _temp2$e;
|
|
4201
4213
|
}
|
|
4202
4214
|
};
|
|
4203
4215
|
$[4] = collection;
|
|
@@ -4245,9 +4257,9 @@
|
|
|
4245
4257
|
}
|
|
4246
4258
|
return t5;
|
|
4247
4259
|
}
|
|
4248
|
-
function _temp2$
|
|
4260
|
+
function _temp2$e() {
|
|
4249
4261
|
}
|
|
4250
|
-
function _temp$
|
|
4262
|
+
function _temp$t(e_0) {
|
|
4251
4263
|
return {
|
|
4252
4264
|
...e_0
|
|
4253
4265
|
};
|
|
@@ -4312,7 +4324,7 @@
|
|
|
4312
4324
|
setEntity(CACHE[`${path}/${entityId}`]);
|
|
4313
4325
|
setDataLoading(false);
|
|
4314
4326
|
setDataLoadingError(void 0);
|
|
4315
|
-
return _temp$
|
|
4327
|
+
return _temp$s;
|
|
4316
4328
|
} else {
|
|
4317
4329
|
if (entityId && path && collection) {
|
|
4318
4330
|
if (dataSource.listenEntity) {
|
|
@@ -4331,7 +4343,7 @@
|
|
|
4331
4343
|
databaseId,
|
|
4332
4344
|
collection
|
|
4333
4345
|
}).then(onEntityUpdate).catch(onError);
|
|
4334
|
-
return _temp2$
|
|
4346
|
+
return _temp2$d;
|
|
4335
4347
|
}
|
|
4336
4348
|
} else {
|
|
4337
4349
|
onEntityUpdate(void 0);
|
|
@@ -4378,9 +4390,9 @@
|
|
|
4378
4390
|
}
|
|
4379
4391
|
function _temp3$4() {
|
|
4380
4392
|
}
|
|
4381
|
-
function _temp2$
|
|
4393
|
+
function _temp2$d() {
|
|
4382
4394
|
}
|
|
4383
|
-
function _temp$
|
|
4395
|
+
function _temp$s() {
|
|
4384
4396
|
}
|
|
4385
4397
|
async function saveEntityWithCallbacks({
|
|
4386
4398
|
collection,
|
|
@@ -4760,6 +4772,48 @@
|
|
|
4760
4772
|
if (typeof window === "undefined") return false;
|
|
4761
4773
|
return window.matchMedia(`(min-width: ${breakpoints[breakpoint] + 1}px)`).matches;
|
|
4762
4774
|
}
|
|
4775
|
+
function useCollapsedGroups(groupNames) {
|
|
4776
|
+
const [collapsedGroups, setCollapsedGroups] = React.useState(() => {
|
|
4777
|
+
try {
|
|
4778
|
+
const stored = localStorage.getItem("firecms-collapsed-groups");
|
|
4779
|
+
return stored ? JSON.parse(stored) : {};
|
|
4780
|
+
} catch {
|
|
4781
|
+
return {};
|
|
4782
|
+
}
|
|
4783
|
+
});
|
|
4784
|
+
React.useEffect(() => {
|
|
4785
|
+
try {
|
|
4786
|
+
localStorage.setItem("firecms-collapsed-groups", JSON.stringify(collapsedGroups));
|
|
4787
|
+
} catch {
|
|
4788
|
+
}
|
|
4789
|
+
}, [collapsedGroups]);
|
|
4790
|
+
React.useEffect(() => {
|
|
4791
|
+
if (groupNames.length === 0) return;
|
|
4792
|
+
const currentGroupNames = new Set(groupNames);
|
|
4793
|
+
setCollapsedGroups((prev) => {
|
|
4794
|
+
const cleaned = Object.fromEntries(Object.entries(prev).filter(([groupName]) => currentGroupNames.has(groupName)));
|
|
4795
|
+
const prevKeys = Object.keys(prev);
|
|
4796
|
+
const cleanedKeys = Object.keys(cleaned);
|
|
4797
|
+
if (prevKeys.length === cleanedKeys.length && prevKeys.every((key) => cleanedKeys.includes(key))) {
|
|
4798
|
+
return prev;
|
|
4799
|
+
}
|
|
4800
|
+
return cleaned;
|
|
4801
|
+
});
|
|
4802
|
+
}, [groupNames]);
|
|
4803
|
+
const isGroupCollapsed = React.useCallback((name) => {
|
|
4804
|
+
return !!collapsedGroups[name];
|
|
4805
|
+
}, [collapsedGroups]);
|
|
4806
|
+
const toggleGroupCollapsed = React.useCallback((name_0) => {
|
|
4807
|
+
setCollapsedGroups((prev_0) => ({
|
|
4808
|
+
...prev_0,
|
|
4809
|
+
[name_0]: !prev_0[name_0]
|
|
4810
|
+
}));
|
|
4811
|
+
}, []);
|
|
4812
|
+
return {
|
|
4813
|
+
isGroupCollapsed,
|
|
4814
|
+
toggleGroupCollapsed
|
|
4815
|
+
};
|
|
4816
|
+
}
|
|
4763
4817
|
function ErrorTooltip(props) {
|
|
4764
4818
|
const $ = reactCompilerRuntime.c(2);
|
|
4765
4819
|
let t0;
|
|
@@ -4780,6 +4834,7 @@
|
|
|
4780
4834
|
tooltip
|
|
4781
4835
|
} = t0;
|
|
4782
4836
|
const component = error instanceof Error ? error.message : error;
|
|
4837
|
+
console.warn("ErrorView", JSON.stringify(error));
|
|
4783
4838
|
let t1;
|
|
4784
4839
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
4785
4840
|
t1 = /* @__PURE__ */ jsxRuntime.jsx(ui.ErrorIcon, { className: "mx-2", size: "small", color: "error" });
|
|
@@ -4964,7 +5019,7 @@
|
|
|
4964
5019
|
}
|
|
4965
5020
|
let t9;
|
|
4966
5021
|
if ($[16] !== url) {
|
|
4967
|
-
t9 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Open image in new tab", side: "bottom", children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { className: "invisible group-hover:visible", variant: "filled", component: "a", href: url, rel: "noopener noreferrer", target: "_blank", size: "smallest", onClick: _temp$
|
|
5022
|
+
t9 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Open image in new tab", side: "bottom", children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { className: "invisible group-hover:visible", variant: "filled", component: "a", href: url, rel: "noopener noreferrer", target: "_blank", size: "smallest", onClick: _temp$r, children: t8 }) });
|
|
4968
5023
|
$[16] = url;
|
|
4969
5024
|
$[17] = t9;
|
|
4970
5025
|
} else {
|
|
@@ -4998,7 +5053,7 @@
|
|
|
4998
5053
|
}
|
|
4999
5054
|
return t11;
|
|
5000
5055
|
}
|
|
5001
|
-
function _temp$
|
|
5056
|
+
function _temp$r(e_0) {
|
|
5002
5057
|
return e_0.stopPropagation();
|
|
5003
5058
|
}
|
|
5004
5059
|
function UrlComponentPreview(t0) {
|
|
@@ -5031,7 +5086,7 @@
|
|
|
5031
5086
|
}
|
|
5032
5087
|
let t3;
|
|
5033
5088
|
if ($[2] !== url) {
|
|
5034
|
-
t3 = /* @__PURE__ */ jsxRuntime.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$
|
|
5089
|
+
t3 = /* @__PURE__ */ jsxRuntime.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: [
|
|
5035
5090
|
t2,
|
|
5036
5091
|
url
|
|
5037
5092
|
] });
|
|
@@ -5134,7 +5189,7 @@
|
|
|
5134
5189
|
}
|
|
5135
5190
|
let t7;
|
|
5136
5191
|
if ($[24] !== t4 || $[25] !== t6 || $[26] !== url) {
|
|
5137
|
-
t7 = /* @__PURE__ */ jsxRuntime.jsxs("a", { href: url, rel: "noopener noreferrer", target: "_blank", onClick: _temp2$
|
|
5192
|
+
t7 = /* @__PURE__ */ jsxRuntime.jsxs("a", { href: url, rel: "noopener noreferrer", target: "_blank", onClick: _temp2$c, className: "flex flex-col items-center justify-center", style: t4, children: [
|
|
5138
5193
|
t5,
|
|
5139
5194
|
t6
|
|
5140
5195
|
] });
|
|
@@ -5159,10 +5214,10 @@
|
|
|
5159
5214
|
}
|
|
5160
5215
|
}
|
|
5161
5216
|
}
|
|
5162
|
-
function _temp2$
|
|
5217
|
+
function _temp2$c(e_0) {
|
|
5163
5218
|
return e_0.stopPropagation();
|
|
5164
5219
|
}
|
|
5165
|
-
function _temp$
|
|
5220
|
+
function _temp$q(e) {
|
|
5166
5221
|
e.preventDefault();
|
|
5167
5222
|
}
|
|
5168
5223
|
function VideoPreview(t0) {
|
|
@@ -5296,7 +5351,7 @@
|
|
|
5296
5351
|
if (Array.isArray(arrayProperty.of)) {
|
|
5297
5352
|
let t1;
|
|
5298
5353
|
if ($[6] !== arrayProperty.of) {
|
|
5299
|
-
t1 = arrayProperty.of.map(_temp$
|
|
5354
|
+
t1 = arrayProperty.of.map(_temp$p);
|
|
5300
5355
|
$[6] = arrayProperty.of;
|
|
5301
5356
|
$[7] = t1;
|
|
5302
5357
|
} else {
|
|
@@ -5434,7 +5489,7 @@
|
|
|
5434
5489
|
}
|
|
5435
5490
|
return content || null;
|
|
5436
5491
|
}
|
|
5437
|
-
function _temp$
|
|
5492
|
+
function _temp$p(p, i) {
|
|
5438
5493
|
return renderGenericArrayCell(p, i);
|
|
5439
5494
|
}
|
|
5440
5495
|
function renderMap(property, size) {
|
|
@@ -5793,7 +5848,7 @@
|
|
|
5793
5848
|
}
|
|
5794
5849
|
let t3;
|
|
5795
5850
|
if ($[11] !== t2) {
|
|
5796
|
-
t3 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2", children: t2 });
|
|
5851
|
+
t3 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full flex flex-col gap-2", children: t2 });
|
|
5797
5852
|
$[11] = t2;
|
|
5798
5853
|
$[12] = t3;
|
|
5799
5854
|
} else {
|
|
@@ -6005,7 +6060,7 @@
|
|
|
6005
6060
|
}
|
|
6006
6061
|
let t0;
|
|
6007
6062
|
if ($[8] !== props) {
|
|
6008
|
-
t0 = /* @__PURE__ */ jsxRuntime.jsx(ReferencePreviewInternal, { ...props });
|
|
6063
|
+
t0 = /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(ReferencePreviewInternal, { ...props }) });
|
|
6009
6064
|
$[8] = props;
|
|
6010
6065
|
$[9] = t0;
|
|
6011
6066
|
} else {
|
|
@@ -6617,7 +6672,7 @@
|
|
|
6617
6672
|
}
|
|
6618
6673
|
let t1;
|
|
6619
6674
|
if ($[1] !== value) {
|
|
6620
|
-
t1 = Object.entries(value).map(_temp$
|
|
6675
|
+
t1 = Object.entries(value).map(_temp$o);
|
|
6621
6676
|
$[1] = value;
|
|
6622
6677
|
$[2] = t1;
|
|
6623
6678
|
} else {
|
|
@@ -6633,7 +6688,7 @@
|
|
|
6633
6688
|
}
|
|
6634
6689
|
return t2;
|
|
6635
6690
|
}
|
|
6636
|
-
function _temp$
|
|
6691
|
+
function _temp$o(t0) {
|
|
6637
6692
|
const [key, childValue] = t0;
|
|
6638
6693
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls(ui.defaultBorderMixin, "last:border-b-0 border-b"), children: [
|
|
6639
6694
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row pt-0.5 pb-0.5 gap-2", children: [
|
|
@@ -6766,6 +6821,141 @@
|
|
|
6766
6821
|
return t1;
|
|
6767
6822
|
}
|
|
6768
6823
|
}
|
|
6824
|
+
function UserDisplay(t0) {
|
|
6825
|
+
const $ = reactCompilerRuntime.c(18);
|
|
6826
|
+
const {
|
|
6827
|
+
user
|
|
6828
|
+
} = t0;
|
|
6829
|
+
if (!user) {
|
|
6830
|
+
let t12;
|
|
6831
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6832
|
+
t12 = /* @__PURE__ */ jsxRuntime.jsx(EmptyValue, {});
|
|
6833
|
+
$[0] = t12;
|
|
6834
|
+
} else {
|
|
6835
|
+
t12 = $[0];
|
|
6836
|
+
}
|
|
6837
|
+
return t12;
|
|
6838
|
+
}
|
|
6839
|
+
let t1;
|
|
6840
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6841
|
+
t1 = ui.cls("inline-flex items-center gap-4 px-2 py-1 rounded-xl", "bg-surface-accent-100 dark:bg-surface-accent-800", "border", ui.defaultBorderMixin);
|
|
6842
|
+
$[1] = t1;
|
|
6843
|
+
} else {
|
|
6844
|
+
t1 = $[1];
|
|
6845
|
+
}
|
|
6846
|
+
let t2;
|
|
6847
|
+
if ($[2] !== user.displayName || $[3] !== user.email || $[4] !== user.photoURL) {
|
|
6848
|
+
t2 = user.photoURL ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: user.photoURL, alt: user.displayName || user.email || "User", className: ui.cls("rounded-full object-cover", "w-6 h-6") }) : /* @__PURE__ */ jsxRuntime.jsx(ui.AccountCircleIcon, { className: ui.cls("text-text-secondary dark:text-text-secondary-dark", "w-6 h-6") });
|
|
6849
|
+
$[2] = user.displayName;
|
|
6850
|
+
$[3] = user.email;
|
|
6851
|
+
$[4] = user.photoURL;
|
|
6852
|
+
$[5] = t2;
|
|
6853
|
+
} else {
|
|
6854
|
+
t2 = $[5];
|
|
6855
|
+
}
|
|
6856
|
+
let t3;
|
|
6857
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6858
|
+
t3 = ui.cls("font-regular truncate", "text-sm");
|
|
6859
|
+
$[6] = t3;
|
|
6860
|
+
} else {
|
|
6861
|
+
t3 = $[6];
|
|
6862
|
+
}
|
|
6863
|
+
const t4 = user.displayName || user.email || "-";
|
|
6864
|
+
let t5;
|
|
6865
|
+
if ($[7] !== t4) {
|
|
6866
|
+
t5 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: t3, children: t4 });
|
|
6867
|
+
$[7] = t4;
|
|
6868
|
+
$[8] = t5;
|
|
6869
|
+
} else {
|
|
6870
|
+
t5 = $[8];
|
|
6871
|
+
}
|
|
6872
|
+
let t6;
|
|
6873
|
+
if ($[9] !== user.displayName || $[10] !== user.email) {
|
|
6874
|
+
t6 = user.displayName && user.email && /* @__PURE__ */ jsxRuntime.jsx("span", { className: ui.cls("text-text-secondary dark:text-text-secondary-dark truncate", "text-xs"), children: user.email });
|
|
6875
|
+
$[9] = user.displayName;
|
|
6876
|
+
$[10] = user.email;
|
|
6877
|
+
$[11] = t6;
|
|
6878
|
+
} else {
|
|
6879
|
+
t6 = $[11];
|
|
6880
|
+
}
|
|
6881
|
+
let t7;
|
|
6882
|
+
if ($[12] !== t5 || $[13] !== t6) {
|
|
6883
|
+
t7 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col min-w-0", children: [
|
|
6884
|
+
t5,
|
|
6885
|
+
t6
|
|
6886
|
+
] });
|
|
6887
|
+
$[12] = t5;
|
|
6888
|
+
$[13] = t6;
|
|
6889
|
+
$[14] = t7;
|
|
6890
|
+
} else {
|
|
6891
|
+
t7 = $[14];
|
|
6892
|
+
}
|
|
6893
|
+
let t8;
|
|
6894
|
+
if ($[15] !== t2 || $[16] !== t7) {
|
|
6895
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t1, children: [
|
|
6896
|
+
t2,
|
|
6897
|
+
t7
|
|
6898
|
+
] });
|
|
6899
|
+
$[15] = t2;
|
|
6900
|
+
$[16] = t7;
|
|
6901
|
+
$[17] = t8;
|
|
6902
|
+
} else {
|
|
6903
|
+
t8 = $[17];
|
|
6904
|
+
}
|
|
6905
|
+
return t8;
|
|
6906
|
+
}
|
|
6907
|
+
function UserPreview(t0) {
|
|
6908
|
+
const $ = reactCompilerRuntime.c(8);
|
|
6909
|
+
const {
|
|
6910
|
+
value
|
|
6911
|
+
} = t0;
|
|
6912
|
+
const {
|
|
6913
|
+
getUser
|
|
6914
|
+
} = useInternalUserManagementController();
|
|
6915
|
+
if (!value) {
|
|
6916
|
+
let t12;
|
|
6917
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6918
|
+
t12 = /* @__PURE__ */ jsxRuntime.jsx(EmptyValue, {});
|
|
6919
|
+
$[0] = t12;
|
|
6920
|
+
} else {
|
|
6921
|
+
t12 = $[0];
|
|
6922
|
+
}
|
|
6923
|
+
return t12;
|
|
6924
|
+
}
|
|
6925
|
+
let t1;
|
|
6926
|
+
if ($[1] !== getUser || $[2] !== value) {
|
|
6927
|
+
t1 = getUser(value);
|
|
6928
|
+
$[1] = getUser;
|
|
6929
|
+
$[2] = value;
|
|
6930
|
+
$[3] = t1;
|
|
6931
|
+
} else {
|
|
6932
|
+
t1 = $[3];
|
|
6933
|
+
}
|
|
6934
|
+
const user = t1;
|
|
6935
|
+
if (!user) {
|
|
6936
|
+
let t22;
|
|
6937
|
+
if ($[4] !== value) {
|
|
6938
|
+
t22 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "caption", color: "secondary", children: [
|
|
6939
|
+
"User not found: ",
|
|
6940
|
+
value
|
|
6941
|
+
] });
|
|
6942
|
+
$[4] = value;
|
|
6943
|
+
$[5] = t22;
|
|
6944
|
+
} else {
|
|
6945
|
+
t22 = $[5];
|
|
6946
|
+
}
|
|
6947
|
+
return t22;
|
|
6948
|
+
}
|
|
6949
|
+
let t2;
|
|
6950
|
+
if ($[6] !== user) {
|
|
6951
|
+
t2 = /* @__PURE__ */ jsxRuntime.jsx(UserDisplay, { user });
|
|
6952
|
+
$[6] = user;
|
|
6953
|
+
$[7] = t2;
|
|
6954
|
+
} else {
|
|
6955
|
+
t2 = $[7];
|
|
6956
|
+
}
|
|
6957
|
+
return t2;
|
|
6958
|
+
}
|
|
6769
6959
|
const PropertyPreview = React.memo(function PropertyPreview2(props) {
|
|
6770
6960
|
const $ = reactCompilerRuntime.c(31);
|
|
6771
6961
|
const authController = useAuthController();
|
|
@@ -6866,21 +7056,25 @@
|
|
|
6866
7056
|
}
|
|
6867
7057
|
content = t02;
|
|
6868
7058
|
} else {
|
|
6869
|
-
if (stringProperty.
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
t02 = /* @__PURE__ */ jsxRuntime.jsx(EmptyValue, {});
|
|
6876
|
-
$[23] = t02;
|
|
7059
|
+
if (stringProperty.userSelect) {
|
|
7060
|
+
content = /* @__PURE__ */ jsxRuntime.jsx(UserPreview, { value, property: stringProperty, propertyKey, size: props.size });
|
|
7061
|
+
} else {
|
|
7062
|
+
if (stringProperty.reference) {
|
|
7063
|
+
if (typeof stringProperty.reference.path === "string") {
|
|
7064
|
+
content = /* @__PURE__ */ jsxRuntime.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) });
|
|
6877
7065
|
} else {
|
|
6878
|
-
t02
|
|
7066
|
+
let t02;
|
|
7067
|
+
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
7068
|
+
t02 = /* @__PURE__ */ jsxRuntime.jsx(EmptyValue, {});
|
|
7069
|
+
$[23] = t02;
|
|
7070
|
+
} else {
|
|
7071
|
+
t02 = $[23];
|
|
7072
|
+
}
|
|
7073
|
+
content = t02;
|
|
6879
7074
|
}
|
|
6880
|
-
|
|
7075
|
+
} else {
|
|
7076
|
+
content = /* @__PURE__ */ jsxRuntime.jsx(StringPropertyPreview, { ...props, property: stringProperty, value });
|
|
6881
7077
|
}
|
|
6882
|
-
} else {
|
|
6883
|
-
content = /* @__PURE__ */ jsxRuntime.jsx(StringPropertyPreview, { ...props, property: stringProperty, value });
|
|
6884
7078
|
}
|
|
6885
7079
|
}
|
|
6886
7080
|
}
|
|
@@ -7401,7 +7595,7 @@
|
|
|
7401
7595
|
console.trace("onChange");
|
|
7402
7596
|
if (valueType === "number") {
|
|
7403
7597
|
if (multiple) {
|
|
7404
|
-
const newValue = updatedValue.map(_temp$
|
|
7598
|
+
const newValue = updatedValue.map(_temp$n);
|
|
7405
7599
|
updateValue(newValue);
|
|
7406
7600
|
} else {
|
|
7407
7601
|
updateValue(parseFloat(updatedValue));
|
|
@@ -7438,7 +7632,7 @@
|
|
|
7438
7632
|
const renderValue = t3;
|
|
7439
7633
|
let t4;
|
|
7440
7634
|
if ($[10] !== disabled || $[11] !== enumValues || $[12] !== internalValue || $[13] !== multiple || $[14] !== onChange || $[15] !== renderValue || $[16] !== small || $[17] !== validValue) {
|
|
7441
|
-
t4 = multiple ? /* @__PURE__ */ jsxRuntime.jsx(ui.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$
|
|
7635
|
+
t4 = multiple ? /* @__PURE__ */ jsxRuntime.jsx(ui.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__ */ jsxRuntime.jsx(ui.MultiSelectItem, { value: String(enumConfig.id), children: /* @__PURE__ */ jsxRuntime.jsx(EnumValuesChip, { enumKey: enumConfig.id, enumValues, size: small ? "small" : "medium" }) }, enumConfig.id)) }) : /* @__PURE__ */ jsxRuntime.jsx(ui.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__ */ jsxRuntime.jsx(ui.SelectItem, { value: String(enumConfig_0.id), children: /* @__PURE__ */ jsxRuntime.jsx(EnumValuesChip, { enumKey: enumConfig_0.id, enumValues, size: small ? "small" : "medium" }) }, enumConfig_0.id)) });
|
|
7442
7636
|
$[10] = disabled;
|
|
7443
7637
|
$[11] = enumValues;
|
|
7444
7638
|
$[12] = internalValue;
|
|
@@ -7453,10 +7647,10 @@
|
|
|
7453
7647
|
}
|
|
7454
7648
|
return t4;
|
|
7455
7649
|
}
|
|
7456
|
-
function _temp2$
|
|
7650
|
+
function _temp2$b(v_0) {
|
|
7457
7651
|
return v_0.toString();
|
|
7458
7652
|
}
|
|
7459
|
-
function _temp$
|
|
7653
|
+
function _temp$n(v) {
|
|
7460
7654
|
return parseFloat(v);
|
|
7461
7655
|
}
|
|
7462
7656
|
function VirtualTableNumberInput(props) {
|
|
@@ -7587,6 +7781,89 @@
|
|
|
7587
7781
|
}
|
|
7588
7782
|
return t4;
|
|
7589
7783
|
}
|
|
7784
|
+
function VirtualTableUserSelect(props) {
|
|
7785
|
+
const $ = reactCompilerRuntime.c(15);
|
|
7786
|
+
const {
|
|
7787
|
+
internalValue,
|
|
7788
|
+
disabled,
|
|
7789
|
+
focused,
|
|
7790
|
+
updateValue,
|
|
7791
|
+
multiple
|
|
7792
|
+
} = props;
|
|
7793
|
+
const {
|
|
7794
|
+
users,
|
|
7795
|
+
getUser
|
|
7796
|
+
} = useInternalUserManagementController();
|
|
7797
|
+
const validValue = Array.isArray(internalValue) && multiple || !Array.isArray(internalValue) && !multiple;
|
|
7798
|
+
const ref = React.useRef(null);
|
|
7799
|
+
let t0;
|
|
7800
|
+
let t1;
|
|
7801
|
+
if ($[0] !== focused) {
|
|
7802
|
+
t0 = () => {
|
|
7803
|
+
if (ref.current && focused) {
|
|
7804
|
+
ref.current?.focus({
|
|
7805
|
+
preventScroll: true
|
|
7806
|
+
});
|
|
7807
|
+
}
|
|
7808
|
+
};
|
|
7809
|
+
t1 = [focused, ref];
|
|
7810
|
+
$[0] = focused;
|
|
7811
|
+
$[1] = t0;
|
|
7812
|
+
$[2] = t1;
|
|
7813
|
+
} else {
|
|
7814
|
+
t0 = $[1];
|
|
7815
|
+
t1 = $[2];
|
|
7816
|
+
}
|
|
7817
|
+
React.useEffect(t0, t1);
|
|
7818
|
+
let t2;
|
|
7819
|
+
if ($[3] !== updateValue) {
|
|
7820
|
+
t2 = (updatedValue) => {
|
|
7821
|
+
if (!updatedValue) {
|
|
7822
|
+
updateValue(null);
|
|
7823
|
+
} else {
|
|
7824
|
+
updateValue(updatedValue);
|
|
7825
|
+
}
|
|
7826
|
+
};
|
|
7827
|
+
$[3] = updateValue;
|
|
7828
|
+
$[4] = t2;
|
|
7829
|
+
} else {
|
|
7830
|
+
t2 = $[4];
|
|
7831
|
+
}
|
|
7832
|
+
const onChange = t2;
|
|
7833
|
+
let t3;
|
|
7834
|
+
if ($[5] !== getUser) {
|
|
7835
|
+
t3 = (userId) => {
|
|
7836
|
+
const user = getUser(userId);
|
|
7837
|
+
return /* @__PURE__ */ jsxRuntime.jsx(UserDisplay, { user });
|
|
7838
|
+
};
|
|
7839
|
+
$[5] = getUser;
|
|
7840
|
+
$[6] = t3;
|
|
7841
|
+
} else {
|
|
7842
|
+
t3 = $[6];
|
|
7843
|
+
}
|
|
7844
|
+
const renderValue = t3;
|
|
7845
|
+
let t4;
|
|
7846
|
+
if ($[7] !== disabled || $[8] !== internalValue || $[9] !== multiple || $[10] !== onChange || $[11] !== renderValue || $[12] !== users || $[13] !== validValue) {
|
|
7847
|
+
t4 = multiple ? /* @__PURE__ */ jsxRuntime.jsx(ui.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__ */ jsxRuntime.jsx(ui.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) });
|
|
7848
|
+
$[7] = disabled;
|
|
7849
|
+
$[8] = internalValue;
|
|
7850
|
+
$[9] = multiple;
|
|
7851
|
+
$[10] = onChange;
|
|
7852
|
+
$[11] = renderValue;
|
|
7853
|
+
$[12] = users;
|
|
7854
|
+
$[13] = validValue;
|
|
7855
|
+
$[14] = t4;
|
|
7856
|
+
} else {
|
|
7857
|
+
t4 = $[14];
|
|
7858
|
+
}
|
|
7859
|
+
return t4;
|
|
7860
|
+
}
|
|
7861
|
+
function _temp2$a(user_1) {
|
|
7862
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: user_1.uid, children: /* @__PURE__ */ jsxRuntime.jsx(UserDisplay, { user: user_1 }) }, user_1.uid);
|
|
7863
|
+
}
|
|
7864
|
+
function _temp$m(user_0) {
|
|
7865
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ui.MultiSelectItem, { value: user_0.uid, children: /* @__PURE__ */ jsxRuntime.jsx(UserDisplay, { user: user_0 }) }, user_0.uid);
|
|
7866
|
+
}
|
|
7590
7867
|
class ErrorBoundary extends React.Component {
|
|
7591
7868
|
constructor(props) {
|
|
7592
7869
|
super(props);
|
|
@@ -8015,7 +8292,7 @@
|
|
|
8015
8292
|
const snackbarContext = useSnackbarController();
|
|
8016
8293
|
let t1;
|
|
8017
8294
|
if ($[0] !== storage.acceptedFiles) {
|
|
8018
|
-
t1 = storage.acceptedFiles ? storage.acceptedFiles.map(_temp$
|
|
8295
|
+
t1 = storage.acceptedFiles ? storage.acceptedFiles.map(_temp$l).reduce(_temp2$9, {}) : void 0;
|
|
8019
8296
|
$[0] = storage.acceptedFiles;
|
|
8020
8297
|
$[1] = t1;
|
|
8021
8298
|
} else {
|
|
@@ -8244,7 +8521,7 @@
|
|
|
8244
8521
|
...b
|
|
8245
8522
|
};
|
|
8246
8523
|
}
|
|
8247
|
-
function _temp$
|
|
8524
|
+
function _temp$l(e) {
|
|
8248
8525
|
return {
|
|
8249
8526
|
[e]: []
|
|
8250
8527
|
};
|
|
@@ -8351,7 +8628,7 @@
|
|
|
8351
8628
|
let t1;
|
|
8352
8629
|
if ($[2] !== updateValue) {
|
|
8353
8630
|
t1 = (entities) => {
|
|
8354
|
-
updateValue(entities.map(_temp$
|
|
8631
|
+
updateValue(entities.map(_temp$k));
|
|
8355
8632
|
};
|
|
8356
8633
|
$[2] = updateValue;
|
|
8357
8634
|
$[3] = t1;
|
|
@@ -8512,7 +8789,7 @@
|
|
|
8512
8789
|
}
|
|
8513
8790
|
return t10;
|
|
8514
8791
|
}, equal);
|
|
8515
|
-
function _temp$
|
|
8792
|
+
function _temp$k(e) {
|
|
8516
8793
|
return getReferenceFrom(e);
|
|
8517
8794
|
}
|
|
8518
8795
|
function _temp2$8(ref) {
|
|
@@ -9374,6 +9651,9 @@
|
|
|
9374
9651
|
if (stringProperty_0.enumValues) {
|
|
9375
9652
|
innerComponent = /* @__PURE__ */ jsxRuntime.jsx(VirtualTableSelect, { name: propertyKey, multiple: false, focused: selected, disabled, valueType: "string", small: getPreviewSizeFrom(size) !== "medium", enumValues: stringProperty_0.enumValues, error: validationError ?? error, internalValue, updateValue });
|
|
9376
9653
|
fullHeight = true;
|
|
9654
|
+
} else if (stringProperty_0.userSelect) {
|
|
9655
|
+
innerComponent = /* @__PURE__ */ jsxRuntime.jsx(VirtualTableUserSelect, { name: propertyKey, multiple: false, focused: selected, disabled, small: getPreviewSizeFrom(size) !== "medium", error: validationError ?? error, internalValue, updateValue });
|
|
9656
|
+
fullHeight = true;
|
|
9377
9657
|
} else if (stringProperty_0.markdown || !stringProperty_0.storage || !stringProperty_0.reference) {
|
|
9378
9658
|
const multiline = Boolean(stringProperty_0.multiline) || Boolean(stringProperty_0.markdown);
|
|
9379
9659
|
innerComponent = /* @__PURE__ */ jsxRuntime.jsx(VirtualTableInput, { error: validationError ?? error, disabled, multiline, focused: selected, value: internalValue, updateValue });
|
|
@@ -9438,7 +9718,8 @@
|
|
|
9438
9718
|
return {
|
|
9439
9719
|
__type: "EntityReference",
|
|
9440
9720
|
id: value.id,
|
|
9441
|
-
path: value.path
|
|
9721
|
+
path: value.path,
|
|
9722
|
+
databaseId: value.databaseId
|
|
9442
9723
|
};
|
|
9443
9724
|
}
|
|
9444
9725
|
if (value instanceof GeoPoint) {
|
|
@@ -9462,7 +9743,7 @@
|
|
|
9462
9743
|
case "Date":
|
|
9463
9744
|
return new Date(value.value);
|
|
9464
9745
|
case "EntityReference":
|
|
9465
|
-
return new EntityReference(value.id, value.path);
|
|
9746
|
+
return new EntityReference(value.id, value.path, value.databaseId);
|
|
9466
9747
|
case "GeoPoint":
|
|
9467
9748
|
return new GeoPoint(value.latitude, value.longitude);
|
|
9468
9749
|
case "Vector":
|
|
@@ -9674,7 +9955,7 @@
|
|
|
9674
9955
|
}
|
|
9675
9956
|
let t6;
|
|
9676
9957
|
if ($[6] !== t3 || $[7] !== t4) {
|
|
9677
|
-
t6 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Table row size", side: "right", sideOffset: 4, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { value: t3, className: "w-16 ml-2", size: "small", onValueChange: t4, renderValue: _temp$
|
|
9958
|
+
t6 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Table row size", side: "right", sideOffset: 4, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { value: t3, className: "w-16 ml-2", size: "small", onValueChange: t4, renderValue: _temp$j, children: t5 }) });
|
|
9678
9959
|
$[6] = t3;
|
|
9679
9960
|
$[7] = t4;
|
|
9680
9961
|
$[8] = t6;
|
|
@@ -9761,7 +10042,7 @@
|
|
|
9761
10042
|
function _temp2$7(size_0) {
|
|
9762
10043
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: size_0, className: "w-12 font-medium text-center", children: size_0.toUpperCase() }, size_0);
|
|
9763
10044
|
}
|
|
9764
|
-
function _temp$
|
|
10045
|
+
function _temp$j(v_0) {
|
|
9765
10046
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium", children: v_0.toUpperCase() });
|
|
9766
10047
|
}
|
|
9767
10048
|
function getTableCellAlignment(property) {
|
|
@@ -9833,21 +10114,15 @@
|
|
|
9833
10114
|
let t0;
|
|
9834
10115
|
bb0: {
|
|
9835
10116
|
if (collection.propertiesOrder) {
|
|
9836
|
-
let
|
|
10117
|
+
let t12;
|
|
9837
10118
|
if ($[0] !== collection) {
|
|
9838
|
-
|
|
9839
|
-
if (collection.collectionGroup) {
|
|
9840
|
-
propertyColumnConfigs.push({
|
|
9841
|
-
key: COLLECTION_GROUP_PARENT_ID,
|
|
9842
|
-
disabled: true
|
|
9843
|
-
});
|
|
9844
|
-
}
|
|
10119
|
+
t12 = hideAndExpandKeys(collection, collection.propertiesOrder);
|
|
9845
10120
|
$[0] = collection;
|
|
9846
|
-
$[1] =
|
|
10121
|
+
$[1] = t12;
|
|
9847
10122
|
} else {
|
|
9848
|
-
|
|
10123
|
+
t12 = $[1];
|
|
9849
10124
|
}
|
|
9850
|
-
t0 =
|
|
10125
|
+
t0 = t12;
|
|
9851
10126
|
break bb0;
|
|
9852
10127
|
}
|
|
9853
10128
|
let t1;
|
|
@@ -10881,7 +11156,7 @@
|
|
|
10881
11156
|
let t1;
|
|
10882
11157
|
if ($[0] !== text) {
|
|
10883
11158
|
const urlRegex = /https?:\/\/[^\s]+/g;
|
|
10884
|
-
t1 = text.replace(urlRegex, _temp$
|
|
11159
|
+
t1 = text.replace(urlRegex, _temp$i);
|
|
10885
11160
|
$[0] = text;
|
|
10886
11161
|
$[1] = t1;
|
|
10887
11162
|
} else {
|
|
@@ -10900,7 +11175,7 @@
|
|
|
10900
11175
|
}
|
|
10901
11176
|
return t2;
|
|
10902
11177
|
};
|
|
10903
|
-
function _temp$
|
|
11178
|
+
function _temp$i(url) {
|
|
10904
11179
|
return `<a href="${url}" class="underline" target="_blank">Link</a><br/>`;
|
|
10905
11180
|
}
|
|
10906
11181
|
const operationLabels$2 = {
|
|
@@ -11108,7 +11383,7 @@
|
|
|
11108
11383
|
}
|
|
11109
11384
|
let t6;
|
|
11110
11385
|
if ($[16] !== operation || $[17] !== t4 || $[18] !== t5) {
|
|
11111
|
-
t6 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[80px]", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { value: operation, fullWidth: true, position: "item-aligned", onValueChange: t4, renderValue: _temp$
|
|
11386
|
+
t6 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[80px]", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { value: operation, fullWidth: true, position: "item-aligned", onValueChange: t4, renderValue: _temp$h, children: t5 }) });
|
|
11112
11387
|
$[16] = operation;
|
|
11113
11388
|
$[17] = t4;
|
|
11114
11389
|
$[18] = t5;
|
|
@@ -11121,7 +11396,7 @@
|
|
|
11121
11396
|
t7 = !enumValues && /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { type: dataType === "number" ? "number" : void 0, value: internalValue !== void 0 && internalValue != null ? String(internalValue) : "", onChange: (evt) => {
|
|
11122
11397
|
const val_0 = dataType === "number" ? parseFloat(evt.target.value) : evt.target.value;
|
|
11123
11398
|
updateFilter(operation, val_0);
|
|
11124
|
-
}, endAdornment: internalValue && /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { onClick: (e) => updateFilter(operation, void 0), children: /* @__PURE__ */ jsxRuntime.jsx(ui.CloseIcon, {}) }) });
|
|
11399
|
+
}, endAdornment: internalValue !== void 0 && internalValue != null && /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { onClick: (e) => updateFilter(operation, void 0), children: /* @__PURE__ */ jsxRuntime.jsx(ui.CloseIcon, {}) }) });
|
|
11125
11400
|
$[20] = dataType;
|
|
11126
11401
|
$[21] = enumValues;
|
|
11127
11402
|
$[22] = internalValue;
|
|
@@ -11232,7 +11507,7 @@
|
|
|
11232
11507
|
function _temp2$6(op_1) {
|
|
11233
11508
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: op_1, children: operationLabels$1[op_1] }, op_1);
|
|
11234
11509
|
}
|
|
11235
|
-
function _temp$
|
|
11510
|
+
function _temp$h(op_0) {
|
|
11236
11511
|
return operationLabels$1[op_0];
|
|
11237
11512
|
}
|
|
11238
11513
|
function BooleanFilterField(t0) {
|
|
@@ -11371,7 +11646,7 @@
|
|
|
11371
11646
|
}
|
|
11372
11647
|
let t6;
|
|
11373
11648
|
if ($[13] !== operation || $[14] !== t4 || $[15] !== t5) {
|
|
11374
|
-
t6 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[80px]", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { value: operation, size: "large", fullWidth: true, onValueChange: t4, renderValue: _temp$
|
|
11649
|
+
t6 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[80px]", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { value: operation, size: "large", fullWidth: true, onValueChange: t4, renderValue: _temp$g, children: t5 }) });
|
|
11375
11650
|
$[13] = operation;
|
|
11376
11651
|
$[14] = t4;
|
|
11377
11652
|
$[15] = t5;
|
|
@@ -11460,7 +11735,7 @@
|
|
|
11460
11735
|
function _temp2$5(op_1) {
|
|
11461
11736
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: op_1, children: operationLabels[op_1] }, op_1);
|
|
11462
11737
|
}
|
|
11463
|
-
function _temp$
|
|
11738
|
+
function _temp$g(op_0) {
|
|
11464
11739
|
return operationLabels[op_0];
|
|
11465
11740
|
}
|
|
11466
11741
|
const SelectableTable = function SelectableTable2({
|
|
@@ -12164,7 +12439,7 @@
|
|
|
12164
12439
|
const searchBlocked = t12;
|
|
12165
12440
|
let t2;
|
|
12166
12441
|
if ($[15] !== customizationController.plugins || $[16] !== dataSource?.initTextSearch) {
|
|
12167
|
-
t2 = Boolean(dataSource?.initTextSearch) || customizationController.plugins?.find(_temp$
|
|
12442
|
+
t2 = Boolean(dataSource?.initTextSearch) || customizationController.plugins?.find(_temp$f);
|
|
12168
12443
|
$[15] = customizationController.plugins;
|
|
12169
12444
|
$[16] = dataSource?.initTextSearch;
|
|
12170
12445
|
$[17] = t2;
|
|
@@ -12256,7 +12531,7 @@
|
|
|
12256
12531
|
}
|
|
12257
12532
|
return t1;
|
|
12258
12533
|
}
|
|
12259
|
-
function _temp$
|
|
12534
|
+
function _temp$f(p_0) {
|
|
12260
12535
|
return Boolean(p_0.collectionView?.onTextSearchClick);
|
|
12261
12536
|
}
|
|
12262
12537
|
function DeleteEntityDialog({
|
|
@@ -12849,7 +13124,7 @@
|
|
|
12849
13124
|
T0 = ui.Collapse;
|
|
12850
13125
|
t4 = favouriteCollections.length > 0;
|
|
12851
13126
|
t2 = "flex flex-row flex-wrap gap-2 pb-2 min-h-[32px]";
|
|
12852
|
-
t3 = favouriteCollections.map(_temp$
|
|
13127
|
+
t3 = favouriteCollections.map(_temp$e);
|
|
12853
13128
|
$[2] = navigationController;
|
|
12854
13129
|
$[3] = t1;
|
|
12855
13130
|
$[4] = T0;
|
|
@@ -12883,7 +13158,7 @@
|
|
|
12883
13158
|
}
|
|
12884
13159
|
return t6;
|
|
12885
13160
|
}
|
|
12886
|
-
function _temp$
|
|
13161
|
+
function _temp$e(entry_0) {
|
|
12887
13162
|
return /* @__PURE__ */ jsxRuntime.jsx(NavigationChip, { entry: entry_0 }, entry_0.path);
|
|
12888
13163
|
}
|
|
12889
13164
|
const scrollsMap = {};
|
|
@@ -13100,7 +13375,7 @@
|
|
|
13100
13375
|
}
|
|
13101
13376
|
let t4;
|
|
13102
13377
|
if ($[4] !== actions) {
|
|
13103
|
-
t4 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", onClick: _temp$
|
|
13378
|
+
t4 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", onClick: _temp$d, children: actions });
|
|
13104
13379
|
$[4] = actions;
|
|
13105
13380
|
$[5] = t4;
|
|
13106
13381
|
} else {
|
|
@@ -13187,7 +13462,7 @@
|
|
|
13187
13462
|
}
|
|
13188
13463
|
return t12;
|
|
13189
13464
|
});
|
|
13190
|
-
function _temp$
|
|
13465
|
+
function _temp$d(event) {
|
|
13191
13466
|
event.preventDefault();
|
|
13192
13467
|
event.stopPropagation();
|
|
13193
13468
|
}
|
|
@@ -13649,32 +13924,6 @@
|
|
|
13649
13924
|
if (activeIsGroup) {
|
|
13650
13925
|
const groups = args.droppableContainers.filter((c) => dndItems.some((g_2) => g_2.name === c.id));
|
|
13651
13926
|
if (!groups.length) return [];
|
|
13652
|
-
if (groups.length > 0) {
|
|
13653
|
-
const firstGroup = groups[0];
|
|
13654
|
-
const firstGroupRect = firstGroup.rect.current;
|
|
13655
|
-
const {
|
|
13656
|
-
x,
|
|
13657
|
-
y
|
|
13658
|
-
} = args.pointerCoordinates || {
|
|
13659
|
-
x: 0,
|
|
13660
|
-
y: 0
|
|
13661
|
-
};
|
|
13662
|
-
if (firstGroupRect && y < firstGroupRect.top + 20) {
|
|
13663
|
-
return [{
|
|
13664
|
-
id: firstGroup.id,
|
|
13665
|
-
data: {
|
|
13666
|
-
insertBefore: true
|
|
13667
|
-
}
|
|
13668
|
-
}];
|
|
13669
|
-
}
|
|
13670
|
-
}
|
|
13671
|
-
const cornersResult = core.closestCorners({
|
|
13672
|
-
...args,
|
|
13673
|
-
droppableContainers: groups
|
|
13674
|
-
});
|
|
13675
|
-
if (cornersResult.length) {
|
|
13676
|
-
return cornersResult;
|
|
13677
|
-
}
|
|
13678
13927
|
return core.closestCenter({
|
|
13679
13928
|
...args,
|
|
13680
13929
|
droppableContainers: groups
|
|
@@ -13782,46 +14031,37 @@
|
|
|
13782
14031
|
const activeIdNow_0 = active_1.id;
|
|
13783
14032
|
const overIdNow_0 = over_0.id;
|
|
13784
14033
|
if (activeIsGroup) {
|
|
13785
|
-
|
|
13786
|
-
if (insertBefore && activeIdNow_0 !== overIdNow_0) {
|
|
14034
|
+
if (activeIdNow_0 !== overIdNow_0 && dndItems.some((g_12) => g_12.name === overIdNow_0)) {
|
|
13787
14035
|
const from = dndItems.findIndex((g_10) => g_10.name === activeIdNow_0);
|
|
13788
|
-
|
|
13789
|
-
|
|
14036
|
+
const to = dndItems.findIndex((g_11) => g_11.name === overIdNow_0);
|
|
14037
|
+
if (from !== -1 && to !== -1) {
|
|
14038
|
+
const newState_0 = sortable.arrayMove(dndItems, from, to);
|
|
13790
14039
|
setDndItems(newState_0);
|
|
13791
14040
|
onPersist?.(newState_0);
|
|
13792
|
-
onGroupMoved?.(activeIdNow_0, from,
|
|
13793
|
-
}
|
|
13794
|
-
} else if (activeIdNow_0 !== overIdNow_0 && dndItems.some((g_13) => g_13.name === overIdNow_0)) {
|
|
13795
|
-
const from_0 = dndItems.findIndex((g_11) => g_11.name === activeIdNow_0);
|
|
13796
|
-
const to = dndItems.findIndex((g_12) => g_12.name === overIdNow_0);
|
|
13797
|
-
if (from_0 !== -1 && to !== -1) {
|
|
13798
|
-
const newState_1 = sortable.arrayMove(dndItems, from_0, to);
|
|
13799
|
-
setDndItems(newState_1);
|
|
13800
|
-
onPersist?.(newState_1);
|
|
13801
|
-
onGroupMoved?.(activeIdNow_0, from_0, to);
|
|
14041
|
+
onGroupMoved?.(activeIdNow_0, from, to);
|
|
13802
14042
|
}
|
|
13803
14043
|
}
|
|
13804
14044
|
} else {
|
|
13805
14045
|
const activeCont_0 = findDndContainer(activeIdNow_0);
|
|
13806
14046
|
if (overIdNow_0 === "new-group-drop-zone") {
|
|
13807
14047
|
if (activeCont_0) {
|
|
13808
|
-
const
|
|
13809
|
-
const srcIdx_0 =
|
|
14048
|
+
const newState_1 = cloneItemsForDnd(dndItems);
|
|
14049
|
+
const srcIdx_0 = newState_1.findIndex((g_13) => g_13.name === activeCont_0);
|
|
13810
14050
|
if (srcIdx_0 !== -1) {
|
|
13811
|
-
const src_0 =
|
|
14051
|
+
const src_0 = newState_1[srcIdx_0];
|
|
13812
14052
|
const idxInSrc_0 = src_0.entries.findIndex((e_3) => e_3.url === activeIdNow_0);
|
|
13813
14053
|
if (idxInSrc_0 !== -1) {
|
|
13814
14054
|
const [dragged] = src_0.entries.splice(idxInSrc_0, 1);
|
|
13815
|
-
if (src_0.entries.length === 0)
|
|
14055
|
+
if (src_0.entries.length === 0) newState_1.splice(srcIdx_0, 1);
|
|
13816
14056
|
let tentative = "New Group";
|
|
13817
14057
|
let counter = 1;
|
|
13818
|
-
while (
|
|
13819
|
-
|
|
14058
|
+
while (newState_1.some((g_14) => g_14.name === tentative)) tentative = `New Group ${counter++}`;
|
|
14059
|
+
newState_1.push({
|
|
13820
14060
|
name: tentative,
|
|
13821
14061
|
entries: [dragged]
|
|
13822
14062
|
});
|
|
13823
|
-
setDndItems(
|
|
13824
|
-
onPersist?.(
|
|
14063
|
+
setDndItems(newState_1);
|
|
14064
|
+
onPersist?.(newState_1);
|
|
13825
14065
|
setDialogOpenForGroup(tentative);
|
|
13826
14066
|
onNewGroupDrop?.();
|
|
13827
14067
|
}
|
|
@@ -13830,7 +14070,7 @@
|
|
|
13830
14070
|
} else {
|
|
13831
14071
|
const overCont_0 = findDndContainer(overIdNow_0);
|
|
13832
14072
|
if (activeCont_0 === overCont_0) {
|
|
13833
|
-
const grpIdx = dndItems.findIndex((
|
|
14073
|
+
const grpIdx = dndItems.findIndex((g_15) => g_15.name === activeCont_0);
|
|
13834
14074
|
if (grpIdx !== -1) {
|
|
13835
14075
|
const group_0 = dndItems[grpIdx];
|
|
13836
14076
|
const oldIdx = group_0.entries.findIndex((e_4) => e_4.url === activeIdNow_0);
|
|
@@ -13838,19 +14078,19 @@
|
|
|
13838
14078
|
if (newIdx === -1 && overIdNow_0 === activeCont_0) newIdx = group_0.entries.length - 1;
|
|
13839
14079
|
if (oldIdx !== -1 && newIdx !== -1 && oldIdx !== newIdx) {
|
|
13840
14080
|
const reordered = sortable.arrayMove(group_0.entries, oldIdx, newIdx);
|
|
13841
|
-
const
|
|
13842
|
-
|
|
14081
|
+
const newState_2 = [...dndItems];
|
|
14082
|
+
newState_2[grpIdx] = {
|
|
13843
14083
|
...group_0,
|
|
13844
14084
|
entries: reordered
|
|
13845
14085
|
};
|
|
13846
|
-
setDndItems(
|
|
13847
|
-
onPersist?.(
|
|
14086
|
+
setDndItems(newState_2);
|
|
14087
|
+
onPersist?.(newState_2);
|
|
13848
14088
|
}
|
|
13849
14089
|
}
|
|
13850
14090
|
} else if (recentlyMovedToNewContainer.current && interimItemsRef.current) {
|
|
13851
14091
|
onPersist?.(interimItemsRef.current);
|
|
13852
14092
|
}
|
|
13853
|
-
onCardMovedBetweenGroups?.(dndItems.flatMap((
|
|
14093
|
+
onCardMovedBetweenGroups?.(dndItems.flatMap((g_16) => g_16.entries).find((e_6) => e_6.url === activeIdNow_0));
|
|
13854
14094
|
}
|
|
13855
14095
|
}
|
|
13856
14096
|
resetDragState();
|
|
@@ -13863,14 +14103,12 @@
|
|
|
13863
14103
|
setIsDraggingCardOnly(false);
|
|
13864
14104
|
recentlyMovedToNewContainer.current = false;
|
|
13865
14105
|
};
|
|
13866
|
-
const handleDragCancel = () =>
|
|
13867
|
-
resetDragState();
|
|
13868
|
-
};
|
|
14106
|
+
const handleDragCancel = () => resetDragState();
|
|
13869
14107
|
const handleRenameGroup = (oldName, newName) => {
|
|
13870
14108
|
setDndItems((current) => {
|
|
13871
|
-
const idx = current.findIndex((
|
|
14109
|
+
const idx = current.findIndex((g_17) => g_17.name === oldName);
|
|
13872
14110
|
if (idx === -1) return current;
|
|
13873
|
-
if (current.some((
|
|
14111
|
+
if (current.some((g_18) => g_18.name === newName && g_18.name !== oldName)) return current;
|
|
13874
14112
|
const updated = [...current];
|
|
13875
14113
|
updated[idx] = {
|
|
13876
14114
|
...updated[idx],
|
|
@@ -13879,9 +14117,10 @@
|
|
|
13879
14117
|
onPersist?.(updated);
|
|
13880
14118
|
return updated;
|
|
13881
14119
|
});
|
|
14120
|
+
setDialogOpenForGroup(null);
|
|
13882
14121
|
};
|
|
13883
|
-
const activeItemForOverlay = disabled || !activeId || activeIsGroup ? null : dndItems.flatMap((
|
|
13884
|
-
const activeGroupData = disabled || !activeId || !activeIsGroup ? null : dndItems.find((
|
|
14122
|
+
const activeItemForOverlay = disabled || !activeId || activeIsGroup ? null : dndItems.flatMap((g_19) => g_19.entries).find((e_7) => e_7.url === activeId) || null;
|
|
14123
|
+
const activeGroupData = disabled || !activeId || !activeIsGroup ? null : dndItems.find((g_20) => g_20.name === activeId) || null;
|
|
13885
14124
|
return {
|
|
13886
14125
|
sensors,
|
|
13887
14126
|
collisionDetection,
|
|
@@ -13999,7 +14238,7 @@
|
|
|
13999
14238
|
return t8;
|
|
14000
14239
|
}
|
|
14001
14240
|
function RenameGroupDialog(t0) {
|
|
14002
|
-
const $ = reactCompilerRuntime.c(
|
|
14241
|
+
const $ = reactCompilerRuntime.c(40);
|
|
14003
14242
|
const {
|
|
14004
14243
|
open,
|
|
14005
14244
|
initialName,
|
|
@@ -14191,19 +14430,18 @@
|
|
|
14191
14430
|
t15 = $[35];
|
|
14192
14431
|
}
|
|
14193
14432
|
let t16;
|
|
14194
|
-
if ($[36] !==
|
|
14195
|
-
t16 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Dialog, { open,
|
|
14433
|
+
if ($[36] !== open || $[37] !== t11 || $[38] !== t15) {
|
|
14434
|
+
t16 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Dialog, { open, children: [
|
|
14196
14435
|
t6,
|
|
14197
14436
|
t11,
|
|
14198
14437
|
t15
|
|
14199
14438
|
] });
|
|
14200
|
-
$[36] =
|
|
14201
|
-
$[37] =
|
|
14202
|
-
$[38] =
|
|
14203
|
-
$[39] =
|
|
14204
|
-
$[40] = t16;
|
|
14439
|
+
$[36] = open;
|
|
14440
|
+
$[37] = t11;
|
|
14441
|
+
$[38] = t15;
|
|
14442
|
+
$[39] = t16;
|
|
14205
14443
|
} else {
|
|
14206
|
-
t16 = $[
|
|
14444
|
+
t16 = $[39];
|
|
14207
14445
|
}
|
|
14208
14446
|
return t16;
|
|
14209
14447
|
}
|
|
@@ -14303,16 +14541,11 @@
|
|
|
14303
14541
|
}] : draggable;
|
|
14304
14542
|
onNavigationEntriesUpdate(all);
|
|
14305
14543
|
};
|
|
14306
|
-
const
|
|
14307
|
-
const
|
|
14308
|
-
|
|
14309
|
-
|
|
14310
|
-
|
|
14311
|
-
setCollapsedGroups((prev) => ({
|
|
14312
|
-
...prev,
|
|
14313
|
-
[name_1]: !prev[name_1]
|
|
14314
|
-
}));
|
|
14315
|
-
}, []);
|
|
14544
|
+
const groupNames = React.useMemo(() => [...items.map((item) => item.name), ...adminGroupData ? [adminGroupData.name] : []], [items, adminGroupData]);
|
|
14545
|
+
const {
|
|
14546
|
+
isGroupCollapsed,
|
|
14547
|
+
toggleGroupCollapsed
|
|
14548
|
+
} = useCollapsedGroups(groupNames);
|
|
14316
14549
|
const {
|
|
14317
14550
|
sensors,
|
|
14318
14551
|
collisionDetection,
|
|
@@ -14341,18 +14574,9 @@
|
|
|
14341
14574
|
onGroupMoved: (g_8) => context.analyticsController?.onAnalyticsEvent?.("home_move_group", {
|
|
14342
14575
|
name: g_8
|
|
14343
14576
|
}),
|
|
14344
|
-
onCardMovedBetweenGroups: (card) => {
|
|
14345
|
-
|
|
14346
|
-
|
|
14347
|
-
targetGroup = adminGroupData;
|
|
14348
|
-
}
|
|
14349
|
-
if (targetGroup && isGroupCollapsed(targetGroup.name)) {
|
|
14350
|
-
toggleGroupCollapsed(targetGroup.name);
|
|
14351
|
-
}
|
|
14352
|
-
context.analyticsController?.onAnalyticsEvent?.("home_move_card", {
|
|
14353
|
-
id: card.id
|
|
14354
|
-
});
|
|
14355
|
-
},
|
|
14577
|
+
onCardMovedBetweenGroups: (card) => context.analyticsController?.onAnalyticsEvent?.("home_move_card", {
|
|
14578
|
+
id: card.id
|
|
14579
|
+
}),
|
|
14356
14580
|
onNewGroupDrop: () => context.analyticsController?.onAnalyticsEvent?.("home_drop_new_group")
|
|
14357
14581
|
});
|
|
14358
14582
|
const {
|
|
@@ -14408,15 +14632,15 @@
|
|
|
14408
14632
|
if (dndDisabled) return;
|
|
14409
14633
|
setDialogOpenForGroup(groupKey);
|
|
14410
14634
|
}, collapsed: isGroupCollapsed(groupKey), onToggleCollapsed: () => toggleGroupCollapsed(groupKey), children: /* @__PURE__ */ jsxRuntime.jsx(NavigationGroupDroppable, { id: groupKey, itemIds: entriesInGroup.map((e_4) => e_4.url), isPotentialCardDropTarget: isDraggingCardOnly, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 ", children: [
|
|
14411
|
-
entriesInGroup.map((
|
|
14635
|
+
entriesInGroup.map((entry) => /* @__PURE__ */ jsxRuntime.jsx(SortableNavigationCard, { entry, onClick: () => {
|
|
14412
14636
|
let event = "unmapped_event";
|
|
14413
|
-
if (
|
|
14414
|
-
else if (
|
|
14415
|
-
else if (
|
|
14637
|
+
if (entry.type === "collection") event = "home_navigate_to_collection";
|
|
14638
|
+
else if (entry.type === "view") event = "home_navigate_to_view";
|
|
14639
|
+
else if (entry.type === "admin") event = "home_navigate_to_admin_view";
|
|
14416
14640
|
context.analyticsController?.onAnalyticsEvent?.(event, {
|
|
14417
|
-
path:
|
|
14641
|
+
path: entry.path
|
|
14418
14642
|
});
|
|
14419
|
-
} },
|
|
14643
|
+
} }, entry.url)),
|
|
14420
14644
|
!performingSearch && groupKey.toLowerCase() !== ADMIN_GROUP_NAME.toLowerCase() && AdditionalCards.map((C, i_1) => /* @__PURE__ */ jsxRuntime.jsx(C, { ...actionProps }, `extra_${groupKey}_${i_1}`))
|
|
14421
14645
|
] }) }) }) }, groupKey);
|
|
14422
14646
|
}) }, JSON.stringify(containers)),
|
|
@@ -14426,22 +14650,21 @@
|
|
|
14426
14650
|
margin: 0
|
|
14427
14651
|
}, children: /* @__PURE__ */ jsxRuntime.jsx(NavigationGroup, { group: activeGroupData.name === DEFAULT_GROUP_NAME ? void 0 : activeGroupData.name, isPreview: false, minimised: true }) }) : activeItemForOverlay ? /* @__PURE__ */ jsxRuntime.jsx(NavigationCardBinding, { ...activeItemForOverlay, shrink: isHoveringNewGroupDropZone }) : null })
|
|
14428
14652
|
] }),
|
|
14429
|
-
!performingSearch && adminGroupData && /* @__PURE__ */ jsxRuntime.jsx(NavigationGroup, { group: adminGroupData.name, collapsed: isGroupCollapsed(adminGroupData.name), onToggleCollapsed: () => toggleGroupCollapsed(adminGroupData.name), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 ", children: adminGroupData.entries.map((
|
|
14653
|
+
!performingSearch && adminGroupData && /* @__PURE__ */ jsxRuntime.jsx(NavigationGroup, { group: adminGroupData.name, collapsed: isGroupCollapsed(adminGroupData.name), onToggleCollapsed: () => toggleGroupCollapsed(adminGroupData.name), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 ", children: adminGroupData.entries.map((entry_0) => /* @__PURE__ */ jsxRuntime.jsx(NavigationCardBinding, { ...entry_0, onClick: () => {
|
|
14430
14654
|
let event_0 = "unmapped_event";
|
|
14431
|
-
if (
|
|
14432
|
-
else if (
|
|
14433
|
-
else if (
|
|
14655
|
+
if (entry_0.type === "collection") event_0 = "home_navigate_to_collection";
|
|
14656
|
+
else if (entry_0.type === "view") event_0 = "home_navigate_to_view";
|
|
14657
|
+
else if (entry_0.type === "admin") event_0 = "home_navigate_to_admin_view";
|
|
14434
14658
|
context.analyticsController?.onAnalyticsEvent?.(event_0, {
|
|
14435
|
-
path:
|
|
14659
|
+
path: entry_0.path
|
|
14436
14660
|
});
|
|
14437
|
-
} },
|
|
14661
|
+
} }, entry_0.url)) }) }),
|
|
14438
14662
|
additionalPluginSections,
|
|
14439
14663
|
additionalPluginChildrenEnd,
|
|
14440
14664
|
additionalChildrenEnd
|
|
14441
14665
|
] }),
|
|
14442
14666
|
dialogOpenForGroup && /* @__PURE__ */ jsxRuntime.jsx(RenameGroupDialog, { open: true, initialName: dialogOpenForGroup, existingGroupNames: items.map((g_9) => g_9.name).filter((n) => n !== dialogOpenForGroup), onClose: () => setDialogOpenForGroup(null), onRename: (newName) => {
|
|
14443
14667
|
handleRenameGroup(dialogOpenForGroup, newName);
|
|
14444
|
-
setDialogOpenForGroup(null);
|
|
14445
14668
|
} })
|
|
14446
14669
|
] });
|
|
14447
14670
|
}
|
|
@@ -16113,7 +16336,7 @@
|
|
|
16113
16336
|
}
|
|
16114
16337
|
let t5;
|
|
16115
16338
|
if ($[14] !== placeholder) {
|
|
16116
|
-
t5 = placeholder && /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: _temp$
|
|
16339
|
+
t5 = placeholder && /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: _temp$c, className: "flex flex-col items-center justify-center w-full h-full", children: /* @__PURE__ */ jsxRuntime.jsx(ui.DescriptionIcon, { className: "text-surface-700 dark:text-surface-300" }) });
|
|
16117
16340
|
$[14] = placeholder;
|
|
16118
16341
|
$[15] = t5;
|
|
16119
16342
|
} else {
|
|
@@ -16136,7 +16359,7 @@
|
|
|
16136
16359
|
}
|
|
16137
16360
|
return t6;
|
|
16138
16361
|
}
|
|
16139
|
-
function _temp$
|
|
16362
|
+
function _temp$c(e) {
|
|
16140
16363
|
return e.stopPropagation();
|
|
16141
16364
|
}
|
|
16142
16365
|
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";
|
|
@@ -16354,7 +16577,7 @@
|
|
|
16354
16577
|
t4 = $[7];
|
|
16355
16578
|
}
|
|
16356
16579
|
const style = t4;
|
|
16357
|
-
const getImageSizeNumber = _temp$
|
|
16580
|
+
const getImageSizeNumber = _temp$b;
|
|
16358
16581
|
let child;
|
|
16359
16582
|
if (entry.storagePathOrDownloadUrl) {
|
|
16360
16583
|
const t52 = `storage_preview_${entry.storagePathOrDownloadUrl}`;
|
|
@@ -16429,7 +16652,7 @@
|
|
|
16429
16652
|
}
|
|
16430
16653
|
return t6;
|
|
16431
16654
|
}
|
|
16432
|
-
function _temp$
|
|
16655
|
+
function _temp$b(previewSize) {
|
|
16433
16656
|
switch (previewSize) {
|
|
16434
16657
|
case "small": {
|
|
16435
16658
|
return 40;
|
|
@@ -17574,6 +17797,13 @@
|
|
|
17574
17797
|
} = t0;
|
|
17575
17798
|
const authController = useAuthController();
|
|
17576
17799
|
const customizationController = useCustomizationController();
|
|
17800
|
+
if (propertyKey === "created_by") {
|
|
17801
|
+
console.log("Rendering field for created_by", {
|
|
17802
|
+
propertyKey,
|
|
17803
|
+
property,
|
|
17804
|
+
context
|
|
17805
|
+
});
|
|
17806
|
+
}
|
|
17577
17807
|
let t1;
|
|
17578
17808
|
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) {
|
|
17579
17809
|
t1 = (fieldProps) => {
|
|
@@ -17885,7 +18115,7 @@
|
|
|
17885
18115
|
} else {
|
|
17886
18116
|
t42 = $[20];
|
|
17887
18117
|
}
|
|
17888
|
-
t3 = Object.entries(mapProperties).filter(_temp$
|
|
18118
|
+
t3 = Object.entries(mapProperties).filter(_temp$a).map(t42);
|
|
17889
18119
|
$[6] = autoFocus;
|
|
17890
18120
|
$[7] = context;
|
|
17891
18121
|
$[8] = disabled;
|
|
@@ -17955,7 +18185,7 @@
|
|
|
17955
18185
|
}
|
|
17956
18186
|
return t10;
|
|
17957
18187
|
}
|
|
17958
|
-
function _temp$
|
|
18188
|
+
function _temp$a(t0) {
|
|
17959
18189
|
const [, property_0] = t0;
|
|
17960
18190
|
return !isHidden(property_0);
|
|
17961
18191
|
}
|
|
@@ -19025,7 +19255,7 @@
|
|
|
19025
19255
|
const property = t4;
|
|
19026
19256
|
let t5;
|
|
19027
19257
|
if ($[9] !== properties) {
|
|
19028
|
-
t5 = Object.entries(properties).map(_temp$
|
|
19258
|
+
t5 = Object.entries(properties).map(_temp$9);
|
|
19029
19259
|
$[9] = properties;
|
|
19030
19260
|
$[10] = t5;
|
|
19031
19261
|
} else {
|
|
@@ -19116,7 +19346,7 @@
|
|
|
19116
19346
|
}
|
|
19117
19347
|
return t11;
|
|
19118
19348
|
}
|
|
19119
|
-
function _temp$
|
|
19349
|
+
function _temp$9(t0) {
|
|
19120
19350
|
const [key, property_0] = t0;
|
|
19121
19351
|
return {
|
|
19122
19352
|
id: key,
|
|
@@ -20438,7 +20668,7 @@
|
|
|
20438
20668
|
propertyConfig,
|
|
20439
20669
|
disabled
|
|
20440
20670
|
} = t0;
|
|
20441
|
-
const classes = "h-8 w-8
|
|
20671
|
+
const classes = "h-8 w-8 flex items-center justify-center rounded-full shadow text-white " + (disabled ? "bg-surface-400 dark:bg-surface-600" : "");
|
|
20442
20672
|
let t1;
|
|
20443
20673
|
if ($[0] !== classes || $[1] !== disabled || $[2] !== propertyConfig) {
|
|
20444
20674
|
const defaultPropertyConfig = typeof propertyConfig?.property === "object" ? getDefaultFieldConfig(propertyConfig.property) : void 0;
|
|
@@ -20453,7 +20683,7 @@
|
|
|
20453
20683
|
} else {
|
|
20454
20684
|
t3 = $[5];
|
|
20455
20685
|
}
|
|
20456
|
-
t1 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, style: t3, children: propertyConfig?.Icon ? getIconForWidget(propertyConfig, "
|
|
20686
|
+
t1 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, style: t3, children: propertyConfig?.Icon ? getIconForWidget(propertyConfig, "small") : getIconForWidget(defaultPropertyConfig, "small") });
|
|
20457
20687
|
$[0] = classes;
|
|
20458
20688
|
$[1] = disabled;
|
|
20459
20689
|
$[2] = propertyConfig;
|
|
@@ -20773,7 +21003,7 @@
|
|
|
20773
21003
|
}
|
|
20774
21004
|
let t7;
|
|
20775
21005
|
if ($[18] !== breadcrumbs.breadcrumbs) {
|
|
20776
|
-
t7 = (breadcrumbs.breadcrumbs ?? []).length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mr-8 hidden lg:block", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row gap-2", children: breadcrumbs.breadcrumbs.map(_temp$
|
|
21006
|
+
t7 = (breadcrumbs.breadcrumbs ?? []).length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mr-8 hidden lg:block", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row gap-2", children: breadcrumbs.breadcrumbs.map(_temp$8) }) });
|
|
20777
21007
|
$[18] = breadcrumbs.breadcrumbs;
|
|
20778
21008
|
$[19] = t7;
|
|
20779
21009
|
} else {
|
|
@@ -20885,7 +21115,7 @@
|
|
|
20885
21115
|
}
|
|
20886
21116
|
return t14;
|
|
20887
21117
|
};
|
|
20888
|
-
function _temp$
|
|
21118
|
+
function _temp$8(breadcrumb, index) {
|
|
20889
21119
|
return /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
|
|
20890
21120
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", children: "/" }),
|
|
20891
21121
|
/* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Link, { className: "visited:text-inherit visited:dark:text-inherit block", to: breadcrumb.url, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", children: breadcrumb.title }) }, index)
|
|
@@ -21319,7 +21549,7 @@
|
|
|
21319
21549
|
} else {
|
|
21320
21550
|
const searchResult = iconsSearch.search(value);
|
|
21321
21551
|
const limited = searchResult.slice(0, 50);
|
|
21322
|
-
setKeys(limited.map(_temp$
|
|
21552
|
+
setKeys(limited.map(_temp$7));
|
|
21323
21553
|
}
|
|
21324
21554
|
}, UPDATE_SEARCH_INDEX_WAIT_MS);
|
|
21325
21555
|
$[0] = t3;
|
|
@@ -21386,7 +21616,7 @@
|
|
|
21386
21616
|
}
|
|
21387
21617
|
return t8;
|
|
21388
21618
|
}
|
|
21389
|
-
function _temp$
|
|
21619
|
+
function _temp$7(e) {
|
|
21390
21620
|
return e.item.key;
|
|
21391
21621
|
}
|
|
21392
21622
|
function FieldCaption(t0) {
|
|
@@ -21470,7 +21700,7 @@
|
|
|
21470
21700
|
}
|
|
21471
21701
|
return t2;
|
|
21472
21702
|
}
|
|
21473
|
-
const fireCMSLogo = "data:image/png;base64,
|
|
21703
|
+
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=";
|
|
21474
21704
|
function useBrowserTitleAndIcon(name, logo) {
|
|
21475
21705
|
const $ = reactCompilerRuntime.c(4);
|
|
21476
21706
|
let t0;
|
|
@@ -22012,7 +22242,7 @@
|
|
|
22012
22242
|
t0 = $[0];
|
|
22013
22243
|
}
|
|
22014
22244
|
const configCache = React.useRef(t0);
|
|
22015
|
-
const getCollectionFromStorage = _temp$
|
|
22245
|
+
const getCollectionFromStorage = _temp$6;
|
|
22016
22246
|
let t1;
|
|
22017
22247
|
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
22018
22248
|
t1 = (path) => {
|
|
@@ -22135,7 +22365,7 @@
|
|
|
22135
22365
|
}
|
|
22136
22366
|
return t11;
|
|
22137
22367
|
}
|
|
22138
|
-
function _temp$
|
|
22368
|
+
function _temp$6(storageKey) {
|
|
22139
22369
|
const item = localStorage.getItem(storageKey);
|
|
22140
22370
|
return item ? JSON.parse(item) : {};
|
|
22141
22371
|
}
|
|
@@ -23470,7 +23700,7 @@
|
|
|
23470
23700
|
t3 = () => {
|
|
23471
23701
|
const state = location.state;
|
|
23472
23702
|
const panelKeys = state?.panels ?? [];
|
|
23473
|
-
const newPanels_0 = panelKeys.map((key) => routesStore.current[key]).filter(_temp$
|
|
23703
|
+
const newPanels_0 = panelKeys.map((key) => routesStore.current[key]).filter(_temp$5);
|
|
23474
23704
|
if (!equal(sidePanelsRef.current.map(_temp2$3), newPanels_0.map(_temp3$1))) {
|
|
23475
23705
|
updateSidePanels(newPanels_0);
|
|
23476
23706
|
}
|
|
@@ -23618,7 +23848,7 @@
|
|
|
23618
23848
|
function _temp2$3(p_0) {
|
|
23619
23849
|
return p_0.key;
|
|
23620
23850
|
}
|
|
23621
|
-
function _temp$
|
|
23851
|
+
function _temp$5(p) {
|
|
23622
23852
|
return Boolean(p);
|
|
23623
23853
|
}
|
|
23624
23854
|
function useBuildDataSource({
|
|
@@ -23913,7 +24143,7 @@
|
|
|
23913
24143
|
const dataSourceKey = dataSourceDelegate.key;
|
|
23914
24144
|
let t1;
|
|
23915
24145
|
if ($[0] !== plugins) {
|
|
23916
|
-
t1 = plugins?.map(_temp$
|
|
24146
|
+
t1 = plugins?.map(_temp$4);
|
|
23917
24147
|
$[0] = plugins;
|
|
23918
24148
|
$[1] = t1;
|
|
23919
24149
|
} else {
|
|
@@ -23949,7 +24179,7 @@
|
|
|
23949
24179
|
React.useEffect(t2, t3);
|
|
23950
24180
|
return accessResponse;
|
|
23951
24181
|
}
|
|
23952
|
-
function _temp$
|
|
24182
|
+
function _temp$4(plugin) {
|
|
23953
24183
|
return plugin.key;
|
|
23954
24184
|
}
|
|
23955
24185
|
function FireCMS(props) {
|
|
@@ -23962,22 +24192,27 @@
|
|
|
23962
24192
|
authController,
|
|
23963
24193
|
storageSource,
|
|
23964
24194
|
dataSourceDelegate,
|
|
23965
|
-
plugins:
|
|
24195
|
+
plugins: _pluginsProp,
|
|
23966
24196
|
onAnalyticsEvent,
|
|
23967
24197
|
propertyConfigs,
|
|
23968
24198
|
entityViews,
|
|
23969
24199
|
entityActions,
|
|
23970
24200
|
components,
|
|
23971
24201
|
navigationController,
|
|
23972
|
-
apiKey
|
|
24202
|
+
apiKey,
|
|
24203
|
+
userManagement: _userManagement
|
|
23973
24204
|
} = props;
|
|
23974
|
-
if (
|
|
24205
|
+
if (_pluginsProp) {
|
|
23975
24206
|
console.warn("The `plugins` prop is deprecated in the FireCMS component. You should pass your plugins to `useBuildNavigationController` instead.");
|
|
23976
24207
|
}
|
|
23977
|
-
const plugins = navigationController.plugins ??
|
|
24208
|
+
const plugins = navigationController.plugins ?? _pluginsProp;
|
|
24209
|
+
const userManagement = plugins?.find((p) => p.userManagement)?.userManagement ?? _userManagement ?? {
|
|
24210
|
+
users: [],
|
|
24211
|
+
getUser: (uid) => null
|
|
24212
|
+
};
|
|
23978
24213
|
const sideDialogsController = useBuildSideDialogsController();
|
|
23979
24214
|
const sideEntityController = useBuildSideEntityController(navigationController, sideDialogsController, authController);
|
|
23980
|
-
const pluginsLoading = plugins?.some((
|
|
24215
|
+
const pluginsLoading = plugins?.some((p_0) => p_0.loading) ?? false;
|
|
23981
24216
|
const loading = authController.initialLoading || navigationController.loading || pluginsLoading;
|
|
23982
24217
|
const customizationController = {
|
|
23983
24218
|
dateTimeFormat,
|
|
@@ -24024,7 +24259,7 @@
|
|
|
24024
24259
|
accessResponse?.message && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { children: accessResponse?.message })
|
|
24025
24260
|
] });
|
|
24026
24261
|
}
|
|
24027
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AnalyticsContext.Provider, { value: analyticsController, children: /* @__PURE__ */ jsxRuntime.jsx(CustomizationControllerContext.Provider, { value: customizationController, children: /* @__PURE__ */ jsxRuntime.jsx(UserConfigurationPersistenceContext.Provider, { value: userConfigPersistence, children: /* @__PURE__ */ jsxRuntime.jsx(StorageSourceContext.Provider, { value: storageSource, children: /* @__PURE__ */ jsxRuntime.jsx(DataSourceContext.Provider, { value: dataSource, children: /* @__PURE__ */ jsxRuntime.jsx(AuthControllerContext.Provider, { value: authController, children: /* @__PURE__ */ jsxRuntime.jsx(SideDialogsControllerContext.Provider, { value: sideDialogsController, children: /* @__PURE__ */ jsxRuntime.jsx(SideEntityControllerContext.Provider, { value: sideEntityController, children: /* @__PURE__ */ jsxRuntime.jsx(NavigationContext.Provider, { value: navigationController, children: /* @__PURE__ */ jsxRuntime.jsx(DialogsProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbsProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(FireCMSInternal, { loading, children }) }) }) }) }) }) }) }) }) }) }) });
|
|
24262
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AnalyticsContext.Provider, { value: analyticsController, children: /* @__PURE__ */ jsxRuntime.jsx(CustomizationControllerContext.Provider, { value: customizationController, children: /* @__PURE__ */ jsxRuntime.jsx(UserConfigurationPersistenceContext.Provider, { value: userConfigPersistence, children: /* @__PURE__ */ jsxRuntime.jsx(StorageSourceContext.Provider, { value: storageSource, children: /* @__PURE__ */ jsxRuntime.jsx(DataSourceContext.Provider, { value: dataSource, children: /* @__PURE__ */ jsxRuntime.jsx(AuthControllerContext.Provider, { value: authController, children: /* @__PURE__ */ jsxRuntime.jsx(SideDialogsControllerContext.Provider, { value: sideDialogsController, children: /* @__PURE__ */ jsxRuntime.jsx(SideEntityControllerContext.Provider, { value: sideEntityController, children: /* @__PURE__ */ jsxRuntime.jsx(NavigationContext.Provider, { value: navigationController, children: /* @__PURE__ */ jsxRuntime.jsx(InternalUserManagementContext.Provider, { value: userManagement, children: /* @__PURE__ */ jsxRuntime.jsx(DialogsProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(BreadcrumbsProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(FireCMSInternal, { loading, children }) }) }) }) }) }) }) }) }) }) }) }) });
|
|
24028
24263
|
}
|
|
24029
24264
|
function FireCMSInternal(t0) {
|
|
24030
24265
|
const $ = reactCompilerRuntime.c(7);
|
|
@@ -24194,7 +24429,7 @@
|
|
|
24194
24429
|
} = navigation.topLevelNavigation;
|
|
24195
24430
|
let t1;
|
|
24196
24431
|
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) {
|
|
24197
|
-
const adminViews = navigationEntries.filter(_temp$
|
|
24432
|
+
const adminViews = navigationEntries.filter(_temp$3) ?? [];
|
|
24198
24433
|
let t2;
|
|
24199
24434
|
let t3;
|
|
24200
24435
|
let t4;
|
|
@@ -24347,7 +24582,7 @@
|
|
|
24347
24582
|
function _temp2$2(g) {
|
|
24348
24583
|
return g !== "Admin";
|
|
24349
24584
|
}
|
|
24350
|
-
function _temp$
|
|
24585
|
+
function _temp$3(e) {
|
|
24351
24586
|
return e.type === "admin";
|
|
24352
24587
|
}
|
|
24353
24588
|
function DrawerLogo(t0) {
|
|
@@ -24407,6 +24642,165 @@
|
|
|
24407
24642
|
}
|
|
24408
24643
|
return t6;
|
|
24409
24644
|
}
|
|
24645
|
+
function UserSelectFieldBinding(t0) {
|
|
24646
|
+
const $ = reactCompilerRuntime.c(43);
|
|
24647
|
+
const {
|
|
24648
|
+
propertyKey,
|
|
24649
|
+
value,
|
|
24650
|
+
setValue,
|
|
24651
|
+
error,
|
|
24652
|
+
showError,
|
|
24653
|
+
disabled,
|
|
24654
|
+
property,
|
|
24655
|
+
includeDescription,
|
|
24656
|
+
size: t1
|
|
24657
|
+
} = t0;
|
|
24658
|
+
const size = t1 === void 0 ? "large" : t1;
|
|
24659
|
+
const {
|
|
24660
|
+
users,
|
|
24661
|
+
getUser
|
|
24662
|
+
} = useInternalUserManagementController();
|
|
24663
|
+
let t2;
|
|
24664
|
+
if ($[0] !== setValue) {
|
|
24665
|
+
t2 = (e) => {
|
|
24666
|
+
e.stopPropagation();
|
|
24667
|
+
e.preventDefault();
|
|
24668
|
+
setValue(null);
|
|
24669
|
+
};
|
|
24670
|
+
$[0] = setValue;
|
|
24671
|
+
$[1] = t2;
|
|
24672
|
+
} else {
|
|
24673
|
+
t2 = $[1];
|
|
24674
|
+
}
|
|
24675
|
+
const handleClearClick = t2;
|
|
24676
|
+
let t3;
|
|
24677
|
+
if ($[2] !== value) {
|
|
24678
|
+
t3 = value !== void 0 && value != null ? value.toString() : "";
|
|
24679
|
+
$[2] = value;
|
|
24680
|
+
$[3] = t3;
|
|
24681
|
+
} else {
|
|
24682
|
+
t3 = $[3];
|
|
24683
|
+
}
|
|
24684
|
+
let t4;
|
|
24685
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
24686
|
+
t4 = ui.cls("w-full");
|
|
24687
|
+
$[4] = t4;
|
|
24688
|
+
} else {
|
|
24689
|
+
t4 = $[4];
|
|
24690
|
+
}
|
|
24691
|
+
let t5;
|
|
24692
|
+
if ($[5] !== property) {
|
|
24693
|
+
t5 = getIconForProperty(property, "small");
|
|
24694
|
+
$[5] = property;
|
|
24695
|
+
$[6] = t5;
|
|
24696
|
+
} else {
|
|
24697
|
+
t5 = $[6];
|
|
24698
|
+
}
|
|
24699
|
+
const t6 = property.validation?.required;
|
|
24700
|
+
let t7;
|
|
24701
|
+
if ($[7] !== property.name || $[8] !== t5 || $[9] !== t6) {
|
|
24702
|
+
t7 = /* @__PURE__ */ jsxRuntime.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" });
|
|
24703
|
+
$[7] = property.name;
|
|
24704
|
+
$[8] = t5;
|
|
24705
|
+
$[9] = t6;
|
|
24706
|
+
$[10] = t7;
|
|
24707
|
+
} else {
|
|
24708
|
+
t7 = $[10];
|
|
24709
|
+
}
|
|
24710
|
+
let t8;
|
|
24711
|
+
if ($[11] !== propertyKey || $[12] !== t7) {
|
|
24712
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsx(PropertyIdCopyTooltip, { propertyKey, children: t7 });
|
|
24713
|
+
$[11] = propertyKey;
|
|
24714
|
+
$[12] = t7;
|
|
24715
|
+
$[13] = t8;
|
|
24716
|
+
} else {
|
|
24717
|
+
t8 = $[13];
|
|
24718
|
+
}
|
|
24719
|
+
let t9;
|
|
24720
|
+
if ($[14] !== disabled || $[15] !== handleClearClick || $[16] !== property.clearable || $[17] !== value) {
|
|
24721
|
+
t9 = property.clearable && !disabled && value && /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { size: "small", onClick: handleClearClick, children: /* @__PURE__ */ jsxRuntime.jsx(ui.CloseIcon, { size: "small" }) });
|
|
24722
|
+
$[14] = disabled;
|
|
24723
|
+
$[15] = handleClearClick;
|
|
24724
|
+
$[16] = property.clearable;
|
|
24725
|
+
$[17] = value;
|
|
24726
|
+
$[18] = t9;
|
|
24727
|
+
} else {
|
|
24728
|
+
t9 = $[18];
|
|
24729
|
+
}
|
|
24730
|
+
let t10;
|
|
24731
|
+
if ($[19] !== setValue) {
|
|
24732
|
+
t10 = (updatedValue) => {
|
|
24733
|
+
const newValue = updatedValue || null;
|
|
24734
|
+
return setValue(newValue);
|
|
24735
|
+
};
|
|
24736
|
+
$[19] = setValue;
|
|
24737
|
+
$[20] = t10;
|
|
24738
|
+
} else {
|
|
24739
|
+
t10 = $[20];
|
|
24740
|
+
}
|
|
24741
|
+
let t11;
|
|
24742
|
+
if ($[21] !== getUser) {
|
|
24743
|
+
t11 = (userId) => {
|
|
24744
|
+
const user = getUser(userId);
|
|
24745
|
+
return /* @__PURE__ */ jsxRuntime.jsx(UserDisplay, { user });
|
|
24746
|
+
};
|
|
24747
|
+
$[21] = getUser;
|
|
24748
|
+
$[22] = t11;
|
|
24749
|
+
} else {
|
|
24750
|
+
t11 = $[22];
|
|
24751
|
+
}
|
|
24752
|
+
let t12;
|
|
24753
|
+
if ($[23] !== users) {
|
|
24754
|
+
t12 = users && users.map(_temp$2);
|
|
24755
|
+
$[23] = users;
|
|
24756
|
+
$[24] = t12;
|
|
24757
|
+
} else {
|
|
24758
|
+
t12 = $[24];
|
|
24759
|
+
}
|
|
24760
|
+
let t13;
|
|
24761
|
+
if ($[25] !== disabled || $[26] !== size || $[27] !== t10 || $[28] !== t11 || $[29] !== t12 || $[30] !== t3 || $[31] !== t8 || $[32] !== t9) {
|
|
24762
|
+
t13 = /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { value: t3, disabled, size, fullWidth: true, position: "item-aligned", inputClassName: t4, label: t8, endAdornment: t9, onValueChange: t10, renderValue: t11, children: t12 });
|
|
24763
|
+
$[25] = disabled;
|
|
24764
|
+
$[26] = size;
|
|
24765
|
+
$[27] = t10;
|
|
24766
|
+
$[28] = t11;
|
|
24767
|
+
$[29] = t12;
|
|
24768
|
+
$[30] = t3;
|
|
24769
|
+
$[31] = t8;
|
|
24770
|
+
$[32] = t9;
|
|
24771
|
+
$[33] = t13;
|
|
24772
|
+
} else {
|
|
24773
|
+
t13 = $[33];
|
|
24774
|
+
}
|
|
24775
|
+
let t14;
|
|
24776
|
+
if ($[34] !== disabled || $[35] !== error || $[36] !== includeDescription || $[37] !== property || $[38] !== showError) {
|
|
24777
|
+
t14 = /* @__PURE__ */ jsxRuntime.jsx(FieldHelperText, { includeDescription, showError, error, disabled, property });
|
|
24778
|
+
$[34] = disabled;
|
|
24779
|
+
$[35] = error;
|
|
24780
|
+
$[36] = includeDescription;
|
|
24781
|
+
$[37] = property;
|
|
24782
|
+
$[38] = showError;
|
|
24783
|
+
$[39] = t14;
|
|
24784
|
+
} else {
|
|
24785
|
+
t14 = $[39];
|
|
24786
|
+
}
|
|
24787
|
+
let t15;
|
|
24788
|
+
if ($[40] !== t13 || $[41] !== t14) {
|
|
24789
|
+
t15 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
24790
|
+
t13,
|
|
24791
|
+
t14
|
|
24792
|
+
] });
|
|
24793
|
+
$[40] = t13;
|
|
24794
|
+
$[41] = t14;
|
|
24795
|
+
$[42] = t15;
|
|
24796
|
+
} else {
|
|
24797
|
+
t15 = $[42];
|
|
24798
|
+
}
|
|
24799
|
+
return t15;
|
|
24800
|
+
}
|
|
24801
|
+
function _temp$2(user_0) {
|
|
24802
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: user_0.uid, children: /* @__PURE__ */ jsxRuntime.jsx(UserDisplay, { user: user_0 }) }, user_0.uid);
|
|
24803
|
+
}
|
|
24410
24804
|
function isDefaultFieldConfigId(id) {
|
|
24411
24805
|
return Object.keys(DEFAULT_FIELD_CONFIGS).includes(id);
|
|
24412
24806
|
}
|
|
@@ -24508,6 +24902,16 @@
|
|
|
24508
24902
|
Field: MultiSelectFieldBinding
|
|
24509
24903
|
}
|
|
24510
24904
|
},
|
|
24905
|
+
user_select: {
|
|
24906
|
+
key: "user_select",
|
|
24907
|
+
name: "User select",
|
|
24908
|
+
description: "Select a user from the user management system. Store the user ID.",
|
|
24909
|
+
Icon: ui.PersonIcon,
|
|
24910
|
+
property: {
|
|
24911
|
+
dataType: "string",
|
|
24912
|
+
Field: UserSelectFieldBinding
|
|
24913
|
+
}
|
|
24914
|
+
},
|
|
24511
24915
|
number_input: {
|
|
24512
24916
|
key: "number_input",
|
|
24513
24917
|
name: "Number input",
|
|
@@ -24722,6 +25126,8 @@
|
|
|
24722
25126
|
return "email";
|
|
24723
25127
|
} else if (property.enumValues) {
|
|
24724
25128
|
return "select";
|
|
25129
|
+
} else if (property.userSelect) {
|
|
25130
|
+
return "user_select";
|
|
24725
25131
|
} else if (property.reference) {
|
|
24726
25132
|
return "reference_as_string";
|
|
24727
25133
|
} else {
|
|
@@ -25760,6 +26166,7 @@
|
|
|
25760
26166
|
exports2.SwitchFieldBinding = SwitchFieldBinding;
|
|
25761
26167
|
exports2.TextFieldBinding = TextFieldBinding;
|
|
25762
26168
|
exports2.UrlComponentPreview = UrlComponentPreview;
|
|
26169
|
+
exports2.UserPreview = UserPreview;
|
|
25763
26170
|
exports2.Vector = Vector;
|
|
25764
26171
|
exports2.VirtualTable = VirtualTable;
|
|
25765
26172
|
exports2.addInitialSlash = addInitialSlash;
|
|
@@ -25894,6 +26301,7 @@
|
|
|
25894
26301
|
exports2.useBuildNavigationController = useBuildNavigationController;
|
|
25895
26302
|
exports2.useClearRestoreValue = useClearRestoreValue;
|
|
25896
26303
|
exports2.useClipboard = useClipboard;
|
|
26304
|
+
exports2.useCollapsedGroups = useCollapsedGroups;
|
|
25897
26305
|
exports2.useCollectionFetch = useCollectionFetch;
|
|
25898
26306
|
exports2.useColumnIds = useColumnIds;
|
|
25899
26307
|
exports2.useCustomizationController = useCustomizationController;
|
|
@@ -25904,6 +26312,7 @@
|
|
|
25904
26312
|
exports2.useDialogsController = useDialogsController;
|
|
25905
26313
|
exports2.useEntityFetch = useEntityFetch;
|
|
25906
26314
|
exports2.useFireCMSContext = useFireCMSContext;
|
|
26315
|
+
exports2.useInternalUserManagementController = useInternalUserManagementController;
|
|
25907
26316
|
exports2.useLargeLayout = useLargeLayout;
|
|
25908
26317
|
exports2.useModeController = useModeController;
|
|
25909
26318
|
exports2.useNavigationController = useNavigationController;
|