@configuratorware/configurator-frontendgui 1.56.2 → 1.56.4

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 (155) hide show
  1. package/App/Error/ErrorBoundary.js +8 -6
  2. package/App/Frame.js +8 -6
  3. package/App/Modules/Creator/Components/ConfigurationvariantItem/index.js +10 -8
  4. package/App/Modules/Creator/Components/ConfigurationvariantSelection/index.js +10 -8
  5. package/App/Modules/Creator/Components/CustomTitleEditor/index.js +10 -8
  6. package/App/Modules/Creator/Components/ExternalVisualization/index.js +9 -7
  7. package/App/Modules/Creator/Components/FastConfigurationRow/index.js +8 -6
  8. package/App/Modules/Creator/Components/FastConfigurationSelect/index.js +8 -6
  9. package/App/Modules/Creator/Components/FullScreenView/FullScreenView.js +11 -10
  10. package/App/Modules/Creator/Components/Incompatibility/OptionExclusionRule/index.js +8 -6
  11. package/App/Modules/Creator/Components/Incompatibility/OptionRule/index.js +8 -6
  12. package/App/Modules/Creator/Components/Incompatibility/RuleComponent.js +9 -7
  13. package/App/Modules/Creator/Components/Incompatibility/index.js +9 -8
  14. package/App/Modules/Creator/Components/Option/index.js +1 -0
  15. package/App/Modules/Creator/Components/OptionAmount/index.js +14 -6
  16. package/App/Modules/Creator/Components/Optiondetail/ZoomImage/index.js +7 -6
  17. package/App/Modules/Creator/Components/Optiondetail/index.js +17 -15
  18. package/App/Modules/Creator/Components/OptionsList/index.js +12 -11
  19. package/App/Modules/Creator/Components/Price/index.js +8 -6
  20. package/App/Modules/Creator/Components/ProductPart/index.js +8 -7
  21. package/App/Modules/Creator/Components/Tools/index.js +8 -6
  22. package/App/Modules/Creator/Layouts/DefaultLayout.js +30 -28
  23. package/App/Modules/Designer/Components/AddGalleryImage/index.js +11 -9
  24. package/App/Modules/Designer/Components/AddGalleryImage/index.story.js +4 -4
  25. package/App/Modules/Designer/Components/AddGalleryImage/index.test.js +6 -6
  26. package/App/Modules/Designer/Components/AddVisualElement/index.js +8 -6
  27. package/App/Modules/Designer/Components/AddVisualElement/index.test.js +3 -3
  28. package/App/Modules/Designer/Components/CloseDesignEditor/index.js +8 -6
  29. package/App/Modules/Designer/Components/CloseGraphicsEditorButton/index.js +5 -4
  30. package/App/Modules/Designer/Components/ColorPalettes/index.js +26 -21
  31. package/App/Modules/Designer/Components/ColorPalettes/index.test.js +3 -3
  32. package/App/Modules/Designer/Components/DesignAreaControlbox/index.js +23 -20
  33. package/App/Modules/Designer/Components/DesignAreaControlbox/index.test.js +7 -7
  34. package/App/Modules/Designer/Components/Dialog/index.js +13 -10
  35. package/App/Modules/Designer/Components/FeedbackNotice/index.js +9 -7
  36. package/App/Modules/Designer/Components/FeedbackNotice/index.test.js +1 -1
  37. package/App/Modules/Designer/Components/FullScreenView/FullScreenView.js +7 -6
  38. package/App/Modules/Designer/Components/ImageColorPicker/ImageColorPicker.js +12 -10
  39. package/App/Modules/Designer/Components/ImageColorize/index.js +39 -29
  40. package/App/Modules/Designer/Components/ImageControlbox/index.js +16 -13
  41. package/App/Modules/Designer/Components/ImageEditDialog/ImageThumbnail.js +24 -14
  42. package/App/Modules/Designer/Components/ImageEditDialog/ImageUpload.js +85 -69
  43. package/App/Modules/Designer/Components/ImageEditDialog/index.js +45 -42
  44. package/App/Modules/Designer/Components/ImageLibraryThumbnail/index.js +9 -7
  45. package/App/Modules/Designer/Components/ObjectTools/index.js +8 -6
  46. package/App/Modules/Designer/Components/Select/index.js +8 -6
  47. package/App/Modules/Designer/Components/TextControlbox/index.js +26 -21
  48. package/App/Modules/Designer/Components/TextControlbox/index.test.js +10 -10
  49. package/App/Modules/Designer/Containers/AddVisualElement.js +21 -11
  50. package/App/Modules/Designer/Containers/ImageEditDialog.js +173 -157
  51. package/App/Modules/Designer/Designer.js +7 -6
  52. package/App/Modules/Designer/Layouts/DefaultLayout.js +20 -17
  53. package/App/Modules/Designer/Layouts/PopupAreaProvider.js +18 -15
  54. package/App/Modules/Designer/Utils/Transformers.js +23 -13
  55. package/App/Modules/Designer/setupDesigner.js +27 -16
  56. package/App/Modules/Designer/withActiveCanvas.js +10 -8
  57. package/App/Modules/Visualization/AlignTargetContainer.js +1 -0
  58. package/App/Modules/Visualization/CreatorAlignTarget.js +12 -11
  59. package/App/Modules/Visualization/DefaultVisualizationProvider.js +10 -8
  60. package/App/Modules/Visualization/DesignerAlignTarget.js +10 -9
  61. package/App/Reducers/Actions.js +44 -36
  62. package/App/Reducers/Configurator/Actions.js +92 -78
  63. package/App/Reducers/Configurator/Selectors.js +5 -5
  64. package/App/Reducers/Confirm/Actions.js +16 -6
  65. package/App/Reducers/DesignArea/Selectors.js +2 -1
  66. package/App/Reducers/ImageGallery/Actions.js +31 -18
  67. package/App/Reducers/ImageGallery/Reducer.js +1 -0
  68. package/App/Reducers/ImageGallery/Selectors.js +1 -0
  69. package/App/Reducers/UI/Actions.js +40 -26
  70. package/App/Routing.js +8 -6
  71. package/App/Screens/Configurator/Components/AmountSelection/index.js +11 -9
  72. package/App/Screens/Configurator/Components/CalculationWidget/index.js +19 -17
  73. package/App/Screens/Configurator/Components/CalculationWidget/index.test.js +8 -8
  74. package/App/Screens/Configurator/Components/Confirm/index.js +8 -6
  75. package/App/Screens/Configurator/Components/Error/index.js +9 -7
  76. package/App/Screens/Configurator/Components/FullScreenView/index.js +24 -21
  77. package/App/Screens/Configurator/Components/FullScreenView/index.test.js +2 -2
  78. package/App/Screens/Configurator/Components/ItemTile/ItemTile.js +13 -5
  79. package/App/Screens/Configurator/Components/PreviewPortal/index.js +10 -8
  80. package/App/Screens/Configurator/Components/Thumbnail/index.js +27 -24
  81. package/App/Screens/Configurator/Components/Thumbnail/index.test.js +2 -2
  82. package/App/Screens/Configurator/Containers/AmountPrice.js +6 -5
  83. package/App/Screens/Configurator/Containers/ConfigurationModeSwitch.js +19 -10
  84. package/App/Screens/DesignerProductPreview/DesignerProductPreviewManager.js +88 -73
  85. package/App/Screens/DesignerProductPreview/Screen.js +21 -14
  86. package/App/Screens/ItemOverview/Components/ItemOverview.js +47 -32
  87. package/App/ServiceLocator.js +4 -2
  88. package/App/Services/AdminareaCommunicationService.js +24 -14
  89. package/App/Services/AnalyticsService.js +48 -47
  90. package/App/Services/ConfiguratorService.js +142 -121
  91. package/App/Services/DesignDataService.js +619 -555
  92. package/App/Services/DesignerService.js +100 -79
  93. package/App/Services/InteractionService.js +236 -210
  94. package/App/Services/UIService.js +10 -7
  95. package/App/Services/VisualizationService.js +104 -86
  96. package/App/Shared/Components/AcceptDesign/index.js +19 -16
  97. package/App/Shared/Components/AcceptPrivacy/index.js +8 -6
  98. package/App/Shared/Components/AddToBasket/index.js +8 -6
  99. package/App/Shared/Components/AlertDialog/index.js +9 -7
  100. package/App/Shared/Components/AmountInput/index.js +24 -21
  101. package/App/Shared/Components/AmountPrice/index.js +128 -115
  102. package/App/Shared/Components/AmountPrice/index.test.js +5 -5
  103. package/App/Shared/Components/BulkNames/index.js +8 -6
  104. package/App/Shared/Components/ConfigurationOverview/index.js +8 -6
  105. package/App/Shared/Components/InformationTag/InformationTag.js +11 -9
  106. package/App/Shared/Components/LicenseNotice/LicenseNotice.js +8 -6
  107. package/App/Shared/Components/LoadConfiguration/index.js +9 -7
  108. package/App/Shared/Components/Notification/index.js +8 -6
  109. package/App/Shared/Components/PdfDownload/index.js +25 -15
  110. package/App/Shared/Components/PriceList/index.js +16 -13
  111. package/App/Shared/Components/PriceOverview/index.js +13 -10
  112. package/App/Shared/Components/ProductVariant/index.js +25 -22
  113. package/App/Shared/Components/ProductVariant/index.story.js +1 -0
  114. package/App/Shared/Components/ReceiveOfferForm/index.js +12 -10
  115. package/App/Shared/Components/ReceiveOfferForm/index.test.js +2 -2
  116. package/App/Shared/Components/SaveConfiguration/index.js +32 -22
  117. package/App/Shared/Components/Stepper/index.js +10 -8
  118. package/App/Shared/Components/ToolbarList/index.js +11 -9
  119. package/App/Shared/Components/VariantChooser/index.js +13 -10
  120. package/App/Shared/Containers/BulkNames.js +15 -13
  121. package/App/Shared/Containers/Header/index.js +15 -7
  122. package/App/Shared/Containers/LoadConfiguration/LoadConfiguration.js +22 -15
  123. package/App/Shared/Containers/ProductVariant/ProductVariant.js +23 -15
  124. package/App/Translations.js +56 -40
  125. package/App/Utils/Request/lazyFetch.js +27 -19
  126. package/App/configuration.js +4 -0
  127. package/App/index.js +24 -14
  128. package/Framework/Api.js +2 -1
  129. package/Framework/ComponentContainer.js +14 -11
  130. package/Framework/Components/Carousel/index.js +13 -11
  131. package/Framework/Components/Dialog/index.js +35 -33
  132. package/Framework/Components/DialogSelect/index.js +19 -16
  133. package/Framework/Components/Input/index.js +12 -10
  134. package/Framework/CustomError.js +6 -5
  135. package/Framework/Helpers/TransitionDetect.js +2 -1
  136. package/Framework/Services/AbstractAdminareaCommunicationService.js +2 -1
  137. package/Framework/Services/AbstractAsyncService.js +2 -1
  138. package/Framework/Services/AbstractConfiguratorService.js +2 -1
  139. package/Framework/Services/AbstractInteractionService.js +2 -1
  140. package/Framework/Services/AbstractStoreService.js +2 -1
  141. package/Framework/Services/AbstractUIService.js +2 -1
  142. package/Framework/Services/AbstractVisualizationService.js +2 -1
  143. package/Framework/Services/AsyncService.js +8 -6
  144. package/Framework/Services/StoreService.js +27 -17
  145. package/Framework/bindDecorator.js +7 -6
  146. package/Framework/i18n.js +10 -8
  147. package/Shared/ErrorTypes/DeferredError.js +6 -5
  148. package/Shared/HOCs/ResizeDetect/ResizeDetect.js +11 -9
  149. package/Utils/Async/AsyncManager.js +30 -20
  150. package/Utils/Async/Deferred.js +4 -2
  151. package/Utils/Decorators/Observable.js +2 -1
  152. package/Utils/Dev/HOCs/withFilePicker.js +10 -8
  153. package/Utils/Immutable/set.js +6 -6
  154. package/Utils/Test/mountWithState.js +1 -1
  155. package/package.json +4 -4
