@overmap-ai/core 1.0.53-team-links.0 → 1.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/overmap-core.js +1359 -1624
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +1362 -1627
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/sdk.d.ts +6 -3
- package/dist/sdk/services/AgentService.d.ts +1 -1
- package/dist/sdk/services/BaseAttachmentService.d.ts +31 -0
- package/dist/sdk/services/ComponentAttachmentService.d.ts +10 -0
- package/dist/sdk/services/ComponentTypeAttachmentService.d.ts +10 -0
- package/dist/sdk/services/DocumentAttachmentService.d.ts +10 -0
- package/dist/sdk/services/IssueAttachmentService.d.ts +10 -0
- package/dist/sdk/services/IssueService.d.ts +1 -1
- package/dist/sdk/services/ProjectAttachmentService.d.ts +10 -0
- package/dist/sdk/services/index.d.ts +5 -2
- package/dist/store/slices/categorySlice.d.ts +0 -3
- package/dist/store/slices/componentSlice.d.ts +15 -7
- package/dist/store/slices/componentTypeSlice.d.ts +16 -8
- package/dist/store/slices/documentSlice.d.ts +10 -5
- package/dist/store/slices/formRevisionSlice.d.ts +30 -33
- package/dist/store/slices/index.d.ts +0 -3
- package/dist/store/slices/issueSlice.d.ts +33 -24
- package/dist/store/slices/projectFileSlice.d.ts +0 -3
- package/dist/store/slices/projectSlice.d.ts +12 -3
- package/dist/store/slices/utils.d.ts +3 -2
- package/dist/store/slices/workspaceSlice.d.ts +0 -3
- package/dist/store/store.d.ts +1 -10
- package/dist/typings/models/attachments.d.ts +7 -0
- package/dist/typings/models/base.d.ts +0 -5
- package/dist/typings/models/projects.d.ts +4 -5
- package/dist/typings/models/teams.d.ts +0 -15
- package/package.json +1 -1
- package/dist/sdk/services/AttachmentService.d.ts +0 -46
- package/dist/sdk/services/DocumentTeamLinkService.d.ts +0 -8
- package/dist/sdk/services/IssueTypeTeamLinkService.d.ts +0 -8
- package/dist/sdk/services/UserFormTeamLinkService.d.ts +0 -8
- package/dist/store/slices/documentTeamLinkSlice.d.ts +0 -20
- package/dist/store/slices/issueTypeTeamLinkSlice.d.ts +0 -20
- package/dist/store/slices/userFormTeamLinkSlice.d.ts +0 -20
|
@@ -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$r = {
|
|
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$r,
|
|
679
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$r)),
|
|
680
680
|
reducers: {
|
|
681
681
|
setTokens: (state, action) => {
|
|
682
682
|
state.accessToken = action.payload.accessToken;
|
|
@@ -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$q = {
|
|
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$q,
|
|
1434
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$q)),
|
|
1435
1435
|
reducers: {
|
|
1436
1436
|
setCategories: (state, action) => {
|
|
1437
1437
|
if (!Array.isArray(action.payload))
|
|
@@ -1567,6 +1567,9 @@ var __publicField = (obj, key, value) => {
|
|
|
1567
1567
|
return Object.values(state.issueReducer.issues).filter((issue) => issue.category === categoryId).length;
|
|
1568
1568
|
};
|
|
1569
1569
|
const categoryReducer = categorySlice.reducer;
|
|
1570
|
+
function setAttachment(state, action) {
|
|
1571
|
+
state.attachments[action.payload.offline_id] = action.payload;
|
|
1572
|
+
}
|
|
1570
1573
|
function setAttachments(state, action) {
|
|
1571
1574
|
state.attachments = {};
|
|
1572
1575
|
for (const attachment of action.payload) {
|
|
@@ -1591,6 +1594,15 @@ var __publicField = (obj, key, value) => {
|
|
|
1591
1594
|
throw new Error(`Attachment ${action.payload.offline_id} does not exist.`);
|
|
1592
1595
|
}
|
|
1593
1596
|
}
|
|
1597
|
+
function updateAttachments(state, action) {
|
|
1598
|
+
for (const attachment of action.payload) {
|
|
1599
|
+
if (attachment.offline_id in state.attachments) {
|
|
1600
|
+
state.attachments[attachment.offline_id] = attachment;
|
|
1601
|
+
} else {
|
|
1602
|
+
throw new Error(`Attachment ${attachment.offline_id} does not exist.`);
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1594
1606
|
function removeAttachment(state, action) {
|
|
1595
1607
|
if (action.payload in state.attachments) {
|
|
1596
1608
|
delete state.attachments[action.payload];
|
|
@@ -1603,14 +1615,14 @@ var __publicField = (obj, key, value) => {
|
|
|
1603
1615
|
delete state.attachments[attachmentId];
|
|
1604
1616
|
}
|
|
1605
1617
|
}
|
|
1606
|
-
const initialState$
|
|
1618
|
+
const initialState$p = {
|
|
1607
1619
|
components: {},
|
|
1608
1620
|
attachments: {}
|
|
1609
1621
|
};
|
|
1610
1622
|
const componentSlice = toolkit.createSlice({
|
|
1611
1623
|
name: "components",
|
|
1612
|
-
initialState: initialState$
|
|
1613
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1624
|
+
initialState: initialState$p,
|
|
1625
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$p)),
|
|
1614
1626
|
reducers: {
|
|
1615
1627
|
addComponent: (state, action) => {
|
|
1616
1628
|
state.components[action.payload.offline_id] = action.payload;
|
|
@@ -1624,12 +1636,6 @@ var __publicField = (obj, key, value) => {
|
|
|
1624
1636
|
state.components = toOfflineIdRecord(action.payload);
|
|
1625
1637
|
prevComponents = null;
|
|
1626
1638
|
},
|
|
1627
|
-
setComponentAttachments: setAttachments,
|
|
1628
|
-
addComponentAttachment: addAttachment,
|
|
1629
|
-
addComponentAttachments: addAttachments,
|
|
1630
|
-
updateComponentAttachment: updateAttachment,
|
|
1631
|
-
removeComponentAttachment: removeAttachment,
|
|
1632
|
-
removeComponentAttachments: removeAttachments,
|
|
1633
1639
|
updateComponent: (state, action) => {
|
|
1634
1640
|
if (action.payload.offline_id in state.components) {
|
|
1635
1641
|
state.components[action.payload.offline_id] = action.payload;
|
|
@@ -1654,9 +1660,35 @@ var __publicField = (obj, key, value) => {
|
|
|
1654
1660
|
}
|
|
1655
1661
|
}
|
|
1656
1662
|
prevComponents = null;
|
|
1657
|
-
}
|
|
1663
|
+
},
|
|
1664
|
+
// Attachments
|
|
1665
|
+
setComponentAttachment: setAttachment,
|
|
1666
|
+
setComponentAttachments: setAttachments,
|
|
1667
|
+
addComponentAttachment: addAttachment,
|
|
1668
|
+
addComponentAttachments: addAttachments,
|
|
1669
|
+
updateComponentAttachment: updateAttachment,
|
|
1670
|
+
updateComponentAttachments: updateAttachments,
|
|
1671
|
+
removeComponentAttachment: removeAttachment,
|
|
1672
|
+
removeComponentAttachments: removeAttachments
|
|
1658
1673
|
}
|
|
1659
1674
|
});
|
|
1675
|
+
const {
|
|
1676
|
+
addComponent,
|
|
1677
|
+
updateComponent,
|
|
1678
|
+
removeComponent,
|
|
1679
|
+
addComponentsInBatches,
|
|
1680
|
+
setComponents,
|
|
1681
|
+
removeAllComponentsOfType,
|
|
1682
|
+
// Attachments
|
|
1683
|
+
setComponentAttachment,
|
|
1684
|
+
setComponentAttachments,
|
|
1685
|
+
addComponentAttachment,
|
|
1686
|
+
addComponentAttachments,
|
|
1687
|
+
updateComponentAttachment,
|
|
1688
|
+
updateComponentAttachments,
|
|
1689
|
+
removeComponentAttachment,
|
|
1690
|
+
removeComponentAttachments
|
|
1691
|
+
} = componentSlice.actions;
|
|
1660
1692
|
let prevComponents = null;
|
|
1661
1693
|
const selectComponents = (state) => {
|
|
1662
1694
|
if (!prevComponents) {
|
|
@@ -1751,28 +1783,14 @@ var __publicField = (obj, key, value) => {
|
|
|
1751
1783
|
}
|
|
1752
1784
|
)
|
|
1753
1785
|
);
|
|
1754
|
-
const {
|
|
1755
|
-
addComponent,
|
|
1756
|
-
updateComponent,
|
|
1757
|
-
removeComponent,
|
|
1758
|
-
addComponentsInBatches,
|
|
1759
|
-
setComponents,
|
|
1760
|
-
setComponentAttachments,
|
|
1761
|
-
addComponentAttachment,
|
|
1762
|
-
addComponentAttachments,
|
|
1763
|
-
updateComponentAttachment,
|
|
1764
|
-
removeComponentAttachment,
|
|
1765
|
-
removeComponentAttachments,
|
|
1766
|
-
removeAllComponentsOfType
|
|
1767
|
-
} = componentSlice.actions;
|
|
1768
1786
|
const componentReducer = componentSlice.reducer;
|
|
1769
|
-
const initialState$
|
|
1787
|
+
const initialState$o = {
|
|
1770
1788
|
completionsByComponentId: {}
|
|
1771
1789
|
};
|
|
1772
1790
|
const componentStageCompletionSlice = toolkit.createSlice({
|
|
1773
1791
|
name: "componentStageCompletions",
|
|
1774
|
-
initialState: initialState$
|
|
1775
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1792
|
+
initialState: initialState$o,
|
|
1793
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$o)),
|
|
1776
1794
|
reducers: {
|
|
1777
1795
|
addStageCompletion: (state, action) => {
|
|
1778
1796
|
let stageToCompletionDateMapping = state.completionsByComponentId[action.payload.component];
|
|
@@ -1823,13 +1841,13 @@ var __publicField = (obj, key, value) => {
|
|
|
1823
1841
|
return Object.keys(state.componentStageCompletionReducer.completionsByComponentId[component.offline_id] ?? {});
|
|
1824
1842
|
};
|
|
1825
1843
|
const componentStageCompletionReducer = componentStageCompletionSlice.reducer;
|
|
1826
|
-
const initialState$
|
|
1844
|
+
const initialState$n = {
|
|
1827
1845
|
stages: {}
|
|
1828
1846
|
};
|
|
1829
1847
|
const componentStageSlice = toolkit.createSlice({
|
|
1830
1848
|
name: "componentStages",
|
|
1831
|
-
initialState: initialState$
|
|
1832
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1849
|
+
initialState: initialState$n,
|
|
1850
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$n)),
|
|
1833
1851
|
reducers: {
|
|
1834
1852
|
addStages: (state, action) => {
|
|
1835
1853
|
Object.assign(state.stages, toOfflineIdRecord(action.payload));
|
|
@@ -1939,15 +1957,15 @@ var __publicField = (obj, key, value) => {
|
|
|
1939
1957
|
);
|
|
1940
1958
|
const { addStages, updateStages, removeStages, linkStageToForm, unlinkStageToForm } = componentStageSlice.actions;
|
|
1941
1959
|
const componentStageReducer = componentStageSlice.reducer;
|
|
1942
|
-
const initialState$
|
|
1960
|
+
const initialState$m = {
|
|
1943
1961
|
componentTypes: {},
|
|
1944
1962
|
hiddenComponentTypeIds: {},
|
|
1945
1963
|
attachments: {}
|
|
1946
1964
|
};
|
|
1947
1965
|
const componentTypeSlice = toolkit.createSlice({
|
|
1948
1966
|
name: "componentTypes",
|
|
1949
|
-
initialState: initialState$
|
|
1950
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1967
|
+
initialState: initialState$m,
|
|
1968
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$m)),
|
|
1951
1969
|
reducers: {
|
|
1952
1970
|
addComponentType: (state, action) => {
|
|
1953
1971
|
state.componentTypes[action.payload.offline_id] = action.payload;
|
|
@@ -1955,20 +1973,38 @@ var __publicField = (obj, key, value) => {
|
|
|
1955
1973
|
setComponentTypes: (state, action) => {
|
|
1956
1974
|
state.componentTypes = toOfflineIdRecord(action.payload);
|
|
1957
1975
|
},
|
|
1958
|
-
setComponentTypeAttachments: setAttachments,
|
|
1959
|
-
addComponentTypeAttachment: addAttachment,
|
|
1960
|
-
addComponentTypeAttachments: addAttachments,
|
|
1961
|
-
updateComponentTypeAttachment: updateAttachment,
|
|
1962
|
-
removeComponentTypeAttachment: removeAttachment,
|
|
1963
|
-
removeComponentTypeAttachments: removeAttachments,
|
|
1964
1976
|
toggleComponentTypeVisibility: (state, action) => {
|
|
1965
1977
|
state.hiddenComponentTypeIds[action.payload] = !state.hiddenComponentTypeIds[action.payload];
|
|
1966
1978
|
},
|
|
1967
1979
|
deleteComponentType: (state, action) => {
|
|
1968
1980
|
delete state.componentTypes[action.payload];
|
|
1969
|
-
}
|
|
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
|
|
1970
1991
|
}
|
|
1971
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;
|
|
1972
2008
|
const selectComponentTypesMapping = (state) => state.componentTypeReducer.componentTypes;
|
|
1973
2009
|
const selectComponentTypes = toolkit.createSelector(
|
|
1974
2010
|
[selectComponentTypesMapping],
|
|
@@ -2045,26 +2081,14 @@ var __publicField = (obj, key, value) => {
|
|
|
2045
2081
|
}
|
|
2046
2082
|
)
|
|
2047
2083
|
);
|
|
2048
|
-
const {
|
|
2049
|
-
addComponentType,
|
|
2050
|
-
setComponentTypes,
|
|
2051
|
-
setComponentTypeAttachments,
|
|
2052
|
-
addComponentTypeAttachment,
|
|
2053
|
-
addComponentTypeAttachments,
|
|
2054
|
-
updateComponentTypeAttachment,
|
|
2055
|
-
removeComponentTypeAttachment,
|
|
2056
|
-
removeComponentTypeAttachments,
|
|
2057
|
-
toggleComponentTypeVisibility,
|
|
2058
|
-
deleteComponentType
|
|
2059
|
-
} = componentTypeSlice.actions;
|
|
2060
2084
|
const componentTypeReducer = componentTypeSlice.reducer;
|
|
2061
|
-
const initialState$
|
|
2085
|
+
const initialState$l = {
|
|
2062
2086
|
workspaces: {},
|
|
2063
2087
|
activeWorkspaceId: null
|
|
2064
2088
|
};
|
|
2065
2089
|
const workspaceSlice = toolkit.createSlice({
|
|
2066
2090
|
name: "workspace",
|
|
2067
|
-
initialState: initialState$
|
|
2091
|
+
initialState: initialState$l,
|
|
2068
2092
|
// The `reducers` field lets us define reducers and generate associated actions
|
|
2069
2093
|
reducers: {
|
|
2070
2094
|
setWorkspaces: (state, action) => {
|
|
@@ -2121,7 +2145,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2121
2145
|
);
|
|
2122
2146
|
const workspaceReducer = workspaceSlice.reducer;
|
|
2123
2147
|
const maxRecentIssues = 10;
|
|
2124
|
-
const initialState$
|
|
2148
|
+
const initialState$k = {
|
|
2125
2149
|
issues: {},
|
|
2126
2150
|
attachments: {},
|
|
2127
2151
|
comments: {},
|
|
@@ -2133,9 +2157,9 @@ var __publicField = (obj, key, value) => {
|
|
|
2133
2157
|
};
|
|
2134
2158
|
const issueSlice = toolkit.createSlice({
|
|
2135
2159
|
name: "issues",
|
|
2136
|
-
initialState: initialState$
|
|
2160
|
+
initialState: initialState$k,
|
|
2137
2161
|
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
2138
|
-
Object.assign(state, initialState$
|
|
2162
|
+
Object.assign(state, initialState$k);
|
|
2139
2163
|
}),
|
|
2140
2164
|
reducers: {
|
|
2141
2165
|
setIssues: (state, action) => {
|
|
@@ -2146,7 +2170,6 @@ var __publicField = (obj, key, value) => {
|
|
|
2146
2170
|
state.issues[issue.offline_id] = issue;
|
|
2147
2171
|
});
|
|
2148
2172
|
},
|
|
2149
|
-
setIssueAttachments: setAttachments,
|
|
2150
2173
|
setIssueUpdates: (state, action) => {
|
|
2151
2174
|
if (action.payload.filter(onlyUniqueOfflineIds).length !== action.payload.length) {
|
|
2152
2175
|
throw new Error("Tried to use setIssues reducer with duplicate ID's");
|
|
@@ -2176,8 +2199,6 @@ var __publicField = (obj, key, value) => {
|
|
|
2176
2199
|
state.issues[issue.offline_id] = issue;
|
|
2177
2200
|
}
|
|
2178
2201
|
},
|
|
2179
|
-
addIssueAttachment: addAttachment,
|
|
2180
|
-
addIssueAttachments: addAttachments,
|
|
2181
2202
|
addIssueUpdate: (state, action) => {
|
|
2182
2203
|
if (action.payload.offline_id in state.updates) {
|
|
2183
2204
|
throw new Error(`Tried to add duplicate issue update with offline_id: ${action.payload.offline_id}`);
|
|
@@ -2199,7 +2220,6 @@ var __publicField = (obj, key, value) => {
|
|
|
2199
2220
|
throw new Error(`Tried to update issue with ID that doesn't exist: ${action.payload.offline_id}`);
|
|
2200
2221
|
}
|
|
2201
2222
|
},
|
|
2202
|
-
updateIssueAttachment: updateAttachment,
|
|
2203
2223
|
removeIssue: (state, action) => {
|
|
2204
2224
|
if (action.payload in state.issues) {
|
|
2205
2225
|
delete state.issues[action.payload];
|
|
@@ -2212,7 +2232,6 @@ var __publicField = (obj, key, value) => {
|
|
|
2212
2232
|
delete state.issues[issueId];
|
|
2213
2233
|
}
|
|
2214
2234
|
},
|
|
2215
|
-
removeIssueAttachment: removeAttachment,
|
|
2216
2235
|
removeIssueUpdate: (state, action) => {
|
|
2217
2236
|
if (action.payload in state.updates) {
|
|
2218
2237
|
delete state.updates[action.payload];
|
|
@@ -2309,12 +2328,19 @@ var __publicField = (obj, key, value) => {
|
|
|
2309
2328
|
if (indexToRemove !== -1) {
|
|
2310
2329
|
state.recentIssueIds.splice(indexToRemove, 1);
|
|
2311
2330
|
}
|
|
2312
|
-
}
|
|
2331
|
+
},
|
|
2332
|
+
// Attachments
|
|
2333
|
+
setIssueAttachment: setAttachment,
|
|
2334
|
+
setIssueAttachments: setAttachments,
|
|
2335
|
+
addIssueAttachment: addAttachment,
|
|
2336
|
+
addIssueAttachments: addAttachments,
|
|
2337
|
+
updateIssueAttachment: updateAttachment,
|
|
2338
|
+
updateIssueAttachments: updateAttachments,
|
|
2339
|
+
removeIssueAttachment: removeAttachment,
|
|
2340
|
+
removeIssueAttachments: removeAttachments
|
|
2313
2341
|
}
|
|
2314
2342
|
});
|
|
2315
2343
|
const {
|
|
2316
|
-
addIssueAttachment,
|
|
2317
|
-
addIssueAttachments,
|
|
2318
2344
|
addIssue,
|
|
2319
2345
|
addIssues,
|
|
2320
2346
|
addIssueUpdate,
|
|
@@ -2322,7 +2348,6 @@ var __publicField = (obj, key, value) => {
|
|
|
2322
2348
|
addOrReplaceIssueComment,
|
|
2323
2349
|
addToRecentIssues,
|
|
2324
2350
|
cleanRecentIssues,
|
|
2325
|
-
removeIssueAttachment,
|
|
2326
2351
|
removeAttachmentsOfIssue,
|
|
2327
2352
|
removeIssue,
|
|
2328
2353
|
removeIssues,
|
|
@@ -2331,13 +2356,20 @@ var __publicField = (obj, key, value) => {
|
|
|
2331
2356
|
removeRecentIssue,
|
|
2332
2357
|
resetRecentIssues,
|
|
2333
2358
|
setActiveIssueId,
|
|
2334
|
-
setIssueAttachments,
|
|
2335
2359
|
setIssueUpdates,
|
|
2336
2360
|
setIssues,
|
|
2337
2361
|
setVisibleStatuses,
|
|
2338
2362
|
setVisibleUserIds,
|
|
2339
|
-
updateIssueAttachment,
|
|
2340
2363
|
updateIssue,
|
|
2364
|
+
// Attachments
|
|
2365
|
+
setIssueAttachment,
|
|
2366
|
+
setIssueAttachments,
|
|
2367
|
+
addIssueAttachment,
|
|
2368
|
+
addIssueAttachments,
|
|
2369
|
+
updateIssueAttachment,
|
|
2370
|
+
updateIssueAttachments,
|
|
2371
|
+
removeIssueAttachment,
|
|
2372
|
+
removeIssueAttachments,
|
|
2341
2373
|
// Commments
|
|
2342
2374
|
addIssueComment,
|
|
2343
2375
|
addIssueComments,
|
|
@@ -2560,14 +2592,14 @@ var __publicField = (obj, key, value) => {
|
|
|
2560
2592
|
}
|
|
2561
2593
|
);
|
|
2562
2594
|
const issueReducer = issueSlice.reducer;
|
|
2563
|
-
const initialState$
|
|
2595
|
+
const initialState$j = {
|
|
2564
2596
|
issueTypes: {}
|
|
2565
2597
|
};
|
|
2566
2598
|
const issueTypeSlice = toolkit.createSlice({
|
|
2567
2599
|
name: "issueTypes",
|
|
2568
|
-
initialState: initialState$
|
|
2600
|
+
initialState: initialState$j,
|
|
2569
2601
|
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
2570
|
-
Object.assign(state, initialState$
|
|
2602
|
+
Object.assign(state, initialState$j);
|
|
2571
2603
|
}),
|
|
2572
2604
|
reducers: {
|
|
2573
2605
|
setIssueTypes: (state, action) => {
|
|
@@ -2634,15 +2666,15 @@ var __publicField = (obj, key, value) => {
|
|
|
2634
2666
|
return ((_a2 = selectIssuesOfIssueType(issueTypeId)(state)) == null ? void 0 : _a2.length) ?? 0;
|
|
2635
2667
|
};
|
|
2636
2668
|
const issueTypeReducer = issueTypeSlice.reducer;
|
|
2637
|
-
const initialState$
|
|
2669
|
+
const initialState$i = {
|
|
2638
2670
|
s3Urls: {}
|
|
2639
2671
|
};
|
|
2640
2672
|
const msPerHour = 1e3 * 60 * 60;
|
|
2641
2673
|
const msPerWeek = msPerHour * 24 * 7;
|
|
2642
2674
|
const fileSlice = toolkit.createSlice({
|
|
2643
2675
|
name: "file",
|
|
2644
|
-
initialState: initialState$
|
|
2645
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2676
|
+
initialState: initialState$i,
|
|
2677
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$i)),
|
|
2646
2678
|
reducers: {
|
|
2647
2679
|
setUploadUrl: (state, action) => {
|
|
2648
2680
|
const { url, fields, sha1 } = action.payload;
|
|
@@ -2669,7 +2701,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2669
2701
|
return url;
|
|
2670
2702
|
};
|
|
2671
2703
|
const fileReducer = fileSlice.reducer;
|
|
2672
|
-
const initialState$
|
|
2704
|
+
const initialState$h = {
|
|
2673
2705
|
// TODO: Change first MapStyle.SATELLITE to MaptStyle.None when project creation map is fixed
|
|
2674
2706
|
mapStyle: MapStyle.SATELLITE,
|
|
2675
2707
|
showTooltips: false,
|
|
@@ -2677,8 +2709,8 @@ var __publicField = (obj, key, value) => {
|
|
|
2677
2709
|
};
|
|
2678
2710
|
const mapSlice = toolkit.createSlice({
|
|
2679
2711
|
name: "map",
|
|
2680
|
-
initialState: initialState$
|
|
2681
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2712
|
+
initialState: initialState$h,
|
|
2713
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$h)),
|
|
2682
2714
|
reducers: {
|
|
2683
2715
|
setMapStyle: (state, action) => {
|
|
2684
2716
|
state.mapStyle = action.payload;
|
|
@@ -2706,6 +2738,14 @@ var __publicField = (obj, key, value) => {
|
|
|
2706
2738
|
OrganizationAccessLevel2[OrganizationAccessLevel2["ADMIN"] = 2] = "ADMIN";
|
|
2707
2739
|
return OrganizationAccessLevel2;
|
|
2708
2740
|
})(OrganizationAccessLevel || {});
|
|
2741
|
+
var AttachmentModel = /* @__PURE__ */ ((AttachmentModel2) => {
|
|
2742
|
+
AttachmentModel2["Issue"] = "issue";
|
|
2743
|
+
AttachmentModel2["Component"] = "component";
|
|
2744
|
+
AttachmentModel2["ComponentType"] = "component_type";
|
|
2745
|
+
AttachmentModel2["Project"] = "project";
|
|
2746
|
+
AttachmentModel2["Document"] = "document";
|
|
2747
|
+
return AttachmentModel2;
|
|
2748
|
+
})(AttachmentModel || {});
|
|
2709
2749
|
var IssueUpdateChange = /* @__PURE__ */ ((IssueUpdateChange2) => {
|
|
2710
2750
|
IssueUpdateChange2["STATUS"] = "status";
|
|
2711
2751
|
IssueUpdateChange2["PRIORITY"] = "priority";
|
|
@@ -2747,7 +2787,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2747
2787
|
LicenseStatus2[LicenseStatus2["PAST_DUE"] = 8] = "PAST_DUE";
|
|
2748
2788
|
return LicenseStatus2;
|
|
2749
2789
|
})(LicenseStatus || {});
|
|
2750
|
-
const initialState$
|
|
2790
|
+
const initialState$g = {
|
|
2751
2791
|
users: {},
|
|
2752
2792
|
currentUser: {
|
|
2753
2793
|
id: 0,
|
|
@@ -2758,8 +2798,8 @@ var __publicField = (obj, key, value) => {
|
|
|
2758
2798
|
};
|
|
2759
2799
|
const userSlice = toolkit.createSlice({
|
|
2760
2800
|
name: "users",
|
|
2761
|
-
initialState: initialState$
|
|
2762
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2801
|
+
initialState: initialState$g,
|
|
2802
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$g)),
|
|
2763
2803
|
reducers: {
|
|
2764
2804
|
setUsers: (state, action) => {
|
|
2765
2805
|
const usersMapping = {};
|
|
@@ -2821,13 +2861,13 @@ var __publicField = (obj, key, value) => {
|
|
|
2821
2861
|
const selectUsersAsMapping = (state) => state.userReducer.users;
|
|
2822
2862
|
const selectFavouriteProjects = (state) => state.userReducer.currentUser.profile.favourite_project_ids;
|
|
2823
2863
|
const userReducer = userSlice.reducer;
|
|
2824
|
-
const initialState$
|
|
2864
|
+
const initialState$f = {
|
|
2825
2865
|
organizationAccesses: {}
|
|
2826
2866
|
};
|
|
2827
2867
|
const organizationAccessSlice = toolkit.createSlice({
|
|
2828
2868
|
name: "organizationAccess",
|
|
2829
|
-
initialState: initialState$
|
|
2830
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2869
|
+
initialState: initialState$f,
|
|
2870
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$f)),
|
|
2831
2871
|
reducers: {
|
|
2832
2872
|
setOrganizationAccesses: (state, action) => {
|
|
2833
2873
|
if (!Array.isArray(action.payload))
|
|
@@ -2890,13 +2930,13 @@ var __publicField = (obj, key, value) => {
|
|
|
2890
2930
|
return organizationAccesses;
|
|
2891
2931
|
};
|
|
2892
2932
|
const organizationAccessReducer = organizationAccessSlice.reducer;
|
|
2893
|
-
const initialState$
|
|
2933
|
+
const initialState$e = {
|
|
2894
2934
|
licenses: {}
|
|
2895
2935
|
};
|
|
2896
2936
|
const licenseSlice = toolkit.createSlice({
|
|
2897
2937
|
name: "license",
|
|
2898
|
-
initialState: initialState$
|
|
2899
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2938
|
+
initialState: initialState$e,
|
|
2939
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$e)),
|
|
2900
2940
|
reducers: {
|
|
2901
2941
|
setLicenses: (state, action) => {
|
|
2902
2942
|
if (!Array.isArray(action.payload))
|
|
@@ -2941,13 +2981,13 @@ var __publicField = (obj, key, value) => {
|
|
|
2941
2981
|
(licenses) => Object.values(licenses).filter((license) => license.project).reduce((accum, license) => ({ ...accum, [license.project]: license }), {})
|
|
2942
2982
|
);
|
|
2943
2983
|
const licenseReducer = licenseSlice.reducer;
|
|
2944
|
-
const initialState$
|
|
2984
|
+
const initialState$d = {
|
|
2945
2985
|
projectAccesses: {}
|
|
2946
2986
|
};
|
|
2947
2987
|
const projectAccessSlice = toolkit.createSlice({
|
|
2948
2988
|
name: "projectAccess",
|
|
2949
|
-
initialState: initialState$
|
|
2950
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2989
|
+
initialState: initialState$d,
|
|
2990
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$d)),
|
|
2951
2991
|
reducers: {
|
|
2952
2992
|
setProjectAccesses: (state, action) => {
|
|
2953
2993
|
if (!Array.isArray(action.payload))
|
|
@@ -3015,7 +3055,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3015
3055
|
return projectAccesses;
|
|
3016
3056
|
};
|
|
3017
3057
|
const projectAccessReducer = projectAccessSlice.reducer;
|
|
3018
|
-
const initialState$
|
|
3058
|
+
const initialState$c = {
|
|
3019
3059
|
projects: {},
|
|
3020
3060
|
activeProjectId: null,
|
|
3021
3061
|
recentProjectIds: [],
|
|
@@ -3025,7 +3065,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3025
3065
|
};
|
|
3026
3066
|
const projectSlice = toolkit.createSlice({
|
|
3027
3067
|
name: "projects",
|
|
3028
|
-
initialState: initialState$
|
|
3068
|
+
initialState: initialState$c,
|
|
3029
3069
|
reducers: {
|
|
3030
3070
|
setProjects: (state, action) => {
|
|
3031
3071
|
const projectsMap = {};
|
|
@@ -3093,11 +3133,13 @@ var __publicField = (obj, key, value) => {
|
|
|
3093
3133
|
throw new Error("Update form submissions count: no active project");
|
|
3094
3134
|
}
|
|
3095
3135
|
},
|
|
3096
|
-
//
|
|
3136
|
+
// Attachments
|
|
3137
|
+
setProjectAttachment: setAttachment,
|
|
3097
3138
|
setProjectAttachments: setAttachments,
|
|
3098
3139
|
addProjectAttachment: addAttachment,
|
|
3099
3140
|
addProjectAttachments: addAttachments,
|
|
3100
3141
|
updateProjectAttachment: updateAttachment,
|
|
3142
|
+
updateProjectAttachments: updateAttachments,
|
|
3101
3143
|
removeProjectAttachment: removeAttachment,
|
|
3102
3144
|
removeProjectAttachments: removeAttachments
|
|
3103
3145
|
}
|
|
@@ -3112,11 +3154,13 @@ var __publicField = (obj, key, value) => {
|
|
|
3112
3154
|
acceptProjectInvite,
|
|
3113
3155
|
addActiveProjectIssuesCount,
|
|
3114
3156
|
addActiveProjectFormSubmissionsCount,
|
|
3115
|
-
//
|
|
3157
|
+
// Attachments
|
|
3158
|
+
setProjectAttachment,
|
|
3116
3159
|
setProjectAttachments,
|
|
3117
3160
|
addProjectAttachment,
|
|
3118
3161
|
addProjectAttachments,
|
|
3119
3162
|
updateProjectAttachment,
|
|
3163
|
+
updateProjectAttachments,
|
|
3120
3164
|
removeProjectAttachment,
|
|
3121
3165
|
removeProjectAttachments
|
|
3122
3166
|
} = projectSlice.actions;
|
|
@@ -3187,6 +3231,9 @@ var __publicField = (obj, key, value) => {
|
|
|
3187
3231
|
[selectProjectAttachmentMapping],
|
|
3188
3232
|
(mapping) => Object.values(mapping)
|
|
3189
3233
|
);
|
|
3234
|
+
const selectProjectAttachment = (attachmentId) => (state) => {
|
|
3235
|
+
return state.projectReducer.attachments[attachmentId];
|
|
3236
|
+
};
|
|
3190
3237
|
const selectAttachmentsOfProject = restructureCreateSelectorWithArgs(
|
|
3191
3238
|
toolkit.createSelector(
|
|
3192
3239
|
[selectAllProjectAttachments, (_state, projectId) => projectId],
|
|
@@ -3212,14 +3259,14 @@ var __publicField = (obj, key, value) => {
|
|
|
3212
3259
|
}
|
|
3213
3260
|
)
|
|
3214
3261
|
);
|
|
3215
|
-
const initialState$
|
|
3262
|
+
const initialState$b = {
|
|
3216
3263
|
organizations: {},
|
|
3217
3264
|
activeOrganizationId: null
|
|
3218
3265
|
};
|
|
3219
3266
|
const organizationSlice = toolkit.createSlice({
|
|
3220
3267
|
name: "organizations",
|
|
3221
|
-
initialState: initialState$
|
|
3222
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3268
|
+
initialState: initialState$b,
|
|
3269
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$b)),
|
|
3223
3270
|
reducers: {
|
|
3224
3271
|
setOrganizations: (state, action) => {
|
|
3225
3272
|
for (const org of action.payload) {
|
|
@@ -3338,14 +3385,14 @@ var __publicField = (obj, key, value) => {
|
|
|
3338
3385
|
}
|
|
3339
3386
|
};
|
|
3340
3387
|
};
|
|
3341
|
-
const initialState$
|
|
3388
|
+
const initialState$a = {
|
|
3342
3389
|
deletedRequests: [],
|
|
3343
3390
|
latestRetryTime: 0
|
|
3344
3391
|
};
|
|
3345
3392
|
const outboxSlice = toolkit.createSlice({
|
|
3346
3393
|
name: "outbox",
|
|
3347
|
-
initialState: initialState$
|
|
3348
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3394
|
+
initialState: initialState$a,
|
|
3395
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$a)),
|
|
3349
3396
|
reducers: {
|
|
3350
3397
|
// enqueueActions is a reducer that does nothing but enqueue API request to the Redux Offline outbox
|
|
3351
3398
|
// Whenever an issue is being created, a reducer addIssue() is responsible for adding it to the offline store
|
|
@@ -3377,7 +3424,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3377
3424
|
const selectLatestRetryTime = (state) => state.outboxReducer.latestRetryTime;
|
|
3378
3425
|
const { enqueueRequest, markForDeletion, markAsDeleted, _setLatestRetryTime } = outboxSlice.actions;
|
|
3379
3426
|
const outboxReducer = outboxSlice.reducer;
|
|
3380
|
-
const initialState$
|
|
3427
|
+
const initialState$9 = {
|
|
3381
3428
|
projectFiles: {},
|
|
3382
3429
|
activeProjectFileId: null,
|
|
3383
3430
|
isImportingProjectFile: false,
|
|
@@ -3385,8 +3432,8 @@ var __publicField = (obj, key, value) => {
|
|
|
3385
3432
|
};
|
|
3386
3433
|
const projectFileSlice = toolkit.createSlice({
|
|
3387
3434
|
name: "projectFiles",
|
|
3388
|
-
initialState: initialState$
|
|
3389
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3435
|
+
initialState: initialState$9,
|
|
3436
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$9)),
|
|
3390
3437
|
reducers: {
|
|
3391
3438
|
addOrReplaceProjectFiles: (state, action) => {
|
|
3392
3439
|
for (let fileObj of action.payload) {
|
|
@@ -3487,12 +3534,12 @@ var __publicField = (obj, key, value) => {
|
|
|
3487
3534
|
const selectActiveProjectFileId = (state) => state.projectFileReducer.activeProjectFileId;
|
|
3488
3535
|
const selectIsImportingProjectFile = (state) => state.projectFileReducer.isImportingProjectFile;
|
|
3489
3536
|
const projectFileReducer = projectFileSlice.reducer;
|
|
3490
|
-
const initialState$
|
|
3537
|
+
const initialState$8 = {
|
|
3491
3538
|
isRehydrated: false
|
|
3492
3539
|
};
|
|
3493
3540
|
const rehydratedSlice = toolkit.createSlice({
|
|
3494
3541
|
name: "rehydrated",
|
|
3495
|
-
initialState: initialState$
|
|
3542
|
+
initialState: initialState$8,
|
|
3496
3543
|
// The `reducers` field lets us define reducers and generate associated actions
|
|
3497
3544
|
reducers: {
|
|
3498
3545
|
setRehydrated: (state, action) => {
|
|
@@ -3502,7 +3549,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3502
3549
|
});
|
|
3503
3550
|
const selectRehydrated = (state) => state.rehydratedReducer.isRehydrated;
|
|
3504
3551
|
const rehydratedReducer = rehydratedSlice.reducer;
|
|
3505
|
-
const initialState$
|
|
3552
|
+
const initialState$7 = {
|
|
3506
3553
|
useIssueTemplate: false,
|
|
3507
3554
|
placementMode: false,
|
|
3508
3555
|
enableClustering: false,
|
|
@@ -3519,8 +3566,8 @@ var __publicField = (obj, key, value) => {
|
|
|
3519
3566
|
};
|
|
3520
3567
|
const settingSlice = toolkit.createSlice({
|
|
3521
3568
|
name: "settings",
|
|
3522
|
-
initialState: initialState$
|
|
3523
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3569
|
+
initialState: initialState$7,
|
|
3570
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$7)),
|
|
3524
3571
|
reducers: {
|
|
3525
3572
|
setEnableDuplicateIssues: (state, action) => {
|
|
3526
3573
|
state.useIssueTemplate = action.payload;
|
|
@@ -3579,14 +3626,14 @@ var __publicField = (obj, key, value) => {
|
|
|
3579
3626
|
return revisionA < revisionB ? -1 : 1;
|
|
3580
3627
|
}
|
|
3581
3628
|
};
|
|
3582
|
-
const initialState$
|
|
3629
|
+
const initialState$6 = {
|
|
3583
3630
|
formRevisions: {},
|
|
3584
3631
|
attachments: {}
|
|
3585
3632
|
};
|
|
3586
3633
|
const formRevisionsSlice = toolkit.createSlice({
|
|
3587
3634
|
name: "formRevisions",
|
|
3588
|
-
initialState: initialState$
|
|
3589
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3635
|
+
initialState: initialState$6,
|
|
3636
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$6)),
|
|
3590
3637
|
reducers: {
|
|
3591
3638
|
// revision related actions
|
|
3592
3639
|
setFormRevision: (state, action) => {
|
|
@@ -3766,13 +3813,13 @@ var __publicField = (obj, key, value) => {
|
|
|
3766
3813
|
)
|
|
3767
3814
|
);
|
|
3768
3815
|
const formRevisionReducer = formRevisionsSlice.reducer;
|
|
3769
|
-
const initialState$
|
|
3816
|
+
const initialState$5 = {
|
|
3770
3817
|
forms: {}
|
|
3771
3818
|
};
|
|
3772
3819
|
const formSlice = toolkit.createSlice({
|
|
3773
3820
|
name: "forms",
|
|
3774
|
-
initialState: initialState$
|
|
3775
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3821
|
+
initialState: initialState$5,
|
|
3822
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$5)),
|
|
3776
3823
|
reducers: {
|
|
3777
3824
|
setForms: (state, action) => {
|
|
3778
3825
|
state.forms = {};
|
|
@@ -3877,14 +3924,14 @@ var __publicField = (obj, key, value) => {
|
|
|
3877
3924
|
return Object.values(userForms).filter((form) => !form.component_type).length;
|
|
3878
3925
|
});
|
|
3879
3926
|
const formReducer = formSlice.reducer;
|
|
3880
|
-
const initialState$
|
|
3927
|
+
const initialState$4 = {
|
|
3881
3928
|
formSubmissions: {},
|
|
3882
3929
|
attachments: {}
|
|
3883
3930
|
};
|
|
3884
3931
|
const formSubmissionSlice = toolkit.createSlice({
|
|
3885
3932
|
name: "formSubmissions",
|
|
3886
|
-
initialState: initialState$
|
|
3887
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3933
|
+
initialState: initialState$4,
|
|
3934
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$4)),
|
|
3888
3935
|
reducers: {
|
|
3889
3936
|
setFormSubmission: (state, action) => {
|
|
3890
3937
|
state.formSubmissions[action.payload.offline_id] = action.payload;
|
|
@@ -4121,12 +4168,12 @@ var __publicField = (obj, key, value) => {
|
|
|
4121
4168
|
)
|
|
4122
4169
|
);
|
|
4123
4170
|
const formSubmissionReducer = formSubmissionSlice.reducer;
|
|
4124
|
-
const initialState$
|
|
4171
|
+
const initialState$3 = {
|
|
4125
4172
|
emailDomains: {}
|
|
4126
4173
|
};
|
|
4127
4174
|
const emailDomainsSlice = toolkit.createSlice({
|
|
4128
4175
|
name: "emailDomains",
|
|
4129
|
-
initialState: initialState$
|
|
4176
|
+
initialState: initialState$3,
|
|
4130
4177
|
reducers: {
|
|
4131
4178
|
setEmailDomains: (state, action) => {
|
|
4132
4179
|
const emailDomains = {};
|
|
@@ -4153,15 +4200,15 @@ var __publicField = (obj, key, value) => {
|
|
|
4153
4200
|
(ed1, ed2) => ed1.domain.localeCompare(ed2.domain)
|
|
4154
4201
|
);
|
|
4155
4202
|
const emailDomainsReducer = emailDomainsSlice.reducer;
|
|
4156
|
-
const initialState$
|
|
4203
|
+
const initialState$2 = {
|
|
4157
4204
|
documents: {},
|
|
4158
4205
|
attachments: {}
|
|
4159
4206
|
};
|
|
4160
4207
|
const documentSlice = toolkit.createSlice({
|
|
4161
4208
|
name: "documents",
|
|
4162
|
-
initialState: initialState$
|
|
4209
|
+
initialState: initialState$2,
|
|
4163
4210
|
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
4164
|
-
Object.assign(state, initialState$
|
|
4211
|
+
Object.assign(state, initialState$2);
|
|
4165
4212
|
}),
|
|
4166
4213
|
reducers: {
|
|
4167
4214
|
setDocuments: (state, action) => {
|
|
@@ -4302,10 +4349,13 @@ var __publicField = (obj, key, value) => {
|
|
|
4302
4349
|
delete state.documents[documentId];
|
|
4303
4350
|
}
|
|
4304
4351
|
},
|
|
4352
|
+
// Attachments
|
|
4353
|
+
setDocumentAttachment: setAttachment,
|
|
4305
4354
|
setDocumentAttachments: setAttachments,
|
|
4306
4355
|
addDocumentAttachment: addAttachment,
|
|
4307
4356
|
addDocumentAttachments: addAttachments,
|
|
4308
4357
|
updateDocumentAttachment: updateAttachment,
|
|
4358
|
+
updateDocumentAttachments: updateAttachments,
|
|
4309
4359
|
removeDocumentAttachment: removeAttachment,
|
|
4310
4360
|
removeDocumentAttachments: removeAttachments
|
|
4311
4361
|
}
|
|
@@ -4316,10 +4366,13 @@ var __publicField = (obj, key, value) => {
|
|
|
4316
4366
|
updateDocuments,
|
|
4317
4367
|
moveDocument,
|
|
4318
4368
|
removeDocuments,
|
|
4369
|
+
// Attachments
|
|
4370
|
+
setDocumentAttachment,
|
|
4319
4371
|
setDocumentAttachments,
|
|
4320
4372
|
addDocumentAttachment,
|
|
4321
4373
|
addDocumentAttachments,
|
|
4322
4374
|
updateDocumentAttachment,
|
|
4375
|
+
updateDocumentAttachments,
|
|
4323
4376
|
removeDocumentAttachment,
|
|
4324
4377
|
removeDocumentAttachments
|
|
4325
4378
|
} = documentSlice.actions;
|
|
@@ -4386,13 +4439,13 @@ var __publicField = (obj, key, value) => {
|
|
|
4386
4439
|
)
|
|
4387
4440
|
);
|
|
4388
4441
|
const documentsReducer = documentSlice.reducer;
|
|
4389
|
-
const initialState$
|
|
4442
|
+
const initialState$1 = {
|
|
4390
4443
|
teams: {}
|
|
4391
4444
|
};
|
|
4392
4445
|
const teamSlice = toolkit.createSlice({
|
|
4393
4446
|
name: "teams",
|
|
4394
|
-
initialState: initialState$
|
|
4395
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
4447
|
+
initialState: initialState$1,
|
|
4448
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$1)),
|
|
4396
4449
|
reducers: {
|
|
4397
4450
|
setTeam: (state, action) => {
|
|
4398
4451
|
state.teams[action.payload.offline_id] = action.payload;
|
|
@@ -4442,267 +4495,13 @@ var __publicField = (obj, key, value) => {
|
|
|
4442
4495
|
})
|
|
4443
4496
|
);
|
|
4444
4497
|
const teamReducer = teamSlice.reducer;
|
|
4445
|
-
const initialState
|
|
4446
|
-
|
|
4498
|
+
const initialState = {
|
|
4499
|
+
version: 0
|
|
4447
4500
|
};
|
|
4448
|
-
const
|
|
4449
|
-
name: "
|
|
4450
|
-
initialState
|
|
4451
|
-
|
|
4452
|
-
Object.assign(state, initialState$3);
|
|
4453
|
-
}),
|
|
4454
|
-
reducers: {
|
|
4455
|
-
setDocumentTeamLink: (state, action) => {
|
|
4456
|
-
state.documentTeamLinks[action.payload.offline_id] = action.payload;
|
|
4457
|
-
},
|
|
4458
|
-
setDocumentTeamLinks: (state, action) => {
|
|
4459
|
-
for (const documentTeamLink of action.payload) {
|
|
4460
|
-
state.documentTeamLinks[documentTeamLink.offline_id] = documentTeamLink;
|
|
4461
|
-
}
|
|
4462
|
-
},
|
|
4463
|
-
addDocumentTeamLink: (state, action) => {
|
|
4464
|
-
if (action.payload.offline_id in state.documentTeamLinks) {
|
|
4465
|
-
throw new Error(`DocumentTeamLink with offline_id ${action.payload.offline_id} already exists`);
|
|
4466
|
-
}
|
|
4467
|
-
state.documentTeamLinks[action.payload.offline_id] = action.payload;
|
|
4468
|
-
},
|
|
4469
|
-
deleteDocumentTeamLink: (state, action) => {
|
|
4470
|
-
if (!(action.payload in state.documentTeamLinks)) {
|
|
4471
|
-
throw new Error(`DocumentTeamLink with offline_id ${action.payload} does not exist`);
|
|
4472
|
-
}
|
|
4473
|
-
delete state.documentTeamLinks[action.payload];
|
|
4474
|
-
},
|
|
4475
|
-
deleteDocumentTeamLinks: (state, action) => {
|
|
4476
|
-
for (const offlineId of action.payload) {
|
|
4477
|
-
if (!(offlineId in state.documentTeamLinks)) {
|
|
4478
|
-
throw new Error(`DocumentTeamLink with offline_id ${offlineId} does not exist`);
|
|
4479
|
-
}
|
|
4480
|
-
}
|
|
4481
|
-
for (const offlineId of action.payload) {
|
|
4482
|
-
delete state.documentTeamLinks[offlineId];
|
|
4483
|
-
}
|
|
4484
|
-
}
|
|
4485
|
-
}
|
|
4486
|
-
});
|
|
4487
|
-
const {
|
|
4488
|
-
setDocumentTeamLink,
|
|
4489
|
-
setDocumentTeamLinks,
|
|
4490
|
-
addDocumentTeamLink,
|
|
4491
|
-
deleteDocumentTeamLink,
|
|
4492
|
-
deleteDocumentTeamLinks
|
|
4493
|
-
} = documentTeamLinkSlice.actions;
|
|
4494
|
-
const selectDocumentTeamLinksMapping = (state) => state.documentTeamLinkReducer.documentTeamLinks;
|
|
4495
|
-
const selectDocumentTeamLinks = (state) => Object.values(state.documentTeamLinkReducer.documentTeamLinks);
|
|
4496
|
-
const selectDocumentTeamLinksOfDocument = restructureCreateSelectorWithArgs(
|
|
4497
|
-
toolkit.createSelector(
|
|
4498
|
-
[selectDocumentTeamLinks, (_, documentId) => documentId],
|
|
4499
|
-
(documentTeamLinks, documentId) => {
|
|
4500
|
-
return documentTeamLinks.filter((documentTeamLink) => documentTeamLink.document === documentId);
|
|
4501
|
-
}
|
|
4502
|
-
)
|
|
4503
|
-
);
|
|
4504
|
-
const selectDocumentTeamLinksOfTeam = restructureCreateSelectorWithArgs(
|
|
4505
|
-
toolkit.createSelector([selectDocumentTeamLinks, (_, teamId) => teamId], (documentTeamLinks, teamId) => {
|
|
4506
|
-
return documentTeamLinks.filter((documentTeamLink) => documentTeamLink.team === teamId);
|
|
4507
|
-
})
|
|
4508
|
-
);
|
|
4509
|
-
const selectDocumentsLinkedToTeam = restructureCreateSelectorWithArgs(
|
|
4510
|
-
toolkit.createSelector(
|
|
4511
|
-
[
|
|
4512
|
-
selectDocumentTeamLinks,
|
|
4513
|
-
(state) => state.documentsReducer.documents,
|
|
4514
|
-
(_, teamId) => teamId
|
|
4515
|
-
],
|
|
4516
|
-
(documentTeamLinks, documents, teamId) => {
|
|
4517
|
-
return documentTeamLinks.filter((documentTeamLink) => documentTeamLink.team === teamId).map((documentTeamLink) => documents[documentTeamLink.document]).filter((document2) => !!document2);
|
|
4518
|
-
}
|
|
4519
|
-
)
|
|
4520
|
-
);
|
|
4521
|
-
const selectTeamsLinkedToDocument = restructureCreateSelectorWithArgs(
|
|
4522
|
-
toolkit.createSelector(
|
|
4523
|
-
[selectDocumentTeamLinks, (state) => state.teamReducer.teams, (_, documentId) => documentId],
|
|
4524
|
-
(documentTeamLinks, teams, documentId) => {
|
|
4525
|
-
return documentTeamLinks.filter((documentTeamLink) => documentTeamLink.document === documentId).map((documentTeamLink) => teams[documentTeamLink.team]).filter((team) => !!team);
|
|
4526
|
-
}
|
|
4527
|
-
)
|
|
4528
|
-
);
|
|
4529
|
-
const documentTeamLinkReducer = documentTeamLinkSlice.reducer;
|
|
4530
|
-
const initialState$2 = {
|
|
4531
|
-
issueTypeTeamLinks: {}
|
|
4532
|
-
};
|
|
4533
|
-
const issueTypeTeamLinkSlice = toolkit.createSlice({
|
|
4534
|
-
name: "issueTypeTeamLink",
|
|
4535
|
-
initialState: initialState$2,
|
|
4536
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
4537
|
-
Object.assign(state, initialState$2);
|
|
4538
|
-
}),
|
|
4539
|
-
reducers: {
|
|
4540
|
-
setIssueTypeTeamLink: (state, action) => {
|
|
4541
|
-
state.issueTypeTeamLinks[action.payload.offline_id] = action.payload;
|
|
4542
|
-
},
|
|
4543
|
-
setIssueTypeTeamLinks: (state, action) => {
|
|
4544
|
-
state.issueTypeTeamLinks = {};
|
|
4545
|
-
for (const issueTypeTeamLink of action.payload) {
|
|
4546
|
-
state.issueTypeTeamLinks[issueTypeTeamLink.offline_id] = issueTypeTeamLink;
|
|
4547
|
-
}
|
|
4548
|
-
},
|
|
4549
|
-
addIssueTypeTeamLink: (state, action) => {
|
|
4550
|
-
if (action.payload.offline_id in state.issueTypeTeamLinks) {
|
|
4551
|
-
throw new Error(`IssueTypeTeamLink with offline_id ${action.payload.offline_id} already exists`);
|
|
4552
|
-
}
|
|
4553
|
-
state.issueTypeTeamLinks[action.payload.offline_id] = action.payload;
|
|
4554
|
-
},
|
|
4555
|
-
deleteIssueTypeTeamLink: (state, action) => {
|
|
4556
|
-
if (!(action.payload in state.issueTypeTeamLinks)) {
|
|
4557
|
-
throw new Error(`IssueTypeTeamLink with offline_id ${action.payload} does not exist`);
|
|
4558
|
-
}
|
|
4559
|
-
delete state.issueTypeTeamLinks[action.payload];
|
|
4560
|
-
},
|
|
4561
|
-
deleteIssueTypeTeamLinks: (state, action) => {
|
|
4562
|
-
for (const offlineId of action.payload) {
|
|
4563
|
-
if (!(offlineId in state.issueTypeTeamLinks)) {
|
|
4564
|
-
throw new Error(`IssueTypeTeamLink with offline_id ${offlineId} does not exist`);
|
|
4565
|
-
}
|
|
4566
|
-
}
|
|
4567
|
-
for (const offlineId of action.payload) {
|
|
4568
|
-
delete state.issueTypeTeamLinks[offlineId];
|
|
4569
|
-
}
|
|
4570
|
-
}
|
|
4571
|
-
}
|
|
4572
|
-
});
|
|
4573
|
-
const {
|
|
4574
|
-
setIssueTypeTeamLink,
|
|
4575
|
-
setIssueTypeTeamLinks,
|
|
4576
|
-
addIssueTypeTeamLink,
|
|
4577
|
-
deleteIssueTypeTeamLink,
|
|
4578
|
-
deleteIssueTypeTeamLinks
|
|
4579
|
-
} = issueTypeTeamLinkSlice.actions;
|
|
4580
|
-
const selectIssueTypeTeamLinkMapping = (state) => state.issueTypeTeamLinkReducer.issueTypeTeamLinks;
|
|
4581
|
-
const selectIssueTypeTeamLinks = (state) => Object.values(state.issueTypeTeamLinkReducer.issueTypeTeamLinks);
|
|
4582
|
-
const selectIssueTypeTeamLinksOfIssueType = restructureCreateSelectorWithArgs(
|
|
4583
|
-
toolkit.createSelector(
|
|
4584
|
-
[selectIssueTypeTeamLinks, (_, issueTypeId) => issueTypeId],
|
|
4585
|
-
(issueTypeTeamLinks, issueTypeId) => {
|
|
4586
|
-
return issueTypeTeamLinks.filter((issueTypeTeamLink) => issueTypeTeamLink.issue_type === issueTypeId);
|
|
4587
|
-
}
|
|
4588
|
-
)
|
|
4589
|
-
);
|
|
4590
|
-
const selectIssueTypeTeamLinksOfTeam = restructureCreateSelectorWithArgs(
|
|
4591
|
-
toolkit.createSelector([selectIssueTypeTeamLinks, (_, teamId) => teamId], (issueTypeTeamLinks, teamId) => {
|
|
4592
|
-
return issueTypeTeamLinks.filter((issueTypeTeamLink) => issueTypeTeamLink.team === teamId);
|
|
4593
|
-
})
|
|
4594
|
-
);
|
|
4595
|
-
const selectIssueTypesLinkedToTeam = restructureCreateSelectorWithArgs(
|
|
4596
|
-
toolkit.createSelector(
|
|
4597
|
-
[
|
|
4598
|
-
selectIssueTypeTeamLinks,
|
|
4599
|
-
(state) => state.issueTypeReducer.issueTypes,
|
|
4600
|
-
(_, teamId) => teamId
|
|
4601
|
-
],
|
|
4602
|
-
(issueTypeTeamLinks, issueTypes, teamId) => {
|
|
4603
|
-
return issueTypeTeamLinks.filter((issueTypeTeamLink) => issueTypeTeamLink.team === teamId).map((issueTypeTeamLink) => issueTypes[issueTypeTeamLink.issue_type]).filter((issueType) => !!issueType);
|
|
4604
|
-
}
|
|
4605
|
-
)
|
|
4606
|
-
);
|
|
4607
|
-
const selectTeamsLinkedToIssueType = restructureCreateSelectorWithArgs(
|
|
4608
|
-
toolkit.createSelector(
|
|
4609
|
-
[
|
|
4610
|
-
selectIssueTypeTeamLinks,
|
|
4611
|
-
(state) => state.teamReducer.teams,
|
|
4612
|
-
(_, issueTypeId) => issueTypeId
|
|
4613
|
-
],
|
|
4614
|
-
(issueTypeTeamLinks, teams, issueTypeId) => {
|
|
4615
|
-
return issueTypeTeamLinks.filter((issueTypeTeamLink) => issueTypeTeamLink.issue_type === issueTypeId).map((issueTypeTeamLink) => teams[issueTypeTeamLink.team]).filter((team) => !!team);
|
|
4616
|
-
}
|
|
4617
|
-
)
|
|
4618
|
-
);
|
|
4619
|
-
const issueTypeTeamLinkReducer = issueTypeTeamLinkSlice.reducer;
|
|
4620
|
-
const initialState$1 = {
|
|
4621
|
-
userFormTeamLinks: {}
|
|
4622
|
-
};
|
|
4623
|
-
const userFormTeamLinkSlice = toolkit.createSlice({
|
|
4624
|
-
name: "userFormTeamLink",
|
|
4625
|
-
initialState: initialState$1,
|
|
4626
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
4627
|
-
Object.assign(state, initialState$1);
|
|
4628
|
-
}),
|
|
4629
|
-
reducers: {
|
|
4630
|
-
setUserFormTeamLink: (state, action) => {
|
|
4631
|
-
state.userFormTeamLinks[action.payload.offline_id] = action.payload;
|
|
4632
|
-
},
|
|
4633
|
-
setUserFormTeamLinks: (state, action) => {
|
|
4634
|
-
state.userFormTeamLinks = {};
|
|
4635
|
-
for (const userFormTeamLink of action.payload) {
|
|
4636
|
-
state.userFormTeamLinks[userFormTeamLink.offline_id] = userFormTeamLink;
|
|
4637
|
-
}
|
|
4638
|
-
},
|
|
4639
|
-
addUserFormTeamLink: (state, action) => {
|
|
4640
|
-
if (action.payload.offline_id in state.userFormTeamLinks) {
|
|
4641
|
-
throw new Error(`UserFormTeamLink with offline_id ${action.payload.offline_id} already exists`);
|
|
4642
|
-
}
|
|
4643
|
-
state.userFormTeamLinks[action.payload.offline_id] = action.payload;
|
|
4644
|
-
},
|
|
4645
|
-
deleteUserFormTeamLink: (state, action) => {
|
|
4646
|
-
if (!(action.payload in state.userFormTeamLinks)) {
|
|
4647
|
-
throw new Error(`UserFormTeamLink with offline_id ${action.payload} does not exist`);
|
|
4648
|
-
}
|
|
4649
|
-
delete state.userFormTeamLinks[action.payload];
|
|
4650
|
-
},
|
|
4651
|
-
deleteUserFormTeamLinks: (state, action) => {
|
|
4652
|
-
for (const offlineId of action.payload) {
|
|
4653
|
-
if (!(offlineId in state.userFormTeamLinks)) {
|
|
4654
|
-
throw new Error(`UserFormTeamLink with offline_id ${offlineId} does not exist`);
|
|
4655
|
-
}
|
|
4656
|
-
}
|
|
4657
|
-
for (const offlineId of action.payload) {
|
|
4658
|
-
delete state.userFormTeamLinks[offlineId];
|
|
4659
|
-
}
|
|
4660
|
-
}
|
|
4661
|
-
}
|
|
4662
|
-
});
|
|
4663
|
-
const {
|
|
4664
|
-
setUserFormTeamLink,
|
|
4665
|
-
setUserFormTeamLinks,
|
|
4666
|
-
addUserFormTeamLink,
|
|
4667
|
-
deleteUserFormTeamLink,
|
|
4668
|
-
deleteUserFormTeamLinks
|
|
4669
|
-
} = userFormTeamLinkSlice.actions;
|
|
4670
|
-
const selectUserFormTeamLinkMapping = (state) => state.userFormTeamLinkReducer.userFormTeamLinks;
|
|
4671
|
-
const selectUserFormTeamLinks = (state) => Object.values(state.userFormTeamLinkReducer.userFormTeamLinks);
|
|
4672
|
-
const selectUserFormLinksOfTeam = restructureCreateSelectorWithArgs(
|
|
4673
|
-
toolkit.createSelector([selectUserFormTeamLinks, (_, teamId) => teamId], (userFormTeamLinks, teamId) => {
|
|
4674
|
-
return userFormTeamLinks.filter((userFormTeamLink) => userFormTeamLink.team === teamId);
|
|
4675
|
-
})
|
|
4676
|
-
);
|
|
4677
|
-
const selectUserFormLinksOfForm = restructureCreateSelectorWithArgs(
|
|
4678
|
-
toolkit.createSelector([selectUserFormTeamLinks, (_, formId2) => formId2], (userFormTeamLinks, formId2) => {
|
|
4679
|
-
return userFormTeamLinks.filter((userFormTeamLink) => userFormTeamLink.form === formId2);
|
|
4680
|
-
})
|
|
4681
|
-
);
|
|
4682
|
-
const selectUserFormsLinkedToTeam = restructureCreateSelectorWithArgs(
|
|
4683
|
-
toolkit.createSelector(
|
|
4684
|
-
[selectUserFormTeamLinks, (state) => state.formReducer.forms, (_, teamId) => teamId],
|
|
4685
|
-
(userFormTeamLinks, userForms, teamId) => {
|
|
4686
|
-
return userFormTeamLinks.filter((userFormTeamLink) => userFormTeamLink.team === teamId).map((userFormTeamLink) => userForms[userFormTeamLink.form]).filter((form) => !!form);
|
|
4687
|
-
}
|
|
4688
|
-
)
|
|
4689
|
-
);
|
|
4690
|
-
const selectTeamsLinkedToUserForm = restructureCreateSelectorWithArgs(
|
|
4691
|
-
toolkit.createSelector(
|
|
4692
|
-
[selectUserFormTeamLinks, (state) => state.teamReducer.teams, (_, formId2) => formId2],
|
|
4693
|
-
(userFormTeamLinks, teams, formId2) => {
|
|
4694
|
-
return userFormTeamLinks.filter((userFormTeamLink) => userFormTeamLink.form === formId2).map((userFormTeamLink) => teams[userFormTeamLink.team]).filter((team) => !!team);
|
|
4695
|
-
}
|
|
4696
|
-
)
|
|
4697
|
-
);
|
|
4698
|
-
const userFormTeamLinkReducer = userFormTeamLinkSlice.reducer;
|
|
4699
|
-
const initialState = {
|
|
4700
|
-
version: 0
|
|
4701
|
-
};
|
|
4702
|
-
const versioningSlice = toolkit.createSlice({
|
|
4703
|
-
name: "versioning",
|
|
4704
|
-
initialState,
|
|
4705
|
-
reducers: {}
|
|
4501
|
+
const versioningSlice = toolkit.createSlice({
|
|
4502
|
+
name: "versioning",
|
|
4503
|
+
initialState,
|
|
4504
|
+
reducers: {}
|
|
4706
4505
|
});
|
|
4707
4506
|
const versioningReducer = versioningSlice.reducer;
|
|
4708
4507
|
const fullComponentMarkerSize = 45;
|
|
@@ -4746,10 +4545,7 @@ var __publicField = (obj, key, value) => {
|
|
|
4746
4545
|
emailDomainsReducer,
|
|
4747
4546
|
licenseReducer,
|
|
4748
4547
|
documentsReducer,
|
|
4749
|
-
teamReducer
|
|
4750
|
-
documentTeamLinkReducer,
|
|
4751
|
-
issueTypeTeamLinkReducer,
|
|
4752
|
-
userFormTeamLinkReducer
|
|
4548
|
+
teamReducer
|
|
4753
4549
|
};
|
|
4754
4550
|
const overmapReducer = toolkit.combineReducers(overmapReducers);
|
|
4755
4551
|
const resetStore = "RESET";
|
|
@@ -5266,642 +5062,95 @@ var __publicField = (obj, key, value) => {
|
|
|
5266
5062
|
return promise;
|
|
5267
5063
|
}
|
|
5268
5064
|
}
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
blocks: [offline_id, issue],
|
|
5310
|
-
blockers: [file_sha1],
|
|
5311
|
-
payload: {
|
|
5312
|
-
...offlineAttachment,
|
|
5313
|
-
...fileProps
|
|
5314
|
-
}
|
|
5315
|
-
});
|
|
5316
|
-
promise.catch((error2) => {
|
|
5317
|
-
this.client.store.dispatch(removeIssueAttachment(offlineAttachment.offline_id));
|
|
5318
|
-
throw error2;
|
|
5319
|
-
});
|
|
5320
|
-
return [offlineAttachment, promise];
|
|
5321
|
-
}
|
|
5322
|
-
async addComponentAttachment(attachmentPayload) {
|
|
5323
|
-
const { component, file_sha1, offline_id } = attachmentPayload;
|
|
5324
|
-
if (!attachmentPayload.file.objectURL) {
|
|
5325
|
-
throw new Error("Expected attachmentPayload.file.objectURL to be defined.");
|
|
5326
|
-
}
|
|
5327
|
-
const offlineAttachment = {
|
|
5328
|
-
...attachmentPayload,
|
|
5329
|
-
file: attachmentPayload.file.objectURL,
|
|
5330
|
-
file_name: attachmentPayload.file.name,
|
|
5331
|
-
file_type: attachmentPayload.file.type,
|
|
5332
|
-
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5333
|
-
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
5334
|
-
};
|
|
5335
|
-
await this.client.files.addCache(attachmentPayload.file, file_sha1);
|
|
5336
|
-
this.client.store.dispatch(addComponentAttachment(offlineAttachment));
|
|
5337
|
-
const [fileProps] = await this.client.files.uploadFileToS3(file_sha1);
|
|
5338
|
-
const promise = this.enqueueRequest({
|
|
5339
|
-
description: "Create attachment",
|
|
5340
|
-
method: HttpMethod.POST,
|
|
5341
|
-
url: `/components/${component}/attach/`,
|
|
5342
|
-
blocks: [offline_id, component],
|
|
5343
|
-
blockers: [file_sha1],
|
|
5344
|
-
payload: {
|
|
5345
|
-
...offlineAttachment,
|
|
5346
|
-
...fileProps
|
|
5347
|
-
}
|
|
5348
|
-
});
|
|
5349
|
-
promise.catch((error2) => {
|
|
5350
|
-
this.client.store.dispatch(removeComponentAttachment(offlineAttachment.offline_id));
|
|
5351
|
-
throw error2;
|
|
5352
|
-
});
|
|
5353
|
-
return [offlineAttachment, promise];
|
|
5354
|
-
}
|
|
5355
|
-
async addComponentTypeAttachment(attachmentPayload) {
|
|
5356
|
-
const { component_type, file_sha1, offline_id } = attachmentPayload;
|
|
5357
|
-
if (!attachmentPayload.file.objectURL) {
|
|
5358
|
-
throw new Error("Expected attachmentPayload.file.objectURL to be defined.");
|
|
5359
|
-
}
|
|
5360
|
-
const offlineAttachment = {
|
|
5361
|
-
...attachmentPayload,
|
|
5362
|
-
file: attachmentPayload.file.objectURL,
|
|
5363
|
-
file_name: attachmentPayload.file.name,
|
|
5364
|
-
file_type: attachmentPayload.file.type,
|
|
5365
|
-
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5366
|
-
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
5367
|
-
};
|
|
5368
|
-
await this.client.files.addCache(attachmentPayload.file, file_sha1);
|
|
5369
|
-
this.client.store.dispatch(addComponentTypeAttachment(offlineAttachment));
|
|
5370
|
-
const [fileProps] = await this.client.files.uploadFileToS3(file_sha1);
|
|
5371
|
-
const promise = this.enqueueRequest({
|
|
5372
|
-
description: "Create attachment",
|
|
5373
|
-
method: HttpMethod.POST,
|
|
5374
|
-
url: `/components/types/${component_type}/attach/`,
|
|
5375
|
-
blocks: [offline_id, component_type],
|
|
5376
|
-
blockers: [file_sha1],
|
|
5377
|
-
payload: {
|
|
5378
|
-
...offlineAttachment,
|
|
5379
|
-
...fileProps
|
|
5380
|
-
}
|
|
5381
|
-
});
|
|
5382
|
-
promise.catch((error2) => {
|
|
5383
|
-
this.client.store.dispatch(removeComponentTypeAttachment(offlineAttachment.offline_id));
|
|
5384
|
-
throw error2;
|
|
5385
|
-
});
|
|
5386
|
-
return [offlineAttachment, promise];
|
|
5387
|
-
}
|
|
5388
|
-
async addDocumentAttachment(attachmentPayload) {
|
|
5389
|
-
const { description: description2, document: document2, file_sha1, offline_id } = attachmentPayload;
|
|
5390
|
-
if (!attachmentPayload.file.objectURL) {
|
|
5391
|
-
throw new Error("Expected attachmentPayload.file.objectURL to be defined.");
|
|
5392
|
-
}
|
|
5393
|
-
const offlineAttachment = {
|
|
5394
|
-
...attachmentPayload,
|
|
5395
|
-
file: attachmentPayload.file.objectURL,
|
|
5396
|
-
file_name: attachmentPayload.file.name,
|
|
5397
|
-
file_type: attachmentPayload.file.type,
|
|
5398
|
-
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5399
|
-
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
5400
|
-
};
|
|
5401
|
-
await this.client.files.addCache(attachmentPayload.file, file_sha1);
|
|
5402
|
-
this.client.store.dispatch(addDocumentAttachment(offlineAttachment));
|
|
5403
|
-
const [fileProps] = await this.client.files.uploadFileToS3(file_sha1);
|
|
5404
|
-
const promise = this.enqueueRequest({
|
|
5405
|
-
description: "Create attachment",
|
|
5406
|
-
method: HttpMethod.POST,
|
|
5407
|
-
url: `/documents/${document2}/attach/`,
|
|
5408
|
-
blocks: [offline_id, document2],
|
|
5409
|
-
blockers: [file_sha1],
|
|
5410
|
-
payload: {
|
|
5411
|
-
offline_id,
|
|
5412
|
-
document: document2,
|
|
5413
|
-
description: description2 ?? "",
|
|
5414
|
-
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5415
|
-
...fileProps
|
|
5416
|
-
}
|
|
5417
|
-
});
|
|
5418
|
-
promise.catch((error2) => {
|
|
5419
|
-
this.client.store.dispatch(removeDocumentAttachment(offlineAttachment.offline_id));
|
|
5420
|
-
throw error2;
|
|
5421
|
-
});
|
|
5422
|
-
return [offlineAttachment, promise];
|
|
5423
|
-
}
|
|
5424
|
-
/** the outer Promise is needed to await the hashing of each file, which is required before offline use. If wanting to
|
|
5425
|
-
* attach promise handlers to the request to add the attachment in the backend, apply it on the promise returned from the
|
|
5426
|
-
* OptimisticModelResult. */
|
|
5427
|
-
attachFilesToIssue(filesToSubmit, issueId) {
|
|
5428
|
-
return filesToSubmit.map((file) => {
|
|
5429
|
-
if (!(file instanceof File)) {
|
|
5430
|
-
throw new Error("Expected a File instance.");
|
|
5431
|
-
}
|
|
5432
|
-
const photoAttachmentPromise = async (file2) => {
|
|
5433
|
-
const hash = await hashFile(file2);
|
|
5434
|
-
const attachment = offline({
|
|
5435
|
-
file: file2,
|
|
5436
|
-
file_name: file2.name,
|
|
5437
|
-
file_type: file2.type,
|
|
5438
|
-
issue: issueId,
|
|
5439
|
-
file_sha1: hash,
|
|
5440
|
-
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5441
|
-
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
5442
|
-
});
|
|
5443
|
-
return this.addIssueAttachment(attachment);
|
|
5444
|
-
};
|
|
5445
|
-
return photoAttachmentPromise(file);
|
|
5446
|
-
});
|
|
5447
|
-
}
|
|
5448
|
-
attachFilesToComponent(filesToSubmit, componentId) {
|
|
5449
|
-
return filesToSubmit.map((file) => {
|
|
5450
|
-
if (!(file instanceof File)) {
|
|
5451
|
-
throw new Error("Expected a File instance.");
|
|
5452
|
-
}
|
|
5453
|
-
const photoAttachmentPromise = async (file2) => {
|
|
5454
|
-
const hash = await hashFile(file2);
|
|
5455
|
-
const attachment = offline({
|
|
5456
|
-
file: file2,
|
|
5457
|
-
file_name: file2.name,
|
|
5458
|
-
file_type: file2.type,
|
|
5459
|
-
component: componentId,
|
|
5460
|
-
file_sha1: hash,
|
|
5461
|
-
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5462
|
-
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
5463
|
-
});
|
|
5464
|
-
return this.addComponentAttachment(attachment);
|
|
5465
|
-
};
|
|
5466
|
-
return photoAttachmentPromise(file);
|
|
5467
|
-
});
|
|
5468
|
-
}
|
|
5469
|
-
attachFilesToComponentType(filesToSubmit, componentTypeId) {
|
|
5470
|
-
return filesToSubmit.map((file) => {
|
|
5471
|
-
if (!(file instanceof File)) {
|
|
5472
|
-
throw new Error("Expected a File instance.");
|
|
5473
|
-
}
|
|
5474
|
-
const photoAttachmentPromise = async (file2) => {
|
|
5475
|
-
const hash = await hashFile(file2);
|
|
5476
|
-
const attachment = offline({
|
|
5477
|
-
file: file2,
|
|
5478
|
-
file_name: file2.name,
|
|
5479
|
-
file_type: file2.type,
|
|
5480
|
-
component_type: componentTypeId,
|
|
5481
|
-
file_sha1: hash,
|
|
5482
|
-
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5483
|
-
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
5484
|
-
});
|
|
5485
|
-
return this.addComponentTypeAttachment(attachment);
|
|
5486
|
-
};
|
|
5487
|
-
return photoAttachmentPromise(file);
|
|
5488
|
-
});
|
|
5489
|
-
}
|
|
5490
|
-
attachFilesToDocument(filesToSubmit, documentId) {
|
|
5491
|
-
return filesToSubmit.map((file) => {
|
|
5492
|
-
if (!(file instanceof File)) {
|
|
5493
|
-
throw new Error("Expected a File instance.");
|
|
5494
|
-
}
|
|
5495
|
-
const photoAttachmentPromise = async (file2) => {
|
|
5496
|
-
const hash = await hashFile(file2);
|
|
5497
|
-
const attachment = offline({
|
|
5498
|
-
file: file2,
|
|
5499
|
-
file_name: file2.name,
|
|
5500
|
-
file_type: file2.type,
|
|
5501
|
-
document: documentId,
|
|
5502
|
-
file_sha1: hash,
|
|
5503
|
-
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5504
|
-
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
5505
|
-
});
|
|
5506
|
-
return this.addDocumentAttachment(attachment);
|
|
5507
|
-
};
|
|
5508
|
-
return photoAttachmentPromise(file);
|
|
5509
|
-
});
|
|
5510
|
-
}
|
|
5511
|
-
async replaceIssueAttachmentFile(attachmentId, newFile) {
|
|
5512
|
-
const { store } = this.client;
|
|
5513
|
-
const attachment = store.getState().issueReducer.attachments[attachmentId];
|
|
5514
|
-
if (!attachment)
|
|
5515
|
-
throw new Error(`Attachment ${attachmentId} not found`);
|
|
5516
|
-
let oldFile = void 0;
|
|
5517
|
-
const newSha1 = await hashFile(newFile);
|
|
5518
|
-
const performRequest2 = async () => {
|
|
5519
|
-
oldFile = await this.client.files.fetchCache(attachment.file_sha1);
|
|
5520
|
-
if (!oldFile) {
|
|
5521
|
-
console.error(`Failed to fetch old file from cache for sha1 ${attachment.file_sha1}.`);
|
|
5522
|
-
}
|
|
5523
|
-
if (!newFile.objectURL) {
|
|
5524
|
-
throw new Error(`newFile["objectURL"] is unexpectedly ${newFile.objectURL}`);
|
|
5525
|
-
}
|
|
5526
|
-
store.dispatch(
|
|
5527
|
-
updateIssueAttachment({ ...attachment, file_sha1: newSha1, file: URL.createObjectURL(newFile) })
|
|
5528
|
-
);
|
|
5529
|
-
await this.client.files.addCache(newFile, newSha1);
|
|
5530
|
-
const [fileProps] = await this.client.files.uploadFileToS3(newSha1).catch((e) => {
|
|
5531
|
-
store.dispatch(updateIssueAttachment(attachment));
|
|
5065
|
+
const EXPIRING_SOON_THRESHOLD = 1800;
|
|
5066
|
+
function parseTokens(response) {
|
|
5067
|
+
if (!response.access)
|
|
5068
|
+
throw new Error("Missing access token");
|
|
5069
|
+
if (!response.refresh)
|
|
5070
|
+
throw new Error("Missing refresh token");
|
|
5071
|
+
return { accessToken: response.access, refreshToken: response.refresh };
|
|
5072
|
+
}
|
|
5073
|
+
class AuthService extends BaseApiService {
|
|
5074
|
+
constructor() {
|
|
5075
|
+
super(...arguments);
|
|
5076
|
+
__publicField(this, "_getAccessToken", () => this.client.store.getState().authReducer.accessToken);
|
|
5077
|
+
__publicField(this, "_getRefreshToken", () => this.client.store.getState().authReducer.refreshToken);
|
|
5078
|
+
// _getTokenPair and _getRenewedTokens don't need to use enqueueRequest from the BaseApiService because
|
|
5079
|
+
// they are very simple. However, if we need robust error handling or want these operations to queue in the Outbox,
|
|
5080
|
+
// we will use enqueueRequest.
|
|
5081
|
+
/**
|
|
5082
|
+
* Takes credentials and gets a token pair
|
|
5083
|
+
* @async
|
|
5084
|
+
* @param credentials The username and password for obtaining a token pair
|
|
5085
|
+
* @param logoutOnFailure Whether to log out if the request fails
|
|
5086
|
+
* @returns An array containing two elements: 1) a Promise for the access and refresh tokens, and 2) the UUID of the
|
|
5087
|
+
* request, so the request can be cancelled if necessary.
|
|
5088
|
+
*/
|
|
5089
|
+
__publicField(this, "_getTokenPair", (credentials, logoutOnFailure = true) => {
|
|
5090
|
+
const uuid$1 = uuid.v4();
|
|
5091
|
+
const responsePromise = this.enqueueRequest({
|
|
5092
|
+
uuid: uuid$1,
|
|
5093
|
+
description: "Get token pair",
|
|
5094
|
+
method: HttpMethod.POST,
|
|
5095
|
+
url: "/api/token/",
|
|
5096
|
+
payload: credentials,
|
|
5097
|
+
isAuthNeeded: false,
|
|
5098
|
+
checkAuth: false,
|
|
5099
|
+
blockers: [],
|
|
5100
|
+
blocks: []
|
|
5101
|
+
}).then(parseTokens).catch((e) => {
|
|
5102
|
+
if (logoutOnFailure) {
|
|
5103
|
+
void this.logout().then();
|
|
5104
|
+
}
|
|
5532
5105
|
throw e;
|
|
5533
5106
|
});
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5107
|
+
return [responsePromise, uuid$1];
|
|
5108
|
+
});
|
|
5109
|
+
/**
|
|
5110
|
+
* Takes refresh token and gets a new token pair
|
|
5111
|
+
* @async
|
|
5112
|
+
* @param {string} refreshToken The refresh token used to get new tokens
|
|
5113
|
+
* @returns {Promise<TokenPair>} The new access and refresh tokens
|
|
5114
|
+
*/
|
|
5115
|
+
__publicField(this, "_getRenewedTokens", async (refreshToken) => {
|
|
5116
|
+
const promise = this.enqueueRequest({
|
|
5117
|
+
description: "Get renewed tokens",
|
|
5118
|
+
method: HttpMethod.POST,
|
|
5119
|
+
url: "/api/token/refresh/",
|
|
5120
|
+
payload: { refresh: refreshToken },
|
|
5121
|
+
isAuthNeeded: false,
|
|
5122
|
+
blockers: [],
|
|
5123
|
+
blocks: [],
|
|
5124
|
+
// Don't wait for an auth check since this is a refresh token request.
|
|
5125
|
+
checkAuth: false,
|
|
5126
|
+
// Don't wait for other requests to finish, or we might end up in a deadlock.
|
|
5127
|
+
immediate: true
|
|
5128
|
+
}).catch((e) => {
|
|
5129
|
+
console.error("Could not renew tokens; logging out due to error:", e);
|
|
5130
|
+
void this.logout();
|
|
5131
|
+
return void 0;
|
|
5542
5132
|
});
|
|
5133
|
+
let response = void 0;
|
|
5543
5134
|
try {
|
|
5544
|
-
|
|
5545
|
-
void this.client.files.removeCache(attachment.file_sha1);
|
|
5546
|
-
return result;
|
|
5135
|
+
response = await promise;
|
|
5547
5136
|
} catch (e) {
|
|
5548
|
-
|
|
5549
|
-
store.dispatch(
|
|
5550
|
-
updateIssueAttachment({
|
|
5551
|
-
...attachment,
|
|
5552
|
-
file_sha1: attachment.file_sha1,
|
|
5553
|
-
file: URL.createObjectURL(oldFile)
|
|
5554
|
-
})
|
|
5555
|
-
);
|
|
5556
|
-
}
|
|
5557
|
-
throw e;
|
|
5137
|
+
await this.logout();
|
|
5558
5138
|
}
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5139
|
+
if (!response)
|
|
5140
|
+
return void 0;
|
|
5141
|
+
if (!response.access)
|
|
5142
|
+
throw new Error("Missing access token");
|
|
5143
|
+
if (!response.refresh)
|
|
5144
|
+
throw new Error("Missing refresh token");
|
|
5145
|
+
return { accessToken: response.access, refreshToken: response.refresh };
|
|
5146
|
+
});
|
|
5567
5147
|
}
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
const newSha1 = await hashFile(newFile);
|
|
5575
|
-
const performRequest2 = async () => {
|
|
5576
|
-
oldFile = await this.client.files.fetchCache(attachment.file_sha1);
|
|
5577
|
-
if (!oldFile) {
|
|
5578
|
-
console.error(`Failed to fetch old file from cache for sha1 ${attachment.file_sha1}.`);
|
|
5579
|
-
}
|
|
5580
|
-
if (!newFile.objectURL) {
|
|
5581
|
-
throw new Error(`newFile["objectURL"] is unexpectedly ${newFile.objectURL}`);
|
|
5582
|
-
}
|
|
5583
|
-
store.dispatch(
|
|
5584
|
-
updateComponentAttachment({ ...attachment, file_sha1: newSha1, file: URL.createObjectURL(newFile) })
|
|
5585
|
-
);
|
|
5586
|
-
await this.client.files.addCache(newFile, newSha1);
|
|
5587
|
-
const [fileProps] = await this.client.files.uploadFileToS3(newSha1).catch((e) => {
|
|
5588
|
-
store.dispatch(updateComponentAttachment(attachment));
|
|
5589
|
-
throw e;
|
|
5590
|
-
});
|
|
5591
|
-
const promise2 = this.enqueueRequest({
|
|
5592
|
-
description: "Edit attachment",
|
|
5593
|
-
method: HttpMethod.PATCH,
|
|
5594
|
-
url: `/attachments/components/${attachment.offline_id}/`,
|
|
5595
|
-
isResponseBlob: false,
|
|
5596
|
-
payload: fileProps,
|
|
5597
|
-
blockers: [attachmentId, newSha1],
|
|
5598
|
-
blocks: [attachmentId, newSha1]
|
|
5599
|
-
});
|
|
5600
|
-
try {
|
|
5601
|
-
const result = await promise2;
|
|
5602
|
-
void this.client.files.removeCache(attachment.file_sha1);
|
|
5603
|
-
return result;
|
|
5604
|
-
} catch (e) {
|
|
5605
|
-
if (oldFile) {
|
|
5606
|
-
store.dispatch(
|
|
5607
|
-
updateComponentAttachment({
|
|
5608
|
-
...attachment,
|
|
5609
|
-
file_sha1: attachment.file_sha1,
|
|
5610
|
-
file: URL.createObjectURL(oldFile)
|
|
5611
|
-
})
|
|
5612
|
-
);
|
|
5613
|
-
}
|
|
5614
|
-
throw e;
|
|
5615
|
-
}
|
|
5616
|
-
};
|
|
5617
|
-
const offlineAttachment = {
|
|
5618
|
-
...attachment,
|
|
5619
|
-
file_sha1: newSha1,
|
|
5620
|
-
file: URL.createObjectURL(newFile)
|
|
5621
|
-
};
|
|
5622
|
-
const promise = performRequest2();
|
|
5623
|
-
return [offlineAttachment, promise];
|
|
5624
|
-
}
|
|
5625
|
-
async replaceComponentTypeAttachmentFile(attachmentId, newFile) {
|
|
5626
|
-
const { store } = this.client;
|
|
5627
|
-
const attachment = store.getState().componentTypeReducer.attachments[attachmentId];
|
|
5628
|
-
if (!attachment)
|
|
5629
|
-
throw new Error(`Attachment ${attachmentId} not found`);
|
|
5630
|
-
let oldFile = void 0;
|
|
5631
|
-
const newSha1 = await hashFile(newFile);
|
|
5632
|
-
const performRequest2 = async () => {
|
|
5633
|
-
oldFile = await this.client.files.fetchCache(attachment.file_sha1);
|
|
5634
|
-
if (!oldFile) {
|
|
5635
|
-
console.error(`Failed to fetch old file from cache for sha1 ${attachment.file_sha1}.`);
|
|
5636
|
-
}
|
|
5637
|
-
if (!newFile.objectURL) {
|
|
5638
|
-
throw new Error(`newFile["objectURL"] is unexpectedly ${newFile.objectURL}`);
|
|
5639
|
-
}
|
|
5640
|
-
store.dispatch(
|
|
5641
|
-
updateComponentTypeAttachment({
|
|
5642
|
-
...attachment,
|
|
5643
|
-
file_sha1: newSha1,
|
|
5644
|
-
file: URL.createObjectURL(newFile)
|
|
5645
|
-
})
|
|
5646
|
-
);
|
|
5647
|
-
await this.client.files.addCache(newFile, newSha1);
|
|
5648
|
-
const [fileProps] = await this.client.files.uploadFileToS3(newSha1).catch((e) => {
|
|
5649
|
-
store.dispatch(updateComponentTypeAttachment(attachment));
|
|
5650
|
-
throw e;
|
|
5651
|
-
});
|
|
5652
|
-
const promise2 = this.enqueueRequest({
|
|
5653
|
-
description: "Edit attachment",
|
|
5654
|
-
method: HttpMethod.PATCH,
|
|
5655
|
-
url: `/attachments/component_types/${attachment.offline_id}/`,
|
|
5656
|
-
isResponseBlob: false,
|
|
5657
|
-
payload: fileProps,
|
|
5658
|
-
blockers: [attachmentId, newSha1],
|
|
5659
|
-
blocks: [attachmentId, newSha1]
|
|
5660
|
-
});
|
|
5661
|
-
try {
|
|
5662
|
-
const result = await promise2;
|
|
5663
|
-
void this.client.files.removeCache(attachment.file_sha1);
|
|
5664
|
-
return result;
|
|
5665
|
-
} catch (e) {
|
|
5666
|
-
if (oldFile) {
|
|
5667
|
-
store.dispatch(
|
|
5668
|
-
updateComponentTypeAttachment({
|
|
5669
|
-
...attachment,
|
|
5670
|
-
file_sha1: attachment.file_sha1,
|
|
5671
|
-
file: URL.createObjectURL(oldFile)
|
|
5672
|
-
})
|
|
5673
|
-
);
|
|
5674
|
-
}
|
|
5675
|
-
throw e;
|
|
5676
|
-
}
|
|
5677
|
-
};
|
|
5678
|
-
const offlineAttachment = {
|
|
5679
|
-
...attachment,
|
|
5680
|
-
file_sha1: newSha1,
|
|
5681
|
-
file: URL.createObjectURL(newFile)
|
|
5682
|
-
};
|
|
5683
|
-
const promise = performRequest2();
|
|
5684
|
-
return [offlineAttachment, promise];
|
|
5685
|
-
}
|
|
5686
|
-
async replaceDocumentAttachmentFile(attachmentId, newFile) {
|
|
5687
|
-
const { store } = this.client;
|
|
5688
|
-
const attachment = store.getState().documentsReducer.attachments[attachmentId];
|
|
5689
|
-
if (!attachment)
|
|
5690
|
-
throw new Error(`Attachment ${attachmentId} not found`);
|
|
5691
|
-
let oldFile = void 0;
|
|
5692
|
-
const newSha1 = await hashFile(newFile);
|
|
5693
|
-
const performRequest2 = async () => {
|
|
5694
|
-
oldFile = await this.client.files.fetchCache(attachment.file_sha1);
|
|
5695
|
-
if (!oldFile) {
|
|
5696
|
-
console.error(`Failed to fetch old file from cache for sha1 ${attachment.file_sha1}.`);
|
|
5697
|
-
}
|
|
5698
|
-
if (!newFile.objectURL) {
|
|
5699
|
-
throw new Error(`newFile["objectURL"] is unexpectedly ${newFile.objectURL}`);
|
|
5700
|
-
}
|
|
5701
|
-
store.dispatch(
|
|
5702
|
-
updateDocumentAttachment({
|
|
5703
|
-
...attachment,
|
|
5704
|
-
file_sha1: newSha1,
|
|
5705
|
-
file: URL.createObjectURL(newFile)
|
|
5706
|
-
})
|
|
5707
|
-
);
|
|
5708
|
-
await this.client.files.addCache(newFile, newSha1);
|
|
5709
|
-
const [fileProps] = await this.client.files.uploadFileToS3(newSha1).catch((e) => {
|
|
5710
|
-
store.dispatch(updateDocumentAttachment(attachment));
|
|
5711
|
-
throw e;
|
|
5712
|
-
});
|
|
5713
|
-
const promise2 = this.enqueueRequest({
|
|
5714
|
-
description: "Edit attachment",
|
|
5715
|
-
method: HttpMethod.PATCH,
|
|
5716
|
-
url: `/attachments/documents/${attachment.offline_id}/`,
|
|
5717
|
-
isResponseBlob: false,
|
|
5718
|
-
payload: fileProps,
|
|
5719
|
-
blockers: [attachmentId, newSha1],
|
|
5720
|
-
blocks: [attachmentId, newSha1]
|
|
5721
|
-
});
|
|
5722
|
-
try {
|
|
5723
|
-
const result = await promise2;
|
|
5724
|
-
void this.client.files.removeCache(attachment.file_sha1);
|
|
5725
|
-
return result;
|
|
5726
|
-
} catch (e) {
|
|
5727
|
-
if (oldFile) {
|
|
5728
|
-
store.dispatch(
|
|
5729
|
-
updateDocumentAttachment({
|
|
5730
|
-
...attachment,
|
|
5731
|
-
file_sha1: attachment.file_sha1,
|
|
5732
|
-
file: URL.createObjectURL(oldFile)
|
|
5733
|
-
})
|
|
5734
|
-
);
|
|
5735
|
-
}
|
|
5736
|
-
throw e;
|
|
5737
|
-
}
|
|
5738
|
-
};
|
|
5739
|
-
const offlineAttachment = {
|
|
5740
|
-
...attachment,
|
|
5741
|
-
file_sha1: newSha1,
|
|
5742
|
-
file: URL.createObjectURL(newFile)
|
|
5743
|
-
};
|
|
5744
|
-
const promise = performRequest2();
|
|
5745
|
-
return [offlineAttachment, promise];
|
|
5746
|
-
}
|
|
5747
|
-
/**
|
|
5748
|
-
* Deletes an attachment and associated data in the cloud, in the Redux store and the cache.
|
|
5749
|
-
* @param issueAttachmentId
|
|
5750
|
-
*/
|
|
5751
|
-
deleteIssueAttachment(issueAttachmentId) {
|
|
5752
|
-
const { store } = this.client;
|
|
5753
|
-
const attachment = selectIssueAttachmentMapping(store.getState())[issueAttachmentId];
|
|
5754
|
-
if (!attachment) {
|
|
5755
|
-
throw new Error(`Attachment ${issueAttachmentId} not found`);
|
|
5756
|
-
}
|
|
5757
|
-
store.dispatch(removeIssueAttachment(issueAttachmentId));
|
|
5758
|
-
void this.client.files.removeCache(attachment.file_sha1);
|
|
5759
|
-
return this.enqueueRequest({
|
|
5760
|
-
description: "Delete attachment",
|
|
5761
|
-
method: HttpMethod.DELETE,
|
|
5762
|
-
url: `/attachments/issues/${issueAttachmentId}/`,
|
|
5763
|
-
blockers: [issueAttachmentId],
|
|
5764
|
-
blocks: [issueAttachmentId]
|
|
5765
|
-
});
|
|
5766
|
-
}
|
|
5767
|
-
deleteComponentAttachment(componentAttachmentId) {
|
|
5768
|
-
const { store } = this.client;
|
|
5769
|
-
const attachment = selectComponentAttachmentMapping(store.getState())[componentAttachmentId];
|
|
5770
|
-
if (!attachment) {
|
|
5771
|
-
throw new Error(`Attachment ${componentAttachmentId} not found`);
|
|
5772
|
-
}
|
|
5773
|
-
store.dispatch(removeComponentAttachment(componentAttachmentId));
|
|
5774
|
-
void this.client.files.removeCache(attachment.file_sha1);
|
|
5775
|
-
return this.enqueueRequest({
|
|
5776
|
-
description: "Delete attachment",
|
|
5777
|
-
method: HttpMethod.DELETE,
|
|
5778
|
-
url: `/attachments/components/${componentAttachmentId}/`,
|
|
5779
|
-
blockers: [componentAttachmentId],
|
|
5780
|
-
blocks: [componentAttachmentId]
|
|
5781
|
-
});
|
|
5782
|
-
}
|
|
5783
|
-
deleteComponentTypeAttachment(componentTypeAttachmentId) {
|
|
5784
|
-
const { store } = this.client;
|
|
5785
|
-
const attachment = selectComponentTypeAttachmentMapping(store.getState())[componentTypeAttachmentId];
|
|
5786
|
-
if (!attachment) {
|
|
5787
|
-
throw new Error(`Attachment ${componentTypeAttachmentId} not found`);
|
|
5788
|
-
}
|
|
5789
|
-
store.dispatch(removeComponentTypeAttachment(componentTypeAttachmentId));
|
|
5790
|
-
void this.client.files.removeCache(attachment.file_sha1);
|
|
5791
|
-
return this.enqueueRequest({
|
|
5792
|
-
description: "Delete attachment",
|
|
5793
|
-
method: HttpMethod.DELETE,
|
|
5794
|
-
url: `/attachments/component_types/${componentTypeAttachmentId}/`,
|
|
5795
|
-
blockers: [componentTypeAttachmentId],
|
|
5796
|
-
blocks: [componentTypeAttachmentId]
|
|
5797
|
-
});
|
|
5798
|
-
}
|
|
5799
|
-
deleteDocumentAttachment(documentAttachmentId) {
|
|
5800
|
-
const { store } = this.client;
|
|
5801
|
-
const attachment = store.getState().documentsReducer.attachments[documentAttachmentId];
|
|
5802
|
-
if (!attachment) {
|
|
5803
|
-
throw new Error(`Attachment ${documentAttachmentId} not found`);
|
|
5804
|
-
}
|
|
5805
|
-
store.dispatch(removeDocumentAttachment(documentAttachmentId));
|
|
5806
|
-
void this.client.files.removeCache(attachment.file_sha1);
|
|
5807
|
-
return this.enqueueRequest({
|
|
5808
|
-
description: "Delete document attachment",
|
|
5809
|
-
method: HttpMethod.DELETE,
|
|
5810
|
-
url: `/attachments/documents/${documentAttachmentId}/`,
|
|
5811
|
-
blockers: [documentAttachmentId],
|
|
5812
|
-
blocks: [documentAttachmentId]
|
|
5813
|
-
});
|
|
5814
|
-
}
|
|
5815
|
-
}
|
|
5816
|
-
const EXPIRING_SOON_THRESHOLD = 1800;
|
|
5817
|
-
function parseTokens(response) {
|
|
5818
|
-
if (!response.access)
|
|
5819
|
-
throw new Error("Missing access token");
|
|
5820
|
-
if (!response.refresh)
|
|
5821
|
-
throw new Error("Missing refresh token");
|
|
5822
|
-
return { accessToken: response.access, refreshToken: response.refresh };
|
|
5823
|
-
}
|
|
5824
|
-
class AuthService extends BaseApiService {
|
|
5825
|
-
constructor() {
|
|
5826
|
-
super(...arguments);
|
|
5827
|
-
__publicField(this, "_getAccessToken", () => this.client.store.getState().authReducer.accessToken);
|
|
5828
|
-
__publicField(this, "_getRefreshToken", () => this.client.store.getState().authReducer.refreshToken);
|
|
5829
|
-
// _getTokenPair and _getRenewedTokens don't need to use enqueueRequest from the BaseApiService because
|
|
5830
|
-
// they are very simple. However, if we need robust error handling or want these operations to queue in the Outbox,
|
|
5831
|
-
// we will use enqueueRequest.
|
|
5832
|
-
/**
|
|
5833
|
-
* Takes credentials and gets a token pair
|
|
5834
|
-
* @async
|
|
5835
|
-
* @param credentials The username and password for obtaining a token pair
|
|
5836
|
-
* @param logoutOnFailure Whether to log out if the request fails
|
|
5837
|
-
* @returns An array containing two elements: 1) a Promise for the access and refresh tokens, and 2) the UUID of the
|
|
5838
|
-
* request, so the request can be cancelled if necessary.
|
|
5839
|
-
*/
|
|
5840
|
-
__publicField(this, "_getTokenPair", (credentials, logoutOnFailure = true) => {
|
|
5841
|
-
const uuid$1 = uuid.v4();
|
|
5842
|
-
const responsePromise = this.enqueueRequest({
|
|
5843
|
-
uuid: uuid$1,
|
|
5844
|
-
description: "Get token pair",
|
|
5845
|
-
method: HttpMethod.POST,
|
|
5846
|
-
url: "/api/token/",
|
|
5847
|
-
payload: credentials,
|
|
5848
|
-
isAuthNeeded: false,
|
|
5849
|
-
checkAuth: false,
|
|
5850
|
-
blockers: [],
|
|
5851
|
-
blocks: []
|
|
5852
|
-
}).then(parseTokens).catch((e) => {
|
|
5853
|
-
if (logoutOnFailure) {
|
|
5854
|
-
void this.logout().then();
|
|
5855
|
-
}
|
|
5856
|
-
throw e;
|
|
5857
|
-
});
|
|
5858
|
-
return [responsePromise, uuid$1];
|
|
5859
|
-
});
|
|
5860
|
-
/**
|
|
5861
|
-
* Takes refresh token and gets a new token pair
|
|
5862
|
-
* @async
|
|
5863
|
-
* @param {string} refreshToken The refresh token used to get new tokens
|
|
5864
|
-
* @returns {Promise<TokenPair>} The new access and refresh tokens
|
|
5865
|
-
*/
|
|
5866
|
-
__publicField(this, "_getRenewedTokens", async (refreshToken) => {
|
|
5867
|
-
const promise = this.enqueueRequest({
|
|
5868
|
-
description: "Get renewed tokens",
|
|
5869
|
-
method: HttpMethod.POST,
|
|
5870
|
-
url: "/api/token/refresh/",
|
|
5871
|
-
payload: { refresh: refreshToken },
|
|
5872
|
-
isAuthNeeded: false,
|
|
5873
|
-
blockers: [],
|
|
5874
|
-
blocks: [],
|
|
5875
|
-
// Don't wait for an auth check since this is a refresh token request.
|
|
5876
|
-
checkAuth: false,
|
|
5877
|
-
// Don't wait for other requests to finish, or we might end up in a deadlock.
|
|
5878
|
-
immediate: true
|
|
5879
|
-
}).catch((e) => {
|
|
5880
|
-
console.error("Could not renew tokens; logging out due to error:", e);
|
|
5881
|
-
void this.logout();
|
|
5882
|
-
return void 0;
|
|
5883
|
-
});
|
|
5884
|
-
let response = void 0;
|
|
5885
|
-
try {
|
|
5886
|
-
response = await promise;
|
|
5887
|
-
} catch (e) {
|
|
5888
|
-
await this.logout();
|
|
5889
|
-
}
|
|
5890
|
-
if (!response)
|
|
5891
|
-
return void 0;
|
|
5892
|
-
if (!response.access)
|
|
5893
|
-
throw new Error("Missing access token");
|
|
5894
|
-
if (!response.refresh)
|
|
5895
|
-
throw new Error("Missing refresh token");
|
|
5896
|
-
return { accessToken: response.access, refreshToken: response.refresh };
|
|
5897
|
-
});
|
|
5898
|
-
}
|
|
5899
|
-
/**
|
|
5900
|
-
* Attempts to log into Hemora using given credentials
|
|
5901
|
-
* @param {string} username
|
|
5902
|
-
* @param {string} password
|
|
5903
|
-
*/
|
|
5904
|
-
async login(username, password) {
|
|
5148
|
+
/**
|
|
5149
|
+
* Attempts to log into Hemora using given credentials
|
|
5150
|
+
* @param {string} username
|
|
5151
|
+
* @param {string} password
|
|
5152
|
+
*/
|
|
5153
|
+
async login(username, password) {
|
|
5905
5154
|
const { store } = this.client;
|
|
5906
5155
|
const [promise, uuid$1] = this._getTokenPair({ username, password }, false);
|
|
5907
5156
|
const initialDataUuid = uuid.v4();
|
|
@@ -6504,6 +5753,221 @@ var __publicField = (obj, key, value) => {
|
|
|
6504
5753
|
store.dispatch(addStages(result));
|
|
6505
5754
|
}
|
|
6506
5755
|
}
|
|
5756
|
+
const AttachmentModelMeta = {
|
|
5757
|
+
[AttachmentModel.Issue]: {
|
|
5758
|
+
name: "issue",
|
|
5759
|
+
attachUrlPrefix: "/issues",
|
|
5760
|
+
deleteUrlPrefix: "/issues",
|
|
5761
|
+
fetchUrlPostfix: "/issue-attachments"
|
|
5762
|
+
},
|
|
5763
|
+
[AttachmentModel.Component]: {
|
|
5764
|
+
name: "component",
|
|
5765
|
+
attachUrlPrefix: "/components",
|
|
5766
|
+
deleteUrlPrefix: "/components",
|
|
5767
|
+
fetchUrlPostfix: "/component-attachments"
|
|
5768
|
+
},
|
|
5769
|
+
[AttachmentModel.ComponentType]: {
|
|
5770
|
+
name: "component type",
|
|
5771
|
+
attachUrlPrefix: "/components/types",
|
|
5772
|
+
deleteUrlPrefix: "/components/types",
|
|
5773
|
+
fetchUrlPostfix: "/component-type-attachments"
|
|
5774
|
+
},
|
|
5775
|
+
[AttachmentModel.Project]: {
|
|
5776
|
+
name: "component project",
|
|
5777
|
+
attachUrlPrefix: "/projects",
|
|
5778
|
+
deleteUrlPrefix: "/projects",
|
|
5779
|
+
fetchUrlPostfix: "/attachments"
|
|
5780
|
+
},
|
|
5781
|
+
[AttachmentModel.Document]: {
|
|
5782
|
+
name: "document",
|
|
5783
|
+
attachUrlPrefix: "/documents",
|
|
5784
|
+
deleteUrlPrefix: "/documents",
|
|
5785
|
+
fetchUrlPostfix: "/document-attachments"
|
|
5786
|
+
}
|
|
5787
|
+
};
|
|
5788
|
+
class BaseAttachmentService extends BaseApiService {
|
|
5789
|
+
getNumberOfAttachmentsWithSha1(sha1) {
|
|
5790
|
+
const {
|
|
5791
|
+
issueReducer: issueReducer2,
|
|
5792
|
+
componentReducer: componentReducer2,
|
|
5793
|
+
componentTypeReducer: componentTypeReducer2,
|
|
5794
|
+
documentsReducer: documentsReducer2,
|
|
5795
|
+
projectReducer: projectReducer2,
|
|
5796
|
+
formSubmissionReducer: formSubmissionReducer2,
|
|
5797
|
+
formRevisionReducer: formRevisionReducer2
|
|
5798
|
+
} = this.client.store.getState();
|
|
5799
|
+
const objectsWithSha1 = [].concat(
|
|
5800
|
+
Object.values(issueReducer2.attachments),
|
|
5801
|
+
Object.values(componentReducer2.attachments),
|
|
5802
|
+
Object.values(componentTypeReducer2.attachments),
|
|
5803
|
+
Object.values(documentsReducer2.attachments),
|
|
5804
|
+
Object.values(projectReducer2.attachments),
|
|
5805
|
+
Object.values(formRevisionReducer2.attachments),
|
|
5806
|
+
Object.values(formSubmissionReducer2.attachments)
|
|
5807
|
+
);
|
|
5808
|
+
return objectsWithSha1.filter((object) => object.file_sha1 === sha1).length;
|
|
5809
|
+
}
|
|
5810
|
+
processPresignedUrls(presignedUrls) {
|
|
5811
|
+
for (const [sha1, presignedUrl] of Object.entries(presignedUrls)) {
|
|
5812
|
+
void this.enqueueRequest({
|
|
5813
|
+
url: presignedUrl.url,
|
|
5814
|
+
description: "Upload file to S3",
|
|
5815
|
+
method: HttpMethod.POST,
|
|
5816
|
+
isExternalUrl: true,
|
|
5817
|
+
isAuthNeeded: false,
|
|
5818
|
+
attachmentHash: sha1,
|
|
5819
|
+
// TODO: can we use the sha1 as the blocker?
|
|
5820
|
+
blockers: [`s3-${presignedUrl.fields.key}`],
|
|
5821
|
+
blocks: [sha1],
|
|
5822
|
+
s3url: presignedUrl
|
|
5823
|
+
});
|
|
5824
|
+
}
|
|
5825
|
+
}
|
|
5826
|
+
// Note that currently the fetching of attachments for all models dependds on the active projectId. This may change in the future. And
|
|
5827
|
+
// so for some attachment model services, this method will have to be overridden.
|
|
5828
|
+
async getAttachments(actions) {
|
|
5829
|
+
const { store } = this.client;
|
|
5830
|
+
const activeProjectId = store.getState().projectReducer.activeProjectId;
|
|
5831
|
+
const meta = AttachmentModelMeta[this.attachmentModel];
|
|
5832
|
+
const result = await this.enqueueRequest({
|
|
5833
|
+
description: `Get ${meta.name} attachments`,
|
|
5834
|
+
method: HttpMethod.GET,
|
|
5835
|
+
url: `/projects/${activeProjectId}${meta.fetchUrlPostfix}/`,
|
|
5836
|
+
blocks: [],
|
|
5837
|
+
blockers: []
|
|
5838
|
+
});
|
|
5839
|
+
store.dispatch(actions.setAttachments(result));
|
|
5840
|
+
}
|
|
5841
|
+
async attachFiles(files, modelId, buildOfflineAttachment, actions) {
|
|
5842
|
+
const { store } = this.client;
|
|
5843
|
+
const currentUser = store.getState().userReducer.currentUser;
|
|
5844
|
+
const submittedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
5845
|
+
const offlineAttachments = [];
|
|
5846
|
+
const attachmentPayloads = [];
|
|
5847
|
+
const filePayloads = {};
|
|
5848
|
+
for (const file of files) {
|
|
5849
|
+
const sha1 = await hashFile(file);
|
|
5850
|
+
if (!(sha1 in filePayloads)) {
|
|
5851
|
+
filePayloads[sha1] = {
|
|
5852
|
+
sha1,
|
|
5853
|
+
file_type: file.type,
|
|
5854
|
+
extension: file.name.split(".").pop(),
|
|
5855
|
+
size: file.size
|
|
5856
|
+
};
|
|
5857
|
+
await this.client.files.addCache(file, sha1);
|
|
5858
|
+
}
|
|
5859
|
+
const offlineAttachment = buildOfflineAttachment({
|
|
5860
|
+
file,
|
|
5861
|
+
sha1,
|
|
5862
|
+
submittedAt,
|
|
5863
|
+
createdBy: currentUser.id,
|
|
5864
|
+
description: "",
|
|
5865
|
+
modelId
|
|
5866
|
+
});
|
|
5867
|
+
offlineAttachments.push(offlineAttachment);
|
|
5868
|
+
attachmentPayloads.push({
|
|
5869
|
+
offline_id: offlineAttachment.offline_id,
|
|
5870
|
+
name: offlineAttachment.file_name,
|
|
5871
|
+
sha1: offlineAttachment.file_sha1,
|
|
5872
|
+
description: offlineAttachment.description
|
|
5873
|
+
});
|
|
5874
|
+
}
|
|
5875
|
+
store.dispatch(actions.addAttachments(offlineAttachments));
|
|
5876
|
+
const meta = AttachmentModelMeta[this.attachmentModel];
|
|
5877
|
+
const promise = this.enqueueRequest({
|
|
5878
|
+
description: `Attach files to ${meta.name}`,
|
|
5879
|
+
method: HttpMethod.POST,
|
|
5880
|
+
url: `${meta.attachUrlPrefix}/${modelId}/attach/`,
|
|
5881
|
+
payload: {
|
|
5882
|
+
submitted_at: submittedAt,
|
|
5883
|
+
attachments: attachmentPayloads,
|
|
5884
|
+
files: Object.values(filePayloads)
|
|
5885
|
+
},
|
|
5886
|
+
blocks: offlineAttachments.map((attachment) => attachment.offline_id),
|
|
5887
|
+
blockers: offlineAttachments.map((attachment) => attachment.file_sha1)
|
|
5888
|
+
});
|
|
5889
|
+
promise.then(({ attachments, presigned_urls }) => {
|
|
5890
|
+
store.dispatch(actions.updateAttachments(attachments));
|
|
5891
|
+
this.processPresignedUrls(presigned_urls);
|
|
5892
|
+
}).catch(() => {
|
|
5893
|
+
store.dispatch(actions.removeAttachments(offlineAttachments.map((attachment) => attachment.offline_id)));
|
|
5894
|
+
});
|
|
5895
|
+
return [offlineAttachments, promise.then(({ attachments }) => attachments)];
|
|
5896
|
+
}
|
|
5897
|
+
async deleteAttachment(attachmendId, actions, selectors) {
|
|
5898
|
+
const { store } = this.client;
|
|
5899
|
+
const attachment = selectors.selectAttachment(attachmendId)(store.getState());
|
|
5900
|
+
if (!attachment) {
|
|
5901
|
+
throw new Error(
|
|
5902
|
+
`Attempting to delete attachment with offline_id ${attachmendId} that does not exist in the store`
|
|
5903
|
+
);
|
|
5904
|
+
}
|
|
5905
|
+
store.dispatch(actions.removeAttachment(attachment.offline_id));
|
|
5906
|
+
const meta = AttachmentModelMeta[this.attachmentModel];
|
|
5907
|
+
const promise = this.enqueueRequest({
|
|
5908
|
+
description: "Delete attachment",
|
|
5909
|
+
method: HttpMethod.DELETE,
|
|
5910
|
+
url: `${meta.deleteUrlPrefix}/attachments/${attachmendId}/`,
|
|
5911
|
+
blockers: [attachmendId],
|
|
5912
|
+
blocks: []
|
|
5913
|
+
});
|
|
5914
|
+
promise.then(() => {
|
|
5915
|
+
if (this.getNumberOfAttachmentsWithSha1(attachment.file_sha1) === 0) {
|
|
5916
|
+
void this.client.files.removeCache(attachment.file_sha1);
|
|
5917
|
+
}
|
|
5918
|
+
}).catch(() => {
|
|
5919
|
+
store.dispatch(actions.setAttachment(attachment));
|
|
5920
|
+
});
|
|
5921
|
+
return promise;
|
|
5922
|
+
}
|
|
5923
|
+
}
|
|
5924
|
+
class ComponentAttachmentService extends BaseAttachmentService {
|
|
5925
|
+
constructor() {
|
|
5926
|
+
super(...arguments);
|
|
5927
|
+
__publicField(this, "attachmentModel", AttachmentModel.Component);
|
|
5928
|
+
}
|
|
5929
|
+
buildOfflineAttachment(data) {
|
|
5930
|
+
return offline({
|
|
5931
|
+
file: URL.createObjectURL(data.file),
|
|
5932
|
+
file_sha1: data.sha1,
|
|
5933
|
+
created_by: data.createdBy,
|
|
5934
|
+
file_name: data.file.name,
|
|
5935
|
+
file_type: data.file.type,
|
|
5936
|
+
submitted_at: data.submittedAt,
|
|
5937
|
+
description: data.description,
|
|
5938
|
+
component: data.modelId
|
|
5939
|
+
});
|
|
5940
|
+
}
|
|
5941
|
+
async attachFilesToComponent(files, componentId) {
|
|
5942
|
+
return this.attachFiles(
|
|
5943
|
+
files,
|
|
5944
|
+
componentId,
|
|
5945
|
+
this.buildOfflineAttachment.bind(this),
|
|
5946
|
+
{
|
|
5947
|
+
addAttachments: addComponentAttachments,
|
|
5948
|
+
updateAttachments: updateComponentAttachments,
|
|
5949
|
+
removeAttachments: removeComponentAttachments
|
|
5950
|
+
}
|
|
5951
|
+
);
|
|
5952
|
+
}
|
|
5953
|
+
deleteComponentAttachment(attachmentId) {
|
|
5954
|
+
return this.deleteAttachment(
|
|
5955
|
+
attachmentId,
|
|
5956
|
+
{
|
|
5957
|
+
setAttachment: setComponentAttachment,
|
|
5958
|
+
removeAttachment: removeComponentAttachment
|
|
5959
|
+
},
|
|
5960
|
+
{
|
|
5961
|
+
selectAttachment: selectComponentAttachment
|
|
5962
|
+
}
|
|
5963
|
+
);
|
|
5964
|
+
}
|
|
5965
|
+
async refreshStore() {
|
|
5966
|
+
return this.getAttachments({
|
|
5967
|
+
setAttachments: setComponentAttachments
|
|
5968
|
+
});
|
|
5969
|
+
}
|
|
5970
|
+
}
|
|
6507
5971
|
class ComponentTypeService extends BaseApiService {
|
|
6508
5972
|
add(componentType) {
|
|
6509
5973
|
const offlineComponentType = offline(componentType);
|
|
@@ -6576,9 +6040,56 @@ var __publicField = (obj, key, value) => {
|
|
|
6576
6040
|
store.dispatch(setComponentTypes(result));
|
|
6577
6041
|
}
|
|
6578
6042
|
}
|
|
6579
|
-
class
|
|
6580
|
-
|
|
6581
|
-
|
|
6043
|
+
class ComponentTypeAttachmentService extends BaseAttachmentService {
|
|
6044
|
+
constructor() {
|
|
6045
|
+
super(...arguments);
|
|
6046
|
+
__publicField(this, "attachmentModel", AttachmentModel.ComponentType);
|
|
6047
|
+
}
|
|
6048
|
+
buildOfflineAttachment(data) {
|
|
6049
|
+
return offline({
|
|
6050
|
+
file: URL.createObjectURL(data.file),
|
|
6051
|
+
file_sha1: data.sha1,
|
|
6052
|
+
created_by: data.createdBy,
|
|
6053
|
+
file_name: data.file.name,
|
|
6054
|
+
file_type: data.file.type,
|
|
6055
|
+
submitted_at: data.submittedAt,
|
|
6056
|
+
description: data.description,
|
|
6057
|
+
component_type: data.modelId
|
|
6058
|
+
});
|
|
6059
|
+
}
|
|
6060
|
+
async attachFilesToComponentType(files, componentTypeId) {
|
|
6061
|
+
return this.attachFiles(
|
|
6062
|
+
files,
|
|
6063
|
+
componentTypeId,
|
|
6064
|
+
this.buildOfflineAttachment.bind(this),
|
|
6065
|
+
{
|
|
6066
|
+
addAttachments: addComponentTypeAttachments,
|
|
6067
|
+
updateAttachments: updateComponentTypeAttachments,
|
|
6068
|
+
removeAttachments: removeComponentTypeAttachments
|
|
6069
|
+
}
|
|
6070
|
+
);
|
|
6071
|
+
}
|
|
6072
|
+
deleteComponentTypeAttachment(attachmentId) {
|
|
6073
|
+
return this.deleteAttachment(
|
|
6074
|
+
attachmentId,
|
|
6075
|
+
{
|
|
6076
|
+
setAttachment: setComponentTypeAttachment,
|
|
6077
|
+
removeAttachment: removeComponentTypeAttachment
|
|
6078
|
+
},
|
|
6079
|
+
{
|
|
6080
|
+
selectAttachment: selectComponentTypeAttachment
|
|
6081
|
+
}
|
|
6082
|
+
);
|
|
6083
|
+
}
|
|
6084
|
+
async refreshStore() {
|
|
6085
|
+
return this.getAttachments({
|
|
6086
|
+
setAttachments: setComponentTypeAttachments
|
|
6087
|
+
});
|
|
6088
|
+
}
|
|
6089
|
+
}
|
|
6090
|
+
class IssueCommentService extends BaseApiService {
|
|
6091
|
+
// Omit author and submitted_at since these will always be set internally
|
|
6092
|
+
add(comment) {
|
|
6582
6093
|
const { store } = this.client;
|
|
6583
6094
|
const offlineComment = offline({
|
|
6584
6095
|
...comment,
|
|
@@ -6672,11 +6183,53 @@ var __publicField = (obj, key, value) => {
|
|
|
6672
6183
|
store.dispatch(setIssueUpdates(filteredResult));
|
|
6673
6184
|
}
|
|
6674
6185
|
}
|
|
6186
|
+
class IssueAttachmentService extends BaseAttachmentService {
|
|
6187
|
+
constructor() {
|
|
6188
|
+
super(...arguments);
|
|
6189
|
+
__publicField(this, "attachmentModel", AttachmentModel.Issue);
|
|
6190
|
+
}
|
|
6191
|
+
buildOfflineAttachment(data) {
|
|
6192
|
+
return offline({
|
|
6193
|
+
file: URL.createObjectURL(data.file),
|
|
6194
|
+
file_sha1: data.sha1,
|
|
6195
|
+
created_by: data.createdBy,
|
|
6196
|
+
file_name: data.file.name,
|
|
6197
|
+
file_type: data.file.type,
|
|
6198
|
+
submitted_at: data.submittedAt,
|
|
6199
|
+
description: data.description,
|
|
6200
|
+
issue: data.modelId
|
|
6201
|
+
});
|
|
6202
|
+
}
|
|
6203
|
+
async attachFilesToIssue(files, issueId) {
|
|
6204
|
+
return this.attachFiles(files, issueId, this.buildOfflineAttachment.bind(this), {
|
|
6205
|
+
addAttachments: addIssueAttachments,
|
|
6206
|
+
updateAttachments: updateIssueAttachments,
|
|
6207
|
+
removeAttachments: removeIssueAttachments
|
|
6208
|
+
});
|
|
6209
|
+
}
|
|
6210
|
+
deleteIssueAttachment(attachmentId) {
|
|
6211
|
+
return this.deleteAttachment(
|
|
6212
|
+
attachmentId,
|
|
6213
|
+
{
|
|
6214
|
+
setAttachment: setIssueAttachment,
|
|
6215
|
+
removeAttachment: removeIssueAttachment
|
|
6216
|
+
},
|
|
6217
|
+
{
|
|
6218
|
+
selectAttachment: selectIssueAttachment
|
|
6219
|
+
}
|
|
6220
|
+
);
|
|
6221
|
+
}
|
|
6222
|
+
async refreshStore() {
|
|
6223
|
+
return this.getAttachments({
|
|
6224
|
+
setAttachments: setIssueAttachments
|
|
6225
|
+
});
|
|
6226
|
+
}
|
|
6227
|
+
}
|
|
6675
6228
|
class IssueService extends BaseApiService {
|
|
6676
6229
|
// Basic CRUD functions
|
|
6677
6230
|
// TODO: Once all models are represented in `Created<TModel>`, use `Created` in `OptimisticModelResult`, so we don't
|
|
6678
6231
|
// have to repeat it for all optimistic model results (all optimistic results are created).
|
|
6679
|
-
add(issue,
|
|
6232
|
+
add(issue, issueType = null) {
|
|
6680
6233
|
const { store } = this.client;
|
|
6681
6234
|
const dateWithoutMilliseconds = /* @__PURE__ */ new Date();
|
|
6682
6235
|
const state = store.getState();
|
|
@@ -6703,7 +6256,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6703
6256
|
url: "/issues/",
|
|
6704
6257
|
queryParams: {
|
|
6705
6258
|
workspace_id: workspaceId,
|
|
6706
|
-
...
|
|
6259
|
+
...issueType ? { issue_type: issueType } : {}
|
|
6707
6260
|
},
|
|
6708
6261
|
payload: issuePayload,
|
|
6709
6262
|
blockers: [
|
|
@@ -6840,7 +6393,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6840
6393
|
this.client.store.dispatch(updateIssue(issueToBeUpdated));
|
|
6841
6394
|
this.client.store.dispatch(removeIssueUpdate(offlineIssueUpdate.offline_id));
|
|
6842
6395
|
});
|
|
6843
|
-
const fullIssue =
|
|
6396
|
+
const fullIssue = state.issueReducer.issues[issue.offline_id];
|
|
6844
6397
|
return [fullIssue, promise];
|
|
6845
6398
|
}
|
|
6846
6399
|
async remove(id) {
|
|
@@ -6891,14 +6444,15 @@ var __publicField = (obj, key, value) => {
|
|
|
6891
6444
|
class IssueTypeService extends BaseApiService {
|
|
6892
6445
|
add(payload) {
|
|
6893
6446
|
const { store } = this.client;
|
|
6894
|
-
const
|
|
6447
|
+
const state = store.getState();
|
|
6448
|
+
const activeOrganizationId = state.organizationReducer.activeOrganizationId;
|
|
6895
6449
|
if (!activeOrganizationId) {
|
|
6896
6450
|
throw new Error(`No active organization, got ${activeOrganizationId} for activeOrganizationId.`);
|
|
6897
6451
|
}
|
|
6898
6452
|
const offlineIssueType = offline({
|
|
6899
6453
|
...payload,
|
|
6900
6454
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
6901
|
-
created_by:
|
|
6455
|
+
created_by: state.userReducer.currentUser.id,
|
|
6902
6456
|
organization: activeOrganizationId
|
|
6903
6457
|
});
|
|
6904
6458
|
store.dispatch(addIssueType(offlineIssueType));
|
|
@@ -6951,25 +6505,23 @@ var __publicField = (obj, key, value) => {
|
|
|
6951
6505
|
}
|
|
6952
6506
|
delete(issueTypeId) {
|
|
6953
6507
|
const { store } = this.client;
|
|
6954
|
-
const
|
|
6508
|
+
const state = store.getState();
|
|
6509
|
+
const issueTypeToDelete = state.issueTypeReducer.issueTypes[issueTypeId];
|
|
6955
6510
|
if (!issueTypeToDelete) {
|
|
6956
6511
|
throw new Error(`IssueType with offline_id ${issueTypeId} does not exist in the store.`);
|
|
6957
6512
|
}
|
|
6958
|
-
const issuesOfIssueType = selectIssuesOfIssueType(issueTypeId)(
|
|
6959
|
-
const issueTypeTeamLinks = selectIssueTypeTeamLinksOfIssueType(issueTypeId)(store.getState()) ?? [];
|
|
6513
|
+
const issuesOfIssueType = selectIssuesOfIssueType(issueTypeId)(state) ?? [];
|
|
6960
6514
|
store.dispatch(removeIssueType(issueTypeId));
|
|
6961
6515
|
store.dispatch(removeIssues(issuesOfIssueType.map((issue) => issue.offline_id)));
|
|
6962
|
-
store.dispatch(deleteIssueTypeTeamLinks(issueTypeTeamLinks.map((link) => link.offline_id)));
|
|
6963
6516
|
const promise = this.enqueueRequest({
|
|
6964
6517
|
method: HttpMethod.DELETE,
|
|
6965
6518
|
url: `/issues/types/${issueTypeId}/`,
|
|
6966
6519
|
blockers: [issueTypeId],
|
|
6967
|
-
blocks: [
|
|
6520
|
+
blocks: []
|
|
6968
6521
|
});
|
|
6969
6522
|
promise.catch(() => {
|
|
6970
6523
|
store.dispatch(setIssueType(issueTypeToDelete));
|
|
6971
6524
|
store.dispatch(addIssues(issuesOfIssueType));
|
|
6972
|
-
store.dispatch(setIssueTypeTeamLinks(issueTypeTeamLinks));
|
|
6973
6525
|
});
|
|
6974
6526
|
return promise;
|
|
6975
6527
|
}
|
|
@@ -7119,6 +6671,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7119
6671
|
const usersResult = await usersResultPromise;
|
|
7120
6672
|
await projectAccessRefreshPromise;
|
|
7121
6673
|
store.dispatch(addUsers(usersResult));
|
|
6674
|
+
void this.client.projectAttachments.refreshStore();
|
|
7122
6675
|
}
|
|
7123
6676
|
let currentWorkspaceId;
|
|
7124
6677
|
const oldWorkspaceId = this.client.store.getState().workspaceReducer.activeWorkspaceId;
|
|
@@ -7131,35 +6684,29 @@ var __publicField = (obj, key, value) => {
|
|
|
7131
6684
|
store.dispatch(setActiveWorkspaceId(currentWorkspaceId));
|
|
7132
6685
|
void this.client.categories.refreshStore().then(() => {
|
|
7133
6686
|
void this.client.issues.refreshStore().then(() => {
|
|
6687
|
+
void this.client.issueAttachments.refreshStore().then();
|
|
7134
6688
|
void this.client.issueComments.refreshStore().then();
|
|
6689
|
+
void this.client.issueUpdates.refreshStore().then();
|
|
7135
6690
|
});
|
|
7136
6691
|
});
|
|
7137
6692
|
void this.client.projectFiles.refreshStore().then();
|
|
7138
6693
|
void this.client.componentTypes.refreshStore().then(() => {
|
|
7139
|
-
void this.client.
|
|
7140
|
-
void this.client.
|
|
6694
|
+
void this.client.componentTypeAttachments.refreshStore().then(() => {
|
|
6695
|
+
void this.client.componentStages.refreshStore().then(() => {
|
|
6696
|
+
void this.client.components.refreshStore(overwrite).then(() => {
|
|
6697
|
+
void this.client.componentAttachments.refreshStore().then();
|
|
6698
|
+
});
|
|
6699
|
+
});
|
|
6700
|
+
void this.client.componentStageCompletions.refreshStore().then();
|
|
7141
6701
|
});
|
|
7142
|
-
void this.client.componentStageCompletions.refreshStore().then();
|
|
7143
6702
|
});
|
|
7144
6703
|
void this.client.userForms.refreshStore().then(() => {
|
|
7145
6704
|
void this.client.userFormSubmissions.refreshStore().then();
|
|
7146
6705
|
});
|
|
7147
6706
|
}
|
|
7148
6707
|
if (currentProjectId) {
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
const {
|
|
7152
|
-
issue_attachments,
|
|
7153
|
-
component_type_attachments,
|
|
7154
|
-
component_attachments,
|
|
7155
|
-
project_attachments,
|
|
7156
|
-
document_attachments
|
|
7157
|
-
} = result;
|
|
7158
|
-
store.dispatch(setIssueAttachments(issue_attachments));
|
|
7159
|
-
store.dispatch(setComponentAttachments(component_attachments));
|
|
7160
|
-
store.dispatch(setComponentTypeAttachments(component_type_attachments));
|
|
7161
|
-
store.dispatch(setProjectAttachments(project_attachments));
|
|
7162
|
-
store.dispatch(setDocumentAttachments(document_attachments));
|
|
6708
|
+
void this.client.documents.refreshStore().then(() => {
|
|
6709
|
+
void this.client.documentAttachments.refreshStore().then();
|
|
7163
6710
|
});
|
|
7164
6711
|
void this.client.documents.refreshStore();
|
|
7165
6712
|
void this.client.issueUpdates.refreshStore();
|
|
@@ -7262,6 +6809,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7262
6809
|
});
|
|
7263
6810
|
return promise;
|
|
7264
6811
|
}
|
|
6812
|
+
// TODO: This needs to be seperated into a update and create method
|
|
7265
6813
|
saveActive() {
|
|
7266
6814
|
const { store } = this.client;
|
|
7267
6815
|
const state = store.getState();
|
|
@@ -7327,6 +6875,48 @@ var __publicField = (obj, key, value) => {
|
|
|
7327
6875
|
});
|
|
7328
6876
|
}
|
|
7329
6877
|
}
|
|
6878
|
+
class ProjectAttachmentService extends BaseAttachmentService {
|
|
6879
|
+
constructor() {
|
|
6880
|
+
super(...arguments);
|
|
6881
|
+
__publicField(this, "attachmentModel", AttachmentModel.Project);
|
|
6882
|
+
}
|
|
6883
|
+
buildOfflineAttachment(data) {
|
|
6884
|
+
return offline({
|
|
6885
|
+
file: URL.createObjectURL(data.file),
|
|
6886
|
+
file_sha1: data.sha1,
|
|
6887
|
+
created_by: data.createdBy,
|
|
6888
|
+
file_name: data.file.name,
|
|
6889
|
+
file_type: data.file.type,
|
|
6890
|
+
submitted_at: data.submittedAt,
|
|
6891
|
+
description: data.description,
|
|
6892
|
+
project: data.modelId
|
|
6893
|
+
});
|
|
6894
|
+
}
|
|
6895
|
+
async attachFilesToProject(files, projectId) {
|
|
6896
|
+
return this.attachFiles(files, projectId, this.buildOfflineAttachment.bind(this), {
|
|
6897
|
+
addAttachments: addProjectAttachments,
|
|
6898
|
+
updateAttachments: updateProjectAttachments,
|
|
6899
|
+
removeAttachments: removeProjectAttachments
|
|
6900
|
+
});
|
|
6901
|
+
}
|
|
6902
|
+
deleteProjectAttachment(attachmentId) {
|
|
6903
|
+
return this.deleteAttachment(
|
|
6904
|
+
attachmentId,
|
|
6905
|
+
{
|
|
6906
|
+
setAttachment: setProjectAttachment,
|
|
6907
|
+
removeAttachment: removeProjectAttachment
|
|
6908
|
+
},
|
|
6909
|
+
{
|
|
6910
|
+
selectAttachment: selectProjectAttachment
|
|
6911
|
+
}
|
|
6912
|
+
);
|
|
6913
|
+
}
|
|
6914
|
+
async refreshStore() {
|
|
6915
|
+
return this.getAttachments({
|
|
6916
|
+
setAttachments: setProjectAttachments
|
|
6917
|
+
});
|
|
6918
|
+
}
|
|
6919
|
+
}
|
|
7330
6920
|
class ProjectService extends BaseApiService {
|
|
7331
6921
|
/**
|
|
7332
6922
|
* Creates a new project. Due to the nature of project creation,
|
|
@@ -7544,7 +7134,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7544
7134
|
const currentUser = state.userReducer.currentUser;
|
|
7545
7135
|
const activeWorkspaceId = state.workspaceReducer.activeWorkspaceId;
|
|
7546
7136
|
const submittedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
7547
|
-
const offlineFormPayload = offline({});
|
|
7137
|
+
const offlineFormPayload = offline({ ...ownerAttrs });
|
|
7548
7138
|
const offlineRevisionPayload = offline({ ...initialRevision, submitted_at: submittedAt });
|
|
7549
7139
|
const retForm = {
|
|
7550
7140
|
...offlineFormPayload,
|
|
@@ -7708,8 +7298,6 @@ var __publicField = (obj, key, value) => {
|
|
|
7708
7298
|
if (userFormRevisions && userFormRevisions.length > 0) {
|
|
7709
7299
|
store.dispatch(deleteFormRevisions(userFormRevisions.map(({ offline_id }) => offline_id)));
|
|
7710
7300
|
}
|
|
7711
|
-
const userFormTeamLinks = selectUserFormLinksOfForm(formId2)(state) ?? [];
|
|
7712
|
-
store.dispatch(deleteUserFormTeamLinks(userFormTeamLinks.map((link) => link.offline_id)));
|
|
7713
7301
|
store.dispatch(deleteForm(formId2));
|
|
7714
7302
|
try {
|
|
7715
7303
|
return await this.enqueueRequest({
|
|
@@ -7727,7 +7315,6 @@ var __publicField = (obj, key, value) => {
|
|
|
7727
7315
|
if (userFormSubmissions && userFormSubmissions.length > 0) {
|
|
7728
7316
|
store.dispatch(addFormSubmissions(userFormSubmissions));
|
|
7729
7317
|
}
|
|
7730
|
-
store.dispatch(setUserFormTeamLinks(userFormTeamLinks));
|
|
7731
7318
|
throw e;
|
|
7732
7319
|
}
|
|
7733
7320
|
}
|
|
@@ -8672,8 +8259,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8672
8259
|
}
|
|
8673
8260
|
delete(documentId) {
|
|
8674
8261
|
const { store } = this.client;
|
|
8675
|
-
const
|
|
8676
|
-
const documentsMapping = selectDocumentsMapping(state);
|
|
8262
|
+
const documentsMapping = selectDocumentsMapping(store.getState());
|
|
8677
8263
|
const documentToBeDeleted = documentsMapping[documentId];
|
|
8678
8264
|
if (!documentToBeDeleted) {
|
|
8679
8265
|
throw new Error(
|
|
@@ -8681,9 +8267,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8681
8267
|
);
|
|
8682
8268
|
}
|
|
8683
8269
|
const parentDocument = documentToBeDeleted.parent_document ? documentsMapping[documentToBeDeleted.parent_document] : void 0;
|
|
8684
|
-
const documentTeamLinks = selectDocumentTeamLinksOfDocument(documentId)(state) ?? [];
|
|
8685
8270
|
store.dispatch(removeDocuments([documentId]));
|
|
8686
|
-
store.dispatch(deleteDocumentTeamLinks(documentTeamLinks.map((link) => link.offline_id)));
|
|
8687
8271
|
const promise = this.enqueueRequest({
|
|
8688
8272
|
description: "Delete Document",
|
|
8689
8273
|
method: HttpMethod.DELETE,
|
|
@@ -8698,7 +8282,6 @@ var __publicField = (obj, key, value) => {
|
|
|
8698
8282
|
if (parentDocument) {
|
|
8699
8283
|
store.dispatch(updateDocuments([parentDocument]));
|
|
8700
8284
|
}
|
|
8701
|
-
store.dispatch(setDocumentTeamLinks(documentTeamLinks));
|
|
8702
8285
|
});
|
|
8703
8286
|
return promise;
|
|
8704
8287
|
}
|
|
@@ -8725,6 +8308,48 @@ var __publicField = (obj, key, value) => {
|
|
|
8725
8308
|
store.dispatch(addDocuments(await organizationDocumentsPromise));
|
|
8726
8309
|
}
|
|
8727
8310
|
}
|
|
8311
|
+
class DocumentAttachmentService extends BaseAttachmentService {
|
|
8312
|
+
constructor() {
|
|
8313
|
+
super(...arguments);
|
|
8314
|
+
__publicField(this, "attachmentModel", AttachmentModel.Document);
|
|
8315
|
+
}
|
|
8316
|
+
buildOfflineAttachment(data) {
|
|
8317
|
+
return offline({
|
|
8318
|
+
file: URL.createObjectURL(data.file),
|
|
8319
|
+
file_sha1: data.sha1,
|
|
8320
|
+
created_by: data.createdBy,
|
|
8321
|
+
file_name: data.file.name,
|
|
8322
|
+
file_type: data.file.type,
|
|
8323
|
+
submitted_at: data.submittedAt,
|
|
8324
|
+
description: data.description,
|
|
8325
|
+
document: data.modelId
|
|
8326
|
+
});
|
|
8327
|
+
}
|
|
8328
|
+
async attachFilesToDocument(files, documentId) {
|
|
8329
|
+
return this.attachFiles(files, documentId, this.buildOfflineAttachment.bind(this), {
|
|
8330
|
+
addAttachments: addDocumentAttachments,
|
|
8331
|
+
updateAttachments: updateDocumentAttachments,
|
|
8332
|
+
removeAttachments: removeDocumentAttachments
|
|
8333
|
+
});
|
|
8334
|
+
}
|
|
8335
|
+
deleteDocumentAttachment(attachmentId) {
|
|
8336
|
+
return this.deleteAttachment(
|
|
8337
|
+
attachmentId,
|
|
8338
|
+
{
|
|
8339
|
+
setAttachment: setDocumentAttachment,
|
|
8340
|
+
removeAttachment: removeDocumentAttachment
|
|
8341
|
+
},
|
|
8342
|
+
{
|
|
8343
|
+
selectAttachment: selectDocumentAttachment
|
|
8344
|
+
}
|
|
8345
|
+
);
|
|
8346
|
+
}
|
|
8347
|
+
async refreshStore() {
|
|
8348
|
+
return this.getAttachments({
|
|
8349
|
+
setAttachments: setDocumentAttachments
|
|
8350
|
+
});
|
|
8351
|
+
}
|
|
8352
|
+
}
|
|
8728
8353
|
class AgentService extends BaseApiService {
|
|
8729
8354
|
/**
|
|
8730
8355
|
* Prompt the agent with a message.
|
|
@@ -8820,13 +8445,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8820
8445
|
if (!team) {
|
|
8821
8446
|
throw new Error(`Expected team with id ${teamId} to exist`);
|
|
8822
8447
|
}
|
|
8823
|
-
const documentTeamLinks = selectDocumentTeamLinksOfTeam(team.offline_id)(state) ?? [];
|
|
8824
|
-
const issueTypeTeamLinks = selectIssueTypeTeamLinksOfTeam(team.offline_id)(state) ?? [];
|
|
8825
|
-
const userFormTeamLinks = selectUserFormLinksOfTeam(team.offline_id)(state) ?? [];
|
|
8826
8448
|
store.dispatch(deleteTeam(teamId));
|
|
8827
|
-
store.dispatch(deleteDocumentTeamLinks(documentTeamLinks.map((link) => link.offline_id)));
|
|
8828
|
-
store.dispatch(deleteIssueTypeTeamLinks(issueTypeTeamLinks.map((link) => link.offline_id)));
|
|
8829
|
-
store.dispatch(deleteUserFormTeamLinks(userFormTeamLinks.map((link) => link.offline_id)));
|
|
8830
8449
|
try {
|
|
8831
8450
|
return await this.enqueueRequest({
|
|
8832
8451
|
description: "Delete team",
|
|
@@ -8837,9 +8456,6 @@ var __publicField = (obj, key, value) => {
|
|
|
8837
8456
|
});
|
|
8838
8457
|
} catch (e) {
|
|
8839
8458
|
store.dispatch(setTeam(team));
|
|
8840
|
-
store.dispatch(setDocumentTeamLinks(documentTeamLinks));
|
|
8841
|
-
store.dispatch(setIssueTypeTeamLinks(issueTypeTeamLinks));
|
|
8842
|
-
store.dispatch(setUserFormTeamLinks(userFormTeamLinks));
|
|
8843
8459
|
throw e;
|
|
8844
8460
|
}
|
|
8845
8461
|
}
|
|
@@ -8902,68 +8518,12 @@ var __publicField = (obj, key, value) => {
|
|
|
8902
8518
|
store.dispatch(setTeams(result));
|
|
8903
8519
|
}
|
|
8904
8520
|
}
|
|
8905
|
-
class DocumentTeamLinkService extends BaseApiService {
|
|
8906
|
-
add(payload) {
|
|
8907
|
-
const { store } = this.client;
|
|
8908
|
-
const offlineDocumentTeamLink = offline({
|
|
8909
|
-
...payload,
|
|
8910
|
-
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
8911
|
-
});
|
|
8912
|
-
store.dispatch(addDocumentTeamLink(offlineDocumentTeamLink));
|
|
8913
|
-
const promise = this.enqueueRequest({
|
|
8914
|
-
method: HttpMethod.POST,
|
|
8915
|
-
url: `/organizations/teams/${payload.team}/link-document/`,
|
|
8916
|
-
payload: offlineDocumentTeamLink,
|
|
8917
|
-
blockers: [payload.team, payload.document],
|
|
8918
|
-
blocks: [offlineDocumentTeamLink.offline_id]
|
|
8919
|
-
});
|
|
8920
|
-
promise.then((createdDocumentLink) => {
|
|
8921
|
-
store.dispatch(setDocumentTeamLink(createdDocumentLink));
|
|
8922
|
-
}).catch(() => {
|
|
8923
|
-
store.dispatch(deleteDocumentTeamLink(offlineDocumentTeamLink.offline_id));
|
|
8924
|
-
});
|
|
8925
|
-
return [offlineDocumentTeamLink, promise];
|
|
8926
|
-
}
|
|
8927
|
-
delete(documentTeamLinkId) {
|
|
8928
|
-
const { store } = this.client;
|
|
8929
|
-
const documentTeamLink = store.getState().documentTeamLinkReducer.documentTeamLinks[documentTeamLinkId];
|
|
8930
|
-
if (!documentTeamLink) {
|
|
8931
|
-
throw new Error(`No document team link found for ${documentTeamLinkId}`);
|
|
8932
|
-
}
|
|
8933
|
-
store.dispatch(deleteDocumentTeamLink(documentTeamLinkId));
|
|
8934
|
-
const promise = this.enqueueRequest({
|
|
8935
|
-
method: HttpMethod.DELETE,
|
|
8936
|
-
url: `/organizations/teams/document-links/${documentTeamLinkId}/`,
|
|
8937
|
-
blockers: [documentTeamLinkId],
|
|
8938
|
-
blocks: [documentTeamLinkId]
|
|
8939
|
-
});
|
|
8940
|
-
promise.catch(() => {
|
|
8941
|
-
store.dispatch(setDocumentTeamLink(documentTeamLink));
|
|
8942
|
-
});
|
|
8943
|
-
return promise;
|
|
8944
|
-
}
|
|
8945
|
-
async refreshStore() {
|
|
8946
|
-
const { store } = this.client;
|
|
8947
|
-
const activeOrganizationId = store.getState().organizationReducer.activeOrganizationId;
|
|
8948
|
-
if (!activeOrganizationId) {
|
|
8949
|
-
throw new Error(`No active organization, got ${activeOrganizationId} for activeOrganizationId.`);
|
|
8950
|
-
}
|
|
8951
|
-
const result = await this.enqueueRequest({
|
|
8952
|
-
method: HttpMethod.GET,
|
|
8953
|
-
url: `/organizations/${activeOrganizationId}/teams/document-links/`,
|
|
8954
|
-
blockers: [],
|
|
8955
|
-
blocks: []
|
|
8956
|
-
});
|
|
8957
|
-
store.dispatch(setDocumentTeamLinks(result));
|
|
8958
|
-
}
|
|
8959
|
-
}
|
|
8960
8521
|
class OvermapSDK {
|
|
8961
8522
|
constructor(apiUrl, store) {
|
|
8962
8523
|
__publicField(this, "API_URL");
|
|
8963
8524
|
__publicField(this, "store");
|
|
8964
8525
|
__publicField(this, "agent", new AgentService(this));
|
|
8965
8526
|
__publicField(this, "files", new FileService(this));
|
|
8966
|
-
__publicField(this, "attachments", new AttachmentService(this));
|
|
8967
8527
|
__publicField(this, "auth", new AuthService(this));
|
|
8968
8528
|
__publicField(this, "categories", new CategoryService(this));
|
|
8969
8529
|
__publicField(this, "projectAccesses", new ProjectAccessService(this));
|
|
@@ -8973,22 +8533,26 @@ var __publicField = (obj, key, value) => {
|
|
|
8973
8533
|
__publicField(this, "issueTypes", new IssueTypeService(this));
|
|
8974
8534
|
__publicField(this, "issueComments", new IssueCommentService(this));
|
|
8975
8535
|
__publicField(this, "issueUpdates", new IssueUpdateService(this));
|
|
8536
|
+
__publicField(this, "issueAttachments", new IssueAttachmentService(this));
|
|
8976
8537
|
__publicField(this, "workspaces", new WorkspaceService(this));
|
|
8977
8538
|
__publicField(this, "main", new MainService(this));
|
|
8978
8539
|
__publicField(this, "components", new ComponentService(this));
|
|
8540
|
+
__publicField(this, "componentAttachments", new ComponentAttachmentService(this));
|
|
8979
8541
|
__publicField(this, "componentTypes", new ComponentTypeService(this));
|
|
8542
|
+
__publicField(this, "componentTypeAttachments", new ComponentTypeAttachmentService(this));
|
|
8980
8543
|
__publicField(this, "componentStages", new ComponentStageService(this));
|
|
8981
8544
|
__publicField(this, "componentStageCompletions", new ComponentStageCompletionService(this));
|
|
8982
8545
|
__publicField(this, "userForms", new UserFormService(this));
|
|
8983
8546
|
__publicField(this, "userFormSubmissions", new UserFormSubmissionService(this));
|
|
8984
8547
|
__publicField(this, "projects", new ProjectService(this));
|
|
8985
8548
|
__publicField(this, "projectFiles", new ProjectFileService(this));
|
|
8549
|
+
__publicField(this, "projectAttachments", new ProjectAttachmentService(this));
|
|
8986
8550
|
__publicField(this, "emailVerification", new EmailVerificationService(this));
|
|
8987
8551
|
__publicField(this, "emailDomains", new EmailDomainsService(this));
|
|
8988
8552
|
__publicField(this, "licenses", new LicenseService(this));
|
|
8989
8553
|
__publicField(this, "documents", new DocumentService(this));
|
|
8990
8554
|
__publicField(this, "teams", new TeamService(this));
|
|
8991
|
-
__publicField(this, "
|
|
8555
|
+
__publicField(this, "documentAttachments", new DocumentAttachmentService(this));
|
|
8992
8556
|
this.API_URL = apiUrl;
|
|
8993
8557
|
this.store = store;
|
|
8994
8558
|
}
|
|
@@ -9170,406 +8734,152 @@ var __publicField = (obj, key, value) => {
|
|
|
9170
8734
|
saveAs(blob, name);
|
|
9171
8735
|
},
|
|
9172
8736
|
[name, file]
|
|
9173
|
-
);
|
|
9174
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9175
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9176
|
-
"button",
|
|
9177
|
-
{
|
|
9178
|
-
className: styles$c.FullScreenImageContainer,
|
|
9179
|
-
type: "button",
|
|
9180
|
-
onClick: () => {
|
|
9181
|
-
setShowPreview(false);
|
|
9182
|
-
},
|
|
9183
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9184
|
-
"img",
|
|
9185
|
-
{
|
|
9186
|
-
className: styles$c.FullScreenImage,
|
|
9187
|
-
src: url,
|
|
9188
|
-
alt: name,
|
|
9189
|
-
onClick: (e) => {
|
|
9190
|
-
e.stopPropagation();
|
|
9191
|
-
}
|
|
9192
|
-
}
|
|
9193
|
-
)
|
|
9194
|
-
}
|
|
9195
|
-
),
|
|
9196
|
-
/* @__PURE__ */ jsxRuntime.jsxs(blocks.Flex, { className: styles$c.TopBarContainer, align: "center", children: [
|
|
9197
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9198
|
-
blocks.IconButton,
|
|
9199
|
-
{
|
|
9200
|
-
className: styles$c.longIconButton,
|
|
9201
|
-
variant: "soft",
|
|
9202
|
-
"aria-label": "Exit preview",
|
|
9203
|
-
onClick: () => {
|
|
9204
|
-
setShowPreview(false);
|
|
9205
|
-
},
|
|
9206
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiArrowLeftLine" })
|
|
9207
|
-
}
|
|
9208
|
-
),
|
|
9209
|
-
/* @__PURE__ */ jsxRuntime.jsx(blocks.Text, { className: styles$c.fileName, children: name }),
|
|
9210
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9211
|
-
blocks.IconButton,
|
|
9212
|
-
{
|
|
9213
|
-
className: styles$c.longIconButton,
|
|
9214
|
-
variant: "soft",
|
|
9215
|
-
"aria-label": `Download ${name}`,
|
|
9216
|
-
onClick: handleDownload,
|
|
9217
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiDownload2Line" })
|
|
9218
|
-
}
|
|
9219
|
-
)
|
|
9220
|
-
] })
|
|
9221
|
-
] });
|
|
9222
|
-
});
|
|
9223
|
-
FullScreenImagePreview.displayName = "FullScreenImagePreview";
|
|
9224
|
-
const InputWithLabel = (props) => {
|
|
9225
|
-
const { label, children, size, severity, inputId, labelId, image, flexProps } = props;
|
|
9226
|
-
const [resolvedImage, setResolvedImage] = React.useState(void 0);
|
|
9227
|
-
const [showImagePreview, setShowImagePreview] = React.useState(false);
|
|
9228
|
-
React.useEffect(() => {
|
|
9229
|
-
if (image instanceof Promise) {
|
|
9230
|
-
image.then(setResolvedImage).catch(console.error);
|
|
9231
|
-
} else {
|
|
9232
|
-
setResolvedImage(image);
|
|
9233
|
-
}
|
|
9234
|
-
}, [image]);
|
|
9235
|
-
const resolvedImageURL = resolvedImage ? URL.createObjectURL(resolvedImage) : void 0;
|
|
9236
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(blocks.Flex, { direction: "column", gap: "2", children: [
|
|
9237
|
-
resolvedImage && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9238
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9239
|
-
"img",
|
|
9240
|
-
{
|
|
9241
|
-
className: styles$c.previewImage,
|
|
9242
|
-
src: resolvedImageURL,
|
|
9243
|
-
alt: resolvedImage.name,
|
|
9244
|
-
onClick: () => {
|
|
9245
|
-
setShowImagePreview(true);
|
|
9246
|
-
}
|
|
9247
|
-
}
|
|
9248
|
-
),
|
|
9249
|
-
showImagePreview && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9250
|
-
FullScreenImagePreview,
|
|
9251
|
-
{
|
|
9252
|
-
file: resolvedImage,
|
|
9253
|
-
url: resolvedImageURL,
|
|
9254
|
-
name: resolvedImage.name,
|
|
9255
|
-
setShowPreview: setShowImagePreview
|
|
9256
|
-
}
|
|
9257
|
-
)
|
|
9258
|
-
] }),
|
|
9259
|
-
/* @__PURE__ */ jsxRuntime.jsx(blocks.Flex, { direction: "column", gap: "1", asChild: true, ...flexProps, children: /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: inputId, children: [
|
|
9260
|
-
/* @__PURE__ */ jsxRuntime.jsx(blocks.Text, { size, severity, id: labelId, children: label }),
|
|
9261
|
-
children
|
|
9262
|
-
] }) })
|
|
9263
|
-
] });
|
|
9264
|
-
};
|
|
9265
|
-
const InputWithHelpText = (props) => {
|
|
9266
|
-
const { helpText, children, severity } = props;
|
|
9267
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(blocks.Flex, { direction: "column", gap: "1", children: [
|
|
9268
|
-
children,
|
|
9269
|
-
/* @__PURE__ */ jsxRuntime.jsx(blocks.Flex, { direction: "column", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.Text, { size: "1", severity, className: styles$c.description, children: helpText }) })
|
|
9270
|
-
] });
|
|
9271
|
-
};
|
|
9272
|
-
const InputWithLabelAndHelpText = (props) => {
|
|
9273
|
-
const { children, ...restProps } = props;
|
|
9274
|
-
return /* @__PURE__ */ jsxRuntime.jsx(InputWithHelpText, { ...restProps, children });
|
|
9275
|
-
};
|
|
9276
|
-
const useFormikInput = (props) => {
|
|
9277
|
-
const { id, field, formId: formId2, size, showInputOnly, ...rest } = props;
|
|
9278
|
-
const [fieldProps, meta, helpers] = formik.useField(field.getId());
|
|
9279
|
-
const { touched } = meta;
|
|
9280
|
-
const helpText = meta.error ?? field.description;
|
|
9281
|
-
const severity = meta.error ? "danger" : void 0;
|
|
9282
|
-
const inputId = id ?? `${formId2}-${field.getId()}-input`;
|
|
9283
|
-
const labelId = `${inputId}-label`;
|
|
9284
|
-
const label = field.required ? `${field.label} *` : field.label;
|
|
9285
|
-
const fieldPropsWithValidation = React.useMemo(() => {
|
|
9286
|
-
const handleChange = (e) => {
|
|
9287
|
-
const value = field.getValueFromChangeEvent(e);
|
|
9288
|
-
void helpers.setValue(value, false).then();
|
|
9289
|
-
if (touched || !field.onlyValidateAfterTouched) {
|
|
9290
|
-
helpers.setError(field.getError(value));
|
|
9291
|
-
}
|
|
9292
|
-
};
|
|
9293
|
-
const handleBlur = (e) => {
|
|
9294
|
-
void helpers.setTouched(true, false).then();
|
|
9295
|
-
helpers.setError(field.getError(field.getValueFromChangeEvent(e)));
|
|
9296
|
-
};
|
|
9297
|
-
return {
|
|
9298
|
-
...fieldProps,
|
|
9299
|
-
onChange: handleChange,
|
|
9300
|
-
onBlur: handleBlur
|
|
9301
|
-
};
|
|
9302
|
-
}, [field, fieldProps, helpers, touched]);
|
|
9303
|
-
return [
|
|
9304
|
-
{
|
|
9305
|
-
helpText,
|
|
9306
|
-
size,
|
|
9307
|
-
severity,
|
|
9308
|
-
inputId,
|
|
9309
|
-
labelId,
|
|
9310
|
-
label,
|
|
9311
|
-
showInputOnly,
|
|
9312
|
-
fieldProps: fieldPropsWithValidation,
|
|
9313
|
-
helpers,
|
|
9314
|
-
field
|
|
9315
|
-
},
|
|
9316
|
-
{ ...rest, "aria-labelledby": labelId }
|
|
9317
|
-
];
|
|
9318
|
-
};
|
|
9319
|
-
const truthyValues = [true, "true"];
|
|
9320
|
-
const BooleanInput = React.memo((props) => {
|
|
9321
|
-
const [{ inputId, labelId, size, severity, showInputOnly, field, fieldProps }, rest] = useFormikInput(props);
|
|
9322
|
-
let [{ helpText, label }] = useFormikInput(props);
|
|
9323
|
-
helpText = showInputOnly ? null : helpText;
|
|
9324
|
-
label = showInputOnly ? "" : label;
|
|
9325
|
-
const color = blocks.useSeverityColor(severity);
|
|
9326
|
-
const value = truthyValues.includes(fieldProps.value);
|
|
9327
|
-
return /* @__PURE__ */ jsxRuntime.jsx(InputWithLabelAndHelpText, { helpText, severity, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9328
|
-
InputWithLabel,
|
|
9329
|
-
{
|
|
9330
|
-
size,
|
|
9331
|
-
severity,
|
|
9332
|
-
inputId,
|
|
9333
|
-
labelId,
|
|
9334
|
-
label,
|
|
9335
|
-
image: showInputOnly ? void 0 : field.image,
|
|
9336
|
-
flexProps: { direction: "row-reverse", justify: "end", align: "center", gap: "2" },
|
|
9337
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9338
|
-
blocks.Checkbox,
|
|
9339
|
-
{
|
|
9340
|
-
...rest,
|
|
9341
|
-
...fieldProps,
|
|
9342
|
-
id: inputId,
|
|
9343
|
-
color,
|
|
9344
|
-
value: value.toString(),
|
|
9345
|
-
checked: value,
|
|
9346
|
-
onCheckedChange: fieldProps.onChange,
|
|
9347
|
-
onChange: void 0,
|
|
9348
|
-
onBlur: void 0
|
|
9349
|
-
}
|
|
9350
|
-
)
|
|
9351
|
-
}
|
|
9352
|
-
) });
|
|
9353
|
-
});
|
|
9354
|
-
BooleanInput.displayName = "BooleanInput";
|
|
9355
|
-
var DefaultContext = {
|
|
9356
|
-
color: void 0,
|
|
9357
|
-
size: void 0,
|
|
9358
|
-
className: void 0,
|
|
9359
|
-
style: void 0,
|
|
9360
|
-
attr: void 0
|
|
9361
|
-
};
|
|
9362
|
-
var IconContext = React.createContext && /* @__PURE__ */ React.createContext(DefaultContext);
|
|
9363
|
-
var _excluded = ["attr", "size", "title"];
|
|
9364
|
-
function _objectWithoutProperties(source, excluded) {
|
|
9365
|
-
if (source == null)
|
|
9366
|
-
return {};
|
|
9367
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
9368
|
-
var key, i;
|
|
9369
|
-
if (Object.getOwnPropertySymbols) {
|
|
9370
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
9371
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
9372
|
-
key = sourceSymbolKeys[i];
|
|
9373
|
-
if (excluded.indexOf(key) >= 0)
|
|
9374
|
-
continue;
|
|
9375
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key))
|
|
9376
|
-
continue;
|
|
9377
|
-
target[key] = source[key];
|
|
9378
|
-
}
|
|
9379
|
-
}
|
|
9380
|
-
return target;
|
|
9381
|
-
}
|
|
9382
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
9383
|
-
if (source == null)
|
|
9384
|
-
return {};
|
|
9385
|
-
var target = {};
|
|
9386
|
-
for (var key in source) {
|
|
9387
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
9388
|
-
if (excluded.indexOf(key) >= 0)
|
|
9389
|
-
continue;
|
|
9390
|
-
target[key] = source[key];
|
|
9391
|
-
}
|
|
9392
|
-
}
|
|
9393
|
-
return target;
|
|
9394
|
-
}
|
|
9395
|
-
function _extends$1() {
|
|
9396
|
-
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
9397
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
9398
|
-
var source = arguments[i];
|
|
9399
|
-
for (var key in source) {
|
|
9400
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
9401
|
-
target[key] = source[key];
|
|
9402
|
-
}
|
|
9403
|
-
}
|
|
9404
|
-
}
|
|
9405
|
-
return target;
|
|
9406
|
-
};
|
|
9407
|
-
return _extends$1.apply(this, arguments);
|
|
9408
|
-
}
|
|
9409
|
-
function ownKeys(e, r) {
|
|
9410
|
-
var t = Object.keys(e);
|
|
9411
|
-
if (Object.getOwnPropertySymbols) {
|
|
9412
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
9413
|
-
r && (o = o.filter(function(r2) {
|
|
9414
|
-
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
9415
|
-
})), t.push.apply(t, o);
|
|
9416
|
-
}
|
|
9417
|
-
return t;
|
|
9418
|
-
}
|
|
9419
|
-
function _objectSpread(e) {
|
|
9420
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
9421
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
9422
|
-
r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
|
|
9423
|
-
_defineProperty(e, r2, t[r2]);
|
|
9424
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
|
|
9425
|
-
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
9426
|
-
});
|
|
9427
|
-
}
|
|
9428
|
-
return e;
|
|
9429
|
-
}
|
|
9430
|
-
function _defineProperty(obj, key, value) {
|
|
9431
|
-
key = _toPropertyKey(key);
|
|
9432
|
-
if (key in obj) {
|
|
9433
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
9434
|
-
} else {
|
|
9435
|
-
obj[key] = value;
|
|
9436
|
-
}
|
|
9437
|
-
return obj;
|
|
9438
|
-
}
|
|
9439
|
-
function _toPropertyKey(t) {
|
|
9440
|
-
var i = _toPrimitive(t, "string");
|
|
9441
|
-
return "symbol" == typeof i ? i : i + "";
|
|
9442
|
-
}
|
|
9443
|
-
function _toPrimitive(t, r) {
|
|
9444
|
-
if ("object" != typeof t || !t)
|
|
9445
|
-
return t;
|
|
9446
|
-
var e = t[Symbol.toPrimitive];
|
|
9447
|
-
if (void 0 !== e) {
|
|
9448
|
-
var i = e.call(t, r || "default");
|
|
9449
|
-
if ("object" != typeof i)
|
|
9450
|
-
return i;
|
|
9451
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
9452
|
-
}
|
|
9453
|
-
return ("string" === r ? String : Number)(t);
|
|
9454
|
-
}
|
|
9455
|
-
function Tree2Element(tree) {
|
|
9456
|
-
return tree && tree.map((node, i) => /* @__PURE__ */ React.createElement(node.tag, _objectSpread({
|
|
9457
|
-
key: i
|
|
9458
|
-
}, node.attr), Tree2Element(node.child)));
|
|
9459
|
-
}
|
|
9460
|
-
function GenIcon(data) {
|
|
9461
|
-
return (props) => /* @__PURE__ */ React.createElement(IconBase, _extends$1({
|
|
9462
|
-
attr: _objectSpread({}, data.attr)
|
|
9463
|
-
}, props), Tree2Element(data.child));
|
|
9464
|
-
}
|
|
9465
|
-
function IconBase(props) {
|
|
9466
|
-
var elem = (conf) => {
|
|
9467
|
-
var {
|
|
9468
|
-
attr,
|
|
9469
|
-
size,
|
|
9470
|
-
title: title2
|
|
9471
|
-
} = props, svgProps = _objectWithoutProperties(props, _excluded);
|
|
9472
|
-
var computedSize = size || conf.size || "1em";
|
|
9473
|
-
var className;
|
|
9474
|
-
if (conf.className)
|
|
9475
|
-
className = conf.className;
|
|
9476
|
-
if (props.className)
|
|
9477
|
-
className = (className ? className + " " : "") + props.className;
|
|
9478
|
-
return /* @__PURE__ */ React.createElement("svg", _extends$1({
|
|
9479
|
-
stroke: "currentColor",
|
|
9480
|
-
fill: "currentColor",
|
|
9481
|
-
strokeWidth: "0"
|
|
9482
|
-
}, conf.attr, attr, svgProps, {
|
|
9483
|
-
className,
|
|
9484
|
-
style: _objectSpread(_objectSpread({
|
|
9485
|
-
color: props.color || conf.color
|
|
9486
|
-
}, conf.style), props.style),
|
|
9487
|
-
height: computedSize,
|
|
9488
|
-
width: computedSize,
|
|
9489
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
9490
|
-
}), title2 && /* @__PURE__ */ React.createElement("title", null, title2), props.children);
|
|
9491
|
-
};
|
|
9492
|
-
return IconContext !== void 0 ? /* @__PURE__ */ React.createElement(IconContext.Consumer, null, (conf) => elem(conf)) : elem(DefaultContext);
|
|
9493
|
-
}
|
|
9494
|
-
function RiArrowDownLine(props) {
|
|
9495
|
-
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);
|
|
9496
|
-
}
|
|
9497
|
-
function RiArrowUpLine(props) {
|
|
9498
|
-
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);
|
|
9499
|
-
}
|
|
9500
|
-
function RiCalendarLine(props) {
|
|
9501
|
-
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);
|
|
9502
|
-
}
|
|
9503
|
-
function RiQrCodeLine(props) {
|
|
9504
|
-
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);
|
|
9505
|
-
}
|
|
9506
|
-
function RiFileCopyLine(props) {
|
|
9507
|
-
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);
|
|
9508
|
-
}
|
|
9509
|
-
function RiAlignJustify(props) {
|
|
9510
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M3 4H21V6H3V4ZM3 19H21V21H3V19ZM3 14H21V16H3V14ZM3 9H21V11H3V9Z" }, "child": [] }] })(props);
|
|
9511
|
-
}
|
|
9512
|
-
function RiHashtag(props) {
|
|
9513
|
-
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);
|
|
9514
|
-
}
|
|
9515
|
-
function RiInputField(props) {
|
|
9516
|
-
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);
|
|
9517
|
-
}
|
|
9518
|
-
function RiListCheck(props) {
|
|
9519
|
-
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);
|
|
9520
|
-
}
|
|
9521
|
-
function RiImageLine(props) {
|
|
9522
|
-
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);
|
|
9523
|
-
}
|
|
9524
|
-
function RiCheckboxCircleLine(props) {
|
|
9525
|
-
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);
|
|
9526
|
-
}
|
|
9527
|
-
function RiCheckboxLine(props) {
|
|
9528
|
-
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);
|
|
9529
|
-
}
|
|
9530
|
-
function RiDeleteBin2Line(props) {
|
|
9531
|
-
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);
|
|
9532
|
-
}
|
|
9533
|
-
function RiMenuFoldLine(props) {
|
|
9534
|
-
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);
|
|
9535
|
-
}
|
|
9536
|
-
function RiUpload2Line(props) {
|
|
9537
|
-
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);
|
|
9538
|
-
}
|
|
9539
|
-
const emptyBooleanField = {
|
|
9540
|
-
...emptyBaseField,
|
|
9541
|
-
type: "boolean"
|
|
8737
|
+
);
|
|
8738
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8739
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8740
|
+
"button",
|
|
8741
|
+
{
|
|
8742
|
+
className: styles$c.FullScreenImageContainer,
|
|
8743
|
+
type: "button",
|
|
8744
|
+
onClick: () => {
|
|
8745
|
+
setShowPreview(false);
|
|
8746
|
+
},
|
|
8747
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8748
|
+
"img",
|
|
8749
|
+
{
|
|
8750
|
+
className: styles$c.FullScreenImage,
|
|
8751
|
+
src: url,
|
|
8752
|
+
alt: name,
|
|
8753
|
+
onClick: (e) => {
|
|
8754
|
+
e.stopPropagation();
|
|
8755
|
+
}
|
|
8756
|
+
}
|
|
8757
|
+
)
|
|
8758
|
+
}
|
|
8759
|
+
),
|
|
8760
|
+
/* @__PURE__ */ jsxRuntime.jsxs(blocks.Flex, { className: styles$c.TopBarContainer, align: "center", children: [
|
|
8761
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8762
|
+
blocks.IconButton,
|
|
8763
|
+
{
|
|
8764
|
+
className: styles$c.longIconButton,
|
|
8765
|
+
variant: "soft",
|
|
8766
|
+
"aria-label": "Exit preview",
|
|
8767
|
+
onClick: () => {
|
|
8768
|
+
setShowPreview(false);
|
|
8769
|
+
},
|
|
8770
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiArrowLeftLine" })
|
|
8771
|
+
}
|
|
8772
|
+
),
|
|
8773
|
+
/* @__PURE__ */ jsxRuntime.jsx(blocks.Text, { className: styles$c.fileName, children: name }),
|
|
8774
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8775
|
+
blocks.IconButton,
|
|
8776
|
+
{
|
|
8777
|
+
className: styles$c.longIconButton,
|
|
8778
|
+
variant: "soft",
|
|
8779
|
+
"aria-label": `Download ${name}`,
|
|
8780
|
+
onClick: handleDownload,
|
|
8781
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiDownload2Line" })
|
|
8782
|
+
}
|
|
8783
|
+
)
|
|
8784
|
+
] })
|
|
8785
|
+
] });
|
|
8786
|
+
});
|
|
8787
|
+
FullScreenImagePreview.displayName = "FullScreenImagePreview";
|
|
8788
|
+
const InputWithLabel = (props) => {
|
|
8789
|
+
const { label, children, size, severity, inputId, labelId, image, flexProps } = props;
|
|
8790
|
+
const [resolvedImage, setResolvedImage] = React.useState(void 0);
|
|
8791
|
+
const [showImagePreview, setShowImagePreview] = React.useState(false);
|
|
8792
|
+
React.useEffect(() => {
|
|
8793
|
+
if (image instanceof Promise) {
|
|
8794
|
+
image.then(setResolvedImage).catch(console.error);
|
|
8795
|
+
} else {
|
|
8796
|
+
setResolvedImage(image);
|
|
8797
|
+
}
|
|
8798
|
+
}, [image]);
|
|
8799
|
+
const resolvedImageURL = resolvedImage ? URL.createObjectURL(resolvedImage) : void 0;
|
|
8800
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(blocks.Flex, { direction: "column", gap: "2", children: [
|
|
8801
|
+
resolvedImage && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8802
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8803
|
+
"img",
|
|
8804
|
+
{
|
|
8805
|
+
className: styles$c.previewImage,
|
|
8806
|
+
src: resolvedImageURL,
|
|
8807
|
+
alt: resolvedImage.name,
|
|
8808
|
+
onClick: () => {
|
|
8809
|
+
setShowImagePreview(true);
|
|
8810
|
+
}
|
|
8811
|
+
}
|
|
8812
|
+
),
|
|
8813
|
+
showImagePreview && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8814
|
+
FullScreenImagePreview,
|
|
8815
|
+
{
|
|
8816
|
+
file: resolvedImage,
|
|
8817
|
+
url: resolvedImageURL,
|
|
8818
|
+
name: resolvedImage.name,
|
|
8819
|
+
setShowPreview: setShowImagePreview
|
|
8820
|
+
}
|
|
8821
|
+
)
|
|
8822
|
+
] }),
|
|
8823
|
+
/* @__PURE__ */ jsxRuntime.jsx(blocks.Flex, { direction: "column", gap: "1", asChild: true, ...flexProps, children: /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: inputId, children: [
|
|
8824
|
+
/* @__PURE__ */ jsxRuntime.jsx(blocks.Text, { size, severity, id: labelId, children: label }),
|
|
8825
|
+
children
|
|
8826
|
+
] }) })
|
|
8827
|
+
] });
|
|
9542
8828
|
};
|
|
9543
|
-
const
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
|
|
9548
|
-
|
|
9549
|
-
|
|
9550
|
-
|
|
9551
|
-
}
|
|
9552
|
-
|
|
9553
|
-
|
|
9554
|
-
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
|
|
9561
|
-
|
|
9562
|
-
|
|
9563
|
-
|
|
9564
|
-
|
|
9565
|
-
|
|
9566
|
-
|
|
9567
|
-
|
|
8829
|
+
const InputWithHelpText = (props) => {
|
|
8830
|
+
const { helpText, children, severity } = props;
|
|
8831
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(blocks.Flex, { direction: "column", gap: "1", children: [
|
|
8832
|
+
children,
|
|
8833
|
+
/* @__PURE__ */ jsxRuntime.jsx(blocks.Flex, { direction: "column", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.Text, { size: "1", severity, className: styles$c.description, children: helpText }) })
|
|
8834
|
+
] });
|
|
8835
|
+
};
|
|
8836
|
+
const InputWithLabelAndHelpText = (props) => {
|
|
8837
|
+
const { children, ...restProps } = props;
|
|
8838
|
+
return /* @__PURE__ */ jsxRuntime.jsx(InputWithHelpText, { ...restProps, children });
|
|
8839
|
+
};
|
|
8840
|
+
const useFormikInput = (props) => {
|
|
8841
|
+
const { id, field, formId: formId2, size, showInputOnly, ...rest } = props;
|
|
8842
|
+
const [fieldProps, meta, helpers] = formik.useField(field.getId());
|
|
8843
|
+
const { touched } = meta;
|
|
8844
|
+
const helpText = meta.error ?? field.description;
|
|
8845
|
+
const severity = meta.error ? "danger" : void 0;
|
|
8846
|
+
const inputId = id ?? `${formId2}-${field.getId()}-input`;
|
|
8847
|
+
const labelId = `${inputId}-label`;
|
|
8848
|
+
const label = field.required ? `${field.label} *` : field.label;
|
|
8849
|
+
const fieldPropsWithValidation = React.useMemo(() => {
|
|
8850
|
+
const handleChange = (e) => {
|
|
8851
|
+
const value = field.getValueFromChangeEvent(e);
|
|
8852
|
+
void helpers.setValue(value, false).then();
|
|
8853
|
+
if (touched || !field.onlyValidateAfterTouched) {
|
|
8854
|
+
helpers.setError(field.getError(value));
|
|
8855
|
+
}
|
|
8856
|
+
};
|
|
8857
|
+
const handleBlur = (e) => {
|
|
8858
|
+
void helpers.setTouched(true, false).then();
|
|
8859
|
+
helpers.setError(field.getError(field.getValueFromChangeEvent(e)));
|
|
8860
|
+
};
|
|
8861
|
+
return {
|
|
8862
|
+
...fieldProps,
|
|
8863
|
+
onChange: handleChange,
|
|
8864
|
+
onBlur: handleBlur
|
|
8865
|
+
};
|
|
8866
|
+
}, [field, fieldProps, helpers, touched]);
|
|
8867
|
+
return [
|
|
8868
|
+
{
|
|
8869
|
+
helpText,
|
|
8870
|
+
size,
|
|
8871
|
+
severity,
|
|
8872
|
+
inputId,
|
|
8873
|
+
labelId,
|
|
8874
|
+
label,
|
|
8875
|
+
showInputOnly,
|
|
8876
|
+
fieldProps: fieldPropsWithValidation,
|
|
8877
|
+
helpers,
|
|
8878
|
+
field
|
|
8879
|
+
},
|
|
8880
|
+
{ ...rest, "aria-labelledby": labelId }
|
|
8881
|
+
];
|
|
9568
8882
|
};
|
|
9569
|
-
__publicField(_BooleanField, "fieldTypeName", "Checkbox");
|
|
9570
|
-
__publicField(_BooleanField, "fieldTypeDescription", "Perfect for both optional and required yes/no questions.");
|
|
9571
|
-
__publicField(_BooleanField, "Icon", RiCheckboxCircleLine);
|
|
9572
|
-
let BooleanField = _BooleanField;
|
|
9573
8883
|
function getDefaultExportFromCjs(x) {
|
|
9574
8884
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
9575
8885
|
}
|
|
@@ -9622,8 +8932,8 @@ var __publicField = (obj, key, value) => {
|
|
|
9622
8932
|
})(classnames);
|
|
9623
8933
|
var classnamesExports = classnames.exports;
|
|
9624
8934
|
const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
|
|
9625
|
-
function _extends() {
|
|
9626
|
-
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
8935
|
+
function _extends$1() {
|
|
8936
|
+
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
9627
8937
|
for (var i = 1; i < arguments.length; i++) {
|
|
9628
8938
|
var source = arguments[i];
|
|
9629
8939
|
for (var key in source) {
|
|
@@ -9634,7 +8944,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9634
8944
|
}
|
|
9635
8945
|
return target;
|
|
9636
8946
|
};
|
|
9637
|
-
return _extends.apply(this, arguments);
|
|
8947
|
+
return _extends$1.apply(this, arguments);
|
|
9638
8948
|
}
|
|
9639
8949
|
function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
9640
8950
|
return function handleEvent(event) {
|
|
@@ -9765,11 +9075,11 @@ var __publicField = (obj, key, value) => {
|
|
|
9765
9075
|
} else
|
|
9766
9076
|
return child;
|
|
9767
9077
|
});
|
|
9768
|
-
return /* @__PURE__ */ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
9078
|
+
return /* @__PURE__ */ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends$1({}, slotProps, {
|
|
9769
9079
|
ref: forwardedRef
|
|
9770
9080
|
}), /* @__PURE__ */ React.isValidElement(newElement) ? /* @__PURE__ */ React.cloneElement(newElement, void 0, newChildren) : null);
|
|
9771
9081
|
}
|
|
9772
|
-
return /* @__PURE__ */ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
9082
|
+
return /* @__PURE__ */ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends$1({}, slotProps, {
|
|
9773
9083
|
ref: forwardedRef
|
|
9774
9084
|
}), children);
|
|
9775
9085
|
});
|
|
@@ -9847,7 +9157,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9847
9157
|
React.useEffect(() => {
|
|
9848
9158
|
window[Symbol.for("radix-ui")] = true;
|
|
9849
9159
|
}, []);
|
|
9850
|
-
return /* @__PURE__ */ React.createElement(Comp, _extends({}, primitiveProps, {
|
|
9160
|
+
return /* @__PURE__ */ React.createElement(Comp, _extends$1({}, primitiveProps, {
|
|
9851
9161
|
ref: forwardedRef
|
|
9852
9162
|
}));
|
|
9853
9163
|
});
|
|
@@ -10406,9 +9716,9 @@ var __publicField = (obj, key, value) => {
|
|
|
10406
9716
|
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)) });
|
|
10407
9717
|
});
|
|
10408
9718
|
Inset.displayName = "Inset";
|
|
10409
|
-
const sizes$
|
|
9719
|
+
const sizes$9 = ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
10410
9720
|
const headingPropDefs = {
|
|
10411
|
-
size: { type: "enum", values: sizes$
|
|
9721
|
+
size: { type: "enum", values: sizes$9, default: "6", responsive: true },
|
|
10412
9722
|
weight: { ...weightProp, default: "bold" },
|
|
10413
9723
|
align: alignProp,
|
|
10414
9724
|
trim: trimProp,
|
|
@@ -10421,9 +9731,9 @@ var __publicField = (obj, key, value) => {
|
|
|
10421
9731
|
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));
|
|
10422
9732
|
});
|
|
10423
9733
|
Heading.displayName = "Heading";
|
|
10424
|
-
const sizes$
|
|
9734
|
+
const sizes$8 = ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
10425
9735
|
const textPropDefs = {
|
|
10426
|
-
size: { type: "enum", values: sizes$
|
|
9736
|
+
size: { type: "enum", values: sizes$8, default: void 0, responsive: true },
|
|
10427
9737
|
weight: weightProp,
|
|
10428
9738
|
align: alignProp,
|
|
10429
9739
|
trim: trimProp,
|
|
@@ -10436,11 +9746,11 @@ var __publicField = (obj, key, value) => {
|
|
|
10436
9746
|
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));
|
|
10437
9747
|
});
|
|
10438
9748
|
Text.displayName = "Text";
|
|
10439
|
-
const sizes$
|
|
10440
|
-
const variants$
|
|
9749
|
+
const sizes$7 = ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
9750
|
+
const variants$5 = ["solid", "soft", "outline", "ghost"];
|
|
10441
9751
|
const codePropDefs = {
|
|
10442
|
-
size: { type: "enum", values: sizes$
|
|
10443
|
-
variant: { type: "enum", values: variants$
|
|
9752
|
+
size: { type: "enum", values: sizes$7, default: void 0, responsive: true },
|
|
9753
|
+
variant: { type: "enum", values: variants$5, default: "soft" },
|
|
10444
9754
|
weight: weightProp,
|
|
10445
9755
|
color: colorProp,
|
|
10446
9756
|
highContrast: highContrastProp
|
|
@@ -10470,6 +9780,202 @@ var __publicField = (obj, key, value) => {
|
|
|
10470
9780
|
value
|
|
10471
9781
|
]);
|
|
10472
9782
|
}
|
|
9783
|
+
const $e698a72e93240346$var$CHECKBOX_NAME = "Checkbox";
|
|
9784
|
+
const [$e698a72e93240346$var$createCheckboxContext, $e698a72e93240346$export$b566c4ff5488ea01] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($e698a72e93240346$var$CHECKBOX_NAME);
|
|
9785
|
+
const [$e698a72e93240346$var$CheckboxProvider, $e698a72e93240346$var$useCheckboxContext] = $e698a72e93240346$var$createCheckboxContext($e698a72e93240346$var$CHECKBOX_NAME);
|
|
9786
|
+
const $e698a72e93240346$export$48513f6b9f8ce62d = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
9787
|
+
const { __scopeCheckbox, name, checked: checkedProp, defaultChecked, required, disabled, value = "on", onCheckedChange, ...checkboxProps } = props;
|
|
9788
|
+
const [button, setButton] = React.useState(null);
|
|
9789
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(
|
|
9790
|
+
forwardedRef,
|
|
9791
|
+
(node) => setButton(node)
|
|
9792
|
+
);
|
|
9793
|
+
const hasConsumerStoppedPropagationRef = React.useRef(false);
|
|
9794
|
+
const isFormControl = button ? Boolean(button.closest("form")) : true;
|
|
9795
|
+
const [checked = false, setChecked] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
9796
|
+
prop: checkedProp,
|
|
9797
|
+
defaultProp: defaultChecked,
|
|
9798
|
+
onChange: onCheckedChange
|
|
9799
|
+
});
|
|
9800
|
+
const initialCheckedStateRef = React.useRef(checked);
|
|
9801
|
+
React.useEffect(() => {
|
|
9802
|
+
const form = button === null || button === void 0 ? void 0 : button.form;
|
|
9803
|
+
if (form) {
|
|
9804
|
+
const reset = () => setChecked(initialCheckedStateRef.current);
|
|
9805
|
+
form.addEventListener("reset", reset);
|
|
9806
|
+
return () => form.removeEventListener("reset", reset);
|
|
9807
|
+
}
|
|
9808
|
+
}, [
|
|
9809
|
+
button,
|
|
9810
|
+
setChecked
|
|
9811
|
+
]);
|
|
9812
|
+
return /* @__PURE__ */ React.createElement($e698a72e93240346$var$CheckboxProvider, {
|
|
9813
|
+
scope: __scopeCheckbox,
|
|
9814
|
+
state: checked,
|
|
9815
|
+
disabled
|
|
9816
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends$1({
|
|
9817
|
+
type: "button",
|
|
9818
|
+
role: "checkbox",
|
|
9819
|
+
"aria-checked": $e698a72e93240346$var$isIndeterminate(checked) ? "mixed" : checked,
|
|
9820
|
+
"aria-required": required,
|
|
9821
|
+
"data-state": $e698a72e93240346$var$getState(checked),
|
|
9822
|
+
"data-disabled": disabled ? "" : void 0,
|
|
9823
|
+
disabled,
|
|
9824
|
+
value
|
|
9825
|
+
}, checkboxProps, {
|
|
9826
|
+
ref: composedRefs,
|
|
9827
|
+
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event) => {
|
|
9828
|
+
if (event.key === "Enter")
|
|
9829
|
+
event.preventDefault();
|
|
9830
|
+
}),
|
|
9831
|
+
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, (event) => {
|
|
9832
|
+
setChecked(
|
|
9833
|
+
(prevChecked) => $e698a72e93240346$var$isIndeterminate(prevChecked) ? true : !prevChecked
|
|
9834
|
+
);
|
|
9835
|
+
if (isFormControl) {
|
|
9836
|
+
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
|
|
9837
|
+
if (!hasConsumerStoppedPropagationRef.current)
|
|
9838
|
+
event.stopPropagation();
|
|
9839
|
+
}
|
|
9840
|
+
})
|
|
9841
|
+
})), isFormControl && /* @__PURE__ */ React.createElement($e698a72e93240346$var$BubbleInput, {
|
|
9842
|
+
control: button,
|
|
9843
|
+
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
9844
|
+
name,
|
|
9845
|
+
value,
|
|
9846
|
+
checked,
|
|
9847
|
+
required,
|
|
9848
|
+
disabled,
|
|
9849
|
+
style: {
|
|
9850
|
+
transform: "translateX(-100%)"
|
|
9851
|
+
}
|
|
9852
|
+
}));
|
|
9853
|
+
});
|
|
9854
|
+
const $e698a72e93240346$var$INDICATOR_NAME = "CheckboxIndicator";
|
|
9855
|
+
const $e698a72e93240346$export$59aad738f51d1c05 = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
9856
|
+
const { __scopeCheckbox, forceMount, ...indicatorProps } = props;
|
|
9857
|
+
const context = $e698a72e93240346$var$useCheckboxContext($e698a72e93240346$var$INDICATOR_NAME, __scopeCheckbox);
|
|
9858
|
+
return /* @__PURE__ */ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
9859
|
+
present: forceMount || $e698a72e93240346$var$isIndeterminate(context.state) || context.state === true
|
|
9860
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({
|
|
9861
|
+
"data-state": $e698a72e93240346$var$getState(context.state),
|
|
9862
|
+
"data-disabled": context.disabled ? "" : void 0
|
|
9863
|
+
}, indicatorProps, {
|
|
9864
|
+
ref: forwardedRef,
|
|
9865
|
+
style: {
|
|
9866
|
+
pointerEvents: "none",
|
|
9867
|
+
...props.style
|
|
9868
|
+
}
|
|
9869
|
+
})));
|
|
9870
|
+
});
|
|
9871
|
+
const $e698a72e93240346$var$BubbleInput = (props) => {
|
|
9872
|
+
const { control, checked, bubbles = true, ...inputProps } = props;
|
|
9873
|
+
const ref = React.useRef(null);
|
|
9874
|
+
const prevChecked = $010c2913dbd2fe3d$export$5cae361ad82dce8b(checked);
|
|
9875
|
+
const controlSize = $db6c3485150b8e66$export$1ab7ae714698c4b8(control);
|
|
9876
|
+
React.useEffect(() => {
|
|
9877
|
+
const input = ref.current;
|
|
9878
|
+
const inputProto = window.HTMLInputElement.prototype;
|
|
9879
|
+
const descriptor = Object.getOwnPropertyDescriptor(inputProto, "checked");
|
|
9880
|
+
const setChecked = descriptor.set;
|
|
9881
|
+
if (prevChecked !== checked && setChecked) {
|
|
9882
|
+
const event = new Event("click", {
|
|
9883
|
+
bubbles
|
|
9884
|
+
});
|
|
9885
|
+
input.indeterminate = $e698a72e93240346$var$isIndeterminate(checked);
|
|
9886
|
+
setChecked.call(input, $e698a72e93240346$var$isIndeterminate(checked) ? false : checked);
|
|
9887
|
+
input.dispatchEvent(event);
|
|
9888
|
+
}
|
|
9889
|
+
}, [
|
|
9890
|
+
prevChecked,
|
|
9891
|
+
checked,
|
|
9892
|
+
bubbles
|
|
9893
|
+
]);
|
|
9894
|
+
return /* @__PURE__ */ React.createElement("input", _extends$1({
|
|
9895
|
+
type: "checkbox",
|
|
9896
|
+
"aria-hidden": true,
|
|
9897
|
+
defaultChecked: $e698a72e93240346$var$isIndeterminate(checked) ? false : checked
|
|
9898
|
+
}, inputProps, {
|
|
9899
|
+
tabIndex: -1,
|
|
9900
|
+
ref,
|
|
9901
|
+
style: {
|
|
9902
|
+
...props.style,
|
|
9903
|
+
...controlSize,
|
|
9904
|
+
position: "absolute",
|
|
9905
|
+
pointerEvents: "none",
|
|
9906
|
+
opacity: 0,
|
|
9907
|
+
margin: 0
|
|
9908
|
+
}
|
|
9909
|
+
}));
|
|
9910
|
+
};
|
|
9911
|
+
function $e698a72e93240346$var$isIndeterminate(checked) {
|
|
9912
|
+
return checked === "indeterminate";
|
|
9913
|
+
}
|
|
9914
|
+
function $e698a72e93240346$var$getState(checked) {
|
|
9915
|
+
return $e698a72e93240346$var$isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
|
|
9916
|
+
}
|
|
9917
|
+
const $e698a72e93240346$export$be92b6f5f03c0fe9 = $e698a72e93240346$export$48513f6b9f8ce62d;
|
|
9918
|
+
const $e698a72e93240346$export$adb584737d712b70 = $e698a72e93240346$export$59aad738f51d1c05;
|
|
9919
|
+
const sizes$6 = ["1", "2", "3"];
|
|
9920
|
+
const variants$4 = ["classic", "surface", "soft"];
|
|
9921
|
+
const checkboxPropDefs = {
|
|
9922
|
+
size: { type: "enum", values: sizes$6, default: "2", responsive: true },
|
|
9923
|
+
variant: { type: "enum", values: variants$4, default: "surface" },
|
|
9924
|
+
color: colorProp,
|
|
9925
|
+
highContrast: highContrastProp
|
|
9926
|
+
};
|
|
9927
|
+
const ThickCheckIcon = React__namespace.forwardRef(({ color = "currentColor", ...props }, forwardedRef) => {
|
|
9928
|
+
return React__namespace.createElement(
|
|
9929
|
+
"svg",
|
|
9930
|
+
{ width: "9", height: "9", viewBox: "0 0 9 9", fill: color, xmlns: "http://www.w3.org/2000/svg", ...props, ref: forwardedRef },
|
|
9931
|
+
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" })
|
|
9932
|
+
);
|
|
9933
|
+
});
|
|
9934
|
+
ThickCheckIcon.displayName = "ThickCheckIcon";
|
|
9935
|
+
const ChevronDownIcon = React__namespace.forwardRef(({ color = "currentColor", ...props }, forwardedRef) => {
|
|
9936
|
+
return React__namespace.createElement(
|
|
9937
|
+
"svg",
|
|
9938
|
+
{ width: "9", height: "9", viewBox: "0 0 9 9", fill: color, xmlns: "http://www.w3.org/2000/svg", ...props, ref: forwardedRef },
|
|
9939
|
+
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" })
|
|
9940
|
+
);
|
|
9941
|
+
});
|
|
9942
|
+
ChevronDownIcon.displayName = "ChevronDownIcon";
|
|
9943
|
+
const ThickChevronRightIcon = React__namespace.forwardRef(({ color = "currentColor", ...props }, forwardedRef) => {
|
|
9944
|
+
return React__namespace.createElement(
|
|
9945
|
+
"svg",
|
|
9946
|
+
{ width: "9", height: "9", viewBox: "0 0 9 9", fill: color, xmlns: "http://www.w3.org/2000/svg", ...props, ref: forwardedRef },
|
|
9947
|
+
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" })
|
|
9948
|
+
);
|
|
9949
|
+
});
|
|
9950
|
+
ThickChevronRightIcon.displayName = "ThickChevronRightIcon";
|
|
9951
|
+
const InfoCircledIcon = React__namespace.forwardRef(({ color = "currentColor", ...props }, forwardedRef) => {
|
|
9952
|
+
return React__namespace.createElement(
|
|
9953
|
+
"svg",
|
|
9954
|
+
{ width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, ref: forwardedRef },
|
|
9955
|
+
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" })
|
|
9956
|
+
);
|
|
9957
|
+
});
|
|
9958
|
+
InfoCircledIcon.displayName = "InfoCircledIcon";
|
|
9959
|
+
const Checkbox = React__namespace.forwardRef((props, forwardedRef) => {
|
|
9960
|
+
const { rest: marginRest, ...marginProps } = extractMarginProps(props);
|
|
9961
|
+
const { className, style, size = checkboxPropDefs.size.default, variant = checkboxPropDefs.variant.default, color = checkboxPropDefs.color.default, highContrast = checkboxPropDefs.highContrast.default, ...checkboxProps } = marginRest;
|
|
9962
|
+
return React__namespace.createElement(
|
|
9963
|
+
"span",
|
|
9964
|
+
{ className: classNames("rt-CheckboxRoot", className, withBreakpoints(size, "rt-r-size"), withMarginProps(marginProps)), style },
|
|
9965
|
+
React__namespace.createElement(
|
|
9966
|
+
$e698a72e93240346$export$be92b6f5f03c0fe9,
|
|
9967
|
+
{ "data-accent-color": color, ...checkboxProps, ref: forwardedRef, className: classNames("rt-reset", "rt-CheckboxButton", `rt-variant-${variant}`, {
|
|
9968
|
+
"rt-high-contrast": highContrast
|
|
9969
|
+
}) },
|
|
9970
|
+
React__namespace.createElement(
|
|
9971
|
+
$e698a72e93240346$export$adb584737d712b70,
|
|
9972
|
+
{ className: "rt-CheckboxIndicator" },
|
|
9973
|
+
React__namespace.createElement(ThickCheckIcon, { className: "rt-CheckboxIndicatorIcon" })
|
|
9974
|
+
)
|
|
9975
|
+
)
|
|
9976
|
+
);
|
|
9977
|
+
});
|
|
9978
|
+
Checkbox.displayName = "Checkbox";
|
|
10473
9979
|
function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
10474
9980
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
10475
9981
|
const [createCollectionContext, createCollectionScope] = $c512c27ab02ef895$export$50c7b4e9d9f19c1(PROVIDER_NAME);
|
|
@@ -10561,7 +10067,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10561
10067
|
scope: props.__scopeRovingFocusGroup
|
|
10562
10068
|
}, /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$var$Collection.Slot, {
|
|
10563
10069
|
scope: props.__scopeRovingFocusGroup
|
|
10564
|
-
}, /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$var$RovingFocusGroupImpl, _extends({}, props, {
|
|
10070
|
+
}, /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$var$RovingFocusGroupImpl, _extends$1({}, props, {
|
|
10565
10071
|
ref: forwardedRef
|
|
10566
10072
|
}))));
|
|
10567
10073
|
});
|
|
@@ -10617,7 +10123,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10617
10123
|
),
|
|
10618
10124
|
[]
|
|
10619
10125
|
)
|
|
10620
|
-
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
10126
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
10621
10127
|
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
10622
10128
|
"data-orientation": orientation
|
|
10623
10129
|
}, groupProps, {
|
|
@@ -10687,7 +10193,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10687
10193
|
id,
|
|
10688
10194
|
focusable,
|
|
10689
10195
|
active
|
|
10690
|
-
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
|
|
10196
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({
|
|
10691
10197
|
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
10692
10198
|
"data-orientation": context.orientation
|
|
10693
10199
|
}, itemProps, {
|
|
@@ -10827,7 +10333,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10827
10333
|
onScrollbarYEnabledChange: setScrollbarYEnabled,
|
|
10828
10334
|
onCornerWidthChange: setCornerWidth,
|
|
10829
10335
|
onCornerHeightChange: setCornerHeight
|
|
10830
|
-
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
10336
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
10831
10337
|
dir: direction
|
|
10832
10338
|
}, scrollAreaProps, {
|
|
10833
10339
|
ref: composedRefs,
|
|
@@ -10850,7 +10356,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10850
10356
|
dangerouslySetInnerHTML: {
|
|
10851
10357
|
__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}`
|
|
10852
10358
|
}
|
|
10853
|
-
}), /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
10359
|
+
}), /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
10854
10360
|
"data-radix-scroll-area-viewport": ""
|
|
10855
10361
|
}, viewportProps, {
|
|
10856
10362
|
ref: composedRefs,
|
|
@@ -10894,16 +10400,16 @@ var __publicField = (obj, key, value) => {
|
|
|
10894
10400
|
onScrollbarXEnabledChange,
|
|
10895
10401
|
onScrollbarYEnabledChange
|
|
10896
10402
|
]);
|
|
10897
|
-
return context.type === "hover" ? /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarHover, _extends({}, scrollbarProps, {
|
|
10403
|
+
return context.type === "hover" ? /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarHover, _extends$1({}, scrollbarProps, {
|
|
10898
10404
|
ref: forwardedRef,
|
|
10899
10405
|
forceMount
|
|
10900
|
-
})) : context.type === "scroll" ? /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarScroll, _extends({}, scrollbarProps, {
|
|
10406
|
+
})) : context.type === "scroll" ? /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarScroll, _extends$1({}, scrollbarProps, {
|
|
10901
10407
|
ref: forwardedRef,
|
|
10902
10408
|
forceMount
|
|
10903
|
-
})) : context.type === "auto" ? /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarAuto, _extends({}, scrollbarProps, {
|
|
10409
|
+
})) : context.type === "auto" ? /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarAuto, _extends$1({}, scrollbarProps, {
|
|
10904
10410
|
ref: forwardedRef,
|
|
10905
10411
|
forceMount
|
|
10906
|
-
})) : context.type === "always" ? /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarVisible, _extends({}, scrollbarProps, {
|
|
10412
|
+
})) : context.type === "always" ? /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarVisible, _extends$1({}, scrollbarProps, {
|
|
10907
10413
|
ref: forwardedRef
|
|
10908
10414
|
})) : null;
|
|
10909
10415
|
});
|
|
@@ -10939,7 +10445,7 @@ var __publicField = (obj, key, value) => {
|
|
|
10939
10445
|
]);
|
|
10940
10446
|
return /* @__PURE__ */ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
10941
10447
|
present: forceMount || visible
|
|
10942
|
-
}, /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarAuto, _extends({
|
|
10448
|
+
}, /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarAuto, _extends$1({
|
|
10943
10449
|
"data-state": visible ? "visible" : "hidden"
|
|
10944
10450
|
}, scrollbarProps, {
|
|
10945
10451
|
ref: forwardedRef
|
|
@@ -11009,7 +10515,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11009
10515
|
]);
|
|
11010
10516
|
return /* @__PURE__ */ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
11011
10517
|
present: forceMount || state !== "hidden"
|
|
11012
|
-
}, /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarVisible, _extends({
|
|
10518
|
+
}, /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarVisible, _extends$1({
|
|
11013
10519
|
"data-state": state === "hidden" ? "hidden" : "visible"
|
|
11014
10520
|
}, scrollbarProps, {
|
|
11015
10521
|
ref: forwardedRef,
|
|
@@ -11039,7 +10545,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11039
10545
|
$57acba87d6e25586$var$useResizeObserver(context.content, handleResize);
|
|
11040
10546
|
return /* @__PURE__ */ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
11041
10547
|
present: forceMount || visible
|
|
11042
|
-
}, /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarVisible, _extends({
|
|
10548
|
+
}, /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarVisible, _extends$1({
|
|
11043
10549
|
"data-state": visible ? "visible" : "hidden"
|
|
11044
10550
|
}, scrollbarProps, {
|
|
11045
10551
|
ref: forwardedRef
|
|
@@ -11073,7 +10579,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11073
10579
|
return $57acba87d6e25586$var$getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes2, dir);
|
|
11074
10580
|
}
|
|
11075
10581
|
if (orientation === "horizontal")
|
|
11076
|
-
return /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarX, _extends({}, commonProps, {
|
|
10582
|
+
return /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarX, _extends$1({}, commonProps, {
|
|
11077
10583
|
ref: forwardedRef,
|
|
11078
10584
|
onThumbPositionChange: () => {
|
|
11079
10585
|
if (context.viewport && thumbRef.current) {
|
|
@@ -11092,7 +10598,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11092
10598
|
}
|
|
11093
10599
|
}));
|
|
11094
10600
|
if (orientation === "vertical")
|
|
11095
|
-
return /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarY, _extends({}, commonProps, {
|
|
10601
|
+
return /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarY, _extends$1({}, commonProps, {
|
|
11096
10602
|
ref: forwardedRef,
|
|
11097
10603
|
onThumbPositionChange: () => {
|
|
11098
10604
|
if (context.viewport && thumbRef.current) {
|
|
@@ -11124,7 +10630,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11124
10630
|
}, [
|
|
11125
10631
|
ref
|
|
11126
10632
|
]);
|
|
11127
|
-
return /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarImpl, _extends({
|
|
10633
|
+
return /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarImpl, _extends$1({
|
|
11128
10634
|
"data-orientation": "horizontal"
|
|
11129
10635
|
}, scrollbarProps, {
|
|
11130
10636
|
ref: composeRefs,
|
|
@@ -11172,7 +10678,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11172
10678
|
}, [
|
|
11173
10679
|
ref
|
|
11174
10680
|
]);
|
|
11175
|
-
return /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarImpl, _extends({
|
|
10681
|
+
return /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaScrollbarImpl, _extends$1({
|
|
11176
10682
|
"data-orientation": "vertical"
|
|
11177
10683
|
}, scrollbarProps, {
|
|
11178
10684
|
ref: composeRefs,
|
|
@@ -11268,7 +10774,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11268
10774
|
onThumbPointerUp: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onThumbPointerUp),
|
|
11269
10775
|
onThumbPositionChange: handleThumbPositionChange,
|
|
11270
10776
|
onThumbPointerDown: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onThumbPointerDown)
|
|
11271
|
-
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, scrollbarProps, {
|
|
10777
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({}, scrollbarProps, {
|
|
11272
10778
|
ref: composeRefs,
|
|
11273
10779
|
style: {
|
|
11274
10780
|
position: "absolute",
|
|
@@ -11305,7 +10811,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11305
10811
|
const scrollbarContext = $57acba87d6e25586$var$useScrollbarContext($57acba87d6e25586$var$THUMB_NAME, props.__scopeScrollArea);
|
|
11306
10812
|
return /* @__PURE__ */ React.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
11307
10813
|
present: forceMount || scrollbarContext.hasThumb
|
|
11308
|
-
}, /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaThumbImpl, _extends({
|
|
10814
|
+
}, /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaThumbImpl, _extends$1({
|
|
11309
10815
|
ref: forwardedRef
|
|
11310
10816
|
}, thumbProps)));
|
|
11311
10817
|
});
|
|
@@ -11345,7 +10851,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11345
10851
|
debounceScrollEnd,
|
|
11346
10852
|
onThumbPositionChange
|
|
11347
10853
|
]);
|
|
11348
|
-
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
10854
|
+
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
11349
10855
|
"data-state": scrollbarContext.hasThumb ? "visible" : "hidden"
|
|
11350
10856
|
}, thumbProps, {
|
|
11351
10857
|
ref: composedRef,
|
|
@@ -11372,7 +10878,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11372
10878
|
const context = $57acba87d6e25586$var$useScrollAreaContext($57acba87d6e25586$var$CORNER_NAME, props.__scopeScrollArea);
|
|
11373
10879
|
const hasBothScrollbarsVisible = Boolean(context.scrollbarX && context.scrollbarY);
|
|
11374
10880
|
const hasCorner = context.type !== "scroll" && hasBothScrollbarsVisible;
|
|
11375
|
-
return hasCorner ? /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaCornerImpl, _extends({}, props, {
|
|
10881
|
+
return hasCorner ? /* @__PURE__ */ React.createElement($57acba87d6e25586$var$ScrollAreaCornerImpl, _extends$1({}, props, {
|
|
11376
10882
|
ref: forwardedRef
|
|
11377
10883
|
})) : null;
|
|
11378
10884
|
});
|
|
@@ -11394,7 +10900,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11394
10900
|
context.onCornerWidthChange(width);
|
|
11395
10901
|
setWidth(width);
|
|
11396
10902
|
});
|
|
11397
|
-
return hasSize ? /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, cornerProps, {
|
|
10903
|
+
return hasSize ? /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({}, cornerProps, {
|
|
11398
10904
|
ref: forwardedRef,
|
|
11399
10905
|
style: {
|
|
11400
10906
|
width: width1,
|
|
@@ -11655,7 +11161,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11655
11161
|
scope: props.__scopeSlider
|
|
11656
11162
|
}, /* @__PURE__ */ React.createElement($faa2e61a3361514f$var$Collection.Slot, {
|
|
11657
11163
|
scope: props.__scopeSlider
|
|
11658
|
-
}, /* @__PURE__ */ React.createElement(SliderOrientation, _extends({
|
|
11164
|
+
}, /* @__PURE__ */ React.createElement(SliderOrientation, _extends$1({
|
|
11659
11165
|
"aria-disabled": disabled,
|
|
11660
11166
|
"data-disabled": disabled ? "" : void 0
|
|
11661
11167
|
}, sliderProps, {
|
|
@@ -11737,7 +11243,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11737
11243
|
endEdge: isSlidingFromLeft ? "right" : "left",
|
|
11738
11244
|
direction: isSlidingFromLeft ? 1 : -1,
|
|
11739
11245
|
size: "width"
|
|
11740
|
-
}, /* @__PURE__ */ React.createElement($faa2e61a3361514f$var$SliderImpl, _extends({
|
|
11246
|
+
}, /* @__PURE__ */ React.createElement($faa2e61a3361514f$var$SliderImpl, _extends$1({
|
|
11741
11247
|
dir: direction,
|
|
11742
11248
|
"data-orientation": "horizontal"
|
|
11743
11249
|
}, sliderProps, {
|
|
@@ -11797,7 +11303,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11797
11303
|
endEdge: isSlidingFromBottom ? "top" : "bottom",
|
|
11798
11304
|
size: "height",
|
|
11799
11305
|
direction: isSlidingFromBottom ? 1 : -1
|
|
11800
|
-
}, /* @__PURE__ */ React.createElement($faa2e61a3361514f$var$SliderImpl, _extends({
|
|
11306
|
+
}, /* @__PURE__ */ React.createElement($faa2e61a3361514f$var$SliderImpl, _extends$1({
|
|
11801
11307
|
"data-orientation": "vertical"
|
|
11802
11308
|
}, sliderProps, {
|
|
11803
11309
|
ref,
|
|
@@ -11830,7 +11336,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11830
11336
|
const $faa2e61a3361514f$var$SliderImpl = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
11831
11337
|
const { __scopeSlider, onSlideStart, onSlideMove, onSlideEnd, onHomeKeyDown, onEndKeyDown, onStepKeyDown, ...sliderProps } = props;
|
|
11832
11338
|
const context = $faa2e61a3361514f$var$useSliderContext($faa2e61a3361514f$var$SLIDER_NAME, __scopeSlider);
|
|
11833
|
-
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, sliderProps, {
|
|
11339
|
+
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({}, sliderProps, {
|
|
11834
11340
|
ref: forwardedRef,
|
|
11835
11341
|
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event) => {
|
|
11836
11342
|
if (event.key === "Home") {
|
|
@@ -11871,7 +11377,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11871
11377
|
const $faa2e61a3361514f$export$105594979f116971 = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
11872
11378
|
const { __scopeSlider, ...trackProps } = props;
|
|
11873
11379
|
const context = $faa2e61a3361514f$var$useSliderContext($faa2e61a3361514f$var$TRACK_NAME, __scopeSlider);
|
|
11874
|
-
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
|
|
11380
|
+
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({
|
|
11875
11381
|
"data-disabled": context.disabled ? "" : void 0,
|
|
11876
11382
|
"data-orientation": context.orientation
|
|
11877
11383
|
}, trackProps, {
|
|
@@ -11891,7 +11397,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11891
11397
|
);
|
|
11892
11398
|
const offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0;
|
|
11893
11399
|
const offsetEnd = 100 - Math.max(...percentages);
|
|
11894
|
-
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
|
|
11400
|
+
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({
|
|
11895
11401
|
"data-orientation": context.orientation,
|
|
11896
11402
|
"data-disabled": context.disabled ? "" : void 0
|
|
11897
11403
|
}, rangeProps, {
|
|
@@ -11920,7 +11426,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11920
11426
|
thumb
|
|
11921
11427
|
]
|
|
11922
11428
|
);
|
|
11923
|
-
return /* @__PURE__ */ React.createElement($faa2e61a3361514f$var$SliderThumbImpl, _extends({}, props, {
|
|
11429
|
+
return /* @__PURE__ */ React.createElement($faa2e61a3361514f$var$SliderThumbImpl, _extends$1({}, props, {
|
|
11924
11430
|
ref: composedRefs,
|
|
11925
11431
|
index: index2
|
|
11926
11432
|
}));
|
|
@@ -11959,7 +11465,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11959
11465
|
}
|
|
11960
11466
|
}, /* @__PURE__ */ React.createElement($faa2e61a3361514f$var$Collection.ItemSlot, {
|
|
11961
11467
|
scope: props.__scopeSlider
|
|
11962
|
-
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
|
|
11468
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({
|
|
11963
11469
|
role: "slider",
|
|
11964
11470
|
"aria-label": props["aria-label"] || label,
|
|
11965
11471
|
"aria-valuemin": context.min,
|
|
@@ -11999,7 +11505,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11999
11505
|
prevValue,
|
|
12000
11506
|
value
|
|
12001
11507
|
]);
|
|
12002
|
-
return /* @__PURE__ */ React.createElement("input", _extends({
|
|
11508
|
+
return /* @__PURE__ */ React.createElement("input", _extends$1({
|
|
12003
11509
|
style: {
|
|
12004
11510
|
display: "none"
|
|
12005
11511
|
}
|
|
@@ -12218,7 +11724,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12218
11724
|
scope: __scopeAvatar,
|
|
12219
11725
|
imageLoadingStatus,
|
|
12220
11726
|
onImageLoadingStatusChange: setImageLoadingStatus
|
|
12221
|
-
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, avatarProps, {
|
|
11727
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({}, avatarProps, {
|
|
12222
11728
|
ref: forwardedRef
|
|
12223
11729
|
})));
|
|
12224
11730
|
});
|
|
@@ -12239,7 +11745,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12239
11745
|
imageLoadingStatus,
|
|
12240
11746
|
handleLoadingStatusChange
|
|
12241
11747
|
]);
|
|
12242
|
-
return imageLoadingStatus === "loaded" ? /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.img, _extends({}, imageProps, {
|
|
11748
|
+
return imageLoadingStatus === "loaded" ? /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.img, _extends$1({}, imageProps, {
|
|
12243
11749
|
ref: forwardedRef,
|
|
12244
11750
|
src
|
|
12245
11751
|
})) : null;
|
|
@@ -12260,7 +11766,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12260
11766
|
}, [
|
|
12261
11767
|
delayMs
|
|
12262
11768
|
]);
|
|
12263
|
-
return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, fallbackProps, {
|
|
11769
|
+
return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({}, fallbackProps, {
|
|
12264
11770
|
ref: forwardedRef
|
|
12265
11771
|
})) : null;
|
|
12266
11772
|
});
|
|
@@ -12364,7 +11870,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12364
11870
|
orientation,
|
|
12365
11871
|
dir: direction,
|
|
12366
11872
|
activationMode
|
|
12367
|
-
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
11873
|
+
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
12368
11874
|
dir: direction,
|
|
12369
11875
|
"data-orientation": orientation
|
|
12370
11876
|
}, tabsProps, {
|
|
@@ -12376,13 +11882,13 @@ var __publicField = (obj, key, value) => {
|
|
|
12376
11882
|
const { __scopeTabs, loop = true, ...listProps } = props;
|
|
12377
11883
|
const context = $69cb30bb0017df05$var$useTabsContext($69cb30bb0017df05$var$TAB_LIST_NAME, __scopeTabs);
|
|
12378
11884
|
const rovingFocusGroupScope = $69cb30bb0017df05$var$useRovingFocusGroupScope(__scopeTabs);
|
|
12379
|
-
return /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9, _extends({
|
|
11885
|
+
return /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9, _extends$1({
|
|
12380
11886
|
asChild: true
|
|
12381
11887
|
}, rovingFocusGroupScope, {
|
|
12382
11888
|
orientation: context.orientation,
|
|
12383
11889
|
dir: context.dir,
|
|
12384
11890
|
loop
|
|
12385
|
-
}), /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
11891
|
+
}), /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
12386
11892
|
role: "tablist",
|
|
12387
11893
|
"aria-orientation": context.orientation
|
|
12388
11894
|
}, listProps, {
|
|
@@ -12397,12 +11903,12 @@ var __publicField = (obj, key, value) => {
|
|
|
12397
11903
|
const triggerId = $69cb30bb0017df05$var$makeTriggerId(context.baseId, value);
|
|
12398
11904
|
const contentId = $69cb30bb0017df05$var$makeContentId(context.baseId, value);
|
|
12399
11905
|
const isSelected = value === context.value;
|
|
12400
|
-
return /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$export$6d08773d2e66f8f2, _extends({
|
|
11906
|
+
return /* @__PURE__ */ React.createElement($d7bdfb9eb0fdf311$export$6d08773d2e66f8f2, _extends$1({
|
|
12401
11907
|
asChild: true
|
|
12402
11908
|
}, rovingFocusGroupScope, {
|
|
12403
11909
|
focusable: !disabled,
|
|
12404
11910
|
active: isSelected
|
|
12405
|
-
}), /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
|
|
11911
|
+
}), /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends$1({
|
|
12406
11912
|
type: "button",
|
|
12407
11913
|
role: "tab",
|
|
12408
11914
|
"aria-selected": isSelected,
|
|
@@ -12452,7 +11958,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12452
11958
|
{
|
|
12453
11959
|
present: forceMount || isSelected
|
|
12454
11960
|
},
|
|
12455
|
-
({ present }) => /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
11961
|
+
({ present }) => /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
12456
11962
|
"data-state": isSelected ? "active" : "inactive",
|
|
12457
11963
|
"data-orientation": context.orientation,
|
|
12458
11964
|
role: "tabpanel",
|
|
@@ -12512,6 +12018,260 @@ var __publicField = (obj, key, value) => {
|
|
|
12512
12018
|
Trigger: TabsTrigger,
|
|
12513
12019
|
Content: TabsContent
|
|
12514
12020
|
});
|
|
12021
|
+
const truthyValues = [true, "true"];
|
|
12022
|
+
const BooleanInput = React.memo((props) => {
|
|
12023
|
+
const [{ inputId, labelId, size, severity, showInputOnly, field, fieldProps }, rest] = useFormikInput(props);
|
|
12024
|
+
let [{ helpText, label }] = useFormikInput(props);
|
|
12025
|
+
helpText = showInputOnly ? null : helpText;
|
|
12026
|
+
label = showInputOnly ? "" : label;
|
|
12027
|
+
const color = blocks.useSeverityColor(severity);
|
|
12028
|
+
const value = truthyValues.includes(fieldProps.value);
|
|
12029
|
+
return /* @__PURE__ */ jsxRuntime.jsx(InputWithLabelAndHelpText, { helpText, severity, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12030
|
+
InputWithLabel,
|
|
12031
|
+
{
|
|
12032
|
+
size,
|
|
12033
|
+
severity,
|
|
12034
|
+
inputId,
|
|
12035
|
+
labelId,
|
|
12036
|
+
label,
|
|
12037
|
+
image: showInputOnly ? void 0 : field.image,
|
|
12038
|
+
flexProps: { direction: "row-reverse", justify: "end", align: "center", gap: "2" },
|
|
12039
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12040
|
+
Checkbox,
|
|
12041
|
+
{
|
|
12042
|
+
...rest,
|
|
12043
|
+
...fieldProps,
|
|
12044
|
+
id: inputId,
|
|
12045
|
+
color,
|
|
12046
|
+
value: value.toString(),
|
|
12047
|
+
checked: value,
|
|
12048
|
+
onCheckedChange: fieldProps.onChange,
|
|
12049
|
+
onChange: void 0,
|
|
12050
|
+
onBlur: void 0
|
|
12051
|
+
}
|
|
12052
|
+
)
|
|
12053
|
+
}
|
|
12054
|
+
) });
|
|
12055
|
+
});
|
|
12056
|
+
BooleanInput.displayName = "BooleanInput";
|
|
12057
|
+
var DefaultContext = {
|
|
12058
|
+
color: void 0,
|
|
12059
|
+
size: void 0,
|
|
12060
|
+
className: void 0,
|
|
12061
|
+
style: void 0,
|
|
12062
|
+
attr: void 0
|
|
12063
|
+
};
|
|
12064
|
+
var IconContext = React.createContext && /* @__PURE__ */ React.createContext(DefaultContext);
|
|
12065
|
+
var _excluded = ["attr", "size", "title"];
|
|
12066
|
+
function _objectWithoutProperties(source, excluded) {
|
|
12067
|
+
if (source == null)
|
|
12068
|
+
return {};
|
|
12069
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
12070
|
+
var key, i;
|
|
12071
|
+
if (Object.getOwnPropertySymbols) {
|
|
12072
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
12073
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
12074
|
+
key = sourceSymbolKeys[i];
|
|
12075
|
+
if (excluded.indexOf(key) >= 0)
|
|
12076
|
+
continue;
|
|
12077
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key))
|
|
12078
|
+
continue;
|
|
12079
|
+
target[key] = source[key];
|
|
12080
|
+
}
|
|
12081
|
+
}
|
|
12082
|
+
return target;
|
|
12083
|
+
}
|
|
12084
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
12085
|
+
if (source == null)
|
|
12086
|
+
return {};
|
|
12087
|
+
var target = {};
|
|
12088
|
+
for (var key in source) {
|
|
12089
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12090
|
+
if (excluded.indexOf(key) >= 0)
|
|
12091
|
+
continue;
|
|
12092
|
+
target[key] = source[key];
|
|
12093
|
+
}
|
|
12094
|
+
}
|
|
12095
|
+
return target;
|
|
12096
|
+
}
|
|
12097
|
+
function _extends() {
|
|
12098
|
+
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
12099
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
12100
|
+
var source = arguments[i];
|
|
12101
|
+
for (var key in source) {
|
|
12102
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12103
|
+
target[key] = source[key];
|
|
12104
|
+
}
|
|
12105
|
+
}
|
|
12106
|
+
}
|
|
12107
|
+
return target;
|
|
12108
|
+
};
|
|
12109
|
+
return _extends.apply(this, arguments);
|
|
12110
|
+
}
|
|
12111
|
+
function ownKeys(e, r) {
|
|
12112
|
+
var t = Object.keys(e);
|
|
12113
|
+
if (Object.getOwnPropertySymbols) {
|
|
12114
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
12115
|
+
r && (o = o.filter(function(r2) {
|
|
12116
|
+
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
12117
|
+
})), t.push.apply(t, o);
|
|
12118
|
+
}
|
|
12119
|
+
return t;
|
|
12120
|
+
}
|
|
12121
|
+
function _objectSpread(e) {
|
|
12122
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
12123
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
12124
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
|
|
12125
|
+
_defineProperty(e, r2, t[r2]);
|
|
12126
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
|
|
12127
|
+
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
12128
|
+
});
|
|
12129
|
+
}
|
|
12130
|
+
return e;
|
|
12131
|
+
}
|
|
12132
|
+
function _defineProperty(obj, key, value) {
|
|
12133
|
+
key = _toPropertyKey(key);
|
|
12134
|
+
if (key in obj) {
|
|
12135
|
+
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
12136
|
+
} else {
|
|
12137
|
+
obj[key] = value;
|
|
12138
|
+
}
|
|
12139
|
+
return obj;
|
|
12140
|
+
}
|
|
12141
|
+
function _toPropertyKey(t) {
|
|
12142
|
+
var i = _toPrimitive(t, "string");
|
|
12143
|
+
return "symbol" == typeof i ? i : i + "";
|
|
12144
|
+
}
|
|
12145
|
+
function _toPrimitive(t, r) {
|
|
12146
|
+
if ("object" != typeof t || !t)
|
|
12147
|
+
return t;
|
|
12148
|
+
var e = t[Symbol.toPrimitive];
|
|
12149
|
+
if (void 0 !== e) {
|
|
12150
|
+
var i = e.call(t, r || "default");
|
|
12151
|
+
if ("object" != typeof i)
|
|
12152
|
+
return i;
|
|
12153
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
12154
|
+
}
|
|
12155
|
+
return ("string" === r ? String : Number)(t);
|
|
12156
|
+
}
|
|
12157
|
+
function Tree2Element(tree) {
|
|
12158
|
+
return tree && tree.map((node, i) => /* @__PURE__ */ React.createElement(node.tag, _objectSpread({
|
|
12159
|
+
key: i
|
|
12160
|
+
}, node.attr), Tree2Element(node.child)));
|
|
12161
|
+
}
|
|
12162
|
+
function GenIcon(data) {
|
|
12163
|
+
return (props) => /* @__PURE__ */ React.createElement(IconBase, _extends({
|
|
12164
|
+
attr: _objectSpread({}, data.attr)
|
|
12165
|
+
}, props), Tree2Element(data.child));
|
|
12166
|
+
}
|
|
12167
|
+
function IconBase(props) {
|
|
12168
|
+
var elem = (conf) => {
|
|
12169
|
+
var {
|
|
12170
|
+
attr,
|
|
12171
|
+
size,
|
|
12172
|
+
title: title2
|
|
12173
|
+
} = props, svgProps = _objectWithoutProperties(props, _excluded);
|
|
12174
|
+
var computedSize = size || conf.size || "1em";
|
|
12175
|
+
var className;
|
|
12176
|
+
if (conf.className)
|
|
12177
|
+
className = conf.className;
|
|
12178
|
+
if (props.className)
|
|
12179
|
+
className = (className ? className + " " : "") + props.className;
|
|
12180
|
+
return /* @__PURE__ */ React.createElement("svg", _extends({
|
|
12181
|
+
stroke: "currentColor",
|
|
12182
|
+
fill: "currentColor",
|
|
12183
|
+
strokeWidth: "0"
|
|
12184
|
+
}, conf.attr, attr, svgProps, {
|
|
12185
|
+
className,
|
|
12186
|
+
style: _objectSpread(_objectSpread({
|
|
12187
|
+
color: props.color || conf.color
|
|
12188
|
+
}, conf.style), props.style),
|
|
12189
|
+
height: computedSize,
|
|
12190
|
+
width: computedSize,
|
|
12191
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
12192
|
+
}), title2 && /* @__PURE__ */ React.createElement("title", null, title2), props.children);
|
|
12193
|
+
};
|
|
12194
|
+
return IconContext !== void 0 ? /* @__PURE__ */ React.createElement(IconContext.Consumer, null, (conf) => elem(conf)) : elem(DefaultContext);
|
|
12195
|
+
}
|
|
12196
|
+
function RiArrowDownLine(props) {
|
|
12197
|
+
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);
|
|
12198
|
+
}
|
|
12199
|
+
function RiArrowUpLine(props) {
|
|
12200
|
+
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);
|
|
12201
|
+
}
|
|
12202
|
+
function RiCalendarLine(props) {
|
|
12203
|
+
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);
|
|
12204
|
+
}
|
|
12205
|
+
function RiQrCodeLine(props) {
|
|
12206
|
+
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);
|
|
12207
|
+
}
|
|
12208
|
+
function RiFileCopyLine(props) {
|
|
12209
|
+
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);
|
|
12210
|
+
}
|
|
12211
|
+
function RiAlignJustify(props) {
|
|
12212
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M3 4H21V6H3V4ZM3 19H21V21H3V19ZM3 14H21V16H3V14ZM3 9H21V11H3V9Z" }, "child": [] }] })(props);
|
|
12213
|
+
}
|
|
12214
|
+
function RiHashtag(props) {
|
|
12215
|
+
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);
|
|
12216
|
+
}
|
|
12217
|
+
function RiInputField(props) {
|
|
12218
|
+
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);
|
|
12219
|
+
}
|
|
12220
|
+
function RiListCheck(props) {
|
|
12221
|
+
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);
|
|
12222
|
+
}
|
|
12223
|
+
function RiImageLine(props) {
|
|
12224
|
+
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);
|
|
12225
|
+
}
|
|
12226
|
+
function RiCheckboxCircleLine(props) {
|
|
12227
|
+
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);
|
|
12228
|
+
}
|
|
12229
|
+
function RiCheckboxLine(props) {
|
|
12230
|
+
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);
|
|
12231
|
+
}
|
|
12232
|
+
function RiDeleteBin2Line(props) {
|
|
12233
|
+
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);
|
|
12234
|
+
}
|
|
12235
|
+
function RiMenuFoldLine(props) {
|
|
12236
|
+
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);
|
|
12237
|
+
}
|
|
12238
|
+
function RiUpload2Line(props) {
|
|
12239
|
+
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);
|
|
12240
|
+
}
|
|
12241
|
+
const emptyBooleanField = {
|
|
12242
|
+
...emptyBaseField,
|
|
12243
|
+
type: "boolean"
|
|
12244
|
+
};
|
|
12245
|
+
const _BooleanField = class _BooleanField extends BaseField {
|
|
12246
|
+
constructor(options) {
|
|
12247
|
+
super({ ...options, type: "boolean" });
|
|
12248
|
+
__publicField(this, "onlyValidateAfterTouched", false);
|
|
12249
|
+
}
|
|
12250
|
+
// if a BooleanField is required, `false` is considered blank
|
|
12251
|
+
isBlank(value) {
|
|
12252
|
+
return this.required && !value;
|
|
12253
|
+
}
|
|
12254
|
+
getValueFromChangeEvent(event) {
|
|
12255
|
+
if (typeof event === "boolean")
|
|
12256
|
+
return event;
|
|
12257
|
+
return event.target.checked;
|
|
12258
|
+
}
|
|
12259
|
+
serialize() {
|
|
12260
|
+
return super._serialize();
|
|
12261
|
+
}
|
|
12262
|
+
static deserialize(data) {
|
|
12263
|
+
if (data.type !== "boolean")
|
|
12264
|
+
throw new Error("Type mismatch.");
|
|
12265
|
+
return new _BooleanField(data);
|
|
12266
|
+
}
|
|
12267
|
+
getInput(props) {
|
|
12268
|
+
return /* @__PURE__ */ jsxRuntime.jsx(BooleanInput, { ...props, field: this });
|
|
12269
|
+
}
|
|
12270
|
+
};
|
|
12271
|
+
__publicField(_BooleanField, "fieldTypeName", "Checkbox");
|
|
12272
|
+
__publicField(_BooleanField, "fieldTypeDescription", "Perfect for both optional and required yes/no questions.");
|
|
12273
|
+
__publicField(_BooleanField, "Icon", RiCheckboxCircleLine);
|
|
12274
|
+
let BooleanField = _BooleanField;
|
|
12515
12275
|
const NumberInput = React.memo((props) => {
|
|
12516
12276
|
const [{ inputId, labelId, size, severity, showInputOnly, field, fieldProps }, rest] = useFormikInput(props);
|
|
12517
12277
|
let [{ helpText, label }] = useFormikInput(props);
|
|
@@ -13617,7 +13377,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13617
13377
|
] }),
|
|
13618
13378
|
value && /* @__PURE__ */ jsxRuntime.jsx(Text, { color: "jade", size: "1", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiCheckLine", style: { verticalAlign: "bottom" } }) })
|
|
13619
13379
|
] }),
|
|
13620
|
-
value && /* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { width: "max-content", gap: "2", align: "center", children: [
|
|
13380
|
+
!!value && /* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { width: "max-content", gap: "2", align: "center", children: [
|
|
13621
13381
|
/* @__PURE__ */ jsxRuntime.jsx(Code, { color: "gray", highContrast: true, children: value }),
|
|
13622
13382
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13623
13383
|
blocks.IconButton,
|
|
@@ -13657,9 +13417,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13657
13417
|
}
|
|
13658
13418
|
);
|
|
13659
13419
|
setIsScannerLoading(true);
|
|
13660
|
-
qrScanner.start().
|
|
13661
|
-
setIsScannerLoading(false);
|
|
13662
|
-
}).catch(() => {
|
|
13420
|
+
void qrScanner.start().finally(() => {
|
|
13663
13421
|
setIsScannerLoading(false);
|
|
13664
13422
|
});
|
|
13665
13423
|
}, [onQrScan]);
|
|
@@ -16820,7 +16578,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16820
16578
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
16821
16579
|
exports2.APIError = APIError;
|
|
16822
16580
|
exports2.AgentService = AgentService;
|
|
16823
|
-
exports2.
|
|
16581
|
+
exports2.AttachmentModel = AttachmentModel;
|
|
16824
16582
|
exports2.AuthService = AuthService;
|
|
16825
16583
|
exports2.BaseApiService = BaseApiService;
|
|
16826
16584
|
exports2.BaseField = BaseField;
|
|
@@ -16831,17 +16589,19 @@ var __publicField = (obj, key, value) => {
|
|
|
16831
16589
|
exports2.ColorPicker = ColorPicker;
|
|
16832
16590
|
exports2.Colors = Colors;
|
|
16833
16591
|
exports2.ColorsToString = ColorsToString;
|
|
16592
|
+
exports2.ComponentAttachmentService = ComponentAttachmentService;
|
|
16834
16593
|
exports2.ComponentService = ComponentService;
|
|
16835
16594
|
exports2.ComponentStageColors = ComponentStageColors;
|
|
16836
16595
|
exports2.ComponentStageCompletionService = ComponentStageCompletionService;
|
|
16837
16596
|
exports2.ComponentStageService = ComponentStageService;
|
|
16597
|
+
exports2.ComponentTypeAttachmentService = ComponentTypeAttachmentService;
|
|
16838
16598
|
exports2.ComponentTypeService = ComponentTypeService;
|
|
16839
16599
|
exports2.DEFAULT_ISSUE_PRIORITY = DEFAULT_ISSUE_PRIORITY;
|
|
16840
16600
|
exports2.DEFAULT_ISSUE_STATUS = DEFAULT_ISSUE_STATUS;
|
|
16841
16601
|
exports2.DateField = DateField;
|
|
16842
16602
|
exports2.DateInput = DateInput;
|
|
16603
|
+
exports2.DocumentAttachmentService = DocumentAttachmentService;
|
|
16843
16604
|
exports2.DocumentService = DocumentService;
|
|
16844
|
-
exports2.DocumentTeamLinkService = DocumentTeamLinkService;
|
|
16845
16605
|
exports2.EmailDomainsService = EmailDomainsService;
|
|
16846
16606
|
exports2.EmailVerificationService = EmailVerificationService;
|
|
16847
16607
|
exports2.FieldSection = FieldSection;
|
|
@@ -16864,6 +16624,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16864
16624
|
exports2.InputWithHelpText = InputWithHelpText;
|
|
16865
16625
|
exports2.InputWithLabel = InputWithLabel;
|
|
16866
16626
|
exports2.InputWithLabelAndHelpText = InputWithLabelAndHelpText;
|
|
16627
|
+
exports2.IssueAttachmentService = IssueAttachmentService;
|
|
16867
16628
|
exports2.IssueCommentService = IssueCommentService;
|
|
16868
16629
|
exports2.IssuePriority = IssuePriority;
|
|
16869
16630
|
exports2.IssueService = IssueService;
|
|
@@ -16896,6 +16657,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16896
16657
|
exports2.PatchFormProvider = PatchFormProvider;
|
|
16897
16658
|
exports2.ProjectAccessLevel = ProjectAccessLevel;
|
|
16898
16659
|
exports2.ProjectAccessService = ProjectAccessService;
|
|
16660
|
+
exports2.ProjectAttachmentService = ProjectAttachmentService;
|
|
16899
16661
|
exports2.ProjectFileService = ProjectFileService;
|
|
16900
16662
|
exports2.ProjectService = ProjectService;
|
|
16901
16663
|
exports2.ProjectType = ProjectType;
|
|
@@ -16935,7 +16697,6 @@ var __publicField = (obj, key, value) => {
|
|
|
16935
16697
|
exports2.addComponentsInBatches = addComponentsInBatches;
|
|
16936
16698
|
exports2.addDocumentAttachment = addDocumentAttachment;
|
|
16937
16699
|
exports2.addDocumentAttachments = addDocumentAttachments;
|
|
16938
|
-
exports2.addDocumentTeamLink = addDocumentTeamLink;
|
|
16939
16700
|
exports2.addDocuments = addDocuments;
|
|
16940
16701
|
exports2.addEmailDomain = addEmailDomain;
|
|
16941
16702
|
exports2.addFavouriteProjectId = addFavouriteProjectId;
|
|
@@ -16955,7 +16716,6 @@ var __publicField = (obj, key, value) => {
|
|
|
16955
16716
|
exports2.addIssueComment = addIssueComment;
|
|
16956
16717
|
exports2.addIssueComments = addIssueComments;
|
|
16957
16718
|
exports2.addIssueType = addIssueType;
|
|
16958
|
-
exports2.addIssueTypeTeamLink = addIssueTypeTeamLink;
|
|
16959
16719
|
exports2.addIssueUpdate = addIssueUpdate;
|
|
16960
16720
|
exports2.addIssueUpdates = addIssueUpdates;
|
|
16961
16721
|
exports2.addIssues = addIssues;
|
|
@@ -16973,7 +16733,6 @@ var __publicField = (obj, key, value) => {
|
|
|
16973
16733
|
exports2.addStages = addStages;
|
|
16974
16734
|
exports2.addTeam = addTeam;
|
|
16975
16735
|
exports2.addToRecentIssues = addToRecentIssues;
|
|
16976
|
-
exports2.addUserFormTeamLink = addUserFormTeamLink;
|
|
16977
16736
|
exports2.addUsers = addUsers;
|
|
16978
16737
|
exports2.addWorkspace = addWorkspace;
|
|
16979
16738
|
exports2.areArraysEqual = areArraysEqual;
|
|
@@ -17005,8 +16764,6 @@ var __publicField = (obj, key, value) => {
|
|
|
17005
16764
|
exports2.defaultBadgeColor = defaultBadgeColor;
|
|
17006
16765
|
exports2.defaultStore = defaultStore;
|
|
17007
16766
|
exports2.deleteComponentType = deleteComponentType;
|
|
17008
|
-
exports2.deleteDocumentTeamLink = deleteDocumentTeamLink;
|
|
17009
|
-
exports2.deleteDocumentTeamLinks = deleteDocumentTeamLinks;
|
|
17010
16767
|
exports2.deleteForm = deleteForm;
|
|
17011
16768
|
exports2.deleteFormRevision = deleteFormRevision;
|
|
17012
16769
|
exports2.deleteFormRevisionAttachment = deleteFormRevisionAttachment;
|
|
@@ -17016,19 +16773,13 @@ var __publicField = (obj, key, value) => {
|
|
|
17016
16773
|
exports2.deleteFormSubmissionAttachment = deleteFormSubmissionAttachment;
|
|
17017
16774
|
exports2.deleteFormSubmissionAttachments = deleteFormSubmissionAttachments;
|
|
17018
16775
|
exports2.deleteFormSubmissions = deleteFormSubmissions;
|
|
17019
|
-
exports2.deleteIssueTypeTeamLink = deleteIssueTypeTeamLink;
|
|
17020
|
-
exports2.deleteIssueTypeTeamLinks = deleteIssueTypeTeamLinks;
|
|
17021
16776
|
exports2.deleteProject = deleteProject;
|
|
17022
16777
|
exports2.deleteTeam = deleteTeam;
|
|
17023
|
-
exports2.deleteUserFormTeamLink = deleteUserFormTeamLink;
|
|
17024
|
-
exports2.deleteUserFormTeamLinks = deleteUserFormTeamLinks;
|
|
17025
16778
|
exports2.dequeue = dequeue;
|
|
17026
16779
|
exports2.deserialize = deserialize;
|
|
17027
16780
|
exports2.deserializeField = deserializeField;
|
|
17028
16781
|
exports2.discard = discard;
|
|
17029
16782
|
exports2.documentSlice = documentSlice;
|
|
17030
|
-
exports2.documentTeamLinkReducer = documentTeamLinkReducer;
|
|
17031
|
-
exports2.documentTeamLinkSlice = documentTeamLinkSlice;
|
|
17032
16783
|
exports2.documentsReducer = documentsReducer;
|
|
17033
16784
|
exports2.downloadFile = downloadFile;
|
|
17034
16785
|
exports2.downloadInMemoryFile = downloadInMemoryFile;
|
|
@@ -17081,8 +16832,6 @@ var __publicField = (obj, key, value) => {
|
|
|
17081
16832
|
exports2.issueToSearchResult = issueToSearchResult;
|
|
17082
16833
|
exports2.issueTypeReducer = issueTypeReducer;
|
|
17083
16834
|
exports2.issueTypeSlice = issueTypeSlice;
|
|
17084
|
-
exports2.issueTypeTeamLinkReducer = issueTypeTeamLinkReducer;
|
|
17085
|
-
exports2.issueTypeTeamLinkSlice = issueTypeTeamLinkSlice;
|
|
17086
16835
|
exports2.licenseReducer = licenseReducer;
|
|
17087
16836
|
exports2.licenseSlice = licenseSlice;
|
|
17088
16837
|
exports2.linkStageToForm = linkStageToForm;
|
|
@@ -17139,6 +16888,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17139
16888
|
exports2.removeFavouriteProjectId = removeFavouriteProjectId;
|
|
17140
16889
|
exports2.removeIssue = removeIssue;
|
|
17141
16890
|
exports2.removeIssueAttachment = removeIssueAttachment;
|
|
16891
|
+
exports2.removeIssueAttachments = removeIssueAttachments;
|
|
17142
16892
|
exports2.removeIssueComment = removeIssueComment;
|
|
17143
16893
|
exports2.removeIssueComments = removeIssueComments;
|
|
17144
16894
|
exports2.removeIssueType = removeIssueType;
|
|
@@ -17232,12 +16982,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17232
16982
|
exports2.selectDocument = selectDocument;
|
|
17233
16983
|
exports2.selectDocumentAttachment = selectDocumentAttachment;
|
|
17234
16984
|
exports2.selectDocumentAttachmentMapping = selectDocumentAttachmentMapping;
|
|
17235
|
-
exports2.selectDocumentTeamLinks = selectDocumentTeamLinks;
|
|
17236
|
-
exports2.selectDocumentTeamLinksMapping = selectDocumentTeamLinksMapping;
|
|
17237
|
-
exports2.selectDocumentTeamLinksOfDocument = selectDocumentTeamLinksOfDocument;
|
|
17238
|
-
exports2.selectDocumentTeamLinksOfTeam = selectDocumentTeamLinksOfTeam;
|
|
17239
16985
|
exports2.selectDocuments = selectDocuments;
|
|
17240
|
-
exports2.selectDocumentsLinkedToTeam = selectDocumentsLinkedToTeam;
|
|
17241
16986
|
exports2.selectDocumentsMapping = selectDocumentsMapping;
|
|
17242
16987
|
exports2.selectEmailDomainsAsMapping = selectEmailDomainsAsMapping;
|
|
17243
16988
|
exports2.selectEnableClustering = selectEnableClustering;
|
|
@@ -17283,12 +17028,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17283
17028
|
exports2.selectIssueMapping = selectIssueMapping;
|
|
17284
17029
|
exports2.selectIssueType = selectIssueType;
|
|
17285
17030
|
exports2.selectIssueTypeMapping = selectIssueTypeMapping;
|
|
17286
|
-
exports2.selectIssueTypeTeamLinkMapping = selectIssueTypeTeamLinkMapping;
|
|
17287
|
-
exports2.selectIssueTypeTeamLinks = selectIssueTypeTeamLinks;
|
|
17288
|
-
exports2.selectIssueTypeTeamLinksOfIssueType = selectIssueTypeTeamLinksOfIssueType;
|
|
17289
|
-
exports2.selectIssueTypeTeamLinksOfTeam = selectIssueTypeTeamLinksOfTeam;
|
|
17290
17031
|
exports2.selectIssueTypes = selectIssueTypes;
|
|
17291
|
-
exports2.selectIssueTypesLinkedToTeam = selectIssueTypesLinkedToTeam;
|
|
17292
17032
|
exports2.selectIssueTypesOfOrganization = selectIssueTypesOfOrganization;
|
|
17293
17033
|
exports2.selectIssueUpdateMapping = selectIssueUpdateMapping;
|
|
17294
17034
|
exports2.selectIssueUpdatesOfIssue = selectIssueUpdatesOfIssue;
|
|
@@ -17323,6 +17063,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17323
17063
|
exports2.selectProjectAccessForUser = selectProjectAccessForUser;
|
|
17324
17064
|
exports2.selectProjectAccessUserMapping = selectProjectAccessUserMapping;
|
|
17325
17065
|
exports2.selectProjectAccesses = selectProjectAccesses;
|
|
17066
|
+
exports2.selectProjectAttachment = selectProjectAttachment;
|
|
17326
17067
|
exports2.selectProjectAttachmentMapping = selectProjectAttachmentMapping;
|
|
17327
17068
|
exports2.selectProjectFileVisibility = selectProjectFileVisibility;
|
|
17328
17069
|
exports2.selectProjectFiles = selectProjectFiles;
|
|
@@ -17351,21 +17092,13 @@ var __publicField = (obj, key, value) => {
|
|
|
17351
17092
|
exports2.selectStagesFromStageIds = selectStagesFromStageIds;
|
|
17352
17093
|
exports2.selectTeam = selectTeam;
|
|
17353
17094
|
exports2.selectTeams = selectTeams;
|
|
17354
|
-
exports2.selectTeamsLinkedToDocument = selectTeamsLinkedToDocument;
|
|
17355
|
-
exports2.selectTeamsLinkedToIssueType = selectTeamsLinkedToIssueType;
|
|
17356
|
-
exports2.selectTeamsLinkedToUserForm = selectTeamsLinkedToUserForm;
|
|
17357
17095
|
exports2.selectTeamsMapping = selectTeamsMapping;
|
|
17358
17096
|
exports2.selectTeamsOfOrganization = selectTeamsOfOrganization;
|
|
17359
17097
|
exports2.selectTeamsOfUser = selectTeamsOfUser;
|
|
17360
17098
|
exports2.selectUploadUrl = selectUploadUrl;
|
|
17361
17099
|
exports2.selectUsedColors = selectUsedColors;
|
|
17362
17100
|
exports2.selectUser = selectUser;
|
|
17363
|
-
exports2.selectUserFormLinksOfForm = selectUserFormLinksOfForm;
|
|
17364
|
-
exports2.selectUserFormLinksOfTeam = selectUserFormLinksOfTeam;
|
|
17365
17101
|
exports2.selectUserFormRevisionAttachmentsMapping = selectUserFormRevisionAttachmentsMapping;
|
|
17366
|
-
exports2.selectUserFormTeamLinkMapping = selectUserFormTeamLinkMapping;
|
|
17367
|
-
exports2.selectUserFormTeamLinks = selectUserFormTeamLinks;
|
|
17368
|
-
exports2.selectUserFormsLinkedToTeam = selectUserFormsLinkedToTeam;
|
|
17369
17102
|
exports2.selectUsersAsMapping = selectUsersAsMapping;
|
|
17370
17103
|
exports2.selectVisibleStatuses = selectVisibleStatuses;
|
|
17371
17104
|
exports2.selectVisibleUserIds = selectVisibleUserIds;
|
|
@@ -17380,15 +17113,16 @@ var __publicField = (obj, key, value) => {
|
|
|
17380
17113
|
exports2.setAppearance = setAppearance;
|
|
17381
17114
|
exports2.setCategories = setCategories;
|
|
17382
17115
|
exports2.setCenterMapToProject = setCenterMapToProject;
|
|
17116
|
+
exports2.setComponentAttachment = setComponentAttachment;
|
|
17383
17117
|
exports2.setComponentAttachments = setComponentAttachments;
|
|
17118
|
+
exports2.setComponentTypeAttachment = setComponentTypeAttachment;
|
|
17384
17119
|
exports2.setComponentTypeAttachments = setComponentTypeAttachments;
|
|
17385
17120
|
exports2.setComponentTypes = setComponentTypes;
|
|
17386
17121
|
exports2.setComponents = setComponents;
|
|
17387
17122
|
exports2.setCreateProjectType = setCreateProjectType;
|
|
17388
17123
|
exports2.setCurrentUser = setCurrentUser;
|
|
17124
|
+
exports2.setDocumentAttachment = setDocumentAttachment;
|
|
17389
17125
|
exports2.setDocumentAttachments = setDocumentAttachments;
|
|
17390
|
-
exports2.setDocumentTeamLink = setDocumentTeamLink;
|
|
17391
|
-
exports2.setDocumentTeamLinks = setDocumentTeamLinks;
|
|
17392
17126
|
exports2.setDocuments = setDocuments;
|
|
17393
17127
|
exports2.setEmailDomains = setEmailDomains;
|
|
17394
17128
|
exports2.setEnableClustering = setEnableClustering;
|
|
@@ -17404,12 +17138,11 @@ var __publicField = (obj, key, value) => {
|
|
|
17404
17138
|
exports2.setIsFetchingInitialData = setIsFetchingInitialData;
|
|
17405
17139
|
exports2.setIsImportingProjectFile = setIsImportingProjectFile;
|
|
17406
17140
|
exports2.setIsLoading = setIsLoading;
|
|
17141
|
+
exports2.setIssueAttachment = setIssueAttachment;
|
|
17407
17142
|
exports2.setIssueAttachments = setIssueAttachments;
|
|
17408
17143
|
exports2.setIssueComment = setIssueComment;
|
|
17409
17144
|
exports2.setIssueComments = setIssueComments;
|
|
17410
17145
|
exports2.setIssueType = setIssueType;
|
|
17411
|
-
exports2.setIssueTypeTeamLink = setIssueTypeTeamLink;
|
|
17412
|
-
exports2.setIssueTypeTeamLinks = setIssueTypeTeamLinks;
|
|
17413
17146
|
exports2.setIssueTypes = setIssueTypes;
|
|
17414
17147
|
exports2.setIssueUpdates = setIssueUpdates;
|
|
17415
17148
|
exports2.setIssues = setIssues;
|
|
@@ -17420,6 +17153,7 @@ var __publicField = (obj, key, value) => {
|
|
|
17420
17153
|
exports2.setOrganizations = setOrganizations;
|
|
17421
17154
|
exports2.setProfilePicture = setProfilePicture;
|
|
17422
17155
|
exports2.setProjectAccesses = setProjectAccesses;
|
|
17156
|
+
exports2.setProjectAttachment = setProjectAttachment;
|
|
17423
17157
|
exports2.setProjectAttachments = setProjectAttachments;
|
|
17424
17158
|
exports2.setProjectFileVisible = setProjectFileVisible;
|
|
17425
17159
|
exports2.setProjects = setProjects;
|
|
@@ -17431,8 +17165,6 @@ var __publicField = (obj, key, value) => {
|
|
|
17431
17165
|
exports2.setTokens = setTokens;
|
|
17432
17166
|
exports2.setTourStep = setTourStep;
|
|
17433
17167
|
exports2.setUploadUrl = setUploadUrl;
|
|
17434
|
-
exports2.setUserFormTeamLink = setUserFormTeamLink;
|
|
17435
|
-
exports2.setUserFormTeamLinks = setUserFormTeamLinks;
|
|
17436
17168
|
exports2.setUsers = setUsers;
|
|
17437
17169
|
exports2.setVisibleStatuses = setVisibleStatuses;
|
|
17438
17170
|
exports2.setVisibleUserIds = setVisibleUserIds;
|
|
@@ -17456,20 +17188,25 @@ var __publicField = (obj, key, value) => {
|
|
|
17456
17188
|
exports2.updateActiveOrganization = updateActiveOrganization;
|
|
17457
17189
|
exports2.updateComponent = updateComponent;
|
|
17458
17190
|
exports2.updateComponentAttachment = updateComponentAttachment;
|
|
17191
|
+
exports2.updateComponentAttachments = updateComponentAttachments;
|
|
17459
17192
|
exports2.updateComponentTypeAttachment = updateComponentTypeAttachment;
|
|
17193
|
+
exports2.updateComponentTypeAttachments = updateComponentTypeAttachments;
|
|
17460
17194
|
exports2.updateDocumentAttachment = updateDocumentAttachment;
|
|
17195
|
+
exports2.updateDocumentAttachments = updateDocumentAttachments;
|
|
17461
17196
|
exports2.updateDocuments = updateDocuments;
|
|
17462
17197
|
exports2.updateFormSubmission = updateFormSubmission;
|
|
17463
17198
|
exports2.updateFormSubmissionAttachments = updateFormSubmissionAttachments;
|
|
17464
17199
|
exports2.updateFormSubmissions = updateFormSubmissions;
|
|
17465
17200
|
exports2.updateIssue = updateIssue;
|
|
17466
17201
|
exports2.updateIssueAttachment = updateIssueAttachment;
|
|
17202
|
+
exports2.updateIssueAttachments = updateIssueAttachments;
|
|
17467
17203
|
exports2.updateIssueType = updateIssueType;
|
|
17468
17204
|
exports2.updateLicense = updateLicense;
|
|
17469
17205
|
exports2.updateOrCreateProject = updateOrCreateProject;
|
|
17470
17206
|
exports2.updateOrganizationAccess = updateOrganizationAccess;
|
|
17471
17207
|
exports2.updateProjectAccess = updateProjectAccess;
|
|
17472
17208
|
exports2.updateProjectAttachment = updateProjectAttachment;
|
|
17209
|
+
exports2.updateProjectAttachments = updateProjectAttachments;
|
|
17473
17210
|
exports2.updateStages = updateStages;
|
|
17474
17211
|
exports2.updateTeam = updateTeam;
|
|
17475
17212
|
exports2.useAppDispatch = useAppDispatch;
|
|
@@ -17481,8 +17218,6 @@ var __publicField = (obj, key, value) => {
|
|
|
17481
17218
|
exports2.useFormikInput = useFormikInput;
|
|
17482
17219
|
exports2.useMemoCompare = useMemoCompare;
|
|
17483
17220
|
exports2.useSDK = useSDK;
|
|
17484
|
-
exports2.userFormTeamLinkReducer = userFormTeamLinkReducer;
|
|
17485
|
-
exports2.userFormTeamLinkSlice = userFormTeamLinkSlice;
|
|
17486
17221
|
exports2.userReducer = userReducer;
|
|
17487
17222
|
exports2.userSlice = userSlice;
|
|
17488
17223
|
exports2.valueIsFile = valueIsFile;
|