@synerise/ds-wizard 0.1.75 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,38 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.2.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-wizard@0.2.2...@synerise/ds-wizard@0.2.3) (2021-11-22)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-wizard
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.2.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-wizard@0.2.1...@synerise/ds-wizard@0.2.2) (2021-11-16)
15
+
16
+ **Note:** Version bump only for package @synerise/ds-wizard
17
+
18
+
19
+
20
+
21
+
22
+ ## [0.2.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-wizard@0.1.75...@synerise/ds-wizard@0.2.1) (2021-11-09)
23
+
24
+ **Note:** Version bump only for package @synerise/ds-wizard
25
+
26
+
27
+
28
+
29
+
30
+ # [0.2.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-wizard@0.1.75...@synerise/ds-wizard@0.2.0) (2021-11-09)
31
+
32
+ **Note:** Version bump only for package @synerise/ds-wizard
33
+
34
+
35
+
36
+
37
+
6
38
  ## [0.1.75](https://github.com/Synerise/synerise-design/compare/@synerise/ds-wizard@0.1.74...@synerise/ds-wizard@0.1.75) (2021-11-05)
7
39
 
8
40
  **Note:** Version bump only for package @synerise/ds-wizard
package/dist/Wizard.js CHANGED
@@ -1,9 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import Layout from '@synerise/ds-layout';
3
3
  import PageHeader from '@synerise/ds-page-header/dist/PageHeader';
4
- import { ArrowLeftCircleM } from '@synerise/ds-icon/dist/icons';
5
4
  import Button from '@synerise/ds-button';
6
- import Icon from '@synerise/ds-icon';
5
+ import Icon, { ArrowLeftCircleM } from '@synerise/ds-icon';
7
6
  import { useIntl } from 'react-intl';
8
7
  import * as S from './Wizard.styles';
9
8
  import WizardOnModal from './onModal/onModal'; // scrollbar displays on left when using portal
@@ -22,37 +21,37 @@ var Wizard = function Wizard(_ref) {
22
21
  texts = _ref.texts,
23
22
  visible = _ref.visible;
24
23
  var intl = useIntl();
25
- return visible ? React.createElement(S.WizardWrapper, {
24
+ return visible ? /*#__PURE__*/React.createElement(S.WizardWrapper, {
26
25
  className: "ds-wizard"
27
- }, React.createElement(Layout, {
26
+ }, /*#__PURE__*/React.createElement(Layout, {
28
27
  fullPage: true,
29
- header: React.createElement(PageHeader, {
28
+ header: /*#__PURE__*/React.createElement(PageHeader, {
30
29
  title: title,
31
30
  onClose: onClose,
32
- rightSide: React.createElement(S.WizardHeader, {
31
+ rightSide: /*#__PURE__*/React.createElement(S.WizardHeader, {
33
32
  withHeaderAction: !!headerAction
34
- }, stepper && React.createElement(S.WizardStepper, null, stepper), headerAction && React.createElement(S.WizardHeaderAction, null, headerAction))
33
+ }, stepper && /*#__PURE__*/React.createElement(S.WizardStepper, null, stepper), headerAction && /*#__PURE__*/React.createElement(S.WizardHeaderAction, null, headerAction))
35
34
  })
36
- }, React.createElement(S.WizardContainer, {
35
+ }, /*#__PURE__*/React.createElement(S.WizardContainer, {
37
36
  withFooter: Boolean(footer)
38
- }, React.createElement(S.WizardContent, {
37
+ }, /*#__PURE__*/React.createElement(S.WizardContent, {
39
38
  contentWidth: contentWidth
40
- }, children, React.createElement(S.WizardButtons, null, onPrevStep ? React.createElement(Button, {
39
+ }, children, /*#__PURE__*/React.createElement(S.WizardButtons, null, onPrevStep ? /*#__PURE__*/React.createElement(Button, {
41
40
  mode: "icon-label",
42
41
  type: "ghost",
43
42
  onClick: onPrevStep
44
- }, React.createElement(Icon, {
45
- component: React.createElement(ArrowLeftCircleM, null)
46
- }), ' ', (texts === null || texts === void 0 ? void 0 : texts.prevButtonLabel) || intl.formatMessage({
43
+ }, /*#__PURE__*/React.createElement(Icon, {
44
+ component: /*#__PURE__*/React.createElement(ArrowLeftCircleM, null)
45
+ }), ' ', (texts == null ? void 0 : texts.prevButtonLabel) || intl.formatMessage({
47
46
  id: 'DS.WIZARD.PREV-BUTTON',
48
47
  defaultMessage: 'Back'
49
- })) : React.createElement(S.ButtonPlaceholder, null), onNextStep && React.createElement(Button, {
48
+ })) : /*#__PURE__*/React.createElement(S.ButtonPlaceholder, null), onNextStep && /*#__PURE__*/React.createElement(Button, {
50
49
  type: "primary",
51
50
  onClick: onNextStep
52
- }, (texts === null || texts === void 0 ? void 0 : texts.nextButtonLabel) || intl.formatMessage({
51
+ }, (texts == null ? void 0 : texts.nextButtonLabel) || intl.formatMessage({
53
52
  id: 'DS.WIZARD.NEXT-BUTTON',
54
53
  defaultMessage: 'Next step'
55
- }))))), footer && React.createElement(S.WizardFooter, null, footer))) : null;
54
+ }))))), footer && /*#__PURE__*/React.createElement(S.WizardFooter, null, footer))) : null;
56
55
  };
57
56
 
58
57
  Wizard.OnModal = WizardOnModal;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,24 +1,8 @@
1
- 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); }
2
-
3
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
-
5
- 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); } }
6
-
7
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
8
-
9
- 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); }
10
-
11
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
12
-
13
- function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
14
-
15
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
16
-
17
1
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
18
2
 
