@kineticdata/bundle-tech-bar 6.0.1 → 6.0.3

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 (43) hide show
  1. package/lib/App.js +1 -2
  2. package/lib/components/AppointmentForm.js +5 -10
  3. package/lib/components/CheckIn.js +5 -9
  4. package/lib/components/Display.js +4 -8
  5. package/lib/components/Feedback.js +5 -9
  6. package/lib/components/Form.js +5 -10
  7. package/lib/components/Home.js +5 -9
  8. package/lib/components/Overhead.js +5 -9
  9. package/lib/components/Past.js +5 -9
  10. package/lib/components/Sidebar.js +4 -7
  11. package/lib/components/TechBars.js +4 -7
  12. package/lib/components/settings/SchedulerSettings.js +5 -9
  13. package/lib/components/settings/Settings.js +3 -6
  14. package/lib/components/settings/Sidebar.js +3 -6
  15. package/lib/components/settings/TechBarMetrics.js +5 -9
  16. package/lib/components/settings/TechBarSettings.js +5 -9
  17. package/lib/components/settings/metrics/MetricsExport.js +7 -13
  18. package/lib/components/settings/metrics/MetricsSummary.js +4 -7
  19. package/lib/components/settings/metrics/MetricsTrend.js +4 -7
  20. package/lib/components/settings/tech-bar/AppointmentForm.js +3 -6
  21. package/lib/components/settings/tech-bar/TechBar.js +5 -9
  22. package/lib/components/settings/tech-bar/TechBarDisplayMembers.js +4 -7
  23. package/lib/components/settings/tech-bar/TechBarSettingsForm.js +5 -9
  24. package/lib/components/shared/PageTitle.js +3 -5
  25. package/lib/constants.js +16 -32
  26. package/lib/index.js +4 -2
  27. package/lib/redux/modules/app.js +4 -7
  28. package/lib/redux/modules/appointments.js +5 -9
  29. package/lib/redux/modules/export.js +5 -9
  30. package/lib/redux/modules/metrics.js +6 -11
  31. package/lib/redux/modules/techBarApp.js +9 -17
  32. package/lib/redux/modules/walkIns.js +5 -9
  33. package/lib/redux/reducers.js +2 -3
  34. package/lib/redux/sagas/app.js +11 -15
  35. package/lib/redux/sagas/appointments.js +227 -241
  36. package/lib/redux/sagas/export.js +112 -118
  37. package/lib/redux/sagas/metrics.js +50 -54
  38. package/lib/redux/sagas/techBarApp.js +233 -245
  39. package/lib/redux/sagas/walkIns.js +90 -96
  40. package/lib/redux/sagas.js +7 -9
  41. package/lib/redux/store.js +5 -9
  42. package/lib/utils.js +2 -3
  43. package/package.json +55 -54
