@carlonicora/nextjs-jsonapi 1.124.3 → 1.125.0
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-BEZWZXUH.js → BlockNoteEditor-EFAIYNH2.js} +9 -9
- package/dist/{BlockNoteEditor-BEZWZXUH.js.map → BlockNoteEditor-EFAIYNH2.js.map} +1 -1
- package/dist/{BlockNoteEditor-4HYQUEYC.mjs → BlockNoteEditor-YEEQH7UB.mjs} +2 -2
- package/dist/billing/index.js +299 -299
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-QWZI4N7S.js → chunk-JBWBIMZF.js} +864 -754
- package/dist/chunk-JBWBIMZF.js.map +1 -0
- package/dist/{chunk-5FQJB5QR.mjs → chunk-LRLVHDFA.mjs} +2763 -2653
- package/dist/chunk-LRLVHDFA.mjs.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.d.mts +51 -2
- package/dist/components/index.d.ts +51 -2
- package/dist/components/index.js +12 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +11 -1
- package/dist/contexts/index.d.mts +1 -1
- package/dist/contexts/index.d.ts +1 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/features/help/index.js +30 -30
- package/dist/features/help/index.mjs +1 -1
- package/package.json +1 -1
- package/src/components/EditableAvatar.tsx +11 -6
- package/src/components/containers/RoundPageContainer.tsx +20 -12
- package/src/components/forms/CommonDeleter.tsx +7 -2
- package/src/components/hero/EntityHero.tsx +19 -0
- package/src/components/hero/EntityHeroAvatar.tsx +63 -0
- package/src/components/hero/EntityHeroLayout.tsx +13 -0
- package/src/components/hero/EntityHeroMetaRow.tsx +19 -0
- package/src/components/hero/EntitySection.tsx +33 -0
- package/src/components/hero/index.ts +5 -0
- package/src/components/index.ts +1 -0
- package/src/features/user/components/details/UserContent.tsx +3 -1
- package/dist/chunk-5FQJB5QR.mjs.map +0 -1
- package/dist/chunk-QWZI4N7S.js.map +0 -1
- /package/dist/{BlockNoteEditor-4HYQUEYC.mjs.map → BlockNoteEditor-YEEQH7UB.mjs.map} +0 -0
|
@@ -6174,10 +6174,202 @@ function EntityAvatar({
|
|
|
6174
6174
|
}
|
|
6175
6175
|
_chunk7QVYU63Ejs.__name.call(void 0, EntityAvatar, "EntityAvatar");
|
|
6176
6176
|
|
|
6177
|
-
// src/
|
|
6177
|
+
// src/components/errors/errorToast.ts
|
|
6178
|
+
function errorToast(params) {
|
|
6179
|
+
_chunkPQBKPWBYjs.showError.call(void 0, _nullishCoalesce(_optionalChain([params, 'optionalAccess', _117 => _117.title]), () => ( "Error")), {
|
|
6180
|
+
description: params.error instanceof Error ? params.error.message : String(params.error)
|
|
6181
|
+
});
|
|
6182
|
+
}
|
|
6183
|
+
_chunk7QVYU63Ejs.__name.call(void 0, errorToast, "errorToast");
|
|
6184
|
+
|
|
6185
|
+
// src/components/EditableAvatar.tsx
|
|
6186
|
+
|
|
6178
6187
|
var _nextintl = require('next-intl');
|
|
6179
6188
|
|
|
6180
6189
|
|
|
6190
|
+
function EditableAvatar({
|
|
6191
|
+
entityId,
|
|
6192
|
+
module,
|
|
6193
|
+
image,
|
|
6194
|
+
fallback,
|
|
6195
|
+
alt,
|
|
6196
|
+
patchImage,
|
|
6197
|
+
className,
|
|
6198
|
+
fallbackClassName,
|
|
6199
|
+
companyId
|
|
6200
|
+
}) {
|
|
6201
|
+
const t = _nextintl.useTranslations.call(void 0, );
|
|
6202
|
+
const fileInputRef = _react.useRef.call(void 0, null);
|
|
6203
|
+
const [optimisticImage, setOptimisticImage] = _react.useState.call(void 0, null);
|
|
6204
|
+
const [isUploading, setIsUploading] = _react.useState.call(void 0, false);
|
|
6205
|
+
const displayImage = _nullishCoalesce(optimisticImage, () => ( image));
|
|
6206
|
+
const generateS3Key = _react.useCallback.call(void 0,
|
|
6207
|
+
(file) => {
|
|
6208
|
+
const ext = _nullishCoalesce(file.type.split("/").pop(), () => ( ""));
|
|
6209
|
+
const ts = (/* @__PURE__ */ new Date()).toISOString().replace(/[-:T]/g, "").split(".")[0];
|
|
6210
|
+
return `companies/${companyId}/${module.name}/${entityId}/${entityId}.${ts}.${ext}`;
|
|
6211
|
+
},
|
|
6212
|
+
[companyId, module.name, entityId]
|
|
6213
|
+
);
|
|
6214
|
+
const handleFile = _react.useCallback.call(void 0,
|
|
6215
|
+
async (file) => {
|
|
6216
|
+
if (isUploading) return;
|
|
6217
|
+
if (!companyId) return;
|
|
6218
|
+
const previousImage = image;
|
|
6219
|
+
const previewUrl = URL.createObjectURL(file);
|
|
6220
|
+
setOptimisticImage(previewUrl);
|
|
6221
|
+
setIsUploading(true);
|
|
6222
|
+
try {
|
|
6223
|
+
const s3Key = generateS3Key(file);
|
|
6224
|
+
const s3 = await _chunkPQBKPWBYjs.S3Service.getPreSignedUrl({
|
|
6225
|
+
key: s3Key,
|
|
6226
|
+
contentType: file.type,
|
|
6227
|
+
isPublic: true
|
|
6228
|
+
});
|
|
6229
|
+
const uploadResponse = await fetch(s3.url, {
|
|
6230
|
+
method: "PUT",
|
|
6231
|
+
headers: s3.headers,
|
|
6232
|
+
body: file
|
|
6233
|
+
});
|
|
6234
|
+
if (!uploadResponse.ok) {
|
|
6235
|
+
throw new Error(`S3 upload failed: ${uploadResponse.status}`);
|
|
6236
|
+
}
|
|
6237
|
+
await patchImage(s3Key);
|
|
6238
|
+
setOptimisticImage(null);
|
|
6239
|
+
} catch (error) {
|
|
6240
|
+
setOptimisticImage(_nullishCoalesce(previousImage, () => ( null)));
|
|
6241
|
+
errorToast({ title: t("generic.errors.update"), error });
|
|
6242
|
+
} finally {
|
|
6243
|
+
URL.revokeObjectURL(previewUrl);
|
|
6244
|
+
setIsUploading(false);
|
|
6245
|
+
}
|
|
6246
|
+
},
|
|
6247
|
+
[companyId, generateS3Key, image, isUploading, patchImage, t]
|
|
6248
|
+
);
|
|
6249
|
+
const handleRemove = _react.useCallback.call(void 0, async () => {
|
|
6250
|
+
if (isUploading) return;
|
|
6251
|
+
const previousImage = image;
|
|
6252
|
+
setOptimisticImage("");
|
|
6253
|
+
setIsUploading(true);
|
|
6254
|
+
try {
|
|
6255
|
+
await patchImage("");
|
|
6256
|
+
setOptimisticImage(null);
|
|
6257
|
+
} catch (error) {
|
|
6258
|
+
setOptimisticImage(_nullishCoalesce(previousImage, () => ( null)));
|
|
6259
|
+
errorToast({ title: t("generic.errors.update"), error });
|
|
6260
|
+
} finally {
|
|
6261
|
+
setIsUploading(false);
|
|
6262
|
+
}
|
|
6263
|
+
}, [image, isUploading, patchImage, t]);
|
|
6264
|
+
const handleFileInputChange = _react.useCallback.call(void 0,
|
|
6265
|
+
(e) => {
|
|
6266
|
+
const file = _optionalChain([e, 'access', _118 => _118.target, 'access', _119 => _119.files, 'optionalAccess', _120 => _120[0]]);
|
|
6267
|
+
if (file) handleFile(file);
|
|
6268
|
+
e.target.value = "";
|
|
6269
|
+
},
|
|
6270
|
+
[handleFile]
|
|
6271
|
+
);
|
|
6272
|
+
const handleDrop = _react.useCallback.call(void 0,
|
|
6273
|
+
(e) => {
|
|
6274
|
+
e.preventDefault();
|
|
6275
|
+
const file = _optionalChain([e, 'access', _121 => _121.dataTransfer, 'access', _122 => _122.files, 'optionalAccess', _123 => _123[0]]);
|
|
6276
|
+
if (file && file.type.startsWith("image/")) {
|
|
6277
|
+
handleFile(file);
|
|
6278
|
+
}
|
|
6279
|
+
},
|
|
6280
|
+
[handleFile]
|
|
6281
|
+
);
|
|
6282
|
+
const handleDragOver = _react.useCallback.call(void 0, (e) => {
|
|
6283
|
+
e.preventDefault();
|
|
6284
|
+
}, []);
|
|
6285
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunkPQBKPWBYjs.cn.call(void 0, "group relative", className), onDrop: handleDrop, onDragOver: handleDragOver, children: [
|
|
6286
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Avatar, { className: "h-full w-full", children: [
|
|
6287
|
+
displayImage ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: displayImage, alt }) : null,
|
|
6288
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { className: fallbackClassName, children: fallback })
|
|
6289
|
+
] }),
|
|
6290
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
6291
|
+
"div",
|
|
6292
|
+
{
|
|
6293
|
+
className: _chunkPQBKPWBYjs.cn.call(void 0,
|
|
6294
|
+
"absolute inset-0 flex items-center justify-center gap-x-2 rounded-full bg-black/50 opacity-0 transition-opacity group-hover:opacity-100",
|
|
6295
|
+
isUploading && "opacity-100"
|
|
6296
|
+
),
|
|
6297
|
+
children: [
|
|
6298
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6299
|
+
"button",
|
|
6300
|
+
{
|
|
6301
|
+
type: "button",
|
|
6302
|
+
onClick: () => _optionalChain([fileInputRef, 'access', _124 => _124.current, 'optionalAccess', _125 => _125.click, 'call', _126 => _126()]),
|
|
6303
|
+
disabled: isUploading,
|
|
6304
|
+
className: "rounded-full p-2 text-white hover:bg-white/20 disabled:opacity-50",
|
|
6305
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.PencilIcon, { className: "h-4 w-4" })
|
|
6306
|
+
}
|
|
6307
|
+
),
|
|
6308
|
+
displayImage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6309
|
+
"button",
|
|
6310
|
+
{
|
|
6311
|
+
type: "button",
|
|
6312
|
+
onClick: handleRemove,
|
|
6313
|
+
disabled: isUploading,
|
|
6314
|
+
className: "rounded-full p-2 text-white hover:bg-white/20 disabled:opacity-50",
|
|
6315
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Trash2Icon, { className: "h-4 w-4" })
|
|
6316
|
+
}
|
|
6317
|
+
)
|
|
6318
|
+
]
|
|
6319
|
+
}
|
|
6320
|
+
),
|
|
6321
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "input", { ref: fileInputRef, type: "file", accept: "image/*", className: "hidden", onChange: handleFileInputChange })
|
|
6322
|
+
] });
|
|
6323
|
+
}
|
|
6324
|
+
_chunk7QVYU63Ejs.__name.call(void 0, EditableAvatar, "EditableAvatar");
|
|
6325
|
+
|
|
6326
|
+
// src/components/TableCellAvatar.tsx
|
|
6327
|
+
|
|
6328
|
+
function TableCellAvatar({ image, name, className }) {
|
|
6329
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Avatar, { className: _chunkPQBKPWBYjs.cn.call(void 0, "mr-2 h-10 w-10 shrink-0", className), children: [
|
|
6330
|
+
image ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: image, alt: name }) : null,
|
|
6331
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { className: "text-xs", children: _chunkPQBKPWBYjs.getInitials.call(void 0, name) })
|
|
6332
|
+
] });
|
|
6333
|
+
}
|
|
6334
|
+
_chunk7QVYU63Ejs.__name.call(void 0, TableCellAvatar, "TableCellAvatar");
|
|
6335
|
+
|
|
6336
|
+
// src/contexts/HeaderChildrenContext.tsx
|
|
6337
|
+
|
|
6338
|
+
|
|
6339
|
+
var HeaderChildrenContext = _react.createContext.call(void 0, {
|
|
6340
|
+
headerChildren: null
|
|
6341
|
+
});
|
|
6342
|
+
function HeaderChildrenProvider({ children, content }) {
|
|
6343
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HeaderChildrenContext.Provider, { value: { headerChildren: content }, children });
|
|
6344
|
+
}
|
|
6345
|
+
_chunk7QVYU63Ejs.__name.call(void 0, HeaderChildrenProvider, "HeaderChildrenProvider");
|
|
6346
|
+
function useHeaderChildren() {
|
|
6347
|
+
const context = _react.useContext.call(void 0, HeaderChildrenContext);
|
|
6348
|
+
return context.headerChildren;
|
|
6349
|
+
}
|
|
6350
|
+
_chunk7QVYU63Ejs.__name.call(void 0, useHeaderChildren, "useHeaderChildren");
|
|
6351
|
+
|
|
6352
|
+
// src/contexts/HeaderLeftContentContext.tsx
|
|
6353
|
+
|
|
6354
|
+
|
|
6355
|
+
var HeaderLeftContentContext = _react.createContext.call(void 0, {
|
|
6356
|
+
headerLeftContent: null
|
|
6357
|
+
});
|
|
6358
|
+
function HeaderLeftContentProvider({ children, content }) {
|
|
6359
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HeaderLeftContentContext.Provider, { value: { headerLeftContent: content }, children });
|
|
6360
|
+
}
|
|
6361
|
+
_chunk7QVYU63Ejs.__name.call(void 0, HeaderLeftContentProvider, "HeaderLeftContentProvider");
|
|
6362
|
+
function useHeaderLeftContent() {
|
|
6363
|
+
const context = _react.useContext.call(void 0, HeaderLeftContentContext);
|
|
6364
|
+
return context.headerLeftContent;
|
|
6365
|
+
}
|
|
6366
|
+
_chunk7QVYU63Ejs.__name.call(void 0, useHeaderLeftContent, "useHeaderLeftContent");
|
|
6367
|
+
|
|
6368
|
+
// src/components/navigations/Breadcrumb.tsx
|
|
6369
|
+
|
|
6370
|
+
|
|
6371
|
+
|
|
6372
|
+
|
|
6181
6373
|
// src/hooks/TableGeneratorRegistry.ts
|
|
6182
6374
|
var TableGeneratorRegistry = (_class = class _TableGeneratorRegistry {
|
|
6183
6375
|
static {
|
|
@@ -6353,19 +6545,19 @@ function useDataListRetriever(params) {
|
|
|
6353
6545
|
const fetchData = _react.useCallback.call(void 0,
|
|
6354
6546
|
async (fetchParams) => {
|
|
6355
6547
|
if (ready === false) return;
|
|
6356
|
-
if ((_optionalChain([fetchParams, 'optionalAccess',
|
|
6548
|
+
if ((_optionalChain([fetchParams, 'optionalAccess', _127 => _127.callNext]) || _optionalChain([fetchParams, 'optionalAccess', _128 => _128.callPrevious])) && isPaginatingRef.current) {
|
|
6357
6549
|
return;
|
|
6358
6550
|
}
|
|
6359
|
-
if (isFetchingRef.current && !_optionalChain([fetchParams, 'optionalAccess',
|
|
6360
|
-
if (_optionalChain([fetchParams, 'optionalAccess',
|
|
6551
|
+
if (isFetchingRef.current && !_optionalChain([fetchParams, 'optionalAccess', _129 => _129.callNext]) && !_optionalChain([fetchParams, 'optionalAccess', _130 => _130.callPrevious])) return;
|
|
6552
|
+
if (_optionalChain([fetchParams, 'optionalAccess', _131 => _131.callNext]) || _optionalChain([fetchParams, 'optionalAccess', _132 => _132.callPrevious])) {
|
|
6361
6553
|
isPaginatingRef.current = true;
|
|
6362
6554
|
}
|
|
6363
6555
|
const thisRequestId = ++requestIdRef.current;
|
|
6364
6556
|
isFetchingRef.current = true;
|
|
6365
|
-
if (stableParams.requiresSearch === true && _optionalChain([fetchParams, 'optionalAccess',
|
|
6557
|
+
if (stableParams.requiresSearch === true && _optionalChain([fetchParams, 'optionalAccess', _133 => _133.isRefine]) !== true && _optionalChain([fetchParams, 'optionalAccess', _134 => _134.isRefresh]) !== true) {
|
|
6366
6558
|
return;
|
|
6367
6559
|
}
|
|
6368
|
-
if (!nextPage && !previousPage && isLoaded && _optionalChain([fetchParams, 'optionalAccess',
|
|
6560
|
+
if (!nextPage && !previousPage && isLoaded && _optionalChain([fetchParams, 'optionalAccess', _135 => _135.callNext]) !== true && _optionalChain([fetchParams, 'optionalAccess', _136 => _136.callPrevious]) !== true && params.search === searchTermRef.current) {
|
|
6369
6561
|
return;
|
|
6370
6562
|
}
|
|
6371
6563
|
const currentSearchTerm = searchTermRef.current;
|
|
@@ -6376,7 +6568,7 @@ function useDataListRetriever(params) {
|
|
|
6376
6568
|
const previousRef = { previous: void 0 };
|
|
6377
6569
|
const selfRef = { self: void 0 };
|
|
6378
6570
|
const totalRef = { total: void 0 };
|
|
6379
|
-
if (nextPage && _optionalChain([fetchParams, 'optionalAccess',
|
|
6571
|
+
if (nextPage && _optionalChain([fetchParams, 'optionalAccess', _137 => _137.callNext]) && _optionalChain([fetchParams, 'optionalAccess', _138 => _138.isRefine]) !== true) {
|
|
6380
6572
|
const ServiceClass = stableParams.service;
|
|
6381
6573
|
response = await ServiceClass.next({
|
|
6382
6574
|
type: stableParams.type,
|
|
@@ -6386,7 +6578,7 @@ function useDataListRetriever(params) {
|
|
|
6386
6578
|
self: selfRef,
|
|
6387
6579
|
total: totalRef
|
|
6388
6580
|
});
|
|
6389
|
-
} else if (previousPage && _optionalChain([fetchParams, 'optionalAccess',
|
|
6581
|
+
} else if (previousPage && _optionalChain([fetchParams, 'optionalAccess', _139 => _139.callPrevious]) && _optionalChain([fetchParams, 'optionalAccess', _140 => _140.isRefine]) !== true) {
|
|
6390
6582
|
const ServiceClass = stableParams.service;
|
|
6391
6583
|
response = await ServiceClass.previous({
|
|
6392
6584
|
type: stableParams.type,
|
|
@@ -6409,8 +6601,8 @@ function useDataListRetriever(params) {
|
|
|
6409
6601
|
retrieverParams.total = totalRef;
|
|
6410
6602
|
response = await stableParams.retriever(retrieverParams);
|
|
6411
6603
|
}
|
|
6412
|
-
if (thisRequestId === requestIdRef.current && !_optionalChain([abortControllerRef, 'access',
|
|
6413
|
-
if (_optionalChain([fetchParams, 'optionalAccess',
|
|
6604
|
+
if (thisRequestId === requestIdRef.current && !_optionalChain([abortControllerRef, 'access', _141 => _141.current, 'optionalAccess', _142 => _142.signal, 'access', _143 => _143.aborted])) {
|
|
6605
|
+
if (_optionalChain([fetchParams, 'optionalAccess', _144 => _144.isRefresh]) === true) {
|
|
6414
6606
|
setData(response);
|
|
6415
6607
|
} else {
|
|
6416
6608
|
setData((prevData) => [...prevData ? prevData : [], ...response]);
|
|
@@ -6615,12 +6807,12 @@ var SUBTITLE_PX_PER_CHAR_11 = 6;
|
|
|
6615
6807
|
var LABEL_PADDING_PX = 16;
|
|
6616
6808
|
function estimateLabelWidth(node) {
|
|
6617
6809
|
if (node.subtitle) {
|
|
6618
|
-
const titleWidth = (_nullishCoalesce(_optionalChain([node, 'access',
|
|
6810
|
+
const titleWidth = (_nullishCoalesce(_optionalChain([node, 'access', _145 => _145.name, 'optionalAccess', _146 => _146.length]), () => ( 0))) * TITLE_PX_PER_CHAR_16;
|
|
6619
6811
|
const subtitleWidth = node.subtitle.length * SUBTITLE_PX_PER_CHAR_11;
|
|
6620
6812
|
return Math.max(titleWidth, subtitleWidth) + LABEL_PADDING_PX;
|
|
6621
6813
|
}
|
|
6622
6814
|
const perChar = node.bold ? NAME_PX_PER_CHAR_16_BOLD : NAME_PX_PER_CHAR_12;
|
|
6623
|
-
return (_nullishCoalesce(_optionalChain([node, 'access',
|
|
6815
|
+
return (_nullishCoalesce(_optionalChain([node, 'access', _147 => _147.name, 'optionalAccess', _148 => _148.length]), () => ( 0))) * perChar + LABEL_PADDING_PX;
|
|
6624
6816
|
}
|
|
6625
6817
|
_chunk7QVYU63Ejs.__name.call(void 0, estimateLabelWidth, "estimateLabelWidth");
|
|
6626
6818
|
function linkEndpointId(end) {
|
|
@@ -6733,12 +6925,12 @@ var SUBTITLE_PX_PER_CHAR_112 = 6;
|
|
|
6733
6925
|
var LABEL_PADDING_PX2 = 16;
|
|
6734
6926
|
function estimateLabelWidth2(node) {
|
|
6735
6927
|
if (node.subtitle) {
|
|
6736
|
-
const titleWidth = (_nullishCoalesce(_optionalChain([node, 'access',
|
|
6928
|
+
const titleWidth = (_nullishCoalesce(_optionalChain([node, 'access', _149 => _149.name, 'optionalAccess', _150 => _150.length]), () => ( 0))) * TITLE_PX_PER_CHAR_162;
|
|
6737
6929
|
const subtitleWidth = node.subtitle.length * SUBTITLE_PX_PER_CHAR_112;
|
|
6738
6930
|
return Math.max(titleWidth, subtitleWidth) + LABEL_PADDING_PX2;
|
|
6739
6931
|
}
|
|
6740
6932
|
const perChar = node.bold ? NAME_PX_PER_CHAR_16_BOLD2 : NAME_PX_PER_CHAR_122;
|
|
6741
|
-
return (_nullishCoalesce(_optionalChain([node, 'access',
|
|
6933
|
+
return (_nullishCoalesce(_optionalChain([node, 'access', _151 => _151.name, 'optionalAccess', _152 => _152.length]), () => ( 0))) * perChar + LABEL_PADDING_PX2;
|
|
6742
6934
|
}
|
|
6743
6935
|
_chunk7QVYU63Ejs.__name.call(void 0, estimateLabelWidth2, "estimateLabelWidth");
|
|
6744
6936
|
function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, loadingNodeIds, containerKey) {
|
|
@@ -6805,7 +6997,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
|
|
|
6805
6997
|
});
|
|
6806
6998
|
const typeColorMap = /* @__PURE__ */ new Map();
|
|
6807
6999
|
Array.from(groupTypes).forEach((type, index) => {
|
|
6808
|
-
if (type === _optionalChain([nodes, 'access',
|
|
7000
|
+
if (type === _optionalChain([nodes, 'access', _153 => _153[0], 'optionalAccess', _154 => _154.instanceType])) {
|
|
6809
7001
|
typeColorMap.set(type, accentColor);
|
|
6810
7002
|
} else if (type === "documents" || type === "articles" || type === "hyperlinks") {
|
|
6811
7003
|
typeColorMap.set(type, contentColor);
|
|
@@ -6851,14 +7043,14 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
|
|
|
6851
7043
|
});
|
|
6852
7044
|
const svg = d3.select(svgRef.current);
|
|
6853
7045
|
svg.selectAll("*").remove();
|
|
6854
|
-
const container = _optionalChain([svgRef, 'access',
|
|
7046
|
+
const container = _optionalChain([svgRef, 'access', _155 => _155.current, 'optionalAccess', _156 => _156.parentElement]);
|
|
6855
7047
|
if (!container) return;
|
|
6856
7048
|
const width = container.clientWidth;
|
|
6857
7049
|
const height = container.clientHeight;
|
|
6858
7050
|
svg.attr("width", width).attr("height", height).attr("viewBox", `0 0 ${width} ${height}`);
|
|
6859
7051
|
const graphGroup = svg.append("g").attr("class", "graph-content");
|
|
6860
7052
|
const nodeRadius = 40;
|
|
6861
|
-
const directed = _optionalChain([options, 'optionalAccess',
|
|
7053
|
+
const directed = _optionalChain([options, 'optionalAccess', _157 => _157.directed]) === true;
|
|
6862
7054
|
if (directed) {
|
|
6863
7055
|
const defs = svg.append("defs");
|
|
6864
7056
|
defs.append("marker").attr("id", "narr8-arrow").attr("viewBox", "-10 -10 20 20").attr("markerWidth", 14).attr("markerHeight", 14).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").attr("refX", 0).attr("refY", 0).append("path").attr("d", "M-10,-10 L0,0 L-10,10 z").attr("fill", "#999");
|
|
@@ -6870,10 +7062,10 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
|
|
|
6870
7062
|
});
|
|
6871
7063
|
zoomBehaviorRef.current = zoom2;
|
|
6872
7064
|
svg.call(zoom2).on("wheel.zoom", null).on("dblclick.zoom", null);
|
|
6873
|
-
const layoutMode = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7065
|
+
const layoutMode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _158 => _158.layout]), () => ( "radial"));
|
|
6874
7066
|
let layeredPositionsApplied = false;
|
|
6875
7067
|
if (layoutMode === "layered") {
|
|
6876
|
-
const layeredOpts = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
7068
|
+
const layeredOpts = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _159 => _159.layered]), () => ( {}));
|
|
6877
7069
|
const useFit = layeredOpts.fitContainer === true && width > 0 && height > 0;
|
|
6878
7070
|
const positions = useFit ? fitLayeredLayoutToAspectRatio(visibleNodes, visibleLinks, {
|
|
6879
7071
|
rankdir: _nullishCoalesce(layeredOpts.rankdir, () => ( "LR")),
|
|
@@ -6956,7 +7148,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
|
|
|
6956
7148
|
sourceNode.children.push(targetId);
|
|
6957
7149
|
}
|
|
6958
7150
|
});
|
|
6959
|
-
const rootChildren = _optionalChain([nodeHierarchy, 'access',
|
|
7151
|
+
const rootChildren = _optionalChain([nodeHierarchy, 'access', _160 => _160.get, 'call', _161 => _161(centralNodeId), 'optionalAccess', _162 => _162.children]) || [];
|
|
6960
7152
|
const childAngleStep = 2 * Math.PI / Math.max(rootChildren.length, 1);
|
|
6961
7153
|
rootChildren.forEach((childId, index) => {
|
|
6962
7154
|
const childNode = nodeHierarchy.get(childId);
|
|
@@ -7108,7 +7300,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
|
|
|
7108
7300
|
if (d.instanceType === "root") return;
|
|
7109
7301
|
const currentNode = d3.select(this);
|
|
7110
7302
|
currentNode.raise();
|
|
7111
|
-
const currentZoom = _optionalChain([zoomRef, 'access',
|
|
7303
|
+
const currentZoom = _optionalChain([zoomRef, 'access', _163 => _163.current, 'optionalAccess', _164 => _164.k]) || 1;
|
|
7112
7304
|
const targetScreenFontSize = 20;
|
|
7113
7305
|
const baseFontSize = 12;
|
|
7114
7306
|
const textScale = targetScreenFontSize / (baseFontSize * currentZoom);
|
|
@@ -7183,19 +7375,19 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
|
|
|
7183
7375
|
}
|
|
7184
7376
|
});
|
|
7185
7377
|
return () => {
|
|
7186
|
-
_optionalChain([simulation, 'optionalAccess',
|
|
7378
|
+
_optionalChain([simulation, 'optionalAccess', _165 => _165.stop, 'call', _166 => _166()]);
|
|
7187
7379
|
};
|
|
7188
7380
|
}, [
|
|
7189
7381
|
nodes,
|
|
7190
7382
|
links,
|
|
7191
7383
|
colorScale,
|
|
7192
7384
|
visibleNodeIds,
|
|
7193
|
-
_optionalChain([options, 'optionalAccess',
|
|
7194
|
-
_optionalChain([options, 'optionalAccess',
|
|
7195
|
-
_optionalChain([options, 'optionalAccess',
|
|
7196
|
-
_optionalChain([options, 'optionalAccess',
|
|
7197
|
-
_optionalChain([options, 'optionalAccess',
|
|
7198
|
-
_optionalChain([options, 'optionalAccess',
|
|
7385
|
+
_optionalChain([options, 'optionalAccess', _167 => _167.directed]),
|
|
7386
|
+
_optionalChain([options, 'optionalAccess', _168 => _168.layout]),
|
|
7387
|
+
_optionalChain([options, 'optionalAccess', _169 => _169.layered, 'optionalAccess', _170 => _170.rankdir]),
|
|
7388
|
+
_optionalChain([options, 'optionalAccess', _171 => _171.layered, 'optionalAccess', _172 => _172.nodesep]),
|
|
7389
|
+
_optionalChain([options, 'optionalAccess', _173 => _173.layered, 'optionalAccess', _174 => _174.ranksep]),
|
|
7390
|
+
_optionalChain([options, 'optionalAccess', _175 => _175.layered, 'optionalAccess', _176 => _176.fitContainer]),
|
|
7199
7391
|
loadingNodeIds,
|
|
7200
7392
|
onNodeClick
|
|
7201
7393
|
]);
|
|
@@ -7243,317 +7435,42 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
|
|
|
7243
7435
|
bounds.yMax += padding;
|
|
7244
7436
|
const width = svgRef.current.clientWidth;
|
|
7245
7437
|
const height = svgRef.current.clientHeight;
|
|
7246
|
-
const contentWidth = bounds.xMax - bounds.xMin;
|
|
7247
|
-
const contentHeight = bounds.yMax - bounds.yMin;
|
|
7248
|
-
const scaleX = width / contentWidth;
|
|
7249
|
-
const scaleY = height / contentHeight;
|
|
7250
|
-
let scale = Math.min(scaleX, scaleY);
|
|
7251
|
-
scale = Math.min(Math.max(scale, 0.1), 2);
|
|
7252
|
-
const centerX = (bounds.xMin + bounds.xMax) / 2;
|
|
7253
|
-
const centerY = (bounds.yMin + bounds.yMax) / 2;
|
|
7254
|
-
const translateX = width / 2 - centerX * scale;
|
|
7255
|
-
const translateY = height / 2 - centerY * scale;
|
|
7256
|
-
svg.transition().duration(750).call(zoom2.transform, d3.zoomIdentity.translate(translateX, translateY).scale(scale));
|
|
7257
|
-
}, [nodes, visibleNodeIds]);
|
|
7258
|
-
_react.useEffect.call(void 0, () => {
|
|
7259
|
-
if (containerKey !== void 0 && containerKey !== prevContainerKeyRef.current) {
|
|
7260
|
-
const timeoutId = setTimeout(() => {
|
|
7261
|
-
zoomToFitAll();
|
|
7262
|
-
}, 100);
|
|
7263
|
-
prevContainerKeyRef.current = containerKey;
|
|
7264
|
-
return () => clearTimeout(timeoutId);
|
|
7265
|
-
}
|
|
7266
|
-
}, [containerKey, zoomToFitAll]);
|
|
7267
|
-
return { svgRef, zoomIn, zoomOut, zoomToNode, zoomToFitAll };
|
|
7268
|
-
}
|
|
7269
|
-
_chunk7QVYU63Ejs.__name.call(void 0, useCustomD3Graph, "useCustomD3Graph");
|
|
7270
|
-
|
|
7271
|
-
// src/hooks/useNotificationSync.ts
|
|
7272
|
-
|
|
7273
|
-
function useNotificationSync() {
|
|
7274
|
-
const { socketNotifications, clearSocketNotifications } = useSocketContext();
|
|
7275
|
-
const { addSocketNotifications } = useNotificationContext();
|
|
7276
|
-
_react.useEffect.call(void 0, () => {
|
|
7277
|
-
if (socketNotifications.length > 0) {
|
|
7278
|
-
try {
|
|
7279
|
-
addSocketNotifications(socketNotifications);
|
|
7280
|
-
clearSocketNotifications();
|
|
7281
|
-
} catch (error) {
|
|
7282
|
-
console.error("\u{1F4A5} [useNotificationSync] Error processing notifications:", error);
|
|
7283
|
-
}
|
|
7284
|
-
}
|
|
7285
|
-
}, [socketNotifications, addSocketNotifications, clearSocketNotifications]);
|
|
7286
|
-
}
|
|
7287
|
-
_chunk7QVYU63Ejs.__name.call(void 0, useNotificationSync, "useNotificationSync");
|
|
7288
|
-
|
|
7289
|
-
// src/hooks/usePageTracker.ts
|
|
7290
|
-
var _jotai = require('jotai');
|
|
7291
|
-
var _navigation = require('next/navigation');
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
// src/atoms/recentPagesAtom.ts
|
|
7295
|
-
var _utils = require('jotai/utils');
|
|
7296
|
-
var recentPagesAtom = _utils.atomWithStorage.call(void 0, "recentPages", []);
|
|
7297
|
-
|
|
7298
|
-
// src/hooks/usePageTracker.ts
|
|
7299
|
-
var EXCLUDED_ROUTES = ["/", "/login", "/register", "/forgot-password", "/reset-password", "/activate"];
|
|
7300
|
-
function usePageTracker() {
|
|
7301
|
-
const pathname = _navigation.usePathname.call(void 0, );
|
|
7302
|
-
const [_recentPages, setRecentPages] = _jotai.useAtom.call(void 0, recentPagesAtom);
|
|
7303
|
-
_react.useEffect.call(void 0, () => {
|
|
7304
|
-
if (!pathname) return;
|
|
7305
|
-
if (EXCLUDED_ROUTES.some((route) => pathname === route || pathname.endsWith(route))) {
|
|
7306
|
-
return;
|
|
7307
|
-
}
|
|
7308
|
-
const pathParts = pathname.split("/").filter(Boolean);
|
|
7309
|
-
if (pathParts.length === 0) return;
|
|
7310
|
-
const moduleName = pathParts[0];
|
|
7311
|
-
const entityId = pathParts.length > 1 ? pathParts[1] : null;
|
|
7312
|
-
if (!entityId) return;
|
|
7313
|
-
const trackablePages = _chunkJO5BLONKjs.getTrackablePages.call(void 0, );
|
|
7314
|
-
const foundModule = trackablePages.find((mod) => mod.pageUrl === `/${moduleName}`);
|
|
7315
|
-
if (!foundModule) return;
|
|
7316
|
-
const baseUrl = `/${moduleName}/${entityId}`;
|
|
7317
|
-
let pageTitle = foundModule.name;
|
|
7318
|
-
if (typeof document !== "undefined") {
|
|
7319
|
-
const titleParts = document.title.split("]");
|
|
7320
|
-
if (titleParts[1]) {
|
|
7321
|
-
const cleanTitle = _optionalChain([titleParts, 'access', _167 => _167[1], 'access', _168 => _168.split, 'call', _169 => _169("|"), 'access', _170 => _170[0], 'optionalAccess', _171 => _171.trim, 'call', _172 => _172()]);
|
|
7322
|
-
pageTitle = cleanTitle || foundModule.name;
|
|
7323
|
-
}
|
|
7324
|
-
}
|
|
7325
|
-
const newPage = {
|
|
7326
|
-
url: baseUrl,
|
|
7327
|
-
title: pageTitle,
|
|
7328
|
-
moduleType: foundModule.name,
|
|
7329
|
-
timestamp: Date.now()
|
|
7330
|
-
};
|
|
7331
|
-
setRecentPages((prev) => {
|
|
7332
|
-
const filtered = prev.filter((page) => page.url !== newPage.url);
|
|
7333
|
-
return [newPage, ...filtered].slice(0, 10);
|
|
7334
|
-
});
|
|
7335
|
-
}, [pathname, setRecentPages]);
|
|
7336
|
-
}
|
|
7337
|
-
_chunk7QVYU63Ejs.__name.call(void 0, usePageTracker, "usePageTracker");
|
|
7338
|
-
|
|
7339
|
-
// src/hooks/usePushNotifications.ts
|
|
7340
|
-
|
|
7341
|
-
function urlBase64ToUint8Array(base64String) {
|
|
7342
|
-
const padding = "=".repeat((4 - base64String.length % 4) % 4);
|
|
7343
|
-
const base64 = (base64String + padding).replace(/-/g, "+").replace(/_/g, "/");
|
|
7344
|
-
const rawData = window.atob(base64);
|
|
7345
|
-
const outputArray = new Uint8Array(rawData.length);
|
|
7346
|
-
for (let i = 0; i < rawData.length; i++) {
|
|
7347
|
-
outputArray[i] = rawData.charCodeAt(i);
|
|
7348
|
-
}
|
|
7349
|
-
return outputArray;
|
|
7350
|
-
}
|
|
7351
|
-
_chunk7QVYU63Ejs.__name.call(void 0, urlBase64ToUint8Array, "urlBase64ToUint8Array");
|
|
7352
|
-
function usePushNotifications() {
|
|
7353
|
-
const { currentUser, hasRole } = useCurrentUserContext();
|
|
7354
|
-
_react.useEffect.call(void 0, () => {
|
|
7355
|
-
const register = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
7356
|
-
if ("serviceWorker" in navigator && "PushManager" in window) {
|
|
7357
|
-
try {
|
|
7358
|
-
const sessionKey = `push_registered_${_optionalChain([currentUser, 'optionalAccess', _173 => _173.id])}`;
|
|
7359
|
-
const lastRegisteredSubscription = sessionStorage.getItem(sessionKey);
|
|
7360
|
-
const registration = await navigator.serviceWorker.register(`${_chunkJO5BLONKjs.getAppUrl.call(void 0, )}/sw.js`);
|
|
7361
|
-
let permission = Notification.permission;
|
|
7362
|
-
if (permission === "default") {
|
|
7363
|
-
permission = await Notification.requestPermission();
|
|
7364
|
-
}
|
|
7365
|
-
if (permission !== "granted") {
|
|
7366
|
-
return;
|
|
7367
|
-
}
|
|
7368
|
-
const vapidPublicKey = (process.env.NEXT_PUBLIC_VAPID_PUBLIC_KEY || "").trim();
|
|
7369
|
-
if (!vapidPublicKey) {
|
|
7370
|
-
return;
|
|
7371
|
-
}
|
|
7372
|
-
const convertedKey = urlBase64ToUint8Array(vapidPublicKey);
|
|
7373
|
-
await navigator.serviceWorker.ready;
|
|
7374
|
-
let subscription = await registration.pushManager.getSubscription();
|
|
7375
|
-
if (!subscription) {
|
|
7376
|
-
const appServerKey = new Uint8Array(Array.from(convertedKey));
|
|
7377
|
-
subscription = await registration.pushManager.subscribe({
|
|
7378
|
-
userVisibleOnly: true,
|
|
7379
|
-
applicationServerKey: appServerKey
|
|
7380
|
-
});
|
|
7381
|
-
}
|
|
7382
|
-
const plainSubscription = {
|
|
7383
|
-
endpoint: subscription.endpoint,
|
|
7384
|
-
keys: subscription.toJSON().keys
|
|
7385
|
-
};
|
|
7386
|
-
const subscriptionHash = btoa(JSON.stringify(plainSubscription));
|
|
7387
|
-
if (lastRegisteredSubscription !== subscriptionHash) {
|
|
7388
|
-
await _chunkPQBKPWBYjs.PushService.register({ data: plainSubscription });
|
|
7389
|
-
sessionStorage.setItem(sessionKey, subscriptionHash);
|
|
7390
|
-
}
|
|
7391
|
-
} catch (error) {
|
|
7392
|
-
console.error("Error during service worker registration or push subscription:", error);
|
|
7393
|
-
}
|
|
7394
|
-
}
|
|
7395
|
-
}, "register");
|
|
7396
|
-
if (currentUser && !hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator)) register();
|
|
7397
|
-
}, [currentUser]);
|
|
7398
|
-
}
|
|
7399
|
-
_chunk7QVYU63Ejs.__name.call(void 0, usePushNotifications, "usePushNotifications");
|
|
7400
|
-
|
|
7401
|
-
// src/hooks/useSocket.ts
|
|
7402
|
-
|
|
7403
|
-
var _socketioclient = require('socket.io-client'); var _socketioclient2 = _interopRequireDefault(_socketioclient);
|
|
7404
|
-
function useSocket({ token }) {
|
|
7405
|
-
const _errorCount = _react.useRef.call(void 0, 0);
|
|
7406
|
-
const shouldConnect = _react.useRef.call(void 0, true);
|
|
7407
|
-
const _hookInstanceId = _react.useRef.call(void 0, Math.random().toString(36).substring(2, 11));
|
|
7408
|
-
const [socket, setSocket] = _react.useState.call(void 0, null);
|
|
7409
|
-
const [isConnected, setIsConnected] = _react.useState.call(void 0, false);
|
|
7410
|
-
const [messages, setMessages] = _react.useState.call(void 0, []);
|
|
7411
|
-
const [socketNotifications, setSocketNotifications] = _react.useState.call(void 0, []);
|
|
7412
|
-
const socketRef = _react.useRef.call(void 0, null);
|
|
7413
|
-
_react.useEffect.call(void 0, () => {
|
|
7414
|
-
if (!token) return;
|
|
7415
|
-
const globalSocketKey = `__socket_${_optionalChain([process, 'access', _174 => _174.env, 'access', _175 => _175.NEXT_PUBLIC_API_URL, 'optionalAccess', _176 => _176.replace, 'call', _177 => _177(/[^a-zA-Z0-9]/g, "_")])}`;
|
|
7416
|
-
if (typeof window !== "undefined") {
|
|
7417
|
-
const _allSocketKeys = Object.keys(window).filter((key) => key.startsWith("__socket_"));
|
|
7418
|
-
const existingSocket = window[globalSocketKey];
|
|
7419
|
-
if (existingSocket) {
|
|
7420
|
-
if (existingSocket.connected) {
|
|
7421
|
-
existingSocket.removeAllListeners();
|
|
7422
|
-
socketRef.current = existingSocket;
|
|
7423
|
-
setSocket(existingSocket);
|
|
7424
|
-
setIsConnected(existingSocket.connected);
|
|
7425
|
-
} else {
|
|
7426
|
-
existingSocket.disconnect();
|
|
7427
|
-
delete window[globalSocketKey];
|
|
7428
|
-
}
|
|
7429
|
-
}
|
|
7430
|
-
}
|
|
7431
|
-
let currentSocket;
|
|
7432
|
-
const isReusing = socketRef.current && socketRef.current.connected;
|
|
7433
|
-
if (isReusing) {
|
|
7434
|
-
currentSocket = socketRef.current;
|
|
7435
|
-
} else {
|
|
7436
|
-
if (!shouldConnect.current) {
|
|
7437
|
-
return;
|
|
7438
|
-
}
|
|
7439
|
-
shouldConnect.current = false;
|
|
7440
|
-
try {
|
|
7441
|
-
currentSocket = _socketioclient2.default.call(void 0, process.env.NEXT_PUBLIC_API_URL, {
|
|
7442
|
-
auth: { token },
|
|
7443
|
-
transports: ["websocket"],
|
|
7444
|
-
timeout: 2e4
|
|
7445
|
-
});
|
|
7446
|
-
if (typeof window !== "undefined") {
|
|
7447
|
-
if (currentSocket.id && currentSocket.id !== "undefined") {
|
|
7448
|
-
window[globalSocketKey] = currentSocket;
|
|
7449
|
-
}
|
|
7450
|
-
}
|
|
7451
|
-
socketRef.current = currentSocket;
|
|
7452
|
-
setSocket(currentSocket);
|
|
7453
|
-
} catch (e6) {
|
|
7454
|
-
return () => {
|
|
7455
|
-
};
|
|
7456
|
-
}
|
|
7457
|
-
}
|
|
7458
|
-
const handleConnect = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
7459
|
-
setIsConnected(true);
|
|
7460
|
-
}, "handleConnect");
|
|
7461
|
-
const handleDisconnect = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
7462
|
-
setIsConnected(false);
|
|
7463
|
-
}, "handleDisconnect");
|
|
7464
|
-
const handleMessage = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
|
|
7465
|
-
setMessages((prevMessages) => {
|
|
7466
|
-
const newMessages = [...prevMessages, data];
|
|
7467
|
-
return newMessages;
|
|
7468
|
-
});
|
|
7469
|
-
}, "handleMessage");
|
|
7470
|
-
const handleNotification = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
|
|
7471
|
-
const resource = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _178 => _178.data]), () => ( _optionalChain([data, 'optionalAccess', _179 => _179.jsonApi])));
|
|
7472
|
-
if (!_optionalChain([resource, 'optionalAccess', _180 => _180.type])) {
|
|
7473
|
-
console.warn("[useSocket] ignoring notification with unexpected payload shape", data);
|
|
7474
|
-
return;
|
|
7475
|
-
}
|
|
7476
|
-
const notification = _chunkPQBKPWBYjs.rehydrate.call(void 0, _chunkPQBKPWBYjs.Modules.Notification, {
|
|
7477
|
-
jsonApi: resource,
|
|
7478
|
-
included: _optionalChain([data, 'optionalAccess', _181 => _181.included]) || []
|
|
7479
|
-
});
|
|
7480
|
-
if (notification) {
|
|
7481
|
-
setSocketNotifications((prev) => {
|
|
7482
|
-
const newNotifications = [...prev, notification];
|
|
7483
|
-
return newNotifications;
|
|
7484
|
-
});
|
|
7485
|
-
}
|
|
7486
|
-
}, "handleNotification");
|
|
7487
|
-
if (currentSocket) {
|
|
7488
|
-
currentSocket.on("connect", handleConnect);
|
|
7489
|
-
currentSocket.on("disconnect", handleDisconnect);
|
|
7490
|
-
currentSocket.on("message", handleMessage);
|
|
7491
|
-
currentSocket.on("notification", handleNotification);
|
|
7492
|
-
}
|
|
7493
|
-
return () => {
|
|
7494
|
-
shouldConnect.current = true;
|
|
7495
|
-
if (currentSocket) {
|
|
7496
|
-
if (process.env.NODE_ENV === "development") {
|
|
7497
|
-
currentSocket.off("connect", handleConnect);
|
|
7498
|
-
currentSocket.off("disconnect", handleDisconnect);
|
|
7499
|
-
currentSocket.off("message", handleMessage);
|
|
7500
|
-
currentSocket.off("notification", handleNotification);
|
|
7501
|
-
} else {
|
|
7502
|
-
currentSocket.off("connect", handleConnect);
|
|
7503
|
-
currentSocket.off("disconnect", handleDisconnect);
|
|
7504
|
-
currentSocket.off("message", handleMessage);
|
|
7505
|
-
currentSocket.off("notification", handleNotification);
|
|
7506
|
-
currentSocket.disconnect();
|
|
7507
|
-
if (typeof window !== "undefined") {
|
|
7508
|
-
delete window[globalSocketKey];
|
|
7509
|
-
}
|
|
7510
|
-
}
|
|
7511
|
-
}
|
|
7512
|
-
};
|
|
7513
|
-
}, [token]);
|
|
7514
|
-
const sendMessage = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (event, data) => {
|
|
7515
|
-
if (socketRef.current && isConnected) {
|
|
7516
|
-
socketRef.current.emit(event, data);
|
|
7517
|
-
}
|
|
7518
|
-
}, "sendMessage");
|
|
7519
|
-
const removeMessage = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (index) => {
|
|
7520
|
-
setMessages((prevMessages) => {
|
|
7521
|
-
const newMessages = [...prevMessages];
|
|
7522
|
-
newMessages.splice(index, 1);
|
|
7523
|
-
return newMessages;
|
|
7524
|
-
});
|
|
7525
|
-
}, "removeMessage");
|
|
7526
|
-
const removeSocketNotification = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (index) => {
|
|
7527
|
-
setSocketNotifications((prevNotifications) => {
|
|
7528
|
-
const newNotifications = [...prevNotifications];
|
|
7529
|
-
newNotifications.splice(index, 1);
|
|
7530
|
-
return newNotifications;
|
|
7531
|
-
});
|
|
7532
|
-
}, "removeSocketNotification");
|
|
7533
|
-
const clearMessages = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
7534
|
-
setMessages([]);
|
|
7535
|
-
}, "clearMessages");
|
|
7536
|
-
const clearSocketNotifications = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
7537
|
-
setSocketNotifications([]);
|
|
7538
|
-
}, "clearSocketNotifications");
|
|
7539
|
-
return {
|
|
7540
|
-
socket,
|
|
7541
|
-
isConnected,
|
|
7542
|
-
messages,
|
|
7543
|
-
socketNotifications,
|
|
7544
|
-
sendMessage,
|
|
7545
|
-
removeMessage,
|
|
7546
|
-
removeSocketNotification,
|
|
7547
|
-
clearMessages,
|
|
7548
|
-
clearSocketNotifications
|
|
7549
|
-
};
|
|
7438
|
+
const contentWidth = bounds.xMax - bounds.xMin;
|
|
7439
|
+
const contentHeight = bounds.yMax - bounds.yMin;
|
|
7440
|
+
const scaleX = width / contentWidth;
|
|
7441
|
+
const scaleY = height / contentHeight;
|
|
7442
|
+
let scale = Math.min(scaleX, scaleY);
|
|
7443
|
+
scale = Math.min(Math.max(scale, 0.1), 2);
|
|
7444
|
+
const centerX = (bounds.xMin + bounds.xMax) / 2;
|
|
7445
|
+
const centerY = (bounds.yMin + bounds.yMax) / 2;
|
|
7446
|
+
const translateX = width / 2 - centerX * scale;
|
|
7447
|
+
const translateY = height / 2 - centerY * scale;
|
|
7448
|
+
svg.transition().duration(750).call(zoom2.transform, d3.zoomIdentity.translate(translateX, translateY).scale(scale));
|
|
7449
|
+
}, [nodes, visibleNodeIds]);
|
|
7450
|
+
_react.useEffect.call(void 0, () => {
|
|
7451
|
+
if (containerKey !== void 0 && containerKey !== prevContainerKeyRef.current) {
|
|
7452
|
+
const timeoutId = setTimeout(() => {
|
|
7453
|
+
zoomToFitAll();
|
|
7454
|
+
}, 100);
|
|
7455
|
+
prevContainerKeyRef.current = containerKey;
|
|
7456
|
+
return () => clearTimeout(timeoutId);
|
|
7457
|
+
}
|
|
7458
|
+
}, [containerKey, zoomToFitAll]);
|
|
7459
|
+
return { svgRef, zoomIn, zoomOut, zoomToNode, zoomToFitAll };
|
|
7550
7460
|
}
|
|
7551
|
-
_chunk7QVYU63Ejs.__name.call(void 0,
|
|
7461
|
+
_chunk7QVYU63Ejs.__name.call(void 0, useCustomD3Graph, "useCustomD3Graph");
|
|
7552
7462
|
|
|
7553
|
-
// src/
|
|
7463
|
+
// src/hooks/useNotificationSync.ts
|
|
7464
|
+
|
|
7465
|
+
|
|
7466
|
+
// src/features/company/contexts/CompanyContext.tsx
|
|
7554
7467
|
|
|
7555
7468
|
|
|
7556
7469
|
|
|
7470
|
+
// src/features/user/contexts/CurrentUserContext.tsx
|
|
7471
|
+
var _jotai = require('jotai');
|
|
7472
|
+
var _utils = require('jotai/utils');
|
|
7473
|
+
var _navigation = require('next/navigation');
|
|
7557
7474
|
|
|
7558
7475
|
|
|
7559
7476
|
// src/contexts/SocketContext.tsx
|
|
@@ -7613,23 +7530,23 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
7613
7530
|
);
|
|
7614
7531
|
const matchedModuleKey = moduleKeys.find((key) => {
|
|
7615
7532
|
const descriptor2 = Object.getOwnPropertyDescriptor(_chunkPQBKPWBYjs.Modules, key);
|
|
7616
|
-
if (!_optionalChain([descriptor2, 'optionalAccess',
|
|
7533
|
+
if (!_optionalChain([descriptor2, 'optionalAccess', _177 => _177.get])) return false;
|
|
7617
7534
|
const selectedModule = descriptor2.get.call(_chunkPQBKPWBYjs.Modules);
|
|
7618
|
-
return path.toLowerCase().startsWith(_optionalChain([selectedModule, 'access',
|
|
7535
|
+
return path.toLowerCase().startsWith(_optionalChain([selectedModule, 'access', _178 => _178.pageUrl, 'optionalAccess', _179 => _179.toLowerCase, 'call', _180 => _180()]));
|
|
7619
7536
|
});
|
|
7620
7537
|
if (!matchedModuleKey) return void 0;
|
|
7621
7538
|
const descriptor = Object.getOwnPropertyDescriptor(_chunkPQBKPWBYjs.Modules, matchedModuleKey);
|
|
7622
|
-
return _optionalChain([descriptor, 'optionalAccess',
|
|
7539
|
+
return _optionalChain([descriptor, 'optionalAccess', _181 => _181.get, 'optionalAccess', _182 => _182.call, 'call', _183 => _183(_chunkPQBKPWBYjs.Modules)]);
|
|
7623
7540
|
}, "matchUrlToModule");
|
|
7624
7541
|
const currentUser = dehydratedUser ? _chunkPQBKPWBYjs.rehydrate.call(void 0, _chunkPQBKPWBYjs.Modules.User, dehydratedUser) : null;
|
|
7625
|
-
const company = _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess',
|
|
7542
|
+
const company = _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _184 => _184.company]), () => ( null));
|
|
7626
7543
|
const setUser = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (user) => {
|
|
7627
7544
|
if (user) setDehydratedUser(user.dehydrate());
|
|
7628
7545
|
else setDehydratedUser(null);
|
|
7629
7546
|
}, "setUser");
|
|
7630
7547
|
const hasRole = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (roleId) => {
|
|
7631
7548
|
if (!currentUser) return false;
|
|
7632
|
-
return !!_optionalChain([currentUser, 'access',
|
|
7549
|
+
return !!_optionalChain([currentUser, 'access', _185 => _185.roles, 'optionalAccess', _186 => _186.some, 'call', _187 => _187((userRole) => userRole.id === roleId)]);
|
|
7633
7550
|
}, "hasRole");
|
|
7634
7551
|
const hasAccesToFeature = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (featureIdentifier) => {
|
|
7635
7552
|
if (hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator)) return true;
|
|
@@ -7669,12 +7586,12 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
7669
7586
|
try {
|
|
7670
7587
|
const fullUser = await _chunkPQBKPWBYjs.UserService.findFullUser();
|
|
7671
7588
|
if (fullUser) {
|
|
7672
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
7673
|
-
await _optionalChain([_chunkPQBKPWBYjs.getTokenHandler.call(void 0, ), 'optionalAccess',
|
|
7589
|
+
if (!_optionalChain([options, 'optionalAccess', _188 => _188.skipCookieUpdate])) {
|
|
7590
|
+
await _optionalChain([_chunkPQBKPWBYjs.getTokenHandler.call(void 0, ), 'optionalAccess', _189 => _189.updateToken, 'call', _190 => _190({
|
|
7674
7591
|
userId: fullUser.id,
|
|
7675
|
-
companyId: _optionalChain([fullUser, 'access',
|
|
7592
|
+
companyId: _optionalChain([fullUser, 'access', _191 => _191.company, 'optionalAccess', _192 => _192.id]),
|
|
7676
7593
|
roles: fullUser.roles.map((role) => role.id),
|
|
7677
|
-
features: _nullishCoalesce(_optionalChain([fullUser, 'access',
|
|
7594
|
+
features: _nullishCoalesce(_optionalChain([fullUser, 'access', _193 => _193.company, 'optionalAccess', _194 => _194.features, 'optionalAccess', _195 => _195.map, 'call', _196 => _196((feature) => feature.id)]), () => ( [])),
|
|
7678
7595
|
modules: fullUser.modules.map((module) => ({
|
|
7679
7596
|
id: module.id,
|
|
7680
7597
|
permissions: module.permissions
|
|
@@ -7696,11 +7613,11 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
7696
7613
|
refreshUserRef.current = refreshUser;
|
|
7697
7614
|
const isRefreshingRef = _react.useRef.call(void 0, false);
|
|
7698
7615
|
_react.useEffect.call(void 0, () => {
|
|
7699
|
-
if (!socket || !isConnected || !_optionalChain([currentUser, 'optionalAccess',
|
|
7616
|
+
if (!socket || !isConnected || !_optionalChain([currentUser, 'optionalAccess', _197 => _197.company, 'optionalAccess', _198 => _198.id])) {
|
|
7700
7617
|
return;
|
|
7701
7618
|
}
|
|
7702
7619
|
const handleCompanyUpdate = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
|
|
7703
|
-
if (data.companyId === _optionalChain([currentUser, 'access',
|
|
7620
|
+
if (data.companyId === _optionalChain([currentUser, 'access', _199 => _199.company, 'optionalAccess', _200 => _200.id]) && !isRefreshingRef.current) {
|
|
7704
7621
|
isRefreshingRef.current = true;
|
|
7705
7622
|
refreshUserRef.current({ skipCookieUpdate: true }).finally(() => {
|
|
7706
7623
|
isRefreshingRef.current = false;
|
|
@@ -7713,7 +7630,7 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
7713
7630
|
socket.off("company:tokens_updated", handleCompanyUpdate);
|
|
7714
7631
|
socket.off("company:subscription_updated", handleCompanyUpdate);
|
|
7715
7632
|
};
|
|
7716
|
-
}, [socket, isConnected, _optionalChain([currentUser, 'optionalAccess',
|
|
7633
|
+
}, [socket, isConnected, _optionalChain([currentUser, 'optionalAccess', _201 => _201.company, 'optionalAccess', _202 => _202.id])]);
|
|
7717
7634
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7718
7635
|
CurrentUserContext.Provider,
|
|
7719
7636
|
{
|
|
@@ -7784,7 +7701,7 @@ function AddUserToRoleInternal({ role, refresh }) {
|
|
|
7784
7701
|
const data = useDataListRetriever({
|
|
7785
7702
|
ready: !!company && show,
|
|
7786
7703
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkPQBKPWBYjs.UserService.findAllUsers(params), "retriever"),
|
|
7787
|
-
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess',
|
|
7704
|
+
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _203 => _203.id]) },
|
|
7788
7705
|
module: _chunkPQBKPWBYjs.Modules.User
|
|
7789
7706
|
});
|
|
7790
7707
|
_react.useEffect.call(void 0, () => {
|
|
@@ -7852,10 +7769,10 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
|
|
|
7852
7769
|
onValueChange: setFiles,
|
|
7853
7770
|
dropzoneOptions: dropzone2,
|
|
7854
7771
|
className: "h-40 w-40 rounded-full p-0",
|
|
7855
|
-
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',
|
|
7772
|
+
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', _204 => _204.avatar])) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7856
7773
|
_image2.default,
|
|
7857
7774
|
{
|
|
7858
|
-
src: file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess',
|
|
7775
|
+
src: file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess', _205 => _205.avatar]) || "",
|
|
7859
7776
|
alt: t(`common.avatar`),
|
|
7860
7777
|
width: 200,
|
|
7861
7778
|
height: 200
|
|
@@ -7863,7 +7780,7 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
|
|
|
7863
7780
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, { className: "my-4 h-8 w-8" }) })
|
|
7864
7781
|
}
|
|
7865
7782
|
),
|
|
7866
|
-
!resetImage && (file || _optionalChain([user, 'optionalAccess',
|
|
7783
|
+
!resetImage && (file || _optionalChain([user, 'optionalAccess', _206 => _206.avatar])) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7867
7784
|
Button,
|
|
7868
7785
|
{
|
|
7869
7786
|
className: "",
|
|
@@ -7891,7 +7808,7 @@ function UserDeleterInternal({ user, onDeleted, companyId }) {
|
|
|
7891
7808
|
const router = _chunkJO5BLONKjs.useI18nRouter.call(void 0, );
|
|
7892
7809
|
const _t = _nextintl.useTranslations.call(void 0, );
|
|
7893
7810
|
let cId;
|
|
7894
|
-
if (_optionalChain([currentUser, 'optionalAccess',
|
|
7811
|
+
if (_optionalChain([currentUser, 'optionalAccess', _207 => _207.roles, 'access', _208 => _208.find, 'call', _209 => _209((role) => role.id === _chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator)]) && companyId) {
|
|
7895
7812
|
cId = companyId;
|
|
7896
7813
|
} else {
|
|
7897
7814
|
if (!company) return;
|
|
@@ -7954,18 +7871,18 @@ function UserEditorInternal({
|
|
|
7954
7871
|
}, [company]);
|
|
7955
7872
|
const handleDialogOpenChange = _react.useCallback.call(void 0,
|
|
7956
7873
|
(open) => {
|
|
7957
|
-
if (open && (company || _optionalChain([currentUser, 'optionalAccess',
|
|
7874
|
+
if (open && (company || _optionalChain([currentUser, 'optionalAccess', _210 => _210.roles, 'access', _211 => _211.find, 'call', _212 => _212((role) => role.id === _chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator)])) && roles.length === 0) {
|
|
7958
7875
|
async function fetchRoles() {
|
|
7959
7876
|
const allRoles = await _chunkPQBKPWBYjs.RoleService.findAllRoles({});
|
|
7960
7877
|
const availableRoles = allRoles.filter(
|
|
7961
|
-
(role) => role.id !== _chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator && (role.requiredFeature === void 0 || _optionalChain([company, 'optionalAccess',
|
|
7878
|
+
(role) => role.id !== _chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator && (role.requiredFeature === void 0 || _optionalChain([company, 'optionalAccess', _213 => _213.features, 'access', _214 => _214.some, 'call', _215 => _215((feature) => feature.id === _optionalChain([role, 'access', _216 => _216.requiredFeature, 'optionalAccess', _217 => _217.id]))]))
|
|
7962
7879
|
);
|
|
7963
7880
|
setRoles(availableRoles);
|
|
7964
7881
|
}
|
|
7965
7882
|
_chunk7QVYU63Ejs.__name.call(void 0, fetchRoles, "fetchRoles");
|
|
7966
7883
|
fetchRoles();
|
|
7967
7884
|
}
|
|
7968
|
-
_optionalChain([onDialogOpenChange, 'optionalCall',
|
|
7885
|
+
_optionalChain([onDialogOpenChange, 'optionalCall', _218 => _218(open)]);
|
|
7969
7886
|
},
|
|
7970
7887
|
[company, currentUser, roles.length, onDialogOpenChange]
|
|
7971
7888
|
);
|
|
@@ -7999,29 +7916,29 @@ function UserEditorInternal({
|
|
|
7999
7916
|
);
|
|
8000
7917
|
const getDefaultValues = _react.useCallback.call(void 0, () => {
|
|
8001
7918
|
return {
|
|
8002
|
-
id: _optionalChain([user, 'optionalAccess',
|
|
8003
|
-
name: _optionalChain([user, 'optionalAccess',
|
|
8004
|
-
title: _optionalChain([user, 'optionalAccess',
|
|
8005
|
-
bio: _optionalChain([user, 'optionalAccess',
|
|
8006
|
-
email: _optionalChain([user, 'optionalAccess',
|
|
8007
|
-
phone: _optionalChain([user, 'optionalAccess',
|
|
7919
|
+
id: _optionalChain([user, 'optionalAccess', _219 => _219.id]) || _uuid.v4.call(void 0, ),
|
|
7920
|
+
name: _optionalChain([user, 'optionalAccess', _220 => _220.name]) || "",
|
|
7921
|
+
title: _optionalChain([user, 'optionalAccess', _221 => _221.title]) || "",
|
|
7922
|
+
bio: _optionalChain([user, 'optionalAccess', _222 => _222.bio]) || "",
|
|
7923
|
+
email: _optionalChain([user, 'optionalAccess', _223 => _223.email]) || "",
|
|
7924
|
+
phone: _optionalChain([user, 'optionalAccess', _224 => _224.phone]) || "",
|
|
8008
7925
|
password: "",
|
|
8009
|
-
roleIds: _optionalChain([user, 'optionalAccess',
|
|
7926
|
+
roleIds: _optionalChain([user, 'optionalAccess', _225 => _225.roles, 'access', _226 => _226.map, 'call', _227 => _227((role) => role.id)]) || [],
|
|
8010
7927
|
sendInvitationEmail: false,
|
|
8011
|
-
avatar: _optionalChain([user, 'optionalAccess',
|
|
7928
|
+
avatar: _optionalChain([user, 'optionalAccess', _228 => _228.avatarUrl]) || ""
|
|
8012
7929
|
};
|
|
8013
7930
|
}, [user]);
|
|
8014
7931
|
const form = _reacthookform.useForm.call(void 0, {
|
|
8015
7932
|
resolver: _zod.zodResolver.call(void 0, formSchema),
|
|
8016
7933
|
defaultValues: getDefaultValues()
|
|
8017
7934
|
});
|
|
8018
|
-
const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess',
|
|
7935
|
+
const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess', _229 => _229.id]) === _optionalChain([user, 'optionalAccess', _230 => _230.id]) && hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator)) && (hasPermissionToModule({ module: _chunkPQBKPWBYjs.Modules.User, action: "update" /* Update */ }) || hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator));
|
|
8019
7936
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8020
7937
|
EditorSheet,
|
|
8021
7938
|
{
|
|
8022
7939
|
form,
|
|
8023
7940
|
entityType: t(`entities.users`, { count: 1 }),
|
|
8024
|
-
entityName: _optionalChain([user, 'optionalAccess',
|
|
7941
|
+
entityName: _optionalChain([user, 'optionalAccess', _231 => _231.name]),
|
|
8025
7942
|
isEdit: !!user,
|
|
8026
7943
|
module: _chunkPQBKPWBYjs.Modules.User,
|
|
8027
7944
|
propagateChanges,
|
|
@@ -8073,7 +7990,7 @@ function UserEditorInternal({
|
|
|
8073
7990
|
adminCreated
|
|
8074
7991
|
};
|
|
8075
7992
|
const updatedUser = user ? await _chunkPQBKPWBYjs.UserService.update(payload) : await _chunkPQBKPWBYjs.UserService.create(payload);
|
|
8076
|
-
if (_optionalChain([currentUser, 'optionalAccess',
|
|
7993
|
+
if (_optionalChain([currentUser, 'optionalAccess', _232 => _232.id]) === updatedUser.id) setUser(updatedUser);
|
|
8077
7994
|
return updatedUser;
|
|
8078
7995
|
},
|
|
8079
7996
|
onRevalidate,
|
|
@@ -8327,7 +8244,7 @@ function EntityMultiSelector({
|
|
|
8327
8244
|
if (open) {
|
|
8328
8245
|
setSearchTerm("");
|
|
8329
8246
|
requestAnimationFrame(() => {
|
|
8330
|
-
_optionalChain([searchInputRef, 'access',
|
|
8247
|
+
_optionalChain([searchInputRef, 'access', _233 => _233.current, 'optionalAccess', _234 => _234.focus, 'call', _235 => _235()]);
|
|
8331
8248
|
});
|
|
8332
8249
|
}
|
|
8333
8250
|
}, [open]);
|
|
@@ -8344,7 +8261,7 @@ function EntityMultiSelector({
|
|
|
8344
8261
|
form.setValue(id, next, { shouldDirty: true, shouldTouch: true });
|
|
8345
8262
|
const cb = onChangeRef.current;
|
|
8346
8263
|
if (cb) {
|
|
8347
|
-
const fullData = next.map((v) => _optionalChain([options, 'access',
|
|
8264
|
+
const fullData = next.map((v) => _optionalChain([options, 'access', _236 => _236.find, 'call', _237 => _237((opt) => opt.id === v.id), 'optionalAccess', _238 => _238.entityData])).filter(Boolean);
|
|
8348
8265
|
cb(fullData);
|
|
8349
8266
|
}
|
|
8350
8267
|
},
|
|
@@ -8357,7 +8274,7 @@ function EntityMultiSelector({
|
|
|
8357
8274
|
form.setValue(id, next, { shouldDirty: true, shouldTouch: true });
|
|
8358
8275
|
const cb = onChangeRef.current;
|
|
8359
8276
|
if (cb) {
|
|
8360
|
-
const fullData = next.map((v) => _optionalChain([options, 'access',
|
|
8277
|
+
const fullData = next.map((v) => _optionalChain([options, 'access', _239 => _239.find, 'call', _240 => _240((opt) => opt.id === v.id), 'optionalAccess', _241 => _241.entityData])).filter(Boolean);
|
|
8361
8278
|
cb(fullData);
|
|
8362
8279
|
}
|
|
8363
8280
|
},
|
|
@@ -8501,11 +8418,11 @@ function UserMultiSelect({
|
|
|
8501
8418
|
emptyText: t("ui.search.no_results", { type: t("entities.users", { count: 2 }) }),
|
|
8502
8419
|
isRequired,
|
|
8503
8420
|
retriever: (params) => _chunkPQBKPWBYjs.UserService.findAllUsers(params),
|
|
8504
|
-
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess',
|
|
8421
|
+
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _242 => _242.id]) },
|
|
8505
8422
|
module: _chunkPQBKPWBYjs.Modules.User,
|
|
8506
8423
|
getLabel: (user) => user.name,
|
|
8507
8424
|
toFormValue: (user) => ({ id: user.id, name: user.name, avatar: user.avatar }),
|
|
8508
|
-
excludeId: _optionalChain([currentUser, 'optionalAccess',
|
|
8425
|
+
excludeId: _optionalChain([currentUser, 'optionalAccess', _243 => _243.id]),
|
|
8509
8426
|
onChange,
|
|
8510
8427
|
renderOption: (user) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
|
|
8511
8428
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatarIcon, { url: user.avatar, name: user.name }),
|
|
@@ -8804,14 +8721,6 @@ function ErrorDetails({ title, message, code }) {
|
|
|
8804
8721
|
}
|
|
8805
8722
|
_chunk7QVYU63Ejs.__name.call(void 0, ErrorDetails, "ErrorDetails");
|
|
8806
8723
|
|
|
8807
|
-
// src/components/errors/errorToast.ts
|
|
8808
|
-
function errorToast(params) {
|
|
8809
|
-
_chunkPQBKPWBYjs.showError.call(void 0, _nullishCoalesce(_optionalChain([params, 'optionalAccess', _249 => _249.title]), () => ( "Error")), {
|
|
8810
|
-
description: params.error instanceof Error ? params.error.message : String(params.error)
|
|
8811
|
-
});
|
|
8812
|
-
}
|
|
8813
|
-
_chunk7QVYU63Ejs.__name.call(void 0, errorToast, "errorToast");
|
|
8814
|
-
|
|
8815
8724
|
// src/components/forms/CommonDeleter.tsx
|
|
8816
8725
|
|
|
8817
8726
|
function CommonDeleter({
|
|
@@ -8845,7 +8754,12 @@ function CommonDeleter({
|
|
|
8845
8754
|
setIsDeleting(false);
|
|
8846
8755
|
}, "handleDelete");
|
|
8847
8756
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, AlertDialog, { open, onOpenChange: setOpen, children: [
|
|
8848
|
-
forceShow ? null :
|
|
8757
|
+
forceShow ? null : _react.isValidElement.call(void 0, trigger) ? (
|
|
8758
|
+
// A caller-supplied element trigger must REPLACE the trigger's own
|
|
8759
|
+
// <button> via `render` — wrapping it as a child would nest a <button>
|
|
8760
|
+
// inside AlertDialogTrigger's <button> (invalid HTML / hydration error).
|
|
8761
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogTrigger, { render: trigger })
|
|
8762
|
+
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogTrigger, { children: trigger || /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8849
8763
|
Button,
|
|
8850
8764
|
{
|
|
8851
8765
|
render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}),
|
|
@@ -9257,7 +9171,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9257
9171
|
}, []);
|
|
9258
9172
|
const [prevRange, setPrevRange] = _react.useState.call(void 0, date);
|
|
9259
9173
|
_react.useEffect.call(void 0, () => {
|
|
9260
|
-
if (_optionalChain([date, 'optionalAccess',
|
|
9174
|
+
if (_optionalChain([date, 'optionalAccess', _244 => _244.from]) && _optionalChain([date, 'optionalAccess', _245 => _245.to]) && date.to > date.from && (_optionalChain([prevRange, 'optionalAccess', _246 => _246.from, 'optionalAccess', _247 => _247.getTime, 'call', _248 => _248()]) !== date.from.getTime() || _optionalChain([prevRange, 'optionalAccess', _249 => _249.to, 'optionalAccess', _250 => _250.getTime, 'call', _251 => _251()]) !== date.to.getTime())) {
|
|
9261
9175
|
onDateChange(date);
|
|
9262
9176
|
setPrevRange(date);
|
|
9263
9177
|
setOpen(false);
|
|
@@ -9268,7 +9182,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9268
9182
|
setDate(void 0);
|
|
9269
9183
|
return;
|
|
9270
9184
|
}
|
|
9271
|
-
if (range.from && (!_optionalChain([date, 'optionalAccess',
|
|
9185
|
+
if (range.from && (!_optionalChain([date, 'optionalAccess', _252 => _252.from]) || range.from.getTime() !== date.from.getTime())) {
|
|
9272
9186
|
setDate({ from: range.from, to: void 0 });
|
|
9273
9187
|
} else {
|
|
9274
9188
|
setDate(range);
|
|
@@ -9283,7 +9197,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9283
9197
|
className: _chunkPQBKPWBYjs.cn.call(void 0, "w-[300px] justify-start text-left font-normal", !date && "text-muted-foreground"),
|
|
9284
9198
|
children: [
|
|
9285
9199
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
|
|
9286
|
-
_optionalChain([date, 'optionalAccess',
|
|
9200
|
+
_optionalChain([date, 'optionalAccess', _253 => _253.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
9287
9201
|
_datefns.format.call(void 0, date.from, "LLL dd, y"),
|
|
9288
9202
|
" - ",
|
|
9289
9203
|
_datefns.format.call(void 0, date.to, "LLL dd, y")
|
|
@@ -9306,7 +9220,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9306
9220
|
),
|
|
9307
9221
|
children: [
|
|
9308
9222
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
|
|
9309
|
-
_optionalChain([date, 'optionalAccess',
|
|
9223
|
+
_optionalChain([date, 'optionalAccess', _254 => _254.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
9310
9224
|
_datefns.format.call(void 0, date.from, "LLL dd, y"),
|
|
9311
9225
|
" - ",
|
|
9312
9226
|
_datefns.format.call(void 0, date.to, "LLL dd, y")
|
|
@@ -9319,7 +9233,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9319
9233
|
Calendar,
|
|
9320
9234
|
{
|
|
9321
9235
|
mode: "range",
|
|
9322
|
-
defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess',
|
|
9236
|
+
defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess', _255 => _255.from]), () => ( (showPreviousMonth ? new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() - 1, 1) : void 0))),
|
|
9323
9237
|
selected: date,
|
|
9324
9238
|
onSelect: handleSelect,
|
|
9325
9239
|
numberOfMonths: 2
|
|
@@ -9358,26 +9272,26 @@ function useEditorDialog(isFormDirty, options) {
|
|
|
9358
9272
|
const [showDiscardConfirm, setShowDiscardConfirm] = _react.useState.call(void 0, false);
|
|
9359
9273
|
const syncingFromProp = _react.useRef.call(void 0, false);
|
|
9360
9274
|
_react.useEffect.call(void 0, () => {
|
|
9361
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
9275
|
+
if (_optionalChain([options, 'optionalAccess', _256 => _256.dialogOpen]) !== void 0 && options.dialogOpen !== open) {
|
|
9362
9276
|
syncingFromProp.current = true;
|
|
9363
9277
|
setOpen(options.dialogOpen);
|
|
9364
9278
|
}
|
|
9365
|
-
}, [_optionalChain([options, 'optionalAccess',
|
|
9366
|
-
const onDialogOpenChangeRef = _react.useRef.call(void 0, _optionalChain([options, 'optionalAccess',
|
|
9367
|
-
onDialogOpenChangeRef.current = _optionalChain([options, 'optionalAccess',
|
|
9279
|
+
}, [_optionalChain([options, 'optionalAccess', _257 => _257.dialogOpen])]);
|
|
9280
|
+
const onDialogOpenChangeRef = _react.useRef.call(void 0, _optionalChain([options, 'optionalAccess', _258 => _258.onDialogOpenChange]));
|
|
9281
|
+
onDialogOpenChangeRef.current = _optionalChain([options, 'optionalAccess', _259 => _259.onDialogOpenChange]);
|
|
9368
9282
|
_react.useEffect.call(void 0, () => {
|
|
9369
9283
|
if (syncingFromProp.current) {
|
|
9370
9284
|
syncingFromProp.current = false;
|
|
9371
9285
|
return;
|
|
9372
9286
|
}
|
|
9373
|
-
_optionalChain([onDialogOpenChangeRef, 'access',
|
|
9287
|
+
_optionalChain([onDialogOpenChangeRef, 'access', _260 => _260.current, 'optionalCall', _261 => _261(open)]);
|
|
9374
9288
|
}, [open]);
|
|
9375
9289
|
_react.useEffect.call(void 0, () => {
|
|
9376
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
9377
|
-
}, [_optionalChain([options, 'optionalAccess',
|
|
9290
|
+
if (_optionalChain([options, 'optionalAccess', _262 => _262.forceShow])) setOpen(true);
|
|
9291
|
+
}, [_optionalChain([options, 'optionalAccess', _263 => _263.forceShow])]);
|
|
9378
9292
|
_react.useEffect.call(void 0, () => {
|
|
9379
9293
|
if (!open) {
|
|
9380
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
9294
|
+
if (_optionalChain([options, 'optionalAccess', _264 => _264.onClose])) options.onClose();
|
|
9381
9295
|
}
|
|
9382
9296
|
}, [open]);
|
|
9383
9297
|
const handleOpenChange = _react.useCallback.call(void 0,
|
|
@@ -9470,7 +9384,7 @@ function EditorSheet({
|
|
|
9470
9384
|
hasBeenOpen.current = true;
|
|
9471
9385
|
} else if (hasBeenOpen.current) {
|
|
9472
9386
|
form.reset(onReset());
|
|
9473
|
-
_optionalChain([onClose, 'optionalCall',
|
|
9387
|
+
_optionalChain([onClose, 'optionalCall', _265 => _265()]);
|
|
9474
9388
|
}
|
|
9475
9389
|
}, [open]);
|
|
9476
9390
|
const wrappedOnSubmit = _react.useCallback.call(void 0,
|
|
@@ -9484,11 +9398,11 @@ function EditorSheet({
|
|
|
9484
9398
|
if (onSuccess) {
|
|
9485
9399
|
await onSuccess();
|
|
9486
9400
|
} else if (result) {
|
|
9487
|
-
_optionalChain([onRevalidate, 'optionalCall',
|
|
9401
|
+
_optionalChain([onRevalidate, 'optionalCall', _266 => _266(generateUrl({ page: module, id: result.id, language: "[locale]" }))]);
|
|
9488
9402
|
if (propagateChanges) {
|
|
9489
9403
|
propagateChanges(result);
|
|
9490
9404
|
} else {
|
|
9491
|
-
_optionalChain([onNavigate, 'optionalCall',
|
|
9405
|
+
_optionalChain([onNavigate, 'optionalCall', _267 => _267(generateUrl({ page: module, id: result.id }))]);
|
|
9492
9406
|
}
|
|
9493
9407
|
}
|
|
9494
9408
|
} catch (error) {
|
|
@@ -9680,7 +9594,7 @@ function EntitySelector({
|
|
|
9680
9594
|
{
|
|
9681
9595
|
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" : ""}`,
|
|
9682
9596
|
children: [
|
|
9683
|
-
/* @__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',
|
|
9597
|
+
/* @__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', _268 => _268.name]), () => ( "")) : placeholder }),
|
|
9684
9598
|
hasValue(effectiveValue) && !disabled && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9685
9599
|
_lucidereact.CircleX,
|
|
9686
9600
|
{
|
|
@@ -9815,7 +9729,7 @@ var FileUploader = _react.forwardRef.call(void 0,
|
|
|
9815
9729
|
movePrev();
|
|
9816
9730
|
} else if (e.key === "Enter" || e.key === "Space") {
|
|
9817
9731
|
if (activeIndex === -1) {
|
|
9818
|
-
_optionalChain([dropzoneState, 'access',
|
|
9732
|
+
_optionalChain([dropzoneState, 'access', _269 => _269.inputRef, 'access', _270 => _270.current, 'optionalAccess', _271 => _271.click, 'call', _272 => _272()]);
|
|
9819
9733
|
}
|
|
9820
9734
|
} else if (e.key === "Delete" || e.key === "Backspace") {
|
|
9821
9735
|
if (activeIndex !== -1) {
|
|
@@ -9853,13 +9767,13 @@ var FileUploader = _react.forwardRef.call(void 0,
|
|
|
9853
9767
|
onValueChange(newValues);
|
|
9854
9768
|
if (rejectedFiles.length > 0) {
|
|
9855
9769
|
for (let i = 0; i < rejectedFiles.length; i++) {
|
|
9856
|
-
if (_optionalChain([rejectedFiles, 'access',
|
|
9770
|
+
if (_optionalChain([rejectedFiles, 'access', _273 => _273[i], 'access', _274 => _274.errors, 'access', _275 => _275[0], 'optionalAccess', _276 => _276.code]) === "file-too-large") {
|
|
9857
9771
|
_chunkPQBKPWBYjs.showError.call(void 0, t("common.errors.file"), {
|
|
9858
9772
|
description: t(`common.errors.file_max`, { size: maxSize / 1024 / 1024 })
|
|
9859
9773
|
});
|
|
9860
9774
|
break;
|
|
9861
9775
|
}
|
|
9862
|
-
if (_optionalChain([rejectedFiles, 'access',
|
|
9776
|
+
if (_optionalChain([rejectedFiles, 'access', _277 => _277[i], 'access', _278 => _278.errors, 'access', _279 => _279[0], 'optionalAccess', _280 => _280.message])) {
|
|
9863
9777
|
_chunkPQBKPWBYjs.showError.call(void 0, t(`common.errors.file`), {
|
|
9864
9778
|
description: rejectedFiles[i].errors[0].message
|
|
9865
9779
|
});
|
|
@@ -10056,7 +9970,7 @@ FileInput.displayName = "FileInput";
|
|
|
10056
9970
|
var _dynamic = require('next/dynamic'); var _dynamic2 = _interopRequireDefault(_dynamic);
|
|
10057
9971
|
|
|
10058
9972
|
|
|
10059
|
-
var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-
|
|
9973
|
+
var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-EFAIYNH2.js"))), {
|
|
10060
9974
|
ssr: false
|
|
10061
9975
|
});
|
|
10062
9976
|
var BlockNoteEditorContainer = React.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function EditorContainer(props) {
|
|
@@ -10121,7 +10035,7 @@ function FormBlockNote({
|
|
|
10121
10035
|
onChange: (content, isEmpty) => {
|
|
10122
10036
|
lastEditorContentRef.current = content;
|
|
10123
10037
|
field.onChange(content);
|
|
10124
|
-
_optionalChain([onEmptyChange, 'optionalCall',
|
|
10038
|
+
_optionalChain([onEmptyChange, 'optionalCall', _281 => _281(isEmpty)]);
|
|
10125
10039
|
},
|
|
10126
10040
|
placeholder,
|
|
10127
10041
|
bordered: true,
|
|
@@ -10785,11 +10699,11 @@ function FormPlaceAutocomplete({
|
|
|
10785
10699
|
const data = await response.json();
|
|
10786
10700
|
if (data.suggestions) {
|
|
10787
10701
|
const formattedSuggestions = data.suggestions.map((suggestion) => ({
|
|
10788
|
-
place_id: _optionalChain([suggestion, 'access',
|
|
10789
|
-
description: _optionalChain([suggestion, 'access',
|
|
10702
|
+
place_id: _optionalChain([suggestion, 'access', _282 => _282.placePrediction, 'optionalAccess', _283 => _283.placeId]) || "",
|
|
10703
|
+
description: _optionalChain([suggestion, 'access', _284 => _284.placePrediction, 'optionalAccess', _285 => _285.text, 'optionalAccess', _286 => _286.text]) || "",
|
|
10790
10704
|
structured_formatting: {
|
|
10791
|
-
main_text: _optionalChain([suggestion, 'access',
|
|
10792
|
-
secondary_text: _optionalChain([suggestion, 'access',
|
|
10705
|
+
main_text: _optionalChain([suggestion, 'access', _287 => _287.placePrediction, 'optionalAccess', _288 => _288.structuredFormat, 'optionalAccess', _289 => _289.mainText, 'optionalAccess', _290 => _290.text]) || "",
|
|
10706
|
+
secondary_text: _optionalChain([suggestion, 'access', _291 => _291.placePrediction, 'optionalAccess', _292 => _292.structuredFormat, 'optionalAccess', _293 => _293.secondaryText, 'optionalAccess', _294 => _294.text]) || ""
|
|
10793
10707
|
}
|
|
10794
10708
|
}));
|
|
10795
10709
|
setSuggestions(formattedSuggestions);
|
|
@@ -10847,7 +10761,7 @@ function FormPlaceAutocomplete({
|
|
|
10847
10761
|
}
|
|
10848
10762
|
}
|
|
10849
10763
|
return result;
|
|
10850
|
-
} catch (
|
|
10764
|
+
} catch (e6) {
|
|
10851
10765
|
return defaults;
|
|
10852
10766
|
}
|
|
10853
10767
|
}, "fetchPlaceDetails");
|
|
@@ -10936,8 +10850,8 @@ function FormPlaceAutocomplete({
|
|
|
10936
10850
|
className: "hover:bg-muted cursor-pointer px-3 py-2 text-sm",
|
|
10937
10851
|
onClick: () => handleSuggestionSelect(suggestion),
|
|
10938
10852
|
children: [
|
|
10939
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access',
|
|
10940
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access',
|
|
10853
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access', _295 => _295.structured_formatting, 'optionalAccess', _296 => _296.main_text]) }),
|
|
10854
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access', _297 => _297.structured_formatting, 'optionalAccess', _298 => _298.secondary_text]) })
|
|
10941
10855
|
]
|
|
10942
10856
|
},
|
|
10943
10857
|
suggestion.place_id || index
|
|
@@ -10985,7 +10899,7 @@ function FormSelect({
|
|
|
10985
10899
|
disabled,
|
|
10986
10900
|
"data-testid": testId,
|
|
10987
10901
|
children: [
|
|
10988
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: field.value ? _optionalChain([values, 'access',
|
|
10902
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: field.value ? _optionalChain([values, 'access', _299 => _299.find, 'call', _300 => _300((v) => v.id === field.value), 'optionalAccess', _301 => _301.text]) : _nullishCoalesce(placeholder, () => ( "")) }) }),
|
|
10989
10903
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SelectContent, { children: [
|
|
10990
10904
|
allowEmpty && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: EMPTY_VALUE, className: "text-muted-foreground", children: _nullishCoalesce(placeholder, () => ( "")) }),
|
|
10991
10905
|
values.map((type) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: type.id, children: type.text }, type.id))
|
|
@@ -11137,7 +11051,7 @@ function UserAvatar({ user, className, showFull, showLink, showTooltip = true })
|
|
|
11137
11051
|
}, "getInitials");
|
|
11138
11052
|
const getAvatar = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
11139
11053
|
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: [
|
|
11140
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess',
|
|
11054
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess', _302 => _302.avatar]) }),
|
|
11141
11055
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: getInitials3(user.name) })
|
|
11142
11056
|
] }) });
|
|
11143
11057
|
}, "getAvatar");
|
|
@@ -11328,7 +11242,7 @@ var useUserTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
|
|
|
11328
11242
|
})
|
|
11329
11243
|
};
|
|
11330
11244
|
const columns = _react.useMemo.call(void 0, () => {
|
|
11331
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
11245
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _303 => _303[field], 'optionalCall', _304 => _304()])).filter((col) => col !== void 0);
|
|
11332
11246
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
11333
11247
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
11334
11248
|
}, "useUserTableStructure");
|
|
@@ -11442,10 +11356,10 @@ function UserSelector({ id, form, label, placeholder, onChange, isRequired = fal
|
|
|
11442
11356
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
|
|
11443
11357
|
/* @__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: [
|
|
11444
11358
|
/* @__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: [
|
|
11445
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access',
|
|
11446
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access',
|
|
11359
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access', _305 => _305.value, 'optionalAccess', _306 => _306.avatar]) }),
|
|
11360
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access', _307 => _307.value, 'optionalAccess', _308 => _308.name]) ? _optionalChain([field, 'access', _309 => _309.value, 'optionalAccess', _310 => _310.name, 'access', _311 => _311.split, 'call', _312 => _312(" "), 'access', _313 => _313.map, 'call', _314 => _314((name) => name.charAt(0).toUpperCase())]) : "X" })
|
|
11447
11361
|
] }) }),
|
|
11448
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access',
|
|
11362
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _315 => _315.value, 'optionalAccess', _316 => _316.name]), () => ( "")) })
|
|
11449
11363
|
] }) : /* @__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 }) }))) }) }) }),
|
|
11450
11364
|
field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
11451
11365
|
_lucidereact.CircleX,
|
|
@@ -11608,6 +11522,7 @@ function UserContent({ user }) {
|
|
|
11608
11522
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
11609
11523
|
const generateUrl = usePageUrlGenerator();
|
|
11610
11524
|
const { setUser } = useUserContext();
|
|
11525
|
+
const { company } = useCurrentUserContext();
|
|
11611
11526
|
const hasBio = !!user.bio;
|
|
11612
11527
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-8", children: [
|
|
11613
11528
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-start gap-x-6", children: [
|
|
@@ -11623,6 +11538,7 @@ function UserContent({ user }) {
|
|
|
11623
11538
|
const updated = await _chunkPQBKPWBYjs.UserService.patchAvatar({ id: user.id, avatar: imageKey });
|
|
11624
11539
|
setUser(updated);
|
|
11625
11540
|
},
|
|
11541
|
+
companyId: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _317 => _317.id]), () => ( "")),
|
|
11626
11542
|
className: "h-24 w-24",
|
|
11627
11543
|
fallbackClassName: "text-2xl"
|
|
11628
11544
|
}
|
|
@@ -11776,7 +11692,7 @@ function CompanyUsersList({ isDeleted, fullWidth }) {
|
|
|
11776
11692
|
const data = useDataListRetriever({
|
|
11777
11693
|
ready: !!company,
|
|
11778
11694
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkPQBKPWBYjs.UserService.findAllUsers(params), "retriever"),
|
|
11779
|
-
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess',
|
|
11695
|
+
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _318 => _318.id]), isDeleted },
|
|
11780
11696
|
module: _chunkPQBKPWBYjs.Modules.User
|
|
11781
11697
|
});
|
|
11782
11698
|
_react.useEffect.call(void 0, () => {
|
|
@@ -11883,11 +11799,11 @@ function UserListInAdd({ data, existingUsers, setSelectedUser, setLevelOpen }) {
|
|
|
11883
11799
|
className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
|
|
11884
11800
|
onClick: (_e) => {
|
|
11885
11801
|
setSelectedUser(user);
|
|
11886
|
-
_optionalChain([setLevelOpen, 'optionalCall',
|
|
11802
|
+
_optionalChain([setLevelOpen, 'optionalCall', _319 => _319(true)]);
|
|
11887
11803
|
},
|
|
11888
11804
|
onSelect: (_e) => {
|
|
11889
11805
|
setSelectedUser(user);
|
|
11890
|
-
_optionalChain([setLevelOpen, 'optionalCall',
|
|
11806
|
+
_optionalChain([setLevelOpen, 'optionalCall', _320 => _320(true)]);
|
|
11891
11807
|
},
|
|
11892
11808
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between px-4 py-1", children: [
|
|
11893
11809
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user }),
|
|
@@ -11957,7 +11873,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, UsersListByContentIds, "UsersListByContentI
|
|
|
11957
11873
|
function parseFiscalData(fiscalDataJson) {
|
|
11958
11874
|
try {
|
|
11959
11875
|
return fiscalDataJson ? JSON.parse(fiscalDataJson) : {};
|
|
11960
|
-
} catch (
|
|
11876
|
+
} catch (e7) {
|
|
11961
11877
|
return {};
|
|
11962
11878
|
}
|
|
11963
11879
|
}
|
|
@@ -12018,7 +11934,7 @@ function CompanyContent({ company, actions }) {
|
|
|
12018
11934
|
company.legal_address
|
|
12019
11935
|
] }),
|
|
12020
11936
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
|
|
12021
|
-
_optionalChain([company, 'access',
|
|
11937
|
+
_optionalChain([company, 'access', _321 => _321.configurations, 'optionalAccess', _322 => _322.country]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
|
|
12022
11938
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
|
|
12023
11939
|
t("features.configuration.country"),
|
|
12024
11940
|
":"
|
|
@@ -12026,7 +11942,7 @@ function CompanyContent({ company, actions }) {
|
|
|
12026
11942
|
" ",
|
|
12027
11943
|
company.configurations.country
|
|
12028
11944
|
] }),
|
|
12029
|
-
_optionalChain([company, 'access',
|
|
11945
|
+
_optionalChain([company, 'access', _323 => _323.configurations, 'optionalAccess', _324 => _324.currency]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
|
|
12030
11946
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
|
|
12031
11947
|
t("features.configuration.currency"),
|
|
12032
11948
|
":"
|
|
@@ -12436,7 +12352,7 @@ function CompanyEditorInternal({
|
|
|
12436
12352
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
12437
12353
|
const fiscalRef = _react.useRef.call(void 0, null);
|
|
12438
12354
|
const addressComponentsRef = _react.useRef.call(void 0, {});
|
|
12439
|
-
const canAccessFeatures = hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access',
|
|
12355
|
+
const canAccessFeatures = hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access', _325 => _325.env, 'access', _326 => _326.NEXT_PUBLIC_PRIVATE_INSTALLATION, 'optionalAccess', _327 => _327.toLowerCase, 'call', _328 => _328()]) === "true";
|
|
12440
12356
|
const handleDialogOpenChange = _react.useCallback.call(void 0,
|
|
12441
12357
|
(open) => {
|
|
12442
12358
|
if (open && features.length === 0 && canAccessFeatures) {
|
|
@@ -12451,7 +12367,7 @@ function CompanyEditorInternal({
|
|
|
12451
12367
|
_chunk7QVYU63Ejs.__name.call(void 0, fetchFeatures, "fetchFeatures");
|
|
12452
12368
|
fetchFeatures();
|
|
12453
12369
|
}
|
|
12454
|
-
_optionalChain([onDialogOpenChange, 'optionalCall',
|
|
12370
|
+
_optionalChain([onDialogOpenChange, 'optionalCall', _329 => _329(open)]);
|
|
12455
12371
|
},
|
|
12456
12372
|
[features.length, canAccessFeatures, hasRole, onDialogOpenChange]
|
|
12457
12373
|
);
|
|
@@ -12496,12 +12412,12 @@ function CompanyEditorInternal({
|
|
|
12496
12412
|
);
|
|
12497
12413
|
const getDefaultValues = _react.useCallback.call(void 0, () => {
|
|
12498
12414
|
return {
|
|
12499
|
-
id: _optionalChain([company, 'optionalAccess',
|
|
12500
|
-
name: _optionalChain([company, 'optionalAccess',
|
|
12501
|
-
featureIds: _optionalChain([company, 'optionalAccess',
|
|
12502
|
-
moduleIds: _optionalChain([company, 'optionalAccess',
|
|
12503
|
-
logo: _optionalChain([company, 'optionalAccess',
|
|
12504
|
-
legal_address: _optionalChain([company, 'optionalAccess',
|
|
12415
|
+
id: _optionalChain([company, 'optionalAccess', _330 => _330.id]) || _uuid.v4.call(void 0, ),
|
|
12416
|
+
name: _optionalChain([company, 'optionalAccess', _331 => _331.name]) || "",
|
|
12417
|
+
featureIds: _optionalChain([company, 'optionalAccess', _332 => _332.features, 'access', _333 => _333.map, 'call', _334 => _334((feature) => feature.id)]) || [],
|
|
12418
|
+
moduleIds: _optionalChain([company, 'optionalAccess', _335 => _335.modules, 'access', _336 => _336.map, 'call', _337 => _337((module) => module.id)]) || [],
|
|
12419
|
+
logo: _optionalChain([company, 'optionalAccess', _338 => _338.logo]) || "",
|
|
12420
|
+
legal_address: _optionalChain([company, 'optionalAccess', _339 => _339.legal_address]) || ""
|
|
12505
12421
|
};
|
|
12506
12422
|
}, [company]);
|
|
12507
12423
|
const form = _reacthookform.useForm.call(void 0, {
|
|
@@ -12513,7 +12429,7 @@ function CompanyEditorInternal({
|
|
|
12513
12429
|
{
|
|
12514
12430
|
form,
|
|
12515
12431
|
entityType: t(`entities.companies`, { count: 1 }),
|
|
12516
|
-
entityName: _optionalChain([company, 'optionalAccess',
|
|
12432
|
+
entityName: _optionalChain([company, 'optionalAccess', _340 => _340.name]),
|
|
12517
12433
|
isEdit: !!company,
|
|
12518
12434
|
module: _chunkPQBKPWBYjs.Modules.Company,
|
|
12519
12435
|
propagateChanges,
|
|
@@ -12538,7 +12454,7 @@ function CompanyEditorInternal({
|
|
|
12538
12454
|
throw new Error("Fiscal data validation failed");
|
|
12539
12455
|
}
|
|
12540
12456
|
const payload = {
|
|
12541
|
-
id: _nullishCoalesce(_optionalChain([company, 'optionalAccess',
|
|
12457
|
+
id: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _341 => _341.id]), () => ( _uuid.v4.call(void 0, ))),
|
|
12542
12458
|
name: values.name,
|
|
12543
12459
|
logo: files && contentType ? values.logo : void 0,
|
|
12544
12460
|
featureIds: values.featureIds,
|
|
@@ -12569,10 +12485,10 @@ function CompanyEditorInternal({
|
|
|
12569
12485
|
dialogOpen,
|
|
12570
12486
|
onDialogOpenChange: handleDialogOpenChange,
|
|
12571
12487
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-start justify-between gap-x-4", children: [
|
|
12572
|
-
/* @__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-neutral-300 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',
|
|
12488
|
+
/* @__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-neutral-300 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', _342 => _342.logo]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12573
12489
|
_image2.default,
|
|
12574
12490
|
{
|
|
12575
|
-
src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess',
|
|
12491
|
+
src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess', _343 => _343.logo]) || "",
|
|
12576
12492
|
alt: "Company Logo",
|
|
12577
12493
|
width: 200,
|
|
12578
12494
|
height: 200
|
|
@@ -12606,7 +12522,7 @@ function CompanyEditorInternal({
|
|
|
12606
12522
|
}
|
|
12607
12523
|
),
|
|
12608
12524
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mt-2 text-sm font-semibold", children: t(`company.sections.fiscal_data`) }),
|
|
12609
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess',
|
|
12525
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess', _344 => _344.fiscal_data])) })
|
|
12610
12526
|
] }),
|
|
12611
12527
|
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 }) }) })
|
|
12612
12528
|
] })
|
|
@@ -12723,7 +12639,7 @@ function NotificationToast(notification, t, generateUrl, reouter) {
|
|
|
12723
12639
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
12724
12640
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
|
|
12725
12641
|
strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
|
|
12726
|
-
actor: _nullishCoalesce(_optionalChain([data, 'access',
|
|
12642
|
+
actor: _nullishCoalesce(_optionalChain([data, 'access', _345 => _345.actor, 'optionalAccess', _346 => _346.name]), () => ( "")),
|
|
12727
12643
|
title: data.title,
|
|
12728
12644
|
message: _nullishCoalesce(notification.message, () => ( ""))
|
|
12729
12645
|
}) }),
|
|
@@ -12752,7 +12668,7 @@ function NotificationMenuItem({ notification, closePopover }) {
|
|
|
12752
12668
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
12753
12669
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
|
|
12754
12670
|
strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
|
|
12755
|
-
actor: _nullishCoalesce(_optionalChain([data, 'access',
|
|
12671
|
+
actor: _nullishCoalesce(_optionalChain([data, 'access', _347 => _347.actor, 'optionalAccess', _348 => _348.name]), () => ( "")),
|
|
12756
12672
|
title: data.title,
|
|
12757
12673
|
message: _nullishCoalesce(notification.message, () => ( ""))
|
|
12758
12674
|
}) }),
|
|
@@ -12816,7 +12732,7 @@ var NotificationContextProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(v
|
|
|
12816
12732
|
_react.useEffect.call(void 0, () => {
|
|
12817
12733
|
if (hasInitiallyLoaded || !currentUser) return;
|
|
12818
12734
|
if (_chunkJO5BLONKjs.isRolesConfigured.call(void 0, )) {
|
|
12819
|
-
const isAdmin = _optionalChain([currentUser, 'access',
|
|
12735
|
+
const isAdmin = _optionalChain([currentUser, 'access', _349 => _349.roles, 'optionalAccess', _350 => _350.some, 'call', _351 => _351((role) => role.id === _chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator)]);
|
|
12820
12736
|
if (isAdmin) {
|
|
12821
12737
|
setHasInitiallyLoaded(true);
|
|
12822
12738
|
return;
|
|
@@ -13018,7 +12934,7 @@ function OnboardingProvider({
|
|
|
13018
12934
|
let tourSteps = steps;
|
|
13019
12935
|
if (!tourSteps) {
|
|
13020
12936
|
const tour2 = tours.find((t) => t.id === tourId);
|
|
13021
|
-
tourSteps = _optionalChain([tour2, 'optionalAccess',
|
|
12937
|
+
tourSteps = _optionalChain([tour2, 'optionalAccess', _352 => _352.steps]);
|
|
13022
12938
|
}
|
|
13023
12939
|
if (!tourSteps || tourSteps.length === 0) {
|
|
13024
12940
|
console.warn(`No steps found for tour: ${tourId}`);
|
|
@@ -13086,10 +13002,10 @@ function OnboardingProvider({
|
|
|
13086
13002
|
when: {
|
|
13087
13003
|
show: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
13088
13004
|
setCurrentStepIndex(index);
|
|
13089
|
-
_optionalChain([stepConfig, 'access',
|
|
13005
|
+
_optionalChain([stepConfig, 'access', _353 => _353.onShow, 'optionalCall', _354 => _354()]);
|
|
13090
13006
|
}, "show"),
|
|
13091
13007
|
hide: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
13092
|
-
_optionalChain([stepConfig, 'access',
|
|
13008
|
+
_optionalChain([stepConfig, 'access', _355 => _355.onHide, 'optionalCall', _356 => _356()]);
|
|
13093
13009
|
}, "hide")
|
|
13094
13010
|
}
|
|
13095
13011
|
});
|
|
@@ -13255,7 +13171,7 @@ function HowToMultiSelector({
|
|
|
13255
13171
|
retriever: (params) => _chunkPQBKPWBYjs.HowToService.findMany(params),
|
|
13256
13172
|
module: _chunkPQBKPWBYjs.Modules.HowTo,
|
|
13257
13173
|
getLabel: (howTo) => howTo.name,
|
|
13258
|
-
excludeId: _optionalChain([currentHowTo, 'optionalAccess',
|
|
13174
|
+
excludeId: _optionalChain([currentHowTo, 'optionalAccess', _357 => _357.id]),
|
|
13259
13175
|
onChange
|
|
13260
13176
|
}
|
|
13261
13177
|
);
|
|
@@ -13363,17 +13279,17 @@ function HowToEditorInternal({
|
|
|
13363
13279
|
);
|
|
13364
13280
|
const getDefaultValues = _react.useCallback.call(void 0,
|
|
13365
13281
|
() => ({
|
|
13366
|
-
id: _optionalChain([howTo, 'optionalAccess',
|
|
13367
|
-
name: _optionalChain([howTo, 'optionalAccess',
|
|
13368
|
-
description: _optionalChain([howTo, 'optionalAccess',
|
|
13369
|
-
pages: _chunkPQBKPWBYjs.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess',
|
|
13370
|
-
howToType: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
13371
|
-
slug: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
13372
|
-
order: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
13373
|
-
summary: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
13374
|
-
tags: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
13375
|
-
contextualKeys: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
13376
|
-
draft: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess',
|
|
13282
|
+
id: _optionalChain([howTo, 'optionalAccess', _358 => _358.id]) || _uuid.v4.call(void 0, ),
|
|
13283
|
+
name: _optionalChain([howTo, 'optionalAccess', _359 => _359.name]) || "",
|
|
13284
|
+
description: _optionalChain([howTo, 'optionalAccess', _360 => _360.description]) || [],
|
|
13285
|
+
pages: _chunkPQBKPWBYjs.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess', _361 => _361.pages])),
|
|
13286
|
+
howToType: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _362 => _362.howToType]), () => ( "how-to")),
|
|
13287
|
+
slug: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _363 => _363.slug]), () => ( "")),
|
|
13288
|
+
order: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _364 => _364.order]), () => ( 0)),
|
|
13289
|
+
summary: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _365 => _365.summary]), () => ( "")),
|
|
13290
|
+
tags: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _366 => _366.tags]), () => ( []))).join(", "),
|
|
13291
|
+
contextualKeys: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _367 => _367.contextualKeys]), () => ( []))).join(", "),
|
|
13292
|
+
draft: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _368 => _368.draft]), () => ( false)),
|
|
13377
13293
|
relatedArticles: []
|
|
13378
13294
|
}),
|
|
13379
13295
|
[howTo]
|
|
@@ -13384,7 +13300,7 @@ function HowToEditorInternal({
|
|
|
13384
13300
|
});
|
|
13385
13301
|
const initialRelatedIds = _react.useRef.call(void 0, []);
|
|
13386
13302
|
_react.useEffect.call(void 0, () => {
|
|
13387
|
-
if (!_optionalChain([howTo, 'optionalAccess',
|
|
13303
|
+
if (!_optionalChain([howTo, 'optionalAccess', _369 => _369.howToType]) || !_optionalChain([howTo, 'optionalAccess', _370 => _370.slug])) return;
|
|
13388
13304
|
let active = true;
|
|
13389
13305
|
_chunkPQBKPWBYjs.HowToService.findRelated({ howToType: howTo.howToType, slug: howTo.slug }).then((list) => {
|
|
13390
13306
|
if (!active) return;
|
|
@@ -13423,7 +13339,7 @@ function HowToEditorInternal({
|
|
|
13423
13339
|
{
|
|
13424
13340
|
form,
|
|
13425
13341
|
entityType: t(`entities.howtos`, { count: 1 }),
|
|
13426
|
-
entityName: _optionalChain([howTo, 'optionalAccess',
|
|
13342
|
+
entityName: _optionalChain([howTo, 'optionalAccess', _371 => _371.name]),
|
|
13427
13343
|
isEdit: !!howTo,
|
|
13428
13344
|
module: _chunkPQBKPWBYjs.Modules.HowTo,
|
|
13429
13345
|
propagateChanges,
|
|
@@ -13804,7 +13720,7 @@ function withPatchedTitle(source, title) {
|
|
|
13804
13720
|
return _chunkPQBKPWBYjs.rehydrate.call(void 0, _chunkPQBKPWBYjs.Modules.Assistant, {
|
|
13805
13721
|
jsonApi: {
|
|
13806
13722
|
...dehydrated.jsonApi,
|
|
13807
|
-
attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access',
|
|
13723
|
+
attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _372 => _372.jsonApi, 'optionalAccess', _373 => _373.attributes]), () => ( {})), title }
|
|
13808
13724
|
},
|
|
13809
13725
|
included: dehydrated.included
|
|
13810
13726
|
});
|
|
@@ -13825,7 +13741,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
|
|
|
13825
13741
|
const [status, setStatus] = _react.useState.call(void 0, void 0);
|
|
13826
13742
|
const [failedMessageIds, setFailedMessageIds] = _react.useState.call(void 0, () => /* @__PURE__ */ new Set());
|
|
13827
13743
|
const [operatorMode, setOperatorMode] = _react.useState.call(void 0,
|
|
13828
|
-
() => _optionalChain([dehydratedAssistant, 'optionalAccess',
|
|
13744
|
+
() => _optionalChain([dehydratedAssistant, 'optionalAccess', _374 => _374.jsonApi, 'optionalAccess', _375 => _375.attributes, 'optionalAccess', _376 => _376.engine]) === "operator"
|
|
13829
13745
|
);
|
|
13830
13746
|
const { socket } = useSocketContext();
|
|
13831
13747
|
const sendMessage = _react.useCallback.call(void 0,
|
|
@@ -13834,7 +13750,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
|
|
|
13834
13750
|
if (!trimmed) return;
|
|
13835
13751
|
const optimistic = _chunkPQBKPWBYjs.AssistantMessage.buildOptimistic({
|
|
13836
13752
|
content: trimmed,
|
|
13837
|
-
assistantId: _optionalChain([assistant, 'optionalAccess',
|
|
13753
|
+
assistantId: _optionalChain([assistant, 'optionalAccess', _377 => _377.id]),
|
|
13838
13754
|
position: nextPosition(messages)
|
|
13839
13755
|
});
|
|
13840
13756
|
setMessages((prev) => [...prev, optimistic]);
|
|
@@ -13844,13 +13760,13 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
|
|
|
13844
13760
|
if (assistant && payload.assistantId && payload.assistantId !== assistant.id) return;
|
|
13845
13761
|
if (typeof payload.status === "string") setStatus(payload.status);
|
|
13846
13762
|
}, "handler");
|
|
13847
|
-
_optionalChain([socket, 'optionalAccess',
|
|
13763
|
+
_optionalChain([socket, 'optionalAccess', _378 => _378.on, 'call', _379 => _379("assistant:status", handler)]);
|
|
13848
13764
|
try {
|
|
13849
13765
|
if (!assistant) {
|
|
13850
13766
|
const input = {
|
|
13851
13767
|
firstMessage: trimmed,
|
|
13852
|
-
howToMode: _optionalChain([opts, 'optionalAccess',
|
|
13853
|
-
limitToHowToId: _optionalChain([opts, 'optionalAccess',
|
|
13768
|
+
howToMode: _optionalChain([opts, 'optionalAccess', _380 => _380.howToMode]),
|
|
13769
|
+
limitToHowToId: _optionalChain([opts, 'optionalAccess', _381 => _381.limitToHowToId])
|
|
13854
13770
|
};
|
|
13855
13771
|
const created = operatorMode ? await _chunkPQBKPWBYjs.AssistantService.createOperator(input) : await _chunkPQBKPWBYjs.AssistantService.create(input);
|
|
13856
13772
|
const msgs = await _chunkPQBKPWBYjs.AssistantMessageService.findByAssistant({ assistantId: created.id });
|
|
@@ -13867,19 +13783,19 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
|
|
|
13867
13783
|
}) : await _chunkPQBKPWBYjs.AssistantService.appendMessage({
|
|
13868
13784
|
assistantId: assistant.id,
|
|
13869
13785
|
content: trimmed,
|
|
13870
|
-
howToMode: _optionalChain([opts, 'optionalAccess',
|
|
13871
|
-
limitToHowToId: _optionalChain([opts, 'optionalAccess',
|
|
13786
|
+
howToMode: _optionalChain([opts, 'optionalAccess', _382 => _382.howToMode]),
|
|
13787
|
+
limitToHowToId: _optionalChain([opts, 'optionalAccess', _383 => _383.limitToHowToId])
|
|
13872
13788
|
});
|
|
13873
13789
|
setMessages((prev) => [...stripOptimistic(prev), ...result]);
|
|
13874
13790
|
}
|
|
13875
|
-
} catch (
|
|
13791
|
+
} catch (e8) {
|
|
13876
13792
|
setFailedMessageIds((prev) => {
|
|
13877
13793
|
const next = new Set(prev);
|
|
13878
13794
|
next.add(optimistic.id);
|
|
13879
13795
|
return next;
|
|
13880
13796
|
});
|
|
13881
13797
|
} finally {
|
|
13882
|
-
_optionalChain([socket, 'optionalAccess',
|
|
13798
|
+
_optionalChain([socket, 'optionalAccess', _384 => _384.off, 'call', _385 => _385("assistant:status", handler)]);
|
|
13883
13799
|
setSending(false);
|
|
13884
13800
|
setStatus(void 0);
|
|
13885
13801
|
}
|
|
@@ -13937,7 +13853,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
|
|
|
13937
13853
|
await _chunkPQBKPWBYjs.AssistantService.delete({ id });
|
|
13938
13854
|
setThreads((prev) => prev.filter((t2) => t2.id !== id));
|
|
13939
13855
|
setAssistant((prev) => {
|
|
13940
|
-
if (_optionalChain([prev, 'optionalAccess',
|
|
13856
|
+
if (_optionalChain([prev, 'optionalAccess', _386 => _386.id]) === id) {
|
|
13941
13857
|
setMessages([]);
|
|
13942
13858
|
return void 0;
|
|
13943
13859
|
}
|
|
@@ -14044,194 +13960,287 @@ var useCommonContext = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () =
|
|
|
14044
13960
|
return context;
|
|
14045
13961
|
}, "useCommonContext");
|
|
14046
13962
|
|
|
14047
|
-
// src/
|
|
13963
|
+
// src/atoms/recentPagesAtom.ts
|
|
14048
13964
|
|
|
13965
|
+
var recentPagesAtom = _utils.atomWithStorage.call(void 0, "recentPages", []);
|
|
14049
13966
|
|
|
14050
|
-
|
|
14051
|
-
|
|
14052
|
-
});
|
|
14053
|
-
|
|
14054
|
-
|
|
14055
|
-
|
|
14056
|
-
|
|
14057
|
-
|
|
14058
|
-
|
|
14059
|
-
|
|
13967
|
+
// src/hooks/useNotificationSync.ts
|
|
13968
|
+
function useNotificationSync() {
|
|
13969
|
+
const { socketNotifications, clearSocketNotifications } = useSocketContext();
|
|
13970
|
+
const { addSocketNotifications } = useNotificationContext();
|
|
13971
|
+
_react.useEffect.call(void 0, () => {
|
|
13972
|
+
if (socketNotifications.length > 0) {
|
|
13973
|
+
try {
|
|
13974
|
+
addSocketNotifications(socketNotifications);
|
|
13975
|
+
clearSocketNotifications();
|
|
13976
|
+
} catch (error) {
|
|
13977
|
+
console.error("\u{1F4A5} [useNotificationSync] Error processing notifications:", error);
|
|
13978
|
+
}
|
|
13979
|
+
}
|
|
13980
|
+
}, [socketNotifications, addSocketNotifications, clearSocketNotifications]);
|
|
14060
13981
|
}
|
|
14061
|
-
_chunk7QVYU63Ejs.__name.call(void 0,
|
|
13982
|
+
_chunk7QVYU63Ejs.__name.call(void 0, useNotificationSync, "useNotificationSync");
|
|
14062
13983
|
|
|
14063
|
-
// src/
|
|
13984
|
+
// src/hooks/usePageTracker.ts
|
|
14064
13985
|
|
|
14065
13986
|
|
|
14066
|
-
var HeaderLeftContentContext = _react.createContext.call(void 0, {
|
|
14067
|
-
headerLeftContent: null
|
|
14068
|
-
});
|
|
14069
|
-
function HeaderLeftContentProvider({ children, content }) {
|
|
14070
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HeaderLeftContentContext.Provider, { value: { headerLeftContent: content }, children });
|
|
14071
|
-
}
|
|
14072
|
-
_chunk7QVYU63Ejs.__name.call(void 0, HeaderLeftContentProvider, "HeaderLeftContentProvider");
|
|
14073
|
-
function useHeaderLeftContent() {
|
|
14074
|
-
const context = _react.useContext.call(void 0, HeaderLeftContentContext);
|
|
14075
|
-
return context.headerLeftContent;
|
|
14076
|
-
}
|
|
14077
|
-
_chunk7QVYU63Ejs.__name.call(void 0, useHeaderLeftContent, "useHeaderLeftContent");
|
|
14078
13987
|
|
|
14079
|
-
|
|
13988
|
+
var EXCLUDED_ROUTES = ["/", "/login", "/register", "/forgot-password", "/reset-password", "/activate"];
|
|
13989
|
+
function usePageTracker() {
|
|
13990
|
+
const pathname = _navigation.usePathname.call(void 0, );
|
|
13991
|
+
const [_recentPages, setRecentPages] = _jotai.useAtom.call(void 0, recentPagesAtom);
|
|
13992
|
+
_react.useEffect.call(void 0, () => {
|
|
13993
|
+
if (!pathname) return;
|
|
13994
|
+
if (EXCLUDED_ROUTES.some((route) => pathname === route || pathname.endsWith(route))) {
|
|
13995
|
+
return;
|
|
13996
|
+
}
|
|
13997
|
+
const pathParts = pathname.split("/").filter(Boolean);
|
|
13998
|
+
if (pathParts.length === 0) return;
|
|
13999
|
+
const moduleName = pathParts[0];
|
|
14000
|
+
const entityId = pathParts.length > 1 ? pathParts[1] : null;
|
|
14001
|
+
if (!entityId) return;
|
|
14002
|
+
const trackablePages = _chunkJO5BLONKjs.getTrackablePages.call(void 0, );
|
|
14003
|
+
const foundModule = trackablePages.find((mod) => mod.pageUrl === `/${moduleName}`);
|
|
14004
|
+
if (!foundModule) return;
|
|
14005
|
+
const baseUrl = `/${moduleName}/${entityId}`;
|
|
14006
|
+
let pageTitle = foundModule.name;
|
|
14007
|
+
if (typeof document !== "undefined") {
|
|
14008
|
+
const titleParts = document.title.split("]");
|
|
14009
|
+
if (titleParts[1]) {
|
|
14010
|
+
const cleanTitle = _optionalChain([titleParts, 'access', _387 => _387[1], 'access', _388 => _388.split, 'call', _389 => _389("|"), 'access', _390 => _390[0], 'optionalAccess', _391 => _391.trim, 'call', _392 => _392()]);
|
|
14011
|
+
pageTitle = cleanTitle || foundModule.name;
|
|
14012
|
+
}
|
|
14013
|
+
}
|
|
14014
|
+
const newPage = {
|
|
14015
|
+
url: baseUrl,
|
|
14016
|
+
title: pageTitle,
|
|
14017
|
+
moduleType: foundModule.name,
|
|
14018
|
+
timestamp: Date.now()
|
|
14019
|
+
};
|
|
14020
|
+
setRecentPages((prev) => {
|
|
14021
|
+
const filtered = prev.filter((page) => page.url !== newPage.url);
|
|
14022
|
+
return [newPage, ...filtered].slice(0, 10);
|
|
14023
|
+
});
|
|
14024
|
+
}, [pathname, setRecentPages]);
|
|
14025
|
+
}
|
|
14026
|
+
_chunk7QVYU63Ejs.__name.call(void 0, usePageTracker, "usePageTracker");
|
|
14080
14027
|
|
|
14028
|
+
// src/hooks/usePushNotifications.ts
|
|
14081
14029
|
|
|
14030
|
+
function urlBase64ToUint8Array(base64String) {
|
|
14031
|
+
const padding = "=".repeat((4 - base64String.length % 4) % 4);
|
|
14032
|
+
const base64 = (base64String + padding).replace(/-/g, "+").replace(/_/g, "/");
|
|
14033
|
+
const rawData = window.atob(base64);
|
|
14034
|
+
const outputArray = new Uint8Array(rawData.length);
|
|
14035
|
+
for (let i = 0; i < rawData.length; i++) {
|
|
14036
|
+
outputArray[i] = rawData.charCodeAt(i);
|
|
14037
|
+
}
|
|
14038
|
+
return outputArray;
|
|
14039
|
+
}
|
|
14040
|
+
_chunk7QVYU63Ejs.__name.call(void 0, urlBase64ToUint8Array, "urlBase64ToUint8Array");
|
|
14041
|
+
function usePushNotifications() {
|
|
14042
|
+
const { currentUser, hasRole } = useCurrentUserContext();
|
|
14043
|
+
_react.useEffect.call(void 0, () => {
|
|
14044
|
+
const register = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
14045
|
+
if ("serviceWorker" in navigator && "PushManager" in window) {
|
|
14046
|
+
try {
|
|
14047
|
+
const sessionKey = `push_registered_${_optionalChain([currentUser, 'optionalAccess', _393 => _393.id])}`;
|
|
14048
|
+
const lastRegisteredSubscription = sessionStorage.getItem(sessionKey);
|
|
14049
|
+
const registration = await navigator.serviceWorker.register(`${_chunkJO5BLONKjs.getAppUrl.call(void 0, )}/sw.js`);
|
|
14050
|
+
let permission = Notification.permission;
|
|
14051
|
+
if (permission === "default") {
|
|
14052
|
+
permission = await Notification.requestPermission();
|
|
14053
|
+
}
|
|
14054
|
+
if (permission !== "granted") {
|
|
14055
|
+
return;
|
|
14056
|
+
}
|
|
14057
|
+
const vapidPublicKey = (process.env.NEXT_PUBLIC_VAPID_PUBLIC_KEY || "").trim();
|
|
14058
|
+
if (!vapidPublicKey) {
|
|
14059
|
+
return;
|
|
14060
|
+
}
|
|
14061
|
+
const convertedKey = urlBase64ToUint8Array(vapidPublicKey);
|
|
14062
|
+
await navigator.serviceWorker.ready;
|
|
14063
|
+
let subscription = await registration.pushManager.getSubscription();
|
|
14064
|
+
if (!subscription) {
|
|
14065
|
+
const appServerKey = new Uint8Array(Array.from(convertedKey));
|
|
14066
|
+
subscription = await registration.pushManager.subscribe({
|
|
14067
|
+
userVisibleOnly: true,
|
|
14068
|
+
applicationServerKey: appServerKey
|
|
14069
|
+
});
|
|
14070
|
+
}
|
|
14071
|
+
const plainSubscription = {
|
|
14072
|
+
endpoint: subscription.endpoint,
|
|
14073
|
+
keys: subscription.toJSON().keys
|
|
14074
|
+
};
|
|
14075
|
+
const subscriptionHash = btoa(JSON.stringify(plainSubscription));
|
|
14076
|
+
if (lastRegisteredSubscription !== subscriptionHash) {
|
|
14077
|
+
await _chunkPQBKPWBYjs.PushService.register({ data: plainSubscription });
|
|
14078
|
+
sessionStorage.setItem(sessionKey, subscriptionHash);
|
|
14079
|
+
}
|
|
14080
|
+
} catch (error) {
|
|
14081
|
+
console.error("Error during service worker registration or push subscription:", error);
|
|
14082
|
+
}
|
|
14083
|
+
}
|
|
14084
|
+
}, "register");
|
|
14085
|
+
if (currentUser && !hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator)) register();
|
|
14086
|
+
}, [currentUser]);
|
|
14087
|
+
}
|
|
14088
|
+
_chunk7QVYU63Ejs.__name.call(void 0, usePushNotifications, "usePushNotifications");
|
|
14082
14089
|
|
|
14090
|
+
// src/hooks/useSocket.ts
|
|
14083
14091
|
|
|
14084
|
-
|
|
14085
|
-
|
|
14086
|
-
|
|
14087
|
-
|
|
14088
|
-
|
|
14089
|
-
|
|
14090
|
-
|
|
14091
|
-
|
|
14092
|
-
|
|
14093
|
-
|
|
14094
|
-
|
|
14095
|
-
|
|
14096
|
-
|
|
14097
|
-
|
|
14098
|
-
|
|
14099
|
-
|
|
14100
|
-
|
|
14101
|
-
|
|
14102
|
-
|
|
14103
|
-
|
|
14104
|
-
|
|
14105
|
-
|
|
14106
|
-
|
|
14107
|
-
|
|
14108
|
-
|
|
14109
|
-
|
|
14110
|
-
|
|
14111
|
-
|
|
14112
|
-
|
|
14113
|
-
|
|
14114
|
-
|
|
14115
|
-
|
|
14116
|
-
|
|
14117
|
-
|
|
14118
|
-
|
|
14119
|
-
|
|
14120
|
-
|
|
14121
|
-
|
|
14122
|
-
|
|
14123
|
-
|
|
14124
|
-
|
|
14125
|
-
|
|
14126
|
-
body: file
|
|
14092
|
+
var _socketioclient = require('socket.io-client'); var _socketioclient2 = _interopRequireDefault(_socketioclient);
|
|
14093
|
+
function useSocket({ token }) {
|
|
14094
|
+
const _errorCount = _react.useRef.call(void 0, 0);
|
|
14095
|
+
const shouldConnect = _react.useRef.call(void 0, true);
|
|
14096
|
+
const _hookInstanceId = _react.useRef.call(void 0, Math.random().toString(36).substring(2, 11));
|
|
14097
|
+
const [socket, setSocket] = _react.useState.call(void 0, null);
|
|
14098
|
+
const [isConnected, setIsConnected] = _react.useState.call(void 0, false);
|
|
14099
|
+
const [messages, setMessages] = _react.useState.call(void 0, []);
|
|
14100
|
+
const [socketNotifications, setSocketNotifications] = _react.useState.call(void 0, []);
|
|
14101
|
+
const socketRef = _react.useRef.call(void 0, null);
|
|
14102
|
+
_react.useEffect.call(void 0, () => {
|
|
14103
|
+
if (!token) return;
|
|
14104
|
+
const globalSocketKey = `__socket_${_optionalChain([process, 'access', _394 => _394.env, 'access', _395 => _395.NEXT_PUBLIC_API_URL, 'optionalAccess', _396 => _396.replace, 'call', _397 => _397(/[^a-zA-Z0-9]/g, "_")])}`;
|
|
14105
|
+
if (typeof window !== "undefined") {
|
|
14106
|
+
const _allSocketKeys = Object.keys(window).filter((key) => key.startsWith("__socket_"));
|
|
14107
|
+
const existingSocket = window[globalSocketKey];
|
|
14108
|
+
if (existingSocket) {
|
|
14109
|
+
if (existingSocket.connected) {
|
|
14110
|
+
existingSocket.removeAllListeners();
|
|
14111
|
+
socketRef.current = existingSocket;
|
|
14112
|
+
setSocket(existingSocket);
|
|
14113
|
+
setIsConnected(existingSocket.connected);
|
|
14114
|
+
} else {
|
|
14115
|
+
existingSocket.disconnect();
|
|
14116
|
+
delete window[globalSocketKey];
|
|
14117
|
+
}
|
|
14118
|
+
}
|
|
14119
|
+
}
|
|
14120
|
+
let currentSocket;
|
|
14121
|
+
const isReusing = socketRef.current && socketRef.current.connected;
|
|
14122
|
+
if (isReusing) {
|
|
14123
|
+
currentSocket = socketRef.current;
|
|
14124
|
+
} else {
|
|
14125
|
+
if (!shouldConnect.current) {
|
|
14126
|
+
return;
|
|
14127
|
+
}
|
|
14128
|
+
shouldConnect.current = false;
|
|
14129
|
+
try {
|
|
14130
|
+
currentSocket = _socketioclient2.default.call(void 0, process.env.NEXT_PUBLIC_API_URL, {
|
|
14131
|
+
auth: { token },
|
|
14132
|
+
transports: ["websocket"],
|
|
14133
|
+
timeout: 2e4
|
|
14127
14134
|
});
|
|
14128
|
-
if (
|
|
14129
|
-
|
|
14135
|
+
if (typeof window !== "undefined") {
|
|
14136
|
+
if (currentSocket.id && currentSocket.id !== "undefined") {
|
|
14137
|
+
window[globalSocketKey] = currentSocket;
|
|
14138
|
+
}
|
|
14130
14139
|
}
|
|
14131
|
-
|
|
14132
|
-
|
|
14133
|
-
} catch (
|
|
14134
|
-
|
|
14135
|
-
|
|
14136
|
-
} finally {
|
|
14137
|
-
URL.revokeObjectURL(previewUrl);
|
|
14138
|
-
setIsUploading(false);
|
|
14140
|
+
socketRef.current = currentSocket;
|
|
14141
|
+
setSocket(currentSocket);
|
|
14142
|
+
} catch (e9) {
|
|
14143
|
+
return () => {
|
|
14144
|
+
};
|
|
14139
14145
|
}
|
|
14140
|
-
},
|
|
14141
|
-
[company, generateS3Key, image, isUploading, patchImage, t]
|
|
14142
|
-
);
|
|
14143
|
-
const handleRemove = _react.useCallback.call(void 0, async () => {
|
|
14144
|
-
if (isUploading) return;
|
|
14145
|
-
const previousImage = image;
|
|
14146
|
-
setOptimisticImage("");
|
|
14147
|
-
setIsUploading(true);
|
|
14148
|
-
try {
|
|
14149
|
-
await patchImage("");
|
|
14150
|
-
setOptimisticImage(null);
|
|
14151
|
-
} catch (error) {
|
|
14152
|
-
setOptimisticImage(_nullishCoalesce(previousImage, () => ( null)));
|
|
14153
|
-
errorToast({ title: t("generic.errors.update"), error });
|
|
14154
|
-
} finally {
|
|
14155
|
-
setIsUploading(false);
|
|
14156
14146
|
}
|
|
14157
|
-
|
|
14158
|
-
|
|
14159
|
-
|
|
14160
|
-
|
|
14161
|
-
|
|
14162
|
-
|
|
14163
|
-
|
|
14164
|
-
|
|
14165
|
-
|
|
14166
|
-
|
|
14167
|
-
|
|
14168
|
-
|
|
14169
|
-
|
|
14170
|
-
|
|
14171
|
-
|
|
14147
|
+
const handleConnect = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
14148
|
+
setIsConnected(true);
|
|
14149
|
+
}, "handleConnect");
|
|
14150
|
+
const handleDisconnect = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
14151
|
+
setIsConnected(false);
|
|
14152
|
+
}, "handleDisconnect");
|
|
14153
|
+
const handleMessage = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
|
|
14154
|
+
setMessages((prevMessages) => {
|
|
14155
|
+
const newMessages = [...prevMessages, data];
|
|
14156
|
+
return newMessages;
|
|
14157
|
+
});
|
|
14158
|
+
}, "handleMessage");
|
|
14159
|
+
const handleNotification = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
|
|
14160
|
+
const resource = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _398 => _398.data]), () => ( _optionalChain([data, 'optionalAccess', _399 => _399.jsonApi])));
|
|
14161
|
+
if (!_optionalChain([resource, 'optionalAccess', _400 => _400.type])) {
|
|
14162
|
+
console.warn("[useSocket] ignoring notification with unexpected payload shape", data);
|
|
14163
|
+
return;
|
|
14172
14164
|
}
|
|
14173
|
-
|
|
14174
|
-
|
|
14175
|
-
|
|
14176
|
-
|
|
14177
|
-
|
|
14178
|
-
|
|
14179
|
-
|
|
14180
|
-
|
|
14181
|
-
|
|
14182
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { className: fallbackClassName, children: fallback })
|
|
14183
|
-
] }),
|
|
14184
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
14185
|
-
"div",
|
|
14186
|
-
{
|
|
14187
|
-
className: _chunkPQBKPWBYjs.cn.call(void 0,
|
|
14188
|
-
"absolute inset-0 flex items-center justify-center gap-x-2 rounded-full bg-black/50 opacity-0 transition-opacity group-hover:opacity-100",
|
|
14189
|
-
isUploading && "opacity-100"
|
|
14190
|
-
),
|
|
14191
|
-
children: [
|
|
14192
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14193
|
-
"button",
|
|
14194
|
-
{
|
|
14195
|
-
type: "button",
|
|
14196
|
-
onClick: () => _optionalChain([fileInputRef, 'access', _398 => _398.current, 'optionalAccess', _399 => _399.click, 'call', _400 => _400()]),
|
|
14197
|
-
disabled: isUploading,
|
|
14198
|
-
className: "rounded-full p-2 text-white hover:bg-white/20 disabled:opacity-50",
|
|
14199
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.PencilIcon, { className: "h-4 w-4" })
|
|
14200
|
-
}
|
|
14201
|
-
),
|
|
14202
|
-
displayImage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14203
|
-
"button",
|
|
14204
|
-
{
|
|
14205
|
-
type: "button",
|
|
14206
|
-
onClick: handleRemove,
|
|
14207
|
-
disabled: isUploading,
|
|
14208
|
-
className: "rounded-full p-2 text-white hover:bg-white/20 disabled:opacity-50",
|
|
14209
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Trash2Icon, { className: "h-4 w-4" })
|
|
14210
|
-
}
|
|
14211
|
-
)
|
|
14212
|
-
]
|
|
14165
|
+
const notification = _chunkPQBKPWBYjs.rehydrate.call(void 0, _chunkPQBKPWBYjs.Modules.Notification, {
|
|
14166
|
+
jsonApi: resource,
|
|
14167
|
+
included: _optionalChain([data, 'optionalAccess', _401 => _401.included]) || []
|
|
14168
|
+
});
|
|
14169
|
+
if (notification) {
|
|
14170
|
+
setSocketNotifications((prev) => {
|
|
14171
|
+
const newNotifications = [...prev, notification];
|
|
14172
|
+
return newNotifications;
|
|
14173
|
+
});
|
|
14213
14174
|
}
|
|
14214
|
-
)
|
|
14215
|
-
|
|
14216
|
-
|
|
14217
|
-
|
|
14218
|
-
|
|
14219
|
-
|
|
14220
|
-
|
|
14221
|
-
|
|
14222
|
-
|
|
14223
|
-
|
|
14224
|
-
|
|
14225
|
-
|
|
14226
|
-
|
|
14175
|
+
}, "handleNotification");
|
|
14176
|
+
if (currentSocket) {
|
|
14177
|
+
currentSocket.on("connect", handleConnect);
|
|
14178
|
+
currentSocket.on("disconnect", handleDisconnect);
|
|
14179
|
+
currentSocket.on("message", handleMessage);
|
|
14180
|
+
currentSocket.on("notification", handleNotification);
|
|
14181
|
+
}
|
|
14182
|
+
return () => {
|
|
14183
|
+
shouldConnect.current = true;
|
|
14184
|
+
if (currentSocket) {
|
|
14185
|
+
if (process.env.NODE_ENV === "development") {
|
|
14186
|
+
currentSocket.off("connect", handleConnect);
|
|
14187
|
+
currentSocket.off("disconnect", handleDisconnect);
|
|
14188
|
+
currentSocket.off("message", handleMessage);
|
|
14189
|
+
currentSocket.off("notification", handleNotification);
|
|
14190
|
+
} else {
|
|
14191
|
+
currentSocket.off("connect", handleConnect);
|
|
14192
|
+
currentSocket.off("disconnect", handleDisconnect);
|
|
14193
|
+
currentSocket.off("message", handleMessage);
|
|
14194
|
+
currentSocket.off("notification", handleNotification);
|
|
14195
|
+
currentSocket.disconnect();
|
|
14196
|
+
if (typeof window !== "undefined") {
|
|
14197
|
+
delete window[globalSocketKey];
|
|
14198
|
+
}
|
|
14199
|
+
}
|
|
14200
|
+
}
|
|
14201
|
+
};
|
|
14202
|
+
}, [token]);
|
|
14203
|
+
const sendMessage = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (event, data) => {
|
|
14204
|
+
if (socketRef.current && isConnected) {
|
|
14205
|
+
socketRef.current.emit(event, data);
|
|
14206
|
+
}
|
|
14207
|
+
}, "sendMessage");
|
|
14208
|
+
const removeMessage = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (index) => {
|
|
14209
|
+
setMessages((prevMessages) => {
|
|
14210
|
+
const newMessages = [...prevMessages];
|
|
14211
|
+
newMessages.splice(index, 1);
|
|
14212
|
+
return newMessages;
|
|
14213
|
+
});
|
|
14214
|
+
}, "removeMessage");
|
|
14215
|
+
const removeSocketNotification = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (index) => {
|
|
14216
|
+
setSocketNotifications((prevNotifications) => {
|
|
14217
|
+
const newNotifications = [...prevNotifications];
|
|
14218
|
+
newNotifications.splice(index, 1);
|
|
14219
|
+
return newNotifications;
|
|
14220
|
+
});
|
|
14221
|
+
}, "removeSocketNotification");
|
|
14222
|
+
const clearMessages = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
14223
|
+
setMessages([]);
|
|
14224
|
+
}, "clearMessages");
|
|
14225
|
+
const clearSocketNotifications = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
14226
|
+
setSocketNotifications([]);
|
|
14227
|
+
}, "clearSocketNotifications");
|
|
14228
|
+
return {
|
|
14229
|
+
socket,
|
|
14230
|
+
isConnected,
|
|
14231
|
+
messages,
|
|
14232
|
+
socketNotifications,
|
|
14233
|
+
sendMessage,
|
|
14234
|
+
removeMessage,
|
|
14235
|
+
removeSocketNotification,
|
|
14236
|
+
clearMessages,
|
|
14237
|
+
clearSocketNotifications
|
|
14238
|
+
};
|
|
14227
14239
|
}
|
|
14228
|
-
_chunk7QVYU63Ejs.__name.call(void 0,
|
|
14240
|
+
_chunk7QVYU63Ejs.__name.call(void 0, useSocket, "useSocket");
|
|
14229
14241
|
|
|
14230
14242
|
// src/components/navigations/Breadcrumb.tsx
|
|
14231
14243
|
|
|
14232
|
-
|
|
14233
|
-
|
|
14234
|
-
|
|
14235
14244
|
var ITEMS_TO_DISPLAY = 4;
|
|
14236
14245
|
function BreadcrumbDesktop({
|
|
14237
14246
|
items,
|
|
@@ -14274,7 +14283,7 @@ function BreadcrumbMobile({
|
|
|
14274
14283
|
}
|
|
14275
14284
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenu, { open, onOpenChange: setOpen, children: [
|
|
14276
14285
|
/* @__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: [
|
|
14277
|
-
_optionalChain([lastItem, 'optionalAccess',
|
|
14286
|
+
_optionalChain([lastItem, 'optionalAccess', _402 => _402.name]),
|
|
14278
14287
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronDownIcon, { className: "text-muted-foreground size-3.5" })
|
|
14279
14288
|
] }),
|
|
14280
14289
|
/* @__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)) })
|
|
@@ -14596,7 +14605,7 @@ var railTriggerClass = _chunkPQBKPWBYjs.cn.call(void 0,
|
|
|
14596
14605
|
"data-[state=active]:bg-foreground data-[state=active]:text-background",
|
|
14597
14606
|
"data-[state=active]:font-semibold data-[state=active]:shadow-none"
|
|
14598
14607
|
);
|
|
14599
|
-
var tabValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (tab) => _nullishCoalesce(_nullishCoalesce(tab.sectionKey, () => ( _optionalChain([tab, 'access',
|
|
14608
|
+
var tabValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (tab) => _nullishCoalesce(_nullishCoalesce(tab.sectionKey, () => ( _optionalChain([tab, 'access', _403 => _403.key, 'optionalAccess', _404 => _404.name]))), () => ( tab.label)), "tabValue");
|
|
14600
14609
|
function RoundPageContainer({
|
|
14601
14610
|
module,
|
|
14602
14611
|
id,
|
|
@@ -14615,7 +14624,7 @@ function RoundPageContainer({
|
|
|
14615
14624
|
const [mounted, setMounted] = _react.useState.call(void 0, false);
|
|
14616
14625
|
_react.useEffect.call(void 0, () => {
|
|
14617
14626
|
const match = document.cookie.split("; ").find((row) => row.startsWith(`${DETAILS_COOKIE_NAME}=`));
|
|
14618
|
-
if (_optionalChain([match, 'optionalAccess',
|
|
14627
|
+
if (_optionalChain([match, 'optionalAccess', _405 => _405.split, 'call', _406 => _406("="), 'access', _407 => _407[1]]) === "true") setShowDetailsState(true);
|
|
14619
14628
|
}, []);
|
|
14620
14629
|
_react.useEffect.call(void 0, () => {
|
|
14621
14630
|
setMounted(true);
|
|
@@ -14644,7 +14653,7 @@ function RoundPageContainer({
|
|
|
14644
14653
|
},
|
|
14645
14654
|
[module, id, rewriteUrl]
|
|
14646
14655
|
);
|
|
14647
|
-
const activeFillHeight = _optionalChain([tabs, 'optionalAccess',
|
|
14656
|
+
const activeFillHeight = _optionalChain([tabs, 'optionalAccess', _408 => _408.find, 'call', _409 => _409((t) => tabValue(t) === activeTab), 'optionalAccess', _410 => _410.fillHeight]) === true;
|
|
14648
14657
|
const { ungrouped, groups } = _react.useMemo.call(void 0, () => partitionTabs(_nullishCoalesce(tabs, () => ( []))), [tabs]);
|
|
14649
14658
|
const isReady = mounted && isMobile !== void 0;
|
|
14650
14659
|
if (!isReady) {
|
|
@@ -14720,26 +14729,34 @@ function RoundPageContainer({
|
|
|
14720
14729
|
]
|
|
14721
14730
|
}
|
|
14722
14731
|
) }),
|
|
14723
|
-
/* @__PURE__ */ _jsxruntime.
|
|
14732
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14724
14733
|
"div",
|
|
14725
14734
|
{
|
|
14726
14735
|
className: _chunkPQBKPWBYjs.cn.call(void 0,
|
|
14727
14736
|
`min-w-0 grow`,
|
|
14728
|
-
activeFillHeight ? `flex flex-col overflow-hidden` : `overflow-y-auto`
|
|
14737
|
+
activeFillHeight ? `flex flex-col overflow-hidden` : `overflow-y-auto p-4`
|
|
14729
14738
|
),
|
|
14730
|
-
children:
|
|
14731
|
-
|
|
14732
|
-
|
|
14733
|
-
|
|
14734
|
-
|
|
14735
|
-
|
|
14736
|
-
|
|
14737
|
-
|
|
14738
|
-
|
|
14739
|
-
|
|
14740
|
-
|
|
14741
|
-
|
|
14742
|
-
|
|
14739
|
+
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
14740
|
+
"div",
|
|
14741
|
+
{
|
|
14742
|
+
className: _chunkPQBKPWBYjs.cn.call(void 0,
|
|
14743
|
+
activeFillHeight ? `flex min-h-0 w-full flex-1 flex-col` : `mx-auto w-full max-w-6xl`
|
|
14744
|
+
),
|
|
14745
|
+
children: [
|
|
14746
|
+
header,
|
|
14747
|
+
tabs.map((tab) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14748
|
+
TabsContent,
|
|
14749
|
+
{
|
|
14750
|
+
value: tabValue(tab),
|
|
14751
|
+
className: tab.fillHeight ? `flex min-h-0 w-full flex-1 flex-col` : ``,
|
|
14752
|
+
children: tab.content
|
|
14753
|
+
},
|
|
14754
|
+
tab.label
|
|
14755
|
+
)),
|
|
14756
|
+
children && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex", children })
|
|
14757
|
+
]
|
|
14758
|
+
}
|
|
14759
|
+
)
|
|
14743
14760
|
}
|
|
14744
14761
|
)
|
|
14745
14762
|
] })
|
|
@@ -14926,14 +14943,14 @@ function BlockNoteEditorMentionHoverCard({
|
|
|
14926
14943
|
const entityType = target.dataset.mentionType;
|
|
14927
14944
|
const alias = target.dataset.mentionAlias;
|
|
14928
14945
|
setHovered((prev) => {
|
|
14929
|
-
if (_optionalChain([prev, 'optionalAccess',
|
|
14946
|
+
if (_optionalChain([prev, 'optionalAccess', _411 => _411.id]) === id && _optionalChain([prev, 'optionalAccess', _412 => _412.element]) === target) return prev;
|
|
14930
14947
|
return { id, entityType, alias, element: target };
|
|
14931
14948
|
});
|
|
14932
14949
|
}, "handleMouseOver");
|
|
14933
14950
|
const handleMouseOut = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
|
|
14934
14951
|
const target = e.target.closest("[data-mention-id]");
|
|
14935
14952
|
if (!target) return;
|
|
14936
|
-
const related = _optionalChain([e, 'access',
|
|
14953
|
+
const related = _optionalChain([e, 'access', _413 => _413.relatedTarget, 'optionalAccess', _414 => _414.closest, 'call', _415 => _415("[data-mention-id]")]);
|
|
14937
14954
|
if (related) return;
|
|
14938
14955
|
scheduleClose();
|
|
14939
14956
|
}, "handleMouseOut");
|
|
@@ -14947,7 +14964,7 @@ function BlockNoteEditorMentionHoverCard({
|
|
|
14947
14964
|
}, [containerRef, mentionResolveFn, cancelClose, scheduleClose]);
|
|
14948
14965
|
if (!hovered || !mentionResolveFn) return null;
|
|
14949
14966
|
const resolved = mentionResolveFn(hovered.id, hovered.entityType, hovered.alias);
|
|
14950
|
-
if (!_optionalChain([resolved, 'optionalAccess',
|
|
14967
|
+
if (!_optionalChain([resolved, 'optionalAccess', _416 => _416.HoverContent])) return null;
|
|
14951
14968
|
const ContentComponent = resolved.HoverContent;
|
|
14952
14969
|
const rect = hovered.element.getBoundingClientRect();
|
|
14953
14970
|
return _reactdom.createPortal.call(void 0,
|
|
@@ -14990,28 +15007,28 @@ var parseMentionElement = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
14990
15007
|
}, "parseMentionElement");
|
|
14991
15008
|
var createMentionInlineContentSpec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (resolveFn, disableMention, nameResolver) => {
|
|
14992
15009
|
const MentionExternalHTML = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
|
|
14993
|
-
const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall',
|
|
15010
|
+
const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _417 => _417(props.id, props.entityType, props.alias)]), () => ( props.alias));
|
|
14994
15011
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { "data-mention-id": props.id, "data-mention-type": props.entityType, "data-mention-alias": props.alias, children: [
|
|
14995
15012
|
"@",
|
|
14996
15013
|
displayName
|
|
14997
15014
|
] });
|
|
14998
15015
|
}, "MentionExternalHTML");
|
|
14999
15016
|
const Mention = React.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function Mention2(props) {
|
|
15000
|
-
const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall',
|
|
15017
|
+
const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _418 => _418(props.id, props.entityType, props.alias)]), () => ( props.alias));
|
|
15001
15018
|
if (disableMention) {
|
|
15002
|
-
const resolved2 = _optionalChain([resolveFn, 'optionalCall',
|
|
15003
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess',
|
|
15019
|
+
const resolved2 = _optionalChain([resolveFn, 'optionalCall', _419 => _419(props.id, props.entityType, displayName)]);
|
|
15020
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess', _420 => _420.url]), () => ( "#")), className: "text-primary", children: [
|
|
15004
15021
|
"@",
|
|
15005
15022
|
displayName
|
|
15006
15023
|
] });
|
|
15007
15024
|
}
|
|
15008
|
-
const resolved = _optionalChain([resolveFn, 'optionalCall',
|
|
15009
|
-
if (_optionalChain([resolved, 'optionalAccess',
|
|
15025
|
+
const resolved = _optionalChain([resolveFn, 'optionalCall', _421 => _421(props.id, props.entityType, displayName)]);
|
|
15026
|
+
if (_optionalChain([resolved, 'optionalAccess', _422 => _422.Inline])) {
|
|
15010
15027
|
const Custom = resolved.Inline;
|
|
15011
15028
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Custom, { ...props, alias: displayName });
|
|
15012
15029
|
}
|
|
15013
|
-
const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess',
|
|
15014
|
-
const handleClick = _optionalChain([resolved, 'optionalAccess',
|
|
15030
|
+
const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _423 => _423.url]), () => ( "#"));
|
|
15031
|
+
const handleClick = _optionalChain([resolved, 'optionalAccess', _424 => _424.onActivate]) ? (e) => resolved.onActivate(e, props) : void 0;
|
|
15015
15032
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
15016
15033
|
_link2.default,
|
|
15017
15034
|
{
|
|
@@ -15117,7 +15134,7 @@ function BlockNoteEditorMentionSuggestionMenu({
|
|
|
15117
15134
|
if (!suggestionMenuComponent) return void 0;
|
|
15118
15135
|
const Component2 = suggestionMenuComponent;
|
|
15119
15136
|
const Wrapped = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
|
|
15120
|
-
const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access',
|
|
15137
|
+
const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access', _425 => _425.items, 'access', _426 => _426[0], 'optionalAccess', _427 => _427.title]) === KEEP_OPEN_SENTINEL_TITLE;
|
|
15121
15138
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15122
15139
|
Component2,
|
|
15123
15140
|
{
|
|
@@ -15126,7 +15143,7 @@ function BlockNoteEditorMentionSuggestionMenu({
|
|
|
15126
15143
|
selectedIndex: isSentinelOnly ? void 0 : props.selectedIndex,
|
|
15127
15144
|
onItemClick: (item) => {
|
|
15128
15145
|
if (item.title === KEEP_OPEN_SENTINEL_TITLE) return;
|
|
15129
|
-
_optionalChain([props, 'access',
|
|
15146
|
+
_optionalChain([props, 'access', _428 => _428.onItemClick, 'optionalCall', _429 => _429(item)]);
|
|
15130
15147
|
}
|
|
15131
15148
|
}
|
|
15132
15149
|
);
|
|
@@ -15320,10 +15337,10 @@ var cellId = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
|
|
|
15320
15337
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => params.toggleId ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15321
15338
|
Checkbox,
|
|
15322
15339
|
{
|
|
15323
|
-
checked: _optionalChain([params, 'access',
|
|
15340
|
+
checked: _optionalChain([params, 'access', _430 => _430.checkedIds, 'optionalAccess', _431 => _431.includes, 'call', _432 => _432(row.getValue(params.name))]) || false,
|
|
15324
15341
|
onCheckedChange: (value) => {
|
|
15325
15342
|
row.toggleSelected(!!value);
|
|
15326
|
-
_optionalChain([params, 'access',
|
|
15343
|
+
_optionalChain([params, 'access', _433 => _433.toggleId, 'optionalCall', _434 => _434(row.getValue(params.name))]);
|
|
15327
15344
|
},
|
|
15328
15345
|
"aria-label": "Select row"
|
|
15329
15346
|
}
|
|
@@ -15382,7 +15399,7 @@ function useJsonApiGet(params) {
|
|
|
15382
15399
|
const [response, setResponse] = _react.useState.call(void 0, null);
|
|
15383
15400
|
const isMounted = _react.useRef.call(void 0, true);
|
|
15384
15401
|
const fetchData = _react.useCallback.call(void 0, async () => {
|
|
15385
|
-
if (_optionalChain([params, 'access',
|
|
15402
|
+
if (_optionalChain([params, 'access', _435 => _435.options, 'optionalAccess', _436 => _436.enabled]) === false) return;
|
|
15386
15403
|
setLoading(true);
|
|
15387
15404
|
setError(null);
|
|
15388
15405
|
try {
|
|
@@ -15409,9 +15426,9 @@ function useJsonApiGet(params) {
|
|
|
15409
15426
|
setLoading(false);
|
|
15410
15427
|
}
|
|
15411
15428
|
}
|
|
15412
|
-
}, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access',
|
|
15429
|
+
}, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _437 => _437.options, 'optionalAccess', _438 => _438.enabled])]);
|
|
15413
15430
|
const fetchNextPage = _react.useCallback.call(void 0, async () => {
|
|
15414
|
-
if (!_optionalChain([response, 'optionalAccess',
|
|
15431
|
+
if (!_optionalChain([response, 'optionalAccess', _439 => _439.nextPage])) return;
|
|
15415
15432
|
setLoading(true);
|
|
15416
15433
|
try {
|
|
15417
15434
|
const nextResponse = await response.nextPage();
|
|
@@ -15432,7 +15449,7 @@ function useJsonApiGet(params) {
|
|
|
15432
15449
|
}
|
|
15433
15450
|
}, [response]);
|
|
15434
15451
|
const fetchPreviousPage = _react.useCallback.call(void 0, async () => {
|
|
15435
|
-
if (!_optionalChain([response, 'optionalAccess',
|
|
15452
|
+
if (!_optionalChain([response, 'optionalAccess', _440 => _440.prevPage])) return;
|
|
15436
15453
|
setLoading(true);
|
|
15437
15454
|
try {
|
|
15438
15455
|
const prevResponse = await response.prevPage();
|
|
@@ -15458,15 +15475,15 @@ function useJsonApiGet(params) {
|
|
|
15458
15475
|
return () => {
|
|
15459
15476
|
isMounted.current = false;
|
|
15460
15477
|
};
|
|
15461
|
-
}, [fetchData, ..._optionalChain([params, 'access',
|
|
15478
|
+
}, [fetchData, ..._optionalChain([params, 'access', _441 => _441.options, 'optionalAccess', _442 => _442.deps]) || []]);
|
|
15462
15479
|
return {
|
|
15463
15480
|
data,
|
|
15464
15481
|
loading,
|
|
15465
15482
|
error,
|
|
15466
15483
|
response,
|
|
15467
15484
|
refetch: fetchData,
|
|
15468
|
-
hasNextPage: !!_optionalChain([response, 'optionalAccess',
|
|
15469
|
-
hasPreviousPage: !!_optionalChain([response, 'optionalAccess',
|
|
15485
|
+
hasNextPage: !!_optionalChain([response, 'optionalAccess', _443 => _443.next]),
|
|
15486
|
+
hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _444 => _444.prev]),
|
|
15470
15487
|
fetchNextPage,
|
|
15471
15488
|
fetchPreviousPage
|
|
15472
15489
|
};
|
|
@@ -15544,17 +15561,17 @@ function useJsonApiMutation(config) {
|
|
|
15544
15561
|
if (apiResponse.ok) {
|
|
15545
15562
|
const resultData = apiResponse.data;
|
|
15546
15563
|
setData(resultData);
|
|
15547
|
-
_optionalChain([config, 'access',
|
|
15564
|
+
_optionalChain([config, 'access', _445 => _445.onSuccess, 'optionalCall', _446 => _446(resultData)]);
|
|
15548
15565
|
return resultData;
|
|
15549
15566
|
} else {
|
|
15550
15567
|
setError(apiResponse.error);
|
|
15551
|
-
_optionalChain([config, 'access',
|
|
15568
|
+
_optionalChain([config, 'access', _447 => _447.onError, 'optionalCall', _448 => _448(apiResponse.error)]);
|
|
15552
15569
|
return null;
|
|
15553
15570
|
}
|
|
15554
15571
|
} catch (err) {
|
|
15555
15572
|
const errorMessage = err instanceof Error ? err.message : "Unknown error";
|
|
15556
15573
|
setError(errorMessage);
|
|
15557
|
-
_optionalChain([config, 'access',
|
|
15574
|
+
_optionalChain([config, 'access', _449 => _449.onError, 'optionalCall', _450 => _450(errorMessage)]);
|
|
15558
15575
|
return null;
|
|
15559
15576
|
} finally {
|
|
15560
15577
|
setLoading(false);
|
|
@@ -15627,7 +15644,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
15627
15644
|
{
|
|
15628
15645
|
href: hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator) ? generateUrl({
|
|
15629
15646
|
page: "/administration",
|
|
15630
|
-
id: _optionalChain([_chunkPQBKPWBYjs.Modules, 'access',
|
|
15647
|
+
id: _optionalChain([_chunkPQBKPWBYjs.Modules, 'access', _451 => _451.Company, 'access', _452 => _452.pageUrl, 'optionalAccess', _453 => _453.substring, 'call', _454 => _454(1)]),
|
|
15631
15648
|
childPage: company.id
|
|
15632
15649
|
}) : generateUrl({ page: _chunkPQBKPWBYjs.Modules.Company, id: company.id }),
|
|
15633
15650
|
children: row.getValue("name")
|
|
@@ -15643,7 +15660,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
15643
15660
|
})
|
|
15644
15661
|
};
|
|
15645
15662
|
const columns = _react.useMemo.call(void 0, () => {
|
|
15646
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
15663
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _455 => _455[field], 'optionalCall', _456 => _456()])).filter((col) => col !== void 0);
|
|
15647
15664
|
}, [params.fields, fieldColumnMap, t, generateUrl, hasRole]);
|
|
15648
15665
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
15649
15666
|
}, "useCompanyTableStructure");
|
|
@@ -15655,7 +15672,7 @@ var GRACE_DAYS = 3;
|
|
|
15655
15672
|
var isAdministrator = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (currentUser) => {
|
|
15656
15673
|
if (!currentUser || !_chunkJO5BLONKjs.isRolesConfigured.call(void 0, )) return false;
|
|
15657
15674
|
const adminRoleId = _chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator;
|
|
15658
|
-
return !!_optionalChain([currentUser, 'access',
|
|
15675
|
+
return !!_optionalChain([currentUser, 'access', _457 => _457.roles, 'optionalAccess', _458 => _458.some, 'call', _459 => _459((role) => role.id === adminRoleId)]);
|
|
15659
15676
|
}, "isAdministrator");
|
|
15660
15677
|
function useSubscriptionStatus() {
|
|
15661
15678
|
const { company, currentUser } = useCurrentUserContext();
|
|
@@ -15772,7 +15789,7 @@ var useRoleTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
|
|
|
15772
15789
|
})
|
|
15773
15790
|
};
|
|
15774
15791
|
const columns = _react.useMemo.call(void 0, () => {
|
|
15775
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
15792
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _460 => _460[field], 'optionalCall', _461 => _461()])).filter((col) => col !== void 0);
|
|
15776
15793
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
15777
15794
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
15778
15795
|
}, "useRoleTableStructure");
|
|
@@ -15873,11 +15890,11 @@ var useContentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
15873
15890
|
return params.fields.map((field) => {
|
|
15874
15891
|
const localHandler = fieldColumnMap[field];
|
|
15875
15892
|
if (localHandler) return localHandler();
|
|
15876
|
-
const customHandler = _optionalChain([params, 'access',
|
|
15893
|
+
const customHandler = _optionalChain([params, 'access', _462 => _462.context, 'optionalAccess', _463 => _463.customCells, 'optionalAccess', _464 => _464[field]]);
|
|
15877
15894
|
if (customHandler) return customHandler({ t });
|
|
15878
15895
|
return void 0;
|
|
15879
15896
|
}).filter((col) => col !== void 0);
|
|
15880
|
-
}, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access',
|
|
15897
|
+
}, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _465 => _465.context, 'optionalAccess', _466 => _466.customCells])]);
|
|
15881
15898
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
15882
15899
|
}, "useContentTableStructure");
|
|
15883
15900
|
|
|
@@ -16212,7 +16229,7 @@ function ContentTableSearch({ data }) {
|
|
|
16212
16229
|
const handleSearchIconClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
16213
16230
|
if (!isExpanded) {
|
|
16214
16231
|
setIsFocused(true);
|
|
16215
|
-
setTimeout(() => _optionalChain([inputRef, 'access',
|
|
16232
|
+
setTimeout(() => _optionalChain([inputRef, 'access', _467 => _467.current, 'optionalAccess', _468 => _468.focus, 'call', _469 => _469()]), 50);
|
|
16216
16233
|
}
|
|
16217
16234
|
}, "handleSearchIconClick");
|
|
16218
16235
|
const handleBlur = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
@@ -16291,7 +16308,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
16291
16308
|
props.defaultExpanded === true ? true : typeof props.defaultExpanded === "object" ? props.defaultExpanded : {}
|
|
16292
16309
|
);
|
|
16293
16310
|
const { data: tableData, columns: tableColumns } = useTableGenerator(props.tableGeneratorType, {
|
|
16294
|
-
data: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
16311
|
+
data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _470 => _470.data]), () => ( EMPTY_ARRAY)),
|
|
16295
16312
|
fields,
|
|
16296
16313
|
checkedIds,
|
|
16297
16314
|
toggleId,
|
|
@@ -16324,7 +16341,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
16324
16341
|
});
|
|
16325
16342
|
const rowModel = tableData ? table.getRowModel() : null;
|
|
16326
16343
|
const groupedRows = _react.useMemo.call(void 0, () => {
|
|
16327
|
-
if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess',
|
|
16344
|
+
if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess', _471 => _471.rows, 'optionalAccess', _472 => _472.length])) return null;
|
|
16328
16345
|
const groupMap = /* @__PURE__ */ new Map();
|
|
16329
16346
|
for (const row of rowModel.rows) {
|
|
16330
16347
|
const keys = getGroupKeys(row.original, props.groupBy);
|
|
@@ -16380,10 +16397,10 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
16380
16397
|
) }),
|
|
16381
16398
|
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: headerGroup.headers.map((header) => {
|
|
16382
16399
|
const meta = header.column.columnDef.meta;
|
|
16383
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess',
|
|
16400
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess', _473 => _473.className]), children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
|
|
16384
16401
|
}) }, headerGroup.id))
|
|
16385
16402
|
] }),
|
|
16386
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access',
|
|
16403
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _474 => _474.rows, 'optionalAccess', _475 => _475.length]) ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React.default.Fragment, { children: [
|
|
16387
16404
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16388
16405
|
TableCell,
|
|
16389
16406
|
{
|
|
@@ -16394,11 +16411,11 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
16394
16411
|
) }),
|
|
16395
16412
|
group.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: row.getVisibleCells().map((cell) => {
|
|
16396
16413
|
const meta = cell.column.columnDef.meta;
|
|
16397
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess',
|
|
16414
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _476 => _476.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
|
|
16398
16415
|
}) }, row.id))
|
|
16399
16416
|
] }, group.groupKey)) : rowModel.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: row.getVisibleCells().map((cell) => {
|
|
16400
16417
|
const meta = cell.column.columnDef.meta;
|
|
16401
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess',
|
|
16418
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _477 => _477.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
|
|
16402
16419
|
}) }, row.id)) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { colSpan: tableColumns.length, className: "h-24 text-center", children: _nullishCoalesce(props.emptyState, () => ( "No results.")) }) }) }),
|
|
16403
16420
|
showFooter && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { colSpan: tableColumns.length, className: "bg-card py-4 text-right", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-end space-x-2", children: [
|
|
16404
16421
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -16408,7 +16425,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
16408
16425
|
size: "sm",
|
|
16409
16426
|
onClick: (e) => {
|
|
16410
16427
|
e.preventDefault();
|
|
16411
|
-
_optionalChain([data, 'access',
|
|
16428
|
+
_optionalChain([data, 'access', _478 => _478.previous, 'optionalCall', _479 => _479(true)]);
|
|
16412
16429
|
},
|
|
16413
16430
|
disabled: !data.previous,
|
|
16414
16431
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronLeft, { className: "h-4 w-4" })
|
|
@@ -16422,7 +16439,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
16422
16439
|
size: "sm",
|
|
16423
16440
|
onClick: (e) => {
|
|
16424
16441
|
e.preventDefault();
|
|
16425
|
-
_optionalChain([data, 'access',
|
|
16442
|
+
_optionalChain([data, 'access', _480 => _480.next, 'optionalCall', _481 => _481(true)]);
|
|
16426
16443
|
},
|
|
16427
16444
|
disabled: !data.next,
|
|
16428
16445
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronRight, { className: "h-4 w-4" })
|
|
@@ -16443,7 +16460,7 @@ function ContentListGrid(props) {
|
|
|
16443
16460
|
if (!data.next || !sentinelRef.current) return;
|
|
16444
16461
|
const observer = new IntersectionObserver(
|
|
16445
16462
|
(entries) => {
|
|
16446
|
-
if (_optionalChain([entries, 'access',
|
|
16463
|
+
if (_optionalChain([entries, 'access', _482 => _482[0], 'optionalAccess', _483 => _483.isIntersecting])) _optionalChain([data, 'access', _484 => _484.next, 'optionalCall', _485 => _485()]);
|
|
16447
16464
|
},
|
|
16448
16465
|
{ threshold: 0.1, rootMargin: "200px" }
|
|
16449
16466
|
);
|
|
@@ -16642,6 +16659,94 @@ var ItalianFiscalData = _react.forwardRef.call(void 0, /* @__PURE__ */ _chunk7QV
|
|
|
16642
16659
|
}, "ItalianFiscalData"));
|
|
16643
16660
|
var ItalianFiscalData_default = ItalianFiscalData;
|
|
16644
16661
|
|
|
16662
|
+
// src/components/hero/EntityHeroLayout.tsx
|
|
16663
|
+
|
|
16664
|
+
function EntityHeroLayout({ children, className }) {
|
|
16665
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkPQBKPWBYjs.cn.call(void 0, "flex w-full flex-col gap-y-8", className), children });
|
|
16666
|
+
}
|
|
16667
|
+
_chunk7QVYU63Ejs.__name.call(void 0, EntityHeroLayout, "EntityHeroLayout");
|
|
16668
|
+
|
|
16669
|
+
// src/components/hero/EntityHero.tsx
|
|
16670
|
+
|
|
16671
|
+
function EntityHero({ avatar, children, className }) {
|
|
16672
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunkPQBKPWBYjs.cn.call(void 0, "flex items-start gap-x-6", className), children: [
|
|
16673
|
+
avatar,
|
|
16674
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-col gap-y-2", children })
|
|
16675
|
+
] });
|
|
16676
|
+
}
|
|
16677
|
+
_chunk7QVYU63Ejs.__name.call(void 0, EntityHero, "EntityHero");
|
|
16678
|
+
|
|
16679
|
+
// src/components/hero/EntityHeroAvatar.tsx
|
|
16680
|
+
|
|
16681
|
+
function EntityHeroAvatar({
|
|
16682
|
+
module,
|
|
16683
|
+
entityId,
|
|
16684
|
+
name,
|
|
16685
|
+
image,
|
|
16686
|
+
patchImage,
|
|
16687
|
+
companyId,
|
|
16688
|
+
variant,
|
|
16689
|
+
className = "h-24 w-24"
|
|
16690
|
+
}) {
|
|
16691
|
+
const resolved = _nullishCoalesce(variant, () => ( (patchImage || image ? "image" : "icon")));
|
|
16692
|
+
if (patchImage) {
|
|
16693
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16694
|
+
EditableAvatar,
|
|
16695
|
+
{
|
|
16696
|
+
entityId,
|
|
16697
|
+
module,
|
|
16698
|
+
image,
|
|
16699
|
+
fallback: _chunkPQBKPWBYjs.getInitials.call(void 0, name),
|
|
16700
|
+
alt: name,
|
|
16701
|
+
patchImage,
|
|
16702
|
+
companyId: _nullishCoalesce(companyId, () => ( "")),
|
|
16703
|
+
className,
|
|
16704
|
+
fallbackClassName: "text-2xl"
|
|
16705
|
+
}
|
|
16706
|
+
);
|
|
16707
|
+
}
|
|
16708
|
+
if (resolved === "image" || resolved === "initials") {
|
|
16709
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EntityAvatar, { image: resolved === "image" ? image : void 0, name, className });
|
|
16710
|
+
}
|
|
16711
|
+
const Icon = module.icon;
|
|
16712
|
+
if (!Icon) {
|
|
16713
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EntityAvatar, { name, className });
|
|
16714
|
+
}
|
|
16715
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkPQBKPWBYjs.cn.call(void 0, "bg-muted flex shrink-0 items-center justify-center rounded-full", className), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Icon, { className: "text-primary h-10 w-10" }) });
|
|
16716
|
+
}
|
|
16717
|
+
_chunk7QVYU63Ejs.__name.call(void 0, EntityHeroAvatar, "EntityHeroAvatar");
|
|
16718
|
+
|
|
16719
|
+
// src/components/hero/EntityHeroMetaRow.tsx
|
|
16720
|
+
|
|
16721
|
+
function EntityHeroMetaRow({ icon: Icon, children, className }) {
|
|
16722
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunkPQBKPWBYjs.cn.call(void 0, "text-muted-foreground flex items-center gap-x-2 text-sm", className), children: [
|
|
16723
|
+
Icon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Icon, { className: "h-4 w-4 shrink-0" }) : null,
|
|
16724
|
+
children
|
|
16725
|
+
] });
|
|
16726
|
+
}
|
|
16727
|
+
_chunk7QVYU63Ejs.__name.call(void 0, EntityHeroMetaRow, "EntityHeroMetaRow");
|
|
16728
|
+
|
|
16729
|
+
// src/components/hero/EntitySection.tsx
|
|
16730
|
+
|
|
16731
|
+
function EntitySection({ title, columns, children, className }) {
|
|
16732
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunkPQBKPWBYjs.cn.call(void 0, "flex w-full flex-col gap-y-3", className), children: [
|
|
16733
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-muted-foreground text-xs font-semibold tracking-wider uppercase", children: title }),
|
|
16734
|
+
columns ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16735
|
+
"div",
|
|
16736
|
+
{
|
|
16737
|
+
className: _chunkPQBKPWBYjs.cn.call(void 0,
|
|
16738
|
+
"grid grid-cols-1 gap-4",
|
|
16739
|
+
columns === 2 && "md:grid-cols-2",
|
|
16740
|
+
columns === 3 && "md:grid-cols-3",
|
|
16741
|
+
columns === 4 && "md:grid-cols-4"
|
|
16742
|
+
),
|
|
16743
|
+
children
|
|
16744
|
+
}
|
|
16745
|
+
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-col gap-y-4", children })
|
|
16746
|
+
] });
|
|
16747
|
+
}
|
|
16748
|
+
_chunk7QVYU63Ejs.__name.call(void 0, EntitySection, "EntitySection");
|
|
16749
|
+
|
|
16645
16750
|
// src/features/auth/components/containers/AuthContainer.tsx
|
|
16646
16751
|
|
|
16647
16752
|
|
|
@@ -17193,7 +17298,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
|
17193
17298
|
newDigits[index] = digit;
|
|
17194
17299
|
setDigits(newDigits);
|
|
17195
17300
|
if (digit && index < 5) {
|
|
17196
|
-
_optionalChain([inputRefs, 'access',
|
|
17301
|
+
_optionalChain([inputRefs, 'access', _486 => _486.current, 'access', _487 => _487[index + 1], 'optionalAccess', _488 => _488.focus, 'call', _489 => _489()]);
|
|
17197
17302
|
}
|
|
17198
17303
|
const code = newDigits.join("");
|
|
17199
17304
|
if (code.length === 6 && newDigits.every((d) => d !== "")) {
|
|
@@ -17202,7 +17307,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
|
17202
17307
|
}, "handleChange");
|
|
17203
17308
|
const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (index, e) => {
|
|
17204
17309
|
if (e.key === "Backspace" && !digits[index] && index > 0) {
|
|
17205
|
-
_optionalChain([inputRefs, 'access',
|
|
17310
|
+
_optionalChain([inputRefs, 'access', _490 => _490.current, 'access', _491 => _491[index - 1], 'optionalAccess', _492 => _492.focus, 'call', _493 => _493()]);
|
|
17206
17311
|
}
|
|
17207
17312
|
}, "handleKeyDown");
|
|
17208
17313
|
const handlePaste = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
|
|
@@ -17211,7 +17316,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
|
17211
17316
|
if (pastedData.length === 6) {
|
|
17212
17317
|
const newDigits = pastedData.split("");
|
|
17213
17318
|
setDigits(newDigits);
|
|
17214
|
-
_optionalChain([inputRefs, 'access',
|
|
17319
|
+
_optionalChain([inputRefs, 'access', _494 => _494.current, 'access', _495 => _495[5], 'optionalAccess', _496 => _496.focus, 'call', _497 => _497()]);
|
|
17215
17320
|
onComplete(pastedData);
|
|
17216
17321
|
}
|
|
17217
17322
|
}, "handlePaste");
|
|
@@ -17422,8 +17527,8 @@ function PasskeySetupDialog({ open, onOpenChange, onSuccess }) {
|
|
|
17422
17527
|
try {
|
|
17423
17528
|
const registrationData = await _chunkPQBKPWBYjs.TwoFactorService.getPasskeyRegistrationOptions({
|
|
17424
17529
|
id: _uuid.v4.call(void 0, ),
|
|
17425
|
-
userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess',
|
|
17426
|
-
userDisplayName: _optionalChain([currentUser, 'optionalAccess',
|
|
17530
|
+
userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _498 => _498.email]), () => ( "")),
|
|
17531
|
+
userDisplayName: _optionalChain([currentUser, 'optionalAccess', _499 => _499.name])
|
|
17427
17532
|
});
|
|
17428
17533
|
const credential = await _browser.startRegistration.call(void 0, { optionsJSON: registrationData.options });
|
|
17429
17534
|
await _chunkPQBKPWBYjs.TwoFactorService.verifyPasskeyRegistration({
|
|
@@ -17574,7 +17679,7 @@ function TotpSetupDialog({ onSuccess, trigger }) {
|
|
|
17574
17679
|
const setup = await _chunkPQBKPWBYjs.TwoFactorService.setupTotp({
|
|
17575
17680
|
id: _uuid.v4.call(void 0, ),
|
|
17576
17681
|
name: name.trim(),
|
|
17577
|
-
accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess',
|
|
17682
|
+
accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _500 => _500.email]), () => ( ""))
|
|
17578
17683
|
});
|
|
17579
17684
|
setQrCodeUri(setup.qrCodeUri);
|
|
17580
17685
|
setAuthenticatorId(setup.authenticatorId);
|
|
@@ -17708,7 +17813,7 @@ function TwoFactorSettings() {
|
|
|
17708
17813
|
if (isLoading) {
|
|
17709
17814
|
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") }) }) });
|
|
17710
17815
|
}
|
|
17711
|
-
const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
17816
|
+
const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _501 => _501.isEnabled]), () => ( false));
|
|
17712
17817
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Card, { children: [
|
|
17713
17818
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
|
|
17714
17819
|
isEnabled ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ShieldCheck, { className: "h-6 w-6 text-green-600" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ShieldAlert, { className: "h-6 w-6 text-yellow-600" }),
|
|
@@ -17746,7 +17851,7 @@ function TwoFactorSettings() {
|
|
|
17746
17851
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-medium", children: t("auth.two_factor.backup_codes") }),
|
|
17747
17852
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: t("auth.two_factor.backup_codes_description") })
|
|
17748
17853
|
] }),
|
|
17749
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
17854
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _502 => _502.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
|
|
17750
17855
|
] }) }),
|
|
17751
17856
|
!isEnabled && (authenticators.length > 0 || passkeys.length > 0) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
17752
17857
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Separator, {}),
|
|
@@ -17924,9 +18029,9 @@ function AcceptInvitation() {
|
|
|
17924
18029
|
});
|
|
17925
18030
|
const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
|
|
17926
18031
|
try {
|
|
17927
|
-
if (!_optionalChain([params, 'optionalAccess',
|
|
18032
|
+
if (!_optionalChain([params, 'optionalAccess', _503 => _503.code])) return;
|
|
17928
18033
|
const payload = {
|
|
17929
|
-
code: _optionalChain([params, 'optionalAccess',
|
|
18034
|
+
code: _optionalChain([params, 'optionalAccess', _504 => _504.code]),
|
|
17930
18035
|
password: values.password
|
|
17931
18036
|
};
|
|
17932
18037
|
await _chunkPQBKPWBYjs.AuthService.acceptInvitation(payload);
|
|
@@ -18276,7 +18381,7 @@ function Logout({ storageKeys }) {
|
|
|
18276
18381
|
const generateUrl = usePageUrlGenerator();
|
|
18277
18382
|
_react.useEffect.call(void 0, () => {
|
|
18278
18383
|
const logOut = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
18279
|
-
if (_optionalChain([storageKeys, 'optionalAccess',
|
|
18384
|
+
if (_optionalChain([storageKeys, 'optionalAccess', _505 => _505.length])) {
|
|
18280
18385
|
clearClientStorage(storageKeys);
|
|
18281
18386
|
}
|
|
18282
18387
|
await _chunkPQBKPWBYjs.AuthService.logout();
|
|
@@ -18299,14 +18404,14 @@ function RefreshUser() {
|
|
|
18299
18404
|
setUser(fullUser);
|
|
18300
18405
|
const token = {
|
|
18301
18406
|
userId: fullUser.id,
|
|
18302
|
-
companyId: _optionalChain([fullUser, 'access',
|
|
18407
|
+
companyId: _optionalChain([fullUser, 'access', _506 => _506.company, 'optionalAccess', _507 => _507.id]),
|
|
18303
18408
|
roles: fullUser.roles.map((role) => role.id),
|
|
18304
|
-
features: _nullishCoalesce(_optionalChain([fullUser, 'access',
|
|
18409
|
+
features: _nullishCoalesce(_optionalChain([fullUser, 'access', _508 => _508.company, 'optionalAccess', _509 => _509.features, 'optionalAccess', _510 => _510.map, 'call', _511 => _511((feature) => feature.id)]), () => ( [])),
|
|
18305
18410
|
modules: fullUser.modules.map((module) => {
|
|
18306
18411
|
return { id: module.id, permissions: module.permissions };
|
|
18307
18412
|
})
|
|
18308
18413
|
};
|
|
18309
|
-
await _optionalChain([_chunkPQBKPWBYjs.getTokenHandler.call(void 0, ), 'optionalAccess',
|
|
18414
|
+
await _optionalChain([_chunkPQBKPWBYjs.getTokenHandler.call(void 0, ), 'optionalAccess', _512 => _512.updateToken, 'call', _513 => _513(token)]);
|
|
18310
18415
|
_cookiesnext.deleteCookie.call(void 0, "reloadData");
|
|
18311
18416
|
}
|
|
18312
18417
|
}, "loadFullUser");
|
|
@@ -18370,9 +18475,9 @@ function ResetPassword() {
|
|
|
18370
18475
|
});
|
|
18371
18476
|
const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
|
|
18372
18477
|
try {
|
|
18373
|
-
if (!_optionalChain([params, 'optionalAccess',
|
|
18478
|
+
if (!_optionalChain([params, 'optionalAccess', _514 => _514.code])) return;
|
|
18374
18479
|
const payload = {
|
|
18375
|
-
code: _optionalChain([params, 'optionalAccess',
|
|
18480
|
+
code: _optionalChain([params, 'optionalAccess', _515 => _515.code]),
|
|
18376
18481
|
password: values.password
|
|
18377
18482
|
};
|
|
18378
18483
|
await _chunkPQBKPWBYjs.AuthService.resetPassword(payload);
|
|
@@ -18721,7 +18826,7 @@ function extractHeadings(blocks) {
|
|
|
18721
18826
|
function processBlocks(blockArray) {
|
|
18722
18827
|
for (const block of blockArray) {
|
|
18723
18828
|
if (block.type === "heading") {
|
|
18724
|
-
const level = _optionalChain([block, 'access',
|
|
18829
|
+
const level = _optionalChain([block, 'access', _516 => _516.props, 'optionalAccess', _517 => _517.level]) || 1;
|
|
18725
18830
|
const text = extractTextFromContent(block.content);
|
|
18726
18831
|
if (text.trim()) {
|
|
18727
18832
|
headings.push({
|
|
@@ -19064,7 +19169,7 @@ var useHowToTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
|
|
|
19064
19169
|
})
|
|
19065
19170
|
};
|
|
19066
19171
|
const columns = _react.useMemo.call(void 0, () => {
|
|
19067
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
19172
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _518 => _518[field], 'optionalCall', _519 => _519()])).filter((col) => col !== void 0);
|
|
19068
19173
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
19069
19174
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
19070
19175
|
}, "useHowToTableStructure");
|
|
@@ -19163,7 +19268,7 @@ function HowToSelector({
|
|
|
19163
19268
|
}, "setHowTo");
|
|
19164
19269
|
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: [
|
|
19165
19270
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
|
|
19166
|
-
/* @__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',
|
|
19271
|
+
/* @__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', _520 => _520.value, 'optionalAccess', _521 => _521.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 }) }))) }) }) }),
|
|
19167
19272
|
field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
19168
19273
|
_lucidereact.CircleX,
|
|
19169
19274
|
{
|
|
@@ -19532,9 +19637,9 @@ function CitationsTab({ citations, sources }) {
|
|
|
19532
19637
|
] }) }),
|
|
19533
19638
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: sorted.map((chunk) => {
|
|
19534
19639
|
const isOpen = expanded.has(chunk.id);
|
|
19535
|
-
const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess',
|
|
19640
|
+
const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess', _522 => _522.get, 'call', _523 => _523(chunk.nodeId)]) : void 0;
|
|
19536
19641
|
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")));
|
|
19537
|
-
const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess',
|
|
19642
|
+
const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _524 => _524.name]), () => ( fallbackName));
|
|
19538
19643
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
|
|
19539
19644
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, TableRow, { children: [
|
|
19540
19645
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -19581,7 +19686,7 @@ function ContentsTab({ citations, sources }) {
|
|
|
19581
19686
|
for (const c of citations) {
|
|
19582
19687
|
const id = c.nodeId;
|
|
19583
19688
|
if (!id) continue;
|
|
19584
|
-
const source = _optionalChain([sources, 'optionalAccess',
|
|
19689
|
+
const source = _optionalChain([sources, 'optionalAccess', _525 => _525.get, 'call', _526 => _526(id)]);
|
|
19585
19690
|
if (!source) continue;
|
|
19586
19691
|
const existing = map.get(id);
|
|
19587
19692
|
if (existing) {
|
|
@@ -19648,7 +19753,7 @@ function UsersTab({ users, citations, sources }) {
|
|
|
19648
19753
|
const generate = usePageUrlGenerator();
|
|
19649
19754
|
const userMap = /* @__PURE__ */ new Map();
|
|
19650
19755
|
for (const u of users) {
|
|
19651
|
-
if (!_optionalChain([u, 'optionalAccess',
|
|
19756
|
+
if (!_optionalChain([u, 'optionalAccess', _527 => _527.id])) continue;
|
|
19652
19757
|
userMap.set(u.id, { user: u, contentCount: 0, citationCount: 0 });
|
|
19653
19758
|
}
|
|
19654
19759
|
if (citations && sources) {
|
|
@@ -19753,7 +19858,7 @@ function MessageSourcesPanel({ message, isLatestAssistant, onSelectFollowUp, sou
|
|
|
19753
19858
|
}
|
|
19754
19859
|
return ids.size;
|
|
19755
19860
|
}, [message.citations, sources]);
|
|
19756
|
-
const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess',
|
|
19861
|
+
const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess', _528 => _528.length]), () => ( 0));
|
|
19757
19862
|
const total = refsCount + citationsCount + contentsCount + usersCount + suggestionsCount;
|
|
19758
19863
|
const visibleTabs = [];
|
|
19759
19864
|
if (suggestionsCount > 0) visibleTabs.push("suggested");
|
|
@@ -19813,8 +19918,8 @@ var SourcesFetcher = class extends _chunkPQBKPWBYjs.ClientAbstractService {
|
|
|
19813
19918
|
const endpoint = new (0, _chunkPQBKPWBYjs.EndpointCreator)({ endpoint: params.module });
|
|
19814
19919
|
endpoint.addAdditionalParam(params.idsParam, params.ids.join(","));
|
|
19815
19920
|
endpoint.addAdditionalParam("fetchAll", "true");
|
|
19816
|
-
if (_optionalChain([params, 'access',
|
|
19817
|
-
if (_optionalChain([params, 'access',
|
|
19921
|
+
if (_optionalChain([params, 'access', _529 => _529.module, 'access', _530 => _530.inclusions, 'optionalAccess', _531 => _531.lists, 'optionalAccess', _532 => _532.fields])) endpoint.limitToFields(params.module.inclusions.lists.fields);
|
|
19922
|
+
if (_optionalChain([params, 'access', _533 => _533.module, 'access', _534 => _534.inclusions, 'optionalAccess', _535 => _535.lists, 'optionalAccess', _536 => _536.types])) endpoint.limitToType(params.module.inclusions.lists.types);
|
|
19818
19923
|
return this.callApi({
|
|
19819
19924
|
type: params.module,
|
|
19820
19925
|
method: "GET" /* GET */,
|
|
@@ -19893,7 +19998,7 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
|
|
|
19893
19998
|
return void 0;
|
|
19894
19999
|
}
|
|
19895
20000
|
})()));
|
|
19896
|
-
if (_optionalChain([author, 'optionalAccess',
|
|
20001
|
+
if (_optionalChain([author, 'optionalAccess', _537 => _537.id])) userMap.set(author.id, author);
|
|
19897
20002
|
}
|
|
19898
20003
|
return Array.from(userMap.values());
|
|
19899
20004
|
}, [resolved]);
|
|
@@ -19922,14 +20027,14 @@ function MessageItem({
|
|
|
19922
20027
|
}) {
|
|
19923
20028
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
19924
20029
|
const isUser = message.role === "user";
|
|
19925
|
-
const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess',
|
|
20030
|
+
const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess', _538 => _538.has, 'call', _539 => _539(message.id)]);
|
|
19926
20031
|
if (isUser) {
|
|
19927
20032
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-end gap-1", children: [
|
|
19928
20033
|
/* @__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 }),
|
|
19929
20034
|
isFailed && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-destructive flex items-center gap-2 text-xs", children: [
|
|
19930
20035
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "h-3.5 w-3.5" }),
|
|
19931
20036
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("features.assistant.send_failed") }),
|
|
19932
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", className: "underline", onClick: () => _optionalChain([onRetry, 'optionalCall',
|
|
20037
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", className: "underline", onClick: () => _optionalChain([onRetry, 'optionalCall', _540 => _540(message.id)]), children: t("features.assistant.retry") })
|
|
19933
20038
|
] })
|
|
19934
20039
|
] });
|
|
19935
20040
|
}
|
|
@@ -20005,7 +20110,7 @@ function AssistantThread({
|
|
|
20005
20110
|
}) {
|
|
20006
20111
|
const endRef = _react.useRef.call(void 0, null);
|
|
20007
20112
|
_react.useEffect.call(void 0, () => {
|
|
20008
|
-
_optionalChain([endRef, 'access',
|
|
20113
|
+
_optionalChain([endRef, 'access', _541 => _541.current, 'optionalAccess', _542 => _542.scrollIntoView, 'call', _543 => _543({ behavior: "smooth" })]);
|
|
20009
20114
|
}, [messages.length, sending]);
|
|
20010
20115
|
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: [
|
|
20011
20116
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -20034,7 +20139,7 @@ function AssistantContainer({ renderApprovalAction } = {}) {
|
|
|
20034
20139
|
AssistantSidebar,
|
|
20035
20140
|
{
|
|
20036
20141
|
threads: ctx.threads,
|
|
20037
|
-
activeId: _optionalChain([ctx, 'access',
|
|
20142
|
+
activeId: _optionalChain([ctx, 'access', _544 => _544.assistant, 'optionalAccess', _545 => _545.id]),
|
|
20038
20143
|
onSelect: ctx.selectThread,
|
|
20039
20144
|
onNew: ctx.startNew
|
|
20040
20145
|
}
|
|
@@ -20135,14 +20240,14 @@ function NotificationsList({ archived }) {
|
|
|
20135
20240
|
] }),
|
|
20136
20241
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Skeleton, { className: "h-8 w-20" })
|
|
20137
20242
|
] }) }) }, i)) }), "LoadingSkeleton");
|
|
20138
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: data.isLoaded ? _optionalChain([data, 'access',
|
|
20243
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: data.isLoaded ? _optionalChain([data, 'access', _546 => _546.data, 'optionalAccess', _547 => _547.map, 'call', _548 => _548((notification) => {
|
|
20139
20244
|
const notificationData = generateNotificationData({ notification, generateUrl });
|
|
20140
20245
|
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: [
|
|
20141
20246
|
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: _chunkPQBKPWBYjs.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" }),
|
|
20142
20247
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
20143
20248
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
|
|
20144
20249
|
strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
|
|
20145
|
-
actor: _nullishCoalesce(_optionalChain([notificationData, 'access',
|
|
20250
|
+
actor: _nullishCoalesce(_optionalChain([notificationData, 'access', _549 => _549.actor, 'optionalAccess', _550 => _550.name]), () => ( "")),
|
|
20146
20251
|
title: notificationData.title
|
|
20147
20252
|
}) }),
|
|
20148
20253
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground mt-1 w-full text-xs", children: new Date(notification.createdAt).toLocaleString() })
|
|
@@ -20488,7 +20593,7 @@ var DEFAULT_TRANSLATIONS = {
|
|
|
20488
20593
|
invalidEmail: "Please enter a valid email address"
|
|
20489
20594
|
};
|
|
20490
20595
|
async function copyToClipboard(text) {
|
|
20491
|
-
if (_optionalChain([navigator, 'access',
|
|
20596
|
+
if (_optionalChain([navigator, 'access', _551 => _551.clipboard, 'optionalAccess', _552 => _552.writeText])) {
|
|
20492
20597
|
try {
|
|
20493
20598
|
await navigator.clipboard.writeText(text);
|
|
20494
20599
|
return true;
|
|
@@ -20530,7 +20635,7 @@ function ReferralWidget({
|
|
|
20530
20635
|
const linkInputRef = _react.useRef.call(void 0, null);
|
|
20531
20636
|
const config = _chunkJO5BLONKjs.getReferralConfig.call(void 0, );
|
|
20532
20637
|
const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
|
|
20533
|
-
const referralUrl = _optionalChain([stats, 'optionalAccess',
|
|
20638
|
+
const referralUrl = _optionalChain([stats, 'optionalAccess', _553 => _553.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
|
|
20534
20639
|
if (!_chunkJO5BLONKjs.isReferralEnabled.call(void 0, )) {
|
|
20535
20640
|
return null;
|
|
20536
20641
|
}
|
|
@@ -20540,7 +20645,7 @@ function ReferralWidget({
|
|
|
20540
20645
|
if (success) {
|
|
20541
20646
|
setCopied(true);
|
|
20542
20647
|
_chunkPQBKPWBYjs.showToast.call(void 0, t.copiedMessage);
|
|
20543
|
-
_optionalChain([onLinkCopied, 'optionalCall',
|
|
20648
|
+
_optionalChain([onLinkCopied, 'optionalCall', _554 => _554()]);
|
|
20544
20649
|
setTimeout(() => setCopied(false), 2e3);
|
|
20545
20650
|
} else {
|
|
20546
20651
|
_chunkPQBKPWBYjs.showError.call(void 0, t.copyError);
|
|
@@ -20554,12 +20659,12 @@ function ReferralWidget({
|
|
|
20554
20659
|
try {
|
|
20555
20660
|
await sendInvite(email);
|
|
20556
20661
|
_chunkPQBKPWBYjs.showToast.call(void 0, t.inviteSent);
|
|
20557
|
-
_optionalChain([onInviteSent, 'optionalCall',
|
|
20662
|
+
_optionalChain([onInviteSent, 'optionalCall', _555 => _555(email)]);
|
|
20558
20663
|
setEmail("");
|
|
20559
20664
|
} catch (err) {
|
|
20560
20665
|
const error2 = err instanceof Error ? err : new Error(t.inviteError);
|
|
20561
20666
|
_chunkPQBKPWBYjs.showError.call(void 0, error2.message);
|
|
20562
|
-
_optionalChain([onInviteError, 'optionalCall',
|
|
20667
|
+
_optionalChain([onInviteError, 'optionalCall', _556 => _556(error2)]);
|
|
20563
20668
|
}
|
|
20564
20669
|
}, [email, sendInvite, t.inviteSent, t.inviteError, t.invalidEmail, onInviteSent, onInviteError]);
|
|
20565
20670
|
const handleEmailKeyDown = _react.useCallback.call(void 0,
|
|
@@ -21313,7 +21418,7 @@ function OAuthClientList({
|
|
|
21313
21418
|
OAuthClientCard,
|
|
21314
21419
|
{
|
|
21315
21420
|
client,
|
|
21316
|
-
onClick: () => _optionalChain([onClientClick, 'optionalCall',
|
|
21421
|
+
onClick: () => _optionalChain([onClientClick, 'optionalCall', _557 => _557(client)]),
|
|
21317
21422
|
onEdit: onEditClick ? () => onEditClick(client) : void 0,
|
|
21318
21423
|
onDelete: onDeleteClick ? () => onDeleteClick(client) : void 0
|
|
21319
21424
|
},
|
|
@@ -21329,11 +21434,11 @@ _chunk7QVYU63Ejs.__name.call(void 0, OAuthClientList, "OAuthClientList");
|
|
|
21329
21434
|
function OAuthClientForm({ client, onSubmit, onCancel, isLoading = false }) {
|
|
21330
21435
|
const isEditMode = !!client;
|
|
21331
21436
|
const [formState, setFormState] = _react.useState.call(void 0, {
|
|
21332
|
-
name: _optionalChain([client, 'optionalAccess',
|
|
21333
|
-
description: _optionalChain([client, 'optionalAccess',
|
|
21334
|
-
redirectUris: _optionalChain([client, 'optionalAccess',
|
|
21335
|
-
allowedScopes: _optionalChain([client, 'optionalAccess',
|
|
21336
|
-
isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess',
|
|
21437
|
+
name: _optionalChain([client, 'optionalAccess', _558 => _558.name]) || "",
|
|
21438
|
+
description: _optionalChain([client, 'optionalAccess', _559 => _559.description]) || "",
|
|
21439
|
+
redirectUris: _optionalChain([client, 'optionalAccess', _560 => _560.redirectUris, 'optionalAccess', _561 => _561.length]) ? client.redirectUris : [""],
|
|
21440
|
+
allowedScopes: _optionalChain([client, 'optionalAccess', _562 => _562.allowedScopes]) || [],
|
|
21441
|
+
isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _563 => _563.isConfidential]), () => ( true))
|
|
21337
21442
|
});
|
|
21338
21443
|
const [errors, setErrors] = _react.useState.call(void 0, {});
|
|
21339
21444
|
const validate = _react.useCallback.call(void 0, () => {
|
|
@@ -21561,7 +21666,7 @@ function OAuthClientDetail({
|
|
|
21561
21666
|
] }),
|
|
21562
21667
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
|
|
21563
21668
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { children: "Allowed Scopes" }),
|
|
21564
|
-
/* @__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([_chunkPQBKPWBYjs.OAUTH_SCOPE_DISPLAY, 'access',
|
|
21669
|
+
/* @__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([_chunkPQBKPWBYjs.OAUTH_SCOPE_DISPLAY, 'access', _564 => _564[scope], 'optionalAccess', _565 => _565.name]) || scope }, scope)) })
|
|
21565
21670
|
] }),
|
|
21566
21671
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
|
|
21567
21672
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { children: "Grant Types" }),
|
|
@@ -21705,7 +21810,7 @@ function OAuthConsentScreen({
|
|
|
21705
21810
|
if (error || !clientInfo) {
|
|
21706
21811
|
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: [
|
|
21707
21812
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertTriangle, { className: "h-4 w-4" }),
|
|
21708
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess',
|
|
21813
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _566 => _566.message]) || "Invalid authorization request. Please try again." })
|
|
21709
21814
|
] }) }) }) });
|
|
21710
21815
|
}
|
|
21711
21816
|
const { client, scopes } = clientInfo;
|
|
@@ -21921,7 +22026,7 @@ function WaitlistForm({ onSuccess }) {
|
|
|
21921
22026
|
questionnaire: values.questionnaire
|
|
21922
22027
|
});
|
|
21923
22028
|
setIsSuccess(true);
|
|
21924
|
-
_optionalChain([onSuccess, 'optionalCall',
|
|
22029
|
+
_optionalChain([onSuccess, 'optionalCall', _567 => _567()]);
|
|
21925
22030
|
} catch (e) {
|
|
21926
22031
|
errorToast({ error: e });
|
|
21927
22032
|
} finally {
|
|
@@ -22559,7 +22664,7 @@ var ModuleEditor = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs.__n
|
|
|
22559
22664
|
] }),
|
|
22560
22665
|
roleIds.map((roleId) => {
|
|
22561
22666
|
const roleTokens = block[roleId];
|
|
22562
|
-
const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess',
|
|
22667
|
+
const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _568 => _568[roleId]]), () => ( roleId));
|
|
22563
22668
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
|
|
22564
22669
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: roleLabel }),
|
|
22565
22670
|
_chunkJO5BLONKjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -22596,7 +22701,7 @@ function RbacContainer() {
|
|
|
22596
22701
|
}, []);
|
|
22597
22702
|
const sortedModuleIds = _react.useMemo.call(void 0, () => {
|
|
22598
22703
|
if (!matrix) return [];
|
|
22599
|
-
return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
22704
|
+
return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _569 => _569[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _570 => _570[b]]), () => ( b))));
|
|
22600
22705
|
}, [matrix, moduleNames]);
|
|
22601
22706
|
const roleIds = _react.useMemo.call(void 0, () => {
|
|
22602
22707
|
if (roleNames) {
|
|
@@ -22659,7 +22764,7 @@ function RbacContainer() {
|
|
|
22659
22764
|
id === selectedModuleId && "bg-muted font-medium text-foreground",
|
|
22660
22765
|
id !== selectedModuleId && "text-muted-foreground"
|
|
22661
22766
|
),
|
|
22662
|
-
children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
22767
|
+
children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _571 => _571[id]]), () => ( id))
|
|
22663
22768
|
}
|
|
22664
22769
|
) }, id)) }) }),
|
|
22665
22770
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "section", { className: "flex-1 overflow-y-auto p-4", children: selectedModuleId && selectedBlock ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -22667,7 +22772,7 @@ function RbacContainer() {
|
|
|
22667
22772
|
{
|
|
22668
22773
|
moduleId: selectedModuleId,
|
|
22669
22774
|
block: selectedBlock,
|
|
22670
|
-
moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
22775
|
+
moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _572 => _572[selectedModuleId]]), () => ( selectedModuleId)),
|
|
22671
22776
|
roleIds,
|
|
22672
22777
|
roleNames,
|
|
22673
22778
|
onOpenPicker: openPicker
|
|
@@ -22678,12 +22783,12 @@ function RbacContainer() {
|
|
|
22678
22783
|
RbacPermissionPicker,
|
|
22679
22784
|
{
|
|
22680
22785
|
open: !!activePicker,
|
|
22681
|
-
anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess',
|
|
22786
|
+
anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _573 => _573.anchor]), () => ( null)),
|
|
22682
22787
|
value: activeValue,
|
|
22683
|
-
isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess',
|
|
22788
|
+
isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _574 => _574.isRoleColumn]), () => ( false)),
|
|
22684
22789
|
knownSegments: activeSegments,
|
|
22685
22790
|
onSetValue: handleSetValue,
|
|
22686
|
-
onClear: _optionalChain([activePicker, 'optionalAccess',
|
|
22791
|
+
onClear: _optionalChain([activePicker, 'optionalAccess', _575 => _575.isRoleColumn]) ? handleClear : void 0,
|
|
22687
22792
|
onClose: closePicker
|
|
22688
22793
|
}
|
|
22689
22794
|
)
|
|
@@ -22750,7 +22855,7 @@ function RbacByRoleContainer() {
|
|
|
22750
22855
|
}, [roleNames]);
|
|
22751
22856
|
const sortedModuleIds = _react.useMemo.call(void 0, () => {
|
|
22752
22857
|
if (!matrix) return [];
|
|
22753
|
-
return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
22858
|
+
return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _576 => _576[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _577 => _577[b]]), () => ( b))));
|
|
22754
22859
|
}, [matrix, moduleNames]);
|
|
22755
22860
|
_react.useEffect.call(void 0, () => {
|
|
22756
22861
|
if (!selectedRoleId && sortedRoleIds.length > 0) {
|
|
@@ -22799,7 +22904,7 @@ function RbacByRoleContainer() {
|
|
|
22799
22904
|
id === selectedRoleId && "bg-muted font-medium text-foreground",
|
|
22800
22905
|
id !== selectedRoleId && "text-muted-foreground"
|
|
22801
22906
|
),
|
|
22802
|
-
children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess',
|
|
22907
|
+
children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _578 => _578[id]]), () => ( id))
|
|
22803
22908
|
}
|
|
22804
22909
|
) }, id)) }) }),
|
|
22805
22910
|
/* @__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: [
|
|
@@ -22819,7 +22924,7 @@ function RbacByRoleContainer() {
|
|
|
22819
22924
|
if (!block) return null;
|
|
22820
22925
|
const defaultTokens = _nullishCoalesce(block.default, () => ( []));
|
|
22821
22926
|
const roleTokens = block[selectedRoleId];
|
|
22822
|
-
const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
22927
|
+
const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _579 => _579[moduleId]]), () => ( moduleId));
|
|
22823
22928
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
|
|
22824
22929
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { className: "border-b bg-muted/40", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
22825
22930
|
"td",
|
|
@@ -22834,7 +22939,7 @@ function RbacByRoleContainer() {
|
|
|
22834
22939
|
_chunkJO5BLONKjs.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))
|
|
22835
22940
|
] }),
|
|
22836
22941
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
|
|
22837
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess',
|
|
22942
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _580 => _580[selectedRoleId]]), () => ( selectedRoleId)) }),
|
|
22838
22943
|
_chunkJO5BLONKjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
22839
22944
|
CellButton3,
|
|
22840
22945
|
{
|
|
@@ -22855,12 +22960,12 @@ function RbacByRoleContainer() {
|
|
|
22855
22960
|
RbacPermissionPicker,
|
|
22856
22961
|
{
|
|
22857
22962
|
open: !!activePicker,
|
|
22858
|
-
anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess',
|
|
22963
|
+
anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _581 => _581.anchor]), () => ( null)),
|
|
22859
22964
|
value: activeValue,
|
|
22860
|
-
isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess',
|
|
22965
|
+
isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _582 => _582.isRoleColumn]), () => ( false)),
|
|
22861
22966
|
knownSegments: activeSegments,
|
|
22862
22967
|
onSetValue: handleSetValue,
|
|
22863
|
-
onClear: _optionalChain([activePicker, 'optionalAccess',
|
|
22968
|
+
onClear: _optionalChain([activePicker, 'optionalAccess', _583 => _583.isRoleColumn]) ? handleClear : void 0,
|
|
22864
22969
|
onClose: closePicker
|
|
22865
22970
|
}
|
|
22866
22971
|
)
|
|
@@ -23399,5 +23504,10 @@ _chunk7QVYU63Ejs.__name.call(void 0, RbacByRoleContainer, "RbacByRoleContainer")
|
|
|
23399
23504
|
|
|
23400
23505
|
|
|
23401
23506
|
|
|
23402
|
-
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.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.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;
|
|
23403
|
-
|
|
23507
|
+
|
|
23508
|
+
|
|
23509
|
+
|
|
23510
|
+
|
|
23511
|
+
|
|
23512
|
+
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.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;
|
|
23513
|
+
//# sourceMappingURL=chunk-JBWBIMZF.js.map
|