19
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
3
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
20
4
 
21
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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; }
22
6
 
23
7
  import * as React from 'react';
24
8
  import * as ReactDOM from 'react-dom';
@@ -37,40 +21,36 @@ var getPortalRoot = function getPortalRoot() {
37
21
  };
38
22
 
39
23
  var WizardPortal = /*#__PURE__*/function (_React$Component) {
40
- _inherits(WizardPortal, _React$Component);
41
-
42
- var _super = _createSuper(WizardPortal);
24
+ _inheritsLoose(WizardPortal, _React$Component);
43
25
 
44
26
  function WizardPortal(props) {
45
27
  var _this;
46
28
 
47
- _classCallCheck(this, WizardPortal);
29
+ _this = _React$Component.call(this, props) || this;
30
+
31
+ _defineProperty(_assertThisInitialized(_this), "modalRoot", void 0);
32
+
33
+ _defineProperty(_assertThisInitialized(_this), "el", void 0);
48
34
 
49
- _this = _super.call(this, props);
50
- _this.modalRoot = void 0;
51
- _this.el = void 0;
52
35
  _this.modalRoot = getPortalRoot();
53
36
  _this.el = document.createElement('div');
54
37
  return _this;
55
38
  }
56
39
 
57
- _createClass(WizardPortal, [{
58
- key: "componentDidMount",
59
- value: function componentDidMount() {
60
- this.modalRoot.appendChild(this.el);
61
- }
62
- }, {
63
- key: "componentWillUnmount",
64
- value: function componentWillUnmount() {
65
- this.modalRoot.removeChild(this.el);
66
- }
67
- }, {
68
- key: "render",
69
- value: function render() {
70
- var children = this.props.children;
71
- return ReactDOM.createPortal(children, this.el);
72
- }
73
- }]);
40
+ var _proto = WizardPortal.prototype;
41
+
42
+ _proto.componentDidMount = function componentDidMount() {
43
+ this.modalRoot.appendChild(this.el);
44
+ };
45
+
46
+ _proto.componentWillUnmount = function componentWillUnmount() {
47
+ this.modalRoot.removeChild(this.el);
48
+ };
49
+
50
+ _proto.render = function render() {
51
+ var children = this.props.children;
52
+ return ReactDOM.createPortal(children, this.el);
53
+ };
74
54
 
75
55
  return WizardPortal;
76
56
  }(React.Component);
@@ -3,8 +3,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
3
3
  import * as React from 'react';
4
4
  import Modal from '@synerise/ds-modal';
5
5
  import Button from '@synerise/ds-button';
