@arbidocs/blocks 0.4.78 → 0.4.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/index.cjs +281 -281
- package/dist/agents/index.js +6 -6
- package/dist/{chunk-SSDISIDW.cjs → chunk-3YET6D5E.cjs} +39 -39
- package/dist/{chunk-SSDISIDW.cjs.map → chunk-3YET6D5E.cjs.map} +1 -1
- package/dist/{chunk-B3WCKBJ7.cjs → chunk-5XVWGJ2H.cjs} +3 -3
- package/dist/{chunk-B3WCKBJ7.cjs.map → chunk-5XVWGJ2H.cjs.map} +1 -1
- package/dist/{chunk-WXRCMIAE.js → chunk-6GXF62XN.js} +3 -3
- package/dist/{chunk-WXRCMIAE.js.map → chunk-6GXF62XN.js.map} +1 -1
- package/dist/{chunk-5OC5CGYX.js → chunk-BMOL5DN6.js} +7 -7
- package/dist/{chunk-5OC5CGYX.js.map → chunk-BMOL5DN6.js.map} +1 -1
- package/dist/{chunk-GJV2G4FC.js → chunk-O35LRB3P.js} +3 -3
- package/dist/{chunk-GJV2G4FC.js.map → chunk-O35LRB3P.js.map} +1 -1
- package/dist/{chunk-VFIZYSZB.cjs → chunk-YGUKTFKW.cjs} +3 -3
- package/dist/{chunk-VFIZYSZB.cjs.map → chunk-YGUKTFKW.cjs.map} +1 -1
- package/dist/connect/index.cjs +41 -41
- package/dist/connect/index.js +4 -4
- package/dist/databases/ColumnConfigFields.d.ts +68 -0
- package/dist/databases/DatabaseColumnDialog.d.ts +27 -2
- package/dist/databases/DatabaseTable.d.ts +8 -1
- package/dist/databases/PickCellEditor.d.ts +21 -0
- package/dist/databases/column-types.d.ts +73 -9
- package/dist/databases/databaseColumns.d.ts +4 -0
- package/dist/databases/index.cjs +758 -27
- package/dist/databases/index.cjs.map +1 -1
- package/dist/databases/index.d.ts +4 -1
- package/dist/databases/index.js +745 -31
- package/dist/databases/index.js.map +1 -1
- package/dist/databases/linkCells.d.ts +48 -0
- package/dist/facts/index.cjs +1 -1
- package/dist/facts/index.js +1 -1
- package/dist/files/index.cjs +3 -3
- package/dist/files/index.js +3 -3
- package/dist/home/index.cjs +1 -1
- package/dist/home/index.js +1 -1
- package/dist/index.cjs +506 -506
- package/dist/index.js +10 -10
- package/dist/settings/index.cjs +35 -35
- package/dist/settings/index.js +3 -3
- package/dist/shell/index.cjs +1 -1
- package/dist/shell/index.js +1 -1
- package/dist/studio/index.cjs +1 -1
- package/dist/studio/index.js +1 -1
- package/dist/workflow-canvas/index.cjs +49 -49
- package/dist/workflow-canvas/index.js +6 -6
- package/dist/workspaces/index.cjs +1 -1
- package/dist/workspaces/index.js +1 -1
- package/package.json +4 -4
package/dist/connect/index.cjs
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunk5XVWGJ2H_cjs = require('../chunk-5XVWGJ2H.cjs');
|
|
5
5
|
var chunkXMBYDLZQ_cjs = require('../chunk-XMBYDLZQ.cjs');
|
|
6
6
|
var chunkTZR36PPP_cjs = require('../chunk-TZR36PPP.cjs');
|
|
7
7
|
var chunkMUMH3Z6K_cjs = require('../chunk-MUMH3Z6K.cjs');
|
|
8
8
|
var chunkZVBPRMHJ_cjs = require('../chunk-ZVBPRMHJ.cjs');
|
|
9
9
|
require('../chunk-7YUFMNFW.cjs');
|
|
10
10
|
var chunkMLAHDAN5_cjs = require('../chunk-MLAHDAN5.cjs');
|
|
11
|
-
var
|
|
12
|
-
require('../chunk-7D737FLE.cjs');
|
|
11
|
+
var chunkYGUKTFKW_cjs = require('../chunk-YGUKTFKW.cjs');
|
|
13
12
|
require('../chunk-DETZZBG2.cjs');
|
|
13
|
+
require('../chunk-7D737FLE.cjs');
|
|
14
14
|
var chunkQVBZESYQ_cjs = require('../chunk-QVBZESYQ.cjs');
|
|
15
15
|
require('../chunk-ADOKTJHV.cjs');
|
|
16
|
+
var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
|
|
16
17
|
var chunkMP6FK43E_cjs = require('../chunk-MP6FK43E.cjs');
|
|
17
18
|
require('../chunk-VGOFFCMT.cjs');
|
|
18
19
|
require('../chunk-B4SRYJLM.cjs');
|
|
19
20
|
require('../chunk-7UTB4PHM.cjs');
|
|
20
21
|
require('../chunk-PPCATBOY.cjs');
|
|
21
22
|
var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
|
|
22
|
-
var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
|
|
23
23
|
require('../chunk-MHVNT4J3.cjs');
|
|
24
24
|
require('../chunk-DES3K4SD.cjs');
|
|
25
25
|
var react = require('react');
|
|
@@ -190,7 +190,7 @@ function StreamedArtifact({
|
|
|
190
190
|
}
|
|
191
191
|
var STARTING = /* @__PURE__ */ new Set(["pending", "running"]);
|
|
192
192
|
function formValues(step, inputs) {
|
|
193
|
-
const fields =
|
|
193
|
+
const fields = chunkYGUKTFKW_cjs.stepFields(step);
|
|
194
194
|
if (!fields.length) return void 0;
|
|
195
195
|
if (step.kind === "form")
|
|
196
196
|
return Object.fromEntries(fields.map((f) => [f.name, inputs[f.name] ?? ""]));
|
|
@@ -228,7 +228,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
228
228
|
const { wsId } = chunkXMBYDLZQ_cjs.useWorkspaceDocs();
|
|
229
229
|
const [threadId, setThreadId] = react.useState(options.conversationId);
|
|
230
230
|
const [localInputs, setLocalInputs] = react.useState(
|
|
231
|
-
() =>
|
|
231
|
+
() => chunkYGUKTFKW_cjs.initialRunInputs(workflow, options.initialInputs)
|
|
232
232
|
);
|
|
233
233
|
const [edits, setEdits] = react.useState({});
|
|
234
234
|
const [localStates, setLocalStates] = react.useState({});
|
|
@@ -248,12 +248,12 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
248
248
|
);
|
|
249
249
|
const conversation = conversations.data?.find((c) => c.external_id === threadId);
|
|
250
250
|
const steps = react.useMemo(
|
|
251
|
-
() =>
|
|
251
|
+
() => chunkYGUKTFKW_cjs.workflowSteps(workflow).length > 0 ? chunkYGUKTFKW_cjs.workflowSteps(workflow) : chunkYGUKTFKW_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
|
|
252
252
|
[workflow, conversation?.plan?.steps]
|
|
253
253
|
);
|
|
254
254
|
const activity = react$1.useConversationActivity(threadId, { live: !!threadId });
|
|
255
255
|
const serverStates = react.useMemo(
|
|
256
|
-
() =>
|
|
256
|
+
() => chunkYGUKTFKW_cjs.stepStatesFromActivity(activity.data ?? []),
|
|
257
257
|
[activity.data]
|
|
258
258
|
);
|
|
259
259
|
const working = steps.some(
|
|
@@ -305,7 +305,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
305
305
|
if (!id) {
|
|
306
306
|
await ensureWorkspaceOpen();
|
|
307
307
|
const created = await createWork.mutateAsync({
|
|
308
|
-
title:
|
|
308
|
+
title: chunkYGUKTFKW_cjs.runThreadTitle(workflow, values).slice(0, 60),
|
|
309
309
|
description: workflow.description || null,
|
|
310
310
|
prompt: null,
|
|
311
311
|
skill_ref: null,
|
|
@@ -317,7 +317,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
317
317
|
criteria: [],
|
|
318
318
|
max_passes: 3,
|
|
319
319
|
documents: [],
|
|
320
|
-
steps:
|
|
320
|
+
steps: chunkYGUKTFKW_cjs.toPlanSteps(workflow, {
|
|
321
321
|
inputs: values,
|
|
322
322
|
resolveWorkflow: options.resolveWorkflow,
|
|
323
323
|
compose: options.compose
|
|
@@ -372,7 +372,7 @@ function useWorkflowThread(workflow, options = {}) {
|
|
|
372
372
|
[threadId, act]
|
|
373
373
|
);
|
|
374
374
|
const loaded = !options.conversationId || activity.isSuccess || activity.isError;
|
|
375
|
-
const view =
|
|
375
|
+
const view = chunkYGUKTFKW_cjs.useWorkflowView({
|
|
376
376
|
steps,
|
|
377
377
|
states,
|
|
378
378
|
inputs,
|
|
@@ -444,7 +444,7 @@ function WorkflowSignDialog({
|
|
|
444
444
|
const arbi = react$1.useArbi();
|
|
445
445
|
const { user, ensureWorkspaceOpen } = chunkMUMH3Z6K_cjs.useConnection();
|
|
446
446
|
const tools = documentTools.useOptionalDocumentTools();
|
|
447
|
-
const { id, version } =
|
|
447
|
+
const { id, version } = chunkYGUKTFKW_cjs.splitDocRef(docRef);
|
|
448
448
|
const [pdf, setPdf] = react.useState(null);
|
|
449
449
|
const [failed, setFailed] = react.useState(false);
|
|
450
450
|
react.useEffect(() => {
|
|
@@ -496,7 +496,7 @@ function WorkflowWordDialog({
|
|
|
496
496
|
onClose,
|
|
497
497
|
labels
|
|
498
498
|
}) {
|
|
499
|
-
const { id } =
|
|
499
|
+
const { id } = chunkYGUKTFKW_cjs.splitDocRef(docRef);
|
|
500
500
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
501
501
|
chunkULWRNGGE_cjs.ModalScaffold,
|
|
502
502
|
{
|
|
@@ -627,7 +627,7 @@ function ConnectedWorkflowRunner({
|
|
|
627
627
|
() => ({
|
|
628
628
|
me: user?.externalId,
|
|
629
629
|
openDocument: onOpenDocument && ((ref) => {
|
|
630
|
-
const { id, version } =
|
|
630
|
+
const { id, version } = chunkYGUKTFKW_cjs.splitDocRef(ref);
|
|
631
631
|
onOpenDocument(id, version);
|
|
632
632
|
}),
|
|
633
633
|
openDraft: onOpenDraft && ((draftId) => onOpenDraft(draftId)),
|
|
@@ -637,7 +637,7 @@ function ConnectedWorkflowRunner({
|
|
|
637
637
|
const w = state.waiting;
|
|
638
638
|
if (w?.doc_ext_id) setDialog({ kind: "sign", docRef: w.doc_ext_id });
|
|
639
639
|
}),
|
|
640
|
-
openRedline: hostActions?.openRedline ?? ((ref) => setDialog({ kind: "word", docRef: ref, title: nameOfDoc(
|
|
640
|
+
openRedline: hostActions?.openRedline ?? ((ref) => setDialog({ kind: "word", docRef: ref, title: nameOfDoc(chunkYGUKTFKW_cjs.splitDocRef(ref).id) ?? "" })),
|
|
641
641
|
openReview: hostActions?.openReview ?? ((tags, documents) => setDialog({ kind: "review", tags, documents }))
|
|
642
642
|
}),
|
|
643
643
|
[user?.externalId, onOpenDocument, onOpenDraft, onOpenMessage, hostActions, nameOfDoc, inThread]
|
|
@@ -716,7 +716,7 @@ function ConnectedWorkflowRunner({
|
|
|
716
716
|
);
|
|
717
717
|
};
|
|
718
718
|
const runner = (compact) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
719
|
-
|
|
719
|
+
chunkYGUKTFKW_cjs.WorkflowRunner,
|
|
720
720
|
{
|
|
721
721
|
people,
|
|
722
722
|
...runnerProps,
|
|
@@ -760,10 +760,10 @@ function ConnectedWorkflowRunner({
|
|
|
760
760
|
) }),
|
|
761
761
|
inThread && conversationId ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
762
762
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
763
|
-
|
|
763
|
+
chunkYGUKTFKW_cjs.WorkflowStepBar,
|
|
764
764
|
{
|
|
765
765
|
run: view,
|
|
766
|
-
levels:
|
|
766
|
+
levels: chunkYGUKTFKW_cjs.stepLevels(view.steps),
|
|
767
767
|
doneTitle: (workflow.run.kind === "steps" ? workflow.run.completion?.title : void 0) ?? runnerProps.labels?.complete ?? "Done",
|
|
768
768
|
icon: (key) => key && runnerProps.renderIcon ? runnerProps.renderIcon(key) : void 0,
|
|
769
769
|
tid: (suffix) => `${testIdPrefix}-${suffix}`
|
|
@@ -1020,12 +1020,12 @@ function ConnectedProfileCard({ notify: notify3, title = "Profile" }) {
|
|
|
1020
1020
|
}
|
|
1021
1021
|
});
|
|
1022
1022
|
const display = profile?.fullName || user?.name || "Unnamed";
|
|
1023
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1024
|
-
|
|
1023
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunk5XVWGJ2H_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserCircle, {}), title, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1024
|
+
chunk5XVWGJ2H_cjs.ProfileCard,
|
|
1025
1025
|
{
|
|
1026
1026
|
avatar: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1027
1027
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1028
|
-
|
|
1028
|
+
chunk5XVWGJ2H_cjs.AvatarPicker,
|
|
1029
1029
|
{
|
|
1030
1030
|
pictureUrl: profile?.picture ?? user?.picture,
|
|
1031
1031
|
initials: chunkKDG6FER6_cjs.initials(display),
|
|
@@ -1067,9 +1067,9 @@ function ConnectedIdentityVerification({
|
|
|
1067
1067
|
onNameAccepted: () => notify3?.("Name updated to match your ID", "success")
|
|
1068
1068
|
});
|
|
1069
1069
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1070
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1070
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk5XVWGJ2H_cjs.IdentityVerificationCard, { flow, labels }),
|
|
1071
1071
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1072
|
-
|
|
1072
|
+
chunk5XVWGJ2H_cjs.IdentityVerificationDialog,
|
|
1073
1073
|
{
|
|
1074
1074
|
flow,
|
|
1075
1075
|
accountName: profile?.fullName ?? "",
|
|
@@ -1081,7 +1081,7 @@ function ConnectedIdentityVerification({
|
|
|
1081
1081
|
function ConnectedRequireVerified({ children, labels }) {
|
|
1082
1082
|
const { data: profile } = react$1.useProfile();
|
|
1083
1083
|
const flow = react$1.useIdentityVerification();
|
|
1084
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1084
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunk5XVWGJ2H_cjs.RequireVerified, { flow, accountName: profile?.fullName ?? "", labels, children });
|
|
1085
1085
|
}
|
|
1086
1086
|
function defaultUnmetPasswordRequirement(password) {
|
|
1087
1087
|
if (password.length < 8) return "Minimum 8 characters";
|
|
@@ -1110,10 +1110,10 @@ function ConnectedSecuritySection({
|
|
|
1110
1110
|
},
|
|
1111
1111
|
onClose: () => setOpen(false)
|
|
1112
1112
|
});
|
|
1113
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1114
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1113
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunk5XVWGJ2H_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.KeyRound, {}), title: "Security", children: [
|
|
1114
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunk5XVWGJ2H_cjs.SettingsCard, { padding: "sm", children: [
|
|
1115
1115
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1116
|
-
|
|
1116
|
+
chunk5XVWGJ2H_cjs.SettingsActionRow,
|
|
1117
1117
|
{
|
|
1118
1118
|
title: "Change password",
|
|
1119
1119
|
description: "Used to sign in and to encrypt your data. Changing it re-encrypts everything in your account.",
|
|
@@ -1124,7 +1124,7 @@ function ConnectedSecuritySection({
|
|
|
1124
1124
|
children
|
|
1125
1125
|
] }),
|
|
1126
1126
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1127
|
-
|
|
1127
|
+
chunk5XVWGJ2H_cjs.PasswordChangeDialog,
|
|
1128
1128
|
{
|
|
1129
1129
|
open,
|
|
1130
1130
|
onClose: form.onCancel,
|
|
@@ -1148,23 +1148,23 @@ function ConnectedSecuritySection({
|
|
|
1148
1148
|
] });
|
|
1149
1149
|
}
|
|
1150
1150
|
function ConnectedNotificationPreferences({
|
|
1151
|
-
categories =
|
|
1151
|
+
categories = chunk5XVWGJ2H_cjs.EMAIL_NOTIFICATION_CATEGORIES,
|
|
1152
1152
|
title = "Notifications"
|
|
1153
1153
|
}) {
|
|
1154
1154
|
const keys = react.useMemo(
|
|
1155
|
-
() => categories ===
|
|
1155
|
+
() => categories === chunk5XVWGJ2H_cjs.EMAIL_NOTIFICATION_CATEGORIES ? chunk5XVWGJ2H_cjs.EMAIL_NOTIFICATION_KEYS : categories.map((c) => c.key),
|
|
1156
1156
|
[categories]
|
|
1157
1157
|
);
|
|
1158
1158
|
const prefs = react$1.useNotificationPreferences(keys);
|
|
1159
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1160
|
-
|
|
1159
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunk5XVWGJ2H_cjs.SettingsSection, { title, children: /* @__PURE__ */ jsxRuntime.jsx(chunk5XVWGJ2H_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1160
|
+
chunk5XVWGJ2H_cjs.NotificationCategoryList,
|
|
1161
1161
|
{
|
|
1162
1162
|
masterId: "emailNotifications",
|
|
1163
1163
|
masterTitle: "Email Notifications",
|
|
1164
1164
|
masterDescription: "Email me about activity when I\u2019m away",
|
|
1165
1165
|
masterChecked: prefs.masterChecked,
|
|
1166
1166
|
onMasterChange: prefs.setAll,
|
|
1167
|
-
categories:
|
|
1167
|
+
categories: chunk5XVWGJ2H_cjs.toNotificationCategories(prefs.checked, categories),
|
|
1168
1168
|
onCategoryChange: prefs.setCategory
|
|
1169
1169
|
}
|
|
1170
1170
|
) }) });
|
|
@@ -1178,14 +1178,14 @@ function ConnectedSessionsRow({
|
|
|
1178
1178
|
const sessions = react$1.useSessions({ enabled: open });
|
|
1179
1179
|
const currentSessionId = react$1.useCurrentSessionId();
|
|
1180
1180
|
const terminate = react$1.useTerminateSession();
|
|
1181
|
-
const views =
|
|
1181
|
+
const views = chunk5XVWGJ2H_cjs.toActiveSessionViews(sessions.data ?? [], {
|
|
1182
1182
|
currentSessionId,
|
|
1183
1183
|
terminatingId: terminate.isPending ? terminate.variables : null,
|
|
1184
1184
|
renderIcon: renderSessionIcon
|
|
1185
1185
|
});
|
|
1186
1186
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1187
1187
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1188
|
-
|
|
1188
|
+
chunk5XVWGJ2H_cjs.SettingsRow,
|
|
1189
1189
|
{
|
|
1190
1190
|
label: "Active sessions",
|
|
1191
1191
|
description: "Devices and agents currently signed in to your account.",
|
|
@@ -1207,7 +1207,7 @@ function ConnectedSessionsRow({
|
|
|
1207
1207
|
}
|
|
1208
1208
|
),
|
|
1209
1209
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1210
|
-
|
|
1210
|
+
chunk5XVWGJ2H_cjs.ActiveSessionsDialog,
|
|
1211
1211
|
{
|
|
1212
1212
|
open,
|
|
1213
1213
|
onOpenChange: setOpen,
|
|
@@ -1242,7 +1242,7 @@ function ConnectedLogoutDialog({
|
|
|
1242
1242
|
const sessions = react$1.useSessions({ enabled: open });
|
|
1243
1243
|
const logoutAll = react$1.useLogoutAllSessions();
|
|
1244
1244
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1245
|
-
|
|
1245
|
+
chunk5XVWGJ2H_cjs.LogoutDialog,
|
|
1246
1246
|
{
|
|
1247
1247
|
open,
|
|
1248
1248
|
onClose,
|
|
@@ -1256,7 +1256,7 @@ function ConnectedLogoutDialog({
|
|
|
1256
1256
|
},
|
|
1257
1257
|
canLogoutAll: true,
|
|
1258
1258
|
isOnline,
|
|
1259
|
-
sessions:
|
|
1259
|
+
sessions: chunk5XVWGJ2H_cjs.toLogoutSessionViews(sessions.data ?? []),
|
|
1260
1260
|
renderSessionIcon
|
|
1261
1261
|
}
|
|
1262
1262
|
);
|
|
@@ -1275,7 +1275,7 @@ function ConnectedDangerZone({ notify: notify3, renderSubscriptionLink }) {
|
|
|
1275
1275
|
});
|
|
1276
1276
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1277
1277
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1278
|
-
|
|
1278
|
+
chunk5XVWGJ2H_cjs.SettingsDangerZone,
|
|
1279
1279
|
{
|
|
1280
1280
|
isOpen: zoneOpen,
|
|
1281
1281
|
onToggle: () => setZoneOpen((o) => !o),
|
|
@@ -1295,12 +1295,12 @@ function ConnectedDangerZone({ notify: notify3, renderSubscriptionLink }) {
|
|
|
1295
1295
|
}
|
|
1296
1296
|
),
|
|
1297
1297
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1298
|
-
|
|
1298
|
+
chunk5XVWGJ2H_cjs.DeleteAccountDialog,
|
|
1299
1299
|
{
|
|
1300
1300
|
open: dialogOpen,
|
|
1301
1301
|
onClose: flow.onClose,
|
|
1302
1302
|
step: flow.step,
|
|
1303
|
-
blockers:
|
|
1303
|
+
blockers: chunk5XVWGJ2H_cjs.toDeleteBlockerViews(flow.blockers, renderSubscriptionLink),
|
|
1304
1304
|
onContinue: flow.onContinue,
|
|
1305
1305
|
onBack: flow.onBack,
|
|
1306
1306
|
userEmail: user?.email ?? "",
|
package/dist/connect/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { SettingsSection, ProfileCard, AvatarPicker, IdentityVerificationCard, IdentityVerificationDialog, RequireVerified, SettingsCard, SettingsActionRow, PasswordChangeDialog, EMAIL_NOTIFICATION_KEYS, EMAIL_NOTIFICATION_CATEGORIES, NotificationCategoryList, toNotificationCategories, toActiveSessionViews, SettingsRow, ActiveSessionsDialog, LogoutDialog, toLogoutSessionViews, SettingsDangerZone, DeleteAccountDialog, toDeleteBlockerViews } from '../chunk-
|
|
2
|
+
import { SettingsSection, ProfileCard, AvatarPicker, IdentityVerificationCard, IdentityVerificationDialog, RequireVerified, SettingsCard, SettingsActionRow, PasswordChangeDialog, EMAIL_NOTIFICATION_KEYS, EMAIL_NOTIFICATION_CATEGORIES, NotificationCategoryList, toNotificationCategories, toActiveSessionViews, SettingsRow, ActiveSessionsDialog, LogoutDialog, toLogoutSessionViews, SettingsDangerZone, DeleteAccountDialog, toDeleteBlockerViews } from '../chunk-O35LRB3P.js';
|
|
3
3
|
import { useWorkspaceDocs } from '../chunk-XQDM6T6C.js';
|
|
4
4
|
export { ConnectedAssistantDock, redlineStats, textToArtifact, toRedlineMarkdown, useConnectedAiTask, useConnectedChat, useSemanticSearch, useWorkspaceDocs } from '../chunk-XQDM6T6C.js';
|
|
5
5
|
import { ConnectedNativeDocxEditor } from '../chunk-A24C6BNA.js';
|
|
@@ -8,18 +8,18 @@ export { ConnectionProvider, SESSION_EXPIRED_MESSAGE, isAuthenticated, useConnec
|
|
|
8
8
|
import { SignDocumentDialog } from '../chunk-FE4ULGOR.js';
|
|
9
9
|
import '../chunk-OPA2Y6YZ.js';
|
|
10
10
|
import { TagMatrix, tagMatrixMarkdown } from '../chunk-CWAZNXC5.js';
|
|
11
|
-
import { splitDocRef, WorkflowStepBar, stepLevels, WorkflowRunner, initialRunInputs, workflowSteps, fromPlanSteps, stepStatesFromActivity, toPlanSteps, runThreadTitle, useWorkflowView, stepFields } from '../chunk-
|
|
12
|
-
import '../chunk-XD2M6LIG.js';
|
|
11
|
+
import { splitDocRef, WorkflowStepBar, stepLevels, WorkflowRunner, initialRunInputs, workflowSteps, fromPlanSteps, stepStatesFromActivity, toPlanSteps, runThreadTitle, useWorkflowView, stepFields } from '../chunk-6GXF62XN.js';
|
|
13
12
|
import '../chunk-EVUEIBNU.js';
|
|
13
|
+
import '../chunk-XD2M6LIG.js';
|
|
14
14
|
import { StreamedArtifactFrame } from '../chunk-LOJVUGBJ.js';
|
|
15
15
|
import '../chunk-VILAPTCB.js';
|
|
16
|
+
import { ModalScaffold } from '../chunk-TX2ZICS7.js';
|
|
16
17
|
import { ChatPage } from '../chunk-EWSEQEPL.js';
|
|
17
18
|
import '../chunk-KZJAG7T3.js';
|
|
18
19
|
import '../chunk-HOXKR26S.js';
|
|
19
20
|
import '../chunk-AA3PT6KR.js';
|
|
20
21
|
import '../chunk-NPLYHR2E.js';
|
|
21
22
|
import { initials } from '../chunk-OXF2IFXG.js';
|
|
22
|
-
import { ModalScaffold } from '../chunk-TX2ZICS7.js';
|
|
23
23
|
import '../chunk-7F6CBP3Z.js';
|
|
24
24
|
import '../chunk-VUNV25KB.js';
|
|
25
25
|
import { lazy, useState, Suspense, useEffect, useRef, useCallback, useMemo } from 'react';
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type DatabaseColumnView, type DatabaseRollupOp, type DatabaseSummaryView } from './column-types';
|
|
2
|
+
export interface ColumnConfigLabels {
|
|
3
|
+
relatedDatabase: string;
|
|
4
|
+
pickDatabase: string;
|
|
5
|
+
noDatabases: string;
|
|
6
|
+
targetFixed: string;
|
|
7
|
+
thisDatabase: string;
|
|
8
|
+
showOnTarget: (target: string) => string;
|
|
9
|
+
showOnTargetHint: string;
|
|
10
|
+
pairName: string;
|
|
11
|
+
pairNamePlaceholder: (name: string) => string;
|
|
12
|
+
pairedWith: (target: string) => string;
|
|
13
|
+
oneWay: string;
|
|
14
|
+
relation: string;
|
|
15
|
+
pickRelation: string;
|
|
16
|
+
noRelations: string;
|
|
17
|
+
lookupColumn: string;
|
|
18
|
+
pickColumn: string;
|
|
19
|
+
noColumns: string;
|
|
20
|
+
rollupOp: string;
|
|
21
|
+
rollupColumn: string;
|
|
22
|
+
noNumberColumns: string;
|
|
23
|
+
ops: Record<DatabaseRollupOp, string>;
|
|
24
|
+
}
|
|
25
|
+
export declare const DEFAULT_COLUMN_CONFIG_LABELS: ColumnConfigLabels;
|
|
26
|
+
export interface RelationDraft {
|
|
27
|
+
database_id: string;
|
|
28
|
+
two_way: boolean;
|
|
29
|
+
pair_name: string;
|
|
30
|
+
}
|
|
31
|
+
export interface LookupDraft {
|
|
32
|
+
relation: string;
|
|
33
|
+
column: string;
|
|
34
|
+
}
|
|
35
|
+
export interface RollupDraft {
|
|
36
|
+
relation: string;
|
|
37
|
+
column: string;
|
|
38
|
+
op: DatabaseRollupOp;
|
|
39
|
+
}
|
|
40
|
+
export declare function RelationFields({ draft, onChange, databases, databaseId, databaseName, editing, column, labels, }: {
|
|
41
|
+
draft: RelationDraft;
|
|
42
|
+
onChange: (draft: RelationDraft) => void;
|
|
43
|
+
databases: DatabaseSummaryView[];
|
|
44
|
+
databaseId?: string;
|
|
45
|
+
databaseName?: string;
|
|
46
|
+
editing: boolean;
|
|
47
|
+
column?: DatabaseColumnView | null;
|
|
48
|
+
labels: ColumnConfigLabels;
|
|
49
|
+
}): import("react").JSX.Element;
|
|
50
|
+
/** The relation columns of this database, and the columns of a relation's target. */
|
|
51
|
+
export declare function relationColumnsOf(columns: DatabaseColumnView[]): DatabaseColumnView[];
|
|
52
|
+
export declare function targetColumnsOf(relationId: string, columns: DatabaseColumnView[], databases: DatabaseSummaryView[], databaseId?: string): DatabaseColumnView[];
|
|
53
|
+
export declare function LookupFields({ draft, onChange, columns, databases, databaseId, labels, }: {
|
|
54
|
+
draft: LookupDraft;
|
|
55
|
+
onChange: (draft: LookupDraft) => void;
|
|
56
|
+
columns: DatabaseColumnView[];
|
|
57
|
+
databases: DatabaseSummaryView[];
|
|
58
|
+
databaseId?: string;
|
|
59
|
+
labels: ColumnConfigLabels;
|
|
60
|
+
}): import("react").JSX.Element;
|
|
61
|
+
export declare function RollupFields({ draft, onChange, columns, databases, databaseId, labels, }: {
|
|
62
|
+
draft: RollupDraft;
|
|
63
|
+
onChange: (draft: RollupDraft) => void;
|
|
64
|
+
columns: DatabaseColumnView[];
|
|
65
|
+
databases: DatabaseSummaryView[];
|
|
66
|
+
databaseId?: string;
|
|
67
|
+
labels: ColumnConfigLabels;
|
|
68
|
+
}): import("react").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type DatabaseColumnType, type DatabaseColumnTypeLabels, type DatabaseColumnView } from './column-types';
|
|
1
|
+
import { type DatabaseColumnType, type DatabaseColumnTypeLabels, type DatabaseColumnView, type DatabaseRollupOp, type DatabaseSummaryView } from './column-types';
|
|
2
|
+
import { type ColumnConfigLabels } from './ColumnConfigFields';
|
|
2
3
|
export interface DatabaseColumnDialogLabels {
|
|
3
4
|
addTitle: string;
|
|
4
5
|
editTitle: string;
|
|
@@ -25,12 +26,35 @@ export interface DatabaseColumnDraft {
|
|
|
25
26
|
name: string;
|
|
26
27
|
type: DatabaseColumnType;
|
|
27
28
|
options: string[] | null;
|
|
29
|
+
/** A new relation column's target (and paired column). Absent when editing: it cannot change. */
|
|
30
|
+
relation?: {
|
|
31
|
+
database_id: string;
|
|
32
|
+
two_way: boolean;
|
|
33
|
+
pair_name?: string | null;
|
|
34
|
+
} | null;
|
|
35
|
+
lookup?: {
|
|
36
|
+
relation: string;
|
|
37
|
+
column: string;
|
|
38
|
+
} | null;
|
|
39
|
+
rollup?: {
|
|
40
|
+
relation: string;
|
|
41
|
+
column?: string | null;
|
|
42
|
+
op: DatabaseRollupOp;
|
|
43
|
+
} | null;
|
|
28
44
|
}
|
|
29
45
|
export interface DatabaseColumnDialogProps {
|
|
30
46
|
open: boolean;
|
|
31
47
|
onOpenChange: (open: boolean) => void;
|
|
32
48
|
/** The column being edited; omit to add one. */
|
|
33
49
|
column?: DatabaseColumnView | null;
|
|
50
|
+
/** The database the column belongs to (relations to it are marked "this database"). */
|
|
51
|
+
databaseId?: string;
|
|
52
|
+
/** Its name: the default name of a two-way relation's paired column. */
|
|
53
|
+
databaseName?: string;
|
|
54
|
+
/** Its columns: lookups and rollups read through one of its relation columns. */
|
|
55
|
+
columns?: DatabaseColumnView[];
|
|
56
|
+
/** The databases a relation can link to (this workspace's), with their columns. */
|
|
57
|
+
databases?: DatabaseSummaryView[];
|
|
34
58
|
onSave: (draft: DatabaseColumnDraft) => void;
|
|
35
59
|
/** Delete the column (editing only). */
|
|
36
60
|
onDelete?: () => void;
|
|
@@ -39,5 +63,6 @@ export interface DatabaseColumnDialogProps {
|
|
|
39
63
|
error?: string | null;
|
|
40
64
|
labels?: Partial<DatabaseColumnDialogLabels>;
|
|
41
65
|
typeLabels?: Partial<DatabaseColumnTypeLabels>;
|
|
66
|
+
configLabels?: Partial<ColumnConfigLabels>;
|
|
42
67
|
}
|
|
43
|
-
export declare function DatabaseColumnDialog({ open, onOpenChange, column, onSave, onDelete, isSaving, error, labels, typeLabels, }: DatabaseColumnDialogProps): import("react").JSX.Element;
|
|
68
|
+
export declare function DatabaseColumnDialog({ open, onOpenChange, column, databaseId, databaseName, columns, databases, onSave, onDelete, isSaving, error, labels, typeLabels, configLabels, }: DatabaseColumnDialogProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type GridViewProps } from '../files/GridView';
|
|
2
2
|
import { type DatabaseColumnLabels } from './databaseColumns';
|
|
3
3
|
import type { DatabaseColumnView, DatabaseRowView } from './column-types';
|
|
4
|
+
import type { DatabaseCellSources } from './linkCells';
|
|
4
5
|
export interface DatabaseTableLabels {
|
|
5
6
|
newRow: string;
|
|
6
7
|
emptyTitle: string;
|
|
@@ -18,6 +19,12 @@ export interface DatabaseTableProps {
|
|
|
18
19
|
onAddRow?: () => void;
|
|
19
20
|
onAddColumn?: () => void;
|
|
20
21
|
onEditColumn?: (column: DatabaseColumnView) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Choices for person, document and relation cells (workspace members, documents, a search of
|
|
24
|
+
* the related database's rows) and what a document chip opens. Keep it stable (memoise it): the
|
|
25
|
+
* columns are rebuilt when it changes.
|
|
26
|
+
*/
|
|
27
|
+
sources?: DatabaseCellSources;
|
|
21
28
|
/** Ticked rows (for a bulk delete). With it, rows show a checkbox. */
|
|
22
29
|
onSelectionChange?: (rows: DatabaseRowView[]) => void;
|
|
23
30
|
selected?: DatabaseRowView[];
|
|
@@ -35,4 +42,4 @@ export interface DatabaseTableProps {
|
|
|
35
42
|
gridProps?: Partial<Omit<GridViewProps<DatabaseRowView>, 'items' | 'columnDefs' | 'getItemId'>>;
|
|
36
43
|
testId?: string;
|
|
37
44
|
}
|
|
38
|
-
export declare function DatabaseTable({ columns, rows, onCellChange, onAddRow, onAddColumn, onEditColumn, onSelectionChange, selected, readOnly, isFiltered, isLoading, locale, gridId, height, labels, columnLabels, gridProps, testId, }: DatabaseTableProps): import("react").JSX.Element;
|
|
45
|
+
export declare function DatabaseTable({ columns, rows, onCellChange, onAddRow, onAddColumn, onEditColumn, sources, onSelectionChange, selected, readOnly, isFiltered, isLoading, locale, gridId, height, labels, columnLabels, gridProps, testId, }: DatabaseTableProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CustomCellEditorProps } from 'ag-grid-react';
|
|
2
|
+
import { type DatabaseRowView } from './column-types';
|
|
3
|
+
import { type DatabasePickOption } from './linkCells';
|
|
4
|
+
export interface PickCellEditorLabels {
|
|
5
|
+
searchPlaceholder: string;
|
|
6
|
+
noMatches: string;
|
|
7
|
+
searching: string;
|
|
8
|
+
clear: string;
|
|
9
|
+
done: string;
|
|
10
|
+
remove: (label: string) => string;
|
|
11
|
+
}
|
|
12
|
+
export declare const DEFAULT_PICK_CELL_EDITOR_LABELS: PickCellEditorLabels;
|
|
13
|
+
export interface PickCellEditorParams {
|
|
14
|
+
kind: 'person' | 'document' | 'relation';
|
|
15
|
+
/** A fixed list of choices, filtered as the user types. */
|
|
16
|
+
options?: DatabasePickOption[];
|
|
17
|
+
/** Choices from the server for a search (instead of `options`). */
|
|
18
|
+
search?: (q: string) => Promise<DatabasePickOption[]>;
|
|
19
|
+
labels?: Partial<PickCellEditorLabels>;
|
|
20
|
+
}
|
|
21
|
+
export declare function PickCellEditor(props: CustomCellEditorProps<DatabaseRowView> & PickCellEditorParams): import("react").JSX.Element;
|
|
@@ -2,24 +2,63 @@
|
|
|
2
2
|
* Databases: the shapes the blocks read, and the per-type rules for showing and editing a cell.
|
|
3
3
|
*
|
|
4
4
|
* A database is a user-defined table (a client database, billing records). Its columns are typed:
|
|
5
|
-
* `text`, `number`, `date`, `checkbox`
|
|
6
|
-
* (
|
|
7
|
-
*
|
|
5
|
+
* `text`, `number`, `date`, `checkbox` and `select` hold a value; `person` holds a workspace member's
|
|
6
|
+
* id (`usr-…`); `document` and `relation` hold lists of ids (documents of the workspace, rows of the
|
|
7
|
+
* target database); `lookup` (the values of a column of the related rows) and `rollup` (a number
|
|
8
|
+
* measured over them) are computed by the server and never written. The server checks and
|
|
9
|
+
* normalises every cell (dates arrive as ISO `YYYY-MM-DD` or a full timestamp, numbers as numbers, a
|
|
10
|
+
* select as one of its options) and names every id a row refers to in the row's `titles`, so the
|
|
11
|
+
* blocks only format for display and turn an editor's value into what the API takes.
|
|
8
12
|
*/
|
|
9
|
-
export type DatabaseColumnType = 'text' | 'number' | 'date' | 'checkbox' | 'select';
|
|
13
|
+
export type DatabaseColumnType = 'text' | 'number' | 'date' | 'checkbox' | 'select' | 'person' | 'document' | 'relation' | 'lookup' | 'rollup';
|
|
10
14
|
/** Every type, in the order a type picker lists them. */
|
|
11
15
|
export declare const DATABASE_COLUMN_TYPES: DatabaseColumnType[];
|
|
16
|
+
/** Types whose cells the server computes from a relation: shown, never edited. */
|
|
17
|
+
export declare const COMPUTED_COLUMN_TYPES: ReadonlySet<DatabaseColumnType>;
|
|
18
|
+
/** Types whose cells are lists of ids (written as a list that replaces the cell's links). */
|
|
19
|
+
export declare const LINK_COLUMN_TYPES: ReadonlySet<DatabaseColumnType>;
|
|
20
|
+
export declare const isComputedColumn: (column: Pick<DatabaseColumnView, "type">) => boolean;
|
|
21
|
+
export type DatabaseRollupOp = 'count' | 'sum' | 'avg' | 'min' | 'max';
|
|
22
|
+
export declare const DATABASE_ROLLUP_OPS: DatabaseRollupOp[];
|
|
23
|
+
/**
|
|
24
|
+
* A relation column's target. A `two_way` column has a paired column on the target database
|
|
25
|
+
* (`pair_column_id`) showing the same links from the other side; `reverse` marks the paired side.
|
|
26
|
+
*/
|
|
27
|
+
export interface DatabaseRelationView {
|
|
28
|
+
database_id: string;
|
|
29
|
+
two_way?: boolean;
|
|
30
|
+
pair_column_id?: string | null;
|
|
31
|
+
reverse?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/** A lookup: `column` of the target database, read through this database's `relation` column. */
|
|
34
|
+
export interface DatabaseLookupView {
|
|
35
|
+
relation: string;
|
|
36
|
+
column: string;
|
|
37
|
+
}
|
|
38
|
+
/** A rollup: `op` over the rows linked through `relation` (`column`: a number column, not for count). */
|
|
39
|
+
export interface DatabaseRollupView {
|
|
40
|
+
relation: string;
|
|
41
|
+
column?: string | null;
|
|
42
|
+
op?: DatabaseRollupOp;
|
|
43
|
+
}
|
|
12
44
|
/** A column as the blocks read it (the API's `DatabaseColumn`). */
|
|
13
45
|
export interface DatabaseColumnView {
|
|
14
46
|
id: string;
|
|
15
47
|
name: string;
|
|
16
48
|
type: DatabaseColumnType;
|
|
17
49
|
options?: string[] | null;
|
|
50
|
+
relation?: DatabaseRelationView | null;
|
|
51
|
+
lookup?: DatabaseLookupView | null;
|
|
52
|
+
rollup?: DatabaseRollupView | null;
|
|
18
53
|
}
|
|
19
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* A row as the blocks read it: cell values keyed by column id; an empty cell is absent. `titles`
|
|
56
|
+
* names every person, document and related row the cells refer to (id → display name).
|
|
57
|
+
*/
|
|
20
58
|
export interface DatabaseRowView {
|
|
21
59
|
id: string;
|
|
22
60
|
values: Record<string, unknown>;
|
|
61
|
+
titles?: Record<string, string>;
|
|
23
62
|
}
|
|
24
63
|
/** A database as a list shows it (the API's `DatabaseRead`). */
|
|
25
64
|
export interface DatabaseSummaryView {
|
|
@@ -38,21 +77,46 @@ export interface DatabaseColumnTypeLabels {
|
|
|
38
77
|
date: string;
|
|
39
78
|
checkbox: string;
|
|
40
79
|
select: string;
|
|
80
|
+
person: string;
|
|
81
|
+
document: string;
|
|
82
|
+
relation: string;
|
|
83
|
+
lookup: string;
|
|
84
|
+
rollup: string;
|
|
41
85
|
}
|
|
42
86
|
export declare const DEFAULT_DATABASE_COLUMN_TYPE_LABELS: DatabaseColumnTypeLabels;
|
|
43
87
|
export declare function optionTone(option: string): string;
|
|
88
|
+
/** A cell as a list: a list cell as is, a single value as a list of one, an empty cell as none. */
|
|
89
|
+
export declare function cellList(value: unknown): unknown[];
|
|
90
|
+
/** The ids a person, document or relation cell holds. */
|
|
91
|
+
export declare function cellIds(value: unknown): string[];
|
|
92
|
+
/** An id's display name from the row's titles (the id itself when the server could not name it). */
|
|
93
|
+
export declare function titleOf(id: string, titles?: Record<string, string>): string;
|
|
94
|
+
/** Two cell values, as the API stores them, are the same (lists compare item by item). */
|
|
95
|
+
export declare function sameCellValue(a: unknown, b: unknown): boolean;
|
|
44
96
|
/**
|
|
45
97
|
* A stored date for display. A bare `YYYY-MM-DD` is a calendar day: it is shown from its own
|
|
46
98
|
* components, never through a time zone (which would move it a day for viewers west of UTC).
|
|
47
99
|
*/
|
|
48
100
|
export declare function formatDateValue(value: string, locale?: string): string;
|
|
49
101
|
export declare function formatNumberValue(value: number, locale?: string): string;
|
|
50
|
-
/**
|
|
51
|
-
|
|
102
|
+
/**
|
|
103
|
+
* One value of a lookup cell, whose type is the looked-up column's: an id reads as its title, a
|
|
104
|
+
* number and an ISO date as their own column would show them.
|
|
105
|
+
*/
|
|
106
|
+
export declare function formatLookupValue(value: unknown, titles?: Record<string, string>, locale?: string): string;
|
|
107
|
+
/**
|
|
108
|
+
* A cell as text: what a cell shows, what search and copy see. Checkboxes read as Yes/No; people,
|
|
109
|
+
* documents and related rows by their titles (the row's `titles`), lists joined with commas.
|
|
110
|
+
*/
|
|
111
|
+
export declare function formatCell(value: unknown, type: DatabaseColumnType, locale?: string, titles?: Record<string, string>): string;
|
|
52
112
|
/**
|
|
53
113
|
* An editor's value as the API takes it. Empty becomes `null` (which empties the cell); everything
|
|
54
114
|
* else goes as typed and the server checks it, so a bad value comes back as a 422 naming the column.
|
|
115
|
+
* A document or relation cell goes as its list of ids (which replaces the cell's links).
|
|
55
116
|
*/
|
|
56
117
|
export declare function toApiValue(value: unknown, type: DatabaseColumnType): unknown;
|
|
57
|
-
/**
|
|
58
|
-
|
|
118
|
+
/**
|
|
119
|
+
* Sort comparator for a column's stored values: empty cells last, then by type. People, documents,
|
|
120
|
+
* related rows and lookups sort by what they show, so pass each row's titles.
|
|
121
|
+
*/
|
|
122
|
+
export declare function compareCells(a: unknown, b: unknown, type: DatabaseColumnType, titlesA?: Record<string, string>, titlesB?: Record<string, string>): number;
|
|
@@ -2,10 +2,12 @@ import type { ColDef } from 'ag-grid-community';
|
|
|
2
2
|
import { Type } from 'lucide-react';
|
|
3
3
|
import { type DatabaseColumnType, type DatabaseColumnView, type DatabaseRowView } from './column-types';
|
|
4
4
|
import { SelectChip } from './SelectChip';
|
|
5
|
+
import { type DatabaseCellSources } from './linkCells';
|
|
5
6
|
export { SelectChip };
|
|
6
7
|
export interface DatabaseColumnLabels {
|
|
7
8
|
addColumn: string;
|
|
8
9
|
columnSettings: (name: string) => string;
|
|
10
|
+
computed: string;
|
|
9
11
|
}
|
|
10
12
|
export declare const DEFAULT_DATABASE_COLUMN_LABELS: DatabaseColumnLabels;
|
|
11
13
|
/** colId of the trailing "add a column" column (never a database column id). */
|
|
@@ -18,6 +20,8 @@ export interface DatabaseColumnOptions {
|
|
|
18
20
|
onEditColumn?: (column: DatabaseColumnView) => void;
|
|
19
21
|
/** Add a column (the trailing "+" header). */
|
|
20
22
|
onAddColumn?: () => void;
|
|
23
|
+
/** Choices for person, document and relation cells, and what a document chip opens. */
|
|
24
|
+
sources?: DatabaseCellSources;
|
|
21
25
|
/** Locale for numbers and dates. */
|
|
22
26
|
locale?: string;
|
|
23
27
|
labels?: Partial<DatabaseColumnLabels>;
|