@kineticdata/bundle-queue 5.1.1 → 6.0.0

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 (77) hide show
  1. package/README.md +0 -2
  2. package/assets/styles/_submissions.scss +0 -4
  3. package/lib/App.js +62 -60
  4. package/lib/components/FormPreview.js +39 -27
  5. package/lib/components/filter_menu/FilterMenuAbstract.js +87 -107
  6. package/lib/components/filter_menu/FilterMenuModal.js +115 -114
  7. package/lib/components/filter_menu/FilterMenuToolbar.js +114 -108
  8. package/lib/components/new_item_menu/NewItemMenu.js +65 -63
  9. package/lib/components/new_item_menu/NewItemMenuContainer.js +40 -43
  10. package/lib/components/queue_item/AssignmentBadge.js +22 -14
  11. package/lib/components/queue_item/QueueItem.js +70 -132
  12. package/lib/components/queue_item/QueueItemDetails.js +122 -159
  13. package/lib/components/queue_item/QueueItemDetails.test.js +14 -11
  14. package/lib/components/queue_item/ViewOriginalRequest.js +28 -20
  15. package/lib/components/queue_list/BulkAssignModal.js +30 -27
  16. package/lib/components/queue_list/BulkStatusModal.js +64 -59
  17. package/lib/components/queue_list/BulkWorkModal.js +26 -21
  18. package/lib/components/queue_list/QueueList.js +56 -54
  19. package/lib/components/queue_list/QueueListContainer.js +25 -21
  20. package/lib/components/queue_list/QueueListItem.js +78 -85
  21. package/lib/components/queue_list/QueueListPagination.js +54 -47
  22. package/lib/components/queue_list/QueueListSelection.js +92 -82
  23. package/lib/components/queue_list/QueueListSidebar.js +64 -59
  24. package/lib/components/settings/QueueSettings.js +44 -37
  25. package/lib/components/settings/Settings.js +56 -50
  26. package/lib/components/settings/Sidebar.js +32 -22
  27. package/lib/components/settings/forms/Export.js +45 -48
  28. package/lib/components/settings/forms/ExportModal.js +25 -20
  29. package/lib/components/settings/forms/FormActivity.js +60 -52
  30. package/lib/components/settings/forms/FormList.js +109 -110
  31. package/lib/components/settings/forms/FormSettings.js +69 -63
  32. package/lib/components/settings/forms/FormSubmissions.js +65 -60
  33. package/lib/components/shared/AssignmentItem.js +24 -21
  34. package/lib/components/shared/AssignmentSelector.js +39 -40
  35. package/lib/components/shared/PageTitle.js +24 -15
  36. package/lib/components/shared/StatusContent.js +29 -24
  37. package/lib/components/shared/WallyButton.js +28 -19
  38. package/lib/components/work_menu/WorkMenu.js +39 -30
  39. package/lib/constants.js +1 -0
  40. package/lib/index.js +53 -49
  41. package/lib/models.js +13 -5
  42. package/lib/records.js +39 -26
  43. package/lib/redux/modules/app.js +22 -17
  44. package/lib/redux/modules/filterMenu.js +23 -26
  45. package/lib/redux/modules/forms.js +28 -21
  46. package/lib/redux/modules/queue.js +52 -64
  47. package/lib/redux/modules/queue.test.js +46 -44
  48. package/lib/redux/modules/queueApp.js +70 -63
  49. package/lib/redux/modules/queueApp.test.js +26 -24
  50. package/lib/redux/modules/settingsForms.js +66 -74
  51. package/lib/redux/modules/settingsQueue.js +21 -27
  52. package/lib/redux/modules/workMenu.js +21 -15
  53. package/lib/redux/reducers.js +25 -18
  54. package/lib/redux/sagas/app.js +15 -13
  55. package/lib/redux/sagas/forms.js +22 -25
  56. package/lib/redux/sagas/queue.js +117 -210
  57. package/lib/redux/sagas/queue.test.js +85 -83
  58. package/lib/redux/sagas/queueApp.js +48 -57
  59. package/lib/redux/sagas/settingsForms.js +264 -358
  60. package/lib/redux/sagas/settingsQueue.js +186 -229
  61. package/lib/redux/sagas.js +18 -14
  62. package/lib/redux/store.js +36 -27
  63. package/lib/utils.js +9 -2
  64. package/package.json +6 -17
  65. package/lib/components/Sidebar.js +0 -100
  66. package/lib/components/filter_menu/AssignmentSection.js +0 -52
  67. package/lib/components/filter_menu/CreatedByMe.js +0 -31
  68. package/lib/components/filter_menu/DateRangeSection.js +0 -54
  69. package/lib/components/filter_menu/FilterMenu.js +0 -83
  70. package/lib/components/filter_menu/FilterMenuContainer.js +0 -112
  71. package/lib/components/filter_menu/GroupedBySection.js +0 -34
  72. package/lib/components/filter_menu/MainSection.js +0 -187
  73. package/lib/components/filter_menu/SortedBySection.js +0 -50
  74. package/lib/components/filter_menu/StatusSection.js +0 -34
  75. package/lib/components/filter_menu/TeamsSection.js +0 -34
  76. package/lib/components/queue_list/FilterMenuMobile.js +0 -120
  77. package/lib/components/queue_list/FilterMenuToolbar.js +0 -306