6
- import Icon from '@synerise/ds-icon';
7
- import { ArrowLeftCircleM } from '@synerise/ds-icon/dist/icons';
6
+ import Icon, { ArrowLeftCircleM } from '@synerise/ds-icon';
8
7
  import { useIntl } from 'react-intl';
9
8
  import * as S from '../Wizard.styles';
10
9
 
@@ -20,30 +19,30 @@ var WizardOnModal = function WizardOnModal(_ref) {
20
19
  texts = _ref.texts,
21
20
  modalProps = _ref.modalProps;
22
21
  var intl = useIntl();
23
- return React.createElement(Modal, _extends({
22
+ return /*#__PURE__*/React.createElement(Modal, _extends({
24
23
  visible: visible,
25
24
  onCancel: onClose,
26
25
  closable: true,
27
26
  title: title
28
27
  }, modalProps, {
29
- headerActions: React.createElement(S.HeaderActions, null, stepper, " ", headerAction),
30
- footer: React.createElement(S.ModalWizardButtons, null, onPrevStep ? React.createElement(Button, {
28
+ headerActions: /*#__PURE__*/React.createElement(S.HeaderActions, null, stepper, " ", headerAction),
29
+ footer: /*#__PURE__*/React.createElement(S.ModalWizardButtons, null, onPrevStep ? /*#__PURE__*/React.createElement(Button, {
31
30
  mode: "icon-label",
32
31
  type: "ghost",
33
32
  onClick: onPrevStep
34
- }, React.createElement(Icon, {
35
- component: React.createElement(ArrowLeftCircleM, null)
36
- }), ' ', (texts === null || texts === void 0 ? void 0 : texts.prevButtonLabel) || intl.formatMessage({
33
+ }, /*#__PURE__*/React.createElement(Icon, {
34
+ component: /*#__PURE__*/React.createElement(ArrowLeftCircleM, null)
35
+ }), ' ', (texts == null ? void 0 : texts.prevButtonLabel) || intl.formatMessage({
37
36
  id: 'DS.WIZARD.PREV-BUTTON',
38
37
  defaultMessage: 'Back'
39
- })) : React.createElement(S.ButtonPlaceholder, null), onNextStep && React.createElement(Button, {
38
+ })) : /*#__PURE__*/React.createElement(S.ButtonPlaceholder, null), onNextStep && /*#__PURE__*/React.createElement(Button, {
40
39
  type: "primary",
41
40
  onClick: onNextStep
42
- }, (texts === null || texts === void 0 ? void 0 : texts.nextButtonLabel) || intl.formatMessage({
41
+ }, (texts == null ? void 0 : texts.nextButtonLabel) || intl.formatMessage({
43
42
  id: 'DS.WIZARD.NEXT-BUTTON',
44
43
  defaultMessage: 'Next step'
45
44
  })))
46
- }), React.createElement(S.ModalWizardContent, null, children));
45
+ }), /*#__PURE__*/React.createElement(S.ModalWizardContent, null, children));
47
46
  };
48
47
 
49
48
  export default WizardOnModal;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-wizard",
3
- "version": "0.1.75",
3
+ "version": "0.2.3",
4
4
  "description": "Wizard UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -32,15 +32,15 @@
32
32
  ],
33
33
  "types": "dist/index.d.ts",
34
34
  "dependencies": {
35
- "@synerise/ds-button": "^0.15.0",
36
- "@synerise/ds-icon": "^0.45.2",
37
- "@synerise/ds-layout": "^0.7.44",
38
- "@synerise/ds-modal": "^0.14.15",
39
- "@synerise/ds-page-header": "^0.12.70"
35
+ "@synerise/ds-button": "^0.16.2",
36
+ "@synerise/ds-icon": "^0.46.2",
37
+ "@synerise/ds-layout": "^0.8.2",
38
+ "@synerise/ds-modal": "^0.15.2",
39
+ "@synerise/ds-page-header": "^0.13.3"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@synerise/ds-core": "*",
43
43
  "react": ">=16.9.0 < 17.0.0"
44
44
  },
45
- "gitHead": "bf865b6d1967c42effb68dc794f34dd18ddebe27"
45
+ "gitHead": "2468359677783819939fb9f1ef5acc36667ecd1a"
46
46
  }