@@ -24,53 +24,51 @@ function fetchTodayWalkInsRequestSaga(_ref) {
24
24
  return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee() {
25
25
  var kappSlug, searchBuilder, _yield$call, submissions, error;
26
26
  return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
27
- while (1) {
28
- switch (_context.prev = _context.next) {
29
- case 0:
30
- _context.next = 2;
31
- return (0, _effects.select)(function (state) {
32
- return state.app.kappSlug;
33
- });
34
- case 2:
35
- kappSlug = _context.sent;
36
- searchBuilder = new _react.SubmissionSearch().limit(1000).include('details,values').eq('values[Scheduler Id]', schedulerId).eq('values[Date]', (0, _moment["default"])().format('YYYY-MM-DD'));
37
- if ((0, _isarray["default"])(status) && status.length > 0) {
38
- searchBuilder["in"]('values[Status]', status);
39
- } else if (status) {
40
- searchBuilder.eq('values[Status]', status);
41
- }
42
- _context.next = 7;
43
- return (0, _effects.call)(_react.searchSubmissions, {
44
- search: searchBuilder.build(),
45
- form: _constants.WALK_IN_FORM_SLUG,
46
- kapp: kappSlug
47
- });
48
- case 7:
49
- _yield$call = _context.sent;
50
- submissions = _yield$call.submissions;
51
- error = _yield$call.error;
52
- if (!error) {
53
- _context.next = 16;
54
- break;
55
- }
56
- _context.next = 13;
57
- return (0, _effects.put)(_walkIns.actions.fetchWalkInsFailure(error));
58
- case 13:
59
- (0, _bundleCommon.addToastAlert)({
60
- title: "Failed to fetch today's walk-ins.",
61
- message: error.message
62
- });
63
- _context.next = 18;
27
+ while (1) switch (_context.prev = _context.next) {
28
+ case 0:
29
+ _context.next = 2;
30
+ return (0, _effects.select)(function (state) {
31
+ return state.app.kappSlug;
32
+ });
33
+ case 2:
34
+ kappSlug = _context.sent;
35
+ searchBuilder = new _react.SubmissionSearch().limit(1000).include('details,values').eq('values[Scheduler Id]', schedulerId).eq('values[Date]', (0, _moment["default"])().format('YYYY-MM-DD'));
36
+ if ((0, _isarray["default"])(status) && status.length > 0) {
37
+ searchBuilder["in"]('values[Status]', status);
38
+ } else if (status) {
39
+ searchBuilder.eq('values[Status]', status);
40
+ }
41
+ _context.next = 7;
42
+ return (0, _effects.call)(_react.searchSubmissions, {
43
+ search: searchBuilder.build(),
44
+ form: _constants.WALK_IN_FORM_SLUG,
45
+ kapp: kappSlug
46
+ });
47
+ case 7:
48
+ _yield$call = _context.sent;
49
+ submissions = _yield$call.submissions;
50
+ error = _yield$call.error;
51
+ if (!error) {
52
+ _context.next = 16;
64
53
  break;
65
- case 16:
66
- _context.next = 18;
67
- return (0, _effects.put)(_walkIns.actions.fetchTodayWalkInsSuccess(submissions.filter(function (s) {
68
- return s.coreState !== 'Draft';
69
- })));
70
- case 18:
71
- case "end":
72
- return _context.stop();
73
- }
54
+ }
55
+ _context.next = 13;
56
+ return (0, _effects.put)(_walkIns.actions.fetchWalkInsFailure(error));
57
+ case 13:
58
+ (0, _bundleCommon.addToastAlert)({
59
+ title: "Failed to fetch today's walk-ins.",
60
+ message: error.message
61
+ });
62
+ _context.next = 18;
63
+ break;
64
+ case 16:
65
+ _context.next = 18;
66
+ return (0, _effects.put)(_walkIns.actions.fetchTodayWalkInsSuccess(submissions.filter(function (s) {
67
+ return s.coreState !== 'Draft';
68
+ })));
69
+ case 18:
70
+ case "end":
71
+ return _context.stop();
74
72
  }
75
73
  }, _callee);
76
74
  })();
