@firecms/core 3.5.2-canary.16bf7bb → 3.5.2-canary.a0001bd
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/{de-CUF9f7S-.js → de-CNfJQcnh.js} +1 -1
- package/dist/{de-CUF9f7S-.js.map → de-CNfJQcnh.js.map} +1 -1
- package/dist/{editor-WZytSO_1.js → editor-D0A5yaaJ.js} +1 -1
- package/dist/{editor-WZytSO_1.js.map → editor-D0A5yaaJ.js.map} +1 -1
- package/dist/{fr-DmkMX6hp.js → fr-CBtSvDVp.js} +1 -1
- package/dist/{fr-DmkMX6hp.js.map → fr-CBtSvDVp.js.map} +1 -1
- package/dist/{hi-BKuaMr7w.js → hi-Delc4l61.js} +1 -1
- package/dist/{hi-BKuaMr7w.js.map → hi-Delc4l61.js.map} +1 -1
- package/dist/index.es.js +624 -579
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +616 -571
- package/dist/index.umd.js.map +1 -1
- package/dist/internal/useLeavePageConfirmation.d.ts +11 -0
- package/dist/{it-BwQflFGz.js → it-CdsoaRVO.js} +1 -1
- package/dist/{it-BwQflFGz.js.map → it-CdsoaRVO.js.map} +1 -1
- package/dist/{pl-BPsAvZvc.js → pl-DoTvWcwp.js} +1 -1
- package/dist/{pl-BPsAvZvc.js.map → pl-DoTvWcwp.js.map} +1 -1
- package/dist/preview/components/__tests__/DatePreview.test.d.ts +1 -0
- package/dist/{pt-D5q7OQp1.js → pt-DCfk8Nkq.js} +1 -1
- package/dist/{pt-D5q7OQp1.js.map → pt-DCfk8Nkq.js.map} +1 -1
- package/dist/types/locales.d.ts +1 -1
- package/dist/types/side_dialogs_controller.d.ts +4 -2
- package/dist/util/__tests__/locales.test.d.ts +1 -0
- package/dist/util/date_fns_locales.d.ts +13 -0
- 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/form/field_bindings/BlockFieldBinding.tsx +2 -1
- package/src/hooks/useReferenceDialog.tsx +2 -2
- package/src/internal/useBuildSideDialogsController.tsx +44 -2
- package/src/internal/useLeavePageConfirmation.ts +25 -0
- package/src/preview/components/DatePreview.tsx +14 -2
- package/src/preview/components/__tests__/DatePreview.test.tsx +39 -0
- package/src/types/locales.ts +2 -0
- package/src/types/side_dialogs_controller.tsx +4 -2
- package/src/util/__tests__/locales.test.ts +46 -0
- package/src/util/date_fns_locales.ts +28 -0
- 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,9 +4845,19 @@
|
|
|
4845
4845
|
}
|
|
4846
4846
|
return t2;
|
|
4847
4847
|
}
|
|
4848
|
-
function _temp$
|
|
4848
|
+
function _temp$I(count) {
|
|
4849
4849
|
return count + 1;
|
|
4850
4850
|
}
|
|
4851
|
+
const supportedLocales = new Map([...Object.keys(loaders), "en", "fil"].map((locale) => [locale.toLowerCase(), locale]));
|
|
4852
|
+
function resolveLocale(value) {
|
|
4853
|
+
if (typeof value !== "string") return void 0;
|
|
4854
|
+
const parts = value.trim().split(/[-_\s]+/).filter(Boolean);
|
|
4855
|
+
if (parts.length === 0) return void 0;
|
|
4856
|
+
return supportedLocales.get(parts.join("").toLowerCase()) ?? supportedLocales.get(parts[0].toLowerCase());
|
|
4857
|
+
}
|
|
4858
|
+
function localeToLanguageTag(locale) {
|
|
4859
|
+
return locale.replace(/^([a-z]{2,3})([A-Z][A-Za-z]+)$/, "$1-$2");
|
|
4860
|
+
}
|
|
4851
4861
|
const CONTAINER_FULL_WIDTH = "100vw";
|
|
4852
4862
|
const ADDITIONAL_TAB_WIDTH = "55vw";
|
|
4853
4863
|
const FORM_CONTAINER_WIDTH = "768px";
|
|
@@ -5062,7 +5072,7 @@
|
|
|
5062
5072
|
}
|
|
5063
5073
|
setDataLoading(false);
|
|
5064
5074
|
setDataLoadingError(void 0);
|
|
5065
|
-
setData(entities.map(_temp$
|
|
5075
|
+
setData(entities.map(_temp$H));
|
|
5066
5076
|
setNoMoreToLoad(!itemCount || entities.length < itemCount);
|
|
5067
5077
|
};
|
|
5068
5078
|
const onError = (error) => {
|
|
@@ -5097,7 +5107,7 @@
|
|
|
5097
5107
|
orderBy: sortByProperty,
|
|
5098
5108
|
order: currentSort
|
|
5099
5109
|
}).then(onEntitiesUpdate).catch(onError);
|
|
5100
|
-
return _temp2$
|
|
5110
|
+
return _temp2$i;
|
|
5101
5111
|
}
|
|
5102
5112
|
};
|
|
5103
5113
|
$[8] = collection;
|
|
@@ -5146,9 +5156,9 @@
|
|
|
5146
5156
|
}
|
|
5147
5157
|
return t6;
|
|
5148
5158
|
}
|
|
5149
|
-
function _temp2$
|
|
5159
|
+
function _temp2$i() {
|
|
5150
5160
|
}
|
|
5151
|
-
function _temp$
|
|
5161
|
+
function _temp$H(e_1) {
|
|
5152
5162
|
return {
|
|
5153
5163
|
...e_1
|
|
5154
5164
|
};
|
|
@@ -5361,7 +5371,7 @@
|
|
|
5361
5371
|
setEntity(CACHE[entityCacheKey(path, entityId)]);
|
|
5362
5372
|
setDataLoading(false);
|
|
5363
5373
|
setDataLoadingError(void 0);
|
|
5364
|
-
return _temp$
|
|
5374
|
+
return _temp$G;
|
|
5365
5375
|
} else {
|
|
5366
5376
|
if (entityId && path && collection) {
|
|
5367
5377
|
if (dataSource.listenEntity) {
|
|
@@ -5382,7 +5392,7 @@
|
|
|
5382
5392
|
databaseId,
|
|
5383
5393
|
collection
|
|
5384
5394
|
}).then(onEntityUpdate).catch(onError);
|
|
5385
|
-
return _temp2$
|
|
5395
|
+
return _temp2$h;
|
|
5386
5396
|
}
|
|
5387
5397
|
} else {
|
|
5388
5398
|
onEntityUpdate(void 0);
|
|
@@ -5430,9 +5440,9 @@
|
|
|
5430
5440
|
}
|
|
5431
5441
|
function _temp3$7() {
|
|
5432
5442
|
}
|
|
5433
|
-
function _temp2$
|
|
5443
|
+
function _temp2$h() {
|
|
5434
5444
|
}
|
|
5435
|
-
function _temp$
|
|
5445
|
+
function _temp$G() {
|
|
5436
5446
|
}
|
|
5437
5447
|
async function saveEntityWithCallbacks({
|
|
5438
5448
|
collection,
|
|
@@ -6087,7 +6097,7 @@
|
|
|
6087
6097
|
}
|
|
6088
6098
|
let t9;
|
|
6089
6099
|
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$
|
|
6100
|
+
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
6101
|
$[19] = url;
|
|
6092
6102
|
$[20] = t9;
|
|
6093
6103
|
} else {
|
|
@@ -6121,7 +6131,7 @@
|
|
|
6121
6131
|
}
|
|
6122
6132
|
return t11;
|
|
6123
6133
|
}
|
|
6124
|
-
function _temp$
|
|
6134
|
+
function _temp$F(e_0) {
|
|
6125
6135
|
return e_0.stopPropagation();
|
|
6126
6136
|
}
|
|
6127
6137
|
const FIRECMS_NS$1 = "firecms_core";
|
|
@@ -6188,7 +6198,7 @@
|
|
|
6188
6198
|
}
|
|
6189
6199
|
let t3;
|
|
6190
6200
|
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$
|
|
6201
|
+
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
6202
|
t2,
|
|
6193
6203
|
url
|
|
6194
6204
|
] });
|
|
@@ -6290,7 +6300,7 @@
|
|
|
6290
6300
|
}
|
|
6291
6301
|
let t7;
|
|
6292
6302
|
if ($[27] !== t4 || $[28] !== t6 || $[29] !== url) {
|
|
6293
|
-
t7 = /* @__PURE__ */ jsxRuntime.jsxs("a", { href: url, rel: "noopener noreferrer", target: "_blank", onClick: _temp2$
|
|
6303
|
+
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
6304
|
t5,
|
|
6295
6305
|
t6
|
|
6296
6306
|
] });
|
|
@@ -6315,10 +6325,10 @@
|
|
|
6315
6325
|
}
|
|
6316
6326
|
}
|
|
6317
6327
|
}
|
|
6318
|
-
function _temp2$
|
|
6328
|
+
function _temp2$g(e_0) {
|
|
6319
6329
|
return e_0.stopPropagation();
|
|
6320
6330
|
}
|
|
6321
|
-
function _temp$
|
|
6331
|
+
function _temp$E(e) {
|
|
6322
6332
|
e.preventDefault();
|
|
6323
6333
|
}
|
|
6324
6334
|
function VideoPreview(t0) {
|
|
@@ -6452,7 +6462,7 @@
|
|
|
6452
6462
|
if (Array.isArray(arrayProperty.of)) {
|
|
6453
6463
|
let t1;
|
|
6454
6464
|
if ($[6] !== arrayProperty.of) {
|
|
6455
|
-
t1 = arrayProperty.of.map(_temp$
|
|
6465
|
+
t1 = arrayProperty.of.map(_temp$D);
|
|
6456
6466
|
$[6] = arrayProperty.of;
|
|
6457
6467
|
$[7] = t1;
|
|
6458
6468
|
} else {
|
|
@@ -6590,7 +6600,7 @@
|
|
|
6590
6600
|
}
|
|
6591
6601
|
return content || null;
|
|
6592
6602
|
}
|
|
6593
|
-
function _temp$
|
|
6603
|
+
function _temp$D(p, i) {
|
|
6594
6604
|
return renderGenericArrayCell(p, i);
|
|
6595
6605
|
}
|
|
6596
6606
|
function renderMap(property, size) {
|
|
@@ -7730,6 +7740,13 @@
|
|
|
7730
7740
|
}
|
|
7731
7741
|
return t3;
|
|
7732
7742
|
}
|
|
7743
|
+
function dateTimeFormat(locale, options) {
|
|
7744
|
+
try {
|
|
7745
|
+
return new Intl.DateTimeFormat(locale ? localeToLanguageTag(locale) : "en-US", options);
|
|
7746
|
+
} catch {
|
|
7747
|
+
return new Intl.DateTimeFormat("en-US", options);
|
|
7748
|
+
}
|
|
7749
|
+
}
|
|
7733
7750
|
function DatePreview(t0) {
|
|
7734
7751
|
const $ = reactCompilerRuntime.c(22);
|
|
7735
7752
|
const {
|
|
@@ -7763,7 +7780,7 @@
|
|
|
7763
7780
|
options.hour = "2-digit";
|
|
7764
7781
|
options.minute = "2-digit";
|
|
7765
7782
|
}
|
|
7766
|
-
const formatter =
|
|
7783
|
+
const formatter = dateTimeFormat(customizationController?.locale, options);
|
|
7767
7784
|
t22 = formatter.format(date);
|
|
7768
7785
|
$[1] = customizationController?.locale;
|
|
7769
7786
|
$[2] = date;
|
|
@@ -7781,7 +7798,7 @@
|
|
|
7781
7798
|
timeZoneName: "short"
|
|
7782
7799
|
});
|
|
7783
7800
|
const parts = tzFormatter.formatToParts(date);
|
|
7784
|
-
t32 = parts.find(_temp$
|
|
7801
|
+
t32 = parts.find(_temp$C)?.value ?? "";
|
|
7785
7802
|
$[6] = date;
|
|
7786
7803
|
$[7] = timezone;
|
|
7787
7804
|
$[8] = t32;
|
|
@@ -7852,7 +7869,7 @@
|
|
|
7852
7869
|
}
|
|
7853
7870
|
return t3;
|
|
7854
7871
|
}
|
|
7855
|
-
function _temp$
|
|
7872
|
+
function _temp$C(p) {
|
|
7856
7873
|
return p.type === "timeZoneName";
|
|
7857
7874
|
}
|
|
7858
7875
|
function MapPropertyPreview(t0) {
|
|
@@ -7947,7 +7964,7 @@
|
|
|
7947
7964
|
}
|
|
7948
7965
|
let t1;
|
|
7949
7966
|
if ($[1] !== value) {
|
|
7950
|
-
t1 = Object.entries(value).map(_temp$
|
|
7967
|
+
t1 = Object.entries(value).map(_temp$B);
|
|
7951
7968
|
$[1] = value;
|
|
7952
7969
|
$[2] = t1;
|
|
7953
7970
|
} else {
|
|
@@ -7963,7 +7980,7 @@
|
|
|
7963
7980
|
}
|
|
7964
7981
|
return t2;
|
|
7965
7982
|
}
|
|
7966
|
-
function _temp$
|
|
7983
|
+
function _temp$B(t0) {
|
|
7967
7984
|
const [key, childValue] = t0;
|
|
7968
7985
|
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
7986
|
const isScalar = childValue && (typeof childValue !== "object" || isTimestampObj);
|
|
@@ -9286,7 +9303,7 @@
|
|
|
9286
9303
|
console.trace("onChange");
|
|
9287
9304
|
if (valueType === "number") {
|
|
9288
9305
|
if (multiple) {
|
|
9289
|
-
const newValue = updatedValue.map(_temp$
|
|
9306
|
+
const newValue = updatedValue.map(_temp$A);
|
|
9290
9307
|
updateValue(newValue);
|
|
9291
9308
|
} else {
|
|
9292
9309
|
updateValue(parseFloat(updatedValue));
|
|
@@ -9339,7 +9356,7 @@
|
|
|
9339
9356
|
const handleOpenChange = t4;
|
|
9340
9357
|
let t5;
|
|
9341
9358
|
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$
|
|
9359
|
+
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
9360
|
$[11] = disabled;
|
|
9344
9361
|
$[12] = enumValues;
|
|
9345
9362
|
$[13] = internalValue;
|
|
@@ -9354,10 +9371,10 @@
|
|
|
9354
9371
|
}
|
|
9355
9372
|
return t5;
|
|
9356
9373
|
}
|
|
9357
|
-
function _temp2$
|
|
9374
|
+
function _temp2$f(v_0) {
|
|
9358
9375
|
return v_0.toString();
|
|
9359
9376
|
}
|
|
9360
|
-
function _temp$
|
|
9377
|
+
function _temp$A(v) {
|
|
9361
9378
|
return parseFloat(v);
|
|
9362
9379
|
}
|
|
9363
9380
|
function VirtualTableNumberInput(props) {
|
|
@@ -9553,7 +9570,7 @@
|
|
|
9553
9570
|
const renderValue = t3;
|
|
9554
9571
|
let t4;
|
|
9555
9572
|
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$
|
|
9573
|
+
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
9574
|
$[7] = disabled;
|
|
9558
9575
|
$[8] = internalValue;
|
|
9559
9576
|
$[9] = multiple;
|
|
@@ -9567,10 +9584,10 @@
|
|
|
9567
9584
|
}
|
|
9568
9585
|
return t4;
|
|
9569
9586
|
}
|
|
9570
|
-
function _temp2$
|
|
9587
|
+
function _temp2$e(user_1) {
|
|
9571
9588
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: user_1.uid, children: /* @__PURE__ */ jsxRuntime.jsx(UserDisplay, { user: user_1 }) }, user_1.uid);
|
|
9572
9589
|
}
|
|
9573
|
-
function _temp$
|
|
9590
|
+
function _temp$z(user_0) {
|
|
9574
9591
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.MultiSelectItem, { value: user_0.uid, children: /* @__PURE__ */ jsxRuntime.jsx(UserDisplay, { user: user_0 }) }, user_0.uid);
|
|
9575
9592
|
}
|
|
9576
9593
|
class ErrorBoundary extends React.Component {
|
|
@@ -9818,7 +9835,7 @@
|
|
|
9818
9835
|
newValue = [...internalValue];
|
|
9819
9836
|
newValue = removeDuplicates(newValue);
|
|
9820
9837
|
setInternalValue(newValue);
|
|
9821
|
-
const fieldValue = newValue.filter(_temp$
|
|
9838
|
+
const fieldValue = newValue.filter(_temp$y).map(_temp2$d);
|
|
9822
9839
|
if (multipleFilesSupported) {
|
|
9823
9840
|
onChange(fieldValue);
|
|
9824
9841
|
} else {
|
|
@@ -9936,10 +9953,10 @@
|
|
|
9936
9953
|
}
|
|
9937
9954
|
return t11;
|
|
9938
9955
|
}
|
|
9939
|
-
function _temp2$
|
|
9956
|
+
function _temp2$d(e_0) {
|
|
9940
9957
|
return e_0.storagePathOrDownloadUrl;
|
|
9941
9958
|
}
|
|
9942
|
-
function _temp$
|
|
9959
|
+
function _temp$y(e) {
|
|
9943
9960
|
return !!e.storagePathOrDownloadUrl;
|
|
9944
9961
|
}
|
|
9945
9962
|
function getInternalInitialValue(multipleFilesSupported, value, metadata, size) {
|
|
@@ -10230,7 +10247,7 @@
|
|
|
10230
10247
|
const snackbarContext = useSnackbarController();
|
|
10231
10248
|
let t1;
|
|
10232
10249
|
if ($[0] !== storage.acceptedFiles) {
|
|
10233
|
-
t1 = storage.acceptedFiles ? storage.acceptedFiles.map(_temp$
|
|
10250
|
+
t1 = storage.acceptedFiles ? storage.acceptedFiles.map(_temp$x).reduce(_temp2$c, {}) : void 0;
|
|
10234
10251
|
$[0] = storage.acceptedFiles;
|
|
10235
10252
|
$[1] = t1;
|
|
10236
10253
|
} else {
|
|
@@ -10453,13 +10470,13 @@
|
|
|
10453
10470
|
}
|
|
10454
10471
|
return t20;
|
|
10455
10472
|
}
|
|
10456
|
-
function _temp2$
|
|
10473
|
+
function _temp2$c(a, b) {
|
|
10457
10474
|
return {
|
|
10458
10475
|
...a,
|
|
10459
10476
|
...b
|
|
10460
10477
|
};
|
|
10461
10478
|
}
|
|
10462
|
-
function _temp$
|
|
10479
|
+
function _temp$x(e) {
|
|
10463
10480
|
return {
|
|
10464
10481
|
[e]: []
|
|
10465
10482
|
};
|
|
@@ -10569,7 +10586,7 @@
|
|
|
10569
10586
|
let t1;
|
|
10570
10587
|
if ($[2] !== updateValue) {
|
|
10571
10588
|
t1 = (entities) => {
|
|
10572
|
-
updateValue(entities.filter(Boolean).map(_temp$
|
|
10589
|
+
updateValue(entities.filter(Boolean).map(_temp$w));
|
|
10573
10590
|
};
|
|
10574
10591
|
$[2] = updateValue;
|
|
10575
10592
|
$[3] = t1;
|
|
@@ -10579,7 +10596,7 @@
|
|
|
10579
10596
|
const onMultipleEntitiesSelected = t1;
|
|
10580
10597
|
let t2;
|
|
10581
10598
|
if ($[4] !== internalValue) {
|
|
10582
|
-
t2 = internalValue ? Array.isArray(internalValue) ? internalValue.map(_temp2$
|
|
10599
|
+
t2 = internalValue ? Array.isArray(internalValue) ? internalValue.map(_temp2$b) : internalValue.id ? [internalValue.id] : [] : [];
|
|
10583
10600
|
$[4] = internalValue;
|
|
10584
10601
|
$[5] = t2;
|
|
10585
10602
|
} else {
|
|
@@ -10741,10 +10758,10 @@
|
|
|
10741
10758
|
}
|
|
10742
10759
|
return t10;
|
|
10743
10760
|
}, equal);
|
|
10744
|
-
function _temp$
|
|
10761
|
+
function _temp$w(e) {
|
|
10745
10762
|
return getReferenceFrom(e);
|
|
10746
10763
|
}
|
|
10747
|
-
function _temp2$
|
|
10764
|
+
function _temp2$b(ref) {
|
|
10748
10765
|
return ref.id;
|
|
10749
10766
|
}
|
|
10750
10767
|
yup__namespace.addMethod(yup__namespace.array, "uniqueInArray", function(mapper = (a) => a, message) {
|
|
@@ -12399,7 +12416,7 @@
|
|
|
12399
12416
|
}
|
|
12400
12417
|
let t5;
|
|
12401
12418
|
if ($[15] !== placeholder) {
|
|
12402
|
-
t5 = placeholder && /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: _temp$
|
|
12419
|
+
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
12420
|
$[15] = placeholder;
|
|
12404
12421
|
$[16] = t5;
|
|
12405
12422
|
} else {
|
|
@@ -12422,7 +12439,7 @@
|
|
|
12422
12439
|
}
|
|
12423
12440
|
return t6;
|
|
12424
12441
|
}
|
|
12425
|
-
function _temp$
|
|
12442
|
+
function _temp$v(e) {
|
|
12426
12443
|
return e.stopPropagation();
|
|
12427
12444
|
}
|
|
12428
12445
|
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 +12667,7 @@
|
|
|
12650
12667
|
t4 = $[7];
|
|
12651
12668
|
}
|
|
12652
12669
|
const style = t4;
|
|
12653
|
-
const getImageSizeNumber = _temp$
|
|
12670
|
+
const getImageSizeNumber = _temp$u;
|
|
12654
12671
|
let child;
|
|
12655
12672
|
if (entry.storagePathOrDownloadUrl) {
|
|
12656
12673
|
const t52 = `storage_preview_${entry.storagePathOrDownloadUrl}`;
|
|
@@ -12725,7 +12742,7 @@
|
|
|
12725
12742
|
}
|
|
12726
12743
|
return t6;
|
|
12727
12744
|
}
|
|
12728
|
-
function _temp$
|
|
12745
|
+
function _temp$u(previewSize) {
|
|
12729
12746
|
switch (previewSize) {
|
|
12730
12747
|
case "small": {
|
|
12731
12748
|
return 40;
|
|
@@ -12762,7 +12779,7 @@
|
|
|
12762
12779
|
const snackbarContext = useSnackbarController();
|
|
12763
12780
|
let t1;
|
|
12764
12781
|
if ($[0] !== storage.acceptedFiles) {
|
|
12765
|
-
t1 = storage.acceptedFiles ? storage.acceptedFiles.reduce(_temp2$
|
|
12782
|
+
t1 = storage.acceptedFiles ? storage.acceptedFiles.reduce(_temp2$a, {}) : void 0;
|
|
12766
12783
|
$[0] = storage.acceptedFiles;
|
|
12767
12784
|
$[1] = t1;
|
|
12768
12785
|
} else {
|
|
@@ -12955,7 +12972,7 @@
|
|
|
12955
12972
|
}
|
|
12956
12973
|
return t21;
|
|
12957
12974
|
}
|
|
12958
|
-
function _temp2$
|
|
12975
|
+
function _temp2$a(acc, ext) {
|
|
12959
12976
|
return {
|
|
12960
12977
|
...acc,
|
|
12961
12978
|
[ext]: []
|
|
@@ -14498,7 +14515,7 @@
|
|
|
14498
14515
|
} else {
|
|
14499
14516
|
t42 = $[20];
|
|
14500
14517
|
}
|
|
14501
|
-
t3 = Object.entries(mapProperties).filter(_temp$
|
|
14518
|
+
t3 = Object.entries(mapProperties).filter(_temp$t).map(t42);
|
|
14502
14519
|
$[6] = autoFocus;
|
|
14503
14520
|
$[7] = context;
|
|
14504
14521
|
$[8] = disabled;
|
|
@@ -14577,7 +14594,7 @@
|
|
|
14577
14594
|
}
|
|
14578
14595
|
return t10;
|
|
14579
14596
|
}
|
|
14580
|
-
function _temp$
|
|
14597
|
+
function _temp$t(t0) {
|
|
14581
14598
|
const [, property_0] = t0;
|
|
14582
14599
|
return !isHidden(property_0);
|
|
14583
14600
|
}
|
|
@@ -15872,10 +15889,11 @@
|
|
|
15872
15889
|
setValue(null);
|
|
15873
15890
|
}, children: /* @__PURE__ */ jsxRuntime.jsx(ui.CloseIcon, { size: "small" }) })
|
|
15874
15891
|
] });
|
|
15892
|
+
const canAddElements = !property.disabled && !isSubmitting && !disabled && (property.canAddElements ?? true);
|
|
15875
15893
|
const firstOneOfKey = Object.keys(property.oneOf.properties)[0];
|
|
15876
15894
|
const body = /* @__PURE__ */ jsxRuntime.jsx(ArrayContainer, { value, className: "flex flex-col gap-3", droppableId: propertyKey, addLabel: property.name ? t("add_to_field", {
|
|
15877
15895
|
fieldName: property.name
|
|
15878
|
-
}) : t("add_entry"), buildEntry, onInternalIdAdded: setLastAddedId, disabled: isSubmitting || Boolean(property.disabled), canAddElements
|
|
15896
|
+
}) : t("add_entry"), buildEntry, onInternalIdAdded: setLastAddedId, disabled: isSubmitting || Boolean(property.disabled), canAddElements, onValueChange: (value_0) => setFieldValue(propertyKey, value_0), newDefaultEntry: {
|
|
15879
15897
|
[property.oneOf.typeField ?? DEFAULT_ONE_OF_TYPE]: firstOneOfKey,
|
|
15880
15898
|
[property.oneOf.valueField ?? DEFAULT_ONE_OF_VALUE]: getDefaultValueFor(property.oneOf.properties[firstOneOfKey])
|
|
15881
15899
|
} });
|
|
@@ -15951,7 +15969,7 @@
|
|
|
15951
15969
|
const property = t4;
|
|
15952
15970
|
let t5;
|
|
15953
15971
|
if ($[9] !== properties) {
|
|
15954
|
-
t5 = Object.entries(properties).map(_temp$
|
|
15972
|
+
t5 = Object.entries(properties).map(_temp$s);
|
|
15955
15973
|
$[9] = properties;
|
|
15956
15974
|
$[10] = t5;
|
|
15957
15975
|
} else {
|
|
@@ -16044,7 +16062,7 @@
|
|
|
16044
16062
|
}
|
|
16045
16063
|
return t11;
|
|
16046
16064
|
}
|
|
16047
|
-
function _temp$
|
|
16065
|
+
function _temp$s(t0) {
|
|
16048
16066
|
const [key, property_0] = t0;
|
|
16049
16067
|
return {
|
|
16050
16068
|
id: key,
|
|
@@ -19377,7 +19395,7 @@
|
|
|
19377
19395
|
let t1;
|
|
19378
19396
|
if ($[0] !== text) {
|
|
19379
19397
|
const urlRegex = /https?:\/\/[^\s]+/g;
|
|
19380
|
-
t1 = text.replace(urlRegex, _temp$
|
|
19398
|
+
t1 = text.replace(urlRegex, _temp$r);
|
|
19381
19399
|
$[0] = text;
|
|
19382
19400
|
$[1] = t1;
|
|
19383
19401
|
} else {
|
|
@@ -19396,7 +19414,7 @@
|
|
|
19396
19414
|
}
|
|
19397
19415
|
return t2;
|
|
19398
19416
|
};
|
|
19399
|
-
function _temp$
|
|
19417
|
+
function _temp$r(url) {
|
|
19400
19418
|
return `<a href="${url}" class="underline" target="_blank">Link</a><br/>`;
|
|
19401
19419
|
}
|
|
19402
19420
|
const operationLabels$2 = {
|
|
@@ -19709,7 +19727,7 @@
|
|
|
19709
19727
|
}
|
|
19710
19728
|
let t9;
|
|
19711
19729
|
if ($[24] !== possibleOperations) {
|
|
19712
|
-
t9 = possibleOperations.map(_temp2$
|
|
19730
|
+
t9 = possibleOperations.map(_temp2$9);
|
|
19713
19731
|
$[24] = possibleOperations;
|
|
19714
19732
|
$[25] = t9;
|
|
19715
19733
|
} else {
|
|
@@ -19717,7 +19735,7 @@
|
|
|
19717
19735
|
}
|
|
19718
19736
|
let t10;
|
|
19719
19737
|
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$
|
|
19738
|
+
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
19739
|
$[26] = operation;
|
|
19722
19740
|
$[27] = t8;
|
|
19723
19741
|
$[28] = t9;
|
|
@@ -19819,10 +19837,10 @@
|
|
|
19819
19837
|
function _temp3$5(e_1) {
|
|
19820
19838
|
return String(e_1);
|
|
19821
19839
|
}
|
|
19822
|
-
function _temp2$
|
|
19840
|
+
function _temp2$9(op_2) {
|
|
19823
19841
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: op_2, children: operationLabels$1[op_2] }, op_2);
|
|
19824
19842
|
}
|
|
19825
|
-
function _temp$
|
|
19843
|
+
function _temp$q(op_1) {
|
|
19826
19844
|
return operationLabels$1[op_1];
|
|
19827
19845
|
}
|
|
19828
19846
|
function BooleanFilterField(t0) {
|
|
@@ -19985,7 +20003,7 @@
|
|
|
19985
20003
|
}
|
|
19986
20004
|
let t7;
|
|
19987
20005
|
if ($[15] !== possibleOperations) {
|
|
19988
|
-
t7 = possibleOperations.map(_temp2$
|
|
20006
|
+
t7 = possibleOperations.map(_temp2$8);
|
|
19989
20007
|
$[15] = possibleOperations;
|
|
19990
20008
|
$[16] = t7;
|
|
19991
20009
|
} else {
|
|
@@ -19993,7 +20011,7 @@
|
|
|
19993
20011
|
}
|
|
19994
20012
|
let t8;
|
|
19995
20013
|
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$
|
|
20014
|
+
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
20015
|
$[17] = operation;
|
|
19998
20016
|
$[18] = t6;
|
|
19999
20017
|
$[19] = t7;
|
|
@@ -20040,10 +20058,10 @@
|
|
|
20040
20058
|
}
|
|
20041
20059
|
return t12;
|
|
20042
20060
|
}
|
|
20043
|
-
function _temp2$
|
|
20061
|
+
function _temp2$8(op_2) {
|
|
20044
20062
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: op_2, children: operationLabels[op_2] }, op_2);
|
|
20045
20063
|
}
|
|
20046
|
-
function _temp$
|
|
20064
|
+
function _temp$p(op_1) {
|
|
20047
20065
|
return operationLabels[op_1];
|
|
20048
20066
|
}
|
|
20049
20067
|
const SelectableTable = function SelectableTable2({
|
|
@@ -20806,7 +20824,7 @@
|
|
|
20806
20824
|
parentCollectionIds
|
|
20807
20825
|
};
|
|
20808
20826
|
const searchBlocked = customizationController.plugins?.find((p) => p.collectionView?.blockSearch?.(props));
|
|
20809
|
-
const addTextSearchClickListener = Boolean(dataSource?.initTextSearch) || customizationController.plugins?.find(_temp$
|
|
20827
|
+
const addTextSearchClickListener = Boolean(dataSource?.initTextSearch) || customizationController.plugins?.find(_temp$o);
|
|
20810
20828
|
if (addTextSearchClickListener) {
|
|
20811
20829
|
onTextSearchClick = addTextSearchClickListener ? () => {
|
|
20812
20830
|
setTextSearchLoading(true);
|
|
@@ -20902,7 +20920,7 @@
|
|
|
20902
20920
|
}
|
|
20903
20921
|
return t3;
|
|
20904
20922
|
}
|
|
20905
|
-
function _temp$
|
|
20923
|
+
function _temp$o(p_0) {
|
|
20906
20924
|
return Boolean(p_0.collectionView?.onTextSearchClick);
|
|
20907
20925
|
}
|
|
20908
20926
|
function DeleteEntityDialog({
|
|
@@ -21069,20 +21087,25 @@
|
|
|
21069
21087
|
} catch {
|
|
21070
21088
|
}
|
|
21071
21089
|
}
|
|
21072
|
-
function addRecentId(
|
|
21073
|
-
const recentIds = getRecentIds(
|
|
21090
|
+
function addRecentId(key, id) {
|
|
21091
|
+
const recentIds = getRecentIds(key);
|
|
21074
21092
|
const newRecentIds = [id, ...recentIds.filter((i) => i !== id)];
|
|
21075
21093
|
if (newRecentIds.length > 5) {
|
|
21076
21094
|
newRecentIds.pop();
|
|
21077
21095
|
}
|
|
21078
|
-
saveSearchedIdsLocally(
|
|
21096
|
+
saveSearchedIdsLocally(key, newRecentIds);
|
|
21079
21097
|
return newRecentIds;
|
|
21080
21098
|
}
|
|
21081
|
-
function saveSearchedIdsLocally(
|
|
21082
|
-
setLocalStorageItem("recent_id_searches::" +
|
|
21099
|
+
function saveSearchedIdsLocally(key, ids) {
|
|
21100
|
+
setLocalStorageItem("recent_id_searches::" + key, JSON.stringify(ids));
|
|
21083
21101
|
}
|
|
21084
|
-
function getRecentIds(
|
|
21085
|
-
return getLocalStorageJSON("recent_id_searches::" +
|
|
21102
|
+
function getRecentIds(key) {
|
|
21103
|
+
return getLocalStorageJSON("recent_id_searches::" + key, []);
|
|
21104
|
+
}
|
|
21105
|
+
function removeRecentIds(key, ids) {
|
|
21106
|
+
const remaining = getRecentIds(key).filter((id) => !ids.includes(id));
|
|
21107
|
+
saveSearchedIdsLocally(key, remaining);
|
|
21108
|
+
return remaining;
|
|
21086
21109
|
}
|
|
21087
21110
|
const editEntityAction = {
|
|
21088
21111
|
icon: /* @__PURE__ */ jsxRuntime.jsx(ui.EditIcon, { size: "small" }),
|
|
@@ -21112,7 +21135,7 @@
|
|
|
21112
21135
|
entityId: entity.id
|
|
21113
21136
|
});
|
|
21114
21137
|
if (collection) {
|
|
21115
|
-
addRecentId(collection.id, entity.id);
|
|
21138
|
+
addRecentId(fullIdPath ?? fullPath ?? collection.id, entity.id);
|
|
21116
21139
|
}
|
|
21117
21140
|
const path = collection?.collectionGroup ? entity.path : fullPath ?? collection?.path ?? entity.path;
|
|
21118
21141
|
const resolvedPathSegments = collection?.collectionGroup ? entity.pathSegments : pathSegments ?? entity.pathSegments;
|
|
@@ -21565,7 +21588,7 @@
|
|
|
21565
21588
|
T0 = ui.Collapse;
|
|
21566
21589
|
t4 = favouriteCollections.length > 0;
|
|
21567
21590
|
t2 = "flex flex-row flex-wrap gap-2 pb-2 min-h-[32px]";
|
|
21568
|
-
t3 = favouriteCollections.map(_temp$
|
|
21591
|
+
t3 = favouriteCollections.map(_temp$n);
|
|
21569
21592
|
$[2] = navigationController;
|
|
21570
21593
|
$[3] = t1;
|
|
21571
21594
|
$[4] = T0;
|
|
@@ -21599,7 +21622,7 @@
|
|
|
21599
21622
|
}
|
|
21600
21623
|
return t6;
|
|
21601
21624
|
}
|
|
21602
|
-
function _temp$
|
|
21625
|
+
function _temp$n(entry_0) {
|
|
21603
21626
|
return /* @__PURE__ */ jsxRuntime.jsx(NavigationChip, { entry: entry_0 }, entry_0.path);
|
|
21604
21627
|
}
|
|
21605
21628
|
const scrollsMap = {};
|
|
@@ -21836,7 +21859,7 @@
|
|
|
21836
21859
|
}
|
|
21837
21860
|
let t4;
|
|
21838
21861
|
if ($[4] !== actions) {
|
|
21839
|
-
t4 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5", onClick: _temp$
|
|
21862
|
+
t4 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5", onClick: _temp$m, children: actions });
|
|
21840
21863
|
$[4] = actions;
|
|
21841
21864
|
$[5] = t4;
|
|
21842
21865
|
} else {
|
|
@@ -21923,7 +21946,7 @@
|
|
|
21923
21946
|
}
|
|
21924
21947
|
return t12;
|
|
21925
21948
|
});
|
|
21926
|
-
function _temp$
|
|
21949
|
+
function _temp$m(event) {
|
|
21927
21950
|
event.preventDefault();
|
|
21928
21951
|
event.stopPropagation();
|
|
21929
21952
|
}
|
|
@@ -24290,7 +24313,7 @@
|
|
|
24290
24313
|
let t19;
|
|
24291
24314
|
let t20;
|
|
24292
24315
|
if ($[19] !== items2) {
|
|
24293
|
-
t20 = items2.map(_temp$
|
|
24316
|
+
t20 = items2.map(_temp$l);
|
|
24294
24317
|
$[19] = items2;
|
|
24295
24318
|
$[20] = t20;
|
|
24296
24319
|
} else {
|
|
@@ -24396,7 +24419,7 @@
|
|
|
24396
24419
|
}
|
|
24397
24420
|
return t29;
|
|
24398
24421
|
});
|
|
24399
|
-
function _temp$
|
|
24422
|
+
function _temp$l(i) {
|
|
24400
24423
|
return i.id;
|
|
24401
24424
|
}
|
|
24402
24425
|
function Board(t0) {
|
|
@@ -26568,7 +26591,7 @@
|
|
|
26568
26591
|
}
|
|
26569
26592
|
let t7;
|
|
26570
26593
|
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$
|
|
26594
|
+
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
26595
|
$[30] = collection.forceFilter;
|
|
26573
26596
|
$[31] = filtersDialogOpen;
|
|
26574
26597
|
$[32] = resolvedProperties;
|
|
@@ -26591,9 +26614,104 @@
|
|
|
26591
26614
|
}
|
|
26592
26615
|
return t8;
|
|
26593
26616
|
}
|
|
26594
|
-
function _temp$
|
|
26617
|
+
function _temp$k(key_0) {
|
|
26595
26618
|
return key_0.toString();
|
|
26596
26619
|
}
|
|
26620
|
+
const DEFAULT_ENTITY_OPEN_MODE$1 = "side_panel";
|
|
26621
|
+
function EntityIdHeaderWidget({
|
|
26622
|
+
collection,
|
|
26623
|
+
path,
|
|
26624
|
+
pathSegments,
|
|
26625
|
+
fullIdPath
|
|
26626
|
+
}) {
|
|
26627
|
+
const navigation = useNavigationController();
|
|
26628
|
+
const dataSource = useDataSource();
|
|
26629
|
+
const [openPopup, setOpenPopup] = React.useState(false);
|
|
26630
|
+
const [searchString, setSearchString] = React.useState("");
|
|
26631
|
+
const [recentIds, setRecentIds] = React.useState([]);
|
|
26632
|
+
const latestCheck = React.useRef(0);
|
|
26633
|
+
const sideEntityController = useSideEntityController();
|
|
26634
|
+
const {
|
|
26635
|
+
t
|
|
26636
|
+
} = useTranslation();
|
|
26637
|
+
const resolvedPath = navigation.resolveIdsFrom(path, pathSegments);
|
|
26638
|
+
const resolvedPathSegments = pathSegments ? navigation.resolveSegmentsFrom?.(pathSegments) ?? pathSegments : void 0;
|
|
26639
|
+
const entityExists = React.useCallback(async (entityId) => {
|
|
26640
|
+
try {
|
|
26641
|
+
const entity = await dataSource.fetchEntity({
|
|
26642
|
+
path: resolvedPath,
|
|
26643
|
+
pathSegments: resolvedPathSegments,
|
|
26644
|
+
entityId,
|
|
26645
|
+
collection
|
|
26646
|
+
});
|
|
26647
|
+
return Boolean(entity?.values);
|
|
26648
|
+
} catch (e) {
|
|
26649
|
+
return void 0;
|
|
26650
|
+
}
|
|
26651
|
+
}, [dataSource, resolvedPath, resolvedPathSegments, collection]);
|
|
26652
|
+
const refreshRecentIds = () => {
|
|
26653
|
+
const ids = getRecentIds(fullIdPath);
|
|
26654
|
+
const check = ++latestCheck.current;
|
|
26655
|
+
Promise.all(ids.map(entityExists)).then((results) => {
|
|
26656
|
+
if (check !== latestCheck.current) return;
|
|
26657
|
+
const missing = ids.filter((_, i) => results[i] === false);
|
|
26658
|
+
if (missing.length > 0) removeRecentIds(fullIdPath, missing);
|
|
26659
|
+
setRecentIds(ids.filter((__0, i_0) => results[i_0] === true));
|
|
26660
|
+
});
|
|
26661
|
+
};
|
|
26662
|
+
const openEntityMode = collection?.openEntityMode ?? DEFAULT_ENTITY_OPEN_MODE$1;
|
|
26663
|
+
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) => {
|
|
26664
|
+
if (open) refreshRecentIds();
|
|
26665
|
+
setOpenPopup(open);
|
|
26666
|
+
}, 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: [
|
|
26667
|
+
/* @__PURE__ */ jsxRuntime.jsx("form", { noValidate: true, onSubmit: (e_0) => {
|
|
26668
|
+
e_0.preventDefault();
|
|
26669
|
+
const entityId_0 = searchString.trim();
|
|
26670
|
+
if (!entityId_0) return;
|
|
26671
|
+
setOpenPopup(false);
|
|
26672
|
+
entityExists(entityId_0).then((exists) => {
|
|
26673
|
+
if (exists) addRecentId(fullIdPath, entityId_0);
|
|
26674
|
+
});
|
|
26675
|
+
navigateToEntity({
|
|
26676
|
+
openEntityMode,
|
|
26677
|
+
collection,
|
|
26678
|
+
entityId: entityId_0,
|
|
26679
|
+
path,
|
|
26680
|
+
pathSegments,
|
|
26681
|
+
fullIdPath,
|
|
26682
|
+
sideEntityController,
|
|
26683
|
+
navigation
|
|
26684
|
+
});
|
|
26685
|
+
}, className: "w-96 max-w-full", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex p-2 w-full gap-2", children: [
|
|
26686
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26687
|
+
"input",
|
|
26688
|
+
{
|
|
26689
|
+
autoFocus: openPopup,
|
|
26690
|
+
placeholder: t("find_entity_by_id"),
|
|
26691
|
+
onChange: (e_1) => {
|
|
26692
|
+
setSearchString(e_1.target.value);
|
|
26693
|
+
},
|
|
26694
|
+
value: searchString,
|
|
26695
|
+
className: "rounded-lg bg-white dark:bg-surface-800 flex-grow bg-transparent outline-none p-2 " + ui.focusedDisabled
|
|
26696
|
+
}
|
|
26697
|
+
),
|
|
26698
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", disabled: !searchString.trim(), type: "submit", children: /* @__PURE__ */ jsxRuntime.jsx(ui.KeyboardTabIcon, {}) })
|
|
26699
|
+
] }) }),
|
|
26700
|
+
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: () => {
|
|
26701
|
+
setOpenPopup(false);
|
|
26702
|
+
navigateToEntity({
|
|
26703
|
+
openEntityMode,
|
|
26704
|
+
collection,
|
|
26705
|
+
entityId: id,
|
|
26706
|
+
path,
|
|
26707
|
+
pathSegments,
|
|
26708
|
+
fullIdPath,
|
|
26709
|
+
sideEntityController,
|
|
26710
|
+
navigation
|
|
26711
|
+
});
|
|
26712
|
+
}, includeEntityLink: false, size: "small" }, id)) })
|
|
26713
|
+
] }) }) });
|
|
26714
|
+
}
|
|
26597
26715
|
const collectionScrollCache = /* @__PURE__ */ new Map();
|
|
26598
26716
|
function useScrollRestoration() {
|
|
26599
26717
|
const updateCollectionScroll = ({
|
|
@@ -26634,6 +26752,7 @@
|
|
|
26634
26752
|
isSubCollection,
|
|
26635
26753
|
className,
|
|
26636
26754
|
updateUrl,
|
|
26755
|
+
onCountChange,
|
|
26637
26756
|
...collectionProp
|
|
26638
26757
|
}) {
|
|
26639
26758
|
const context = useFireCMSContext();
|
|
@@ -26771,7 +26890,7 @@
|
|
|
26771
26890
|
entityId: clickedEntity.id
|
|
26772
26891
|
});
|
|
26773
26892
|
if (collection_1) {
|
|
26774
|
-
addRecentId(
|
|
26893
|
+
addRecentId(fullIdPath ?? fullPath, clickedEntity.id);
|
|
26775
26894
|
}
|
|
26776
26895
|
const isCollectionGroup = Boolean(collection_1?.collectionGroup);
|
|
26777
26896
|
const path = isCollectionGroup ? clickedEntity.path : fullPath ?? clickedEntity.path;
|
|
@@ -27099,8 +27218,9 @@
|
|
|
27099
27218
|
React.useEffect(() => {
|
|
27100
27219
|
if (docsCount !== void 0) {
|
|
27101
27220
|
breadcrumbs.updateCount(fullPath, docsCount);
|
|
27221
|
+
onCountChange?.(docsCount);
|
|
27102
27222
|
}
|
|
27103
|
-
}, [docsCount, fullPath, breadcrumbs.updateCount]);
|
|
27223
|
+
}, [docsCount, fullPath, breadcrumbs.updateCount, onCountChange]);
|
|
27104
27224
|
const countFetcher = /* @__PURE__ */ jsxRuntime.jsx(EntitiesCount, { fullPath, pathSegments, collection, filter: tableController.filterValues, sortBy: tableController.sortBy, onCountChange: setDocsCount });
|
|
27105
27225
|
const buildAdditionalHeaderWidget = React.useCallback(({
|
|
27106
27226
|
property: property_2,
|
|
@@ -27246,207 +27366,6 @@
|
|
|
27246
27366
|
}
|
|
27247
27367
|
};
|
|
27248
27368
|
}
|
|
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
27369
|
const EntityCollectionView$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
27451
27370
|
__proto__: null,
|
|
27452
27371
|
EntityCollectionView: EntityCollectionView$1
|
|
@@ -27866,7 +27785,7 @@
|
|
|
27866
27785
|
}
|
|
27867
27786
|
let t10;
|
|
27868
27787
|
if ($[11] !== headerActions) {
|
|
27869
|
-
t10 = headerActions && /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: _temp$
|
|
27788
|
+
t10 = headerActions && /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: _temp$j, children: headerActions });
|
|
27870
27789
|
$[11] = headerActions;
|
|
27871
27790
|
$[12] = t10;
|
|
27872
27791
|
} else {
|
|
@@ -27946,7 +27865,7 @@
|
|
|
27946
27865
|
}
|
|
27947
27866
|
return t16;
|
|
27948
27867
|
}
|
|
27949
|
-
function _temp$
|
|
27868
|
+
function _temp$j(e) {
|
|
27950
27869
|
return e.stopPropagation();
|
|
27951
27870
|
}
|
|
27952
27871
|
function DefaultDrawer(t0) {
|
|
@@ -27991,10 +27910,10 @@
|
|
|
27991
27910
|
navigationEntries,
|
|
27992
27911
|
groups
|
|
27993
27912
|
} = navigation.topLevelNavigation;
|
|
27994
|
-
const adminViews = navigationEntries.filter(_temp$
|
|
27913
|
+
const adminViews = navigationEntries.filter(_temp$i) ?? [];
|
|
27995
27914
|
let t2;
|
|
27996
27915
|
if ($[1] !== groups) {
|
|
27997
|
-
t2 = groups.filter(_temp2$
|
|
27916
|
+
t2 = groups.filter(_temp2$7);
|
|
27998
27917
|
$[1] = groups;
|
|
27999
27918
|
$[2] = t2;
|
|
28000
27919
|
} else {
|
|
@@ -28131,10 +28050,10 @@
|
|
|
28131
28050
|
}
|
|
28132
28051
|
return t14;
|
|
28133
28052
|
}
|
|
28134
|
-
function _temp2$
|
|
28053
|
+
function _temp2$7(g) {
|
|
28135
28054
|
return g !== "Admin";
|
|
28136
28055
|
}
|
|
28137
|
-
function _temp$
|
|
28056
|
+
function _temp$i(e) {
|
|
28138
28057
|
return e.type === "admin";
|
|
28139
28058
|
}
|
|
28140
28059
|
function DrawerToggle() {
|
|
@@ -28265,8 +28184,149 @@
|
|
|
28265
28184
|
}
|
|
28266
28185
|
return t2;
|
|
28267
28186
|
}
|
|
28187
|
+
function CollectionCountBadge(t0) {
|
|
28188
|
+
const $ = reactCompilerRuntime.c(3);
|
|
28189
|
+
const {
|
|
28190
|
+
count
|
|
28191
|
+
} = t0;
|
|
28192
|
+
if (count === void 0) {
|
|
28193
|
+
return null;
|
|
28194
|
+
}
|
|
28195
|
+
if (count === null) {
|
|
28196
|
+
let t12;
|
|
28197
|
+
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
28198
|
+
t12 = /* @__PURE__ */ jsxRuntime.jsx(ui.Skeleton, { className: "w-8 h-4 rounded-md" });
|
|
28199
|
+
$[0] = t12;
|
|
28200
|
+
} else {
|
|
28201
|
+
t12 = $[0];
|
|
28202
|
+
}
|
|
28203
|
+
return t12;
|
|
28204
|
+
}
|
|
28205
|
+
let t1;
|
|
28206
|
+
if ($[1] !== count) {
|
|
28207
|
+
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 });
|
|
28208
|
+
$[1] = count;
|
|
28209
|
+
$[2] = t1;
|
|
28210
|
+
} else {
|
|
28211
|
+
t1 = $[2];
|
|
28212
|
+
}
|
|
28213
|
+
return t1;
|
|
28214
|
+
}
|
|
28215
|
+
function PathTitle(t0) {
|
|
28216
|
+
const $ = reactCompilerRuntime.c(15);
|
|
28217
|
+
const {
|
|
28218
|
+
parents,
|
|
28219
|
+
name,
|
|
28220
|
+
count,
|
|
28221
|
+
className
|
|
28222
|
+
} = t0;
|
|
28223
|
+
let t1;
|
|
28224
|
+
if ($[0] !== className) {
|
|
28225
|
+
t1 = ui.cls("flex flex-col", className);
|
|
28226
|
+
$[0] = className;
|
|
28227
|
+
$[1] = t1;
|
|
28228
|
+
} else {
|
|
28229
|
+
t1 = $[1];
|
|
28230
|
+
}
|
|
28231
|
+
let t2;
|
|
28232
|
+
if ($[2] !== parents) {
|
|
28233
|
+
t2 = parents.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", noWrap: true, children: parents.join(" / ") });
|
|
28234
|
+
$[2] = parents;
|
|
28235
|
+
$[3] = t2;
|
|
28236
|
+
} else {
|
|
28237
|
+
t2 = $[3];
|
|
28238
|
+
}
|
|
28239
|
+
let t3;
|
|
28240
|
+
if ($[4] !== name) {
|
|
28241
|
+
t3 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", noWrap: true, className: "font-medium", children: name });
|
|
28242
|
+
$[4] = name;
|
|
28243
|
+
$[5] = t3;
|
|
28244
|
+
} else {
|
|
28245
|
+
t3 = $[5];
|
|
28246
|
+
}
|
|
28247
|
+
let t4;
|
|
28248
|
+
if ($[6] !== count) {
|
|
28249
|
+
t4 = /* @__PURE__ */ jsxRuntime.jsx(CollectionCountBadge, { count });
|
|
28250
|
+
$[6] = count;
|
|
28251
|
+
$[7] = t4;
|
|
28252
|
+
} else {
|
|
28253
|
+
t4 = $[7];
|
|
28254
|
+
}
|
|
28255
|
+
let t5;
|
|
28256
|
+
if ($[8] !== t3 || $[9] !== t4) {
|
|
28257
|
+
t5 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center gap-2 min-w-0", children: [
|
|
28258
|
+
t3,
|
|
28259
|
+
t4
|
|
28260
|
+
] });
|
|
28261
|
+
$[8] = t3;
|
|
28262
|
+
$[9] = t4;
|
|
28263
|
+
$[10] = t5;
|
|
28264
|
+
} else {
|
|
28265
|
+
t5 = $[10];
|
|
28266
|
+
}
|
|
28267
|
+
let t6;
|
|
28268
|
+
if ($[11] !== t1 || $[12] !== t2 || $[13] !== t5) {
|
|
28269
|
+
t6 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t1, children: [
|
|
28270
|
+
t2,
|
|
28271
|
+
t5
|
|
28272
|
+
] });
|
|
28273
|
+
$[11] = t1;
|
|
28274
|
+
$[12] = t2;
|
|
28275
|
+
$[13] = t5;
|
|
28276
|
+
$[14] = t6;
|
|
28277
|
+
} else {
|
|
28278
|
+
t6 = $[14];
|
|
28279
|
+
}
|
|
28280
|
+
return t6;
|
|
28281
|
+
}
|
|
28282
|
+
function CollectionPathTitle(t0) {
|
|
28283
|
+
const $ = reactCompilerRuntime.c(9);
|
|
28284
|
+
const {
|
|
28285
|
+
path,
|
|
28286
|
+
name,
|
|
28287
|
+
count
|
|
28288
|
+
} = t0;
|
|
28289
|
+
const navigation = useNavigationController();
|
|
28290
|
+
let t1;
|
|
28291
|
+
let t2;
|
|
28292
|
+
if ($[0] !== navigation.collections) {
|
|
28293
|
+
t2 = navigation.collections ?? [];
|
|
28294
|
+
$[0] = navigation.collections;
|
|
28295
|
+
$[1] = t2;
|
|
28296
|
+
} else {
|
|
28297
|
+
t2 = $[1];
|
|
28298
|
+
}
|
|
28299
|
+
let t3;
|
|
28300
|
+
if ($[2] !== path || $[3] !== t2) {
|
|
28301
|
+
t3 = getNavigationEntriesFromPath({
|
|
28302
|
+
path,
|
|
28303
|
+
collections: t2
|
|
28304
|
+
}).slice(0, -1).map(_temp$h);
|
|
28305
|
+
$[2] = path;
|
|
28306
|
+
$[3] = t2;
|
|
28307
|
+
$[4] = t3;
|
|
28308
|
+
} else {
|
|
28309
|
+
t3 = $[4];
|
|
28310
|
+
}
|
|
28311
|
+
t1 = t3;
|
|
28312
|
+
const parents = t1;
|
|
28313
|
+
let t4;
|
|
28314
|
+
if ($[5] !== count || $[6] !== name || $[7] !== parents) {
|
|
28315
|
+
t4 = /* @__PURE__ */ jsxRuntime.jsx(PathTitle, { parents, name, count, className: "shrink-0 mx-2 max-w-[140px] sm:max-w-[240px] lg:max-w-[320px]" });
|
|
28316
|
+
$[5] = count;
|
|
28317
|
+
$[6] = name;
|
|
28318
|
+
$[7] = parents;
|
|
28319
|
+
$[8] = t4;
|
|
28320
|
+
} else {
|
|
28321
|
+
t4 = $[8];
|
|
28322
|
+
}
|
|
28323
|
+
return t4;
|
|
28324
|
+
}
|
|
28325
|
+
function _temp$h(entry) {
|
|
28326
|
+
return entry.type === "entity" ? entry.entityId : entry.type === "collection" ? entry.collection.name : entry.view.name;
|
|
28327
|
+
}
|
|
28268
28328
|
const DefaultAppBar = function DefaultAppBar2(t0) {
|
|
28269
|
-
const $ = reactCompilerRuntime.c(
|
|
28329
|
+
const $ = reactCompilerRuntime.c(58);
|
|
28270
28330
|
const {
|
|
28271
28331
|
title,
|
|
28272
28332
|
endAdornment,
|
|
@@ -28287,6 +28347,7 @@
|
|
|
28287
28347
|
const logo = logoProp ?? appLogo;
|
|
28288
28348
|
const navigation = useNavigationController();
|
|
28289
28349
|
const breadcrumbs = useBreadcrumbsController();
|
|
28350
|
+
const lastBreadcrumb = breadcrumbs.breadcrumbs?.[breadcrumbs.breadcrumbs.length - 1];
|
|
28290
28351
|
const authController = useAuthController();
|
|
28291
28352
|
const {
|
|
28292
28353
|
mode,
|
|
@@ -28377,30 +28438,39 @@
|
|
|
28377
28438
|
}
|
|
28378
28439
|
let t8;
|
|
28379
28440
|
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$
|
|
28441
|
+
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
28442
|
$[21] = breadcrumbs.breadcrumbs;
|
|
28382
28443
|
$[22] = t8;
|
|
28383
28444
|
} else {
|
|
28384
28445
|
t8 = $[22];
|
|
28385
28446
|
}
|
|
28386
28447
|
let t9;
|
|
28387
|
-
if ($[23]
|
|
28388
|
-
t9 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
28389
|
-
$[23] =
|
|
28448
|
+
if ($[23] !== breadcrumbs.breadcrumbs || $[24] !== lastBreadcrumb) {
|
|
28449
|
+
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 });
|
|
28450
|
+
$[23] = breadcrumbs.breadcrumbs;
|
|
28451
|
+
$[24] = lastBreadcrumb;
|
|
28452
|
+
$[25] = t9;
|
|
28390
28453
|
} else {
|
|
28391
|
-
t9 = $[
|
|
28454
|
+
t9 = $[25];
|
|
28392
28455
|
}
|
|
28393
28456
|
let t10;
|
|
28394
|
-
if ($[
|
|
28395
|
-
t10 =
|
|
28396
|
-
$[
|
|
28397
|
-
$[25] = t10;
|
|
28457
|
+
if ($[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
28458
|
+
t10 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow" });
|
|
28459
|
+
$[26] = t10;
|
|
28398
28460
|
} else {
|
|
28399
|
-
t10 = $[
|
|
28461
|
+
t10 = $[26];
|
|
28400
28462
|
}
|
|
28401
28463
|
let t11;
|
|
28402
|
-
if ($[
|
|
28403
|
-
t11 =
|
|
28464
|
+
if ($[27] !== endAdornment) {
|
|
28465
|
+
t11 = endAdornment && /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { children: endAdornment });
|
|
28466
|
+
$[27] = endAdornment;
|
|
28467
|
+
$[28] = t11;
|
|
28468
|
+
} else {
|
|
28469
|
+
t11 = $[28];
|
|
28470
|
+
}
|
|
28471
|
+
let t12;
|
|
28472
|
+
if ($[29] !== includeModeToggle || $[30] !== mode || $[31] !== setMode || $[32] !== t) {
|
|
28473
|
+
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
28474
|
/* @__PURE__ */ jsxRuntime.jsxs(ui.MenuItem, { onClick: () => setMode("dark"), children: [
|
|
28405
28475
|
/* @__PURE__ */ jsxRuntime.jsx(ui.DarkModeIcon, { size: "smallest" }),
|
|
28406
28476
|
" ",
|
|
@@ -28417,101 +28487,106 @@
|
|
|
28417
28487
|
t("system_mode")
|
|
28418
28488
|
] })
|
|
28419
28489
|
] });
|
|
28420
|
-
$[
|
|
28421
|
-
$[
|
|
28422
|
-
$[
|
|
28423
|
-
$[
|
|
28424
|
-
$[
|
|
28490
|
+
$[29] = includeModeToggle;
|
|
28491
|
+
$[30] = mode;
|
|
28492
|
+
$[31] = setMode;
|
|
28493
|
+
$[32] = t;
|
|
28494
|
+
$[33] = t12;
|
|
28425
28495
|
} else {
|
|
28426
|
-
|
|
28496
|
+
t12 = $[33];
|
|
28427
28497
|
}
|
|
28428
|
-
let
|
|
28429
|
-
if ($[
|
|
28430
|
-
|
|
28431
|
-
$[
|
|
28498
|
+
let t13;
|
|
28499
|
+
if ($[34] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
28500
|
+
t13 = /* @__PURE__ */ jsxRuntime.jsx(LanguageToggle, {});
|
|
28501
|
+
$[34] = t13;
|
|
28432
28502
|
} else {
|
|
28433
|
-
|
|
28503
|
+
t13 = $[34];
|
|
28434
28504
|
}
|
|
28435
|
-
let
|
|
28436
|
-
if ($[
|
|
28437
|
-
|
|
28505
|
+
let t14;
|
|
28506
|
+
if ($[35] !== user) {
|
|
28507
|
+
t14 = user && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-4 py-2 mb-2", children: [
|
|
28438
28508
|
user.displayName && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body1", color: "secondary", children: user.displayName }),
|
|
28439
28509
|
user.email && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", color: "secondary", children: user.email })
|
|
28440
28510
|
] });
|
|
28441
|
-
$[
|
|
28442
|
-
$[
|
|
28511
|
+
$[35] = user;
|
|
28512
|
+
$[36] = t14;
|
|
28443
28513
|
} else {
|
|
28444
|
-
|
|
28514
|
+
t14 = $[36];
|
|
28445
28515
|
}
|
|
28446
|
-
let
|
|
28447
|
-
if ($[
|
|
28448
|
-
|
|
28516
|
+
let t15;
|
|
28517
|
+
if ($[37] !== authController || $[38] !== dropDownActions || $[39] !== navigate || $[40] !== t) {
|
|
28518
|
+
t15 = !dropDownActions && /* @__PURE__ */ jsxRuntime.jsxs(ui.MenuItem, { onClick: async () => {
|
|
28449
28519
|
await authController.signOut();
|
|
28450
28520
|
navigate("/");
|
|
28451
28521
|
}, children: [
|
|
28452
28522
|
/* @__PURE__ */ jsxRuntime.jsx(ui.LogoutIcon, {}),
|
|
28453
28523
|
t("log_out")
|
|
28454
28524
|
] });
|
|
28455
|
-
$[
|
|
28456
|
-
$[
|
|
28457
|
-
$[
|
|
28458
|
-
$[
|
|
28459
|
-
$[
|
|
28525
|
+
$[37] = authController;
|
|
28526
|
+
$[38] = dropDownActions;
|
|
28527
|
+
$[39] = navigate;
|
|
28528
|
+
$[40] = t;
|
|
28529
|
+
$[41] = t15;
|
|
28460
28530
|
} else {
|
|
28461
|
-
|
|
28531
|
+
t15 = $[41];
|
|
28462
28532
|
}
|
|
28463
|
-
let
|
|
28464
|
-
if ($[
|
|
28465
|
-
|
|
28466
|
-
|
|
28533
|
+
let t16;
|
|
28534
|
+
if ($[42] !== avatarComponent || $[43] !== dropDownActions || $[44] !== t14 || $[45] !== t15) {
|
|
28535
|
+
t16 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Menu, { trigger: avatarComponent, children: [
|
|
28536
|
+
t14,
|
|
28467
28537
|
dropDownActions,
|
|
28468
|
-
|
|
28538
|
+
t15
|
|
28469
28539
|
] });
|
|
28470
|
-
$[
|
|
28471
|
-
$[
|
|
28472
|
-
$[
|
|
28473
|
-
$[
|
|
28474
|
-
$[
|
|
28540
|
+
$[42] = avatarComponent;
|
|
28541
|
+
$[43] = dropDownActions;
|
|
28542
|
+
$[44] = t14;
|
|
28543
|
+
$[45] = t15;
|
|
28544
|
+
$[46] = t16;
|
|
28475
28545
|
} else {
|
|
28476
|
-
|
|
28546
|
+
t16 = $[46];
|
|
28477
28547
|
}
|
|
28478
|
-
let
|
|
28479
|
-
if ($[
|
|
28480
|
-
|
|
28548
|
+
let t17;
|
|
28549
|
+
if ($[47] !== startAdornment || $[48] !== style || $[49] !== t11 || $[50] !== t12 || $[51] !== t16 || $[52] !== t5 || $[53] !== t6 || $[54] !== t7 || $[55] !== t8 || $[56] !== t9) {
|
|
28550
|
+
t17 = /* @__PURE__ */ jsxRuntime.jsxs("div", { style, className: t5, children: [
|
|
28481
28551
|
t6,
|
|
28482
28552
|
t7,
|
|
28483
28553
|
t8,
|
|
28484
|
-
startAdornment,
|
|
28485
28554
|
t9,
|
|
28555
|
+
startAdornment,
|
|
28486
28556
|
t10,
|
|
28487
28557
|
t11,
|
|
28488
28558
|
t12,
|
|
28489
|
-
|
|
28559
|
+
t13,
|
|
28560
|
+
t16
|
|
28490
28561
|
] });
|
|
28491
|
-
$[
|
|
28492
|
-
$[
|
|
28493
|
-
$[
|
|
28494
|
-
$[
|
|
28495
|
-
$[
|
|
28496
|
-
$[
|
|
28497
|
-
$[
|
|
28498
|
-
$[
|
|
28499
|
-
$[
|
|
28500
|
-
$[
|
|
28562
|
+
$[47] = startAdornment;
|
|
28563
|
+
$[48] = style;
|
|
28564
|
+
$[49] = t11;
|
|
28565
|
+
$[50] = t12;
|
|
28566
|
+
$[51] = t16;
|
|
28567
|
+
$[52] = t5;
|
|
28568
|
+
$[53] = t6;
|
|
28569
|
+
$[54] = t7;
|
|
28570
|
+
$[55] = t8;
|
|
28571
|
+
$[56] = t9;
|
|
28572
|
+
$[57] = t17;
|
|
28501
28573
|
} else {
|
|
28502
|
-
|
|
28574
|
+
t17 = $[57];
|
|
28503
28575
|
}
|
|
28504
|
-
return
|
|
28576
|
+
return t17;
|
|
28505
28577
|
};
|
|
28506
|
-
function _temp$
|
|
28578
|
+
function _temp$g(breadcrumb, index) {
|
|
28507
28579
|
return /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
|
|
28508
28580
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", color: "secondary", children: "/" }),
|
|
28509
28581
|
/* @__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
28582
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", children: breadcrumb.title }),
|
|
28511
|
-
|
|
28583
|
+
/* @__PURE__ */ jsxRuntime.jsx(CollectionCountBadge, { count: breadcrumb.count })
|
|
28512
28584
|
] }) }, index)
|
|
28513
28585
|
] }, breadcrumb.url + "_" + index);
|
|
28514
28586
|
}
|
|
28587
|
+
function _temp2$6(breadcrumb_0) {
|
|
28588
|
+
return breadcrumb_0.title;
|
|
28589
|
+
}
|
|
28515
28590
|
const buildIdsMap = (value) => value && Array.isArray(value) && value.length > 0 ? value.map((v, index) => {
|
|
28516
28591
|
if (!v) return {};
|
|
28517
28592
|
return {
|
|
@@ -28948,7 +29023,7 @@
|
|
|
28948
29023
|
} else {
|
|
28949
29024
|
const searchResult = iconsSearch.search(value);
|
|
28950
29025
|
const limited = searchResult.slice(0, 50);
|
|
28951
|
-
setKeys(limited.map(_temp$
|
|
29026
|
+
setKeys(limited.map(_temp$f));
|
|
28952
29027
|
}
|
|
28953
29028
|
}, UPDATE_SEARCH_INDEX_WAIT_MS);
|
|
28954
29029
|
$[0] = t3;
|
|
@@ -29040,7 +29115,7 @@
|
|
|
29040
29115
|
}
|
|
29041
29116
|
return t11;
|
|
29042
29117
|
}
|
|
29043
|
-
function _temp$
|
|
29118
|
+
function _temp$f(e) {
|
|
29044
29119
|
return e.item.key;
|
|
29045
29120
|
}
|
|
29046
29121
|
function FieldCaption(t0) {
|
|
@@ -29499,7 +29574,7 @@
|
|
|
29499
29574
|
i18n
|
|
29500
29575
|
} = useTranslation();
|
|
29501
29576
|
const plugins = React.useContext(CustomizationControllerContext)?.plugins;
|
|
29502
|
-
const runsProPlugin = plugins?.some(_temp$
|
|
29577
|
+
const runsProPlugin = plugins?.some(_temp$e) ?? false;
|
|
29503
29578
|
const [dismissed, setDismissed] = React.useState(_temp2$5);
|
|
29504
29579
|
const [dismissedForGood, setDismissedForGood] = React.useState(_temp3$4);
|
|
29505
29580
|
const content = licenseStatus ? buildBannerContent(licenseStatus, t, i18n?.language, runsProPlugin) : null;
|
|
@@ -29589,7 +29664,7 @@
|
|
|
29589
29664
|
function _temp2$5() {
|
|
29590
29665
|
return readDismissed(sessionDismissals);
|
|
29591
29666
|
}
|
|
29592
|
-
function _temp$
|
|
29667
|
+
function _temp$e(plugin) {
|
|
29593
29668
|
return PRO_PLUGIN_KEYS.includes(plugin.key);
|
|
29594
29669
|
}
|
|
29595
29670
|
function buildBannerContent(status, t, language, runsProPlugin) {
|
|
@@ -29729,64 +29804,32 @@
|
|
|
29729
29804
|
}
|
|
29730
29805
|
}
|
|
29731
29806
|
function useReferenceDialog(referenceDialogProps) {
|
|
29732
|
-
const $ = reactCompilerRuntime.c(9);
|
|
29733
29807
|
const navigation = useNavigationController();
|
|
29734
29808
|
const sideDialogsController = useSideDialogsController();
|
|
29735
|
-
|
|
29736
|
-
|
|
29737
|
-
|
|
29738
|
-
if (referenceDialogProps.path)
|
|
29739
|
-
|
|
29740
|
-
|
|
29741
|
-
|
|
29742
|
-
}
|
|
29743
|
-
|
|
29744
|
-
|
|
29809
|
+
const open = React.useCallback(() => {
|
|
29810
|
+
if (referenceDialogProps.path) {
|
|
29811
|
+
let usedCollection = referenceDialogProps.collection;
|
|
29812
|
+
if (!usedCollection) usedCollection = navigation.getCollection(referenceDialogProps.path);
|
|
29813
|
+
if (!usedCollection) throw Error("Not able to resolve the collection in useReferenceDialog. Make sure a collection is registered in path " + referenceDialogProps.path);
|
|
29814
|
+
sideDialogsController.open({
|
|
29815
|
+
key: `reference_${referenceDialogProps.path}`,
|
|
29816
|
+
component: /* @__PURE__ */ jsxRuntime.jsx(ReferenceSelectionTable, { collection: usedCollection, ...referenceDialogProps }),
|
|
29817
|
+
width: "90vw",
|
|
29818
|
+
onClose: () => {
|
|
29819
|
+
referenceDialogProps.onClose?.();
|
|
29745
29820
|
}
|
|
29746
|
-
|
|
29747
|
-
|
|
29748
|
-
|
|
29749
|
-
|
|
29750
|
-
|
|
29751
|
-
|
|
29752
|
-
|
|
29753
|
-
|
|
29754
|
-
|
|
29755
|
-
|
|
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;
|
|
29821
|
+
});
|
|
29822
|
+
} else {
|
|
29823
|
+
throw Error("useReferenceDialog: You are trying to open a reference dialog, but have not declared the `path`");
|
|
29824
|
+
}
|
|
29825
|
+
}, [navigation, referenceDialogProps, sideDialogsController]);
|
|
29826
|
+
const close = React.useCallback(() => {
|
|
29827
|
+
sideDialogsController.close(`reference_${referenceDialogProps.path}`);
|
|
29828
|
+
}, [sideDialogsController, referenceDialogProps.path]);
|
|
29829
|
+
return {
|
|
29830
|
+
open,
|
|
29831
|
+
close
|
|
29832
|
+
};
|
|
29790
29833
|
}
|
|
29791
29834
|
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
29835
|
function useBrowserTitleAndIcon(name, logo) {
|
|
@@ -30445,7 +30488,7 @@
|
|
|
30445
30488
|
t0 = $[0];
|
|
30446
30489
|
}
|
|
30447
30490
|
const configCache = React.useRef(t0);
|
|
30448
|
-
const getCollectionFromStorage = _temp$
|
|
30491
|
+
const getCollectionFromStorage = _temp$d;
|
|
30449
30492
|
let t1;
|
|
30450
30493
|
if ($[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
30451
30494
|
t1 = (path) => {
|
|
@@ -30568,7 +30611,7 @@
|
|
|
30568
30611
|
}
|
|
30569
30612
|
return t11;
|
|
30570
30613
|
}
|
|
30571
|
-
function _temp$
|
|
30614
|
+
function _temp$d(storageKey) {
|
|
30572
30615
|
return getLocalStorageJSON(storageKey, {});
|
|
30573
30616
|
}
|
|
30574
30617
|
function useBuildModeController() {
|
|
@@ -30731,78 +30774,32 @@
|
|
|
30731
30774
|
}
|
|
30732
30775
|
return t7;
|
|
30733
30776
|
}
|
|
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);
|
|
30777
|
+
function useLeavePageConfirmation(when) {
|
|
30778
|
+
const $ = reactCompilerRuntime.c(3);
|
|
30779
|
+
let t0;
|
|
30780
|
+
let t1;
|
|
30781
|
+
if ($[0] !== when) {
|
|
30782
|
+
t0 = () => {
|
|
30783
|
+
if (!when) {
|
|
30784
|
+
return;
|
|
30782
30785
|
}
|
|
30783
|
-
|
|
30784
|
-
}, [when]);
|
|
30785
|
-
React.useEffect(() => {
|
|
30786
|
-
if (when) {
|
|
30786
|
+
const handleBeforeUnload = _temp$c;
|
|
30787
30787
|
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);
|
|
30788
|
+
return () => window.removeEventListener("beforeunload", handleBeforeUnload);
|
|
30799
30789
|
};
|
|
30800
|
-
|
|
30801
|
-
|
|
30802
|
-
|
|
30803
|
-
|
|
30804
|
-
|
|
30805
|
-
|
|
30790
|
+
t1 = [when];
|
|
30791
|
+
$[0] = when;
|
|
30792
|
+
$[1] = t0;
|
|
30793
|
+
$[2] = t1;
|
|
30794
|
+
} else {
|
|
30795
|
+
t0 = $[1];
|
|
30796
|
+
t1 = $[2];
|
|
30797
|
+
}
|
|
30798
|
+
React.useEffect(t0, t1);
|
|
30799
|
+
}
|
|
30800
|
+
function _temp$c(e) {
|
|
30801
|
+
e.preventDefault();
|
|
30802
|
+
e.returnValue = "";
|
|
30806
30803
|
}
|
|
30807
30804
|
function UnsavedChangesDialog(t0) {
|
|
30808
30805
|
const $ = reactCompilerRuntime.c(30);
|
|
@@ -31122,17 +31119,14 @@
|
|
|
31122
31119
|
const widthRef = React.useRef(panel?.width);
|
|
31123
31120
|
const width = widthRef.current;
|
|
31124
31121
|
const sideDialogsController = useSideDialogsController();
|
|
31125
|
-
|
|
31126
|
-
handleOk: handleNavigationOk,
|
|
31127
|
-
handleCancel: handleNavigationCancel
|
|
31128
|
-
} = useNavigationUnsavedChangesDialog(blocked && !drawerCloseRequested, () => setBlocked(false));
|
|
31122
|
+
useLeavePageConfirmation(blocked && !drawerCloseRequested);
|
|
31129
31123
|
React.useEffect(() => {
|
|
31130
31124
|
if (panel) widthRef.current = panel.width;
|
|
31131
31125
|
}, [panel]);
|
|
31132
31126
|
const handleDrawerCloseOk = () => {
|
|
31133
31127
|
setBlocked(false);
|
|
31134
31128
|
setDrawerCloseRequested(false);
|
|
31135
|
-
sideDialogsController.close();
|
|
31129
|
+
sideDialogsController.close(panel?.key);
|
|
31136
31130
|
panel?.onClose?.();
|
|
31137
31131
|
};
|
|
31138
31132
|
const handleDrawerCloseCancel = () => {
|
|
@@ -31142,7 +31136,7 @@
|
|
|
31142
31136
|
if (blocked && !force) {
|
|
31143
31137
|
setDrawerCloseRequested(true);
|
|
31144
31138
|
} else {
|
|
31145
|
-
sideDialogsController.close();
|
|
31139
|
+
sideDialogsController.close(panel?.key);
|
|
31146
31140
|
panel?.onClose?.();
|
|
31147
31141
|
}
|
|
31148
31142
|
};
|
|
@@ -31175,7 +31169,7 @@
|
|
|
31175
31169
|
width
|
|
31176
31170
|
} })
|
|
31177
31171
|
] }),
|
|
31178
|
-
/* @__PURE__ */ jsxRuntime.jsx(UnsavedChangesDialog, { open: drawerCloseRequested, handleOk:
|
|
31172
|
+
/* @__PURE__ */ jsxRuntime.jsx(UnsavedChangesDialog, { open: drawerCloseRequested, handleOk: handleDrawerCloseOk, handleCancel: handleDrawerCloseCancel, body: blockedNavigationMessage })
|
|
31179
31173
|
] });
|
|
31180
31174
|
}
|
|
31181
31175
|
function EntityEditViewFormActions({
|
|
@@ -31641,6 +31635,9 @@
|
|
|
31641
31635
|
}, [selectedTabProp]);
|
|
31642
31636
|
const subcollections = (collection.subcollections ?? []).filter((c) => !c.hideFromNavigation);
|
|
31643
31637
|
const subcollectionsCount = subcollections?.length ?? 0;
|
|
31638
|
+
const [subcollectionCounts, setSubcollectionCounts] = React.useState({});
|
|
31639
|
+
const selectedSubcollection = subcollections.find((subcollection) => (subcollection.id ?? subcollection.path) === selectedTab);
|
|
31640
|
+
const selectedSubcollectionDataSource = useDataSource();
|
|
31644
31641
|
const customViews = collection.entityViews ?? [];
|
|
31645
31642
|
const customViewsCount = customViews?.length ?? 0;
|
|
31646
31643
|
const includeJsonView = collection.includeJsonView === void 0 ? true : collection.includeJsonView;
|
|
@@ -31714,15 +31711,18 @@
|
|
|
31714
31711
|
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
31712
|
"hidden": selectedTab !== JSON_TAB_VALUE
|
|
31716
31713
|
}), 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(
|
|
31714
|
+
const subCollectionsViews = subcollections && subcollections.map((subcollection_0) => {
|
|
31715
|
+
const subcollectionId = subcollection_0.id ?? subcollection_0.path;
|
|
31716
|
+
const newFullPath = usedEntity ? `${path}/${usedEntity?.id}/${removeInitialAndTrailingSlashes(subcollection_0.path)}` : void 0;
|
|
31720
31717
|
const newFullIdPath = fullIdPath && usedEntity ? `${fullIdPath}/${encodeEntityId(usedEntity.id)}/${removeInitialAndTrailingSlashes(subcollectionId)}` : void 0;
|
|
31721
|
-
const newPathSegments = buildSubcollectionPathSegments(pathSegments, usedEntity?.id,
|
|
31718
|
+
const newPathSegments = buildSubcollectionPathSegments(pathSegments, usedEntity?.id, subcollection_0.path);
|
|
31722
31719
|
if (selectedTab !== subcollectionId) return null;
|
|
31723
31720
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1 h-full overflow-auto w-full", role: "tabpanel", children: [
|
|
31724
31721
|
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, ...
|
|
31722
|
+
!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 : {
|
|
31723
|
+
...counts,
|
|
31724
|
+
[subcollectionId]: count
|
|
31725
|
+
}) }) : /* @__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
31726
|
] }, `subcol_${subcollectionId}`);
|
|
31727
31727
|
}).filter(Boolean);
|
|
31728
31728
|
const onSideTabClick = (value_0) => {
|
|
@@ -31758,7 +31758,7 @@
|
|
|
31758
31758
|
onSaved?.(res);
|
|
31759
31759
|
formProps?.onSaved?.(res);
|
|
31760
31760
|
}, Builder: selectedSecondaryForm?.Builder });
|
|
31761
|
-
const subcollectionTabs = subcollections && subcollections.filter((sub) => !groupedViews.includes(sub.id ?? sub.path)).map((
|
|
31761
|
+
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
31762
|
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
31763
|
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
31764
|
const viewGroupMenus = collection.viewGroups?.map((group) => {
|
|
@@ -31767,13 +31767,17 @@
|
|
|
31767
31767
|
group.name,
|
|
31768
31768
|
/* @__PURE__ */ jsxRuntime.jsx(ui.ExpandMoreIcon, { className: "ml-1 -mr-1", size: "small" })
|
|
31769
31769
|
] }), children: group.views.map((viewId) => {
|
|
31770
|
-
const
|
|
31770
|
+
const subcollection_2 = subcollections.find((s) => (s.id ?? s.path) === viewId);
|
|
31771
31771
|
const customView_0 = resolvedEntityViews.find((v) => v.key === viewId);
|
|
31772
|
-
const name =
|
|
31772
|
+
const name = subcollection_2?.name ?? customView_0?.name ?? viewId;
|
|
31773
31773
|
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
31774
|
}) }, `view_group_${group.name}`);
|
|
31775
31775
|
});
|
|
31776
31776
|
const shouldShowTopBar = Boolean(barActions) || hasAdditionalViews;
|
|
31777
|
+
const subcollectionTitle = layout === "side_panel" && selectedSubcollection && usedEntity ? (() => {
|
|
31778
|
+
const subcollectionId_0 = selectedSubcollection.id ?? selectedSubcollection.path;
|
|
31779
|
+
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) });
|
|
31780
|
+
})() : null;
|
|
31777
31781
|
let result = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex flex-col h-full w-full bg-white dark:bg-surface-900", children: [
|
|
31778
31782
|
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
31783
|
barActions?.({
|
|
@@ -31782,6 +31786,7 @@
|
|
|
31782
31786
|
values: formContext?.values ?? usedEntity?.values ?? {},
|
|
31783
31787
|
status
|
|
31784
31788
|
}),
|
|
31789
|
+
subcollectionTitle,
|
|
31785
31790
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-grow" }),
|
|
31786
31791
|
pluginActionsTop,
|
|
31787
31792
|
globalLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "self-center", children: /* @__PURE__ */ jsxRuntime.jsx(ui.CircularProgress, { size: "small" }) }),
|
|
@@ -32033,7 +32038,7 @@
|
|
|
32033
32038
|
};
|
|
32034
32039
|
};
|
|
32035
32040
|
function useBuildSideDialogsController() {
|
|
32036
|
-
const $ = reactCompilerRuntime.c(
|
|
32041
|
+
const $ = reactCompilerRuntime.c(23);
|
|
32037
32042
|
const location = reactRouterDom.useLocation();
|
|
32038
32043
|
const navigate = reactRouterDom.useNavigate();
|
|
32039
32044
|
let t0;
|
|
@@ -32056,46 +32061,78 @@
|
|
|
32056
32061
|
const routesCount = React.useRef(0);
|
|
32057
32062
|
let t2;
|
|
32058
32063
|
if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
32059
|
-
t2 =
|
|
32060
|
-
sidePanelsRef.current = newPanels;
|
|
32061
|
-
setSidePanels(newPanels);
|
|
32062
|
-
};
|
|
32064
|
+
t2 = {};
|
|
32063
32065
|
$[2] = t2;
|
|
32064
32066
|
} else {
|
|
32065
32067
|
t2 = $[2];
|
|
32066
32068
|
}
|
|
32067
|
-
const
|
|
32069
|
+
const entryKeysOfPanelsWithoutUrl = React.useRef(t2);
|
|
32068
32070
|
let t3;
|
|
32069
|
-
if ($[3]
|
|
32070
|
-
t3 = () => {
|
|
32071
|
+
if ($[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
32072
|
+
t3 = (newPanels) => {
|
|
32073
|
+
sidePanelsRef.current = newPanels;
|
|
32074
|
+
setSidePanels(newPanels);
|
|
32075
|
+
};
|
|
32076
|
+
$[3] = t3;
|
|
32077
|
+
} else {
|
|
32078
|
+
t3 = $[3];
|
|
32079
|
+
}
|
|
32080
|
+
const updateSidePanels = t3;
|
|
32081
|
+
let t4;
|
|
32082
|
+
if ($[4] !== location.key || $[5] !== location.state) {
|
|
32083
|
+
t4 = () => {
|
|
32071
32084
|
const state = location.state;
|
|
32072
32085
|
const panelKeys = state?.panels ?? [];
|
|
32073
|
-
const
|
|
32086
|
+
const panelsInHistory = panelKeys.map((key) => routesStore.current[key]).filter(_temp$a);
|
|
32087
|
+
const keptPanels = [];
|
|
32088
|
+
let matched = 0;
|
|
32089
|
+
for (const panel of sidePanelsRef.current) {
|
|
32090
|
+
if (panelsInHistory[matched]?.key === panel.key) {
|
|
32091
|
+
keptPanels.push(panel);
|
|
32092
|
+
matched++;
|
|
32093
|
+
} else {
|
|
32094
|
+
if (!panel.urlPath && (keptPanels.length > 0 || entryKeysOfPanelsWithoutUrl.current[panel.key] === location.key)) {
|
|
32095
|
+
keptPanels.push(panel);
|
|
32096
|
+
} else {
|
|
32097
|
+
break;
|
|
32098
|
+
}
|
|
32099
|
+
}
|
|
32100
|
+
}
|
|
32101
|
+
const newPanels_0 = [...keptPanels, ...panelsInHistory.slice(matched)];
|
|
32074
32102
|
if (!equal(sidePanelsRef.current.map(_temp2$4), newPanels_0.map(_temp3$3))) {
|
|
32075
32103
|
updateSidePanels(newPanels_0);
|
|
32076
32104
|
}
|
|
32077
32105
|
};
|
|
32078
|
-
$[
|
|
32079
|
-
$[
|
|
32080
|
-
} else {
|
|
32081
|
-
t3 = $[4];
|
|
32082
|
-
}
|
|
32083
|
-
let t4;
|
|
32084
|
-
if ($[5] !== location) {
|
|
32085
|
-
t4 = [location];
|
|
32086
|
-
$[5] = location;
|
|
32106
|
+
$[4] = location.key;
|
|
32107
|
+
$[5] = location.state;
|
|
32087
32108
|
$[6] = t4;
|
|
32088
32109
|
} else {
|
|
32089
32110
|
t4 = $[6];
|
|
32090
32111
|
}
|
|
32091
|
-
React.useEffect(t3, t4);
|
|
32092
32112
|
let t5;
|
|
32093
|
-
if ($[7] !== location
|
|
32094
|
-
t5 =
|
|
32113
|
+
if ($[7] !== location) {
|
|
32114
|
+
t5 = [location];
|
|
32115
|
+
$[7] = location;
|
|
32116
|
+
$[8] = t5;
|
|
32117
|
+
} else {
|
|
32118
|
+
t5 = $[8];
|
|
32119
|
+
}
|
|
32120
|
+
React.useEffect(t4, t5);
|
|
32121
|
+
let t6;
|
|
32122
|
+
if ($[9] !== location || $[10] !== navigate) {
|
|
32123
|
+
t6 = (key_0) => {
|
|
32095
32124
|
const currentPanels = sidePanelsRef.current;
|
|
32096
32125
|
if (currentPanels.length === 0) {
|
|
32097
32126
|
return;
|
|
32098
32127
|
}
|
|
32128
|
+
const index = key_0 !== void 0 ? currentPanels.findLastIndex((p_2) => p_2.key === key_0) : -1;
|
|
32129
|
+
if (index !== -1 && index < currentPanels.length - 1 && !currentPanels[index].urlPath) {
|
|
32130
|
+
updateSidePanels(currentPanels.filter((_, i) => i !== index));
|
|
32131
|
+
if (routesCount.current > 0) {
|
|
32132
|
+
routesCount.current = routesCount.current - 1;
|
|
32133
|
+
}
|
|
32134
|
+
return;
|
|
32135
|
+
}
|
|
32099
32136
|
const lastSidePanel = currentPanels[currentPanels.length - 1];
|
|
32100
32137
|
const updatedPanels = [...currentPanels.slice(0, -1)];
|
|
32101
32138
|
updateSidePanels(updatedPanels);
|
|
@@ -32117,28 +32154,31 @@
|
|
|
32117
32154
|
}
|
|
32118
32155
|
}
|
|
32119
32156
|
};
|
|
32120
|
-
$[
|
|
32121
|
-
$[
|
|
32122
|
-
$[
|
|
32157
|
+
$[9] = location;
|
|
32158
|
+
$[10] = navigate;
|
|
32159
|
+
$[11] = t6;
|
|
32123
32160
|
} else {
|
|
32124
|
-
|
|
32161
|
+
t6 = $[11];
|
|
32125
32162
|
}
|
|
32126
|
-
const close =
|
|
32127
|
-
let
|
|
32128
|
-
if ($[
|
|
32129
|
-
|
|
32163
|
+
const close = t6;
|
|
32164
|
+
let t7;
|
|
32165
|
+
if ($[12] !== location || $[13] !== navigate) {
|
|
32166
|
+
t7 = (panelProps) => {
|
|
32130
32167
|
const newPanels_1 = Array.isArray(panelProps) ? panelProps : [panelProps];
|
|
32131
|
-
newPanels_1.forEach((
|
|
32132
|
-
routesStore.current[
|
|
32168
|
+
newPanels_1.forEach((panel_0) => {
|
|
32169
|
+
routesStore.current[panel_0.key] = panel_0;
|
|
32170
|
+
if (!panel_0.urlPath) {
|
|
32171
|
+
entryKeysOfPanelsWithoutUrl.current[panel_0.key] = location.key;
|
|
32172
|
+
}
|
|
32133
32173
|
});
|
|
32134
32174
|
routesCount.current = routesCount.current + newPanels_1.length;
|
|
32135
32175
|
const baseLocation_0 = location.state?.base_location ?? location;
|
|
32136
32176
|
const currentPanels_0 = sidePanelsRef.current;
|
|
32137
32177
|
const updatedPanels_0 = [...currentPanels_0, ...newPanels_1];
|
|
32138
32178
|
updateSidePanels(updatedPanels_0);
|
|
32139
|
-
newPanels_1.forEach((
|
|
32140
|
-
if (
|
|
32141
|
-
navigate(
|
|
32179
|
+
newPanels_1.forEach((panel_1) => {
|
|
32180
|
+
if (panel_1.urlPath) {
|
|
32181
|
+
navigate(panel_1.urlPath, {
|
|
32142
32182
|
state: {
|
|
32143
32183
|
base_location: baseLocation_0,
|
|
32144
32184
|
panels: updatedPanels_0.map(_temp5$1)
|
|
@@ -32147,27 +32187,30 @@
|
|
|
32147
32187
|
}
|
|
32148
32188
|
});
|
|
32149
32189
|
};
|
|
32150
|
-
$[
|
|
32151
|
-
$[
|
|
32152
|
-
$[
|
|
32190
|
+
$[12] = location;
|
|
32191
|
+
$[13] = navigate;
|
|
32192
|
+
$[14] = t7;
|
|
32153
32193
|
} else {
|
|
32154
|
-
|
|
32194
|
+
t7 = $[14];
|
|
32155
32195
|
}
|
|
32156
|
-
const open =
|
|
32157
|
-
let
|
|
32158
|
-
if ($[
|
|
32159
|
-
|
|
32196
|
+
const open = t7;
|
|
32197
|
+
let t8;
|
|
32198
|
+
if ($[15] !== location || $[16] !== navigate) {
|
|
32199
|
+
t8 = (panelProps_0) => {
|
|
32160
32200
|
const newPanels_2 = Array.isArray(panelProps_0) ? panelProps_0 : [panelProps_0];
|
|
32161
|
-
newPanels_2.forEach((
|
|
32162
|
-
routesStore.current[
|
|
32201
|
+
newPanels_2.forEach((panel_2) => {
|
|
32202
|
+
routesStore.current[panel_2.key] = panel_2;
|
|
32203
|
+
if (!panel_2.urlPath) {
|
|
32204
|
+
entryKeysOfPanelsWithoutUrl.current[panel_2.key] = location.key;
|
|
32205
|
+
}
|
|
32163
32206
|
});
|
|
32164
32207
|
const baseLocation_1 = location.state?.base_location ?? location;
|
|
32165
32208
|
const currentPanels_1 = sidePanelsRef.current;
|
|
32166
32209
|
const updatedPanels_1 = [...currentPanels_1.slice(0, -newPanels_2.length), ...newPanels_2];
|
|
32167
32210
|
updateSidePanels(updatedPanels_1);
|
|
32168
|
-
newPanels_2.forEach((
|
|
32169
|
-
if (
|
|
32170
|
-
navigate(
|
|
32211
|
+
newPanels_2.forEach((panel_3) => {
|
|
32212
|
+
if (panel_3.urlPath) {
|
|
32213
|
+
navigate(panel_3.urlPath, {
|
|
32171
32214
|
replace: true,
|
|
32172
32215
|
state: {
|
|
32173
32216
|
base_location: baseLocation_1,
|
|
@@ -32177,41 +32220,41 @@
|
|
|
32177
32220
|
}
|
|
32178
32221
|
});
|
|
32179
32222
|
};
|
|
32180
|
-
$[
|
|
32181
|
-
$[
|
|
32182
|
-
$[
|
|
32223
|
+
$[15] = location;
|
|
32224
|
+
$[16] = navigate;
|
|
32225
|
+
$[17] = t8;
|
|
32183
32226
|
} else {
|
|
32184
|
-
|
|
32227
|
+
t8 = $[17];
|
|
32185
32228
|
}
|
|
32186
|
-
const replace =
|
|
32187
|
-
let
|
|
32188
|
-
if ($[
|
|
32189
|
-
|
|
32229
|
+
const replace = t8;
|
|
32230
|
+
let t9;
|
|
32231
|
+
if ($[18] !== close || $[19] !== open || $[20] !== replace || $[21] !== sidePanels) {
|
|
32232
|
+
t9 = {
|
|
32190
32233
|
sidePanels,
|
|
32191
32234
|
setSidePanels: updateSidePanels,
|
|
32192
32235
|
close,
|
|
32193
32236
|
open,
|
|
32194
32237
|
replace
|
|
32195
32238
|
};
|
|
32196
|
-
$[
|
|
32197
|
-
$[
|
|
32198
|
-
$[
|
|
32199
|
-
$[
|
|
32200
|
-
$[
|
|
32239
|
+
$[18] = close;
|
|
32240
|
+
$[19] = open;
|
|
32241
|
+
$[20] = replace;
|
|
32242
|
+
$[21] = sidePanels;
|
|
32243
|
+
$[22] = t9;
|
|
32201
32244
|
} else {
|
|
32202
|
-
|
|
32245
|
+
t9 = $[22];
|
|
32203
32246
|
}
|
|
32204
|
-
return
|
|
32247
|
+
return t9;
|
|
32205
32248
|
}
|
|
32206
|
-
function _temp6$1(
|
|
32249
|
+
function _temp6$1(p_5) {
|
|
32250
|
+
return p_5.key;
|
|
32251
|
+
}
|
|
32252
|
+
function _temp5$1(p_4) {
|
|
32207
32253
|
return p_4.key;
|
|
32208
32254
|
}
|
|
32209
|
-
function
|
|
32255
|
+
function _temp4$2(p_3) {
|
|
32210
32256
|
return p_3.key;
|
|
32211
32257
|
}
|
|
32212
|
-
function _temp4$2(p_2) {
|
|
32213
|
-
return p_2.key;
|
|
32214
|
-
}
|
|
32215
32258
|
function _temp3$3(p_1) {
|
|
32216
32259
|
return p_1.key;
|
|
32217
32260
|
}
|
|
@@ -32627,7 +32670,7 @@
|
|
|
32627
32670
|
children,
|
|
32628
32671
|
entityLinkBuilder,
|
|
32629
32672
|
userConfigPersistence,
|
|
32630
|
-
dateTimeFormat,
|
|
32673
|
+
dateTimeFormat: dateTimeFormat2,
|
|
32631
32674
|
locale,
|
|
32632
32675
|
authController,
|
|
32633
32676
|
storageSource,
|
|
@@ -32676,7 +32719,7 @@
|
|
|
32676
32719
|
const pluginsLoading = plugins?.some((p_0) => p_0.loading) ?? false;
|
|
32677
32720
|
const loading = authController.initialLoading || navigationController.loading || pluginsLoading;
|
|
32678
32721
|
const customizationController = {
|
|
32679
|
-
dateTimeFormat,
|
|
32722
|
+
dateTimeFormat: dateTimeFormat2,
|
|
32680
32723
|
locale,
|
|
32681
32724
|
entityLinkBuilder,
|
|
32682
32725
|
plugins,
|
|
@@ -45069,6 +45112,7 @@ ul[data-type="taskList"] li[data-checked="true"] > div > p {
|
|
|
45069
45112
|
exports2.jsonStringifyReplacer = jsonStringifyReplacer;
|
|
45070
45113
|
exports2.lazyEager = lazyEager;
|
|
45071
45114
|
exports2.loadDateFnsLocale = loadDateFnsLocale;
|
|
45115
|
+
exports2.localeToLanguageTag = localeToLanguageTag;
|
|
45072
45116
|
exports2.makePropertiesEditable = makePropertiesEditable;
|
|
45073
45117
|
exports2.mergeCallbacks = mergeCallbacks;
|
|
45074
45118
|
exports2.mergeCollection = mergeCollection;
|
|
@@ -45106,6 +45150,7 @@ ul[data-type="taskList"] li[data-checked="true"] > div > p {
|
|
|
45106
45150
|
exports2.resolveEntityAction = resolveEntityAction;
|
|
45107
45151
|
exports2.resolveEntityView = resolveEntityView;
|
|
45108
45152
|
exports2.resolveEnumValues = resolveEnumValues;
|
|
45153
|
+
exports2.resolveLocale = resolveLocale;
|
|
45109
45154
|
exports2.resolveNavigationFrom = resolveNavigationFrom;
|
|
45110
45155
|
exports2.resolvePermissions = resolvePermissions;
|
|
45111
45156
|
exports2.resolveProperties = resolveProperties;
|