@overmap-ai/core 1.0.57-fix-agent-responses.0 → 1.0.57-project-view-only-flag.0
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/README.md +4 -4
- package/dist/constants/ui.d.ts +1 -1
- package/dist/enums/ui.d.ts +1 -1
- package/dist/forms/builder/constants.d.ts +1 -1
- package/dist/forms/builder/hooks.d.ts +1 -1
- package/dist/overmap-core.js +567 -621
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +567 -621
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/sdk.d.ts +7 -7
- package/dist/sdk/services/AgentService.d.ts +21 -2
- package/dist/sdk/services/AssetAttachmentService.d.ts +10 -0
- package/dist/sdk/services/AssetService.d.ts +11 -0
- package/dist/sdk/services/AssetStageCompletionService.d.ts +16 -0
- package/dist/sdk/services/AssetStageService.d.ts +11 -0
- package/dist/sdk/services/AssetTypeAttachmentService.d.ts +10 -0
- package/dist/sdk/services/AssetTypeService.d.ts +9 -0
- package/dist/sdk/services/UserFormService.d.ts +2 -2
- package/dist/sdk/services/UserFormSubmissionService.d.ts +1 -1
- package/dist/sdk/services/index.d.ts +6 -6
- package/dist/store/slices/assetSlice.d.ts +63 -0
- package/dist/store/slices/assetStageCompletionSlice.d.ts +15 -0
- package/dist/store/slices/assetStageSlice.d.ts +32 -0
- package/dist/store/slices/assetTypeSlice.d.ts +74 -0
- package/dist/store/slices/categorySlice.d.ts +4 -4
- package/dist/store/slices/documentSlice.d.ts +6 -7
- package/dist/store/slices/formRevisionSlice.d.ts +5 -5
- package/dist/store/slices/formSlice.d.ts +7 -7
- package/dist/store/slices/formSubmissionSlice.d.ts +2 -2
- package/dist/store/slices/index.d.ts +4 -4
- package/dist/store/slices/issueSlice.d.ts +4 -4
- package/dist/store/slices/projectFileSlice.d.ts +4 -4
- package/dist/store/slices/workspaceSlice.d.ts +4 -4
- package/dist/store/store.d.ts +13 -13
- package/dist/typings/models/access.d.ts +1 -0
- package/dist/typings/models/attachments.d.ts +6 -6
- package/dist/typings/models/components.d.ts +11 -7
- package/dist/typings/models/forms.d.ts +3 -3
- package/dist/utils/colors.d.ts +1 -1
- package/package.json +153 -153
- package/dist/sdk/services/ComponentAttachmentService.d.ts +0 -10
- package/dist/sdk/services/ComponentService.d.ts +0 -11
- package/dist/sdk/services/ComponentStageCompletionService.d.ts +0 -17
- package/dist/sdk/services/ComponentStageService.d.ts +0 -11
- package/dist/sdk/services/ComponentTypeAttachmentService.d.ts +0 -10
- package/dist/sdk/services/ComponentTypeService.d.ts +0 -9
- package/dist/store/slices/ComponentStageCompletionSlice.d.ts +0 -27
- package/dist/store/slices/componentSlice.d.ts +0 -73
- package/dist/store/slices/componentStageSlice.d.ts +0 -42
- package/dist/store/slices/componentTypeSlice.d.ts +0 -75
|
@@ -1340,7 +1340,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1340
1340
|
[mint.mint9]: "mint",
|
|
1341
1341
|
[sky.sky9]: "sky"
|
|
1342
1342
|
};
|
|
1343
|
-
const
|
|
1343
|
+
const AssetStageColors = {
|
|
1344
1344
|
indigo: indigo.indigo9,
|
|
1345
1345
|
red: red.red9,
|
|
1346
1346
|
violet: violet.violet9,
|
|
@@ -1362,7 +1362,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1362
1362
|
return { backgroundColor, textColor };
|
|
1363
1363
|
};
|
|
1364
1364
|
function getStageColor(index2) {
|
|
1365
|
-
return Object.values(
|
|
1365
|
+
return Object.values(AssetStageColors)[index2 % Object.keys(AssetStageColors).length];
|
|
1366
1366
|
}
|
|
1367
1367
|
const getLocalDateString = memoize((date) => {
|
|
1368
1368
|
if (!date)
|
|
@@ -1582,122 +1582,115 @@ var __publicField = (obj, key, value) => {
|
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
1584
1584
|
const initialState$q = {
|
|
1585
|
-
|
|
1586
|
-
|
|
1585
|
+
assetTypes: {},
|
|
1586
|
+
hiddenAssetTypeIds: {},
|
|
1587
1587
|
attachments: {}
|
|
1588
1588
|
};
|
|
1589
|
-
const
|
|
1590
|
-
name: "
|
|
1589
|
+
const assetTypeSlice = toolkit.createSlice({
|
|
1590
|
+
name: "assetTypes",
|
|
1591
1591
|
initialState: initialState$q,
|
|
1592
1592
|
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$q)),
|
|
1593
1593
|
reducers: {
|
|
1594
|
-
|
|
1595
|
-
state.
|
|
1594
|
+
addAssetType: (state, action) => {
|
|
1595
|
+
state.assetTypes[action.payload.offline_id] = action.payload;
|
|
1596
1596
|
},
|
|
1597
|
-
|
|
1598
|
-
state.
|
|
1597
|
+
setAssetTypes: (state, action) => {
|
|
1598
|
+
state.assetTypes = toOfflineIdRecord(action.payload);
|
|
1599
1599
|
},
|
|
1600
|
-
|
|
1601
|
-
state.
|
|
1600
|
+
toggleAssetTypeVisibility: (state, action) => {
|
|
1601
|
+
state.hiddenAssetTypeIds[action.payload] = !state.hiddenAssetTypeIds[action.payload];
|
|
1602
1602
|
},
|
|
1603
|
-
|
|
1604
|
-
delete state.
|
|
1603
|
+
deleteAssetType: (state, action) => {
|
|
1604
|
+
delete state.assetTypes[action.payload];
|
|
1605
1605
|
},
|
|
1606
1606
|
// Attachments
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1607
|
+
setAssetTypeAttachment: setAttachment,
|
|
1608
|
+
setAssetTypeAttachments: setAttachments,
|
|
1609
|
+
addAssetTypeAttachment: addAttachment,
|
|
1610
|
+
addAssetTypeAttachments: addAttachments,
|
|
1611
|
+
updateAssetTypeAttachment: updateAttachment,
|
|
1612
|
+
updateAssetTypeAttachments: updateAttachments,
|
|
1613
|
+
removeAssetTypeAttachment: removeAttachment,
|
|
1614
|
+
removeAssetTypeAttachments: removeAttachments
|
|
1615
1615
|
}
|
|
1616
1616
|
});
|
|
1617
1617
|
const {
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1618
|
+
addAssetType,
|
|
1619
|
+
setAssetTypes,
|
|
1620
|
+
toggleAssetTypeVisibility,
|
|
1621
|
+
deleteAssetType,
|
|
1622
1622
|
// Attachmet
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
} =
|
|
1632
|
-
const
|
|
1633
|
-
const
|
|
1634
|
-
[
|
|
1623
|
+
setAssetTypeAttachment,
|
|
1624
|
+
setAssetTypeAttachments,
|
|
1625
|
+
addAssetTypeAttachment,
|
|
1626
|
+
addAssetTypeAttachments,
|
|
1627
|
+
updateAssetTypeAttachment,
|
|
1628
|
+
updateAssetTypeAttachments,
|
|
1629
|
+
removeAssetTypeAttachment,
|
|
1630
|
+
removeAssetTypeAttachments
|
|
1631
|
+
} = assetTypeSlice.actions;
|
|
1632
|
+
const selectAssetTypesMapping = (state) => state.assetTypeReducer.assetTypes;
|
|
1633
|
+
const selectAssetTypes = toolkit.createSelector(
|
|
1634
|
+
[selectAssetTypesMapping],
|
|
1635
1635
|
(mapping) => Object.values(mapping)
|
|
1636
1636
|
);
|
|
1637
|
-
const
|
|
1638
|
-
toolkit.createSelector(
|
|
1637
|
+
const selectAssetType = restructureCreateSelectorWithArgs(
|
|
1638
|
+
toolkit.createSelector(
|
|
1639
|
+
[selectAssetTypesMapping, (_state, assetTypeId) => assetTypeId],
|
|
1640
|
+
(mapping, assetTypeId) => mapping[assetTypeId]
|
|
1641
|
+
)
|
|
1639
1642
|
);
|
|
1640
|
-
const
|
|
1643
|
+
const selectNumberOfAssetTypesMatchingCaseInsensitiveName = restructureCreateSelectorWithArgs(
|
|
1641
1644
|
toolkit.createSelector(
|
|
1642
|
-
[
|
|
1643
|
-
selectComponentTypesMapping,
|
|
1644
|
-
(_state, args) => args
|
|
1645
|
-
],
|
|
1645
|
+
[selectAssetTypesMapping, (_state, args) => args],
|
|
1646
1646
|
(mapping, args) => {
|
|
1647
1647
|
var _a2;
|
|
1648
1648
|
const name = ((_a2 = args.name) == null ? void 0 : _a2.toLowerCase()) ?? null;
|
|
1649
1649
|
return Object.values(mapping).filter(
|
|
1650
|
-
(
|
|
1650
|
+
(assetType) => {
|
|
1651
1651
|
var _a3;
|
|
1652
|
-
return (((_a3 =
|
|
1652
|
+
return (((_a3 = assetType.name) == null ? void 0 : _a3.toLowerCase()) ?? null) === name && assetType.offline_id !== args.assetTypeId;
|
|
1653
1653
|
}
|
|
1654
1654
|
).length;
|
|
1655
1655
|
}
|
|
1656
1656
|
)
|
|
1657
1657
|
);
|
|
1658
|
-
const
|
|
1659
|
-
toolkit.createSelector(
|
|
1660
|
-
|
|
1661
|
-
(mapping
|
|
1662
|
-
|
|
1663
|
-
return
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
return (((_a2 = componentType.name) == null ? void 0 : _a2.toLowerCase()) ?? null) === name;
|
|
1667
|
-
}
|
|
1668
|
-
);
|
|
1669
|
-
}
|
|
1670
|
-
)
|
|
1658
|
+
const selectAssetTypesByName = restructureCreateSelectorWithArgs(
|
|
1659
|
+
toolkit.createSelector([selectAssetTypesMapping, (_state, name) => name], (mapping, name) => {
|
|
1660
|
+
name = (name == null ? void 0 : name.toLowerCase()) ?? null;
|
|
1661
|
+
return Object.values(mapping).filter((assetType) => {
|
|
1662
|
+
var _a2;
|
|
1663
|
+
return (((_a2 = assetType.name) == null ? void 0 : _a2.toLowerCase()) ?? null) === name;
|
|
1664
|
+
});
|
|
1665
|
+
})
|
|
1671
1666
|
);
|
|
1672
|
-
const
|
|
1673
|
-
const
|
|
1674
|
-
const
|
|
1675
|
-
[
|
|
1667
|
+
const selectHiddenAssetTypeIds = (state) => state.assetTypeReducer.hiddenAssetTypeIds;
|
|
1668
|
+
const selectAssetTypeAttachmentMapping = (state) => state.assetTypeReducer.attachments;
|
|
1669
|
+
const selectAssetTypeAttachments = toolkit.createSelector(
|
|
1670
|
+
[selectAssetTypeAttachmentMapping],
|
|
1676
1671
|
(mapping) => Object.values(mapping)
|
|
1677
1672
|
);
|
|
1678
|
-
const
|
|
1679
|
-
return state.
|
|
1673
|
+
const selectAssetTypeAttachment = (attachmentId) => (state) => {
|
|
1674
|
+
return state.assetTypeReducer.attachments[attachmentId];
|
|
1680
1675
|
};
|
|
1681
|
-
const
|
|
1676
|
+
const selectAttachmentsOfAssetType = restructureCreateSelectorWithArgs(
|
|
1682
1677
|
toolkit.createSelector(
|
|
1683
|
-
[
|
|
1684
|
-
(attachments,
|
|
1685
|
-
return attachments.filter(({
|
|
1678
|
+
[selectAssetTypeAttachments, (_state, assetTypeId) => assetTypeId],
|
|
1679
|
+
(attachments, assetTypeId) => {
|
|
1680
|
+
return attachments.filter(({ asset_type }) => assetTypeId === asset_type);
|
|
1686
1681
|
}
|
|
1687
1682
|
)
|
|
1688
1683
|
);
|
|
1689
|
-
const
|
|
1684
|
+
const selectAttachmentsOfAssetTypeByType = restructureCreateSelectorWithArgs(
|
|
1690
1685
|
toolkit.createSelector(
|
|
1691
|
-
[
|
|
1692
|
-
(attachments,
|
|
1693
|
-
const
|
|
1694
|
-
|
|
1695
|
-
);
|
|
1696
|
-
const fileAttachments = attachmentsOfComponent.filter(
|
|
1686
|
+
[selectAssetTypeAttachments, (_state, assetTypeId) => assetTypeId],
|
|
1687
|
+
(attachments, assetTypeId) => {
|
|
1688
|
+
const attachmentsOfAssetType = attachments.filter(({ asset_type }) => asset_type === assetTypeId);
|
|
1689
|
+
const fileAttachments = attachmentsOfAssetType.filter(
|
|
1697
1690
|
// this null check here is necessary, there are cases where file_type is null or undefined
|
|
1698
1691
|
({ file_type }) => !file_type || !file_type.startsWith("image/")
|
|
1699
1692
|
);
|
|
1700
|
-
const imageAttachments =
|
|
1693
|
+
const imageAttachments = attachmentsOfAssetType.filter(
|
|
1701
1694
|
// this null check here is necessary, there are cases where file_type is null or undefined
|
|
1702
1695
|
({ file_type }) => file_type && file_type.startsWith("image/")
|
|
1703
1696
|
);
|
|
@@ -1705,173 +1698,157 @@ var __publicField = (obj, key, value) => {
|
|
|
1705
1698
|
}
|
|
1706
1699
|
)
|
|
1707
1700
|
);
|
|
1708
|
-
const
|
|
1701
|
+
const assetTypeReducer = assetTypeSlice.reducer;
|
|
1709
1702
|
const initialState$p = {
|
|
1710
|
-
|
|
1703
|
+
assets: {},
|
|
1711
1704
|
attachments: {}
|
|
1712
1705
|
};
|
|
1713
|
-
const
|
|
1714
|
-
name: "
|
|
1706
|
+
const assetSlice = toolkit.createSlice({
|
|
1707
|
+
name: "assets",
|
|
1715
1708
|
initialState: initialState$p,
|
|
1716
1709
|
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$p)),
|
|
1717
1710
|
reducers: {
|
|
1718
|
-
|
|
1719
|
-
state.
|
|
1720
|
-
|
|
1711
|
+
addAsset: (state, action) => {
|
|
1712
|
+
state.assets[action.payload.offline_id] = action.payload;
|
|
1713
|
+
prevAssets = null;
|
|
1721
1714
|
},
|
|
1722
|
-
|
|
1723
|
-
Object.assign(state.
|
|
1724
|
-
|
|
1715
|
+
addAssetsInBatches: (state, action) => {
|
|
1716
|
+
Object.assign(state.assets, toOfflineIdRecord(action.payload));
|
|
1717
|
+
prevAssets = null;
|
|
1725
1718
|
},
|
|
1726
|
-
|
|
1727
|
-
state.
|
|
1728
|
-
|
|
1719
|
+
setAssets: (state, action) => {
|
|
1720
|
+
state.assets = toOfflineIdRecord(action.payload);
|
|
1721
|
+
prevAssets = null;
|
|
1729
1722
|
},
|
|
1730
|
-
|
|
1731
|
-
if (action.payload.offline_id in state.
|
|
1732
|
-
state.
|
|
1723
|
+
updateAsset: (state, action) => {
|
|
1724
|
+
if (action.payload.offline_id in state.assets) {
|
|
1725
|
+
state.assets[action.payload.offline_id] = action.payload;
|
|
1733
1726
|
} else {
|
|
1734
|
-
throw new Error(`Tried to update
|
|
1727
|
+
throw new Error(`Tried to update asset with ID that doesn't exist: ${action.payload.offline_id}`);
|
|
1735
1728
|
}
|
|
1736
|
-
|
|
1729
|
+
prevAssets = null;
|
|
1737
1730
|
},
|
|
1738
|
-
|
|
1739
|
-
if (action.payload in state.
|
|
1740
|
-
delete state.
|
|
1731
|
+
removeAsset: (state, action) => {
|
|
1732
|
+
if (action.payload in state.assets) {
|
|
1733
|
+
delete state.assets[action.payload];
|
|
1741
1734
|
} else {
|
|
1742
|
-
throw new Error(`Failed to remove
|
|
1735
|
+
throw new Error(`Failed to remove asset because ID doesn't exist: ${action.payload}`);
|
|
1743
1736
|
}
|
|
1744
|
-
|
|
1737
|
+
prevAssets = null;
|
|
1745
1738
|
},
|
|
1746
|
-
|
|
1739
|
+
removeAllAssetsOfType: (state, action) => {
|
|
1747
1740
|
var _a2;
|
|
1748
|
-
for (const componentId in state.
|
|
1749
|
-
if (((_a2 = state.
|
|
1750
|
-
delete state.
|
|
1741
|
+
for (const componentId in state.assets) {
|
|
1742
|
+
if (((_a2 = state.assets[componentId]) == null ? void 0 : _a2.asset_type) === action.payload) {
|
|
1743
|
+
delete state.assets[componentId];
|
|
1751
1744
|
}
|
|
1752
1745
|
}
|
|
1753
|
-
|
|
1746
|
+
prevAssets = null;
|
|
1754
1747
|
},
|
|
1755
1748
|
// Attachments
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1749
|
+
setAssetAttachment: setAttachment,
|
|
1750
|
+
setAssetAttachments: setAttachments,
|
|
1751
|
+
addAssetAttachment: addAttachment,
|
|
1752
|
+
addAssetAttachments: addAttachments,
|
|
1753
|
+
updateAssetAttachment: updateAttachment,
|
|
1754
|
+
updateAssetAttachments: updateAttachments,
|
|
1755
|
+
removeAssetAttachment: removeAttachment,
|
|
1756
|
+
removeAssetAttachments: removeAttachments
|
|
1764
1757
|
}
|
|
1765
1758
|
});
|
|
1766
1759
|
const {
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1760
|
+
addAsset,
|
|
1761
|
+
updateAsset,
|
|
1762
|
+
removeAsset,
|
|
1763
|
+
addAssetsInBatches,
|
|
1764
|
+
setAssets,
|
|
1765
|
+
removeAllAssetsOfType,
|
|
1773
1766
|
// Attachments
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
} =
|
|
1783
|
-
let
|
|
1784
|
-
const
|
|
1785
|
-
if (!
|
|
1786
|
-
|
|
1787
|
-
}
|
|
1788
|
-
return
|
|
1767
|
+
setAssetAttachment,
|
|
1768
|
+
setAssetAttachments,
|
|
1769
|
+
addAssetAttachment,
|
|
1770
|
+
addAssetAttachments,
|
|
1771
|
+
updateAssetAttachment,
|
|
1772
|
+
updateAssetAttachments,
|
|
1773
|
+
removeAssetAttachment,
|
|
1774
|
+
removeAssetAttachments
|
|
1775
|
+
} = assetSlice.actions;
|
|
1776
|
+
let prevAssets = null;
|
|
1777
|
+
const selectAssets = (state) => {
|
|
1778
|
+
if (!prevAssets) {
|
|
1779
|
+
prevAssets = Object.values(state.assetReducer.assets);
|
|
1780
|
+
}
|
|
1781
|
+
return prevAssets;
|
|
1789
1782
|
};
|
|
1790
|
-
const
|
|
1791
|
-
const
|
|
1792
|
-
toolkit.createSelector(
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
if (!componentTypeId)
|
|
1796
|
-
return [];
|
|
1797
|
-
return components.filter((component) => component.component_type === componentTypeId);
|
|
1798
|
-
}
|
|
1799
|
-
)
|
|
1783
|
+
const selectAssetsMapping = (state) => state.assetReducer.assets;
|
|
1784
|
+
const selectAssetsOfAssetType = restructureCreateSelectorWithArgs(
|
|
1785
|
+
toolkit.createSelector([selectAssets, (_state, assetTypeId) => assetTypeId], (components, assetTypeId) => {
|
|
1786
|
+
return components.filter((asset) => asset.asset_type === assetTypeId);
|
|
1787
|
+
})
|
|
1800
1788
|
);
|
|
1801
|
-
const
|
|
1802
|
-
return state.
|
|
1803
|
-
};
|
|
1804
|
-
const selectComponentTypeFromComponent = (componentTypeId) => (state) => {
|
|
1805
|
-
return state.componentTypeReducer.componentTypes[componentTypeId];
|
|
1789
|
+
const selectAsset = (assetId) => (state) => {
|
|
1790
|
+
return state.assetReducer.assets[assetId];
|
|
1806
1791
|
};
|
|
1807
|
-
const
|
|
1808
|
-
[
|
|
1809
|
-
(
|
|
1792
|
+
const selectAssetToAssetTypeMapping = toolkit.createSelector(
|
|
1793
|
+
[selectAssets, selectAssetTypesMapping],
|
|
1794
|
+
(assets, assetTypeMapping) => {
|
|
1810
1795
|
const ret = {};
|
|
1811
|
-
for (const
|
|
1812
|
-
const
|
|
1813
|
-
if (!
|
|
1796
|
+
for (const asset of assets) {
|
|
1797
|
+
const assetType = assetTypeMapping[asset.asset_type];
|
|
1798
|
+
if (!assetType) {
|
|
1814
1799
|
console.error(
|
|
1815
|
-
`
|
|
1816
|
-
Expected all referenced
|
|
1800
|
+
`Asset type with ID ${asset.asset_type} not found.
|
|
1801
|
+
Expected all referenced asset types to be populated.
|
|
1817
1802
|
Returning empty object to avoid fatal errors.`
|
|
1818
1803
|
);
|
|
1819
1804
|
return {};
|
|
1820
1805
|
}
|
|
1821
|
-
ret[
|
|
1806
|
+
ret[asset.offline_id] = assetType;
|
|
1822
1807
|
}
|
|
1823
1808
|
return ret;
|
|
1824
1809
|
}
|
|
1825
1810
|
);
|
|
1826
|
-
const
|
|
1827
|
-
toolkit.createSelector(
|
|
1828
|
-
[selectComponents, (_state, componentTypeId) => componentTypeId],
|
|
1829
|
-
(components, componentTypeId) => {
|
|
1830
|
-
return components.filter((component) => component.component_type === componentTypeId);
|
|
1831
|
-
}
|
|
1832
|
-
)
|
|
1833
|
-
);
|
|
1834
|
-
const selectNumberOfComponentsOfComponentType = (componentTypeId) => (state) => {
|
|
1811
|
+
const selectNumberOfAssetsOfAssetType = (assetTypeId) => (state) => {
|
|
1835
1812
|
var _a2;
|
|
1836
|
-
if (!
|
|
1813
|
+
if (!assetTypeId)
|
|
1837
1814
|
return 0;
|
|
1838
|
-
return (_a2 =
|
|
1815
|
+
return (_a2 = selectAssetsOfAssetType(assetTypeId)(state)) == null ? void 0 : _a2.length;
|
|
1839
1816
|
};
|
|
1840
|
-
const
|
|
1841
|
-
return
|
|
1842
|
-
const
|
|
1843
|
-
if (
|
|
1844
|
-
acc.push(
|
|
1817
|
+
const selectAssetTypesFromIds = (assetTypeIds) => (state) => {
|
|
1818
|
+
return assetTypeIds.reduce((acc, assetTypeId) => {
|
|
1819
|
+
const assetType = state.assetTypeReducer.assetTypes[assetTypeId];
|
|
1820
|
+
if (assetType) {
|
|
1821
|
+
acc.push(assetType);
|
|
1845
1822
|
}
|
|
1846
1823
|
return acc;
|
|
1847
1824
|
}, []);
|
|
1848
1825
|
};
|
|
1849
|
-
const
|
|
1850
|
-
const
|
|
1851
|
-
[
|
|
1826
|
+
const selectAssetAttachmentMapping = (state) => state.assetReducer.attachments;
|
|
1827
|
+
const selectAssetAttachments = toolkit.createSelector(
|
|
1828
|
+
[selectAssetAttachmentMapping],
|
|
1852
1829
|
(mapping) => Object.values(mapping)
|
|
1853
1830
|
);
|
|
1854
|
-
const
|
|
1855
|
-
return state.
|
|
1831
|
+
const selectAssetAttachment = (attachmentId) => (state) => {
|
|
1832
|
+
return state.assetReducer.attachments[attachmentId];
|
|
1856
1833
|
};
|
|
1857
|
-
const
|
|
1834
|
+
const selectAttachmentsOfAsset = restructureCreateSelectorWithArgs(
|
|
1858
1835
|
toolkit.createSelector(
|
|
1859
|
-
[
|
|
1860
|
-
(attachments,
|
|
1861
|
-
return attachments.filter(({
|
|
1836
|
+
[selectAssetAttachments, (_state, assetId) => assetId],
|
|
1837
|
+
(attachments, assetId) => {
|
|
1838
|
+
return attachments.filter(({ asset }) => assetId === asset);
|
|
1862
1839
|
}
|
|
1863
1840
|
)
|
|
1864
1841
|
);
|
|
1865
|
-
const
|
|
1842
|
+
const selectAttachmentsOfAssetByType = restructureCreateSelectorWithArgs(
|
|
1866
1843
|
toolkit.createSelector(
|
|
1867
|
-
[
|
|
1868
|
-
(attachments,
|
|
1869
|
-
const
|
|
1870
|
-
const fileAttachments =
|
|
1844
|
+
[selectAssetAttachments, (_state, assetId) => assetId],
|
|
1845
|
+
(attachments, assetId) => {
|
|
1846
|
+
const attachmentsOfAsset = attachments.filter(({ asset }) => assetId === asset);
|
|
1847
|
+
const fileAttachments = attachmentsOfAsset.filter(
|
|
1871
1848
|
// this null check here is necessary, there are cases where file_type is null or undefined
|
|
1872
1849
|
({ file_type }) => !file_type || !file_type.startsWith("image/")
|
|
1873
1850
|
);
|
|
1874
|
-
const imageAttachments =
|
|
1851
|
+
const imageAttachments = attachmentsOfAsset.filter(
|
|
1875
1852
|
// this null check here is necessary, there are cases where file_type is null or undefined
|
|
1876
1853
|
({ file_type }) => file_type && file_type.startsWith("image/")
|
|
1877
1854
|
);
|
|
@@ -1879,69 +1856,67 @@ var __publicField = (obj, key, value) => {
|
|
|
1879
1856
|
}
|
|
1880
1857
|
)
|
|
1881
1858
|
);
|
|
1882
|
-
const
|
|
1859
|
+
const assetReducer = assetSlice.reducer;
|
|
1883
1860
|
const initialState$o = {
|
|
1884
|
-
|
|
1861
|
+
completionsByAssetId: {}
|
|
1885
1862
|
};
|
|
1886
|
-
const
|
|
1887
|
-
name: "
|
|
1863
|
+
const assetStageCompletionSlice = toolkit.createSlice({
|
|
1864
|
+
name: "assetStageCompletions",
|
|
1888
1865
|
initialState: initialState$o,
|
|
1889
1866
|
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$o)),
|
|
1890
1867
|
reducers: {
|
|
1891
1868
|
addStageCompletion: (state, action) => {
|
|
1892
|
-
let stageToCompletionDateMapping = state.
|
|
1869
|
+
let stageToCompletionDateMapping = state.completionsByAssetId[action.payload.asset];
|
|
1893
1870
|
if (!stageToCompletionDateMapping) {
|
|
1894
1871
|
stageToCompletionDateMapping = {};
|
|
1895
|
-
state.
|
|
1872
|
+
state.completionsByAssetId[action.payload.asset] = stageToCompletionDateMapping;
|
|
1896
1873
|
}
|
|
1897
1874
|
stageToCompletionDateMapping[action.payload.stage] = (/* @__PURE__ */ new Date()).toISOString();
|
|
1898
1875
|
},
|
|
1899
1876
|
addStageCompletions: (state, action) => {
|
|
1900
|
-
for (const [
|
|
1877
|
+
for (const [assetId, stageIdToCompletionDateMapping] of Object.entries(action.payload)) {
|
|
1901
1878
|
if (Object.keys(stageIdToCompletionDateMapping).length === 0)
|
|
1902
|
-
throw new Error(
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
if (thisComponentCompletions === void 0) {
|
|
1907
|
-
thisComponentCompletions = {};
|
|
1879
|
+
throw new Error(`Encountered empty stageIdToCompletionDateMapping argument for asset ${assetId}`);
|
|
1880
|
+
let thisAssetCompletions = state.completionsByAssetId[assetId];
|
|
1881
|
+
if (thisAssetCompletions === void 0) {
|
|
1882
|
+
thisAssetCompletions = {};
|
|
1908
1883
|
}
|
|
1909
1884
|
for (const [stageId, completionDate] of Object.entries(stageIdToCompletionDateMapping)) {
|
|
1910
|
-
|
|
1885
|
+
thisAssetCompletions[stageId] = completionDate;
|
|
1911
1886
|
}
|
|
1912
|
-
state.
|
|
1887
|
+
state.completionsByAssetId[assetId] = thisAssetCompletions;
|
|
1913
1888
|
}
|
|
1914
1889
|
},
|
|
1915
1890
|
removeStageCompletions: (state, action) => {
|
|
1916
1891
|
for (const completion of action.payload) {
|
|
1917
|
-
const
|
|
1918
|
-
if (!
|
|
1892
|
+
const thisAssetCompletions = state.completionsByAssetId[completion.asset];
|
|
1893
|
+
if (!thisAssetCompletions || !(completion.stage in thisAssetCompletions)) {
|
|
1919
1894
|
console.warn(
|
|
1920
1895
|
"Skipping removal of uncompleted stage. This message indicates completion objects are created unnecessarily."
|
|
1921
1896
|
);
|
|
1922
1897
|
continue;
|
|
1923
1898
|
}
|
|
1924
|
-
delete
|
|
1899
|
+
delete thisAssetCompletions[completion.stage];
|
|
1925
1900
|
}
|
|
1926
1901
|
},
|
|
1927
1902
|
setStageCompletions: (state, action) => {
|
|
1928
|
-
state.
|
|
1903
|
+
state.completionsByAssetId = action.payload;
|
|
1929
1904
|
}
|
|
1930
1905
|
}
|
|
1931
1906
|
});
|
|
1932
|
-
const { addStageCompletion, addStageCompletions, removeStageCompletions, setStageCompletions } =
|
|
1907
|
+
const { addStageCompletion, addStageCompletions, removeStageCompletions, setStageCompletions } = assetStageCompletionSlice.actions;
|
|
1933
1908
|
const selectCompletedStages = (state) => {
|
|
1934
|
-
return state.
|
|
1909
|
+
return state.assetStageCompletionReducer.completionsByAssetId;
|
|
1935
1910
|
};
|
|
1936
|
-
const
|
|
1937
|
-
return Object.keys(state.
|
|
1911
|
+
const selectCompletedStageIdsForAsset = (asset) => (state) => {
|
|
1912
|
+
return Object.keys(state.assetStageCompletionReducer.completionsByAssetId[asset.offline_id] ?? {});
|
|
1938
1913
|
};
|
|
1939
|
-
const
|
|
1914
|
+
const assetStageCompletionReducer = assetStageCompletionSlice.reducer;
|
|
1940
1915
|
const initialState$n = {
|
|
1941
1916
|
stages: {}
|
|
1942
1917
|
};
|
|
1943
|
-
const
|
|
1944
|
-
name: "
|
|
1918
|
+
const assetStageSlice = toolkit.createSlice({
|
|
1919
|
+
name: "assetStages",
|
|
1945
1920
|
initialState: initialState$n,
|
|
1946
1921
|
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$n)),
|
|
1947
1922
|
reducers: {
|
|
@@ -1976,60 +1951,48 @@ var __publicField = (obj, key, value) => {
|
|
|
1976
1951
|
}
|
|
1977
1952
|
}
|
|
1978
1953
|
});
|
|
1979
|
-
const selectStageMapping = (state) => state.
|
|
1954
|
+
const selectStageMapping = (state) => state.assetStageReducer.stages;
|
|
1980
1955
|
const selectStage = restructureCreateSelectorWithArgs(
|
|
1981
1956
|
toolkit.createSelector([selectStageMapping, (_state, stageId) => stageId], (stageMapping, stageId) => {
|
|
1982
1957
|
return stageMapping[stageId];
|
|
1983
1958
|
})
|
|
1984
1959
|
);
|
|
1985
|
-
const selectStages = toolkit.createSelector(
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
const ret = {};
|
|
1997
|
-
for (const stage of stages) {
|
|
1998
|
-
if (componentTypeIdsSet.has(stage.component_type)) {
|
|
1999
|
-
if (!ret[stage.component_type]) {
|
|
2000
|
-
ret[stage.component_type] = [];
|
|
2001
|
-
}
|
|
2002
|
-
ret[stage.component_type].push(stage);
|
|
1960
|
+
const selectStages = toolkit.createSelector([selectStageMapping], (stageMapping) => {
|
|
1961
|
+
return Object.values(stageMapping);
|
|
1962
|
+
});
|
|
1963
|
+
const selectStagesFromAssetTypeIds = restructureCreateSelectorWithArgs(
|
|
1964
|
+
toolkit.createSelector([selectStages, (_state, assetTypeIds) => assetTypeIds], (stages, assetTypeIds) => {
|
|
1965
|
+
const assetTypeIdsSet = new Set(assetTypeIds);
|
|
1966
|
+
const ret = {};
|
|
1967
|
+
for (const stage of stages) {
|
|
1968
|
+
if (assetTypeIdsSet.has(stage.asset_type)) {
|
|
1969
|
+
if (!ret[stage.asset_type]) {
|
|
1970
|
+
ret[stage.asset_type] = [];
|
|
2003
1971
|
}
|
|
1972
|
+
ret[stage.asset_type].push(stage);
|
|
2004
1973
|
}
|
|
2005
|
-
for (const key in ret) {
|
|
2006
|
-
ret[key] = ret[key].sort((a, b) => a.priority - b.priority);
|
|
2007
|
-
}
|
|
2008
|
-
return ret;
|
|
2009
1974
|
}
|
|
2010
|
-
|
|
1975
|
+
for (const key in ret) {
|
|
1976
|
+
ret[key] = ret[key].sort((a, b) => a.priority - b.priority);
|
|
1977
|
+
}
|
|
1978
|
+
return ret;
|
|
1979
|
+
})
|
|
2011
1980
|
);
|
|
2012
|
-
const
|
|
2013
|
-
toolkit.createSelector(
|
|
2014
|
-
|
|
2015
|
-
(
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
if (stage.component_type === componentTypeId) {
|
|
2019
|
-
componentTypeStagesMapping[stageId] = stage;
|
|
2020
|
-
}
|
|
1981
|
+
const selectAssetTypeStagesMapping = restructureCreateSelectorWithArgs(
|
|
1982
|
+
toolkit.createSelector([selectStageMapping, (_state, assetTypeId) => assetTypeId], (stagesMapping, assetTypeId) => {
|
|
1983
|
+
const assetTypeStagesMapping = {};
|
|
1984
|
+
for (const [stageId, stage] of Object.entries(stagesMapping)) {
|
|
1985
|
+
if (stage.asset_type === assetTypeId) {
|
|
1986
|
+
assetTypeStagesMapping[stageId] = stage;
|
|
2021
1987
|
}
|
|
2022
|
-
return componentTypeStagesMapping;
|
|
2023
1988
|
}
|
|
2024
|
-
|
|
1989
|
+
return assetTypeStagesMapping;
|
|
1990
|
+
})
|
|
2025
1991
|
);
|
|
2026
|
-
const
|
|
2027
|
-
toolkit.createSelector(
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
return stages.filter((stage) => stage.component_type === componentTypeId).sort((a, b) => a.priority - b.priority);
|
|
2031
|
-
}
|
|
2032
|
-
)
|
|
1992
|
+
const selectStagesOfAssetType = restructureCreateSelectorWithArgs(
|
|
1993
|
+
toolkit.createSelector([selectStages, (_state, assetTypeId) => assetTypeId], (stages, assetTypeId) => {
|
|
1994
|
+
return stages.filter((stage) => stage.asset_type === assetTypeId).sort((a, b) => a.priority - b.priority);
|
|
1995
|
+
})
|
|
2033
1996
|
);
|
|
2034
1997
|
const selectStagesFromStageIds = restructureCreateSelectorWithArgs(
|
|
2035
1998
|
toolkit.createSelector([selectStageMapping, (_state, stageIds) => stageIds], (stageMapping, stageIds) => {
|
|
@@ -2051,8 +2014,8 @@ var __publicField = (obj, key, value) => {
|
|
|
2051
2014
|
return ret;
|
|
2052
2015
|
})
|
|
2053
2016
|
);
|
|
2054
|
-
const { addStages, updateStages, removeStages, linkStageToForm, unlinkStageToForm } =
|
|
2055
|
-
const
|
|
2017
|
+
const { addStages, updateStages, removeStages, linkStageToForm, unlinkStageToForm } = assetStageSlice.actions;
|
|
2018
|
+
const assetStageReducer = assetStageSlice.reducer;
|
|
2056
2019
|
const initialState$m = {
|
|
2057
2020
|
workspaces: {},
|
|
2058
2021
|
activeWorkspaceId: null
|
|
@@ -2711,8 +2674,8 @@ var __publicField = (obj, key, value) => {
|
|
|
2711
2674
|
})(OrganizationAccessLevel || {});
|
|
2712
2675
|
var AttachmentModel = /* @__PURE__ */ ((AttachmentModel2) => {
|
|
2713
2676
|
AttachmentModel2["Issue"] = "issue";
|
|
2714
|
-
AttachmentModel2["
|
|
2715
|
-
AttachmentModel2["
|
|
2677
|
+
AttachmentModel2["Asset"] = "asset";
|
|
2678
|
+
AttachmentModel2["AssetType"] = "asset_type";
|
|
2716
2679
|
AttachmentModel2["Project"] = "project";
|
|
2717
2680
|
AttachmentModel2["Document"] = "document";
|
|
2718
2681
|
return AttachmentModel2;
|
|
@@ -3525,6 +3488,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3525
3488
|
placementMode: false,
|
|
3526
3489
|
enableClustering: false,
|
|
3527
3490
|
svgLayout: false,
|
|
3491
|
+
// TODO: this is no longer used
|
|
3528
3492
|
expandedSections: {
|
|
3529
3493
|
Issues: true,
|
|
3530
3494
|
"Map Layers": false,
|
|
@@ -3735,27 +3699,27 @@ var __publicField = (obj, key, value) => {
|
|
|
3735
3699
|
});
|
|
3736
3700
|
})
|
|
3737
3701
|
);
|
|
3738
|
-
const
|
|
3702
|
+
const selectLatestFormRevisionsOfAssetTypes = restructureCreateSelectorWithArgs(
|
|
3739
3703
|
toolkit.createSelector(
|
|
3740
3704
|
[
|
|
3741
3705
|
(state) => state.formReducer.forms,
|
|
3742
3706
|
selectFormRevisionMapping,
|
|
3743
|
-
(_state,
|
|
3707
|
+
(_state, assetTypeIds) => assetTypeIds
|
|
3744
3708
|
],
|
|
3745
|
-
(userForms, revisions,
|
|
3746
|
-
const
|
|
3747
|
-
const
|
|
3709
|
+
(userForms, revisions, assetTypeIds) => {
|
|
3710
|
+
const assetTypeIdsSet = new Set(assetTypeIds);
|
|
3711
|
+
const formsOfAssetTypes = {};
|
|
3748
3712
|
const ret = {};
|
|
3749
3713
|
for (const form of Object.values(userForms)) {
|
|
3750
|
-
if (form.
|
|
3751
|
-
|
|
3714
|
+
if (form.asset_type && assetTypeIdsSet.has(form.asset_type)) {
|
|
3715
|
+
formsOfAssetTypes[form.offline_id] = form;
|
|
3752
3716
|
}
|
|
3753
3717
|
}
|
|
3754
3718
|
for (const revision of Object.values(revisions)) {
|
|
3755
|
-
const form =
|
|
3756
|
-
if (!form || !form.
|
|
3719
|
+
const form = formsOfAssetTypes[revision.form];
|
|
3720
|
+
if (!form || !form.asset_type || ret[form.asset_type] && formRevisionSortFn(ret[form.asset_type], revision) > 0)
|
|
3757
3721
|
continue;
|
|
3758
|
-
ret[form.
|
|
3722
|
+
ret[form.asset_type] = revision;
|
|
3759
3723
|
}
|
|
3760
3724
|
return ret;
|
|
3761
3725
|
}
|
|
@@ -3872,11 +3836,11 @@ var __publicField = (obj, key, value) => {
|
|
|
3872
3836
|
const selectFormMapping = (state) => {
|
|
3873
3837
|
return state.formReducer.forms;
|
|
3874
3838
|
};
|
|
3875
|
-
const
|
|
3839
|
+
const selectFormOfAssetType = restructureCreateSelectorWithArgs(
|
|
3876
3840
|
toolkit.createSelector(
|
|
3877
|
-
[selectFormMapping, (_state,
|
|
3878
|
-
(userForms,
|
|
3879
|
-
return Object.values(userForms).find((userForm) => userForm.
|
|
3841
|
+
[selectFormMapping, (_state, assetTypeId) => assetTypeId],
|
|
3842
|
+
(userForms, assetTypeId) => {
|
|
3843
|
+
return Object.values(userForms).find((userForm) => userForm.asset_type === assetTypeId);
|
|
3880
3844
|
}
|
|
3881
3845
|
)
|
|
3882
3846
|
);
|
|
@@ -3892,7 +3856,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3892
3856
|
return Object.keys(userForms).length;
|
|
3893
3857
|
});
|
|
3894
3858
|
const selectGeneralFormCount = toolkit.createSelector([selectFormMapping], (userForms) => {
|
|
3895
|
-
return Object.values(userForms).filter((form) => !form.
|
|
3859
|
+
return Object.values(userForms).filter((form) => !form.asset_type).length;
|
|
3896
3860
|
});
|
|
3897
3861
|
const formReducer = formSlice.reducer;
|
|
3898
3862
|
const initialState$5 = {
|
|
@@ -4100,31 +4064,31 @@ var __publicField = (obj, key, value) => {
|
|
|
4100
4064
|
}
|
|
4101
4065
|
)
|
|
4102
4066
|
);
|
|
4103
|
-
const
|
|
4067
|
+
const selectFormSubmissionsOfAsset = restructureCreateSelectorWithArgs(
|
|
4104
4068
|
toolkit.createSelector(
|
|
4105
|
-
[selectFormSubmissions, (_state,
|
|
4106
|
-
(submissions,
|
|
4069
|
+
[selectFormSubmissions, (_state, assetId) => assetId],
|
|
4070
|
+
(submissions, assetId) => {
|
|
4107
4071
|
return submissions.filter((submission) => {
|
|
4108
|
-
return submission.
|
|
4072
|
+
return submission.asset === assetId;
|
|
4109
4073
|
});
|
|
4110
4074
|
}
|
|
4111
4075
|
)
|
|
4112
4076
|
);
|
|
4113
|
-
const
|
|
4114
|
-
[selectFormSubmissionsMapping,
|
|
4115
|
-
(submissions,
|
|
4077
|
+
const selectFormSubmissionsByAssets = toolkit.createSelector(
|
|
4078
|
+
[selectFormSubmissionsMapping, selectAssetsMapping],
|
|
4079
|
+
(submissions, assets) => {
|
|
4116
4080
|
var _a2;
|
|
4117
|
-
const
|
|
4118
|
-
for (const
|
|
4119
|
-
|
|
4081
|
+
const assetSubmissionMapping = {};
|
|
4082
|
+
for (const assetId in assets) {
|
|
4083
|
+
assetSubmissionMapping[assetId] = [];
|
|
4120
4084
|
}
|
|
4121
4085
|
for (const submissionId in submissions) {
|
|
4122
4086
|
const submission = submissions[submissionId];
|
|
4123
|
-
if (submission.
|
|
4124
|
-
(_a2 =
|
|
4087
|
+
if (submission.asset) {
|
|
4088
|
+
(_a2 = assetSubmissionMapping[submission.asset]) == null ? void 0 : _a2.push(submission);
|
|
4125
4089
|
}
|
|
4126
4090
|
}
|
|
4127
|
-
return
|
|
4091
|
+
return assetSubmissionMapping;
|
|
4128
4092
|
}
|
|
4129
4093
|
);
|
|
4130
4094
|
const selectFormSubmissionAttachmentsMapping = (state) => {
|
|
@@ -4523,7 +4487,7 @@ var __publicField = (obj, key, value) => {
|
|
|
4523
4487
|
reducers: {}
|
|
4524
4488
|
});
|
|
4525
4489
|
const versioningReducer = versioningSlice.reducer;
|
|
4526
|
-
const
|
|
4490
|
+
const fullAssetMarkerSize = 45;
|
|
4527
4491
|
const DEFAULT_ISSUE_STATUS = IssueStatus.BACKLOG;
|
|
4528
4492
|
const DEFAULT_ISSUE_PRIORITY = IssuePriority.MEDIUM;
|
|
4529
4493
|
const OUTBOX_RETRY_DELAY = 5e3;
|
|
@@ -4541,10 +4505,10 @@ var __publicField = (obj, key, value) => {
|
|
|
4541
4505
|
fileReducer,
|
|
4542
4506
|
authReducer,
|
|
4543
4507
|
categoryReducer,
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4508
|
+
assetReducer,
|
|
4509
|
+
assetStageCompletionReducer,
|
|
4510
|
+
assetStageReducer,
|
|
4511
|
+
assetTypeReducer,
|
|
4548
4512
|
issueReducer,
|
|
4549
4513
|
issueTypeReducer,
|
|
4550
4514
|
mapReducer,
|
|
@@ -5386,110 +5350,108 @@ var __publicField = (obj, key, value) => {
|
|
|
5386
5350
|
store.dispatch(setCategories(result));
|
|
5387
5351
|
}
|
|
5388
5352
|
}
|
|
5389
|
-
class
|
|
5353
|
+
class AssetService extends BaseApiService {
|
|
5390
5354
|
// Basic CRUD functions
|
|
5391
|
-
add(
|
|
5392
|
-
const
|
|
5393
|
-
this.client.store.dispatch(
|
|
5355
|
+
add(asset, workspaceId) {
|
|
5356
|
+
const offlineAsset = offline(asset);
|
|
5357
|
+
this.client.store.dispatch(addAsset(offlineAsset));
|
|
5394
5358
|
const promise = this.client.enqueueRequest({
|
|
5395
|
-
description: "Create
|
|
5359
|
+
description: "Create asset",
|
|
5396
5360
|
method: HttpMethod.POST,
|
|
5397
|
-
url: `/
|
|
5361
|
+
url: `/assets/types/${offlineAsset.asset_type}/add-assets/`,
|
|
5398
5362
|
queryParams: {
|
|
5399
5363
|
workspace_id: workspaceId.toString()
|
|
5400
5364
|
},
|
|
5401
|
-
payload: {
|
|
5365
|
+
payload: { assets: [offlineAsset] },
|
|
5402
5366
|
blockers: [],
|
|
5403
|
-
blocks: [
|
|
5367
|
+
blocks: [offlineAsset.offline_id]
|
|
5404
5368
|
});
|
|
5405
|
-
return [
|
|
5369
|
+
return [offlineAsset, promise];
|
|
5406
5370
|
}
|
|
5407
|
-
update(
|
|
5408
|
-
this.client.store.dispatch(
|
|
5371
|
+
update(asset, workspaceId) {
|
|
5372
|
+
this.client.store.dispatch(updateAsset(asset));
|
|
5409
5373
|
const promise = this.client.enqueueRequest({
|
|
5410
|
-
description: "Edit
|
|
5374
|
+
description: "Edit asset",
|
|
5411
5375
|
method: HttpMethod.PATCH,
|
|
5412
|
-
url: `/
|
|
5376
|
+
url: `/assets/${asset.offline_id}/`,
|
|
5413
5377
|
queryParams: {
|
|
5414
5378
|
workspace_id: workspaceId.toString()
|
|
5415
5379
|
},
|
|
5416
|
-
payload:
|
|
5417
|
-
blockers: [
|
|
5418
|
-
blocks: [
|
|
5380
|
+
payload: asset,
|
|
5381
|
+
blockers: [asset.offline_id],
|
|
5382
|
+
blocks: [asset.offline_id]
|
|
5419
5383
|
});
|
|
5420
|
-
return [
|
|
5384
|
+
return [asset, promise];
|
|
5421
5385
|
}
|
|
5422
|
-
async remove(
|
|
5386
|
+
async remove(assetId) {
|
|
5423
5387
|
const { store } = this.client;
|
|
5424
|
-
const
|
|
5425
|
-
if (!
|
|
5426
|
-
throw new Error(`No
|
|
5427
|
-
const
|
|
5428
|
-
store.dispatch(
|
|
5429
|
-
if (
|
|
5430
|
-
const
|
|
5431
|
-
store.dispatch(
|
|
5388
|
+
const assetToBeDeleted = selectAsset(assetId)(store.getState());
|
|
5389
|
+
if (!assetToBeDeleted)
|
|
5390
|
+
throw new Error(`No asset with id ${assetId} found in the store`);
|
|
5391
|
+
const attachmentsOfAssets = selectAttachmentsOfAsset(assetId)(store.getState());
|
|
5392
|
+
store.dispatch(removeAsset(assetId));
|
|
5393
|
+
if (attachmentsOfAssets.length > 0) {
|
|
5394
|
+
const attachmentsOfAssetIds = attachmentsOfAssets.map(({ offline_id }) => offline_id);
|
|
5395
|
+
store.dispatch(removeAssetAttachments(attachmentsOfAssetIds));
|
|
5432
5396
|
}
|
|
5433
5397
|
return this.client.enqueueRequest({
|
|
5434
|
-
description: "Delete
|
|
5398
|
+
description: "Delete asset",
|
|
5435
5399
|
method: HttpMethod.DELETE,
|
|
5436
|
-
url: `/
|
|
5437
|
-
blockers: [
|
|
5400
|
+
url: `/assets/${assetId}/`,
|
|
5401
|
+
blockers: [assetId],
|
|
5438
5402
|
blocks: []
|
|
5439
5403
|
}).catch((err) => {
|
|
5440
|
-
store.dispatch(
|
|
5441
|
-
store.dispatch(
|
|
5404
|
+
store.dispatch(addAsset(assetToBeDeleted));
|
|
5405
|
+
store.dispatch(addAssetAttachments(attachmentsOfAssets));
|
|
5442
5406
|
throw err;
|
|
5443
5407
|
});
|
|
5444
5408
|
}
|
|
5445
|
-
async
|
|
5446
|
-
const clientStore2 = this.client.store;
|
|
5447
|
-
const allComponentsOfType = selectComponentsFromComponentType(componentTypeId)(clientStore2.getState());
|
|
5448
|
-
const affectedComponentIds = (allComponentsOfType || []).map((c) => c.offline_id);
|
|
5449
|
-
const affectedOfflineIds = [componentTypeId, ...affectedComponentIds];
|
|
5409
|
+
async deleteAllAssetsOfAssetType(assetTypeId) {
|
|
5450
5410
|
const { store } = this.client;
|
|
5451
5411
|
const state = store.getState();
|
|
5452
|
-
const
|
|
5453
|
-
|
|
5412
|
+
const allAssetsOfAssetType = selectAssetsOfAssetType(assetTypeId)(state);
|
|
5413
|
+
const allAssetsOfAssetTypeIds = (allAssetsOfAssetType || []).map((c) => c.offline_id);
|
|
5414
|
+
const affectedOfflineIds = [assetTypeId, ...allAssetsOfAssetTypeIds];
|
|
5415
|
+
store.dispatch(removeAllAssetsOfType(assetTypeId));
|
|
5454
5416
|
return this.client.enqueueRequest({
|
|
5455
|
-
description: "
|
|
5417
|
+
description: "Delete all assets of asset type",
|
|
5456
5418
|
method: HttpMethod.DELETE,
|
|
5457
|
-
url: `/
|
|
5419
|
+
url: `/assets/types/${assetTypeId}/delete-all-of-type/`,
|
|
5458
5420
|
blockers: affectedOfflineIds,
|
|
5459
5421
|
blocks: affectedOfflineIds
|
|
5460
5422
|
}).catch((err) => {
|
|
5461
|
-
if (
|
|
5462
|
-
store.dispatch(
|
|
5423
|
+
if (allAssetsOfAssetType) {
|
|
5424
|
+
store.dispatch(addAssetsInBatches(allAssetsOfAssetType));
|
|
5463
5425
|
}
|
|
5464
5426
|
throw err;
|
|
5465
5427
|
});
|
|
5466
5428
|
}
|
|
5467
|
-
async addBatch(
|
|
5468
|
-
const
|
|
5469
|
-
return { ...offline(
|
|
5429
|
+
async addBatch(assetsToCreate, workspaceId, assetTypeId) {
|
|
5430
|
+
const fullAssets = assetsToCreate.map((asset) => {
|
|
5431
|
+
return { ...offline(asset), submitted_at: (/* @__PURE__ */ new Date()).toISOString() };
|
|
5470
5432
|
});
|
|
5471
5433
|
const { store } = this.client;
|
|
5472
|
-
store.dispatch(
|
|
5434
|
+
store.dispatch(addAssetsInBatches(fullAssets));
|
|
5473
5435
|
const promise = this.client.enqueueRequest({
|
|
5474
|
-
description: "Batch create
|
|
5436
|
+
description: "Batch create assets",
|
|
5475
5437
|
method: HttpMethod.POST,
|
|
5476
|
-
url: `/
|
|
5438
|
+
url: `/assets/types/${assetTypeId}/add-assets/`,
|
|
5477
5439
|
queryParams: {
|
|
5478
5440
|
workspace_id: workspaceId.toString()
|
|
5479
5441
|
},
|
|
5480
5442
|
payload: {
|
|
5481
|
-
|
|
5443
|
+
assets: fullAssets
|
|
5482
5444
|
},
|
|
5483
|
-
blockers: [
|
|
5484
|
-
blocks:
|
|
5445
|
+
blockers: [assetTypeId],
|
|
5446
|
+
blocks: fullAssets.map((c) => c.offline_id)
|
|
5485
5447
|
});
|
|
5486
5448
|
void promise.then((result) => {
|
|
5487
|
-
for (const
|
|
5488
|
-
store.dispatch(
|
|
5449
|
+
for (const assets of Object.values(result)) {
|
|
5450
|
+
store.dispatch(updateAsset(assets));
|
|
5489
5451
|
}
|
|
5490
5452
|
}).catch((e) => {
|
|
5491
|
-
for (const
|
|
5492
|
-
store.dispatch(
|
|
5453
|
+
for (const asset of fullAssets) {
|
|
5454
|
+
store.dispatch(removeAsset(asset.offline_id));
|
|
5493
5455
|
}
|
|
5494
5456
|
throw e;
|
|
5495
5457
|
});
|
|
@@ -5498,128 +5460,124 @@ var __publicField = (obj, key, value) => {
|
|
|
5498
5460
|
async refreshStore() {
|
|
5499
5461
|
const { store } = this.client;
|
|
5500
5462
|
const result = await this.client.enqueueRequest({
|
|
5501
|
-
description: "Get
|
|
5463
|
+
description: "Get assets",
|
|
5502
5464
|
method: HttpMethod.GET,
|
|
5503
|
-
url: `/projects/${store.getState().projectReducer.activeProjectId}/
|
|
5465
|
+
url: `/projects/${store.getState().projectReducer.activeProjectId}/assets/`,
|
|
5504
5466
|
blockers: [],
|
|
5505
5467
|
blocks: []
|
|
5506
5468
|
});
|
|
5507
|
-
store.dispatch(
|
|
5469
|
+
store.dispatch(setAssets(result));
|
|
5508
5470
|
}
|
|
5509
5471
|
}
|
|
5510
|
-
class
|
|
5511
|
-
add(
|
|
5472
|
+
class AssetStageCompletionService extends BaseApiService {
|
|
5473
|
+
add(assetId, stageId) {
|
|
5512
5474
|
var _a2;
|
|
5513
5475
|
const { store } = this.client;
|
|
5514
|
-
const
|
|
5515
|
-
if (!
|
|
5516
|
-
throw new Error(`
|
|
5476
|
+
const assetTypeId = (_a2 = store.getState().assetReducer.assets[assetId]) == null ? void 0 : _a2.asset_type;
|
|
5477
|
+
if (!assetTypeId) {
|
|
5478
|
+
throw new Error(`Asset with offline_id ${assetId} not found`);
|
|
5517
5479
|
}
|
|
5518
|
-
const
|
|
5519
|
-
|
|
5480
|
+
const offlineStageCompletion = offline({
|
|
5481
|
+
asset: assetId,
|
|
5520
5482
|
stage: stageId
|
|
5521
5483
|
});
|
|
5522
|
-
store.dispatch(addStageCompletion(
|
|
5484
|
+
store.dispatch(addStageCompletion(offlineStageCompletion));
|
|
5523
5485
|
const promise = this.client.enqueueRequest({
|
|
5524
|
-
description: "
|
|
5486
|
+
description: "Complete stage",
|
|
5525
5487
|
method: HttpMethod.POST,
|
|
5526
|
-
url: `/
|
|
5488
|
+
url: `/assets/types/${assetTypeId}/complete-stages/`,
|
|
5527
5489
|
// TODO: Add submitted_at to model
|
|
5528
|
-
payload: { completions: [{ ...
|
|
5529
|
-
blockers: [
|
|
5530
|
-
blocks: [
|
|
5490
|
+
payload: { completions: [{ ...offlineStageCompletion, submitted_at: (/* @__PURE__ */ new Date()).getTime() / 1e3 }] },
|
|
5491
|
+
blockers: [assetId, stageId],
|
|
5492
|
+
blocks: [offlineStageCompletion.offline_id]
|
|
5531
5493
|
});
|
|
5532
|
-
return [
|
|
5494
|
+
return [offlineStageCompletion, promise];
|
|
5533
5495
|
}
|
|
5534
5496
|
async refreshStore() {
|
|
5535
5497
|
const { store } = this.client;
|
|
5536
5498
|
const result = await this.client.enqueueRequest({
|
|
5537
|
-
description: "Get
|
|
5499
|
+
description: "Get stage completions",
|
|
5538
5500
|
method: HttpMethod.GET,
|
|
5539
|
-
url: `/projects/${store.getState().projectReducer.activeProjectId}/
|
|
5501
|
+
url: `/projects/${store.getState().projectReducer.activeProjectId}/asset-stage-completions/`,
|
|
5540
5502
|
blockers: [],
|
|
5541
5503
|
blocks: []
|
|
5542
5504
|
});
|
|
5543
5505
|
store.dispatch(addStageCompletions(result));
|
|
5544
5506
|
}
|
|
5545
5507
|
/**
|
|
5546
|
-
* Creates a collection of
|
|
5547
|
-
*
|
|
5548
|
-
* @param
|
|
5549
|
-
* stages for one
|
|
5508
|
+
* Creates a collection of AssetStageCompletions, marking the referenced stages as completed for the referenced
|
|
5509
|
+
* assets. It's REQUIRED that all assets referenced all have the SAME asset type.
|
|
5510
|
+
* @param assetTypeId The ID of the asset type for which we are completing stages (we can only complete
|
|
5511
|
+
* stages for one asset type at a time)
|
|
5550
5512
|
* @param stageCompletions
|
|
5551
5513
|
*/
|
|
5552
|
-
async bulkAdd(
|
|
5553
|
-
const
|
|
5514
|
+
async bulkAdd(assetTypeId, stageCompletions) {
|
|
5515
|
+
const offlineStageCompletions = stageCompletions.map((completion) => {
|
|
5554
5516
|
return offline(completion);
|
|
5555
5517
|
});
|
|
5556
5518
|
const asMapping = {};
|
|
5557
5519
|
for (const completion of stageCompletions) {
|
|
5558
|
-
const stageToCompletionDateMapping = asMapping[completion.
|
|
5520
|
+
const stageToCompletionDateMapping = asMapping[completion.asset] || {};
|
|
5559
5521
|
stageToCompletionDateMapping[completion.stage] = (/* @__PURE__ */ new Date()).toISOString();
|
|
5560
|
-
asMapping[completion.
|
|
5522
|
+
asMapping[completion.asset] = stageToCompletionDateMapping;
|
|
5561
5523
|
}
|
|
5562
5524
|
this.client.store.dispatch(addStageCompletions(asMapping));
|
|
5563
5525
|
await this.client.enqueueRequest({
|
|
5564
|
-
description: "
|
|
5526
|
+
description: "Bulk complete stages",
|
|
5565
5527
|
method: HttpMethod.POST,
|
|
5566
|
-
url: `/
|
|
5528
|
+
url: `/assets/types/${assetTypeId}/complete-stages/`,
|
|
5567
5529
|
payload: {
|
|
5568
|
-
completions:
|
|
5530
|
+
completions: offlineStageCompletions
|
|
5569
5531
|
},
|
|
5570
|
-
blockers: [
|
|
5571
|
-
|
|
5572
|
-
...stageCompletions.map((c) => c.component),
|
|
5573
|
-
...stageCompletions.map((c) => c.stage)
|
|
5574
|
-
],
|
|
5575
|
-
blocks: offlineStagesCompletions.map((c) => c.offline_id)
|
|
5532
|
+
blockers: [assetTypeId, ...stageCompletions.map((c) => c.asset), ...stageCompletions.map((c) => c.stage)],
|
|
5533
|
+
blocks: offlineStageCompletions.map((c) => c.offline_id)
|
|
5576
5534
|
});
|
|
5577
5535
|
}
|
|
5578
|
-
bulkDelete(stageId,
|
|
5579
|
-
const
|
|
5536
|
+
bulkDelete(stageId, assetIds) {
|
|
5537
|
+
const stageCompletionsToRemove = assetIds.map((assetId) => {
|
|
5580
5538
|
return {
|
|
5581
|
-
|
|
5539
|
+
asset: assetId,
|
|
5582
5540
|
stage: stageId
|
|
5583
5541
|
};
|
|
5584
5542
|
});
|
|
5585
|
-
this.client.store.dispatch(removeStageCompletions(
|
|
5543
|
+
this.client.store.dispatch(removeStageCompletions(stageCompletionsToRemove));
|
|
5586
5544
|
return this.client.enqueueRequest({
|
|
5587
|
-
description: `Undo stage for ${
|
|
5545
|
+
description: `Undo stage for ${assetIds.length} assets(s)`,
|
|
5588
5546
|
// TODO: Rename to setCompletedStages
|
|
5589
5547
|
method: HttpMethod.DELETE,
|
|
5590
|
-
url: `/
|
|
5548
|
+
url: `/assets/stages/${stageId}/undo-stages/`,
|
|
5591
5549
|
payload: {
|
|
5592
|
-
|
|
5550
|
+
assets: assetIds
|
|
5593
5551
|
},
|
|
5594
|
-
blockers: [stageId, ...
|
|
5552
|
+
blockers: [stageId, ...assetIds],
|
|
5595
5553
|
blocks: []
|
|
5596
5554
|
});
|
|
5597
5555
|
}
|
|
5598
5556
|
}
|
|
5599
|
-
class
|
|
5600
|
-
async bulkCreateStages(stagesToSubmit,
|
|
5557
|
+
class AssetStageService extends BaseApiService {
|
|
5558
|
+
async bulkCreateStages(stagesToSubmit, assetTypeId, workspaceId) {
|
|
5601
5559
|
const payload = stagesToSubmit.map((stage) => {
|
|
5602
5560
|
return offline(stage);
|
|
5603
5561
|
});
|
|
5604
5562
|
const fullStages = payload.map((stage) => {
|
|
5605
|
-
return { ...stage,
|
|
5563
|
+
return { ...stage, asset_type: assetTypeId };
|
|
5606
5564
|
});
|
|
5607
5565
|
this.client.store.dispatch(addStages(fullStages));
|
|
5608
5566
|
return this.client.enqueueRequest({
|
|
5609
|
-
description: "Add
|
|
5567
|
+
description: "Add asset stages",
|
|
5610
5568
|
method: HttpMethod.POST,
|
|
5611
|
-
url: `/
|
|
5569
|
+
url: `/assets/types/${assetTypeId}/add-stages/`,
|
|
5612
5570
|
payload: {
|
|
5613
5571
|
stages: payload
|
|
5614
5572
|
},
|
|
5615
5573
|
queryParams: {
|
|
5616
5574
|
workspace_id: workspaceId.toString()
|
|
5617
5575
|
},
|
|
5618
|
-
blockers: [
|
|
5576
|
+
blockers: [assetTypeId, workspaceId],
|
|
5619
5577
|
blocks: payload.map(({ offline_id }) => offline_id)
|
|
5620
5578
|
});
|
|
5621
5579
|
}
|
|
5622
|
-
async bulkUpdateStages(stagesToUpdate,
|
|
5580
|
+
async bulkUpdateStages(stagesToUpdate, assetTypeId) {
|
|
5623
5581
|
const store = this.client.store;
|
|
5624
5582
|
const state = store.getState();
|
|
5625
5583
|
const prevStages = selectStagesFromStageIds(
|
|
@@ -5630,13 +5588,13 @@ var __publicField = (obj, key, value) => {
|
|
|
5630
5588
|
}
|
|
5631
5589
|
store.dispatch(updateStages(stagesToUpdate));
|
|
5632
5590
|
return this.client.enqueueRequest({
|
|
5633
|
-
description: "Edit
|
|
5591
|
+
description: "Edit asset stages",
|
|
5634
5592
|
method: HttpMethod.PATCH,
|
|
5635
|
-
url: `/
|
|
5593
|
+
url: `/assets/types/${assetTypeId}/bulk-update-stages/`,
|
|
5636
5594
|
payload: {
|
|
5637
5595
|
stages: stagesToUpdate
|
|
5638
5596
|
},
|
|
5639
|
-
blockers: [
|
|
5597
|
+
blockers: [assetTypeId],
|
|
5640
5598
|
blocks: stagesToUpdate.map(({ offline_id }) => offline_id)
|
|
5641
5599
|
}).catch((e) => {
|
|
5642
5600
|
store.dispatch(updateStages(prevStages));
|
|
@@ -5646,9 +5604,9 @@ var __publicField = (obj, key, value) => {
|
|
|
5646
5604
|
async bulkDelete(idsToDelete) {
|
|
5647
5605
|
this.client.store.dispatch(removeStages(idsToDelete));
|
|
5648
5606
|
return this.client.enqueueRequest({
|
|
5649
|
-
description: "Delete
|
|
5607
|
+
description: "Delete asset stages",
|
|
5650
5608
|
method: HttpMethod.DELETE,
|
|
5651
|
-
url: "/
|
|
5609
|
+
url: "/assets/stages/bulk-delete/",
|
|
5652
5610
|
payload: {
|
|
5653
5611
|
stage_ids: idsToDelete
|
|
5654
5612
|
},
|
|
@@ -5656,15 +5614,15 @@ var __publicField = (obj, key, value) => {
|
|
|
5656
5614
|
blocks: []
|
|
5657
5615
|
});
|
|
5658
5616
|
}
|
|
5659
|
-
async update(
|
|
5660
|
-
this.client.store.dispatch(addStages([
|
|
5617
|
+
async update(assetStage) {
|
|
5618
|
+
this.client.store.dispatch(addStages([assetStage]));
|
|
5661
5619
|
return this.client.enqueueRequest({
|
|
5662
|
-
description: "Update
|
|
5620
|
+
description: "Update asset stage",
|
|
5663
5621
|
method: HttpMethod.PATCH,
|
|
5664
|
-
url: `/
|
|
5665
|
-
payload:
|
|
5666
|
-
blockers: [
|
|
5667
|
-
blocks: [
|
|
5622
|
+
url: `/assets/stages/${assetStage.offline_id}/`,
|
|
5623
|
+
payload: assetStage,
|
|
5624
|
+
blockers: [assetStage.offline_id],
|
|
5625
|
+
blocks: [assetStage.offline_id]
|
|
5668
5626
|
});
|
|
5669
5627
|
}
|
|
5670
5628
|
async linkForm(stageId, formId2) {
|
|
@@ -5672,9 +5630,9 @@ var __publicField = (obj, key, value) => {
|
|
|
5672
5630
|
store.dispatch(linkStageToForm({ stageId, formId: formId2 }));
|
|
5673
5631
|
try {
|
|
5674
5632
|
await this.client.enqueueRequest({
|
|
5675
|
-
description: "Link
|
|
5633
|
+
description: "Link asset stage to form",
|
|
5676
5634
|
method: HttpMethod.POST,
|
|
5677
|
-
url: `/
|
|
5635
|
+
url: `/assets/stages/${stageId}/associate-with-form/`,
|
|
5678
5636
|
payload: { user_form: formId2 },
|
|
5679
5637
|
blockers: [stageId, formId2],
|
|
5680
5638
|
blocks: [stageId]
|
|
@@ -5689,9 +5647,9 @@ var __publicField = (obj, key, value) => {
|
|
|
5689
5647
|
store.dispatch(unlinkStageToForm({ stageId }));
|
|
5690
5648
|
try {
|
|
5691
5649
|
await this.client.enqueueRequest({
|
|
5692
|
-
description: "Unlink
|
|
5650
|
+
description: "Unlink asset stage from form",
|
|
5693
5651
|
method: HttpMethod.DELETE,
|
|
5694
|
-
url: `/
|
|
5652
|
+
url: `/assets/stages/${stageId}/associate-with-form/`,
|
|
5695
5653
|
blockers: [stageId, formId2],
|
|
5696
5654
|
blocks: [stageId]
|
|
5697
5655
|
});
|
|
@@ -5703,9 +5661,9 @@ var __publicField = (obj, key, value) => {
|
|
|
5703
5661
|
async refreshStore() {
|
|
5704
5662
|
const { store } = this.client;
|
|
5705
5663
|
const result = await this.client.enqueueRequest({
|
|
5706
|
-
description: "Get
|
|
5664
|
+
description: "Get asset stages",
|
|
5707
5665
|
method: HttpMethod.GET,
|
|
5708
|
-
url: `/projects/${store.getState().projectReducer.activeProjectId}/
|
|
5666
|
+
url: `/projects/${store.getState().projectReducer.activeProjectId}/asset-stages/`,
|
|
5709
5667
|
blockers: [],
|
|
5710
5668
|
blocks: []
|
|
5711
5669
|
});
|
|
@@ -5719,20 +5677,20 @@ var __publicField = (obj, key, value) => {
|
|
|
5719
5677
|
deleteUrlPrefix: "/issues",
|
|
5720
5678
|
fetchUrlPostfix: "/issue-attachments"
|
|
5721
5679
|
},
|
|
5722
|
-
[AttachmentModel.
|
|
5723
|
-
name: "
|
|
5724
|
-
attachUrlPrefix: "/
|
|
5725
|
-
deleteUrlPrefix: "/
|
|
5726
|
-
fetchUrlPostfix: "/
|
|
5680
|
+
[AttachmentModel.Asset]: {
|
|
5681
|
+
name: "asset",
|
|
5682
|
+
attachUrlPrefix: "/assets",
|
|
5683
|
+
deleteUrlPrefix: "/assets",
|
|
5684
|
+
fetchUrlPostfix: "/asset-attachments"
|
|
5727
5685
|
},
|
|
5728
|
-
[AttachmentModel.
|
|
5729
|
-
name: "
|
|
5730
|
-
attachUrlPrefix: "/
|
|
5731
|
-
deleteUrlPrefix: "/
|
|
5732
|
-
fetchUrlPostfix: "/
|
|
5686
|
+
[AttachmentModel.AssetType]: {
|
|
5687
|
+
name: "asset type",
|
|
5688
|
+
attachUrlPrefix: "/assets/types",
|
|
5689
|
+
deleteUrlPrefix: "/assets/types",
|
|
5690
|
+
fetchUrlPostfix: "/asset-type-attachments"
|
|
5733
5691
|
},
|
|
5734
5692
|
[AttachmentModel.Project]: {
|
|
5735
|
-
name: "
|
|
5693
|
+
name: "project",
|
|
5736
5694
|
attachUrlPrefix: "/projects",
|
|
5737
5695
|
deleteUrlPrefix: "/projects",
|
|
5738
5696
|
fetchUrlPostfix: "/attachments"
|
|
@@ -5748,8 +5706,8 @@ var __publicField = (obj, key, value) => {
|
|
|
5748
5706
|
getNumberOfAttachmentsWithSha1(sha1) {
|
|
5749
5707
|
const {
|
|
5750
5708
|
issueReducer: issueReducer2,
|
|
5751
|
-
|
|
5752
|
-
|
|
5709
|
+
assetReducer: assetReducer2,
|
|
5710
|
+
assetTypeReducer: assetTypeReducer2,
|
|
5753
5711
|
documentsReducer: documentsReducer2,
|
|
5754
5712
|
projectReducer: projectReducer2,
|
|
5755
5713
|
formSubmissionReducer: formSubmissionReducer2,
|
|
@@ -5757,8 +5715,8 @@ var __publicField = (obj, key, value) => {
|
|
|
5757
5715
|
} = this.client.store.getState();
|
|
5758
5716
|
const objectsWithSha1 = [].concat(
|
|
5759
5717
|
Object.values(issueReducer2.attachments),
|
|
5760
|
-
Object.values(
|
|
5761
|
-
Object.values(
|
|
5718
|
+
Object.values(assetReducer2.attachments),
|
|
5719
|
+
Object.values(assetTypeReducer2.attachments),
|
|
5762
5720
|
Object.values(documentsReducer2.attachments),
|
|
5763
5721
|
Object.values(projectReducer2.attachments),
|
|
5764
5722
|
Object.values(formRevisionReducer2.attachments),
|
|
@@ -5880,10 +5838,10 @@ var __publicField = (obj, key, value) => {
|
|
|
5880
5838
|
return promise;
|
|
5881
5839
|
}
|
|
5882
5840
|
}
|
|
5883
|
-
class
|
|
5841
|
+
class AssetAttachmentService extends BaseAttachmentService {
|
|
5884
5842
|
constructor() {
|
|
5885
5843
|
super(...arguments);
|
|
5886
|
-
__publicField(this, "attachmentModel", AttachmentModel.
|
|
5844
|
+
__publicField(this, "attachmentModel", AttachmentModel.Asset);
|
|
5887
5845
|
}
|
|
5888
5846
|
buildOfflineAttachment(data) {
|
|
5889
5847
|
return offline({
|
|
@@ -5894,115 +5852,108 @@ var __publicField = (obj, key, value) => {
|
|
|
5894
5852
|
file_type: data.file.type,
|
|
5895
5853
|
submitted_at: data.submittedAt,
|
|
5896
5854
|
description: data.description,
|
|
5897
|
-
|
|
5855
|
+
asset: data.modelId
|
|
5898
5856
|
});
|
|
5899
5857
|
}
|
|
5900
|
-
async
|
|
5901
|
-
return this.attachFiles(
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
addAttachments: addComponentAttachments,
|
|
5907
|
-
updateAttachments: updateComponentAttachments,
|
|
5908
|
-
removeAttachments: removeComponentAttachments
|
|
5909
|
-
}
|
|
5910
|
-
);
|
|
5858
|
+
async attachFilesToAsset(files, assetId) {
|
|
5859
|
+
return this.attachFiles(files, assetId, this.buildOfflineAttachment.bind(this), {
|
|
5860
|
+
addAttachments: addAssetAttachments,
|
|
5861
|
+
updateAttachments: updateAssetAttachments,
|
|
5862
|
+
removeAttachments: removeAssetAttachments
|
|
5863
|
+
});
|
|
5911
5864
|
}
|
|
5912
|
-
|
|
5865
|
+
deleteAssetAttachment(attachmentId) {
|
|
5913
5866
|
return this.deleteAttachment(
|
|
5914
5867
|
attachmentId,
|
|
5915
5868
|
{
|
|
5916
|
-
setAttachment:
|
|
5917
|
-
removeAttachment:
|
|
5869
|
+
setAttachment: setAssetAttachment,
|
|
5870
|
+
removeAttachment: removeAssetAttachment
|
|
5918
5871
|
},
|
|
5919
5872
|
{
|
|
5920
|
-
selectAttachment:
|
|
5873
|
+
selectAttachment: selectAssetAttachment
|
|
5921
5874
|
}
|
|
5922
5875
|
);
|
|
5923
5876
|
}
|
|
5924
5877
|
async refreshStore() {
|
|
5925
5878
|
return this.getAttachments({
|
|
5926
|
-
setAttachments:
|
|
5879
|
+
setAttachments: setAssetAttachments
|
|
5927
5880
|
});
|
|
5928
5881
|
}
|
|
5929
5882
|
}
|
|
5930
|
-
class
|
|
5931
|
-
add(
|
|
5932
|
-
const
|
|
5883
|
+
class AssetTypeService extends BaseApiService {
|
|
5884
|
+
add(assetType) {
|
|
5885
|
+
const offlineAssetType = offline(assetType);
|
|
5933
5886
|
const { store } = this.client;
|
|
5934
5887
|
const activeProjectId = store.getState().projectReducer.activeProjectId;
|
|
5935
|
-
store.dispatch(
|
|
5888
|
+
store.dispatch(addAssetType(offlineAssetType));
|
|
5936
5889
|
const promise = this.client.enqueueRequest({
|
|
5937
|
-
description: "Create
|
|
5890
|
+
description: "Create asset type",
|
|
5938
5891
|
method: HttpMethod.POST,
|
|
5939
|
-
url: `/projects/${activeProjectId}/
|
|
5940
|
-
payload: { ...
|
|
5892
|
+
url: `/projects/${activeProjectId}/asset-types/`,
|
|
5893
|
+
payload: { ...offlineAssetType },
|
|
5941
5894
|
blockers: [],
|
|
5942
|
-
blocks: [
|
|
5895
|
+
blocks: [offlineAssetType.offline_id]
|
|
5943
5896
|
});
|
|
5944
|
-
return [
|
|
5897
|
+
return [offlineAssetType, promise];
|
|
5945
5898
|
}
|
|
5946
|
-
update(
|
|
5947
|
-
this.client.store.dispatch(
|
|
5899
|
+
update(assetType) {
|
|
5900
|
+
this.client.store.dispatch(addAssetType(assetType));
|
|
5948
5901
|
return this.client.enqueueRequest({
|
|
5949
|
-
description: "Update
|
|
5902
|
+
description: "Update asset type",
|
|
5950
5903
|
method: HttpMethod.PATCH,
|
|
5951
|
-
url: `/
|
|
5952
|
-
payload:
|
|
5953
|
-
blockers: [
|
|
5954
|
-
blocks: [
|
|
5904
|
+
url: `/assets/types/${assetType.offline_id}/`,
|
|
5905
|
+
payload: assetType,
|
|
5906
|
+
blockers: [assetType.offline_id],
|
|
5907
|
+
blocks: [assetType.offline_id]
|
|
5955
5908
|
});
|
|
5956
5909
|
}
|
|
5957
|
-
async delete(
|
|
5910
|
+
async delete(assetTypeId) {
|
|
5958
5911
|
const { store } = this.client;
|
|
5959
5912
|
const state = store.getState();
|
|
5960
|
-
const
|
|
5961
|
-
if (!
|
|
5962
|
-
throw new Error(
|
|
5963
|
-
}
|
|
5964
|
-
const
|
|
5965
|
-
const
|
|
5966
|
-
store.dispatch(
|
|
5967
|
-
if (
|
|
5968
|
-
const
|
|
5969
|
-
|
|
5970
|
-
);
|
|
5971
|
-
store.dispatch(removeStages(stagesOfComponentTypeIds));
|
|
5913
|
+
const assetType = selectAssetType(assetTypeId)(state);
|
|
5914
|
+
if (!assetType) {
|
|
5915
|
+
throw new Error(`Expected asset type with offline_id ${assetTypeId} to exist`);
|
|
5916
|
+
}
|
|
5917
|
+
const stagesOfAssetType = selectStagesOfAssetType(assetTypeId)(state) ?? [];
|
|
5918
|
+
const attachmentsOfAssetType = selectAttachmentsOfAssetType(assetTypeId)(state);
|
|
5919
|
+
store.dispatch(deleteAssetType(assetTypeId));
|
|
5920
|
+
if (stagesOfAssetType.length > 0) {
|
|
5921
|
+
const stagesOfAssetTypeIds = stagesOfAssetType.map((assetStage) => assetStage.offline_id);
|
|
5922
|
+
store.dispatch(removeStages(stagesOfAssetTypeIds));
|
|
5972
5923
|
}
|
|
5973
|
-
if (
|
|
5974
|
-
const
|
|
5975
|
-
store.dispatch(
|
|
5924
|
+
if (attachmentsOfAssetType.length > 0) {
|
|
5925
|
+
const attachmentsOfAssetTypeIds = attachmentsOfAssetType.map(({ offline_id }) => offline_id);
|
|
5926
|
+
store.dispatch(removeAssetTypeAttachments(attachmentsOfAssetTypeIds));
|
|
5976
5927
|
}
|
|
5977
5928
|
return this.client.enqueueRequest({
|
|
5978
|
-
description: "Delete
|
|
5929
|
+
description: "Delete asset type",
|
|
5979
5930
|
method: HttpMethod.DELETE,
|
|
5980
|
-
url: `/
|
|
5981
|
-
blockers: [
|
|
5931
|
+
url: `/assets/types/${assetTypeId}/`,
|
|
5932
|
+
blockers: [assetTypeId],
|
|
5982
5933
|
blocks: []
|
|
5983
5934
|
}).catch((e) => {
|
|
5984
|
-
store.dispatch(
|
|
5985
|
-
store.dispatch(addStages(
|
|
5986
|
-
store.dispatch(
|
|
5935
|
+
store.dispatch(addAssetType(assetType));
|
|
5936
|
+
store.dispatch(addStages(stagesOfAssetType));
|
|
5937
|
+
store.dispatch(addAssetTypeAttachments(attachmentsOfAssetType));
|
|
5987
5938
|
throw e;
|
|
5988
5939
|
});
|
|
5989
5940
|
}
|
|
5990
5941
|
async refreshStore() {
|
|
5991
5942
|
const { store } = this.client;
|
|
5992
5943
|
const result = await this.client.enqueueRequest({
|
|
5993
|
-
description: "Get
|
|
5944
|
+
description: "Get asset types",
|
|
5994
5945
|
method: HttpMethod.GET,
|
|
5995
|
-
url: `/projects/${store.getState().projectReducer.activeProjectId}/
|
|
5946
|
+
url: `/projects/${store.getState().projectReducer.activeProjectId}/asset-types/`,
|
|
5996
5947
|
blockers: [],
|
|
5997
5948
|
blocks: []
|
|
5998
5949
|
});
|
|
5999
|
-
store.dispatch(
|
|
5950
|
+
store.dispatch(setAssetTypes(result));
|
|
6000
5951
|
}
|
|
6001
5952
|
}
|
|
6002
|
-
class
|
|
5953
|
+
class AssetTypeAttachmentService extends BaseAttachmentService {
|
|
6003
5954
|
constructor() {
|
|
6004
5955
|
super(...arguments);
|
|
6005
|
-
__publicField(this, "attachmentModel", AttachmentModel.
|
|
5956
|
+
__publicField(this, "attachmentModel", AttachmentModel.AssetType);
|
|
6006
5957
|
}
|
|
6007
5958
|
buildOfflineAttachment(data) {
|
|
6008
5959
|
return offline({
|
|
@@ -6013,36 +5964,36 @@ var __publicField = (obj, key, value) => {
|
|
|
6013
5964
|
file_type: data.file.type,
|
|
6014
5965
|
submitted_at: data.submittedAt,
|
|
6015
5966
|
description: data.description,
|
|
6016
|
-
|
|
5967
|
+
asset_type: data.modelId
|
|
6017
5968
|
});
|
|
6018
5969
|
}
|
|
6019
|
-
async
|
|
5970
|
+
async attachFilesToAssetType(files, assetTypeId) {
|
|
6020
5971
|
return this.attachFiles(
|
|
6021
5972
|
files,
|
|
6022
|
-
|
|
5973
|
+
assetTypeId,
|
|
6023
5974
|
this.buildOfflineAttachment.bind(this),
|
|
6024
5975
|
{
|
|
6025
|
-
addAttachments:
|
|
6026
|
-
updateAttachments:
|
|
6027
|
-
removeAttachments:
|
|
5976
|
+
addAttachments: addAssetTypeAttachments,
|
|
5977
|
+
updateAttachments: updateAssetTypeAttachments,
|
|
5978
|
+
removeAttachments: removeAssetTypeAttachments
|
|
6028
5979
|
}
|
|
6029
5980
|
);
|
|
6030
5981
|
}
|
|
6031
|
-
|
|
5982
|
+
deleteAssetTypeAttachment(attachmentId) {
|
|
6032
5983
|
return this.deleteAttachment(
|
|
6033
5984
|
attachmentId,
|
|
6034
5985
|
{
|
|
6035
|
-
setAttachment:
|
|
6036
|
-
removeAttachment:
|
|
5986
|
+
setAttachment: setAssetTypeAttachment,
|
|
5987
|
+
removeAttachment: removeAssetTypeAttachment
|
|
6037
5988
|
},
|
|
6038
5989
|
{
|
|
6039
|
-
selectAttachment:
|
|
5990
|
+
selectAttachment: selectAssetTypeAttachment
|
|
6040
5991
|
}
|
|
6041
5992
|
);
|
|
6042
5993
|
}
|
|
6043
5994
|
async refreshStore() {
|
|
6044
5995
|
return this.getAttachments({
|
|
6045
|
-
setAttachments:
|
|
5996
|
+
setAttachments: setAssetTypeAttachments
|
|
6046
5997
|
});
|
|
6047
5998
|
}
|
|
6048
5999
|
}
|
|
@@ -6540,8 +6491,8 @@ var __publicField = (obj, key, value) => {
|
|
|
6540
6491
|
});
|
|
6541
6492
|
}
|
|
6542
6493
|
// TODO:
|
|
6543
|
-
// Don't accept updateStore in
|
|
6544
|
-
// overwrite, use
|
|
6494
|
+
// Don't accept updateStore in AssetService.list. Just return the offline objects and promise. Here, if
|
|
6495
|
+
// overwrite, use setAssets. Otherwise, use bulkAddAssets.
|
|
6545
6496
|
// TODO: This needs major cleanup. Send less in the initial data: Only the basic project info and anything needed
|
|
6546
6497
|
// literally immediately.
|
|
6547
6498
|
async _processInitialData(data, overwrite) {
|
|
@@ -6646,10 +6597,10 @@ var __publicField = (obj, key, value) => {
|
|
|
6646
6597
|
} finally {
|
|
6647
6598
|
store.dispatch(setIsFetchingInitialData(false));
|
|
6648
6599
|
}
|
|
6649
|
-
void this.client.
|
|
6650
|
-
void this.client.
|
|
6651
|
-
void this.client.
|
|
6652
|
-
void this.client.
|
|
6600
|
+
void this.client.assetTypes.refreshStore();
|
|
6601
|
+
void this.client.assetStages.refreshStore();
|
|
6602
|
+
void this.client.assets.refreshStore();
|
|
6603
|
+
void this.client.assetStageCompletions.refreshStore();
|
|
6653
6604
|
void this.client.categories.refreshStore();
|
|
6654
6605
|
void this.client.issueTypes.refreshStore();
|
|
6655
6606
|
void this.client.issues.refreshStore();
|
|
@@ -6664,8 +6615,8 @@ var __publicField = (obj, key, value) => {
|
|
|
6664
6615
|
void this.client.issueUpdates.refreshStore();
|
|
6665
6616
|
void this.client.projectAccesses.refreshStore();
|
|
6666
6617
|
void this.client.projectAttachments.refreshStore();
|
|
6667
|
-
void this.client.
|
|
6668
|
-
void this.client.
|
|
6618
|
+
void this.client.assetTypeAttachments.refreshStore();
|
|
6619
|
+
void this.client.assetAttachments.refreshStore();
|
|
6669
6620
|
}
|
|
6670
6621
|
void this.client.teams.refreshStore();
|
|
6671
6622
|
}
|
|
@@ -7061,7 +7012,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7061
7012
|
});
|
|
7062
7013
|
});
|
|
7063
7014
|
}
|
|
7064
|
-
async add(state, initialRevision, url, ownerUser, ownerOrganization,
|
|
7015
|
+
async add(state, initialRevision, url, ownerUser, ownerOrganization, assetTypeId, issueTypeId) {
|
|
7065
7016
|
if (!!ownerUser === !!ownerOrganization) {
|
|
7066
7017
|
throw new Error("Exactly one of ownerUser and ownerOrganization must be defined.");
|
|
7067
7018
|
}
|
|
@@ -7080,7 +7031,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7080
7031
|
favorite: true,
|
|
7081
7032
|
submitted_at: submittedAt,
|
|
7082
7033
|
created_by: currentUser.id,
|
|
7083
|
-
...
|
|
7034
|
+
...assetTypeId && { asset_type: assetTypeId },
|
|
7084
7035
|
...issueTypeId && { issue_type: issueTypeId },
|
|
7085
7036
|
...ownerAttrs
|
|
7086
7037
|
};
|
|
@@ -7104,11 +7055,11 @@ var __publicField = (obj, key, value) => {
|
|
|
7104
7055
|
} : void 0,
|
|
7105
7056
|
payload: {
|
|
7106
7057
|
...offlineFormPayload,
|
|
7107
|
-
...
|
|
7058
|
+
...assetTypeId && { asset_type: assetTypeId },
|
|
7108
7059
|
...issueTypeId && { issue_type: issueTypeId },
|
|
7109
7060
|
initial_revision: payloadWithoutImage
|
|
7110
7061
|
},
|
|
7111
|
-
blockers:
|
|
7062
|
+
blockers: assetTypeId ? [assetTypeId] : issueTypeId ? [issueTypeId] : [],
|
|
7112
7063
|
blocks: [offlineFormPayload.offline_id, payloadWithoutImage.offline_id]
|
|
7113
7064
|
});
|
|
7114
7065
|
const attachImagesPromises = this.getAttachImagePromises(images, offlineRevisionPayload.offline_id);
|
|
@@ -7132,7 +7083,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7132
7083
|
`/forms/in-organization/${activeOrganizationId}/`,
|
|
7133
7084
|
void 0,
|
|
7134
7085
|
activeOrganizationId,
|
|
7135
|
-
attachedTo && "
|
|
7086
|
+
attachedTo && "assetTypeId" in attachedTo ? attachedTo.assetTypeId : void 0,
|
|
7136
7087
|
attachedTo && "issueTypeId" in attachedTo ? attachedTo.issueTypeId : void 0
|
|
7137
7088
|
);
|
|
7138
7089
|
}
|
|
@@ -7145,7 +7096,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7145
7096
|
"/forms/my-forms/",
|
|
7146
7097
|
currentUser.id,
|
|
7147
7098
|
void 0,
|
|
7148
|
-
attachedTo && "
|
|
7099
|
+
attachedTo && "assetTypeId" in attachedTo ? attachedTo.assetTypeId : void 0,
|
|
7149
7100
|
attachedTo && "issueTypeId" in attachedTo ? attachedTo.issueTypeId : void 0
|
|
7150
7101
|
);
|
|
7151
7102
|
}
|
|
@@ -7313,8 +7264,8 @@ var __publicField = (obj, key, value) => {
|
|
|
7313
7264
|
url: `/forms/submission/${submission.offline_id}/attachments/`,
|
|
7314
7265
|
payload: submissionAttachmentPayload,
|
|
7315
7266
|
blockers: [
|
|
7316
|
-
submission.
|
|
7317
|
-
submission.
|
|
7267
|
+
submission.asset,
|
|
7268
|
+
submission.asset_stage,
|
|
7318
7269
|
submission.issue,
|
|
7319
7270
|
submission.form_revision
|
|
7320
7271
|
].filter((x) => x !== void 0),
|
|
@@ -7350,7 +7301,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7350
7301
|
method: HttpMethod.POST,
|
|
7351
7302
|
url: `/forms/revisions/${payload.form_revision}/respond/`,
|
|
7352
7303
|
payload: { ...offlineSubmission, project: activeProjectId },
|
|
7353
|
-
blockers: [payload.issue, payload.
|
|
7304
|
+
blockers: [payload.issue, payload.asset, payload.asset_stage, "add-form-entry"].filter(
|
|
7354
7305
|
(x) => x !== void 0
|
|
7355
7306
|
),
|
|
7356
7307
|
blocks: [payload.offline_id]
|
|
@@ -7368,10 +7319,10 @@ var __publicField = (obj, key, value) => {
|
|
|
7368
7319
|
const settledPromise = Promise.all([promise, ...attachFilesPromises]).then(() => promise);
|
|
7369
7320
|
return [offlineSubmission, settledPromise];
|
|
7370
7321
|
}
|
|
7371
|
-
// Note currently the bulkAdd method is specific to form submissions for
|
|
7322
|
+
// Note currently the bulkAdd method is specific to form submissions for assets
|
|
7372
7323
|
// TODO: adapt the support bulk adding to any model type
|
|
7373
7324
|
async bulkAdd(args) {
|
|
7374
|
-
const { formRevision, values: argsValues,
|
|
7325
|
+
const { formRevision, values: argsValues, assetOfflineIds } = args;
|
|
7375
7326
|
const { store } = this.client;
|
|
7376
7327
|
const offlineSubmissions = [];
|
|
7377
7328
|
const offlineAttachments = [];
|
|
@@ -7381,16 +7332,16 @@ var __publicField = (obj, key, value) => {
|
|
|
7381
7332
|
const { values, files } = separateFilesFromValues(argsValues);
|
|
7382
7333
|
const submittedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
7383
7334
|
const createdBy = store.getState().userReducer.currentUser.id;
|
|
7384
|
-
for (const
|
|
7335
|
+
for (const assetId of assetOfflineIds) {
|
|
7385
7336
|
const submission = offline({
|
|
7386
7337
|
form_revision: formRevision,
|
|
7387
7338
|
values,
|
|
7388
7339
|
created_by: createdBy,
|
|
7389
7340
|
submitted_at: submittedAt,
|
|
7390
|
-
|
|
7341
|
+
asset: assetId
|
|
7391
7342
|
});
|
|
7392
7343
|
submissionOfflineIds.push(submission.offline_id);
|
|
7393
|
-
submissionsPayload.push({ offline_id: submission.offline_id,
|
|
7344
|
+
submissionsPayload.push({ offline_id: submission.offline_id, asset_id: assetId });
|
|
7394
7345
|
offlineSubmissions.push(submission);
|
|
7395
7346
|
for (const [fieldIdentifier, fileArray] of Object.entries(files)) {
|
|
7396
7347
|
for (const file of fileArray) {
|
|
@@ -7437,7 +7388,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7437
7388
|
attachments: attachmentsPayload,
|
|
7438
7389
|
files: Object.values(filesRecord)
|
|
7439
7390
|
},
|
|
7440
|
-
blockers:
|
|
7391
|
+
blockers: assetOfflineIds,
|
|
7441
7392
|
blocks: submissionOfflineIds
|
|
7442
7393
|
});
|
|
7443
7394
|
promise.then(({ submissions, attachments, presigned_urls }) => {
|
|
@@ -7480,7 +7431,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7480
7431
|
method: HttpMethod.PATCH,
|
|
7481
7432
|
url: `/forms/submissions/${submission.offline_id}/`,
|
|
7482
7433
|
payload: offlineSubmission,
|
|
7483
|
-
blockers: [offlineSubmission.issue, offlineSubmission.
|
|
7434
|
+
blockers: [offlineSubmission.issue, offlineSubmission.asset, offlineSubmission.asset_stage].filter(
|
|
7484
7435
|
(x) => x !== void 0
|
|
7485
7436
|
),
|
|
7486
7437
|
blocks: [offlineSubmission.offline_id]
|
|
@@ -8327,16 +8278,13 @@ var __publicField = (obj, key, value) => {
|
|
|
8327
8278
|
queryParams: { conversation_id: conversationId }
|
|
8328
8279
|
}).then((response) => {
|
|
8329
8280
|
const conversation = store.getState().agentsReducer.conversations[conversationId];
|
|
8330
|
-
if (!
|
|
8281
|
+
if (!conversation) {
|
|
8331
8282
|
throw new Error("Conversation not found");
|
|
8332
8283
|
}
|
|
8333
|
-
if (!Array.isArray(response)) {
|
|
8334
|
-
response = [response];
|
|
8335
|
-
}
|
|
8336
8284
|
store.dispatch(
|
|
8337
8285
|
updateConversation({
|
|
8338
|
-
|
|
8339
|
-
tiptap_content: [...conversation.tiptap_content || [],
|
|
8286
|
+
offline_id: conversationId,
|
|
8287
|
+
tiptap_content: [...conversation.tiptap_content || [], response.response]
|
|
8340
8288
|
})
|
|
8341
8289
|
);
|
|
8342
8290
|
});
|
|
@@ -8569,12 +8517,12 @@ var __publicField = (obj, key, value) => {
|
|
|
8569
8517
|
__publicField(this, "issueAttachments", new IssueAttachmentService(this));
|
|
8570
8518
|
__publicField(this, "workspaces", new WorkspaceService(this));
|
|
8571
8519
|
__publicField(this, "main", new MainService(this));
|
|
8572
|
-
__publicField(this, "
|
|
8573
|
-
__publicField(this, "
|
|
8574
|
-
__publicField(this, "
|
|
8575
|
-
__publicField(this, "
|
|
8576
|
-
__publicField(this, "
|
|
8577
|
-
__publicField(this, "
|
|
8520
|
+
__publicField(this, "assets", new AssetService(this));
|
|
8521
|
+
__publicField(this, "assetAttachments", new AssetAttachmentService(this));
|
|
8522
|
+
__publicField(this, "assetTypes", new AssetTypeService(this));
|
|
8523
|
+
__publicField(this, "assetTypeAttachments", new AssetTypeAttachmentService(this));
|
|
8524
|
+
__publicField(this, "assetStages", new AssetStageService(this));
|
|
8525
|
+
__publicField(this, "assetStageCompletions", new AssetStageCompletionService(this));
|
|
8578
8526
|
__publicField(this, "userForms", new UserFormService(this));
|
|
8579
8527
|
__publicField(this, "userFormSubmissions", new UserFormSubmissionService(this));
|
|
8580
8528
|
__publicField(this, "projects", new ProjectService(this));
|
|
@@ -15286,9 +15234,9 @@ var __publicField = (obj, key, value) => {
|
|
|
15286
15234
|
}, [filter, maxResults, ownerFilter]);
|
|
15287
15235
|
const userForms = useAppSelector(selectFilteredForms(ownerFilterOptions)) ?? [];
|
|
15288
15236
|
const userFormMapping = useAppSelector(selectFormMapping);
|
|
15289
|
-
const attachableUserForms = userForms.filter((form) => !form.
|
|
15237
|
+
const attachableUserForms = userForms.filter((form) => !form.asset_type && !form.issue_type);
|
|
15290
15238
|
const attachableUserFormMapping = Object.values(userFormMapping).filter(
|
|
15291
|
-
(form) => !form.
|
|
15239
|
+
(form) => !form.asset_type
|
|
15292
15240
|
);
|
|
15293
15241
|
const handleToggleFavorite = React.useCallback(
|
|
15294
15242
|
(form) => {
|
|
@@ -15720,7 +15668,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15720
15668
|
const formId = "form-builder";
|
|
15721
15669
|
const fieldsToChoose = [
|
|
15722
15670
|
["string", "text"],
|
|
15723
|
-
["select", "multi-select", "upload"],
|
|
15671
|
+
["select", "multi-select", "upload", "qr"],
|
|
15724
15672
|
["boolean", "date", "number", "multi-string"]
|
|
15725
15673
|
];
|
|
15726
15674
|
const CompleteFieldTypeToClsMapping = {
|
|
@@ -16692,6 +16640,13 @@ var __publicField = (obj, key, value) => {
|
|
|
16692
16640
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
16693
16641
|
exports2.APIError = APIError;
|
|
16694
16642
|
exports2.AgentService = AgentService;
|
|
16643
|
+
exports2.AssetAttachmentService = AssetAttachmentService;
|
|
16644
|
+
exports2.AssetService = AssetService;
|
|
16645
|
+
exports2.AssetStageColors = AssetStageColors;
|
|
16646
|
+
exports2.AssetStageCompletionService = AssetStageCompletionService;
|
|
16647
|
+
exports2.AssetStageService = AssetStageService;
|
|
16648
|
+
exports2.AssetTypeAttachmentService = AssetTypeAttachmentService;
|
|
16649
|
+
exports2.AssetTypeService = AssetTypeService;
|
|
16695
16650
|
exports2.AttachmentModel = AttachmentModel;
|
|
16696
16651
|
exports2.AuthService = AuthService;
|
|
16697
16652
|
exports2.BaseApiService = BaseApiService;
|
|
@@ -16703,13 +16658,6 @@ var __publicField = (obj, key, value) => {
|
|
|
16703
16658
|
exports2.ColorPicker = ColorPicker;
|
|
16704
16659
|
exports2.Colors = Colors;
|
|
16705
16660
|
exports2.ColorsToString = ColorsToString;
|
|
16706
|
-
exports2.ComponentAttachmentService = ComponentAttachmentService;
|
|
16707
|
-
exports2.ComponentService = ComponentService;
|
|
16708
|
-
exports2.ComponentStageColors = ComponentStageColors;
|
|
16709
|
-
exports2.ComponentStageCompletionService = ComponentStageCompletionService;
|
|
16710
|
-
exports2.ComponentStageService = ComponentStageService;
|
|
16711
|
-
exports2.ComponentTypeAttachmentService = ComponentTypeAttachmentService;
|
|
16712
|
-
exports2.ComponentTypeService = ComponentTypeService;
|
|
16713
16661
|
exports2.DEFAULT_ISSUE_PRIORITY = DEFAULT_ISSUE_PRIORITY;
|
|
16714
16662
|
exports2.DEFAULT_ISSUE_STATUS = DEFAULT_ISSUE_STATUS;
|
|
16715
16663
|
exports2.DateField = DateField;
|
|
@@ -16801,14 +16749,14 @@ var __publicField = (obj, key, value) => {
|
|
|
16801
16749
|
exports2.acceptProjectInvite = acceptProjectInvite;
|
|
16802
16750
|
exports2.addActiveProjectFormSubmissionsCount = addActiveProjectFormSubmissionsCount;
|
|
16803
16751
|
exports2.addActiveProjectIssuesCount = addActiveProjectIssuesCount;
|
|
16752
|
+
exports2.addAsset = addAsset;
|
|
16753
|
+
exports2.addAssetAttachment = addAssetAttachment;
|
|
16754
|
+
exports2.addAssetAttachments = addAssetAttachments;
|
|
16755
|
+
exports2.addAssetType = addAssetType;
|
|
16756
|
+
exports2.addAssetTypeAttachment = addAssetTypeAttachment;
|
|
16757
|
+
exports2.addAssetTypeAttachments = addAssetTypeAttachments;
|
|
16758
|
+
exports2.addAssetsInBatches = addAssetsInBatches;
|
|
16804
16759
|
exports2.addCategory = addCategory;
|
|
16805
|
-
exports2.addComponent = addComponent;
|
|
16806
|
-
exports2.addComponentAttachment = addComponentAttachment;
|
|
16807
|
-
exports2.addComponentAttachments = addComponentAttachments;
|
|
16808
|
-
exports2.addComponentType = addComponentType;
|
|
16809
|
-
exports2.addComponentTypeAttachment = addComponentTypeAttachment;
|
|
16810
|
-
exports2.addComponentTypeAttachments = addComponentTypeAttachments;
|
|
16811
|
-
exports2.addComponentsInBatches = addComponentsInBatches;
|
|
16812
16760
|
exports2.addConversation = addConversation;
|
|
16813
16761
|
exports2.addDocumentAttachment = addDocumentAttachment;
|
|
16814
16762
|
exports2.addDocumentAttachments = addDocumentAttachments;
|
|
@@ -16853,6 +16801,14 @@ var __publicField = (obj, key, value) => {
|
|
|
16853
16801
|
exports2.agentsReducer = agentsReducer;
|
|
16854
16802
|
exports2.agentsSlice = agentsSlice;
|
|
16855
16803
|
exports2.areArraysEqual = areArraysEqual;
|
|
16804
|
+
exports2.assetReducer = assetReducer;
|
|
16805
|
+
exports2.assetSlice = assetSlice;
|
|
16806
|
+
exports2.assetStageCompletionReducer = assetStageCompletionReducer;
|
|
16807
|
+
exports2.assetStageCompletionSlice = assetStageCompletionSlice;
|
|
16808
|
+
exports2.assetStageReducer = assetStageReducer;
|
|
16809
|
+
exports2.assetStageSlice = assetStageSlice;
|
|
16810
|
+
exports2.assetTypeReducer = assetTypeReducer;
|
|
16811
|
+
exports2.assetTypeSlice = assetTypeSlice;
|
|
16856
16812
|
exports2.authReducer = authReducer;
|
|
16857
16813
|
exports2.authSlice = authSlice;
|
|
16858
16814
|
exports2.blobToBase64 = blobToBase64;
|
|
@@ -16862,14 +16818,6 @@ var __publicField = (obj, key, value) => {
|
|
|
16862
16818
|
exports2.classNames = classNames$1;
|
|
16863
16819
|
exports2.cleanRecentIssues = cleanRecentIssues;
|
|
16864
16820
|
exports2.clearTokens = clearTokens;
|
|
16865
|
-
exports2.componentReducer = componentReducer;
|
|
16866
|
-
exports2.componentSlice = componentSlice;
|
|
16867
|
-
exports2.componentStageCompletionReducer = componentStageCompletionReducer;
|
|
16868
|
-
exports2.componentStageCompletionSlice = componentStageCompletionSlice;
|
|
16869
|
-
exports2.componentStageReducer = componentStageReducer;
|
|
16870
|
-
exports2.componentStageSlice = componentStageSlice;
|
|
16871
|
-
exports2.componentTypeReducer = componentTypeReducer;
|
|
16872
|
-
exports2.componentTypeSlice = componentTypeSlice;
|
|
16873
16821
|
exports2.constructUploadedFilePayloads = constructUploadedFilePayloads;
|
|
16874
16822
|
exports2.coordinatesAreEqual = coordinatesAreEqual;
|
|
16875
16823
|
exports2.coordinatesToLiteral = coordinatesToLiteral;
|
|
@@ -16880,7 +16828,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16880
16828
|
exports2.createPointMarker = createPointMarker;
|
|
16881
16829
|
exports2.defaultBadgeColor = defaultBadgeColor;
|
|
16882
16830
|
exports2.defaultStore = defaultStore;
|
|
16883
|
-
exports2.
|
|
16831
|
+
exports2.deleteAssetType = deleteAssetType;
|
|
16884
16832
|
exports2.deleteForm = deleteForm;
|
|
16885
16833
|
exports2.deleteFormRevision = deleteFormRevision;
|
|
16886
16834
|
exports2.deleteFormRevisionAttachment = deleteFormRevisionAttachment;
|
|
@@ -16929,7 +16877,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16929
16877
|
exports2.formSubmissionReducer = formSubmissionReducer;
|
|
16930
16878
|
exports2.formSubmissionSlice = formSubmissionSlice;
|
|
16931
16879
|
exports2.forms = index;
|
|
16932
|
-
exports2.
|
|
16880
|
+
exports2.fullAssetMarkerSize = fullAssetMarkerSize;
|
|
16933
16881
|
exports2.generateBadgeColors = generateBadgeColors;
|
|
16934
16882
|
exports2.genericMemo = genericMemo;
|
|
16935
16883
|
exports2.getFileIdentifier = getFileIdentifier;
|
|
@@ -16990,15 +16938,15 @@ var __publicField = (obj, key, value) => {
|
|
|
16990
16938
|
exports2.projectSlice = projectSlice;
|
|
16991
16939
|
exports2.rehydratedReducer = rehydratedReducer;
|
|
16992
16940
|
exports2.rehydratedSlice = rehydratedSlice;
|
|
16993
|
-
exports2.
|
|
16941
|
+
exports2.removeAllAssetsOfType = removeAllAssetsOfType;
|
|
16942
|
+
exports2.removeAsset = removeAsset;
|
|
16943
|
+
exports2.removeAssetAttachment = removeAssetAttachment;
|
|
16944
|
+
exports2.removeAssetAttachments = removeAssetAttachments;
|
|
16945
|
+
exports2.removeAssetTypeAttachment = removeAssetTypeAttachment;
|
|
16946
|
+
exports2.removeAssetTypeAttachments = removeAssetTypeAttachments;
|
|
16994
16947
|
exports2.removeAttachmentsOfIssue = removeAttachmentsOfIssue;
|
|
16995
16948
|
exports2.removeCategory = removeCategory;
|
|
16996
16949
|
exports2.removeColor = removeColor;
|
|
16997
|
-
exports2.removeComponent = removeComponent;
|
|
16998
|
-
exports2.removeComponentAttachment = removeComponentAttachment;
|
|
16999
|
-
exports2.removeComponentAttachments = removeComponentAttachments;
|
|
17000
|
-
exports2.removeComponentTypeAttachment = removeComponentTypeAttachment;
|
|
17001
|
-
exports2.removeComponentTypeAttachments = removeComponentTypeAttachments;
|
|
17002
16950
|
exports2.removeDocumentAttachment = removeDocumentAttachment;
|
|
17003
16951
|
exports2.removeDocumentAttachments = removeDocumentAttachments;
|
|
17004
16952
|
exports2.removeDocuments = removeDocuments;
|
|
@@ -17049,16 +16997,31 @@ var __publicField = (obj, key, value) => {
|
|
|
17049
16997
|
exports2.selectActiveWorkspace = selectActiveWorkspace;
|
|
17050
16998
|
exports2.selectActiveWorkspaceId = selectActiveWorkspaceId;
|
|
17051
16999
|
exports2.selectAllAttachments = selectAllAttachments;
|
|
17052
|
-
exports2.selectAllComponentAttachments = selectAllComponentAttachments;
|
|
17053
|
-
exports2.selectAllComponentTypeAttachments = selectAllComponentTypeAttachments;
|
|
17054
17000
|
exports2.selectAllDocumentAttachments = selectAllDocumentAttachments;
|
|
17055
17001
|
exports2.selectAllProjectAttachments = selectAllProjectAttachments;
|
|
17056
17002
|
exports2.selectAncestorIdsOfDocument = selectAncestorIdsOfDocument;
|
|
17057
17003
|
exports2.selectAppearance = selectAppearance;
|
|
17058
|
-
exports2.
|
|
17059
|
-
exports2.
|
|
17060
|
-
exports2.
|
|
17061
|
-
exports2.
|
|
17004
|
+
exports2.selectAsset = selectAsset;
|
|
17005
|
+
exports2.selectAssetAttachment = selectAssetAttachment;
|
|
17006
|
+
exports2.selectAssetAttachmentMapping = selectAssetAttachmentMapping;
|
|
17007
|
+
exports2.selectAssetAttachments = selectAssetAttachments;
|
|
17008
|
+
exports2.selectAssetToAssetTypeMapping = selectAssetToAssetTypeMapping;
|
|
17009
|
+
exports2.selectAssetType = selectAssetType;
|
|
17010
|
+
exports2.selectAssetTypeAttachment = selectAssetTypeAttachment;
|
|
17011
|
+
exports2.selectAssetTypeAttachmentMapping = selectAssetTypeAttachmentMapping;
|
|
17012
|
+
exports2.selectAssetTypeAttachments = selectAssetTypeAttachments;
|
|
17013
|
+
exports2.selectAssetTypeStagesMapping = selectAssetTypeStagesMapping;
|
|
17014
|
+
exports2.selectAssetTypes = selectAssetTypes;
|
|
17015
|
+
exports2.selectAssetTypesByName = selectAssetTypesByName;
|
|
17016
|
+
exports2.selectAssetTypesFromIds = selectAssetTypesFromIds;
|
|
17017
|
+
exports2.selectAssetTypesMapping = selectAssetTypesMapping;
|
|
17018
|
+
exports2.selectAssets = selectAssets;
|
|
17019
|
+
exports2.selectAssetsMapping = selectAssetsMapping;
|
|
17020
|
+
exports2.selectAssetsOfAssetType = selectAssetsOfAssetType;
|
|
17021
|
+
exports2.selectAttachmentsOfAsset = selectAttachmentsOfAsset;
|
|
17022
|
+
exports2.selectAttachmentsOfAssetByType = selectAttachmentsOfAssetByType;
|
|
17023
|
+
exports2.selectAttachmentsOfAssetType = selectAttachmentsOfAssetType;
|
|
17024
|
+
exports2.selectAttachmentsOfAssetTypeByType = selectAttachmentsOfAssetTypeByType;
|
|
17062
17025
|
exports2.selectAttachmentsOfDocument = selectAttachmentsOfDocument;
|
|
17063
17026
|
exports2.selectAttachmentsOfDocumentByType = selectAttachmentsOfDocumentByType;
|
|
17064
17027
|
exports2.selectAttachmentsOfFormRevision = selectAttachmentsOfFormRevision;
|
|
@@ -17075,25 +17038,8 @@ var __publicField = (obj, key, value) => {
|
|
|
17075
17038
|
exports2.selectCenterMapToProject = selectCenterMapToProject;
|
|
17076
17039
|
exports2.selectCommentMapping = selectCommentMapping;
|
|
17077
17040
|
exports2.selectCommentsOfIssue = selectCommentsOfIssue;
|
|
17078
|
-
exports2.
|
|
17041
|
+
exports2.selectCompletedStageIdsForAsset = selectCompletedStageIdsForAsset;
|
|
17079
17042
|
exports2.selectCompletedStages = selectCompletedStages;
|
|
17080
|
-
exports2.selectComponent = selectComponent;
|
|
17081
|
-
exports2.selectComponentAttachment = selectComponentAttachment;
|
|
17082
|
-
exports2.selectComponentAttachmentMapping = selectComponentAttachmentMapping;
|
|
17083
|
-
exports2.selectComponentType = selectComponentType;
|
|
17084
|
-
exports2.selectComponentTypeAttachment = selectComponentTypeAttachment;
|
|
17085
|
-
exports2.selectComponentTypeAttachmentMapping = selectComponentTypeAttachmentMapping;
|
|
17086
|
-
exports2.selectComponentTypeFromComponent = selectComponentTypeFromComponent;
|
|
17087
|
-
exports2.selectComponentTypeFromComponents = selectComponentTypeFromComponents;
|
|
17088
|
-
exports2.selectComponentTypeStagesMapping = selectComponentTypeStagesMapping;
|
|
17089
|
-
exports2.selectComponentTypes = selectComponentTypes;
|
|
17090
|
-
exports2.selectComponentTypesByName = selectComponentTypesByName;
|
|
17091
|
-
exports2.selectComponentTypesFromIds = selectComponentTypesFromIds;
|
|
17092
|
-
exports2.selectComponentTypesMapping = selectComponentTypesMapping;
|
|
17093
|
-
exports2.selectComponents = selectComponents;
|
|
17094
|
-
exports2.selectComponentsByType = selectComponentsByType;
|
|
17095
|
-
exports2.selectComponentsFromComponentType = selectComponentsFromComponentType;
|
|
17096
|
-
exports2.selectComponentsMapping = selectComponentsMapping;
|
|
17097
17043
|
exports2.selectConversation = selectConversation;
|
|
17098
17044
|
exports2.selectConversationMapping = selectConversationMapping;
|
|
17099
17045
|
exports2.selectConversations = selectConversations;
|
|
@@ -17118,7 +17064,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17118
17064
|
exports2.selectFilteredForms = selectFilteredForms;
|
|
17119
17065
|
exports2.selectForm = selectForm;
|
|
17120
17066
|
exports2.selectFormMapping = selectFormMapping;
|
|
17121
|
-
exports2.
|
|
17067
|
+
exports2.selectFormOfAssetType = selectFormOfAssetType;
|
|
17122
17068
|
exports2.selectFormOfIssueType = selectFormOfIssueType;
|
|
17123
17069
|
exports2.selectFormRevision = selectFormRevision;
|
|
17124
17070
|
exports2.selectFormRevisionMapping = selectFormRevisionMapping;
|
|
@@ -17127,16 +17073,16 @@ var __publicField = (obj, key, value) => {
|
|
|
17127
17073
|
exports2.selectFormSubmission = selectFormSubmission;
|
|
17128
17074
|
exports2.selectFormSubmissionAttachmentsMapping = selectFormSubmissionAttachmentsMapping;
|
|
17129
17075
|
exports2.selectFormSubmissions = selectFormSubmissions;
|
|
17130
|
-
exports2.
|
|
17076
|
+
exports2.selectFormSubmissionsByAssets = selectFormSubmissionsByAssets;
|
|
17131
17077
|
exports2.selectFormSubmissionsByFormRevisions = selectFormSubmissionsByFormRevisions;
|
|
17132
17078
|
exports2.selectFormSubmissionsMapping = selectFormSubmissionsMapping;
|
|
17133
|
-
exports2.
|
|
17079
|
+
exports2.selectFormSubmissionsOfAsset = selectFormSubmissionsOfAsset;
|
|
17134
17080
|
exports2.selectFormSubmissionsOfForm = selectFormSubmissionsOfForm;
|
|
17135
17081
|
exports2.selectFormSubmissionsOfIssue = selectFormSubmissionsOfIssue;
|
|
17136
17082
|
exports2.selectFormsCount = selectFormsCount;
|
|
17137
17083
|
exports2.selectGeneralFormCount = selectGeneralFormCount;
|
|
17084
|
+
exports2.selectHiddenAssetTypeIds = selectHiddenAssetTypeIds;
|
|
17138
17085
|
exports2.selectHiddenCategoryCount = selectHiddenCategoryCount;
|
|
17139
|
-
exports2.selectHiddenComponentTypeIds = selectHiddenComponentTypeIds;
|
|
17140
17086
|
exports2.selectIsFetchingInitialData = selectIsFetchingInitialData;
|
|
17141
17087
|
exports2.selectIsImportingProjectFile = selectIsImportingProjectFile;
|
|
17142
17088
|
exports2.selectIsLoading = selectIsLoading;
|
|
@@ -17158,7 +17104,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17158
17104
|
exports2.selectIssuesOfIssueTypeCount = selectIssuesOfIssueTypeCount;
|
|
17159
17105
|
exports2.selectLatestFormRevisionByForm = selectLatestFormRevisionByForm;
|
|
17160
17106
|
exports2.selectLatestFormRevisionOfForm = selectLatestFormRevisionOfForm;
|
|
17161
|
-
exports2.
|
|
17107
|
+
exports2.selectLatestFormRevisionsOfAssetTypes = selectLatestFormRevisionsOfAssetTypes;
|
|
17162
17108
|
exports2.selectLatestRetryTime = selectLatestRetryTime;
|
|
17163
17109
|
exports2.selectLicense = selectLicense;
|
|
17164
17110
|
exports2.selectLicenseForProject = selectLicenseForProject;
|
|
@@ -17166,8 +17112,8 @@ var __publicField = (obj, key, value) => {
|
|
|
17166
17112
|
exports2.selectLicensesForProjectsMapping = selectLicensesForProjectsMapping;
|
|
17167
17113
|
exports2.selectMainWorkspace = selectMainWorkspace;
|
|
17168
17114
|
exports2.selectMapStyle = selectMapStyle;
|
|
17169
|
-
exports2.
|
|
17170
|
-
exports2.
|
|
17115
|
+
exports2.selectNumberOfAssetTypesMatchingCaseInsensitiveName = selectNumberOfAssetTypesMatchingCaseInsensitiveName;
|
|
17116
|
+
exports2.selectNumberOfAssetsOfAssetType = selectNumberOfAssetsOfAssetType;
|
|
17171
17117
|
exports2.selectOrganization = selectOrganization;
|
|
17172
17118
|
exports2.selectOrganizationAccess = selectOrganizationAccess;
|
|
17173
17119
|
exports2.selectOrganizationAccessForUser = selectOrganizationAccessForUser;
|
|
@@ -17208,9 +17154,9 @@ var __publicField = (obj, key, value) => {
|
|
|
17208
17154
|
exports2.selectStageFormIdsFromStageIds = selectStageFormIdsFromStageIds;
|
|
17209
17155
|
exports2.selectStageMapping = selectStageMapping;
|
|
17210
17156
|
exports2.selectStages = selectStages;
|
|
17211
|
-
exports2.
|
|
17212
|
-
exports2.selectStagesFromComponentTypeIds = selectStagesFromComponentTypeIds;
|
|
17157
|
+
exports2.selectStagesFromAssetTypeIds = selectStagesFromAssetTypeIds;
|
|
17213
17158
|
exports2.selectStagesFromStageIds = selectStagesFromStageIds;
|
|
17159
|
+
exports2.selectStagesOfAssetType = selectStagesOfAssetType;
|
|
17214
17160
|
exports2.selectTeam = selectTeam;
|
|
17215
17161
|
exports2.selectTeams = selectTeams;
|
|
17216
17162
|
exports2.selectTeamsMapping = selectTeamsMapping;
|
|
@@ -17232,14 +17178,14 @@ var __publicField = (obj, key, value) => {
|
|
|
17232
17178
|
exports2.setActiveProjectId = setActiveProjectId;
|
|
17233
17179
|
exports2.setActiveWorkspaceId = setActiveWorkspaceId;
|
|
17234
17180
|
exports2.setAppearance = setAppearance;
|
|
17181
|
+
exports2.setAssetAttachment = setAssetAttachment;
|
|
17182
|
+
exports2.setAssetAttachments = setAssetAttachments;
|
|
17183
|
+
exports2.setAssetTypeAttachment = setAssetTypeAttachment;
|
|
17184
|
+
exports2.setAssetTypeAttachments = setAssetTypeAttachments;
|
|
17185
|
+
exports2.setAssetTypes = setAssetTypes;
|
|
17186
|
+
exports2.setAssets = setAssets;
|
|
17235
17187
|
exports2.setCategories = setCategories;
|
|
17236
17188
|
exports2.setCenterMapToProject = setCenterMapToProject;
|
|
17237
|
-
exports2.setComponentAttachment = setComponentAttachment;
|
|
17238
|
-
exports2.setComponentAttachments = setComponentAttachments;
|
|
17239
|
-
exports2.setComponentTypeAttachment = setComponentTypeAttachment;
|
|
17240
|
-
exports2.setComponentTypeAttachments = setComponentTypeAttachments;
|
|
17241
|
-
exports2.setComponentTypes = setComponentTypes;
|
|
17242
|
-
exports2.setComponents = setComponents;
|
|
17243
17189
|
exports2.setConversation = setConversation;
|
|
17244
17190
|
exports2.setConversations = setConversations;
|
|
17245
17191
|
exports2.setCreateProjectType = setCreateProjectType;
|
|
@@ -17302,18 +17248,18 @@ var __publicField = (obj, key, value) => {
|
|
|
17302
17248
|
exports2.teamSlice = teamSlice;
|
|
17303
17249
|
exports2.toFileNameSafeString = toFileNameSafeString;
|
|
17304
17250
|
exports2.toOfflineIdRecord = toOfflineIdRecord;
|
|
17305
|
-
exports2.
|
|
17251
|
+
exports2.toggleAssetTypeVisibility = toggleAssetTypeVisibility;
|
|
17306
17252
|
exports2.truncate = truncate;
|
|
17307
17253
|
exports2.unfavoriteForm = unfavoriteForm;
|
|
17308
17254
|
exports2.unhideAllCategories = unhideAllCategories;
|
|
17309
17255
|
exports2.unhideCategory = unhideCategory;
|
|
17310
17256
|
exports2.unlinkStageToForm = unlinkStageToForm;
|
|
17311
17257
|
exports2.updateActiveOrganization = updateActiveOrganization;
|
|
17312
|
-
exports2.
|
|
17313
|
-
exports2.
|
|
17314
|
-
exports2.
|
|
17315
|
-
exports2.
|
|
17316
|
-
exports2.
|
|
17258
|
+
exports2.updateAsset = updateAsset;
|
|
17259
|
+
exports2.updateAssetAttachment = updateAssetAttachment;
|
|
17260
|
+
exports2.updateAssetAttachments = updateAssetAttachments;
|
|
17261
|
+
exports2.updateAssetTypeAttachment = updateAssetTypeAttachment;
|
|
17262
|
+
exports2.updateAssetTypeAttachments = updateAssetTypeAttachments;
|
|
17317
17263
|
exports2.updateConversation = updateConversation;
|
|
17318
17264
|
exports2.updateDocumentAttachment = updateDocumentAttachment;
|
|
17319
17265
|
exports2.updateDocumentAttachments = updateDocumentAttachments;
|