@overmap-ai/core 1.0.53-add-agent-conversations.6 → 1.0.53-attachment-creation-flows.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/overmap-core.js +1163 -1120
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +1129 -1086
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/sdk.d.ts +6 -2
- package/dist/sdk/services/AgentService.d.ts +30 -2
- 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 -1
- package/dist/store/slices/categorySlice.d.ts +0 -1
- 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 -3
- package/dist/store/slices/formRevisionSlice.d.ts +0 -1
- package/dist/store/slices/index.d.ts +0 -1
- package/dist/store/slices/issueSlice.d.ts +33 -22
- package/dist/store/slices/projectFileSlice.d.ts +0 -1
- 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 -1
- package/dist/store/store.d.ts +1 -4
- package/dist/typings/models/attachments.d.ts +7 -0
- package/dist/typings/models/index.d.ts +0 -1
- package/dist/typings/models/projects.d.ts +4 -5
- package/dist/utils/utils.d.ts +0 -1
- package/package.json +153 -153
- package/dist/sdk/services/AttachmentService.d.ts +0 -46
- package/dist/store/slices/agentsSlice.d.ts +0 -15
- package/dist/typings/models/agents.d.ts +0 -44
package/dist/overmap-core.js
CHANGED
|
@@ -8,7 +8,7 @@ var _a;
|
|
|
8
8
|
import * as React from "react";
|
|
9
9
|
import React__default, { useState, useEffect, useRef, memo, useMemo, useCallback, createContext, createElement, useContext, forwardRef, Children, isValidElement, cloneElement, Fragment as Fragment$1, useLayoutEffect, useReducer, lazy, Suspense } from "react";
|
|
10
10
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
11
|
-
import { unsafeShowToast, AlertDialogProvider, ToastProvider, DefaultTheme, Flex as Flex$1, IconButton, RiIcon, Text as Text$1, useSeverityColor,
|
|
11
|
+
import { unsafeShowToast, AlertDialogProvider, ToastProvider, DefaultTheme, Flex as Flex$1, IconButton, RiIcon, Text as Text$1, useSeverityColor, TextArea, Select, useToast, Badge, MultiSelect, Overlay, Button, Spinner, useViewportSize, ButtonGroup, IconColorUtility, Tooltip, Popover, useSize, ToggleButton, Separator, OvermapItem, ButtonList, divButtonProps, OvermapDropdownMenu, Checkbox as Checkbox$1, Input, useAlertDialog } from "@overmap-ai/blocks";
|
|
12
12
|
import { DepGraph } from "dependency-graph";
|
|
13
13
|
import { offline as offline$1 } from "@redux-offline/redux-offline";
|
|
14
14
|
import offlineConfig from "@redux-offline/redux-offline/lib/defaults";
|
|
@@ -24,6 +24,7 @@ import jwtDecode from "jwt-decode";
|
|
|
24
24
|
import { RESET_STATE } from "@redux-offline/redux-offline/lib/constants";
|
|
25
25
|
import { openDB } from "idb";
|
|
26
26
|
import { useField, useFormikContext, useFormik, FormikProvider } from "formik";
|
|
27
|
+
import { flushSync } from "react-dom";
|
|
27
28
|
import get from "lodash.get";
|
|
28
29
|
import Linkify from "linkify-react";
|
|
29
30
|
import { DragDropContext, Droppable, Draggable } from "@hello-pangea/dnd";
|
|
@@ -32,7 +33,6 @@ import { read, utils } from "xlsx";
|
|
|
32
33
|
import { pdfjs, Document, Page } from "react-pdf";
|
|
33
34
|
import "react-pdf/dist/Page/AnnotationLayer.css";
|
|
34
35
|
import "react-pdf/dist/Page/TextLayer.css";
|
|
35
|
-
import { flushSync } from "react-dom";
|
|
36
36
|
import { ReactSketchCanvas } from "react-sketch-canvas";
|
|
37
37
|
import set from "lodash.set";
|
|
38
38
|
import cloneDeep from "lodash.clonedeep";
|
|
@@ -678,15 +678,15 @@ const wrapMigration = (migrator) => (state) => {
|
|
|
678
678
|
};
|
|
679
679
|
const migrations = [initialVersioning, signOut, signOut, createOutboxState];
|
|
680
680
|
const manifest = Object.fromEntries(migrations.map((migration2, i) => [i, wrapMigration(migration2)]));
|
|
681
|
-
const initialState$
|
|
681
|
+
const initialState$r = {
|
|
682
682
|
accessToken: "",
|
|
683
683
|
refreshToken: "",
|
|
684
684
|
isLoggedIn: false
|
|
685
685
|
};
|
|
686
686
|
const authSlice = createSlice({
|
|
687
687
|
name: "auth",
|
|
688
|
-
initialState: initialState$
|
|
689
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
688
|
+
initialState: initialState$r,
|
|
689
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$r)),
|
|
690
690
|
reducers: {
|
|
691
691
|
setTokens: (state, action) => {
|
|
692
692
|
state.accessToken = action.payload.accessToken;
|
|
@@ -964,7 +964,6 @@ function truncate(str, maxLength) {
|
|
|
964
964
|
return subString.slice(0, subString.lastIndexOf(" ")) + "…";
|
|
965
965
|
}
|
|
966
966
|
const restructureCreateSelectorWithArgs = (selector) => (args) => (state) => selector(state, args);
|
|
967
|
-
const createSelectorWithArgs = restructureCreateSelectorWithArgs;
|
|
968
967
|
function onlyUniqueOfflineIds(value, index2, self2) {
|
|
969
968
|
return self2.findIndex((v) => v.offline_id === value.offline_id) === index2;
|
|
970
969
|
}
|
|
@@ -1431,7 +1430,7 @@ const getLocalRelativeDateString = memoize((date, min, max) => {
|
|
|
1431
1430
|
return getLocalDateString(date);
|
|
1432
1431
|
return relative.format(days, "days");
|
|
1433
1432
|
});
|
|
1434
|
-
const initialState$
|
|
1433
|
+
const initialState$q = {
|
|
1435
1434
|
categories: {},
|
|
1436
1435
|
usedCategoryColors: [],
|
|
1437
1436
|
categoryVisibility: {
|
|
@@ -1441,8 +1440,8 @@ const initialState$r = {
|
|
|
1441
1440
|
};
|
|
1442
1441
|
const categorySlice = createSlice({
|
|
1443
1442
|
name: "categories",
|
|
1444
|
-
initialState: initialState$
|
|
1445
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1443
|
+
initialState: initialState$q,
|
|
1444
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$q)),
|
|
1446
1445
|
reducers: {
|
|
1447
1446
|
setCategories: (state, action) => {
|
|
1448
1447
|
if (!Array.isArray(action.payload))
|
|
@@ -1578,6 +1577,9 @@ const selectIssueCountOfCategory = (categoryId) => (state) => {
|
|
|
1578
1577
|
return Object.values(state.issueReducer.issues).filter((issue) => issue.category === categoryId).length;
|
|
1579
1578
|
};
|
|
1580
1579
|
const categoryReducer = categorySlice.reducer;
|
|
1580
|
+
function setAttachment(state, action) {
|
|
1581
|
+
state.attachments[action.payload.offline_id] = action.payload;
|
|
1582
|
+
}
|
|
1581
1583
|
function setAttachments(state, action) {
|
|
1582
1584
|
state.attachments = {};
|
|
1583
1585
|
for (const attachment of action.payload) {
|
|
@@ -1602,6 +1604,15 @@ function updateAttachment(state, action) {
|
|
|
1602
1604
|
throw new Error(`Attachment ${action.payload.offline_id} does not exist.`);
|
|
1603
1605
|
}
|
|
1604
1606
|
}
|
|
1607
|
+
function updateAttachments(state, action) {
|
|
1608
|
+
for (const attachment of action.payload) {
|
|
1609
|
+
if (attachment.offline_id in state.attachments) {
|
|
1610
|
+
state.attachments[attachment.offline_id] = attachment;
|
|
1611
|
+
} else {
|
|
1612
|
+
throw new Error(`Attachment ${attachment.offline_id} does not exist.`);
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1605
1616
|
function removeAttachment(state, action) {
|
|
1606
1617
|
if (action.payload in state.attachments) {
|
|
1607
1618
|
delete state.attachments[action.payload];
|
|
@@ -1614,14 +1625,14 @@ function removeAttachments(state, action) {
|
|
|
1614
1625
|
delete state.attachments[attachmentId];
|
|
1615
1626
|
}
|
|
1616
1627
|
}
|
|
1617
|
-
const initialState$
|
|
1628
|
+
const initialState$p = {
|
|
1618
1629
|
components: {},
|
|
1619
1630
|
attachments: {}
|
|
1620
1631
|
};
|
|
1621
1632
|
const componentSlice = createSlice({
|
|
1622
1633
|
name: "components",
|
|
1623
|
-
initialState: initialState$
|
|
1624
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1634
|
+
initialState: initialState$p,
|
|
1635
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$p)),
|
|
1625
1636
|
reducers: {
|
|
1626
1637
|
addComponent: (state, action) => {
|
|
1627
1638
|
state.components[action.payload.offline_id] = action.payload;
|
|
@@ -1635,12 +1646,6 @@ const componentSlice = createSlice({
|
|
|
1635
1646
|
state.components = toOfflineIdRecord(action.payload);
|
|
1636
1647
|
prevComponents = null;
|
|
1637
1648
|
},
|
|
1638
|
-
setComponentAttachments: setAttachments,
|
|
1639
|
-
addComponentAttachment: addAttachment,
|
|
1640
|
-
addComponentAttachments: addAttachments,
|
|
1641
|
-
updateComponentAttachment: updateAttachment,
|
|
1642
|
-
removeComponentAttachment: removeAttachment,
|
|
1643
|
-
removeComponentAttachments: removeAttachments,
|
|
1644
1649
|
updateComponent: (state, action) => {
|
|
1645
1650
|
if (action.payload.offline_id in state.components) {
|
|
1646
1651
|
state.components[action.payload.offline_id] = action.payload;
|
|
@@ -1665,9 +1670,35 @@ const componentSlice = createSlice({
|
|
|
1665
1670
|
}
|
|
1666
1671
|
}
|
|
1667
1672
|
prevComponents = null;
|
|
1668
|
-
}
|
|
1673
|
+
},
|
|
1674
|
+
// Attachments
|
|
1675
|
+
setComponentAttachment: setAttachment,
|
|
1676
|
+
setComponentAttachments: setAttachments,
|
|
1677
|
+
addComponentAttachment: addAttachment,
|
|
1678
|
+
addComponentAttachments: addAttachments,
|
|
1679
|
+
updateComponentAttachment: updateAttachment,
|
|
1680
|
+
updateComponentAttachments: updateAttachments,
|
|
1681
|
+
removeComponentAttachment: removeAttachment,
|
|
1682
|
+
removeComponentAttachments: removeAttachments
|
|
1669
1683
|
}
|
|
1670
1684
|
});
|
|
1685
|
+
const {
|
|
1686
|
+
addComponent,
|
|
1687
|
+
updateComponent,
|
|
1688
|
+
removeComponent,
|
|
1689
|
+
addComponentsInBatches,
|
|
1690
|
+
setComponents,
|
|
1691
|
+
removeAllComponentsOfType,
|
|
1692
|
+
// Attachments
|
|
1693
|
+
setComponentAttachment,
|
|
1694
|
+
setComponentAttachments,
|
|
1695
|
+
addComponentAttachment,
|
|
1696
|
+
addComponentAttachments,
|
|
1697
|
+
updateComponentAttachment,
|
|
1698
|
+
updateComponentAttachments,
|
|
1699
|
+
removeComponentAttachment,
|
|
1700
|
+
removeComponentAttachments
|
|
1701
|
+
} = componentSlice.actions;
|
|
1671
1702
|
let prevComponents = null;
|
|
1672
1703
|
const selectComponents = (state) => {
|
|
1673
1704
|
if (!prevComponents) {
|
|
@@ -1762,28 +1793,14 @@ const selectAttachmentsOfComponentByType = restructureCreateSelectorWithArgs(
|
|
|
1762
1793
|
}
|
|
1763
1794
|
)
|
|
1764
1795
|
);
|
|
1765
|
-
const {
|
|
1766
|
-
addComponent,
|
|
1767
|
-
updateComponent,
|
|
1768
|
-
removeComponent,
|
|
1769
|
-
addComponentsInBatches,
|
|
1770
|
-
setComponents,
|
|
1771
|
-
setComponentAttachments,
|
|
1772
|
-
addComponentAttachment,
|
|
1773
|
-
addComponentAttachments,
|
|
1774
|
-
updateComponentAttachment,
|
|
1775
|
-
removeComponentAttachment,
|
|
1776
|
-
removeComponentAttachments,
|
|
1777
|
-
removeAllComponentsOfType
|
|
1778
|
-
} = componentSlice.actions;
|
|
1779
1796
|
const componentReducer = componentSlice.reducer;
|
|
1780
|
-
const initialState$
|
|
1797
|
+
const initialState$o = {
|
|
1781
1798
|
completionsByComponentId: {}
|
|
1782
1799
|
};
|
|
1783
1800
|
const componentStageCompletionSlice = createSlice({
|
|
1784
1801
|
name: "componentStageCompletions",
|
|
1785
|
-
initialState: initialState$
|
|
1786
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1802
|
+
initialState: initialState$o,
|
|
1803
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$o)),
|
|
1787
1804
|
reducers: {
|
|
1788
1805
|
addStageCompletion: (state, action) => {
|
|
1789
1806
|
let stageToCompletionDateMapping = state.completionsByComponentId[action.payload.component];
|
|
@@ -1834,13 +1851,13 @@ const selectCompletedStageIdsForComponent = (component) => (state) => {
|
|
|
1834
1851
|
return Object.keys(state.componentStageCompletionReducer.completionsByComponentId[component.offline_id] ?? {});
|
|
1835
1852
|
};
|
|
1836
1853
|
const componentStageCompletionReducer = componentStageCompletionSlice.reducer;
|
|
1837
|
-
const initialState$
|
|
1854
|
+
const initialState$n = {
|
|
1838
1855
|
stages: {}
|
|
1839
1856
|
};
|
|
1840
1857
|
const componentStageSlice = createSlice({
|
|
1841
1858
|
name: "componentStages",
|
|
1842
|
-
initialState: initialState$
|
|
1843
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1859
|
+
initialState: initialState$n,
|
|
1860
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$n)),
|
|
1844
1861
|
reducers: {
|
|
1845
1862
|
addStages: (state, action) => {
|
|
1846
1863
|
Object.assign(state.stages, toOfflineIdRecord(action.payload));
|
|
@@ -1950,15 +1967,15 @@ const selectStageFormIdsFromStageIds = restructureCreateSelectorWithArgs(
|
|
|
1950
1967
|
);
|
|
1951
1968
|
const { addStages, updateStages, removeStages, linkStageToForm, unlinkStageToForm } = componentStageSlice.actions;
|
|
1952
1969
|
const componentStageReducer = componentStageSlice.reducer;
|
|
1953
|
-
const initialState$
|
|
1970
|
+
const initialState$m = {
|
|
1954
1971
|
componentTypes: {},
|
|
1955
1972
|
hiddenComponentTypeIds: {},
|
|
1956
1973
|
attachments: {}
|
|
1957
1974
|
};
|
|
1958
1975
|
const componentTypeSlice = createSlice({
|
|
1959
1976
|
name: "componentTypes",
|
|
1960
|
-
initialState: initialState$
|
|
1961
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1977
|
+
initialState: initialState$m,
|
|
1978
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$m)),
|
|
1962
1979
|
reducers: {
|
|
1963
1980
|
addComponentType: (state, action) => {
|
|
1964
1981
|
state.componentTypes[action.payload.offline_id] = action.payload;
|
|
@@ -1966,20 +1983,38 @@ const componentTypeSlice = createSlice({
|
|
|
1966
1983
|
setComponentTypes: (state, action) => {
|
|
1967
1984
|
state.componentTypes = toOfflineIdRecord(action.payload);
|
|
1968
1985
|
},
|
|
1969
|
-
setComponentTypeAttachments: setAttachments,
|
|
1970
|
-
addComponentTypeAttachment: addAttachment,
|
|
1971
|
-
addComponentTypeAttachments: addAttachments,
|
|
1972
|
-
updateComponentTypeAttachment: updateAttachment,
|
|
1973
|
-
removeComponentTypeAttachment: removeAttachment,
|
|
1974
|
-
removeComponentTypeAttachments: removeAttachments,
|
|
1975
1986
|
toggleComponentTypeVisibility: (state, action) => {
|
|
1976
1987
|
state.hiddenComponentTypeIds[action.payload] = !state.hiddenComponentTypeIds[action.payload];
|
|
1977
1988
|
},
|
|
1978
1989
|
deleteComponentType: (state, action) => {
|
|
1979
1990
|
delete state.componentTypes[action.payload];
|
|
1980
|
-
}
|
|
1991
|
+
},
|
|
1992
|
+
// Attachments
|
|
1993
|
+
setComponentTypeAttachment: setAttachment,
|
|
1994
|
+
setComponentTypeAttachments: setAttachments,
|
|
1995
|
+
addComponentTypeAttachment: addAttachment,
|
|
1996
|
+
addComponentTypeAttachments: addAttachments,
|
|
1997
|
+
updateComponentTypeAttachment: updateAttachment,
|
|
1998
|
+
updateComponentTypeAttachments: updateAttachments,
|
|
1999
|
+
removeComponentTypeAttachment: removeAttachment,
|
|
2000
|
+
removeComponentTypeAttachments: removeAttachments
|
|
1981
2001
|
}
|
|
1982
2002
|
});
|
|
2003
|
+
const {
|
|
2004
|
+
addComponentType,
|
|
2005
|
+
setComponentTypes,
|
|
2006
|
+
toggleComponentTypeVisibility,
|
|
2007
|
+
deleteComponentType,
|
|
2008
|
+
// Attachmet
|
|
2009
|
+
setComponentTypeAttachment,
|
|
2010
|
+
setComponentTypeAttachments,
|
|
2011
|
+
addComponentTypeAttachment,
|
|
2012
|
+
addComponentTypeAttachments,
|
|
2013
|
+
updateComponentTypeAttachment,
|
|
2014
|
+
updateComponentTypeAttachments,
|
|
2015
|
+
removeComponentTypeAttachment,
|
|
2016
|
+
removeComponentTypeAttachments
|
|
2017
|
+
} = componentTypeSlice.actions;
|
|
1983
2018
|
const selectComponentTypesMapping = (state) => state.componentTypeReducer.componentTypes;
|
|
1984
2019
|
const selectComponentTypes = createSelector(
|
|
1985
2020
|
[selectComponentTypesMapping],
|
|
@@ -2056,26 +2091,14 @@ const selectAttachmentsOfComponentTypeByType = restructureCreateSelectorWithArgs
|
|
|
2056
2091
|
}
|
|
2057
2092
|
)
|
|
2058
2093
|
);
|
|
2059
|
-
const {
|
|
2060
|
-
addComponentType,
|
|
2061
|
-
setComponentTypes,
|
|
2062
|
-
setComponentTypeAttachments,
|
|
2063
|
-
addComponentTypeAttachment,
|
|
2064
|
-
addComponentTypeAttachments,
|
|
2065
|
-
updateComponentTypeAttachment,
|
|
2066
|
-
removeComponentTypeAttachment,
|
|
2067
|
-
removeComponentTypeAttachments,
|
|
2068
|
-
toggleComponentTypeVisibility,
|
|
2069
|
-
deleteComponentType
|
|
2070
|
-
} = componentTypeSlice.actions;
|
|
2071
2094
|
const componentTypeReducer = componentTypeSlice.reducer;
|
|
2072
|
-
const initialState$
|
|
2095
|
+
const initialState$l = {
|
|
2073
2096
|
workspaces: {},
|
|
2074
2097
|
activeWorkspaceId: null
|
|
2075
2098
|
};
|
|
2076
2099
|
const workspaceSlice = createSlice({
|
|
2077
2100
|
name: "workspace",
|
|
2078
|
-
initialState: initialState$
|
|
2101
|
+
initialState: initialState$l,
|
|
2079
2102
|
// The `reducers` field lets us define reducers and generate associated actions
|
|
2080
2103
|
reducers: {
|
|
2081
2104
|
setWorkspaces: (state, action) => {
|
|
@@ -2132,7 +2155,7 @@ const selectPermittedWorkspaceIds = createSelector(
|
|
|
2132
2155
|
);
|
|
2133
2156
|
const workspaceReducer = workspaceSlice.reducer;
|
|
2134
2157
|
const maxRecentIssues = 10;
|
|
2135
|
-
const initialState$
|
|
2158
|
+
const initialState$k = {
|
|
2136
2159
|
issues: {},
|
|
2137
2160
|
attachments: {},
|
|
2138
2161
|
comments: {},
|
|
@@ -2144,9 +2167,9 @@ const initialState$l = {
|
|
|
2144
2167
|
};
|
|
2145
2168
|
const issueSlice = createSlice({
|
|
2146
2169
|
name: "issues",
|
|
2147
|
-
initialState: initialState$
|
|
2170
|
+
initialState: initialState$k,
|
|
2148
2171
|
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
2149
|
-
Object.assign(state, initialState$
|
|
2172
|
+
Object.assign(state, initialState$k);
|
|
2150
2173
|
}),
|
|
2151
2174
|
reducers: {
|
|
2152
2175
|
setIssues: (state, action) => {
|
|
@@ -2157,7 +2180,6 @@ const issueSlice = createSlice({
|
|
|
2157
2180
|
state.issues[issue.offline_id] = issue;
|
|
2158
2181
|
});
|
|
2159
2182
|
},
|
|
2160
|
-
setIssueAttachments: setAttachments,
|
|
2161
2183
|
setIssueUpdates: (state, action) => {
|
|
2162
2184
|
if (action.payload.filter(onlyUniqueOfflineIds).length !== action.payload.length) {
|
|
2163
2185
|
throw new Error("Tried to use setIssues reducer with duplicate ID's");
|
|
@@ -2187,8 +2209,6 @@ const issueSlice = createSlice({
|
|
|
2187
2209
|
state.issues[issue.offline_id] = issue;
|
|
2188
2210
|
}
|
|
2189
2211
|
},
|
|
2190
|
-
addIssueAttachment: addAttachment,
|
|
2191
|
-
addIssueAttachments: addAttachments,
|
|
2192
2212
|
addIssueUpdate: (state, action) => {
|
|
2193
2213
|
if (action.payload.offline_id in state.updates) {
|
|
2194
2214
|
throw new Error(`Tried to add duplicate issue update with offline_id: ${action.payload.offline_id}`);
|
|
@@ -2210,7 +2230,6 @@ const issueSlice = createSlice({
|
|
|
2210
2230
|
throw new Error(`Tried to update issue with ID that doesn't exist: ${action.payload.offline_id}`);
|
|
2211
2231
|
}
|
|
2212
2232
|
},
|
|
2213
|
-
updateIssueAttachment: updateAttachment,
|
|
2214
2233
|
removeIssue: (state, action) => {
|
|
2215
2234
|
if (action.payload in state.issues) {
|
|
2216
2235
|
delete state.issues[action.payload];
|
|
@@ -2223,7 +2242,6 @@ const issueSlice = createSlice({
|
|
|
2223
2242
|
delete state.issues[issueId];
|
|
2224
2243
|
}
|
|
2225
2244
|
},
|
|
2226
|
-
removeIssueAttachment: removeAttachment,
|
|
2227
2245
|
removeIssueUpdate: (state, action) => {
|
|
2228
2246
|
if (action.payload in state.updates) {
|
|
2229
2247
|
delete state.updates[action.payload];
|
|
@@ -2320,12 +2338,19 @@ const issueSlice = createSlice({
|
|
|
2320
2338
|
if (indexToRemove !== -1) {
|
|
2321
2339
|
state.recentIssueIds.splice(indexToRemove, 1);
|
|
2322
2340
|
}
|
|
2323
|
-
}
|
|
2341
|
+
},
|
|
2342
|
+
// Attachments
|
|
2343
|
+
setIssueAttachment: setAttachment,
|
|
2344
|
+
setIssueAttachments: setAttachments,
|
|
2345
|
+
addIssueAttachment: addAttachment,
|
|
2346
|
+
addIssueAttachments: addAttachments,
|
|
2347
|
+
updateIssueAttachment: updateAttachment,
|
|
2348
|
+
updateIssueAttachments: updateAttachments,
|
|
2349
|
+
removeIssueAttachment: removeAttachment,
|
|
2350
|
+
removeIssueAttachments: removeAttachments
|
|
2324
2351
|
}
|
|
2325
2352
|
});
|
|
2326
2353
|
const {
|
|
2327
|
-
addIssueAttachment,
|
|
2328
|
-
addIssueAttachments,
|
|
2329
2354
|
addIssue,
|
|
2330
2355
|
addIssues,
|
|
2331
2356
|
addIssueUpdate,
|
|
@@ -2333,7 +2358,6 @@ const {
|
|
|
2333
2358
|
addOrReplaceIssueComment,
|
|
2334
2359
|
addToRecentIssues,
|
|
2335
2360
|
cleanRecentIssues,
|
|
2336
|
-
removeIssueAttachment,
|
|
2337
2361
|
removeAttachmentsOfIssue,
|
|
2338
2362
|
removeIssue,
|
|
2339
2363
|
removeIssues,
|
|
@@ -2342,13 +2366,20 @@ const {
|
|
|
2342
2366
|
removeRecentIssue,
|
|
2343
2367
|
resetRecentIssues,
|
|
2344
2368
|
setActiveIssueId,
|
|
2345
|
-
setIssueAttachments,
|
|
2346
2369
|
setIssueUpdates,
|
|
2347
2370
|
setIssues,
|
|
2348
2371
|
setVisibleStatuses,
|
|
2349
2372
|
setVisibleUserIds,
|
|
2350
|
-
updateIssueAttachment,
|
|
2351
2373
|
updateIssue,
|
|
2374
|
+
// Attachments
|
|
2375
|
+
setIssueAttachment,
|
|
2376
|
+
setIssueAttachments,
|
|
2377
|
+
addIssueAttachment,
|
|
2378
|
+
addIssueAttachments,
|
|
2379
|
+
updateIssueAttachment,
|
|
2380
|
+
updateIssueAttachments,
|
|
2381
|
+
removeIssueAttachment,
|
|
2382
|
+
removeIssueAttachments,
|
|
2352
2383
|
// Commments
|
|
2353
2384
|
addIssueComment,
|
|
2354
2385
|
addIssueComments,
|
|
@@ -2571,14 +2602,14 @@ const selectRecentIssuesAsSearchResults = createSelector(
|
|
|
2571
2602
|
}
|
|
2572
2603
|
);
|
|
2573
2604
|
const issueReducer = issueSlice.reducer;
|
|
2574
|
-
const initialState$
|
|
2605
|
+
const initialState$j = {
|
|
2575
2606
|
issueTypes: {}
|
|
2576
2607
|
};
|
|
2577
2608
|
const issueTypeSlice = createSlice({
|
|
2578
2609
|
name: "issueTypes",
|
|
2579
|
-
initialState: initialState$
|
|
2610
|
+
initialState: initialState$j,
|
|
2580
2611
|
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
2581
|
-
Object.assign(state, initialState$
|
|
2612
|
+
Object.assign(state, initialState$j);
|
|
2582
2613
|
}),
|
|
2583
2614
|
reducers: {
|
|
2584
2615
|
setIssueTypes: (state, action) => {
|
|
@@ -2645,15 +2676,15 @@ const selectIssuesOfIssueTypeCount = (issueTypeId) => (state) => {
|
|
|
2645
2676
|
return ((_a2 = selectIssuesOfIssueType(issueTypeId)(state)) == null ? void 0 : _a2.length) ?? 0;
|
|
2646
2677
|
};
|
|
2647
2678
|
const issueTypeReducer = issueTypeSlice.reducer;
|
|
2648
|
-
const initialState$
|
|
2679
|
+
const initialState$i = {
|
|
2649
2680
|
s3Urls: {}
|
|
2650
2681
|
};
|
|
2651
2682
|
const msPerHour = 1e3 * 60 * 60;
|
|
2652
2683
|
const msPerWeek = msPerHour * 24 * 7;
|
|
2653
2684
|
const fileSlice = createSlice({
|
|
2654
2685
|
name: "file",
|
|
2655
|
-
initialState: initialState$
|
|
2656
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2686
|
+
initialState: initialState$i,
|
|
2687
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$i)),
|
|
2657
2688
|
reducers: {
|
|
2658
2689
|
setUploadUrl: (state, action) => {
|
|
2659
2690
|
const { url, fields, sha1 } = action.payload;
|
|
@@ -2680,7 +2711,7 @@ const selectUploadUrl = (sha1) => (state) => {
|
|
|
2680
2711
|
return url;
|
|
2681
2712
|
};
|
|
2682
2713
|
const fileReducer = fileSlice.reducer;
|
|
2683
|
-
const initialState$
|
|
2714
|
+
const initialState$h = {
|
|
2684
2715
|
// TODO: Change first MapStyle.SATELLITE to MaptStyle.None when project creation map is fixed
|
|
2685
2716
|
mapStyle: MapStyle.SATELLITE,
|
|
2686
2717
|
showTooltips: false,
|
|
@@ -2688,8 +2719,8 @@ const initialState$i = {
|
|
|
2688
2719
|
};
|
|
2689
2720
|
const mapSlice = createSlice({
|
|
2690
2721
|
name: "map",
|
|
2691
|
-
initialState: initialState$
|
|
2692
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2722
|
+
initialState: initialState$h,
|
|
2723
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$h)),
|
|
2693
2724
|
reducers: {
|
|
2694
2725
|
setMapStyle: (state, action) => {
|
|
2695
2726
|
state.mapStyle = action.payload;
|
|
@@ -2717,6 +2748,14 @@ var OrganizationAccessLevel = /* @__PURE__ */ ((OrganizationAccessLevel2) => {
|
|
|
2717
2748
|
OrganizationAccessLevel2[OrganizationAccessLevel2["ADMIN"] = 2] = "ADMIN";
|
|
2718
2749
|
return OrganizationAccessLevel2;
|
|
2719
2750
|
})(OrganizationAccessLevel || {});
|
|
2751
|
+
var AttachmentModel = /* @__PURE__ */ ((AttachmentModel2) => {
|
|
2752
|
+
AttachmentModel2["Issue"] = "issue";
|
|
2753
|
+
AttachmentModel2["Component"] = "component";
|
|
2754
|
+
AttachmentModel2["ComponentType"] = "component_type";
|
|
2755
|
+
AttachmentModel2["Project"] = "project";
|
|
2756
|
+
AttachmentModel2["Document"] = "document";
|
|
2757
|
+
return AttachmentModel2;
|
|
2758
|
+
})(AttachmentModel || {});
|
|
2720
2759
|
var IssueUpdateChange = /* @__PURE__ */ ((IssueUpdateChange2) => {
|
|
2721
2760
|
IssueUpdateChange2["STATUS"] = "status";
|
|
2722
2761
|
IssueUpdateChange2["PRIORITY"] = "priority";
|
|
@@ -2758,7 +2797,7 @@ var LicenseStatus = /* @__PURE__ */ ((LicenseStatus2) => {
|
|
|
2758
2797
|
LicenseStatus2[LicenseStatus2["PAST_DUE"] = 8] = "PAST_DUE";
|
|
2759
2798
|
return LicenseStatus2;
|
|
2760
2799
|
})(LicenseStatus || {});
|
|
2761
|
-
const initialState$
|
|
2800
|
+
const initialState$g = {
|
|
2762
2801
|
users: {},
|
|
2763
2802
|
currentUser: {
|
|
2764
2803
|
id: 0,
|
|
@@ -2769,8 +2808,8 @@ const initialState$h = {
|
|
|
2769
2808
|
};
|
|
2770
2809
|
const userSlice = createSlice({
|
|
2771
2810
|
name: "users",
|
|
2772
|
-
initialState: initialState$
|
|
2773
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2811
|
+
initialState: initialState$g,
|
|
2812
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$g)),
|
|
2774
2813
|
reducers: {
|
|
2775
2814
|
setUsers: (state, action) => {
|
|
2776
2815
|
const usersMapping = {};
|
|
@@ -2832,13 +2871,13 @@ const selectUser = (userId) => (state) => {
|
|
|
2832
2871
|
const selectUsersAsMapping = (state) => state.userReducer.users;
|
|
2833
2872
|
const selectFavouriteProjects = (state) => state.userReducer.currentUser.profile.favourite_project_ids;
|
|
2834
2873
|
const userReducer = userSlice.reducer;
|
|
2835
|
-
const initialState$
|
|
2874
|
+
const initialState$f = {
|
|
2836
2875
|
organizationAccesses: {}
|
|
2837
2876
|
};
|
|
2838
2877
|
const organizationAccessSlice = createSlice({
|
|
2839
2878
|
name: "organizationAccess",
|
|
2840
|
-
initialState: initialState$
|
|
2841
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2879
|
+
initialState: initialState$f,
|
|
2880
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$f)),
|
|
2842
2881
|
reducers: {
|
|
2843
2882
|
setOrganizationAccesses: (state, action) => {
|
|
2844
2883
|
if (!Array.isArray(action.payload))
|
|
@@ -2901,13 +2940,13 @@ const selectOrganizationAccessUserMapping = (state) => {
|
|
|
2901
2940
|
return organizationAccesses;
|
|
2902
2941
|
};
|
|
2903
2942
|
const organizationAccessReducer = organizationAccessSlice.reducer;
|
|
2904
|
-
const initialState$
|
|
2943
|
+
const initialState$e = {
|
|
2905
2944
|
licenses: {}
|
|
2906
2945
|
};
|
|
2907
2946
|
const licenseSlice = createSlice({
|
|
2908
2947
|
name: "license",
|
|
2909
|
-
initialState: initialState$
|
|
2910
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2948
|
+
initialState: initialState$e,
|
|
2949
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$e)),
|
|
2911
2950
|
reducers: {
|
|
2912
2951
|
setLicenses: (state, action) => {
|
|
2913
2952
|
if (!Array.isArray(action.payload))
|
|
@@ -2952,13 +2991,13 @@ const selectLicensesForProjectsMapping = createSelector(
|
|
|
2952
2991
|
(licenses) => Object.values(licenses).filter((license) => license.project).reduce((accum, license) => ({ ...accum, [license.project]: license }), {})
|
|
2953
2992
|
);
|
|
2954
2993
|
const licenseReducer = licenseSlice.reducer;
|
|
2955
|
-
const initialState$
|
|
2994
|
+
const initialState$d = {
|
|
2956
2995
|
projectAccesses: {}
|
|
2957
2996
|
};
|
|
2958
2997
|
const projectAccessSlice = createSlice({
|
|
2959
2998
|
name: "projectAccess",
|
|
2960
|
-
initialState: initialState$
|
|
2961
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2999
|
+
initialState: initialState$d,
|
|
3000
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$d)),
|
|
2962
3001
|
reducers: {
|
|
2963
3002
|
setProjectAccesses: (state, action) => {
|
|
2964
3003
|
if (!Array.isArray(action.payload))
|
|
@@ -3026,7 +3065,7 @@ const selectProjectAccessUserMapping = (state) => {
|
|
|
3026
3065
|
return projectAccesses;
|
|
3027
3066
|
};
|
|
3028
3067
|
const projectAccessReducer = projectAccessSlice.reducer;
|
|
3029
|
-
const initialState$
|
|
3068
|
+
const initialState$c = {
|
|
3030
3069
|
projects: {},
|
|
3031
3070
|
activeProjectId: null,
|
|
3032
3071
|
recentProjectIds: [],
|
|
@@ -3036,7 +3075,7 @@ const initialState$d = {
|
|
|
3036
3075
|
};
|
|
3037
3076
|
const projectSlice = createSlice({
|
|
3038
3077
|
name: "projects",
|
|
3039
|
-
initialState: initialState$
|
|
3078
|
+
initialState: initialState$c,
|
|
3040
3079
|
reducers: {
|
|
3041
3080
|
setProjects: (state, action) => {
|
|
3042
3081
|
const projectsMap = {};
|
|
@@ -3104,11 +3143,13 @@ const projectSlice = createSlice({
|
|
|
3104
3143
|
throw new Error("Update form submissions count: no active project");
|
|
3105
3144
|
}
|
|
3106
3145
|
},
|
|
3107
|
-
//
|
|
3146
|
+
// Attachments
|
|
3147
|
+
setProjectAttachment: setAttachment,
|
|
3108
3148
|
setProjectAttachments: setAttachments,
|
|
3109
3149
|
addProjectAttachment: addAttachment,
|
|
3110
3150
|
addProjectAttachments: addAttachments,
|
|
3111
3151
|
updateProjectAttachment: updateAttachment,
|
|
3152
|
+
updateProjectAttachments: updateAttachments,
|
|
3112
3153
|
removeProjectAttachment: removeAttachment,
|
|
3113
3154
|
removeProjectAttachments: removeAttachments
|
|
3114
3155
|
}
|
|
@@ -3123,11 +3164,13 @@ const {
|
|
|
3123
3164
|
acceptProjectInvite,
|
|
3124
3165
|
addActiveProjectIssuesCount,
|
|
3125
3166
|
addActiveProjectFormSubmissionsCount,
|
|
3126
|
-
//
|
|
3167
|
+
// Attachments
|
|
3168
|
+
setProjectAttachment,
|
|
3127
3169
|
setProjectAttachments,
|
|
3128
3170
|
addProjectAttachment,
|
|
3129
3171
|
addProjectAttachments,
|
|
3130
3172
|
updateProjectAttachment,
|
|
3173
|
+
updateProjectAttachments,
|
|
3131
3174
|
removeProjectAttachment,
|
|
3132
3175
|
removeProjectAttachments
|
|
3133
3176
|
} = projectSlice.actions;
|
|
@@ -3198,6 +3241,9 @@ const selectAllProjectAttachments = createSelector(
|
|
|
3198
3241
|
[selectProjectAttachmentMapping],
|
|
3199
3242
|
(mapping) => Object.values(mapping)
|
|
3200
3243
|
);
|
|
3244
|
+
const selectProjectAttachment = (attachmentId) => (state) => {
|
|
3245
|
+
return state.projectReducer.attachments[attachmentId];
|
|
3246
|
+
};
|
|
3201
3247
|
const selectAttachmentsOfProject = restructureCreateSelectorWithArgs(
|
|
3202
3248
|
createSelector(
|
|
3203
3249
|
[selectAllProjectAttachments, (_state, projectId) => projectId],
|
|
@@ -3223,14 +3269,14 @@ const selectAttachmentsOfProjectByType = restructureCreateSelectorWithArgs(
|
|
|
3223
3269
|
}
|
|
3224
3270
|
)
|
|
3225
3271
|
);
|
|
3226
|
-
const initialState$
|
|
3272
|
+
const initialState$b = {
|
|
3227
3273
|
organizations: {},
|
|
3228
3274
|
activeOrganizationId: null
|
|
3229
3275
|
};
|
|
3230
3276
|
const organizationSlice = createSlice({
|
|
3231
3277
|
name: "organizations",
|
|
3232
|
-
initialState: initialState$
|
|
3233
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3278
|
+
initialState: initialState$b,
|
|
3279
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$b)),
|
|
3234
3280
|
reducers: {
|
|
3235
3281
|
setOrganizations: (state, action) => {
|
|
3236
3282
|
for (const org of action.payload) {
|
|
@@ -3349,14 +3395,14 @@ const createOfflineAction = (request2, baseUrl) => {
|
|
|
3349
3395
|
}
|
|
3350
3396
|
};
|
|
3351
3397
|
};
|
|
3352
|
-
const initialState$
|
|
3398
|
+
const initialState$a = {
|
|
3353
3399
|
deletedRequests: [],
|
|
3354
3400
|
latestRetryTime: 0
|
|
3355
3401
|
};
|
|
3356
3402
|
const outboxSlice = createSlice({
|
|
3357
3403
|
name: "outbox",
|
|
3358
|
-
initialState: initialState$
|
|
3359
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3404
|
+
initialState: initialState$a,
|
|
3405
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$a)),
|
|
3360
3406
|
reducers: {
|
|
3361
3407
|
// enqueueActions is a reducer that does nothing but enqueue API request to the Redux Offline outbox
|
|
3362
3408
|
// Whenever an issue is being created, a reducer addIssue() is responsible for adding it to the offline store
|
|
@@ -3388,7 +3434,7 @@ const selectDeletedRequests = (state) => state.outboxReducer.deletedRequests;
|
|
|
3388
3434
|
const selectLatestRetryTime = (state) => state.outboxReducer.latestRetryTime;
|
|
3389
3435
|
const { enqueueRequest, markForDeletion, markAsDeleted, _setLatestRetryTime } = outboxSlice.actions;
|
|
3390
3436
|
const outboxReducer = outboxSlice.reducer;
|
|
3391
|
-
const initialState$
|
|
3437
|
+
const initialState$9 = {
|
|
3392
3438
|
projectFiles: {},
|
|
3393
3439
|
activeProjectFileId: null,
|
|
3394
3440
|
isImportingProjectFile: false,
|
|
@@ -3396,8 +3442,8 @@ const initialState$a = {
|
|
|
3396
3442
|
};
|
|
3397
3443
|
const projectFileSlice = createSlice({
|
|
3398
3444
|
name: "projectFiles",
|
|
3399
|
-
initialState: initialState$
|
|
3400
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3445
|
+
initialState: initialState$9,
|
|
3446
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$9)),
|
|
3401
3447
|
reducers: {
|
|
3402
3448
|
addOrReplaceProjectFiles: (state, action) => {
|
|
3403
3449
|
for (let fileObj of action.payload) {
|
|
@@ -3498,12 +3544,12 @@ const selectProjectFiles = createSelector(
|
|
|
3498
3544
|
const selectActiveProjectFileId = (state) => state.projectFileReducer.activeProjectFileId;
|
|
3499
3545
|
const selectIsImportingProjectFile = (state) => state.projectFileReducer.isImportingProjectFile;
|
|
3500
3546
|
const projectFileReducer = projectFileSlice.reducer;
|
|
3501
|
-
const initialState$
|
|
3547
|
+
const initialState$8 = {
|
|
3502
3548
|
isRehydrated: false
|
|
3503
3549
|
};
|
|
3504
3550
|
const rehydratedSlice = createSlice({
|
|
3505
3551
|
name: "rehydrated",
|
|
3506
|
-
initialState: initialState$
|
|
3552
|
+
initialState: initialState$8,
|
|
3507
3553
|
// The `reducers` field lets us define reducers and generate associated actions
|
|
3508
3554
|
reducers: {
|
|
3509
3555
|
setRehydrated: (state, action) => {
|
|
@@ -3513,7 +3559,7 @@ const rehydratedSlice = createSlice({
|
|
|
3513
3559
|
});
|
|
3514
3560
|
const selectRehydrated = (state) => state.rehydratedReducer.isRehydrated;
|
|
3515
3561
|
const rehydratedReducer = rehydratedSlice.reducer;
|
|
3516
|
-
const initialState$
|
|
3562
|
+
const initialState$7 = {
|
|
3517
3563
|
useIssueTemplate: false,
|
|
3518
3564
|
placementMode: false,
|
|
3519
3565
|
enableClustering: false,
|
|
@@ -3530,8 +3576,8 @@ const initialState$8 = {
|
|
|
3530
3576
|
};
|
|
3531
3577
|
const settingSlice = createSlice({
|
|
3532
3578
|
name: "settings",
|
|
3533
|
-
initialState: initialState$
|
|
3534
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3579
|
+
initialState: initialState$7,
|
|
3580
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$7)),
|
|
3535
3581
|
reducers: {
|
|
3536
3582
|
setEnableDuplicateIssues: (state, action) => {
|
|
3537
3583
|
state.useIssueTemplate = action.payload;
|
|
@@ -3590,14 +3636,14 @@ const formRevisionSortFn = (formRevisionA, formRevisionB) => {
|
|
|
3590
3636
|
return revisionA < revisionB ? -1 : 1;
|
|
3591
3637
|
}
|
|
3592
3638
|
};
|
|
3593
|
-
const initialState$
|
|
3639
|
+
const initialState$6 = {
|
|
3594
3640
|
formRevisions: {},
|
|
3595
3641
|
attachments: {}
|
|
3596
3642
|
};
|
|
3597
3643
|
const formRevisionsSlice = createSlice({
|
|
3598
3644
|
name: "formRevisions",
|
|
3599
|
-
initialState: initialState$
|
|
3600
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3645
|
+
initialState: initialState$6,
|
|
3646
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$6)),
|
|
3601
3647
|
reducers: {
|
|
3602
3648
|
// revision related actions
|
|
3603
3649
|
setFormRevision: (state, action) => {
|
|
@@ -3777,13 +3823,13 @@ const selectAttachmentsOfFormRevision = restructureCreateSelectorWithArgs(
|
|
|
3777
3823
|
)
|
|
3778
3824
|
);
|
|
3779
3825
|
const formRevisionReducer = formRevisionsSlice.reducer;
|
|
3780
|
-
const initialState$
|
|
3826
|
+
const initialState$5 = {
|
|
3781
3827
|
forms: {}
|
|
3782
3828
|
};
|
|
3783
3829
|
const formSlice = createSlice({
|
|
3784
3830
|
name: "forms",
|
|
3785
|
-
initialState: initialState$
|
|
3786
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3831
|
+
initialState: initialState$5,
|
|
3832
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$5)),
|
|
3787
3833
|
reducers: {
|
|
3788
3834
|
setForms: (state, action) => {
|
|
3789
3835
|
state.forms = {};
|
|
@@ -3888,14 +3934,14 @@ const selectGeneralFormCount = createSelector([selectFormMapping], (userForms) =
|
|
|
3888
3934
|
return Object.values(userForms).filter((form) => !form.component_type).length;
|
|
3889
3935
|
});
|
|
3890
3936
|
const formReducer = formSlice.reducer;
|
|
3891
|
-
const initialState$
|
|
3937
|
+
const initialState$4 = {
|
|
3892
3938
|
formSubmissions: {},
|
|
3893
3939
|
attachments: {}
|
|
3894
3940
|
};
|
|
3895
3941
|
const formSubmissionSlice = createSlice({
|
|
3896
3942
|
name: "formSubmissions",
|
|
3897
|
-
initialState: initialState$
|
|
3898
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3943
|
+
initialState: initialState$4,
|
|
3944
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$4)),
|
|
3899
3945
|
reducers: {
|
|
3900
3946
|
setFormSubmission: (state, action) => {
|
|
3901
3947
|
state.formSubmissions[action.payload.offline_id] = action.payload;
|
|
@@ -4132,12 +4178,12 @@ const selectAttachmentsOfFormSubmission = restructureCreateSelectorWithArgs(
|
|
|
4132
4178
|
)
|
|
4133
4179
|
);
|
|
4134
4180
|
const formSubmissionReducer = formSubmissionSlice.reducer;
|
|
4135
|
-
const initialState$
|
|
4181
|
+
const initialState$3 = {
|
|
4136
4182
|
emailDomains: {}
|
|
4137
4183
|
};
|
|
4138
4184
|
const emailDomainsSlice = createSlice({
|
|
4139
4185
|
name: "emailDomains",
|
|
4140
|
-
initialState: initialState$
|
|
4186
|
+
initialState: initialState$3,
|
|
4141
4187
|
reducers: {
|
|
4142
4188
|
setEmailDomains: (state, action) => {
|
|
4143
4189
|
const emailDomains = {};
|
|
@@ -4164,15 +4210,15 @@ const selectSortedEmailDomains = (state) => Object.values(state.emailDomainsRedu
|
|
|
4164
4210
|
(ed1, ed2) => ed1.domain.localeCompare(ed2.domain)
|
|
4165
4211
|
);
|
|
4166
4212
|
const emailDomainsReducer = emailDomainsSlice.reducer;
|
|
4167
|
-
const initialState$
|
|
4213
|
+
const initialState$2 = {
|
|
4168
4214
|
documents: {},
|
|
4169
4215
|
attachments: {}
|
|
4170
4216
|
};
|
|
4171
4217
|
const documentSlice = createSlice({
|
|
4172
4218
|
name: "documents",
|
|
4173
|
-
initialState: initialState$
|
|
4219
|
+
initialState: initialState$2,
|
|
4174
4220
|
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
4175
|
-
Object.assign(state, initialState$
|
|
4221
|
+
Object.assign(state, initialState$2);
|
|
4176
4222
|
}),
|
|
4177
4223
|
reducers: {
|
|
4178
4224
|
setDocuments: (state, action) => {
|
|
@@ -4313,10 +4359,13 @@ const documentSlice = createSlice({
|
|
|
4313
4359
|
delete state.documents[documentId];
|
|
4314
4360
|
}
|
|
4315
4361
|
},
|
|
4362
|
+
// Attachments
|
|
4363
|
+
setDocumentAttachment: setAttachment,
|
|
4316
4364
|
setDocumentAttachments: setAttachments,
|
|
4317
4365
|
addDocumentAttachment: addAttachment,
|
|
4318
4366
|
addDocumentAttachments: addAttachments,
|
|
4319
4367
|
updateDocumentAttachment: updateAttachment,
|
|
4368
|
+
updateDocumentAttachments: updateAttachments,
|
|
4320
4369
|
removeDocumentAttachment: removeAttachment,
|
|
4321
4370
|
removeDocumentAttachments: removeAttachments
|
|
4322
4371
|
}
|
|
@@ -4327,10 +4376,13 @@ const {
|
|
|
4327
4376
|
updateDocuments,
|
|
4328
4377
|
moveDocument,
|
|
4329
4378
|
removeDocuments,
|
|
4379
|
+
// Attachments
|
|
4380
|
+
setDocumentAttachment,
|
|
4330
4381
|
setDocumentAttachments,
|
|
4331
4382
|
addDocumentAttachment,
|
|
4332
4383
|
addDocumentAttachments,
|
|
4333
4384
|
updateDocumentAttachment,
|
|
4385
|
+
updateDocumentAttachments,
|
|
4334
4386
|
removeDocumentAttachment,
|
|
4335
4387
|
removeDocumentAttachments
|
|
4336
4388
|
} = documentSlice.actions;
|
|
@@ -4397,13 +4449,13 @@ const selectAttachmentsOfDocumentByType = restructureCreateSelectorWithArgs(
|
|
|
4397
4449
|
)
|
|
4398
4450
|
);
|
|
4399
4451
|
const documentsReducer = documentSlice.reducer;
|
|
4400
|
-
const initialState$
|
|
4452
|
+
const initialState$1 = {
|
|
4401
4453
|
teams: {}
|
|
4402
4454
|
};
|
|
4403
4455
|
const teamSlice = createSlice({
|
|
4404
4456
|
name: "teams",
|
|
4405
|
-
initialState: initialState$
|
|
4406
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
4457
|
+
initialState: initialState$1,
|
|
4458
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$1)),
|
|
4407
4459
|
reducers: {
|
|
4408
4460
|
setTeam: (state, action) => {
|
|
4409
4461
|
state.teams[action.payload.offline_id] = action.payload;
|
|
@@ -4453,49 +4505,8 @@ const selectTeamsOfUser = restructureCreateSelectorWithArgs(
|
|
|
4453
4505
|
})
|
|
4454
4506
|
);
|
|
4455
4507
|
const teamReducer = teamSlice.reducer;
|
|
4456
|
-
const initialState
|
|
4457
|
-
|
|
4458
|
-
};
|
|
4459
|
-
const agentsSlice = createSlice({
|
|
4460
|
-
name: "agents",
|
|
4461
|
-
initialState: initialState$1,
|
|
4462
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$1)),
|
|
4463
|
-
reducers: {
|
|
4464
|
-
setConversations: (state, action) => {
|
|
4465
|
-
state.conversations = {};
|
|
4466
|
-
for (const conversation of action.payload) {
|
|
4467
|
-
state.conversations[conversation.offline_id] = conversation;
|
|
4468
|
-
}
|
|
4469
|
-
},
|
|
4470
|
-
addConversation: (state, action) => {
|
|
4471
|
-
if (action.payload.offline_id in state.conversations) {
|
|
4472
|
-
throw new Error("Conversation already exists in history");
|
|
4473
|
-
}
|
|
4474
|
-
state.conversations[action.payload.offline_id] = action.payload;
|
|
4475
|
-
},
|
|
4476
|
-
setConversation: (state, action) => {
|
|
4477
|
-
if (!(action.payload.offline_id in state.conversations)) {
|
|
4478
|
-
throw new Error("Conversation does not exist in history");
|
|
4479
|
-
}
|
|
4480
|
-
state.conversations[action.payload.offline_id] = action.payload;
|
|
4481
|
-
}
|
|
4482
|
-
}
|
|
4483
|
-
});
|
|
4484
|
-
const { setConversations, addConversation, setConversation } = agentsSlice.actions;
|
|
4485
|
-
const selectConversationMapping = (state) => state.agentsReducer.conversations;
|
|
4486
|
-
const selectConversations = createSelector(
|
|
4487
|
-
[selectConversationMapping],
|
|
4488
|
-
(conversationMapping) => Object.values(conversationMapping)
|
|
4489
|
-
);
|
|
4490
|
-
const selectConversation = restructureCreateSelectorWithArgs(
|
|
4491
|
-
createSelector(
|
|
4492
|
-
[selectConversationMapping, (_state, conversationId) => conversationId],
|
|
4493
|
-
(conversationMapping, conversationId) => conversationMapping[conversationId]
|
|
4494
|
-
)
|
|
4495
|
-
);
|
|
4496
|
-
const agentsReducer = agentsSlice.reducer;
|
|
4497
|
-
const initialState = {
|
|
4498
|
-
version: 0
|
|
4508
|
+
const initialState = {
|
|
4509
|
+
version: 0
|
|
4499
4510
|
};
|
|
4500
4511
|
const versioningSlice = createSlice({
|
|
4501
4512
|
name: "versioning",
|
|
@@ -4544,8 +4555,7 @@ const overmapReducers = {
|
|
|
4544
4555
|
emailDomainsReducer,
|
|
4545
4556
|
licenseReducer,
|
|
4546
4557
|
documentsReducer,
|
|
4547
|
-
teamReducer
|
|
4548
|
-
agentsReducer
|
|
4558
|
+
teamReducer
|
|
4549
4559
|
};
|
|
4550
4560
|
const overmapReducer = combineReducers(overmapReducers);
|
|
4551
4561
|
const resetStore = "RESET";
|
|
@@ -5062,553 +5072,6 @@ class BaseApiService {
|
|
|
5062
5072
|
return promise;
|
|
5063
5073
|
}
|
|
5064
5074
|
}
|
|
5065
|
-
class AttachmentService extends BaseApiService {
|
|
5066
|
-
fetchAll(projectId) {
|
|
5067
|
-
const promise = this.enqueueRequest({
|
|
5068
|
-
description: "Fetch attachments",
|
|
5069
|
-
method: HttpMethod.GET,
|
|
5070
|
-
url: `/attachments/${projectId}/`,
|
|
5071
|
-
blocks: [],
|
|
5072
|
-
blockers: []
|
|
5073
|
-
});
|
|
5074
|
-
const state = this.client.store.getState();
|
|
5075
|
-
const allAttachments = {
|
|
5076
|
-
issue_attachments: Object.values(state.issueReducer.attachments),
|
|
5077
|
-
component_attachments: Object.values(state.componentReducer.attachments),
|
|
5078
|
-
component_type_attachments: Object.values(state.componentTypeReducer.attachments),
|
|
5079
|
-
project_attachments: Object.values(state.projectReducer.attachments),
|
|
5080
|
-
document_attachments: Object.values(state.documentsReducer.attachments)
|
|
5081
|
-
};
|
|
5082
|
-
return [allAttachments, promise];
|
|
5083
|
-
}
|
|
5084
|
-
// Attachments aren't models, so we use the OptimisticGenericResult type instead
|
|
5085
|
-
async addIssueAttachment(attachmentPayload) {
|
|
5086
|
-
const { issue, file_sha1, offline_id } = attachmentPayload;
|
|
5087
|
-
if (!attachmentPayload.file.objectURL) {
|
|
5088
|
-
throw new Error("Expected attachmentPayload.file.objectURL to be defined.");
|
|
5089
|
-
}
|
|
5090
|
-
const offlineAttachment = {
|
|
5091
|
-
...attachmentPayload,
|
|
5092
|
-
file: attachmentPayload.file.objectURL,
|
|
5093
|
-
file_name: attachmentPayload.file.name,
|
|
5094
|
-
file_type: attachmentPayload.file.type,
|
|
5095
|
-
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5096
|
-
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
5097
|
-
};
|
|
5098
|
-
await this.client.files.addCache(attachmentPayload.file, file_sha1);
|
|
5099
|
-
this.client.store.dispatch(addIssueAttachment(offlineAttachment));
|
|
5100
|
-
const [fileProps] = await this.client.files.uploadFileToS3(file_sha1);
|
|
5101
|
-
const promise = this.enqueueRequest({
|
|
5102
|
-
description: "Create attachment",
|
|
5103
|
-
method: HttpMethod.POST,
|
|
5104
|
-
url: `/issues/${issue}/attach/`,
|
|
5105
|
-
blocks: [offline_id, issue],
|
|
5106
|
-
blockers: [file_sha1],
|
|
5107
|
-
payload: {
|
|
5108
|
-
...offlineAttachment,
|
|
5109
|
-
...fileProps
|
|
5110
|
-
}
|
|
5111
|
-
});
|
|
5112
|
-
promise.catch((error2) => {
|
|
5113
|
-
this.client.store.dispatch(removeIssueAttachment(offlineAttachment.offline_id));
|
|
5114
|
-
throw error2;
|
|
5115
|
-
});
|
|
5116
|
-
return [offlineAttachment, promise];
|
|
5117
|
-
}
|
|
5118
|
-
async addComponentAttachment(attachmentPayload) {
|
|
5119
|
-
const { component, file_sha1, offline_id } = attachmentPayload;
|
|
5120
|
-
if (!attachmentPayload.file.objectURL) {
|
|
5121
|
-
throw new Error("Expected attachmentPayload.file.objectURL to be defined.");
|
|
5122
|
-
}
|
|
5123
|
-
const offlineAttachment = {
|
|
5124
|
-
...attachmentPayload,
|
|
5125
|
-
file: attachmentPayload.file.objectURL,
|
|
5126
|
-
file_name: attachmentPayload.file.name,
|
|
5127
|
-
file_type: attachmentPayload.file.type,
|
|
5128
|
-
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5129
|
-
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
5130
|
-
};
|
|
5131
|
-
await this.client.files.addCache(attachmentPayload.file, file_sha1);
|
|
5132
|
-
this.client.store.dispatch(addComponentAttachment(offlineAttachment));
|
|
5133
|
-
const [fileProps] = await this.client.files.uploadFileToS3(file_sha1);
|
|
5134
|
-
const promise = this.enqueueRequest({
|
|
5135
|
-
description: "Create attachment",
|
|
5136
|
-
method: HttpMethod.POST,
|
|
5137
|
-
url: `/components/${component}/attach/`,
|
|
5138
|
-
blocks: [offline_id, component],
|
|
5139
|
-
blockers: [file_sha1],
|
|
5140
|
-
payload: {
|
|
5141
|
-
...offlineAttachment,
|
|
5142
|
-
...fileProps
|
|
5143
|
-
}
|
|
5144
|
-
});
|
|
5145
|
-
promise.catch((error2) => {
|
|
5146
|
-
this.client.store.dispatch(removeComponentAttachment(offlineAttachment.offline_id));
|
|
5147
|
-
throw error2;
|
|
5148
|
-
});
|
|
5149
|
-
return [offlineAttachment, promise];
|
|
5150
|
-
}
|
|
5151
|
-
async addComponentTypeAttachment(attachmentPayload) {
|
|
5152
|
-
const { component_type, file_sha1, offline_id } = attachmentPayload;
|
|
5153
|
-
if (!attachmentPayload.file.objectURL) {
|
|
5154
|
-
throw new Error("Expected attachmentPayload.file.objectURL to be defined.");
|
|
5155
|
-
}
|
|
5156
|
-
const offlineAttachment = {
|
|
5157
|
-
...attachmentPayload,
|
|
5158
|
-
file: attachmentPayload.file.objectURL,
|
|
5159
|
-
file_name: attachmentPayload.file.name,
|
|
5160
|
-
file_type: attachmentPayload.file.type,
|
|
5161
|
-
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5162
|
-
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
5163
|
-
};
|
|
5164
|
-
await this.client.files.addCache(attachmentPayload.file, file_sha1);
|
|
5165
|
-
this.client.store.dispatch(addComponentTypeAttachment(offlineAttachment));
|
|
5166
|
-
const [fileProps] = await this.client.files.uploadFileToS3(file_sha1);
|
|
5167
|
-
const promise = this.enqueueRequest({
|
|
5168
|
-
description: "Create attachment",
|
|
5169
|
-
method: HttpMethod.POST,
|
|
5170
|
-
url: `/components/types/${component_type}/attach/`,
|
|
5171
|
-
blocks: [offline_id, component_type],
|
|
5172
|
-
blockers: [file_sha1],
|
|
5173
|
-
payload: {
|
|
5174
|
-
...offlineAttachment,
|
|
5175
|
-
...fileProps
|
|
5176
|
-
}
|
|
5177
|
-
});
|
|
5178
|
-
promise.catch((error2) => {
|
|
5179
|
-
this.client.store.dispatch(removeComponentTypeAttachment(offlineAttachment.offline_id));
|
|
5180
|
-
throw error2;
|
|
5181
|
-
});
|
|
5182
|
-
return [offlineAttachment, promise];
|
|
5183
|
-
}
|
|
5184
|
-
async addDocumentAttachment(attachmentPayload) {
|
|
5185
|
-
const { description: description2, document: document2, file_sha1, offline_id } = attachmentPayload;
|
|
5186
|
-
if (!attachmentPayload.file.objectURL) {
|
|
5187
|
-
throw new Error("Expected attachmentPayload.file.objectURL to be defined.");
|
|
5188
|
-
}
|
|
5189
|
-
const offlineAttachment = {
|
|
5190
|
-
...attachmentPayload,
|
|
5191
|
-
file: attachmentPayload.file.objectURL,
|
|
5192
|
-
file_name: attachmentPayload.file.name,
|
|
5193
|
-
file_type: attachmentPayload.file.type,
|
|
5194
|
-
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5195
|
-
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
5196
|
-
};
|
|
5197
|
-
await this.client.files.addCache(attachmentPayload.file, file_sha1);
|
|
5198
|
-
this.client.store.dispatch(addDocumentAttachment(offlineAttachment));
|
|
5199
|
-
const [fileProps] = await this.client.files.uploadFileToS3(file_sha1);
|
|
5200
|
-
const promise = this.enqueueRequest({
|
|
5201
|
-
description: "Create attachment",
|
|
5202
|
-
method: HttpMethod.POST,
|
|
5203
|
-
url: `/documents/${document2}/attach/`,
|
|
5204
|
-
blocks: [offline_id, document2],
|
|
5205
|
-
blockers: [file_sha1],
|
|
5206
|
-
payload: {
|
|
5207
|
-
offline_id,
|
|
5208
|
-
document: document2,
|
|
5209
|
-
description: description2 ?? "",
|
|
5210
|
-
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5211
|
-
...fileProps
|
|
5212
|
-
}
|
|
5213
|
-
});
|
|
5214
|
-
promise.catch((error2) => {
|
|
5215
|
-
this.client.store.dispatch(removeDocumentAttachment(offlineAttachment.offline_id));
|
|
5216
|
-
throw error2;
|
|
5217
|
-
});
|
|
5218
|
-
return [offlineAttachment, promise];
|
|
5219
|
-
}
|
|
5220
|
-
/** the outer Promise is needed to await the hashing of each file, which is required before offline use. If wanting to
|
|
5221
|
-
* attach promise handlers to the request to add the attachment in the backend, apply it on the promise returned from the
|
|
5222
|
-
* OptimisticModelResult. */
|
|
5223
|
-
attachFilesToIssue(filesToSubmit, issueId) {
|
|
5224
|
-
return filesToSubmit.map((file) => {
|
|
5225
|
-
if (!(file instanceof File)) {
|
|
5226
|
-
throw new Error("Expected a File instance.");
|
|
5227
|
-
}
|
|
5228
|
-
const photoAttachmentPromise = async (file2) => {
|
|
5229
|
-
const hash = await hashFile(file2);
|
|
5230
|
-
const attachment = offline({
|
|
5231
|
-
file: file2,
|
|
5232
|
-
file_name: file2.name,
|
|
5233
|
-
file_type: file2.type,
|
|
5234
|
-
issue: issueId,
|
|
5235
|
-
file_sha1: hash,
|
|
5236
|
-
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5237
|
-
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
5238
|
-
});
|
|
5239
|
-
return this.addIssueAttachment(attachment);
|
|
5240
|
-
};
|
|
5241
|
-
return photoAttachmentPromise(file);
|
|
5242
|
-
});
|
|
5243
|
-
}
|
|
5244
|
-
attachFilesToComponent(filesToSubmit, componentId) {
|
|
5245
|
-
return filesToSubmit.map((file) => {
|
|
5246
|
-
if (!(file instanceof File)) {
|
|
5247
|
-
throw new Error("Expected a File instance.");
|
|
5248
|
-
}
|
|
5249
|
-
const photoAttachmentPromise = async (file2) => {
|
|
5250
|
-
const hash = await hashFile(file2);
|
|
5251
|
-
const attachment = offline({
|
|
5252
|
-
file: file2,
|
|
5253
|
-
file_name: file2.name,
|
|
5254
|
-
file_type: file2.type,
|
|
5255
|
-
component: componentId,
|
|
5256
|
-
file_sha1: hash,
|
|
5257
|
-
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5258
|
-
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
5259
|
-
});
|
|
5260
|
-
return this.addComponentAttachment(attachment);
|
|
5261
|
-
};
|
|
5262
|
-
return photoAttachmentPromise(file);
|
|
5263
|
-
});
|
|
5264
|
-
}
|
|
5265
|
-
attachFilesToComponentType(filesToSubmit, componentTypeId) {
|
|
5266
|
-
return filesToSubmit.map((file) => {
|
|
5267
|
-
if (!(file instanceof File)) {
|
|
5268
|
-
throw new Error("Expected a File instance.");
|
|
5269
|
-
}
|
|
5270
|
-
const photoAttachmentPromise = async (file2) => {
|
|
5271
|
-
const hash = await hashFile(file2);
|
|
5272
|
-
const attachment = offline({
|
|
5273
|
-
file: file2,
|
|
5274
|
-
file_name: file2.name,
|
|
5275
|
-
file_type: file2.type,
|
|
5276
|
-
component_type: componentTypeId,
|
|
5277
|
-
file_sha1: hash,
|
|
5278
|
-
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5279
|
-
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
5280
|
-
});
|
|
5281
|
-
return this.addComponentTypeAttachment(attachment);
|
|
5282
|
-
};
|
|
5283
|
-
return photoAttachmentPromise(file);
|
|
5284
|
-
});
|
|
5285
|
-
}
|
|
5286
|
-
attachFilesToDocument(filesToSubmit, documentId) {
|
|
5287
|
-
return filesToSubmit.map((file) => {
|
|
5288
|
-
if (!(file instanceof File)) {
|
|
5289
|
-
throw new Error("Expected a File instance.");
|
|
5290
|
-
}
|
|
5291
|
-
const photoAttachmentPromise = async (file2) => {
|
|
5292
|
-
const hash = await hashFile(file2);
|
|
5293
|
-
const attachment = offline({
|
|
5294
|
-
file: file2,
|
|
5295
|
-
file_name: file2.name,
|
|
5296
|
-
file_type: file2.type,
|
|
5297
|
-
document: documentId,
|
|
5298
|
-
file_sha1: hash,
|
|
5299
|
-
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5300
|
-
created_by: this.client.store.getState().userReducer.currentUser.id
|
|
5301
|
-
});
|
|
5302
|
-
return this.addDocumentAttachment(attachment);
|
|
5303
|
-
};
|
|
5304
|
-
return photoAttachmentPromise(file);
|
|
5305
|
-
});
|
|
5306
|
-
}
|
|
5307
|
-
async replaceIssueAttachmentFile(attachmentId, newFile) {
|
|
5308
|
-
const { store } = this.client;
|
|
5309
|
-
const attachment = store.getState().issueReducer.attachments[attachmentId];
|
|
5310
|
-
if (!attachment)
|
|
5311
|
-
throw new Error(`Attachment ${attachmentId} not found`);
|
|
5312
|
-
let oldFile = void 0;
|
|
5313
|
-
const newSha1 = await hashFile(newFile);
|
|
5314
|
-
const performRequest2 = async () => {
|
|
5315
|
-
oldFile = await this.client.files.fetchCache(attachment.file_sha1);
|
|
5316
|
-
if (!oldFile) {
|
|
5317
|
-
console.error(`Failed to fetch old file from cache for sha1 ${attachment.file_sha1}.`);
|
|
5318
|
-
}
|
|
5319
|
-
if (!newFile.objectURL) {
|
|
5320
|
-
throw new Error(`newFile["objectURL"] is unexpectedly ${newFile.objectURL}`);
|
|
5321
|
-
}
|
|
5322
|
-
store.dispatch(
|
|
5323
|
-
updateIssueAttachment({ ...attachment, file_sha1: newSha1, file: URL.createObjectURL(newFile) })
|
|
5324
|
-
);
|
|
5325
|
-
await this.client.files.addCache(newFile, newSha1);
|
|
5326
|
-
const [fileProps] = await this.client.files.uploadFileToS3(newSha1).catch((e) => {
|
|
5327
|
-
store.dispatch(updateIssueAttachment(attachment));
|
|
5328
|
-
throw e;
|
|
5329
|
-
});
|
|
5330
|
-
const promise2 = this.enqueueRequest({
|
|
5331
|
-
description: "Edit attachment",
|
|
5332
|
-
method: HttpMethod.PATCH,
|
|
5333
|
-
url: `/attachments/issues/${attachment.offline_id}/`,
|
|
5334
|
-
isResponseBlob: false,
|
|
5335
|
-
payload: fileProps,
|
|
5336
|
-
blockers: [attachmentId, newSha1],
|
|
5337
|
-
blocks: [attachmentId, newSha1]
|
|
5338
|
-
});
|
|
5339
|
-
try {
|
|
5340
|
-
const result = await promise2;
|
|
5341
|
-
void this.client.files.removeCache(attachment.file_sha1);
|
|
5342
|
-
return result;
|
|
5343
|
-
} catch (e) {
|
|
5344
|
-
if (oldFile) {
|
|
5345
|
-
store.dispatch(
|
|
5346
|
-
updateIssueAttachment({
|
|
5347
|
-
...attachment,
|
|
5348
|
-
file_sha1: attachment.file_sha1,
|
|
5349
|
-
file: URL.createObjectURL(oldFile)
|
|
5350
|
-
})
|
|
5351
|
-
);
|
|
5352
|
-
}
|
|
5353
|
-
throw e;
|
|
5354
|
-
}
|
|
5355
|
-
};
|
|
5356
|
-
const offlineAttachment = {
|
|
5357
|
-
...attachment,
|
|
5358
|
-
file_sha1: newSha1,
|
|
5359
|
-
file: URL.createObjectURL(newFile)
|
|
5360
|
-
};
|
|
5361
|
-
const promise = performRequest2();
|
|
5362
|
-
return [offlineAttachment, promise];
|
|
5363
|
-
}
|
|
5364
|
-
async replaceComponentAttachmentFile(attachmentId, newFile) {
|
|
5365
|
-
const { store } = this.client;
|
|
5366
|
-
const attachment = store.getState().componentReducer.attachments[attachmentId];
|
|
5367
|
-
if (!attachment)
|
|
5368
|
-
throw new Error(`Attachment ${attachmentId} not found`);
|
|
5369
|
-
let oldFile = void 0;
|
|
5370
|
-
const newSha1 = await hashFile(newFile);
|
|
5371
|
-
const performRequest2 = async () => {
|
|
5372
|
-
oldFile = await this.client.files.fetchCache(attachment.file_sha1);
|
|
5373
|
-
if (!oldFile) {
|
|
5374
|
-
console.error(`Failed to fetch old file from cache for sha1 ${attachment.file_sha1}.`);
|
|
5375
|
-
}
|
|
5376
|
-
if (!newFile.objectURL) {
|
|
5377
|
-
throw new Error(`newFile["objectURL"] is unexpectedly ${newFile.objectURL}`);
|
|
5378
|
-
}
|
|
5379
|
-
store.dispatch(
|
|
5380
|
-
updateComponentAttachment({ ...attachment, file_sha1: newSha1, file: URL.createObjectURL(newFile) })
|
|
5381
|
-
);
|
|
5382
|
-
await this.client.files.addCache(newFile, newSha1);
|
|
5383
|
-
const [fileProps] = await this.client.files.uploadFileToS3(newSha1).catch((e) => {
|
|
5384
|
-
store.dispatch(updateComponentAttachment(attachment));
|
|
5385
|
-
throw e;
|
|
5386
|
-
});
|
|
5387
|
-
const promise2 = this.enqueueRequest({
|
|
5388
|
-
description: "Edit attachment",
|
|
5389
|
-
method: HttpMethod.PATCH,
|
|
5390
|
-
url: `/attachments/components/${attachment.offline_id}/`,
|
|
5391
|
-
isResponseBlob: false,
|
|
5392
|
-
payload: fileProps,
|
|
5393
|
-
blockers: [attachmentId, newSha1],
|
|
5394
|
-
blocks: [attachmentId, newSha1]
|
|
5395
|
-
});
|
|
5396
|
-
try {
|
|
5397
|
-
const result = await promise2;
|
|
5398
|
-
void this.client.files.removeCache(attachment.file_sha1);
|
|
5399
|
-
return result;
|
|
5400
|
-
} catch (e) {
|
|
5401
|
-
if (oldFile) {
|
|
5402
|
-
store.dispatch(
|
|
5403
|
-
updateComponentAttachment({
|
|
5404
|
-
...attachment,
|
|
5405
|
-
file_sha1: attachment.file_sha1,
|
|
5406
|
-
file: URL.createObjectURL(oldFile)
|
|
5407
|
-
})
|
|
5408
|
-
);
|
|
5409
|
-
}
|
|
5410
|
-
throw e;
|
|
5411
|
-
}
|
|
5412
|
-
};
|
|
5413
|
-
const offlineAttachment = {
|
|
5414
|
-
...attachment,
|
|
5415
|
-
file_sha1: newSha1,
|
|
5416
|
-
file: URL.createObjectURL(newFile)
|
|
5417
|
-
};
|
|
5418
|
-
const promise = performRequest2();
|
|
5419
|
-
return [offlineAttachment, promise];
|
|
5420
|
-
}
|
|
5421
|
-
async replaceComponentTypeAttachmentFile(attachmentId, newFile) {
|
|
5422
|
-
const { store } = this.client;
|
|
5423
|
-
const attachment = store.getState().componentTypeReducer.attachments[attachmentId];
|
|
5424
|
-
if (!attachment)
|
|
5425
|
-
throw new Error(`Attachment ${attachmentId} not found`);
|
|
5426
|
-
let oldFile = void 0;
|
|
5427
|
-
const newSha1 = await hashFile(newFile);
|
|
5428
|
-
const performRequest2 = async () => {
|
|
5429
|
-
oldFile = await this.client.files.fetchCache(attachment.file_sha1);
|
|
5430
|
-
if (!oldFile) {
|
|
5431
|
-
console.error(`Failed to fetch old file from cache for sha1 ${attachment.file_sha1}.`);
|
|
5432
|
-
}
|
|
5433
|
-
if (!newFile.objectURL) {
|
|
5434
|
-
throw new Error(`newFile["objectURL"] is unexpectedly ${newFile.objectURL}`);
|
|
5435
|
-
}
|
|
5436
|
-
store.dispatch(
|
|
5437
|
-
updateComponentTypeAttachment({
|
|
5438
|
-
...attachment,
|
|
5439
|
-
file_sha1: newSha1,
|
|
5440
|
-
file: URL.createObjectURL(newFile)
|
|
5441
|
-
})
|
|
5442
|
-
);
|
|
5443
|
-
await this.client.files.addCache(newFile, newSha1);
|
|
5444
|
-
const [fileProps] = await this.client.files.uploadFileToS3(newSha1).catch((e) => {
|
|
5445
|
-
store.dispatch(updateComponentTypeAttachment(attachment));
|
|
5446
|
-
throw e;
|
|
5447
|
-
});
|
|
5448
|
-
const promise2 = this.enqueueRequest({
|
|
5449
|
-
description: "Edit attachment",
|
|
5450
|
-
method: HttpMethod.PATCH,
|
|
5451
|
-
url: `/attachments/component_types/${attachment.offline_id}/`,
|
|
5452
|
-
isResponseBlob: false,
|
|
5453
|
-
payload: fileProps,
|
|
5454
|
-
blockers: [attachmentId, newSha1],
|
|
5455
|
-
blocks: [attachmentId, newSha1]
|
|
5456
|
-
});
|
|
5457
|
-
try {
|
|
5458
|
-
const result = await promise2;
|
|
5459
|
-
void this.client.files.removeCache(attachment.file_sha1);
|
|
5460
|
-
return result;
|
|
5461
|
-
} catch (e) {
|
|
5462
|
-
if (oldFile) {
|
|
5463
|
-
store.dispatch(
|
|
5464
|
-
updateComponentTypeAttachment({
|
|
5465
|
-
...attachment,
|
|
5466
|
-
file_sha1: attachment.file_sha1,
|
|
5467
|
-
file: URL.createObjectURL(oldFile)
|
|
5468
|
-
})
|
|
5469
|
-
);
|
|
5470
|
-
}
|
|
5471
|
-
throw e;
|
|
5472
|
-
}
|
|
5473
|
-
};
|
|
5474
|
-
const offlineAttachment = {
|
|
5475
|
-
...attachment,
|
|
5476
|
-
file_sha1: newSha1,
|
|
5477
|
-
file: URL.createObjectURL(newFile)
|
|
5478
|
-
};
|
|
5479
|
-
const promise = performRequest2();
|
|
5480
|
-
return [offlineAttachment, promise];
|
|
5481
|
-
}
|
|
5482
|
-
async replaceDocumentAttachmentFile(attachmentId, newFile) {
|
|
5483
|
-
const { store } = this.client;
|
|
5484
|
-
const attachment = store.getState().documentsReducer.attachments[attachmentId];
|
|
5485
|
-
if (!attachment)
|
|
5486
|
-
throw new Error(`Attachment ${attachmentId} not found`);
|
|
5487
|
-
let oldFile = void 0;
|
|
5488
|
-
const newSha1 = await hashFile(newFile);
|
|
5489
|
-
const performRequest2 = async () => {
|
|
5490
|
-
oldFile = await this.client.files.fetchCache(attachment.file_sha1);
|
|
5491
|
-
if (!oldFile) {
|
|
5492
|
-
console.error(`Failed to fetch old file from cache for sha1 ${attachment.file_sha1}.`);
|
|
5493
|
-
}
|
|
5494
|
-
if (!newFile.objectURL) {
|
|
5495
|
-
throw new Error(`newFile["objectURL"] is unexpectedly ${newFile.objectURL}`);
|
|
5496
|
-
}
|
|
5497
|
-
store.dispatch(
|
|
5498
|
-
updateDocumentAttachment({
|
|
5499
|
-
...attachment,
|
|
5500
|
-
file_sha1: newSha1,
|
|
5501
|
-
file: URL.createObjectURL(newFile)
|
|
5502
|
-
})
|
|
5503
|
-
);
|
|
5504
|
-
await this.client.files.addCache(newFile, newSha1);
|
|
5505
|
-
const [fileProps] = await this.client.files.uploadFileToS3(newSha1).catch((e) => {
|
|
5506
|
-
store.dispatch(updateDocumentAttachment(attachment));
|
|
5507
|
-
throw e;
|
|
5508
|
-
});
|
|
5509
|
-
const promise2 = this.enqueueRequest({
|
|
5510
|
-
description: "Edit attachment",
|
|
5511
|
-
method: HttpMethod.PATCH,
|
|
5512
|
-
url: `/attachments/documents/${attachment.offline_id}/`,
|
|
5513
|
-
isResponseBlob: false,
|
|
5514
|
-
payload: fileProps,
|
|
5515
|
-
blockers: [attachmentId, newSha1],
|
|
5516
|
-
blocks: [attachmentId, newSha1]
|
|
5517
|
-
});
|
|
5518
|
-
try {
|
|
5519
|
-
const result = await promise2;
|
|
5520
|
-
void this.client.files.removeCache(attachment.file_sha1);
|
|
5521
|
-
return result;
|
|
5522
|
-
} catch (e) {
|
|
5523
|
-
if (oldFile) {
|
|
5524
|
-
store.dispatch(
|
|
5525
|
-
updateDocumentAttachment({
|
|
5526
|
-
...attachment,
|
|
5527
|
-
file_sha1: attachment.file_sha1,
|
|
5528
|
-
file: URL.createObjectURL(oldFile)
|
|
5529
|
-
})
|
|
5530
|
-
);
|
|
5531
|
-
}
|
|
5532
|
-
throw e;
|
|
5533
|
-
}
|
|
5534
|
-
};
|
|
5535
|
-
const offlineAttachment = {
|
|
5536
|
-
...attachment,
|
|
5537
|
-
file_sha1: newSha1,
|
|
5538
|
-
file: URL.createObjectURL(newFile)
|
|
5539
|
-
};
|
|
5540
|
-
const promise = performRequest2();
|
|
5541
|
-
return [offlineAttachment, promise];
|
|
5542
|
-
}
|
|
5543
|
-
/**
|
|
5544
|
-
* Deletes an attachment and associated data in the cloud, in the Redux store and the cache.
|
|
5545
|
-
* @param issueAttachmentId
|
|
5546
|
-
*/
|
|
5547
|
-
deleteIssueAttachment(issueAttachmentId) {
|
|
5548
|
-
const { store } = this.client;
|
|
5549
|
-
const attachment = selectIssueAttachmentMapping(store.getState())[issueAttachmentId];
|
|
5550
|
-
if (!attachment) {
|
|
5551
|
-
throw new Error(`Attachment ${issueAttachmentId} not found`);
|
|
5552
|
-
}
|
|
5553
|
-
store.dispatch(removeIssueAttachment(issueAttachmentId));
|
|
5554
|
-
void this.client.files.removeCache(attachment.file_sha1);
|
|
5555
|
-
return this.enqueueRequest({
|
|
5556
|
-
description: "Delete attachment",
|
|
5557
|
-
method: HttpMethod.DELETE,
|
|
5558
|
-
url: `/attachments/issues/${issueAttachmentId}/`,
|
|
5559
|
-
blockers: [issueAttachmentId],
|
|
5560
|
-
blocks: [issueAttachmentId]
|
|
5561
|
-
});
|
|
5562
|
-
}
|
|
5563
|
-
deleteComponentAttachment(componentAttachmentId) {
|
|
5564
|
-
const { store } = this.client;
|
|
5565
|
-
const attachment = selectComponentAttachmentMapping(store.getState())[componentAttachmentId];
|
|
5566
|
-
if (!attachment) {
|
|
5567
|
-
throw new Error(`Attachment ${componentAttachmentId} not found`);
|
|
5568
|
-
}
|
|
5569
|
-
store.dispatch(removeComponentAttachment(componentAttachmentId));
|
|
5570
|
-
void this.client.files.removeCache(attachment.file_sha1);
|
|
5571
|
-
return this.enqueueRequest({
|
|
5572
|
-
description: "Delete attachment",
|
|
5573
|
-
method: HttpMethod.DELETE,
|
|
5574
|
-
url: `/attachments/components/${componentAttachmentId}/`,
|
|
5575
|
-
blockers: [componentAttachmentId],
|
|
5576
|
-
blocks: [componentAttachmentId]
|
|
5577
|
-
});
|
|
5578
|
-
}
|
|
5579
|
-
deleteComponentTypeAttachment(componentTypeAttachmentId) {
|
|
5580
|
-
const { store } = this.client;
|
|
5581
|
-
const attachment = selectComponentTypeAttachmentMapping(store.getState())[componentTypeAttachmentId];
|
|
5582
|
-
if (!attachment) {
|
|
5583
|
-
throw new Error(`Attachment ${componentTypeAttachmentId} not found`);
|
|
5584
|
-
}
|
|
5585
|
-
store.dispatch(removeComponentTypeAttachment(componentTypeAttachmentId));
|
|
5586
|
-
void this.client.files.removeCache(attachment.file_sha1);
|
|
5587
|
-
return this.enqueueRequest({
|
|
5588
|
-
description: "Delete attachment",
|
|
5589
|
-
method: HttpMethod.DELETE,
|
|
5590
|
-
url: `/attachments/component_types/${componentTypeAttachmentId}/`,
|
|
5591
|
-
blockers: [componentTypeAttachmentId],
|
|
5592
|
-
blocks: [componentTypeAttachmentId]
|
|
5593
|
-
});
|
|
5594
|
-
}
|
|
5595
|
-
deleteDocumentAttachment(documentAttachmentId) {
|
|
5596
|
-
const { store } = this.client;
|
|
5597
|
-
const attachment = store.getState().documentsReducer.attachments[documentAttachmentId];
|
|
5598
|
-
if (!attachment) {
|
|
5599
|
-
throw new Error(`Attachment ${documentAttachmentId} not found`);
|
|
5600
|
-
}
|
|
5601
|
-
store.dispatch(removeDocumentAttachment(documentAttachmentId));
|
|
5602
|
-
void this.client.files.removeCache(attachment.file_sha1);
|
|
5603
|
-
return this.enqueueRequest({
|
|
5604
|
-
description: "Delete document attachment",
|
|
5605
|
-
method: HttpMethod.DELETE,
|
|
5606
|
-
url: `/attachments/documents/${documentAttachmentId}/`,
|
|
5607
|
-
blockers: [documentAttachmentId],
|
|
5608
|
-
blocks: [documentAttachmentId]
|
|
5609
|
-
});
|
|
5610
|
-
}
|
|
5611
|
-
}
|
|
5612
5075
|
const EXPIRING_SOON_THRESHOLD = 1800;
|
|
5613
5076
|
function parseTokens(response) {
|
|
5614
5077
|
if (!response.access)
|
|
@@ -6300,52 +5763,267 @@ class ComponentStageService extends BaseApiService {
|
|
|
6300
5763
|
store.dispatch(addStages(result));
|
|
6301
5764
|
}
|
|
6302
5765
|
}
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
|
|
5766
|
+
const AttachmentModelMeta = {
|
|
5767
|
+
[AttachmentModel.Issue]: {
|
|
5768
|
+
name: "issue",
|
|
5769
|
+
attachUrlPrefix: "/issues",
|
|
5770
|
+
deleteUrlPrefix: "/issues",
|
|
5771
|
+
fetchUrlPostfix: "/issue-attachments"
|
|
5772
|
+
},
|
|
5773
|
+
[AttachmentModel.Component]: {
|
|
5774
|
+
name: "component",
|
|
5775
|
+
attachUrlPrefix: "/components",
|
|
5776
|
+
deleteUrlPrefix: "/components",
|
|
5777
|
+
fetchUrlPostfix: "/component-attachments"
|
|
5778
|
+
},
|
|
5779
|
+
[AttachmentModel.ComponentType]: {
|
|
5780
|
+
name: "component type",
|
|
5781
|
+
attachUrlPrefix: "/components/types",
|
|
5782
|
+
deleteUrlPrefix: "/components/types",
|
|
5783
|
+
fetchUrlPostfix: "/component-type-attachments"
|
|
5784
|
+
},
|
|
5785
|
+
[AttachmentModel.Project]: {
|
|
5786
|
+
name: "component project",
|
|
5787
|
+
attachUrlPrefix: "/projects",
|
|
5788
|
+
deleteUrlPrefix: "/projects",
|
|
5789
|
+
fetchUrlPostfix: "/attachments"
|
|
5790
|
+
},
|
|
5791
|
+
[AttachmentModel.Document]: {
|
|
5792
|
+
name: "document",
|
|
5793
|
+
attachUrlPrefix: "/documents",
|
|
5794
|
+
deleteUrlPrefix: "/documents",
|
|
5795
|
+
fetchUrlPostfix: "/document-attachments"
|
|
5796
|
+
}
|
|
5797
|
+
};
|
|
5798
|
+
class BaseAttachmentService extends BaseApiService {
|
|
5799
|
+
getNumberOfAttachmentsWithSha1(sha1) {
|
|
5800
|
+
const {
|
|
5801
|
+
issueReducer: issueReducer2,
|
|
5802
|
+
componentReducer: componentReducer2,
|
|
5803
|
+
componentTypeReducer: componentTypeReducer2,
|
|
5804
|
+
documentsReducer: documentsReducer2,
|
|
5805
|
+
projectReducer: projectReducer2,
|
|
5806
|
+
formSubmissionReducer: formSubmissionReducer2,
|
|
5807
|
+
formRevisionReducer: formRevisionReducer2
|
|
5808
|
+
} = this.client.store.getState();
|
|
5809
|
+
const objectsWithSha1 = [].concat(
|
|
5810
|
+
Object.values(issueReducer2.attachments),
|
|
5811
|
+
Object.values(componentReducer2.attachments),
|
|
5812
|
+
Object.values(componentTypeReducer2.attachments),
|
|
5813
|
+
Object.values(documentsReducer2.attachments),
|
|
5814
|
+
Object.values(projectReducer2.attachments),
|
|
5815
|
+
Object.values(formRevisionReducer2.attachments),
|
|
5816
|
+
Object.values(formSubmissionReducer2.attachments)
|
|
5817
|
+
);
|
|
5818
|
+
return objectsWithSha1.filter((object) => object.file_sha1 === sha1).length;
|
|
5819
|
+
}
|
|
5820
|
+
processPresignedUrls(presignedUrls) {
|
|
5821
|
+
for (const [sha1, presignedUrl] of Object.entries(presignedUrls)) {
|
|
5822
|
+
void this.enqueueRequest({
|
|
5823
|
+
url: presignedUrl.url,
|
|
5824
|
+
description: "Upload file to S3",
|
|
5825
|
+
method: HttpMethod.POST,
|
|
5826
|
+
isExternalUrl: true,
|
|
5827
|
+
isAuthNeeded: false,
|
|
5828
|
+
attachmentHash: sha1,
|
|
5829
|
+
// TODO: can we use the sha1 as the blocker?
|
|
5830
|
+
blockers: [`s3-${presignedUrl.fields.key}`],
|
|
5831
|
+
blocks: [sha1],
|
|
5832
|
+
s3url: presignedUrl
|
|
5833
|
+
});
|
|
5834
|
+
}
|
|
5835
|
+
}
|
|
5836
|
+
// Note that currently the fetching of attachments for all models dependds on the active projectId. This may change in the future. And
|
|
5837
|
+
// so for some attachment model services, this method will have to be overridden.
|
|
5838
|
+
async getAttachments(actions) {
|
|
6306
5839
|
const { store } = this.client;
|
|
6307
5840
|
const activeProjectId = store.getState().projectReducer.activeProjectId;
|
|
6308
|
-
|
|
5841
|
+
const meta = AttachmentModelMeta[this.attachmentModel];
|
|
5842
|
+
const result = await this.enqueueRequest({
|
|
5843
|
+
description: `Get ${meta.name} attachments`,
|
|
5844
|
+
method: HttpMethod.GET,
|
|
5845
|
+
url: `/projects/${activeProjectId}${meta.fetchUrlPostfix}/`,
|
|
5846
|
+
blocks: [],
|
|
5847
|
+
blockers: []
|
|
5848
|
+
});
|
|
5849
|
+
store.dispatch(actions.setAttachments(result));
|
|
5850
|
+
}
|
|
5851
|
+
async attachFiles(files, modelId, buildOfflineAttachment, actions) {
|
|
5852
|
+
const { store } = this.client;
|
|
5853
|
+
const currentUser = store.getState().userReducer.currentUser;
|
|
5854
|
+
const submittedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
5855
|
+
const offlineAttachments = [];
|
|
5856
|
+
const attachmentPayloads = [];
|
|
5857
|
+
const filePayloads = {};
|
|
5858
|
+
for (const file of files) {
|
|
5859
|
+
const sha1 = await hashFile(file);
|
|
5860
|
+
if (!(sha1 in filePayloads)) {
|
|
5861
|
+
filePayloads[sha1] = {
|
|
5862
|
+
sha1,
|
|
5863
|
+
file_type: file.type,
|
|
5864
|
+
extension: file.name.split(".").pop(),
|
|
5865
|
+
size: file.size
|
|
5866
|
+
};
|
|
5867
|
+
await this.client.files.addCache(file, sha1);
|
|
5868
|
+
}
|
|
5869
|
+
const offlineAttachment = buildOfflineAttachment({
|
|
5870
|
+
file,
|
|
5871
|
+
sha1,
|
|
5872
|
+
submittedAt,
|
|
5873
|
+
createdBy: currentUser.id,
|
|
5874
|
+
description: "",
|
|
5875
|
+
modelId
|
|
5876
|
+
});
|
|
5877
|
+
offlineAttachments.push(offlineAttachment);
|
|
5878
|
+
attachmentPayloads.push({
|
|
5879
|
+
offline_id: offlineAttachment.offline_id,
|
|
5880
|
+
name: offlineAttachment.file_name,
|
|
5881
|
+
sha1: offlineAttachment.file_sha1,
|
|
5882
|
+
description: offlineAttachment.description
|
|
5883
|
+
});
|
|
5884
|
+
}
|
|
5885
|
+
store.dispatch(actions.addAttachments(offlineAttachments));
|
|
5886
|
+
const meta = AttachmentModelMeta[this.attachmentModel];
|
|
6309
5887
|
const promise = this.enqueueRequest({
|
|
6310
|
-
description:
|
|
5888
|
+
description: `Attach files to ${meta.name}`,
|
|
6311
5889
|
method: HttpMethod.POST,
|
|
6312
|
-
url:
|
|
6313
|
-
payload: {
|
|
6314
|
-
|
|
6315
|
-
|
|
5890
|
+
url: `${meta.attachUrlPrefix}/${modelId}/attach/`,
|
|
5891
|
+
payload: {
|
|
5892
|
+
submitted_at: submittedAt,
|
|
5893
|
+
attachments: attachmentPayloads,
|
|
5894
|
+
files: Object.values(filePayloads)
|
|
5895
|
+
},
|
|
5896
|
+
blocks: offlineAttachments.map((attachment) => attachment.offline_id),
|
|
5897
|
+
blockers: offlineAttachments.map((attachment) => attachment.file_sha1)
|
|
6316
5898
|
});
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
description: "Update ComponentType",
|
|
6323
|
-
method: HttpMethod.PATCH,
|
|
6324
|
-
url: `/components/types/${componentType.offline_id}/`,
|
|
6325
|
-
payload: componentType,
|
|
6326
|
-
blockers: [componentType.offline_id],
|
|
6327
|
-
blocks: [componentType.offline_id]
|
|
5899
|
+
promise.then(({ attachments, presigned_urls }) => {
|
|
5900
|
+
store.dispatch(actions.updateAttachments(attachments));
|
|
5901
|
+
this.processPresignedUrls(presigned_urls);
|
|
5902
|
+
}).catch(() => {
|
|
5903
|
+
store.dispatch(actions.removeAttachments(offlineAttachments.map((attachment) => attachment.offline_id)));
|
|
6328
5904
|
});
|
|
5905
|
+
return [offlineAttachments, promise.then(({ attachments }) => attachments)];
|
|
6329
5906
|
}
|
|
6330
|
-
async
|
|
5907
|
+
async deleteAttachment(attachmendId, actions, selectors) {
|
|
6331
5908
|
const { store } = this.client;
|
|
6332
|
-
const
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
}
|
|
6337
|
-
const stagesOfComponentType = selectStagesFromComponentType(componentTypeId)(state) ?? [];
|
|
6338
|
-
const attachmentsOfComponentType = selectAttachmentsOfComponentType(componentTypeId)(state);
|
|
6339
|
-
store.dispatch(deleteComponentType(componentTypeId));
|
|
6340
|
-
if (stagesOfComponentType.length > 0) {
|
|
6341
|
-
const stagesOfComponentTypeIds = stagesOfComponentType.map(
|
|
6342
|
-
(componentTypeStage) => componentTypeStage.offline_id
|
|
5909
|
+
const attachment = selectors.selectAttachment(attachmendId)(store.getState());
|
|
5910
|
+
if (!attachment) {
|
|
5911
|
+
throw new Error(
|
|
5912
|
+
`Attempting to delete attachment with offline_id ${attachmendId} that does not exist in the store`
|
|
6343
5913
|
);
|
|
6344
|
-
store.dispatch(removeStages(stagesOfComponentTypeIds));
|
|
6345
5914
|
}
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
5915
|
+
store.dispatch(actions.removeAttachment(attachment.offline_id));
|
|
5916
|
+
const meta = AttachmentModelMeta[this.attachmentModel];
|
|
5917
|
+
const promise = this.enqueueRequest({
|
|
5918
|
+
description: "Delete attachment",
|
|
5919
|
+
method: HttpMethod.DELETE,
|
|
5920
|
+
url: `${meta.deleteUrlPrefix}/attachments/${attachmendId}/`,
|
|
5921
|
+
blockers: [attachmendId],
|
|
5922
|
+
blocks: []
|
|
5923
|
+
});
|
|
5924
|
+
promise.then(() => {
|
|
5925
|
+
if (this.getNumberOfAttachmentsWithSha1(attachment.file_sha1) === 0) {
|
|
5926
|
+
void this.client.files.removeCache(attachment.file_sha1);
|
|
5927
|
+
}
|
|
5928
|
+
}).catch(() => {
|
|
5929
|
+
store.dispatch(actions.setAttachment(attachment));
|
|
5930
|
+
});
|
|
5931
|
+
return promise;
|
|
5932
|
+
}
|
|
5933
|
+
}
|
|
5934
|
+
class ComponentAttachmentService extends BaseAttachmentService {
|
|
5935
|
+
constructor() {
|
|
5936
|
+
super(...arguments);
|
|
5937
|
+
__publicField(this, "attachmentModel", AttachmentModel.Component);
|
|
5938
|
+
}
|
|
5939
|
+
buildOfflineAttachment(data) {
|
|
5940
|
+
return offline({
|
|
5941
|
+
file: URL.createObjectURL(data.file),
|
|
5942
|
+
file_sha1: data.sha1,
|
|
5943
|
+
created_by: data.createdBy,
|
|
5944
|
+
file_name: data.file.name,
|
|
5945
|
+
file_type: data.file.type,
|
|
5946
|
+
submitted_at: data.submittedAt,
|
|
5947
|
+
description: data.description,
|
|
5948
|
+
component: data.modelId
|
|
5949
|
+
});
|
|
5950
|
+
}
|
|
5951
|
+
async attachFilesToComponent(files, componentId) {
|
|
5952
|
+
return this.attachFiles(
|
|
5953
|
+
files,
|
|
5954
|
+
componentId,
|
|
5955
|
+
this.buildOfflineAttachment.bind(this),
|
|
5956
|
+
{
|
|
5957
|
+
addAttachments: addComponentAttachments,
|
|
5958
|
+
updateAttachments: updateComponentAttachments,
|
|
5959
|
+
removeAttachments: removeComponentAttachments
|
|
5960
|
+
}
|
|
5961
|
+
);
|
|
5962
|
+
}
|
|
5963
|
+
deleteComponentAttachment(attachmentId) {
|
|
5964
|
+
return this.deleteAttachment(
|
|
5965
|
+
attachmentId,
|
|
5966
|
+
{
|
|
5967
|
+
setAttachment: setComponentAttachment,
|
|
5968
|
+
removeAttachment: removeComponentAttachment
|
|
5969
|
+
},
|
|
5970
|
+
{
|
|
5971
|
+
selectAttachment: selectComponentAttachment
|
|
5972
|
+
}
|
|
5973
|
+
);
|
|
5974
|
+
}
|
|
5975
|
+
async refreshStore() {
|
|
5976
|
+
return this.getAttachments({
|
|
5977
|
+
setAttachments: setComponentAttachments
|
|
5978
|
+
});
|
|
5979
|
+
}
|
|
5980
|
+
}
|
|
5981
|
+
class ComponentTypeService extends BaseApiService {
|
|
5982
|
+
add(componentType) {
|
|
5983
|
+
const offlineComponentType = offline(componentType);
|
|
5984
|
+
const { store } = this.client;
|
|
5985
|
+
const activeProjectId = store.getState().projectReducer.activeProjectId;
|
|
5986
|
+
store.dispatch(addComponentType(offlineComponentType));
|
|
5987
|
+
const promise = this.enqueueRequest({
|
|
5988
|
+
description: "Create ComponentType",
|
|
5989
|
+
method: HttpMethod.POST,
|
|
5990
|
+
url: `/projects/${activeProjectId}/component-types/`,
|
|
5991
|
+
payload: { ...offlineComponentType },
|
|
5992
|
+
blockers: [],
|
|
5993
|
+
blocks: [offlineComponentType.offline_id]
|
|
5994
|
+
});
|
|
5995
|
+
return [offlineComponentType, promise];
|
|
5996
|
+
}
|
|
5997
|
+
update(componentType) {
|
|
5998
|
+
this.client.store.dispatch(addComponentType(componentType));
|
|
5999
|
+
return this.enqueueRequest({
|
|
6000
|
+
description: "Update ComponentType",
|
|
6001
|
+
method: HttpMethod.PATCH,
|
|
6002
|
+
url: `/components/types/${componentType.offline_id}/`,
|
|
6003
|
+
payload: componentType,
|
|
6004
|
+
blockers: [componentType.offline_id],
|
|
6005
|
+
blocks: [componentType.offline_id]
|
|
6006
|
+
});
|
|
6007
|
+
}
|
|
6008
|
+
async delete(componentTypeId) {
|
|
6009
|
+
const { store } = this.client;
|
|
6010
|
+
const state = store.getState();
|
|
6011
|
+
const componentType = selectComponentType(componentTypeId)(state);
|
|
6012
|
+
if (!componentType) {
|
|
6013
|
+
throw new Error("Expected componentType to exist");
|
|
6014
|
+
}
|
|
6015
|
+
const stagesOfComponentType = selectStagesFromComponentType(componentTypeId)(state) ?? [];
|
|
6016
|
+
const attachmentsOfComponentType = selectAttachmentsOfComponentType(componentTypeId)(state);
|
|
6017
|
+
store.dispatch(deleteComponentType(componentTypeId));
|
|
6018
|
+
if (stagesOfComponentType.length > 0) {
|
|
6019
|
+
const stagesOfComponentTypeIds = stagesOfComponentType.map(
|
|
6020
|
+
(componentTypeStage) => componentTypeStage.offline_id
|
|
6021
|
+
);
|
|
6022
|
+
store.dispatch(removeStages(stagesOfComponentTypeIds));
|
|
6023
|
+
}
|
|
6024
|
+
if (attachmentsOfComponentType.length > 0) {
|
|
6025
|
+
const attachmentsOfComponentTypeIds = attachmentsOfComponentType.map(({ offline_id }) => offline_id);
|
|
6026
|
+
store.dispatch(removeComponentTypeAttachments(attachmentsOfComponentTypeIds));
|
|
6349
6027
|
}
|
|
6350
6028
|
return this.enqueueRequest({
|
|
6351
6029
|
description: "Delete ComponentType",
|
|
@@ -6372,6 +6050,53 @@ class ComponentTypeService extends BaseApiService {
|
|
|
6372
6050
|
store.dispatch(setComponentTypes(result));
|
|
6373
6051
|
}
|
|
6374
6052
|
}
|
|
6053
|
+
class ComponentTypeAttachmentService extends BaseAttachmentService {
|
|
6054
|
+
constructor() {
|
|
6055
|
+
super(...arguments);
|
|
6056
|
+
__publicField(this, "attachmentModel", AttachmentModel.ComponentType);
|
|
6057
|
+
}
|
|
6058
|
+
buildOfflineAttachment(data) {
|
|
6059
|
+
return offline({
|
|
6060
|
+
file: URL.createObjectURL(data.file),
|
|
6061
|
+
file_sha1: data.sha1,
|
|
6062
|
+
created_by: data.createdBy,
|
|
6063
|
+
file_name: data.file.name,
|
|
6064
|
+
file_type: data.file.type,
|
|
6065
|
+
submitted_at: data.submittedAt,
|
|
6066
|
+
description: data.description,
|
|
6067
|
+
component_type: data.modelId
|
|
6068
|
+
});
|
|
6069
|
+
}
|
|
6070
|
+
async attachFilesToComponentType(files, componentTypeId) {
|
|
6071
|
+
return this.attachFiles(
|
|
6072
|
+
files,
|
|
6073
|
+
componentTypeId,
|
|
6074
|
+
this.buildOfflineAttachment.bind(this),
|
|
6075
|
+
{
|
|
6076
|
+
addAttachments: addComponentTypeAttachments,
|
|
6077
|
+
updateAttachments: updateComponentTypeAttachments,
|
|
6078
|
+
removeAttachments: removeComponentTypeAttachments
|
|
6079
|
+
}
|
|
6080
|
+
);
|
|
6081
|
+
}
|
|
6082
|
+
deleteComponentTypeAttachment(attachmentId) {
|
|
6083
|
+
return this.deleteAttachment(
|
|
6084
|
+
attachmentId,
|
|
6085
|
+
{
|
|
6086
|
+
setAttachment: setComponentTypeAttachment,
|
|
6087
|
+
removeAttachment: removeComponentTypeAttachment
|
|
6088
|
+
},
|
|
6089
|
+
{
|
|
6090
|
+
selectAttachment: selectComponentTypeAttachment
|
|
6091
|
+
}
|
|
6092
|
+
);
|
|
6093
|
+
}
|
|
6094
|
+
async refreshStore() {
|
|
6095
|
+
return this.getAttachments({
|
|
6096
|
+
setAttachments: setComponentTypeAttachments
|
|
6097
|
+
});
|
|
6098
|
+
}
|
|
6099
|
+
}
|
|
6375
6100
|
class IssueCommentService extends BaseApiService {
|
|
6376
6101
|
// Omit author and submitted_at since these will always be set internally
|
|
6377
6102
|
add(comment) {
|
|
@@ -6468,11 +6193,53 @@ class IssueUpdateService extends BaseApiService {
|
|
|
6468
6193
|
store.dispatch(setIssueUpdates(filteredResult));
|
|
6469
6194
|
}
|
|
6470
6195
|
}
|
|
6196
|
+
class IssueAttachmentService extends BaseAttachmentService {
|
|
6197
|
+
constructor() {
|
|
6198
|
+
super(...arguments);
|
|
6199
|
+
__publicField(this, "attachmentModel", AttachmentModel.Issue);
|
|
6200
|
+
}
|
|
6201
|
+
buildOfflineAttachment(data) {
|
|
6202
|
+
return offline({
|
|
6203
|
+
file: URL.createObjectURL(data.file),
|
|
6204
|
+
file_sha1: data.sha1,
|
|
6205
|
+
created_by: data.createdBy,
|
|
6206
|
+
file_name: data.file.name,
|
|
6207
|
+
file_type: data.file.type,
|
|
6208
|
+
submitted_at: data.submittedAt,
|
|
6209
|
+
description: data.description,
|
|
6210
|
+
issue: data.modelId
|
|
6211
|
+
});
|
|
6212
|
+
}
|
|
6213
|
+
async attachFilesToIssue(files, issueId) {
|
|
6214
|
+
return this.attachFiles(files, issueId, this.buildOfflineAttachment.bind(this), {
|
|
6215
|
+
addAttachments: addIssueAttachments,
|
|
6216
|
+
updateAttachments: updateIssueAttachments,
|
|
6217
|
+
removeAttachments: removeIssueAttachments
|
|
6218
|
+
});
|
|
6219
|
+
}
|
|
6220
|
+
deleteIssueAttachment(attachmentId) {
|
|
6221
|
+
return this.deleteAttachment(
|
|
6222
|
+
attachmentId,
|
|
6223
|
+
{
|
|
6224
|
+
setAttachment: setIssueAttachment,
|
|
6225
|
+
removeAttachment: removeIssueAttachment
|
|
6226
|
+
},
|
|
6227
|
+
{
|
|
6228
|
+
selectAttachment: selectIssueAttachment
|
|
6229
|
+
}
|
|
6230
|
+
);
|
|
6231
|
+
}
|
|
6232
|
+
async refreshStore() {
|
|
6233
|
+
return this.getAttachments({
|
|
6234
|
+
setAttachments: setIssueAttachments
|
|
6235
|
+
});
|
|
6236
|
+
}
|
|
6237
|
+
}
|
|
6471
6238
|
class IssueService extends BaseApiService {
|
|
6472
6239
|
// Basic CRUD functions
|
|
6473
6240
|
// TODO: Once all models are represented in `Created<TModel>`, use `Created` in `OptimisticModelResult`, so we don't
|
|
6474
6241
|
// have to repeat it for all optimistic model results (all optimistic results are created).
|
|
6475
|
-
add(issue,
|
|
6242
|
+
add(issue, issueType = null) {
|
|
6476
6243
|
const { store } = this.client;
|
|
6477
6244
|
const dateWithoutMilliseconds = /* @__PURE__ */ new Date();
|
|
6478
6245
|
const state = store.getState();
|
|
@@ -6499,7 +6266,7 @@ class IssueService extends BaseApiService {
|
|
|
6499
6266
|
url: "/issues/",
|
|
6500
6267
|
queryParams: {
|
|
6501
6268
|
workspace_id: workspaceId,
|
|
6502
|
-
...
|
|
6269
|
+
...issueType ? { issue_type: issueType } : {}
|
|
6503
6270
|
},
|
|
6504
6271
|
payload: issuePayload,
|
|
6505
6272
|
blockers: [
|
|
@@ -6636,7 +6403,7 @@ class IssueService extends BaseApiService {
|
|
|
6636
6403
|
this.client.store.dispatch(updateIssue(issueToBeUpdated));
|
|
6637
6404
|
this.client.store.dispatch(removeIssueUpdate(offlineIssueUpdate.offline_id));
|
|
6638
6405
|
});
|
|
6639
|
-
const fullIssue =
|
|
6406
|
+
const fullIssue = state.issueReducer.issues[issue.offline_id];
|
|
6640
6407
|
return [fullIssue, promise];
|
|
6641
6408
|
}
|
|
6642
6409
|
async remove(id) {
|
|
@@ -6687,14 +6454,15 @@ class IssueService extends BaseApiService {
|
|
|
6687
6454
|
class IssueTypeService extends BaseApiService {
|
|
6688
6455
|
add(payload) {
|
|
6689
6456
|
const { store } = this.client;
|
|
6690
|
-
const
|
|
6457
|
+
const state = store.getState();
|
|
6458
|
+
const activeOrganizationId = state.organizationReducer.activeOrganizationId;
|
|
6691
6459
|
if (!activeOrganizationId) {
|
|
6692
6460
|
throw new Error(`No active organization, got ${activeOrganizationId} for activeOrganizationId.`);
|
|
6693
6461
|
}
|
|
6694
6462
|
const offlineIssueType = offline({
|
|
6695
6463
|
...payload,
|
|
6696
6464
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
6697
|
-
created_by:
|
|
6465
|
+
created_by: state.userReducer.currentUser.id,
|
|
6698
6466
|
organization: activeOrganizationId
|
|
6699
6467
|
});
|
|
6700
6468
|
store.dispatch(addIssueType(offlineIssueType));
|
|
@@ -6747,11 +6515,12 @@ class IssueTypeService extends BaseApiService {
|
|
|
6747
6515
|
}
|
|
6748
6516
|
delete(issueTypeId) {
|
|
6749
6517
|
const { store } = this.client;
|
|
6750
|
-
const
|
|
6518
|
+
const state = store.getState();
|
|
6519
|
+
const issueTypeToDelete = state.issueTypeReducer.issueTypes[issueTypeId];
|
|
6751
6520
|
if (!issueTypeToDelete) {
|
|
6752
6521
|
throw new Error(`IssueType with offline_id ${issueTypeId} does not exist in the store.`);
|
|
6753
6522
|
}
|
|
6754
|
-
const issuesOfIssueType = selectIssuesOfIssueType(issueTypeId)(
|
|
6523
|
+
const issuesOfIssueType = selectIssuesOfIssueType(issueTypeId)(state) ?? [];
|
|
6755
6524
|
store.dispatch(removeIssueType(issueTypeId));
|
|
6756
6525
|
store.dispatch(removeIssues(issuesOfIssueType.map((issue) => issue.offline_id)));
|
|
6757
6526
|
const promise = this.enqueueRequest({
|
|
@@ -6912,6 +6681,7 @@ class MainService extends BaseApiService {
|
|
|
6912
6681
|
const usersResult = await usersResultPromise;
|
|
6913
6682
|
await projectAccessRefreshPromise;
|
|
6914
6683
|
store.dispatch(addUsers(usersResult));
|
|
6684
|
+
void this.client.projectAttachments.refreshStore();
|
|
6915
6685
|
}
|
|
6916
6686
|
let currentWorkspaceId;
|
|
6917
6687
|
const oldWorkspaceId = this.client.store.getState().workspaceReducer.activeWorkspaceId;
|
|
@@ -6924,35 +6694,29 @@ class MainService extends BaseApiService {
|
|
|
6924
6694
|
store.dispatch(setActiveWorkspaceId(currentWorkspaceId));
|
|
6925
6695
|
void this.client.categories.refreshStore().then(() => {
|
|
6926
6696
|
void this.client.issues.refreshStore().then(() => {
|
|
6697
|
+
void this.client.issueAttachments.refreshStore().then();
|
|
6927
6698
|
void this.client.issueComments.refreshStore().then();
|
|
6699
|
+
void this.client.issueUpdates.refreshStore().then();
|
|
6928
6700
|
});
|
|
6929
6701
|
});
|
|
6930
6702
|
void this.client.projectFiles.refreshStore().then();
|
|
6931
6703
|
void this.client.componentTypes.refreshStore().then(() => {
|
|
6932
|
-
void this.client.
|
|
6933
|
-
void this.client.
|
|
6704
|
+
void this.client.componentTypeAttachments.refreshStore().then(() => {
|
|
6705
|
+
void this.client.componentStages.refreshStore().then(() => {
|
|
6706
|
+
void this.client.components.refreshStore(overwrite).then(() => {
|
|
6707
|
+
void this.client.componentAttachments.refreshStore().then();
|
|
6708
|
+
});
|
|
6709
|
+
});
|
|
6710
|
+
void this.client.componentStageCompletions.refreshStore().then();
|
|
6934
6711
|
});
|
|
6935
|
-
void this.client.componentStageCompletions.refreshStore().then();
|
|
6936
6712
|
});
|
|
6937
6713
|
void this.client.userForms.refreshStore().then(() => {
|
|
6938
6714
|
void this.client.userFormSubmissions.refreshStore().then();
|
|
6939
6715
|
});
|
|
6940
6716
|
}
|
|
6941
6717
|
if (currentProjectId) {
|
|
6942
|
-
|
|
6943
|
-
|
|
6944
|
-
const {
|
|
6945
|
-
issue_attachments,
|
|
6946
|
-
component_type_attachments,
|
|
6947
|
-
component_attachments,
|
|
6948
|
-
project_attachments,
|
|
6949
|
-
document_attachments
|
|
6950
|
-
} = result;
|
|
6951
|
-
store.dispatch(setIssueAttachments(issue_attachments));
|
|
6952
|
-
store.dispatch(setComponentAttachments(component_attachments));
|
|
6953
|
-
store.dispatch(setComponentTypeAttachments(component_type_attachments));
|
|
6954
|
-
store.dispatch(setProjectAttachments(project_attachments));
|
|
6955
|
-
store.dispatch(setDocumentAttachments(document_attachments));
|
|
6718
|
+
void this.client.documents.refreshStore().then(() => {
|
|
6719
|
+
void this.client.documentAttachments.refreshStore().then();
|
|
6956
6720
|
});
|
|
6957
6721
|
void this.client.documents.refreshStore();
|
|
6958
6722
|
void this.client.issueUpdates.refreshStore();
|
|
@@ -7055,6 +6819,7 @@ class ProjectFileService extends BaseApiService {
|
|
|
7055
6819
|
});
|
|
7056
6820
|
return promise;
|
|
7057
6821
|
}
|
|
6822
|
+
// TODO: This needs to be seperated into a update and create method
|
|
7058
6823
|
saveActive() {
|
|
7059
6824
|
const { store } = this.client;
|
|
7060
6825
|
const state = store.getState();
|
|
@@ -7120,6 +6885,48 @@ class ProjectFileService extends BaseApiService {
|
|
|
7120
6885
|
});
|
|
7121
6886
|
}
|
|
7122
6887
|
}
|
|
6888
|
+
class ProjectAttachmentService extends BaseAttachmentService {
|
|
6889
|
+
constructor() {
|
|
6890
|
+
super(...arguments);
|
|
6891
|
+
__publicField(this, "attachmentModel", AttachmentModel.Project);
|
|
6892
|
+
}
|
|
6893
|
+
buildOfflineAttachment(data) {
|
|
6894
|
+
return offline({
|
|
6895
|
+
file: URL.createObjectURL(data.file),
|
|
6896
|
+
file_sha1: data.sha1,
|
|
6897
|
+
created_by: data.createdBy,
|
|
6898
|
+
file_name: data.file.name,
|
|
6899
|
+
file_type: data.file.type,
|
|
6900
|
+
submitted_at: data.submittedAt,
|
|
6901
|
+
description: data.description,
|
|
6902
|
+
project: data.modelId
|
|
6903
|
+
});
|
|
6904
|
+
}
|
|
6905
|
+
async attachFilesToProject(files, projectId) {
|
|
6906
|
+
return this.attachFiles(files, projectId, this.buildOfflineAttachment.bind(this), {
|
|
6907
|
+
addAttachments: addProjectAttachments,
|
|
6908
|
+
updateAttachments: updateProjectAttachments,
|
|
6909
|
+
removeAttachments: removeProjectAttachments
|
|
6910
|
+
});
|
|
6911
|
+
}
|
|
6912
|
+
deleteProjectAttachment(attachmentId) {
|
|
6913
|
+
return this.deleteAttachment(
|
|
6914
|
+
attachmentId,
|
|
6915
|
+
{
|
|
6916
|
+
setAttachment: setProjectAttachment,
|
|
6917
|
+
removeAttachment: removeProjectAttachment
|
|
6918
|
+
},
|
|
6919
|
+
{
|
|
6920
|
+
selectAttachment: selectProjectAttachment
|
|
6921
|
+
}
|
|
6922
|
+
);
|
|
6923
|
+
}
|
|
6924
|
+
async refreshStore() {
|
|
6925
|
+
return this.getAttachments({
|
|
6926
|
+
setAttachments: setProjectAttachments
|
|
6927
|
+
});
|
|
6928
|
+
}
|
|
6929
|
+
}
|
|
7123
6930
|
class ProjectService extends BaseApiService {
|
|
7124
6931
|
/**
|
|
7125
6932
|
* Creates a new project. Due to the nature of project creation,
|
|
@@ -8511,6 +8318,48 @@ class DocumentService extends BaseApiService {
|
|
|
8511
8318
|
store.dispatch(addDocuments(await organizationDocumentsPromise));
|
|
8512
8319
|
}
|
|
8513
8320
|
}
|
|
8321
|
+
class DocumentAttachmentService extends BaseAttachmentService {
|
|
8322
|
+
constructor() {
|
|
8323
|
+
super(...arguments);
|
|
8324
|
+
__publicField(this, "attachmentModel", AttachmentModel.Document);
|
|
8325
|
+
}
|
|
8326
|
+
buildOfflineAttachment(data) {
|
|
8327
|
+
return offline({
|
|
8328
|
+
file: URL.createObjectURL(data.file),
|
|
8329
|
+
file_sha1: data.sha1,
|
|
8330
|
+
created_by: data.createdBy,
|
|
8331
|
+
file_name: data.file.name,
|
|
8332
|
+
file_type: data.file.type,
|
|
8333
|
+
submitted_at: data.submittedAt,
|
|
8334
|
+
description: data.description,
|
|
8335
|
+
document: data.modelId
|
|
8336
|
+
});
|
|
8337
|
+
}
|
|
8338
|
+
async attachFilesToDocument(files, documentId) {
|
|
8339
|
+
return this.attachFiles(files, documentId, this.buildOfflineAttachment.bind(this), {
|
|
8340
|
+
addAttachments: addDocumentAttachments,
|
|
8341
|
+
updateAttachments: updateDocumentAttachments,
|
|
8342
|
+
removeAttachments: removeDocumentAttachments
|
|
8343
|
+
});
|
|
8344
|
+
}
|
|
8345
|
+
deleteDocumentAttachment(attachmentId) {
|
|
8346
|
+
return this.deleteAttachment(
|
|
8347
|
+
attachmentId,
|
|
8348
|
+
{
|
|
8349
|
+
setAttachment: setDocumentAttachment,
|
|
8350
|
+
removeAttachment: removeDocumentAttachment
|
|
8351
|
+
},
|
|
8352
|
+
{
|
|
8353
|
+
selectAttachment: selectDocumentAttachment
|
|
8354
|
+
}
|
|
8355
|
+
);
|
|
8356
|
+
}
|
|
8357
|
+
async refreshStore() {
|
|
8358
|
+
return this.getAttachments({
|
|
8359
|
+
setAttachments: setDocumentAttachments
|
|
8360
|
+
});
|
|
8361
|
+
}
|
|
8362
|
+
}
|
|
8514
8363
|
class AgentService extends BaseApiService {
|
|
8515
8364
|
/**
|
|
8516
8365
|
* Prompt the agent with a message.
|
|
@@ -8542,18 +8391,6 @@ class AgentService extends BaseApiService {
|
|
|
8542
8391
|
blocks: ["rate"]
|
|
8543
8392
|
});
|
|
8544
8393
|
}
|
|
8545
|
-
async refreshStore() {
|
|
8546
|
-
const { store } = this.client;
|
|
8547
|
-
const activeProject = store.getState().projectReducer.activeProjectId;
|
|
8548
|
-
const result = await this.enqueueRequest({
|
|
8549
|
-
description: "Get agent conversation history",
|
|
8550
|
-
method: HttpMethod.GET,
|
|
8551
|
-
url: `/projects/${activeProject}/agent-conversations/`,
|
|
8552
|
-
blockers: ["agent-conversations"],
|
|
8553
|
-
blocks: ["agent-conversations"]
|
|
8554
|
-
});
|
|
8555
|
-
store.dispatch(setConversations(result));
|
|
8556
|
-
}
|
|
8557
8394
|
}
|
|
8558
8395
|
class TeamService extends BaseApiService {
|
|
8559
8396
|
add(teamPayload) {
|
|
@@ -8697,7 +8534,6 @@ class OvermapSDK {
|
|
|
8697
8534
|
__publicField(this, "store");
|
|
8698
8535
|
__publicField(this, "agent", new AgentService(this));
|
|
8699
8536
|
__publicField(this, "files", new FileService(this));
|
|
8700
|
-
__publicField(this, "attachments", new AttachmentService(this));
|
|
8701
8537
|
__publicField(this, "auth", new AuthService(this));
|
|
8702
8538
|
__publicField(this, "categories", new CategoryService(this));
|
|
8703
8539
|
__publicField(this, "projectAccesses", new ProjectAccessService(this));
|
|
@@ -8707,21 +8543,26 @@ class OvermapSDK {
|
|
|
8707
8543
|
__publicField(this, "issueTypes", new IssueTypeService(this));
|
|
8708
8544
|
__publicField(this, "issueComments", new IssueCommentService(this));
|
|
8709
8545
|
__publicField(this, "issueUpdates", new IssueUpdateService(this));
|
|
8546
|
+
__publicField(this, "issueAttachments", new IssueAttachmentService(this));
|
|
8710
8547
|
__publicField(this, "workspaces", new WorkspaceService(this));
|
|
8711
8548
|
__publicField(this, "main", new MainService(this));
|
|
8712
8549
|
__publicField(this, "components", new ComponentService(this));
|
|
8550
|
+
__publicField(this, "componentAttachments", new ComponentAttachmentService(this));
|
|
8713
8551
|
__publicField(this, "componentTypes", new ComponentTypeService(this));
|
|
8552
|
+
__publicField(this, "componentTypeAttachments", new ComponentTypeAttachmentService(this));
|
|
8714
8553
|
__publicField(this, "componentStages", new ComponentStageService(this));
|
|
8715
8554
|
__publicField(this, "componentStageCompletions", new ComponentStageCompletionService(this));
|
|
8716
8555
|
__publicField(this, "userForms", new UserFormService(this));
|
|
8717
8556
|
__publicField(this, "userFormSubmissions", new UserFormSubmissionService(this));
|
|
8718
8557
|
__publicField(this, "projects", new ProjectService(this));
|
|
8719
8558
|
__publicField(this, "projectFiles", new ProjectFileService(this));
|
|
8559
|
+
__publicField(this, "projectAttachments", new ProjectAttachmentService(this));
|
|
8720
8560
|
__publicField(this, "emailVerification", new EmailVerificationService(this));
|
|
8721
8561
|
__publicField(this, "emailDomains", new EmailDomainsService(this));
|
|
8722
8562
|
__publicField(this, "licenses", new LicenseService(this));
|
|
8723
8563
|
__publicField(this, "documents", new DocumentService(this));
|
|
8724
8564
|
__publicField(this, "teams", new TeamService(this));
|
|
8565
|
+
__publicField(this, "documentAttachments", new DocumentAttachmentService(this));
|
|
8725
8566
|
this.API_URL = apiUrl;
|
|
8726
8567
|
this.store = store;
|
|
8727
8568
|
}
|
|
@@ -9049,260 +8890,6 @@ const useFormikInput = (props) => {
|
|
|
9049
8890
|
{ ...rest, "aria-labelledby": labelId }
|
|
9050
8891
|
];
|
|
9051
8892
|
};
|
|
9052
|
-
const truthyValues = [true, "true"];
|
|
9053
|
-
const BooleanInput = memo((props) => {
|
|
9054
|
-
const [{ inputId, labelId, size, severity, showInputOnly, field, fieldProps }, rest] = useFormikInput(props);
|
|
9055
|
-
let [{ helpText, label }] = useFormikInput(props);
|
|
9056
|
-
helpText = showInputOnly ? null : helpText;
|
|
9057
|
-
label = showInputOnly ? "" : label;
|
|
9058
|
-
const color = useSeverityColor(severity);
|
|
9059
|
-
const value = truthyValues.includes(fieldProps.value);
|
|
9060
|
-
return /* @__PURE__ */ jsx(InputWithLabelAndHelpText, { helpText, severity, children: /* @__PURE__ */ jsx(
|
|
9061
|
-
InputWithLabel,
|
|
9062
|
-
{
|
|
9063
|
-
size,
|
|
9064
|
-
severity,
|
|
9065
|
-
inputId,
|
|
9066
|
-
labelId,
|
|
9067
|
-
label,
|
|
9068
|
-
image: showInputOnly ? void 0 : field.image,
|
|
9069
|
-
flexProps: { direction: "row-reverse", justify: "end", align: "center", gap: "2" },
|
|
9070
|
-
children: /* @__PURE__ */ jsx(
|
|
9071
|
-
Checkbox,
|
|
9072
|
-
{
|
|
9073
|
-
...rest,
|
|
9074
|
-
...fieldProps,
|
|
9075
|
-
id: inputId,
|
|
9076
|
-
color,
|
|
9077
|
-
value: value.toString(),
|
|
9078
|
-
checked: value,
|
|
9079
|
-
onCheckedChange: fieldProps.onChange,
|
|
9080
|
-
onChange: void 0,
|
|
9081
|
-
onBlur: void 0
|
|
9082
|
-
}
|
|
9083
|
-
)
|
|
9084
|
-
}
|
|
9085
|
-
) });
|
|
9086
|
-
});
|
|
9087
|
-
BooleanInput.displayName = "BooleanInput";
|
|
9088
|
-
var DefaultContext = {
|
|
9089
|
-
color: void 0,
|
|
9090
|
-
size: void 0,
|
|
9091
|
-
className: void 0,
|
|
9092
|
-
style: void 0,
|
|
9093
|
-
attr: void 0
|
|
9094
|
-
};
|
|
9095
|
-
var IconContext = React__default.createContext && /* @__PURE__ */ React__default.createContext(DefaultContext);
|
|
9096
|
-
var _excluded = ["attr", "size", "title"];
|
|
9097
|
-
function _objectWithoutProperties(source, excluded) {
|
|
9098
|
-
if (source == null)
|
|
9099
|
-
return {};
|
|
9100
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
9101
|
-
var key, i;
|
|
9102
|
-
if (Object.getOwnPropertySymbols) {
|
|
9103
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
9104
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
9105
|
-
key = sourceSymbolKeys[i];
|
|
9106
|
-
if (excluded.indexOf(key) >= 0)
|
|
9107
|
-
continue;
|
|
9108
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key))
|
|
9109
|
-
continue;
|
|
9110
|
-
target[key] = source[key];
|
|
9111
|
-
}
|
|
9112
|
-
}
|
|
9113
|
-
return target;
|
|
9114
|
-
}
|
|
9115
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
9116
|
-
if (source == null)
|
|
9117
|
-
return {};
|
|
9118
|
-
var target = {};
|
|
9119
|
-
for (var key in source) {
|
|
9120
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
9121
|
-
if (excluded.indexOf(key) >= 0)
|
|
9122
|
-
continue;
|
|
9123
|
-
target[key] = source[key];
|
|
9124
|
-
}
|
|
9125
|
-
}
|
|
9126
|
-
return target;
|
|
9127
|
-
}
|
|
9128
|
-
function _extends$1() {
|
|
9129
|
-
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
9130
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
9131
|
-
var source = arguments[i];
|
|
9132
|
-
for (var key in source) {
|
|
9133
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
9134
|
-
target[key] = source[key];
|
|
9135
|
-
}
|
|
9136
|
-
}
|
|
9137
|
-
}
|
|
9138
|
-
return target;
|
|
9139
|
-
};
|
|
9140
|
-
return _extends$1.apply(this, arguments);
|
|
9141
|
-
}
|
|
9142
|
-
function ownKeys(e, r) {
|
|
9143
|
-
var t = Object.keys(e);
|
|
9144
|
-
if (Object.getOwnPropertySymbols) {
|
|
9145
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
9146
|
-
r && (o = o.filter(function(r2) {
|
|
9147
|
-
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
9148
|
-
})), t.push.apply(t, o);
|
|
9149
|
-
}
|
|
9150
|
-
return t;
|
|
9151
|
-
}
|
|
9152
|
-
function _objectSpread(e) {
|
|
9153
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
9154
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
9155
|
-
r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
|
|
9156
|
-
_defineProperty(e, r2, t[r2]);
|
|
9157
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
|
|
9158
|
-
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
9159
|
-
});
|
|
9160
|
-
}
|
|
9161
|
-
return e;
|
|
9162
|
-
}
|
|
9163
|
-
function _defineProperty(obj, key, value) {
|
|
9164
|
-
key = _toPropertyKey(key);
|
|
9165
|
-
if (key in obj) {
|
|
9166
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
9167
|
-
} else {
|
|
9168
|
-
obj[key] = value;
|
|
9169
|
-
}
|
|
9170
|
-
return obj;
|
|
9171
|
-
}
|
|
9172
|
-
function _toPropertyKey(t) {
|
|
9173
|
-
var i = _toPrimitive(t, "string");
|
|
9174
|
-
return "symbol" == typeof i ? i : i + "";
|
|
9175
|
-
}
|
|
9176
|
-
function _toPrimitive(t, r) {
|
|
9177
|
-
if ("object" != typeof t || !t)
|
|
9178
|
-
return t;
|
|
9179
|
-
var e = t[Symbol.toPrimitive];
|
|
9180
|
-
if (void 0 !== e) {
|
|
9181
|
-
var i = e.call(t, r || "default");
|
|
9182
|
-
if ("object" != typeof i)
|
|
9183
|
-
return i;
|
|
9184
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
9185
|
-
}
|
|
9186
|
-
return ("string" === r ? String : Number)(t);
|
|
9187
|
-
}
|
|
9188
|
-
function Tree2Element(tree) {
|
|
9189
|
-
return tree && tree.map((node, i) => /* @__PURE__ */ React__default.createElement(node.tag, _objectSpread({
|
|
9190
|
-
key: i
|
|
9191
|
-
}, node.attr), Tree2Element(node.child)));
|
|
9192
|
-
}
|
|
9193
|
-
function GenIcon(data) {
|
|
9194
|
-
return (props) => /* @__PURE__ */ React__default.createElement(IconBase, _extends$1({
|
|
9195
|
-
attr: _objectSpread({}, data.attr)
|
|
9196
|
-
}, props), Tree2Element(data.child));
|
|
9197
|
-
}
|
|
9198
|
-
function IconBase(props) {
|
|
9199
|
-
var elem = (conf) => {
|
|
9200
|
-
var {
|
|
9201
|
-
attr,
|
|
9202
|
-
size,
|
|
9203
|
-
title: title2
|
|
9204
|
-
} = props, svgProps = _objectWithoutProperties(props, _excluded);
|
|
9205
|
-
var computedSize = size || conf.size || "1em";
|
|
9206
|
-
var className;
|
|
9207
|
-
if (conf.className)
|
|
9208
|
-
className = conf.className;
|
|
9209
|
-
if (props.className)
|
|
9210
|
-
className = (className ? className + " " : "") + props.className;
|
|
9211
|
-
return /* @__PURE__ */ React__default.createElement("svg", _extends$1({
|
|
9212
|
-
stroke: "currentColor",
|
|
9213
|
-
fill: "currentColor",
|
|
9214
|
-
strokeWidth: "0"
|
|
9215
|
-
}, conf.attr, attr, svgProps, {
|
|
9216
|
-
className,
|
|
9217
|
-
style: _objectSpread(_objectSpread({
|
|
9218
|
-
color: props.color || conf.color
|
|
9219
|
-
}, conf.style), props.style),
|
|
9220
|
-
height: computedSize,
|
|
9221
|
-
width: computedSize,
|
|
9222
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
9223
|
-
}), title2 && /* @__PURE__ */ React__default.createElement("title", null, title2), props.children);
|
|
9224
|
-
};
|
|
9225
|
-
return IconContext !== void 0 ? /* @__PURE__ */ React__default.createElement(IconContext.Consumer, null, (conf) => elem(conf)) : elem(DefaultContext);
|
|
9226
|
-
}
|
|
9227
|
-
function RiArrowDownLine(props) {
|
|
9228
|
-
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);
|
|
9229
|
-
}
|
|
9230
|
-
function RiArrowUpLine(props) {
|
|
9231
|
-
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);
|
|
9232
|
-
}
|
|
9233
|
-
function RiCalendarLine(props) {
|
|
9234
|
-
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);
|
|
9235
|
-
}
|
|
9236
|
-
function RiQrCodeLine(props) {
|
|
9237
|
-
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);
|
|
9238
|
-
}
|
|
9239
|
-
function RiFileCopyLine(props) {
|
|
9240
|
-
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);
|
|
9241
|
-
}
|
|
9242
|
-
function RiAlignJustify(props) {
|
|
9243
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M3 4H21V6H3V4ZM3 19H21V21H3V19ZM3 14H21V16H3V14ZM3 9H21V11H3V9Z" }, "child": [] }] })(props);
|
|
9244
|
-
}
|
|
9245
|
-
function RiHashtag(props) {
|
|
9246
|
-
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);
|
|
9247
|
-
}
|
|
9248
|
-
function RiInputField(props) {
|
|
9249
|
-
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);
|
|
9250
|
-
}
|
|
9251
|
-
function RiListCheck(props) {
|
|
9252
|
-
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);
|
|
9253
|
-
}
|
|
9254
|
-
function RiImageLine(props) {
|
|
9255
|
-
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);
|
|
9256
|
-
}
|
|
9257
|
-
function RiCheckboxCircleLine(props) {
|
|
9258
|
-
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);
|
|
9259
|
-
}
|
|
9260
|
-
function RiCheckboxLine(props) {
|
|
9261
|
-
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);
|
|
9262
|
-
}
|
|
9263
|
-
function RiDeleteBin2Line(props) {
|
|
9264
|
-
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);
|
|
9265
|
-
}
|
|
9266
|
-
function RiMenuFoldLine(props) {
|
|
9267
|
-
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);
|
|
9268
|
-
}
|
|
9269
|
-
function RiUpload2Line(props) {
|
|
9270
|
-
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);
|
|
9271
|
-
}
|
|
9272
|
-
const emptyBooleanField = {
|
|
9273
|
-
...emptyBaseField,
|
|
9274
|
-
type: "boolean"
|
|
9275
|
-
};
|
|
9276
|
-
const _BooleanField = class _BooleanField extends BaseField {
|
|
9277
|
-
constructor(options) {
|
|
9278
|
-
super({ ...options, type: "boolean" });
|
|
9279
|
-
__publicField(this, "onlyValidateAfterTouched", false);
|
|
9280
|
-
}
|
|
9281
|
-
// if a BooleanField is required, `false` is considered blank
|
|
9282
|
-
isBlank(value) {
|
|
9283
|
-
return this.required && !value;
|
|
9284
|
-
}
|
|
9285
|
-
getValueFromChangeEvent(event) {
|
|
9286
|
-
if (typeof event === "boolean")
|
|
9287
|
-
return event;
|
|
9288
|
-
return event.target.checked;
|
|
9289
|
-
}
|
|
9290
|
-
serialize() {
|
|
9291
|
-
return super._serialize();
|
|
9292
|
-
}
|
|
9293
|
-
static deserialize(data) {
|
|
9294
|
-
if (data.type !== "boolean")
|
|
9295
|
-
throw new Error("Type mismatch.");
|
|
9296
|
-
return new _BooleanField(data);
|
|
9297
|
-
}
|
|
9298
|
-
getInput(props) {
|
|
9299
|
-
return /* @__PURE__ */ jsx(BooleanInput, { ...props, field: this });
|
|
9300
|
-
}
|
|
9301
|
-
};
|
|
9302
|
-
__publicField(_BooleanField, "fieldTypeName", "Checkbox");
|
|
9303
|
-
__publicField(_BooleanField, "fieldTypeDescription", "Perfect for both optional and required yes/no questions.");
|
|
9304
|
-
__publicField(_BooleanField, "Icon", RiCheckboxCircleLine);
|
|
9305
|
-
let BooleanField = _BooleanField;
|
|
9306
8893
|
function getDefaultExportFromCjs(x) {
|
|
9307
8894
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
9308
8895
|
}
|
|
@@ -9355,8 +8942,8 @@ var classnames = { exports: {} };
|
|
|
9355
8942
|
})(classnames);
|
|
9356
8943
|
var classnamesExports = classnames.exports;
|
|
9357
8944
|
const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
|
|
9358
|
-
function _extends() {
|
|
9359
|
-
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
8945
|
+
function _extends$1() {
|
|
8946
|
+
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
9360
8947
|
for (var i = 1; i < arguments.length; i++) {
|
|
9361
8948
|
var source = arguments[i];
|
|
9362
8949
|
for (var key in source) {
|
|
@@ -9367,7 +8954,7 @@ function _extends() {
|
|
|
9367
8954
|
}
|
|
9368
8955
|
return target;
|
|
9369
8956
|
};
|
|
9370
|
-
return _extends.apply(this, arguments);
|
|
8957
|
+
return _extends$1.apply(this, arguments);
|
|
9371
8958
|
}
|
|
9372
8959
|
function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
9373
8960
|
return function handleEvent(event) {
|
|
@@ -9498,11 +9085,11 @@ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /* @__PURE__ */ forwardRef((pr
|
|
|
9498
9085
|
} else
|
|
9499
9086
|
return child;
|
|
9500
9087
|
});
|
|
9501
|
-
return /* @__PURE__ */ createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
9088
|
+
return /* @__PURE__ */ createElement($5e63c961fc1ce211$var$SlotClone, _extends$1({}, slotProps, {
|
|
9502
9089
|
ref: forwardedRef
|
|
9503
9090
|
}), /* @__PURE__ */ isValidElement(newElement) ? /* @__PURE__ */ cloneElement(newElement, void 0, newChildren) : null);
|
|
9504
9091
|
}
|
|
9505
|
-
return /* @__PURE__ */ createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
9092
|
+
return /* @__PURE__ */ createElement($5e63c961fc1ce211$var$SlotClone, _extends$1({}, slotProps, {
|
|
9506
9093
|
ref: forwardedRef
|
|
9507
9094
|
}), children);
|
|
9508
9095
|
});
|
|
@@ -9580,7 +9167,7 @@ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.re
|
|
|
9580
9167
|
useEffect(() => {
|
|
9581
9168
|
window[Symbol.for("radix-ui")] = true;
|
|
9582
9169
|
}, []);
|
|
9583
|
-
return /* @__PURE__ */ createElement(Comp, _extends({}, primitiveProps, {
|
|
9170
|
+
return /* @__PURE__ */ createElement(Comp, _extends$1({}, primitiveProps, {
|
|
9584
9171
|
ref: forwardedRef
|
|
9585
9172
|
}));
|
|
9586
9173
|
});
|
|
@@ -10139,9 +9726,9 @@ const Inset = React.forwardRef((props, forwardedRef) => {
|
|
|
10139
9726
|
return React.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)) });
|
|
10140
9727
|
});
|
|
10141
9728
|
Inset.displayName = "Inset";
|
|
10142
|
-
const sizes$
|
|
9729
|
+
const sizes$9 = ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
10143
9730
|
const headingPropDefs = {
|
|
10144
|
-
size: { type: "enum", values: sizes$
|
|
9731
|
+
size: { type: "enum", values: sizes$9, default: "6", responsive: true },
|
|
10145
9732
|
weight: { ...weightProp, default: "bold" },
|
|
10146
9733
|
align: alignProp,
|
|
10147
9734
|
trim: trimProp,
|
|
@@ -10154,9 +9741,9 @@ const Heading = React.forwardRef((props, forwardedRef) => {
|
|
|
10154
9741
|
return React.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.createElement(Tag, null, children));
|
|
10155
9742
|
});
|
|
10156
9743
|
Heading.displayName = "Heading";
|
|
10157
|
-
const sizes$
|
|
9744
|
+
const sizes$8 = ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
10158
9745
|
const textPropDefs = {
|
|
10159
|
-
size: { type: "enum", values: sizes$
|
|
9746
|
+
size: { type: "enum", values: sizes$8, default: void 0, responsive: true },
|
|
10160
9747
|
weight: weightProp,
|
|
10161
9748
|
align: alignProp,
|
|
10162
9749
|
trim: trimProp,
|
|
@@ -10169,11 +9756,11 @@ const Text = React.forwardRef((props, forwardedRef) => {
|
|
|
10169
9756
|
return React.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.createElement(Tag, null, children));
|
|
10170
9757
|
});
|
|
10171
9758
|
Text.displayName = "Text";
|
|
10172
|
-
const sizes$
|
|
10173
|
-
const variants$
|
|
9759
|
+
const sizes$7 = ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
9760
|
+
const variants$5 = ["solid", "soft", "outline", "ghost"];
|
|
10174
9761
|
const codePropDefs = {
|
|
10175
|
-
size: { type: "enum", values: sizes$
|
|
10176
|
-
variant: { type: "enum", values: variants$
|
|
9762
|
+
size: { type: "enum", values: sizes$7, default: void 0, responsive: true },
|
|
9763
|
+
variant: { type: "enum", values: variants$5, default: "soft" },
|
|
10177
9764
|
weight: weightProp,
|
|
10178
9765
|
color: colorProp,
|
|
10179
9766
|
highContrast: highContrastProp
|
|
@@ -10203,6 +9790,202 @@ function $010c2913dbd2fe3d$export$5cae361ad82dce8b(value) {
|
|
|
10203
9790
|
value
|
|
10204
9791
|
]);
|
|
10205
9792
|
}
|
|
9793
|
+
const $e698a72e93240346$var$CHECKBOX_NAME = "Checkbox";
|
|
9794
|
+
const [$e698a72e93240346$var$createCheckboxContext, $e698a72e93240346$export$b566c4ff5488ea01] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($e698a72e93240346$var$CHECKBOX_NAME);
|
|
9795
|
+
const [$e698a72e93240346$var$CheckboxProvider, $e698a72e93240346$var$useCheckboxContext] = $e698a72e93240346$var$createCheckboxContext($e698a72e93240346$var$CHECKBOX_NAME);
|
|
9796
|
+
const $e698a72e93240346$export$48513f6b9f8ce62d = /* @__PURE__ */ forwardRef((props, forwardedRef) => {
|
|
9797
|
+
const { __scopeCheckbox, name, checked: checkedProp, defaultChecked, required, disabled, value = "on", onCheckedChange, ...checkboxProps } = props;
|
|
9798
|
+
const [button, setButton] = useState(null);
|
|
9799
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(
|
|
9800
|
+
forwardedRef,
|
|
9801
|
+
(node) => setButton(node)
|
|
9802
|
+
);
|
|
9803
|
+
const hasConsumerStoppedPropagationRef = useRef(false);
|
|
9804
|
+
const isFormControl = button ? Boolean(button.closest("form")) : true;
|
|
9805
|
+
const [checked = false, setChecked] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
9806
|
+
prop: checkedProp,
|
|
9807
|
+
defaultProp: defaultChecked,
|
|
9808
|
+
onChange: onCheckedChange
|
|
9809
|
+
});
|
|
9810
|
+
const initialCheckedStateRef = useRef(checked);
|
|
9811
|
+
useEffect(() => {
|
|
9812
|
+
const form = button === null || button === void 0 ? void 0 : button.form;
|
|
9813
|
+
if (form) {
|
|
9814
|
+
const reset = () => setChecked(initialCheckedStateRef.current);
|
|
9815
|
+
form.addEventListener("reset", reset);
|
|
9816
|
+
return () => form.removeEventListener("reset", reset);
|
|
9817
|
+
}
|
|
9818
|
+
}, [
|
|
9819
|
+
button,
|
|
9820
|
+
setChecked
|
|
9821
|
+
]);
|
|
9822
|
+
return /* @__PURE__ */ createElement($e698a72e93240346$var$CheckboxProvider, {
|
|
9823
|
+
scope: __scopeCheckbox,
|
|
9824
|
+
state: checked,
|
|
9825
|
+
disabled
|
|
9826
|
+
}, /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends$1({
|
|
9827
|
+
type: "button",
|
|
9828
|
+
role: "checkbox",
|
|
9829
|
+
"aria-checked": $e698a72e93240346$var$isIndeterminate(checked) ? "mixed" : checked,
|
|
9830
|
+
"aria-required": required,
|
|
9831
|
+
"data-state": $e698a72e93240346$var$getState(checked),
|
|
9832
|
+
"data-disabled": disabled ? "" : void 0,
|
|
9833
|
+
disabled,
|
|
9834
|
+
value
|
|
9835
|
+
}, checkboxProps, {
|
|
9836
|
+
ref: composedRefs,
|
|
9837
|
+
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event) => {
|
|
9838
|
+
if (event.key === "Enter")
|
|
9839
|
+
event.preventDefault();
|
|
9840
|
+
}),
|
|
9841
|
+
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, (event) => {
|
|
9842
|
+
setChecked(
|
|
9843
|
+
(prevChecked) => $e698a72e93240346$var$isIndeterminate(prevChecked) ? true : !prevChecked
|
|
9844
|
+
);
|
|
9845
|
+
if (isFormControl) {
|
|
9846
|
+
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
|
|
9847
|
+
if (!hasConsumerStoppedPropagationRef.current)
|
|
9848
|
+
event.stopPropagation();
|
|
9849
|
+
}
|
|
9850
|
+
})
|
|
9851
|
+
})), isFormControl && /* @__PURE__ */ createElement($e698a72e93240346$var$BubbleInput, {
|
|
9852
|
+
control: button,
|
|
9853
|
+
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
9854
|
+
name,
|
|
9855
|
+
value,
|
|
9856
|
+
checked,
|
|
9857
|
+
required,
|
|
9858
|
+
disabled,
|
|
9859
|
+
style: {
|
|
9860
|
+
transform: "translateX(-100%)"
|
|
9861
|
+
}
|
|
9862
|
+
}));
|
|
9863
|
+
});
|
|
9864
|
+
const $e698a72e93240346$var$INDICATOR_NAME = "CheckboxIndicator";
|
|
9865
|
+
const $e698a72e93240346$export$59aad738f51d1c05 = /* @__PURE__ */ forwardRef((props, forwardedRef) => {
|
|
9866
|
+
const { __scopeCheckbox, forceMount, ...indicatorProps } = props;
|
|
9867
|
+
const context = $e698a72e93240346$var$useCheckboxContext($e698a72e93240346$var$INDICATOR_NAME, __scopeCheckbox);
|
|
9868
|
+
return /* @__PURE__ */ createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
9869
|
+
present: forceMount || $e698a72e93240346$var$isIndeterminate(context.state) || context.state === true
|
|
9870
|
+
}, /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({
|
|
9871
|
+
"data-state": $e698a72e93240346$var$getState(context.state),
|
|
9872
|
+
"data-disabled": context.disabled ? "" : void 0
|
|
9873
|
+
}, indicatorProps, {
|
|
9874
|
+
ref: forwardedRef,
|
|
9875
|
+
style: {
|
|
9876
|
+
pointerEvents: "none",
|
|
9877
|
+
...props.style
|
|
9878
|
+
}
|
|
9879
|
+
})));
|
|
9880
|
+
});
|
|
9881
|
+
const $e698a72e93240346$var$BubbleInput = (props) => {
|
|
9882
|
+
const { control, checked, bubbles = true, ...inputProps } = props;
|
|
9883
|
+
const ref = useRef(null);
|
|
9884
|
+
const prevChecked = $010c2913dbd2fe3d$export$5cae361ad82dce8b(checked);
|
|
9885
|
+
const controlSize = $db6c3485150b8e66$export$1ab7ae714698c4b8(control);
|
|
9886
|
+
useEffect(() => {
|
|
9887
|
+
const input = ref.current;
|
|
9888
|
+
const inputProto = window.HTMLInputElement.prototype;
|
|
9889
|
+
const descriptor = Object.getOwnPropertyDescriptor(inputProto, "checked");
|
|
9890
|
+
const setChecked = descriptor.set;
|
|
9891
|
+
if (prevChecked !== checked && setChecked) {
|
|
9892
|
+
const event = new Event("click", {
|
|
9893
|
+
bubbles
|
|
9894
|
+
});
|
|
9895
|
+
input.indeterminate = $e698a72e93240346$var$isIndeterminate(checked);
|
|
9896
|
+
setChecked.call(input, $e698a72e93240346$var$isIndeterminate(checked) ? false : checked);
|
|
9897
|
+
input.dispatchEvent(event);
|
|
9898
|
+
}
|
|
9899
|
+
}, [
|
|
9900
|
+
prevChecked,
|
|
9901
|
+
checked,
|
|
9902
|
+
bubbles
|
|
9903
|
+
]);
|
|
9904
|
+
return /* @__PURE__ */ createElement("input", _extends$1({
|
|
9905
|
+
type: "checkbox",
|
|
9906
|
+
"aria-hidden": true,
|
|
9907
|
+
defaultChecked: $e698a72e93240346$var$isIndeterminate(checked) ? false : checked
|
|
9908
|
+
}, inputProps, {
|
|
9909
|
+
tabIndex: -1,
|
|
9910
|
+
ref,
|
|
9911
|
+
style: {
|
|
9912
|
+
...props.style,
|
|
9913
|
+
...controlSize,
|
|
9914
|
+
position: "absolute",
|
|
9915
|
+
pointerEvents: "none",
|
|
9916
|
+
opacity: 0,
|
|
9917
|
+
margin: 0
|
|
9918
|
+
}
|
|
9919
|
+
}));
|
|
9920
|
+
};
|
|
9921
|
+
function $e698a72e93240346$var$isIndeterminate(checked) {
|
|
9922
|
+
return checked === "indeterminate";
|
|
9923
|
+
}
|
|
9924
|
+
function $e698a72e93240346$var$getState(checked) {
|
|
9925
|
+
return $e698a72e93240346$var$isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
|
|
9926
|
+
}
|
|
9927
|
+
const $e698a72e93240346$export$be92b6f5f03c0fe9 = $e698a72e93240346$export$48513f6b9f8ce62d;
|
|
9928
|
+
const $e698a72e93240346$export$adb584737d712b70 = $e698a72e93240346$export$59aad738f51d1c05;
|
|
9929
|
+
const sizes$6 = ["1", "2", "3"];
|
|
9930
|
+
const variants$4 = ["classic", "surface", "soft"];
|
|
9931
|
+
const checkboxPropDefs = {
|
|
9932
|
+
size: { type: "enum", values: sizes$6, default: "2", responsive: true },
|
|
9933
|
+
variant: { type: "enum", values: variants$4, default: "surface" },
|
|
9934
|
+
color: colorProp,
|
|
9935
|
+
highContrast: highContrastProp
|
|
9936
|
+
};
|
|
9937
|
+
const ThickCheckIcon = React.forwardRef(({ color = "currentColor", ...props }, forwardedRef) => {
|
|
9938
|
+
return React.createElement(
|
|
9939
|
+
"svg",
|
|
9940
|
+
{ width: "9", height: "9", viewBox: "0 0 9 9", fill: color, xmlns: "http://www.w3.org/2000/svg", ...props, ref: forwardedRef },
|
|
9941
|
+
React.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" })
|
|
9942
|
+
);
|
|
9943
|
+
});
|
|
9944
|
+
ThickCheckIcon.displayName = "ThickCheckIcon";
|
|
9945
|
+
const ChevronDownIcon = React.forwardRef(({ color = "currentColor", ...props }, forwardedRef) => {
|
|
9946
|
+
return React.createElement(
|
|
9947
|
+
"svg",
|
|
9948
|
+
{ width: "9", height: "9", viewBox: "0 0 9 9", fill: color, xmlns: "http://www.w3.org/2000/svg", ...props, ref: forwardedRef },
|
|
9949
|
+
React.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" })
|
|
9950
|
+
);
|
|
9951
|
+
});
|
|
9952
|
+
ChevronDownIcon.displayName = "ChevronDownIcon";
|
|
9953
|
+
const ThickChevronRightIcon = React.forwardRef(({ color = "currentColor", ...props }, forwardedRef) => {
|
|
9954
|
+
return React.createElement(
|
|
9955
|
+
"svg",
|
|
9956
|
+
{ width: "9", height: "9", viewBox: "0 0 9 9", fill: color, xmlns: "http://www.w3.org/2000/svg", ...props, ref: forwardedRef },
|
|
9957
|
+
React.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" })
|
|
9958
|
+
);
|
|
9959
|
+
});
|
|
9960
|
+
ThickChevronRightIcon.displayName = "ThickChevronRightIcon";
|
|
9961
|
+
const InfoCircledIcon = React.forwardRef(({ color = "currentColor", ...props }, forwardedRef) => {
|
|
9962
|
+
return React.createElement(
|
|
9963
|
+
"svg",
|
|
9964
|
+
{ width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, ref: forwardedRef },
|
|
9965
|
+
React.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" })
|
|
9966
|
+
);
|
|
9967
|
+
});
|
|
9968
|
+
InfoCircledIcon.displayName = "InfoCircledIcon";
|
|
9969
|
+
const Checkbox = React.forwardRef((props, forwardedRef) => {
|
|
9970
|
+
const { rest: marginRest, ...marginProps } = extractMarginProps(props);
|
|
9971
|
+
const { className, style, size = checkboxPropDefs.size.default, variant = checkboxPropDefs.variant.default, color = checkboxPropDefs.color.default, highContrast = checkboxPropDefs.highContrast.default, ...checkboxProps } = marginRest;
|
|
9972
|
+
return React.createElement(
|
|
9973
|
+
"span",
|
|
9974
|
+
{ className: classNames("rt-CheckboxRoot", className, withBreakpoints(size, "rt-r-size"), withMarginProps(marginProps)), style },
|
|
9975
|
+
React.createElement(
|
|
9976
|
+
$e698a72e93240346$export$be92b6f5f03c0fe9,
|
|
9977
|
+
{ "data-accent-color": color, ...checkboxProps, ref: forwardedRef, className: classNames("rt-reset", "rt-CheckboxButton", `rt-variant-${variant}`, {
|
|
9978
|
+
"rt-high-contrast": highContrast
|
|
9979
|
+
}) },
|
|
9980
|
+
React.createElement(
|
|
9981
|
+
$e698a72e93240346$export$adb584737d712b70,
|
|
9982
|
+
{ className: "rt-CheckboxIndicator" },
|
|
9983
|
+
React.createElement(ThickCheckIcon, { className: "rt-CheckboxIndicatorIcon" })
|
|
9984
|
+
)
|
|
9985
|
+
)
|
|
9986
|
+
);
|
|
9987
|
+
});
|
|
9988
|
+
Checkbox.displayName = "Checkbox";
|
|
10206
9989
|
function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
10207
9990
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
10208
9991
|
const [createCollectionContext, createCollectionScope] = $c512c27ab02ef895$export$50c7b4e9d9f19c1(PROVIDER_NAME);
|
|
@@ -10294,7 +10077,7 @@ const $d7bdfb9eb0fdf311$export$8699f7c8af148338 = /* @__PURE__ */ forwardRef((pr
|
|
|
10294
10077
|
scope: props.__scopeRovingFocusGroup
|
|
10295
10078
|
}, /* @__PURE__ */ createElement($d7bdfb9eb0fdf311$var$Collection.Slot, {
|
|
10296
10079
|
scope: props.__scopeRovingFocusGroup
|
|
10297
|
-
}, /* @__PURE__ */ createElement($d7bdfb9eb0fdf311$var$RovingFocusGroupImpl, _extends({}, props, {
|
|
10080
|
+
}, /* @__PURE__ */ createElement($d7bdfb9eb0fdf311$var$RovingFocusGroupImpl, _extends$1({}, props, {
|
|
10298
10081
|
ref: forwardedRef
|
|
10299
10082
|
}))));
|
|
10300
10083
|
});
|
|
@@ -10350,7 +10133,7 @@ const $d7bdfb9eb0fdf311$var$RovingFocusGroupImpl = /* @__PURE__ */ forwardRef((p
|
|
|
10350
10133
|
),
|
|
10351
10134
|
[]
|
|
10352
10135
|
)
|
|
10353
|
-
}, /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
10136
|
+
}, /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
10354
10137
|
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
10355
10138
|
"data-orientation": orientation
|
|
10356
10139
|
}, groupProps, {
|
|
@@ -10420,7 +10203,7 @@ const $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 = /* @__PURE__ */ forwardRef((pro
|
|
|
10420
10203
|
id,
|
|
10421
10204
|
focusable,
|
|
10422
10205
|
active
|
|
10423
|
-
}, /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
|
|
10206
|
+
}, /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({
|
|
10424
10207
|
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
10425
10208
|
"data-orientation": context.orientation
|
|
10426
10209
|
}, itemProps, {
|
|
@@ -10560,7 +10343,7 @@ const $57acba87d6e25586$export$ccf8d8d7bbf3c2cc = /* @__PURE__ */ forwardRef((pr
|
|
|
10560
10343
|
onScrollbarYEnabledChange: setScrollbarYEnabled,
|
|
10561
10344
|
onCornerWidthChange: setCornerWidth,
|
|
10562
10345
|
onCornerHeightChange: setCornerHeight
|
|
10563
|
-
}, /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
10346
|
+
}, /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
10564
10347
|
dir: direction
|
|
10565
10348
|
}, scrollAreaProps, {
|
|
10566
10349
|
ref: composedRefs,
|
|
@@ -10583,7 +10366,7 @@ const $57acba87d6e25586$export$a21cbf9f11fca853 = /* @__PURE__ */ forwardRef((pr
|
|
|
10583
10366
|
dangerouslySetInnerHTML: {
|
|
10584
10367
|
__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}`
|
|
10585
10368
|
}
|
|
10586
|
-
}), /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
10369
|
+
}), /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
10587
10370
|
"data-radix-scroll-area-viewport": ""
|
|
10588
10371
|
}, viewportProps, {
|
|
10589
10372
|
ref: composedRefs,
|
|
@@ -10627,16 +10410,16 @@ const $57acba87d6e25586$export$2fabd85d0eba3c57 = /* @__PURE__ */ forwardRef((pr
|
|
|
10627
10410
|
onScrollbarXEnabledChange,
|
|
10628
10411
|
onScrollbarYEnabledChange
|
|
10629
10412
|
]);
|
|
10630
|
-
return context.type === "hover" ? /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarHover, _extends({}, scrollbarProps, {
|
|
10413
|
+
return context.type === "hover" ? /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarHover, _extends$1({}, scrollbarProps, {
|
|
10631
10414
|
ref: forwardedRef,
|
|
10632
10415
|
forceMount
|
|
10633
|
-
})) : context.type === "scroll" ? /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarScroll, _extends({}, scrollbarProps, {
|
|
10416
|
+
})) : context.type === "scroll" ? /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarScroll, _extends$1({}, scrollbarProps, {
|
|
10634
10417
|
ref: forwardedRef,
|
|
10635
10418
|
forceMount
|
|
10636
|
-
})) : context.type === "auto" ? /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarAuto, _extends({}, scrollbarProps, {
|
|
10419
|
+
})) : context.type === "auto" ? /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarAuto, _extends$1({}, scrollbarProps, {
|
|
10637
10420
|
ref: forwardedRef,
|
|
10638
10421
|
forceMount
|
|
10639
|
-
})) : context.type === "always" ? /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarVisible, _extends({}, scrollbarProps, {
|
|
10422
|
+
})) : context.type === "always" ? /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarVisible, _extends$1({}, scrollbarProps, {
|
|
10640
10423
|
ref: forwardedRef
|
|
10641
10424
|
})) : null;
|
|
10642
10425
|
});
|
|
@@ -10672,7 +10455,7 @@ const $57acba87d6e25586$var$ScrollAreaScrollbarHover = /* @__PURE__ */ forwardRe
|
|
|
10672
10455
|
]);
|
|
10673
10456
|
return /* @__PURE__ */ createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
10674
10457
|
present: forceMount || visible
|
|
10675
|
-
}, /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarAuto, _extends({
|
|
10458
|
+
}, /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarAuto, _extends$1({
|
|
10676
10459
|
"data-state": visible ? "visible" : "hidden"
|
|
10677
10460
|
}, scrollbarProps, {
|
|
10678
10461
|
ref: forwardedRef
|
|
@@ -10742,7 +10525,7 @@ const $57acba87d6e25586$var$ScrollAreaScrollbarScroll = /* @__PURE__ */ forwardR
|
|
|
10742
10525
|
]);
|
|
10743
10526
|
return /* @__PURE__ */ createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
10744
10527
|
present: forceMount || state !== "hidden"
|
|
10745
|
-
}, /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarVisible, _extends({
|
|
10528
|
+
}, /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarVisible, _extends$1({
|
|
10746
10529
|
"data-state": state === "hidden" ? "hidden" : "visible"
|
|
10747
10530
|
}, scrollbarProps, {
|
|
10748
10531
|
ref: forwardedRef,
|
|
@@ -10772,7 +10555,7 @@ const $57acba87d6e25586$var$ScrollAreaScrollbarAuto = /* @__PURE__ */ forwardRef
|
|
|
10772
10555
|
$57acba87d6e25586$var$useResizeObserver(context.content, handleResize);
|
|
10773
10556
|
return /* @__PURE__ */ createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
10774
10557
|
present: forceMount || visible
|
|
10775
|
-
}, /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarVisible, _extends({
|
|
10558
|
+
}, /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarVisible, _extends$1({
|
|
10776
10559
|
"data-state": visible ? "visible" : "hidden"
|
|
10777
10560
|
}, scrollbarProps, {
|
|
10778
10561
|
ref: forwardedRef
|
|
@@ -10806,7 +10589,7 @@ const $57acba87d6e25586$var$ScrollAreaScrollbarVisible = /* @__PURE__ */ forward
|
|
|
10806
10589
|
return $57acba87d6e25586$var$getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes2, dir);
|
|
10807
10590
|
}
|
|
10808
10591
|
if (orientation === "horizontal")
|
|
10809
|
-
return /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarX, _extends({}, commonProps, {
|
|
10592
|
+
return /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarX, _extends$1({}, commonProps, {
|
|
10810
10593
|
ref: forwardedRef,
|
|
10811
10594
|
onThumbPositionChange: () => {
|
|
10812
10595
|
if (context.viewport && thumbRef.current) {
|
|
@@ -10825,7 +10608,7 @@ const $57acba87d6e25586$var$ScrollAreaScrollbarVisible = /* @__PURE__ */ forward
|
|
|
10825
10608
|
}
|
|
10826
10609
|
}));
|
|
10827
10610
|
if (orientation === "vertical")
|
|
10828
|
-
return /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarY, _extends({}, commonProps, {
|
|
10611
|
+
return /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarY, _extends$1({}, commonProps, {
|
|
10829
10612
|
ref: forwardedRef,
|
|
10830
10613
|
onThumbPositionChange: () => {
|
|
10831
10614
|
if (context.viewport && thumbRef.current) {
|
|
@@ -10857,7 +10640,7 @@ const $57acba87d6e25586$var$ScrollAreaScrollbarX = /* @__PURE__ */ forwardRef((p
|
|
|
10857
10640
|
}, [
|
|
10858
10641
|
ref
|
|
10859
10642
|
]);
|
|
10860
|
-
return /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarImpl, _extends({
|
|
10643
|
+
return /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarImpl, _extends$1({
|
|
10861
10644
|
"data-orientation": "horizontal"
|
|
10862
10645
|
}, scrollbarProps, {
|
|
10863
10646
|
ref: composeRefs,
|
|
@@ -10905,7 +10688,7 @@ const $57acba87d6e25586$var$ScrollAreaScrollbarY = /* @__PURE__ */ forwardRef((p
|
|
|
10905
10688
|
}, [
|
|
10906
10689
|
ref
|
|
10907
10690
|
]);
|
|
10908
|
-
return /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarImpl, _extends({
|
|
10691
|
+
return /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaScrollbarImpl, _extends$1({
|
|
10909
10692
|
"data-orientation": "vertical"
|
|
10910
10693
|
}, scrollbarProps, {
|
|
10911
10694
|
ref: composeRefs,
|
|
@@ -11001,7 +10784,7 @@ const $57acba87d6e25586$var$ScrollAreaScrollbarImpl = /* @__PURE__ */ forwardRef
|
|
|
11001
10784
|
onThumbPointerUp: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onThumbPointerUp),
|
|
11002
10785
|
onThumbPositionChange: handleThumbPositionChange,
|
|
11003
10786
|
onThumbPointerDown: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onThumbPointerDown)
|
|
11004
|
-
}, /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, scrollbarProps, {
|
|
10787
|
+
}, /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({}, scrollbarProps, {
|
|
11005
10788
|
ref: composeRefs,
|
|
11006
10789
|
style: {
|
|
11007
10790
|
position: "absolute",
|
|
@@ -11038,7 +10821,7 @@ const $57acba87d6e25586$export$9fba1154677d7cd2 = /* @__PURE__ */ forwardRef((pr
|
|
|
11038
10821
|
const scrollbarContext = $57acba87d6e25586$var$useScrollbarContext($57acba87d6e25586$var$THUMB_NAME, props.__scopeScrollArea);
|
|
11039
10822
|
return /* @__PURE__ */ createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
11040
10823
|
present: forceMount || scrollbarContext.hasThumb
|
|
11041
|
-
}, /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaThumbImpl, _extends({
|
|
10824
|
+
}, /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaThumbImpl, _extends$1({
|
|
11042
10825
|
ref: forwardedRef
|
|
11043
10826
|
}, thumbProps)));
|
|
11044
10827
|
});
|
|
@@ -11078,7 +10861,7 @@ const $57acba87d6e25586$var$ScrollAreaThumbImpl = /* @__PURE__ */ forwardRef((pr
|
|
|
11078
10861
|
debounceScrollEnd,
|
|
11079
10862
|
onThumbPositionChange
|
|
11080
10863
|
]);
|
|
11081
|
-
return /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
10864
|
+
return /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
11082
10865
|
"data-state": scrollbarContext.hasThumb ? "visible" : "hidden"
|
|
11083
10866
|
}, thumbProps, {
|
|
11084
10867
|
ref: composedRef,
|
|
@@ -11105,7 +10888,7 @@ const $57acba87d6e25586$export$56969d565df7cc4b = /* @__PURE__ */ forwardRef((pr
|
|
|
11105
10888
|
const context = $57acba87d6e25586$var$useScrollAreaContext($57acba87d6e25586$var$CORNER_NAME, props.__scopeScrollArea);
|
|
11106
10889
|
const hasBothScrollbarsVisible = Boolean(context.scrollbarX && context.scrollbarY);
|
|
11107
10890
|
const hasCorner = context.type !== "scroll" && hasBothScrollbarsVisible;
|
|
11108
|
-
return hasCorner ? /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaCornerImpl, _extends({}, props, {
|
|
10891
|
+
return hasCorner ? /* @__PURE__ */ createElement($57acba87d6e25586$var$ScrollAreaCornerImpl, _extends$1({}, props, {
|
|
11109
10892
|
ref: forwardedRef
|
|
11110
10893
|
})) : null;
|
|
11111
10894
|
});
|
|
@@ -11127,7 +10910,7 @@ const $57acba87d6e25586$var$ScrollAreaCornerImpl = /* @__PURE__ */ forwardRef((p
|
|
|
11127
10910
|
context.onCornerWidthChange(width);
|
|
11128
10911
|
setWidth(width);
|
|
11129
10912
|
});
|
|
11130
|
-
return hasSize ? /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, cornerProps, {
|
|
10913
|
+
return hasSize ? /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({}, cornerProps, {
|
|
11131
10914
|
ref: forwardedRef,
|
|
11132
10915
|
style: {
|
|
11133
10916
|
width: width1,
|
|
@@ -11388,7 +11171,7 @@ const $faa2e61a3361514f$export$472062a354075cee = /* @__PURE__ */ forwardRef((pr
|
|
|
11388
11171
|
scope: props.__scopeSlider
|
|
11389
11172
|
}, /* @__PURE__ */ createElement($faa2e61a3361514f$var$Collection.Slot, {
|
|
11390
11173
|
scope: props.__scopeSlider
|
|
11391
|
-
}, /* @__PURE__ */ createElement(SliderOrientation, _extends({
|
|
11174
|
+
}, /* @__PURE__ */ createElement(SliderOrientation, _extends$1({
|
|
11392
11175
|
"aria-disabled": disabled,
|
|
11393
11176
|
"data-disabled": disabled ? "" : void 0
|
|
11394
11177
|
}, sliderProps, {
|
|
@@ -11470,7 +11253,7 @@ const $faa2e61a3361514f$var$SliderHorizontal = /* @__PURE__ */ forwardRef((props
|
|
|
11470
11253
|
endEdge: isSlidingFromLeft ? "right" : "left",
|
|
11471
11254
|
direction: isSlidingFromLeft ? 1 : -1,
|
|
11472
11255
|
size: "width"
|
|
11473
|
-
}, /* @__PURE__ */ createElement($faa2e61a3361514f$var$SliderImpl, _extends({
|
|
11256
|
+
}, /* @__PURE__ */ createElement($faa2e61a3361514f$var$SliderImpl, _extends$1({
|
|
11474
11257
|
dir: direction,
|
|
11475
11258
|
"data-orientation": "horizontal"
|
|
11476
11259
|
}, sliderProps, {
|
|
@@ -11530,7 +11313,7 @@ const $faa2e61a3361514f$var$SliderVertical = /* @__PURE__ */ forwardRef((props,
|
|
|
11530
11313
|
endEdge: isSlidingFromBottom ? "top" : "bottom",
|
|
11531
11314
|
size: "height",
|
|
11532
11315
|
direction: isSlidingFromBottom ? 1 : -1
|
|
11533
|
-
}, /* @__PURE__ */ createElement($faa2e61a3361514f$var$SliderImpl, _extends({
|
|
11316
|
+
}, /* @__PURE__ */ createElement($faa2e61a3361514f$var$SliderImpl, _extends$1({
|
|
11534
11317
|
"data-orientation": "vertical"
|
|
11535
11318
|
}, sliderProps, {
|
|
11536
11319
|
ref,
|
|
@@ -11563,7 +11346,7 @@ const $faa2e61a3361514f$var$SliderVertical = /* @__PURE__ */ forwardRef((props,
|
|
|
11563
11346
|
const $faa2e61a3361514f$var$SliderImpl = /* @__PURE__ */ forwardRef((props, forwardedRef) => {
|
|
11564
11347
|
const { __scopeSlider, onSlideStart, onSlideMove, onSlideEnd, onHomeKeyDown, onEndKeyDown, onStepKeyDown, ...sliderProps } = props;
|
|
11565
11348
|
const context = $faa2e61a3361514f$var$useSliderContext($faa2e61a3361514f$var$SLIDER_NAME, __scopeSlider);
|
|
11566
|
-
return /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, sliderProps, {
|
|
11349
|
+
return /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({}, sliderProps, {
|
|
11567
11350
|
ref: forwardedRef,
|
|
11568
11351
|
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event) => {
|
|
11569
11352
|
if (event.key === "Home") {
|
|
@@ -11604,7 +11387,7 @@ const $faa2e61a3361514f$var$TRACK_NAME = "SliderTrack";
|
|
|
11604
11387
|
const $faa2e61a3361514f$export$105594979f116971 = /* @__PURE__ */ forwardRef((props, forwardedRef) => {
|
|
11605
11388
|
const { __scopeSlider, ...trackProps } = props;
|
|
11606
11389
|
const context = $faa2e61a3361514f$var$useSliderContext($faa2e61a3361514f$var$TRACK_NAME, __scopeSlider);
|
|
11607
|
-
return /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
|
|
11390
|
+
return /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({
|
|
11608
11391
|
"data-disabled": context.disabled ? "" : void 0,
|
|
11609
11392
|
"data-orientation": context.orientation
|
|
11610
11393
|
}, trackProps, {
|
|
@@ -11624,7 +11407,7 @@ const $faa2e61a3361514f$export$a5cf38a7a000fe77 = /* @__PURE__ */ forwardRef((pr
|
|
|
11624
11407
|
);
|
|
11625
11408
|
const offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0;
|
|
11626
11409
|
const offsetEnd = 100 - Math.max(...percentages);
|
|
11627
|
-
return /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
|
|
11410
|
+
return /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({
|
|
11628
11411
|
"data-orientation": context.orientation,
|
|
11629
11412
|
"data-disabled": context.disabled ? "" : void 0
|
|
11630
11413
|
}, rangeProps, {
|
|
@@ -11653,7 +11436,7 @@ const $faa2e61a3361514f$export$2c1b491743890dec = /* @__PURE__ */ forwardRef((pr
|
|
|
11653
11436
|
thumb
|
|
11654
11437
|
]
|
|
11655
11438
|
);
|
|
11656
|
-
return /* @__PURE__ */ createElement($faa2e61a3361514f$var$SliderThumbImpl, _extends({}, props, {
|
|
11439
|
+
return /* @__PURE__ */ createElement($faa2e61a3361514f$var$SliderThumbImpl, _extends$1({}, props, {
|
|
11657
11440
|
ref: composedRefs,
|
|
11658
11441
|
index: index2
|
|
11659
11442
|
}));
|
|
@@ -11692,7 +11475,7 @@ const $faa2e61a3361514f$var$SliderThumbImpl = /* @__PURE__ */ forwardRef((props,
|
|
|
11692
11475
|
}
|
|
11693
11476
|
}, /* @__PURE__ */ createElement($faa2e61a3361514f$var$Collection.ItemSlot, {
|
|
11694
11477
|
scope: props.__scopeSlider
|
|
11695
|
-
}, /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
|
|
11478
|
+
}, /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({
|
|
11696
11479
|
role: "slider",
|
|
11697
11480
|
"aria-label": props["aria-label"] || label,
|
|
11698
11481
|
"aria-valuemin": context.min,
|
|
@@ -11732,7 +11515,7 @@ const $faa2e61a3361514f$var$BubbleInput = (props) => {
|
|
|
11732
11515
|
prevValue,
|
|
11733
11516
|
value
|
|
11734
11517
|
]);
|
|
11735
|
-
return /* @__PURE__ */ createElement("input", _extends({
|
|
11518
|
+
return /* @__PURE__ */ createElement("input", _extends$1({
|
|
11736
11519
|
style: {
|
|
11737
11520
|
display: "none"
|
|
11738
11521
|
}
|
|
@@ -11951,7 +11734,7 @@ const $cddcb0b647441e34$export$e2255cf6045e8d47 = /* @__PURE__ */ forwardRef((pr
|
|
|
11951
11734
|
scope: __scopeAvatar,
|
|
11952
11735
|
imageLoadingStatus,
|
|
11953
11736
|
onImageLoadingStatusChange: setImageLoadingStatus
|
|
11954
|
-
}, /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, avatarProps, {
|
|
11737
|
+
}, /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({}, avatarProps, {
|
|
11955
11738
|
ref: forwardedRef
|
|
11956
11739
|
})));
|
|
11957
11740
|
});
|
|
@@ -11972,7 +11755,7 @@ const $cddcb0b647441e34$export$2cd8ae1985206fe8 = /* @__PURE__ */ forwardRef((pr
|
|
|
11972
11755
|
imageLoadingStatus,
|
|
11973
11756
|
handleLoadingStatusChange
|
|
11974
11757
|
]);
|
|
11975
|
-
return imageLoadingStatus === "loaded" ? /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.img, _extends({}, imageProps, {
|
|
11758
|
+
return imageLoadingStatus === "loaded" ? /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.img, _extends$1({}, imageProps, {
|
|
11976
11759
|
ref: forwardedRef,
|
|
11977
11760
|
src
|
|
11978
11761
|
})) : null;
|
|
@@ -11993,7 +11776,7 @@ const $cddcb0b647441e34$export$69fffb6a9571fbfe = /* @__PURE__ */ forwardRef((pr
|
|
|
11993
11776
|
}, [
|
|
11994
11777
|
delayMs
|
|
11995
11778
|
]);
|
|
11996
|
-
return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, fallbackProps, {
|
|
11779
|
+
return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({}, fallbackProps, {
|
|
11997
11780
|
ref: forwardedRef
|
|
11998
11781
|
})) : null;
|
|
11999
11782
|
});
|
|
@@ -12097,7 +11880,7 @@ const $69cb30bb0017df05$export$b2539bed5023c21c = /* @__PURE__ */ forwardRef((pr
|
|
|
12097
11880
|
orientation,
|
|
12098
11881
|
dir: direction,
|
|
12099
11882
|
activationMode
|
|
12100
|
-
}, /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
11883
|
+
}, /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
12101
11884
|
dir: direction,
|
|
12102
11885
|
"data-orientation": orientation
|
|
12103
11886
|
}, tabsProps, {
|
|
@@ -12109,13 +11892,13 @@ const $69cb30bb0017df05$export$9712d22edc0d78c1 = /* @__PURE__ */ forwardRef((pr
|
|
|
12109
11892
|
const { __scopeTabs, loop = true, ...listProps } = props;
|
|
12110
11893
|
const context = $69cb30bb0017df05$var$useTabsContext($69cb30bb0017df05$var$TAB_LIST_NAME, __scopeTabs);
|
|
12111
11894
|
const rovingFocusGroupScope = $69cb30bb0017df05$var$useRovingFocusGroupScope(__scopeTabs);
|
|
12112
|
-
return /* @__PURE__ */ createElement($d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9, _extends({
|
|
11895
|
+
return /* @__PURE__ */ createElement($d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9, _extends$1({
|
|
12113
11896
|
asChild: true
|
|
12114
11897
|
}, rovingFocusGroupScope, {
|
|
12115
11898
|
orientation: context.orientation,
|
|
12116
11899
|
dir: context.dir,
|
|
12117
11900
|
loop
|
|
12118
|
-
}), /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
11901
|
+
}), /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
12119
11902
|
role: "tablist",
|
|
12120
11903
|
"aria-orientation": context.orientation
|
|
12121
11904
|
}, listProps, {
|
|
@@ -12130,12 +11913,12 @@ const $69cb30bb0017df05$export$8114b9fdfdf9f3ba = /* @__PURE__ */ forwardRef((pr
|
|
|
12130
11913
|
const triggerId = $69cb30bb0017df05$var$makeTriggerId(context.baseId, value);
|
|
12131
11914
|
const contentId = $69cb30bb0017df05$var$makeContentId(context.baseId, value);
|
|
12132
11915
|
const isSelected = value === context.value;
|
|
12133
|
-
return /* @__PURE__ */ createElement($d7bdfb9eb0fdf311$export$6d08773d2e66f8f2, _extends({
|
|
11916
|
+
return /* @__PURE__ */ createElement($d7bdfb9eb0fdf311$export$6d08773d2e66f8f2, _extends$1({
|
|
12134
11917
|
asChild: true
|
|
12135
11918
|
}, rovingFocusGroupScope, {
|
|
12136
11919
|
focusable: !disabled,
|
|
12137
11920
|
active: isSelected
|
|
12138
|
-
}), /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
|
|
11921
|
+
}), /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends$1({
|
|
12139
11922
|
type: "button",
|
|
12140
11923
|
role: "tab",
|
|
12141
11924
|
"aria-selected": isSelected,
|
|
@@ -12185,7 +11968,7 @@ const $69cb30bb0017df05$export$bd905d70e8fd2ebb = /* @__PURE__ */ forwardRef((pr
|
|
|
12185
11968
|
{
|
|
12186
11969
|
present: forceMount || isSelected
|
|
12187
11970
|
},
|
|
12188
|
-
({ present }) => /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
11971
|
+
({ present }) => /* @__PURE__ */ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
12189
11972
|
"data-state": isSelected ? "active" : "inactive",
|
|
12190
11973
|
"data-orientation": context.orientation,
|
|
12191
11974
|
role: "tabpanel",
|
|
@@ -12245,6 +12028,260 @@ const Tabs = Object.assign({}, {
|
|
|
12245
12028
|
Trigger: TabsTrigger,
|
|
12246
12029
|
Content: TabsContent
|
|
12247
12030
|
});
|
|
12031
|
+
const truthyValues = [true, "true"];
|
|
12032
|
+
const BooleanInput = memo((props) => {
|
|
12033
|
+
const [{ inputId, labelId, size, severity, showInputOnly, field, fieldProps }, rest] = useFormikInput(props);
|
|
12034
|
+
let [{ helpText, label }] = useFormikInput(props);
|
|
12035
|
+
helpText = showInputOnly ? null : helpText;
|
|
12036
|
+
label = showInputOnly ? "" : label;
|
|
12037
|
+
const color = useSeverityColor(severity);
|
|
12038
|
+
const value = truthyValues.includes(fieldProps.value);
|
|
12039
|
+
return /* @__PURE__ */ jsx(InputWithLabelAndHelpText, { helpText, severity, children: /* @__PURE__ */ jsx(
|
|
12040
|
+
InputWithLabel,
|
|
12041
|
+
{
|
|
12042
|
+
size,
|
|
12043
|
+
severity,
|
|
12044
|
+
inputId,
|
|
12045
|
+
labelId,
|
|
12046
|
+
label,
|
|
12047
|
+
image: showInputOnly ? void 0 : field.image,
|
|
12048
|
+
flexProps: { direction: "row-reverse", justify: "end", align: "center", gap: "2" },
|
|
12049
|
+
children: /* @__PURE__ */ jsx(
|
|
12050
|
+
Checkbox,
|
|
12051
|
+
{
|
|
12052
|
+
...rest,
|
|
12053
|
+
...fieldProps,
|
|
12054
|
+
id: inputId,
|
|
12055
|
+
color,
|
|
12056
|
+
value: value.toString(),
|
|
12057
|
+
checked: value,
|
|
12058
|
+
onCheckedChange: fieldProps.onChange,
|
|
12059
|
+
onChange: void 0,
|
|
12060
|
+
onBlur: void 0
|
|
12061
|
+
}
|
|
12062
|
+
)
|
|
12063
|
+
}
|
|
12064
|
+
) });
|
|
12065
|
+
});
|
|
12066
|
+
BooleanInput.displayName = "BooleanInput";
|
|
12067
|
+
var DefaultContext = {
|
|
12068
|
+
color: void 0,
|
|
12069
|
+
size: void 0,
|
|
12070
|
+
className: void 0,
|
|
12071
|
+
style: void 0,
|
|
12072
|
+
attr: void 0
|
|
12073
|
+
};
|
|
12074
|
+
var IconContext = React__default.createContext && /* @__PURE__ */ React__default.createContext(DefaultContext);
|
|
12075
|
+
var _excluded = ["attr", "size", "title"];
|
|
12076
|
+
function _objectWithoutProperties(source, excluded) {
|
|
12077
|
+
if (source == null)
|
|
12078
|
+
return {};
|
|
12079
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
12080
|
+
var key, i;
|
|
12081
|
+
if (Object.getOwnPropertySymbols) {
|
|
12082
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
12083
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
12084
|
+
key = sourceSymbolKeys[i];
|
|
12085
|
+
if (excluded.indexOf(key) >= 0)
|
|
12086
|
+
continue;
|
|
12087
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key))
|
|
12088
|
+
continue;
|
|
12089
|
+
target[key] = source[key];
|
|
12090
|
+
}
|
|
12091
|
+
}
|
|
12092
|
+
return target;
|
|
12093
|
+
}
|
|
12094
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
12095
|
+
if (source == null)
|
|
12096
|
+
return {};
|
|
12097
|
+
var target = {};
|
|
12098
|
+
for (var key in source) {
|
|
12099
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12100
|
+
if (excluded.indexOf(key) >= 0)
|
|
12101
|
+
continue;
|
|
12102
|
+
target[key] = source[key];
|
|
12103
|
+
}
|
|
12104
|
+
}
|
|
12105
|
+
return target;
|
|
12106
|
+
}
|
|
12107
|
+
function _extends() {
|
|
12108
|
+
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
12109
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
12110
|
+
var source = arguments[i];
|
|
12111
|
+
for (var key in source) {
|
|
12112
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12113
|
+
target[key] = source[key];
|
|
12114
|
+
}
|
|
12115
|
+
}
|
|
12116
|
+
}
|
|
12117
|
+
return target;
|
|
12118
|
+
};
|
|
12119
|
+
return _extends.apply(this, arguments);
|
|
12120
|
+
}
|
|
12121
|
+
function ownKeys(e, r) {
|
|
12122
|
+
var t = Object.keys(e);
|
|
12123
|
+
if (Object.getOwnPropertySymbols) {
|
|
12124
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
12125
|
+
r && (o = o.filter(function(r2) {
|
|
12126
|
+
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
12127
|
+
})), t.push.apply(t, o);
|
|
12128
|
+
}
|
|
12129
|
+
return t;
|
|
12130
|
+
}
|
|
12131
|
+
function _objectSpread(e) {
|
|
12132
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
12133
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
12134
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
|
|
12135
|
+
_defineProperty(e, r2, t[r2]);
|
|
12136
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
|
|
12137
|
+
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
12138
|
+
});
|
|
12139
|
+
}
|
|
12140
|
+
return e;
|
|
12141
|
+
}
|
|
12142
|
+
function _defineProperty(obj, key, value) {
|
|
12143
|
+
key = _toPropertyKey(key);
|
|
12144
|
+
if (key in obj) {
|
|
12145
|
+
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
12146
|
+
} else {
|
|
12147
|
+
obj[key] = value;
|
|
12148
|
+
}
|
|
12149
|
+
return obj;
|
|
12150
|
+
}
|
|
12151
|
+
function _toPropertyKey(t) {
|
|
12152
|
+
var i = _toPrimitive(t, "string");
|
|
12153
|
+
return "symbol" == typeof i ? i : i + "";
|
|
12154
|
+
}
|
|
12155
|
+
function _toPrimitive(t, r) {
|
|
12156
|
+
if ("object" != typeof t || !t)
|
|
12157
|
+
return t;
|
|
12158
|
+
var e = t[Symbol.toPrimitive];
|
|
12159
|
+
if (void 0 !== e) {
|
|
12160
|
+
var i = e.call(t, r || "default");
|
|
12161
|
+
if ("object" != typeof i)
|
|
12162
|
+
return i;
|
|
12163
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
12164
|
+
}
|
|
12165
|
+
return ("string" === r ? String : Number)(t);
|
|
12166
|
+
}
|
|
12167
|
+
function Tree2Element(tree) {
|
|
12168
|
+
return tree && tree.map((node, i) => /* @__PURE__ */ React__default.createElement(node.tag, _objectSpread({
|
|
12169
|
+
key: i
|
|
12170
|
+
}, node.attr), Tree2Element(node.child)));
|
|
12171
|
+
}
|
|
12172
|
+
function GenIcon(data) {
|
|
12173
|
+
return (props) => /* @__PURE__ */ React__default.createElement(IconBase, _extends({
|
|
12174
|
+
attr: _objectSpread({}, data.attr)
|
|
12175
|
+
}, props), Tree2Element(data.child));
|
|
12176
|
+
}
|
|
12177
|
+
function IconBase(props) {
|
|
12178
|
+
var elem = (conf) => {
|
|
12179
|
+
var {
|
|
12180
|
+
attr,
|
|
12181
|
+
size,
|
|
12182
|
+
title: title2
|
|
12183
|
+
} = props, svgProps = _objectWithoutProperties(props, _excluded);
|
|
12184
|
+
var computedSize = size || conf.size || "1em";
|
|
12185
|
+
var className;
|
|
12186
|
+
if (conf.className)
|
|
12187
|
+
className = conf.className;
|
|
12188
|
+
if (props.className)
|
|
12189
|
+
className = (className ? className + " " : "") + props.className;
|
|
12190
|
+
return /* @__PURE__ */ React__default.createElement("svg", _extends({
|
|
12191
|
+
stroke: "currentColor",
|
|
12192
|
+
fill: "currentColor",
|
|
12193
|
+
strokeWidth: "0"
|
|
12194
|
+
}, conf.attr, attr, svgProps, {
|
|
12195
|
+
className,
|
|
12196
|
+
style: _objectSpread(_objectSpread({
|
|
12197
|
+
color: props.color || conf.color
|
|
12198
|
+
}, conf.style), props.style),
|
|
12199
|
+
height: computedSize,
|
|
12200
|
+
width: computedSize,
|
|
12201
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
12202
|
+
}), title2 && /* @__PURE__ */ React__default.createElement("title", null, title2), props.children);
|
|
12203
|
+
};
|
|
12204
|
+
return IconContext !== void 0 ? /* @__PURE__ */ React__default.createElement(IconContext.Consumer, null, (conf) => elem(conf)) : elem(DefaultContext);
|
|
12205
|
+
}
|
|
12206
|
+
function RiArrowDownLine(props) {
|
|
12207
|
+
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);
|
|
12208
|
+
}
|
|
12209
|
+
function RiArrowUpLine(props) {
|
|
12210
|
+
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);
|
|
12211
|
+
}
|
|
12212
|
+
function RiCalendarLine(props) {
|
|
12213
|
+
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);
|
|
12214
|
+
}
|
|
12215
|
+
function RiQrCodeLine(props) {
|
|
12216
|
+
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);
|
|
12217
|
+
}
|
|
12218
|
+
function RiFileCopyLine(props) {
|
|
12219
|
+
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);
|
|
12220
|
+
}
|
|
12221
|
+
function RiAlignJustify(props) {
|
|
12222
|
+
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24", "fill": "currentColor" }, "child": [{ "tag": "path", "attr": { "d": "M3 4H21V6H3V4ZM3 19H21V21H3V19ZM3 14H21V16H3V14ZM3 9H21V11H3V9Z" }, "child": [] }] })(props);
|
|
12223
|
+
}
|
|
12224
|
+
function RiHashtag(props) {
|
|
12225
|
+
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);
|
|
12226
|
+
}
|
|
12227
|
+
function RiInputField(props) {
|
|
12228
|
+
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);
|
|
12229
|
+
}
|
|
12230
|
+
function RiListCheck(props) {
|
|
12231
|
+
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);
|
|
12232
|
+
}
|
|
12233
|
+
function RiImageLine(props) {
|
|
12234
|
+
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);
|
|
12235
|
+
}
|
|
12236
|
+
function RiCheckboxCircleLine(props) {
|
|
12237
|
+
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);
|
|
12238
|
+
}
|
|
12239
|
+
function RiCheckboxLine(props) {
|
|
12240
|
+
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);
|
|
12241
|
+
}
|
|
12242
|
+
function RiDeleteBin2Line(props) {
|
|
12243
|
+
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);
|
|
12244
|
+
}
|
|
12245
|
+
function RiMenuFoldLine(props) {
|
|
12246
|
+
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);
|
|
12247
|
+
}
|
|
12248
|
+
function RiUpload2Line(props) {
|
|
12249
|
+
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);
|
|
12250
|
+
}
|
|
12251
|
+
const emptyBooleanField = {
|
|
12252
|
+
...emptyBaseField,
|
|
12253
|
+
type: "boolean"
|
|
12254
|
+
};
|
|
12255
|
+
const _BooleanField = class _BooleanField extends BaseField {
|
|
12256
|
+
constructor(options) {
|
|
12257
|
+
super({ ...options, type: "boolean" });
|
|
12258
|
+
__publicField(this, "onlyValidateAfterTouched", false);
|
|
12259
|
+
}
|
|
12260
|
+
// if a BooleanField is required, `false` is considered blank
|
|
12261
|
+
isBlank(value) {
|
|
12262
|
+
return this.required && !value;
|
|
12263
|
+
}
|
|
12264
|
+
getValueFromChangeEvent(event) {
|
|
12265
|
+
if (typeof event === "boolean")
|
|
12266
|
+
return event;
|
|
12267
|
+
return event.target.checked;
|
|
12268
|
+
}
|
|
12269
|
+
serialize() {
|
|
12270
|
+
return super._serialize();
|
|
12271
|
+
}
|
|
12272
|
+
static deserialize(data) {
|
|
12273
|
+
if (data.type !== "boolean")
|
|
12274
|
+
throw new Error("Type mismatch.");
|
|
12275
|
+
return new _BooleanField(data);
|
|
12276
|
+
}
|
|
12277
|
+
getInput(props) {
|
|
12278
|
+
return /* @__PURE__ */ jsx(BooleanInput, { ...props, field: this });
|
|
12279
|
+
}
|
|
12280
|
+
};
|
|
12281
|
+
__publicField(_BooleanField, "fieldTypeName", "Checkbox");
|
|
12282
|
+
__publicField(_BooleanField, "fieldTypeDescription", "Perfect for both optional and required yes/no questions.");
|
|
12283
|
+
__publicField(_BooleanField, "Icon", RiCheckboxCircleLine);
|
|
12284
|
+
let BooleanField = _BooleanField;
|
|
12248
12285
|
const NumberInput = memo((props) => {
|
|
12249
12286
|
const [{ inputId, labelId, size, severity, showInputOnly, field, fieldProps }, rest] = useFormikInput(props);
|
|
12250
12287
|
let [{ helpText, label }] = useFormikInput(props);
|
|
@@ -13350,7 +13387,7 @@ const QrInput = memo((props) => {
|
|
|
13350
13387
|
] }),
|
|
13351
13388
|
value && /* @__PURE__ */ jsx(Text, { color: "jade", size: "1", children: /* @__PURE__ */ jsx(RiIcon, { icon: "RiCheckLine", style: { verticalAlign: "bottom" } }) })
|
|
13352
13389
|
] }),
|
|
13353
|
-
value && /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(Flex, { width: "max-content", gap: "2", align: "center", children: [
|
|
13390
|
+
!!value && /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(Flex, { width: "max-content", gap: "2", align: "center", children: [
|
|
13354
13391
|
/* @__PURE__ */ jsx(Code, { color: "gray", highContrast: true, children: value }),
|
|
13355
13392
|
/* @__PURE__ */ jsx(
|
|
13356
13393
|
IconButton,
|
|
@@ -13390,9 +13427,7 @@ const QrScanner = memo((props) => {
|
|
|
13390
13427
|
}
|
|
13391
13428
|
);
|
|
13392
13429
|
setIsScannerLoading(true);
|
|
13393
|
-
qrScanner.start().
|
|
13394
|
-
setIsScannerLoading(false);
|
|
13395
|
-
}).catch(() => {
|
|
13430
|
+
void qrScanner.start().finally(() => {
|
|
13396
13431
|
setIsScannerLoading(false);
|
|
13397
13432
|
});
|
|
13398
13433
|
}, [onQrScan]);
|
|
@@ -15790,7 +15825,7 @@ const FieldBuilder = memo((props) => {
|
|
|
15790
15825
|
{
|
|
15791
15826
|
name: `${parentPath}.${index2}.required`,
|
|
15792
15827
|
render: ({ setValue, value }) => /* @__PURE__ */ jsx(
|
|
15793
|
-
Checkbox,
|
|
15828
|
+
Checkbox$1,
|
|
15794
15829
|
{
|
|
15795
15830
|
checked: value,
|
|
15796
15831
|
onCheckedChange: setValue,
|
|
@@ -16554,7 +16589,7 @@ const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
16554
16589
|
export {
|
|
16555
16590
|
APIError,
|
|
16556
16591
|
AgentService,
|
|
16557
|
-
|
|
16592
|
+
AttachmentModel,
|
|
16558
16593
|
AuthService,
|
|
16559
16594
|
BaseApiService,
|
|
16560
16595
|
BaseField,
|
|
@@ -16565,15 +16600,18 @@ export {
|
|
|
16565
16600
|
ColorPicker,
|
|
16566
16601
|
Colors,
|
|
16567
16602
|
ColorsToString,
|
|
16603
|
+
ComponentAttachmentService,
|
|
16568
16604
|
ComponentService,
|
|
16569
16605
|
ComponentStageColors,
|
|
16570
16606
|
ComponentStageCompletionService,
|
|
16571
16607
|
ComponentStageService,
|
|
16608
|
+
ComponentTypeAttachmentService,
|
|
16572
16609
|
ComponentTypeService,
|
|
16573
16610
|
DEFAULT_ISSUE_PRIORITY,
|
|
16574
16611
|
DEFAULT_ISSUE_STATUS,
|
|
16575
16612
|
DateField,
|
|
16576
16613
|
DateInput,
|
|
16614
|
+
DocumentAttachmentService,
|
|
16577
16615
|
DocumentService,
|
|
16578
16616
|
EmailDomainsService,
|
|
16579
16617
|
EmailVerificationService,
|
|
@@ -16597,6 +16635,7 @@ export {
|
|
|
16597
16635
|
InputWithHelpText,
|
|
16598
16636
|
InputWithLabel,
|
|
16599
16637
|
InputWithLabelAndHelpText,
|
|
16638
|
+
IssueAttachmentService,
|
|
16600
16639
|
IssueCommentService,
|
|
16601
16640
|
IssuePriority,
|
|
16602
16641
|
IssueService,
|
|
@@ -16629,6 +16668,7 @@ export {
|
|
|
16629
16668
|
PatchFormProvider,
|
|
16630
16669
|
ProjectAccessLevel,
|
|
16631
16670
|
ProjectAccessService,
|
|
16671
|
+
ProjectAttachmentService,
|
|
16632
16672
|
ProjectFileService,
|
|
16633
16673
|
ProjectService,
|
|
16634
16674
|
ProjectType,
|
|
@@ -16666,7 +16706,6 @@ export {
|
|
|
16666
16706
|
addComponentTypeAttachment,
|
|
16667
16707
|
addComponentTypeAttachments,
|
|
16668
16708
|
addComponentsInBatches,
|
|
16669
|
-
addConversation,
|
|
16670
16709
|
addDocumentAttachment,
|
|
16671
16710
|
addDocumentAttachments,
|
|
16672
16711
|
addDocuments,
|
|
@@ -16707,8 +16746,6 @@ export {
|
|
|
16707
16746
|
addToRecentIssues,
|
|
16708
16747
|
addUsers,
|
|
16709
16748
|
addWorkspace,
|
|
16710
|
-
agentsReducer,
|
|
16711
|
-
agentsSlice,
|
|
16712
16749
|
areArraysEqual,
|
|
16713
16750
|
authReducer,
|
|
16714
16751
|
authSlice,
|
|
@@ -16735,7 +16772,6 @@ export {
|
|
|
16735
16772
|
coordinatesToUrlText,
|
|
16736
16773
|
createOfflineAction,
|
|
16737
16774
|
createPointMarker,
|
|
16738
|
-
createSelectorWithArgs,
|
|
16739
16775
|
defaultBadgeColor,
|
|
16740
16776
|
defaultStore,
|
|
16741
16777
|
deleteComponentType,
|
|
@@ -16863,6 +16899,7 @@ export {
|
|
|
16863
16899
|
removeFavouriteProjectId,
|
|
16864
16900
|
removeIssue,
|
|
16865
16901
|
removeIssueAttachment,
|
|
16902
|
+
removeIssueAttachments,
|
|
16866
16903
|
removeIssueComment,
|
|
16867
16904
|
removeIssueComments,
|
|
16868
16905
|
removeIssueType,
|
|
@@ -16950,9 +16987,6 @@ export {
|
|
|
16950
16987
|
selectComponentsByType,
|
|
16951
16988
|
selectComponentsFromComponentType,
|
|
16952
16989
|
selectComponentsMapping,
|
|
16953
|
-
selectConversation,
|
|
16954
|
-
selectConversationMapping,
|
|
16955
|
-
selectConversations,
|
|
16956
16990
|
selectCreateProjectType,
|
|
16957
16991
|
selectCurrentUser,
|
|
16958
16992
|
selectDeletedRequests,
|
|
@@ -17040,6 +17074,7 @@ export {
|
|
|
17040
17074
|
selectProjectAccessForUser,
|
|
17041
17075
|
selectProjectAccessUserMapping,
|
|
17042
17076
|
selectProjectAccesses,
|
|
17077
|
+
selectProjectAttachment,
|
|
17043
17078
|
selectProjectAttachmentMapping,
|
|
17044
17079
|
selectProjectFileVisibility,
|
|
17045
17080
|
selectProjectFiles,
|
|
@@ -17089,14 +17124,15 @@ export {
|
|
|
17089
17124
|
setAppearance,
|
|
17090
17125
|
setCategories,
|
|
17091
17126
|
setCenterMapToProject,
|
|
17127
|
+
setComponentAttachment,
|
|
17092
17128
|
setComponentAttachments,
|
|
17129
|
+
setComponentTypeAttachment,
|
|
17093
17130
|
setComponentTypeAttachments,
|
|
17094
17131
|
setComponentTypes,
|
|
17095
17132
|
setComponents,
|
|
17096
|
-
setConversation,
|
|
17097
|
-
setConversations,
|
|
17098
17133
|
setCreateProjectType,
|
|
17099
17134
|
setCurrentUser,
|
|
17135
|
+
setDocumentAttachment,
|
|
17100
17136
|
setDocumentAttachments,
|
|
17101
17137
|
setDocuments,
|
|
17102
17138
|
setEmailDomains,
|
|
@@ -17113,6 +17149,7 @@ export {
|
|
|
17113
17149
|
setIsFetchingInitialData,
|
|
17114
17150
|
setIsImportingProjectFile,
|
|
17115
17151
|
setIsLoading,
|
|
17152
|
+
setIssueAttachment,
|
|
17116
17153
|
setIssueAttachments,
|
|
17117
17154
|
setIssueComment,
|
|
17118
17155
|
setIssueComments,
|
|
@@ -17127,6 +17164,7 @@ export {
|
|
|
17127
17164
|
setOrganizations,
|
|
17128
17165
|
setProfilePicture,
|
|
17129
17166
|
setProjectAccesses,
|
|
17167
|
+
setProjectAttachment,
|
|
17130
17168
|
setProjectAttachments,
|
|
17131
17169
|
setProjectFileVisible,
|
|
17132
17170
|
setProjects,
|
|
@@ -17161,20 +17199,25 @@ export {
|
|
|
17161
17199
|
updateActiveOrganization,
|
|
17162
17200
|
updateComponent,
|
|
17163
17201
|
updateComponentAttachment,
|
|
17202
|
+
updateComponentAttachments,
|
|
17164
17203
|
updateComponentTypeAttachment,
|
|
17204
|
+
updateComponentTypeAttachments,
|
|
17165
17205
|
updateDocumentAttachment,
|
|
17206
|
+
updateDocumentAttachments,
|
|
17166
17207
|
updateDocuments,
|
|
17167
17208
|
updateFormSubmission,
|
|
17168
17209
|
updateFormSubmissionAttachments,
|
|
17169
17210
|
updateFormSubmissions,
|
|
17170
17211
|
updateIssue,
|
|
17171
17212
|
updateIssueAttachment,
|
|
17213
|
+
updateIssueAttachments,
|
|
17172
17214
|
updateIssueType,
|
|
17173
17215
|
updateLicense,
|
|
17174
17216
|
updateOrCreateProject,
|
|
17175
17217
|
updateOrganizationAccess,
|
|
17176
17218
|
updateProjectAccess,
|
|
17177
17219
|
updateProjectAttachment,
|
|
17220
|
+
updateProjectAttachments,
|
|
17178
17221
|
updateStages,
|
|
17179
17222
|
updateTeam,
|
|
17180
17223
|
useAppDispatch,
|