@@ -1,74 +1,77 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
-
5
- var _marked = /*#__PURE__*/_regeneratorRuntime.mark(fetchQueueSettingsSaga),
6
- _marked2 = /*#__PURE__*/_regeneratorRuntime.mark(fetchTeamsSaga),
7
- _marked3 = /*#__PURE__*/_regeneratorRuntime.mark(fetchUsersSaga),
8
- _marked4 = /*#__PURE__*/_regeneratorRuntime.mark(fetchSpaceSaga),
9
- _marked5 = /*#__PURE__*/_regeneratorRuntime.mark(updateQueueSettingsSaga),
10
- _marked6 = /*#__PURE__*/_regeneratorRuntime.mark(fetchNotificationsSaga),
11
- _marked7 = /*#__PURE__*/_regeneratorRuntime.mark(fetchFormSaga),
12
- _marked8 = /*#__PURE__*/_regeneratorRuntime.mark(watchSettingsQueue);
13
-
14
- import { Map } from 'immutable';
15
- import { all, takeEvery, call, put, select } from 'redux-saga/effects';
16
- import { actions, types } from '../modules/settingsQueue';
17
- import { addSuccess, addError } from '@kineticdata/bundle-common';
18
- import { fetchKapp, fetchForms, fetchForm, fetchTeams, fetchUsers, fetchSpace, updateKapp, searchSubmissions, SubmissionSearch } from '@kineticdata/react';
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ var _regeneratorRuntime3 = require("@babel/runtime/helpers/regeneratorRuntime")["default"];
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.fetchFormSaga = fetchFormSaga;
9
+ exports.fetchNotificationsSaga = fetchNotificationsSaga;
10
+ exports.fetchQueueSettingsSaga = fetchQueueSettingsSaga;
11
+ exports.fetchSpaceSaga = fetchSpaceSaga;
12
+ exports.fetchTeamsSaga = fetchTeamsSaga;
13
+ exports.fetchUsersSaga = fetchUsersSaga;
14
+ exports.updateQueueSettingsSaga = updateQueueSettingsSaga;
15
+ exports.watchSettingsQueue = watchSettingsQueue;
16
+ var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/regeneratorRuntime"));
17
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
18
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
19
+ var _immutable = require("immutable");
20
+ var _effects = require("redux-saga/effects");
21
+ var _settingsQueue = require("../modules/settingsQueue");
22
+ var _bundleCommon = require("@kineticdata/bundle-common");
23
+ var _react = require("@kineticdata/react");
24
+ var _marked = /*#__PURE__*/_regeneratorRuntime3().mark(fetchQueueSettingsSaga),
25
+ _marked2 = /*#__PURE__*/_regeneratorRuntime3().mark(fetchUsersSaga),
26
+ _marked3 = /*#__PURE__*/_regeneratorRuntime3().mark(fetchNotificationsSaga),
27
+ _marked4 = /*#__PURE__*/_regeneratorRuntime3().mark(fetchFormSaga),
28
+ _marked5 = /*#__PURE__*/_regeneratorRuntime3().mark(watchSettingsQueue);
19
29
  var QUEUE_SETTING_INCLUDES = 'formTypes,attributesMap,forms,forms.details';
