@configuratorware/configurator-frontendgui 1.49.9 → 1.50.1

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 (107) hide show
  1. package/App/Error/ProductionErrorPage/index.js +5 -1
  2. package/App/Modules/Creator/Components/Incompatibility/OptionExclusionRule/index.js +2 -1
  3. package/App/Modules/Creator/Components/Incompatibility/OptionRule/index.js +2 -1
  4. package/App/Modules/Creator/Components/Incompatibility/index.js +1 -2
  5. package/App/Modules/Creator/Components/InvalidConfigurationNotice/index.js +8 -31
  6. package/App/Modules/Creator/Components/Option/index.js +18 -14
  7. package/App/Modules/Creator/Components/OptionAmount/index.js +11 -7
  8. package/App/Modules/Creator/Components/ProductPart/index.js +20 -25
  9. package/App/Modules/Creator/Components/ProductPartsList/index.js +0 -2
  10. package/App/Modules/Creator/Layouts/DefaultLayout.js +8 -9
  11. package/App/Modules/Designer/Components/AddGalleryImage/index.js +5 -2
  12. package/App/Modules/Designer/Components/DesignerSelectionToolbox/CustomFontOverlay.js +0 -2
  13. package/App/Modules/Designer/Components/Dialog/index.js +1 -3
  14. package/App/Modules/Designer/Components/ImageControlbox/index.js +1 -3
  15. package/App/Reducers/Reducer.js +8 -2
  16. package/App/Screens/Configurator/Components/Confirm/index.js +1 -5
  17. package/App/Screens/Configurator/Components/Error/index.js +0 -3
  18. package/App/Screens/Configurator/Components/FullScreenView/index.js +2 -5
  19. package/App/Screens/Configurator/Components/FullScreenView/index.test.js +1 -1
  20. package/App/Screens/Configurator/Components/PreviewPortal/index.js +23 -28
  21. package/App/Screens/Configurator/Components/Thumbnail/index.js +9 -6
  22. package/App/Screens/Configurator/ThemeProvider.js +7 -4
  23. package/App/Shared/Components/AccessibleButton/AccessibleButton.js +40 -0
  24. package/App/Shared/Components/AlertDialog/index.js +0 -3
  25. package/App/Shared/Components/AmountPrice/index.js +29 -20
  26. package/App/Shared/Components/Analytics/AnalyticsWrapper.js +7 -1
  27. package/App/Shared/Components/AutoFocusDialogContentContainer/AutoFocusDialogContentContainer.js +71 -0
  28. package/App/Shared/Components/BulkNames/index.js +9 -6
  29. package/App/Shared/Components/LoadConfiguration/index.js +0 -2
  30. package/App/Shared/Components/PdfDownload/index.js +0 -2
  31. package/App/Shared/Components/SaveConfiguration/index.js +3 -4
  32. package/App/Shared/Components/SendEmail/index.js +0 -2
  33. package/App/Shared/Components/ToolbarList/index.js +18 -16
  34. package/App/Shared/Hooks/useDialogId.js +19 -0
  35. package/Shared/Components/CustomDialog.js +77 -56
  36. package/package.json +4 -4
  37. package/public/invoke.js +1 -1
  38. package/public/translations/de_DE.json +2 -1
  39. package/public/translations/en_GB.json +2 -1
  40. package/scripts/utils/fileSystem.js +6 -1
  41. package/src/App/Error/ProductionErrorPage/index.js +27 -24
  42. package/src/App/Modules/Creator/Components/Incompatibility/OptionExclusionRule/index.js +1 -1
  43. package/src/App/Modules/Creator/Components/Incompatibility/OptionRule/index.js +1 -1
  44. package/src/App/Modules/Creator/Components/Incompatibility/index.js +1 -2
  45. package/src/App/Modules/Creator/Components/InvalidConfigurationNotice/index.js +10 -27
  46. package/src/App/Modules/Creator/Components/Option/__snapshots__/index.test.js.snap +142 -90
  47. package/src/App/Modules/Creator/Components/Option/index.js +30 -14
  48. package/src/App/Modules/Creator/Components/OptionAmount/__snapshots__/index.test.js.snap +31 -18
  49. package/src/App/Modules/Creator/Components/OptionAmount/index.js +7 -2
  50. package/src/App/Modules/Creator/Components/ProductPart/__snapshots__/index.test.js.snap +32 -24
  51. package/src/App/Modules/Creator/Components/ProductPart/index.js +20 -27
  52. package/src/App/Modules/Creator/Components/ProductPartsList/index.js +0 -2
  53. package/src/App/Modules/Creator/Layouts/DefaultLayout.js +12 -13
  54. package/src/App/Modules/Designer/Components/AddGalleryImage/__snapshots__/index.test.jsx.snap +1 -0
  55. package/src/App/Modules/Designer/Components/AddGalleryImage/index.js +4 -1
  56. package/src/App/Modules/Designer/Components/DesignerSelectionToolbox/CustomFontOverlay.js +0 -2
  57. package/src/App/Modules/Designer/Components/Dialog/index.js +1 -1
  58. package/src/App/Modules/Designer/Components/ImageControlbox/index.js +0 -2
  59. package/src/App/Reducers/Reducer.js +7 -0
  60. package/src/App/Screens/Configurator/Components/Confirm/index.js +1 -3
  61. package/src/App/Screens/Configurator/Components/Error/index.js +2 -11
  62. package/src/App/Screens/Configurator/Components/FullScreenView/__snapshots__/index.test.jsx.snap +3 -4
  63. package/src/App/Screens/Configurator/Components/FullScreenView/index.js +17 -17
  64. package/src/App/Screens/Configurator/Components/FullScreenView/index.test.jsx +1 -1
  65. package/src/App/Screens/Configurator/Components/PreviewPortal/index.js +23 -32
  66. package/src/App/Screens/Configurator/Components/Thumbnail/__snapshots__/index.test.jsx.snap +32 -8
  67. package/src/App/Screens/Configurator/Components/Thumbnail/index.js +8 -5
  68. package/src/App/Screens/Configurator/ThemeProvider.js +6 -3
  69. package/src/App/Shared/Components/AccessibleButton/AccessibleButton.js +29 -0
  70. package/src/App/Shared/Components/AlertDialog/index.js +1 -6
  71. package/src/App/Shared/Components/AmountPrice/__snapshots__/index.test.jsx.snap +15 -15
  72. package/src/App/Shared/Components/AmountPrice/index.js +31 -21
  73. package/src/App/Shared/Components/Analytics/AnalyticsWrapper.js +6 -0
  74. package/src/App/Shared/Components/AutoFocusDialogContentContainer/AutoFocusDialogContentContainer.jsx +52 -0
  75. package/src/App/Shared/Components/BulkNames/index.js +11 -6
  76. package/src/App/Shared/Components/LoadConfiguration/index.js +0 -2
  77. package/src/App/Shared/Components/PdfDownload/index.js +0 -2
  78. package/src/App/Shared/Components/SaveConfiguration/index.js +6 -4
  79. package/src/App/Shared/Components/SendEmail/index.js +0 -2
  80. package/src/App/Shared/Components/ToolbarList/__snapshots__/ToolbarList.test.js.snap +44 -20
  81. package/src/App/Shared/Components/ToolbarList/index.js +30 -27
  82. package/src/App/Shared/Hooks/useDialogId.js +11 -0
  83. package/src/Shared/Components/CustomDialog.js +60 -43
  84. package/App/Modules/Creator/Components/LoginForm/Styles.scss +0 -9
  85. package/App/Modules/Creator/Components/LoginForm/index.js +0 -91
  86. package/App/Modules/Creator/Components/SavedConfiguration/Styles.scss +0 -19
  87. package/App/Modules/Creator/Components/SavedConfiguration/index.js +0 -50
  88. package/App/Modules/Creator/Components/ShareConfiguration/Styles.scss +0 -23
  89. package/App/Modules/Creator/Components/ShareConfiguration/index.js +0 -165
  90. package/App/Modules/Creator/Components/StockInformation/index.js +0 -62
  91. package/App/Modules/Creator/Components/StoreConfigurationForm/Styles.scss +0 -5
  92. package/App/Modules/Creator/Components/StoreConfigurationForm/index.js +0 -86
  93. package/App/Modules/Creator/Components/ValidationResult/Styles.scss +0 -45
  94. package/App/Modules/Creator/Components/ValidationResult/index.js +0 -119
  95. package/App/Modules/Creator/Components/index.js +0 -57
  96. package/src/App/Modules/Creator/Components/LoginForm/Styles.scss +0 -9
  97. package/src/App/Modules/Creator/Components/LoginForm/index.js +0 -69
  98. package/src/App/Modules/Creator/Components/SavedConfiguration/Styles.scss +0 -19
  99. package/src/App/Modules/Creator/Components/SavedConfiguration/index.js +0 -37
  100. package/src/App/Modules/Creator/Components/ShareConfiguration/Styles.scss +0 -23
  101. package/src/App/Modules/Creator/Components/ShareConfiguration/index.js +0 -161
  102. package/src/App/Modules/Creator/Components/StockInformation/index.js +0 -39
  103. package/src/App/Modules/Creator/Components/StoreConfigurationForm/Styles.scss +0 -5
  104. package/src/App/Modules/Creator/Components/StoreConfigurationForm/index.js +0 -73
  105. package/src/App/Modules/Creator/Components/ValidationResult/Styles.scss +0 -45
  106. package/src/App/Modules/Creator/Components/ValidationResult/index.js +0 -89
  107. package/src/App/Modules/Creator/Components/index.js +0 -51
