@arbidocs/blocks 0.4.144 → 0.4.146
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/agents/index.cjs +264 -264
- package/dist/agents/index.js +7 -7
- package/dist/{chunk-ON3TKY5Y.js → chunk-5YHEHEJT.js} +242 -4
- package/dist/chunk-5YHEHEJT.js.map +1 -0
- package/dist/{chunk-7NGAWGA3.js → chunk-A6IU4GIW.js} +190 -7
- package/dist/chunk-A6IU4GIW.js.map +1 -0
- package/dist/{chunk-BUWBXJ2N.cjs → chunk-C3CGJK7A.cjs} +192 -6
- package/dist/chunk-C3CGJK7A.cjs.map +1 -0
- package/dist/{chunk-X3TGXEFS.js → chunk-C44TDH54.js} +6 -6
- package/dist/{chunk-X3TGXEFS.js.map → chunk-C44TDH54.js.map} +1 -1
- package/dist/{chunk-YFY3TQ6Q.cjs → chunk-COCGRJLA.cjs} +7 -7
- package/dist/{chunk-YFY3TQ6Q.cjs.map → chunk-COCGRJLA.cjs.map} +1 -1
- package/dist/{chunk-45LRMW54.js → chunk-DN2KI4BU.js} +8 -10
- package/dist/chunk-DN2KI4BU.js.map +1 -0
- package/dist/{chunk-R26BK7YL.cjs → chunk-DTROMMDX.cjs} +4 -4
- package/dist/{chunk-R26BK7YL.cjs.map → chunk-DTROMMDX.cjs.map} +1 -1
- package/dist/{chunk-65THHQVB.cjs → chunk-ECW2R2KF.cjs} +27 -27
- package/dist/{chunk-65THHQVB.cjs.map → chunk-ECW2R2KF.cjs.map} +1 -1
- package/dist/{chunk-RI6DZA5X.js → chunk-EF4ZLKRM.js} +3 -3
- package/dist/{chunk-RI6DZA5X.js.map → chunk-EF4ZLKRM.js.map} +1 -1
- package/dist/chunk-EV7W64B6.js +134 -0
- package/dist/chunk-EV7W64B6.js.map +1 -0
- package/dist/{chunk-WS5EX7DN.cjs → chunk-EYKISBDO.cjs} +5 -5
- package/dist/{chunk-WS5EX7DN.cjs.map → chunk-EYKISBDO.cjs.map} +1 -1
- package/dist/{chunk-JZNXRMLH.cjs → chunk-GAYMJWTC.cjs} +8 -10
- package/dist/chunk-GAYMJWTC.cjs.map +1 -0
- package/dist/{chunk-I7WG3JRD.js → chunk-H4D7WKDY.js} +3 -3
- package/dist/{chunk-I7WG3JRD.js.map → chunk-H4D7WKDY.js.map} +1 -1
- package/dist/{chunk-2FJMTZNJ.js → chunk-IJST4EBM.js} +8 -8
- package/dist/{chunk-2FJMTZNJ.js.map → chunk-IJST4EBM.js.map} +1 -1
- package/dist/{chunk-3RJN2VTL.js → chunk-IXWJGOM2.js} +3 -3
- package/dist/{chunk-3RJN2VTL.js.map → chunk-IXWJGOM2.js.map} +1 -1
- package/dist/{chunk-CYNF5PZI.js → chunk-J5CWKFSC.js} +3 -3
- package/dist/{chunk-CYNF5PZI.js.map → chunk-J5CWKFSC.js.map} +1 -1
- package/dist/{chunk-TP6PLDNM.cjs → chunk-KMZWKSKO.cjs} +8 -8
- package/dist/{chunk-TP6PLDNM.cjs.map → chunk-KMZWKSKO.cjs.map} +1 -1
- package/dist/{chunk-C4WSHRR6.cjs → chunk-KPZZ5FHE.cjs} +32 -12
- package/dist/chunk-KPZZ5FHE.cjs.map +1 -0
- package/dist/{chunk-O2ODDTMA.cjs → chunk-LPYEUD2D.cjs} +9 -9
- package/dist/{chunk-O2ODDTMA.cjs.map → chunk-LPYEUD2D.cjs.map} +1 -1
- package/dist/{chunk-RA3ZJ45L.cjs → chunk-MFMASSEO.cjs} +25 -44
- package/dist/chunk-MFMASSEO.cjs.map +1 -0
- package/dist/chunk-NHZK64TQ.js +75 -0
- package/dist/chunk-NHZK64TQ.js.map +1 -0
- package/dist/{chunk-BPBSSMRB.js → chunk-NRFAWUVD.js} +3 -3
- package/dist/{chunk-BPBSSMRB.js.map → chunk-NRFAWUVD.js.map} +1 -1
- package/dist/chunk-NWNVWO6L.cjs +80 -0
- package/dist/chunk-NWNVWO6L.cjs.map +1 -0
- package/dist/{chunk-XGZX22ET.cjs → chunk-O2GW5IY6.cjs} +38 -38
- package/dist/{chunk-XGZX22ET.cjs.map → chunk-O2GW5IY6.cjs.map} +1 -1
- package/dist/{chunk-33ZOUJXA.js → chunk-OBWYM25Y.js} +13 -32
- package/dist/chunk-OBWYM25Y.js.map +1 -0
- package/dist/{chunk-Y3KA6X7B.js → chunk-OVR3XMYL.js} +4 -4
- package/dist/{chunk-Y3KA6X7B.js.map → chunk-OVR3XMYL.js.map} +1 -1
- package/dist/{chunk-ABUO6PIQ.cjs → chunk-RB7GX2VT.cjs} +12 -12
- package/dist/{chunk-ABUO6PIQ.cjs.map → chunk-RB7GX2VT.cjs.map} +1 -1
- package/dist/chunk-RXK3XP62.cjs +144 -0
- package/dist/chunk-RXK3XP62.cjs.map +1 -0
- package/dist/{chunk-LYUO3E6V.js → chunk-SZOFGU7W.js} +3 -3
- package/dist/{chunk-LYUO3E6V.js.map → chunk-SZOFGU7W.js.map} +1 -1
- package/dist/{chunk-A6J2IBUG.js → chunk-T5B7FM7S.js} +4 -4
- package/dist/{chunk-A6J2IBUG.js.map → chunk-T5B7FM7S.js.map} +1 -1
- package/dist/{chunk-YNIBUKV5.js → chunk-TBEVGWY3.js} +32 -14
- package/dist/chunk-TBEVGWY3.js.map +1 -0
- package/dist/{chunk-MJCCBMM5.cjs → chunk-TC3RQNEX.cjs} +6 -80
- package/dist/chunk-TC3RQNEX.cjs.map +1 -0
- package/dist/{chunk-QIMVTGKS.cjs → chunk-U73KPFYH.cjs} +255 -2
- package/dist/chunk-U73KPFYH.cjs.map +1 -0
- package/dist/{chunk-HFGXA5CL.cjs → chunk-UTTTJSQU.cjs} +4 -4
- package/dist/{chunk-HFGXA5CL.cjs.map → chunk-UTTTJSQU.cjs.map} +1 -1
- package/dist/{chunk-DLBUFHLY.js → chunk-VTTZZ4FN.js} +4 -74
- package/dist/chunk-VTTZZ4FN.js.map +1 -0
- package/dist/{chunk-5FTIHRZH.cjs → chunk-XVUOMWMD.cjs} +4 -4
- package/dist/{chunk-5FTIHRZH.cjs.map → chunk-XVUOMWMD.cjs.map} +1 -1
- package/dist/{chunk-444XKG46.js → chunk-YKQ2DPIP.js} +3 -3
- package/dist/{chunk-444XKG46.js.map → chunk-YKQ2DPIP.js.map} +1 -1
- package/dist/{chunk-HEMU73OP.cjs → chunk-YSHIC4NJ.cjs} +4 -4
- package/dist/{chunk-HEMU73OP.cjs.map → chunk-YSHIC4NJ.cjs.map} +1 -1
- package/dist/citations/index.cjs +12 -12
- package/dist/citations/index.js +3 -3
- package/dist/connect/docx.cjs +11 -11
- package/dist/connect/docx.js +8 -8
- package/dist/connect/index.cjs +1079 -333
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.ts +2 -0
- package/dist/connect/index.js +953 -222
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/ConnectedNotificationRelevance.d.ts +4 -1
- package/dist/connection/ConnectedSettings.d.ts +3 -2
- package/dist/connection/ai.d.ts +27 -72
- package/dist/connection/settings-page/ConnectedAccountSettings.d.ts +35 -0
- package/dist/connection/settings-page/ConnectedMailSettings.d.ts +13 -0
- package/dist/connection/settings-page/ConnectedPremiumModels.d.ts +1 -0
- package/dist/connection/settings-page/ConnectedPrivacySettings.d.ts +12 -0
- package/dist/connection/settings-page/ConnectedSettingsPage.d.ts +29 -0
- package/dist/connection/settings-page/SessionStatusIcon.d.ts +7 -0
- package/dist/connection/settings-page/index.d.ts +6 -0
- package/dist/connection/workspace-settings/ConnectedWorkspaceSettings.d.ts +53 -0
- package/dist/connection/workspace-settings/index.d.ts +2 -0
- package/dist/connection/workspace-settings/useConnectedWorkspaceSettings.d.ts +85 -0
- package/dist/connection/workspaceData.d.ts +6 -6
- package/dist/facts/index.cjs +3 -3
- package/dist/facts/index.js +2 -2
- package/dist/files/index.cjs +3 -3
- package/dist/files/index.js +2 -2
- package/dist/home/index.cjs +20 -20
- package/dist/home/index.js +4 -4
- package/dist/index.cjs +468 -632
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +23 -204
- package/dist/index.js.map +1 -1
- package/dist/provider/BlocksProvider.d.ts +5 -1
- package/dist/provider/settings-section.d.ts +9 -0
- package/dist/retrieval/index.cjs +4 -4
- package/dist/retrieval/index.js +2 -2
- package/dist/settings/AppearanceSettings.d.ts +18 -0
- package/dist/settings/ServerConnectionControls.d.ts +16 -0
- package/dist/settings/SettingsPage.d.ts +31 -0
- package/dist/settings/index.cjs +178 -241
- package/dist/settings/index.cjs.map +1 -1
- package/dist/settings/index.d.ts +3 -1
- package/dist/settings/index.js +86 -198
- package/dist/settings/index.js.map +1 -1
- package/dist/shell/index.cjs +44 -44
- package/dist/shell/index.js +3 -3
- package/dist/site/index.cjs +74 -73
- package/dist/site/index.js +3 -2
- package/dist/studio/index.cjs +78 -77
- package/dist/studio/index.cjs.map +1 -1
- package/dist/studio/index.js +10 -9
- package/dist/studio/index.js.map +1 -1
- package/dist/workflow-canvas/index.cjs +25 -25
- package/dist/workflow-canvas/index.js +8 -8
- package/dist/workspaces/CommonWorkspaceToggle.d.ts +15 -0
- package/dist/workspaces/index.cjs +41 -110
- package/dist/workspaces/index.cjs.map +1 -1
- package/dist/workspaces/index.d.ts +1 -0
- package/dist/workspaces/index.js +7 -104
- package/dist/workspaces/index.js.map +1 -1
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +4 -4
- package/dist/chunk-33ZOUJXA.js.map +0 -1
- package/dist/chunk-45LRMW54.js.map +0 -1
- package/dist/chunk-7NGAWGA3.js.map +0 -1
- package/dist/chunk-BUWBXJ2N.cjs.map +0 -1
- package/dist/chunk-C4WSHRR6.cjs.map +0 -1
- package/dist/chunk-DLBUFHLY.js.map +0 -1
- package/dist/chunk-JZNXRMLH.cjs.map +0 -1
- package/dist/chunk-MJCCBMM5.cjs.map +0 -1
- package/dist/chunk-ON3TKY5Y.js.map +0 -1
- package/dist/chunk-QIMVTGKS.cjs.map +0 -1
- package/dist/chunk-RA3ZJ45L.cjs.map +0 -1
- package/dist/chunk-YNIBUKV5.js.map +0 -1
package/dist/connect/index.cjs
CHANGED
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkRXK3XP62_cjs = require('../chunk-RXK3XP62.cjs');
|
|
5
|
+
var chunkU73KPFYH_cjs = require('../chunk-U73KPFYH.cjs');
|
|
5
6
|
var chunkODRHHWHY_cjs = require('../chunk-ODRHHWHY.cjs');
|
|
6
|
-
var
|
|
7
|
-
var
|
|
7
|
+
var chunkMFMASSEO_cjs = require('../chunk-MFMASSEO.cjs');
|
|
8
|
+
var chunkGAYMJWTC_cjs = require('../chunk-GAYMJWTC.cjs');
|
|
8
9
|
var chunkGFNELPDP_cjs = require('../chunk-GFNELPDP.cjs');
|
|
9
10
|
var chunkJH6JTI76_cjs = require('../chunk-JH6JTI76.cjs');
|
|
10
11
|
require('../chunk-464YPRAE.cjs');
|
|
11
12
|
require('../chunk-V5OAXIBN.cjs');
|
|
12
13
|
require('../chunk-5FYU7ZIU.cjs');
|
|
13
14
|
var chunkO4YPVYPO_cjs = require('../chunk-O4YPVYPO.cjs');
|
|
14
|
-
var
|
|
15
|
+
var chunkC3CGJK7A_cjs = require('../chunk-C3CGJK7A.cjs');
|
|
16
|
+
var chunkXAJIKT6Y_cjs = require('../chunk-XAJIKT6Y.cjs');
|
|
15
17
|
var chunkV46W7YLI_cjs = require('../chunk-V46W7YLI.cjs');
|
|
16
18
|
var chunkO6IEZDRC_cjs = require('../chunk-O6IEZDRC.cjs');
|
|
17
19
|
require('../chunk-LJJJ6CYH.cjs');
|
|
18
20
|
var chunkI2QSDQQV_cjs = require('../chunk-I2QSDQQV.cjs');
|
|
19
21
|
require('../chunk-RC25WMVB.cjs');
|
|
20
|
-
var
|
|
22
|
+
var chunkRB7GX2VT_cjs = require('../chunk-RB7GX2VT.cjs');
|
|
21
23
|
var chunkRFIBUWLF_cjs = require('../chunk-RFIBUWLF.cjs');
|
|
22
|
-
var
|
|
23
|
-
require('../chunk-
|
|
24
|
-
var chunkRQ2Y7USX_cjs = require('../chunk-RQ2Y7USX.cjs');
|
|
24
|
+
var chunkLPYEUD2D_cjs = require('../chunk-LPYEUD2D.cjs');
|
|
25
|
+
require('../chunk-EYKISBDO.cjs');
|
|
25
26
|
require('../chunk-AHDJXIUB.cjs');
|
|
27
|
+
var chunkRQ2Y7USX_cjs = require('../chunk-RQ2Y7USX.cjs');
|
|
26
28
|
require('../chunk-ZW6FPIFC.cjs');
|
|
27
29
|
require('../chunk-DETZZBG2.cjs');
|
|
28
|
-
require('../chunk-
|
|
30
|
+
require('../chunk-DTROMMDX.cjs');
|
|
29
31
|
var chunkV4ISCZJ7_cjs = require('../chunk-V4ISCZJ7.cjs');
|
|
30
32
|
var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
|
|
31
33
|
var chunkC2CWWEHO_cjs = require('../chunk-C2CWWEHO.cjs');
|
|
@@ -45,8 +47,8 @@ require('../chunk-32HW2Q33.cjs');
|
|
|
45
47
|
require('../chunk-FX3K6LNZ.cjs');
|
|
46
48
|
require('../chunk-PPCATBOY.cjs');
|
|
47
49
|
require('../chunk-MHVNT4J3.cjs');
|
|
48
|
-
var
|
|
49
|
-
var
|
|
50
|
+
var chunkXVUOMWMD_cjs = require('../chunk-XVUOMWMD.cjs');
|
|
51
|
+
var chunkKPZZ5FHE_cjs = require('../chunk-KPZZ5FHE.cjs');
|
|
50
52
|
var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
|
|
51
53
|
var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
|
|
52
54
|
require('../chunk-DES3K4SD.cjs');
|
|
@@ -140,7 +142,7 @@ function ConnectedWorkspaceActivity({
|
|
|
140
142
|
[feed.data]
|
|
141
143
|
);
|
|
142
144
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
143
|
-
|
|
145
|
+
chunkC3CGJK7A_cjs.WorkspaceActivityList,
|
|
144
146
|
{
|
|
145
147
|
...listProps,
|
|
146
148
|
items,
|
|
@@ -568,7 +570,7 @@ function NotificationCenter({
|
|
|
568
570
|
}
|
|
569
571
|
];
|
|
570
572
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-full bg-background", "data-testid": "notifications-page", children: [
|
|
571
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
573
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.DraggableHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
572
574
|
chunk7RGLTF76_cjs.TabHeader,
|
|
573
575
|
{
|
|
574
576
|
tabs,
|
|
@@ -806,14 +808,19 @@ function ConnectedWorkspaceNotificationMenu({
|
|
|
806
808
|
workspaceId: workspaceProp,
|
|
807
809
|
...menuProps
|
|
808
810
|
}) {
|
|
809
|
-
const {
|
|
811
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
812
|
+
const { workspaceId: selected, live } = chunkGFNELPDP_cjs.useConnectedWorkspace();
|
|
810
813
|
const workspaceId = workspaceProp ?? selected;
|
|
811
|
-
const { level, setLevel, isLoading, isSaving } = react$1.useWorkspaceNotificationLevel(
|
|
812
|
-
|
|
813
|
-
|
|
814
|
+
const { level, setLevel, isLoading, isSaving, error } = react$1.useWorkspaceNotificationLevel(
|
|
815
|
+
workspaceId,
|
|
816
|
+
{ enabled: live }
|
|
817
|
+
);
|
|
818
|
+
react.useEffect(() => {
|
|
819
|
+
if (error) notify("Could not save the workspace notification setting", "error");
|
|
820
|
+
}, [error, notify]);
|
|
814
821
|
if (!workspaceId) return null;
|
|
815
822
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
816
|
-
|
|
823
|
+
chunkC3CGJK7A_cjs.WorkspaceNotificationMenu,
|
|
817
824
|
{
|
|
818
825
|
...menuProps,
|
|
819
826
|
level,
|
|
@@ -827,12 +834,12 @@ function ConnectedThreadFollow({
|
|
|
827
834
|
as = "button",
|
|
828
835
|
...props
|
|
829
836
|
}) {
|
|
830
|
-
const {
|
|
837
|
+
const { live } = chunkGFNELPDP_cjs.useConnectedWorkspace();
|
|
831
838
|
const { following, setFollowing, isLoading, isSaving } = react$1.useFollowThread(conversationId, {
|
|
832
|
-
enabled:
|
|
839
|
+
enabled: live
|
|
833
840
|
});
|
|
834
841
|
if (!conversationId) return null;
|
|
835
|
-
const Control = as === "menu-item" ?
|
|
842
|
+
const Control = as === "menu-item" ? chunkC3CGJK7A_cjs.ThreadFollowMenuItem : chunkC3CGJK7A_cjs.ThreadFollowButton;
|
|
836
843
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
837
844
|
Control,
|
|
838
845
|
{
|
|
@@ -857,7 +864,7 @@ var DEFAULT_CONNECTED_SKILL_UPLOAD_LABELS = {
|
|
|
857
864
|
};
|
|
858
865
|
function ConnectedSkillUpload({ onDone, labels, className }) {
|
|
859
866
|
const l = { ...DEFAULT_CONNECTED_SKILL_UPLOAD_LABELS, ...labels };
|
|
860
|
-
const { notify } =
|
|
867
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
861
868
|
const upload = react$1.useUploadSkillFiles();
|
|
862
869
|
const fileRef = react.useRef(null);
|
|
863
870
|
const [url, setUrl] = react.useState("");
|
|
@@ -905,7 +912,7 @@ function ConnectedSkillUpload({ onDone, labels, className }) {
|
|
|
905
912
|
onChange: (e) => {
|
|
906
913
|
const file = e.target.files?.[0];
|
|
907
914
|
e.target.value = "";
|
|
908
|
-
if (file) void add(() =>
|
|
915
|
+
if (file) void add(() => chunkRB7GX2VT_cjs.importSkillFile(file));
|
|
909
916
|
}
|
|
910
917
|
}
|
|
911
918
|
),
|
|
@@ -930,7 +937,7 @@ function ConnectedSkillUpload({ onDone, labels, className }) {
|
|
|
930
937
|
className: "space-y-2",
|
|
931
938
|
onSubmit: (e) => {
|
|
932
939
|
e.preventDefault();
|
|
933
|
-
if (url.trim()) void add(() =>
|
|
940
|
+
if (url.trim()) void add(() => chunkRB7GX2VT_cjs.importSkillFromUrl(url));
|
|
934
941
|
},
|
|
935
942
|
children: [
|
|
936
943
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "skills-add-url", children: l.fromLink }),
|
|
@@ -982,7 +989,7 @@ function ConnectedSkillsLibrary({
|
|
|
982
989
|
renderEditor
|
|
983
990
|
}) {
|
|
984
991
|
const arbi = react$1.useArbi();
|
|
985
|
-
const { confirm, notify } =
|
|
992
|
+
const { confirm, notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
986
993
|
const { data: listings } = react$1.useSkills();
|
|
987
994
|
const upload = react$1.useUploadSkillFiles();
|
|
988
995
|
const setVisibility = react$1.useSetSkillVisibility();
|
|
@@ -994,9 +1001,9 @@ function ConnectedSkillsLibrary({
|
|
|
994
1001
|
const [type, setType] = react.useState("all");
|
|
995
1002
|
const [view, setView] = react.useState("gallery");
|
|
996
1003
|
const [isBusy, setIsBusy] = react.useState(false);
|
|
997
|
-
const all = react.useMemo(() =>
|
|
1004
|
+
const all = react.useMemo(() => chunkRB7GX2VT_cjs.buildLibrarySkills(builtins, listings ?? []), [builtins, listings]);
|
|
998
1005
|
const shown = react.useMemo(
|
|
999
|
-
() =>
|
|
1006
|
+
() => chunkRB7GX2VT_cjs.filterLibrarySkills(all, { query, source, type }),
|
|
1000
1007
|
[all, query, source, type]
|
|
1001
1008
|
);
|
|
1002
1009
|
const current = all.find((s) => s.slug === selected) ?? null;
|
|
@@ -1007,21 +1014,21 @@ function ConnectedSkillsLibrary({
|
|
|
1007
1014
|
const count = (s) => all.filter((x) => x.source === s).length;
|
|
1008
1015
|
const sourceOptions = [
|
|
1009
1016
|
{ id: "all", label: "All", count: all.length },
|
|
1010
|
-
{ id: "builtin", label:
|
|
1011
|
-
{ id: "mine", label:
|
|
1012
|
-
{ id: "shared", label:
|
|
1017
|
+
{ id: "builtin", label: chunkRB7GX2VT_cjs.SKILL_SOURCE_LABELS.builtin, count: count("builtin") },
|
|
1018
|
+
{ id: "mine", label: chunkRB7GX2VT_cjs.SKILL_SOURCE_LABELS.mine, count: count("mine") },
|
|
1019
|
+
{ id: "shared", label: chunkRB7GX2VT_cjs.SKILL_SOURCE_LABELS.shared, count: count("shared") }
|
|
1013
1020
|
];
|
|
1014
1021
|
const types = [...new Set(all.map((s) => s.type))];
|
|
1015
1022
|
const typeOptions = [
|
|
1016
1023
|
{ id: "all", label: "Any kind" },
|
|
1017
|
-
...types.map((t) => ({ id: t, label:
|
|
1024
|
+
...types.map((t) => ({ id: t, label: chunkRB7GX2VT_cjs.SKILL_TYPE_LABELS[t] ?? t }))
|
|
1018
1025
|
];
|
|
1019
1026
|
const pick = (slug) => {
|
|
1020
1027
|
setSelected(slug);
|
|
1021
1028
|
setMode("detail");
|
|
1022
1029
|
};
|
|
1023
1030
|
const markdownOf = async (skill) => {
|
|
1024
|
-
if (!skill.docExtId) return
|
|
1031
|
+
if (!skill.docExtId) return chunkRB7GX2VT_cjs.workflowToSkillMarkdown(skill.workflow);
|
|
1025
1032
|
const response = await arbi.documents.download(skill.docExtId);
|
|
1026
1033
|
if (!response.ok) throw new Error(`Could not read the skill (${response.status})`);
|
|
1027
1034
|
return response.text();
|
|
@@ -1029,7 +1036,7 @@ function ConnectedSkillsLibrary({
|
|
|
1029
1036
|
const saveAs = (slug, markdown, shared = false) => upload.mutateAsync([
|
|
1030
1037
|
{
|
|
1031
1038
|
folder: `${SKILL_FOLDER}${slug}`,
|
|
1032
|
-
fileName:
|
|
1039
|
+
fileName: chunkRB7GX2VT_cjs.SKILL_MAIN_FILENAME,
|
|
1033
1040
|
content: new Blob([markdown], { type: "text/markdown" }),
|
|
1034
1041
|
shared
|
|
1035
1042
|
}
|
|
@@ -1092,7 +1099,7 @@ function ConnectedSkillsLibrary({
|
|
|
1092
1099
|
try {
|
|
1093
1100
|
documentTools.downloadBlob(
|
|
1094
1101
|
new Blob([await markdownOf(skill)], { type: "text/markdown" }),
|
|
1095
|
-
|
|
1102
|
+
chunkRB7GX2VT_cjs.SKILL_MAIN_FILENAME
|
|
1096
1103
|
);
|
|
1097
1104
|
} catch (error) {
|
|
1098
1105
|
notify(errorText(error, "Could not export the skill"), "error");
|
|
@@ -1133,10 +1140,10 @@ function ConnectedSkillsLibrary({
|
|
|
1133
1140
|
}
|
|
1134
1141
|
)
|
|
1135
1142
|
] }),
|
|
1136
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1143
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkRB7GX2VT_cjs.SkillViewToggle, { value: view, onChange: setView })
|
|
1137
1144
|
] }),
|
|
1138
1145
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1139
|
-
|
|
1146
|
+
chunkRB7GX2VT_cjs.SkillFilterChips,
|
|
1140
1147
|
{
|
|
1141
1148
|
label: "Show",
|
|
1142
1149
|
value: source,
|
|
@@ -1145,7 +1152,7 @@ function ConnectedSkillsLibrary({
|
|
|
1145
1152
|
}
|
|
1146
1153
|
),
|
|
1147
1154
|
types.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1148
|
-
|
|
1155
|
+
chunkRB7GX2VT_cjs.SkillFilterChips,
|
|
1149
1156
|
{
|
|
1150
1157
|
label: "Kind",
|
|
1151
1158
|
value: type,
|
|
@@ -1192,12 +1199,12 @@ function ConnectedSkillsLibrary({
|
|
|
1192
1199
|
view === "gallery" ? "grid grid-cols-[repeat(auto-fill,minmax(9.5rem,1fr))]" : "flex flex-col"
|
|
1193
1200
|
),
|
|
1194
1201
|
children: shown.map((skill) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1195
|
-
|
|
1202
|
+
chunkRB7GX2VT_cjs.SkillTile,
|
|
1196
1203
|
{
|
|
1197
1204
|
name: skill.title,
|
|
1198
1205
|
testId: `skill-tile-${skill.slug}`,
|
|
1199
1206
|
description: skill.description,
|
|
1200
|
-
sourceLabel: skill.isShared ? `${
|
|
1207
|
+
sourceLabel: skill.isShared ? `${chunkRB7GX2VT_cjs.SKILL_SOURCE_LABELS.mine}, shared` : chunkRB7GX2VT_cjs.SKILL_SOURCE_LABELS[skill.source],
|
|
1201
1208
|
type: skill.type,
|
|
1202
1209
|
icon,
|
|
1203
1210
|
layout: view,
|
|
@@ -1232,7 +1239,7 @@ function ConnectedSkillsLibrary({
|
|
|
1232
1239
|
}
|
|
1233
1240
|
),
|
|
1234
1241
|
mode === "new" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1235
|
-
|
|
1242
|
+
chunkRB7GX2VT_cjs.SkillGenerateForm,
|
|
1236
1243
|
{
|
|
1237
1244
|
icon,
|
|
1238
1245
|
onGenerate: (desc) => {
|
|
@@ -1259,11 +1266,11 @@ function ConnectedSkillsLibrary({
|
|
|
1259
1266
|
),
|
|
1260
1267
|
mode === "add" && /* @__PURE__ */ jsxRuntime.jsx(ConnectedSkillUpload, { onDone: done }),
|
|
1261
1268
|
mode === "detail" && current && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1262
|
-
|
|
1269
|
+
chunkRB7GX2VT_cjs.SkillLibraryDetail,
|
|
1263
1270
|
{
|
|
1264
1271
|
skill: current,
|
|
1265
1272
|
icon,
|
|
1266
|
-
instructions: current.docExtId ? currentText ?
|
|
1273
|
+
instructions: current.docExtId ? currentText ? chunkRB7GX2VT_cjs.parseSkillFrontmatter(currentText, chunkRB7GX2VT_cjs.SKILL_MAIN_FILENAME).content : "" : current.workflow.run.kind === "prompt" ? current.workflow.run.promptTemplate : "",
|
|
1267
1274
|
isLoading: !!current.docExtId && textLoading,
|
|
1268
1275
|
actions: {
|
|
1269
1276
|
onRun: () => onRun(current.slug),
|
|
@@ -1290,7 +1297,7 @@ function SkillEditor({
|
|
|
1290
1297
|
onCancel,
|
|
1291
1298
|
isSaving
|
|
1292
1299
|
}) {
|
|
1293
|
-
const { notify } =
|
|
1300
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
1294
1301
|
const isEditing = !!skill;
|
|
1295
1302
|
const [name, setName] = react.useState(skill?.slug ?? "");
|
|
1296
1303
|
const [description, setDescription] = react.useState("");
|
|
@@ -1298,7 +1305,7 @@ function SkillEditor({
|
|
|
1298
1305
|
const [seeded, setSeeded] = react.useState(!isEditing);
|
|
1299
1306
|
const [nameError, setNameError] = react.useState(null);
|
|
1300
1307
|
if (isEditing && !seeded && text !== void 0) {
|
|
1301
|
-
const parsed =
|
|
1308
|
+
const parsed = chunkRB7GX2VT_cjs.parseSkillFrontmatter(text, chunkRB7GX2VT_cjs.SKILL_MAIN_FILENAME);
|
|
1302
1309
|
setDescription(parsed.description ?? "");
|
|
1303
1310
|
setBody(parsed.content ?? "");
|
|
1304
1311
|
setSeeded(true);
|
|
@@ -1312,15 +1319,15 @@ function SkillEditor({
|
|
|
1312
1319
|
notify("Add a short description.", "error");
|
|
1313
1320
|
return;
|
|
1314
1321
|
}
|
|
1315
|
-
const slug =
|
|
1322
|
+
const slug = chunkRB7GX2VT_cjs.skillSlug(name);
|
|
1316
1323
|
try {
|
|
1317
|
-
await onSave(slug,
|
|
1324
|
+
await onSave(slug, chunkRB7GX2VT_cjs.serializeSkill({ name: slug, description, body }), isEditing);
|
|
1318
1325
|
} catch (err) {
|
|
1319
1326
|
notify(errorText(err, "Could not save the skill"), "error");
|
|
1320
1327
|
}
|
|
1321
1328
|
};
|
|
1322
1329
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1323
|
-
|
|
1330
|
+
chunkRB7GX2VT_cjs.SkillEditForm,
|
|
1324
1331
|
{
|
|
1325
1332
|
name,
|
|
1326
1333
|
onNameChange: setName,
|
|
@@ -1356,13 +1363,13 @@ function ConnectedAgentCreator({
|
|
|
1356
1363
|
agent,
|
|
1357
1364
|
initialName,
|
|
1358
1365
|
onSaved,
|
|
1359
|
-
capabilities =
|
|
1360
|
-
templates =
|
|
1361
|
-
types =
|
|
1366
|
+
capabilities = chunkRB7GX2VT_cjs.DEFAULT_AGENT_CAPABILITIES,
|
|
1367
|
+
templates = chunkRB7GX2VT_cjs.DEFAULT_AGENT_TEMPLATES,
|
|
1368
|
+
types = chunkRB7GX2VT_cjs.DEFAULT_AGENT_TYPES,
|
|
1362
1369
|
canRevokeWorkspaces = false,
|
|
1363
1370
|
labels
|
|
1364
1371
|
}) {
|
|
1365
|
-
const { notify } =
|
|
1372
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
1366
1373
|
const isEdit = !!agent;
|
|
1367
1374
|
const [saving, setSaving] = react.useState(false);
|
|
1368
1375
|
const [skills, setSkills] = react.useState([]);
|
|
@@ -1400,7 +1407,7 @@ function ConnectedAgentCreator({
|
|
|
1400
1407
|
const initialValues = react.useMemo(
|
|
1401
1408
|
() => ({
|
|
1402
1409
|
name: agent?.given_name ?? initialName ?? "",
|
|
1403
|
-
persona: isEdit ?
|
|
1410
|
+
persona: isEdit ? chunkRB7GX2VT_cjs.stripPersonaPreamble(String(agents.PERSONA ?? "")) : "",
|
|
1404
1411
|
modelName: String(agents.AGENT_MODEL_NAME ?? ""),
|
|
1405
1412
|
capabilities: Object.fromEntries(capabilities.map(({ key }) => [key, Boolean(agents[key])])),
|
|
1406
1413
|
type: "builtin",
|
|
@@ -1419,7 +1426,7 @@ function ConnectedAgentCreator({
|
|
|
1419
1426
|
try {
|
|
1420
1427
|
let agentExtId = agent?.external_id ?? early?.id ?? "";
|
|
1421
1428
|
if (!agentExtId) {
|
|
1422
|
-
if (!
|
|
1429
|
+
if (!chunkRB7GX2VT_cjs.isValidAgentName(values.name)) {
|
|
1423
1430
|
notify("Give the agent a name first.", "error");
|
|
1424
1431
|
return;
|
|
1425
1432
|
}
|
|
@@ -1455,7 +1462,7 @@ function ConnectedAgentCreator({
|
|
|
1455
1462
|
title: `agent-${name}`,
|
|
1456
1463
|
sections: {
|
|
1457
1464
|
Agents: {
|
|
1458
|
-
PERSONA:
|
|
1465
|
+
PERSONA: chunkRB7GX2VT_cjs.composePersona(name, values.persona),
|
|
1459
1466
|
...values.modelName ? { AGENT_MODEL_NAME: values.modelName } : {},
|
|
1460
1467
|
...Object.fromEntries(capabilities.map(({ key }) => [key, !!values.capabilities[key]])),
|
|
1461
1468
|
ENABLED_SKILLS: values.capabilities.SKILLS_ENABLED && skills.length ? skills : null,
|
|
@@ -1478,7 +1485,7 @@ function ConnectedAgentCreator({
|
|
|
1478
1485
|
};
|
|
1479
1486
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1480
1487
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1481
|
-
|
|
1488
|
+
chunkRB7GX2VT_cjs.AgentCreator,
|
|
1482
1489
|
{
|
|
1483
1490
|
open: ready,
|
|
1484
1491
|
onOpenChange,
|
|
@@ -1494,11 +1501,11 @@ function ConnectedAgentCreator({
|
|
|
1494
1501
|
) : void 0,
|
|
1495
1502
|
revokingWorkspaceId: revokeAccess.isPending ? revokeAccess.variables?.workspaceId : void 0,
|
|
1496
1503
|
avatar: (values) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1497
|
-
|
|
1504
|
+
chunkRB7GX2VT_cjs.AgentAvatarField,
|
|
1498
1505
|
{
|
|
1499
1506
|
picture,
|
|
1500
1507
|
isBusy: avatarBusy,
|
|
1501
|
-
canGenerate: isEdit ||
|
|
1508
|
+
canGenerate: isEdit || chunkRB7GX2VT_cjs.isValidAgentName(values.name),
|
|
1502
1509
|
onGenerate: () => handleGenerateAvatar(values)
|
|
1503
1510
|
}
|
|
1504
1511
|
),
|
|
@@ -1550,7 +1557,7 @@ function ConnectedAgentCreator({
|
|
|
1550
1557
|
/* @__PURE__ */ jsxRuntime.jsx(ui.DialogTitle, { children: "Connect your agent" }),
|
|
1551
1558
|
/* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { children: "This key is shown once. Run the script on the machine that will host the agent." })
|
|
1552
1559
|
] }),
|
|
1553
|
-
connect && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1560
|
+
connect && /* @__PURE__ */ jsxRuntime.jsx(chunkRB7GX2VT_cjs.AgentConnectInstructions, { email: connect.email, signingKey: connect.signingKey })
|
|
1554
1561
|
]
|
|
1555
1562
|
}
|
|
1556
1563
|
) })
|
|
@@ -1584,10 +1591,10 @@ function ConnectedWorkflowHistory({
|
|
|
1584
1591
|
renderErrorReport,
|
|
1585
1592
|
labels
|
|
1586
1593
|
}) {
|
|
1587
|
-
const { openConversation } =
|
|
1594
|
+
const { openConversation } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
1588
1595
|
const { data: runs = [], isLoading } = react$1.useWorkflowRuns(workflow?.external_id);
|
|
1589
1596
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1590
|
-
|
|
1597
|
+
chunkRB7GX2VT_cjs.TaskRunsDialog,
|
|
1591
1598
|
{
|
|
1592
1599
|
inline,
|
|
1593
1600
|
hideHeader,
|
|
@@ -1623,14 +1630,14 @@ function ConnectedTaskActivityDialog({
|
|
|
1623
1630
|
const activity = react$1.useConversationActivity(conversationId, { live });
|
|
1624
1631
|
const { data: agents = [] } = react$1.useAgents();
|
|
1625
1632
|
const { userId } = chunkGFNELPDP_cjs.useConnectedWorkspace();
|
|
1626
|
-
const { members } =
|
|
1633
|
+
const { members } = chunkMFMASSEO_cjs.useConnectedWorkspaceRole();
|
|
1627
1634
|
const renderPerson = react.useCallback(
|
|
1628
1635
|
(id) => {
|
|
1629
1636
|
const isMe = !!id && id === userId;
|
|
1630
1637
|
const member = members.find((m) => m.user.external_id === id)?.user;
|
|
1631
1638
|
const name = member && [member.given_name, member.family_name].filter(Boolean).join(" ") || member?.email;
|
|
1632
1639
|
const person = { id, label: isMe ? "You" : name || "Someone", isMe };
|
|
1633
|
-
return renderTaskPerson ? renderTaskPerson(person) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1640
|
+
return renderTaskPerson ? renderTaskPerson(person) : /* @__PURE__ */ jsxRuntime.jsx(chunkLPYEUD2D_cjs.PersonPill, { person });
|
|
1634
1641
|
},
|
|
1635
1642
|
[renderTaskPerson, userId, members]
|
|
1636
1643
|
);
|
|
@@ -1639,7 +1646,7 @@ function ConnectedTaskActivityDialog({
|
|
|
1639
1646
|
[agents]
|
|
1640
1647
|
);
|
|
1641
1648
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1642
|
-
|
|
1649
|
+
chunkRB7GX2VT_cjs.TaskActivityDialog,
|
|
1643
1650
|
{
|
|
1644
1651
|
open: true,
|
|
1645
1652
|
onOpenChange: (open) => !open && onClose(),
|
|
@@ -1785,7 +1792,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
1785
1792
|
);
|
|
1786
1793
|
const conversation = conversations.data?.find((c) => c.external_id === threadId);
|
|
1787
1794
|
const steps = react.useMemo(
|
|
1788
|
-
() => chunkJSTKEZBS_cjs.workflowSteps(workflow).length > 0 ? chunkJSTKEZBS_cjs.workflowSteps(workflow) :
|
|
1795
|
+
() => chunkJSTKEZBS_cjs.workflowSteps(workflow).length > 0 ? chunkJSTKEZBS_cjs.workflowSteps(workflow) : chunkRB7GX2VT_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
|
|
1789
1796
|
[workflow, conversation?.plan?.steps]
|
|
1790
1797
|
);
|
|
1791
1798
|
const activity = react$1.useConversationActivity(threadId, { live: !!threadId });
|
|
@@ -1845,7 +1852,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
1845
1852
|
criteria: [],
|
|
1846
1853
|
max_passes: 3,
|
|
1847
1854
|
documents: [],
|
|
1848
|
-
steps:
|
|
1855
|
+
steps: chunkRB7GX2VT_cjs.toPlanSteps(workflow, {
|
|
1849
1856
|
inputs: values,
|
|
1850
1857
|
resolveWorkflow: options.resolveWorkflow,
|
|
1851
1858
|
compose: options.compose
|
|
@@ -1932,7 +1939,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
1932
1939
|
const anyRunning = Object.values(states).some((s) => s.status === "running");
|
|
1933
1940
|
const needsStart = !threadId || idle && !anyRunning;
|
|
1934
1941
|
const runError = idle ? conversation?.last_error ?? null : null;
|
|
1935
|
-
const view =
|
|
1942
|
+
const view = chunkRB7GX2VT_cjs.useWorkflowView({
|
|
1936
1943
|
steps,
|
|
1937
1944
|
states,
|
|
1938
1945
|
inputs,
|
|
@@ -2100,7 +2107,7 @@ function WorkflowWordDialog({
|
|
|
2100
2107
|
title: title ?? labels.wordTitle,
|
|
2101
2108
|
size: "xl",
|
|
2102
2109
|
testId: "workflow-word-dialog",
|
|
2103
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2110
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(chunkMFMASSEO_cjs.ConnectedNativeDocxEditor, { documentId: id, title: title ?? labels.wordTitle }) })
|
|
2104
2111
|
}
|
|
2105
2112
|
);
|
|
2106
2113
|
}
|
|
@@ -2409,7 +2416,7 @@ function ConnectedWorkflowRunner({
|
|
|
2409
2416
|
);
|
|
2410
2417
|
};
|
|
2411
2418
|
const runner = (compact) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2412
|
-
|
|
2419
|
+
chunkRB7GX2VT_cjs.WorkflowRunner,
|
|
2413
2420
|
{
|
|
2414
2421
|
people,
|
|
2415
2422
|
...runnerProps,
|
|
@@ -2455,7 +2462,7 @@ function ConnectedWorkflowRunner({
|
|
|
2455
2462
|
) }),
|
|
2456
2463
|
inThread && conversationId ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2457
2464
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2458
|
-
|
|
2465
|
+
chunkRB7GX2VT_cjs.WorkflowStepBar,
|
|
2459
2466
|
{
|
|
2460
2467
|
run: view,
|
|
2461
2468
|
levels: chunkJSTKEZBS_cjs.stepLevels(view.steps),
|
|
@@ -2656,7 +2663,7 @@ function ConnectedTagTable({
|
|
|
2656
2663
|
const fail = (e) => setError(e instanceof Error ? e.message : String(e));
|
|
2657
2664
|
const snapshot = (data) => {
|
|
2658
2665
|
const title = exportTitle ?? KIND_TITLES[kind];
|
|
2659
|
-
const bytes =
|
|
2666
|
+
const bytes = chunkC3CGJK7A_cjs.tagTableDocx(data, {
|
|
2660
2667
|
title,
|
|
2661
2668
|
nameOf: (id) => people.find((p) => p.value === id)?.label
|
|
2662
2669
|
});
|
|
@@ -2666,7 +2673,7 @@ function ConnectedTagTable({
|
|
|
2666
2673
|
};
|
|
2667
2674
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
2668
2675
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2669
|
-
|
|
2676
|
+
chunkC3CGJK7A_cjs.TagTable,
|
|
2670
2677
|
{
|
|
2671
2678
|
...props,
|
|
2672
2679
|
table,
|
|
@@ -2743,6 +2750,11 @@ function useConnectedShellWorkspaces(options = {}) {
|
|
|
2743
2750
|
select: (workspace) => setWorkspace(workspace.id)
|
|
2744
2751
|
});
|
|
2745
2752
|
}
|
|
2753
|
+
function SessionStatusIcon({ status, className }) {
|
|
2754
|
+
if (status === "agent") return /* @__PURE__ */ jsxRuntime.jsx(react$1.ArbiBotHeadIcon, { className: className ?? "w-4 h-4" });
|
|
2755
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Monitor, { className: className ?? "w-4 h-4 text-muted-foreground" });
|
|
2756
|
+
}
|
|
2757
|
+
var renderSessionStatusIcon = (status) => /* @__PURE__ */ jsxRuntime.jsx(SessionStatusIcon, { status });
|
|
2746
2758
|
function errorText2(error, fallback) {
|
|
2747
2759
|
const body = error?.apiError;
|
|
2748
2760
|
return typeof body?.detail === "string" ? body.detail : fallback;
|
|
@@ -2757,7 +2769,7 @@ function ConnectedProfileCard({
|
|
|
2757
2769
|
avatarClassName = "bg-primary text-primary-foreground",
|
|
2758
2770
|
children
|
|
2759
2771
|
}) {
|
|
2760
|
-
const { notify } =
|
|
2772
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
2761
2773
|
const { data: profile } = react$1.useProfile();
|
|
2762
2774
|
const updateProfile = react$1.useUpdateProfile();
|
|
2763
2775
|
const requestEmailChange = react$1.useRequestEmailChange();
|
|
@@ -2808,13 +2820,13 @@ function ConnectedProfileCard({
|
|
|
2808
2820
|
}
|
|
2809
2821
|
});
|
|
2810
2822
|
const display = profile?.fullName || "Unnamed";
|
|
2811
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2823
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkU73KPFYH_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserCircle, {}), title, children: [
|
|
2812
2824
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2813
|
-
|
|
2825
|
+
chunkU73KPFYH_cjs.ProfileCard,
|
|
2814
2826
|
{
|
|
2815
2827
|
avatar: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2816
2828
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2817
|
-
|
|
2829
|
+
chunkU73KPFYH_cjs.AvatarPicker,
|
|
2818
2830
|
{
|
|
2819
2831
|
pictureUrl: profile?.picture,
|
|
2820
2832
|
initials: chunkKDG6FER6_cjs.initials(display),
|
|
@@ -2853,7 +2865,7 @@ function ConnectedIdentityVerification({
|
|
|
2853
2865
|
onManageBilling,
|
|
2854
2866
|
formatPrice
|
|
2855
2867
|
}) {
|
|
2856
|
-
const { notify } =
|
|
2868
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
2857
2869
|
const { data: profile } = react$1.useProfile();
|
|
2858
2870
|
const flow = react$1.useIdentityVerification({
|
|
2859
2871
|
formatPrice,
|
|
@@ -2861,9 +2873,9 @@ function ConnectedIdentityVerification({
|
|
|
2861
2873
|
onNameAccepted: () => notify("Name updated to match your ID", "success")
|
|
2862
2874
|
});
|
|
2863
2875
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2864
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2876
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.IdentityVerificationCard, { flow, labels, onManageBilling }),
|
|
2865
2877
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2866
|
-
|
|
2878
|
+
chunkU73KPFYH_cjs.IdentityVerificationDialog,
|
|
2867
2879
|
{
|
|
2868
2880
|
flow,
|
|
2869
2881
|
accountName: profile?.fullName ?? "",
|
|
@@ -2876,7 +2888,7 @@ function ConnectedIdentityVerification({
|
|
|
2876
2888
|
function ConnectedRequireVerified({ children, labels }) {
|
|
2877
2889
|
const { data: profile } = react$1.useProfile();
|
|
2878
2890
|
const flow = react$1.useIdentityVerification();
|
|
2879
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2891
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.RequireVerified, { flow, accountName: profile?.fullName ?? "", labels, children });
|
|
2880
2892
|
}
|
|
2881
2893
|
function defaultUnmetPasswordRequirement(password) {
|
|
2882
2894
|
if (password.length < 8) return "Minimum 8 characters";
|
|
@@ -2893,7 +2905,7 @@ function ConnectedPasswordChangeDialog({
|
|
|
2893
2905
|
recoveryMode = false,
|
|
2894
2906
|
onRecoveryComplete
|
|
2895
2907
|
}) {
|
|
2896
|
-
const { notify } =
|
|
2908
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
2897
2909
|
const change = react$1.usePasswordChange();
|
|
2898
2910
|
const form = react$1.usePasswordChangeForm({
|
|
2899
2911
|
recoveryMode,
|
|
@@ -2909,7 +2921,7 @@ function ConnectedPasswordChangeDialog({
|
|
|
2909
2921
|
onRecoveryComplete
|
|
2910
2922
|
});
|
|
2911
2923
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2912
|
-
|
|
2924
|
+
chunkU73KPFYH_cjs.PasswordChangeDialog,
|
|
2913
2925
|
{
|
|
2914
2926
|
open,
|
|
2915
2927
|
onClose: form.onCancel,
|
|
@@ -2935,10 +2947,10 @@ function ConnectedSecuritySection({
|
|
|
2935
2947
|
children
|
|
2936
2948
|
}) {
|
|
2937
2949
|
const [open, setOpen] = react.useState(false);
|
|
2938
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2939
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2950
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkU73KPFYH_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.KeyRound, {}), title: "Security", children: [
|
|
2951
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkU73KPFYH_cjs.SettingsCard, { padding: "sm", children: [
|
|
2940
2952
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2941
|
-
|
|
2953
|
+
chunkU73KPFYH_cjs.SettingsActionRow,
|
|
2942
2954
|
{
|
|
2943
2955
|
title: "Change password",
|
|
2944
2956
|
description: "Used to sign in and to unlock your account key. Changing it keeps everything readable and re-encrypts nothing.",
|
|
@@ -2959,41 +2971,43 @@ function ConnectedSecuritySection({
|
|
|
2959
2971
|
] });
|
|
2960
2972
|
}
|
|
2961
2973
|
function ConnectedNotificationPreferences({
|
|
2962
|
-
categories =
|
|
2974
|
+
categories = chunkU73KPFYH_cjs.EMAIL_NOTIFICATION_CATEGORIES,
|
|
2963
2975
|
title = "Notifications"
|
|
2964
2976
|
}) {
|
|
2965
2977
|
const keys = react.useMemo(
|
|
2966
|
-
() => categories ===
|
|
2978
|
+
() => categories === chunkU73KPFYH_cjs.EMAIL_NOTIFICATION_CATEGORIES ? chunkU73KPFYH_cjs.EMAIL_NOTIFICATION_KEYS : categories.map((c) => c.key),
|
|
2967
2979
|
[categories]
|
|
2968
2980
|
);
|
|
2969
2981
|
const prefs = react$1.useNotificationPreferences(keys);
|
|
2970
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2971
|
-
|
|
2982
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.SettingsSection, { title, children: /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2983
|
+
chunkU73KPFYH_cjs.NotificationCategoryList,
|
|
2972
2984
|
{
|
|
2973
2985
|
masterId: "emailNotifications",
|
|
2974
2986
|
masterTitle: "Email Notifications",
|
|
2975
2987
|
masterDescription: "Email me about activity when I\u2019m away",
|
|
2976
2988
|
masterChecked: prefs.masterChecked,
|
|
2977
2989
|
onMasterChange: prefs.setAll,
|
|
2978
|
-
categories:
|
|
2990
|
+
categories: chunkU73KPFYH_cjs.toNotificationCategories(prefs.checked, categories),
|
|
2979
2991
|
onCategoryChange: prefs.setCategory
|
|
2980
2992
|
}
|
|
2981
2993
|
) }) });
|
|
2982
2994
|
}
|
|
2983
|
-
function ConnectedSessionsRow({
|
|
2984
|
-
|
|
2995
|
+
function ConnectedSessionsRow({
|
|
2996
|
+
renderSessionIcon = renderSessionStatusIcon
|
|
2997
|
+
}) {
|
|
2998
|
+
const { notify, confirm } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
2985
2999
|
const [open, setOpen] = react.useState(false);
|
|
2986
3000
|
const sessions = react$1.useSessions({ enabled: open });
|
|
2987
3001
|
const currentSessionId = react$1.useCurrentSessionId();
|
|
2988
3002
|
const terminate = react$1.useTerminateSession();
|
|
2989
|
-
const views =
|
|
3003
|
+
const views = chunkU73KPFYH_cjs.toActiveSessionViews(sessions.data ?? [], {
|
|
2990
3004
|
currentSessionId,
|
|
2991
3005
|
terminatingId: terminate.isPending ? terminate.variables : null,
|
|
2992
3006
|
renderIcon: renderSessionIcon
|
|
2993
3007
|
});
|
|
2994
3008
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2995
3009
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2996
|
-
|
|
3010
|
+
chunkU73KPFYH_cjs.SettingsRow,
|
|
2997
3011
|
{
|
|
2998
3012
|
label: "Active sessions",
|
|
2999
3013
|
description: "Devices and agents currently signed in to your account.",
|
|
@@ -3015,7 +3029,7 @@ function ConnectedSessionsRow({ renderSessionIcon }) {
|
|
|
3015
3029
|
}
|
|
3016
3030
|
),
|
|
3017
3031
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3018
|
-
|
|
3032
|
+
chunkU73KPFYH_cjs.ActiveSessionsDialog,
|
|
3019
3033
|
{
|
|
3020
3034
|
open,
|
|
3021
3035
|
onOpenChange: setOpen,
|
|
@@ -3046,7 +3060,7 @@ function ConnectedLogoutDialog({
|
|
|
3046
3060
|
onClose,
|
|
3047
3061
|
canLogoutAll = true,
|
|
3048
3062
|
confirmSignOut,
|
|
3049
|
-
renderSessionIcon
|
|
3063
|
+
renderSessionIcon = renderSessionStatusIcon
|
|
3050
3064
|
}) {
|
|
3051
3065
|
const sessions = react$1.useSessions({ enabled: open });
|
|
3052
3066
|
const signOut = react$1.useSignOut();
|
|
@@ -3057,7 +3071,7 @@ function ConnectedLogoutDialog({
|
|
|
3057
3071
|
signOut.mutate({ everywhere, reason: "manual" });
|
|
3058
3072
|
};
|
|
3059
3073
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3060
|
-
|
|
3074
|
+
chunkU73KPFYH_cjs.LogoutDialog,
|
|
3061
3075
|
{
|
|
3062
3076
|
open,
|
|
3063
3077
|
onClose,
|
|
@@ -3065,13 +3079,13 @@ function ConnectedLogoutDialog({
|
|
|
3065
3079
|
onLogoutAll: () => void run(true),
|
|
3066
3080
|
canLogoutAll,
|
|
3067
3081
|
isOnline,
|
|
3068
|
-
sessions:
|
|
3082
|
+
sessions: chunkU73KPFYH_cjs.toLogoutSessionViews(sessions.data ?? []),
|
|
3069
3083
|
renderSessionIcon
|
|
3070
3084
|
}
|
|
3071
3085
|
);
|
|
3072
3086
|
}
|
|
3073
3087
|
function ConnectedDangerZone({ renderSubscriptionLink }) {
|
|
3074
|
-
const { notify } =
|
|
3088
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
3075
3089
|
const [zoneOpen, setZoneOpen] = react.useState(false);
|
|
3076
3090
|
const [dialogOpen, setDialogOpen] = react.useState(false);
|
|
3077
3091
|
const { data: profile } = react$1.useProfile();
|
|
@@ -3087,7 +3101,7 @@ function ConnectedDangerZone({ renderSubscriptionLink }) {
|
|
|
3087
3101
|
});
|
|
3088
3102
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3089
3103
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3090
|
-
|
|
3104
|
+
chunkU73KPFYH_cjs.SettingsDangerZone,
|
|
3091
3105
|
{
|
|
3092
3106
|
isOpen: zoneOpen,
|
|
3093
3107
|
onToggle: () => setZoneOpen((o) => !o),
|
|
@@ -3107,12 +3121,12 @@ function ConnectedDangerZone({ renderSubscriptionLink }) {
|
|
|
3107
3121
|
}
|
|
3108
3122
|
),
|
|
3109
3123
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3110
|
-
|
|
3124
|
+
chunkU73KPFYH_cjs.DeleteAccountDialog,
|
|
3111
3125
|
{
|
|
3112
3126
|
open: dialogOpen,
|
|
3113
3127
|
onClose: flow.onClose,
|
|
3114
3128
|
step: flow.step,
|
|
3115
|
-
blockers:
|
|
3129
|
+
blockers: chunkU73KPFYH_cjs.toDeleteBlockerViews(flow.blockers, renderSubscriptionLink),
|
|
3116
3130
|
onContinue: flow.onContinue,
|
|
3117
3131
|
onBack: flow.onBack,
|
|
3118
3132
|
userEmail,
|
|
@@ -3124,211 +3138,80 @@ function ConnectedDangerZone({ renderSubscriptionLink }) {
|
|
|
3124
3138
|
)
|
|
3125
3139
|
] });
|
|
3126
3140
|
}
|
|
3127
|
-
function
|
|
3128
|
-
const
|
|
3129
|
-
const
|
|
3130
|
-
const
|
|
3131
|
-
const
|
|
3132
|
-
|
|
3133
|
-
const queryKey = ["docx-mentions", apiUrl, user?.externalId];
|
|
3134
|
-
const { data = [] } = reactQuery.useQuery({
|
|
3135
|
-
queryKey,
|
|
3136
|
-
queryFn: () => arbi.notifications.list({ type: "docx_mention" }),
|
|
3137
|
-
enabled: status === "authenticated",
|
|
3138
|
-
refetchInterval: 3e4
|
|
3139
|
-
});
|
|
3140
|
-
react$1.useArbiWebSocket((message) => {
|
|
3141
|
-
if (message.type === "docx_mention") void queries.invalidateQueries({ queryKey });
|
|
3142
|
-
});
|
|
3143
|
-
react.useEffect(() => {
|
|
3144
|
-
const items = [];
|
|
3145
|
-
if (status === "authenticated")
|
|
3146
|
-
for (const note of data) {
|
|
3147
|
-
if (note.recipient.external_id !== user?.externalId || !note.workspace_ext_id) continue;
|
|
3148
|
-
try {
|
|
3149
|
-
const target = JSON.parse(note.content || "{}");
|
|
3150
|
-
if (!target.document_id?.startsWith("doc-") || !target.comment_id) continue;
|
|
3151
|
-
const documentId = target.document_id, commentId = target.comment_id, workspaceId = note.workspace_ext_id;
|
|
3152
|
-
items.push({
|
|
3153
|
-
id: `docx:${note.external_id}`,
|
|
3154
|
-
title: "Mentioned you in a document comment",
|
|
3155
|
-
description: [note.sender.given_name, note.sender.family_name].filter(Boolean).join(" "),
|
|
3156
|
-
variant: "info",
|
|
3157
|
-
ts: Date.parse(note.created_at),
|
|
3158
|
-
read: note.read,
|
|
3159
|
-
source,
|
|
3160
|
-
onSelect: () => {
|
|
3161
|
-
void Promise.resolve(onOpen({ documentId, commentId, workspaceId })).catch(
|
|
3162
|
-
(error) => notify(
|
|
3163
|
-
error instanceof Error ? error.message : "Could not open the document.",
|
|
3164
|
-
"error"
|
|
3165
|
-
)
|
|
3166
|
-
);
|
|
3167
|
-
}
|
|
3168
|
-
});
|
|
3169
|
-
} catch {
|
|
3170
|
-
}
|
|
3171
|
-
}
|
|
3172
|
-
shell.useNotify.getState().syncSource(source, items);
|
|
3173
|
-
return () => shell.useNotify.getState().syncSource(source, []);
|
|
3174
|
-
}, [data, status, user?.externalId, source, onOpen, notify]);
|
|
3175
|
-
const markRead = async (ids) => {
|
|
3176
|
-
try {
|
|
3177
|
-
await arbi.notifications.markRead(ids);
|
|
3178
|
-
await queries.invalidateQueries({ queryKey });
|
|
3179
|
-
} catch {
|
|
3180
|
-
notify("Could not mark document mentions read.", "error");
|
|
3181
|
-
}
|
|
3182
|
-
};
|
|
3183
|
-
return {
|
|
3184
|
-
onMarkRead: (id) => {
|
|
3185
|
-
if (id.startsWith("docx:")) void markRead([id.slice(5)]);
|
|
3186
|
-
},
|
|
3187
|
-
onMarkAllRead: () => {
|
|
3188
|
-
void markRead(
|
|
3189
|
-
data.filter((note) => !note.read && note.recipient.external_id === user?.externalId).map((note) => note.external_id)
|
|
3190
|
-
);
|
|
3191
|
-
}
|
|
3192
|
-
};
|
|
3193
|
-
}
|
|
3194
|
-
function useConnectedWorkNotifications(onOpen) {
|
|
3195
|
-
const { status, user, apiUrl } = chunkGFNELPDP_cjs.useConnection();
|
|
3196
|
-
const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
|
|
3197
|
-
const source = `work-notifications:${apiUrl}:${user?.externalId || ""}`;
|
|
3198
|
-
const { data = [], markRead: persistRead } = react$1.useWorkNotifications({
|
|
3199
|
-
apiUrl,
|
|
3200
|
-
userId: user?.externalId,
|
|
3201
|
-
enabled: status === "authenticated"
|
|
3202
|
-
});
|
|
3203
|
-
react.useEffect(() => {
|
|
3204
|
-
const items = [];
|
|
3205
|
-
if (status === "authenticated")
|
|
3206
|
-
for (const note of data) {
|
|
3207
|
-
if (note.recipient.external_id !== user?.externalId) continue;
|
|
3208
|
-
const mapped = mapWorkNotification(note);
|
|
3209
|
-
if (!mapped) continue;
|
|
3210
|
-
items.push({
|
|
3211
|
-
id: `work:${note.external_id}`,
|
|
3212
|
-
title: mapped.title,
|
|
3213
|
-
variant: note.type === "workflow_failed" ? "error" : note.type === "conversation_done" ? "success" : "info",
|
|
3214
|
-
ts: Date.parse(note.created_at),
|
|
3215
|
-
read: note.read,
|
|
3216
|
-
source,
|
|
3217
|
-
onSelect: () => {
|
|
3218
|
-
void Promise.resolve().then(() => onOpen(mapped.target)).catch(
|
|
3219
|
-
(error) => notify(
|
|
3220
|
-
error instanceof Error ? error.message : "Could not open this notification.",
|
|
3221
|
-
"error"
|
|
3222
|
-
)
|
|
3223
|
-
);
|
|
3224
|
-
}
|
|
3225
|
-
});
|
|
3226
|
-
}
|
|
3227
|
-
shell.useNotify.getState().syncSource(source, items);
|
|
3228
|
-
return () => shell.useNotify.getState().syncSource(source, []);
|
|
3229
|
-
}, [data, status, user?.externalId, source, onOpen, notify]);
|
|
3230
|
-
const markRead = async (ids) => {
|
|
3231
|
-
if (!ids.length) return;
|
|
3141
|
+
function ServerConnectionRow({ onRefresh, ...status }) {
|
|
3142
|
+
const { runtimeConfig } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
3143
|
+
const [isRefreshing, setIsRefreshing] = react.useState(false);
|
|
3144
|
+
const view = chunkU73KPFYH_cjs.serverConnectionView(status, runtimeConfig.deploymentDomain || "server");
|
|
3145
|
+
const refresh = async () => {
|
|
3146
|
+
setIsRefreshing(true);
|
|
3232
3147
|
try {
|
|
3233
|
-
await
|
|
3234
|
-
}
|
|
3235
|
-
|
|
3148
|
+
await onRefresh();
|
|
3149
|
+
} finally {
|
|
3150
|
+
setIsRefreshing(false);
|
|
3236
3151
|
}
|
|
3237
3152
|
};
|
|
3238
|
-
return {
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
onMarkAllRead: () => {
|
|
3246
|
-
void markRead(
|
|
3247
|
-
data.filter(
|
|
3248
|
-
(note) => !note.read && note.recipient.external_id === user?.externalId && mapWorkNotification(note)
|
|
3249
|
-
).map((note) => note.external_id)
|
|
3250
|
-
);
|
|
3153
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.SettingsRow, { label: "Server connection", description: view.description, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3154
|
+
chunkU73KPFYH_cjs.ServerConnectionButton,
|
|
3155
|
+
{
|
|
3156
|
+
state: view.state,
|
|
3157
|
+
label: view.label,
|
|
3158
|
+
isRefreshing,
|
|
3159
|
+
onRefresh: () => void refresh()
|
|
3251
3160
|
}
|
|
3252
|
-
};
|
|
3161
|
+
) });
|
|
3253
3162
|
}
|
|
3254
|
-
function
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3163
|
+
function ConnectedAccountSettings({
|
|
3164
|
+
avatarClassName,
|
|
3165
|
+
onManageBilling,
|
|
3166
|
+
formatIdentityPrice,
|
|
3167
|
+
afterProfile,
|
|
3168
|
+
getUnmetPasswordRequirement,
|
|
3169
|
+
securityRows,
|
|
3170
|
+
connection,
|
|
3171
|
+
onLogout,
|
|
3172
|
+
renderSessionIcon,
|
|
3173
|
+
renderSubscriptionLink
|
|
3174
|
+
}) {
|
|
3175
|
+
const [logoutOpen, setLogoutOpen] = react.useState(false);
|
|
3176
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkU73KPFYH_cjs.SettingsPanel, { className: "max-w-2xl", children: [
|
|
3177
|
+
/* @__PURE__ */ jsxRuntime.jsx(ConnectedProfileCard, { avatarClassName, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3178
|
+
ConnectedIdentityVerification,
|
|
3179
|
+
{
|
|
3180
|
+
onManageBilling,
|
|
3181
|
+
formatPrice: formatIdentityPrice
|
|
3269
3182
|
}
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3183
|
+
) }),
|
|
3184
|
+
afterProfile,
|
|
3185
|
+
/* @__PURE__ */ jsxRuntime.jsx(ConnectedSecuritySection, { getUnmetRequirement: getUnmetPasswordRequirement, children: securityRows }),
|
|
3186
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wifi, {}), title: "Session", children: /* @__PURE__ */ jsxRuntime.jsxs(chunkU73KPFYH_cjs.SettingsCard, { children: [
|
|
3187
|
+
connection && /* @__PURE__ */ jsxRuntime.jsx(ServerConnectionRow, { ...connection }),
|
|
3188
|
+
/* @__PURE__ */ jsxRuntime.jsx(ConnectedSessionsRow, { renderSessionIcon }),
|
|
3189
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.SettingsRow, { label: "Logout", description: "Sign out of your account on this device.", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3190
|
+
ui.Button,
|
|
3191
|
+
{
|
|
3192
|
+
type: "button",
|
|
3193
|
+
variant: "secondary",
|
|
3194
|
+
size: "sm",
|
|
3195
|
+
onClick: onLogout ?? (() => setLogoutOpen(true)),
|
|
3196
|
+
className: "flex items-center gap-2",
|
|
3197
|
+
"data-testid": "logout-button",
|
|
3198
|
+
children: [
|
|
3199
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.LogOut, { className: "w-4 h-4" }),
|
|
3200
|
+
"Logout"
|
|
3201
|
+
]
|
|
3276
3202
|
}
|
|
3277
|
-
}
|
|
3278
|
-
}
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
title: `${sender} left a draft email for you to review`,
|
|
3287
|
-
target: { kind: "mail_draft", draftId, mailbox: "native" }
|
|
3288
|
-
};
|
|
3289
|
-
}
|
|
3290
|
-
const titles = {
|
|
3291
|
-
mention: `${sender} mentioned you in a conversation`,
|
|
3292
|
-
workspace_access_request: `${sender} needs workspace access to run a thread`,
|
|
3293
|
-
conversation_ready: note.sender.external_id === note.recipient.external_id ? "Your thread is ready" : `${sender}\u2019s thread is ready`,
|
|
3294
|
-
conversation_done: `${sender} marked a thread done`
|
|
3295
|
-
};
|
|
3296
|
-
const title = titles[note.type];
|
|
3297
|
-
if (!title || !note.workspace_ext_id || !note.conversation_ext_id?.match(/^con-[a-zA-Z0-9]+$/))
|
|
3298
|
-
return null;
|
|
3299
|
-
return {
|
|
3300
|
-
title,
|
|
3301
|
-
target: {
|
|
3302
|
-
kind: "conversation",
|
|
3303
|
-
workspaceId: note.workspace_ext_id,
|
|
3304
|
-
conversationId: note.conversation_ext_id,
|
|
3305
|
-
...note.message_ext_id ? { messageId: note.message_ext_id } : {}
|
|
3306
|
-
}
|
|
3307
|
-
};
|
|
3308
|
-
}
|
|
3309
|
-
function attachmentPath(accountId, messageId, attachmentId) {
|
|
3310
|
-
return `${react$1.accountPath(accountId)}/messages/${encodeURIComponent(messageId)}/attachments/${encodeURIComponent(attachmentId)}`;
|
|
3311
|
-
}
|
|
3312
|
-
function saveFile(blob, name) {
|
|
3313
|
-
const url = URL.createObjectURL(blob);
|
|
3314
|
-
const link = document.createElement("a");
|
|
3315
|
-
link.href = url;
|
|
3316
|
-
link.download = name;
|
|
3317
|
-
link.click();
|
|
3318
|
-
setTimeout(() => URL.revokeObjectURL(url), 1e3);
|
|
3319
|
-
}
|
|
3320
|
-
function hydrateMailAttachments(client$1, account, messageId, attachments, { isOnline, offline }) {
|
|
3321
|
-
return Promise.all(
|
|
3322
|
-
attachments.map(async (a) => {
|
|
3323
|
-
if (a.content_base64 != null) return a;
|
|
3324
|
-
if (!isOnline) {
|
|
3325
|
-
const file = await offline?.loadAttachment(account.id, messageId, a);
|
|
3326
|
-
return file ? { ...a, content_base64: client.bytesToBase64(new Uint8Array(await file.arrayBuffer())) } : { ...a, content_base64: null };
|
|
3203
|
+
) })
|
|
3204
|
+
] }) }),
|
|
3205
|
+
/* @__PURE__ */ jsxRuntime.jsx(ConnectedDangerZone, { renderSubscriptionLink }),
|
|
3206
|
+
!onLogout && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3207
|
+
ConnectedLogoutDialog,
|
|
3208
|
+
{
|
|
3209
|
+
open: logoutOpen,
|
|
3210
|
+
onClose: () => setLogoutOpen(false),
|
|
3211
|
+
renderSessionIcon
|
|
3327
3212
|
}
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
})
|
|
3331
|
-
);
|
|
3213
|
+
)
|
|
3214
|
+
] });
|
|
3332
3215
|
}
|
|
3333
3216
|
function ConnectedMailAccounts({
|
|
3334
3217
|
policy,
|
|
@@ -3553,6 +3436,854 @@ function ConnectedMailAccounts({
|
|
|
3553
3436
|
}
|
|
3554
3437
|
);
|
|
3555
3438
|
}
|
|
3439
|
+
var noop = () => {
|
|
3440
|
+
};
|
|
3441
|
+
function ConnectedMailSettings({ oauthReturnPath, settings }) {
|
|
3442
|
+
const { data: policy } = react$1.useMailPolicy();
|
|
3443
|
+
const accounts = react$1.useMailAccounts({ enabled: !!policy?.enabled });
|
|
3444
|
+
const { data: profile } = react$1.useProfile();
|
|
3445
|
+
if (accounts.isError) {
|
|
3446
|
+
return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: accounts.error.message });
|
|
3447
|
+
}
|
|
3448
|
+
if (!policy || !accounts.isSuccess) return /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Loading mail accounts\u2026" });
|
|
3449
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3450
|
+
ConnectedMailAccounts,
|
|
3451
|
+
{
|
|
3452
|
+
embedded: true,
|
|
3453
|
+
policy,
|
|
3454
|
+
accounts: accounts.data,
|
|
3455
|
+
user: profile && { given_name: profile.givenName, family_name: profile.familyName },
|
|
3456
|
+
oauthReturnPath,
|
|
3457
|
+
settings,
|
|
3458
|
+
onClose: noop
|
|
3459
|
+
},
|
|
3460
|
+
profile ? "named" : "unnamed"
|
|
3461
|
+
);
|
|
3462
|
+
}
|
|
3463
|
+
function ConnectedPrivacySettings({
|
|
3464
|
+
rows,
|
|
3465
|
+
showTipsReset = false
|
|
3466
|
+
}) {
|
|
3467
|
+
const { data: settings } = react$1.useUserSettings();
|
|
3468
|
+
const update = react$1.useUpdateUserSettings();
|
|
3469
|
+
const hideOnlineStatus = settings?.hide_online_status ?? false;
|
|
3470
|
+
const dismissedTips = settings?.dismissed_tips ?? [];
|
|
3471
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkU73KPFYH_cjs.SettingsPanel, { className: "max-w-2xl", children: [
|
|
3472
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.SettingsSection, { title: "Privacy and tips", children: /* @__PURE__ */ jsxRuntime.jsxs(chunkU73KPFYH_cjs.SettingsCard, { children: [
|
|
3473
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3474
|
+
chunkU73KPFYH_cjs.SettingsRow,
|
|
3475
|
+
{
|
|
3476
|
+
label: "Show Online Status",
|
|
3477
|
+
labelFor: "showOnlineStatus",
|
|
3478
|
+
description: "When on, other users can see when you're online",
|
|
3479
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3480
|
+
ui.Switch,
|
|
3481
|
+
{
|
|
3482
|
+
id: "showOnlineStatus",
|
|
3483
|
+
checked: !hideOnlineStatus,
|
|
3484
|
+
onCheckedChange: (value) => update.mutate({ hide_online_status: !value }),
|
|
3485
|
+
"data-testid": "toggle-show-online-status"
|
|
3486
|
+
}
|
|
3487
|
+
)
|
|
3488
|
+
}
|
|
3489
|
+
),
|
|
3490
|
+
rows,
|
|
3491
|
+
showTipsReset && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3492
|
+
chunkU73KPFYH_cjs.SettingsRow,
|
|
3493
|
+
{
|
|
3494
|
+
label: "Hidden tips",
|
|
3495
|
+
description: "Restore any Smart Tips you\u2019ve hidden with \u201Cdon\u2019t show again\u201D.",
|
|
3496
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3497
|
+
ui.Button,
|
|
3498
|
+
{
|
|
3499
|
+
type: "button",
|
|
3500
|
+
variant: "outline",
|
|
3501
|
+
size: "sm",
|
|
3502
|
+
onClick: () => update.mutate({ dismissed_tips: [] }),
|
|
3503
|
+
disabled: dismissedTips.length === 0,
|
|
3504
|
+
className: "gap-1.5",
|
|
3505
|
+
"data-testid": "reset-tips-button",
|
|
3506
|
+
children: [
|
|
3507
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.RotateCcw, { className: "h-4 w-4" }),
|
|
3508
|
+
"Reset tips"
|
|
3509
|
+
]
|
|
3510
|
+
}
|
|
3511
|
+
)
|
|
3512
|
+
}
|
|
3513
|
+
)
|
|
3514
|
+
] }) }),
|
|
3515
|
+
/* @__PURE__ */ jsxRuntime.jsx(ConnectedNotificationPreferences, {})
|
|
3516
|
+
] });
|
|
3517
|
+
}
|
|
3518
|
+
var PROVIDER_NAMES = {
|
|
3519
|
+
openai: "OpenAI",
|
|
3520
|
+
fireworks_ai: "Fireworks AI",
|
|
3521
|
+
"vertex_ai-language-models": "Google",
|
|
3522
|
+
vertex_ai: "Google",
|
|
3523
|
+
gemini: "Google",
|
|
3524
|
+
anthropic: "Anthropic"
|
|
3525
|
+
};
|
|
3526
|
+
var isStandard = (model) => !!model?.tags?.includes("Standard");
|
|
3527
|
+
function PremiumCostHeader() {
|
|
3528
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center gap-0.5", children: "\xA3/MT in-out" });
|
|
3529
|
+
}
|
|
3530
|
+
function cheapest(models) {
|
|
3531
|
+
return [...models].sort((a, b) => {
|
|
3532
|
+
const ao = a.output_cost_per_token;
|
|
3533
|
+
const bo = b.output_cost_per_token;
|
|
3534
|
+
if (ao == null && bo == null) return 0;
|
|
3535
|
+
if (ao == null) return 1;
|
|
3536
|
+
if (bo == null) return -1;
|
|
3537
|
+
return ao - bo;
|
|
3538
|
+
})[0];
|
|
3539
|
+
}
|
|
3540
|
+
var COLUMNS = [
|
|
3541
|
+
{
|
|
3542
|
+
colId: "model_name",
|
|
3543
|
+
headerName: "Model",
|
|
3544
|
+
field: "model_name",
|
|
3545
|
+
flex: 2,
|
|
3546
|
+
minWidth: 130,
|
|
3547
|
+
tooltipField: "model_name"
|
|
3548
|
+
},
|
|
3549
|
+
{
|
|
3550
|
+
colId: "provider",
|
|
3551
|
+
headerName: "Provider",
|
|
3552
|
+
field: "provider",
|
|
3553
|
+
flex: 1,
|
|
3554
|
+
minWidth: 120,
|
|
3555
|
+
cellRenderer: (params) => isStandard(params.data) ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3556
|
+
chunkU73KPFYH_cjs.ModelProviderLabel,
|
|
3557
|
+
{
|
|
3558
|
+
logo: /* @__PURE__ */ jsxRuntime.jsx("img", { src: "/favicon.svg", alt: "ARBI", className: "size-3.5 flex-shrink-0 rounded-sm" }),
|
|
3559
|
+
children: "ARBI CITY"
|
|
3560
|
+
}
|
|
3561
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
3562
|
+
chunkU73KPFYH_cjs.ModelProviderLabel,
|
|
3563
|
+
{
|
|
3564
|
+
logo: /* @__PURE__ */ jsxRuntime.jsx(react$1.ProviderIcon, { modelName: params.data?.model_name, provider: params.value, size: 14 }),
|
|
3565
|
+
children: PROVIDER_NAMES[params.value ?? ""] || params.value || "\u2014"
|
|
3566
|
+
}
|
|
3567
|
+
)
|
|
3568
|
+
},
|
|
3569
|
+
{
|
|
3570
|
+
// Input and output cost in one column so the table fits the panel; sorted by output cost.
|
|
3571
|
+
colId: "cost",
|
|
3572
|
+
headerName: "Cost / MTok",
|
|
3573
|
+
headerComponentParams: { innerHeaderComponent: PremiumCostHeader },
|
|
3574
|
+
headerTooltip: "\xA3 per million tokens \u2014 input then output",
|
|
3575
|
+
field: "output_cost_per_token",
|
|
3576
|
+
flex: 1,
|
|
3577
|
+
minWidth: 120,
|
|
3578
|
+
type: "rightAligned",
|
|
3579
|
+
cellRenderer: (params) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "tabular-nums", children: [
|
|
3580
|
+
react$1.formatGbpPerMillionTokens(params.data?.input_cost_per_token) ?? "\xA30",
|
|
3581
|
+
"-",
|
|
3582
|
+
react$1.formatGbpPerMillionTokens(params.data?.output_cost_per_token) ?? "\xA30"
|
|
3583
|
+
] })
|
|
3584
|
+
}
|
|
3585
|
+
];
|
|
3586
|
+
function ConnectedPremiumModels() {
|
|
3587
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
3588
|
+
const { data: settings } = react$1.useUserSettings();
|
|
3589
|
+
const update = react$1.useUpdateUserSettings();
|
|
3590
|
+
const { data: available } = react$1.useAvailableModels();
|
|
3591
|
+
const isDeveloper = settings?.developer === true;
|
|
3592
|
+
const premiumModel = settings?.premium_model;
|
|
3593
|
+
const premiumModels = react.useMemo(
|
|
3594
|
+
() => (available?.models ?? []).filter(
|
|
3595
|
+
(m) => m.tags?.includes("Premium") && (isDeveloper || !m.model_name.includes("@"))
|
|
3596
|
+
),
|
|
3597
|
+
[available, isDeveloper]
|
|
3598
|
+
);
|
|
3599
|
+
const rows = react.useMemo(() => {
|
|
3600
|
+
const standards = (available?.models ?? []).filter(isStandard);
|
|
3601
|
+
if (standards.length === 0) return premiumModels;
|
|
3602
|
+
const reference = {
|
|
3603
|
+
...standards[0],
|
|
3604
|
+
model_name: `Standard (${standards.map((m) => m.model_name).join(", ")})`
|
|
3605
|
+
};
|
|
3606
|
+
return [reference, ...premiumModels];
|
|
3607
|
+
}, [available, premiumModels]);
|
|
3608
|
+
const current = premiumModel ?? available?.premium_default ?? "";
|
|
3609
|
+
const save = react.useCallback(
|
|
3610
|
+
(model) => update.mutate(
|
|
3611
|
+
{ premium_model: model },
|
|
3612
|
+
{
|
|
3613
|
+
onError: (err) => notify(`Failed to update Premium setting: ${String(err)}`, "error")
|
|
3614
|
+
}
|
|
3615
|
+
),
|
|
3616
|
+
[update, notify]
|
|
3617
|
+
);
|
|
3618
|
+
const currentRef = react.useRef(current);
|
|
3619
|
+
currentRef.current = current;
|
|
3620
|
+
const [selected, setSelected] = react.useState([]);
|
|
3621
|
+
react.useEffect(() => {
|
|
3622
|
+
const match = premiumModels.filter((m) => m.model_name === current);
|
|
3623
|
+
setSelected(
|
|
3624
|
+
(prev) => prev.length === match.length && prev[0]?.model_name === match[0]?.model_name ? prev : match
|
|
3625
|
+
);
|
|
3626
|
+
}, [current, premiumModels]);
|
|
3627
|
+
const onSelectionChange = react.useCallback(
|
|
3628
|
+
(items) => {
|
|
3629
|
+
const picked = items.filter((m) => !isStandard(m));
|
|
3630
|
+
const next = picked[0]?.model_name;
|
|
3631
|
+
if (!next || next === currentRef.current) return;
|
|
3632
|
+
setSelected(picked);
|
|
3633
|
+
save(next);
|
|
3634
|
+
},
|
|
3635
|
+
[save]
|
|
3636
|
+
);
|
|
3637
|
+
if (premiumModels.length === 0) return null;
|
|
3638
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.SettingsPanel, { className: "max-w-2xl space-y-4", children: /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.SettingsSection, { title: "Premium models", children: /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3639
|
+
chunkU73KPFYH_cjs.PremiumModelsFrame,
|
|
3640
|
+
{
|
|
3641
|
+
enabled: premiumModel !== "",
|
|
3642
|
+
onEnabledChange: (enabled) => {
|
|
3643
|
+
const target = enabled ? cheapest(premiumModels)?.model_name : "";
|
|
3644
|
+
if (target !== void 0) save(target);
|
|
3645
|
+
},
|
|
3646
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3647
|
+
chunkC2CWWEHO_cjs.GridView,
|
|
3648
|
+
{
|
|
3649
|
+
items: rows,
|
|
3650
|
+
columnDefs: COLUMNS,
|
|
3651
|
+
getItemId: (m) => m.model_name,
|
|
3652
|
+
selection: { mode: "single", selected, onSelectionChange },
|
|
3653
|
+
gridOptions: {
|
|
3654
|
+
rowClassRules: { "opacity-60 italic": (p) => isStandard(p.data) }
|
|
3655
|
+
},
|
|
3656
|
+
height: Math.min(rows.length * 40 + 48, 320),
|
|
3657
|
+
testId: "premium-model-grid"
|
|
3658
|
+
}
|
|
3659
|
+
)
|
|
3660
|
+
}
|
|
3661
|
+
) }) }) });
|
|
3662
|
+
}
|
|
3663
|
+
var SETTINGS_SECTION_IDS = {
|
|
3664
|
+
account: "account",
|
|
3665
|
+
mail: "mail",
|
|
3666
|
+
privacy: "privacy",
|
|
3667
|
+
chat: "chat"
|
|
3668
|
+
};
|
|
3669
|
+
function accountSettingsSection(props) {
|
|
3670
|
+
return {
|
|
3671
|
+
id: SETTINGS_SECTION_IDS.account,
|
|
3672
|
+
label: "Account",
|
|
3673
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "w-6 h-6" }),
|
|
3674
|
+
render: () => /* @__PURE__ */ jsxRuntime.jsx(ConnectedAccountSettings, { ...props })
|
|
3675
|
+
};
|
|
3676
|
+
}
|
|
3677
|
+
function mailSettingsSection(props) {
|
|
3678
|
+
return {
|
|
3679
|
+
id: SETTINGS_SECTION_IDS.mail,
|
|
3680
|
+
label: "Mail",
|
|
3681
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Mail, { className: "w-6 h-6" }),
|
|
3682
|
+
render: () => /* @__PURE__ */ jsxRuntime.jsx(ConnectedMailSettings, { ...props })
|
|
3683
|
+
};
|
|
3684
|
+
}
|
|
3685
|
+
function privacySettingsSection(props) {
|
|
3686
|
+
return {
|
|
3687
|
+
id: SETTINGS_SECTION_IDS.privacy,
|
|
3688
|
+
label: "Privacy",
|
|
3689
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.HatGlasses, { className: "w-6 h-6" }),
|
|
3690
|
+
render: () => /* @__PURE__ */ jsxRuntime.jsx(ConnectedPrivacySettings, { ...props })
|
|
3691
|
+
};
|
|
3692
|
+
}
|
|
3693
|
+
function chatSettingsSection() {
|
|
3694
|
+
return {
|
|
3695
|
+
id: SETTINGS_SECTION_IDS.chat,
|
|
3696
|
+
label: "Chat",
|
|
3697
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageSquare, { className: "w-6 h-6" }),
|
|
3698
|
+
render: () => /* @__PURE__ */ jsxRuntime.jsx(ConnectedPremiumModels, {})
|
|
3699
|
+
};
|
|
3700
|
+
}
|
|
3701
|
+
var DEFAULT_SETTINGS_SECTIONS = [
|
|
3702
|
+
accountSettingsSection(),
|
|
3703
|
+
privacySettingsSection(),
|
|
3704
|
+
chatSettingsSection()
|
|
3705
|
+
];
|
|
3706
|
+
function ConnectedSettingsPage({
|
|
3707
|
+
sections = DEFAULT_SETTINGS_SECTIONS,
|
|
3708
|
+
section,
|
|
3709
|
+
onSectionChange,
|
|
3710
|
+
...page
|
|
3711
|
+
}) {
|
|
3712
|
+
const requested = chunkKPZZ5FHE_cjs.useRequestedSettingsSection();
|
|
3713
|
+
const [local, setLocal] = react.useState(requested?.section);
|
|
3714
|
+
react.useEffect(() => {
|
|
3715
|
+
if (requested) setLocal(requested.section);
|
|
3716
|
+
}, [requested]);
|
|
3717
|
+
const controlled = section !== void 0;
|
|
3718
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3719
|
+
chunkU73KPFYH_cjs.SettingsPage,
|
|
3720
|
+
{
|
|
3721
|
+
...page,
|
|
3722
|
+
sections,
|
|
3723
|
+
activeSectionId: controlled ? section : local,
|
|
3724
|
+
onSectionChange: (id) => {
|
|
3725
|
+
if (!controlled) setLocal(id);
|
|
3726
|
+
onSectionChange?.(id);
|
|
3727
|
+
}
|
|
3728
|
+
}
|
|
3729
|
+
);
|
|
3730
|
+
}
|
|
3731
|
+
function errorDetail(err) {
|
|
3732
|
+
const e = err;
|
|
3733
|
+
const detail = e?.detail ?? e?.apiError?.detail ?? e?.response?.data?.detail ?? e?.error?.detail;
|
|
3734
|
+
if (typeof detail === "string" && detail) return detail;
|
|
3735
|
+
const message = detail?.message;
|
|
3736
|
+
return typeof message === "string" && message ? message : void 0;
|
|
3737
|
+
}
|
|
3738
|
+
function errorStatus(err) {
|
|
3739
|
+
const e = err;
|
|
3740
|
+
return e?.status ?? e?.response?.status;
|
|
3741
|
+
}
|
|
3742
|
+
var workspaceWord = () => ui.getEntityLabel("WORKSPACE").toLowerCase();
|
|
3743
|
+
var inviteMessage = (emails) => `${emails.length === 1 ? `${emails[0]} isn't on the platform yet.` : `These users aren't on the platform yet:
|
|
3744
|
+
${emails.join("\n")}`}
|
|
3745
|
+
|
|
3746
|
+
Invite them by email? Once they sign up, they'll usually get access to this ${workspaceWord()} automatically \u2014 if not, they can request it themselves.`;
|
|
3747
|
+
function useConnectedWorkspaceSettings(workspaceId, { onLeft } = {}) {
|
|
3748
|
+
const { notify, confirm } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
3749
|
+
const { workspaceId: openWorkspaceId, userId } = chunkGFNELPDP_cjs.useConnectedWorkspace();
|
|
3750
|
+
const { data: workspaces } = react$1.useWorkspaces();
|
|
3751
|
+
const workspace = workspaces?.find((w) => w.external_id === workspaceId);
|
|
3752
|
+
const update = react$1.useUpdateWorkspace();
|
|
3753
|
+
const add = react$1.useAddWorkspaceMembers();
|
|
3754
|
+
const remove = react$1.useRemoveWorkspaceMembers();
|
|
3755
|
+
const members = workspace?.users ?? [];
|
|
3756
|
+
const role = members.find((m) => m.user.external_id === userId)?.role ?? null;
|
|
3757
|
+
const isOwner = role === "owner";
|
|
3758
|
+
const isMember = role !== null;
|
|
3759
|
+
const stillOpen = () => {
|
|
3760
|
+
if (!workspace) return false;
|
|
3761
|
+
if (openWorkspaceId === workspace.external_id) return true;
|
|
3762
|
+
notify(
|
|
3763
|
+
`Not saved: you switched to another ${workspaceWord()} first. Open "${workspace.name}" and try again.`,
|
|
3764
|
+
"warning"
|
|
3765
|
+
);
|
|
3766
|
+
return false;
|
|
3767
|
+
};
|
|
3768
|
+
const updateIdentity = async (data) => {
|
|
3769
|
+
if (!workspace || !stillOpen()) return;
|
|
3770
|
+
const changed = [
|
|
3771
|
+
...data.name !== workspace.name ? ["name"] : [],
|
|
3772
|
+
...data.description !== (workspace.description || "") ? ["description"] : []
|
|
3773
|
+
];
|
|
3774
|
+
try {
|
|
3775
|
+
await update.mutateAsync({ name: data.name, description: data.description });
|
|
3776
|
+
if (changed.length > 0) {
|
|
3777
|
+
notify(`${ui.getEntityLabel("WORKSPACE")} ${changed.join(", ")} updated`, "success");
|
|
3778
|
+
}
|
|
3779
|
+
} catch (err) {
|
|
3780
|
+
notify(err instanceof Error ? err.message : "Failed to update workspace", "error");
|
|
3781
|
+
throw err;
|
|
3782
|
+
}
|
|
3783
|
+
};
|
|
3784
|
+
const setPublic = async (isPublic) => {
|
|
3785
|
+
if (!workspace || !stillOpen()) return;
|
|
3786
|
+
await update.mutateAsync({ is_public: isPublic });
|
|
3787
|
+
notify(`Workspace is now ${isPublic ? "common" : "members-only"}`, "success");
|
|
3788
|
+
};
|
|
3789
|
+
const invite = async (emails, memberRole) => {
|
|
3790
|
+
try {
|
|
3791
|
+
await add.mutateAsync({ emails, role: memberRole, confirmInvite: true });
|
|
3792
|
+
notify(
|
|
3793
|
+
emails.length === 1 ? `Invitation sent to ${emails[0]}` : `Invitations sent to ${emails.length} users`,
|
|
3794
|
+
"success"
|
|
3795
|
+
);
|
|
3796
|
+
} catch (err) {
|
|
3797
|
+
const detail = errorDetail(err);
|
|
3798
|
+
notify(
|
|
3799
|
+
detail ? `Couldn't send the invitation: ${detail}` : "Failed to send the invitation.",
|
|
3800
|
+
"error"
|
|
3801
|
+
);
|
|
3802
|
+
}
|
|
3803
|
+
};
|
|
3804
|
+
const share = async (emails, memberRole = "collaborator") => {
|
|
3805
|
+
if (!workspace) return "error";
|
|
3806
|
+
const current = new Set(members.map((m) => m.user.email.toLowerCase()));
|
|
3807
|
+
try {
|
|
3808
|
+
const added = new Set(
|
|
3809
|
+
(await add.mutateAsync({ emails, role: memberRole }) ?? []).map(
|
|
3810
|
+
(m) => m.user.email.toLowerCase()
|
|
3811
|
+
)
|
|
3812
|
+
);
|
|
3813
|
+
const failed = emails.filter((email) => !added.has(email.toLowerCase()));
|
|
3814
|
+
if (failed.length === 0) return "added";
|
|
3815
|
+
const already = failed.filter((email) => current.has(email.toLowerCase()));
|
|
3816
|
+
const unknown = failed.filter((email) => !current.has(email.toLowerCase()));
|
|
3817
|
+
if (added.size > 0) {
|
|
3818
|
+
notify(`Added ${added.size} ${added.size === 1 ? "member" : "members"}`, "success");
|
|
3819
|
+
}
|
|
3820
|
+
if (already.length > 0) {
|
|
3821
|
+
notify(
|
|
3822
|
+
already.length === 1 ? `${already[0]} is already a member` : `${already.length} users are already members`,
|
|
3823
|
+
"info"
|
|
3824
|
+
);
|
|
3825
|
+
}
|
|
3826
|
+
if (unknown.length > 0 && await confirm({
|
|
3827
|
+
message: inviteMessage(unknown),
|
|
3828
|
+
title: "Invite by email?",
|
|
3829
|
+
kind: "yesno"
|
|
3830
|
+
})) {
|
|
3831
|
+
await invite(unknown, memberRole);
|
|
3832
|
+
return added.size > 0 ? "partial" : "invited";
|
|
3833
|
+
}
|
|
3834
|
+
return added.size > 0 ? "partial" : "already_member";
|
|
3835
|
+
} catch (err) {
|
|
3836
|
+
const status = errorStatus(err);
|
|
3837
|
+
const detail = errorDetail(err) || "Failed to add member to workspace";
|
|
3838
|
+
const lower = detail.toLowerCase();
|
|
3839
|
+
if (lower.includes("already has access")) return "already_member";
|
|
3840
|
+
const notRegistered = status === 404 || lower.includes("not found") || lower.includes("no user") || lower.includes("does not exist") || lower.includes("user not registered");
|
|
3841
|
+
if (notRegistered) {
|
|
3842
|
+
if (await confirm({
|
|
3843
|
+
message: inviteMessage(emails),
|
|
3844
|
+
title: "Invite by email?",
|
|
3845
|
+
kind: "yesno"
|
|
3846
|
+
})) {
|
|
3847
|
+
await invite(emails, memberRole);
|
|
3848
|
+
return "invited";
|
|
3849
|
+
}
|
|
3850
|
+
return "cancelled";
|
|
3851
|
+
}
|
|
3852
|
+
const quota = status === 402 || lower.includes("limit reached") || lower.includes("quota") || lower.includes("upgrade");
|
|
3853
|
+
if (!quota) notify(detail, "error");
|
|
3854
|
+
return "error";
|
|
3855
|
+
}
|
|
3856
|
+
};
|
|
3857
|
+
const removeMember = async (userExtId, email, name) => {
|
|
3858
|
+
if (!workspace || !isOwner) return;
|
|
3859
|
+
const ok = await confirm({
|
|
3860
|
+
message: `Remove ${name} (${email}) from the "${workspace.name}" ${ui.getEntityLabel("WORKSPACE")}?
|
|
3861
|
+
|
|
3862
|
+
Note that ${ui.getEntityLabel("WORKSPACEUSER", "PLURAL").toLowerCase()} may have saved private content in the workspace that you cannot see. If you remove them from the ${workspaceWord()} they will immediately lose access to any content in the ${workspaceWord()}.`,
|
|
3863
|
+
title: `Remove ${ui.getEntityLabel("WORKSPACEUSER")}`
|
|
3864
|
+
});
|
|
3865
|
+
if (!ok) return;
|
|
3866
|
+
try {
|
|
3867
|
+
await remove.mutateAsync([userExtId]);
|
|
3868
|
+
notify(`Successfully removed ${name} from workspace`, "success");
|
|
3869
|
+
} catch {
|
|
3870
|
+
notify(`Failed to remove ${name} from workspace`, "error");
|
|
3871
|
+
}
|
|
3872
|
+
};
|
|
3873
|
+
const leave = async () => {
|
|
3874
|
+
if (!workspace || !userId || isOwner) return;
|
|
3875
|
+
const name = workspace.name;
|
|
3876
|
+
const ok = await confirm({
|
|
3877
|
+
message: `Are you sure you want to leave the "${name}" ${ui.getEntityLabel("WORKSPACE")}?
|
|
3878
|
+
|
|
3879
|
+
You will lose access to all content in this ${workspaceWord()}.`,
|
|
3880
|
+
title: "Leave Workspace"
|
|
3881
|
+
});
|
|
3882
|
+
if (!ok) return;
|
|
3883
|
+
try {
|
|
3884
|
+
await remove.mutateAsync([userId]);
|
|
3885
|
+
onLeft?.();
|
|
3886
|
+
notify(`Successfully left ${name}`, "success");
|
|
3887
|
+
} catch {
|
|
3888
|
+
notify("Failed to leave workspace", "error");
|
|
3889
|
+
}
|
|
3890
|
+
};
|
|
3891
|
+
return {
|
|
3892
|
+
workspace,
|
|
3893
|
+
members,
|
|
3894
|
+
role,
|
|
3895
|
+
isOwner,
|
|
3896
|
+
isMember,
|
|
3897
|
+
updateIdentity,
|
|
3898
|
+
setPublic,
|
|
3899
|
+
share,
|
|
3900
|
+
removeMember,
|
|
3901
|
+
leave,
|
|
3902
|
+
isSharing: add.isPending,
|
|
3903
|
+
isRemoving: remove.isPending
|
|
3904
|
+
};
|
|
3905
|
+
}
|
|
3906
|
+
var isAgentMember = (member) => member.user.external_id.startsWith("agt-");
|
|
3907
|
+
var memberName = (member) => member.user.family_name ? `${member.user.given_name} ${member.user.family_name}` : member.user.given_name;
|
|
3908
|
+
function ConnectedWorkspaceSettings({
|
|
3909
|
+
workspaceId,
|
|
3910
|
+
project,
|
|
3911
|
+
projectLine,
|
|
3912
|
+
membersTable,
|
|
3913
|
+
shareDialog,
|
|
3914
|
+
children,
|
|
3915
|
+
onExport,
|
|
3916
|
+
onOpenActivity,
|
|
3917
|
+
onLeft,
|
|
3918
|
+
testId = "workspace-settings-page"
|
|
3919
|
+
}) {
|
|
3920
|
+
const settings = useConnectedWorkspaceSettings(workspaceId, { onLeft });
|
|
3921
|
+
const { workspace, members, isOwner, isMember } = settings;
|
|
3922
|
+
const { data: userSettings } = react$1.useUserSettings();
|
|
3923
|
+
const isDeveloper = userSettings?.developer === true;
|
|
3924
|
+
const showAgents = userSettings?.show_agent_sessions ?? false;
|
|
3925
|
+
const visibleMembers = react.useMemo(
|
|
3926
|
+
() => showAgents ? members : members.filter((m) => !isAgentMember(m)),
|
|
3927
|
+
[members, showAgents]
|
|
3928
|
+
);
|
|
3929
|
+
const [membersExpanded, setMembersExpanded] = react.useState(false);
|
|
3930
|
+
const [shareOpen, setShareOpen] = react.useState(false);
|
|
3931
|
+
if (!workspace) {
|
|
3932
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkRXK3XP62_cjs.PageLoading, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkC3CGJK7A_cjs.LoadingIndicator, { message: "Loading workspace..." }) });
|
|
3933
|
+
}
|
|
3934
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3935
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkRXK3XP62_cjs.WorkspacePageFrame, { testId, children: [
|
|
3936
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkRXK3XP62_cjs.WorkspaceIdentityPanel, { children: [
|
|
3937
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3938
|
+
chunkC3CGJK7A_cjs.EntityIdentityBar,
|
|
3939
|
+
{
|
|
3940
|
+
testId: "workspace-identity-bar",
|
|
3941
|
+
canEdit: isOwner,
|
|
3942
|
+
actions: isMember ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3943
|
+
ConnectedWorkspaceNotificationMenu,
|
|
3944
|
+
{
|
|
3945
|
+
workspaceId: workspace.external_id,
|
|
3946
|
+
onOpenActivity,
|
|
3947
|
+
testId: "workspace-home-notification-menu"
|
|
3948
|
+
}
|
|
3949
|
+
) : void 0,
|
|
3950
|
+
fields: [
|
|
3951
|
+
{
|
|
3952
|
+
label: "Name",
|
|
3953
|
+
value: workspace.name,
|
|
3954
|
+
placeholder: "Untitled",
|
|
3955
|
+
maxLength: chunkC3CGJK7A_cjs.IDENTITY_NAME_MAX_LENGTH,
|
|
3956
|
+
valueClassName: "truncate text-base font-semibold",
|
|
3957
|
+
testId: "workspace-home-title",
|
|
3958
|
+
hideLabel: true,
|
|
3959
|
+
leading: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3960
|
+
chunkV46W7YLI_cjs.WorkspaceIdentity,
|
|
3961
|
+
{
|
|
3962
|
+
workspace: {
|
|
3963
|
+
...react$1.toShellWorkspace(workspace),
|
|
3964
|
+
projectLine: projectLine?.(workspace)
|
|
3965
|
+
},
|
|
3966
|
+
expanded: false
|
|
3967
|
+
}
|
|
3968
|
+
),
|
|
3969
|
+
trailing: project && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3970
|
+
chunkRXK3XP62_cjs.WorkspaceProjectSlot,
|
|
3971
|
+
{
|
|
3972
|
+
testId: "workspace-home-project",
|
|
3973
|
+
caption: `${ui.getEntityLabel("PROJECT")}:`,
|
|
3974
|
+
children: project({ workspace, isOwner })
|
|
3975
|
+
}
|
|
3976
|
+
),
|
|
3977
|
+
// Both fields go up together: the endpoint takes the pair.
|
|
3978
|
+
onSave: (name) => settings.updateIdentity({ name, description: workspace.description ?? "" })
|
|
3979
|
+
},
|
|
3980
|
+
{
|
|
3981
|
+
label: "Description",
|
|
3982
|
+
value: workspace.description ?? "",
|
|
3983
|
+
placeholder: "No description",
|
|
3984
|
+
multiline: true,
|
|
3985
|
+
valueClassName: "line-clamp-2 text-sm text-muted-foreground",
|
|
3986
|
+
testId: "workspace-home-description",
|
|
3987
|
+
hideLabel: true,
|
|
3988
|
+
trailing: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3989
|
+
chunkRXK3XP62_cjs.WorkspaceAudienceLine,
|
|
3990
|
+
{
|
|
3991
|
+
visibility: {
|
|
3992
|
+
testId: "workspace-home-visibility",
|
|
3993
|
+
caption: "Visibility:",
|
|
3994
|
+
toggle: isOwner && isDeveloper ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3995
|
+
chunkRXK3XP62_cjs.CommonWorkspaceToggle,
|
|
3996
|
+
{
|
|
3997
|
+
isCommon: workspace.is_public ?? false,
|
|
3998
|
+
onToggle: (value) => void settings.setPublic(value),
|
|
3999
|
+
"data-testid": "workspace-visibility-toggle"
|
|
4000
|
+
}
|
|
4001
|
+
) : void 0,
|
|
4002
|
+
stateText: workspace.is_public ? "Common \u2014 everyone on this deployment" : "Members only",
|
|
4003
|
+
stateHelp: workspace.is_public ? "Everyone on this deployment can see its files, not only its members." : "Only members of this workspace can see its files."
|
|
4004
|
+
},
|
|
4005
|
+
members: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4006
|
+
chunkXAJIKT6Y_cjs.MemberAvatarStack,
|
|
4007
|
+
{
|
|
4008
|
+
members: visibleMembers.map((m) => ({
|
|
4009
|
+
name: memberName(m),
|
|
4010
|
+
picture: m.user.picture
|
|
4011
|
+
})),
|
|
4012
|
+
total: visibleMembers.length,
|
|
4013
|
+
expanded: membersExpanded,
|
|
4014
|
+
onClick: () => setMembersExpanded((open) => !open),
|
|
4015
|
+
testId: "workspace-home-members-toggle"
|
|
4016
|
+
}
|
|
4017
|
+
),
|
|
4018
|
+
share: isOwner && shareDialog ? {
|
|
4019
|
+
label: "Share",
|
|
4020
|
+
onClick: () => setShareOpen(true),
|
|
4021
|
+
testId: "workspace-quick-add-member"
|
|
4022
|
+
} : void 0
|
|
4023
|
+
}
|
|
4024
|
+
),
|
|
4025
|
+
onSave: (description) => settings.updateIdentity({ name: workspace.name, description })
|
|
4026
|
+
}
|
|
4027
|
+
]
|
|
4028
|
+
}
|
|
4029
|
+
),
|
|
4030
|
+
isMember && membersTable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4031
|
+
chunkRXK3XP62_cjs.ExpandableSection,
|
|
4032
|
+
{
|
|
4033
|
+
expanded: membersExpanded,
|
|
4034
|
+
testId: "workspace-settings-members-section",
|
|
4035
|
+
children: membersTable({
|
|
4036
|
+
workspace,
|
|
4037
|
+
members: visibleMembers,
|
|
4038
|
+
onRemove: settings.removeMember,
|
|
4039
|
+
isRemoving: settings.isRemoving
|
|
4040
|
+
})
|
|
4041
|
+
}
|
|
4042
|
+
)
|
|
4043
|
+
] }),
|
|
4044
|
+
children,
|
|
4045
|
+
isMember && onExport && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end px-4 pb-4", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4046
|
+
ui.Button,
|
|
4047
|
+
{
|
|
4048
|
+
variant: "outline",
|
|
4049
|
+
size: "sm",
|
|
4050
|
+
onClick: onExport,
|
|
4051
|
+
"data-testid": "workspace-transfer-button",
|
|
4052
|
+
children: [
|
|
4053
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.FolderInput, { className: "size-4" }),
|
|
4054
|
+
"Export, copy or move\u2026"
|
|
4055
|
+
]
|
|
4056
|
+
}
|
|
4057
|
+
) }),
|
|
4058
|
+
!isOwner && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4059
|
+
chunkRXK3XP62_cjs.LeaveFooter,
|
|
4060
|
+
{
|
|
4061
|
+
testId: "workspace-settings-footer",
|
|
4062
|
+
leave: {
|
|
4063
|
+
testId: "workspace-leave-button",
|
|
4064
|
+
label: settings.isRemoving ? "Leaving\u2026" : `Leave ${ui.getEntityLabel("WORKSPACE").toLowerCase()}`,
|
|
4065
|
+
disabled: settings.isRemoving,
|
|
4066
|
+
onClick: () => void settings.leave()
|
|
4067
|
+
}
|
|
4068
|
+
}
|
|
4069
|
+
)
|
|
4070
|
+
] }),
|
|
4071
|
+
isOwner && shareDialog?.({
|
|
4072
|
+
open: shareOpen,
|
|
4073
|
+
onOpenChange: setShareOpen,
|
|
4074
|
+
workspace,
|
|
4075
|
+
members: visibleMembers,
|
|
4076
|
+
onShare: settings.share,
|
|
4077
|
+
isSharing: settings.isSharing
|
|
4078
|
+
})
|
|
4079
|
+
] });
|
|
4080
|
+
}
|
|
4081
|
+
function useConnectedDocxNotifications(onOpen) {
|
|
4082
|
+
const arbi = react$1.useArbi();
|
|
4083
|
+
const { status, user, apiUrl } = chunkGFNELPDP_cjs.useConnection();
|
|
4084
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
4085
|
+
const queries = reactQuery.useQueryClient();
|
|
4086
|
+
const source = `docx-mentions:${apiUrl}:${user?.externalId || ""}`;
|
|
4087
|
+
const queryKey = ["docx-mentions", apiUrl, user?.externalId];
|
|
4088
|
+
const { data = [] } = reactQuery.useQuery({
|
|
4089
|
+
queryKey,
|
|
4090
|
+
queryFn: () => arbi.notifications.list({ type: "docx_mention" }),
|
|
4091
|
+
enabled: status === "authenticated",
|
|
4092
|
+
refetchInterval: 3e4
|
|
4093
|
+
});
|
|
4094
|
+
react$1.useArbiWebSocket((message) => {
|
|
4095
|
+
if (message.type === "docx_mention") void queries.invalidateQueries({ queryKey });
|
|
4096
|
+
});
|
|
4097
|
+
react.useEffect(() => {
|
|
4098
|
+
const items = [];
|
|
4099
|
+
if (status === "authenticated")
|
|
4100
|
+
for (const note of data) {
|
|
4101
|
+
if (note.recipient.external_id !== user?.externalId || !note.workspace_ext_id) continue;
|
|
4102
|
+
try {
|
|
4103
|
+
const target = JSON.parse(note.content || "{}");
|
|
4104
|
+
if (!target.document_id?.startsWith("doc-") || !target.comment_id) continue;
|
|
4105
|
+
const documentId = target.document_id, commentId = target.comment_id, workspaceId = note.workspace_ext_id;
|
|
4106
|
+
items.push({
|
|
4107
|
+
id: `docx:${note.external_id}`,
|
|
4108
|
+
title: "Mentioned you in a document comment",
|
|
4109
|
+
description: [note.sender.given_name, note.sender.family_name].filter(Boolean).join(" "),
|
|
4110
|
+
variant: "info",
|
|
4111
|
+
ts: Date.parse(note.created_at),
|
|
4112
|
+
read: note.read,
|
|
4113
|
+
source,
|
|
4114
|
+
onSelect: () => {
|
|
4115
|
+
void Promise.resolve(onOpen({ documentId, commentId, workspaceId })).catch(
|
|
4116
|
+
(error) => notify(
|
|
4117
|
+
error instanceof Error ? error.message : "Could not open the document.",
|
|
4118
|
+
"error"
|
|
4119
|
+
)
|
|
4120
|
+
);
|
|
4121
|
+
}
|
|
4122
|
+
});
|
|
4123
|
+
} catch {
|
|
4124
|
+
}
|
|
4125
|
+
}
|
|
4126
|
+
shell.useNotify.getState().syncSource(source, items);
|
|
4127
|
+
return () => shell.useNotify.getState().syncSource(source, []);
|
|
4128
|
+
}, [data, status, user?.externalId, source, onOpen, notify]);
|
|
4129
|
+
const markRead = async (ids) => {
|
|
4130
|
+
try {
|
|
4131
|
+
await arbi.notifications.markRead(ids);
|
|
4132
|
+
await queries.invalidateQueries({ queryKey });
|
|
4133
|
+
} catch {
|
|
4134
|
+
notify("Could not mark document mentions read.", "error");
|
|
4135
|
+
}
|
|
4136
|
+
};
|
|
4137
|
+
return {
|
|
4138
|
+
onMarkRead: (id) => {
|
|
4139
|
+
if (id.startsWith("docx:")) void markRead([id.slice(5)]);
|
|
4140
|
+
},
|
|
4141
|
+
onMarkAllRead: () => {
|
|
4142
|
+
void markRead(
|
|
4143
|
+
data.filter((note) => !note.read && note.recipient.external_id === user?.externalId).map((note) => note.external_id)
|
|
4144
|
+
);
|
|
4145
|
+
}
|
|
4146
|
+
};
|
|
4147
|
+
}
|
|
4148
|
+
function useConnectedWorkNotifications(onOpen) {
|
|
4149
|
+
const { status, user, apiUrl } = chunkGFNELPDP_cjs.useConnection();
|
|
4150
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
4151
|
+
const source = `work-notifications:${apiUrl}:${user?.externalId || ""}`;
|
|
4152
|
+
const { data = [], markRead: persistRead } = react$1.useWorkNotifications({
|
|
4153
|
+
apiUrl,
|
|
4154
|
+
userId: user?.externalId,
|
|
4155
|
+
enabled: status === "authenticated"
|
|
4156
|
+
});
|
|
4157
|
+
react.useEffect(() => {
|
|
4158
|
+
const items = [];
|
|
4159
|
+
if (status === "authenticated")
|
|
4160
|
+
for (const note of data) {
|
|
4161
|
+
if (note.recipient.external_id !== user?.externalId) continue;
|
|
4162
|
+
const mapped = mapWorkNotification(note);
|
|
4163
|
+
if (!mapped) continue;
|
|
4164
|
+
items.push({
|
|
4165
|
+
id: `work:${note.external_id}`,
|
|
4166
|
+
title: mapped.title,
|
|
4167
|
+
variant: note.type === "workflow_failed" ? "error" : note.type === "conversation_done" ? "success" : "info",
|
|
4168
|
+
ts: Date.parse(note.created_at),
|
|
4169
|
+
read: note.read,
|
|
4170
|
+
source,
|
|
4171
|
+
onSelect: () => {
|
|
4172
|
+
void Promise.resolve().then(() => onOpen(mapped.target)).catch(
|
|
4173
|
+
(error) => notify(
|
|
4174
|
+
error instanceof Error ? error.message : "Could not open this notification.",
|
|
4175
|
+
"error"
|
|
4176
|
+
)
|
|
4177
|
+
);
|
|
4178
|
+
}
|
|
4179
|
+
});
|
|
4180
|
+
}
|
|
4181
|
+
shell.useNotify.getState().syncSource(source, items);
|
|
4182
|
+
return () => shell.useNotify.getState().syncSource(source, []);
|
|
4183
|
+
}, [data, status, user?.externalId, source, onOpen, notify]);
|
|
4184
|
+
const markRead = async (ids) => {
|
|
4185
|
+
if (!ids.length) return;
|
|
4186
|
+
try {
|
|
4187
|
+
await persistRead(ids);
|
|
4188
|
+
} catch {
|
|
4189
|
+
notify("Could not mark work notifications read.", "error");
|
|
4190
|
+
}
|
|
4191
|
+
};
|
|
4192
|
+
return {
|
|
4193
|
+
onMarkRead: (id) => {
|
|
4194
|
+
if (data.some(
|
|
4195
|
+
(note) => `work:${note.external_id}` === id && note.recipient.external_id === user?.externalId && mapWorkNotification(note)
|
|
4196
|
+
))
|
|
4197
|
+
void markRead([id.slice(5)]);
|
|
4198
|
+
},
|
|
4199
|
+
onMarkAllRead: () => {
|
|
4200
|
+
void markRead(
|
|
4201
|
+
data.filter(
|
|
4202
|
+
(note) => !note.read && note.recipient.external_id === user?.externalId && mapWorkNotification(note)
|
|
4203
|
+
).map((note) => note.external_id)
|
|
4204
|
+
);
|
|
4205
|
+
}
|
|
4206
|
+
};
|
|
4207
|
+
}
|
|
4208
|
+
function mapWorkNotification(note) {
|
|
4209
|
+
const sender = [note.sender.given_name, note.sender.family_name].filter(Boolean).join(" ") || note.sender.email;
|
|
4210
|
+
if (note.type === "workflow_failed") {
|
|
4211
|
+
try {
|
|
4212
|
+
const payload = JSON.parse(note.content || "{}");
|
|
4213
|
+
if (!payload.workflow_ext_id?.match(/^wfl-[a-zA-Z0-9]+$/)) return null;
|
|
4214
|
+
if (note.workspace_ext_id?.match(/^wrk-[a-zA-Z0-9]+$/) && note.conversation_ext_id?.match(/^con-[a-zA-Z0-9]+$/)) {
|
|
4215
|
+
return {
|
|
4216
|
+
title: "A workflow failed to run",
|
|
4217
|
+
target: {
|
|
4218
|
+
kind: "conversation",
|
|
4219
|
+
workspaceId: note.workspace_ext_id,
|
|
4220
|
+
conversationId: note.conversation_ext_id
|
|
4221
|
+
}
|
|
4222
|
+
};
|
|
4223
|
+
}
|
|
4224
|
+
return {
|
|
4225
|
+
title: "A workflow failed to run",
|
|
4226
|
+
target: {
|
|
4227
|
+
kind: "workflow",
|
|
4228
|
+
workflowId: payload.workflow_ext_id,
|
|
4229
|
+
workspaceId: note.workspace_ext_id || void 0
|
|
4230
|
+
}
|
|
4231
|
+
};
|
|
4232
|
+
} catch {
|
|
4233
|
+
return null;
|
|
4234
|
+
}
|
|
4235
|
+
}
|
|
4236
|
+
if (note.type === "mail_draft_ready") {
|
|
4237
|
+
const draftId = react$1.mailDraftIdFromContent(note.content);
|
|
4238
|
+
if (!draftId) return null;
|
|
4239
|
+
return {
|
|
4240
|
+
title: `${sender} left a draft email for you to review`,
|
|
4241
|
+
target: { kind: "mail_draft", draftId, mailbox: "native" }
|
|
4242
|
+
};
|
|
4243
|
+
}
|
|
4244
|
+
const titles = {
|
|
4245
|
+
mention: `${sender} mentioned you in a conversation`,
|
|
4246
|
+
workspace_access_request: `${sender} needs workspace access to run a thread`,
|
|
4247
|
+
conversation_ready: note.sender.external_id === note.recipient.external_id ? "Your thread is ready" : `${sender}\u2019s thread is ready`,
|
|
4248
|
+
conversation_done: `${sender} marked a thread done`
|
|
4249
|
+
};
|
|
4250
|
+
const title = titles[note.type];
|
|
4251
|
+
if (!title || !note.workspace_ext_id || !note.conversation_ext_id?.match(/^con-[a-zA-Z0-9]+$/))
|
|
4252
|
+
return null;
|
|
4253
|
+
return {
|
|
4254
|
+
title,
|
|
4255
|
+
target: {
|
|
4256
|
+
kind: "conversation",
|
|
4257
|
+
workspaceId: note.workspace_ext_id,
|
|
4258
|
+
conversationId: note.conversation_ext_id,
|
|
4259
|
+
...note.message_ext_id ? { messageId: note.message_ext_id } : {}
|
|
4260
|
+
}
|
|
4261
|
+
};
|
|
4262
|
+
}
|
|
4263
|
+
function attachmentPath(accountId, messageId, attachmentId) {
|
|
4264
|
+
return `${react$1.accountPath(accountId)}/messages/${encodeURIComponent(messageId)}/attachments/${encodeURIComponent(attachmentId)}`;
|
|
4265
|
+
}
|
|
4266
|
+
function saveFile(blob, name) {
|
|
4267
|
+
const url = URL.createObjectURL(blob);
|
|
4268
|
+
const link = document.createElement("a");
|
|
4269
|
+
link.href = url;
|
|
4270
|
+
link.download = name;
|
|
4271
|
+
link.click();
|
|
4272
|
+
setTimeout(() => URL.revokeObjectURL(url), 1e3);
|
|
4273
|
+
}
|
|
4274
|
+
function hydrateMailAttachments(client$1, account, messageId, attachments, { isOnline, offline }) {
|
|
4275
|
+
return Promise.all(
|
|
4276
|
+
attachments.map(async (a) => {
|
|
4277
|
+
if (a.content_base64 != null) return a;
|
|
4278
|
+
if (!isOnline) {
|
|
4279
|
+
const file = await offline?.loadAttachment(account.id, messageId, a);
|
|
4280
|
+
return file ? { ...a, content_base64: client.bytesToBase64(new Uint8Array(await file.arrayBuffer())) } : { ...a, content_base64: null };
|
|
4281
|
+
}
|
|
4282
|
+
const response = await client$1.fetch(attachmentPath(account.id, messageId, a.id));
|
|
4283
|
+
return react$1.fileAttachment(new File([await response.blob()], a.name, { type: a.content_type }));
|
|
4284
|
+
})
|
|
4285
|
+
);
|
|
4286
|
+
}
|
|
3556
4287
|
var sessionRooms = /* @__PURE__ */ new Map();
|
|
3557
4288
|
function useWordBody({
|
|
3558
4289
|
word,
|
|
@@ -3672,7 +4403,7 @@ function MailComposerForm({
|
|
|
3672
4403
|
headerSlot
|
|
3673
4404
|
}) {
|
|
3674
4405
|
const { client } = react$1.useMailClient();
|
|
3675
|
-
const { notify, confirm } =
|
|
4406
|
+
const { notify, confirm } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
3676
4407
|
const [to, setTo] = react.useState(initial.to.map((r) => r.email).join("; "));
|
|
3677
4408
|
const [cc, setCc] = react.useState(initial.cc.map((r) => r.email).join("; "));
|
|
3678
4409
|
const [showCc, setShowCc] = react.useState(initial.cc.length > 0);
|
|
@@ -4520,7 +5251,7 @@ function ConnectedMailbox({
|
|
|
4520
5251
|
onGridStateChange,
|
|
4521
5252
|
initialMessageId = null
|
|
4522
5253
|
}) {
|
|
4523
|
-
const { notify } =
|
|
5254
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
4524
5255
|
const cache = react$1.useMailCache();
|
|
4525
5256
|
const { client } = react$1.useMailClient();
|
|
4526
5257
|
const [savingToWorkspace, setSavingToWorkspace] = react.useState(false);
|
|
@@ -5195,7 +5926,7 @@ function SubscribeDialog({
|
|
|
5195
5926
|
timeZone,
|
|
5196
5927
|
onClose
|
|
5197
5928
|
}) {
|
|
5198
|
-
const { notify } =
|
|
5929
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
5199
5930
|
const subscribe = react$1.useSubscribeCalendar();
|
|
5200
5931
|
const [url, setUrl] = react.useState("");
|
|
5201
5932
|
const [name, setName] = react.useState("");
|
|
@@ -5290,7 +6021,7 @@ function SubscribeDialog({
|
|
|
5290
6021
|
}
|
|
5291
6022
|
function HolidaysDialog({ open, onClose }) {
|
|
5292
6023
|
const { data: countries = [], isLoading } = react$1.useHolidayCountries(open);
|
|
5293
|
-
const { notify } =
|
|
6024
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
5294
6025
|
const add = react$1.useAddHolidayCalendar();
|
|
5295
6026
|
const [country, setCountry] = react.useState("");
|
|
5296
6027
|
const [subdivision, setSubdivision] = react.useState("");
|
|
@@ -5413,7 +6144,7 @@ function StatusBadge({ account }) {
|
|
|
5413
6144
|
);
|
|
5414
6145
|
}
|
|
5415
6146
|
function AccountRow({ account }) {
|
|
5416
|
-
const { notify } =
|
|
6147
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
5417
6148
|
const startOAuth = react$1.useStartCalendarAccountOAuth();
|
|
5418
6149
|
const sync = react$1.useSyncCalendarAccount();
|
|
5419
6150
|
const update = react$1.useUpdateCalendarAccount();
|
|
@@ -5531,7 +6262,7 @@ function AccountRow({ account }) {
|
|
|
5531
6262
|
);
|
|
5532
6263
|
}
|
|
5533
6264
|
function CalDavForm({ onDone }) {
|
|
5534
|
-
const { notify } =
|
|
6265
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
5535
6266
|
const { data: profiles = [] } = react$1.useCalDavProfiles();
|
|
5536
6267
|
const connect = react$1.useConnectCalDavAccount();
|
|
5537
6268
|
const [profileId, setProfileId] = react.useState("");
|
|
@@ -5647,7 +6378,7 @@ function CalDavForm({ onDone }) {
|
|
|
5647
6378
|
);
|
|
5648
6379
|
}
|
|
5649
6380
|
function CalendarAccountsPanel({ className }) {
|
|
5650
|
-
const { notify } =
|
|
6381
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
5651
6382
|
const { connectors } = react$1.useCalendarSupport();
|
|
5652
6383
|
const startOAuth = react$1.useStartCalendarAccountOAuth();
|
|
5653
6384
|
const { data: accounts = [], isLoading, error } = react$1.useCalendarAccounts();
|
|
@@ -5734,7 +6465,7 @@ function CalendarAccountsPanel({ className }) {
|
|
|
5734
6465
|
|
|
5735
6466
|
// src/connection/calendar/copy.ts
|
|
5736
6467
|
function useCalendarCopy() {
|
|
5737
|
-
const copy =
|
|
6468
|
+
const copy = chunkXVUOMWMD_cjs.useCopyText({ copyFailed: "Could not copy. Select the text and copy it manually." });
|
|
5738
6469
|
return (value, what = "Copied") => copy(value, `${what} to clipboard`);
|
|
5739
6470
|
}
|
|
5740
6471
|
function CopyField({ label, value, mono = true, testId, className }) {
|
|
@@ -5783,7 +6514,7 @@ function calendarNames(ids, calendars) {
|
|
|
5783
6514
|
return names.length ? names.join(", ") : `${ids.length} calendar${ids.length === 1 ? "" : "s"}`;
|
|
5784
6515
|
}
|
|
5785
6516
|
function RevokeButton({ row }) {
|
|
5786
|
-
const { notify } =
|
|
6517
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
5787
6518
|
const revoke = react$1.useRevokeAppPassword();
|
|
5788
6519
|
const [confirming, setConfirming] = react.useState(false);
|
|
5789
6520
|
if (!confirming)
|
|
@@ -6102,7 +6833,7 @@ function summarizeWeekly(page) {
|
|
|
6102
6833
|
return days.map((d) => chunk6YTHQ73P_cjs.WEEKDAY_NAMES[d]?.slice(0, 3)).join(", ");
|
|
6103
6834
|
}
|
|
6104
6835
|
function BookingPageForm({ page, defaultTimeZone, onDone }) {
|
|
6105
|
-
const { notify } =
|
|
6836
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
6106
6837
|
const copyText = useCalendarCopy();
|
|
6107
6838
|
const [form, setForm] = react.useState(
|
|
6108
6839
|
() => page ? chunk6YTHQ73P_cjs.bookingToForm(page) : chunk6YTHQ73P_cjs.emptyBookingForm(defaultTimeZone)
|
|
@@ -6285,7 +7016,7 @@ function BookingPageForm({ page, defaultTimeZone, onDone }) {
|
|
|
6285
7016
|
);
|
|
6286
7017
|
}
|
|
6287
7018
|
function BookingPagesPanel({ defaultTimeZone, className }) {
|
|
6288
|
-
const { notify } =
|
|
7019
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
6289
7020
|
const copyText = useCalendarCopy();
|
|
6290
7021
|
const { data: pages = [], isLoading, error } = react$1.useBookingPages();
|
|
6291
7022
|
const { data: settings } = react$1.useCalendarSettings(!defaultTimeZone);
|
|
@@ -6395,7 +7126,7 @@ function BookingPagesPanel({ defaultTimeZone, className }) {
|
|
|
6395
7126
|
}
|
|
6396
7127
|
var selectClass5 = "h-9 w-full rounded-md border border-input bg-background px-2 text-sm text-foreground shadow-sm";
|
|
6397
7128
|
function CreateRoomForm({ zone, onDone }) {
|
|
6398
|
-
const { notify } =
|
|
7129
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
6399
7130
|
const create2 = react$1.useCreateRoom();
|
|
6400
7131
|
const [name, setName] = react.useState("");
|
|
6401
7132
|
const [type, setType] = react.useState("room");
|
|
@@ -6725,7 +7456,7 @@ function CalendarSettingsDialog({
|
|
|
6725
7456
|
initialTab = "general",
|
|
6726
7457
|
onClose
|
|
6727
7458
|
}) {
|
|
6728
|
-
const { notify } =
|
|
7459
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
6729
7460
|
const save = react$1.useSaveCalendarSettings();
|
|
6730
7461
|
const [value, setValue] = react.useState(() => chunk6YTHQ73P_cjs.toSettingsValue(settings));
|
|
6731
7462
|
const [tab, setTab] = react.useState(initialTab);
|
|
@@ -6798,7 +7529,7 @@ function EventScheduling({
|
|
|
6798
7529
|
workingStartHour = 7
|
|
6799
7530
|
}) {
|
|
6800
7531
|
const [open, setOpen] = react.useState(false);
|
|
6801
|
-
const { notify } =
|
|
7532
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
6802
7533
|
const arbi = react$1.useArbi();
|
|
6803
7534
|
const me = arbi.isLoggedIn ? arbi.user.identity()?.email ?? null : null;
|
|
6804
7535
|
const allDay = chunk6YTHQ73P_cjs.isAllDayDraft(draft);
|
|
@@ -7039,7 +7770,7 @@ function proposed(inv, zone) {
|
|
|
7039
7770
|
return `${chunkBIXHB4LV_cjs.formatInZone(su, zone, { weekday: "short", day: "numeric", month: "short", hour: "numeric", minute: "2-digit" })} \u2013 ${chunkBIXHB4LV_cjs.formatInZone(eu, zone, { hour: "numeric", minute: "2-digit" })}`;
|
|
7040
7771
|
}
|
|
7041
7772
|
function InvitationsPanel({ timeZone, onOpenEvent }) {
|
|
7042
|
-
const { notify } =
|
|
7773
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
7043
7774
|
const { data: items = [], refetch } = react$1.useCalendarInvitations();
|
|
7044
7775
|
const respond = react$1.useRespondToEvent();
|
|
7045
7776
|
const decide = react$1.useDecideCounter();
|
|
@@ -7226,7 +7957,7 @@ function PublishCalendarDialog({
|
|
|
7226
7957
|
onClose,
|
|
7227
7958
|
onConnectAccount
|
|
7228
7959
|
}) {
|
|
7229
|
-
const { notify } =
|
|
7960
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
7230
7961
|
const { data: accounts = [], isLoading } = react$1.useCalendarAccounts(!!calendarId);
|
|
7231
7962
|
const publish = react$1.usePublishCalendar();
|
|
7232
7963
|
const [accountId, setAccountId] = react.useState("");
|
|
@@ -7303,7 +8034,7 @@ function ShareCalendarDialog({
|
|
|
7303
8034
|
calendarName,
|
|
7304
8035
|
onClose
|
|
7305
8036
|
}) {
|
|
7306
|
-
const { notify } =
|
|
8037
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
7307
8038
|
const { data: shares = [], isLoading } = react$1.useCalendarShares(calendarId);
|
|
7308
8039
|
const share = react$1.useShareCalendar();
|
|
7309
8040
|
const unshare = react$1.useUnshareCalendar();
|
|
@@ -7607,7 +8338,7 @@ function ConnectedCalendar({
|
|
|
7607
8338
|
onOpenOverlay,
|
|
7608
8339
|
syncAccountsOnOpen = true
|
|
7609
8340
|
} = {}) {
|
|
7610
|
-
const { confirm, notify, openConversation } =
|
|
8341
|
+
const { confirm, notify, openConversation } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
7611
8342
|
const arbi = react$1.useArbi();
|
|
7612
8343
|
const fetchEvent = react$1.useFetchCalendarEvent();
|
|
7613
8344
|
const notifyError = (prefix, err) => notify(`${prefix}: ${errorText3(err)}`, "error");
|
|
@@ -8360,7 +9091,7 @@ function ConnectedMailInviteCard({
|
|
|
8360
9091
|
isOnline,
|
|
8361
9092
|
onOpenEvent
|
|
8362
9093
|
}) {
|
|
8363
|
-
const { notify } =
|
|
9094
|
+
const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
|
|
8364
9095
|
const part = attachments.find(chunk6YTHQ73P_cjs.isCalendarAttachment);
|
|
8365
9096
|
const { data: settings } = react$1.useCalendarSettings(!!part);
|
|
8366
9097
|
const zone = chunkBIXHB4LV_cjs.safeZone(settings?.time_zone, chunkBIXHB4LV_cjs.detectTimeZone());
|
|
@@ -8491,7 +9222,7 @@ function Shell({ children, wide = false }) {
|
|
|
8491
9222
|
) });
|
|
8492
9223
|
}
|
|
8493
9224
|
function CancelView({ slug, token }) {
|
|
8494
|
-
const { apiBaseUrl } =
|
|
9225
|
+
const { apiBaseUrl } = chunkKPZZ5FHE_cjs.useBlocksEnvironment().runtimeConfig;
|
|
8495
9226
|
const [state, setState] = react.useState("idle");
|
|
8496
9227
|
const [error, setError] = react.useState(null);
|
|
8497
9228
|
return /* @__PURE__ */ jsxRuntime.jsx(Shell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-4", "data-testid": "book-cancel", children: [
|
|
@@ -8569,7 +9300,7 @@ function Confirmation({
|
|
|
8569
9300
|
] }) });
|
|
8570
9301
|
}
|
|
8571
9302
|
function ConnectedPublicBooking({ slug, cancelToken }) {
|
|
8572
|
-
const { apiBaseUrl } =
|
|
9303
|
+
const { apiBaseUrl } = chunkKPZZ5FHE_cjs.useBlocksEnvironment().runtimeConfig;
|
|
8573
9304
|
const [zone, setZone] = react.useState(chunkBIXHB4LV_cjs.detectTimeZone);
|
|
8574
9305
|
const [duration, setDuration] = react.useState(void 0);
|
|
8575
9306
|
const [offset, setOffset] = react.useState(0);
|
|
@@ -8927,59 +9658,59 @@ Object.defineProperty(exports, "useWorkspaceDocs", {
|
|
|
8927
9658
|
});
|
|
8928
9659
|
Object.defineProperty(exports, "ConnectedWorkflowDocumentsField", {
|
|
8929
9660
|
enumerable: true,
|
|
8930
|
-
get: function () { return
|
|
9661
|
+
get: function () { return chunkMFMASSEO_cjs.ConnectedWorkflowDocumentsField; }
|
|
8931
9662
|
});
|
|
8932
9663
|
Object.defineProperty(exports, "ConnectedWorkflowLauncher", {
|
|
8933
9664
|
enumerable: true,
|
|
8934
|
-
get: function () { return
|
|
9665
|
+
get: function () { return chunkMFMASSEO_cjs.ConnectedWorkflowLauncher; }
|
|
8935
9666
|
});
|
|
8936
9667
|
Object.defineProperty(exports, "ConnectedWorkflowsTable", {
|
|
8937
9668
|
enumerable: true,
|
|
8938
|
-
get: function () { return
|
|
9669
|
+
get: function () { return chunkMFMASSEO_cjs.ConnectedWorkflowsTable; }
|
|
8939
9670
|
});
|
|
8940
9671
|
Object.defineProperty(exports, "DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS", {
|
|
8941
9672
|
enumerable: true,
|
|
8942
|
-
get: function () { return
|
|
9673
|
+
get: function () { return chunkMFMASSEO_cjs.DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS; }
|
|
8943
9674
|
});
|
|
8944
9675
|
Object.defineProperty(exports, "NativeDocxSupportProvider", {
|
|
8945
9676
|
enumerable: true,
|
|
8946
|
-
get: function () { return
|
|
9677
|
+
get: function () { return chunkMFMASSEO_cjs.NativeDocxSupportProvider; }
|
|
8947
9678
|
});
|
|
8948
9679
|
Object.defineProperty(exports, "toWorkflowFieldDocument", {
|
|
8949
9680
|
enumerable: true,
|
|
8950
|
-
get: function () { return
|
|
9681
|
+
get: function () { return chunkMFMASSEO_cjs.toWorkflowFieldDocument; }
|
|
8951
9682
|
});
|
|
8952
9683
|
Object.defineProperty(exports, "useConnectedAgentOptions", {
|
|
8953
9684
|
enumerable: true,
|
|
8954
|
-
get: function () { return
|
|
9685
|
+
get: function () { return chunkMFMASSEO_cjs.useConnectedAgentOptions; }
|
|
8955
9686
|
});
|
|
8956
9687
|
Object.defineProperty(exports, "useConnectedWorkflowScopeSource", {
|
|
8957
9688
|
enumerable: true,
|
|
8958
|
-
get: function () { return
|
|
9689
|
+
get: function () { return chunkMFMASSEO_cjs.useConnectedWorkflowScopeSource; }
|
|
8959
9690
|
});
|
|
8960
9691
|
Object.defineProperty(exports, "useConnectedWorkspaceRole", {
|
|
8961
9692
|
enumerable: true,
|
|
8962
|
-
get: function () { return
|
|
9693
|
+
get: function () { return chunkMFMASSEO_cjs.useConnectedWorkspaceRole; }
|
|
8963
9694
|
});
|
|
8964
9695
|
Object.defineProperty(exports, "useNativeDocxSupport", {
|
|
8965
9696
|
enumerable: true,
|
|
8966
|
-
get: function () { return
|
|
9697
|
+
get: function () { return chunkMFMASSEO_cjs.useNativeDocxSupport; }
|
|
8967
9698
|
});
|
|
8968
9699
|
Object.defineProperty(exports, "ConnectedWorkspaceDataProvider", {
|
|
8969
9700
|
enumerable: true,
|
|
8970
|
-
get: function () { return
|
|
9701
|
+
get: function () { return chunkGAYMJWTC_cjs.ConnectedWorkspaceDataProvider; }
|
|
8971
9702
|
});
|
|
8972
9703
|
Object.defineProperty(exports, "useConnectedConversations", {
|
|
8973
9704
|
enumerable: true,
|
|
8974
|
-
get: function () { return
|
|
9705
|
+
get: function () { return chunkGAYMJWTC_cjs.useConnectedConversations; }
|
|
8975
9706
|
});
|
|
8976
9707
|
Object.defineProperty(exports, "useConnectedDocuments", {
|
|
8977
9708
|
enumerable: true,
|
|
8978
|
-
get: function () { return
|
|
9709
|
+
get: function () { return chunkGAYMJWTC_cjs.useConnectedDocuments; }
|
|
8979
9710
|
});
|
|
8980
9711
|
Object.defineProperty(exports, "useConnectedTags", {
|
|
8981
9712
|
enumerable: true,
|
|
8982
|
-
get: function () { return
|
|
9713
|
+
get: function () { return chunkGAYMJWTC_cjs.useConnectedTags; }
|
|
8983
9714
|
});
|
|
8984
9715
|
Object.defineProperty(exports, "ConnectionProvider", {
|
|
8985
9716
|
enumerable: true,
|
|
@@ -9002,6 +9733,7 @@ Object.defineProperty(exports, "useConnection", {
|
|
|
9002
9733
|
get: function () { return chunkGFNELPDP_cjs.useConnection; }
|
|
9003
9734
|
});
|
|
9004
9735
|
exports.ArbiAppProvider = ArbiAppProvider;
|
|
9736
|
+
exports.ConnectedAccountSettings = ConnectedAccountSettings;
|
|
9005
9737
|
exports.ConnectedAgentChatPanel = ConnectedAgentChatPanel;
|
|
9006
9738
|
exports.ConnectedAgentCreator = ConnectedAgentCreator;
|
|
9007
9739
|
exports.ConnectedCalendar = ConnectedCalendar;
|
|
@@ -9012,16 +9744,20 @@ exports.ConnectedMailAccounts = ConnectedMailAccounts;
|
|
|
9012
9744
|
exports.ConnectedMailComposer = ConnectedMailComposer;
|
|
9013
9745
|
exports.ConnectedMailInviteCard = ConnectedMailInviteCard;
|
|
9014
9746
|
exports.ConnectedMailMessage = ConnectedMailMessage;
|
|
9747
|
+
exports.ConnectedMailSettings = ConnectedMailSettings;
|
|
9015
9748
|
exports.ConnectedMailSetup = ConnectedMailSetup;
|
|
9016
9749
|
exports.ConnectedMailbox = ConnectedMailbox;
|
|
9017
9750
|
exports.ConnectedNotificationCenter = ConnectedNotificationCenter;
|
|
9018
9751
|
exports.ConnectedNotificationPreferences = ConnectedNotificationPreferences;
|
|
9019
9752
|
exports.ConnectedPasswordChangeDialog = ConnectedPasswordChangeDialog;
|
|
9753
|
+
exports.ConnectedPremiumModels = ConnectedPremiumModels;
|
|
9754
|
+
exports.ConnectedPrivacySettings = ConnectedPrivacySettings;
|
|
9020
9755
|
exports.ConnectedProfileCard = ConnectedProfileCard;
|
|
9021
9756
|
exports.ConnectedPublicBooking = ConnectedPublicBooking;
|
|
9022
9757
|
exports.ConnectedRequireVerified = ConnectedRequireVerified;
|
|
9023
9758
|
exports.ConnectedSecuritySection = ConnectedSecuritySection;
|
|
9024
9759
|
exports.ConnectedSessionsRow = ConnectedSessionsRow;
|
|
9760
|
+
exports.ConnectedSettingsPage = ConnectedSettingsPage;
|
|
9025
9761
|
exports.ConnectedSkillUpload = ConnectedSkillUpload;
|
|
9026
9762
|
exports.ConnectedSkillsLibrary = ConnectedSkillsLibrary;
|
|
9027
9763
|
exports.ConnectedTagTable = ConnectedTagTable;
|
|
@@ -9033,18 +9769,27 @@ exports.ConnectedWorkflowHistory = ConnectedWorkflowHistory;
|
|
|
9033
9769
|
exports.ConnectedWorkflowRunner = ConnectedWorkflowRunner;
|
|
9034
9770
|
exports.ConnectedWorkspaceActivity = ConnectedWorkspaceActivity;
|
|
9035
9771
|
exports.ConnectedWorkspaceNotificationMenu = ConnectedWorkspaceNotificationMenu;
|
|
9772
|
+
exports.ConnectedWorkspaceSettings = ConnectedWorkspaceSettings;
|
|
9036
9773
|
exports.DEFAULT_CONNECTED_SKILL_UPLOAD_LABELS = DEFAULT_CONNECTED_SKILL_UPLOAD_LABELS;
|
|
9037
9774
|
exports.DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS = DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS;
|
|
9775
|
+
exports.DEFAULT_SETTINGS_SECTIONS = DEFAULT_SETTINGS_SECTIONS;
|
|
9038
9776
|
exports.NotificationCenter = NotificationCenter;
|
|
9039
9777
|
exports.NotificationEvent = NotificationEvent;
|
|
9778
|
+
exports.SETTINGS_SECTION_IDS = SETTINGS_SECTION_IDS;
|
|
9779
|
+
exports.SessionStatusIcon = SessionStatusIcon;
|
|
9040
9780
|
exports.StreamedArtifact = StreamedArtifact;
|
|
9041
9781
|
exports.WorkflowRunThread = WorkflowRunThread;
|
|
9782
|
+
exports.accountSettingsSection = accountSettingsSection;
|
|
9042
9783
|
exports.bookingCancelLink = bookingCancelLink;
|
|
9043
9784
|
exports.buildNotificationCenterItems = buildNotificationCenterItems;
|
|
9785
|
+
exports.chatSettingsSection = chatSettingsSection;
|
|
9044
9786
|
exports.countNotificationTypes = countNotificationTypes;
|
|
9045
9787
|
exports.defaultUnmetPasswordRequirement = defaultUnmetPasswordRequirement;
|
|
9046
9788
|
exports.filterNotificationCenterItems = filterNotificationCenterItems;
|
|
9789
|
+
exports.mailSettingsSection = mailSettingsSection;
|
|
9047
9790
|
exports.openMeetingLink = openMeetingLink;
|
|
9791
|
+
exports.privacySettingsSection = privacySettingsSection;
|
|
9792
|
+
exports.renderSessionStatusIcon = renderSessionStatusIcon;
|
|
9048
9793
|
exports.requestCalendarComposer = requestCalendarComposer;
|
|
9049
9794
|
exports.requestCalendarEvent = requestCalendarEvent;
|
|
9050
9795
|
exports.resolveMailbox = resolveMailbox;
|
|
@@ -9052,6 +9797,7 @@ exports.useCalendarViewStore = useCalendarViewStore;
|
|
|
9052
9797
|
exports.useConnectedDocxNotifications = useConnectedDocxNotifications;
|
|
9053
9798
|
exports.useConnectedShellWorkspaces = useConnectedShellWorkspaces;
|
|
9054
9799
|
exports.useConnectedWorkNotifications = useConnectedWorkNotifications;
|
|
9800
|
+
exports.useConnectedWorkspaceSettings = useConnectedWorkspaceSettings;
|
|
9055
9801
|
exports.workflowRunView = workflowRunView;
|
|
9056
9802
|
//# sourceMappingURL=index.cjs.map
|
|
9057
9803
|
//# sourceMappingURL=index.cjs.map
|