@jsb188/graphql 1.1.11 → 1.1.12
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/audience.d.ts +343 -0
- package/cache/config.ts +58 -24
- package/cache/index.chat-activity.test.ts +119 -0
- package/cache/index.chat.test.ts +92 -0
- package/cache/index.helpers.ts +96 -0
- package/cache/index.regression.test.ts +149 -0
- package/cache/index.test.ts +370 -42
- package/cache/index.ts +326 -799
- package/cache/optimistic-ui-runtime.ts +46 -0
- package/cache/optimistic-ui.ts +401 -0
- package/cache/persist.ts +98 -19
- package/cache/store.ts +22 -64
- package/cache/value.helpers.ts +17 -0
- package/{drafts/store.ts → client/draft-persistence-indexed-db.ts} +19 -3
- package/{drafts/index.ts → client/draft-persistence.ts} +5 -2
- package/client/index.ts +3 -2
- package/client/request.helpers.ts +14 -0
- package/client/request.ts +130 -215
- package/deno.lock +17 -0
- package/deno.test.json +2 -0
- package/gql/fragments/agentMemoryFragments.ts +5 -1
- package/gql/fragments/agentNoteFragments.ts +150 -0
- package/gql/fragments/aiChatFragments.ts +36 -10
- package/gql/fragments/audienceFragments.ts +141 -0
- package/gql/fragments/campaignFragments.ts +415 -126
- package/gql/fragments/dataTableFragments.ts +48 -80
- package/gql/fragments/emailFragments.ts +28 -23
- package/gql/fragments/fieldDocFragments.ts +222 -40
- package/gql/fragments/inboundContactFragments.ts +2 -0
- package/gql/fragments/logFragments.ts +93 -2
- package/gql/fragments/organizationFragments.ts +10 -0
- package/gql/fragments/qrCodeFragments.ts +29 -0
- package/gql/fragments/scheduleFragments.ts +652 -140
- package/gql/fragments/sheetFragments.ts +84 -373
- package/gql/fragments/storageFragments.ts +25 -1
- package/gql/fragments/workflowFragments.ts +13 -1
- package/gql/mutations/agentMemoryMutations.ts +32 -0
- package/gql/mutations/agentNoteMutations.ts +62 -0
- package/gql/mutations/aiChatMutations.ts +36 -4
- package/gql/mutations/audienceMutations.ts +71 -0
- package/gql/mutations/authMutations.ts +45 -1
- package/gql/mutations/billingMutations.ts +24 -0
- package/gql/mutations/campaignMutations.ts +170 -127
- package/gql/mutations/contactMutations.ts +23 -0
- package/gql/mutations/dataTableMutations.ts +18 -75
- package/gql/mutations/fieldDocMutations.ts +162 -13
- package/gql/mutations/index.ts +8 -5
- package/gql/mutations/organizationMutations.ts +6 -0
- package/gql/mutations/qrCodeMutations.ts +20 -0
- package/gql/mutations/scheduleMutations.ts +1052 -354
- package/gql/mutations/sheetMutations.ts +62 -118
- package/gql/mutations/storageMutations.ts +0 -1
- package/gql/mutations/workflowMutations.ts +18 -0
- package/gql/queries/agentMemoryQueries.ts +6 -0
- package/gql/queries/agentNoteQueries.ts +89 -0
- package/gql/queries/aiChatQueries.ts +56 -4
- package/gql/queries/audienceQueries.ts +128 -0
- package/gql/queries/authQueries.ts +6 -0
- package/gql/queries/billingQueries.ts +95 -6
- package/gql/queries/campaignQueries.ts +132 -23
- package/gql/queries/dataTableQueries.ts +24 -65
- package/gql/queries/emailQueries.ts +18 -61
- package/gql/queries/emailReplyReportQueries.ts +76 -0
- package/gql/queries/fieldDocQueries.ts +100 -92
- package/gql/queries/inboundContactQueries.ts +4 -0
- package/gql/queries/index.ts +3 -1
- package/gql/queries/logQueries.ts +62 -7
- package/gql/queries/organizationQueries.ts +13 -0
- package/gql/queries/qrCodeQueries.ts +20 -0
- package/gql/queries/scheduleQueries.ts +633 -257
- package/gql/queries/sheetQueries.ts +59 -152
- package/gql/queries/workflowQueries.ts +10 -4
- package/hooks/index.helpers.test.ts +50 -0
- package/hooks/index.helpers.ts +52 -0
- package/hooks/index.ts +863 -685
- package/hooks/use-agentMemory-mtn.ts +29 -31
- package/hooks/use-agentMemory-qry.ts +15 -3
- package/hooks/use-agentNote-mtn.ts +82 -0
- package/hooks/use-agentNote-qry.ts +190 -0
- package/hooks/use-agentNote-recovery.helpers.test.ts +68 -0
- package/hooks/use-agentNote-recovery.helpers.ts +58 -0
- package/hooks/use-agentNote-recovery.ts +72 -0
- package/hooks/use-aiChat-mtn.ts +96 -112
- package/hooks/use-aiChat-qry.helpers.test.ts +63 -0
- package/hooks/use-aiChat-qry.helpers.ts +124 -0
- package/hooks/use-aiChat-qry.ts +229 -383
- package/hooks/use-aiChat-stream-mtn.ts +14 -0
- package/hooks/use-audience-mtn.ts +194 -0
- package/hooks/use-audience-qry.helpers.test.ts +80 -0
- package/hooks/use-audience-qry.helpers.ts +63 -0
- package/hooks/use-audience-qry.ts +330 -0
- package/hooks/use-auth-mtn.ts +30 -1
- package/hooks/use-billing-mtn.ts +31 -0
- package/hooks/use-billing-qry.ts +76 -0
- package/hooks/use-campaign-generation-recovery.ts +53 -0
- package/hooks/use-campaign-mtn.ts +224 -165
- package/hooks/use-campaign-qry.helpers.ts +40 -0
- package/hooks/use-campaign-qry.ts +631 -54
- package/hooks/use-dataTable-mtn.ts +23 -115
- package/hooks/use-dataTable-qry.ts +66 -916
- package/hooks/use-email-qry.helpers.ts +37 -0
- package/hooks/use-email-qry.ts +33 -178
- package/hooks/use-emailCampaignReplyReport-qry.ts +27 -0
- package/hooks/use-fieldDoc-mtn.ts +244 -32
- package/hooks/use-fieldDoc-qry.helpers.test.ts +65 -0
- package/hooks/use-fieldDoc-qry.helpers.ts +49 -0
- package/hooks/use-fieldDoc-qry.ts +134 -102
- package/hooks/use-inboundContact-qry.ts +7 -9
- package/hooks/use-log-mtn.ts +25 -12
- package/hooks/use-log-qry.ts +99 -46
- package/hooks/use-organization-qry.ts +16 -60
- package/hooks/use-publicFormEmail-mtn.ts +27 -0
- package/hooks/use-qrCode-mtn.ts +40 -0
- package/hooks/use-qrCode-qry.ts +78 -0
- package/hooks/use-schedule-mtn.ts +506 -333
- package/hooks/use-schedule-qry.ts +682 -101
- package/hooks/use-schedule-reactive.ts +486 -0
- package/hooks/use-sheet-mtn.ts +91 -199
- package/hooks/use-sheet-qry.ts +84 -238
- package/hooks/use-storage-qry.ts +84 -61
- package/hooks/use-workflow-mtn.ts +39 -22
- package/hooks/use-workflow-qry.ts +40 -61
- package/libs/ai-chat-outgoing.helpers.ts +153 -0
- package/libs/ai-chat-outgoing.ts +11 -0
- package/libs/ai-chat-outgoing.types.ts +25 -0
- package/libs/ai-chat-run-realtime.ts +20 -0
- package/libs/ai-chat-submission-realtime.ts +150 -0
- package/libs/fragment-realtime-sequence.ts +55 -0
- package/libs/fragment-recovery.test.ts +326 -0
- package/libs/fragment-recovery.ts +325 -0
- package/libs/open-sheet.ts +138 -0
- package/libs/orchestrator-realtime.helpers.test.ts +229 -0
- package/libs/orchestrator-realtime.helpers.ts +317 -0
- package/libs/orchestrator-realtime.ts +433 -0
- package/libs/request-cache-regression.test.ts +122 -0
- package/{client → libs}/request-managed-session.test.ts +1 -1
- package/libs/request-no-store.test.ts +419 -0
- package/libs/sheet-command-batch.ts +44 -0
- package/libs/sheet-view-realtime-router.test.ts +214 -0
- package/libs/sheet-view-realtime-router.ts +99 -0
- package/loaders/campaign.test.ts +186 -0
- package/loaders/campaign.ts +56 -83
- package/loaders/emailPreference.ts +75 -0
- package/loaders/rest.ts +12 -0
- package/package.json +42 -17
- package/schedule.d.ts +1790 -0
- package/sse.helpers.ts +19 -0
- package/sse.ts +26 -115
- package/tests/agent-note-detail-cache.test.ts +120 -0
- package/tests/agent-note-search.test.ts +444 -0
- package/types.d.ts +46 -25
- package/client/data-table-realtime-subscriptions.test.ts +0 -740
- package/client/data-table-realtime-subscriptions.ts +0 -955
- package/client/data-table-realtime.test.ts +0 -792
- package/client/data-table-realtime.ts +0 -1218
- package/client/fragment-realtime-sequence.ts +0 -52
- package/client/open-sheet.ts +0 -137
- package/client/request-no-store.test.ts +0 -157
- package/gql/fragments/agentDocFragments.ts +0 -46
- package/gql/fragments/billingFragments.ts +0 -14
- package/gql/mutations/agentDocMutations.ts +0 -177
- package/gql/queries/agentDocQueries.ts +0 -120
- package/hooks/use-agentDoc-mtn.ts +0 -285
- package/hooks/use-agentDoc-qry.ts +0 -208
- /package/{client → libs}/sse-ticket.test.ts +0 -0
package/hooks/use-sheet-mtn.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { UseMutationParams } from '@jsb188/graphql/types.d';
|
|
2
|
+
import { FRAGMENT_NAMES, makeFragmentKey } from '@jsb188/mday/constants/graphqlReactivity.ts';
|
|
2
3
|
import type { OpenModalPopUpFn } from '@jsb188/react/states';
|
|
3
|
-
import {
|
|
4
|
-
FRAGMENT_NAMES,
|
|
5
|
-
makeFragmentKey,
|
|
6
|
-
} from '@jsb188/mday/constants/graphqlReactivity.ts';
|
|
7
4
|
import { updateFragment } from '../cache/index.ts';
|
|
8
5
|
import {
|
|
9
6
|
createSheetMtn,
|
|
@@ -11,11 +8,10 @@ import {
|
|
|
11
8
|
deleteSheetMtn,
|
|
12
9
|
deleteSheetTabMtn,
|
|
13
10
|
editSheetCommandBatchMtn,
|
|
14
|
-
editSheetRegionCommandMtn,
|
|
15
|
-
editSheetStructureCommandMtn,
|
|
16
11
|
exportSheetToFileMtn,
|
|
17
12
|
importSheetFromFileMtn,
|
|
18
13
|
reorderSheetTabsMtn,
|
|
14
|
+
setSheetTabHiddenMtn,
|
|
19
15
|
updateSheetAccessMtn,
|
|
20
16
|
updateSheetMtn,
|
|
21
17
|
updateSheetTabMtn,
|
|
@@ -26,17 +22,11 @@ import { useMutation } from './index.ts';
|
|
|
26
22
|
* Create a sheet.
|
|
27
23
|
*/
|
|
28
24
|
|
|
29
|
-
export function useCreateSheet(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
createSheetMtn,
|
|
35
|
-
{
|
|
36
|
-
openModalPopUp,
|
|
37
|
-
...params,
|
|
38
|
-
},
|
|
39
|
-
);
|
|
25
|
+
export function useCreateSheet(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
|
|
26
|
+
const [createSheet, mtnValues, mtnHandlers, updateObservers] = useMutation(createSheetMtn, {
|
|
27
|
+
openModalPopUp,
|
|
28
|
+
...params,
|
|
29
|
+
});
|
|
40
30
|
|
|
41
31
|
return {
|
|
42
32
|
createSheet,
|
|
@@ -50,17 +40,11 @@ export function useCreateSheet(
|
|
|
50
40
|
* Update a sheet.
|
|
51
41
|
*/
|
|
52
42
|
|
|
53
|
-
export function useUpdateSheet(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
updateSheetMtn,
|
|
59
|
-
{
|
|
60
|
-
openModalPopUp,
|
|
61
|
-
...params,
|
|
62
|
-
},
|
|
63
|
-
);
|
|
43
|
+
export function useUpdateSheet(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
|
|
44
|
+
const [updateSheet, mtnValues, mtnHandlers, updateObservers] = useMutation(updateSheetMtn, {
|
|
45
|
+
openModalPopUp,
|
|
46
|
+
...params,
|
|
47
|
+
});
|
|
64
48
|
|
|
65
49
|
return {
|
|
66
50
|
updateSheet,
|
|
@@ -74,34 +58,24 @@ export function useUpdateSheet(
|
|
|
74
58
|
* Update a sheet's access settings.
|
|
75
59
|
*/
|
|
76
60
|
|
|
77
|
-
export function useUpdateSheetAccess(
|
|
78
|
-
params: UseMutationParams = {},
|
|
79
|
-
openModalPopUp?: OpenModalPopUpFn,
|
|
80
|
-
) {
|
|
61
|
+
export function useUpdateSheetAccess(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
|
|
81
62
|
const { onCompleted, ...rest } = params;
|
|
82
63
|
|
|
83
|
-
const [updateSheetAccess, mtnValues, mtnHandlers, updateObservers] =
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
onCompleted?.(updatedSheet, error, variables);
|
|
102
|
-
},
|
|
103
|
-
...rest,
|
|
104
|
-
});
|
|
64
|
+
const [updateSheetAccess, mtnValues, mtnHandlers, updateObservers] = useMutation(updateSheetAccessMtn, {
|
|
65
|
+
openModalPopUp,
|
|
66
|
+
onCompleted: (data, error, variables) => {
|
|
67
|
+
const updatedSheet = data?.updateSheetAccess;
|
|
68
|
+
|
|
69
|
+
if (updatedSheet?.id) {
|
|
70
|
+
// The origin socket is excluded from the server's realtime emit,
|
|
71
|
+
// so the mutation issuer refreshes its own cached fragment here
|
|
72
|
+
updateFragment(makeFragmentKey(FRAGMENT_NAMES.sheet, updatedSheet.id), updatedSheet, null, false, updateObservers);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
onCompleted?.(updatedSheet, error, variables);
|
|
76
|
+
},
|
|
77
|
+
...rest,
|
|
78
|
+
});
|
|
105
79
|
|
|
106
80
|
return {
|
|
107
81
|
updateSheetAccess,
|
|
@@ -115,32 +89,20 @@ export function useUpdateSheetAccess(
|
|
|
115
89
|
* Delete a sheet.
|
|
116
90
|
*/
|
|
117
91
|
|
|
118
|
-
export function useDeleteSheet(
|
|
119
|
-
params: UseMutationParams = {},
|
|
120
|
-
openModalPopUp?: OpenModalPopUpFn,
|
|
121
|
-
) {
|
|
92
|
+
export function useDeleteSheet(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
|
|
122
93
|
const { onCompleted, ...rest } = params;
|
|
123
|
-
const [deleteSheet, mtnValues, mtnHandlers, updateObservers] = useMutation(
|
|
124
|
-
|
|
125
|
-
{
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
{ __deleted: true },
|
|
133
|
-
null,
|
|
134
|
-
false,
|
|
135
|
-
updateObservers,
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
onCompleted?.(data, error, variables);
|
|
140
|
-
},
|
|
141
|
-
...rest,
|
|
94
|
+
const [deleteSheet, mtnValues, mtnHandlers, updateObservers] = useMutation(deleteSheetMtn, {
|
|
95
|
+
openModalPopUp,
|
|
96
|
+
onCompleted: (data, error, variables) => {
|
|
97
|
+
const deletedSheetId = data?.deleteSheet;
|
|
98
|
+
if (deletedSheetId) {
|
|
99
|
+
updateFragment(makeFragmentKey(FRAGMENT_NAMES.sheet, deletedSheetId), { __deleted: true }, null, false, updateObservers);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
onCompleted?.(data, error, variables);
|
|
142
103
|
},
|
|
143
|
-
|
|
104
|
+
...rest,
|
|
105
|
+
});
|
|
144
106
|
|
|
145
107
|
return {
|
|
146
108
|
deleteSheet,
|
|
@@ -154,17 +116,11 @@ export function useDeleteSheet(
|
|
|
154
116
|
* Create a sheet tab.
|
|
155
117
|
*/
|
|
156
118
|
|
|
157
|
-
export function useCreateSheetTab(
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
createSheetTabMtn,
|
|
163
|
-
{
|
|
164
|
-
openModalPopUp,
|
|
165
|
-
...params,
|
|
166
|
-
},
|
|
167
|
-
);
|
|
119
|
+
export function useCreateSheetTab(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
|
|
120
|
+
const [createSheetTab, mtnValues, mtnHandlers, updateObservers] = useMutation(createSheetTabMtn, {
|
|
121
|
+
openModalPopUp,
|
|
122
|
+
...params,
|
|
123
|
+
});
|
|
168
124
|
|
|
169
125
|
return {
|
|
170
126
|
createSheetTab,
|
|
@@ -178,15 +134,11 @@ export function useCreateSheetTab(
|
|
|
178
134
|
* Import a spreadsheet file into a new or existing sheet.
|
|
179
135
|
*/
|
|
180
136
|
|
|
181
|
-
export function useImportSheetFromFile(
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
useMutation(importSheetFromFileMtn, {
|
|
187
|
-
openModalPopUp,
|
|
188
|
-
...params,
|
|
189
|
-
});
|
|
137
|
+
export function useImportSheetFromFile(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
|
|
138
|
+
const [importSheetFromFile, mtnValues, mtnHandlers, updateObservers] = useMutation(importSheetFromFileMtn, {
|
|
139
|
+
openModalPopUp,
|
|
140
|
+
...params,
|
|
141
|
+
});
|
|
190
142
|
|
|
191
143
|
return {
|
|
192
144
|
importSheetFromFile,
|
|
@@ -201,15 +153,11 @@ export function useImportSheetFromFile(
|
|
|
201
153
|
* for the whole workbook).
|
|
202
154
|
*/
|
|
203
155
|
|
|
204
|
-
export function useExportSheetToFile(
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
useMutation(exportSheetToFileMtn, {
|
|
210
|
-
openModalPopUp,
|
|
211
|
-
...params,
|
|
212
|
-
});
|
|
156
|
+
export function useExportSheetToFile(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
|
|
157
|
+
const [exportSheetToFile, mtnValues, mtnHandlers, updateObservers] = useMutation(exportSheetToFileMtn, {
|
|
158
|
+
openModalPopUp,
|
|
159
|
+
...params,
|
|
160
|
+
});
|
|
213
161
|
|
|
214
162
|
return {
|
|
215
163
|
exportSheetToFile,
|
|
@@ -223,17 +171,11 @@ export function useExportSheetToFile(
|
|
|
223
171
|
* Update a sheet tab.
|
|
224
172
|
*/
|
|
225
173
|
|
|
226
|
-
export function useUpdateSheetTab(
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
updateSheetTabMtn,
|
|
232
|
-
{
|
|
233
|
-
openModalPopUp,
|
|
234
|
-
...params,
|
|
235
|
-
},
|
|
236
|
-
);
|
|
174
|
+
export function useUpdateSheetTab(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
|
|
175
|
+
const [updateSheetTab, mtnValues, mtnHandlers, updateObservers] = useMutation(updateSheetTabMtn, {
|
|
176
|
+
openModalPopUp,
|
|
177
|
+
...params,
|
|
178
|
+
});
|
|
237
179
|
|
|
238
180
|
return {
|
|
239
181
|
updateSheetTab,
|
|
@@ -244,21 +186,16 @@ export function useUpdateSheetTab(
|
|
|
244
186
|
}
|
|
245
187
|
|
|
246
188
|
/*
|
|
247
|
-
*
|
|
189
|
+
* Set whether a sheet tab is hidden from the collapsed tab strip.
|
|
248
190
|
*/
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
)
|
|
254
|
-
const [reorderSheetTabs, mtnValues, mtnHandlers, updateObservers] =
|
|
255
|
-
useMutation(reorderSheetTabsMtn, {
|
|
256
|
-
openModalPopUp,
|
|
257
|
-
...params,
|
|
258
|
-
});
|
|
191
|
+
export function useSetSheetTabHidden(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
|
|
192
|
+
const [setSheetTabHidden, mtnValues, mtnHandlers, updateObservers] = useMutation(setSheetTabHiddenMtn, {
|
|
193
|
+
openModalPopUp,
|
|
194
|
+
...params,
|
|
195
|
+
});
|
|
259
196
|
|
|
260
197
|
return {
|
|
261
|
-
|
|
198
|
+
setSheetTabHidden,
|
|
262
199
|
updateObservers,
|
|
263
200
|
...mtnValues,
|
|
264
201
|
...mtnHandlers,
|
|
@@ -266,37 +203,17 @@ export function useReorderSheetTabs(
|
|
|
266
203
|
}
|
|
267
204
|
|
|
268
205
|
/*
|
|
269
|
-
*
|
|
206
|
+
* Reorder sheet tabs.
|
|
270
207
|
*/
|
|
271
208
|
|
|
272
|
-
export function
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
const [deleteSheetTab, mtnValues, mtnHandlers, updateObservers] = useMutation(
|
|
278
|
-
deleteSheetTabMtn,
|
|
279
|
-
{
|
|
280
|
-
openModalPopUp,
|
|
281
|
-
onCompleted: (data, error, variables) => {
|
|
282
|
-
if (data?.deleteSheetTab && variables?.sheetTabId) {
|
|
283
|
-
updateFragment(
|
|
284
|
-
makeFragmentKey(FRAGMENT_NAMES.sheetTab, variables.sheetTabId),
|
|
285
|
-
{ __deleted: true },
|
|
286
|
-
null,
|
|
287
|
-
false,
|
|
288
|
-
updateObservers,
|
|
289
|
-
);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
onCompleted?.(data, error, variables);
|
|
293
|
-
},
|
|
294
|
-
...rest,
|
|
295
|
-
},
|
|
296
|
-
);
|
|
209
|
+
export function useReorderSheetTabs(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
|
|
210
|
+
const [reorderSheetTabs, mtnValues, mtnHandlers, updateObservers] = useMutation(reorderSheetTabsMtn, {
|
|
211
|
+
openModalPopUp,
|
|
212
|
+
...params,
|
|
213
|
+
});
|
|
297
214
|
|
|
298
215
|
return {
|
|
299
|
-
|
|
216
|
+
reorderSheetTabs,
|
|
300
217
|
updateObservers,
|
|
301
218
|
...mtnValues,
|
|
302
219
|
...mtnHandlers,
|
|
@@ -304,41 +221,17 @@ export function useDeleteSheetTab(
|
|
|
304
221
|
}
|
|
305
222
|
|
|
306
223
|
/*
|
|
307
|
-
*
|
|
224
|
+
* Delete a sheet tab.
|
|
308
225
|
*/
|
|
309
|
-
export function useEditSheetCommandBatch(
|
|
310
|
-
params: UseMutationParams = {},
|
|
311
|
-
openModalPopUp?: OpenModalPopUpFn,
|
|
312
|
-
) {
|
|
313
|
-
const [editSheetCommandBatch, mtnValues, mtnHandlers, updateObservers] =
|
|
314
|
-
useMutation(editSheetCommandBatchMtn, {
|
|
315
|
-
openModalPopUp,
|
|
316
|
-
...params,
|
|
317
|
-
});
|
|
318
226
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
...
|
|
323
|
-
|
|
324
|
-
};
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
/*
|
|
328
|
-
* Upsert or delete one Sheet region through the durable command contract.
|
|
329
|
-
*/
|
|
330
|
-
export function useEditSheetRegionCommand(
|
|
331
|
-
params: UseMutationParams = {},
|
|
332
|
-
openModalPopUp?: OpenModalPopUpFn,
|
|
333
|
-
) {
|
|
334
|
-
const [editSheetRegionCommand, mtnValues, mtnHandlers, updateObservers] =
|
|
335
|
-
useMutation(editSheetRegionCommandMtn, {
|
|
336
|
-
openModalPopUp,
|
|
337
|
-
...params,
|
|
338
|
-
});
|
|
227
|
+
export function useDeleteSheetTab(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
|
|
228
|
+
const [deleteSheetTab, mtnValues, mtnHandlers, updateObservers] = useMutation(deleteSheetTabMtn, {
|
|
229
|
+
openModalPopUp,
|
|
230
|
+
...params,
|
|
231
|
+
});
|
|
339
232
|
|
|
340
233
|
return {
|
|
341
|
-
|
|
234
|
+
deleteSheetTab,
|
|
342
235
|
updateObservers,
|
|
343
236
|
...mtnValues,
|
|
344
237
|
...mtnHandlers,
|
|
@@ -346,20 +239,19 @@ export function useEditSheetRegionCommand(
|
|
|
346
239
|
}
|
|
347
240
|
|
|
348
241
|
/*
|
|
349
|
-
*
|
|
242
|
+
* Send one sealed Sheet command envelope. The mutation is always no-store:
|
|
243
|
+
* its authoritative patches belong to the client's tab stores, never to the
|
|
244
|
+
* normalized fragment cache.
|
|
350
245
|
*/
|
|
351
|
-
export function
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
openModalPopUp,
|
|
358
|
-
...params,
|
|
359
|
-
});
|
|
246
|
+
export function useEditSheetCommandBatch(params: UseMutationParams = {}, openModalPopUp?: OpenModalPopUpFn) {
|
|
247
|
+
const [editSheetCommandBatch, mtnValues, mtnHandlers, updateObservers] = useMutation(editSheetCommandBatchMtn, {
|
|
248
|
+
openModalPopUp,
|
|
249
|
+
...params,
|
|
250
|
+
cachePolicy: 'no-store',
|
|
251
|
+
});
|
|
360
252
|
|
|
361
253
|
return {
|
|
362
|
-
|
|
254
|
+
editSheetCommandBatch,
|
|
363
255
|
updateObservers,
|
|
364
256
|
...mtnValues,
|
|
365
257
|
...mtnHandlers,
|