@carlonicora/nextjs-jsonapi 1.131.0 → 1.131.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-MCHL63TJ.js → BlockNoteEditor-5RUXGWLR.js} +9 -9
- package/dist/{BlockNoteEditor-MCHL63TJ.js.map → BlockNoteEditor-5RUXGWLR.js.map} +1 -1
- package/dist/{BlockNoteEditor-Q2GLKMFU.mjs → BlockNoteEditor-F4AKH532.mjs} +2 -2
- package/dist/billing/index.js +310 -310
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-4TM6GOT3.mjs → chunk-BBBQGJEG.mjs} +134 -102
- package/dist/chunk-BBBQGJEG.mjs.map +1 -0
- package/dist/{chunk-PE6DSRTQ.js → chunk-T7F2EVPR.js} +266 -234
- package/dist/chunk-T7F2EVPR.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/features/help/index.js +31 -31
- package/dist/features/help/index.mjs +1 -1
- package/package.json +1 -1
- package/src/components/forms/__tests__/useEditorDialog.test.ts +66 -0
- package/src/components/forms/useEditorDialog.ts +25 -0
- package/src/features/notification/contexts/__tests__/NotificationContext.spec.tsx +34 -8
- package/src/features/user/contexts/CurrentUserContext.tsx +43 -9
- package/src/features/user/contexts/__tests__/CurrentUserContext.spec.tsx +149 -6
- package/src/shadcnui/ui/sheet.tsx +7 -1
- package/dist/chunk-4TM6GOT3.mjs.map +0 -1
- package/dist/chunk-PE6DSRTQ.js.map +0 -1
- /package/dist/{BlockNoteEditor-Q2GLKMFU.mjs.map → BlockNoteEditor-F4AKH532.mjs.map} +0 -0
|
@@ -3481,7 +3481,7 @@ function SheetContent({
|
|
|
3481
3481
|
...props
|
|
3482
3482
|
}) {
|
|
3483
3483
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SheetPortal, { children: [
|
|
3484
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetOverlay, {}),
|
|
3484
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetOverlay, { forceRender: true }),
|
|
3485
3485
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
3486
3486
|
_dialog.Dialog.Popup,
|
|
3487
3487
|
{
|
|
@@ -7557,11 +7557,23 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
7557
7557
|
const descriptor = Object.getOwnPropertyDescriptor(_chunkLBMNRFCYjs.Modules, matchedModuleKey);
|
|
7558
7558
|
return _optionalChain([descriptor, 'optionalAccess', _181 => _181.get, 'optionalAccess', _182 => _182.call, 'call', _183 => _183(_chunkLBMNRFCYjs.Modules)]);
|
|
7559
7559
|
}, "matchUrlToModule");
|
|
7560
|
-
const currentUser =
|
|
7561
|
-
|
|
7560
|
+
const currentUser = _react.useMemo.call(void 0,
|
|
7561
|
+
() => dehydratedUser ? _chunkLBMNRFCYjs.rehydrate.call(void 0, _chunkLBMNRFCYjs.Modules.User, dehydratedUser) : null,
|
|
7562
|
+
[dehydratedUser]
|
|
7563
|
+
);
|
|
7564
|
+
const [tokenOverride, setTokenOverride] = _react.useState.call(void 0, null);
|
|
7565
|
+
const company = _react.useMemo.call(void 0, () => {
|
|
7566
|
+
const c = _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _184 => _184.company]), () => ( null));
|
|
7567
|
+
if (!c || !tokenOverride) return c;
|
|
7568
|
+
return Object.assign(Object.create(Object.getPrototypeOf(c)), c, {
|
|
7569
|
+
_availableMonthlyTokens: tokenOverride.availableMonthlyTokens,
|
|
7570
|
+
_availableExtraTokens: tokenOverride.availableExtraTokens
|
|
7571
|
+
});
|
|
7572
|
+
}, [currentUser, tokenOverride]);
|
|
7562
7573
|
const setUser = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (user) => {
|
|
7563
7574
|
if (user) setDehydratedUser(user.dehydrate());
|
|
7564
7575
|
else setDehydratedUser(null);
|
|
7576
|
+
setTokenOverride(null);
|
|
7565
7577
|
}, "setUser");
|
|
7566
7578
|
const hasRole = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (roleId) => {
|
|
7567
7579
|
if (!currentUser) return false;
|
|
@@ -7618,6 +7630,7 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
7618
7630
|
})]);
|
|
7619
7631
|
}
|
|
7620
7632
|
setDehydratedUser(fullUser.dehydrate());
|
|
7633
|
+
setTokenOverride(null);
|
|
7621
7634
|
}
|
|
7622
7635
|
} catch (error) {
|
|
7623
7636
|
console.error("Failed to refresh user data:", error);
|
|
@@ -7635,21 +7648,28 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
7635
7648
|
if (!socket || !isConnected || !_optionalChain([currentUser, 'optionalAccess', _197 => _197.company, 'optionalAccess', _198 => _198.id])) {
|
|
7636
7649
|
return;
|
|
7637
7650
|
}
|
|
7638
|
-
const
|
|
7639
|
-
if (data.companyId
|
|
7651
|
+
const handleTokensUpdated = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
|
|
7652
|
+
if (data.companyId !== _optionalChain([currentUser, 'access', _199 => _199.company, 'optionalAccess', _200 => _200.id])) return;
|
|
7653
|
+
setTokenOverride({
|
|
7654
|
+
availableMonthlyTokens: data.availableMonthlyTokens,
|
|
7655
|
+
availableExtraTokens: data.availableExtraTokens
|
|
7656
|
+
});
|
|
7657
|
+
}, "handleTokensUpdated");
|
|
7658
|
+
const handleSubscriptionUpdated = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
|
|
7659
|
+
if (data.companyId === _optionalChain([currentUser, 'access', _201 => _201.company, 'optionalAccess', _202 => _202.id]) && !isRefreshingRef.current) {
|
|
7640
7660
|
isRefreshingRef.current = true;
|
|
7641
7661
|
refreshUserRef.current({ skipCookieUpdate: true }).finally(() => {
|
|
7642
7662
|
isRefreshingRef.current = false;
|
|
7643
7663
|
});
|
|
7644
7664
|
}
|
|
7645
|
-
}, "
|
|
7646
|
-
socket.on("company:tokens_updated",
|
|
7647
|
-
socket.on("company:subscription_updated",
|
|
7665
|
+
}, "handleSubscriptionUpdated");
|
|
7666
|
+
socket.on("company:tokens_updated", handleTokensUpdated);
|
|
7667
|
+
socket.on("company:subscription_updated", handleSubscriptionUpdated);
|
|
7648
7668
|
return () => {
|
|
7649
|
-
socket.off("company:tokens_updated",
|
|
7650
|
-
socket.off("company:subscription_updated",
|
|
7669
|
+
socket.off("company:tokens_updated", handleTokensUpdated);
|
|
7670
|
+
socket.off("company:subscription_updated", handleSubscriptionUpdated);
|
|
7651
7671
|
};
|
|
7652
|
-
}, [socket, isConnected, _optionalChain([currentUser, 'optionalAccess',
|
|
7672
|
+
}, [socket, isConnected, _optionalChain([currentUser, 'optionalAccess', _203 => _203.company, 'optionalAccess', _204 => _204.id])]);
|
|
7653
7673
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7654
7674
|
CurrentUserContext.Provider,
|
|
7655
7675
|
{
|
|
@@ -7720,7 +7740,7 @@ function AddUserToRoleInternal({ role, refresh }) {
|
|
|
7720
7740
|
const data = useDataListRetriever({
|
|
7721
7741
|
ready: !!company && show,
|
|
7722
7742
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkLBMNRFCYjs.UserService.findAllUsers(params), "retriever"),
|
|
7723
|
-
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess',
|
|
7743
|
+
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _205 => _205.id]) },
|
|
7724
7744
|
module: _chunkLBMNRFCYjs.Modules.User
|
|
7725
7745
|
});
|
|
7726
7746
|
_react.useEffect.call(void 0, () => {
|
|
@@ -7788,10 +7808,10 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
|
|
|
7788
7808
|
onValueChange: setFiles,
|
|
7789
7809
|
dropzoneOptions: dropzone2,
|
|
7790
7810
|
className: "h-40 w-40 rounded-full p-0",
|
|
7791
|
-
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',
|
|
7811
|
+
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', _206 => _206.avatar])) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7792
7812
|
_image2.default,
|
|
7793
7813
|
{
|
|
7794
|
-
src: file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess',
|
|
7814
|
+
src: file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess', _207 => _207.avatar]) || "",
|
|
7795
7815
|
alt: t(`common.avatar`),
|
|
7796
7816
|
width: 200,
|
|
7797
7817
|
height: 200
|
|
@@ -7799,7 +7819,7 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
|
|
|
7799
7819
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, { className: "my-4 h-8 w-8" }) })
|
|
7800
7820
|
}
|
|
7801
7821
|
),
|
|
7802
|
-
!resetImage && (file || _optionalChain([user, 'optionalAccess',
|
|
7822
|
+
!resetImage && (file || _optionalChain([user, 'optionalAccess', _208 => _208.avatar])) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7803
7823
|
Button,
|
|
7804
7824
|
{
|
|
7805
7825
|
className: "",
|
|
@@ -7827,7 +7847,7 @@ function UserDeleterInternal({ user, onDeleted, companyId }) {
|
|
|
7827
7847
|
const router = _chunkXTLTQQ7Xjs.useI18nRouter.call(void 0, );
|
|
7828
7848
|
const _t = _nextintl.useTranslations.call(void 0, );
|
|
7829
7849
|
let cId;
|
|
7830
|
-
if (_optionalChain([currentUser, 'optionalAccess',
|
|
7850
|
+
if (_optionalChain([currentUser, 'optionalAccess', _209 => _209.roles, 'access', _210 => _210.find, 'call', _211 => _211((role) => role.id === _chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator)]) && companyId) {
|
|
7831
7851
|
cId = companyId;
|
|
7832
7852
|
} else {
|
|
7833
7853
|
if (!company) return;
|
|
@@ -7890,18 +7910,18 @@ function UserEditorInternal({
|
|
|
7890
7910
|
}, [company]);
|
|
7891
7911
|
const handleDialogOpenChange = _react.useCallback.call(void 0,
|
|
7892
7912
|
(open) => {
|
|
7893
|
-
if (open && (company || _optionalChain([currentUser, 'optionalAccess',
|
|
7913
|
+
if (open && (company || _optionalChain([currentUser, 'optionalAccess', _212 => _212.roles, 'access', _213 => _213.find, 'call', _214 => _214((role) => role.id === _chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator)])) && roles.length === 0) {
|
|
7894
7914
|
async function fetchRoles() {
|
|
7895
7915
|
const allRoles = await _chunkLBMNRFCYjs.RoleService.findAllRoles({});
|
|
7896
7916
|
const availableRoles = allRoles.filter(
|
|
7897
|
-
(role) => role.id !== _chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator && (role.requiredFeature === void 0 || _optionalChain([company, 'optionalAccess',
|
|
7917
|
+
(role) => role.id !== _chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator && (role.requiredFeature === void 0 || _optionalChain([company, 'optionalAccess', _215 => _215.features, 'access', _216 => _216.some, 'call', _217 => _217((feature) => feature.id === _optionalChain([role, 'access', _218 => _218.requiredFeature, 'optionalAccess', _219 => _219.id]))]))
|
|
7898
7918
|
);
|
|
7899
7919
|
setRoles(availableRoles);
|
|
7900
7920
|
}
|
|
7901
7921
|
_chunk7QVYU63Ejs.__name.call(void 0, fetchRoles, "fetchRoles");
|
|
7902
7922
|
fetchRoles();
|
|
7903
7923
|
}
|
|
7904
|
-
_optionalChain([onDialogOpenChange, 'optionalCall',
|
|
7924
|
+
_optionalChain([onDialogOpenChange, 'optionalCall', _220 => _220(open)]);
|
|
7905
7925
|
},
|
|
7906
7926
|
[company, currentUser, roles.length, onDialogOpenChange]
|
|
7907
7927
|
);
|
|
@@ -7935,29 +7955,29 @@ function UserEditorInternal({
|
|
|
7935
7955
|
);
|
|
7936
7956
|
const getDefaultValues = _react.useCallback.call(void 0, () => {
|
|
7937
7957
|
return {
|
|
7938
|
-
id: _optionalChain([user, 'optionalAccess',
|
|
7939
|
-
name: _optionalChain([user, 'optionalAccess',
|
|
7940
|
-
title: _optionalChain([user, 'optionalAccess',
|
|
7941
|
-
bio: _optionalChain([user, 'optionalAccess',
|
|
7942
|
-
email: _optionalChain([user, 'optionalAccess',
|
|
7943
|
-
phone: _optionalChain([user, 'optionalAccess',
|
|
7958
|
+
id: _optionalChain([user, 'optionalAccess', _221 => _221.id]) || _uuid.v4.call(void 0, ),
|
|
7959
|
+
name: _optionalChain([user, 'optionalAccess', _222 => _222.name]) || "",
|
|
7960
|
+
title: _optionalChain([user, 'optionalAccess', _223 => _223.title]) || "",
|
|
7961
|
+
bio: _optionalChain([user, 'optionalAccess', _224 => _224.bio]) || "",
|
|
7962
|
+
email: _optionalChain([user, 'optionalAccess', _225 => _225.email]) || "",
|
|
7963
|
+
phone: _optionalChain([user, 'optionalAccess', _226 => _226.phone]) || "",
|
|
7944
7964
|
password: "",
|
|
7945
|
-
roleIds: _optionalChain([user, 'optionalAccess',
|
|
7965
|
+
roleIds: _optionalChain([user, 'optionalAccess', _227 => _227.roles, 'access', _228 => _228.map, 'call', _229 => _229((role) => role.id)]) || [],
|
|
7946
7966
|
sendInvitationEmail: false,
|
|
7947
|
-
avatar: _optionalChain([user, 'optionalAccess',
|
|
7967
|
+
avatar: _optionalChain([user, 'optionalAccess', _230 => _230.avatarUrl]) || ""
|
|
7948
7968
|
};
|
|
7949
7969
|
}, [user]);
|
|
7950
7970
|
const form = _reacthookform.useForm.call(void 0, {
|
|
7951
7971
|
resolver: _zod.zodResolver.call(void 0, formSchema),
|
|
7952
7972
|
defaultValues: getDefaultValues()
|
|
7953
7973
|
});
|
|
7954
|
-
const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess',
|
|
7974
|
+
const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess', _231 => _231.id]) === _optionalChain([user, 'optionalAccess', _232 => _232.id]) && hasRole(_chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator)) && (hasPermissionToModule({ module: _chunkLBMNRFCYjs.Modules.User, action: "update" /* Update */ }) || hasRole(_chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator));
|
|
7955
7975
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7956
7976
|
EditorSheet,
|
|
7957
7977
|
{
|
|
7958
7978
|
form,
|
|
7959
7979
|
entityType: t(`entities.users`, { count: 1 }),
|
|
7960
|
-
entityName: _optionalChain([user, 'optionalAccess',
|
|
7980
|
+
entityName: _optionalChain([user, 'optionalAccess', _233 => _233.name]),
|
|
7961
7981
|
isEdit: !!user,
|
|
7962
7982
|
module: _chunkLBMNRFCYjs.Modules.User,
|
|
7963
7983
|
propagateChanges,
|
|
@@ -8009,7 +8029,7 @@ function UserEditorInternal({
|
|
|
8009
8029
|
adminCreated
|
|
8010
8030
|
};
|
|
8011
8031
|
const updatedUser = user ? await _chunkLBMNRFCYjs.UserService.update(payload) : await _chunkLBMNRFCYjs.UserService.create(payload);
|
|
8012
|
-
if (_optionalChain([currentUser, 'optionalAccess',
|
|
8032
|
+
if (_optionalChain([currentUser, 'optionalAccess', _234 => _234.id]) === updatedUser.id) setUser(updatedUser);
|
|
8013
8033
|
return updatedUser;
|
|
8014
8034
|
},
|
|
8015
8035
|
onRevalidate,
|
|
@@ -8263,7 +8283,7 @@ function EntityMultiSelector({
|
|
|
8263
8283
|
if (open) {
|
|
8264
8284
|
setSearchTerm("");
|
|
8265
8285
|
requestAnimationFrame(() => {
|
|
8266
|
-
_optionalChain([searchInputRef, 'access',
|
|
8286
|
+
_optionalChain([searchInputRef, 'access', _235 => _235.current, 'optionalAccess', _236 => _236.focus, 'call', _237 => _237()]);
|
|
8267
8287
|
});
|
|
8268
8288
|
}
|
|
8269
8289
|
}, [open]);
|
|
@@ -8280,7 +8300,7 @@ function EntityMultiSelector({
|
|
|
8280
8300
|
form.setValue(id, next, { shouldDirty: true, shouldTouch: true });
|
|
8281
8301
|
const cb = onChangeRef.current;
|
|
8282
8302
|
if (cb) {
|
|
8283
|
-
const fullData = next.map((v) => _optionalChain([options, 'access',
|
|
8303
|
+
const fullData = next.map((v) => _optionalChain([options, 'access', _238 => _238.find, 'call', _239 => _239((opt) => opt.id === v.id), 'optionalAccess', _240 => _240.entityData])).filter(Boolean);
|
|
8284
8304
|
cb(fullData);
|
|
8285
8305
|
}
|
|
8286
8306
|
},
|
|
@@ -8293,7 +8313,7 @@ function EntityMultiSelector({
|
|
|
8293
8313
|
form.setValue(id, next, { shouldDirty: true, shouldTouch: true });
|
|
8294
8314
|
const cb = onChangeRef.current;
|
|
8295
8315
|
if (cb) {
|
|
8296
|
-
const fullData = next.map((v) => _optionalChain([options, 'access',
|
|
8316
|
+
const fullData = next.map((v) => _optionalChain([options, 'access', _241 => _241.find, 'call', _242 => _242((opt) => opt.id === v.id), 'optionalAccess', _243 => _243.entityData])).filter(Boolean);
|
|
8297
8317
|
cb(fullData);
|
|
8298
8318
|
}
|
|
8299
8319
|
},
|
|
@@ -8437,11 +8457,11 @@ function UserMultiSelect({
|
|
|
8437
8457
|
emptyText: t("ui.search.no_results", { type: t("entities.users", { count: 2 }) }),
|
|
8438
8458
|
isRequired,
|
|
8439
8459
|
retriever: (params) => _chunkLBMNRFCYjs.UserService.findAllUsers(params),
|
|
8440
|
-
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess',
|
|
8460
|
+
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _244 => _244.id]) },
|
|
8441
8461
|
module: _chunkLBMNRFCYjs.Modules.User,
|
|
8442
8462
|
getLabel: (user) => user.name,
|
|
8443
8463
|
toFormValue: (user) => ({ id: user.id, name: user.name, avatar: user.avatar }),
|
|
8444
|
-
excludeId: _optionalChain([currentUser, 'optionalAccess',
|
|
8464
|
+
excludeId: _optionalChain([currentUser, 'optionalAccess', _245 => _245.id]),
|
|
8445
8465
|
onChange,
|
|
8446
8466
|
renderOption: (user) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
|
|
8447
8467
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatarIcon, { url: user.avatar, name: user.name }),
|
|
@@ -9239,7 +9259,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9239
9259
|
}, []);
|
|
9240
9260
|
const [prevRange, setPrevRange] = _react.useState.call(void 0, date);
|
|
9241
9261
|
_react.useEffect.call(void 0, () => {
|
|
9242
|
-
if (_optionalChain([date, 'optionalAccess',
|
|
9262
|
+
if (_optionalChain([date, 'optionalAccess', _246 => _246.from]) && _optionalChain([date, 'optionalAccess', _247 => _247.to]) && date.to > date.from && (_optionalChain([prevRange, 'optionalAccess', _248 => _248.from, 'optionalAccess', _249 => _249.getTime, 'call', _250 => _250()]) !== date.from.getTime() || _optionalChain([prevRange, 'optionalAccess', _251 => _251.to, 'optionalAccess', _252 => _252.getTime, 'call', _253 => _253()]) !== date.to.getTime())) {
|
|
9243
9263
|
onDateChange(date);
|
|
9244
9264
|
setPrevRange(date);
|
|
9245
9265
|
setOpen(false);
|
|
@@ -9250,7 +9270,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9250
9270
|
setDate(void 0);
|
|
9251
9271
|
return;
|
|
9252
9272
|
}
|
|
9253
|
-
if (range.from && (!_optionalChain([date, 'optionalAccess',
|
|
9273
|
+
if (range.from && (!_optionalChain([date, 'optionalAccess', _254 => _254.from]) || range.from.getTime() !== date.from.getTime())) {
|
|
9254
9274
|
setDate({ from: range.from, to: void 0 });
|
|
9255
9275
|
} else {
|
|
9256
9276
|
setDate(range);
|
|
@@ -9265,7 +9285,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9265
9285
|
className: _chunkLBMNRFCYjs.cn.call(void 0, "w-[300px] justify-start text-left font-normal", !date && "text-muted-foreground"),
|
|
9266
9286
|
children: [
|
|
9267
9287
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
|
|
9268
|
-
_optionalChain([date, 'optionalAccess',
|
|
9288
|
+
_optionalChain([date, 'optionalAccess', _255 => _255.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
9269
9289
|
_datefns.format.call(void 0, date.from, "LLL dd, y"),
|
|
9270
9290
|
" - ",
|
|
9271
9291
|
_datefns.format.call(void 0, date.to, "LLL dd, y")
|
|
@@ -9288,7 +9308,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9288
9308
|
),
|
|
9289
9309
|
children: [
|
|
9290
9310
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
|
|
9291
|
-
_optionalChain([date, 'optionalAccess',
|
|
9311
|
+
_optionalChain([date, 'optionalAccess', _256 => _256.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
9292
9312
|
_datefns.format.call(void 0, date.from, "LLL dd, y"),
|
|
9293
9313
|
" - ",
|
|
9294
9314
|
_datefns.format.call(void 0, date.to, "LLL dd, y")
|
|
@@ -9301,7 +9321,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9301
9321
|
Calendar,
|
|
9302
9322
|
{
|
|
9303
9323
|
mode: "range",
|
|
9304
|
-
defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess',
|
|
9324
|
+
defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess', _257 => _257.from]), () => ( (showPreviousMonth ? new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() - 1, 1) : void 0))),
|
|
9305
9325
|
selected: date,
|
|
9306
9326
|
onSelect: handleSelect,
|
|
9307
9327
|
numberOfMonths: 2
|
|
@@ -9335,31 +9355,32 @@ _chunk7QVYU63Ejs.__name.call(void 0, DateRangeSelector, "DateRangeSelector");
|
|
|
9335
9355
|
|
|
9336
9356
|
// src/components/forms/useEditorDialog.ts
|
|
9337
9357
|
|
|
9358
|
+
var openEditorStack = [];
|
|
9338
9359
|
function useEditorDialog(isFormDirty, options) {
|
|
9339
9360
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
9340
9361
|
const [showDiscardConfirm, setShowDiscardConfirm] = _react.useState.call(void 0, false);
|
|
9341
9362
|
const syncingFromProp = _react.useRef.call(void 0, false);
|
|
9342
9363
|
_react.useEffect.call(void 0, () => {
|
|
9343
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
9364
|
+
if (_optionalChain([options, 'optionalAccess', _258 => _258.dialogOpen]) !== void 0 && options.dialogOpen !== open) {
|
|
9344
9365
|
syncingFromProp.current = true;
|
|
9345
9366
|
setOpen(options.dialogOpen);
|
|
9346
9367
|
}
|
|
9347
|
-
}, [_optionalChain([options, 'optionalAccess',
|
|
9348
|
-
const onDialogOpenChangeRef = _react.useRef.call(void 0, _optionalChain([options, 'optionalAccess',
|
|
9349
|
-
onDialogOpenChangeRef.current = _optionalChain([options, 'optionalAccess',
|
|
9368
|
+
}, [_optionalChain([options, 'optionalAccess', _259 => _259.dialogOpen])]);
|
|
9369
|
+
const onDialogOpenChangeRef = _react.useRef.call(void 0, _optionalChain([options, 'optionalAccess', _260 => _260.onDialogOpenChange]));
|
|
9370
|
+
onDialogOpenChangeRef.current = _optionalChain([options, 'optionalAccess', _261 => _261.onDialogOpenChange]);
|
|
9350
9371
|
_react.useEffect.call(void 0, () => {
|
|
9351
9372
|
if (syncingFromProp.current) {
|
|
9352
9373
|
syncingFromProp.current = false;
|
|
9353
9374
|
return;
|
|
9354
9375
|
}
|
|
9355
|
-
_optionalChain([onDialogOpenChangeRef, 'access',
|
|
9376
|
+
_optionalChain([onDialogOpenChangeRef, 'access', _262 => _262.current, 'optionalCall', _263 => _263(open)]);
|
|
9356
9377
|
}, [open]);
|
|
9357
9378
|
_react.useEffect.call(void 0, () => {
|
|
9358
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
9359
|
-
}, [_optionalChain([options, 'optionalAccess',
|
|
9379
|
+
if (_optionalChain([options, 'optionalAccess', _264 => _264.forceShow])) setOpen(true);
|
|
9380
|
+
}, [_optionalChain([options, 'optionalAccess', _265 => _265.forceShow])]);
|
|
9360
9381
|
_react.useEffect.call(void 0, () => {
|
|
9361
9382
|
if (!open) {
|
|
9362
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
9383
|
+
if (_optionalChain([options, 'optionalAccess', _266 => _266.onClose])) options.onClose();
|
|
9363
9384
|
}
|
|
9364
9385
|
}, [open]);
|
|
9365
9386
|
const handleOpenChange = _react.useCallback.call(void 0,
|
|
@@ -9372,9 +9393,20 @@ function useEditorDialog(isFormDirty, options) {
|
|
|
9372
9393
|
},
|
|
9373
9394
|
[isFormDirty]
|
|
9374
9395
|
);
|
|
9396
|
+
const dialogId = _react.useRef.call(void 0, {});
|
|
9397
|
+
_react.useEffect.call(void 0, () => {
|
|
9398
|
+
if (!open) return;
|
|
9399
|
+
const id = dialogId.current;
|
|
9400
|
+
openEditorStack.push(id);
|
|
9401
|
+
return () => {
|
|
9402
|
+
const index = openEditorStack.lastIndexOf(id);
|
|
9403
|
+
if (index !== -1) openEditorStack.splice(index, 1);
|
|
9404
|
+
};
|
|
9405
|
+
}, [open]);
|
|
9375
9406
|
_react.useEffect.call(void 0, () => {
|
|
9376
9407
|
const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (event) => {
|
|
9377
9408
|
if (event.key === "Escape" && open) {
|
|
9409
|
+
if (openEditorStack[openEditorStack.length - 1] !== dialogId.current) return;
|
|
9378
9410
|
event.preventDefault();
|
|
9379
9411
|
event.stopPropagation();
|
|
9380
9412
|
handleOpenChange(false);
|
|
@@ -9452,7 +9484,7 @@ function EditorSheet({
|
|
|
9452
9484
|
hasBeenOpen.current = true;
|
|
9453
9485
|
} else if (hasBeenOpen.current) {
|
|
9454
9486
|
form.reset(onReset());
|
|
9455
|
-
_optionalChain([onClose, 'optionalCall',
|
|
9487
|
+
_optionalChain([onClose, 'optionalCall', _267 => _267()]);
|
|
9456
9488
|
}
|
|
9457
9489
|
}, [open]);
|
|
9458
9490
|
const wrappedOnSubmit = _react.useCallback.call(void 0,
|
|
@@ -9466,11 +9498,11 @@ function EditorSheet({
|
|
|
9466
9498
|
if (onSuccess) {
|
|
9467
9499
|
await onSuccess();
|
|
9468
9500
|
} else if (result) {
|
|
9469
|
-
_optionalChain([onRevalidate, 'optionalCall',
|
|
9501
|
+
_optionalChain([onRevalidate, 'optionalCall', _268 => _268(generateUrl({ page: module, id: result.id, language: "[locale]" }))]);
|
|
9470
9502
|
if (propagateChanges) {
|
|
9471
9503
|
propagateChanges(result);
|
|
9472
9504
|
} else {
|
|
9473
|
-
_optionalChain([onNavigate, 'optionalCall',
|
|
9505
|
+
_optionalChain([onNavigate, 'optionalCall', _269 => _269(generateUrl({ page: module, id: result.id }))]);
|
|
9474
9506
|
}
|
|
9475
9507
|
}
|
|
9476
9508
|
} catch (error) {
|
|
@@ -9662,7 +9694,7 @@ function EntitySelector({
|
|
|
9662
9694
|
{
|
|
9663
9695
|
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 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" : ""}`,
|
|
9664
9696
|
children: [
|
|
9665
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "min-w-0 flex-1 truncate text-left", children: hasValue(effectiveValue) ? getSelectedItemDisplay ? getSelectedItemDisplay(effectiveValue) : _nullishCoalesce(_optionalChain([effectiveValue, 'optionalAccess',
|
|
9697
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "min-w-0 flex-1 truncate text-left", children: hasValue(effectiveValue) ? getSelectedItemDisplay ? getSelectedItemDisplay(effectiveValue) : _nullishCoalesce(_optionalChain([effectiveValue, 'optionalAccess', _270 => _270.name]), () => ( "")) : placeholder }),
|
|
9666
9698
|
hasValue(effectiveValue) && !disabled && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9667
9699
|
_lucidereact.CircleX,
|
|
9668
9700
|
{
|
|
@@ -9797,7 +9829,7 @@ var FileUploader = _react.forwardRef.call(void 0,
|
|
|
9797
9829
|
movePrev();
|
|
9798
9830
|
} else if (e.key === "Enter" || e.key === "Space") {
|
|
9799
9831
|
if (activeIndex === -1) {
|
|
9800
|
-
_optionalChain([dropzoneState, 'access',
|
|
9832
|
+
_optionalChain([dropzoneState, 'access', _271 => _271.inputRef, 'access', _272 => _272.current, 'optionalAccess', _273 => _273.click, 'call', _274 => _274()]);
|
|
9801
9833
|
}
|
|
9802
9834
|
} else if (e.key === "Delete" || e.key === "Backspace") {
|
|
9803
9835
|
if (activeIndex !== -1) {
|
|
@@ -9835,13 +9867,13 @@ var FileUploader = _react.forwardRef.call(void 0,
|
|
|
9835
9867
|
onValueChange(newValues);
|
|
9836
9868
|
if (rejectedFiles.length > 0) {
|
|
9837
9869
|
for (let i = 0; i < rejectedFiles.length; i++) {
|
|
9838
|
-
if (_optionalChain([rejectedFiles, 'access',
|
|
9870
|
+
if (_optionalChain([rejectedFiles, 'access', _275 => _275[i], 'access', _276 => _276.errors, 'access', _277 => _277[0], 'optionalAccess', _278 => _278.code]) === "file-too-large") {
|
|
9839
9871
|
_chunkLBMNRFCYjs.showError.call(void 0, t("common.errors.file"), {
|
|
9840
9872
|
description: t(`common.errors.file_max`, { size: maxSize / 1024 / 1024 })
|
|
9841
9873
|
});
|
|
9842
9874
|
break;
|
|
9843
9875
|
}
|
|
9844
|
-
if (_optionalChain([rejectedFiles, 'access',
|
|
9876
|
+
if (_optionalChain([rejectedFiles, 'access', _279 => _279[i], 'access', _280 => _280.errors, 'access', _281 => _281[0], 'optionalAccess', _282 => _282.message])) {
|
|
9845
9877
|
_chunkLBMNRFCYjs.showError.call(void 0, t(`common.errors.file`), {
|
|
9846
9878
|
description: rejectedFiles[i].errors[0].message
|
|
9847
9879
|
});
|
|
@@ -10038,7 +10070,7 @@ FileInput.displayName = "FileInput";
|
|
|
10038
10070
|
var _dynamic = require('next/dynamic'); var _dynamic2 = _interopRequireDefault(_dynamic);
|
|
10039
10071
|
|
|
10040
10072
|
|
|
10041
|
-
var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-
|
|
10073
|
+
var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-5RUXGWLR.js"))), {
|
|
10042
10074
|
ssr: false
|
|
10043
10075
|
});
|
|
10044
10076
|
var BlockNoteEditorContainer = React.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function EditorContainer(props) {
|
|
@@ -10103,7 +10135,7 @@ function FormBlockNote({
|
|
|
10103
10135
|
onChange: (content, isEmpty) => {
|
|
10104
10136
|
lastEditorContentRef.current = content;
|
|
10105
10137
|
field.onChange(content);
|
|
10106
|
-
_optionalChain([onEmptyChange, 'optionalCall',
|
|
10138
|
+
_optionalChain([onEmptyChange, 'optionalCall', _283 => _283(isEmpty)]);
|
|
10107
10139
|
},
|
|
10108
10140
|
placeholder,
|
|
10109
10141
|
bordered: true,
|
|
@@ -10767,11 +10799,11 @@ function FormPlaceAutocomplete({
|
|
|
10767
10799
|
const data = await response.json();
|
|
10768
10800
|
if (data.suggestions) {
|
|
10769
10801
|
const formattedSuggestions = data.suggestions.map((suggestion) => ({
|
|
10770
|
-
place_id: _optionalChain([suggestion, 'access',
|
|
10771
|
-
description: _optionalChain([suggestion, 'access',
|
|
10802
|
+
place_id: _optionalChain([suggestion, 'access', _284 => _284.placePrediction, 'optionalAccess', _285 => _285.placeId]) || "",
|
|
10803
|
+
description: _optionalChain([suggestion, 'access', _286 => _286.placePrediction, 'optionalAccess', _287 => _287.text, 'optionalAccess', _288 => _288.text]) || "",
|
|
10772
10804
|
structured_formatting: {
|
|
10773
|
-
main_text: _optionalChain([suggestion, 'access',
|
|
10774
|
-
secondary_text: _optionalChain([suggestion, 'access',
|
|
10805
|
+
main_text: _optionalChain([suggestion, 'access', _289 => _289.placePrediction, 'optionalAccess', _290 => _290.structuredFormat, 'optionalAccess', _291 => _291.mainText, 'optionalAccess', _292 => _292.text]) || "",
|
|
10806
|
+
secondary_text: _optionalChain([suggestion, 'access', _293 => _293.placePrediction, 'optionalAccess', _294 => _294.structuredFormat, 'optionalAccess', _295 => _295.secondaryText, 'optionalAccess', _296 => _296.text]) || ""
|
|
10775
10807
|
}
|
|
10776
10808
|
}));
|
|
10777
10809
|
setSuggestions(formattedSuggestions);
|
|
@@ -10918,8 +10950,8 @@ function FormPlaceAutocomplete({
|
|
|
10918
10950
|
className: "hover:bg-muted cursor-pointer px-3 py-2 text-sm",
|
|
10919
10951
|
onClick: () => handleSuggestionSelect(suggestion),
|
|
10920
10952
|
children: [
|
|
10921
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access',
|
|
10922
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access',
|
|
10953
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access', _297 => _297.structured_formatting, 'optionalAccess', _298 => _298.main_text]) }),
|
|
10954
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access', _299 => _299.structured_formatting, 'optionalAccess', _300 => _300.secondary_text]) })
|
|
10923
10955
|
]
|
|
10924
10956
|
},
|
|
10925
10957
|
suggestion.place_id || index
|
|
@@ -10967,7 +10999,7 @@ function FormSelect({
|
|
|
10967
10999
|
disabled,
|
|
10968
11000
|
"data-testid": testId,
|
|
10969
11001
|
children: [
|
|
10970
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: field.value ? _optionalChain([values, 'access',
|
|
11002
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: field.value ? _optionalChain([values, 'access', _301 => _301.find, 'call', _302 => _302((v) => v.id === field.value), 'optionalAccess', _303 => _303.text]) : _nullishCoalesce(placeholder, () => ( "")) }) }),
|
|
10971
11003
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SelectContent, { children: [
|
|
10972
11004
|
allowEmpty && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: EMPTY_VALUE, className: "text-muted-foreground", children: _nullishCoalesce(placeholder, () => ( "")) }),
|
|
10973
11005
|
values.map((type) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: type.id, children: type.text }, type.id))
|
|
@@ -11119,7 +11151,7 @@ function UserAvatar({ user, className, showFull, showLink, showTooltip = true })
|
|
|
11119
11151
|
}, "getInitials");
|
|
11120
11152
|
const getAvatar = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
11121
11153
|
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: [
|
|
11122
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess',
|
|
11154
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess', _304 => _304.avatar]) }),
|
|
11123
11155
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: getInitials3(user.name) })
|
|
11124
11156
|
] }) });
|
|
11125
11157
|
}, "getAvatar");
|
|
@@ -11310,7 +11342,7 @@ var useUserTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
|
|
|
11310
11342
|
})
|
|
11311
11343
|
};
|
|
11312
11344
|
const columns = _react.useMemo.call(void 0, () => {
|
|
11313
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
11345
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _305 => _305[field], 'optionalCall', _306 => _306()])).filter((col) => col !== void 0);
|
|
11314
11346
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
11315
11347
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
11316
11348
|
}, "useUserTableStructure");
|
|
@@ -11424,10 +11456,10 @@ function UserSelector({ id, form, label, placeholder, onChange, isRequired = fal
|
|
|
11424
11456
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
|
|
11425
11457
|
/* @__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: [
|
|
11426
11458
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "*:ring-border *:ring-1", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Avatar, { className: `mr-2 h-4 w-4`, children: [
|
|
11427
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access',
|
|
11428
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access',
|
|
11459
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access', _307 => _307.value, 'optionalAccess', _308 => _308.avatar]) }),
|
|
11460
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access', _309 => _309.value, 'optionalAccess', _310 => _310.name]) ? _optionalChain([field, 'access', _311 => _311.value, 'optionalAccess', _312 => _312.name, 'access', _313 => _313.split, 'call', _314 => _314(" "), 'access', _315 => _315.map, 'call', _316 => _316((name) => name.charAt(0).toUpperCase())]) : "X" })
|
|
11429
11461
|
] }) }),
|
|
11430
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access',
|
|
11462
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _317 => _317.value, 'optionalAccess', _318 => _318.name]), () => ( "")) })
|
|
11431
11463
|
] }) : /* @__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 }) }))) }) }) }),
|
|
11432
11464
|
field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
11433
11465
|
_lucidereact.CircleX,
|
|
@@ -11606,7 +11638,7 @@ function UserContent({ user }) {
|
|
|
11606
11638
|
const updated = await _chunkLBMNRFCYjs.UserService.patchAvatar({ id: user.id, avatar: imageKey });
|
|
11607
11639
|
setUser(updated);
|
|
11608
11640
|
},
|
|
11609
|
-
companyId: _nullishCoalesce(_optionalChain([company, 'optionalAccess',
|
|
11641
|
+
companyId: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _319 => _319.id]), () => ( "")),
|
|
11610
11642
|
className: "h-24 w-24",
|
|
11611
11643
|
fallbackClassName: "text-2xl"
|
|
11612
11644
|
}
|
|
@@ -11760,7 +11792,7 @@ function CompanyUsersList({ isDeleted, fullWidth }) {
|
|
|
11760
11792
|
const data = useDataListRetriever({
|
|
11761
11793
|
ready: !!company,
|
|
11762
11794
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkLBMNRFCYjs.UserService.findAllUsers(params), "retriever"),
|
|
11763
|
-
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess',
|
|
11795
|
+
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _320 => _320.id]), isDeleted },
|
|
11764
11796
|
module: _chunkLBMNRFCYjs.Modules.User
|
|
11765
11797
|
});
|
|
11766
11798
|
_react.useEffect.call(void 0, () => {
|
|
@@ -11867,11 +11899,11 @@ function UserListInAdd({ data, existingUsers, setSelectedUser, setLevelOpen }) {
|
|
|
11867
11899
|
className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
|
|
11868
11900
|
onClick: (_e) => {
|
|
11869
11901
|
setSelectedUser(user);
|
|
11870
|
-
_optionalChain([setLevelOpen, 'optionalCall',
|
|
11902
|
+
_optionalChain([setLevelOpen, 'optionalCall', _321 => _321(true)]);
|
|
11871
11903
|
},
|
|
11872
11904
|
onSelect: (_e) => {
|
|
11873
11905
|
setSelectedUser(user);
|
|
11874
|
-
_optionalChain([setLevelOpen, 'optionalCall',
|
|
11906
|
+
_optionalChain([setLevelOpen, 'optionalCall', _322 => _322(true)]);
|
|
11875
11907
|
},
|
|
11876
11908
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between px-4 py-1", children: [
|
|
11877
11909
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user }),
|
|
@@ -12002,7 +12034,7 @@ function CompanyContent({ company, actions }) {
|
|
|
12002
12034
|
company.legal_address
|
|
12003
12035
|
] }),
|
|
12004
12036
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
|
|
12005
|
-
_optionalChain([company, 'access',
|
|
12037
|
+
_optionalChain([company, 'access', _323 => _323.configurations, 'optionalAccess', _324 => _324.country]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
|
|
12006
12038
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
|
|
12007
12039
|
t("features.configuration.country"),
|
|
12008
12040
|
":"
|
|
@@ -12010,7 +12042,7 @@ function CompanyContent({ company, actions }) {
|
|
|
12010
12042
|
" ",
|
|
12011
12043
|
company.configurations.country
|
|
12012
12044
|
] }),
|
|
12013
|
-
_optionalChain([company, 'access',
|
|
12045
|
+
_optionalChain([company, 'access', _325 => _325.configurations, 'optionalAccess', _326 => _326.currency]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
|
|
12014
12046
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
|
|
12015
12047
|
t("features.configuration.currency"),
|
|
12016
12048
|
":"
|
|
@@ -12420,7 +12452,7 @@ function CompanyEditorInternal({
|
|
|
12420
12452
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
12421
12453
|
const fiscalRef = _react.useRef.call(void 0, null);
|
|
12422
12454
|
const addressComponentsRef = _react.useRef.call(void 0, {});
|
|
12423
|
-
const canAccessFeatures = hasRole(_chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access',
|
|
12455
|
+
const canAccessFeatures = hasRole(_chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access', _327 => _327.env, 'access', _328 => _328.NEXT_PUBLIC_PRIVATE_INSTALLATION, 'optionalAccess', _329 => _329.toLowerCase, 'call', _330 => _330()]) === "true";
|
|
12424
12456
|
const handleDialogOpenChange = _react.useCallback.call(void 0,
|
|
12425
12457
|
(open) => {
|
|
12426
12458
|
if (open && features.length === 0 && canAccessFeatures) {
|
|
@@ -12435,7 +12467,7 @@ function CompanyEditorInternal({
|
|
|
12435
12467
|
_chunk7QVYU63Ejs.__name.call(void 0, fetchFeatures, "fetchFeatures");
|
|
12436
12468
|
fetchFeatures();
|
|
12437
12469
|
}
|
|
12438
|
-
_optionalChain([onDialogOpenChange, 'optionalCall',
|
|
12470
|
+
_optionalChain([onDialogOpenChange, 'optionalCall', _331 => _331(open)]);
|
|
12439
12471
|
},
|
|
12440
12472
|
[features.length, canAccessFeatures, hasRole, onDialogOpenChange]
|
|
12441
12473
|
);
|
|
@@ -12480,12 +12512,12 @@ function CompanyEditorInternal({
|
|
|
12480
12512
|
);
|
|
12481
12513
|
const getDefaultValues = _react.useCallback.call(void 0, () => {
|
|
12482
12514
|
return {
|
|
12483
|
-
id: _optionalChain([company, 'optionalAccess',
|
|
12484
|
-
name: _optionalChain([company, 'optionalAccess',
|
|
12485
|
-
featureIds: _optionalChain([company, 'optionalAccess',
|
|
12486
|
-
moduleIds: _optionalChain([company, 'optionalAccess',
|
|
12487
|
-
logo: _optionalChain([company, 'optionalAccess',
|
|
12488
|
-
legal_address: _optionalChain([company, 'optionalAccess',
|
|
12515
|
+
id: _optionalChain([company, 'optionalAccess', _332 => _332.id]) || _uuid.v4.call(void 0, ),
|
|
12516
|
+
name: _optionalChain([company, 'optionalAccess', _333 => _333.name]) || "",
|
|
12517
|
+
featureIds: _optionalChain([company, 'optionalAccess', _334 => _334.features, 'access', _335 => _335.map, 'call', _336 => _336((feature) => feature.id)]) || [],
|
|
12518
|
+
moduleIds: _optionalChain([company, 'optionalAccess', _337 => _337.modules, 'access', _338 => _338.map, 'call', _339 => _339((module) => module.id)]) || [],
|
|
12519
|
+
logo: _optionalChain([company, 'optionalAccess', _340 => _340.logo]) || "",
|
|
12520
|
+
legal_address: _optionalChain([company, 'optionalAccess', _341 => _341.legal_address]) || ""
|
|
12489
12521
|
};
|
|
12490
12522
|
}, [company]);
|
|
12491
12523
|
const form = _reacthookform.useForm.call(void 0, {
|
|
@@ -12497,7 +12529,7 @@ function CompanyEditorInternal({
|
|
|
12497
12529
|
{
|
|
12498
12530
|
form,
|
|
12499
12531
|
entityType: t(`entities.companies`, { count: 1 }),
|
|
12500
|
-
entityName: _optionalChain([company, 'optionalAccess',
|
|
12532
|
+
entityName: _optionalChain([company, 'optionalAccess', _342 => _342.name]),
|
|
12501
12533
|
isEdit: !!company,
|
|
12502
12534
|
module: _chunkLBMNRFCYjs.Modules.Company,
|
|
12503
12535
|
propagateChanges,
|
|
@@ -12522,7 +12554,7 @@ function CompanyEditorInternal({
|
|
|
12522
12554
|
throw new Error("Fiscal data validation failed");
|
|
12523
12555
|
}
|
|
12524
12556
|
const payload = {
|
|
12525
|
-
id: _nullishCoalesce(_optionalChain([company, 'optionalAccess',
|
|
12557
|
+
id: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _343 => _343.id]), () => ( _uuid.v4.call(void 0, ))),
|
|
12526
12558
|
name: values.name,
|
|
12527
12559
|
logo: files && contentType ? values.logo : void 0,
|
|
12528
12560
|
featureIds: values.featureIds,
|
|
@@ -12553,10 +12585,10 @@ function CompanyEditorInternal({
|
|
|
12553
12585
|
dialogOpen,
|
|
12554
12586
|
onDialogOpenChange: handleDialogOpenChange,
|
|
12555
12587
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-start justify-between gap-x-4", children: [
|
|
12556
|
-
/* @__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 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',
|
|
12588
|
+
/* @__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 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', _344 => _344.logo]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12557
12589
|
_image2.default,
|
|
12558
12590
|
{
|
|
12559
|
-
src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess',
|
|
12591
|
+
src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess', _345 => _345.logo]) || "",
|
|
12560
12592
|
alt: "Company Logo",
|
|
12561
12593
|
width: 200,
|
|
12562
12594
|
height: 200
|
|
@@ -12590,7 +12622,7 @@ function CompanyEditorInternal({
|
|
|
12590
12622
|
}
|
|
12591
12623
|
),
|
|
12592
12624
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SectionHeader, { className: "mt-2", children: t(`company.sections.fiscal_data`) }),
|
|
12593
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess',
|
|
12625
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess', _346 => _346.fiscal_data])) })
|
|
12594
12626
|
] }),
|
|
12595
12627
|
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 }) }) })
|
|
12596
12628
|
] })
|
|
@@ -12707,7 +12739,7 @@ function NotificationToast(notification, t, generateUrl, reouter) {
|
|
|
12707
12739
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
12708
12740
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
|
|
12709
12741
|
strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
|
|
12710
|
-
actor: _nullishCoalesce(_optionalChain([data, 'access',
|
|
12742
|
+
actor: _nullishCoalesce(_optionalChain([data, 'access', _347 => _347.actor, 'optionalAccess', _348 => _348.name]), () => ( "")),
|
|
12711
12743
|
title: data.title,
|
|
12712
12744
|
message: _nullishCoalesce(notification.message, () => ( ""))
|
|
12713
12745
|
}) }),
|
|
@@ -12736,7 +12768,7 @@ function NotificationMenuItem({ notification, closePopover }) {
|
|
|
12736
12768
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
12737
12769
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
|
|
12738
12770
|
strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
|
|
12739
|
-
actor: _nullishCoalesce(_optionalChain([data, 'access',
|
|
12771
|
+
actor: _nullishCoalesce(_optionalChain([data, 'access', _349 => _349.actor, 'optionalAccess', _350 => _350.name]), () => ( "")),
|
|
12740
12772
|
title: data.title,
|
|
12741
12773
|
message: _nullishCoalesce(notification.message, () => ( ""))
|
|
12742
12774
|
}) }),
|
|
@@ -12800,7 +12832,7 @@ var NotificationContextProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(v
|
|
|
12800
12832
|
_react.useEffect.call(void 0, () => {
|
|
12801
12833
|
if (hasInitiallyLoaded || !currentUser) return;
|
|
12802
12834
|
if (_chunkXTLTQQ7Xjs.isRolesConfigured.call(void 0, )) {
|
|
12803
|
-
const isAdmin = _optionalChain([currentUser, 'access',
|
|
12835
|
+
const isAdmin = _optionalChain([currentUser, 'access', _351 => _351.roles, 'optionalAccess', _352 => _352.some, 'call', _353 => _353((role) => role.id === _chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator)]);
|
|
12804
12836
|
if (isAdmin) {
|
|
12805
12837
|
setHasInitiallyLoaded(true);
|
|
12806
12838
|
return;
|
|
@@ -13002,7 +13034,7 @@ function OnboardingProvider({
|
|
|
13002
13034
|
let tourSteps = steps;
|
|
13003
13035
|
if (!tourSteps) {
|
|
13004
13036
|
const tour2 = tours.find((t) => t.id === tourId);
|
|
13005
|
-
tourSteps = _optionalChain([tour2, 'optionalAccess',
|
|
13037
|
+
tourSteps = _optionalChain([tour2, 'optionalAccess', _354 => _354.steps]);
|
|
13006
13038
|
}
|
|
13007
13039
|
if (!tourSteps || tourSteps.length === 0) {
|
|
13008
13040
|
console.warn(`No steps found for tour: ${tourId}`);
|
|
@@ -13070,10 +13102,10 @@ function OnboardingProvider({
|
|
|
13070
13102
|
when: {
|
|
13071
13103
|
show: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
13072
13104
|
setCurrentStepIndex(index);
|
|
13073
|
-
_optionalChain([stepConfig, 'access',
|
|
13105
|
+
_optionalChain([stepConfig, 'access', _355 => _355.onShow, 'optionalCall', _356 => _356()]);
|
|
13074
13106
|
}, "show"),
|
|
13075
13107
|
hide: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
13076
|
-
_optionalChain([stepConfig, 'access',
|
|
13108
|
+
_optionalChain([stepConfig, 'access', _357 => _357.onHide, 'optionalCall', _358 => _358()]);
|
|
13077
13109
|
}, "hide")
|
|
13078
13110
|
}
|
|
13079
13111
|
});
|
|
@@ -13239,7 +13271,7 @@ function HowToMultiSelector({
|
|
|
13239
13271
|
retriever: (params) => _chunkLBMNRFCYjs.HowToService.findMany(params),
|
|
13240
13272
|
module: _chunkLBMNRFCYjs.Modules.HowTo,
|
|
13241
13273
|
getLabel: (howTo) => howTo.name,
|
|
13242
|
-
excludeId: _optionalChain([currentHowTo, 'optionalAccess',
|
|
13274
|
+
excludeId: _optionalChain([currentHowTo, 'optionalAccess', _359 => _359.id]),
|
|
13243
13275
|
onChange
|
|
13244
13276
|
}
|
|
13245
13277
|
);
|
|
@@ -13347,17 +13379,17 @@ function HowToEditorInternal({
|
|
|
13347
13379
|
);
|
|
13348
13380
|
const getDefaultValues = _react.useCallback.call(void 0,
|
|
13349
13381
|
() => ({
|
|
13350
|
-
id: _optionalChain([howTo, 'optionalAccess',
|
|
13351
|
-
name: _optionalChain([howTo, 'optionalAccess',
|
|
13352
|
-
description: _optionalChain([howTo, 'optionalAccess',
|
|
13353
|
-
pages: _chunkLBMNRFCYjs.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess',
|
|
13354
|
-
howToType: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
13355
|
-
slug: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
13356
|
-
order: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
13357
|
-
summary: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
13358
|
-
tags: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
13359
|
-
contextualKeys: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
13360
|
-
draft: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
13382
|
+
id: _optionalChain([howTo, 'optionalAccess', _360 => _360.id]) || _uuid.v4.call(void 0, ),
|
|
13383
|
+
name: _optionalChain([howTo, 'optionalAccess', _361 => _361.name]) || "",
|
|
13384
|
+
description: _optionalChain([howTo, 'optionalAccess', _362 => _362.description]) || [],
|
|
13385
|
+
pages: _chunkLBMNRFCYjs.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess', _363 => _363.pages])),
|
|
13386
|
+
howToType: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _364 => _364.howToType]), () => ( "how-to")),
|
|
13387
|
+
slug: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _365 => _365.slug]), () => ( "")),
|
|
13388
|
+
order: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _366 => _366.order]), () => ( 0)),
|
|
13389
|
+
summary: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _367 => _367.summary]), () => ( "")),
|
|
13390
|
+
tags: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _368 => _368.tags]), () => ( []))).join(", "),
|
|
13391
|
+
contextualKeys: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _369 => _369.contextualKeys]), () => ( []))).join(", "),
|
|
13392
|
+
draft: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _370 => _370.draft]), () => ( false)),
|
|
13361
13393
|
relatedArticles: []
|
|
13362
13394
|
}),
|
|
13363
13395
|
[howTo]
|
|
@@ -13368,7 +13400,7 @@ function HowToEditorInternal({
|
|
|
13368
13400
|
});
|
|
13369
13401
|
const initialRelatedIds = _react.useRef.call(void 0, []);
|
|
13370
13402
|
_react.useEffect.call(void 0, () => {
|
|
13371
|
-
if (!_optionalChain([howTo, 'optionalAccess',
|
|
13403
|
+
if (!_optionalChain([howTo, 'optionalAccess', _371 => _371.howToType]) || !_optionalChain([howTo, 'optionalAccess', _372 => _372.slug])) return;
|
|
13372
13404
|
let active = true;
|
|
13373
13405
|
_chunkLBMNRFCYjs.HowToService.findRelated({ howToType: howTo.howToType, slug: howTo.slug }).then((list) => {
|
|
13374
13406
|
if (!active) return;
|
|
@@ -13407,7 +13439,7 @@ function HowToEditorInternal({
|
|
|
13407
13439
|
{
|
|
13408
13440
|
form,
|
|
13409
13441
|
entityType: t(`entities.howtos`, { count: 1 }),
|
|
13410
|
-
entityName: _optionalChain([howTo, 'optionalAccess',
|
|
13442
|
+
entityName: _optionalChain([howTo, 'optionalAccess', _373 => _373.name]),
|
|
13411
13443
|
isEdit: !!howTo,
|
|
13412
13444
|
module: _chunkLBMNRFCYjs.Modules.HowTo,
|
|
13413
13445
|
propagateChanges,
|
|
@@ -13788,7 +13820,7 @@ function withPatchedTitle(source, title) {
|
|
|
13788
13820
|
return _chunkLBMNRFCYjs.rehydrate.call(void 0, _chunkLBMNRFCYjs.Modules.Assistant, {
|
|
13789
13821
|
jsonApi: {
|
|
13790
13822
|
...dehydrated.jsonApi,
|
|
13791
|
-
attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access',
|
|
13823
|
+
attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _374 => _374.jsonApi, 'optionalAccess', _375 => _375.attributes]), () => ( {})), title }
|
|
13792
13824
|
},
|
|
13793
13825
|
included: dehydrated.included
|
|
13794
13826
|
});
|
|
@@ -13809,7 +13841,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
|
|
|
13809
13841
|
const [status, setStatus] = _react.useState.call(void 0, void 0);
|
|
13810
13842
|
const [failedMessageIds, setFailedMessageIds] = _react.useState.call(void 0, () => /* @__PURE__ */ new Set());
|
|
13811
13843
|
const [operatorMode, setOperatorMode] = _react.useState.call(void 0,
|
|
13812
|
-
() => _optionalChain([dehydratedAssistant, 'optionalAccess',
|
|
13844
|
+
() => _optionalChain([dehydratedAssistant, 'optionalAccess', _376 => _376.jsonApi, 'optionalAccess', _377 => _377.attributes, 'optionalAccess', _378 => _378.engine]) === "operator"
|
|
13813
13845
|
);
|
|
13814
13846
|
const { socket } = useSocketContext();
|
|
13815
13847
|
const sendMessage = _react.useCallback.call(void 0,
|
|
@@ -13818,7 +13850,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
|
|
|
13818
13850
|
if (!trimmed) return;
|
|
13819
13851
|
const optimistic = _chunkLBMNRFCYjs.AssistantMessage.buildOptimistic({
|
|
13820
13852
|
content: trimmed,
|
|
13821
|
-
assistantId: _optionalChain([assistant, 'optionalAccess',
|
|
13853
|
+
assistantId: _optionalChain([assistant, 'optionalAccess', _379 => _379.id]),
|
|
13822
13854
|
position: nextPosition(messages)
|
|
13823
13855
|
});
|
|
13824
13856
|
setMessages((prev) => [...prev, optimistic]);
|
|
@@ -13828,13 +13860,13 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
|
|
|
13828
13860
|
if (assistant && payload.assistantId && payload.assistantId !== assistant.id) return;
|
|
13829
13861
|
if (typeof payload.status === "string") setStatus(payload.status);
|
|
13830
13862
|
}, "handler");
|
|
13831
|
-
_optionalChain([socket, 'optionalAccess',
|
|
13863
|
+
_optionalChain([socket, 'optionalAccess', _380 => _380.on, 'call', _381 => _381("assistant:status", handler)]);
|
|
13832
13864
|
try {
|
|
13833
13865
|
if (!assistant) {
|
|
13834
13866
|
const input = {
|
|
13835
13867
|
firstMessage: trimmed,
|
|
13836
|
-
howToMode: _optionalChain([opts, 'optionalAccess',
|
|
13837
|
-
limitToHowToId: _optionalChain([opts, 'optionalAccess',
|
|
13868
|
+
howToMode: _optionalChain([opts, 'optionalAccess', _382 => _382.howToMode]),
|
|
13869
|
+
limitToHowToId: _optionalChain([opts, 'optionalAccess', _383 => _383.limitToHowToId])
|
|
13838
13870
|
};
|
|
13839
13871
|
const created = operatorMode ? await _chunkLBMNRFCYjs.AssistantService.createOperator(input) : await _chunkLBMNRFCYjs.AssistantService.create(input);
|
|
13840
13872
|
const msgs = await _chunkLBMNRFCYjs.AssistantMessageService.findByAssistant({ assistantId: created.id });
|
|
@@ -13851,8 +13883,8 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
|
|
|
13851
13883
|
}) : await _chunkLBMNRFCYjs.AssistantService.appendMessage({
|
|
13852
13884
|
assistantId: assistant.id,
|
|
13853
13885
|
content: trimmed,
|
|
13854
|
-
howToMode: _optionalChain([opts, 'optionalAccess',
|
|
13855
|
-
limitToHowToId: _optionalChain([opts, 'optionalAccess',
|
|
13886
|
+
howToMode: _optionalChain([opts, 'optionalAccess', _384 => _384.howToMode]),
|
|
13887
|
+
limitToHowToId: _optionalChain([opts, 'optionalAccess', _385 => _385.limitToHowToId])
|
|
13856
13888
|
});
|
|
13857
13889
|
setMessages((prev) => [...stripOptimistic(prev), ...result]);
|
|
13858
13890
|
}
|
|
@@ -13863,7 +13895,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
|
|
|
13863
13895
|
return next;
|
|
13864
13896
|
});
|
|
13865
13897
|
} finally {
|
|
13866
|
-
_optionalChain([socket, 'optionalAccess',
|
|
13898
|
+
_optionalChain([socket, 'optionalAccess', _386 => _386.off, 'call', _387 => _387("assistant:status", handler)]);
|
|
13867
13899
|
setSending(false);
|
|
13868
13900
|
setStatus(void 0);
|
|
13869
13901
|
}
|
|
@@ -13921,7 +13953,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
|
|
|
13921
13953
|
await _chunkLBMNRFCYjs.AssistantService.delete({ id });
|
|
13922
13954
|
setThreads((prev) => prev.filter((t2) => t2.id !== id));
|
|
13923
13955
|
setAssistant((prev) => {
|
|
13924
|
-
if (_optionalChain([prev, 'optionalAccess',
|
|
13956
|
+
if (_optionalChain([prev, 'optionalAccess', _388 => _388.id]) === id) {
|
|
13925
13957
|
setMessages([]);
|
|
13926
13958
|
return void 0;
|
|
13927
13959
|
}
|
|
@@ -14075,7 +14107,7 @@ function usePageTracker() {
|
|
|
14075
14107
|
if (typeof document !== "undefined") {
|
|
14076
14108
|
const titleParts = document.title.split("]");
|
|
14077
14109
|
if (titleParts[1]) {
|
|
14078
|
-
const cleanTitle = _optionalChain([titleParts, 'access',
|
|
14110
|
+
const cleanTitle = _optionalChain([titleParts, 'access', _389 => _389[1], 'access', _390 => _390.split, 'call', _391 => _391("|"), 'access', _392 => _392[0], 'optionalAccess', _393 => _393.trim, 'call', _394 => _394()]);
|
|
14079
14111
|
pageTitle = cleanTitle || foundModule.name;
|
|
14080
14112
|
}
|
|
14081
14113
|
}
|
|
@@ -14112,7 +14144,7 @@ function usePushNotifications() {
|
|
|
14112
14144
|
const register = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
14113
14145
|
if ("serviceWorker" in navigator && "PushManager" in window) {
|
|
14114
14146
|
try {
|
|
14115
|
-
const sessionKey = `push_registered_${_optionalChain([currentUser, 'optionalAccess',
|
|
14147
|
+
const sessionKey = `push_registered_${_optionalChain([currentUser, 'optionalAccess', _395 => _395.id])}`;
|
|
14116
14148
|
const lastRegisteredSubscription = sessionStorage.getItem(sessionKey);
|
|
14117
14149
|
const registration = await navigator.serviceWorker.register(`${_chunkXTLTQQ7Xjs.getAppUrl.call(void 0, )}/sw.js`);
|
|
14118
14150
|
let permission = Notification.permission;
|
|
@@ -14169,7 +14201,7 @@ function useSocket({ token }) {
|
|
|
14169
14201
|
const socketRef = _react.useRef.call(void 0, null);
|
|
14170
14202
|
_react.useEffect.call(void 0, () => {
|
|
14171
14203
|
if (!token) return;
|
|
14172
|
-
const globalSocketKey = `__socket_${_optionalChain([process, 'access',
|
|
14204
|
+
const globalSocketKey = `__socket_${_optionalChain([process, 'access', _396 => _396.env, 'access', _397 => _397.NEXT_PUBLIC_API_URL, 'optionalAccess', _398 => _398.replace, 'call', _399 => _399(/[^a-zA-Z0-9]/g, "_")])}`;
|
|
14173
14205
|
if (typeof window !== "undefined") {
|
|
14174
14206
|
const _allSocketKeys = Object.keys(window).filter((key) => key.startsWith("__socket_"));
|
|
14175
14207
|
const existingSocket = window[globalSocketKey];
|
|
@@ -14225,14 +14257,14 @@ function useSocket({ token }) {
|
|
|
14225
14257
|
});
|
|
14226
14258
|
}, "handleMessage");
|
|
14227
14259
|
const handleNotification = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
|
|
14228
|
-
const resource = _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
14229
|
-
if (!_optionalChain([resource, 'optionalAccess',
|
|
14260
|
+
const resource = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _400 => _400.data]), () => ( _optionalChain([data, 'optionalAccess', _401 => _401.jsonApi])));
|
|
14261
|
+
if (!_optionalChain([resource, 'optionalAccess', _402 => _402.type])) {
|
|
14230
14262
|
console.warn("[useSocket] ignoring notification with unexpected payload shape", data);
|
|
14231
14263
|
return;
|
|
14232
14264
|
}
|
|
14233
14265
|
const notification = _chunkLBMNRFCYjs.rehydrate.call(void 0, _chunkLBMNRFCYjs.Modules.Notification, {
|
|
14234
14266
|
jsonApi: resource,
|
|
14235
|
-
included: _optionalChain([data, 'optionalAccess',
|
|
14267
|
+
included: _optionalChain([data, 'optionalAccess', _403 => _403.included]) || []
|
|
14236
14268
|
});
|
|
14237
14269
|
if (notification) {
|
|
14238
14270
|
setSocketNotifications((prev) => {
|
|
@@ -14351,7 +14383,7 @@ function BreadcrumbMobile({
|
|
|
14351
14383
|
}
|
|
14352
14384
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenu, { open, onOpenChange: setOpen, children: [
|
|
14353
14385
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenuTrigger, { className: "text-foreground text-xs/relaxed font-normal hover:bg-accent flex items-center gap-1 rounded-md px-1.5 py-0.5 transition-colors outline-none", children: [
|
|
14354
|
-
_optionalChain([lastItem, 'optionalAccess',
|
|
14386
|
+
_optionalChain([lastItem, 'optionalAccess', _404 => _404.name]),
|
|
14355
14387
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronDownIcon, { className: "text-muted-foreground size-3.5" })
|
|
14356
14388
|
] }),
|
|
14357
14389
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuContent, { align: "start", children: allItems.map((item, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuItem, { children: item.href ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: item.href, onClick: item.onClick, children: item.name }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: item.name }) }, index)) })
|
|
@@ -14681,7 +14713,7 @@ var railTriggerClass = _chunkLBMNRFCYjs.cn.call(void 0,
|
|
|
14681
14713
|
"data-[state=active]:bg-foreground data-[state=active]:text-background",
|
|
14682
14714
|
"data-[state=active]:font-semibold data-[state=active]:shadow-none"
|
|
14683
14715
|
);
|
|
14684
|
-
var tabValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (tab) => _nullishCoalesce(_nullishCoalesce(tab.sectionKey, () => ( _optionalChain([tab, 'access',
|
|
14716
|
+
var tabValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (tab) => _nullishCoalesce(_nullishCoalesce(tab.sectionKey, () => ( _optionalChain([tab, 'access', _405 => _405.key, 'optionalAccess', _406 => _406.name]))), () => ( tab.label)), "tabValue");
|
|
14685
14717
|
function RoundPageContainer({
|
|
14686
14718
|
module,
|
|
14687
14719
|
id,
|
|
@@ -14701,7 +14733,7 @@ function RoundPageContainer({
|
|
|
14701
14733
|
const [mounted, setMounted] = _react.useState.call(void 0, false);
|
|
14702
14734
|
_react.useEffect.call(void 0, () => {
|
|
14703
14735
|
const match = document.cookie.split("; ").find((row) => row.startsWith(`${DETAILS_COOKIE_NAME}=`));
|
|
14704
|
-
if (_optionalChain([match, 'optionalAccess',
|
|
14736
|
+
if (_optionalChain([match, 'optionalAccess', _407 => _407.split, 'call', _408 => _408("="), 'access', _409 => _409[1]]) === "true") setShowDetailsState(true);
|
|
14705
14737
|
}, []);
|
|
14706
14738
|
_react.useEffect.call(void 0, () => {
|
|
14707
14739
|
setMounted(true);
|
|
@@ -14731,11 +14763,11 @@ function RoundPageContainer({
|
|
|
14731
14763
|
} else {
|
|
14732
14764
|
rewriteUrl({ page: window.location.pathname, additionalParameters: { section: key } });
|
|
14733
14765
|
}
|
|
14734
|
-
_optionalChain([onSectionChange, 'optionalCall',
|
|
14766
|
+
_optionalChain([onSectionChange, 'optionalCall', _410 => _410(key)]);
|
|
14735
14767
|
},
|
|
14736
14768
|
[module, id, rewriteUrl, onSectionChange]
|
|
14737
14769
|
);
|
|
14738
|
-
const activeFillHeight = _optionalChain([tabs, 'optionalAccess',
|
|
14770
|
+
const activeFillHeight = _optionalChain([tabs, 'optionalAccess', _411 => _411.find, 'call', _412 => _412((t) => tabValue(t) === activeTab), 'optionalAccess', _413 => _413.fillHeight]) === true;
|
|
14739
14771
|
const { ungrouped, groups } = _react.useMemo.call(void 0, () => partitionTabs(_nullishCoalesce(tabs, () => ( []))), [tabs]);
|
|
14740
14772
|
const isReady = mounted && isMobile !== void 0;
|
|
14741
14773
|
if (!isReady) {
|
|
@@ -15025,14 +15057,14 @@ function BlockNoteEditorMentionHoverCard({
|
|
|
15025
15057
|
const entityType = target.dataset.mentionType;
|
|
15026
15058
|
const alias = target.dataset.mentionAlias;
|
|
15027
15059
|
setHovered((prev) => {
|
|
15028
|
-
if (_optionalChain([prev, 'optionalAccess',
|
|
15060
|
+
if (_optionalChain([prev, 'optionalAccess', _414 => _414.id]) === id && _optionalChain([prev, 'optionalAccess', _415 => _415.element]) === target) return prev;
|
|
15029
15061
|
return { id, entityType, alias, element: target };
|
|
15030
15062
|
});
|
|
15031
15063
|
}, "handleMouseOver");
|
|
15032
15064
|
const handleMouseOut = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
|
|
15033
15065
|
const target = e.target.closest("[data-mention-id]");
|
|
15034
15066
|
if (!target) return;
|
|
15035
|
-
const related = _optionalChain([e, 'access',
|
|
15067
|
+
const related = _optionalChain([e, 'access', _416 => _416.relatedTarget, 'optionalAccess', _417 => _417.closest, 'call', _418 => _418("[data-mention-id]")]);
|
|
15036
15068
|
if (related) return;
|
|
15037
15069
|
scheduleClose();
|
|
15038
15070
|
}, "handleMouseOut");
|
|
@@ -15046,7 +15078,7 @@ function BlockNoteEditorMentionHoverCard({
|
|
|
15046
15078
|
}, [containerRef, mentionResolveFn, cancelClose, scheduleClose]);
|
|
15047
15079
|
if (!hovered || !mentionResolveFn) return null;
|
|
15048
15080
|
const resolved = mentionResolveFn(hovered.id, hovered.entityType, hovered.alias);
|
|
15049
|
-
if (!_optionalChain([resolved, 'optionalAccess',
|
|
15081
|
+
if (!_optionalChain([resolved, 'optionalAccess', _419 => _419.HoverContent])) return null;
|
|
15050
15082
|
const ContentComponent = resolved.HoverContent;
|
|
15051
15083
|
const rect = hovered.element.getBoundingClientRect();
|
|
15052
15084
|
return _reactdom.createPortal.call(void 0,
|
|
@@ -15089,28 +15121,28 @@ var parseMentionElement = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
15089
15121
|
}, "parseMentionElement");
|
|
15090
15122
|
var createMentionInlineContentSpec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (resolveFn, disableMention, nameResolver) => {
|
|
15091
15123
|
const MentionExternalHTML = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
|
|
15092
|
-
const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall',
|
|
15124
|
+
const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _420 => _420(props.id, props.entityType, props.alias)]), () => ( props.alias));
|
|
15093
15125
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { "data-mention-id": props.id, "data-mention-type": props.entityType, "data-mention-alias": props.alias, children: [
|
|
15094
15126
|
"@",
|
|
15095
15127
|
displayName
|
|
15096
15128
|
] });
|
|
15097
15129
|
}, "MentionExternalHTML");
|
|
15098
15130
|
const Mention = React.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function Mention2(props) {
|
|
15099
|
-
const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall',
|
|
15131
|
+
const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _421 => _421(props.id, props.entityType, props.alias)]), () => ( props.alias));
|
|
15100
15132
|
if (disableMention) {
|
|
15101
|
-
const resolved2 = _optionalChain([resolveFn, 'optionalCall',
|
|
15102
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess',
|
|
15133
|
+
const resolved2 = _optionalChain([resolveFn, 'optionalCall', _422 => _422(props.id, props.entityType, displayName)]);
|
|
15134
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess', _423 => _423.url]), () => ( "#")), className: "text-primary", children: [
|
|
15103
15135
|
"@",
|
|
15104
15136
|
displayName
|
|
15105
15137
|
] });
|
|
15106
15138
|
}
|
|
15107
|
-
const resolved = _optionalChain([resolveFn, 'optionalCall',
|
|
15108
|
-
if (_optionalChain([resolved, 'optionalAccess',
|
|
15139
|
+
const resolved = _optionalChain([resolveFn, 'optionalCall', _424 => _424(props.id, props.entityType, displayName)]);
|
|
15140
|
+
if (_optionalChain([resolved, 'optionalAccess', _425 => _425.Inline])) {
|
|
15109
15141
|
const Custom = resolved.Inline;
|
|
15110
15142
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Custom, { ...props, alias: displayName });
|
|
15111
15143
|
}
|
|
15112
|
-
const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess',
|
|
15113
|
-
const handleClick = _optionalChain([resolved, 'optionalAccess',
|
|
15144
|
+
const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _426 => _426.url]), () => ( "#"));
|
|
15145
|
+
const handleClick = _optionalChain([resolved, 'optionalAccess', _427 => _427.onActivate]) ? (e) => resolved.onActivate(e, props) : void 0;
|
|
15114
15146
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
15115
15147
|
_link2.default,
|
|
15116
15148
|
{
|
|
@@ -15216,7 +15248,7 @@ function BlockNoteEditorMentionSuggestionMenu({
|
|
|
15216
15248
|
if (!suggestionMenuComponent) return void 0;
|
|
15217
15249
|
const Component2 = suggestionMenuComponent;
|
|
15218
15250
|
const Wrapped = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
|
|
15219
|
-
const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access',
|
|
15251
|
+
const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access', _428 => _428.items, 'access', _429 => _429[0], 'optionalAccess', _430 => _430.title]) === KEEP_OPEN_SENTINEL_TITLE;
|
|
15220
15252
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15221
15253
|
Component2,
|
|
15222
15254
|
{
|
|
@@ -15225,7 +15257,7 @@ function BlockNoteEditorMentionSuggestionMenu({
|
|
|
15225
15257
|
selectedIndex: isSentinelOnly ? void 0 : props.selectedIndex,
|
|
15226
15258
|
onItemClick: (item) => {
|
|
15227
15259
|
if (item.title === KEEP_OPEN_SENTINEL_TITLE) return;
|
|
15228
|
-
_optionalChain([props, 'access',
|
|
15260
|
+
_optionalChain([props, 'access', _431 => _431.onItemClick, 'optionalCall', _432 => _432(item)]);
|
|
15229
15261
|
}
|
|
15230
15262
|
}
|
|
15231
15263
|
);
|
|
@@ -15419,10 +15451,10 @@ var cellId = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
|
|
|
15419
15451
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => params.toggleId ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15420
15452
|
Checkbox,
|
|
15421
15453
|
{
|
|
15422
|
-
checked: _optionalChain([params, 'access',
|
|
15454
|
+
checked: _optionalChain([params, 'access', _433 => _433.checkedIds, 'optionalAccess', _434 => _434.includes, 'call', _435 => _435(row.getValue(params.name))]) || false,
|
|
15423
15455
|
onCheckedChange: (value) => {
|
|
15424
15456
|
row.toggleSelected(!!value);
|
|
15425
|
-
_optionalChain([params, 'access',
|
|
15457
|
+
_optionalChain([params, 'access', _436 => _436.toggleId, 'optionalCall', _437 => _437(row.getValue(params.name))]);
|
|
15426
15458
|
},
|
|
15427
15459
|
"aria-label": "Select row"
|
|
15428
15460
|
}
|
|
@@ -15481,7 +15513,7 @@ function useJsonApiGet(params) {
|
|
|
15481
15513
|
const [response, setResponse] = _react.useState.call(void 0, null);
|
|
15482
15514
|
const isMounted = _react.useRef.call(void 0, true);
|
|
15483
15515
|
const fetchData = _react.useCallback.call(void 0, async () => {
|
|
15484
|
-
if (_optionalChain([params, 'access',
|
|
15516
|
+
if (_optionalChain([params, 'access', _438 => _438.options, 'optionalAccess', _439 => _439.enabled]) === false) return;
|
|
15485
15517
|
setLoading(true);
|
|
15486
15518
|
setError(null);
|
|
15487
15519
|
try {
|
|
@@ -15508,9 +15540,9 @@ function useJsonApiGet(params) {
|
|
|
15508
15540
|
setLoading(false);
|
|
15509
15541
|
}
|
|
15510
15542
|
}
|
|
15511
|
-
}, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access',
|
|
15543
|
+
}, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _440 => _440.options, 'optionalAccess', _441 => _441.enabled])]);
|
|
15512
15544
|
const fetchNextPage = _react.useCallback.call(void 0, async () => {
|
|
15513
|
-
if (!_optionalChain([response, 'optionalAccess',
|
|
15545
|
+
if (!_optionalChain([response, 'optionalAccess', _442 => _442.nextPage])) return;
|
|
15514
15546
|
setLoading(true);
|
|
15515
15547
|
try {
|
|
15516
15548
|
const nextResponse = await response.nextPage();
|
|
@@ -15531,7 +15563,7 @@ function useJsonApiGet(params) {
|
|
|
15531
15563
|
}
|
|
15532
15564
|
}, [response]);
|
|
15533
15565
|
const fetchPreviousPage = _react.useCallback.call(void 0, async () => {
|
|
15534
|
-
if (!_optionalChain([response, 'optionalAccess',
|
|
15566
|
+
if (!_optionalChain([response, 'optionalAccess', _443 => _443.prevPage])) return;
|
|
15535
15567
|
setLoading(true);
|
|
15536
15568
|
try {
|
|
15537
15569
|
const prevResponse = await response.prevPage();
|
|
@@ -15557,15 +15589,15 @@ function useJsonApiGet(params) {
|
|
|
15557
15589
|
return () => {
|
|
15558
15590
|
isMounted.current = false;
|
|
15559
15591
|
};
|
|
15560
|
-
}, [fetchData, ..._optionalChain([params, 'access',
|
|
15592
|
+
}, [fetchData, ..._optionalChain([params, 'access', _444 => _444.options, 'optionalAccess', _445 => _445.deps]) || []]);
|
|
15561
15593
|
return {
|
|
15562
15594
|
data,
|
|
15563
15595
|
loading,
|
|
15564
15596
|
error,
|
|
15565
15597
|
response,
|
|
15566
15598
|
refetch: fetchData,
|
|
15567
|
-
hasNextPage: !!_optionalChain([response, 'optionalAccess',
|
|
15568
|
-
hasPreviousPage: !!_optionalChain([response, 'optionalAccess',
|
|
15599
|
+
hasNextPage: !!_optionalChain([response, 'optionalAccess', _446 => _446.next]),
|
|
15600
|
+
hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _447 => _447.prev]),
|
|
15569
15601
|
fetchNextPage,
|
|
15570
15602
|
fetchPreviousPage
|
|
15571
15603
|
};
|
|
@@ -15643,17 +15675,17 @@ function useJsonApiMutation(config) {
|
|
|
15643
15675
|
if (apiResponse.ok) {
|
|
15644
15676
|
const resultData = apiResponse.data;
|
|
15645
15677
|
setData(resultData);
|
|
15646
|
-
_optionalChain([config, 'access',
|
|
15678
|
+
_optionalChain([config, 'access', _448 => _448.onSuccess, 'optionalCall', _449 => _449(resultData)]);
|
|
15647
15679
|
return resultData;
|
|
15648
15680
|
} else {
|
|
15649
15681
|
setError(apiResponse.error);
|
|
15650
|
-
_optionalChain([config, 'access',
|
|
15682
|
+
_optionalChain([config, 'access', _450 => _450.onError, 'optionalCall', _451 => _451(apiResponse.error)]);
|
|
15651
15683
|
return null;
|
|
15652
15684
|
}
|
|
15653
15685
|
} catch (err) {
|
|
15654
15686
|
const errorMessage = err instanceof Error ? err.message : "Unknown error";
|
|
15655
15687
|
setError(errorMessage);
|
|
15656
|
-
_optionalChain([config, 'access',
|
|
15688
|
+
_optionalChain([config, 'access', _452 => _452.onError, 'optionalCall', _453 => _453(errorMessage)]);
|
|
15657
15689
|
return null;
|
|
15658
15690
|
} finally {
|
|
15659
15691
|
setLoading(false);
|
|
@@ -15726,7 +15758,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
15726
15758
|
{
|
|
15727
15759
|
href: hasRole(_chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator) ? generateUrl({
|
|
15728
15760
|
page: "/administration",
|
|
15729
|
-
id: _optionalChain([_chunkLBMNRFCYjs.Modules, 'access',
|
|
15761
|
+
id: _optionalChain([_chunkLBMNRFCYjs.Modules, 'access', _454 => _454.Company, 'access', _455 => _455.pageUrl, 'optionalAccess', _456 => _456.substring, 'call', _457 => _457(1)]),
|
|
15730
15762
|
childPage: company.id
|
|
15731
15763
|
}) : generateUrl({ page: _chunkLBMNRFCYjs.Modules.Company, id: company.id }),
|
|
15732
15764
|
children: row.getValue("name")
|
|
@@ -15742,7 +15774,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
15742
15774
|
})
|
|
15743
15775
|
};
|
|
15744
15776
|
const columns = _react.useMemo.call(void 0, () => {
|
|
15745
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
15777
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _458 => _458[field], 'optionalCall', _459 => _459()])).filter((col) => col !== void 0);
|
|
15746
15778
|
}, [params.fields, fieldColumnMap, t, generateUrl, hasRole]);
|
|
15747
15779
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
15748
15780
|
}, "useCompanyTableStructure");
|
|
@@ -15754,7 +15786,7 @@ var GRACE_DAYS = 3;
|
|
|
15754
15786
|
var isAdministrator = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (currentUser) => {
|
|
15755
15787
|
if (!currentUser || !_chunkXTLTQQ7Xjs.isRolesConfigured.call(void 0, )) return false;
|
|
15756
15788
|
const adminRoleId = _chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator;
|
|
15757
|
-
return !!_optionalChain([currentUser, 'access',
|
|
15789
|
+
return !!_optionalChain([currentUser, 'access', _460 => _460.roles, 'optionalAccess', _461 => _461.some, 'call', _462 => _462((role) => role.id === adminRoleId)]);
|
|
15758
15790
|
}, "isAdministrator");
|
|
15759
15791
|
function useSubscriptionStatus() {
|
|
15760
15792
|
const { company, currentUser } = useCurrentUserContext();
|
|
@@ -15871,7 +15903,7 @@ var useRoleTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
|
|
|
15871
15903
|
})
|
|
15872
15904
|
};
|
|
15873
15905
|
const columns = _react.useMemo.call(void 0, () => {
|
|
15874
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
15906
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _463 => _463[field], 'optionalCall', _464 => _464()])).filter((col) => col !== void 0);
|
|
15875
15907
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
15876
15908
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
15877
15909
|
}, "useRoleTableStructure");
|
|
@@ -15972,11 +16004,11 @@ var useContentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
15972
16004
|
return params.fields.map((field) => {
|
|
15973
16005
|
const localHandler = fieldColumnMap[field];
|
|
15974
16006
|
if (localHandler) return localHandler();
|
|
15975
|
-
const customHandler = _optionalChain([params, 'access',
|
|
16007
|
+
const customHandler = _optionalChain([params, 'access', _465 => _465.context, 'optionalAccess', _466 => _466.customCells, 'optionalAccess', _467 => _467[field]]);
|
|
15976
16008
|
if (customHandler) return customHandler({ t });
|
|
15977
16009
|
return void 0;
|
|
15978
16010
|
}).filter((col) => col !== void 0);
|
|
15979
|
-
}, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access',
|
|
16011
|
+
}, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _468 => _468.context, 'optionalAccess', _469 => _469.customCells])]);
|
|
15980
16012
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
15981
16013
|
}, "useContentTableStructure");
|
|
15982
16014
|
|
|
@@ -16312,7 +16344,7 @@ function ContentTableSearch({ data }) {
|
|
|
16312
16344
|
const handleSearchIconClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
16313
16345
|
if (!isExpanded) {
|
|
16314
16346
|
setIsFocused(true);
|
|
16315
|
-
setTimeout(() => _optionalChain([inputRef, 'access',
|
|
16347
|
+
setTimeout(() => _optionalChain([inputRef, 'access', _470 => _470.current, 'optionalAccess', _471 => _471.focus, 'call', _472 => _472()]), 50);
|
|
16316
16348
|
}
|
|
16317
16349
|
}, "handleSearchIconClick");
|
|
16318
16350
|
const handleBlur = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
@@ -16392,7 +16424,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
16392
16424
|
props.defaultExpanded === true ? true : typeof props.defaultExpanded === "object" ? props.defaultExpanded : {}
|
|
16393
16425
|
);
|
|
16394
16426
|
const { data: tableData, columns: tableColumns } = useTableGenerator(props.tableGeneratorType, {
|
|
16395
|
-
data: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
16427
|
+
data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _473 => _473.data]), () => ( EMPTY_ARRAY)),
|
|
16396
16428
|
fields,
|
|
16397
16429
|
checkedIds,
|
|
16398
16430
|
toggleId,
|
|
@@ -16425,7 +16457,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
16425
16457
|
});
|
|
16426
16458
|
const rowModel = tableData ? table.getRowModel() : null;
|
|
16427
16459
|
const groupedRows = _react.useMemo.call(void 0, () => {
|
|
16428
|
-
if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess',
|
|
16460
|
+
if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess', _474 => _474.rows, 'optionalAccess', _475 => _475.length])) return null;
|
|
16429
16461
|
const groupMap = /* @__PURE__ */ new Map();
|
|
16430
16462
|
for (const row of rowModel.rows) {
|
|
16431
16463
|
const keys = getGroupKeys(row.original, props.groupBy);
|
|
@@ -16482,10 +16514,10 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
16482
16514
|
) }),
|
|
16483
16515
|
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: headerGroup.headers.map((header) => {
|
|
16484
16516
|
const meta = header.column.columnDef.meta;
|
|
16485
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess',
|
|
16517
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess', _476 => _476.className]), children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
|
|
16486
16518
|
}) }, headerGroup.id))
|
|
16487
16519
|
] }),
|
|
16488
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access',
|
|
16520
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _477 => _477.rows, 'optionalAccess', _478 => _478.length]) ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React.default.Fragment, { children: [
|
|
16489
16521
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16490
16522
|
TableCell,
|
|
16491
16523
|
{
|
|
@@ -16497,11 +16529,11 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
16497
16529
|
group.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16498
16530
|
TableRow,
|
|
16499
16531
|
{
|
|
16500
|
-
onClick: () => _optionalChain([onRowClick, 'optionalCall',
|
|
16532
|
+
onClick: () => _optionalChain([onRowClick, 'optionalCall', _479 => _479(row.original.jsonApiData)]),
|
|
16501
16533
|
className: `group ${onRowClick ? "hover:bg-muted/50 cursor-pointer" : ""}`,
|
|
16502
16534
|
children: row.getVisibleCells().map((cell) => {
|
|
16503
16535
|
const meta = cell.column.columnDef.meta;
|
|
16504
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess',
|
|
16536
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _480 => _480.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
|
|
16505
16537
|
})
|
|
16506
16538
|
},
|
|
16507
16539
|
row.id
|
|
@@ -16509,11 +16541,11 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
16509
16541
|
] }, group.groupKey)) : rowModel.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16510
16542
|
TableRow,
|
|
16511
16543
|
{
|
|
16512
|
-
onClick: () => _optionalChain([onRowClick, 'optionalCall',
|
|
16544
|
+
onClick: () => _optionalChain([onRowClick, 'optionalCall', _481 => _481(row.original.jsonApiData)]),
|
|
16513
16545
|
className: `group ${onRowClick ? "hover:bg-muted/50 cursor-pointer" : ""}`,
|
|
16514
16546
|
children: row.getVisibleCells().map((cell) => {
|
|
16515
16547
|
const meta = cell.column.columnDef.meta;
|
|
16516
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess',
|
|
16548
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _482 => _482.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
|
|
16517
16549
|
})
|
|
16518
16550
|
},
|
|
16519
16551
|
row.id
|
|
@@ -16526,7 +16558,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
16526
16558
|
size: "sm",
|
|
16527
16559
|
onClick: (e) => {
|
|
16528
16560
|
e.preventDefault();
|
|
16529
|
-
_optionalChain([data, 'access',
|
|
16561
|
+
_optionalChain([data, 'access', _483 => _483.previous, 'optionalCall', _484 => _484(true)]);
|
|
16530
16562
|
},
|
|
16531
16563
|
disabled: !data.previous,
|
|
16532
16564
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronLeft, { className: "h-4 w-4" })
|
|
@@ -16540,7 +16572,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
16540
16572
|
size: "sm",
|
|
16541
16573
|
onClick: (e) => {
|
|
16542
16574
|
e.preventDefault();
|
|
16543
|
-
_optionalChain([data, 'access',
|
|
16575
|
+
_optionalChain([data, 'access', _485 => _485.next, 'optionalCall', _486 => _486(true)]);
|
|
16544
16576
|
},
|
|
16545
16577
|
disabled: !data.next,
|
|
16546
16578
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronRight, { className: "h-4 w-4" })
|
|
@@ -16561,7 +16593,7 @@ function ContentListGrid(props) {
|
|
|
16561
16593
|
if (!data.next || !sentinelRef.current) return;
|
|
16562
16594
|
const observer = new IntersectionObserver(
|
|
16563
16595
|
(entries) => {
|
|
16564
|
-
if (_optionalChain([entries, 'access',
|
|
16596
|
+
if (_optionalChain([entries, 'access', _487 => _487[0], 'optionalAccess', _488 => _488.isIntersecting])) _optionalChain([data, 'access', _489 => _489.next, 'optionalCall', _490 => _490()]);
|
|
16565
16597
|
},
|
|
16566
16598
|
{ threshold: 0.1, rootMargin: "200px" }
|
|
16567
16599
|
);
|
|
@@ -17399,7 +17431,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
|
17399
17431
|
newDigits[index] = digit;
|
|
17400
17432
|
setDigits(newDigits);
|
|
17401
17433
|
if (digit && index < 5) {
|
|
17402
|
-
_optionalChain([inputRefs, 'access',
|
|
17434
|
+
_optionalChain([inputRefs, 'access', _491 => _491.current, 'access', _492 => _492[index + 1], 'optionalAccess', _493 => _493.focus, 'call', _494 => _494()]);
|
|
17403
17435
|
}
|
|
17404
17436
|
const code = newDigits.join("");
|
|
17405
17437
|
if (code.length === 6 && newDigits.every((d) => d !== "")) {
|
|
@@ -17408,7 +17440,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
|
17408
17440
|
}, "handleChange");
|
|
17409
17441
|
const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (index, e) => {
|
|
17410
17442
|
if (e.key === "Backspace" && !digits[index] && index > 0) {
|
|
17411
|
-
_optionalChain([inputRefs, 'access',
|
|
17443
|
+
_optionalChain([inputRefs, 'access', _495 => _495.current, 'access', _496 => _496[index - 1], 'optionalAccess', _497 => _497.focus, 'call', _498 => _498()]);
|
|
17412
17444
|
}
|
|
17413
17445
|
}, "handleKeyDown");
|
|
17414
17446
|
const handlePaste = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
|
|
@@ -17417,7 +17449,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
|
17417
17449
|
if (pastedData.length === 6) {
|
|
17418
17450
|
const newDigits = pastedData.split("");
|
|
17419
17451
|
setDigits(newDigits);
|
|
17420
|
-
_optionalChain([inputRefs, 'access',
|
|
17452
|
+
_optionalChain([inputRefs, 'access', _499 => _499.current, 'access', _500 => _500[5], 'optionalAccess', _501 => _501.focus, 'call', _502 => _502()]);
|
|
17421
17453
|
onComplete(pastedData);
|
|
17422
17454
|
}
|
|
17423
17455
|
}, "handlePaste");
|
|
@@ -17628,8 +17660,8 @@ function PasskeySetupDialog({ open, onOpenChange, onSuccess }) {
|
|
|
17628
17660
|
try {
|
|
17629
17661
|
const registrationData = await _chunkLBMNRFCYjs.TwoFactorService.getPasskeyRegistrationOptions({
|
|
17630
17662
|
id: _uuid.v4.call(void 0, ),
|
|
17631
|
-
userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess',
|
|
17632
|
-
userDisplayName: _optionalChain([currentUser, 'optionalAccess',
|
|
17663
|
+
userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _503 => _503.email]), () => ( "")),
|
|
17664
|
+
userDisplayName: _optionalChain([currentUser, 'optionalAccess', _504 => _504.name])
|
|
17633
17665
|
});
|
|
17634
17666
|
const credential = await _browser.startRegistration.call(void 0, { optionsJSON: registrationData.options });
|
|
17635
17667
|
await _chunkLBMNRFCYjs.TwoFactorService.verifyPasskeyRegistration({
|
|
@@ -17780,7 +17812,7 @@ function TotpSetupDialog({ onSuccess, trigger }) {
|
|
|
17780
17812
|
const setup = await _chunkLBMNRFCYjs.TwoFactorService.setupTotp({
|
|
17781
17813
|
id: _uuid.v4.call(void 0, ),
|
|
17782
17814
|
name: name.trim(),
|
|
17783
|
-
accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess',
|
|
17815
|
+
accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _505 => _505.email]), () => ( ""))
|
|
17784
17816
|
});
|
|
17785
17817
|
setQrCodeUri(setup.qrCodeUri);
|
|
17786
17818
|
setAuthenticatorId(setup.authenticatorId);
|
|
@@ -17914,7 +17946,7 @@ function TwoFactorSettings() {
|
|
|
17914
17946
|
if (isLoading) {
|
|
17915
17947
|
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") }) }) });
|
|
17916
17948
|
}
|
|
17917
|
-
const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
17949
|
+
const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _506 => _506.isEnabled]), () => ( false));
|
|
17918
17950
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Card, { children: [
|
|
17919
17951
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
|
|
17920
17952
|
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" }),
|
|
@@ -17952,7 +17984,7 @@ function TwoFactorSettings() {
|
|
|
17952
17984
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-medium", children: t("auth.two_factor.backup_codes") }),
|
|
17953
17985
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: t("auth.two_factor.backup_codes_description") })
|
|
17954
17986
|
] }),
|
|
17955
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
17987
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _507 => _507.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
|
|
17956
17988
|
] }) }),
|
|
17957
17989
|
!isEnabled && (authenticators.length > 0 || passkeys.length > 0) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
17958
17990
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Separator, {}),
|
|
@@ -18130,9 +18162,9 @@ function AcceptInvitation() {
|
|
|
18130
18162
|
});
|
|
18131
18163
|
const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
|
|
18132
18164
|
try {
|
|
18133
|
-
if (!_optionalChain([params, 'optionalAccess',
|
|
18165
|
+
if (!_optionalChain([params, 'optionalAccess', _508 => _508.code])) return;
|
|
18134
18166
|
const payload = {
|
|
18135
|
-
code: _optionalChain([params, 'optionalAccess',
|
|
18167
|
+
code: _optionalChain([params, 'optionalAccess', _509 => _509.code]),
|
|
18136
18168
|
password: values.password
|
|
18137
18169
|
};
|
|
18138
18170
|
await _chunkLBMNRFCYjs.AuthService.acceptInvitation(payload);
|
|
@@ -18482,7 +18514,7 @@ function Logout({ storageKeys }) {
|
|
|
18482
18514
|
const generateUrl = usePageUrlGenerator();
|
|
18483
18515
|
_react.useEffect.call(void 0, () => {
|
|
18484
18516
|
const logOut = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
18485
|
-
if (_optionalChain([storageKeys, 'optionalAccess',
|
|
18517
|
+
if (_optionalChain([storageKeys, 'optionalAccess', _510 => _510.length])) {
|
|
18486
18518
|
clearClientStorage(storageKeys);
|
|
18487
18519
|
}
|
|
18488
18520
|
await _chunkLBMNRFCYjs.AuthService.logout();
|
|
@@ -18505,14 +18537,14 @@ function RefreshUser() {
|
|
|
18505
18537
|
setUser(fullUser);
|
|
18506
18538
|
const token = {
|
|
18507
18539
|
userId: fullUser.id,
|
|
18508
|
-
companyId: _optionalChain([fullUser, 'access',
|
|
18540
|
+
companyId: _optionalChain([fullUser, 'access', _511 => _511.company, 'optionalAccess', _512 => _512.id]),
|
|
18509
18541
|
roles: fullUser.roles.map((role) => role.id),
|
|
18510
|
-
features: _nullishCoalesce(_optionalChain([fullUser, 'access',
|
|
18542
|
+
features: _nullishCoalesce(_optionalChain([fullUser, 'access', _513 => _513.company, 'optionalAccess', _514 => _514.features, 'optionalAccess', _515 => _515.map, 'call', _516 => _516((feature) => feature.id)]), () => ( [])),
|
|
18511
18543
|
modules: fullUser.modules.map((module) => {
|
|
18512
18544
|
return { id: module.id, permissions: module.permissions };
|
|
18513
18545
|
})
|
|
18514
18546
|
};
|
|
18515
|
-
await _optionalChain([_chunkLBMNRFCYjs.getTokenHandler.call(void 0, ), 'optionalAccess',
|
|
18547
|
+
await _optionalChain([_chunkLBMNRFCYjs.getTokenHandler.call(void 0, ), 'optionalAccess', _517 => _517.updateToken, 'call', _518 => _518(token)]);
|
|
18516
18548
|
_cookiesnext.deleteCookie.call(void 0, "reloadData");
|
|
18517
18549
|
}
|
|
18518
18550
|
}, "loadFullUser");
|
|
@@ -18576,9 +18608,9 @@ function ResetPassword() {
|
|
|
18576
18608
|
});
|
|
18577
18609
|
const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
|
|
18578
18610
|
try {
|
|
18579
|
-
if (!_optionalChain([params, 'optionalAccess',
|
|
18611
|
+
if (!_optionalChain([params, 'optionalAccess', _519 => _519.code])) return;
|
|
18580
18612
|
const payload = {
|
|
18581
|
-
code: _optionalChain([params, 'optionalAccess',
|
|
18613
|
+
code: _optionalChain([params, 'optionalAccess', _520 => _520.code]),
|
|
18582
18614
|
password: values.password
|
|
18583
18615
|
};
|
|
18584
18616
|
await _chunkLBMNRFCYjs.AuthService.resetPassword(payload);
|
|
@@ -18927,7 +18959,7 @@ function extractHeadings(blocks) {
|
|
|
18927
18959
|
function processBlocks(blockArray) {
|
|
18928
18960
|
for (const block of blockArray) {
|
|
18929
18961
|
if (block.type === "heading") {
|
|
18930
|
-
const level = _optionalChain([block, 'access',
|
|
18962
|
+
const level = _optionalChain([block, 'access', _521 => _521.props, 'optionalAccess', _522 => _522.level]) || 1;
|
|
18931
18963
|
const text = extractTextFromContent(block.content);
|
|
18932
18964
|
if (text.trim()) {
|
|
18933
18965
|
headings.push({
|
|
@@ -19270,7 +19302,7 @@ var useHowToTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
|
|
|
19270
19302
|
})
|
|
19271
19303
|
};
|
|
19272
19304
|
const columns = _react.useMemo.call(void 0, () => {
|
|
19273
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
19305
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _523 => _523[field], 'optionalCall', _524 => _524()])).filter((col) => col !== void 0);
|
|
19274
19306
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
19275
19307
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
19276
19308
|
}, "useHowToTableStructure");
|
|
@@ -19369,7 +19401,7 @@ function HowToSelector({
|
|
|
19369
19401
|
}, "setHowTo");
|
|
19370
19402
|
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: [
|
|
19371
19403
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
|
|
19372
|
-
/* @__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',
|
|
19404
|
+
/* @__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', _525 => _525.value, 'optionalAccess', _526 => _526.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 }) }))) }) }) }),
|
|
19373
19405
|
field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
19374
19406
|
_lucidereact.CircleX,
|
|
19375
19407
|
{
|
|
@@ -19738,9 +19770,9 @@ function CitationsTab({ citations, sources }) {
|
|
|
19738
19770
|
] }) }),
|
|
19739
19771
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: sorted.map((chunk) => {
|
|
19740
19772
|
const isOpen = expanded.has(chunk.id);
|
|
19741
|
-
const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess',
|
|
19773
|
+
const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess', _527 => _527.get, 'call', _528 => _528(chunk.nodeId)]) : void 0;
|
|
19742
19774
|
const fallbackName = chunk.nodeId ? `${_nullishCoalesce(chunk.nodeType, () => ( t("features.assistant.message.sources.source")))} ${chunk.nodeId.slice(0, 8)}` : _nullishCoalesce(chunk.nodeType, () => ( t("features.assistant.message.sources.source")));
|
|
19743
|
-
const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess',
|
|
19775
|
+
const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _529 => _529.name]), () => ( fallbackName));
|
|
19744
19776
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
|
|
19745
19777
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, TableRow, { children: [
|
|
19746
19778
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -19787,7 +19819,7 @@ function ContentsTab({ citations, sources }) {
|
|
|
19787
19819
|
for (const c of citations) {
|
|
19788
19820
|
const id = c.nodeId;
|
|
19789
19821
|
if (!id) continue;
|
|
19790
|
-
const source = _optionalChain([sources, 'optionalAccess',
|
|
19822
|
+
const source = _optionalChain([sources, 'optionalAccess', _530 => _530.get, 'call', _531 => _531(id)]);
|
|
19791
19823
|
if (!source) continue;
|
|
19792
19824
|
const existing = map.get(id);
|
|
19793
19825
|
if (existing) {
|
|
@@ -19854,7 +19886,7 @@ function UsersTab({ users, citations, sources }) {
|
|
|
19854
19886
|
const generate = usePageUrlGenerator();
|
|
19855
19887
|
const userMap = /* @__PURE__ */ new Map();
|
|
19856
19888
|
for (const u of users) {
|
|
19857
|
-
if (!_optionalChain([u, 'optionalAccess',
|
|
19889
|
+
if (!_optionalChain([u, 'optionalAccess', _532 => _532.id])) continue;
|
|
19858
19890
|
userMap.set(u.id, { user: u, contentCount: 0, citationCount: 0 });
|
|
19859
19891
|
}
|
|
19860
19892
|
if (citations && sources) {
|
|
@@ -19959,7 +19991,7 @@ function MessageSourcesPanel({ message, isLatestAssistant, onSelectFollowUp, sou
|
|
|
19959
19991
|
}
|
|
19960
19992
|
return ids.size;
|
|
19961
19993
|
}, [message.citations, sources]);
|
|
19962
|
-
const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess',
|
|
19994
|
+
const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess', _533 => _533.length]), () => ( 0));
|
|
19963
19995
|
const total = refsCount + citationsCount + contentsCount + usersCount + suggestionsCount;
|
|
19964
19996
|
const visibleTabs = [];
|
|
19965
19997
|
if (suggestionsCount > 0) visibleTabs.push("suggested");
|
|
@@ -20019,8 +20051,8 @@ var SourcesFetcher = class extends _chunkLBMNRFCYjs.ClientAbstractService {
|
|
|
20019
20051
|
const endpoint = new (0, _chunkLBMNRFCYjs.EndpointCreator)({ endpoint: params.module });
|
|
20020
20052
|
endpoint.addAdditionalParam(params.idsParam, params.ids.join(","));
|
|
20021
20053
|
endpoint.addAdditionalParam("fetchAll", "true");
|
|
20022
|
-
if (_optionalChain([params, 'access',
|
|
20023
|
-
if (_optionalChain([params, 'access',
|
|
20054
|
+
if (_optionalChain([params, 'access', _534 => _534.module, 'access', _535 => _535.inclusions, 'optionalAccess', _536 => _536.lists, 'optionalAccess', _537 => _537.fields])) endpoint.limitToFields(params.module.inclusions.lists.fields);
|
|
20055
|
+
if (_optionalChain([params, 'access', _538 => _538.module, 'access', _539 => _539.inclusions, 'optionalAccess', _540 => _540.lists, 'optionalAccess', _541 => _541.types])) endpoint.limitToType(params.module.inclusions.lists.types);
|
|
20024
20056
|
return this.callApi({
|
|
20025
20057
|
type: params.module,
|
|
20026
20058
|
method: "GET" /* GET */,
|
|
@@ -20099,7 +20131,7 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
|
|
|
20099
20131
|
return void 0;
|
|
20100
20132
|
}
|
|
20101
20133
|
})()));
|
|
20102
|
-
if (_optionalChain([author, 'optionalAccess',
|
|
20134
|
+
if (_optionalChain([author, 'optionalAccess', _542 => _542.id])) userMap.set(author.id, author);
|
|
20103
20135
|
}
|
|
20104
20136
|
return Array.from(userMap.values());
|
|
20105
20137
|
}, [resolved]);
|
|
@@ -20128,14 +20160,14 @@ function MessageItem({
|
|
|
20128
20160
|
}) {
|
|
20129
20161
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
20130
20162
|
const isUser = message.role === "user";
|
|
20131
|
-
const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess',
|
|
20163
|
+
const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess', _543 => _543.has, 'call', _544 => _544(message.id)]);
|
|
20132
20164
|
if (isUser) {
|
|
20133
20165
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-end gap-1", children: [
|
|
20134
20166
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-primary text-primary-foreground max-w-[72%] rounded-2xl rounded-br-sm px-3.5 py-2 text-sm", children: message.content }),
|
|
20135
20167
|
isFailed && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-destructive flex items-center gap-2 text-xs", children: [
|
|
20136
20168
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "h-3.5 w-3.5" }),
|
|
20137
20169
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("features.assistant.send_failed") }),
|
|
20138
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", className: "underline", onClick: () => _optionalChain([onRetry, 'optionalCall',
|
|
20170
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", className: "underline", onClick: () => _optionalChain([onRetry, 'optionalCall', _545 => _545(message.id)]), children: t("features.assistant.retry") })
|
|
20139
20171
|
] })
|
|
20140
20172
|
] });
|
|
20141
20173
|
}
|
|
@@ -20211,7 +20243,7 @@ function AssistantThread({
|
|
|
20211
20243
|
}) {
|
|
20212
20244
|
const endRef = _react.useRef.call(void 0, null);
|
|
20213
20245
|
_react.useEffect.call(void 0, () => {
|
|
20214
|
-
_optionalChain([endRef, 'access',
|
|
20246
|
+
_optionalChain([endRef, 'access', _546 => _546.current, 'optionalAccess', _547 => _547.scrollIntoView, 'call', _548 => _548({ behavior: "smooth" })]);
|
|
20215
20247
|
}, [messages.length, sending]);
|
|
20216
20248
|
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: [
|
|
20217
20249
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -20240,7 +20272,7 @@ function AssistantContainer({ renderApprovalAction } = {}) {
|
|
|
20240
20272
|
AssistantSidebar,
|
|
20241
20273
|
{
|
|
20242
20274
|
threads: ctx.threads,
|
|
20243
|
-
activeId: _optionalChain([ctx, 'access',
|
|
20275
|
+
activeId: _optionalChain([ctx, 'access', _549 => _549.assistant, 'optionalAccess', _550 => _550.id]),
|
|
20244
20276
|
onSelect: ctx.selectThread,
|
|
20245
20277
|
onNew: ctx.startNew
|
|
20246
20278
|
}
|
|
@@ -20341,14 +20373,14 @@ function NotificationsList({ archived }) {
|
|
|
20341
20373
|
] }),
|
|
20342
20374
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Skeleton, { className: "h-8 w-20" })
|
|
20343
20375
|
] }) }) }, i)) }), "LoadingSkeleton");
|
|
20344
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: data.isLoaded ? _optionalChain([data, 'access',
|
|
20376
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: data.isLoaded ? _optionalChain([data, 'access', _551 => _551.data, 'optionalAccess', _552 => _552.map, 'call', _553 => _553((notification) => {
|
|
20345
20377
|
const notificationData = generateNotificationData({ notification, generateUrl });
|
|
20346
20378
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { className: "p-0", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: `flex w-full flex-row items-center p-2`, children: [
|
|
20347
20379
|
notificationData.actor ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-12 max-w-12 px-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: generateUrl({ page: _chunkLBMNRFCYjs.Modules.User, id: notificationData.actor.id }), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user: notificationData.actor, className: "h-8 w-8" }) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-14 max-w-14 px-2" }),
|
|
20348
20380
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
20349
20381
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
|
|
20350
20382
|
strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
|
|
20351
|
-
actor: _nullishCoalesce(_optionalChain([notificationData, 'access',
|
|
20383
|
+
actor: _nullishCoalesce(_optionalChain([notificationData, 'access', _554 => _554.actor, 'optionalAccess', _555 => _555.name]), () => ( "")),
|
|
20352
20384
|
title: notificationData.title
|
|
20353
20385
|
}) }),
|
|
20354
20386
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground mt-1 w-full text-xs", children: new Date(notification.createdAt).toLocaleString() })
|
|
@@ -20694,7 +20726,7 @@ var DEFAULT_TRANSLATIONS = {
|
|
|
20694
20726
|
invalidEmail: "Please enter a valid email address"
|
|
20695
20727
|
};
|
|
20696
20728
|
async function copyToClipboard(text) {
|
|
20697
|
-
if (_optionalChain([navigator, 'access',
|
|
20729
|
+
if (_optionalChain([navigator, 'access', _556 => _556.clipboard, 'optionalAccess', _557 => _557.writeText])) {
|
|
20698
20730
|
try {
|
|
20699
20731
|
await navigator.clipboard.writeText(text);
|
|
20700
20732
|
return true;
|
|
@@ -20736,7 +20768,7 @@ function ReferralWidget({
|
|
|
20736
20768
|
const linkInputRef = _react.useRef.call(void 0, null);
|
|
20737
20769
|
const config = _chunkXTLTQQ7Xjs.getReferralConfig.call(void 0, );
|
|
20738
20770
|
const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
|
|
20739
|
-
const referralUrl = _optionalChain([stats, 'optionalAccess',
|
|
20771
|
+
const referralUrl = _optionalChain([stats, 'optionalAccess', _558 => _558.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
|
|
20740
20772
|
if (!_chunkXTLTQQ7Xjs.isReferralEnabled.call(void 0, )) {
|
|
20741
20773
|
return null;
|
|
20742
20774
|
}
|
|
@@ -20746,7 +20778,7 @@ function ReferralWidget({
|
|
|
20746
20778
|
if (success) {
|
|
20747
20779
|
setCopied(true);
|
|
20748
20780
|
_chunkLBMNRFCYjs.showToast.call(void 0, t.copiedMessage);
|
|
20749
|
-
_optionalChain([onLinkCopied, 'optionalCall',
|
|
20781
|
+
_optionalChain([onLinkCopied, 'optionalCall', _559 => _559()]);
|
|
20750
20782
|
setTimeout(() => setCopied(false), 2e3);
|
|
20751
20783
|
} else {
|
|
20752
20784
|
_chunkLBMNRFCYjs.showError.call(void 0, t.copyError);
|
|
@@ -20760,12 +20792,12 @@ function ReferralWidget({
|
|
|
20760
20792
|
try {
|
|
20761
20793
|
await sendInvite(email);
|
|
20762
20794
|
_chunkLBMNRFCYjs.showToast.call(void 0, t.inviteSent);
|
|
20763
|
-
_optionalChain([onInviteSent, 'optionalCall',
|
|
20795
|
+
_optionalChain([onInviteSent, 'optionalCall', _560 => _560(email)]);
|
|
20764
20796
|
setEmail("");
|
|
20765
20797
|
} catch (err) {
|
|
20766
20798
|
const error2 = err instanceof Error ? err : new Error(t.inviteError);
|
|
20767
20799
|
_chunkLBMNRFCYjs.showError.call(void 0, error2.message);
|
|
20768
|
-
_optionalChain([onInviteError, 'optionalCall',
|
|
20800
|
+
_optionalChain([onInviteError, 'optionalCall', _561 => _561(error2)]);
|
|
20769
20801
|
}
|
|
20770
20802
|
}, [email, sendInvite, t.inviteSent, t.inviteError, t.invalidEmail, onInviteSent, onInviteError]);
|
|
20771
20803
|
const handleEmailKeyDown = _react.useCallback.call(void 0,
|
|
@@ -21519,7 +21551,7 @@ function OAuthClientList({
|
|
|
21519
21551
|
OAuthClientCard,
|
|
21520
21552
|
{
|
|
21521
21553
|
client,
|
|
21522
|
-
onClick: () => _optionalChain([onClientClick, 'optionalCall',
|
|
21554
|
+
onClick: () => _optionalChain([onClientClick, 'optionalCall', _562 => _562(client)]),
|
|
21523
21555
|
onEdit: onEditClick ? () => onEditClick(client) : void 0,
|
|
21524
21556
|
onDelete: onDeleteClick ? () => onDeleteClick(client) : void 0
|
|
21525
21557
|
},
|
|
@@ -21535,11 +21567,11 @@ _chunk7QVYU63Ejs.__name.call(void 0, OAuthClientList, "OAuthClientList");
|
|
|
21535
21567
|
function OAuthClientForm({ client, onSubmit, onCancel, isLoading = false }) {
|
|
21536
21568
|
const isEditMode = !!client;
|
|
21537
21569
|
const [formState, setFormState] = _react.useState.call(void 0, {
|
|
21538
|
-
name: _optionalChain([client, 'optionalAccess',
|
|
21539
|
-
description: _optionalChain([client, 'optionalAccess',
|
|
21540
|
-
redirectUris: _optionalChain([client, 'optionalAccess',
|
|
21541
|
-
allowedScopes: _optionalChain([client, 'optionalAccess',
|
|
21542
|
-
isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess',
|
|
21570
|
+
name: _optionalChain([client, 'optionalAccess', _563 => _563.name]) || "",
|
|
21571
|
+
description: _optionalChain([client, 'optionalAccess', _564 => _564.description]) || "",
|
|
21572
|
+
redirectUris: _optionalChain([client, 'optionalAccess', _565 => _565.redirectUris, 'optionalAccess', _566 => _566.length]) ? client.redirectUris : [""],
|
|
21573
|
+
allowedScopes: _optionalChain([client, 'optionalAccess', _567 => _567.allowedScopes]) || [],
|
|
21574
|
+
isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _568 => _568.isConfidential]), () => ( true))
|
|
21543
21575
|
});
|
|
21544
21576
|
const [errors, setErrors] = _react.useState.call(void 0, {});
|
|
21545
21577
|
const validate = _react.useCallback.call(void 0, () => {
|
|
@@ -21767,7 +21799,7 @@ function OAuthClientDetail({
|
|
|
21767
21799
|
] }),
|
|
21768
21800
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
|
|
21769
21801
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { children: "Allowed Scopes" }),
|
|
21770
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-wrap gap-2", children: client.allowedScopes.map((scope) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "secondary", children: _optionalChain([_chunkLBMNRFCYjs.OAUTH_SCOPE_DISPLAY, 'access',
|
|
21802
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-wrap gap-2", children: client.allowedScopes.map((scope) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "secondary", children: _optionalChain([_chunkLBMNRFCYjs.OAUTH_SCOPE_DISPLAY, 'access', _569 => _569[scope], 'optionalAccess', _570 => _570.name]) || scope }, scope)) })
|
|
21771
21803
|
] }),
|
|
21772
21804
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
|
|
21773
21805
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { children: "Grant Types" }),
|
|
@@ -21911,7 +21943,7 @@ function OAuthConsentScreen({
|
|
|
21911
21943
|
if (error || !clientInfo) {
|
|
21912
21944
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-h-screen 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: [
|
|
21913
21945
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertTriangle, { className: "h-4 w-4" }),
|
|
21914
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess',
|
|
21946
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _571 => _571.message]) || "Invalid authorization request. Please try again." })
|
|
21915
21947
|
] }) }) }) });
|
|
21916
21948
|
}
|
|
21917
21949
|
const { client, scopes } = clientInfo;
|
|
@@ -22127,7 +22159,7 @@ function WaitlistForm({ onSuccess }) {
|
|
|
22127
22159
|
questionnaire: values.questionnaire
|
|
22128
22160
|
});
|
|
22129
22161
|
setIsSuccess(true);
|
|
22130
|
-
_optionalChain([onSuccess, 'optionalCall',
|
|
22162
|
+
_optionalChain([onSuccess, 'optionalCall', _572 => _572()]);
|
|
22131
22163
|
} catch (e) {
|
|
22132
22164
|
errorToast({ error: e });
|
|
22133
22165
|
} finally {
|
|
@@ -22765,7 +22797,7 @@ var ModuleEditor = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs.__n
|
|
|
22765
22797
|
] }),
|
|
22766
22798
|
roleIds.map((roleId) => {
|
|
22767
22799
|
const roleTokens = block[roleId];
|
|
22768
|
-
const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess',
|
|
22800
|
+
const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _573 => _573[roleId]]), () => ( roleId));
|
|
22769
22801
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
|
|
22770
22802
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: roleLabel }),
|
|
22771
22803
|
_chunkXTLTQQ7Xjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -22802,7 +22834,7 @@ function RbacContainer() {
|
|
|
22802
22834
|
}, []);
|
|
22803
22835
|
const sortedModuleIds = _react.useMemo.call(void 0, () => {
|
|
22804
22836
|
if (!matrix) return [];
|
|
22805
|
-
return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
22837
|
+
return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _574 => _574[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _575 => _575[b]]), () => ( b))));
|
|
22806
22838
|
}, [matrix, moduleNames]);
|
|
22807
22839
|
const roleIds = _react.useMemo.call(void 0, () => {
|
|
22808
22840
|
if (roleNames) {
|
|
@@ -22865,7 +22897,7 @@ function RbacContainer() {
|
|
|
22865
22897
|
id === selectedModuleId && "bg-muted font-medium text-foreground",
|
|
22866
22898
|
id !== selectedModuleId && "text-muted-foreground"
|
|
22867
22899
|
),
|
|
22868
|
-
children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
22900
|
+
children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _576 => _576[id]]), () => ( id))
|
|
22869
22901
|
}
|
|
22870
22902
|
) }, id)) }) }),
|
|
22871
22903
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "section", { className: "flex-1 overflow-y-auto p-4", children: selectedModuleId && selectedBlock ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -22873,7 +22905,7 @@ function RbacContainer() {
|
|
|
22873
22905
|
{
|
|
22874
22906
|
moduleId: selectedModuleId,
|
|
22875
22907
|
block: selectedBlock,
|
|
22876
|
-
moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
22908
|
+
moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _577 => _577[selectedModuleId]]), () => ( selectedModuleId)),
|
|
22877
22909
|
roleIds,
|
|
22878
22910
|
roleNames,
|
|
22879
22911
|
onOpenPicker: openPicker
|
|
@@ -22884,12 +22916,12 @@ function RbacContainer() {
|
|
|
22884
22916
|
RbacPermissionPicker,
|
|
22885
22917
|
{
|
|
22886
22918
|
open: !!activePicker,
|
|
22887
|
-
anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess',
|
|
22919
|
+
anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _578 => _578.anchor]), () => ( null)),
|
|
22888
22920
|
value: activeValue,
|
|
22889
|
-
isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess',
|
|
22921
|
+
isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _579 => _579.isRoleColumn]), () => ( false)),
|
|
22890
22922
|
knownSegments: activeSegments,
|
|
22891
22923
|
onSetValue: handleSetValue,
|
|
22892
|
-
onClear: _optionalChain([activePicker, 'optionalAccess',
|
|
22924
|
+
onClear: _optionalChain([activePicker, 'optionalAccess', _580 => _580.isRoleColumn]) ? handleClear : void 0,
|
|
22893
22925
|
onClose: closePicker
|
|
22894
22926
|
}
|
|
22895
22927
|
)
|
|
@@ -22956,7 +22988,7 @@ function RbacByRoleContainer() {
|
|
|
22956
22988
|
}, [roleNames]);
|
|
22957
22989
|
const sortedModuleIds = _react.useMemo.call(void 0, () => {
|
|
22958
22990
|
if (!matrix) return [];
|
|
22959
|
-
return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
22991
|
+
return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _581 => _581[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _582 => _582[b]]), () => ( b))));
|
|
22960
22992
|
}, [matrix, moduleNames]);
|
|
22961
22993
|
_react.useEffect.call(void 0, () => {
|
|
22962
22994
|
if (!selectedRoleId && sortedRoleIds.length > 0) {
|
|
@@ -23005,7 +23037,7 @@ function RbacByRoleContainer() {
|
|
|
23005
23037
|
id === selectedRoleId && "bg-muted font-medium text-foreground",
|
|
23006
23038
|
id !== selectedRoleId && "text-muted-foreground"
|
|
23007
23039
|
),
|
|
23008
|
-
children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess',
|
|
23040
|
+
children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _583 => _583[id]]), () => ( id))
|
|
23009
23041
|
}
|
|
23010
23042
|
) }, id)) }) }),
|
|
23011
23043
|
/* @__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: [
|
|
@@ -23025,7 +23057,7 @@ function RbacByRoleContainer() {
|
|
|
23025
23057
|
if (!block) return null;
|
|
23026
23058
|
const defaultTokens = _nullishCoalesce(block.default, () => ( []));
|
|
23027
23059
|
const roleTokens = block[selectedRoleId];
|
|
23028
|
-
const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
23060
|
+
const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _584 => _584[moduleId]]), () => ( moduleId));
|
|
23029
23061
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
|
|
23030
23062
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { className: "border-b bg-muted/40", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
23031
23063
|
"td",
|
|
@@ -23040,7 +23072,7 @@ function RbacByRoleContainer() {
|
|
|
23040
23072
|
_chunkXTLTQQ7Xjs.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))
|
|
23041
23073
|
] }),
|
|
23042
23074
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
|
|
23043
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess',
|
|
23075
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _585 => _585[selectedRoleId]]), () => ( selectedRoleId)) }),
|
|
23044
23076
|
_chunkXTLTQQ7Xjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
23045
23077
|
CellButton3,
|
|
23046
23078
|
{
|
|
@@ -23061,12 +23093,12 @@ function RbacByRoleContainer() {
|
|
|
23061
23093
|
RbacPermissionPicker,
|
|
23062
23094
|
{
|
|
23063
23095
|
open: !!activePicker,
|
|
23064
|
-
anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess',
|
|
23096
|
+
anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _586 => _586.anchor]), () => ( null)),
|
|
23065
23097
|
value: activeValue,
|
|
23066
|
-
isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess',
|
|
23098
|
+
isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _587 => _587.isRoleColumn]), () => ( false)),
|
|
23067
23099
|
knownSegments: activeSegments,
|
|
23068
23100
|
onSetValue: handleSetValue,
|
|
23069
|
-
onClear: _optionalChain([activePicker, 'optionalAccess',
|
|
23101
|
+
onClear: _optionalChain([activePicker, 'optionalAccess', _588 => _588.isRoleColumn]) ? handleClear : void 0,
|
|
23070
23102
|
onClose: closePicker
|
|
23071
23103
|
}
|
|
23072
23104
|
)
|
|
@@ -23614,4 +23646,4 @@ _chunk7QVYU63Ejs.__name.call(void 0, RbacByRoleContainer, "RbacByRoleContainer")
|
|
|
23614
23646
|
|
|
23615
23647
|
|
|
23616
23648
|
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.SocketContext = SocketContext; exports.SocketProvider = SocketProvider; exports.useSocketContext = useSocketContext; exports.CurrentUserProvider = CurrentUserProvider; exports.useCurrentUserContext = useCurrentUserContext; 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.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.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.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.Input = Input; 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.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.Label = Label; 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.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.errorToast = errorToast; exports.EditableAvatar = EditableAvatar; exports.TableCellAvatar = TableCellAvatar; exports.HeaderChildrenProvider = HeaderChildrenProvider; exports.useHeaderChildren = useHeaderChildren; exports.HeaderLeftContentProvider = HeaderLeftContentProvider; exports.useHeaderLeftContent = useHeaderLeftContent; exports.BreadcrumbNavigation = BreadcrumbNavigation; exports.ContentTitle = ContentTitle; exports.SharedProvider = SharedProvider; exports.useSharedContext = useSharedContext; exports.Header = Header; exports.ModeToggleSwitch = ModeToggleSwitch; exports.PageSection = PageSection; exports.recentPagesAtom = recentPagesAtom; exports.RecentPagesNavigator = RecentPagesNavigator; exports.PageContainer = PageContainer; exports.partitionTabs = partitionTabs; exports.ReactMarkdownContainer = ReactMarkdownContainer; exports.RoundPageContainerTitle = RoundPageContainerTitle; exports.RoundPageContainer = RoundPageContainer; exports.TabsContainer = TabsContainer; exports.AttributeElement = AttributeElement; exports.AllUsersListContainer = AllUsersListContainer; 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.BlockNoteEditorMentionHoverCard = BlockNoteEditorMentionHoverCard; exports.mentionDataAttrs = mentionDataAttrs; exports.parseMentionElement = parseMentionElement; exports.createMentionInlineContentSpec = createMentionInlineContentSpec; exports.useMentionInsert = useMentionInsert; exports.BlockNoteEditorMentionSuggestionMenu = BlockNoteEditorMentionSuggestionMenu; exports.BlockNoteEditorContainer = BlockNoteEditorContainer; exports.BlockNoteViewerContainer = BlockNoteViewerContainer; exports.SectionHeader = SectionHeader; exports.MicroLabel = MicroLabel; exports.DetailField = DetailField; exports.FormFeatures = FormFeatures; exports.CommonAssociationTrigger = CommonAssociationTrigger; exports.CommonAssociationCommandDialog = CommonAssociationCommandDialog; exports.triggerAssociationToast = triggerAssociationToast; 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.DateRangeSelector = DateRangeSelector; 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.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.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.CompanyContent = CompanyContent; exports.TokenStatusIndicator = TokenStatusIndicator; exports.CompanyDetails = CompanyDetails; exports.AdminCompanyContainer = AdminCompanyContainer; exports.CompanyContainer = CompanyContainer; exports.CompanyConfigurationEditor = CompanyConfigurationEditor; exports.CompanyDeleter = CompanyDeleter; exports.CompanyEditor = CompanyEditor; exports.CompaniesList = CompaniesList; exports.ContentsList = ContentsList; exports.ContentsListById = ContentsListById; exports.RelevantContentsList = RelevantContentsList; 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.HowToList = HowToList; exports.HowToListContainer = HowToListContainer; exports.HowToSelector = HowToSelector; exports.AssistantProvider = AssistantProvider; exports.useAssistantContext = useAssistantContext; exports.AssistantComposer = AssistantComposer; exports.AssistantEmptyState = AssistantEmptyState; exports.MessageSourcesPanel = MessageSourcesPanel; exports.MessageItem = MessageItem; exports.MessageList = MessageList; exports.AssistantThread = AssistantThread; exports.AssistantContainer = AssistantContainer; exports.NotificationErrorBoundary = NotificationErrorBoundary; exports.generateNotificationData = generateNotificationData; exports.NotificationToast = NotificationToast; exports.NotificationMenuItem = NotificationMenuItem; exports.NotificationContextProvider = NotificationContextProvider; exports.useNotificationContext = useNotificationContext; exports.NotificationsList = NotificationsList; exports.NotificationsListContainer = NotificationsListContainer; exports.NotificationModal = NotificationModal; exports.PushNotificationProvider = PushNotificationProvider; exports.OnboardingCard = OnboardingCard; exports.ReferralCodeCapture = ReferralCodeCapture; exports.ReferralWidget = ReferralWidget; exports.ReferralDialog = ReferralDialog; 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.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.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.OnboardingProvider = OnboardingProvider; exports.useOnboarding = useOnboarding; exports.CommonProvider = CommonProvider; exports.useCommonContext = useCommonContext; exports.useNotificationSync = useNotificationSync; exports.usePageTracker = usePageTracker; exports.useSocket = useSocket; exports.useSubscriptionStatus = useSubscriptionStatus; exports.useContentTableStructure = useContentTableStructure; exports.useOAuthClients = useOAuthClients; exports.useOAuthClient = useOAuthClient;
|
|
23617
|
-
//# sourceMappingURL=chunk-
|
|
23649
|
+
//# sourceMappingURL=chunk-T7F2EVPR.js.map
|