package/App/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
@@ -15,8 +16,15 @@ var _Store = require("./Store");
15
16
  var _ServiceLocator = require("./ServiceLocator");
16
17
  var _Translations = require("./Translations");
17
18
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
19
+ function _regeneratorRuntime() { "use strict"; var r = _regenerator(), e = r.m(_regeneratorRuntime), t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; function n(r) { var e = "function" == typeof r && r.constructor; return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); } var o = { "throw": 1, "return": 2, "break": 3, "continue": 3 }; function a(r) { var e, t; return function (n) { e || (e = { stop: function stop() { return t(n.a, 2); }, "catch": function _catch() { return n.v; }, abrupt: function abrupt(r, e) { return t(n.a, o[r], e); }, delegateYield: function delegateYield(r, o, a) { return e.resultName = o, t(n.d, _regeneratorValues(r), a); }, finish: function finish(r) { return t(n.f, r); } }, t = function t(r, _t, o) { n.p = e.prev, n.n = e.next; try { return r(_t, o); } finally { e.next = n.n; } }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; try { return r.call(this, e); } finally { n.p = e.prev, n.n = e.next; } }; } return (_regeneratorRuntime = function _regeneratorRuntime() { return { wrap: function wrap(e, t, n, o) { return r.w(a(e), t, n, o && o.reverse()); }, isGeneratorFunction: n, mark: r.m, awrap: function awrap(r, e) { return new _OverloadYield(r, e); }, AsyncIterator: _regeneratorAsyncIterator, async: function async(r, e, t, o, u) { return (n(e) ? _regeneratorAsyncGen : _regeneratorAsync)(a(r), e, t, o, u); }, keys: _regeneratorKeys, values: _regeneratorValues }; })(); }
20
+ function _regeneratorValues(e) { if (null != e) { var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], r = 0; if (t) return t.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) return { next: function next() { return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e }; } }; } throw new TypeError(_typeof(e) + " is not iterable"); }
21
+ function _regeneratorKeys(e) { var n = Object(e), r = []; for (var t in n) r.unshift(t); return function e() { for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; return e.done = !0, e; }; }
22
+ function _regeneratorAsync(n, e, r, t, o) { var a = _regeneratorAsyncGen(n, e, r, t, o); return a.next().then(function (n) { return n.done ? n.value : a.next(); }); }
23
+ function _regeneratorAsyncGen(r, e, t, o, n) { return new _regeneratorAsyncIterator(_regenerator().w(r, e, t, o), n || Promise); }
24
+ function _regeneratorAsyncIterator(t, e) { function n(r, o, i, f) { try { var c = t[r](o), u = c.value; return u instanceof _OverloadYield ? e.resolve(u.v).then(function (t) { n("next", t, i, f); }, function (t) { n("throw", t, i, f); }) : e.resolve(u).then(function (t) { c.value = t, i(c); }, function (t) { return n("throw", t, i, f); }); } catch (t) { f(t); } } var r; this.next || (_regeneratorDefine2(_regeneratorAsyncIterator.prototype), _regeneratorDefine2(_regeneratorAsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { return this; })), _regeneratorDefine2(this, "_invoke", function (t, o, i) { function f() { return new e(function (e, r) { n(t, i, e, r); }); } return r = r ? r.then(f, f) : f(); }, !0); }
18
25
  function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
