@crystaldesign/diva-core 25.4.0-beta.9 → 25.4.0-rc.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.
- package/build/esm/{ModalsWrapper-5256e809.js → ModalsWrapper-a64f9371.js} +2 -1
- package/build/esm/{index-4b1b7956.js → index-5cb3b700.js} +525 -419
- package/build/esm/{index-6195713a.js → index-9a4b1c67.js} +161 -120
- package/build/esm/index.js +3 -1
- package/build/types/core/src/elements/Auth/Button/index.d.ts +2 -1
- package/build/types/core/src/elements/Auth/Button/index.d.ts.map +1 -1
- package/build/types/core/src/elements/Auth/Header/index.d.ts +9 -0
- package/build/types/core/src/elements/Auth/Header/index.d.ts.map +1 -0
- package/build/types/core/src/elements/Auth/Input/index.d.ts +3 -1
- package/build/types/core/src/elements/Auth/Input/index.d.ts.map +1 -1
- package/build/types/core/src/elements/Auth/Login/index.d.ts.map +1 -1
- package/build/types/core/src/elements/Auth/Register/index.d.ts.map +1 -1
- package/build/types/core/src/elements/Auth/RequestNewPassword/index.d.ts.map +1 -1
- package/build/types/core/src/elements/Auth/WelcomeScreen/index.d.ts.map +1 -1
- package/build/types/core/src/elements/Auth/index.d.ts.map +1 -1
- package/build/types/core/src/elements/Fullscreen/index.d.ts +3 -1
- package/build/types/core/src/elements/Fullscreen/index.d.ts.map +1 -1
- package/build/types/core/src/externalTypes.d.ts +3 -2
- package/build/types/core/src/externalTypes.d.ts.map +1 -1
- package/build/types/core/src/handler/InternalApiHandler.d.ts +1 -2
- package/build/types/core/src/handler/InternalApiHandler.d.ts.map +1 -1
- package/build/types/core/src/handler/MediaHandler/index.d.ts +3 -2
- package/build/types/core/src/handler/MediaHandler/index.d.ts.map +1 -1
- package/build/types/core/src/handler/OrganizationHandler/index.d.ts +1 -1
- package/build/types/core/src/handler/OrganizationHandler/index.d.ts.map +1 -1
- package/build/types/core/src/store/ConfigurationStore.d.ts.map +1 -1
- package/build/types/core/src/store/ContentStore.d.ts +2 -0
- package/build/types/core/src/store/ContentStore.d.ts.map +1 -1
- package/build/types/core/src/store/DataStore.d.ts +1 -1
- package/build/types/core/src/store/index.d.ts +4 -0
- package/build/types/core/src/store/index.d.ts.map +1 -1
- package/build/umd/{109.diva-core.umd.min.js → 135.diva-core.umd.min.js} +2 -2
- package/build/umd/135.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/210.diva-core.umd.min.js +2 -0
- package/build/umd/210.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/215.diva-core.umd.min.js +2 -0
- package/build/umd/215.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/{962.diva-core.umd.min.js → 263.diva-core.umd.min.js} +2 -2
- package/build/umd/263.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/429.diva-core.umd.min.js +2 -0
- package/build/umd/429.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/43.diva-core.umd.min.js +2 -0
- package/build/umd/43.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/{535.diva-core.umd.min.js → 700.diva-core.umd.min.js} +2 -2
- package/build/umd/700.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/731.diva-core.umd.min.js +2 -0
- package/build/umd/731.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/{304.diva-core.umd.min.js → 800.diva-core.umd.min.js} +2 -2
- package/build/umd/800.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/83.diva-core.umd.min.js +2 -0
- package/build/umd/83.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/diva-core.umd.min.js +29 -2
- package/build/umd/diva-core.umd.min.js.LICENSE.txt +11 -1
- package/build/umd/report.html +1 -1
- package/package.json +10 -10
- package/build/umd/109.diva-core.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/304.diva-core.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/41.diva-core.umd.min.js +0 -2
- package/build/umd/41.diva-core.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/53.diva-core.umd.min.js +0 -2
- package/build/umd/53.diva-core.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/535.diva-core.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/671.diva-core.umd.min.js +0 -2
- package/build/umd/671.diva-core.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/704.diva-core.umd.min.js +0 -2
- package/build/umd/704.diva-core.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/806.diva-core.umd.min.js +0 -2
- package/build/umd/806.diva-core.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/902.diva-core.umd.min.js +0 -2
- package/build/umd/902.diva-core.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/962.diva-core.umd.min.js.LICENSE.txt +0 -1
|
@@ -27,14 +27,16 @@ import { withTransaction } from '@elastic/apm-rum-react';
|
|
|
27
27
|
import Typography from '@mui/material/Typography';
|
|
28
28
|
import { useTranslation, Trans, I18nextProvider } from 'react-i18next';
|
|
29
29
|
import classnames from 'classnames';
|
|
30
|
+
import Button$1 from '@mui/material/Button';
|
|
30
31
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
32
|
+
import { ArrowBack } from '@mui/icons-material';
|
|
31
33
|
import '@crystaldesign/basket-model';
|
|
32
34
|
import debounce from 'lodash/debounce';
|
|
33
35
|
import axios from 'axios';
|
|
34
36
|
import { ProductHandlerAbstract } from '@crystaldesign/product-handler';
|
|
35
37
|
import { useSwipeable } from 'react-swipeable';
|
|
36
38
|
import { ContentBoxComponent } from '@crystaldesign/content-box';
|
|
37
|
-
import { Button as Button$
|
|
39
|
+
import { Button as Button$2, Snackbar, SnackbarContent, IconButton, Card, CardHeader, CardContent } from '@mui/material';
|
|
38
40
|
import { useTranslation as useTranslation$1, useDivaCore as useDivaCore$1 } from '@crystaldesign/diva-core';
|
|
39
41
|
import QRCode from 'react-qr-code';
|
|
40
42
|
import CloseIcon from '@mui/icons-material/Close';
|
|
@@ -44,7 +46,7 @@ import { actions } from '@storybook/addon-actions';
|
|
|
44
46
|
import * as Styles from '@mui/styles';
|
|
45
47
|
|
|
46
48
|
(function() {
|
|
47
|
-
const env = {"STAGE":"production","VERSION":"25.4.0-
|
|
49
|
+
const env = {"STAGE":"production","VERSION":"25.4.0-rc.1"};
|
|
48
50
|
try {
|
|
49
51
|
if (process) {
|
|
50
52
|
process.env = Object.assign({}, process.env);
|
|
@@ -121,8 +123,8 @@ function baseUrl() {
|
|
|
121
123
|
return urlParts[urlParts.length - 2] + '.' + urlParts[urlParts.length - 1];
|
|
122
124
|
}
|
|
123
125
|
|
|
124
|
-
function ownKeys$
|
|
125
|
-
function _objectSpread$
|
|
126
|
+
function ownKeys$h(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$h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$h(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
126
128
|
var _existingLogger = new Map();
|
|
127
129
|
var _apmInitialized = false;
|
|
128
130
|
var _onErrorEvent = function _onErrorEvent() {};
|
|
@@ -203,9 +205,9 @@ var ApplicationLogger = /*#__PURE__*/function () {
|
|
|
203
205
|
this.transactions["delete"](eventId);
|
|
204
206
|
event.end = end;
|
|
205
207
|
var cleanLabels = this.cleanLabels(labels);
|
|
206
|
-
event.event.labels = _objectSpread$
|
|
208
|
+
event.event.labels = _objectSpread$h(_objectSpread$h({}, event.event.labels), cleanLabels);
|
|
207
209
|
if (event.event.span) {
|
|
208
|
-
event.event.span.addLabels(_objectSpread$
|
|
210
|
+
event.event.span.addLabels(_objectSpread$h(_objectSpread$h(_objectSpread$h({}, event.event.labels), cleanLabels), {}, {
|
|
209
211
|
eventId: eventId
|
|
210
212
|
}));
|
|
211
213
|
event.event.span.end();
|
|
@@ -213,7 +215,7 @@ var ApplicationLogger = /*#__PURE__*/function () {
|
|
|
213
215
|
clearTimeout(event.event.warningTimeout);
|
|
214
216
|
clearTimeout(event.event.errorTimeout);
|
|
215
217
|
this.debug("Transaction ".concat(event.event.type, " (").concat(event.event.message, ") took ").concat(Math.floor(end - event.start), "ms"));
|
|
216
|
-
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$h(_objectSpread$h(_objectSpread$h({}, event.event.labels), cleanLabels), {}, {
|
|
217
219
|
eventId: eventId,
|
|
218
220
|
status: event.event.timeout ? 'TIMEOUT' : 'SUCCESS',
|
|
219
221
|
eventDuration: Math.floor(end - event.start),
|
|
@@ -248,9 +250,9 @@ var ApplicationLogger = /*#__PURE__*/function () {
|
|
|
248
250
|
}
|
|
249
251
|
event.end = end;
|
|
250
252
|
var cleanLabels = this.cleanLabels(labels);
|
|
251
|
-
event.event.labels = _objectSpread$
|
|
253
|
+
event.event.labels = _objectSpread$h(_objectSpread$h({}, event.event.labels), cleanLabels);
|
|
252
254
|
if (event.event.span) {
|
|
253
|
-
event.event.span.addLabels(_objectSpread$
|
|
255
|
+
event.event.span.addLabels(_objectSpread$h(_objectSpread$h(_objectSpread$h({}, event.event.labels), cleanLabels), {}, {
|
|
254
256
|
eventId: eventId
|
|
255
257
|
}));
|
|
256
258
|
event.event.span.end();
|
|
@@ -258,7 +260,7 @@ var ApplicationLogger = /*#__PURE__*/function () {
|
|
|
258
260
|
clearTimeout(event.event.warningTimeout);
|
|
259
261
|
clearTimeout(event.event.errorTimeout);
|
|
260
262
|
this.debug("Transaction ".concat(event.event.type, " (").concat(event.event.message, ") failed after ").concat(Math.floor(end - event.start), "ms"));
|
|
261
|
-
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$h(_objectSpread$h(_objectSpread$h({}, event.event.labels), cleanLabels), {}, {
|
|
262
264
|
error: code,
|
|
263
265
|
errorMessage: message,
|
|
264
266
|
eventId: eventId,
|
|
@@ -357,7 +359,7 @@ var ApplicationLogger = /*#__PURE__*/function () {
|
|
|
357
359
|
_onErrorEvent(_error.message, _error.name);
|
|
358
360
|
|
|
359
361
|
//for apm we spread the custom object directly on the error object, so that the are added to APM as custom attributes
|
|
360
|
-
var forApm = _objectSpread$
|
|
362
|
+
var forApm = _objectSpread$h(_objectSpread$h({}, _error), _error.custom);
|
|
361
363
|
(_getApmInstance = getApmInstance()) === null || _getApmInstance === void 0 || _getApmInstance.captureError(forApm);
|
|
362
364
|
}
|
|
363
365
|
}, {
|
|
@@ -431,8 +433,8 @@ if (typeof __webpack_public_path__ !== 'undefined') {
|
|
|
431
433
|
}
|
|
432
434
|
}
|
|
433
435
|
|
|
434
|
-
function ownKeys$
|
|
435
|
-
function _objectSpread$
|
|
436
|
+
function ownKeys$g(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$g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$g(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
436
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)); }
|
|
437
439
|
function _isNativeReflectConstruct$2() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$2 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
438
440
|
var LOG$e = getLogger('Framework', 'webcomponent');
|
|
@@ -656,14 +658,14 @@ var CoreWrapper = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
656
658
|
if (!components) {
|
|
657
659
|
return /*#__PURE__*/jsx(Fragment, {});
|
|
658
660
|
}
|
|
659
|
-
return /*#__PURE__*/jsx(DivaCore, _objectSpread$
|
|
661
|
+
return /*#__PURE__*/jsx(DivaCore, _objectSpread$g(_objectSpread$g({}, props), {}, {
|
|
660
662
|
components: components,
|
|
661
663
|
ref: ref
|
|
662
664
|
}));
|
|
663
665
|
});
|
|
664
666
|
|
|
665
667
|
//we have to externalize the materialUI styling here, so that also in UMD the same instance is used
|
|
666
|
-
window.MaterialUIStyles = _objectSpread$
|
|
668
|
+
window.MaterialUIStyles = _objectSpread$g(_objectSpread$g({}, Styles), CoreStyles);
|
|
667
669
|
if (!window.customElements.get('diva-framework')) {
|
|
668
670
|
window.customElements.define('diva-framework', DivaFramework);
|
|
669
671
|
}
|
|
@@ -766,8 +768,8 @@ var defaultTheme = {
|
|
|
766
768
|
}
|
|
767
769
|
};
|
|
768
770
|
|
|
769
|
-
function ownKeys$
|
|
770
|
-
function _objectSpread$
|
|
771
|
+
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; }
|
|
772
|
+
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; }
|
|
771
773
|
var LOG$d = getLogger('Framework', 'ConfigurationStore');
|
|
772
774
|
var ConfigurationStore = /*#__PURE__*/function () {
|
|
773
775
|
function ConfigurationStore(root, identifier, defaultApiConfig, domain) {
|
|
@@ -876,7 +878,7 @@ var ConfigurationStore = /*#__PURE__*/function () {
|
|
|
876
878
|
}, {
|
|
877
879
|
key: "navigation",
|
|
878
880
|
get: function get() {
|
|
879
|
-
var _this$_configuration9, _this$_configuration10, _this$_configuration11, _this$_configuration12, _this$_configuration13, _this$_configuration14, _this$_configuration15, _this$_configuration16, _this$_configuration17, _this$_configuration18, _this$_configuration19, _this$_configuration20, _this$_configuration21, _this$_configuration22, _this$_configuration23, _this$_configuration24, _this$_configuration25, _this$_configuration26;
|
|
881
|
+
var _this$_configuration9, _this$_configuration10, _this$_configuration11, _this$_configuration12, _this$_configuration13, _this$_configuration14, _this$_configuration15, _this$_configuration16, _this$_configuration17, _this$_configuration18, _this$_configuration19, _this$_configuration20, _this$_configuration21, _this$_configuration22, _this$_configuration23, _this$_configuration24, _this$_configuration25, _this$root$dataStore$, _this$_configuration26;
|
|
880
882
|
return {
|
|
881
883
|
buttons: ((_this$_configuration9 = this._configuration) === null || _this$_configuration9 === void 0 || (_this$_configuration9 = _this$_configuration9.navigation) === null || _this$_configuration9 === void 0 ? void 0 : _this$_configuration9.buttons) || [],
|
|
882
884
|
imprintUrl: (_this$_configuration10 = this._configuration) === null || _this$_configuration10 === void 0 || (_this$_configuration10 = _this$_configuration10.navigation) === null || _this$_configuration10 === void 0 ? void 0 : _this$_configuration10.imprintUrl,
|
|
@@ -895,9 +897,9 @@ var ConfigurationStore = /*#__PURE__*/function () {
|
|
|
895
897
|
qrCodeScanner: (_this$_configuration23 = this._configuration) === null || _this$_configuration23 === void 0 || (_this$_configuration23 = _this$_configuration23.navigation) === null || _this$_configuration23 === void 0 ? void 0 : _this$_configuration23.qrCodeScanner,
|
|
896
898
|
greetingsText: (_this$_configuration24 = this._configuration) === null || _this$_configuration24 === void 0 || (_this$_configuration24 = _this$_configuration24.navigation) === null || _this$_configuration24 === void 0 ? void 0 : _this$_configuration24.greetingsText,
|
|
897
899
|
showSnow: (_this$_configuration25 = this._configuration) === null || _this$_configuration25 === void 0 || (_this$_configuration25 = _this$_configuration25.navigation) === null || _this$_configuration25 === void 0 ? void 0 : _this$_configuration25.showSnow,
|
|
898
|
-
pricePreviewActive: (_this$_configuration26 = this._configuration) === null || _this$_configuration26 === void 0 || (_this$_configuration26 = _this$_configuration26.components.available.find(function (c) {
|
|
900
|
+
pricePreviewActive: ((_this$root$dataStore$ = this.root.dataStore.organization) === null || _this$root$dataStore$ === void 0 || (_this$root$dataStore$ = _this$root$dataStore$.settings) === null || _this$root$dataStore$ === void 0 ? void 0 : _this$root$dataStore$.pricePreview) && this.root.dataStore.organization.settings.pricePreview !== 'off' || ((_this$_configuration26 = this._configuration) === null || _this$_configuration26 === void 0 || (_this$_configuration26 = _this$_configuration26.components.available) === null || _this$_configuration26 === void 0 || (_this$_configuration26 = _this$_configuration26.find(function (c) {
|
|
899
901
|
return c.type === 'DIVA_WEBPLANNER';
|
|
900
|
-
})) === null || _this$_configuration26 === void 0 || (_this$_configuration26 = _this$_configuration26.settings) === null || _this$_configuration26 === void 0 || (_this$_configuration26 = _this$_configuration26.ViewConfig) === null || _this$_configuration26 === void 0 ? void 0 : _this$_configuration26.pricePreview
|
|
902
|
+
})) === null || _this$_configuration26 === void 0 || (_this$_configuration26 = _this$_configuration26.settings) === null || _this$_configuration26 === void 0 || (_this$_configuration26 = _this$_configuration26.ViewConfig) === null || _this$_configuration26 === void 0 ? void 0 : _this$_configuration26.pricePreview)
|
|
901
903
|
};
|
|
902
904
|
}
|
|
903
905
|
}, {
|
|
@@ -931,7 +933,7 @@ var ConfigurationStore = /*#__PURE__*/function () {
|
|
|
931
933
|
key: "authentication",
|
|
932
934
|
get: function get() {
|
|
933
935
|
var _this$_configuration$, _this$_configuration35, _this$_configuration36, _this$_configuration37, _this$_configuration38, _this$_configuration39, _this$_configuration40, _this$_configuration41, _this$_configuration42, _this$_configuration43, _this$_configuration$2, _this$_configuration44;
|
|
934
|
-
return _objectSpread$
|
|
936
|
+
return _objectSpread$f(_objectSpread$f({}, (_this$_configuration$ = (_this$_configuration35 = this._configuration) === null || _this$_configuration35 === void 0 ? void 0 : _this$_configuration35.authentication) !== null && _this$_configuration$ !== void 0 ? _this$_configuration$ : {}), {}, {
|
|
935
937
|
loginMethods: {
|
|
936
938
|
google: (_this$_configuration36 = this._configuration) !== null && _this$_configuration36 !== void 0 && (_this$_configuration36 = _this$_configuration36.authentication) !== null && _this$_configuration36 !== void 0 && _this$_configuration36.loginMethods ? (_this$_configuration37 = this._configuration) === null || _this$_configuration37 === void 0 || (_this$_configuration37 = _this$_configuration37.authentication) === null || _this$_configuration37 === void 0 ? void 0 : _this$_configuration37.loginMethods.google : true,
|
|
937
939
|
microsoft: (_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.microsoft : true,
|
|
@@ -1000,14 +1002,14 @@ var ConfigurationStore = /*#__PURE__*/function () {
|
|
|
1000
1002
|
get: function get() {
|
|
1001
1003
|
var _this$_configuration53;
|
|
1002
1004
|
if ((_this$_configuration53 = this._configuration) !== null && _this$_configuration53 !== void 0 && _this$_configuration53.priceFormat) {
|
|
1003
|
-
var _this$_configuration54, _this$root$dataStore
|
|
1004
|
-
return _objectSpread$
|
|
1005
|
-
currency: (_this$root$dataStore$ = (_this$root$dataStore$
|
|
1005
|
+
var _this$_configuration54, _this$root$dataStore$2, _this$root$dataStore$3, _this$_configuration55;
|
|
1006
|
+
return _objectSpread$f(_objectSpread$f({}, (_this$_configuration54 = this._configuration) === null || _this$_configuration54 === void 0 ? void 0 : _this$_configuration54.priceFormat), {}, {
|
|
1007
|
+
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$_configuration55 = this._configuration) === null || _this$_configuration55 === void 0 ? void 0 : _this$_configuration55.priceFormat.currency
|
|
1006
1008
|
});
|
|
1007
1009
|
} else {
|
|
1008
|
-
var _this$root$dataStore$
|
|
1009
|
-
return _objectSpread$
|
|
1010
|
-
currency: (_this$root$dataStore$
|
|
1010
|
+
var _this$root$dataStore$4, _this$root$dataStore$5;
|
|
1011
|
+
return _objectSpread$f(_objectSpread$f({}, DivaUtils.defaultPriceFormat), {}, {
|
|
1012
|
+
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
|
|
1011
1013
|
});
|
|
1012
1014
|
}
|
|
1013
1015
|
}
|
|
@@ -1217,8 +1219,8 @@ function isIpadOS() {
|
|
|
1217
1219
|
return navigator.maxTouchPoints && navigator.maxTouchPoints > 2 && /MacIntel/.test(navigator.platform);
|
|
1218
1220
|
}
|
|
1219
1221
|
|
|
1220
|
-
function ownKeys$
|
|
1221
|
-
function _objectSpread$
|
|
1222
|
+
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; }
|
|
1223
|
+
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; }
|
|
1222
1224
|
var LOG$c = getLogger('Framework', 'DataStore');
|
|
1223
1225
|
var DataStore = /*#__PURE__*/function () {
|
|
1224
1226
|
function DataStore(root) {
|
|
@@ -1256,8 +1258,8 @@ var DataStore = /*#__PURE__*/function () {
|
|
|
1256
1258
|
key: "organization",
|
|
1257
1259
|
get: function get() {
|
|
1258
1260
|
var _settings$defaultCurr, _settings;
|
|
1259
|
-
return this._organization ? _objectSpread$
|
|
1260
|
-
settings: _objectSpread$
|
|
1261
|
+
return this._organization ? _objectSpread$e(_objectSpread$e({}, this._organization), {}, {
|
|
1262
|
+
settings: _objectSpread$e(_objectSpread$e({}, this._organization.settings), {}, {
|
|
1261
1263
|
defaultCurrency: (_settings$defaultCurr = (_settings = this._organization.settings) === null || _settings === void 0 ? void 0 : _settings.defaultCurrency) !== null && _settings$defaultCurr !== void 0 ? _settings$defaultCurr : '€'
|
|
1262
1264
|
})
|
|
1263
1265
|
}) : this._organization;
|
|
@@ -1298,7 +1300,7 @@ var DataStore = /*#__PURE__*/function () {
|
|
|
1298
1300
|
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) {
|
|
1299
1301
|
return _this._parentOrganizations.includes(org._id);
|
|
1300
1302
|
})) !== null && _this$_organization$p !== void 0 ? _this$_organization$p : []).map(function (org) {
|
|
1301
|
-
return _objectSpread$
|
|
1303
|
+
return _objectSpread$e(_objectSpread$e({}, org), {}, {
|
|
1302
1304
|
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
|
|
1303
1305
|
});
|
|
1304
1306
|
}).reverse()), [{
|
|
@@ -1722,6 +1724,7 @@ function styleInject(css, ref) {
|
|
|
1722
1724
|
}
|
|
1723
1725
|
}
|
|
1724
1726
|
|
|
1727
|
+
var titlecontainer = "titlecontainer-LeRMj";
|
|
1725
1728
|
var auth = "auth-y9j9-";
|
|
1726
1729
|
var loginBox = "login-box-Zu-QM";
|
|
1727
1730
|
var logoContainer = "logo-container-Gujpy";
|
|
@@ -1735,39 +1738,60 @@ var microsoft = "microsoft-e3GYR";
|
|
|
1735
1738
|
var separator = "separator-Hg6fH";
|
|
1736
1739
|
var input = "input--Dl8e";
|
|
1737
1740
|
var readonly = "readonly-uw66l";
|
|
1738
|
-
var resetInput = "reset-input-ERpB4";
|
|
1739
1741
|
var link = "link-s-Rcm";
|
|
1740
|
-
var css_248z$6 = ".auth-y9j9- {\n height: 100%;\n width: 100%;\n display: flex;\n background-color: rgba(255, 255, 255);\n z-index: 3;\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
|
|
1742
|
+
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}\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 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";
|
|
1741
1743
|
styleInject(css_248z$6);
|
|
1742
1744
|
|
|
1743
|
-
var _excluded$7 = ["className", "disabled", "children"];
|
|
1744
|
-
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; }
|
|
1745
|
-
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; }
|
|
1746
1745
|
function Button (_ref) {
|
|
1747
1746
|
var className = _ref.className,
|
|
1748
1747
|
disabled = _ref.disabled,
|
|
1749
1748
|
children = _ref.children,
|
|
1750
|
-
|
|
1751
|
-
return /*#__PURE__*/jsx(
|
|
1752
|
-
|
|
1753
|
-
|
|
1749
|
+
onClick = _ref.onClick;
|
|
1750
|
+
return /*#__PURE__*/jsx(Button$1, {
|
|
1751
|
+
id: "submit",
|
|
1752
|
+
variant: "contained",
|
|
1753
|
+
disabled: disabled,
|
|
1754
|
+
onClick: onClick,
|
|
1755
|
+
className: classnames(authButton, className, disabled ? buttonDisabled : undefined),
|
|
1754
1756
|
children: children
|
|
1755
|
-
})
|
|
1757
|
+
});
|
|
1756
1758
|
}
|
|
1757
1759
|
|
|
1758
|
-
var _excluded$6 = ["className", "readOnly"];
|
|
1760
|
+
var _excluded$6 = ["className", "readOnly", "resetInput"];
|
|
1759
1761
|
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; }
|
|
1760
1762
|
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; }
|
|
1761
1763
|
var Input = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1762
1764
|
var className = _ref.className,
|
|
1763
1765
|
readOnly = _ref.readOnly,
|
|
1766
|
+
resetInput = _ref.resetInput,
|
|
1764
1767
|
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
1765
|
-
return /*#__PURE__*/
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1768
|
+
return /*#__PURE__*/jsxs("div", {
|
|
1769
|
+
style: {
|
|
1770
|
+
position: 'relative'
|
|
1771
|
+
},
|
|
1772
|
+
children: [/*#__PURE__*/jsx("input", _objectSpread$d({
|
|
1773
|
+
ref: ref,
|
|
1774
|
+
className: classnames(input, readOnly ? readonly : undefined, className),
|
|
1775
|
+
readOnly: readOnly,
|
|
1776
|
+
"data-test-id": "barrier-input-text",
|
|
1777
|
+
style: {
|
|
1778
|
+
paddingLeft: resetInput ? '40px' : undefined
|
|
1779
|
+
} // Platzierung des Pfeils
|
|
1780
|
+
}, props)), resetInput && /*#__PURE__*/jsx(ArrowBack, {
|
|
1781
|
+
onClick: function onClick() {
|
|
1782
|
+
return resetInput();
|
|
1783
|
+
},
|
|
1784
|
+
style: {
|
|
1785
|
+
position: 'absolute',
|
|
1786
|
+
left: '8px',
|
|
1787
|
+
// Platzierung des Pfeils
|
|
1788
|
+
top: '50%',
|
|
1789
|
+
transform: 'translateY(-50%)',
|
|
1790
|
+
// Vertikale Zentrierung
|
|
1791
|
+
cursor: 'pointer'
|
|
1792
|
+
}
|
|
1793
|
+
})]
|
|
1794
|
+
});
|
|
1771
1795
|
});
|
|
1772
1796
|
|
|
1773
1797
|
function SimpleLogin (_ref) {
|
|
@@ -2082,6 +2106,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2082
2106
|
this.root = root;
|
|
2083
2107
|
_defineProperty(this, "configuration", []);
|
|
2084
2108
|
_defineProperty(this, "state", new Map());
|
|
2109
|
+
_defineProperty(this, "_modelViewerHasLoaded", false);
|
|
2085
2110
|
_defineProperty(this, "_fullscreenComponent", undefined);
|
|
2086
2111
|
_defineProperty(this, "_isAbsoluteComponent", false);
|
|
2087
2112
|
_defineProperty(this, "_modal", undefined);
|
|
@@ -2147,6 +2172,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2147
2172
|
});
|
|
2148
2173
|
this.root = root;
|
|
2149
2174
|
this.configuration = components;
|
|
2175
|
+
if (window.customElements.get('model-viewer')) this._modelViewerHasLoaded = true;
|
|
2150
2176
|
LOG$9.debug("Available Components: ".concat(components.map(function (c) {
|
|
2151
2177
|
return c.name;
|
|
2152
2178
|
})));
|
|
@@ -2193,6 +2219,31 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2193
2219
|
});
|
|
2194
2220
|
}
|
|
2195
2221
|
return _createClass(ContentStore, [{
|
|
2222
|
+
key: "loadModelViewer",
|
|
2223
|
+
value: function () {
|
|
2224
|
+
var _loadModelViewer = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
2225
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
2226
|
+
while (1) switch (_context.prev = _context.next) {
|
|
2227
|
+
case 0:
|
|
2228
|
+
if (!(!this._modelViewerHasLoaded && !window.customElements.get('model-viewer'))) {
|
|
2229
|
+
_context.next = 4;
|
|
2230
|
+
break;
|
|
2231
|
+
}
|
|
2232
|
+
this._modelViewerHasLoaded = true;
|
|
2233
|
+
_context.next = 4;
|
|
2234
|
+
return import('@google/model-viewer');
|
|
2235
|
+
case 4:
|
|
2236
|
+
case "end":
|
|
2237
|
+
return _context.stop();
|
|
2238
|
+
}
|
|
2239
|
+
}, _callee, this);
|
|
2240
|
+
}));
|
|
2241
|
+
function loadModelViewer() {
|
|
2242
|
+
return _loadModelViewer.apply(this, arguments);
|
|
2243
|
+
}
|
|
2244
|
+
return loadModelViewer;
|
|
2245
|
+
}()
|
|
2246
|
+
}, {
|
|
2196
2247
|
key: "resolveComponent",
|
|
2197
2248
|
value: function resolveComponent(action) {
|
|
2198
2249
|
var _config$route, _config;
|
|
@@ -2235,22 +2286,28 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2235
2286
|
value:
|
|
2236
2287
|
/*#__PURE__*/
|
|
2237
2288
|
_regeneratorRuntime.mark(function openComponent(action) {
|
|
2238
|
-
var _this$componentChange,
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2289
|
+
var _this$componentChange,
|
|
2290
|
+
_config2,
|
|
2291
|
+
_config3,
|
|
2292
|
+
_this2 = this,
|
|
2293
|
+
_config6,
|
|
2294
|
+
_config8,
|
|
2295
|
+
_config9;
|
|
2296
|
+
var _this$componentChange2, _this$componentChange3, _this$openInNewTab, _this$openInNewTab2, link, _window, _ref2, type, 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, _this$root$dataStore$3, _config$barrier, _parameters2;
|
|
2297
|
+
return _regeneratorRuntime.wrap(function openComponent$(_context2) {
|
|
2298
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
2242
2299
|
case 0:
|
|
2243
2300
|
if (!((_this$componentChange = this.componentChange) !== null && _this$componentChange !== void 0 && _this$componentChange.isBlocked)) {
|
|
2244
|
-
|
|
2301
|
+
_context2.next = 3;
|
|
2245
2302
|
break;
|
|
2246
2303
|
}
|
|
2247
2304
|
(_this$componentChange2 = this.componentChange) === null || _this$componentChange2 === void 0 || (_this$componentChange3 = _this$componentChange2.callback) === null || _this$componentChange3 === void 0 || _this$componentChange3.call(_this$componentChange2);
|
|
2248
|
-
return
|
|
2305
|
+
return _context2.abrupt("return");
|
|
2249
2306
|
case 3:
|
|
2250
2307
|
this.root.loadingAndErrorStore.toggleLoading('openComponent');
|
|
2251
2308
|
LOG$9.debug('openComponent', toJS(action));
|
|
2252
2309
|
if (!action.url) {
|
|
2253
|
-
|
|
2310
|
+
_context2.next = 10;
|
|
2254
2311
|
break;
|
|
2255
2312
|
}
|
|
2256
2313
|
LOG$9.businessEvent('onOpenModule', action.openInNewTab ? 'OpenUrlNewTab' : 'OpenUrl', "Open link ".concat(action.url), {
|
|
@@ -2263,16 +2320,16 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2263
2320
|
window.location.href = this.resoveUrl(action.url);
|
|
2264
2321
|
}
|
|
2265
2322
|
this.root.loadingAndErrorStore.toggleLoading('openComponent');
|
|
2266
|
-
return
|
|
2323
|
+
return _context2.abrupt("return");
|
|
2267
2324
|
case 10:
|
|
2268
2325
|
_ref2 = action, type = _ref2.type, parameters = _ref2.parameters, internal = _ref2.internal, route = _ref2.route, openInFullscreen = _ref2.openInFullscreen, keepOldState = _ref2.keepOldState;
|
|
2269
2326
|
config = undefined;
|
|
2270
2327
|
if (!openInFullscreen) {
|
|
2271
|
-
|
|
2328
|
+
_context2.next = 15;
|
|
2272
2329
|
break;
|
|
2273
2330
|
}
|
|
2274
2331
|
this.openComponentInFullscreen(action);
|
|
2275
|
-
return
|
|
2332
|
+
return _context2.abrupt("return");
|
|
2276
2333
|
case 15:
|
|
2277
2334
|
if (type) {
|
|
2278
2335
|
config = this.availableComponents.find(function (c) {
|
|
@@ -2283,28 +2340,69 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2283
2340
|
return c.route && (route === null || route === void 0 ? void 0 : route.startsWith(c.route));
|
|
2284
2341
|
});
|
|
2285
2342
|
}
|
|
2286
|
-
|
|
2343
|
+
if (!(((_config2 = config) === null || _config2 === void 0 ? void 0 : _config2.type) == 'CATEGORY_MANAGER' || ((_config3 = config) === null || _config3 === void 0 ? void 0 : _config3.type) == 'ASSORTMENT_MANAGER')) {
|
|
2344
|
+
_context2.next = 23;
|
|
2345
|
+
break;
|
|
2346
|
+
}
|
|
2347
|
+
parent = undefined;
|
|
2348
|
+
if (this.root.dataStore.organization.type == undefined && this.root.dataStore.organization.parentType == 'RETAILER') {
|
|
2349
|
+
parent = (_this$root$dataStore$ = this.root.dataStore.organization.parentOrganizations) === null || _this$root$dataStore$ === void 0 ? void 0 : _this$root$dataStore$.find(function (o) {
|
|
2350
|
+
return o.type == 'RETAILER';
|
|
2351
|
+
});
|
|
2352
|
+
} else if (this.root.dataStore.organization.type == undefined && this.root.dataStore.organization.parentType == 'ASSOCIATION') {
|
|
2353
|
+
parent = (_this$root$dataStore$2 = this.root.dataStore.organization.parentOrganizations) === null || _this$root$dataStore$2 === void 0 ? void 0 : _this$root$dataStore$2.find(function (o) {
|
|
2354
|
+
return o.type == 'ASSOCIATION';
|
|
2355
|
+
});
|
|
2356
|
+
}
|
|
2357
|
+
if (!parent) {
|
|
2358
|
+
_context2.next = 23;
|
|
2359
|
+
break;
|
|
2360
|
+
}
|
|
2361
|
+
this.openModal({
|
|
2362
|
+
title: this.root.t('action.opencomponent.diva6.warning.title'),
|
|
2363
|
+
text: this.root.t('action.opencomponent.diva6.warning.text', {
|
|
2364
|
+
type: ((_config4 = config) === null || _config4 === void 0 ? void 0 : _config4.type) == 'CATEGORY_MANAGER' ? 'Category Manager' : 'Sortiments Manager',
|
|
2365
|
+
parent: parent.displayName
|
|
2366
|
+
}),
|
|
2367
|
+
accept: true,
|
|
2368
|
+
reject: true,
|
|
2369
|
+
rejectByIcon: true,
|
|
2370
|
+
callback: function callback(accept) {
|
|
2371
|
+
if (accept) {
|
|
2372
|
+
var _config5;
|
|
2373
|
+
var url = "".concat(window.location.origin).concat((_config5 = config) === null || _config5 === void 0 ? void 0 : _config5.route, "?lang=").concat(_this2.root.language, "&organizationId=").concat(parent._id);
|
|
2374
|
+
_this2.openInNewTab({
|
|
2375
|
+
url: url,
|
|
2376
|
+
openInNewTab: true
|
|
2377
|
+
});
|
|
2378
|
+
}
|
|
2379
|
+
}
|
|
2380
|
+
});
|
|
2381
|
+
this.root.loadingAndErrorStore.toggleLoading('openComponent');
|
|
2382
|
+
return _context2.abrupt("return");
|
|
2383
|
+
case 23:
|
|
2384
|
+
newTab = action.openInNewTab || ((_config6 = config) === null || _config6 === void 0 ? void 0 : _config6.openInNewTab);
|
|
2287
2385
|
if (!newTab) {
|
|
2288
|
-
|
|
2386
|
+
_context2.next = 29;
|
|
2289
2387
|
break;
|
|
2290
2388
|
}
|
|
2291
2389
|
base = typeof action.openInNewTab == 'string' ? action.openInNewTab : window.origin;
|
|
2292
|
-
this.openInNewTab(action, "".concat(base).concat(((
|
|
2390
|
+
this.openInNewTab(action, "".concat(base).concat(((_config7 = config) === null || _config7 === void 0 ? void 0 : _config7.route) || ''));
|
|
2293
2391
|
this.root.loadingAndErrorStore.toggleLoading('openComponent');
|
|
2294
|
-
return
|
|
2295
|
-
case
|
|
2392
|
+
return _context2.abrupt("return");
|
|
2393
|
+
case 29:
|
|
2296
2394
|
if (!(!this.root.dataStore.user && !this.isPublic(action))) {
|
|
2297
|
-
|
|
2395
|
+
_context2.next = 35;
|
|
2298
2396
|
break;
|
|
2299
2397
|
}
|
|
2300
2398
|
LOG$9.debug("Component is restricted, open login form");
|
|
2301
2399
|
this._restrictedComponent = action;
|
|
2302
2400
|
this.root.authorizationStore.showLogin();
|
|
2303
2401
|
this.root.loadingAndErrorStore.toggleLoading('openComponent');
|
|
2304
|
-
return
|
|
2305
|
-
case
|
|
2402
|
+
return _context2.abrupt("return");
|
|
2403
|
+
case 35:
|
|
2306
2404
|
if (config) {
|
|
2307
|
-
|
|
2405
|
+
_context2.next = 40;
|
|
2308
2406
|
break;
|
|
2309
2407
|
}
|
|
2310
2408
|
this._restrictedComponent = action;
|
|
@@ -2315,8 +2413,8 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2315
2413
|
action: toJS(action)
|
|
2316
2414
|
}
|
|
2317
2415
|
}), 'CORE_0005');
|
|
2318
|
-
return
|
|
2319
|
-
case
|
|
2416
|
+
return _context2.abrupt("return");
|
|
2417
|
+
case 40:
|
|
2320
2418
|
settings = undefined;
|
|
2321
2419
|
if (config.settings) {
|
|
2322
2420
|
settings = config.settings;
|
|
@@ -2329,8 +2427,8 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2329
2427
|
openModuleLables = parameters;
|
|
2330
2428
|
parameters = otherPrams;
|
|
2331
2429
|
}
|
|
2332
|
-
module = this.mapTypeToModule((
|
|
2333
|
-
LOG$9.businessEvent('onOpenModule', module, "Open module ".concat((
|
|
2430
|
+
module = this.mapTypeToModule((_config8 = config) === null || _config8 === void 0 ? void 0 : _config8.type);
|
|
2431
|
+
LOG$9.businessEvent('onOpenModule', module, "Open module ".concat((_config9 = config) === null || _config9 === void 0 ? void 0 : _config9.type), openModuleLables);
|
|
2334
2432
|
prevType = this.visible;
|
|
2335
2433
|
prevState = this.state.get(this.visible || '');
|
|
2336
2434
|
currentState = this.state.get(config.type);
|
|
@@ -2342,7 +2440,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2342
2440
|
this.state.set(config.type, componentState);
|
|
2343
2441
|
this.visible = config.type;
|
|
2344
2442
|
if (config.isPublic == 'barrier') {
|
|
2345
|
-
if (!this.root.dataStore.user || !((_this$root$dataStore$ = this.root.dataStore.user) !== null && _this$root$dataStore$ !== void 0 && _this$root$dataStore
|
|
2443
|
+
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)) {
|
|
2346
2444
|
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) {
|
|
2347
2445
|
return config.barrier.excludeParams.includes(p);
|
|
2348
2446
|
})) this.loginBarrier(true, config.barrier);
|
|
@@ -2374,19 +2472,19 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2374
2472
|
}
|
|
2375
2473
|
this.setGlobalClass();
|
|
2376
2474
|
this.root.loadingAndErrorStore.toggleLoading('openComponent');
|
|
2377
|
-
case
|
|
2475
|
+
case 60:
|
|
2378
2476
|
case "end":
|
|
2379
|
-
return
|
|
2477
|
+
return _context2.stop();
|
|
2380
2478
|
}
|
|
2381
2479
|
}, openComponent, this);
|
|
2382
2480
|
})
|
|
2383
2481
|
}, {
|
|
2384
2482
|
key: "openComponentInFullscreen",
|
|
2385
2483
|
value: /*#__PURE__*/_regeneratorRuntime.mark(function openComponentInFullscreen(component) {
|
|
2386
|
-
var
|
|
2484
|
+
var _config10, _config11;
|
|
2387
2485
|
var type, parameters, internal, route, config, settings, module, componentState;
|
|
2388
|
-
return _regeneratorRuntime.wrap(function openComponentInFullscreen$(
|
|
2389
|
-
while (1) switch (
|
|
2486
|
+
return _regeneratorRuntime.wrap(function openComponentInFullscreen$(_context3) {
|
|
2487
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
2390
2488
|
case 0:
|
|
2391
2489
|
LOG$9.debug('openComponentInFullscreen', toJS(component));
|
|
2392
2490
|
this.root.loadingAndErrorStore.setError(undefined);
|
|
@@ -2403,7 +2501,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2403
2501
|
});
|
|
2404
2502
|
}
|
|
2405
2503
|
if (config) {
|
|
2406
|
-
|
|
2504
|
+
_context3.next = 10;
|
|
2407
2505
|
break;
|
|
2408
2506
|
}
|
|
2409
2507
|
this._restrictedComponent = component;
|
|
@@ -2414,27 +2512,27 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2414
2512
|
component: toJS(component)
|
|
2415
2513
|
}
|
|
2416
2514
|
}), 'CORE_0005');
|
|
2417
|
-
return
|
|
2515
|
+
return _context3.abrupt("return");
|
|
2418
2516
|
case 10:
|
|
2419
2517
|
settings = undefined;
|
|
2420
2518
|
if (!config.settings) {
|
|
2421
|
-
|
|
2519
|
+
_context3.next = 15;
|
|
2422
2520
|
break;
|
|
2423
2521
|
}
|
|
2424
2522
|
settings = config.settings;
|
|
2425
|
-
|
|
2523
|
+
_context3.next = 18;
|
|
2426
2524
|
break;
|
|
2427
2525
|
case 15:
|
|
2428
|
-
|
|
2526
|
+
_context3.next = 17;
|
|
2429
2527
|
return this.root.configurationStore.fetchConfiguration({
|
|
2430
2528
|
identifier: config.identifier,
|
|
2431
2529
|
type: config.type
|
|
2432
2530
|
});
|
|
2433
2531
|
case 17:
|
|
2434
|
-
settings =
|
|
2532
|
+
settings = _context3.sent;
|
|
2435
2533
|
case 18:
|
|
2436
|
-
module = this.mapTypeToModule((
|
|
2437
|
-
LOG$9.businessEvent('onOpenModule', module, "Open module ".concat((
|
|
2534
|
+
module = this.mapTypeToModule((_config10 = config) === null || _config10 === void 0 ? void 0 : _config10.type);
|
|
2535
|
+
LOG$9.businessEvent('onOpenModule', module, "Open module ".concat((_config11 = config) === null || _config11 === void 0 ? void 0 : _config11.type));
|
|
2438
2536
|
componentState = {
|
|
2439
2537
|
key: config.type,
|
|
2440
2538
|
parameters: parameters,
|
|
@@ -2448,7 +2546,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2448
2546
|
this.root.loadingAndErrorStore.toggleLoading('openComponent');
|
|
2449
2547
|
case 24:
|
|
2450
2548
|
case "end":
|
|
2451
|
-
return
|
|
2549
|
+
return _context3.stop();
|
|
2452
2550
|
}
|
|
2453
2551
|
}, openComponentInFullscreen, this);
|
|
2454
2552
|
})
|
|
@@ -2490,7 +2588,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2490
2588
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
2491
2589
|
var subComponent = _step.value;
|
|
2492
2590
|
var found = this.findSubComponent(type, subComponent);
|
|
2493
|
-
if (found) return found
|
|
2591
|
+
if (found) return found;
|
|
2494
2592
|
}
|
|
2495
2593
|
} catch (err) {
|
|
2496
2594
|
_iterator.e(err);
|
|
@@ -2505,7 +2603,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2505
2603
|
value: function loginBarrier(anon, settings) {
|
|
2506
2604
|
var _settings$title,
|
|
2507
2605
|
_settings$text,
|
|
2508
|
-
|
|
2606
|
+
_this3 = this;
|
|
2509
2607
|
this.openBarrier({
|
|
2510
2608
|
type: settings !== null && settings !== void 0 && settings.skipVerify ? 'SIMPLE' : 'GET_EMAIL',
|
|
2511
2609
|
rejectable: false,
|
|
@@ -2520,22 +2618,22 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2520
2618
|
return;
|
|
2521
2619
|
}
|
|
2522
2620
|
LOG$9.debug("Request email verification for ".concat(email));
|
|
2523
|
-
|
|
2621
|
+
_this3.root.apiHandler.sendVerificationEmail({
|
|
2524
2622
|
email: email,
|
|
2525
2623
|
emailVariant: (_settings$emailVarian = settings === null || settings === void 0 ? void 0 : settings.emailVariant) !== null && _settings$emailVarian !== void 0 ? _settings$emailVarian : 'DEMO'
|
|
2526
2624
|
});
|
|
2527
|
-
|
|
2528
|
-
title:
|
|
2529
|
-
text:
|
|
2625
|
+
_this3.openModal({
|
|
2626
|
+
title: _this3.root.t('loginbarrier.verify.title'),
|
|
2627
|
+
text: _this3.root.t('loginbarrier.verify.text'),
|
|
2530
2628
|
maxWidth: 500,
|
|
2531
2629
|
actions: [{
|
|
2532
|
-
text:
|
|
2630
|
+
text: _this3.root.t('loginbarrier.verify.button'),
|
|
2533
2631
|
variant: 'contained',
|
|
2534
2632
|
id: 'verify',
|
|
2535
2633
|
closeable: false
|
|
2536
2634
|
}],
|
|
2537
2635
|
callback: function callback() {
|
|
2538
|
-
|
|
2636
|
+
_this3.loginBarrier(false, settings);
|
|
2539
2637
|
}
|
|
2540
2638
|
});
|
|
2541
2639
|
}
|
|
@@ -2551,9 +2649,9 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2551
2649
|
* @param logo the custom logo
|
|
2552
2650
|
*/
|
|
2553
2651
|
function updateCustomLogo(components, logo) {
|
|
2554
|
-
var
|
|
2652
|
+
var _this4 = this;
|
|
2555
2653
|
components.forEach(function (c) {
|
|
2556
|
-
return logo ?
|
|
2654
|
+
return logo ? _this4.customLogoMap.set(c, logo) : _this4.customLogoMap["delete"](c);
|
|
2557
2655
|
});
|
|
2558
2656
|
}
|
|
2559
2657
|
|
|
@@ -2565,9 +2663,9 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2565
2663
|
}, {
|
|
2566
2664
|
key: "updateCustomHeaderElement",
|
|
2567
2665
|
value: function updateCustomHeaderElement(components, element) {
|
|
2568
|
-
var
|
|
2666
|
+
var _this5 = this;
|
|
2569
2667
|
components.forEach(function (c) {
|
|
2570
|
-
return element ?
|
|
2668
|
+
return element ? _this5.customHeaderComponentMap.set(c, element) : _this5.customHeaderComponentMap["delete"](c);
|
|
2571
2669
|
});
|
|
2572
2670
|
}
|
|
2573
2671
|
|
|
@@ -2646,7 +2744,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2646
2744
|
}, {
|
|
2647
2745
|
key: "breadcrumbs",
|
|
2648
2746
|
get: function get() {
|
|
2649
|
-
var
|
|
2747
|
+
var _this6 = this;
|
|
2650
2748
|
if (!this.visible) {
|
|
2651
2749
|
return undefined;
|
|
2652
2750
|
}
|
|
@@ -2658,7 +2756,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2658
2756
|
var group = _step2.value;
|
|
2659
2757
|
var path = group.path.find(function (p) {
|
|
2660
2758
|
return componentsEqual(p.component, {
|
|
2661
|
-
type:
|
|
2759
|
+
type: _this6.visible,
|
|
2662
2760
|
parameters: state.parameters,
|
|
2663
2761
|
internal: state.internal
|
|
2664
2762
|
});
|
|
@@ -2712,9 +2810,9 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2712
2810
|
}, {
|
|
2713
2811
|
key: "currentComponent",
|
|
2714
2812
|
get: function get() {
|
|
2715
|
-
var
|
|
2813
|
+
var _this7 = this;
|
|
2716
2814
|
return this.root.configurationStore.components.find(function (c) {
|
|
2717
|
-
return c.type ==
|
|
2815
|
+
return c.type == _this7.visible;
|
|
2718
2816
|
});
|
|
2719
2817
|
}
|
|
2720
2818
|
|
|
@@ -2751,11 +2849,11 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2751
2849
|
}, {
|
|
2752
2850
|
key: "allowHidePrices",
|
|
2753
2851
|
get: function get() {
|
|
2754
|
-
var _this$root$dataStore$
|
|
2852
|
+
var _this$root$dataStore$4;
|
|
2755
2853
|
if (!this.visible) {
|
|
2756
2854
|
return false;
|
|
2757
2855
|
}
|
|
2758
|
-
if (((_this$root$dataStore$
|
|
2856
|
+
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 ? void 0 : _this$root$dataStore$4.hidePrices) !== undefined) {
|
|
2759
2857
|
return this.root.dataStore.organization.settings.hidePrices.startsWith('DEFAULT');
|
|
2760
2858
|
}
|
|
2761
2859
|
return true;
|
|
@@ -2770,8 +2868,8 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2770
2868
|
key: "hidePrices",
|
|
2771
2869
|
get: function get() {
|
|
2772
2870
|
if (this._hidePrices === undefined) {
|
|
2773
|
-
var _this$root$dataStore$
|
|
2774
|
-
if ((_this$root$dataStore$
|
|
2871
|
+
var _this$root$dataStore$5;
|
|
2872
|
+
if ((_this$root$dataStore$5 = this.root.dataStore.organization) !== null && _this$root$dataStore$5 !== void 0 && (_this$root$dataStore$5 = _this$root$dataStore$5.settings) !== null && _this$root$dataStore$5 !== void 0 && _this$root$dataStore$5.hidePrices) {
|
|
2775
2873
|
switch (this.root.dataStore.organization.settings.hidePrices) {
|
|
2776
2874
|
case 'DEFAULT_HIDDEN':
|
|
2777
2875
|
case 'ONLY_HIDDEN':
|
|
@@ -2995,11 +3093,11 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2995
3093
|
}, {
|
|
2996
3094
|
key: "openBarrier",
|
|
2997
3095
|
value: function openBarrier(barrier) {
|
|
2998
|
-
var _this$root$dataStore$
|
|
2999
|
-
_this$root$dataStore$
|
|
3096
|
+
var _this$root$dataStore$6,
|
|
3097
|
+
_this$root$dataStore$7,
|
|
3000
3098
|
_barrier$actions,
|
|
3001
|
-
|
|
3002
|
-
if (barrier.anonOnly && (_this$root$dataStore$
|
|
3099
|
+
_this8 = this;
|
|
3100
|
+
if (barrier.anonOnly && (_this$root$dataStore$6 = this.root.dataStore.user) !== null && _this$root$dataStore$6 !== void 0 && _this$root$dataStore$6.mainEmail) {
|
|
3003
3101
|
LOG$9.debug('Skip barrier because user is logged in');
|
|
3004
3102
|
return;
|
|
3005
3103
|
}
|
|
@@ -3014,41 +3112,41 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3014
3112
|
},
|
|
3015
3113
|
content: /*#__PURE__*/React.createElement(Barrier, {
|
|
3016
3114
|
type: barrier.type,
|
|
3017
|
-
currentEmail: (_this$root$dataStore$
|
|
3115
|
+
currentEmail: (_this$root$dataStore$7 = this.root.dataStore.user) === null || _this$root$dataStore$7 === void 0 ? void 0 : _this$root$dataStore$7.mainEmail,
|
|
3018
3116
|
actions: (_barrier$actions = barrier.actions) === null || _barrier$actions === void 0 ? void 0 : _barrier$actions.map(function (a) {
|
|
3019
3117
|
return _objectSpread$b(_objectSpread$b({}, a), {}, {
|
|
3020
3118
|
onClick: function () {
|
|
3021
|
-
var _onClick = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
3022
|
-
var
|
|
3119
|
+
var _onClick = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(email) {
|
|
3120
|
+
var _this8$root$dataStore;
|
|
3023
3121
|
var doLogin;
|
|
3024
|
-
return _regeneratorRuntime.wrap(function
|
|
3025
|
-
while (1) switch (
|
|
3122
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context4) {
|
|
3123
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
3026
3124
|
case 0:
|
|
3027
|
-
|
|
3125
|
+
_this8.closeModal();
|
|
3028
3126
|
doLogin = (a.loginType ? a.loginType : barrier.type) === 'SIMPLE';
|
|
3029
|
-
if (!(doLogin && ((
|
|
3030
|
-
|
|
3127
|
+
if (!(doLogin && ((_this8$root$dataStore = _this8.root.dataStore.user) === null || _this8$root$dataStore === void 0 ? void 0 : _this8$root$dataStore.mainEmail) != email)) {
|
|
3128
|
+
_context4.next = 11;
|
|
3031
3129
|
break;
|
|
3032
3130
|
}
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
return flowResult(
|
|
3131
|
+
_context4.prev = 3;
|
|
3132
|
+
_context4.next = 6;
|
|
3133
|
+
return flowResult(_this8.root.authorizationStore.login(email, undefined, true, _this8.root.dataStore.organizationId));
|
|
3036
3134
|
case 6:
|
|
3037
|
-
|
|
3135
|
+
_context4.next = 11;
|
|
3038
3136
|
break;
|
|
3039
3137
|
case 8:
|
|
3040
|
-
|
|
3041
|
-
|
|
3138
|
+
_context4.prev = 8;
|
|
3139
|
+
_context4.t0 = _context4["catch"](3);
|
|
3042
3140
|
LOG$9.error(new DivaError('Error while logging in', {
|
|
3043
|
-
cause:
|
|
3141
|
+
cause: _context4.t0
|
|
3044
3142
|
}));
|
|
3045
3143
|
case 11:
|
|
3046
3144
|
a.onClick(email);
|
|
3047
3145
|
case 12:
|
|
3048
3146
|
case "end":
|
|
3049
|
-
return
|
|
3147
|
+
return _context4.stop();
|
|
3050
3148
|
}
|
|
3051
|
-
},
|
|
3149
|
+
}, _callee2, null, [[3, 8]]);
|
|
3052
3150
|
}));
|
|
3053
3151
|
function onClick(_x) {
|
|
3054
3152
|
return _onClick.apply(this, arguments);
|
|
@@ -3078,29 +3176,29 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3078
3176
|
}, {
|
|
3079
3177
|
key: "sendEmail",
|
|
3080
3178
|
value: function sendEmail(_ref4) {
|
|
3081
|
-
var
|
|
3179
|
+
var _this9 = this;
|
|
3082
3180
|
var dialogText = _ref4.dialogText,
|
|
3083
3181
|
showDialog = _ref4.showDialog,
|
|
3084
3182
|
callback = _ref4.callback,
|
|
3085
3183
|
content = _ref4.content;
|
|
3086
|
-
return /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
3184
|
+
return /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
3087
3185
|
var accepted, _content$language$toU, _content$language;
|
|
3088
|
-
return _regeneratorRuntime.wrap(function
|
|
3089
|
-
while (1) switch (
|
|
3186
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context5) {
|
|
3187
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
3090
3188
|
case 0:
|
|
3091
3189
|
accepted = showDialog === false;
|
|
3092
3190
|
if (!(showDialog !== false)) {
|
|
3093
|
-
|
|
3191
|
+
_context5.next = 4;
|
|
3094
3192
|
break;
|
|
3095
3193
|
}
|
|
3096
|
-
|
|
3194
|
+
_context5.next = 4;
|
|
3097
3195
|
return new Promise(function (resolve) {
|
|
3098
|
-
return
|
|
3196
|
+
return _this9.openModal({
|
|
3099
3197
|
reject: true,
|
|
3100
3198
|
accept: true,
|
|
3101
|
-
text: dialogText ?
|
|
3199
|
+
text: dialogText ? _this9.root.t(dialogText, {
|
|
3102
3200
|
to: content.to
|
|
3103
|
-
}) :
|
|
3201
|
+
}) : _this9.root.t('email.question.default', {
|
|
3104
3202
|
to: content.to
|
|
3105
3203
|
}),
|
|
3106
3204
|
callback: function callback(accept) {
|
|
@@ -3111,50 +3209,50 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3111
3209
|
});
|
|
3112
3210
|
case 4:
|
|
3113
3211
|
if (accepted) {
|
|
3114
|
-
|
|
3212
|
+
_context5.next = 6;
|
|
3115
3213
|
break;
|
|
3116
3214
|
}
|
|
3117
|
-
return
|
|
3215
|
+
return _context5.abrupt("return");
|
|
3118
3216
|
case 6:
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
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 :
|
|
3122
|
-
|
|
3123
|
-
return
|
|
3217
|
+
_this9.root.loadingAndErrorStore.toggleLoading('sendingEmail');
|
|
3218
|
+
_context5.prev = 7;
|
|
3219
|
+
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 : _this9.root.language.toUpperCase();
|
|
3220
|
+
_context5.next = 11;
|
|
3221
|
+
return _this9.root.apiHandler.sendEmail({
|
|
3124
3222
|
content: content,
|
|
3125
|
-
organizationIds:
|
|
3223
|
+
organizationIds: _this9.root.dataStore.fullParentList
|
|
3126
3224
|
});
|
|
3127
3225
|
case 11:
|
|
3128
3226
|
if (callback) {
|
|
3129
3227
|
callback(true);
|
|
3130
3228
|
} else {
|
|
3131
|
-
|
|
3132
|
-
text:
|
|
3229
|
+
_this9.openModal({
|
|
3230
|
+
text: _this9.root.t('email.send.success'),
|
|
3133
3231
|
accept: true
|
|
3134
3232
|
});
|
|
3135
3233
|
}
|
|
3136
|
-
|
|
3234
|
+
_context5.next = 17;
|
|
3137
3235
|
break;
|
|
3138
3236
|
case 14:
|
|
3139
|
-
|
|
3140
|
-
|
|
3237
|
+
_context5.prev = 14;
|
|
3238
|
+
_context5.t0 = _context5["catch"](7);
|
|
3141
3239
|
if (callback) {
|
|
3142
3240
|
callback(false);
|
|
3143
3241
|
} else {
|
|
3144
|
-
|
|
3145
|
-
text:
|
|
3242
|
+
_this9.openModal({
|
|
3243
|
+
text: _this9.root.t('email.send.error'),
|
|
3146
3244
|
accept: true
|
|
3147
3245
|
});
|
|
3148
3246
|
}
|
|
3149
3247
|
case 17:
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
return
|
|
3248
|
+
_context5.prev = 17;
|
|
3249
|
+
_this9.root.loadingAndErrorStore.toggleLoading('sendingEmail');
|
|
3250
|
+
return _context5.finish(17);
|
|
3153
3251
|
case 20:
|
|
3154
3252
|
case "end":
|
|
3155
|
-
return
|
|
3253
|
+
return _context5.stop();
|
|
3156
3254
|
}
|
|
3157
|
-
},
|
|
3255
|
+
}, _callee3, null, [[7, 14, 17, 20]]);
|
|
3158
3256
|
})();
|
|
3159
3257
|
}
|
|
3160
3258
|
|
|
@@ -3190,29 +3288,29 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3190
3288
|
}, {
|
|
3191
3289
|
key: "setContainer",
|
|
3192
3290
|
value: (function () {
|
|
3193
|
-
var _setContainer = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
3194
|
-
return _regeneratorRuntime.wrap(function
|
|
3195
|
-
while (1) switch (
|
|
3291
|
+
var _setContainer = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(ref) {
|
|
3292
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context6) {
|
|
3293
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
3196
3294
|
case 0:
|
|
3197
3295
|
if (!(ref === this.ref)) {
|
|
3198
|
-
|
|
3296
|
+
_context6.next = 2;
|
|
3199
3297
|
break;
|
|
3200
3298
|
}
|
|
3201
|
-
return
|
|
3299
|
+
return _context6.abrupt("return");
|
|
3202
3300
|
case 2:
|
|
3203
3301
|
this.ref = ref;
|
|
3204
3302
|
if (this.resizeObserver) {
|
|
3205
3303
|
unregisterResizeObserver(this.resizeObserver);
|
|
3206
3304
|
}
|
|
3207
|
-
|
|
3305
|
+
_context6.next = 6;
|
|
3208
3306
|
return registerResizeObserver(ref, this.onResize.bind(this));
|
|
3209
3307
|
case 6:
|
|
3210
|
-
this.resizeObserver =
|
|
3308
|
+
this.resizeObserver = _context6.sent;
|
|
3211
3309
|
case 7:
|
|
3212
3310
|
case "end":
|
|
3213
|
-
return
|
|
3311
|
+
return _context6.stop();
|
|
3214
3312
|
}
|
|
3215
|
-
},
|
|
3313
|
+
}, _callee4, this);
|
|
3216
3314
|
}));
|
|
3217
3315
|
function setContainer(_x2) {
|
|
3218
3316
|
return _setContainer.apply(this, arguments);
|
|
@@ -3244,10 +3342,10 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3244
3342
|
key: "availableComponents",
|
|
3245
3343
|
get: function get() {
|
|
3246
3344
|
var _this$root,
|
|
3247
|
-
|
|
3345
|
+
_this10 = this;
|
|
3248
3346
|
return (_this$root = this.root) === null || _this$root === void 0 ? void 0 : _this$root.configurationStore.components.filter(function (component) {
|
|
3249
3347
|
//the component must be passed to diva core
|
|
3250
|
-
if (!
|
|
3348
|
+
if (!_this10.configuration.find(function (config) {
|
|
3251
3349
|
return config.name == component.type;
|
|
3252
3350
|
})) {
|
|
3253
3351
|
return false;
|
|
@@ -3258,11 +3356,11 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3258
3356
|
return true;
|
|
3259
3357
|
}
|
|
3260
3358
|
//if the user is not logged in the component must be public
|
|
3261
|
-
if (!
|
|
3359
|
+
if (!_this10.root.dataStore.user) {
|
|
3262
3360
|
return false;
|
|
3263
3361
|
}
|
|
3264
3362
|
//if there is a permission specified, the user must have it
|
|
3265
|
-
return component.permission ?
|
|
3363
|
+
return component.permission ? _this10.root.dataStore.userHasPermission(component.permission) : true;
|
|
3266
3364
|
});
|
|
3267
3365
|
}
|
|
3268
3366
|
|
|
@@ -3272,14 +3370,14 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3272
3370
|
}, {
|
|
3273
3371
|
key: "components",
|
|
3274
3372
|
get: function get() {
|
|
3275
|
-
var
|
|
3373
|
+
var _this11 = this;
|
|
3276
3374
|
var componentDefinitionToRender = this.configuration.filter(function (config) {
|
|
3277
3375
|
//there must be a state present in order for the component to be rendered
|
|
3278
|
-
if (!
|
|
3376
|
+
if (!_this11.state.has(config.name)) {
|
|
3279
3377
|
return false;
|
|
3280
3378
|
}
|
|
3281
3379
|
//the component must be contained in the available components list in order to be rendered
|
|
3282
|
-
return
|
|
3380
|
+
return _this11.availableComponents.find(function (component) {
|
|
3283
3381
|
return component.type == config.name;
|
|
3284
3382
|
});
|
|
3285
3383
|
});
|
|
@@ -3287,7 +3385,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3287
3385
|
//when a new component is added we have to make sure that for the currently open components the existing instance is reused
|
|
3288
3386
|
//withTransaction creates a new instance if APM is active, so we would loose the state of currently open components
|
|
3289
3387
|
componentDefinitionToRender.forEach(function (cmp) {
|
|
3290
|
-
var toRender =
|
|
3388
|
+
var toRender = _this11._currentlyRendered.find(function (c) {
|
|
3291
3389
|
return c.name == cmp.name;
|
|
3292
3390
|
});
|
|
3293
3391
|
if (!toRender) {
|
|
@@ -3308,10 +3406,10 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3308
3406
|
}, {
|
|
3309
3407
|
key: "fullscreenComponent",
|
|
3310
3408
|
get: function get() {
|
|
3311
|
-
var
|
|
3409
|
+
var _this12 = this;
|
|
3312
3410
|
var component = this.availableComponents.find(function (component) {
|
|
3313
|
-
var
|
|
3314
|
-
return component.type == ((
|
|
3411
|
+
var _this12$_fullscreenCo;
|
|
3412
|
+
return component.type == ((_this12$_fullscreenCo = _this12._fullscreenComponent) === null || _this12$_fullscreenCo === void 0 ? void 0 : _this12$_fullscreenCo.key);
|
|
3315
3413
|
});
|
|
3316
3414
|
var cmp = this.configuration.find(function (config) {
|
|
3317
3415
|
return (component === null || component === void 0 ? void 0 : component.type) == config.name;
|
|
@@ -3358,24 +3456,24 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3358
3456
|
key: "availableButtons",
|
|
3359
3457
|
get: function get() {
|
|
3360
3458
|
var _this$root$configurat,
|
|
3361
|
-
|
|
3459
|
+
_this13 = this;
|
|
3362
3460
|
return (_this$root$configurat = this.root.configurationStore.navigation) === null || _this$root$configurat === void 0 ? void 0 : _this$root$configurat.buttons.filter(function (button) {
|
|
3363
3461
|
//if component is public it can be displayed
|
|
3364
3462
|
if (button.isPublic) {
|
|
3365
3463
|
return true;
|
|
3366
3464
|
}
|
|
3367
3465
|
//if the user is not logged in the component must be public
|
|
3368
|
-
if (!
|
|
3466
|
+
if (!_this13.root.dataStore.user) {
|
|
3369
3467
|
return false;
|
|
3370
3468
|
}
|
|
3371
3469
|
|
|
3372
3470
|
//if the button is opening a component, the component must be availalbe
|
|
3373
|
-
if (button.action.type && !
|
|
3471
|
+
if (button.action.type && !_this13.availableComponentList.includes(button.action.type)) {
|
|
3374
3472
|
return false;
|
|
3375
3473
|
}
|
|
3376
3474
|
|
|
3377
3475
|
//if there is a permission specified, the user must have it
|
|
3378
|
-
return button.permission ?
|
|
3476
|
+
return button.permission ? _this13.root.dataStore.userHasPermission(button.permission) : true;
|
|
3379
3477
|
});
|
|
3380
3478
|
}
|
|
3381
3479
|
|
|
@@ -3460,7 +3558,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3460
3558
|
}, {
|
|
3461
3559
|
key: "updateStateAfterLogout",
|
|
3462
3560
|
value: function updateStateAfterLogout() {
|
|
3463
|
-
var
|
|
3561
|
+
var _this14 = this;
|
|
3464
3562
|
var _iterator3 = _createForOfIteratorHelper(this.state.entries()),
|
|
3465
3563
|
_step3;
|
|
3466
3564
|
try {
|
|
@@ -3468,19 +3566,19 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3468
3566
|
var _step3$value = _slicedToArray(_step3.value, 2),
|
|
3469
3567
|
type = _step3$value[0],
|
|
3470
3568
|
component = _step3$value[1];
|
|
3471
|
-
var config =
|
|
3569
|
+
var config = _this14.root.configurationStore.components.find(function (c) {
|
|
3472
3570
|
return c.type == type;
|
|
3473
3571
|
});
|
|
3474
3572
|
if (!(config !== null && config !== void 0 && config.isPublic)) {
|
|
3475
|
-
|
|
3476
|
-
if (
|
|
3477
|
-
|
|
3478
|
-
|
|
3573
|
+
_this14.state["delete"](type);
|
|
3574
|
+
if (_this14.visible == type) {
|
|
3575
|
+
_this14.visible = undefined;
|
|
3576
|
+
_this14._restrictedComponent = {
|
|
3479
3577
|
type: type,
|
|
3480
3578
|
parameters: component.parameters,
|
|
3481
3579
|
internal: component.internal
|
|
3482
3580
|
};
|
|
3483
|
-
|
|
3581
|
+
_this14.root.authorizationStore.showLogin();
|
|
3484
3582
|
}
|
|
3485
3583
|
}
|
|
3486
3584
|
};
|
|
@@ -3513,7 +3611,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3513
3611
|
if (action.url) {
|
|
3514
3612
|
link = this.resoveUrl(action.url);
|
|
3515
3613
|
} else {
|
|
3516
|
-
var _this$root$dataStore$
|
|
3614
|
+
var _this$root$dataStore$8;
|
|
3517
3615
|
var _ref5 = action,
|
|
3518
3616
|
parameters = _ref5.parameters;
|
|
3519
3617
|
var url = new URL(baseUrl);
|
|
@@ -3524,7 +3622,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3524
3622
|
if (this.root.language) {
|
|
3525
3623
|
params.append('lang', this.root.language);
|
|
3526
3624
|
}
|
|
3527
|
-
if ((_this$root$dataStore$
|
|
3625
|
+
if ((_this$root$dataStore$8 = this.root.dataStore.organization) !== null && _this$root$dataStore$8 !== void 0 && _this$root$dataStore$8._id) {
|
|
3528
3626
|
params.append('organizationId', this.root.dataStore.organization._id);
|
|
3529
3627
|
}
|
|
3530
3628
|
link = url.href;
|
|
@@ -5190,21 +5288,27 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5190
5288
|
}
|
|
5191
5289
|
return _context7.abrupt("return", undefined);
|
|
5192
5290
|
case 9:
|
|
5291
|
+
if (!(response.status == 403)) {
|
|
5292
|
+
_context7.next = 11;
|
|
5293
|
+
break;
|
|
5294
|
+
}
|
|
5295
|
+
return _context7.abrupt("return", 'FORBIDDEN');
|
|
5296
|
+
case 11:
|
|
5193
5297
|
throw new DivaError("Error from server while loading organization. HTTP status: ".concat(response.status), {
|
|
5194
5298
|
code: 'CORE_0001'
|
|
5195
5299
|
});
|
|
5196
|
-
case
|
|
5197
|
-
_context7.prev =
|
|
5300
|
+
case 14:
|
|
5301
|
+
_context7.prev = 14;
|
|
5198
5302
|
_context7.t0 = _context7["catch"](1);
|
|
5199
5303
|
throw new DivaError('Error while loading organization', {
|
|
5200
5304
|
code: 'CORE_0001',
|
|
5201
5305
|
cause: _context7.t0
|
|
5202
5306
|
});
|
|
5203
|
-
case
|
|
5307
|
+
case 17:
|
|
5204
5308
|
case "end":
|
|
5205
5309
|
return _context7.stop();
|
|
5206
5310
|
}
|
|
5207
|
-
}, _callee7, this, [[1,
|
|
5311
|
+
}, _callee7, this, [[1, 14]]);
|
|
5208
5312
|
}));
|
|
5209
5313
|
function fetchOrganization(_x8) {
|
|
5210
5314
|
return _fetchOrganization.apply(this, arguments);
|
|
@@ -5602,14 +5706,14 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5602
5706
|
return getOrganizationBySearch;
|
|
5603
5707
|
}()
|
|
5604
5708
|
}, {
|
|
5605
|
-
key: "
|
|
5709
|
+
key: "getOrganizationParentByType",
|
|
5606
5710
|
value: function () {
|
|
5607
|
-
var
|
|
5608
|
-
var url, response;
|
|
5711
|
+
var _getOrganizationParentByType = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(organizationId, type) {
|
|
5712
|
+
var url, response, _data$data, data;
|
|
5609
5713
|
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
5610
5714
|
while (1) switch (_context14.prev = _context14.next) {
|
|
5611
5715
|
case 0:
|
|
5612
|
-
url = new URL("".concat(this.authService, "/v2/organizations/").concat(organizationId));
|
|
5716
|
+
url = new URL("".concat(this.authService, "/v2/organizations/").concat(organizationId, "/parents/").concat(type.toLocaleLowerCase()));
|
|
5613
5717
|
_context14.prev = 1;
|
|
5614
5718
|
_context14.next = 4;
|
|
5615
5719
|
return this.fetch({
|
|
@@ -5619,88 +5723,38 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5619
5723
|
case 4:
|
|
5620
5724
|
response = _context14.sent;
|
|
5621
5725
|
if (!response.ok) {
|
|
5622
|
-
_context14.next =
|
|
5623
|
-
break;
|
|
5624
|
-
}
|
|
5625
|
-
return _context14.abrupt("return", response.json());
|
|
5626
|
-
case 7:
|
|
5627
|
-
throw new DivaError("Error from server while searching organizations. HTTP status: ".concat(response.status), {
|
|
5628
|
-
code: 'CORE_0001'
|
|
5629
|
-
});
|
|
5630
|
-
case 10:
|
|
5631
|
-
_context14.prev = 10;
|
|
5632
|
-
_context14.t0 = _context14["catch"](1);
|
|
5633
|
-
if (!(_context14.t0 instanceof DivaError)) {
|
|
5634
|
-
_context14.next = 14;
|
|
5635
|
-
break;
|
|
5636
|
-
}
|
|
5637
|
-
throw _context14.t0;
|
|
5638
|
-
case 14:
|
|
5639
|
-
throw new DivaError('Error while getting organization', {
|
|
5640
|
-
code: 'CORE_0001',
|
|
5641
|
-
cause: _context14.t0
|
|
5642
|
-
});
|
|
5643
|
-
case 15:
|
|
5644
|
-
case "end":
|
|
5645
|
-
return _context14.stop();
|
|
5646
|
-
}
|
|
5647
|
-
}, _callee14, this, [[1, 10]]);
|
|
5648
|
-
}));
|
|
5649
|
-
function getOrganizationDataById(_x24) {
|
|
5650
|
-
return _getOrganizationDataById.apply(this, arguments);
|
|
5651
|
-
}
|
|
5652
|
-
return getOrganizationDataById;
|
|
5653
|
-
}()
|
|
5654
|
-
}, {
|
|
5655
|
-
key: "getOrganizationParentByType",
|
|
5656
|
-
value: function () {
|
|
5657
|
-
var _getOrganizationParentByType = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(organizationId, type) {
|
|
5658
|
-
var url, response, _data$data, data;
|
|
5659
|
-
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
5660
|
-
while (1) switch (_context15.prev = _context15.next) {
|
|
5661
|
-
case 0:
|
|
5662
|
-
url = new URL("".concat(this.authService, "/v2/organizations/").concat(organizationId, "/parents/").concat(type.toLocaleLowerCase()));
|
|
5663
|
-
_context15.prev = 1;
|
|
5664
|
-
_context15.next = 4;
|
|
5665
|
-
return this.fetch({
|
|
5666
|
-
url: url.toString(),
|
|
5667
|
-
jwt: this.jwt
|
|
5668
|
-
});
|
|
5669
|
-
case 4:
|
|
5670
|
-
response = _context15.sent;
|
|
5671
|
-
if (!response.ok) {
|
|
5672
|
-
_context15.next = 10;
|
|
5726
|
+
_context14.next = 10;
|
|
5673
5727
|
break;
|
|
5674
5728
|
}
|
|
5675
|
-
|
|
5729
|
+
_context14.next = 8;
|
|
5676
5730
|
return response.json();
|
|
5677
5731
|
case 8:
|
|
5678
|
-
data =
|
|
5679
|
-
return
|
|
5732
|
+
data = _context14.sent;
|
|
5733
|
+
return _context14.abrupt("return", (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data[0]);
|
|
5680
5734
|
case 10:
|
|
5681
5735
|
throw new DivaError("Error from server while searching organizations. HTTP status: ".concat(response.status), {
|
|
5682
5736
|
code: 'CORE_0001'
|
|
5683
5737
|
});
|
|
5684
5738
|
case 13:
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
if (!(
|
|
5688
|
-
|
|
5739
|
+
_context14.prev = 13;
|
|
5740
|
+
_context14.t0 = _context14["catch"](1);
|
|
5741
|
+
if (!(_context14.t0 instanceof DivaError)) {
|
|
5742
|
+
_context14.next = 17;
|
|
5689
5743
|
break;
|
|
5690
5744
|
}
|
|
5691
|
-
throw
|
|
5745
|
+
throw _context14.t0;
|
|
5692
5746
|
case 17:
|
|
5693
5747
|
throw new DivaError('Error while getting organization', {
|
|
5694
5748
|
code: 'CORE_0001',
|
|
5695
|
-
cause:
|
|
5749
|
+
cause: _context14.t0
|
|
5696
5750
|
});
|
|
5697
5751
|
case 18:
|
|
5698
5752
|
case "end":
|
|
5699
|
-
return
|
|
5753
|
+
return _context14.stop();
|
|
5700
5754
|
}
|
|
5701
|
-
},
|
|
5755
|
+
}, _callee14, this, [[1, 13]]);
|
|
5702
5756
|
}));
|
|
5703
|
-
function getOrganizationParentByType(
|
|
5757
|
+
function getOrganizationParentByType(_x24, _x25) {
|
|
5704
5758
|
return _getOrganizationParentByType.apply(this, arguments);
|
|
5705
5759
|
}
|
|
5706
5760
|
return getOrganizationParentByType;
|
|
@@ -5708,10 +5762,10 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5708
5762
|
}, {
|
|
5709
5763
|
key: "getRetailerLocationsForArea",
|
|
5710
5764
|
value: function () {
|
|
5711
|
-
var _getRetailerLocationsForArea = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
5765
|
+
var _getRetailerLocationsForArea = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(organizationId, location, radius) {
|
|
5712
5766
|
var url, response;
|
|
5713
|
-
return _regeneratorRuntime.wrap(function
|
|
5714
|
-
while (1) switch (
|
|
5767
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
5768
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
5715
5769
|
case 0:
|
|
5716
5770
|
url = new URL("".concat(this.authService, "/organizations/").concat(organizationId, "/retailer-locations"));
|
|
5717
5771
|
if (location) {
|
|
@@ -5719,43 +5773,43 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5719
5773
|
url.searchParams.append('lng', String(location.lng()));
|
|
5720
5774
|
}
|
|
5721
5775
|
url.searchParams.append('radius', radius);
|
|
5722
|
-
|
|
5723
|
-
|
|
5776
|
+
_context15.prev = 3;
|
|
5777
|
+
_context15.next = 6;
|
|
5724
5778
|
return this.fetch({
|
|
5725
5779
|
url: url.toString(),
|
|
5726
5780
|
jwt: this.jwt
|
|
5727
5781
|
});
|
|
5728
5782
|
case 6:
|
|
5729
|
-
response =
|
|
5783
|
+
response = _context15.sent;
|
|
5730
5784
|
if (!response.ok) {
|
|
5731
|
-
|
|
5785
|
+
_context15.next = 9;
|
|
5732
5786
|
break;
|
|
5733
5787
|
}
|
|
5734
|
-
return
|
|
5788
|
+
return _context15.abrupt("return", response.json());
|
|
5735
5789
|
case 9:
|
|
5736
5790
|
throw new DivaError("Error from server while searching retailer locations. HTTP status: ".concat(response.status), {
|
|
5737
5791
|
code: 'CORE_0001'
|
|
5738
5792
|
});
|
|
5739
5793
|
case 12:
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
if (!(
|
|
5743
|
-
|
|
5794
|
+
_context15.prev = 12;
|
|
5795
|
+
_context15.t0 = _context15["catch"](3);
|
|
5796
|
+
if (!(_context15.t0 instanceof DivaError)) {
|
|
5797
|
+
_context15.next = 16;
|
|
5744
5798
|
break;
|
|
5745
5799
|
}
|
|
5746
|
-
throw
|
|
5800
|
+
throw _context15.t0;
|
|
5747
5801
|
case 16:
|
|
5748
5802
|
throw new DivaError('Error while getting retailer locations', {
|
|
5749
5803
|
code: 'CORE_0001',
|
|
5750
|
-
cause:
|
|
5804
|
+
cause: _context15.t0
|
|
5751
5805
|
});
|
|
5752
5806
|
case 17:
|
|
5753
5807
|
case "end":
|
|
5754
|
-
return
|
|
5808
|
+
return _context15.stop();
|
|
5755
5809
|
}
|
|
5756
|
-
},
|
|
5810
|
+
}, _callee15, this, [[3, 12]]);
|
|
5757
5811
|
}));
|
|
5758
|
-
function getRetailerLocationsForArea(_x27, _x28
|
|
5812
|
+
function getRetailerLocationsForArea(_x26, _x27, _x28) {
|
|
5759
5813
|
return _getRetailerLocationsForArea.apply(this, arguments);
|
|
5760
5814
|
}
|
|
5761
5815
|
return getRetailerLocationsForArea;
|
|
@@ -5771,10 +5825,10 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5771
5825
|
};
|
|
5772
5826
|
return fetch;
|
|
5773
5827
|
}(/*#__PURE__*/function () {
|
|
5774
|
-
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
5828
|
+
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(_ref6) {
|
|
5775
5829
|
var url, _ref6$method, method, jwt, body, headers;
|
|
5776
|
-
return _regeneratorRuntime.wrap(function
|
|
5777
|
-
while (1) switch (
|
|
5830
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
5831
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
5778
5832
|
case 0:
|
|
5779
5833
|
url = _ref6.url, _ref6$method = _ref6.method, method = _ref6$method === void 0 ? 'GET' : _ref6$method, jwt = _ref6.jwt, body = _ref6.body;
|
|
5780
5834
|
headers = {
|
|
@@ -5784,21 +5838,21 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5784
5838
|
if (jwt) {
|
|
5785
5839
|
headers.Authorization = "Bearer ".concat(jwt);
|
|
5786
5840
|
}
|
|
5787
|
-
|
|
5841
|
+
_context16.next = 5;
|
|
5788
5842
|
return fetch(url, {
|
|
5789
5843
|
method: method,
|
|
5790
5844
|
headers: headers,
|
|
5791
5845
|
body: body ? JSON.stringify(body) : undefined
|
|
5792
5846
|
});
|
|
5793
5847
|
case 5:
|
|
5794
|
-
return
|
|
5848
|
+
return _context16.abrupt("return", _context16.sent);
|
|
5795
5849
|
case 6:
|
|
5796
5850
|
case "end":
|
|
5797
|
-
return
|
|
5851
|
+
return _context16.stop();
|
|
5798
5852
|
}
|
|
5799
|
-
},
|
|
5853
|
+
}, _callee16);
|
|
5800
5854
|
}));
|
|
5801
|
-
return function (
|
|
5855
|
+
return function (_x29) {
|
|
5802
5856
|
return _ref7.apply(this, arguments);
|
|
5803
5857
|
};
|
|
5804
5858
|
}())
|
|
@@ -5967,7 +6021,7 @@ var OrganizationHandler = /*#__PURE__*/function () {
|
|
|
5967
6021
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
5968
6022
|
while (1) switch (_context5.prev = _context5.next) {
|
|
5969
6023
|
case 0:
|
|
5970
|
-
return _context5.abrupt("return", this.apiHandler.
|
|
6024
|
+
return _context5.abrupt("return", this.apiHandler.fetchOrganization(organizationId));
|
|
5971
6025
|
case 1:
|
|
5972
6026
|
case "end":
|
|
5973
6027
|
return _context5.stop();
|
|
@@ -6138,17 +6192,17 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6138
6192
|
return getMediaById;
|
|
6139
6193
|
}()
|
|
6140
6194
|
}, {
|
|
6141
|
-
key: "
|
|
6195
|
+
key: "getMediaItemByRefId",
|
|
6142
6196
|
value: function () {
|
|
6143
|
-
var
|
|
6197
|
+
var _getMediaItemByRefId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(refid) {
|
|
6144
6198
|
var fullUrl, res, resData;
|
|
6145
6199
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
6146
6200
|
while (1) switch (_context3.prev = _context3.next) {
|
|
6147
6201
|
case 0:
|
|
6148
|
-
fullUrl = this.mediaService + '/
|
|
6202
|
+
fullUrl = this.mediaService + '/v1/mediaitemref/' + refid + '/mediaitem';
|
|
6149
6203
|
_context3.prev = 1;
|
|
6150
6204
|
_context3.next = 4;
|
|
6151
|
-
return fetch(
|
|
6205
|
+
return fetch(fullUrl, {
|
|
6152
6206
|
headers: {
|
|
6153
6207
|
Authorization: 'Bearer ' + this.jwt,
|
|
6154
6208
|
'Content-Type': 'application/json'
|
|
@@ -6160,27 +6214,72 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6160
6214
|
return res.json();
|
|
6161
6215
|
case 7:
|
|
6162
6216
|
resData = _context3.sent;
|
|
6163
|
-
|
|
6164
|
-
|
|
6217
|
+
if (!res.ok) {
|
|
6218
|
+
_context3.next = 10;
|
|
6219
|
+
break;
|
|
6220
|
+
}
|
|
6221
|
+
return _context3.abrupt("return", resData);
|
|
6165
6222
|
case 10:
|
|
6166
|
-
|
|
6223
|
+
throw new Error(resData.error || 'Could not fetch mediaItem');
|
|
6224
|
+
case 13:
|
|
6225
|
+
_context3.prev = 13;
|
|
6167
6226
|
_context3.t0 = _context3["catch"](1);
|
|
6227
|
+
throw new Error("Could not fetch mediaItem: ".concat(_context3.t0.message));
|
|
6228
|
+
case 16:
|
|
6229
|
+
case "end":
|
|
6230
|
+
return _context3.stop();
|
|
6231
|
+
}
|
|
6232
|
+
}, _callee3, this, [[1, 13]]);
|
|
6233
|
+
}));
|
|
6234
|
+
function getMediaItemByRefId(_x3) {
|
|
6235
|
+
return _getMediaItemByRefId.apply(this, arguments);
|
|
6236
|
+
}
|
|
6237
|
+
return getMediaItemByRefId;
|
|
6238
|
+
}()
|
|
6239
|
+
}, {
|
|
6240
|
+
key: "getHQRenderScriptById",
|
|
6241
|
+
value: function () {
|
|
6242
|
+
var _getHQRenderScriptById = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(id) {
|
|
6243
|
+
var fullUrl, res, resData;
|
|
6244
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
6245
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
6246
|
+
case 0:
|
|
6247
|
+
fullUrl = this.mediaService + '/hqrenderscripts';
|
|
6248
|
+
_context4.prev = 1;
|
|
6249
|
+
_context4.next = 4;
|
|
6250
|
+
return fetch("".concat(fullUrl, "/").concat(id), {
|
|
6251
|
+
headers: {
|
|
6252
|
+
Authorization: 'Bearer ' + this.jwt,
|
|
6253
|
+
'Content-Type': 'application/json'
|
|
6254
|
+
}
|
|
6255
|
+
});
|
|
6256
|
+
case 4:
|
|
6257
|
+
res = _context4.sent;
|
|
6258
|
+
_context4.next = 7;
|
|
6259
|
+
return res.json();
|
|
6260
|
+
case 7:
|
|
6261
|
+
resData = _context4.sent;
|
|
6262
|
+
_context4.next = 13;
|
|
6263
|
+
break;
|
|
6264
|
+
case 10:
|
|
6265
|
+
_context4.prev = 10;
|
|
6266
|
+
_context4.t0 = _context4["catch"](1);
|
|
6168
6267
|
throw new Error('Could not fetch mediaItem');
|
|
6169
6268
|
case 13:
|
|
6170
6269
|
if (!res.ok) {
|
|
6171
|
-
|
|
6270
|
+
_context4.next = 15;
|
|
6172
6271
|
break;
|
|
6173
6272
|
}
|
|
6174
|
-
return
|
|
6273
|
+
return _context4.abrupt("return", resData);
|
|
6175
6274
|
case 15:
|
|
6176
6275
|
throw new Error(resData.error);
|
|
6177
6276
|
case 16:
|
|
6178
6277
|
case "end":
|
|
6179
|
-
return
|
|
6278
|
+
return _context4.stop();
|
|
6180
6279
|
}
|
|
6181
|
-
},
|
|
6280
|
+
}, _callee4, this, [[1, 10]]);
|
|
6182
6281
|
}));
|
|
6183
|
-
function getHQRenderScriptById(
|
|
6282
|
+
function getHQRenderScriptById(_x4) {
|
|
6184
6283
|
return _getHQRenderScriptById.apply(this, arguments);
|
|
6185
6284
|
}
|
|
6186
6285
|
return getHQRenderScriptById;
|
|
@@ -6188,10 +6287,10 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6188
6287
|
}, {
|
|
6189
6288
|
key: "getRooms",
|
|
6190
6289
|
value: function () {
|
|
6191
|
-
var _getRooms = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6290
|
+
var _getRooms = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(id, mainCategory, style, name) {
|
|
6192
6291
|
var fullUrl, filterParts, filter, res, resData;
|
|
6193
|
-
return _regeneratorRuntime.wrap(function
|
|
6194
|
-
while (1) switch (
|
|
6292
|
+
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
6293
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
6195
6294
|
case 0:
|
|
6196
6295
|
fullUrl = new URL(this.mediaService + '/rooms');
|
|
6197
6296
|
fullUrl.searchParams.append('limit', '20');
|
|
@@ -6214,8 +6313,8 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6214
6313
|
if (filter) {
|
|
6215
6314
|
fullUrl.searchParams.append('filter', encodeURIComponent(filter));
|
|
6216
6315
|
}
|
|
6217
|
-
|
|
6218
|
-
|
|
6316
|
+
_context5.prev = 7;
|
|
6317
|
+
_context5.next = 10;
|
|
6219
6318
|
return fetch(fullUrl.toString(), {
|
|
6220
6319
|
headers: {
|
|
6221
6320
|
Authorization: 'Bearer ' + this.jwt,
|
|
@@ -6223,32 +6322,32 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6223
6322
|
}
|
|
6224
6323
|
});
|
|
6225
6324
|
case 10:
|
|
6226
|
-
res =
|
|
6227
|
-
|
|
6325
|
+
res = _context5.sent;
|
|
6326
|
+
_context5.next = 13;
|
|
6228
6327
|
return res.json();
|
|
6229
6328
|
case 13:
|
|
6230
|
-
resData =
|
|
6231
|
-
|
|
6329
|
+
resData = _context5.sent;
|
|
6330
|
+
_context5.next = 19;
|
|
6232
6331
|
break;
|
|
6233
6332
|
case 16:
|
|
6234
|
-
|
|
6235
|
-
|
|
6333
|
+
_context5.prev = 16;
|
|
6334
|
+
_context5.t0 = _context5["catch"](7);
|
|
6236
6335
|
throw new Error('Could not get rooms');
|
|
6237
6336
|
case 19:
|
|
6238
6337
|
if (!res.ok) {
|
|
6239
|
-
|
|
6338
|
+
_context5.next = 21;
|
|
6240
6339
|
break;
|
|
6241
6340
|
}
|
|
6242
|
-
return
|
|
6341
|
+
return _context5.abrupt("return", resData.data);
|
|
6243
6342
|
case 21:
|
|
6244
6343
|
throw new Error(resData.error);
|
|
6245
6344
|
case 22:
|
|
6246
6345
|
case "end":
|
|
6247
|
-
return
|
|
6346
|
+
return _context5.stop();
|
|
6248
6347
|
}
|
|
6249
|
-
},
|
|
6348
|
+
}, _callee5, this, [[7, 16]]);
|
|
6250
6349
|
}));
|
|
6251
|
-
function getRooms(
|
|
6350
|
+
function getRooms(_x5, _x6, _x7, _x8) {
|
|
6252
6351
|
return _getRooms.apply(this, arguments);
|
|
6253
6352
|
}
|
|
6254
6353
|
return getRooms;
|
|
@@ -6256,20 +6355,17 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6256
6355
|
}, {
|
|
6257
6356
|
key: "getRoomsNew",
|
|
6258
6357
|
value: function () {
|
|
6259
|
-
var _getRoomsNew = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6358
|
+
var _getRoomsNew = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(id, mainCategory, organizationId) {
|
|
6260
6359
|
var fullUrl, filterParts, filter, res, resData;
|
|
6261
|
-
return _regeneratorRuntime.wrap(function
|
|
6262
|
-
while (1) switch (
|
|
6360
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
6361
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
6263
6362
|
case 0:
|
|
6264
6363
|
fullUrl = new URL(this.mediaService + '/rooms');
|
|
6265
|
-
fullUrl.searchParams.append('limit', '
|
|
6364
|
+
fullUrl.searchParams.append('limit', '1000');
|
|
6266
6365
|
fullUrl.searchParams.append('skip', '0');
|
|
6267
6366
|
if (organizationId) {
|
|
6268
6367
|
fullUrl.searchParams.append('organizationId', organizationId);
|
|
6269
6368
|
}
|
|
6270
|
-
if (hideStandardRooms) {
|
|
6271
|
-
fullUrl.searchParams.append('hideStandardRooms', hideStandardRooms.toString());
|
|
6272
|
-
}
|
|
6273
6369
|
filterParts = [];
|
|
6274
6370
|
if (id) {
|
|
6275
6371
|
filterParts.push("+[{_id,eq,".concat(id, "},{variants.id,eq,").concat(id, "}]"));
|
|
@@ -6282,41 +6378,41 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6282
6378
|
if (filter) {
|
|
6283
6379
|
fullUrl.searchParams.append('filter', encodeURIComponent(filter));
|
|
6284
6380
|
}
|
|
6285
|
-
|
|
6286
|
-
|
|
6381
|
+
_context6.prev = 8;
|
|
6382
|
+
_context6.next = 11;
|
|
6287
6383
|
return fetch(fullUrl.toString(), {
|
|
6288
6384
|
headers: {
|
|
6289
6385
|
Authorization: 'Bearer ' + this.jwt,
|
|
6290
6386
|
'Content-Type': 'application/json'
|
|
6291
6387
|
}
|
|
6292
6388
|
});
|
|
6293
|
-
case
|
|
6294
|
-
res =
|
|
6295
|
-
|
|
6389
|
+
case 11:
|
|
6390
|
+
res = _context6.sent;
|
|
6391
|
+
_context6.next = 14;
|
|
6296
6392
|
return res.json();
|
|
6297
|
-
case
|
|
6298
|
-
resData =
|
|
6299
|
-
|
|
6393
|
+
case 14:
|
|
6394
|
+
resData = _context6.sent;
|
|
6395
|
+
_context6.next = 20;
|
|
6300
6396
|
break;
|
|
6301
|
-
case
|
|
6302
|
-
|
|
6303
|
-
|
|
6397
|
+
case 17:
|
|
6398
|
+
_context6.prev = 17;
|
|
6399
|
+
_context6.t0 = _context6["catch"](8);
|
|
6304
6400
|
throw new Error('Could not get rooms');
|
|
6305
|
-
case
|
|
6401
|
+
case 20:
|
|
6306
6402
|
if (!res.ok) {
|
|
6307
|
-
|
|
6403
|
+
_context6.next = 22;
|
|
6308
6404
|
break;
|
|
6309
6405
|
}
|
|
6310
|
-
return
|
|
6311
|
-
case
|
|
6406
|
+
return _context6.abrupt("return", resData.data);
|
|
6407
|
+
case 22:
|
|
6312
6408
|
throw new Error(resData.error);
|
|
6313
|
-
case
|
|
6409
|
+
case 23:
|
|
6314
6410
|
case "end":
|
|
6315
|
-
return
|
|
6411
|
+
return _context6.stop();
|
|
6316
6412
|
}
|
|
6317
|
-
},
|
|
6413
|
+
}, _callee6, this, [[8, 17]]);
|
|
6318
6414
|
}));
|
|
6319
|
-
function getRoomsNew(
|
|
6415
|
+
function getRoomsNew(_x9, _x10, _x11) {
|
|
6320
6416
|
return _getRoomsNew.apply(this, arguments);
|
|
6321
6417
|
}
|
|
6322
6418
|
return getRoomsNew;
|
|
@@ -6324,17 +6420,14 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6324
6420
|
}, {
|
|
6325
6421
|
key: "getRoomsGrouped",
|
|
6326
6422
|
value: function () {
|
|
6327
|
-
var _getRoomsGrouped = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6423
|
+
var _getRoomsGrouped = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(id, mainCategory, style, organizationId) {
|
|
6328
6424
|
var fullUrl, filterParts, filter, res, resData;
|
|
6329
|
-
return _regeneratorRuntime.wrap(function
|
|
6330
|
-
while (1) switch (
|
|
6425
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
6426
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
6331
6427
|
case 0:
|
|
6332
6428
|
fullUrl = new URL(this.mediaService + '/rooms');
|
|
6333
6429
|
if (organizationId) {
|
|
6334
6430
|
fullUrl = new URL(this.mediaService + "/rooms/".concat(organizationId, "/grouped"));
|
|
6335
|
-
if (hideStandardRooms) {
|
|
6336
|
-
fullUrl.searchParams.append('hideStandardRooms', hideStandardRooms.toString());
|
|
6337
|
-
}
|
|
6338
6431
|
}
|
|
6339
6432
|
fullUrl.searchParams.append('limit', '20');
|
|
6340
6433
|
fullUrl.searchParams.append('skip', '0');
|
|
@@ -6353,8 +6446,8 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6353
6446
|
if (filter) {
|
|
6354
6447
|
fullUrl.searchParams.append('filter', encodeURIComponent(filter));
|
|
6355
6448
|
}
|
|
6356
|
-
|
|
6357
|
-
|
|
6449
|
+
_context7.prev = 8;
|
|
6450
|
+
_context7.next = 11;
|
|
6358
6451
|
return fetch(fullUrl.toString(), {
|
|
6359
6452
|
headers: {
|
|
6360
6453
|
Authorization: 'Bearer ' + this.jwt,
|
|
@@ -6362,32 +6455,32 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6362
6455
|
}
|
|
6363
6456
|
});
|
|
6364
6457
|
case 11:
|
|
6365
|
-
res =
|
|
6366
|
-
|
|
6458
|
+
res = _context7.sent;
|
|
6459
|
+
_context7.next = 14;
|
|
6367
6460
|
return res.json();
|
|
6368
6461
|
case 14:
|
|
6369
|
-
resData =
|
|
6370
|
-
|
|
6462
|
+
resData = _context7.sent;
|
|
6463
|
+
_context7.next = 20;
|
|
6371
6464
|
break;
|
|
6372
6465
|
case 17:
|
|
6373
|
-
|
|
6374
|
-
|
|
6466
|
+
_context7.prev = 17;
|
|
6467
|
+
_context7.t0 = _context7["catch"](8);
|
|
6375
6468
|
throw new Error('Could not get rooms');
|
|
6376
6469
|
case 20:
|
|
6377
6470
|
if (!res.ok) {
|
|
6378
|
-
|
|
6471
|
+
_context7.next = 22;
|
|
6379
6472
|
break;
|
|
6380
6473
|
}
|
|
6381
|
-
return
|
|
6474
|
+
return _context7.abrupt("return", organizationId ? resData : resData.data);
|
|
6382
6475
|
case 22:
|
|
6383
6476
|
throw new Error(resData.error);
|
|
6384
6477
|
case 23:
|
|
6385
6478
|
case "end":
|
|
6386
|
-
return
|
|
6479
|
+
return _context7.stop();
|
|
6387
6480
|
}
|
|
6388
|
-
},
|
|
6481
|
+
}, _callee7, this, [[8, 17]]);
|
|
6389
6482
|
}));
|
|
6390
|
-
function getRoomsGrouped(_x12, _x13, _x14, _x15
|
|
6483
|
+
function getRoomsGrouped(_x12, _x13, _x14, _x15) {
|
|
6391
6484
|
return _getRoomsGrouped.apply(this, arguments);
|
|
6392
6485
|
}
|
|
6393
6486
|
return getRoomsGrouped;
|
|
@@ -6395,15 +6488,15 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6395
6488
|
}, {
|
|
6396
6489
|
key: "getRoomColors",
|
|
6397
6490
|
value: function () {
|
|
6398
|
-
var _getRoomColors = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6491
|
+
var _getRoomColors = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(name) {
|
|
6399
6492
|
var fullUrl, res, resData;
|
|
6400
|
-
return _regeneratorRuntime.wrap(function
|
|
6401
|
-
while (1) switch (
|
|
6493
|
+
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
6494
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
6402
6495
|
case 0:
|
|
6403
6496
|
fullUrl = this.mediaService + '/rooms/' + name + '/colors';
|
|
6404
6497
|
resData = [];
|
|
6405
|
-
|
|
6406
|
-
|
|
6498
|
+
_context8.prev = 2;
|
|
6499
|
+
_context8.next = 5;
|
|
6407
6500
|
return fetch(fullUrl, {
|
|
6408
6501
|
headers: {
|
|
6409
6502
|
Authorization: 'Bearer ' + this.jwt,
|
|
@@ -6411,32 +6504,32 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6411
6504
|
}
|
|
6412
6505
|
});
|
|
6413
6506
|
case 5:
|
|
6414
|
-
res =
|
|
6415
|
-
|
|
6507
|
+
res = _context8.sent;
|
|
6508
|
+
_context8.next = 8;
|
|
6416
6509
|
return res.json();
|
|
6417
6510
|
case 8:
|
|
6418
|
-
resData =
|
|
6419
|
-
|
|
6511
|
+
resData = _context8.sent;
|
|
6512
|
+
_context8.next = 14;
|
|
6420
6513
|
break;
|
|
6421
6514
|
case 11:
|
|
6422
|
-
|
|
6423
|
-
|
|
6515
|
+
_context8.prev = 11;
|
|
6516
|
+
_context8.t0 = _context8["catch"](2);
|
|
6424
6517
|
throw new Error('Could not get room variants');
|
|
6425
6518
|
case 14:
|
|
6426
6519
|
if (!res.ok) {
|
|
6427
|
-
|
|
6520
|
+
_context8.next = 16;
|
|
6428
6521
|
break;
|
|
6429
6522
|
}
|
|
6430
|
-
return
|
|
6523
|
+
return _context8.abrupt("return", resData);
|
|
6431
6524
|
case 16:
|
|
6432
6525
|
throw new Error(resData.error);
|
|
6433
6526
|
case 17:
|
|
6434
6527
|
case "end":
|
|
6435
|
-
return
|
|
6528
|
+
return _context8.stop();
|
|
6436
6529
|
}
|
|
6437
|
-
},
|
|
6530
|
+
}, _callee8, this, [[2, 11]]);
|
|
6438
6531
|
}));
|
|
6439
|
-
function getRoomColors(
|
|
6532
|
+
function getRoomColors(_x16) {
|
|
6440
6533
|
return _getRoomColors.apply(this, arguments);
|
|
6441
6534
|
}
|
|
6442
6535
|
return getRoomColors;
|
|
@@ -6444,15 +6537,15 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6444
6537
|
}, {
|
|
6445
6538
|
key: "getRoomVariants",
|
|
6446
6539
|
value: function () {
|
|
6447
|
-
var _getRoomVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6540
|
+
var _getRoomVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(id) {
|
|
6448
6541
|
var fullUrl, res, resData;
|
|
6449
|
-
return _regeneratorRuntime.wrap(function
|
|
6450
|
-
while (1) switch (
|
|
6542
|
+
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
6543
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
6451
6544
|
case 0:
|
|
6452
6545
|
fullUrl = this.mediaService + '/rooms/' + id + '/variants';
|
|
6453
6546
|
resData = [];
|
|
6454
|
-
|
|
6455
|
-
|
|
6547
|
+
_context9.prev = 2;
|
|
6548
|
+
_context9.next = 5;
|
|
6456
6549
|
return fetch(fullUrl, {
|
|
6457
6550
|
headers: {
|
|
6458
6551
|
Authorization: 'Bearer ' + this.jwt,
|
|
@@ -6460,32 +6553,32 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6460
6553
|
}
|
|
6461
6554
|
});
|
|
6462
6555
|
case 5:
|
|
6463
|
-
res =
|
|
6464
|
-
|
|
6556
|
+
res = _context9.sent;
|
|
6557
|
+
_context9.next = 8;
|
|
6465
6558
|
return res.json();
|
|
6466
6559
|
case 8:
|
|
6467
|
-
resData =
|
|
6468
|
-
|
|
6560
|
+
resData = _context9.sent;
|
|
6561
|
+
_context9.next = 14;
|
|
6469
6562
|
break;
|
|
6470
6563
|
case 11:
|
|
6471
|
-
|
|
6472
|
-
|
|
6564
|
+
_context9.prev = 11;
|
|
6565
|
+
_context9.t0 = _context9["catch"](2);
|
|
6473
6566
|
throw new Error('Could not get room variants');
|
|
6474
6567
|
case 14:
|
|
6475
6568
|
if (!res.ok) {
|
|
6476
|
-
|
|
6569
|
+
_context9.next = 16;
|
|
6477
6570
|
break;
|
|
6478
6571
|
}
|
|
6479
|
-
return
|
|
6572
|
+
return _context9.abrupt("return", resData);
|
|
6480
6573
|
case 16:
|
|
6481
6574
|
throw new Error(resData.error);
|
|
6482
6575
|
case 17:
|
|
6483
6576
|
case "end":
|
|
6484
|
-
return
|
|
6577
|
+
return _context9.stop();
|
|
6485
6578
|
}
|
|
6486
|
-
},
|
|
6579
|
+
}, _callee9, this, [[2, 11]]);
|
|
6487
6580
|
}));
|
|
6488
|
-
function getRoomVariants(
|
|
6581
|
+
function getRoomVariants(_x17) {
|
|
6489
6582
|
return _getRoomVariants.apply(this, arguments);
|
|
6490
6583
|
}
|
|
6491
6584
|
return getRoomVariants;
|
|
@@ -6493,16 +6586,16 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6493
6586
|
}, {
|
|
6494
6587
|
key: "getRenderPackages",
|
|
6495
6588
|
value: function () {
|
|
6496
|
-
var _getRenderPackages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6589
|
+
var _getRenderPackages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(organizationId) {
|
|
6497
6590
|
var fullUrl, res, resData;
|
|
6498
|
-
return _regeneratorRuntime.wrap(function
|
|
6499
|
-
while (1) switch (
|
|
6591
|
+
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
6592
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
6500
6593
|
case 0:
|
|
6501
6594
|
fullUrl = new URL(this.mediaService + '/renderpackages');
|
|
6502
6595
|
if (organizationId) fullUrl.searchParams.append('organizationId', organizationId);
|
|
6503
6596
|
fullUrl.searchParams.append('sort', encodeURIComponent('{position}'));
|
|
6504
|
-
|
|
6505
|
-
|
|
6597
|
+
_context10.prev = 3;
|
|
6598
|
+
_context10.next = 6;
|
|
6506
6599
|
return fetch(fullUrl, {
|
|
6507
6600
|
headers: {
|
|
6508
6601
|
Authorization: 'Bearer ' + this.jwt,
|
|
@@ -6510,32 +6603,32 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6510
6603
|
}
|
|
6511
6604
|
});
|
|
6512
6605
|
case 6:
|
|
6513
|
-
res =
|
|
6514
|
-
|
|
6606
|
+
res = _context10.sent;
|
|
6607
|
+
_context10.next = 9;
|
|
6515
6608
|
return res.json();
|
|
6516
6609
|
case 9:
|
|
6517
|
-
resData =
|
|
6518
|
-
|
|
6610
|
+
resData = _context10.sent;
|
|
6611
|
+
_context10.next = 15;
|
|
6519
6612
|
break;
|
|
6520
6613
|
case 12:
|
|
6521
|
-
|
|
6522
|
-
|
|
6614
|
+
_context10.prev = 12;
|
|
6615
|
+
_context10.t0 = _context10["catch"](3);
|
|
6523
6616
|
throw new Error('Could not get render packages');
|
|
6524
6617
|
case 15:
|
|
6525
6618
|
if (!res.ok) {
|
|
6526
|
-
|
|
6619
|
+
_context10.next = 17;
|
|
6527
6620
|
break;
|
|
6528
6621
|
}
|
|
6529
|
-
return
|
|
6622
|
+
return _context10.abrupt("return", resData);
|
|
6530
6623
|
case 17:
|
|
6531
6624
|
throw new Error(resData.error);
|
|
6532
6625
|
case 18:
|
|
6533
6626
|
case "end":
|
|
6534
|
-
return
|
|
6627
|
+
return _context10.stop();
|
|
6535
6628
|
}
|
|
6536
|
-
},
|
|
6629
|
+
}, _callee10, this, [[3, 12]]);
|
|
6537
6630
|
}));
|
|
6538
|
-
function getRenderPackages(
|
|
6631
|
+
function getRenderPackages(_x18) {
|
|
6539
6632
|
return _getRenderPackages.apply(this, arguments);
|
|
6540
6633
|
}
|
|
6541
6634
|
return getRenderPackages;
|
|
@@ -9015,6 +9108,7 @@ var DivaCoreProvider = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
9015
9108
|
changeLanguage: store.changeLanguage.bind(store),
|
|
9016
9109
|
changeLoginMode: store.changeLoginMode.bind(store),
|
|
9017
9110
|
toggleLoading: store.loadingAndErrorStore.toggleLoading.bind(store.loadingAndErrorStore),
|
|
9111
|
+
loadModelViewer: store.contentStore.loadModelViewer.bind(store.contentStore),
|
|
9018
9112
|
openModal: store.contentStore.openModal.bind(store.contentStore),
|
|
9019
9113
|
closeModal: store.contentStore.closeModal.bind(store.contentStore),
|
|
9020
9114
|
sendEmail: store.contentStore.sendEmail.bind(store.contentStore),
|
|
@@ -9114,6 +9208,7 @@ var DivaCoreProvider = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
9114
9208
|
changeLanguage: store.changeLanguage.bind(store),
|
|
9115
9209
|
changeLoginMode: store.changeLoginMode.bind(store),
|
|
9116
9210
|
toggleLoading: store.loadingAndErrorStore.toggleLoading.bind(store.loadingAndErrorStore),
|
|
9211
|
+
loadModelViewer: store.contentStore.loadModelViewer.bind(store.contentStore),
|
|
9117
9212
|
openModal: store.contentStore.openModal.bind(store.contentStore),
|
|
9118
9213
|
closeModal: store.contentStore.closeModal.bind(store.contentStore),
|
|
9119
9214
|
sendEmail: store.contentStore.sendEmail.bind(store.contentStore),
|
|
@@ -9530,9 +9625,10 @@ var SideMenu$1 = observer(SideMenu);
|
|
|
9530
9625
|
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; }
|
|
9531
9626
|
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; }
|
|
9532
9627
|
var LazyModals$1 = /*#__PURE__*/React.lazy(function () {
|
|
9533
|
-
return import('./ModalsWrapper-
|
|
9628
|
+
return import('./ModalsWrapper-a64f9371.js');
|
|
9534
9629
|
});
|
|
9535
|
-
function Fullscreen() {
|
|
9630
|
+
function Fullscreen(_ref) {
|
|
9631
|
+
var inAbsoluteFullscreen = _ref.inAbsoluteFullscreen;
|
|
9536
9632
|
var _useDivaCoreContext = useDivaCoreContext(),
|
|
9537
9633
|
contentStore = _useDivaCoreContext.contentStore,
|
|
9538
9634
|
configurationStore = _useDivaCoreContext.configurationStore;
|
|
@@ -9614,21 +9710,24 @@ function Fullscreen() {
|
|
|
9614
9710
|
(_element$2 = element[0]) === null || _element$2 === void 0 || _element$2.classList.remove('diva-pseudo-fullscreen');
|
|
9615
9711
|
};
|
|
9616
9712
|
}, [contentStore.isFullscreenComponentDefined]);
|
|
9617
|
-
if (!contentStore.fullscreen) {
|
|
9713
|
+
if (!contentStore.isFullscreenComponentDefined && !contentStore.fullscreen) return /*#__PURE__*/jsx(Fragment, {});
|
|
9714
|
+
if ((!contentStore.fullscreen || contentStore.isFullscreenComponentDefined) && !inAbsoluteFullscreen) {
|
|
9618
9715
|
var _c$state$absoluteFull, _c$state$absoluteFull2;
|
|
9619
|
-
if (!contentStore.isFullscreenComponentDefined) return /*#__PURE__*/jsx(Fragment, {});
|
|
9620
9716
|
var c = contentStore.fullscreenComponent;
|
|
9621
9717
|
var C = c.component;
|
|
9622
9718
|
return /*#__PURE__*/jsxs("div", {
|
|
9623
9719
|
id: "DivaCore",
|
|
9624
9720
|
className: classnames('diva-fullscreen', c.state.absoluteFullscreen ? absoluteOverlay : overlay),
|
|
9625
9721
|
style: isMobile ? (_c$state$absoluteFull = c.state.absoluteFullscreenStyle) === null || _c$state$absoluteFull === void 0 ? void 0 : _c$state$absoluteFull.mobile : (_c$state$absoluteFull2 = c.state.absoluteFullscreenStyle) === null || _c$state$absoluteFull2 === void 0 ? void 0 : _c$state$absoluteFull2.desktop,
|
|
9626
|
-
children: [/*#__PURE__*/jsx(
|
|
9722
|
+
children: [/*#__PURE__*/jsx(Fullscreen, {
|
|
9723
|
+
inAbsoluteFullscreen: true
|
|
9724
|
+
}), /*#__PURE__*/jsx(Spinner$1, {}), /*#__PURE__*/jsx(SideMenu$1, {}), configurationStore.enableModals && /*#__PURE__*/jsx(LazyModals$1, {}), /*#__PURE__*/jsx(Suspense, {
|
|
9627
9725
|
fallback: /*#__PURE__*/jsx(Fallback, {}),
|
|
9628
9726
|
children: /*#__PURE__*/jsx(C, _objectSpread$4({}, c.state))
|
|
9629
9727
|
})]
|
|
9630
9728
|
});
|
|
9631
9729
|
}
|
|
9730
|
+
if (!contentStore.fullscreen) return /*#__PURE__*/jsx(Fragment, {});
|
|
9632
9731
|
return /*#__PURE__*/jsxs("div", {
|
|
9633
9732
|
className: classnames('diva-fullscreen', contentStore.fullscreen.absoluteFullscreen ? absoluteOverlay : overlay),
|
|
9634
9733
|
"data-test-id": "plannerFullscreen",
|
|
@@ -9801,7 +9900,7 @@ function ErrorDisplay() {
|
|
|
9801
9900
|
children: [loadingAndErrorStore.divaErrorCode ? loadingAndErrorStore.divaErrorCode + ': ' : '', " ", loadingAndErrorStore.error]
|
|
9802
9901
|
}), /*#__PURE__*/jsxs("div", {
|
|
9803
9902
|
className: actionButtons,
|
|
9804
|
-
children: [loadingAndErrorStore.fallbackModule && /*#__PURE__*/jsx(Button$
|
|
9903
|
+
children: [loadingAndErrorStore.fallbackModule && /*#__PURE__*/jsx(Button$2, {
|
|
9805
9904
|
color: "primary",
|
|
9806
9905
|
variant: "contained",
|
|
9807
9906
|
onClick: function onClick() {
|
|
@@ -9811,14 +9910,14 @@ function ErrorDisplay() {
|
|
|
9811
9910
|
});
|
|
9812
9911
|
},
|
|
9813
9912
|
children: (_loadingAndErrorStore5 = loadingAndErrorStore.fallbackModule.text) !== null && _loadingAndErrorStore5 !== void 0 ? _loadingAndErrorStore5 : t('portal.error.gotodefaultmodule') + ' (' + loadingAndErrorStore.fallbackModule.route.replace('/', '') + ')'
|
|
9814
|
-
}), configurationStore.applicationEnvironment !== 'WEB' && loadingAndErrorStore.showLogout && /*#__PURE__*/jsx(Button$
|
|
9913
|
+
}), configurationStore.applicationEnvironment !== 'WEB' && loadingAndErrorStore.showLogout && /*#__PURE__*/jsx(Button$2, {
|
|
9815
9914
|
color: "primary",
|
|
9816
9915
|
variant: "contained",
|
|
9817
9916
|
onClick: function onClick() {
|
|
9818
9917
|
return authorizationStore.logout();
|
|
9819
9918
|
},
|
|
9820
9919
|
children: "Logout"
|
|
9821
|
-
}), showReload && /*#__PURE__*/jsx(Button$
|
|
9920
|
+
}), showReload && /*#__PURE__*/jsx(Button$2, {
|
|
9822
9921
|
color: "primary",
|
|
9823
9922
|
variant: "contained",
|
|
9824
9923
|
onClick: function onClick() {
|
|
@@ -9984,10 +10083,10 @@ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
|
|
|
9984
10083
|
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; }
|
|
9985
10084
|
var LOG$2 = getLogger('Framework', 'Root');
|
|
9986
10085
|
var LazyAuth = /*#__PURE__*/React.lazy(function () {
|
|
9987
|
-
return import('./index-
|
|
10086
|
+
return import('./index-9a4b1c67.js');
|
|
9988
10087
|
});
|
|
9989
10088
|
var LazyModals = /*#__PURE__*/React.lazy(function () {
|
|
9990
|
-
return import('./ModalsWrapper-
|
|
10089
|
+
return import('./ModalsWrapper-a64f9371.js');
|
|
9991
10090
|
});
|
|
9992
10091
|
function ContentComponent() {
|
|
9993
10092
|
var context = useDivaCoreContext();
|
|
@@ -10774,6 +10873,13 @@ var MockedRootStore = /*#__PURE__*/function () {
|
|
|
10774
10873
|
throw new Error('Method not implemented.');
|
|
10775
10874
|
}
|
|
10776
10875
|
},
|
|
10876
|
+
loadModelViewer: function loadModelViewer() {
|
|
10877
|
+
if (_this2.actions.loadModelViewer) {
|
|
10878
|
+
_this2.actions.loadModelViewer();
|
|
10879
|
+
} else {
|
|
10880
|
+
throw new Error('Method not implemented.');
|
|
10881
|
+
}
|
|
10882
|
+
},
|
|
10777
10883
|
setOrganization: function setOrganization(organizationId) {
|
|
10778
10884
|
if (_this2.actions.setOrganization) {
|
|
10779
10885
|
_this2.actions.setOrganization(organizationId);
|
|
@@ -10976,4 +11082,4 @@ LOG.startTransaction({
|
|
|
10976
11082
|
});
|
|
10977
11083
|
window.DIVA_VERSION = "v".concat(process.env.VERSION);
|
|
10978
11084
|
|
|
10979
|
-
export { AuthorizationHandler as A, Button as B, Content as C, DivaCore as D, HelpButton as H, Input as I, ONE_DAY_UNIX as O, ProductHandler as P, RequestStatus as R, SupportHandler as S, getLogger as a, separator as b, success as c, auth as d, error as e, loginBox as f, google as g, logoContainer as h, styleInject as i, useDivaCore as j, AnalyticsHandler as k, link as l, microsoft as m, OrganizationHandler as n, ClientArticleHandler as o, DivaMockProvider as p, storyBookCoreMock as q,
|
|
11085
|
+
export { AuthorizationHandler as A, Button as B, Content as C, DivaCore as D, HelpButton as H, Input as I, ONE_DAY_UNIX as O, ProductHandler as P, RequestStatus as R, SupportHandler as S, getLogger as a, separator as b, success as c, auth as d, error as e, loginBox as f, google as g, logoContainer as h, styleInject as i, useDivaCore as j, AnalyticsHandler as k, link as l, microsoft as m, OrganizationHandler as n, ClientArticleHandler as o, DivaMockProvider as p, storyBookCoreMock as q, socialButton as s, titlecontainer as t, useDivaCoreContext as u };
|