@@ -80,64 +78,60 @@ function fetchWalkInsOverviewRequestSaga(_ref2) {
80
78
  return /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee2() {
81
79
  var kappSlug, _yield$call2, records, error;
82
80
  return (0, _regeneratorRuntime2["default"])().wrap(function _callee2$(_context2) {
83
- while (1) {
84
- switch (_context2.prev = _context2.next) {
85
- case 0:
86
- _context2.next = 2;
87
- return (0, _effects.select)(function (state) {
88
- return state.app.kappSlug;
89
- });
90
- case 2:
91
- kappSlug = _context2.sent;
92
- _context2.next = 5;
93
- return (0, _effects.call)(_react.fetchBridgedResource, {
94
- kappSlug: kappSlug,
95
- formSlug: 'bridged-resources',
96
- bridgedResourceName: 'Tech Bar Walk-Ins Overview',
97
- values: {
98
- Id: id,
99
- Date: (0, _moment["default"])().format('YYYY-MM-DD')
100
- }
101
- });
102
- case 5:
103
- _yield$call2 = _context2.sent;
104
- records = _yield$call2.records;
105
- error = _yield$call2.error;
106
- if (!error) {
107
- _context2.next = 14;
108
- break;
81
+ while (1) switch (_context2.prev = _context2.next) {
82
+ case 0:
83
+ _context2.next = 2;
84
+ return (0, _effects.select)(function (state) {
85
+ return state.app.kappSlug;
86
+ });
87
+ case 2:
88
+ kappSlug = _context2.sent;
89
+ _context2.next = 5;
90
+ return (0, _effects.call)(_react.fetchBridgedResource, {
91
+ kappSlug: kappSlug,
92
+ formSlug: 'bridged-resources',
93
+ bridgedResourceName: 'Tech Bar Walk-Ins Overview',
94
+ values: {
95
+ Id: id,
96
+ Date: (0, _moment["default"])().format('YYYY-MM-DD')
109
97
  }
110
- _context2.next = 11;
111
- return (0, _effects.put)(_walkIns.actions.fetchWalkInsOverviewFailure(error));
112
- case 11:
113
- console.error('Failed to fetch walk-ins overview.', error.message);
114
- _context2.next = 16;
98
+ });
99
+ case 5:
100
+ _yield$call2 = _context2.sent;
101
+ records = _yield$call2.records;
102
+ error = _yield$call2.error;
103
+ if (!error) {
104
+ _context2.next = 14;
115
105
  break;
116
- case 14:
117
- _context2.next = 16;
118
- return (0, _effects.put)(_walkIns.actions.fetchWalkInsOverviewSuccess(records));
119
- case 16:
120
- case "end":
121
- return _context2.stop();
122
- }
106
+ }
107
+ _context2.next = 11;
108
+ return (0, _effects.put)(_walkIns.actions.fetchWalkInsOverviewFailure(error));
109
+ case 11:
110
+ console.error('Failed to fetch walk-ins overview.', error.message);
111
+ _context2.next = 16;
112
+ break;
113
+ case 14:
114
+ _context2.next = 16;
115
+ return (0, _effects.put)(_walkIns.actions.fetchWalkInsOverviewSuccess(records));
116
+ case 16:
117
+ case "end":
118
+ return _context2.stop();
123
119
  }
124
120
  }, _callee2);
125
121
  })();
126
122
  }
127
123
  function watchWalkIns() {
128
124
  return (0, _regeneratorRuntime2["default"])().wrap(function watchWalkIns$(_context3) {
129
- while (1) {
130
- switch (_context3.prev = _context3.next) {
131
- case 0:
132
- _context3.next = 2;
133
- return (0, _effects.takeEvery)(_walkIns.types.FETCH_TODAY_WALK_INS_REQUEST, fetchTodayWalkInsRequestSaga);
134
- case 2:
135
- _context3.next = 4;
136
- return (0, _effects.takeEvery)(_walkIns.types.FETCH_WALK_INS_OVERVIEW_REQUEST, fetchWalkInsOverviewRequestSaga);
137
- case 4:
138
- case "end":
139
- return _context3.stop();
140
- }
125
+ while (1) switch (_context3.prev = _context3.next) {
126
+ case 0:
127
+ _context3.next = 2;
128
+ return (0, _effects.takeEvery)(_walkIns.types.FETCH_TODAY_WALK_INS_REQUEST, fetchTodayWalkInsRequestSaga);
129
+ case 2:
130
+ _context3.next = 4;
131
+ return (0, _effects.takeEvery)(_walkIns.types.FETCH_WALK_INS_OVERVIEW_REQUEST, fetchWalkInsOverviewRequestSaga);
132
+ case 4:
133
+ case "end":
134
+ return _context3.stop();
141
135
  }
142
136
  }, _marked);
143
137
  }
@@ -16,15 +16,13 @@ var _export = require("./sagas/export");
16
16
  var _marked = /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(_callee);
17
17
  function _callee() {
18
18
  return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
19
- while (1) {
20
- switch (_context.prev = _context.next) {
21
- case 0:
22
- _context.next = 2;
23
- return (0, _effects.all)([(0, _app.watchApp)(), (0, _appointments.watchAppointments)(), (0, _techBarApp.watchTechBarApp)(), (0, _walkIns.watchWalkIns)(), (0, _metrics.watchMetrics)(), (0, _export.watchExport)()]);
24
- case 2:
25
- case "end":
26
- return _context.stop();
27
- }
19
+ while (1) switch (_context.prev = _context.next) {
20
+ case 0:
21
+ _context.next = 2;
22
+ return (0, _effects.all)([(0, _app.watchApp)(), (0, _appointments.watchAppointments)(), (0, _techBarApp.watchTechBarApp)(), (0, _walkIns.watchWalkIns)(), (0, _metrics.watchMetrics)(), (0, _export.watchExport)()]);
23
+ case 2:
24
+ case "end":
25
+ return _context.stop();
28
26
  }
29
27
  }, _marked);
30
28
  }
@@ -25,16 +25,13 @@ var _createReduxHistoryCo = (0, _reduxFirstHistory.createReduxHistoryContext)({
25
25
  createReduxHistory = _createReduxHistoryCo.createReduxHistory,
26
26
  routerMiddleware = _createReduxHistoryCo.routerMiddleware,
27
27
  routerReducer = _createReduxHistoryCo.routerReducer;
28
- var store = (0, _redux.createStore)((0, _redux.combineReducers)((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, _reducers["default"]), {}, {
28
+ var store = exports.store = (0, _redux.createStore)((0, _redux.combineReducers)((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, _reducers["default"]), {}, {
29
29
  router: routerReducer
30
30
  })), composeEnhancers((0, _redux.applyMiddleware)(routerMiddleware, sagaMiddlware)));
31
- exports.store = store;
32
- var connectedHistory = (0, _reduxFirstHistory.reachify)(createReduxHistory(store));
33
- exports.connectedHistory = connectedHistory;
31
+ var connectedHistory = exports.connectedHistory = (0, _reduxFirstHistory.reachify)(createReduxHistory(store));
34
32
  sagaMiddlware.run(_sagas["default"]);
35
- var context = /*#__PURE__*/(0, _react.createContext)(null);
36
- exports.context = context;
37
- var connect = function connect() {
33
+ var context = exports.context = /*#__PURE__*/(0, _react.createContext)(null);
34
+ var connect = exports.connect = function connect() {
38
35
  var mapStateToProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
39
36
  var mapDispatchToProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
40
37
  var mergeProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
@@ -42,5 +39,4 @@ var connect = function connect() {
42
39
  return (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps, mergeProps, (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, options), {}, {
43
40
  context: context
44
41
  }));
45
- };
46
- exports.connect = connect;
42
+ };
package/lib/utils.js CHANGED
@@ -4,11 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.isActiveClass = void 0;
7
- var isActiveClass = function isActiveClass(defaultClass) {
7
+ var isActiveClass = exports.isActiveClass = function isActiveClass(defaultClass) {
8
8
  return function (props) {
9
9
  return {
10
10
  className: props.isCurrent ? "".concat(defaultClass, " active") : defaultClass
11
11
  };
12
12
  };
13
- };
14
- exports.isActiveClass = isActiveClass;
13
+ };
package/package.json CHANGED
@@ -1,54 +1,55 @@
1
- {
2
- "name": "@kineticdata/bundle-tech-bar",
3
- "version": "6.0.1",
4
- "main": "./lib/index.js",
5
- "files": [
6
- "assets",
7
- "lib"
8
- ],
9
- "publishConfig": {
10
- "access": "public"
11
- },
12
- "scripts": {
13
- "build": "cross-env NODE_ENV=production babel src --out-dir lib",
14
- "lint": "cross-env NODE_ENV=production eslint src --ext .js",
15
- "preversion": "yarn lint",
16
- "prepublishOnly": "yarn build"
17
- },
18
- "dependencies": {
19
- "@kineticdata/bundle-common": "6.0.1",
20
- "@kineticdata/react": "6.0.1",
21
- "@reach/router": "https://github.com/kineticdata/router.git",
22
- "bootstrap": "^4.3.1",
23
- "classnames": "^2.2.5",
24
- "downloadjs": "^1.4.7",
25
- "immutable": "4.0.0-rc.9",
26
- "isarray": "^2.0.2",
27
- "md5": "^2.0.0",
28
- "moment": "^2.29.4",
29
- "papaparse": "^5.2.0",
30
- "query-string": "^5.1.1",
31
- "react-redux": "^6.0.1",
32
- "reactstrap": "^7.1.0",
33
- "recompose": "^0.30.0",
34
- "redux": "^3.7.2",
35
- "redux-first-history": "^4.0.0-alpha.7",
36
- "redux-saga": "^0.16.0",
37
- "rudy-match-path": "^0.3.0",
38
- "victory": "^31.2.0"
39
- },
40
- "peerDependencies": {
41
- "react": "^17.0.2",
42
- "react-dom": "^17.0.2"
43
- },
44
- "babel": {
45
- "presets": [
46
- [
47
- "react-app",
48
- {
49
- "absoluteRuntime": false
50
- }
51
- ]
52
- ]
53
- }
54
- }
1
+ {
2
+ "name": "@kineticdata/bundle-tech-bar",
3
+ "version": "6.0.3",
4
+ "main": "./lib/index.js",
5
+ "files": [
6
+ "assets",
7
+ "lib"
8
+ ],
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "scripts": {
13
+ "build": "cross-env NODE_ENV=production babel src --out-dir lib",
14
+ "lint": "cross-env NODE_ENV=production eslint src --ext .js",
15
+ "preversion": "yarn lint",
16
+ "prepublishOnly": "yarn build"
17
+ },
18
+ "dependencies": {
19
+ "@kineticdata/bundle-common": "6.0.3",
20
+ "@kineticdata/react": "6.0.3",
21
+ "@reach/router": "https://github.com/kineticdata/router.git",
22
+ "bootstrap": "^4.3.1",
23
+ "classnames": "^2.2.5",
24
+ "downloadjs": "^1.4.7",
25
+ "immutable": "4.0.0-rc.9",
26
+ "isarray": "^2.0.2",
27
+ "md5": "^2.0.0",
28
+ "moment": "^2.29.4",
29
+ "papaparse": "^5.2.0",
30
+ "query-string": "^5.1.1",
31
+ "react-redux": "^6.0.1",
32
+ "reactstrap": "^7.1.0",
33
+ "recompose": "^0.30.0",
34
+ "redux": "^3.7.2",
35
+ "redux-first-history": "^4.0.0-alpha.7",
36
+ "redux-saga": "^0.16.0",
37
+ "rudy-match-path": "^0.3.0",
38
+ "victory": "^31.2.0"
39
+ },
40
+ "peerDependencies": {
41
+ "react": "^17.0.2",
42
+ "react-dom": "^17.0.2"
43
+ },
44
+ "babel": {
45
+ "presets": [
46
+ [
47
+ "react-app",
48
+ {
49
+ "absoluteRuntime": false
50
+ }
51
+ ]
52
+ ]
53
+ },
54
+ "gitHead": "ed053959bc74a8673ef9f09884f4a6eba83ec317"
55
+ }