19
26
  function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
27
+ function _OverloadYield(e, d) { this.v = e, this.k = d; }
20
28
  function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
21
29
  function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
22
30
  var App = exports.App = function App() {
@@ -28,16 +36,17 @@ var languageInitPromise = exports.languageInitPromise = (0, _Translations.initLa
28
36
  store: _Store.store
29
37
  });
30
38
  var render = exports.render = /*#__PURE__*/function () {
31
- var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
32
- return _regenerator().w(function (_context) {
33
- while (1) switch (_context.n) {
39
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
40
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
41
+ while (1) switch (_context.prev = _context.next) {
34
42
  case 0:
35
- _context.n = 1;
43
+ _context.next = 2;
36
44
  return languageInitPromise;
37
- case 1:
38
- (0, _client.createRoot)(document.getElementById('root')).render(/*#__PURE__*/_react["default"].createElement(App, null));
39
45
  case 2:
40
- return _context.a(2);
46
+ (0, _client.createRoot)(document.getElementById('root')).render( /*#__PURE__*/_react["default"].createElement(App, null));
47
+ case 3:
48
+ case "end":
49
+ return _context.stop();
41
50
  }
42
51
  }, _callee);
43
52
  }));
@@ -46,19 +55,20 @@ var render = exports.render = /*#__PURE__*/function () {
46
55
  };
