@cloudflare/component-multistep-modal 1.3.130 → 1.3.133

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.
@@ -1,3 +1,7 @@
1
+ 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); } }
2
+
3
+ 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); }); }; }
4
+
1
5
  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; }
2
6
 
3
7
  import React from 'react';
@@ -10,7 +14,7 @@ import { Progress } from '@cloudflare/component-progress';
10
14
  import { Trans } from '@cloudflare/intl-react';
11
15
  import { TID } from './constants';
12
16
 
13
- const getElements = (steps, step) => {
17
+ var getElements = (steps, step) => {
14
18
  if (!steps || !steps[step]) {
15
19
  return {
16
20
  content: null,
@@ -37,17 +41,20 @@ const getElements = (steps, step) => {
37
41
  };
38
42
  };
39
43
 
40
- const ProgressWrapper = createComponent(({
41
- theme
42
- }) => ({
43
- borderBottom: `1px solid ${theme.colors.gray[8]}`,
44
- paddingBottom: theme.space[3],
45
- marginBottom: theme.space[3]
46
- }));
44
+ var ProgressWrapper = createComponent(_ref => {
45
+ var {
46
+ theme
47
+ } = _ref;
48
+ return {
49
+ borderBottom: "1px solid ".concat(theme.colors.gray[8]),
50
+ paddingBottom: theme.space[3],
51
+ marginBottom: theme.space[3]
52
+ };
53
+ });
47
54
 
48
55
  class MultistepModal extends React.Component {
49
- constructor(...args) {
50
- super(...args);
56
+ constructor() {
57
+ super(...arguments);
51
58
 
52
59
  _defineProperty(this, "state", {
53
60
  step: 0
@@ -63,28 +70,31 @@ class MultistepModal extends React.Component {
63
70
  }
64
71
 
65
72
  render() {
66
- const _this$props = this.props,
67
- isOpen = _this$props.isOpen,
68
- onClose = _this$props.onClose,
69
- width = _this$props.width,
70
- renderSteps = _this$props.renderSteps,
71
- title = _this$props.title,
72
- onNextStep = _this$props.onNextStep,
73
- _this$props$closeOnBa = _this$props.closeOnBackdropClick,
74
- closeOnBackdropClick = _this$props$closeOnBa === void 0 ? true : _this$props$closeOnBa,
75
- onPrevStep = _this$props.onPrevStep;
76
- const step = this.state.step;
77
-
78
- const _getElements = getElements(renderSteps(step), step),
79
- content = _getElements.content,
80
- nextLabel = _getElements.nextLabel,
81
- nextDisabled = _getElements.nextDisabled,
82
- nextLoading = _getElements.nextLoading,
83
- nextOnClick = _getElements.nextOnClick,
84
- hideBack = _getElements.hideBack,
85
- hideCancel = _getElements.hideCancel,
86
- progress = _getElements.progress;
73
+ var _this = this;
87
74
 
75
+ var {
76
+ isOpen,
77
+ onClose,
78
+ width,
79
+ renderSteps,
80
+ title,
81
+ onNextStep,
82
+ closeOnBackdropClick = true,
83
+ onPrevStep
84
+ } = this.props;
85
+ var {
86
+ step
87
+ } = this.state;
88
+ var {
89
+ content,
90
+ nextLabel,
91
+ nextDisabled,
92
+ nextLoading,
93
+ nextOnClick,
94
+ hideBack,
95
+ hideCancel,
96
+ progress
97
+ } = getElements(renderSteps(step), step);
88
98
  return /*#__PURE__*/React.createElement(React.Fragment, null, isOpen ? /*#__PURE__*/React.createElement(TestDummy, {
89
99
  id: TID.MODAL_OPEN
90
100
  }) : /*#__PURE__*/React.createElement(TestDummy, {
@@ -129,20 +139,20 @@ class MultistepModal extends React.Component {
129
139
  type: "primary",
130
140
  disabled: nextDisabled,
131
141
  loading: nextLoading,
132
- onClick: async () => {
142
+ onClick: /*#__PURE__*/_asyncToGenerator(function* () {
133
143
  onNextStep && onNextStep(step + 1);
134
144
 
135
145
  if (nextOnClick) {
136
- const res = await nextOnClick();
137
- res && this.setState({
146
+ var res = yield nextOnClick();
147
+ res && _this.setState({
138
148
  step: step + 1
139
149
  });
140
150
  } else {
141
- this.setState({
151
+ _this.setState({
142
152
  step: step + 1
143
153
  });
144
154
  }
145
- }
155
+ })
146
156
  }, nextLabel))))));
147
157
  }
148
158
 
package/es/constants.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // Test IDs
2
- export const TID = {
2
+ export var TID = {
3
3
  MODAL_OPEN: 'multistep-modal-open',
4
4
  MODAL_CLOSED: 'multistep-modal-closed',
5
5
  BUTTON_NEXT: 'multistep-modal-next',
package/es/types.js CHANGED
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,6 @@
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); }
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -27,6 +27,8 @@ var _constants = require("./constants");
27
27
 
28
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
29
 
30
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
31
+
30
32
  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); } }
31
33
 
32
34
  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); }); }; }
@@ -35,18 +37,22 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
35
37
 
36
38
  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); } }
