@firecms/core 3.5.2-canary.16bf7bb → 3.5.2-canary.a36570e
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/EntityCollectionView/CollectionCountBadge.d.ts +8 -0
- package/dist/components/EntityCollectionView/CollectionPathTitle.d.ts +24 -0
- package/dist/components/EntityCollectionView/EntityCollectionView.d.ts +5 -0
- package/dist/components/EntityCollectionView/EntityIdHeaderWidget.d.ts +12 -0
- package/dist/components/EntityCollectionView/utils.d.ts +4 -3
- package/dist/index.es.js +592 -567
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +592 -567
- package/dist/index.umd.js.map +1 -1
- package/dist/internal/useLeavePageConfirmation.d.ts +11 -0
- package/dist/types/side_dialogs_controller.d.ts +4 -2
- package/package.json +3 -3
- package/src/components/EntityCollectionView/CollectionCountBadge.tsx +17 -0
- package/src/components/EntityCollectionView/CollectionPathTitle.tsx +68 -0
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +12 -111
- package/src/components/EntityCollectionView/EntityIdHeaderWidget.tsx +166 -0
- package/src/components/EntityCollectionView/utils.ts +13 -7
- package/src/components/common/default_entity_actions.tsx +2 -1
- package/src/core/DefaultAppBar.tsx +12 -9
- package/src/core/EntityEditView.tsx +26 -1
- package/src/core/SideDialogs.tsx +6 -13
- package/src/hooks/useReferenceDialog.tsx +2 -2
- package/src/internal/useBuildSideDialogsController.tsx +44 -2
- package/src/internal/useLeavePageConfirmation.ts +25 -0
- package/src/types/side_dialogs_controller.tsx +4 -2
- package/dist/internal/useUnsavedChangesDialog.d.ts +0 -12
- package/src/internal/useUnsavedChangesDialog.tsx +0 -142
package/dist/index.umd.js
CHANGED
|
@@ -4802,7 +4802,7 @@
|
|
|
4802
4802
|
}
|
|
4803
4803
|
function useDateFnsLocale(locale) {
|
|
4804
4804
|
const $ = reactCompilerRuntime.c(7);
|
|
4805
|
-
const [, forceUpdate] = React.useReducer(_temp$
|
|
4805
|
+
const [, forceUpdate] = React.useReducer(_temp$I, 0);
|
|
4806
4806
|
let t0;
|
|
4807
4807
|
if ($[0] !== forceUpdate || $[1] !== locale) {
|
|
4808
4808
|
t0 = () => {
|
|
@@ -4845,7 +4845,7 @@
|
|
|
4845
4845
|
}
|
|
4846
4846
|
return t2;
|
|
4847
4847
|
}
|
|
4848
|
-
function _temp$
|
|
4848
|
+
function _temp$I(count) {
|
|
4849
4849
|
return count + 1;
|
|
4850
4850
|
}
|
|
4851
4851
|
const CONTAINER_FULL_WIDTH = "100vw";
|
|
@@ -5062,7 +5062,7 @@
|
|
|
5062
5062
|
}
|
|
5063
5063
|
setDataLoading(false);
|
|
5064
5064
|
setDataLoadingError(void 0);
|
|
5065
|
-
setData(entities.map(_temp$
|
|
5065
|
+
setData(entities.map(_temp$H));
|
|
5066
5066
|
setNoMoreToLoad(!itemCount || entities.length < itemCount);
|
|
5067
5067
|
};
|
|
5068
5068
|
const onError = (error) => {
|
|
@@ -5097,7 +5097,7 @@
|
|
|
5097
5097
|
orderBy: sortByProperty,
|
|
5098
5098
|
order: currentSort
|
|
5099
5099
|
}).then(onEntitiesUpdate).catch(onError);
|
|
5100
|
-
return _temp2$
|
|
5100
|
+
return _temp2$i;
|
|
5101
5101
|
}
|
|
5102
5102
|
};
|
|
5103
5103
|
$[8] = collection;
|
|
@@ -5146,9 +5146,9 @@
|
|
|
5146
5146
|
}
|
|
5147
5147
|
return t6;
|
|
5148
5148
|
}
|
|
5149
|
-
function _temp2$
|
|
5149
|
+
function _temp2$i() {
|
|
5150
5150
|
}
|
|
5151
|
-
function _temp$
|
|
5151
|
+
function _temp$H(e_1) {
|
|
5152
5152
|
return {
|
|
5153
5153
|
...e_1
|
|
5154
5154
|
};
|
|
@@ -5361,7 +5361,7 @@
|
|
|
5361
5361
|
setEntity(CACHE[entityCacheKey(path, entityId)]);
|
|
5362
5362
|
setDataLoading(false);
|
|
5363
5363
|
setDataLoadingError(void 0);
|
|
5364
|
-
return _temp$
|
|
5364
|
+
return _temp$G;
|
|
5365
5365
|
} else {
|
|
5366
5366
|
if (entityId && path && collection) {
|
|
5367
5367
|
if (dataSource.listenEntity) {
|
|
@@ -5382,7 +5382,7 @@
|
|
|
5382
5382
|
databaseId,
|
|
5383
5383
|
collection
|
|
5384
5384
|
}).then(onEntityUpdate).catch(onError);
|
|
5385
|
-
return _temp2$
|
|
5385
|
+
return _temp2$h;
|
|
5386
5386
|
}
|
|
5387
5387
|
} else {
|
|
5388
5388
|
onEntityUpdate(void 0);
|
|
@@ -5430,9 +5430,9 @@
|
|
|
5430
5430
|
}
|
|
5431
5431
|
function _temp3$7() {
|
|
5432
5432
|
}
|
|
5433
|
-
function _temp2$
|
|
5433
|
+
function _temp2$h() {
|
|
5434
5434
|
}
|
|
5435
|
-
function _temp$
|
|
5435
|
+
function _temp$G() {
|
|
5436
5436
|
}
|
|
5437
5437
|
async function saveEntityWithCallbacks({
|
|
5438
5438
|
collection,
|
|
@@ -6087,7 +6087,7 @@
|
|
|
6087
6087
|
}
|
|
6088
6088
|
let t9;
|
|
6089
6089
|
if ($[19] !== url) {
|
|
6090
|
-
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$
|
|
6090
|
+
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$F, children: t8 }) });
|
|
6091
6091
|
$[19] = url;
|
|
6092
6092
|
$[20] = t9;
|
|
6093
6093
|
} else {
|
|
@@ -6121,7 +6121,7 @@
|
|
|
6121
6121
|
}
|
|
6122
6122
|
return t11;
|
|
6123
6123
|
}
|
|
6124
|
-
function _temp$
|
|
6124
|
+
function _temp$F(e_0) {
|
|
6125
6125
|
return e_0.stopPropagation();
|
|
6126
6126
|
}
|
|
6127
6127
|
const FIRECMS_NS$1 = "firecms_core";
|
|
@@ -6188,7 +6188,7 @@
|
|
|
6188
6188
|
}
|
|
6189
6189
|
let t3;
|
|
6190
6190
|
if ($[2] !== url) {
|
|
6191
|
-
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$
|
|
6191
|
+
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$E, target: "_blank", children: [
|
|
6192
6192
|
t2,
|
|
6193
6193
|
url
|
|
6194
6194
|
] });
|
|
@@ -6290,7 +6290,7 @@
|
|
|
6290
6290
|
}
|
|
6291
6291
|
let t7;
|
|
6292
6292
|
if ($[27] !== t4 || $[28] !== t6 || $[29] !== url) {
|
|
6293
|
-
t7 = /* @__PURE__ */ jsxRuntime.jsxs("a", { href: url, rel: "noopener noreferrer", target: "_blank", onClick: _temp2$
|
|
6293
|
+
t7 = /* @__PURE__ */ jsxRuntime.jsxs("a", { href: url, rel: "noopener noreferrer", target: "_blank", onClick: _temp2$g, className: "flex flex-col items-center justify-center", style: t4, children: [
|
|
6294
6294
|
t5,
|
|
6295
6295
|
t6
|
|
6296
6296
|
] });
|
|
@@ -6315,10 +6315,10 @@
|
|
|
6315
6315
|
}
|
|
6316
6316
|
}
|
|
6317
6317
|
}
|
|
6318
|
-
function _temp2$
|
|
6318
|
+
function _temp2$g(e_0) {
|
|
6319
6319
|
return e_0.stopPropagation();
|
|
6320
6320
|
}
|
|
6321
|
-
function _temp$
|
|
6321
|
+
function _temp$E(e) {
|
|
6322
6322
|
e.preventDefault();
|
|
6323
6323
|
}
|
|
6324
6324
|
function VideoPreview(t0) {
|
|
@@ -6452,7 +6452,7 @@
|
|
|
6452
6452
|
if (Array.isArray(arrayProperty.of)) {
|
|
6453
6453
|
let t1;
|
|
6454
6454
|
if ($[6] !== arrayProperty.of) {
|
|
6455
|
-
t1 = arrayProperty.of.map(_temp$
|
|
6455
|
+
t1 = arrayProperty.of.map(_temp$D);
|
|
6456
6456
|
$[6] = arrayProperty.of;
|
|
6457
6457
|
$[7] = t1;
|
|
6458
6458
|
} else {
|
|
@@ -6590,7 +6590,7 @@
|
|
|
6590
6590
|
}
|
|
6591
6591
|
return content || null;
|
|
6592
6592
|
}
|
|
6593
|
-
function _temp$
|
|
6593
|
+
function _temp$D(p, i) {
|
|
6594
6594
|
return renderGenericArrayCell(p, i);
|
|
6595
6595
|
}
|
|
6596
6596
|
function renderMap(property, size) {
|
|
@@ -7781,7 +7781,7 @@
|
|
|
7781
7781
|
timeZoneName: "short"
|
|
7782
7782
|
});
|
|
7783
7783
|
const parts = tzFormatter.formatToParts(date);
|
|
7784
|
-
t32 = parts.find(_temp$
|
|
7784
|
+
t32 = parts.find(_temp$C)?.value ?? "";
|
|
7785
7785
|
$[6] = date;
|
|
7786
7786
|
$[7] = timezone;
|
|
7787
7787
|
$[8] = t32;
|
|
@@ -7852,7 +7852,7 @@
|
|
|
7852
7852
|
}
|
|
7853
7853
|
return t3;
|
|
7854
7854
|
}
|
|
7855
|
-
function _temp$
|
|
7855
|
+
function _temp$C(p) {
|
|
7856
7856
|
return p.type === "timeZoneName";
|
|
7857
7857
|
}
|
|
7858
7858
|
function MapPropertyPreview(t0) {
|
|
@@ -7947,7 +7947,7 @@
|
|
|
7947
7947
|
}
|
|
7948
7948
|
let t1;
|
|
7949
7949
|
if ($[1] !== value) {
|
|
7950
|
-
t1 = Object.entries(value).map(_temp$
|
|
7950
|
+
t1 = Object.entries(value).map(_temp$B);
|
|
7951
7951
|
$[1] = value;
|
|
7952
7952
|
$[2] = t1;
|
|
7953
7953
|
} else {
|
|
@@ -7963,7 +7963,7 @@
|
|
|
7963
7963
|
}
|
|
7964
7964
|
return t2;
|
|
7965
7965
|
}
|
|
7966
|
-
function _temp$
|
|
7966
|
+
function _temp$B(t0) {
|
|
7967
7967
|
const [key, childValue] = t0;
|
|
7968
7968
|
const isTimestampObj = childValue && typeof childValue === "object" && (childValue instanceof Date || "_seconds" in childValue && "_nanoseconds" in childValue && typeof childValue._seconds === "number" && typeof childValue._nanoseconds === "number" || "seconds" in childValue && "nanoseconds" in childValue && typeof childValue.seconds === "number" && typeof childValue.nanoseconds === "number");
|
|
7969
7969
|
const isScalar = childValue && (typeof childValue !== "object" || isTimestampObj);
|
|
@@ -9286,7 +9286,7 @@
|
|
|
9286
9286
|
console.trace("onChange");
|
|
9287
9287
|
if (valueType === "number") {
|
|
9288
9288
|
if (multiple) {
|
|
9289
|
-
const newValue = updatedValue.map(_temp$
|
|
9289
|
+
const newValue = updatedValue.map(_temp$A);
|
|
9290
9290
|
updateValue(newValue);
|
|
9291
9291
|
} else {
|
|
9292
9292
|
updateValue(parseFloat(updatedValue));
|
|
@@ -9339,7 +9339,7 @@
|
|
|
9339
9339
|
const handleOpenChange = t4;
|
|
9340
9340
|
let t5;
|
|
9341
9341
|
if ($[11] !== disabled || $[12] !== enumValues || $[13] !== internalValue || $[14] !== multiple || $[15] !== onChange || $[16] !== renderValue || $[17] !== small || $[18] !== validValue) {
|
|
9342
|
-
t5 = multiple ? /* @__PURE__ */ jsxRuntime.jsx(ui.MultiSelect, { inputRef: ref, className: "w-full h-full p-0 bg-transparent outline-none", position: "item-aligned", disabled, includeClear: false, useChips: false, value: validValue ? internalValue.map(_temp2$
|
|
9342
|
+
t5 = multiple ? /* @__PURE__ */ jsxRuntime.jsx(ui.MultiSelect, { inputRef: ref, className: "w-full h-full p-0 bg-transparent outline-none", position: "item-aligned", disabled, includeClear: false, useChips: false, value: validValue ? internalValue.map(_temp2$f) : [], onValueChange: onChange, onOpenChange: handleOpenChange, 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 outline-none [&_button]:ring-0 [&_button]:ring-offset-0", inputClassName: "ring-0 ring-offset-0 focus:ring-0 focus-visible:ring-0 outline-none focus:outline-none focus-visible:outline-none focus-visible:ring-offset-0", position: "item-aligned", disabled, padding: false, value: validValue ? internalValue?.toString() : "", onValueChange: onChange, onOpenChange: handleOpenChange, 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)) });
|
|
9343
9343
|
$[11] = disabled;
|
|
9344
9344
|
$[12] = enumValues;
|
|
9345
9345
|
$[13] = internalValue;
|
|
@@ -9354,10 +9354,10 @@
|
|
|
9354
9354
|
}
|
|
9355
9355
|
return t5;
|
|
9356
9356
|
}
|
|
9357
|
-
function _temp2$
|
|
9357
|
+
function _temp2$f(v_0) {
|
|
9358
9358
|
return v_0.toString();
|
|
9359
9359
|
}
|
|
9360
|
-
function _temp$
|
|
9360
|
+
function _temp$A(v) {
|
|
9361
9361
|
return parseFloat(v);
|
|
9362
9362
|
}
|
|
9363
9363
|
function VirtualTableNumberInput(props) {
|
|
@@ -9553,7 +9553,7 @@
|
|
|
9553
9553
|
const renderValue = t3;
|
|
9554
9554
|
let t4;
|
|
9555
9555
|
if ($[7] !== disabled || $[8] !== internalValue || $[9] !== multiple || $[10] !== onChange || $[11] !== renderValue || $[12] !== users || $[13] !== validValue) {
|
|
9556
|
-
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$
|
|
9556
|
+
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$z) }) : /* @__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$e) });
|
|
9557
9557
|
$[7] = disabled;
|
|
9558
9558
|
$[8] = internalValue;
|
|
9559
9559
|
$[9] = multiple;
|
|
@@ -9567,10 +9567,10 @@
|
|
|
9567
9567
|
}
|
|
9568
9568
|
return t4;
|
|
9569
9569
|
}
|
|
9570
|
-
function _temp2$
|
|
9570
|
+
function _temp2$e(user_1) {
|
|
9571
9571
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: user_1.uid, children: /* @__PURE__ */ jsxRuntime.jsx(UserDisplay, { user: user_1 }) }, user_1.uid);
|
|
9572
9572
|
}
|
|
9573
|
-
function _temp$
|
|
9573
|
+
function _temp$z(user_0) {
|
|
9574
9574
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.MultiSelectItem, { value: user_0.uid, children: /* @__PURE__ */ jsxRuntime.jsx(UserDisplay, { user: user_0 }) }, user_0.uid);
|
|
9575
9575
|
}
|
|
9576
9576
|
class ErrorBoundary extends React.Component {
|
|
@@ -9818,7 +9818,7 @@
|
|
|
9818
9818
|
newValue = [...internalValue];
|
|
9819
9819
|
newValue = removeDuplicates(newValue);
|
|
9820
9820
|
setInternalValue(newValue);
|
|
9821
|
-
const fieldValue = newValue.filter(_temp$
|
|
9821
|
+
const fieldValue = newValue.filter(_temp$y).map(_temp2$d);
|
|
9822
9822
|
if (multipleFilesSupported) {
|
|
9823
9823
|
onChange(fieldValue);
|
|
9824
9824
|
} else {
|
|
@@ -9936,10 +9936,10 @@
|
|
|
9936
9936
|
}
|
|
9937
9937
|
return t11;
|
|
9938
9938
|
}
|
|
9939
|
-
function _temp2$
|
|
9939
|
+
function _temp2$d(e_0) {
|
|
9940
9940
|
return e_0.storagePathOrDownloadUrl;
|
|
9941
9941
|
}
|
|
9942
|
-
function _temp$
|
|
9942
|
+
function _temp$y(e) {
|
|
9943
9943
|
return !!e.storagePathOrDownloadUrl;
|
|
9944
9944
|
}
|
|
9945
9945
|
function getInternalInitialValue(multipleFilesSupported, value, metadata, size) {
|
|
@@ -10230,7 +10230,7 @@
|
|
|
10230
10230
|
const snackbarContext = useSnackbarController();
|
|
10231
10231
|
let t1;
|
|
10232
10232
|
if ($[0] !== storage.acceptedFiles) {
|
|
10233
|
-
t1 = storage.acceptedFiles ? storage.acceptedFiles.map(_temp$
|
|
10233
|
+
t1 = storage.acceptedFiles ? storage.acceptedFiles.map(_temp$x).reduce(_temp2$c, {}) : void 0;
|
|
10234
10234
|
$[0] = storage.acceptedFiles;
|
|
10235
10235
|
$[1] = t1;
|
|
10236
10236
|
} else {
|
|
@@ -10453,13 +10453,13 @@
|
|
|
10453
10453
|
}
|
|
10454
10454
|
return t20;
|
|
10455
10455
|
}
|
|
10456
|
-
function _temp2$
|
|
10456
|
+
function _temp2$c(a, b) {
|
|
10457
10457
|
return {
|
|
10458
10458
|
...a,
|
|
10459
10459
|
...b
|
|
10460
10460
|
};
|
|
10461
10461
|
}
|
|
10462
|
-
function _temp$
|
|
10462
|
+
function _temp$x(e) {
|
|
10463
10463
|
return {
|
|
10464
10464
|
[e]: []
|
|
10465
10465
|
};
|
|
@@ -10569,7 +10569,7 @@
|
|
|
10569
10569
|
let t1;
|
|
10570
10570
|
if ($[2] !== updateValue) {
|
|
10571
10571
|
t1 = (entities) => {
|
|
10572
|
-
updateValue(entities.filter(Boolean).map(_temp$
|
|
10572
|
+
updateValue(entities.filter(Boolean).map(_temp$w));
|
|
10573
10573
|
};
|
|
10574
10574
|
$[2] = updateValue;
|
|
10575
10575
|
$[3] = t1;
|
|
@@ -10579,7 +10579,7 @@
|
|
|
10579
10579
|
const onMultipleEntitiesSelected = t1;
|
|
10580
10580
|
let t2;
|
|
10581
10581
|
if ($[4] !== internalValue) {
|
|
10582
|
-
t2 = internalValue ? Array.isArray(internalValue) ? internalValue.map(_temp2$
|
|
10582
|
+
t2 = internalValue ? Array.isArray(internalValue) ? internalValue.map(_temp2$b) : internalValue.id ? [internalValue.id] : [] : [];
|
|
10583
10583
|
$[4] = internalValue;
|
|
10584
10584
|
$[5] = t2;
|
|
10585
10585
|
} else {
|
|
@@ -10741,10 +10741,10 @@
|
|
|
10741
10741
|
}
|
|
10742
10742
|
return t10;
|
|
10743
10743
|
}, equal);
|
|
10744
|
-
function _temp$
|
|
10744
|
+
function _temp$w(e) {
|
|
10745
10745
|
return getReferenceFrom(e);
|
|
10746
10746
|
}
|
|
10747
|
-
function _temp2$
|
|
10747
|
+
function _temp2$b(ref) {
|
|
10748
10748
|
return ref.id;
|
|
10749
10749
|
}
|
|
10750
10750
|
yup__namespace.addMethod(yup__namespace.array, "uniqueInArray", function(mapper = (a) => a, message) {
|
|
@@ -12399,7 +12399,7 @@
|
|
|
12399
12399
|
}
|
|
12400
12400
|
let t5;
|
|
12401
12401
|
if ($[15] !== placeholder) {
|
|
12402
|
-
t5 = placeholder && /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: _temp$
|
|
12402
|
+
t5 = placeholder && /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: _temp$v, 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" }) });
|
|
12403
12403
|
$[15] = placeholder;
|
|
12404
12404
|
$[16] = t5;
|
|
12405
12405
|
} else {
|
|
@@ -12422,7 +12422,7 @@
|
|
|
12422
12422
|
}
|
|
12423
12423
|
return t6;
|
|
12424
12424
|
}
|
|
12425
|
-
function _temp$
|
|
12425
|
+
function _temp$v(e) {
|
|
12426
12426
|
return e.stopPropagation();
|
|
12427
12427
|
}
|
|
12428
12428
|
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";
|
|
@@ -12650,7 +12650,7 @@
|
|
|
12650
12650
|
t4 = $[7];
|
|
12651
12651
|
}
|
|
12652
12652
|
const style = t4;
|
|
12653
|
-
const getImageSizeNumber = _temp$
|
|
12653
|
+
const getImageSizeNumber = _temp$u;
|
|
12654
12654
|
let child;
|
|
12655
12655
|
if (entry.storagePathOrDownloadUrl) {
|
|
12656
12656
|
const t52 = `storage_preview_${entry.storagePathOrDownloadUrl}`;
|
|
@@ -12725,7 +12725,7 @@
|
|
|
12725
12725
|
}
|
|
12726
12726
|
return t6;
|
|
12727
12727
|
}
|
|
12728
|
-
function _temp$
|
|
12728
|
+
function _temp$u(previewSize) {
|
|
12729
12729
|
switch (previewSize) {
|
|
12730
12730
|
case "small": {
|
|
12731
12731
|
return 40;
|
|
@@ -12762,7 +12762,7 @@
|
|
|
12762
12762
|
const snackbarContext = useSnackbarController();
|
|
12763
12763
|
let t1;
|
|
12764
12764
|
if ($[0] !== storage.acceptedFiles) {
|
|
12765
|
-
t1 = storage.acceptedFiles ? storage.acceptedFiles.reduce(_temp2$
|
|
12765
|
+
t1 = storage.acceptedFiles ? storage.acceptedFiles.reduce(_temp2$a, {}) : void 0;
|
|
12766
12766
|
$[0] = storage.acceptedFiles;
|
|
12767
12767
|
$[1] = t1;
|
|
12768
12768
|
} else {
|
|
@@ -12955,7 +12955,7 @@
|
|
|
12955
12955
|
}
|
|
12956
12956
|
return t21;
|
|
12957
12957
|
}
|
|
12958
|
-
function _temp2$
|
|
12958
|
+
function _temp2$a(acc, ext) {
|
|
12959
12959
|
return {
|
|
12960
12960
|
...acc,
|
|
12961
12961
|
[ext]: []
|
|
@@ -14498,7 +14498,7 @@
|
|
|
14498
14498
|
} else {
|
|
14499
14499
|
t42 = $[20];
|
|
14500
14500
|
}
|
|
14501
|
-
t3 = Object.entries(mapProperties).filter(_temp$
|
|
14501
|
+
t3 = Object.entries(mapProperties).filter(_temp$t).map(t42);
|
|
14502
14502
|
$[6] = autoFocus;
|
|
14503
14503
|
$[7] = context;
|
|
14504
14504
|
$[8] = disabled;
|
|
@@ -14577,7 +14577,7 @@
|
|
|
14577
14577
|
}
|
|
14578
14578
|
return t10;
|
|
14579
14579
|
}
|
|
14580
|
-
function _temp$
|
|
14580
|
+
function _temp$t(t0) {
|
|
14581
14581
|
const [, property_0] = t0;
|
|
14582
14582
|
return !isHidden(property_0);
|
|
14583
14583
|
}
|
|
@@ -15951,7 +15951,7 @@
|
|
|
15951
15951
|
const property = t4;
|
|
15952
15952
|
let t5;
|
|
15953
15953
|
if ($[9] !== properties) {
|
|
15954
|
-
t5 = Object.entries(properties).map(_temp$
|
|
15954
|
+
t5 = Object.entries(properties).map(_temp$s);
|
|
15955
15955
|
$[9] = properties;
|
|
15956
15956
|
$[10] = t5;
|
|
15957
15957
|
} else {
|
|
@@ -16044,7 +16044,7 @@
|
|
|
16044
16044
|
}
|
|
16045
16045
|
return t11;
|
|
16046
16046
|
}
|
|
16047
|
-
function _temp$
|
|
16047
|
+
function _temp$s(t0) {
|
|
16048
16048
|
const [key, property_0] = t0;
|
|
16049
16049
|
return {
|
|
16050
16050
|
id: key,
|
|
@@ -19377,7 +19377,7 @@
|
|
|
19377
19377
|
let t1;
|
|
19378
19378
|
if ($[0] !== text) {
|
|
19379
19379
|
const urlRegex = /https?:\/\/[^\s]+/g;
|
|
19380
|
-
t1 = text.replace(urlRegex, _temp$
|
|
19380
|
+
t1 = text.replace(urlRegex, _temp$r);
|
|
19381
19381
|
$[0] = text;
|
|
19382
19382
|
$[1] = t1;
|
|
19383
19383
|
} else {
|
|
@@ -19396,7 +19396,7 @@
|
|
|
19396
19396
|
}
|
|
19397
19397
|
return t2;
|
|
19398
19398
|
};
|
|
19399
|
-
function _temp$
|
|
19399
|
+
function _temp$r(url) {
|
|
19400
19400
|
return `<a href="${url}" class="underline" target="_blank">Link</a><br/>`;
|
|
19401
19401
|
}
|
|
19402
19402
|
const operationLabels$2 = {
|
|
@@ -19709,7 +19709,7 @@
|
|
|
19709
19709
|
}
|
|
19710
19710
|
let t9;
|
|
19711
19711
|
if ($[24] !== possibleOperations) {
|
|
19712
|
-
t9 = possibleOperations.map(_temp2$
|
|
19712
|
+
t9 = possibleOperations.map(_temp2$9);
|
|
19713
19713
|
$[24] = possibleOperations;
|
|
19714
19714
|
$[25] = t9;
|
|
19715
19715
|
} else {
|
|
@@ -19717,7 +19717,7 @@
|
|
|
19717
19717
|
}
|
|
19718
19718
|
let t10;
|
|
19719
19719
|
if ($[26] !== operation || $[27] !== t8 || $[28] !== t9) {
|
|
19720
|
-
t10 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[100px]", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { value: operation, size: "medium", fullWidth: true, position: "item-aligned", onValueChange: t8, renderValue: _temp$
|
|
19720
|
+
t10 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[100px]", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { value: operation, size: "medium", fullWidth: true, position: "item-aligned", onValueChange: t8, renderValue: _temp$q, children: t9 }) });
|
|
19721
19721
|
$[26] = operation;
|
|
19722
19722
|
$[27] = t8;
|
|
19723
19723
|
$[28] = t9;
|
|
@@ -19819,10 +19819,10 @@
|
|
|
19819
19819
|
function _temp3$5(e_1) {
|
|
19820
19820
|
return String(e_1);
|
|
19821
19821
|
}
|
|
19822
|
-
function _temp2$
|
|
19822
|
+
function _temp2$9(op_2) {
|
|
19823
19823
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: op_2, children: operationLabels$1[op_2] }, op_2);
|
|
19824
19824
|
}
|
|
19825
|
-
function _temp$
|
|
19825
|
+
function _temp$q(op_1) {
|
|
19826
19826
|
return operationLabels$1[op_1];
|
|
19827
19827
|
}
|
|
19828
19828
|
function BooleanFilterField(t0) {
|
|
@@ -19985,7 +19985,7 @@
|
|
|
19985
19985
|
}
|
|
19986
19986
|
let t7;
|
|
19987
19987
|
if ($[15] !== possibleOperations) {
|
|
19988
|
-
t7 = possibleOperations.map(_temp2$
|
|
19988
|
+
t7 = possibleOperations.map(_temp2$8);
|
|
19989
19989
|
$[15] = possibleOperations;
|
|
19990
19990
|
$[16] = t7;
|
|
19991
19991
|
} else {
|
|
@@ -19993,7 +19993,7 @@
|
|
|
19993
19993
|
}
|
|
19994
19994
|
let t8;
|
|
19995
19995
|
if ($[17] !== operation || $[18] !== t6 || $[19] !== t7) {
|
|
19996
|
-
t8 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[100px]", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { value: operation, size: "medium", fullWidth: true, onValueChange: t6, renderValue: _temp$
|
|
19996
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[100px]", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { value: operation, size: "medium", fullWidth: true, onValueChange: t6, renderValue: _temp$p, children: t7 }) });
|
|
19997
19997
|
$[17] = operation;
|
|
19998
19998
|
$[18] = t6;
|
|
19999
19999
|
$[19] = t7;
|
|
@@ -20040,10 +20040,10 @@
|
|
|
20040
20040
|
}
|
|
20041
20041
|
return t12;
|
|
20042
20042
|
}
|
|
20043
|
-
function _temp2$
|
|
20043
|
+
function _temp2$8(op_2) {
|
|
20044
20044
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: op_2, children: operationLabels[op_2] }, op_2);
|
|
20045
20045
|
}
|
|
20046
|
-
function _temp$
|
|
20046
|
+
function _temp$p(op_1) {
|
|
20047
20047
|
return operationLabels[op_1];
|
|
20048
20048
|
}
|
|
20049
20049
|
const SelectableTable = function SelectableTable2({
|
|
@@ -20806,7 +20806,7 @@
|
|
|
20806
20806
|
parentCollectionIds
|
|
20807
20807
|
};
|
|
20808
20808
|
const searchBlocked = customizationController.plugins?.find((p) => p.collectionView?.blockSearch?.(props));
|
|
20809
|
-
const addTextSearchClickListener = Boolean(dataSource?.initTextSearch) || customizationController.plugins?.find(_temp$
|
|
20809
|
+
const addTextSearchClickListener = Boolean(dataSource?.initTextSearch) || customizationController.plugins?.find(_temp$o);
|
|
20810
20810
|
if (addTextSearchClickListener) {
|
|
20811
20811
|
onTextSearchClick = addTextSearchClickListener ? () => {
|
|
20812
20812
|
setTextSearchLoading(true);
|
|
@@ -20902,7 +20902,7 @@
|
|
|
20902
20902
|
}
|
|
20903
20903
|
return t3;
|
|
20904
20904
|
}
|
|
20905
|
-
function _temp$
|
|
20905
|
+
function _temp$o(p_0) {
|
|
20906
20906
|
return Boolean(p_0.collectionView?.onTextSearchClick);
|
|
20907
20907
|
}
|
|
20908
20908
|
function DeleteEntityDialog({
|
|
@@ -21069,20 +21069,25 @@
|
|
|
21069
21069
|
} catch {
|
|
21070
21070
|
}
|
|
21071
21071
|
}
|
|
21072
|
-
function addRecentId(
|
|
21073
|
-
const recentIds = getRecentIds(
|
|
21072
|
+
function addRecentId(key, id) {
|
|
21073
|
+
const recentIds = getRecentIds(key);
|
|
21074
21074
|
const newRecentIds = [id, ...recentIds.filter((i) => i !== id)];
|
|
21075
21075
|
if (newRecentIds.length > 5) {
|
|
21076
21076
|
newRecentIds.pop();
|
|
21077
21077
|
}
|
|
21078
|
-
saveSearchedIdsLocally(
|
|
21078
|
+
saveSearchedIdsLocally(key, newRecentIds);
|
|
21079
21079
|
return newRecentIds;
|
|
21080
21080
|
}
|
|
21081
|
-
function saveSearchedIdsLocally(
|
|
21082
|
-
setLocalStorageItem("recent_id_searches::" +
|
|
21081
|
+
function saveSearchedIdsLocally(key, ids) {
|
|
21082
|
+
setLocalStorageItem("recent_id_searches::" + key, JSON.stringify(ids));
|
|
21083
21083
|
}
|
|
21084
|
-
function getRecentIds(
|
|
21085
|
-
return getLocalStorageJSON("recent_id_searches::" +
|
|
21084
|
+
function getRecentIds(key) {
|
|
21085
|
+
return getLocalStorageJSON("recent_id_searches::" + key, []);
|
|
21086
|
+
}
|
|
21087
|
+
function removeRecentIds(key, ids) {
|
|
21088
|
+
const remaining = getRecentIds(key).filter((id) => !ids.includes(id));
|
|
21089
|
+
saveSearchedIdsLocally(key, remaining);
|
|
21090
|
+
return remaining;
|
|
21086
21091
|
}
|
|
21087
21092
|
const editEntityAction = {
|
|
21088
21093
|
icon: /* @__PURE__ */ jsxRuntime.jsx(ui.EditIcon, { size: "small" }),
|
|
@@ -21112,7 +21117,7 @@
|
|
|
21112
21117
|
entityId: entity.id
|
|
21113
21118
|
});
|
|
21114
21119
|
if (collection) {
|
|
21115
|
-
addRecentId(collection.id, entity.id);
|
|
21120
|
+
addRecentId(fullIdPath ?? fullPath ?? collection.id, entity.id);
|
|
21116
21121
|
}
|
|
21117
21122
|
const path = collection?.collectionGroup ? entity.path : fullPath ?? collection?.path ?? entity.path;
|
|
21118
21123
|
const resolvedPathSegments = collection?.collectionGroup ? entity.pathSegments : pathSegments ?? entity.pathSegments;
|
|
@@ -21565,7 +21570,7 @@
|
|
|
21565
21570
|
T0 = ui.Collapse;
|
|
21566
21571
|
t4 = favouriteCollections.length > 0;
|
|
21567
21572
|
t2 = "flex flex-row flex-wrap gap-2 pb-2 min-h-[32px]";
|
|
21568
|
-
t3 = favouriteCollections.map(_temp$
|
|
21573
|
+
t3 = favouriteCollections.map(_temp$n);
|
|
21569
21574
|
$[2] = navigationController;
|
|
21570
21575
|
$[3] = t1;
|
|
21571
21576
|
$[4] = T0;
|
|
@@ -21599,7 +21604,7 @@
|
|
|
21599
21604
|
}
|
|
21600
21605
|
return t6;
|
|
21601
21606
|
}
|
|
21602
|
-
function _temp$
|
|
21607
|
+
function _temp$n(entry_0) {
|
|
21603
21608
|
return /* @__PURE__ */ jsxRuntime.jsx(NavigationChip, { entry: entry_0 }, entry_0.path);
|
|
21604
21609
|
}
|
|
21605
21610
|
const scrollsMap = {};
|
|
@@ -21836,7 +21841,7 @@
|
|
|
21836
21841
|
}
|
|
21837
21842
|
let t4;
|
|
21838
21843
|
if ($[4] !== actions) {
|
|
21839
|
-
t4 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5", onClick: _temp$
|
|
21844
|
+
t4 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5", onClick: _temp$m, children: actions });
|
|
21840
21845
|
$[4] = actions;
|
|
21841
21846
|
$[5] = t4;
|
|
21842
21847
|
} else {
|
|
@@ -21923,7 +21928,7 @@
|
|
|
21923
21928
|
}
|
|
21924
21929
|
return t12;
|
|
21925
21930
|
});
|
|
21926
|
-
function _temp$
|
|
21931
|
+
function _temp$m(event) {
|
|
21927
21932
|
event.preventDefault();
|
|
21928
21933
|
event.stopPropagation();
|
|
21929
21934
|
}
|
|
@@ -24290,7 +24295,7 @@
|
|
|
24290
24295
|
let t19;
|
|
24291
24296
|
let t20;
|
|
24292
24297
|
if ($[19] !== items2) {
|
|
24293
|
-
t20 = items2.map(_temp$
|
|
24298
|
+
t20 = items2.map(_temp$l);
|
|
24294
24299
|
$[19] = items2;
|
|
24295
24300
|
$[20] = t20;
|
|
24296
24301
|
} else {
|
|
@@ -24396,7 +24401,7 @@
|
|
|
24396
24401
|
}
|
|
24397
24402
|
return t29;
|
|
24398
24403
|
});
|
|
24399
|
-
function _temp$
|
|
24404
|
+
function _temp$l(i) {
|
|
24400
24405
|
return i.id;
|
|
24401
24406
|
}
|
|
24402
24407
|
function Board(t0) {
|
|
@@ -26568,7 +26573,7 @@
|
|
|
26568
26573
|
}
|
|
26569
26574
|
let t7;
|
|
26570
26575
|
if ($[30] !== collection.forceFilter || $[31] !== filtersDialogOpen || $[32] !== resolvedProperties || $[33] !== tableController) {
|
|
26571
|
-
t7 = resolvedProperties && tableController.setFilterValues && /* @__PURE__ */ jsxRuntime.jsx(FiltersDialog, { open: filtersDialogOpen, onOpenChange: setFiltersDialogOpen, properties: resolvedProperties, filterValues: tableController.filterValues, setFilterValues: (filterValues_0) => tableController.setFilterValues?.(filterValues_0 ?? {}), forceFilter: collection.forceFilter, allowedFilters: tableController.allowedFilters?.map(_temp$
|
|
26576
|
+
t7 = resolvedProperties && tableController.setFilterValues && /* @__PURE__ */ jsxRuntime.jsx(FiltersDialog, { open: filtersDialogOpen, onOpenChange: setFiltersDialogOpen, properties: resolvedProperties, filterValues: tableController.filterValues, setFilterValues: (filterValues_0) => tableController.setFilterValues?.(filterValues_0 ?? {}), forceFilter: collection.forceFilter, allowedFilters: tableController.allowedFilters?.map(_temp$k) });
|
|
26572
26577
|
$[30] = collection.forceFilter;
|
|
26573
26578
|
$[31] = filtersDialogOpen;
|
|
26574
26579
|
$[32] = resolvedProperties;
|
|
@@ -26591,9 +26596,104 @@
|
|
|
26591
26596
|
}
|
|
26592
26597
|
return t8;
|
|
26593
26598
|
}
|
|
26594
|
-
function _temp$
|
|
26599
|
+
function _temp$k(key_0) {
|
|
26595
26600
|
return key_0.toString();
|
|
26596
26601
|
}
|
|
26602
|
+
const DEFAULT_ENTITY_OPEN_MODE$1 = "side_panel";
|
|
26603
|
+
function EntityIdHeaderWidget({
|
|
26604
|
+
collection,
|
|
26605
|
+
path,
|
|
26606
|
+
pathSegments,
|
|
26607
|
+
fullIdPath
|
|
26608
|
+
}) {
|
|
26609
|
+
const navigation = useNavigationController();
|
|
26610
|
+
const dataSource = useDataSource();
|
|
26611
|
+
const [openPopup, setOpenPopup] = React.useState(false);
|
|
26612
|
+
const [searchString, setSearchString] = React.useState("");
|
|
26613
|
+
const [recentIds, setRecentIds] = React.useState([]);
|
|
26614
|
+
const latestCheck = React.useRef(0);
|
|
26615
|
+
const sideEntityController = useSideEntityController();
|
|
26616
|
+
const {
|
|
26617
|
+
t
|
|
26618
|
+
} = useTranslation();
|
|
26619
|
+
const resolvedPath = navigation.resolveIdsFrom(path, pathSegments);
|
|
26620
|
+
const resolvedPathSegments = pathSegments ? navigation.resolveSegmentsFrom?.(pathSegments) ?? pathSegments : void 0;
|
|
26621
|
+
const entityExists = React.useCallback(async (entityId) => {
|
|
26622
|
+
try {
|
|
26623
|
+
const entity = await dataSource.fetchEntity({
|
|
26624
|
+
path: resolvedPath,
|
|
26625
|
+
pathSegments: resolvedPathSegments,
|
|
26626
|
+
entityId,
|
|
26627
|
+
collection
|
|
26628
|
+
});
|
|
26629
|
+
return Boolean(entity?.values);
|
|
26630
|
+
} catch (e) {
|
|
26631
|
+
return void 0;
|
|
26632
|
+
}
|
|
26633
|
+
}, [dataSource, resolvedPath, resolvedPathSegments, collection]);
|
|
26634
|
+
const refreshRecentIds = () => {
|
|
26635
|
+
const ids = getRecentIds(fullIdPath);
|
|
26636
|
+
const check = ++latestCheck.current;
|
|
26637
|
+
Promise.all(ids.map(entityExists)).then((results) => {
|
|
26638
|
+
if (check !== latestCheck.current) return;
|
|
26639
|
+
const missing = ids.filter((_, i) => results[i] === false);
|
|
26640
|
+
if (missing.length > 0) removeRecentIds(fullIdPath, missing);
|
|
26641
|
+
setRecentIds(ids.filter((__0, i_0) => results[i_0] === true));
|
|
26642
|
+
});
|
|
26643
|
+
};
|
|
26644
|
+
const openEntityMode = collection?.openEntityMode ?? DEFAULT_ENTITY_OPEN_MODE$1;
|
|
26645
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: !openPopup ? t("find_by_id") : void 0, asChild: false, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Popover, { open: openPopup, onOpenChange: (open) => {
|
|
26646
|
+
if (open) refreshRecentIds();
|
|
26647
|
+
setOpenPopup(open);
|
|
26648
|
+
}, sideOffset: 0, align: "start", alignOffset: -117, trigger: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { size: "small", children: /* @__PURE__ */ jsxRuntime.jsx(ui.SearchIcon, { size: "small" }) }), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls("my-2 rounded-lg bg-surface-50 dark:bg-surface-950 text-surface-900 dark:text-white"), children: [
|
|
26649
|
+
/* @__PURE__ */ jsxRuntime.jsx("form", { noValidate: true, onSubmit: (e_0) => {
|
|
26650
|
+
e_0.preventDefault();
|
|
26651
|
+
const entityId_0 = searchString.trim();
|
|
26652
|
+
if (!entityId_0) return;
|
|
26653
|
+
setOpenPopup(false);
|
|
26654
|
+
entityExists(entityId_0).then((exists) => {
|
|
26655
|
+
if (exists) addRecentId(fullIdPath, entityId_0);
|
|
26656
|
+
});
|
|
26657
|
+
navigateToEntity({
|
|
26658
|
+
openEntityMode,
|
|
26659
|
+
collection,
|
|
26660
|
+
entityId: entityId_0,
|
|
26661
|
+
path,
|
|
26662
|
+
pathSegments,
|
|
26663
|
+
fullIdPath,
|
|
26664
|
+
sideEntityController,
|
|
26665
|
+
navigation
|
|
26666
|
+
});
|
|
26667
|
+
}, className: "w-96 max-w-full", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex p-2 w-full gap-2", children: [
|
|
26668
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26669
|
+
"input",
|
|
26670
|
+
{
|
|
26671
|
+
autoFocus: openPopup,
|
|
26672
|
+
placeholder: t("find_entity_by_id"),
|
|
26673
|
+
onChange: (e_1) => {
|
|
26674
|
+
setSearchString(e_1.target.value);
|
|
26675
|
+
},
|
|
26676
|
+
value: searchString,
|
|
26677
|
+
className: "rounded-lg bg-white dark:bg-surface-800 flex-grow bg-transparent outline-none p-2 " + ui.focusedDisabled
|
|
26678
|
+
}
|
|
26679
|
+
),
|
|
26680
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", disabled: !searchString.trim(), type: "submit", children: /* @__PURE__ */ jsxRuntime.jsx(ui.KeyboardTabIcon, {}) })
|
|
26681
|
+
] }) }),
|
|
26682
|
+
recentIds && recentIds.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2 p-2", children: recentIds.map((id) => /* @__PURE__ */ jsxRuntime.jsx(ReferencePreview, { reference: new EntityReference(id, path, void 0, pathSegments), hover: true, onClick: () => {
|
|
26683
|
+
setOpenPopup(false);
|
|
26684
|
+
navigateToEntity({
|
|
26685
|
+
openEntityMode,
|
|
26686
|
+
collection,
|
|
26687
|
+
entityId: id,
|
|
26688
|
+
path,
|
|
26689
|
+
pathSegments,
|
|
26690
|
+
fullIdPath,
|
|
26691
|
+
sideEntityController,
|
|
26692
|
+
navigation
|
|
26693
|
+
});
|
|
26694
|
+
}, includeEntityLink: false, size: "small" }, id)) })
|
|
26695
|
+
] }) }) });
|
|
26696
|
+
}
|
|
26597
26697
|
const collectionScrollCache = /* @__PURE__ */ new Map();
|
|
26598
26698
|
function useScrollRestoration() {
|
|
26599
26699
|
const updateCollectionScroll = ({
|
|
@@ -26634,6 +26734,7 @@
|
|
|
26634
26734
|
isSubCollection,
|
|
26635
26735
|
className,
|
|
26636
26736
|
updateUrl,
|
|
26737
|
+
onCountChange,
|
|
26637
26738
|
...collectionProp
|
|
26638
26739
|
}) {
|
|
26639
26740
|
const context = useFireCMSContext();
|
|
@@ -26771,7 +26872,7 @@
|
|
|
26771
26872
|
entityId: clickedEntity.id
|
|
26772
26873
|
});
|
|
26773
26874
|
if (collection_1) {
|
|
26774
|
-
addRecentId(
|
|
26875
|
+
addRecentId(fullIdPath ?? fullPath, clickedEntity.id);
|
|
26775
26876
|
}
|
|
26776
26877
|
const isCollectionGroup = Boolean(collection_1?.collectionGroup);
|
|
26777
26878
|
const path = isCollectionGroup ? clickedEntity.path : fullPath ?? clickedEntity.path;
|
|
@@ -27099,8 +27200,9 @@
|
|
|
27099
27200
|
React.useEffect(() => {
|
|
27100
27201
|
if (docsCount !== void 0) {
|
|
27101
27202
|
breadcrumbs.updateCount(fullPath, docsCount);
|
|
27203
|
+
onCountChange?.(docsCount);
|
|
27102
27204
|
}
|
|
27103
|
-
}, [docsCount, fullPath, breadcrumbs.updateCount]);
|
|
27205
|
+
}, [docsCount, fullPath, breadcrumbs.updateCount, onCountChange]);
|
|
27104
27206
|
const countFetcher = /* @__PURE__ */ jsxRuntime.jsx(EntitiesCount, { fullPath, pathSegments, collection, filter: tableController.filterValues, sortBy: tableController.sortBy, onCountChange: setDocsCount });
|
|
27105
27207
|
const buildAdditionalHeaderWidget = React.useCallback(({
|
|
27106
27208
|
property: property_2,
|
|
@@ -27246,207 +27348,6 @@
|
|
|
27246
27348
|
}
|
|
27247
27349
|
};
|
|
27248
27350
|
}
|
|
27249
|
-
function EntityIdHeaderWidget(t0) {
|
|
27250
|
-
const $ = reactCompilerRuntime.c(50);
|
|
27251
|
-
const {
|
|
27252
|
-
collection,
|
|
27253
|
-
path,
|
|
27254
|
-
pathSegments,
|
|
27255
|
-
fullIdPath
|
|
27256
|
-
} = t0;
|
|
27257
|
-
const navigation = useNavigationController();
|
|
27258
|
-
const [openPopup, setOpenPopup] = React.useState(false);
|
|
27259
|
-
const [searchString, setSearchString] = React.useState("");
|
|
27260
|
-
let t1;
|
|
27261
|
-
if ($[0] !== collection.id) {
|
|
27262
|
-
t1 = getRecentIds(collection.id);
|
|
27263
|
-
$[0] = collection.id;
|
|
27264
|
-
$[1] = t1;
|
|
27265
|
-
} else {
|
|
27266
|
-
t1 = $[1];
|
|
27267
|
-
}
|
|
27268
|
-
const [recentIds, setRecentIds] = React.useState(t1);
|
|
27269
|
-
const sideEntityController = useSideEntityController();
|
|
27270
|
-
const {
|
|
27271
|
-
t
|
|
27272
|
-
} = useTranslation();
|
|
27273
|
-
const openEntityMode = collection?.openEntityMode ?? DEFAULT_ENTITY_OPEN_MODE;
|
|
27274
|
-
let t2;
|
|
27275
|
-
if ($[2] !== openPopup || $[3] !== t) {
|
|
27276
|
-
t2 = !openPopup ? t("find_by_id") : void 0;
|
|
27277
|
-
$[2] = openPopup;
|
|
27278
|
-
$[3] = t;
|
|
27279
|
-
$[4] = t2;
|
|
27280
|
-
} else {
|
|
27281
|
-
t2 = $[4];
|
|
27282
|
-
}
|
|
27283
|
-
let t3;
|
|
27284
|
-
let t4;
|
|
27285
|
-
if ($[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
27286
|
-
t3 = /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { size: "small", children: /* @__PURE__ */ jsxRuntime.jsx(ui.SearchIcon, { size: "small" }) });
|
|
27287
|
-
t4 = ui.cls("my-2 rounded-lg bg-surface-50 dark:bg-surface-950 text-surface-900 dark:text-white");
|
|
27288
|
-
$[5] = t3;
|
|
27289
|
-
$[6] = t4;
|
|
27290
|
-
} else {
|
|
27291
|
-
t3 = $[5];
|
|
27292
|
-
t4 = $[6];
|
|
27293
|
-
}
|
|
27294
|
-
let t5;
|
|
27295
|
-
if ($[7] !== collection || $[8] !== fullIdPath || $[9] !== navigation || $[10] !== openEntityMode || $[11] !== path || $[12] !== pathSegments || $[13] !== searchString || $[14] !== sideEntityController) {
|
|
27296
|
-
t5 = (e) => {
|
|
27297
|
-
e.preventDefault();
|
|
27298
|
-
if (!searchString) {
|
|
27299
|
-
return;
|
|
27300
|
-
}
|
|
27301
|
-
setOpenPopup(false);
|
|
27302
|
-
const entityId = searchString.trim();
|
|
27303
|
-
setRecentIds(addRecentId(collection.id, entityId));
|
|
27304
|
-
navigateToEntity({
|
|
27305
|
-
openEntityMode,
|
|
27306
|
-
collection,
|
|
27307
|
-
entityId,
|
|
27308
|
-
path,
|
|
27309
|
-
pathSegments,
|
|
27310
|
-
fullIdPath,
|
|
27311
|
-
sideEntityController,
|
|
27312
|
-
navigation
|
|
27313
|
-
});
|
|
27314
|
-
};
|
|
27315
|
-
$[7] = collection;
|
|
27316
|
-
$[8] = fullIdPath;
|
|
27317
|
-
$[9] = navigation;
|
|
27318
|
-
$[10] = openEntityMode;
|
|
27319
|
-
$[11] = path;
|
|
27320
|
-
$[12] = pathSegments;
|
|
27321
|
-
$[13] = searchString;
|
|
27322
|
-
$[14] = sideEntityController;
|
|
27323
|
-
$[15] = t5;
|
|
27324
|
-
} else {
|
|
27325
|
-
t5 = $[15];
|
|
27326
|
-
}
|
|
27327
|
-
let t6;
|
|
27328
|
-
if ($[16] !== t) {
|
|
27329
|
-
t6 = t("find_entity_by_id");
|
|
27330
|
-
$[16] = t;
|
|
27331
|
-
$[17] = t6;
|
|
27332
|
-
} else {
|
|
27333
|
-
t6 = $[17];
|
|
27334
|
-
}
|
|
27335
|
-
let t7;
|
|
27336
|
-
if ($[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
27337
|
-
t7 = (e_0) => {
|
|
27338
|
-
setSearchString(e_0.target.value);
|
|
27339
|
-
};
|
|
27340
|
-
$[18] = t7;
|
|
27341
|
-
} else {
|
|
27342
|
-
t7 = $[18];
|
|
27343
|
-
}
|
|
27344
|
-
let t8;
|
|
27345
|
-
if ($[19] !== openPopup || $[20] !== searchString || $[21] !== t6) {
|
|
27346
|
-
t8 = /* @__PURE__ */ jsxRuntime.jsx("input", { autoFocus: openPopup, placeholder: t6, onChange: t7, value: searchString, className: "rounded-lg bg-white dark:bg-surface-800 flex-grow bg-transparent outline-none p-2 " + ui.focusedDisabled });
|
|
27347
|
-
$[19] = openPopup;
|
|
27348
|
-
$[20] = searchString;
|
|
27349
|
-
$[21] = t6;
|
|
27350
|
-
$[22] = t8;
|
|
27351
|
-
} else {
|
|
27352
|
-
t8 = $[22];
|
|
27353
|
-
}
|
|
27354
|
-
const t9 = !searchString.trim();
|
|
27355
|
-
let t10;
|
|
27356
|
-
if ($[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
27357
|
-
t10 = /* @__PURE__ */ jsxRuntime.jsx(ui.KeyboardTabIcon, {});
|
|
27358
|
-
$[23] = t10;
|
|
27359
|
-
} else {
|
|
27360
|
-
t10 = $[23];
|
|
27361
|
-
}
|
|
27362
|
-
let t11;
|
|
27363
|
-
if ($[24] !== t9) {
|
|
27364
|
-
t11 = /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", disabled: t9, type: "submit", children: t10 });
|
|
27365
|
-
$[24] = t9;
|
|
27366
|
-
$[25] = t11;
|
|
27367
|
-
} else {
|
|
27368
|
-
t11 = $[25];
|
|
27369
|
-
}
|
|
27370
|
-
let t12;
|
|
27371
|
-
if ($[26] !== t11 || $[27] !== t8) {
|
|
27372
|
-
t12 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex p-2 w-full gap-2", children: [
|
|
27373
|
-
t8,
|
|
27374
|
-
t11
|
|
27375
|
-
] });
|
|
27376
|
-
$[26] = t11;
|
|
27377
|
-
$[27] = t8;
|
|
27378
|
-
$[28] = t12;
|
|
27379
|
-
} else {
|
|
27380
|
-
t12 = $[28];
|
|
27381
|
-
}
|
|
27382
|
-
let t13;
|
|
27383
|
-
if ($[29] !== t12 || $[30] !== t5) {
|
|
27384
|
-
t13 = /* @__PURE__ */ jsxRuntime.jsx("form", { noValidate: true, onSubmit: t5, className: "w-96 max-w-full", children: t12 });
|
|
27385
|
-
$[29] = t12;
|
|
27386
|
-
$[30] = t5;
|
|
27387
|
-
$[31] = t13;
|
|
27388
|
-
} else {
|
|
27389
|
-
t13 = $[31];
|
|
27390
|
-
}
|
|
27391
|
-
let t14;
|
|
27392
|
-
if ($[32] !== collection || $[33] !== fullIdPath || $[34] !== navigation || $[35] !== openEntityMode || $[36] !== path || $[37] !== pathSegments || $[38] !== recentIds || $[39] !== sideEntityController) {
|
|
27393
|
-
t14 = recentIds && recentIds.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2 p-2", children: recentIds.map((id) => /* @__PURE__ */ jsxRuntime.jsx(ReferencePreview, { reference: new EntityReference(id, path, void 0, pathSegments), hover: true, onClick: () => {
|
|
27394
|
-
setOpenPopup(false);
|
|
27395
|
-
navigateToEntity({
|
|
27396
|
-
openEntityMode,
|
|
27397
|
-
collection,
|
|
27398
|
-
entityId: id,
|
|
27399
|
-
path,
|
|
27400
|
-
pathSegments,
|
|
27401
|
-
fullIdPath,
|
|
27402
|
-
sideEntityController,
|
|
27403
|
-
navigation
|
|
27404
|
-
});
|
|
27405
|
-
}, includeEntityLink: false, size: "small" }, id)) });
|
|
27406
|
-
$[32] = collection;
|
|
27407
|
-
$[33] = fullIdPath;
|
|
27408
|
-
$[34] = navigation;
|
|
27409
|
-
$[35] = openEntityMode;
|
|
27410
|
-
$[36] = path;
|
|
27411
|
-
$[37] = pathSegments;
|
|
27412
|
-
$[38] = recentIds;
|
|
27413
|
-
$[39] = sideEntityController;
|
|
27414
|
-
$[40] = t14;
|
|
27415
|
-
} else {
|
|
27416
|
-
t14 = $[40];
|
|
27417
|
-
}
|
|
27418
|
-
let t15;
|
|
27419
|
-
if ($[41] !== t13 || $[42] !== t14) {
|
|
27420
|
-
t15 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t4, children: [
|
|
27421
|
-
t13,
|
|
27422
|
-
t14
|
|
27423
|
-
] });
|
|
27424
|
-
$[41] = t13;
|
|
27425
|
-
$[42] = t14;
|
|
27426
|
-
$[43] = t15;
|
|
27427
|
-
} else {
|
|
27428
|
-
t15 = $[43];
|
|
27429
|
-
}
|
|
27430
|
-
let t16;
|
|
27431
|
-
if ($[44] !== openPopup || $[45] !== t15) {
|
|
27432
|
-
t16 = /* @__PURE__ */ jsxRuntime.jsx(ui.Popover, { open: openPopup, onOpenChange: setOpenPopup, sideOffset: 0, align: "start", alignOffset: -117, trigger: t3, children: t15 });
|
|
27433
|
-
$[44] = openPopup;
|
|
27434
|
-
$[45] = t15;
|
|
27435
|
-
$[46] = t16;
|
|
27436
|
-
} else {
|
|
27437
|
-
t16 = $[46];
|
|
27438
|
-
}
|
|
27439
|
-
let t17;
|
|
27440
|
-
if ($[47] !== t16 || $[48] !== t2) {
|
|
27441
|
-
t17 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: t2, asChild: false, children: t16 });
|
|
27442
|
-
$[47] = t16;
|
|
27443
|
-
$[48] = t2;
|
|
27444
|
-
$[49] = t17;
|
|
27445
|
-
} else {
|
|
27446
|
-
t17 = $[49];
|
|
27447
|
-
}
|
|
27448
|
-
return t17;
|
|
27449
|
-
}
|
|
27450
27351
|
const EntityCollectionView$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
27451
27352
|
__proto__: null,
|
|
27452
27353
|
EntityCollectionView: EntityCollectionView$1
|
|
@@ -27866,7 +27767,7 @@
|
|
|
27866
27767
|
}
|
|
27867
27768
|
let t10;
|
|
27868
27769
|
if ($[11] !== headerActions) {
|
|
27869
|
-
t10 = headerActions && /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: _temp$
|
|
27770
|
+
t10 = headerActions && /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: _temp$j, children: headerActions });
|
|
27870
27771
|
$[11] = headerActions;
|
|
27871
27772
|
$[12] = t10;
|
|
27872
27773
|
} else {
|
|
@@ -27946,7 +27847,7 @@
|
|
|
27946
27847
|
}
|
|
27947
27848
|
return t16;
|
|
27948
27849
|
}
|
|
27949
|
-
function _temp$
|
|
27850
|
+
function _temp$j(e) {
|
|
27950
27851
|
return e.stopPropagation();
|
|
27951
27852
|
}
|
|
27952
27853
|
function DefaultDrawer(t0) {
|
|
@@ -27991,10 +27892,10 @@
|
|
|
27991
27892
|
navigationEntries,
|
|
27992
27893
|
groups
|
|
27993
27894
|
} = navigation.topLevelNavigation;
|
|
27994
|
-
const adminViews = navigationEntries.filter(_temp$
|
|
27895
|
+
const adminViews = navigationEntries.filter(_temp$i) ?? [];
|
|
27995
27896
|
let t2;
|
|
27996
27897
|
if ($[1] !== groups) {
|
|
27997
|
-
t2 = groups.filter(_temp2$
|
|
27898
|
+
t2 = groups.filter(_temp2$7);
|
|
27998
27899
|
$[1] = groups;
|
|
27999
27900
|
$[2] = t2;
|
|
28000
27901
|
} else {
|
|
@@ -28131,10 +28032,10 @@
|
|
|
28131
28032
|
}
|
|
28132
28033
|
return t14;
|
|
28133
28034
|
}
|
|
28134
|
-
function _temp2$
|
|
28035
|
+
function _temp2$7(g) {
|
|
28135
28036
|
return g !== "Admin";
|
|
28136
28037
|
}
|
|
28137
|
-
function _temp$
|
|
28038
|
+
function _temp$i(e) {
|
|
28138
28039
|
return e.type === "admin";
|
|
28139
28040
|
}
|
|
28140
28041
|
function DrawerToggle() {
|
|
@@ -28265,8 +28166,149 @@
|
|
|
28265
28166
|
}
|
|
28266
28167
|
return t2;
|
|
28267
28168
|
}
|
|
28169
|
+
function CollectionCountBadge(t0) {
|
|
28170
|
+
const $ = reactCompilerRuntime.c(3);
|
|
28171
|
+
const {
|
|
28172
|
+
count
|
|
28173
|
+
} = t0;
|
|
28174
|
+
if (count === void 0) {
|
|
28175
|
+
return null;
|
|
28176
|
+
}
|
|
28177
|
+
if (count === null) {
|
|
28178
|
+
let t12;
|
|
28179
|
+
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
28180
|
+
t12 = /* @__PURE__ */ jsxRuntime.jsx(ui.Skeleton, { className: "w-8 h-4 rounded-md" });
|
|
28181
|
+
$[0] = t12;
|
|
28182
|
+
} else {
|
|
28183
|
+
t12 = $[0];
|
|
28184
|
+
}
|
|
28185
|
+
return t12;
|
|
28186
|
+
}
|
|
28187
|
+
let t1;
|
|
28188
|
+
if ($[1] !== count) {
|
|
28189
|
+
t1 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-surface-accent-500 dark:text-surface-accent-400 bg-surface-100 dark:bg-surface-700 px-1 py-0 rounded", children: count });
|
|
28190
|
+
$[1] = count;
|
|
28191
|
+
$[2] = t1;
|
|
28192
|
+
} else {
|
|
28193
|
+
t1 = $[2];
|
|
28194
|
+
}
|
|
28195
|
+
return t1;
|
|
28196
|
+
}
|
|
28197
|
+
function PathTitle(t0) {
|
|
28198
|
+
const $ = reactCompilerRuntime.c(15);
|
|
28199
|
+
const {
|
|
28200
|
+
parents,
|
|
28201
|
+
name,
|
|
28202
|
+
count,
|
|
28203
|
+
className
|
|
28204
|
+
} = t0;
|
|
28205
|
+
let t1;
|
|
28206
|
+
if ($[0] !== className) {
|
|
28207
|
+
t1 = ui.cls("flex flex-col", className);
|
|
28208
|
+
$[0] = className;
|
|
28209
|
+
$[1] = t1;
|
|
28210
|
+
} else {
|
|
28211
|
+
t1 = $[1];
|
|
28212
|
+
}
|
|
28213
|
+
let t2;
|
|
28214
|
+
if ($[2] !== parents) {
|
|
28215
|
+
t2 = parents.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", noWrap: true, children: parents.join(" / ") });
|
|
28216
|
+
$[2] = parents;
|
|
28217
|
+
$[3] = t2;
|
|
28218
|
+
} else {
|
|
28219
|
+
t2 = $[3];
|
|
28220
|
+
}
|
|
28221
|
+
let t3;
|
|
28222
|
+
if ($[4] !== name) {
|
|
28223
|
+
t3 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", noWrap: true, className: "font-medium", children: name });
|
|
28224
|
+
$[4] = name;
|
|
28225
|
+
$[5] = t3;
|
|
28226
|
+
} else {
|
|
28227
|
+
t3 = $[5];
|
|
28228
|
+
}
|
|
28229
|
+
let t4;
|
|
28230
|
+
if ($[6] !== count) {
|
|
28231
|
+
t4 = /* @__PURE__ */ jsxRuntime.jsx(CollectionCountBadge, { count });
|
|
28232
|
+
$[6] = count;
|
|
28233
|
+
$[7] = t4;
|
|
28234
|
+
} else {
|
|
28235
|
+
t4 = $[7];
|
|
28236
|
+
}
|
|
28237
|
+
let t5;
|
|
28238
|
+
if ($[8] !== t3 || $[9] !== t4) {
|
|
28239
|
+
t5 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center gap-2 min-w-0", children: [
|
|
28240
|
+
t3,
|
|
28241
|
+
t4
|
|
28242
|
+
] });
|
|
28243
|
+
$[8] = t3;
|
|
28244
|
+
$[9] = t4;
|
|
28245
|
+
$[10] = t5;
|
|
28246
|
+
} else {
|
|
28247
|
+
t5 = $[10];
|
|
28248
|
+
}
|
|
28249
|
+
let t6;
|
|
28250
|
+
if ($[11] !== t1 || $[12] !== t2 || $[13] !== t5) {
|
|
28251
|
+
t6 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t1, children: [
|
|
28252
|
+
t2,
|
|
28253
|
+
t5
|
|
28254
|
+
] });
|
|
28255
|
+
$[11] = t1;
|
|
28256
|
+
$[12] = t2;
|
|
28257
|
+
$[13] = t5;
|
|
28258
|
+
$[14] = t6;
|
|
28259
|
+
} else {
|
|
28260
|
+
t6 = $[14];
|
|
28261
|
+
}
|
|
28262
|
+
return t6;
|
|
28263
|
+
}
|
|
28264
|
+
function CollectionPathTitle(t0) {
|
|
28265
|
+
const $ = reactCompilerRuntime.c(9);
|
|
28266
|
+
const {
|
|
28267
|
+
path,
|
|
28268
|
+
name,
|
|
28269
|
+
count
|
|
28270
|
+
} = t0;
|
|
28271
|
+
const navigation = useNavigationController();
|
|
28272
|
+
let t1;
|
|
28273
|
+
let t2;
|
|
28274
|
+
if ($[0] !== navigation.collections) {
|
|
28275
|
+
t2 = navigation.collections ?? [];
|
|
28276
|
+
$[0] = navigation.collections;
|
|
28277
|
+
$[1] = t2;
|
|
28278
|
+
} else {
|
|
28279
|
+
t2 = $[1];
|
|
28280
|
+
}
|
|
28281
|
+
let t3;
|
|
28282
|
+
if ($[2] !== path || $[3] !== t2) {
|
|
28283
|
+
t3 = getNavigationEntriesFromPath({
|
|
28284
|
+
path,
|
|
28285
|
+
collections: t2
|
|
28286
|
+
}).slice(0, -1).map(_temp$h);
|
|
28287
|
+
$[2] = path;
|
|
28288
|
+
$[3] = t2;
|
|
28289
|
+
$[4] = t3;
|
|
28290
|
+
} else {
|
|
28291
|
+
t3 = $[4];
|
|
28292
|
+
}
|
|
28293
|
+
t1 = t3;
|
|
28294
|
+
const parents = t1;
|
|
28295
|
+
let t4;
|
|
28296
|
+
if ($[5] !== count || $[6] !== name || $[7] !== parents) {
|
|
28297
|
+
t4 = /* @__PURE__ */ jsxRuntime.jsx(PathTitle, { parents, name, count, className: "shrink-0 mx-2 max-w-[140px] sm:max-w-[240px] lg:max-w-[320px]" });
|
|
28298
|
+
$[5] = count;
|
|
28299
|
+
$[6] = name;
|
|
28300
|
+
$[7] = parents;
|
|
28301
|
+
$[8] = t4;
|
|
28302
|
+
} else {
|
|
28303
|
+
t4 = $[8];
|
|
28304
|
+
}
|
|
28305
|
+
return t4;
|
|
28306
|
+
}
|
|
28307
|
+
function _temp$h(entry) {
|
|
28308
|
+
return entry.type === "entity" ? entry.entityId : entry.type === "collection" ? entry.collection.name : entry.view.name;
|
|
28309
|
+
}
|
|
28268
28310
|
const DefaultAppBar = function DefaultAppBar2(t0) {
|
|
28269
|
-
const $ = reactCompilerRuntime.c(
|
|
28311
|
+
const $ = reactCompilerRuntime.c(58);
|
|
28270
28312
|
const {
|
|
28271
28313
|
title,
|
|
28272
28314
|
endAdornment,
|
|
@@ -28287,6 +28329,7 @@
|
|
|
28287
28329
|
const logo = logoProp ?? appLogo;
|
|
28288
28330
|
const navigation = useNavigationController();
|
|
28289
28331
|
const breadcrumbs = useBreadcrumbsController();
|
|
28332
|
+
const lastBreadcrumb = breadcrumbs.breadcrumbs?.[breadcrumbs.breadcrumbs.length - 1];
|
|
28290
28333
|
const authController = useAuthController();
|
|
28291
28334
|
const {
|
|
28292
28335
|
mode,
|
|
@@ -28377,30 +28420,39 @@
|
|
|
28377
28420
|
}
|
|
28378
28421
|
let t8;
|
|
28379
28422
|
if ($[21] !== breadcrumbs.breadcrumbs) {
|
|
28380
|
-
t8 = (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 items-center", children: breadcrumbs.breadcrumbs.map(_temp$
|
|
28423
|
+
t8 = (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 items-center", children: breadcrumbs.breadcrumbs.map(_temp$g) }) });
|
|
28381
28424
|
$[21] = breadcrumbs.breadcrumbs;
|
|
28382
28425
|
$[22] = t8;
|
|
28383
28426
|
} else {
|
|
28384
28427
|
t8 = $[22];
|
|
28385
28428
|
}
|
|
28386
28429
|
let t9;
|
|
28387
|
-
if ($[23]
|
|
28388
|
-
t9 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
28389
|
-
$[23] =
|
|
28430
|
+
if ($[23] !== breadcrumbs.breadcrumbs || $[24] !== lastBreadcrumb) {
|
|
28431
|
+
t9 = lastBreadcrumb && /* @__PURE__ */ jsxRuntime.jsx(PathTitle, { className: "lg:hidden min-w-0 mr-2", parents: breadcrumbs.breadcrumbs.slice(0, -1).map(_temp2$6), name: lastBreadcrumb.title, count: lastBreadcrumb.count });
|
|
28432
|
+
$[23] = breadcrumbs.breadcrumbs;
|
|
28433
|
+
$[24] = lastBreadcrumb;
|
|
28434
|
+
$[25] = t9;
|
|
28390
28435
|
} else {
|
|
28391
|
-
t9 = $[
|
|
28436
|
+
t9 = $[25];
|
|
28392
28437
|
}
|
|
28393
28438
|
let t10;
|
|
28394
|
-
if ($[
|
|
28395
|
-
t10 =
|
|
28396
|
-
$[
|
|
28397
|
-
$[25] = t10;
|
|
28439
|
+
if ($[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
28440
|
+
t10 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow" });
|
|
28441
|
+
$[26] = t10;
|
|
28398
28442
|
} else {
|
|
28399
|
-
t10 = $[
|
|
28443
|
+
t10 = $[26];
|
|
28400
28444
|
}
|
|
28401
28445
|
let t11;
|
|
28402
|
-
if ($[
|
|
28403
|
-
t11 =
|
|
28446
|
+
if ($[27] !== endAdornment) {
|
|
28447
|
+
t11 = endAdornment && /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { children: endAdornment });
|
|
28448
|
+
$[27] = endAdornment;
|
|
28449
|
+
$[28] = t11;
|
|
28450
|
+
} else {
|
|
28451
|
+
t11 = $[28];
|
|
28452
|
+
}
|
|
28453
|
+
let t12;
|
|
28454
|
+
if ($[29] !== includeModeToggle || $[30] !== mode || $[31] !== setMode || $[32] !== t) {
|
|
28455
|
+
t12 = includeModeToggle && /* @__PURE__ */ jsxRuntime.jsxs(ui.Menu, { trigger: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { color: "inherit", "aria-label": "Open drawer", children: mode === "dark" ? /* @__PURE__ */ jsxRuntime.jsx(ui.DarkModeIcon, { size: "small" }) : /* @__PURE__ */ jsxRuntime.jsx(ui.LightModeIcon, { size: "small" }) }), children: [
|
|
28404
28456
|
/* @__PURE__ */ jsxRuntime.jsxs(ui.MenuItem, { onClick: () => setMode("dark"), children: [
|
|
28405
28457
|
/* @__PURE__ */ jsxRuntime.jsx(ui.DarkModeIcon, { size: "smallest" }),
|
|
28406
28458
|
" ",
|
|
@@ -28417,101 +28469,106 @@
|
|
|
28417
28469
|
t("system_mode")
|
|
28418
28470
|
] })
|
|
28419
28471
|
] });
|
|
28420
|
-
$[
|
|
28421
|
-
$[
|
|
28422
|
-
$[
|
|
28423
|
-
$[
|
|
28424
|
-
$[
|
|
28472
|
+
$[29] = includeModeToggle;
|
|
28473
|
+
$[30] = mode;
|
|
28474
|
+
$[31] = setMode;
|
|
28475
|
+
$[32] = t;
|
|
28476
|
+
$[33] = t12;
|
|
28425
28477
|
} else {
|
|
28426
|
-
|
|
28478
|
+
t12 = $[33];
|
|
28427
28479
|
}
|
|
28428
|
-
let
|
|
28429
|
-
if ($[
|
|
28430
|
-
|
|
28431
|
-
$[
|
|
28480
|
+
let t13;
|
|
28481
|
+
if ($[34] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
28482
|
+
t13 = /* @__PURE__ */ jsxRuntime.jsx(LanguageToggle, {});
|
|
28483
|
+
$[34] = t13;
|
|
28432
28484
|
} else {
|
|
28433
|
-
|
|
28485
|
+
t13 = $[34];
|
|
28434
28486
|
}
|
|
28435
|
-
let
|
|
28436
|
-
if ($[
|
|
28437
|
-
|
|
28487
|
+
let t14;
|
|
28488
|
+
if ($[35] !== user) {
|
|
28489
|
+
t14 = user && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 py-2 mb-2", children: [
|
|
28438
28490
|
user.displayName && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body1", color: "secondary", children: user.displayName }),
|
|
28439
28491
|
user.email && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", color: "secondary", children: user.email })
|
|
28440
28492
|
] });
|
|
28441
|
-
$[
|
|
28442
|
-
$[
|
|
28493
|
+
$[35] = user;
|
|
28494
|
+
$[36] = t14;
|
|
28443
28495
|
} else {
|
|
28444
|
-
|
|
28496
|
+
t14 = $[36];
|
|
28445
28497
|
}
|
|
28446
|
-
let
|
|
28447
|
-
if ($[
|
|
28448
|
-
|
|
28498
|
+
let t15;
|
|
28499
|
+
if ($[37] !== authController || $[38] !== dropDownActions || $[39] !== navigate || $[40] !== t) {
|
|
28500
|
+
t15 = !dropDownActions && /* @__PURE__ */ jsxRuntime.jsxs(ui.MenuItem, { onClick: async () => {
|
|
28449
28501
|
await authController.signOut();
|
|
28450
28502
|
navigate("/");
|
|
28451
28503
|
}, children: [
|
|
28452
28504
|
/* @__PURE__ */ jsxRuntime.jsx(ui.LogoutIcon, {}),
|
|
28453
28505
|
t("log_out")
|
|
28454
28506
|
] });
|
|
28455
|
-
$[
|
|
28456
|
-
$[
|
|
28457
|
-
$[
|
|
28458
|
-
$[
|
|
28459
|
-
$[
|
|
28507
|
+
$[37] = authController;
|
|
28508
|
+
$[38] = dropDownActions;
|
|
28509
|
+
$[39] = navigate;
|
|
28510
|
+
$[40] = t;
|
|
28511
|
+
$[41] = t15;
|
|
28460
28512
|
} else {
|
|
28461
|
-
|
|
28513
|
+
t15 = $[41];
|
|
28462
28514
|
}
|
|
28463
|
-
let
|
|
28464
|
-
if ($[
|
|
28465
|
-
|
|
28466
|
-
|
|
28515
|
+
let t16;
|
|
28516
|
+
if ($[42] !== avatarComponent || $[43] !== dropDownActions || $[44] !== t14 || $[45] !== t15) {
|
|
28517
|
+
t16 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Menu, { trigger: avatarComponent, children: [
|
|
28518
|
+
t14,
|
|
28467
28519
|
dropDownActions,
|
|
28468
|
-
|
|
28520
|
+
t15
|
|
28469
28521
|
] });
|
|
28470
|
-
$[
|
|
28471
|
-
$[
|
|
28472
|
-
$[
|
|
28473
|
-
$[
|
|
28474
|
-
$[
|
|
28522
|
+
$[42] = avatarComponent;
|
|
28523
|
+
$[43] = dropDownActions;
|
|
28524
|
+
$[44] = t14;
|
|
28525
|
+
$[45] = t15;
|
|
28526
|
+
$[46] = t16;
|
|
28475
28527
|
} else {
|
|
28476
|
-
|
|
28528
|
+
t16 = $[46];
|
|
28477
28529
|
}
|
|
28478
|
-
let
|
|
28479
|
-
if ($[
|
|
28480
|
-
|
|
28530
|
+
let t17;
|
|
28531
|
+
if ($[47] !== startAdornment || $[48] !== style || $[49] !== t11 || $[50] !== t12 || $[51] !== t16 || $[52] !== t5 || $[53] !== t6 || $[54] !== t7 || $[55] !== t8 || $[56] !== t9) {
|
|
28532
|
+
t17 = /* @__PURE__ */ jsxRuntime.jsxs("div", { style, className: t5, children: [
|
|
28481
28533
|
t6,
|
|
28482
28534
|
t7,
|
|
28483
28535
|
t8,
|
|
28484
|
-
startAdornment,
|
|
28485
28536
|
t9,
|
|
28537
|
+
startAdornment,
|
|
28486
28538
|
t10,
|
|
28487
28539
|
t11,
|
|
28488
28540
|
t12,
|
|
28489
|
-
|
|
28541
|
+
t13,
|
|
28542
|
+
t16
|
|
28490
28543
|
] });
|
|
28491
|
-
$[
|
|
28492
|
-
$[
|
|
28493
|
-
$[
|
|
28494
|
-
$[
|
|
28495
|
-
$[
|
|
28496
|
-
$[
|
|
28497
|
-
$[
|
|
28498
|
-
$[
|
|
28499
|
-
$[
|
|
28500
|
-
$[
|
|
28544
|
+
$[47] = startAdornment;
|
|
28545
|
+
$[48] = style;
|
|
28546
|
+
$[49] = t11;
|
|
28547
|
+
$[50] = t12;
|
|
28548
|
+
$[51] = t16;
|
|
28549
|
+
$[52] = t5;
|
|
28550
|
+
$[53] = t6;
|
|
28551
|
+
$[54] = t7;
|
|
28552
|
+
$[55] = t8;
|
|
28553
|
+
$[56] = t9;
|
|
28554
|
+
$[57] = t17;
|
|
28501
28555
|
} else {
|
|
28502
|
-
|
|
28556
|
+
t17 = $[57];
|
|
28503
28557
|
}
|
|
28504
|
-
return
|
|
28558
|
+
return t17;
|
|
28505
28559
|
};
|
|
28506
|
-
function _temp$
|
|
28560
|
+
function _temp$g(breadcrumb, index) {
|
|
28507
28561
|
return /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
|
|
28508
28562
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", children: "/" }),
|
|
28509
28563
|
/* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Link, { className: "visited:text-inherit visited:dark:text-inherit block", to: breadcrumb.url, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center gap-2 whitespace-nowrap", children: [
|
|
28510
28564
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", children: breadcrumb.title }),
|
|
28511
|
-
|
|
28565
|
+
/* @__PURE__ */ jsxRuntime.jsx(CollectionCountBadge, { count: breadcrumb.count })
|
|
28512
28566
|
] }) }, index)
|
|
28513
28567
|
] }, breadcrumb.url + "_" + index);
|
|
28514
28568
|
}
|
|
28569
|
+
function _temp2$6(breadcrumb_0) {
|
|
28570
|
+
return breadcrumb_0.title;
|
|
28571
|
+
}
|
|
28515
28572
|
const buildIdsMap = (value) => value && Array.isArray(value) && value.length > 0 ? value.map((v, index) => {
|
|
28516
28573
|
if (!v) return {};
|
|
28517
28574
|
return {
|
|
@@ -28948,7 +29005,7 @@
|
|
|
28948
29005
|
} else {
|
|
28949
29006
|
const searchResult = iconsSearch.search(value);
|
|
28950
29007
|
const limited = searchResult.slice(0, 50);
|
|
28951
|
-
setKeys(limited.map(_temp$
|
|
29008
|
+
setKeys(limited.map(_temp$f));
|
|
28952
29009
|
}
|
|
28953
29010
|
}, UPDATE_SEARCH_INDEX_WAIT_MS);
|
|
28954
29011
|
$[0] = t3;
|
|
@@ -29040,7 +29097,7 @@
|
|
|
29040
29097
|
}
|
|
29041
29098
|
return t11;
|
|
29042
29099
|
}
|
|
29043
|
-
function _temp$
|
|
29100
|
+
function _temp$f(e) {
|
|
29044
29101
|
return e.item.key;
|
|
29045
29102
|
}
|
|
29046
29103
|
function FieldCaption(t0) {
|
|
@@ -29499,7 +29556,7 @@
|
|
|
29499
29556
|
i18n
|
|
29500
29557
|
} = useTranslation();
|
|
29501
29558
|
const plugins = React.useContext(CustomizationControllerContext)?.plugins;
|
|
29502
|
-
const runsProPlugin = plugins?.some(_temp$
|
|
29559
|
+
const runsProPlugin = plugins?.some(_temp$e) ?? false;
|
|
29503
29560
|
const [dismissed, setDismissed] = React.useState(_temp2$5);
|
|
29504
29561
|
const [dismissedForGood, setDismissedForGood] = React.useState(_temp3$4);
|
|
29505
29562
|
const content = licenseStatus ? buildBannerContent(licenseStatus, t, i18n?.language, runsProPlugin) : null;
|
|
@@ -29589,7 +29646,7 @@
|
|
|
29589
29646
|
function _temp2$5() {
|
|
29590
29647
|
return readDismissed(sessionDismissals);
|
|
29591
29648
|
}
|
|
29592
|
-
function _temp$
|
|
29649
|
+
function _temp$e(plugin) {
|
|
29593
29650
|
return PRO_PLUGIN_KEYS.includes(plugin.key);
|
|
29594
29651
|
}
|
|
29595
29652
|
function buildBannerContent(status, t, language, runsProPlugin) {
|
|
@@ -29729,64 +29786,32 @@
|
|
|
29729
29786
|
}
|
|
29730
29787
|
}
|
|
29731
29788
|
function useReferenceDialog(referenceDialogProps) {
|
|
29732
|
-
const $ = reactCompilerRuntime.c(9);
|
|
29733
29789
|
const navigation = useNavigationController();
|
|
29734
29790
|
const sideDialogsController = useSideDialogsController();
|
|
29735
|
-
|
|
29736
|
-
|
|
29737
|
-
|
|
29738
|
-
if (referenceDialogProps.path)
|
|
29739
|
-
|
|
29740
|
-
|
|
29741
|
-
|
|
29791
|
+
const open = React.useCallback(() => {
|
|
29792
|
+
if (referenceDialogProps.path) {
|
|
29793
|
+
let usedCollection = referenceDialogProps.collection;
|
|
29794
|
+
if (!usedCollection) usedCollection = navigation.getCollection(referenceDialogProps.path);
|
|
29795
|
+
if (!usedCollection) throw Error("Not able to resolve the collection in useReferenceDialog. Make sure a collection is registered in path " + referenceDialogProps.path);
|
|
29796
|
+
sideDialogsController.open({
|
|
29797
|
+
key: `reference_${referenceDialogProps.path}`,
|
|
29798
|
+
component: /* @__PURE__ */ jsxRuntime.jsx(ReferenceSelectionTable, { collection: usedCollection, ...referenceDialogProps }),
|
|
29799
|
+
width: "90vw",
|
|
29800
|
+
onClose: () => {
|
|
29801
|
+
referenceDialogProps.onClose?.();
|
|
29742
29802
|
}
|
|
29743
|
-
|
|
29744
|
-
|
|
29745
|
-
|
|
29746
|
-
|
|
29747
|
-
|
|
29748
|
-
|
|
29749
|
-
|
|
29750
|
-
|
|
29751
|
-
|
|
29752
|
-
|
|
29753
|
-
|
|
29754
|
-
|
|
29755
|
-
throw Error("useReferenceDialog: You are trying to open a reference dialog, but have not declared the `path`");
|
|
29756
|
-
}
|
|
29757
|
-
};
|
|
29758
|
-
$[0] = navigation;
|
|
29759
|
-
$[1] = referenceDialogProps;
|
|
29760
|
-
$[2] = sideDialogsController;
|
|
29761
|
-
$[3] = t0;
|
|
29762
|
-
} else {
|
|
29763
|
-
t0 = $[3];
|
|
29764
|
-
}
|
|
29765
|
-
const open = t0;
|
|
29766
|
-
let t1;
|
|
29767
|
-
if ($[4] !== sideDialogsController) {
|
|
29768
|
-
t1 = () => {
|
|
29769
|
-
sideDialogsController.close();
|
|
29770
|
-
};
|
|
29771
|
-
$[4] = sideDialogsController;
|
|
29772
|
-
$[5] = t1;
|
|
29773
|
-
} else {
|
|
29774
|
-
t1 = $[5];
|
|
29775
|
-
}
|
|
29776
|
-
const close = t1;
|
|
29777
|
-
let t2;
|
|
29778
|
-
if ($[6] !== close || $[7] !== open) {
|
|
29779
|
-
t2 = {
|
|
29780
|
-
open,
|
|
29781
|
-
close
|
|
29782
|
-
};
|
|
29783
|
-
$[6] = close;
|
|
29784
|
-
$[7] = open;
|
|
29785
|
-
$[8] = t2;
|
|
29786
|
-
} else {
|
|
29787
|
-
t2 = $[8];
|
|
29788
|
-
}
|
|
29789
|
-
return t2;
|
|
29803
|
+
});
|
|
29804
|
+
} else {
|
|
29805
|
+
throw Error("useReferenceDialog: You are trying to open a reference dialog, but have not declared the `path`");
|
|
29806
|
+
}
|
|
29807
|
+
}, [navigation, referenceDialogProps, sideDialogsController]);
|
|
29808
|
+
const close = React.useCallback(() => {
|
|
29809
|
+
sideDialogsController.close(`reference_${referenceDialogProps.path}`);
|
|
29810
|
+
}, [sideDialogsController, referenceDialogProps.path]);
|
|
29811
|
+
return {
|
|
29812
|
+
open,
|
|
29813
|
+
close
|
|
29814
|
+
};
|
|
29790
29815
|
}
|
|
29791
29816
|
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=";
|
|
29792
29817
|
function useBrowserTitleAndIcon(name, logo) {
|
|
@@ -30445,7 +30470,7 @@
|
|
|
30445
30470
|
t0 = $[0];
|
|
30446
30471
|
}
|
|
30447
30472
|
const configCache = React.useRef(t0);
|
|
30448
|
-
const getCollectionFromStorage = _temp$
|
|
30473
|
+
const getCollectionFromStorage = _temp$d;
|
|
30449
30474
|
let t1;
|
|
30450
30475
|
if ($[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
30451
30476
|
t1 = (path) => {
|
|
@@ -30568,7 +30593,7 @@
|
|
|
30568
30593
|
}
|
|
30569
30594
|
return t11;
|
|
30570
30595
|
}
|
|
30571
|
-
function _temp$
|
|
30596
|
+
function _temp$d(storageKey) {
|
|
30572
30597
|
return getLocalStorageJSON(storageKey, {});
|
|
30573
30598
|
}
|
|
30574
30599
|
function useBuildModeController() {
|
|
@@ -30731,78 +30756,32 @@
|
|
|
30731
30756
|
}
|
|
30732
30757
|
return t7;
|
|
30733
30758
|
}
|
|
30734
|
-
function
|
|
30735
|
-
const
|
|
30736
|
-
|
|
30737
|
-
|
|
30738
|
-
|
|
30739
|
-
|
|
30740
|
-
|
|
30741
|
-
|
|
30742
|
-
setIsDialogOpen(false);
|
|
30743
|
-
if (pendingNavigation) {
|
|
30744
|
-
onSuccess();
|
|
30745
|
-
if (pendingNavigation.type === "popstate") {
|
|
30746
|
-
window.history.go(pendingNavigation.delta);
|
|
30747
|
-
} else if (pendingNavigation.type === "link") {
|
|
30748
|
-
window.location.href = pendingNavigation.href;
|
|
30749
|
-
}
|
|
30750
|
-
setPendingNavigation(null);
|
|
30751
|
-
}
|
|
30752
|
-
}, [onSuccess, pendingNavigation]);
|
|
30753
|
-
const handleBeforeUnload = React.useCallback((e) => {
|
|
30754
|
-
if (when) {
|
|
30755
|
-
e.preventDefault();
|
|
30756
|
-
e.returnValue = "";
|
|
30757
|
-
}
|
|
30758
|
-
}, [when]);
|
|
30759
|
-
const handlePopState = React.useCallback((e_0) => {
|
|
30760
|
-
if (when) {
|
|
30761
|
-
e_0.preventDefault();
|
|
30762
|
-
setPendingNavigation({
|
|
30763
|
-
type: "popstate",
|
|
30764
|
-
delta: -1
|
|
30765
|
-
});
|
|
30766
|
-
setIsDialogOpen(true);
|
|
30767
|
-
}
|
|
30768
|
-
}, [when]);
|
|
30769
|
-
const handleLinkClick = React.useCallback((e_1) => {
|
|
30770
|
-
if (!when) return;
|
|
30771
|
-
const target = e_1.target;
|
|
30772
|
-
const anchor = target.closest("a[href]");
|
|
30773
|
-
if (anchor && anchor.host === window.location.host) {
|
|
30774
|
-
e_1.preventDefault();
|
|
30775
|
-
const href = anchor.getAttribute("href");
|
|
30776
|
-
if (href) {
|
|
30777
|
-
setPendingNavigation({
|
|
30778
|
-
type: "link",
|
|
30779
|
-
href
|
|
30780
|
-
});
|
|
30781
|
-
setIsDialogOpen(true);
|
|
30759
|
+
function useLeavePageConfirmation(when) {
|
|
30760
|
+
const $ = reactCompilerRuntime.c(3);
|
|
30761
|
+
let t0;
|
|
30762
|
+
let t1;
|
|
30763
|
+
if ($[0] !== when) {
|
|
30764
|
+
t0 = () => {
|
|
30765
|
+
if (!when) {
|
|
30766
|
+
return;
|
|
30782
30767
|
}
|
|
30783
|
-
|
|
30784
|
-
}, [when]);
|
|
30785
|
-
React.useEffect(() => {
|
|
30786
|
-
if (when) {
|
|
30768
|
+
const handleBeforeUnload = _temp$c;
|
|
30787
30769
|
window.addEventListener("beforeunload", handleBeforeUnload);
|
|
30788
|
-
window.
|
|
30789
|
-
document.addEventListener("click", handleLinkClick);
|
|
30790
|
-
} else {
|
|
30791
|
-
window.removeEventListener("beforeunload", handleBeforeUnload);
|
|
30792
|
-
window.removeEventListener("popstate", handlePopState);
|
|
30793
|
-
document.removeEventListener("click", handleLinkClick);
|
|
30794
|
-
}
|
|
30795
|
-
return () => {
|
|
30796
|
-
window.removeEventListener("beforeunload", handleBeforeUnload);
|
|
30797
|
-
window.removeEventListener("popstate", handlePopState);
|
|
30798
|
-
document.removeEventListener("click", handleLinkClick);
|
|
30770
|
+
return () => window.removeEventListener("beforeunload", handleBeforeUnload);
|
|
30799
30771
|
};
|
|
30800
|
-
|
|
30801
|
-
|
|
30802
|
-
|
|
30803
|
-
|
|
30804
|
-
|
|
30805
|
-
|
|
30772
|
+
t1 = [when];
|
|
30773
|
+
$[0] = when;
|
|
30774
|
+
$[1] = t0;
|
|
30775
|
+
$[2] = t1;
|
|
30776
|
+
} else {
|
|
30777
|
+
t0 = $[1];
|
|
30778
|
+
t1 = $[2];
|
|
30779
|
+
}
|
|
30780
|
+
React.useEffect(t0, t1);
|
|
30781
|
+
}
|
|
30782
|
+
function _temp$c(e) {
|
|
30783
|
+
e.preventDefault();
|
|
30784
|
+
e.returnValue = "";
|
|
30806
30785
|
}
|
|
30807
30786
|
function UnsavedChangesDialog(t0) {
|
|
30808
30787
|
const $ = reactCompilerRuntime.c(30);
|
|
@@ -31122,17 +31101,14 @@
|
|
|
31122
31101
|
const widthRef = React.useRef(panel?.width);
|
|
31123
31102
|
const width = widthRef.current;
|
|
31124
31103
|
const sideDialogsController = useSideDialogsController();
|
|
31125
|
-
|
|
31126
|
-
handleOk: handleNavigationOk,
|
|
31127
|
-
handleCancel: handleNavigationCancel
|
|
31128
|
-
} = useNavigationUnsavedChangesDialog(blocked && !drawerCloseRequested, () => setBlocked(false));
|
|
31104
|
+
useLeavePageConfirmation(blocked && !drawerCloseRequested);
|
|
31129
31105
|
React.useEffect(() => {
|
|
31130
31106
|
if (panel) widthRef.current = panel.width;
|
|
31131
31107
|
}, [panel]);
|
|
31132
31108
|
const handleDrawerCloseOk = () => {
|
|
31133
31109
|
setBlocked(false);
|
|
31134
31110
|
setDrawerCloseRequested(false);
|
|
31135
|
-
sideDialogsController.close();
|
|
31111
|
+
sideDialogsController.close(panel?.key);
|
|
31136
31112
|
panel?.onClose?.();
|
|
31137
31113
|
};
|
|
31138
31114
|
const handleDrawerCloseCancel = () => {
|
|
@@ -31142,7 +31118,7 @@
|
|
|
31142
31118
|
if (blocked && !force) {
|
|
31143
31119
|
setDrawerCloseRequested(true);
|
|
31144
31120
|
} else {
|
|
31145
|
-
sideDialogsController.close();
|
|
31121
|
+
sideDialogsController.close(panel?.key);
|
|
31146
31122
|
panel?.onClose?.();
|
|
31147
31123
|
}
|
|
31148
31124
|
};
|
|
@@ -31175,7 +31151,7 @@
|
|
|
31175
31151
|
width
|
|
31176
31152
|
} })
|
|
31177
31153
|
] }),
|
|
31178
|
-
/* @__PURE__ */ jsxRuntime.jsx(UnsavedChangesDialog, { open: drawerCloseRequested, handleOk:
|
|
31154
|
+
/* @__PURE__ */ jsxRuntime.jsx(UnsavedChangesDialog, { open: drawerCloseRequested, handleOk: handleDrawerCloseOk, handleCancel: handleDrawerCloseCancel, body: blockedNavigationMessage })
|
|
31179
31155
|
] });
|
|
31180
31156
|
}
|
|
31181
31157
|
function EntityEditViewFormActions({
|
|
@@ -31641,6 +31617,9 @@
|
|
|
31641
31617
|
}, [selectedTabProp]);
|
|
31642
31618
|
const subcollections = (collection.subcollections ?? []).filter((c) => !c.hideFromNavigation);
|
|
31643
31619
|
const subcollectionsCount = subcollections?.length ?? 0;
|
|
31620
|
+
const [subcollectionCounts, setSubcollectionCounts] = React.useState({});
|
|
31621
|
+
const selectedSubcollection = subcollections.find((subcollection) => (subcollection.id ?? subcollection.path) === selectedTab);
|
|
31622
|
+
const selectedSubcollectionDataSource = useDataSource();
|
|
31644
31623
|
const customViews = collection.entityViews ?? [];
|
|
31645
31624
|
const customViewsCount = customViews?.length ?? 0;
|
|
31646
31625
|
const includeJsonView = collection.includeJsonView === void 0 ? true : collection.includeJsonView;
|
|
@@ -31714,15 +31693,18 @@
|
|
|
31714
31693
|
const jsonView = selectedTab === JSON_TAB_VALUE || mountedTabsRef.current.has(JSON_TAB_VALUE) ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cls("relative flex-1 h-full overflow-auto w-full", {
|
|
31715
31694
|
"hidden": selectedTab !== JSON_TAB_VALUE
|
|
31716
31695
|
}), role: "tabpanel", children: /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(EntityJsonPreview, { values: formContext?.values ?? entity?.values ?? {} }) }) }, "json_view") : null;
|
|
31717
|
-
const subCollectionsViews = subcollections && subcollections.map((
|
|
31718
|
-
const subcollectionId =
|
|
31719
|
-
const newFullPath = usedEntity ? `${path}/${usedEntity?.id}/${removeInitialAndTrailingSlashes(
|
|
31696
|
+
const subCollectionsViews = subcollections && subcollections.map((subcollection_0) => {
|
|
31697
|
+
const subcollectionId = subcollection_0.id ?? subcollection_0.path;
|
|
31698
|
+
const newFullPath = usedEntity ? `${path}/${usedEntity?.id}/${removeInitialAndTrailingSlashes(subcollection_0.path)}` : void 0;
|
|
31720
31699
|
const newFullIdPath = fullIdPath && usedEntity ? `${fullIdPath}/${encodeEntityId(usedEntity.id)}/${removeInitialAndTrailingSlashes(subcollectionId)}` : void 0;
|
|
31721
|
-
const newPathSegments = buildSubcollectionPathSegments(pathSegments, usedEntity?.id,
|
|
31700
|
+
const newPathSegments = buildSubcollectionPathSegments(pathSegments, usedEntity?.id, subcollection_0.path);
|
|
31722
31701
|
if (selectedTab !== subcollectionId) return null;
|
|
31723
31702
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1 h-full overflow-auto w-full", role: "tabpanel", children: [
|
|
31724
31703
|
globalLoading && /* @__PURE__ */ jsxRuntime.jsx(CircularProgressCenter, {}),
|
|
31725
|
-
!globalLoading && (usedEntity && newFullPath ? /* @__PURE__ */ jsxRuntime.jsx(EntityCollectionView$1, { fullPath: newFullPath, pathSegments: newPathSegments, fullIdPath: newFullIdPath, parentCollectionIds: [...parentCollectionIds, collection.id], isSubCollection: true, updateUrl: false, ...
|
|
31704
|
+
!globalLoading && (usedEntity && newFullPath ? /* @__PURE__ */ jsxRuntime.jsx(EntityCollectionView$1, { fullPath: newFullPath, pathSegments: newPathSegments, fullIdPath: newFullIdPath, parentCollectionIds: [...parentCollectionIds, collection.id], isSubCollection: true, updateUrl: false, ...subcollection_0, openEntityMode: layout, onCountChange: (count) => setSubcollectionCounts((counts) => counts[subcollectionId] === count ? counts : {
|
|
31705
|
+
...counts,
|
|
31706
|
+
[subcollectionId]: count
|
|
31707
|
+
}) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center w-full h-full p-3", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "label", children: t("youd_need_to_save_before_additional_collections") }) }))
|
|
31726
31708
|
] }, `subcol_${subcollectionId}`);
|
|
31727
31709
|
}).filter(Boolean);
|
|
31728
31710
|
const onSideTabClick = (value_0) => {
|
|
@@ -31758,7 +31740,7 @@
|
|
|
31758
31740
|
onSaved?.(res);
|
|
31759
31741
|
formProps?.onSaved?.(res);
|
|
31760
31742
|
}, Builder: selectedSecondaryForm?.Builder });
|
|
31761
|
-
const subcollectionTabs = subcollections && subcollections.filter((sub) => !groupedViews.includes(sub.id ?? sub.path)).map((
|
|
31743
|
+
const subcollectionTabs = subcollections && subcollections.filter((sub) => !groupedViews.includes(sub.id ?? sub.path)).map((subcollection_1) => /* @__PURE__ */ jsxRuntime.jsx(ui.Tab, { className: "text-sm min-w-[120px]", value: subcollection_1.id ?? subcollection_1.path, children: subcollection_1.name }, `entity_detail_collection_tab_${subcollection_1.name}`));
|
|
31762
31744
|
const customViewTabsStart = resolvedEntityViews.filter((view) => view.position === "start" && !groupedViews.includes(view.key)).map((view_0) => /* @__PURE__ */ jsxRuntime.jsx(ui.Tab, { className: !view_0.tabComponent ? "text-sm min-w-[120px]" : void 0, value: view_0.key, children: view_0.tabComponent ?? view_0.name }, `entity_detail_collection_tab_${view_0.name}`));
|
|
31763
31745
|
const customViewTabsEnd = resolvedEntityViews.filter((view_1) => (!view_1.position || view_1.position === "end") && !groupedViews.includes(view_1.key)).map((view_2) => /* @__PURE__ */ jsxRuntime.jsx(ui.Tab, { className: !view_2.tabComponent ? "text-sm min-w-[120px]" : void 0, value: view_2.key, children: view_2.tabComponent ?? view_2.name }, `entity_detail_collection_tab_${view_2.name}`));
|
|
31764
31746
|
const viewGroupMenus = collection.viewGroups?.map((group) => {
|
|
@@ -31767,13 +31749,17 @@
|
|
|
31767
31749
|
group.name,
|
|
31768
31750
|
/* @__PURE__ */ jsxRuntime.jsx(ui.ExpandMoreIcon, { className: "ml-1 -mr-1", size: "small" })
|
|
31769
31751
|
] }), children: group.views.map((viewId) => {
|
|
31770
|
-
const
|
|
31752
|
+
const subcollection_2 = subcollections.find((s) => (s.id ?? s.path) === viewId);
|
|
31771
31753
|
const customView_0 = resolvedEntityViews.find((v) => v.key === viewId);
|
|
31772
|
-
const name =
|
|
31754
|
+
const name = subcollection_2?.name ?? customView_0?.name ?? viewId;
|
|
31773
31755
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, { onClick: () => onSideTabClick(viewId), className: selectedTab === viewId ? "bg-surface-accent-100 dark:bg-surface-accent-900" : "", children: name }, `view_group_${group.name}_${viewId}`);
|
|
31774
31756
|
}) }, `view_group_${group.name}`);
|
|
31775
31757
|
});
|
|
31776
31758
|
const shouldShowTopBar = Boolean(barActions) || hasAdditionalViews;
|
|
31759
|
+
const subcollectionTitle = layout === "side_panel" && selectedSubcollection && usedEntity ? (() => {
|
|
31760
|
+
const subcollectionId_0 = selectedSubcollection.id ?? selectedSubcollection.path;
|
|
31761
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CollectionPathTitle, { path: fullIdPath ? `${fullIdPath}/${encodeEntityId(usedEntity.id)}/${removeInitialAndTrailingSlashes(subcollectionId_0)}` : `${path}/${usedEntity.id}/${removeInitialAndTrailingSlashes(selectedSubcollection.path)}`, name: selectedSubcollection.name, count: subcollectionCounts[subcollectionId_0] ?? (selectedSubcollectionDataSource.countEntities ? null : void 0) });
|
|
31762
|
+
})() : null;
|
|
31777
31763
|
let result = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex flex-col h-full w-full bg-white dark:bg-surface-900", children: [
|
|
31778
31764
|
shouldShowTopBar && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls("h-14 items-center overflow-hidden w-full border-b pl-2 pr-2 flex gap-2 bg-surface-50 dark:bg-surface-900", ui.defaultBorderMixin), children: [
|
|
31779
31765
|
barActions?.({
|
|
@@ -31782,6 +31768,7 @@
|
|
|
31782
31768
|
values: formContext?.values ?? usedEntity?.values ?? {},
|
|
31783
31769
|
status
|
|
31784
31770
|
}),
|
|
31771
|
+
subcollectionTitle,
|
|
31785
31772
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow" }),
|
|
31786
31773
|
pluginActionsTop,
|
|
31787
31774
|
globalLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "self-center", children: /* @__PURE__ */ jsxRuntime.jsx(ui.CircularProgress, { size: "small" }) }),
|
|
@@ -32033,7 +32020,7 @@
|
|
|
32033
32020
|
};
|
|
32034
32021
|
};
|
|
32035
32022
|
function useBuildSideDialogsController() {
|
|
32036
|
-
const $ = reactCompilerRuntime.c(
|
|
32023
|
+
const $ = reactCompilerRuntime.c(23);
|
|
32037
32024
|
const location = reactRouterDom.useLocation();
|
|
32038
32025
|
const navigate = reactRouterDom.useNavigate();
|
|
32039
32026
|
let t0;
|
|
@@ -32056,46 +32043,78 @@
|
|
|
32056
32043
|
const routesCount = React.useRef(0);
|
|
32057
32044
|
let t2;
|
|
32058
32045
|
if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
32059
|
-
t2 =
|
|
32060
|
-
sidePanelsRef.current = newPanels;
|
|
32061
|
-
setSidePanels(newPanels);
|
|
32062
|
-
};
|
|
32046
|
+
t2 = {};
|
|
32063
32047
|
$[2] = t2;
|
|
32064
32048
|
} else {
|
|
32065
32049
|
t2 = $[2];
|
|
32066
32050
|
}
|
|
32067
|
-
const
|
|
32051
|
+
const entryKeysOfPanelsWithoutUrl = React.useRef(t2);
|
|
32068
32052
|
let t3;
|
|
32069
|
-
if ($[3]
|
|
32070
|
-
t3 = () => {
|
|
32053
|
+
if ($[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
32054
|
+
t3 = (newPanels) => {
|
|
32055
|
+
sidePanelsRef.current = newPanels;
|
|
32056
|
+
setSidePanels(newPanels);
|
|
32057
|
+
};
|
|
32058
|
+
$[3] = t3;
|
|
32059
|
+
} else {
|
|
32060
|
+
t3 = $[3];
|
|
32061
|
+
}
|
|
32062
|
+
const updateSidePanels = t3;
|
|
32063
|
+
let t4;
|
|
32064
|
+
if ($[4] !== location.key || $[5] !== location.state) {
|
|
32065
|
+
t4 = () => {
|
|
32071
32066
|
const state = location.state;
|
|
32072
32067
|
const panelKeys = state?.panels ?? [];
|
|
32073
|
-
const
|
|
32068
|
+
const panelsInHistory = panelKeys.map((key) => routesStore.current[key]).filter(_temp$a);
|
|
32069
|
+
const keptPanels = [];
|
|
32070
|
+
let matched = 0;
|
|
32071
|
+
for (const panel of sidePanelsRef.current) {
|
|
32072
|
+
if (panelsInHistory[matched]?.key === panel.key) {
|
|
32073
|
+
keptPanels.push(panel);
|
|
32074
|
+
matched++;
|
|
32075
|
+
} else {
|
|
32076
|
+
if (!panel.urlPath && (keptPanels.length > 0 || entryKeysOfPanelsWithoutUrl.current[panel.key] === location.key)) {
|
|
32077
|
+
keptPanels.push(panel);
|
|
32078
|
+
} else {
|
|
32079
|
+
break;
|
|
32080
|
+
}
|
|
32081
|
+
}
|
|
32082
|
+
}
|
|
32083
|
+
const newPanels_0 = [...keptPanels, ...panelsInHistory.slice(matched)];
|
|
32074
32084
|
if (!equal(sidePanelsRef.current.map(_temp2$4), newPanels_0.map(_temp3$3))) {
|
|
32075
32085
|
updateSidePanels(newPanels_0);
|
|
32076
32086
|
}
|
|
32077
32087
|
};
|
|
32078
|
-
$[
|
|
32079
|
-
$[
|
|
32080
|
-
} else {
|
|
32081
|
-
t3 = $[4];
|
|
32082
|
-
}
|
|
32083
|
-
let t4;
|
|
32084
|
-
if ($[5] !== location) {
|
|
32085
|
-
t4 = [location];
|
|
32086
|
-
$[5] = location;
|
|
32088
|
+
$[4] = location.key;
|
|
32089
|
+
$[5] = location.state;
|
|
32087
32090
|
$[6] = t4;
|
|
32088
32091
|
} else {
|
|
32089
32092
|
t4 = $[6];
|
|
32090
32093
|
}
|
|
32091
|
-
React.useEffect(t3, t4);
|
|
32092
32094
|
let t5;
|
|
32093
|
-
if ($[7] !== location
|
|
32094
|
-
t5 =
|
|
32095
|
+
if ($[7] !== location) {
|
|
32096
|
+
t5 = [location];
|
|
32097
|
+
$[7] = location;
|
|
32098
|
+
$[8] = t5;
|
|
32099
|
+
} else {
|
|
32100
|
+
t5 = $[8];
|
|
32101
|
+
}
|
|
32102
|
+
React.useEffect(t4, t5);
|
|
32103
|
+
let t6;
|
|
32104
|
+
if ($[9] !== location || $[10] !== navigate) {
|
|
32105
|
+
t6 = (key_0) => {
|
|
32095
32106
|
const currentPanels = sidePanelsRef.current;
|
|
32096
32107
|
if (currentPanels.length === 0) {
|
|
32097
32108
|
return;
|
|
32098
32109
|
}
|
|
32110
|
+
const index = key_0 !== void 0 ? currentPanels.findLastIndex((p_2) => p_2.key === key_0) : -1;
|
|
32111
|
+
if (index !== -1 && index < currentPanels.length - 1 && !currentPanels[index].urlPath) {
|
|
32112
|
+
updateSidePanels(currentPanels.filter((_, i) => i !== index));
|
|
32113
|
+
if (routesCount.current > 0) {
|
|
32114
|
+
routesCount.current = routesCount.current - 1;
|
|
32115
|
+
}
|
|
32116
|
+
return;
|
|
32117
|
+
}
|
|
32099
32118
|
const lastSidePanel = currentPanels[currentPanels.length - 1];
|
|
32100
32119
|
const updatedPanels = [...currentPanels.slice(0, -1)];
|
|
32101
32120
|
updateSidePanels(updatedPanels);
|
|
@@ -32117,28 +32136,31 @@
|
|
|
32117
32136
|
}
|
|
32118
32137
|
}
|
|
32119
32138
|
};
|
|
32120
|
-
$[
|
|
32121
|
-
$[
|
|
32122
|
-
$[
|
|
32139
|
+
$[9] = location;
|
|
32140
|
+
$[10] = navigate;
|
|
32141
|
+
$[11] = t6;
|
|
32123
32142
|
} else {
|
|
32124
|
-
|
|
32143
|
+
t6 = $[11];
|
|
32125
32144
|
}
|
|
32126
|
-
const close =
|
|
32127
|
-
let
|
|
32128
|
-
if ($[
|
|
32129
|
-
|
|
32145
|
+
const close = t6;
|
|
32146
|
+
let t7;
|
|
32147
|
+
if ($[12] !== location || $[13] !== navigate) {
|
|
32148
|
+
t7 = (panelProps) => {
|
|
32130
32149
|
const newPanels_1 = Array.isArray(panelProps) ? panelProps : [panelProps];
|
|
32131
|
-
newPanels_1.forEach((
|
|
32132
|
-
routesStore.current[
|
|
32150
|
+
newPanels_1.forEach((panel_0) => {
|
|
32151
|
+
routesStore.current[panel_0.key] = panel_0;
|
|
32152
|
+
if (!panel_0.urlPath) {
|
|
32153
|
+
entryKeysOfPanelsWithoutUrl.current[panel_0.key] = location.key;
|
|
32154
|
+
}
|
|
32133
32155
|
});
|
|
32134
32156
|
routesCount.current = routesCount.current + newPanels_1.length;
|
|
32135
32157
|
const baseLocation_0 = location.state?.base_location ?? location;
|
|
32136
32158
|
const currentPanels_0 = sidePanelsRef.current;
|
|
32137
32159
|
const updatedPanels_0 = [...currentPanels_0, ...newPanels_1];
|
|
32138
32160
|
updateSidePanels(updatedPanels_0);
|
|
32139
|
-
newPanels_1.forEach((
|
|
32140
|
-
if (
|
|
32141
|
-
navigate(
|
|
32161
|
+
newPanels_1.forEach((panel_1) => {
|
|
32162
|
+
if (panel_1.urlPath) {
|
|
32163
|
+
navigate(panel_1.urlPath, {
|
|
32142
32164
|
state: {
|
|
32143
32165
|
base_location: baseLocation_0,
|
|
32144
32166
|
panels: updatedPanels_0.map(_temp5$1)
|
|
@@ -32147,27 +32169,30 @@
|
|
|
32147
32169
|
}
|
|
32148
32170
|
});
|
|
32149
32171
|
};
|
|
32150
|
-
$[
|
|
32151
|
-
$[
|
|
32152
|
-
$[
|
|
32172
|
+
$[12] = location;
|
|
32173
|
+
$[13] = navigate;
|
|
32174
|
+
$[14] = t7;
|
|
32153
32175
|
} else {
|
|
32154
|
-
|
|
32176
|
+
t7 = $[14];
|
|
32155
32177
|
}
|
|
32156
|
-
const open =
|
|
32157
|
-
let
|
|
32158
|
-
if ($[
|
|
32159
|
-
|
|
32178
|
+
const open = t7;
|
|
32179
|
+
let t8;
|
|
32180
|
+
if ($[15] !== location || $[16] !== navigate) {
|
|
32181
|
+
t8 = (panelProps_0) => {
|
|
32160
32182
|
const newPanels_2 = Array.isArray(panelProps_0) ? panelProps_0 : [panelProps_0];
|
|
32161
|
-
newPanels_2.forEach((
|
|
32162
|
-
routesStore.current[
|
|
32183
|
+
newPanels_2.forEach((panel_2) => {
|
|
32184
|
+
routesStore.current[panel_2.key] = panel_2;
|
|
32185
|
+
if (!panel_2.urlPath) {
|
|
32186
|
+
entryKeysOfPanelsWithoutUrl.current[panel_2.key] = location.key;
|
|
32187
|
+
}
|
|
32163
32188
|
});
|
|
32164
32189
|
const baseLocation_1 = location.state?.base_location ?? location;
|
|
32165
32190
|
const currentPanels_1 = sidePanelsRef.current;
|
|
32166
32191
|
const updatedPanels_1 = [...currentPanels_1.slice(0, -newPanels_2.length), ...newPanels_2];
|
|
32167
32192
|
updateSidePanels(updatedPanels_1);
|
|
32168
|
-
newPanels_2.forEach((
|
|
32169
|
-
if (
|
|
32170
|
-
navigate(
|
|
32193
|
+
newPanels_2.forEach((panel_3) => {
|
|
32194
|
+
if (panel_3.urlPath) {
|
|
32195
|
+
navigate(panel_3.urlPath, {
|
|
32171
32196
|
replace: true,
|
|
32172
32197
|
state: {
|
|
32173
32198
|
base_location: baseLocation_1,
|
|
@@ -32177,41 +32202,41 @@
|
|
|
32177
32202
|
}
|
|
32178
32203
|
});
|
|
32179
32204
|
};
|
|
32180
|
-
$[
|
|
32181
|
-
$[
|
|
32182
|
-
$[
|
|
32205
|
+
$[15] = location;
|
|
32206
|
+
$[16] = navigate;
|
|
32207
|
+
$[17] = t8;
|
|
32183
32208
|
} else {
|
|
32184
|
-
|
|
32209
|
+
t8 = $[17];
|
|
32185
32210
|
}
|
|
32186
|
-
const replace =
|
|
32187
|
-
let
|
|
32188
|
-
if ($[
|
|
32189
|
-
|
|
32211
|
+
const replace = t8;
|
|
32212
|
+
let t9;
|
|
32213
|
+
if ($[18] !== close || $[19] !== open || $[20] !== replace || $[21] !== sidePanels) {
|
|
32214
|
+
t9 = {
|
|
32190
32215
|
sidePanels,
|
|
32191
32216
|
setSidePanels: updateSidePanels,
|
|
32192
32217
|
close,
|
|
32193
32218
|
open,
|
|
32194
32219
|
replace
|
|
32195
32220
|
};
|
|
32196
|
-
$[
|
|
32197
|
-
$[
|
|
32198
|
-
$[
|
|
32199
|
-
$[
|
|
32200
|
-
$[
|
|
32221
|
+
$[18] = close;
|
|
32222
|
+
$[19] = open;
|
|
32223
|
+
$[20] = replace;
|
|
32224
|
+
$[21] = sidePanels;
|
|
32225
|
+
$[22] = t9;
|
|
32201
32226
|
} else {
|
|
32202
|
-
|
|
32227
|
+
t9 = $[22];
|
|
32203
32228
|
}
|
|
32204
|
-
return
|
|
32229
|
+
return t9;
|
|
32230
|
+
}
|
|
32231
|
+
function _temp6$1(p_5) {
|
|
32232
|
+
return p_5.key;
|
|
32205
32233
|
}
|
|
32206
|
-
function
|
|
32234
|
+
function _temp5$1(p_4) {
|
|
32207
32235
|
return p_4.key;
|
|
32208
32236
|
}
|
|
32209
|
-
function
|
|
32237
|
+
function _temp4$2(p_3) {
|
|
32210
32238
|
return p_3.key;
|
|
32211
32239
|
}
|
|
32212
|
-
function _temp4$2(p_2) {
|
|
32213
|
-
return p_2.key;
|
|
32214
|
-
}
|
|
32215
32240
|
function _temp3$3(p_1) {
|
|
32216
32241
|
return p_1.key;
|
|
32217
32242
|
}
|