@ynput/ayon-frontend-shared 0.3.10 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.cjs.js +1 -1
- package/dist/api.es.js +123 -122
- package/dist/shared/src/api/queries/tasks/updateTasks.cjs.js +1 -1
- package/dist/shared/src/api/queries/tasks/updateTasks.cjs.js.map +1 -1
- package/dist/shared/src/api/queries/tasks/updateTasks.es.js +40 -22
- package/dist/shared/src/api/queries/tasks/updateTasks.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.es.js +93 -93
- package/dist/shared/src/containers/ProjectTreeTable/buildTreeTableColumns.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.cjs.js +4 -4
- package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.es.js +226 -226
- package/dist/shared/src/containers/ProjectTreeTable/context/ClipboardContext.es.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildGroupByTableData.cjs.js +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildGroupByTableData.cjs.js.map +1 -1
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildGroupByTableData.es.js +25 -24
- package/dist/shared/src/containers/ProjectTreeTable/hooks/useBuildGroupByTableData.es.js.map +1 -1
- package/dist/types/api/queries/entityLists/types.d.ts +1 -0
- package/dist/types/api/queries/tasks/updateTasks.d.ts +7 -0
- package/package.json +1 -1
package/dist/api.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { api as t } from "./shared/src/api/base/client.es.js";
|
|
2
2
|
import { buildOperations as i, client as o } from "./shared/src/api/base/client.es.js";
|
|
3
|
-
import { ActivityFragmentFragmentDoc as n, DetailsPanelFolderFragmentFragmentDoc as a, DetailsPanelProductFragmentFragmentDoc as p, DetailsPanelRepresentationFragmentFragmentDoc as m, DetailsPanelTaskFragmentFragmentDoc as y, DetailsPanelVersionFragmentFragmentDoc as c, GetActiveUsersCountDocument as f, GetActivitiesByIdDocument as l, GetActivitiesDocument as G, GetActivityUsersDocument as d, GetAllAssigneesDocument as Q, GetAllProjectUsersAsAssigneeDocument as A, GetDetailsPanelFolderDocument as x, GetDetailsPanelRepresentationDocument as D, GetDetailsPanelTaskDocument as M, GetDetailsPanelVersionDocument as g, GetEntitiesChecklistsDocument as P, GetInboxHasUnreadDocument as
|
|
3
|
+
import { ActivityFragmentFragmentDoc as n, DetailsPanelFolderFragmentFragmentDoc as a, DetailsPanelProductFragmentFragmentDoc as p, DetailsPanelRepresentationFragmentFragmentDoc as m, DetailsPanelTaskFragmentFragmentDoc as y, DetailsPanelVersionFragmentFragmentDoc as c, GetActiveUsersCountDocument as f, GetActivitiesByIdDocument as l, GetActivitiesDocument as G, GetActivityUsersDocument as d, GetAllAssigneesDocument as Q, GetAllProjectUsersAsAssigneeDocument as A, GetDetailsPanelFolderDocument as x, GetDetailsPanelRepresentationDocument as D, GetDetailsPanelTaskDocument as M, GetDetailsPanelVersionDocument as g, GetEntitiesChecklistsDocument as P, GetInboxHasUnreadDocument as L, GetInboxMessagesDocument as F, GetInboxUnreadCountDocument as E, GetInstallEventsDocument as I, GetKanbanDocument as v, GetKanbanProjectUsersDocument as T, GetKanbanTasksDocument as U, GetLatestProductVersionDocument as V, GetListItemsDocument as S, GetListsDocument as C, GetListsItemsForReviewSessionDocument as b, GetMarketInstallEventsDocument as k, GetProductVersionsDocument as w, GetProductsDocument as R, GetProgressTaskDocument as h, GetProjectLatestDocument as j, GetTasksByParentDocument as _, GetTasksListDocument as N, GetTasksProgressDocument as O, GetVersionsByProductIdDocument as K, GetVersionsDocument as B, HasLinksFilter as z, KanbanFragmentFragmentDoc as Y, ListItemFragmentFragmentDoc as H, MessageFragmentFragmentDoc as W, PageInfoFragmentDoc as q, ProgressTaskFragmentFragmentDoc as J, SubTaskFragmentFragmentDoc as X, TaskPropsFragmentFragmentDoc as Z, VersionBaseFragmentDoc as $, VersionExtendedFragmentDoc as ee, VpFolderFragmentDoc as te, api as se } from "./shared/src/api/generated/graphql.es.js";
|
|
4
4
|
import { api as ie } from "./shared/src/api/generated/graphqlLinks.es.js";
|
|
5
5
|
import { api as ue } from "./shared/src/api/generated/access.es.js";
|
|
6
6
|
import { api as ae } from "./shared/src/api/generated/actions.es.js";
|
|
@@ -11,9 +11,9 @@ import { api as de } from "./shared/src/api/generated/attributes.es.js";
|
|
|
11
11
|
import { api as Ae } from "./shared/src/api/generated/authentication.es.js";
|
|
12
12
|
import { api as De } from "./shared/src/api/generated/bundles.es.js";
|
|
13
13
|
import { api as ge } from "./shared/src/api/generated/configuration.es.js";
|
|
14
|
-
import { api as
|
|
14
|
+
import { api as Le } from "./shared/src/api/generated/desktop.es.js";
|
|
15
15
|
import { api as Ee } from "./shared/src/api/generated/entityLists.es.js";
|
|
16
|
-
import { api as
|
|
16
|
+
import { api as ve } from "./shared/src/api/generated/events.es.js";
|
|
17
17
|
import { api as Ue } from "./shared/src/api/generated/files.es.js";
|
|
18
18
|
import { api as Se } from "./shared/src/api/generated/folders.es.js";
|
|
19
19
|
import { api as be } from "./shared/src/api/generated/inbox.es.js";
|
|
@@ -23,7 +23,7 @@ import { api as _e } from "./shared/src/api/generated/onboarding.es.js";
|
|
|
23
23
|
import { api as Oe } from "./shared/src/api/generated/operations.es.js";
|
|
24
24
|
import { api as Be } from "./shared/src/api/generated/products.es.js";
|
|
25
25
|
import { api as Ye } from "./shared/src/api/generated/projectDashboard.es.js";
|
|
26
|
-
import { api as
|
|
26
|
+
import { api as We } from "./shared/src/api/generated/projects.es.js";
|
|
27
27
|
import { api as Je } from "./shared/src/api/generated/projectFolders.es.js";
|
|
28
28
|
import { api as Ze } from "./shared/src/api/generated/reviewables.es.js";
|
|
29
29
|
import { api as et } from "./shared/src/api/generated/services.es.js";
|
|
@@ -38,11 +38,11 @@ import { api as dt } from "./shared/src/api/generated/workfiles.es.js";
|
|
|
38
38
|
import { api as At } from "./shared/src/api/generated/ynputCloud.es.js";
|
|
39
39
|
import { api as Dt } from "./shared/src/api/generated/grouping.es.js";
|
|
40
40
|
import { api as gt } from "./shared/src/api/generated/views.es.js";
|
|
41
|
-
import { actionsQueries as
|
|
41
|
+
import { actionsQueries as Lt, useExecuteActionMutation as Ft, useGetActionConfigQuery as Et, useGetActionsFromContextQuery as It, useLazyGetActionsFromContextQuery as vt, useSetActionConfigMutation as Tt } from "./shared/src/api/queries/actions/getActions.es.js";
|
|
42
42
|
import { getActivitiesGQLApi as Vt, useGetActivitiesInfiniteInfiniteQuery as St, useGetActivityUsersQuery as Ct, useGetEntitiesChecklistsQuery as bt, useGetEntityTooltipQuery as kt, useLazyGetActivitiesByIdQuery as wt } from "./shared/src/api/queries/activities/getActivities.es.js";
|
|
43
43
|
import { activitiesQueries as ht, useCreateEntityActivityMutation as jt, useDeleteActivityMutation as _t, useUpdateActivityMutation as Nt } from "./shared/src/api/queries/activities/updateActivities.es.js";
|
|
44
44
|
import { reactionQueries as Kt, useCreateReactionToActivityMutation as Bt, useDeleteReactionToActivityMutation as zt } from "./shared/src/api/queries/activities/updateReaction.es.js";
|
|
45
|
-
import { mentionsQueries as Ht, useGetEntityMentionsQuery as
|
|
45
|
+
import { mentionsQueries as Ht, useGetEntityMentionsQuery as Wt } from "./shared/src/api/queries/activities/getMentions.es.js";
|
|
46
46
|
import { useGetActivityCategoriesQuery as Jt } from "./shared/src/api/queries/activities/getCategories.es.js";
|
|
47
47
|
import { filterActivityTypes as Zt, getFilterActivityTypes as $t } from "./shared/src/api/queries/activities/util/activitiesHelpers.es.js";
|
|
48
48
|
import { useGetDashboardAddonsQuery as ts, useGetProjectAddonsQuery as ss, useGetSettingsAddonsQuery as rs, useListAddonsQuery as is } from "./shared/src/api/queries/addons/getAddons.es.js";
|
|
@@ -50,51 +50,51 @@ import { addonsQueries as us, useDeleteAddonVersionsMutation as ns, useDownloadA
|
|
|
50
50
|
import { useGetAttributeConfigQuery as ms, useGetAttributeListQuery as ys } from "./shared/src/api/queries/attributes/getAttributes.es.js";
|
|
51
51
|
import { attributesQueries as fs, usePatchAttributeConfigMutation as ls, useSetAttributeListMutation as Gs } from "./shared/src/api/queries/attributes/updateAttributes.es.js";
|
|
52
52
|
import { authenticationQueries as Qs, useCreateSessionMutation as As, useGetUserPoolsQuery as xs } from "./shared/src/api/queries/authentication/getAuthentication.es.js";
|
|
53
|
-
import { useDeleteYnputCloudKeyMutation as Ms, useGetFeedbackVerificationQuery as gs, useGetYnputCloudInfoQuery as Ps, useSetYnputCloudKeyMutation as
|
|
54
|
-
import { useGetConfigValueQuery as
|
|
53
|
+
import { useDeleteYnputCloudKeyMutation as Ms, useGetFeedbackVerificationQuery as gs, useGetYnputCloudInfoQuery as Ps, useSetYnputCloudKeyMutation as Ls, ynputCloudQueries as Fs } from "./shared/src/api/queries/cloud/cloud.es.js";
|
|
54
|
+
import { useGetConfigValueQuery as Is, useGetServerConfigOverridesQuery as vs, useGetServerConfigQuery as Ts, useGetServerConfigSchemaQuery as Us } from "./shared/src/api/queries/config/getConfig.es.js";
|
|
55
55
|
import { configurationQueries as Ss, useSetServerConfigMutation as Cs } from "./shared/src/api/queries/config/updateConfig.es.js";
|
|
56
56
|
import { FOLDER_TILE_FRAGMENT as ks, PRODUCT_TILE_FRAGMENT as ws, TASK_TILE_FRAGMENT as Rs, VERSION_TILE_FRAGMENT as hs } from "./shared/src/api/queries/entities/entityQueries.es.js";
|
|
57
57
|
import { formatEntityTiles as _s, useGetEntityQuery as Ns, useGetEntityTilesQuery as Os, useGetEventTileQuery as Ks, useGetProductVersionsQuery as Bs, useGetSearchedEntitiesInfiniteQuery as zs, useLazyGetEntityQuery as Ys } from "./shared/src/api/queries/entities/getEntity.es.js";
|
|
58
|
-
import { detailsPanelQueries as
|
|
58
|
+
import { detailsPanelQueries as Ws, useGetEntitiesDetailsPanelQuery as qs, useLazyGetEntitiesDetailsPanelQuery as Js } from "./shared/src/api/queries/entities/getEntityPanel.es.js";
|
|
59
59
|
import { detailsPanelEntityTypes as Zs, transformDetailsPanelQueriesData as $s } from "./shared/src/api/queries/entities/transformDetailsPanelData.es.js";
|
|
60
60
|
import { entitiesQueries as tr, useUpdateEntitiesMutation as sr, useUpdateEntityMutation as rr } from "./shared/src/api/queries/entities/updateEntity.es.js";
|
|
61
61
|
import { patchDetailsPanel as or, patchDetailsPanelEntity as ur } from "./shared/src/api/queries/entities/patchDetailsPanel.es.js";
|
|
62
62
|
import { LISTS_PER_PAGE as ar, LIST_ITEMS_PER_PAGE as pr, default as mr, getListsApiEnhanced as yr, useGetEntityListQuery as cr, useGetListItemsInfiniteInfiniteQuery as fr, useGetListsInfiniteInfiniteQuery as lr, useGetListsItemsForReviewSessionInfiniteQuery as Gr, useLazyGetListItemsQuery as dr, useLazyGetListsItemsForReviewSessionQuery as Qr, useLazyGetListsQuery as Ar } from "./shared/src/api/queries/entityLists/getLists.es.js";
|
|
63
|
-
import { entityListsQueriesRest as Dr, useCreateEntityListItemMutation as Mr, useCreateEntityListMutation as gr, useCreateSessionFromListMutation as Pr, useDeleteEntityListItemMutation as
|
|
63
|
+
import { entityListsQueriesRest as Dr, useCreateEntityListItemMutation as Mr, useCreateEntityListMutation as gr, useCreateSessionFromListMutation as Pr, useDeleteEntityListItemMutation as Lr, useDeleteEntityListMutation as Fr, useUpdateEntityListItemMutation as Er, useUpdateEntityListItemsMutation as Ir, useUpdateEntityListMutation as vr } from "./shared/src/api/queries/entityLists/updateLists.es.js";
|
|
64
64
|
import { useGetEntityListAttributesDefinitionQuery as Ur } from "./shared/src/api/queries/entityLists/getListsAttributes.es.js";
|
|
65
65
|
import { entityListAttributesQuery as Sr, useSetEntityListAttributesDefinitionMutation as Cr } from "./shared/src/api/queries/entityLists/updateListsAttributes.es.js";
|
|
66
66
|
import { useCreateEntityListFolderMutation as kr, useDeleteEntityListFolderMutation as wr, useGetEntityListFoldersQuery as Rr, useUpdateEntityListFolderMutation as hr } from "./shared/src/api/queries/entityLists/listFolders.es.js";
|
|
67
67
|
import { foldersQueries as _r, useGetFolderHierarchyQuery as Nr, useGetFolderListQuery as Or } from "./shared/src/api/queries/folders/getFolders.es.js";
|
|
68
68
|
import { groupingQueries as Br, useGetEntityGroupsQuery as zr } from "./shared/src/api/queries/grouping/getGrouping.es.js";
|
|
69
|
-
import { useCreateEntityLinkMutation as Hr, useDeleteEntityLinkMutation as
|
|
69
|
+
import { useCreateEntityLinkMutation as Hr, useDeleteEntityLinkMutation as Wr } from "./shared/src/api/queries/links/updateLinks.es.js";
|
|
70
70
|
import { ENTITIES_INFINITE_QUERY_COUNT as Jr, useGetSearchedEntitiesLinksInfiniteQuery as Xr } from "./shared/src/api/queries/links/getLinks.es.js";
|
|
71
71
|
import { entityLinksApi as $r, useGetEntityLinksQuery as ei } from "./shared/src/api/queries/links/getEntityLinks.es.js";
|
|
72
72
|
import { TASKS_INFINITE_QUERY_COUNT as si, parseAllAttribs as ri, useGetGroupedTasksListQuery as ii, useGetOverviewTasksByFoldersQuery as oi, useGetSearchFoldersQuery as ui, useGetTasksListInfiniteInfiniteQuery as ni, useGetTasksListQuery as ai, useLazyGetTasksByParentQuery as pi } from "./shared/src/api/queries/overview/getOverview.es.js";
|
|
73
73
|
import { createLinkDeletionPatch as yi, deleteLinksFromEntities as ci, patchOverviewEntities as fi, patchOverviewFolders as li, patchOverviewTasks as Gi, useUpdateOverviewEntitiesMutation as di } from "./shared/src/api/queries/overview/updateOverview.es.js";
|
|
74
74
|
import { patchVersions as Ai } from "./shared/src/api/queries/overview/patchVersions.es.js";
|
|
75
75
|
import { patchProducts as Di } from "./shared/src/api/queries/overview/patchProducts.es.js";
|
|
76
|
-
import { permissionsQueries as gi, useGetMyPermissionsQuery as Pi, useGetMyProjectPermissionsQuery as
|
|
76
|
+
import { permissionsQueries as gi, useGetMyPermissionsQuery as Pi, useGetMyProjectPermissionsQuery as Li } from "./shared/src/api/queries/permissions/getPermissions.es.js";
|
|
77
77
|
import { useCreateProductMutation as Ei } from "./shared/src/api/queries/products/createProduct.es.js";
|
|
78
|
-
import { default as
|
|
78
|
+
import { default as vi, useGetProductTypesQuery as Ti, useGetProjectAnatomyQuery as Ui, useGetProjectQuery as Vi, useListProjectsQuery as Si } from "./shared/src/api/queries/project/getProject.es.js";
|
|
79
79
|
import { useDeleteProjectMutation as bi, useDeployProjectMutation as ki, useSetProjectAnatomyMutation as wi, useSetProjectBundleMutation as Ri, useUpdateProjectMutation as hi } from "./shared/src/api/queries/project/updateProject.es.js";
|
|
80
80
|
import { useAssignProjectsToFolderMutation as _i, useCreateProjectFolderMutation as Ni, useDeleteProjectFolderMutation as Oi, useGetProjectFoldersQuery as Ki, useSetProjectFoldersOrderMutation as Bi, useUpdateProjectFolderMutation as zi } from "./shared/src/api/queries/projectFolders/projectFolders.es.js";
|
|
81
|
-
import { useGetReviewablesForVersionQuery as Hi, useGetViewerReviewablesQuery as
|
|
81
|
+
import { useGetReviewablesForVersionQuery as Hi, useGetViewerReviewablesQuery as Wi, useHasTranscoderQuery as qi } from "./shared/src/api/queries/review/getReview.es.js";
|
|
82
82
|
import { reviewablesQueries as Xi, useDeleteReviewableMutation as Zi, useSortVersionReviewablesMutation as $i, useUpdateReviewableMutation as eo } from "./shared/src/api/queries/review/updateReview.es.js";
|
|
83
83
|
import { shareQueries as so, useGetShareOptionsQuery as ro } from "./shared/src/api/queries/share/share.es.js";
|
|
84
84
|
import { systemQueries as oo, useGetSiteInfoQuery as uo, useLazyGetSiteInfoQuery as no, useListFrontendModulesQuery as ao } from "./shared/src/api/queries/system/getSystem.es.js";
|
|
85
|
-
import {
|
|
86
|
-
import { dashboardQueries as
|
|
87
|
-
import { useGetActiveUsersCountQuery as
|
|
88
|
-
import { useAddUserMutation as
|
|
89
|
-
import { useAddGuestUserMutation as
|
|
90
|
-
import { useCreateVersionMutation as
|
|
91
|
-
import { VP_INFINITE_QUERY_COUNT as
|
|
92
|
-
import { extractVersions as
|
|
93
|
-
import { getScopeTag as
|
|
94
|
-
import { useCreateViewMutation as vu, useDeleteViewMutation as
|
|
95
|
-
import { useGetEntitiesWatchersQuery as
|
|
96
|
-
import { useResolveUrisMutation as
|
|
97
|
-
import { confirmDialog as
|
|
85
|
+
import { patchListItemsWithTask as mo, useUpdateSubtasksMutation as yo } from "./shared/src/api/queries/tasks/updateTasks.es.js";
|
|
86
|
+
import { dashboardQueries as fo, getKanbanTasks as lo, useGetKanbanProjectUsersQuery as Go, useGetKanbanQuery as Qo, useGetProjectsInfoQuery as Ao } from "./shared/src/api/queries/userDashboard/getUserDashboard.es.js";
|
|
87
|
+
import { useGetActiveUsersCountQuery as Do, useGetAllAssigneesQuery as Mo, useGetAllProjectUsersAsAssigneeQuery as go, useGetCurrentUserQuery as Po, useGetUserByNameQuery as Lo, useGetUserQuery as Fo, useGetUserSessionsQuery as Eo, useGetUsersAssigneeQuery as Io, useGetUsersQuery as vo, useLazyGetAllProjectUsersAsAssigneeQuery as To } from "./shared/src/api/queries/users/getUsers.es.js";
|
|
88
|
+
import { useAddUserMutation as Vo, useDeleteAvatarMutation as So, useDeleteUserMutation as Co, useInvalidateUserSessionMutation as bo, useSetFrontendPreferencesMutation as ko, useUpdateUserAPIKeyMutation as wo, useUpdateUserMutation as Ro, useUpdateUserNameMutation as ho, useUpdateUserPasswordMutation as jo, useUpdateUsersMutation as _o, userQueries as No } from "./shared/src/api/queries/users/updateUsers.es.js";
|
|
89
|
+
import { useAddGuestUserMutation as Ko, useListGuestUsersQuery as Bo, useRemoveGuestUserMutation as zo } from "./shared/src/api/queries/users/guests.es.js";
|
|
90
|
+
import { useCreateVersionMutation as Ho, useDeleteVersionMutation as Wo, useGetLatestProductVersionQuery as qo, versionsQueries as Jo } from "./shared/src/api/queries/versions/updateVersions.es.js";
|
|
91
|
+
import { VP_INFINITE_QUERY_COUNT as Zo, enhancedVersionsPageApi as $o, injectedVersionsPageApi as eu, useGetGroupedVersionsListQuery as tu, useGetProductsInfiniteQuery as su, useGetVersionsByProductsQuery as ru, useGetVersionsInfiniteQuery as iu, useGetVersionsQuery as ou } from "./shared/src/api/queries/versions/getVersionsProducts.es.js";
|
|
92
|
+
import { extractVersions as nu, flattenInfiniteProductsData as au, flattenInfiniteVersionsData as pu, parseGQLErrorMessage as mu, provideTagsForEntity as yu, provideTagsForProductsInfinite as cu, provideTagsForProductsResult as fu, provideTagsForVersionsInfinite as lu, provideTagsForVersionsResult as Gu, transformProductsResponse as du, transformVersionNode as Qu, transformVersionsResponse as Au } from "./shared/src/api/queries/versions/getVersionsProductsUtils.es.js";
|
|
93
|
+
import { getScopeTag as Du, getViewsApi as Mu, useGetBaseViewQuery as gu, useGetDefaultViewQuery as Pu, useGetViewQuery as Lu, useGetWorkingViewQuery as Fu, useListViewsQuery as Eu } from "./shared/src/api/queries/views/getViews.es.js";
|
|
94
|
+
import { useCreateViewMutation as vu, useDeleteViewMutation as Tu, useSetDefaultViewMutation as Uu, useUpdateViewMutation as Vu, viewsQueries as Su } from "./shared/src/api/queries/views/updateViews.es.js";
|
|
95
|
+
import { useGetEntitiesWatchersQuery as bu, useSetEntitiesWatchersMutation as ku, watchersQueries as wu } from "./shared/src/api/queries/watchers/getWatchers.es.js";
|
|
96
|
+
import { useResolveUrisMutation as hu } from "./shared/src/api/queries/uris/getUris.es.js";
|
|
97
|
+
import { confirmDialog as _u } from "./shared/node_modules/primereact/confirmdialog/confirmdialog.esm.es.js";
|
|
98
98
|
export {
|
|
99
99
|
n as ActivityFragmentFragmentDoc,
|
|
100
100
|
a as DetailsPanelFolderFragmentFragmentDoc,
|
|
@@ -115,11 +115,11 @@ export {
|
|
|
115
115
|
M as GetDetailsPanelTaskDocument,
|
|
116
116
|
g as GetDetailsPanelVersionDocument,
|
|
117
117
|
P as GetEntitiesChecklistsDocument,
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
L as GetInboxHasUnreadDocument,
|
|
119
|
+
F as GetInboxMessagesDocument,
|
|
120
120
|
E as GetInboxUnreadCountDocument,
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
I as GetInstallEventsDocument,
|
|
122
|
+
v as GetKanbanDocument,
|
|
123
123
|
T as GetKanbanProjectUsersDocument,
|
|
124
124
|
U as GetKanbanTasksDocument,
|
|
125
125
|
V as GetLatestProductVersionDocument,
|
|
@@ -141,22 +141,22 @@ export {
|
|
|
141
141
|
ar as LISTS_PER_PAGE,
|
|
142
142
|
pr as LIST_ITEMS_PER_PAGE,
|
|
143
143
|
H as ListItemFragmentFragmentDoc,
|
|
144
|
-
|
|
144
|
+
W as MessageFragmentFragmentDoc,
|
|
145
145
|
ws as PRODUCT_TILE_FRAGMENT,
|
|
146
|
-
|
|
146
|
+
q as PageInfoFragmentDoc,
|
|
147
147
|
J as ProgressTaskFragmentFragmentDoc,
|
|
148
148
|
X as SubTaskFragmentFragmentDoc,
|
|
149
149
|
si as TASKS_INFINITE_QUERY_COUNT,
|
|
150
150
|
Rs as TASK_TILE_FRAGMENT,
|
|
151
151
|
Z as TaskPropsFragmentFragmentDoc,
|
|
152
152
|
hs as VERSION_TILE_FRAGMENT,
|
|
153
|
-
|
|
153
|
+
Zo as VP_INFINITE_QUERY_COUNT,
|
|
154
154
|
$ as VersionBaseFragmentDoc,
|
|
155
155
|
ee as VersionExtendedFragmentDoc,
|
|
156
156
|
te as VpFolderFragmentDoc,
|
|
157
157
|
ue as accessApi,
|
|
158
158
|
ae as actionsApi,
|
|
159
|
-
|
|
159
|
+
Lt as actionsQueries,
|
|
160
160
|
ht as activitiesQueries,
|
|
161
161
|
me as activityFeedApi,
|
|
162
162
|
ce as addonsApi,
|
|
@@ -172,51 +172,52 @@ export {
|
|
|
172
172
|
o as client,
|
|
173
173
|
ge as configurationApi,
|
|
174
174
|
Ss as configurationQueries,
|
|
175
|
-
|
|
175
|
+
_u as confirmDialog,
|
|
176
176
|
yi as createLinkDeletionPatch,
|
|
177
|
-
|
|
177
|
+
fo as dashboardQueries,
|
|
178
178
|
t as default,
|
|
179
179
|
ci as deleteLinksFromEntities,
|
|
180
|
-
|
|
180
|
+
Le as desktopApi,
|
|
181
181
|
Zs as detailsPanelEntityTypes,
|
|
182
|
-
|
|
183
|
-
|
|
182
|
+
Ws as detailsPanelQueries,
|
|
183
|
+
$o as enhancedVersionsPageApi,
|
|
184
184
|
tr as entitiesQueries,
|
|
185
185
|
$r as entityLinksApi,
|
|
186
186
|
Sr as entityListAttributesQuery,
|
|
187
187
|
Ee as entityListsApi,
|
|
188
188
|
mr as entityListsQueriesGql,
|
|
189
189
|
Dr as entityListsQueriesRest,
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
ve as eventsApi,
|
|
191
|
+
nu as extractVersions,
|
|
192
192
|
Ue as filesApi,
|
|
193
193
|
Zt as filterActivityTypes,
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
au as flattenInfiniteProductsData,
|
|
195
|
+
pu as flattenInfiniteVersionsData,
|
|
196
196
|
Se as foldersApi,
|
|
197
197
|
_r as foldersQueries,
|
|
198
198
|
_s as formatEntityTiles,
|
|
199
199
|
Vt as getActivitiesGQLApi,
|
|
200
200
|
$t as getFilterActivityTypes,
|
|
201
|
-
|
|
201
|
+
lo as getKanbanTasks,
|
|
202
202
|
yr as getListsApiEnhanced,
|
|
203
|
-
|
|
204
|
-
|
|
203
|
+
Du as getScopeTag,
|
|
204
|
+
Mu as getViewsApi,
|
|
205
205
|
se as gqlApi,
|
|
206
206
|
ie as gqlLinksApi,
|
|
207
207
|
Dt as groupingApi,
|
|
208
208
|
Br as groupingQueries,
|
|
209
209
|
be as inboxApi,
|
|
210
|
-
|
|
210
|
+
eu as injectedVersionsPageApi,
|
|
211
211
|
we as linksApi,
|
|
212
212
|
he as marketApi,
|
|
213
213
|
Ht as mentionsQueries,
|
|
214
214
|
_e as onboardingApi,
|
|
215
215
|
Oe as operationsApi,
|
|
216
216
|
ri as parseAllAttribs,
|
|
217
|
-
|
|
217
|
+
mu as parseGQLErrorMessage,
|
|
218
218
|
or as patchDetailsPanel,
|
|
219
219
|
ur as patchDetailsPanelEntity,
|
|
220
|
+
mo as patchListItemsWithTask,
|
|
220
221
|
fi as patchOverviewEntities,
|
|
221
222
|
li as patchOverviewFolders,
|
|
222
223
|
Gi as patchOverviewTasks,
|
|
@@ -226,13 +227,13 @@ export {
|
|
|
226
227
|
Be as productsApi,
|
|
227
228
|
Ye as projectDashboardApi,
|
|
228
229
|
Je as projectFoldersApi,
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
230
|
+
vi as projectQueries,
|
|
231
|
+
We as projectsApi,
|
|
232
|
+
yu as provideTagsForEntity,
|
|
233
|
+
cu as provideTagsForProductsInfinite,
|
|
234
|
+
fu as provideTagsForProductsResult,
|
|
235
|
+
lu as provideTagsForVersionsInfinite,
|
|
236
|
+
Gu as provideTagsForVersionsResult,
|
|
236
237
|
Kt as reactionQueries,
|
|
237
238
|
Ze as reviewablesApi,
|
|
238
239
|
Xi as reviewablesQueries,
|
|
@@ -244,12 +245,12 @@ export {
|
|
|
244
245
|
ut as teamsApi,
|
|
245
246
|
at as thumbnailsApi,
|
|
246
247
|
$s as transformDetailsPanelQueriesData,
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
248
|
+
du as transformProductsResponse,
|
|
249
|
+
Qu as transformVersionNode,
|
|
250
|
+
Au as transformVersionsResponse,
|
|
250
251
|
mt as uRIsApi,
|
|
251
|
-
|
|
252
|
-
|
|
252
|
+
Ko as useAddGuestUserMutation,
|
|
253
|
+
Vo as useAddUserMutation,
|
|
253
254
|
_i as useAssignProjectsToFolderMutation,
|
|
254
255
|
jt as useCreateEntityActivityMutation,
|
|
255
256
|
Hr as useCreateEntityLinkMutation,
|
|
@@ -261,50 +262,50 @@ export {
|
|
|
261
262
|
Bt as useCreateReactionToActivityMutation,
|
|
262
263
|
Pr as useCreateSessionFromListMutation,
|
|
263
264
|
As as useCreateSessionMutation,
|
|
264
|
-
|
|
265
|
+
Ho as useCreateVersionMutation,
|
|
265
266
|
vu as useCreateViewMutation,
|
|
266
267
|
_t as useDeleteActivityMutation,
|
|
267
268
|
ns as useDeleteAddonVersionsMutation,
|
|
268
|
-
|
|
269
|
-
|
|
269
|
+
So as useDeleteAvatarMutation,
|
|
270
|
+
Wr as useDeleteEntityLinkMutation,
|
|
270
271
|
wr as useDeleteEntityListFolderMutation,
|
|
271
|
-
|
|
272
|
-
|
|
272
|
+
Lr as useDeleteEntityListItemMutation,
|
|
273
|
+
Fr as useDeleteEntityListMutation,
|
|
273
274
|
Oi as useDeleteProjectFolderMutation,
|
|
274
275
|
bi as useDeleteProjectMutation,
|
|
275
276
|
zt as useDeleteReactionToActivityMutation,
|
|
276
277
|
Zi as useDeleteReviewableMutation,
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
278
|
+
Co as useDeleteUserMutation,
|
|
279
|
+
Wo as useDeleteVersionMutation,
|
|
280
|
+
Tu as useDeleteViewMutation,
|
|
280
281
|
Ms as useDeleteYnputCloudKeyMutation,
|
|
281
282
|
ki as useDeployProjectMutation,
|
|
282
283
|
as as useDownloadAddonsMutation,
|
|
283
|
-
|
|
284
|
+
Ft as useExecuteActionMutation,
|
|
284
285
|
Et as useGetActionConfigQuery,
|
|
285
|
-
|
|
286
|
-
|
|
286
|
+
It as useGetActionsFromContextQuery,
|
|
287
|
+
Do as useGetActiveUsersCountQuery,
|
|
287
288
|
St as useGetActivitiesInfiniteInfiniteQuery,
|
|
288
289
|
Jt as useGetActivityCategoriesQuery,
|
|
289
290
|
Ct as useGetActivityUsersQuery,
|
|
290
|
-
|
|
291
|
-
|
|
291
|
+
Mo as useGetAllAssigneesQuery,
|
|
292
|
+
go as useGetAllProjectUsersAsAssigneeQuery,
|
|
292
293
|
ms as useGetAttributeConfigQuery,
|
|
293
294
|
ys as useGetAttributeListQuery,
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
295
|
+
gu as useGetBaseViewQuery,
|
|
296
|
+
Is as useGetConfigValueQuery,
|
|
297
|
+
Po as useGetCurrentUserQuery,
|
|
297
298
|
ts as useGetDashboardAddonsQuery,
|
|
298
|
-
|
|
299
|
+
Pu as useGetDefaultViewQuery,
|
|
299
300
|
bt as useGetEntitiesChecklistsQuery,
|
|
300
|
-
|
|
301
|
-
|
|
301
|
+
qs as useGetEntitiesDetailsPanelQuery,
|
|
302
|
+
bu as useGetEntitiesWatchersQuery,
|
|
302
303
|
zr as useGetEntityGroupsQuery,
|
|
303
304
|
ei as useGetEntityLinksQuery,
|
|
304
305
|
Ur as useGetEntityListAttributesDefinitionQuery,
|
|
305
306
|
Rr as useGetEntityListFoldersQuery,
|
|
306
307
|
cr as useGetEntityListQuery,
|
|
307
|
-
|
|
308
|
+
Wt as useGetEntityMentionsQuery,
|
|
308
309
|
Ns as useGetEntityQuery,
|
|
309
310
|
Os as useGetEntityTilesQuery,
|
|
310
311
|
kt as useGetEntityTooltipQuery,
|
|
@@ -313,29 +314,29 @@ export {
|
|
|
313
314
|
Nr as useGetFolderHierarchyQuery,
|
|
314
315
|
Or as useGetFolderListQuery,
|
|
315
316
|
ii as useGetGroupedTasksListQuery,
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
317
|
+
tu as useGetGroupedVersionsListQuery,
|
|
318
|
+
Go as useGetKanbanProjectUsersQuery,
|
|
319
|
+
Qo as useGetKanbanQuery,
|
|
319
320
|
qo as useGetLatestProductVersionQuery,
|
|
320
321
|
fr as useGetListItemsInfiniteInfiniteQuery,
|
|
321
322
|
lr as useGetListsInfiniteInfiniteQuery,
|
|
322
323
|
Gr as useGetListsItemsForReviewSessionInfiniteQuery,
|
|
323
324
|
Pi as useGetMyPermissionsQuery,
|
|
324
|
-
|
|
325
|
+
Li as useGetMyProjectPermissionsQuery,
|
|
325
326
|
oi as useGetOverviewTasksByFoldersQuery,
|
|
326
327
|
Ti as useGetProductTypesQuery,
|
|
327
328
|
Bs as useGetProductVersionsQuery,
|
|
328
|
-
|
|
329
|
+
su as useGetProductsInfiniteQuery,
|
|
329
330
|
ss as useGetProjectAddonsQuery,
|
|
330
331
|
Ui as useGetProjectAnatomyQuery,
|
|
331
332
|
Ki as useGetProjectFoldersQuery,
|
|
332
333
|
Vi as useGetProjectQuery,
|
|
333
|
-
|
|
334
|
+
Ao as useGetProjectsInfoQuery,
|
|
334
335
|
Hi as useGetReviewablesForVersionQuery,
|
|
335
336
|
ui as useGetSearchFoldersQuery,
|
|
336
337
|
zs as useGetSearchedEntitiesInfiniteQuery,
|
|
337
338
|
Xr as useGetSearchedEntitiesLinksInfiniteQuery,
|
|
338
|
-
|
|
339
|
+
vs as useGetServerConfigOverridesQuery,
|
|
339
340
|
Ts as useGetServerConfigQuery,
|
|
340
341
|
Us as useGetServerConfigSchemaQuery,
|
|
341
342
|
rs as useGetSettingsAddonsQuery,
|
|
@@ -343,24 +344,24 @@ export {
|
|
|
343
344
|
uo as useGetSiteInfoQuery,
|
|
344
345
|
ni as useGetTasksListInfiniteInfiniteQuery,
|
|
345
346
|
ai as useGetTasksListQuery,
|
|
346
|
-
|
|
347
|
+
Lo as useGetUserByNameQuery,
|
|
347
348
|
xs as useGetUserPoolsQuery,
|
|
348
349
|
Fo as useGetUserQuery,
|
|
349
|
-
|
|
350
|
-
|
|
350
|
+
Eo as useGetUserSessionsQuery,
|
|
351
|
+
Io as useGetUsersAssigneeQuery,
|
|
351
352
|
vo as useGetUsersQuery,
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
353
|
+
ru as useGetVersionsByProductsQuery,
|
|
354
|
+
iu as useGetVersionsInfiniteQuery,
|
|
355
|
+
ou as useGetVersionsQuery,
|
|
356
|
+
Lu as useGetViewQuery,
|
|
357
|
+
Wi as useGetViewerReviewablesQuery,
|
|
357
358
|
Fu as useGetWorkingViewQuery,
|
|
358
359
|
Ps as useGetYnputCloudInfoQuery,
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
360
|
+
qi as useHasTranscoderQuery,
|
|
361
|
+
bo as useInvalidateUserSessionMutation,
|
|
362
|
+
vt as useLazyGetActionsFromContextQuery,
|
|
362
363
|
wt as useLazyGetActivitiesByIdQuery,
|
|
363
|
-
|
|
364
|
+
To as useLazyGetAllProjectUsersAsAssigneeQuery,
|
|
364
365
|
Js as useLazyGetEntitiesDetailsPanelQuery,
|
|
365
366
|
Ys as useLazyGetEntityQuery,
|
|
366
367
|
dr as useLazyGetListItemsQuery,
|
|
@@ -370,51 +371,51 @@ export {
|
|
|
370
371
|
pi as useLazyGetTasksByParentQuery,
|
|
371
372
|
is as useListAddonsQuery,
|
|
372
373
|
ao as useListFrontendModulesQuery,
|
|
373
|
-
|
|
374
|
+
Bo as useListGuestUsersQuery,
|
|
374
375
|
Si as useListProjectsQuery,
|
|
375
|
-
|
|
376
|
+
Eu as useListViewsQuery,
|
|
376
377
|
ls as usePatchAttributeConfigMutation,
|
|
377
|
-
|
|
378
|
-
|
|
378
|
+
zo as useRemoveGuestUserMutation,
|
|
379
|
+
hu as useResolveUrisMutation,
|
|
379
380
|
Tt as useSetActionConfigMutation,
|
|
380
381
|
Gs as useSetAttributeListMutation,
|
|
381
|
-
|
|
382
|
-
|
|
382
|
+
Uu as useSetDefaultViewMutation,
|
|
383
|
+
ku as useSetEntitiesWatchersMutation,
|
|
383
384
|
Cr as useSetEntityListAttributesDefinitionMutation,
|
|
384
|
-
|
|
385
|
+
ko as useSetFrontendPreferencesMutation,
|
|
385
386
|
wi as useSetProjectAnatomyMutation,
|
|
386
387
|
Ri as useSetProjectBundleMutation,
|
|
387
388
|
Bi as useSetProjectFoldersOrderMutation,
|
|
388
389
|
Cs as useSetServerConfigMutation,
|
|
389
|
-
|
|
390
|
+
Ls as useSetYnputCloudKeyMutation,
|
|
390
391
|
$i as useSortVersionReviewablesMutation,
|
|
391
392
|
Nt as useUpdateActivityMutation,
|
|
392
393
|
sr as useUpdateEntitiesMutation,
|
|
393
394
|
hr as useUpdateEntityListFolderMutation,
|
|
394
395
|
Er as useUpdateEntityListItemMutation,
|
|
395
|
-
|
|
396
|
-
|
|
396
|
+
Ir as useUpdateEntityListItemsMutation,
|
|
397
|
+
vr as useUpdateEntityListMutation,
|
|
397
398
|
rr as useUpdateEntityMutation,
|
|
398
399
|
di as useUpdateOverviewEntitiesMutation,
|
|
399
400
|
zi as useUpdateProjectFolderMutation,
|
|
400
401
|
hi as useUpdateProjectMutation,
|
|
401
402
|
eo as useUpdateReviewableMutation,
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
403
|
+
yo as useUpdateSubtasksMutation,
|
|
404
|
+
wo as useUpdateUserAPIKeyMutation,
|
|
405
|
+
Ro as useUpdateUserMutation,
|
|
406
|
+
ho as useUpdateUserNameMutation,
|
|
407
|
+
jo as useUpdateUserPasswordMutation,
|
|
408
|
+
_o as useUpdateUsersMutation,
|
|
409
|
+
Vu as useUpdateViewMutation,
|
|
410
|
+
No as userQueries,
|
|
410
411
|
ct as usersApi,
|
|
411
412
|
lt as versionsApi,
|
|
412
|
-
|
|
413
|
+
Jo as versionsQueries,
|
|
413
414
|
gt as viewsApi,
|
|
414
|
-
|
|
415
|
-
|
|
415
|
+
Su as viewsQueries,
|
|
416
|
+
wu as watchersQueries,
|
|
416
417
|
dt as workfilesApi,
|
|
417
418
|
At as ynputCloudApi,
|
|
418
|
-
|
|
419
|
+
Fs as ynputCloudQueries
|
|
419
420
|
};
|
|
420
421
|
//# sourceMappingURL=api.es.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../../generated/tasks.cjs.js"),h=require("../overview/updateOverview.cjs.js"),m=require("../entities/patchDetailsPanel.cjs.js"),f=require("../entityLists/getLists.cjs.js"),k=(u,s,{state:a,dispatch:e},n)=>{const i=[{type:"entityListItem",id:u}],r=f.default.util.selectInvalidatedBy(a,i).filter(t=>t.endpointName==="getListItemsInfinite");for(const t of r){const c=e(f.default.util.updateQueryData("getListItemsInfinite",t.originalArgs,p=>{for(const d of p.pages){const l=d.items.findIndex(o=>o.entityId===u);if(l!==-1){const o=d.items[l];o.subtasks||(o.subtasks=[]),o.subtasks=s}}}));n.push(c)}},g=y.api.injectEndpoints({endpoints:u=>({updateSubtasks:u.mutation({queryFn:async({projectName:s,taskId:a,subtasks:e},{dispatch:n})=>{try{return await n(y.api.endpoints.updateTask.initiate({projectName:s,taskId:a,taskPatchModel:{data:{subtasks:e}}})).unwrap(),{data:void 0}}catch(i){return{error:i.data?.detail||"Failed to update subtasks (unknown error)"}}},async onQueryStarted({taskId:s,subtasks:a},{dispatch:e,queryFulfilled:n,getState:i}){const r=i(),t=[],c=[{entityId:s,entityType:"task",data:{subtasks:a}}];h.patchOverviewTasks(c,{state:r,dispatch:e},t),m.patchDetailsPanel(c,{state:r,dispatch:e},t),k(s,a,{state:r,dispatch:e},t);try{await n}catch(p){console.error("Error updating subtasks:",p),t.forEach(d=>d.undo())}}})})}),{useUpdateSubtasksMutation:I}=g;exports.patchListItemsWithTask=k;exports.useUpdateSubtasksMutation=I;
|
|
2
2
|
//# sourceMappingURL=updateTasks.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateTasks.cjs.js","sources":["../../../../../../src/api/queries/tasks/updateTasks.ts"],"sourcesContent":["import { SubTaskNode } from '@shared/api'\nimport { api } from '@shared/api/generated/tasks'\nimport { PatchOperation, patchOverviewTasks } from '../overview/updateOverview'\nimport { patchDetailsPanel } from '../entities/patchDetailsPanel'\n\nconst tasksApi = api.injectEndpoints({\n endpoints: (build) => ({\n updateSubtasks: build.mutation<\n void,\n { projectName: string; taskId: string; subtasks: SubTaskNode[] }\n >({\n queryFn: async ({ projectName, taskId, subtasks }, { dispatch }) => {\n try {\n await dispatch(\n api.endpoints.updateTask.initiate({\n projectName,\n taskId,\n taskPatchModel: {\n data: { subtasks },\n },\n }),\n ).unwrap()\n\n return { data: undefined }\n } catch (error: any) {\n return { error: error.data?.detail || 'Failed to update subtasks (unknown error)' }\n }\n },\n async onQueryStarted({ taskId, subtasks }, { dispatch, queryFulfilled, getState }) {\n const state = getState()\n const patches: any[] = []\n\n const patchOperations: PatchOperation[] = [\n {\n entityId: taskId,\n entityType: 'task',\n data: { subtasks },\n },\n ]\n\n // 1. Patch Overview Tasks\n patchOverviewTasks(patchOperations, { state, dispatch }, patches)\n\n // 2. patch details panel\n patchDetailsPanel(patchOperations, { state, dispatch }, patches)\n\n try {\n await queryFulfilled\n } catch (error) {\n console.error('Error updating subtasks:', error)\n patches.forEach((patch) => patch.undo())\n }\n },\n }),\n }),\n})\n\nexport const { useUpdateSubtasksMutation } = tasksApi\n"],"names":["
|
|
1
|
+
{"version":3,"file":"updateTasks.cjs.js","sources":["../../../../../../src/api/queries/tasks/updateTasks.ts"],"sourcesContent":["import { SubTaskNode } from '@shared/api'\nimport { api } from '@shared/api/generated/tasks'\nimport { PatchOperation, patchOverviewTasks } from '../overview/updateOverview'\nimport { patchDetailsPanel } from '../entities/patchDetailsPanel'\nimport gqlApi from '../entityLists/getLists'\n\n/**\n * Patches list items caches that contain the specified task with updated subtasks\n */\nexport const patchListItemsWithTask = (\n taskId: string,\n subtasks: SubTaskNode[],\n { state, dispatch }: { state: any; dispatch: any },\n patches: any[],\n) => {\n // Find all list item caches that might contain this task\n const tags = [{ type: 'entityListItem', id: taskId }]\n const infiniteEntries = gqlApi.util\n .selectInvalidatedBy(state, tags)\n .filter((e) => e.endpointName === 'getListItemsInfinite')\n\n for (const entry of infiniteEntries) {\n const patchResult = dispatch(\n gqlApi.util.updateQueryData('getListItemsInfinite', entry.originalArgs, (draft) => {\n for (const page of draft.pages) {\n const itemIndex = page.items.findIndex((item) => item.entityId === taskId)\n if (itemIndex !== -1) {\n const item = page.items[itemIndex]\n // Update subtasks in the item's attributes\n if (!item.subtasks) {\n item.subtasks = []\n }\n // @ts-expect-error - we need to update the subtasks array in place to ensure React detects the change\n item.subtasks = subtasks\n }\n }\n }),\n )\n patches.push(patchResult)\n }\n}\n\nconst tasksApi = api.injectEndpoints({\n endpoints: (build) => ({\n updateSubtasks: build.mutation<\n void,\n { projectName: string; taskId: string; subtasks: SubTaskNode[] }\n >({\n queryFn: async ({ projectName, taskId, subtasks }, { dispatch }) => {\n try {\n await dispatch(\n api.endpoints.updateTask.initiate({\n projectName,\n taskId,\n taskPatchModel: {\n data: { subtasks },\n },\n }),\n ).unwrap()\n\n return { data: undefined }\n } catch (error: any) {\n return { error: error.data?.detail || 'Failed to update subtasks (unknown error)' }\n }\n },\n async onQueryStarted({ taskId, subtasks }, { dispatch, queryFulfilled, getState }) {\n const state = getState()\n const patches: any[] = []\n\n const patchOperations: PatchOperation[] = [\n {\n entityId: taskId,\n entityType: 'task',\n data: { subtasks },\n },\n ]\n\n // 1. Patch Overview Tasks\n patchOverviewTasks(patchOperations, { state, dispatch }, patches)\n\n // 2. patch details panel\n patchDetailsPanel(patchOperations, { state, dispatch }, patches)\n\n // 3. patch lists items with the task in it\n patchListItemsWithTask(taskId, subtasks, { state, dispatch }, patches)\n\n try {\n await queryFulfilled\n } catch (error) {\n console.error('Error updating subtasks:', error)\n patches.forEach((patch) => patch.undo())\n }\n },\n }),\n }),\n})\n\nexport const { useUpdateSubtasksMutation } = tasksApi\n"],"names":["patchListItemsWithTask","taskId","subtasks","state","dispatch","patches","tags","infiniteEntries","gqlApi","e","entry","patchResult","draft","page","itemIndex","item","tasksApi","api","build","projectName","error","queryFulfilled","getState","patchOperations","patchOverviewTasks","patchDetailsPanel","patch","useUpdateSubtasksMutation"],"mappings":"6QASaA,EAAyB,CACpCC,EACAC,EACA,CAAE,MAAAC,EAAO,SAAAC,CAAA,EACTC,IACG,CAEH,MAAMC,EAAO,CAAC,CAAE,KAAM,iBAAkB,GAAIL,EAAQ,EAC9CM,EAAkBC,EAAAA,QAAO,KAC5B,oBAAoBL,EAAOG,CAAI,EAC/B,OAAQG,GAAMA,EAAE,eAAiB,sBAAsB,EAE1D,UAAWC,KAASH,EAAiB,CACnC,MAAMI,EAAcP,EAClBI,EAAAA,QAAO,KAAK,gBAAgB,uBAAwBE,EAAM,aAAeE,GAAU,CACjF,UAAWC,KAAQD,EAAM,MAAO,CAC9B,MAAME,EAAYD,EAAK,MAAM,UAAWE,GAASA,EAAK,WAAad,CAAM,EACzE,GAAIa,IAAc,GAAI,CACpB,MAAMC,EAAOF,EAAK,MAAMC,CAAS,EAE5BC,EAAK,WACRA,EAAK,SAAW,CAAA,GAGlBA,EAAK,SAAWb,CAClB,CACF,CACF,CAAC,CAAA,EAEHG,EAAQ,KAAKM,CAAW,CAC1B,CACF,EAEMK,EAAWC,EAAAA,IAAI,gBAAgB,CACnC,UAAYC,IAAW,CACrB,eAAgBA,EAAM,SAGpB,CACA,QAAS,MAAO,CAAE,YAAAC,EAAa,OAAAlB,EAAQ,SAAAC,CAAA,EAAY,CAAE,SAAAE,KAAe,CAClE,GAAI,CACF,aAAMA,EACJa,MAAI,UAAU,WAAW,SAAS,CAChC,YAAAE,EACA,OAAAlB,EACA,eAAgB,CACd,KAAM,CAAE,SAAAC,CAAA,CAAS,CACnB,CACD,CAAA,EACD,OAAA,EAEK,CAAE,KAAM,MAAA,CACjB,OAASkB,EAAY,CACnB,MAAO,CAAE,MAAOA,EAAM,MAAM,QAAU,2CAAA,CACxC,CACF,EACA,MAAM,eAAe,CAAE,OAAAnB,EAAQ,SAAAC,CAAA,EAAY,CAAE,SAAAE,EAAU,eAAAiB,EAAgB,SAAAC,GAAY,CACjF,MAAMnB,EAAQmB,EAAA,EACRjB,EAAiB,CAAA,EAEjBkB,EAAoC,CACxC,CACE,SAAUtB,EACV,WAAY,OACZ,KAAM,CAAE,SAAAC,CAAA,CAAS,CACnB,EAIFsB,EAAAA,mBAAmBD,EAAiB,CAAE,MAAApB,EAAO,SAAAC,CAAA,EAAYC,CAAO,EAGhEoB,EAAAA,kBAAkBF,EAAiB,CAAE,MAAApB,EAAO,SAAAC,CAAA,EAAYC,CAAO,EAG/DL,EAAuBC,EAAQC,EAAU,CAAE,MAAAC,EAAO,SAAAC,CAAA,EAAYC,CAAO,EAErE,GAAI,CACF,MAAMgB,CACR,OAASD,EAAO,CACd,QAAQ,MAAM,2BAA4BA,CAAK,EAC/Cf,EAAQ,QAASqB,GAAUA,EAAM,MAAM,CACzC,CACF,CAAA,CACD,CAAA,EAEL,CAAC,EAEY,CAAE,0BAAAC,GAA8BX"}
|
|
@@ -1,43 +1,61 @@
|
|
|
1
|
-
import { api as
|
|
2
|
-
import { patchOverviewTasks as
|
|
3
|
-
import { patchDetailsPanel as
|
|
4
|
-
|
|
1
|
+
import { api as f } from "../../generated/tasks.es.js";
|
|
2
|
+
import { patchOverviewTasks as l } from "../overview/updateOverview.es.js";
|
|
3
|
+
import { patchDetailsPanel as k } from "../entities/patchDetailsPanel.es.js";
|
|
4
|
+
import y from "../entityLists/getLists.es.js";
|
|
5
|
+
const h = (c, s, { state: a, dispatch: e }, n) => {
|
|
6
|
+
const i = [{ type: "entityListItem", id: c }], o = y.util.selectInvalidatedBy(a, i).filter((t) => t.endpointName === "getListItemsInfinite");
|
|
7
|
+
for (const t of o) {
|
|
8
|
+
const p = e(
|
|
9
|
+
y.util.updateQueryData("getListItemsInfinite", t.originalArgs, (u) => {
|
|
10
|
+
for (const d of u.pages) {
|
|
11
|
+
const m = d.items.findIndex((r) => r.entityId === c);
|
|
12
|
+
if (m !== -1) {
|
|
13
|
+
const r = d.items[m];
|
|
14
|
+
r.subtasks || (r.subtasks = []), r.subtasks = s;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
})
|
|
18
|
+
);
|
|
19
|
+
n.push(p);
|
|
20
|
+
}
|
|
21
|
+
}, I = f.injectEndpoints({
|
|
5
22
|
endpoints: (c) => ({
|
|
6
23
|
updateSubtasks: c.mutation({
|
|
7
|
-
queryFn: async ({ projectName:
|
|
24
|
+
queryFn: async ({ projectName: s, taskId: a, subtasks: e }, { dispatch: n }) => {
|
|
8
25
|
try {
|
|
9
|
-
return await
|
|
10
|
-
|
|
11
|
-
projectName:
|
|
12
|
-
taskId:
|
|
26
|
+
return await n(
|
|
27
|
+
f.endpoints.updateTask.initiate({
|
|
28
|
+
projectName: s,
|
|
29
|
+
taskId: a,
|
|
13
30
|
taskPatchModel: {
|
|
14
|
-
data: { subtasks:
|
|
31
|
+
data: { subtasks: e }
|
|
15
32
|
}
|
|
16
33
|
})
|
|
17
34
|
).unwrap(), { data: void 0 };
|
|
18
|
-
} catch (
|
|
19
|
-
return { error:
|
|
35
|
+
} catch (i) {
|
|
36
|
+
return { error: i.data?.detail || "Failed to update subtasks (unknown error)" };
|
|
20
37
|
}
|
|
21
38
|
},
|
|
22
|
-
async onQueryStarted({ taskId:
|
|
23
|
-
const
|
|
39
|
+
async onQueryStarted({ taskId: s, subtasks: a }, { dispatch: e, queryFulfilled: n, getState: i }) {
|
|
40
|
+
const o = i(), t = [], p = [
|
|
24
41
|
{
|
|
25
|
-
entityId:
|
|
42
|
+
entityId: s,
|
|
26
43
|
entityType: "task",
|
|
27
|
-
data: { subtasks:
|
|
44
|
+
data: { subtasks: a }
|
|
28
45
|
}
|
|
29
46
|
];
|
|
30
|
-
|
|
47
|
+
l(p, { state: o, dispatch: e }, t), k(p, { state: o, dispatch: e }, t), h(s, a, { state: o, dispatch: e }, t);
|
|
31
48
|
try {
|
|
32
|
-
await
|
|
33
|
-
} catch (
|
|
34
|
-
console.error("Error updating subtasks:",
|
|
49
|
+
await n;
|
|
50
|
+
} catch (u) {
|
|
51
|
+
console.error("Error updating subtasks:", u), t.forEach((d) => d.undo());
|
|
35
52
|
}
|
|
36
53
|
}
|
|
37
54
|
})
|
|
38
55
|
})
|
|
39
|
-
}), { useUpdateSubtasksMutation:
|
|
56
|
+
}), { useUpdateSubtasksMutation: v } = I;
|
|
40
57
|
export {
|
|
41
|
-
|
|
58
|
+
h as patchListItemsWithTask,
|
|
59
|
+
v as useUpdateSubtasksMutation
|
|
42
60
|
};
|
|
43
61
|
//# sourceMappingURL=updateTasks.es.js.map
|