47
56
  }();
48
57
  var main = exports.main = /*#__PURE__*/function () {
49
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
58
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
50
59
  var services;
51
- return _regenerator().w(function (_context2) {
52
- while (1) switch (_context2.n) {
60
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
61
+ while (1) switch (_context2.prev = _context2.next) {
53
62
  case 0:
54
- _context2.n = 1;
63
+ _context2.next = 2;
55
64
  return languageInitPromise;
56
- case 1:
65
+ case 2:
57
66
  services = (0, _initServices.initServices)();
58
67
  _ServiceLocator.Services.store.setStore(_Store.store);
59
68
  services.configurator.initialize();
60
- case 2:
61
- return _context2.a(2);
69
+ case 5:
70
+ case "end":
71
+ return _context2.stop();
62
72
  }
63
73
  }, _callee2);
64
74
  }));
package/Framework/Api.js CHANGED
@@ -31,7 +31,7 @@ var Api = exports.Api = /*#__PURE__*/function () {
31
31
  function Api() {
32
32
  _classCallCheck(this, Api);
33
33
  }
34
- return _createClass(Api, null, [{
34
+ _createClass(Api, null, [{
35
35
  key: "request",
36
36
  value: function request(config, successCb, failCb) {
37
37
  var promise = ax.request(config);
@@ -148,6 +148,7 @@ var Api = exports.Api = /*#__PURE__*/function () {
148
148
  }
149
149
  }
150
150
  }]);
151
+ return Api;
151
152
  }();
152
153
  var isCancelError = exports.isCancelError = function isCancelError(error) {
153
154
  return error instanceof _axios["default"].Cancel;
@@ -14,13 +14,13 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default":
14
14
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
15
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
16
16
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
17
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
18
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
19
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
18
20
  function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
19
21
  function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
20
22
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
21
23
  function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
22
- function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
23
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
24
24
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
25
25
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
26
26
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
@@ -50,17 +50,19 @@ var containerConnect = exports.containerConnect = function containerConnect(mapS
50
50
  return (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps, mergeProps)(ComponentContainer);
51
51
  };
52
52
  var ConnectedProxy = /*#__PURE__*/function (_React$Component) {
53
+ _inherits(ConnectedProxy, _React$Component);
54
+ var _super = _createSuper(ConnectedProxy);
53
55
  function ConnectedProxy() {
54
56
  var _this;
55
57
  _classCallCheck(this, ConnectedProxy);
56
58
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
57
59
  args[_key] = arguments[_key];
58
60
  }
59
- _this = _callSuper(this, ConnectedProxy, [].concat(args));
60
- _defineProperty(_this, "setComponentRef", function (ref) {
61
+ _this = _super.call.apply(_super, [this].concat(args));
62
+ _defineProperty(_assertThisInitialized(_this), "setComponentRef", function (ref) {
61
63
  _this.component = ref;
62
64
  });
63
- _defineProperty(_this, "getProps", function () {
65
+ _defineProperty(_assertThisInitialized(_this), "getProps", function () {
64
66
  // eslint-disable-next-line no-unused-vars
65
67
  var _this$props = _this.props,
66
68
  Component = _this$props.Component,
@@ -69,8 +71,7 @@ var ConnectedProxy = /*#__PURE__*/function (_React$Component) {
69
71
  });
70
72
  return _this;
71
73
  }
72
- _inherits(ConnectedProxy, _React$Component);
73
- return _createClass(ConnectedProxy, [{
74
+ _createClass(ConnectedProxy, [{
74
75
  key: "state",
75
76
  get: function get() {
76
77
  return this.component && this.component.getWrappedInstance().state || {};
@@ -95,19 +96,21 @@ var ConnectedProxy = /*#__PURE__*/function (_React$Component) {
95
96
  }, this.getProps()));
96
97
  }
97
98
  }]);
99
+ return ConnectedProxy;
98
100
  }(_react["default"].Component);
99
101
  var containerConnectProxy = exports.containerConnectProxy = function containerConnectProxy(mapStateToProps, mapDispatchToProps) {
100
102
  var mergeProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : mergeOwnPropsLast;
101
- return /*#__PURE__*/function (_ConnectedProxy2) {
103
+ return /*#__PURE__*/function (_ConnectedProxy) {
104
+ _inherits(ConnectedComponentProxy, _ConnectedProxy);
105
+ var _super2 = _createSuper(ConnectedComponentProxy);
102
106
  function ConnectedComponentProxy(props) {
103
107
  var _this2;
104
108
  _classCallCheck(this, ConnectedComponentProxy);
105
- _this2 = _callSuper(this, ConnectedComponentProxy, [props]);
109
+ _this2 = _super2.call(this, props);
106
110
  var Component = props.Component;
107
111
  _this2.ConnectedComponent = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps, mergeProps)(Component);
108
112
  return _this2;
109
113
  }
110
- _inherits(ConnectedComponentProxy, _ConnectedProxy2);
111
114
  return _createClass(ConnectedComponentProxy);
112
115
  }(ConnectedProxy);
113
116
  };
@@ -18,13 +18,13 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
18
18
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
19
19
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
20
20
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
21
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
21
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
22
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
23
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
22
24
  function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
23
25
  function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
24
26
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
25
27
  function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
26
- function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
27
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
28
28
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
29
29
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
30
30
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
@@ -36,11 +36,13 @@ var styles = function styles(theme) {
36
36
  };
37
37
  };
38
38
  var Carousel = /*#__PURE__*/function (_React$Component) {
39
+ _inherits(Carousel, _React$Component);
40
+ var _super = _createSuper(Carousel);
39
41
  function Carousel(props) {
40
42
  var _this;
41
43
  _classCallCheck(this, Carousel);
42
- _this = _callSuper(this, Carousel, [props]);
43
- _defineProperty(_this, "init", function () {
44
+ _this = _super.call(this, props);
45
+ _defineProperty(_assertThisInitialized(_this), "init", function () {
44
46
  if (!_this.slider || !_this.slider.children) {
45
47
  return;
46
48
  }
@@ -116,7 +118,7 @@ var Carousel = /*#__PURE__*/function (_React$Component) {
116
118
  _this.setState(state);
117
119
  }
118
120
  });
119
- _defineProperty(_this, "next", function () {
121
+ _defineProperty(_assertThisInitialized(_this), "next", function () {
120
122
  var _this$state = _this.state,
121
123
  firstIndex = _this$state.firstIndex,
122
124
  slidesToShow = _this$state.slidesToShow;
@@ -126,7 +128,7 @@ var Carousel = /*#__PURE__*/function (_React$Component) {
126
128
  });
127
129
  }
128
130
  });
129
- _defineProperty(_this, "prev", function () {
131
+ _defineProperty(_assertThisInitialized(_this), "prev", function () {
130
132
  var firstIndex = _this.state.firstIndex;
131
133
  if (firstIndex > 0) {
132
134
  _this.setState({
@@ -134,7 +136,7 @@ var Carousel = /*#__PURE__*/function (_React$Component) {
134
136
  });
135
137
  }
136
138
  });
137
- _defineProperty(_this, "swiped", function (e) {
139
+ _defineProperty(_assertThisInitialized(_this), "swiped", function (e) {
138
140
  // if it's vertical deltaY should be the bigger
139
141
  if (_this.props.vertical && Math.abs(e.deltaY) >= Math.abs(e.deltaX)) {
140
142
  if (e.deltaY > 0) {
@@ -152,7 +154,7 @@ var Carousel = /*#__PURE__*/function (_React$Component) {
152
154
  }
153
155
  }
154
156
  });
155
- _defineProperty(_this, "scrolled", function (e) {
157
+ _defineProperty(_assertThisInitialized(_this), "scrolled", function (e) {
156
158
  e.preventDefault();
157
159
  if (e.deltaX > 0 || e.deltaY < 0 || e.wheelDelta > 0) {
158
160
  _this.prev();
@@ -174,8 +176,7 @@ var Carousel = /*#__PURE__*/function (_React$Component) {
174
176
  _this.children = [];
175
177
  return _this;
176
178
  }
177
- _inherits(Carousel, _React$Component);
178
- return _createClass(Carousel, [{
179
+ _createClass(Carousel, [{
179
180
  key: "componentDidMount",
180
181
  value: function componentDidMount() {
181
182
  this.init();
@@ -250,6 +251,7 @@ var Carousel = /*#__PURE__*/function (_React$Component) {
250
251
  })));
251
252
  }
252
253
  }]);
254
+ return Carousel;
253
255
  }(_react["default"].Component);
254
256
  var _default = exports["default"] = (0, _styles.withStyles)(styles, {
255
257
  name: 'Carousel'
@@ -23,13 +23,13 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
23
23
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
24
24
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
25
25
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
26
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
26
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
27
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
28
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
27
29
  function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
28
30
  function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
29
31
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
30
32
  function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
31
- function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
32
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
33
33
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
34
34
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
35
35
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
@@ -50,14 +50,16 @@ var whichTransitionEvent = function whichTransitionEvent() {
50
50
  };
51
51
  var transitionEvent = whichTransitionEvent();
52
52
  var Dialog = exports["default"] = /*#__PURE__*/function (_React$Component) {
53
+ _inherits(Dialog, _React$Component);
54
+ var _super = _createSuper(Dialog);
53
55
  function Dialog(_props) {
54
56
  var _this;
55
57
  _classCallCheck(this, Dialog);
56
- _this = _callSuper(this, Dialog, [_props]);
57
- _defineProperty(_this, "getParent", function () {
58
+ _this = _super.call(this, _props);
59
+ _defineProperty(_assertThisInitialized(_this), "getParent", function () {
58
60
  return _this.props.parent || _this.dialogContainer.current && _this.dialogContainer.current.parentElement || document.body.firstElementChild;
59
61
  });
60
- _defineProperty(_this, "onContentImageLoaded", function (event) {
62
+ _defineProperty(_assertThisInitialized(_this), "onContentImageLoaded", function (event) {
61
63
  // recalculating position when images are loaded
62
64
  if (event.target.tagName === 'IMG') {
63
65
  _this.imageLoaded = true;
@@ -65,7 +67,7 @@ var Dialog = exports["default"] = /*#__PURE__*/function (_React$Component) {
65
67
  _this.forceUpdate();
66
68
  }
67
69
  });
68
- _defineProperty(_this, "onContentImageError", function (event) {
70
+ _defineProperty(_assertThisInitialized(_this), "onContentImageError", function (event) {
69
71
  // recalculating position when images are loaded
70
72
  if (event.target.tagName === 'IMG') {
71
73
  _this.imageLoaded = false;
@@ -73,7 +75,7 @@ var Dialog = exports["default"] = /*#__PURE__*/function (_React$Component) {
73
75
  _this.forceUpdate();
74
76
  }
75
77
  });
76
- _defineProperty(_this, "calculatePosition", function (props) {
78
+ _defineProperty(_assertThisInitialized(_this), "calculatePosition", function (props) {
77
79
  var _ref = props || _this.props,
78
80
  width = _ref.width,
79
81
  height = _ref.height,
@@ -86,10 +88,10 @@ var Dialog = exports["default"] = /*#__PURE__*/function (_React$Component) {
86
88
  if (relativeTo === 'parent') {
87
89
  relativeTo = parent;
88
90
  }
89
- var _this2 = _this,
90
- dialogContent = _this2.dialogContent,
91
- dialogTitleBar = _this2.dialogTitleBar,
92
- dialog = _this2.dialog;
91
+ var _assertThisInitialize = _assertThisInitialized(_this),
92
+ dialogContent = _assertThisInitialize.dialogContent,
93
+ dialogTitleBar = _assertThisInitialize.dialogTitleBar,
94
+ dialog = _assertThisInitialize.dialog;
93
95
  var dialogStyle = typeof window.getComputedStyle === 'undefined' ? dialog.current.currentStyle : window.getComputedStyle(dialog.current);
94
96
 
95
97
  // read the inner content height
@@ -260,11 +262,11 @@ var Dialog = exports["default"] = /*#__PURE__*/function (_React$Component) {
260
262
  contentHeight: contentHeight
261
263
  });
262
264
  });
263
- _defineProperty(_this, "onCloseClick", function (e) {
265
+ _defineProperty(_assertThisInitialized(_this), "onCloseClick", function (e) {
264
266
  e.stopPropagation();
265
267
  _this.props.onClose && _this.props.onClose();
266
268
  });
267
- _defineProperty(_this, "stopEvent", function (e) {
269
+ _defineProperty(_assertThisInitialized(_this), "stopEvent", function (e) {
268
270
  return e.stopPropagation();
269
271
  });
270
272
  /*detectOrientation = () => {
@@ -276,7 +278,7 @@ var Dialog = exports["default"] = /*#__PURE__*/function (_React$Component) {
276
278
  this.orientation = orientation;
277
279
  }
278
280
  };*/
279
- _defineProperty(_this, "moveStart", function (e) {
281
+ _defineProperty(_assertThisInitialized(_this), "moveStart", function (e) {
280
282
  if (e.target === _this.dialogClose.current) {
281
283
  return;
282
284
  }
@@ -292,7 +294,7 @@ var Dialog = exports["default"] = /*#__PURE__*/function (_React$Component) {
292
294
  }
293
295
  window.addEventListener('mousemove', _this.moveHandler);
294
296
  });
295
- _defineProperty(_this, "moveHandler", function (e) {
297
+ _defineProperty(_assertThisInitialized(_this), "moveHandler", function (e) {
296
298
  var pp = _this.getPointerPosition(e);
297
299
  var lastLeft = _this.offset.left;
298
300
  var lastTop = _this.offset.top;
@@ -309,7 +311,7 @@ var Dialog = exports["default"] = /*#__PURE__*/function (_React$Component) {
309
311
  _this.dialog.current.style.top = position.top + 'px';
310
312
  _this.position = position;
311
313
  });
312
- _defineProperty(_this, "moveEnd", function (e) {
314
+ _defineProperty(_assertThisInitialized(_this), "moveEnd", function (e) {
313
315
  if (e.target === _this.dialogClose.current) {
314
316
  return;
315
317
  }
@@ -336,8 +338,7 @@ var Dialog = exports["default"] = /*#__PURE__*/function (_React$Component) {
336
338
  _this.dialogContent = /*#__PURE__*/_react["default"].createRef();
337
339
  return _this;
338
340
  }
339
- _inherits(Dialog, _React$Component);
340
- return _createClass(Dialog, [{
341
+ _createClass(Dialog, [{
341
342
  key: "componentDidUpdate",
342
343
  value: function componentDidUpdate() {
343
344
  if (this.shouldUpdate) {
@@ -379,7 +380,7 @@ var Dialog = exports["default"] = /*#__PURE__*/function (_React$Component) {
379
380
  }, {
380
381
  key: "componentDidMount",
381
382
  value: function componentDidMount() {
382
- var _this3 = this;
383
+ var _this2 = this;
383
384
  var _this$props = this.props,
384
385
  relativeTo = _this$props.relativeTo,
385
386
  show = _this$props.show;
@@ -390,25 +391,25 @@ var Dialog = exports["default"] = /*#__PURE__*/function (_React$Component) {
390
391
  this.position = this.calculatePosition();
391
392
  this.forceUpdate();
392
393
  this.dialog.current.addEventListener(transitionEvent, function (evt) {
393
- if (evt.target === _this3.dialog.current) {
394
+ if (evt.target === _this2.dialog.current) {
394
395
  // check the position after rendering
395
- var position = _this3.calculatePosition();
396
+ var position = _this2.calculatePosition();
396
397
  // check the position after rendering
397
- if (!(0, _isEqual["default"])(position, _this3.position)) {
398
+ if (!(0, _isEqual["default"])(position, _this2.position)) {
398
399
  // rerender if not correct
399
- _this3.position = position;
400
- _this3.forceUpdate();
400
+ _this2.position = position;
401
+ _this2.forceUpdate();
401
402
  }
402
403
  }
403
404
  });
404
405
  if ('MutationObserver' in window) {
405
406
  var updateIfPositionChanged = function updateIfPositionChanged() {
406
- var position = _this3.calculatePosition();
407
+ var position = _this2.calculatePosition();
407
408
  // check the position after rendering
408
- if (!(0, _isEqual["default"])(position, _this3.position)) {
409
+ if (!(0, _isEqual["default"])(position, _this2.position)) {
409
410
  // rerender if not correct
410
- _this3.position = position;
411
- _this3.forceUpdate();
411
+ _this2.position = position;
412
+ _this2.forceUpdate();
412
413
  }
413
414
  };
414
415
  var updateDebounced = (0, _debounce["default"])(updateIfPositionChanged, 50);
@@ -420,10 +421,10 @@ var Dialog = exports["default"] = /*#__PURE__*/function (_React$Component) {
420
421
  case 'childList':
421
422
  Array.prototype.forEach.call(mutation.target.children, function (child) {
422
423
  if (child.tagName === 'IMG') {
423
- child.removeEventListener('load', _this3.onContentImageLoaded, false);
424
- child.addEventListener('load', _this3.onContentImageLoaded, false);
425
- child.removeEventListener('error', _this3.onContentImageError, false);
426
- child.addEventListener('error', _this3.onContentImageError, false);
424
+ child.removeEventListener('load', _this2.onContentImageLoaded, false);
425
+ child.addEventListener('load', _this2.onContentImageLoaded, false);
426
+ child.removeEventListener('error', _this2.onContentImageError, false);
427
+ child.addEventListener('error', _this2.onContentImageError, false);
427
428
  }
428
429
  });
429
430
  break;
@@ -564,6 +565,7 @@ var Dialog = exports["default"] = /*#__PURE__*/function (_React$Component) {
564
565
  }, /*#__PURE__*/_react["default"].createElement(_Typography["default"], null, children))));
565
566
  }
566
567
  }]);
568
+ return Dialog;
567
569
  }(_react["default"].Component);
568
570
  _defineProperty(Dialog, "defaultProps", {
569
571
  relativePosition: [['center', 'center'], ['center', 'center']],
@@ -14,38 +14,38 @@ var _Dialog = _interopRequireDefault(require("../Dialog"));
14
14
  require("./Styles.scss");
15
15
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
16
16
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
17
- function _readOnlyError(r) { throw new TypeError('"' + r + '" is read-only'); }
18
17
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
19
18
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
20
19
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
21
20
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
22
21
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
23
22
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
24
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
23
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
24
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
25
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
25
26
  function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
26
27
  function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
27
28
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
28
29
  function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
29
- function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
30
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
31
30
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
32
31
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
33
32
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
34
33
  var DialogSelectOption = exports.DialogSelectOption = /*#__PURE__*/function (_React$Component) {
34
+ _inherits(DialogSelectOption, _React$Component);
35
+ var _super = _createSuper(DialogSelectOption);
35
36
  function DialogSelectOption() {
36
37
  var _this;
37
38
  _classCallCheck(this, DialogSelectOption);
38
39
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
39
40
  args[_key] = arguments[_key];
40
41
  }
41
- _this = _callSuper(this, DialogSelectOption, [].concat(args));
42
- _defineProperty(_this, "onSelect", function () {
42
+ _this = _super.call.apply(_super, [this].concat(args));
43
+ _defineProperty(_assertThisInitialized(_this), "onSelect", function () {
43
44
  _this.props.onSelect(_this.props.option);
44
45
  });
45
46
  return _this;
46
47
  }
47
- _inherits(DialogSelectOption, _React$Component);
48
- return _createClass(DialogSelectOption, [{
48
+ _createClass(DialogSelectOption, [{
49
49
  key: "render",
50
50
  value: function render() {
51
51
  var _this$props = this.props,
@@ -59,13 +59,16 @@ var DialogSelectOption = exports.DialogSelectOption = /*#__PURE__*/function (_Re
59
59
  }, renderOption ? renderOption(option) : option.title);
60
60
  }
61
61
  }]);
62
+ return DialogSelectOption;
62
63
  }(_react["default"].Component);
63
64
  var DialogSelect = exports["default"] = /*#__PURE__*/function (_React$Component2) {
65
+ _inherits(DialogSelect, _React$Component2);
66
+ var _super2 = _createSuper(DialogSelect);
64
67
  function DialogSelect(props) {
65
68
  var _this2;
66
69
  _classCallCheck(this, DialogSelect);
67
- _this2 = _callSuper(this, DialogSelect, [props]);
68
- _defineProperty(_this2, "onClickAway", function (e) {
70
+ _this2 = _super2.call(this, props);
71
+ _defineProperty(_assertThisInitialized(_this2), "onClickAway", function (e) {
69
72
  var element = e.target;
70
73
  do {
71
74
  if (element === _this2.control) {
@@ -75,20 +78,20 @@ var DialogSelect = exports["default"] = /*#__PURE__*/function (_React$Component2
75
78
  } while (element);
76
79
  _this2.closeDialog();
77
80
  });
78
- _defineProperty(_this2, "showDialog", function () {
81
+ _defineProperty(_assertThisInitialized(_this2), "showDialog", function () {
79
82
  window.addEventListener('click', _this2.onClickAway, true);
80
83
  _this2.setState({
81
84
  isOpen: true
82
85
  });
83
86
  _this2.props.onFocus && _this2.props.onFocus();
84
87
  });
85
- _defineProperty(_this2, "closeDialog", function () {
88
+ _defineProperty(_assertThisInitialized(_this2), "closeDialog", function () {
86
89
  window.removeEventListener('click', _this2.onClickAway, true);
87
90
  _this2.setState({
88
91
  isOpen: false
89
92
  });
90
93
  });
91
- _defineProperty(_this2, "toggleDialog", function () {
94
+ _defineProperty(_assertThisInitialized(_this2), "toggleDialog", function () {
92
95
  if (_this2.props.disabled) {
93
96
  return;
94
97
  }
@@ -97,7 +100,7 @@ var DialogSelect = exports["default"] = /*#__PURE__*/function (_React$Component2
97
100
  _this2.props.onToggle();
98
101
  }
99
102
  });
100
- _defineProperty(_this2, "onChange", function (option) {
103
+ _defineProperty(_assertThisInitialized(_this2), "onChange", function (option) {
101
104
  _this2.closeDialog();
102
105
  if (!_this2.isSelected(option)) {
103
106
  _this2.props.onChange(option);
@@ -108,8 +111,7 @@ var DialogSelect = exports["default"] = /*#__PURE__*/function (_React$Component2
108
111
  };
109
112
  return _this2;
110
113
  }
111
- _inherits(DialogSelect, _React$Component2);
112
- return _createClass(DialogSelect, [{
114
+ _createClass(DialogSelect, [{
113
115
  key: "isSelected",
114
116
  value: function isSelected(option) {
115
117
  if ((0, _isFunction["default"])(this.props.isSelected)) {
@@ -224,6 +226,7 @@ var DialogSelect = exports["default"] = /*#__PURE__*/function (_React$Component2
224
226
  })));
225
227
  }
226
228
  }]);
229
+ return DialogSelect;
227
230
  }(_react["default"].Component);
228
231
  _defineProperty(DialogSelect, "dialogPositioning", [['left', 'right'], ['top', 'top']]);
229
232
  DialogSelect.defaultProps = {