creevey 0.8.0-beta.0 → 0.8.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 (199) hide show
  1. package/CHANGELOG.md +30 -7
  2. package/README.md +9 -1
  3. package/addon/README.md +3 -0
  4. package/addon/package.json +4 -0
  5. package/docs/config.md +29 -26
  6. package/jest.config.js +6 -0
  7. package/lib/cjs/client/addon/Manager.js +122 -271
  8. package/lib/cjs/client/addon/components/Addon.js +17 -38
  9. package/lib/cjs/client/addon/components/Icons.js +11 -7
  10. package/lib/cjs/client/addon/components/Panel.js +17 -13
  11. package/lib/cjs/client/addon/components/TestSelect.js +11 -9
  12. package/lib/cjs/client/addon/components/Tools.js +21 -40
  13. package/lib/cjs/client/addon/decorator.js +1 -1
  14. package/lib/cjs/client/addon/index.js +31 -0
  15. package/lib/cjs/client/addon/preset.ie11.js +74 -0
  16. package/lib/cjs/client/addon/preset.js +13 -31
  17. package/lib/cjs/client/addon/readyForCapture.js +12 -0
  18. package/lib/cjs/client/addon/register.js +46 -70
  19. package/lib/cjs/client/addon/utils.js +6 -2
  20. package/lib/cjs/client/addon/withCreevey.js +221 -155
  21. package/lib/cjs/client/shared/components/ImagesView/BlendView.js +26 -24
  22. package/lib/cjs/client/shared/components/ImagesView/ImagesView.js +22 -18
  23. package/lib/cjs/client/shared/components/ImagesView/SideBySideView.js +44 -66
  24. package/lib/cjs/client/shared/components/ImagesView/SlideView.js +38 -50
  25. package/lib/cjs/client/shared/components/ImagesView/SwapView.js +26 -45
  26. package/lib/cjs/client/shared/components/ImagesView/index.js +9 -9
  27. package/lib/cjs/client/shared/components/PageFooter/PageFooter.js +12 -8
  28. package/lib/cjs/client/shared/components/PageFooter/Paging.js +14 -18
  29. package/lib/cjs/client/shared/components/PageHeader/ImagePreview.js +22 -18
  30. package/lib/cjs/client/shared/components/PageHeader/PageHeader.js +42 -67
  31. package/lib/cjs/client/shared/components/ResultsPage.js +39 -69
  32. package/lib/cjs/client/shared/creeveyClientApi.js +55 -82
  33. package/lib/cjs/client/shared/helpers.js +140 -211
  34. package/lib/cjs/client/shared/viewMode.js +5 -5
  35. package/lib/cjs/client/web/142.js +2 -0
  36. package/lib/cjs/client/web/142.js.LICENSE.txt +12 -0
  37. package/lib/cjs/client/web/32.js +1 -0
  38. package/lib/cjs/client/web/551.js +1 -0
  39. package/lib/cjs/client/web/566.js +2 -0
  40. package/lib/cjs/client/web/566.js.LICENSE.txt +31 -0
  41. package/lib/cjs/client/web/691.js +2 -0
  42. package/lib/cjs/client/web/691.js.LICENSE.txt +8 -0
  43. package/lib/cjs/client/web/725.js +1 -0
  44. package/lib/cjs/client/web/main.js +2 -38
  45. package/lib/cjs/client/web/main.js.LICENSE.txt +49 -0
  46. package/lib/cjs/creevey.js +3 -5
  47. package/lib/cjs/index.js +10 -15
  48. package/lib/cjs/server/config.js +5 -4
  49. package/lib/cjs/server/docker.js +3 -7
  50. package/lib/cjs/server/extract.js +7 -4
  51. package/lib/cjs/server/index.js +3 -5
  52. package/lib/cjs/server/loaders/babel/creevey-plugin.js +1 -3
  53. package/lib/cjs/server/loaders/babel/helpers.js +13 -23
  54. package/lib/cjs/server/loaders/babel/register.js +2 -4
  55. package/lib/cjs/server/loaders/webpack/compile.js +34 -51
  56. package/lib/cjs/server/loaders/webpack/creevey-loader.js +20 -22
  57. package/lib/cjs/server/loaders/webpack/dummy-hmr.js +2 -7
  58. package/lib/cjs/server/loaders/webpack/mdx-loader.js +2 -2
  59. package/lib/cjs/server/loaders/webpack/start.js +1 -1
  60. package/lib/cjs/server/logger.js +2 -1
  61. package/lib/cjs/server/master/index.js +4 -4
  62. package/lib/cjs/server/master/master.js +1 -0
  63. package/lib/cjs/server/master/pool.js +38 -47
  64. package/lib/cjs/server/master/runner.js +53 -66
  65. package/lib/cjs/server/master/server.js +78 -4
  66. package/lib/cjs/server/messages.js +128 -18
  67. package/lib/cjs/server/selenium/browser.js +129 -55
  68. package/lib/cjs/server/selenium/selenoid.js +5 -7
  69. package/lib/cjs/server/stories.js +58 -72
  70. package/lib/cjs/server/storybook/entry.js +7 -22
  71. package/lib/cjs/server/storybook/helpers.js +20 -27
  72. package/lib/cjs/server/storybook/providers/browser.js +74 -0
  73. package/lib/cjs/server/storybook/{nodejs-provider.js → providers/nodejs.js} +37 -20
  74. package/lib/cjs/server/update.js +1 -5
  75. package/lib/cjs/server/utils.js +26 -35
  76. package/lib/cjs/server/worker/helpers.js +2 -6
  77. package/lib/cjs/server/worker/reporter.js +8 -20
  78. package/lib/cjs/server/worker/worker.js +21 -19
  79. package/lib/cjs/shared/index.js +101 -0
  80. package/lib/cjs/shared/serializeRegExp.js +42 -0
  81. package/lib/cjs/types.js +11 -6
  82. package/lib/esm/client/addon/Manager.js +122 -271
  83. package/lib/esm/client/addon/components/Addon.js +15 -34
  84. package/lib/esm/client/addon/components/Icons.js +10 -6
  85. package/lib/esm/client/addon/components/Panel.js +17 -13
  86. package/lib/esm/client/addon/components/TestSelect.js +11 -9
  87. package/lib/esm/client/addon/components/Tools.js +19 -36
  88. package/lib/esm/client/addon/decorator.js +1 -1
  89. package/lib/esm/client/addon/index.js +2 -0
  90. package/lib/esm/client/addon/preset.ie11.js +59 -0
  91. package/lib/esm/client/addon/preset.js +12 -26
  92. package/lib/esm/client/addon/readyForCapture.js +5 -0
  93. package/lib/esm/client/addon/register.js +42 -66
  94. package/lib/esm/client/addon/utils.js +3 -2
  95. package/lib/esm/client/addon/withCreevey.js +209 -156
  96. package/lib/esm/client/shared/components/ImagesView/BlendView.js +23 -20
  97. package/lib/esm/client/shared/components/ImagesView/ImagesView.js +21 -17
  98. package/lib/esm/client/shared/components/ImagesView/SideBySideView.js +42 -63
  99. package/lib/esm/client/shared/components/ImagesView/SlideView.js +36 -47
  100. package/lib/esm/client/shared/components/ImagesView/SwapView.js +24 -42
  101. package/lib/esm/client/shared/components/PageFooter/PageFooter.js +12 -8
  102. package/lib/esm/client/shared/components/PageFooter/Paging.js +14 -18
  103. package/lib/esm/client/shared/components/PageHeader/ImagePreview.js +22 -18
  104. package/lib/esm/client/shared/components/PageHeader/PageHeader.js +37 -60
  105. package/lib/esm/client/shared/components/ResultsPage.js +36 -64
  106. package/lib/esm/client/shared/creeveyClientApi.js +57 -84
  107. package/lib/esm/client/shared/helpers.js +124 -195
  108. package/lib/esm/client/shared/viewMode.js +4 -4
  109. package/lib/esm/creevey.js +3 -5
  110. package/lib/esm/index.js +2 -3
  111. package/lib/esm/server/config.js +4 -5
  112. package/lib/esm/server/docker.js +2 -2
  113. package/lib/esm/server/extract.js +6 -4
  114. package/lib/esm/server/index.js +3 -4
  115. package/lib/esm/server/loaders/babel/creevey-plugin.js +1 -3
  116. package/lib/esm/server/loaders/babel/helpers.js +12 -22
  117. package/lib/esm/server/loaders/babel/register.js +3 -5
  118. package/lib/esm/server/loaders/webpack/compile.js +35 -52
  119. package/lib/esm/server/loaders/webpack/creevey-loader.js +9 -10
  120. package/lib/esm/server/loaders/webpack/dummy-hmr.js +2 -6
  121. package/lib/esm/server/loaders/webpack/mdx-loader.js +2 -2
  122. package/lib/esm/server/loaders/webpack/start.js +1 -1
  123. package/lib/esm/server/master/index.js +4 -4
  124. package/lib/esm/server/master/master.js +1 -0
  125. package/lib/esm/server/master/pool.js +38 -49
  126. package/lib/esm/server/master/runner.js +53 -66
  127. package/lib/esm/server/master/server.js +76 -6
  128. package/lib/esm/server/messages.js +118 -14
  129. package/lib/esm/server/selenium/browser.js +126 -57
  130. package/lib/esm/server/selenium/selenoid.js +4 -6
  131. package/lib/esm/server/stories.js +58 -70
  132. package/lib/esm/server/storybook/entry.js +5 -22
  133. package/lib/esm/server/storybook/helpers.js +11 -20
  134. package/lib/esm/server/storybook/providers/browser.js +60 -0
  135. package/lib/esm/server/storybook/{nodejs-provider.js → providers/nodejs.js} +35 -19
  136. package/lib/esm/server/update.js +1 -5
  137. package/lib/esm/server/utils.js +18 -31
  138. package/lib/esm/server/worker/helpers.js +2 -6
  139. package/lib/esm/server/worker/reporter.js +8 -20
  140. package/lib/esm/server/worker/worker.js +22 -20
  141. package/lib/esm/shared/index.js +78 -0
  142. package/lib/esm/shared/serializeRegExp.js +24 -0
  143. package/lib/esm/types.js +3 -0
  144. package/lib/types/client/addon/Manager.d.ts +2 -2
  145. package/lib/types/client/addon/components/TestSelect.d.ts +0 -1
  146. package/lib/types/client/addon/index.d.ts +2 -0
  147. package/lib/types/client/addon/preset.d.ts +2 -1
  148. package/lib/types/client/addon/preset.ie11.d.ts +10 -0
  149. package/lib/types/client/addon/readyForCapture.d.ts +6 -0
  150. package/lib/types/client/addon/utils.d.ts +1 -0
  151. package/lib/types/client/addon/withCreevey.d.ts +13 -2
  152. package/lib/types/client/shared/components/ImagesView/BlendView.d.ts +1 -1
  153. package/lib/types/client/shared/components/ImagesView/ImagesView.d.ts +0 -1
  154. package/lib/types/client/shared/components/ImagesView/SideBySideView.d.ts +1 -1
  155. package/lib/types/client/shared/components/ImagesView/SlideView.d.ts +1 -1
  156. package/lib/types/client/shared/components/ImagesView/SwapView.d.ts +1 -1
  157. package/lib/types/client/shared/components/PageFooter/PageFooter.d.ts +0 -1
  158. package/lib/types/client/shared/components/PageFooter/Paging.d.ts +0 -1
  159. package/lib/types/client/shared/components/PageHeader/ImagePreview.d.ts +1 -1
  160. package/lib/types/client/shared/components/PageHeader/PageHeader.d.ts +0 -1
  161. package/lib/types/client/shared/components/ResultsPage.d.ts +1 -1
  162. package/lib/types/client/web/CreeveyApp.d.ts +0 -1
  163. package/lib/types/client/web/CreeveyLoader.d.ts +1 -2
  164. package/lib/types/client/web/CreeveyView/SideBar/Checkbox.d.ts +1 -1
  165. package/lib/types/client/web/CreeveyView/SideBar/SideBarHeader.d.ts +0 -1
  166. package/lib/types/client/web/CreeveyView/SideBar/SuiteLink.d.ts +6 -6
  167. package/lib/types/client/web/CreeveyView/SideBar/TestLink.d.ts +0 -1
  168. package/lib/types/client/web/CreeveyView/SideBar/TestStatusIcon.d.ts +1 -1
  169. package/lib/types/client/web/CreeveyView/SideBar/TestsStatus.d.ts +1 -1
  170. package/lib/types/index.d.ts +0 -1
  171. package/lib/types/server/loaders/babel/register.d.ts +1 -1
  172. package/lib/types/server/loaders/webpack/creevey-loader.d.ts +4 -2
  173. package/lib/types/server/logger.d.ts +6 -2
  174. package/lib/types/server/master/master.d.ts +1 -0
  175. package/lib/types/server/master/pool.d.ts +1 -0
  176. package/lib/types/server/master/server.d.ts +1 -1
  177. package/lib/types/server/messages.d.ts +17 -6
  178. package/lib/types/server/selenium/browser.d.ts +5 -2
  179. package/lib/types/server/stories.d.ts +2 -2
  180. package/lib/types/server/storybook/entry.d.ts +2 -3
  181. package/lib/types/server/storybook/helpers.d.ts +1 -1
  182. package/lib/types/server/storybook/providers/browser.d.ts +4 -0
  183. package/lib/types/server/storybook/providers/nodejs.d.ts +9 -0
  184. package/lib/types/server/utils.d.ts +5 -1
  185. package/lib/types/server/worker/helpers.d.ts +2 -1
  186. package/lib/types/shared/index.d.ts +7 -0
  187. package/lib/types/shared/serializeRegExp.d.ts +9 -0
  188. package/lib/types/types.d.ts +32 -5
  189. package/package.json +120 -103
  190. package/preset/ie11.js +5 -0
  191. package/{preset.js → preset/index.js} +2 -2
  192. package/types/mdx.d.ts +3 -2
  193. package/types/mocha.d.ts +1 -0
  194. package/lib/cjs/client/web/1.js +0 -13
  195. package/lib/cjs/client/web/2.js +0 -1
  196. package/lib/cjs/shared.js +0 -35
  197. package/lib/esm/shared.js +0 -22
  198. package/lib/types/server/storybook/nodejs-provider.d.ts +0 -5
  199. package/lib/types/shared.d.ts +0 -4
