@overmap-ai/core 1.0.43 → 1.0.44-tiptap.2
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/overmap-core.js +49 -2
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +49 -2
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/store/slices/componentSlice.d.ts +4 -0
- package/dist/store/slices/componentTypeSlice.d.ts +4 -0
- package/dist/store/slices/issueSlice.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1669,6 +1669,17 @@ var __publicField = (obj, key, value) => {
|
|
|
1669
1669
|
}
|
|
1670
1670
|
)
|
|
1671
1671
|
);
|
|
1672
|
+
const selectAttachmentsOfComponentByType = restructureCreateSelectorWithArgs(
|
|
1673
|
+
toolkit.createSelector(
|
|
1674
|
+
[selectAllComponentAttachments, (_state, componentId) => componentId],
|
|
1675
|
+
(attachments, componentId) => {
|
|
1676
|
+
const attachmentsOfComponent = attachments.filter(({ component_id }) => componentId === component_id);
|
|
1677
|
+
const fileAttachments = attachmentsOfComponent.filter(({ file_type }) => !file_type.startsWith("image/"));
|
|
1678
|
+
const imageAttachments = attachmentsOfComponent.filter(({ file_type }) => file_type.startsWith("image/"));
|
|
1679
|
+
return { fileAttachments, imageAttachments };
|
|
1680
|
+
}
|
|
1681
|
+
)
|
|
1682
|
+
);
|
|
1672
1683
|
const {
|
|
1673
1684
|
addComponent,
|
|
1674
1685
|
updateComponent,
|
|
@@ -1922,6 +1933,19 @@ var __publicField = (obj, key, value) => {
|
|
|
1922
1933
|
}
|
|
1923
1934
|
)
|
|
1924
1935
|
);
|
|
1936
|
+
const selectAttachmentsOfComponentTypeByType = restructureCreateSelectorWithArgs(
|
|
1937
|
+
toolkit.createSelector(
|
|
1938
|
+
[selectAllComponentTypeAttachments, (_state, componentTypeId) => componentTypeId],
|
|
1939
|
+
(attachments, componentTypeId) => {
|
|
1940
|
+
const attachmentsOfComponent = attachments.filter(
|
|
1941
|
+
({ component_type_id }) => component_type_id === componentTypeId
|
|
1942
|
+
);
|
|
1943
|
+
const fileAttachments = attachmentsOfComponent.filter(({ file_type }) => !file_type.startsWith("image/"));
|
|
1944
|
+
const imageAttachments = attachmentsOfComponent.filter(({ file_type }) => file_type.startsWith("image/"));
|
|
1945
|
+
return { fileAttachments, imageAttachments };
|
|
1946
|
+
}
|
|
1947
|
+
)
|
|
1948
|
+
);
|
|
1925
1949
|
const {
|
|
1926
1950
|
addComponentType,
|
|
1927
1951
|
setComponentTypes,
|
|
@@ -2204,6 +2228,25 @@ var __publicField = (obj, key, value) => {
|
|
|
2204
2228
|
return Object.values(commentMapping).filter((comment) => comment.issue === issueId);
|
|
2205
2229
|
})
|
|
2206
2230
|
);
|
|
2231
|
+
const selectAttachmentsOfIssue = restructureCreateSelectorWithArgs(
|
|
2232
|
+
toolkit.createSelector(
|
|
2233
|
+
[selectIssueAttachments, (_state, issueId) => issueId],
|
|
2234
|
+
(attachments, issueId) => {
|
|
2235
|
+
return attachments.filter(({ issue_id }) => issueId === issue_id);
|
|
2236
|
+
}
|
|
2237
|
+
)
|
|
2238
|
+
);
|
|
2239
|
+
const selectAttachmentsOfIssueByType = restructureCreateSelectorWithArgs(
|
|
2240
|
+
toolkit.createSelector(
|
|
2241
|
+
[selectIssueAttachments, (_state, issueId) => issueId],
|
|
2242
|
+
(attachments, issueId) => {
|
|
2243
|
+
const attachmentsOfComponent = attachments.filter(({ issue_id }) => issue_id === issueId);
|
|
2244
|
+
const fileAttachments = attachmentsOfComponent.filter(({ file_type }) => !file_type.startsWith("image/"));
|
|
2245
|
+
const imageAttachments = attachmentsOfComponent.filter(({ file_type }) => file_type.startsWith("image/"));
|
|
2246
|
+
return { fileAttachments, imageAttachments };
|
|
2247
|
+
}
|
|
2248
|
+
)
|
|
2249
|
+
);
|
|
2207
2250
|
const selectFileAttachmentsOfIssue = restructureCreateSelectorWithArgs(
|
|
2208
2251
|
toolkit.createSelector(
|
|
2209
2252
|
[selectIssueAttachmentMapping, (_state, issueId) => issueId],
|
|
@@ -5313,9 +5356,9 @@ var __publicField = (obj, key, value) => {
|
|
|
5313
5356
|
throw new Error(`No issue with id ${id} found in the store`);
|
|
5314
5357
|
}
|
|
5315
5358
|
const attachments = Object.values(state.issueReducer.attachments).filter((a) => a.issue_id === id);
|
|
5316
|
-
const attachmentsOfIssue =
|
|
5359
|
+
const attachmentsOfIssue = selectAttachmentsOfIssue(id)(state);
|
|
5317
5360
|
this.client.store.dispatch(removeIssue(id));
|
|
5318
|
-
if (attachmentsOfIssue) {
|
|
5361
|
+
if (attachmentsOfIssue.length > 0) {
|
|
5319
5362
|
this.client.store.dispatch(removeAttachmentsOfIssue(id));
|
|
5320
5363
|
}
|
|
5321
5364
|
try {
|
|
@@ -14936,7 +14979,11 @@ var __publicField = (obj, key, value) => {
|
|
|
14936
14979
|
exports2.selectAllComponentTypeAttachments = selectAllComponentTypeAttachments;
|
|
14937
14980
|
exports2.selectAppearance = selectAppearance;
|
|
14938
14981
|
exports2.selectAttachmentsOfComponent = selectAttachmentsOfComponent;
|
|
14982
|
+
exports2.selectAttachmentsOfComponentByType = selectAttachmentsOfComponentByType;
|
|
14939
14983
|
exports2.selectAttachmentsOfComponentType = selectAttachmentsOfComponentType;
|
|
14984
|
+
exports2.selectAttachmentsOfComponentTypeByType = selectAttachmentsOfComponentTypeByType;
|
|
14985
|
+
exports2.selectAttachmentsOfIssue = selectAttachmentsOfIssue;
|
|
14986
|
+
exports2.selectAttachmentsOfIssueByType = selectAttachmentsOfIssueByType;
|
|
14940
14987
|
exports2.selectCategories = selectCategories;
|
|
14941
14988
|
exports2.selectCategoriesOfWorkspace = selectCategoriesOfWorkspace;
|
|
14942
14989
|
exports2.selectCategory = selectCategory;
|