@overmap-ai/core 1.0.53-attachment-creation-flows.0 → 1.0.53-component-asset-renames.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/dist/constants/ui.d.ts +1 -1
- package/dist/enums/ui.d.ts +1 -1
- package/dist/overmap-core.js +1418 -1174
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +1365 -1121
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/sdk.d.ts +7 -7
- package/dist/sdk/services/AgentService.d.ts +6 -32
- 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/IssueService.d.ts +1 -1
- package/dist/sdk/services/MainService.d.ts +4 -11
- 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/agentsSlice.d.ts +16 -0
- 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 +5 -4
- package/dist/store/slices/documentSlice.d.ts +7 -7
- package/dist/store/slices/formRevisionSlice.d.ts +6 -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 +5 -4
- package/dist/store/slices/issueSlice.d.ts +5 -4
- package/dist/store/slices/projectFileSlice.d.ts +5 -4
- package/dist/store/slices/workspaceSlice.d.ts +5 -4
- package/dist/store/store.d.ts +16 -13
- package/dist/typings/models/agents.d.ts +40 -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/typings/models/index.d.ts +1 -0
- package/dist/utils/colors.d.ts +1 -1
- package/package.json +1 -1
- 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
|
@@ -5,8 +5,8 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
(function(global2, factory) {
|
|
8
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("react/jsx-runtime"), require("@overmap-ai/blocks"), require("dependency-graph"), require("@redux-offline/redux-offline"), require("@redux-offline/redux-offline/lib/defaults"), require("localforage"), require("redux-persist-migrate"), require("@reduxjs/toolkit"), require("superagent"), require("react-redux"), require("file-saver"), require("uuid"), require("color"), require("jwt-decode"), require("@redux-offline/redux-offline/lib/constants"), require("idb"), require("formik"), require("lodash.get"), require("linkify-react"), require("@hello-pangea/dnd"), require("qr-scanner"), require("xlsx"), require("react-pdf"), require("react-pdf/dist/Page/AnnotationLayer.css"), require("react-pdf/dist/Page/TextLayer.css"), require("react-
|
|
9
|
-
})(this, function(exports2, React, jsxRuntime, blocks, dependencyGraph, reduxOffline, offlineConfig, localforage, createMigration, toolkit, request, reactRedux, saveAs, uuid, ColorCls, jwtDecode, constants, idb, formik, get, Linkify, dnd, QrScannerAPI, xlsx, reactPdf, AnnotationLayer_css, TextLayer_css,
|
|
8
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("react/jsx-runtime"), require("@overmap-ai/blocks"), require("dependency-graph"), require("@redux-offline/redux-offline"), require("@redux-offline/redux-offline/lib/defaults"), require("localforage"), require("redux-persist-migrate"), require("@reduxjs/toolkit"), require("superagent"), require("react-redux"), require("file-saver"), require("uuid"), require("color"), require("jwt-decode"), require("@redux-offline/redux-offline/lib/constants"), require("idb"), require("formik"), require("react-dom"), require("lodash.get"), require("linkify-react"), require("@hello-pangea/dnd"), require("qr-scanner"), require("xlsx"), require("react-pdf"), require("react-pdf/dist/Page/AnnotationLayer.css"), require("react-pdf/dist/Page/TextLayer.css"), require("react-sketch-canvas"), require("lodash.set"), require("lodash.clonedeep")) : typeof define === "function" && define.amd ? define(["exports", "react", "react/jsx-runtime", "@overmap-ai/blocks", "dependency-graph", "@redux-offline/redux-offline", "@redux-offline/redux-offline/lib/defaults", "localforage", "redux-persist-migrate", "@reduxjs/toolkit", "superagent", "react-redux", "file-saver", "uuid", "color", "jwt-decode", "@redux-offline/redux-offline/lib/constants", "idb", "formik", "react-dom", "lodash.get", "linkify-react", "@hello-pangea/dnd", "qr-scanner", "xlsx", "react-pdf", "react-pdf/dist/Page/AnnotationLayer.css", "react-pdf/dist/Page/TextLayer.css", "react-sketch-canvas", "lodash.set", "lodash.clonedeep"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2["overmap-core"] = {}, global2.React, global2.jsxRuntime, global2.blocks, global2.dependencyGraph, global2.reduxOffline, global2.offlineConfig, global2.localforage, global2.createMigration, global2.toolkit, global2.request, global2.reactRedux, global2.saveAs, global2.uuid, global2.ColorCls, global2.jwtDecode, global2.constants, global2.idb, global2.formik, global2.ReactDOM, global2.get, global2.Linkify, global2.dnd, global2.QrScannerAPI, global2.xlsx, global2.reactPdf, null, null, global2.reactSketchCanvas, global2.set, global2.cloneDeep));
|
|
9
|
+
})(this, function(exports2, React, jsxRuntime, blocks, dependencyGraph, reduxOffline, offlineConfig, localforage, createMigration, toolkit, request, reactRedux, saveAs, uuid, ColorCls, jwtDecode, constants, idb, formik, ReactDOM, get, Linkify, dnd, QrScannerAPI, xlsx, reactPdf, AnnotationLayer_css, TextLayer_css, reactSketchCanvas, set, cloneDeep) {
|
|
10
10
|
var _a;
|
|
11
11
|
"use strict";
|
|
12
12
|
function _interopNamespaceDefault(e) {
|
|
@@ -668,15 +668,15 @@ var __publicField = (obj, key, value) => {
|
|
|
668
668
|
};
|
|
669
669
|
const migrations = [initialVersioning, signOut, signOut, createOutboxState];
|
|
670
670
|
const manifest = Object.fromEntries(migrations.map((migration2, i) => [i, wrapMigration(migration2)]));
|
|
671
|
-
const initialState$
|
|
671
|
+
const initialState$s = {
|
|
672
672
|
accessToken: "",
|
|
673
673
|
refreshToken: "",
|
|
674
674
|
isLoggedIn: false
|
|
675
675
|
};
|
|
676
676
|
const authSlice = toolkit.createSlice({
|
|
677
677
|
name: "auth",
|
|
678
|
-
initialState: initialState$
|
|
679
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
678
|
+
initialState: initialState$s,
|
|
679
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$s)),
|
|
680
680
|
reducers: {
|
|
681
681
|
setTokens: (state, action) => {
|
|
682
682
|
state.accessToken = action.payload.accessToken;
|
|
@@ -1374,7 +1374,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1374
1374
|
[mint.mint9]: "mint",
|
|
1375
1375
|
[sky.sky9]: "sky"
|
|
1376
1376
|
};
|
|
1377
|
-
const
|
|
1377
|
+
const AssetStageColors = {
|
|
1378
1378
|
indigo: indigo.indigo9,
|
|
1379
1379
|
red: red.red9,
|
|
1380
1380
|
violet: violet.violet9,
|
|
@@ -1396,7 +1396,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1396
1396
|
return { backgroundColor, textColor };
|
|
1397
1397
|
};
|
|
1398
1398
|
function getStageColor(index2) {
|
|
1399
|
-
return Object.values(
|
|
1399
|
+
return Object.values(AssetStageColors)[index2 % Object.keys(AssetStageColors).length];
|
|
1400
1400
|
}
|
|
1401
1401
|
const getLocalDateString = memoize((date) => {
|
|
1402
1402
|
if (!date)
|
|
@@ -1420,7 +1420,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1420
1420
|
return getLocalDateString(date);
|
|
1421
1421
|
return relative.format(days, "days");
|
|
1422
1422
|
});
|
|
1423
|
-
const initialState$
|
|
1423
|
+
const initialState$r = {
|
|
1424
1424
|
categories: {},
|
|
1425
1425
|
usedCategoryColors: [],
|
|
1426
1426
|
categoryVisibility: {
|
|
@@ -1430,8 +1430,8 @@ var __publicField = (obj, key, value) => {
|
|
|
1430
1430
|
};
|
|
1431
1431
|
const categorySlice = toolkit.createSlice({
|
|
1432
1432
|
name: "categories",
|
|
1433
|
-
initialState: initialState$
|
|
1434
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1433
|
+
initialState: initialState$r,
|
|
1434
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$r)),
|
|
1435
1435
|
reducers: {
|
|
1436
1436
|
setCategories: (state, action) => {
|
|
1437
1437
|
if (!Array.isArray(action.payload))
|
|
@@ -1615,167 +1615,274 @@ var __publicField = (obj, key, value) => {
|
|
|
1615
1615
|
delete state.attachments[attachmentId];
|
|
1616
1616
|
}
|
|
1617
1617
|
}
|
|
1618
|
+
const initialState$q = {
|
|
1619
|
+
assetTypes: {},
|
|
1620
|
+
hiddenAssetTypeIds: {},
|
|
1621
|
+
attachments: {}
|
|
1622
|
+
};
|
|
1623
|
+
const assetTypeSlice = toolkit.createSlice({
|
|
1624
|
+
name: "assetTypes",
|
|
1625
|
+
initialState: initialState$q,
|
|
1626
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$q)),
|
|
1627
|
+
reducers: {
|
|
1628
|
+
addAssetType: (state, action) => {
|
|
1629
|
+
state.assetTypes[action.payload.offline_id] = action.payload;
|
|
1630
|
+
},
|
|
1631
|
+
setAssetTypes: (state, action) => {
|
|
1632
|
+
state.assetTypes = toOfflineIdRecord(action.payload);
|
|
1633
|
+
},
|
|
1634
|
+
toggleAssetTypeVisibility: (state, action) => {
|
|
1635
|
+
state.hiddenAssetTypeIds[action.payload] = !state.hiddenAssetTypeIds[action.payload];
|
|
1636
|
+
},
|
|
1637
|
+
deleteAssetType: (state, action) => {
|
|
1638
|
+
delete state.assetTypes[action.payload];
|
|
1639
|
+
},
|
|
1640
|
+
// Attachments
|
|
1641
|
+
setAssetTypeAttachment: setAttachment,
|
|
1642
|
+
setAssetTypeAttachments: setAttachments,
|
|
1643
|
+
addAssetTypeAttachment: addAttachment,
|
|
1644
|
+
addAssetTypeAttachments: addAttachments,
|
|
1645
|
+
updateAssetTypeAttachment: updateAttachment,
|
|
1646
|
+
updateAssetTypeAttachments: updateAttachments,
|
|
1647
|
+
removeAssetTypeAttachment: removeAttachment,
|
|
1648
|
+
removeAssetTypeAttachments: removeAttachments
|
|
1649
|
+
}
|
|
1650
|
+
});
|
|
1651
|
+
const {
|
|
1652
|
+
addAssetType,
|
|
1653
|
+
setAssetTypes,
|
|
1654
|
+
toggleAssetTypeVisibility,
|
|
1655
|
+
deleteAssetType,
|
|
1656
|
+
// Attachmet
|
|
1657
|
+
setAssetTypeAttachment,
|
|
1658
|
+
setAssetTypeAttachments,
|
|
1659
|
+
addAssetTypeAttachment,
|
|
1660
|
+
addAssetTypeAttachments,
|
|
1661
|
+
updateAssetTypeAttachment,
|
|
1662
|
+
updateAssetTypeAttachments,
|
|
1663
|
+
removeAssetTypeAttachment,
|
|
1664
|
+
removeAssetTypeAttachments
|
|
1665
|
+
} = assetTypeSlice.actions;
|
|
1666
|
+
const selectAssetTypesMapping = (state) => state.assetTypeReducer.assetTypes;
|
|
1667
|
+
const selectAssetTypes = toolkit.createSelector(
|
|
1668
|
+
[selectAssetTypesMapping],
|
|
1669
|
+
(mapping) => Object.values(mapping)
|
|
1670
|
+
);
|
|
1671
|
+
const selectAssetType = restructureCreateSelectorWithArgs(
|
|
1672
|
+
toolkit.createSelector(
|
|
1673
|
+
[selectAssetTypesMapping, (_state, assetTypeId) => assetTypeId],
|
|
1674
|
+
(mapping, assetTypeId) => mapping[assetTypeId]
|
|
1675
|
+
)
|
|
1676
|
+
);
|
|
1677
|
+
const selectNumberOfAssetTypesMatchingCaseInsensitiveName = restructureCreateSelectorWithArgs(
|
|
1678
|
+
toolkit.createSelector(
|
|
1679
|
+
[selectAssetTypesMapping, (_state, args) => args],
|
|
1680
|
+
(mapping, args) => {
|
|
1681
|
+
var _a2;
|
|
1682
|
+
const name = ((_a2 = args.name) == null ? void 0 : _a2.toLowerCase()) ?? null;
|
|
1683
|
+
return Object.values(mapping).filter(
|
|
1684
|
+
(assetType) => {
|
|
1685
|
+
var _a3;
|
|
1686
|
+
return (((_a3 = assetType.name) == null ? void 0 : _a3.toLowerCase()) ?? null) === name && assetType.offline_id !== args.assetTypeId;
|
|
1687
|
+
}
|
|
1688
|
+
).length;
|
|
1689
|
+
}
|
|
1690
|
+
)
|
|
1691
|
+
);
|
|
1692
|
+
const selectAssetTypesByName = restructureCreateSelectorWithArgs(
|
|
1693
|
+
toolkit.createSelector([selectAssetTypesMapping, (_state, name) => name], (mapping, name) => {
|
|
1694
|
+
name = (name == null ? void 0 : name.toLowerCase()) ?? null;
|
|
1695
|
+
return Object.values(mapping).filter((assetType) => {
|
|
1696
|
+
var _a2;
|
|
1697
|
+
return (((_a2 = assetType.name) == null ? void 0 : _a2.toLowerCase()) ?? null) === name;
|
|
1698
|
+
});
|
|
1699
|
+
})
|
|
1700
|
+
);
|
|
1701
|
+
const selectHiddenAssetTypeIds = (state) => state.assetTypeReducer.hiddenAssetTypeIds;
|
|
1702
|
+
const selectAssetTypeAttachmentMapping = (state) => state.assetTypeReducer.attachments;
|
|
1703
|
+
const selectAssetTypeAttachments = toolkit.createSelector(
|
|
1704
|
+
[selectAssetTypeAttachmentMapping],
|
|
1705
|
+
(mapping) => Object.values(mapping)
|
|
1706
|
+
);
|
|
1707
|
+
const selectAssetTypeAttachment = (attachmentId) => (state) => {
|
|
1708
|
+
return state.assetTypeReducer.attachments[attachmentId];
|
|
1709
|
+
};
|
|
1710
|
+
const selectAttachmentsOfAssetType = restructureCreateSelectorWithArgs(
|
|
1711
|
+
toolkit.createSelector(
|
|
1712
|
+
[selectAssetTypeAttachments, (_state, assetTypeId) => assetTypeId],
|
|
1713
|
+
(attachments, assetTypeId) => {
|
|
1714
|
+
return attachments.filter(({ asset_type }) => assetTypeId === asset_type);
|
|
1715
|
+
}
|
|
1716
|
+
)
|
|
1717
|
+
);
|
|
1718
|
+
const selectAttachmentsOfAssetTypeByType = restructureCreateSelectorWithArgs(
|
|
1719
|
+
toolkit.createSelector(
|
|
1720
|
+
[selectAssetTypeAttachments, (_state, assetTypeId) => assetTypeId],
|
|
1721
|
+
(attachments, assetTypeId) => {
|
|
1722
|
+
const attachmentsOfAssetType = attachments.filter(({ asset_type }) => asset_type === assetTypeId);
|
|
1723
|
+
const fileAttachments = attachmentsOfAssetType.filter(
|
|
1724
|
+
// this null check here is necessary, there are cases where file_type is null or undefined
|
|
1725
|
+
({ file_type }) => !file_type || !file_type.startsWith("image/")
|
|
1726
|
+
);
|
|
1727
|
+
const imageAttachments = attachmentsOfAssetType.filter(
|
|
1728
|
+
// this null check here is necessary, there are cases where file_type is null or undefined
|
|
1729
|
+
({ file_type }) => file_type && file_type.startsWith("image/")
|
|
1730
|
+
);
|
|
1731
|
+
return { fileAttachments, imageAttachments };
|
|
1732
|
+
}
|
|
1733
|
+
)
|
|
1734
|
+
);
|
|
1735
|
+
const assetTypeReducer = assetTypeSlice.reducer;
|
|
1618
1736
|
const initialState$p = {
|
|
1619
|
-
|
|
1737
|
+
assets: {},
|
|
1620
1738
|
attachments: {}
|
|
1621
1739
|
};
|
|
1622
|
-
const
|
|
1623
|
-
name: "
|
|
1740
|
+
const assetSlice = toolkit.createSlice({
|
|
1741
|
+
name: "assets",
|
|
1624
1742
|
initialState: initialState$p,
|
|
1625
1743
|
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$p)),
|
|
1626
1744
|
reducers: {
|
|
1627
|
-
|
|
1628
|
-
state.
|
|
1629
|
-
|
|
1745
|
+
addAsset: (state, action) => {
|
|
1746
|
+
state.assets[action.payload.offline_id] = action.payload;
|
|
1747
|
+
prevAssets = null;
|
|
1630
1748
|
},
|
|
1631
|
-
|
|
1632
|
-
Object.assign(state.
|
|
1633
|
-
|
|
1749
|
+
addAssetsInBatches: (state, action) => {
|
|
1750
|
+
Object.assign(state.assets, toOfflineIdRecord(action.payload));
|
|
1751
|
+
prevAssets = null;
|
|
1634
1752
|
},
|
|
1635
|
-
|
|
1636
|
-
state.
|
|
1637
|
-
|
|
1753
|
+
setAssets: (state, action) => {
|
|
1754
|
+
state.assets = toOfflineIdRecord(action.payload);
|
|
1755
|
+
prevAssets = null;
|
|
1638
1756
|
},
|
|
1639
|
-
|
|
1640
|
-
if (action.payload.offline_id in state.
|
|
1641
|
-
state.
|
|
1757
|
+
updateAsset: (state, action) => {
|
|
1758
|
+
if (action.payload.offline_id in state.assets) {
|
|
1759
|
+
state.assets[action.payload.offline_id] = action.payload;
|
|
1642
1760
|
} else {
|
|
1643
|
-
throw new Error(`Tried to update
|
|
1761
|
+
throw new Error(`Tried to update asset with ID that doesn't exist: ${action.payload.offline_id}`);
|
|
1644
1762
|
}
|
|
1645
|
-
|
|
1763
|
+
prevAssets = null;
|
|
1646
1764
|
},
|
|
1647
|
-
|
|
1648
|
-
if (action.payload in state.
|
|
1649
|
-
delete state.
|
|
1765
|
+
removeAsset: (state, action) => {
|
|
1766
|
+
if (action.payload in state.assets) {
|
|
1767
|
+
delete state.assets[action.payload];
|
|
1650
1768
|
} else {
|
|
1651
|
-
throw new Error(`Failed to remove
|
|
1769
|
+
throw new Error(`Failed to remove asset because ID doesn't exist: ${action.payload}`);
|
|
1652
1770
|
}
|
|
1653
|
-
|
|
1771
|
+
prevAssets = null;
|
|
1654
1772
|
},
|
|
1655
|
-
|
|
1773
|
+
removeAllAssetsOfType: (state, action) => {
|
|
1656
1774
|
var _a2;
|
|
1657
|
-
for (const componentId in state.
|
|
1658
|
-
if (((_a2 = state.
|
|
1659
|
-
delete state.
|
|
1775
|
+
for (const componentId in state.assets) {
|
|
1776
|
+
if (((_a2 = state.assets[componentId]) == null ? void 0 : _a2.asset_type) === action.payload) {
|
|
1777
|
+
delete state.assets[componentId];
|
|
1660
1778
|
}
|
|
1661
1779
|
}
|
|
1662
|
-
|
|
1780
|
+
prevAssets = null;
|
|
1663
1781
|
},
|
|
1664
1782
|
// Attachments
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1783
|
+
setAssetAttachment: setAttachment,
|
|
1784
|
+
setAssetAttachments: setAttachments,
|
|
1785
|
+
addAssetAttachment: addAttachment,
|
|
1786
|
+
addAssetAttachments: addAttachments,
|
|
1787
|
+
updateAssetAttachment: updateAttachment,
|
|
1788
|
+
updateAssetAttachments: updateAttachments,
|
|
1789
|
+
removeAssetAttachment: removeAttachment,
|
|
1790
|
+
removeAssetAttachments: removeAttachments
|
|
1673
1791
|
}
|
|
1674
1792
|
});
|
|
1675
1793
|
const {
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1794
|
+
addAsset,
|
|
1795
|
+
updateAsset,
|
|
1796
|
+
removeAsset,
|
|
1797
|
+
addAssetsInBatches,
|
|
1798
|
+
setAssets,
|
|
1799
|
+
removeAllAssetsOfType,
|
|
1682
1800
|
// Attachments
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
} =
|
|
1692
|
-
let
|
|
1693
|
-
const
|
|
1694
|
-
if (!
|
|
1695
|
-
|
|
1696
|
-
}
|
|
1697
|
-
return
|
|
1698
|
-
};
|
|
1699
|
-
const selectComponentsMapping = (state) => state.componentReducer.components;
|
|
1700
|
-
const selectComponentsFromComponentType = (componentTypeId) => (state) => {
|
|
1701
|
-
if (!componentTypeId)
|
|
1702
|
-
return [];
|
|
1703
|
-
const components = selectComponents(state);
|
|
1704
|
-
return components.filter((component) => component.component_type === componentTypeId);
|
|
1801
|
+
setAssetAttachment,
|
|
1802
|
+
setAssetAttachments,
|
|
1803
|
+
addAssetAttachment,
|
|
1804
|
+
addAssetAttachments,
|
|
1805
|
+
updateAssetAttachment,
|
|
1806
|
+
updateAssetAttachments,
|
|
1807
|
+
removeAssetAttachment,
|
|
1808
|
+
removeAssetAttachments
|
|
1809
|
+
} = assetSlice.actions;
|
|
1810
|
+
let prevAssets = null;
|
|
1811
|
+
const selectAssets = (state) => {
|
|
1812
|
+
if (!prevAssets) {
|
|
1813
|
+
prevAssets = Object.values(state.assetReducer.assets);
|
|
1814
|
+
}
|
|
1815
|
+
return prevAssets;
|
|
1705
1816
|
};
|
|
1706
|
-
const
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1817
|
+
const selectAssetsMapping = (state) => state.assetReducer.assets;
|
|
1818
|
+
const selectAssetsOfAssetType = restructureCreateSelectorWithArgs(
|
|
1819
|
+
toolkit.createSelector([selectAssets, (_state, assetTypeId) => assetTypeId], (components, assetTypeId) => {
|
|
1820
|
+
return components.filter((asset) => asset.asset_type === assetTypeId);
|
|
1821
|
+
})
|
|
1822
|
+
);
|
|
1823
|
+
const selectAsset = (assetId) => (state) => {
|
|
1824
|
+
return state.assetReducer.assets[assetId];
|
|
1711
1825
|
};
|
|
1712
|
-
const
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
Expected all referenced
|
|
1826
|
+
const selectAssetToAssetTypeMapping = toolkit.createSelector(
|
|
1827
|
+
[selectAssets, selectAssetTypesMapping],
|
|
1828
|
+
(assets, assetTypeMapping) => {
|
|
1829
|
+
const ret = {};
|
|
1830
|
+
for (const asset of assets) {
|
|
1831
|
+
const assetType = assetTypeMapping[asset.asset_type];
|
|
1832
|
+
if (!assetType) {
|
|
1833
|
+
console.error(
|
|
1834
|
+
`Asset type with ID ${asset.asset_type} not found.
|
|
1835
|
+
Expected all referenced asset types to be populated.
|
|
1722
1836
|
Returning empty object to avoid fatal errors.`
|
|
1723
|
-
|
|
1724
|
-
|
|
1837
|
+
);
|
|
1838
|
+
return {};
|
|
1839
|
+
}
|
|
1840
|
+
ret[asset.offline_id] = assetType;
|
|
1725
1841
|
}
|
|
1726
|
-
ret
|
|
1842
|
+
return ret;
|
|
1727
1843
|
}
|
|
1728
|
-
return ret;
|
|
1729
|
-
};
|
|
1730
|
-
const selectComponentsByType = restructureCreateSelectorWithArgs(
|
|
1731
|
-
toolkit.createSelector(
|
|
1732
|
-
[selectComponents, (_state, componentTypeId) => componentTypeId],
|
|
1733
|
-
(components, componentTypeId) => {
|
|
1734
|
-
return components.filter((component) => component.component_type === componentTypeId);
|
|
1735
|
-
}
|
|
1736
|
-
)
|
|
1737
1844
|
);
|
|
1738
|
-
const
|
|
1845
|
+
const selectNumberOfAssetsOfAssetType = (assetTypeId) => (state) => {
|
|
1739
1846
|
var _a2;
|
|
1740
|
-
if (!
|
|
1847
|
+
if (!assetTypeId)
|
|
1741
1848
|
return 0;
|
|
1742
|
-
return (_a2 =
|
|
1849
|
+
return (_a2 = selectAssetsOfAssetType(assetTypeId)(state)) == null ? void 0 : _a2.length;
|
|
1743
1850
|
};
|
|
1744
|
-
const
|
|
1745
|
-
return
|
|
1746
|
-
const
|
|
1747
|
-
if (
|
|
1748
|
-
acc.push(
|
|
1851
|
+
const selectAssetTypesFromIds = (assetTypeIds) => (state) => {
|
|
1852
|
+
return assetTypeIds.reduce((acc, assetTypeId) => {
|
|
1853
|
+
const assetType = state.assetTypeReducer.assetTypes[assetTypeId];
|
|
1854
|
+
if (assetType) {
|
|
1855
|
+
acc.push(assetType);
|
|
1749
1856
|
}
|
|
1750
1857
|
return acc;
|
|
1751
1858
|
}, []);
|
|
1752
1859
|
};
|
|
1753
|
-
const
|
|
1754
|
-
const
|
|
1755
|
-
[
|
|
1860
|
+
const selectAssetAttachmentMapping = (state) => state.assetReducer.attachments;
|
|
1861
|
+
const selectAssetAttachments = toolkit.createSelector(
|
|
1862
|
+
[selectAssetAttachmentMapping],
|
|
1756
1863
|
(mapping) => Object.values(mapping)
|
|
1757
1864
|
);
|
|
1758
|
-
const
|
|
1759
|
-
return state.
|
|
1865
|
+
const selectAssetAttachment = (attachmentId) => (state) => {
|
|
1866
|
+
return state.assetReducer.attachments[attachmentId];
|
|
1760
1867
|
};
|
|
1761
|
-
const
|
|
1868
|
+
const selectAttachmentsOfAsset = restructureCreateSelectorWithArgs(
|
|
1762
1869
|
toolkit.createSelector(
|
|
1763
|
-
[
|
|
1764
|
-
(attachments,
|
|
1765
|
-
return attachments.filter(({
|
|
1870
|
+
[selectAssetAttachments, (_state, assetId) => assetId],
|
|
1871
|
+
(attachments, assetId) => {
|
|
1872
|
+
return attachments.filter(({ asset }) => assetId === asset);
|
|
1766
1873
|
}
|
|
1767
1874
|
)
|
|
1768
1875
|
);
|
|
1769
|
-
const
|
|
1876
|
+
const selectAttachmentsOfAssetsByType = restructureCreateSelectorWithArgs(
|
|
1770
1877
|
toolkit.createSelector(
|
|
1771
|
-
[
|
|
1772
|
-
(attachments,
|
|
1773
|
-
const
|
|
1774
|
-
const fileAttachments =
|
|
1878
|
+
[selectAssetAttachments, (_state, assetId) => assetId],
|
|
1879
|
+
(attachments, assetId) => {
|
|
1880
|
+
const attachmentsOfAsset = attachments.filter(({ asset }) => assetId === asset);
|
|
1881
|
+
const fileAttachments = attachmentsOfAsset.filter(
|
|
1775
1882
|
// this null check here is necessary, there are cases where file_type is null or undefined
|
|
1776
1883
|
({ file_type }) => !file_type || !file_type.startsWith("image/")
|
|
1777
1884
|
);
|
|
1778
|
-
const imageAttachments =
|
|
1885
|
+
const imageAttachments = attachmentsOfAsset.filter(
|
|
1779
1886
|
// this null check here is necessary, there are cases where file_type is null or undefined
|
|
1780
1887
|
({ file_type }) => file_type && file_type.startsWith("image/")
|
|
1781
1888
|
);
|
|
@@ -1783,69 +1890,67 @@ var __publicField = (obj, key, value) => {
|
|
|
1783
1890
|
}
|
|
1784
1891
|
)
|
|
1785
1892
|
);
|
|
1786
|
-
const
|
|
1893
|
+
const assetReducer = assetSlice.reducer;
|
|
1787
1894
|
const initialState$o = {
|
|
1788
|
-
|
|
1895
|
+
completionsByAssetId: {}
|
|
1789
1896
|
};
|
|
1790
|
-
const
|
|
1791
|
-
name: "
|
|
1897
|
+
const assetStageCompletionSlice = toolkit.createSlice({
|
|
1898
|
+
name: "assetStageCompletions",
|
|
1792
1899
|
initialState: initialState$o,
|
|
1793
1900
|
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$o)),
|
|
1794
1901
|
reducers: {
|
|
1795
1902
|
addStageCompletion: (state, action) => {
|
|
1796
|
-
let stageToCompletionDateMapping = state.
|
|
1903
|
+
let stageToCompletionDateMapping = state.completionsByAssetId[action.payload.asset];
|
|
1797
1904
|
if (!stageToCompletionDateMapping) {
|
|
1798
1905
|
stageToCompletionDateMapping = {};
|
|
1799
|
-
state.
|
|
1906
|
+
state.completionsByAssetId[action.payload.asset] = stageToCompletionDateMapping;
|
|
1800
1907
|
}
|
|
1801
1908
|
stageToCompletionDateMapping[action.payload.stage] = (/* @__PURE__ */ new Date()).toISOString();
|
|
1802
1909
|
},
|
|
1803
1910
|
addStageCompletions: (state, action) => {
|
|
1804
|
-
for (const [
|
|
1911
|
+
for (const [assetId, stageIdToCompletionDateMapping] of Object.entries(action.payload)) {
|
|
1805
1912
|
if (Object.keys(stageIdToCompletionDateMapping).length === 0)
|
|
1806
|
-
throw new Error(
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
if (thisComponentCompletions === void 0) {
|
|
1811
|
-
thisComponentCompletions = {};
|
|
1913
|
+
throw new Error(`Encountered empty stageIdToCompletionDateMapping argument for asset ${assetId}`);
|
|
1914
|
+
let thisAssetCompletions = state.completionsByAssetId[assetId];
|
|
1915
|
+
if (thisAssetCompletions === void 0) {
|
|
1916
|
+
thisAssetCompletions = {};
|
|
1812
1917
|
}
|
|
1813
1918
|
for (const [stageId, completionDate] of Object.entries(stageIdToCompletionDateMapping)) {
|
|
1814
|
-
|
|
1919
|
+
thisAssetCompletions[stageId] = completionDate;
|
|
1815
1920
|
}
|
|
1816
|
-
state.
|
|
1921
|
+
state.completionsByAssetId[assetId] = thisAssetCompletions;
|
|
1817
1922
|
}
|
|
1818
1923
|
},
|
|
1819
1924
|
removeStageCompletions: (state, action) => {
|
|
1820
1925
|
for (const completion of action.payload) {
|
|
1821
|
-
const
|
|
1822
|
-
if (!
|
|
1926
|
+
const thisAssetCompletions = state.completionsByAssetId[completion.asset];
|
|
1927
|
+
if (!thisAssetCompletions || !(completion.stage in thisAssetCompletions)) {
|
|
1823
1928
|
console.warn(
|
|
1824
1929
|
"Skipping removal of uncompleted stage. This message indicates completion objects are created unnecessarily."
|
|
1825
1930
|
);
|
|
1826
1931
|
continue;
|
|
1827
1932
|
}
|
|
1828
|
-
delete
|
|
1933
|
+
delete thisAssetCompletions[completion.stage];
|
|
1829
1934
|
}
|
|
1830
1935
|
},
|
|
1831
1936
|
setStageCompletions: (state, action) => {
|
|
1832
|
-
state.
|
|
1937
|
+
state.completionsByAssetId = action.payload;
|
|
1833
1938
|
}
|
|
1834
1939
|
}
|
|
1835
1940
|
});
|
|
1836
|
-
const { addStageCompletion, addStageCompletions, removeStageCompletions, setStageCompletions } =
|
|
1941
|
+
const { addStageCompletion, addStageCompletions, removeStageCompletions, setStageCompletions } = assetStageCompletionSlice.actions;
|
|
1837
1942
|
const selectCompletedStages = (state) => {
|
|
1838
|
-
return state.
|
|
1943
|
+
return state.assetStageCompletionReducer.completionsByAssetId;
|
|
1839
1944
|
};
|
|
1840
|
-
const
|
|
1841
|
-
return Object.keys(state.
|
|
1945
|
+
const selectCompletedStageIdsForAsset = (asset) => (state) => {
|
|
1946
|
+
return Object.keys(state.assetStageCompletionReducer.completionsByAssetId[asset.offline_id] ?? {});
|
|
1842
1947
|
};
|
|
1843
|
-
const
|
|
1948
|
+
const assetStageCompletionReducer = assetStageCompletionSlice.reducer;
|
|
1844
1949
|
const initialState$n = {
|
|
1845
1950
|
stages: {}
|
|
1846
1951
|
};
|
|
1847
|
-
const
|
|
1848
|
-
name: "
|
|
1952
|
+
const assetStageSlice = toolkit.createSlice({
|
|
1953
|
+
name: "assetStages",
|
|
1849
1954
|
initialState: initialState$n,
|
|
1850
1955
|
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$n)),
|
|
1851
1956
|
reducers: {
|
|
@@ -1880,60 +1985,48 @@ var __publicField = (obj, key, value) => {
|
|
|
1880
1985
|
}
|
|
1881
1986
|
}
|
|
1882
1987
|
});
|
|
1883
|
-
const selectStageMapping = (state) => state.
|
|
1988
|
+
const selectStageMapping = (state) => state.assetStageReducer.stages;
|
|
1884
1989
|
const selectStage = restructureCreateSelectorWithArgs(
|
|
1885
1990
|
toolkit.createSelector([selectStageMapping, (_state, stageId) => stageId], (stageMapping, stageId) => {
|
|
1886
1991
|
return stageMapping[stageId];
|
|
1887
1992
|
})
|
|
1888
1993
|
);
|
|
1889
|
-
const selectStages = toolkit.createSelector(
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
const ret = {};
|
|
1901
|
-
for (const stage of stages) {
|
|
1902
|
-
if (componentTypeIdsSet.has(stage.component_type)) {
|
|
1903
|
-
if (!ret[stage.component_type]) {
|
|
1904
|
-
ret[stage.component_type] = [];
|
|
1905
|
-
}
|
|
1906
|
-
ret[stage.component_type].push(stage);
|
|
1994
|
+
const selectStages = toolkit.createSelector([selectStageMapping], (stageMapping) => {
|
|
1995
|
+
return Object.values(stageMapping);
|
|
1996
|
+
});
|
|
1997
|
+
const selectStagesFromAssetTypeIds = restructureCreateSelectorWithArgs(
|
|
1998
|
+
toolkit.createSelector([selectStages, (_state, assetTypeIds) => assetTypeIds], (stages, assetTypeIds) => {
|
|
1999
|
+
const assetTypeIdsSet = new Set(assetTypeIds);
|
|
2000
|
+
const ret = {};
|
|
2001
|
+
for (const stage of stages) {
|
|
2002
|
+
if (assetTypeIdsSet.has(stage.asset_type)) {
|
|
2003
|
+
if (!ret[stage.asset_type]) {
|
|
2004
|
+
ret[stage.asset_type] = [];
|
|
1907
2005
|
}
|
|
2006
|
+
ret[stage.asset_type].push(stage);
|
|
1908
2007
|
}
|
|
1909
|
-
for (const key in ret) {
|
|
1910
|
-
ret[key] = ret[key].sort((a, b) => a.priority - b.priority);
|
|
1911
|
-
}
|
|
1912
|
-
return ret;
|
|
1913
2008
|
}
|
|
1914
|
-
|
|
2009
|
+
for (const key in ret) {
|
|
2010
|
+
ret[key] = ret[key].sort((a, b) => a.priority - b.priority);
|
|
2011
|
+
}
|
|
2012
|
+
return ret;
|
|
2013
|
+
})
|
|
1915
2014
|
);
|
|
1916
|
-
const
|
|
1917
|
-
toolkit.createSelector(
|
|
1918
|
-
|
|
1919
|
-
(
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
if (stage.component_type === componentTypeId) {
|
|
1923
|
-
componentTypeStagesMapping[stageId] = stage;
|
|
1924
|
-
}
|
|
2015
|
+
const selectAssetTypeStagesMapping = restructureCreateSelectorWithArgs(
|
|
2016
|
+
toolkit.createSelector([selectStageMapping, (_state, assetTypeId) => assetTypeId], (stagesMapping, assetTypeId) => {
|
|
2017
|
+
const assetTypeStagesMapping = {};
|
|
2018
|
+
for (const [stageId, stage] of Object.entries(stagesMapping)) {
|
|
2019
|
+
if (stage.asset_type === assetTypeId) {
|
|
2020
|
+
assetTypeStagesMapping[stageId] = stage;
|
|
1925
2021
|
}
|
|
1926
|
-
return componentTypeStagesMapping;
|
|
1927
2022
|
}
|
|
1928
|
-
|
|
2023
|
+
return assetTypeStagesMapping;
|
|
2024
|
+
})
|
|
1929
2025
|
);
|
|
1930
|
-
const
|
|
1931
|
-
toolkit.createSelector(
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
return stages.filter((stage) => stage.component_type === componentTypeId).sort((a, b) => a.priority - b.priority);
|
|
1935
|
-
}
|
|
1936
|
-
)
|
|
2026
|
+
const selectStagesOfAssetType = restructureCreateSelectorWithArgs(
|
|
2027
|
+
toolkit.createSelector([selectStages, (_state, assetTypeId) => assetTypeId], (stages, assetTypeId) => {
|
|
2028
|
+
return stages.filter((stage) => stage.asset_type === assetTypeId).sort((a, b) => a.priority - b.priority);
|
|
2029
|
+
})
|
|
1937
2030
|
);
|
|
1938
2031
|
const selectStagesFromStageIds = restructureCreateSelectorWithArgs(
|
|
1939
2032
|
toolkit.createSelector([selectStageMapping, (_state, stageIds) => stageIds], (stageMapping, stageIds) => {
|
|
@@ -1955,140 +2048,15 @@ var __publicField = (obj, key, value) => {
|
|
|
1955
2048
|
return ret;
|
|
1956
2049
|
})
|
|
1957
2050
|
);
|
|
1958
|
-
const { addStages, updateStages, removeStages, linkStageToForm, unlinkStageToForm } =
|
|
1959
|
-
const
|
|
2051
|
+
const { addStages, updateStages, removeStages, linkStageToForm, unlinkStageToForm } = assetStageSlice.actions;
|
|
2052
|
+
const assetStageReducer = assetStageSlice.reducer;
|
|
1960
2053
|
const initialState$m = {
|
|
1961
|
-
componentTypes: {},
|
|
1962
|
-
hiddenComponentTypeIds: {},
|
|
1963
|
-
attachments: {}
|
|
1964
|
-
};
|
|
1965
|
-
const componentTypeSlice = toolkit.createSlice({
|
|
1966
|
-
name: "componentTypes",
|
|
1967
|
-
initialState: initialState$m,
|
|
1968
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$m)),
|
|
1969
|
-
reducers: {
|
|
1970
|
-
addComponentType: (state, action) => {
|
|
1971
|
-
state.componentTypes[action.payload.offline_id] = action.payload;
|
|
1972
|
-
},
|
|
1973
|
-
setComponentTypes: (state, action) => {
|
|
1974
|
-
state.componentTypes = toOfflineIdRecord(action.payload);
|
|
1975
|
-
},
|
|
1976
|
-
toggleComponentTypeVisibility: (state, action) => {
|
|
1977
|
-
state.hiddenComponentTypeIds[action.payload] = !state.hiddenComponentTypeIds[action.payload];
|
|
1978
|
-
},
|
|
1979
|
-
deleteComponentType: (state, action) => {
|
|
1980
|
-
delete state.componentTypes[action.payload];
|
|
1981
|
-
},
|
|
1982
|
-
// Attachments
|
|
1983
|
-
setComponentTypeAttachment: setAttachment,
|
|
1984
|
-
setComponentTypeAttachments: setAttachments,
|
|
1985
|
-
addComponentTypeAttachment: addAttachment,
|
|
1986
|
-
addComponentTypeAttachments: addAttachments,
|
|
1987
|
-
updateComponentTypeAttachment: updateAttachment,
|
|
1988
|
-
updateComponentTypeAttachments: updateAttachments,
|
|
1989
|
-
removeComponentTypeAttachment: removeAttachment,
|
|
1990
|
-
removeComponentTypeAttachments: removeAttachments
|
|
1991
|
-
}
|
|
1992
|
-
});
|
|
1993
|
-
const {
|
|
1994
|
-
addComponentType,
|
|
1995
|
-
setComponentTypes,
|
|
1996
|
-
toggleComponentTypeVisibility,
|
|
1997
|
-
deleteComponentType,
|
|
1998
|
-
// Attachmet
|
|
1999
|
-
setComponentTypeAttachment,
|
|
2000
|
-
setComponentTypeAttachments,
|
|
2001
|
-
addComponentTypeAttachment,
|
|
2002
|
-
addComponentTypeAttachments,
|
|
2003
|
-
updateComponentTypeAttachment,
|
|
2004
|
-
updateComponentTypeAttachments,
|
|
2005
|
-
removeComponentTypeAttachment,
|
|
2006
|
-
removeComponentTypeAttachments
|
|
2007
|
-
} = componentTypeSlice.actions;
|
|
2008
|
-
const selectComponentTypesMapping = (state) => state.componentTypeReducer.componentTypes;
|
|
2009
|
-
const selectComponentTypes = toolkit.createSelector(
|
|
2010
|
-
[selectComponentTypesMapping],
|
|
2011
|
-
(mapping) => Object.values(mapping)
|
|
2012
|
-
);
|
|
2013
|
-
const selectComponentType = restructureCreateSelectorWithArgs(
|
|
2014
|
-
toolkit.createSelector([selectComponentTypesMapping, (_state, id) => id], (mapping, id) => mapping[id])
|
|
2015
|
-
);
|
|
2016
|
-
const selectNumberOfComponentTypesMatchingCaseInsensitiveName = restructureCreateSelectorWithArgs(
|
|
2017
|
-
toolkit.createSelector(
|
|
2018
|
-
[
|
|
2019
|
-
selectComponentTypesMapping,
|
|
2020
|
-
(_state, args) => args
|
|
2021
|
-
],
|
|
2022
|
-
(mapping, args) => {
|
|
2023
|
-
var _a2;
|
|
2024
|
-
const name = ((_a2 = args.name) == null ? void 0 : _a2.toLowerCase()) ?? null;
|
|
2025
|
-
return Object.values(mapping).filter(
|
|
2026
|
-
(componentType) => {
|
|
2027
|
-
var _a3;
|
|
2028
|
-
return (((_a3 = componentType.name) == null ? void 0 : _a3.toLowerCase()) ?? null) === name && componentType.offline_id !== args.componentTypeId;
|
|
2029
|
-
}
|
|
2030
|
-
).length;
|
|
2031
|
-
}
|
|
2032
|
-
)
|
|
2033
|
-
);
|
|
2034
|
-
const selectComponentTypesByName = restructureCreateSelectorWithArgs(
|
|
2035
|
-
toolkit.createSelector(
|
|
2036
|
-
[selectComponentTypesMapping, (_state, name) => name],
|
|
2037
|
-
(mapping, name) => {
|
|
2038
|
-
name = (name == null ? void 0 : name.toLowerCase()) ?? null;
|
|
2039
|
-
return Object.values(mapping).filter(
|
|
2040
|
-
(componentType) => {
|
|
2041
|
-
var _a2;
|
|
2042
|
-
return (((_a2 = componentType.name) == null ? void 0 : _a2.toLowerCase()) ?? null) === name;
|
|
2043
|
-
}
|
|
2044
|
-
);
|
|
2045
|
-
}
|
|
2046
|
-
)
|
|
2047
|
-
);
|
|
2048
|
-
const selectHiddenComponentTypeIds = (state) => state.componentTypeReducer.hiddenComponentTypeIds;
|
|
2049
|
-
const selectComponentTypeAttachmentMapping = (state) => state.componentTypeReducer.attachments;
|
|
2050
|
-
const selectAllComponentTypeAttachments = toolkit.createSelector(
|
|
2051
|
-
[selectComponentTypeAttachmentMapping],
|
|
2052
|
-
(mapping) => Object.values(mapping)
|
|
2053
|
-
);
|
|
2054
|
-
const selectComponentTypeAttachment = (attachmentId) => (state) => {
|
|
2055
|
-
return state.componentTypeReducer.attachments[attachmentId];
|
|
2056
|
-
};
|
|
2057
|
-
const selectAttachmentsOfComponentType = restructureCreateSelectorWithArgs(
|
|
2058
|
-
toolkit.createSelector(
|
|
2059
|
-
[selectAllComponentTypeAttachments, (_state, componentTypeId) => componentTypeId],
|
|
2060
|
-
(attachments, componentTypeId) => {
|
|
2061
|
-
return attachments.filter(({ component_type }) => componentTypeId === component_type);
|
|
2062
|
-
}
|
|
2063
|
-
)
|
|
2064
|
-
);
|
|
2065
|
-
const selectAttachmentsOfComponentTypeByType = restructureCreateSelectorWithArgs(
|
|
2066
|
-
toolkit.createSelector(
|
|
2067
|
-
[selectAllComponentTypeAttachments, (_state, componentTypeId) => componentTypeId],
|
|
2068
|
-
(attachments, componentTypeId) => {
|
|
2069
|
-
const attachmentsOfComponent = attachments.filter(
|
|
2070
|
-
({ component_type }) => component_type === componentTypeId
|
|
2071
|
-
);
|
|
2072
|
-
const fileAttachments = attachmentsOfComponent.filter(
|
|
2073
|
-
// this null check here is necessary, there are cases where file_type is null or undefined
|
|
2074
|
-
({ file_type }) => !file_type || !file_type.startsWith("image/")
|
|
2075
|
-
);
|
|
2076
|
-
const imageAttachments = attachmentsOfComponent.filter(
|
|
2077
|
-
// this null check here is necessary, there are cases where file_type is null or undefined
|
|
2078
|
-
({ file_type }) => file_type && file_type.startsWith("image/")
|
|
2079
|
-
);
|
|
2080
|
-
return { fileAttachments, imageAttachments };
|
|
2081
|
-
}
|
|
2082
|
-
)
|
|
2083
|
-
);
|
|
2084
|
-
const componentTypeReducer = componentTypeSlice.reducer;
|
|
2085
|
-
const initialState$l = {
|
|
2086
2054
|
workspaces: {},
|
|
2087
2055
|
activeWorkspaceId: null
|
|
2088
2056
|
};
|
|
2089
2057
|
const workspaceSlice = toolkit.createSlice({
|
|
2090
2058
|
name: "workspace",
|
|
2091
|
-
initialState: initialState$
|
|
2059
|
+
initialState: initialState$m,
|
|
2092
2060
|
// The `reducers` field lets us define reducers and generate associated actions
|
|
2093
2061
|
reducers: {
|
|
2094
2062
|
setWorkspaces: (state, action) => {
|
|
@@ -2145,7 +2113,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2145
2113
|
);
|
|
2146
2114
|
const workspaceReducer = workspaceSlice.reducer;
|
|
2147
2115
|
const maxRecentIssues = 10;
|
|
2148
|
-
const initialState$
|
|
2116
|
+
const initialState$l = {
|
|
2149
2117
|
issues: {},
|
|
2150
2118
|
attachments: {},
|
|
2151
2119
|
comments: {},
|
|
@@ -2157,9 +2125,9 @@ var __publicField = (obj, key, value) => {
|
|
|
2157
2125
|
};
|
|
2158
2126
|
const issueSlice = toolkit.createSlice({
|
|
2159
2127
|
name: "issues",
|
|
2160
|
-
initialState: initialState$
|
|
2128
|
+
initialState: initialState$l,
|
|
2161
2129
|
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
2162
|
-
Object.assign(state, initialState$
|
|
2130
|
+
Object.assign(state, initialState$l);
|
|
2163
2131
|
}),
|
|
2164
2132
|
reducers: {
|
|
2165
2133
|
setIssues: (state, action) => {
|
|
@@ -2592,14 +2560,14 @@ var __publicField = (obj, key, value) => {
|
|
|
2592
2560
|
}
|
|
2593
2561
|
);
|
|
2594
2562
|
const issueReducer = issueSlice.reducer;
|
|
2595
|
-
const initialState$
|
|
2563
|
+
const initialState$k = {
|
|
2596
2564
|
issueTypes: {}
|
|
2597
2565
|
};
|
|
2598
2566
|
const issueTypeSlice = toolkit.createSlice({
|
|
2599
2567
|
name: "issueTypes",
|
|
2600
|
-
initialState: initialState$
|
|
2568
|
+
initialState: initialState$k,
|
|
2601
2569
|
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
2602
|
-
Object.assign(state, initialState$
|
|
2570
|
+
Object.assign(state, initialState$k);
|
|
2603
2571
|
}),
|
|
2604
2572
|
reducers: {
|
|
2605
2573
|
setIssueTypes: (state, action) => {
|
|
@@ -2666,15 +2634,15 @@ var __publicField = (obj, key, value) => {
|
|
|
2666
2634
|
return ((_a2 = selectIssuesOfIssueType(issueTypeId)(state)) == null ? void 0 : _a2.length) ?? 0;
|
|
2667
2635
|
};
|
|
2668
2636
|
const issueTypeReducer = issueTypeSlice.reducer;
|
|
2669
|
-
const initialState$
|
|
2637
|
+
const initialState$j = {
|
|
2670
2638
|
s3Urls: {}
|
|
2671
2639
|
};
|
|
2672
2640
|
const msPerHour = 1e3 * 60 * 60;
|
|
2673
2641
|
const msPerWeek = msPerHour * 24 * 7;
|
|
2674
2642
|
const fileSlice = toolkit.createSlice({
|
|
2675
2643
|
name: "file",
|
|
2676
|
-
initialState: initialState$
|
|
2677
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2644
|
+
initialState: initialState$j,
|
|
2645
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$j)),
|
|
2678
2646
|
reducers: {
|
|
2679
2647
|
setUploadUrl: (state, action) => {
|
|
2680
2648
|
const { url, fields, sha1 } = action.payload;
|
|
@@ -2701,7 +2669,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2701
2669
|
return url;
|
|
2702
2670
|
};
|
|
2703
2671
|
const fileReducer = fileSlice.reducer;
|
|
2704
|
-
const initialState$
|
|
2672
|
+
const initialState$i = {
|
|
2705
2673
|
// TODO: Change first MapStyle.SATELLITE to MaptStyle.None when project creation map is fixed
|
|
2706
2674
|
mapStyle: MapStyle.SATELLITE,
|
|
2707
2675
|
showTooltips: false,
|
|
@@ -2709,8 +2677,8 @@ var __publicField = (obj, key, value) => {
|
|
|
2709
2677
|
};
|
|
2710
2678
|
const mapSlice = toolkit.createSlice({
|
|
2711
2679
|
name: "map",
|
|
2712
|
-
initialState: initialState$
|
|
2713
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2680
|
+
initialState: initialState$i,
|
|
2681
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$i)),
|
|
2714
2682
|
reducers: {
|
|
2715
2683
|
setMapStyle: (state, action) => {
|
|
2716
2684
|
state.mapStyle = action.payload;
|
|
@@ -2740,8 +2708,8 @@ var __publicField = (obj, key, value) => {
|
|
|
2740
2708
|
})(OrganizationAccessLevel || {});
|
|
2741
2709
|
var AttachmentModel = /* @__PURE__ */ ((AttachmentModel2) => {
|
|
2742
2710
|
AttachmentModel2["Issue"] = "issue";
|
|
2743
|
-
AttachmentModel2["
|
|
2744
|
-
AttachmentModel2["
|
|
2711
|
+
AttachmentModel2["Asset"] = "asset";
|
|
2712
|
+
AttachmentModel2["AssetType"] = "asset_type";
|
|
2745
2713
|
AttachmentModel2["Project"] = "project";
|
|
2746
2714
|
AttachmentModel2["Document"] = "document";
|
|
2747
2715
|
return AttachmentModel2;
|
|
@@ -2787,7 +2755,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2787
2755
|
LicenseStatus2[LicenseStatus2["PAST_DUE"] = 8] = "PAST_DUE";
|
|
2788
2756
|
return LicenseStatus2;
|
|
2789
2757
|
})(LicenseStatus || {});
|
|
2790
|
-
const initialState$
|
|
2758
|
+
const initialState$h = {
|
|
2791
2759
|
users: {},
|
|
2792
2760
|
currentUser: {
|
|
2793
2761
|
id: 0,
|
|
@@ -2798,8 +2766,8 @@ var __publicField = (obj, key, value) => {
|
|
|
2798
2766
|
};
|
|
2799
2767
|
const userSlice = toolkit.createSlice({
|
|
2800
2768
|
name: "users",
|
|
2801
|
-
initialState: initialState$
|
|
2802
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2769
|
+
initialState: initialState$h,
|
|
2770
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$h)),
|
|
2803
2771
|
reducers: {
|
|
2804
2772
|
setUsers: (state, action) => {
|
|
2805
2773
|
const usersMapping = {};
|
|
@@ -2861,13 +2829,13 @@ var __publicField = (obj, key, value) => {
|
|
|
2861
2829
|
const selectUsersAsMapping = (state) => state.userReducer.users;
|
|
2862
2830
|
const selectFavouriteProjects = (state) => state.userReducer.currentUser.profile.favourite_project_ids;
|
|
2863
2831
|
const userReducer = userSlice.reducer;
|
|
2864
|
-
const initialState$
|
|
2832
|
+
const initialState$g = {
|
|
2865
2833
|
organizationAccesses: {}
|
|
2866
2834
|
};
|
|
2867
2835
|
const organizationAccessSlice = toolkit.createSlice({
|
|
2868
2836
|
name: "organizationAccess",
|
|
2869
|
-
initialState: initialState$
|
|
2870
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2837
|
+
initialState: initialState$g,
|
|
2838
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$g)),
|
|
2871
2839
|
reducers: {
|
|
2872
2840
|
setOrganizationAccesses: (state, action) => {
|
|
2873
2841
|
if (!Array.isArray(action.payload))
|
|
@@ -2930,13 +2898,13 @@ var __publicField = (obj, key, value) => {
|
|
|
2930
2898
|
return organizationAccesses;
|
|
2931
2899
|
};
|
|
2932
2900
|
const organizationAccessReducer = organizationAccessSlice.reducer;
|
|
2933
|
-
const initialState$
|
|
2901
|
+
const initialState$f = {
|
|
2934
2902
|
licenses: {}
|
|
2935
2903
|
};
|
|
2936
2904
|
const licenseSlice = toolkit.createSlice({
|
|
2937
2905
|
name: "license",
|
|
2938
|
-
initialState: initialState$
|
|
2939
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2906
|
+
initialState: initialState$f,
|
|
2907
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$f)),
|
|
2940
2908
|
reducers: {
|
|
2941
2909
|
setLicenses: (state, action) => {
|
|
2942
2910
|
if (!Array.isArray(action.payload))
|
|
@@ -2981,13 +2949,13 @@ var __publicField = (obj, key, value) => {
|
|
|
2981
2949
|
(licenses) => Object.values(licenses).filter((license) => license.project).reduce((accum, license) => ({ ...accum, [license.project]: license }), {})
|
|
2982
2950
|
);
|
|
2983
2951
|
const licenseReducer = licenseSlice.reducer;
|
|
2984
|
-
const initialState$
|
|
2952
|
+
const initialState$e = {
|
|
2985
2953
|
projectAccesses: {}
|
|
2986
2954
|
};
|
|
2987
2955
|
const projectAccessSlice = toolkit.createSlice({
|
|
2988
2956
|
name: "projectAccess",
|
|
2989
|
-
initialState: initialState$
|
|
2990
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2957
|
+
initialState: initialState$e,
|
|
2958
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$e)),
|
|
2991
2959
|
reducers: {
|
|
2992
2960
|
setProjectAccesses: (state, action) => {
|
|
2993
2961
|
if (!Array.isArray(action.payload))
|
|
@@ -3055,7 +3023,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3055
3023
|
return projectAccesses;
|
|
3056
3024
|
};
|
|
3057
3025
|
const projectAccessReducer = projectAccessSlice.reducer;
|
|
3058
|
-
const initialState$
|
|
3026
|
+
const initialState$d = {
|
|
3059
3027
|
projects: {},
|
|
3060
3028
|
activeProjectId: null,
|
|
3061
3029
|
recentProjectIds: [],
|
|
@@ -3065,7 +3033,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3065
3033
|
};
|
|
3066
3034
|
const projectSlice = toolkit.createSlice({
|
|
3067
3035
|
name: "projects",
|
|
3068
|
-
initialState: initialState$
|
|
3036
|
+
initialState: initialState$d,
|
|
3069
3037
|
reducers: {
|
|
3070
3038
|
setProjects: (state, action) => {
|
|
3071
3039
|
const projectsMap = {};
|
|
@@ -3259,14 +3227,14 @@ var __publicField = (obj, key, value) => {
|
|
|
3259
3227
|
}
|
|
3260
3228
|
)
|
|
3261
3229
|
);
|
|
3262
|
-
const initialState$
|
|
3230
|
+
const initialState$c = {
|
|
3263
3231
|
organizations: {},
|
|
3264
3232
|
activeOrganizationId: null
|
|
3265
3233
|
};
|
|
3266
3234
|
const organizationSlice = toolkit.createSlice({
|
|
3267
3235
|
name: "organizations",
|
|
3268
|
-
initialState: initialState$
|
|
3269
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3236
|
+
initialState: initialState$c,
|
|
3237
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$c)),
|
|
3270
3238
|
reducers: {
|
|
3271
3239
|
setOrganizations: (state, action) => {
|
|
3272
3240
|
for (const org of action.payload) {
|
|
@@ -3385,14 +3353,14 @@ var __publicField = (obj, key, value) => {
|
|
|
3385
3353
|
}
|
|
3386
3354
|
};
|
|
3387
3355
|
};
|
|
3388
|
-
const initialState$
|
|
3356
|
+
const initialState$b = {
|
|
3389
3357
|
deletedRequests: [],
|
|
3390
3358
|
latestRetryTime: 0
|
|
3391
3359
|
};
|
|
3392
3360
|
const outboxSlice = toolkit.createSlice({
|
|
3393
3361
|
name: "outbox",
|
|
3394
|
-
initialState: initialState$
|
|
3395
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3362
|
+
initialState: initialState$b,
|
|
3363
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$b)),
|
|
3396
3364
|
reducers: {
|
|
3397
3365
|
// enqueueActions is a reducer that does nothing but enqueue API request to the Redux Offline outbox
|
|
3398
3366
|
// Whenever an issue is being created, a reducer addIssue() is responsible for adding it to the offline store
|
|
@@ -3424,7 +3392,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3424
3392
|
const selectLatestRetryTime = (state) => state.outboxReducer.latestRetryTime;
|
|
3425
3393
|
const { enqueueRequest, markForDeletion, markAsDeleted, _setLatestRetryTime } = outboxSlice.actions;
|
|
3426
3394
|
const outboxReducer = outboxSlice.reducer;
|
|
3427
|
-
const initialState$
|
|
3395
|
+
const initialState$a = {
|
|
3428
3396
|
projectFiles: {},
|
|
3429
3397
|
activeProjectFileId: null,
|
|
3430
3398
|
isImportingProjectFile: false,
|
|
@@ -3432,8 +3400,8 @@ var __publicField = (obj, key, value) => {
|
|
|
3432
3400
|
};
|
|
3433
3401
|
const projectFileSlice = toolkit.createSlice({
|
|
3434
3402
|
name: "projectFiles",
|
|
3435
|
-
initialState: initialState$
|
|
3436
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3403
|
+
initialState: initialState$a,
|
|
3404
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$a)),
|
|
3437
3405
|
reducers: {
|
|
3438
3406
|
addOrReplaceProjectFiles: (state, action) => {
|
|
3439
3407
|
for (let fileObj of action.payload) {
|
|
@@ -3534,12 +3502,12 @@ var __publicField = (obj, key, value) => {
|
|
|
3534
3502
|
const selectActiveProjectFileId = (state) => state.projectFileReducer.activeProjectFileId;
|
|
3535
3503
|
const selectIsImportingProjectFile = (state) => state.projectFileReducer.isImportingProjectFile;
|
|
3536
3504
|
const projectFileReducer = projectFileSlice.reducer;
|
|
3537
|
-
const initialState$
|
|
3505
|
+
const initialState$9 = {
|
|
3538
3506
|
isRehydrated: false
|
|
3539
3507
|
};
|
|
3540
3508
|
const rehydratedSlice = toolkit.createSlice({
|
|
3541
3509
|
name: "rehydrated",
|
|
3542
|
-
initialState: initialState$
|
|
3510
|
+
initialState: initialState$9,
|
|
3543
3511
|
// The `reducers` field lets us define reducers and generate associated actions
|
|
3544
3512
|
reducers: {
|
|
3545
3513
|
setRehydrated: (state, action) => {
|
|
@@ -3549,11 +3517,12 @@ var __publicField = (obj, key, value) => {
|
|
|
3549
3517
|
});
|
|
3550
3518
|
const selectRehydrated = (state) => state.rehydratedReducer.isRehydrated;
|
|
3551
3519
|
const rehydratedReducer = rehydratedSlice.reducer;
|
|
3552
|
-
const initialState$
|
|
3520
|
+
const initialState$8 = {
|
|
3553
3521
|
useIssueTemplate: false,
|
|
3554
3522
|
placementMode: false,
|
|
3555
3523
|
enableClustering: false,
|
|
3556
3524
|
svgLayout: false,
|
|
3525
|
+
// TODO: this is no longer used
|
|
3557
3526
|
expandedSections: {
|
|
3558
3527
|
Issues: true,
|
|
3559
3528
|
"Map Layers": false,
|
|
@@ -3566,8 +3535,8 @@ var __publicField = (obj, key, value) => {
|
|
|
3566
3535
|
};
|
|
3567
3536
|
const settingSlice = toolkit.createSlice({
|
|
3568
3537
|
name: "settings",
|
|
3569
|
-
initialState: initialState$
|
|
3570
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3538
|
+
initialState: initialState$8,
|
|
3539
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$8)),
|
|
3571
3540
|
reducers: {
|
|
3572
3541
|
setEnableDuplicateIssues: (state, action) => {
|
|
3573
3542
|
state.useIssueTemplate = action.payload;
|
|
@@ -3626,14 +3595,14 @@ var __publicField = (obj, key, value) => {
|
|
|
3626
3595
|
return revisionA < revisionB ? -1 : 1;
|
|
3627
3596
|
}
|
|
3628
3597
|
};
|
|
3629
|
-
const initialState$
|
|
3598
|
+
const initialState$7 = {
|
|
3630
3599
|
formRevisions: {},
|
|
3631
3600
|
attachments: {}
|
|
3632
3601
|
};
|
|
3633
3602
|
const formRevisionsSlice = toolkit.createSlice({
|
|
3634
3603
|
name: "formRevisions",
|
|
3635
|
-
initialState: initialState$
|
|
3636
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3604
|
+
initialState: initialState$7,
|
|
3605
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$7)),
|
|
3637
3606
|
reducers: {
|
|
3638
3607
|
// revision related actions
|
|
3639
3608
|
setFormRevision: (state, action) => {
|
|
@@ -3764,27 +3733,27 @@ var __publicField = (obj, key, value) => {
|
|
|
3764
3733
|
});
|
|
3765
3734
|
})
|
|
3766
3735
|
);
|
|
3767
|
-
const
|
|
3736
|
+
const selectLatestFormRevisionsOfAssetTypes = restructureCreateSelectorWithArgs(
|
|
3768
3737
|
toolkit.createSelector(
|
|
3769
3738
|
[
|
|
3770
3739
|
(state) => state.formReducer.forms,
|
|
3771
3740
|
selectFormRevisionMapping,
|
|
3772
|
-
(_state,
|
|
3741
|
+
(_state, assetTypeIds) => assetTypeIds
|
|
3773
3742
|
],
|
|
3774
|
-
(userForms, revisions,
|
|
3775
|
-
const
|
|
3776
|
-
const
|
|
3743
|
+
(userForms, revisions, assetTypeIds) => {
|
|
3744
|
+
const assetTypeIdsSet = new Set(assetTypeIds);
|
|
3745
|
+
const formsOfAssetTypes = {};
|
|
3777
3746
|
const ret = {};
|
|
3778
3747
|
for (const form of Object.values(userForms)) {
|
|
3779
|
-
if (form.
|
|
3780
|
-
|
|
3748
|
+
if (form.asset_type && assetTypeIdsSet.has(form.asset_type)) {
|
|
3749
|
+
formsOfAssetTypes[form.offline_id] = form;
|
|
3781
3750
|
}
|
|
3782
3751
|
}
|
|
3783
3752
|
for (const revision of Object.values(revisions)) {
|
|
3784
|
-
const form =
|
|
3785
|
-
if (!form || !form.
|
|
3753
|
+
const form = formsOfAssetTypes[revision.form];
|
|
3754
|
+
if (!form || !form.asset_type || ret[form.asset_type] && formRevisionSortFn(ret[form.asset_type], revision) > 0)
|
|
3786
3755
|
continue;
|
|
3787
|
-
ret[form.
|
|
3756
|
+
ret[form.asset_type] = revision;
|
|
3788
3757
|
}
|
|
3789
3758
|
return ret;
|
|
3790
3759
|
}
|
|
@@ -3813,13 +3782,13 @@ var __publicField = (obj, key, value) => {
|
|
|
3813
3782
|
)
|
|
3814
3783
|
);
|
|
3815
3784
|
const formRevisionReducer = formRevisionsSlice.reducer;
|
|
3816
|
-
const initialState$
|
|
3785
|
+
const initialState$6 = {
|
|
3817
3786
|
forms: {}
|
|
3818
3787
|
};
|
|
3819
3788
|
const formSlice = toolkit.createSlice({
|
|
3820
3789
|
name: "forms",
|
|
3821
|
-
initialState: initialState$
|
|
3822
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3790
|
+
initialState: initialState$6,
|
|
3791
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$6)),
|
|
3823
3792
|
reducers: {
|
|
3824
3793
|
setForms: (state, action) => {
|
|
3825
3794
|
state.forms = {};
|
|
@@ -3901,11 +3870,11 @@ var __publicField = (obj, key, value) => {
|
|
|
3901
3870
|
const selectFormMapping = (state) => {
|
|
3902
3871
|
return state.formReducer.forms;
|
|
3903
3872
|
};
|
|
3904
|
-
const
|
|
3873
|
+
const selectFormOfAssetType = restructureCreateSelectorWithArgs(
|
|
3905
3874
|
toolkit.createSelector(
|
|
3906
|
-
[selectFormMapping, (_state,
|
|
3907
|
-
(userForms,
|
|
3908
|
-
return Object.values(userForms).find((userForm) => userForm.
|
|
3875
|
+
[selectFormMapping, (_state, assetTypeId) => assetTypeId],
|
|
3876
|
+
(userForms, assetTypeId) => {
|
|
3877
|
+
return Object.values(userForms).find((userForm) => userForm.asset_type === assetTypeId);
|
|
3909
3878
|
}
|
|
3910
3879
|
)
|
|
3911
3880
|
);
|
|
@@ -3921,17 +3890,17 @@ var __publicField = (obj, key, value) => {
|
|
|
3921
3890
|
return Object.keys(userForms).length;
|
|
3922
3891
|
});
|
|
3923
3892
|
const selectGeneralFormCount = toolkit.createSelector([selectFormMapping], (userForms) => {
|
|
3924
|
-
return Object.values(userForms).filter((form) => !form.
|
|
3893
|
+
return Object.values(userForms).filter((form) => !form.asset_type).length;
|
|
3925
3894
|
});
|
|
3926
3895
|
const formReducer = formSlice.reducer;
|
|
3927
|
-
const initialState$
|
|
3896
|
+
const initialState$5 = {
|
|
3928
3897
|
formSubmissions: {},
|
|
3929
3898
|
attachments: {}
|
|
3930
3899
|
};
|
|
3931
3900
|
const formSubmissionSlice = toolkit.createSlice({
|
|
3932
3901
|
name: "formSubmissions",
|
|
3933
|
-
initialState: initialState$
|
|
3934
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3902
|
+
initialState: initialState$5,
|
|
3903
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$5)),
|
|
3935
3904
|
reducers: {
|
|
3936
3905
|
setFormSubmission: (state, action) => {
|
|
3937
3906
|
state.formSubmissions[action.payload.offline_id] = action.payload;
|
|
@@ -4129,31 +4098,31 @@ var __publicField = (obj, key, value) => {
|
|
|
4129
4098
|
}
|
|
4130
4099
|
)
|
|
4131
4100
|
);
|
|
4132
|
-
const
|
|
4101
|
+
const selectFormSubmissionsOfAsset = restructureCreateSelectorWithArgs(
|
|
4133
4102
|
toolkit.createSelector(
|
|
4134
|
-
[selectFormSubmissions, (_state,
|
|
4135
|
-
(submissions,
|
|
4103
|
+
[selectFormSubmissions, (_state, assetId) => assetId],
|
|
4104
|
+
(submissions, assetId) => {
|
|
4136
4105
|
return submissions.filter((submission) => {
|
|
4137
|
-
return submission.
|
|
4106
|
+
return submission.asset === assetId;
|
|
4138
4107
|
});
|
|
4139
4108
|
}
|
|
4140
4109
|
)
|
|
4141
4110
|
);
|
|
4142
|
-
const
|
|
4143
|
-
[selectFormSubmissionsMapping,
|
|
4144
|
-
(submissions,
|
|
4111
|
+
const selectFormSubmissionsByAssets = toolkit.createSelector(
|
|
4112
|
+
[selectFormSubmissionsMapping, selectAssetsMapping],
|
|
4113
|
+
(submissions, assets) => {
|
|
4145
4114
|
var _a2;
|
|
4146
|
-
const
|
|
4147
|
-
for (const
|
|
4148
|
-
|
|
4115
|
+
const assetSubmissionMapping = {};
|
|
4116
|
+
for (const assetId in assets) {
|
|
4117
|
+
assetSubmissionMapping[assetId] = [];
|
|
4149
4118
|
}
|
|
4150
4119
|
for (const submissionId in submissions) {
|
|
4151
4120
|
const submission = submissions[submissionId];
|
|
4152
|
-
if (submission.
|
|
4153
|
-
(_a2 =
|
|
4121
|
+
if (submission.asset) {
|
|
4122
|
+
(_a2 = assetSubmissionMapping[submission.asset]) == null ? void 0 : _a2.push(submission);
|
|
4154
4123
|
}
|
|
4155
4124
|
}
|
|
4156
|
-
return
|
|
4125
|
+
return assetSubmissionMapping;
|
|
4157
4126
|
}
|
|
4158
4127
|
);
|
|
4159
4128
|
const selectFormSubmissionAttachmentsMapping = (state) => {
|
|
@@ -4168,12 +4137,12 @@ var __publicField = (obj, key, value) => {
|
|
|
4168
4137
|
)
|
|
4169
4138
|
);
|
|
4170
4139
|
const formSubmissionReducer = formSubmissionSlice.reducer;
|
|
4171
|
-
const initialState$
|
|
4140
|
+
const initialState$4 = {
|
|
4172
4141
|
emailDomains: {}
|
|
4173
4142
|
};
|
|
4174
4143
|
const emailDomainsSlice = toolkit.createSlice({
|
|
4175
4144
|
name: "emailDomains",
|
|
4176
|
-
initialState: initialState$
|
|
4145
|
+
initialState: initialState$4,
|
|
4177
4146
|
reducers: {
|
|
4178
4147
|
setEmailDomains: (state, action) => {
|
|
4179
4148
|
const emailDomains = {};
|
|
@@ -4200,15 +4169,15 @@ var __publicField = (obj, key, value) => {
|
|
|
4200
4169
|
(ed1, ed2) => ed1.domain.localeCompare(ed2.domain)
|
|
4201
4170
|
);
|
|
4202
4171
|
const emailDomainsReducer = emailDomainsSlice.reducer;
|
|
4203
|
-
const initialState$
|
|
4172
|
+
const initialState$3 = {
|
|
4204
4173
|
documents: {},
|
|
4205
4174
|
attachments: {}
|
|
4206
4175
|
};
|
|
4207
4176
|
const documentSlice = toolkit.createSlice({
|
|
4208
4177
|
name: "documents",
|
|
4209
|
-
initialState: initialState$
|
|
4178
|
+
initialState: initialState$3,
|
|
4210
4179
|
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
4211
|
-
Object.assign(state, initialState$
|
|
4180
|
+
Object.assign(state, initialState$3);
|
|
4212
4181
|
}),
|
|
4213
4182
|
reducers: {
|
|
4214
4183
|
setDocuments: (state, action) => {
|
|
@@ -4439,13 +4408,13 @@ var __publicField = (obj, key, value) => {
|
|
|
4439
4408
|
)
|
|
4440
4409
|
);
|
|
4441
4410
|
const documentsReducer = documentSlice.reducer;
|
|
4442
|
-
const initialState$
|
|
4411
|
+
const initialState$2 = {
|
|
4443
4412
|
teams: {}
|
|
4444
4413
|
};
|
|
4445
4414
|
const teamSlice = toolkit.createSlice({
|
|
4446
4415
|
name: "teams",
|
|
4447
|
-
initialState: initialState$
|
|
4448
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
4416
|
+
initialState: initialState$2,
|
|
4417
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$2)),
|
|
4449
4418
|
reducers: {
|
|
4450
4419
|
setTeam: (state, action) => {
|
|
4451
4420
|
state.teams[action.payload.offline_id] = action.payload;
|
|
@@ -4495,6 +4464,54 @@ var __publicField = (obj, key, value) => {
|
|
|
4495
4464
|
})
|
|
4496
4465
|
);
|
|
4497
4466
|
const teamReducer = teamSlice.reducer;
|
|
4467
|
+
const initialState$1 = {
|
|
4468
|
+
conversations: {}
|
|
4469
|
+
};
|
|
4470
|
+
const agentsSlice = toolkit.createSlice({
|
|
4471
|
+
name: "agents",
|
|
4472
|
+
initialState: initialState$1,
|
|
4473
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$1)),
|
|
4474
|
+
reducers: {
|
|
4475
|
+
setConversations: (state, action) => {
|
|
4476
|
+
state.conversations = {};
|
|
4477
|
+
for (const conversation of action.payload) {
|
|
4478
|
+
state.conversations[conversation.offline_id] = conversation;
|
|
4479
|
+
}
|
|
4480
|
+
},
|
|
4481
|
+
addConversation: (state, action) => {
|
|
4482
|
+
if (action.payload.offline_id in state.conversations) {
|
|
4483
|
+
throw new Error("Conversation already exists in history");
|
|
4484
|
+
}
|
|
4485
|
+
state.conversations[action.payload.offline_id] = action.payload;
|
|
4486
|
+
},
|
|
4487
|
+
setConversation: (state, action) => {
|
|
4488
|
+
if (!(action.payload.offline_id in state.conversations)) {
|
|
4489
|
+
throw new Error("Conversation does not exist in history");
|
|
4490
|
+
}
|
|
4491
|
+
state.conversations[action.payload.offline_id] = action.payload;
|
|
4492
|
+
},
|
|
4493
|
+
updateConversation: (state, action) => {
|
|
4494
|
+
const existing = state.conversations[action.payload.offline_id];
|
|
4495
|
+
if (!existing) {
|
|
4496
|
+
throw new Error("Conversation does not exist in history");
|
|
4497
|
+
}
|
|
4498
|
+
state.conversations[action.payload.offline_id] = { ...existing, ...action.payload };
|
|
4499
|
+
}
|
|
4500
|
+
}
|
|
4501
|
+
});
|
|
4502
|
+
const { setConversations, addConversation, setConversation, updateConversation } = agentsSlice.actions;
|
|
4503
|
+
const selectConversationMapping = (state) => state.agentsReducer.conversations;
|
|
4504
|
+
const selectConversations = toolkit.createSelector(
|
|
4505
|
+
[selectConversationMapping],
|
|
4506
|
+
(conversationMapping) => Object.values(conversationMapping)
|
|
4507
|
+
);
|
|
4508
|
+
const selectConversation = restructureCreateSelectorWithArgs(
|
|
4509
|
+
toolkit.createSelector(
|
|
4510
|
+
[selectConversationMapping, (_state, conversationId) => conversationId],
|
|
4511
|
+
(conversationMapping, conversationId) => conversationMapping[conversationId]
|
|
4512
|
+
)
|
|
4513
|
+
);
|
|
4514
|
+
const agentsReducer = agentsSlice.reducer;
|
|
4498
4515
|
const initialState = {
|
|
4499
4516
|
version: 0
|
|
4500
4517
|
};
|
|
@@ -4504,7 +4521,7 @@ var __publicField = (obj, key, value) => {
|
|
|
4504
4521
|
reducers: {}
|
|
4505
4522
|
});
|
|
4506
4523
|
const versioningReducer = versioningSlice.reducer;
|
|
4507
|
-
const
|
|
4524
|
+
const fullAssetMarkerSize = 45;
|
|
4508
4525
|
const DEFAULT_ISSUE_STATUS = IssueStatus.BACKLOG;
|
|
4509
4526
|
const DEFAULT_ISSUE_PRIORITY = IssuePriority.MEDIUM;
|
|
4510
4527
|
const OUTBOX_RETRY_DELAY = 5e3;
|
|
@@ -4522,10 +4539,10 @@ var __publicField = (obj, key, value) => {
|
|
|
4522
4539
|
fileReducer,
|
|
4523
4540
|
authReducer,
|
|
4524
4541
|
categoryReducer,
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4542
|
+
assetReducer,
|
|
4543
|
+
assetStageCompletionReducer,
|
|
4544
|
+
assetStageReducer,
|
|
4545
|
+
assetTypeReducer,
|
|
4529
4546
|
issueReducer,
|
|
4530
4547
|
issueTypeReducer,
|
|
4531
4548
|
mapReducer,
|
|
@@ -4545,7 +4562,8 @@ var __publicField = (obj, key, value) => {
|
|
|
4545
4562
|
emailDomainsReducer,
|
|
4546
4563
|
licenseReducer,
|
|
4547
4564
|
documentsReducer,
|
|
4548
|
-
teamReducer
|
|
4565
|
+
teamReducer,
|
|
4566
|
+
agentsReducer
|
|
4549
4567
|
};
|
|
4550
4568
|
const overmapReducer = toolkit.combineReducers(overmapReducers);
|
|
4551
4569
|
const resetStore = "RESET";
|
|
@@ -5305,6 +5323,9 @@ var __publicField = (obj, key, value) => {
|
|
|
5305
5323
|
}
|
|
5306
5324
|
async setTourStep(stepIndex) {
|
|
5307
5325
|
this.client.store.dispatch(setTourStep(stepIndex));
|
|
5326
|
+
const currentStep = this.client.store.getState().userReducer.currentUser.profile.tour_step;
|
|
5327
|
+
if (currentStep === stepIndex)
|
|
5328
|
+
return Promise.resolve(void 0);
|
|
5308
5329
|
return this.enqueueRequest({
|
|
5309
5330
|
description: "Set tour step",
|
|
5310
5331
|
method: HttpMethod.PATCH,
|
|
@@ -5423,244 +5444,234 @@ var __publicField = (obj, key, value) => {
|
|
|
5423
5444
|
store.dispatch(setCategories(result));
|
|
5424
5445
|
}
|
|
5425
5446
|
}
|
|
5426
|
-
class
|
|
5447
|
+
class AssetService extends BaseApiService {
|
|
5427
5448
|
// Basic CRUD functions
|
|
5428
|
-
add(
|
|
5429
|
-
const
|
|
5430
|
-
this.client.store.dispatch(
|
|
5449
|
+
add(asset, workspaceId) {
|
|
5450
|
+
const offlineAsset = offline(asset);
|
|
5451
|
+
this.client.store.dispatch(addAsset(offlineAsset));
|
|
5431
5452
|
const promise = this.enqueueRequest({
|
|
5432
|
-
description: "Create
|
|
5453
|
+
description: "Create asset",
|
|
5433
5454
|
method: HttpMethod.POST,
|
|
5434
|
-
url: `/
|
|
5455
|
+
url: `/assets/types/${offlineAsset.asset_type}/add-assets/`,
|
|
5435
5456
|
queryParams: {
|
|
5436
5457
|
workspace_id: workspaceId.toString()
|
|
5437
5458
|
},
|
|
5438
|
-
payload: {
|
|
5459
|
+
payload: { assets: [offlineAsset] },
|
|
5439
5460
|
blockers: [],
|
|
5440
|
-
blocks: [
|
|
5461
|
+
blocks: [offlineAsset.offline_id]
|
|
5441
5462
|
});
|
|
5442
|
-
return [
|
|
5463
|
+
return [offlineAsset, promise];
|
|
5443
5464
|
}
|
|
5444
|
-
update(
|
|
5445
|
-
this.client.store.dispatch(
|
|
5465
|
+
update(asset, workspaceId) {
|
|
5466
|
+
this.client.store.dispatch(updateAsset(asset));
|
|
5446
5467
|
const promise = this.enqueueRequest({
|
|
5447
|
-
description: "Edit
|
|
5468
|
+
description: "Edit asset",
|
|
5448
5469
|
method: HttpMethod.PATCH,
|
|
5449
|
-
url: `/
|
|
5470
|
+
url: `/assets/${asset.offline_id}/`,
|
|
5450
5471
|
queryParams: {
|
|
5451
5472
|
workspace_id: workspaceId.toString()
|
|
5452
5473
|
},
|
|
5453
|
-
payload:
|
|
5454
|
-
blockers: [
|
|
5455
|
-
blocks: [
|
|
5474
|
+
payload: asset,
|
|
5475
|
+
blockers: [asset.offline_id],
|
|
5476
|
+
blocks: [asset.offline_id]
|
|
5456
5477
|
});
|
|
5457
|
-
return [
|
|
5478
|
+
return [asset, promise];
|
|
5458
5479
|
}
|
|
5459
|
-
async remove(
|
|
5480
|
+
async remove(assetId) {
|
|
5460
5481
|
const { store } = this.client;
|
|
5461
|
-
const
|
|
5462
|
-
if (!
|
|
5463
|
-
throw new Error(`No
|
|
5464
|
-
const
|
|
5465
|
-
store.dispatch(
|
|
5466
|
-
if (
|
|
5467
|
-
const
|
|
5468
|
-
store.dispatch(
|
|
5482
|
+
const assetToBeDeleted = selectAsset(assetId)(store.getState());
|
|
5483
|
+
if (!assetToBeDeleted)
|
|
5484
|
+
throw new Error(`No asset with id ${assetId} found in the store`);
|
|
5485
|
+
const attachmentsOfAssets = selectAttachmentsOfAsset(assetId)(store.getState());
|
|
5486
|
+
store.dispatch(removeAsset(assetId));
|
|
5487
|
+
if (attachmentsOfAssets.length > 0) {
|
|
5488
|
+
const attachmentsOfAssetIds = attachmentsOfAssets.map(({ offline_id }) => offline_id);
|
|
5489
|
+
store.dispatch(removeAssetAttachments(attachmentsOfAssetIds));
|
|
5469
5490
|
}
|
|
5470
5491
|
return this.enqueueRequest({
|
|
5471
|
-
description: "Delete
|
|
5492
|
+
description: "Delete asset",
|
|
5472
5493
|
method: HttpMethod.DELETE,
|
|
5473
|
-
url: `/
|
|
5474
|
-
blockers: [
|
|
5494
|
+
url: `/assets/${assetId}/`,
|
|
5495
|
+
blockers: [assetId],
|
|
5475
5496
|
blocks: []
|
|
5476
5497
|
}).catch((err) => {
|
|
5477
|
-
store.dispatch(
|
|
5478
|
-
store.dispatch(
|
|
5498
|
+
store.dispatch(addAsset(assetToBeDeleted));
|
|
5499
|
+
store.dispatch(addAssetAttachments(attachmentsOfAssets));
|
|
5479
5500
|
throw err;
|
|
5480
5501
|
});
|
|
5481
5502
|
}
|
|
5482
|
-
async
|
|
5483
|
-
const clientStore2 = this.client.store;
|
|
5484
|
-
const allComponentsOfType = selectComponentsFromComponentType(componentTypeId)(clientStore2.getState());
|
|
5485
|
-
const affectedComponentIds = (allComponentsOfType || []).map((c) => c.offline_id);
|
|
5486
|
-
const affectedOfflineIds = [componentTypeId, ...affectedComponentIds];
|
|
5503
|
+
async deleteAllAssetsOfAssetType(assetTypeId) {
|
|
5487
5504
|
const { store } = this.client;
|
|
5488
5505
|
const state = store.getState();
|
|
5489
|
-
const
|
|
5490
|
-
|
|
5506
|
+
const allAssetsOfAssetType = selectAssetsOfAssetType(assetTypeId)(state);
|
|
5507
|
+
const allAssetsOfAssetTypeIds = (allAssetsOfAssetType || []).map((c) => c.offline_id);
|
|
5508
|
+
const affectedOfflineIds = [assetTypeId, ...allAssetsOfAssetTypeIds];
|
|
5509
|
+
store.dispatch(removeAllAssetsOfType(assetTypeId));
|
|
5491
5510
|
return this.enqueueRequest({
|
|
5492
|
-
description: "
|
|
5511
|
+
description: "Delete all assets of asset type",
|
|
5493
5512
|
method: HttpMethod.DELETE,
|
|
5494
|
-
url: `/
|
|
5513
|
+
url: `/assets/types/${assetTypeId}/delete-all-of-type/`,
|
|
5495
5514
|
blockers: affectedOfflineIds,
|
|
5496
5515
|
blocks: affectedOfflineIds
|
|
5497
5516
|
}).catch((err) => {
|
|
5498
|
-
if (
|
|
5499
|
-
store.dispatch(
|
|
5517
|
+
if (allAssetsOfAssetType) {
|
|
5518
|
+
store.dispatch(addAssetsInBatches(allAssetsOfAssetType));
|
|
5500
5519
|
}
|
|
5501
5520
|
throw err;
|
|
5502
5521
|
});
|
|
5503
5522
|
}
|
|
5504
|
-
async addBatch(
|
|
5505
|
-
const
|
|
5506
|
-
return { ...offline(
|
|
5523
|
+
async addBatch(assetsToCreate, workspaceId, assetTypeId) {
|
|
5524
|
+
const fullAssets = assetsToCreate.map((asset) => {
|
|
5525
|
+
return { ...offline(asset), submitted_at: (/* @__PURE__ */ new Date()).toISOString() };
|
|
5507
5526
|
});
|
|
5508
5527
|
const { store } = this.client;
|
|
5509
|
-
store.dispatch(
|
|
5528
|
+
store.dispatch(addAssetsInBatches(fullAssets));
|
|
5510
5529
|
const promise = this.enqueueRequest({
|
|
5511
|
-
description: "Batch create
|
|
5530
|
+
description: "Batch create assets",
|
|
5512
5531
|
method: HttpMethod.POST,
|
|
5513
|
-
url: `/
|
|
5532
|
+
url: `/assets/types/${assetTypeId}/add-assets/`,
|
|
5514
5533
|
queryParams: {
|
|
5515
5534
|
workspace_id: workspaceId.toString()
|
|
5516
5535
|
},
|
|
5517
5536
|
payload: {
|
|
5518
|
-
|
|
5537
|
+
assets: fullAssets
|
|
5519
5538
|
},
|
|
5520
|
-
blockers: [
|
|
5521
|
-
blocks:
|
|
5539
|
+
blockers: [assetTypeId],
|
|
5540
|
+
blocks: fullAssets.map((c) => c.offline_id)
|
|
5522
5541
|
});
|
|
5523
5542
|
void promise.then((result) => {
|
|
5524
|
-
for (const
|
|
5525
|
-
store.dispatch(
|
|
5543
|
+
for (const assets of Object.values(result)) {
|
|
5544
|
+
store.dispatch(updateAsset(assets));
|
|
5526
5545
|
}
|
|
5527
5546
|
}).catch((e) => {
|
|
5528
|
-
for (const
|
|
5529
|
-
store.dispatch(
|
|
5547
|
+
for (const asset of fullAssets) {
|
|
5548
|
+
store.dispatch(removeAsset(asset.offline_id));
|
|
5530
5549
|
}
|
|
5531
5550
|
throw e;
|
|
5532
5551
|
});
|
|
5533
5552
|
return promise;
|
|
5534
5553
|
}
|
|
5535
|
-
async refreshStore(
|
|
5554
|
+
async refreshStore() {
|
|
5536
5555
|
const { store } = this.client;
|
|
5537
5556
|
const result = await this.enqueueRequest({
|
|
5538
|
-
description: "Get
|
|
5557
|
+
description: "Get assets",
|
|
5539
5558
|
method: HttpMethod.GET,
|
|
5540
|
-
url: `/projects/${store.getState().projectReducer.activeProjectId}/
|
|
5559
|
+
url: `/projects/${store.getState().projectReducer.activeProjectId}/assets/`,
|
|
5541
5560
|
blockers: [],
|
|
5542
5561
|
blocks: []
|
|
5543
5562
|
});
|
|
5544
|
-
|
|
5545
|
-
store.dispatch(setComponents(result));
|
|
5546
|
-
} else {
|
|
5547
|
-
store.dispatch(addComponentsInBatches(result));
|
|
5548
|
-
}
|
|
5563
|
+
store.dispatch(setAssets(result));
|
|
5549
5564
|
}
|
|
5550
5565
|
}
|
|
5551
|
-
class
|
|
5552
|
-
add(
|
|
5566
|
+
class AssetStageCompletionService extends BaseApiService {
|
|
5567
|
+
add(assetId, stageId) {
|
|
5553
5568
|
var _a2;
|
|
5554
5569
|
const { store } = this.client;
|
|
5555
|
-
const
|
|
5556
|
-
if (!
|
|
5557
|
-
throw new Error(`
|
|
5570
|
+
const assetTypeId = (_a2 = store.getState().assetReducer.assets[assetId]) == null ? void 0 : _a2.asset_type;
|
|
5571
|
+
if (!assetTypeId) {
|
|
5572
|
+
throw new Error(`Asset with offline_id ${assetId} not found`);
|
|
5558
5573
|
}
|
|
5559
|
-
const
|
|
5560
|
-
|
|
5574
|
+
const offlineStageCompletion = offline({
|
|
5575
|
+
asset: assetId,
|
|
5561
5576
|
stage: stageId
|
|
5562
5577
|
});
|
|
5563
|
-
store.dispatch(addStageCompletion(
|
|
5578
|
+
store.dispatch(addStageCompletion(offlineStageCompletion));
|
|
5564
5579
|
const promise = this.enqueueRequest({
|
|
5565
|
-
description: "
|
|
5580
|
+
description: "Complete stage",
|
|
5566
5581
|
method: HttpMethod.POST,
|
|
5567
|
-
url: `/
|
|
5582
|
+
url: `/assets/types/${assetTypeId}/complete-stages/`,
|
|
5568
5583
|
// TODO: Add submitted_at to model
|
|
5569
|
-
payload: { completions: [{ ...
|
|
5570
|
-
blockers: [
|
|
5571
|
-
blocks: [
|
|
5584
|
+
payload: { completions: [{ ...offlineStageCompletion, submitted_at: (/* @__PURE__ */ new Date()).getTime() / 1e3 }] },
|
|
5585
|
+
blockers: [assetId, stageId],
|
|
5586
|
+
blocks: [offlineStageCompletion.offline_id]
|
|
5572
5587
|
});
|
|
5573
|
-
return [
|
|
5588
|
+
return [offlineStageCompletion, promise];
|
|
5574
5589
|
}
|
|
5575
5590
|
async refreshStore() {
|
|
5576
5591
|
const { store } = this.client;
|
|
5577
5592
|
const result = await this.enqueueRequest({
|
|
5578
|
-
description: "Get
|
|
5593
|
+
description: "Get stage completions",
|
|
5579
5594
|
method: HttpMethod.GET,
|
|
5580
|
-
url: `/projects/${store.getState().projectReducer.activeProjectId}/
|
|
5595
|
+
url: `/projects/${store.getState().projectReducer.activeProjectId}/asset-stage-completions/`,
|
|
5581
5596
|
blockers: [],
|
|
5582
5597
|
blocks: []
|
|
5583
5598
|
});
|
|
5584
5599
|
store.dispatch(addStageCompletions(result));
|
|
5585
5600
|
}
|
|
5586
5601
|
/**
|
|
5587
|
-
* Creates a collection of
|
|
5588
|
-
*
|
|
5589
|
-
* @param
|
|
5590
|
-
* stages for one
|
|
5602
|
+
* Creates a collection of AssetStageCompletions, marking the referenced stages as completed for the referenced
|
|
5603
|
+
* assets. It's REQUIRED that all assets referenced all have the SAME asset type.
|
|
5604
|
+
* @param assetTypeId The ID of the asset type for which we are completing stages (we can only complete
|
|
5605
|
+
* stages for one asset type at a time)
|
|
5591
5606
|
* @param stageCompletions
|
|
5592
5607
|
*/
|
|
5593
|
-
async bulkAdd(
|
|
5594
|
-
const
|
|
5608
|
+
async bulkAdd(assetTypeId, stageCompletions) {
|
|
5609
|
+
const offlineStageCompletions = stageCompletions.map((completion) => {
|
|
5595
5610
|
return offline(completion);
|
|
5596
5611
|
});
|
|
5597
5612
|
const asMapping = {};
|
|
5598
5613
|
for (const completion of stageCompletions) {
|
|
5599
|
-
const stageToCompletionDateMapping = asMapping[completion.
|
|
5614
|
+
const stageToCompletionDateMapping = asMapping[completion.asset] || {};
|
|
5600
5615
|
stageToCompletionDateMapping[completion.stage] = (/* @__PURE__ */ new Date()).toISOString();
|
|
5601
|
-
asMapping[completion.
|
|
5616
|
+
asMapping[completion.asset] = stageToCompletionDateMapping;
|
|
5602
5617
|
}
|
|
5603
5618
|
this.client.store.dispatch(addStageCompletions(asMapping));
|
|
5604
5619
|
await this.enqueueRequest({
|
|
5605
|
-
description: "
|
|
5620
|
+
description: "Bulk complete stages",
|
|
5606
5621
|
method: HttpMethod.POST,
|
|
5607
|
-
url: `/
|
|
5622
|
+
url: `/assets/types/${assetTypeId}/complete-stages/`,
|
|
5608
5623
|
payload: {
|
|
5609
|
-
completions:
|
|
5624
|
+
completions: offlineStageCompletions
|
|
5610
5625
|
},
|
|
5611
|
-
blockers: [
|
|
5612
|
-
|
|
5613
|
-
...stageCompletions.map((c) => c.component),
|
|
5614
|
-
...stageCompletions.map((c) => c.stage)
|
|
5615
|
-
],
|
|
5616
|
-
blocks: offlineStagesCompletions.map((c) => c.offline_id)
|
|
5626
|
+
blockers: [assetTypeId, ...stageCompletions.map((c) => c.asset), ...stageCompletions.map((c) => c.stage)],
|
|
5627
|
+
blocks: offlineStageCompletions.map((c) => c.offline_id)
|
|
5617
5628
|
});
|
|
5618
5629
|
}
|
|
5619
|
-
bulkDelete(stageId,
|
|
5620
|
-
const
|
|
5630
|
+
bulkDelete(stageId, assetIds) {
|
|
5631
|
+
const stageCompletionsToRemove = assetIds.map((assetId) => {
|
|
5621
5632
|
return {
|
|
5622
|
-
|
|
5633
|
+
asset: assetId,
|
|
5623
5634
|
stage: stageId
|
|
5624
5635
|
};
|
|
5625
5636
|
});
|
|
5626
|
-
this.client.store.dispatch(removeStageCompletions(
|
|
5637
|
+
this.client.store.dispatch(removeStageCompletions(stageCompletionsToRemove));
|
|
5627
5638
|
return this.enqueueRequest({
|
|
5628
|
-
description: `Undo stage for ${
|
|
5639
|
+
description: `Undo stage for ${assetIds.length} assets(s)`,
|
|
5629
5640
|
// TODO: Rename to setCompletedStages
|
|
5630
5641
|
method: HttpMethod.DELETE,
|
|
5631
|
-
url: `/
|
|
5642
|
+
url: `/assets/stages/${stageId}/undo-stages/`,
|
|
5632
5643
|
payload: {
|
|
5633
|
-
|
|
5644
|
+
assets: assetIds
|
|
5634
5645
|
},
|
|
5635
|
-
blockers: [stageId, ...
|
|
5646
|
+
blockers: [stageId, ...assetIds],
|
|
5636
5647
|
blocks: []
|
|
5637
5648
|
});
|
|
5638
5649
|
}
|
|
5639
5650
|
}
|
|
5640
|
-
class
|
|
5641
|
-
async bulkCreateStages(stagesToSubmit,
|
|
5651
|
+
class AssetStageService extends BaseApiService {
|
|
5652
|
+
async bulkCreateStages(stagesToSubmit, assetTypeId, workspaceId) {
|
|
5642
5653
|
const payload = stagesToSubmit.map((stage) => {
|
|
5643
5654
|
return offline(stage);
|
|
5644
5655
|
});
|
|
5645
5656
|
const fullStages = payload.map((stage) => {
|
|
5646
|
-
return { ...stage,
|
|
5657
|
+
return { ...stage, asset_type: assetTypeId };
|
|
5647
5658
|
});
|
|
5648
5659
|
this.client.store.dispatch(addStages(fullStages));
|
|
5649
5660
|
return this.enqueueRequest({
|
|
5650
|
-
description: "Add
|
|
5661
|
+
description: "Add asset stages",
|
|
5651
5662
|
method: HttpMethod.POST,
|
|
5652
|
-
url: `/
|
|
5663
|
+
url: `/assets/types/${assetTypeId}/add-stages/`,
|
|
5653
5664
|
payload: {
|
|
5654
5665
|
stages: payload
|
|
5655
5666
|
},
|
|
5656
5667
|
queryParams: {
|
|
5657
5668
|
workspace_id: workspaceId.toString()
|
|
5658
5669
|
},
|
|
5659
|
-
blockers: [
|
|
5670
|
+
blockers: [assetTypeId, workspaceId],
|
|
5660
5671
|
blocks: payload.map(({ offline_id }) => offline_id)
|
|
5661
5672
|
});
|
|
5662
5673
|
}
|
|
5663
|
-
async bulkUpdateStages(stagesToUpdate,
|
|
5674
|
+
async bulkUpdateStages(stagesToUpdate, assetTypeId) {
|
|
5664
5675
|
const store = this.client.store;
|
|
5665
5676
|
const state = store.getState();
|
|
5666
5677
|
const prevStages = selectStagesFromStageIds(
|
|
@@ -5671,13 +5682,13 @@ var __publicField = (obj, key, value) => {
|
|
|
5671
5682
|
}
|
|
5672
5683
|
store.dispatch(updateStages(stagesToUpdate));
|
|
5673
5684
|
return this.enqueueRequest({
|
|
5674
|
-
description: "Edit
|
|
5685
|
+
description: "Edit asset stages",
|
|
5675
5686
|
method: HttpMethod.PATCH,
|
|
5676
|
-
url: `/
|
|
5687
|
+
url: `/assets/types/${assetTypeId}/bulk-update-stages/`,
|
|
5677
5688
|
payload: {
|
|
5678
5689
|
stages: stagesToUpdate
|
|
5679
5690
|
},
|
|
5680
|
-
blockers: [
|
|
5691
|
+
blockers: [assetTypeId],
|
|
5681
5692
|
blocks: stagesToUpdate.map(({ offline_id }) => offline_id)
|
|
5682
5693
|
}).catch((e) => {
|
|
5683
5694
|
store.dispatch(updateStages(prevStages));
|
|
@@ -5687,9 +5698,9 @@ var __publicField = (obj, key, value) => {
|
|
|
5687
5698
|
async bulkDelete(idsToDelete) {
|
|
5688
5699
|
this.client.store.dispatch(removeStages(idsToDelete));
|
|
5689
5700
|
return this.enqueueRequest({
|
|
5690
|
-
description: "Delete
|
|
5701
|
+
description: "Delete asset stages",
|
|
5691
5702
|
method: HttpMethod.DELETE,
|
|
5692
|
-
url: "/
|
|
5703
|
+
url: "/assets/stages/bulk-delete/",
|
|
5693
5704
|
payload: {
|
|
5694
5705
|
stage_ids: idsToDelete
|
|
5695
5706
|
},
|
|
@@ -5697,15 +5708,15 @@ var __publicField = (obj, key, value) => {
|
|
|
5697
5708
|
blocks: []
|
|
5698
5709
|
});
|
|
5699
5710
|
}
|
|
5700
|
-
async update(
|
|
5701
|
-
this.client.store.dispatch(addStages([
|
|
5711
|
+
async update(assetStage) {
|
|
5712
|
+
this.client.store.dispatch(addStages([assetStage]));
|
|
5702
5713
|
return this.enqueueRequest({
|
|
5703
|
-
description: "Update
|
|
5714
|
+
description: "Update asset stage",
|
|
5704
5715
|
method: HttpMethod.PATCH,
|
|
5705
|
-
url: `/
|
|
5706
|
-
payload:
|
|
5707
|
-
blockers: [
|
|
5708
|
-
blocks: [
|
|
5716
|
+
url: `/assets/stages/${assetStage.offline_id}/`,
|
|
5717
|
+
payload: assetStage,
|
|
5718
|
+
blockers: [assetStage.offline_id],
|
|
5719
|
+
blocks: [assetStage.offline_id]
|
|
5709
5720
|
});
|
|
5710
5721
|
}
|
|
5711
5722
|
async linkForm(stageId, formId2) {
|
|
@@ -5713,9 +5724,9 @@ var __publicField = (obj, key, value) => {
|
|
|
5713
5724
|
store.dispatch(linkStageToForm({ stageId, formId: formId2 }));
|
|
5714
5725
|
try {
|
|
5715
5726
|
await this.enqueueRequest({
|
|
5716
|
-
description: "Link
|
|
5727
|
+
description: "Link asset stage to form",
|
|
5717
5728
|
method: HttpMethod.POST,
|
|
5718
|
-
url: `/
|
|
5729
|
+
url: `/assets/stages/${stageId}/associate-with-form/`,
|
|
5719
5730
|
payload: { user_form: formId2 },
|
|
5720
5731
|
blockers: [stageId, formId2],
|
|
5721
5732
|
blocks: [stageId]
|
|
@@ -5730,9 +5741,9 @@ var __publicField = (obj, key, value) => {
|
|
|
5730
5741
|
store.dispatch(unlinkStageToForm({ stageId }));
|
|
5731
5742
|
try {
|
|
5732
5743
|
await this.enqueueRequest({
|
|
5733
|
-
description: "Unlink
|
|
5744
|
+
description: "Unlink asset stage from form",
|
|
5734
5745
|
method: HttpMethod.DELETE,
|
|
5735
|
-
url: `/
|
|
5746
|
+
url: `/assets/stages/${stageId}/associate-with-form/`,
|
|
5736
5747
|
blockers: [stageId, formId2],
|
|
5737
5748
|
blocks: [stageId]
|
|
5738
5749
|
});
|
|
@@ -5744,9 +5755,9 @@ var __publicField = (obj, key, value) => {
|
|
|
5744
5755
|
async refreshStore() {
|
|
5745
5756
|
const { store } = this.client;
|
|
5746
5757
|
const result = await this.enqueueRequest({
|
|
5747
|
-
description: "Get
|
|
5758
|
+
description: "Get asset stages",
|
|
5748
5759
|
method: HttpMethod.GET,
|
|
5749
|
-
url: `/projects/${store.getState().projectReducer.activeProjectId}/
|
|
5760
|
+
url: `/projects/${store.getState().projectReducer.activeProjectId}/asset-stages/`,
|
|
5750
5761
|
blockers: [],
|
|
5751
5762
|
blocks: []
|
|
5752
5763
|
});
|
|
@@ -5760,20 +5771,20 @@ var __publicField = (obj, key, value) => {
|
|
|
5760
5771
|
deleteUrlPrefix: "/issues",
|
|
5761
5772
|
fetchUrlPostfix: "/issue-attachments"
|
|
5762
5773
|
},
|
|
5763
|
-
[AttachmentModel.
|
|
5764
|
-
name: "
|
|
5765
|
-
attachUrlPrefix: "/
|
|
5766
|
-
deleteUrlPrefix: "/
|
|
5767
|
-
fetchUrlPostfix: "/
|
|
5774
|
+
[AttachmentModel.Asset]: {
|
|
5775
|
+
name: "asset",
|
|
5776
|
+
attachUrlPrefix: "/assets",
|
|
5777
|
+
deleteUrlPrefix: "/assets",
|
|
5778
|
+
fetchUrlPostfix: "/asset-attachments"
|
|
5768
5779
|
},
|
|
5769
|
-
[AttachmentModel.
|
|
5770
|
-
name: "
|
|
5771
|
-
attachUrlPrefix: "/
|
|
5772
|
-
deleteUrlPrefix: "/
|
|
5773
|
-
fetchUrlPostfix: "/
|
|
5780
|
+
[AttachmentModel.AssetType]: {
|
|
5781
|
+
name: "asset type",
|
|
5782
|
+
attachUrlPrefix: "/assets/types",
|
|
5783
|
+
deleteUrlPrefix: "/assets/types",
|
|
5784
|
+
fetchUrlPostfix: "/asset-type-attachments"
|
|
5774
5785
|
},
|
|
5775
5786
|
[AttachmentModel.Project]: {
|
|
5776
|
-
name: "
|
|
5787
|
+
name: "project",
|
|
5777
5788
|
attachUrlPrefix: "/projects",
|
|
5778
5789
|
deleteUrlPrefix: "/projects",
|
|
5779
5790
|
fetchUrlPostfix: "/attachments"
|
|
@@ -5789,8 +5800,8 @@ var __publicField = (obj, key, value) => {
|
|
|
5789
5800
|
getNumberOfAttachmentsWithSha1(sha1) {
|
|
5790
5801
|
const {
|
|
5791
5802
|
issueReducer: issueReducer2,
|
|
5792
|
-
|
|
5793
|
-
|
|
5803
|
+
assetReducer: assetReducer2,
|
|
5804
|
+
assetTypeReducer: assetTypeReducer2,
|
|
5794
5805
|
documentsReducer: documentsReducer2,
|
|
5795
5806
|
projectReducer: projectReducer2,
|
|
5796
5807
|
formSubmissionReducer: formSubmissionReducer2,
|
|
@@ -5798,8 +5809,8 @@ var __publicField = (obj, key, value) => {
|
|
|
5798
5809
|
} = this.client.store.getState();
|
|
5799
5810
|
const objectsWithSha1 = [].concat(
|
|
5800
5811
|
Object.values(issueReducer2.attachments),
|
|
5801
|
-
Object.values(
|
|
5802
|
-
Object.values(
|
|
5812
|
+
Object.values(assetReducer2.attachments),
|
|
5813
|
+
Object.values(assetTypeReducer2.attachments),
|
|
5803
5814
|
Object.values(documentsReducer2.attachments),
|
|
5804
5815
|
Object.values(projectReducer2.attachments),
|
|
5805
5816
|
Object.values(formRevisionReducer2.attachments),
|
|
@@ -5921,10 +5932,10 @@ var __publicField = (obj, key, value) => {
|
|
|
5921
5932
|
return promise;
|
|
5922
5933
|
}
|
|
5923
5934
|
}
|
|
5924
|
-
class
|
|
5935
|
+
class AssetAttachmentService extends BaseAttachmentService {
|
|
5925
5936
|
constructor() {
|
|
5926
5937
|
super(...arguments);
|
|
5927
|
-
__publicField(this, "attachmentModel", AttachmentModel.
|
|
5938
|
+
__publicField(this, "attachmentModel", AttachmentModel.Asset);
|
|
5928
5939
|
}
|
|
5929
5940
|
buildOfflineAttachment(data) {
|
|
5930
5941
|
return offline({
|
|
@@ -5935,115 +5946,108 @@ var __publicField = (obj, key, value) => {
|
|
|
5935
5946
|
file_type: data.file.type,
|
|
5936
5947
|
submitted_at: data.submittedAt,
|
|
5937
5948
|
description: data.description,
|
|
5938
|
-
|
|
5949
|
+
asset: data.modelId
|
|
5939
5950
|
});
|
|
5940
5951
|
}
|
|
5941
|
-
async
|
|
5942
|
-
return this.attachFiles(
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
addAttachments: addComponentAttachments,
|
|
5948
|
-
updateAttachments: updateComponentAttachments,
|
|
5949
|
-
removeAttachments: removeComponentAttachments
|
|
5950
|
-
}
|
|
5951
|
-
);
|
|
5952
|
+
async attachFilesToAsset(files, assetId) {
|
|
5953
|
+
return this.attachFiles(files, assetId, this.buildOfflineAttachment.bind(this), {
|
|
5954
|
+
addAttachments: addAssetAttachments,
|
|
5955
|
+
updateAttachments: updateAssetAttachments,
|
|
5956
|
+
removeAttachments: removeAssetAttachments
|
|
5957
|
+
});
|
|
5952
5958
|
}
|
|
5953
|
-
|
|
5959
|
+
deleteAssetAttachment(attachmentId) {
|
|
5954
5960
|
return this.deleteAttachment(
|
|
5955
5961
|
attachmentId,
|
|
5956
5962
|
{
|
|
5957
|
-
setAttachment:
|
|
5958
|
-
removeAttachment:
|
|
5963
|
+
setAttachment: setAssetAttachment,
|
|
5964
|
+
removeAttachment: removeAssetAttachment
|
|
5959
5965
|
},
|
|
5960
5966
|
{
|
|
5961
|
-
selectAttachment:
|
|
5967
|
+
selectAttachment: selectAssetAttachment
|
|
5962
5968
|
}
|
|
5963
5969
|
);
|
|
5964
5970
|
}
|
|
5965
5971
|
async refreshStore() {
|
|
5966
5972
|
return this.getAttachments({
|
|
5967
|
-
setAttachments:
|
|
5973
|
+
setAttachments: setAssetAttachments
|
|
5968
5974
|
});
|
|
5969
5975
|
}
|
|
5970
5976
|
}
|
|
5971
|
-
class
|
|
5972
|
-
add(
|
|
5973
|
-
const
|
|
5977
|
+
class AssetTypeService extends BaseApiService {
|
|
5978
|
+
add(assetType) {
|
|
5979
|
+
const offlineAssetType = offline(assetType);
|
|
5974
5980
|
const { store } = this.client;
|
|
5975
5981
|
const activeProjectId = store.getState().projectReducer.activeProjectId;
|
|
5976
|
-
store.dispatch(
|
|
5982
|
+
store.dispatch(addAssetType(offlineAssetType));
|
|
5977
5983
|
const promise = this.enqueueRequest({
|
|
5978
|
-
description: "Create
|
|
5984
|
+
description: "Create asset type",
|
|
5979
5985
|
method: HttpMethod.POST,
|
|
5980
|
-
url: `/projects/${activeProjectId}/
|
|
5981
|
-
payload: { ...
|
|
5986
|
+
url: `/projects/${activeProjectId}/asset-types/`,
|
|
5987
|
+
payload: { ...offlineAssetType },
|
|
5982
5988
|
blockers: [],
|
|
5983
|
-
blocks: [
|
|
5989
|
+
blocks: [offlineAssetType.offline_id]
|
|
5984
5990
|
});
|
|
5985
|
-
return [
|
|
5991
|
+
return [offlineAssetType, promise];
|
|
5986
5992
|
}
|
|
5987
|
-
update(
|
|
5988
|
-
this.client.store.dispatch(
|
|
5993
|
+
update(assetType) {
|
|
5994
|
+
this.client.store.dispatch(addAssetType(assetType));
|
|
5989
5995
|
return this.enqueueRequest({
|
|
5990
|
-
description: "Update
|
|
5996
|
+
description: "Update asset type",
|
|
5991
5997
|
method: HttpMethod.PATCH,
|
|
5992
|
-
url: `/
|
|
5993
|
-
payload:
|
|
5994
|
-
blockers: [
|
|
5995
|
-
blocks: [
|
|
5998
|
+
url: `/assets/types/${assetType.offline_id}/`,
|
|
5999
|
+
payload: assetType,
|
|
6000
|
+
blockers: [assetType.offline_id],
|
|
6001
|
+
blocks: [assetType.offline_id]
|
|
5996
6002
|
});
|
|
5997
6003
|
}
|
|
5998
|
-
async delete(
|
|
6004
|
+
async delete(assetTypeId) {
|
|
5999
6005
|
const { store } = this.client;
|
|
6000
6006
|
const state = store.getState();
|
|
6001
|
-
const
|
|
6002
|
-
if (!
|
|
6003
|
-
throw new Error(
|
|
6004
|
-
}
|
|
6005
|
-
const stagesOfComponentType = selectStagesFromComponentType(componentTypeId)(state) ?? [];
|
|
6006
|
-
const attachmentsOfComponentType = selectAttachmentsOfComponentType(componentTypeId)(state);
|
|
6007
|
-
store.dispatch(deleteComponentType(componentTypeId));
|
|
6008
|
-
if (stagesOfComponentType.length > 0) {
|
|
6009
|
-
const stagesOfComponentTypeIds = stagesOfComponentType.map(
|
|
6010
|
-
(componentTypeStage) => componentTypeStage.offline_id
|
|
6011
|
-
);
|
|
6012
|
-
store.dispatch(removeStages(stagesOfComponentTypeIds));
|
|
6007
|
+
const assetType = selectAssetType(assetTypeId)(state);
|
|
6008
|
+
if (!assetType) {
|
|
6009
|
+
throw new Error(`Expected asset type with offline_id ${assetTypeId} to exist`);
|
|
6013
6010
|
}
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6011
|
+
const stagesOfAssetType = selectStagesOfAssetType(assetTypeId)(state) ?? [];
|
|
6012
|
+
const attachmentsOfAssetType = selectAttachmentsOfAssetType(assetTypeId)(state);
|
|
6013
|
+
store.dispatch(deleteAssetType(assetTypeId));
|
|
6014
|
+
if (stagesOfAssetType.length > 0) {
|
|
6015
|
+
const stagesOfAssetTypeIds = stagesOfAssetType.map((assetStage) => assetStage.offline_id);
|
|
6016
|
+
store.dispatch(removeStages(stagesOfAssetTypeIds));
|
|
6017
|
+
}
|
|
6018
|
+
if (attachmentsOfAssetType.length > 0) {
|
|
6019
|
+
const attachmentsOfAssetTypeIds = attachmentsOfAssetType.map(({ offline_id }) => offline_id);
|
|
6020
|
+
store.dispatch(removeAssetTypeAttachments(attachmentsOfAssetTypeIds));
|
|
6017
6021
|
}
|
|
6018
6022
|
return this.enqueueRequest({
|
|
6019
|
-
description: "Delete
|
|
6023
|
+
description: "Delete asset type",
|
|
6020
6024
|
method: HttpMethod.DELETE,
|
|
6021
|
-
url: `/
|
|
6022
|
-
blockers: [
|
|
6025
|
+
url: `/assets/types/${assetTypeId}/`,
|
|
6026
|
+
blockers: [assetTypeId],
|
|
6023
6027
|
blocks: []
|
|
6024
6028
|
}).catch((e) => {
|
|
6025
|
-
store.dispatch(
|
|
6026
|
-
store.dispatch(addStages(
|
|
6027
|
-
store.dispatch(
|
|
6029
|
+
store.dispatch(addAssetType(assetType));
|
|
6030
|
+
store.dispatch(addStages(stagesOfAssetType));
|
|
6031
|
+
store.dispatch(addAssetTypeAttachments(attachmentsOfAssetType));
|
|
6028
6032
|
throw e;
|
|
6029
6033
|
});
|
|
6030
6034
|
}
|
|
6031
6035
|
async refreshStore() {
|
|
6032
6036
|
const { store } = this.client;
|
|
6033
6037
|
const result = await this.enqueueRequest({
|
|
6034
|
-
description: "Get
|
|
6038
|
+
description: "Get asset types",
|
|
6035
6039
|
method: HttpMethod.GET,
|
|
6036
|
-
url: `/projects/${store.getState().projectReducer.activeProjectId}/
|
|
6040
|
+
url: `/projects/${store.getState().projectReducer.activeProjectId}/asset-types/`,
|
|
6037
6041
|
blockers: [],
|
|
6038
6042
|
blocks: []
|
|
6039
6043
|
});
|
|
6040
|
-
store.dispatch(
|
|
6044
|
+
store.dispatch(setAssetTypes(result));
|
|
6041
6045
|
}
|
|
6042
6046
|
}
|
|
6043
|
-
class
|
|
6047
|
+
class AssetTypeAttachmentService extends BaseAttachmentService {
|
|
6044
6048
|
constructor() {
|
|
6045
6049
|
super(...arguments);
|
|
6046
|
-
__publicField(this, "attachmentModel", AttachmentModel.
|
|
6050
|
+
__publicField(this, "attachmentModel", AttachmentModel.AssetType);
|
|
6047
6051
|
}
|
|
6048
6052
|
buildOfflineAttachment(data) {
|
|
6049
6053
|
return offline({
|
|
@@ -6054,36 +6058,36 @@ var __publicField = (obj, key, value) => {
|
|
|
6054
6058
|
file_type: data.file.type,
|
|
6055
6059
|
submitted_at: data.submittedAt,
|
|
6056
6060
|
description: data.description,
|
|
6057
|
-
|
|
6061
|
+
asset_type: data.modelId
|
|
6058
6062
|
});
|
|
6059
6063
|
}
|
|
6060
|
-
async
|
|
6064
|
+
async attachFilesToAssetType(files, assetTypeId) {
|
|
6061
6065
|
return this.attachFiles(
|
|
6062
6066
|
files,
|
|
6063
|
-
|
|
6067
|
+
assetTypeId,
|
|
6064
6068
|
this.buildOfflineAttachment.bind(this),
|
|
6065
6069
|
{
|
|
6066
|
-
addAttachments:
|
|
6067
|
-
updateAttachments:
|
|
6068
|
-
removeAttachments:
|
|
6070
|
+
addAttachments: addAssetTypeAttachments,
|
|
6071
|
+
updateAttachments: updateAssetTypeAttachments,
|
|
6072
|
+
removeAttachments: removeAssetTypeAttachments
|
|
6069
6073
|
}
|
|
6070
6074
|
);
|
|
6071
6075
|
}
|
|
6072
|
-
|
|
6076
|
+
deleteAssetTypeAttachment(attachmentId) {
|
|
6073
6077
|
return this.deleteAttachment(
|
|
6074
6078
|
attachmentId,
|
|
6075
6079
|
{
|
|
6076
|
-
setAttachment:
|
|
6077
|
-
removeAttachment:
|
|
6080
|
+
setAttachment: setAssetTypeAttachment,
|
|
6081
|
+
removeAttachment: removeAssetTypeAttachment
|
|
6078
6082
|
},
|
|
6079
6083
|
{
|
|
6080
|
-
selectAttachment:
|
|
6084
|
+
selectAttachment: selectAssetTypeAttachment
|
|
6081
6085
|
}
|
|
6082
6086
|
);
|
|
6083
6087
|
}
|
|
6084
6088
|
async refreshStore() {
|
|
6085
6089
|
return this.getAttachments({
|
|
6086
|
-
setAttachments:
|
|
6090
|
+
setAttachments: setAssetTypeAttachments
|
|
6087
6091
|
});
|
|
6088
6092
|
}
|
|
6089
6093
|
}
|
|
@@ -6229,7 +6233,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6229
6233
|
// Basic CRUD functions
|
|
6230
6234
|
// TODO: Once all models are represented in `Created<TModel>`, use `Created` in `OptimisticModelResult`, so we don't
|
|
6231
6235
|
// have to repeat it for all optimistic model results (all optimistic results are created).
|
|
6232
|
-
add(issue,
|
|
6236
|
+
add(issue, issueType = null) {
|
|
6233
6237
|
const { store } = this.client;
|
|
6234
6238
|
const dateWithoutMilliseconds = /* @__PURE__ */ new Date();
|
|
6235
6239
|
const state = store.getState();
|
|
@@ -6256,7 +6260,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6256
6260
|
url: "/issues/",
|
|
6257
6261
|
queryParams: {
|
|
6258
6262
|
workspace_id: workspaceId,
|
|
6259
|
-
...
|
|
6263
|
+
...issueType ? { issue_type: issueType } : {}
|
|
6260
6264
|
},
|
|
6261
6265
|
payload: issuePayload,
|
|
6262
6266
|
blockers: [
|
|
@@ -6274,7 +6278,8 @@ var __publicField = (obj, key, value) => {
|
|
|
6274
6278
|
if (error2 instanceof APIError) {
|
|
6275
6279
|
(_a2 = blocks.unsafeShowToast) == null ? void 0 : _a2.call(blocks, {
|
|
6276
6280
|
title: "Could not create issue",
|
|
6277
|
-
description:
|
|
6281
|
+
description: error2.message,
|
|
6282
|
+
severity: "danger"
|
|
6278
6283
|
});
|
|
6279
6284
|
}
|
|
6280
6285
|
store.dispatch(removeIssue(issuePayload.offline_id));
|
|
@@ -6393,7 +6398,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6393
6398
|
this.client.store.dispatch(updateIssue(issueToBeUpdated));
|
|
6394
6399
|
this.client.store.dispatch(removeIssueUpdate(offlineIssueUpdate.offline_id));
|
|
6395
6400
|
});
|
|
6396
|
-
const fullIssue =
|
|
6401
|
+
const fullIssue = state.issueReducer.issues[issue.offline_id];
|
|
6397
6402
|
return [fullIssue, promise];
|
|
6398
6403
|
}
|
|
6399
6404
|
async remove(id) {
|
|
@@ -6444,14 +6449,15 @@ var __publicField = (obj, key, value) => {
|
|
|
6444
6449
|
class IssueTypeService extends BaseApiService {
|
|
6445
6450
|
add(payload) {
|
|
6446
6451
|
const { store } = this.client;
|
|
6447
|
-
const
|
|
6452
|
+
const state = store.getState();
|
|
6453
|
+
const activeOrganizationId = state.organizationReducer.activeOrganizationId;
|
|
6448
6454
|
if (!activeOrganizationId) {
|
|
6449
6455
|
throw new Error(`No active organization, got ${activeOrganizationId} for activeOrganizationId.`);
|
|
6450
6456
|
}
|
|
6451
6457
|
const offlineIssueType = offline({
|
|
6452
6458
|
...payload,
|
|
6453
6459
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
6454
|
-
created_by:
|
|
6460
|
+
created_by: state.userReducer.currentUser.id,
|
|
6455
6461
|
organization: activeOrganizationId
|
|
6456
6462
|
});
|
|
6457
6463
|
store.dispatch(addIssueType(offlineIssueType));
|
|
@@ -6504,11 +6510,12 @@ var __publicField = (obj, key, value) => {
|
|
|
6504
6510
|
}
|
|
6505
6511
|
delete(issueTypeId) {
|
|
6506
6512
|
const { store } = this.client;
|
|
6507
|
-
const
|
|
6513
|
+
const state = store.getState();
|
|
6514
|
+
const issueTypeToDelete = state.issueTypeReducer.issueTypes[issueTypeId];
|
|
6508
6515
|
if (!issueTypeToDelete) {
|
|
6509
6516
|
throw new Error(`IssueType with offline_id ${issueTypeId} does not exist in the store.`);
|
|
6510
6517
|
}
|
|
6511
|
-
const issuesOfIssueType = selectIssuesOfIssueType(issueTypeId)(
|
|
6518
|
+
const issuesOfIssueType = selectIssuesOfIssueType(issueTypeId)(state) ?? [];
|
|
6512
6519
|
store.dispatch(removeIssueType(issueTypeId));
|
|
6513
6520
|
store.dispatch(removeIssues(issuesOfIssueType.map((issue) => issue.offline_id)));
|
|
6514
6521
|
const promise = this.enqueueRequest({
|
|
@@ -6543,7 +6550,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6543
6550
|
if (replaceExisting) {
|
|
6544
6551
|
this.client.store.dispatch(setIsFetchingInitialData(true));
|
|
6545
6552
|
}
|
|
6546
|
-
|
|
6553
|
+
const result = await this.enqueueRequest({
|
|
6547
6554
|
uuid: uuid2,
|
|
6548
6555
|
description: "Get initial data",
|
|
6549
6556
|
method: HttpMethod.GET,
|
|
@@ -6552,18 +6559,20 @@ var __publicField = (obj, key, value) => {
|
|
|
6552
6559
|
isAuthNeeded: true,
|
|
6553
6560
|
blockers: [],
|
|
6554
6561
|
blocks: []
|
|
6555
|
-
}).then((result) => {
|
|
6556
|
-
void this._processInitialData(result, replaceExisting);
|
|
6557
|
-
return result;
|
|
6558
6562
|
});
|
|
6563
|
+
void this._processInitialData(result, replaceExisting);
|
|
6559
6564
|
}
|
|
6560
|
-
async fetchProjectUsers(
|
|
6565
|
+
async fetchProjectUsers() {
|
|
6566
|
+
const projectId = this.client.store.getState().projectReducer.activeProjectId;
|
|
6561
6567
|
return this.enqueueRequest({
|
|
6562
6568
|
description: "Fetch users",
|
|
6563
6569
|
method: HttpMethod.GET,
|
|
6564
6570
|
url: `/projects/${projectId}/users/`,
|
|
6565
6571
|
blockers: [],
|
|
6566
6572
|
blocks: []
|
|
6573
|
+
}).then((users) => {
|
|
6574
|
+
this.client.store.dispatch(addUsers(users));
|
|
6575
|
+
return users;
|
|
6567
6576
|
});
|
|
6568
6577
|
}
|
|
6569
6578
|
async fetchOrganizationUsers(orgId) {
|
|
@@ -6576,13 +6585,14 @@ var __publicField = (obj, key, value) => {
|
|
|
6576
6585
|
});
|
|
6577
6586
|
}
|
|
6578
6587
|
// TODO:
|
|
6579
|
-
// Don't accept updateStore in
|
|
6580
|
-
// overwrite, use
|
|
6588
|
+
// Don't accept updateStore in AssetService.list. Just return the offline objects and promise. Here, if
|
|
6589
|
+
// overwrite, use setAssets. Otherwise, use bulkAddAssets.
|
|
6590
|
+
// TODO: This needs major cleanup. Send less in the initial data: Only the basic project info and anything needed
|
|
6591
|
+
// literally immediately.
|
|
6581
6592
|
async _processInitialData(data, overwrite) {
|
|
6582
6593
|
var _a2, _b, _c;
|
|
6583
6594
|
const workspaces = {};
|
|
6584
6595
|
const projects = [];
|
|
6585
|
-
const categories = [];
|
|
6586
6596
|
const projectsData = data.projects;
|
|
6587
6597
|
const { store } = this.client;
|
|
6588
6598
|
const oldProjectId = (_a2 = projectsData.find(
|
|
@@ -6606,18 +6616,11 @@ var __publicField = (obj, key, value) => {
|
|
|
6606
6616
|
isProjectIdValid = true;
|
|
6607
6617
|
for (const workspaceData of projectData.workspaces) {
|
|
6608
6618
|
const workspace = { ...workspaceData, project: projectData.id };
|
|
6609
|
-
if (workspace.categories) {
|
|
6610
|
-
for (const category of workspace.categories) {
|
|
6611
|
-
categories.push(category);
|
|
6612
|
-
}
|
|
6613
|
-
}
|
|
6614
|
-
delete workspace.categories;
|
|
6615
6619
|
workspaces[workspace.offline_id] = workspace;
|
|
6616
6620
|
}
|
|
6617
6621
|
}
|
|
6618
6622
|
}
|
|
6619
6623
|
store.dispatch(setCurrentUser(data.user));
|
|
6620
|
-
store.dispatch(addUsers(data.project_owners));
|
|
6621
6624
|
store.dispatch(setLicenses(data.licenses));
|
|
6622
6625
|
const organizationsData = data.organizations;
|
|
6623
6626
|
store.dispatch(setOrganizations(organizationsData));
|
|
@@ -6638,8 +6641,11 @@ var __publicField = (obj, key, value) => {
|
|
|
6638
6641
|
currentOrgId = firstOrg.id;
|
|
6639
6642
|
}
|
|
6640
6643
|
if (currentOrgId) {
|
|
6641
|
-
await this.client.organizations.fetchInitialOrganizationData(currentOrgId, false);
|
|
6642
|
-
|
|
6644
|
+
const initialOrgData = await this.client.organizations.fetchInitialOrganizationData(currentOrgId, false);
|
|
6645
|
+
currentOrgId = initialOrgData.organization.id;
|
|
6646
|
+
}
|
|
6647
|
+
if (!currentOrgId) {
|
|
6648
|
+
throw new Error("No organization found");
|
|
6643
6649
|
}
|
|
6644
6650
|
if (!isProjectIdValid) {
|
|
6645
6651
|
if (validProjects.length !== 0) {
|
|
@@ -6649,12 +6655,6 @@ var __publicField = (obj, key, value) => {
|
|
|
6649
6655
|
if (projectData) {
|
|
6650
6656
|
for (const workspaceData of projectData.workspaces) {
|
|
6651
6657
|
const workspace = { ...workspaceData, project: projectData.id };
|
|
6652
|
-
if (workspace.categories) {
|
|
6653
|
-
for (const category of workspace.categories) {
|
|
6654
|
-
categories.push(category);
|
|
6655
|
-
}
|
|
6656
|
-
}
|
|
6657
|
-
delete workspace.categories;
|
|
6658
6658
|
workspaces[workspace.offline_id] = workspace;
|
|
6659
6659
|
}
|
|
6660
6660
|
}
|
|
@@ -6663,14 +6663,6 @@ var __publicField = (obj, key, value) => {
|
|
|
6663
6663
|
store.dispatch(setActiveProjectId(currentProjectId));
|
|
6664
6664
|
}
|
|
6665
6665
|
}
|
|
6666
|
-
if (currentProjectId) {
|
|
6667
|
-
const usersResultPromise = this.fetchProjectUsers(currentProjectId);
|
|
6668
|
-
const projectAccessRefreshPromise = this.client.projectAccesses.refreshStore();
|
|
6669
|
-
const usersResult = await usersResultPromise;
|
|
6670
|
-
await projectAccessRefreshPromise;
|
|
6671
|
-
store.dispatch(addUsers(usersResult));
|
|
6672
|
-
void this.client.projectAttachments.refreshStore();
|
|
6673
|
-
}
|
|
6674
6666
|
let currentWorkspaceId;
|
|
6675
6667
|
const oldWorkspaceId = this.client.store.getState().workspaceReducer.activeWorkspaceId;
|
|
6676
6668
|
if (overwrite || !oldWorkspaceId) {
|
|
@@ -6678,51 +6670,49 @@ var __publicField = (obj, key, value) => {
|
|
|
6678
6670
|
} else {
|
|
6679
6671
|
currentWorkspaceId = oldWorkspaceId;
|
|
6680
6672
|
}
|
|
6681
|
-
if (currentWorkspaceId
|
|
6673
|
+
if (currentWorkspaceId) {
|
|
6682
6674
|
store.dispatch(setActiveWorkspaceId(currentWorkspaceId));
|
|
6683
|
-
void this.client.categories.refreshStore().then(() => {
|
|
6684
|
-
void this.client.issues.refreshStore().then(() => {
|
|
6685
|
-
void this.client.issueAttachments.refreshStore().then();
|
|
6686
|
-
void this.client.issueComments.refreshStore().then();
|
|
6687
|
-
void this.client.issueUpdates.refreshStore().then();
|
|
6688
|
-
});
|
|
6689
|
-
});
|
|
6690
|
-
void this.client.projectFiles.refreshStore().then();
|
|
6691
|
-
void this.client.componentTypes.refreshStore().then(() => {
|
|
6692
|
-
void this.client.componentTypeAttachments.refreshStore().then(() => {
|
|
6693
|
-
void this.client.componentStages.refreshStore().then(() => {
|
|
6694
|
-
void this.client.components.refreshStore(overwrite).then(() => {
|
|
6695
|
-
void this.client.componentAttachments.refreshStore().then();
|
|
6696
|
-
});
|
|
6697
|
-
});
|
|
6698
|
-
void this.client.componentStageCompletions.refreshStore().then();
|
|
6699
|
-
});
|
|
6700
|
-
});
|
|
6701
|
-
void this.client.userForms.refreshStore().then(() => {
|
|
6702
|
-
void this.client.userFormSubmissions.refreshStore().then();
|
|
6703
|
-
});
|
|
6704
|
-
}
|
|
6705
|
-
if (currentProjectId) {
|
|
6706
|
-
void this.client.documents.refreshStore().then(() => {
|
|
6707
|
-
void this.client.documentAttachments.refreshStore().then();
|
|
6708
|
-
});
|
|
6709
|
-
void this.client.documents.refreshStore();
|
|
6710
|
-
void this.client.issueUpdates.refreshStore();
|
|
6711
|
-
void this.client.issueTypes.refreshStore();
|
|
6712
6675
|
}
|
|
6713
|
-
store.dispatch(setIsFetchingInitialData(false));
|
|
6714
6676
|
if (overwrite) {
|
|
6715
6677
|
console.log("Overwriting data");
|
|
6716
6678
|
store.dispatch(setProjects(projects));
|
|
6717
6679
|
store.dispatch(setWorkspaces(workspaces));
|
|
6718
|
-
store.dispatch(setCategories(categories));
|
|
6719
6680
|
store.dispatch(resetRecentIssues());
|
|
6720
6681
|
} else {
|
|
6721
6682
|
console.log("Updating data (collisions will be replaced)");
|
|
6722
6683
|
store.dispatch(addOrReplaceProjects(projects));
|
|
6723
6684
|
store.dispatch(addOrReplaceWorkspaces(workspaces));
|
|
6724
|
-
store.dispatch(addOrReplaceCategories(categories));
|
|
6725
6685
|
}
|
|
6686
|
+
if (!currentProjectId) {
|
|
6687
|
+
store.dispatch(setIsFetchingInitialData(false));
|
|
6688
|
+
} else {
|
|
6689
|
+
try {
|
|
6690
|
+
await this.client.projectFiles.refreshStore();
|
|
6691
|
+
} finally {
|
|
6692
|
+
store.dispatch(setIsFetchingInitialData(false));
|
|
6693
|
+
}
|
|
6694
|
+
void this.client.assetTypes.refreshStore();
|
|
6695
|
+
void this.client.assetStages.refreshStore();
|
|
6696
|
+
void this.client.assets.refreshStore();
|
|
6697
|
+
void this.client.assetStageCompletions.refreshStore();
|
|
6698
|
+
void this.client.categories.refreshStore();
|
|
6699
|
+
void this.client.issueTypes.refreshStore();
|
|
6700
|
+
void this.client.issues.refreshStore();
|
|
6701
|
+
void this.fetchProjectUsers();
|
|
6702
|
+
void this.client.documents.refreshStore();
|
|
6703
|
+
void this.client.userForms.refreshStore();
|
|
6704
|
+
void this.client.documentAttachments.refreshStore();
|
|
6705
|
+
void this.client.userFormSubmissions.refreshStore();
|
|
6706
|
+
void this.client.agent.refreshStore();
|
|
6707
|
+
void this.client.issueAttachments.refreshStore();
|
|
6708
|
+
void this.client.issueComments.refreshStore();
|
|
6709
|
+
void this.client.issueUpdates.refreshStore();
|
|
6710
|
+
void this.client.projectAccesses.refreshStore();
|
|
6711
|
+
void this.client.projectAttachments.refreshStore();
|
|
6712
|
+
void this.client.assetTypeAttachments.refreshStore();
|
|
6713
|
+
void this.client.assetAttachments.refreshStore();
|
|
6714
|
+
}
|
|
6715
|
+
void this.client.teams.refreshStore();
|
|
6726
6716
|
}
|
|
6727
6717
|
}
|
|
6728
6718
|
class ProjectAccessService extends BaseApiService {
|
|
@@ -6762,16 +6752,11 @@ var __publicField = (obj, key, value) => {
|
|
|
6762
6752
|
const { store } = this.client;
|
|
6763
6753
|
const state = store.getState();
|
|
6764
6754
|
const projectId = state.projectReducer.activeProjectId;
|
|
6765
|
-
const currentUser = state.userReducer.currentUser;
|
|
6766
6755
|
if (!projectId) {
|
|
6767
6756
|
throw new Error("No active project");
|
|
6768
6757
|
}
|
|
6769
6758
|
const promise = this.fetchAll(projectId);
|
|
6770
6759
|
const result = await promise;
|
|
6771
|
-
const activeProjectAccess = result.find((projectAccess) => projectAccess.user === currentUser.id);
|
|
6772
|
-
if (!activeProjectAccess) {
|
|
6773
|
-
throw new Error("Current user does not have a project access instance");
|
|
6774
|
-
}
|
|
6775
6760
|
store.dispatch(setProjectAccesses(result));
|
|
6776
6761
|
}
|
|
6777
6762
|
}
|
|
@@ -7121,7 +7106,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7121
7106
|
});
|
|
7122
7107
|
});
|
|
7123
7108
|
}
|
|
7124
|
-
async add(state, initialRevision, url, ownerUser, ownerOrganization,
|
|
7109
|
+
async add(state, initialRevision, url, ownerUser, ownerOrganization, assetTypeId, issueTypeId) {
|
|
7125
7110
|
if (!!ownerUser === !!ownerOrganization) {
|
|
7126
7111
|
throw new Error("Exactly one of ownerUser and ownerOrganization must be defined.");
|
|
7127
7112
|
}
|
|
@@ -7140,7 +7125,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7140
7125
|
favorite: true,
|
|
7141
7126
|
submitted_at: submittedAt,
|
|
7142
7127
|
created_by: currentUser.id,
|
|
7143
|
-
...
|
|
7128
|
+
...assetTypeId && { asset_type: assetTypeId },
|
|
7144
7129
|
...issueTypeId && { issue_type: issueTypeId },
|
|
7145
7130
|
...ownerAttrs
|
|
7146
7131
|
};
|
|
@@ -7164,11 +7149,11 @@ var __publicField = (obj, key, value) => {
|
|
|
7164
7149
|
} : void 0,
|
|
7165
7150
|
payload: {
|
|
7166
7151
|
...offlineFormPayload,
|
|
7167
|
-
...
|
|
7152
|
+
...assetTypeId && { asset_type: assetTypeId },
|
|
7168
7153
|
...issueTypeId && { issue_type: issueTypeId },
|
|
7169
7154
|
initial_revision: payloadWithoutImage
|
|
7170
7155
|
},
|
|
7171
|
-
blockers:
|
|
7156
|
+
blockers: assetTypeId ? [assetTypeId] : issueTypeId ? [issueTypeId] : [],
|
|
7172
7157
|
blocks: [offlineFormPayload.offline_id, payloadWithoutImage.offline_id]
|
|
7173
7158
|
});
|
|
7174
7159
|
const attachImagesPromises = this.getAttachImagePromises(images, offlineRevisionPayload.offline_id);
|
|
@@ -7192,7 +7177,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7192
7177
|
`/forms/in-organization/${activeOrganizationId}/`,
|
|
7193
7178
|
void 0,
|
|
7194
7179
|
activeOrganizationId,
|
|
7195
|
-
attachedTo && "
|
|
7180
|
+
attachedTo && "assetTypeId" in attachedTo ? attachedTo.assetTypeId : void 0,
|
|
7196
7181
|
attachedTo && "issueTypeId" in attachedTo ? attachedTo.issueTypeId : void 0
|
|
7197
7182
|
);
|
|
7198
7183
|
}
|
|
@@ -7205,7 +7190,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7205
7190
|
"/forms/my-forms/",
|
|
7206
7191
|
currentUser.id,
|
|
7207
7192
|
void 0,
|
|
7208
|
-
attachedTo && "
|
|
7193
|
+
attachedTo && "assetTypeId" in attachedTo ? attachedTo.assetTypeId : void 0,
|
|
7209
7194
|
attachedTo && "issueTypeId" in attachedTo ? attachedTo.issueTypeId : void 0
|
|
7210
7195
|
);
|
|
7211
7196
|
}
|
|
@@ -7373,8 +7358,8 @@ var __publicField = (obj, key, value) => {
|
|
|
7373
7358
|
url: `/forms/submission/${submission.offline_id}/attachments/`,
|
|
7374
7359
|
payload: submissionAttachmentPayload,
|
|
7375
7360
|
blockers: [
|
|
7376
|
-
submission.
|
|
7377
|
-
submission.
|
|
7361
|
+
submission.asset,
|
|
7362
|
+
submission.asset_stage,
|
|
7378
7363
|
submission.issue,
|
|
7379
7364
|
submission.form_revision
|
|
7380
7365
|
].filter((x) => x !== void 0),
|
|
@@ -7410,7 +7395,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7410
7395
|
method: HttpMethod.POST,
|
|
7411
7396
|
url: `/forms/revisions/${payload.form_revision}/respond/`,
|
|
7412
7397
|
payload: { ...offlineSubmission, project: activeProjectId },
|
|
7413
|
-
blockers: [payload.issue, payload.
|
|
7398
|
+
blockers: [payload.issue, payload.asset, payload.asset_stage, "add-form-entry"].filter(
|
|
7414
7399
|
(x) => x !== void 0
|
|
7415
7400
|
),
|
|
7416
7401
|
blocks: [payload.offline_id]
|
|
@@ -7428,10 +7413,10 @@ var __publicField = (obj, key, value) => {
|
|
|
7428
7413
|
const settledPromise = Promise.all([promise, ...attachFilesPromises]).then(() => promise);
|
|
7429
7414
|
return [offlineSubmission, settledPromise];
|
|
7430
7415
|
}
|
|
7431
|
-
// Note currently the bulkAdd method is specific to form submissions for
|
|
7416
|
+
// Note currently the bulkAdd method is specific to form submissions for assets
|
|
7432
7417
|
// TODO: adapt the support bulk adding to any model type
|
|
7433
7418
|
async bulkAdd(args) {
|
|
7434
|
-
const { formRevision, values: argsValues,
|
|
7419
|
+
const { formRevision, values: argsValues, assetOfflineIds } = args;
|
|
7435
7420
|
const { store } = this.client;
|
|
7436
7421
|
const offlineSubmissions = [];
|
|
7437
7422
|
const offlineAttachments = [];
|
|
@@ -7441,16 +7426,16 @@ var __publicField = (obj, key, value) => {
|
|
|
7441
7426
|
const { values, files } = separateFilesFromValues(argsValues);
|
|
7442
7427
|
const submittedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
7443
7428
|
const createdBy = store.getState().userReducer.currentUser.id;
|
|
7444
|
-
for (const
|
|
7429
|
+
for (const assetId of assetOfflineIds) {
|
|
7445
7430
|
const submission = offline({
|
|
7446
7431
|
form_revision: formRevision,
|
|
7447
7432
|
values,
|
|
7448
7433
|
created_by: createdBy,
|
|
7449
7434
|
submitted_at: submittedAt,
|
|
7450
|
-
|
|
7435
|
+
asset: assetId
|
|
7451
7436
|
});
|
|
7452
7437
|
submissionOfflineIds.push(submission.offline_id);
|
|
7453
|
-
submissionsPayload.push({ offline_id: submission.offline_id,
|
|
7438
|
+
submissionsPayload.push({ offline_id: submission.offline_id, asset_id: assetId });
|
|
7454
7439
|
offlineSubmissions.push(submission);
|
|
7455
7440
|
for (const [fieldIdentifier, fileArray] of Object.entries(files)) {
|
|
7456
7441
|
for (const file of fileArray) {
|
|
@@ -7497,7 +7482,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7497
7482
|
attachments: attachmentsPayload,
|
|
7498
7483
|
files: Object.values(filesRecord)
|
|
7499
7484
|
},
|
|
7500
|
-
blockers:
|
|
7485
|
+
blockers: assetOfflineIds,
|
|
7501
7486
|
blocks: submissionOfflineIds
|
|
7502
7487
|
});
|
|
7503
7488
|
promise.then(({ submissions, attachments, presigned_urls }) => {
|
|
@@ -7540,7 +7525,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7540
7525
|
method: HttpMethod.PATCH,
|
|
7541
7526
|
url: `/forms/submissions/${submission.offline_id}/`,
|
|
7542
7527
|
payload: offlineSubmission,
|
|
7543
|
-
blockers: [offlineSubmission.issue, offlineSubmission.
|
|
7528
|
+
blockers: [offlineSubmission.issue, offlineSubmission.asset, offlineSubmission.asset_stage].filter(
|
|
7544
7529
|
(x) => x !== void 0
|
|
7545
7530
|
),
|
|
7546
7531
|
blocks: [offlineSubmission.offline_id]
|
|
@@ -8349,24 +8334,70 @@ var __publicField = (obj, key, value) => {
|
|
|
8349
8334
|
}
|
|
8350
8335
|
}
|
|
8351
8336
|
class AgentService extends BaseApiService {
|
|
8337
|
+
async startConversation(prompt) {
|
|
8338
|
+
const activeProjectId = this.client.store.getState().projectReducer.activeProjectId;
|
|
8339
|
+
return this.enqueueRequest({
|
|
8340
|
+
description: "Start agent conversation",
|
|
8341
|
+
method: HttpMethod.POST,
|
|
8342
|
+
url: "/agents/prompt/",
|
|
8343
|
+
payload: {
|
|
8344
|
+
prompt,
|
|
8345
|
+
active_project: activeProjectId
|
|
8346
|
+
},
|
|
8347
|
+
blockers: ["prompt"],
|
|
8348
|
+
blocks: ["prompt"]
|
|
8349
|
+
}).then((response) => {
|
|
8350
|
+
if (response.conversation) {
|
|
8351
|
+
this.client.store.dispatch(addConversation(response.conversation));
|
|
8352
|
+
return response.conversation;
|
|
8353
|
+
}
|
|
8354
|
+
throw new Error("Unexpected response from agent");
|
|
8355
|
+
});
|
|
8356
|
+
}
|
|
8352
8357
|
/**
|
|
8353
8358
|
* Prompt the agent with a message.
|
|
8354
|
-
* @param
|
|
8359
|
+
* @param prompt The message to prompt the agent with.
|
|
8355
8360
|
* @param conversationId If continuing an existing message, the UUID of that conversation.
|
|
8356
8361
|
*/
|
|
8357
|
-
async prompt
|
|
8358
|
-
const
|
|
8362
|
+
async continueConversation(prompt, conversationId) {
|
|
8363
|
+
const { store } = this.client;
|
|
8364
|
+
const activeProjectId = store.getState().projectReducer.activeProjectId;
|
|
8359
8365
|
return this.enqueueRequest({
|
|
8360
8366
|
description: "Prompt agent",
|
|
8361
8367
|
method: HttpMethod.POST,
|
|
8362
8368
|
url: "/agents/prompt/",
|
|
8363
8369
|
payload: {
|
|
8364
|
-
prompt
|
|
8370
|
+
prompt,
|
|
8365
8371
|
active_project: activeProjectId
|
|
8366
8372
|
},
|
|
8367
8373
|
blockers: ["prompt"],
|
|
8368
8374
|
blocks: ["prompt"],
|
|
8369
|
-
queryParams:
|
|
8375
|
+
queryParams: { conversation_id: conversationId }
|
|
8376
|
+
}).then((response) => {
|
|
8377
|
+
if (response.response) {
|
|
8378
|
+
const conversation = store.getState().agentsReducer.conversations[conversationId];
|
|
8379
|
+
if (!conversation) {
|
|
8380
|
+
throw new Error("Conversation not found");
|
|
8381
|
+
}
|
|
8382
|
+
store.dispatch(
|
|
8383
|
+
updateConversation({
|
|
8384
|
+
offline_id: conversationId,
|
|
8385
|
+
tiptap_content: [...conversation.tiptap_content || [], response.response]
|
|
8386
|
+
})
|
|
8387
|
+
);
|
|
8388
|
+
}
|
|
8389
|
+
throw new Error("Unexpected response from agent");
|
|
8390
|
+
});
|
|
8391
|
+
}
|
|
8392
|
+
async fetchDetails(conversationId) {
|
|
8393
|
+
return this.enqueueRequest({
|
|
8394
|
+
description: "Get agent conversation",
|
|
8395
|
+
method: HttpMethod.GET,
|
|
8396
|
+
url: `/agents/conversations/${conversationId}/`,
|
|
8397
|
+
blockers: ["conversation"],
|
|
8398
|
+
blocks: ["conversation"]
|
|
8399
|
+
}).then((response) => {
|
|
8400
|
+
this.client.store.dispatch(setConversation(response));
|
|
8370
8401
|
});
|
|
8371
8402
|
}
|
|
8372
8403
|
async rate(responseId, rating) {
|
|
@@ -8379,6 +8410,18 @@ var __publicField = (obj, key, value) => {
|
|
|
8379
8410
|
blocks: ["rate"]
|
|
8380
8411
|
});
|
|
8381
8412
|
}
|
|
8413
|
+
async refreshStore() {
|
|
8414
|
+
const { store } = this.client;
|
|
8415
|
+
const activeProject = store.getState().projectReducer.activeProjectId;
|
|
8416
|
+
const result = await this.enqueueRequest({
|
|
8417
|
+
description: "Get agent conversation history",
|
|
8418
|
+
method: HttpMethod.GET,
|
|
8419
|
+
url: `/projects/${activeProject}/agent-conversations/`,
|
|
8420
|
+
blockers: ["agent-conversations"],
|
|
8421
|
+
blocks: ["agent-conversations"]
|
|
8422
|
+
});
|
|
8423
|
+
store.dispatch(setConversations(result));
|
|
8424
|
+
}
|
|
8382
8425
|
}
|
|
8383
8426
|
class TeamService extends BaseApiService {
|
|
8384
8427
|
add(teamPayload) {
|
|
@@ -8534,12 +8577,12 @@ var __publicField = (obj, key, value) => {
|
|
|
8534
8577
|
__publicField(this, "issueAttachments", new IssueAttachmentService(this));
|
|
8535
8578
|
__publicField(this, "workspaces", new WorkspaceService(this));
|
|
8536
8579
|
__publicField(this, "main", new MainService(this));
|
|
8537
|
-
__publicField(this, "
|
|
8538
|
-
__publicField(this, "
|
|
8539
|
-
__publicField(this, "
|
|
8540
|
-
__publicField(this, "
|
|
8541
|
-
__publicField(this, "
|
|
8542
|
-
__publicField(this, "
|
|
8580
|
+
__publicField(this, "assets", new AssetService(this));
|
|
8581
|
+
__publicField(this, "assetAttachments", new AssetAttachmentService(this));
|
|
8582
|
+
__publicField(this, "assetTypes", new AssetTypeService(this));
|
|
8583
|
+
__publicField(this, "assetTypeAttachments", new AssetTypeAttachmentService(this));
|
|
8584
|
+
__publicField(this, "assetStages", new AssetStageService(this));
|
|
8585
|
+
__publicField(this, "assetStageCompletions", new AssetStageCompletionService(this));
|
|
8543
8586
|
__publicField(this, "userForms", new UserFormService(this));
|
|
8544
8587
|
__publicField(this, "userFormSubmissions", new UserFormSubmissionService(this));
|
|
8545
8588
|
__publicField(this, "projects", new ProjectService(this));
|
|
@@ -8878,260 +8921,6 @@ var __publicField = (obj, key, value) => {
|
|
|
8878
8921
|
{ ...rest, "aria-labelledby": labelId }
|
|
8879
8922
|
];
|
|
8880
8923
|
};
|
|
8881
|
-
const truthyValues = [true, "true"];
|
|
8882
|
-
const BooleanInput = React.memo((props) => {
|
|
8883
|
-
const [{ inputId, labelId, size, severity, showInputOnly, field, fieldProps }, rest] = useFormikInput(props);
|
|
8884
|
-
let [{ helpText, label }] = useFormikInput(props);
|
|
8885
|
-
helpText = showInputOnly ? null : helpText;
|
|
8886
|
-
label = showInputOnly ? "" : label;
|
|
8887
|
-
const color = blocks.useSeverityColor(severity);
|
|
8888
|
-
const value = truthyValues.includes(fieldProps.value);
|
|
8889
|
-
return /* @__PURE__ */ jsxRuntime.jsx(InputWithLabelAndHelpText, { helpText, severity, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8890
|
-
InputWithLabel,
|
|
8891
|
-
{
|
|
8892
|
-
size,
|
|
8893
|
-
severity,
|
|
8894
|
-
inputId,
|
|
8895
|
-
labelId,
|
|
8896
|
-
label,
|
|
8897
|
-
image: showInputOnly ? void 0 : field.image,
|
|
8898
|
-
flexProps: { direction: "row-reverse", justify: "end", align: "center", gap: "2" },
|
|
8899
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8900
|
-
blocks.Checkbox,
|
|
8901
|
-
{
|
|
8902
|
-
...rest,
|
|
8903
|
-
...fieldProps,
|
|
8904
|
-
id: inputId,
|
|
8905
|
-
color,
|
|
8906
|
-
value: value.toString(),
|
|
8907
|
-
checked: value,
|
|
8908
|
-
onCheckedChange: fieldProps.onChange,
|
|
8909
|
-
onChange: void 0,
|
|
8910
|
-
onBlur: void 0
|
|
8911
|
-
}
|
|
8912
|
-
)
|
|
8913
|
-
}
|
|
8914
|
-
) });
|
|
8915
|
-
});
|
|
8916
|
-
BooleanInput.displayName = "BooleanInput";
|
|
8917
|
-
var DefaultContext = {
|
|
8918
|
-
color: void 0,
|
|
8919
|
-
size: void 0,
|
|
8920
|
-
className: void 0,
|
|
8921
|
-
style: void 0,
|
|
8922
|
-
attr: void 0
|
|
8923
|
-
};
|
|
8924
|
-
var IconContext = React.createContext && /* @__PURE__ */ React.createContext(DefaultContext);
|
|
8925
|
-
var _excluded = ["attr", "size", "title"];
|
|
8926
|
-
function _objectWithoutProperties(source, excluded) {
|
|
8927
|
-
if (source == null)
|
|
8928
|
-
return {};
|
|
8929
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
8930
|
-
var key, i;
|
|
8931
|
-
if (Object.getOwnPropertySymbols) {
|
|
8932
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
8933
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
8934
|
-
key = sourceSymbolKeys[i];
|
|
8935
|
-
if (excluded.indexOf(key) >= 0)
|
|
8936
|
-
continue;
|
|
8937
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key))
|
|
8938
|
-
continue;
|
|
8939
|
-
target[key] = source[key];
|
|
8940
|
-
}
|
|
8941
|
-
}
|
|
8942
|
-
return target;
|
|
8943
|
-
}
|
|
8944
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
8945
|
-
if (source == null)
|
|
8946
|
-
return {};
|
|
8947
|
-
var target = {};
|
|
8948
|
-
for (var key in source) {
|
|
8949
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
8950
|
-
if (excluded.indexOf(key) >= 0)
|
|
8951
|
-
continue;
|
|
8952
|
-
target[key] = source[key];
|
|
8953
|
-
}
|
|
8954
|
-
}
|
|
8955
|
-
return target;
|
|
8956
|
-
}
|
|
8957
|
-
function _extends$1() {
|
|
8958
|
-
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
8959
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
8960
|
-
var source = arguments[i];
|
|
8961
|
-
for (var key in source) {
|
|
8962
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
8963
|
-
target[key] = source[key];
|
|
8964
|
-
}
|
|
8965
|
-
}
|
|
8966
|
-
}
|
|
8967
|
-
return target;
|
|
8968
|
-
};
|
|
8969
|
-
return _extends$1.apply(this, arguments);
|
|
8970
|
-
}
|
|
8971
|
-
function ownKeys(e, r) {
|
|
8972
|
-
var t = Object.keys(e);
|
|
8973
|
-
if (Object.getOwnPropertySymbols) {
|
|
8974
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
8975
|
-
r && (o = o.filter(function(r2) {
|
|
8976
|
-
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
8977
|
-
})), t.push.apply(t, o);
|
|
8978
|
-
}
|
|
8979
|
-
return t;
|
|
8980
|
-
}
|
|
8981
|
-
function _objectSpread(e) {
|
|
8982
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
8983
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
8984
|
-
r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
|
|
8985
|
-
_defineProperty(e, r2, t[r2]);
|
|
8986
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
|
|
8987
|
-
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
8988
|
-
});
|
|
8989
|
-
}
|
|
8990
|
-
return e;
|
|
8991
|
-
}
|
|
8992
|
-
function _defineProperty(obj, key, value) {
|
|
8993
|
-
key = _toPropertyKey(key);
|
|
8994
|
-
if (key in obj) {
|
|
8995
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
8996
|
-
} else {
|
|
8997
|
-
obj[key] = value;
|
|
8998
|
-
}
|
|
8999
|
-
return obj;
|
|
9000
|
-
}
|
|
9001
|
-
function _toPropertyKey(t) {
|
|
9002
|
-
var i = _toPrimitive(t, "string");
|
|
9003
|
-
return "symbol" == typeof i ? i : i + "";
|
|
9004
|
-
}
|
|
9005
|
-
function _toPrimitive(t, r) {
|
|
9006
|
-
if ("object" != typeof t || !t)
|
|
9007
|
-
return t;
|
|
9008
|
-
var e = t[Symbol.toPrimitive];
|
|
9009
|
-
if (void 0 !== e) {
|
|
9010
|
-
var i = e.call(t, r || "default");
|
|
9011
|
-
if ("object" != typeof i)
|
|
9012
|
-
return i;
|
|
9013
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
9014
|
-
}
|
|
9015
|
-
return ("string" === r ? String : Number)(t);
|
|
9016
|
-
}
|
|
9017
|
-
function Tree2Element(tree) {
|
|
9018
|
-
return tree && tree.map((node, i) => /* @__PURE__ */ React.createElement(node.tag, _objectSpread({
|
|
9019
|
-
key: i
|
|
9020
|
-
}, node.attr), Tree2Element(node.child)));
|
|
9021
|
-
}
|
|
9022
|
-
function GenIcon(data) {
|
|
9023
|
-
return (props) => /* @__PURE__ */ React.createElement(IconBase, _extends$1({
|
|
9024
|
-
attr: _objectSpread({}, data.attr)
|
|
9025
|
-
}, props), Tree2Element(data.child));
|
|
9026
|
-
}
|
|
9027
|
-
function IconBase(props) {
|
|
9028
|
-
var elem = (conf) => {
|
|
9029
|
-
var {
|
|
9030
|
-
attr,
|
|
9031
|
-
size,
|
|
9032
|
-
title: title2
|
|
9033
|
-
} = props, svgProps = _objectWithoutProperties(props, _excluded);
|
|
9034
|
-
var computedSize = size || conf.size || "1em";
|
|
9035
|
-
var className;
|
|
9036
|
-
if (conf.className)
|
|
9037
|
-
className = conf.className;
|
|
9038
|
-
if (props.className)
|
|
9039
|
-
className = (className ? className + " " : "") + props.className;
|
|
9040
|
-
return /* @__PURE__ */ React.createElement("svg", _extends$1({
|
|
9041
|
-
stroke: "currentColor",
|
|
9042
|
-
fill: "currentColor",
|
|
9043
|
-
strokeWidth: "0"
|
|
9044
|
-
}, conf.attr, attr, svgProps, {
|
|
9045
|
-
className,
|
|
9046
|
-
style: _objectSpread(_objectSpread({
|
|
9047
|
-
color: props.color || conf.color
|
|
9048
|
-
}, conf.style), props.style),
|
|
9049
|
-
height: computedSize,
|
|
9050
|
-
width: computedSize,
|
|
9051
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
9052
|
-
}), title2 && /* @__PURE__ */ React.createElement("title", null, title2), props.children);
|
|
9053
|
-
};
|
|
9054
|
-
return IconContext !== void 0 ? /* @__PURE__ */ React.createElement(IconContext.Consumer, null, (conf) => elem(conf)) : elem(DefaultContext);
|
|
9055
|
-
}
|
|
9056
|
-
function RiArrowDownLine(props) {
|
|
9057
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M13.0001 16.1716L18.3641 10.8076L19.7783 12.2218L12.0001 20L4.22192 12.2218L5.63614 10.8076L11.0001 16.1716V4H13.0001V16.1716Z" }, "child": [] }] })(props);
|
|
9058
|
-
}
|
|
9059
|
-
function RiArrowUpLine(props) {
|
|
9060
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M13.0001 7.82843V20H11.0001V7.82843L5.63614 13.1924L4.22192 11.7782L12.0001 4L19.7783 11.7782L18.3641 13.1924L13.0001 7.82843Z" }, "child": [] }] })(props);
|
|
9061
|
-
}
|
|
9062
|
-
function RiCalendarLine(props) {
|
|
9063
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M9 1V3H15V1H17V3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H7V1H9ZM20 11H4V19H20V11ZM7 5H4V9H20V5H17V7H15V5H9V7H7V5Z" }, "child": [] }] })(props);
|
|
9064
|
-
}
|
|
9065
|
-
function RiQrCodeLine(props) {
|
|
9066
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M16 17V16H13V13H16V15H18V17H17V19H15V21H13V18H15V17H16ZM21 21H17V19H19V17H21V21ZM3 3H11V11H3V3ZM5 5V9H9V5H5ZM13 3H21V11H13V3ZM15 5V9H19V5H15ZM3 13H11V21H3V13ZM5 15V19H9V15H5ZM18 13H21V15H18V13ZM6 6H8V8H6V6ZM6 16H8V18H6V16ZM16 6H18V8H16V6Z" }, "child": [] }] })(props);
|
|
9067
|
-
}
|
|
9068
|
-
function RiFileCopyLine(props) {
|
|
9069
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M6.9998 6V3C6.9998 2.44772 7.44752 2 7.9998 2H19.9998C20.5521 2 20.9998 2.44772 20.9998 3V17C20.9998 17.5523 20.5521 18 19.9998 18H16.9998V20.9991C16.9998 21.5519 16.5499 22 15.993 22H4.00666C3.45059 22 3 21.5554 3 20.9991L3.0026 7.00087C3.0027 6.44811 3.45264 6 4.00942 6H6.9998ZM5.00242 8L5.00019 20H14.9998V8H5.00242ZM8.9998 6H16.9998V16H18.9998V4H8.9998V6Z" }, "child": [] }] })(props);
|
|
9070
|
-
}
|
|
9071
|
-
function RiAlignJustify(props) {
|
|
9072
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M3 4H21V6H3V4ZM3 19H21V21H3V19ZM3 14H21V16H3V14ZM3 9H21V11H3V9Z" }, "child": [] }] })(props);
|
|
9073
|
-
}
|
|
9074
|
-
function RiHashtag(props) {
|
|
9075
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M7.78428 14L8.2047 10H4V8H8.41491L8.94043 3H10.9514L10.4259 8H14.4149L14.9404 3H16.9514L16.4259 8H20V10H16.2157L15.7953 14H20V16H15.5851L15.0596 21H13.0486L13.5741 16H9.58509L9.05957 21H7.04855L7.57407 16H4V14H7.78428ZM9.7953 14H13.7843L14.2047 10H10.2157L9.7953 14Z" }, "child": [] }] })(props);
|
|
9076
|
-
}
|
|
9077
|
-
function RiInputField(props) {
|
|
9078
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M8 5H11V19H8V21H16V19H13V5H16V3H8V5ZM2 7C1.44772 7 1 7.44772 1 8V16C1 16.5523 1.44772 17 2 17H8V15H3V9H8V7H2ZM16 9H21V15H16V17H22C22.5523 17 23 16.5523 23 16V8C23 7.44772 22.5523 7 22 7H16V9Z" }, "child": [] }] })(props);
|
|
9079
|
-
}
|
|
9080
|
-
function RiListCheck(props) {
|
|
9081
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M8 4H21V6H8V4ZM3 3.5H6V6.5H3V3.5ZM3 10.5H6V13.5H3V10.5ZM3 17.5H6V20.5H3V17.5ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z" }, "child": [] }] })(props);
|
|
9082
|
-
}
|
|
9083
|
-
function RiImageLine(props) {
|
|
9084
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M2.9918 21C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918ZM20 15V5H4V19L14 9L20 15ZM20 17.8284L14 11.8284L6.82843 19H20V17.8284ZM8 11C6.89543 11 6 10.1046 6 9C6 7.89543 6.89543 7 8 7C9.10457 7 10 7.89543 10 9C10 10.1046 9.10457 11 8 11Z" }, "child": [] }] })(props);
|
|
9085
|
-
}
|
|
9086
|
-
function RiCheckboxCircleLine(props) {
|
|
9087
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11.0026 16L6.75999 11.7574L8.17421 10.3431L11.0026 13.1716L16.6595 7.51472L18.0737 8.92893L11.0026 16Z" }, "child": [] }] })(props);
|
|
9088
|
-
}
|
|
9089
|
-
function RiCheckboxLine(props) {
|
|
9090
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3ZM5 5V19H19V5H5ZM11.0026 16L6.75999 11.7574L8.17421 10.3431L11.0026 13.1716L16.6595 7.51472L18.0737 8.92893L11.0026 16Z" }, "child": [] }] })(props);
|
|
9091
|
-
}
|
|
9092
|
-
function RiDeleteBin2Line(props) {
|
|
9093
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM13.4142 13.9997L15.182 15.7675L13.7678 17.1817L12 15.4139L10.2322 17.1817L8.81802 15.7675L10.5858 13.9997L8.81802 12.232L10.2322 10.8178L12 12.5855L13.7678 10.8178L15.182 12.232L13.4142 13.9997ZM9 4V6H15V4H9Z" }, "child": [] }] })(props);
|
|
9094
|
-
}
|
|
9095
|
-
function RiMenuFoldLine(props) {
|
|
9096
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M21 17.9995V19.9995H3V17.9995H21ZM6.59619 3.90332L8.01041 5.31753L4.82843 8.49951L8.01041 11.6815L6.59619 13.0957L2 8.49951L6.59619 3.90332ZM21 10.9995V12.9995H12V10.9995H21ZM21 3.99951V5.99951H12V3.99951H21Z" }, "child": [] }] })(props);
|
|
9097
|
-
}
|
|
9098
|
-
function RiUpload2Line(props) {
|
|
9099
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M4 19H20V12H22V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V12H4V19ZM13 9V16H11V9H6L12 3L18 9H13Z" }, "child": [] }] })(props);
|
|
9100
|
-
}
|
|
9101
|
-
const emptyBooleanField = {
|
|
9102
|
-
...emptyBaseField,
|
|
9103
|
-
type: "boolean"
|
|
9104
|
-
};
|
|
9105
|
-
const _BooleanField = class _BooleanField extends BaseField {
|
|
9106
|
-
constructor(options) {
|
|
9107
|
-
super({ ...options, type: "boolean" });
|
|
9108
|
-
__publicField(this, "onlyValidateAfterTouched", false);
|
|
9109
|
-
}
|
|
9110
|
-
// if a BooleanField is required, `false` is considered blank
|
|
9111
|
-
isBlank(value) {
|
|
9112
|
-
return this.required && !value;
|
|
9113
|
-
}
|
|
9114
|
-
getValueFromChangeEvent(event) {
|
|
9115
|
-
if (typeof event === "boolean")
|
|
9116
|
-
return event;
|
|
9117
|
-
return event.target.checked;
|
|
9118
|
-
}
|
|
9119
|
-
serialize() {
|
|
9120
|
-
return super._serialize();
|
|
9121
|
-
}
|
|
9122
|
-
static deserialize(data) {
|
|
9123
|
-
if (data.type !== "boolean")
|
|
9124
|
-
throw new Error("Type mismatch.");
|
|
9125
|
-
return new _BooleanField(data);
|
|
9126
|
-
}
|
|
9127
|
-
getInput(props) {
|
|
9128
|
-
return /* @__PURE__ */ jsxRuntime.jsx(BooleanInput, { ...props, field: this });
|
|
9129
|
-
}
|
|
9130
|
-
};
|
|
9131
|
-
__publicField(_BooleanField, "fieldTypeName", "Checkbox");
|
|
9132
|
-
__publicField(_BooleanField, "fieldTypeDescription", "Perfect for both optional and required yes/no questions.");
|
|
9133
|
-
__publicField(_BooleanField, "Icon", RiCheckboxCircleLine);
|
|
9134
|
-
let BooleanField = _BooleanField;
|
|
9135
8924
|
function getDefaultExportFromCjs(x) {
|
|
9136
8925
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
9137
8926
|
}
|
|
@@ -9184,8 +8973,8 @@ var __publicField = (obj, key, value) => {
|
|
|
9184
8973
|
})(classnames);
|
|
9185
8974
|
var classnamesExports = classnames.exports;
|
|
9186
8975
|
const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
|
|
9187
|
-
function _extends() {
|
|
9188
|
-
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
8976
|
+
function _extends$1() {
|
|
8977
|
+
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
9189
8978
|
for (var i = 1; i < arguments.length; i++) {
|
|
9190
8979
|
var source = arguments[i];
|
|
9191
8980
|
for (var key in source) {
|
|
@@ -9196,7 +8985,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9196
8985
|
}
|
|
9197
8986
|
return target;
|
|
9198
8987
|
};
|
|
9199
|
-
return _extends.apply(this, arguments);
|
|
8988
|
+
return _extends$1.apply(this, arguments);
|
|
9200
8989
|
}
|
|
9201
8990
|
function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
9202
8991
|
return function handleEvent(event) {
|
|
@@ -9327,11 +9116,11 @@ var __publicField = (obj, key, value) => {
|
|
|
9327
9116
|
} else
|
|
9328
9117
|
return child;
|
|
9329
9118
|
});
|
|
9330
|
-
return /* @__PURE__ */ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
9119
|
+
return /* @__PURE__ */ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends$1({}, slotProps, {
|
|
9331
9120
|
ref: forwardedRef
|
|
9332
9121
|
}), /* @__PURE__ */ React.isValidElement(newElement) ? /* @__PURE__ */ React.cloneElement(newElement, void 0, newChildren) : null);
|
|
9333
9122
|
}
|
|
9334
|
-
return /* @__PURE__ */ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
9123
|
+
return /* @__PURE__ */ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends$1({}, slotProps, {
|
|
9335
9124
|
ref: forwardedRef
|
|
9336
9125
|
}), children);
|
|
9337
9126
|
});
|
|
@@ -9409,7 +9198,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9409
9198
|
React.useEffect(() => {
|
|
9410
9199
|
window[Symbol.for("radix-ui")] = true;
|
|
9411
9200
|
}, []);
|
|
9412
|
-
return /* @__PURE__ */ React.createElement(Comp, _extends({}, primitiveProps, {
|
|
9201
|
+
return /* @__PURE__ */ React.createElement(Comp, _extends$1({}, primitiveProps, {
|
|
9413
9202
|
ref: forwardedRef
|
|
9414
9203
|
}));
|
|
9415
9204
|
});
|
|
@@ -9968,9 +9757,9 @@ var __publicField = (obj, key, value) => {
|
|
|
9968
9757
|
return React__namespace.createElement("div", { ...insetProps, ref: forwardedRef, className: classNames("rt-Inset", className, withBreakpoints(side, "rt-r-side"), withBreakpoints(clip, "rt-r-clip"), withBreakpoints(p, "rt-r-p"), withBreakpoints(px, "rt-r-px"), withBreakpoints(py, "rt-r-py"), withBreakpoints(pt, "rt-r-pt"), withBreakpoints(pr, "rt-r-pr"), withBreakpoints(pb, "rt-r-pb"), withBreakpoints(pl, "rt-r-pl"), withMarginProps(marginProps)) });
|
|
9969
9758
|
});
|
|
9970
9759
|
Inset.displayName = "Inset";
|
|
9971
|
-
const sizes$
|
|
9760
|
+
const sizes$9 = ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
9972
9761
|
const headingPropDefs = {
|
|
9973
|
-
size: { type: "enum", values: sizes$
|
|
9762
|
+
size: { type: "enum", values: sizes$9, default: "6", responsive: true },
|
|
9974
9763
|
weight: { ...weightProp, default: "bold" },
|
|
9975
9764
|
align: alignProp,
|
|
9976
9765
|
trim: trimProp,
|
|
@@ -9983,9 +9772,9 @@ var __publicField = (obj, key, value) => {
|
|
|
9983
9772
|
return React__namespace.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360, { "data-accent-color": color, ...headingProps, ref: forwardedRef, className: classNames("rt-Heading", className, withBreakpoints(size, "rt-r-size"), withBreakpoints(weight, "rt-r-weight"), withBreakpoints(align, "rt-r-ta"), withBreakpoints(trim, "rt-r-lt"), { "rt-high-contrast": highContrast }, withMarginProps(marginProps)) }, asChild ? children : React__namespace.createElement(Tag, null, children));
|
|
9984
9773
|
});
|
|
9985
9774
|
Heading.displayName = "Heading";
|
|
9986
|
-
const sizes$
|
|
9775
|
+
const sizes$8 = ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
9987
9776
|
const textPropDefs = {
|
|
9988
|
-
size: { type: "enum", values: sizes$
|
|
9777
|
+
size: { type: "enum", values: sizes$8, default: void 0, responsive: true },
|
|
9989
9778
|
weight: weightProp,
|
|
9990
9779
|
align: alignProp,
|
|
9991
9780
|
trim: trimProp,
|
|
@@ -9998,11 +9787,11 @@ var __publicField = (obj, key, value) => {
|
|
|
9998
9787
|
return React__namespace.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360, { "data-accent-color": color, ...textProps, ref: forwardedRef, className: classNames("rt-Text", className, withBreakpoints(size, "rt-r-size"), withBreakpoints(weight, "rt-r-weight"), withBreakpoints(align, "rt-r-ta"), withBreakpoints(trim, "rt-r-lt"), { "rt-high-contrast": highContrast }, withMarginProps(marginProps)) }, asChild ? children : React__namespace.createElement(Tag, null, children));
|
|
9999
9788
|
});
|
|
10000
9789
|
Text.displayName = "Text";
|
|
10001
|
-
const sizes$
|
|
10002
|
-
const variants$
|
|
9790
|
+
const sizes$7 = ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
9791
|
+
const variants$5 = ["solid", "soft", "outline", "ghost"];
|
|
10003
9792
|
const codePropDefs = {
|
|
10004
|
-
size: { type: "enum", values: sizes$
|
|
10005
|
-
variant: { type: "enum", values: variants$
|
|
9793
|
+
size: { type: "enum", values: sizes$7, default: void 0, responsive: true },
|
|
9794
|
+
variant: { type: "enum", values: variants$5, default: "soft" },
|
|
10006
9795
|
weight: weightProp,
|
|
10007
9796
|
color: colorProp,
|
|
10008
9797
|
highContrast: highContrastProp
|
|
@@ -10032,6 +9821,202 @@ var __publicField = (obj, key, value) => {
|
|
|
10032
9821
|
value
|
|
10033
9822
|
]);
|
|
10034
9823
|
}
|
|
9824
|
+
const $e698a72e93240346$var$CHECKBOX_NAME = "Checkbox";
|
|
9825
|
+
const [$e698a72e93240346$var$createCheckboxContext, $e698a72e93240346$export$b566c4ff5488ea01] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($e698a72e93240346$var$CHECKBOX_NAME);
|
|
9826
|
+
const [$e698a72e93240346$var$CheckboxProvider, $e698a72e93240346$var$useCheckboxContext] = $e698a72e93240346$var$createCheckboxContext($e698a72e93240346$var$CHECKBOX_NAME);
|
|
9827
|
+
const $e698a72e93240346$export$48513f6b9f8ce62d = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
9828
|
+
const { __scopeCheckbox, name, checked: checkedProp, defaultChecked, required, disabled, value = "on", onCheckedChange, ...checkboxProps } = props;
|
|
9829
|
+
const [button, setButton] = React.useState(null);
|
|
9830
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(
|
|
9831
|
+
forwardedRef,
|
|
9832
|
+
(node) => setButton(node)
|
|
9833
|
+
);
|
|
9834
|
+
const hasConsumerStoppedPropagationRef = React.useRef(false);
|
|
9835
|
+
const isFormControl = button ? Boolean(button.closest("form")) : true;
|
|
9836
|
+
const [checked = false, setChecked] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
9837
|
+
prop: checkedProp,
|
|
9838
|
+
defaultProp: defaultChecked,
|
|
9839
|
+
onChange: onCheckedChange
|
|
9840
|
+
});
|
|
9841
|
+
const initialCheckedStateRef = React.useRef(checked);
|
|
9842
|
+
React.useEffect(() => {
|
|
9843
|
+
const form = button === null || button === void 0 ? void 0 : button.form;
|
|
9844
|
+
if (form) {
|
|
9845
|
+
const reset = () => setChecked(initialCheckedStateRef.current);
|
|
9846
|
+
form.addEventListener("reset", reset);
|
|
9847
|
+
return () => form.removeEventListener("reset", reset);
|
|
9848
|
+
}
|
|
9849
|
+
}, [
|
|
9850
|
+
button,
|
|
9851
|
+
setChecked
|
|
9852
|
+
]);
|
|
9853
|
+
return /* @__PURE__ */ React.createElement($e698a72e93240346$var$CheckboxProvider, {
|
|
9854
|
+
scope: __scopeCheckbox,
|
|
9855
|
+
state: checked,
|
|
9856
|
+
disabled
|
|
9857
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends$1({
|
|
9858
|
+
type: "button",
|
|
9859
|
+
role: "checkbox",
|
|
9860
|
+
"aria-checked": $e698a72e93240346$var$isIndeterminate(checked) ? "mixed" : checked,
|
|
9861
|
+
"aria-required": required,
|
|
9862
|
+
"data-state": $e698a72e93240346$var$getState(checked),
|
|
9863
|
+
"data-disabled": disabled ? "" : void 0,
|
|
9864
|
+
disabled,
|
|
9865
|
+
value
|
|
9866
|
+
}, checkboxProps, {
|
|
9867
|
+
ref: composedRefs,
|
|
9868
|
+
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event) => {
|
|
9869
|
+
if (event.key === "Enter")
|
|
9870
|
+
event.preventDefault();
|
|
9871
|
+
}),
|
|
9872
|
+
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, (event) => {
|
|
9873
|
+
setChecked(
|
|
9874
|
+
(prevChecked) => $e698a72e93240346$var$isIndeterminate(prevChecked) ? true : !prevChecked
|
|
9875
|
+
);
|
|
9876
|
+
if (isFormControl) {
|
|
9877
|
+
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
|
|
9878
|
+
if (!hasConsumerStoppedPropagationRef.current)
|
|
9879
|
+
event.stopPropagation();
|
|
9880
|
+
}
|
|
9881
|
+
})
|
|
9882
|
+
})), isFormControl && /* @__PURE__ */ React.createElement($e698a72e93240346$var$BubbleInput, {
|
|
9883
|
+
control: button,
|
|
9884
|
+
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
9885
|
+
name,
|
|
9886
|
+
value,
|
|
9887
|
+
checked,
|
|
9888
|
+
required,
|
|
9889
|
+
disabled,
|
|
9890
|
+
style: {
|
|
9891
|
+
transform: "translateX(-100%)"
|
|
9892
|
+
}
|
|
9893
|
+
}));
|
|
9894
|
+
});
|
|
9895
|
+
const $e698a72e93240346$var$INDICATOR_NAME = "CheckboxIndicator";
|
|
9896
|
+
const $e698a72e93240346$export$59aad738f51d1c05 = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
9897
|
+
const { __scopeCheckbox, forceMount, ...indicatorProps } = props;
|
|
9898
|
+
const context = $e698a72e93240346$var$useCheckboxContext($e698a72e93240346$var$INDICATOR_NAME, __scopeCheckbox);
|
|
9899
|
+
return /* @__PURE__ */ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
9900
|
+
present: forceMount || $e698a72e93240346$var$isIndeterminate(context.state) || context.state === true
|
|
9901
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({
|
|
9902
|
+
"data-state": $e698a72e93240346$var$getState(context.state),
|
|
9903
|
+
"data-disabled": context.disabled ? "" : void 0
|
|
9904
|
+
}, indicatorProps, {
|
|
9905
|
+
ref: forwardedRef,
|
|
9906
|
+
style: {
|
|
9907
|
+
pointerEvents: "none",
|
|
9908
|
+
...props.style
|
|
9909
|
+
}
|
|
9910
|
+
})));
|
|
9911
|
+
});
|
|
9912
|
+
const $e698a72e93240346$var$BubbleInput = (props) => {
|
|
9913
|
+
const { control, checked, bubbles = true, ...inputProps } = props;
|
|
9914
|
+
const ref = React.useRef(null);
|
|
9915
|
+
const prevChecked = $010c2913dbd2fe3d$export$5cae361ad82dce8b(checked);
|
|
9916
|
+
const controlSize = $db6c3485150b8e66$export$1ab7ae714698c4b8(control);
|
|
9917
|
+
React.useEffect(() => {
|
|
9918
|
+
const input = ref.current;
|
|
9919
|
+
const inputProto = window.HTMLInputElement.prototype;
|
|
9920
|
+
const descriptor = Object.getOwnPropertyDescriptor(inputProto, "checked");
|
|
9921
|
+
const setChecked = descriptor.set;
|
|
9922
|
+
if (prevChecked !== checked && setChecked) {
|
|
9923
|
+
const event = new Event("click", {
|
|
9924
|
+
bubbles
|
|
9925
|
+
});
|
|
9926
|
+
input.indeterminate = $e698a72e93240346$var$isIndeterminate(checked);
|
|
9927
|
+
setChecked.call(input, $e698a72e93240346$var$isIndeterminate(checked) ? false : checked);
|
|
9928
|
+
input.dispatchEvent(event);
|
|
9929
|
+
}
|
|
9930
|
+
}, [
|
|
9931
|
+
prevChecked,
|
|
9932
|
+
checked,
|
|
9933
|
+
bubbles
|
|
9934
|
+
]);
|
|
9935
|
+
return /* @__PURE__ */ React.createElement("input", _extends$1({
|
|
9936
|
+
type: "checkbox",
|
|
9937
|
+
"aria-hidden": true,
|
|
9938
|
+
defaultChecked: $e698a72e93240346$var$isIndeterminate(checked) ? false : checked
|
|
9939
|
+
}, inputProps, {
|
|
9940
|
+
tabIndex: -1,
|
|
9941
|
+
ref,
|
|
9942
|
+
style: {
|
|
9943
|
+
...props.style,
|
|
9944
|
+
...controlSize,
|
|
9945
|
+
position: "absolute",
|
|
9946
|
+
pointerEvents: "none",
|
|
9947
|
+
opacity: 0,
|
|
9948
|
+
margin: 0
|
|
9949
|
+
}
|
|
9950
|
+
}));
|
|
9951
|
+
};
|
|
9952
|
+
function $e698a72e93240346$var$isIndeterminate(checked) {
|
|
9953
|
+
return checked === "indeterminate";
|
|
9954
|
+
}
|
|
9955
|
+
function $e698a72e93240346$var$getState(checked) {
|
|
9956
|
+
return $e698a72e93240346$var$isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
|
|
9957
|
+
}
|
|
9958
|
+
const $e698a72e93240346$export$be92b6f5f03c0fe9 = $e698a72e93240346$export$48513f6b9f8ce62d;
|
|
9959
|
+
const $e698a72e93240346$export$adb584737d712b70 = $e698a72e93240346$export$59aad738f51d1c05;
|
|
9960
|
+
const sizes$6 = ["1", "2", "3"];
|
|
9961
|
+
const variants$4 = ["classic", "surface", "soft"];
|
|
9962
|
+
const checkboxPropDefs = {
|
|
9963
|
+
size: { type: "enum", values: sizes$6, default: "2", responsive: true },
|
|
9964
|
+
variant: { type: "enum", values: variants$4, default: "surface" },
|
|
9965
|
+
color: colorProp,
|
|
9966
|
+
highContrast: highContrastProp
|
|
9967
|
+
};
|
|
9968
|
+
const ThickCheckIcon = React__namespace.forwardRef(({ color = "currentColor", ...props }, forwardedRef) => {
|
|
9969
|
+
return React__namespace.createElement(
|
|
9970
|
+
"svg",
|
|
9971
|
+
{ width: "9", height: "9", viewBox: "0 0 9 9", fill: color, xmlns: "http://www.w3.org/2000/svg", ...props, ref: forwardedRef },
|
|
9972
|
+
React__namespace.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.53547 0.62293C8.88226 0.849446 8.97976 1.3142 8.75325 1.66099L4.5083 8.1599C4.38833 8.34356 4.19397 8.4655 3.9764 8.49358C3.75883 8.52167 3.53987 8.45309 3.3772 8.30591L0.616113 5.80777C0.308959 5.52987 0.285246 5.05559 0.563148 4.74844C0.84105 4.44128 1.31533 4.41757 1.62249 4.69547L3.73256 6.60459L7.49741 0.840706C7.72393 0.493916 8.18868 0.396414 8.53547 0.62293Z" })
|
|
9973
|
+
);
|
|
9974
|
+
});
|
|
9975
|
+
ThickCheckIcon.displayName = "ThickCheckIcon";
|
|
9976
|
+
const ChevronDownIcon = React__namespace.forwardRef(({ color = "currentColor", ...props }, forwardedRef) => {
|
|
9977
|
+
return React__namespace.createElement(
|
|
9978
|
+
"svg",
|
|
9979
|
+
{ width: "9", height: "9", viewBox: "0 0 9 9", fill: color, xmlns: "http://www.w3.org/2000/svg", ...props, ref: forwardedRef },
|
|
9980
|
+
React__namespace.createElement("path", { d: "M0.135232 3.15803C0.324102 2.95657 0.640521 2.94637 0.841971 3.13523L4.5 6.56464L8.158 3.13523C8.3595 2.94637 8.6759 2.95657 8.8648 3.15803C9.0536 3.35949 9.0434 3.67591 8.842 3.86477L4.84197 7.6148C4.64964 7.7951 4.35036 7.7951 4.15803 7.6148L0.158031 3.86477C-0.0434285 3.67591 -0.0536285 3.35949 0.135232 3.15803Z" })
|
|
9981
|
+
);
|
|
9982
|
+
});
|
|
9983
|
+
ChevronDownIcon.displayName = "ChevronDownIcon";
|
|
9984
|
+
const ThickChevronRightIcon = React__namespace.forwardRef(({ color = "currentColor", ...props }, forwardedRef) => {
|
|
9985
|
+
return React__namespace.createElement(
|
|
9986
|
+
"svg",
|
|
9987
|
+
{ width: "9", height: "9", viewBox: "0 0 9 9", fill: color, xmlns: "http://www.w3.org/2000/svg", ...props, ref: forwardedRef },
|
|
9988
|
+
React__namespace.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.23826 0.201711C3.54108 -0.0809141 4.01567 -0.0645489 4.29829 0.238264L7.79829 3.98826C8.06724 4.27642 8.06724 4.72359 7.79829 5.01174L4.29829 8.76174C4.01567 9.06455 3.54108 9.08092 3.23826 8.79829C2.93545 8.51567 2.91909 8.04108 3.20171 7.73826L6.22409 4.5L3.20171 1.26174C2.91909 0.958928 2.93545 0.484337 3.23826 0.201711Z" })
|
|
9989
|
+
);
|
|
9990
|
+
});
|
|
9991
|
+
ThickChevronRightIcon.displayName = "ThickChevronRightIcon";
|
|
9992
|
+
const InfoCircledIcon = React__namespace.forwardRef(({ color = "currentColor", ...props }, forwardedRef) => {
|
|
9993
|
+
return React__namespace.createElement(
|
|
9994
|
+
"svg",
|
|
9995
|
+
{ width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, ref: forwardedRef },
|
|
9996
|
+
React__namespace.createElement("path", { d: "M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z", fill: color, fillRule: "evenodd", clipRule: "evenodd" })
|
|
9997
|
+
);
|
|
9998
|
+
});
|
|
9999
|
+
InfoCircledIcon.displayName = "InfoCircledIcon";
|
|
10000
|
+
const Checkbox = React__namespace.forwardRef((props, forwardedRef) => {
|
|
10001
|
+
const { rest: marginRest, ...marginProps } = extractMarginProps(props);
|
|
10002
|
+
const { className, style, size = checkboxPropDefs.size.default, variant = checkboxPropDefs.variant.default, color = checkboxPropDefs.color.default, highContrast = checkboxPropDefs.highContrast.default, ...checkboxProps } = marginRest;
|
|
10003
|
+
return React__namespace.createElement(
|
|
10004
|
+
"span",
|
|
10005
|
+
{ className: classNames("rt-CheckboxRoot", className, withBreakpoints(size, "rt-r-size"), withMarginProps(marginProps)), style },
|
|
10006
|
+
React__namespace.createElement(
|
|
10007
|
+
$e698a72e93240346$export$be92b6f5f03c0fe9,
|
|
10008
|
+
{ "data-accent-color": color, ...checkboxProps, ref: forwardedRef, className: classNames("rt-reset", "rt-CheckboxButton", `rt-variant-${variant}`, {
|
|
10009
|
+
"rt-high-contrast": highContrast
|
|
10010
|
+
}) },
|
|
10011
|
+
React__namespace.createElement(
|
|
10012
|
+
$e698a72e93240346$export$adb584737d712b70,
|
|
10013
|
+
{ className: "rt-CheckboxIndicator" },
|
|
10014
|
+
React__namespace.createElement(ThickCheckIcon, { className: "rt-CheckboxIndicatorIcon" })
|
|
10015
|
+
)
|
|
10016
|
+
)
|
|
10017
|
+
);
|
|
10018
|
+
});
|
|
10019
|
+
Checkbox.displayName = "Checkbox";
|
|
10035
10020
|
function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
10036
10021
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
10037
10022
|
const [createCollectionContext, createCollectionScope] = $c512c27ab02ef895$export$50c7b4e9d9f19c1(PROVIDER_NAME);
|
|
@@ -10123,7 +10108,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10123
10108
|
scope: props.__scopeRovingFocusGroup
|
|
10124
10109
|
}, /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$var$Collection.Slot, {
|
|
10125
10110
|
scope: props.__scopeRovingFocusGroup
|
|
10126
|
-
}, /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$var$RovingFocusGroupImpl, _extends({}, props, {
|
|
10111
|
+
}, /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$var$RovingFocusGroupImpl, _extends$1({}, props, {
|
|
10127
10112
|
ref: forwardedRef
|
|
10128
10113
|
}))));
|
|
10129
10114
|
});
|
|
@@ -10179,7 +10164,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10179
10164
|
),
|
|
10180
10165
|
[]
|
|
10181
10166
|
)
|
|
10182
|
-
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
10167
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
10183
10168
|
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
10184
10169
|
"data-orientation": orientation
|
|
10185
10170
|
}, groupProps, {
|
|
@@ -10249,7 +10234,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10249
10234
|
id,
|
|
10250
10235
|
focusable,
|
|
10251
10236
|
active
|
|
10252
|
-
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
|
|
10237
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({
|
|
10253
10238
|
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
10254
10239
|
"data-orientation": context.orientation
|
|
10255
10240
|
}, itemProps, {
|
|
@@ -10389,7 +10374,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10389
10374
|
onScrollbarYEnabledChange: setScrollbarYEnabled,
|
|
10390
10375
|
onCornerWidthChange: setCornerWidth,
|
|
10391
10376
|
onCornerHeightChange: setCornerHeight
|
|
10392
|
-
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
10377
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
10393
10378
|
dir: direction
|
|
10394
10379
|
}, scrollAreaProps, {
|
|
10395
10380
|
ref: composedRefs,
|
|
@@ -10412,7 +10397,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10412
10397
|
dangerouslySetInnerHTML: {
|
|
10413
10398
|
__html: `[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`
|
|
10414
10399
|
}
|
|
10415
|
-
}), /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
10400
|
+
}), /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
10416
10401
|
"data-radix-scroll-area-viewport": ""
|
|
10417
10402
|
}, viewportProps, {
|
|
10418
10403
|
ref: composedRefs,
|
|
@@ -10456,16 +10441,16 @@ var __publicField = (obj, key, value) => {
|
|
|
10456
10441
|
onScrollbarXEnabledChange,
|
|
10457
10442
|
onScrollbarYEnabledChange
|
|
10458
10443
|
]);
|
|
10459
|
-
return context.type === "hover" ? /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarHover, _extends({}, scrollbarProps, {
|
|
10444
|
+
return context.type === "hover" ? /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarHover, _extends$1({}, scrollbarProps, {
|
|
10460
10445
|
ref: forwardedRef,
|
|
10461
10446
|
forceMount
|
|
10462
|
-
})) : context.type === "scroll" ? /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarScroll, _extends({}, scrollbarProps, {
|
|
10447
|
+
})) : context.type === "scroll" ? /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarScroll, _extends$1({}, scrollbarProps, {
|
|
10463
10448
|
ref: forwardedRef,
|
|
10464
10449
|
forceMount
|
|
10465
|
-
})) : context.type === "auto" ? /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarAuto, _extends({}, scrollbarProps, {
|
|
10450
|
+
})) : context.type === "auto" ? /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarAuto, _extends$1({}, scrollbarProps, {
|
|
10466
10451
|
ref: forwardedRef,
|
|
10467
10452
|
forceMount
|
|
10468
|
-
})) : context.type === "always" ? /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarVisible, _extends({}, scrollbarProps, {
|
|
10453
|
+
})) : context.type === "always" ? /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarVisible, _extends$1({}, scrollbarProps, {
|
|
10469
10454
|
ref: forwardedRef
|
|
10470
10455
|
})) : null;
|
|
10471
10456
|
});
|
|
@@ -10501,7 +10486,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10501
10486
|
]);
|
|
10502
10487
|
return /* @__PURE__ */ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
10503
10488
|
present: forceMount || visible
|
|
10504
|
-
}, /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarAuto, _extends({
|
|
10489
|
+
}, /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarAuto, _extends$1({
|
|
10505
10490
|
"data-state": visible ? "visible" : "hidden"
|
|
10506
10491
|
}, scrollbarProps, {
|
|
10507
10492
|
ref: forwardedRef
|
|
@@ -10571,7 +10556,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10571
10556
|
]);
|
|
10572
10557
|
return /* @__PURE__ */ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
10573
10558
|
present: forceMount || state !== "hidden"
|
|
10574
|
-
}, /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarVisible, _extends({
|
|
10559
|
+
}, /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarVisible, _extends$1({
|
|
10575
10560
|
"data-state": state === "hidden" ? "hidden" : "visible"
|
|
10576
10561
|
}, scrollbarProps, {
|
|
10577
10562
|
ref: forwardedRef,
|
|
@@ -10601,7 +10586,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10601
10586
|
$57acba87d6e25586$var$useResizeObserver(context.content, handleResize);
|
|
10602
10587
|
return /* @__PURE__ */ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
10603
10588
|
present: forceMount || visible
|
|
10604
|
-
}, /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarVisible, _extends({
|
|
10589
|
+
}, /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarVisible, _extends$1({
|
|
10605
10590
|
"data-state": visible ? "visible" : "hidden"
|
|
10606
10591
|
}, scrollbarProps, {
|
|
10607
10592
|
ref: forwardedRef
|
|
@@ -10635,7 +10620,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10635
10620
|
return $57acba87d6e25586$var$getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes2, dir);
|
|
10636
10621
|
}
|
|
10637
10622
|
if (orientation === "horizontal")
|
|
10638
|
-
return /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarX, _extends({}, commonProps, {
|
|
10623
|
+
return /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarX, _extends$1({}, commonProps, {
|
|
10639
10624
|
ref: forwardedRef,
|
|
10640
10625
|
onThumbPositionChange: () => {
|
|
10641
10626
|
if (context.viewport && thumbRef.current) {
|
|
@@ -10654,7 +10639,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10654
10639
|
}
|
|
10655
10640
|
}));
|
|
10656
10641
|
if (orientation === "vertical")
|
|
10657
|
-
return /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarY, _extends({}, commonProps, {
|
|
10642
|
+
return /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarY, _extends$1({}, commonProps, {
|
|
10658
10643
|
ref: forwardedRef,
|
|
10659
10644
|
onThumbPositionChange: () => {
|
|
10660
10645
|
if (context.viewport && thumbRef.current) {
|
|
@@ -10686,7 +10671,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10686
10671
|
}, [
|
|
10687
10672
|
ref
|
|
10688
10673
|
]);
|
|
10689
|
-
return /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarImpl, _extends({
|
|
10674
|
+
return /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarImpl, _extends$1({
|
|
10690
10675
|
"data-orientation": "horizontal"
|
|
10691
10676
|
}, scrollbarProps, {
|
|
10692
10677
|
ref: composeRefs,
|
|
@@ -10734,7 +10719,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10734
10719
|
}, [
|
|
10735
10720
|
ref
|
|
10736
10721
|
]);
|
|
10737
|
-
return /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarImpl, _extends({
|
|
10722
|
+
return /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarImpl, _extends$1({
|
|
10738
10723
|
"data-orientation": "vertical"
|
|
10739
10724
|
}, scrollbarProps, {
|
|
10740
10725
|
ref: composeRefs,
|
|
@@ -10830,7 +10815,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10830
10815
|
onThumbPointerUp: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onThumbPointerUp),
|
|
10831
10816
|
onThumbPositionChange: handleThumbPositionChange,
|
|
10832
10817
|
onThumbPointerDown: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onThumbPointerDown)
|
|
10833
|
-
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, scrollbarProps, {
|
|
10818
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({}, scrollbarProps, {
|
|
10834
10819
|
ref: composeRefs,
|
|
10835
10820
|
style: {
|
|
10836
10821
|
position: "absolute",
|
|
@@ -10867,7 +10852,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10867
10852
|
const scrollbarContext = $57acba87d6e25586$var$useScrollbarContext($57acba87d6e25586$var$THUMB_NAME, props.__scopeScrollArea);
|
|
10868
10853
|
return /* @__PURE__ */ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
10869
10854
|
present: forceMount || scrollbarContext.hasThumb
|
|
10870
|
-
}, /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaThumbImpl, _extends({
|
|
10855
|
+
}, /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaThumbImpl, _extends$1({
|
|
10871
10856
|
ref: forwardedRef
|
|
10872
10857
|
}, thumbProps)));
|
|
10873
10858
|
});
|
|
@@ -10907,7 +10892,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10907
10892
|
debounceScrollEnd,
|
|
10908
10893
|
onThumbPositionChange
|
|
10909
10894
|
]);
|
|
10910
|
-
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
10895
|
+
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
10911
10896
|
"data-state": scrollbarContext.hasThumb ? "visible" : "hidden"
|
|
10912
10897
|
}, thumbProps, {
|
|
10913
10898
|
ref: composedRef,
|
|
@@ -10934,7 +10919,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10934
10919
|
const context = $57acba87d6e25586$var$useScrollAreaContext($57acba87d6e25586$var$CORNER_NAME, props.__scopeScrollArea);
|
|
10935
10920
|
const hasBothScrollbarsVisible = Boolean(context.scrollbarX && context.scrollbarY);
|
|
10936
10921
|
const hasCorner = context.type !== "scroll" && hasBothScrollbarsVisible;
|
|
10937
|
-
return hasCorner ? /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaCornerImpl, _extends({}, props, {
|
|
10922
|
+
return hasCorner ? /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaCornerImpl, _extends$1({}, props, {
|
|
10938
10923
|
ref: forwardedRef
|
|
10939
10924
|
})) : null;
|
|
10940
10925
|
});
|
|
@@ -10956,7 +10941,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10956
10941
|
context.onCornerWidthChange(width);
|
|
10957
10942
|
setWidth(width);
|
|
10958
10943
|
});
|
|
10959
|
-
return hasSize ? /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, cornerProps, {
|
|
10944
|
+
return hasSize ? /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({}, cornerProps, {
|
|
10960
10945
|
ref: forwardedRef,
|
|
10961
10946
|
style: {
|
|
10962
10947
|
width: width1,
|
|
@@ -11217,7 +11202,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11217
11202
|
scope: props.__scopeSlider
|
|
11218
11203
|
}, /* @__PURE__ */ React.createElement($faa2e61a3361514f$var$Collection.Slot, {
|
|
11219
11204
|
scope: props.__scopeSlider
|
|
11220
|
-
}, /* @__PURE__ */ React.createElement(SliderOrientation, _extends({
|
|
11205
|
+
}, /* @__PURE__ */ React.createElement(SliderOrientation, _extends$1({
|
|
11221
11206
|
"aria-disabled": disabled,
|
|
11222
11207
|
"data-disabled": disabled ? "" : void 0
|
|
11223
11208
|
}, sliderProps, {
|
|
@@ -11299,7 +11284,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11299
11284
|
endEdge: isSlidingFromLeft ? "right" : "left",
|
|
11300
11285
|
direction: isSlidingFromLeft ? 1 : -1,
|
|
11301
11286
|
size: "width"
|
|
11302
|
-
}, /* @__PURE__ */ React.createElement($faa2e61a3361514f$var$SliderImpl, _extends({
|
|
11287
|
+
}, /* @__PURE__ */ React.createElement($faa2e61a3361514f$var$SliderImpl, _extends$1({
|
|
11303
11288
|
dir: direction,
|
|
11304
11289
|
"data-orientation": "horizontal"
|
|
11305
11290
|
}, sliderProps, {
|
|
@@ -11359,7 +11344,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11359
11344
|
endEdge: isSlidingFromBottom ? "top" : "bottom",
|
|
11360
11345
|
size: "height",
|
|
11361
11346
|
direction: isSlidingFromBottom ? 1 : -1
|
|
11362
|
-
}, /* @__PURE__ */ React.createElement($faa2e61a3361514f$var$SliderImpl, _extends({
|
|
11347
|
+
}, /* @__PURE__ */ React.createElement($faa2e61a3361514f$var$SliderImpl, _extends$1({
|
|
11363
11348
|
"data-orientation": "vertical"
|
|
11364
11349
|
}, sliderProps, {
|
|
11365
11350
|
ref,
|
|
@@ -11392,7 +11377,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11392
11377
|
const $faa2e61a3361514f$var$SliderImpl = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
11393
11378
|
const { __scopeSlider, onSlideStart, onSlideMove, onSlideEnd, onHomeKeyDown, onEndKeyDown, onStepKeyDown, ...sliderProps } = props;
|
|
11394
11379
|
const context = $faa2e61a3361514f$var$useSliderContext($faa2e61a3361514f$var$SLIDER_NAME, __scopeSlider);
|
|
11395
|
-
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, sliderProps, {
|
|
11380
|
+
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({}, sliderProps, {
|
|
11396
11381
|
ref: forwardedRef,
|
|
11397
11382
|
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event) => {
|
|
11398
11383
|
if (event.key === "Home") {
|
|
@@ -11433,7 +11418,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11433
11418
|
const $faa2e61a3361514f$export$105594979f116971 = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
11434
11419
|
const { __scopeSlider, ...trackProps } = props;
|
|
11435
11420
|
const context = $faa2e61a3361514f$var$useSliderContext($faa2e61a3361514f$var$TRACK_NAME, __scopeSlider);
|
|
11436
|
-
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
|
|
11421
|
+
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({
|
|
11437
11422
|
"data-disabled": context.disabled ? "" : void 0,
|
|
11438
11423
|
"data-orientation": context.orientation
|
|
11439
11424
|
}, trackProps, {
|
|
@@ -11453,7 +11438,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11453
11438
|
);
|
|
11454
11439
|
const offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0;
|
|
11455
11440
|
const offsetEnd = 100 - Math.max(...percentages);
|
|
11456
|
-
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
|
|
11441
|
+
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({
|
|
11457
11442
|
"data-orientation": context.orientation,
|
|
11458
11443
|
"data-disabled": context.disabled ? "" : void 0
|
|
11459
11444
|
}, rangeProps, {
|
|
@@ -11482,7 +11467,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11482
11467
|
thumb
|
|
11483
11468
|
]
|
|
11484
11469
|
);
|
|
11485
|
-
return /* @__PURE__ */ React.createElement($faa2e61a3361514f$var$SliderThumbImpl, _extends({}, props, {
|
|
11470
|
+
return /* @__PURE__ */ React.createElement($faa2e61a3361514f$var$SliderThumbImpl, _extends$1({}, props, {
|
|
11486
11471
|
ref: composedRefs,
|
|
11487
11472
|
index: index2
|
|
11488
11473
|
}));
|
|
@@ -11521,7 +11506,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11521
11506
|
}
|
|
11522
11507
|
}, /* @__PURE__ */ React.createElement($faa2e61a3361514f$var$Collection.ItemSlot, {
|
|
11523
11508
|
scope: props.__scopeSlider
|
|
11524
|
-
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
|
|
11509
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({
|
|
11525
11510
|
role: "slider",
|
|
11526
11511
|
"aria-label": props["aria-label"] || label,
|
|
11527
11512
|
"aria-valuemin": context.min,
|
|
@@ -11561,7 +11546,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11561
11546
|
prevValue,
|
|
11562
11547
|
value
|
|
11563
11548
|
]);
|
|
11564
|
-
return /* @__PURE__ */ React.createElement("input", _extends({
|
|
11549
|
+
return /* @__PURE__ */ React.createElement("input", _extends$1({
|
|
11565
11550
|
style: {
|
|
11566
11551
|
display: "none"
|
|
11567
11552
|
}
|
|
@@ -11780,7 +11765,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11780
11765
|
scope: __scopeAvatar,
|
|
11781
11766
|
imageLoadingStatus,
|
|
11782
11767
|
onImageLoadingStatusChange: setImageLoadingStatus
|
|
11783
|
-
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, avatarProps, {
|
|
11768
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({}, avatarProps, {
|
|
11784
11769
|
ref: forwardedRef
|
|
11785
11770
|
})));
|
|
11786
11771
|
});
|
|
@@ -11801,7 +11786,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11801
11786
|
imageLoadingStatus,
|
|
11802
11787
|
handleLoadingStatusChange
|
|
11803
11788
|
]);
|
|
11804
|
-
return imageLoadingStatus === "loaded" ? /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.img, _extends({}, imageProps, {
|
|
11789
|
+
return imageLoadingStatus === "loaded" ? /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.img, _extends$1({}, imageProps, {
|
|
11805
11790
|
ref: forwardedRef,
|
|
11806
11791
|
src
|
|
11807
11792
|
})) : null;
|
|
@@ -11822,7 +11807,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11822
11807
|
}, [
|
|
11823
11808
|
delayMs
|
|
11824
11809
|
]);
|
|
11825
|
-
return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, fallbackProps, {
|
|
11810
|
+
return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({}, fallbackProps, {
|
|
11826
11811
|
ref: forwardedRef
|
|
11827
11812
|
})) : null;
|
|
11828
11813
|
});
|
|
@@ -11926,7 +11911,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11926
11911
|
orientation,
|
|
11927
11912
|
dir: direction,
|
|
11928
11913
|
activationMode
|
|
11929
|
-
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
11914
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
11930
11915
|
dir: direction,
|
|
11931
11916
|
"data-orientation": orientation
|
|
11932
11917
|
}, tabsProps, {
|
|
@@ -11938,13 +11923,13 @@ var __publicField = (obj, key, value) => {
|
|
|
11938
11923
|
const { __scopeTabs, loop = true, ...listProps } = props;
|
|
11939
11924
|
const context = $69cb30bb0017df05$var$useTabsContext($69cb30bb0017df05$var$TAB_LIST_NAME, __scopeTabs);
|
|
11940
11925
|
const rovingFocusGroupScope = $69cb30bb0017df05$var$useRovingFocusGroupScope(__scopeTabs);
|
|
11941
|
-
return /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9, _extends({
|
|
11926
|
+
return /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9, _extends$1({
|
|
11942
11927
|
asChild: true
|
|
11943
11928
|
}, rovingFocusGroupScope, {
|
|
11944
11929
|
orientation: context.orientation,
|
|
11945
11930
|
dir: context.dir,
|
|
11946
11931
|
loop
|
|
11947
|
-
}), /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
11932
|
+
}), /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
11948
11933
|
role: "tablist",
|
|
11949
11934
|
"aria-orientation": context.orientation
|
|
11950
11935
|
}, listProps, {
|
|
@@ -11959,12 +11944,12 @@ var __publicField = (obj, key, value) => {
|
|
|
11959
11944
|
const triggerId = $69cb30bb0017df05$var$makeTriggerId(context.baseId, value);
|
|
11960
11945
|
const contentId = $69cb30bb0017df05$var$makeContentId(context.baseId, value);
|
|
11961
11946
|
const isSelected = value === context.value;
|
|
11962
|
-
return /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$export$6d08773d2e66f8f2, _extends({
|
|
11947
|
+
return /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$export$6d08773d2e66f8f2, _extends$1({
|
|
11963
11948
|
asChild: true
|
|
11964
11949
|
}, rovingFocusGroupScope, {
|
|
11965
11950
|
focusable: !disabled,
|
|
11966
11951
|
active: isSelected
|
|
11967
|
-
}), /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
|
|
11952
|
+
}), /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends$1({
|
|
11968
11953
|
type: "button",
|
|
11969
11954
|
role: "tab",
|
|
11970
11955
|
"aria-selected": isSelected,
|
|
@@ -12014,7 +11999,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12014
11999
|
{
|
|
12015
12000
|
present: forceMount || isSelected
|
|
12016
12001
|
},
|
|
12017
|
-
({ present }) => /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
12002
|
+
({ present }) => /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
12018
12003
|
"data-state": isSelected ? "active" : "inactive",
|
|
12019
12004
|
"data-orientation": context.orientation,
|
|
12020
12005
|
role: "tabpanel",
|
|
@@ -12074,6 +12059,260 @@ var __publicField = (obj, key, value) => {
|
|
|
12074
12059
|
Trigger: TabsTrigger,
|
|
12075
12060
|
Content: TabsContent
|
|
12076
12061
|
});
|
|
12062
|
+
const truthyValues = [true, "true"];
|
|
12063
|
+
const BooleanInput = React.memo((props) => {
|
|
12064
|
+
const [{ inputId, labelId, size, severity, showInputOnly, field, fieldProps }, rest] = useFormikInput(props);
|
|
12065
|
+
let [{ helpText, label }] = useFormikInput(props);
|
|
12066
|
+
helpText = showInputOnly ? null : helpText;
|
|
12067
|
+
label = showInputOnly ? "" : label;
|
|
12068
|
+
const color = blocks.useSeverityColor(severity);
|
|
12069
|
+
const value = truthyValues.includes(fieldProps.value);
|
|
12070
|
+
return /* @__PURE__ */ jsxRuntime.jsx(InputWithLabelAndHelpText, { helpText, severity, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12071
|
+
InputWithLabel,
|
|
12072
|
+
{
|
|
12073
|
+
size,
|
|
12074
|
+
severity,
|
|
12075
|
+
inputId,
|
|
12076
|
+
labelId,
|
|
12077
|
+
label,
|
|
12078
|
+
image: showInputOnly ? void 0 : field.image,
|
|
12079
|
+
flexProps: { direction: "row-reverse", justify: "end", align: "center", gap: "2" },
|
|
12080
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12081
|
+
Checkbox,
|
|
12082
|
+
{
|
|
12083
|
+
...rest,
|
|
12084
|
+
...fieldProps,
|
|
12085
|
+
id: inputId,
|
|
12086
|
+
color,
|
|
12087
|
+
value: value.toString(),
|
|
12088
|
+
checked: value,
|
|
12089
|
+
onCheckedChange: fieldProps.onChange,
|
|
12090
|
+
onChange: void 0,
|
|
12091
|
+
onBlur: void 0
|
|
12092
|
+
}
|
|
12093
|
+
)
|
|
12094
|
+
}
|
|
12095
|
+
) });
|
|
12096
|
+
});
|
|
12097
|
+
BooleanInput.displayName = "BooleanInput";
|
|
12098
|
+
var DefaultContext = {
|
|
12099
|
+
color: void 0,
|
|
12100
|
+
size: void 0,
|
|
12101
|
+
className: void 0,
|
|
12102
|
+
style: void 0,
|
|
12103
|
+
attr: void 0
|
|
12104
|
+
};
|
|
12105
|
+
var IconContext = React.createContext && /* @__PURE__ */ React.createContext(DefaultContext);
|
|
12106
|
+
var _excluded = ["attr", "size", "title"];
|
|
12107
|
+
function _objectWithoutProperties(source, excluded) {
|
|
12108
|
+
if (source == null)
|
|
12109
|
+
return {};
|
|
12110
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
12111
|
+
var key, i;
|
|
12112
|
+
if (Object.getOwnPropertySymbols) {
|
|
12113
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
12114
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
12115
|
+
key = sourceSymbolKeys[i];
|
|
12116
|
+
if (excluded.indexOf(key) >= 0)
|
|
12117
|
+
continue;
|
|
12118
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key))
|
|
12119
|
+
continue;
|
|
12120
|
+
target[key] = source[key];
|
|
12121
|
+
}
|
|
12122
|
+
}
|
|
12123
|
+
return target;
|
|
12124
|
+
}
|
|
12125
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
12126
|
+
if (source == null)
|
|
12127
|
+
return {};
|
|
12128
|
+
var target = {};
|
|
12129
|
+
for (var key in source) {
|
|
12130
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12131
|
+
if (excluded.indexOf(key) >= 0)
|
|
12132
|
+
continue;
|
|
12133
|
+
target[key] = source[key];
|
|
12134
|
+
}
|
|
12135
|
+
}
|
|
12136
|
+
return target;
|
|
12137
|
+
}
|
|
12138
|
+
function _extends() {
|
|
12139
|
+
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
12140
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
12141
|
+
var source = arguments[i];
|
|
12142
|
+
for (var key in source) {
|
|
12143
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12144
|
+
target[key] = source[key];
|
|
12145
|
+
}
|
|
12146
|
+
}
|
|
12147
|
+
}
|
|
12148
|
+
return target;
|
|
12149
|
+
};
|
|
12150
|
+
return _extends.apply(this, arguments);
|
|
12151
|
+
}
|
|
12152
|
+
function ownKeys(e, r) {
|
|
12153
|
+
var t = Object.keys(e);
|
|
12154
|
+
if (Object.getOwnPropertySymbols) {
|
|
12155
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
12156
|
+
r && (o = o.filter(function(r2) {
|
|
12157
|
+
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
12158
|
+
})), t.push.apply(t, o);
|
|
12159
|
+
}
|
|
12160
|
+
return t;
|
|
12161
|
+
}
|
|
12162
|
+
function _objectSpread(e) {
|
|
12163
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
12164
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
12165
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
|
|
12166
|
+
_defineProperty(e, r2, t[r2]);
|
|
12167
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
|
|
12168
|
+
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
12169
|
+
});
|
|
12170
|
+
}
|
|
12171
|
+
return e;
|
|
12172
|
+
}
|
|
12173
|
+
function _defineProperty(obj, key, value) {
|
|
12174
|
+
key = _toPropertyKey(key);
|
|
12175
|
+
if (key in obj) {
|
|
12176
|
+
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
12177
|
+
} else {
|
|
12178
|
+
obj[key] = value;
|
|
12179
|
+
}
|
|
12180
|
+
return obj;
|
|
12181
|
+
}
|
|
12182
|
+
function _toPropertyKey(t) {
|
|
12183
|
+
var i = _toPrimitive(t, "string");
|
|
12184
|
+
return "symbol" == typeof i ? i : i + "";
|
|
12185
|
+
}
|
|
12186
|
+
function _toPrimitive(t, r) {
|
|
12187
|
+
if ("object" != typeof t || !t)
|
|
12188
|
+
return t;
|
|
12189
|
+
var e = t[Symbol.toPrimitive];
|
|
12190
|
+
if (void 0 !== e) {
|
|
12191
|
+
var i = e.call(t, r || "default");
|
|
12192
|
+
if ("object" != typeof i)
|
|
12193
|
+
return i;
|
|
12194
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
12195
|
+
}
|
|
12196
|
+
return ("string" === r ? String : Number)(t);
|
|
12197
|
+
}
|
|
12198
|
+
function Tree2Element(tree) {
|
|
12199
|
+
return tree && tree.map((node, i) => /* @__PURE__ */ React.createElement(node.tag, _objectSpread({
|
|
12200
|
+
key: i
|
|
12201
|
+
}, node.attr), Tree2Element(node.child)));
|
|
12202
|
+
}
|
|
12203
|
+
function GenIcon(data) {
|
|
12204
|
+
return (props) => /* @__PURE__ */ React.createElement(IconBase, _extends({
|
|
12205
|
+
attr: _objectSpread({}, data.attr)
|
|
12206
|
+
}, props), Tree2Element(data.child));
|
|
12207
|
+
}
|
|
12208
|
+
function IconBase(props) {
|
|
12209
|
+
var elem = (conf) => {
|
|
12210
|
+
var {
|
|
12211
|
+
attr,
|
|
12212
|
+
size,
|
|
12213
|
+
title: title2
|
|
12214
|
+
} = props, svgProps = _objectWithoutProperties(props, _excluded);
|
|
12215
|
+
var computedSize = size || conf.size || "1em";
|
|
12216
|
+
var className;
|
|
12217
|
+
if (conf.className)
|
|
12218
|
+
className = conf.className;
|
|
12219
|
+
if (props.className)
|
|
12220
|
+
className = (className ? className + " " : "") + props.className;
|
|
12221
|
+
return /* @__PURE__ */ React.createElement("svg", _extends({
|
|
12222
|
+
stroke: "currentColor",
|
|
12223
|
+
fill: "currentColor",
|
|
12224
|
+
strokeWidth: "0"
|
|
12225
|
+
}, conf.attr, attr, svgProps, {
|
|
12226
|
+
className,
|
|
12227
|
+
style: _objectSpread(_objectSpread({
|
|
12228
|
+
color: props.color || conf.color
|
|
12229
|
+
}, conf.style), props.style),
|
|
12230
|
+
height: computedSize,
|
|
12231
|
+
width: computedSize,
|
|
12232
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
12233
|
+
}), title2 && /* @__PURE__ */ React.createElement("title", null, title2), props.children);
|
|
12234
|
+
};
|
|
12235
|
+
return IconContext !== void 0 ? /* @__PURE__ */ React.createElement(IconContext.Consumer, null, (conf) => elem(conf)) : elem(DefaultContext);
|
|
12236
|
+
}
|
|
12237
|
+
function RiArrowDownLine(props) {
|
|
12238
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M13.0001 16.1716L18.3641 10.8076L19.7783 12.2218L12.0001 20L4.22192 12.2218L5.63614 10.8076L11.0001 16.1716V4H13.0001V16.1716Z" }, "child": [] }] })(props);
|
|
12239
|
+
}
|
|
12240
|
+
function RiArrowUpLine(props) {
|
|
12241
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M13.0001 7.82843V20H11.0001V7.82843L5.63614 13.1924L4.22192 11.7782L12.0001 4L19.7783 11.7782L18.3641 13.1924L13.0001 7.82843Z" }, "child": [] }] })(props);
|
|
12242
|
+
}
|
|
12243
|
+
function RiCalendarLine(props) {
|
|
12244
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M9 1V3H15V1H17V3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H7V1H9ZM20 11H4V19H20V11ZM7 5H4V9H20V5H17V7H15V5H9V7H7V5Z" }, "child": [] }] })(props);
|
|
12245
|
+
}
|
|
12246
|
+
function RiQrCodeLine(props) {
|
|
12247
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M16 17V16H13V13H16V15H18V17H17V19H15V21H13V18H15V17H16ZM21 21H17V19H19V17H21V21ZM3 3H11V11H3V3ZM5 5V9H9V5H5ZM13 3H21V11H13V3ZM15 5V9H19V5H15ZM3 13H11V21H3V13ZM5 15V19H9V15H5ZM18 13H21V15H18V13ZM6 6H8V8H6V6ZM6 16H8V18H6V16ZM16 6H18V8H16V6Z" }, "child": [] }] })(props);
|
|
12248
|
+
}
|
|
12249
|
+
function RiFileCopyLine(props) {
|
|
12250
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M6.9998 6V3C6.9998 2.44772 7.44752 2 7.9998 2H19.9998C20.5521 2 20.9998 2.44772 20.9998 3V17C20.9998 17.5523 20.5521 18 19.9998 18H16.9998V20.9991C16.9998 21.5519 16.5499 22 15.993 22H4.00666C3.45059 22 3 21.5554 3 20.9991L3.0026 7.00087C3.0027 6.44811 3.45264 6 4.00942 6H6.9998ZM5.00242 8L5.00019 20H14.9998V8H5.00242ZM8.9998 6H16.9998V16H18.9998V4H8.9998V6Z" }, "child": [] }] })(props);
|
|
12251
|
+
}
|
|
12252
|
+
function RiAlignJustify(props) {
|
|
12253
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M3 4H21V6H3V4ZM3 19H21V21H3V19ZM3 14H21V16H3V14ZM3 9H21V11H3V9Z" }, "child": [] }] })(props);
|
|
12254
|
+
}
|
|
12255
|
+
function RiHashtag(props) {
|
|
12256
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M7.78428 14L8.2047 10H4V8H8.41491L8.94043 3H10.9514L10.4259 8H14.4149L14.9404 3H16.9514L16.4259 8H20V10H16.2157L15.7953 14H20V16H15.5851L15.0596 21H13.0486L13.5741 16H9.58509L9.05957 21H7.04855L7.57407 16H4V14H7.78428ZM9.7953 14H13.7843L14.2047 10H10.2157L9.7953 14Z" }, "child": [] }] })(props);
|
|
12257
|
+
}
|
|
12258
|
+
function RiInputField(props) {
|
|
12259
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M8 5H11V19H8V21H16V19H13V5H16V3H8V5ZM2 7C1.44772 7 1 7.44772 1 8V16C1 16.5523 1.44772 17 2 17H8V15H3V9H8V7H2ZM16 9H21V15H16V17H22C22.5523 17 23 16.5523 23 16V8C23 7.44772 22.5523 7 22 7H16V9Z" }, "child": [] }] })(props);
|
|
12260
|
+
}
|
|
12261
|
+
function RiListCheck(props) {
|
|
12262
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M8 4H21V6H8V4ZM3 3.5H6V6.5H3V3.5ZM3 10.5H6V13.5H3V10.5ZM3 17.5H6V20.5H3V17.5ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z" }, "child": [] }] })(props);
|
|
12263
|
+
}
|
|
12264
|
+
function RiImageLine(props) {
|
|
12265
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M2.9918 21C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918ZM20 15V5H4V19L14 9L20 15ZM20 17.8284L14 11.8284L6.82843 19H20V17.8284ZM8 11C6.89543 11 6 10.1046 6 9C6 7.89543 6.89543 7 8 7C9.10457 7 10 7.89543 10 9C10 10.1046 9.10457 11 8 11Z" }, "child": [] }] })(props);
|
|
12266
|
+
}
|
|
12267
|
+
function RiCheckboxCircleLine(props) {
|
|
12268
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11.0026 16L6.75999 11.7574L8.17421 10.3431L11.0026 13.1716L16.6595 7.51472L18.0737 8.92893L11.0026 16Z" }, "child": [] }] })(props);
|
|
12269
|
+
}
|
|
12270
|
+
function RiCheckboxLine(props) {
|
|
12271
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3ZM5 5V19H19V5H5ZM11.0026 16L6.75999 11.7574L8.17421 10.3431L11.0026 13.1716L16.6595 7.51472L18.0737 8.92893L11.0026 16Z" }, "child": [] }] })(props);
|
|
12272
|
+
}
|
|
12273
|
+
function RiDeleteBin2Line(props) {
|
|
12274
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM13.4142 13.9997L15.182 15.7675L13.7678 17.1817L12 15.4139L10.2322 17.1817L8.81802 15.7675L10.5858 13.9997L8.81802 12.232L10.2322 10.8178L12 12.5855L13.7678 10.8178L15.182 12.232L13.4142 13.9997ZM9 4V6H15V4H9Z" }, "child": [] }] })(props);
|
|
12275
|
+
}
|
|
12276
|
+
function RiMenuFoldLine(props) {
|
|
12277
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M21 17.9995V19.9995H3V17.9995H21ZM6.59619 3.90332L8.01041 5.31753L4.82843 8.49951L8.01041 11.6815L6.59619 13.0957L2 8.49951L6.59619 3.90332ZM21 10.9995V12.9995H12V10.9995H21ZM21 3.99951V5.99951H12V3.99951H21Z" }, "child": [] }] })(props);
|
|
12278
|
+
}
|
|
12279
|
+
function RiUpload2Line(props) {
|
|
12280
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M4 19H20V12H22V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V12H4V19ZM13 9V16H11V9H6L12 3L18 9H13Z" }, "child": [] }] })(props);
|
|
12281
|
+
}
|
|
12282
|
+
const emptyBooleanField = {
|
|
12283
|
+
...emptyBaseField,
|
|
12284
|
+
type: "boolean"
|
|
12285
|
+
};
|
|
12286
|
+
const _BooleanField = class _BooleanField extends BaseField {
|
|
12287
|
+
constructor(options) {
|
|
12288
|
+
super({ ...options, type: "boolean" });
|
|
12289
|
+
__publicField(this, "onlyValidateAfterTouched", false);
|
|
12290
|
+
}
|
|
12291
|
+
// if a BooleanField is required, `false` is considered blank
|
|
12292
|
+
isBlank(value) {
|
|
12293
|
+
return this.required && !value;
|
|
12294
|
+
}
|
|
12295
|
+
getValueFromChangeEvent(event) {
|
|
12296
|
+
if (typeof event === "boolean")
|
|
12297
|
+
return event;
|
|
12298
|
+
return event.target.checked;
|
|
12299
|
+
}
|
|
12300
|
+
serialize() {
|
|
12301
|
+
return super._serialize();
|
|
12302
|
+
}
|
|
12303
|
+
static deserialize(data) {
|
|
12304
|
+
if (data.type !== "boolean")
|
|
12305
|
+
throw new Error("Type mismatch.");
|
|
12306
|
+
return new _BooleanField(data);
|
|
12307
|
+
}
|
|
12308
|
+
getInput(props) {
|
|
12309
|
+
return /* @__PURE__ */ jsxRuntime.jsx(BooleanInput, { ...props, field: this });
|
|
12310
|
+
}
|
|
12311
|
+
};
|
|
12312
|
+
__publicField(_BooleanField, "fieldTypeName", "Checkbox");
|
|
12313
|
+
__publicField(_BooleanField, "fieldTypeDescription", "Perfect for both optional and required yes/no questions.");
|
|
12314
|
+
__publicField(_BooleanField, "Icon", RiCheckboxCircleLine);
|
|
12315
|
+
let BooleanField = _BooleanField;
|
|
12077
12316
|
const NumberInput = React.memo((props) => {
|
|
12078
12317
|
const [{ inputId, labelId, size, severity, showInputOnly, field, fieldProps }, rest] = useFormikInput(props);
|
|
12079
12318
|
let [{ helpText, label }] = useFormikInput(props);
|
|
@@ -13179,7 +13418,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13179
13418
|
] }),
|
|
13180
13419
|
value && /* @__PURE__ */ jsxRuntime.jsx(Text, { color: "jade", size: "1", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiCheckLine", style: { verticalAlign: "bottom" } }) })
|
|
13181
13420
|
] }),
|
|
13182
|
-
value && /* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { width: "max-content", gap: "2", align: "center", children: [
|
|
13421
|
+
!!value && /* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { width: "max-content", gap: "2", align: "center", children: [
|
|
13183
13422
|
/* @__PURE__ */ jsxRuntime.jsx(Code, { color: "gray", highContrast: true, children: value }),
|
|
13184
13423
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13185
13424
|
blocks.IconButton,
|
|
@@ -13219,9 +13458,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13219
13458
|
}
|
|
13220
13459
|
);
|
|
13221
13460
|
setIsScannerLoading(true);
|
|
13222
|
-
qrScanner.start().
|
|
13223
|
-
setIsScannerLoading(false);
|
|
13224
|
-
}).catch(() => {
|
|
13461
|
+
void qrScanner.start().finally(() => {
|
|
13225
13462
|
setIsScannerLoading(false);
|
|
13226
13463
|
});
|
|
13227
13464
|
}, [onQrScan]);
|
|
@@ -14976,9 +15213,9 @@ var __publicField = (obj, key, value) => {
|
|
|
14976
15213
|
}, [filter, maxResults, ownerFilter]);
|
|
14977
15214
|
const userForms = useAppSelector(selectFilteredForms(ownerFilterOptions)) ?? [];
|
|
14978
15215
|
const userFormMapping = useAppSelector(selectFormMapping);
|
|
14979
|
-
const attachableUserForms = userForms.filter((form) => !form.
|
|
15216
|
+
const attachableUserForms = userForms.filter((form) => !form.asset_type && !form.issue_type);
|
|
14980
15217
|
const attachableUserFormMapping = Object.values(userFormMapping).filter(
|
|
14981
|
-
(form) => !form.
|
|
15218
|
+
(form) => !form.asset_type
|
|
14982
15219
|
);
|
|
14983
15220
|
const handleToggleFavorite = React.useCallback(
|
|
14984
15221
|
(form) => {
|
|
@@ -16382,6 +16619,13 @@ var __publicField = (obj, key, value) => {
|
|
|
16382
16619
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
16383
16620
|
exports2.APIError = APIError;
|
|
16384
16621
|
exports2.AgentService = AgentService;
|
|
16622
|
+
exports2.AssetAttachmentService = AssetAttachmentService;
|
|
16623
|
+
exports2.AssetService = AssetService;
|
|
16624
|
+
exports2.AssetStageColors = AssetStageColors;
|
|
16625
|
+
exports2.AssetStageCompletionService = AssetStageCompletionService;
|
|
16626
|
+
exports2.AssetStageService = AssetStageService;
|
|
16627
|
+
exports2.AssetTypeAttachmentService = AssetTypeAttachmentService;
|
|
16628
|
+
exports2.AssetTypeService = AssetTypeService;
|
|
16385
16629
|
exports2.AttachmentModel = AttachmentModel;
|
|
16386
16630
|
exports2.AuthService = AuthService;
|
|
16387
16631
|
exports2.BaseApiService = BaseApiService;
|
|
@@ -16393,13 +16637,6 @@ var __publicField = (obj, key, value) => {
|
|
|
16393
16637
|
exports2.ColorPicker = ColorPicker;
|
|
16394
16638
|
exports2.Colors = Colors;
|
|
16395
16639
|
exports2.ColorsToString = ColorsToString;
|
|
16396
|
-
exports2.ComponentAttachmentService = ComponentAttachmentService;
|
|
16397
|
-
exports2.ComponentService = ComponentService;
|
|
16398
|
-
exports2.ComponentStageColors = ComponentStageColors;
|
|
16399
|
-
exports2.ComponentStageCompletionService = ComponentStageCompletionService;
|
|
16400
|
-
exports2.ComponentStageService = ComponentStageService;
|
|
16401
|
-
exports2.ComponentTypeAttachmentService = ComponentTypeAttachmentService;
|
|
16402
|
-
exports2.ComponentTypeService = ComponentTypeService;
|
|
16403
16640
|
exports2.DEFAULT_ISSUE_PRIORITY = DEFAULT_ISSUE_PRIORITY;
|
|
16404
16641
|
exports2.DEFAULT_ISSUE_STATUS = DEFAULT_ISSUE_STATUS;
|
|
16405
16642
|
exports2.DateField = DateField;
|
|
@@ -16491,14 +16728,15 @@ var __publicField = (obj, key, value) => {
|
|
|
16491
16728
|
exports2.acceptProjectInvite = acceptProjectInvite;
|
|
16492
16729
|
exports2.addActiveProjectFormSubmissionsCount = addActiveProjectFormSubmissionsCount;
|
|
16493
16730
|
exports2.addActiveProjectIssuesCount = addActiveProjectIssuesCount;
|
|
16731
|
+
exports2.addAsset = addAsset;
|
|
16732
|
+
exports2.addAssetAttachment = addAssetAttachment;
|
|
16733
|
+
exports2.addAssetAttachments = addAssetAttachments;
|
|
16734
|
+
exports2.addAssetType = addAssetType;
|
|
16735
|
+
exports2.addAssetTypeAttachment = addAssetTypeAttachment;
|
|
16736
|
+
exports2.addAssetTypeAttachments = addAssetTypeAttachments;
|
|
16737
|
+
exports2.addAssetsInBatches = addAssetsInBatches;
|
|
16494
16738
|
exports2.addCategory = addCategory;
|
|
16495
|
-
exports2.
|
|
16496
|
-
exports2.addComponentAttachment = addComponentAttachment;
|
|
16497
|
-
exports2.addComponentAttachments = addComponentAttachments;
|
|
16498
|
-
exports2.addComponentType = addComponentType;
|
|
16499
|
-
exports2.addComponentTypeAttachment = addComponentTypeAttachment;
|
|
16500
|
-
exports2.addComponentTypeAttachments = addComponentTypeAttachments;
|
|
16501
|
-
exports2.addComponentsInBatches = addComponentsInBatches;
|
|
16739
|
+
exports2.addConversation = addConversation;
|
|
16502
16740
|
exports2.addDocumentAttachment = addDocumentAttachment;
|
|
16503
16741
|
exports2.addDocumentAttachments = addDocumentAttachments;
|
|
16504
16742
|
exports2.addDocuments = addDocuments;
|
|
@@ -16539,7 +16777,17 @@ var __publicField = (obj, key, value) => {
|
|
|
16539
16777
|
exports2.addToRecentIssues = addToRecentIssues;
|
|
16540
16778
|
exports2.addUsers = addUsers;
|
|
16541
16779
|
exports2.addWorkspace = addWorkspace;
|
|
16780
|
+
exports2.agentsReducer = agentsReducer;
|
|
16781
|
+
exports2.agentsSlice = agentsSlice;
|
|
16542
16782
|
exports2.areArraysEqual = areArraysEqual;
|
|
16783
|
+
exports2.assetReducer = assetReducer;
|
|
16784
|
+
exports2.assetSlice = assetSlice;
|
|
16785
|
+
exports2.assetStageCompletionReducer = assetStageCompletionReducer;
|
|
16786
|
+
exports2.assetStageCompletionSlice = assetStageCompletionSlice;
|
|
16787
|
+
exports2.assetStageReducer = assetStageReducer;
|
|
16788
|
+
exports2.assetStageSlice = assetStageSlice;
|
|
16789
|
+
exports2.assetTypeReducer = assetTypeReducer;
|
|
16790
|
+
exports2.assetTypeSlice = assetTypeSlice;
|
|
16543
16791
|
exports2.authReducer = authReducer;
|
|
16544
16792
|
exports2.authSlice = authSlice;
|
|
16545
16793
|
exports2.blobToBase64 = blobToBase64;
|
|
@@ -16549,14 +16797,6 @@ var __publicField = (obj, key, value) => {
|
|
|
16549
16797
|
exports2.classNames = classNames$1;
|
|
16550
16798
|
exports2.cleanRecentIssues = cleanRecentIssues;
|
|
16551
16799
|
exports2.clearTokens = clearTokens;
|
|
16552
|
-
exports2.componentReducer = componentReducer;
|
|
16553
|
-
exports2.componentSlice = componentSlice;
|
|
16554
|
-
exports2.componentStageCompletionReducer = componentStageCompletionReducer;
|
|
16555
|
-
exports2.componentStageCompletionSlice = componentStageCompletionSlice;
|
|
16556
|
-
exports2.componentStageReducer = componentStageReducer;
|
|
16557
|
-
exports2.componentStageSlice = componentStageSlice;
|
|
16558
|
-
exports2.componentTypeReducer = componentTypeReducer;
|
|
16559
|
-
exports2.componentTypeSlice = componentTypeSlice;
|
|
16560
16800
|
exports2.constructUploadedFilePayloads = constructUploadedFilePayloads;
|
|
16561
16801
|
exports2.coordinatesAreEqual = coordinatesAreEqual;
|
|
16562
16802
|
exports2.coordinatesToLiteral = coordinatesToLiteral;
|
|
@@ -16567,7 +16807,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16567
16807
|
exports2.createPointMarker = createPointMarker;
|
|
16568
16808
|
exports2.defaultBadgeColor = defaultBadgeColor;
|
|
16569
16809
|
exports2.defaultStore = defaultStore;
|
|
16570
|
-
exports2.
|
|
16810
|
+
exports2.deleteAssetType = deleteAssetType;
|
|
16571
16811
|
exports2.deleteForm = deleteForm;
|
|
16572
16812
|
exports2.deleteFormRevision = deleteFormRevision;
|
|
16573
16813
|
exports2.deleteFormRevisionAttachment = deleteFormRevisionAttachment;
|
|
@@ -16616,7 +16856,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16616
16856
|
exports2.formSubmissionReducer = formSubmissionReducer;
|
|
16617
16857
|
exports2.formSubmissionSlice = formSubmissionSlice;
|
|
16618
16858
|
exports2.forms = index;
|
|
16619
|
-
exports2.
|
|
16859
|
+
exports2.fullAssetMarkerSize = fullAssetMarkerSize;
|
|
16620
16860
|
exports2.generateBadgeColors = generateBadgeColors;
|
|
16621
16861
|
exports2.genericMemo = genericMemo;
|
|
16622
16862
|
exports2.getFileIdentifier = getFileIdentifier;
|
|
@@ -16676,15 +16916,15 @@ var __publicField = (obj, key, value) => {
|
|
|
16676
16916
|
exports2.projectSlice = projectSlice;
|
|
16677
16917
|
exports2.rehydratedReducer = rehydratedReducer;
|
|
16678
16918
|
exports2.rehydratedSlice = rehydratedSlice;
|
|
16679
|
-
exports2.
|
|
16919
|
+
exports2.removeAllAssetsOfType = removeAllAssetsOfType;
|
|
16920
|
+
exports2.removeAsset = removeAsset;
|
|
16921
|
+
exports2.removeAssetAttachment = removeAssetAttachment;
|
|
16922
|
+
exports2.removeAssetAttachments = removeAssetAttachments;
|
|
16923
|
+
exports2.removeAssetTypeAttachment = removeAssetTypeAttachment;
|
|
16924
|
+
exports2.removeAssetTypeAttachments = removeAssetTypeAttachments;
|
|
16680
16925
|
exports2.removeAttachmentsOfIssue = removeAttachmentsOfIssue;
|
|
16681
16926
|
exports2.removeCategory = removeCategory;
|
|
16682
16927
|
exports2.removeColor = removeColor;
|
|
16683
|
-
exports2.removeComponent = removeComponent;
|
|
16684
|
-
exports2.removeComponentAttachment = removeComponentAttachment;
|
|
16685
|
-
exports2.removeComponentAttachments = removeComponentAttachments;
|
|
16686
|
-
exports2.removeComponentTypeAttachment = removeComponentTypeAttachment;
|
|
16687
|
-
exports2.removeComponentTypeAttachments = removeComponentTypeAttachments;
|
|
16688
16928
|
exports2.removeDocumentAttachment = removeDocumentAttachment;
|
|
16689
16929
|
exports2.removeDocumentAttachments = removeDocumentAttachments;
|
|
16690
16930
|
exports2.removeDocuments = removeDocuments;
|
|
@@ -16735,16 +16975,31 @@ var __publicField = (obj, key, value) => {
|
|
|
16735
16975
|
exports2.selectActiveWorkspace = selectActiveWorkspace;
|
|
16736
16976
|
exports2.selectActiveWorkspaceId = selectActiveWorkspaceId;
|
|
16737
16977
|
exports2.selectAllAttachments = selectAllAttachments;
|
|
16738
|
-
exports2.selectAllComponentAttachments = selectAllComponentAttachments;
|
|
16739
|
-
exports2.selectAllComponentTypeAttachments = selectAllComponentTypeAttachments;
|
|
16740
16978
|
exports2.selectAllDocumentAttachments = selectAllDocumentAttachments;
|
|
16741
16979
|
exports2.selectAllProjectAttachments = selectAllProjectAttachments;
|
|
16742
16980
|
exports2.selectAncestorIdsOfDocument = selectAncestorIdsOfDocument;
|
|
16743
16981
|
exports2.selectAppearance = selectAppearance;
|
|
16744
|
-
exports2.
|
|
16745
|
-
exports2.
|
|
16746
|
-
exports2.
|
|
16747
|
-
exports2.
|
|
16982
|
+
exports2.selectAsset = selectAsset;
|
|
16983
|
+
exports2.selectAssetAttachment = selectAssetAttachment;
|
|
16984
|
+
exports2.selectAssetAttachmentMapping = selectAssetAttachmentMapping;
|
|
16985
|
+
exports2.selectAssetAttachments = selectAssetAttachments;
|
|
16986
|
+
exports2.selectAssetToAssetTypeMapping = selectAssetToAssetTypeMapping;
|
|
16987
|
+
exports2.selectAssetType = selectAssetType;
|
|
16988
|
+
exports2.selectAssetTypeAttachment = selectAssetTypeAttachment;
|
|
16989
|
+
exports2.selectAssetTypeAttachmentMapping = selectAssetTypeAttachmentMapping;
|
|
16990
|
+
exports2.selectAssetTypeAttachments = selectAssetTypeAttachments;
|
|
16991
|
+
exports2.selectAssetTypeStagesMapping = selectAssetTypeStagesMapping;
|
|
16992
|
+
exports2.selectAssetTypes = selectAssetTypes;
|
|
16993
|
+
exports2.selectAssetTypesByName = selectAssetTypesByName;
|
|
16994
|
+
exports2.selectAssetTypesFromIds = selectAssetTypesFromIds;
|
|
16995
|
+
exports2.selectAssetTypesMapping = selectAssetTypesMapping;
|
|
16996
|
+
exports2.selectAssets = selectAssets;
|
|
16997
|
+
exports2.selectAssetsMapping = selectAssetsMapping;
|
|
16998
|
+
exports2.selectAssetsOfAssetType = selectAssetsOfAssetType;
|
|
16999
|
+
exports2.selectAttachmentsOfAsset = selectAttachmentsOfAsset;
|
|
17000
|
+
exports2.selectAttachmentsOfAssetType = selectAttachmentsOfAssetType;
|
|
17001
|
+
exports2.selectAttachmentsOfAssetTypeByType = selectAttachmentsOfAssetTypeByType;
|
|
17002
|
+
exports2.selectAttachmentsOfAssetsByType = selectAttachmentsOfAssetsByType;
|
|
16748
17003
|
exports2.selectAttachmentsOfDocument = selectAttachmentsOfDocument;
|
|
16749
17004
|
exports2.selectAttachmentsOfDocumentByType = selectAttachmentsOfDocumentByType;
|
|
16750
17005
|
exports2.selectAttachmentsOfFormRevision = selectAttachmentsOfFormRevision;
|
|
@@ -16761,25 +17016,11 @@ var __publicField = (obj, key, value) => {
|
|
|
16761
17016
|
exports2.selectCenterMapToProject = selectCenterMapToProject;
|
|
16762
17017
|
exports2.selectCommentMapping = selectCommentMapping;
|
|
16763
17018
|
exports2.selectCommentsOfIssue = selectCommentsOfIssue;
|
|
16764
|
-
exports2.
|
|
17019
|
+
exports2.selectCompletedStageIdsForAsset = selectCompletedStageIdsForAsset;
|
|
16765
17020
|
exports2.selectCompletedStages = selectCompletedStages;
|
|
16766
|
-
exports2.
|
|
16767
|
-
exports2.
|
|
16768
|
-
exports2.
|
|
16769
|
-
exports2.selectComponentType = selectComponentType;
|
|
16770
|
-
exports2.selectComponentTypeAttachment = selectComponentTypeAttachment;
|
|
16771
|
-
exports2.selectComponentTypeAttachmentMapping = selectComponentTypeAttachmentMapping;
|
|
16772
|
-
exports2.selectComponentTypeFromComponent = selectComponentTypeFromComponent;
|
|
16773
|
-
exports2.selectComponentTypeFromComponents = selectComponentTypeFromComponents;
|
|
16774
|
-
exports2.selectComponentTypeStagesMapping = selectComponentTypeStagesMapping;
|
|
16775
|
-
exports2.selectComponentTypes = selectComponentTypes;
|
|
16776
|
-
exports2.selectComponentTypesByName = selectComponentTypesByName;
|
|
16777
|
-
exports2.selectComponentTypesFromIds = selectComponentTypesFromIds;
|
|
16778
|
-
exports2.selectComponentTypesMapping = selectComponentTypesMapping;
|
|
16779
|
-
exports2.selectComponents = selectComponents;
|
|
16780
|
-
exports2.selectComponentsByType = selectComponentsByType;
|
|
16781
|
-
exports2.selectComponentsFromComponentType = selectComponentsFromComponentType;
|
|
16782
|
-
exports2.selectComponentsMapping = selectComponentsMapping;
|
|
17021
|
+
exports2.selectConversation = selectConversation;
|
|
17022
|
+
exports2.selectConversationMapping = selectConversationMapping;
|
|
17023
|
+
exports2.selectConversations = selectConversations;
|
|
16783
17024
|
exports2.selectCreateProjectType = selectCreateProjectType;
|
|
16784
17025
|
exports2.selectCurrentUser = selectCurrentUser;
|
|
16785
17026
|
exports2.selectDeletedRequests = selectDeletedRequests;
|
|
@@ -16801,7 +17042,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16801
17042
|
exports2.selectFilteredForms = selectFilteredForms;
|
|
16802
17043
|
exports2.selectForm = selectForm;
|
|
16803
17044
|
exports2.selectFormMapping = selectFormMapping;
|
|
16804
|
-
exports2.
|
|
17045
|
+
exports2.selectFormOfAssetType = selectFormOfAssetType;
|
|
16805
17046
|
exports2.selectFormOfIssueType = selectFormOfIssueType;
|
|
16806
17047
|
exports2.selectFormRevision = selectFormRevision;
|
|
16807
17048
|
exports2.selectFormRevisionMapping = selectFormRevisionMapping;
|
|
@@ -16810,16 +17051,16 @@ var __publicField = (obj, key, value) => {
|
|
|
16810
17051
|
exports2.selectFormSubmission = selectFormSubmission;
|
|
16811
17052
|
exports2.selectFormSubmissionAttachmentsMapping = selectFormSubmissionAttachmentsMapping;
|
|
16812
17053
|
exports2.selectFormSubmissions = selectFormSubmissions;
|
|
16813
|
-
exports2.
|
|
17054
|
+
exports2.selectFormSubmissionsByAssets = selectFormSubmissionsByAssets;
|
|
16814
17055
|
exports2.selectFormSubmissionsByFormRevisions = selectFormSubmissionsByFormRevisions;
|
|
16815
17056
|
exports2.selectFormSubmissionsMapping = selectFormSubmissionsMapping;
|
|
16816
|
-
exports2.
|
|
17057
|
+
exports2.selectFormSubmissionsOfAsset = selectFormSubmissionsOfAsset;
|
|
16817
17058
|
exports2.selectFormSubmissionsOfForm = selectFormSubmissionsOfForm;
|
|
16818
17059
|
exports2.selectFormSubmissionsOfIssue = selectFormSubmissionsOfIssue;
|
|
16819
17060
|
exports2.selectFormsCount = selectFormsCount;
|
|
16820
17061
|
exports2.selectGeneralFormCount = selectGeneralFormCount;
|
|
17062
|
+
exports2.selectHiddenAssetTypeIds = selectHiddenAssetTypeIds;
|
|
16821
17063
|
exports2.selectHiddenCategoryCount = selectHiddenCategoryCount;
|
|
16822
|
-
exports2.selectHiddenComponentTypeIds = selectHiddenComponentTypeIds;
|
|
16823
17064
|
exports2.selectIsFetchingInitialData = selectIsFetchingInitialData;
|
|
16824
17065
|
exports2.selectIsImportingProjectFile = selectIsImportingProjectFile;
|
|
16825
17066
|
exports2.selectIsLoading = selectIsLoading;
|
|
@@ -16841,7 +17082,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16841
17082
|
exports2.selectIssuesOfIssueTypeCount = selectIssuesOfIssueTypeCount;
|
|
16842
17083
|
exports2.selectLatestFormRevisionByForm = selectLatestFormRevisionByForm;
|
|
16843
17084
|
exports2.selectLatestFormRevisionOfForm = selectLatestFormRevisionOfForm;
|
|
16844
|
-
exports2.
|
|
17085
|
+
exports2.selectLatestFormRevisionsOfAssetTypes = selectLatestFormRevisionsOfAssetTypes;
|
|
16845
17086
|
exports2.selectLatestRetryTime = selectLatestRetryTime;
|
|
16846
17087
|
exports2.selectLicense = selectLicense;
|
|
16847
17088
|
exports2.selectLicenseForProject = selectLicenseForProject;
|
|
@@ -16849,8 +17090,8 @@ var __publicField = (obj, key, value) => {
|
|
|
16849
17090
|
exports2.selectLicensesForProjectsMapping = selectLicensesForProjectsMapping;
|
|
16850
17091
|
exports2.selectMainWorkspace = selectMainWorkspace;
|
|
16851
17092
|
exports2.selectMapStyle = selectMapStyle;
|
|
16852
|
-
exports2.
|
|
16853
|
-
exports2.
|
|
17093
|
+
exports2.selectNumberOfAssetTypesMatchingCaseInsensitiveName = selectNumberOfAssetTypesMatchingCaseInsensitiveName;
|
|
17094
|
+
exports2.selectNumberOfAssetsOfAssetType = selectNumberOfAssetsOfAssetType;
|
|
16854
17095
|
exports2.selectOrganization = selectOrganization;
|
|
16855
17096
|
exports2.selectOrganizationAccess = selectOrganizationAccess;
|
|
16856
17097
|
exports2.selectOrganizationAccessForUser = selectOrganizationAccessForUser;
|
|
@@ -16891,9 +17132,9 @@ var __publicField = (obj, key, value) => {
|
|
|
16891
17132
|
exports2.selectStageFormIdsFromStageIds = selectStageFormIdsFromStageIds;
|
|
16892
17133
|
exports2.selectStageMapping = selectStageMapping;
|
|
16893
17134
|
exports2.selectStages = selectStages;
|
|
16894
|
-
exports2.
|
|
16895
|
-
exports2.selectStagesFromComponentTypeIds = selectStagesFromComponentTypeIds;
|
|
17135
|
+
exports2.selectStagesFromAssetTypeIds = selectStagesFromAssetTypeIds;
|
|
16896
17136
|
exports2.selectStagesFromStageIds = selectStagesFromStageIds;
|
|
17137
|
+
exports2.selectStagesOfAssetType = selectStagesOfAssetType;
|
|
16897
17138
|
exports2.selectTeam = selectTeam;
|
|
16898
17139
|
exports2.selectTeams = selectTeams;
|
|
16899
17140
|
exports2.selectTeamsMapping = selectTeamsMapping;
|
|
@@ -16915,14 +17156,16 @@ var __publicField = (obj, key, value) => {
|
|
|
16915
17156
|
exports2.setActiveProjectId = setActiveProjectId;
|
|
16916
17157
|
exports2.setActiveWorkspaceId = setActiveWorkspaceId;
|
|
16917
17158
|
exports2.setAppearance = setAppearance;
|
|
17159
|
+
exports2.setAssetAttachment = setAssetAttachment;
|
|
17160
|
+
exports2.setAssetAttachments = setAssetAttachments;
|
|
17161
|
+
exports2.setAssetTypeAttachment = setAssetTypeAttachment;
|
|
17162
|
+
exports2.setAssetTypeAttachments = setAssetTypeAttachments;
|
|
17163
|
+
exports2.setAssetTypes = setAssetTypes;
|
|
17164
|
+
exports2.setAssets = setAssets;
|
|
16918
17165
|
exports2.setCategories = setCategories;
|
|
16919
17166
|
exports2.setCenterMapToProject = setCenterMapToProject;
|
|
16920
|
-
exports2.
|
|
16921
|
-
exports2.
|
|
16922
|
-
exports2.setComponentTypeAttachment = setComponentTypeAttachment;
|
|
16923
|
-
exports2.setComponentTypeAttachments = setComponentTypeAttachments;
|
|
16924
|
-
exports2.setComponentTypes = setComponentTypes;
|
|
16925
|
-
exports2.setComponents = setComponents;
|
|
17167
|
+
exports2.setConversation = setConversation;
|
|
17168
|
+
exports2.setConversations = setConversations;
|
|
16926
17169
|
exports2.setCreateProjectType = setCreateProjectType;
|
|
16927
17170
|
exports2.setCurrentUser = setCurrentUser;
|
|
16928
17171
|
exports2.setDocumentAttachment = setDocumentAttachment;
|
|
@@ -16983,18 +17226,19 @@ var __publicField = (obj, key, value) => {
|
|
|
16983
17226
|
exports2.teamSlice = teamSlice;
|
|
16984
17227
|
exports2.toFileNameSafeString = toFileNameSafeString;
|
|
16985
17228
|
exports2.toOfflineIdRecord = toOfflineIdRecord;
|
|
16986
|
-
exports2.
|
|
17229
|
+
exports2.toggleAssetTypeVisibility = toggleAssetTypeVisibility;
|
|
16987
17230
|
exports2.truncate = truncate;
|
|
16988
17231
|
exports2.unfavoriteForm = unfavoriteForm;
|
|
16989
17232
|
exports2.unhideAllCategories = unhideAllCategories;
|
|
16990
17233
|
exports2.unhideCategory = unhideCategory;
|
|
16991
17234
|
exports2.unlinkStageToForm = unlinkStageToForm;
|
|
16992
17235
|
exports2.updateActiveOrganization = updateActiveOrganization;
|
|
16993
|
-
exports2.
|
|
16994
|
-
exports2.
|
|
16995
|
-
exports2.
|
|
16996
|
-
exports2.
|
|
16997
|
-
exports2.
|
|
17236
|
+
exports2.updateAsset = updateAsset;
|
|
17237
|
+
exports2.updateAssetAttachment = updateAssetAttachment;
|
|
17238
|
+
exports2.updateAssetAttachments = updateAssetAttachments;
|
|
17239
|
+
exports2.updateAssetTypeAttachment = updateAssetTypeAttachment;
|
|
17240
|
+
exports2.updateAssetTypeAttachments = updateAssetTypeAttachments;
|
|
17241
|
+
exports2.updateConversation = updateConversation;
|
|
16998
17242
|
exports2.updateDocumentAttachment = updateDocumentAttachment;
|
|
16999
17243
|
exports2.updateDocumentAttachments = updateDocumentAttachments;
|
|
17000
17244
|
exports2.updateDocuments = updateDocuments;
|