@carlonicora/nextjs-jsonapi 1.97.1 → 1.98.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-7SXXGSJH.js → BlockNoteEditor-3SXAMY6O.js} +9 -9
- package/dist/{BlockNoteEditor-7SXXGSJH.js.map → BlockNoteEditor-3SXAMY6O.js.map} +1 -1
- package/dist/{BlockNoteEditor-74GNMOST.mjs → BlockNoteEditor-HWQHTLEB.mjs} +2 -2
- package/dist/billing/index.js +299 -299
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-XHCHSTAX.js → chunk-S5LH5422.js} +360 -262
- package/dist/chunk-S5LH5422.js.map +1 -0
- package/dist/{chunk-A4EZFGFA.mjs → chunk-TLTENUI6.mjs} +141 -43
- package/dist/chunk-TLTENUI6.mjs.map +1 -0
- package/dist/client/index.d.mts +4 -2
- package/dist/client/index.d.ts +4 -2
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.d.mts +5 -2
- package/dist/components/index.d.ts +5 -2
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/{content.fields-hzZvhlBd.d.mts → content.fields-xH3TGvVk.d.mts} +2 -0
- package/dist/{content.fields-hzZvhlBd.d.ts → content.fields-xH3TGvVk.d.ts} +2 -0
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/core/index.d.mts +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/editors/BlockNoteEditorSuggestionMenuController.tsx +1 -2
- package/src/components/forms/FormDate.tsx +27 -3
- package/src/components/forms/FormDateTime.tsx +40 -8
- package/src/hooks/useCustomD3Graph.tsx +91 -10
- package/src/interfaces/d3.node.interface.ts +2 -0
- package/dist/chunk-A4EZFGFA.mjs.map +0 -1
- package/dist/chunk-XHCHSTAX.js.map +0 -1
- /package/dist/{BlockNoteEditor-74GNMOST.mjs.map → BlockNoteEditor-HWQHTLEB.mjs.map} +0 -0
|
@@ -6455,7 +6455,7 @@ var _d3 = require('d3'); var d3 = _interopRequireWildcard(_d3);
|
|
|
6455
6455
|
|
|
6456
6456
|
var _server = require('react-dom/server');
|
|
6457
6457
|
|
|
6458
|
-
function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, loadingNodeIds, containerKey) {
|
|
6458
|
+
function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, loadingNodeIds, containerKey) {
|
|
6459
6459
|
const svgRef = _react.useRef.call(void 0, null);
|
|
6460
6460
|
const zoomRef = _react.useRef.call(void 0, null);
|
|
6461
6461
|
const zoomBehaviorRef = _react.useRef.call(void 0, null);
|
|
@@ -6543,6 +6543,9 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, loadingNode
|
|
|
6543
6543
|
}, []);
|
|
6544
6544
|
const getNodeColor = _react.useCallback.call(void 0,
|
|
6545
6545
|
(node) => {
|
|
6546
|
+
if (node.color) {
|
|
6547
|
+
return node.washedOut ? washOutColor(node.color) : node.color;
|
|
6548
|
+
}
|
|
6546
6549
|
const baseColor = colorScale.get(node.instanceType) || "gray";
|
|
6547
6550
|
if (node.washedOut) {
|
|
6548
6551
|
return washOutColor(baseColor);
|
|
@@ -6568,6 +6571,12 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, loadingNode
|
|
|
6568
6571
|
const height = container.clientHeight;
|
|
6569
6572
|
svg.attr("width", width).attr("height", height).attr("viewBox", `0 0 ${width} ${height}`);
|
|
6570
6573
|
const graphGroup = svg.append("g").attr("class", "graph-content");
|
|
6574
|
+
const nodeRadius = 40;
|
|
6575
|
+
const directed = _optionalChain([options, 'optionalAccess', _138 => _138.directed]) === true;
|
|
6576
|
+
if (directed) {
|
|
6577
|
+
const defs = svg.append("defs");
|
|
6578
|
+
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");
|
|
6579
|
+
}
|
|
6571
6580
|
const zoom2 = d3.zoom().scaleExtent([0.1, 4]).on("zoom", (event) => {
|
|
6572
6581
|
const transform = event.transform;
|
|
6573
6582
|
graphGroup.attr("transform", transform.toString());
|
|
@@ -6575,7 +6584,6 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, loadingNode
|
|
|
6575
6584
|
});
|
|
6576
6585
|
zoomBehaviorRef.current = zoom2;
|
|
6577
6586
|
svg.call(zoom2).on("wheel.zoom", null).on("dblclick.zoom", null);
|
|
6578
|
-
const nodeRadius = 40;
|
|
6579
6587
|
const childDistanceFromRoot = Math.min(width, height) * 0.4;
|
|
6580
6588
|
const grandchildDistanceFromChild = nodeRadius * 10;
|
|
6581
6589
|
const centralNodeId = nodes[0].id;
|
|
@@ -6605,7 +6613,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, loadingNode
|
|
|
6605
6613
|
sourceNode.children.push(targetId);
|
|
6606
6614
|
}
|
|
6607
6615
|
});
|
|
6608
|
-
const rootChildren = _optionalChain([nodeHierarchy, 'access',
|
|
6616
|
+
const rootChildren = _optionalChain([nodeHierarchy, 'access', _139 => _139.get, 'call', _140 => _140(centralNodeId), 'optionalAccess', _141 => _141.children]) || [];
|
|
6609
6617
|
const childAngleStep = 2 * Math.PI / Math.max(rootChildren.length, 1);
|
|
6610
6618
|
rootChildren.forEach((childId, index) => {
|
|
6611
6619
|
const childNode = nodeHierarchy.get(childId);
|
|
@@ -6687,7 +6695,29 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, loadingNode
|
|
|
6687
6695
|
node2.fy = node2.y;
|
|
6688
6696
|
}
|
|
6689
6697
|
});
|
|
6690
|
-
const
|
|
6698
|
+
const linkX2 = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (sx, sy, tx, ty) => {
|
|
6699
|
+
if (!directed) return tx;
|
|
6700
|
+
const dx = tx - sx;
|
|
6701
|
+
const dy = ty - sy;
|
|
6702
|
+
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
6703
|
+
return tx - dx / dist * nodeRadius;
|
|
6704
|
+
}, "linkX2");
|
|
6705
|
+
const linkY2 = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (sx, sy, tx, ty) => {
|
|
6706
|
+
if (!directed) return ty;
|
|
6707
|
+
const dx = tx - sx;
|
|
6708
|
+
const dy = ty - sy;
|
|
6709
|
+
const dist = Math.sqrt(dx * dx + dy * dy) || 1;
|
|
6710
|
+
return ty - dy / dist * nodeRadius;
|
|
6711
|
+
}, "linkY2");
|
|
6712
|
+
const link = graphGroup.append("g").attr("stroke", "#999").attr("stroke-opacity", 0.6).selectAll("line").data(visibleLinks).join("line").attr("x1", (d) => d.source.x || 0).attr("y1", (d) => d.source.y || 0).attr("x2", (d) => {
|
|
6713
|
+
const s = d.source;
|
|
6714
|
+
const t = d.target;
|
|
6715
|
+
return linkX2(s.x || 0, s.y || 0, t.x || 0, t.y || 0);
|
|
6716
|
+
}).attr("y2", (d) => {
|
|
6717
|
+
const s = d.source;
|
|
6718
|
+
const t = d.target;
|
|
6719
|
+
return linkY2(s.x || 0, s.y || 0, t.x || 0, t.y || 0);
|
|
6720
|
+
}).attr("stroke-width", 1.5).attr("marker-end", directed ? "url(#narr8-arrow)" : null);
|
|
6691
6721
|
const node = graphGroup.append("g").selectAll("g").data(visibleNodes).join("g").attr("class", "node-group").attr("data-id", (d) => d.id).attr("cursor", "pointer").attr("transform", (d) => `translate(${d.x || 0}, ${d.y || 0})`).call(
|
|
6692
6722
|
d3.drag().subject(function(d) {
|
|
6693
6723
|
return d;
|
|
@@ -6707,11 +6737,21 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, loadingNode
|
|
|
6707
6737
|
const source = l.source;
|
|
6708
6738
|
return source.fy || source.y || 0;
|
|
6709
6739
|
}).attr("x2", (l) => {
|
|
6740
|
+
const source = l.source;
|
|
6710
6741
|
const target = l.target;
|
|
6711
|
-
|
|
6742
|
+
const sx = source.fx || source.x || 0;
|
|
6743
|
+
const sy = source.fy || source.y || 0;
|
|
6744
|
+
const tx = target.fx || target.x || 0;
|
|
6745
|
+
const ty = target.fy || target.y || 0;
|
|
6746
|
+
return linkX2(sx, sy, tx, ty);
|
|
6712
6747
|
}).attr("y2", (l) => {
|
|
6748
|
+
const source = l.source;
|
|
6713
6749
|
const target = l.target;
|
|
6714
|
-
|
|
6750
|
+
const sx = source.fx || source.x || 0;
|
|
6751
|
+
const sy = source.fy || source.y || 0;
|
|
6752
|
+
const tx = target.fx || target.x || 0;
|
|
6753
|
+
const ty = target.fy || target.y || 0;
|
|
6754
|
+
return linkY2(sx, sy, tx, ty);
|
|
6715
6755
|
});
|
|
6716
6756
|
}).on("end", function(event, d) {
|
|
6717
6757
|
d.fx = event.x;
|
|
@@ -6721,7 +6761,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, loadingNode
|
|
|
6721
6761
|
if (d.instanceType === "root") return;
|
|
6722
6762
|
const currentNode = d3.select(this);
|
|
6723
6763
|
currentNode.raise();
|
|
6724
|
-
const currentZoom = _optionalChain([zoomRef, 'access',
|
|
6764
|
+
const currentZoom = _optionalChain([zoomRef, 'access', _142 => _142.current, 'optionalAccess', _143 => _143.k]) || 1;
|
|
6725
6765
|
const targetScreenFontSize = 20;
|
|
6726
6766
|
const baseFontSize = 12;
|
|
6727
6767
|
const textScale = targetScreenFontSize / (baseFontSize * currentZoom);
|
|
@@ -6732,7 +6772,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, loadingNode
|
|
|
6732
6772
|
if (d.instanceType === "root") return;
|
|
6733
6773
|
const currentNode = d3.select(this);
|
|
6734
6774
|
currentNode.select("circle").transition().duration(250).ease(d3.easeExpOut).attr("r", nodeRadius).attr("filter", null);
|
|
6735
|
-
const normalOffset = nodeRadius + 5;
|
|
6775
|
+
const normalOffset = nodeRadius + 5 + (d.subtitle ? 16 : 0);
|
|
6736
6776
|
currentNode.select("text").transition().duration(250).ease(d3.easeExpOut).attr("dy", -normalOffset).attr("transform", `translate(0, ${-normalOffset}) scale(1) translate(0, ${normalOffset})`);
|
|
6737
6777
|
});
|
|
6738
6778
|
node.append("circle").attr("r", nodeRadius).attr("fill", (d) => getNodeColor(d)).attr("stroke", "#fff").attr("stroke-width", 1.5).on("click", (event, d) => {
|
|
@@ -6784,6 +6824,13 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, loadingNode
|
|
|
6784
6824
|
words.forEach((word, index) => {
|
|
6785
6825
|
textElement.append("tspan").attr("x", 0).attr("dy", index === 0 ? `${startY}em` : `${lineHeight}em`).text(word);
|
|
6786
6826
|
});
|
|
6827
|
+
} else if (d.subtitle) {
|
|
6828
|
+
const titleSize = 16;
|
|
6829
|
+
const subtitleSize = 11;
|
|
6830
|
+
const lineGap = titleSize;
|
|
6831
|
+
textElement.attr("dy", -nodeRadius - 5 - lineGap).attr("fill", "currentColor");
|
|
6832
|
+
textElement.append("tspan").attr("x", 0).attr("font-size", titleSize).attr("font-weight", 700).text(d.name);
|
|
6833
|
+
textElement.append("tspan").attr("x", 0).attr("dy", lineGap).attr("font-size", subtitleSize).attr("fill-opacity", 0.7).text(d.subtitle);
|
|
6787
6834
|
} else {
|
|
6788
6835
|
textElement.attr("dy", -nodeRadius - 5).attr("fill", "currentColor").attr("font-size", d.bold ? 16 : 12).attr("font-weight", d.bold ? 700 : null).text(d.name);
|
|
6789
6836
|
}
|
|
@@ -6791,7 +6838,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, loadingNode
|
|
|
6791
6838
|
return () => {
|
|
6792
6839
|
simulation.stop();
|
|
6793
6840
|
};
|
|
6794
|
-
}, [nodes, links, colorScale, visibleNodeIds, loadingNodeIds, onNodeClick]);
|
|
6841
|
+
}, [nodes, links, colorScale, visibleNodeIds, _optionalChain([options, 'optionalAccess', _144 => _144.directed]), loadingNodeIds, onNodeClick]);
|
|
6795
6842
|
const zoomIn = _react.useCallback.call(void 0, () => {
|
|
6796
6843
|
if (!svgRef.current || !zoomBehaviorRef.current) return;
|
|
6797
6844
|
const svg = d3.select(svgRef.current);
|
|
@@ -6911,7 +6958,7 @@ function usePageTracker() {
|
|
|
6911
6958
|
if (typeof document !== "undefined") {
|
|
6912
6959
|
const titleParts = document.title.split("]");
|
|
6913
6960
|
if (titleParts[1]) {
|
|
6914
|
-
const cleanTitle = _optionalChain([titleParts, 'access',
|
|
6961
|
+
const cleanTitle = _optionalChain([titleParts, 'access', _145 => _145[1], 'access', _146 => _146.split, 'call', _147 => _147("|"), 'access', _148 => _148[0], 'optionalAccess', _149 => _149.trim, 'call', _150 => _150()]);
|
|
6915
6962
|
pageTitle = cleanTitle || foundModule.name;
|
|
6916
6963
|
}
|
|
6917
6964
|
}
|
|
@@ -6948,7 +6995,7 @@ function usePushNotifications() {
|
|
|
6948
6995
|
const register = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
6949
6996
|
if ("serviceWorker" in navigator && "PushManager" in window) {
|
|
6950
6997
|
try {
|
|
6951
|
-
const sessionKey = `push_registered_${_optionalChain([currentUser, 'optionalAccess',
|
|
6998
|
+
const sessionKey = `push_registered_${_optionalChain([currentUser, 'optionalAccess', _151 => _151.id])}`;
|
|
6952
6999
|
const lastRegisteredSubscription = sessionStorage.getItem(sessionKey);
|
|
6953
7000
|
const registration = await navigator.serviceWorker.register(`${_chunkSE5HIHJSjs.getAppUrl.call(void 0, )}/sw.js`);
|
|
6954
7001
|
let permission = Notification.permission;
|
|
@@ -7005,7 +7052,7 @@ function useSocket({ token }) {
|
|
|
7005
7052
|
const socketRef = _react.useRef.call(void 0, null);
|
|
7006
7053
|
_react.useEffect.call(void 0, () => {
|
|
7007
7054
|
if (!token) return;
|
|
7008
|
-
const globalSocketKey = `__socket_${_optionalChain([process, 'access',
|
|
7055
|
+
const globalSocketKey = `__socket_${_optionalChain([process, 'access', _152 => _152.env, 'access', _153 => _153.NEXT_PUBLIC_API_URL, 'optionalAccess', _154 => _154.replace, 'call', _155 => _155(/[^a-zA-Z0-9]/g, "_")])}`;
|
|
7009
7056
|
if (typeof window !== "undefined") {
|
|
7010
7057
|
const _allSocketKeys = Object.keys(window).filter((key) => key.startsWith("__socket_"));
|
|
7011
7058
|
const existingSocket = window[globalSocketKey];
|
|
@@ -7198,23 +7245,23 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
7198
7245
|
);
|
|
7199
7246
|
const matchedModuleKey = moduleKeys.find((key) => {
|
|
7200
7247
|
const descriptor2 = Object.getOwnPropertyDescriptor(_chunkXAWKRNYMjs.Modules, key);
|
|
7201
|
-
if (!_optionalChain([descriptor2, 'optionalAccess',
|
|
7248
|
+
if (!_optionalChain([descriptor2, 'optionalAccess', _156 => _156.get])) return false;
|
|
7202
7249
|
const selectedModule = descriptor2.get.call(_chunkXAWKRNYMjs.Modules);
|
|
7203
|
-
return path.toLowerCase().startsWith(_optionalChain([selectedModule, 'access',
|
|
7250
|
+
return path.toLowerCase().startsWith(_optionalChain([selectedModule, 'access', _157 => _157.pageUrl, 'optionalAccess', _158 => _158.toLowerCase, 'call', _159 => _159()]));
|
|
7204
7251
|
});
|
|
7205
7252
|
if (!matchedModuleKey) return void 0;
|
|
7206
7253
|
const descriptor = Object.getOwnPropertyDescriptor(_chunkXAWKRNYMjs.Modules, matchedModuleKey);
|
|
7207
|
-
return _optionalChain([descriptor, 'optionalAccess',
|
|
7254
|
+
return _optionalChain([descriptor, 'optionalAccess', _160 => _160.get, 'optionalAccess', _161 => _161.call, 'call', _162 => _162(_chunkXAWKRNYMjs.Modules)]);
|
|
7208
7255
|
}, "matchUrlToModule");
|
|
7209
7256
|
const currentUser = dehydratedUser ? _chunkXAWKRNYMjs.rehydrate.call(void 0, _chunkXAWKRNYMjs.Modules.User, dehydratedUser) : null;
|
|
7210
|
-
const company = _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess',
|
|
7257
|
+
const company = _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _163 => _163.company]), () => ( null));
|
|
7211
7258
|
const setUser = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (user) => {
|
|
7212
7259
|
if (user) setDehydratedUser(user.dehydrate());
|
|
7213
7260
|
else setDehydratedUser(null);
|
|
7214
7261
|
}, "setUser");
|
|
7215
7262
|
const hasRole = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (roleId) => {
|
|
7216
7263
|
if (!currentUser) return false;
|
|
7217
|
-
return !!_optionalChain([currentUser, 'access',
|
|
7264
|
+
return !!_optionalChain([currentUser, 'access', _164 => _164.roles, 'optionalAccess', _165 => _165.some, 'call', _166 => _166((userRole) => userRole.id === roleId)]);
|
|
7218
7265
|
}, "hasRole");
|
|
7219
7266
|
const hasAccesToFeature = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (featureIdentifier) => {
|
|
7220
7267
|
if (hasRole(_chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator)) return true;
|
|
@@ -7254,12 +7301,12 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
7254
7301
|
try {
|
|
7255
7302
|
const fullUser = await _chunkXAWKRNYMjs.UserService.findFullUser();
|
|
7256
7303
|
if (fullUser) {
|
|
7257
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
7258
|
-
await _optionalChain([_chunkXAWKRNYMjs.getTokenHandler.call(void 0, ), 'optionalAccess',
|
|
7304
|
+
if (!_optionalChain([options, 'optionalAccess', _167 => _167.skipCookieUpdate])) {
|
|
7305
|
+
await _optionalChain([_chunkXAWKRNYMjs.getTokenHandler.call(void 0, ), 'optionalAccess', _168 => _168.updateToken, 'call', _169 => _169({
|
|
7259
7306
|
userId: fullUser.id,
|
|
7260
|
-
companyId: _optionalChain([fullUser, 'access',
|
|
7307
|
+
companyId: _optionalChain([fullUser, 'access', _170 => _170.company, 'optionalAccess', _171 => _171.id]),
|
|
7261
7308
|
roles: fullUser.roles.map((role) => role.id),
|
|
7262
|
-
features: _nullishCoalesce(_optionalChain([fullUser, 'access',
|
|
7309
|
+
features: _nullishCoalesce(_optionalChain([fullUser, 'access', _172 => _172.company, 'optionalAccess', _173 => _173.features, 'optionalAccess', _174 => _174.map, 'call', _175 => _175((feature) => feature.id)]), () => ( [])),
|
|
7263
7310
|
modules: fullUser.modules.map((module) => ({
|
|
7264
7311
|
id: module.id,
|
|
7265
7312
|
permissions: module.permissions
|
|
@@ -7281,11 +7328,11 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
7281
7328
|
refreshUserRef.current = refreshUser;
|
|
7282
7329
|
const isRefreshingRef = _react.useRef.call(void 0, false);
|
|
7283
7330
|
_react.useEffect.call(void 0, () => {
|
|
7284
|
-
if (!socket || !isConnected || !_optionalChain([currentUser, 'optionalAccess',
|
|
7331
|
+
if (!socket || !isConnected || !_optionalChain([currentUser, 'optionalAccess', _176 => _176.company, 'optionalAccess', _177 => _177.id])) {
|
|
7285
7332
|
return;
|
|
7286
7333
|
}
|
|
7287
7334
|
const handleCompanyUpdate = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
|
|
7288
|
-
if (data.companyId === _optionalChain([currentUser, 'access',
|
|
7335
|
+
if (data.companyId === _optionalChain([currentUser, 'access', _178 => _178.company, 'optionalAccess', _179 => _179.id]) && !isRefreshingRef.current) {
|
|
7289
7336
|
isRefreshingRef.current = true;
|
|
7290
7337
|
refreshUserRef.current({ skipCookieUpdate: true }).finally(() => {
|
|
7291
7338
|
isRefreshingRef.current = false;
|
|
@@ -7298,7 +7345,7 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
7298
7345
|
socket.off("company:tokens_updated", handleCompanyUpdate);
|
|
7299
7346
|
socket.off("company:subscription_updated", handleCompanyUpdate);
|
|
7300
7347
|
};
|
|
7301
|
-
}, [socket, isConnected, _optionalChain([currentUser, 'optionalAccess',
|
|
7348
|
+
}, [socket, isConnected, _optionalChain([currentUser, 'optionalAccess', _180 => _180.company, 'optionalAccess', _181 => _181.id])]);
|
|
7302
7349
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7303
7350
|
CurrentUserContext.Provider,
|
|
7304
7351
|
{
|
|
@@ -7369,7 +7416,7 @@ function AddUserToRoleInternal({ role, refresh }) {
|
|
|
7369
7416
|
const data = useDataListRetriever({
|
|
7370
7417
|
ready: !!company && show,
|
|
7371
7418
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkXAWKRNYMjs.UserService.findAllUsers(params), "retriever"),
|
|
7372
|
-
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess',
|
|
7419
|
+
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _182 => _182.id]) },
|
|
7373
7420
|
module: _chunkXAWKRNYMjs.Modules.User
|
|
7374
7421
|
});
|
|
7375
7422
|
_react.useEffect.call(void 0, () => {
|
|
@@ -7437,10 +7484,10 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
|
|
|
7437
7484
|
onValueChange: setFiles,
|
|
7438
7485
|
dropzoneOptions: dropzone2,
|
|
7439
7486
|
className: "h-40 w-40 rounded-full p-0",
|
|
7440
|
-
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',
|
|
7487
|
+
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', _183 => _183.avatar])) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7441
7488
|
_image2.default,
|
|
7442
7489
|
{
|
|
7443
|
-
src: file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess',
|
|
7490
|
+
src: file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess', _184 => _184.avatar]) || "",
|
|
7444
7491
|
alt: t(`common.avatar`),
|
|
7445
7492
|
width: 200,
|
|
7446
7493
|
height: 200
|
|
@@ -7448,7 +7495,7 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
|
|
|
7448
7495
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, { className: "my-4 h-8 w-8" }) })
|
|
7449
7496
|
}
|
|
7450
7497
|
),
|
|
7451
|
-
!resetImage && (file || _optionalChain([user, 'optionalAccess',
|
|
7498
|
+
!resetImage && (file || _optionalChain([user, 'optionalAccess', _185 => _185.avatar])) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7452
7499
|
Button,
|
|
7453
7500
|
{
|
|
7454
7501
|
className: "",
|
|
@@ -7476,7 +7523,7 @@ function UserDeleterInternal({ user, onDeleted, companyId }) {
|
|
|
7476
7523
|
const router = _chunkSE5HIHJSjs.useI18nRouter.call(void 0, );
|
|
7477
7524
|
const _t = _nextintl.useTranslations.call(void 0, );
|
|
7478
7525
|
let cId;
|
|
7479
|
-
if (_optionalChain([currentUser, 'optionalAccess',
|
|
7526
|
+
if (_optionalChain([currentUser, 'optionalAccess', _186 => _186.roles, 'access', _187 => _187.find, 'call', _188 => _188((role) => role.id === _chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator)]) && companyId) {
|
|
7480
7527
|
cId = companyId;
|
|
7481
7528
|
} else {
|
|
7482
7529
|
if (!company) return;
|
|
@@ -7539,18 +7586,18 @@ function UserEditorInternal({
|
|
|
7539
7586
|
}, [company]);
|
|
7540
7587
|
const handleDialogOpenChange = _react.useCallback.call(void 0,
|
|
7541
7588
|
(open) => {
|
|
7542
|
-
if (open && (company || _optionalChain([currentUser, 'optionalAccess',
|
|
7589
|
+
if (open && (company || _optionalChain([currentUser, 'optionalAccess', _189 => _189.roles, 'access', _190 => _190.find, 'call', _191 => _191((role) => role.id === _chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator)])) && roles.length === 0) {
|
|
7543
7590
|
async function fetchRoles() {
|
|
7544
7591
|
const allRoles = await _chunkXAWKRNYMjs.RoleService.findAllRoles({});
|
|
7545
7592
|
const availableRoles = allRoles.filter(
|
|
7546
|
-
(role) => role.id !== _chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator && (role.requiredFeature === void 0 || _optionalChain([company, 'optionalAccess',
|
|
7593
|
+
(role) => role.id !== _chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator && (role.requiredFeature === void 0 || _optionalChain([company, 'optionalAccess', _192 => _192.features, 'access', _193 => _193.some, 'call', _194 => _194((feature) => feature.id === _optionalChain([role, 'access', _195 => _195.requiredFeature, 'optionalAccess', _196 => _196.id]))]))
|
|
7547
7594
|
);
|
|
7548
7595
|
setRoles(availableRoles);
|
|
7549
7596
|
}
|
|
7550
7597
|
_chunk7QVYU63Ejs.__name.call(void 0, fetchRoles, "fetchRoles");
|
|
7551
7598
|
fetchRoles();
|
|
7552
7599
|
}
|
|
7553
|
-
_optionalChain([onDialogOpenChange, 'optionalCall',
|
|
7600
|
+
_optionalChain([onDialogOpenChange, 'optionalCall', _197 => _197(open)]);
|
|
7554
7601
|
},
|
|
7555
7602
|
[company, currentUser, roles.length, onDialogOpenChange]
|
|
7556
7603
|
);
|
|
@@ -7584,29 +7631,29 @@ function UserEditorInternal({
|
|
|
7584
7631
|
);
|
|
7585
7632
|
const getDefaultValues = _react.useCallback.call(void 0, () => {
|
|
7586
7633
|
return {
|
|
7587
|
-
id: _optionalChain([user, 'optionalAccess',
|
|
7588
|
-
name: _optionalChain([user, 'optionalAccess',
|
|
7589
|
-
title: _optionalChain([user, 'optionalAccess',
|
|
7590
|
-
bio: _optionalChain([user, 'optionalAccess',
|
|
7591
|
-
email: _optionalChain([user, 'optionalAccess',
|
|
7592
|
-
phone: _optionalChain([user, 'optionalAccess',
|
|
7634
|
+
id: _optionalChain([user, 'optionalAccess', _198 => _198.id]) || _uuid.v4.call(void 0, ),
|
|
7635
|
+
name: _optionalChain([user, 'optionalAccess', _199 => _199.name]) || "",
|
|
7636
|
+
title: _optionalChain([user, 'optionalAccess', _200 => _200.title]) || "",
|
|
7637
|
+
bio: _optionalChain([user, 'optionalAccess', _201 => _201.bio]) || "",
|
|
7638
|
+
email: _optionalChain([user, 'optionalAccess', _202 => _202.email]) || "",
|
|
7639
|
+
phone: _optionalChain([user, 'optionalAccess', _203 => _203.phone]) || "",
|
|
7593
7640
|
password: "",
|
|
7594
|
-
roleIds: _optionalChain([user, 'optionalAccess',
|
|
7641
|
+
roleIds: _optionalChain([user, 'optionalAccess', _204 => _204.roles, 'access', _205 => _205.map, 'call', _206 => _206((role) => role.id)]) || [],
|
|
7595
7642
|
sendInvitationEmail: false,
|
|
7596
|
-
avatar: _optionalChain([user, 'optionalAccess',
|
|
7643
|
+
avatar: _optionalChain([user, 'optionalAccess', _207 => _207.avatarUrl]) || ""
|
|
7597
7644
|
};
|
|
7598
7645
|
}, [user]);
|
|
7599
7646
|
const form = _reacthookform.useForm.call(void 0, {
|
|
7600
7647
|
resolver: _zod.zodResolver.call(void 0, formSchema),
|
|
7601
7648
|
defaultValues: getDefaultValues()
|
|
7602
7649
|
});
|
|
7603
|
-
const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess',
|
|
7650
|
+
const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess', _208 => _208.id]) === _optionalChain([user, 'optionalAccess', _209 => _209.id]) && hasRole(_chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator)) && (hasPermissionToModule({ module: _chunkXAWKRNYMjs.Modules.User, action: "update" /* Update */ }) || hasRole(_chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator));
|
|
7604
7651
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7605
7652
|
EditorSheet,
|
|
7606
7653
|
{
|
|
7607
7654
|
form,
|
|
7608
7655
|
entityType: t(`entities.users`, { count: 1 }),
|
|
7609
|
-
entityName: _optionalChain([user, 'optionalAccess',
|
|
7656
|
+
entityName: _optionalChain([user, 'optionalAccess', _210 => _210.name]),
|
|
7610
7657
|
isEdit: !!user,
|
|
7611
7658
|
module: _chunkXAWKRNYMjs.Modules.User,
|
|
7612
7659
|
propagateChanges,
|
|
@@ -7658,7 +7705,7 @@ function UserEditorInternal({
|
|
|
7658
7705
|
adminCreated
|
|
7659
7706
|
};
|
|
7660
7707
|
const updatedUser = user ? await _chunkXAWKRNYMjs.UserService.update(payload) : await _chunkXAWKRNYMjs.UserService.create(payload);
|
|
7661
|
-
if (_optionalChain([currentUser, 'optionalAccess',
|
|
7708
|
+
if (_optionalChain([currentUser, 'optionalAccess', _211 => _211.id]) === updatedUser.id) setUser(updatedUser);
|
|
7662
7709
|
return updatedUser;
|
|
7663
7710
|
},
|
|
7664
7711
|
onRevalidate,
|
|
@@ -7905,7 +7952,7 @@ function EntityMultiSelector({
|
|
|
7905
7952
|
if (open) {
|
|
7906
7953
|
setSearchTerm("");
|
|
7907
7954
|
requestAnimationFrame(() => {
|
|
7908
|
-
_optionalChain([searchInputRef, 'access',
|
|
7955
|
+
_optionalChain([searchInputRef, 'access', _212 => _212.current, 'optionalAccess', _213 => _213.focus, 'call', _214 => _214()]);
|
|
7909
7956
|
});
|
|
7910
7957
|
}
|
|
7911
7958
|
}, [open]);
|
|
@@ -7922,7 +7969,7 @@ function EntityMultiSelector({
|
|
|
7922
7969
|
form.setValue(id, next, { shouldDirty: true, shouldTouch: true });
|
|
7923
7970
|
const cb = onChangeRef.current;
|
|
7924
7971
|
if (cb) {
|
|
7925
|
-
const fullData = next.map((v) => _optionalChain([options, 'access',
|
|
7972
|
+
const fullData = next.map((v) => _optionalChain([options, 'access', _215 => _215.find, 'call', _216 => _216((opt) => opt.id === v.id), 'optionalAccess', _217 => _217.entityData])).filter(Boolean);
|
|
7926
7973
|
cb(fullData);
|
|
7927
7974
|
}
|
|
7928
7975
|
},
|
|
@@ -7935,7 +7982,7 @@ function EntityMultiSelector({
|
|
|
7935
7982
|
form.setValue(id, next, { shouldDirty: true, shouldTouch: true });
|
|
7936
7983
|
const cb = onChangeRef.current;
|
|
7937
7984
|
if (cb) {
|
|
7938
|
-
const fullData = next.map((v) => _optionalChain([options, 'access',
|
|
7985
|
+
const fullData = next.map((v) => _optionalChain([options, 'access', _218 => _218.find, 'call', _219 => _219((opt) => opt.id === v.id), 'optionalAccess', _220 => _220.entityData])).filter(Boolean);
|
|
7939
7986
|
cb(fullData);
|
|
7940
7987
|
}
|
|
7941
7988
|
},
|
|
@@ -8073,11 +8120,11 @@ function UserMultiSelect({
|
|
|
8073
8120
|
emptyText: t("ui.search.no_results", { type: t("entities.users", { count: 2 }) }),
|
|
8074
8121
|
isRequired,
|
|
8075
8122
|
retriever: (params) => _chunkXAWKRNYMjs.UserService.findAllUsers(params),
|
|
8076
|
-
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess',
|
|
8123
|
+
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _221 => _221.id]) },
|
|
8077
8124
|
module: _chunkXAWKRNYMjs.Modules.User,
|
|
8078
8125
|
getLabel: (user) => user.name,
|
|
8079
8126
|
toFormValue: (user) => ({ id: user.id, name: user.name, avatar: user.avatar }),
|
|
8080
|
-
excludeId: _optionalChain([currentUser, 'optionalAccess',
|
|
8127
|
+
excludeId: _optionalChain([currentUser, 'optionalAccess', _222 => _222.id]),
|
|
8081
8128
|
onChange,
|
|
8082
8129
|
renderOption: (user) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
|
|
8083
8130
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatarIcon, { url: user.avatar, name: user.name }),
|
|
@@ -8343,7 +8390,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, ErrorDetails, "ErrorDetails");
|
|
|
8343
8390
|
|
|
8344
8391
|
// src/components/errors/errorToast.ts
|
|
8345
8392
|
function errorToast(params) {
|
|
8346
|
-
_chunkXAWKRNYMjs.showError.call(void 0, _nullishCoalesce(_optionalChain([params, 'optionalAccess',
|
|
8393
|
+
_chunkXAWKRNYMjs.showError.call(void 0, _nullishCoalesce(_optionalChain([params, 'optionalAccess', _223 => _223.title]), () => ( "Error")), {
|
|
8347
8394
|
description: params.error instanceof Error ? params.error.message : String(params.error)
|
|
8348
8395
|
});
|
|
8349
8396
|
}
|
|
@@ -8507,21 +8554,21 @@ function useEditorDialog(isFormDirty, options) {
|
|
|
8507
8554
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
8508
8555
|
const [showDiscardConfirm, setShowDiscardConfirm] = _react.useState.call(void 0, false);
|
|
8509
8556
|
_react.useEffect.call(void 0, () => {
|
|
8510
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
8557
|
+
if (_optionalChain([options, 'optionalAccess', _224 => _224.dialogOpen]) !== void 0) {
|
|
8511
8558
|
setOpen(options.dialogOpen);
|
|
8512
8559
|
}
|
|
8513
|
-
}, [_optionalChain([options, 'optionalAccess',
|
|
8560
|
+
}, [_optionalChain([options, 'optionalAccess', _225 => _225.dialogOpen])]);
|
|
8514
8561
|
_react.useEffect.call(void 0, () => {
|
|
8515
|
-
if (typeof _optionalChain([options, 'optionalAccess',
|
|
8562
|
+
if (typeof _optionalChain([options, 'optionalAccess', _226 => _226.onDialogOpenChange]) === "function") {
|
|
8516
8563
|
options.onDialogOpenChange(open);
|
|
8517
8564
|
}
|
|
8518
|
-
}, [open, _optionalChain([options, 'optionalAccess',
|
|
8565
|
+
}, [open, _optionalChain([options, 'optionalAccess', _227 => _227.onDialogOpenChange])]);
|
|
8519
8566
|
_react.useEffect.call(void 0, () => {
|
|
8520
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
8521
|
-
}, [_optionalChain([options, 'optionalAccess',
|
|
8567
|
+
if (_optionalChain([options, 'optionalAccess', _228 => _228.forceShow])) setOpen(true);
|
|
8568
|
+
}, [_optionalChain([options, 'optionalAccess', _229 => _229.forceShow])]);
|
|
8522
8569
|
_react.useEffect.call(void 0, () => {
|
|
8523
8570
|
if (!open) {
|
|
8524
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
8571
|
+
if (_optionalChain([options, 'optionalAccess', _230 => _230.onClose])) options.onClose();
|
|
8525
8572
|
}
|
|
8526
8573
|
}, [open]);
|
|
8527
8574
|
const handleOpenChange = _react.useCallback.call(void 0,
|
|
@@ -8613,7 +8660,7 @@ function EditorSheet({
|
|
|
8613
8660
|
hasBeenOpen.current = true;
|
|
8614
8661
|
} else if (hasBeenOpen.current) {
|
|
8615
8662
|
form.reset(onReset());
|
|
8616
|
-
_optionalChain([onClose, 'optionalCall',
|
|
8663
|
+
_optionalChain([onClose, 'optionalCall', _231 => _231()]);
|
|
8617
8664
|
}
|
|
8618
8665
|
}, [open]);
|
|
8619
8666
|
const wrappedOnSubmit = _react.useCallback.call(void 0,
|
|
@@ -8627,11 +8674,11 @@ function EditorSheet({
|
|
|
8627
8674
|
if (onSuccess) {
|
|
8628
8675
|
await onSuccess();
|
|
8629
8676
|
} else if (result) {
|
|
8630
|
-
_optionalChain([onRevalidate, 'optionalCall',
|
|
8677
|
+
_optionalChain([onRevalidate, 'optionalCall', _232 => _232(generateUrl({ page: module, id: result.id, language: "[locale]" }))]);
|
|
8631
8678
|
if (isEdit && propagateChanges) {
|
|
8632
8679
|
propagateChanges(result);
|
|
8633
8680
|
} else {
|
|
8634
|
-
_optionalChain([onNavigate, 'optionalCall',
|
|
8681
|
+
_optionalChain([onNavigate, 'optionalCall', _233 => _233(generateUrl({ page: module, id: result.id }))]);
|
|
8635
8682
|
}
|
|
8636
8683
|
}
|
|
8637
8684
|
} catch (error) {
|
|
@@ -8857,7 +8904,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
8857
8904
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
8858
8905
|
const [prevRange, setPrevRange] = _react.useState.call(void 0, date);
|
|
8859
8906
|
_react.useEffect.call(void 0, () => {
|
|
8860
|
-
if (_optionalChain([date, 'optionalAccess',
|
|
8907
|
+
if (_optionalChain([date, 'optionalAccess', _234 => _234.from]) && _optionalChain([date, 'optionalAccess', _235 => _235.to]) && date.to > date.from && (_optionalChain([prevRange, 'optionalAccess', _236 => _236.from, 'optionalAccess', _237 => _237.getTime, 'call', _238 => _238()]) !== date.from.getTime() || _optionalChain([prevRange, 'optionalAccess', _239 => _239.to, 'optionalAccess', _240 => _240.getTime, 'call', _241 => _241()]) !== date.to.getTime())) {
|
|
8861
8908
|
onDateChange(date);
|
|
8862
8909
|
setPrevRange(date);
|
|
8863
8910
|
setOpen(false);
|
|
@@ -8868,7 +8915,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
8868
8915
|
setDate(void 0);
|
|
8869
8916
|
return;
|
|
8870
8917
|
}
|
|
8871
|
-
if (range.from && (!_optionalChain([date, 'optionalAccess',
|
|
8918
|
+
if (range.from && (!_optionalChain([date, 'optionalAccess', _242 => _242.from]) || range.from.getTime() !== date.from.getTime())) {
|
|
8872
8919
|
setDate({ from: range.from, to: void 0 });
|
|
8873
8920
|
} else {
|
|
8874
8921
|
setDate(range);
|
|
@@ -8883,7 +8930,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
8883
8930
|
className: _chunkXAWKRNYMjs.cn.call(void 0, "w-[300px] justify-start text-left font-normal", !date && "text-muted-foreground"),
|
|
8884
8931
|
children: [
|
|
8885
8932
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
|
|
8886
|
-
_optionalChain([date, 'optionalAccess',
|
|
8933
|
+
_optionalChain([date, 'optionalAccess', _243 => _243.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
8887
8934
|
_datefns.format.call(void 0, date.from, "LLL dd, y"),
|
|
8888
8935
|
" - ",
|
|
8889
8936
|
_datefns.format.call(void 0, date.to, "LLL dd, y")
|
|
@@ -8896,7 +8943,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
8896
8943
|
Calendar,
|
|
8897
8944
|
{
|
|
8898
8945
|
mode: "range",
|
|
8899
|
-
defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess',
|
|
8946
|
+
defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess', _244 => _244.from]), () => ( (showPreviousMonth ? new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() - 1, 1) : void 0))),
|
|
8900
8947
|
selected: date,
|
|
8901
8948
|
onSelect: handleSelect,
|
|
8902
8949
|
numberOfMonths: 2
|
|
@@ -8983,7 +9030,7 @@ var FileUploader = _react.forwardRef.call(void 0,
|
|
|
8983
9030
|
movePrev();
|
|
8984
9031
|
} else if (e.key === "Enter" || e.key === "Space") {
|
|
8985
9032
|
if (activeIndex === -1) {
|
|
8986
|
-
_optionalChain([dropzoneState, 'access',
|
|
9033
|
+
_optionalChain([dropzoneState, 'access', _245 => _245.inputRef, 'access', _246 => _246.current, 'optionalAccess', _247 => _247.click, 'call', _248 => _248()]);
|
|
8987
9034
|
}
|
|
8988
9035
|
} else if (e.key === "Delete" || e.key === "Backspace") {
|
|
8989
9036
|
if (activeIndex !== -1) {
|
|
@@ -9021,13 +9068,13 @@ var FileUploader = _react.forwardRef.call(void 0,
|
|
|
9021
9068
|
onValueChange(newValues);
|
|
9022
9069
|
if (rejectedFiles.length > 0) {
|
|
9023
9070
|
for (let i = 0; i < rejectedFiles.length; i++) {
|
|
9024
|
-
if (_optionalChain([rejectedFiles, 'access',
|
|
9071
|
+
if (_optionalChain([rejectedFiles, 'access', _249 => _249[i], 'access', _250 => _250.errors, 'access', _251 => _251[0], 'optionalAccess', _252 => _252.code]) === "file-too-large") {
|
|
9025
9072
|
_chunkXAWKRNYMjs.showError.call(void 0, t("common.errors.file"), {
|
|
9026
9073
|
description: t(`common.errors.file_max`, { size: maxSize / 1024 / 1024 })
|
|
9027
9074
|
});
|
|
9028
9075
|
break;
|
|
9029
9076
|
}
|
|
9030
|
-
if (_optionalChain([rejectedFiles, 'access',
|
|
9077
|
+
if (_optionalChain([rejectedFiles, 'access', _253 => _253[i], 'access', _254 => _254.errors, 'access', _255 => _255[0], 'optionalAccess', _256 => _256.message])) {
|
|
9031
9078
|
_chunkXAWKRNYMjs.showError.call(void 0, t(`common.errors.file`), {
|
|
9032
9079
|
description: rejectedFiles[i].errors[0].message
|
|
9033
9080
|
});
|
|
@@ -9226,7 +9273,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, FormCheckbox, "FormCheckbox");
|
|
|
9226
9273
|
var _dynamic = require('next/dynamic'); var _dynamic2 = _interopRequireDefault(_dynamic);
|
|
9227
9274
|
|
|
9228
9275
|
|
|
9229
|
-
var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-
|
|
9276
|
+
var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-3SXAMY6O.js"))), {
|
|
9230
9277
|
ssr: false
|
|
9231
9278
|
});
|
|
9232
9279
|
var BlockNoteEditorContainer = React.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function EditorContainer(props) {
|
|
@@ -9290,7 +9337,7 @@ function FormBlockNote({
|
|
|
9290
9337
|
onChange: (content, isEmpty) => {
|
|
9291
9338
|
lastEditorContentRef.current = content;
|
|
9292
9339
|
field.onChange(content);
|
|
9293
|
-
_optionalChain([onEmptyChange, 'optionalCall',
|
|
9340
|
+
_optionalChain([onEmptyChange, 'optionalCall', _257 => _257(isEmpty)]);
|
|
9294
9341
|
},
|
|
9295
9342
|
placeholder,
|
|
9296
9343
|
bordered: true,
|
|
@@ -9325,14 +9372,17 @@ function FormDate({
|
|
|
9325
9372
|
name,
|
|
9326
9373
|
minDate,
|
|
9327
9374
|
onChange,
|
|
9328
|
-
isRequired = false
|
|
9375
|
+
isRequired = false,
|
|
9376
|
+
defaultMonth,
|
|
9377
|
+
allowEmpty
|
|
9329
9378
|
}) {
|
|
9379
|
+
const t = _chunkSE5HIHJSjs.useI18nTranslations.call(void 0, );
|
|
9330
9380
|
const locale = _chunkSE5HIHJSjs.useI18nLocale.call(void 0, );
|
|
9331
9381
|
const dateFnsLocale = _chunkSE5HIHJSjs.useI18nDateFnsLocale.call(void 0, );
|
|
9332
9382
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
9333
9383
|
const [displayMonth, setDisplayMonth] = _react.useState.call(void 0, () => {
|
|
9334
9384
|
const currentValue = form.getValues(id);
|
|
9335
|
-
return currentValue || /* @__PURE__ */ new Date();
|
|
9385
|
+
return currentValue || defaultMonth || /* @__PURE__ */ new Date();
|
|
9336
9386
|
});
|
|
9337
9387
|
const dateFormatter = _react.useMemo.call(void 0,
|
|
9338
9388
|
() => new Intl.DateTimeFormat(locale, { day: "2-digit", month: "2-digit", year: "numeric" }),
|
|
@@ -9395,7 +9445,7 @@ function FormDate({
|
|
|
9395
9445
|
),
|
|
9396
9446
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, InputGroupAddon, { align: "inline-end", children: [
|
|
9397
9447
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}), nativeButton: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InputGroupButton, { variant: "ghost", size: "icon-xs", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Calendar, { className: "h-4 w-4 opacity-50" }) }) }),
|
|
9398
|
-
field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9448
|
+
field.value && allowEmpty !== false && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9399
9449
|
InputGroupButton,
|
|
9400
9450
|
{
|
|
9401
9451
|
variant: "ghost",
|
|
@@ -9410,25 +9460,43 @@ function FormDate({
|
|
|
9410
9460
|
)
|
|
9411
9461
|
] })
|
|
9412
9462
|
] }),
|
|
9413
|
-
/* @__PURE__ */ _jsxruntime.
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
|
|
9424
|
-
|
|
9425
|
-
|
|
9426
|
-
|
|
9427
|
-
|
|
9428
|
-
|
|
9429
|
-
|
|
9430
|
-
|
|
9431
|
-
|
|
9463
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, PopoverContent, { className: "w-auto p-0", align: "end", children: [
|
|
9464
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9465
|
+
Calendar,
|
|
9466
|
+
{
|
|
9467
|
+
mode: "single",
|
|
9468
|
+
captionLayout: "dropdown",
|
|
9469
|
+
selected: field.value,
|
|
9470
|
+
onSelect: (e) => {
|
|
9471
|
+
handleCalendarSelect(e, field);
|
|
9472
|
+
setOpen(false);
|
|
9473
|
+
},
|
|
9474
|
+
disabled: (date) => minDate && date < minDate ? true : false,
|
|
9475
|
+
locale: dateFnsLocale,
|
|
9476
|
+
weekStartsOn: 1,
|
|
9477
|
+
month: displayMonth,
|
|
9478
|
+
onMonthChange: setDisplayMonth,
|
|
9479
|
+
startMonth: new Date(1900, 0),
|
|
9480
|
+
endMonth: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 11)
|
|
9481
|
+
}
|
|
9482
|
+
),
|
|
9483
|
+
allowEmpty !== false && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border-t p-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9484
|
+
Button,
|
|
9485
|
+
{
|
|
9486
|
+
type: "button",
|
|
9487
|
+
variant: "outline",
|
|
9488
|
+
className: "w-full",
|
|
9489
|
+
disabled: !field.value,
|
|
9490
|
+
onClick: () => {
|
|
9491
|
+
field.onChange(void 0);
|
|
9492
|
+
setInputValue("");
|
|
9493
|
+
if (onChange) onChange(void 0);
|
|
9494
|
+
setOpen(false);
|
|
9495
|
+
},
|
|
9496
|
+
children: t(`ui.buttons.clear`)
|
|
9497
|
+
}
|
|
9498
|
+
) })
|
|
9499
|
+
] })
|
|
9432
9500
|
] }) }) });
|
|
9433
9501
|
}
|
|
9434
9502
|
_chunk7QVYU63Ejs.__name.call(void 0, FormDate, "FormDate");
|
|
@@ -9443,12 +9511,17 @@ function FormDateTime({
|
|
|
9443
9511
|
name,
|
|
9444
9512
|
minDate,
|
|
9445
9513
|
onChange,
|
|
9446
|
-
allowEmpty
|
|
9514
|
+
allowEmpty,
|
|
9515
|
+
defaultMonth
|
|
9447
9516
|
}) {
|
|
9448
9517
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
9449
9518
|
const t = _chunkSE5HIHJSjs.useI18nTranslations.call(void 0, );
|
|
9450
9519
|
const locale = _chunkSE5HIHJSjs.useI18nLocale.call(void 0, );
|
|
9451
9520
|
const dateFnsLocale = _chunkSE5HIHJSjs.useI18nDateFnsLocale.call(void 0, );
|
|
9521
|
+
const [displayMonth, setDisplayMonth] = _react.useState.call(void 0, () => {
|
|
9522
|
+
const currentValue = form.getValues(id);
|
|
9523
|
+
return currentValue || defaultMonth || /* @__PURE__ */ new Date();
|
|
9524
|
+
});
|
|
9452
9525
|
const dateTimeFormatter = _react.useMemo.call(void 0,
|
|
9453
9526
|
() => new Intl.DateTimeFormat(locale, {
|
|
9454
9527
|
year: "numeric",
|
|
@@ -9525,7 +9598,10 @@ function FormDateTime({
|
|
|
9525
9598
|
Calendar,
|
|
9526
9599
|
{
|
|
9527
9600
|
mode: "single",
|
|
9601
|
+
captionLayout: "dropdown",
|
|
9528
9602
|
selected: field.value,
|
|
9603
|
+
month: displayMonth,
|
|
9604
|
+
onMonthChange: setDisplayMonth,
|
|
9529
9605
|
onSelect: (date) => {
|
|
9530
9606
|
if (date) {
|
|
9531
9607
|
const newDate = new Date(date);
|
|
@@ -9536,13 +9612,17 @@ function FormDateTime({
|
|
|
9536
9612
|
newDate.setHours(selectedHours, selectedMinutes);
|
|
9537
9613
|
}
|
|
9538
9614
|
form.setValue(id, newDate);
|
|
9615
|
+
setDisplayMonth(newDate);
|
|
9539
9616
|
if (onChange) onChange(newDate);
|
|
9540
9617
|
setSelectedHours(newDate.getHours());
|
|
9541
9618
|
setSelectedMinutes(roundToNearestFiveMinutes(newDate.getMinutes()));
|
|
9542
9619
|
}
|
|
9543
9620
|
},
|
|
9544
9621
|
disabled: (date) => minDate && date < minDate ? true : false,
|
|
9545
|
-
locale: dateFnsLocale
|
|
9622
|
+
locale: dateFnsLocale,
|
|
9623
|
+
weekStartsOn: 1,
|
|
9624
|
+
startMonth: new Date(1900, 0),
|
|
9625
|
+
endMonth: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 11)
|
|
9546
9626
|
}
|
|
9547
9627
|
),
|
|
9548
9628
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-row items-end justify-center space-x-4", children: [
|
|
@@ -9591,16 +9671,34 @@ function FormDateTime({
|
|
|
9591
9671
|
)
|
|
9592
9672
|
] })
|
|
9593
9673
|
] }),
|
|
9594
|
-
/* @__PURE__ */ _jsxruntime.
|
|
9595
|
-
|
|
9596
|
-
|
|
9597
|
-
|
|
9598
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9674
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mt-2 flex flex-row gap-x-2", children: [
|
|
9675
|
+
allowEmpty !== false && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9676
|
+
Button,
|
|
9677
|
+
{
|
|
9678
|
+
type: "button",
|
|
9679
|
+
variant: "outline",
|
|
9680
|
+
className: "flex-1",
|
|
9681
|
+
disabled: !field.value,
|
|
9682
|
+
onClick: () => {
|
|
9683
|
+
if (onChange) onChange(void 0);
|
|
9684
|
+
form.setValue(id, "");
|
|
9685
|
+
setOpen(false);
|
|
9686
|
+
},
|
|
9687
|
+
children: t(`ui.buttons.clear`)
|
|
9688
|
+
}
|
|
9689
|
+
),
|
|
9690
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9691
|
+
Button,
|
|
9692
|
+
{
|
|
9693
|
+
type: "button",
|
|
9694
|
+
className: "flex-1",
|
|
9695
|
+
onClick: () => {
|
|
9696
|
+
setOpen(false);
|
|
9697
|
+
},
|
|
9698
|
+
children: t(`ui.buttons.select_date`)
|
|
9699
|
+
}
|
|
9700
|
+
)
|
|
9701
|
+
] })
|
|
9604
9702
|
] }) })
|
|
9605
9703
|
] }) }) }) });
|
|
9606
9704
|
}
|
|
@@ -9816,11 +9914,11 @@ function FormPlaceAutocomplete({
|
|
|
9816
9914
|
const data = await response.json();
|
|
9817
9915
|
if (data.suggestions) {
|
|
9818
9916
|
const formattedSuggestions = data.suggestions.map((suggestion) => ({
|
|
9819
|
-
place_id: _optionalChain([suggestion, 'access',
|
|
9820
|
-
description: _optionalChain([suggestion, 'access',
|
|
9917
|
+
place_id: _optionalChain([suggestion, 'access', _258 => _258.placePrediction, 'optionalAccess', _259 => _259.placeId]) || "",
|
|
9918
|
+
description: _optionalChain([suggestion, 'access', _260 => _260.placePrediction, 'optionalAccess', _261 => _261.text, 'optionalAccess', _262 => _262.text]) || "",
|
|
9821
9919
|
structured_formatting: {
|
|
9822
|
-
main_text: _optionalChain([suggestion, 'access',
|
|
9823
|
-
secondary_text: _optionalChain([suggestion, 'access',
|
|
9920
|
+
main_text: _optionalChain([suggestion, 'access', _263 => _263.placePrediction, 'optionalAccess', _264 => _264.structuredFormat, 'optionalAccess', _265 => _265.mainText, 'optionalAccess', _266 => _266.text]) || "",
|
|
9921
|
+
secondary_text: _optionalChain([suggestion, 'access', _267 => _267.placePrediction, 'optionalAccess', _268 => _268.structuredFormat, 'optionalAccess', _269 => _269.secondaryText, 'optionalAccess', _270 => _270.text]) || ""
|
|
9824
9922
|
}
|
|
9825
9923
|
}));
|
|
9826
9924
|
setSuggestions(formattedSuggestions);
|
|
@@ -9967,8 +10065,8 @@ function FormPlaceAutocomplete({
|
|
|
9967
10065
|
className: "hover:bg-muted cursor-pointer px-3 py-2 text-sm",
|
|
9968
10066
|
onClick: () => handleSuggestionSelect(suggestion),
|
|
9969
10067
|
children: [
|
|
9970
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access',
|
|
9971
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access',
|
|
10068
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access', _271 => _271.structured_formatting, 'optionalAccess', _272 => _272.main_text]) }),
|
|
10069
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access', _273 => _273.structured_formatting, 'optionalAccess', _274 => _274.secondary_text]) })
|
|
9972
10070
|
]
|
|
9973
10071
|
},
|
|
9974
10072
|
suggestion.place_id || index
|
|
@@ -10014,7 +10112,7 @@ function FormSelect({
|
|
|
10014
10112
|
disabled,
|
|
10015
10113
|
"data-testid": testId,
|
|
10016
10114
|
children: [
|
|
10017
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: field.value ? _optionalChain([values, 'access',
|
|
10115
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: field.value ? _optionalChain([values, 'access', _275 => _275.find, 'call', _276 => _276((v) => v.id === field.value), 'optionalAccess', _277 => _277.text]) : _nullishCoalesce(placeholder, () => ( "")) }) }),
|
|
10018
10116
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SelectContent, { children: [
|
|
10019
10117
|
allowEmpty && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: EMPTY_VALUE, className: "text-muted-foreground", children: _nullishCoalesce(placeholder, () => ( "")) }),
|
|
10020
10118
|
values.map((type) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: type.id, children: type.text }, type.id))
|
|
@@ -10185,7 +10283,7 @@ function UserAvatar({ user, className, showFull, showLink, showTooltip = true })
|
|
|
10185
10283
|
}, "getInitials");
|
|
10186
10284
|
const getAvatar = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
10187
10285
|
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: [
|
|
10188
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess',
|
|
10286
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess', _278 => _278.avatar]) }),
|
|
10189
10287
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: getInitials3(user.name) })
|
|
10190
10288
|
] }) });
|
|
10191
10289
|
}, "getAvatar");
|
|
@@ -10376,7 +10474,7 @@ var useUserTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
|
|
|
10376
10474
|
})
|
|
10377
10475
|
};
|
|
10378
10476
|
const columns = _react.useMemo.call(void 0, () => {
|
|
10379
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
10477
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _279 => _279[field], 'optionalCall', _280 => _280()])).filter((col) => col !== void 0);
|
|
10380
10478
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
10381
10479
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
10382
10480
|
}, "useUserTableStructure");
|
|
@@ -10490,10 +10588,10 @@ function UserSelector({ id, form, label, placeholder, onChange, isRequired = fal
|
|
|
10490
10588
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
|
|
10491
10589
|
/* @__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: [
|
|
10492
10590
|
/* @__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: [
|
|
10493
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access',
|
|
10494
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access',
|
|
10591
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access', _281 => _281.value, 'optionalAccess', _282 => _282.avatar]) }),
|
|
10592
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access', _283 => _283.value, 'optionalAccess', _284 => _284.name]) ? _optionalChain([field, 'access', _285 => _285.value, 'optionalAccess', _286 => _286.name, 'access', _287 => _287.split, 'call', _288 => _288(" "), 'access', _289 => _289.map, 'call', _290 => _290((name) => name.charAt(0).toUpperCase())]) : "X" })
|
|
10495
10593
|
] }) }),
|
|
10496
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access',
|
|
10594
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _291 => _291.value, 'optionalAccess', _292 => _292.name]), () => ( "")) })
|
|
10497
10595
|
] }) : /* @__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 }) }))) }) }) }),
|
|
10498
10596
|
field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10499
10597
|
_lucidereact.CircleX,
|
|
@@ -10824,7 +10922,7 @@ function CompanyUsersList({ isDeleted, fullWidth }) {
|
|
|
10824
10922
|
const data = useDataListRetriever({
|
|
10825
10923
|
ready: !!company,
|
|
10826
10924
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkXAWKRNYMjs.UserService.findAllUsers(params), "retriever"),
|
|
10827
|
-
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess',
|
|
10925
|
+
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _293 => _293.id]), isDeleted },
|
|
10828
10926
|
module: _chunkXAWKRNYMjs.Modules.User
|
|
10829
10927
|
});
|
|
10830
10928
|
_react.useEffect.call(void 0, () => {
|
|
@@ -10931,11 +11029,11 @@ function UserListInAdd({ data, existingUsers, setSelectedUser, setLevelOpen }) {
|
|
|
10931
11029
|
className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
|
|
10932
11030
|
onClick: (_e) => {
|
|
10933
11031
|
setSelectedUser(user);
|
|
10934
|
-
_optionalChain([setLevelOpen, 'optionalCall',
|
|
11032
|
+
_optionalChain([setLevelOpen, 'optionalCall', _294 => _294(true)]);
|
|
10935
11033
|
},
|
|
10936
11034
|
onSelect: (_e) => {
|
|
10937
11035
|
setSelectedUser(user);
|
|
10938
|
-
_optionalChain([setLevelOpen, 'optionalCall',
|
|
11036
|
+
_optionalChain([setLevelOpen, 'optionalCall', _295 => _295(true)]);
|
|
10939
11037
|
},
|
|
10940
11038
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between px-4 py-1", children: [
|
|
10941
11039
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user }),
|
|
@@ -11066,7 +11164,7 @@ function CompanyContent({ company, actions }) {
|
|
|
11066
11164
|
company.legal_address
|
|
11067
11165
|
] }),
|
|
11068
11166
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
|
|
11069
|
-
_optionalChain([company, 'access',
|
|
11167
|
+
_optionalChain([company, 'access', _296 => _296.configurations, 'optionalAccess', _297 => _297.country]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
|
|
11070
11168
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
|
|
11071
11169
|
t("features.configuration.country"),
|
|
11072
11170
|
":"
|
|
@@ -11074,7 +11172,7 @@ function CompanyContent({ company, actions }) {
|
|
|
11074
11172
|
" ",
|
|
11075
11173
|
company.configurations.country
|
|
11076
11174
|
] }),
|
|
11077
|
-
_optionalChain([company, 'access',
|
|
11175
|
+
_optionalChain([company, 'access', _298 => _298.configurations, 'optionalAccess', _299 => _299.currency]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
|
|
11078
11176
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
|
|
11079
11177
|
t("features.configuration.currency"),
|
|
11080
11178
|
":"
|
|
@@ -11484,7 +11582,7 @@ function CompanyEditorInternal({
|
|
|
11484
11582
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
11485
11583
|
const fiscalRef = _react.useRef.call(void 0, null);
|
|
11486
11584
|
const addressComponentsRef = _react.useRef.call(void 0, {});
|
|
11487
|
-
const canAccessFeatures = hasRole(_chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkSE5HIHJSjs.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access',
|
|
11585
|
+
const canAccessFeatures = hasRole(_chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkSE5HIHJSjs.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access', _300 => _300.env, 'access', _301 => _301.NEXT_PUBLIC_PRIVATE_INSTALLATION, 'optionalAccess', _302 => _302.toLowerCase, 'call', _303 => _303()]) === "true";
|
|
11488
11586
|
const handleDialogOpenChange = _react.useCallback.call(void 0,
|
|
11489
11587
|
(open) => {
|
|
11490
11588
|
if (open && features.length === 0 && canAccessFeatures) {
|
|
@@ -11499,7 +11597,7 @@ function CompanyEditorInternal({
|
|
|
11499
11597
|
_chunk7QVYU63Ejs.__name.call(void 0, fetchFeatures, "fetchFeatures");
|
|
11500
11598
|
fetchFeatures();
|
|
11501
11599
|
}
|
|
11502
|
-
_optionalChain([onDialogOpenChange, 'optionalCall',
|
|
11600
|
+
_optionalChain([onDialogOpenChange, 'optionalCall', _304 => _304(open)]);
|
|
11503
11601
|
},
|
|
11504
11602
|
[features.length, canAccessFeatures, hasRole, onDialogOpenChange]
|
|
11505
11603
|
);
|
|
@@ -11544,12 +11642,12 @@ function CompanyEditorInternal({
|
|
|
11544
11642
|
);
|
|
11545
11643
|
const getDefaultValues = _react.useCallback.call(void 0, () => {
|
|
11546
11644
|
return {
|
|
11547
|
-
id: _optionalChain([company, 'optionalAccess',
|
|
11548
|
-
name: _optionalChain([company, 'optionalAccess',
|
|
11549
|
-
featureIds: _optionalChain([company, 'optionalAccess',
|
|
11550
|
-
moduleIds: _optionalChain([company, 'optionalAccess',
|
|
11551
|
-
logo: _optionalChain([company, 'optionalAccess',
|
|
11552
|
-
legal_address: _optionalChain([company, 'optionalAccess',
|
|
11645
|
+
id: _optionalChain([company, 'optionalAccess', _305 => _305.id]) || _uuid.v4.call(void 0, ),
|
|
11646
|
+
name: _optionalChain([company, 'optionalAccess', _306 => _306.name]) || "",
|
|
11647
|
+
featureIds: _optionalChain([company, 'optionalAccess', _307 => _307.features, 'access', _308 => _308.map, 'call', _309 => _309((feature) => feature.id)]) || [],
|
|
11648
|
+
moduleIds: _optionalChain([company, 'optionalAccess', _310 => _310.modules, 'access', _311 => _311.map, 'call', _312 => _312((module) => module.id)]) || [],
|
|
11649
|
+
logo: _optionalChain([company, 'optionalAccess', _313 => _313.logo]) || "",
|
|
11650
|
+
legal_address: _optionalChain([company, 'optionalAccess', _314 => _314.legal_address]) || ""
|
|
11553
11651
|
};
|
|
11554
11652
|
}, [company]);
|
|
11555
11653
|
const form = _reacthookform.useForm.call(void 0, {
|
|
@@ -11561,7 +11659,7 @@ function CompanyEditorInternal({
|
|
|
11561
11659
|
{
|
|
11562
11660
|
form,
|
|
11563
11661
|
entityType: t(`entities.companies`, { count: 1 }),
|
|
11564
|
-
entityName: _optionalChain([company, 'optionalAccess',
|
|
11662
|
+
entityName: _optionalChain([company, 'optionalAccess', _315 => _315.name]),
|
|
11565
11663
|
isEdit: !!company,
|
|
11566
11664
|
module: _chunkXAWKRNYMjs.Modules.Company,
|
|
11567
11665
|
propagateChanges,
|
|
@@ -11586,7 +11684,7 @@ function CompanyEditorInternal({
|
|
|
11586
11684
|
throw new Error("Fiscal data validation failed");
|
|
11587
11685
|
}
|
|
11588
11686
|
const payload = {
|
|
11589
|
-
id: _nullishCoalesce(_optionalChain([company, 'optionalAccess',
|
|
11687
|
+
id: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _316 => _316.id]), () => ( _uuid.v4.call(void 0, ))),
|
|
11590
11688
|
name: values.name,
|
|
11591
11689
|
logo: files && contentType ? values.logo : void 0,
|
|
11592
11690
|
featureIds: values.featureIds,
|
|
@@ -11617,10 +11715,10 @@ function CompanyEditorInternal({
|
|
|
11617
11715
|
dialogOpen,
|
|
11618
11716
|
onDialogOpenChange: handleDialogOpenChange,
|
|
11619
11717
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-start justify-between gap-x-4", children: [
|
|
11620
|
-
/* @__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',
|
|
11718
|
+
/* @__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', _317 => _317.logo]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
11621
11719
|
_image2.default,
|
|
11622
11720
|
{
|
|
11623
|
-
src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess',
|
|
11721
|
+
src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess', _318 => _318.logo]) || "",
|
|
11624
11722
|
alt: "Company Logo",
|
|
11625
11723
|
width: 200,
|
|
11626
11724
|
height: 200
|
|
@@ -11654,7 +11752,7 @@ function CompanyEditorInternal({
|
|
|
11654
11752
|
}
|
|
11655
11753
|
),
|
|
11656
11754
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mt-2 text-sm font-semibold", children: t(`company.sections.fiscal_data`) }),
|
|
11657
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess',
|
|
11755
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess', _319 => _319.fiscal_data])) })
|
|
11658
11756
|
] }),
|
|
11659
11757
|
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 }) }) })
|
|
11660
11758
|
] })
|
|
@@ -11771,7 +11869,7 @@ function NotificationToast(notification, t, generateUrl, reouter) {
|
|
|
11771
11869
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
11772
11870
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
|
|
11773
11871
|
strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
|
|
11774
|
-
actor: _nullishCoalesce(_optionalChain([data, 'access',
|
|
11872
|
+
actor: _nullishCoalesce(_optionalChain([data, 'access', _320 => _320.actor, 'optionalAccess', _321 => _321.name]), () => ( "")),
|
|
11775
11873
|
title: data.title,
|
|
11776
11874
|
message: _nullishCoalesce(notification.message, () => ( ""))
|
|
11777
11875
|
}) }),
|
|
@@ -11800,7 +11898,7 @@ function NotificationMenuItem({ notification, closePopover }) {
|
|
|
11800
11898
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
11801
11899
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
|
|
11802
11900
|
strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
|
|
11803
|
-
actor: _nullishCoalesce(_optionalChain([data, 'access',
|
|
11901
|
+
actor: _nullishCoalesce(_optionalChain([data, 'access', _322 => _322.actor, 'optionalAccess', _323 => _323.name]), () => ( "")),
|
|
11804
11902
|
title: data.title,
|
|
11805
11903
|
message: _nullishCoalesce(notification.message, () => ( ""))
|
|
11806
11904
|
}) }),
|
|
@@ -11857,7 +11955,7 @@ var NotificationContextProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(v
|
|
|
11857
11955
|
_react.useEffect.call(void 0, () => {
|
|
11858
11956
|
if (hasInitiallyLoaded || !currentUser) return;
|
|
11859
11957
|
if (_chunkSE5HIHJSjs.isRolesConfigured.call(void 0, )) {
|
|
11860
|
-
const isAdmin = _optionalChain([currentUser, 'access',
|
|
11958
|
+
const isAdmin = _optionalChain([currentUser, 'access', _324 => _324.roles, 'optionalAccess', _325 => _325.some, 'call', _326 => _326((role) => role.id === _chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator)]);
|
|
11861
11959
|
if (isAdmin) {
|
|
11862
11960
|
setHasInitiallyLoaded(true);
|
|
11863
11961
|
return;
|
|
@@ -12059,7 +12157,7 @@ function OnboardingProvider({
|
|
|
12059
12157
|
let tourSteps = steps;
|
|
12060
12158
|
if (!tourSteps) {
|
|
12061
12159
|
const tour2 = tours.find((t) => t.id === tourId);
|
|
12062
|
-
tourSteps = _optionalChain([tour2, 'optionalAccess',
|
|
12160
|
+
tourSteps = _optionalChain([tour2, 'optionalAccess', _327 => _327.steps]);
|
|
12063
12161
|
}
|
|
12064
12162
|
if (!tourSteps || tourSteps.length === 0) {
|
|
12065
12163
|
console.warn(`No steps found for tour: ${tourId}`);
|
|
@@ -12127,10 +12225,10 @@ function OnboardingProvider({
|
|
|
12127
12225
|
when: {
|
|
12128
12226
|
show: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
12129
12227
|
setCurrentStepIndex(index);
|
|
12130
|
-
_optionalChain([stepConfig, 'access',
|
|
12228
|
+
_optionalChain([stepConfig, 'access', _328 => _328.onShow, 'optionalCall', _329 => _329()]);
|
|
12131
12229
|
}, "show"),
|
|
12132
12230
|
hide: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
12133
|
-
_optionalChain([stepConfig, 'access',
|
|
12231
|
+
_optionalChain([stepConfig, 'access', _330 => _330.onHide, 'optionalCall', _331 => _331()]);
|
|
12134
12232
|
}, "hide")
|
|
12135
12233
|
}
|
|
12136
12234
|
});
|
|
@@ -12361,10 +12459,10 @@ function HowToEditorInternal({
|
|
|
12361
12459
|
);
|
|
12362
12460
|
const getDefaultValues = _react.useCallback.call(void 0,
|
|
12363
12461
|
() => ({
|
|
12364
|
-
id: _optionalChain([howTo, 'optionalAccess',
|
|
12365
|
-
name: _optionalChain([howTo, 'optionalAccess',
|
|
12366
|
-
description: _optionalChain([howTo, 'optionalAccess',
|
|
12367
|
-
pages: _chunkXAWKRNYMjs.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess',
|
|
12462
|
+
id: _optionalChain([howTo, 'optionalAccess', _332 => _332.id]) || _uuid.v4.call(void 0, ),
|
|
12463
|
+
name: _optionalChain([howTo, 'optionalAccess', _333 => _333.name]) || "",
|
|
12464
|
+
description: _optionalChain([howTo, 'optionalAccess', _334 => _334.description]) || [],
|
|
12465
|
+
pages: _chunkXAWKRNYMjs.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess', _335 => _335.pages]))
|
|
12368
12466
|
}),
|
|
12369
12467
|
[howTo]
|
|
12370
12468
|
);
|
|
@@ -12395,7 +12493,7 @@ function HowToEditorInternal({
|
|
|
12395
12493
|
{
|
|
12396
12494
|
form,
|
|
12397
12495
|
entityType: t(`entities.howtos`, { count: 1 }),
|
|
12398
|
-
entityName: _optionalChain([howTo, 'optionalAccess',
|
|
12496
|
+
entityName: _optionalChain([howTo, 'optionalAccess', _336 => _336.name]),
|
|
12399
12497
|
isEdit: !!howTo,
|
|
12400
12498
|
module: _chunkXAWKRNYMjs.Modules.HowTo,
|
|
12401
12499
|
propagateChanges,
|
|
@@ -12699,7 +12797,7 @@ function withPatchedTitle(source, title) {
|
|
|
12699
12797
|
return _chunkXAWKRNYMjs.rehydrate.call(void 0, _chunkXAWKRNYMjs.Modules.Assistant, {
|
|
12700
12798
|
jsonApi: {
|
|
12701
12799
|
...dehydrated.jsonApi,
|
|
12702
|
-
attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access',
|
|
12800
|
+
attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _337 => _337.jsonApi, 'optionalAccess', _338 => _338.attributes]), () => ( {})), title }
|
|
12703
12801
|
},
|
|
12704
12802
|
included: dehydrated.included
|
|
12705
12803
|
});
|
|
@@ -12726,7 +12824,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages }
|
|
|
12726
12824
|
if (!trimmed) return;
|
|
12727
12825
|
const optimistic = _chunkXAWKRNYMjs.AssistantMessage.buildOptimistic({
|
|
12728
12826
|
content: trimmed,
|
|
12729
|
-
assistantId: _optionalChain([assistant, 'optionalAccess',
|
|
12827
|
+
assistantId: _optionalChain([assistant, 'optionalAccess', _339 => _339.id]),
|
|
12730
12828
|
position: nextPosition(messages)
|
|
12731
12829
|
});
|
|
12732
12830
|
setMessages((prev) => [...prev, optimistic]);
|
|
@@ -12736,7 +12834,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages }
|
|
|
12736
12834
|
if (assistant && payload.assistantId && payload.assistantId !== assistant.id) return;
|
|
12737
12835
|
if (typeof payload.status === "string") setStatus(payload.status);
|
|
12738
12836
|
}, "handler");
|
|
12739
|
-
_optionalChain([socket, 'optionalAccess',
|
|
12837
|
+
_optionalChain([socket, 'optionalAccess', _340 => _340.on, 'call', _341 => _341("assistant:status", handler)]);
|
|
12740
12838
|
try {
|
|
12741
12839
|
if (!assistant) {
|
|
12742
12840
|
const created = await _chunkXAWKRNYMjs.AssistantService.create({ firstMessage: trimmed });
|
|
@@ -12761,7 +12859,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages }
|
|
|
12761
12859
|
return next;
|
|
12762
12860
|
});
|
|
12763
12861
|
} finally {
|
|
12764
|
-
_optionalChain([socket, 'optionalAccess',
|
|
12862
|
+
_optionalChain([socket, 'optionalAccess', _342 => _342.off, 'call', _343 => _343("assistant:status", handler)]);
|
|
12765
12863
|
setSending(false);
|
|
12766
12864
|
setStatus(void 0);
|
|
12767
12865
|
}
|
|
@@ -12811,7 +12909,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages }
|
|
|
12811
12909
|
await _chunkXAWKRNYMjs.AssistantService.delete({ id });
|
|
12812
12910
|
setThreads((prev) => prev.filter((t2) => t2.id !== id));
|
|
12813
12911
|
setAssistant((prev) => {
|
|
12814
|
-
if (_optionalChain([prev, 'optionalAccess',
|
|
12912
|
+
if (_optionalChain([prev, 'optionalAccess', _344 => _344.id]) === id) {
|
|
12815
12913
|
setMessages([]);
|
|
12816
12914
|
return void 0;
|
|
12817
12915
|
}
|
|
@@ -13026,7 +13124,7 @@ function EditableAvatar({
|
|
|
13026
13124
|
}, [image, isUploading, patchImage, t]);
|
|
13027
13125
|
const handleFileInputChange = _react.useCallback.call(void 0,
|
|
13028
13126
|
(e) => {
|
|
13029
|
-
const file = _optionalChain([e, 'access',
|
|
13127
|
+
const file = _optionalChain([e, 'access', _345 => _345.target, 'access', _346 => _346.files, 'optionalAccess', _347 => _347[0]]);
|
|
13030
13128
|
if (file) handleFile(file);
|
|
13031
13129
|
e.target.value = "";
|
|
13032
13130
|
},
|
|
@@ -13035,7 +13133,7 @@ function EditableAvatar({
|
|
|
13035
13133
|
const handleDrop = _react.useCallback.call(void 0,
|
|
13036
13134
|
(e) => {
|
|
13037
13135
|
e.preventDefault();
|
|
13038
|
-
const file = _optionalChain([e, 'access',
|
|
13136
|
+
const file = _optionalChain([e, 'access', _348 => _348.dataTransfer, 'access', _349 => _349.files, 'optionalAccess', _350 => _350[0]]);
|
|
13039
13137
|
if (file && file.type.startsWith("image/")) {
|
|
13040
13138
|
handleFile(file);
|
|
13041
13139
|
}
|
|
@@ -13062,7 +13160,7 @@ function EditableAvatar({
|
|
|
13062
13160
|
"button",
|
|
13063
13161
|
{
|
|
13064
13162
|
type: "button",
|
|
13065
|
-
onClick: () => _optionalChain([fileInputRef, 'access',
|
|
13163
|
+
onClick: () => _optionalChain([fileInputRef, 'access', _351 => _351.current, 'optionalAccess', _352 => _352.click, 'call', _353 => _353()]),
|
|
13066
13164
|
disabled: isUploading,
|
|
13067
13165
|
className: "rounded-full p-2 text-white hover:bg-white/20 disabled:opacity-50",
|
|
13068
13166
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.PencilIcon, { className: "h-4 w-4" })
|
|
@@ -13143,7 +13241,7 @@ function BreadcrumbMobile({
|
|
|
13143
13241
|
}
|
|
13144
13242
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenu, { open, onOpenChange: setOpen, children: [
|
|
13145
13243
|
/* @__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: [
|
|
13146
|
-
_optionalChain([lastItem, 'optionalAccess',
|
|
13244
|
+
_optionalChain([lastItem, 'optionalAccess', _354 => _354.name]),
|
|
13147
13245
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronDownIcon, { className: "text-muted-foreground size-3.5" })
|
|
13148
13246
|
] }),
|
|
13149
13247
|
/* @__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, children: item.name }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: item.name }) }, index)) })
|
|
@@ -13447,7 +13545,7 @@ function RoundPageContainer({
|
|
|
13447
13545
|
const [mounted, setMounted] = _react.useState.call(void 0, false);
|
|
13448
13546
|
_react.useEffect.call(void 0, () => {
|
|
13449
13547
|
const match = document.cookie.split("; ").find((row) => row.startsWith(`${DETAILS_COOKIE_NAME}=`));
|
|
13450
|
-
if (_optionalChain([match, 'optionalAccess',
|
|
13548
|
+
if (_optionalChain([match, 'optionalAccess', _355 => _355.split, 'call', _356 => _356("="), 'access', _357 => _357[1]]) === "true") setShowDetailsState(true);
|
|
13451
13549
|
}, []);
|
|
13452
13550
|
_react.useEffect.call(void 0, () => {
|
|
13453
13551
|
setMounted(true);
|
|
@@ -13459,11 +13557,11 @@ function RoundPageContainer({
|
|
|
13459
13557
|
const searchParams = _navigation.useSearchParams.call(void 0, );
|
|
13460
13558
|
const section = searchParams.get("section");
|
|
13461
13559
|
const rewriteUrl = useUrlRewriter();
|
|
13462
|
-
const initialValue = tabs ? (section && tabs.find((i) => (_nullishCoalesce(_optionalChain([i, 'access',
|
|
13560
|
+
const initialValue = tabs ? (section && tabs.find((i) => (_nullishCoalesce(_optionalChain([i, 'access', _358 => _358.key, 'optionalAccess', _359 => _359.name]), () => ( i.label))) === section) ? section : null) || (_nullishCoalesce(_optionalChain([tabs, 'access', _360 => _360[0], 'access', _361 => _361.key, 'optionalAccess', _362 => _362.name]), () => ( tabs[0].label))) : void 0;
|
|
13463
13561
|
const [activeTab, setActiveTab] = _react.useState.call(void 0, initialValue);
|
|
13464
13562
|
_react.useEffect.call(void 0, () => {
|
|
13465
13563
|
if (tabs && section) {
|
|
13466
|
-
const tab = tabs.find((i) => (_nullishCoalesce(_optionalChain([i, 'access',
|
|
13564
|
+
const tab = tabs.find((i) => (_nullishCoalesce(_optionalChain([i, 'access', _363 => _363.key, 'optionalAccess', _364 => _364.name]), () => ( i.label))) === section);
|
|
13467
13565
|
if (tab) {
|
|
13468
13566
|
setActiveTab(section);
|
|
13469
13567
|
}
|
|
@@ -13476,7 +13574,7 @@ function RoundPageContainer({
|
|
|
13476
13574
|
},
|
|
13477
13575
|
[module, id, rewriteUrl]
|
|
13478
13576
|
);
|
|
13479
|
-
const activeFillHeight = _optionalChain([tabs, 'optionalAccess',
|
|
13577
|
+
const activeFillHeight = _optionalChain([tabs, 'optionalAccess', _365 => _365.find, 'call', _366 => _366((t) => (_nullishCoalesce(_optionalChain([t, 'access', _367 => _367.key, 'optionalAccess', _368 => _368.name]), () => ( t.label))) === activeTab), 'optionalAccess', _369 => _369.fillHeight]) === true;
|
|
13480
13578
|
const isReady = mounted && isMobile !== void 0;
|
|
13481
13579
|
if (!isReady) {
|
|
13482
13580
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
@@ -13532,10 +13630,10 @@ function RoundPageContainer({
|
|
|
13532
13630
|
},
|
|
13533
13631
|
children: [
|
|
13534
13632
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, {}) }),
|
|
13535
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectContent, { children: tabs.map((tab) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: _nullishCoalesce(_optionalChain([tab, 'access',
|
|
13633
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectContent, { children: tabs.map((tab) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: _nullishCoalesce(_optionalChain([tab, 'access', _370 => _370.key, 'optionalAccess', _371 => _371.name]), () => ( tab.label)), children: _nullishCoalesce(tab.contentLabel, () => ( tab.label)) }, tab.label)) })
|
|
13536
13634
|
]
|
|
13537
13635
|
}
|
|
13538
|
-
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TabsList, { children: tabs.map((tab) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TabsTrigger, { value: _nullishCoalesce(_optionalChain([tab, 'access',
|
|
13636
|
+
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TabsList, { children: tabs.map((tab) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TabsTrigger, { value: _nullishCoalesce(_optionalChain([tab, 'access', _372 => _372.key, 'optionalAccess', _373 => _373.name]), () => ( tab.label)), className: "px-4", children: _nullishCoalesce(tab.contentLabel, () => ( tab.label)) }, tab.label)) }) }),
|
|
13539
13637
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
13540
13638
|
"div",
|
|
13541
13639
|
{
|
|
@@ -13547,7 +13645,7 @@ function RoundPageContainer({
|
|
|
13547
13645
|
children: tabs.map((tab) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
13548
13646
|
TabsContent,
|
|
13549
13647
|
{
|
|
13550
|
-
value: _nullishCoalesce(_optionalChain([tab, 'access',
|
|
13648
|
+
value: _nullishCoalesce(_optionalChain([tab, 'access', _374 => _374.key, 'optionalAccess', _375 => _375.name]), () => ( tab.label)),
|
|
13551
13649
|
className: tab.fillHeight ? `flex flex-1 min-h-0 w-full flex-col` : `pb-20`,
|
|
13552
13650
|
children: tab.content
|
|
13553
13651
|
},
|
|
@@ -13675,14 +13773,14 @@ function BlockNoteEditorMentionHoverCard({
|
|
|
13675
13773
|
const entityType = target.dataset.mentionType;
|
|
13676
13774
|
const alias = target.dataset.mentionAlias;
|
|
13677
13775
|
setHovered((prev) => {
|
|
13678
|
-
if (_optionalChain([prev, 'optionalAccess',
|
|
13776
|
+
if (_optionalChain([prev, 'optionalAccess', _376 => _376.id]) === id && _optionalChain([prev, 'optionalAccess', _377 => _377.element]) === target) return prev;
|
|
13679
13777
|
return { id, entityType, alias, element: target };
|
|
13680
13778
|
});
|
|
13681
13779
|
}, "handleMouseOver");
|
|
13682
13780
|
const handleMouseOut = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
|
|
13683
13781
|
const target = e.target.closest("[data-mention-id]");
|
|
13684
13782
|
if (!target) return;
|
|
13685
|
-
const related = _optionalChain([e, 'access',
|
|
13783
|
+
const related = _optionalChain([e, 'access', _378 => _378.relatedTarget, 'optionalAccess', _379 => _379.closest, 'call', _380 => _380("[data-mention-id]")]);
|
|
13686
13784
|
if (related) return;
|
|
13687
13785
|
scheduleClose();
|
|
13688
13786
|
}, "handleMouseOut");
|
|
@@ -13696,7 +13794,7 @@ function BlockNoteEditorMentionHoverCard({
|
|
|
13696
13794
|
}, [containerRef, mentionResolveFn, cancelClose, scheduleClose]);
|
|
13697
13795
|
if (!hovered || !mentionResolveFn) return null;
|
|
13698
13796
|
const resolved = mentionResolveFn(hovered.id, hovered.entityType, hovered.alias);
|
|
13699
|
-
if (!_optionalChain([resolved, 'optionalAccess',
|
|
13797
|
+
if (!_optionalChain([resolved, 'optionalAccess', _381 => _381.HoverContent])) return null;
|
|
13700
13798
|
const ContentComponent = resolved.HoverContent;
|
|
13701
13799
|
const rect = hovered.element.getBoundingClientRect();
|
|
13702
13800
|
return _reactdom.createPortal.call(void 0,
|
|
@@ -13732,21 +13830,21 @@ var mentionDataAttrs = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (p)
|
|
|
13732
13830
|
}), "mentionDataAttrs");
|
|
13733
13831
|
var createMentionInlineContentSpec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (resolveFn, disableMention, nameResolver) => {
|
|
13734
13832
|
const Mention = React.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function Mention2(props) {
|
|
13735
|
-
const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall',
|
|
13833
|
+
const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _382 => _382(props.id, props.entityType, props.alias)]), () => ( props.alias));
|
|
13736
13834
|
if (disableMention) {
|
|
13737
|
-
const resolved2 = _optionalChain([resolveFn, 'optionalCall',
|
|
13738
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess',
|
|
13835
|
+
const resolved2 = _optionalChain([resolveFn, 'optionalCall', _383 => _383(props.id, props.entityType, displayName)]);
|
|
13836
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess', _384 => _384.url]), () => ( "#")), className: "text-primary", children: [
|
|
13739
13837
|
"@",
|
|
13740
13838
|
displayName
|
|
13741
13839
|
] });
|
|
13742
13840
|
}
|
|
13743
|
-
const resolved = _optionalChain([resolveFn, 'optionalCall',
|
|
13744
|
-
if (_optionalChain([resolved, 'optionalAccess',
|
|
13841
|
+
const resolved = _optionalChain([resolveFn, 'optionalCall', _385 => _385(props.id, props.entityType, displayName)]);
|
|
13842
|
+
if (_optionalChain([resolved, 'optionalAccess', _386 => _386.Inline])) {
|
|
13745
13843
|
const Custom = resolved.Inline;
|
|
13746
13844
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Custom, { ...props, alias: displayName });
|
|
13747
13845
|
}
|
|
13748
|
-
const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess',
|
|
13749
|
-
const handleClick = _optionalChain([resolved, 'optionalAccess',
|
|
13846
|
+
const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _387 => _387.url]), () => ( "#"));
|
|
13847
|
+
const handleClick = _optionalChain([resolved, 'optionalAccess', _388 => _388.onActivate]) ? (e) => resolved.onActivate(e, props) : void 0;
|
|
13750
13848
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
13751
13849
|
_link2.default,
|
|
13752
13850
|
{
|
|
@@ -13843,7 +13941,7 @@ function BlockNoteEditorMentionSuggestionMenu({
|
|
|
13843
13941
|
if (!suggestionMenuComponent) return void 0;
|
|
13844
13942
|
const Component2 = suggestionMenuComponent;
|
|
13845
13943
|
const Wrapped = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
|
|
13846
|
-
const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access',
|
|
13944
|
+
const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access', _389 => _389.items, 'access', _390 => _390[0], 'optionalAccess', _391 => _391.title]) === KEEP_OPEN_SENTINEL_TITLE;
|
|
13847
13945
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
13848
13946
|
Component2,
|
|
13849
13947
|
{
|
|
@@ -13852,7 +13950,7 @@ function BlockNoteEditorMentionSuggestionMenu({
|
|
|
13852
13950
|
selectedIndex: isSentinelOnly ? void 0 : props.selectedIndex,
|
|
13853
13951
|
onItemClick: (item) => {
|
|
13854
13952
|
if (item.title === KEEP_OPEN_SENTINEL_TITLE) return;
|
|
13855
|
-
_optionalChain([props, 'access',
|
|
13953
|
+
_optionalChain([props, 'access', _392 => _392.onItemClick, 'optionalCall', _393 => _393(item)]);
|
|
13856
13954
|
}
|
|
13857
13955
|
}
|
|
13858
13956
|
);
|
|
@@ -14037,10 +14135,10 @@ var cellId = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
|
|
|
14037
14135
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => params.toggleId ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14038
14136
|
Checkbox,
|
|
14039
14137
|
{
|
|
14040
|
-
checked: _optionalChain([params, 'access',
|
|
14138
|
+
checked: _optionalChain([params, 'access', _394 => _394.checkedIds, 'optionalAccess', _395 => _395.includes, 'call', _396 => _396(row.getValue(params.name))]) || false,
|
|
14041
14139
|
onCheckedChange: (value) => {
|
|
14042
14140
|
row.toggleSelected(!!value);
|
|
14043
|
-
_optionalChain([params, 'access',
|
|
14141
|
+
_optionalChain([params, 'access', _397 => _397.toggleId, 'optionalCall', _398 => _398(row.getValue(params.name))]);
|
|
14044
14142
|
},
|
|
14045
14143
|
"aria-label": "Select row"
|
|
14046
14144
|
}
|
|
@@ -14099,7 +14197,7 @@ function useJsonApiGet(params) {
|
|
|
14099
14197
|
const [response, setResponse] = _react.useState.call(void 0, null);
|
|
14100
14198
|
const isMounted = _react.useRef.call(void 0, true);
|
|
14101
14199
|
const fetchData = _react.useCallback.call(void 0, async () => {
|
|
14102
|
-
if (_optionalChain([params, 'access',
|
|
14200
|
+
if (_optionalChain([params, 'access', _399 => _399.options, 'optionalAccess', _400 => _400.enabled]) === false) return;
|
|
14103
14201
|
setLoading(true);
|
|
14104
14202
|
setError(null);
|
|
14105
14203
|
try {
|
|
@@ -14126,9 +14224,9 @@ function useJsonApiGet(params) {
|
|
|
14126
14224
|
setLoading(false);
|
|
14127
14225
|
}
|
|
14128
14226
|
}
|
|
14129
|
-
}, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access',
|
|
14227
|
+
}, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _401 => _401.options, 'optionalAccess', _402 => _402.enabled])]);
|
|
14130
14228
|
const fetchNextPage = _react.useCallback.call(void 0, async () => {
|
|
14131
|
-
if (!_optionalChain([response, 'optionalAccess',
|
|
14229
|
+
if (!_optionalChain([response, 'optionalAccess', _403 => _403.nextPage])) return;
|
|
14132
14230
|
setLoading(true);
|
|
14133
14231
|
try {
|
|
14134
14232
|
const nextResponse = await response.nextPage();
|
|
@@ -14149,7 +14247,7 @@ function useJsonApiGet(params) {
|
|
|
14149
14247
|
}
|
|
14150
14248
|
}, [response]);
|
|
14151
14249
|
const fetchPreviousPage = _react.useCallback.call(void 0, async () => {
|
|
14152
|
-
if (!_optionalChain([response, 'optionalAccess',
|
|
14250
|
+
if (!_optionalChain([response, 'optionalAccess', _404 => _404.prevPage])) return;
|
|
14153
14251
|
setLoading(true);
|
|
14154
14252
|
try {
|
|
14155
14253
|
const prevResponse = await response.prevPage();
|
|
@@ -14175,15 +14273,15 @@ function useJsonApiGet(params) {
|
|
|
14175
14273
|
return () => {
|
|
14176
14274
|
isMounted.current = false;
|
|
14177
14275
|
};
|
|
14178
|
-
}, [fetchData, ..._optionalChain([params, 'access',
|
|
14276
|
+
}, [fetchData, ..._optionalChain([params, 'access', _405 => _405.options, 'optionalAccess', _406 => _406.deps]) || []]);
|
|
14179
14277
|
return {
|
|
14180
14278
|
data,
|
|
14181
14279
|
loading,
|
|
14182
14280
|
error,
|
|
14183
14281
|
response,
|
|
14184
14282
|
refetch: fetchData,
|
|
14185
|
-
hasNextPage: !!_optionalChain([response, 'optionalAccess',
|
|
14186
|
-
hasPreviousPage: !!_optionalChain([response, 'optionalAccess',
|
|
14283
|
+
hasNextPage: !!_optionalChain([response, 'optionalAccess', _407 => _407.next]),
|
|
14284
|
+
hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _408 => _408.prev]),
|
|
14187
14285
|
fetchNextPage,
|
|
14188
14286
|
fetchPreviousPage
|
|
14189
14287
|
};
|
|
@@ -14261,17 +14359,17 @@ function useJsonApiMutation(config) {
|
|
|
14261
14359
|
if (apiResponse.ok) {
|
|
14262
14360
|
const resultData = apiResponse.data;
|
|
14263
14361
|
setData(resultData);
|
|
14264
|
-
_optionalChain([config, 'access',
|
|
14362
|
+
_optionalChain([config, 'access', _409 => _409.onSuccess, 'optionalCall', _410 => _410(resultData)]);
|
|
14265
14363
|
return resultData;
|
|
14266
14364
|
} else {
|
|
14267
14365
|
setError(apiResponse.error);
|
|
14268
|
-
_optionalChain([config, 'access',
|
|
14366
|
+
_optionalChain([config, 'access', _411 => _411.onError, 'optionalCall', _412 => _412(apiResponse.error)]);
|
|
14269
14367
|
return null;
|
|
14270
14368
|
}
|
|
14271
14369
|
} catch (err) {
|
|
14272
14370
|
const errorMessage = err instanceof Error ? err.message : "Unknown error";
|
|
14273
14371
|
setError(errorMessage);
|
|
14274
|
-
_optionalChain([config, 'access',
|
|
14372
|
+
_optionalChain([config, 'access', _413 => _413.onError, 'optionalCall', _414 => _414(errorMessage)]);
|
|
14275
14373
|
return null;
|
|
14276
14374
|
} finally {
|
|
14277
14375
|
setLoading(false);
|
|
@@ -14344,7 +14442,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
14344
14442
|
{
|
|
14345
14443
|
href: hasRole(_chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator) ? generateUrl({
|
|
14346
14444
|
page: "/administration",
|
|
14347
|
-
id: _optionalChain([_chunkXAWKRNYMjs.Modules, 'access',
|
|
14445
|
+
id: _optionalChain([_chunkXAWKRNYMjs.Modules, 'access', _415 => _415.Company, 'access', _416 => _416.pageUrl, 'optionalAccess', _417 => _417.substring, 'call', _418 => _418(1)]),
|
|
14348
14446
|
childPage: company.id
|
|
14349
14447
|
}) : generateUrl({ page: _chunkXAWKRNYMjs.Modules.Company, id: company.id }),
|
|
14350
14448
|
children: row.getValue("name")
|
|
@@ -14360,7 +14458,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
14360
14458
|
})
|
|
14361
14459
|
};
|
|
14362
14460
|
const columns = _react.useMemo.call(void 0, () => {
|
|
14363
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
14461
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _419 => _419[field], 'optionalCall', _420 => _420()])).filter((col) => col !== void 0);
|
|
14364
14462
|
}, [params.fields, fieldColumnMap, t, generateUrl, hasRole]);
|
|
14365
14463
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
14366
14464
|
}, "useCompanyTableStructure");
|
|
@@ -14372,7 +14470,7 @@ var GRACE_DAYS = 3;
|
|
|
14372
14470
|
var isAdministrator = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (currentUser) => {
|
|
14373
14471
|
if (!currentUser || !_chunkSE5HIHJSjs.isRolesConfigured.call(void 0, )) return false;
|
|
14374
14472
|
const adminRoleId = _chunkSE5HIHJSjs.getRoleId.call(void 0, ).Administrator;
|
|
14375
|
-
return !!_optionalChain([currentUser, 'access',
|
|
14473
|
+
return !!_optionalChain([currentUser, 'access', _421 => _421.roles, 'optionalAccess', _422 => _422.some, 'call', _423 => _423((role) => role.id === adminRoleId)]);
|
|
14376
14474
|
}, "isAdministrator");
|
|
14377
14475
|
function useSubscriptionStatus() {
|
|
14378
14476
|
const { company, currentUser } = useCurrentUserContext();
|
|
@@ -14489,7 +14587,7 @@ var useRoleTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
|
|
|
14489
14587
|
})
|
|
14490
14588
|
};
|
|
14491
14589
|
const columns = _react.useMemo.call(void 0, () => {
|
|
14492
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
14590
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _424 => _424[field], 'optionalCall', _425 => _425()])).filter((col) => col !== void 0);
|
|
14493
14591
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
14494
14592
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
14495
14593
|
}, "useRoleTableStructure");
|
|
@@ -14590,11 +14688,11 @@ var useContentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
14590
14688
|
return params.fields.map((field) => {
|
|
14591
14689
|
const localHandler = fieldColumnMap[field];
|
|
14592
14690
|
if (localHandler) return localHandler();
|
|
14593
|
-
const customHandler = _optionalChain([params, 'access',
|
|
14691
|
+
const customHandler = _optionalChain([params, 'access', _426 => _426.context, 'optionalAccess', _427 => _427.customCells, 'optionalAccess', _428 => _428[field]]);
|
|
14594
14692
|
if (customHandler) return customHandler({ t });
|
|
14595
14693
|
return void 0;
|
|
14596
14694
|
}).filter((col) => col !== void 0);
|
|
14597
|
-
}, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access',
|
|
14695
|
+
}, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _429 => _429.context, 'optionalAccess', _430 => _430.customCells])]);
|
|
14598
14696
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
14599
14697
|
}, "useContentTableStructure");
|
|
14600
14698
|
|
|
@@ -14929,7 +15027,7 @@ function ContentTableSearch({ data }) {
|
|
|
14929
15027
|
const handleSearchIconClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
14930
15028
|
if (!isExpanded) {
|
|
14931
15029
|
setIsFocused(true);
|
|
14932
|
-
setTimeout(() => _optionalChain([inputRef, 'access',
|
|
15030
|
+
setTimeout(() => _optionalChain([inputRef, 'access', _431 => _431.current, 'optionalAccess', _432 => _432.focus, 'call', _433 => _433()]), 50);
|
|
14933
15031
|
}
|
|
14934
15032
|
}, "handleSearchIconClick");
|
|
14935
15033
|
const handleBlur = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
@@ -15006,7 +15104,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
15006
15104
|
props.defaultExpanded === true ? true : typeof props.defaultExpanded === "object" ? props.defaultExpanded : {}
|
|
15007
15105
|
);
|
|
15008
15106
|
const { data: tableData, columns: tableColumns } = useTableGenerator(props.tableGeneratorType, {
|
|
15009
|
-
data: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
15107
|
+
data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _434 => _434.data]), () => ( EMPTY_ARRAY)),
|
|
15010
15108
|
fields,
|
|
15011
15109
|
checkedIds,
|
|
15012
15110
|
toggleId,
|
|
@@ -15039,7 +15137,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
15039
15137
|
});
|
|
15040
15138
|
const rowModel = tableData ? table.getRowModel() : null;
|
|
15041
15139
|
const groupedRows = _react.useMemo.call(void 0, () => {
|
|
15042
|
-
if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess',
|
|
15140
|
+
if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess', _435 => _435.rows, 'optionalAccess', _436 => _436.length])) return null;
|
|
15043
15141
|
const groupMap = /* @__PURE__ */ new Map();
|
|
15044
15142
|
for (const row of rowModel.rows) {
|
|
15045
15143
|
const keys = getGroupKeys(row.original, props.groupBy);
|
|
@@ -15095,10 +15193,10 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
15095
15193
|
) }),
|
|
15096
15194
|
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: headerGroup.headers.map((header) => {
|
|
15097
15195
|
const meta = header.column.columnDef.meta;
|
|
15098
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess',
|
|
15196
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess', _437 => _437.className]), children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
|
|
15099
15197
|
}) }, headerGroup.id))
|
|
15100
15198
|
] }),
|
|
15101
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access',
|
|
15199
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _438 => _438.rows, 'optionalAccess', _439 => _439.length]) ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React.default.Fragment, { children: [
|
|
15102
15200
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15103
15201
|
TableCell,
|
|
15104
15202
|
{
|
|
@@ -15109,11 +15207,11 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
15109
15207
|
) }),
|
|
15110
15208
|
group.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: row.getVisibleCells().map((cell) => {
|
|
15111
15209
|
const meta = cell.column.columnDef.meta;
|
|
15112
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess',
|
|
15210
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _440 => _440.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
|
|
15113
15211
|
}) }, row.id))
|
|
15114
15212
|
] }, group.groupKey)) : rowModel.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: row.getVisibleCells().map((cell) => {
|
|
15115
15213
|
const meta = cell.column.columnDef.meta;
|
|
15116
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess',
|
|
15214
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _441 => _441.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
|
|
15117
15215
|
}) }, 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: "No results." }) }) }),
|
|
15118
15216
|
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: [
|
|
15119
15217
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -15123,7 +15221,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
15123
15221
|
size: "sm",
|
|
15124
15222
|
onClick: (e) => {
|
|
15125
15223
|
e.preventDefault();
|
|
15126
|
-
_optionalChain([data, 'access',
|
|
15224
|
+
_optionalChain([data, 'access', _442 => _442.previous, 'optionalCall', _443 => _443(true)]);
|
|
15127
15225
|
},
|
|
15128
15226
|
disabled: !data.previous,
|
|
15129
15227
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronLeft, { className: "h-4 w-4" })
|
|
@@ -15137,7 +15235,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
15137
15235
|
size: "sm",
|
|
15138
15236
|
onClick: (e) => {
|
|
15139
15237
|
e.preventDefault();
|
|
15140
|
-
_optionalChain([data, 'access',
|
|
15238
|
+
_optionalChain([data, 'access', _444 => _444.next, 'optionalCall', _445 => _445(true)]);
|
|
15141
15239
|
},
|
|
15142
15240
|
disabled: !data.next,
|
|
15143
15241
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronRight, { className: "h-4 w-4" })
|
|
@@ -15158,7 +15256,7 @@ function ContentListGrid(props) {
|
|
|
15158
15256
|
if (!data.next || !sentinelRef.current) return;
|
|
15159
15257
|
const observer = new IntersectionObserver(
|
|
15160
15258
|
(entries) => {
|
|
15161
|
-
if (_optionalChain([entries, 'access',
|
|
15259
|
+
if (_optionalChain([entries, 'access', _446 => _446[0], 'optionalAccess', _447 => _447.isIntersecting])) _optionalChain([data, 'access', _448 => _448.next, 'optionalCall', _449 => _449()]);
|
|
15162
15260
|
},
|
|
15163
15261
|
{ threshold: 0.1, rootMargin: "200px" }
|
|
15164
15262
|
);
|
|
@@ -15908,7 +16006,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
|
15908
16006
|
newDigits[index] = digit;
|
|
15909
16007
|
setDigits(newDigits);
|
|
15910
16008
|
if (digit && index < 5) {
|
|
15911
|
-
_optionalChain([inputRefs, 'access',
|
|
16009
|
+
_optionalChain([inputRefs, 'access', _450 => _450.current, 'access', _451 => _451[index + 1], 'optionalAccess', _452 => _452.focus, 'call', _453 => _453()]);
|
|
15912
16010
|
}
|
|
15913
16011
|
const code = newDigits.join("");
|
|
15914
16012
|
if (code.length === 6 && newDigits.every((d) => d !== "")) {
|
|
@@ -15917,7 +16015,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
|
15917
16015
|
}, "handleChange");
|
|
15918
16016
|
const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (index, e) => {
|
|
15919
16017
|
if (e.key === "Backspace" && !digits[index] && index > 0) {
|
|
15920
|
-
_optionalChain([inputRefs, 'access',
|
|
16018
|
+
_optionalChain([inputRefs, 'access', _454 => _454.current, 'access', _455 => _455[index - 1], 'optionalAccess', _456 => _456.focus, 'call', _457 => _457()]);
|
|
15921
16019
|
}
|
|
15922
16020
|
}, "handleKeyDown");
|
|
15923
16021
|
const handlePaste = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
|
|
@@ -15926,7 +16024,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
|
15926
16024
|
if (pastedData.length === 6) {
|
|
15927
16025
|
const newDigits = pastedData.split("");
|
|
15928
16026
|
setDigits(newDigits);
|
|
15929
|
-
_optionalChain([inputRefs, 'access',
|
|
16027
|
+
_optionalChain([inputRefs, 'access', _458 => _458.current, 'access', _459 => _459[5], 'optionalAccess', _460 => _460.focus, 'call', _461 => _461()]);
|
|
15930
16028
|
onComplete(pastedData);
|
|
15931
16029
|
}
|
|
15932
16030
|
}, "handlePaste");
|
|
@@ -16137,8 +16235,8 @@ function PasskeySetupDialog({ open, onOpenChange, onSuccess }) {
|
|
|
16137
16235
|
try {
|
|
16138
16236
|
const registrationData = await _chunkXAWKRNYMjs.TwoFactorService.getPasskeyRegistrationOptions({
|
|
16139
16237
|
id: _uuid.v4.call(void 0, ),
|
|
16140
|
-
userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess',
|
|
16141
|
-
userDisplayName: _optionalChain([currentUser, 'optionalAccess',
|
|
16238
|
+
userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _462 => _462.email]), () => ( "")),
|
|
16239
|
+
userDisplayName: _optionalChain([currentUser, 'optionalAccess', _463 => _463.name])
|
|
16142
16240
|
});
|
|
16143
16241
|
const credential = await _browser.startRegistration.call(void 0, { optionsJSON: registrationData.options });
|
|
16144
16242
|
await _chunkXAWKRNYMjs.TwoFactorService.verifyPasskeyRegistration({
|
|
@@ -16289,7 +16387,7 @@ function TotpSetupDialog({ onSuccess, trigger }) {
|
|
|
16289
16387
|
const setup = await _chunkXAWKRNYMjs.TwoFactorService.setupTotp({
|
|
16290
16388
|
id: _uuid.v4.call(void 0, ),
|
|
16291
16389
|
name: name.trim(),
|
|
16292
|
-
accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess',
|
|
16390
|
+
accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _464 => _464.email]), () => ( ""))
|
|
16293
16391
|
});
|
|
16294
16392
|
setQrCodeUri(setup.qrCodeUri);
|
|
16295
16393
|
setAuthenticatorId(setup.authenticatorId);
|
|
@@ -16423,7 +16521,7 @@ function TwoFactorSettings() {
|
|
|
16423
16521
|
if (isLoading) {
|
|
16424
16522
|
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") }) }) });
|
|
16425
16523
|
}
|
|
16426
|
-
const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
16524
|
+
const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _465 => _465.isEnabled]), () => ( false));
|
|
16427
16525
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Card, { children: [
|
|
16428
16526
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
|
|
16429
16527
|
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" }),
|
|
@@ -16461,7 +16559,7 @@ function TwoFactorSettings() {
|
|
|
16461
16559
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-medium", children: t("auth.two_factor.backup_codes") }),
|
|
16462
16560
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: t("auth.two_factor.backup_codes_description") })
|
|
16463
16561
|
] }),
|
|
16464
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess',
|
|
16562
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _466 => _466.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
|
|
16465
16563
|
] }) }),
|
|
16466
16564
|
!isEnabled && (authenticators.length > 0 || passkeys.length > 0) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
16467
16565
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Separator, {}),
|
|
@@ -16639,9 +16737,9 @@ function AcceptInvitation() {
|
|
|
16639
16737
|
});
|
|
16640
16738
|
const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
|
|
16641
16739
|
try {
|
|
16642
|
-
if (!_optionalChain([params, 'optionalAccess',
|
|
16740
|
+
if (!_optionalChain([params, 'optionalAccess', _467 => _467.code])) return;
|
|
16643
16741
|
const payload = {
|
|
16644
|
-
code: _optionalChain([params, 'optionalAccess',
|
|
16742
|
+
code: _optionalChain([params, 'optionalAccess', _468 => _468.code]),
|
|
16645
16743
|
password: values.password
|
|
16646
16744
|
};
|
|
16647
16745
|
await _chunkXAWKRNYMjs.AuthService.acceptInvitation(payload);
|
|
@@ -16991,7 +17089,7 @@ function Logout({ storageKeys }) {
|
|
|
16991
17089
|
const generateUrl = usePageUrlGenerator();
|
|
16992
17090
|
_react.useEffect.call(void 0, () => {
|
|
16993
17091
|
const logOut = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
16994
|
-
if (_optionalChain([storageKeys, 'optionalAccess',
|
|
17092
|
+
if (_optionalChain([storageKeys, 'optionalAccess', _469 => _469.length])) {
|
|
16995
17093
|
clearClientStorage(storageKeys);
|
|
16996
17094
|
}
|
|
16997
17095
|
await _chunkXAWKRNYMjs.AuthService.logout();
|
|
@@ -17014,14 +17112,14 @@ function RefreshUser() {
|
|
|
17014
17112
|
setUser(fullUser);
|
|
17015
17113
|
const token = {
|
|
17016
17114
|
userId: fullUser.id,
|
|
17017
|
-
companyId: _optionalChain([fullUser, 'access',
|
|
17115
|
+
companyId: _optionalChain([fullUser, 'access', _470 => _470.company, 'optionalAccess', _471 => _471.id]),
|
|
17018
17116
|
roles: fullUser.roles.map((role) => role.id),
|
|
17019
|
-
features: _nullishCoalesce(_optionalChain([fullUser, 'access',
|
|
17117
|
+
features: _nullishCoalesce(_optionalChain([fullUser, 'access', _472 => _472.company, 'optionalAccess', _473 => _473.features, 'optionalAccess', _474 => _474.map, 'call', _475 => _475((feature) => feature.id)]), () => ( [])),
|
|
17020
17118
|
modules: fullUser.modules.map((module) => {
|
|
17021
17119
|
return { id: module.id, permissions: module.permissions };
|
|
17022
17120
|
})
|
|
17023
17121
|
};
|
|
17024
|
-
await _optionalChain([_chunkXAWKRNYMjs.getTokenHandler.call(void 0, ), 'optionalAccess',
|
|
17122
|
+
await _optionalChain([_chunkXAWKRNYMjs.getTokenHandler.call(void 0, ), 'optionalAccess', _476 => _476.updateToken, 'call', _477 => _477(token)]);
|
|
17025
17123
|
_cookiesnext.deleteCookie.call(void 0, "reloadData");
|
|
17026
17124
|
}
|
|
17027
17125
|
}, "loadFullUser");
|
|
@@ -17085,9 +17183,9 @@ function ResetPassword() {
|
|
|
17085
17183
|
});
|
|
17086
17184
|
const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
|
|
17087
17185
|
try {
|
|
17088
|
-
if (!_optionalChain([params, 'optionalAccess',
|
|
17186
|
+
if (!_optionalChain([params, 'optionalAccess', _478 => _478.code])) return;
|
|
17089
17187
|
const payload = {
|
|
17090
|
-
code: _optionalChain([params, 'optionalAccess',
|
|
17188
|
+
code: _optionalChain([params, 'optionalAccess', _479 => _479.code]),
|
|
17091
17189
|
password: values.password
|
|
17092
17190
|
};
|
|
17093
17191
|
await _chunkXAWKRNYMjs.AuthService.resetPassword(payload);
|
|
@@ -17436,7 +17534,7 @@ function extractHeadings(blocks) {
|
|
|
17436
17534
|
function processBlocks(blockArray) {
|
|
17437
17535
|
for (const block of blockArray) {
|
|
17438
17536
|
if (block.type === "heading") {
|
|
17439
|
-
const level = _optionalChain([block, 'access',
|
|
17537
|
+
const level = _optionalChain([block, 'access', _480 => _480.props, 'optionalAccess', _481 => _481.level]) || 1;
|
|
17440
17538
|
const text = extractTextFromContent(block.content);
|
|
17441
17539
|
if (text.trim()) {
|
|
17442
17540
|
headings.push({
|
|
@@ -17779,7 +17877,7 @@ var useHowToTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
|
|
|
17779
17877
|
})
|
|
17780
17878
|
};
|
|
17781
17879
|
const columns = _react.useMemo.call(void 0, () => {
|
|
17782
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
17880
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _482 => _482[field], 'optionalCall', _483 => _483()])).filter((col) => col !== void 0);
|
|
17783
17881
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
17784
17882
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
17785
17883
|
}, "useHowToTableStructure");
|
|
@@ -17845,7 +17943,7 @@ function HowToMultiSelector({
|
|
|
17845
17943
|
retriever: (params) => _chunkXAWKRNYMjs.HowToService.findMany(params),
|
|
17846
17944
|
module: _chunkXAWKRNYMjs.Modules.HowTo,
|
|
17847
17945
|
getLabel: (howTo) => howTo.name,
|
|
17848
|
-
excludeId: _optionalChain([currentHowTo, 'optionalAccess',
|
|
17946
|
+
excludeId: _optionalChain([currentHowTo, 'optionalAccess', _484 => _484.id]),
|
|
17849
17947
|
onChange
|
|
17850
17948
|
}
|
|
17851
17949
|
);
|
|
@@ -17910,7 +18008,7 @@ function HowToSelector({
|
|
|
17910
18008
|
}, "setHowTo");
|
|
17911
18009
|
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: [
|
|
17912
18010
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
|
|
17913
|
-
/* @__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',
|
|
18011
|
+
/* @__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', _485 => _485.value, 'optionalAccess', _486 => _486.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 }) }))) }) }) }),
|
|
17914
18012
|
field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
17915
18013
|
_lucidereact.CircleX,
|
|
17916
18014
|
{
|
|
@@ -18265,9 +18363,9 @@ function CitationsTab({ citations, sources }) {
|
|
|
18265
18363
|
] }) }),
|
|
18266
18364
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: sorted.map((chunk) => {
|
|
18267
18365
|
const isOpen = expanded.has(chunk.id);
|
|
18268
|
-
const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess',
|
|
18366
|
+
const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess', _487 => _487.get, 'call', _488 => _488(chunk.nodeId)]) : void 0;
|
|
18269
18367
|
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")));
|
|
18270
|
-
const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess',
|
|
18368
|
+
const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _489 => _489.name]), () => ( fallbackName));
|
|
18271
18369
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
|
|
18272
18370
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, TableRow, { children: [
|
|
18273
18371
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -18314,7 +18412,7 @@ function ContentsTab({ citations, sources }) {
|
|
|
18314
18412
|
for (const c of citations) {
|
|
18315
18413
|
const id = c.nodeId;
|
|
18316
18414
|
if (!id) continue;
|
|
18317
|
-
const source = _optionalChain([sources, 'optionalAccess',
|
|
18415
|
+
const source = _optionalChain([sources, 'optionalAccess', _490 => _490.get, 'call', _491 => _491(id)]);
|
|
18318
18416
|
if (!source) continue;
|
|
18319
18417
|
const existing = map.get(id);
|
|
18320
18418
|
if (existing) {
|
|
@@ -18379,7 +18477,7 @@ function UsersTab({ users, citations, sources }) {
|
|
|
18379
18477
|
const generate = usePageUrlGenerator();
|
|
18380
18478
|
const userMap = /* @__PURE__ */ new Map();
|
|
18381
18479
|
for (const u of users) {
|
|
18382
|
-
if (!_optionalChain([u, 'optionalAccess',
|
|
18480
|
+
if (!_optionalChain([u, 'optionalAccess', _492 => _492.id])) continue;
|
|
18383
18481
|
userMap.set(u.id, { user: u, contentCount: 0, citationCount: 0 });
|
|
18384
18482
|
}
|
|
18385
18483
|
if (citations && sources) {
|
|
@@ -18483,7 +18581,7 @@ function MessageSourcesPanel({ message, isLatestAssistant, onSelectFollowUp, sou
|
|
|
18483
18581
|
}
|
|
18484
18582
|
return ids.size;
|
|
18485
18583
|
}, [message.citations, sources]);
|
|
18486
|
-
const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess',
|
|
18584
|
+
const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess', _493 => _493.length]), () => ( 0));
|
|
18487
18585
|
const total = refsCount + citationsCount + contentsCount + usersCount + suggestionsCount;
|
|
18488
18586
|
const visibleTabs = [];
|
|
18489
18587
|
if (suggestionsCount > 0) visibleTabs.push("suggested");
|
|
@@ -18542,8 +18640,8 @@ var SourcesFetcher = class extends _chunkXAWKRNYMjs.ClientAbstractService {
|
|
|
18542
18640
|
static async findManyByIds(params) {
|
|
18543
18641
|
const endpoint = new (0, _chunkXAWKRNYMjs.EndpointCreator)({ endpoint: params.module });
|
|
18544
18642
|
endpoint.addAdditionalParam(params.idsParam, params.ids.join(","));
|
|
18545
|
-
if (_optionalChain([params, 'access',
|
|
18546
|
-
if (_optionalChain([params, 'access',
|
|
18643
|
+
if (_optionalChain([params, 'access', _494 => _494.module, 'access', _495 => _495.inclusions, 'optionalAccess', _496 => _496.lists, 'optionalAccess', _497 => _497.fields])) endpoint.limitToFields(params.module.inclusions.lists.fields);
|
|
18644
|
+
if (_optionalChain([params, 'access', _498 => _498.module, 'access', _499 => _499.inclusions, 'optionalAccess', _500 => _500.lists, 'optionalAccess', _501 => _501.types])) endpoint.limitToType(params.module.inclusions.lists.types);
|
|
18547
18645
|
return this.callApi({
|
|
18548
18646
|
type: params.module,
|
|
18549
18647
|
method: "GET" /* GET */,
|
|
@@ -18622,7 +18720,7 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
|
|
|
18622
18720
|
return void 0;
|
|
18623
18721
|
}
|
|
18624
18722
|
})()));
|
|
18625
|
-
if (_optionalChain([author, 'optionalAccess',
|
|
18723
|
+
if (_optionalChain([author, 'optionalAccess', _502 => _502.id])) userMap.set(author.id, author);
|
|
18626
18724
|
}
|
|
18627
18725
|
return Array.from(userMap.values());
|
|
18628
18726
|
}, [resolved]);
|
|
@@ -18644,14 +18742,14 @@ _chunk7QVYU63Ejs.__name.call(void 0, MessageSourcesContainer, "MessageSourcesCon
|
|
|
18644
18742
|
function MessageItem({ message, isLatestAssistant, onSelectFollowUp, failedMessageIds, onRetry }) {
|
|
18645
18743
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
18646
18744
|
const isUser = message.role === "user";
|
|
18647
|
-
const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess',
|
|
18745
|
+
const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess', _503 => _503.has, 'call', _504 => _504(message.id)]);
|
|
18648
18746
|
if (isUser) {
|
|
18649
18747
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-end gap-1", children: [
|
|
18650
18748
|
/* @__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 }),
|
|
18651
18749
|
isFailed && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-destructive flex items-center gap-2 text-xs", children: [
|
|
18652
18750
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "h-3.5 w-3.5" }),
|
|
18653
18751
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("features.assistant.send_failed") }),
|
|
18654
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", className: "underline", onClick: () => _optionalChain([onRetry, 'optionalCall',
|
|
18752
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", className: "underline", onClick: () => _optionalChain([onRetry, 'optionalCall', _505 => _505(message.id)]), children: t("features.assistant.retry") })
|
|
18655
18753
|
] })
|
|
18656
18754
|
] });
|
|
18657
18755
|
}
|
|
@@ -18717,7 +18815,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, AssistantStatusLine, "AssistantStatusLine")
|
|
|
18717
18815
|
function AssistantThread({ messages, sending, status, onSelectFollowUp, failedMessageIds, onRetry }) {
|
|
18718
18816
|
const endRef = _react.useRef.call(void 0, null);
|
|
18719
18817
|
_react.useEffect.call(void 0, () => {
|
|
18720
|
-
_optionalChain([endRef, 'access',
|
|
18818
|
+
_optionalChain([endRef, 'access', _506 => _506.current, 'optionalAccess', _507 => _507.scrollIntoView, 'call', _508 => _508({ behavior: "smooth" })]);
|
|
18721
18819
|
}, [messages.length, sending]);
|
|
18722
18820
|
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: [
|
|
18723
18821
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -18745,7 +18843,7 @@ function AssistantContainer() {
|
|
|
18745
18843
|
AssistantSidebar,
|
|
18746
18844
|
{
|
|
18747
18845
|
threads: ctx.threads,
|
|
18748
|
-
activeId: _optionalChain([ctx, 'access',
|
|
18846
|
+
activeId: _optionalChain([ctx, 'access', _509 => _509.assistant, 'optionalAccess', _510 => _510.id]),
|
|
18749
18847
|
onSelect: ctx.selectThread,
|
|
18750
18848
|
onNew: ctx.startNew
|
|
18751
18849
|
}
|
|
@@ -18838,14 +18936,14 @@ function NotificationsList({ archived }) {
|
|
|
18838
18936
|
] }),
|
|
18839
18937
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Skeleton, { className: "h-8 w-20" })
|
|
18840
18938
|
] }) }) }, i)) }), "LoadingSkeleton");
|
|
18841
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: data.isLoaded ? _optionalChain([data, 'access',
|
|
18939
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: data.isLoaded ? _optionalChain([data, 'access', _511 => _511.data, 'optionalAccess', _512 => _512.map, 'call', _513 => _513((notification) => {
|
|
18842
18940
|
const notificationData = generateNotificationData({ notification, generateUrl });
|
|
18843
18941
|
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: [
|
|
18844
18942
|
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: _chunkXAWKRNYMjs.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" }),
|
|
18845
18943
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
18846
18944
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
|
|
18847
18945
|
strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
|
|
18848
|
-
actor: _nullishCoalesce(_optionalChain([notificationData, 'access',
|
|
18946
|
+
actor: _nullishCoalesce(_optionalChain([notificationData, 'access', _514 => _514.actor, 'optionalAccess', _515 => _515.name]), () => ( "")),
|
|
18849
18947
|
title: notificationData.title
|
|
18850
18948
|
}) }),
|
|
18851
18949
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground mt-1 w-full text-xs", children: new Date(notification.createdAt).toLocaleString() })
|
|
@@ -19195,7 +19293,7 @@ var DEFAULT_TRANSLATIONS = {
|
|
|
19195
19293
|
invalidEmail: "Please enter a valid email address"
|
|
19196
19294
|
};
|
|
19197
19295
|
async function copyToClipboard(text) {
|
|
19198
|
-
if (_optionalChain([navigator, 'access',
|
|
19296
|
+
if (_optionalChain([navigator, 'access', _516 => _516.clipboard, 'optionalAccess', _517 => _517.writeText])) {
|
|
19199
19297
|
try {
|
|
19200
19298
|
await navigator.clipboard.writeText(text);
|
|
19201
19299
|
return true;
|
|
@@ -19237,7 +19335,7 @@ function ReferralWidget({
|
|
|
19237
19335
|
const linkInputRef = _react.useRef.call(void 0, null);
|
|
19238
19336
|
const config = _chunkSE5HIHJSjs.getReferralConfig.call(void 0, );
|
|
19239
19337
|
const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
|
|
19240
|
-
const referralUrl = _optionalChain([stats, 'optionalAccess',
|
|
19338
|
+
const referralUrl = _optionalChain([stats, 'optionalAccess', _518 => _518.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
|
|
19241
19339
|
if (!_chunkSE5HIHJSjs.isReferralEnabled.call(void 0, )) {
|
|
19242
19340
|
return null;
|
|
19243
19341
|
}
|
|
@@ -19247,7 +19345,7 @@ function ReferralWidget({
|
|
|
19247
19345
|
if (success) {
|
|
19248
19346
|
setCopied(true);
|
|
19249
19347
|
_chunkXAWKRNYMjs.showToast.call(void 0, t.copiedMessage);
|
|
19250
|
-
_optionalChain([onLinkCopied, 'optionalCall',
|
|
19348
|
+
_optionalChain([onLinkCopied, 'optionalCall', _519 => _519()]);
|
|
19251
19349
|
setTimeout(() => setCopied(false), 2e3);
|
|
19252
19350
|
} else {
|
|
19253
19351
|
_chunkXAWKRNYMjs.showError.call(void 0, t.copyError);
|
|
@@ -19261,12 +19359,12 @@ function ReferralWidget({
|
|
|
19261
19359
|
try {
|
|
19262
19360
|
await sendInvite(email);
|
|
19263
19361
|
_chunkXAWKRNYMjs.showToast.call(void 0, t.inviteSent);
|
|
19264
|
-
_optionalChain([onInviteSent, 'optionalCall',
|
|
19362
|
+
_optionalChain([onInviteSent, 'optionalCall', _520 => _520(email)]);
|
|
19265
19363
|
setEmail("");
|
|
19266
19364
|
} catch (err) {
|
|
19267
19365
|
const error2 = err instanceof Error ? err : new Error(t.inviteError);
|
|
19268
19366
|
_chunkXAWKRNYMjs.showError.call(void 0, error2.message);
|
|
19269
|
-
_optionalChain([onInviteError, 'optionalCall',
|
|
19367
|
+
_optionalChain([onInviteError, 'optionalCall', _521 => _521(error2)]);
|
|
19270
19368
|
}
|
|
19271
19369
|
}, [email, sendInvite, t.inviteSent, t.inviteError, t.invalidEmail, onInviteSent, onInviteError]);
|
|
19272
19370
|
const handleEmailKeyDown = _react.useCallback.call(void 0,
|
|
@@ -20020,7 +20118,7 @@ function OAuthClientList({
|
|
|
20020
20118
|
OAuthClientCard,
|
|
20021
20119
|
{
|
|
20022
20120
|
client,
|
|
20023
|
-
onClick: () => _optionalChain([onClientClick, 'optionalCall',
|
|
20121
|
+
onClick: () => _optionalChain([onClientClick, 'optionalCall', _522 => _522(client)]),
|
|
20024
20122
|
onEdit: onEditClick ? () => onEditClick(client) : void 0,
|
|
20025
20123
|
onDelete: onDeleteClick ? () => onDeleteClick(client) : void 0
|
|
20026
20124
|
},
|
|
@@ -20036,11 +20134,11 @@ _chunk7QVYU63Ejs.__name.call(void 0, OAuthClientList, "OAuthClientList");
|
|
|
20036
20134
|
function OAuthClientForm({ client, onSubmit, onCancel, isLoading = false }) {
|
|
20037
20135
|
const isEditMode = !!client;
|
|
20038
20136
|
const [formState, setFormState] = _react.useState.call(void 0, {
|
|
20039
|
-
name: _optionalChain([client, 'optionalAccess',
|
|
20040
|
-
description: _optionalChain([client, 'optionalAccess',
|
|
20041
|
-
redirectUris: _optionalChain([client, 'optionalAccess',
|
|
20042
|
-
allowedScopes: _optionalChain([client, 'optionalAccess',
|
|
20043
|
-
isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess',
|
|
20137
|
+
name: _optionalChain([client, 'optionalAccess', _523 => _523.name]) || "",
|
|
20138
|
+
description: _optionalChain([client, 'optionalAccess', _524 => _524.description]) || "",
|
|
20139
|
+
redirectUris: _optionalChain([client, 'optionalAccess', _525 => _525.redirectUris, 'optionalAccess', _526 => _526.length]) ? client.redirectUris : [""],
|
|
20140
|
+
allowedScopes: _optionalChain([client, 'optionalAccess', _527 => _527.allowedScopes]) || [],
|
|
20141
|
+
isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _528 => _528.isConfidential]), () => ( true))
|
|
20044
20142
|
});
|
|
20045
20143
|
const [errors, setErrors] = _react.useState.call(void 0, {});
|
|
20046
20144
|
const validate = _react.useCallback.call(void 0, () => {
|
|
@@ -20268,7 +20366,7 @@ function OAuthClientDetail({
|
|
|
20268
20366
|
] }),
|
|
20269
20367
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
|
|
20270
20368
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { children: "Allowed Scopes" }),
|
|
20271
|
-
/* @__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([_chunkXAWKRNYMjs.OAUTH_SCOPE_DISPLAY, 'access',
|
|
20369
|
+
/* @__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([_chunkXAWKRNYMjs.OAUTH_SCOPE_DISPLAY, 'access', _529 => _529[scope], 'optionalAccess', _530 => _530.name]) || scope }, scope)) })
|
|
20272
20370
|
] }),
|
|
20273
20371
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
|
|
20274
20372
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { children: "Grant Types" }),
|
|
@@ -20412,7 +20510,7 @@ function OAuthConsentScreen({
|
|
|
20412
20510
|
if (error || !clientInfo) {
|
|
20413
20511
|
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: [
|
|
20414
20512
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertTriangle, { className: "h-4 w-4" }),
|
|
20415
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess',
|
|
20513
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _531 => _531.message]) || "Invalid authorization request. Please try again." })
|
|
20416
20514
|
] }) }) }) });
|
|
20417
20515
|
}
|
|
20418
20516
|
const { client, scopes } = clientInfo;
|
|
@@ -20628,7 +20726,7 @@ function WaitlistForm({ onSuccess }) {
|
|
|
20628
20726
|
questionnaire: values.questionnaire
|
|
20629
20727
|
});
|
|
20630
20728
|
setIsSuccess(true);
|
|
20631
|
-
_optionalChain([onSuccess, 'optionalCall',
|
|
20729
|
+
_optionalChain([onSuccess, 'optionalCall', _532 => _532()]);
|
|
20632
20730
|
} catch (e) {
|
|
20633
20731
|
errorToast({ error: e });
|
|
20634
20732
|
} finally {
|
|
@@ -21266,7 +21364,7 @@ var ModuleEditor = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs.__n
|
|
|
21266
21364
|
] }),
|
|
21267
21365
|
roleIds.map((roleId) => {
|
|
21268
21366
|
const roleTokens = block[roleId];
|
|
21269
|
-
const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess',
|
|
21367
|
+
const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _533 => _533[roleId]]), () => ( roleId));
|
|
21270
21368
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
|
|
21271
21369
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: roleLabel }),
|
|
21272
21370
|
_chunkSE5HIHJSjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -21303,7 +21401,7 @@ function RbacContainer() {
|
|
|
21303
21401
|
}, []);
|
|
21304
21402
|
const sortedModuleIds = _react.useMemo.call(void 0, () => {
|
|
21305
21403
|
if (!matrix) return [];
|
|
21306
|
-
return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
21404
|
+
return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _534 => _534[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _535 => _535[b]]), () => ( b))));
|
|
21307
21405
|
}, [matrix, moduleNames]);
|
|
21308
21406
|
const roleIds = _react.useMemo.call(void 0, () => {
|
|
21309
21407
|
if (roleNames) {
|
|
@@ -21366,7 +21464,7 @@ function RbacContainer() {
|
|
|
21366
21464
|
id === selectedModuleId && "bg-muted font-medium text-foreground",
|
|
21367
21465
|
id !== selectedModuleId && "text-muted-foreground"
|
|
21368
21466
|
),
|
|
21369
|
-
children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
21467
|
+
children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _536 => _536[id]]), () => ( id))
|
|
21370
21468
|
}
|
|
21371
21469
|
) }, id)) }) }),
|
|
21372
21470
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "section", { className: "flex-1 overflow-y-auto p-4", children: selectedModuleId && selectedBlock ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -21374,7 +21472,7 @@ function RbacContainer() {
|
|
|
21374
21472
|
{
|
|
21375
21473
|
moduleId: selectedModuleId,
|
|
21376
21474
|
block: selectedBlock,
|
|
21377
|
-
moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
21475
|
+
moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _537 => _537[selectedModuleId]]), () => ( selectedModuleId)),
|
|
21378
21476
|
roleIds,
|
|
21379
21477
|
roleNames,
|
|
21380
21478
|
onOpenPicker: openPicker
|
|
@@ -21385,12 +21483,12 @@ function RbacContainer() {
|
|
|
21385
21483
|
RbacPermissionPicker,
|
|
21386
21484
|
{
|
|
21387
21485
|
open: !!activePicker,
|
|
21388
|
-
anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess',
|
|
21486
|
+
anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _538 => _538.anchor]), () => ( null)),
|
|
21389
21487
|
value: activeValue,
|
|
21390
|
-
isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess',
|
|
21488
|
+
isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _539 => _539.isRoleColumn]), () => ( false)),
|
|
21391
21489
|
knownSegments: activeSegments,
|
|
21392
21490
|
onSetValue: handleSetValue,
|
|
21393
|
-
onClear: _optionalChain([activePicker, 'optionalAccess',
|
|
21491
|
+
onClear: _optionalChain([activePicker, 'optionalAccess', _540 => _540.isRoleColumn]) ? handleClear : void 0,
|
|
21394
21492
|
onClose: closePicker
|
|
21395
21493
|
}
|
|
21396
21494
|
)
|
|
@@ -21457,7 +21555,7 @@ function RbacByRoleContainer() {
|
|
|
21457
21555
|
}, [roleNames]);
|
|
21458
21556
|
const sortedModuleIds = _react.useMemo.call(void 0, () => {
|
|
21459
21557
|
if (!matrix) return [];
|
|
21460
|
-
return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
21558
|
+
return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _541 => _541[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _542 => _542[b]]), () => ( b))));
|
|
21461
21559
|
}, [matrix, moduleNames]);
|
|
21462
21560
|
_react.useEffect.call(void 0, () => {
|
|
21463
21561
|
if (!selectedRoleId && sortedRoleIds.length > 0) {
|
|
@@ -21506,7 +21604,7 @@ function RbacByRoleContainer() {
|
|
|
21506
21604
|
id === selectedRoleId && "bg-muted font-medium text-foreground",
|
|
21507
21605
|
id !== selectedRoleId && "text-muted-foreground"
|
|
21508
21606
|
),
|
|
21509
|
-
children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess',
|
|
21607
|
+
children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _543 => _543[id]]), () => ( id))
|
|
21510
21608
|
}
|
|
21511
21609
|
) }, id)) }) }),
|
|
21512
21610
|
/* @__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: [
|
|
@@ -21526,7 +21624,7 @@ function RbacByRoleContainer() {
|
|
|
21526
21624
|
if (!block) return null;
|
|
21527
21625
|
const defaultTokens = _nullishCoalesce(block.default, () => ( []));
|
|
21528
21626
|
const roleTokens = block[selectedRoleId];
|
|
21529
|
-
const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess',
|
|
21627
|
+
const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _544 => _544[moduleId]]), () => ( moduleId));
|
|
21530
21628
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
|
|
21531
21629
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { className: "border-b bg-muted/40", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
21532
21630
|
"td",
|
|
@@ -21541,7 +21639,7 @@ function RbacByRoleContainer() {
|
|
|
21541
21639
|
_chunkSE5HIHJSjs.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))
|
|
21542
21640
|
] }),
|
|
21543
21641
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
|
|
21544
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess',
|
|
21642
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _545 => _545[selectedRoleId]]), () => ( selectedRoleId)) }),
|
|
21545
21643
|
_chunkSE5HIHJSjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
21546
21644
|
CellButton3,
|
|
21547
21645
|
{
|
|
@@ -21562,12 +21660,12 @@ function RbacByRoleContainer() {
|
|
|
21562
21660
|
RbacPermissionPicker,
|
|
21563
21661
|
{
|
|
21564
21662
|
open: !!activePicker,
|
|
21565
|
-
anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess',
|
|
21663
|
+
anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _546 => _546.anchor]), () => ( null)),
|
|
21566
21664
|
value: activeValue,
|
|
21567
|
-
isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess',
|
|
21665
|
+
isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _547 => _547.isRoleColumn]), () => ( false)),
|
|
21568
21666
|
knownSegments: activeSegments,
|
|
21569
21667
|
onSetValue: handleSetValue,
|
|
21570
|
-
onClear: _optionalChain([activePicker, 'optionalAccess',
|
|
21668
|
+
onClear: _optionalChain([activePicker, 'optionalAccess', _548 => _548.isRoleColumn]) ? handleClear : void 0,
|
|
21571
21669
|
onClose: closePicker
|
|
21572
21670
|
}
|
|
21573
21671
|
)
|
|
@@ -22088,4 +22186,4 @@ _chunk7QVYU63Ejs.__name.call(void 0, RbacByRoleContainer, "RbacByRoleContainer")
|
|
|
22088
22186
|
|
|
22089
22187
|
|
|
22090
22188
|
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.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.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.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.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.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.createMentionInlineContentSpec = createMentionInlineContentSpec; exports.useMentionInsert = useMentionInsert; exports.BlockNoteEditorMentionSuggestionMenu = BlockNoteEditorMentionSuggestionMenu; exports.BlockNoteEditorContainer = BlockNoteEditorContainer; exports.CommonAssociationTrigger = CommonAssociationTrigger; exports.CommonAssociationCommandDialog = CommonAssociationCommandDialog; exports.triggerAssociationToast = triggerAssociationToast; exports.FormFieldWrapper = FormFieldWrapper; exports.EntityMultiSelector = EntityMultiSelector; exports.CommonDeleter = CommonDeleter; exports.CommonEditorButtons = CommonEditorButtons; exports.CommonEditorHeader = CommonEditorHeader; exports.CommonEditorDiscardDialog = CommonEditorDiscardDialog; exports.CommonEditorTrigger = CommonEditorTrigger; exports.useEditorDialog = useEditorDialog; exports.EditorSheet = EditorSheet; exports.DatePickerPopover = DatePickerPopover; exports.DateRangeSelector = DateRangeSelector; exports.useFileUpload = useFileUpload; exports.FileUploader = FileUploader; exports.FileUploaderContent = FileUploaderContent; exports.FileUploaderItem = FileUploaderItem; exports.FileInput = FileInput; exports.FormCheckbox = FormCheckbox; exports.FormBlockNote = FormBlockNote; exports.FormDate = FormDate; exports.FormDateTime = FormDateTime; exports.FormInput = FormInput; 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.FormFeatures = FormFeatures; 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.HowToEditor = HowToEditor; exports.HowToProvider = HowToProvider; exports.useHowToContext = useHowToContext; exports.HowToContent = HowToContent; exports.HowToDetails = HowToDetails; exports.HowToContainer = HowToContainer; exports.HowToList = HowToList; exports.HowToListContainer = HowToListContainer; exports.HowToMultiSelector = HowToMultiSelector; exports.HowToSelector = HowToSelector; exports.AssistantProvider = AssistantProvider; exports.useAssistantContext = useAssistantContext; exports.MessageSourcesPanel = MessageSourcesPanel; exports.MessageItem = MessageItem; exports.MessageList = MessageList; 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;
|
|
22091
|
-
//# sourceMappingURL=chunk-
|
|
22189
|
+
//# sourceMappingURL=chunk-S5LH5422.js.map
|