@messenger-box/slack-ui-browser 10.0.3-alpha.176

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.
Files changed (61) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE +21 -0
  3. package/lib/components/Home/Channels.js +62 -0
  4. package/lib/components/Home/Channels.js.map +1 -0
  5. package/lib/components/Home/DirectChannels.js +92 -0
  6. package/lib/components/Home/DirectChannels.js.map +1 -0
  7. package/lib/components/Home/InviteMembers.js +70 -0
  8. package/lib/components/Home/InviteMembers.js.map +1 -0
  9. package/lib/components/Home/Teams.js +62 -0
  10. package/lib/components/Home/Teams.js.map +1 -0
  11. package/lib/components/Home/TopCommonSlider.js +35 -0
  12. package/lib/components/Home/TopCommonSlider.js.map +1 -0
  13. package/lib/compute.js +223 -0
  14. package/lib/compute.js.map +1 -0
  15. package/lib/constants/routes.js +63 -0
  16. package/lib/constants/routes.js.map +1 -0
  17. package/lib/hooks/useOptimizedChannelsQueries.js +107 -0
  18. package/lib/hooks/useOptimizedChannelsQueries.js.map +1 -0
  19. package/lib/hooks/useRouteState.js +193 -0
  20. package/lib/hooks/useRouteState.js.map +1 -0
  21. package/lib/index.js +1 -0
  22. package/lib/index.js.map +1 -0
  23. package/lib/machines/routeMachine.js +804 -0
  24. package/lib/machines/routeMachine.js.map +1 -0
  25. package/lib/module.js +3 -0
  26. package/lib/module.js.map +1 -0
  27. package/lib/queries/slackuiQueries.js +144 -0
  28. package/lib/queries/slackuiQueries.js.map +1 -0
  29. package/lib/routes.json +260 -0
  30. package/lib/screens/Home/HomeScreen.js +664 -0
  31. package/lib/screens/Home/HomeScreen.js.map +1 -0
  32. package/lib/screens/Home/index.js +1 -0
  33. package/lib/screens/Home/index.js.map +1 -0
  34. package/package.json +52 -0
  35. package/rollup.config.mjs +41 -0
  36. package/src/components/Home/Channels.tsx +135 -0
  37. package/src/components/Home/DirectChannels.tsx +185 -0
  38. package/src/components/Home/InviteMembers.tsx +134 -0
  39. package/src/components/Home/Teams.tsx +129 -0
  40. package/src/components/Home/TopCommonSlider.tsx +70 -0
  41. package/src/components/Home/index.ts +5 -0
  42. package/src/components/index.ts +1 -0
  43. package/src/compute.ts +156 -0
  44. package/src/constants/index.ts +1 -0
  45. package/src/constants/routes.ts +92 -0
  46. package/src/hooks/index.ts +3 -0
  47. package/src/hooks/useOptimizedChannelsQueries.ts +165 -0
  48. package/src/hooks/useRouteState.ts +253 -0
  49. package/src/icons.ts +137 -0
  50. package/src/index.ts +11 -0
  51. package/src/machines/index.ts +9 -0
  52. package/src/machines/routeMachine.ts +682 -0
  53. package/src/module.tsx +6 -0
  54. package/src/queries/index.ts +1 -0
  55. package/src/queries/slackuiQueries.ts +227 -0
  56. package/src/screens/Home/HomeScreen.tsx +1308 -0
  57. package/src/screens/Home/index.ts +4 -0
  58. package/src/screens/NewChannel/NewChannelScreen.tsx +188 -0
  59. package/src/screens/NewChannel/index.ts +2 -0
  60. package/src/screens/index.ts +1 -0
  61. package/tsconfig.json +21 -0
