@kineticdata/bundle-tech-bar 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 (43) hide show
  1. package/lib/App.js +41 -36
  2. package/lib/components/AppointmentForm.js +48 -36
  3. package/lib/components/CheckIn.js +86 -78
  4. package/lib/components/Display.js +64 -53
  5. package/lib/components/Feedback.js +106 -103
  6. package/lib/components/Form.js +56 -48
  7. package/lib/components/Home.js +148 -144
  8. package/lib/components/Overhead.js +52 -44
  9. package/lib/components/Past.js +56 -44
  10. package/lib/components/Sidebar.js +58 -51
  11. package/lib/components/TechBars.js +72 -68
  12. package/lib/components/settings/SchedulerSettings.js +32 -21
  13. package/lib/components/settings/Settings.js +54 -50
  14. package/lib/components/settings/Sidebar.js +41 -31
  15. package/lib/components/settings/TechBarMetrics.js +124 -120
  16. package/lib/components/settings/TechBarSettings.js +46 -36
  17. package/lib/components/settings/metrics/MetricsExport.js +120 -107
  18. package/lib/components/settings/metrics/MetricsSummary.js +140 -141
  19. package/lib/components/settings/metrics/MetricsTrend.js +331 -341
  20. package/lib/components/settings/tech-bar/AppointmentForm.js +30 -20
  21. package/lib/components/settings/tech-bar/TechBar.js +90 -79
  22. package/lib/components/settings/tech-bar/TechBarDisplayMembers.js +108 -108
  23. package/lib/components/settings/tech-bar/TechBarSettingsForm.js +44 -34
  24. package/lib/components/shared/PageTitle.js +24 -15
  25. package/lib/constants.js +38 -16
  26. package/lib/index.js +49 -53
  27. package/lib/redux/modules/app.js +22 -17
  28. package/lib/redux/modules/appointments.js +31 -35
  29. package/lib/redux/modules/export.js +26 -21
  30. package/lib/redux/modules/metrics.js +24 -19
  31. package/lib/redux/modules/techBarApp.js +33 -34
  32. package/lib/redux/modules/walkIns.js +23 -21
  33. package/lib/redux/reducers.js +21 -14
  34. package/lib/redux/sagas/app.js +15 -13
  35. package/lib/redux/sagas/appointments.js +220 -256
  36. package/lib/redux/sagas/export.js +153 -166
  37. package/lib/redux/sagas/metrics.js +76 -76
  38. package/lib/redux/sagas/techBarApp.js +240 -258
  39. package/lib/redux/sagas/walkIns.js +124 -132
  40. package/lib/redux/sagas.js +18 -14
  41. package/lib/redux/store.js +36 -27
  42. package/lib/utils.js +9 -2
  43. package/package.json +6 -15
