@arbidocs/blocks 0.4.156 → 0.4.158
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/{ConnectedNativeDocxComparison-S25BPUH5.cjs → ConnectedNativeDocxComparison-64RDIFEI.cjs} +8 -8
- package/dist/{ConnectedNativeDocxComparison-S25BPUH5.cjs.map → ConnectedNativeDocxComparison-64RDIFEI.cjs.map} +1 -1
- package/dist/{ConnectedNativeDocxComparison-2PLOOXSH.js → ConnectedNativeDocxComparison-JOWYEINS.js} +7 -7
- package/dist/{ConnectedNativeDocxComparison-2PLOOXSH.js.map → ConnectedNativeDocxComparison-JOWYEINS.js.map} +1 -1
- package/dist/{ConnectedNativeDocxEditor-JJAGMHZC.js → ConnectedNativeDocxEditor-OT5DLWCM.js} +6 -6
- package/dist/{ConnectedNativeDocxEditor-JJAGMHZC.js.map → ConnectedNativeDocxEditor-OT5DLWCM.js.map} +1 -1
- package/dist/{ConnectedNativeDocxEditor-YA4HWLY4.cjs → ConnectedNativeDocxEditor-UAAICR4X.cjs} +8 -8
- package/dist/{ConnectedNativeDocxEditor-YA4HWLY4.cjs.map → ConnectedNativeDocxEditor-UAAICR4X.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-EXYZAU4Y.cjs → ConnectedStreamedWordArtifact-AJXPNTT3.cjs} +8 -8
- package/dist/ConnectedStreamedWordArtifact-AJXPNTT3.cjs.map +1 -0
- package/dist/{ConnectedStreamedWordArtifact-YAAXY5KY.js → ConnectedStreamedWordArtifact-GYBCBAJZ.js} +7 -7
- package/dist/{ConnectedStreamedWordArtifact-YAAXY5KY.js.map → ConnectedStreamedWordArtifact-GYBCBAJZ.js.map} +1 -1
- package/dist/{WorkspaceTableView-ZFMAYHUD.cjs → WorkspaceTableView-CZEFIAVT.cjs} +22 -13
- package/dist/WorkspaceTableView-CZEFIAVT.cjs.map +1 -0
- package/dist/{WorkspaceTableView-5OWX53R5.js → WorkspaceTableView-FQPJQWUE.js} +20 -11
- package/dist/WorkspaceTableView-FQPJQWUE.js.map +1 -0
- package/dist/agents/index.cjs +239 -239
- package/dist/agents/index.js +5 -5
- package/dist/calls/index.cjs +3 -3
- package/dist/calls/index.js +2 -2
- package/dist/{chunk-6HG56GCT.js → chunk-2DQHFJNP.js} +6 -6
- package/dist/{chunk-6HG56GCT.js.map → chunk-2DQHFJNP.js.map} +1 -1
- package/dist/{chunk-6HMCF4AJ.js → chunk-7KWUQQIB.js} +1033 -5
- package/dist/chunk-7KWUQQIB.js.map +1 -0
- package/dist/{chunk-O3FB62T5.cjs → chunk-AUDUNQO6.cjs} +49 -49
- package/dist/{chunk-O3FB62T5.cjs.map → chunk-AUDUNQO6.cjs.map} +1 -1
- package/dist/{chunk-OTU5KGQ6.cjs → chunk-DVIQWBDM.cjs} +4 -4
- package/dist/{chunk-OTU5KGQ6.cjs.map → chunk-DVIQWBDM.cjs.map} +1 -1
- package/dist/{chunk-VHJHY7TT.js → chunk-ECERC6TI.js} +3 -3
- package/dist/{chunk-VHJHY7TT.js.map → chunk-ECERC6TI.js.map} +1 -1
- package/dist/{chunk-HDJRSCRE.cjs → chunk-FBSIWJSG.cjs} +5 -5
- package/dist/{chunk-HDJRSCRE.cjs.map → chunk-FBSIWJSG.cjs.map} +1 -1
- package/dist/{chunk-W7CWGURO.js → chunk-FGI3YFQH.js} +7 -686
- package/dist/chunk-FGI3YFQH.js.map +1 -0
- package/dist/{chunk-WV4TD2HZ.cjs → chunk-FWIBFGUQ.cjs} +1055 -2
- package/dist/chunk-FWIBFGUQ.cjs.map +1 -0
- package/dist/{chunk-7HHYMDPE.js → chunk-GDRLM2EX.js} +3 -3
- package/dist/{chunk-7HHYMDPE.js.map → chunk-GDRLM2EX.js.map} +1 -1
- package/dist/{chunk-S74QMZVZ.cjs → chunk-GWGUZ5X6.cjs} +4 -4
- package/dist/{chunk-S74QMZVZ.cjs.map → chunk-GWGUZ5X6.cjs.map} +1 -1
- package/dist/{chunk-FEGXFABZ.cjs → chunk-LY37J3AC.cjs} +3 -3
- package/dist/{chunk-FEGXFABZ.cjs.map → chunk-LY37J3AC.cjs.map} +1 -1
- package/dist/{chunk-SN2GZ4ZM.cjs → chunk-NFI46I77.cjs} +3 -3
- package/dist/{chunk-SN2GZ4ZM.cjs.map → chunk-NFI46I77.cjs.map} +1 -1
- package/dist/{chunk-PGOSIJ2I.js → chunk-P6FMKXAB.js} +3 -3
- package/dist/{chunk-PGOSIJ2I.js.map → chunk-P6FMKXAB.js.map} +1 -1
- package/dist/{chunk-IJEISII2.cjs → chunk-RJUXSXBH.cjs} +3 -3
- package/dist/{chunk-IJEISII2.cjs.map → chunk-RJUXSXBH.cjs.map} +1 -1
- package/dist/{chunk-53RCZPMR.cjs → chunk-SCK3GAE5.cjs} +5 -5
- package/dist/{chunk-53RCZPMR.cjs.map → chunk-SCK3GAE5.cjs.map} +1 -1
- package/dist/{chunk-UKT3WH5Z.cjs → chunk-TAWPVD6C.cjs} +3 -3
- package/dist/{chunk-UKT3WH5Z.cjs.map → chunk-TAWPVD6C.cjs.map} +1 -1
- package/dist/{chunk-MUDEL7UL.cjs → chunk-UYC5BJCB.cjs} +5 -704
- package/dist/chunk-UYC5BJCB.cjs.map +1 -0
- package/dist/{chunk-2CWM2CFZ.js → chunk-V3HG3LK3.js} +3 -3
- package/dist/{chunk-2CWM2CFZ.js.map → chunk-V3HG3LK3.js.map} +1 -1
- package/dist/{chunk-UPMADXDU.js → chunk-VE6S6NRQ.js} +3 -3
- package/dist/{chunk-UPMADXDU.js.map → chunk-VE6S6NRQ.js.map} +1 -1
- package/dist/{chunk-UKCCV63X.js → chunk-VMFLWFXK.js} +3 -3
- package/dist/{chunk-UKCCV63X.js.map → chunk-VMFLWFXK.js.map} +1 -1
- package/dist/{chunk-HP2C4MD3.js → chunk-Y73X65FF.js} +3 -3
- package/dist/{chunk-HP2C4MD3.js.map → chunk-Y73X65FF.js.map} +1 -1
- package/dist/{chunk-F3EZDBDJ.js → chunk-Y7PPQ7UT.js} +3 -3
- package/dist/{chunk-F3EZDBDJ.js.map → chunk-Y7PPQ7UT.js.map} +1 -1
- package/dist/{chunk-DWZXSPMB.cjs → chunk-ZAVEMQ37.cjs} +3 -3
- package/dist/{chunk-DWZXSPMB.cjs.map → chunk-ZAVEMQ37.cjs.map} +1 -1
- package/dist/{chunk-YMQDDUKW.js → chunk-ZO7PJMCO.js} +3 -3
- package/dist/{chunk-YMQDDUKW.js.map → chunk-ZO7PJMCO.js.map} +1 -1
- package/dist/collaboration/index.cjs +1 -1
- package/dist/collaboration/index.js +1 -1
- package/dist/connect/docx.cjs +10 -10
- package/dist/connect/docx.js +6 -6
- package/dist/connect/index.cjs +1136 -556
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +639 -64
- package/dist/connect/index.js.map +1 -1
- package/dist/connect/viewer.cjs +48 -48
- package/dist/connect/viewer.js +10 -10
- package/dist/connection/files/index.d.ts +5 -0
- package/dist/connection/files/support.d.ts +2 -0
- package/dist/connection/files/upload/AddFromAccountsButton.d.ts +16 -0
- package/dist/connection/files/upload/ConnectedUpload.d.ts +36 -0
- package/dist/connection/files/upload/ConnectedUploadDropzone.d.ts +36 -0
- package/dist/connection/files/upload/EmptyWorkspaceUpload.d.ts +13 -0
- package/dist/connection/files/upload/useAddFromUrls.d.ts +13 -0
- package/dist/connection/workspace-list/ConnectedWorkspaceList.d.ts +4 -2
- package/dist/connection/workspace-list/WorkspaceCardsView.d.ts +3 -2
- package/dist/connection/workspace-list/WorkspaceTableView.d.ts +3 -2
- package/dist/connection/workspace-list/index.d.ts +1 -1
- package/dist/connection/workspace-list/useConnectedWorkspaceList.d.ts +19 -0
- package/dist/connection/workspace-list/workspaceTable.d.ts +3 -1
- package/dist/connection/workspace-settings/ConnectedWorkspaceSettings.d.ts +3 -1
- package/dist/facts/index.cjs +55 -55
- package/dist/facts/index.js +5 -5
- package/dist/files/PrivacyExplainerModal.d.ts +8 -0
- package/dist/files/ShareToggle.d.ts +8 -0
- package/dist/files/UrlInputDialog.d.ts +24 -0
- package/dist/files/index.cjs +314 -294
- package/dist/files/index.d.ts +4 -0
- package/dist/files/index.js +6 -6
- package/dist/files/media-preview.d.ts +24 -0
- package/dist/home/index.cjs +2 -2
- package/dist/home/index.js +2 -2
- package/dist/index.cjs +434 -434
- package/dist/index.js +11 -11
- package/dist/retrieval/index.cjs +1 -1
- package/dist/retrieval/index.js +1 -1
- package/dist/settings/index.cjs +165 -165
- package/dist/settings/index.js +3 -3
- package/dist/shell/index.cjs +3 -3
- package/dist/shell/index.js +3 -3
- package/dist/studio/index.cjs +2 -2
- package/dist/studio/index.js +2 -2
- package/dist/workflow-canvas/index.cjs +17 -17
- package/dist/workflow-canvas/index.js +5 -5
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/ConnectedStreamedWordArtifact-EXYZAU4Y.cjs.map +0 -1
- package/dist/WorkspaceTableView-5OWX53R5.js.map +0 -1
- package/dist/WorkspaceTableView-ZFMAYHUD.cjs.map +0 -1
- package/dist/chunk-6HMCF4AJ.js.map +0 -1
- package/dist/chunk-MUDEL7UL.cjs.map +0 -1
- package/dist/chunk-W7CWGURO.js.map +0 -1
- package/dist/chunk-WV4TD2HZ.cjs.map +0 -1
package/dist/connect/index.cjs
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkSCK3GAE5_cjs = require('../chunk-SCK3GAE5.cjs');
|
|
5
5
|
var chunkMSFQDELO_cjs = require('../chunk-MSFQDELO.cjs');
|
|
6
6
|
var chunkJUUOJP7I_cjs = require('../chunk-JUUOJP7I.cjs');
|
|
7
7
|
var chunkOOU4QLRK_cjs = require('../chunk-OOU4QLRK.cjs');
|
|
8
8
|
var chunkOU3RGQFX_cjs = require('../chunk-OU3RGQFX.cjs');
|
|
9
9
|
require('../chunk-REH7PX3N.cjs');
|
|
10
|
-
var
|
|
10
|
+
var chunkTAWPVD6C_cjs = require('../chunk-TAWPVD6C.cjs');
|
|
11
|
+
var chunkNFI46I77_cjs = require('../chunk-NFI46I77.cjs');
|
|
11
12
|
var chunkKBO75NLM_cjs = require('../chunk-KBO75NLM.cjs');
|
|
12
|
-
var
|
|
13
|
+
var chunkRJUXSXBH_cjs = require('../chunk-RJUXSXBH.cjs');
|
|
13
14
|
var chunk6I6CVX5G_cjs = require('../chunk-6I6CVX5G.cjs');
|
|
14
15
|
var chunkCB4TIDEX_cjs = require('../chunk-CB4TIDEX.cjs');
|
|
15
16
|
var chunkFM3IRQJW_cjs = require('../chunk-FM3IRQJW.cjs');
|
|
16
17
|
var chunkJH6JTI76_cjs = require('../chunk-JH6JTI76.cjs');
|
|
17
18
|
require('../chunk-464YPRAE.cjs');
|
|
18
19
|
require('../chunk-JSQEAPTC.cjs');
|
|
19
|
-
var chunkUKT3WH5Z_cjs = require('../chunk-UKT3WH5Z.cjs');
|
|
20
20
|
var chunk5FYU7ZIU_cjs = require('../chunk-5FYU7ZIU.cjs');
|
|
21
|
-
var
|
|
22
|
-
require('../chunk-223D4727.cjs');
|
|
21
|
+
var chunkFWIBFGUQ_cjs = require('../chunk-FWIBFGUQ.cjs');
|
|
23
22
|
var chunk2WLXQGWC_cjs = require('../chunk-2WLXQGWC.cjs');
|
|
24
|
-
|
|
23
|
+
require('../chunk-223D4727.cjs');
|
|
24
|
+
var chunkFBSIWJSG_cjs = require('../chunk-FBSIWJSG.cjs');
|
|
25
25
|
var chunkXAJIKT6Y_cjs = require('../chunk-XAJIKT6Y.cjs');
|
|
26
|
-
require('../chunk-D54JXTPG.cjs');
|
|
27
26
|
var chunkGOWXP5KT_cjs = require('../chunk-GOWXP5KT.cjs');
|
|
27
|
+
var chunk4RPBUMHB_cjs = require('../chunk-4RPBUMHB.cjs');
|
|
28
28
|
var chunkQZTNTP75_cjs = require('../chunk-QZTNTP75.cjs');
|
|
29
29
|
require('../chunk-PCB2BPN3.cjs');
|
|
30
30
|
require('../chunk-NWNVWO6L.cjs');
|
|
31
|
+
var chunkVPPX5XUF_cjs = require('../chunk-VPPX5XUF.cjs');
|
|
31
32
|
var chunkCROGFB46_cjs = require('../chunk-CROGFB46.cjs');
|
|
32
33
|
require('../chunk-7G2LJMUG.cjs');
|
|
33
34
|
var chunkV46W7YLI_cjs = require('../chunk-V46W7YLI.cjs');
|
|
34
35
|
var chunkLJJJ6CYH_cjs = require('../chunk-LJJJ6CYH.cjs');
|
|
36
|
+
require('../chunk-D54JXTPG.cjs');
|
|
35
37
|
var chunkQT3A4PFC_cjs = require('../chunk-QT3A4PFC.cjs');
|
|
36
|
-
var chunk4RPBUMHB_cjs = require('../chunk-4RPBUMHB.cjs');
|
|
37
|
-
var chunkVPPX5XUF_cjs = require('../chunk-VPPX5XUF.cjs');
|
|
38
38
|
var chunkRC25WMVB_cjs = require('../chunk-RC25WMVB.cjs');
|
|
39
39
|
require('../chunk-FAXXN7KI.cjs');
|
|
40
|
-
var
|
|
40
|
+
var chunkLY37J3AC_cjs = require('../chunk-LY37J3AC.cjs');
|
|
41
41
|
var chunkRFIBUWLF_cjs = require('../chunk-RFIBUWLF.cjs');
|
|
42
42
|
var chunkYBJ4QGNH_cjs = require('../chunk-YBJ4QGNH.cjs');
|
|
43
43
|
var chunkOALEDG67_cjs = require('../chunk-OALEDG67.cjs');
|
|
@@ -46,14 +46,19 @@ require('../chunk-ZW6FPIFC.cjs');
|
|
|
46
46
|
require('../chunk-AHDJXIUB.cjs');
|
|
47
47
|
require('../chunk-SIB6C7P7.cjs');
|
|
48
48
|
require('../chunk-DVUZTGVL.cjs');
|
|
49
|
-
require('../chunk-3VULDTNL.cjs');
|
|
50
49
|
var chunkV4ISCZJ7_cjs = require('../chunk-V4ISCZJ7.cjs');
|
|
51
50
|
var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
|
|
51
|
+
require('../chunk-3VULDTNL.cjs');
|
|
52
52
|
var chunkC2CWWEHO_cjs = require('../chunk-C2CWWEHO.cjs');
|
|
53
53
|
var chunkQVBZESYQ_cjs = require('../chunk-QVBZESYQ.cjs');
|
|
54
54
|
require('../chunk-ADOKTJHV.cjs');
|
|
55
|
-
var
|
|
55
|
+
var chunkZAVEMQ37_cjs = require('../chunk-ZAVEMQ37.cjs');
|
|
56
56
|
var chunk7RGLTF76_cjs = require('../chunk-7RGLTF76.cjs');
|
|
57
|
+
var chunkLLYZGH3L_cjs = require('../chunk-LLYZGH3L.cjs');
|
|
58
|
+
var chunkBIXHB4LV_cjs = require('../chunk-BIXHB4LV.cjs');
|
|
59
|
+
var chunkQ7CQYYZW_cjs = require('../chunk-Q7CQYYZW.cjs');
|
|
60
|
+
var chunkCNHUJRQ4_cjs = require('../chunk-CNHUJRQ4.cjs');
|
|
61
|
+
var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
|
|
57
62
|
var chunk5A2QQAF5_cjs = require('../chunk-5A2QQAF5.cjs');
|
|
58
63
|
require('../chunk-B6MVQCXW.cjs');
|
|
59
64
|
var chunkJKB7WT7L_cjs = require('../chunk-JKB7WT7L.cjs');
|
|
@@ -64,11 +69,6 @@ require('../chunk-32HW2Q33.cjs');
|
|
|
64
69
|
var chunkFX3K6LNZ_cjs = require('../chunk-FX3K6LNZ.cjs');
|
|
65
70
|
require('../chunk-PPCATBOY.cjs');
|
|
66
71
|
require('../chunk-MHVNT4J3.cjs');
|
|
67
|
-
var chunkLLYZGH3L_cjs = require('../chunk-LLYZGH3L.cjs');
|
|
68
|
-
var chunkBIXHB4LV_cjs = require('../chunk-BIXHB4LV.cjs');
|
|
69
|
-
var chunkQ7CQYYZW_cjs = require('../chunk-Q7CQYYZW.cjs');
|
|
70
|
-
var chunkCNHUJRQ4_cjs = require('../chunk-CNHUJRQ4.cjs');
|
|
71
|
-
var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
|
|
72
72
|
var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
|
|
73
73
|
require('../chunk-DES3K4SD.cjs');
|
|
74
74
|
var react = require('react');
|
|
@@ -164,7 +164,7 @@ function ConnectedWorkspaceActivity({
|
|
|
164
164
|
[feed.data]
|
|
165
165
|
);
|
|
166
166
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
167
|
-
|
|
167
|
+
chunkFBSIWJSG_cjs.WorkspaceActivityList,
|
|
168
168
|
{
|
|
169
169
|
...listProps,
|
|
170
170
|
items,
|
|
@@ -592,7 +592,7 @@ function NotificationCenter({
|
|
|
592
592
|
}
|
|
593
593
|
];
|
|
594
594
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-full bg-background", "data-testid": "notifications-page", children: [
|
|
595
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
595
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.DraggableHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
596
596
|
chunk7RGLTF76_cjs.TabHeader,
|
|
597
597
|
{
|
|
598
598
|
tabs,
|
|
@@ -842,7 +842,7 @@ function ConnectedWorkspaceNotificationMenu({
|
|
|
842
842
|
}, [error, notify14]);
|
|
843
843
|
if (!workspaceId) return null;
|
|
844
844
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
845
|
-
|
|
845
|
+
chunkFBSIWJSG_cjs.WorkspaceNotificationMenu,
|
|
846
846
|
{
|
|
847
847
|
...menuProps,
|
|
848
848
|
level,
|
|
@@ -861,7 +861,7 @@ function ConnectedThreadFollow({
|
|
|
861
861
|
enabled: live
|
|
862
862
|
});
|
|
863
863
|
if (!conversationId) return null;
|
|
864
|
-
const Control = as === "menu-item" ?
|
|
864
|
+
const Control = as === "menu-item" ? chunkFBSIWJSG_cjs.ThreadFollowMenuItem : chunkFBSIWJSG_cjs.ThreadFollowButton;
|
|
865
865
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
866
866
|
Control,
|
|
867
867
|
{
|
|
@@ -934,7 +934,7 @@ function ConnectedSkillUpload({ onDone, labels, className }) {
|
|
|
934
934
|
onChange: (e) => {
|
|
935
935
|
const file = e.target.files?.[0];
|
|
936
936
|
e.target.value = "";
|
|
937
|
-
if (file) void add(() =>
|
|
937
|
+
if (file) void add(() => chunkLY37J3AC_cjs.importSkillFile(file));
|
|
938
938
|
}
|
|
939
939
|
}
|
|
940
940
|
),
|
|
@@ -959,7 +959,7 @@ function ConnectedSkillUpload({ onDone, labels, className }) {
|
|
|
959
959
|
className: "space-y-2",
|
|
960
960
|
onSubmit: (e) => {
|
|
961
961
|
e.preventDefault();
|
|
962
|
-
if (url.trim()) void add(() =>
|
|
962
|
+
if (url.trim()) void add(() => chunkLY37J3AC_cjs.importSkillFromUrl(url));
|
|
963
963
|
},
|
|
964
964
|
children: [
|
|
965
965
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "skills-add-url", children: l.fromLink }),
|
|
@@ -1023,9 +1023,9 @@ function ConnectedSkillsLibrary({
|
|
|
1023
1023
|
const [type, setType] = react.useState("all");
|
|
1024
1024
|
const [view, setView] = react.useState("gallery");
|
|
1025
1025
|
const [isBusy, setIsBusy] = react.useState(false);
|
|
1026
|
-
const all = react.useMemo(() =>
|
|
1026
|
+
const all = react.useMemo(() => chunkLY37J3AC_cjs.buildLibrarySkills(builtins, listings ?? []), [builtins, listings]);
|
|
1027
1027
|
const shown = react.useMemo(
|
|
1028
|
-
() =>
|
|
1028
|
+
() => chunkLY37J3AC_cjs.filterLibrarySkills(all, { query, source, type }),
|
|
1029
1029
|
[all, query, source, type]
|
|
1030
1030
|
);
|
|
1031
1031
|
const current = all.find((s) => s.slug === selected) ?? null;
|
|
@@ -1036,21 +1036,21 @@ function ConnectedSkillsLibrary({
|
|
|
1036
1036
|
const count = (s) => all.filter((x) => x.source === s).length;
|
|
1037
1037
|
const sourceOptions = [
|
|
1038
1038
|
{ id: "all", label: "All", count: all.length },
|
|
1039
|
-
{ id: "builtin", label:
|
|
1040
|
-
{ id: "mine", label:
|
|
1041
|
-
{ id: "shared", label:
|
|
1039
|
+
{ id: "builtin", label: chunkLY37J3AC_cjs.SKILL_SOURCE_LABELS.builtin, count: count("builtin") },
|
|
1040
|
+
{ id: "mine", label: chunkLY37J3AC_cjs.SKILL_SOURCE_LABELS.mine, count: count("mine") },
|
|
1041
|
+
{ id: "shared", label: chunkLY37J3AC_cjs.SKILL_SOURCE_LABELS.shared, count: count("shared") }
|
|
1042
1042
|
];
|
|
1043
1043
|
const types = [...new Set(all.map((s) => s.type))];
|
|
1044
1044
|
const typeOptions = [
|
|
1045
1045
|
{ id: "all", label: "Any kind" },
|
|
1046
|
-
...types.map((t) => ({ id: t, label:
|
|
1046
|
+
...types.map((t) => ({ id: t, label: chunkLY37J3AC_cjs.SKILL_TYPE_LABELS[t] ?? t }))
|
|
1047
1047
|
];
|
|
1048
1048
|
const pick = (slug) => {
|
|
1049
1049
|
setSelected(slug);
|
|
1050
1050
|
setMode("detail");
|
|
1051
1051
|
};
|
|
1052
1052
|
const markdownOf = async (skill) => {
|
|
1053
|
-
if (!skill.docExtId) return
|
|
1053
|
+
if (!skill.docExtId) return chunkLY37J3AC_cjs.workflowToSkillMarkdown(skill.workflow);
|
|
1054
1054
|
const response = await arbi.documents.download(skill.docExtId);
|
|
1055
1055
|
if (!response.ok) throw new Error(`Could not read the skill (${response.status})`);
|
|
1056
1056
|
return response.text();
|
|
@@ -1058,7 +1058,7 @@ function ConnectedSkillsLibrary({
|
|
|
1058
1058
|
const saveAs = (slug, markdown, shared = false) => upload.mutateAsync([
|
|
1059
1059
|
{
|
|
1060
1060
|
folder: `${SKILL_FOLDER}${slug}`,
|
|
1061
|
-
fileName:
|
|
1061
|
+
fileName: chunkLY37J3AC_cjs.SKILL_MAIN_FILENAME,
|
|
1062
1062
|
content: new Blob([markdown], { type: "text/markdown" }),
|
|
1063
1063
|
shared
|
|
1064
1064
|
}
|
|
@@ -1121,7 +1121,7 @@ function ConnectedSkillsLibrary({
|
|
|
1121
1121
|
try {
|
|
1122
1122
|
documentTools.downloadBlob(
|
|
1123
1123
|
new Blob([await markdownOf(skill)], { type: "text/markdown" }),
|
|
1124
|
-
|
|
1124
|
+
chunkLY37J3AC_cjs.SKILL_MAIN_FILENAME
|
|
1125
1125
|
);
|
|
1126
1126
|
} catch (error) {
|
|
1127
1127
|
notify14(errorText(error, "Could not export the skill"), "error");
|
|
@@ -1162,10 +1162,10 @@ function ConnectedSkillsLibrary({
|
|
|
1162
1162
|
}
|
|
1163
1163
|
)
|
|
1164
1164
|
] }),
|
|
1165
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1165
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkLY37J3AC_cjs.SkillViewToggle, { value: view, onChange: setView })
|
|
1166
1166
|
] }),
|
|
1167
1167
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1168
|
-
|
|
1168
|
+
chunkLY37J3AC_cjs.SkillFilterChips,
|
|
1169
1169
|
{
|
|
1170
1170
|
label: "Show",
|
|
1171
1171
|
value: source,
|
|
@@ -1174,7 +1174,7 @@ function ConnectedSkillsLibrary({
|
|
|
1174
1174
|
}
|
|
1175
1175
|
),
|
|
1176
1176
|
types.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1177
|
-
|
|
1177
|
+
chunkLY37J3AC_cjs.SkillFilterChips,
|
|
1178
1178
|
{
|
|
1179
1179
|
label: "Kind",
|
|
1180
1180
|
value: type,
|
|
@@ -1221,12 +1221,12 @@ function ConnectedSkillsLibrary({
|
|
|
1221
1221
|
view === "gallery" ? "grid grid-cols-[repeat(auto-fill,minmax(9.5rem,1fr))]" : "flex flex-col"
|
|
1222
1222
|
),
|
|
1223
1223
|
children: shown.map((skill) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1224
|
-
|
|
1224
|
+
chunkLY37J3AC_cjs.SkillTile,
|
|
1225
1225
|
{
|
|
1226
1226
|
name: skill.title,
|
|
1227
1227
|
testId: `skill-tile-${skill.slug}`,
|
|
1228
1228
|
description: skill.description,
|
|
1229
|
-
sourceLabel: skill.isShared ? `${
|
|
1229
|
+
sourceLabel: skill.isShared ? `${chunkLY37J3AC_cjs.SKILL_SOURCE_LABELS.mine}, shared` : chunkLY37J3AC_cjs.SKILL_SOURCE_LABELS[skill.source],
|
|
1230
1230
|
type: skill.type,
|
|
1231
1231
|
icon,
|
|
1232
1232
|
layout: view,
|
|
@@ -1261,7 +1261,7 @@ function ConnectedSkillsLibrary({
|
|
|
1261
1261
|
}
|
|
1262
1262
|
),
|
|
1263
1263
|
mode === "new" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1264
|
-
|
|
1264
|
+
chunkLY37J3AC_cjs.SkillGenerateForm,
|
|
1265
1265
|
{
|
|
1266
1266
|
icon,
|
|
1267
1267
|
onGenerate: (desc) => {
|
|
@@ -1288,11 +1288,11 @@ function ConnectedSkillsLibrary({
|
|
|
1288
1288
|
),
|
|
1289
1289
|
mode === "add" && /* @__PURE__ */ jsxRuntime.jsx(ConnectedSkillUpload, { onDone: done }),
|
|
1290
1290
|
mode === "detail" && current && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1291
|
-
|
|
1291
|
+
chunkLY37J3AC_cjs.SkillLibraryDetail,
|
|
1292
1292
|
{
|
|
1293
1293
|
skill: current,
|
|
1294
1294
|
icon,
|
|
1295
|
-
instructions: current.docExtId ? currentText ?
|
|
1295
|
+
instructions: current.docExtId ? currentText ? chunkLY37J3AC_cjs.parseSkillFrontmatter(currentText, chunkLY37J3AC_cjs.SKILL_MAIN_FILENAME).content : "" : current.workflow.run.kind === "prompt" ? current.workflow.run.promptTemplate : "",
|
|
1296
1296
|
isLoading: !!current.docExtId && textLoading,
|
|
1297
1297
|
actions: {
|
|
1298
1298
|
onRun: () => onRun(current.slug),
|
|
@@ -1327,7 +1327,7 @@ function SkillEditor({
|
|
|
1327
1327
|
const [seeded, setSeeded] = react.useState(!isEditing);
|
|
1328
1328
|
const [nameError, setNameError] = react.useState(null);
|
|
1329
1329
|
if (isEditing && !seeded && text !== void 0) {
|
|
1330
|
-
const parsed =
|
|
1330
|
+
const parsed = chunkLY37J3AC_cjs.parseSkillFrontmatter(text, chunkLY37J3AC_cjs.SKILL_MAIN_FILENAME);
|
|
1331
1331
|
setDescription(parsed.description ?? "");
|
|
1332
1332
|
setBody(parsed.content ?? "");
|
|
1333
1333
|
setSeeded(true);
|
|
@@ -1341,15 +1341,15 @@ function SkillEditor({
|
|
|
1341
1341
|
notify14("Add a short description.", "error");
|
|
1342
1342
|
return;
|
|
1343
1343
|
}
|
|
1344
|
-
const slug =
|
|
1344
|
+
const slug = chunkLY37J3AC_cjs.skillSlug(name);
|
|
1345
1345
|
try {
|
|
1346
|
-
await onSave(slug,
|
|
1346
|
+
await onSave(slug, chunkLY37J3AC_cjs.serializeSkill({ name: slug, description, body }), isEditing);
|
|
1347
1347
|
} catch (err) {
|
|
1348
1348
|
notify14(errorText(err, "Could not save the skill"), "error");
|
|
1349
1349
|
}
|
|
1350
1350
|
};
|
|
1351
1351
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1352
|
-
|
|
1352
|
+
chunkLY37J3AC_cjs.SkillEditForm,
|
|
1353
1353
|
{
|
|
1354
1354
|
name,
|
|
1355
1355
|
onNameChange: setName,
|
|
@@ -1385,9 +1385,9 @@ function ConnectedAgentCreator({
|
|
|
1385
1385
|
agent,
|
|
1386
1386
|
initialName,
|
|
1387
1387
|
onSaved,
|
|
1388
|
-
capabilities =
|
|
1389
|
-
templates =
|
|
1390
|
-
types =
|
|
1388
|
+
capabilities = chunkLY37J3AC_cjs.DEFAULT_AGENT_CAPABILITIES,
|
|
1389
|
+
templates = chunkLY37J3AC_cjs.DEFAULT_AGENT_TEMPLATES,
|
|
1390
|
+
types = chunkLY37J3AC_cjs.DEFAULT_AGENT_TYPES,
|
|
1391
1391
|
canRevokeWorkspaces = false,
|
|
1392
1392
|
labels
|
|
1393
1393
|
}) {
|
|
@@ -1429,7 +1429,7 @@ function ConnectedAgentCreator({
|
|
|
1429
1429
|
const initialValues = react.useMemo(
|
|
1430
1430
|
() => ({
|
|
1431
1431
|
name: agent?.given_name ?? initialName ?? "",
|
|
1432
|
-
persona: isEdit ?
|
|
1432
|
+
persona: isEdit ? chunkLY37J3AC_cjs.stripPersonaPreamble(String(agents.PERSONA ?? "")) : "",
|
|
1433
1433
|
modelName: String(agents.AGENT_MODEL_NAME ?? ""),
|
|
1434
1434
|
capabilities: Object.fromEntries(capabilities.map(({ key }) => [key, Boolean(agents[key])])),
|
|
1435
1435
|
type: "builtin",
|
|
@@ -1448,7 +1448,7 @@ function ConnectedAgentCreator({
|
|
|
1448
1448
|
try {
|
|
1449
1449
|
let agentExtId = agent?.external_id ?? early?.id ?? "";
|
|
1450
1450
|
if (!agentExtId) {
|
|
1451
|
-
if (!
|
|
1451
|
+
if (!chunkLY37J3AC_cjs.isValidAgentName(values.name)) {
|
|
1452
1452
|
notify14("Give the agent a name first.", "error");
|
|
1453
1453
|
return;
|
|
1454
1454
|
}
|
|
@@ -1484,7 +1484,7 @@ function ConnectedAgentCreator({
|
|
|
1484
1484
|
title: `agent-${name}`,
|
|
1485
1485
|
sections: {
|
|
1486
1486
|
Agents: {
|
|
1487
|
-
PERSONA:
|
|
1487
|
+
PERSONA: chunkLY37J3AC_cjs.composePersona(name, values.persona),
|
|
1488
1488
|
...values.modelName ? { AGENT_MODEL_NAME: values.modelName } : {},
|
|
1489
1489
|
...Object.fromEntries(capabilities.map(({ key }) => [key, !!values.capabilities[key]])),
|
|
1490
1490
|
ENABLED_SKILLS: values.capabilities.SKILLS_ENABLED && skills.length ? skills : null,
|
|
@@ -1507,7 +1507,7 @@ function ConnectedAgentCreator({
|
|
|
1507
1507
|
};
|
|
1508
1508
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1509
1509
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1510
|
-
|
|
1510
|
+
chunkLY37J3AC_cjs.AgentCreator,
|
|
1511
1511
|
{
|
|
1512
1512
|
open: ready,
|
|
1513
1513
|
onOpenChange,
|
|
@@ -1523,11 +1523,11 @@ function ConnectedAgentCreator({
|
|
|
1523
1523
|
) : void 0,
|
|
1524
1524
|
revokingWorkspaceId: revokeAccess.isPending ? revokeAccess.variables?.workspaceId : void 0,
|
|
1525
1525
|
avatar: (values) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1526
|
-
|
|
1526
|
+
chunkLY37J3AC_cjs.AgentAvatarField,
|
|
1527
1527
|
{
|
|
1528
1528
|
picture,
|
|
1529
1529
|
isBusy: avatarBusy,
|
|
1530
|
-
canGenerate: isEdit ||
|
|
1530
|
+
canGenerate: isEdit || chunkLY37J3AC_cjs.isValidAgentName(values.name),
|
|
1531
1531
|
onGenerate: () => handleGenerateAvatar(values)
|
|
1532
1532
|
}
|
|
1533
1533
|
),
|
|
@@ -1579,7 +1579,7 @@ function ConnectedAgentCreator({
|
|
|
1579
1579
|
/* @__PURE__ */ jsxRuntime.jsx(ui.DialogTitle, { children: "Connect your agent" }),
|
|
1580
1580
|
/* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { children: "This key is shown once. Run the script on the machine that will host the agent." })
|
|
1581
1581
|
] }),
|
|
1582
|
-
connect && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1582
|
+
connect && /* @__PURE__ */ jsxRuntime.jsx(chunkLY37J3AC_cjs.AgentConnectInstructions, { email: connect.email, signingKey: connect.signingKey })
|
|
1583
1583
|
]
|
|
1584
1584
|
}
|
|
1585
1585
|
) })
|
|
@@ -1616,7 +1616,7 @@ function ConnectedWorkflowHistory({
|
|
|
1616
1616
|
const { openConversation } = chunkCNHUJRQ4_cjs.useBlocksEnvironment();
|
|
1617
1617
|
const { data: runs = [], isLoading } = react$1.useWorkflowRuns(workflow?.external_id);
|
|
1618
1618
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1619
|
-
|
|
1619
|
+
chunkLY37J3AC_cjs.TaskRunsDialog,
|
|
1620
1620
|
{
|
|
1621
1621
|
inline,
|
|
1622
1622
|
hideHeader,
|
|
@@ -1652,7 +1652,7 @@ function ConnectedTaskActivityDialog({
|
|
|
1652
1652
|
const activity = react$1.useConversationActivity(conversationId, { live });
|
|
1653
1653
|
const { data: agents = [] } = react$1.useAgents();
|
|
1654
1654
|
const { userId } = chunkFM3IRQJW_cjs.useConnectedWorkspace();
|
|
1655
|
-
const { members } =
|
|
1655
|
+
const { members } = chunkRJUXSXBH_cjs.useConnectedWorkspaceRole();
|
|
1656
1656
|
const renderPerson = react.useCallback(
|
|
1657
1657
|
(id) => {
|
|
1658
1658
|
const isMe = !!id && id === userId;
|
|
@@ -1668,7 +1668,7 @@ function ConnectedTaskActivityDialog({
|
|
|
1668
1668
|
[agents]
|
|
1669
1669
|
);
|
|
1670
1670
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1671
|
-
|
|
1671
|
+
chunkLY37J3AC_cjs.TaskActivityDialog,
|
|
1672
1672
|
{
|
|
1673
1673
|
open: true,
|
|
1674
1674
|
onOpenChange: (open) => !open && onClose(),
|
|
@@ -1814,7 +1814,7 @@ function useWorkflowThread(workflow, options2 = {}) {
|
|
|
1814
1814
|
);
|
|
1815
1815
|
const conversation = conversations.data?.find((c) => c.external_id === threadId);
|
|
1816
1816
|
const steps = react.useMemo(
|
|
1817
|
-
() => chunkJSTKEZBS_cjs.workflowSteps(workflow).length > 0 ? chunkJSTKEZBS_cjs.workflowSteps(workflow) :
|
|
1817
|
+
() => chunkJSTKEZBS_cjs.workflowSteps(workflow).length > 0 ? chunkJSTKEZBS_cjs.workflowSteps(workflow) : chunkLY37J3AC_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
|
|
1818
1818
|
[workflow, conversation?.plan?.steps]
|
|
1819
1819
|
);
|
|
1820
1820
|
const activity = react$1.useConversationActivity(threadId, { live: !!threadId });
|
|
@@ -1874,7 +1874,7 @@ function useWorkflowThread(workflow, options2 = {}) {
|
|
|
1874
1874
|
criteria: [],
|
|
1875
1875
|
max_passes: 3,
|
|
1876
1876
|
documents: [],
|
|
1877
|
-
steps:
|
|
1877
|
+
steps: chunkLY37J3AC_cjs.toPlanSteps(workflow, {
|
|
1878
1878
|
inputs: values,
|
|
1879
1879
|
resolveWorkflow: options2.resolveWorkflow,
|
|
1880
1880
|
compose: options2.compose
|
|
@@ -1961,7 +1961,7 @@ function useWorkflowThread(workflow, options2 = {}) {
|
|
|
1961
1961
|
const anyRunning = Object.values(states).some((s) => s.status === "running");
|
|
1962
1962
|
const needsStart = !threadId || idle && !anyRunning;
|
|
1963
1963
|
const runError = idle ? conversation?.last_error ?? null : null;
|
|
1964
|
-
const view =
|
|
1964
|
+
const view = chunkLY37J3AC_cjs.useWorkflowView({
|
|
1965
1965
|
steps,
|
|
1966
1966
|
states,
|
|
1967
1967
|
inputs,
|
|
@@ -2129,7 +2129,7 @@ function WorkflowWordDialog({
|
|
|
2129
2129
|
title: title ?? labels.wordTitle,
|
|
2130
2130
|
size: "xl",
|
|
2131
2131
|
testId: "workflow-word-dialog",
|
|
2132
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2132
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(chunkRJUXSXBH_cjs.ConnectedNativeDocxEditor, { documentId: id, title: title ?? labels.wordTitle }) })
|
|
2133
2133
|
}
|
|
2134
2134
|
);
|
|
2135
2135
|
}
|
|
@@ -2438,7 +2438,7 @@ function ConnectedWorkflowRunner({
|
|
|
2438
2438
|
);
|
|
2439
2439
|
};
|
|
2440
2440
|
const runner = (compact) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2441
|
-
|
|
2441
|
+
chunkLY37J3AC_cjs.WorkflowRunner,
|
|
2442
2442
|
{
|
|
2443
2443
|
people,
|
|
2444
2444
|
...runnerProps,
|
|
@@ -2484,7 +2484,7 @@ function ConnectedWorkflowRunner({
|
|
|
2484
2484
|
) }),
|
|
2485
2485
|
inThread && conversationId ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2486
2486
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2487
|
-
|
|
2487
|
+
chunkLY37J3AC_cjs.WorkflowStepBar,
|
|
2488
2488
|
{
|
|
2489
2489
|
run: view,
|
|
2490
2490
|
levels: chunkJSTKEZBS_cjs.stepLevels(view.steps),
|
|
@@ -2655,10 +2655,10 @@ function cascadeTagCombination(tags, previous, next) {
|
|
|
2655
2655
|
function tagCombinationMatches(combination, items) {
|
|
2656
2656
|
if (!isCombining(combination)) return void 0;
|
|
2657
2657
|
const pass = (list) => new Set(
|
|
2658
|
-
|
|
2658
|
+
chunkNFI46I77_cjs.applyInvertedIndexFilter(
|
|
2659
2659
|
[...list],
|
|
2660
2660
|
combination,
|
|
2661
|
-
|
|
2661
|
+
chunkNFI46I77_cjs.buildInvertedIndex(
|
|
2662
2662
|
[...list],
|
|
2663
2663
|
(item) => item.id,
|
|
2664
2664
|
(item) => item.tagIds
|
|
@@ -2775,7 +2775,7 @@ function ConnectedTagTable({
|
|
|
2775
2775
|
const fail = (fallback) => (e) => notify14(browser.refusalReason(e, fallback), "error");
|
|
2776
2776
|
const snapshot2 = (data) => {
|
|
2777
2777
|
const title = exportTitle ?? ui.tagKindTitle(kind, { plural: true });
|
|
2778
|
-
const bytes =
|
|
2778
|
+
const bytes = chunkFBSIWJSG_cjs.tagTableDocx(data, {
|
|
2779
2779
|
title,
|
|
2780
2780
|
nameOf: (id) => people.find((p) => p.value === id)?.label
|
|
2781
2781
|
});
|
|
@@ -2784,7 +2784,7 @@ function ConnectedTagTable({
|
|
|
2784
2784
|
return { blob: new Blob([bytes], { type: chunkQT3A4PFC_cjs.DOCX_MIME_TYPE }), name };
|
|
2785
2785
|
};
|
|
2786
2786
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2787
|
-
|
|
2787
|
+
chunkFBSIWJSG_cjs.TagTable,
|
|
2788
2788
|
{
|
|
2789
2789
|
...props,
|
|
2790
2790
|
table,
|
|
@@ -2825,7 +2825,7 @@ function DocTagPassages({ docId, tagId, label, docOf, testId }) {
|
|
|
2825
2825
|
const [open, setOpen] = react.useState(false);
|
|
2826
2826
|
const doctag = docOf(docId)?.doctags?.find((dt) => dt.tag_ext_id === tagId);
|
|
2827
2827
|
const citations = react.useMemo(
|
|
2828
|
-
() =>
|
|
2828
|
+
() => chunkTAWPVD6C_cjs.toFactCitations(doctag?.citations) ?? [],
|
|
2829
2829
|
[doctag?.citations]
|
|
2830
2830
|
);
|
|
2831
2831
|
const { quoteFor, orderOf } = react$1.usePassageQuotes(
|
|
@@ -2834,7 +2834,7 @@ function DocTagPassages({ docId, tagId, label, docOf, testId }) {
|
|
|
2834
2834
|
const { openDocument } = chunkCNHUJRQ4_cjs.useBlocksEnvironment();
|
|
2835
2835
|
const viewingPassageId = react$1.useArbiSessionState((s) => s.viewingDocument?.passageId ?? null);
|
|
2836
2836
|
const id = testId ?? `doctag-passages-${docId}`;
|
|
2837
|
-
const refOf = (cited) =>
|
|
2837
|
+
const refOf = (cited) => chunkTAWPVD6C_cjs.citedVersionRef(cited.doc_ext_id, cited.version, docOf(cited.doc_ext_id)?.current_version);
|
|
2838
2838
|
const ordered = (cited) => [...cited.chunks].sort((a, b) => {
|
|
2839
2839
|
const oa = orderOf(a.chunk_id);
|
|
2840
2840
|
const ob = orderOf(b.chunk_id);
|
|
@@ -2865,7 +2865,7 @@ function DocTagPassages({ docId, tagId, label, docOf, testId }) {
|
|
|
2865
2865
|
const doc = docOf(cited.doc_ext_id);
|
|
2866
2866
|
const passages = ordered(cited);
|
|
2867
2867
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2868
|
-
|
|
2868
|
+
chunkTAWPVD6C_cjs.FactSourceGroup,
|
|
2869
2869
|
{
|
|
2870
2870
|
docId: cited.doc_ext_id,
|
|
2871
2871
|
hasPassages: passages.length > 0,
|
|
@@ -2922,9 +2922,9 @@ function GlossaryExport({ labelId, nameOf }) {
|
|
|
2922
2922
|
const narrowed = agreements.find((a) => a.id === narrowTo);
|
|
2923
2923
|
const title = narrowed ? `Glossary - ${narrowed.name}` : "Glossary";
|
|
2924
2924
|
const download = (format) => {
|
|
2925
|
-
const entries =
|
|
2926
|
-
const blob = format === "docx" ? new Blob([
|
|
2927
|
-
documentTools.downloadBlob(blob,
|
|
2925
|
+
const entries = chunkFBSIWJSG_cjs.glossaryEntries(sources, { labelId: narrowed?.id });
|
|
2926
|
+
const blob = format === "docx" ? new Blob([chunkFBSIWJSG_cjs.glossaryDocx(entries, { title })], { type: chunkQT3A4PFC_cjs.DOCX_MIME_TYPE }) : new Blob([chunkFBSIWJSG_cjs.glossaryMarkdown(entries, { title })], { type: "text/markdown" });
|
|
2927
|
+
documentTools.downloadBlob(blob, chunkFBSIWJSG_cjs.glossaryFileName(title, format));
|
|
2928
2928
|
};
|
|
2929
2929
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", "data-testid": "tags-glossary", children: [
|
|
2930
2930
|
agreements.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3015,7 +3015,7 @@ function TagFilterChips({
|
|
|
3015
3015
|
const name = (id) => tags.find((t) => t.external_id === id)?.name ?? id;
|
|
3016
3016
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-1.5", "data-testid": "tags-filter-chips", children: [
|
|
3017
3017
|
set.map(([id, state]) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3018
|
-
|
|
3018
|
+
chunkNFI46I77_cjs.FilterChip,
|
|
3019
3019
|
{
|
|
3020
3020
|
label: name(id),
|
|
3021
3021
|
state,
|
|
@@ -3143,7 +3143,7 @@ function KindSection({
|
|
|
3143
3143
|
{
|
|
3144
3144
|
testId: `tags-kind-${kind}`,
|
|
3145
3145
|
title: ui.tagKindTitle(kind, { plural: true }),
|
|
3146
|
-
description:
|
|
3146
|
+
description: chunkFBSIWJSG_cjs.tagKindDescription(kind),
|
|
3147
3147
|
actions: picker,
|
|
3148
3148
|
children: [
|
|
3149
3149
|
browser.isEntityTag({ kind }) && extractingCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3154,9 +3154,9 @@ function KindSection({
|
|
|
3154
3154
|
children: [
|
|
3155
3155
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-4 animate-spin" }),
|
|
3156
3156
|
"Extracting ",
|
|
3157
|
-
|
|
3157
|
+
chunkFBSIWJSG_cjs.entitiesPhrase().toLowerCase(),
|
|
3158
3158
|
" from ",
|
|
3159
|
-
|
|
3159
|
+
chunkFBSIWJSG_cjs.documentCount(extractingCount),
|
|
3160
3160
|
"\u2026"
|
|
3161
3161
|
]
|
|
3162
3162
|
}
|
|
@@ -3174,7 +3174,7 @@ function KindSection({
|
|
|
3174
3174
|
onOpenDocument: (id) => openDocument(id),
|
|
3175
3175
|
onOpenFact: ctx.onOpenFact,
|
|
3176
3176
|
onOpenThread: (id) => openConversation(id),
|
|
3177
|
-
labels:
|
|
3177
|
+
labels: chunkFBSIWJSG_cjs.tagTableLabels(kind),
|
|
3178
3178
|
testId: `tags-table-${kind}`
|
|
3179
3179
|
}
|
|
3180
3180
|
)
|
|
@@ -3276,12 +3276,12 @@ function TagSection({
|
|
|
3276
3276
|
onOpenDocument: (id) => openDocument(id),
|
|
3277
3277
|
onOpenFact: ctx.onOpenFact,
|
|
3278
3278
|
onOpenThread: (id) => openConversation(id),
|
|
3279
|
-
labels:
|
|
3279
|
+
labels: chunkFBSIWJSG_cjs.tagTableLabels(tag.kind),
|
|
3280
3280
|
testId: "tags-rows"
|
|
3281
3281
|
}
|
|
3282
3282
|
),
|
|
3283
3283
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3284
|
-
|
|
3284
|
+
chunkFBSIWJSG_cjs.TagDetail,
|
|
3285
3285
|
{
|
|
3286
3286
|
row: detailRow && narrowTagRow(detailRow, ctx.filter.matches),
|
|
3287
3287
|
fields: schema.data?.fields ?? [],
|
|
@@ -3293,10 +3293,10 @@ function TagSection({
|
|
|
3293
3293
|
onOpenDocument: (id) => openDocument(id),
|
|
3294
3294
|
onOpenFact: ctx.onOpenFact,
|
|
3295
3295
|
onOpenThread: (id) => openConversation(id),
|
|
3296
|
-
noteLabel:
|
|
3296
|
+
noteLabel: chunkFBSIWJSG_cjs.tagNoteLabel(tag.kind),
|
|
3297
3297
|
noteIsValue: tag.kind === "annotation",
|
|
3298
3298
|
renderPassages: (d, label) => renderPassages(d.doc_ext_id, label),
|
|
3299
|
-
labels:
|
|
3299
|
+
labels: chunkFBSIWJSG_cjs.tagDetailLabels(),
|
|
3300
3300
|
testId: "tags-detail"
|
|
3301
3301
|
}
|
|
3302
3302
|
)
|
|
@@ -3385,7 +3385,7 @@ function ConnectedTagsPage({
|
|
|
3385
3385
|
const onDelete = async (t) => {
|
|
3386
3386
|
const nested = browser.getChildTags([...tags], t.external_id);
|
|
3387
3387
|
const uses = browser.tagUseCount(t);
|
|
3388
|
-
const n2 =
|
|
3388
|
+
const n2 = chunkFBSIWJSG_cjs.tagsPageNouns();
|
|
3389
3389
|
const tagNoun = (count) => (count === 1 ? n2.tag : n2.tags).toLowerCase();
|
|
3390
3390
|
const carriers = uses === 1 ? `${n2.document}, ${n2.fact} or ${n2.thread}` : `${n2.documents}, ${n2.facts} and ${n2.threads}`;
|
|
3391
3391
|
const message = `Delete ${ui.tagKindNouns(t.kind).singular} "${t.name}"?` + (uses > 0 ? `
|
|
@@ -3406,16 +3406,16 @@ ${nested.length} nested ${tagNoun(nested.length)} ${nested.length === 1 ? "moves
|
|
|
3406
3406
|
try {
|
|
3407
3407
|
await extract.mutateAsync(docIds);
|
|
3408
3408
|
notify14(
|
|
3409
|
-
`Extracting ${
|
|
3409
|
+
`Extracting ${chunkFBSIWJSG_cjs.entitiesPhrase().toLowerCase()} from ${chunkFBSIWJSG_cjs.documentCount(docIds.length)}. You will be notified when it is done.`,
|
|
3410
3410
|
"info"
|
|
3411
3411
|
);
|
|
3412
3412
|
} catch (error) {
|
|
3413
|
-
notify14(browser.refusalReason(error, `Could not extract ${
|
|
3413
|
+
notify14(browser.refusalReason(error, `Could not extract ${chunkFBSIWJSG_cjs.entitiesPhrase().toLowerCase()}`), "error");
|
|
3414
3414
|
throw error;
|
|
3415
3415
|
}
|
|
3416
3416
|
};
|
|
3417
3417
|
const picker = /* @__PURE__ */ jsxRuntime.jsx(
|
|
3418
|
-
|
|
3418
|
+
chunkFBSIWJSG_cjs.TagPicker,
|
|
3419
3419
|
{
|
|
3420
3420
|
tags: viewTags,
|
|
3421
3421
|
selectedId: tag?.external_id,
|
|
@@ -3429,10 +3429,10 @@ ${nested.length} nested ${tagNoun(nested.length)} ${nested.length === 1 ? "moves
|
|
|
3429
3429
|
onOpenTag: openTag,
|
|
3430
3430
|
onOpenFact
|
|
3431
3431
|
};
|
|
3432
|
-
const n =
|
|
3432
|
+
const n = chunkFBSIWJSG_cjs.tagsPageNouns();
|
|
3433
3433
|
const action = view === "person" || view === "organisation" ? {
|
|
3434
3434
|
label: "Extract",
|
|
3435
|
-
title: `Extract ${
|
|
3435
|
+
title: `Extract ${chunkFBSIWJSG_cjs.entitiesPhrase().toLowerCase()} from ${n.documents.toLowerCase()}`,
|
|
3436
3436
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "h-4 w-4" }),
|
|
3437
3437
|
run: () => setExtracting(true),
|
|
3438
3438
|
testId: "tags-extract-entities"
|
|
@@ -3472,7 +3472,7 @@ ${nested.length} nested ${tagNoun(nested.length)} ${nested.length === 1 ? "moves
|
|
|
3472
3472
|
onTabChange: () => {
|
|
3473
3473
|
},
|
|
3474
3474
|
variant: "underline",
|
|
3475
|
-
firstTabContent: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3475
|
+
firstTabContent: /* @__PURE__ */ jsxRuntime.jsx(chunkFWIBFGUQ_cjs.FilesFilterBar, { className: "flex-none", "data-testid": "tags-header-actions", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3476
3476
|
chunk2EI7NCUA_cjs.FilterInput,
|
|
3477
3477
|
{
|
|
3478
3478
|
value: filterText,
|
|
@@ -3500,7 +3500,7 @@ ${nested.length} nested ${tagNoun(nested.length)} ${nested.length === 1 ? "moves
|
|
|
3500
3500
|
)
|
|
3501
3501
|
}
|
|
3502
3502
|
) }),
|
|
3503
|
-
centerContent: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3503
|
+
centerContent: /* @__PURE__ */ jsxRuntime.jsx(chunkFWIBFGUQ_cjs.FilesViewCenter, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3504
3504
|
chunk2WLXQGWC_cjs.ViewToggle,
|
|
3505
3505
|
{
|
|
3506
3506
|
options: browser.TAG_KINDS.map((k) => ({
|
|
@@ -3579,7 +3579,7 @@ ${nested.length} nested ${tagNoun(nested.length)} ${nested.length === 1 ? "moves
|
|
|
3579
3579
|
onCreated: openTag
|
|
3580
3580
|
}),
|
|
3581
3581
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3582
|
-
|
|
3582
|
+
chunkFBSIWJSG_cjs.ExtractEntitiesDialog,
|
|
3583
3583
|
{
|
|
3584
3584
|
open: extracting,
|
|
3585
3585
|
onOpenChange: setExtracting,
|
|
@@ -3640,7 +3640,7 @@ function FactSourcesPopover({
|
|
|
3640
3640
|
reset();
|
|
3641
3641
|
}
|
|
3642
3642
|
};
|
|
3643
|
-
const refOf = (docId) =>
|
|
3643
|
+
const refOf = (docId) => chunkTAWPVD6C_cjs.citedVersionRef(
|
|
3644
3644
|
docId,
|
|
3645
3645
|
citations.find((d) => d.doc_ext_id === docId)?.version,
|
|
3646
3646
|
citedDocs?.[docId]?.current_version
|
|
@@ -3670,7 +3670,7 @@ function FactSourcesPopover({
|
|
|
3670
3670
|
const olderVersion = refOf(docId) !== docId ? refOf(docId).split("@v")[1] : null;
|
|
3671
3671
|
const cited = passagesOf(docId);
|
|
3672
3672
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3673
|
-
|
|
3673
|
+
chunkTAWPVD6C_cjs.FactSourceGroup,
|
|
3674
3674
|
{
|
|
3675
3675
|
docId,
|
|
3676
3676
|
isViewing,
|
|
@@ -3739,8 +3739,8 @@ function FactMarkdownEditor({
|
|
|
3739
3739
|
citationContainer,
|
|
3740
3740
|
"data-testid": dataTestId
|
|
3741
3741
|
}) {
|
|
3742
|
-
const sources = react.useMemo(() =>
|
|
3743
|
-
const docIds =
|
|
3742
|
+
const sources = react.useMemo(() => chunkTAWPVD6C_cjs.toFactCitations(citations) ?? [], [citations]);
|
|
3743
|
+
const docIds = chunkTAWPVD6C_cjs.docIdsOf(sources);
|
|
3744
3744
|
const hasSources = docIds.length > 0;
|
|
3745
3745
|
const { quoteFor, orderOf } = react$1.usePassageQuotes(
|
|
3746
3746
|
react.useMemo(() => sources.filter((d) => d.chunks.length > 0).map((d) => d.doc_ext_id), [sources])
|
|
@@ -3759,7 +3759,7 @@ function FactMarkdownEditor({
|
|
|
3759
3759
|
const editorRef = react.useRef(null);
|
|
3760
3760
|
react.useEffect(() => {
|
|
3761
3761
|
if (!editorRef.current) return;
|
|
3762
|
-
return
|
|
3762
|
+
return chunkTAWPVD6C_cjs.enableFactTableColumnResize(editorRef.current);
|
|
3763
3763
|
}, []);
|
|
3764
3764
|
react.useEffect(() => {
|
|
3765
3765
|
if (!editing) return;
|
|
@@ -3774,14 +3774,14 @@ function FactMarkdownEditor({
|
|
|
3774
3774
|
return () => document.removeEventListener("pointerdown", onPointerDown, true);
|
|
3775
3775
|
}, [editing]);
|
|
3776
3776
|
const removeDoc = (docExtId) => {
|
|
3777
|
-
const remaining =
|
|
3777
|
+
const remaining = chunkTAWPVD6C_cjs.withoutDoc(sources, docExtId);
|
|
3778
3778
|
if (!remaining) setSourcesOpen(false);
|
|
3779
3779
|
onChange(value, remaining);
|
|
3780
3780
|
};
|
|
3781
3781
|
const citeDocument = (docExtId) => onCiteDocument(docExtId, { toggle: false });
|
|
3782
3782
|
const handleToggleDoc = (docExtId) => {
|
|
3783
3783
|
if (docIds.includes(docExtId)) removeDoc(docExtId);
|
|
3784
|
-
else onChange(value,
|
|
3784
|
+
else onChange(value, chunkTAWPVD6C_cjs.withDoc(sources, docExtId));
|
|
3785
3785
|
};
|
|
3786
3786
|
const expandToggle = /* @__PURE__ */ jsxRuntime.jsx(
|
|
3787
3787
|
"button",
|
|
@@ -4000,7 +4000,7 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
|
|
|
4000
4000
|
const [composing, setComposing] = react.useState(false);
|
|
4001
4001
|
const [draft, setDraft] = react.useState("");
|
|
4002
4002
|
const [baselineText, setBaselineText] = react.useState("");
|
|
4003
|
-
const [draftDateFields, setDraftDateFields] = react.useState(
|
|
4003
|
+
const [draftDateFields, setDraftDateFields] = react.useState(chunkTAWPVD6C_cjs.EMPTY_FACT_DATE_FIELDS);
|
|
4004
4004
|
const [composerError, setComposerError] = react.useState(null);
|
|
4005
4005
|
const [editingId, setEditingId] = react.useState(null);
|
|
4006
4006
|
const [draftShared, setDraftShared] = react.useState(false);
|
|
@@ -4057,9 +4057,9 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
|
|
|
4057
4057
|
if (!collector || !picked?.length || !collectingFor || !docBeingCollected) return;
|
|
4058
4058
|
const docExtId = docBeingCollected;
|
|
4059
4059
|
const apply = (prev) => {
|
|
4060
|
-
let next =
|
|
4060
|
+
let next = chunkTAWPVD6C_cjs.toFactCitations(prev);
|
|
4061
4061
|
for (const pending of picked) {
|
|
4062
|
-
next =
|
|
4062
|
+
next = chunkTAWPVD6C_cjs.withChunk(next, docExtId, { chunk_id: pending.chunk_id, page: pending.page ?? null });
|
|
4063
4063
|
}
|
|
4064
4064
|
return next ?? [];
|
|
4065
4065
|
};
|
|
@@ -4070,8 +4070,8 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
|
|
|
4070
4070
|
react.useEffect(() => {
|
|
4071
4071
|
if (!collector || !unpicked?.length || !collectingFor) return;
|
|
4072
4072
|
setDraftCitations((prev) => {
|
|
4073
|
-
let next =
|
|
4074
|
-
for (const chunkId of unpicked) next =
|
|
4073
|
+
let next = chunkTAWPVD6C_cjs.toFactCitations(prev);
|
|
4074
|
+
for (const chunkId of unpicked) next = chunkTAWPVD6C_cjs.withoutChunk(next, chunkId);
|
|
4075
4075
|
return next;
|
|
4076
4076
|
});
|
|
4077
4077
|
collector.consumeUnpicked();
|
|
@@ -4081,7 +4081,7 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
|
|
|
4081
4081
|
setBaselineText("");
|
|
4082
4082
|
setDraftCitations(null);
|
|
4083
4083
|
setDraftTagIds([]);
|
|
4084
|
-
setDraftDateFields(
|
|
4084
|
+
setDraftDateFields(chunkTAWPVD6C_cjs.EMPTY_FACT_DATE_FIELDS);
|
|
4085
4085
|
setDraftShared(false);
|
|
4086
4086
|
setDraftConfirmed(true);
|
|
4087
4087
|
setComposerError(null);
|
|
@@ -4095,7 +4095,7 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
|
|
|
4095
4095
|
setBaselineText("");
|
|
4096
4096
|
setDraftCitations(null);
|
|
4097
4097
|
setDraftTagIds([]);
|
|
4098
|
-
setDraftDateFields(
|
|
4098
|
+
setDraftDateFields(chunkTAWPVD6C_cjs.EMPTY_FACT_DATE_FIELDS);
|
|
4099
4099
|
setDraftShared(false);
|
|
4100
4100
|
setDraftConfirmed(true);
|
|
4101
4101
|
setComposerError(null);
|
|
@@ -4106,7 +4106,7 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
|
|
|
4106
4106
|
const content = chunkRC25WMVB_cjs.decodeWhitespaceEntities(draft).trim();
|
|
4107
4107
|
if (!content) return;
|
|
4108
4108
|
setComposerError(null);
|
|
4109
|
-
const span =
|
|
4109
|
+
const span = chunkTAWPVD6C_cjs.factDateFieldsToSpan(draftDateFields);
|
|
4110
4110
|
try {
|
|
4111
4111
|
let saved;
|
|
4112
4112
|
if (editingId) {
|
|
@@ -4144,7 +4144,7 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
|
|
|
4144
4144
|
setBaselineText(draft);
|
|
4145
4145
|
setDraftCitations(saved.citations ?? null);
|
|
4146
4146
|
setDraftTagIds(saved.tags.map((t) => t.tag_ext_id));
|
|
4147
|
-
setDraftDateFields(
|
|
4147
|
+
setDraftDateFields(chunkTAWPVD6C_cjs.factDateSpanToFields(saved.date_start, saved.date_end, saved.timezone));
|
|
4148
4148
|
setDraftShared(saved.shared ?? false);
|
|
4149
4149
|
setDraftConfirmed(saved.confirmed ?? true);
|
|
4150
4150
|
}
|
|
@@ -4169,7 +4169,7 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
|
|
|
4169
4169
|
setBaselineText(m.text);
|
|
4170
4170
|
setDraftCitations(m.citations ?? null);
|
|
4171
4171
|
setDraftTagIds(m.tags.map((t) => t.tag_ext_id));
|
|
4172
|
-
setDraftDateFields(
|
|
4172
|
+
setDraftDateFields(chunkTAWPVD6C_cjs.factDateSpanToFields(m.date_start, m.date_end, m.timezone));
|
|
4173
4173
|
setDraftShared(m.shared ?? false);
|
|
4174
4174
|
setDraftConfirmed(m.confirmed ?? true);
|
|
4175
4175
|
setComposerError(null);
|
|
@@ -4183,7 +4183,7 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
|
|
|
4183
4183
|
const textChanged = draft.trim() !== baselineText.trim();
|
|
4184
4184
|
const citationsChanged = JSON.stringify(draftCitations ?? null) !== JSON.stringify(f.citations ?? null);
|
|
4185
4185
|
const tagsChanged = JSON.stringify([...draftTagIds].sort()) !== JSON.stringify(f.tags.map((t) => t.tag_ext_id).sort());
|
|
4186
|
-
const dateChanged = JSON.stringify(draftDateFields) !== JSON.stringify(
|
|
4186
|
+
const dateChanged = JSON.stringify(draftDateFields) !== JSON.stringify(chunkTAWPVD6C_cjs.factDateSpanToFields(f.date_start, f.date_end, f.timezone));
|
|
4187
4187
|
const sharedChanged = draftShared !== (f.shared ?? false);
|
|
4188
4188
|
const confirmedChanged = draftConfirmed !== (f.confirmed ?? true);
|
|
4189
4189
|
return textChanged || citationsChanged || tagsChanged || dateChanged || sharedChanged || confirmedChanged;
|
|
@@ -4276,10 +4276,10 @@ function useFactFilters(notes, view, chat) {
|
|
|
4276
4276
|
const factFilters = view.filters;
|
|
4277
4277
|
const setFactFilters = view.setFilters;
|
|
4278
4278
|
const quickFilteredNotes = react.useMemo(
|
|
4279
|
-
() =>
|
|
4279
|
+
() => chunkNFI46I77_cjs.applyInvertedIndexFilter(
|
|
4280
4280
|
notes,
|
|
4281
4281
|
factFilters,
|
|
4282
|
-
|
|
4282
|
+
chunkNFI46I77_cjs.buildInvertedIndex(
|
|
4283
4283
|
notes,
|
|
4284
4284
|
(f) => f.external_id,
|
|
4285
4285
|
(f) => Object.entries(getFactFilterAttributes(f)).filter(([id, on]) => on && factFilterIds.includes(id)).map(([id]) => id)
|
|
@@ -4357,8 +4357,8 @@ function useFactFilters(notes, view, chat) {
|
|
|
4357
4357
|
const makeTagPicker = react.useCallback(
|
|
4358
4358
|
(selected, setSelected, opts) => {
|
|
4359
4359
|
const applied = new Set(selected);
|
|
4360
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4361
|
-
|
|
4360
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkTAWPVD6C_cjs.FactFieldRow, { label: "Labels", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4361
|
+
chunkFWIBFGUQ_cjs.FieldLabelsSelect,
|
|
4362
4362
|
{
|
|
4363
4363
|
options: labelOptions,
|
|
4364
4364
|
appliedIds: applied,
|
|
@@ -4548,14 +4548,14 @@ function useFactSelection(notes, gridApiRef, setFactTags, chat) {
|
|
|
4548
4548
|
}
|
|
4549
4549
|
function renderSourcesCell(params) {
|
|
4550
4550
|
const fact = params.data;
|
|
4551
|
-
const count =
|
|
4551
|
+
const count = chunkTAWPVD6C_cjs.sourceDocCount(fact);
|
|
4552
4552
|
if (!fact || count === 0) return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/40", children: "\u2014" });
|
|
4553
4553
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4554
4554
|
"button",
|
|
4555
4555
|
{
|
|
4556
4556
|
type: "button",
|
|
4557
4557
|
onClick: () => params.context?.openEdit?.(fact),
|
|
4558
|
-
title:
|
|
4558
|
+
title: chunkTAWPVD6C_cjs.DEFAULT_FACT_COLUMN_LABELS.sourcedFrom(count),
|
|
4559
4559
|
"data-testid": `facts-grid-sources-${fact.external_id}`,
|
|
4560
4560
|
className: "inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",
|
|
4561
4561
|
children: [
|
|
@@ -4584,7 +4584,7 @@ var FactHeader = react.memo(function FactHeader2({
|
|
|
4584
4584
|
if (params.enableSorting) params.progressSort(e.shiftKey);
|
|
4585
4585
|
},
|
|
4586
4586
|
children: [
|
|
4587
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4587
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkFWIBFGUQ_cjs.FilterButton, { params, colId }),
|
|
4588
4588
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "order-2 min-w-0 flex-1 truncate", children: params.displayName }),
|
|
4589
4589
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ag-sort-indicator-container order-2 flex-shrink-0", "aria-hidden": "true", children: [
|
|
4590
4590
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4612,14 +4612,14 @@ function createFactPageColumns({
|
|
|
4612
4612
|
onToggleConfirmed,
|
|
4613
4613
|
onToggleShared
|
|
4614
4614
|
}) {
|
|
4615
|
-
const columns =
|
|
4615
|
+
const columns = chunkTAWPVD6C_cjs.createFactColumns({
|
|
4616
4616
|
onToggleInChat,
|
|
4617
4617
|
isInChat,
|
|
4618
4618
|
renderHeader: (params, colId) => /* @__PURE__ */ jsxRuntime.jsx(FactHeader, { params, colId }),
|
|
4619
4619
|
renderRowActions: (fact, params) => {
|
|
4620
4620
|
const ctx = params.context;
|
|
4621
4621
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4622
|
-
|
|
4622
|
+
chunkTAWPVD6C_cjs.FactRowActions,
|
|
4623
4623
|
{
|
|
4624
4624
|
onEdit: () => ctx?.openEdit?.(fact),
|
|
4625
4625
|
canEdit: ctx?.canRewrite?.(fact) !== false,
|
|
@@ -4749,7 +4749,7 @@ function useFactsGrid({
|
|
|
4749
4749
|
);
|
|
4750
4750
|
const renderFactTags = react.useCallback(
|
|
4751
4751
|
(fact, rowHeight) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4752
|
-
|
|
4752
|
+
chunkTAWPVD6C_cjs.FactLabelsCell,
|
|
4753
4753
|
{
|
|
4754
4754
|
options: labelOptions,
|
|
4755
4755
|
selectedIds: fact.tags.map((t) => t.tag_ext_id),
|
|
@@ -4848,7 +4848,7 @@ function useFactsGrid({
|
|
|
4848
4848
|
var DEFAULT_TIMELINE_LABEL_WIDTH = 240;
|
|
4849
4849
|
function useFactsPageView() {
|
|
4850
4850
|
const [view, setView] = react.useState("table");
|
|
4851
|
-
const [rowHeight, setRowHeight] = react.useState(
|
|
4851
|
+
const [rowHeight, setRowHeight] = react.useState(chunkFWIBFGUQ_cjs.ROW_MIN);
|
|
4852
4852
|
const [labelWidth, setLabelWidth] = react.useState(DEFAULT_TIMELINE_LABEL_WIDTH);
|
|
4853
4853
|
const [zoom, setZoom] = react.useState(1);
|
|
4854
4854
|
const [filterText, setFilterText] = react.useState("");
|
|
@@ -4881,7 +4881,7 @@ var citedDocIdsCache = /* @__PURE__ */ new WeakMap();
|
|
|
4881
4881
|
function citedDocIds(m) {
|
|
4882
4882
|
const cached = citedDocIdsCache.get(m);
|
|
4883
4883
|
if (cached) return cached;
|
|
4884
|
-
const ids =
|
|
4884
|
+
const ids = chunkTAWPVD6C_cjs.docIdsOf(chunkTAWPVD6C_cjs.toFactCitations(m.citations));
|
|
4885
4885
|
citedDocIdsCache.set(m, ids);
|
|
4886
4886
|
return ids;
|
|
4887
4887
|
}
|
|
@@ -4973,7 +4973,7 @@ function ConnectedFactsPage({
|
|
|
4973
4973
|
const citedDocs = react.useMemo(() => {
|
|
4974
4974
|
const wanted = /* @__PURE__ */ new Set([
|
|
4975
4975
|
...notes.flatMap((n) => citedDocIds(n)),
|
|
4976
|
-
...
|
|
4976
|
+
...chunkTAWPVD6C_cjs.docIdsOf(chunkTAWPVD6C_cjs.toFactCitations(composer.draftCitations))
|
|
4977
4977
|
]);
|
|
4978
4978
|
return Object.fromEntries(
|
|
4979
4979
|
documents.filter((d) => wanted.has(d.external_id)).map((d) => [d.external_id, d])
|
|
@@ -5002,7 +5002,7 @@ function ConnectedFactsPage({
|
|
|
5002
5002
|
setView(request.view === "list" ? "table" : request.view);
|
|
5003
5003
|
onRequestHandled?.("view");
|
|
5004
5004
|
}, [request?.view]);
|
|
5005
|
-
const factsRowHeight = pageView.rowHeight ===
|
|
5005
|
+
const factsRowHeight = pageView.rowHeight === chunkFWIBFGUQ_cjs.ROW_MIN ? chunkFWIBFGUQ_cjs.ROW_MIN : chunkFWIBFGUQ_cjs.rowHeightForLines(chunkFWIBFGUQ_cjs.linesForRowHeight(pageView.rowHeight));
|
|
5006
5006
|
const [isExportOpen, setIsExportOpen] = react.useState(false);
|
|
5007
5007
|
const [filterOpen, setFilterOpen] = react.useState(false);
|
|
5008
5008
|
const [factSection, setFactSection] = react.useState(null);
|
|
@@ -5027,7 +5027,7 @@ function ConnectedFactsPage({
|
|
|
5027
5027
|
};
|
|
5028
5028
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: setFactSection, className: "relative flex h-full flex-col", "data-testid": "facts-page", children: [
|
|
5029
5029
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5030
|
-
|
|
5030
|
+
chunkTAWPVD6C_cjs.FactsToolbar,
|
|
5031
5031
|
{
|
|
5032
5032
|
count: filteredNotes.length,
|
|
5033
5033
|
hasActiveFilters: filters.hasActiveFilters,
|
|
@@ -5056,7 +5056,7 @@ function ConnectedFactsPage({
|
|
|
5056
5056
|
onNewFact: composing && !editingId ? () => void 0 : composer.startNewFact,
|
|
5057
5057
|
navSlotRef: setNavSlot,
|
|
5058
5058
|
navigator: view === "table" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5059
|
-
|
|
5059
|
+
chunkFBSIWJSG_cjs.GridRowNavigator,
|
|
5060
5060
|
{
|
|
5061
5061
|
gridApi,
|
|
5062
5062
|
selectedId: editingId,
|
|
@@ -5067,9 +5067,9 @@ function ConnectedFactsPage({
|
|
|
5067
5067
|
) : null,
|
|
5068
5068
|
showToolbarRow: view !== "smart_search",
|
|
5069
5069
|
tools: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5070
|
-
view === "table" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5070
|
+
view === "table" && /* @__PURE__ */ jsxRuntime.jsx(chunkTAWPVD6C_cjs.FactsFieldsButton, { getGridApi: () => gridApiRef.current }),
|
|
5071
5071
|
view === "table" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5072
|
-
|
|
5072
|
+
chunkFWIBFGUQ_cjs.RowDensityControl,
|
|
5073
5073
|
{
|
|
5074
5074
|
rowHeight: factsRowHeight,
|
|
5075
5075
|
onRowHeightChange: pageView.setRowHeight,
|
|
@@ -5088,7 +5088,7 @@ function ConnectedFactsPage({
|
|
|
5088
5088
|
}
|
|
5089
5089
|
),
|
|
5090
5090
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5091
|
-
|
|
5091
|
+
chunkTAWPVD6C_cjs.FactComposer,
|
|
5092
5092
|
{
|
|
5093
5093
|
isOpen: composing,
|
|
5094
5094
|
isEditing: !!editingId,
|
|
@@ -5121,7 +5121,7 @@ function ConnectedFactsPage({
|
|
|
5121
5121
|
reserveSourcesSpace: view === "gantt" || view === "calendar",
|
|
5122
5122
|
citationContainer: factSection,
|
|
5123
5123
|
renderDocumentPicker: (onSelect, selectedIds, onOpen, sourcesToggle, sourcesOpen) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5124
|
-
|
|
5124
|
+
chunkTAWPVD6C_cjs.FactSourcesRow,
|
|
5125
5125
|
{
|
|
5126
5126
|
toggle: sourcesToggle,
|
|
5127
5127
|
picker: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5167,7 +5167,7 @@ function ConnectedFactsPage({
|
|
|
5167
5167
|
}
|
|
5168
5168
|
),
|
|
5169
5169
|
dateInput: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5170
|
-
|
|
5170
|
+
chunkTAWPVD6C_cjs.FactDateInput,
|
|
5171
5171
|
{
|
|
5172
5172
|
value: composer.draftDateFields,
|
|
5173
5173
|
onChange: composer.setDraftDateFields,
|
|
@@ -5177,13 +5177,13 @@ function ConnectedFactsPage({
|
|
|
5177
5177
|
}
|
|
5178
5178
|
),
|
|
5179
5179
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "scrollbar-subtle flex-1 overflow-y-auto pb-2", children: [
|
|
5180
|
-
isLoading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5180
|
+
isLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkTAWPVD6C_cjs.FactsLoading, {}) : isError ? /* @__PURE__ */ jsxRuntime.jsx(chunkTAWPVD6C_cjs.FactsLoadError, { onRetry: () => refetch() }) : smartSearch ? (
|
|
5181
5181
|
// Searches facts only (never documents). Kept before the empty-state guard so the
|
|
5182
5182
|
// search UI is reachable even in an empty workspace.
|
|
5183
5183
|
smartSearch({ selectedFactId: editingId, onOpenFact: openFactById })
|
|
5184
5184
|
) : notes.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-full flex-col items-center justify-center", children: [
|
|
5185
5185
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5186
|
-
|
|
5186
|
+
chunkTAWPVD6C_cjs.FactsEmptyState,
|
|
5187
5187
|
{
|
|
5188
5188
|
onUseExample: (text) => {
|
|
5189
5189
|
composer.setDraft(text);
|
|
@@ -5194,7 +5194,7 @@ function ConnectedFactsPage({
|
|
|
5194
5194
|
),
|
|
5195
5195
|
emptyStateExtra
|
|
5196
5196
|
] }) : view === "calendar" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5197
|
-
|
|
5197
|
+
chunkTAWPVD6C_cjs.FactsCalendar,
|
|
5198
5198
|
{
|
|
5199
5199
|
facts: filteredNotes,
|
|
5200
5200
|
onSelect: (n) => openEditIfAllowed(n),
|
|
@@ -5203,7 +5203,7 @@ function ConnectedFactsPage({
|
|
|
5203
5203
|
navigatorTotal: filteredNotes.length
|
|
5204
5204
|
}
|
|
5205
5205
|
) : view === "gantt" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5206
|
-
|
|
5206
|
+
chunkTAWPVD6C_cjs.FactsGanttPane,
|
|
5207
5207
|
{
|
|
5208
5208
|
items: ganttItems,
|
|
5209
5209
|
labelWidth: pageView.labelWidth,
|
|
@@ -5253,7 +5253,7 @@ function ConnectedFactsPage({
|
|
|
5253
5253
|
)
|
|
5254
5254
|
] }),
|
|
5255
5255
|
selectable && notes.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5256
|
-
|
|
5256
|
+
chunkTAWPVD6C_cjs.FactsBulkBar,
|
|
5257
5257
|
{
|
|
5258
5258
|
count: selection.selectedFacts.length,
|
|
5259
5259
|
onClear: selection.clearSelection,
|
|
@@ -5373,13 +5373,13 @@ function ConnectedProfileCard({
|
|
|
5373
5373
|
}
|
|
5374
5374
|
});
|
|
5375
5375
|
const display = profile?.fullName || "Unnamed";
|
|
5376
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5376
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserCircle, {}), title, children: [
|
|
5377
5377
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5378
|
-
|
|
5378
|
+
chunkNFI46I77_cjs.ProfileCard,
|
|
5379
5379
|
{
|
|
5380
5380
|
avatar: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5381
5381
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5382
|
-
|
|
5382
|
+
chunkNFI46I77_cjs.AvatarPicker,
|
|
5383
5383
|
{
|
|
5384
5384
|
pictureUrl: profile?.picture,
|
|
5385
5385
|
initials: chunkKDG6FER6_cjs.initials(display),
|
|
@@ -5426,9 +5426,9 @@ function ConnectedIdentityVerification({
|
|
|
5426
5426
|
onNameAccepted: () => notify14("Name updated to match your ID", "success")
|
|
5427
5427
|
});
|
|
5428
5428
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5429
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5429
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.IdentityVerificationCard, { flow, labels, onManageBilling }),
|
|
5430
5430
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5431
|
-
|
|
5431
|
+
chunkNFI46I77_cjs.IdentityVerificationDialog,
|
|
5432
5432
|
{
|
|
5433
5433
|
flow,
|
|
5434
5434
|
accountName: profile?.fullName ?? "",
|
|
@@ -5441,7 +5441,7 @@ function ConnectedIdentityVerification({
|
|
|
5441
5441
|
function ConnectedRequireVerified({ children, labels }) {
|
|
5442
5442
|
const { data: profile } = react$1.useProfile();
|
|
5443
5443
|
const flow = react$1.useIdentityVerification();
|
|
5444
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5444
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.RequireVerified, { flow, accountName: profile?.fullName ?? "", labels, children });
|
|
5445
5445
|
}
|
|
5446
5446
|
function defaultUnmetPasswordRequirement(password) {
|
|
5447
5447
|
if (password.length < 8) return "Minimum 8 characters";
|
|
@@ -5474,7 +5474,7 @@ function ConnectedPasswordChangeDialog({
|
|
|
5474
5474
|
onRecoveryComplete
|
|
5475
5475
|
});
|
|
5476
5476
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5477
|
-
|
|
5477
|
+
chunkNFI46I77_cjs.PasswordChangeDialog,
|
|
5478
5478
|
{
|
|
5479
5479
|
open,
|
|
5480
5480
|
onClose: form.onCancel,
|
|
@@ -5500,10 +5500,10 @@ function ConnectedSecuritySection({
|
|
|
5500
5500
|
children
|
|
5501
5501
|
}) {
|
|
5502
5502
|
const [open, setOpen] = react.useState(false);
|
|
5503
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5504
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5503
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.KeyRound, {}), title: "Security", children: [
|
|
5504
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.SettingsCard, { padding: "sm", children: [
|
|
5505
5505
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5506
|
-
|
|
5506
|
+
chunkNFI46I77_cjs.SettingsActionRow,
|
|
5507
5507
|
{
|
|
5508
5508
|
title: "Change password",
|
|
5509
5509
|
description: "Used to sign in and to unlock your account key. Changing it keeps everything readable and re-encrypts nothing.",
|
|
@@ -5524,23 +5524,23 @@ function ConnectedSecuritySection({
|
|
|
5524
5524
|
] });
|
|
5525
5525
|
}
|
|
5526
5526
|
function ConnectedNotificationPreferences({
|
|
5527
|
-
categories =
|
|
5527
|
+
categories = chunkNFI46I77_cjs.EMAIL_NOTIFICATION_CATEGORIES,
|
|
5528
5528
|
title = "Notifications"
|
|
5529
5529
|
}) {
|
|
5530
5530
|
const keys = react.useMemo(
|
|
5531
|
-
() => categories ===
|
|
5531
|
+
() => categories === chunkNFI46I77_cjs.EMAIL_NOTIFICATION_CATEGORIES ? chunkNFI46I77_cjs.EMAIL_NOTIFICATION_KEYS : categories.map((c) => c.key),
|
|
5532
5532
|
[categories]
|
|
5533
5533
|
);
|
|
5534
5534
|
const prefs = react$1.useNotificationPreferences(keys);
|
|
5535
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5536
|
-
|
|
5535
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SettingsSection, { title, children: /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5536
|
+
chunkNFI46I77_cjs.NotificationCategoryList,
|
|
5537
5537
|
{
|
|
5538
5538
|
masterId: "emailNotifications",
|
|
5539
5539
|
masterTitle: "Email Notifications",
|
|
5540
5540
|
masterDescription: "Email me about activity when I\u2019m away",
|
|
5541
5541
|
masterChecked: prefs.masterChecked,
|
|
5542
5542
|
onMasterChange: prefs.setAll,
|
|
5543
|
-
categories:
|
|
5543
|
+
categories: chunkNFI46I77_cjs.toNotificationCategories(prefs.checked, categories),
|
|
5544
5544
|
onCategoryChange: prefs.setCategory
|
|
5545
5545
|
}
|
|
5546
5546
|
) }) });
|
|
@@ -5553,14 +5553,14 @@ function ConnectedSessionsRow({
|
|
|
5553
5553
|
const sessions = react$1.useSessions({ enabled: open });
|
|
5554
5554
|
const currentSessionId = react$1.useCurrentSessionId();
|
|
5555
5555
|
const terminate = react$1.useTerminateSession();
|
|
5556
|
-
const views =
|
|
5556
|
+
const views = chunkNFI46I77_cjs.toActiveSessionViews(sessions.data ?? [], {
|
|
5557
5557
|
currentSessionId,
|
|
5558
5558
|
terminatingId: terminate.isPending ? terminate.variables : null,
|
|
5559
5559
|
renderIcon: renderSessionIcon
|
|
5560
5560
|
});
|
|
5561
5561
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5562
5562
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5563
|
-
|
|
5563
|
+
chunkNFI46I77_cjs.SettingsRow,
|
|
5564
5564
|
{
|
|
5565
5565
|
label: "Active sessions",
|
|
5566
5566
|
description: "Devices and agents currently signed in to your account.",
|
|
@@ -5582,7 +5582,7 @@ function ConnectedSessionsRow({
|
|
|
5582
5582
|
}
|
|
5583
5583
|
),
|
|
5584
5584
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5585
|
-
|
|
5585
|
+
chunkNFI46I77_cjs.ActiveSessionsDialog,
|
|
5586
5586
|
{
|
|
5587
5587
|
open,
|
|
5588
5588
|
onOpenChange: setOpen,
|
|
@@ -5624,7 +5624,7 @@ function ConnectedLogoutDialog({
|
|
|
5624
5624
|
signOut.mutate({ everywhere, reason: "manual" });
|
|
5625
5625
|
};
|
|
5626
5626
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5627
|
-
|
|
5627
|
+
chunkNFI46I77_cjs.LogoutDialog,
|
|
5628
5628
|
{
|
|
5629
5629
|
open,
|
|
5630
5630
|
onClose,
|
|
@@ -5632,7 +5632,7 @@ function ConnectedLogoutDialog({
|
|
|
5632
5632
|
onLogoutAll: () => void run(true),
|
|
5633
5633
|
canLogoutAll,
|
|
5634
5634
|
isOnline,
|
|
5635
|
-
sessions:
|
|
5635
|
+
sessions: chunkNFI46I77_cjs.toLogoutSessionViews(sessions.data ?? []),
|
|
5636
5636
|
renderSessionIcon
|
|
5637
5637
|
}
|
|
5638
5638
|
);
|
|
@@ -5654,7 +5654,7 @@ function ConnectedDangerZone({ renderSubscriptionLink }) {
|
|
|
5654
5654
|
});
|
|
5655
5655
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5656
5656
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5657
|
-
|
|
5657
|
+
chunkNFI46I77_cjs.SettingsDangerZone,
|
|
5658
5658
|
{
|
|
5659
5659
|
isOpen: zoneOpen,
|
|
5660
5660
|
onToggle: () => setZoneOpen((o) => !o),
|
|
@@ -5674,12 +5674,12 @@ function ConnectedDangerZone({ renderSubscriptionLink }) {
|
|
|
5674
5674
|
}
|
|
5675
5675
|
),
|
|
5676
5676
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5677
|
-
|
|
5677
|
+
chunkNFI46I77_cjs.DeleteAccountDialog,
|
|
5678
5678
|
{
|
|
5679
5679
|
open: dialogOpen,
|
|
5680
5680
|
onClose: flow.onClose,
|
|
5681
5681
|
step: flow.step,
|
|
5682
|
-
blockers:
|
|
5682
|
+
blockers: chunkNFI46I77_cjs.toDeleteBlockerViews(flow.blockers, renderSubscriptionLink),
|
|
5683
5683
|
onContinue: flow.onContinue,
|
|
5684
5684
|
onBack: flow.onBack,
|
|
5685
5685
|
userEmail,
|
|
@@ -5694,7 +5694,7 @@ function ConnectedDangerZone({ renderSubscriptionLink }) {
|
|
|
5694
5694
|
function ServerConnectionRow({ onRefresh, ...status }) {
|
|
5695
5695
|
const { runtimeConfig } = chunkCNHUJRQ4_cjs.useBlocksEnvironment();
|
|
5696
5696
|
const [isRefreshing, setIsRefreshing] = react.useState(false);
|
|
5697
|
-
const view =
|
|
5697
|
+
const view = chunkNFI46I77_cjs.serverConnectionView(status, runtimeConfig.deploymentDomain || "server");
|
|
5698
5698
|
const refresh = async () => {
|
|
5699
5699
|
setIsRefreshing(true);
|
|
5700
5700
|
try {
|
|
@@ -5703,8 +5703,8 @@ function ServerConnectionRow({ onRefresh, ...status }) {
|
|
|
5703
5703
|
setIsRefreshing(false);
|
|
5704
5704
|
}
|
|
5705
5705
|
};
|
|
5706
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5707
|
-
|
|
5706
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SettingsRow, { label: "Server connection", description: view.description, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5707
|
+
chunkNFI46I77_cjs.ServerConnectionButton,
|
|
5708
5708
|
{
|
|
5709
5709
|
state: view.state,
|
|
5710
5710
|
label: view.label,
|
|
@@ -5726,7 +5726,7 @@ function ConnectedAccountSettings({
|
|
|
5726
5726
|
renderSubscriptionLink
|
|
5727
5727
|
}) {
|
|
5728
5728
|
const [logoutOpen, setLogoutOpen] = react.useState(false);
|
|
5729
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5729
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.SettingsPanel, { className: "max-w-2xl", children: [
|
|
5730
5730
|
/* @__PURE__ */ jsxRuntime.jsx(ConnectedProfileCard, { avatarClassName, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5731
5731
|
ConnectedIdentityVerification,
|
|
5732
5732
|
{
|
|
@@ -5736,10 +5736,10 @@ function ConnectedAccountSettings({
|
|
|
5736
5736
|
) }),
|
|
5737
5737
|
afterProfile,
|
|
5738
5738
|
/* @__PURE__ */ jsxRuntime.jsx(ConnectedSecuritySection, { getUnmetRequirement: getUnmetPasswordRequirement, children: securityRows }),
|
|
5739
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5739
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wifi, {}), title: "Session", children: /* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.SettingsCard, { children: [
|
|
5740
5740
|
connection && /* @__PURE__ */ jsxRuntime.jsx(ServerConnectionRow, { ...connection }),
|
|
5741
5741
|
/* @__PURE__ */ jsxRuntime.jsx(ConnectedSessionsRow, { renderSessionIcon }),
|
|
5742
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5742
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SettingsRow, { label: "Logout", description: "Sign out of your account on this device.", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5743
5743
|
ui.Button,
|
|
5744
5744
|
{
|
|
5745
5745
|
type: "button",
|
|
@@ -6021,10 +6021,10 @@ function ConnectedPrivacySettings({
|
|
|
6021
6021
|
const update = react$1.useUpdateUserSettings();
|
|
6022
6022
|
const hideOnlineStatus = settings?.hide_online_status ?? false;
|
|
6023
6023
|
const dismissedTips = settings?.dismissed_tips ?? [];
|
|
6024
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6025
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6024
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.SettingsPanel, { className: "max-w-2xl", children: [
|
|
6025
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SettingsSection, { title: "Privacy and tips", children: /* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.SettingsCard, { children: [
|
|
6026
6026
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6027
|
-
|
|
6027
|
+
chunkNFI46I77_cjs.SettingsRow,
|
|
6028
6028
|
{
|
|
6029
6029
|
label: "Show Online Status",
|
|
6030
6030
|
labelFor: "showOnlineStatus",
|
|
@@ -6042,7 +6042,7 @@ function ConnectedPrivacySettings({
|
|
|
6042
6042
|
),
|
|
6043
6043
|
rows,
|
|
6044
6044
|
showTipsReset && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6045
|
-
|
|
6045
|
+
chunkNFI46I77_cjs.SettingsRow,
|
|
6046
6046
|
{
|
|
6047
6047
|
label: "Hidden tips",
|
|
6048
6048
|
description: "Restore any Smart Tips you\u2019ve hidden with \u201Cdon\u2019t show again\u201D.",
|
|
@@ -6106,13 +6106,13 @@ var COLUMNS = [
|
|
|
6106
6106
|
flex: 1,
|
|
6107
6107
|
minWidth: 120,
|
|
6108
6108
|
cellRenderer: (params) => isStandard(params.data) ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6109
|
-
|
|
6109
|
+
chunkNFI46I77_cjs.ModelProviderLabel,
|
|
6110
6110
|
{
|
|
6111
6111
|
logo: /* @__PURE__ */ jsxRuntime.jsx("img", { src: "/favicon.svg", alt: "ARBI", className: "size-3.5 flex-shrink-0 rounded-sm" }),
|
|
6112
6112
|
children: "ARBI CITY"
|
|
6113
6113
|
}
|
|
6114
6114
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
6115
|
-
|
|
6115
|
+
chunkNFI46I77_cjs.ModelProviderLabel,
|
|
6116
6116
|
{
|
|
6117
6117
|
logo: /* @__PURE__ */ jsxRuntime.jsx(react$1.ProviderIcon, { modelName: params.data?.model_name, provider: params.value, size: 14 }),
|
|
6118
6118
|
children: PROVIDER_NAMES[params.value ?? ""] || params.value || "\u2014"
|
|
@@ -6188,8 +6188,8 @@ function ConnectedPremiumModels() {
|
|
|
6188
6188
|
[save]
|
|
6189
6189
|
);
|
|
6190
6190
|
if (premiumModels.length === 0) return null;
|
|
6191
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6192
|
-
|
|
6191
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SettingsPanel, { className: "max-w-2xl space-y-4", children: /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SettingsSection, { title: "Premium models", children: /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6192
|
+
chunkNFI46I77_cjs.PremiumModelsFrame,
|
|
6193
6193
|
{
|
|
6194
6194
|
enabled: premiumModel !== "",
|
|
6195
6195
|
onEnabledChange: (enabled) => {
|
|
@@ -6318,10 +6318,10 @@ function ConnectedAppsSettings({
|
|
|
6318
6318
|
}
|
|
6319
6319
|
};
|
|
6320
6320
|
if (isLoading) {
|
|
6321
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6321
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.ConnectionsLoading, { message: "Loading connected apps\u2026" });
|
|
6322
6322
|
}
|
|
6323
6323
|
if (catalogError) {
|
|
6324
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6324
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.ConnectionsError, { message: "Failed to load connector catalog. Please refresh and try again." });
|
|
6325
6325
|
}
|
|
6326
6326
|
const visibleCatalog = catalog.filter((c) => isVendorVisible(c.vendor_key));
|
|
6327
6327
|
const sharePointVisible = isVendorVisible("microsoft_sharepoint");
|
|
@@ -6330,7 +6330,7 @@ function ConnectedAppsSettings({
|
|
|
6330
6330
|
(c) => !react$1.isMailboxSyncVendor(c.vendor_key) && !react$1.isSharePointVendor(c.vendor_key)
|
|
6331
6331
|
);
|
|
6332
6332
|
const renderCard = (entry) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6333
|
-
|
|
6333
|
+
chunkNFI46I77_cjs.ConnectionCard,
|
|
6334
6334
|
{
|
|
6335
6335
|
connection: toConnectionCardView(entry, connectedByVendor[entry.vendor_key], {
|
|
6336
6336
|
isDisconnecting: disconnect.isPending && disconnect.variables?.vendorKey === entry.vendor_key,
|
|
@@ -6347,12 +6347,12 @@ function ConnectedAppsSettings({
|
|
|
6347
6347
|
);
|
|
6348
6348
|
const renderGroup = (title, subtitle, icon2, entries) => {
|
|
6349
6349
|
if (entries.length === 0) return null;
|
|
6350
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6350
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SettingsSection, { icon: icon2, title, children: /* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.SettingsCard, { className: "space-y-3", children: [
|
|
6351
6351
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: subtitle }),
|
|
6352
6352
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: entries.map(renderCard) })
|
|
6353
6353
|
] }) });
|
|
6354
6354
|
};
|
|
6355
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6355
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.SettingsPanel, { className: "max-w-2xl", children: [
|
|
6356
6356
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-border bg-card px-5 py-4", children: [
|
|
6357
6357
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-4", children: [
|
|
6358
6358
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 flex h-10 w-10 shrink-0 items-center justify-center rounded-lg border border-border bg-background text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Mail, { className: "h-5 w-5" }) }),
|
|
@@ -6458,7 +6458,7 @@ function ConnectedAppsSettings({
|
|
|
6458
6458
|
}
|
|
6459
6459
|
)
|
|
6460
6460
|
] }),
|
|
6461
|
-
catalog.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6461
|
+
catalog.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SettingsCard, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.ConnectionsEmpty, { message: "No connectors available yet." }) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6462
6462
|
renderGroup("Email & Drive", EMAIL_AND_DRIVE_SUBTITLE, /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Mail, {}), emailCatalog),
|
|
6463
6463
|
renderGroup(
|
|
6464
6464
|
"Apps & Integrations (MCP)",
|
|
@@ -6535,7 +6535,7 @@ function ConnectedSettingsPage({
|
|
|
6535
6535
|
}, [requested]);
|
|
6536
6536
|
const controlled = section !== void 0;
|
|
6537
6537
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6538
|
-
|
|
6538
|
+
chunkNFI46I77_cjs.SettingsPage,
|
|
6539
6539
|
{
|
|
6540
6540
|
...page,
|
|
6541
6541
|
sections,
|
|
@@ -6943,6 +6943,7 @@ function ConnectedWorkspaceSettings({
|
|
|
6943
6943
|
shareDialog,
|
|
6944
6944
|
children,
|
|
6945
6945
|
onExport,
|
|
6946
|
+
footerActions,
|
|
6946
6947
|
onOpenActivity,
|
|
6947
6948
|
onLeft,
|
|
6948
6949
|
testId = "workspace-settings-page"
|
|
@@ -6960,13 +6961,13 @@ function ConnectedWorkspaceSettings({
|
|
|
6960
6961
|
const [membersExpanded, setMembersExpanded] = react.useState(false);
|
|
6961
6962
|
const [shareOpen, setShareOpen] = react.useState(false);
|
|
6962
6963
|
if (!workspace) {
|
|
6963
|
-
return /* @__PURE__ */ jsxRuntime.jsx(chunkMSFQDELO_cjs.PageLoading, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6964
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkMSFQDELO_cjs.PageLoading, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkFBSIWJSG_cjs.LoadingIndicator, { message: "Loading workspace..." }) });
|
|
6964
6965
|
}
|
|
6965
6966
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6966
6967
|
/* @__PURE__ */ jsxRuntime.jsxs(chunkMSFQDELO_cjs.WorkspacePageFrame, { testId, children: [
|
|
6967
6968
|
/* @__PURE__ */ jsxRuntime.jsxs(chunkMSFQDELO_cjs.WorkspaceIdentityPanel, { children: [
|
|
6968
6969
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6969
|
-
|
|
6970
|
+
chunkFBSIWJSG_cjs.EntityIdentityBar,
|
|
6970
6971
|
{
|
|
6971
6972
|
testId: "workspace-identity-bar",
|
|
6972
6973
|
canEdit: isOwner,
|
|
@@ -6983,7 +6984,7 @@ function ConnectedWorkspaceSettings({
|
|
|
6983
6984
|
label: "Name",
|
|
6984
6985
|
value: workspace.name,
|
|
6985
6986
|
placeholder: "Untitled",
|
|
6986
|
-
maxLength:
|
|
6987
|
+
maxLength: chunkFBSIWJSG_cjs.IDENTITY_NAME_MAX_LENGTH,
|
|
6987
6988
|
valueClassName: "truncate text-base font-semibold",
|
|
6988
6989
|
testId: "workspace-home-title",
|
|
6989
6990
|
hideLabel: true,
|
|
@@ -7079,19 +7080,22 @@ function ConnectedWorkspaceSettings({
|
|
|
7079
7080
|
)
|
|
7080
7081
|
] }),
|
|
7081
7082
|
children,
|
|
7082
|
-
isMember && onExport && /* @__PURE__ */ jsxRuntime.
|
|
7083
|
-
|
|
7084
|
-
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
-
|
|
7083
|
+
isMember && (onExport || footerActions) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2 px-4 pb-4", children: [
|
|
7084
|
+
footerActions,
|
|
7085
|
+
onExport && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7086
|
+
ui.Button,
|
|
7087
|
+
{
|
|
7088
|
+
variant: "outline",
|
|
7089
|
+
size: "sm",
|
|
7090
|
+
onClick: onExport,
|
|
7091
|
+
"data-testid": "workspace-transfer-button",
|
|
7092
|
+
children: [
|
|
7093
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.FolderInput, { className: "size-4" }),
|
|
7094
|
+
"Export, copy or move\u2026"
|
|
7095
|
+
]
|
|
7096
|
+
}
|
|
7097
|
+
)
|
|
7098
|
+
] }),
|
|
7095
7099
|
!isOwner && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7096
7100
|
chunkMSFQDELO_cjs.LeaveFooter,
|
|
7097
7101
|
{
|
|
@@ -7274,9 +7278,9 @@ function ConnectedMailboxSyncDialog({
|
|
|
7274
7278
|
showDescription: true,
|
|
7275
7279
|
className: "w-[92vw] sm:max-w-lg",
|
|
7276
7280
|
children: [
|
|
7277
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7278
|
-
!lockedWorkspaceExtId && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7279
|
-
|
|
7281
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.SyncDialogBody, { children: [
|
|
7282
|
+
!lockedWorkspaceExtId && /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SyncField, { label: "Target workspace", htmlFor: "sync-workspace", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7283
|
+
chunkNFI46I77_cjs.SyncSelect,
|
|
7280
7284
|
{
|
|
7281
7285
|
id: "sync-workspace",
|
|
7282
7286
|
value: workspaceExtId,
|
|
@@ -7285,9 +7289,9 @@ function ConnectedMailboxSyncDialog({
|
|
|
7285
7289
|
options: memberWorkspaces.map((w) => ({ value: w.external_id, label: w.name }))
|
|
7286
7290
|
}
|
|
7287
7291
|
) }),
|
|
7288
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7292
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.SyncField, { label: "Backfill window", htmlFor: "sync-backfill", children: [
|
|
7289
7293
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7290
|
-
|
|
7294
|
+
chunkNFI46I77_cjs.SyncSelect,
|
|
7291
7295
|
{
|
|
7292
7296
|
id: "sync-backfill",
|
|
7293
7297
|
value: backfill,
|
|
@@ -7307,17 +7311,17 @@ function ConnectedMailboxSyncDialog({
|
|
|
7307
7311
|
"aria-label": "Import emails since date"
|
|
7308
7312
|
}
|
|
7309
7313
|
),
|
|
7310
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7314
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SyncSmallNote, { children: "Emails are always imported from this date onward \u2014 the start point never moves." })
|
|
7311
7315
|
] })
|
|
7312
7316
|
] }),
|
|
7313
7317
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7314
|
-
|
|
7318
|
+
chunkNFI46I77_cjs.SyncField,
|
|
7315
7319
|
{
|
|
7316
7320
|
label: `Folders to import${selectedFolders.length > 0 ? ` (${selectedFolders.length})` : ""}`,
|
|
7317
7321
|
hint: "Select at least one folder to import.",
|
|
7318
|
-
actions: folders.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7322
|
+
actions: folders.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.SyncLinkRow, { children: [
|
|
7319
7323
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7320
|
-
|
|
7324
|
+
chunkNFI46I77_cjs.SyncLinkButton,
|
|
7321
7325
|
{
|
|
7322
7326
|
onClick: () => setExpandAllNonce((n) => n + 1),
|
|
7323
7327
|
testId: "mail-folders-expand-all",
|
|
@@ -7325,20 +7329,20 @@ function ConnectedMailboxSyncDialog({
|
|
|
7325
7329
|
}
|
|
7326
7330
|
),
|
|
7327
7331
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7328
|
-
|
|
7332
|
+
chunkNFI46I77_cjs.SyncLinkButton,
|
|
7329
7333
|
{
|
|
7330
7334
|
onClick: () => setCollapseAllNonce((n) => n + 1),
|
|
7331
7335
|
testId: "mail-folders-collapse-all",
|
|
7332
7336
|
children: "Collapse all"
|
|
7333
7337
|
}
|
|
7334
7338
|
),
|
|
7335
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7339
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SyncLinkButton, { onClick: toggleAllFolders, children: allSelected ? "Clear all" : "Select all" })
|
|
7336
7340
|
] }),
|
|
7337
|
-
children: foldersLoading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7341
|
+
children: foldersLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SyncLoading, { children: "Loading folders\u2026" }) : foldersError ? (
|
|
7338
7342
|
// A failed fetch is not an empty mailbox: it hides auth/scope errors (e.g. a Gmail
|
|
7339
7343
|
// account needing reconnect).
|
|
7340
7344
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7341
|
-
|
|
7345
|
+
chunkNFI46I77_cjs.SyncReconnectNotice,
|
|
7342
7346
|
{
|
|
7343
7347
|
message: `Couldn\u2019t load folders from ${catalog.display_name}. Reconnect the account and try again.`,
|
|
7344
7348
|
onReconnect: () => void reconnect(),
|
|
@@ -7346,7 +7350,7 @@ function ConnectedMailboxSyncDialog({
|
|
|
7346
7350
|
testId: "folders-reconnect"
|
|
7347
7351
|
}
|
|
7348
7352
|
)
|
|
7349
|
-
) : folders.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7353
|
+
) : folders.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SyncNote, { children: "No folders found." }) : /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SyncTreeFrame, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7350
7354
|
chunkCROGFB46_cjs.MailFolderTree,
|
|
7351
7355
|
{
|
|
7352
7356
|
nodes: folderTree,
|
|
@@ -7358,9 +7362,9 @@ function ConnectedMailboxSyncDialog({
|
|
|
7358
7362
|
) })
|
|
7359
7363
|
}
|
|
7360
7364
|
),
|
|
7361
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7365
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.SyncOptions, { children: [
|
|
7362
7366
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7363
|
-
|
|
7367
|
+
chunkNFI46I77_cjs.SyncOptionToggle,
|
|
7364
7368
|
{
|
|
7365
7369
|
checked: skipDuplicates,
|
|
7366
7370
|
onCheckedChange: setSkipDuplicates,
|
|
@@ -7370,7 +7374,7 @@ function ConnectedMailboxSyncDialog({
|
|
|
7370
7374
|
}
|
|
7371
7375
|
),
|
|
7372
7376
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7373
|
-
|
|
7377
|
+
chunkNFI46I77_cjs.SyncOptionToggle,
|
|
7374
7378
|
{
|
|
7375
7379
|
checked: autoRename,
|
|
7376
7380
|
onCheckedChange: setAutoRename,
|
|
@@ -7380,7 +7384,7 @@ function ConnectedMailboxSyncDialog({
|
|
|
7380
7384
|
}
|
|
7381
7385
|
),
|
|
7382
7386
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7383
|
-
|
|
7387
|
+
chunkNFI46I77_cjs.SyncOptionToggle,
|
|
7384
7388
|
{
|
|
7385
7389
|
checked: shared,
|
|
7386
7390
|
onCheckedChange: setShared,
|
|
@@ -7390,7 +7394,7 @@ function ConnectedMailboxSyncDialog({
|
|
|
7390
7394
|
}
|
|
7391
7395
|
),
|
|
7392
7396
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7393
|
-
|
|
7397
|
+
chunkNFI46I77_cjs.SyncOptionToggle,
|
|
7394
7398
|
{
|
|
7395
7399
|
checked: autoSync,
|
|
7396
7400
|
onCheckedChange: setAutoSync,
|
|
@@ -7402,7 +7406,7 @@ function ConnectedMailboxSyncDialog({
|
|
|
7402
7406
|
] })
|
|
7403
7407
|
] }),
|
|
7404
7408
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7405
|
-
|
|
7409
|
+
chunkNFI46I77_cjs.SyncDialogFooter,
|
|
7406
7410
|
{
|
|
7407
7411
|
onCancel: () => onOpenChange(false),
|
|
7408
7412
|
onSave: handleEnableSubmit,
|
|
@@ -7464,7 +7468,7 @@ function DriveFolderNode({
|
|
|
7464
7468
|
const mightHaveChildren = docCount == null || docCount > 0;
|
|
7465
7469
|
const orderedChildren = [...children].sort((a, b) => a.name.localeCompare(b.name));
|
|
7466
7470
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7467
|
-
|
|
7471
|
+
chunkNFI46I77_cjs.SyncFolderRow,
|
|
7468
7472
|
{
|
|
7469
7473
|
id: folder.id,
|
|
7470
7474
|
name: folder.name,
|
|
@@ -7478,7 +7482,7 @@ function DriveFolderNode({
|
|
|
7478
7482
|
onCheckedChange: () => onToggle(folder.id),
|
|
7479
7483
|
count: typeof docCount === "number" ? docCount : void 0,
|
|
7480
7484
|
isCountLoading: isSelectable && countLoading,
|
|
7481
|
-
children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7485
|
+
children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SyncFolderStatus, { depth, kind: "loading" }) : orderedChildren.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SyncFolderStatus, { depth, kind: "empty" }) : orderedChildren.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7482
7486
|
DriveFolderNode,
|
|
7483
7487
|
{
|
|
7484
7488
|
vendorKey,
|
|
@@ -7624,9 +7628,9 @@ function ConnectedDriveSyncDialog({
|
|
|
7624
7628
|
showDescription: true,
|
|
7625
7629
|
className: "w-[92vw] sm:max-w-lg",
|
|
7626
7630
|
children: [
|
|
7627
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7628
|
-
!lockedWorkspaceExtId && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7629
|
-
|
|
7631
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.SyncDialogBody, { children: [
|
|
7632
|
+
!lockedWorkspaceExtId && /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SyncField, { label: "Target workspace", htmlFor: "drive-sync-workspace", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7633
|
+
chunkNFI46I77_cjs.SyncSelect,
|
|
7630
7634
|
{
|
|
7631
7635
|
id: "drive-sync-workspace",
|
|
7632
7636
|
value: workspaceExtId,
|
|
@@ -7636,13 +7640,13 @@ function ConnectedDriveSyncDialog({
|
|
|
7636
7640
|
}
|
|
7637
7641
|
) }),
|
|
7638
7642
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7639
|
-
|
|
7643
|
+
chunkNFI46I77_cjs.SyncField,
|
|
7640
7644
|
{
|
|
7641
7645
|
label: `Folders to import${selectedFolders.length > 0 ? ` (${selectedFolders.length})` : ""}`,
|
|
7642
7646
|
hint: "Select at least one folder. Importing a folder includes everything inside it.",
|
|
7643
|
-
actions: orderedFolders.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7647
|
+
actions: orderedFolders.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.SyncLinkRow, { children: [
|
|
7644
7648
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7645
|
-
|
|
7649
|
+
chunkNFI46I77_cjs.SyncLinkButton,
|
|
7646
7650
|
{
|
|
7647
7651
|
onClick: () => setExpandAllNonce((n) => n + 1),
|
|
7648
7652
|
testId: "drive-folders-expand-all",
|
|
@@ -7650,7 +7654,7 @@ function ConnectedDriveSyncDialog({
|
|
|
7650
7654
|
}
|
|
7651
7655
|
),
|
|
7652
7656
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7653
|
-
|
|
7657
|
+
chunkNFI46I77_cjs.SyncLinkButton,
|
|
7654
7658
|
{
|
|
7655
7659
|
onClick: () => setCollapseAllNonce((n) => n + 1),
|
|
7656
7660
|
testId: "drive-folders-collapse-all",
|
|
@@ -7658,19 +7662,19 @@ function ConnectedDriveSyncDialog({
|
|
|
7658
7662
|
}
|
|
7659
7663
|
)
|
|
7660
7664
|
] }),
|
|
7661
|
-
children: foldersLoading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7662
|
-
|
|
7665
|
+
children: foldersLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SyncLoading, { children: "Loading folders\u2026" }) : needsReconnect ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7666
|
+
chunkNFI46I77_cjs.SyncReconnectNotice,
|
|
7663
7667
|
{
|
|
7664
7668
|
...reconnectButtonProps,
|
|
7665
7669
|
message: `Reconnect ${catalog.display_name} to enable ${productName} \u2014 your account needs to grant file access.`
|
|
7666
7670
|
}
|
|
7667
7671
|
) : foldersError ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7668
|
-
|
|
7672
|
+
chunkNFI46I77_cjs.SyncReconnectNotice,
|
|
7669
7673
|
{
|
|
7670
7674
|
...reconnectButtonProps,
|
|
7671
7675
|
message: `Couldn\u2019t load folders from ${productName}. Reconnect the account and try again.`
|
|
7672
7676
|
}
|
|
7673
|
-
) : orderedFolders.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7677
|
+
) : orderedFolders.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SyncNote, { children: "No folders found." }) : /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SyncTreeFrame, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", "data-testid": "drive-folder-tree", children: orderedFolders.map((f) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7674
7678
|
DriveFolderNode,
|
|
7675
7679
|
{
|
|
7676
7680
|
vendorKey: catalog.vendor_key,
|
|
@@ -7687,9 +7691,9 @@ function ConnectedDriveSyncDialog({
|
|
|
7687
7691
|
)) }) })
|
|
7688
7692
|
}
|
|
7689
7693
|
),
|
|
7690
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7694
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.SyncOptions, { children: [
|
|
7691
7695
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7692
|
-
|
|
7696
|
+
chunkNFI46I77_cjs.SyncOptionToggle,
|
|
7693
7697
|
{
|
|
7694
7698
|
checked: skipDuplicates,
|
|
7695
7699
|
onCheckedChange: setSkipDuplicates,
|
|
@@ -7698,7 +7702,7 @@ function ConnectedDriveSyncDialog({
|
|
|
7698
7702
|
}
|
|
7699
7703
|
),
|
|
7700
7704
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7701
|
-
|
|
7705
|
+
chunkNFI46I77_cjs.SyncOptionToggle,
|
|
7702
7706
|
{
|
|
7703
7707
|
checked: autoRename,
|
|
7704
7708
|
onCheckedChange: setAutoRename,
|
|
@@ -7707,7 +7711,7 @@ function ConnectedDriveSyncDialog({
|
|
|
7707
7711
|
}
|
|
7708
7712
|
),
|
|
7709
7713
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7710
|
-
|
|
7714
|
+
chunkNFI46I77_cjs.SyncOptionToggle,
|
|
7711
7715
|
{
|
|
7712
7716
|
checked: shared,
|
|
7713
7717
|
onCheckedChange: setShared,
|
|
@@ -7716,7 +7720,7 @@ function ConnectedDriveSyncDialog({
|
|
|
7716
7720
|
}
|
|
7717
7721
|
),
|
|
7718
7722
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7719
|
-
|
|
7723
|
+
chunkNFI46I77_cjs.SyncOptionToggle,
|
|
7720
7724
|
{
|
|
7721
7725
|
checked: autoSync,
|
|
7722
7726
|
onCheckedChange: setAutoSync,
|
|
@@ -7728,7 +7732,7 @@ function ConnectedDriveSyncDialog({
|
|
|
7728
7732
|
] })
|
|
7729
7733
|
] }),
|
|
7730
7734
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7731
|
-
|
|
7735
|
+
chunkNFI46I77_cjs.SyncDialogFooter,
|
|
7732
7736
|
{
|
|
7733
7737
|
onCancel: () => onOpenChange(false),
|
|
7734
7738
|
onSave: handleEnableSubmit,
|
|
@@ -7760,7 +7764,7 @@ function BillingProjectEntity({
|
|
|
7760
7764
|
subscription = "none",
|
|
7761
7765
|
...props
|
|
7762
7766
|
}) {
|
|
7763
|
-
const { stripeEnabled } =
|
|
7767
|
+
const { stripeEnabled } = chunkSCK3GAE5_cjs.useBillingSupport();
|
|
7764
7768
|
const isPaid2 = stripeEnabled && (subscription === "active" || subscription === "past_due" || subscription === "dev");
|
|
7765
7769
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.ProjectEntity, { ...props, subscription, isPaid: isPaid2 });
|
|
7766
7770
|
}
|
|
@@ -7787,8 +7791,8 @@ function InvoicesModal({
|
|
|
7787
7791
|
key: inv.number ?? String(i),
|
|
7788
7792
|
date: formatInvoiceDate(inv.date),
|
|
7789
7793
|
kind: KIND_LABELS[inv.kind],
|
|
7790
|
-
amount:
|
|
7791
|
-
amountNote: inv.amount_ex_vat != null && inv.amount_ex_vat !== inv.amount ? `${
|
|
7794
|
+
amount: chunkSCK3GAE5_cjs.formatMoney(inv.amount, inv.currency),
|
|
7795
|
+
amountNote: inv.amount_ex_vat != null && inv.amount_ex_vat !== inv.amount ? `${chunkSCK3GAE5_cjs.formatMoney(inv.amount_ex_vat, inv.currency)} ex VAT` : void 0,
|
|
7792
7796
|
status: inv.status,
|
|
7793
7797
|
isPaid: isPaid2,
|
|
7794
7798
|
href: inv.hosted_invoice_url ?? inv.url ?? inv.pdf_url ?? void 0,
|
|
@@ -7796,7 +7800,7 @@ function InvoicesModal({
|
|
|
7796
7800
|
};
|
|
7797
7801
|
});
|
|
7798
7802
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7799
|
-
|
|
7803
|
+
chunkNFI46I77_cjs.InvoicesDialog,
|
|
7800
7804
|
{
|
|
7801
7805
|
open,
|
|
7802
7806
|
onOpenChange,
|
|
@@ -7823,7 +7827,7 @@ function StripeCheckoutModal({
|
|
|
7823
7827
|
const [clientSecret, setClientSecret] = react.useState(null);
|
|
7824
7828
|
const [isCreating, setIsCreating] = react.useState(false);
|
|
7825
7829
|
const [stripe, setStripe] = react.useState(null);
|
|
7826
|
-
const { stripeEnabled, checkout } =
|
|
7830
|
+
const { stripeEnabled, checkout } = chunkSCK3GAE5_cjs.useBillingSupport();
|
|
7827
7831
|
const createCheckout = react$1.useCreateProjectCheckout();
|
|
7828
7832
|
const refreshProject = react$1.useRefreshProject();
|
|
7829
7833
|
const invalidateProjects = react$1.useInvalidateProjects();
|
|
@@ -7850,7 +7854,7 @@ function StripeCheckoutModal({
|
|
|
7850
7854
|
projectExtId,
|
|
7851
7855
|
body: {
|
|
7852
7856
|
interval,
|
|
7853
|
-
packs:
|
|
7857
|
+
packs: chunkSCK3GAE5_cjs.PRO_PACKS,
|
|
7854
7858
|
ai_blocks: aiBlocks,
|
|
7855
7859
|
storage_blocks: storageBlocks,
|
|
7856
7860
|
addon_budget_pence: addonBudgetPence,
|
|
@@ -7866,7 +7870,7 @@ function StripeCheckoutModal({
|
|
|
7866
7870
|
},
|
|
7867
7871
|
onError: (error) => {
|
|
7868
7872
|
console.error("Failed to create checkout session:", error);
|
|
7869
|
-
const reason =
|
|
7873
|
+
const reason = chunkSCK3GAE5_cjs.apiErrorDetail(error)?.message;
|
|
7870
7874
|
shell.notify.error(
|
|
7871
7875
|
reason ? `Checkout didn't start: ${reason}` : "Checkout didn't start. Try again."
|
|
7872
7876
|
);
|
|
@@ -7899,9 +7903,9 @@ function StripeCheckoutModal({
|
|
|
7899
7903
|
}
|
|
7900
7904
|
}, [open]);
|
|
7901
7905
|
const isStripeConfigured = stripeEnabled;
|
|
7902
|
-
const vatNote = quote ? `${
|
|
7906
|
+
const vatNote = quote ? `${chunkSCK3GAE5_cjs.checkoutItemsLabel(aiBlocks, storageBlocks)} \xB7 ${chunkSCK3GAE5_cjs.quoteTotalLine(quote)}` : null;
|
|
7903
7907
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7904
|
-
|
|
7908
|
+
chunkNFI46I77_cjs.CheckoutDialogFrame,
|
|
7905
7909
|
{
|
|
7906
7910
|
open,
|
|
7907
7911
|
onOpenChange,
|
|
@@ -7911,7 +7915,7 @@ function StripeCheckoutModal({
|
|
|
7911
7915
|
children: clientSecret && !!stripe && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7912
7916
|
vatNote && /* @__PURE__ */ jsxRuntime.jsx("p", { "data-testid": "checkout-vat-note", className: "mb-4 text-sm text-muted-foreground", children: vatNote }),
|
|
7913
7917
|
checkout?.render(stripe, { clientSecret, onComplete: handleComplete }),
|
|
7914
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7918
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.MoreInfo, { title: "Paying", label: "Payment help", testId: "checkout-payment-help", children: [
|
|
7915
7919
|
/* @__PURE__ */ jsxRuntime.jsx("p", { "data-testid": "checkout-decline-note", children: "Card declined? Nothing was charged. Try again or use another card." }),
|
|
7916
7920
|
/* @__PURE__ */ jsxRuntime.jsx("p", { "data-testid": "checkout-vat-id-note", children: "No VAT number? Leave \u2018purchasing as a business\u2019 unticked." }),
|
|
7917
7921
|
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "Add-ons chosen here are on the first invoice with the plan and renew with it until you reduce them." })
|
|
@@ -7953,31 +7957,31 @@ function defaultBillingCountry(languages = typeof navigator === "undefined" ? []
|
|
|
7953
7957
|
}
|
|
7954
7958
|
var choiceForPacks = (packs) => packs > 0 ? "pro" : "free";
|
|
7955
7959
|
function proCard(selected, isAnnual, prices) {
|
|
7956
|
-
const packs =
|
|
7960
|
+
const packs = chunkSCK3GAE5_cjs.PLAN_CHOICE_PACKS.pro;
|
|
7957
7961
|
const currency = prices.monthly?.currency ?? prices.annual?.currency ?? "gbp";
|
|
7958
|
-
const monthly =
|
|
7959
|
-
const annual =
|
|
7962
|
+
const monthly = chunkSCK3GAE5_cjs.packPrice(prices.monthly, packs);
|
|
7963
|
+
const annual = chunkSCK3GAE5_cjs.packPrice(prices.annual, packs);
|
|
7960
7964
|
const current = isAnnual ? annual : monthly;
|
|
7961
7965
|
const effectiveMonthly = current ? isAnnual ? current.amount_ex_vat / 12 : current.amount_ex_vat : null;
|
|
7962
7966
|
return {
|
|
7963
7967
|
id: packs,
|
|
7964
|
-
name:
|
|
7968
|
+
name: chunkSCK3GAE5_cjs.planNameForPacks(packs),
|
|
7965
7969
|
isSelected: selected === "pro",
|
|
7966
7970
|
price: current && effectiveMonthly != null ? {
|
|
7967
7971
|
annual: isAnnual,
|
|
7968
|
-
yearlyStrike: isAnnual && monthly && monthly.amount_ex_vat * 12 > current.amount_ex_vat ?
|
|
7969
|
-
yearlyTotal: isAnnual ?
|
|
7972
|
+
yearlyStrike: isAnnual && monthly && monthly.amount_ex_vat * 12 > current.amount_ex_vat ? chunkSCK3GAE5_cjs.formatMoney(monthly.amount_ex_vat * 12, currency) : void 0,
|
|
7973
|
+
yearlyTotal: isAnnual ? chunkSCK3GAE5_cjs.formatMoney(current.amount_ex_vat, currency) : void 0,
|
|
7970
7974
|
intervalLabel: isAnnual ? "/yr + VAT" : "/mo",
|
|
7971
|
-
monthly:
|
|
7975
|
+
monthly: chunkSCK3GAE5_cjs.formatMoney(Math.round(effectiveMonthly), currency),
|
|
7972
7976
|
taxLabel: "+ VAT",
|
|
7973
7977
|
// The inclusive figure for a UK customer, right under the headline.
|
|
7974
|
-
note: `${
|
|
7978
|
+
note: `${chunkSCK3GAE5_cjs.formatMoney(current.amount, currency)}${isAnnual ? "/yr" : "/mo"} incl. UK VAT`
|
|
7975
7979
|
} : void 0,
|
|
7976
7980
|
features: [
|
|
7977
|
-
`${react$1.formatGbp(
|
|
7978
|
-
`${
|
|
7981
|
+
`${react$1.formatGbp(chunkSCK3GAE5_cjs.PRO_AI_GBP)} of AI usage / month`,
|
|
7982
|
+
`${chunkSCK3GAE5_cjs.PRO_STORAGE_GB} GB storage`,
|
|
7979
7983
|
"Unlimited collaborators",
|
|
7980
|
-
...isAnnual ? [
|
|
7984
|
+
...isAnnual ? [chunkSCK3GAE5_cjs.ANNUAL_PREMIUM_AI_NOTE] : []
|
|
7981
7985
|
]
|
|
7982
7986
|
};
|
|
7983
7987
|
}
|
|
@@ -7989,9 +7993,9 @@ function buildPlanCards(selected, isAnnual, prices, isOnFree) {
|
|
|
7989
7993
|
isCurrent: isOnFree,
|
|
7990
7994
|
isSelected: selected === "free" && !isOnFree,
|
|
7991
7995
|
features: [
|
|
7992
|
-
`${react$1.formatGbp(
|
|
7993
|
-
`${
|
|
7994
|
-
|
|
7996
|
+
`${react$1.formatGbp(chunkSCK3GAE5_cjs.FREE_AI_GBP)} of AI usage / month`,
|
|
7997
|
+
`${chunkSCK3GAE5_cjs.FREE_STORAGE_MB.toLocaleString("en-US")} MB storage`,
|
|
7998
|
+
chunkSCK3GAE5_cjs.FREE_COLLABORATORS === 0 ? "Just you" : `${chunkSCK3GAE5_cjs.FREE_COLLABORATORS} collaborators`
|
|
7995
7999
|
]
|
|
7996
8000
|
};
|
|
7997
8001
|
return [free, proCard(selected, isAnnual, prices)];
|
|
@@ -8004,7 +8008,7 @@ function PlanChoiceCards({
|
|
|
8004
8008
|
isOnFree = false
|
|
8005
8009
|
}) {
|
|
8006
8010
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8007
|
-
|
|
8011
|
+
chunkNFI46I77_cjs.PlanCardGrid,
|
|
8008
8012
|
{
|
|
8009
8013
|
plans: buildPlanCards(selected, isAnnual, prices, isOnFree),
|
|
8010
8014
|
onSelect: (id) => onSelect(choiceForPacks(id))
|
|
@@ -8013,13 +8017,13 @@ function PlanChoiceCards({
|
|
|
8013
8017
|
}
|
|
8014
8018
|
function PlanInfoPopover2() {
|
|
8015
8019
|
const { openSettings } = chunkCNHUJRQ4_cjs.useBlocksEnvironment();
|
|
8016
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8020
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.PlanInfoPopover, { onOpenModelList: () => openSettings("chat") });
|
|
8017
8021
|
}
|
|
8018
8022
|
function CheckoutAddonBudget({
|
|
8019
8023
|
value,
|
|
8020
8024
|
onChange
|
|
8021
8025
|
}) {
|
|
8022
|
-
const budget =
|
|
8026
|
+
const budget = chunkSCK3GAE5_cjs.parseBudgetPounds(value);
|
|
8023
8027
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8024
8028
|
"div",
|
|
8025
8029
|
{
|
|
@@ -8042,7 +8046,7 @@ function CheckoutAddonBudget({
|
|
|
8042
8046
|
step: 25,
|
|
8043
8047
|
className: "h-8 w-24",
|
|
8044
8048
|
value,
|
|
8045
|
-
placeholder: String(
|
|
8049
|
+
placeholder: String(chunkSCK3GAE5_cjs.DEFAULT_SPEND_CAP_PENCE / 100),
|
|
8046
8050
|
onChange: (e) => onChange(e.target.value),
|
|
8047
8051
|
"aria-invalid": budget === void 0,
|
|
8048
8052
|
"data-testid": "checkout-addon-budget-input"
|
|
@@ -8060,7 +8064,7 @@ function BlockStepper({
|
|
|
8060
8064
|
onChange,
|
|
8061
8065
|
testId
|
|
8062
8066
|
}) {
|
|
8063
|
-
const set = (n) => onChange(Math.max(0, Math.min(
|
|
8067
|
+
const set = (n) => onChange(Math.max(0, Math.min(chunkSCK3GAE5_cjs.MAX_CHECKOUT_BLOCKS, n)));
|
|
8064
8068
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8065
8069
|
"div",
|
|
8066
8070
|
{
|
|
@@ -8104,7 +8108,7 @@ function BlockStepper({
|
|
|
8104
8108
|
className: "size-8",
|
|
8105
8109
|
"aria-label": `More: ${label}`,
|
|
8106
8110
|
onClick: () => set(value + 1),
|
|
8107
|
-
disabled: value >=
|
|
8111
|
+
disabled: value >= chunkSCK3GAE5_cjs.MAX_CHECKOUT_BLOCKS,
|
|
8108
8112
|
"data-testid": `${testId}-increment`,
|
|
8109
8113
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "size-4" })
|
|
8110
8114
|
}
|
|
@@ -8121,8 +8125,8 @@ function CheckoutAddonBlocks({
|
|
|
8121
8125
|
onStorageBlocksChange,
|
|
8122
8126
|
price
|
|
8123
8127
|
}) {
|
|
8124
|
-
const ai =
|
|
8125
|
-
const storage =
|
|
8128
|
+
const ai = chunkSCK3GAE5_cjs.addonPrice(price, "ai_usage");
|
|
8129
|
+
const storage = chunkSCK3GAE5_cjs.addonPrice(price, "storage");
|
|
8126
8130
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8127
8131
|
"div",
|
|
8128
8132
|
{
|
|
@@ -8132,8 +8136,8 @@ function CheckoutAddonBlocks({
|
|
|
8132
8136
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8133
8137
|
BlockStepper,
|
|
8134
8138
|
{
|
|
8135
|
-
label: `+${react$1.formatGbp(ai?.ai_gbp ||
|
|
8136
|
-
priceText:
|
|
8139
|
+
label: `+${react$1.formatGbp(ai?.ai_gbp || chunkSCK3GAE5_cjs.ADDON_BLOCK_AI_GBP)} of AI usage`,
|
|
8140
|
+
priceText: chunkSCK3GAE5_cjs.checkoutBlockPriceText(price, "ai_usage"),
|
|
8137
8141
|
value: aiBlocks,
|
|
8138
8142
|
onChange: onAiBlocksChange,
|
|
8139
8143
|
testId: "checkout-ai-blocks"
|
|
@@ -8142,8 +8146,8 @@ function CheckoutAddonBlocks({
|
|
|
8142
8146
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8143
8147
|
BlockStepper,
|
|
8144
8148
|
{
|
|
8145
|
-
label: `+${storage?.storage_gb ||
|
|
8146
|
-
priceText:
|
|
8149
|
+
label: `+${storage?.storage_gb || chunkSCK3GAE5_cjs.STORAGE_BLOCK_GB} GB storage`,
|
|
8150
|
+
priceText: chunkSCK3GAE5_cjs.checkoutBlockPriceText(price, "storage"),
|
|
8147
8151
|
value: storageBlocks,
|
|
8148
8152
|
onChange: onStorageBlocksChange,
|
|
8149
8153
|
testId: "checkout-storage-blocks"
|
|
@@ -8198,14 +8202,14 @@ function ReferralRewardSummary2({
|
|
|
8198
8202
|
if (!reward) return null;
|
|
8199
8203
|
const applied = totalCents != null && currency ? applyReferralReward(totalCents, reward, currency) : null;
|
|
8200
8204
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8201
|
-
|
|
8205
|
+
chunkNFI46I77_cjs.ReferralRewardSummary,
|
|
8202
8206
|
{
|
|
8203
|
-
amountLabel:
|
|
8207
|
+
amountLabel: chunkSCK3GAE5_cjs.formatMoney(reward.amount, reward.currency),
|
|
8204
8208
|
breakdown: applied && totalCents != null && currency ? {
|
|
8205
|
-
subtotal:
|
|
8206
|
-
reward:
|
|
8207
|
-
youPay:
|
|
8208
|
-
rollover: applied.remaining > 0 ?
|
|
8209
|
+
subtotal: chunkSCK3GAE5_cjs.formatMoney(totalCents, currency),
|
|
8210
|
+
reward: chunkSCK3GAE5_cjs.formatMoney(applied.bonus, currency),
|
|
8211
|
+
youPay: chunkSCK3GAE5_cjs.formatMoney(applied.youPay, currency),
|
|
8212
|
+
rollover: applied.remaining > 0 ? chunkSCK3GAE5_cjs.formatMoney(applied.remaining, currency) : void 0
|
|
8209
8213
|
} : void 0
|
|
8210
8214
|
}
|
|
8211
8215
|
);
|
|
@@ -8213,7 +8217,7 @@ function ReferralRewardSummary2({
|
|
|
8213
8217
|
function ReferralRewardNote2() {
|
|
8214
8218
|
const reward = useReferralReward();
|
|
8215
8219
|
if (!reward) return null;
|
|
8216
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8220
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.ReferralRewardNote, { amountLabel: chunkSCK3GAE5_cjs.formatMoney(reward.amount, reward.currency) });
|
|
8217
8221
|
}
|
|
8218
8222
|
function CheckoutTotal({
|
|
8219
8223
|
state,
|
|
@@ -8242,7 +8246,7 @@ function CheckoutTotal({
|
|
|
8242
8246
|
className: "text-sm font-medium text-foreground",
|
|
8243
8247
|
"data-testid": "checkout-total",
|
|
8244
8248
|
"aria-live": "polite",
|
|
8245
|
-
children: state.quote && !state.isLoading ?
|
|
8249
|
+
children: state.quote && !state.isLoading ? chunkSCK3GAE5_cjs.quoteTotalLine(state.quote) : state.isLoading ? "Calculating total\u2026" : state.error
|
|
8246
8250
|
}
|
|
8247
8251
|
)
|
|
8248
8252
|
] });
|
|
@@ -8275,13 +8279,13 @@ function useCheckoutQuote({
|
|
|
8275
8279
|
...aiBlocks || storageBlocks ? { addons: { ai_usage: aiBlocks, storage: storageBlocks } } : {}
|
|
8276
8280
|
} : null
|
|
8277
8281
|
);
|
|
8278
|
-
const { code, message } = query.isError ?
|
|
8279
|
-
const locationInvalid = code ===
|
|
8282
|
+
const { code, message } = query.isError ? chunkSCK3GAE5_cjs.quoteError(query.error) : {};
|
|
8283
|
+
const locationInvalid = code === chunkSCK3GAE5_cjs.TAX_LOCATION_INVALID;
|
|
8280
8284
|
const isLoading = enabled && (query.isLoading || postal !== postalCode.trim());
|
|
8281
8285
|
return {
|
|
8282
8286
|
quote: query.data,
|
|
8283
8287
|
isLoading,
|
|
8284
|
-
showPostcode:
|
|
8288
|
+
showPostcode: chunkSCK3GAE5_cjs.POSTCODE_COUNTRIES.includes(country) || locationInvalid || postalCode !== "",
|
|
8285
8289
|
error: query.isError ? locationInvalid ? message ?? "Enter your ZIP / postal code to see the total." : message ?? "Couldn't calculate tax. Stripe shows the total next." : null,
|
|
8286
8290
|
canContinue: !isLoading && (!!query.data || query.isError && !locationInvalid)
|
|
8287
8291
|
};
|
|
@@ -8290,7 +8294,7 @@ function SubscriptionPlans({ projectExtId, onDismiss }) {
|
|
|
8290
8294
|
const { data: products, isLoading, error } = react$1.useProducts();
|
|
8291
8295
|
const [isAnnual, setIsAnnual] = react.useState(false);
|
|
8292
8296
|
const [promoCode, setPromoCode] = react.useState("");
|
|
8293
|
-
const [addonBudget, setAddonBudget] = react.useState(String(
|
|
8297
|
+
const [addonBudget, setAddonBudget] = react.useState(String(chunkSCK3GAE5_cjs.DEFAULT_SPEND_CAP_PENCE / 100));
|
|
8294
8298
|
const [checkoutBudget, setCheckoutBudget] = react.useState(null);
|
|
8295
8299
|
const [aiBlocks, setAiBlocks] = react.useState(0);
|
|
8296
8300
|
const [storageBlocks, setStorageBlocks] = react.useState(0);
|
|
@@ -8308,31 +8312,31 @@ function SubscriptionPlans({ projectExtId, onDismiss }) {
|
|
|
8308
8312
|
storageBlocks,
|
|
8309
8313
|
enabled: !!products?.length
|
|
8310
8314
|
});
|
|
8311
|
-
if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8312
|
-
if (error) return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8313
|
-
if (!products || products.length === 0) return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8314
|
-
const prices =
|
|
8315
|
+
if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.PlanNotice, { children: "Loading plans\u2026" });
|
|
8316
|
+
if (error) return /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.PlanNotice, { tone: "error", children: "Plans didn't load. Try again." });
|
|
8317
|
+
if (!products || products.length === 0) return /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.PlanNotice, { children: "No plans available." });
|
|
8318
|
+
const prices = chunkSCK3GAE5_cjs.findProPrices(products);
|
|
8315
8319
|
const intervalPrice = isAnnual ? prices.annual : prices.monthly;
|
|
8316
|
-
const selectedPrice =
|
|
8320
|
+
const selectedPrice = chunkSCK3GAE5_cjs.packPrice(intervalPrice);
|
|
8317
8321
|
if (!intervalPrice) return null;
|
|
8318
8322
|
const interval = isAnnual ? "year" : "month";
|
|
8319
|
-
const savingsPercent =
|
|
8323
|
+
const savingsPercent = chunkSCK3GAE5_cjs.calcSavingsPercent(prices.monthly, prices.annual);
|
|
8320
8324
|
const handleSubscribe = () => {
|
|
8321
8325
|
setCheckoutInterval(interval);
|
|
8322
|
-
const parsed =
|
|
8323
|
-
setCheckoutBudget(parsed == null || parsed ===
|
|
8326
|
+
const parsed = chunkSCK3GAE5_cjs.parseBudgetPounds(addonBudget);
|
|
8327
|
+
setCheckoutBudget(parsed == null || parsed === chunkSCK3GAE5_cjs.DEFAULT_SPEND_CAP_PENCE ? null : parsed);
|
|
8324
8328
|
setCheckoutQuote(quote.quote);
|
|
8325
8329
|
setIsCheckoutModalOpen(true);
|
|
8326
8330
|
};
|
|
8327
8331
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8328
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8332
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.PlanStack, { children: [
|
|
8329
8333
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8330
|
-
|
|
8334
|
+
chunkNFI46I77_cjs.PlanPickerHeader,
|
|
8331
8335
|
{
|
|
8332
8336
|
title: "Plan",
|
|
8333
8337
|
info: /* @__PURE__ */ jsxRuntime.jsx(PlanInfoPopover2, {}),
|
|
8334
8338
|
toggle: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8335
|
-
|
|
8339
|
+
chunkNFI46I77_cjs.PricingToggle,
|
|
8336
8340
|
{
|
|
8337
8341
|
isAnnual,
|
|
8338
8342
|
onToggle: () => setIsAnnual(!isAnnual),
|
|
@@ -8369,7 +8373,7 @@ function SubscriptionPlans({ projectExtId, onDismiss }) {
|
|
|
8369
8373
|
currency: intervalPrice.currency
|
|
8370
8374
|
}
|
|
8371
8375
|
),
|
|
8372
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8376
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.PromoCodeInput, { value: promoCode, onChange: setPromoCode }),
|
|
8373
8377
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8374
8378
|
CheckoutCountrySelect,
|
|
8375
8379
|
{
|
|
@@ -8381,9 +8385,9 @@ function SubscriptionPlans({ projectExtId, onDismiss }) {
|
|
|
8381
8385
|
}
|
|
8382
8386
|
),
|
|
8383
8387
|
/* @__PURE__ */ jsxRuntime.jsx(CheckoutTotal, { state: quote, postalCode, onPostalCodeChange: setPostalCode }),
|
|
8384
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8388
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.PlanActionRow, { children: [
|
|
8385
8389
|
onDismiss && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8386
|
-
|
|
8390
|
+
chunkNFI46I77_cjs.PlanActionButton,
|
|
8387
8391
|
{
|
|
8388
8392
|
tone: "muted",
|
|
8389
8393
|
fill: true,
|
|
@@ -8394,11 +8398,11 @@ function SubscriptionPlans({ projectExtId, onDismiss }) {
|
|
|
8394
8398
|
}
|
|
8395
8399
|
),
|
|
8396
8400
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8397
|
-
|
|
8401
|
+
chunkNFI46I77_cjs.PlanActionButton,
|
|
8398
8402
|
{
|
|
8399
8403
|
fill: true,
|
|
8400
8404
|
onClick: handleSubscribe,
|
|
8401
|
-
disabled: !selectedPrice ||
|
|
8405
|
+
disabled: !selectedPrice || chunkSCK3GAE5_cjs.parseBudgetPounds(addonBudget) === void 0 || !quote.canContinue,
|
|
8402
8406
|
size: "sm",
|
|
8403
8407
|
"data-testid": "subscribe-button",
|
|
8404
8408
|
children: "Continue to payment"
|
|
@@ -8438,7 +8442,7 @@ var FALLBACK_MESSAGES = {
|
|
|
8438
8442
|
BILLING_ADDRESS_REQUIRED: "Add a billing address first."
|
|
8439
8443
|
};
|
|
8440
8444
|
function addonErrorMessage(error) {
|
|
8441
|
-
const detail =
|
|
8445
|
+
const detail = chunkSCK3GAE5_cjs.apiErrorDetail(error);
|
|
8442
8446
|
if (detail && typeof detail === "object") {
|
|
8443
8447
|
const { code, message } = detail;
|
|
8444
8448
|
if (message) return message;
|
|
@@ -8460,18 +8464,18 @@ function chargeRefusalMessage(error) {
|
|
|
8460
8464
|
return code ? REFUSALS[code] : null;
|
|
8461
8465
|
}
|
|
8462
8466
|
function addonErrorCode(error) {
|
|
8463
|
-
const detail =
|
|
8467
|
+
const detail = chunkSCK3GAE5_cjs.apiErrorDetail(error);
|
|
8464
8468
|
if (detail && typeof detail === "object") {
|
|
8465
8469
|
const code = detail.code;
|
|
8466
8470
|
if (code && code in FALLBACK_MESSAGES) return code;
|
|
8467
8471
|
}
|
|
8468
8472
|
return null;
|
|
8469
8473
|
}
|
|
8470
|
-
var addedMessage = (kind, blockAiGbp, blockStorageGb) => kind === "ai_usage" ? `${react$1.formatGbp(blockAiGbp ??
|
|
8474
|
+
var addedMessage = (kind, blockAiGbp, blockStorageGb) => kind === "ai_usage" ? `${react$1.formatGbp(blockAiGbp ?? chunkSCK3GAE5_cjs.ADDON_BLOCK_AI_GBP)} of AI usage added` : `${blockStorageGb ?? chunkSCK3GAE5_cjs.STORAGE_BLOCK_GB} GB added`;
|
|
8471
8475
|
function useAddonPurchase() {
|
|
8472
8476
|
const addBlock = react$1.useAddProjectAddonBlock();
|
|
8473
8477
|
const { mutate } = addBlock;
|
|
8474
|
-
const { onAddonBlocksBought } =
|
|
8478
|
+
const { onAddonBlocksBought } = chunkSCK3GAE5_cjs.useBillingSupport();
|
|
8475
8479
|
const buy = react.useCallback(
|
|
8476
8480
|
(kind, projectExtId, options2) => {
|
|
8477
8481
|
mutate(
|
|
@@ -8515,7 +8519,7 @@ function PlanChangeLines({
|
|
|
8515
8519
|
isError,
|
|
8516
8520
|
className
|
|
8517
8521
|
}) {
|
|
8518
|
-
const lines = preview ?
|
|
8522
|
+
const lines = preview ? chunkSCK3GAE5_cjs.planPreviewLines(preview) : [{ id: "pay-today", text: isError ? chunkSCK3GAE5_cjs.PAY_TODAY_UNPRICED : "Checking price\u2026" }];
|
|
8519
8523
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, "data-testid": "plan-change-lines", children: lines.map((line) => /* @__PURE__ */ jsxRuntime.jsx("p", { "data-testid": `plan-change-${line.id}`, children: line.text }, line.id)) });
|
|
8520
8524
|
}
|
|
8521
8525
|
var BANK_CONFIRM_PLAN_CHANGE = "Confirm with your bank. Nothing is charged until you do.";
|
|
@@ -8523,13 +8527,13 @@ function notifyPlanChange(data, fallback, planName2) {
|
|
|
8523
8527
|
const outcome = data?.plan_change;
|
|
8524
8528
|
switch (outcome?.result) {
|
|
8525
8529
|
case "upgraded": {
|
|
8526
|
-
const plan =
|
|
8527
|
-
const charged = outcome.charged_pence > 0 ? ` \xB7 ${
|
|
8530
|
+
const plan = chunkSCK3GAE5_cjs.planNameForPacks(data?.addons?.packs ?? data?.packs);
|
|
8531
|
+
const charged = outcome.charged_pence > 0 ? ` \xB7 ${chunkSCK3GAE5_cjs.formatMoney(outcome.charged_pence, "gbp")} charged` : "";
|
|
8528
8532
|
shell.notify.success(`Upgraded to ${plan}${charged}`);
|
|
8529
8533
|
break;
|
|
8530
8534
|
}
|
|
8531
8535
|
case "scheduled": {
|
|
8532
|
-
const when2 =
|
|
8536
|
+
const when2 = chunkSCK3GAE5_cjs.formatPeriodEnd(data?.addons?.period_end ?? data?.current_period_end);
|
|
8533
8537
|
shell.notify.success(when2 ? `Scheduled for ${when2}` : fallback);
|
|
8534
8538
|
break;
|
|
8535
8539
|
}
|
|
@@ -8562,23 +8566,23 @@ function ChangeProPlan({
|
|
|
8562
8566
|
const { data: products } = react$1.useProducts();
|
|
8563
8567
|
const changePlan = react$1.useChangeProjectPlan();
|
|
8564
8568
|
const cancel = react$1.useCancelProjectSubscription();
|
|
8565
|
-
const prices =
|
|
8569
|
+
const prices = chunkSCK3GAE5_cjs.findProPrices(products);
|
|
8566
8570
|
const addons = project.addons;
|
|
8567
8571
|
const isCanceling = project.cancel_at_period_end === true || project.subscription === "canceled";
|
|
8568
|
-
const currentPacks = Math.max(addons?.packs ?? project.packs ??
|
|
8569
|
-
const isLegacyMultiPack = currentPacks >
|
|
8572
|
+
const currentPacks = Math.max(addons?.packs ?? project.packs ?? chunkSCK3GAE5_cjs.PRO_PACKS, chunkSCK3GAE5_cjs.PRO_PACKS);
|
|
8573
|
+
const isLegacyMultiPack = currentPacks > chunkSCK3GAE5_cjs.PRO_PACKS;
|
|
8570
8574
|
const currentInterval = project.plan_interval === "year" ? "year" : "month";
|
|
8571
8575
|
const scheduledPacks = isCanceling ? 0 : addons?.packs_next ?? currentPacks;
|
|
8572
8576
|
const scheduledInterval = addons?.pending_interval ?? currentInterval;
|
|
8573
8577
|
const [targetPacks, setTargetPacks] = react.useState(scheduledPacks);
|
|
8574
8578
|
const [chosenInterval, setChosenInterval] = react.useState(scheduledInterval);
|
|
8575
|
-
const targetInterval = targetPacks >
|
|
8579
|
+
const targetInterval = targetPacks > chunkSCK3GAE5_cjs.PRO_PACKS ? currentInterval : chosenInterval;
|
|
8576
8580
|
const periodEnd = formatDate(addons?.period_end ?? project.current_period_end);
|
|
8577
8581
|
const when2 = periodEnd ?? "the end of the period";
|
|
8578
8582
|
const shortWhen = periodEnd ? periodEnd.replace(/ \d{4}$/, "") : "period end";
|
|
8579
8583
|
const isPending = changePlan.isPending || cancel.isPending;
|
|
8580
8584
|
const sameAsScheduled = targetPacks === scheduledPacks && (targetPacks === 0 || targetInterval === scheduledInterval);
|
|
8581
|
-
const packOptions = isLegacyMultiPack ? [currentPacks,
|
|
8585
|
+
const packOptions = isLegacyMultiPack ? [currentPacks, chunkSCK3GAE5_cjs.PRO_PACKS, 0] : [chunkSCK3GAE5_cjs.PRO_PACKS, 0];
|
|
8582
8586
|
const intervalPrice = targetInterval === "year" ? prices.annual : prices.monthly;
|
|
8583
8587
|
const currency = intervalPrice?.currency ?? project.currency ?? "gbp";
|
|
8584
8588
|
const preview = react$1.usePreviewProjectPlanChange(
|
|
@@ -8586,7 +8590,7 @@ function ChangeProPlan({
|
|
|
8586
8590
|
sameAsScheduled || targetPacks === 0 ? null : { packs: targetPacks, interval: targetInterval }
|
|
8587
8591
|
);
|
|
8588
8592
|
const noChange = sameAsScheduled || preview.data?.unchanged === true;
|
|
8589
|
-
const nameFor = (packs) => packs === currentPacks && packs > 0 ?
|
|
8593
|
+
const nameFor = (packs) => packs === currentPacks && packs > 0 ? chunkSCK3GAE5_cjs.proTierName(project) : chunkSCK3GAE5_cjs.planNameForPacks(packs);
|
|
8590
8594
|
const effects = [];
|
|
8591
8595
|
const target = nameFor(targetPacks);
|
|
8592
8596
|
if (targetPacks === 0) {
|
|
@@ -8596,7 +8600,7 @@ function ChangeProPlan({
|
|
|
8596
8600
|
if (targetPacks < currentPacks) {
|
|
8597
8601
|
effects.push(`Changes to one Pro licence on ${when2}. No refund.`);
|
|
8598
8602
|
} else if (!isCanceling && addons?.packs_next != null) {
|
|
8599
|
-
effects.push(`Cancels the change to ${
|
|
8603
|
+
effects.push(`Cancels the change to ${chunkSCK3GAE5_cjs.planNameForPacks(addons.packs_next)}.`);
|
|
8600
8604
|
}
|
|
8601
8605
|
if (targetInterval !== currentInterval) {
|
|
8602
8606
|
effects.push(`${targetInterval === "year" ? "Annual" : "Monthly"} billing from ${when2}.`);
|
|
@@ -8635,33 +8639,33 @@ function ChangeProPlan({
|
|
|
8635
8639
|
if (packs === 0) {
|
|
8636
8640
|
return {
|
|
8637
8641
|
total: "\xA30",
|
|
8638
|
-
summary: `${react$1.formatGbp(
|
|
8642
|
+
summary: `${react$1.formatGbp(chunkSCK3GAE5_cjs.FREE_AI_GBP)} of AI usage \xB7 ${chunkSCK3GAE5_cjs.FREE_STORAGE_MB} MB \xB7 just you`
|
|
8639
8643
|
};
|
|
8640
8644
|
}
|
|
8641
|
-
const allowance = `${react$1.formatGbp(
|
|
8642
|
-
const legacy = packs >
|
|
8643
|
-
const exVat = legacy ? project.amount_ex_vat :
|
|
8645
|
+
const allowance = `${react$1.formatGbp(chunkSCK3GAE5_cjs.PRO_AI_GBP * packs)} of AI usage \xB7 ${chunkSCK3GAE5_cjs.PRO_STORAGE_GB * packs} GB`;
|
|
8646
|
+
const legacy = packs > chunkSCK3GAE5_cjs.PRO_PACKS;
|
|
8647
|
+
const exVat = legacy ? project.amount_ex_vat : chunkSCK3GAE5_cjs.packPrice(intervalPrice)?.amount_ex_vat;
|
|
8644
8648
|
return {
|
|
8645
|
-
total: exVat != null ?
|
|
8649
|
+
total: exVat != null ? chunkSCK3GAE5_cjs.plusVat(exVat, currency) : void 0,
|
|
8646
8650
|
summary: allowance
|
|
8647
8651
|
};
|
|
8648
8652
|
};
|
|
8649
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8653
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.PlanStack, { gap: 4, testId: "change-pro-plan", children: [
|
|
8650
8654
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
8651
8655
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-foreground", children: "Billing" }),
|
|
8652
|
-
targetPacks >
|
|
8653
|
-
|
|
8656
|
+
targetPacks > chunkSCK3GAE5_cjs.PRO_PACKS ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", "data-testid": "change-plan-interval-fixed", children: currentInterval === "year" ? "Annual" : "Monthly" }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
8657
|
+
chunkNFI46I77_cjs.PricingToggle,
|
|
8654
8658
|
{
|
|
8655
8659
|
isAnnual: targetInterval === "year",
|
|
8656
8660
|
onToggle: () => setChosenInterval(targetInterval === "year" ? "month" : "year"),
|
|
8657
|
-
savingsPercent:
|
|
8661
|
+
savingsPercent: chunkSCK3GAE5_cjs.calcSavingsPercent(prices.monthly, prices.annual)
|
|
8658
8662
|
}
|
|
8659
8663
|
)
|
|
8660
8664
|
] }),
|
|
8661
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8665
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.PlanStack, { gap: 2, children: packOptions.map((packs) => {
|
|
8662
8666
|
const { total, summary } = optionFor(packs);
|
|
8663
8667
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8664
|
-
|
|
8668
|
+
chunkNFI46I77_cjs.PlanTierOption,
|
|
8665
8669
|
{
|
|
8666
8670
|
onSelect: setTargetPacks,
|
|
8667
8671
|
option: {
|
|
@@ -8678,13 +8682,13 @@ function ChangeProPlan({
|
|
|
8678
8682
|
);
|
|
8679
8683
|
}) }),
|
|
8680
8684
|
isLegacyMultiPack && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1", children: [
|
|
8681
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8682
|
-
|
|
8685
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.PlanNotice, { className: "text-xs", testId: "change-plan-legacy-note", children: [
|
|
8686
|
+
chunkSCK3GAE5_cjs.proTierName(project),
|
|
8683
8687
|
" is no longer sold"
|
|
8684
8688
|
] }),
|
|
8685
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8689
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.MoreInfo, { title: "Legacy plan", testId: "change-plan-legacy-more-info", children: [
|
|
8686
8690
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
|
|
8687
|
-
|
|
8691
|
+
chunkSCK3GAE5_cjs.proTierName(project),
|
|
8688
8692
|
" keeps renewing at its own price, with its allowance and add-ons, until you change it."
|
|
8689
8693
|
] }),
|
|
8690
8694
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
|
|
@@ -8705,7 +8709,7 @@ function ChangeProPlan({
|
|
|
8705
8709
|
),
|
|
8706
8710
|
targetPacks > 0 && /* @__PURE__ */ jsxRuntime.jsx(ReferralRewardNote2, {}),
|
|
8707
8711
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8708
|
-
|
|
8712
|
+
chunkNFI46I77_cjs.PlanActionButton,
|
|
8709
8713
|
{
|
|
8710
8714
|
onClick: apply,
|
|
8711
8715
|
disabled: noChange || isPending,
|
|
@@ -8716,9 +8720,9 @@ function ChangeProPlan({
|
|
|
8716
8720
|
] });
|
|
8717
8721
|
}
|
|
8718
8722
|
function ChangePlanDialog({ project, open, onOpenChange }) {
|
|
8719
|
-
const isPro = !!project &&
|
|
8723
|
+
const isPro = !!project && chunkSCK3GAE5_cjs.isProProject(project);
|
|
8720
8724
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8721
|
-
|
|
8725
|
+
chunkNFI46I77_cjs.PlanDialogFrame,
|
|
8722
8726
|
{
|
|
8723
8727
|
open,
|
|
8724
8728
|
onOpenChange,
|
|
@@ -8738,14 +8742,14 @@ function ChangePlanDialog({ project, open, onOpenChange }) {
|
|
|
8738
8742
|
}
|
|
8739
8743
|
function ProjectsTable() {
|
|
8740
8744
|
const { data: projects, isLoading } = react$1.useProjects();
|
|
8741
|
-
const currentUserExtId =
|
|
8745
|
+
const currentUserExtId = chunkSCK3GAE5_cjs.useSelfExtId();
|
|
8742
8746
|
const { openProject } = chunkCNHUJRQ4_cjs.useBlocksEnvironment();
|
|
8743
8747
|
const updateProject = react$1.useUpdateProjectFields();
|
|
8744
8748
|
const [renameTarget, setRenameTarget] = react.useState(null);
|
|
8745
8749
|
const [renameValue, setRenameValue] = react.useState("");
|
|
8746
8750
|
const [invoicesTarget, setInvoicesTarget] = react.useState(null);
|
|
8747
8751
|
const [upgradeTarget, setUpgradeTarget] = react.useState(null);
|
|
8748
|
-
const { stripeEnabled } =
|
|
8752
|
+
const { stripeEnabled } = chunkSCK3GAE5_cjs.useBillingSupport();
|
|
8749
8753
|
const ownedProjects = react.useMemo(
|
|
8750
8754
|
() => (projects ?? []).filter((p) => p.created_by === currentUserExtId),
|
|
8751
8755
|
[projects, currentUserExtId]
|
|
@@ -8784,13 +8788,13 @@ function ProjectsTable() {
|
|
|
8784
8788
|
const hasPaid = p.subscription === "active" || p.subscription === "past_due";
|
|
8785
8789
|
const canUpgrade = stripeEnabled && !hasPaid && p.subscription !== "canceled" && p.subscription !== "dev";
|
|
8786
8790
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8787
|
-
|
|
8791
|
+
chunkNFI46I77_cjs.ProjectRow,
|
|
8788
8792
|
{
|
|
8789
8793
|
testId: `project-row-${p.external_id}`,
|
|
8790
8794
|
onOpen: () => openProject(p.external_id),
|
|
8791
8795
|
identity: /* @__PURE__ */ jsxRuntime.jsx(BillingProjectEntity, { name: p.name, relation: "mine", subscription: p.subscription, size: "sm" }),
|
|
8792
|
-
summary: stripeEnabled ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center whitespace-nowrap", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8793
|
-
usage: p.quotas ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8796
|
+
summary: stripeEnabled ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center whitespace-nowrap", children: /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.PlanBadge, { ...chunkSCK3GAE5_cjs.planBadgeView(p) }) }) : void 0,
|
|
8797
|
+
usage: p.quotas ? /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.QuotaMeter, { items: chunkSCK3GAE5_cjs.getQuotaItems(p.quotas), size: "lg" }) : void 0,
|
|
8794
8798
|
actions: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8795
8799
|
canUpgrade && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8796
8800
|
ui.Button,
|
|
@@ -8824,9 +8828,9 @@ function ProjectsTable() {
|
|
|
8824
8828
|
);
|
|
8825
8829
|
};
|
|
8826
8830
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8827
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8831
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.ProjectList, { isLoading, isEmpty: ownedProjects.length === 0, isFilteredOut: false, children: ownedProjects.map(renderRow) }),
|
|
8828
8832
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8829
|
-
|
|
8833
|
+
chunkNFI46I77_cjs.RenameDialog,
|
|
8830
8834
|
{
|
|
8831
8835
|
open: !!renameTarget,
|
|
8832
8836
|
onClose: () => setRenameTarget(null),
|
|
@@ -8857,7 +8861,7 @@ function ProjectsTable() {
|
|
|
8857
8861
|
}
|
|
8858
8862
|
function SharedProjects() {
|
|
8859
8863
|
const { data: projects } = react$1.useProjects();
|
|
8860
|
-
const currentUserExtId =
|
|
8864
|
+
const currentUserExtId = chunkSCK3GAE5_cjs.useSelfExtId();
|
|
8861
8865
|
const { data: usageToday } = react$1.useUserUsageToday();
|
|
8862
8866
|
const shared = react.useMemo(
|
|
8863
8867
|
() => (projects ?? []).filter((p) => p.created_by !== currentUserExtId),
|
|
@@ -8865,10 +8869,10 @@ function SharedProjects() {
|
|
|
8865
8869
|
);
|
|
8866
8870
|
if (shared.length === 0) return null;
|
|
8867
8871
|
const usedToday = usageToday?.used_gbp ?? 0;
|
|
8868
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8872
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.SharedProjectsSection, { footnote: "Your daily AI usage allowance in projects other people run \u2014 their plan and billing are theirs.", children: shared.map((p) => {
|
|
8869
8873
|
const cap = p.daily_cap_per_user;
|
|
8870
8874
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8871
|
-
|
|
8875
|
+
chunkNFI46I77_cjs.SharedProjectRow,
|
|
8872
8876
|
{
|
|
8873
8877
|
testId: `shared-project-${p.external_id}`,
|
|
8874
8878
|
identity: /* @__PURE__ */ jsxRuntime.jsx(BillingProjectEntity, { name: p.name, relation: "other", size: "sm" }),
|
|
@@ -8912,7 +8916,7 @@ function DailyCapEditor({ project }) {
|
|
|
8912
8916
|
);
|
|
8913
8917
|
};
|
|
8914
8918
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8915
|
-
|
|
8919
|
+
chunkNFI46I77_cjs.DailyCapField,
|
|
8916
8920
|
{
|
|
8917
8921
|
value,
|
|
8918
8922
|
onChange: setValue,
|
|
@@ -8925,11 +8929,11 @@ function DailyCapEditor({ project }) {
|
|
|
8925
8929
|
function SubscriptionStatus({ project }) {
|
|
8926
8930
|
const { quotas, cancel_at_period_end, subscription, current_period_end, addons } = project;
|
|
8927
8931
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8928
|
-
|
|
8932
|
+
chunkNFI46I77_cjs.SubscriptionStatusView,
|
|
8929
8933
|
{
|
|
8930
|
-
resetDate:
|
|
8934
|
+
resetDate: chunkSCK3GAE5_cjs.formatResetDate(addons?.ai_usage_reset_at ?? current_period_end),
|
|
8931
8935
|
isCanceling: subscription === "canceled" || cancel_at_period_end === true,
|
|
8932
|
-
meters:
|
|
8936
|
+
meters: chunkSCK3GAE5_cjs.getQuotaItems(quotas).map((q) => ({
|
|
8933
8937
|
key: q.key,
|
|
8934
8938
|
icon: q.icon,
|
|
8935
8939
|
label: q.label,
|
|
@@ -8993,7 +8997,7 @@ function PendingChange({
|
|
|
8993
8997
|
}
|
|
8994
8998
|
);
|
|
8995
8999
|
}
|
|
8996
|
-
var titleFor = (kind, blockAiGbp, blockStorageGb) => kind === "ai_usage" ? `Add ${react$1.formatGbp(blockAiGbp ??
|
|
9000
|
+
var titleFor = (kind, blockAiGbp, blockStorageGb) => kind === "ai_usage" ? `Add ${react$1.formatGbp(blockAiGbp ?? chunkSCK3GAE5_cjs.ADDON_BLOCK_AI_GBP)} of AI usage` : `Add ${blockStorageGb ?? chunkSCK3GAE5_cjs.STORAGE_BLOCK_GB} GB storage`;
|
|
8997
9001
|
var blocksOf = (kind, project) => (kind === "ai_usage" ? project.addons?.ai_blocks : project.addons?.storage_blocks) ?? 0;
|
|
8998
9002
|
function Row({ label, children }) {
|
|
8999
9003
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline justify-between gap-4", children: [
|
|
@@ -9014,11 +9018,11 @@ function AddAddonDialog({
|
|
|
9014
9018
|
const addons = project.addons;
|
|
9015
9019
|
if (!addons) return null;
|
|
9016
9020
|
const isAnnual = project.plan_interval === "year";
|
|
9017
|
-
const price =
|
|
9018
|
-
const nextCharge =
|
|
9019
|
-
const now = quote.data ?
|
|
9020
|
-
const renewal = quote.data ?
|
|
9021
|
-
const today = now ? { total:
|
|
9021
|
+
const price = chunkSCK3GAE5_cjs.addonCharge(kind, addons, isAnnual, addons.period_end ?? project.current_period_end);
|
|
9022
|
+
const nextCharge = chunkSCK3GAE5_cjs.formatPeriodEnd(addons.period_end ?? project.current_period_end);
|
|
9023
|
+
const now = quote.data ? chunkSCK3GAE5_cjs.quoteParts(quote.data.now) : null;
|
|
9024
|
+
const renewal = quote.data ? chunkSCK3GAE5_cjs.quoteParts(quote.data.renewal) : null;
|
|
9025
|
+
const today = now ? { total: chunkSCK3GAE5_cjs.money2(now.total), detail: chunkSCK3GAE5_cjs.taxDetail(now) } : { total: price.now, detail: `incl. VAT (${price.nowExVat} + ${price.nowVat} VAT)` };
|
|
9022
9026
|
const pricing = quote.isLoading;
|
|
9023
9027
|
const confirm = () => {
|
|
9024
9028
|
const before = blocksOf(kind, project);
|
|
@@ -9057,8 +9061,8 @@ function AddAddonDialog({
|
|
|
9057
9061
|
isAnnual ? "yearly" : "monthly",
|
|
9058
9062
|
" \xB7 no refund"
|
|
9059
9063
|
] }),
|
|
9060
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9061
|
-
|
|
9064
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.MoreInfo, { title: "Adding a top-up", testId: "add-addon-more-info", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9065
|
+
chunkNFI46I77_cjs.MoreInfoList,
|
|
9062
9066
|
{
|
|
9063
9067
|
items: [
|
|
9064
9068
|
{
|
|
@@ -9073,7 +9077,7 @@ function AddAddonDialog({
|
|
|
9073
9077
|
term: "Usage cap",
|
|
9074
9078
|
text: "Adding by hand is never blocked by the usage cap; the cap limits automatic top-ups only."
|
|
9075
9079
|
},
|
|
9076
|
-
...isAnnual && kind === "ai_usage" ? [{ term: "Annual", text: `${
|
|
9080
|
+
...isAnnual && kind === "ai_usage" ? [{ term: "Annual", text: `${chunkSCK3GAE5_cjs.ANNUAL_PREMIUM_AI_NOTE}.` }] : []
|
|
9077
9081
|
]
|
|
9078
9082
|
}
|
|
9079
9083
|
) })
|
|
@@ -9096,7 +9100,7 @@ function AddAddonDialog({
|
|
|
9096
9100
|
)
|
|
9097
9101
|
] }) }),
|
|
9098
9102
|
!pricing && /* @__PURE__ */ jsxRuntime.jsxs(Row, { label: "Next charge", children: [
|
|
9099
|
-
renewal ?
|
|
9103
|
+
renewal ? chunkSCK3GAE5_cjs.totalWithTaxWord(renewal) : price.then.replace(/\/(month|year)/, ""),
|
|
9100
9104
|
nextCharge ? ` on ${nextCharge}` : " at renewal"
|
|
9101
9105
|
] })
|
|
9102
9106
|
] }) }),
|
|
@@ -9127,11 +9131,11 @@ function ReduceAddonDialog({
|
|
|
9127
9131
|
const update = react$1.useUpdateProjectNextPeriodAddons();
|
|
9128
9132
|
const addons = project.addons;
|
|
9129
9133
|
if (!addons) return null;
|
|
9130
|
-
const { min, next } =
|
|
9134
|
+
const { min, next } = chunkSCK3GAE5_cjs.reduceBounds(kind, addons);
|
|
9131
9135
|
const keep = Math.max(min, next - 1);
|
|
9132
|
-
const size =
|
|
9133
|
-
const what =
|
|
9134
|
-
const from =
|
|
9136
|
+
const size = chunkSCK3GAE5_cjs.nextRemovedBlockSize(kind, addons);
|
|
9137
|
+
const what = chunkSCK3GAE5_cjs.stepLabel(kind, size);
|
|
9138
|
+
const from = chunkSCK3GAE5_cjs.formatPeriodEnd(addons.period_end ?? project.current_period_end) ?? "your next renewal";
|
|
9135
9139
|
const fromShort = from.replace(/ \d{4}$/, "");
|
|
9136
9140
|
const allowanceNext = kind === "ai_usage" ? addons.ai_allowance_next_gbp - size : addons.storage_allowance_next_gb - size;
|
|
9137
9141
|
const allowanceNow = kind === "ai_usage" ? addons.ai_allowance_gbp : addons.storage_allowance_gb;
|
|
@@ -9139,7 +9143,7 @@ function ReduceAddonDialog({
|
|
|
9139
9143
|
const save = () => update.mutate(
|
|
9140
9144
|
{
|
|
9141
9145
|
projectExtId: project.external_id,
|
|
9142
|
-
body:
|
|
9146
|
+
body: chunkSCK3GAE5_cjs.nextPeriodBody(kind, keep)
|
|
9143
9147
|
},
|
|
9144
9148
|
{
|
|
9145
9149
|
onSuccess: () => {
|
|
@@ -9167,7 +9171,7 @@ function ReduceAddonDialog({
|
|
|
9167
9171
|
fromShort,
|
|
9168
9172
|
" \xB7 no refund"
|
|
9169
9173
|
] }),
|
|
9170
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9174
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.MoreInfo, { title: "Reducing a top-up", testId: "reduce-addon-more-info", children: [
|
|
9171
9175
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
|
|
9172
9176
|
"The reduction applies from your next renewal (",
|
|
9173
9177
|
from,
|
|
@@ -9206,7 +9210,7 @@ function ReduceAddonDialog({
|
|
|
9206
9210
|
}
|
|
9207
9211
|
) });
|
|
9208
9212
|
}
|
|
9209
|
-
var gbp = (pence) =>
|
|
9213
|
+
var gbp = (pence) => chunkSCK3GAE5_cjs.formatMoney(pence, "gbp");
|
|
9210
9214
|
var gb2 = (n) => `${Math.round(n * 10) / 10} GB`;
|
|
9211
9215
|
var pct = (used, limit) => limit > 0 ? Math.min(100, used / limit * 100) : 0;
|
|
9212
9216
|
function formatShortDate(unix) {
|
|
@@ -9218,20 +9222,20 @@ function AutoTopupThreshold({
|
|
|
9218
9222
|
addons
|
|
9219
9223
|
}) {
|
|
9220
9224
|
const updateSettings = react$1.useUpdateProjectAddonSettings();
|
|
9221
|
-
const min = addons.min_auto_topup_threshold_gbp ||
|
|
9225
|
+
const min = addons.min_auto_topup_threshold_gbp || chunkSCK3GAE5_cjs.MIN_AUTO_TOPUP_THRESHOLD_GBP;
|
|
9222
9226
|
const saved = addons.auto_topup_threshold_gbp;
|
|
9223
9227
|
const [value, setValue] = react.useState(String(saved));
|
|
9224
9228
|
react.useEffect(() => setValue(String(saved)), [saved]);
|
|
9225
9229
|
const parsed = Number(value);
|
|
9226
9230
|
const valid = Number.isFinite(parsed) && parsed >= min;
|
|
9227
9231
|
const dirty = valid && parsed !== saved;
|
|
9228
|
-
const off =
|
|
9232
|
+
const off = chunkSCK3GAE5_cjs.isAddonBudgetZero(addons);
|
|
9229
9233
|
const save = () => {
|
|
9230
9234
|
if (!dirty) return;
|
|
9231
9235
|
updateSettings.mutate(
|
|
9232
9236
|
{
|
|
9233
9237
|
projectExtId: project.external_id,
|
|
9234
|
-
body:
|
|
9238
|
+
body: chunkSCK3GAE5_cjs.addonSettingsBody(addons, { auto_topup_threshold_gbp: parsed })
|
|
9235
9239
|
},
|
|
9236
9240
|
{
|
|
9237
9241
|
onSuccess: () => shell.notify.success(`Auto-add below ${react$1.formatGbp(parsed)} of AI usage left`),
|
|
@@ -9328,10 +9332,10 @@ function ResourceMeter({
|
|
|
9328
9332
|
const update = react$1.useUpdateProjectNextPeriodAddons();
|
|
9329
9333
|
const isAi = kind === "ai_usage";
|
|
9330
9334
|
const slug = isAi ? "ai-usage" : "storage";
|
|
9331
|
-
const periodEnd =
|
|
9335
|
+
const periodEnd = chunkSCK3GAE5_cjs.formatPeriodEnd(addons.period_end ?? project.current_period_end);
|
|
9332
9336
|
const from = periodEnd ?? "your next renewal";
|
|
9333
9337
|
const fromShort = formatShortDate(addons.period_end ?? project.current_period_end) ?? "renewal";
|
|
9334
|
-
const { min, current, next } =
|
|
9338
|
+
const { min, current, next } = chunkSCK3GAE5_cjs.reduceBounds(kind, addons);
|
|
9335
9339
|
const fmt = (n) => isAi ? react$1.formatGbp(n) : gb2(n);
|
|
9336
9340
|
const used = isAi ? addons.ai_used_gbp : addons.storage_used_gb;
|
|
9337
9341
|
const allowance = isAi ? addons.ai_allowance_gbp : addons.storage_allowance_gb;
|
|
@@ -9339,15 +9343,15 @@ function ResourceMeter({
|
|
|
9339
9343
|
const plan = isAi ? addons.plan_ai_gbp : addons.plan_storage_gb;
|
|
9340
9344
|
const topUps = Math.max(0, allowance - plan);
|
|
9341
9345
|
const blocks = isAi ? addons.ai_blocks : addons.storage_blocks;
|
|
9342
|
-
const hasLegacy =
|
|
9343
|
-
const room =
|
|
9344
|
-
const capZero =
|
|
9345
|
-
const resets = isAi ? formatShortDate(
|
|
9346
|
-
const removeSize =
|
|
9346
|
+
const hasLegacy = chunkSCK3GAE5_cjs.splitBlocks(kind, blocks, addons).legacy > 0;
|
|
9347
|
+
const room = chunkSCK3GAE5_cjs.autoRoom(kind, addons);
|
|
9348
|
+
const capZero = chunkSCK3GAE5_cjs.isAddonBudgetZero(addons);
|
|
9349
|
+
const resets = isAi ? formatShortDate(chunkSCK3GAE5_cjs.aiUsageResetTimestamp(project)) : null;
|
|
9350
|
+
const removeSize = chunkSCK3GAE5_cjs.nextRemovedBlockSize(kind, addons);
|
|
9347
9351
|
const undo = () => update.mutate(
|
|
9348
9352
|
{
|
|
9349
9353
|
projectExtId: project.external_id,
|
|
9350
|
-
body:
|
|
9354
|
+
body: chunkSCK3GAE5_cjs.nextPeriodBody(kind, current)
|
|
9351
9355
|
},
|
|
9352
9356
|
{
|
|
9353
9357
|
onSuccess: () => shell.notify.success("Kept"),
|
|
@@ -9364,7 +9368,7 @@ function ResourceMeter({
|
|
|
9364
9368
|
allowance: { used, plan, topUps, autoRoom: capZero ? 0 : room },
|
|
9365
9369
|
legend: {
|
|
9366
9370
|
plan: `Plan ${fmt(plan)}`,
|
|
9367
|
-
topUps: topUps > 0 ? `Top-ups ${fmt(topUps)}${hasLegacy ? ` (${
|
|
9371
|
+
topUps: topUps > 0 ? `Top-ups ${fmt(topUps)}${hasLegacy ? ` (${chunkSCK3GAE5_cjs.blocksLabel(kind, blocks, addons)})` : ""}` : void 0,
|
|
9368
9372
|
autoRoom: room != null && room > 0 && !capZero ? `Automatic up to ${fmt(room)}` : void 0
|
|
9369
9373
|
},
|
|
9370
9374
|
testId: `usage-meter-${slug}`,
|
|
@@ -9393,9 +9397,9 @@ function ResourceMeter({
|
|
|
9393
9397
|
{
|
|
9394
9398
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "size-3.5" }),
|
|
9395
9399
|
label: isAi ? react$1.formatGbp(addons.block_ai_gbp) : `${addons.block_storage_gb} GB`,
|
|
9396
|
-
caption:
|
|
9400
|
+
caption: chunkSCK3GAE5_cjs.addStepCaption(kind, addons),
|
|
9397
9401
|
onClick: onAdd,
|
|
9398
|
-
ariaLabel: `Add ${
|
|
9402
|
+
ariaLabel: `Add ${chunkSCK3GAE5_cjs.stepLabel(kind, isAi ? addons.block_ai_gbp : addons.block_storage_gb)}`,
|
|
9399
9403
|
testId: isAi ? "add-ai-block-button" : "add-storage-block-button"
|
|
9400
9404
|
}
|
|
9401
9405
|
),
|
|
@@ -9406,7 +9410,7 @@ function ResourceMeter({
|
|
|
9406
9410
|
label: isAi ? react$1.formatGbp(removeSize) : `${removeSize} GB`,
|
|
9407
9411
|
caption: `from ${fromShort}`,
|
|
9408
9412
|
onClick: onReduce,
|
|
9409
|
-
ariaLabel: `Remove ${
|
|
9413
|
+
ariaLabel: `Remove ${chunkSCK3GAE5_cjs.stepLabel(kind, removeSize)} from ${from}`,
|
|
9410
9414
|
testId: `reduce-${slug}-button`
|
|
9411
9415
|
}
|
|
9412
9416
|
)
|
|
@@ -9445,10 +9449,10 @@ function UsageCapEditor({ project, addons }) {
|
|
|
9445
9449
|
updateSettings.mutate(
|
|
9446
9450
|
{
|
|
9447
9451
|
projectExtId: project.external_id,
|
|
9448
|
-
body:
|
|
9452
|
+
body: chunkSCK3GAE5_cjs.addonSettingsBody(addons, { spend_cap_pence: nextCap })
|
|
9449
9453
|
},
|
|
9450
9454
|
{
|
|
9451
|
-
onSuccess: () => shell.notify.success(
|
|
9455
|
+
onSuccess: () => shell.notify.success(chunkSCK3GAE5_cjs.budgetSavedMessage(nextCap)),
|
|
9452
9456
|
onError: (error) => shell.notify.error(addonErrorMessage(error))
|
|
9453
9457
|
}
|
|
9454
9458
|
);
|
|
@@ -9459,14 +9463,14 @@ function UsageCapEditor({ project, addons }) {
|
|
|
9459
9463
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9460
9464
|
chunkQZTNTP75_cjs.UsageMeter,
|
|
9461
9465
|
{
|
|
9462
|
-
label:
|
|
9466
|
+
label: chunkSCK3GAE5_cjs.USAGE_CAP_LABEL,
|
|
9463
9467
|
hint: spendResets && savedCap !== 0 ? `resets ${spendResets}` : void 0,
|
|
9464
9468
|
value: readout,
|
|
9465
9469
|
pct: savedCap != null && savedCap > 0 ? pct(spent, savedCap) : 0,
|
|
9466
9470
|
testId: "addon-spend"
|
|
9467
9471
|
}
|
|
9468
9472
|
),
|
|
9469
|
-
addons.cap_reached && savedCap != null && savedCap > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", "data-testid": "addon-cap-reached", children:
|
|
9473
|
+
addons.cap_reached && savedCap != null && savedCap > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", "data-testid": "addon-cap-reached", children: chunkSCK3GAE5_cjs.CAP_REACHED_MESSAGE }),
|
|
9470
9474
|
addons.manual_spent_pence > 0 && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground", "data-testid": "addon-manual-spend", children: [
|
|
9471
9475
|
"Added by hand this month: ",
|
|
9472
9476
|
gbp(addons.manual_spent_pence),
|
|
@@ -9487,7 +9491,7 @@ function UsageCapEditor({ project, addons }) {
|
|
|
9487
9491
|
step: 25,
|
|
9488
9492
|
className: "h-9 w-28",
|
|
9489
9493
|
value: noCap ? "" : value,
|
|
9490
|
-
placeholder: noCap ? "No limit" : String(
|
|
9494
|
+
placeholder: noCap ? "No limit" : String(chunkSCK3GAE5_cjs.DEFAULT_SPEND_CAP_PENCE / 100),
|
|
9491
9495
|
disabled: noCap,
|
|
9492
9496
|
onChange: (e) => setValue(e.target.value),
|
|
9493
9497
|
onKeyDown: (e) => e.key === "Enter" && save(),
|
|
@@ -9513,7 +9517,7 @@ function UsageCapEditor({ project, addons }) {
|
|
|
9513
9517
|
checked: noCap,
|
|
9514
9518
|
onCheckedChange: (checked) => {
|
|
9515
9519
|
setNoCap(checked);
|
|
9516
|
-
if (!checked && value === "") setValue(String(
|
|
9520
|
+
if (!checked && value === "") setValue(String(chunkSCK3GAE5_cjs.DEFAULT_SPEND_CAP_PENCE / 100));
|
|
9517
9521
|
},
|
|
9518
9522
|
"data-testid": "no-cap-switch"
|
|
9519
9523
|
}
|
|
@@ -9526,8 +9530,8 @@ function UsageCapEditor({ project, addons }) {
|
|
|
9526
9530
|
function UsageInfo({ addons, isAnnual }) {
|
|
9527
9531
|
const period = isAnnual ? "year" : "month";
|
|
9528
9532
|
const legacy = (addons.legacy_ai_blocks ?? 0) > 0 || (addons.legacy_storage_blocks ?? 0) > 0;
|
|
9529
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9530
|
-
|
|
9533
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.MoreInfo, { title: "Usage and top-ups", testId: "usage-more-info", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9534
|
+
chunkNFI46I77_cjs.MoreInfoList,
|
|
9531
9535
|
{
|
|
9532
9536
|
items: [
|
|
9533
9537
|
{
|
|
@@ -9542,7 +9546,7 @@ function UsageInfo({ addons, isAnnual }) {
|
|
|
9542
9546
|
term: "Automatic top-ups",
|
|
9543
9547
|
text: "One step is added when AI usage drops below your auto top-up level, or when an upload needs more storage."
|
|
9544
9548
|
},
|
|
9545
|
-
{ term: "Usage cap", text:
|
|
9549
|
+
{ term: "Usage cap", text: chunkSCK3GAE5_cjs.USAGE_CAP_HELP },
|
|
9546
9550
|
{
|
|
9547
9551
|
term: "Reducing",
|
|
9548
9552
|
text: "\u2212 removes one step from your next renewal. You keep this period's allowance. No refunds."
|
|
@@ -9553,7 +9557,7 @@ function UsageInfo({ addons, isAnnual }) {
|
|
|
9553
9557
|
text: "Top-ups bought on an earlier price keep their size and price until removed; they are removed last."
|
|
9554
9558
|
}
|
|
9555
9559
|
] : [],
|
|
9556
|
-
...isAnnual ? [{ term: "Annual", text: `${
|
|
9560
|
+
...isAnnual ? [{ term: "Annual", text: `${chunkSCK3GAE5_cjs.ANNUAL_PREMIUM_AI_NOTE}.` }] : [],
|
|
9557
9561
|
{
|
|
9558
9562
|
term: "Prices",
|
|
9559
9563
|
text: "Shown ex VAT. The confirm step shows the total with VAT before you pay."
|
|
@@ -9645,7 +9649,7 @@ function formatShortDate2(unix) {
|
|
|
9645
9649
|
if (!unix) return null;
|
|
9646
9650
|
return new Date(unix * 1e3).toLocaleDateString("en-GB", { day: "numeric", month: "short" });
|
|
9647
9651
|
}
|
|
9648
|
-
var gbp2 = (pence) =>
|
|
9652
|
+
var gbp2 = (pence) => chunkSCK3GAE5_cjs.formatMoney(pence, "gbp");
|
|
9649
9653
|
var gbNum = (n) => `${Math.round(n * 10) / 10}`;
|
|
9650
9654
|
var pct2 = (used, limit) => limit > 0 ? Math.min(100, used / limit * 100) : 0;
|
|
9651
9655
|
function Meter({
|
|
@@ -9663,15 +9667,15 @@ function Meter({
|
|
|
9663
9667
|
] });
|
|
9664
9668
|
}
|
|
9665
9669
|
function usePlanPrice(project) {
|
|
9666
|
-
const { data: products } = react$1.useProducts({ enabled:
|
|
9667
|
-
if (!
|
|
9670
|
+
const { data: products } = react$1.useProducts({ enabled: chunkSCK3GAE5_cjs.isProProject(project) });
|
|
9671
|
+
if (!chunkSCK3GAE5_cjs.isProProject(project)) return null;
|
|
9668
9672
|
const isAnnual = project.plan_interval === "year";
|
|
9669
9673
|
if (project.amount != null) {
|
|
9670
9674
|
return { incl: project.amount, ex: project.amount_ex_vat ?? null, isAnnual };
|
|
9671
9675
|
}
|
|
9672
|
-
if ((project.packs ??
|
|
9673
|
-
const prices =
|
|
9674
|
-
const pp =
|
|
9676
|
+
if ((project.packs ?? chunkSCK3GAE5_cjs.PRO_PACKS) > chunkSCK3GAE5_cjs.PRO_PACKS) return null;
|
|
9677
|
+
const prices = chunkSCK3GAE5_cjs.findProPrices(products);
|
|
9678
|
+
const pp = chunkSCK3GAE5_cjs.packPrice(isAnnual ? prices.annual : prices.monthly);
|
|
9675
9679
|
return pp ? { incl: pp.amount, ex: pp.amount_ex_vat, isAnnual } : null;
|
|
9676
9680
|
}
|
|
9677
9681
|
function paidLine(payment, addons) {
|
|
@@ -9684,11 +9688,11 @@ function ProjectPlanCard({
|
|
|
9684
9688
|
onChangePlan
|
|
9685
9689
|
}) {
|
|
9686
9690
|
const { quotas, addons } = project;
|
|
9687
|
-
const isPro =
|
|
9691
|
+
const isPro = chunkSCK3GAE5_cjs.isProProject(project);
|
|
9688
9692
|
const used = quotas?.ai_usage?.used ?? 0;
|
|
9689
9693
|
const limit = quotas?.ai_usage?.limit ?? 0;
|
|
9690
|
-
const resetDate = formatShortDate2(
|
|
9691
|
-
const periodEnd =
|
|
9694
|
+
const resetDate = formatShortDate2(chunkSCK3GAE5_cjs.aiUsageResetTimestamp(project));
|
|
9695
|
+
const periodEnd = chunkSCK3GAE5_cjs.formatPeriodEnd(addons?.period_end ?? project.current_period_end);
|
|
9692
9696
|
const when2 = periodEnd ?? "the end of the period";
|
|
9693
9697
|
const storageUsed = quotas?.storage_gb?.used ?? 0;
|
|
9694
9698
|
const storageLimit = quotas?.storage_gb?.limit ?? 0;
|
|
@@ -9704,7 +9708,7 @@ function ProjectPlanCard({
|
|
|
9704
9708
|
project.external_id,
|
|
9705
9709
|
hasScheduledChange && addons ? { packs: packsNext ?? addons.packs, interval: pending ?? currentInterval } : null
|
|
9706
9710
|
).data;
|
|
9707
|
-
const tier = isPro ?
|
|
9711
|
+
const tier = isPro ? chunkSCK3GAE5_cjs.proTierName(project) : project.subscription === "dev" ? "Dev" : "Free";
|
|
9708
9712
|
const pendingPayment = addons?.payment?.status === "pending" ? addons.payment : null;
|
|
9709
9713
|
const confirmUrl = pendingPayment?.confirm_url ?? addons?.confirm_url;
|
|
9710
9714
|
const paidPayment = addons?.payment?.status === "paid" ? addons.payment : null;
|
|
@@ -9738,7 +9742,7 @@ function ProjectPlanCard({
|
|
|
9738
9742
|
isPro && " ",
|
|
9739
9743
|
isPro && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-sm font-normal text-muted-foreground", children: currentInterval === "year" ? "Annual" : "Monthly" })
|
|
9740
9744
|
] }),
|
|
9741
|
-
isPro && periodEnd && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", "data-testid": "project-plan-renews", children: isCanceling ? `Ends ${periodEnd}` : hasScheduledChange && nextBill ? `Next bill ${
|
|
9745
|
+
isPro && periodEnd && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", "data-testid": "project-plan-renews", children: isCanceling ? `Ends ${periodEnd}` : hasScheduledChange && nextBill ? `Next bill ${chunkSCK3GAE5_cjs.totalWithTaxWord({
|
|
9742
9746
|
subtotal: nextBill.next_renewal_ex_vat_pence,
|
|
9743
9747
|
tax: nextBill.next_renewal_tax_pence,
|
|
9744
9748
|
total: nextBill.next_renewal_pence,
|
|
@@ -9747,7 +9751,7 @@ function ProjectPlanCard({
|
|
|
9747
9751
|
] }),
|
|
9748
9752
|
price && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-auto text-right", "data-testid": "project-plan-price", children: [
|
|
9749
9753
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-lg font-semibold tabular-nums text-foreground", children: [
|
|
9750
|
-
price.ex != null ?
|
|
9754
|
+
price.ex != null ? chunkSCK3GAE5_cjs.plusVat(price.ex) : gbp2(price.incl),
|
|
9751
9755
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-normal text-muted-foreground", children: price.isAnnual ? "/year" : "/month" })
|
|
9752
9756
|
] }),
|
|
9753
9757
|
price.ex != null && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs text-muted-foreground", children: [
|
|
@@ -9785,7 +9789,7 @@ function ProjectPlanCard({
|
|
|
9785
9789
|
undoTestId: "undo-plan-change-button",
|
|
9786
9790
|
children: [
|
|
9787
9791
|
"Changes to ",
|
|
9788
|
-
|
|
9792
|
+
chunkSCK3GAE5_cjs.planNameForPacks(packsNext),
|
|
9789
9793
|
" on ",
|
|
9790
9794
|
when2,
|
|
9791
9795
|
"."
|
|
@@ -9830,8 +9834,8 @@ function ProjectPlanCard({
|
|
|
9830
9834
|
}
|
|
9831
9835
|
)
|
|
9832
9836
|
] }),
|
|
9833
|
-
addons?.billing_error && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9834
|
-
confirmUrl ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9837
|
+
addons?.billing_error && /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.PlanNotice, { tone: "error", testId: "plan-billing-error", children: addons.billing_error }),
|
|
9838
|
+
confirmUrl ? /* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.PlanNotice, { testId: "plan-payment-state", children: [
|
|
9835
9839
|
"Waiting for your bank",
|
|
9836
9840
|
pendingPayment?.amount_pence ? ` \xB7 ${gbp2(pendingPayment.amount_pence)}` : "",
|
|
9837
9841
|
" \xB7",
|
|
@@ -9849,7 +9853,7 @@ function ProjectPlanCard({
|
|
|
9849
9853
|
]
|
|
9850
9854
|
}
|
|
9851
9855
|
)
|
|
9852
|
-
] }) : paidPayment && addons && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9856
|
+
] }) : paidPayment && addons && /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.PlanNotice, { testId: "plan-payment-state", children: paidLine(paidPayment, addons) }),
|
|
9853
9857
|
isPro && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9854
9858
|
"button",
|
|
9855
9859
|
{
|
|
@@ -9876,7 +9880,7 @@ function ProjectBilling({
|
|
|
9876
9880
|
const { addons } = project;
|
|
9877
9881
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", "data-testid": "project-billing", children: [
|
|
9878
9882
|
/* @__PURE__ */ jsxRuntime.jsx(ProjectPlanCard, { project, onChangePlan }),
|
|
9879
|
-
addons &&
|
|
9883
|
+
addons && chunkSCK3GAE5_cjs.isProProject(project) && /* @__PURE__ */ jsxRuntime.jsx(ProjectUsageCard, { project, addons })
|
|
9880
9884
|
] });
|
|
9881
9885
|
}
|
|
9882
9886
|
var BREAKDOWN_LABELS = {
|
|
@@ -10007,13 +10011,13 @@ function ProjectUsageContent({
|
|
|
10007
10011
|
};
|
|
10008
10012
|
const quotaPct = effectiveUsage && aiUsageLimit ? Math.round(effectiveUsage.total_spend / aiUsageLimit * 100) : 0;
|
|
10009
10013
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10010
|
-
|
|
10014
|
+
chunkNFI46I77_cjs.UsagePanel,
|
|
10011
10015
|
{
|
|
10012
10016
|
state,
|
|
10013
10017
|
dateRange,
|
|
10014
10018
|
emptyMessage: `No usage ${period === "current" ? "yet this month" : "last month"}.`,
|
|
10015
10019
|
period: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10016
|
-
|
|
10020
|
+
chunkNFI46I77_cjs.UsageToggle,
|
|
10017
10021
|
{
|
|
10018
10022
|
ariaLabel: "Period",
|
|
10019
10023
|
value: period,
|
|
@@ -10026,7 +10030,7 @@ function ProjectUsageContent({
|
|
|
10026
10030
|
),
|
|
10027
10031
|
actions: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10028
10032
|
effectiveUsage?.invoice_pdf && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10029
|
-
|
|
10033
|
+
chunkNFI46I77_cjs.UsageActionButton,
|
|
10030
10034
|
{
|
|
10031
10035
|
label: "Download Stripe invoice PDF",
|
|
10032
10036
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "size-3.5" }),
|
|
@@ -10034,7 +10038,7 @@ function ProjectUsageContent({
|
|
|
10034
10038
|
}
|
|
10035
10039
|
),
|
|
10036
10040
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10037
|
-
|
|
10041
|
+
chunkNFI46I77_cjs.UsageActionButton,
|
|
10038
10042
|
{
|
|
10039
10043
|
label: "Print usage summary",
|
|
10040
10044
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Printer, { className: "size-3.5" }),
|
|
@@ -10044,7 +10048,7 @@ function ProjectUsageContent({
|
|
|
10044
10048
|
] }),
|
|
10045
10049
|
children: effectiveUsage && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10046
10050
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10047
|
-
|
|
10051
|
+
chunkNFI46I77_cjs.UsageSummary,
|
|
10048
10052
|
{
|
|
10049
10053
|
stats: [
|
|
10050
10054
|
{
|
|
@@ -10052,7 +10056,7 @@ function ProjectUsageContent({
|
|
|
10052
10056
|
value: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: react$1.formatGbp(effectiveUsage.total_spend) }),
|
|
10053
10057
|
label: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10054
10058
|
"AI usage",
|
|
10055
|
-
quotaPct > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10059
|
+
quotaPct > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.UsageQuotaHint, { children: [
|
|
10056
10060
|
"(",
|
|
10057
10061
|
quotaPct,
|
|
10058
10062
|
"% of quota)"
|
|
@@ -10073,7 +10077,7 @@ function ProjectUsageContent({
|
|
|
10073
10077
|
}
|
|
10074
10078
|
),
|
|
10075
10079
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10076
|
-
|
|
10080
|
+
chunkNFI46I77_cjs.UsageToggle,
|
|
10077
10081
|
{
|
|
10078
10082
|
ariaLabel: "Breakdown by",
|
|
10079
10083
|
size: "fill",
|
|
@@ -10086,12 +10090,12 @@ function ProjectUsageContent({
|
|
|
10086
10090
|
}
|
|
10087
10091
|
),
|
|
10088
10092
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10089
|
-
|
|
10093
|
+
chunkNFI46I77_cjs.UsageSection,
|
|
10090
10094
|
{
|
|
10091
|
-
footer: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10095
|
+
footer: /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.UsageLegend, { series }),
|
|
10092
10096
|
title: `Daily AI usage${breakdown === "model" ? ` by ${BREAKDOWN_LABELS[breakdown]}` : ""}`,
|
|
10093
10097
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10094
|
-
|
|
10098
|
+
chunkNFI46I77_cjs.UsageLineChart,
|
|
10095
10099
|
{
|
|
10096
10100
|
dates,
|
|
10097
10101
|
series,
|
|
@@ -10102,12 +10106,12 @@ function ProjectUsageContent({
|
|
|
10102
10106
|
}
|
|
10103
10107
|
),
|
|
10104
10108
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10105
|
-
|
|
10109
|
+
chunkNFI46I77_cjs.UsageSection,
|
|
10106
10110
|
{
|
|
10107
10111
|
title: "Breakdown",
|
|
10108
10112
|
gap: "md",
|
|
10109
10113
|
action: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10110
|
-
|
|
10114
|
+
chunkNFI46I77_cjs.UsageToggle,
|
|
10111
10115
|
{
|
|
10112
10116
|
ariaLabel: "Breakdown metric",
|
|
10113
10117
|
value: metric,
|
|
@@ -10119,7 +10123,7 @@ function ProjectUsageContent({
|
|
|
10119
10123
|
}
|
|
10120
10124
|
),
|
|
10121
10125
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10122
|
-
|
|
10126
|
+
chunkNFI46I77_cjs.UsageProportionBar,
|
|
10123
10127
|
{
|
|
10124
10128
|
metric,
|
|
10125
10129
|
items: breakdownItems.map((item) => ({
|
|
@@ -10137,13 +10141,13 @@ function ProjectUsageContent({
|
|
|
10137
10141
|
);
|
|
10138
10142
|
}
|
|
10139
10143
|
function ProjectDetail({ projectExtId, storage }) {
|
|
10140
|
-
const { stripeEnabled } =
|
|
10144
|
+
const { stripeEnabled } = chunkSCK3GAE5_cjs.useBillingSupport();
|
|
10141
10145
|
const [planOpen, setPlanOpen] = react.useState(false);
|
|
10142
10146
|
const [renameOpen, setRenameOpen] = react.useState(false);
|
|
10143
10147
|
const [renameValue, setRenameValue] = react.useState("");
|
|
10144
10148
|
const updateProject = react$1.useUpdateProjectFields();
|
|
10145
10149
|
const { data: projects, isLoading } = react$1.useProjects();
|
|
10146
|
-
const currentUserExtId =
|
|
10150
|
+
const currentUserExtId = chunkSCK3GAE5_cjs.useSelfExtId();
|
|
10147
10151
|
const project = projects?.find((p) => p.external_id === projectExtId);
|
|
10148
10152
|
const handleSaveRename = react.useCallback(() => {
|
|
10149
10153
|
const trimmed = renameValue.trim();
|
|
@@ -10177,7 +10181,7 @@ function ProjectDetail({ projectExtId, storage }) {
|
|
|
10177
10181
|
}
|
|
10178
10182
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-6 space-y-6 max-w-4xl", "data-testid": `project-detail-${project.external_id}`, children: [
|
|
10179
10183
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10180
|
-
|
|
10184
|
+
chunkNFI46I77_cjs.ProjectDetailHeader,
|
|
10181
10185
|
{
|
|
10182
10186
|
icon: /* @__PURE__ */ jsxRuntime.jsx(ui.EntityIcon, { entityType: "PROJECT" }),
|
|
10183
10187
|
name: project.name,
|
|
@@ -10185,11 +10189,11 @@ function ProjectDetail({ projectExtId, storage }) {
|
|
|
10185
10189
|
setRenameValue(project.name);
|
|
10186
10190
|
setRenameOpen(true);
|
|
10187
10191
|
},
|
|
10188
|
-
badge: stripeEnabled ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10192
|
+
badge: stripeEnabled ? /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.PlanBadge, { ...chunkSCK3GAE5_cjs.planBadgeView(project), size: "md" }) : void 0
|
|
10189
10193
|
}
|
|
10190
10194
|
),
|
|
10191
10195
|
hasBilling && /* @__PURE__ */ jsxRuntime.jsx(ProjectBilling, { project, onChangePlan: () => setPlanOpen(true) }),
|
|
10192
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10196
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.ProjectDetailSection, { title: hasBilling ? "Collaborator limits" : "Plan limits", children: [
|
|
10193
10197
|
!hasBilling && /* @__PURE__ */ jsxRuntime.jsx(SubscriptionStatus, { project }),
|
|
10194
10198
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10195
10199
|
"div",
|
|
@@ -10205,7 +10209,7 @@ function ProjectDetail({ projectExtId, storage }) {
|
|
|
10205
10209
|
}
|
|
10206
10210
|
)
|
|
10207
10211
|
] }),
|
|
10208
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10212
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.ProjectDetailSection, { title: "Usage", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10209
10213
|
ProjectUsageContent,
|
|
10210
10214
|
{
|
|
10211
10215
|
projectExtId: project.external_id,
|
|
@@ -10215,7 +10219,7 @@ function ProjectDetail({ projectExtId, storage }) {
|
|
|
10215
10219
|
) }),
|
|
10216
10220
|
storage,
|
|
10217
10221
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10218
|
-
|
|
10222
|
+
chunkNFI46I77_cjs.RenameDialog,
|
|
10219
10223
|
{
|
|
10220
10224
|
open: renameOpen,
|
|
10221
10225
|
onClose: () => setRenameOpen(false),
|
|
@@ -10230,7 +10234,7 @@ function ProjectDetail({ projectExtId, storage }) {
|
|
|
10230
10234
|
] });
|
|
10231
10235
|
}
|
|
10232
10236
|
function createProjectErrorMessage(error, fallback = "Failed to create project") {
|
|
10233
|
-
const detail =
|
|
10237
|
+
const detail = chunkSCK3GAE5_cjs.apiErrorDetail(error);
|
|
10234
10238
|
if (typeof detail === "string" && detail) return detail;
|
|
10235
10239
|
const message = detail?.message;
|
|
10236
10240
|
return typeof message === "string" && message ? message : fallback;
|
|
@@ -10240,7 +10244,7 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
10240
10244
|
const [plan, setPlan] = react.useState("pro");
|
|
10241
10245
|
const [isAnnual, setIsAnnual] = react.useState(false);
|
|
10242
10246
|
const [promoCode, setPromoCode] = react.useState("");
|
|
10243
|
-
const [addonBudget, setAddonBudget] = react.useState(String(
|
|
10247
|
+
const [addonBudget, setAddonBudget] = react.useState(String(chunkSCK3GAE5_cjs.DEFAULT_SPEND_CAP_PENCE / 100));
|
|
10244
10248
|
const [checkoutBudget, setCheckoutBudget] = react.useState(null);
|
|
10245
10249
|
const [aiBlocks, setAiBlocks] = react.useState(0);
|
|
10246
10250
|
const [storageBlocks, setStorageBlocks] = react.useState(0);
|
|
@@ -10254,7 +10258,7 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
10254
10258
|
const [checkoutProjectName, setCheckoutProjectName] = react.useState("");
|
|
10255
10259
|
const [checkoutInterval, setCheckoutInterval] = react.useState("month");
|
|
10256
10260
|
const paymentCompletedRef = react.useRef(false);
|
|
10257
|
-
const { stripeEnabled } =
|
|
10261
|
+
const { stripeEnabled } = chunkSCK3GAE5_cjs.useBillingSupport();
|
|
10258
10262
|
const { data: products, isLoading: productsLoading } = react$1.useProducts({
|
|
10259
10263
|
enabled: stripeEnabled
|
|
10260
10264
|
});
|
|
@@ -10283,18 +10287,18 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
10283
10287
|
setPlan("pro");
|
|
10284
10288
|
setPromoCode("");
|
|
10285
10289
|
setPostalCode("");
|
|
10286
|
-
setAddonBudget(String(
|
|
10290
|
+
setAddonBudget(String(chunkSCK3GAE5_cjs.DEFAULT_SPEND_CAP_PENCE / 100));
|
|
10287
10291
|
setAiBlocks(0);
|
|
10288
10292
|
setStorageBlocks(0);
|
|
10289
10293
|
setIsCreating(false);
|
|
10290
10294
|
}
|
|
10291
10295
|
onOpenChange(newOpen);
|
|
10292
10296
|
};
|
|
10293
|
-
const prices =
|
|
10297
|
+
const prices = chunkSCK3GAE5_cjs.findProPrices(products);
|
|
10294
10298
|
const intervalPrice = isAnnual ? prices.annual : prices.monthly;
|
|
10295
|
-
const selectedPrice =
|
|
10299
|
+
const selectedPrice = chunkSCK3GAE5_cjs.packPrice(intervalPrice);
|
|
10296
10300
|
const currency = intervalPrice?.currency ?? "gbp";
|
|
10297
|
-
const savingsPercent =
|
|
10301
|
+
const savingsPercent = chunkSCK3GAE5_cjs.calcSavingsPercent(prices.monthly, prices.annual);
|
|
10298
10302
|
const isPro = stripeEnabled && plan !== "free";
|
|
10299
10303
|
const quote = useCheckoutQuote({
|
|
10300
10304
|
interval: isAnnual ? "year" : "month",
|
|
@@ -10304,14 +10308,14 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
10304
10308
|
storageBlocks,
|
|
10305
10309
|
enabled: open && isPro && !!selectedPrice
|
|
10306
10310
|
});
|
|
10307
|
-
const canSubmit = !!projectName.trim() && !isCreating && !createProject.isPending && (!isPro || !!selectedPrice &&
|
|
10311
|
+
const canSubmit = !!projectName.trim() && !isCreating && !createProject.isPending && (!isPro || !!selectedPrice && chunkSCK3GAE5_cjs.parseBudgetPounds(addonBudget) !== void 0 && quote.canContinue);
|
|
10308
10312
|
const handleCreateFree = () => {
|
|
10309
10313
|
setIsCreating(true);
|
|
10310
10314
|
createProject.mutate(
|
|
10311
10315
|
{
|
|
10312
10316
|
name: projectName.trim(),
|
|
10313
10317
|
plan: "free",
|
|
10314
|
-
daily_cap_per_user:
|
|
10318
|
+
daily_cap_per_user: chunkSCK3GAE5_cjs.SUGGESTED_DAILY_CAP_PER_USER
|
|
10315
10319
|
},
|
|
10316
10320
|
{
|
|
10317
10321
|
onSuccess: () => {
|
|
@@ -10328,14 +10332,14 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
10328
10332
|
};
|
|
10329
10333
|
const handleSubscribe = () => {
|
|
10330
10334
|
const interval = isAnnual ? "year" : "month";
|
|
10331
|
-
const parsed =
|
|
10332
|
-
const budgetToSend = parsed == null || parsed ===
|
|
10335
|
+
const parsed = chunkSCK3GAE5_cjs.parseBudgetPounds(addonBudget);
|
|
10336
|
+
const budgetToSend = parsed == null || parsed === chunkSCK3GAE5_cjs.DEFAULT_SPEND_CAP_PENCE ? null : parsed;
|
|
10333
10337
|
setIsCreating(true);
|
|
10334
10338
|
createProject.mutate(
|
|
10335
10339
|
{
|
|
10336
10340
|
name: projectName.trim(),
|
|
10337
10341
|
plan: "pro",
|
|
10338
|
-
daily_cap_per_user:
|
|
10342
|
+
daily_cap_per_user: chunkSCK3GAE5_cjs.SUGGESTED_DAILY_CAP_PER_USER
|
|
10339
10343
|
},
|
|
10340
10344
|
{
|
|
10341
10345
|
onSuccess: (newProject) => {
|
|
@@ -10376,8 +10380,8 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
10376
10380
|
description: stripeEnabled ? "Name it and pick a plan." : "Projects group your workspaces.",
|
|
10377
10381
|
showDescription: true,
|
|
10378
10382
|
size: "xl",
|
|
10379
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10380
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10383
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.PlanStack, { gap: 5, children: [
|
|
10384
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.PlanStack, { gap: 2, children: [
|
|
10381
10385
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "new-project-name", children: "Name" }),
|
|
10382
10386
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10383
10387
|
ui.Input,
|
|
@@ -10393,16 +10397,16 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
10393
10397
|
}
|
|
10394
10398
|
)
|
|
10395
10399
|
] }),
|
|
10396
|
-
stripeEnabled && (productsLoading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10397
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10400
|
+
stripeEnabled && (productsLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.PlanNotice, { children: "Loading plans\u2026" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10401
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.PlanPickerCard, { children: [
|
|
10398
10402
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10399
|
-
|
|
10403
|
+
chunkNFI46I77_cjs.PlanPickerHeader,
|
|
10400
10404
|
{
|
|
10401
10405
|
title: "Plan",
|
|
10402
10406
|
info: /* @__PURE__ */ jsxRuntime.jsx(PlanInfoPopover2, {}),
|
|
10403
10407
|
infoPlacement: "toggle",
|
|
10404
10408
|
toggle: plan !== "free" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10405
|
-
|
|
10409
|
+
chunkNFI46I77_cjs.PricingToggle,
|
|
10406
10410
|
{
|
|
10407
10411
|
isAnnual,
|
|
10408
10412
|
onToggle: () => setIsAnnual(!isAnnual),
|
|
@@ -10440,7 +10444,7 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
10440
10444
|
currency
|
|
10441
10445
|
}
|
|
10442
10446
|
),
|
|
10443
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10447
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.PromoCodeInput, { value: promoCode, onChange: setPromoCode }),
|
|
10444
10448
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10445
10449
|
CheckoutCountrySelect,
|
|
10446
10450
|
{
|
|
@@ -10459,10 +10463,10 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
10459
10463
|
onPostalCodeChange: setPostalCode
|
|
10460
10464
|
}
|
|
10461
10465
|
)
|
|
10462
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
10466
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.PlanNotice, { children: "Pro isn't available right now." }))
|
|
10463
10467
|
] })),
|
|
10464
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10465
|
-
isSlow && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10468
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.PlanActionButton, { onClick: submit, disabled: !canSubmit, children: isCreating ? "Creating\u2026" : isPro ? "Continue to payment" : "Create project" }),
|
|
10469
|
+
isSlow && /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.PlanNotice, { className: "text-xs", testId: "new-project-still-working", children: "Still working. We'll update here." })
|
|
10466
10470
|
] })
|
|
10467
10471
|
}
|
|
10468
10472
|
),
|
|
@@ -10490,7 +10494,7 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
10490
10494
|
function useAutoRefreshPendingProjects() {
|
|
10491
10495
|
const { data: projects } = react$1.useProjects();
|
|
10492
10496
|
const refreshProject = react$1.useRefreshProject();
|
|
10493
|
-
const currentUserExtId =
|
|
10497
|
+
const currentUserExtId = chunkSCK3GAE5_cjs.useSelfExtId();
|
|
10494
10498
|
const refreshedRef = react.useRef(/* @__PURE__ */ new Set());
|
|
10495
10499
|
react.useEffect(() => {
|
|
10496
10500
|
if (!projects || !currentUserExtId) return;
|
|
@@ -10533,9 +10537,10 @@ function WorkspaceCardsView({
|
|
|
10533
10537
|
onOpenWorkspace,
|
|
10534
10538
|
onOpenProject,
|
|
10535
10539
|
onCreateWorkspace,
|
|
10536
|
-
createDisabledReason
|
|
10540
|
+
createDisabledReason,
|
|
10541
|
+
workspaceState
|
|
10537
10542
|
}) {
|
|
10538
|
-
const { stripeEnabled } =
|
|
10543
|
+
const { stripeEnabled } = chunkSCK3GAE5_cjs.useBillingSupport();
|
|
10539
10544
|
const workspaceLabel = ui.getEntityLabel("WORKSPACE");
|
|
10540
10545
|
const projectLabel = ui.getEntityLabel("PROJECT").toLowerCase();
|
|
10541
10546
|
const { groups, projects, selfId } = list;
|
|
@@ -10554,7 +10559,7 @@ function WorkspaceCardsView({
|
|
|
10554
10559
|
}
|
|
10555
10560
|
return /* @__PURE__ */ jsxRuntime.jsx(chunkMSFQDELO_cjs.WorkspaceList, { testId: "workspace-cards-list", children: groups.map((group) => {
|
|
10556
10561
|
const project = projects.find((p) => p.external_id === group.projectExtId);
|
|
10557
|
-
const { breakdown, readout } =
|
|
10562
|
+
const { breakdown, readout } = chunkSCK3GAE5_cjs.projectGroupBilling(project, {
|
|
10558
10563
|
isOwned: group.isOwned,
|
|
10559
10564
|
stripeEnabled
|
|
10560
10565
|
});
|
|
@@ -10596,27 +10601,35 @@ function WorkspaceCardsView({
|
|
|
10596
10601
|
testId: "add-workspace-button"
|
|
10597
10602
|
}
|
|
10598
10603
|
),
|
|
10599
|
-
[...group.workspaces].sort(chunkJUUOJP7I_cjs.byRecentUpdate).map((workspace) =>
|
|
10600
|
-
|
|
10601
|
-
|
|
10602
|
-
|
|
10603
|
-
|
|
10604
|
-
|
|
10605
|
-
|
|
10606
|
-
|
|
10607
|
-
|
|
10608
|
-
|
|
10609
|
-
|
|
10610
|
-
|
|
10611
|
-
|
|
10612
|
-
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
|
|
10618
|
-
|
|
10619
|
-
|
|
10604
|
+
[...group.workspaces].sort(chunkJUUOJP7I_cjs.byRecentUpdate).map((workspace) => {
|
|
10605
|
+
const state = workspaceState?.(workspace);
|
|
10606
|
+
const selectLabel = state?.selectLabel;
|
|
10607
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10608
|
+
chunkMSFQDELO_cjs.WorkspaceCard,
|
|
10609
|
+
{
|
|
10610
|
+
workspace: {
|
|
10611
|
+
...toWorkspaceSummary(workspace, selfId),
|
|
10612
|
+
...state?.status != null && { subtitle: state.status }
|
|
10613
|
+
},
|
|
10614
|
+
current: currentWorkspaceId === workspace.external_id,
|
|
10615
|
+
onSelect: () => onOpenWorkspace(workspace),
|
|
10616
|
+
href: state?.onSelect ? void 0 : chunkLJJJ6CYH_cjs.buildDeepLinkPath({ workspaceId: workspace.external_id }),
|
|
10617
|
+
labels: selectLabel ? { openWorkspace: () => selectLabel } : void 0,
|
|
10618
|
+
mark: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10619
|
+
ui.ShieldIcon,
|
|
10620
|
+
{
|
|
10621
|
+
char: workspace.name.charAt(0),
|
|
10622
|
+
workspaceColor: chunkV46W7YLI_cjs.workspaceKindColor(react$1.getWorkspaceKind(workspace)),
|
|
10623
|
+
size: 28,
|
|
10624
|
+
isSelected: true
|
|
10625
|
+
}
|
|
10626
|
+
),
|
|
10627
|
+
testId: `workspace-card-${workspace.external_id}`,
|
|
10628
|
+
openCueTestId: `workspace-open-${workspace.external_id}`
|
|
10629
|
+
},
|
|
10630
|
+
workspace.external_id
|
|
10631
|
+
);
|
|
10632
|
+
})
|
|
10620
10633
|
]
|
|
10621
10634
|
},
|
|
10622
10635
|
group.key
|
|
@@ -10705,7 +10718,7 @@ function useConnectedWorkspaceList({
|
|
|
10705
10718
|
[selfId, pinned]
|
|
10706
10719
|
);
|
|
10707
10720
|
const filtered = react.useMemo(
|
|
10708
|
-
() =>
|
|
10721
|
+
() => chunkNFI46I77_cjs.applyTriStateFilters(workspaces, filterMap, attributesOf),
|
|
10709
10722
|
[workspaces, filterMap, attributesOf]
|
|
10710
10723
|
);
|
|
10711
10724
|
const groups = react.useMemo(
|
|
@@ -10770,7 +10783,7 @@ function useConnectedWorkspaceList({
|
|
|
10770
10783
|
};
|
|
10771
10784
|
}
|
|
10772
10785
|
var WorkspaceTableView = react.lazy(
|
|
10773
|
-
() => import('../WorkspaceTableView-
|
|
10786
|
+
() => import('../WorkspaceTableView-CZEFIAVT.cjs').then((m) => ({ default: m.WorkspaceTableView }))
|
|
10774
10787
|
);
|
|
10775
10788
|
var WORKSPACES_TAB_ID = "workspaces";
|
|
10776
10789
|
var defaultRenderMember2 = (user, size) => {
|
|
@@ -10801,7 +10814,8 @@ function ConnectedWorkspaceList({
|
|
|
10801
10814
|
activeTab = WORKSPACES_TAB_ID,
|
|
10802
10815
|
onTabChange,
|
|
10803
10816
|
children,
|
|
10804
|
-
labels
|
|
10817
|
+
labels,
|
|
10818
|
+
workspaceState
|
|
10805
10819
|
}) {
|
|
10806
10820
|
const list = useConnectedWorkspaceList({ filters, onFiltersChange, labels });
|
|
10807
10821
|
const { openProject } = chunkCNHUJRQ4_cjs.useBlocksEnvironment();
|
|
@@ -10815,9 +10829,13 @@ function ConnectedWorkspaceList({
|
|
|
10815
10829
|
onViewChange?.(next);
|
|
10816
10830
|
if (controlledView === void 0) setLocalView(next);
|
|
10817
10831
|
};
|
|
10818
|
-
const open = (workspace) =>
|
|
10832
|
+
const open = (workspace) => {
|
|
10833
|
+
const select = workspaceState?.(workspace)?.onSelect;
|
|
10834
|
+
if (select) select();
|
|
10835
|
+
else void openWorkspace(workspace.external_id, { name: workspace.name });
|
|
10836
|
+
};
|
|
10819
10837
|
const createDisabledReason = list.canCreateProjects === false ? react$1.PROJECT_CREATION_DENIED_REASON : void 0;
|
|
10820
|
-
if (list.isLoading) return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10838
|
+
if (list.isLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkFBSIWJSG_cjs.LoadingIndicator, { message: "Loading workspaces..." });
|
|
10821
10839
|
if (list.error) {
|
|
10822
10840
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10823
10841
|
chunkOOU4QLRK_cjs.HomeLoadError,
|
|
@@ -10886,10 +10904,11 @@ function ConnectedWorkspaceList({
|
|
|
10886
10904
|
onOpenWorkspace: open,
|
|
10887
10905
|
onOpenProject: openProject,
|
|
10888
10906
|
onCreateWorkspace,
|
|
10889
|
-
createDisabledReason
|
|
10907
|
+
createDisabledReason,
|
|
10908
|
+
workspaceState
|
|
10890
10909
|
}
|
|
10891
10910
|
) })
|
|
10892
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10911
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkFBSIWJSG_cjs.LoadingIndicator, { message: "Loading grid..." }), children: /* @__PURE__ */ jsxRuntime.jsx(chunkOOU4QLRK_cjs.HomeCenteredColumn, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10893
10912
|
WorkspaceTableView,
|
|
10894
10913
|
{
|
|
10895
10914
|
list,
|
|
@@ -10897,7 +10916,8 @@ function ConnectedWorkspaceList({
|
|
|
10897
10916
|
onOpenProject: openProject,
|
|
10898
10917
|
renderMember,
|
|
10899
10918
|
gridState,
|
|
10900
|
-
onGridStateChange
|
|
10919
|
+
onGridStateChange,
|
|
10920
|
+
workspaceState
|
|
10901
10921
|
}
|
|
10902
10922
|
) }) }) })
|
|
10903
10923
|
] });
|
|
@@ -10932,7 +10952,7 @@ function ConnectedProjectsPanel({
|
|
|
10932
10952
|
const { data: projects } = react$1.useProjects();
|
|
10933
10953
|
const canCreateProjects = react$1.useCanCreateProjects();
|
|
10934
10954
|
const { userId } = chunkFM3IRQJW_cjs.useConnectedWorkspace();
|
|
10935
|
-
const { stripeEnabled } =
|
|
10955
|
+
const { stripeEnabled } = chunkSCK3GAE5_cjs.useBillingSupport();
|
|
10936
10956
|
const billingPortal = useOpenBillingPortal();
|
|
10937
10957
|
const [newProjectOpen, setNewProjectOpen] = react.useState(false);
|
|
10938
10958
|
useAutoRefreshPendingProjects();
|
|
@@ -10959,15 +10979,15 @@ function ConnectedProjectsPanel({
|
|
|
10959
10979
|
[ownedCount, tabs, projects]
|
|
10960
10980
|
);
|
|
10961
10981
|
const paidProject = projects?.find(isPaid);
|
|
10962
|
-
const panel = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10963
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10982
|
+
const panel = /* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.PanelFrame, { className, testId: "projects-panel", children: [
|
|
10983
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.DraggableHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10964
10984
|
chunk7RGLTF76_cjs.TabHeader,
|
|
10965
10985
|
{
|
|
10966
10986
|
tabs: headerTabs,
|
|
10967
10987
|
activeTabId: activeProjectId ?? PROJECTS_BASE_TAB_ID,
|
|
10968
10988
|
onTabChange: (id) => tabs.onSelect(id === PROJECTS_BASE_TAB_ID ? null : id),
|
|
10969
10989
|
afterTabs: (isCompact) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10970
|
-
|
|
10990
|
+
chunkNFI46I77_cjs.PanelAddButton,
|
|
10971
10991
|
{
|
|
10972
10992
|
label: "New project",
|
|
10973
10993
|
onClick: () => setNewProjectOpen(true),
|
|
@@ -10982,15 +11002,15 @@ function ConnectedProjectsPanel({
|
|
|
10982
11002
|
compactBreakpoint: 360
|
|
10983
11003
|
}
|
|
10984
11004
|
) }),
|
|
10985
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11005
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.PanelFrameBody, { children: activeProjectId ? /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.PanelScroll, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10986
11006
|
ProjectDetail,
|
|
10987
11007
|
{
|
|
10988
11008
|
projectExtId: activeProjectId,
|
|
10989
11009
|
storage: projectStorage?.(activeProjectId)
|
|
10990
11010
|
}
|
|
10991
|
-
) }) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11011
|
+
) }) : /* @__PURE__ */ jsxRuntime.jsxs(chunkNFI46I77_cjs.PanelScroll, { variant: "padded", children: [
|
|
10992
11012
|
/* @__PURE__ */ jsxRuntime.jsx(ProjectsTable, {}),
|
|
10993
|
-
stripeEnabled && paidProject && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11013
|
+
stripeEnabled && paidProject && /* @__PURE__ */ jsxRuntime.jsx(chunkNFI46I77_cjs.PanelActionsRow, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10994
11014
|
ui.Button,
|
|
10995
11015
|
{
|
|
10996
11016
|
onClick: () => billingPortal.open(paidProject.external_id),
|
|
@@ -11045,7 +11065,7 @@ function recentConversations(conversations) {
|
|
|
11045
11065
|
return [...conversations].sort((a, b) => time(b.updated_at) - time(a.updated_at)).slice(0, RECENT_ROWS).map((c) => ({
|
|
11046
11066
|
id: c.external_id,
|
|
11047
11067
|
title: c.title?.trim() || "Untitled thread",
|
|
11048
|
-
subtitle: c.status ? [
|
|
11068
|
+
subtitle: c.status ? [chunkLY37J3AC_cjs.STATUS_LABELS[chunkLY37J3AC_cjs.asTaskStatus(c.status)], c.due_at ? `due ${shortDate(c.due_at)}` : null].filter(Boolean).join(" \xB7 ") : `${c.message_count} ${c.message_count === 1 ? "message" : "messages"}`,
|
|
11049
11069
|
time: timeAndDate(c.updated_at)
|
|
11050
11070
|
}));
|
|
11051
11071
|
}
|
|
@@ -13137,7 +13157,7 @@ function ConnectedMailbox({
|
|
|
13137
13157
|
onTabChange: () => {
|
|
13138
13158
|
},
|
|
13139
13159
|
compactBreakpoint: 360,
|
|
13140
|
-
firstTabContent: account ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13160
|
+
firstTabContent: account ? /* @__PURE__ */ jsxRuntime.jsxs(chunkFWIBFGUQ_cjs.FilesFilterBar, { children: [
|
|
13141
13161
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13142
13162
|
chunk2EI7NCUA_cjs.FilterInput,
|
|
13143
13163
|
{
|
|
@@ -13172,7 +13192,7 @@ function ConnectedMailbox({
|
|
|
13172
13192
|
}
|
|
13173
13193
|
),
|
|
13174
13194
|
folderList && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13175
|
-
|
|
13195
|
+
chunkFWIBFGUQ_cjs.FolderFilterButton,
|
|
13176
13196
|
{
|
|
13177
13197
|
label: folderList.find((f) => f.id === folderId)?.name ?? "Folders",
|
|
13178
13198
|
isActive: false,
|
|
@@ -13180,7 +13200,7 @@ function ConnectedMailbox({
|
|
|
13180
13200
|
onOpenChange: setFolderMenuOpen,
|
|
13181
13201
|
testId: "mail-folder-button",
|
|
13182
13202
|
children: folderList.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
13183
|
-
|
|
13203
|
+
chunkFWIBFGUQ_cjs.FolderPickerRow,
|
|
13184
13204
|
{
|
|
13185
13205
|
label: item.name,
|
|
13186
13206
|
count: item.unread > 0 ? item.unread : void 0,
|
|
@@ -13445,7 +13465,7 @@ function ConnectedMailbox({
|
|
|
13445
13465
|
}
|
|
13446
13466
|
),
|
|
13447
13467
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13448
|
-
|
|
13468
|
+
chunkZAVEMQ37_cjs.ConfirmDialog,
|
|
13449
13469
|
{
|
|
13450
13470
|
isOpen: confirmDelete !== null,
|
|
13451
13471
|
onClose: () => setConfirmDelete(null),
|
|
@@ -16931,7 +16951,7 @@ function TileStatusBadge({ doc, status }) {
|
|
|
16931
16951
|
case "failed":
|
|
16932
16952
|
tone = "danger";
|
|
16933
16953
|
icon2 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
16934
|
-
|
|
16954
|
+
chunkFWIBFGUQ_cjs.FailedStageIcon,
|
|
16935
16955
|
{
|
|
16936
16956
|
stage: doc.failed_stage ?? null,
|
|
16937
16957
|
errorMessage: doc.error_message,
|
|
@@ -16958,7 +16978,7 @@ function TileStatusBadge({ doc, status }) {
|
|
|
16958
16978
|
return null;
|
|
16959
16979
|
}
|
|
16960
16980
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16961
|
-
|
|
16981
|
+
chunkFWIBFGUQ_cjs.StatusPill,
|
|
16962
16982
|
{
|
|
16963
16983
|
tone,
|
|
16964
16984
|
icon: icon2,
|
|
@@ -16970,11 +16990,11 @@ function TileStatusBadge({ doc, status }) {
|
|
|
16970
16990
|
function TileVisibilityBadge({ doc }) {
|
|
16971
16991
|
const shared = !!doc.shared;
|
|
16972
16992
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16973
|
-
|
|
16993
|
+
chunkFWIBFGUQ_cjs.StatusPill,
|
|
16974
16994
|
{
|
|
16975
16995
|
icon: /* @__PURE__ */ jsxRuntime.jsx(ui.VisibilityIcon, { isShared: shared, className: "size-3.5", "aria-hidden": true }),
|
|
16976
16996
|
label: shared ? ui.getEntityLabel("WORKSPACE") : "Only you",
|
|
16977
|
-
title:
|
|
16997
|
+
title: chunkFWIBFGUQ_cjs.visibilityAudience(shared),
|
|
16978
16998
|
testId: `explorer-file-visibility-${doc.external_id}`
|
|
16979
16999
|
}
|
|
16980
17000
|
);
|
|
@@ -17001,7 +17021,7 @@ function FileTooltipContent({
|
|
|
17001
17021
|
}) {
|
|
17002
17022
|
const labels = (doc.doctags ?? []).map((dt) => tagNameById.get(dt.tag_ext_id)).filter((name) => !!name);
|
|
17003
17023
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17004
|
-
|
|
17024
|
+
chunkFWIBFGUQ_cjs.ExplorerFileTooltip,
|
|
17005
17025
|
{
|
|
17006
17026
|
title: ui.getDocumentTitle(doc, doc.file_name ?? ""),
|
|
17007
17027
|
summary: react$1.getDocumentSubject(doc),
|
|
@@ -17010,7 +17030,7 @@ function FileTooltipContent({
|
|
|
17010
17030
|
shared: !!doc.shared,
|
|
17011
17031
|
visibilityIcon: /* @__PURE__ */ jsxRuntime.jsx(ui.VisibilityIcon, { isShared: !!doc.shared, className: "h-3 w-3" }),
|
|
17012
17032
|
labels,
|
|
17013
|
-
uiLabels: { shared:
|
|
17033
|
+
uiLabels: { shared: chunkFWIBFGUQ_cjs.visibilityAudience(true), private: chunkFWIBFGUQ_cjs.visibilityAudience(false) }
|
|
17014
17034
|
}
|
|
17015
17035
|
);
|
|
17016
17036
|
}
|
|
@@ -17121,7 +17141,7 @@ var FileTile = react.memo(function FileTile2({
|
|
|
17121
17141
|
];
|
|
17122
17142
|
const tooltip = renaming || dndActive ? void 0 : /* @__PURE__ */ jsxRuntime.jsx(FileTooltipContent, { doc, modifiedBy, tagNameById });
|
|
17123
17143
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17124
|
-
|
|
17144
|
+
chunkFWIBFGUQ_cjs.ExplorerFileTile,
|
|
17125
17145
|
{
|
|
17126
17146
|
id: doc.external_id,
|
|
17127
17147
|
title: ui.getDocumentTitle(doc, doc.file_name ?? ""),
|
|
@@ -17214,17 +17234,17 @@ var FolderTile = react.memo(function FolderTile2({
|
|
|
17214
17234
|
}
|
|
17215
17235
|
] : []
|
|
17216
17236
|
];
|
|
17217
|
-
const displayName = folder.path.length === 1 ?
|
|
17218
|
-
const providerIcon = folder.path.length === 1 &&
|
|
17237
|
+
const displayName = folder.path.length === 1 ? chunkFWIBFGUQ_cjs.formatFolderSegment(folder.name) : folder.name;
|
|
17238
|
+
const providerIcon = folder.path.length === 1 && chunkFWIBFGUQ_cjs.hasFolderProviderIcon(folder.name) ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
17219
17239
|
"span",
|
|
17220
17240
|
{
|
|
17221
17241
|
className: "flex items-center justify-center drop-shadow-sm",
|
|
17222
17242
|
style: { width: iconSize, height: iconSize },
|
|
17223
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17243
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkFWIBFGUQ_cjs.FolderProviderIcon, { folderPath: folder.name, className: "h-full w-full" })
|
|
17224
17244
|
}
|
|
17225
17245
|
) : void 0;
|
|
17226
17246
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17227
|
-
|
|
17247
|
+
chunkFWIBFGUQ_cjs.ExplorerFolderTile,
|
|
17228
17248
|
{
|
|
17229
17249
|
name: folder.name,
|
|
17230
17250
|
displayName: displayName === "" ? null : displayName,
|
|
@@ -17256,7 +17276,7 @@ var COMPACT_BELOW = 132;
|
|
|
17256
17276
|
var NO_DOCUMENTS = [];
|
|
17257
17277
|
function useFilesWorkspace() {
|
|
17258
17278
|
const { workspaceId, userId, live } = chunkFM3IRQJW_cjs.useConnectedWorkspace();
|
|
17259
|
-
const { members, role } =
|
|
17279
|
+
const { members, role } = chunkRJUXSXBH_cjs.useConnectedWorkspaceRole();
|
|
17260
17280
|
const { data: workspaces } = react$1.useWorkspaces({ enabled: live });
|
|
17261
17281
|
const workspaceName = workspaces?.find((w) => w.external_id === workspaceId)?.name;
|
|
17262
17282
|
return {
|
|
@@ -17330,8 +17350,8 @@ var ConnectedFilesExplorer = react.forwardRef(function ConnectedFilesExplorer2({
|
|
|
17330
17350
|
const { folders, files } = react.useMemo(() => {
|
|
17331
17351
|
const result = isSearching ? {
|
|
17332
17352
|
folders: [],
|
|
17333
|
-
files:
|
|
17334
|
-
} :
|
|
17353
|
+
files: chunkFWIBFGUQ_cjs.searchExplorerDocuments(documents, search, sort)
|
|
17354
|
+
} : chunkFWIBFGUQ_cjs.buildExplorerEntries(documents, currentPath, sort, [...pendingFolders]);
|
|
17335
17355
|
if (sortReversed) result.files = [...result.files].reverse();
|
|
17336
17356
|
return result;
|
|
17337
17357
|
}, [documents, currentPath, sort, isSearching, search, sortReversed, pendingFolders]);
|
|
@@ -17342,7 +17362,7 @@ var ConnectedFilesExplorer = react.forwardRef(function ConnectedFilesExplorer2({
|
|
|
17342
17362
|
const orderedFileIds = react.useMemo(() => files.map((d) => d.external_id), [files]);
|
|
17343
17363
|
const folderDocs = react.useMemo(() => {
|
|
17344
17364
|
const map = /* @__PURE__ */ new Map();
|
|
17345
|
-
for (const f of folders) map.set(f.path.join("/"),
|
|
17365
|
+
for (const f of folders) map.set(f.path.join("/"), chunkFWIBFGUQ_cjs.collectFolderDocs(documents, f.path));
|
|
17346
17366
|
return map;
|
|
17347
17367
|
}, [folders, documents]);
|
|
17348
17368
|
const folderSelection = react.useMemo(() => {
|
|
@@ -17490,7 +17510,7 @@ var ConnectedFilesExplorer = react.forwardRef(function ConnectedFilesExplorer2({
|
|
|
17490
17510
|
let name = base;
|
|
17491
17511
|
let i = 2;
|
|
17492
17512
|
while (siblings.has(name.toLowerCase())) name = `${base} ${i++}`;
|
|
17493
|
-
const path =
|
|
17513
|
+
const path = chunkFWIBFGUQ_cjs.joinFolderPath([...currentPath, name]);
|
|
17494
17514
|
if (!path) return;
|
|
17495
17515
|
addPendingFolder(wsId, path);
|
|
17496
17516
|
setEditingFolderPath(path);
|
|
@@ -17526,10 +17546,10 @@ var ConnectedFilesExplorer = react.forwardRef(function ConnectedFilesExplorer2({
|
|
|
17526
17546
|
notify14(`A folder named "${name}" already exists here.`, "error");
|
|
17527
17547
|
return;
|
|
17528
17548
|
}
|
|
17529
|
-
const oldPath =
|
|
17549
|
+
const oldPath = chunkFWIBFGUQ_cjs.joinFolderPath(folder.path);
|
|
17530
17550
|
const newPrefix = [...folder.path.slice(0, -1), name];
|
|
17531
|
-
const newPath =
|
|
17532
|
-
const docs =
|
|
17551
|
+
const newPath = chunkFWIBFGUQ_cjs.joinFolderPath(newPrefix);
|
|
17552
|
+
const docs = chunkFWIBFGUQ_cjs.collectFolderDocs(documents, folder.path);
|
|
17533
17553
|
try {
|
|
17534
17554
|
if (await renameFolder(docs, folder.path, newPrefix) > 0) {
|
|
17535
17555
|
notify14(`Renamed folder to "${name}"`, "success");
|
|
@@ -17588,7 +17608,7 @@ var ConnectedFilesExplorer = react.forwardRef(function ConnectedFilesExplorer2({
|
|
|
17588
17608
|
const handleToggleFolder = react.useCallback(
|
|
17589
17609
|
(folder, e) => {
|
|
17590
17610
|
e.stopPropagation();
|
|
17591
|
-
const ids =
|
|
17611
|
+
const ids = chunkFWIBFGUQ_cjs.collectFolderDocs(documents, folder.path).map((d) => d.external_id);
|
|
17592
17612
|
if (ids.length === 0) return;
|
|
17593
17613
|
if (ids.every((id) => selectedSet.has(id))) {
|
|
17594
17614
|
const remove = new Set(ids);
|
|
@@ -17649,9 +17669,9 @@ var ConnectedFilesExplorer = react.forwardRef(function ConnectedFilesExplorer2({
|
|
|
17649
17669
|
);
|
|
17650
17670
|
const handleDelete = react.useCallback(
|
|
17651
17671
|
async (doc) => {
|
|
17652
|
-
const name =
|
|
17672
|
+
const name = chunkFWIBFGUQ_cjs.getExplorerDisplayName(doc);
|
|
17653
17673
|
const confirmed = await confirm({
|
|
17654
|
-
message: `Delete "${name}"? ${
|
|
17674
|
+
message: `Delete "${name}"? ${chunkFWIBFGUQ_cjs.RECENTLY_DELETED_HINT}`,
|
|
17655
17675
|
title: "Delete file"
|
|
17656
17676
|
});
|
|
17657
17677
|
if (!confirmed) return;
|
|
@@ -17671,7 +17691,7 @@ var ConnectedFilesExplorer = react.forwardRef(function ConnectedFilesExplorer2({
|
|
|
17671
17691
|
);
|
|
17672
17692
|
const handleFolderDownload = react.useCallback(
|
|
17673
17693
|
(folder) => {
|
|
17674
|
-
const docs =
|
|
17694
|
+
const docs = chunkFWIBFGUQ_cjs.collectFolderDocs(documents, folder.path);
|
|
17675
17695
|
if (docs.length > 0) void downloadDocuments(docs);
|
|
17676
17696
|
},
|
|
17677
17697
|
[documents, downloadDocuments]
|
|
@@ -17680,7 +17700,7 @@ var ConnectedFilesExplorer = react.forwardRef(function ConnectedFilesExplorer2({
|
|
|
17680
17700
|
if (onFolderMove) return onFolderMove;
|
|
17681
17701
|
if (!onMoveSelected) return void 0;
|
|
17682
17702
|
return (folder) => {
|
|
17683
|
-
const ids =
|
|
17703
|
+
const ids = chunkFWIBFGUQ_cjs.collectFolderDocs(documents, folder.path).map((d) => d.external_id);
|
|
17684
17704
|
if (ids.length === 0) return;
|
|
17685
17705
|
onSelectionChange(ids);
|
|
17686
17706
|
onMoveSelected();
|
|
@@ -17688,14 +17708,14 @@ var ConnectedFilesExplorer = react.forwardRef(function ConnectedFilesExplorer2({
|
|
|
17688
17708
|
}, [documents, onFolderMove, onMoveSelected, onSelectionChange]);
|
|
17689
17709
|
const handleFolderDelete = react.useCallback(
|
|
17690
17710
|
async (folder) => {
|
|
17691
|
-
const docs =
|
|
17711
|
+
const docs = chunkFWIBFGUQ_cjs.collectFolderDocs(documents, folder.path);
|
|
17692
17712
|
if (docs.length === 0) {
|
|
17693
|
-
const path =
|
|
17713
|
+
const path = chunkFWIBFGUQ_cjs.joinFolderPath(folder.path);
|
|
17694
17714
|
if (wsId && path) removePendingFolder(wsId, path);
|
|
17695
17715
|
return;
|
|
17696
17716
|
}
|
|
17697
17717
|
const confirmed = await confirm({
|
|
17698
|
-
message: `Delete folder "${folder.name}" and its ${docs.length} item${docs.length === 1 ? "" : "s"}? ${
|
|
17718
|
+
message: `Delete folder "${folder.name}" and its ${docs.length} item${docs.length === 1 ? "" : "s"}? ${chunkFWIBFGUQ_cjs.RECENTLY_DELETED_HINT_PLURAL}`,
|
|
17699
17719
|
title: "Delete folder"
|
|
17700
17720
|
});
|
|
17701
17721
|
if (!confirmed) return;
|
|
@@ -17712,8 +17732,8 @@ var ConnectedFilesExplorer = react.forwardRef(function ConnectedFilesExplorer2({
|
|
|
17712
17732
|
[confirm, documents, deleteDocuments, onSelectionChange, removePendingFolder, wsId, notify14]
|
|
17713
17733
|
);
|
|
17714
17734
|
const canDeleteFolder = react.useCallback(
|
|
17715
|
-
(folder) => canUpload &&
|
|
17716
|
-
(doc) =>
|
|
17735
|
+
(folder) => canUpload && chunkFWIBFGUQ_cjs.collectFolderDocs(documents, folder.path).every(
|
|
17736
|
+
(doc) => chunkFWIBFGUQ_cjs.canDeleteDocument(doc, userId, role)
|
|
17717
17737
|
),
|
|
17718
17738
|
[canUpload, documents, userId, role]
|
|
17719
17739
|
);
|
|
@@ -17772,7 +17792,7 @@ var ConnectedFilesExplorer = react.forwardRef(function ConnectedFilesExplorer2({
|
|
|
17772
17792
|
setActiveDragId(null);
|
|
17773
17793
|
const data = event.over?.data.current;
|
|
17774
17794
|
if (data?.type === "folder" && data.path) {
|
|
17775
|
-
const targetFolder =
|
|
17795
|
+
const targetFolder = chunkFWIBFGUQ_cjs.joinFolderPath(data.path);
|
|
17776
17796
|
const moving = dragIdsRef.current.filter((id) => {
|
|
17777
17797
|
const doc = documents.find((d) => d.external_id === id);
|
|
17778
17798
|
return doc && (doc.folder ?? null) !== targetFolder;
|
|
@@ -17812,7 +17832,7 @@ var ConnectedFilesExplorer = react.forwardRef(function ConnectedFilesExplorer2({
|
|
|
17812
17832
|
const dropped = Array.from(e.dataTransfer.files ?? []);
|
|
17813
17833
|
if (dropped.length > 0) {
|
|
17814
17834
|
e.preventDefault();
|
|
17815
|
-
onUploadFiles(dropped,
|
|
17835
|
+
onUploadFiles(dropped, chunkFWIBFGUQ_cjs.joinFolderPath(currentPath));
|
|
17816
17836
|
}
|
|
17817
17837
|
},
|
|
17818
17838
|
[canUpload, currentPath, onUploadFiles]
|
|
@@ -17829,9 +17849,9 @@ var ConnectedFilesExplorer = react.forwardRef(function ConnectedFilesExplorer2({
|
|
|
17829
17849
|
onDragEnd: handleDragEnd,
|
|
17830
17850
|
onDragCancel: () => setActiveDragId(null),
|
|
17831
17851
|
children: [
|
|
17832
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17852
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkFWIBFGUQ_cjs.ExplorerFrame, { "data-testid": "documents-explorer", children: /* @__PURE__ */ jsxRuntime.jsxs(chunkFWIBFGUQ_cjs.ExplorerStage, { children: [
|
|
17833
17853
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17834
|
-
|
|
17854
|
+
chunkFWIBFGUQ_cjs.ExplorerScroller,
|
|
17835
17855
|
{
|
|
17836
17856
|
ref: scrollRef,
|
|
17837
17857
|
onClick: handleBackgroundClick,
|
|
@@ -17841,15 +17861,15 @@ var ConnectedFilesExplorer = react.forwardRef(function ConnectedFilesExplorer2({
|
|
|
17841
17861
|
onDragLeave: handleNativeDragLeave,
|
|
17842
17862
|
onDrop: handleNativeDrop,
|
|
17843
17863
|
"data-testid": "explorer-scroll",
|
|
17844
|
-
children: isLoading && documents.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
17845
|
-
|
|
17864
|
+
children: isLoading && documents.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkFWIBFGUQ_cjs.ExplorerLoadingTiles, {}) : entries.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
17865
|
+
chunkFWIBFGUQ_cjs.ExplorerEmpty,
|
|
17846
17866
|
{
|
|
17847
17867
|
title: isSearching ? `No files match "${search.trim()}"` : "This folder is empty",
|
|
17848
17868
|
description: isSearching ? "Try a different search." : canUpload ? "Drop files here or use Upload to add documents." : "No documents here yet."
|
|
17849
17869
|
}
|
|
17850
17870
|
) : containerWidth === 0 ? (
|
|
17851
17871
|
// Not measured yet: rendering now would flash one stretched column.
|
|
17852
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17872
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkFWIBFGUQ_cjs.ExplorerLoadingTiles, {})
|
|
17853
17873
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
17854
17874
|
"div",
|
|
17855
17875
|
{
|
|
@@ -17909,7 +17929,7 @@ var ConnectedFilesExplorer = react.forwardRef(function ConnectedFilesExplorer2({
|
|
|
17909
17929
|
dragging: activeDragId === doc.external_id,
|
|
17910
17930
|
dndActive: activeDragId !== null,
|
|
17911
17931
|
renaming: renamingId === doc.external_id,
|
|
17912
|
-
canDelete:
|
|
17932
|
+
canDelete: chunkFWIBFGUQ_cjs.canDeleteDocument(doc, userId, role),
|
|
17913
17933
|
thumbnailUrl: thumbnailsById.get(doc.external_id),
|
|
17914
17934
|
modifiedBy: userById.get(
|
|
17915
17935
|
doc.updated_by_ext_id ?? doc.created_by_ext_id
|
|
@@ -17937,9 +17957,9 @@ var ConnectedFilesExplorer = react.forwardRef(function ConnectedFilesExplorer2({
|
|
|
17937
17957
|
)
|
|
17938
17958
|
}
|
|
17939
17959
|
),
|
|
17940
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17960
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkFWIBFGUQ_cjs.ExplorerMarquee, { ref: marqueeOverlayRef, "data-testid": "explorer-marquee" }),
|
|
17941
17961
|
isFileDragOver && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17942
|
-
|
|
17962
|
+
chunkFWIBFGUQ_cjs.ExplorerDropOverlay,
|
|
17943
17963
|
{
|
|
17944
17964
|
label: `Drop to upload${currentPath.length > 0 ? ` to "${currentPath[currentPath.length - 1]}"` : ""}`
|
|
17945
17965
|
}
|
|
@@ -17953,7 +17973,7 @@ var ConnectedFilesExplorer = react.forwardRef(function ConnectedFilesExplorer2({
|
|
|
17953
17973
|
function DragPreview({ doc, count }) {
|
|
17954
17974
|
const Icon = ui.getFileTypeIcon(doc.file_name, { mime: doc.file_type });
|
|
17955
17975
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17956
|
-
|
|
17976
|
+
chunkFWIBFGUQ_cjs.ExplorerDragPreview,
|
|
17957
17977
|
{
|
|
17958
17978
|
icon: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: 20 }),
|
|
17959
17979
|
title: ui.getDocumentTitle(doc, doc.file_name ?? "Untitled"),
|
|
@@ -17961,6 +17981,561 @@ function DragPreview({ doc, count }) {
|
|
|
17961
17981
|
}
|
|
17962
17982
|
);
|
|
17963
17983
|
}
|
|
17984
|
+
function ConnectedUploadDropzone({
|
|
17985
|
+
onFilesSelected,
|
|
17986
|
+
onFilesRejected,
|
|
17987
|
+
onUrlsSubmit,
|
|
17988
|
+
disabled = false,
|
|
17989
|
+
className = "",
|
|
17990
|
+
maxFileSize = react$1.UPLOAD_MAX_FILE_SIZE,
|
|
17991
|
+
title = "Drag & Drop Files, Folders, or Zip Archives Here",
|
|
17992
|
+
subtitle = "or click to browse files (zip files will be extracted)",
|
|
17993
|
+
compact = false,
|
|
17994
|
+
onOpenUpload,
|
|
17995
|
+
workspaceName = "this workspace",
|
|
17996
|
+
source = null,
|
|
17997
|
+
onPickSource,
|
|
17998
|
+
accounts,
|
|
17999
|
+
compactLeadingAction
|
|
18000
|
+
}) {
|
|
18001
|
+
const { extractZip } = react$1.useDocumentsSupport();
|
|
18002
|
+
const [dragActive, setDragActive] = react.useState(false);
|
|
18003
|
+
const [processingMessage, setProcessingMessage] = react.useState(null);
|
|
18004
|
+
const fileInputRef = react.useRef(null);
|
|
18005
|
+
const folderInputRef = react.useRef(null);
|
|
18006
|
+
const take = react.useCallback(
|
|
18007
|
+
async (chosen) => {
|
|
18008
|
+
if (disabled || chosen.length === 0) return;
|
|
18009
|
+
setProcessingMessage(
|
|
18010
|
+
chosen.some(react$1.isZipFile) ? "Extracting zip contents..." : "Processing files..."
|
|
18011
|
+
);
|
|
18012
|
+
try {
|
|
18013
|
+
const { accepted, refused } = await react$1.prepareUploadFiles(chosen, { maxFileSize, extractZip });
|
|
18014
|
+
if (refused.length > 0) onFilesRejected?.(refused);
|
|
18015
|
+
if (accepted.length > 0) onFilesSelected(accepted);
|
|
18016
|
+
} finally {
|
|
18017
|
+
setProcessingMessage(null);
|
|
18018
|
+
}
|
|
18019
|
+
},
|
|
18020
|
+
[disabled, maxFileSize, extractZip, onFilesRejected, onFilesSelected]
|
|
18021
|
+
);
|
|
18022
|
+
const handleDrag = react.useCallback(
|
|
18023
|
+
(e) => {
|
|
18024
|
+
e.preventDefault();
|
|
18025
|
+
e.stopPropagation();
|
|
18026
|
+
if (disabled) return;
|
|
18027
|
+
if (e.type === "dragenter" || e.type === "dragover") setDragActive(true);
|
|
18028
|
+
else if (e.type === "dragleave") setDragActive(false);
|
|
18029
|
+
},
|
|
18030
|
+
[disabled]
|
|
18031
|
+
);
|
|
18032
|
+
const handleDrop = react.useCallback(
|
|
18033
|
+
async (e) => {
|
|
18034
|
+
e.preventDefault();
|
|
18035
|
+
e.stopPropagation();
|
|
18036
|
+
setDragActive(false);
|
|
18037
|
+
if (disabled) return;
|
|
18038
|
+
await take(await react$1.filesFromDrop(e.dataTransfer));
|
|
18039
|
+
},
|
|
18040
|
+
[disabled, take]
|
|
18041
|
+
);
|
|
18042
|
+
const handleFileSelect = react.useCallback(
|
|
18043
|
+
async (e) => {
|
|
18044
|
+
const chosen = Array.from(e.target.files ?? []);
|
|
18045
|
+
e.target.value = "";
|
|
18046
|
+
await take(chosen);
|
|
18047
|
+
},
|
|
18048
|
+
[take]
|
|
18049
|
+
);
|
|
18050
|
+
const browse = react.useCallback(
|
|
18051
|
+
(input) => (e) => {
|
|
18052
|
+
if (disabled) return;
|
|
18053
|
+
e?.stopPropagation();
|
|
18054
|
+
if (onOpenUpload) onOpenUpload();
|
|
18055
|
+
else input.current?.click();
|
|
18056
|
+
},
|
|
18057
|
+
[disabled, onOpenUpload]
|
|
18058
|
+
);
|
|
18059
|
+
const onFiles = browse(fileInputRef);
|
|
18060
|
+
const onFolder = browse(folderInputRef);
|
|
18061
|
+
const dropTarget = /* @__PURE__ */ jsxRuntime.jsx(
|
|
18062
|
+
chunkFWIBFGUQ_cjs.UploadDropArea,
|
|
18063
|
+
{
|
|
18064
|
+
isActive: dragActive,
|
|
18065
|
+
isDisabled: disabled,
|
|
18066
|
+
isProcessing: processingMessage !== null,
|
|
18067
|
+
processingMessage: processingMessage ?? "Processing files...",
|
|
18068
|
+
isCompact: compact,
|
|
18069
|
+
title,
|
|
18070
|
+
subtitle,
|
|
18071
|
+
onDrag: handleDrag,
|
|
18072
|
+
onDrop: handleDrop,
|
|
18073
|
+
onClick: (e) => {
|
|
18074
|
+
if (e.target === e.currentTarget) onFiles();
|
|
18075
|
+
},
|
|
18076
|
+
actions: compact ? /* @__PURE__ */ jsxRuntime.jsx(chunkFWIBFGUQ_cjs.UploadBrowseButtons, { onFiles, onFolder, isDisabled: disabled }) : void 0
|
|
18077
|
+
}
|
|
18078
|
+
);
|
|
18079
|
+
const urlDialog = (trigger) => onUrlsSubmit ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
18080
|
+
chunkFWIBFGUQ_cjs.UrlInputDialog,
|
|
18081
|
+
{
|
|
18082
|
+
onUrlsSubmit,
|
|
18083
|
+
processing: disabled,
|
|
18084
|
+
titleWorkspaceName: workspaceName,
|
|
18085
|
+
trigger
|
|
18086
|
+
}
|
|
18087
|
+
) : null;
|
|
18088
|
+
const body = (() => {
|
|
18089
|
+
if (compact) {
|
|
18090
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
18091
|
+
dropTarget,
|
|
18092
|
+
compactLeadingAction,
|
|
18093
|
+
onUrlsSubmit && /* @__PURE__ */ jsxRuntime.jsx(chunkFWIBFGUQ_cjs.UploadSourceSection, { isIsolated: true, className: "flex flex-wrap justify-center gap-2", children: urlDialog(/* @__PURE__ */ jsxRuntime.jsx(chunkFWIBFGUQ_cjs.UploadUrlButton, { isDisabled: disabled, isCompact: true })) })
|
|
18094
|
+
] });
|
|
18095
|
+
}
|
|
18096
|
+
if (!source) {
|
|
18097
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18098
|
+
chunkFWIBFGUQ_cjs.UploadSourcePicker,
|
|
18099
|
+
{
|
|
18100
|
+
isDisabled: disabled,
|
|
18101
|
+
options: [
|
|
18102
|
+
{
|
|
18103
|
+
key: "computer",
|
|
18104
|
+
label: "From your computer",
|
|
18105
|
+
description: "Upload files or folders",
|
|
18106
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.HardDrive, {}),
|
|
18107
|
+
onClick: () => onPickSource?.("computer")
|
|
18108
|
+
},
|
|
18109
|
+
...accounts ? [
|
|
18110
|
+
{
|
|
18111
|
+
key: "email",
|
|
18112
|
+
label: "From accounts",
|
|
18113
|
+
description: "Sync email and files from your connected accounts",
|
|
18114
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Mail, {}),
|
|
18115
|
+
onClick: () => onPickSource?.("email")
|
|
18116
|
+
}
|
|
18117
|
+
] : [],
|
|
18118
|
+
// The internet opens its dialog directly, not a scoped view of its own.
|
|
18119
|
+
...onUrlsSubmit ? [
|
|
18120
|
+
{
|
|
18121
|
+
key: "internet",
|
|
18122
|
+
label: "From URL",
|
|
18123
|
+
description: "Import from a URL or link",
|
|
18124
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Globe, {}),
|
|
18125
|
+
wrap: (button) => urlDialog(button)
|
|
18126
|
+
}
|
|
18127
|
+
] : []
|
|
18128
|
+
]
|
|
18129
|
+
}
|
|
18130
|
+
);
|
|
18131
|
+
}
|
|
18132
|
+
if (source === "computer") {
|
|
18133
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18134
|
+
chunkFWIBFGUQ_cjs.UploadSourceSection,
|
|
18135
|
+
{
|
|
18136
|
+
testId: "upload-source-computer",
|
|
18137
|
+
className: "flex w-full flex-col gap-3 pointer-coarse:flex-col-reverse",
|
|
18138
|
+
children: [
|
|
18139
|
+
dropTarget,
|
|
18140
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18141
|
+
chunkFWIBFGUQ_cjs.UploadBrowseButtons,
|
|
18142
|
+
{
|
|
18143
|
+
layout: "grid",
|
|
18144
|
+
onFiles,
|
|
18145
|
+
onFolder,
|
|
18146
|
+
isDisabled: disabled
|
|
18147
|
+
}
|
|
18148
|
+
)
|
|
18149
|
+
]
|
|
18150
|
+
}
|
|
18151
|
+
);
|
|
18152
|
+
}
|
|
18153
|
+
if (source === "internet" && onUrlsSubmit) {
|
|
18154
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkFWIBFGUQ_cjs.UploadSourceSection, { testId: "upload-source-internet", className: "flex flex-wrap gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(chunkFWIBFGUQ_cjs.UploadSourceSection, { isIsolated: true, children: urlDialog(/* @__PURE__ */ jsxRuntime.jsx(chunkFWIBFGUQ_cjs.UploadUrlButton, { isDisabled: disabled })) }) });
|
|
18155
|
+
}
|
|
18156
|
+
if (source === "email" && accounts) {
|
|
18157
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkFWIBFGUQ_cjs.UploadSourceSection, { testId: "upload-source-email", isIsolated: true, children: accounts });
|
|
18158
|
+
}
|
|
18159
|
+
return null;
|
|
18160
|
+
})();
|
|
18161
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18162
|
+
chunkFWIBFGUQ_cjs.UploadFrame,
|
|
18163
|
+
{
|
|
18164
|
+
isCompact: compact,
|
|
18165
|
+
isDimmed: disabled || processingMessage !== null,
|
|
18166
|
+
className,
|
|
18167
|
+
children: [
|
|
18168
|
+
!onOpenUpload && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
18169
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18170
|
+
"input",
|
|
18171
|
+
{
|
|
18172
|
+
ref: fileInputRef,
|
|
18173
|
+
type: "file",
|
|
18174
|
+
multiple: true,
|
|
18175
|
+
accept: react$1.UPLOAD_ACCEPT,
|
|
18176
|
+
onChange: handleFileSelect,
|
|
18177
|
+
className: "hidden",
|
|
18178
|
+
disabled
|
|
18179
|
+
}
|
|
18180
|
+
),
|
|
18181
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18182
|
+
"input",
|
|
18183
|
+
{
|
|
18184
|
+
ref: folderInputRef,
|
|
18185
|
+
type: "file",
|
|
18186
|
+
multiple: true,
|
|
18187
|
+
...{ webkitdirectory: "", directory: "" },
|
|
18188
|
+
onChange: handleFileSelect,
|
|
18189
|
+
className: "hidden",
|
|
18190
|
+
disabled
|
|
18191
|
+
}
|
|
18192
|
+
)
|
|
18193
|
+
] }),
|
|
18194
|
+
body
|
|
18195
|
+
]
|
|
18196
|
+
}
|
|
18197
|
+
);
|
|
18198
|
+
}
|
|
18199
|
+
var plural = (count, one, many = `${one}s`) => count === 1 ? one : many;
|
|
18200
|
+
function useAddFromUrls({
|
|
18201
|
+
shared = true,
|
|
18202
|
+
configExtId,
|
|
18203
|
+
onZipFiles
|
|
18204
|
+
} = {}) {
|
|
18205
|
+
const { notify: notify14 } = chunkCNHUJRQ4_cjs.useBlocksEnvironment();
|
|
18206
|
+
const { workspaceId } = chunkFM3IRQJW_cjs.useConnectedWorkspace();
|
|
18207
|
+
const uploadFromUrls = react$1.useUploadFromUrls();
|
|
18208
|
+
return react.useCallback(
|
|
18209
|
+
async (urls) => {
|
|
18210
|
+
if (urls.length === 0 || !workspaceId) return false;
|
|
18211
|
+
let result;
|
|
18212
|
+
try {
|
|
18213
|
+
result = await uploadFromUrls({ urls, shared, configExtId });
|
|
18214
|
+
} catch {
|
|
18215
|
+
return false;
|
|
18216
|
+
}
|
|
18217
|
+
const { docIds, skipped, zipFiles, oversizedInZips, failedZipUrls } = result;
|
|
18218
|
+
if (zipFiles.length > 0) {
|
|
18219
|
+
onZipFiles?.(zipFiles);
|
|
18220
|
+
notify14(
|
|
18221
|
+
`Extracted ${zipFiles.length} ${plural(zipFiles.length, "file")} from ZIP. Click Add files to send.`,
|
|
18222
|
+
"success"
|
|
18223
|
+
);
|
|
18224
|
+
}
|
|
18225
|
+
if (oversizedInZips.length > 0)
|
|
18226
|
+
notify14(
|
|
18227
|
+
`Skipped ${oversizedInZips.length} oversized ${plural(oversizedInZips.length, "file")} inside ZIP archives.`,
|
|
18228
|
+
"warning"
|
|
18229
|
+
);
|
|
18230
|
+
if (failedZipUrls.length > 0)
|
|
18231
|
+
notify14(
|
|
18232
|
+
`Failed to fetch ${failedZipUrls.length} ZIP ${plural(failedZipUrls.length, "URL")}. Browser CORS may block third-party hosts \u2014 try a CORS-enabled URL.`,
|
|
18233
|
+
"error"
|
|
18234
|
+
);
|
|
18235
|
+
if (skipped.length > 0)
|
|
18236
|
+
notify14(
|
|
18237
|
+
`${skipped.length} ${plural(skipped.length, "URL was", "URLs were")} skipped:
|
|
18238
|
+
${skipped.map((s) => `${s.file_name}: ${s.reason}`).join("\n")}`,
|
|
18239
|
+
"warning"
|
|
18240
|
+
);
|
|
18241
|
+
if (docIds.length > 0)
|
|
18242
|
+
notify14(
|
|
18243
|
+
`Upload complete (${docIds.length} ${plural(docIds.length, "document")}). Indexing in the background...`,
|
|
18244
|
+
"success",
|
|
18245
|
+
{ workspaceId }
|
|
18246
|
+
);
|
|
18247
|
+
return true;
|
|
18248
|
+
},
|
|
18249
|
+
[workspaceId, uploadFromUrls, shared, configExtId, onZipFiles, notify14]
|
|
18250
|
+
);
|
|
18251
|
+
}
|
|
18252
|
+
function formatFileSize(bytes) {
|
|
18253
|
+
if (bytes === 0) return "0 Bytes";
|
|
18254
|
+
const k = 1024;
|
|
18255
|
+
const sizes = ["Bytes", "KB", "MB", "GB"];
|
|
18256
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
18257
|
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
|
|
18258
|
+
}
|
|
18259
|
+
function renderFileIcon(fileName) {
|
|
18260
|
+
const Icon = ui.getFileTypeIcon(fileName);
|
|
18261
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: 20 });
|
|
18262
|
+
}
|
|
18263
|
+
function plural2(count) {
|
|
18264
|
+
return ui.getEntityLabel("DOCUMENT", count === 1 ? "SINGULAR" : "PLURAL");
|
|
18265
|
+
}
|
|
18266
|
+
function DefaultFooter({ submit, shared, onSharedChange }) {
|
|
18267
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center justify-end gap-4 border-t border-border px-4 py-3 sm:px-6", children: [
|
|
18268
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18269
|
+
chunkFWIBFGUQ_cjs.ShareToggle,
|
|
18270
|
+
{
|
|
18271
|
+
isVisible: shared,
|
|
18272
|
+
onToggle: onSharedChange,
|
|
18273
|
+
workspaceEntityLabel: ui.getEntityLabel("WORKSPACE"),
|
|
18274
|
+
compact: true
|
|
18275
|
+
}
|
|
18276
|
+
),
|
|
18277
|
+
submit
|
|
18278
|
+
] });
|
|
18279
|
+
}
|
|
18280
|
+
function ConnectedUpload({
|
|
18281
|
+
initialFiles,
|
|
18282
|
+
initialUrls,
|
|
18283
|
+
folder = null,
|
|
18284
|
+
source = null,
|
|
18285
|
+
onPickSource,
|
|
18286
|
+
configExtId,
|
|
18287
|
+
closeOnUpload = true,
|
|
18288
|
+
onClose,
|
|
18289
|
+
onUploadComplete,
|
|
18290
|
+
accounts,
|
|
18291
|
+
renderFooter = DefaultFooter
|
|
18292
|
+
}) {
|
|
18293
|
+
const { notify: notify14 } = chunkCNHUJRQ4_cjs.useBlocksEnvironment();
|
|
18294
|
+
const { openUpgrade } = useFilesSupport();
|
|
18295
|
+
const { workspaceId, live } = chunkFM3IRQJW_cjs.useConnectedWorkspace();
|
|
18296
|
+
const { data: workspaces } = react$1.useWorkspaces({ enabled: live });
|
|
18297
|
+
const workspaceName = workspaces?.find((w) => w.external_id === workspaceId)?.name ?? "this workspace";
|
|
18298
|
+
const uploadFiles = react$1.useUploadFiles();
|
|
18299
|
+
const [files, setFiles] = react.useState(initialFiles ?? []);
|
|
18300
|
+
const [refused, setRefused] = react.useState([]);
|
|
18301
|
+
const [error, setError] = react.useState(null);
|
|
18302
|
+
const [shared, setShared] = react.useState(true);
|
|
18303
|
+
const [uploading, setUploading] = react.useState(null);
|
|
18304
|
+
const [progress, setProgress] = react.useState(null);
|
|
18305
|
+
const { data: tags = [] } = react$1.useTags();
|
|
18306
|
+
const generateTagIds = react.useMemo(
|
|
18307
|
+
() => browser.filterDocumentTags(tags).filter((tag) => tag.instruction && tag.shared).map((tag) => tag.external_id),
|
|
18308
|
+
[tags]
|
|
18309
|
+
);
|
|
18310
|
+
const addFiles = react.useCallback(
|
|
18311
|
+
(chosen) => setFiles((current) => {
|
|
18312
|
+
if (current.length === 0) return chosen;
|
|
18313
|
+
const names = new Set(current.map((file) => file.name));
|
|
18314
|
+
const fresh = chosen.filter((file) => !names.has(file.name));
|
|
18315
|
+
const duplicates = chosen.length - fresh.length;
|
|
18316
|
+
if (duplicates > 0)
|
|
18317
|
+
notify14(`Skipped ${duplicates} duplicate file${duplicates > 1 ? "s" : ""}`, "info");
|
|
18318
|
+
return [...current, ...fresh];
|
|
18319
|
+
}),
|
|
18320
|
+
[notify14]
|
|
18321
|
+
);
|
|
18322
|
+
const fail = react.useCallback(
|
|
18323
|
+
(message, toast = true) => {
|
|
18324
|
+
setError(message);
|
|
18325
|
+
if (toast) notify14(message, "error");
|
|
18326
|
+
setUploading(null);
|
|
18327
|
+
setProgress(null);
|
|
18328
|
+
},
|
|
18329
|
+
[notify14]
|
|
18330
|
+
);
|
|
18331
|
+
const handleUpload = react.useCallback(async () => {
|
|
18332
|
+
if (files.length === 0 || !workspaceId) return;
|
|
18333
|
+
setUploading(files.length);
|
|
18334
|
+
setError(null);
|
|
18335
|
+
try {
|
|
18336
|
+
const { docIds, skipped } = await uploadFiles(
|
|
18337
|
+
{ files, folder, shared, configExtId, generateTagIds },
|
|
18338
|
+
setProgress
|
|
18339
|
+
);
|
|
18340
|
+
if (skipped.length > 0) {
|
|
18341
|
+
const summary = skipped.map((s) => `${s.file_name}: ${s.reason}`).join("\n");
|
|
18342
|
+
const quota = skipped.some((s) => /quota|limit/i.test(s.reason ?? ""));
|
|
18343
|
+
notify14(
|
|
18344
|
+
`${skipped.length} ${skipped.length === 1 ? "file was" : "files were"} skipped:
|
|
18345
|
+
${summary}`,
|
|
18346
|
+
"warning",
|
|
18347
|
+
quota && openUpgrade ? { action: { label: "Upgrade", onClick: openUpgrade }, duration: 8e3 } : void 0
|
|
18348
|
+
);
|
|
18349
|
+
}
|
|
18350
|
+
setFiles([]);
|
|
18351
|
+
if (docIds.length > 0) {
|
|
18352
|
+
const ai = generateTagIds.length > 0 ? " AI annotations queued." : "";
|
|
18353
|
+
notify14(
|
|
18354
|
+
`Uploaded ${docIds.length} ${docIds.length === 1 ? "file" : "files"}. Processing in background...${ai}`,
|
|
18355
|
+
"success",
|
|
18356
|
+
{ workspaceId }
|
|
18357
|
+
);
|
|
18358
|
+
}
|
|
18359
|
+
setUploading(null);
|
|
18360
|
+
setProgress(null);
|
|
18361
|
+
onUploadComplete?.();
|
|
18362
|
+
if (closeOnUpload) onClose?.();
|
|
18363
|
+
} catch (err) {
|
|
18364
|
+
const status = err.status;
|
|
18365
|
+
if (status === 402) {
|
|
18366
|
+
fail(err.detail || "Quota exceeded", false);
|
|
18367
|
+
} else {
|
|
18368
|
+
fail("Failed to upload documents. Please try again.");
|
|
18369
|
+
}
|
|
18370
|
+
}
|
|
18371
|
+
}, [
|
|
18372
|
+
files,
|
|
18373
|
+
workspaceId,
|
|
18374
|
+
uploadFiles,
|
|
18375
|
+
folder,
|
|
18376
|
+
shared,
|
|
18377
|
+
configExtId,
|
|
18378
|
+
generateTagIds,
|
|
18379
|
+
notify14,
|
|
18380
|
+
openUpgrade,
|
|
18381
|
+
onUploadComplete,
|
|
18382
|
+
closeOnUpload,
|
|
18383
|
+
onClose,
|
|
18384
|
+
fail
|
|
18385
|
+
]);
|
|
18386
|
+
const zipFilesAdded = react.useRef(false);
|
|
18387
|
+
const addFromUrls = useAddFromUrls({
|
|
18388
|
+
shared,
|
|
18389
|
+
configExtId,
|
|
18390
|
+
onZipFiles: (zipFiles) => {
|
|
18391
|
+
zipFilesAdded.current = true;
|
|
18392
|
+
addFiles(zipFiles);
|
|
18393
|
+
}
|
|
18394
|
+
});
|
|
18395
|
+
const handleUrls = react.useCallback(
|
|
18396
|
+
async (urls) => {
|
|
18397
|
+
if (urls.length === 0) return false;
|
|
18398
|
+
setUploading(urls.length);
|
|
18399
|
+
setError(null);
|
|
18400
|
+
zipFilesAdded.current = false;
|
|
18401
|
+
const ok = await addFromUrls(urls);
|
|
18402
|
+
setUploading(null);
|
|
18403
|
+
if (ok) {
|
|
18404
|
+
if (closeOnUpload && !zipFilesAdded.current) onClose?.();
|
|
18405
|
+
onUploadComplete?.();
|
|
18406
|
+
}
|
|
18407
|
+
return ok;
|
|
18408
|
+
},
|
|
18409
|
+
[addFromUrls, closeOnUpload, onClose, onUploadComplete]
|
|
18410
|
+
);
|
|
18411
|
+
const handedUrls = react.useRef(false);
|
|
18412
|
+
react.useEffect(() => {
|
|
18413
|
+
if (handedUrls.current || !initialUrls?.length) return;
|
|
18414
|
+
handedUrls.current = true;
|
|
18415
|
+
void handleUrls(initialUrls);
|
|
18416
|
+
}, [initialUrls, handleUrls]);
|
|
18417
|
+
const count = files.length || uploading || 0;
|
|
18418
|
+
const submit = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18419
|
+
ui.Button,
|
|
18420
|
+
{
|
|
18421
|
+
onClick: handleUpload,
|
|
18422
|
+
disabled: files.length === 0,
|
|
18423
|
+
size: "default",
|
|
18424
|
+
"data-testid": "upload-submit-button",
|
|
18425
|
+
children: [
|
|
18426
|
+
"Add ",
|
|
18427
|
+
files.length,
|
|
18428
|
+
" ",
|
|
18429
|
+
plural2(files.length)
|
|
18430
|
+
]
|
|
18431
|
+
}
|
|
18432
|
+
);
|
|
18433
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-0 flex-1 flex-col", "data-testid": "upload-documents", children: [
|
|
18434
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 flex-1 overflow-y-auto pb-2", children: uploading === null ? /* @__PURE__ */ jsxRuntime.jsxs(chunkFWIBFGUQ_cjs.UploadContainer, { className: "w-full px-4 pb-4 pt-2 sm:px-6", children: [
|
|
18435
|
+
files.length === 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
18436
|
+
ConnectedUploadDropzone,
|
|
18437
|
+
{
|
|
18438
|
+
onFilesSelected: addFiles,
|
|
18439
|
+
onFilesRejected: (more) => setRefused((current) => [...current, ...more]),
|
|
18440
|
+
onUrlsSubmit: handleUrls,
|
|
18441
|
+
title: "Drag & drop files or folders",
|
|
18442
|
+
subtitle: "",
|
|
18443
|
+
workspaceName,
|
|
18444
|
+
source,
|
|
18445
|
+
onPickSource,
|
|
18446
|
+
accounts
|
|
18447
|
+
}
|
|
18448
|
+
),
|
|
18449
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18450
|
+
chunkFWIBFGUQ_cjs.SelectedFilesList,
|
|
18451
|
+
{
|
|
18452
|
+
renderFileIcon,
|
|
18453
|
+
files,
|
|
18454
|
+
onRemoveFile: (index) => setFiles((current) => current.filter((_, i) => i !== index)),
|
|
18455
|
+
onClearAll: () => setFiles([]),
|
|
18456
|
+
formatFileSize
|
|
18457
|
+
}
|
|
18458
|
+
),
|
|
18459
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkFWIBFGUQ_cjs.RejectedFilesList, { files: refused, onClear: () => setRefused([]) }),
|
|
18460
|
+
error && /* @__PURE__ */ jsxRuntime.jsx(chunkFWIBFGUQ_cjs.UploadErrorMessage, { message: error })
|
|
18461
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(chunkFWIBFGUQ_cjs.UploadContainer, { className: "w-full p-4 sm:p-6", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18462
|
+
chunkFWIBFGUQ_cjs.UploadProgress,
|
|
18463
|
+
{
|
|
18464
|
+
fileCount: count,
|
|
18465
|
+
entityLabel: plural2(count),
|
|
18466
|
+
percentage: progress?.percentage ?? 0,
|
|
18467
|
+
batchInfo: progress?.batches ?? null
|
|
18468
|
+
}
|
|
18469
|
+
) }) }),
|
|
18470
|
+
uploading === null && files.length > 0 && renderFooter({ submit, shared, onSharedChange: setShared })
|
|
18471
|
+
] });
|
|
18472
|
+
}
|
|
18473
|
+
var VENDOR_PRODUCTS = {
|
|
18474
|
+
microsoft: [{ key: "outlook" }, { key: "onedrive", product: "onedrive" }],
|
|
18475
|
+
gmail: [{ key: "gmail" }, { key: "googledrive", product: "googledrive" }],
|
|
18476
|
+
gdrive: [{ key: "googledrive", product: "googledrive" }]
|
|
18477
|
+
};
|
|
18478
|
+
function AddFromAccountsButton({
|
|
18479
|
+
onImportFromEmail,
|
|
18480
|
+
"data-testid": dataTestId = "empty-import-from-email"
|
|
18481
|
+
}) {
|
|
18482
|
+
const { data: catalog = [] } = react$1.useConnectorCatalog();
|
|
18483
|
+
const isVendorVisible = react$1.useConnectorVendorVisibility();
|
|
18484
|
+
const vendors = catalog.filter((c) => isVendorVisible(c.vendor_key));
|
|
18485
|
+
if (vendors.length === 0) return null;
|
|
18486
|
+
const seen = /* @__PURE__ */ new Set();
|
|
18487
|
+
const marks = [];
|
|
18488
|
+
for (const v of vendors) {
|
|
18489
|
+
const products = VENDOR_PRODUCTS[v.vendor_key] ?? [{ key: v.vendor_key }];
|
|
18490
|
+
for (const p of products) {
|
|
18491
|
+
if (seen.has(p.key)) continue;
|
|
18492
|
+
seen.add(p.key);
|
|
18493
|
+
marks.push({ key: p.key, vendorKey: v.vendor_key, product: p.product });
|
|
18494
|
+
}
|
|
18495
|
+
}
|
|
18496
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18497
|
+
ui.Button,
|
|
18498
|
+
{
|
|
18499
|
+
variant: "outline",
|
|
18500
|
+
onClick: onImportFromEmail,
|
|
18501
|
+
className: "gap-2",
|
|
18502
|
+
"data-testid": dataTestId,
|
|
18503
|
+
children: [
|
|
18504
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center gap-1", children: marks.map((m) => /* @__PURE__ */ jsxRuntime.jsx(chunkFWIBFGUQ_cjs.VendorLogo, { vendorKey: m.vendorKey, product: m.product, className: "h-4 w-4" }, m.key)) }),
|
|
18505
|
+
"Add from accounts"
|
|
18506
|
+
]
|
|
18507
|
+
}
|
|
18508
|
+
);
|
|
18509
|
+
}
|
|
18510
|
+
function EmptyWorkspaceUpload({
|
|
18511
|
+
onFilesSelected,
|
|
18512
|
+
onUrlsSubmit,
|
|
18513
|
+
onImportFromEmail,
|
|
18514
|
+
"data-testid": dataTestId
|
|
18515
|
+
}) {
|
|
18516
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18517
|
+
"div",
|
|
18518
|
+
{
|
|
18519
|
+
className: "flex h-full flex-col items-center gap-3 overflow-y-auto p-8 max-sm:p-4",
|
|
18520
|
+
"data-testid": dataTestId,
|
|
18521
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-auto flex w-full flex-col items-center gap-3", children: [
|
|
18522
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18523
|
+
ConnectedUploadDropzone,
|
|
18524
|
+
{
|
|
18525
|
+
onFilesSelected,
|
|
18526
|
+
onUrlsSubmit,
|
|
18527
|
+
title: "Drag & Drop Files or Folders Here",
|
|
18528
|
+
subtitle: "or click to browse from your computer",
|
|
18529
|
+
compact: true,
|
|
18530
|
+
className: "w-full max-w-2xl",
|
|
18531
|
+
compactLeadingAction: onImportFromEmail && /* @__PURE__ */ jsxRuntime.jsx(AddFromAccountsButton, { onImportFromEmail })
|
|
18532
|
+
}
|
|
18533
|
+
),
|
|
18534
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkFWIBFGUQ_cjs.PrivacyExplainerModal, {})
|
|
18535
|
+
] })
|
|
18536
|
+
}
|
|
18537
|
+
);
|
|
18538
|
+
}
|
|
17964
18539
|
function ActiveChat({ agentId, workspaceId }) {
|
|
17965
18540
|
const chat = react$1.useArbiChat({
|
|
17966
18541
|
agentId,
|
|
@@ -18030,59 +18605,59 @@ function ConnectedAgentChatPanel({
|
|
|
18030
18605
|
|
|
18031
18606
|
Object.defineProperty(exports, "BillingSupportProvider", {
|
|
18032
18607
|
enumerable: true,
|
|
18033
|
-
get: function () { return
|
|
18608
|
+
get: function () { return chunkSCK3GAE5_cjs.BillingSupportProvider; }
|
|
18034
18609
|
});
|
|
18035
18610
|
Object.defineProperty(exports, "CAP_REACHED_MESSAGE", {
|
|
18036
18611
|
enumerable: true,
|
|
18037
|
-
get: function () { return
|
|
18612
|
+
get: function () { return chunkSCK3GAE5_cjs.CAP_REACHED_MESSAGE; }
|
|
18038
18613
|
});
|
|
18039
18614
|
Object.defineProperty(exports, "ZERO_BUDGET_MESSAGE", {
|
|
18040
18615
|
enumerable: true,
|
|
18041
|
-
get: function () { return
|
|
18616
|
+
get: function () { return chunkSCK3GAE5_cjs.ZERO_BUDGET_MESSAGE; }
|
|
18042
18617
|
});
|
|
18043
18618
|
Object.defineProperty(exports, "aiUsageResetTimestamp", {
|
|
18044
18619
|
enumerable: true,
|
|
18045
|
-
get: function () { return
|
|
18620
|
+
get: function () { return chunkSCK3GAE5_cjs.aiUsageResetTimestamp; }
|
|
18046
18621
|
});
|
|
18047
18622
|
Object.defineProperty(exports, "formatMoney", {
|
|
18048
18623
|
enumerable: true,
|
|
18049
|
-
get: function () { return
|
|
18624
|
+
get: function () { return chunkSCK3GAE5_cjs.formatMoney; }
|
|
18050
18625
|
});
|
|
18051
18626
|
Object.defineProperty(exports, "formatResetDate", {
|
|
18052
18627
|
enumerable: true,
|
|
18053
|
-
get: function () { return
|
|
18628
|
+
get: function () { return chunkSCK3GAE5_cjs.formatResetDate; }
|
|
18054
18629
|
});
|
|
18055
18630
|
Object.defineProperty(exports, "getQuotaItems", {
|
|
18056
18631
|
enumerable: true,
|
|
18057
|
-
get: function () { return
|
|
18632
|
+
get: function () { return chunkSCK3GAE5_cjs.getQuotaItems; }
|
|
18058
18633
|
});
|
|
18059
18634
|
Object.defineProperty(exports, "isAddonBudgetZero", {
|
|
18060
18635
|
enumerable: true,
|
|
18061
|
-
get: function () { return
|
|
18636
|
+
get: function () { return chunkSCK3GAE5_cjs.isAddonBudgetZero; }
|
|
18062
18637
|
});
|
|
18063
18638
|
Object.defineProperty(exports, "isProProject", {
|
|
18064
18639
|
enumerable: true,
|
|
18065
|
-
get: function () { return
|
|
18640
|
+
get: function () { return chunkSCK3GAE5_cjs.isProProject; }
|
|
18066
18641
|
});
|
|
18067
18642
|
Object.defineProperty(exports, "planBadgeView", {
|
|
18068
18643
|
enumerable: true,
|
|
18069
|
-
get: function () { return
|
|
18644
|
+
get: function () { return chunkSCK3GAE5_cjs.planBadgeView; }
|
|
18070
18645
|
});
|
|
18071
18646
|
Object.defineProperty(exports, "planName", {
|
|
18072
18647
|
enumerable: true,
|
|
18073
|
-
get: function () { return
|
|
18648
|
+
get: function () { return chunkSCK3GAE5_cjs.planName; }
|
|
18074
18649
|
});
|
|
18075
18650
|
Object.defineProperty(exports, "projectGroupBilling", {
|
|
18076
18651
|
enumerable: true,
|
|
18077
|
-
get: function () { return
|
|
18652
|
+
get: function () { return chunkSCK3GAE5_cjs.projectGroupBilling; }
|
|
18078
18653
|
});
|
|
18079
18654
|
Object.defineProperty(exports, "useBillingSupport", {
|
|
18080
18655
|
enumerable: true,
|
|
18081
|
-
get: function () { return
|
|
18656
|
+
get: function () { return chunkSCK3GAE5_cjs.useBillingSupport; }
|
|
18082
18657
|
});
|
|
18083
18658
|
Object.defineProperty(exports, "useRewardBalance", {
|
|
18084
18659
|
enumerable: true,
|
|
18085
|
-
get: function () { return
|
|
18660
|
+
get: function () { return chunkSCK3GAE5_cjs.useRewardBalance; }
|
|
18086
18661
|
});
|
|
18087
18662
|
Object.defineProperty(exports, "ConnectedAssistantDock", {
|
|
18088
18663
|
enumerable: true,
|
|
@@ -18118,43 +18693,43 @@ Object.defineProperty(exports, "useWorkspaceDocs", {
|
|
|
18118
18693
|
});
|
|
18119
18694
|
Object.defineProperty(exports, "ConnectedWorkflowDocumentsField", {
|
|
18120
18695
|
enumerable: true,
|
|
18121
|
-
get: function () { return
|
|
18696
|
+
get: function () { return chunkRJUXSXBH_cjs.ConnectedWorkflowDocumentsField; }
|
|
18122
18697
|
});
|
|
18123
18698
|
Object.defineProperty(exports, "ConnectedWorkflowLauncher", {
|
|
18124
18699
|
enumerable: true,
|
|
18125
|
-
get: function () { return
|
|
18700
|
+
get: function () { return chunkRJUXSXBH_cjs.ConnectedWorkflowLauncher; }
|
|
18126
18701
|
});
|
|
18127
18702
|
Object.defineProperty(exports, "ConnectedWorkflowsTable", {
|
|
18128
18703
|
enumerable: true,
|
|
18129
|
-
get: function () { return
|
|
18704
|
+
get: function () { return chunkRJUXSXBH_cjs.ConnectedWorkflowsTable; }
|
|
18130
18705
|
});
|
|
18131
18706
|
Object.defineProperty(exports, "DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS", {
|
|
18132
18707
|
enumerable: true,
|
|
18133
|
-
get: function () { return
|
|
18708
|
+
get: function () { return chunkRJUXSXBH_cjs.DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS; }
|
|
18134
18709
|
});
|
|
18135
18710
|
Object.defineProperty(exports, "NativeDocxSupportProvider", {
|
|
18136
18711
|
enumerable: true,
|
|
18137
|
-
get: function () { return
|
|
18712
|
+
get: function () { return chunkRJUXSXBH_cjs.NativeDocxSupportProvider; }
|
|
18138
18713
|
});
|
|
18139
18714
|
Object.defineProperty(exports, "toWorkflowFieldDocument", {
|
|
18140
18715
|
enumerable: true,
|
|
18141
|
-
get: function () { return
|
|
18716
|
+
get: function () { return chunkRJUXSXBH_cjs.toWorkflowFieldDocument; }
|
|
18142
18717
|
});
|
|
18143
18718
|
Object.defineProperty(exports, "useConnectedAgentOptions", {
|
|
18144
18719
|
enumerable: true,
|
|
18145
|
-
get: function () { return
|
|
18720
|
+
get: function () { return chunkRJUXSXBH_cjs.useConnectedAgentOptions; }
|
|
18146
18721
|
});
|
|
18147
18722
|
Object.defineProperty(exports, "useConnectedWorkflowScopeSource", {
|
|
18148
18723
|
enumerable: true,
|
|
18149
|
-
get: function () { return
|
|
18724
|
+
get: function () { return chunkRJUXSXBH_cjs.useConnectedWorkflowScopeSource; }
|
|
18150
18725
|
});
|
|
18151
18726
|
Object.defineProperty(exports, "useConnectedWorkspaceRole", {
|
|
18152
18727
|
enumerable: true,
|
|
18153
|
-
get: function () { return
|
|
18728
|
+
get: function () { return chunkRJUXSXBH_cjs.useConnectedWorkspaceRole; }
|
|
18154
18729
|
});
|
|
18155
18730
|
Object.defineProperty(exports, "useNativeDocxSupport", {
|
|
18156
18731
|
enumerable: true,
|
|
18157
|
-
get: function () { return
|
|
18732
|
+
get: function () { return chunkRJUXSXBH_cjs.useNativeDocxSupport; }
|
|
18158
18733
|
});
|
|
18159
18734
|
Object.defineProperty(exports, "DocumentViewerSupportProvider", {
|
|
18160
18735
|
enumerable: true,
|
|
@@ -18201,6 +18776,7 @@ Object.defineProperty(exports, "useConnection", {
|
|
|
18201
18776
|
get: function () { return chunkFM3IRQJW_cjs.useConnection; }
|
|
18202
18777
|
});
|
|
18203
18778
|
exports.AddAddonDialog = AddAddonDialog;
|
|
18779
|
+
exports.AddFromAccountsButton = AddFromAccountsButton;
|
|
18204
18780
|
exports.ArbiAppProvider = ArbiAppProvider;
|
|
18205
18781
|
exports.BACKFILL_OPTIONS = BACKFILL_OPTIONS;
|
|
18206
18782
|
exports.BillingProjectEntity = BillingProjectEntity;
|
|
@@ -18245,6 +18821,8 @@ exports.ConnectedTaskAccessRequest = ConnectedTaskAccessRequest;
|
|
|
18245
18821
|
exports.ConnectedTaskActivityDialog = ConnectedTaskActivityDialog;
|
|
18246
18822
|
exports.ConnectedThreadFollow = ConnectedThreadFollow;
|
|
18247
18823
|
exports.ConnectedUpcomingEvents = ConnectedUpcomingEvents;
|
|
18824
|
+
exports.ConnectedUpload = ConnectedUpload;
|
|
18825
|
+
exports.ConnectedUploadDropzone = ConnectedUploadDropzone;
|
|
18248
18826
|
exports.ConnectedWorkflowHistory = ConnectedWorkflowHistory;
|
|
18249
18827
|
exports.ConnectedWorkflowRunner = ConnectedWorkflowRunner;
|
|
18250
18828
|
exports.ConnectedWorkspaceActivity = ConnectedWorkspaceActivity;
|
|
@@ -18261,6 +18839,7 @@ exports.DEFAULT_SETTINGS_SECTIONS = DEFAULT_SETTINGS_SECTIONS;
|
|
|
18261
18839
|
exports.DEFAULT_TIMELINE_LABEL_WIDTH = DEFAULT_TIMELINE_LABEL_WIDTH;
|
|
18262
18840
|
exports.DEFAULT_WORKSPACE_LIST_LABELS = DEFAULT_WORKSPACE_LIST_LABELS;
|
|
18263
18841
|
exports.DocumentSyncGlyph = DocumentSyncGlyph;
|
|
18842
|
+
exports.EmptyWorkspaceUpload = EmptyWorkspaceUpload;
|
|
18264
18843
|
exports.FACTS_GRID_ID = FACTS_GRID_ID;
|
|
18265
18844
|
exports.FileTooltipContent = FileTooltipContent;
|
|
18266
18845
|
exports.FilesSupportProvider = FilesSupportProvider;
|
|
@@ -18301,6 +18880,7 @@ exports.requestProjectBillingFocus = requestProjectBillingFocus;
|
|
|
18301
18880
|
exports.resolveMailbox = resolveMailbox;
|
|
18302
18881
|
exports.startMenuItem = startMenuItem;
|
|
18303
18882
|
exports.toWorkspaceSummary = toWorkspaceSummary;
|
|
18883
|
+
exports.useAddFromUrls = useAddFromUrls;
|
|
18304
18884
|
exports.useAutoRefreshPendingProjects = useAutoRefreshPendingProjects;
|
|
18305
18885
|
exports.useCalendarViewStore = useCalendarViewStore;
|
|
18306
18886
|
exports.useConnectedDocxNotifications = useConnectedDocxNotifications;
|