@@ -0,0 +1,804 @@
1
+ import {setup,assign}from'xstate';import {slackUiRoutePaths,SLACK_UI_ROUTE_KEYS}from'../constants/routes.js';var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var RouteState = /* @__PURE__ */ ((RouteState2) => {
21
+ RouteState2["Idle"] = "idle";
22
+ RouteState2["Home"] = "home";
23
+ RouteState2["ChannelsView"] = "channelsView";
24
+ RouteState2["ChannelsNew"] = "channelsNew";
25
+ RouteState2["MessagesView"] = "messagesView";
26
+ RouteState2["MessagesNew"] = "messagesNew";
27
+ RouteState2["TeamsView"] = "teamsView";
28
+ RouteState2["TeamsNew"] = "teamsNew";
29
+ RouteState2["Threads"] = "threads";
30
+ RouteState2["Activity"] = "activity";
31
+ RouteState2["Drafts"] = "drafts";
32
+ RouteState2["Saved"] = "saved";
33
+ RouteState2["Files"] = "files";
34
+ RouteState2["Search"] = "search";
35
+ RouteState2["Invite"] = "invite";
36
+ RouteState2["InviteContacts"] = "inviteContacts";
37
+ RouteState2["InviteEmail"] = "inviteEmail";
38
+ RouteState2["InviteLink"] = "inviteLink";
39
+ return RouteState2;
40
+ })(RouteState || {});
41
+ var RouteAction = /* @__PURE__ */ ((RouteAction2) => {
42
+ RouteAction2["NAVIGATE_HOME"] = "NAVIGATE_HOME";
43
+ RouteAction2["NAVIGATE_CHANNEL"] = "NAVIGATE_CHANNEL";
44
+ RouteAction2["NAVIGATE_CHANNEL_NEW"] = "NAVIGATE_CHANNEL_NEW";
45
+ RouteAction2["NAVIGATE_MESSAGE"] = "NAVIGATE_MESSAGE";
46
+ RouteAction2["NAVIGATE_MESSAGE_NEW"] = "NAVIGATE_MESSAGE_NEW";
47
+ RouteAction2["NAVIGATE_TEAM"] = "NAVIGATE_TEAM";
48
+ RouteAction2["NAVIGATE_TEAM_NEW"] = "NAVIGATE_TEAM_NEW";
49
+ RouteAction2["NAVIGATE_THREADS"] = "NAVIGATE_THREADS";
50
+ RouteAction2["NAVIGATE_ACTIVITY"] = "NAVIGATE_ACTIVITY";
51
+ RouteAction2["NAVIGATE_DRAFTS"] = "NAVIGATE_DRAFTS";
52
+ RouteAction2["NAVIGATE_SAVED"] = "NAVIGATE_SAVED";
53
+ RouteAction2["NAVIGATE_FILES"] = "NAVIGATE_FILES";
54
+ RouteAction2["NAVIGATE_SEARCH"] = "NAVIGATE_SEARCH";
55
+ RouteAction2["NAVIGATE_INVITE"] = "NAVIGATE_INVITE";
56
+ RouteAction2["NAVIGATE_INVITE_CONTACTS"] = "NAVIGATE_INVITE_CONTACTS";
57
+ RouteAction2["NAVIGATE_INVITE_EMAIL"] = "NAVIGATE_INVITE_EMAIL";
58
+ RouteAction2["NAVIGATE_INVITE_LINK"] = "NAVIGATE_INVITE_LINK";
59
+ RouteAction2["UPDATE_FROM_PATHNAME"] = "UPDATE_FROM_PATHNAME";
60
+ return RouteAction2;
61
+ })(RouteAction || {});
62
+ function parsePathname(pathname, orgSlug) {
63
+ if (pathname.endsWith("/channels/new")) {
64
+ return {
65
+ state: "channelsNew" /* ChannelsNew */,
66
+ routeKey: SLACK_UI_ROUTE_KEYS.CHANNELS_NEW,
67
+ channelName: null,
68
+ teamName: null
69
+ };
70
+ }
71
+ if (pathname.includes("/channels/")) {
72
+ const match = pathname.match(/\/channels\/([^/]+)$/);
73
+ return {
74
+ state: "channelsView" /* ChannelsView */,
75
+ routeKey: SLACK_UI_ROUTE_KEYS.CHANNELS,
76
+ channelName: (match == null ? void 0 : match[1]) || null,
77
+ teamName: null
78
+ };
79
+ }
80
+ if (pathname.endsWith("/messages/new")) {
81
+ return {
82
+ state: "messagesNew" /* MessagesNew */,
83
+ routeKey: SLACK_UI_ROUTE_KEYS.MESSAGES_NEW,
84
+ channelName: null,
85
+ teamName: null
86
+ };
87
+ }
88
+ if (pathname.includes("/messages/")) {
89
+ const match = pathname.match(/\/messages\/([^/]+)$/);
90
+ return {
91
+ state: "messagesView" /* MessagesView */,
92
+ routeKey: SLACK_UI_ROUTE_KEYS.MESSAGES,
93
+ channelName: (match == null ? void 0 : match[1]) || null,
94
+ teamName: null
95
+ };
96
+ }
97
+ if (pathname.endsWith("/teams/new")) {
98
+ return {
99
+ state: "teamsNew" /* TeamsNew */,
100
+ routeKey: SLACK_UI_ROUTE_KEYS.TEAMS_NEW,
101
+ channelName: null,
102
+ teamName: null
103
+ };
104
+ }
105
+ if (pathname.includes("/teams/")) {
106
+ const match = pathname.match(/\/teams\/([^/]+)$/);
107
+ return {
108
+ state: "teamsView" /* TeamsView */,
109
+ routeKey: SLACK_UI_ROUTE_KEYS.TEAMS,
110
+ channelName: null,
111
+ teamName: (match == null ? void 0 : match[1]) || null
112
+ };
113
+ }
114
+ if (pathname.endsWith("/invite/contacts")) {
115
+ return {
116
+ state: "inviteContacts" /* InviteContacts */,
117
+ routeKey: SLACK_UI_ROUTE_KEYS.INVITE_CONTACTS,
118
+ channelName: null,
119
+ teamName: null
120
+ };
121
+ }
122
+ if (pathname.endsWith("/invite/email")) {
123
+ return {
124
+ state: "inviteEmail" /* InviteEmail */,
125
+ routeKey: SLACK_UI_ROUTE_KEYS.INVITE_EMAIL,
126
+ channelName: null,
127
+ teamName: null
128
+ };
129
+ }
130
+ if (pathname.endsWith("/invite/link")) {
131
+ return {
132
+ state: "inviteLink" /* InviteLink */,
133
+ routeKey: SLACK_UI_ROUTE_KEYS.INVITE_LINK,
134
+ channelName: null,
135
+ teamName: null
136
+ };
137
+ }
138
+ if (pathname.includes("/invite")) {
139
+ return {
140
+ state: "invite" /* Invite */,
141
+ routeKey: SLACK_UI_ROUTE_KEYS.INVITE,
142
+ channelName: null,
143
+ teamName: null
144
+ };
145
+ }
146
+ if (pathname.endsWith("/threads")) {
147
+ return {
148
+ state: "threads" /* Threads */,
149
+ routeKey: SLACK_UI_ROUTE_KEYS.THREADS,
150
+ channelName: null,
151
+ teamName: null
152
+ };
153
+ }
154
+ if (pathname.endsWith("/activity")) {
155
+ return {
156
+ state: "activity" /* Activity */,
157
+ routeKey: SLACK_UI_ROUTE_KEYS.ACTIVITY,
158
+ channelName: null,
159
+ teamName: null
160
+ };
161
+ }
162
+ if (pathname.endsWith("/drafts")) {
163
+ return {
164
+ state: "drafts" /* Drafts */,
165
+ routeKey: SLACK_UI_ROUTE_KEYS.DRAFTS,
166
+ channelName: null,
167
+ teamName: null
168
+ };
169
+ }
170
+ if (pathname.endsWith("/saved")) {
171
+ return {
172
+ state: "saved" /* Saved */,
173
+ routeKey: SLACK_UI_ROUTE_KEYS.SAVED,
174
+ channelName: null,
175
+ teamName: null
176
+ };
177
+ }
178
+ if (pathname.endsWith("/files")) {
179
+ return {
180
+ state: "files" /* Files */,
181
+ routeKey: SLACK_UI_ROUTE_KEYS.FILES,
182
+ channelName: null,
183
+ teamName: null
184
+ };
185
+ }
186
+ if (pathname.endsWith("/search")) {
187
+ return {
188
+ state: "search" /* Search */,
189
+ routeKey: SLACK_UI_ROUTE_KEYS.SEARCH,
190
+ channelName: null,
191
+ teamName: null
192
+ };
193
+ }
194
+ return {
195
+ state: "home" /* Home */,
196
+ routeKey: SLACK_UI_ROUTE_KEYS.HOME,
197
+ channelName: null,
198
+ teamName: null
199
+ };
200
+ }
201
+ const routeMachine = setup({
202
+ types: {
203
+ context: {},
204
+ events: {}
205
+ },
206
+ actions: {
207
+ updateContext: assign(({
208
+ context,
209
+ event
210
+ }) => {
211
+ if (event.type === "UPDATE_FROM_PATHNAME" /* UPDATE_FROM_PATHNAME */) {
212
+ const parsed = parsePathname(event.pathname, context.orgSlug);
213
+ return __spreadProps(__spreadValues({}, context), {
214
+ previousPath: context.currentPath,
215
+ currentPath: event.pathname,
216
+ currentRouteKey: parsed.routeKey,
217
+ channelName: parsed.channelName,
218
+ teamName: parsed.teamName
219
+ });
220
+ }
221
+ return context;
222
+ }),
223
+ setChannelName: assign(({
224
+ context,
225
+ event
226
+ }) => {
227
+ if (event.type === "NAVIGATE_CHANNEL" /* NAVIGATE_CHANNEL */) {
228
+ return __spreadProps(__spreadValues({}, context), {
229
+ channelName: event.channelName,
230
+ currentPath: slackUiRoutePaths.channel(context.orgSlug, event.channelName),
231
+ currentRouteKey: SLACK_UI_ROUTE_KEYS.CHANNELS
232
+ });
233
+ }
234
+ return context;
235
+ }),
236
+ setMessageChannelName: assign(({
237
+ context,
238
+ event
239
+ }) => {
240
+ if (event.type === "NAVIGATE_MESSAGE" /* NAVIGATE_MESSAGE */) {
241
+ return __spreadProps(__spreadValues({}, context), {
242
+ channelName: event.channelName,
243
+ currentPath: slackUiRoutePaths.message(context.orgSlug, event.channelName),
244
+ currentRouteKey: SLACK_UI_ROUTE_KEYS.MESSAGES
245
+ });
246
+ }
247
+ return context;
248
+ }),
249
+ setTeamName: assign(({
250
+ context,
251
+ event
252
+ }) => {
253
+ if (event.type === "NAVIGATE_TEAM" /* NAVIGATE_TEAM */) {
254
+ return __spreadProps(__spreadValues({}, context), {
255
+ teamName: event.teamName,
256
+ currentPath: slackUiRoutePaths.team(context.orgSlug, event.teamName),
257
+ currentRouteKey: SLACK_UI_ROUTE_KEYS.TEAMS
258
+ });
259
+ }
260
+ return context;
261
+ }),
262
+ clearParams: assign(({
263
+ context
264
+ }) => __spreadProps(__spreadValues({}, context), {
265
+ channelName: null,
266
+ teamName: null
267
+ })),
268
+ updatePathToHome: assign(({
269
+ context
270
+ }) => __spreadProps(__spreadValues({}, context), {
271
+ previousPath: context.currentPath,
272
+ currentPath: slackUiRoutePaths.home(context.orgSlug),
273
+ currentRouteKey: SLACK_UI_ROUTE_KEYS.HOME
274
+ })),
275
+ updatePathToChannelNew: assign(({
276
+ context
277
+ }) => __spreadProps(__spreadValues({}, context), {
278
+ previousPath: context.currentPath,
279
+ currentPath: slackUiRoutePaths.channelNew(context.orgSlug),
280
+ currentRouteKey: SLACK_UI_ROUTE_KEYS.CHANNELS_NEW,
281
+ channelName: null
282
+ })),
283
+ updatePathToMessageNew: assign(({
284
+ context
285
+ }) => __spreadProps(__spreadValues({}, context), {
286
+ previousPath: context.currentPath,
287
+ currentPath: slackUiRoutePaths.messageNew(context.orgSlug),
288
+ currentRouteKey: SLACK_UI_ROUTE_KEYS.MESSAGES_NEW,
289
+ channelName: null
290
+ })),
291
+ updatePathToTeamNew: assign(({
292
+ context
293
+ }) => __spreadProps(__spreadValues({}, context), {
294
+ previousPath: context.currentPath,
295
+ currentPath: slackUiRoutePaths.teamNew(context.orgSlug),
296
+ currentRouteKey: SLACK_UI_ROUTE_KEYS.TEAMS_NEW,
297
+ teamName: null
298
+ })),
299
+ updatePathToThreads: assign(({
300
+ context
301
+ }) => __spreadProps(__spreadValues({}, context), {
302
+ previousPath: context.currentPath,
303
+ currentPath: slackUiRoutePaths.threads(context.orgSlug),
304
+ currentRouteKey: SLACK_UI_ROUTE_KEYS.THREADS
305
+ })),
306
+ updatePathToActivity: assign(({
307
+ context
308
+ }) => __spreadProps(__spreadValues({}, context), {
309
+ previousPath: context.currentPath,
310
+ currentPath: slackUiRoutePaths.activity(context.orgSlug),
311
+ currentRouteKey: SLACK_UI_ROUTE_KEYS.ACTIVITY
312
+ })),
313
+ updatePathToDrafts: assign(({
314
+ context
315
+ }) => __spreadProps(__spreadValues({}, context), {
316
+ previousPath: context.currentPath,
317
+ currentPath: slackUiRoutePaths.drafts(context.orgSlug),
318
+ currentRouteKey: SLACK_UI_ROUTE_KEYS.DRAFTS
319
+ })),
320
+ updatePathToSaved: assign(({
321
+ context
322
+ }) => __spreadProps(__spreadValues({}, context), {
323
+ previousPath: context.currentPath,
324
+ currentPath: slackUiRoutePaths.saved(context.orgSlug),
325
+ currentRouteKey: SLACK_UI_ROUTE_KEYS.SAVED
326
+ })),
327
+ updatePathToFiles: assign(({
328
+ context
329
+ }) => __spreadProps(__spreadValues({}, context), {
330
+ previousPath: context.currentPath,
331
+ currentPath: slackUiRoutePaths.files(context.orgSlug),
332
+ currentRouteKey: SLACK_UI_ROUTE_KEYS.FILES
333
+ })),
334
+ updatePathToSearch: assign(({
335
+ context
336
+ }) => __spreadProps(__spreadValues({}, context), {
337
+ previousPath: context.currentPath,
338
+ currentPath: slackUiRoutePaths.search(context.orgSlug),
339
+ currentRouteKey: SLACK_UI_ROUTE_KEYS.SEARCH
340
+ })),
341
+ updatePathToInvite: assign(({
342
+ context
343
+ }) => __spreadProps(__spreadValues({}, context), {
344
+ previousPath: context.currentPath,
345
+ currentPath: slackUiRoutePaths.invite(context.orgSlug),
346
+ currentRouteKey: SLACK_UI_ROUTE_KEYS.INVITE
347
+ })),
348
+ updatePathToInviteContacts: assign(({
349
+ context
350
+ }) => __spreadProps(__spreadValues({}, context), {
351
+ previousPath: context.currentPath,
352
+ currentPath: slackUiRoutePaths.inviteContacts(context.orgSlug),
353
+ currentRouteKey: SLACK_UI_ROUTE_KEYS.INVITE_CONTACTS
354
+ })),
355
+ updatePathToInviteEmail: assign(({
356
+ context
357
+ }) => __spreadProps(__spreadValues({}, context), {
358
+ previousPath: context.currentPath,
359
+ currentPath: slackUiRoutePaths.inviteEmail(context.orgSlug),
360
+ currentRouteKey: SLACK_UI_ROUTE_KEYS.INVITE_EMAIL
361
+ })),
362
+ updatePathToInviteLink: assign(({
363
+ context
364
+ }) => __spreadProps(__spreadValues({}, context), {
365
+ previousPath: context.currentPath,
366
+ currentPath: slackUiRoutePaths.inviteLink(context.orgSlug),
367
+ currentRouteKey: SLACK_UI_ROUTE_KEYS.INVITE_LINK
368
+ }))
369
+ },
370
+ guards: {
371
+ hasChannelName: ({
372
+ event
373
+ }) => {
374
+ if (event.type === "NAVIGATE_CHANNEL" /* NAVIGATE_CHANNEL */) {
375
+ return !!event.channelName;
376
+ }
377
+ return false;
378
+ },
379
+ hasTeamName: ({
380
+ event
381
+ }) => {
382
+ if (event.type === "NAVIGATE_TEAM" /* NAVIGATE_TEAM */) {
383
+ return !!event.teamName;
384
+ }
385
+ return false;
386
+ }
387
+ }
388
+ }).createMachine({
389
+ id: "slack-ui-routes",
390
+ initial: "idle" /* Idle */,
391
+ context: {
392
+ orgSlug: "",
393
+ currentPath: "",
394
+ currentRouteKey: null,
395
+ channelName: null,
396
+ teamName: null,
397
+ previousPath: null
398
+ },
399
+ states: {
400
+ ["idle" /* Idle */]: {
401
+ on: {
402
+ ["UPDATE_FROM_PATHNAME" /* UPDATE_FROM_PATHNAME */]: {
403
+ actions: ["updateContext"]
404
+ },
405
+ ["NAVIGATE_HOME" /* NAVIGATE_HOME */]: {
406
+ target: "home" /* Home */,
407
+ actions: ["clearParams", "updatePathToHome"]
408
+ },
409
+ ["NAVIGATE_CHANNEL" /* NAVIGATE_CHANNEL */]: {
410
+ target: "channelsView" /* ChannelsView */,
411
+ guard: "hasChannelName",
412
+ actions: ["setChannelName"]
413
+ },
414
+ ["NAVIGATE_CHANNEL_NEW" /* NAVIGATE_CHANNEL_NEW */]: {
415
+ target: "channelsNew" /* ChannelsNew */,
416
+ actions: ["updatePathToChannelNew"]
417
+ },
418
+ ["NAVIGATE_MESSAGE" /* NAVIGATE_MESSAGE */]: {
419
+ target: "messagesView" /* MessagesView */,
420
+ actions: ["setMessageChannelName"]
421
+ },
422
+ ["NAVIGATE_MESSAGE_NEW" /* NAVIGATE_MESSAGE_NEW */]: {
423
+ target: "messagesNew" /* MessagesNew */,
424
+ actions: ["updatePathToMessageNew"]
425
+ },
426
+ ["NAVIGATE_TEAM" /* NAVIGATE_TEAM */]: {
427
+ target: "teamsView" /* TeamsView */,
428
+ guard: "hasTeamName",
429
+ actions: ["setTeamName"]
430
+ },
431
+ ["NAVIGATE_TEAM_NEW" /* NAVIGATE_TEAM_NEW */]: {
432
+ target: "teamsNew" /* TeamsNew */,
433
+ actions: ["updatePathToTeamNew"]
434
+ },
435
+ ["NAVIGATE_THREADS" /* NAVIGATE_THREADS */]: {
436
+ target: "threads" /* Threads */,
437
+ actions: ["updatePathToThreads"]
438
+ },
439
+ ["NAVIGATE_ACTIVITY" /* NAVIGATE_ACTIVITY */]: {
440
+ target: "activity" /* Activity */,
441
+ actions: ["updatePathToActivity"]
442
+ },
443
+ ["NAVIGATE_DRAFTS" /* NAVIGATE_DRAFTS */]: {
444
+ target: "drafts" /* Drafts */,
445
+ actions: ["updatePathToDrafts"]
446
+ },
447
+ ["NAVIGATE_SAVED" /* NAVIGATE_SAVED */]: {
448
+ target: "saved" /* Saved */,
449
+ actions: ["updatePathToSaved"]
450
+ },
451
+ ["NAVIGATE_FILES" /* NAVIGATE_FILES */]: {
452
+ target: "files" /* Files */,
453
+ actions: ["updatePathToFiles"]
454
+ },
455
+ ["NAVIGATE_SEARCH" /* NAVIGATE_SEARCH */]: {
456
+ target: "search" /* Search */,
457
+ actions: ["updatePathToSearch"]
458
+ },
459
+ ["NAVIGATE_INVITE" /* NAVIGATE_INVITE */]: {
460
+ target: "invite" /* Invite */,
461
+ actions: ["updatePathToInvite"]
462
+ },
463
+ ["NAVIGATE_INVITE_CONTACTS" /* NAVIGATE_INVITE_CONTACTS */]: {
464
+ target: "inviteContacts" /* InviteContacts */,
465
+ actions: ["updatePathToInviteContacts"]
466
+ },
467
+ ["NAVIGATE_INVITE_EMAIL" /* NAVIGATE_INVITE_EMAIL */]: {
468
+ target: "inviteEmail" /* InviteEmail */,
469
+ actions: ["updatePathToInviteEmail"]
470
+ },
471
+ ["NAVIGATE_INVITE_LINK" /* NAVIGATE_INVITE_LINK */]: {
472
+ target: "inviteLink" /* InviteLink */,
473
+ actions: ["updatePathToInviteLink"]
474
+ }
475
+ }
476
+ },
477
+ ["home" /* Home */]: {
478
+ on: {
479
+ ["UPDATE_FROM_PATHNAME" /* UPDATE_FROM_PATHNAME */]: {
480
+ actions: ["updateContext"]
481
+ },
482
+ ["NAVIGATE_CHANNEL" /* NAVIGATE_CHANNEL */]: {
483
+ target: "channelsView" /* ChannelsView */,
484
+ guard: "hasChannelName",
485
+ actions: ["setChannelName"]
486
+ },
487
+ ["NAVIGATE_CHANNEL_NEW" /* NAVIGATE_CHANNEL_NEW */]: {
488
+ target: "channelsNew" /* ChannelsNew */,
489
+ actions: ["updatePathToChannelNew"]
490
+ },
491
+ ["NAVIGATE_MESSAGE" /* NAVIGATE_MESSAGE */]: {
492
+ target: "messagesView" /* MessagesView */,
493
+ actions: ["setMessageChannelName"]
494
+ },
495
+ ["NAVIGATE_MESSAGE_NEW" /* NAVIGATE_MESSAGE_NEW */]: {
496
+ target: "messagesNew" /* MessagesNew */,
497
+ actions: ["updatePathToMessageNew"]
498
+ },
499
+ ["NAVIGATE_TEAM" /* NAVIGATE_TEAM */]: {
500
+ target: "teamsView" /* TeamsView */,
501
+ guard: "hasTeamName",
502
+ actions: ["setTeamName"]
503
+ },
504
+ ["NAVIGATE_TEAM_NEW" /* NAVIGATE_TEAM_NEW */]: {
505
+ target: "teamsNew" /* TeamsNew */,
506
+ actions: ["updatePathToTeamNew"]
507
+ },
508
+ ["NAVIGATE_THREADS" /* NAVIGATE_THREADS */]: {
509
+ target: "threads" /* Threads */,
510
+ actions: ["updatePathToThreads"]
511
+ },
512
+ ["NAVIGATE_ACTIVITY" /* NAVIGATE_ACTIVITY */]: {
513
+ target: "activity" /* Activity */,
514
+ actions: ["updatePathToActivity"]
515
+ },
516
+ ["NAVIGATE_DRAFTS" /* NAVIGATE_DRAFTS */]: {
517
+ target: "drafts" /* Drafts */,
518
+ actions: ["updatePathToDrafts"]
519
+ },
520
+ ["NAVIGATE_SAVED" /* NAVIGATE_SAVED */]: {
521
+ target: "saved" /* Saved */,
522
+ actions: ["updatePathToSaved"]
523
+ },
524
+ ["NAVIGATE_FILES" /* NAVIGATE_FILES */]: {
525
+ target: "files" /* Files */,
526
+ actions: ["updatePathToFiles"]
527
+ },
528
+ ["NAVIGATE_SEARCH" /* NAVIGATE_SEARCH */]: {
529
+ target: "search" /* Search */,
530
+ actions: ["updatePathToSearch"]
531
+ },
532
+ ["NAVIGATE_INVITE" /* NAVIGATE_INVITE */]: {
533
+ target: "invite" /* Invite */,
534
+ actions: ["updatePathToInvite"]
535
+ },
536
+ ["NAVIGATE_INVITE_CONTACTS" /* NAVIGATE_INVITE_CONTACTS */]: {
537
+ target: "inviteContacts" /* InviteContacts */,
538
+ actions: ["updatePathToInviteContacts"]
539
+ },
540
+ ["NAVIGATE_INVITE_EMAIL" /* NAVIGATE_INVITE_EMAIL */]: {
541
+ target: "inviteEmail" /* InviteEmail */,
542
+ actions: ["updatePathToInviteEmail"]
543
+ },
544
+ ["NAVIGATE_INVITE_LINK" /* NAVIGATE_INVITE_LINK */]: {
545
+ target: "inviteLink" /* InviteLink */,
546
+ actions: ["updatePathToInviteLink"]
547
+ }
548
+ }
549
+ },
550
+ ["channelsView" /* ChannelsView */]: {
551
+ on: {
552
+ ["UPDATE_FROM_PATHNAME" /* UPDATE_FROM_PATHNAME */]: {
553
+ actions: ["updateContext"]
554
+ },
555
+ ["NAVIGATE_HOME" /* NAVIGATE_HOME */]: {
556
+ target: "home" /* Home */,
557
+ actions: ["clearParams", "updatePathToHome"]
558
+ },
559
+ ["NAVIGATE_CHANNEL" /* NAVIGATE_CHANNEL */]: {
560
+ actions: ["setChannelName"]
561
+ },
562
+ ["NAVIGATE_CHANNEL_NEW" /* NAVIGATE_CHANNEL_NEW */]: {
563
+ target: "channelsNew" /* ChannelsNew */,
564
+ actions: ["updatePathToChannelNew"]
565
+ },
566
+ ["NAVIGATE_MESSAGE" /* NAVIGATE_MESSAGE */]: {
567
+ target: "messagesView" /* MessagesView */,
568
+ actions: ["setMessageChannelName"]
569
+ },
570
+ ["NAVIGATE_MESSAGE_NEW" /* NAVIGATE_MESSAGE_NEW */]: {
571
+ target: "messagesNew" /* MessagesNew */,
572
+ actions: ["updatePathToMessageNew"]
573
+ }
574
+ }
575
+ },
576
+ ["channelsNew" /* ChannelsNew */]: {
577
+ on: {
578
+ ["UPDATE_FROM_PATHNAME" /* UPDATE_FROM_PATHNAME */]: {
579
+ actions: ["updateContext"]
580
+ },
581
+ ["NAVIGATE_HOME" /* NAVIGATE_HOME */]: {
582
+ target: "home" /* Home */,
583
+ actions: ["clearParams", "updatePathToHome"]
584
+ },
585
+ ["NAVIGATE_CHANNEL" /* NAVIGATE_CHANNEL */]: {
586
+ target: "channelsView" /* ChannelsView */,
587
+ actions: ["setChannelName"]
588
+ }
589
+ }
590
+ },
591
+ ["messagesView" /* MessagesView */]: {
592
+ on: {
593
+ ["UPDATE_FROM_PATHNAME" /* UPDATE_FROM_PATHNAME */]: {
594
+ actions: ["updateContext"]
595
+ },
596
+ ["NAVIGATE_HOME" /* NAVIGATE_HOME */]: {
597
+ target: "home" /* Home */,
598
+ actions: ["clearParams", "updatePathToHome"]
599
+ },
600
+ ["NAVIGATE_CHANNEL" /* NAVIGATE_CHANNEL */]: {
601
+ target: "channelsView" /* ChannelsView */,
602
+ actions: ["setChannelName"]
603
+ },
604
+ ["NAVIGATE_MESSAGE" /* NAVIGATE_MESSAGE */]: {
605
+ actions: ["setMessageChannelName"]
606
+ },
607
+ ["NAVIGATE_MESSAGE_NEW" /* NAVIGATE_MESSAGE_NEW */]: {
608
+ target: "messagesNew" /* MessagesNew */,
609
+ actions: ["updatePathToMessageNew"]
610
+ }
611
+ }
612
+ },
613
+ ["messagesNew" /* MessagesNew */]: {
614
+ on: {
615
+ ["UPDATE_FROM_PATHNAME" /* UPDATE_FROM_PATHNAME */]: {
616
+ actions: ["updateContext"]
617
+ },
618
+ ["NAVIGATE_HOME" /* NAVIGATE_HOME */]: {
619
+ target: "home" /* Home */,
620
+ actions: ["clearParams", "updatePathToHome"]
621
+ },
622
+ ["NAVIGATE_MESSAGE" /* NAVIGATE_MESSAGE */]: {
623
+ target: "messagesView" /* MessagesView */,
624
+ actions: ["setMessageChannelName"]
625
+ }
626
+ }
627
+ },
628
+ ["teamsView" /* TeamsView */]: {
629
+ on: {
630
+ ["UPDATE_FROM_PATHNAME" /* UPDATE_FROM_PATHNAME */]: {
631
+ actions: ["updateContext"]
632
+ },
633
+ ["NAVIGATE_HOME" /* NAVIGATE_HOME */]: {
634
+ target: "home" /* Home */,
635
+ actions: ["clearParams", "updatePathToHome"]
636
+ },
637
+ ["NAVIGATE_TEAM" /* NAVIGATE_TEAM */]: {
638
+ actions: ["setTeamName"]
639
+ },
640
+ ["NAVIGATE_TEAM_NEW" /* NAVIGATE_TEAM_NEW */]: {
641
+ target: "teamsNew" /* TeamsNew */,
642
+ actions: ["updatePathToTeamNew"]
643
+ }
644
+ }
645
+ },
646
+ ["teamsNew" /* TeamsNew */]: {
647
+ on: {
648
+ ["UPDATE_FROM_PATHNAME" /* UPDATE_FROM_PATHNAME */]: {
649
+ actions: ["updateContext"]
650
+ },
651
+ ["NAVIGATE_HOME" /* NAVIGATE_HOME */]: {
652
+ target: "home" /* Home */,
653
+ actions: ["clearParams", "updatePathToHome"]
654
+ },
655
+ ["NAVIGATE_TEAM" /* NAVIGATE_TEAM */]: {
656
+ target: "teamsView" /* TeamsView */,
657
+ actions: ["setTeamName"]
658
+ }
659
+ }
660
+ },
661
+ ["threads" /* Threads */]: {
662
+ on: {
663
+ ["UPDATE_FROM_PATHNAME" /* UPDATE_FROM_PATHNAME */]: {
664
+ actions: ["updateContext"]
665
+ },
666
+ ["NAVIGATE_HOME" /* NAVIGATE_HOME */]: {
667
+ target: "home" /* Home */,
668
+ actions: ["clearParams", "updatePathToHome"]
669
+ },
670
+ ["NAVIGATE_CHANNEL" /* NAVIGATE_CHANNEL */]: {
671
+ target: "channelsView" /* ChannelsView */,
672
+ actions: ["setChannelName"]
673
+ },
674
+ ["NAVIGATE_MESSAGE" /* NAVIGATE_MESSAGE */]: {
675
+ target: "messagesView" /* MessagesView */,
676
+ actions: ["setMessageChannelName"]
677
+ }
678
+ }
679
+ },
680
+ ["activity" /* Activity */]: {
681
+ on: {
682
+ ["UPDATE_FROM_PATHNAME" /* UPDATE_FROM_PATHNAME */]: {
683
+ actions: ["updateContext"]
684
+ },
685
+ ["NAVIGATE_HOME" /* NAVIGATE_HOME */]: {
686
+ target: "home" /* Home */,
687
+ actions: ["clearParams", "updatePathToHome"]
688
+ }
689
+ }
690
+ },
691
+ ["drafts" /* Drafts */]: {
692
+ on: {
693
+ ["UPDATE_FROM_PATHNAME" /* UPDATE_FROM_PATHNAME */]: {
694
+ actions: ["updateContext"]
695
+ },
696
+ ["NAVIGATE_HOME" /* NAVIGATE_HOME */]: {
697
+ target: "home" /* Home */,
698
+ actions: ["clearParams", "updatePathToHome"]
699
+ }
700
+ }
701
+ },
702
+ ["saved" /* Saved */]: {
703
+ on: {
704
+ ["UPDATE_FROM_PATHNAME" /* UPDATE_FROM_PATHNAME */]: {
705
+ actions: ["updateContext"]
706
+ },
707
+ ["NAVIGATE_HOME" /* NAVIGATE_HOME */]: {
708
+ target: "home" /* Home */,
709
+ actions: ["clearParams", "updatePathToHome"]
710
+ }
711
+ }
712
+ },
713
+ ["files" /* Files */]: {
714
+ on: {
715
+ ["UPDATE_FROM_PATHNAME" /* UPDATE_FROM_PATHNAME */]: {
716
+ actions: ["updateContext"]
717
+ },
718
+ ["NAVIGATE_HOME" /* NAVIGATE_HOME */]: {
719
+ target: "home" /* Home */,
720
+ actions: ["clearParams", "updatePathToHome"]
721
+ }
722
+ }
723
+ },
724
+ ["search" /* Search */]: {
725
+ on: {
726
+ ["UPDATE_FROM_PATHNAME" /* UPDATE_FROM_PATHNAME */]: {
727
+ actions: ["updateContext"]
728
+ },
729
+ ["NAVIGATE_HOME" /* NAVIGATE_HOME */]: {
730
+ target: "home" /* Home */,
731
+ actions: ["clearParams", "updatePathToHome"]
732
+ }
733
+ }
734
+ },
735
+ ["invite" /* Invite */]: {
736
+ on: {
737
+ ["UPDATE_FROM_PATHNAME" /* UPDATE_FROM_PATHNAME */]: {
738
+ actions: ["updateContext"]
739
+ },
740
+ ["NAVIGATE_HOME" /* NAVIGATE_HOME */]: {
741
+ target: "home" /* Home */,
742
+ actions: ["clearParams", "updatePathToHome"]
743
+ },
744
+ ["NAVIGATE_INVITE_CONTACTS" /* NAVIGATE_INVITE_CONTACTS */]: {
745
+ target: "inviteContacts" /* InviteContacts */,
746
+ actions: ["updatePathToInviteContacts"]
747
+ },
748
+ ["NAVIGATE_INVITE_EMAIL" /* NAVIGATE_INVITE_EMAIL */]: {
749
+ target: "inviteEmail" /* InviteEmail */,
750
+ actions: ["updatePathToInviteEmail"]
751
+ },
752
+ ["NAVIGATE_INVITE_LINK" /* NAVIGATE_INVITE_LINK */]: {
753
+ target: "inviteLink" /* InviteLink */,
754
+ actions: ["updatePathToInviteLink"]
755
+ }
756
+ }
757
+ },
758
+ ["inviteContacts" /* InviteContacts */]: {
759
+ on: {
760
+ ["UPDATE_FROM_PATHNAME" /* UPDATE_FROM_PATHNAME */]: {
761
+ actions: ["updateContext"]
762
+ },
763
+ ["NAVIGATE_HOME" /* NAVIGATE_HOME */]: {
764
+ target: "home" /* Home */,
765
+ actions: ["clearParams", "updatePathToHome"]
766
+ },
767
+ ["NAVIGATE_INVITE" /* NAVIGATE_INVITE */]: {
768
+ target: "invite" /* Invite */,
769
+ actions: ["updatePathToInvite"]
770
+ }
771
+ }
772
+ },
773
+ ["inviteEmail" /* InviteEmail */]: {
774
+ on: {
775
+ ["UPDATE_FROM_PATHNAME" /* UPDATE_FROM_PATHNAME */]: {
776
+ actions: ["updateContext"]
777
+ },
778
+ ["NAVIGATE_HOME" /* NAVIGATE_HOME */]: {
779
+ target: "home" /* Home */,
780
+ actions: ["clearParams", "updatePathToHome"]
781
+ },
782
+ ["NAVIGATE_INVITE" /* NAVIGATE_INVITE */]: {
783
+ target: "invite" /* Invite */,
784
+ actions: ["updatePathToInvite"]
785
+ }
786
+ }
787
+ },
788
+ ["inviteLink" /* InviteLink */]: {
789
+ on: {
790
+ ["UPDATE_FROM_PATHNAME" /* UPDATE_FROM_PATHNAME */]: {
791
+ actions: ["updateContext"]
792
+ },
793
+ ["NAVIGATE_HOME" /* NAVIGATE_HOME */]: {
794
+ target: "home" /* Home */,
795
+ actions: ["clearParams", "updatePathToHome"]
796
+ },
797
+ ["NAVIGATE_INVITE" /* NAVIGATE_INVITE */]: {
798
+ target: "invite" /* Invite */,
799
+ actions: ["updatePathToInvite"]
800
+ }
801
+ }
802
+ }
803
+ }
804
+ });export{RouteAction,RouteState,parsePathname,routeMachine};//# sourceMappingURL=routeMachine.js.map