37
39
 
38
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
40
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
39
41
 
40
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
42
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
41
43
 
42
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
44
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
43
45
 
44
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
46
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
45
47
 
46
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
48
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
47
49
 
48
50
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
49
51
 
52
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
53
+
54
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
55
+
50
56
  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; }
51
57
 
52
58
  var getElements = function getElements(steps, step) {
@@ -92,9 +98,9 @@ var ProgressWrapper = (0, _styleContainer.createComponent)(function (_ref) {
92
98
  var MultistepModal = /*#__PURE__*/function (_React$Component) {
93
99
  _inherits(MultistepModal, _React$Component);
94
100
 
95
- function MultistepModal() {
96
- var _getPrototypeOf2;
101
+ var _super = _createSuper(MultistepModal);
97
102
 
103
+ function MultistepModal() {
98
104
  var _this;
99
105
 
100
106
  _classCallCheck(this, MultistepModal);
@@ -103,9 +109,9 @@ var MultistepModal = /*#__PURE__*/function (_React$Component) {
103
109
  args[_key] = arguments[_key];
104
110
  }
105
111
 
106
- _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(MultistepModal)).call.apply(_getPrototypeOf2, [this].concat(args)));
112
+ _this = _super.call.apply(_super, [this].concat(args));
107
113
 
108
- _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", {
114
+ _defineProperty(_assertThisInitialized(_this), "state", {
109
115
  step: 0
110
116
  });
111
117
 
@@ -195,9 +201,9 @@ var MultistepModal = /*#__PURE__*/function (_React$Component) {
195
201
  type: "primary",
196
202
  disabled: nextDisabled,
197
203
  loading: nextLoading,
198
- onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
204
+ onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
199
205
  var res;
200
- return regeneratorRuntime.wrap(function _callee$(_context) {
206
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
201
207
  while (1) {
202
208
  switch (_context.prev = _context.next) {
203
209
  case 0:
@@ -229,7 +235,7 @@ var MultistepModal = /*#__PURE__*/function (_React$Component) {
229
235
  return _context.stop();
230
236
  }
231
237
  }
232
- }, _callee, this);
238
+ }, _callee);
233
239
  }))
234
240
  }, nextLabel))))));
235
241
  }
package/lib/index.js CHANGED
@@ -3,22 +3,22 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "MultistepModal", {
6
+ Object.defineProperty(exports, "IStepItem", {
7
7
  enumerable: true,
8
8
  get: function get() {
9
- return _MultistepModal.default;
9
+ return _types.IStepItem;
10
10
  }
11
11
  });
12
- Object.defineProperty(exports, "TID", {
12
+ Object.defineProperty(exports, "MultistepModal", {
13
13
  enumerable: true,
14
14
  get: function get() {
15
- return _constants.TID;
15
+ return _MultistepModal.default;
16
16
  }
17
17
  });
18
- Object.defineProperty(exports, "IStepItem", {
18
+ Object.defineProperty(exports, "TID", {
19
19
  enumerable: true,
20
20
  get: function get() {
21
- return _types.IStepItem;
21
+ return _constants.TID;
22
22
  }
23
23
  });
24
24
 
package/lib/types.js CHANGED
@@ -1 +1,5 @@
1
- "use strict";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
package/package.json CHANGED
@@ -1,23 +1,25 @@
1
1
  {
2
2
  "name": "@cloudflare/component-multistep-modal",
3
3
  "description": "Multistep modal with a progress bar",
4
- "version": "1.3.130",
4
+ "version": "1.3.133",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
8
8
  "author": "Vojtech Miksu <vojtech@cloudflare.com>",
9
9
  "license": "BSD-3-Clause",
10
10
  "publishConfig": {
11
- "registry": "https://registry.npmjs.org/",
12
- "access": "public"
11
+ "access": "public",
12
+ "main": "lib/index.js",
13
+ "module": "es/index.js"
13
14
  },
14
15
  "dependencies": {
15
- "@cloudflare/component-box": "^2.4.4",
16
- "@cloudflare/component-button": "^3.2.7",
17
- "@cloudflare/component-modal": "^3.1.7",
18
- "@cloudflare/component-progress": "^4.4.199",
19
- "@cloudflare/component-test-dummy": "^2.0.500",
20
- "@cloudflare/style-container": "^7.8.44",
16
+ "@cloudflare/component-box": "^2.4.7",
17
+ "@cloudflare/component-button": "^3.2.9",
18
+ "@cloudflare/component-modal": "^3.1.10",
19
+ "@cloudflare/component-progress": "^4.4.201",
20
+ "@cloudflare/component-test-dummy": "^2.0.502",
21
+ "@cloudflare/intl-react": "^1.9.80",
22
+ "@cloudflare/style-container": "^7.8.46",
21
23
  "prop-types": "^15.6.0"
22
24
  },
23
25
  "peerDependencies": {
@@ -28,6 +30,5 @@
28
30
  "isStandAloneApp": false,
29
31
  "autoGeneratedReadme": true,
30
32
  "category": "structure"
31
- },
32
- "gitHead": "d8669b68225ffc54a1ee93e83580a2e6a57fba6b"
33
- }
33
+ }
34
+ }