@drawbridge/components 0.1.29 → 0.1.31
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.
|
@@ -409,7 +409,11 @@ const useEmailPreview = ({ campaign, event, message, organization, subject, text
|
|
|
409
409
|
});
|
|
410
410
|
return result;
|
|
411
411
|
},
|
|
412
|
-
|
|
412
|
+
// Stale at once ( the dashboard's default is never ): the key holds the
|
|
413
|
+
// step's copy only, and the placeholder under it is the campaign's, so
|
|
414
|
+
// each visit to the trigger page asks again (Asana 1217773117236699).
|
|
415
|
+
queryKey: ["workflow-email-preview", organization, campaign, event, settled],
|
|
416
|
+
staleTime: 0
|
|
413
417
|
});
|
|
414
418
|
if (preview.data) last.current = preview.data;
|
|
415
419
|
return last.current;
|
|
@@ -356,7 +356,11 @@ const useEmailPreview = ({ campaign, event, message, organization, subject, text
|
|
|
356
356
|
});
|
|
357
357
|
return result;
|
|
358
358
|
},
|
|
359
|
-
|
|
359
|
+
// Stale at once ( the dashboard's default is never ): the key holds the
|
|
360
|
+
// step's copy only, and the placeholder under it is the campaign's, so
|
|
361
|
+
// each visit to the trigger page asks again (Asana 1217773117236699).
|
|
362
|
+
queryKey: ["workflow-email-preview", organization, campaign, event, settled],
|
|
363
|
+
staleTime: 0
|
|
360
364
|
});
|
|
361
365
|
if (preview.data) last.current = preview.data;
|
|
362
366
|
return last.current;
|
|
@@ -182,6 +182,15 @@ const TemplateSocketCampaign = ({
|
|
|
182
182
|
queryClient.invalidateQueries({
|
|
183
183
|
queryKey: ["organization-campaign-prizes", params.organization, params.campaign]
|
|
184
184
|
});
|
|
185
|
+
},
|
|
186
|
+
// @story campaigns/orders
|
|
187
|
+
// An order arrived, changed status, was fulfilled or left: the
|
|
188
|
+
// campaign's Orders list refetches, so a new order and a change made
|
|
189
|
+
// in another tab show without a reload.
|
|
190
|
+
"campaign.orders": () => {
|
|
191
|
+
queryClient.invalidateQueries({
|
|
192
|
+
queryKey: ["campaign-orders", params.organization, params.campaign]
|
|
193
|
+
});
|
|
185
194
|
}
|
|
186
195
|
},
|
|
187
196
|
// The live handler applies leads as a delta, which can't be replayed after
|
|
@@ -199,7 +208,9 @@ const TemplateSocketCampaign = ({
|
|
|
199
208
|
}],
|
|
200
209
|
["campaign-advertisements", params == null ? void 0 : params.organization, params == null ? void 0 : params.campaign],
|
|
201
210
|
["organization-campaign-advertisement"],
|
|
202
|
-
["organization-campaign-prizes", params == null ? void 0 : params.organization, params == null ? void 0 : params.campaign]
|
|
211
|
+
["organization-campaign-prizes", params == null ? void 0 : params.organization, params == null ? void 0 : params.campaign],
|
|
212
|
+
// An order placed while this room was not joined was never heard.
|
|
213
|
+
["campaign-orders", params == null ? void 0 : params.organization, params == null ? void 0 : params.campaign]
|
|
203
214
|
]
|
|
204
215
|
});
|
|
205
216
|
return children;
|
|
@@ -311,6 +322,9 @@ const TemplateSocketOrganization = ({
|
|
|
311
322
|
queryClient.invalidateQueries({
|
|
312
323
|
queryKey: ["organization-workflow", params.organization]
|
|
313
324
|
});
|
|
325
|
+
queryClient.invalidateQueries({
|
|
326
|
+
queryKey: ["workflow-email-preview", params.organization]
|
|
327
|
+
});
|
|
314
328
|
queryClient.invalidateQueries({
|
|
315
329
|
queryKey: ["menu", "campaign", params.organization]
|
|
316
330
|
});
|
|
@@ -587,6 +601,7 @@ const TemplateSocketOrganization = ({
|
|
|
587
601
|
["organization-campaign-products", params == null ? void 0 : params.organization],
|
|
588
602
|
["organization-workflows", params == null ? void 0 : params.organization],
|
|
589
603
|
["organization-workflow", params == null ? void 0 : params.organization],
|
|
604
|
+
["workflow-email-preview", params == null ? void 0 : params.organization],
|
|
590
605
|
["organization-workflow-steps"],
|
|
591
606
|
["organization-contacts", params == null ? void 0 : params.organization],
|
|
592
607
|
["organization-exports", params == null ? void 0 : params.organization],
|
|
@@ -147,6 +147,15 @@ const TemplateSocketCampaign = ({
|
|
|
147
147
|
queryClient.invalidateQueries({
|
|
148
148
|
queryKey: ["organization-campaign-prizes", params.organization, params.campaign]
|
|
149
149
|
});
|
|
150
|
+
},
|
|
151
|
+
// @story campaigns/orders
|
|
152
|
+
// An order arrived, changed status, was fulfilled or left: the
|
|
153
|
+
// campaign's Orders list refetches, so a new order and a change made
|
|
154
|
+
// in another tab show without a reload.
|
|
155
|
+
"campaign.orders": () => {
|
|
156
|
+
queryClient.invalidateQueries({
|
|
157
|
+
queryKey: ["campaign-orders", params.organization, params.campaign]
|
|
158
|
+
});
|
|
150
159
|
}
|
|
151
160
|
},
|
|
152
161
|
// The live handler applies leads as a delta, which can't be replayed after
|
|
@@ -164,7 +173,9 @@ const TemplateSocketCampaign = ({
|
|
|
164
173
|
}],
|
|
165
174
|
["campaign-advertisements", params == null ? void 0 : params.organization, params == null ? void 0 : params.campaign],
|
|
166
175
|
["organization-campaign-advertisement"],
|
|
167
|
-
["organization-campaign-prizes", params == null ? void 0 : params.organization, params == null ? void 0 : params.campaign]
|
|
176
|
+
["organization-campaign-prizes", params == null ? void 0 : params.organization, params == null ? void 0 : params.campaign],
|
|
177
|
+
// An order placed while this room was not joined was never heard.
|
|
178
|
+
["campaign-orders", params == null ? void 0 : params.organization, params == null ? void 0 : params.campaign]
|
|
168
179
|
]
|
|
169
180
|
});
|
|
170
181
|
return children;
|
|
@@ -276,6 +287,9 @@ const TemplateSocketOrganization = ({
|
|
|
276
287
|
queryClient.invalidateQueries({
|
|
277
288
|
queryKey: ["organization-workflow", params.organization]
|
|
278
289
|
});
|
|
290
|
+
queryClient.invalidateQueries({
|
|
291
|
+
queryKey: ["workflow-email-preview", params.organization]
|
|
292
|
+
});
|
|
279
293
|
queryClient.invalidateQueries({
|
|
280
294
|
queryKey: ["menu", "campaign", params.organization]
|
|
281
295
|
});
|
|
@@ -552,6 +566,7 @@ const TemplateSocketOrganization = ({
|
|
|
552
566
|
["organization-campaign-products", params == null ? void 0 : params.organization],
|
|
553
567
|
["organization-workflows", params == null ? void 0 : params.organization],
|
|
554
568
|
["organization-workflow", params == null ? void 0 : params.organization],
|
|
569
|
+
["workflow-email-preview", params == null ? void 0 : params.organization],
|
|
555
570
|
["organization-workflow-steps"],
|
|
556
571
|
["organization-contacts", params == null ? void 0 : params.organization],
|
|
557
572
|
["organization-exports", params == null ? void 0 : params.organization],
|