@crystaldesign/diva-core 25.11.0-beta.32 → 25.11.0-beta.34
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/build/esm/{ModalsWrapper-5305a2f0.js → ModalsWrapper-d9f3db83.js} +2 -3
- package/build/esm/{index-fca411aa.js → index-59d87a3c.js} +85 -8
- package/build/esm/{index-721363ad.js → index-634bcbd3.js} +139 -466
- package/build/esm/index.js +2 -4
- package/build/types/core/src/externalTypes.d.ts +0 -16
- package/build/types/core/src/externalTypes.d.ts.map +1 -1
- package/build/types/core/src/store/ContentStore.d.ts +1 -8
- package/build/types/core/src/store/ContentStore.d.ts.map +1 -1
- package/build/types/core/src/store/index.d.ts +1 -5
- package/build/types/core/src/store/index.d.ts.map +1 -1
- package/build/types/core/src/store/mock/divaCoreMockProvider.d.ts.map +1 -1
- package/build/types/core/src/store/mock/index.d.ts.map +1 -1
- package/build/types/core/src/types.d.ts +1 -9
- package/build/types/core/src/types.d.ts.map +1 -1
- package/build/umd/145.diva-core.umd.min.js +1 -1
- package/build/umd/373.diva-core.umd.min.js +2 -0
- package/build/umd/373.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/64.diva-core.umd.min.js +2 -0
- package/build/umd/64.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/{490.diva-core.umd.min.js → 703.diva-core.umd.min.js} +2 -2
- package/build/umd/703.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/759.diva-core.umd.min.js +2 -0
- package/build/umd/759.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/860.diva-core.umd.min.js +2 -0
- package/build/umd/860.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/940.diva-core.umd.min.js +2 -0
- package/build/umd/940.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/diva-core.umd.min.js +3 -3
- package/build/umd/report.html +1 -1
- package/package.json +10 -10
- package/build/types/core/src/elements/Barrier/SimpleLogin.d.ts +0 -9
- package/build/types/core/src/elements/Barrier/SimpleLogin.d.ts.map +0 -1
- package/build/types/core/src/elements/Barrier/index.d.ts +0 -9
- package/build/types/core/src/elements/Barrier/index.d.ts.map +0 -1
- package/build/umd/124.diva-core.umd.min.js +0 -2
- package/build/umd/124.diva-core.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/171.diva-core.umd.min.js +0 -2
- package/build/umd/171.diva-core.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/490.diva-core.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/60.diva-core.umd.min.js +0 -2
- package/build/umd/60.diva-core.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/795.diva-core.umd.min.js +0 -2
- package/build/umd/795.diva-core.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/922.diva-core.umd.min.js +0 -2
- package/build/umd/922.diva-core.umd.min.js.LICENSE.txt +0 -1
|
@@ -26,19 +26,17 @@ import { StyledEngineProvider, ThemeProvider, createTheme } from '@mui/material/
|
|
|
26
26
|
import { enUS, itIT, frFR, deDE } from '@mui/material/locale';
|
|
27
27
|
import { withTransaction } from '@elastic/apm-rum-react';
|
|
28
28
|
import Typography from '@mui/material/Typography';
|
|
29
|
-
import {
|
|
30
|
-
import classnames from 'classnames';
|
|
31
|
-
import Button from '@mui/material/Button';
|
|
29
|
+
import { I18nextProvider, useTranslation } from 'react-i18next';
|
|
32
30
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
33
|
-
import { ArrowBack } from '@mui/icons-material';
|
|
34
31
|
import '@crystaldesign/basket-model';
|
|
35
32
|
import debounce from 'lodash/debounce';
|
|
36
33
|
import axios from 'axios';
|
|
37
34
|
import { ProductHandlerAbstract } from '@crystaldesign/product-handler';
|
|
35
|
+
import classnames from 'classnames';
|
|
38
36
|
import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
|
|
39
37
|
import { Drawer } from 'vaul';
|
|
40
38
|
import { ContentBoxComponent } from '@crystaldesign/content-box';
|
|
41
|
-
import { Button
|
|
39
|
+
import { Button, Snackbar, SnackbarContent, IconButton, Card, CardHeader, CardContent } from '@mui/material';
|
|
42
40
|
import { useTranslation as useTranslation$1, useDivaCore as useDivaCore$1 } from '@crystaldesign/diva-core';
|
|
43
41
|
import QRCode from 'react-qr-code';
|
|
44
42
|
import CloseIcon from '@mui/icons-material/Close';
|
|
@@ -48,7 +46,7 @@ import { actions } from '@storybook/addon-actions';
|
|
|
48
46
|
import * as Styles from '@mui/styles';
|
|
49
47
|
|
|
50
48
|
(function() {
|
|
51
|
-
const env = {"STAGE":"production","VERSION":"25.11.0-beta.
|
|
49
|
+
const env = {"STAGE":"production","VERSION":"25.11.0-beta.34"};
|
|
52
50
|
try {
|
|
53
51
|
if (process) {
|
|
54
52
|
process.env = Object.assign({}, process.env);
|
|
@@ -125,8 +123,8 @@ function baseUrl() {
|
|
|
125
123
|
return urlParts[urlParts.length - 2] + '.' + urlParts[urlParts.length - 1];
|
|
126
124
|
}
|
|
127
125
|
|
|
128
|
-
function ownKeys$
|
|
129
|
-
function _objectSpread$
|
|
126
|
+
function ownKeys$f(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
127
|
+
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
130
128
|
var _existingLogger = new Map();
|
|
131
129
|
var _apmInitialized = false;
|
|
132
130
|
var _onErrorEvent = function _onErrorEvent() {};
|
|
@@ -207,9 +205,9 @@ var ApplicationLogger = /*#__PURE__*/function () {
|
|
|
207
205
|
this.transactions["delete"](eventId);
|
|
208
206
|
event.end = end;
|
|
209
207
|
var cleanLabels = this.cleanLabels(labels);
|
|
210
|
-
event.event.labels = _objectSpread$
|
|
208
|
+
event.event.labels = _objectSpread$f(_objectSpread$f({}, event.event.labels), cleanLabels);
|
|
211
209
|
if (event.event.span) {
|
|
212
|
-
event.event.span.addLabels(_objectSpread$
|
|
210
|
+
event.event.span.addLabels(_objectSpread$f(_objectSpread$f(_objectSpread$f({}, event.event.labels), cleanLabels), {}, {
|
|
213
211
|
eventId: eventId
|
|
214
212
|
}));
|
|
215
213
|
event.event.span.end();
|
|
@@ -217,7 +215,7 @@ var ApplicationLogger = /*#__PURE__*/function () {
|
|
|
217
215
|
clearTimeout(event.event.warningTimeout);
|
|
218
216
|
clearTimeout(event.event.errorTimeout);
|
|
219
217
|
this.debug("Transaction ".concat(event.event.type, " (").concat(event.event.message, ") took ").concat(Math.floor(end - event.start), "ms"));
|
|
220
|
-
DivaUtils.businessMetrics.logEvent(event.event.type, this.module, event.event.message, _objectSpread$
|
|
218
|
+
DivaUtils.businessMetrics.logEvent(event.event.type, this.module, event.event.message, _objectSpread$f(_objectSpread$f(_objectSpread$f({}, event.event.labels), cleanLabels), {}, {
|
|
221
219
|
eventId: eventId,
|
|
222
220
|
status: event.event.timeout ? 'TIMEOUT' : 'SUCCESS',
|
|
223
221
|
eventDuration: Math.floor(end - event.start),
|
|
@@ -252,9 +250,9 @@ var ApplicationLogger = /*#__PURE__*/function () {
|
|
|
252
250
|
}
|
|
253
251
|
event.end = end;
|
|
254
252
|
var cleanLabels = this.cleanLabels(labels);
|
|
255
|
-
event.event.labels = _objectSpread$
|
|
253
|
+
event.event.labels = _objectSpread$f(_objectSpread$f({}, event.event.labels), cleanLabels);
|
|
256
254
|
if (event.event.span) {
|
|
257
|
-
event.event.span.addLabels(_objectSpread$
|
|
255
|
+
event.event.span.addLabels(_objectSpread$f(_objectSpread$f(_objectSpread$f({}, event.event.labels), cleanLabels), {}, {
|
|
258
256
|
eventId: eventId
|
|
259
257
|
}));
|
|
260
258
|
event.event.span.end();
|
|
@@ -262,7 +260,7 @@ var ApplicationLogger = /*#__PURE__*/function () {
|
|
|
262
260
|
clearTimeout(event.event.warningTimeout);
|
|
263
261
|
clearTimeout(event.event.errorTimeout);
|
|
264
262
|
this.debug("Transaction ".concat(event.event.type, " (").concat(event.event.message, ") failed after ").concat(Math.floor(end - event.start), "ms"));
|
|
265
|
-
DivaUtils.businessMetrics.logEvent(event.event.type, this.module, event.event.message, _objectSpread$
|
|
263
|
+
DivaUtils.businessMetrics.logEvent(event.event.type, this.module, event.event.message, _objectSpread$f(_objectSpread$f(_objectSpread$f({}, event.event.labels), cleanLabels), {}, {
|
|
266
264
|
error: code,
|
|
267
265
|
errorMessage: message,
|
|
268
266
|
eventId: eventId,
|
|
@@ -361,7 +359,7 @@ var ApplicationLogger = /*#__PURE__*/function () {
|
|
|
361
359
|
_onErrorEvent(_error.message, _error.name);
|
|
362
360
|
|
|
363
361
|
//for apm we spread the custom object directly on the error object, so that the are added to APM as custom attributes
|
|
364
|
-
var forApm = _objectSpread$
|
|
362
|
+
var forApm = _objectSpread$f(_objectSpread$f({}, _error), _error.custom);
|
|
365
363
|
(_getApmInstance = getApmInstance()) === null || _getApmInstance === void 0 || _getApmInstance.captureError(forApm);
|
|
366
364
|
}
|
|
367
365
|
}, {
|
|
@@ -435,8 +433,8 @@ if (typeof __webpack_public_path__ !== 'undefined') {
|
|
|
435
433
|
}
|
|
436
434
|
}
|
|
437
435
|
|
|
438
|
-
function ownKeys$
|
|
439
|
-
function _objectSpread$
|
|
436
|
+
function ownKeys$e(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
437
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
440
438
|
function _callSuper$2(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
441
439
|
function _isNativeReflectConstruct$2() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$2 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
442
440
|
var LOG$e = getLogger('Framework', 'webcomponent');
|
|
@@ -675,14 +673,14 @@ var CoreWrapper = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
675
673
|
if (!components) {
|
|
676
674
|
return /*#__PURE__*/jsx(Fragment, {});
|
|
677
675
|
}
|
|
678
|
-
return /*#__PURE__*/jsx(DivaCore, _objectSpread$
|
|
676
|
+
return /*#__PURE__*/jsx(DivaCore, _objectSpread$e(_objectSpread$e({}, props), {}, {
|
|
679
677
|
components: components,
|
|
680
678
|
ref: ref
|
|
681
679
|
}));
|
|
682
680
|
});
|
|
683
681
|
|
|
684
682
|
//we have to externalize the materialUI styling here, so that also in UMD the same instance is used
|
|
685
|
-
window.MaterialUIStyles = _objectSpread$
|
|
683
|
+
window.MaterialUIStyles = _objectSpread$e(_objectSpread$e({}, Styles), CoreStyles);
|
|
686
684
|
if (!window.customElements.get('diva-framework')) {
|
|
687
685
|
window.customElements.define('diva-framework', DivaFramework);
|
|
688
686
|
}
|
|
@@ -785,8 +783,8 @@ var defaultTheme = {
|
|
|
785
783
|
}
|
|
786
784
|
};
|
|
787
785
|
|
|
788
|
-
function ownKeys$
|
|
789
|
-
function _objectSpread$
|
|
786
|
+
function ownKeys$d(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
787
|
+
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
790
788
|
var LOG$d = getLogger('Framework', 'ConfigurationStore');
|
|
791
789
|
var ConfigurationStore = /*#__PURE__*/function () {
|
|
792
790
|
function ConfigurationStore(root, identifier, defaultApiConfig, domain) {
|
|
@@ -957,7 +955,7 @@ var ConfigurationStore = /*#__PURE__*/function () {
|
|
|
957
955
|
key: "authentication",
|
|
958
956
|
get: function get() {
|
|
959
957
|
var _this$_configuration$3, _this$_configuration37, _this$_configuration38, _this$_configuration39, _this$_configuration40, _this$_configuration41, _this$_configuration42, _this$_configuration43, _this$_configuration44, _this$_configuration45, _this$_configuration$4, _this$_configuration46;
|
|
960
|
-
return _objectSpread$
|
|
958
|
+
return _objectSpread$d(_objectSpread$d({}, (_this$_configuration$3 = (_this$_configuration37 = this._configuration) === null || _this$_configuration37 === void 0 ? void 0 : _this$_configuration37.authentication) !== null && _this$_configuration$3 !== void 0 ? _this$_configuration$3 : {}), {}, {
|
|
961
959
|
loginMethods: {
|
|
962
960
|
google: (_this$_configuration38 = this._configuration) !== null && _this$_configuration38 !== void 0 && (_this$_configuration38 = _this$_configuration38.authentication) !== null && _this$_configuration38 !== void 0 && _this$_configuration38.loginMethods ? (_this$_configuration39 = this._configuration) === null || _this$_configuration39 === void 0 || (_this$_configuration39 = _this$_configuration39.authentication) === null || _this$_configuration39 === void 0 ? void 0 : _this$_configuration39.loginMethods.google : true,
|
|
963
961
|
microsoft: (_this$_configuration40 = this._configuration) !== null && _this$_configuration40 !== void 0 && (_this$_configuration40 = _this$_configuration40.authentication) !== null && _this$_configuration40 !== void 0 && _this$_configuration40.loginMethods ? (_this$_configuration41 = this._configuration) === null || _this$_configuration41 === void 0 || (_this$_configuration41 = _this$_configuration41.authentication) === null || _this$_configuration41 === void 0 ? void 0 : _this$_configuration41.loginMethods.microsoft : true,
|
|
@@ -1027,12 +1025,12 @@ var ConfigurationStore = /*#__PURE__*/function () {
|
|
|
1027
1025
|
var _this$_configuration55;
|
|
1028
1026
|
if ((_this$_configuration55 = this._configuration) !== null && _this$_configuration55 !== void 0 && _this$_configuration55.priceFormat) {
|
|
1029
1027
|
var _this$_configuration56, _this$root$dataStore$2, _this$root$dataStore$3, _this$_configuration57;
|
|
1030
|
-
return _objectSpread$
|
|
1028
|
+
return _objectSpread$d(_objectSpread$d({}, (_this$_configuration56 = this._configuration) === null || _this$_configuration56 === void 0 ? void 0 : _this$_configuration56.priceFormat), {}, {
|
|
1031
1029
|
currency: (_this$root$dataStore$2 = (_this$root$dataStore$3 = this.root.dataStore.organization) === null || _this$root$dataStore$3 === void 0 ? void 0 : _this$root$dataStore$3.settings.defaultCurrency) !== null && _this$root$dataStore$2 !== void 0 ? _this$root$dataStore$2 : (_this$_configuration57 = this._configuration) === null || _this$_configuration57 === void 0 ? void 0 : _this$_configuration57.priceFormat.currency
|
|
1032
1030
|
});
|
|
1033
1031
|
} else {
|
|
1034
1032
|
var _this$root$dataStore$4, _this$root$dataStore$5;
|
|
1035
|
-
return _objectSpread$
|
|
1033
|
+
return _objectSpread$d(_objectSpread$d({}, DivaUtils.defaultPriceFormat), {}, {
|
|
1036
1034
|
currency: (_this$root$dataStore$4 = (_this$root$dataStore$5 = this.root.dataStore.organization) === null || _this$root$dataStore$5 === void 0 ? void 0 : _this$root$dataStore$5.settings.defaultCurrency) !== null && _this$root$dataStore$4 !== void 0 ? _this$root$dataStore$4 : DivaUtils.defaultPriceFormat.currency
|
|
1037
1035
|
});
|
|
1038
1036
|
}
|
|
@@ -1243,8 +1241,8 @@ function isIpadOS() {
|
|
|
1243
1241
|
return navigator.maxTouchPoints && navigator.maxTouchPoints > 2 && /MacIntel/.test(navigator.platform);
|
|
1244
1242
|
}
|
|
1245
1243
|
|
|
1246
|
-
function ownKeys$
|
|
1247
|
-
function _objectSpread$
|
|
1244
|
+
function ownKeys$c(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1245
|
+
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1248
1246
|
var LOG$c = getLogger('Framework', 'DataStore');
|
|
1249
1247
|
var DataStore = /*#__PURE__*/function () {
|
|
1250
1248
|
function DataStore(root) {
|
|
@@ -1282,8 +1280,8 @@ var DataStore = /*#__PURE__*/function () {
|
|
|
1282
1280
|
key: "organization",
|
|
1283
1281
|
get: function get() {
|
|
1284
1282
|
var _settings$defaultCurr, _settings;
|
|
1285
|
-
return this._organization ? _objectSpread$
|
|
1286
|
-
settings: _objectSpread$
|
|
1283
|
+
return this._organization ? _objectSpread$c(_objectSpread$c({}, this._organization), {}, {
|
|
1284
|
+
settings: _objectSpread$c(_objectSpread$c({}, this._organization.settings), {}, {
|
|
1287
1285
|
defaultCurrency: (_settings$defaultCurr = (_settings = this._organization.settings) === null || _settings === void 0 ? void 0 : _settings.defaultCurrency) !== null && _settings$defaultCurr !== void 0 ? _settings$defaultCurr : '€'
|
|
1288
1286
|
})
|
|
1289
1287
|
}) : this._organization;
|
|
@@ -1324,7 +1322,7 @@ var DataStore = /*#__PURE__*/function () {
|
|
|
1324
1322
|
return [].concat(_toConsumableArray(((_this$_organization$p = (_this$_organization$p2 = this._organization.parentOrganizations) === null || _this$_organization$p2 === void 0 ? void 0 : _this$_organization$p2.filter(function (org) {
|
|
1325
1323
|
return _this._parentOrganizations.includes(org._id);
|
|
1326
1324
|
})) !== null && _this$_organization$p !== void 0 ? _this$_organization$p : []).map(function (org) {
|
|
1327
|
-
return _objectSpread$
|
|
1325
|
+
return _objectSpread$c(_objectSpread$c({}, org), {}, {
|
|
1328
1326
|
type: org.type != 'SUPPLIER' ? org.parentType : undefined //supplier should not be accessed directly, only its children, so the simpliest solution is to remove here the type
|
|
1329
1327
|
});
|
|
1330
1328
|
}).reverse()), [{
|
|
@@ -1717,226 +1715,6 @@ function empty(p) {
|
|
|
1717
1715
|
return !p || Object.keys(p).length == 0;
|
|
1718
1716
|
}
|
|
1719
1717
|
|
|
1720
|
-
function styleInject(css, ref) {
|
|
1721
|
-
if ( ref === void 0 ) ref = {};
|
|
1722
|
-
var insertAt = ref.insertAt;
|
|
1723
|
-
|
|
1724
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
1725
|
-
|
|
1726
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
1727
|
-
var style = document.createElement('style');
|
|
1728
|
-
style.type = 'text/css';
|
|
1729
|
-
|
|
1730
|
-
if (insertAt === 'top') {
|
|
1731
|
-
if (head.firstChild) {
|
|
1732
|
-
head.insertBefore(style, head.firstChild);
|
|
1733
|
-
} else {
|
|
1734
|
-
head.appendChild(style);
|
|
1735
|
-
}
|
|
1736
|
-
} else {
|
|
1737
|
-
head.appendChild(style);
|
|
1738
|
-
}
|
|
1739
|
-
|
|
1740
|
-
if (style.styleSheet) {
|
|
1741
|
-
style.styleSheet.cssText = css;
|
|
1742
|
-
} else {
|
|
1743
|
-
style.appendChild(document.createTextNode(css));
|
|
1744
|
-
}
|
|
1745
|
-
}
|
|
1746
|
-
|
|
1747
|
-
var titlecontainer = "titlecontainer-LeRMj";
|
|
1748
|
-
var auth = "auth-y9j9-";
|
|
1749
|
-
var loginBox = "login-box-Zu-QM";
|
|
1750
|
-
var logoContainer = "logo-container-Gujpy";
|
|
1751
|
-
var success = "success-7n9-D";
|
|
1752
|
-
var error = "error-gJyOw";
|
|
1753
|
-
var authButton = "auth-button-nvUhU";
|
|
1754
|
-
var buttonDisabled = "button-disabled-GS-ox";
|
|
1755
|
-
var socialButton = "social-button-p5pUa";
|
|
1756
|
-
var google = "google-WhFJU";
|
|
1757
|
-
var microsoft = "microsoft-e3GYR";
|
|
1758
|
-
var separator = "separator-Hg6fH";
|
|
1759
|
-
var input = "input--Dl8e";
|
|
1760
|
-
var readonly = "readonly-uw66l";
|
|
1761
|
-
var link = "link-s-Rcm";
|
|
1762
|
-
var css_248z$6 = ".titlecontainer-LeRMj {\n text-align: center;\n color: #474747;\n}\n\n.auth-y9j9- {\n height: 100%;\n width: 100%;\n display: flex;\n background-color: rgba(255, 255, 255);\n z-index: 3;\n overflow: auto;\n justify-content: center;\n align-items: center;\n position: absolute;\n}\n\n.login-box-Zu-QM {\n padding: 20px;\n width: 400px;\n margin: 50px auto auto auto;\n position: relative;\n}\n\n@media (max-height: 450px) {\n .login-box-Zu-QM {\n margin: auto;\n }\n}\n\n.logo-container-Gujpy {\n background-repeat: no-repeat;\n background-position: center;\n background-size: contain;\n margin-bottom: 50px;\n}\n\n.success-7n9-D {\n width: 100%;\n padding: 12px;\n border-radius: 4px;\n margin: 15px 0;\n box-sizing: border-box;\n background-color: rgb(228, 244, 228);\n color: rgb(17, 97, 73);\n border: rgb(195, 231, 202) solid 1px;\n border-left: solid 4px;\n line-height: 20px;\n font-size: 16px;\n position: relative;\n}\n\n.success-7n9-D span {\n width: 30px;\n height: 100%;\n float: left;\n background-repeat: no-repeat;\n background-image: url(\"data:image/svg+xml,%3Csvg fill%3D%22rgb(19%2C 170%2C 82)%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 height%3D%2230px%22 width%3D%2230px%22 viewBox%3D%220 0 24 24%22 %3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M8 15A7 7 0 108 1a7 7 0 000 14zm2.448-10.104a.997.997 0 111.508 1.306l-4.572 5.28a1 1 0 01-1.64-.07l-1.82-2.868a1 1 0 111.69-1.07l1.1 1.734 3.734-4.312z%22 fill%3D%22currentColor%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E\");\n position: absolute;\n}\n\n.success-7n9-D div {\n text-align: justify;\n margin-left: 30px;\n}\n\n[dir=\"ltr\"] .error-gJyOw {\n text-align: left;\n}\n\n[dir=\"rtl\"] .error-gJyOw {\n text-align: right;\n}\n\n.error-gJyOw {\n border-left: 4px solid red !important;\n}\n\n.error-gJyOw {\n border-radius: 4px;\n padding: 10px;\n display: flex;\n align-items: center;\n}\n\n.auth-button-nvUhU {\n width: 100%;\n padding: 12px;\n border-radius: 4px;\n margin: 15px 0;\n opacity: 0.85;\n font-size: 17px;\n line-height: 22px;\n cursor: pointer;\n box-sizing: border-box;\n background-color: var(--diva-theme-palette-primary-main);\n text-align: center;\n color: var(--diva-theme-palette-primary-contrast-text);\n text-transform: none;\n}\n\n.auth-button-nvUhU:hover {\n opacity: 1;\n}\n\n.button-disabled-GS-ox {\n opacity: 0.3;\n cursor: auto;\n cursor: initial;\n}\n.button-disabled-GS-ox:hover {\n opacity: 0.3;\n}\n\n.social-button-p5pUa {\n justify-content: space-around;\n text-transform: none;\n}\n\n.social-button-p5pUa div {\n width: 30px;\n height: 22px;\n float: left;\n background-repeat: no-repeat;\n background-size: contain;\n background-position: center;\n}\n\n.google-WhFJU,\n.microsoft-e3GYR {\n font-size: medium;\n margin-top: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 12px;\n background-color: white;\n color: #333;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-weight: 600;\n padding: 12px;\n transition: all 0.3s ease-in-out;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n}\n\n.google-WhFJU:hover,\n.microsoft-e3GYR:hover {\n background-color: #f8f9fa;\n border-color: #bbb;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);\n}\n.google-WhFJU div {\n background-image: url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22utf-8%22%3F%3E%3C!-- Uploaded to%3A SVG Repo%2C www.svgrepo.com%2C Generator%3A SVG Repo Mixer Tools --%3E%3Csvg width%3D%22800px%22 height%3D%22800px%22 viewBox%3D%22-3 0 262 262%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 preserveAspectRatio%3D%22xMidYMid%22%3E%3Cpath d%3D%22M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027%22 fill%3D%22%234285F4%22%2F%3E%3Cpath d%3D%22M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1%22 fill%3D%22%2334A853%22%2F%3E%3Cpath d%3D%22M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782%22 fill%3D%22%23FBBC05%22%2F%3E%3Cpath d%3D%22M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251%22 fill%3D%22%23EB4335%22%2F%3E%3C%2Fsvg%3E\");\n}\n.microsoft-e3GYR div {\n background-image: url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22utf-8%22%3F%3E%3C!-- Uploaded to%3A SVG Repo%2C www.svgrepo.com%2C Generator%3A SVG Repo Mixer Tools --%3E%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22aria-label%3D%22Microsoft%22 role%3D%22img%22viewBox%3D%220 0 512 512%22%3E%3Crectwidth%3D%22512%22 height%3D%22512%22rx%3D%2215%25%22fill%3D%22%23ffffff%22%2F%3E%3Cpathd%3D%22M75 75v171h171v-171z%22 fill%3D%22%23f25022%22%2F%3E%3Cpathd%3D%22M266 75v171h171v-171z%22 fill%3D%22%237fba00%22%2F%3E%3Cpathd%3D%22M75 266v171h171v-171z%22 fill%3D%22%2300a4ef%22%2F%3E%3Cpathd%3D%22M266 266v171h171v-171z%22 fill%3D%22%23ffb900%22%2F%3E%3C%2Fsvg%3E\");\n}\n\n.separator-Hg6fH {\n display: flex;\n align-items: center;\n text-align: center;\n color: rgb(184, 196, 194);\n}\n\n.separator-Hg6fH::before,\n.separator-Hg6fH::after {\n content: '';\n flex: 1;\n border-bottom: 1px solid rgb(184, 196, 194);\n}\n\n.separator-Hg6fH:not(:empty)::before {\n margin-right: 0.25em;\n}\n\n.separator-Hg6fH:not(:empty)::after {\n margin-left: 0.25em;\n}\n\n.input--Dl8e {\n width: 100%;\n padding: 1em;\n border: solid 1px rgba(0, 0, 0, 0.1);\n border-radius: 0.3em;\n outline: none;\n margin: 15px 0;\n box-sizing: border-box;\n}\n\n.input--Dl8e:hover,\n.input--Dl8e:focus,\n.input--Dl8e:active {\n border: solid 1px var(--diva-theme-palette-primary-main);\n}\n\n.input--Dl8e::-moz-placeholder {\n color: rgba(0, 0, 0, 0.25);\n}\n\n.input--Dl8e::placeholder {\n color: rgba(0, 0, 0, 0.25);\n}\n\n.input--Dl8e.readonly-uw66l {\n border: solid 1px rgba(0, 0, 0, 0.1);\n color: rgba(0, 0, 0, 0.25);\n}\n\n.reset-input-ERpB4 {\n position: relative;\n}\n\n.reset-input-ERpB4:after {\n content: '';\n position: absolute;\n right: 10px;\n top: 0;\n bottom: 0;\n width: 20px;\n background: url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 %3F%3E%3C!DOCTYPE svg PUBLIC '-%2F%2FW3C%2F%2FDTD SVG 1.1%2F%2FEN' 'http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd'%3E%3Csvg id%3D%22Layer_1%22 style%3D%22enable-background%3Anew 0 0 512 512%3B%22 version%3D%221.1%22 viewBox%3D%220 0 512 512%22 width%3D%22512px%22 xml%3Aspace%3D%22preserve%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3Cg%3E%3Cpath d%3D%22M256%2C33C132.3%2C33%2C32%2C133.3%2C32%2C257c0%2C123.7%2C100.3%2C224%2C224%2C224c123.7%2C0%2C224-100.3%2C224-224C480%2C133.3%2C379.7%2C33%2C256%2C33z M364.3%2C332.5c1.5%2C1.5%2C2.3%2C3.5%2C2.3%2C5.6c0%2C2.1-0.8%2C4.2-2.3%2C5.6l-21.6%2C21.7c-1.6%2C1.6-3.6%2C2.3-5.6%2C2.3c-2%2C0-4.1-0.8-5.6-2.3L256%2C289.8 l-75.4%2C75.7c-1.5%2C1.6-3.6%2C2.3-5.6%2C2.3c-2%2C0-4.1-0.8-5.6-2.3l-21.6-21.7c-1.5-1.5-2.3-3.5-2.3-5.6c0-2.1%2C0.8-4.2%2C2.3-5.6l75.7-76 l-75.9-75c-3.1-3.1-3.1-8.2%2C0-11.3l21.6-21.7c1.5-1.5%2C3.5-2.3%2C5.6-2.3c2.1%2C0%2C4.1%2C0.8%2C5.6%2C2.3l75.7%2C74.7l75.7-74.7 c1.5-1.5%2C3.5-2.3%2C5.6-2.3c2.1%2C0%2C4.1%2C0.8%2C5.6%2C2.3l21.6%2C21.7c3.1%2C3.1%2C3.1%2C8.2%2C0%2C11.3l-75.9%2C75L364.3%2C332.5z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\") center / contain no-repeat;\n cursor: pointer;\n opacity: 0.7;\n}\n\n.link-s-Rcm {\n color: var(--diva-theme-palette-primary-main);\n cursor: pointer;\n display: inline-block;\n}\n";
|
|
1763
|
-
styleInject(css_248z$6);
|
|
1764
|
-
|
|
1765
|
-
var _excluded$7 = ["className", "disabled", "children", "onClick", "style"];
|
|
1766
|
-
function ownKeys$d(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1767
|
-
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1768
|
-
function AuthButton(_ref) {
|
|
1769
|
-
var className = _ref.className,
|
|
1770
|
-
disabled = _ref.disabled,
|
|
1771
|
-
children = _ref.children,
|
|
1772
|
-
onClick = _ref.onClick,
|
|
1773
|
-
style = _ref.style,
|
|
1774
|
-
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
1775
|
-
return /*#__PURE__*/jsx(Button, _objectSpread$d(_objectSpread$d({
|
|
1776
|
-
id: "submit",
|
|
1777
|
-
variant: "contained",
|
|
1778
|
-
disabled: disabled,
|
|
1779
|
-
onClick: onClick,
|
|
1780
|
-
className: classnames(authButton, className, disabled ? buttonDisabled : undefined),
|
|
1781
|
-
style: style
|
|
1782
|
-
}, props), {}, {
|
|
1783
|
-
children: children
|
|
1784
|
-
}));
|
|
1785
|
-
}
|
|
1786
|
-
|
|
1787
|
-
var _excluded$6 = ["className", "readOnly", "resetInput"];
|
|
1788
|
-
function ownKeys$c(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1789
|
-
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1790
|
-
var Input = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1791
|
-
var className = _ref.className,
|
|
1792
|
-
readOnly = _ref.readOnly,
|
|
1793
|
-
resetInput = _ref.resetInput,
|
|
1794
|
-
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
1795
|
-
return /*#__PURE__*/jsxs("div", {
|
|
1796
|
-
style: {
|
|
1797
|
-
position: 'relative'
|
|
1798
|
-
},
|
|
1799
|
-
children: [/*#__PURE__*/jsx("input", _objectSpread$c({
|
|
1800
|
-
ref: ref,
|
|
1801
|
-
className: classnames(input, readOnly ? readonly : undefined, className),
|
|
1802
|
-
readOnly: readOnly,
|
|
1803
|
-
"data-test-id": "barrier-input-text",
|
|
1804
|
-
style: {
|
|
1805
|
-
paddingLeft: resetInput ? '40px' : undefined
|
|
1806
|
-
} // Platzierung des Pfeils
|
|
1807
|
-
}, props)), resetInput && /*#__PURE__*/jsx(ArrowBack, {
|
|
1808
|
-
onClick: function onClick() {
|
|
1809
|
-
return resetInput();
|
|
1810
|
-
},
|
|
1811
|
-
style: {
|
|
1812
|
-
position: 'absolute',
|
|
1813
|
-
left: '8px',
|
|
1814
|
-
// Platzierung des Pfeils
|
|
1815
|
-
top: '50%',
|
|
1816
|
-
transform: 'translateY(-50%)',
|
|
1817
|
-
// Vertikale Zentrierung
|
|
1818
|
-
cursor: 'pointer'
|
|
1819
|
-
}
|
|
1820
|
-
})]
|
|
1821
|
-
});
|
|
1822
|
-
});
|
|
1823
|
-
|
|
1824
|
-
function SimpleLogin (_ref) {
|
|
1825
|
-
var email = _ref.email,
|
|
1826
|
-
setEmail = _ref.setEmail,
|
|
1827
|
-
tos = _ref.tos,
|
|
1828
|
-
setTos = _ref.setTos,
|
|
1829
|
-
showTos = _ref.showTos;
|
|
1830
|
-
var _useDivaCoreContext = useDivaCoreContext(),
|
|
1831
|
-
configurationStore = _useDivaCoreContext.configurationStore,
|
|
1832
|
-
contentStore = _useDivaCoreContext.contentStore;
|
|
1833
|
-
var _useTranslation = useTranslation(),
|
|
1834
|
-
t = _useTranslation.t;
|
|
1835
|
-
return /*#__PURE__*/jsxs(Fragment, {
|
|
1836
|
-
children: [/*#__PURE__*/jsx(Input, {
|
|
1837
|
-
placeholder: t('auth.input.email'),
|
|
1838
|
-
value: email,
|
|
1839
|
-
onChange: function onChange(e) {
|
|
1840
|
-
return setEmail(e.currentTarget.value);
|
|
1841
|
-
}
|
|
1842
|
-
}), showTos && /*#__PURE__*/jsxs("div", {
|
|
1843
|
-
style: {
|
|
1844
|
-
display: 'flex',
|
|
1845
|
-
cursor: 'pointer'
|
|
1846
|
-
},
|
|
1847
|
-
onClick: function onClick() {
|
|
1848
|
-
return setTos(!tos);
|
|
1849
|
-
},
|
|
1850
|
-
children: [/*#__PURE__*/jsx("input", {
|
|
1851
|
-
"data-test-id": "check-agb",
|
|
1852
|
-
type: "checkbox",
|
|
1853
|
-
style: {
|
|
1854
|
-
marginRight: '12px',
|
|
1855
|
-
cursor: 'pointer'
|
|
1856
|
-
},
|
|
1857
|
-
checked: tos,
|
|
1858
|
-
onChange: function onChange() {
|
|
1859
|
-
return setTos(!tos);
|
|
1860
|
-
}
|
|
1861
|
-
}), /*#__PURE__*/jsx("span", {
|
|
1862
|
-
children: /*#__PURE__*/jsx(Trans, {
|
|
1863
|
-
i18nKey: "barrier.tosconsent",
|
|
1864
|
-
components: {
|
|
1865
|
-
TOS: /*#__PURE__*/jsx("div", {
|
|
1866
|
-
className: link,
|
|
1867
|
-
onClick: function onClick() {
|
|
1868
|
-
return contentStore.openComponent({
|
|
1869
|
-
url: configurationStore.navigation.tosUrl,
|
|
1870
|
-
openInNewTab: true
|
|
1871
|
-
});
|
|
1872
|
-
}
|
|
1873
|
-
}),
|
|
1874
|
-
PRIVACY: /*#__PURE__*/jsx("div", {
|
|
1875
|
-
className: link,
|
|
1876
|
-
onClick: function onClick() {
|
|
1877
|
-
return contentStore.openComponent({
|
|
1878
|
-
url: configurationStore.navigation.privacyUrl,
|
|
1879
|
-
openInNewTab: true
|
|
1880
|
-
});
|
|
1881
|
-
}
|
|
1882
|
-
})
|
|
1883
|
-
}
|
|
1884
|
-
})
|
|
1885
|
-
})]
|
|
1886
|
-
})]
|
|
1887
|
-
});
|
|
1888
|
-
}
|
|
1889
|
-
|
|
1890
|
-
function Barrier (_ref) {
|
|
1891
|
-
var actions = _ref.actions,
|
|
1892
|
-
_ref$currentEmail = _ref.currentEmail,
|
|
1893
|
-
currentEmail = _ref$currentEmail === void 0 ? '' : _ref$currentEmail,
|
|
1894
|
-
type = _ref.type;
|
|
1895
|
-
var _useTranslation = useTranslation(),
|
|
1896
|
-
t = _useTranslation.t;
|
|
1897
|
-
var _useState = useState(currentEmail),
|
|
1898
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
1899
|
-
email = _useState2[0],
|
|
1900
|
-
setEmail = _useState2[1];
|
|
1901
|
-
var _useState3 = useState(!!currentEmail),
|
|
1902
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
1903
|
-
tosChecked = _useState4[0],
|
|
1904
|
-
setTosChecked = _useState4[1];
|
|
1905
|
-
var disabledActions = actions === null || actions === void 0 ? void 0 : actions.map(function (action) {
|
|
1906
|
-
return (!tosChecked || !email || !DivaUtils.validateEmail(email)) && action.loginType != 'NO_LOGIN';
|
|
1907
|
-
});
|
|
1908
|
-
return /*#__PURE__*/jsxs("form", {
|
|
1909
|
-
autoComplete: "off",
|
|
1910
|
-
onSubmit: function onSubmit(e) {
|
|
1911
|
-
var _actions$;
|
|
1912
|
-
e.preventDefault();
|
|
1913
|
-
if (disabledActions !== null && disabledActions !== void 0 && disabledActions[0]) return;
|
|
1914
|
-
actions === null || actions === void 0 || (_actions$ = actions[0]) === null || _actions$ === void 0 || _actions$.onClick(email);
|
|
1915
|
-
},
|
|
1916
|
-
"data-test-id": "barrier-action-form",
|
|
1917
|
-
children: [type != 'NO_LOGIN' && /*#__PURE__*/jsx(SimpleLogin, {
|
|
1918
|
-
setEmail: setEmail,
|
|
1919
|
-
email: email,
|
|
1920
|
-
showTos: !currentEmail,
|
|
1921
|
-
tos: tosChecked,
|
|
1922
|
-
setTos: setTosChecked
|
|
1923
|
-
}), actions === null || actions === void 0 ? void 0 : actions.map(function (a, index) {
|
|
1924
|
-
return /*#__PURE__*/jsx(AuthButton, {
|
|
1925
|
-
"data-test-id": "barrier-action-button",
|
|
1926
|
-
className: a.className,
|
|
1927
|
-
disabled: disabledActions === null || disabledActions === void 0 ? void 0 : disabledActions[index],
|
|
1928
|
-
onClick: disabledActions !== null && disabledActions !== void 0 && disabledActions[index] ? function () {} : function () {
|
|
1929
|
-
return a.onClick(email);
|
|
1930
|
-
},
|
|
1931
|
-
style: {
|
|
1932
|
-
justifyContent: 'flex-start'
|
|
1933
|
-
},
|
|
1934
|
-
children: t(a.text)
|
|
1935
|
-
}, a.text);
|
|
1936
|
-
})]
|
|
1937
|
-
});
|
|
1938
|
-
}
|
|
1939
|
-
|
|
1940
1718
|
function _callSuper$1(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1941
1719
|
function _isNativeReflectConstruct$1() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
1942
1720
|
var LOG$b = getLogger('Framework', 'root');
|
|
@@ -2333,7 +2111,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2333
2111
|
_config6,
|
|
2334
2112
|
_config8,
|
|
2335
2113
|
_config9;
|
|
2336
|
-
var _this$componentChange2, _this$componentChange3, _this$openInNewTab, _this$openInNewTab2, link, _window, _ref2, type, identifier, parameters, internal, route, openInFullscreen, keepOldState, config, parent, _this$root$dataStore$, _this$root$dataStore$2, _config4, newTab, _config7, base, settings, openModuleLables, _parameters, otherPrams, module, prevType, prevState, currentState, componentState
|
|
2114
|
+
var _this$componentChange2, _this$componentChange3, _this$openInNewTab, _this$openInNewTab2, link, _window, _ref2, type, identifier, parameters, internal, route, openInFullscreen, keepOldState, config, parent, _this$root$dataStore$, _this$root$dataStore$2, _config4, newTab, _config7, base, settings, openModuleLables, _parameters, otherPrams, module, prevType, prevState, currentState, componentState;
|
|
2337
2115
|
return _regeneratorRuntime.wrap(function openComponent$(_context2) {
|
|
2338
2116
|
while (1) switch (_context2.prev = _context2.next) {
|
|
2339
2117
|
case 0:
|
|
@@ -2479,13 +2257,6 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2479
2257
|
componentState.path = route;
|
|
2480
2258
|
this.state.set(config.type, componentState);
|
|
2481
2259
|
this.visible = config.type;
|
|
2482
|
-
if (config.isPublic == 'barrier') {
|
|
2483
|
-
if (!this.root.dataStore.user || !((_this$root$dataStore$3 = this.root.dataStore.user) !== null && _this$root$dataStore$3 !== void 0 && _this$root$dataStore$3.isEmailVerified)) {
|
|
2484
|
-
if (!((_config$barrier = config.barrier) !== null && _config$barrier !== void 0 && _config$barrier.excludeParams) || !Object.keys((_parameters2 = parameters) !== null && _parameters2 !== void 0 ? _parameters2 : {}).find(function (p) {
|
|
2485
|
-
return config.barrier.excludeParams.includes(p);
|
|
2486
|
-
})) this.loginBarrier(true, config.barrier);
|
|
2487
|
-
}
|
|
2488
|
-
}
|
|
2489
2260
|
if (action.breadcrumb && prevType && prevState) {
|
|
2490
2261
|
this.updateBreadcrumbs({
|
|
2491
2262
|
type: 'update',
|
|
@@ -2512,7 +2283,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2512
2283
|
}
|
|
2513
2284
|
this.setGlobalClass();
|
|
2514
2285
|
this.root.loadingAndErrorStore.toggleLoading('openComponent');
|
|
2515
|
-
case
|
|
2286
|
+
case 59:
|
|
2516
2287
|
case "end":
|
|
2517
2288
|
return _context2.stop();
|
|
2518
2289
|
}
|
|
@@ -2648,48 +2419,6 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2648
2419
|
}
|
|
2649
2420
|
return undefined;
|
|
2650
2421
|
}
|
|
2651
|
-
}, {
|
|
2652
|
-
key: "loginBarrier",
|
|
2653
|
-
value: function loginBarrier(anon, settings) {
|
|
2654
|
-
var _settings$title,
|
|
2655
|
-
_settings$text,
|
|
2656
|
-
_this3 = this;
|
|
2657
|
-
this.openBarrier({
|
|
2658
|
-
type: settings !== null && settings !== void 0 && settings.skipVerify ? 'SIMPLE' : 'GET_EMAIL',
|
|
2659
|
-
rejectable: false,
|
|
2660
|
-
anonOnly: anon,
|
|
2661
|
-
title: this.root.t((_settings$title = settings === null || settings === void 0 ? void 0 : settings.title) !== null && _settings$title !== void 0 ? _settings$title : 'loginbarrier.barrier.title'),
|
|
2662
|
-
text: this.root.t((_settings$text = settings === null || settings === void 0 ? void 0 : settings.text) !== null && _settings$text !== void 0 ? _settings$text : 'loginbarrier.barrier.text'),
|
|
2663
|
-
actions: [{
|
|
2664
|
-
text: this.root.t('loginbarrier.barrier.button'),
|
|
2665
|
-
onClick: function onClick(email) {
|
|
2666
|
-
var _settings$emailVarian;
|
|
2667
|
-
if (settings !== null && settings !== void 0 && settings.skipVerify) {
|
|
2668
|
-
return;
|
|
2669
|
-
}
|
|
2670
|
-
LOG$9.debug("Request email verification for ".concat(email));
|
|
2671
|
-
_this3.root.apiHandler.sendVerificationEmail({
|
|
2672
|
-
email: email,
|
|
2673
|
-
emailVariant: (_settings$emailVarian = settings === null || settings === void 0 ? void 0 : settings.emailVariant) !== null && _settings$emailVarian !== void 0 ? _settings$emailVarian : 'DEMO'
|
|
2674
|
-
});
|
|
2675
|
-
_this3.openModal({
|
|
2676
|
-
title: _this3.root.t('loginbarrier.verify.title'),
|
|
2677
|
-
text: _this3.root.t('loginbarrier.verify.text'),
|
|
2678
|
-
maxWidth: 500,
|
|
2679
|
-
actions: [{
|
|
2680
|
-
text: _this3.root.t('loginbarrier.verify.button'),
|
|
2681
|
-
variant: 'contained',
|
|
2682
|
-
id: 'verify',
|
|
2683
|
-
closeable: false
|
|
2684
|
-
}],
|
|
2685
|
-
callback: function callback() {
|
|
2686
|
-
_this3.loginBarrier(false, settings);
|
|
2687
|
-
}
|
|
2688
|
-
});
|
|
2689
|
-
}
|
|
2690
|
-
}]
|
|
2691
|
-
});
|
|
2692
|
-
}
|
|
2693
2422
|
}, {
|
|
2694
2423
|
key: "updateCustomLogo",
|
|
2695
2424
|
value:
|
|
@@ -2699,9 +2428,9 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2699
2428
|
* @param logo the custom logo
|
|
2700
2429
|
*/
|
|
2701
2430
|
function updateCustomLogo(components, logo) {
|
|
2702
|
-
var
|
|
2431
|
+
var _this3 = this;
|
|
2703
2432
|
components.forEach(function (c) {
|
|
2704
|
-
return logo ?
|
|
2433
|
+
return logo ? _this3.customLogoMap.set(c, logo) : _this3.customLogoMap["delete"](c);
|
|
2705
2434
|
});
|
|
2706
2435
|
}
|
|
2707
2436
|
|
|
@@ -2713,9 +2442,9 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2713
2442
|
}, {
|
|
2714
2443
|
key: "updateCustomHeaderElement",
|
|
2715
2444
|
value: function updateCustomHeaderElement(components, element) {
|
|
2716
|
-
var
|
|
2445
|
+
var _this4 = this;
|
|
2717
2446
|
components.forEach(function (c) {
|
|
2718
|
-
return element ?
|
|
2447
|
+
return element ? _this4.customHeaderComponentMap.set(c, element) : _this4.customHeaderComponentMap["delete"](c);
|
|
2719
2448
|
});
|
|
2720
2449
|
}
|
|
2721
2450
|
|
|
@@ -2794,7 +2523,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2794
2523
|
}, {
|
|
2795
2524
|
key: "breadcrumbs",
|
|
2796
2525
|
get: function get() {
|
|
2797
|
-
var
|
|
2526
|
+
var _this5 = this;
|
|
2798
2527
|
if (!this.visible) {
|
|
2799
2528
|
return undefined;
|
|
2800
2529
|
}
|
|
@@ -2806,7 +2535,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2806
2535
|
var group = _step2.value;
|
|
2807
2536
|
var path = group.path.find(function (p) {
|
|
2808
2537
|
return componentsEqual(p.component, {
|
|
2809
|
-
type:
|
|
2538
|
+
type: _this5.visible,
|
|
2810
2539
|
parameters: state.parameters,
|
|
2811
2540
|
internal: state.internal
|
|
2812
2541
|
});
|
|
@@ -2860,9 +2589,9 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2860
2589
|
}, {
|
|
2861
2590
|
key: "currentComponent",
|
|
2862
2591
|
get: function get() {
|
|
2863
|
-
var
|
|
2592
|
+
var _this6 = this;
|
|
2864
2593
|
return this.root.configurationStore.components.find(function (c) {
|
|
2865
|
-
return c.type ==
|
|
2594
|
+
return c.type == _this6.visible;
|
|
2866
2595
|
});
|
|
2867
2596
|
}
|
|
2868
2597
|
|
|
@@ -2899,11 +2628,11 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2899
2628
|
}, {
|
|
2900
2629
|
key: "allowHidePrices",
|
|
2901
2630
|
get: function get() {
|
|
2902
|
-
var _this$root$dataStore$
|
|
2631
|
+
var _this$root$dataStore$3;
|
|
2903
2632
|
if (!this.visible) {
|
|
2904
2633
|
return false;
|
|
2905
2634
|
}
|
|
2906
|
-
if (((_this$root$dataStore$
|
|
2635
|
+
if (((_this$root$dataStore$3 = this.root.dataStore.organization) === null || _this$root$dataStore$3 === void 0 || (_this$root$dataStore$3 = _this$root$dataStore$3.settings) === null || _this$root$dataStore$3 === void 0 ? void 0 : _this$root$dataStore$3.hidePrices) !== undefined) {
|
|
2907
2636
|
return this.root.dataStore.organization.settings.hidePrices.startsWith('DEFAULT');
|
|
2908
2637
|
}
|
|
2909
2638
|
return true;
|
|
@@ -2918,8 +2647,8 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2918
2647
|
key: "hidePrices",
|
|
2919
2648
|
get: function get() {
|
|
2920
2649
|
if (this._hidePrices === undefined) {
|
|
2921
|
-
var _this$root$dataStore$
|
|
2922
|
-
if ((_this$root$dataStore$
|
|
2650
|
+
var _this$root$dataStore$4;
|
|
2651
|
+
if ((_this$root$dataStore$4 = this.root.dataStore.organization) !== null && _this$root$dataStore$4 !== void 0 && (_this$root$dataStore$4 = _this$root$dataStore$4.settings) !== null && _this$root$dataStore$4 !== void 0 && _this$root$dataStore$4.hidePrices) {
|
|
2923
2652
|
switch (this.root.dataStore.organization.settings.hidePrices) {
|
|
2924
2653
|
case 'DEFAULT_HIDDEN':
|
|
2925
2654
|
case 'ONLY_HIDDEN':
|
|
@@ -3130,80 +2859,6 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3130
2859
|
get: function get() {
|
|
3131
2860
|
return this._sideMenuOpen;
|
|
3132
2861
|
}
|
|
3133
|
-
|
|
3134
|
-
/**
|
|
3135
|
-
* Opens a berrier to request user infos
|
|
3136
|
-
*
|
|
3137
|
-
* @param barrier the settings for the barrier
|
|
3138
|
-
*/
|
|
3139
|
-
}, {
|
|
3140
|
-
key: "openBarrier",
|
|
3141
|
-
value: function openBarrier(barrier) {
|
|
3142
|
-
var _this$root$dataStore$6,
|
|
3143
|
-
_this$root$dataStore$7,
|
|
3144
|
-
_barrier$actions,
|
|
3145
|
-
_this8 = this;
|
|
3146
|
-
if (barrier.anonOnly && (_this$root$dataStore$6 = this.root.dataStore.user) !== null && _this$root$dataStore$6 !== void 0 && _this$root$dataStore$6.mainEmail) {
|
|
3147
|
-
LOG$9.debug('Skip barrier because user is logged in');
|
|
3148
|
-
return;
|
|
3149
|
-
}
|
|
3150
|
-
this._modal = {
|
|
3151
|
-
text: barrier.text,
|
|
3152
|
-
title: barrier.title,
|
|
3153
|
-
rejectByIcon: barrier.rejectable != false,
|
|
3154
|
-
dontRenderForm: true,
|
|
3155
|
-
callback: function callback() {
|
|
3156
|
-
var _barrier$onClose;
|
|
3157
|
-
(_barrier$onClose = barrier.onClose) === null || _barrier$onClose === void 0 || _barrier$onClose.call(barrier);
|
|
3158
|
-
},
|
|
3159
|
-
content: /*#__PURE__*/React.createElement(Barrier, {
|
|
3160
|
-
type: barrier.type,
|
|
3161
|
-
currentEmail: (_this$root$dataStore$7 = this.root.dataStore.user) === null || _this$root$dataStore$7 === void 0 ? void 0 : _this$root$dataStore$7.mainEmail,
|
|
3162
|
-
actions: (_barrier$actions = barrier.actions) === null || _barrier$actions === void 0 ? void 0 : _barrier$actions.map(function (a) {
|
|
3163
|
-
return _objectSpread$a(_objectSpread$a({}, a), {}, {
|
|
3164
|
-
onClick: function () {
|
|
3165
|
-
var _onClick = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(email) {
|
|
3166
|
-
var _this8$root$dataStore;
|
|
3167
|
-
var doLogin;
|
|
3168
|
-
return _regeneratorRuntime.wrap(function _callee2$(_context4) {
|
|
3169
|
-
while (1) switch (_context4.prev = _context4.next) {
|
|
3170
|
-
case 0:
|
|
3171
|
-
_this8.closeModal();
|
|
3172
|
-
doLogin = (a.loginType ? a.loginType : barrier.type) === 'SIMPLE';
|
|
3173
|
-
if (!(doLogin && ((_this8$root$dataStore = _this8.root.dataStore.user) === null || _this8$root$dataStore === void 0 ? void 0 : _this8$root$dataStore.mainEmail) != email)) {
|
|
3174
|
-
_context4.next = 11;
|
|
3175
|
-
break;
|
|
3176
|
-
}
|
|
3177
|
-
_context4.prev = 3;
|
|
3178
|
-
_context4.next = 6;
|
|
3179
|
-
return flowResult(_this8.root.authorizationStore.login(email, undefined, true, _this8.root.dataStore.organizationId));
|
|
3180
|
-
case 6:
|
|
3181
|
-
_context4.next = 11;
|
|
3182
|
-
break;
|
|
3183
|
-
case 8:
|
|
3184
|
-
_context4.prev = 8;
|
|
3185
|
-
_context4.t0 = _context4["catch"](3);
|
|
3186
|
-
LOG$9.error(new DivaError('Error while logging in', {
|
|
3187
|
-
cause: _context4.t0
|
|
3188
|
-
}));
|
|
3189
|
-
case 11:
|
|
3190
|
-
a.onClick(email);
|
|
3191
|
-
case 12:
|
|
3192
|
-
case "end":
|
|
3193
|
-
return _context4.stop();
|
|
3194
|
-
}
|
|
3195
|
-
}, _callee2, null, [[3, 8]]);
|
|
3196
|
-
}));
|
|
3197
|
-
function onClick(_x) {
|
|
3198
|
-
return _onClick.apply(this, arguments);
|
|
3199
|
-
}
|
|
3200
|
-
return onClick;
|
|
3201
|
-
}()
|
|
3202
|
-
});
|
|
3203
|
-
})
|
|
3204
|
-
})
|
|
3205
|
-
};
|
|
3206
|
-
}
|
|
3207
2862
|
}, {
|
|
3208
2863
|
key: "openBanner",
|
|
3209
2864
|
value: function openBanner(banner) {
|
|
@@ -3222,31 +2877,31 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3222
2877
|
}, {
|
|
3223
2878
|
key: "sendEmail",
|
|
3224
2879
|
value: function sendEmail(_ref4) {
|
|
3225
|
-
var
|
|
2880
|
+
var _this7 = this;
|
|
3226
2881
|
var dialogText = _ref4.dialogText,
|
|
3227
2882
|
showDialog = _ref4.showDialog,
|
|
3228
2883
|
callback = _ref4.callback,
|
|
3229
2884
|
content = _ref4.content,
|
|
3230
2885
|
mailSendCallback = _ref4.mailSendCallback,
|
|
3231
2886
|
dialogAcceptMailSend = _ref4.dialogAcceptMailSend;
|
|
3232
|
-
return /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2887
|
+
return /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
3233
2888
|
var accepted, _content$language$toU, _content$language;
|
|
3234
|
-
return _regeneratorRuntime.wrap(function
|
|
3235
|
-
while (1) switch (
|
|
2889
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context4) {
|
|
2890
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
3236
2891
|
case 0:
|
|
3237
2892
|
accepted = showDialog === false;
|
|
3238
2893
|
if (!(showDialog !== false)) {
|
|
3239
|
-
|
|
2894
|
+
_context4.next = 4;
|
|
3240
2895
|
break;
|
|
3241
2896
|
}
|
|
3242
|
-
|
|
2897
|
+
_context4.next = 4;
|
|
3243
2898
|
return new Promise(function (resolve) {
|
|
3244
|
-
return
|
|
2899
|
+
return _this7.openModal({
|
|
3245
2900
|
reject: true,
|
|
3246
2901
|
accept: true,
|
|
3247
|
-
text: dialogText ?
|
|
2902
|
+
text: dialogText ? _this7.root.t(dialogText, {
|
|
3248
2903
|
to: content.to
|
|
3249
|
-
}) :
|
|
2904
|
+
}) : _this7.root.t('email.question.default', {
|
|
3250
2905
|
to: content.to
|
|
3251
2906
|
}),
|
|
3252
2907
|
callback: function callback(accept) {
|
|
@@ -3257,26 +2912,26 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3257
2912
|
});
|
|
3258
2913
|
case 4:
|
|
3259
2914
|
if (accepted) {
|
|
3260
|
-
|
|
2915
|
+
_context4.next = 6;
|
|
3261
2916
|
break;
|
|
3262
2917
|
}
|
|
3263
|
-
return
|
|
2918
|
+
return _context4.abrupt("return");
|
|
3264
2919
|
case 6:
|
|
3265
|
-
if (showDialog !== false)
|
|
3266
|
-
|
|
2920
|
+
if (showDialog !== false) _this7.root.loadingAndErrorStore.toggleLoading('sendingEmail');
|
|
2921
|
+
_context4.prev = 7;
|
|
3267
2922
|
content.language = (_content$language$toU = (_content$language = content.language) === null || _content$language === void 0 ? void 0 : _content$language.toUpperCase()) !== null && _content$language$toU !== void 0 ? _content$language$toU : instance.language.toUpperCase();
|
|
3268
|
-
|
|
3269
|
-
return
|
|
2923
|
+
_context4.next = 11;
|
|
2924
|
+
return _this7.root.apiHandler.sendEmail({
|
|
3270
2925
|
content: content,
|
|
3271
|
-
organizationIds:
|
|
2926
|
+
organizationIds: _this7.root.dataStore.fullParentList
|
|
3272
2927
|
});
|
|
3273
2928
|
case 11:
|
|
3274
2929
|
if (callback) {
|
|
3275
2930
|
callback(true);
|
|
3276
2931
|
} else {
|
|
3277
2932
|
if (showDialog !== false) {
|
|
3278
|
-
|
|
3279
|
-
text:
|
|
2933
|
+
_this7.openModal({
|
|
2934
|
+
text: _this7.root.t('email.send.success'),
|
|
3280
2935
|
accept: dialogAcceptMailSend !== null && dialogAcceptMailSend !== void 0 ? dialogAcceptMailSend : true,
|
|
3281
2936
|
reject: dialogAcceptMailSend ? true : false,
|
|
3282
2937
|
callback: function callback(accept) {
|
|
@@ -3287,31 +2942,31 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3287
2942
|
});
|
|
3288
2943
|
}
|
|
3289
2944
|
}
|
|
3290
|
-
|
|
2945
|
+
_context4.next = 18;
|
|
3291
2946
|
break;
|
|
3292
2947
|
case 14:
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
LOG$9.error(
|
|
2948
|
+
_context4.prev = 14;
|
|
2949
|
+
_context4.t0 = _context4["catch"](7);
|
|
2950
|
+
LOG$9.error(_context4.t0);
|
|
3296
2951
|
if (callback) {
|
|
3297
2952
|
callback(false);
|
|
3298
2953
|
} else {
|
|
3299
2954
|
if (showDialog !== false) {
|
|
3300
|
-
|
|
3301
|
-
text:
|
|
2955
|
+
_this7.openModal({
|
|
2956
|
+
text: _this7.root.t('email.send.error'),
|
|
3302
2957
|
accept: true
|
|
3303
2958
|
});
|
|
3304
2959
|
}
|
|
3305
2960
|
}
|
|
3306
2961
|
case 18:
|
|
3307
|
-
|
|
3308
|
-
if (showDialog !== false)
|
|
3309
|
-
return
|
|
2962
|
+
_context4.prev = 18;
|
|
2963
|
+
if (showDialog !== false) _this7.root.loadingAndErrorStore.toggleLoading('sendingEmail');
|
|
2964
|
+
return _context4.finish(18);
|
|
3310
2965
|
case 21:
|
|
3311
2966
|
case "end":
|
|
3312
|
-
return
|
|
2967
|
+
return _context4.stop();
|
|
3313
2968
|
}
|
|
3314
|
-
},
|
|
2969
|
+
}, _callee2, null, [[7, 14, 18, 21]]);
|
|
3315
2970
|
})();
|
|
3316
2971
|
}
|
|
3317
2972
|
|
|
@@ -3347,31 +3002,31 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3347
3002
|
}, {
|
|
3348
3003
|
key: "setContainer",
|
|
3349
3004
|
value: (function () {
|
|
3350
|
-
var _setContainer = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
3351
|
-
return _regeneratorRuntime.wrap(function
|
|
3352
|
-
while (1) switch (
|
|
3005
|
+
var _setContainer = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(ref) {
|
|
3006
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context5) {
|
|
3007
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
3353
3008
|
case 0:
|
|
3354
3009
|
if (!(ref === this.ref)) {
|
|
3355
|
-
|
|
3010
|
+
_context5.next = 2;
|
|
3356
3011
|
break;
|
|
3357
3012
|
}
|
|
3358
|
-
return
|
|
3013
|
+
return _context5.abrupt("return");
|
|
3359
3014
|
case 2:
|
|
3360
3015
|
this.ref = ref;
|
|
3361
3016
|
if (this.resizeObserver) {
|
|
3362
3017
|
unregisterResizeObserver(this.resizeObserver);
|
|
3363
3018
|
}
|
|
3364
|
-
|
|
3019
|
+
_context5.next = 6;
|
|
3365
3020
|
return registerResizeObserver(ref, this.onResize.bind(this));
|
|
3366
3021
|
case 6:
|
|
3367
|
-
this.resizeObserver =
|
|
3022
|
+
this.resizeObserver = _context5.sent;
|
|
3368
3023
|
case 7:
|
|
3369
3024
|
case "end":
|
|
3370
|
-
return
|
|
3025
|
+
return _context5.stop();
|
|
3371
3026
|
}
|
|
3372
|
-
},
|
|
3027
|
+
}, _callee3, this);
|
|
3373
3028
|
}));
|
|
3374
|
-
function setContainer(
|
|
3029
|
+
function setContainer(_x) {
|
|
3375
3030
|
return _setContainer.apply(this, arguments);
|
|
3376
3031
|
}
|
|
3377
3032
|
return setContainer;
|
|
@@ -3401,10 +3056,10 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3401
3056
|
key: "availableComponents",
|
|
3402
3057
|
get: function get() {
|
|
3403
3058
|
var _this$root,
|
|
3404
|
-
|
|
3059
|
+
_this8 = this;
|
|
3405
3060
|
return (_this$root = this.root) === null || _this$root === void 0 ? void 0 : _this$root.configurationStore.components.filter(function (component) {
|
|
3406
3061
|
//the component must be passed to diva core
|
|
3407
|
-
if (!
|
|
3062
|
+
if (!_this8.configuration.find(function (config) {
|
|
3408
3063
|
return config.name == component.type;
|
|
3409
3064
|
})) {
|
|
3410
3065
|
return false;
|
|
@@ -3415,11 +3070,11 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3415
3070
|
return true;
|
|
3416
3071
|
}
|
|
3417
3072
|
//if the user is not logged in the component must be public
|
|
3418
|
-
if (!
|
|
3073
|
+
if (!_this8.root.dataStore.user) {
|
|
3419
3074
|
return false;
|
|
3420
3075
|
}
|
|
3421
3076
|
//if there is a permission specified, the user must have it
|
|
3422
|
-
return component.permission ?
|
|
3077
|
+
return component.permission ? _this8.root.dataStore.userHasPermission(component.permission) : true;
|
|
3423
3078
|
});
|
|
3424
3079
|
}
|
|
3425
3080
|
|
|
@@ -3429,14 +3084,14 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3429
3084
|
}, {
|
|
3430
3085
|
key: "components",
|
|
3431
3086
|
get: function get() {
|
|
3432
|
-
var
|
|
3087
|
+
var _this9 = this;
|
|
3433
3088
|
var componentDefinitionToRender = this.configuration.filter(function (config) {
|
|
3434
3089
|
//there must be a state present in order for the component to be rendered
|
|
3435
|
-
if (!
|
|
3090
|
+
if (!_this9.state.has(config.name)) {
|
|
3436
3091
|
return false;
|
|
3437
3092
|
}
|
|
3438
3093
|
//the component must be contained in the available components list in order to be rendered
|
|
3439
|
-
return
|
|
3094
|
+
return _this9.availableComponents.find(function (component) {
|
|
3440
3095
|
return component.type == config.name;
|
|
3441
3096
|
});
|
|
3442
3097
|
});
|
|
@@ -3444,7 +3099,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3444
3099
|
//when a new component is added we have to make sure that for the currently open components the existing instance is reused
|
|
3445
3100
|
//withTransaction creates a new instance if APM is active, so we would loose the state of currently open components
|
|
3446
3101
|
componentDefinitionToRender.forEach(function (cmp) {
|
|
3447
|
-
var toRender =
|
|
3102
|
+
var toRender = _this9._currentlyRendered.find(function (c) {
|
|
3448
3103
|
return c.name == cmp.name;
|
|
3449
3104
|
});
|
|
3450
3105
|
if (!toRender) {
|
|
@@ -3465,10 +3120,10 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3465
3120
|
}, {
|
|
3466
3121
|
key: "fullscreenComponent",
|
|
3467
3122
|
get: function get() {
|
|
3468
|
-
var
|
|
3123
|
+
var _this10 = this;
|
|
3469
3124
|
var component = this.availableComponents.find(function (component) {
|
|
3470
|
-
var
|
|
3471
|
-
return component.type == ((
|
|
3125
|
+
var _this10$_fullscreenCo;
|
|
3126
|
+
return component.type == ((_this10$_fullscreenCo = _this10._fullscreenComponent) === null || _this10$_fullscreenCo === void 0 ? void 0 : _this10$_fullscreenCo.key);
|
|
3472
3127
|
});
|
|
3473
3128
|
var cmp = this.configuration.find(function (config) {
|
|
3474
3129
|
return (component === null || component === void 0 ? void 0 : component.type) == config.name;
|
|
@@ -3515,24 +3170,24 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3515
3170
|
key: "availableButtons",
|
|
3516
3171
|
get: function get() {
|
|
3517
3172
|
var _this$root$configurat,
|
|
3518
|
-
|
|
3173
|
+
_this11 = this;
|
|
3519
3174
|
return (_this$root$configurat = this.root.configurationStore.navigation) === null || _this$root$configurat === void 0 ? void 0 : _this$root$configurat.buttons.filter(function (button) {
|
|
3520
3175
|
//if component is public it can be displayed
|
|
3521
3176
|
if (button.isPublic) {
|
|
3522
3177
|
return true;
|
|
3523
3178
|
}
|
|
3524
3179
|
//if the user is not logged in the component must be public
|
|
3525
|
-
if (!
|
|
3180
|
+
if (!_this11.root.dataStore.user) {
|
|
3526
3181
|
return false;
|
|
3527
3182
|
}
|
|
3528
3183
|
|
|
3529
3184
|
//if the button is opening a component, the component must be availalbe
|
|
3530
|
-
if (button.action.type && !
|
|
3185
|
+
if (button.action.type && !_this11.availableComponentList.includes(button.action.type)) {
|
|
3531
3186
|
return false;
|
|
3532
3187
|
}
|
|
3533
3188
|
|
|
3534
3189
|
//if there is a permission specified, the user must have it
|
|
3535
|
-
return button.permission ?
|
|
3190
|
+
return button.permission ? _this11.root.dataStore.userHasPermission(button.permission) : true;
|
|
3536
3191
|
});
|
|
3537
3192
|
}
|
|
3538
3193
|
|
|
@@ -3617,7 +3272,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3617
3272
|
}, {
|
|
3618
3273
|
key: "updateStateAfterLogout",
|
|
3619
3274
|
value: function updateStateAfterLogout() {
|
|
3620
|
-
var
|
|
3275
|
+
var _this12 = this;
|
|
3621
3276
|
var _iterator3 = _createForOfIteratorHelper(this.state.entries()),
|
|
3622
3277
|
_step3;
|
|
3623
3278
|
try {
|
|
@@ -3625,19 +3280,19 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3625
3280
|
var _step3$value = _slicedToArray(_step3.value, 2),
|
|
3626
3281
|
type = _step3$value[0],
|
|
3627
3282
|
component = _step3$value[1];
|
|
3628
|
-
var config =
|
|
3283
|
+
var config = _this12.root.configurationStore.components.find(function (c) {
|
|
3629
3284
|
return c.type == type;
|
|
3630
3285
|
});
|
|
3631
3286
|
if (!(config !== null && config !== void 0 && config.isPublic)) {
|
|
3632
|
-
|
|
3633
|
-
if (
|
|
3634
|
-
|
|
3635
|
-
|
|
3287
|
+
_this12.state["delete"](type);
|
|
3288
|
+
if (_this12.visible == type) {
|
|
3289
|
+
_this12.visible = undefined;
|
|
3290
|
+
_this12._restrictedComponent = {
|
|
3636
3291
|
type: type,
|
|
3637
3292
|
parameters: component.parameters,
|
|
3638
3293
|
internal: component.internal
|
|
3639
3294
|
};
|
|
3640
|
-
|
|
3295
|
+
_this12.root.authorizationStore.showLogin();
|
|
3641
3296
|
}
|
|
3642
3297
|
}
|
|
3643
3298
|
};
|
|
@@ -3670,7 +3325,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3670
3325
|
if (action.url) {
|
|
3671
3326
|
link = this.resoveUrl(action.url);
|
|
3672
3327
|
} else {
|
|
3673
|
-
var _this$root$dataStore$
|
|
3328
|
+
var _this$root$dataStore$5;
|
|
3674
3329
|
var _ref5 = action,
|
|
3675
3330
|
parameters = _ref5.parameters;
|
|
3676
3331
|
var url = new URL(baseUrl);
|
|
@@ -3679,7 +3334,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3679
3334
|
return param[1] ? params.append(param[0], param[1]) : false;
|
|
3680
3335
|
});
|
|
3681
3336
|
params.append('lang', instance.language);
|
|
3682
|
-
if ((_this$root$dataStore$
|
|
3337
|
+
if ((_this$root$dataStore$5 = this.root.dataStore.organization) !== null && _this$root$dataStore$5 !== void 0 && _this$root$dataStore$5._id) {
|
|
3683
3338
|
params.append('organizationId', this.root.dataStore.organization._id);
|
|
3684
3339
|
}
|
|
3685
3340
|
link = url.href;
|
|
@@ -9188,7 +8843,6 @@ var DivaCoreProvider = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
9188
8843
|
closeFullscreen: store.contentStore.closeFullscreen.bind(store.contentStore),
|
|
9189
8844
|
openDrawerMenu: store.contentStore.openDrawerMenu.bind(store.contentStore),
|
|
9190
8845
|
closeDrawerMenu: store.contentStore.closeDrawerMenu.bind(store.contentStore),
|
|
9191
|
-
openBarrier: store.contentStore.openBarrier.bind(store.contentStore),
|
|
9192
8846
|
updateHeaderInfos: store.contentStore.updateHeaderInfos.bind(store.contentStore),
|
|
9193
8847
|
openBanner: store.contentStore.openBanner.bind(store.contentStore),
|
|
9194
8848
|
closeBanner: store.contentStore.closeBanner.bind(store.contentStore),
|
|
@@ -9290,7 +8944,6 @@ var DivaCoreProvider = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
9290
8944
|
closeFullscreen: store.contentStore.closeFullscreen.bind(store.contentStore),
|
|
9291
8945
|
openDrawerMenu: store.contentStore.openDrawerMenu.bind(store.contentStore),
|
|
9292
8946
|
closeDrawerMenu: store.contentStore.closeDrawerMenu.bind(store.contentStore),
|
|
9293
|
-
openBarrier: store.contentStore.openBarrier.bind(store.contentStore),
|
|
9294
8947
|
updateHeaderInfos: store.contentStore.updateHeaderInfos.bind(store.contentStore),
|
|
9295
8948
|
openBanner: store.contentStore.openBanner.bind(store.contentStore),
|
|
9296
8949
|
closeBanner: store.contentStore.closeBanner.bind(store.contentStore),
|
|
@@ -9470,6 +9123,33 @@ var useDivaCore = function useDivaCore() {
|
|
|
9470
9123
|
return context.context;
|
|
9471
9124
|
};
|
|
9472
9125
|
|
|
9126
|
+
function styleInject(css, ref) {
|
|
9127
|
+
if ( ref === void 0 ) ref = {};
|
|
9128
|
+
var insertAt = ref.insertAt;
|
|
9129
|
+
|
|
9130
|
+
if (!css || typeof document === 'undefined') { return; }
|
|
9131
|
+
|
|
9132
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
9133
|
+
var style = document.createElement('style');
|
|
9134
|
+
style.type = 'text/css';
|
|
9135
|
+
|
|
9136
|
+
if (insertAt === 'top') {
|
|
9137
|
+
if (head.firstChild) {
|
|
9138
|
+
head.insertBefore(style, head.firstChild);
|
|
9139
|
+
} else {
|
|
9140
|
+
head.appendChild(style);
|
|
9141
|
+
}
|
|
9142
|
+
} else {
|
|
9143
|
+
head.appendChild(style);
|
|
9144
|
+
}
|
|
9145
|
+
|
|
9146
|
+
if (style.styleSheet) {
|
|
9147
|
+
style.styleSheet.cssText = css;
|
|
9148
|
+
} else {
|
|
9149
|
+
style.appendChild(document.createTextNode(css));
|
|
9150
|
+
}
|
|
9151
|
+
}
|
|
9152
|
+
|
|
9473
9153
|
var overlay$2 = "overlay-X3zhH";
|
|
9474
9154
|
var loading = "loading-kAuhm";
|
|
9475
9155
|
var css_248z$5 = ".overlay-X3zhH {\n height: 100%;\n width: 100%;\n display: flex;\n background-color: rgba(255, 255, 255, 0.6);\n z-index: 1000;\n justify-content: center;\n align-items: center;\n position: absolute;\n}\n\n.loading-kAuhm {\n margin: 0 auto;\n display: inline-block;\n position: relative;\n width: 80px;\n height: 80px;\n}\n.loading-kAuhm div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: 64px;\n height: 64px;\n margin: 8px;\n border: 8px solid #b6b6b6;\n border-radius: 50%;\n animation: loading-kAuhm 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: #b6b6b6 transparent transparent transparent;\n}\n.loading-kAuhm div:nth-child(1) {\n animation-delay: -0.45s;\n}\n.loading-kAuhm div:nth-child(2) {\n animation-delay: -0.3s;\n}\n.loading-kAuhm div:nth-child(3) {\n animation-delay: -0.15s;\n}\n@keyframes loading-kAuhm {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n";
|
|
@@ -9753,7 +9433,7 @@ var DrawerMenu = observer(MobileDrawer);
|
|
|
9753
9433
|
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9754
9434
|
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9755
9435
|
var LazyModals$1 = /*#__PURE__*/React.lazy(function () {
|
|
9756
|
-
return import('./ModalsWrapper-
|
|
9436
|
+
return import('./ModalsWrapper-d9f3db83.js');
|
|
9757
9437
|
});
|
|
9758
9438
|
function Fullscreen(_ref) {
|
|
9759
9439
|
var inAbsoluteFullscreen = _ref.inAbsoluteFullscreen;
|
|
@@ -10028,7 +9708,7 @@ function ErrorDisplay() {
|
|
|
10028
9708
|
children: [loadingAndErrorStore.divaErrorCode ? loadingAndErrorStore.divaErrorCode + ': ' : '', " ", loadingAndErrorStore.error]
|
|
10029
9709
|
}), /*#__PURE__*/jsxs("div", {
|
|
10030
9710
|
className: actionButtons,
|
|
10031
|
-
children: [((_loadingAndErrorStore2 = loadingAndErrorStore.fallbackModule) === null || _loadingAndErrorStore2 === void 0 ? void 0 : _loadingAndErrorStore2.route) && /*#__PURE__*/jsx(Button
|
|
9711
|
+
children: [((_loadingAndErrorStore2 = loadingAndErrorStore.fallbackModule) === null || _loadingAndErrorStore2 === void 0 ? void 0 : _loadingAndErrorStore2.route) && /*#__PURE__*/jsx(Button, {
|
|
10032
9712
|
color: "primary",
|
|
10033
9713
|
variant: "contained",
|
|
10034
9714
|
onClick: function onClick() {
|
|
@@ -10038,14 +9718,14 @@ function ErrorDisplay() {
|
|
|
10038
9718
|
});
|
|
10039
9719
|
},
|
|
10040
9720
|
children: (_loadingAndErrorStore6 = loadingAndErrorStore.fallbackModule.text) !== null && _loadingAndErrorStore6 !== void 0 ? _loadingAndErrorStore6 : t('portal.error.gotodefaultmodule') + ' (' + loadingAndErrorStore.fallbackModule.route.replace('/', '') + ')'
|
|
10041
|
-
}), configurationStore.applicationEnvironment !== 'WEB' && loadingAndErrorStore.showLogout && /*#__PURE__*/jsx(Button
|
|
9721
|
+
}), configurationStore.applicationEnvironment !== 'WEB' && loadingAndErrorStore.showLogout && /*#__PURE__*/jsx(Button, {
|
|
10042
9722
|
color: "primary",
|
|
10043
9723
|
variant: "contained",
|
|
10044
9724
|
onClick: function onClick() {
|
|
10045
9725
|
return authorizationStore.logout();
|
|
10046
9726
|
},
|
|
10047
9727
|
children: "Logout"
|
|
10048
|
-
}), showReload && /*#__PURE__*/jsx(Button
|
|
9728
|
+
}), showReload && /*#__PURE__*/jsx(Button, {
|
|
10049
9729
|
color: "primary",
|
|
10050
9730
|
variant: "contained",
|
|
10051
9731
|
onClick: function onClick() {
|
|
@@ -10211,10 +9891,10 @@ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
|
|
|
10211
9891
|
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10212
9892
|
var LOG$2 = getLogger('Framework', 'Root');
|
|
10213
9893
|
var LazyAuth = /*#__PURE__*/React.lazy(function () {
|
|
10214
|
-
return import('./index-
|
|
9894
|
+
return import('./index-59d87a3c.js');
|
|
10215
9895
|
});
|
|
10216
9896
|
var LazyModals = /*#__PURE__*/React.lazy(function () {
|
|
10217
|
-
return import('./ModalsWrapper-
|
|
9897
|
+
return import('./ModalsWrapper-d9f3db83.js');
|
|
10218
9898
|
});
|
|
10219
9899
|
function ContentComponent() {
|
|
10220
9900
|
var context = useDivaCoreContext();
|
|
@@ -10489,7 +10169,7 @@ function HelpButton(_ref) {
|
|
|
10489
10169
|
|
|
10490
10170
|
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10491
10171
|
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10492
|
-
var actionFunctions = ['openComponent', 'closeComponentInFullscreen', 'setAbsoluteFullScreen', 'updateBreadcrumbs', 'openModal', 'closeModal', 'sendEmail', 'updateCustomLogo', 'updateCustomHeaderElement', 'toggleHidePrices', 'toggleHideConfigPricePreview', 'toggleLoading', 'changeLanguage', 'changeLoginMode', 'onEvent', 'subscribeEvents', 'unSubscribeEvents', 'setOrganization', 'getSessionGuid', 'getApi2AuthLoginData', 'logout', 'showLoginWindow', 'userHasPermission', 'openFullscreen', 'closeFullscreen', 'openDrawerMenu', 'closeDrawerMenu', '
|
|
10172
|
+
var actionFunctions = ['openComponent', 'closeComponentInFullscreen', 'setAbsoluteFullScreen', 'updateBreadcrumbs', 'openModal', 'closeModal', 'sendEmail', 'updateCustomLogo', 'updateCustomHeaderElement', 'toggleHidePrices', 'toggleHideConfigPricePreview', 'toggleLoading', 'changeLanguage', 'changeLoginMode', 'onEvent', 'subscribeEvents', 'unSubscribeEvents', 'setOrganization', 'getSessionGuid', 'getApi2AuthLoginData', 'logout', 'showLoginWindow', 'userHasPermission', 'openFullscreen', 'closeFullscreen', 'openDrawerMenu', 'closeDrawerMenu', 'updateHeaderInfos', 'openBanner', 'closeBanner', 'resolveComponent', 'openSnackBar', 'setComponentChange'];
|
|
10493
10173
|
function getRender(C) {
|
|
10494
10174
|
return function (args) {
|
|
10495
10175
|
return /*#__PURE__*/jsx(DivaMockProvider, {
|
|
@@ -11070,13 +10750,6 @@ var MockedRootStore = /*#__PURE__*/function () {
|
|
|
11070
10750
|
throw new Error('Method not implemented.');
|
|
11071
10751
|
}
|
|
11072
10752
|
},
|
|
11073
|
-
openBarrier: function openBarrier(barrier) {
|
|
11074
|
-
if (_this2.actions.openBarrier) {
|
|
11075
|
-
_this2.actions.openBarrier(barrier);
|
|
11076
|
-
} else {
|
|
11077
|
-
throw new Error('Method not implemented.');
|
|
11078
|
-
}
|
|
11079
|
-
},
|
|
11080
10753
|
updateHeaderInfos: function updateHeaderInfos(headerInfos) {
|
|
11081
10754
|
if (_this2.actions.updateHeaderInfos) {
|
|
11082
10755
|
_this2.actions.updateHeaderInfos(headerInfos);
|
|
@@ -11202,4 +10875,4 @@ LOG.startTransaction({
|
|
|
11202
10875
|
});
|
|
11203
10876
|
window.DIVA_VERSION = "v".concat(process.env.VERSION);
|
|
11204
10877
|
|
|
11205
|
-
export {
|
|
10878
|
+
export { AuthorizationHandler as A, Content as C, DivaCore as D, HelpButton as H, ONE_DAY_UNIX as O, ProductHandler as P, RequestStatus as R, SupportHandler as S, useDivaCore as a, AnalyticsHandler as b, OrganizationHandler as c, ClientArticleHandler as d, DivaMockProvider as e, storyBookCoreMock as f, getLogger as g, styleInject as s, useDivaCoreContext as u };
|