@@ -1,165 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = exports.ShareOnMedia = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _i18n = require("../../../../../Framework/i18n");
9
- require("./Styles.scss");
10
- var _configuration = require("../../../../configuration");
11
- var _propTypes = _interopRequireDefault(require("prop-types"));
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
- 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); }
14
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
15
- 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, _toPropertyKey(descriptor.key), descriptor); } }
16
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
17
- 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); }
18
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
19
- 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); }; }
20
- 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); }
21
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
22
- 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; } }
23
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
24
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
25
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
26
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
27
- var ShareOnMedia = exports.ShareOnMedia = (0, _i18n.translateComponent)( /*#__PURE__*/function (_React$Component) {
28
- _inherits(_class2, _React$Component);
29
- var _super = _createSuper(_class2);
30
- function _class2() {
31
- var _this;
32
- _classCallCheck(this, _class2);
33
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
34
- args[_key] = arguments[_key];
35
- }
36
- _this = _super.call.apply(_super, [this].concat(args));
37
- _defineProperty(_assertThisInitialized(_this), "onClick", function (evt, type) {
38
- if (_this.props.onClick) {
39
- var url = _this.props.url;
40
- _this.props.onClick(evt, type, url);
41
- }
42
- });
43
- _defineProperty(_assertThisInitialized(_this), "onClickEmail", function (evt) {
44
- return _this.onClick(evt, 'email');
45
- });
46
- _defineProperty(_assertThisInitialized(_this), "onClickFacebook", function (evt) {
47
- return _this.onClick(evt, 'facebook');
48
- });
49
- _defineProperty(_assertThisInitialized(_this), "onClickTwitter", function (evt) {
50
- return _this.onClick(evt, 'twitter');
51
- });
52
- _defineProperty(_assertThisInitialized(_this), "onClickPinterest", function (evt) {
53
- return _this.onClick(evt, 'pinterest');
54
- });
55
- return _this;
56
- }
57
- _createClass(_class2, [{
58
- key: "render",
59
- value: function render() {
60
- var props = this.props;
61
- var urlEncoded = encodeURIComponent(props.url);
62
- var imgUrl = props.previewImageURL !== false ? props.previewImageURL : '';
63
- var imgUrlEncoded = encodeURIComponent(imgUrl);
64
- var facebookLink = "https://www.facebook.com/sharer/sharer.php?u=".concat(urlEncoded);
65
- var twitterLink = "https://twitter.com/intent/tweet?text=".concat(props.t('share.twitter.text'), "&url=").concat(urlEncoded);
66
- var pinterestLink = "https://pinterest.com/pin/create/button/?url=".concat(urlEncoded, "&media=").concat(imgUrlEncoded, "&description=");
67
- var emailLink = "mailto:?subject=".concat(props.t('share.email.subject'), "&body=").concat(props.t('share.email.body').replace(/{shareLink}/g, props.url));
68
-
69
- // the hiden iframe is to prevent triggering of unBeforeUnload in Chrome
70
- // see https://stackoverflow.com/questions/9740510/mailto-link-in-chrome-is-triggering-window-onbeforeunload-can-i-prevent-this
71
-
72
- return /*#__PURE__*/_react["default"].createElement("div", {
73
- className: "shareconfiguration-media"
74
- }, /*#__PURE__*/_react["default"].createElement("a", {
75
- className: "email share-email",
76
- href: emailLink,
77
- target: "hidden-email-share-iframe",
78
- onClick: this.onClickEmail
79
- }, /*#__PURE__*/_react["default"].createElement("i", {
80
- className: "ion-ios-email-outline"
81
- })), /*#__PURE__*/_react["default"].createElement("iframe", {
82
- name: "hidden-email-share-iframe",
83
- className: "hidden-email-share-iframe"
84
- }), /*#__PURE__*/_react["default"].createElement("a", {
85
- className: "facebook share-facebook",
86
- href: facebookLink,
87
- target: "_blank",
88
- rel: "noopener noreferrer",
89
- onClick: this.onClickFacebook
90
- }, /*#__PURE__*/_react["default"].createElement("i", {
91
- className: "ion-social-facebook-outline"
92
- })), /*#__PURE__*/_react["default"].createElement("a", {
93
- className: "twitter share-twitter",
94
- href: twitterLink,
95
- target: "_blank",
96
- rel: "noopener noreferrer",
97
- onClick: this.onClickTwitter
98
- }, /*#__PURE__*/_react["default"].createElement("i", {
99
- className: "ion-social-twitter-outline"
100
- })), /*#__PURE__*/_react["default"].createElement("a", {
101
- className: "pinterest share-pinterest",
102
- href: pinterestLink,
103
- target: "_blank",
104
- rel: "noopener noreferrer",
105
- onClick: this.onClickPinterest
106
- }, /*#__PURE__*/_react["default"].createElement("i", {
107
- className: "ion-social-pinterest-outline"
108
- })));
109
- }
110
- }]);
111
- return _class2;
112
- }(_react["default"].Component));
113
- var ShareConfiguration = /*#__PURE__*/function (_React$Component2) {
114
- _inherits(ShareConfiguration, _React$Component2);
115
- var _super2 = _createSuper(ShareConfiguration);
116
- function ShareConfiguration() {
117
- _classCallCheck(this, ShareConfiguration);
118
- return _super2.apply(this, arguments);
119
- }
120
- _createClass(ShareConfiguration, [{
121
- key: "render",
122
- value: function render() {
123
- var Dialog = (0, _configuration.getComponent)('Dialog');
124
- var _this$props = this.props,
125
- workInProgress = _this$props.workInProgress,
126
- errorMessage = _this$props.errorMessage,
127
- code = _this$props.code,
128
- show = _this$props.show,
129
- onClose = _this$props.onClose,
130
- onClickShareButton = _this$props.onClickShareButton,
131
- children = _this$props.children;
132
- var _this$props2 = this.props,
133
- shareUrl = _this$props2.shareUrl,
134
- previewImageURL = _this$props2.previewImageURL;
135
- if (!shareUrl) {
136
- // if not present trying to generate one..
137
- shareUrl = window.location.href.match(/.+\//).toString() + 'code:' + code;
138
- }
139
- return /*#__PURE__*/_react["default"].createElement(Dialog, {
140
- show: show,
141
- relativeTo: "parent",
142
- overlay: true,
143
- onClose: onClose,
144
- animation: "grow",
145
- title: "shareConfiguration.dialogTitle",
146
- className: "shareconfiguration-dialog"
147
- }, children || /*#__PURE__*/_react["default"].createElement("div", {
148
- className: "shareconfiguration"
149
- }, workInProgress && /*#__PURE__*/_react["default"].createElement("div", null, (0, _i18n.T)('shareConfiguration.savingInProgress')), errorMessage && /*#__PURE__*/_react["default"].createElement("div", {
150
- className: "error"
151
- }, (0, _i18n.T)(errorMessage)), !workInProgress && shareUrl && /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", null, (0, _i18n.T)('shareConfiguration.successfullySaved')), /*#__PURE__*/_react["default"].createElement("div", null, (0, _i18n.T)('shareConfiguration.infoText')), /*#__PURE__*/_react["default"].createElement("a", {
152
- href: shareUrl,
153
- target: "_blank",
154
- rel: "noopener noreferrer",
155
- className: "shareconfiguration-link"
156
- }, shareUrl), /*#__PURE__*/_react["default"].createElement(ShareOnMedia, {
157
- url: shareUrl,
158
- previewImageURL: previewImageURL,
159
- onClick: onClickShareButton
160
- }))));
161
- }
162
- }]);
163
- return ShareConfiguration;
164
- }(_react["default"].Component);
165
- var _default = exports["default"] = ShareConfiguration;
@@ -1,62 +0,0 @@
1
- "use strict";
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); }
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports["default"] = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _i18n = require("../../../../../Framework/i18n");
10
- var _configuration = require("../../../../configuration");
11
- var _propTypes = _interopRequireDefault(require("prop-types"));
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14
- 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, _toPropertyKey(descriptor.key), descriptor); } }
15
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
16
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
17
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
18
- 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); }
19
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
20
- 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); }; }
21
- 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); }
22
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
23
- 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; } }
24
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
25
- var StockInformation = exports["default"] = /*#__PURE__*/function (_React$Component) {
26
- _inherits(StockInformation, _React$Component);
27
- var _super = _createSuper(StockInformation);
28
- function StockInformation() {
29
- _classCallCheck(this, StockInformation);
30
- return _super.apply(this, arguments);
31
- }
32
- _createClass(StockInformation, [{
33
- key: "render",
34
- value: function render() {
35
- var Dialog = (0, _configuration.getComponent)('Dialog');
36
- var _this$props = this.props,
37
- option = _this$props.option,
38
- show = _this$props.show;
39
- if (!option || !option.stock) {
40
- return /*#__PURE__*/_react["default"].createElement("div", null);
41
- }
42
- return /*#__PURE__*/_react["default"].createElement(Dialog, {
43
- show: show,
44
- title: "stockInformation.dialogTitle",
45
- relativeTo: "parent",
46
- overlay: true,
47
- onClose: this.onClose,
48
- animation: "grow",
49
- className: 'stockinformation-dialog'
50
- }, /*#__PURE__*/_react["default"].createElement("div", {
51
- className: "stockinformation"
52
- }, /*#__PURE__*/_react["default"].createElement("span", {
53
- className: "stockinformation-text"
54
- }, (0, _i18n.T)('stockInformation.deliveryTime', {
55
- date: /*#__PURE__*/_react["default"].createElement("span", {
56
- className: "stockinformation-date"
57
- }, option.stock.deliverytime)
58
- }), ' ')));
59
- }
60
- }]);
61
- return StockInformation;
62
- }(_react["default"].Component);
@@ -1,5 +0,0 @@
1
- .storeconfigurationform {
2
- &.hide {
3
- display: none;
4
- }
5
- }
@@ -1,86 +0,0 @@
1
- "use strict";
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); }
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports["default"] = exports.StoreConfigurationForm = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _i18n = require("../../../../../Framework/i18n");
10
- var _get = _interopRequireDefault(require("lodash/get"));
11
- require("./Styles.scss");
12
- var _propTypes = _interopRequireDefault(require("prop-types"));
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
15
- 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, _toPropertyKey(descriptor.key), descriptor); } }
16
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
17
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
18
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
19
- 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); }
20
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
21
- 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); }; }
22
- 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); }
23
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
24
- 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; } }
25
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
26
- var StoreConfigurationForm = exports.StoreConfigurationForm = /*#__PURE__*/function (_React$Component) {
27
- _inherits(StoreConfigurationForm, _React$Component);
28
- var _super = _createSuper(StoreConfigurationForm);
29
- function StoreConfigurationForm(props) {
30
- var _this;
31
- _classCallCheck(this, StoreConfigurationForm);
32
- _this = _super.call(this, props);
33
- _this.state = {
34
- isSaved: false
35
- };
36
- return _this;
37
- }
38
- _createClass(StoreConfigurationForm, [{
39
- key: "componentDidUpdate",
40
- value: function componentDidUpdate(prevProps) {
41
- this.props.show && !prevProps.show && this.setState({
42
- isSaved: false
43
- });
44
- }
45
- }, {
46
- key: "onSubmit",
47
- value: function onSubmit(e) {
48
- var _this2 = this;
49
- e.preventDefault();
50
- this.props.onStore(this.nameInput.value).then(function (action) {
51
- _this2.setState({
52
- isSaved: !(0, _get["default"])(action, 'data.error')
53
- });
54
- });
55
- }
56
- }, {
57
- key: "render",
58
- value: function render() {
59
- var _this3 = this;
60
- var _this$props = this.props,
61
- show = _this$props.show,
62
- profile = _this$props.profile;
63
- return /*#__PURE__*/_react["default"].createElement("div", {
64
- className: 'storeconfigurationform' + (show ? ' show' : ' hide')
65
- }, /*#__PURE__*/_react["default"].createElement("div", null, this.t('storeConfigurationForm.infoText')), this.state.isSaved ? /*#__PURE__*/_react["default"].createElement("div", null, this.t('storeConfigurationForm.savedText')) : /*#__PURE__*/_react["default"].createElement("form", {
66
- onSubmit: this.onSubmit.bind(this)
67
- }, /*#__PURE__*/_react["default"].createElement("input", {
68
- type: "text",
69
- ref: function ref(el) {
70
- return _this3.nameInput = el;
71
- },
72
- placeholder: this.t('storeConfigurationForm.name')
73
- }), /*#__PURE__*/_react["default"].createElement("button", {
74
- type: "submit",
75
- className: "primary-button storeconfigurationform-storeButton"
76
- }, this.t('storeConfigurationForm.storeButton'))), profile.error && /*#__PURE__*/_react["default"].createElement("div", {
77
- className: "storeconfigurationform-error",
78
- dangerouslySetInnerHTML: {
79
- __html: profile.error instanceof Object ? JSON.stringify(profile.error) : profile.error
80
- }
81
- }));
82
- }
83
- }]);
84
- return StoreConfigurationForm;
85
- }(_react["default"].Component);
86
- var _default = exports["default"] = (0, _i18n.translateComponent)(StoreConfigurationForm);
@@ -1,45 +0,0 @@
1
- @import "../../../../../Framework/Mixins";
2
- @import "../../../../../Resources/Icons/ioniconsExtend";
3
-
4
- %iconfix {
5
- &:before {
6
- position: absolute;
7
- left: 0;
8
- top: -1px;
9
- font-size: 18px;
10
- }
11
- }
12
-
13
- .validationresult {
14
-
15
- .validationresult-item {
16
- padding: 0 30px 10px 30px;
17
- position: relative;
18
-
19
- ul {
20
- padding-top: 10px;
21
- }
22
- }
23
-
24
- .error {
25
- color: inherit;
26
- @extend %ion-alert-circled;
27
- @extend %iconfix;
28
-
29
- &:before, > span {
30
- color: red;
31
- }
32
- }
33
-
34
- .warning {
35
- @extend %ion-information-circled;
36
- @extend %iconfix;
37
- }
38
- }
39
-
40
- .validationresult-dialog {
41
- .dialog {
42
- max-height: calc(100% - 40px);
43
- margin: 20px auto;
44
- }
45
- }
@@ -1,119 +0,0 @@
1
- "use strict";
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); }
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports["default"] = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _i18n = require("../../../../../Framework/i18n");
10
- var _configuration = require("../../../../configuration");
11
- require("./Styles.scss");
12
- var _propTypes = _interopRequireDefault(require("prop-types"));
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
15
- 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); }
16
- 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; }
17
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18
- 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, _toPropertyKey(descriptor.key), descriptor); } }
19
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
20
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
21
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
22
- 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); }
23
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
24
- 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); }; }
25
- 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); }
26
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
27
- 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; } }
28
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
29
- var ValidationResult = exports["default"] = /*#__PURE__*/function (_React$Component) {
30
- _inherits(ValidationResult, _React$Component);
31
- var _super = _createSuper(ValidationResult);
32
- function ValidationResult() {
33
- _classCallCheck(this, ValidationResult);
34
- return _super.apply(this, arguments);
35
- }
36
- _createClass(ValidationResult, [{
37
- key: "renderDataValidation",
38
- value: function renderDataValidation() {
39
- var _this$props = this.props,
40
- validationResult = _this$props.validationResult,
41
- optionclassifications = _this$props.optionclassifications;
42
- if (!validationResult || !validationResult.data) {
43
- return [];
44
- }
45
- var errors = [];
46
- var missingOptions = [];
47
- var invalidOptions = [];
48
- var _iterator = _createForOfIteratorHelper(optionclassifications),
49
- _step;
50
- try {
51
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
52
- var oc = _step.value;
53
- var ocv = validationResult.data[oc.identifier];
54
- if (ocv) {
55
- if (ocv.selectedoptions !== true) {
56
- missingOptions.push(oc.title);
57
- }
58
- var _iterator2 = _createForOfIteratorHelper(ocv.options),
59
- _step2;
60
- try {
61
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
62
- var option = _step2.value;
63
- if (option.valid !== true) {
64
- invalidOptions.push(oc.title);
65
- }
66
- }
67
- } catch (err) {
68
- _iterator2.e(err);
69
- } finally {
70
- _iterator2.f();
71
- }
72
- }
73
- }
74
- } catch (err) {
75
- _iterator.e(err);
76
- } finally {
77
- _iterator.f();
78
- }
79
- if (missingOptions.length > 0) {
80
- errors.push( /*#__PURE__*/_react["default"].createElement("div", {
81
- key: "requiredoption",
82
- className: "validationresult-item error requiredoption"
83
- }, (0, _i18n.T)('validationResult.requiredOption'), /*#__PURE__*/_react["default"].createElement("ul", null, missingOptions.map(function (optionTitle, key) {
84
- return /*#__PURE__*/_react["default"].createElement("li", {
85
- key: key
86
- }, optionTitle);
87
- }))));
88
- }
89
- if (invalidOptions.length > 0) {
90
- errors.push( /*#__PURE__*/_react["default"].createElement("div", {
91
- key: "invalidoption",
92
- className: "validationresult-item error invalidoption"
93
- }, (0, _i18n.T)('validationResult.invalidOption'), /*#__PURE__*/_react["default"].createElement("ul", null, invalidOptions.map(function (optionTitle, key) {
94
- return /*#__PURE__*/_react["default"].createElement("li", {
95
- key: key
96
- }, optionTitle);
97
- }))));
98
- }
99
- return errors;
100
- }
101
- }, {
102
- key: "render",
103
- value: function render() {
104
- var Dialog = (0, _configuration.getComponent)('Dialog');
105
- return /*#__PURE__*/_react["default"].createElement(Dialog, {
106
- show: this.props.show,
107
- title: "validationResult.dialogTitle",
108
- relativeTo: "parent",
109
- overlay: true,
110
- onClose: this.props.onClose,
111
- animation: "grow",
112
- className: 'validationresult-dialog'
113
- }, /*#__PURE__*/_react["default"].createElement("div", {
114
- className: "validationresult"
115
- }, this.renderDataValidation()));
116
- }
117
- }]);
118
- return ValidationResult;
119
- }(_react["default"].Component);
@@ -1,57 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _Carousel = _interopRequireDefault(require("../../../../Framework/Components/Carousel"));
8
- var _ConfigurationvariantItem = _interopRequireDefault(require("./ConfigurationvariantItem"));
9
- var _ConfigurationvariantSelection = _interopRequireDefault(require("./ConfigurationvariantSelection"));
10
- var _Dialog = _interopRequireDefault(require("../../../../Framework/Components/Dialog"));
11
- var _FormattedNumber = _interopRequireDefault(require("./FormattedNumber"));
12
- var _FormattedPrice = _interopRequireDefault(require("./FormattedPrice"));
13
- var _Optiondetail = _interopRequireDefault(require("./Optiondetail"));
14
- var _Price = _interopRequireDefault(require("./Price"));
15
- var _Tools = _interopRequireDefault(require("./Tools"));
16
- var _ShareConfiguration = _interopRequireDefault(require("./ShareConfiguration"));
17
- var _SavedConfiguration = _interopRequireDefault(require("./SavedConfiguration"));
18
- var _LoadingOverlay = _interopRequireDefault(require("../../../../Framework/Components/LoadingOverlay"));
19
- var _FastConfiguration = _interopRequireDefault(require("./FastConfiguration"));
20
- var _FastConfigurationRow = _interopRequireDefault(require("./FastConfigurationRow"));
21
- var _FastConfigurationSelect = _interopRequireDefault(require("./FastConfigurationSelect"));
22
- var _Incompatibility = _interopRequireDefault(require("./Incompatibility"));
23
- var _ValidationResult = _interopRequireDefault(require("./ValidationResult"));
24
- var _StockInformation = _interopRequireDefault(require("./StockInformation"));
25
- var _DialogSelect = _interopRequireDefault(require("../../../../Framework/Components/DialogSelect"));
26
- var _LoginForm = _interopRequireDefault(require("./LoginForm"));
27
- var _StoreConfigurationForm = _interopRequireDefault(require("./StoreConfigurationForm"));
28
- var _CustomTitleEditor = _interopRequireDefault(require("./CustomTitleEditor"));
29
- var _ExternalVisualization = _interopRequireDefault(require("./ExternalVisualization"));
30
- var _Input = _interopRequireDefault(require("../../../../Framework/Components/Input"));
31
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
32
- var _default = exports["default"] = {
33
- Carousel: _Carousel["default"],
34
- ConfigurationvariantItem: _ConfigurationvariantItem["default"],
35
- ConfigurationvariantSelection: _ConfigurationvariantSelection["default"],
36
- Dialog: _Dialog["default"],
37
- FormattedNumber: _FormattedNumber["default"],
38
- FormattedPrice: _FormattedPrice["default"],
39
- Optiondetail: _Optiondetail["default"],
40
- Price: _Price["default"],
41
- Tools: _Tools["default"],
42
- ShareConfiguration: _ShareConfiguration["default"],
43
- SavedConfiguration: _SavedConfiguration["default"],
44
- LoadingOverlay: _LoadingOverlay["default"],
45
- FastConfiguration: _FastConfiguration["default"],
46
- FastConfigurationRow: _FastConfigurationRow["default"],
47
- FastConfigurationSelect: _FastConfigurationSelect["default"],
48
- Incompatibility: _Incompatibility["default"],
49
- ValidationResult: _ValidationResult["default"],
50
- StockInformation: _StockInformation["default"],
51
- DialogSelect: _DialogSelect["default"],
52
- LoginForm: _LoginForm["default"],
53
- StoreConfigurationForm: _StoreConfigurationForm["default"],
54
- CustomTitleEditor: _CustomTitleEditor["default"],
55
- ExternalVisualization: _ExternalVisualization["default"],
56
- Input: _Input["default"]
57
- };
@@ -1,9 +0,0 @@
1
- .loginform {
2
- &.hide {
3
- display: none;
4
- }
5
-
6
- .loginform-error {
7
- clear: both;
8
- }
9
- }
@@ -1,69 +0,0 @@
1
- import React from 'react';
2
- import { translateComponent } from 'Framework/i18n';
3
-
4
- import './Styles.scss';
5
- import PropTypes from 'prop-types';
6
-
7
- export class LoginForm extends React.Component {
8
- static propTypes = {
9
- onLogin: PropTypes.func,
10
- show: PropTypes.bool,
11
- profile: PropTypes.object,
12
- };
13
-
14
- componentDidMount() {
15
- // catch the click events within the error container
16
- this.errorContainer.addEventListener('click', e => {
17
- e.preventDefault();
18
- e.target.href && window.open(e.target.href);
19
- });
20
- }
21
-
22
- onLogin = e => {
23
- e.preventDefault();
24
- this.props.onLogin(this.usernameInput.value, this.passwordInput.value);
25
- };
26
-
27
- render() {
28
- const { show, profile } = this.props;
29
-
30
- return (
31
- <div className={'loginform' + (show ? ' show' : ' hide')}>
32
- <div>{this.t('loginForm.infoText')}</div>
33
-
34
- <form onSubmit={this.onLogin}>
35
- <input
36
- type="text"
37
- ref={el => (this.usernameInput = el)}
38
- placeholder={this.t('loginForm.username')}
39
- />
40
- <input
41
- type="password"
42
- ref={el => (this.passwordInput = el)}
43
- placeholder={this.t('loginForm.password')}
44
- />
45
-
46
- <button type="submit" className="primary-button loginform-loginButton">
47
- {this.t('loginForm.loginButton')}
48
- </button>
49
- </form>
50
-
51
- <div ref={el => (this.errorContainer = el)}>
52
- {profile.error && (
53
- <div
54
- className="loginform-error"
55
- dangerouslySetInnerHTML={{
56
- __html:
57
- profile.error instanceof Object
58
- ? JSON.stringify(profile.error)
59
- : profile.error,
60
- }}
61
- />
62
- )}
63
- </div>
64
- </div>
65
- );
66
- }
67
- }
68
-
69
- export default translateComponent(LoginForm);