@carlonicora/nextjs-jsonapi 6.32.1 → 6.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BlockNoteEditor-XIEMUQCO.mjs → BlockNoteEditor-KRNC6EAX.mjs} +2 -2
- package/dist/{BlockNoteEditor-RD3JNEV5.js → BlockNoteEditor-VXSVY6OY.js} +15 -15
- package/dist/{BlockNoteEditor-RD3JNEV5.js.map → BlockNoteEditor-VXSVY6OY.js.map} +1 -1
- package/dist/billing/index.js +378 -378
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-F25BVBEH.mjs → chunk-4SXHRANW.mjs} +50 -30
- package/dist/chunk-4SXHRANW.mjs.map +1 -0
- package/dist/{chunk-SQNFYMYE.js → chunk-GPVLFNLB.js} +523 -503
- package/dist/chunk-GPVLFNLB.js.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/email-automations/index.js +78 -78
- package/dist/email-automations/index.mjs +1 -1
- package/dist/features/analytics/index.js +107 -107
- package/dist/features/analytics/index.mjs +1 -1
- package/dist/features/blog/index.js +93 -93
- package/dist/features/blog/index.mjs +1 -1
- package/dist/features/help/index.js +31 -31
- package/dist/features/help/index.mjs +1 -1
- package/dist/features/tokenusage/index.js +102 -102
- package/dist/features/tokenusage/index.mjs +1 -1
- package/dist/shadcnui/ui/calendar.d.ts +1 -1
- package/dist/shadcnui/ui/calendar.d.ts.map +1 -1
- package/messages/en.json +11 -0
- package/messages/it.json +11 -0
- package/package.json +1 -1
- package/src/shadcnui/ui/__tests__/calendar.spec.tsx +222 -0
- package/src/shadcnui/ui/calendar.tsx +28 -1
- package/dist/chunk-F25BVBEH.mjs.map +0 -1
- package/dist/chunk-SQNFYMYE.js.map +0 -1
- /package/dist/{BlockNoteEditor-XIEMUQCO.mjs.map → BlockNoteEditor-KRNC6EAX.mjs.map} +0 -0
|
@@ -727,6 +727,31 @@ function useDir() {
|
|
|
727
727
|
}
|
|
728
728
|
_chunk7QVYU63Ejs.__name.call(void 0, useDir, "useDir");
|
|
729
729
|
|
|
730
|
+
// src/shadcnui/ui/use-ui-text.ts
|
|
731
|
+
|
|
732
|
+
function interpolate(text, values) {
|
|
733
|
+
if (!values) return text;
|
|
734
|
+
return text.replace(/\{(\w+)\}/g, (match, name) => name in values ? String(values[name]) : match);
|
|
735
|
+
}
|
|
736
|
+
_chunk7QVYU63Ejs.__name.call(void 0, interpolate, "interpolate");
|
|
737
|
+
function useUiText() {
|
|
738
|
+
const t = _chunkNP3AFULUjs.useI18nTranslations.call(void 0, );
|
|
739
|
+
return _react.useCallback.call(void 0,
|
|
740
|
+
(key, fallback, values) => {
|
|
741
|
+
if (typeof t.has === "function" && !t.has(key)) return interpolate(fallback, values);
|
|
742
|
+
try {
|
|
743
|
+
const text = t(key, values);
|
|
744
|
+
if (!text || text === key || text.endsWith(`.${key}`)) return interpolate(fallback, values);
|
|
745
|
+
return text;
|
|
746
|
+
} catch (e2) {
|
|
747
|
+
return interpolate(fallback, values);
|
|
748
|
+
}
|
|
749
|
+
},
|
|
750
|
+
[t]
|
|
751
|
+
);
|
|
752
|
+
}
|
|
753
|
+
_chunk7QVYU63Ejs.__name.call(void 0, useUiText, "useUiText");
|
|
754
|
+
|
|
730
755
|
// src/shadcnui/ui/calendar.tsx
|
|
731
756
|
|
|
732
757
|
function Calendar({
|
|
@@ -737,10 +762,31 @@ function Calendar({
|
|
|
737
762
|
buttonVariant = "ghost",
|
|
738
763
|
formatters,
|
|
739
764
|
components,
|
|
765
|
+
labels,
|
|
740
766
|
...props
|
|
741
767
|
}) {
|
|
742
768
|
const defaultClassNames = _reactdaypicker.getDefaultClassNames.call(void 0, );
|
|
743
769
|
const dir = useDir();
|
|
770
|
+
const uiText = useUiText();
|
|
771
|
+
const translatedLabels = {
|
|
772
|
+
labelPrevious: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => uiText("ui.calendar.previous_month", "Go to the Previous Month"), "labelPrevious"),
|
|
773
|
+
labelNext: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => uiText("ui.calendar.next_month", "Go to the Next Month"), "labelNext"),
|
|
774
|
+
labelNav: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => uiText("ui.calendar.navigation", ""), "labelNav"),
|
|
775
|
+
labelMonthDropdown: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => uiText("ui.calendar.choose_month", "Choose the Month"), "labelMonthDropdown"),
|
|
776
|
+
labelYearDropdown: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => uiText("ui.calendar.choose_year", "Choose the Year"), "labelYearDropdown"),
|
|
777
|
+
labelDayButton: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (date, modifiers, options, dateLib) => {
|
|
778
|
+
let label = (_nullishCoalesce(dateLib, () => ( new (0, _reactdaypicker.DateLib)(options)))).format(date, "PPPP");
|
|
779
|
+
if (modifiers.today) label = uiText("ui.calendar.today", "Today, {date}", { date: label });
|
|
780
|
+
if (modifiers.selected) label = uiText("ui.calendar.selected", "{date}, selected", { date: label });
|
|
781
|
+
return label;
|
|
782
|
+
}, "labelDayButton"),
|
|
783
|
+
labelGridcell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (date, modifiers, options, dateLib) => {
|
|
784
|
+
const label = (_nullishCoalesce(dateLib, () => ( new (0, _reactdaypicker.DateLib)(options)))).format(date, "PPPP");
|
|
785
|
+
return _optionalChain([modifiers, 'optionalAccess', _2 => _2.today]) ? uiText("ui.calendar.today", "Today, {date}", { date: label }) : label;
|
|
786
|
+
}, "labelGridcell"),
|
|
787
|
+
labelWeekNumber: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (weekNumber) => uiText("ui.calendar.week_number", "Week {number}", { number: weekNumber }), "labelWeekNumber"),
|
|
788
|
+
labelWeekNumberHeader: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => uiText("ui.calendar.week_number_header", "Week Number"), "labelWeekNumberHeader")
|
|
789
|
+
};
|
|
744
790
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
745
791
|
_reactdaypicker.DayPicker,
|
|
746
792
|
{
|
|
@@ -751,8 +797,9 @@ function Calendar({
|
|
|
751
797
|
className
|
|
752
798
|
),
|
|
753
799
|
captionLayout,
|
|
800
|
+
labels: { ...translatedLabels, ...labels },
|
|
754
801
|
formatters: {
|
|
755
|
-
formatMonthDropdown: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (date) => date.toLocaleString(_nullishCoalesce(_optionalChain([props, 'access',
|
|
802
|
+
formatMonthDropdown: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (date) => date.toLocaleString(_nullishCoalesce(_optionalChain([props, 'access', _3 => _3.locale, 'optionalAccess', _4 => _4.code]), () => ( "default")), { month: "short" }), "formatMonthDropdown"),
|
|
756
803
|
...formatters
|
|
757
804
|
},
|
|
758
805
|
classNames: {
|
|
@@ -848,7 +895,7 @@ function CalendarDayButton({ className, day, modifiers, ...props }) {
|
|
|
848
895
|
const defaultClassNames = _reactdaypicker.getDefaultClassNames.call(void 0, );
|
|
849
896
|
const ref = React2.useRef(null);
|
|
850
897
|
React2.useEffect(() => {
|
|
851
|
-
if (modifiers.focused) _optionalChain([ref, 'access',
|
|
898
|
+
if (modifiers.focused) _optionalChain([ref, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.focus, 'call', _7 => _7()]);
|
|
852
899
|
}, [modifiers.focused]);
|
|
853
900
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
854
901
|
Button,
|
|
@@ -945,33 +992,6 @@ _chunk7QVYU63Ejs.__name.call(void 0, CardFooter, "CardFooter");
|
|
|
945
992
|
var _emblacarouselreact = require('embla-carousel-react'); var _emblacarouselreact2 = _interopRequireDefault(_emblacarouselreact);
|
|
946
993
|
|
|
947
994
|
|
|
948
|
-
// src/shadcnui/ui/use-ui-text.ts
|
|
949
|
-
|
|
950
|
-
function interpolate(text, values) {
|
|
951
|
-
if (!values) return text;
|
|
952
|
-
return text.replace(/\{(\w+)\}/g, (match, name) => name in values ? String(values[name]) : match);
|
|
953
|
-
}
|
|
954
|
-
_chunk7QVYU63Ejs.__name.call(void 0, interpolate, "interpolate");
|
|
955
|
-
function useUiText() {
|
|
956
|
-
const t = _chunkNP3AFULUjs.useI18nTranslations.call(void 0, );
|
|
957
|
-
return _react.useCallback.call(void 0,
|
|
958
|
-
(key, fallback, values) => {
|
|
959
|
-
if (typeof t.has === "function" && !t.has(key)) return interpolate(fallback, values);
|
|
960
|
-
try {
|
|
961
|
-
const text = t(key, values);
|
|
962
|
-
if (!text || text === key || text.endsWith(`.${key}`)) return interpolate(fallback, values);
|
|
963
|
-
return text;
|
|
964
|
-
} catch (e2) {
|
|
965
|
-
return interpolate(fallback, values);
|
|
966
|
-
}
|
|
967
|
-
},
|
|
968
|
-
[t]
|
|
969
|
-
);
|
|
970
|
-
}
|
|
971
|
-
_chunk7QVYU63Ejs.__name.call(void 0, useUiText, "useUiText");
|
|
972
|
-
|
|
973
|
-
// src/shadcnui/ui/carousel.tsx
|
|
974
|
-
|
|
975
995
|
var CarouselContext = React3.createContext(null);
|
|
976
996
|
function useCarousel() {
|
|
977
997
|
const context = React3.useContext(CarouselContext);
|
|
@@ -995,7 +1015,7 @@ function Carousel({
|
|
|
995
1015
|
{
|
|
996
1016
|
...opts,
|
|
997
1017
|
axis: orientation === "horizontal" ? "x" : "y",
|
|
998
|
-
direction: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
1018
|
+
direction: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _8 => _8.direction]), () => ( dir))
|
|
999
1019
|
},
|
|
1000
1020
|
plugins
|
|
1001
1021
|
);
|
|
@@ -1007,10 +1027,10 @@ function Carousel({
|
|
|
1007
1027
|
setCanScrollNext(api2.canScrollNext());
|
|
1008
1028
|
}, []);
|
|
1009
1029
|
const scrollPrev = React3.useCallback(() => {
|
|
1010
|
-
_optionalChain([api, 'optionalAccess',
|
|
1030
|
+
_optionalChain([api, 'optionalAccess', _9 => _9.scrollPrev, 'call', _10 => _10()]);
|
|
1011
1031
|
}, [api]);
|
|
1012
1032
|
const scrollNext = React3.useCallback(() => {
|
|
1013
|
-
_optionalChain([api, 'optionalAccess',
|
|
1033
|
+
_optionalChain([api, 'optionalAccess', _11 => _11.scrollNext, 'call', _12 => _12()]);
|
|
1014
1034
|
}, [api]);
|
|
1015
1035
|
const handleKeyDown = React3.useCallback(
|
|
1016
1036
|
(event) => {
|
|
@@ -1035,7 +1055,7 @@ function Carousel({
|
|
|
1035
1055
|
api.on("reInit", onSelect);
|
|
1036
1056
|
api.on("select", onSelect);
|
|
1037
1057
|
return () => {
|
|
1038
|
-
_optionalChain([api, 'optionalAccess',
|
|
1058
|
+
_optionalChain([api, 'optionalAccess', _13 => _13.off, 'call', _14 => _14("select", onSelect)]);
|
|
1039
1059
|
};
|
|
1040
1060
|
}, [api, onSelect]);
|
|
1041
1061
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1045,7 +1065,7 @@ function Carousel({
|
|
|
1045
1065
|
carouselRef,
|
|
1046
1066
|
api,
|
|
1047
1067
|
opts,
|
|
1048
|
-
orientation: orientation || (_optionalChain([opts, 'optionalAccess',
|
|
1068
|
+
orientation: orientation || (_optionalChain([opts, 'optionalAccess', _15 => _15.axis]) === "y" ? "vertical" : "horizontal"),
|
|
1049
1069
|
scrollPrev,
|
|
1050
1070
|
scrollNext,
|
|
1051
1071
|
canScrollPrev,
|
|
@@ -1209,7 +1229,7 @@ var ChartStyle = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ id, con
|
|
|
1209
1229
|
([theme, prefix]) => `
|
|
1210
1230
|
${prefix} [data-chart=${id}] {
|
|
1211
1231
|
${colorConfig.map(([key, itemConfig]) => {
|
|
1212
|
-
const color = _optionalChain([itemConfig, 'access',
|
|
1232
|
+
const color = _optionalChain([itemConfig, 'access', _16 => _16.theme, 'optionalAccess', _17 => _17[theme]]) || itemConfig.color;
|
|
1213
1233
|
return color ? ` --color-${key}: ${color};` : null;
|
|
1214
1234
|
}).join("\n")}
|
|
1215
1235
|
}
|
|
@@ -1239,13 +1259,13 @@ function ChartTooltipContent({
|
|
|
1239
1259
|
}) {
|
|
1240
1260
|
const { config } = useChart();
|
|
1241
1261
|
const tooltipLabel = React4.useMemo(() => {
|
|
1242
|
-
if (hideLabel || !_optionalChain([payload, 'optionalAccess',
|
|
1262
|
+
if (hideLabel || !_optionalChain([payload, 'optionalAccess', _18 => _18.length])) {
|
|
1243
1263
|
return null;
|
|
1244
1264
|
}
|
|
1245
1265
|
const [item] = payload;
|
|
1246
|
-
const key = `${labelKey || _optionalChain([item, 'optionalAccess',
|
|
1266
|
+
const key = `${labelKey || _optionalChain([item, 'optionalAccess', _19 => _19.dataKey]) || _optionalChain([item, 'optionalAccess', _20 => _20.name]) || "value"}`;
|
|
1247
1267
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
1248
|
-
const value = !labelKey && typeof label === "string" ? _optionalChain([config, 'access',
|
|
1268
|
+
const value = !labelKey && typeof label === "string" ? _optionalChain([config, 'access', _21 => _21[label], 'optionalAccess', _22 => _22.label]) || label : _optionalChain([itemConfig, 'optionalAccess', _23 => _23.label]);
|
|
1249
1269
|
if (labelFormatter) {
|
|
1250
1270
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkNPGX2GJDjs.cn.call(void 0, "font-medium", labelClassName), children: labelFormatter(value, payload) });
|
|
1251
1271
|
}
|
|
@@ -1254,7 +1274,7 @@ function ChartTooltipContent({
|
|
|
1254
1274
|
}
|
|
1255
1275
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkNPGX2GJDjs.cn.call(void 0, "font-medium", labelClassName), children: value });
|
|
1256
1276
|
}, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);
|
|
1257
|
-
if (!active || !_optionalChain([payload, 'optionalAccess',
|
|
1277
|
+
if (!active || !_optionalChain([payload, 'optionalAccess', _24 => _24.length])) {
|
|
1258
1278
|
return null;
|
|
1259
1279
|
}
|
|
1260
1280
|
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
@@ -1270,7 +1290,7 @@ function ChartTooltipContent({
|
|
|
1270
1290
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "grid gap-1.5", children: payload.filter((item) => item.type !== "none").filter((item) => !hideZeroValues || Number(item.value) !== 0).map((item, index) => {
|
|
1271
1291
|
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
1272
1292
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
1273
|
-
const indicatorColor = color || _optionalChain([item, 'access',
|
|
1293
|
+
const indicatorColor = color || _optionalChain([item, 'access', _25 => _25.payload, 'optionalAccess', _26 => _26.fill]) || item.color;
|
|
1274
1294
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1275
1295
|
"div",
|
|
1276
1296
|
{
|
|
@@ -1278,8 +1298,8 @@ function ChartTooltipContent({
|
|
|
1278
1298
|
"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
|
|
1279
1299
|
indicator === "dot" && "items-center"
|
|
1280
1300
|
),
|
|
1281
|
-
children: formatter && _optionalChain([item, 'optionalAccess',
|
|
1282
|
-
_optionalChain([itemConfig, 'optionalAccess',
|
|
1301
|
+
children: formatter && _optionalChain([item, 'optionalAccess', _27 => _27.value]) !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1302
|
+
_optionalChain([itemConfig, 'optionalAccess', _28 => _28.icon]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1283
1303
|
"div",
|
|
1284
1304
|
{
|
|
1285
1305
|
className: _chunkNPGX2GJDjs.cn.call(void 0, "shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
|
|
@@ -1308,7 +1328,7 @@ function ChartTooltipContent({
|
|
|
1308
1328
|
children: [
|
|
1309
1329
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-1.5", children: [
|
|
1310
1330
|
nestLabel ? tooltipLabel : null,
|
|
1311
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground", children: _optionalChain([itemConfig, 'optionalAccess',
|
|
1331
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground", children: _optionalChain([itemConfig, 'optionalAccess', _29 => _29.label]) || item.name })
|
|
1312
1332
|
] }),
|
|
1313
1333
|
item.value !== void 0 && item.value !== null && // Tested against undefined/null rather than truthiness:
|
|
1314
1334
|
// a value of exactly 0 is falsy, and the old guard
|
|
@@ -1336,7 +1356,7 @@ function ChartLegendContent({
|
|
|
1336
1356
|
nameKey
|
|
1337
1357
|
}) {
|
|
1338
1358
|
const { config } = useChart();
|
|
1339
|
-
if (!_optionalChain([payload, 'optionalAccess',
|
|
1359
|
+
if (!_optionalChain([payload, 'optionalAccess', _30 => _30.length])) {
|
|
1340
1360
|
return null;
|
|
1341
1361
|
}
|
|
1342
1362
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkNPGX2GJDjs.cn.call(void 0, "flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className), children: payload.filter((item) => item.type !== "none").map((item) => {
|
|
@@ -1347,7 +1367,7 @@ function ChartLegendContent({
|
|
|
1347
1367
|
{
|
|
1348
1368
|
className: _chunkNPGX2GJDjs.cn.call(void 0, "[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"),
|
|
1349
1369
|
children: [
|
|
1350
|
-
_optionalChain([itemConfig, 'optionalAccess',
|
|
1370
|
+
_optionalChain([itemConfig, 'optionalAccess', _31 => _31.icon]) && !hideIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, itemConfig.icon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1351
1371
|
"div",
|
|
1352
1372
|
{
|
|
1353
1373
|
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
@@ -1356,7 +1376,7 @@ function ChartLegendContent({
|
|
|
1356
1376
|
}
|
|
1357
1377
|
}
|
|
1358
1378
|
),
|
|
1359
|
-
_optionalChain([itemConfig, 'optionalAccess',
|
|
1379
|
+
_optionalChain([itemConfig, 'optionalAccess', _32 => _32.label])
|
|
1360
1380
|
]
|
|
1361
1381
|
},
|
|
1362
1382
|
item.value
|
|
@@ -1514,7 +1534,7 @@ function InputGroupAddon({
|
|
|
1514
1534
|
if (e.target.closest("button")) {
|
|
1515
1535
|
return;
|
|
1516
1536
|
}
|
|
1517
|
-
_optionalChain([e, 'access',
|
|
1537
|
+
_optionalChain([e, 'access', _33 => _33.currentTarget, 'access', _34 => _34.parentElement, 'optionalAccess', _35 => _35.querySelector, 'call', _36 => _36("input"), 'optionalAccess', _37 => _37.focus, 'call', _38 => _38()]);
|
|
1518
1538
|
},
|
|
1519
1539
|
...props
|
|
1520
1540
|
}
|
|
@@ -2900,14 +2920,14 @@ function FieldError({
|
|
|
2900
2920
|
if (children) {
|
|
2901
2921
|
return children;
|
|
2902
2922
|
}
|
|
2903
|
-
if (!_optionalChain([errors, 'optionalAccess',
|
|
2923
|
+
if (!_optionalChain([errors, 'optionalAccess', _39 => _39.length])) {
|
|
2904
2924
|
return null;
|
|
2905
2925
|
}
|
|
2906
|
-
const uniqueErrors = [...new Map(errors.map((error) => [_optionalChain([error, 'optionalAccess',
|
|
2907
|
-
if (_optionalChain([uniqueErrors, 'optionalAccess',
|
|
2908
|
-
return _optionalChain([uniqueErrors, 'access',
|
|
2926
|
+
const uniqueErrors = [...new Map(errors.map((error) => [_optionalChain([error, 'optionalAccess', _40 => _40.message]), error])).values()];
|
|
2927
|
+
if (_optionalChain([uniqueErrors, 'optionalAccess', _41 => _41.length]) == 1) {
|
|
2928
|
+
return _optionalChain([uniqueErrors, 'access', _42 => _42[0], 'optionalAccess', _43 => _43.message]);
|
|
2909
2929
|
}
|
|
2910
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ul", { className: "ms-4 flex list-disc flex-col gap-1", children: uniqueErrors.map((error, index) => _optionalChain([error, 'optionalAccess',
|
|
2930
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ul", { className: "ms-4 flex list-disc flex-col gap-1", children: uniqueErrors.map((error, index) => _optionalChain([error, 'optionalAccess', _44 => _44.message]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { children: error.message }, index)) });
|
|
2911
2931
|
}, [children, errors]);
|
|
2912
2932
|
if (!content) {
|
|
2913
2933
|
return null;
|
|
@@ -3017,7 +3037,7 @@ function InputOTPSlot({
|
|
|
3017
3037
|
...props
|
|
3018
3038
|
}) {
|
|
3019
3039
|
const inputOTPContext = React7.useContext(_inputotp.OTPInputContext);
|
|
3020
|
-
const { char, hasFakeCaret, isActive } = _nullishCoalesce(_optionalChain([inputOTPContext, 'optionalAccess',
|
|
3040
|
+
const { char, hasFakeCaret, isActive } = _nullishCoalesce(_optionalChain([inputOTPContext, 'optionalAccess', _45 => _45.slots, 'access', _46 => _46[index]]), () => ( {}));
|
|
3021
3041
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
3022
3042
|
"div",
|
|
3023
3043
|
{
|
|
@@ -4064,7 +4084,7 @@ function SidebarTrigger({
|
|
|
4064
4084
|
size: "icon-sm",
|
|
4065
4085
|
className: _chunkNPGX2GJDjs.cn.call(void 0, className),
|
|
4066
4086
|
onClick: (event) => {
|
|
4067
|
-
_optionalChain([onClick, 'optionalCall',
|
|
4087
|
+
_optionalChain([onClick, 'optionalCall', _47 => _47(event)]);
|
|
4068
4088
|
toggleSidebar();
|
|
4069
4089
|
},
|
|
4070
4090
|
...props,
|
|
@@ -4747,7 +4767,7 @@ function Tabs({
|
|
|
4747
4767
|
defaultValue,
|
|
4748
4768
|
onValueChange: (newValue, eventDetails) => {
|
|
4749
4769
|
setUncontrolledValue(newValue);
|
|
4750
|
-
_optionalChain([onValueChange, 'optionalCall',
|
|
4770
|
+
_optionalChain([onValueChange, 'optionalCall', _48 => _48(newValue, eventDetails)]);
|
|
4751
4771
|
},
|
|
4752
4772
|
...props
|
|
4753
4773
|
}
|
|
@@ -4894,14 +4914,14 @@ var coordinateGetter = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (eve
|
|
|
4894
4914
|
if (!active || !collisionRect) return;
|
|
4895
4915
|
const filteredContainers = [];
|
|
4896
4916
|
for (const entry of droppableContainers.getEnabled()) {
|
|
4897
|
-
if (!entry || _optionalChain([entry, 'optionalAccess',
|
|
4917
|
+
if (!entry || _optionalChain([entry, 'optionalAccess', _49 => _49.disabled])) return;
|
|
4898
4918
|
const rect = droppableRects.get(entry.id);
|
|
4899
4919
|
if (!rect) return;
|
|
4900
4920
|
const data = entry.data.current;
|
|
4901
4921
|
if (data) {
|
|
4902
4922
|
const { type, children } = data;
|
|
4903
|
-
if (type === "container" && _optionalChain([children, 'optionalAccess',
|
|
4904
|
-
if (_optionalChain([active, 'access',
|
|
4923
|
+
if (type === "container" && _optionalChain([children, 'optionalAccess', _50 => _50.length]) > 0) {
|
|
4924
|
+
if (_optionalChain([active, 'access', _51 => _51.data, 'access', _52 => _52.current, 'optionalAccess', _53 => _53.type]) !== "container") {
|
|
4905
4925
|
return;
|
|
4906
4926
|
}
|
|
4907
4927
|
}
|
|
@@ -4939,8 +4959,8 @@ var coordinateGetter = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (eve
|
|
|
4939
4959
|
const closestId = _core.getFirstCollision.call(void 0, collisions, "id");
|
|
4940
4960
|
if (closestId != null) {
|
|
4941
4961
|
const newDroppable = droppableContainers.get(closestId);
|
|
4942
|
-
const newNode = _optionalChain([newDroppable, 'optionalAccess',
|
|
4943
|
-
const newRect = _optionalChain([newDroppable, 'optionalAccess',
|
|
4962
|
+
const newNode = _optionalChain([newDroppable, 'optionalAccess', _54 => _54.node, 'access', _55 => _55.current]);
|
|
4963
|
+
const newRect = _optionalChain([newDroppable, 'optionalAccess', _56 => _56.rect, 'access', _57 => _57.current]);
|
|
4944
4964
|
if (newNode && newRect) {
|
|
4945
4965
|
if (newDroppable.id === "placeholder") {
|
|
4946
4966
|
return {
|
|
@@ -4948,7 +4968,7 @@ var coordinateGetter = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (eve
|
|
|
4948
4968
|
y: newRect.top + (newRect.height - collisionRect.height) / 2
|
|
4949
4969
|
};
|
|
4950
4970
|
}
|
|
4951
|
-
if (_optionalChain([newDroppable, 'access',
|
|
4971
|
+
if (_optionalChain([newDroppable, 'access', _58 => _58.data, 'access', _59 => _59.current, 'optionalAccess', _60 => _60.type]) === "container") {
|
|
4952
4972
|
return {
|
|
4953
4973
|
x: newRect.left + 20,
|
|
4954
4974
|
y: newRect.top + 74
|
|
@@ -5052,7 +5072,7 @@ function KanbanRoot(props) {
|
|
|
5052
5072
|
)
|
|
5053
5073
|
});
|
|
5054
5074
|
if (closestItem.length > 0) {
|
|
5055
|
-
overId = _nullishCoalesce(_optionalChain([closestItem, 'access',
|
|
5075
|
+
overId = _nullishCoalesce(_optionalChain([closestItem, 'access', _61 => _61[0], 'optionalAccess', _62 => _62.id]), () => ( overId));
|
|
5056
5076
|
}
|
|
5057
5077
|
}
|
|
5058
5078
|
}
|
|
@@ -5063,7 +5083,7 @@ function KanbanRoot(props) {
|
|
|
5063
5083
|
);
|
|
5064
5084
|
const onDragStart = React10.useCallback(
|
|
5065
5085
|
(event) => {
|
|
5066
|
-
_optionalChain([kanbanProps, 'access',
|
|
5086
|
+
_optionalChain([kanbanProps, 'access', _63 => _63.onDragStart, 'optionalCall', _64 => _64(event)]);
|
|
5067
5087
|
if (event.activatorEvent.defaultPrevented) return;
|
|
5068
5088
|
setActiveId(event.active.id);
|
|
5069
5089
|
},
|
|
@@ -5071,7 +5091,7 @@ function KanbanRoot(props) {
|
|
|
5071
5091
|
);
|
|
5072
5092
|
const onDragOver = React10.useCallback(
|
|
5073
5093
|
(event) => {
|
|
5074
|
-
_optionalChain([kanbanProps, 'access',
|
|
5094
|
+
_optionalChain([kanbanProps, 'access', _65 => _65.onDragOver, 'optionalCall', _66 => _66(event)]);
|
|
5075
5095
|
if (event.activatorEvent.defaultPrevented) return;
|
|
5076
5096
|
const { active, over } = event;
|
|
5077
5097
|
if (!over) return;
|
|
@@ -5086,7 +5106,7 @@ function KanbanRoot(props) {
|
|
|
5086
5106
|
if (activeIndex !== overIndex) {
|
|
5087
5107
|
const newColumns = { ...value };
|
|
5088
5108
|
newColumns[activeColumn] = _sortable.arrayMove.call(void 0, items, activeIndex, overIndex);
|
|
5089
|
-
_optionalChain([onValueChange, 'optionalCall',
|
|
5109
|
+
_optionalChain([onValueChange, 'optionalCall', _67 => _67(newColumns)]);
|
|
5090
5110
|
}
|
|
5091
5111
|
} else {
|
|
5092
5112
|
const activeItems = value[activeColumn];
|
|
@@ -5101,7 +5121,7 @@ function KanbanRoot(props) {
|
|
|
5101
5121
|
[activeColumn]: activeItems.filter((item) => getItemValue(item) !== active.id),
|
|
5102
5122
|
[overColumn]: [...overItems, activeItem]
|
|
5103
5123
|
};
|
|
5104
|
-
_optionalChain([onValueChange, 'optionalCall',
|
|
5124
|
+
_optionalChain([onValueChange, 'optionalCall', _68 => _68(updatedItems)]);
|
|
5105
5125
|
hasMovedRef.current = true;
|
|
5106
5126
|
}
|
|
5107
5127
|
},
|
|
@@ -5109,7 +5129,7 @@ function KanbanRoot(props) {
|
|
|
5109
5129
|
);
|
|
5110
5130
|
const onDragEnd = React10.useCallback(
|
|
5111
5131
|
(event) => {
|
|
5112
|
-
_optionalChain([kanbanProps, 'access',
|
|
5132
|
+
_optionalChain([kanbanProps, 'access', _69 => _69.onDragEnd, 'optionalCall', _70 => _70(event)]);
|
|
5113
5133
|
if (event.activatorEvent.defaultPrevented) return;
|
|
5114
5134
|
const { active, over } = event;
|
|
5115
5135
|
if (!over) {
|
|
@@ -5132,7 +5152,7 @@ function KanbanRoot(props) {
|
|
|
5132
5152
|
if (onMove) {
|
|
5133
5153
|
onMove({ ...event, activeIndex, overIndex });
|
|
5134
5154
|
} else {
|
|
5135
|
-
_optionalChain([onValueChange, 'optionalCall',
|
|
5155
|
+
_optionalChain([onValueChange, 'optionalCall', _71 => _71(newColumns)]);
|
|
5136
5156
|
}
|
|
5137
5157
|
}
|
|
5138
5158
|
} else {
|
|
@@ -5160,7 +5180,7 @@ function KanbanRoot(props) {
|
|
|
5160
5180
|
overIndex
|
|
5161
5181
|
});
|
|
5162
5182
|
} else {
|
|
5163
|
-
_optionalChain([onValueChange, 'optionalCall',
|
|
5183
|
+
_optionalChain([onValueChange, 'optionalCall', _72 => _72(newColumns)]);
|
|
5164
5184
|
}
|
|
5165
5185
|
}
|
|
5166
5186
|
}
|
|
@@ -5172,7 +5192,7 @@ function KanbanRoot(props) {
|
|
|
5172
5192
|
);
|
|
5173
5193
|
const onDragCancel = React10.useCallback(
|
|
5174
5194
|
(event) => {
|
|
5175
|
-
_optionalChain([kanbanProps, 'access',
|
|
5195
|
+
_optionalChain([kanbanProps, 'access', _73 => _73.onDragCancel, 'optionalCall', _74 => _74(event)]);
|
|
5176
5196
|
if (event.activatorEvent.defaultPrevented) return;
|
|
5177
5197
|
setActiveId(null);
|
|
5178
5198
|
hasMovedRef.current = false;
|
|
@@ -5191,7 +5211,7 @@ function KanbanRoot(props) {
|
|
|
5191
5211
|
})();
|
|
5192
5212
|
const total = isColumn ? Object.keys(value).length : (() => {
|
|
5193
5213
|
const column = getColumn(active.id);
|
|
5194
|
-
return column ? _nullishCoalesce(_optionalChain([value, 'access',
|
|
5214
|
+
return column ? _nullishCoalesce(_optionalChain([value, 'access', _75 => _75[column], 'optionalAccess', _76 => _76.length]), () => ( 0)) : 0;
|
|
5195
5215
|
})();
|
|
5196
5216
|
return `Picked up ${itemType} at position ${position} of ${total}`;
|
|
5197
5217
|
},
|
|
@@ -5206,7 +5226,7 @@ function KanbanRoot(props) {
|
|
|
5206
5226
|
})();
|
|
5207
5227
|
const total = isColumn ? Object.keys(value).length : (() => {
|
|
5208
5228
|
const column = getColumn(over.id);
|
|
5209
|
-
return column ? _nullishCoalesce(_optionalChain([value, 'access',
|
|
5229
|
+
return column ? _nullishCoalesce(_optionalChain([value, 'access', _77 => _77[column], 'optionalAccess', _78 => _78.length]), () => ( 0)) : 0;
|
|
5210
5230
|
})();
|
|
5211
5231
|
const overColumn = getColumn(over.id);
|
|
5212
5232
|
const activeColumn = getColumn(active.id);
|
|
@@ -5229,7 +5249,7 @@ function KanbanRoot(props) {
|
|
|
5229
5249
|
})();
|
|
5230
5250
|
const total = isColumn ? Object.keys(value).length : (() => {
|
|
5231
5251
|
const column = getColumn(over.id);
|
|
5232
|
-
return column ? _nullishCoalesce(_optionalChain([value, 'access',
|
|
5252
|
+
return column ? _nullishCoalesce(_optionalChain([value, 'access', _79 => _79[column], 'optionalAccess', _80 => _80.length]), () => ( 0)) : 0;
|
|
5233
5253
|
})();
|
|
5234
5254
|
const overColumn = getColumn(over.id);
|
|
5235
5255
|
const activeColumn = getColumn(active.id);
|
|
@@ -5575,7 +5595,7 @@ function KanbanOverlay(props) {
|
|
|
5575
5595
|
const context = useKanbanContext(OVERLAY_NAME);
|
|
5576
5596
|
const [mounted, setMounted] = React10.useState(false);
|
|
5577
5597
|
React10.useLayoutEffect(() => setMounted(true), []);
|
|
5578
|
-
const container = _nullishCoalesce(containerProp, () => ( (mounted ? _optionalChain([globalThis, 'access',
|
|
5598
|
+
const container = _nullishCoalesce(containerProp, () => ( (mounted ? _optionalChain([globalThis, 'access', _81 => _81.document, 'optionalAccess', _82 => _82.body]) : null)));
|
|
5579
5599
|
if (!container) return null;
|
|
5580
5600
|
const variant = context.activeId && context.activeId in context.items ? "column" : "item";
|
|
5581
5601
|
return ReactDOM.createPortal(
|
|
@@ -5751,7 +5771,7 @@ var MultiSelect = React12.forwardRef(
|
|
|
5751
5771
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center", children: [
|
|
5752
5772
|
selectedValues.slice(0, maxCount).map((value2) => {
|
|
5753
5773
|
const option = options.find((o) => o.value === value2);
|
|
5754
|
-
const IconComponent = _optionalChain([option, 'optionalAccess',
|
|
5774
|
+
const IconComponent = _optionalChain([option, 'optionalAccess', _83 => _83.icon]);
|
|
5755
5775
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
5756
5776
|
Badge,
|
|
5757
5777
|
{
|
|
@@ -5759,7 +5779,7 @@ var MultiSelect = React12.forwardRef(
|
|
|
5759
5779
|
style: { animationDuration: `${animation}s` },
|
|
5760
5780
|
children: [
|
|
5761
5781
|
IconComponent && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, IconComponent, { className: "me-2 h-4 w-4" }),
|
|
5762
|
-
_nullishCoalesce(_optionalChain([option, 'optionalAccess',
|
|
5782
|
+
_nullishCoalesce(_optionalChain([option, 'optionalAccess', _84 => _84.selectedLabel]), () => ( _optionalChain([option, 'optionalAccess', _85 => _85.label]))),
|
|
5763
5783
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5764
5784
|
_lucidereact.XCircle,
|
|
5765
5785
|
{
|
|
@@ -6076,7 +6096,7 @@ var MultipleSelector = React13.forwardRef(
|
|
|
6076
6096
|
() => ({
|
|
6077
6097
|
selectedValue: [...selected],
|
|
6078
6098
|
input: inputRef.current,
|
|
6079
|
-
focus: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => _optionalChain([inputRef, 'optionalAccess',
|
|
6099
|
+
focus: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => _optionalChain([inputRef, 'optionalAccess', _86 => _86.current, 'optionalAccess', _87 => _87.focus, 'call', _88 => _88()]), "focus"),
|
|
6080
6100
|
reset: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => setSelected([]), "reset")
|
|
6081
6101
|
}),
|
|
6082
6102
|
[selected]
|
|
@@ -6091,7 +6111,7 @@ var MultipleSelector = React13.forwardRef(
|
|
|
6091
6111
|
(option) => {
|
|
6092
6112
|
const newOptions = selected.filter((s) => s.value !== option.value);
|
|
6093
6113
|
setSelected(newOptions);
|
|
6094
|
-
_optionalChain([onChange, 'optionalCall',
|
|
6114
|
+
_optionalChain([onChange, 'optionalCall', _89 => _89(newOptions)]);
|
|
6095
6115
|
},
|
|
6096
6116
|
[onChange, selected]
|
|
6097
6117
|
);
|
|
@@ -6143,7 +6163,7 @@ var MultipleSelector = React13.forwardRef(
|
|
|
6143
6163
|
}, [arrayDefaultOptions, arrayOptions, groupBy, onSearch, options]);
|
|
6144
6164
|
_react.useEffect.call(void 0, () => {
|
|
6145
6165
|
const doSearchSync = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
6146
|
-
const res = _optionalChain([onSearchSync, 'optionalCall',
|
|
6166
|
+
const res = _optionalChain([onSearchSync, 'optionalCall', _90 => _90(debouncedSearchTerm)]);
|
|
6147
6167
|
setOptions(transToGroupOption(res || [], groupBy));
|
|
6148
6168
|
}, "doSearchSync");
|
|
6149
6169
|
const exec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
@@ -6190,7 +6210,7 @@ var MultipleSelector = React13.forwardRef(
|
|
|
6190
6210
|
_react.useEffect.call(void 0, () => {
|
|
6191
6211
|
const doSearch = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
6192
6212
|
setIsLoading(true);
|
|
6193
|
-
const res = await _optionalChain([onSearch, 'optionalCall',
|
|
6213
|
+
const res = await _optionalChain([onSearch, 'optionalCall', _91 => _91(debouncedSearchTerm)]);
|
|
6194
6214
|
setOptions(transToGroupOption(res || [], groupBy));
|
|
6195
6215
|
setIsLoading(false);
|
|
6196
6216
|
}, "doSearch");
|
|
@@ -6222,14 +6242,14 @@ var MultipleSelector = React13.forwardRef(
|
|
|
6222
6242
|
},
|
|
6223
6243
|
onSelect: () => {
|
|
6224
6244
|
if (selected.length >= maxSelected) {
|
|
6225
|
-
_optionalChain([onMaxSelected, 'optionalCall',
|
|
6245
|
+
_optionalChain([onMaxSelected, 'optionalCall', _92 => _92(selected.length)]);
|
|
6226
6246
|
return;
|
|
6227
6247
|
}
|
|
6228
6248
|
const value2 = inputValue.trim();
|
|
6229
6249
|
setInputValue("");
|
|
6230
6250
|
const newOptions = [...selected, { value: value2, label: value2 }];
|
|
6231
6251
|
setSelected(newOptions);
|
|
6232
|
-
_optionalChain([onChange, 'optionalCall',
|
|
6252
|
+
_optionalChain([onChange, 'optionalCall', _93 => _93(newOptions)]);
|
|
6233
6253
|
},
|
|
6234
6254
|
children: formatCreateLabel ? formatCreateLabel(inputValue) : uiText("ui.labels.create_option", 'Create "{value}"', { value: inputValue })
|
|
6235
6255
|
}
|
|
@@ -6251,7 +6271,7 @@ var MultipleSelector = React13.forwardRef(
|
|
|
6251
6271
|
}, [creatable, emptyIndicator, onSearch, options]);
|
|
6252
6272
|
const selectables = React13.useMemo(() => removePickedOption(options, selected), [options, selected]);
|
|
6253
6273
|
const commandFilter = React13.useCallback(() => {
|
|
6254
|
-
const customFilter = _optionalChain([commandProps, 'optionalAccess',
|
|
6274
|
+
const customFilter = _optionalChain([commandProps, 'optionalAccess', _94 => _94.filter]);
|
|
6255
6275
|
if (customFilter) {
|
|
6256
6276
|
return (value2, search, keywords) => customFilter(rowText(value2, keywords), search, []);
|
|
6257
6277
|
}
|
|
@@ -6261,7 +6281,7 @@ var MultipleSelector = React13.forwardRef(
|
|
|
6261
6281
|
};
|
|
6262
6282
|
}
|
|
6263
6283
|
return commandFilterByKeywords;
|
|
6264
|
-
}, [creatable, _optionalChain([commandProps, 'optionalAccess',
|
|
6284
|
+
}, [creatable, _optionalChain([commandProps, 'optionalAccess', _95 => _95.filter])]);
|
|
6265
6285
|
const displayedBadges = maxDisplayCount ? selected.slice(0, maxDisplayCount) : selected;
|
|
6266
6286
|
const hiddenCount = maxDisplayCount ? Math.max(0, selected.length - maxDisplayCount) : 0;
|
|
6267
6287
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -6271,10 +6291,10 @@ var MultipleSelector = React13.forwardRef(
|
|
|
6271
6291
|
...commandProps,
|
|
6272
6292
|
onKeyDown: (e) => {
|
|
6273
6293
|
handleKeyDown(e);
|
|
6274
|
-
_optionalChain([commandProps, 'optionalAccess',
|
|
6294
|
+
_optionalChain([commandProps, 'optionalAccess', _96 => _96.onKeyDown, 'optionalCall', _97 => _97(e)]);
|
|
6275
6295
|
},
|
|
6276
|
-
className: _chunkNPGX2GJDjs.cn.call(void 0, "h-auto overflow-visible bg-transparent!", _optionalChain([commandProps, 'optionalAccess',
|
|
6277
|
-
shouldFilter: _optionalChain([commandProps, 'optionalAccess',
|
|
6296
|
+
className: _chunkNPGX2GJDjs.cn.call(void 0, "h-auto overflow-visible bg-transparent!", _optionalChain([commandProps, 'optionalAccess', _98 => _98.className])),
|
|
6297
|
+
shouldFilter: _optionalChain([commandProps, 'optionalAccess', _99 => _99.shouldFilter]) !== void 0 ? commandProps.shouldFilter : !onSearch,
|
|
6278
6298
|
filter: commandFilter(),
|
|
6279
6299
|
children: [
|
|
6280
6300
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -6290,7 +6310,7 @@ var MultipleSelector = React13.forwardRef(
|
|
|
6290
6310
|
),
|
|
6291
6311
|
onClick: () => {
|
|
6292
6312
|
if (disabled) return;
|
|
6293
|
-
_optionalChain([inputRef, 'optionalAccess',
|
|
6313
|
+
_optionalChain([inputRef, 'optionalAccess', _100 => _100.current, 'optionalAccess', _101 => _101.focus, 'call', _102 => _102()]);
|
|
6294
6314
|
},
|
|
6295
6315
|
children: [
|
|
6296
6316
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative flex flex-1 flex-wrap gap-1", children: [
|
|
@@ -6344,17 +6364,17 @@ var MultipleSelector = React13.forwardRef(
|
|
|
6344
6364
|
disabled,
|
|
6345
6365
|
onValueChange: (value2) => {
|
|
6346
6366
|
setInputValue(value2);
|
|
6347
|
-
_optionalChain([inputProps, 'optionalAccess',
|
|
6367
|
+
_optionalChain([inputProps, 'optionalAccess', _103 => _103.onValueChange, 'optionalCall', _104 => _104(value2)]);
|
|
6348
6368
|
},
|
|
6349
6369
|
onBlur: (event) => {
|
|
6350
6370
|
if (!onScrollbar) {
|
|
6351
6371
|
setOpen(false);
|
|
6352
6372
|
}
|
|
6353
|
-
_optionalChain([inputProps, 'optionalAccess',
|
|
6373
|
+
_optionalChain([inputProps, 'optionalAccess', _105 => _105.onBlur, 'optionalCall', _106 => _106(event)]);
|
|
6354
6374
|
},
|
|
6355
6375
|
onFocus: (event) => {
|
|
6356
6376
|
setOpen(true);
|
|
6357
|
-
_optionalChain([inputProps, 'optionalAccess',
|
|
6377
|
+
_optionalChain([inputProps, 'optionalAccess', _107 => _107.onFocus, 'optionalCall', _108 => _108(event)]);
|
|
6358
6378
|
},
|
|
6359
6379
|
placeholder: hidePlaceholderWhenSelected && selected.length !== 0 ? "" : placeholder,
|
|
6360
6380
|
className: _chunkNPGX2GJDjs.cn.call(void 0,
|
|
@@ -6363,7 +6383,7 @@ var MultipleSelector = React13.forwardRef(
|
|
|
6363
6383
|
"w-full": hidePlaceholderWhenSelected,
|
|
6364
6384
|
"ms-1": selected.length !== 0
|
|
6365
6385
|
},
|
|
6366
|
-
_optionalChain([inputProps, 'optionalAccess',
|
|
6386
|
+
_optionalChain([inputProps, 'optionalAccess', _109 => _109.className])
|
|
6367
6387
|
)
|
|
6368
6388
|
}
|
|
6369
6389
|
)
|
|
@@ -6375,7 +6395,7 @@ var MultipleSelector = React13.forwardRef(
|
|
|
6375
6395
|
type: "button",
|
|
6376
6396
|
onClick: () => {
|
|
6377
6397
|
setSelected(selected.filter((s) => s.fixed));
|
|
6378
|
-
_optionalChain([onChange, 'optionalCall',
|
|
6398
|
+
_optionalChain([onChange, 'optionalCall', _110 => _110(selected.filter((s) => s.fixed))]);
|
|
6379
6399
|
},
|
|
6380
6400
|
className: _chunkNPGX2GJDjs.cn.call(void 0,
|
|
6381
6401
|
"size-5",
|
|
@@ -6400,7 +6420,7 @@ var MultipleSelector = React13.forwardRef(
|
|
|
6400
6420
|
setOnScrollbar(true);
|
|
6401
6421
|
},
|
|
6402
6422
|
onMouseUp: () => {
|
|
6403
|
-
_optionalChain([inputRef, 'optionalAccess',
|
|
6423
|
+
_optionalChain([inputRef, 'optionalAccess', _111 => _111.current, 'optionalAccess', _112 => _112.focus, 'call', _113 => _113()]);
|
|
6404
6424
|
},
|
|
6405
6425
|
children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: loadingIndicator }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
6406
6426
|
EmptyItem(),
|
|
@@ -6424,13 +6444,13 @@ var MultipleSelector = React13.forwardRef(
|
|
|
6424
6444
|
},
|
|
6425
6445
|
onSelect: () => {
|
|
6426
6446
|
if (selected.length >= maxSelected) {
|
|
6427
|
-
_optionalChain([onMaxSelected, 'optionalCall',
|
|
6447
|
+
_optionalChain([onMaxSelected, 'optionalCall', _114 => _114(selected.length)]);
|
|
6428
6448
|
return;
|
|
6429
6449
|
}
|
|
6430
6450
|
setInputValue("");
|
|
6431
6451
|
const newOptions = [...selected, option];
|
|
6432
6452
|
setSelected(newOptions);
|
|
6433
|
-
_optionalChain([onChange, 'optionalCall',
|
|
6453
|
+
_optionalChain([onChange, 'optionalCall', _115 => _115(newOptions)]);
|
|
6434
6454
|
},
|
|
6435
6455
|
className: _chunkNPGX2GJDjs.cn.call(void 0,
|
|
6436
6456
|
"cursor-pointer bg-transparent hover:bg-accent data-selected:bg-transparent data-selected:hover:bg-accent",
|
|
@@ -6466,7 +6486,7 @@ var MultipleSelector = React13.forwardRef(
|
|
|
6466
6486
|
setOnScrollbar(true);
|
|
6467
6487
|
},
|
|
6468
6488
|
onMouseUp: () => {
|
|
6469
|
-
_optionalChain([inputRef, 'optionalAccess',
|
|
6489
|
+
_optionalChain([inputRef, 'optionalAccess', _116 => _116.current, 'optionalAccess', _117 => _117.focus, 'call', _118 => _118()]);
|
|
6470
6490
|
},
|
|
6471
6491
|
children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: loadingIndicator }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
6472
6492
|
EmptyItem(),
|
|
@@ -6490,13 +6510,13 @@ var MultipleSelector = React13.forwardRef(
|
|
|
6490
6510
|
},
|
|
6491
6511
|
onSelect: () => {
|
|
6492
6512
|
if (selected.length >= maxSelected) {
|
|
6493
|
-
_optionalChain([onMaxSelected, 'optionalCall',
|
|
6513
|
+
_optionalChain([onMaxSelected, 'optionalCall', _119 => _119(selected.length)]);
|
|
6494
6514
|
return;
|
|
6495
6515
|
}
|
|
6496
6516
|
setInputValue("");
|
|
6497
6517
|
const newOptions = [...selected, option];
|
|
6498
6518
|
setSelected(newOptions);
|
|
6499
|
-
_optionalChain([onChange, 'optionalCall',
|
|
6519
|
+
_optionalChain([onChange, 'optionalCall', _120 => _120(newOptions)]);
|
|
6500
6520
|
},
|
|
6501
6521
|
className: _chunkNPGX2GJDjs.cn.call(void 0,
|
|
6502
6522
|
"cursor-pointer bg-transparent hover:bg-accent data-selected:bg-transparent data-selected:hover:bg-accent",
|
|
@@ -6539,7 +6559,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, EntityAvatar, "EntityAvatar");
|
|
|
6539
6559
|
|
|
6540
6560
|
// src/components/errors/errorToast.ts
|
|
6541
6561
|
function errorToast(params) {
|
|
6542
|
-
_chunkNPGX2GJDjs.showError.call(void 0, _nullishCoalesce(_optionalChain([params, 'optionalAccess',
|
|
6562
|
+
_chunkNPGX2GJDjs.showError.call(void 0, _nullishCoalesce(_optionalChain([params, 'optionalAccess', _121 => _121.title]), () => ( "Error")), {
|
|
6543
6563
|
description: params.error instanceof Error ? params.error.message : String(params.error)
|
|
6544
6564
|
});
|
|
6545
6565
|
}
|
|
@@ -6626,7 +6646,7 @@ function EditableAvatar({
|
|
|
6626
6646
|
}, [image, isUploading, patchImage, t]);
|
|
6627
6647
|
const handleFileInputChange = _react.useCallback.call(void 0,
|
|
6628
6648
|
(e) => {
|
|
6629
|
-
const file = _optionalChain([e, 'access',
|
|
6649
|
+
const file = _optionalChain([e, 'access', _122 => _122.target, 'access', _123 => _123.files, 'optionalAccess', _124 => _124[0]]);
|
|
6630
6650
|
if (file) handleFile(file);
|
|
6631
6651
|
e.target.value = "";
|
|
6632
6652
|
},
|
|
@@ -6635,7 +6655,7 @@ function EditableAvatar({
|
|
|
6635
6655
|
const handleDrop = _react.useCallback.call(void 0,
|
|
6636
6656
|
(e) => {
|
|
6637
6657
|
e.preventDefault();
|
|
6638
|
-
const file = _optionalChain([e, 'access',
|
|
6658
|
+
const file = _optionalChain([e, 'access', _125 => _125.dataTransfer, 'access', _126 => _126.files, 'optionalAccess', _127 => _127[0]]);
|
|
6639
6659
|
if (file && file.type.startsWith("image/")) {
|
|
6640
6660
|
handleFile(file);
|
|
6641
6661
|
}
|
|
@@ -6662,7 +6682,7 @@ function EditableAvatar({
|
|
|
6662
6682
|
"button",
|
|
6663
6683
|
{
|
|
6664
6684
|
type: "button",
|
|
6665
|
-
onClick: () => _optionalChain([fileInputRef, 'access',
|
|
6685
|
+
onClick: () => _optionalChain([fileInputRef, 'access', _128 => _128.current, 'optionalAccess', _129 => _129.click, 'call', _130 => _130()]),
|
|
6666
6686
|
disabled: isUploading,
|
|
6667
6687
|
className: "rounded-full p-2 text-white hover:bg-white/20 disabled:opacity-50",
|
|
6668
6688
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.PencilIcon, { className: "h-4 w-4" })
|
|
@@ -6949,18 +6969,18 @@ function useDataListRetriever(params) {
|
|
|
6949
6969
|
const fetchData = _react.useCallback.call(void 0,
|
|
6950
6970
|
async (fetchParams) => {
|
|
6951
6971
|
if (ready === false) return;
|
|
6952
|
-
if ((_optionalChain([fetchParams, 'optionalAccess',
|
|
6972
|
+
if ((_optionalChain([fetchParams, 'optionalAccess', _131 => _131.callNext]) || _optionalChain([fetchParams, 'optionalAccess', _132 => _132.callPrevious])) && isPaginatingRef.current) {
|
|
6953
6973
|
return;
|
|
6954
6974
|
}
|
|
6955
|
-
if (isFetchingRef.current && !_optionalChain([fetchParams, 'optionalAccess',
|
|
6975
|
+
if (isFetchingRef.current && !_optionalChain([fetchParams, 'optionalAccess', _133 => _133.isRefine]) && !_optionalChain([fetchParams, 'optionalAccess', _134 => _134.callNext]) && !_optionalChain([fetchParams, 'optionalAccess', _135 => _135.callPrevious]))
|
|
6956
6976
|
return;
|
|
6957
|
-
if (stableParams.requiresSearch === true && _optionalChain([fetchParams, 'optionalAccess',
|
|
6977
|
+
if (stableParams.requiresSearch === true && _optionalChain([fetchParams, 'optionalAccess', _136 => _136.isRefine]) !== true && _optionalChain([fetchParams, 'optionalAccess', _137 => _137.isRefresh]) !== true) {
|
|
6958
6978
|
return;
|
|
6959
6979
|
}
|
|
6960
|
-
if (_optionalChain([fetchParams, 'optionalAccess',
|
|
6980
|
+
if (_optionalChain([fetchParams, 'optionalAccess', _138 => _138.force]) !== true && !nextPage && !previousPage && isLoaded && _optionalChain([fetchParams, 'optionalAccess', _139 => _139.callNext]) !== true && _optionalChain([fetchParams, 'optionalAccess', _140 => _140.callPrevious]) !== true && params.search === searchTermRef.current) {
|
|
6961
6981
|
return;
|
|
6962
6982
|
}
|
|
6963
|
-
if (_optionalChain([fetchParams, 'optionalAccess',
|
|
6983
|
+
if (_optionalChain([fetchParams, 'optionalAccess', _141 => _141.callNext]) || _optionalChain([fetchParams, 'optionalAccess', _142 => _142.callPrevious])) {
|
|
6964
6984
|
isPaginatingRef.current = true;
|
|
6965
6985
|
}
|
|
6966
6986
|
const thisRequestId = ++requestIdRef.current;
|
|
@@ -6973,7 +6993,7 @@ function useDataListRetriever(params) {
|
|
|
6973
6993
|
const previousRef = { previous: void 0 };
|
|
6974
6994
|
const selfRef = { self: void 0 };
|
|
6975
6995
|
const totalRef = { total: void 0 };
|
|
6976
|
-
if (nextPage && _optionalChain([fetchParams, 'optionalAccess',
|
|
6996
|
+
if (nextPage && _optionalChain([fetchParams, 'optionalAccess', _143 => _143.callNext]) && _optionalChain([fetchParams, 'optionalAccess', _144 => _144.isRefine]) !== true) {
|
|
6977
6997
|
const ServiceClass = stableParams.service;
|
|
6978
6998
|
response = await ServiceClass.next({
|
|
6979
6999
|
type: stableParams.type,
|
|
@@ -6983,7 +7003,7 @@ function useDataListRetriever(params) {
|
|
|
6983
7003
|
self: selfRef,
|
|
6984
7004
|
total: totalRef
|
|
6985
7005
|
});
|
|
6986
|
-
} else if (previousPage && _optionalChain([fetchParams, 'optionalAccess',
|
|
7006
|
+
} else if (previousPage && _optionalChain([fetchParams, 'optionalAccess', _145 => _145.callPrevious]) && _optionalChain([fetchParams, 'optionalAccess', _146 => _146.isRefine]) !== true) {
|
|
6987
7007
|
const ServiceClass = stableParams.service;
|
|
6988
7008
|
response = await ServiceClass.previous({
|
|
6989
7009
|
type: stableParams.type,
|
|
@@ -7006,8 +7026,8 @@ function useDataListRetriever(params) {
|
|
|
7006
7026
|
retrieverParams.total = totalRef;
|
|
7007
7027
|
response = await stableParams.retriever(retrieverParams);
|
|
7008
7028
|
}
|
|
7009
|
-
if (thisRequestId === requestIdRef.current && !_optionalChain([abortControllerRef, 'access',
|
|
7010
|
-
if (_optionalChain([fetchParams, 'optionalAccess',
|
|
7029
|
+
if (thisRequestId === requestIdRef.current && !_optionalChain([abortControllerRef, 'access', _147 => _147.current, 'optionalAccess', _148 => _148.signal, 'access', _149 => _149.aborted])) {
|
|
7030
|
+
if (_optionalChain([fetchParams, 'optionalAccess', _150 => _150.isRefresh]) === true) {
|
|
7011
7031
|
setData(response);
|
|
7012
7032
|
} else {
|
|
7013
7033
|
setData((prevData) => [...prevData ? prevData : [], ...response]);
|
|
@@ -7230,12 +7250,12 @@ var SUBTITLE_PX_PER_CHAR_11 = 6;
|
|
|
7230
7250
|
var LABEL_PADDING_PX = 16;
|
|
7231
7251
|
function estimateLabelWidth(node) {
|
|
7232
7252
|
if (node.subtitle) {
|
|
7233
|
-
const titleWidth = (_nullishCoalesce(_optionalChain([node, 'access',
|
|
7253
|
+
const titleWidth = (_nullishCoalesce(_optionalChain([node, 'access', _151 => _151.name, 'optionalAccess', _152 => _152.length]), () => ( 0))) * TITLE_PX_PER_CHAR_16;
|
|
7234
7254
|
const subtitleWidth = node.subtitle.length * SUBTITLE_PX_PER_CHAR_11;
|
|
7235
7255
|
return Math.max(titleWidth, subtitleWidth) + LABEL_PADDING_PX;
|
|
7236
7256
|
}
|
|
7237
7257
|
const perChar = node.bold ? NAME_PX_PER_CHAR_16_BOLD : NAME_PX_PER_CHAR_12;
|
|
7238
|
-
return (_nullishCoalesce(_optionalChain([node, 'access',
|
|
7258
|
+
return (_nullishCoalesce(_optionalChain([node, 'access', _153 => _153.name, 'optionalAccess', _154 => _154.length]), () => ( 0))) * perChar + LABEL_PADDING_PX;
|
|
7239
7259
|
}
|
|
7240
7260
|
_chunk7QVYU63Ejs.__name.call(void 0, estimateLabelWidth, "estimateLabelWidth");
|
|
7241
7261
|
function linkEndpointId(end) {
|
|
@@ -7348,12 +7368,12 @@ var SUBTITLE_PX_PER_CHAR_112 = 6;
|
|
|
7348
7368
|
var LABEL_PADDING_PX2 = 16;
|
|
7349
7369
|
function estimateLabelWidth2(node) {
|
|
7350
7370
|
if (node.subtitle) {
|
|
7351
|
-
const titleWidth = (_nullishCoalesce(_optionalChain([node, 'access',
|
|
7371
|
+
const titleWidth = (_nullishCoalesce(_optionalChain([node, 'access', _155 => _155.name, 'optionalAccess', _156 => _156.length]), () => ( 0))) * TITLE_PX_PER_CHAR_162;
|
|
7352
7372
|
const subtitleWidth = node.subtitle.length * SUBTITLE_PX_PER_CHAR_112;
|
|
7353
7373
|
return Math.max(titleWidth, subtitleWidth) + LABEL_PADDING_PX2;
|
|
7354
7374
|
}
|
|
7355
7375
|
const perChar = node.bold ? NAME_PX_PER_CHAR_16_BOLD2 : NAME_PX_PER_CHAR_122;
|
|
7356
|
-
return (_nullishCoalesce(_optionalChain([node, 'access',
|
|
7376
|
+
return (_nullishCoalesce(_optionalChain([node, 'access', _157 => _157.name, 'optionalAccess', _158 => _158.length]), () => ( 0))) * perChar + LABEL_PADDING_PX2;
|
|
7357
7377
|
}
|
|
7358
7378
|
_chunk7QVYU63Ejs.__name.call(void 0, estimateLabelWidth2, "estimateLabelWidth");
|
|
7359
7379
|
function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, loadingNodeIds, containerKey) {
|
|
@@ -7420,7 +7440,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
|
|
|
7420
7440
|
});
|
|
7421
7441
|
const typeColorMap = /* @__PURE__ */ new Map();
|
|
7422
7442
|
Array.from(groupTypes).forEach((type, index) => {
|
|
7423
|
-
if (type === _optionalChain([nodes, 'access',
|
|
7443
|
+
if (type === _optionalChain([nodes, 'access', _159 => _159[0], 'optionalAccess', _160 => _160.instanceType])) {
|
|
7424
7444
|
typeColorMap.set(type, accentColor);
|
|
7425
7445
|
} else if (type === "documents" || type === "articles" || type === "hyperlinks") {
|
|
7426
7446
|
typeColorMap.set(type, contentColor);
|
|
@@ -7470,14 +7490,14 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
|
|
|
7470
7490
|
});
|
|
7471
7491
|
const svg = d3.select(svgRef.current);
|
|
7472
7492
|
svg.selectAll("*").remove();
|
|
7473
|
-
const container = _optionalChain([svgRef, 'access',
|
|
7493
|
+
const container = _optionalChain([svgRef, 'access', _161 => _161.current, 'optionalAccess', _162 => _162.parentElement]);
|
|
7474
7494
|
if (!container) return;
|
|
7475
7495
|
const width = container.clientWidth;
|
|
7476
7496
|
const height = container.clientHeight;
|
|
7477
7497
|
svg.attr("width", width).attr("height", height).attr("viewBox", `0 0 ${width} ${height}`);
|
|
7478
7498
|
const graphGroup = svg.append("g").attr("class", "graph-content");
|
|
7479
7499
|
const nodeRadius = 40;
|
|
7480
|
-
const directed = _optionalChain([options, 'optionalAccess',
|
|
7500
|
+
const directed = _optionalChain([options, 'optionalAccess', _163 => _163.directed]) === true;
|
|
7481
7501
|
if (directed) {
|
|
7482
7502
|
const defs = svg.append("defs");
|
|
7483
7503
|
defs.append("marker").attr("id", "narr8-arrow").attr("viewBox", "-10 -10 20 20").attr("markerWidth", 14).attr("markerHeight", 14).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").attr("refX", 0).attr("refY", 0).append("path").attr("d", "M-10,-10 L0,0 L-10,10 z").attr("fill", "#999");
|
|
@@ -7489,10 +7509,10 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
|
|
|
7489
7509
|
});
|
|
7490
7510
|
zoomBehaviorRef.current = zoom2;
|
|
7491
7511
|
svg.call(zoom2).on("wheel.zoom", null).on("dblclick.zoom", null);
|
|
7492
|
-
const layoutMode = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7512
|
+
const layoutMode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _164 => _164.layout]), () => ( "radial"));
|
|
7493
7513
|
let layeredPositionsApplied = false;
|
|
7494
7514
|
if (layoutMode === "layered") {
|
|
7495
|
-
const layeredOpts = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7515
|
+
const layeredOpts = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _165 => _165.layered]), () => ( {}));
|
|
7496
7516
|
const useFit = layeredOpts.fitContainer === true && width > 0 && height > 0;
|
|
7497
7517
|
const positions = useFit ? fitLayeredLayoutToAspectRatio(visibleNodes, visibleLinks, {
|
|
7498
7518
|
rankdir: _nullishCoalesce(layeredOpts.rankdir, () => ( "LR")),
|
|
@@ -7575,7 +7595,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
|
|
|
7575
7595
|
sourceNode.children.push(targetId);
|
|
7576
7596
|
}
|
|
7577
7597
|
});
|
|
7578
|
-
const rootChildren = _optionalChain([nodeHierarchy, 'access',
|
|
7598
|
+
const rootChildren = _optionalChain([nodeHierarchy, 'access', _166 => _166.get, 'call', _167 => _167(centralNodeId), 'optionalAccess', _168 => _168.children]) || [];
|
|
7579
7599
|
const childAngleStep = 2 * Math.PI / Math.max(rootChildren.length, 1);
|
|
7580
7600
|
rootChildren.forEach((childId, index) => {
|
|
7581
7601
|
const childNode = nodeHierarchy.get(childId);
|
|
@@ -7727,7 +7747,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
|
|
|
7727
7747
|
if (d.instanceType === "root") return;
|
|
7728
7748
|
const currentNode = d3.select(this);
|
|
7729
7749
|
currentNode.raise();
|
|
7730
|
-
const currentZoom = _optionalChain([zoomRef, 'access',
|
|
7750
|
+
const currentZoom = _optionalChain([zoomRef, 'access', _169 => _169.current, 'optionalAccess', _170 => _170.k]) || 1;
|
|
7731
7751
|
const targetScreenFontSize = 20;
|
|
7732
7752
|
const baseFontSize = 12;
|
|
7733
7753
|
const textScale = targetScreenFontSize / (baseFontSize * currentZoom);
|
|
@@ -7802,19 +7822,19 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
|
|
|
7802
7822
|
}
|
|
7803
7823
|
});
|
|
7804
7824
|
return () => {
|
|
7805
|
-
_optionalChain([simulation, 'optionalAccess',
|
|
7825
|
+
_optionalChain([simulation, 'optionalAccess', _171 => _171.stop, 'call', _172 => _172()]);
|
|
7806
7826
|
};
|
|
7807
7827
|
}, [
|
|
7808
7828
|
nodes,
|
|
7809
7829
|
links,
|
|
7810
7830
|
colorScale,
|
|
7811
7831
|
visibleNodeIds,
|
|
7812
|
-
_optionalChain([options, 'optionalAccess',
|
|
7813
|
-
_optionalChain([options, 'optionalAccess',
|
|
7814
|
-
_optionalChain([options, 'optionalAccess',
|
|
7815
|
-
_optionalChain([options, 'optionalAccess',
|
|
7816
|
-
_optionalChain([options, 'optionalAccess',
|
|
7817
|
-
_optionalChain([options, 'optionalAccess',
|
|
7832
|
+
_optionalChain([options, 'optionalAccess', _173 => _173.directed]),
|
|
7833
|
+
_optionalChain([options, 'optionalAccess', _174 => _174.layout]),
|
|
7834
|
+
_optionalChain([options, 'optionalAccess', _175 => _175.layered, 'optionalAccess', _176 => _176.rankdir]),
|
|
7835
|
+
_optionalChain([options, 'optionalAccess', _177 => _177.layered, 'optionalAccess', _178 => _178.nodesep]),
|
|
7836
|
+
_optionalChain([options, 'optionalAccess', _179 => _179.layered, 'optionalAccess', _180 => _180.ranksep]),
|
|
7837
|
+
_optionalChain([options, 'optionalAccess', _181 => _181.layered, 'optionalAccess', _182 => _182.fitContainer]),
|
|
7818
7838
|
loadingNodeIds,
|
|
7819
7839
|
onNodeClick
|
|
7820
7840
|
]);
|
|
@@ -8004,21 +8024,21 @@ var CurrentUserContext = _react.createContext.call(void 0, void 0);
|
|
|
8004
8024
|
var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ children }) => {
|
|
8005
8025
|
const [dehydratedUser, setDehydratedUser] = _jotai.useAtom.call(void 0, userAtom);
|
|
8006
8026
|
const matchUrlToModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
|
|
8007
|
-
const path = _optionalChain([params, 'optionalAccess',
|
|
8027
|
+
const path = _optionalChain([params, 'optionalAccess', _183 => _183.path, 'optionalAccess', _184 => _184.toLowerCase, 'call', _185 => _185()]);
|
|
8008
8028
|
if (!path) return void 0;
|
|
8009
8029
|
const moduleKeys = Object.getOwnPropertyNames(_chunkZ6T2575Ajs.Modules).filter(
|
|
8010
8030
|
(key) => key !== "prototype" && key !== "_factory" && key !== "length" && key !== "name"
|
|
8011
8031
|
);
|
|
8012
8032
|
const matchedModuleKey = moduleKeys.find((key) => {
|
|
8013
8033
|
const descriptor2 = Object.getOwnPropertyDescriptor(_chunkZ6T2575Ajs.Modules, key);
|
|
8014
|
-
if (!_optionalChain([descriptor2, 'optionalAccess',
|
|
8034
|
+
if (!_optionalChain([descriptor2, 'optionalAccess', _186 => _186.get])) return false;
|
|
8015
8035
|
const selectedModule = descriptor2.get.call(_chunkZ6T2575Ajs.Modules);
|
|
8016
|
-
if (!_optionalChain([selectedModule, 'optionalAccess',
|
|
8036
|
+
if (!_optionalChain([selectedModule, 'optionalAccess', _187 => _187.pageUrl])) return false;
|
|
8017
8037
|
return path.startsWith(selectedModule.pageUrl.toLowerCase());
|
|
8018
8038
|
});
|
|
8019
8039
|
if (!matchedModuleKey) return void 0;
|
|
8020
8040
|
const descriptor = Object.getOwnPropertyDescriptor(_chunkZ6T2575Ajs.Modules, matchedModuleKey);
|
|
8021
|
-
return _optionalChain([descriptor, 'optionalAccess',
|
|
8041
|
+
return _optionalChain([descriptor, 'optionalAccess', _188 => _188.get, 'optionalAccess', _189 => _189.call, 'call', _190 => _190(_chunkZ6T2575Ajs.Modules)]);
|
|
8022
8042
|
}, "matchUrlToModule");
|
|
8023
8043
|
const currentUser = _react.useMemo.call(void 0,
|
|
8024
8044
|
() => dehydratedUser ? _chunkNPGX2GJDjs.rehydrate.call(void 0, _chunkZ6T2575Ajs.Modules.User, dehydratedUser) : null,
|
|
@@ -8026,7 +8046,7 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
8026
8046
|
);
|
|
8027
8047
|
const [creditOverride, setCreditOverride] = _react.useState.call(void 0, null);
|
|
8028
8048
|
const company = _react.useMemo.call(void 0, () => {
|
|
8029
|
-
const c = _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess',
|
|
8049
|
+
const c = _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _191 => _191.company]), () => ( null));
|
|
8030
8050
|
if (!c || !creditOverride) return c;
|
|
8031
8051
|
return Object.assign(Object.create(Object.getPrototypeOf(c)), c, {
|
|
8032
8052
|
_availableMonthlyCredits: creditOverride.availableMonthlyCredits,
|
|
@@ -8040,7 +8060,7 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
8040
8060
|
}, "setUser");
|
|
8041
8061
|
const hasRole = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (roleId) => {
|
|
8042
8062
|
if (!currentUser) return false;
|
|
8043
|
-
return !!_optionalChain([currentUser, 'access',
|
|
8063
|
+
return !!_optionalChain([currentUser, 'access', _192 => _192.roles, 'optionalAccess', _193 => _193.some, 'call', _194 => _194((userRole) => userRole.id === roleId)]);
|
|
8044
8064
|
}, "hasRole");
|
|
8045
8065
|
const hasAccesToFeature = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (featureIdentifier) => {
|
|
8046
8066
|
if (hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)) return true;
|
|
@@ -8080,12 +8100,12 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
8080
8100
|
try {
|
|
8081
8101
|
const fullUser = await _chunkNPGX2GJDjs.UserService.findFullUser();
|
|
8082
8102
|
if (fullUser) {
|
|
8083
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
8084
|
-
await _optionalChain([_chunkNPGX2GJDjs.getTokenHandler.call(void 0, ), 'optionalAccess',
|
|
8103
|
+
if (!_optionalChain([options, 'optionalAccess', _195 => _195.skipCookieUpdate])) {
|
|
8104
|
+
await _optionalChain([_chunkNPGX2GJDjs.getTokenHandler.call(void 0, ), 'optionalAccess', _196 => _196.updateToken, 'call', _197 => _197({
|
|
8085
8105
|
userId: fullUser.id,
|
|
8086
|
-
companyId: _optionalChain([fullUser, 'access',
|
|
8106
|
+
companyId: _optionalChain([fullUser, 'access', _198 => _198.company, 'optionalAccess', _199 => _199.id]),
|
|
8087
8107
|
roles: fullUser.roles.map((role) => role.id),
|
|
8088
|
-
features: _nullishCoalesce(_optionalChain([fullUser, 'access',
|
|
8108
|
+
features: _nullishCoalesce(_optionalChain([fullUser, 'access', _200 => _200.company, 'optionalAccess', _201 => _201.features, 'optionalAccess', _202 => _202.map, 'call', _203 => _203((feature) => feature.id)]), () => ( []))
|
|
8089
8109
|
})]);
|
|
8090
8110
|
}
|
|
8091
8111
|
setDehydratedUser(fullUser.dehydrate());
|
|
@@ -8124,18 +8144,18 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
8124
8144
|
});
|
|
8125
8145
|
}, [isConnected]);
|
|
8126
8146
|
_react.useEffect.call(void 0, () => {
|
|
8127
|
-
if (!socket || !isConnected || !_optionalChain([currentUser, 'optionalAccess',
|
|
8147
|
+
if (!socket || !isConnected || !_optionalChain([currentUser, 'optionalAccess', _204 => _204.company, 'optionalAccess', _205 => _205.id])) {
|
|
8128
8148
|
return;
|
|
8129
8149
|
}
|
|
8130
8150
|
const handleCreditsUpdated = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
|
|
8131
|
-
if (data.companyId !== _optionalChain([currentUser, 'access',
|
|
8151
|
+
if (data.companyId !== _optionalChain([currentUser, 'access', _206 => _206.company, 'optionalAccess', _207 => _207.id])) return;
|
|
8132
8152
|
setCreditOverride({
|
|
8133
8153
|
availableMonthlyCredits: data.availableMonthlyCredits,
|
|
8134
8154
|
availableExtraCredits: data.availableExtraCredits
|
|
8135
8155
|
});
|
|
8136
8156
|
}, "handleCreditsUpdated");
|
|
8137
8157
|
const handleSubscriptionUpdated = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
|
|
8138
|
-
if (data.companyId === _optionalChain([currentUser, 'access',
|
|
8158
|
+
if (data.companyId === _optionalChain([currentUser, 'access', _208 => _208.company, 'optionalAccess', _209 => _209.id]) && !isRefreshingRef.current) {
|
|
8139
8159
|
isRefreshingRef.current = true;
|
|
8140
8160
|
refreshUserRef.current({ skipCookieUpdate: true }).finally(() => {
|
|
8141
8161
|
isRefreshingRef.current = false;
|
|
@@ -8148,7 +8168,7 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
8148
8168
|
socket.off("company:credits_updated", handleCreditsUpdated);
|
|
8149
8169
|
socket.off("company:subscription_updated", handleSubscriptionUpdated);
|
|
8150
8170
|
};
|
|
8151
|
-
}, [socket, isConnected, _optionalChain([currentUser, 'optionalAccess',
|
|
8171
|
+
}, [socket, isConnected, _optionalChain([currentUser, 'optionalAccess', _210 => _210.company, 'optionalAccess', _211 => _211.id])]);
|
|
8152
8172
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8153
8173
|
CurrentUserContext.Provider,
|
|
8154
8174
|
{
|
|
@@ -8346,7 +8366,7 @@ function AddUserToRoleInternal({ role, refresh }) {
|
|
|
8346
8366
|
const data = useDataListRetriever({
|
|
8347
8367
|
ready: !!company && show,
|
|
8348
8368
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkNPGX2GJDjs.UserService.findAllUsers(params), "retriever"),
|
|
8349
|
-
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess',
|
|
8369
|
+
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _212 => _212.id]) },
|
|
8350
8370
|
module: _chunkZ6T2575Ajs.Modules.User
|
|
8351
8371
|
});
|
|
8352
8372
|
_react.useEffect.call(void 0, () => {
|
|
@@ -8398,7 +8418,7 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
|
|
|
8398
8418
|
setFile(files[0]);
|
|
8399
8419
|
}
|
|
8400
8420
|
}, [files]);
|
|
8401
|
-
const avatarSrc = file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess',
|
|
8421
|
+
const avatarSrc = file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess', _213 => _213.avatar]) || "";
|
|
8402
8422
|
const dropzone2 = {
|
|
8403
8423
|
multiple: false,
|
|
8404
8424
|
maxSize: 100 * 1024 * 1024,
|
|
@@ -8415,7 +8435,7 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
|
|
|
8415
8435
|
onValueChange: setFiles,
|
|
8416
8436
|
dropzoneOptions: dropzone2,
|
|
8417
8437
|
className: "h-40 w-40 rounded-full p-0",
|
|
8418
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "bg-muted text-muted-foreground flex h-full w-full flex-col items-center justify-center", children: !resetImage && (file || _optionalChain([user, 'optionalAccess',
|
|
8438
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "bg-muted text-muted-foreground flex h-full w-full flex-col items-center justify-center", children: !resetImage && (file || _optionalChain([user, 'optionalAccess', _214 => _214.avatar])) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8419
8439
|
_image2.default,
|
|
8420
8440
|
{
|
|
8421
8441
|
src: avatarSrc,
|
|
@@ -8427,7 +8447,7 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
|
|
|
8427
8447
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, { className: "my-4 h-8 w-8" }) })
|
|
8428
8448
|
}
|
|
8429
8449
|
),
|
|
8430
|
-
!resetImage && (file || _optionalChain([user, 'optionalAccess',
|
|
8450
|
+
!resetImage && (file || _optionalChain([user, 'optionalAccess', _215 => _215.avatar])) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8431
8451
|
Button,
|
|
8432
8452
|
{
|
|
8433
8453
|
className: "",
|
|
@@ -8455,7 +8475,7 @@ function UserDeleterInternal({ user, onDeleted, companyId }) {
|
|
|
8455
8475
|
const router = _chunkNP3AFULUjs.useI18nRouter.call(void 0, );
|
|
8456
8476
|
const _t = _nextintl.useTranslations.call(void 0, );
|
|
8457
8477
|
let cId;
|
|
8458
|
-
if (_optionalChain([currentUser, 'optionalAccess',
|
|
8478
|
+
if (_optionalChain([currentUser, 'optionalAccess', _216 => _216.roles, 'access', _217 => _217.find, 'call', _218 => _218((role) => role.id === _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)]) && companyId) {
|
|
8459
8479
|
cId = companyId;
|
|
8460
8480
|
} else {
|
|
8461
8481
|
if (!company) return;
|
|
@@ -8518,18 +8538,18 @@ function UserEditorInternal({
|
|
|
8518
8538
|
}, [company]);
|
|
8519
8539
|
const handleDialogOpenChange = _react.useCallback.call(void 0,
|
|
8520
8540
|
(open) => {
|
|
8521
|
-
if (open && (company || _optionalChain([currentUser, 'optionalAccess',
|
|
8541
|
+
if (open && (company || _optionalChain([currentUser, 'optionalAccess', _219 => _219.roles, 'access', _220 => _220.find, 'call', _221 => _221((role) => role.id === _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)])) && roles.length === 0) {
|
|
8522
8542
|
async function fetchRoles() {
|
|
8523
8543
|
const allRoles = await _chunkNPGX2GJDjs.RoleService.findAllRoles({});
|
|
8524
8544
|
const availableRoles = allRoles.filter(
|
|
8525
|
-
(role) => role.id !== _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator && (role.requiredFeature === void 0 || _optionalChain([company, 'optionalAccess',
|
|
8545
|
+
(role) => role.id !== _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator && (role.requiredFeature === void 0 || _optionalChain([company, 'optionalAccess', _222 => _222.features, 'access', _223 => _223.some, 'call', _224 => _224((feature) => feature.id === _optionalChain([role, 'access', _225 => _225.requiredFeature, 'optionalAccess', _226 => _226.id]))]))
|
|
8526
8546
|
);
|
|
8527
8547
|
setRoles(availableRoles);
|
|
8528
8548
|
}
|
|
8529
8549
|
_chunk7QVYU63Ejs.__name.call(void 0, fetchRoles, "fetchRoles");
|
|
8530
8550
|
fetchRoles();
|
|
8531
8551
|
}
|
|
8532
|
-
_optionalChain([onDialogOpenChange, 'optionalCall',
|
|
8552
|
+
_optionalChain([onDialogOpenChange, 'optionalCall', _227 => _227(open)]);
|
|
8533
8553
|
},
|
|
8534
8554
|
[company, currentUser, roles.length, onDialogOpenChange]
|
|
8535
8555
|
);
|
|
@@ -8568,29 +8588,29 @@ function UserEditorInternal({
|
|
|
8568
8588
|
);
|
|
8569
8589
|
const getDefaultValues = _react.useCallback.call(void 0, () => {
|
|
8570
8590
|
return {
|
|
8571
|
-
id: _optionalChain([user, 'optionalAccess',
|
|
8572
|
-
name: _optionalChain([user, 'optionalAccess',
|
|
8573
|
-
title: _optionalChain([user, 'optionalAccess',
|
|
8574
|
-
bio: _optionalChain([user, 'optionalAccess',
|
|
8575
|
-
email: _optionalChain([user, 'optionalAccess',
|
|
8576
|
-
phone: _optionalChain([user, 'optionalAccess',
|
|
8591
|
+
id: _optionalChain([user, 'optionalAccess', _228 => _228.id]) || _uuid.v4.call(void 0, ),
|
|
8592
|
+
name: _optionalChain([user, 'optionalAccess', _229 => _229.name]) || "",
|
|
8593
|
+
title: _optionalChain([user, 'optionalAccess', _230 => _230.title]) || "",
|
|
8594
|
+
bio: _optionalChain([user, 'optionalAccess', _231 => _231.bio]) || "",
|
|
8595
|
+
email: _optionalChain([user, 'optionalAccess', _232 => _232.email]) || "",
|
|
8596
|
+
phone: _optionalChain([user, 'optionalAccess', _233 => _233.phone]) || "",
|
|
8577
8597
|
password: "",
|
|
8578
|
-
roleIds: _optionalChain([user, 'optionalAccess',
|
|
8598
|
+
roleIds: _optionalChain([user, 'optionalAccess', _234 => _234.roles, 'access', _235 => _235.map, 'call', _236 => _236((role) => role.id)]) || [],
|
|
8579
8599
|
sendInvitationEmail: false,
|
|
8580
|
-
avatar: _optionalChain([user, 'optionalAccess',
|
|
8600
|
+
avatar: _optionalChain([user, 'optionalAccess', _237 => _237.avatarUrl]) || ""
|
|
8581
8601
|
};
|
|
8582
8602
|
}, [user]);
|
|
8583
8603
|
const form = _reacthookform.useForm.call(void 0, {
|
|
8584
8604
|
resolver: _zod.zodResolver.call(void 0, formSchema),
|
|
8585
8605
|
defaultValues: getDefaultValues()
|
|
8586
8606
|
});
|
|
8587
|
-
const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess',
|
|
8607
|
+
const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess', _238 => _238.id]) === _optionalChain([user, 'optionalAccess', _239 => _239.id]) && hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)) && (hasPermissionToModule({ module: _chunkZ6T2575Ajs.Modules.User, action: "update" /* Update */ }) || hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator));
|
|
8588
8608
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8589
8609
|
EditorSheet,
|
|
8590
8610
|
{
|
|
8591
8611
|
form,
|
|
8592
8612
|
entityType: t(`entities.users`, { count: 1 }),
|
|
8593
|
-
entityName: _optionalChain([user, 'optionalAccess',
|
|
8613
|
+
entityName: _optionalChain([user, 'optionalAccess', _240 => _240.name]),
|
|
8594
8614
|
isEdit: !!user,
|
|
8595
8615
|
module: _chunkZ6T2575Ajs.Modules.User,
|
|
8596
8616
|
propagateChanges,
|
|
@@ -8642,11 +8662,11 @@ function UserEditorInternal({
|
|
|
8642
8662
|
// can legitimately have no company (the seeded Administrator does), in
|
|
8643
8663
|
// which case `company` is null here. `company!.id` threw a TypeError
|
|
8644
8664
|
// and surfaced as a generic "update failed" toast.
|
|
8645
|
-
companyId: _optionalChain([company, 'optionalAccess',
|
|
8665
|
+
companyId: _optionalChain([company, 'optionalAccess', _241 => _241.id]),
|
|
8646
8666
|
adminCreated
|
|
8647
8667
|
};
|
|
8648
8668
|
const updatedUser = user ? await _chunkNPGX2GJDjs.UserService.update(payload) : await _chunkNPGX2GJDjs.UserService.create(payload);
|
|
8649
|
-
if (_optionalChain([currentUser, 'optionalAccess',
|
|
8669
|
+
if (_optionalChain([currentUser, 'optionalAccess', _242 => _242.id]) === updatedUser.id) setUser(updatedUser);
|
|
8650
8670
|
return updatedUser;
|
|
8651
8671
|
},
|
|
8652
8672
|
onRevalidate,
|
|
@@ -8911,7 +8931,7 @@ function EntityMultiSelector({
|
|
|
8911
8931
|
if (open) {
|
|
8912
8932
|
setSearchTerm("");
|
|
8913
8933
|
requestAnimationFrame(() => {
|
|
8914
|
-
_optionalChain([searchInputRef, 'access',
|
|
8934
|
+
_optionalChain([searchInputRef, 'access', _243 => _243.current, 'optionalAccess', _244 => _244.focus, 'call', _245 => _245()]);
|
|
8915
8935
|
});
|
|
8916
8936
|
}
|
|
8917
8937
|
}, [open]);
|
|
@@ -8928,7 +8948,7 @@ function EntityMultiSelector({
|
|
|
8928
8948
|
form.setValue(id, next, { shouldDirty: true, shouldTouch: true });
|
|
8929
8949
|
const cb = onChangeRef.current;
|
|
8930
8950
|
if (cb) {
|
|
8931
|
-
const fullData = next.map((v) => _optionalChain([options, 'access',
|
|
8951
|
+
const fullData = next.map((v) => _optionalChain([options, 'access', _246 => _246.find, 'call', _247 => _247((opt) => opt.id === v.id), 'optionalAccess', _248 => _248.entityData])).filter(Boolean);
|
|
8932
8952
|
cb(fullData);
|
|
8933
8953
|
}
|
|
8934
8954
|
},
|
|
@@ -8941,7 +8961,7 @@ function EntityMultiSelector({
|
|
|
8941
8961
|
form.setValue(id, next, { shouldDirty: true, shouldTouch: true });
|
|
8942
8962
|
const cb = onChangeRef.current;
|
|
8943
8963
|
if (cb) {
|
|
8944
|
-
const fullData = next.map((v) => _optionalChain([options, 'access',
|
|
8964
|
+
const fullData = next.map((v) => _optionalChain([options, 'access', _249 => _249.find, 'call', _250 => _250((opt) => opt.id === v.id), 'optionalAccess', _251 => _251.entityData])).filter(Boolean);
|
|
8945
8965
|
cb(fullData);
|
|
8946
8966
|
}
|
|
8947
8967
|
},
|
|
@@ -9084,11 +9104,11 @@ function UserMultiSelect({
|
|
|
9084
9104
|
emptyText: t("ui.search.no_results", { type: t("entities.users", { count: 2 }) }),
|
|
9085
9105
|
isRequired,
|
|
9086
9106
|
retriever: (params) => _chunkNPGX2GJDjs.UserService.findAllUsers(params),
|
|
9087
|
-
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess',
|
|
9107
|
+
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _252 => _252.id]) },
|
|
9088
9108
|
module: _chunkZ6T2575Ajs.Modules.User,
|
|
9089
9109
|
getLabel: (user) => user.name,
|
|
9090
9110
|
toFormValue: (user) => ({ id: user.id, name: user.name, avatar: user.avatar }),
|
|
9091
|
-
excludeId: _optionalChain([currentUser, 'optionalAccess',
|
|
9111
|
+
excludeId: _optionalChain([currentUser, 'optionalAccess', _253 => _253.id]),
|
|
9092
9112
|
onChange,
|
|
9093
9113
|
renderOption: (user) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
|
|
9094
9114
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatarIcon, { url: user.avatar, name: user.name }),
|
|
@@ -9749,7 +9769,7 @@ var DatePickerPopover = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
|
|
|
9749
9769
|
}) => {
|
|
9750
9770
|
const { locale } = _chunkSYMI4IDWjs.useDateLocale.call(void 0, );
|
|
9751
9771
|
const dateFnsLocale = _chunkNP3AFULUjs.useI18nDateFnsLocale.call(void 0, );
|
|
9752
|
-
const weekStartsOn = _nullishCoalesce(_optionalChain([dateFnsLocale, 'optionalAccess',
|
|
9772
|
+
const weekStartsOn = _nullishCoalesce(_optionalChain([dateFnsLocale, 'optionalAccess', _254 => _254.options, 'optionalAccess', _255 => _255.weekStartsOn]), () => ( 1));
|
|
9753
9773
|
const [isOpen, setIsOpen] = _react.useState.call(void 0, false);
|
|
9754
9774
|
const [displayMonth, setDisplayMonth] = _react.useState.call(void 0, () => value || /* @__PURE__ */ new Date());
|
|
9755
9775
|
const dateFormatter = _react.useMemo.call(void 0,
|
|
@@ -9904,7 +9924,7 @@ var DatePickerPopover = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
|
|
|
9904
9924
|
function nextDateRange(params) {
|
|
9905
9925
|
const { current, computed, triggerDate } = params;
|
|
9906
9926
|
if (!computed) return void 0;
|
|
9907
|
-
if (_optionalChain([current, 'optionalAccess',
|
|
9927
|
+
if (_optionalChain([current, 'optionalAccess', _256 => _256.from]) && _optionalChain([current, 'optionalAccess', _257 => _257.to])) return { from: triggerDate, to: void 0 };
|
|
9908
9928
|
return computed;
|
|
9909
9929
|
}
|
|
9910
9930
|
_chunk7QVYU63Ejs.__name.call(void 0, nextDateRange, "nextDateRange");
|
|
@@ -9912,7 +9932,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9912
9932
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
9913
9933
|
const { format } = _chunkSYMI4IDWjs.useDateFormatter.call(void 0, );
|
|
9914
9934
|
const dateFnsLocale = _chunkNP3AFULUjs.useI18nDateFnsLocale.call(void 0, );
|
|
9915
|
-
const weekStartsOn = _nullishCoalesce(_optionalChain([dateFnsLocale, 'optionalAccess',
|
|
9935
|
+
const weekStartsOn = _nullishCoalesce(_optionalChain([dateFnsLocale, 'optionalAccess', _258 => _258.options, 'optionalAccess', _259 => _259.weekStartsOn]), () => ( 1));
|
|
9916
9936
|
const [date, setDate] = _react.useState.call(void 0,
|
|
9917
9937
|
avoidSettingDates ? void 0 : {
|
|
9918
9938
|
from: new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1),
|
|
@@ -9926,7 +9946,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9926
9946
|
}, []);
|
|
9927
9947
|
const [prevRange, setPrevRange] = _react.useState.call(void 0, date);
|
|
9928
9948
|
_react.useEffect.call(void 0, () => {
|
|
9929
|
-
if (_optionalChain([date, 'optionalAccess',
|
|
9949
|
+
if (_optionalChain([date, 'optionalAccess', _260 => _260.from]) && _optionalChain([date, 'optionalAccess', _261 => _261.to]) && date.to > date.from && (_optionalChain([prevRange, 'optionalAccess', _262 => _262.from, 'optionalAccess', _263 => _263.getTime, 'call', _264 => _264()]) !== date.from.getTime() || _optionalChain([prevRange, 'optionalAccess', _265 => _265.to, 'optionalAccess', _266 => _266.getTime, 'call', _267 => _267()]) !== date.to.getTime())) {
|
|
9930
9950
|
onDateChange(date);
|
|
9931
9951
|
setPrevRange(date);
|
|
9932
9952
|
setOpen(false);
|
|
@@ -9944,7 +9964,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9944
9964
|
className: _chunkNPGX2GJDjs.cn.call(void 0, "w-[300px] justify-start text-start font-normal", !date && "text-muted-foreground"),
|
|
9945
9965
|
children: [
|
|
9946
9966
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
|
|
9947
|
-
_optionalChain([date, 'optionalAccess',
|
|
9967
|
+
_optionalChain([date, 'optionalAccess', _268 => _268.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
9948
9968
|
format(date.from, "dateMedium"),
|
|
9949
9969
|
" - ",
|
|
9950
9970
|
format(date.to, "dateMedium")
|
|
@@ -9967,7 +9987,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9967
9987
|
),
|
|
9968
9988
|
children: [
|
|
9969
9989
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
|
|
9970
|
-
_optionalChain([date, 'optionalAccess',
|
|
9990
|
+
_optionalChain([date, 'optionalAccess', _269 => _269.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
9971
9991
|
format(date.from, "dateMedium"),
|
|
9972
9992
|
" - ",
|
|
9973
9993
|
format(date.to, "dateMedium")
|
|
@@ -9980,7 +10000,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9980
10000
|
Calendar,
|
|
9981
10001
|
{
|
|
9982
10002
|
mode: "range",
|
|
9983
|
-
defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess',
|
|
10003
|
+
defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess', _270 => _270.from]), () => ( (showPreviousMonth ? new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() - 1, 1) : void 0))),
|
|
9984
10004
|
selected: date,
|
|
9985
10005
|
onSelect: handleSelect,
|
|
9986
10006
|
numberOfMonths: 2,
|
|
@@ -10057,31 +10077,31 @@ function useEditorDialog(isFormDirty, options) {
|
|
|
10057
10077
|
}, []);
|
|
10058
10078
|
_react.useEffect.call(void 0, () => {
|
|
10059
10079
|
if (ignoreTrueFromParent.current) {
|
|
10060
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
10061
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
10080
|
+
if (_optionalChain([options, 'optionalAccess', _271 => _271.dialogOpen]) === true) return;
|
|
10081
|
+
if (_optionalChain([options, 'optionalAccess', _272 => _272.dialogOpen]) === false) ignoreTrueFromParent.current = false;
|
|
10062
10082
|
}
|
|
10063
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
10083
|
+
if (_optionalChain([options, 'optionalAccess', _273 => _273.dialogOpen]) !== void 0 && options.dialogOpen !== open) {
|
|
10064
10084
|
syncingFromProp.current = true;
|
|
10065
10085
|
setOpen(options.dialogOpen);
|
|
10066
10086
|
}
|
|
10067
|
-
}, [_optionalChain([options, 'optionalAccess',
|
|
10068
|
-
const onDialogOpenChangeRef = _react.useRef.call(void 0, _optionalChain([options, 'optionalAccess',
|
|
10069
|
-
onDialogOpenChangeRef.current = _optionalChain([options, 'optionalAccess',
|
|
10087
|
+
}, [_optionalChain([options, 'optionalAccess', _274 => _274.dialogOpen])]);
|
|
10088
|
+
const onDialogOpenChangeRef = _react.useRef.call(void 0, _optionalChain([options, 'optionalAccess', _275 => _275.onDialogOpenChange]));
|
|
10089
|
+
onDialogOpenChangeRef.current = _optionalChain([options, 'optionalAccess', _276 => _276.onDialogOpenChange]);
|
|
10070
10090
|
_react.useEffect.call(void 0, () => {
|
|
10071
10091
|
if (syncingFromProp.current) {
|
|
10072
10092
|
syncingFromProp.current = false;
|
|
10073
10093
|
return;
|
|
10074
10094
|
}
|
|
10075
|
-
_optionalChain([onDialogOpenChangeRef, 'access',
|
|
10095
|
+
_optionalChain([onDialogOpenChangeRef, 'access', _277 => _277.current, 'optionalCall', _278 => _278(open)]);
|
|
10076
10096
|
}, [open]);
|
|
10077
10097
|
const lastForceShow = _react.useRef.call(void 0, void 0);
|
|
10078
10098
|
_react.useEffect.call(void 0, () => {
|
|
10079
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
10080
|
-
lastForceShow.current = _optionalChain([options, 'optionalAccess',
|
|
10081
|
-
}, [_optionalChain([options, 'optionalAccess',
|
|
10099
|
+
if (_optionalChain([options, 'optionalAccess', _279 => _279.forceShow]) && lastForceShow.current !== true) setOpen(true);
|
|
10100
|
+
lastForceShow.current = _optionalChain([options, 'optionalAccess', _280 => _280.forceShow]);
|
|
10101
|
+
}, [_optionalChain([options, 'optionalAccess', _281 => _281.forceShow])]);
|
|
10082
10102
|
_react.useEffect.call(void 0, () => {
|
|
10083
10103
|
if (!open) {
|
|
10084
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
10104
|
+
if (_optionalChain([options, 'optionalAccess', _282 => _282.onClose])) options.onClose();
|
|
10085
10105
|
}
|
|
10086
10106
|
}, [open]);
|
|
10087
10107
|
const handleOpenChange = _react.useCallback.call(void 0,
|
|
@@ -10210,7 +10230,7 @@ function EditorSheet({
|
|
|
10210
10230
|
const next = onReset();
|
|
10211
10231
|
form.reset(next);
|
|
10212
10232
|
if (isEdit) seeded.current = JSON.stringify(next);
|
|
10213
|
-
_optionalChain([onClose, 'optionalCall',
|
|
10233
|
+
_optionalChain([onClose, 'optionalCall', _283 => _283()]);
|
|
10214
10234
|
}
|
|
10215
10235
|
}, [open]);
|
|
10216
10236
|
const wrappedOnSubmit = _react.useCallback.call(void 0,
|
|
@@ -10225,15 +10245,15 @@ function EditorSheet({
|
|
|
10225
10245
|
if (onSuccess) {
|
|
10226
10246
|
await onSuccess();
|
|
10227
10247
|
} else if (result) {
|
|
10228
|
-
_optionalChain([onRevalidate, 'optionalCall',
|
|
10248
|
+
_optionalChain([onRevalidate, 'optionalCall', _284 => _284(generateUrl({ page: module, id: result.id, language: "[locale]" }))]);
|
|
10229
10249
|
if (propagateChanges) {
|
|
10230
10250
|
propagateChanges(result);
|
|
10231
10251
|
} else {
|
|
10232
|
-
_optionalChain([onNavigate, 'optionalCall',
|
|
10252
|
+
_optionalChain([onNavigate, 'optionalCall', _285 => _285(generateUrl({ page: module, id: result.id }))]);
|
|
10233
10253
|
}
|
|
10234
10254
|
}
|
|
10235
10255
|
} catch (error) {
|
|
10236
|
-
if (_optionalChain([onSubmitError, 'optionalCall',
|
|
10256
|
+
if (_optionalChain([onSubmitError, 'optionalCall', _286 => _286(error)])) return;
|
|
10237
10257
|
errorToast({
|
|
10238
10258
|
title: isEdit ? t("generic.errors.update") : t("generic.errors.create"),
|
|
10239
10259
|
error
|
|
@@ -10467,7 +10487,7 @@ function EntitySelector({
|
|
|
10467
10487
|
{
|
|
10468
10488
|
className: `bg-input/20 dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/30 focus-visible:ring-[2px] flex min-h-7 max-md:min-h-10 w-full items-center gap-2 rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed ${hasValue(effectiveValue) ? "" : "text-muted-foreground"} ${disabled ? "cursor-not-allowed opacity-50" : ""}`,
|
|
10469
10489
|
children: [
|
|
10470
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "min-w-0 flex-1 truncate text-start", children: hasValue(effectiveValue) ? getSelectedItemDisplay ? getSelectedItemDisplay(effectiveValue) : _nullishCoalesce(_optionalChain([effectiveValue, 'optionalAccess',
|
|
10490
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "min-w-0 flex-1 truncate text-start", children: hasValue(effectiveValue) ? getSelectedItemDisplay ? getSelectedItemDisplay(effectiveValue) : _nullishCoalesce(_optionalChain([effectiveValue, 'optionalAccess', _287 => _287.name]), () => ( "")) : placeholder }),
|
|
10471
10491
|
hasValue(effectiveValue) && !disabled && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10472
10492
|
_lucidereact.CircleX,
|
|
10473
10493
|
{
|
|
@@ -10628,7 +10648,7 @@ var FileUploader = _react.forwardRef.call(void 0,
|
|
|
10628
10648
|
movePrev();
|
|
10629
10649
|
} else if (e.key === "Enter" || e.key === "Space") {
|
|
10630
10650
|
if (activeIndex === -1) {
|
|
10631
|
-
_optionalChain([dropzoneState, 'access',
|
|
10651
|
+
_optionalChain([dropzoneState, 'access', _288 => _288.inputRef, 'access', _289 => _289.current, 'optionalAccess', _290 => _290.click, 'call', _291 => _291()]);
|
|
10632
10652
|
}
|
|
10633
10653
|
} else if (e.key === "Delete" || e.key === "Backspace") {
|
|
10634
10654
|
if (activeIndex !== -1) {
|
|
@@ -10674,13 +10694,13 @@ var FileUploader = _react.forwardRef.call(void 0,
|
|
|
10674
10694
|
}
|
|
10675
10695
|
if (rejectedFiles.length > 0) {
|
|
10676
10696
|
for (let i = 0; i < rejectedFiles.length; i++) {
|
|
10677
|
-
if (_optionalChain([rejectedFiles, 'access',
|
|
10697
|
+
if (_optionalChain([rejectedFiles, 'access', _292 => _292[i], 'access', _293 => _293.errors, 'access', _294 => _294[0], 'optionalAccess', _295 => _295.code]) === "file-too-large") {
|
|
10678
10698
|
_chunkNPGX2GJDjs.showError.call(void 0, t("common.errors.file"), {
|
|
10679
10699
|
description: t(`common.errors.file_max`, { size: maxSize / 1024 / 1024 })
|
|
10680
10700
|
});
|
|
10681
10701
|
break;
|
|
10682
10702
|
}
|
|
10683
|
-
if (_optionalChain([rejectedFiles, 'access',
|
|
10703
|
+
if (_optionalChain([rejectedFiles, 'access', _296 => _296[i], 'access', _297 => _297.errors, 'access', _298 => _298[0], 'optionalAccess', _299 => _299.message])) {
|
|
10684
10704
|
_chunkNPGX2GJDjs.showError.call(void 0, t(`common.errors.file`), {
|
|
10685
10705
|
description: rejectedFiles[i].errors[0].message
|
|
10686
10706
|
});
|
|
@@ -10879,7 +10899,7 @@ FileInput.displayName = "FileInput";
|
|
|
10879
10899
|
var _dynamic = require('next/dynamic'); var _dynamic2 = _interopRequireDefault(_dynamic);
|
|
10880
10900
|
|
|
10881
10901
|
|
|
10882
|
-
var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-
|
|
10902
|
+
var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-VXSVY6OY.js"))), {
|
|
10883
10903
|
ssr: false
|
|
10884
10904
|
});
|
|
10885
10905
|
var BlockNoteEditorContainer = React2.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function EditorContainer(props) {
|
|
@@ -10964,7 +10984,7 @@ function FormBlockNote({
|
|
|
10964
10984
|
} else {
|
|
10965
10985
|
field.onChange(content);
|
|
10966
10986
|
}
|
|
10967
|
-
_optionalChain([onEmptyChange, 'optionalCall',
|
|
10987
|
+
_optionalChain([onEmptyChange, 'optionalCall', _300 => _300(isEmpty)]);
|
|
10968
10988
|
},
|
|
10969
10989
|
placeholder,
|
|
10970
10990
|
bordered: true,
|
|
@@ -11039,7 +11059,7 @@ function FormDate({
|
|
|
11039
11059
|
const t = _chunkNP3AFULUjs.useI18nTranslations.call(void 0, );
|
|
11040
11060
|
const { locale } = _chunkSYMI4IDWjs.useDateLocale.call(void 0, );
|
|
11041
11061
|
const dateFnsLocale = _chunkNP3AFULUjs.useI18nDateFnsLocale.call(void 0, );
|
|
11042
|
-
const weekStartsOn = _nullishCoalesce(_optionalChain([dateFnsLocale, 'optionalAccess',
|
|
11062
|
+
const weekStartsOn = _nullishCoalesce(_optionalChain([dateFnsLocale, 'optionalAccess', _301 => _301.options, 'optionalAccess', _302 => _302.weekStartsOn]), () => ( 1));
|
|
11043
11063
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
11044
11064
|
const [displayMonth, setDisplayMonth] = _react.useState.call(void 0, () => {
|
|
11045
11065
|
const currentValue = form.getValues(id);
|
|
@@ -11179,7 +11199,7 @@ function from24Hour(hour24) {
|
|
|
11179
11199
|
}
|
|
11180
11200
|
_chunk7QVYU63Ejs.__name.call(void 0, from24Hour, "from24Hour");
|
|
11181
11201
|
function dayPeriodOf(formatter, date) {
|
|
11182
|
-
return _nullishCoalesce(_optionalChain([formatter, 'access',
|
|
11202
|
+
return _nullishCoalesce(_optionalChain([formatter, 'access', _303 => _303.formatToParts, 'call', _304 => _304(date), 'access', _305 => _305.find, 'call', _306 => _306((part) => part.type === "dayPeriod"), 'optionalAccess', _307 => _307.value]), () => ( ""));
|
|
11183
11203
|
}
|
|
11184
11204
|
_chunk7QVYU63Ejs.__name.call(void 0, dayPeriodOf, "dayPeriodOf");
|
|
11185
11205
|
function dayPeriodLabels(locale) {
|
|
@@ -11217,10 +11237,10 @@ function FormDateTime({
|
|
|
11217
11237
|
const t = _chunkNP3AFULUjs.useI18nTranslations.call(void 0, );
|
|
11218
11238
|
const { format, locale, twelveHourClock } = _chunkSYMI4IDWjs.useDateFormatter.call(void 0, );
|
|
11219
11239
|
const dateFnsLocale = _chunkNP3AFULUjs.useI18nDateFnsLocale.call(void 0, );
|
|
11220
|
-
const weekStartsOn = _nullishCoalesce(_optionalChain([dateFnsLocale, 'optionalAccess',
|
|
11240
|
+
const weekStartsOn = _nullishCoalesce(_optionalChain([dateFnsLocale, 'optionalAccess', _308 => _308.options, 'optionalAccess', _309 => _309.weekStartsOn]), () => ( 1));
|
|
11221
11241
|
const [displayMonth, setDisplayMonth] = _react.useState.call(void 0, () => {
|
|
11222
11242
|
const currentValue = form.getValues(id);
|
|
11223
|
-
return currentValue || defaultMonth || _optionalChain([reference, 'optionalAccess',
|
|
11243
|
+
return currentValue || defaultMonth || _optionalChain([reference, 'optionalAccess', _310 => _310.date]) || /* @__PURE__ */ new Date();
|
|
11224
11244
|
});
|
|
11225
11245
|
const formatDateTime = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (date) => format(date, "dateTimeLong"), "formatDateTime");
|
|
11226
11246
|
const periodLabels = _react.useMemo.call(void 0, () => dayPeriodLabels(locale), [locale]);
|
|
@@ -11350,7 +11370,7 @@ function FormDateTime({
|
|
|
11350
11370
|
modifiersClassNames: dayModifiersClassNames
|
|
11351
11371
|
}
|
|
11352
11372
|
),
|
|
11353
|
-
_optionalChain([reference, 'optionalAccess',
|
|
11373
|
+
_optionalChain([reference, 'optionalAccess', _311 => _311.label]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-row items-center justify-between gap-x-4 border-t pt-4", children: [
|
|
11354
11374
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-muted-foreground text-sm", children: [
|
|
11355
11375
|
reference.label,
|
|
11356
11376
|
": ",
|
|
@@ -11718,11 +11738,11 @@ function FormPlaceAutocomplete({
|
|
|
11718
11738
|
const data = await response.json();
|
|
11719
11739
|
if (data.suggestions) {
|
|
11720
11740
|
const formattedSuggestions = data.suggestions.map((suggestion) => ({
|
|
11721
|
-
place_id: _optionalChain([suggestion, 'access',
|
|
11722
|
-
description: _optionalChain([suggestion, 'access',
|
|
11741
|
+
place_id: _optionalChain([suggestion, 'access', _312 => _312.placePrediction, 'optionalAccess', _313 => _313.placeId]) || "",
|
|
11742
|
+
description: _optionalChain([suggestion, 'access', _314 => _314.placePrediction, 'optionalAccess', _315 => _315.text, 'optionalAccess', _316 => _316.text]) || "",
|
|
11723
11743
|
structured_formatting: {
|
|
11724
|
-
main_text: _optionalChain([suggestion, 'access',
|
|
11725
|
-
secondary_text: _optionalChain([suggestion, 'access',
|
|
11744
|
+
main_text: _optionalChain([suggestion, 'access', _317 => _317.placePrediction, 'optionalAccess', _318 => _318.structuredFormat, 'optionalAccess', _319 => _319.mainText, 'optionalAccess', _320 => _320.text]) || "",
|
|
11745
|
+
secondary_text: _optionalChain([suggestion, 'access', _321 => _321.placePrediction, 'optionalAccess', _322 => _322.structuredFormat, 'optionalAccess', _323 => _323.secondaryText, 'optionalAccess', _324 => _324.text]) || ""
|
|
11726
11746
|
}
|
|
11727
11747
|
}));
|
|
11728
11748
|
setSuggestions(formattedSuggestions);
|
|
@@ -11869,8 +11889,8 @@ function FormPlaceAutocomplete({
|
|
|
11869
11889
|
className: "hover:bg-muted cursor-pointer px-3 py-2 text-sm",
|
|
11870
11890
|
onClick: () => handleSuggestionSelect(suggestion),
|
|
11871
11891
|
children: [
|
|
11872
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access',
|
|
11873
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access',
|
|
11892
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access', _325 => _325.structured_formatting, 'optionalAccess', _326 => _326.main_text]) }),
|
|
11893
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access', _327 => _327.structured_formatting, 'optionalAccess', _328 => _328.secondary_text]) })
|
|
11874
11894
|
]
|
|
11875
11895
|
},
|
|
11876
11896
|
suggestion.place_id || index
|
|
@@ -11918,7 +11938,7 @@ function FormSelect({
|
|
|
11918
11938
|
disabled,
|
|
11919
11939
|
"data-testid": testId,
|
|
11920
11940
|
children: [
|
|
11921
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: field.value ? _optionalChain([values, 'access',
|
|
11941
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: field.value ? _optionalChain([values, 'access', _329 => _329.find, 'call', _330 => _330((v) => v.id === field.value), 'optionalAccess', _331 => _331.text]) : _nullishCoalesce(placeholder, () => ( "")) }) }),
|
|
11922
11942
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SelectContent, { children: [
|
|
11923
11943
|
allowEmpty && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: EMPTY_VALUE, className: "text-muted-foreground", children: _nullishCoalesce(placeholder, () => ( "")) }),
|
|
11924
11944
|
values.map((type) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: type.id, children: type.text }, type.id))
|
|
@@ -12098,7 +12118,7 @@ var FilePreviewItem = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ fi
|
|
|
12098
12118
|
setObjectUrl(null);
|
|
12099
12119
|
}, [file]);
|
|
12100
12120
|
const getFileIcon = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
12101
|
-
const extension = _optionalChain([file, 'access',
|
|
12121
|
+
const extension = _optionalChain([file, 'access', _332 => _332.name, 'access', _333 => _333.split, 'call', _334 => _334("."), 'access', _335 => _335.pop, 'call', _336 => _336(), 'optionalAccess', _337 => _337.toLowerCase, 'call', _338 => _338()]);
|
|
12102
12122
|
if (file.type.startsWith("image/")) {
|
|
12103
12123
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.FileImageIcon, { className: "text-muted h-10 w-10 sm:h-12 sm:w-12" });
|
|
12104
12124
|
}
|
|
@@ -12148,7 +12168,7 @@ function UserAvatar({ user, className, showFull, showLink, showTooltip = true })
|
|
|
12148
12168
|
}, "getInitials");
|
|
12149
12169
|
const getAvatar = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
12150
12170
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "*:ring-border *:ring-1", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Avatar, { className: `h-6 w-6 ${className}`, children: [
|
|
12151
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess',
|
|
12171
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess', _339 => _339.avatar]) }),
|
|
12152
12172
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: getInitials3(user.name) })
|
|
12153
12173
|
] }) });
|
|
12154
12174
|
}, "getAvatar");
|
|
@@ -12354,7 +12374,7 @@ var useUserTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
|
|
|
12354
12374
|
})
|
|
12355
12375
|
};
|
|
12356
12376
|
const columns = _react.useMemo.call(void 0, () => {
|
|
12357
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
12377
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _340 => _340[field], 'optionalCall', _341 => _341()])).filter((col) => col !== void 0);
|
|
12358
12378
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
12359
12379
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
12360
12380
|
}, "useUserTableStructure");
|
|
@@ -12469,10 +12489,10 @@ function UserSelector({ id, form, label, placeholder, onChange, isRequired = fal
|
|
|
12469
12489
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
|
|
12470
12490
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-row items-center justify-start rounded-md", children: field.value ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: [
|
|
12471
12491
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "*:ring-border *:ring-1", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Avatar, { className: `me-2 h-4 w-4`, children: [
|
|
12472
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access',
|
|
12473
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access',
|
|
12492
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access', _342 => _342.value, 'optionalAccess', _343 => _343.avatar]) }),
|
|
12493
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access', _344 => _344.value, 'optionalAccess', _345 => _345.name]) ? _optionalChain([field, 'access', _346 => _346.value, 'optionalAccess', _347 => _347.name, 'access', _348 => _348.split, 'call', _349 => _349(" "), 'access', _350 => _350.map, 'call', _351 => _351((name) => name.charAt(0).toUpperCase())]) : "X" })
|
|
12474
12494
|
] }) }),
|
|
12475
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access',
|
|
12495
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _352 => _352.value, 'optionalAccess', _353 => _353.name]), () => ( "")) })
|
|
12476
12496
|
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input text-muted-foreground flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: _nullishCoalesce(placeholder, () => ( t(`ui.search.placeholder`, { type: t(`entities.users`, { count: 1 }) }))) }) }) }),
|
|
12477
12497
|
field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12478
12498
|
_lucidereact.CircleX,
|
|
@@ -12692,7 +12712,7 @@ function UserContent({ user }) {
|
|
|
12692
12712
|
const updated = await _chunkNPGX2GJDjs.UserService.patchAvatar({ id: user.id, avatar: imageKey });
|
|
12693
12713
|
setUser(updated);
|
|
12694
12714
|
},
|
|
12695
|
-
companyId: _nullishCoalesce(_optionalChain([company, 'optionalAccess',
|
|
12715
|
+
companyId: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _354 => _354.id]), () => ( "")),
|
|
12696
12716
|
className: "h-24 w-24",
|
|
12697
12717
|
fallbackClassName: "text-2xl"
|
|
12698
12718
|
}
|
|
@@ -12848,7 +12868,7 @@ function CompanyUsersList({ isDeleted, fullWidth }) {
|
|
|
12848
12868
|
const data = useDataListRetriever({
|
|
12849
12869
|
ready: !!company,
|
|
12850
12870
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkNPGX2GJDjs.UserService.findAllUsers(params), "retriever"),
|
|
12851
|
-
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess',
|
|
12871
|
+
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _355 => _355.id]), isDeleted },
|
|
12852
12872
|
module: _chunkZ6T2575Ajs.Modules.User
|
|
12853
12873
|
});
|
|
12854
12874
|
_react.useEffect.call(void 0, () => {
|
|
@@ -12956,11 +12976,11 @@ function UserListInAdd({ data, existingUsers, setSelectedUser, setLevelOpen }) {
|
|
|
12956
12976
|
value: user.id,
|
|
12957
12977
|
onClick: (_e) => {
|
|
12958
12978
|
setSelectedUser(user);
|
|
12959
|
-
_optionalChain([setLevelOpen, 'optionalCall',
|
|
12979
|
+
_optionalChain([setLevelOpen, 'optionalCall', _356 => _356(true)]);
|
|
12960
12980
|
},
|
|
12961
12981
|
onSelect: (_e) => {
|
|
12962
12982
|
setSelectedUser(user);
|
|
12963
|
-
_optionalChain([setLevelOpen, 'optionalCall',
|
|
12983
|
+
_optionalChain([setLevelOpen, 'optionalCall', _357 => _357(true)]);
|
|
12964
12984
|
},
|
|
12965
12985
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between px-4 py-1", children: [
|
|
12966
12986
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user }),
|
|
@@ -13101,7 +13121,7 @@ function CompanyContent({ company, actions }) {
|
|
|
13101
13121
|
company.legal_address
|
|
13102
13122
|
] }),
|
|
13103
13123
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
|
|
13104
|
-
_optionalChain([company, 'access',
|
|
13124
|
+
_optionalChain([company, 'access', _358 => _358.configurations, 'optionalAccess', _359 => _359.country]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
|
|
13105
13125
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
|
|
13106
13126
|
t("features.configuration.country"),
|
|
13107
13127
|
":"
|
|
@@ -13109,7 +13129,7 @@ function CompanyContent({ company, actions }) {
|
|
|
13109
13129
|
" ",
|
|
13110
13130
|
company.configurations.country
|
|
13111
13131
|
] }),
|
|
13112
|
-
_optionalChain([company, 'access',
|
|
13132
|
+
_optionalChain([company, 'access', _360 => _360.configurations, 'optionalAccess', _361 => _361.currency]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
|
|
13113
13133
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
|
|
13114
13134
|
t("features.configuration.currency"),
|
|
13115
13135
|
":"
|
|
@@ -13355,7 +13375,7 @@ function CompanyEditorInternal({
|
|
|
13355
13375
|
_chunk7QVYU63Ejs.__name.call(void 0, fetchFeatures, "fetchFeatures");
|
|
13356
13376
|
fetchFeatures();
|
|
13357
13377
|
}
|
|
13358
|
-
_optionalChain([onDialogOpenChange, 'optionalCall',
|
|
13378
|
+
_optionalChain([onDialogOpenChange, 'optionalCall', _362 => _362(open)]);
|
|
13359
13379
|
},
|
|
13360
13380
|
[features.length, canAccessFeatures, hasRole, onDialogOpenChange]
|
|
13361
13381
|
);
|
|
@@ -13400,12 +13420,12 @@ function CompanyEditorInternal({
|
|
|
13400
13420
|
);
|
|
13401
13421
|
const getDefaultValues = _react.useCallback.call(void 0, () => {
|
|
13402
13422
|
return {
|
|
13403
|
-
id: _optionalChain([company, 'optionalAccess',
|
|
13404
|
-
name: _optionalChain([company, 'optionalAccess',
|
|
13405
|
-
featureIds: _optionalChain([company, 'optionalAccess',
|
|
13406
|
-
moduleIds: _optionalChain([company, 'optionalAccess',
|
|
13407
|
-
logo: _optionalChain([company, 'optionalAccess',
|
|
13408
|
-
legal_address: _optionalChain([company, 'optionalAccess',
|
|
13423
|
+
id: _optionalChain([company, 'optionalAccess', _363 => _363.id]) || _uuid.v4.call(void 0, ),
|
|
13424
|
+
name: _optionalChain([company, 'optionalAccess', _364 => _364.name]) || "",
|
|
13425
|
+
featureIds: _optionalChain([company, 'optionalAccess', _365 => _365.features, 'access', _366 => _366.map, 'call', _367 => _367((feature) => feature.id)]) || [],
|
|
13426
|
+
moduleIds: _optionalChain([company, 'optionalAccess', _368 => _368.modules, 'access', _369 => _369.map, 'call', _370 => _370((module) => module.id)]) || [],
|
|
13427
|
+
logo: _optionalChain([company, 'optionalAccess', _371 => _371.logo]) || "",
|
|
13428
|
+
legal_address: _optionalChain([company, 'optionalAccess', _372 => _372.legal_address]) || ""
|
|
13409
13429
|
};
|
|
13410
13430
|
}, [company]);
|
|
13411
13431
|
const form = _reacthookform.useForm.call(void 0, {
|
|
@@ -13417,7 +13437,7 @@ function CompanyEditorInternal({
|
|
|
13417
13437
|
{
|
|
13418
13438
|
form,
|
|
13419
13439
|
entityType: t(`entities.companies`, { count: 1 }),
|
|
13420
|
-
entityName: _optionalChain([company, 'optionalAccess',
|
|
13440
|
+
entityName: _optionalChain([company, 'optionalAccess', _373 => _373.name]),
|
|
13421
13441
|
isEdit: !!company,
|
|
13422
13442
|
module: _chunkZ6T2575Ajs.Modules.Company,
|
|
13423
13443
|
propagateChanges,
|
|
@@ -13442,7 +13462,7 @@ function CompanyEditorInternal({
|
|
|
13442
13462
|
throw new Error(t("company.fiscal_data_invalid"));
|
|
13443
13463
|
}
|
|
13444
13464
|
const payload = {
|
|
13445
|
-
id: _nullishCoalesce(_optionalChain([company, 'optionalAccess',
|
|
13465
|
+
id: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _374 => _374.id]), () => ( _uuid.v4.call(void 0, ))),
|
|
13446
13466
|
name: values.name,
|
|
13447
13467
|
logo: files && contentType ? values.logo : void 0,
|
|
13448
13468
|
featureIds: values.featureIds,
|
|
@@ -13473,14 +13493,14 @@ function CompanyEditorInternal({
|
|
|
13473
13493
|
dialogOpen,
|
|
13474
13494
|
onDialogOpenChange: handleDialogOpenChange,
|
|
13475
13495
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-start justify-between gap-x-4", children: [
|
|
13476
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-96 flex-col justify-start gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileUploader, { value: files, onValueChange: setFiles, dropzoneOptions: dropzone2, className: "w-full p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "text-muted-foreground/50 rounded-lg outline-1 outline-dashed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: file || _optionalChain([company, 'optionalAccess',
|
|
13496
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-96 flex-col justify-start gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileUploader, { value: files, onValueChange: setFiles, dropzoneOptions: dropzone2, className: "w-full p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "text-muted-foreground/50 rounded-lg outline-1 outline-dashed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: file || _optionalChain([company, 'optionalAccess', _375 => _375.logo]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
13477
13497
|
_image2.default,
|
|
13478
13498
|
{
|
|
13479
|
-
src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess',
|
|
13499
|
+
src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess', _376 => _376.logo]) || "",
|
|
13480
13500
|
alt: t("company.logo_alt"),
|
|
13481
13501
|
width: 200,
|
|
13482
13502
|
height: 200,
|
|
13483
|
-
unoptimized: _chunkNPGX2GJDjs.isRemoteImageSrc.call(void 0, file ? void 0 : _optionalChain([company, 'optionalAccess',
|
|
13503
|
+
unoptimized: _chunkNPGX2GJDjs.isRemoteImageSrc.call(void 0, file ? void 0 : _optionalChain([company, 'optionalAccess', _377 => _377.logo]))
|
|
13484
13504
|
}
|
|
13485
13505
|
) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
13486
13506
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, { className: "my-4 h-8 w-8" }),
|
|
@@ -13511,7 +13531,7 @@ function CompanyEditorInternal({
|
|
|
13511
13531
|
}
|
|
13512
13532
|
),
|
|
13513
13533
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SectionHeader, { className: "mt-2", children: t(`company.sections.fiscal_data`) }),
|
|
13514
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess',
|
|
13534
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess', _378 => _378.fiscal_data])) })
|
|
13515
13535
|
] }),
|
|
13516
13536
|
canAccessFeatures && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-96 flex-col justify-start gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ScrollArea, { className: "h-max", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFeatures, { form, name: t(`company.features_and_modules`), features }) }) })
|
|
13517
13537
|
] })
|
|
@@ -13882,7 +13902,7 @@ function NotificationToast(notification, t, generateUrl, reouter, dateLocaleSour
|
|
|
13882
13902
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
13883
13903
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
|
|
13884
13904
|
strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
|
|
13885
|
-
actor: _nullishCoalesce(_optionalChain([data, 'access',
|
|
13905
|
+
actor: _nullishCoalesce(_optionalChain([data, 'access', _379 => _379.actor, 'optionalAccess', _380 => _380.name]), () => ( "")),
|
|
13886
13906
|
title: data.title,
|
|
13887
13907
|
message: _nullishCoalesce(notification.message, () => ( ""))
|
|
13888
13908
|
}) }),
|
|
@@ -13925,7 +13945,7 @@ function NotificationMenuItem({ notification, closePopover }) {
|
|
|
13925
13945
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
13926
13946
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-foreground text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
|
|
13927
13947
|
strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { className: "font-medium", children: chunks }), "strong"),
|
|
13928
|
-
actor: _nullishCoalesce(_optionalChain([data, 'access',
|
|
13948
|
+
actor: _nullishCoalesce(_optionalChain([data, 'access', _381 => _381.actor, 'optionalAccess', _382 => _382.name]), () => ( "")),
|
|
13929
13949
|
title: data.title,
|
|
13930
13950
|
message: _nullishCoalesce(notification.message, () => ( ""))
|
|
13931
13951
|
}) }),
|
|
@@ -13996,7 +14016,7 @@ var NotificationContextProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(v
|
|
|
13996
14016
|
_react.useEffect.call(void 0, () => {
|
|
13997
14017
|
if (hasInitiallyLoaded || !currentUser) return;
|
|
13998
14018
|
if (_chunkG4JR3SFVjs.isRolesConfigured.call(void 0, )) {
|
|
13999
|
-
const isAdmin = _optionalChain([currentUser, 'access',
|
|
14019
|
+
const isAdmin = _optionalChain([currentUser, 'access', _383 => _383.roles, 'optionalAccess', _384 => _384.some, 'call', _385 => _385((role) => role.id === _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator)]);
|
|
14000
14020
|
if (isAdmin) {
|
|
14001
14021
|
setHasInitiallyLoaded(true);
|
|
14002
14022
|
return;
|
|
@@ -14182,7 +14202,7 @@ function OnboardingProvider({
|
|
|
14182
14202
|
const id = activeTourIdRef.current;
|
|
14183
14203
|
cleanupRoots();
|
|
14184
14204
|
resetState();
|
|
14185
|
-
if (id) _optionalChain([onTourEnd, 'optionalCall',
|
|
14205
|
+
if (id) _optionalChain([onTourEnd, 'optionalCall', _386 => _386(id, reason)]);
|
|
14186
14206
|
},
|
|
14187
14207
|
[cleanupRoots, resetState, onTourEnd]
|
|
14188
14208
|
);
|
|
@@ -14195,14 +14215,14 @@ function OnboardingProvider({
|
|
|
14195
14215
|
cleanupRoots();
|
|
14196
14216
|
resetState();
|
|
14197
14217
|
}, [cleanupRoots, resetState, teardown]);
|
|
14198
|
-
const nextStep = _react.useCallback.call(void 0, () => _optionalChain([driverRef, 'access',
|
|
14199
|
-
const previousStep = _react.useCallback.call(void 0, () => _optionalChain([driverRef, 'access',
|
|
14200
|
-
const goToStep = _react.useCallback.call(void 0, (index) => _optionalChain([driverRef, 'access',
|
|
14218
|
+
const nextStep = _react.useCallback.call(void 0, () => _optionalChain([driverRef, 'access', _387 => _387.current, 'optionalAccess', _388 => _388.moveNext, 'call', _389 => _389()]), []);
|
|
14219
|
+
const previousStep = _react.useCallback.call(void 0, () => _optionalChain([driverRef, 'access', _390 => _390.current, 'optionalAccess', _391 => _391.movePrevious, 'call', _392 => _392()]), []);
|
|
14220
|
+
const goToStep = _react.useCallback.call(void 0, (index) => _optionalChain([driverRef, 'access', _393 => _393.current, 'optionalAccess', _394 => _394.moveTo, 'call', _395 => _395(index)]), []);
|
|
14201
14221
|
const startTour = _react.useCallback.call(void 0,
|
|
14202
14222
|
(tourId, steps) => {
|
|
14203
14223
|
if (typeof window === "undefined") return;
|
|
14204
14224
|
if (driverRef.current) closeTour();
|
|
14205
|
-
const tourSteps = _nullishCoalesce(steps, () => ( _optionalChain([tours, 'access',
|
|
14225
|
+
const tourSteps = _nullishCoalesce(steps, () => ( _optionalChain([tours, 'access', _396 => _396.find, 'call', _397 => _397((t) => t.id === tourId), 'optionalAccess', _398 => _398.steps])));
|
|
14206
14226
|
if (!tourSteps || tourSteps.length === 0) {
|
|
14207
14227
|
console.warn(`No steps found for tour: ${tourId}`);
|
|
14208
14228
|
return;
|
|
@@ -14220,12 +14240,12 @@ function OnboardingProvider({
|
|
|
14220
14240
|
else instance2.movePrevious();
|
|
14221
14241
|
if (driverRef.current === instance2 && !instance2.isActive()) teardown("dismissed");
|
|
14222
14242
|
}, "go");
|
|
14223
|
-
if (_optionalChain([target, 'optionalAccess',
|
|
14243
|
+
if (_optionalChain([target, 'optionalAccess', _399 => _399.showDelay])) setTimeout(go, target.showDelay);
|
|
14224
14244
|
else go();
|
|
14225
14245
|
}, "move");
|
|
14226
14246
|
const end = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (reason) => {
|
|
14227
14247
|
endReasonRef.current = reason;
|
|
14228
|
-
_optionalChain([driverRef, 'access',
|
|
14248
|
+
_optionalChain([driverRef, 'access', _400 => _400.current, 'optionalAccess', _401 => _401.destroy, 'call', _402 => _402()]);
|
|
14229
14249
|
teardown(reason);
|
|
14230
14250
|
}, "end");
|
|
14231
14251
|
const driveSteps = tourSteps.map((stepConfig, index) => {
|
|
@@ -14267,10 +14287,10 @@ function OnboardingProvider({
|
|
|
14267
14287
|
onHighlightStarted: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
14268
14288
|
setIsTourActive(true);
|
|
14269
14289
|
setCurrentStepIndex(index);
|
|
14270
|
-
_optionalChain([stepConfig, 'access',
|
|
14290
|
+
_optionalChain([stepConfig, 'access', _403 => _403.onShow, 'optionalCall', _404 => _404()]);
|
|
14271
14291
|
}, "onHighlightStarted"),
|
|
14272
14292
|
onDeselected: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
14273
|
-
_optionalChain([stepConfig, 'access',
|
|
14293
|
+
_optionalChain([stepConfig, 'access', _405 => _405.onHide, 'optionalCall', _406 => _406()]);
|
|
14274
14294
|
const root = rootsRef.current.get(index);
|
|
14275
14295
|
if (root) {
|
|
14276
14296
|
rootsRef.current.delete(index);
|
|
@@ -14298,7 +14318,7 @@ function OnboardingProvider({
|
|
|
14298
14318
|
);
|
|
14299
14319
|
_react.useEffect.call(void 0, () => {
|
|
14300
14320
|
return () => {
|
|
14301
|
-
_optionalChain([driverRef, 'access',
|
|
14321
|
+
_optionalChain([driverRef, 'access', _407 => _407.current, 'optionalAccess', _408 => _408.destroy, 'call', _409 => _409()]);
|
|
14302
14322
|
cleanupRoots();
|
|
14303
14323
|
};
|
|
14304
14324
|
}, [cleanupRoots]);
|
|
@@ -14431,7 +14451,7 @@ function HowToMultiSelector({
|
|
|
14431
14451
|
retriever: (params) => _chunkNPGX2GJDjs.HowToService.findMany(params),
|
|
14432
14452
|
module: _chunkZ6T2575Ajs.Modules.HowTo,
|
|
14433
14453
|
getLabel: (howTo) => howTo.name,
|
|
14434
|
-
excludeId: _optionalChain([currentHowTo, 'optionalAccess',
|
|
14454
|
+
excludeId: _optionalChain([currentHowTo, 'optionalAccess', _410 => _410.id]),
|
|
14435
14455
|
onChange
|
|
14436
14456
|
}
|
|
14437
14457
|
);
|
|
@@ -14539,17 +14559,17 @@ function HowToEditorInternal({
|
|
|
14539
14559
|
);
|
|
14540
14560
|
const getDefaultValues = _react.useCallback.call(void 0,
|
|
14541
14561
|
() => ({
|
|
14542
|
-
id: _optionalChain([howTo, 'optionalAccess',
|
|
14543
|
-
name: _optionalChain([howTo, 'optionalAccess',
|
|
14544
|
-
description: _optionalChain([howTo, 'optionalAccess',
|
|
14545
|
-
pages: _chunkNPGX2GJDjs.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess',
|
|
14546
|
-
howToType: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
14547
|
-
slug: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
14548
|
-
order: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
14549
|
-
summary: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
14550
|
-
tags: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
14551
|
-
contextualKeys: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
14552
|
-
draft: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
14562
|
+
id: _optionalChain([howTo, 'optionalAccess', _411 => _411.id]) || _uuid.v4.call(void 0, ),
|
|
14563
|
+
name: _optionalChain([howTo, 'optionalAccess', _412 => _412.name]) || "",
|
|
14564
|
+
description: _optionalChain([howTo, 'optionalAccess', _413 => _413.description]) || [],
|
|
14565
|
+
pages: _chunkNPGX2GJDjs.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess', _414 => _414.pages])),
|
|
14566
|
+
howToType: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _415 => _415.howToType]), () => ( "how-to")),
|
|
14567
|
+
slug: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _416 => _416.slug]), () => ( "")),
|
|
14568
|
+
order: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _417 => _417.order]), () => ( 0)),
|
|
14569
|
+
summary: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _418 => _418.summary]), () => ( "")),
|
|
14570
|
+
tags: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _419 => _419.tags]), () => ( []))).join(", "),
|
|
14571
|
+
contextualKeys: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _420 => _420.contextualKeys]), () => ( []))).join(", "),
|
|
14572
|
+
draft: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _421 => _421.draft]), () => ( false)),
|
|
14553
14573
|
relatedArticles: []
|
|
14554
14574
|
}),
|
|
14555
14575
|
[howTo]
|
|
@@ -14560,7 +14580,7 @@ function HowToEditorInternal({
|
|
|
14560
14580
|
});
|
|
14561
14581
|
const initialRelatedIds = _react.useRef.call(void 0, []);
|
|
14562
14582
|
_react.useEffect.call(void 0, () => {
|
|
14563
|
-
if (!_optionalChain([howTo, 'optionalAccess',
|
|
14583
|
+
if (!_optionalChain([howTo, 'optionalAccess', _422 => _422.howToType]) || !_optionalChain([howTo, 'optionalAccess', _423 => _423.slug])) return;
|
|
14564
14584
|
let active = true;
|
|
14565
14585
|
_chunkNPGX2GJDjs.HowToService.findRelated({ howToType: howTo.howToType, slug: howTo.slug }).then((list) => {
|
|
14566
14586
|
if (!active) return;
|
|
@@ -14599,7 +14619,7 @@ function HowToEditorInternal({
|
|
|
14599
14619
|
{
|
|
14600
14620
|
form,
|
|
14601
14621
|
entityType: t(`entities.howtos`, { count: 1 }),
|
|
14602
|
-
entityName: _optionalChain([howTo, 'optionalAccess',
|
|
14622
|
+
entityName: _optionalChain([howTo, 'optionalAccess', _424 => _424.name]),
|
|
14603
14623
|
isEdit: !!howTo,
|
|
14604
14624
|
module: _chunkZ6T2575Ajs.Modules.HowTo,
|
|
14605
14625
|
propagateChanges,
|
|
@@ -14976,7 +14996,7 @@ function withPatchedTitle(source, title) {
|
|
|
14976
14996
|
return _chunkNPGX2GJDjs.rehydrate.call(void 0, _chunkZ6T2575Ajs.Modules.Assistant, {
|
|
14977
14997
|
jsonApi: {
|
|
14978
14998
|
...dehydrated.jsonApi,
|
|
14979
|
-
attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access',
|
|
14999
|
+
attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _425 => _425.jsonApi, 'optionalAccess', _426 => _426.attributes]), () => ( {})), title }
|
|
14980
15000
|
},
|
|
14981
15001
|
included: dehydrated.included
|
|
14982
15002
|
});
|
|
@@ -15011,7 +15031,7 @@ function AssistantProvider({
|
|
|
15011
15031
|
const [status, setStatus] = _react.useState.call(void 0, void 0);
|
|
15012
15032
|
const [failedMessageIds, setFailedMessageIds] = _react.useState.call(void 0, () => /* @__PURE__ */ new Set());
|
|
15013
15033
|
const [operatorMode, setOperatorMode] = _react.useState.call(void 0,
|
|
15014
|
-
() => _optionalChain([dehydratedAssistant, 'optionalAccess',
|
|
15034
|
+
() => _optionalChain([dehydratedAssistant, 'optionalAccess', _427 => _427.jsonApi, 'optionalAccess', _428 => _428.attributes, 'optionalAccess', _429 => _429.engine]) === "operator"
|
|
15015
15035
|
);
|
|
15016
15036
|
const [pendingScope, setPendingScope] = _react.useState.call(void 0, scope);
|
|
15017
15037
|
const { socket } = useSocketContext();
|
|
@@ -15021,7 +15041,7 @@ function AssistantProvider({
|
|
|
15021
15041
|
if (!trimmed) return;
|
|
15022
15042
|
const optimistic = _chunkNPGX2GJDjs.AssistantMessage.buildOptimistic({
|
|
15023
15043
|
content: trimmed,
|
|
15024
|
-
assistantId: _optionalChain([assistant, 'optionalAccess',
|
|
15044
|
+
assistantId: _optionalChain([assistant, 'optionalAccess', _430 => _430.id]),
|
|
15025
15045
|
position: nextPosition(messages)
|
|
15026
15046
|
});
|
|
15027
15047
|
setMessages((prev) => [...prev, optimistic]);
|
|
@@ -15031,22 +15051,22 @@ function AssistantProvider({
|
|
|
15031
15051
|
if (assistant && payload.assistantId && payload.assistantId !== assistant.id) return;
|
|
15032
15052
|
if (typeof payload.status === "string") setStatus(payload.status);
|
|
15033
15053
|
}, "handler");
|
|
15034
|
-
_optionalChain([socket, 'optionalAccess',
|
|
15054
|
+
_optionalChain([socket, 'optionalAccess', _431 => _431.on, 'call', _432 => _432("assistant:status", handler)]);
|
|
15035
15055
|
let createdHandled = false;
|
|
15036
15056
|
const createdHandler = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (payload) => {
|
|
15037
15057
|
if (createdHandled) return;
|
|
15038
|
-
const data = _optionalChain([payload, 'optionalAccess',
|
|
15058
|
+
const data = _optionalChain([payload, 'optionalAccess', _433 => _433.assistant, 'optionalAccess', _434 => _434.data]);
|
|
15039
15059
|
if (!data || typeof data !== "object" || typeof data.id !== "string" || !data.id) return;
|
|
15040
15060
|
let thread;
|
|
15041
15061
|
try {
|
|
15042
15062
|
thread = _chunkNPGX2GJDjs.rehydrate.call(void 0, _chunkZ6T2575Ajs.Modules.Assistant, {
|
|
15043
15063
|
jsonApi: data,
|
|
15044
|
-
included: _nullishCoalesce(_optionalChain([payload, 'access',
|
|
15064
|
+
included: _nullishCoalesce(_optionalChain([payload, 'access', _435 => _435.assistant, 'optionalAccess', _436 => _436.included]), () => ( []))
|
|
15045
15065
|
});
|
|
15046
15066
|
} catch (e9) {
|
|
15047
15067
|
return;
|
|
15048
15068
|
}
|
|
15049
|
-
if (!_optionalChain([thread, 'optionalAccess',
|
|
15069
|
+
if (!_optionalChain([thread, 'optionalAccess', _437 => _437.id])) return;
|
|
15050
15070
|
createdHandled = true;
|
|
15051
15071
|
setAssistant(thread);
|
|
15052
15072
|
setThreads((prev) => [thread, ...prev.filter((row) => row.id !== thread.id)]);
|
|
@@ -15054,16 +15074,16 @@ function AssistantProvider({
|
|
|
15054
15074
|
window.history.replaceState(null, "", resolveThreadUrl(thread.id));
|
|
15055
15075
|
}
|
|
15056
15076
|
}, "createdHandler");
|
|
15057
|
-
if (!assistant) _optionalChain([socket, 'optionalAccess',
|
|
15077
|
+
if (!assistant) _optionalChain([socket, 'optionalAccess', _438 => _438.on, 'call', _439 => _439("assistant:created", createdHandler)]);
|
|
15058
15078
|
try {
|
|
15059
15079
|
if (!assistant) {
|
|
15060
15080
|
const input = {
|
|
15061
15081
|
firstMessage: trimmed,
|
|
15062
|
-
howToMode: _optionalChain([opts, 'optionalAccess',
|
|
15063
|
-
limitToHowToId: _optionalChain([opts, 'optionalAccess',
|
|
15064
|
-
handbookMode: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
15065
|
-
limitToHandbookPageId: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
15066
|
-
contentBlocks: _optionalChain([opts, 'optionalAccess',
|
|
15082
|
+
howToMode: _optionalChain([opts, 'optionalAccess', _440 => _440.howToMode]),
|
|
15083
|
+
limitToHowToId: _optionalChain([opts, 'optionalAccess', _441 => _441.limitToHowToId]),
|
|
15084
|
+
handbookMode: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _442 => _442.handbookMode]), () => ( _optionalChain([retrievalMode, 'optionalAccess', _443 => _443.handbookMode]))),
|
|
15085
|
+
limitToHandbookPageId: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _444 => _444.limitToHandbookPageId]), () => ( _optionalChain([retrievalMode, 'optionalAccess', _445 => _445.limitToHandbookPageId]))),
|
|
15086
|
+
contentBlocks: _optionalChain([opts, 'optionalAccess', _446 => _446.contentBlocks]),
|
|
15067
15087
|
boundContent: pendingScope
|
|
15068
15088
|
};
|
|
15069
15089
|
const created = operatorMode ? await _chunkNPGX2GJDjs.AssistantService.createOperator(input) : await _chunkNPGX2GJDjs.AssistantService.create(input);
|
|
@@ -15080,15 +15100,15 @@ function AssistantProvider({
|
|
|
15080
15100
|
const result = operatorMode ? await _chunkNPGX2GJDjs.AssistantService.appendMessageOperator({
|
|
15081
15101
|
assistantId: assistant.id,
|
|
15082
15102
|
content: trimmed,
|
|
15083
|
-
contentBlocks: _optionalChain([opts, 'optionalAccess',
|
|
15103
|
+
contentBlocks: _optionalChain([opts, 'optionalAccess', _447 => _447.contentBlocks])
|
|
15084
15104
|
}) : await _chunkNPGX2GJDjs.AssistantService.appendMessage({
|
|
15085
15105
|
assistantId: assistant.id,
|
|
15086
15106
|
content: trimmed,
|
|
15087
|
-
howToMode: _optionalChain([opts, 'optionalAccess',
|
|
15088
|
-
limitToHowToId: _optionalChain([opts, 'optionalAccess',
|
|
15089
|
-
handbookMode: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
15090
|
-
limitToHandbookPageId: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
15091
|
-
contentBlocks: _optionalChain([opts, 'optionalAccess',
|
|
15107
|
+
howToMode: _optionalChain([opts, 'optionalAccess', _448 => _448.howToMode]),
|
|
15108
|
+
limitToHowToId: _optionalChain([opts, 'optionalAccess', _449 => _449.limitToHowToId]),
|
|
15109
|
+
handbookMode: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _450 => _450.handbookMode]), () => ( _optionalChain([retrievalMode, 'optionalAccess', _451 => _451.handbookMode]))),
|
|
15110
|
+
limitToHandbookPageId: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _452 => _452.limitToHandbookPageId]), () => ( _optionalChain([retrievalMode, 'optionalAccess', _453 => _453.limitToHandbookPageId]))),
|
|
15111
|
+
contentBlocks: _optionalChain([opts, 'optionalAccess', _454 => _454.contentBlocks])
|
|
15092
15112
|
});
|
|
15093
15113
|
setMessages((prev) => [...stripOptimistic(prev), ...result]);
|
|
15094
15114
|
}
|
|
@@ -15099,8 +15119,8 @@ function AssistantProvider({
|
|
|
15099
15119
|
return next;
|
|
15100
15120
|
});
|
|
15101
15121
|
} finally {
|
|
15102
|
-
_optionalChain([socket, 'optionalAccess',
|
|
15103
|
-
if (!assistant) _optionalChain([socket, 'optionalAccess',
|
|
15122
|
+
_optionalChain([socket, 'optionalAccess', _455 => _455.off, 'call', _456 => _456("assistant:status", handler)]);
|
|
15123
|
+
if (!assistant) _optionalChain([socket, 'optionalAccess', _457 => _457.off, 'call', _458 => _458("assistant:created", createdHandler)]);
|
|
15104
15124
|
setSending(false);
|
|
15105
15125
|
setStatus(void 0);
|
|
15106
15126
|
}
|
|
@@ -15166,7 +15186,7 @@ function AssistantProvider({
|
|
|
15166
15186
|
await _chunkNPGX2GJDjs.AssistantService.delete({ id });
|
|
15167
15187
|
setThreads((prev) => prev.filter((t2) => t2.id !== id));
|
|
15168
15188
|
setAssistant((prev) => {
|
|
15169
|
-
if (_optionalChain([prev, 'optionalAccess',
|
|
15189
|
+
if (_optionalChain([prev, 'optionalAccess', _459 => _459.id]) === id) {
|
|
15170
15190
|
setMessages([]);
|
|
15171
15191
|
return void 0;
|
|
15172
15192
|
}
|
|
@@ -15178,7 +15198,7 @@ function AssistantProvider({
|
|
|
15178
15198
|
(async () => {
|
|
15179
15199
|
setThreadsLoading(true);
|
|
15180
15200
|
try {
|
|
15181
|
-
const loaded = await _chunkNPGX2GJDjs.AssistantService.findMany({ boundType: _optionalChain([scope, 'optionalAccess',
|
|
15201
|
+
const loaded = await _chunkNPGX2GJDjs.AssistantService.findMany({ boundType: _optionalChain([scope, 'optionalAccess', _460 => _460.type]), boundId: _optionalChain([scope, 'optionalAccess', _461 => _461.id]) });
|
|
15182
15202
|
if (!cancelled) setThreads(loaded);
|
|
15183
15203
|
} finally {
|
|
15184
15204
|
if (!cancelled) setThreadsLoading(false);
|
|
@@ -15187,7 +15207,7 @@ function AssistantProvider({
|
|
|
15187
15207
|
return () => {
|
|
15188
15208
|
cancelled = true;
|
|
15189
15209
|
};
|
|
15190
|
-
}, [_optionalChain([scope, 'optionalAccess',
|
|
15210
|
+
}, [_optionalChain([scope, 'optionalAccess', _462 => _462.type]), _optionalChain([scope, 'optionalAccess', _463 => _463.id])]);
|
|
15191
15211
|
const value = _react.useMemo.call(void 0,
|
|
15192
15212
|
() => ({
|
|
15193
15213
|
assistant,
|
|
@@ -15239,7 +15259,7 @@ function AssistantProvider({
|
|
|
15239
15259
|
const response = {
|
|
15240
15260
|
type: _nullishCoalesce(titleOverride, () => ( t("entities.assistants", { count: assistant ? 1 : 2 })))
|
|
15241
15261
|
};
|
|
15242
|
-
if (_optionalChain([assistant, 'optionalAccess',
|
|
15262
|
+
if (_optionalChain([assistant, 'optionalAccess', _464 => _464.title])) {
|
|
15243
15263
|
response.element = assistant.title.length > 25 ? `${assistant.title.substring(0, 25)}...` : assistant.title;
|
|
15244
15264
|
}
|
|
15245
15265
|
response.functions = [
|
|
@@ -15402,10 +15422,10 @@ function readEntityTitle() {
|
|
|
15402
15422
|
const title = document.title;
|
|
15403
15423
|
if (title.includes("]")) {
|
|
15404
15424
|
const afterEntityType = title.split("]")[1];
|
|
15405
|
-
return _optionalChain([afterEntityType, 'optionalAccess',
|
|
15425
|
+
return _optionalChain([afterEntityType, 'optionalAccess', _465 => _465.split, 'call', _466 => _466("|"), 'access', _467 => _467[0], 'optionalAccess', _468 => _468.trim, 'call', _469 => _469()]) || null;
|
|
15406
15426
|
}
|
|
15407
15427
|
if (!title.includes("|")) return null;
|
|
15408
|
-
return _optionalChain([title, 'access',
|
|
15428
|
+
return _optionalChain([title, 'access', _470 => _470.split, 'call', _471 => _471("|"), 'access', _472 => _472[0], 'access', _473 => _473.split, 'call', _474 => _474("\xB7"), 'access', _475 => _475[0], 'optionalAccess', _476 => _476.trim, 'call', _477 => _477()]) || null;
|
|
15409
15429
|
}
|
|
15410
15430
|
_chunk7QVYU63Ejs.__name.call(void 0, readEntityTitle, "readEntityTitle");
|
|
15411
15431
|
function usePageTracker() {
|
|
@@ -15434,7 +15454,7 @@ function usePageTracker() {
|
|
|
15434
15454
|
const existing = prev.find((page) => page.url === baseUrl);
|
|
15435
15455
|
const refreshed = {
|
|
15436
15456
|
url: baseUrl,
|
|
15437
|
-
title: _nullishCoalesce(_optionalChain([existing, 'optionalAccess',
|
|
15457
|
+
title: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _478 => _478.title]), () => ( foundModule.name)),
|
|
15438
15458
|
moduleType: foundModule.name,
|
|
15439
15459
|
timestamp: Date.now()
|
|
15440
15460
|
};
|
|
@@ -15492,7 +15512,7 @@ function urlBase64ToUint8Array(base64String) {
|
|
|
15492
15512
|
_chunk7QVYU63Ejs.__name.call(void 0, urlBase64ToUint8Array, "urlBase64ToUint8Array");
|
|
15493
15513
|
function usePushNotifications(params) {
|
|
15494
15514
|
const { currentUser, canSubscribe } = params;
|
|
15495
|
-
const userId = _optionalChain([currentUser, 'optionalAccess',
|
|
15515
|
+
const userId = _optionalChain([currentUser, 'optionalAccess', _479 => _479.id]);
|
|
15496
15516
|
_react.useEffect.call(void 0, () => {
|
|
15497
15517
|
if (!userId || !canSubscribe) return;
|
|
15498
15518
|
const register = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
@@ -15542,7 +15562,7 @@ function usePushNotifications(params) {
|
|
|
15542
15562
|
if (!("serviceWorker" in navigator)) return;
|
|
15543
15563
|
const sessionKey = `push_registered_${userId}`;
|
|
15544
15564
|
const onMessage = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (event) => {
|
|
15545
|
-
if (_optionalChain([event, 'access',
|
|
15565
|
+
if (_optionalChain([event, 'access', _480 => _480.data, 'optionalAccess', _481 => _481.type]) !== "PUSH_RESUBSCRIBED" || !event.data.subscription) return;
|
|
15546
15566
|
const subscription = event.data.subscription;
|
|
15547
15567
|
const subscriptionHash = btoa(JSON.stringify(subscription));
|
|
15548
15568
|
if (sessionStorage.getItem(sessionKey) === subscriptionHash) return;
|
|
@@ -15625,14 +15645,14 @@ function useSocket({ token, paused = false }) {
|
|
|
15625
15645
|
});
|
|
15626
15646
|
}, "handleMessage");
|
|
15627
15647
|
const handleNotification = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
|
|
15628
|
-
const resource = _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
15629
|
-
if (!_optionalChain([resource, 'optionalAccess',
|
|
15648
|
+
const resource = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _482 => _482.data]), () => ( _optionalChain([data, 'optionalAccess', _483 => _483.jsonApi])));
|
|
15649
|
+
if (!_optionalChain([resource, 'optionalAccess', _484 => _484.type])) {
|
|
15630
15650
|
console.warn("[useSocket] ignoring notification with unexpected payload shape", data);
|
|
15631
15651
|
return;
|
|
15632
15652
|
}
|
|
15633
15653
|
const notification = _chunkNPGX2GJDjs.rehydrate.call(void 0, _chunkZ6T2575Ajs.Modules.Notification, {
|
|
15634
15654
|
jsonApi: resource,
|
|
15635
|
-
included: _optionalChain([data, 'optionalAccess',
|
|
15655
|
+
included: _optionalChain([data, 'optionalAccess', _485 => _485.included]) || []
|
|
15636
15656
|
});
|
|
15637
15657
|
if (notification) {
|
|
15638
15658
|
setSocketNotifications((prev) => {
|
|
@@ -15770,11 +15790,11 @@ function BreadcrumbMobile({
|
|
|
15770
15790
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Breadcrumb, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreadcrumbList, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreadcrumbItem, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: generateUrl({ page: `/` }), children: rootLabel }) }) }) });
|
|
15771
15791
|
}
|
|
15772
15792
|
if (allItems.length <= 1) {
|
|
15773
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground block min-w-0 truncate px-1.5 text-xs/relaxed font-normal", children: _optionalChain([lastItem, 'optionalAccess',
|
|
15793
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground block min-w-0 truncate px-1.5 text-xs/relaxed font-normal", children: _optionalChain([lastItem, 'optionalAccess', _486 => _486.name]) });
|
|
15774
15794
|
}
|
|
15775
15795
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenu, { open, onOpenChange: setOpen, children: [
|
|
15776
15796
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenuTrigger, { className: "text-foreground text-xs/relaxed font-normal hover:bg-accent flex min-h-9 min-w-0 items-center gap-1 rounded-md px-1.5 py-0.5 transition-colors outline-none", children: [
|
|
15777
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "truncate", children: _optionalChain([lastItem, 'optionalAccess',
|
|
15797
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "truncate", children: _optionalChain([lastItem, 'optionalAccess', _487 => _487.name]) }),
|
|
15778
15798
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronDownIcon, { className: "text-muted-foreground size-3.5 shrink-0" })
|
|
15779
15799
|
] }),
|
|
15780
15800
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuContent, { align: "start", children: allItems.map(
|
|
@@ -15792,8 +15812,8 @@ function BreadcrumbMobile({
|
|
|
15792
15812
|
href: item.href,
|
|
15793
15813
|
className: _chunkNPGX2GJDjs.cn.call(void 0, props.className, "text-foreground font-normal"),
|
|
15794
15814
|
onClick: (event) => {
|
|
15795
|
-
_optionalChain([props, 'access',
|
|
15796
|
-
_optionalChain([item, 'access',
|
|
15815
|
+
_optionalChain([props, 'access', _488 => _488.onClick, 'optionalCall', _489 => _489(event)]);
|
|
15816
|
+
_optionalChain([item, 'access', _490 => _490.onClick, 'optionalCall', _491 => _491()]);
|
|
15797
15817
|
},
|
|
15798
15818
|
children: props.children
|
|
15799
15819
|
}
|
|
@@ -15811,7 +15831,7 @@ function BreadcrumbNavigation({ items, rootLabel, showRoot = true }) {
|
|
|
15811
15831
|
const generateUrl = usePageUrlGenerator();
|
|
15812
15832
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
15813
15833
|
const isMobile = _chunkNPGX2GJDjs.useIsMobile.call(void 0, );
|
|
15814
|
-
const root = _optionalChain([rootLabel, 'optionalAccess',
|
|
15834
|
+
const root = _optionalChain([rootLabel, 'optionalAccess', _492 => _492.trim, 'call', _493 => _493()]) ? rootLabel : t(`common.home`);
|
|
15815
15835
|
if (isMobile) {
|
|
15816
15836
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreadcrumbMobile, { items, generateUrl, rootLabel: root, showRoot });
|
|
15817
15837
|
}
|
|
@@ -16218,12 +16238,12 @@ var _remarkgfm = require('remark-gfm'); var _remarkgfm2 = _interopRequireDefault
|
|
|
16218
16238
|
|
|
16219
16239
|
function mermaidSourceOf(node) {
|
|
16220
16240
|
const pre = node;
|
|
16221
|
-
const code = _optionalChain([pre, 'optionalAccess',
|
|
16222
|
-
if (_optionalChain([code, 'optionalAccess',
|
|
16223
|
-
const classNames = Array.isArray(_optionalChain([code, 'access',
|
|
16241
|
+
const code = _optionalChain([pre, 'optionalAccess', _494 => _494.children, 'optionalAccess', _495 => _495[0]]);
|
|
16242
|
+
if (_optionalChain([code, 'optionalAccess', _496 => _496.tagName]) !== "code") return void 0;
|
|
16243
|
+
const classNames = Array.isArray(_optionalChain([code, 'access', _497 => _497.properties, 'optionalAccess', _498 => _498.className])) ? code.properties.className : [];
|
|
16224
16244
|
if (!classNames.includes("language-mermaid")) return void 0;
|
|
16225
|
-
const text = _optionalChain([code, 'access',
|
|
16226
|
-
if (_optionalChain([text, 'optionalAccess',
|
|
16245
|
+
const text = _optionalChain([code, 'access', _499 => _499.children, 'optionalAccess', _500 => _500[0]]);
|
|
16246
|
+
if (_optionalChain([text, 'optionalAccess', _501 => _501.type]) !== "text" || typeof text.value !== "string") return void 0;
|
|
16227
16247
|
return text.value;
|
|
16228
16248
|
}
|
|
16229
16249
|
_chunk7QVYU63Ejs.__name.call(void 0, mermaidSourceOf, "mermaidSourceOf");
|
|
@@ -16493,7 +16513,7 @@ var railTriggerClass = _chunkNPGX2GJDjs.cn.call(void 0,
|
|
|
16493
16513
|
"data-active:text-primary dark:data-active:text-primary",
|
|
16494
16514
|
"data-active:font-medium data-active:shadow-none"
|
|
16495
16515
|
);
|
|
16496
|
-
var tabValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (tab) => _nullishCoalesce(_nullishCoalesce(tab.sectionKey, () => ( _optionalChain([tab, 'access',
|
|
16516
|
+
var tabValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (tab) => _nullishCoalesce(_nullishCoalesce(tab.sectionKey, () => ( _optionalChain([tab, 'access', _502 => _502.key, 'optionalAccess', _503 => _503.name]))), () => ( tab.label)), "tabValue");
|
|
16497
16517
|
function RoundPageContainer({
|
|
16498
16518
|
module,
|
|
16499
16519
|
id,
|
|
@@ -16528,7 +16548,7 @@ function RoundPageContainer({
|
|
|
16528
16548
|
_react.useEffect.call(void 0, () => {
|
|
16529
16549
|
if (!mounted) return;
|
|
16530
16550
|
const match = document.cookie.split("; ").find((row) => row.startsWith(`${detailsCookieName}=`));
|
|
16531
|
-
const stored = _optionalChain([match, 'optionalAccess',
|
|
16551
|
+
const stored = _optionalChain([match, 'optionalAccess', _504 => _504.split, 'call', _505 => _505("="), 'access', _506 => _506[1]]);
|
|
16532
16552
|
if (stored === "true") setShowDetailsState(true);
|
|
16533
16553
|
else if (stored === "false") setShowDetailsState(false);
|
|
16534
16554
|
else if (!defaultDetailsOpen && cardRef.current && detailsFitsByDefault({
|
|
@@ -16551,7 +16571,7 @@ function RoundPageContainer({
|
|
|
16551
16571
|
const clip = isFixed ? `overflow-hidden` : ``;
|
|
16552
16572
|
const scrollY = isFixed ? `overflow-y-auto` : ``;
|
|
16553
16573
|
const mobileBarClass = isFixed ? `` : `sticky bottom-0 z-30`;
|
|
16554
|
-
const detailsCookieName = _optionalChain([module, 'optionalAccess',
|
|
16574
|
+
const detailsCookieName = _optionalChain([module, 'optionalAccess', _507 => _507.name]) ? `${DETAILS_COOKIE_NAME}_${module.name}` : DETAILS_COOKIE_NAME;
|
|
16555
16575
|
const setShowDetails = _react.useCallback.call(void 0,
|
|
16556
16576
|
(value) => {
|
|
16557
16577
|
setShowDetailsState(value);
|
|
@@ -16584,13 +16604,13 @@ function RoundPageContainer({
|
|
|
16584
16604
|
} else {
|
|
16585
16605
|
rewriteUrl({ page: window.location.pathname, additionalParameters: { section: key }, mode: "push" });
|
|
16586
16606
|
}
|
|
16587
|
-
_optionalChain([onSectionChange, 'optionalCall',
|
|
16607
|
+
_optionalChain([onSectionChange, 'optionalCall', _508 => _508(key)]);
|
|
16588
16608
|
},
|
|
16589
16609
|
[module, id, rewriteUrl, onSectionChange]
|
|
16590
16610
|
);
|
|
16591
|
-
const activeTabDefinition = _optionalChain([tabs, 'optionalAccess',
|
|
16592
|
-
const activeFillHeight = _optionalChain([activeTabDefinition, 'optionalAccess',
|
|
16593
|
-
const activeConstrainWidth = _optionalChain([activeTabDefinition, 'optionalAccess',
|
|
16611
|
+
const activeTabDefinition = _optionalChain([tabs, 'optionalAccess', _509 => _509.find, 'call', _510 => _510((t2) => tabValue(t2) === activeTab)]);
|
|
16612
|
+
const activeFillHeight = _optionalChain([activeTabDefinition, 'optionalAccess', _511 => _511.fillHeight]) === true;
|
|
16613
|
+
const activeConstrainWidth = _optionalChain([activeTabDefinition, 'optionalAccess', _512 => _512.constrainWidth]) === true;
|
|
16594
16614
|
const { ungrouped, groups } = _react.useMemo.call(void 0, () => partitionTabs(_nullishCoalesce(tabs, () => ( []))), [tabs]);
|
|
16595
16615
|
const tabItems = _react.useMemo.call(void 0,
|
|
16596
16616
|
() => Object.fromEntries((_nullishCoalesce(tabs, () => ( []))).map((tab) => [tabValue(tab), _nullishCoalesce(tab.contentLabel, () => ( tab.label))])),
|
|
@@ -16601,7 +16621,7 @@ function RoundPageContainer({
|
|
|
16601
16621
|
const mobileFlow = isMobile && isFixed && (!activeFillHeight || activeDocumentTab) && !fullWidth;
|
|
16602
16622
|
const innerClip = mobileFlow ? `` : clip;
|
|
16603
16623
|
const innerScrollY = mobileFlow ? `` : scrollY;
|
|
16604
|
-
const showMobileSectionPicker = (_nullishCoalesce(_optionalChain([tabs, 'optionalAccess',
|
|
16624
|
+
const showMobileSectionPicker = (_nullishCoalesce(_optionalChain([tabs, 'optionalAccess', _513 => _513.length]), () => ( 0))) > 1;
|
|
16605
16625
|
if (!isReady) {
|
|
16606
16626
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
16607
16627
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -17023,14 +17043,14 @@ function BlockNoteEditorMentionHoverCard({
|
|
|
17023
17043
|
const entityType = target.dataset.mentionType;
|
|
17024
17044
|
const alias = target.dataset.mentionAlias;
|
|
17025
17045
|
setHovered((prev) => {
|
|
17026
|
-
if (_optionalChain([prev, 'optionalAccess',
|
|
17046
|
+
if (_optionalChain([prev, 'optionalAccess', _514 => _514.id]) === id && _optionalChain([prev, 'optionalAccess', _515 => _515.element]) === target) return prev;
|
|
17027
17047
|
return { id, entityType, alias, element: target };
|
|
17028
17048
|
});
|
|
17029
17049
|
}, "handleMouseOver");
|
|
17030
17050
|
const handleMouseOut = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
|
|
17031
17051
|
const target = e.target.closest("[data-mention-id]");
|
|
17032
17052
|
if (!target) return;
|
|
17033
|
-
const related = _optionalChain([e, 'access',
|
|
17053
|
+
const related = _optionalChain([e, 'access', _516 => _516.relatedTarget, 'optionalAccess', _517 => _517.closest, 'call', _518 => _518("[data-mention-id]")]);
|
|
17034
17054
|
if (related) return;
|
|
17035
17055
|
scheduleClose();
|
|
17036
17056
|
}, "handleMouseOut");
|
|
@@ -17044,7 +17064,7 @@ function BlockNoteEditorMentionHoverCard({
|
|
|
17044
17064
|
}, [containerRef, mentionResolveFn, cancelClose, scheduleClose]);
|
|
17045
17065
|
if (!hovered || !mentionResolveFn) return null;
|
|
17046
17066
|
const resolved = mentionResolveFn(hovered.id, hovered.entityType, hovered.alias);
|
|
17047
|
-
if (!_optionalChain([resolved, 'optionalAccess',
|
|
17067
|
+
if (!_optionalChain([resolved, 'optionalAccess', _519 => _519.HoverContent])) return null;
|
|
17048
17068
|
const ContentComponent = resolved.HoverContent;
|
|
17049
17069
|
const rect = hovered.element.getBoundingClientRect();
|
|
17050
17070
|
return _reactdom.createPortal.call(void 0,
|
|
@@ -17089,28 +17109,28 @@ var parseMentionElement = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
17089
17109
|
}, "parseMentionElement");
|
|
17090
17110
|
var createMentionInlineContentSpec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (resolveFn, disableMention, nameResolver) => {
|
|
17091
17111
|
const MentionExternalHTML = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
|
|
17092
|
-
const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall',
|
|
17112
|
+
const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _520 => _520(props.id, props.entityType, props.alias)]), () => ( props.alias));
|
|
17093
17113
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { "data-mention-id": props.id, "data-mention-type": props.entityType, "data-mention-alias": props.alias, children: [
|
|
17094
17114
|
"@",
|
|
17095
17115
|
displayName
|
|
17096
17116
|
] });
|
|
17097
17117
|
}, "MentionExternalHTML");
|
|
17098
17118
|
const Mention = React2.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function Mention2(props) {
|
|
17099
|
-
const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall',
|
|
17119
|
+
const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _521 => _521(props.id, props.entityType, props.alias)]), () => ( props.alias));
|
|
17100
17120
|
if (disableMention) {
|
|
17101
|
-
const resolved2 = _optionalChain([resolveFn, 'optionalCall',
|
|
17102
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess',
|
|
17121
|
+
const resolved2 = _optionalChain([resolveFn, 'optionalCall', _522 => _522(props.id, props.entityType, displayName)]);
|
|
17122
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess', _523 => _523.url]), () => ( "#")), className: "text-primary", "data-mention-link": "", children: [
|
|
17103
17123
|
"@",
|
|
17104
17124
|
displayName
|
|
17105
17125
|
] });
|
|
17106
17126
|
}
|
|
17107
|
-
const resolved = _optionalChain([resolveFn, 'optionalCall',
|
|
17108
|
-
if (_optionalChain([resolved, 'optionalAccess',
|
|
17127
|
+
const resolved = _optionalChain([resolveFn, 'optionalCall', _524 => _524(props.id, props.entityType, displayName)]);
|
|
17128
|
+
if (_optionalChain([resolved, 'optionalAccess', _525 => _525.Inline])) {
|
|
17109
17129
|
const Custom = resolved.Inline;
|
|
17110
17130
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Custom, { ...props, alias: displayName });
|
|
17111
17131
|
}
|
|
17112
|
-
const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess',
|
|
17113
|
-
const handleClick = _optionalChain([resolved, 'optionalAccess',
|
|
17132
|
+
const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _526 => _526.url]), () => ( "#"));
|
|
17133
|
+
const handleClick = _optionalChain([resolved, 'optionalAccess', _527 => _527.onActivate]) ? (e) => resolved.onActivate(e, props) : void 0;
|
|
17114
17134
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
17115
17135
|
_link2.default,
|
|
17116
17136
|
{
|
|
@@ -17218,7 +17238,7 @@ function BlockNoteEditorMentionSuggestionMenu({
|
|
|
17218
17238
|
if (!suggestionMenuComponent) return void 0;
|
|
17219
17239
|
const Component2 = suggestionMenuComponent;
|
|
17220
17240
|
const Wrapped = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
|
|
17221
|
-
const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access',
|
|
17241
|
+
const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access', _528 => _528.items, 'access', _529 => _529[0], 'optionalAccess', _530 => _530.title]) === KEEP_OPEN_SENTINEL_TITLE;
|
|
17222
17242
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
17223
17243
|
Component2,
|
|
17224
17244
|
{
|
|
@@ -17227,7 +17247,7 @@ function BlockNoteEditorMentionSuggestionMenu({
|
|
|
17227
17247
|
selectedIndex: isSentinelOnly ? void 0 : props.selectedIndex,
|
|
17228
17248
|
onItemClick: (item) => {
|
|
17229
17249
|
if (item.title === KEEP_OPEN_SENTINEL_TITLE) return;
|
|
17230
|
-
_optionalChain([props, 'access',
|
|
17250
|
+
_optionalChain([props, 'access', _531 => _531.onItemClick, 'optionalCall', _532 => _532(item)]);
|
|
17231
17251
|
}
|
|
17232
17252
|
}
|
|
17233
17253
|
);
|
|
@@ -17530,10 +17550,10 @@ var cellId = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
|
|
|
17530
17550
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => params.toggleId ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
17531
17551
|
SelectRowCheckbox,
|
|
17532
17552
|
{
|
|
17533
|
-
checked: _optionalChain([params, 'access',
|
|
17553
|
+
checked: _optionalChain([params, 'access', _533 => _533.checkedIds, 'optionalAccess', _534 => _534.includes, 'call', _535 => _535(row.getValue(params.name))]) || false,
|
|
17534
17554
|
onCheckedChange: (value) => {
|
|
17535
17555
|
row.toggleSelected(!!value);
|
|
17536
|
-
_optionalChain([params, 'access',
|
|
17556
|
+
_optionalChain([params, 'access', _536 => _536.toggleId, 'optionalCall', _537 => _537(row.getValue(params.name))]);
|
|
17537
17557
|
}
|
|
17538
17558
|
}
|
|
17539
17559
|
) : null, "cell"),
|
|
@@ -17591,7 +17611,7 @@ function useJsonApiGet(params) {
|
|
|
17591
17611
|
const [response, setResponse] = _react.useState.call(void 0, null);
|
|
17592
17612
|
const isMounted = _react.useRef.call(void 0, true);
|
|
17593
17613
|
const fetchData = _react.useCallback.call(void 0, async () => {
|
|
17594
|
-
if (_optionalChain([params, 'access',
|
|
17614
|
+
if (_optionalChain([params, 'access', _538 => _538.options, 'optionalAccess', _539 => _539.enabled]) === false) return;
|
|
17595
17615
|
setLoading(true);
|
|
17596
17616
|
setError(null);
|
|
17597
17617
|
try {
|
|
@@ -17618,9 +17638,9 @@ function useJsonApiGet(params) {
|
|
|
17618
17638
|
setLoading(false);
|
|
17619
17639
|
}
|
|
17620
17640
|
}
|
|
17621
|
-
}, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access',
|
|
17641
|
+
}, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _540 => _540.options, 'optionalAccess', _541 => _541.enabled])]);
|
|
17622
17642
|
const fetchNextPage = _react.useCallback.call(void 0, async () => {
|
|
17623
|
-
if (!_optionalChain([response, 'optionalAccess',
|
|
17643
|
+
if (!_optionalChain([response, 'optionalAccess', _542 => _542.nextPage])) return;
|
|
17624
17644
|
setLoading(true);
|
|
17625
17645
|
try {
|
|
17626
17646
|
const nextResponse = await response.nextPage();
|
|
@@ -17641,7 +17661,7 @@ function useJsonApiGet(params) {
|
|
|
17641
17661
|
}
|
|
17642
17662
|
}, [response]);
|
|
17643
17663
|
const fetchPreviousPage = _react.useCallback.call(void 0, async () => {
|
|
17644
|
-
if (!_optionalChain([response, 'optionalAccess',
|
|
17664
|
+
if (!_optionalChain([response, 'optionalAccess', _543 => _543.prevPage])) return;
|
|
17645
17665
|
setLoading(true);
|
|
17646
17666
|
try {
|
|
17647
17667
|
const prevResponse = await response.prevPage();
|
|
@@ -17667,15 +17687,15 @@ function useJsonApiGet(params) {
|
|
|
17667
17687
|
return () => {
|
|
17668
17688
|
isMounted.current = false;
|
|
17669
17689
|
};
|
|
17670
|
-
}, [fetchData, ..._optionalChain([params, 'access',
|
|
17690
|
+
}, [fetchData, ..._optionalChain([params, 'access', _544 => _544.options, 'optionalAccess', _545 => _545.deps]) || []]);
|
|
17671
17691
|
return {
|
|
17672
17692
|
data,
|
|
17673
17693
|
loading,
|
|
17674
17694
|
error,
|
|
17675
17695
|
response,
|
|
17676
17696
|
refetch: fetchData,
|
|
17677
|
-
hasNextPage: !!_optionalChain([response, 'optionalAccess',
|
|
17678
|
-
hasPreviousPage: !!_optionalChain([response, 'optionalAccess',
|
|
17697
|
+
hasNextPage: !!_optionalChain([response, 'optionalAccess', _546 => _546.next]),
|
|
17698
|
+
hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _547 => _547.prev]),
|
|
17679
17699
|
fetchNextPage,
|
|
17680
17700
|
fetchPreviousPage
|
|
17681
17701
|
};
|
|
@@ -17753,17 +17773,17 @@ function useJsonApiMutation(config) {
|
|
|
17753
17773
|
if (apiResponse.ok) {
|
|
17754
17774
|
const resultData = apiResponse.data;
|
|
17755
17775
|
setData(resultData);
|
|
17756
|
-
_optionalChain([config, 'access',
|
|
17776
|
+
_optionalChain([config, 'access', _548 => _548.onSuccess, 'optionalCall', _549 => _549(resultData)]);
|
|
17757
17777
|
return resultData;
|
|
17758
17778
|
} else {
|
|
17759
17779
|
setError(apiResponse.error);
|
|
17760
|
-
_optionalChain([config, 'access',
|
|
17780
|
+
_optionalChain([config, 'access', _550 => _550.onError, 'optionalCall', _551 => _551(apiResponse.error)]);
|
|
17761
17781
|
return null;
|
|
17762
17782
|
}
|
|
17763
17783
|
} catch (err) {
|
|
17764
17784
|
const errorMessage = err instanceof Error ? err.message : "Unknown error";
|
|
17765
17785
|
setError(errorMessage);
|
|
17766
|
-
_optionalChain([config, 'access',
|
|
17786
|
+
_optionalChain([config, 'access', _552 => _552.onError, 'optionalCall', _553 => _553(errorMessage)]);
|
|
17767
17787
|
return null;
|
|
17768
17788
|
} finally {
|
|
17769
17789
|
setLoading(false);
|
|
@@ -17836,7 +17856,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
17836
17856
|
{
|
|
17837
17857
|
href: hasRole(_chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator) ? generateUrl({
|
|
17838
17858
|
page: "/administration",
|
|
17839
|
-
id: _optionalChain([_chunkZ6T2575Ajs.Modules, 'access',
|
|
17859
|
+
id: _optionalChain([_chunkZ6T2575Ajs.Modules, 'access', _554 => _554.Company, 'access', _555 => _555.pageUrl, 'optionalAccess', _556 => _556.substring, 'call', _557 => _557(1)]),
|
|
17840
17860
|
childPage: company.id
|
|
17841
17861
|
}) : generateUrl({ page: _chunkZ6T2575Ajs.Modules.Company, id: company.id }),
|
|
17842
17862
|
children: row.getValue("name")
|
|
@@ -17852,7 +17872,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
17852
17872
|
})
|
|
17853
17873
|
};
|
|
17854
17874
|
const columns = _react.useMemo.call(void 0, () => {
|
|
17855
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
17875
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _558 => _558[field], 'optionalCall', _559 => _559()])).filter((col) => col !== void 0);
|
|
17856
17876
|
}, [params.fields, fieldColumnMap, t, generateUrl, hasRole]);
|
|
17857
17877
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
17858
17878
|
}, "useCompanyTableStructure");
|
|
@@ -17865,7 +17885,7 @@ var DAY_MS = 1e3 * 60 * 60 * 24;
|
|
|
17865
17885
|
var isAdministrator = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (currentUser) => {
|
|
17866
17886
|
if (!currentUser || !_chunkG4JR3SFVjs.isRolesConfigured.call(void 0, )) return false;
|
|
17867
17887
|
const adminRoleId = _chunkG4JR3SFVjs.getRoleId.call(void 0, ).Administrator;
|
|
17868
|
-
return !!_optionalChain([currentUser, 'access',
|
|
17888
|
+
return !!_optionalChain([currentUser, 'access', _560 => _560.roles, 'optionalAccess', _561 => _561.some, 'call', _562 => _562((role) => role.id === adminRoleId)]);
|
|
17869
17889
|
}, "isAdministrator");
|
|
17870
17890
|
function useSubscriptionStatus() {
|
|
17871
17891
|
const { company, currentUser } = useCurrentUserContext();
|
|
@@ -17982,7 +18002,7 @@ var useRoleTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
|
|
|
17982
18002
|
})
|
|
17983
18003
|
};
|
|
17984
18004
|
const columns = _react.useMemo.call(void 0, () => {
|
|
17985
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
18005
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _563 => _563[field], 'optionalCall', _564 => _564()])).filter((col) => col !== void 0);
|
|
17986
18006
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
17987
18007
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
17988
18008
|
}, "useRoleTableStructure");
|
|
@@ -18023,12 +18043,12 @@ _chunk7QVYU63Ejs.__name.call(void 0, useBillingFormatOptions, "useBillingFormatO
|
|
|
18023
18043
|
|
|
18024
18044
|
// src/features/billing/components/utils/discount.ts
|
|
18025
18045
|
function promotionCodeDiscount(code) {
|
|
18026
|
-
if (!_optionalChain([code, 'optionalAccess',
|
|
18046
|
+
if (!_optionalChain([code, 'optionalAccess', _565 => _565.valid]) || !code.discountType || !code.discountValue) return null;
|
|
18027
18047
|
return { discountType: code.discountType, discountValue: code.discountValue, currency: code.currency };
|
|
18028
18048
|
}
|
|
18029
18049
|
_chunk7QVYU63Ejs.__name.call(void 0, promotionCodeDiscount, "promotionCodeDiscount");
|
|
18030
18050
|
function subscriptionDiscount(subscription) {
|
|
18031
|
-
const discount = _optionalChain([subscription, 'optionalAccess',
|
|
18051
|
+
const discount = _optionalChain([subscription, 'optionalAccess', _566 => _566.discount]);
|
|
18032
18052
|
if (!discount) return null;
|
|
18033
18053
|
if (discount.percentOff) return { discountType: "percent_off", discountValue: discount.percentOff };
|
|
18034
18054
|
if (discount.amountOff) {
|
|
@@ -18050,8 +18070,8 @@ var useStripePriceTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(
|
|
|
18050
18070
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
18051
18071
|
const fmt = useBillingFormatOptions();
|
|
18052
18072
|
const generateUrl = usePageUrlGenerator();
|
|
18053
|
-
const onClone = _optionalChain([params, 'access',
|
|
18054
|
-
const onExport = _optionalChain([params, 'access',
|
|
18073
|
+
const onClone = _optionalChain([params, 'access', _567 => _567.context, 'optionalAccess', _568 => _568.onClone]);
|
|
18074
|
+
const onExport = _optionalChain([params, 'access', _569 => _569.context, 'optionalAccess', _570 => _570.onExport]);
|
|
18055
18075
|
const tableData = _react.useMemo.call(void 0, () => {
|
|
18056
18076
|
return params.data.map((price) => {
|
|
18057
18077
|
const entry = { jsonApiData: price };
|
|
@@ -18116,7 +18136,7 @@ var useStripePriceTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(
|
|
|
18116
18136
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-wrap items-center gap-1", children: [
|
|
18117
18137
|
price.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softGreen", children: t("billing.admin.prices.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softGray", children: t("billing.admin.prices.status.archived") }),
|
|
18118
18138
|
price.isTrial && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.trial") }),
|
|
18119
|
-
_optionalChain([price, 'access',
|
|
18139
|
+
_optionalChain([price, 'access', _571 => _571.recurring, 'optionalAccess', _572 => _572.usageType]) === "metered" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.metered") })
|
|
18120
18140
|
] });
|
|
18121
18141
|
}, "cell"),
|
|
18122
18142
|
enableSorting: false,
|
|
@@ -18164,7 +18184,7 @@ var useStripePriceTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(
|
|
|
18164
18184
|
})
|
|
18165
18185
|
};
|
|
18166
18186
|
const columns = _react.useMemo.call(void 0, () => {
|
|
18167
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
18187
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _573 => _573[field], 'optionalCall', _574 => _574()])).filter((col) => col !== void 0);
|
|
18168
18188
|
}, [params.fields, fieldColumnMap, t, fmt, generateUrl, onClone, onExport]);
|
|
18169
18189
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
18170
18190
|
}, "useStripePriceTableStructure");
|
|
@@ -18223,7 +18243,7 @@ var useStripeProductTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.cal
|
|
|
18223
18243
|
})
|
|
18224
18244
|
};
|
|
18225
18245
|
const columns = _react.useMemo.call(void 0, () => {
|
|
18226
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
18246
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _575 => _575[field], 'optionalCall', _576 => _576()])).filter((col) => col !== void 0);
|
|
18227
18247
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
18228
18248
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
18229
18249
|
}, "useStripeProductTableStructure");
|
|
@@ -18307,7 +18327,7 @@ var useStripeCouponTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call
|
|
|
18307
18327
|
})
|
|
18308
18328
|
};
|
|
18309
18329
|
const columns = _react.useMemo.call(void 0, () => {
|
|
18310
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
18330
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _577 => _577[field], 'optionalCall', _578 => _578()])).filter((col) => col !== void 0);
|
|
18311
18331
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
18312
18332
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
18313
18333
|
}, "useStripeCouponTableStructure");
|
|
@@ -18436,13 +18456,13 @@ var toCouponCodeInput = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (va
|
|
|
18436
18456
|
firstTimeTransaction: values.firstTimeTransaction,
|
|
18437
18457
|
automatic: values.automatic
|
|
18438
18458
|
};
|
|
18439
|
-
if (_optionalChain([values, 'access',
|
|
18459
|
+
if (_optionalChain([values, 'access', _579 => _579.code, 'optionalAccess', _580 => _580.trim, 'call', _581 => _581()])) input.code = values.code.trim();
|
|
18440
18460
|
const minimumAmount = parseOptionalDecimal(values.minimumAmount);
|
|
18441
18461
|
if (minimumAmount !== void 0) {
|
|
18442
18462
|
input.minimumAmount = Math.round(minimumAmount * 100);
|
|
18443
18463
|
input.minimumAmountCurrency = values.minimumAmountCurrency;
|
|
18444
18464
|
}
|
|
18445
|
-
if (_optionalChain([values, 'access',
|
|
18465
|
+
if (_optionalChain([values, 'access', _582 => _582.stripeCustomerId, 'optionalAccess', _583 => _583.trim, 'call', _584 => _584()])) input.stripeCustomerId = values.stripeCustomerId.trim();
|
|
18446
18466
|
if (values.expiresAt) input.expiresAt = values.expiresAt;
|
|
18447
18467
|
const maxRedemptions = parseOptionalPositiveInt(values.maxRedemptions);
|
|
18448
18468
|
if (maxRedemptions !== void 0) input.maxRedemptions = maxRedemptions;
|
|
@@ -18611,7 +18631,7 @@ function toCouponInput(values) {
|
|
|
18611
18631
|
...toDiscountInput(values),
|
|
18612
18632
|
...toDurationInput(values)
|
|
18613
18633
|
};
|
|
18614
|
-
if (_optionalChain([values, 'access',
|
|
18634
|
+
if (_optionalChain([values, 'access', _585 => _585.stripeCouponId, 'optionalAccess', _586 => _586.trim, 'call', _587 => _587()])) payload.stripeCouponId = values.stripeCouponId.trim();
|
|
18615
18635
|
if (values.products.length > 0) payload.productIds = values.products.map((product) => product.id);
|
|
18616
18636
|
if (values.redeemBy) payload.redeemBy = values.redeemBy;
|
|
18617
18637
|
const maxRedemptions = parseOptionalPositiveInt(values.maxRedemptions);
|
|
@@ -18934,9 +18954,9 @@ var CouponProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ chi
|
|
|
18934
18954
|
const [catalogueVersion, setCatalogueVersion] = _react.useState.call(void 0, 0);
|
|
18935
18955
|
const refreshCatalogue = _react.useCallback.call(void 0, () => setCatalogueVersion((value2) => value2 + 1), []);
|
|
18936
18956
|
const reloadCoupon = _react.useCallback.call(void 0, async () => {
|
|
18937
|
-
if (!_optionalChain([coupon, 'optionalAccess',
|
|
18957
|
+
if (!_optionalChain([coupon, 'optionalAccess', _588 => _588.id])) return;
|
|
18938
18958
|
setCoupon(await _chunkNPGX2GJDjs.StripeCouponService.getCoupon({ id: coupon.id }));
|
|
18939
|
-
}, [_optionalChain([coupon, 'optionalAccess',
|
|
18959
|
+
}, [_optionalChain([coupon, 'optionalAccess', _589 => _589.id])]);
|
|
18940
18960
|
const createCoupon = _react.useCallback.call(void 0,
|
|
18941
18961
|
async (input) => {
|
|
18942
18962
|
const saved = await _chunkNPGX2GJDjs.StripeCouponService.createCoupon(input);
|
|
@@ -18956,13 +18976,13 @@ var CouponProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ chi
|
|
|
18956
18976
|
);
|
|
18957
18977
|
const refreshCounts = _react.useCallback.call(void 0,
|
|
18958
18978
|
async (id) => {
|
|
18959
|
-
const target = _nullishCoalesce(id, () => ( _optionalChain([coupon, 'optionalAccess',
|
|
18979
|
+
const target = _nullishCoalesce(id, () => ( _optionalChain([coupon, 'optionalAccess', _590 => _590.id])));
|
|
18960
18980
|
if (!target) return;
|
|
18961
18981
|
const saved = await _chunkNPGX2GJDjs.StripeCouponService.refreshCounts({ id: target });
|
|
18962
|
-
if (_optionalChain([coupon, 'optionalAccess',
|
|
18982
|
+
if (_optionalChain([coupon, 'optionalAccess', _591 => _591.id]) === target) setCoupon(saved);
|
|
18963
18983
|
refreshCatalogue();
|
|
18964
18984
|
},
|
|
18965
|
-
[_optionalChain([coupon, 'optionalAccess',
|
|
18985
|
+
[_optionalChain([coupon, 'optionalAccess', _592 => _592.id]), refreshCatalogue]
|
|
18966
18986
|
);
|
|
18967
18987
|
const createCode = _react.useCallback.call(void 0,
|
|
18968
18988
|
async (input) => {
|
|
@@ -19200,7 +19220,7 @@ var useStripeCouponCodeTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.
|
|
|
19200
19220
|
})
|
|
19201
19221
|
};
|
|
19202
19222
|
const columns = _react.useMemo.call(void 0, () => {
|
|
19203
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
19223
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _593 => _593[field], 'optionalCall', _594 => _594()])).filter((col) => col !== void 0);
|
|
19204
19224
|
}, [params.fields, fieldColumnMap, t, coupon, now]);
|
|
19205
19225
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
19206
19226
|
}, "useStripeCouponCodeTableStructure");
|
|
@@ -19226,7 +19246,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, formatSignupSource, "formatSignupSource");
|
|
|
19226
19246
|
var useWaitlistTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
|
|
19227
19247
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
19228
19248
|
const dates = _chunkSYMI4IDWjs.useDateFormatter.call(void 0, );
|
|
19229
|
-
const onInvite = _optionalChain([params, 'access',
|
|
19249
|
+
const onInvite = _optionalChain([params, 'access', _595 => _595.context, 'optionalAccess', _596 => _596.onInvite]);
|
|
19230
19250
|
const tableData = _react.useMemo.call(void 0, () => {
|
|
19231
19251
|
return params.data.map((entry) => {
|
|
19232
19252
|
const row = { jsonApiData: entry };
|
|
@@ -19321,7 +19341,7 @@ var useWaitlistTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(voi
|
|
|
19321
19341
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
|
|
19322
19342
|
const entry = row.original.jsonApiData;
|
|
19323
19343
|
if (entry.status === "confirmed") {
|
|
19324
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Button, { size: "sm", variant: "outline", onClick: () => _optionalChain([onInvite, 'optionalCall',
|
|
19344
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Button, { size: "sm", variant: "outline", onClick: () => _optionalChain([onInvite, 'optionalCall', _597 => _597(entry)]), children: [
|
|
19325
19345
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Send, { className: "me-2 h-4 w-4" }),
|
|
19326
19346
|
t("waitlist.admin.actions.invite")
|
|
19327
19347
|
] });
|
|
@@ -19339,7 +19359,7 @@ var useWaitlistTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(voi
|
|
|
19339
19359
|
})
|
|
19340
19360
|
};
|
|
19341
19361
|
const columns = _react.useMemo.call(void 0, () => {
|
|
19342
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
19362
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _598 => _598[field], 'optionalCall', _599 => _599()])).filter((col) => col !== void 0);
|
|
19343
19363
|
}, [params.fields, fieldColumnMap, t, dates]);
|
|
19344
19364
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
19345
19365
|
}, "useWaitlistTableStructure");
|
|
@@ -19440,11 +19460,11 @@ var useContentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
19440
19460
|
return params.fields.map((field) => {
|
|
19441
19461
|
const localHandler = fieldColumnMap[field];
|
|
19442
19462
|
if (localHandler) return localHandler();
|
|
19443
|
-
const customHandler = _optionalChain([params, 'access',
|
|
19463
|
+
const customHandler = _optionalChain([params, 'access', _600 => _600.context, 'optionalAccess', _601 => _601.customCells, 'optionalAccess', _602 => _602[field]]);
|
|
19444
19464
|
if (customHandler) return customHandler({ t });
|
|
19445
19465
|
return void 0;
|
|
19446
19466
|
}).filter((col) => col !== void 0);
|
|
19447
|
-
}, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access',
|
|
19467
|
+
}, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _603 => _603.context, 'optionalAccess', _604 => _604.customCells])]);
|
|
19448
19468
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
19449
19469
|
}, "useContentTableStructure");
|
|
19450
19470
|
|
|
@@ -19679,17 +19699,17 @@ function useOAuthConsent(params, options) {
|
|
|
19679
19699
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
19680
19700
|
const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
|
|
19681
19701
|
const [companyId, setCompanyId] = _react.useState.call(void 0, void 0);
|
|
19682
|
-
const contextCompanyId = _optionalChain([useCurrentUserContextOptional, 'call',
|
|
19683
|
-
const currentCompanyId = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
19702
|
+
const contextCompanyId = _optionalChain([useCurrentUserContextOptional, 'call', _605 => _605(), 'optionalAccess', _606 => _606.company, 'optionalAccess', _607 => _607.id]);
|
|
19703
|
+
const currentCompanyId = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _608 => _608.defaultCompanyId]), () => ( contextCompanyId));
|
|
19684
19704
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
19685
19705
|
const tRef = _react.useRef.call(void 0, t);
|
|
19686
19706
|
tRef.current = t;
|
|
19687
19707
|
_react.useEffect.call(void 0, () => {
|
|
19688
|
-
const companies = _nullishCoalesce(_optionalChain([clientInfo, 'optionalAccess',
|
|
19708
|
+
const companies = _nullishCoalesce(_optionalChain([clientInfo, 'optionalAccess', _609 => _609.companies]), () => ( []));
|
|
19689
19709
|
if (companies.length === 0) return;
|
|
19690
19710
|
if (companyId && companies.some((company) => company.id === companyId)) return;
|
|
19691
19711
|
const current = currentCompanyId ? companies.find((company) => company.id === currentCompanyId) : void 0;
|
|
19692
|
-
setCompanyId(_nullishCoalesce(_optionalChain([current, 'optionalAccess',
|
|
19712
|
+
setCompanyId(_nullishCoalesce(_optionalChain([current, 'optionalAccess', _610 => _610.id]), () => ( _optionalChain([companies, 'access', _611 => _611[0], 'optionalAccess', _612 => _612.id]))));
|
|
19693
19713
|
}, [clientInfo, currentCompanyId, companyId]);
|
|
19694
19714
|
_react.useEffect.call(void 0, () => {
|
|
19695
19715
|
const fetchInfo = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
@@ -19775,7 +19795,7 @@ function useOAuthScopeText() {
|
|
|
19775
19795
|
};
|
|
19776
19796
|
}
|
|
19777
19797
|
const info = typeof scope === "string" ? void 0 : scope;
|
|
19778
|
-
return { name: _optionalChain([info, 'optionalAccess',
|
|
19798
|
+
return { name: _optionalChain([info, 'optionalAccess', _613 => _613.name]) || id, description: _nullishCoalesce(_optionalChain([info, 'optionalAccess', _614 => _614.description]), () => ( "")) };
|
|
19779
19799
|
},
|
|
19780
19800
|
[t]
|
|
19781
19801
|
);
|
|
@@ -19831,7 +19851,7 @@ function ContentTableSearch({ data }) {
|
|
|
19831
19851
|
const handleSearchIconClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
19832
19852
|
if (!isExpanded) {
|
|
19833
19853
|
setIsFocused(true);
|
|
19834
|
-
setTimeout(() => _optionalChain([inputRef, 'access',
|
|
19854
|
+
setTimeout(() => _optionalChain([inputRef, 'access', _615 => _615.current, 'optionalAccess', _616 => _616.focus, 'call', _617 => _617()]), 50);
|
|
19835
19855
|
}
|
|
19836
19856
|
}, "handleSearchIconClick");
|
|
19837
19857
|
const handleBlur = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
@@ -19917,7 +19937,7 @@ function getGroupKeys(item, field) {
|
|
|
19917
19937
|
return [String(_nullishCoalesce(value, () => ( "")))];
|
|
19918
19938
|
}
|
|
19919
19939
|
_chunk7QVYU63Ejs.__name.call(void 0, getGroupKeys, "getGroupKeys");
|
|
19920
|
-
var isClassComponent = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (component) => typeof component === "function" && !!_optionalChain([component, 'access',
|
|
19940
|
+
var isClassComponent = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (component) => typeof component === "function" && !!_optionalChain([component, 'access', _618 => _618.prototype, 'optionalAccess', _619 => _619.isReactComponent]), "isClassComponent");
|
|
19921
19941
|
function StableCell({ render, context }) {
|
|
19922
19942
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: render(context) });
|
|
19923
19943
|
}
|
|
@@ -19941,7 +19961,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
19941
19961
|
if (data.isLoaded) setPendingDirection(null);
|
|
19942
19962
|
}, [data.isLoaded]);
|
|
19943
19963
|
const { data: tableData, columns: tableColumns } = useTableGenerator(props.tableGeneratorType, {
|
|
19944
|
-
data: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
19964
|
+
data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _620 => _620.data]), () => ( EMPTY_ARRAY)),
|
|
19945
19965
|
fields,
|
|
19946
19966
|
checkedIds,
|
|
19947
19967
|
toggleId,
|
|
@@ -19971,7 +19991,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
19971
19991
|
...props.renderExpandedRow && {
|
|
19972
19992
|
getExpandedRowModel: _reacttable.getExpandedRowModel.call(void 0, ),
|
|
19973
19993
|
// Key rows by record id so an expansion stays with its record when a search or filter reorders the rows.
|
|
19974
|
-
getRowId: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (row, index) => _nullishCoalesce(_optionalChain([row, 'access',
|
|
19994
|
+
getRowId: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (row, index) => _nullishCoalesce(_optionalChain([row, 'access', _621 => _621.jsonApiData, 'optionalAccess', _622 => _622.id]), () => ( String(index))), "getRowId"),
|
|
19975
19995
|
getRowCanExpand: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => true, "getRowCanExpand"),
|
|
19976
19996
|
onExpandedChange: setExpanded,
|
|
19977
19997
|
state: { expanded }
|
|
@@ -19988,7 +20008,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
19988
20008
|
});
|
|
19989
20009
|
const rowModel = tableData ? table.getRowModel() : null;
|
|
19990
20010
|
const groupedRows = _react.useMemo.call(void 0, () => {
|
|
19991
|
-
if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess',
|
|
20011
|
+
if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess', _623 => _623.rows, 'optionalAccess', _624 => _624.length])) return null;
|
|
19992
20012
|
const groupMap = /* @__PURE__ */ new Map();
|
|
19993
20013
|
for (const row of rowModel.rows) {
|
|
19994
20014
|
const keys = getGroupKeys(row.original, props.groupBy);
|
|
@@ -20067,20 +20087,20 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
20067
20087
|
) }),
|
|
20068
20088
|
!props.hideHeader && table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: headerGroup.headers.map((header) => {
|
|
20069
20089
|
const meta = header.column.columnDef.meta;
|
|
20070
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess',
|
|
20090
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess', _625 => _625.className]), children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
|
|
20071
20091
|
}) }, headerGroup.id))
|
|
20072
20092
|
] }),
|
|
20073
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access',
|
|
20074
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { colSpan: tableColumns.length, className: "bg-muted px-4 py-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MicroLabel, { children: _nullishCoalesce(_optionalChain([props, 'access',
|
|
20093
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _626 => _626.rows, 'optionalAccess', _627 => _627.length]) ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React2.default.Fragment, { children: [
|
|
20094
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { colSpan: tableColumns.length, className: "bg-muted px-4 py-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MicroLabel, { children: _nullishCoalesce(_optionalChain([props, 'access', _628 => _628.groupLabel, 'optionalCall', _629 => _629(group.groupKey)]), () => ( group.groupKey)) }) }) }),
|
|
20075
20095
|
group.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React2.default.Fragment, { children: [
|
|
20076
20096
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
20077
20097
|
TableRow,
|
|
20078
20098
|
{
|
|
20079
|
-
onClick: () => _optionalChain([onRowClick, 'optionalCall',
|
|
20099
|
+
onClick: () => _optionalChain([onRowClick, 'optionalCall', _630 => _630(row.original.jsonApiData)]),
|
|
20080
20100
|
className: `group ${onRowClick ? "hover:bg-muted/50 cursor-pointer" : ""}`,
|
|
20081
20101
|
children: row.getVisibleCells().map((cell) => {
|
|
20082
20102
|
const meta = cell.column.columnDef.meta;
|
|
20083
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess',
|
|
20103
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _631 => _631.className]), children: renderCell(cell.column.columnDef.cell, cell.getContext()) }, cell.id);
|
|
20084
20104
|
})
|
|
20085
20105
|
}
|
|
20086
20106
|
),
|
|
@@ -20090,11 +20110,11 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
20090
20110
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
20091
20111
|
TableRow,
|
|
20092
20112
|
{
|
|
20093
|
-
onClick: () => _optionalChain([onRowClick, 'optionalCall',
|
|
20113
|
+
onClick: () => _optionalChain([onRowClick, 'optionalCall', _632 => _632(row.original.jsonApiData)]),
|
|
20094
20114
|
className: `group ${onRowClick ? "hover:bg-muted/50 cursor-pointer" : ""}`,
|
|
20095
20115
|
children: row.getVisibleCells().map((cell) => {
|
|
20096
20116
|
const meta = cell.column.columnDef.meta;
|
|
20097
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess',
|
|
20117
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _633 => _633.className]), children: renderCell(cell.column.columnDef.cell, cell.getContext()) }, cell.id);
|
|
20098
20118
|
})
|
|
20099
20119
|
}
|
|
20100
20120
|
),
|
|
@@ -20109,7 +20129,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
20109
20129
|
onClick: (e) => {
|
|
20110
20130
|
e.preventDefault();
|
|
20111
20131
|
setPendingDirection("prev");
|
|
20112
|
-
_optionalChain([data, 'access',
|
|
20132
|
+
_optionalChain([data, 'access', _634 => _634.previous, 'optionalCall', _635 => _635(true)]);
|
|
20113
20133
|
},
|
|
20114
20134
|
disabled: !data.previous || pendingDirection !== null,
|
|
20115
20135
|
children: pendingDirection === "prev" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronLeft, { className: "h-4 w-4 rtl:rotate-180" })
|
|
@@ -20124,7 +20144,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
20124
20144
|
onClick: (e) => {
|
|
20125
20145
|
e.preventDefault();
|
|
20126
20146
|
setPendingDirection("next");
|
|
20127
|
-
_optionalChain([data, 'access',
|
|
20147
|
+
_optionalChain([data, 'access', _636 => _636.next, 'optionalCall', _637 => _637(true)]);
|
|
20128
20148
|
},
|
|
20129
20149
|
disabled: !data.next || pendingDirection !== null,
|
|
20130
20150
|
children: pendingDirection === "next" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronRight, { className: "h-4 w-4 rtl:rotate-180" })
|
|
@@ -20146,7 +20166,7 @@ function ContentListGrid(props) {
|
|
|
20146
20166
|
if (!data.next || !sentinelRef.current) return;
|
|
20147
20167
|
const observer = new IntersectionObserver(
|
|
20148
20168
|
(entries) => {
|
|
20149
|
-
if (_optionalChain([entries, 'access',
|
|
20169
|
+
if (_optionalChain([entries, 'access', _638 => _638[0], 'optionalAccess', _639 => _639.isIntersecting])) _optionalChain([data, 'access', _640 => _640.next, 'optionalCall', _641 => _641()]);
|
|
20150
20170
|
},
|
|
20151
20171
|
{ threshold: 0.1, rootMargin: "200px" }
|
|
20152
20172
|
);
|
|
@@ -21044,7 +21064,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
|
21044
21064
|
newDigits[index] = digit;
|
|
21045
21065
|
setDigits(newDigits);
|
|
21046
21066
|
if (digit && index < 5) {
|
|
21047
|
-
_optionalChain([inputRefs, 'access',
|
|
21067
|
+
_optionalChain([inputRefs, 'access', _642 => _642.current, 'access', _643 => _643[index + 1], 'optionalAccess', _644 => _644.focus, 'call', _645 => _645()]);
|
|
21048
21068
|
}
|
|
21049
21069
|
const code = newDigits.join("");
|
|
21050
21070
|
if (code.length === 6 && newDigits.every((d) => d !== "")) {
|
|
@@ -21053,7 +21073,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
|
21053
21073
|
}, "handleChange");
|
|
21054
21074
|
const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (index, e) => {
|
|
21055
21075
|
if (e.key === "Backspace" && !digits[index] && index > 0) {
|
|
21056
|
-
_optionalChain([inputRefs, 'access',
|
|
21076
|
+
_optionalChain([inputRefs, 'access', _646 => _646.current, 'access', _647 => _647[index - 1], 'optionalAccess', _648 => _648.focus, 'call', _649 => _649()]);
|
|
21057
21077
|
}
|
|
21058
21078
|
}, "handleKeyDown");
|
|
21059
21079
|
const handlePaste = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
|
|
@@ -21062,7 +21082,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
|
21062
21082
|
if (pastedData.length === 6) {
|
|
21063
21083
|
const newDigits = pastedData.split("");
|
|
21064
21084
|
setDigits(newDigits);
|
|
21065
|
-
_optionalChain([inputRefs, 'access',
|
|
21085
|
+
_optionalChain([inputRefs, 'access', _650 => _650.current, 'access', _651 => _651[5], 'optionalAccess', _652 => _652.focus, 'call', _653 => _653()]);
|
|
21066
21086
|
onComplete(pastedData);
|
|
21067
21087
|
}
|
|
21068
21088
|
}, "handlePaste");
|
|
@@ -21274,8 +21294,8 @@ function PasskeySetupDialog({ open, onOpenChange, onSuccess }) {
|
|
|
21274
21294
|
try {
|
|
21275
21295
|
const registrationData = await _chunkNPGX2GJDjs.TwoFactorService.getPasskeyRegistrationOptions({
|
|
21276
21296
|
id: _uuid.v4.call(void 0, ),
|
|
21277
|
-
userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess',
|
|
21278
|
-
userDisplayName: _optionalChain([currentUser, 'optionalAccess',
|
|
21297
|
+
userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _654 => _654.email]), () => ( "")),
|
|
21298
|
+
userDisplayName: _optionalChain([currentUser, 'optionalAccess', _655 => _655.name])
|
|
21279
21299
|
});
|
|
21280
21300
|
const credential = await _browser.startRegistration.call(void 0, { optionsJSON: registrationData.options });
|
|
21281
21301
|
await _chunkNPGX2GJDjs.TwoFactorService.verifyPasskeyRegistration({
|
|
@@ -21427,7 +21447,7 @@ function TotpSetupDialog({ onSuccess, trigger }) {
|
|
|
21427
21447
|
const setup = await _chunkNPGX2GJDjs.TwoFactorService.setupTotp({
|
|
21428
21448
|
id: _uuid.v4.call(void 0, ),
|
|
21429
21449
|
name: name.trim(),
|
|
21430
|
-
accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess',
|
|
21450
|
+
accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _656 => _656.email]), () => ( ""))
|
|
21431
21451
|
});
|
|
21432
21452
|
setQrCodeUri(setup.qrCodeUri);
|
|
21433
21453
|
setAuthenticatorId(setup.authenticatorId);
|
|
@@ -21561,7 +21581,7 @@ function TwoFactorSettings() {
|
|
|
21561
21581
|
if (isLoading) {
|
|
21562
21582
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground", children: t("common.loading") }) }) });
|
|
21563
21583
|
}
|
|
21564
|
-
const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
21584
|
+
const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _657 => _657.isEnabled]), () => ( false));
|
|
21565
21585
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Card, { children: [
|
|
21566
21586
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
|
|
21567
21587
|
isEnabled ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ShieldCheck, { className: "text-success h-6 w-6" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ShieldAlert, { className: "text-warning h-6 w-6" }),
|
|
@@ -21599,7 +21619,7 @@ function TwoFactorSettings() {
|
|
|
21599
21619
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-medium", children: t("auth.two_factor.backup_codes") }),
|
|
21600
21620
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: t("auth.two_factor.backup_codes_description") })
|
|
21601
21621
|
] }),
|
|
21602
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
21622
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _658 => _658.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
|
|
21603
21623
|
] }) }),
|
|
21604
21624
|
!isEnabled && (authenticators.length > 0 || passkeys.length > 0) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
21605
21625
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Separator, {}),
|
|
@@ -21781,9 +21801,9 @@ function AcceptInvitation() {
|
|
|
21781
21801
|
});
|
|
21782
21802
|
const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
|
|
21783
21803
|
try {
|
|
21784
|
-
if (!_optionalChain([params, 'optionalAccess',
|
|
21804
|
+
if (!_optionalChain([params, 'optionalAccess', _659 => _659.code])) return;
|
|
21785
21805
|
const payload = {
|
|
21786
|
-
code: _optionalChain([params, 'optionalAccess',
|
|
21806
|
+
code: _optionalChain([params, 'optionalAccess', _660 => _660.code]),
|
|
21787
21807
|
password: values.password
|
|
21788
21808
|
};
|
|
21789
21809
|
await _chunkNPGX2GJDjs.AuthService.acceptInvitation(payload);
|
|
@@ -22138,11 +22158,11 @@ function RefreshUser() {
|
|
|
22138
22158
|
setUser(fullUser);
|
|
22139
22159
|
const token = {
|
|
22140
22160
|
userId: fullUser.id,
|
|
22141
|
-
companyId: _optionalChain([fullUser, 'access',
|
|
22161
|
+
companyId: _optionalChain([fullUser, 'access', _661 => _661.company, 'optionalAccess', _662 => _662.id]),
|
|
22142
22162
|
roles: fullUser.roles.map((role) => role.id),
|
|
22143
|
-
features: _nullishCoalesce(_optionalChain([fullUser, 'access',
|
|
22163
|
+
features: _nullishCoalesce(_optionalChain([fullUser, 'access', _663 => _663.company, 'optionalAccess', _664 => _664.features, 'optionalAccess', _665 => _665.map, 'call', _666 => _666((feature) => feature.id)]), () => ( []))
|
|
22144
22164
|
};
|
|
22145
|
-
await _optionalChain([_chunkNPGX2GJDjs.getTokenHandler.call(void 0, ), 'optionalAccess',
|
|
22165
|
+
await _optionalChain([_chunkNPGX2GJDjs.getTokenHandler.call(void 0, ), 'optionalAccess', _667 => _667.updateToken, 'call', _668 => _668(token)]);
|
|
22146
22166
|
_cookiesnext.deleteCookie.call(void 0, "reloadData");
|
|
22147
22167
|
}
|
|
22148
22168
|
}, "loadFullUser");
|
|
@@ -22206,9 +22226,9 @@ function ResetPassword() {
|
|
|
22206
22226
|
});
|
|
22207
22227
|
const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
|
|
22208
22228
|
try {
|
|
22209
|
-
if (!_optionalChain([params, 'optionalAccess',
|
|
22229
|
+
if (!_optionalChain([params, 'optionalAccess', _669 => _669.code])) return;
|
|
22210
22230
|
const payload = {
|
|
22211
|
-
code: _optionalChain([params, 'optionalAccess',
|
|
22231
|
+
code: _optionalChain([params, 'optionalAccess', _670 => _670.code]),
|
|
22212
22232
|
password: values.password
|
|
22213
22233
|
};
|
|
22214
22234
|
await _chunkNPGX2GJDjs.AuthService.resetPassword(payload);
|
|
@@ -22748,7 +22768,7 @@ function AiConnectionEditor({
|
|
|
22748
22768
|
const registryRows = _react.useMemo.call(void 0, () => _nullishCoalesce(providerRegistry[connectionType], () => ( [])), [providerRegistry, connectionType]);
|
|
22749
22769
|
const providers = _react.useMemo.call(void 0, () => registryRows.map((row) => row.provider), [registryRows]);
|
|
22750
22770
|
const fieldsFor = _react.useCallback.call(void 0,
|
|
22751
|
-
(provider) => _nullishCoalesce(_optionalChain([registryRows, 'access',
|
|
22771
|
+
(provider) => _nullishCoalesce(_optionalChain([registryRows, 'access', _671 => _671.find, 'call', _672 => _672((row) => row.provider === provider), 'optionalAccess', _673 => _673.fields]), () => ( [])),
|
|
22752
22772
|
[registryRows]
|
|
22753
22773
|
);
|
|
22754
22774
|
const defaultsFor = _react.useCallback.call(void 0,
|
|
@@ -22757,7 +22777,7 @@ function AiConnectionEditor({
|
|
|
22757
22777
|
const seeded = {};
|
|
22758
22778
|
fieldsFor(provider).forEach((descriptor) => {
|
|
22759
22779
|
if (descriptor.kind === "boolean") {
|
|
22760
|
-
const current2 = _optionalChain([stored, 'optionalAccess',
|
|
22780
|
+
const current2 = _optionalChain([stored, 'optionalAccess', _674 => _674[descriptor.field]]);
|
|
22761
22781
|
seeded[descriptor.field] = current2 !== void 0 && current2 !== null ? current2 === true : descriptor.default === true;
|
|
22762
22782
|
return;
|
|
22763
22783
|
}
|
|
@@ -22765,7 +22785,7 @@ function AiConnectionEditor({
|
|
|
22765
22785
|
seeded[descriptor.field] = "";
|
|
22766
22786
|
return;
|
|
22767
22787
|
}
|
|
22768
|
-
const current = _optionalChain([stored, 'optionalAccess',
|
|
22788
|
+
const current = _optionalChain([stored, 'optionalAccess', _675 => _675[descriptor.field]]);
|
|
22769
22789
|
if (current !== void 0 && current !== null) seeded[descriptor.field] = String(current);
|
|
22770
22790
|
else seeded[descriptor.field] = descriptor.default !== void 0 ? String(descriptor.default) : "";
|
|
22771
22791
|
});
|
|
@@ -22791,7 +22811,7 @@ function AiConnectionEditor({
|
|
|
22791
22811
|
values: _zod3.z.record(_zod3.z.string(), _zod3.z.any())
|
|
22792
22812
|
}).superRefine((data, ctx) => {
|
|
22793
22813
|
fieldsFor(data.provider).filter((descriptor) => descriptor.required).forEach((descriptor) => {
|
|
22794
|
-
const value = _optionalChain([data, 'access',
|
|
22814
|
+
const value = _optionalChain([data, 'access', _676 => _676.values, 'optionalAccess', _677 => _677[descriptor.field]]);
|
|
22795
22815
|
const filled = descriptor.kind === "secret" ? !!value || hasStoredSecret(descriptor.field) : descriptor.kind === "boolean" ? value !== void 0 : value !== void 0 && value !== null && String(value).trim() !== "";
|
|
22796
22816
|
if (filled) return;
|
|
22797
22817
|
ctx.addIssue({
|
|
@@ -22805,11 +22825,11 @@ function AiConnectionEditor({
|
|
|
22805
22825
|
);
|
|
22806
22826
|
const getDefaultValues = _react.useCallback.call(void 0,
|
|
22807
22827
|
() => ({
|
|
22808
|
-
id: _nullishCoalesce(_optionalChain([connection, 'optionalAccess',
|
|
22809
|
-
name: _nullishCoalesce(_optionalChain([connection, 'optionalAccess',
|
|
22810
|
-
provider: _nullishCoalesce(_nullishCoalesce(_optionalChain([connection, 'optionalAccess',
|
|
22811
|
-
enabled: _nullishCoalesce(_optionalChain([connection, 'optionalAccess',
|
|
22812
|
-
values: defaultsFor(_nullishCoalesce(_nullishCoalesce(_optionalChain([connection, 'optionalAccess',
|
|
22828
|
+
id: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _678 => _678.id]), () => ( _uuid.v4.call(void 0, ))),
|
|
22829
|
+
name: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _679 => _679.name]), () => ( "")),
|
|
22830
|
+
provider: _nullishCoalesce(_nullishCoalesce(_optionalChain([connection, 'optionalAccess', _680 => _680.provider]), () => ( providers[0])), () => ( "")),
|
|
22831
|
+
enabled: _nullishCoalesce(_optionalChain([connection, 'optionalAccess', _681 => _681.enabled]), () => ( true)),
|
|
22832
|
+
values: defaultsFor(_nullishCoalesce(_nullishCoalesce(_optionalChain([connection, 'optionalAccess', _682 => _682.provider]), () => ( providers[0])), () => ( "")))
|
|
22813
22833
|
}),
|
|
22814
22834
|
[connection, providers, defaultsFor]
|
|
22815
22835
|
);
|
|
@@ -22820,7 +22840,7 @@ function AiConnectionEditor({
|
|
|
22820
22840
|
_react.useEffect.call(void 0, () => {
|
|
22821
22841
|
if (registryRows.length === 0) return;
|
|
22822
22842
|
const currentProvider = form.getValues("provider");
|
|
22823
|
-
const provider = currentProvider || _optionalChain([connection, 'optionalAccess',
|
|
22843
|
+
const provider = currentProvider || _optionalChain([connection, 'optionalAccess', _683 => _683.provider]) || providers[0] || "";
|
|
22824
22844
|
if (!provider) return;
|
|
22825
22845
|
if (provider !== currentProvider) form.setValue("provider", provider);
|
|
22826
22846
|
const currentValues = form.getValues("values");
|
|
@@ -22891,7 +22911,7 @@ function AiConnectionEditor({
|
|
|
22891
22911
|
{
|
|
22892
22912
|
form,
|
|
22893
22913
|
entityType: t("ai_connections.admin.entity"),
|
|
22894
|
-
entityName: _optionalChain([connection, 'optionalAccess',
|
|
22914
|
+
entityName: _optionalChain([connection, 'optionalAccess', _684 => _684.name]),
|
|
22895
22915
|
isEdit,
|
|
22896
22916
|
module: _chunkZ6T2575Ajs.Modules.AiConnection,
|
|
22897
22917
|
size: "md",
|
|
@@ -22899,7 +22919,7 @@ function AiConnectionEditor({
|
|
|
22899
22919
|
onSubmit: async (values) => {
|
|
22900
22920
|
const attributes = {};
|
|
22901
22921
|
fieldsFor(values.provider).forEach((descriptor) => {
|
|
22902
|
-
const coerced = coerce(descriptor, _optionalChain([values, 'access',
|
|
22922
|
+
const coerced = coerce(descriptor, _optionalChain([values, 'access', _685 => _685.values, 'optionalAccess', _686 => _686[descriptor.field]]));
|
|
22903
22923
|
if (coerced !== void 0) attributes[descriptor.field] = coerced;
|
|
22904
22924
|
});
|
|
22905
22925
|
const payload = {
|
|
@@ -23129,7 +23149,7 @@ function AiConnectionTypeCard({ connectionType }) {
|
|
|
23129
23149
|
),
|
|
23130
23150
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-muted/40 flex flex-wrap items-center gap-2 px-3 py-2", children: [
|
|
23131
23151
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "softGray", children: t("ai_connections.admin.env_fallback") }),
|
|
23132
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground truncate text-xs", children: [_optionalChain([envDefault, 'optionalAccess',
|
|
23152
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground truncate text-xs", children: [_optionalChain([envDefault, 'optionalAccess', _687 => _687.provider]), _optionalChain([envDefault, 'optionalAccess', _688 => _688.model]), _optionalChain([envDefault, 'optionalAccess', _689 => _689.url])].filter(Boolean).join(" \xB7 ") })
|
|
23133
23153
|
] })
|
|
23134
23154
|
] })
|
|
23135
23155
|
] })
|
|
@@ -23418,7 +23438,7 @@ var useEmailBlastTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(v
|
|
|
23418
23438
|
)
|
|
23419
23439
|
};
|
|
23420
23440
|
const columns = _react.useMemo.call(void 0, () => {
|
|
23421
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
23441
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _690 => _690[field], 'optionalCall', _691 => _691()])).filter((col) => col !== void 0);
|
|
23422
23442
|
}, [params.fields, fieldColumnMap, t, generateUrl, dates]);
|
|
23423
23443
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
23424
23444
|
}, "useEmailBlastTableStructure");
|
|
@@ -23461,12 +23481,12 @@ function EmailBlastEditorInternal({
|
|
|
23461
23481
|
);
|
|
23462
23482
|
const getDefaultValues = _react.useCallback.call(void 0,
|
|
23463
23483
|
() => ({
|
|
23464
|
-
id: _nullishCoalesce(_optionalChain([blast, 'optionalAccess',
|
|
23465
|
-
subject: _nullishCoalesce(_optionalChain([blast, 'optionalAccess',
|
|
23466
|
-
body: _nullishCoalesce(_optionalChain([blast, 'optionalAccess',
|
|
23467
|
-
replyTo: _nullishCoalesce(_optionalChain([blast, 'optionalAccess',
|
|
23484
|
+
id: _nullishCoalesce(_optionalChain([blast, 'optionalAccess', _692 => _692.id]), () => ( _uuid.v4.call(void 0, ))),
|
|
23485
|
+
subject: _nullishCoalesce(_optionalChain([blast, 'optionalAccess', _693 => _693.subject]), () => ( "")),
|
|
23486
|
+
body: _nullishCoalesce(_optionalChain([blast, 'optionalAccess', _694 => _694.body]), () => ( "")),
|
|
23487
|
+
replyTo: _nullishCoalesce(_optionalChain([blast, 'optionalAccess', _695 => _695.replyTo]), () => ( "")),
|
|
23468
23488
|
// No preselected value on create: the form refuses to save without a choice.
|
|
23469
|
-
purpose: _nullishCoalesce(_optionalChain([blast, 'optionalAccess',
|
|
23489
|
+
purpose: _nullishCoalesce(_optionalChain([blast, 'optionalAccess', _696 => _696.purpose]), () => ( ""))
|
|
23470
23490
|
}),
|
|
23471
23491
|
[blast]
|
|
23472
23492
|
);
|
|
@@ -23488,7 +23508,7 @@ function EmailBlastEditorInternal({
|
|
|
23488
23508
|
{
|
|
23489
23509
|
form,
|
|
23490
23510
|
entityType: t("emailBlasts.editor.title"),
|
|
23491
|
-
entityName: _optionalChain([blast, 'optionalAccess',
|
|
23511
|
+
entityName: _optionalChain([blast, 'optionalAccess', _697 => _697.subject]),
|
|
23492
23512
|
title: isEdit ? t("emailBlasts.editor.editTitle") : t("emailBlasts.editor.title"),
|
|
23493
23513
|
isEdit,
|
|
23494
23514
|
module: _chunkZ6T2575Ajs.Modules.EmailBlast,
|
|
@@ -23632,7 +23652,7 @@ function EmailBlastSendDialog({ blast, onSuccess }) {
|
|
|
23632
23652
|
setIsSending(true);
|
|
23633
23653
|
try {
|
|
23634
23654
|
await _chunkNPGX2GJDjs.EmailBlastService.send({ id: blast.id });
|
|
23635
|
-
await _optionalChain([onSuccess, 'optionalCall',
|
|
23655
|
+
await _optionalChain([onSuccess, 'optionalCall', _698 => _698()]);
|
|
23636
23656
|
setOpen(false);
|
|
23637
23657
|
} catch (error) {
|
|
23638
23658
|
errorToast({ title: t("common.errors.error"), error });
|
|
@@ -23839,7 +23859,7 @@ function extractHeadings(blocks) {
|
|
|
23839
23859
|
function processBlocks(blockArray) {
|
|
23840
23860
|
for (const block of blockArray) {
|
|
23841
23861
|
if (block.type === "heading") {
|
|
23842
|
-
const level = _optionalChain([block, 'access',
|
|
23862
|
+
const level = _optionalChain([block, 'access', _699 => _699.props, 'optionalAccess', _700 => _700.level]) || 1;
|
|
23843
23863
|
const text = extractTextFromContent(block.content);
|
|
23844
23864
|
if (text.trim()) {
|
|
23845
23865
|
headings.push({
|
|
@@ -24199,7 +24219,7 @@ var useHowToTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
|
|
|
24199
24219
|
})
|
|
24200
24220
|
};
|
|
24201
24221
|
const columns = _react.useMemo.call(void 0, () => {
|
|
24202
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
24222
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _701 => _701[field], 'optionalCall', _702 => _702()])).filter((col) => col !== void 0);
|
|
24203
24223
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
24204
24224
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
24205
24225
|
}, "useHowToTableStructure");
|
|
@@ -24325,7 +24345,7 @@ function HowToSelector({
|
|
|
24325
24345
|
}, "setHowTo");
|
|
24326
24346
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFieldWrapper, { form, name: id, label, isRequired, children: (field) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Popover, { open, onOpenChange: setOpen, modal: true, children: [
|
|
24327
24347
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
|
|
24328
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-row items-center justify-start rounded-md", children: field.value ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access',
|
|
24348
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-row items-center justify-start rounded-md", children: field.value ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _703 => _703.value, 'optionalAccess', _704 => _704.name]), () => ( "")) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input text-muted-foreground flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: _nullishCoalesce(placeholder, () => ( t(`generic.search.placeholder`, { type: t(`entities.howtos`, { count: 1 }) }))) }) }) }),
|
|
24329
24349
|
field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
24330
24350
|
_lucidereact.CircleX,
|
|
24331
24351
|
{
|
|
@@ -24630,10 +24650,10 @@ function CitationsTab({ citations, sources }) {
|
|
|
24630
24650
|
] }) }),
|
|
24631
24651
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: sorted.map((chunk) => {
|
|
24632
24652
|
const isOpen = expanded.has(chunk.id);
|
|
24633
|
-
const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess',
|
|
24653
|
+
const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess', _705 => _705.get, 'call', _706 => _706(chunk.nodeId)]) : void 0;
|
|
24634
24654
|
const typeLabel = chunk.nodeType ? entityLabel(chunk.nodeType) : t("features.assistant.message.sources.source");
|
|
24635
24655
|
const fallbackName = chunk.nodeId ? `${typeLabel} ${chunk.nodeId.slice(0, 8)}` : typeLabel;
|
|
24636
|
-
const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess',
|
|
24656
|
+
const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _707 => _707.name]), () => ( fallbackName));
|
|
24637
24657
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
|
|
24638
24658
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, TableRow, { children: [
|
|
24639
24659
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -24697,7 +24717,7 @@ function ContentsTab({ citations, sources }) {
|
|
|
24697
24717
|
for (const c of citations) {
|
|
24698
24718
|
const id = c.nodeId;
|
|
24699
24719
|
if (!id) continue;
|
|
24700
|
-
const source = _optionalChain([sources, 'optionalAccess',
|
|
24720
|
+
const source = _optionalChain([sources, 'optionalAccess', _708 => _708.get, 'call', _709 => _709(id)]);
|
|
24701
24721
|
if (!source) continue;
|
|
24702
24722
|
const existing = map.get(id);
|
|
24703
24723
|
if (existing) {
|
|
@@ -24764,7 +24784,7 @@ function UsersTab({ users, citations, sources }) {
|
|
|
24764
24784
|
const generate = usePageUrlGenerator();
|
|
24765
24785
|
const userMap = /* @__PURE__ */ new Map();
|
|
24766
24786
|
for (const u of users) {
|
|
24767
|
-
if (!_optionalChain([u, 'optionalAccess',
|
|
24787
|
+
if (!_optionalChain([u, 'optionalAccess', _710 => _710.id])) continue;
|
|
24768
24788
|
userMap.set(u.id, { user: u, contentCount: 0, citationCount: 0 });
|
|
24769
24789
|
}
|
|
24770
24790
|
if (citations && sources) {
|
|
@@ -24835,7 +24855,7 @@ function SuggestedQuestionsTab({ questions, onSelect }) {
|
|
|
24835
24855
|
{
|
|
24836
24856
|
type: "button",
|
|
24837
24857
|
disabled: !onSelect,
|
|
24838
|
-
onClick: () => _optionalChain([onSelect, 'optionalCall',
|
|
24858
|
+
onClick: () => _optionalChain([onSelect, 'optionalCall', _711 => _711(q)]),
|
|
24839
24859
|
className: "border-border bg-muted/30 hover:bg-muted disabled:hover:bg-muted/30 rounded-md border px-3 py-1.5 text-start text-sm disabled:cursor-not-allowed disabled:opacity-50",
|
|
24840
24860
|
children: q
|
|
24841
24861
|
},
|
|
@@ -24870,7 +24890,7 @@ function MessageSourcesPanel({ message, isLatestAssistant, onSelectFollowUp, sou
|
|
|
24870
24890
|
}
|
|
24871
24891
|
return ids.size;
|
|
24872
24892
|
}, [message.citations, sources]);
|
|
24873
|
-
const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess',
|
|
24893
|
+
const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess', _712 => _712.length]), () => ( 0));
|
|
24874
24894
|
const total = refsCount + citationsCount + contentsCount + usersCount + suggestionsCount;
|
|
24875
24895
|
const visibleTabs = [];
|
|
24876
24896
|
if (suggestionsCount > 0) visibleTabs.push("suggested");
|
|
@@ -25013,7 +25033,7 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
|
|
|
25013
25033
|
return void 0;
|
|
25014
25034
|
}
|
|
25015
25035
|
})()));
|
|
25016
|
-
if (_optionalChain([author, 'optionalAccess',
|
|
25036
|
+
if (_optionalChain([author, 'optionalAccess', _713 => _713.id])) userMap.set(author.id, author);
|
|
25017
25037
|
}
|
|
25018
25038
|
return Array.from(userMap.values());
|
|
25019
25039
|
}, [resolved]);
|
|
@@ -25048,7 +25068,7 @@ function MessageItem({
|
|
|
25048
25068
|
}) {
|
|
25049
25069
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
25050
25070
|
const isUser = message.role === "user";
|
|
25051
|
-
const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess',
|
|
25071
|
+
const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess', _714 => _714.has, 'call', _715 => _715(message.id)]);
|
|
25052
25072
|
const markdownComponents = _react.useMemo.call(void 0,
|
|
25053
25073
|
() => ({
|
|
25054
25074
|
a: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ href, children }) => {
|
|
@@ -25065,7 +25085,7 @@ function MessageItem({
|
|
|
25065
25085
|
isFailed && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-destructive flex items-center gap-2 text-xs", children: [
|
|
25066
25086
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "h-3.5 w-3.5" }),
|
|
25067
25087
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("features.assistant.send_failed") }),
|
|
25068
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", onClick: () => _optionalChain([onRetry, 'optionalCall',
|
|
25088
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", onClick: () => _optionalChain([onRetry, 'optionalCall', _716 => _716(message.id)]), children: t("features.assistant.retry") })
|
|
25069
25089
|
] })
|
|
25070
25090
|
] });
|
|
25071
25091
|
}
|
|
@@ -25156,7 +25176,7 @@ function AssistantThread({
|
|
|
25156
25176
|
}) {
|
|
25157
25177
|
const lastMessageRef = _react.useRef.call(void 0, null);
|
|
25158
25178
|
_react.useEffect.call(void 0, () => {
|
|
25159
|
-
_optionalChain([lastMessageRef, 'access',
|
|
25179
|
+
_optionalChain([lastMessageRef, 'access', _717 => _717.current, 'optionalAccess', _718 => _718.scrollIntoView, 'call', _719 => _719({ block: "start", behavior: "smooth" })]);
|
|
25160
25180
|
}, [messages.length, sending]);
|
|
25161
25181
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0 overflow-x-hidden overflow-y-auto px-6 py-5", children: [
|
|
25162
25182
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -25195,7 +25215,7 @@ ${message.sources.map((source) => `- \`${source}\``).join("\n")}`;
|
|
|
25195
25215
|
return _chunkNPGX2GJDjs.rehydrate.call(void 0, _chunkZ6T2575Ajs.Modules.HandbookThreadMessage, {
|
|
25196
25216
|
jsonApi: {
|
|
25197
25217
|
...dehydrated.jsonApi,
|
|
25198
|
-
attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access',
|
|
25218
|
+
attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _720 => _720.jsonApi, 'optionalAccess', _721 => _721.attributes]), () => ( {})), content }
|
|
25199
25219
|
},
|
|
25200
25220
|
included: dehydrated.included
|
|
25201
25221
|
});
|
|
@@ -25204,8 +25224,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, withSourcesInContent, "withSourcesInContent
|
|
|
25204
25224
|
function useHandbookAsk(params) {
|
|
25205
25225
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
25206
25226
|
const generateUrl = usePageUrlGenerator();
|
|
25207
|
-
const shouldSyncUrl = _nullishCoalesce(_optionalChain([params, 'optionalAccess',
|
|
25208
|
-
const handbookThreadId = _optionalChain([params, 'optionalAccess',
|
|
25227
|
+
const shouldSyncUrl = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _722 => _722.syncUrl]), () => ( true));
|
|
25228
|
+
const handbookThreadId = _optionalChain([params, 'optionalAccess', _723 => _723.handbookThreadId]);
|
|
25209
25229
|
const [threads, setThreads] = _react.useState.call(void 0, []);
|
|
25210
25230
|
const [thread, setThread] = _react.useState.call(void 0, void 0);
|
|
25211
25231
|
const [messages, setMessages] = _react.useState.call(void 0, []);
|
|
@@ -25267,12 +25287,12 @@ function useHandbookAsk(params) {
|
|
|
25267
25287
|
]);
|
|
25268
25288
|
setSending(true);
|
|
25269
25289
|
try {
|
|
25270
|
-
let id = _optionalChain([thread, 'optionalAccess',
|
|
25290
|
+
let id = _optionalChain([thread, 'optionalAccess', _724 => _724.id]);
|
|
25271
25291
|
if (id === void 0) {
|
|
25272
25292
|
const created = await _chunkNPGX2GJDjs.HandbookThreadService.create({
|
|
25273
25293
|
id: _uuid.v4.call(void 0, ),
|
|
25274
25294
|
question: trimmed,
|
|
25275
|
-
handbookPageId: _optionalChain([options, 'optionalAccess',
|
|
25295
|
+
handbookPageId: _optionalChain([options, 'optionalAccess', _725 => _725.handbookPageId])
|
|
25276
25296
|
});
|
|
25277
25297
|
id = created.id;
|
|
25278
25298
|
setThreads((current) => [created, ...current]);
|
|
@@ -25281,7 +25301,7 @@ function useHandbookAsk(params) {
|
|
|
25281
25301
|
id: _uuid.v4.call(void 0, ),
|
|
25282
25302
|
threadId: id,
|
|
25283
25303
|
question: trimmed,
|
|
25284
|
-
handbookPageId: _optionalChain([options, 'optionalAccess',
|
|
25304
|
+
handbookPageId: _optionalChain([options, 'optionalAccess', _726 => _726.handbookPageId])
|
|
25285
25305
|
});
|
|
25286
25306
|
}
|
|
25287
25307
|
const loaded = await _chunkNPGX2GJDjs.HandbookThreadService.findOne({ id });
|
|
@@ -25302,7 +25322,7 @@ function useHandbookAsk(params) {
|
|
|
25302
25322
|
setSending(false);
|
|
25303
25323
|
}
|
|
25304
25324
|
},
|
|
25305
|
-
[messages.length, sending, syncUrl, t, _optionalChain([thread, 'optionalAccess',
|
|
25325
|
+
[messages.length, sending, syncUrl, t, _optionalChain([thread, 'optionalAccess', _727 => _727.id])]
|
|
25306
25326
|
);
|
|
25307
25327
|
return { threads, thread, messages, sending, ask, selectThread, startNew };
|
|
25308
25328
|
}
|
|
@@ -25858,7 +25878,7 @@ function HandbookPageContainer({ handbookPageId }) {
|
|
|
25858
25878
|
};
|
|
25859
25879
|
}, []);
|
|
25860
25880
|
const section = _react.useMemo.call(void 0,
|
|
25861
|
-
() => sections.find((candidate) => candidate.key === _optionalChain([handbookPage, 'optionalAccess',
|
|
25881
|
+
() => sections.find((candidate) => candidate.key === _optionalChain([handbookPage, 'optionalAccess', _728 => _728.section])),
|
|
25862
25882
|
[sections, handbookPage]
|
|
25863
25883
|
);
|
|
25864
25884
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -25947,7 +25967,7 @@ function AssistantSidebar({
|
|
|
25947
25967
|
className: "block w-full truncate rounded-md px-2 py-1.5 text-start text-sm " + (activeId === thread.id ? "bg-primary/10 text-primary" : "hover:bg-muted text-foreground"),
|
|
25948
25968
|
children: [
|
|
25949
25969
|
thread.title,
|
|
25950
|
-
_optionalChain([renderThreadBadge, 'optionalCall',
|
|
25970
|
+
_optionalChain([renderThreadBadge, 'optionalCall', _729 => _729(thread)])
|
|
25951
25971
|
]
|
|
25952
25972
|
},
|
|
25953
25973
|
thread.id
|
|
@@ -25983,7 +26003,7 @@ function HandbookAskContainer({ handbookThreadId } = {}) {
|
|
|
25983
26003
|
AssistantSidebar,
|
|
25984
26004
|
{
|
|
25985
26005
|
threads,
|
|
25986
|
-
activeId: _optionalChain([thread, 'optionalAccess',
|
|
26006
|
+
activeId: _optionalChain([thread, 'optionalAccess', _730 => _730.id]),
|
|
25987
26007
|
onSelect: selectThread,
|
|
25988
26008
|
onNew: startNew,
|
|
25989
26009
|
newLabel: t("handbook.chat.new"),
|
|
@@ -25991,7 +26011,7 @@ function HandbookAskContainer({ handbookThreadId } = {}) {
|
|
|
25991
26011
|
}
|
|
25992
26012
|
) })
|
|
25993
26013
|
),
|
|
25994
|
-
[selectThread, startNew, t, _optionalChain([thread, 'optionalAccess',
|
|
26014
|
+
[selectThread, startNew, t, _optionalChain([thread, 'optionalAccess', _731 => _731.id]), threads]
|
|
25995
26015
|
);
|
|
25996
26016
|
return (
|
|
25997
26017
|
// `RoundPageContainer` reads the page heading from the shared context, and
|
|
@@ -26003,7 +26023,7 @@ function HandbookAskContainer({ handbookThreadId } = {}) {
|
|
|
26003
26023
|
RoundPageContainer,
|
|
26004
26024
|
{
|
|
26005
26025
|
module: _chunkZ6T2575Ajs.Modules.HandbookPage,
|
|
26006
|
-
id: _optionalChain([thread, 'optionalAccess',
|
|
26026
|
+
id: _optionalChain([thread, 'optionalAccess', _732 => _732.id]),
|
|
26007
26027
|
fullWidth: true,
|
|
26008
26028
|
forceHeader: true,
|
|
26009
26029
|
defaultDetailsOpen: true,
|
|
@@ -26055,7 +26075,7 @@ function EntityMentionLinkView({ type, id, alias }) {
|
|
|
26055
26075
|
} catch (e25) {
|
|
26056
26076
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: alias });
|
|
26057
26077
|
}
|
|
26058
|
-
if (!_optionalChain([module, 'optionalAccess',
|
|
26078
|
+
if (!_optionalChain([module, 'optionalAccess', _733 => _733.pageUrl])) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: alias });
|
|
26059
26079
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: generate({ page: module, id }), children: alias });
|
|
26060
26080
|
}
|
|
26061
26081
|
_chunk7QVYU63Ejs.__name.call(void 0, EntityMentionLinkView, "EntityMentionLinkView");
|
|
@@ -26187,13 +26207,13 @@ function AssistantContainer({
|
|
|
26187
26207
|
AssistantSidebar,
|
|
26188
26208
|
{
|
|
26189
26209
|
threads: ctx.threads,
|
|
26190
|
-
activeId: _optionalChain([ctx, 'access',
|
|
26210
|
+
activeId: _optionalChain([ctx, 'access', _734 => _734.assistant, 'optionalAccess', _735 => _735.id]),
|
|
26191
26211
|
onSelect: ctx.selectThread,
|
|
26192
26212
|
renderThreadBadge
|
|
26193
26213
|
}
|
|
26194
26214
|
) })
|
|
26195
26215
|
),
|
|
26196
|
-
[ctx.threads, _optionalChain([ctx, 'access',
|
|
26216
|
+
[ctx.threads, _optionalChain([ctx, 'access', _736 => _736.assistant, 'optionalAccess', _737 => _737.id]), ctx.selectThread, renderThreadBadge]
|
|
26197
26217
|
);
|
|
26198
26218
|
const thread = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: !showThread ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
26199
26219
|
AssistantEmptyState,
|
|
@@ -26201,7 +26221,7 @@ function AssistantContainer({
|
|
|
26201
26221
|
onSend: ctx.sendMessage,
|
|
26202
26222
|
operatorMode: ctx.operatorMode,
|
|
26203
26223
|
onOperatorModeChange: showOperatorToggle ? ctx.setOperatorMode : void 0,
|
|
26204
|
-
composerLeading: _optionalChain([renderScopePicker, 'optionalCall',
|
|
26224
|
+
composerLeading: _optionalChain([renderScopePicker, 'optionalCall', _738 => _738()])
|
|
26205
26225
|
}
|
|
26206
26226
|
) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
26207
26227
|
ctx.assistant ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -26233,7 +26253,7 @@ function AssistantContainer({
|
|
|
26233
26253
|
AssistantSidebar,
|
|
26234
26254
|
{
|
|
26235
26255
|
threads: ctx.threads,
|
|
26236
|
-
activeId: _optionalChain([ctx, 'access',
|
|
26256
|
+
activeId: _optionalChain([ctx, 'access', _739 => _739.assistant, 'optionalAccess', _740 => _740.id]),
|
|
26237
26257
|
onSelect: ctx.selectThread,
|
|
26238
26258
|
onNew: ctx.startNew,
|
|
26239
26259
|
renderThreadBadge
|
|
@@ -26246,7 +26266,7 @@ function AssistantContainer({
|
|
|
26246
26266
|
RoundPageContainer,
|
|
26247
26267
|
{
|
|
26248
26268
|
module: _chunkZ6T2575Ajs.Modules.Assistant,
|
|
26249
|
-
id: _optionalChain([ctx, 'access',
|
|
26269
|
+
id: _optionalChain([ctx, 'access', _741 => _741.assistant, 'optionalAccess', _742 => _742.id]),
|
|
26250
26270
|
fullWidth: true,
|
|
26251
26271
|
forceHeader: true,
|
|
26252
26272
|
defaultDetailsOpen: true,
|
|
@@ -26274,7 +26294,7 @@ function flattenBlocks(blocks) {
|
|
|
26274
26294
|
if (typeof inline === "string") return inline;
|
|
26275
26295
|
if (!inline || typeof inline !== "object") return "";
|
|
26276
26296
|
const node = inline;
|
|
26277
|
-
if (node.type === "mention") return _nullishCoalesce(_optionalChain([node, 'access',
|
|
26297
|
+
if (node.type === "mention") return _nullishCoalesce(_optionalChain([node, 'access', _743 => _743.props, 'optionalAccess', _744 => _744.alias]), () => ( ""));
|
|
26278
26298
|
if (typeof node.text === "string") return node.text;
|
|
26279
26299
|
if (Array.isArray(node.content)) return node.content.map(readInline).join("");
|
|
26280
26300
|
return "";
|
|
@@ -26391,7 +26411,7 @@ function AssistantPageContainer({
|
|
|
26391
26411
|
AssistantSidebar,
|
|
26392
26412
|
{
|
|
26393
26413
|
threads: ctx.threads,
|
|
26394
|
-
activeId: _optionalChain([ctx, 'access',
|
|
26414
|
+
activeId: _optionalChain([ctx, 'access', _745 => _745.assistant, 'optionalAccess', _746 => _746.id]),
|
|
26395
26415
|
onSelect: ctx.selectThread,
|
|
26396
26416
|
onNew: ctx.startNew
|
|
26397
26417
|
}
|
|
@@ -26667,14 +26687,14 @@ function ApprovalActionCard({ actionId, summary, onResolved, hiddenRelationshipK
|
|
|
26667
26687
|
const presented = _react.useMemo.call(void 0, () => parseOperatorProposal(actionProposal), [actionProposal]);
|
|
26668
26688
|
const legacy = _react.useMemo.call(void 0, () => presented ? void 0 : parseLegacyProposal(toolArgs), [presented, toolArgs]);
|
|
26669
26689
|
const isUpdate = toolName === "update_entity";
|
|
26670
|
-
const entityType = _nullishCoalesce(_nullishCoalesce(_optionalChain([presented, 'optionalAccess',
|
|
26690
|
+
const entityType = _nullishCoalesce(_nullishCoalesce(_optionalChain([presented, 'optionalAccess', _747 => _747.type]), () => ( _optionalChain([legacy, 'optionalAccess', _748 => _748.type]))), () => ( ""));
|
|
26671
26691
|
const loose = t;
|
|
26672
26692
|
const entityLabel = entityName(loose, entityType);
|
|
26673
|
-
const targetLabel = _nullishCoalesce(_optionalChain([presented, 'optionalAccess',
|
|
26693
|
+
const targetLabel = _nullishCoalesce(_optionalChain([presented, 'optionalAccess', _749 => _749.target, 'optionalAccess', _750 => _750.label]), () => ( ""));
|
|
26674
26694
|
const rows = _react.useMemo.call(void 0, () => {
|
|
26675
26695
|
const yes = t("features.assistant.approval.proposal.yes");
|
|
26676
26696
|
const no = t("features.assistant.approval.proposal.no");
|
|
26677
|
-
const attributes = _nullishCoalesce(_optionalChain([presented, 'optionalAccess',
|
|
26697
|
+
const attributes = _nullishCoalesce(_optionalChain([presented, 'optionalAccess', _751 => _751.attributes]), () => ( _optionalChain([legacy, 'optionalAccess', _752 => _752.attributes])));
|
|
26678
26698
|
const attributeRows = Object.entries(_nullishCoalesce(attributes, () => ( {}))).flatMap(([key, value]) => {
|
|
26679
26699
|
const text = formatAttribute(value, yes, no);
|
|
26680
26700
|
return text === void 0 ? [] : [{ key: `attribute:${key}`, label: fieldLabel(loose, entityType, key), value: text }];
|
|
@@ -26712,7 +26732,7 @@ function ApprovalActionCard({ actionId, summary, onResolved, hiddenRelationshipK
|
|
|
26712
26732
|
try {
|
|
26713
26733
|
const message = kind === "approve" ? await _chunkNPGX2GJDjs.AssistantActionService.approve({ id: actionId }) : await _chunkNPGX2GJDjs.AssistantActionService.deny({ id: actionId });
|
|
26714
26734
|
setStatus(kind === "approve" ? "executed" : "denied");
|
|
26715
|
-
if (message) _optionalChain([onResolved, 'optionalCall',
|
|
26735
|
+
if (message) _optionalChain([onResolved, 'optionalCall', _753 => _753(message)]);
|
|
26716
26736
|
} catch (error) {
|
|
26717
26737
|
console.error(`ApprovalActionCard: failed to ${kind} assistant action ${actionId}`, error);
|
|
26718
26738
|
setFailed(true);
|
|
@@ -26858,10 +26878,10 @@ var useNotificationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call
|
|
|
26858
26878
|
const now = _chunkSYMI4IDWjs.useMountedNow.call(void 0, );
|
|
26859
26879
|
const generateUrl = usePageUrlGenerator();
|
|
26860
26880
|
const { loadNotifications } = useNotificationContext();
|
|
26861
|
-
const archived = _optionalChain([params, 'access',
|
|
26881
|
+
const archived = _optionalChain([params, 'access', _754 => _754.context, 'optionalAccess', _755 => _755.archived]) === true;
|
|
26862
26882
|
const archiveNotification = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (notification) => {
|
|
26863
26883
|
await _chunkNPGX2GJDjs.NotificationService.archive({ id: notification.id });
|
|
26864
|
-
_optionalChain([params, 'access',
|
|
26884
|
+
_optionalChain([params, 'access', _756 => _756.dataRetriever, 'optionalAccess', _757 => _757.removeElement, 'call', _758 => _758(notification)]);
|
|
26865
26885
|
await loadNotifications();
|
|
26866
26886
|
}, "archiveNotification");
|
|
26867
26887
|
const tableData = _react.useMemo.call(void 0, () => {
|
|
@@ -26900,7 +26920,7 @@ var useNotificationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call
|
|
|
26900
26920
|
const data = generateNotificationData({ notification, generateUrl });
|
|
26901
26921
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-foreground text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
|
|
26902
26922
|
strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { className: "font-medium", children: chunks }), "strong"),
|
|
26903
|
-
actor: _nullishCoalesce(_optionalChain([data, 'access',
|
|
26923
|
+
actor: _nullishCoalesce(_optionalChain([data, 'access', _759 => _759.actor, 'optionalAccess', _760 => _760.name]), () => ( "")),
|
|
26904
26924
|
title: data.title,
|
|
26905
26925
|
message: _nullishCoalesce(notification.message, () => ( ""))
|
|
26906
26926
|
}) });
|
|
@@ -26955,7 +26975,7 @@ var useNotificationTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call
|
|
|
26955
26975
|
})
|
|
26956
26976
|
};
|
|
26957
26977
|
const columns = _react.useMemo.call(void 0, () => {
|
|
26958
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
26978
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _761 => _761[field], 'optionalCall', _762 => _762()])).filter((col) => col !== void 0);
|
|
26959
26979
|
}, [params.fields, fieldColumnMap, t, generateUrl, dateLocale, now]);
|
|
26960
26980
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
26961
26981
|
}, "useNotificationTableStructure");
|
|
@@ -27365,11 +27385,11 @@ _chunk7QVYU63Ejs.__name.call(void 0, useReferralStats, "useReferralStats");
|
|
|
27365
27385
|
// src/features/referral/components/ReferralWidget.tsx
|
|
27366
27386
|
|
|
27367
27387
|
function inviteErrorCode(err) {
|
|
27368
|
-
return _optionalChain([err, 'optionalAccess',
|
|
27388
|
+
return _optionalChain([err, 'optionalAccess', _763 => _763.body, 'optionalAccess', _764 => _764.errors, 'optionalAccess', _765 => _765[0], 'optionalAccess', _766 => _766.code]);
|
|
27369
27389
|
}
|
|
27370
27390
|
_chunk7QVYU63Ejs.__name.call(void 0, inviteErrorCode, "inviteErrorCode");
|
|
27371
27391
|
async function copyToClipboard(text) {
|
|
27372
|
-
if (_optionalChain([navigator, 'access',
|
|
27392
|
+
if (_optionalChain([navigator, 'access', _767 => _767.clipboard, 'optionalAccess', _768 => _768.writeText])) {
|
|
27373
27393
|
try {
|
|
27374
27394
|
await navigator.clipboard.writeText(text);
|
|
27375
27395
|
return true;
|
|
@@ -27432,7 +27452,7 @@ function ReferralWidget({
|
|
|
27432
27452
|
const linkInputRef = _react.useRef.call(void 0, null);
|
|
27433
27453
|
const config = _chunkPNCO3HMJjs.getReferralConfig.call(void 0, );
|
|
27434
27454
|
const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
|
|
27435
|
-
const referralUrl = _optionalChain([stats, 'optionalAccess',
|
|
27455
|
+
const referralUrl = _optionalChain([stats, 'optionalAccess', _769 => _769.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
|
|
27436
27456
|
if (!_chunkPNCO3HMJjs.isReferralEnabled.call(void 0, )) {
|
|
27437
27457
|
return null;
|
|
27438
27458
|
}
|
|
@@ -27442,7 +27462,7 @@ function ReferralWidget({
|
|
|
27442
27462
|
if (success) {
|
|
27443
27463
|
setCopied(true);
|
|
27444
27464
|
_chunkNPGX2GJDjs.showToast.call(void 0, text.copiedMessage);
|
|
27445
|
-
_optionalChain([onLinkCopied, 'optionalCall',
|
|
27465
|
+
_optionalChain([onLinkCopied, 'optionalCall', _770 => _770()]);
|
|
27446
27466
|
setTimeout(() => setCopied(false), 2e3);
|
|
27447
27467
|
} else {
|
|
27448
27468
|
_chunkNPGX2GJDjs.showError.call(void 0, text.copyError);
|
|
@@ -27456,14 +27476,14 @@ function ReferralWidget({
|
|
|
27456
27476
|
try {
|
|
27457
27477
|
await sendInvite(email);
|
|
27458
27478
|
_chunkNPGX2GJDjs.showToast.call(void 0, text.inviteSent);
|
|
27459
|
-
_optionalChain([onInviteSent, 'optionalCall',
|
|
27479
|
+
_optionalChain([onInviteSent, 'optionalCall', _771 => _771(email)]);
|
|
27460
27480
|
setEmail("");
|
|
27461
27481
|
} catch (err) {
|
|
27462
27482
|
const code = inviteErrorCode(err);
|
|
27463
27483
|
_chunkNPGX2GJDjs.showError.call(void 0,
|
|
27464
27484
|
code === "REFERRAL_ALREADY_INVITED" ? text.alreadyInvited : code === "REFERRAL_ALREADY_REGISTERED" ? text.alreadyRegistered : text.inviteError
|
|
27465
27485
|
);
|
|
27466
|
-
_optionalChain([onInviteError, 'optionalCall',
|
|
27486
|
+
_optionalChain([onInviteError, 'optionalCall', _772 => _772(err instanceof Error ? err : new Error(text.inviteError))]);
|
|
27467
27487
|
}
|
|
27468
27488
|
}, [
|
|
27469
27489
|
email,
|
|
@@ -27603,7 +27623,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, ReferralDialog, "ReferralDialog");
|
|
|
27603
27623
|
|
|
27604
27624
|
|
|
27605
27625
|
function createUsageFormatters(locale, currency, dateLocale = locale) {
|
|
27606
|
-
const symbol = _nullishCoalesce(_optionalChain([new Intl.NumberFormat(locale, { style: "currency", currency, currencyDisplay: "narrowSymbol" }), 'access',
|
|
27626
|
+
const symbol = _nullishCoalesce(_optionalChain([new Intl.NumberFormat(locale, { style: "currency", currency, currencyDisplay: "narrowSymbol" }), 'access', _773 => _773.formatToParts, 'call', _774 => _774(0), 'access', _775 => _775.find, 'call', _776 => _776((part) => part.type === "currency"), 'optionalAccess', _777 => _777.value]), () => ( currency));
|
|
27607
27627
|
const decimal = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (value, decimals) => value.toLocaleString(locale, { minimumFractionDigits: decimals, maximumFractionDigits: decimals }), "decimal");
|
|
27608
27628
|
const dayFormat = new Intl.DateTimeFormat(dateLocale, { day: "numeric", month: "short", timeZone: "UTC" });
|
|
27609
27629
|
const monthFormat = new Intl.DateTimeFormat(dateLocale, { month: "short", year: "numeric", timeZone: "UTC" });
|
|
@@ -27718,7 +27738,7 @@ var useReferralAdminReferralTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__
|
|
|
27718
27738
|
})
|
|
27719
27739
|
};
|
|
27720
27740
|
const columns = _react.useMemo.call(void 0, () => {
|
|
27721
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
27741
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _778 => _778[field], 'optionalCall', _779 => _779()])).filter((col) => col !== void 0);
|
|
27722
27742
|
}, [params.fields, fieldColumnMap, t, decimal]);
|
|
27723
27743
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
27724
27744
|
}, "useReferralAdminReferralTableStructure");
|
|
@@ -27752,7 +27772,7 @@ var useReferralAdminReferrerTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__
|
|
|
27752
27772
|
});
|
|
27753
27773
|
}, [params.data]);
|
|
27754
27774
|
const sortableHeader = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (sort, label) => () => {
|
|
27755
|
-
const active = _optionalChain([context, 'optionalAccess',
|
|
27775
|
+
const active = _optionalChain([context, 'optionalAccess', _780 => _780.sort]) === sort;
|
|
27756
27776
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
27757
27777
|
Button,
|
|
27758
27778
|
{
|
|
@@ -27763,7 +27783,7 @@ var useReferralAdminReferrerTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__
|
|
|
27763
27783
|
title: t("referral.admin.referrers.sortBy"),
|
|
27764
27784
|
"aria-sort": active ? "descending" : void 0,
|
|
27765
27785
|
"data-testid": active ? "referrals-referrers-sort" : void 0,
|
|
27766
|
-
onClick: () => _optionalChain([context, 'optionalAccess',
|
|
27786
|
+
onClick: () => _optionalChain([context, 'optionalAccess', _781 => _781.onSort, 'call', _782 => _782(sort)]),
|
|
27767
27787
|
children: label
|
|
27768
27788
|
}
|
|
27769
27789
|
);
|
|
@@ -27875,8 +27895,8 @@ var useReferralAdminReferrerTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__
|
|
|
27875
27895
|
})
|
|
27876
27896
|
};
|
|
27877
27897
|
const columns = _react.useMemo.call(void 0, () => {
|
|
27878
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
27879
|
-
}, [params.fields, fieldColumnMap, t, decimal, _optionalChain([context, 'optionalAccess',
|
|
27898
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _783 => _783[field], 'optionalCall', _784 => _784()])).filter((col) => col !== void 0);
|
|
27899
|
+
}, [params.fields, fieldColumnMap, t, decimal, _optionalChain([context, 'optionalAccess', _785 => _785.sort])]);
|
|
27880
27900
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
27881
27901
|
}, "useReferralAdminReferrerTableStructure");
|
|
27882
27902
|
registerTableGenerator("referrals/administration/referrers", useReferralAdminReferrerTableStructure);
|
|
@@ -27925,10 +27945,10 @@ function ReferralsAdminFunnel({ summary }) {
|
|
|
27925
27945
|
const { decimal } = useUsageFormatters();
|
|
27926
27946
|
const current = summary.find((row) => row.window === "current");
|
|
27927
27947
|
const steps = [
|
|
27928
|
-
{ label: t("referral.admin.tiles.visits"), value: _nullishCoalesce(_optionalChain([current, 'optionalAccess',
|
|
27929
|
-
{ label: t("referral.admin.tiles.invites"), value: _nullishCoalesce(_optionalChain([current, 'optionalAccess',
|
|
27930
|
-
{ label: t("referral.admin.tiles.signups"), value: _nullishCoalesce(_optionalChain([current, 'optionalAccess',
|
|
27931
|
-
{ label: t("referral.admin.tiles.paying"), value: _nullishCoalesce(_optionalChain([current, 'optionalAccess',
|
|
27948
|
+
{ label: t("referral.admin.tiles.visits"), value: _nullishCoalesce(_optionalChain([current, 'optionalAccess', _786 => _786.visits]), () => ( 0)) },
|
|
27949
|
+
{ label: t("referral.admin.tiles.invites"), value: _nullishCoalesce(_optionalChain([current, 'optionalAccess', _787 => _787.invitesSent]), () => ( 0)) },
|
|
27950
|
+
{ label: t("referral.admin.tiles.signups"), value: _nullishCoalesce(_optionalChain([current, 'optionalAccess', _788 => _788.signups]), () => ( 0)) },
|
|
27951
|
+
{ label: t("referral.admin.tiles.paying"), value: _nullishCoalesce(_optionalChain([current, 'optionalAccess', _789 => _789.paying]), () => ( 0)) }
|
|
27932
27952
|
];
|
|
27933
27953
|
const max = Math.max(...steps.map((step) => step.value), 0);
|
|
27934
27954
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "section", { "data-testid": "referrals-funnel", className: "grid gap-2", children: [
|
|
@@ -28893,7 +28913,7 @@ function OAuthClientList({
|
|
|
28893
28913
|
OAuthClientCard,
|
|
28894
28914
|
{
|
|
28895
28915
|
client,
|
|
28896
|
-
onClick: () => _optionalChain([onClientClick, 'optionalCall',
|
|
28916
|
+
onClick: () => _optionalChain([onClientClick, 'optionalCall', _790 => _790(client)]),
|
|
28897
28917
|
onEdit: onEditClick ? () => onEditClick(client) : void 0,
|
|
28898
28918
|
onDelete: onDeleteClick ? () => onDeleteClick(client) : void 0
|
|
28899
28919
|
},
|
|
@@ -28918,11 +28938,11 @@ function OAuthClientForm({
|
|
|
28918
28938
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
28919
28939
|
const isEditMode = !!client;
|
|
28920
28940
|
const [formState, setFormState] = _react.useState.call(void 0, {
|
|
28921
|
-
name: _optionalChain([client, 'optionalAccess',
|
|
28922
|
-
description: _optionalChain([client, 'optionalAccess',
|
|
28923
|
-
redirectUris: _optionalChain([client, 'optionalAccess',
|
|
28941
|
+
name: _optionalChain([client, 'optionalAccess', _791 => _791.name]) || "",
|
|
28942
|
+
description: _optionalChain([client, 'optionalAccess', _792 => _792.description]) || "",
|
|
28943
|
+
redirectUris: _optionalChain([client, 'optionalAccess', _793 => _793.redirectUris, 'optionalAccess', _794 => _794.length]) ? client.redirectUris : [""],
|
|
28924
28944
|
allowedScopes: client ? client.allowedScopes || [] : defaultScopes,
|
|
28925
|
-
isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess',
|
|
28945
|
+
isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _795 => _795.isConfidential]), () => ( true))
|
|
28926
28946
|
});
|
|
28927
28947
|
const [errors, setErrors] = _react.useState.call(void 0, {});
|
|
28928
28948
|
const validate = _react.useCallback.call(void 0, () => {
|
|
@@ -29332,7 +29352,7 @@ function OAuthConsentScreen({
|
|
|
29332
29352
|
if (error || !clientInfo) {
|
|
29333
29353
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-h-dvh flex items-center justify-center p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { className: "w-full max-w-md", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { className: "py-8", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Alert, { variant: "destructive", children: [
|
|
29334
29354
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertTriangle, { className: "h-4 w-4" }),
|
|
29335
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess',
|
|
29355
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _796 => _796.message]) || t("oauth.consent.invalid_request") })
|
|
29336
29356
|
] }) }) }) });
|
|
29337
29357
|
}
|
|
29338
29358
|
const { client, scopes } = clientInfo;
|
|
@@ -29555,7 +29575,7 @@ function WaitlistForm({ onSuccess }) {
|
|
|
29555
29575
|
source: _chunkPNCO3HMJjs.getSignupSource.call(void 0, )
|
|
29556
29576
|
});
|
|
29557
29577
|
setIsSuccess(true);
|
|
29558
|
-
_optionalChain([onSuccess, 'optionalCall',
|
|
29578
|
+
_optionalChain([onSuccess, 'optionalCall', _797 => _797()]);
|
|
29559
29579
|
} catch (e) {
|
|
29560
29580
|
errorToast({ title: t("common.errors.error"), error: e });
|
|
29561
29581
|
} finally {
|
|
@@ -29766,11 +29786,11 @@ function WaitlistList({ fullWidth } = {}) {
|
|
|
29766
29786
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { variant: "outline", size: "icon", onClick: refresh, disabled: !data.isLoaded, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RefreshCw, { className: `h-4 w-4 ${!data.isLoaded ? "animate-spin" : ""}` }) })
|
|
29767
29787
|
] });
|
|
29768
29788
|
const totals = [
|
|
29769
|
-
{ key: "total", label: t("waitlist.admin.total"), value: _optionalChain([stats, 'optionalAccess',
|
|
29770
|
-
{ key: "pending", label: t("waitlist.admin.status.pending"), value: _optionalChain([stats, 'optionalAccess',
|
|
29771
|
-
{ key: "confirmed", label: t("waitlist.admin.status.confirmed"), value: _optionalChain([stats, 'optionalAccess',
|
|
29772
|
-
{ key: "invited", label: t("waitlist.admin.status.invited"), value: _optionalChain([stats, 'optionalAccess',
|
|
29773
|
-
{ key: "registered", label: t("waitlist.admin.status.registered"), value: _optionalChain([stats, 'optionalAccess',
|
|
29789
|
+
{ key: "total", label: t("waitlist.admin.total"), value: _optionalChain([stats, 'optionalAccess', _798 => _798.total]) },
|
|
29790
|
+
{ key: "pending", label: t("waitlist.admin.status.pending"), value: _optionalChain([stats, 'optionalAccess', _799 => _799.pending]) },
|
|
29791
|
+
{ key: "confirmed", label: t("waitlist.admin.status.confirmed"), value: _optionalChain([stats, 'optionalAccess', _800 => _800.confirmed]) },
|
|
29792
|
+
{ key: "invited", label: t("waitlist.admin.status.invited"), value: _optionalChain([stats, 'optionalAccess', _801 => _801.invited]) },
|
|
29793
|
+
{ key: "registered", label: t("waitlist.admin.status.registered"), value: _optionalChain([stats, 'optionalAccess', _802 => _802.registered]) }
|
|
29774
29794
|
];
|
|
29775
29795
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-4", children: [
|
|
29776
29796
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "dl", { className: "grid grid-cols-5 divide-x divide-border rounded-md border", "data-testid": "waitlist-totals", children: totals.map((total) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col-reverse items-center gap-1 p-3", children: [
|
|
@@ -30125,7 +30145,7 @@ var ModuleEditor = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs.__n
|
|
|
30125
30145
|
] }),
|
|
30126
30146
|
roleIds.map((roleId) => {
|
|
30127
30147
|
const roleTokens = block[roleId];
|
|
30128
|
-
const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess',
|
|
30148
|
+
const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _803 => _803[roleId]]), () => ( roleId));
|
|
30129
30149
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
|
|
30130
30150
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: roleLabel }),
|
|
30131
30151
|
_chunkPNCO3HMJjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -30162,7 +30182,7 @@ function RbacContainer() {
|
|
|
30162
30182
|
}, []);
|
|
30163
30183
|
const sortedModuleIds = _react.useMemo.call(void 0, () => {
|
|
30164
30184
|
if (!matrix) return [];
|
|
30165
|
-
return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
30185
|
+
return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _804 => _804[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _805 => _805[b]]), () => ( b))));
|
|
30166
30186
|
}, [matrix, moduleNames]);
|
|
30167
30187
|
const roleIds = _react.useMemo.call(void 0, () => {
|
|
30168
30188
|
if (roleNames) {
|
|
@@ -30225,7 +30245,7 @@ function RbacContainer() {
|
|
|
30225
30245
|
id === selectedModuleId && "bg-muted font-medium text-foreground",
|
|
30226
30246
|
id !== selectedModuleId && "text-muted-foreground"
|
|
30227
30247
|
),
|
|
30228
|
-
children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
30248
|
+
children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _806 => _806[id]]), () => ( id))
|
|
30229
30249
|
}
|
|
30230
30250
|
) }, id)) }) }),
|
|
30231
30251
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "section", { className: "flex-1 overflow-y-auto p-4", children: selectedModuleId && selectedBlock ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -30233,7 +30253,7 @@ function RbacContainer() {
|
|
|
30233
30253
|
{
|
|
30234
30254
|
moduleId: selectedModuleId,
|
|
30235
30255
|
block: selectedBlock,
|
|
30236
|
-
moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
30256
|
+
moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _807 => _807[selectedModuleId]]), () => ( selectedModuleId)),
|
|
30237
30257
|
roleIds,
|
|
30238
30258
|
roleNames,
|
|
30239
30259
|
onOpenPicker: openPicker
|
|
@@ -30244,12 +30264,12 @@ function RbacContainer() {
|
|
|
30244
30264
|
RbacPermissionPicker,
|
|
30245
30265
|
{
|
|
30246
30266
|
open: !!activePicker,
|
|
30247
|
-
anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess',
|
|
30267
|
+
anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _808 => _808.anchor]), () => ( null)),
|
|
30248
30268
|
value: activeValue,
|
|
30249
|
-
isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess',
|
|
30269
|
+
isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _809 => _809.isRoleColumn]), () => ( false)),
|
|
30250
30270
|
knownSegments: activeSegments,
|
|
30251
30271
|
onSetValue: handleSetValue,
|
|
30252
|
-
onClear: _optionalChain([activePicker, 'optionalAccess',
|
|
30272
|
+
onClear: _optionalChain([activePicker, 'optionalAccess', _810 => _810.isRoleColumn]) ? handleClear : void 0,
|
|
30253
30273
|
onClose: closePicker
|
|
30254
30274
|
}
|
|
30255
30275
|
)
|
|
@@ -30316,7 +30336,7 @@ function RbacByRoleContainer() {
|
|
|
30316
30336
|
}, [roleNames]);
|
|
30317
30337
|
const sortedModuleIds = _react.useMemo.call(void 0, () => {
|
|
30318
30338
|
if (!matrix) return [];
|
|
30319
|
-
return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
30339
|
+
return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _811 => _811[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _812 => _812[b]]), () => ( b))));
|
|
30320
30340
|
}, [matrix, moduleNames]);
|
|
30321
30341
|
_react.useEffect.call(void 0, () => {
|
|
30322
30342
|
if (!selectedRoleId && sortedRoleIds.length > 0) {
|
|
@@ -30365,7 +30385,7 @@ function RbacByRoleContainer() {
|
|
|
30365
30385
|
id === selectedRoleId && "bg-muted font-medium text-foreground",
|
|
30366
30386
|
id !== selectedRoleId && "text-muted-foreground"
|
|
30367
30387
|
),
|
|
30368
|
-
children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess',
|
|
30388
|
+
children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _813 => _813[id]]), () => ( id))
|
|
30369
30389
|
}
|
|
30370
30390
|
) }, id)) }) }),
|
|
30371
30391
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "section", { className: "flex-1 overflow-y-auto p-4", children: sortedModuleIds.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rounded-lg border border-accent bg-card", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "table", { className: "w-full text-sm", children: [
|
|
@@ -30385,7 +30405,7 @@ function RbacByRoleContainer() {
|
|
|
30385
30405
|
if (!block) return null;
|
|
30386
30406
|
const defaultTokens = _nullishCoalesce(block.default, () => ( []));
|
|
30387
30407
|
const roleTokens = block[selectedRoleId];
|
|
30388
|
-
const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
30408
|
+
const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _814 => _814[moduleId]]), () => ( moduleId));
|
|
30389
30409
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
|
|
30390
30410
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { className: "border-b bg-muted/40", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
30391
30411
|
"td",
|
|
@@ -30400,7 +30420,7 @@ function RbacByRoleContainer() {
|
|
|
30400
30420
|
_chunkPNCO3HMJjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RbacPermissionCell, { value: cellValue2(defaultTokens, action) }) }, action))
|
|
30401
30421
|
] }),
|
|
30402
30422
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
|
|
30403
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess',
|
|
30423
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _815 => _815[selectedRoleId]]), () => ( selectedRoleId)) }),
|
|
30404
30424
|
_chunkPNCO3HMJjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
30405
30425
|
CellButton3,
|
|
30406
30426
|
{
|
|
@@ -30421,12 +30441,12 @@ function RbacByRoleContainer() {
|
|
|
30421
30441
|
RbacPermissionPicker,
|
|
30422
30442
|
{
|
|
30423
30443
|
open: !!activePicker,
|
|
30424
|
-
anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess',
|
|
30444
|
+
anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _816 => _816.anchor]), () => ( null)),
|
|
30425
30445
|
value: activeValue,
|
|
30426
|
-
isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess',
|
|
30446
|
+
isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _817 => _817.isRoleColumn]), () => ( false)),
|
|
30427
30447
|
knownSegments: activeSegments,
|
|
30428
30448
|
onSetValue: handleSetValue,
|
|
30429
|
-
onClear: _optionalChain([activePicker, 'optionalAccess',
|
|
30449
|
+
onClear: _optionalChain([activePicker, 'optionalAccess', _818 => _818.isRoleColumn]) ? handleClear : void 0,
|
|
30430
30450
|
onClose: closePicker
|
|
30431
30451
|
}
|
|
30432
30452
|
)
|
|
@@ -31090,4 +31110,4 @@ _chunk7QVYU63Ejs.__name.call(void 0, RbacByRoleContainer, "RbacByRoleContainer")
|
|
|
31090
31110
|
|
|
31091
31111
|
|
|
31092
31112
|
exports.JsonApiProvider = JsonApiProvider; exports.useJsonApiGet = useJsonApiGet; exports.useJsonApiMutation = useJsonApiMutation; exports.useRehydration = useRehydration; exports.useRehydrationList = useRehydrationList; exports.TableGeneratorRegistry = TableGeneratorRegistry; exports.tableGeneratorRegistry = tableGeneratorRegistry; exports.usePageUrlGenerator = usePageUrlGenerator; exports.useUrlRewriter = useUrlRewriter; exports.useDataListRetriever = useDataListRetriever; exports.useDebounce = useDebounce2; exports.registerTableGenerator = registerTableGenerator; exports.useTableGenerator = useTableGenerator; exports.computeLayeredLayout = computeLayeredLayout; exports.fitLayeredLayoutToAspectRatio = fitLayeredLayoutToAspectRatio; exports.useCustomD3Graph = useCustomD3Graph; exports.SharedProvider = SharedProvider; exports.useSharedContext = useSharedContext; exports.AdministrationProvider = AdministrationProvider; exports.useAdministrationContext = useAdministrationContext; exports.SocketContext = SocketContext; exports.SocketProvider = SocketProvider; exports.useSocketContext = useSocketContext; exports.CurrentUserProvider = CurrentUserProvider; exports.useCurrentUserContext = useCurrentUserContext; exports.useCurrentUserContextOptional = useCurrentUserContextOptional; exports.errorToast = errorToast; exports.buttonVariants = buttonVariants; exports.Button = Button; exports.AlertDialog = AlertDialog; exports.AlertDialogTrigger = AlertDialogTrigger; exports.AlertDialogPortal = AlertDialogPortal; exports.AlertDialogOverlay = AlertDialogOverlay; exports.AlertDialogContent = AlertDialogContent; exports.AlertDialogHeader = AlertDialogHeader; exports.AlertDialogFooter = AlertDialogFooter; exports.AlertDialogMedia = AlertDialogMedia; exports.AlertDialogTitle = AlertDialogTitle; exports.AlertDialogDescription = AlertDialogDescription; exports.AlertDialogAction = AlertDialogAction; exports.AlertDialogCancel = AlertDialogCancel; exports.Input = Input; exports.Label = Label; exports.isAccountDeletionEnabled = isAccountDeletionEnabled; exports.AccountDeletionAdminTrigger = AccountDeletionAdminTrigger; exports.Accordion = Accordion; exports.AccordionItem = AccordionItem; exports.AccordionTrigger = AccordionTrigger; exports.AccordionContent = AccordionContent; exports.Alert = Alert; exports.AlertTitle = AlertTitle; exports.AlertDescription = AlertDescription; exports.AlertAction = AlertAction; exports.Avatar = Avatar; exports.AvatarImage = AvatarImage; exports.AvatarFallback = AvatarFallback; exports.AvatarBadge = AvatarBadge; exports.AvatarGroup = AvatarGroup; exports.AvatarGroupCount = AvatarGroupCount; exports.badgeVariants = badgeVariants; exports.Badge = Badge; exports.Breadcrumb = Breadcrumb; exports.BreadcrumbList = BreadcrumbList; exports.BreadcrumbItem = BreadcrumbItem; exports.BreadcrumbLink = BreadcrumbLink; exports.BreadcrumbPage = BreadcrumbPage; exports.BreadcrumbSeparator = BreadcrumbSeparator; exports.BreadcrumbEllipsis = BreadcrumbEllipsis; exports.DirectionProvider = DirectionProvider; exports.useDir = useDir; exports.Calendar = Calendar; exports.CalendarDayButton = CalendarDayButton; exports.Card = Card; exports.CardHeader = CardHeader; exports.CardTitle = CardTitle; exports.CardDescription = CardDescription; exports.CardAction = CardAction; exports.CardContent = CardContent; exports.CardFooter = CardFooter; exports.useCarousel = useCarousel; exports.Carousel = Carousel; exports.CarouselContent = CarouselContent; exports.CarouselItem = CarouselItem; exports.CarouselPrevious = CarouselPrevious; exports.CarouselNext = CarouselNext; exports.ChartContainer = ChartContainer; exports.ChartStyle = ChartStyle; exports.ChartTooltip = ChartTooltip; exports.ChartTooltipContent = ChartTooltipContent; exports.ChartLegend = ChartLegend; exports.ChartLegendContent = ChartLegendContent; exports.Checkbox = Checkbox; exports.Collapsible = Collapsible; exports.CollapsibleTrigger = CollapsibleTrigger; exports.CollapsibleContent = CollapsibleContent; exports.Textarea = Textarea; exports.InputGroup = InputGroup; exports.InputGroupAddon = InputGroupAddon; exports.InputGroupButton = InputGroupButton; exports.InputGroupText = InputGroupText; exports.InputGroupInput = InputGroupInput; exports.InputGroupTextarea = InputGroupTextarea; exports.Combobox = Combobox; exports.ComboboxValue = ComboboxValue; exports.ComboboxTrigger = ComboboxTrigger; exports.ComboboxInput = ComboboxInput; exports.ComboboxContent = ComboboxContent; exports.ComboboxList = ComboboxList; exports.ComboboxItem = ComboboxItem; exports.ComboboxGroup = ComboboxGroup; exports.ComboboxLabel = ComboboxLabel; exports.ComboboxCollection = ComboboxCollection; exports.ComboboxEmpty = ComboboxEmpty; exports.ComboboxSeparator = ComboboxSeparator; exports.ComboboxChips = ComboboxChips; exports.ComboboxChip = ComboboxChip; exports.ComboboxChipsInput = ComboboxChipsInput; exports.useComboboxAnchor = useComboboxAnchor; exports.Dialog = Dialog; exports.DialogTrigger = DialogTrigger; exports.DialogPortal = DialogPortal; exports.DialogClose = DialogClose; exports.DialogOverlay = DialogOverlay; exports.DialogContent = DialogContent; exports.DialogHeader = DialogHeader; exports.DialogFooter = DialogFooter; exports.DialogTitle = DialogTitle; exports.DialogDescription = DialogDescription; exports.Command = Command; exports.CommandDialog = CommandDialog; exports.CommandInput = CommandInput; exports.CommandList = CommandList; exports.CommandEmpty = CommandEmpty; exports.CommandGroup = CommandGroup; exports.CommandSeparator = CommandSeparator; exports.CommandItem = CommandItem; exports.CommandShortcut = CommandShortcut; exports.commandFilterByKeywords = commandFilterByKeywords; exports.ConfirmDialog = ConfirmDialog; exports.ContextMenu = ContextMenu; exports.ContextMenuPortal = ContextMenuPortal; exports.ContextMenuTrigger = ContextMenuTrigger; exports.ContextMenuContent = ContextMenuContent; exports.ContextMenuGroup = ContextMenuGroup; exports.ContextMenuLabel = ContextMenuLabel; exports.ContextMenuItem = ContextMenuItem; exports.ContextMenuSub = ContextMenuSub; exports.ContextMenuSubTrigger = ContextMenuSubTrigger; exports.ContextMenuSubContent = ContextMenuSubContent; exports.ContextMenuCheckboxItem = ContextMenuCheckboxItem; exports.ContextMenuRadioGroup = ContextMenuRadioGroup; exports.ContextMenuRadioItem = ContextMenuRadioItem; exports.ContextMenuSeparator = ContextMenuSeparator; exports.ContextMenuShortcut = ContextMenuShortcut; exports.Drawer = Drawer; exports.DrawerTrigger = DrawerTrigger; exports.DrawerPortal = DrawerPortal; exports.DrawerClose = DrawerClose; exports.DrawerOverlay = DrawerOverlay; exports.DrawerContent = DrawerContent; exports.DrawerHeader = DrawerHeader; exports.DrawerFooter = DrawerFooter; exports.DrawerTitle = DrawerTitle; exports.DrawerDescription = DrawerDescription; exports.DropdownMenu = DropdownMenu; exports.DropdownMenuPortal = DropdownMenuPortal; exports.DropdownMenuTrigger = DropdownMenuTrigger; exports.DropdownMenuContent = DropdownMenuContent; exports.DropdownMenuGroup = DropdownMenuGroup; exports.DropdownMenuLabel = DropdownMenuLabel; exports.DropdownMenuItem = DropdownMenuItem; exports.DropdownMenuSub = DropdownMenuSub; exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger; exports.DropdownMenuSubContent = DropdownMenuSubContent; exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem; exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup; exports.DropdownMenuRadioItem = DropdownMenuRadioItem; exports.DropdownMenuSeparator = DropdownMenuSeparator; exports.DropdownMenuShortcut = DropdownMenuShortcut; exports.EmptyState = EmptyState; exports.Separator = Separator; exports.FieldSet = FieldSet; exports.FieldLegend = FieldLegend; exports.FieldGroup = FieldGroup; exports.Field = Field; exports.FieldContent = FieldContent; exports.FieldLabel = FieldLabel; exports.FieldTitle = FieldTitle; exports.FieldDescription = FieldDescription; exports.FieldSeparator = FieldSeparator; exports.FieldError = FieldError; exports.Form = Form; exports.HoverCard = HoverCard; exports.HoverCardTrigger = HoverCardTrigger; exports.HoverCardContent = HoverCardContent; exports.InputOTP = InputOTP; exports.InputOTPGroup = InputOTPGroup; exports.InputOTPSlot = InputOTPSlot; exports.InputOTPSeparator = InputOTPSeparator; exports.NavigationMenu = NavigationMenu; exports.NavigationMenuList = NavigationMenuList; exports.NavigationMenuItem = NavigationMenuItem; exports.navigationMenuTriggerStyle = navigationMenuTriggerStyle; exports.NavigationMenuTrigger = NavigationMenuTrigger; exports.NavigationMenuContent = NavigationMenuContent; exports.NavigationMenuPositioner = NavigationMenuPositioner; exports.NavigationMenuLink = NavigationMenuLink; exports.NavigationMenuIndicator = NavigationMenuIndicator; exports.Popover = Popover; exports.PopoverTrigger = PopoverTrigger; exports.PopoverContent = PopoverContent; exports.PopoverHeader = PopoverHeader; exports.PopoverTitle = PopoverTitle; exports.PopoverDescription = PopoverDescription; exports.Progress = Progress; exports.ProgressTrack = ProgressTrack; exports.ProgressIndicator = ProgressIndicator; exports.ProgressLabel = ProgressLabel; exports.ProgressValue = ProgressValue; exports.RadioGroup = RadioGroup; exports.RadioGroupItem = RadioGroupItem; exports.ResizablePanelGroup = ResizablePanelGroup; exports.ResizablePanel = ResizablePanel; exports.ResizableHandle = ResizableHandle; exports.ScrollArea = ScrollArea; exports.ScrollBar = ScrollBar; exports.Select = Select; exports.SelectGroup = SelectGroup; exports.SelectValue = SelectValue; exports.SelectTrigger = SelectTrigger; exports.SelectContent = SelectContent; exports.SelectLabel = SelectLabel; exports.SelectItem = SelectItem; exports.SelectSeparator = SelectSeparator; exports.SelectScrollUpButton = SelectScrollUpButton; exports.SelectScrollDownButton = SelectScrollDownButton; exports.Sheet = Sheet; exports.SheetTrigger = SheetTrigger; exports.SheetClose = SheetClose; exports.SheetContent = SheetContent; exports.SheetHeader = SheetHeader; exports.SheetFooter = SheetFooter; exports.SheetTitle = SheetTitle; exports.SheetDescription = SheetDescription; exports.Skeleton = Skeleton; exports.TooltipProvider = TooltipProvider; exports.Tooltip = Tooltip2; exports.TooltipTrigger = TooltipTrigger; exports.TooltipContent = TooltipContent; exports.useSidebar = useSidebar; exports.useSidebarControls = useSidebarControls; exports.useOptionalSidebar = useOptionalSidebar; exports.SidebarProvider = SidebarProvider; exports.Sidebar = Sidebar; exports.SidebarTrigger = SidebarTrigger; exports.SidebarRail = SidebarRail; exports.SidebarInset = SidebarInset; exports.SidebarInput = SidebarInput; exports.SidebarHeader = SidebarHeader; exports.SidebarFooter = SidebarFooter; exports.SidebarSeparator = SidebarSeparator; exports.SidebarContent = SidebarContent; exports.SidebarGroup = SidebarGroup; exports.SidebarGroupLabel = SidebarGroupLabel; exports.SidebarGroupAction = SidebarGroupAction; exports.SidebarGroupContent = SidebarGroupContent; exports.SidebarMenu = SidebarMenu; exports.SidebarMenuItem = SidebarMenuItem; exports.SidebarMenuButton = SidebarMenuButton; exports.SidebarMenuAction = SidebarMenuAction; exports.SidebarMenuBadge = SidebarMenuBadge; exports.SidebarMenuSkeleton = SidebarMenuSkeleton; exports.SidebarMenuSub = SidebarMenuSub; exports.SidebarMenuSubItem = SidebarMenuSubItem; exports.SidebarMenuSubButton = SidebarMenuSubButton; exports.Slider = Slider; exports.Toaster = Toaster; exports.spinnerVariants = spinnerVariants; exports.Spinner = Spinner; exports.Switch = Switch; exports.Table = Table; exports.TableHeader = TableHeader; exports.TableBody = TableBody; exports.TableFooter = TableFooter; exports.TableRow = TableRow; exports.TableHead = TableHead; exports.TableCell = TableCell; exports.TableCaption = TableCaption; exports.Tabs = Tabs; exports.tabsListVariants = tabsListVariants; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.toggleVariants = toggleVariants; exports.Toggle = Toggle; exports.KanbanRoot = KanbanRoot; exports.KanbanBoard = KanbanBoard; exports.KanbanColumn = KanbanColumn; exports.KanbanColumnHandle = KanbanColumnHandle; exports.KanbanItem = KanbanItem; exports.KanbanItemHandle = KanbanItemHandle; exports.KanbanOverlay = KanbanOverlay; exports.Link = Link; exports.MultiSelect = MultiSelect; exports.useDebounce2 = useDebounce; exports.MultipleSelector = MultipleSelector; exports.EntityAvatar = EntityAvatar; exports.EditableAvatar = EditableAvatar; exports.TableCellAvatar = TableCellAvatar; exports.HeaderChildrenProvider = HeaderChildrenProvider; exports.useHeaderChildren = useHeaderChildren; exports.useHeaderMobileChildren = useHeaderMobileChildren; exports.useHeaderRootLabel = useHeaderRootLabel; exports.HeaderLeftContentProvider = HeaderLeftContentProvider; exports.useHeaderLeftContent = useHeaderLeftContent; exports.HeaderLogoProvider = HeaderLogoProvider; exports.useHeaderLogo = useHeaderLogo; exports.BreadcrumbNavigation = BreadcrumbNavigation; exports.ContentTitle = ContentTitle; exports.BreadcrumbRootProvider = BreadcrumbRootProvider; exports.useIsBreadcrumbRootHidden = useIsBreadcrumbRootHidden; exports.Header = Header; exports.MobileNavigationProvider = MobileNavigationProvider; exports.useMobileNavigationItems = useMobileNavigationItems; exports.MobileNavigationBar = MobileNavigationBar; exports.ModeToggleSwitch = ModeToggleSwitch; exports.PageSection = PageSection; exports.recentPagesAtom = recentPagesAtom; exports.RecentPagesNavigator = RecentPagesNavigator; exports.PageContainer = PageContainer; exports.partitionTabs = partitionTabs; exports.MermaidDiagram = MermaidDiagram; exports.ReactMarkdownContainer = ReactMarkdownContainer; exports.HEADER_ROW_MIN_H = HEADER_ROW_MIN_H; exports.RoundPageContainerTitle = RoundPageContainerTitle; exports.SectionHeader = SectionHeader; exports.MicroLabel = MicroLabel; exports.DetailField = DetailField; exports.RoundPageContainer = RoundPageContainer; exports.TabsContainer = TabsContainer; exports.AttributeElement = AttributeElement; exports.AllUsersListContainer = AllUsersListContainer; exports.PlatformUsersList = PlatformUsersList; exports.PlatformUsersContainer = PlatformUsersContainer; exports.UserContent = UserContent; exports.UserAvatar = UserAvatar; exports.UserAvatarList = UserAvatarList; exports.useUserSearch = useUserSearch; exports.useUserTableStructure = useUserTableStructure; exports.UserSearchPopover = UserSearchPopover; exports.UserIndexDetails = UserIndexDetails; exports.UserStanadaloneDetails = UserStanadaloneDetails; exports.UserContainer = UserContainer; exports.UserIndexContainer = UserIndexContainer; exports.UsersListContainer = UsersListContainer; exports.AdminUsersList = AdminUsersList; exports.CompanyUsersList = CompanyUsersList; exports.ContributorsList = ContributorsList; exports.RelevantUsersList = RelevantUsersList; exports.RoleUsersList = RoleUsersList; exports.UserListInAdd = UserListInAdd; exports.UsersList = UsersList; exports.UsersListByContentIds = UsersListByContentIds; exports.AllowedUsersDetails = AllowedUsersDetails; exports.ErrorDetails = ErrorDetails; exports.buildBlockNoteEditorOptions = buildBlockNoteEditorOptions; exports.resolveEditable = resolveEditable; exports.isDocumentEmpty = isDocumentEmpty; exports.removeTrailingEmptyBlocks = removeTrailingEmptyBlocks; exports.BlockNoteEditorMentionHoverCard = BlockNoteEditorMentionHoverCard; exports.mentionDataAttrs = mentionDataAttrs; exports.parseMentionElement = parseMentionElement; exports.createMentionInlineContentSpec = createMentionInlineContentSpec; exports.useMentionInsert = useMentionInsert; exports.BlockNoteEditorMentionSuggestionMenu = BlockNoteEditorMentionSuggestionMenu; exports.BlockNoteEditorContainer = BlockNoteEditorContainer; exports.BlockNoteViewerContainer = BlockNoteViewerContainer; exports.BlockNoteStaticViewer = BlockNoteStaticViewer; exports.FormFeatures = FormFeatures; exports.CommonAssociationTrigger = CommonAssociationTrigger; exports.CommonAssociationCommandDialog = CommonAssociationCommandDialog; exports.triggerAssociationToast = triggerAssociationToast; exports.ActionBarProvider = ActionBarProvider; exports.useIsInActionBar = useIsInActionBar; exports.CommonDeleter = CommonDeleter; exports.CommonEditorButtons = CommonEditorButtons; exports.CommonEditorDiscardDialog = CommonEditorDiscardDialog; exports.CommonEditorHeader = CommonEditorHeader; exports.CommonEditorTrigger = CommonEditorTrigger; exports.CommonAddTrigger = CommonAddTrigger; exports.CurrencyInput = CurrencyInput; exports.DatePickerPopover = DatePickerPopover; exports.nextDateRange = nextDateRange; exports.DateRangeSelector = DateRangeSelector; exports.hasOpenInnerLayer = hasOpenInnerLayer; exports.useEditorDialog = useEditorDialog; exports.EditorSheet = EditorSheet; exports.FormFieldWrapper = FormFieldWrapper; exports.EntityMultiSelector = EntityMultiSelector; exports.EntitySelector = EntitySelector; exports.useFileUpload = useFileUpload; exports.FileUploader = FileUploader; exports.FileUploaderContent = FileUploaderContent; exports.FileUploaderItem = FileUploaderItem; exports.FileInput = FileInput; exports.FormBlockNote = FormBlockNote; exports.FormCheckbox = FormCheckbox; exports.FormDate = FormDate; exports.FormDateTime = FormDateTime; exports.FormInput = FormInput; exports.FormBody = FormBody; exports.FormSection = FormSection; exports.FormRow = FormRow; exports.FormCol = FormCol; exports.PasswordInput = PasswordInput; exports.FormPassword = FormPassword; exports.FormPlaceAutocomplete = FormPlaceAutocomplete; exports.FormSelect = FormSelect; exports.FormSlider = FormSlider; exports.FormSwitch = FormSwitch; exports.FormTextarea = FormTextarea; exports.GdprConsentCheckbox = GdprConsentCheckbox; exports.MultiFileUploader = MultiFileUploader; exports.PageContainerContentDetails = PageContainerContentDetails; exports.PageContentContainer = PageContentContainer; exports.cellComponent = cellComponent; exports.cellDate = cellDate; exports.cellDateTime = cellDateTime; exports.cellId = cellId; exports.cellLink = cellLink; exports.cellUrl = cellUrl; exports.ContentTableSearch = ContentTableSearch; exports.ContentListTable = ContentListTable; exports.ContentListGrid = ContentListGrid; exports.ItalianFiscalData_default = ItalianFiscalData_default; exports.ItalianFiscalDataDisplay = ItalianFiscalDataDisplay; exports.parseFiscalData = parseFiscalData; exports.FiscalDataDisplay = FiscalDataDisplay; exports.EntityHeroLayout = EntityHeroLayout; exports.EntityHero = EntityHero; exports.EntityHeroAvatar = EntityHeroAvatar; exports.EntityHeroMetaRow = EntityHeroMetaRow; exports.EntitySection = EntitySection; exports.AccountDeletionCancelledNotice = AccountDeletionCancelledNotice; exports.AccountDeletionKeepContainer = AccountDeletionKeepContainer; exports.GdprConsentSection = GdprConsentSection; exports.AuthContainer = AuthContainer; exports.BackupCodesDialog = BackupCodesDialog; exports.TotpInput = TotpInput; exports.DisableTwoFactorDialog = DisableTwoFactorDialog; exports.PasskeyList = PasskeyList; exports.PasskeySetupDialog = PasskeySetupDialog; exports.TotpAuthenticatorList = TotpAuthenticatorList; exports.TotpSetupDialog = TotpSetupDialog; exports.TwoFactorSettings = TwoFactorSettings; exports.SecurityContainer = SecurityContainer; exports.LandingComponent = LandingComponent; exports.AcceptInvitation = AcceptInvitation; exports.ActivateAccount = ActivateAccount; exports.Cookies = Cookies; exports.ForgotPassword = ForgotPassword; exports.Login = Login; exports.Logout = Logout; exports.RefreshUser = RefreshUser; exports.ResetPassword = ResetPassword; exports.PasskeyButton = PasskeyButton; exports.TwoFactorChallenge = TwoFactorChallenge; exports.ADMIN_PLATFORM_SECTIONS = ADMIN_PLATFORM_SECTIONS; exports.AdminIndexGrid = AdminIndexGrid; exports.AdminIndexContainer = AdminIndexContainer; exports.ADMINISTRATION_I18N_KEYS = ADMINISTRATION_I18N_KEYS; exports.AI_CONNECTIONS_I18N_KEYS = AI_CONNECTIONS_I18N_KEYS; exports.AiConnectionsProvider = AiConnectionsProvider; exports.useAiConnections = useAiConnections; exports.AiConnectionDeleter = AiConnectionDeleter; exports.AiConnectionEditor = AiConnectionEditor; exports.AiConnectionTypeCard = AiConnectionTypeCard; exports.AI_CONNECTION_TYPE_ORDER = AI_CONNECTION_TYPE_ORDER; exports.AiConnectionsContainer = AiConnectionsContainer; exports.CreditWarningBanner = CreditWarningBanner; exports.CompanyContent = CompanyContent; exports.TokenStatusIndicator = TokenStatusIndicator; exports.CompanyDetails = CompanyDetails; exports.AdminCompanyContainer = AdminCompanyContainer; exports.CompanyEditor = CompanyEditor; exports.CompaniesList = CompaniesList; exports.CompaniesListContainer = CompaniesListContainer; exports.CompanyContainer = CompanyContainer; exports.CompanyConfigurationEditor = CompanyConfigurationEditor; exports.CompanyDeleter = CompanyDeleter; exports.ContentsList = ContentsList; exports.ContentsListById = ContentsListById; exports.RelevantContentsList = RelevantContentsList; exports.EmailBlastEditor = EmailBlastEditor; exports.EmailBlastsList = EmailBlastsList; exports.EmailBlastsListContainer = EmailBlastsListContainer; exports.EmailBlastSendDialog = EmailBlastSendDialog; exports.EmailBlastContainer = EmailBlastContainer; exports.HowToCommandViewer = HowToCommandViewer; exports.HowToCommand = HowToCommand; exports.HowToDeleter = HowToDeleter; exports.HowToMultiSelector = HowToMultiSelector; exports.HowToEditor = HowToEditor; exports.HowToProvider = HowToProvider; exports.useHowToContext = useHowToContext; exports.HowToContent = HowToContent; exports.HowToDetails = HowToDetails; exports.HowToContainer = HowToContainer; exports.HowToReindexButton = HowToReindexButton; exports.HowToList = HowToList; exports.HowToListContainer = HowToListContainer; exports.HowToSelector = HowToSelector; exports.AssistantComposer = AssistantComposer; exports.MessageSourcesPanel = MessageSourcesPanel; exports.MessageItem = MessageItem; exports.MessageList = MessageList; exports.AssistantThread = AssistantThread; exports.HandbookAskSheet = HandbookAskSheet; exports.HandbookSyncButton = HandbookSyncButton; exports.HandbookIndexStatus = HandbookIndexStatus; exports.HandbookSectionGroup = HandbookSectionGroup; exports.HandbookContents = HandbookContents; exports.HandbookAdminContainer = HandbookAdminContainer; exports.HandbookPageDetails = HandbookPageDetails; exports.HandbookPageNeighbours = HandbookPageNeighbours; exports.HandbookPageToc = HandbookPageToc; exports.HandbookPageNavigator = HandbookPageNavigator; exports.HandbookPageContainer = HandbookPageContainer; exports.HandbookAskContainer = HandbookAskContainer; exports.EntityMentionLink = EntityMentionLink; exports.AssistantProvider = AssistantProvider; exports.useAssistantContext = useAssistantContext; exports.AssistantEmptyState = AssistantEmptyState; exports.AssistantContainer = AssistantContainer; exports.AssistantBlockNoteComposer = AssistantBlockNoteComposer; exports.AssistantPageContainer = AssistantPageContainer; exports.ApprovalActionCard = ApprovalActionCard; exports.AssistantContainerWithApprovals = AssistantContainerWithApprovals; exports.NotificationErrorBoundary = NotificationErrorBoundary; exports.NotificationIcon = NotificationIcon; exports.generateNotificationData = generateNotificationData; exports.NotificationToast = NotificationToast; exports.NotificationMenuItem = NotificationMenuItem; exports.NotificationContextProvider = NotificationContextProvider; exports.useNotificationContext = useNotificationContext; exports.NotificationViewSwitcher = NotificationViewSwitcher; exports.NotificationsList = NotificationsList; exports.NotificationsListContainer = NotificationsListContainer; exports.NotificationModal = NotificationModal; exports.usePushNotifications = usePushNotifications; exports.PushNotificationProvider = PushNotificationProvider; exports.OnboardingCard = OnboardingCard; exports.ReferralCodeCapture = ReferralCodeCapture; exports.ReferralWidget = ReferralWidget; exports.ReferralDialog = ReferralDialog; exports.createUsageFormatters = createUsageFormatters; exports.useUsageFormatters = useUsageFormatters; exports.CATEGORICAL_CEILING = CATEGORICAL_CEILING; exports.OTHER_COLOR = OTHER_COLOR; exports.SEQUENTIAL_RAMP = SEQUENTIAL_RAMP; exports.seriesColor = seriesColor; exports.seriesTheme = seriesTheme; exports.ReferralsAdminFunnel = ReferralsAdminFunnel; exports.metricValue = metricValue; exports.cacheHitPercentage = cacheHitPercentage; exports.percentageDelta = percentageDelta; exports.ReferralsAdminTiles = ReferralsAdminTiles; exports.ReferralsAdminContainer = ReferralsAdminContainer; exports.SignupSourceCapture = SignupSourceCapture; exports.RoleProvider = RoleProvider; exports.useRoleContext = useRoleContext; exports.RoleDetails = RoleDetails; exports.RoleContainer = RoleContainer; exports.FormRoles = FormRoles; exports.RemoveUserFromRole = RemoveUserFromRole; exports.UserRoleAdd = UserRoleAdd; exports.useRoleTableStructure = useRoleTableStructure; exports.RolesList = RolesList; exports.UserRolesList = UserRolesList; exports.OAuthRedirectUriInput = OAuthRedirectUriInput; exports.useOAuthScopeText = useOAuthScopeText; exports.OAuthScopeSelector = OAuthScopeSelector; exports.OAuthClientSecretDisplay = OAuthClientSecretDisplay; exports.OAuthClientCard = OAuthClientCard; exports.OAuthClientList = OAuthClientList; exports.OAuthClientForm = OAuthClientForm; exports.OAuthClientDetail = OAuthClientDetail; exports.OAuthConsentHeader = OAuthConsentHeader; exports.OAuthScopeList = OAuthScopeList; exports.OAuthConsentActions = OAuthConsentActions; exports.OAuthCompanySelector = OAuthCompanySelector; exports.useOAuthConsent = useOAuthConsent; exports.OAuthConsentScreen = OAuthConsentScreen; exports.WaitlistQuestionnaireRenderer = WaitlistQuestionnaireRenderer; exports.WaitlistForm = WaitlistForm; exports.WaitlistHeroSection = WaitlistHeroSection; exports.WaitlistSuccessState = WaitlistSuccessState; exports.WaitlistConfirmation = WaitlistConfirmation; exports.WaitlistList = WaitlistList; exports.RbacProvider = RbacProvider; exports.useRbacContext = useRbacContext; exports.RbacPermissionCell = RbacPermissionCell; exports.RbacPermissionPicker = RbacPermissionPicker; exports.RbacContainer = RbacContainer; exports.RbacByRoleContainer = RbacByRoleContainer; exports.AddUserToRole = AddUserToRole; exports.UserAvatarEditor = UserAvatarEditor; exports.UserDeleter = UserDeleter; exports.UserEditor = UserEditor; exports.UserMultiSelect = UserMultiSelect; exports.UserReactivator = UserReactivator; exports.UserResentInvitationEmail = UserResentInvitationEmail; exports.UserSelector = UserSelector; exports.UserProvider = UserProvider; exports.useUserContext = useUserContext; exports.CompanyProvider = CompanyProvider; exports.useCompanyContext = useCompanyContext; exports.DEFAULT_ONBOARDING_LABELS = DEFAULT_ONBOARDING_LABELS; exports.mapOnboardingSide = mapOnboardingSide; exports.OnboardingProvider = OnboardingProvider; exports.useOnboarding = useOnboarding; exports.CommonProvider = CommonProvider; exports.useCommonContext = useCommonContext; exports.SessionProvider = SessionProvider; exports.useSession = useSession; exports.ViewportProvider = ViewportProvider; exports.useNotificationSync = useNotificationSync; exports.usePageTracker = usePageTracker; exports.useSocket = useSocket; exports.useSubscriptionStatus = useSubscriptionStatus; exports.formatDate = formatDate2; exports.useBillingFormatOptions = useBillingFormatOptions; exports.promotionCodeDiscount = promotionCodeDiscount; exports.subscriptionDiscount = subscriptionDiscount; exports.applyDiscount = applyDiscount; exports.CouponRefresher = CouponRefresher; exports.couponPageModule = couponPageModule; exports.parseOptionalPositiveInt = parseOptionalPositiveInt; exports.parseOptionalDecimal = parseOptionalDecimal; exports.optionalPositiveInt = optionalPositiveInt; exports.optionalDecimal = optionalDecimal; exports.optionalDate = optionalDate; exports.couponCodeSchema = couponCodeSchema; exports.couponCodeDefaults = couponCodeDefaults; exports.toCouponCodeInput = toCouponCodeInput; exports.couponCurrencyOptions = couponCurrencyOptions; exports.CouponCodeFields = CouponCodeFields; exports.CouponEditor = CouponEditor; exports.CouponProvider = CouponProvider; exports.useCouponContext = useCouponContext; exports.CouponCodeActions = CouponCodeActions; exports.useContentTableStructure = useContentTableStructure; exports.useOAuthClients = useOAuthClients; exports.useOAuthClient = useOAuthClient;
|
|
31093
|
-
//# sourceMappingURL=chunk-
|
|
31113
|
+
//# sourceMappingURL=chunk-GPVLFNLB.js.map
|