@overmap-ai/core 1.0.48-activity-history.3 → 1.0.48-activity-history.5
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/components/ImageCard/ImageCard.d.ts +1 -1
- package/dist/forms/builder/hooks.d.ts +2 -1
- package/dist/overmap-core.js +97 -72
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +96 -71
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/services/AgentService.d.ts +1 -0
- package/dist/sdk/services/IssueCommentService.d.ts +1 -1
- package/dist/typings/models/attachments.d.ts +2 -1
- package/dist/typings/models/issues.d.ts +0 -1
- package/package.json +5 -5
|
@@ -4337,10 +4337,20 @@ var __publicField = (obj, key, value) => {
|
|
|
4337
4337
|
var _a2;
|
|
4338
4338
|
return (_a2 = allMiddleware[0]) == null ? void 0 : _a2.run(action);
|
|
4339
4339
|
}
|
|
4340
|
-
const discardStatuses = [400, 409, 403, 404];
|
|
4340
|
+
const discardStatuses = [400, 409, 403, 404, 405, 500];
|
|
4341
4341
|
const statusMessages = {
|
|
4342
4342
|
403: { title: "Forbidden", description: "You are not authorized to perform this action.", severity: "danger" },
|
|
4343
|
-
404: { title: "Not found", description: "The requested resource was not found.", severity: "danger" }
|
|
4343
|
+
404: { title: "Not found", description: "The requested resource was not found.", severity: "danger" },
|
|
4344
|
+
405: {
|
|
4345
|
+
title: "Not supported",
|
|
4346
|
+
description: "It's not you. It's us. Sorry for the inconvenience.",
|
|
4347
|
+
severity: "danger"
|
|
4348
|
+
},
|
|
4349
|
+
500: {
|
|
4350
|
+
title: "Server error",
|
|
4351
|
+
description: "Our server seems to be experiencing problems at the moment. We have been alerted and will fix the problem as soon as possible.",
|
|
4352
|
+
severity: "danger"
|
|
4353
|
+
}
|
|
4344
4354
|
};
|
|
4345
4355
|
function discard(reason, action, retries = 0) {
|
|
4346
4356
|
var _a2;
|
|
@@ -4521,7 +4531,8 @@ var __publicField = (obj, key, value) => {
|
|
|
4521
4531
|
...attachmentPayload,
|
|
4522
4532
|
file: attachmentPayload.file.objectURL,
|
|
4523
4533
|
file_name: attachmentPayload.file.name,
|
|
4524
|
-
file_type: attachmentPayload.file.type
|
|
4534
|
+
file_type: attachmentPayload.file.type,
|
|
4535
|
+
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
4525
4536
|
};
|
|
4526
4537
|
await this.client.files.addCache(attachmentPayload.file, file_sha1);
|
|
4527
4538
|
this.client.store.dispatch(addIssueAttachment(offlineAttachment));
|
|
@@ -4555,7 +4566,8 @@ var __publicField = (obj, key, value) => {
|
|
|
4555
4566
|
...attachmentPayload,
|
|
4556
4567
|
file: attachmentPayload.file.objectURL,
|
|
4557
4568
|
file_name: attachmentPayload.file.name,
|
|
4558
|
-
file_type: attachmentPayload.file.type
|
|
4569
|
+
file_type: attachmentPayload.file.type,
|
|
4570
|
+
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
4559
4571
|
};
|
|
4560
4572
|
await this.client.files.addCache(attachmentPayload.file, file_sha1);
|
|
4561
4573
|
this.client.store.dispatch(addComponentAttachment(offlineAttachment));
|
|
@@ -4589,7 +4601,8 @@ var __publicField = (obj, key, value) => {
|
|
|
4589
4601
|
...attachmentPayload,
|
|
4590
4602
|
file: attachmentPayload.file.objectURL,
|
|
4591
4603
|
file_name: attachmentPayload.file.name,
|
|
4592
|
-
file_type: attachmentPayload.file.type
|
|
4604
|
+
file_type: attachmentPayload.file.type,
|
|
4605
|
+
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
4593
4606
|
};
|
|
4594
4607
|
await this.client.files.addCache(attachmentPayload.file, file_sha1);
|
|
4595
4608
|
this.client.store.dispatch(addComponentTypeAttachment(offlineAttachment));
|
|
@@ -4623,7 +4636,8 @@ var __publicField = (obj, key, value) => {
|
|
|
4623
4636
|
...attachmentPayload,
|
|
4624
4637
|
file: attachmentPayload.file.objectURL,
|
|
4625
4638
|
file_name: attachmentPayload.file.name,
|
|
4626
|
-
file_type: attachmentPayload.file.type
|
|
4639
|
+
file_type: attachmentPayload.file.type,
|
|
4640
|
+
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
4627
4641
|
};
|
|
4628
4642
|
await this.client.files.addCache(attachmentPayload.file, file_sha1);
|
|
4629
4643
|
this.client.store.dispatch(addProjectAttachment(offlineAttachment));
|
|
@@ -4663,7 +4677,8 @@ var __publicField = (obj, key, value) => {
|
|
|
4663
4677
|
file_name: file2.name,
|
|
4664
4678
|
file_type: file2.type,
|
|
4665
4679
|
issue: issueId,
|
|
4666
|
-
file_sha1: hash
|
|
4680
|
+
file_sha1: hash,
|
|
4681
|
+
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
4667
4682
|
});
|
|
4668
4683
|
return this.addIssueAttachment(attachment);
|
|
4669
4684
|
};
|
|
@@ -4682,7 +4697,8 @@ var __publicField = (obj, key, value) => {
|
|
|
4682
4697
|
file_name: file2.name,
|
|
4683
4698
|
file_type: file2.type,
|
|
4684
4699
|
component: componentId,
|
|
4685
|
-
file_sha1: hash
|
|
4700
|
+
file_sha1: hash,
|
|
4701
|
+
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
4686
4702
|
});
|
|
4687
4703
|
return this.addComponentAttachment(attachment);
|
|
4688
4704
|
};
|
|
@@ -4701,7 +4717,8 @@ var __publicField = (obj, key, value) => {
|
|
|
4701
4717
|
file_name: file2.name,
|
|
4702
4718
|
file_type: file2.type,
|
|
4703
4719
|
component_type: componentTypeId,
|
|
4704
|
-
file_sha1: hash
|
|
4720
|
+
file_sha1: hash,
|
|
4721
|
+
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
4705
4722
|
});
|
|
4706
4723
|
return this.addComponentTypeAttachment(attachment);
|
|
4707
4724
|
};
|
|
@@ -4720,7 +4737,8 @@ var __publicField = (obj, key, value) => {
|
|
|
4720
4737
|
file_name: file2.name,
|
|
4721
4738
|
file_type: file2.type,
|
|
4722
4739
|
project: projectId,
|
|
4723
|
-
file_sha1: hash
|
|
4740
|
+
file_sha1: hash,
|
|
4741
|
+
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
4724
4742
|
});
|
|
4725
4743
|
return this.addProjectAttachment(attachment);
|
|
4726
4744
|
};
|
|
@@ -5803,8 +5821,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5803
5821
|
const offlineComment = offline({
|
|
5804
5822
|
...comment,
|
|
5805
5823
|
author: store.getState().userReducer.currentUser.id,
|
|
5806
|
-
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
5807
|
-
resolved: false
|
|
5824
|
+
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
5808
5825
|
});
|
|
5809
5826
|
store.dispatch(addIssueComment(offlineComment));
|
|
5810
5827
|
const promise = this.enqueueRequest({
|
|
@@ -7702,7 +7719,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7702
7719
|
* @param request The message to prompt the agent with.
|
|
7703
7720
|
* @param conversationId If continuing an existing message, the UUID of that conversation.
|
|
7704
7721
|
*/
|
|
7705
|
-
prompt(request2, conversationId) {
|
|
7722
|
+
async prompt(request2, conversationId) {
|
|
7706
7723
|
const activeProjectId = this.client.store.getState().projectReducer.activeProjectId;
|
|
7707
7724
|
return this.enqueueRequest({
|
|
7708
7725
|
description: "Prompt agent",
|
|
@@ -7717,6 +7734,16 @@ var __publicField = (obj, key, value) => {
|
|
|
7717
7734
|
queryParams: conversationId ? { conversation_id: conversationId } : {}
|
|
7718
7735
|
});
|
|
7719
7736
|
}
|
|
7737
|
+
async rate(responseId, rating) {
|
|
7738
|
+
return this.enqueueRequest({
|
|
7739
|
+
description: "Rate agent response",
|
|
7740
|
+
method: HttpMethod.PUT,
|
|
7741
|
+
url: `/agents/responses/${responseId}/rate/`,
|
|
7742
|
+
payload: { rating },
|
|
7743
|
+
blockers: ["rate"],
|
|
7744
|
+
blocks: ["rate"]
|
|
7745
|
+
});
|
|
7746
|
+
}
|
|
7720
7747
|
}
|
|
7721
7748
|
class OvermapSDK {
|
|
7722
7749
|
constructor(apiUrl, store) {
|
|
@@ -13206,52 +13233,54 @@ var __publicField = (obj, key, value) => {
|
|
|
13206
13233
|
Footer,
|
|
13207
13234
|
Loading
|
|
13208
13235
|
};
|
|
13209
|
-
const ImageCard = React.memo(
|
|
13210
|
-
|
|
13211
|
-
|
|
13212
|
-
|
|
13213
|
-
|
|
13214
|
-
|
|
13215
|
-
|
|
13216
|
-
|
|
13217
|
-
|
|
13218
|
-
|
|
13219
|
-
|
|
13220
|
-
|
|
13221
|
-
|
|
13222
|
-
|
|
13223
|
-
|
|
13224
|
-
|
|
13225
|
-
|
|
13226
|
-
|
|
13227
|
-
|
|
13228
|
-
|
|
13229
|
-
|
|
13230
|
-
|
|
13231
|
-
|
|
13232
|
-
|
|
13233
|
-
|
|
13234
|
-
|
|
13235
|
-
|
|
13236
|
-
|
|
13237
|
-
|
|
13238
|
-
|
|
13239
|
-
|
|
13240
|
-
|
|
13241
|
-
|
|
13242
|
-
|
|
13243
|
-
|
|
13244
|
-
|
|
13245
|
-
|
|
13246
|
-
|
|
13247
|
-
|
|
13248
|
-
|
|
13249
|
-
|
|
13250
|
-
|
|
13251
|
-
|
|
13252
|
-
|
|
13253
|
-
|
|
13254
|
-
|
|
13236
|
+
const ImageCard = React.memo(
|
|
13237
|
+
React.forwardRef((props, forwardedRef) => {
|
|
13238
|
+
const { file, alt, error: error2, size, rightSlot, className, truncateLength, ...rest } = props;
|
|
13239
|
+
const fileCardRef = React.useRef(null);
|
|
13240
|
+
const imageInsetRef = React.useRef(null);
|
|
13241
|
+
const fileCardSize = blocks.useSize(fileCardRef);
|
|
13242
|
+
React.useLayoutEffect(() => {
|
|
13243
|
+
if (!imageInsetRef.current || !fileCardSize)
|
|
13244
|
+
return;
|
|
13245
|
+
imageInsetRef.current.style.height = `${fileCardSize.height * 4}px`;
|
|
13246
|
+
}, [fileCardSize]);
|
|
13247
|
+
const fileName2 = React.useMemo(() => {
|
|
13248
|
+
if (!file)
|
|
13249
|
+
return;
|
|
13250
|
+
return truncateLength !== void 0 ? truncate(file.name, truncateLength) : file.name;
|
|
13251
|
+
}, [file, truncateLength]);
|
|
13252
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13253
|
+
Flex,
|
|
13254
|
+
{
|
|
13255
|
+
className: classNames$1(className, styles$4.ImageCard),
|
|
13256
|
+
width: "100%",
|
|
13257
|
+
direction: "column",
|
|
13258
|
+
position: "relative",
|
|
13259
|
+
height: "max-content",
|
|
13260
|
+
gap: "0",
|
|
13261
|
+
ref: forwardedRef,
|
|
13262
|
+
...rest,
|
|
13263
|
+
children: [
|
|
13264
|
+
!file && !error2 && /* @__PURE__ */ jsxRuntime.jsx(Flex, { width: "100%", height: "100%", align: "center", justify: "center", position: "absolute", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.Spinner, {}) }),
|
|
13265
|
+
/* @__PURE__ */ jsxRuntime.jsx(Inset, { className: styles$4.ImageInset, ref: imageInsetRef, clip: "padding-box", side: "y", pb: "0", children: file && !error2 && /* @__PURE__ */ jsxRuntime.jsx("img", { className: styles$4.Image, src: URL.createObjectURL(file), alt: alt ?? file.name }) }),
|
|
13266
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13267
|
+
blocks.OvermapItem,
|
|
13268
|
+
{
|
|
13269
|
+
className: classNames$1(styles$4.Footer, {
|
|
13270
|
+
[styles$4.Loading]: !file
|
|
13271
|
+
}),
|
|
13272
|
+
size,
|
|
13273
|
+
ref: fileCardRef,
|
|
13274
|
+
leftSlot: error2 ? /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiFileWarningLine" }) : file && /* @__PURE__ */ jsxRuntime.jsx(FileIcon, { fileType: file.type }),
|
|
13275
|
+
rightSlot,
|
|
13276
|
+
children: error2 ?? fileName2
|
|
13277
|
+
}
|
|
13278
|
+
)
|
|
13279
|
+
]
|
|
13280
|
+
}
|
|
13281
|
+
);
|
|
13282
|
+
})
|
|
13283
|
+
);
|
|
13255
13284
|
const UploadInput = React.memo((props) => {
|
|
13256
13285
|
var _a2;
|
|
13257
13286
|
const [{ inputId, labelId, size, severity, helpText, showInputOnly, field, fieldProps }, rest] = useFormikInput(props);
|
|
@@ -14388,17 +14417,15 @@ var __publicField = (obj, key, value) => {
|
|
|
14388
14417
|
Action.key
|
|
14389
14418
|
)) }),
|
|
14390
14419
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { display: forMobile(true, "block"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14391
|
-
blocks.
|
|
14420
|
+
blocks.OvermapDropdownMenu,
|
|
14392
14421
|
{
|
|
14393
14422
|
trigger: /* @__PURE__ */ jsxRuntime.jsx(blocks.IconButton, { variant: "ghost", "aria-label": "Actions menu", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiMore2Line" }) }),
|
|
14394
14423
|
items: actions.map((Action) => {
|
|
14395
14424
|
var _a2;
|
|
14396
14425
|
return {
|
|
14397
|
-
|
|
14398
|
-
|
|
14399
|
-
|
|
14400
|
-
] }, Action.key),
|
|
14401
|
-
onSelect: (_a2 = Action.buttonProps) == null ? void 0 : _a2.onClick
|
|
14426
|
+
leftSlot: /* @__PURE__ */ jsxRuntime.jsx(Action.Icon, {}),
|
|
14427
|
+
children: Action.text,
|
|
14428
|
+
onClick: (_a2 = Action.buttonProps) == null ? void 0 : _a2.onClick
|
|
14402
14429
|
};
|
|
14403
14430
|
})
|
|
14404
14431
|
}
|
|
@@ -14456,10 +14483,8 @@ var __publicField = (obj, key, value) => {
|
|
|
14456
14483
|
const field = FieldTypeToClsMapping[identifier];
|
|
14457
14484
|
const Icon = field.Icon;
|
|
14458
14485
|
return {
|
|
14459
|
-
|
|
14460
|
-
|
|
14461
|
-
/* @__PURE__ */ jsxRuntime.jsx(blocks.Text, { children: field.fieldTypeName })
|
|
14462
|
-
] }, identifier),
|
|
14486
|
+
children: field.fieldTypeName,
|
|
14487
|
+
leftSlot: /* @__PURE__ */ jsxRuntime.jsx(Icon, {}),
|
|
14463
14488
|
value: identifier,
|
|
14464
14489
|
onSelect: () => {
|
|
14465
14490
|
onSelect(identifier);
|
|
@@ -14663,7 +14688,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14663
14688
|
}
|
|
14664
14689
|
),
|
|
14665
14690
|
/* @__PURE__ */ jsxRuntime.jsxs(blocks.Flex, { align: "center", gap: "3", children: [
|
|
14666
|
-
/* @__PURE__ */ jsxRuntime.jsx(blocks.Badge, { className: styles.typeBadge, children: (_f = fieldTypeItems.flat().find((item) => item.value === type)) == null ? void 0 : _f.
|
|
14691
|
+
/* @__PURE__ */ jsxRuntime.jsx(blocks.Badge, { className: styles.typeBadge, children: (_f = fieldTypeItems.flat().find((item) => item.value === type)) == null ? void 0 : _f.children }),
|
|
14667
14692
|
showPopoverInputs && /* @__PURE__ */ jsxRuntime.jsx(FieldSettingsPopover, { popoverInputs, hasError: popoverHasErrors })
|
|
14668
14693
|
] }),
|
|
14669
14694
|
resolvedImage && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -15024,7 +15049,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15024
15049
|
)),
|
|
15025
15050
|
droppableProvided.placeholder,
|
|
15026
15051
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15027
|
-
blocks.
|
|
15052
|
+
blocks.OvermapDropdownMenu,
|
|
15028
15053
|
{
|
|
15029
15054
|
trigger: /* @__PURE__ */ jsxRuntime.jsxs(blocks.Button, { type: "button", variant: "soft", children: [
|
|
15030
15055
|
/* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiAddLine" }),
|