package/lib/App.js CHANGED
@@ -1,58 +1,63 @@
1
- import React from 'react';
2
- import { Router } from '@reach/router';
3
- import { compose, lifecycle } from 'recompose';
4
- import { connect } from './redux/store';
5
- import { ErrorMessage, LoadingMessage } from '@kineticdata/bundle-common';
6
- import { I18n } from '@kineticdata/react';
7
- import { PageTitle } from './components/shared/PageTitle';
8
- import { Home } from './components/Home';
9
- import { Past } from './components/Past';
10
- import { TechBars } from './components/TechBars';
11
- import { Display } from './components/Display';
12
- import { Form } from './components/Form';
13
- import { AppointmentForm } from './components/AppointmentForm';
14
- import { Settings } from './components/settings/Settings';
15
- import { actions } from './redux/modules/techBarApp';
1
+ "use strict";
16
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.App = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _router = require("@reach/router");
10
+ var _recompose = require("recompose");
11
+ var _store = require("./redux/store");
12
+ var _bundleCommon = require("@kineticdata/bundle-common");
13
+ var _react2 = require("@kineticdata/react");
14
+ var _PageTitle = require("./components/shared/PageTitle");
15
+ var _Home = require("./components/Home");
16
+ var _Past = require("./components/Past");
17
+ var _TechBars = require("./components/TechBars");
18
+ var _Display = require("./components/Display");
19
+ var _Form = require("./components/Form");
20
+ var _AppointmentForm = require("./components/AppointmentForm");
21
+ var _Settings = require("./components/settings/Settings");
22
+ var _techBarApp = require("./redux/modules/techBarApp");
17
23
  var AppComponent = function AppComponent(props) {
18
24
  return props.render({
19
- main: props.error ? /*#__PURE__*/React.createElement(ErrorMessage, {
25
+ main: props.error ? /*#__PURE__*/_react["default"].createElement(_bundleCommon.ErrorMessage, {
20
26
  title: "Unexpected Error",
21
27
  message: "Sorry, an unexpected error has occurred!"
22
- }) : props.loading ? /*#__PURE__*/React.createElement(LoadingMessage, null) : /*#__PURE__*/React.createElement(I18n, null, /*#__PURE__*/React.createElement("main", {
28
+ }) : props.loading ? /*#__PURE__*/_react["default"].createElement(_bundleCommon.LoadingMessage, null) : /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, /*#__PURE__*/_react["default"].createElement("main", {
23
29
  className: "package-layout package-layout--tech-bar"
24
- }, /*#__PURE__*/React.createElement(PageTitle, {
30
+ }, /*#__PURE__*/_react["default"].createElement(_PageTitle.PageTitle, {
25
31
  parts: ['Loading...']
26
- }), /*#__PURE__*/React.createElement(Router, null, /*#__PURE__*/React.createElement(Settings, {
32
+ }), /*#__PURE__*/_react["default"].createElement(_router.Router, null, /*#__PURE__*/_react["default"].createElement(_Settings.Settings, {
27
33
  path: "settings/*"
28
- }), /*#__PURE__*/React.createElement(Home, {
34
+ }), /*#__PURE__*/_react["default"].createElement(_Home.Home, {
29
35
  path: "/"
30
- }), /*#__PURE__*/React.createElement(TechBars, {
36
+ }), /*#__PURE__*/_react["default"].createElement(_TechBars.TechBars, {
31
37
  path: "/tech-bars"
32
- }), /*#__PURE__*/React.createElement(AppointmentForm, {
38
+ }), /*#__PURE__*/_react["default"].createElement(_AppointmentForm.AppointmentForm, {
33
39
  path: "/past/appointment/:techBarId/:id"
34
- }), /*#__PURE__*/React.createElement(Past, {
40
+ }), /*#__PURE__*/_react["default"].createElement(_Past.Past, {
35
41
  path: "/past"
36
- }), /*#__PURE__*/React.createElement(AppointmentForm, {
42
+ }), /*#__PURE__*/_react["default"].createElement(_AppointmentForm.AppointmentForm, {
37
43
  path: "/appointment/:techBarId/:id"
38
- }), /*#__PURE__*/React.createElement(AppointmentForm, {
44
+ }), /*#__PURE__*/_react["default"].createElement(_AppointmentForm.AppointmentForm, {
39
45
  path: "/appointment/:techBarId"
40
- }), /*#__PURE__*/React.createElement(AppointmentForm, {
46
+ }), /*#__PURE__*/_react["default"].createElement(_AppointmentForm.AppointmentForm, {
41
47
  path: "/appointment/:id"
42
- }), /*#__PURE__*/React.createElement(AppointmentForm, {
48
+ }), /*#__PURE__*/_react["default"].createElement(_AppointmentForm.AppointmentForm, {
43
49
  path: "/appointment"
44
- }), /*#__PURE__*/React.createElement(Form, {
50
+ }), /*#__PURE__*/_react["default"].createElement(_Form.Form, {
45
51
  path: "/forms/:formSlug/submissions/:id"
46
- }), /*#__PURE__*/React.createElement(Form, {
52
+ }), /*#__PURE__*/_react["default"].createElement(_Form.Form, {
47
53
  path: "/forms/:formSlug"
48
- }), /*#__PURE__*/React.createElement(Display, {
54
+ }), /*#__PURE__*/_react["default"].createElement(_Display.Display, {
49
55
  path: "/display/:techBarId/:mode"
50
- }), /*#__PURE__*/React.createElement(Display, {
56
+ }), /*#__PURE__*/_react["default"].createElement(_Display.Display, {
51
57
  path: "/display/:techBarId"
52
58
  }))))
53
59
  });
54
60
  };
55
-
56
61
  var mapStateToProps = function mapStateToProps(state, props) {
57
62
  return {
58
63
  loading: state.techBarApp.loading,
@@ -60,13 +65,13 @@ var mapStateToProps = function mapStateToProps(state, props) {
60
65
  settingsBackPath: "/kapps/".concat(state.app.kappSlug)
61
66
  };
62
67
  };
63
-
64
68
  var mapDispatchToProps = {
65
- fetchAppDataRequest: actions.fetchAppDataRequest
69
+ fetchAppDataRequest: _techBarApp.actions.fetchAppDataRequest
66
70
  };
67
- var enhance = compose(connect(mapStateToProps, mapDispatchToProps), lifecycle({
71
+ var enhance = (0, _recompose.compose)((0, _store.connect)(mapStateToProps, mapDispatchToProps), (0, _recompose.lifecycle)({
68
72
  componentDidMount: function componentDidMount() {
69
73
  this.props.fetchAppDataRequest();
70
74
  }
71
75
  }));
72
- export var App = enhance(AppComponent);
76
+ var App = enhance(AppComponent);
77
+ exports.App = App;
@@ -1,26 +1,33 @@
1
- import React from 'react';
2
- import { connect } from '../redux/store';
3
- import { compose, withHandlers } from 'recompose';
4
- import { CoreForm, I18n } from '@kineticdata/react';
5
- import { ErrorNotFound, ErrorUnauthorized, ErrorUnexpected } from '@kineticdata/bundle-common';
6
- import { PageTitle } from './shared/PageTitle';
7
- import { APPOINTMENT_FORM_SLUG } from '../constants';
8
- export var AppointmentFormComponent = function AppointmentFormComponent(_ref) {
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.mapStateToProps = exports.handleCreated = exports.handleCompleted = exports.AppointmentFormComponent = exports.AppointmentForm = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _store = require("../redux/store");
10
+ var _recompose = require("recompose");
11
+ var _react2 = require("@kineticdata/react");
12
+ var _bundleCommon = require("@kineticdata/bundle-common");
13
+ var _PageTitle = require("./shared/PageTitle");
14
+ var _constants = require("../constants");
15
+ var AppointmentFormComponent = function AppointmentFormComponent(_ref) {
9
16
  var techBarId = _ref.techBarId,
10
- id = _ref.id,
11
- techBar = _ref.techBar,
12
- past = _ref.past,
13
- relativeHomePath = _ref.relativeHomePath,
14
- handleCreated = _ref.handleCreated,
15
- handleCompleted = _ref.handleCompleted,
16
- handleLoaded = _ref.handleLoaded,
17
- handleDelete = _ref.handleDelete,
18
- kappSlug = _ref.kappSlug;
19
- return /*#__PURE__*/React.createElement("div", {
17
+ id = _ref.id,
18
+ techBar = _ref.techBar,
19
+ past = _ref.past,
20
+ relativeHomePath = _ref.relativeHomePath,
21
+ handleCreated = _ref.handleCreated,
22
+ handleCompleted = _ref.handleCompleted,
23
+ handleLoaded = _ref.handleLoaded,
24
+ handleDelete = _ref.handleDelete,
25
+ kappSlug = _ref.kappSlug;
26
+ return /*#__PURE__*/_react["default"].createElement("div", {
20
27
  className: "page-container page-container--tech-bar page-container-lg"
21
- }, /*#__PURE__*/React.createElement("div", {
28
+ }, /*#__PURE__*/_react["default"].createElement("div", {
22
29
  className: "page-panel"
23
- }, /*#__PURE__*/React.createElement(PageTitle, {
30
+ }, /*#__PURE__*/_react["default"].createElement(_PageTitle.PageTitle, {
24
31
  parts: ['Appointment'],
25
32
  breadcrumbs: [{
26
33
  label: 'Home',
@@ -32,31 +39,32 @@ export var AppointmentFormComponent = function AppointmentFormComponent(_ref) {
32
39
  label: 'Past Appointments',
33
40
  to: "".concat(relativeHomePath, "past")
34
41
  }],
35
- title: techBar && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(I18n, null, techBar.values['Name']), ' ', /*#__PURE__*/React.createElement("small", null, /*#__PURE__*/React.createElement(I18n, null, "Appointment")))
36
- }), techBar ? /*#__PURE__*/React.createElement(I18n, {
37
- context: "kapps.".concat(kappSlug, ".forms.").concat(APPOINTMENT_FORM_SLUG)
38
- }, /*#__PURE__*/React.createElement("div", {
42
+ title: techBar && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, techBar.values['Name']), ' ', /*#__PURE__*/_react["default"].createElement("small", null, /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, "Appointment")))
43
+ }), techBar ? /*#__PURE__*/_react["default"].createElement(_react2.I18n, {
44
+ context: "kapps.".concat(kappSlug, ".forms.").concat(_constants.APPOINTMENT_FORM_SLUG)
45
+ }, /*#__PURE__*/_react["default"].createElement("div", {
39
46
  className: "embedded-core-form--wrapper"
40
- }, id ? /*#__PURE__*/React.createElement(CoreForm, {
47
+ }, id ? /*#__PURE__*/_react["default"].createElement(_react2.CoreForm, {
41
48
  submission: id,
42
49
  review: true,
43
50
  loaded: handleLoaded,
44
51
  completed: handleCompleted
45
- }) : /*#__PURE__*/React.createElement(CoreForm, {
52
+ }) : /*#__PURE__*/_react["default"].createElement(_react2.CoreForm, {
46
53
  kapp: kappSlug,
47
- form: APPOINTMENT_FORM_SLUG,
54
+ form: _constants.APPOINTMENT_FORM_SLUG,
48
55
  loaded: handleLoaded,
49
56
  created: handleCreated,
50
57
  completed: handleCompleted,
51
58
  values: {
52
59
  'Scheduler Id': techBar.values['Id']
53
60
  },
54
- notFoundComponent: ErrorNotFound,
55
- unauthorizedComponent: ErrorUnauthorized,
56
- unexpectedErrorComponent: ErrorUnexpected
57
- }))) : /*#__PURE__*/React.createElement(ErrorNotFound, null)));
61
+ notFoundComponent: _bundleCommon.ErrorNotFound,
62
+ unauthorizedComponent: _bundleCommon.ErrorUnauthorized,
63
+ unexpectedErrorComponent: _bundleCommon.ErrorUnexpected
64
+ }))) : /*#__PURE__*/_react["default"].createElement(_bundleCommon.ErrorNotFound, null)));
58
65
  };
59
- export var handleCompleted = function handleCompleted(props) {
66
+ exports.AppointmentFormComponent = AppointmentFormComponent;
67
+ var handleCompleted = function handleCompleted(props) {
60
68
  return function (response) {
61
69
  // Check if either currentPage is null (pre form consolidation) or
62
70
  // displayedPage.type is not 'confirmation' (post form-consolidation)
@@ -66,12 +74,14 @@ export var handleCompleted = function handleCompleted(props) {
66
74
  }
67
75
  };
68
76
  };
69
- export var handleCreated = function handleCreated(props) {
77
+ exports.handleCompleted = handleCompleted;
78
+ var handleCreated = function handleCreated(props) {
70
79
  return function (response) {
71
80
  props.navigate(response.submission.coreState === 'Submitted' ? "/kapps/".concat(props.kappSlug) : response.submission.id);
72
81
  };
73
82
  };
74
- export var mapStateToProps = function mapStateToProps(state, props) {
83
+ exports.handleCreated = handleCreated;
84
+ var mapStateToProps = function mapStateToProps(state, props) {
75
85
  var past = !!props.path.match(/^\/past/);
76
86
  var relativeHomePath = "../".concat(props.techBarId ? '../' : '').concat(props.id ? '../' : '').concat(past ? '../' : '');
77
87
  return {
@@ -83,8 +93,10 @@ export var mapStateToProps = function mapStateToProps(state, props) {
83
93
  relativeHomePath: relativeHomePath
84
94
  };
85
95
  };
86
- var enhance = compose(connect(mapStateToProps), withHandlers({
96
+ exports.mapStateToProps = mapStateToProps;
97
+ var enhance = (0, _recompose.compose)((0, _store.connect)(mapStateToProps), (0, _recompose.withHandlers)({
87
98
  handleCompleted: handleCompleted,
88
99
  handleCreated: handleCreated
89
100
  }));
90
- export var AppointmentForm = enhance(AppointmentFormComponent);
101
+ var AppointmentForm = enhance(AppointmentFormComponent);
102
+ exports.AppointmentForm = AppointmentForm;
@@ -1,78 +1,86 @@
1
- import React, { Fragment } from 'react';
2
- import { connect } from '../redux/store';
3
- import { compose, withHandlers, withState, withProps } from 'recompose';
4
- import { ErrorNotFound, ErrorUnauthorized, ErrorUnexpected, TaskActions, addToastAlert } from '@kineticdata/bundle-common';
5
- import { DisplayTabs } from './Display';
6
- import { TIME_FORMAT } from '../constants';
7
- import { actions } from '../redux/modules/appointments';
8
- import moment from 'moment';
9
- import { CoreForm, Moment, I18n } from '@kineticdata/react';
10
- export var CheckInComponent = function CheckInComponent(_ref) {
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard")["default"];
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.mapStateToProps = exports.mapDispatchToProps = exports.CheckInComponent = exports.CheckIn = void 0;
9
+ var _react = _interopRequireWildcard(require("react"));
10
+ var _store = require("../redux/store");
11
+ var _recompose = require("recompose");
12
+ var _bundleCommon = require("@kineticdata/bundle-common");
13
+ var _Display = require("./Display");
14
+ var _constants = require("../constants");
15
+ var _appointments = require("../redux/modules/appointments");
16
+ var _moment = _interopRequireDefault(require("moment"));
17
+ var _react2 = require("@kineticdata/react");
18
+ var CheckInComponent = function CheckInComponent(_ref) {
11
19
  var crosslink = _ref.crosslink,
12
- kapp = _ref.kapp,
13
- techBarId = _ref.techBarId,
14
- techBar = _ref.techBar,
15
- appointments = _ref.appointments,
16
- error = _ref.error,
17
- showDetails = _ref.showDetails,
18
- toggleShowDetails = _ref.toggleShowDetails,
19
- input = _ref.input,
20
- setInput = _ref.setInput,
21
- getFilteredAppointments = _ref.getFilteredAppointments;
20
+ kapp = _ref.kapp,
21
+ techBarId = _ref.techBarId,
22
+ techBar = _ref.techBar,
23
+ appointments = _ref.appointments,
24
+ error = _ref.error,
25
+ showDetails = _ref.showDetails,
26
+ toggleShowDetails = _ref.toggleShowDetails,
27
+ input = _ref.input,
28
+ setInput = _ref.setInput,
29
+ getFilteredAppointments = _ref.getFilteredAppointments;
22
30
  var filteredAppointments = showDetails === 'appointment' && input.length > 2 ? getFilteredAppointments() : null;
23
- return /*#__PURE__*/React.createElement("section", {
31
+ return /*#__PURE__*/_react["default"].createElement("section", {
24
32
  className: "tech-bar-display tech-bar-display--checkin"
25
- }, !showDetails ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
33
+ }, !showDetails ? /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
26
34
  className: "full-screen-container"
27
- }, crosslink && /*#__PURE__*/React.createElement(DisplayTabs, {
35
+ }, crosslink && /*#__PURE__*/_react["default"].createElement(_Display.DisplayTabs, {
28
36
  techBarId: techBarId,
29
37
  checkInClassName: 'bg-dark',
30
38
  onClick: function onClick() {
31
39
  return toggleShowDetails(null);
32
40
  }
33
- }), /*#__PURE__*/React.createElement("div", {
41
+ }), /*#__PURE__*/_react["default"].createElement("div", {
34
42
  className: "header bg-dark"
35
- }), /*#__PURE__*/React.createElement("div", {
43
+ }), /*#__PURE__*/_react["default"].createElement("div", {
36
44
  className: "body"
37
- }, /*#__PURE__*/React.createElement("div", {
45
+ }, /*#__PURE__*/_react["default"].createElement("div", {
38
46
  className: "form"
39
- }, /*#__PURE__*/React.createElement("button", {
47
+ }, /*#__PURE__*/_react["default"].createElement("button", {
40
48
  type: "button",
41
49
  className: "btn btn--checkin btn-success",
42
50
  onClick: function onClick() {
43
51
  return toggleShowDetails('appointment');
44
52
  }
45
- }, /*#__PURE__*/React.createElement(I18n, null, "I have an appointment")), techBar.settings.allowWalkIns && /*#__PURE__*/React.createElement("button", {
53
+ }, /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, "I have an appointment")), techBar.settings.allowWalkIns && /*#__PURE__*/_react["default"].createElement("button", {
46
54
  type: "button",
47
55
  className: "btn btn--checkin btn-info",
48
56
  onClick: function onClick() {
49
57
  return toggleShowDetails('walkin');
50
58
  }
51
- }, /*#__PURE__*/React.createElement(I18n, null, "I am a walk-in")))))) : /*#__PURE__*/React.createElement(Fragment, null, showDetails === 'appointment' && /*#__PURE__*/React.createElement("div", {
59
+ }, /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, "I am a walk-in")))))) : /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, showDetails === 'appointment' && /*#__PURE__*/_react["default"].createElement("div", {
52
60
  className: "full-screen-container"
53
- }, crosslink && /*#__PURE__*/React.createElement(DisplayTabs, {
61
+ }, crosslink && /*#__PURE__*/_react["default"].createElement(_Display.DisplayTabs, {
54
62
  techBarId: techBarId,
55
63
  checkInClassName: 'bg-success',
56
64
  onClick: function onClick() {
57
65
  return toggleShowDetails(null);
58
66
  }
59
- }), /*#__PURE__*/React.createElement("div", {
67
+ }), /*#__PURE__*/_react["default"].createElement("div", {
60
68
  className: "header bg-success"
61
- }), /*#__PURE__*/React.createElement("div", {
69
+ }), /*#__PURE__*/_react["default"].createElement("div", {
62
70
  className: "body"
63
- }, /*#__PURE__*/React.createElement("h1", null, /*#__PURE__*/React.createElement(I18n, null, "I have an appointment"), /*#__PURE__*/React.createElement("button", {
71
+ }, /*#__PURE__*/_react["default"].createElement("h1", null, /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, "I have an appointment"), /*#__PURE__*/_react["default"].createElement("button", {
64
72
  type: "button",
65
73
  className: "btn btn-outline-danger",
66
74
  onClick: function onClick() {
67
75
  return toggleShowDetails(null);
68
76
  }
69
- }, /*#__PURE__*/React.createElement(I18n, null, "Cancel"))), /*#__PURE__*/React.createElement("div", {
77
+ }, /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, "Cancel"))), /*#__PURE__*/_react["default"].createElement("div", {
70
78
  className: "form"
71
- }, /*#__PURE__*/React.createElement("div", {
79
+ }, /*#__PURE__*/_react["default"].createElement("div", {
72
80
  className: "form-group"
73
- }, /*#__PURE__*/React.createElement("label", {
81
+ }, /*#__PURE__*/_react["default"].createElement("label", {
74
82
  htmlFor: "appointment-search-input"
75
- }, /*#__PURE__*/React.createElement(I18n, null, "Find Appointment by Name or Email")), /*#__PURE__*/React.createElement("input", {
83
+ }, /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, "Find Appointment by Name or Email")), /*#__PURE__*/_react["default"].createElement("input", {
76
84
  type: "text",
77
85
  name: "appointment-search-input",
78
86
  id: "appointment-search-input",
@@ -82,24 +90,24 @@ export var CheckInComponent = function CheckInComponent(_ref) {
82
90
  onChange: function onChange(e) {
83
91
  return setInput(e.target.value);
84
92
  }
85
- }))), filteredAppointments && /*#__PURE__*/React.createElement("div", {
93
+ }))), filteredAppointments && /*#__PURE__*/_react["default"].createElement("div", {
86
94
  className: "form-group"
87
95
  }, filteredAppointments.map(function (appt) {
88
- return /*#__PURE__*/React.createElement("div", {
96
+ return /*#__PURE__*/_react["default"].createElement("div", {
89
97
  className: "tech-bar-appointment-card",
90
98
  key: appt.id
91
- }, /*#__PURE__*/React.createElement("div", {
99
+ }, /*#__PURE__*/_react["default"].createElement("div", {
92
100
  className: "details"
93
- }, /*#__PURE__*/React.createElement("div", null, appt.values['Requested For Display Name']), /*#__PURE__*/React.createElement("div", {
101
+ }, /*#__PURE__*/_react["default"].createElement("div", null, appt.values['Requested For Display Name']), /*#__PURE__*/_react["default"].createElement("div", {
94
102
  className: "text-muted"
95
- }, /*#__PURE__*/React.createElement(Moment, {
96
- timestamp: moment(appt.values['Event Time'], TIME_FORMAT),
97
- format: Moment.formats.time
98
- }), ' - ', /*#__PURE__*/React.createElement(I18n, null, appt.values['Event Type']))), /*#__PURE__*/React.createElement("button", {
103
+ }, /*#__PURE__*/_react["default"].createElement(_react2.Moment, {
104
+ timestamp: (0, _moment["default"])(appt.values['Event Time'], _constants.TIME_FORMAT),
105
+ format: _react2.Moment.formats.time
106
+ }), ' - ', /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, appt.values['Event Type']))), /*#__PURE__*/_react["default"].createElement("button", {
99
107
  type: "button",
100
108
  className: "btn btn-primary",
101
109
  onClick: function onClick() {
102
- return TaskActions.createAction({
110
+ return _bundleCommon.TaskActions.createAction({
103
111
  action: "Tech Bar Check In - ".concat(appt.values['Scheduler Id']),
104
112
  type: 'submission',
105
113
  operation: 'update',
@@ -111,7 +119,7 @@ export var CheckInComponent = function CheckInComponent(_ref) {
111
119
  },
112
120
  successCallback: function successCallback() {
113
121
  toggleShowDetails(null);
114
- addToastAlert({
122
+ (0, _bundleCommon.addToastAlert)({
115
123
  severity: 'success',
116
124
  title: "".concat(appt.values['Requested For Display Name'], " has been successfully checked in."),
117
125
  duration: 5000
@@ -119,41 +127,41 @@ export var CheckInComponent = function CheckInComponent(_ref) {
119
127
  },
120
128
  errorCallback: function errorCallback() {
121
129
  toggleShowDetails(null);
122
- addToastAlert({
130
+ (0, _bundleCommon.addToastAlert)({
123
131
  title: 'There was an error while checking you in.',
124
132
  duration: 5000
125
133
  });
126
134
  }
127
135
  });
128
136
  }
129
- }, /*#__PURE__*/React.createElement(I18n, null, "Check In")));
130
- }), filteredAppointments.size === 0 && (!error && !appointments ? /*#__PURE__*/React.createElement("div", {
137
+ }, /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, "Check In")));
138
+ }), filteredAppointments.size === 0 && (!error && !appointments ? /*#__PURE__*/_react["default"].createElement("div", {
131
139
  className: "text-center"
132
- }, /*#__PURE__*/React.createElement("span", {
140
+ }, /*#__PURE__*/_react["default"].createElement("span", {
133
141
  className: "fa fa-spinner fa-spin"
134
- })) : /*#__PURE__*/React.createElement("div", {
142
+ })) : /*#__PURE__*/_react["default"].createElement("div", {
135
143
  className: "alert alert-warning text-center"
136
- }, /*#__PURE__*/React.createElement(I18n, null, "No appointments found.")))))), showDetails === 'walkin' && /*#__PURE__*/React.createElement("div", {
144
+ }, /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, "No appointments found.")))))), showDetails === 'walkin' && /*#__PURE__*/_react["default"].createElement("div", {
137
145
  className: "full-screen-container"
138
- }, crosslink && /*#__PURE__*/React.createElement(DisplayTabs, {
146
+ }, crosslink && /*#__PURE__*/_react["default"].createElement(_Display.DisplayTabs, {
139
147
  techBarId: techBarId,
140
148
  checkInClassName: 'bg-info',
141
149
  onClick: function onClick() {
142
150
  return toggleShowDetails(null);
143
151
  }
144
- }), /*#__PURE__*/React.createElement("div", {
152
+ }), /*#__PURE__*/_react["default"].createElement("div", {
145
153
  className: "header bg-info"
146
- }), /*#__PURE__*/React.createElement("div", {
154
+ }), /*#__PURE__*/_react["default"].createElement("div", {
147
155
  className: "body form-unstyled"
148
- }, /*#__PURE__*/React.createElement("h1", null, /*#__PURE__*/React.createElement(I18n, null, "I am a walk-in"), /*#__PURE__*/React.createElement("button", {
156
+ }, /*#__PURE__*/_react["default"].createElement("h1", null, /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, "I am a walk-in"), /*#__PURE__*/_react["default"].createElement("button", {
149
157
  type: "button",
150
158
  className: "btn btn-outline-danger",
151
159
  onClick: function onClick() {
152
160
  return toggleShowDetails(null);
153
161
  }
154
- }, /*#__PURE__*/React.createElement(I18n, null, "Cancel"))), /*#__PURE__*/React.createElement(I18n, {
162
+ }, /*#__PURE__*/_react["default"].createElement(_react2.I18n, null, "Cancel"))), /*#__PURE__*/_react["default"].createElement(_react2.I18n, {
155
163
  context: "kapps.".concat(kapp.slug, ".forms.walk-in")
156
- }, /*#__PURE__*/React.createElement(CoreForm, {
164
+ }, /*#__PURE__*/_react["default"].createElement(_react2.CoreForm, {
157
165
  className: "body",
158
166
  kapp: kapp.slug,
159
167
  form: "walk-in",
@@ -162,38 +170,39 @@ export var CheckInComponent = function CheckInComponent(_ref) {
162
170
  },
163
171
  completed: function completed() {
164
172
  toggleShowDetails(null);
165
- addToastAlert({
173
+ (0, _bundleCommon.addToastAlert)({
166
174
  severity: 'success',
167
175
  title: 'You have successfully checked in.',
168
176
  duration: 5000
169
177
  });
170
178
  },
171
- notFoundComponent: ErrorNotFound,
172
- unauthorizedComponent: ErrorUnauthorized,
173
- unexpectedErrorComponent: ErrorUnexpected
179
+ notFoundComponent: _bundleCommon.ErrorNotFound,
180
+ unauthorizedComponent: _bundleCommon.ErrorUnauthorized,
181
+ unexpectedErrorComponent: _bundleCommon.ErrorUnexpected
174
182
  }))))));
175
183
  };
176
- export var mapStateToProps = function mapStateToProps(state, props) {
184
+ exports.CheckInComponent = CheckInComponent;
185
+ var mapStateToProps = function mapStateToProps(state, props) {
177
186
  return {
178
187
  kapp: state.app.kapp,
179
188
  error: state.appointments.error,
180
189
  appointments: state.appointments.today
181
190
  };
182
191
  };
183
- export var mapDispatchToProps = {
184
- fetchTodayAppointmentsRequest: actions.fetchTodayAppointmentsRequest
192
+ exports.mapStateToProps = mapStateToProps;
193
+ var mapDispatchToProps = {
194
+ fetchTodayAppointmentsRequest: _appointments.actions.fetchTodayAppointmentsRequest
185
195
  };
186
-
196
+ exports.mapDispatchToProps = mapDispatchToProps;
187
197
  var toggleShowDetails = function toggleShowDetails(_ref2) {
188
198
  var showDetails = _ref2.showDetails,
189
- setShowDetails = _ref2.setShowDetails,
190
- setInput = _ref2.setInput,
191
- fetchTodayAppointmentsRequest = _ref2.fetchTodayAppointmentsRequest,
192
- techBarId = _ref2.techBarId;
199
+ setShowDetails = _ref2.setShowDetails,
200
+ setInput = _ref2.setInput,
201
+ fetchTodayAppointmentsRequest = _ref2.fetchTodayAppointmentsRequest,
202
+ techBarId = _ref2.techBarId;
193
203
  return function (name) {
194
204
  setShowDetails(showDetails === name ? null : name);
195
205
  setInput('');
196
-
197
206
  if (name === 'appointment') {
198
207
  fetchTodayAppointmentsRequest({
199
208
  schedulerId: techBarId,
@@ -202,23 +211,22 @@ var toggleShowDetails = function toggleShowDetails(_ref2) {
202
211
  }
203
212
  };
204
213
  };
205
-
206
214
  var getFilteredAppointments = function getFilteredAppointments(_ref3) {
207
215
  var input = _ref3.input,
208
- appointments = _ref3.appointments;
216
+ appointments = _ref3.appointments;
209
217
  return function () {
210
218
  return appointments ? appointments.filter(function (appt) {
211
219
  return appt.values['Requested For Display Name'].toLowerCase().includes(input.toLowerCase()) || appt.values['Requested For'].toLowerCase().includes(input.toLowerCase());
212
220
  }) : null;
213
221
  };
214
222
  };
215
-
216
- export var CheckIn = compose(withProps(function (_ref4) {
223
+ var CheckIn = (0, _recompose.compose)((0, _recompose.withProps)(function (_ref4) {
217
224
  var techBar = _ref4.techBar;
218
225
  return {
219
226
  techBarId: techBar.values['Id']
220
227
  };
221
- }), connect(mapStateToProps, mapDispatchToProps), withState('showDetails', 'setShowDetails', null), withState('input', 'setInput', ''), withHandlers({
228
+ }), (0, _store.connect)(mapStateToProps, mapDispatchToProps), (0, _recompose.withState)('showDetails', 'setShowDetails', null), (0, _recompose.withState)('input', 'setInput', ''), (0, _recompose.withHandlers)({
222
229
  toggleShowDetails: toggleShowDetails,
223
230
  getFilteredAppointments: getFilteredAppointments
224
- }))(CheckInComponent);
231
+ }))(CheckInComponent);
232
+ exports.CheckIn = CheckIn;