@@ -19,43 +19,11 @@ var _register = require("./register");
19
19
 
20
20
  var _utils = require("./utils");
21
21
 
22
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
23
-
24
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
25
-
26
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
27
-
28
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
29
-
30
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
31
-
32
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
33
-
34
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
35
-
36
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
37
-
38
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
39
-
40
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
41
-
42
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
43
-
44
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
45
-
46
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
47
-
48
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
49
-
50
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
51
-
52
22
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
53
23
 
54
- var CreeveyManager = /*#__PURE__*/function () {
55
- function CreeveyManager(storybookApi) {
56
- var _this = this;
57
-
58
- _classCallCheck(this, CreeveyManager);
24
+ class CreeveyManager {
25
+ constructor(storybookApi) {
26
+ this.storybookApi = storybookApi;
59
27
 
60
28
  _defineProperty(this, "storyId", '');
61
29
 
@@ -77,60 +45,38 @@ var CreeveyManager = /*#__PURE__*/function () {
77
45
 
78
46
  _defineProperty(this, "changeTestListeners", []);
79
47
 
80
- _defineProperty(this, "initAll", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
81
- return regeneratorRuntime.wrap(function _callee$(_context) {
82
- while (1) {
83
- switch (_context.prev = _context.next) {
84
- case 0:
85
- _this.storybookApi.on(_coreEvents.STORY_RENDERED, _this.onStoryRendered);
86
-
87
- _this.storybookApi.on(_coreEvents.SET_STORIES, _this.onSetStories);
88
-
89
- _context.next = 4;
90
- return (0, _creeveyClientApi.initCreeveyClientApi)();
91
-
92
- case 4:
93
- _this.creeveyApi = _context.sent;
94
-
95
- _this.creeveyApi.onUpdate(_this.handleCreeveyUpdate);
96
-
97
- _context.next = 8;
98
- return _this.creeveyApi.status;
99
-
100
- case 8:
101
- _this.status = _context.sent;
102
-
103
- case 9:
104
- case "end":
105
- return _context.stop();
106
- }
107
- }
108
- }, _callee);
109
- })));
48
+ _defineProperty(this, "initAll", async () => {
49
+ this.storybookApi.on(_coreEvents.STORY_RENDERED, this.onStoryRendered);
50
+ this.storybookApi.on(_coreEvents.SET_STORIES, this.onSetStories);
51
+ this.creeveyApi = await (0, _creeveyClientApi.initCreeveyClientApi)();
52
+ this.creeveyApi.onUpdate(this.handleCreeveyUpdate);
53
+ this.status = await this.creeveyApi.status;
54
+ });
110
55
 
111
- _defineProperty(this, "handleCreeveyUpdate", function (update) {
112
- var tests = update.tests,
113
- _update$removedTests = update.removedTests,
114
- removedTests = _update$removedTests === void 0 ? [] : _update$removedTests,
115
- isRunning = update.isRunning;
56
+ _defineProperty(this, "handleCreeveyUpdate", update => {
57
+ const {
58
+ tests,
59
+ removedTests = [],
60
+ isRunning
61
+ } = update;
116
62
 
117
63
  if ((0, _types.isDefined)(isRunning)) {
118
- _this.status.isRunning = isRunning;
64
+ this.status.isRunning = isRunning;
119
65
  }
120
66
 
121
67
  if ((0, _types.isDefined)(tests)) {
122
- var prevTests = _this.status.tests;
123
- var prevStories = _this.stories || {};
124
- Object.values(tests).filter(_types.isDefined).forEach(function (update) {
125
- var _test$results;
126
-
127
- var id = update.id,
128
- skip = update.skip,
129
- status = update.status,
130
- results = update.results,
131
- approved = update.approved,
132
- storyId = update.storyId;
133
- var test = prevTests[id];
68
+ const prevTests = this.status.tests;
69
+ const prevStories = this.stories || {};
70
+ Object.values(tests).filter(_types.isDefined).forEach(update => {
71
+ const {
72
+ id,
73
+ skip,
74
+ status,
75
+ results,
76
+ approved,
77
+ storyId
78
+ } = update;
79
+ const test = prevTests[id];
134
80
 
135
81
  if (!test) {
136
82
  return prevTests[id] = update;
@@ -142,272 +88,177 @@ var CreeveyManager = /*#__PURE__*/function () {
142
88
  test.status = status;
143
89
 
144
90
  if ((0, _types.isDefined)(storyId) && (0, _types.isDefined)(prevStories[storyId])) {
145
- var story = prevStories[storyId];
146
-
147
- var storyStatus = _this.getStoryTests(storyId);
148
-
149
- var oldStatus = storyStatus.map(function (x) {
150
- return x.id === id ? status : x.status;
151
- }).reduce(function (oldStatus, newStatus) {
152
- return (0, _helpers.calcStatus)(oldStatus, newStatus);
153
- }, undefined);
154
- story.name = _this.addStatusToStoryName(story.name, (0, _helpers.calcStatus)(oldStatus, status), skip || false);
91
+ const story = prevStories[storyId];
92
+ const storyStatus = this.getStoryTests(storyId);
93
+ const oldStatus = storyStatus.map(x => x.id === id ? status : x.status).reduce((oldStatus, newStatus) => (0, _helpers.calcStatus)(oldStatus, newStatus), undefined);
94
+ story.name = this.addStatusToStoryName(story.name, (0, _helpers.calcStatus)(oldStatus, status), skip || false);
155
95
  }
156
96
  }
157
97
 
158
- if ((0, _types.isDefined)(results)) test.results ? (_test$results = test.results).push.apply(_test$results, _toConsumableArray(results)) : test.results = results;
98
+ if ((0, _types.isDefined)(results)) test.results ? test.results.push(...results) : test.results = results;
159
99
 
160
100
  if ((0, _types.isDefined)(approved)) {
161
- Object.entries(approved).forEach(function (_ref2) {
162
- var _ref3 = _slicedToArray(_ref2, 2),
163
- image = _ref3[0],
164
- retry = _ref3[1];
165
-
101
+ Object.entries(approved).forEach(_ref => {
102
+ let [image, retry] = _ref;
166
103
  return retry !== undefined && test && ((test.approved = (test === null || test === void 0 ? void 0 : test.approved) || {})[image] = retry);
167
104
  });
168
105
  }
169
106
  });
170
- removedTests.forEach(function (_ref4) {
171
- var id = _ref4.id;
107
+ removedTests.forEach(_ref2 => {
108
+ let {
109
+ id
110
+ } = _ref2;
172
111
  return delete prevTests[id];
173
112
  });
174
- _this.status.tests = prevTests;
175
- _this.stories = prevStories;
176
-
177
- _this.setPanelsTitle();
178
-
179
- void _this.storybookApi.setStories(_this.stories);
113
+ this.status.tests = prevTests;
114
+ this.stories = prevStories;
115
+ this.setPanelsTitle();
116
+ void this.storybookApi.setStories(this.stories);
180
117
  }
181
118
 
182
- _this.updateStatusListeners.forEach(function (x) {
183
- return x(update);
184
- });
119
+ this.updateStatusListeners.forEach(x => x(update));
185
120
  });
186
121
 
187
- _defineProperty(this, "getCurrentTest", function () {
188
- return _this.status.tests[_this.selectedTestId];
122
+ _defineProperty(this, "getCurrentTest", () => {
123
+ return this.status.tests[this.selectedTestId];
189
124
  });
190
125
 
191
- _defineProperty(this, "onStoryRendered", function (storyId) {
192
- if (_this.storyId === '') void _this.addStatusesToSideBar();
126
+ _defineProperty(this, "onStoryRendered", storyId => {
127
+ if (this.storyId === '') void this.addStatusesToSideBar();
193
128
 
194
- if (_this.storyId !== storyId) {
129
+ if (this.storyId !== storyId) {
195
130
  var _this$getTestsByStory, _this$getTestsByStory2;
196
131
 
197
- _this.storyId = storyId;
198
- _this.selectedTestId = (_this$getTestsByStory = (_this$getTestsByStory2 = _this.getTestsByStoryIdAndBrowser(_this.activeBrowser)[0]) === null || _this$getTestsByStory2 === void 0 ? void 0 : _this$getTestsByStory2.id) !== null && _this$getTestsByStory !== void 0 ? _this$getTestsByStory : '';
199
-
200
- _this.setPanelsTitle();
201
-
202
- _this.changeTestListeners.forEach(function (x) {
203
- return x(_this.selectedTestId);
204
- });
132
+ this.storyId = storyId;
133
+ this.selectedTestId = (_this$getTestsByStory = (_this$getTestsByStory2 = this.getTestsByStoryIdAndBrowser(this.activeBrowser)[0]) === null || _this$getTestsByStory2 === void 0 ? void 0 : _this$getTestsByStory2.id) !== null && _this$getTestsByStory !== void 0 ? _this$getTestsByStory : '';
134
+ this.setPanelsTitle();
135
+ this.changeTestListeners.forEach(x => x(this.selectedTestId));
205
136
  }
206
137
  });
207
138
 
208
- _defineProperty(this, "onStart", function () {
139
+ _defineProperty(this, "onStart", () => {
209
140
  var _this$creeveyApi;
210
141
 
211
- (_this$creeveyApi = _this.creeveyApi) === null || _this$creeveyApi === void 0 ? void 0 : _this$creeveyApi.start([_this.selectedTestId]);
142
+ (_this$creeveyApi = this.creeveyApi) === null || _this$creeveyApi === void 0 ? void 0 : _this$creeveyApi.start([this.selectedTestId]);
212
143
  });
213
144
 
214
- _defineProperty(this, "onStop", function () {
145
+ _defineProperty(this, "onStop", () => {
215
146
  var _this$creeveyApi2;
216
147
 
217
- (_this$creeveyApi2 = _this.creeveyApi) === null || _this$creeveyApi2 === void 0 ? void 0 : _this$creeveyApi2.stop();
148
+ (_this$creeveyApi2 = this.creeveyApi) === null || _this$creeveyApi2 === void 0 ? void 0 : _this$creeveyApi2.stop();
218
149
  });
219
150
 
220
- _defineProperty(this, "onImageApprove", function (id, retry, image) {
151
+ _defineProperty(this, "onImageApprove", (id, retry, image) => {
221
152
  var _this$creeveyApi3;
222
153
 
223
- return (_this$creeveyApi3 = _this.creeveyApi) === null || _this$creeveyApi3 === void 0 ? void 0 : _this$creeveyApi3.approve(id, retry, image);
154
+ return (_this$creeveyApi3 = this.creeveyApi) === null || _this$creeveyApi3 === void 0 ? void 0 : _this$creeveyApi3.approve(id, retry, image);
224
155
  });
225
156
 
226
- _defineProperty(this, "onStartAllStoryTests", function () {
157
+ _defineProperty(this, "onStartAllStoryTests", () => {
227
158
  var _this$creeveyApi4;
228
159
 
229
- var ids = Object.values(_this.status.tests).filter(_types.isDefined).filter(function (x) {
230
- return x.storyId === _this.storyId;
231
- }).map(function (x) {
232
- return x.id;
233
- });
234
- (_this$creeveyApi4 = _this.creeveyApi) === null || _this$creeveyApi4 === void 0 ? void 0 : _this$creeveyApi4.start(ids);
160
+ const ids = Object.values(this.status.tests).filter(_types.isDefined).filter(x => x.storyId === this.storyId).map(x => x.id);
161
+ (_this$creeveyApi4 = this.creeveyApi) === null || _this$creeveyApi4 === void 0 ? void 0 : _this$creeveyApi4.start(ids);
235
162
  });
236
163
 
237
- _defineProperty(this, "onStartAllTests", function () {
164
+ _defineProperty(this, "onStartAllTests", () => {
238
165
  var _this$creeveyApi5;
239
166
 
240
- var ids = Object.values(_this.status.tests).filter(_types.isDefined).map(function (x) {
241
- return x.id;
242
- });
243
- (_this$creeveyApi5 = _this.creeveyApi) === null || _this$creeveyApi5 === void 0 ? void 0 : _this$creeveyApi5.start(ids);
167
+ const ids = Object.values(this.status.tests).filter(_types.isDefined).map(x => x.id);
168
+ (_this$creeveyApi5 = this.creeveyApi) === null || _this$creeveyApi5 === void 0 ? void 0 : _this$creeveyApi5.start(ids);
244
169
  });
245
170
 
246
- _defineProperty(this, "onSetStories", function (data) {
247
- // TODO: Send PR to storybook to fix this
248
- var stories = data.v ? (0, _shared.denormalizeStoryParameters)(data) : data.stories;
249
- _this.stories = stories;
171
+ _defineProperty(this, "onSetStories", data => {
172
+ const stories = data.v ? (0, _shared.denormalizeStoryParameters)(data) : data.stories;
173
+ this.stories = stories;
250
174
  });
251
175
 
252
- _defineProperty(this, "setActiveBrowser", function (browser) {
176
+ _defineProperty(this, "setActiveBrowser", browser => {
253
177
  var _this$getTestsByStory3, _this$getTestsByStory4;
254
178
 
255
- _this.activeBrowser = browser;
256
- _this.selectedTestId = (_this$getTestsByStory3 = (_this$getTestsByStory4 = _this.getTestsByStoryIdAndBrowser(_this.activeBrowser)[0]) === null || _this$getTestsByStory4 === void 0 ? void 0 : _this$getTestsByStory4.id) !== null && _this$getTestsByStory3 !== void 0 ? _this$getTestsByStory3 : '';
257
-
258
- _this.changeTestListeners.forEach(function (x) {
259
- return x(_this.selectedTestId);
260
- });
179
+ this.activeBrowser = browser;
180
+ this.selectedTestId = (_this$getTestsByStory3 = (_this$getTestsByStory4 = this.getTestsByStoryIdAndBrowser(this.activeBrowser)[0]) === null || _this$getTestsByStory4 === void 0 ? void 0 : _this$getTestsByStory4.id) !== null && _this$getTestsByStory3 !== void 0 ? _this$getTestsByStory3 : '';
181
+ this.changeTestListeners.forEach(x => x(this.selectedTestId));
261
182
  });
262
183
 
263
- _defineProperty(this, "setSelectedTestId", function (testId) {
264
- _this.selectedTestId = testId;
265
-
266
- _this.changeTestListeners.forEach(function (x) {
267
- return x(_this.selectedTestId);
268
- });
184
+ _defineProperty(this, "setSelectedTestId", testId => {
185
+ this.selectedTestId = testId;
186
+ this.changeTestListeners.forEach(x => x(this.selectedTestId));
269
187
  });
270
188
 
271
- _defineProperty(this, "getStoryTests", function (storyId) {
272
- if (!_this.status || !_this.status.tests) return [];
273
- return Object.values(_this.status.tests).filter(function (result) {
274
- return (result === null || result === void 0 ? void 0 : result.storyId) === storyId;
275
- }).filter(_types.isDefined);
189
+ _defineProperty(this, "getStoryTests", storyId => {
190
+ if (!this.status || !this.status.tests) return [];
191
+ return Object.values(this.status.tests).filter(result => (result === null || result === void 0 ? void 0 : result.storyId) === storyId).filter(_types.isDefined);
276
192
  });
277
193
 
278
- _defineProperty(this, "getBrowsers", function () {
279
- return _this.status.browsers;
194
+ _defineProperty(this, "getBrowsers", () => {
195
+ return this.status.browsers;
280
196
  });
281
197
 
282
- _defineProperty(this, "getTestsByStoryIdAndBrowser", function (browser) {
283
- return Object.values(_this.status.tests).filter(function (x) {
284
- return (x === null || x === void 0 ? void 0 : x.browser) === browser && x.storyId === _this.storyId;
285
- }).filter(_types.isDefined);
198
+ _defineProperty(this, "getTestsByStoryIdAndBrowser", browser => {
199
+ return Object.values(this.status.tests).filter(x => (x === null || x === void 0 ? void 0 : x.browser) === browser && x.storyId === this.storyId).filter(_types.isDefined);
286
200
  });
287
201
 
288
- _defineProperty(this, "getTabTitle", function (browser) {
289
- var tests = _this.getTestsByStoryIdAndBrowser(browser);
290
-
291
- var browserStatus = tests.map(function (x) {
292
- return x && x.status;
293
- }).reduce(function (oldStatus, newStatus) {
294
- return (0, _helpers.calcStatus)(oldStatus, newStatus);
295
- }, undefined);
296
- var browserSkip = tests.length > 0 ? tests.every(function (x) {
297
- return x && x.skip;
298
- }) : false;
299
- var emojiStatus = (0, _utils.getEmojiByTestStatus)(browserStatus, browserSkip);
202
+ _defineProperty(this, "getTabTitle", browser => {
203
+ const tests = this.getTestsByStoryIdAndBrowser(browser);
204
+ const browserStatus = tests.map(x => x && x.status).reduce((oldStatus, newStatus) => (0, _helpers.calcStatus)(oldStatus, newStatus), undefined);
205
+ const browserSkip = tests.length > 0 ? tests.every(x => x && x.skip) : false;
206
+ const emojiStatus = (0, _utils.getEmojiByTestStatus)(browserStatus, browserSkip);
300
207
  return "".concat(emojiStatus ? "".concat(emojiStatus, " ") : '', "Creevey/").concat(browser);
301
208
  });
302
209
 
303
- _defineProperty(this, "setPanelsTitle", function () {
210
+ _defineProperty(this, "setPanelsTitle", () => {
304
211
  var _this$storybookApi;
305
212
 
306
- var panels = (_this$storybookApi = _this.storybookApi) === null || _this$storybookApi === void 0 ? void 0 : _this$storybookApi.getPanels();
213
+ const panels = (_this$storybookApi = this.storybookApi) === null || _this$storybookApi === void 0 ? void 0 : _this$storybookApi.getPanels();
307
214
  if (!panels) return;
308
- var firstPanelBrowser = _this.activeBrowser;
215
+ let firstPanelBrowser = this.activeBrowser;
309
216
 
310
- for (var p in panels) {
217
+ for (const p in panels) {
311
218
  var _panel$id;
312
219
 
313
- var panel = panels[p];
220
+ const panel = panels[p];
314
221
 
315
222
  if (((_panel$id = panel.id) === null || _panel$id === void 0 ? void 0 : _panel$id.indexOf(_register.ADDON_ID)) === 0 && panel.paramKey) {
316
- panel.title = _this.getTabTitle(panel.paramKey);
223
+ panel.title = this.getTabTitle(panel.paramKey);
317
224
  if (!firstPanelBrowser) firstPanelBrowser = panel.paramKey;
318
225
  }
319
226
  }
320
227
 
321
- _this.storybookApi.setSelectedPanel("".concat(_register.ADDON_ID, "/panel/").concat(firstPanelBrowser));
228
+ this.storybookApi.setSelectedPanel("".concat(_register.ADDON_ID, "/panel/").concat(firstPanelBrowser));
322
229
  });
323
230
 
324
231
  this.storybookApi = storybookApi;
325
232
  }
326
233
 
327
- _createClass(CreeveyManager, [{
328
- key: "onUpdateStatus",
329
- value: function onUpdateStatus(listener) {
330
- var _this2 = this;
331
-
332
- this.updateStatusListeners.push(listener);
333
- return function () {
334
- return void (_this2.updateStatusListeners = _this2.updateStatusListeners.filter(function (x) {
335
- return x != listener;
336
- }));
337
- };
338
- }
339
- }, {
340
- key: "onChangeTest",
341
- value: function onChangeTest(listener) {
342
- var _this3 = this;
343
-
344
- this.changeTestListeners.push(listener);
345
- return function () {
346
- return void (_this3.changeTestListeners = _this3.changeTestListeners.filter(function (x) {
347
- return x != listener;
348
- }));
349
- };
350
- }
351
- }, {
352
- key: "addStatusesToSideBar",
353
- value: function () {
354
- var _addStatusesToSideBar = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
355
- var _this4 = this;
356
-
357
- var stories;
358
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
359
- while (1) {
360
- switch (_context2.prev = _context2.next) {
361
- case 0:
362
- if (Object.keys(this.stories).length) {
363
- _context2.next = 2;
364
- break;
365
- }
366
-
367
- return _context2.abrupt("return");
368
-
369
- case 2:
370
- stories = this.stories;
371
- Object.keys(this.stories).forEach(function (storyId) {
372
- var storyStatus = _this4.getStoryTests(storyId);
373
-
374
- var status = storyStatus.map(function (x) {
375
- return x.status;
376
- }).reduce(function (oldStatus, newStatus) {
377
- return (0, _helpers.calcStatus)(oldStatus, newStatus);
378
- }, undefined);
379
- var skip = storyStatus.length > 0 ? storyStatus.every(function (x) {
380
- return x.skip;
381
- }) : false;
382
- _this4.stories[storyId].name = _this4.addStatusToStoryName(stories[storyId].name, status, skip);
383
- });
384
- _context2.next = 6;
385
- return this.storybookApi.setStories(this.stories);
386
-
387
- case 6:
388
- case "end":
389
- return _context2.stop();
390
- }
391
- }
392
- }, _callee2, this);
393
- }));
234
+ onUpdateStatus(listener) {
235
+ this.updateStatusListeners.push(listener);
236
+ return () => void (this.updateStatusListeners = this.updateStatusListeners.filter(x => x != listener));
237
+ }
394
238
 
395
- function addStatusesToSideBar() {
396
- return _addStatusesToSideBar.apply(this, arguments);
397
- }
239
+ onChangeTest(listener) {
240
+ this.changeTestListeners.push(listener);
241
+ return () => void (this.changeTestListeners = this.changeTestListeners.filter(x => x != listener));
242
+ }
243
+
244
+ async addStatusesToSideBar() {
245
+ if (!Object.keys(this.stories).length) return;
246
+ const stories = this.stories;
247
+ Object.keys(this.stories).forEach(storyId => {
248
+ const storyStatus = this.getStoryTests(storyId);
249
+ const status = storyStatus.map(x => x.status).reduce((oldStatus, newStatus) => (0, _helpers.calcStatus)(oldStatus, newStatus), undefined);
250
+ const skip = storyStatus.length > 0 ? storyStatus.every(x => x.skip) : false;
251
+ this.stories[storyId].name = this.addStatusToStoryName(stories[storyId].name, status, skip);
252
+ });
253
+ await this.storybookApi.setStories(this.stories);
254
+ }
255
+
256
+ addStatusToStoryName(name, status, skip) {
257
+ name = name.replace(/^(❌|✔|🟡|🕗|⏸) /, '');
258
+ const emojiStatus = (0, _utils.getEmojiByTestStatus)(status, skip);
259
+ return "".concat(emojiStatus ? "".concat(emojiStatus, " ") : '', " ").concat(name);
260
+ }
398
261
 
399
- return addStatusesToSideBar;
400
- }()
401
- }, {
402
- key: "addStatusToStoryName",
403
- value: function addStatusToStoryName(name, status, skip) {
404
- name = name.replace(/^(❌|✔|🟡|🕗|⏸) /, '');
405
- var emojiStatus = (0, _utils.getEmojiByTestStatus)(status, skip);
406
- return "".concat(emojiStatus ? "".concat(emojiStatus, " ") : '', " ").concat(name);
407
- }
408
- }]);
409
-
410
- return CreeveyManager;
411
- }();
262
+ }
412
263
 
413
264
  exports.CreeveyManager = CreeveyManager;
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
@@ -13,54 +11,35 @@ var _react = _interopRequireWildcard(require("react"));
13
11
 
14
12
  var _Panel = require("./Panel");
15
13
 
16
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
-
18
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
-
20
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
21
-
22
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
23
-
24
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
25
-
26
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
27
-
28
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
29
-
30
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
31
-
32
- var Addon = function Addon(_ref) {
33
- var active = _ref.active,
34
- browser = _ref.browser,
35
- manager = _ref.manager;
36
-
37
- var _useState = (0, _react.useState)([]),
38
- _useState2 = _slicedToArray(_useState, 2),
39
- tests = _useState2[0],
40
- setTests = _useState2[1];
14
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
41
15
 
42
- var _useState3 = (0, _react.useState)(manager.selectedTestId),
43
- _useState4 = _slicedToArray(_useState3, 2),
44
- selectedTestId = _useState4[0],
45
- setSelectedTestId = _useState4[1];
16
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
46
17
 
47
- (0, _react.useEffect)(function () {
18
+ const Addon = _ref => {
19
+ let {
20
+ active,
21
+ browser,
22
+ manager
23
+ } = _ref;
24
+ const [tests, setTests] = (0, _react.useState)([]);
25
+ const [selectedTestId, setSelectedTestId] = (0, _react.useState)(manager.selectedTestId);
26
+ (0, _react.useEffect)(() => {
48
27
  if (active) {
49
28
  manager.setActiveBrowser(browser);
50
- var browserTests = manager.getTestsByStoryIdAndBrowser(manager.activeBrowser);
29
+ const browserTests = manager.getTestsByStoryIdAndBrowser(manager.activeBrowser);
51
30
  setTests(browserTests);
52
31
  }
53
32
  }, [active, browser, manager]);
54
- (0, _react.useEffect)(function () {
55
- var unsubscribe = manager.onChangeTest(function (testId) {
33
+ (0, _react.useEffect)(() => {
34
+ const unsubscribe = manager.onChangeTest(testId => {
56
35
  setSelectedTestId(testId);
57
- var status = manager.getTestsByStoryIdAndBrowser(manager.activeBrowser);
36
+ const status = manager.getTestsByStoryIdAndBrowser(manager.activeBrowser);
58
37
  setTests(status);
59
38
  });
60
39
  return unsubscribe;
61
40
  }, [manager]);
62
- (0, _react.useEffect)(function () {
63
- var unsubscribe = manager.onUpdateStatus(function () {
41
+ (0, _react.useEffect)(() => {
42
+ const unsubscribe = manager.onUpdateStatus(() => {
64
43
  setTests(manager.getTestsByStoryIdAndBrowser(manager.activeBrowser));
65
44
  });
66
45
  return unsubscribe;
@@ -3,15 +3,17 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ForwardIcon = exports.NextIcon = void 0;
6
+ exports.NextIcon = exports.ForwardIcon = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
- var NextIcon = function NextIcon(_ref) {
13
- var width = _ref.width,
14
- height = _ref.height;
12
+ const NextIcon = _ref => {
13
+ let {
14
+ width,
15
+ height
16
+ } = _ref;
15
17
  return /*#__PURE__*/_react.default.createElement("svg", {
16
18
  version: "1.1",
17
19
  width: width,
@@ -25,9 +27,11 @@ var NextIcon = function NextIcon(_ref) {
25
27
 
26
28
  exports.NextIcon = NextIcon;
27
29
 
28
- var ForwardIcon = function ForwardIcon(_ref2) {
29
- var width = _ref2.width,
30
- height = _ref2.height;
30
+ const ForwardIcon = _ref2 => {
31
+ let {
32
+ width,
33
+ height
34
+ } = _ref2;
31
35
  return /*#__PURE__*/_react.default.createElement("svg", {
32
36
  version: "1.1",
33
37
  width: width,