20
30
  var TEAMS_SETTING_INCLUDES = 'teams';
21
31
  var SPACE_SETTING_INCLUDES = 'kapps,kapps.forms,attributesMap';
22
32
  var FORM_INCLUDES = 'details,fields,attributesMap,categorizations,kapp';
23
- export function fetchQueueSettingsSaga() {
33
+ function fetchQueueSettingsSaga() {
24
34
  var _yield$all, _yield$all2, _yield$all2$, error, kapp, manageableForms, manageableFormsSlugs;
25
-
26
- return _regeneratorRuntime.wrap(function fetchQueueSettingsSaga$(_context) {
35
+ return (0, _regeneratorRuntime2["default"])().wrap(function fetchQueueSettingsSaga$(_context) {
27
36
  while (1) {
28
37
  switch (_context.prev = _context.next) {
29
38
  case 0:
30
39
  _context.next = 2;
31
- return all([call(fetchKapp, {
40
+ return (0, _effects.all)([(0, _effects.call)(_react.fetchKapp, {
32
41
  include: QUEUE_SETTING_INCLUDES,
33
42
  kappSlug: 'queue'
34
- }), call(fetchForms, {
43
+ }), (0, _effects.call)(_react.fetchForms, {
35
44
  kappSlug: 'queue',
36
45
  manage: 'true'
37
46
  })]);
38
-
39
47
  case 2:
40
48
  _yield$all = _context.sent;
41
- _yield$all2 = _slicedToArray(_yield$all, 2);
49
+ _yield$all2 = (0, _slicedToArray2["default"])(_yield$all, 2);
42
50
  _yield$all2$ = _yield$all2[0];
43
51
  error = _yield$all2$.error;
44
52
  kapp = _yield$all2$.kapp;
45
53
  manageableForms = _yield$all2[1];
46
-
47
54
  if (!error) {
48
55
  _context.next = 13;
49
56
  break;
50
57
  }
51
-
52
58
  _context.next = 11;
53
- return put(actions.updateQueueSettingsError(error));
54
-
59
+ return (0, _effects.put)(_settingsQueue.actions.updateQueueSettingsError(error));
55
60
  case 11:
56
61
  _context.next = 16;
57
62
  break;
58
-
59
63
  case 13:
60
64
  manageableFormsSlugs = (manageableForms.forms || []).map(function (form) {
61
65
  return form.slug;
62
66
  });
63
67
  _context.next = 16;
64
- return put(actions.setQueueSettings(_objectSpread(_objectSpread({}, kapp), {}, {
68
+ return (0, _effects.put)(_settingsQueue.actions.setQueueSettings((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, kapp), {}, {
65
69
  forms: (kapp.forms || []).map(function (form) {
66
- return _objectSpread(_objectSpread({}, form), {}, {
70
+ return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, form), {}, {
67
71
  canManage: manageableFormsSlugs.includes(form.slug)
68
72
  });
69
73
  })
70
74
  })));
71
-
72
75
  case 16:
73
76
  case "end":
74
77
  return _context.stop();
@@ -76,315 +79,269 @@ export function fetchQueueSettingsSaga() {
76
79
  }
77
80
  }, _marked);
78
81
  }
79
- export function fetchTeamsSaga(_ref) {
80
- var payload, _yield$call, error, teams;
81
-
82
- return _regeneratorRuntime.wrap(function fetchTeamsSaga$(_context2) {
83
- while (1) {
84
- switch (_context2.prev = _context2.next) {
85
- case 0:
86
- payload = _ref.payload;
87
- _context2.next = 3;
88
- return call(fetchTeams, {
89
- include: TEAMS_SETTING_INCLUDES,
90
- teams: payload
91
- });
92
-
93
- case 3:
94
- _yield$call = _context2.sent;
95
- error = _yield$call.error;
96
- teams = _yield$call.teams;
97
-
98
- if (!error) {
99
- _context2.next = 11;
82
+ function fetchTeamsSaga(_ref) {
83
+ var payload = _ref.payload;
84
+ return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee() {
85
+ var _yield$call, error, teams;
86
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context2) {
87
+ while (1) {
88
+ switch (_context2.prev = _context2.next) {
89
+ case 0:
90
+ _context2.next = 2;
91
+ return (0, _effects.call)(_react.fetchTeams, {
92
+ include: TEAMS_SETTING_INCLUDES,
93
+ teams: payload
94
+ });
95
+ case 2:
96
+ _yield$call = _context2.sent;
97
+ error = _yield$call.error;
98
+ teams = _yield$call.teams;
99
+ if (!error) {
100
+ _context2.next = 10;
101
+ break;
102
+ }
103
+ _context2.next = 8;
104
+ return (0, _effects.put)(_settingsQueue.actions.updateQueueSettingsError(error));
105
+ case 8:
106
+ _context2.next = 12;
100
107
  break;
101
- }
102
-
103
- _context2.next = 9;
104
- return put(actions.updateQueueSettingsError(error));
105
-
106
- case 9:
107
- _context2.next = 13;
108
- break;
109
-
110
- case 11:
111
- _context2.next = 13;
112
- return put(actions.setQueueSettingsTeams(teams));
113
-
114
- case 13:
115
- case "end":
116
- return _context2.stop();
108
+ case 10:
109
+ _context2.next = 12;
110
+ return (0, _effects.put)(_settingsQueue.actions.setQueueSettingsTeams(teams));
111
+ case 12:
112
+ case "end":
113
+ return _context2.stop();
114
+ }
117
115
  }
118
- }
119
- }, _marked2);
116
+ }, _callee);
117
+ })();
120
118
  }
121
- export function fetchUsersSaga() {
119
+ function fetchUsersSaga() {
122
120
  var _yield$call2, error, users;
123
-
124
- return _regeneratorRuntime.wrap(function fetchUsersSaga$(_context3) {
121
+ return (0, _regeneratorRuntime2["default"])().wrap(function fetchUsersSaga$(_context3) {
125
122
  while (1) {
126
123
  switch (_context3.prev = _context3.next) {
127
124
  case 0:
128
125
  _context3.next = 2;
129
- return call(fetchUsers, {
126
+ return (0, _effects.call)(_react.fetchUsers, {
130
127
  include: 'details'
131
128
  });
132
-
133
129
  case 2:
134
130
  _yield$call2 = _context3.sent;
135
131
  error = _yield$call2.error;
136
132
  users = _yield$call2.users;
137
-
138
133
  if (!error) {
139
134
  _context3.next = 10;
140
135
  break;
141
136
  }
142
-
143
137
  _context3.next = 8;
144
- return put(actions.updateQueueSettingsError(error));
145
-
138
+ return (0, _effects.put)(_settingsQueue.actions.updateQueueSettingsError(error));
146
139
  case 8:
147
140
  _context3.next = 12;
148
141
  break;
149
-
150
142
  case 10:
151
143
  _context3.next = 12;
152
- return put(actions.setQueueSettingsUsers(users));
153
-
144
+ return (0, _effects.put)(_settingsQueue.actions.setQueueSettingsUsers(users));
154
145
  case 12:
155
146
  case "end":
156
147
  return _context3.stop();
157
148
  }
158
149
  }
159
- }, _marked3);
150
+ }, _marked2);
160
151
  }
161
- export function fetchSpaceSaga(_ref2) {
162
- var payload, _yield$call3, error, space;
163
-
164
- return _regeneratorRuntime.wrap(function fetchSpaceSaga$(_context4) {
165
- while (1) {
166
- switch (_context4.prev = _context4.next) {
167
- case 0:
168
- payload = _ref2.payload;
169
- _context4.next = 3;
170
- return call(fetchSpace, {
171
- include: SPACE_SETTING_INCLUDES,
172
- space: payload
173
- });
174
-
175
- case 3:
176
- _yield$call3 = _context4.sent;
177
- error = _yield$call3.error;
178
- space = _yield$call3.space;
179
-
180
- if (!error) {
181
- _context4.next = 11;
152
+ function fetchSpaceSaga(_ref2) {
153
+ var payload = _ref2.payload;
154
+ return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee2() {
155
+ var _yield$call3, error, space;
156
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee2$(_context4) {
157
+ while (1) {
158
+ switch (_context4.prev = _context4.next) {
159
+ case 0:
160
+ _context4.next = 2;
161
+ return (0, _effects.call)(_react.fetchSpace, {
162
+ include: SPACE_SETTING_INCLUDES,
163
+ space: payload
164
+ });
165
+ case 2:
166
+ _yield$call3 = _context4.sent;
167
+ error = _yield$call3.error;
168
+ space = _yield$call3.space;
169
+ if (!error) {
170
+ _context4.next = 10;
171
+ break;
172
+ }
173
+ _context4.next = 8;
174
+ return (0, _effects.put)(_settingsQueue.actions.updateQueueSettingsError(error));
175
+ case 8:
176
+ _context4.next = 12;
182
177
  break;
183
- }
184
-
185
- _context4.next = 9;
186
- return put(actions.updateQueueSettingsError(error));
187
-
188
- case 9:
189
- _context4.next = 13;
190
- break;
191
-
192
- case 11:
193
- _context4.next = 13;
194
- return put(actions.setQueueSettingsSpace(space));
195
-
196
- case 13:
197
- case "end":
198
- return _context4.stop();
178
+ case 10:
179
+ _context4.next = 12;
180
+ return (0, _effects.put)(_settingsQueue.actions.setQueueSettingsSpace(space));
181
+ case 12:
182
+ case "end":
183
+ return _context4.stop();
184
+ }
199
185
  }
200
- }
201
- }, _marked4);
186
+ }, _callee2);
187
+ })();
202
188
  }
203
- export function updateQueueSettingsSaga(_ref3) {
204
- var payload, attributes, _yield$call4, error, appActions;
205
-
206
- return _regeneratorRuntime.wrap(function updateQueueSettingsSaga$(_context5) {
207
- while (1) {
208
- switch (_context5.prev = _context5.next) {
209
- case 0:
210
- payload = _ref3.payload;
211
- attributes = Map(payload).filter(function (value) {
212
- return value;
213
- }).map(function (value) {
214
- return value.constructor === Array ? value : [value];
215
- }).toJS();
216
- _context5.next = 4;
217
- return call(updateKapp, {
218
- include: QUEUE_SETTING_INCLUDES,
219
- kapp: {
220
- attributesMap: attributes
221
- },
222
- kappSlug: 'queue'
223
- });
224
-
225
- case 4:
226
- _yield$call4 = _context5.sent;
227
- error = _yield$call4.error;
228
-
229
- if (!error) {
230
- _context5.next = 13;
189
+ function updateQueueSettingsSaga(_ref3) {
190
+ var payload = _ref3.payload;
191
+ return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee3() {
192
+ var attributes, _yield$call4, error, appActions;
193
+ return (0, _regeneratorRuntime2["default"])().wrap(function _callee3$(_context5) {
194
+ while (1) {
195
+ switch (_context5.prev = _context5.next) {
196
+ case 0:
197
+ attributes = (0, _immutable.Map)(payload).filter(function (value) {
198
+ return value;
199
+ }).map(function (value) {
200
+ return value.constructor === Array ? value : [value];
201
+ }).toJS();
202
+ _context5.next = 3;
203
+ return (0, _effects.call)(_react.updateKapp, {
204
+ include: QUEUE_SETTING_INCLUDES,
205
+ kapp: {
206
+ attributesMap: attributes
207
+ },
208
+ kappSlug: 'queue'
209
+ });
210
+ case 3:
211
+ _yield$call4 = _context5.sent;
212
+ error = _yield$call4.error;
213
+ if (!error) {
214
+ _context5.next = 12;
215
+ break;
216
+ }
217
+ _context5.next = 8;
218
+ return (0, _effects.put)((0, _bundleCommon.addError)('Failed to update settings.', 'Update Settings'));
219
+ case 8:
220
+ _context5.next = 10;
221
+ return (0, _effects.put)(_settingsQueue.actions.updateServicesSettingsError(error));
222
+ case 10:
223
+ _context5.next = 19;
231
224
  break;
232
- }
233
-
234
- _context5.next = 9;
235
- return put(addError('Failed to update settings.', 'Update Settings'));
236
-
237
- case 9:
238
- _context5.next = 11;
239
- return put(actions.updateServicesSettingsError(error));
240
-
241
- case 11:
242
- _context5.next = 20;
243
- break;
244
-
245
- case 13:
246
- _context5.next = 15;
247
- return put(addSuccess('Updated settings successfully.', 'Update Settings'));
248
-
249
- case 15:
250
- _context5.next = 17;
251
- return select(function (state) {
252
- return state.app.actions;
253
- });
254
-
255
- case 17:
256
- appActions = _context5.sent;
257
- _context5.next = 20;
258
- return put(appActions.refreshApp());
259
-
260
- case 20:
261
- case "end":
262
- return _context5.stop();
225
+ case 12:
226
+ _context5.next = 14;
227
+ return (0, _effects.put)((0, _bundleCommon.addSuccess)('Updated settings successfully.', 'Update Settings'));
228
+ case 14:
229
+ _context5.next = 16;
230
+ return (0, _effects.select)(function (state) {
231
+ return state.app.actions;
232
+ });
233
+ case 16:
234
+ appActions = _context5.sent;
235
+ _context5.next = 19;
236
+ return (0, _effects.put)(appActions.refreshApp());
237
+ case 19:
238
+ case "end":
239
+ return _context5.stop();
240
+ }
263
241
  }
264
- }
265
- }, _marked5);
242
+ }, _callee3);
243
+ })();
266
244
  }
267
- export function fetchNotificationsSaga() {
245
+ function fetchNotificationsSaga() {
268
246
  var search, _yield$call5, error, submissions;
269
-
270
- return _regeneratorRuntime.wrap(function fetchNotificationsSaga$(_context6) {
247
+ return (0, _regeneratorRuntime2["default"])().wrap(function fetchNotificationsSaga$(_context6) {
271
248
  while (1) {
272
249
  switch (_context6.prev = _context6.next) {
273
250
  case 0:
274
- search = new SubmissionSearch(true).index('values[Name]').includes(['details', 'values']).build();
251
+ search = new _react.SubmissionSearch(true).index('values[Name]').includes(['details', 'values']).build();
275
252
  _context6.next = 3;
276
- return call(searchSubmissions, {
253
+ return (0, _effects.call)(_react.searchSubmissions, {
277
254
  search: search,
278
255
  form: 'notification-data',
279
256
  datastore: true
280
257
  });
281
-
282
258
  case 3:
283
259
  _yield$call5 = _context6.sent;
284
260
  error = _yield$call5.error;
285
261
  submissions = _yield$call5.submissions;
286
-
287
262
  if (!error) {
288
263
  _context6.next = 11;
289
264
  break;
290
265
  }
291
-
292
266
  _context6.next = 9;
293
- return put(actions.updateQueueSettingsError(error));
294
-
267
+ return (0, _effects.put)(_settingsQueue.actions.updateQueueSettingsError(error));
295
268
  case 9:
296
269
  _context6.next = 13;
297
270
  break;
298
-
299
271
  case 11:
300
272
  _context6.next = 13;
301
- return put(actions.setNotifications(submissions));
302
-
273
+ return (0, _effects.put)(_settingsQueue.actions.setNotifications(submissions));
303
274
  case 13:
304
275
  case "end":
305
276
  return _context6.stop();
306
277
  }
307
278
  }
308
- }, _marked6);
279
+ }, _marked3);
309
280
  }
310
- export function fetchFormSaga(action) {
281
+ function fetchFormSaga(action) {
311
282
  var _yield$call6, error, form;
312
-
313
- return _regeneratorRuntime.wrap(function fetchFormSaga$(_context7) {
283
+ return (0, _regeneratorRuntime2["default"])().wrap(function fetchFormSaga$(_context7) {
314
284
  while (1) {
315
285
  switch (_context7.prev = _context7.next) {
316
286
  case 0:
317
287
  _context7.next = 2;
318
- return call(fetchForm, {
288
+ return (0, _effects.call)(_react.fetchForm, {
319
289
  kappSlug: action.payload.kappSlug,
320
290
  formSlug: action.payload.formSlug,
321
291
  include: FORM_INCLUDES
322
292
  });
323
-
324
293
  case 2:
325
294
  _yield$call6 = _context7.sent;
326
295
  error = _yield$call6.error;
327
296
  form = _yield$call6.form;
328
-
329
297
  if (!error) {
330
298
  _context7.next = 10;
331
299
  break;
332
300
  }
333
-
334
301
  _context7.next = 8;
335
- return put(actions.updateQueueSettingsError(error));
336
-
302
+ return (0, _effects.put)(_settingsQueue.actions.updateQueueSettingsError(error));
337
303
  case 8:
338
304
  _context7.next = 12;
339
305
  break;
340
-
341
306
  case 10:
342
307
  _context7.next = 12;
343
- return put(actions.setForm(form));
344
-
308
+ return (0, _effects.put)(_settingsQueue.actions.setForm(form));
345
309
  case 12:
346
310
  case "end":
347
311
  return _context7.stop();
348
312
  }
349
313
  }
350
- }, _marked7);
314
+ }, _marked4);
351
315
  }
352
- export function watchSettingsQueue() {
353
- return _regeneratorRuntime.wrap(function watchSettingsQueue$(_context8) {
316
+ function watchSettingsQueue() {
317
+ return (0, _regeneratorRuntime2["default"])().wrap(function watchSettingsQueue$(_context8) {
354
318
  while (1) {
355
319
  switch (_context8.prev = _context8.next) {
356
320
  case 0:
357
321
  _context8.next = 2;
358
- return takeEvery(types.FETCH_QUEUE_SETTINGS, fetchQueueSettingsSaga);
359
-
322
+ return (0, _effects.takeEvery)(_settingsQueue.types.FETCH_QUEUE_SETTINGS, fetchQueueSettingsSaga);
360
323
  case 2:
361
324
  _context8.next = 4;
362
- return takeEvery(types.FETCH_QUEUE_SETTINGS_TEAMS, fetchTeamsSaga);
363
-
325
+ return (0, _effects.takeEvery)(_settingsQueue.types.FETCH_QUEUE_SETTINGS_TEAMS, fetchTeamsSaga);
364
326
  case 4:
365
327
  _context8.next = 6;
366
- return takeEvery(types.FETCH_QUEUE_SETTINGS_USERS, fetchUsersSaga);
367
-
328
+ return (0, _effects.takeEvery)(_settingsQueue.types.FETCH_QUEUE_SETTINGS_USERS, fetchUsersSaga);
368
329
  case 6:
369
330
  _context8.next = 8;
370
- return takeEvery(types.FETCH_QUEUE_SETTINGS_SPACE, fetchSpaceSaga);
371
-
331
+ return (0, _effects.takeEvery)(_settingsQueue.types.FETCH_QUEUE_SETTINGS_SPACE, fetchSpaceSaga);
372
332
  case 8:
373
333
  _context8.next = 10;
374
- return takeEvery(types.UPDATE_QUEUE_SETTINGS, updateQueueSettingsSaga);
375
-
334
+ return (0, _effects.takeEvery)(_settingsQueue.types.UPDATE_QUEUE_SETTINGS, updateQueueSettingsSaga);
376
335
  case 10:
377
336
  _context8.next = 12;
378
- return takeEvery(types.FETCH_NOTIFICATIONS, fetchNotificationsSaga);
379
-
337
+ return (0, _effects.takeEvery)(_settingsQueue.types.FETCH_NOTIFICATIONS, fetchNotificationsSaga);
380
338
  case 12:
381
339
  _context8.next = 14;
382
- return takeEvery(types.FETCH_FORM, fetchFormSaga);
383
-
340
+ return (0, _effects.takeEvery)(_settingsQueue.types.FETCH_FORM, fetchFormSaga);
384
341
  case 14:
385
342
  case "end":
386
343
  return _context8.stop();
387
344
  }
388
345
  }
389
- }, _marked8);
346
+ }, _marked5);
390
347
  }
@@ -1,22 +1,26 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
1
+ "use strict";
2
2
 
3
- var _marked = /*#__PURE__*/_regeneratorRuntime.mark(sagas);
4
-
5
- import { all } from 'redux-saga/effects';
6
- import { watchApp } from './sagas/app';
7
- import { watchApp as watchQueueApp } from './sagas/queueApp';
8
- import { watchQueue } from './sagas/queue';
9
- import { watchForms } from './sagas/forms';
10
- import { watchSettingsQueue } from './sagas/settingsQueue';
11
- import { watchSettingsForms } from './sagas/settingsForms';
12
- export default function sagas() {
13
- return _regeneratorRuntime.wrap(function sagas$(_context) {
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = sagas;
8
+ var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/regeneratorRuntime"));
9
+ var _effects = require("redux-saga/effects");
10
+ var _app = require("./sagas/app");
11
+ var _queueApp = require("./sagas/queueApp");
12
+ var _queue = require("./sagas/queue");
13
+ var _forms = require("./sagas/forms");
14
+ var _settingsQueue = require("./sagas/settingsQueue");
15
+ var _settingsForms = require("./sagas/settingsForms");
16
+ var _marked = /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(sagas);
17
+ function sagas() {
18
+ return (0, _regeneratorRuntime2["default"])().wrap(function sagas$(_context) {
14
19
  while (1) {
15
20
  switch (_context.prev = _context.next) {
16
21
  case 0:
17
22
  _context.next = 2;
18
- return all([watchApp(), watchQueueApp(), watchQueue(), watchForms(), watchSettingsQueue(), watchSettingsForms()]);
19
-
23
+ return (0, _effects.all)([(0, _app.watchApp)(), (0, _queueApp.watchApp)(), (0, _queue.watchQueue)(), (0, _forms.watchForms)(), (0, _settingsQueue.watchSettingsQueue)(), (0, _settingsForms.watchSettingsForms)()]);
20
24
  case 2:
21
25
  case "end":
22
26
  return _context.stop();