@crystaldesign/diva-core 25.4.0-beta.5 → 25.4.0-beta.50
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-ff80d1d5.js → ModalsWrapper-b3779fb1.js} +5 -16
- package/build/esm/{index-b32ec50b.js → index-07cb65cf.js} +160 -119
- package/build/esm/{index-8f3a286e.js → index-42e7fbf5.js} +385 -321
- package/build/esm/index.js +2 -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/Modal/index.d.ts.map +1 -1
- package/build/types/core/src/externalTypes.d.ts +4 -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.map +1 -1
- package/build/types/core/src/store/DataStore.d.ts +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
|
@@ -28,6 +28,7 @@ import Typography from '@mui/material/Typography';
|
|
|
28
28
|
import { useTranslation, Trans, I18nextProvider } from 'react-i18next';
|
|
29
29
|
import classnames from 'classnames';
|
|
30
30
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
31
|
+
import { ArrowBack } from '@mui/icons-material';
|
|
31
32
|
import '@crystaldesign/basket-model';
|
|
32
33
|
import debounce from 'lodash/debounce';
|
|
33
34
|
import axios from 'axios';
|
|
@@ -44,7 +45,7 @@ import { actions } from '@storybook/addon-actions';
|
|
|
44
45
|
import * as Styles from '@mui/styles';
|
|
45
46
|
|
|
46
47
|
(function() {
|
|
47
|
-
const env = {"STAGE":"production","VERSION":"25.4.0-beta.
|
|
48
|
+
const env = {"STAGE":"production","VERSION":"25.4.0-beta.50"};
|
|
48
49
|
try {
|
|
49
50
|
if (process) {
|
|
50
51
|
process.env = Object.assign({}, process.env);
|
|
@@ -876,7 +877,7 @@ var ConfigurationStore = /*#__PURE__*/function () {
|
|
|
876
877
|
}, {
|
|
877
878
|
key: "navigation",
|
|
878
879
|
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;
|
|
880
|
+
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
881
|
return {
|
|
881
882
|
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
883
|
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 +896,9 @@ var ConfigurationStore = /*#__PURE__*/function () {
|
|
|
895
896
|
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
897
|
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
898
|
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) {
|
|
899
|
+
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
900
|
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
|
|
901
|
+
})) === 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
902
|
};
|
|
902
903
|
}
|
|
903
904
|
}, {
|
|
@@ -1000,14 +1001,14 @@ var ConfigurationStore = /*#__PURE__*/function () {
|
|
|
1000
1001
|
get: function get() {
|
|
1001
1002
|
var _this$_configuration53;
|
|
1002
1003
|
if ((_this$_configuration53 = this._configuration) !== null && _this$_configuration53 !== void 0 && _this$_configuration53.priceFormat) {
|
|
1003
|
-
var _this$_configuration54, _this$root$dataStore
|
|
1004
|
+
var _this$_configuration54, _this$root$dataStore$2, _this$root$dataStore$3, _this$_configuration55;
|
|
1004
1005
|
return _objectSpread$g(_objectSpread$g({}, (_this$_configuration54 = this._configuration) === null || _this$_configuration54 === void 0 ? void 0 : _this$_configuration54.priceFormat), {}, {
|
|
1005
|
-
currency: (_this$root$dataStore$ = (_this$root$dataStore$
|
|
1006
|
+
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
1007
|
});
|
|
1007
1008
|
} else {
|
|
1008
|
-
var _this$root$dataStore$
|
|
1009
|
+
var _this$root$dataStore$4, _this$root$dataStore$5;
|
|
1009
1010
|
return _objectSpread$g(_objectSpread$g({}, DivaUtils.defaultPriceFormat), {}, {
|
|
1010
|
-
currency: (_this$root$dataStore$
|
|
1011
|
+
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
1012
|
});
|
|
1012
1013
|
}
|
|
1013
1014
|
}
|
|
@@ -1735,9 +1736,8 @@ var microsoft = "microsoft-e3GYR";
|
|
|
1735
1736
|
var separator = "separator-Hg6fH";
|
|
1736
1737
|
var input = "input--Dl8e";
|
|
1737
1738
|
var readonly = "readonly-uw66l";
|
|
1738
|
-
var resetInput = "reset-input-ERpB4";
|
|
1739
1739
|
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
|
|
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 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 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
1741
|
styleInject(css_248z$6);
|
|
1742
1742
|
|
|
1743
1743
|
var _excluded$7 = ["className", "disabled", "children"];
|
|
@@ -1755,19 +1755,41 @@ function Button (_ref) {
|
|
|
1755
1755
|
}));
|
|
1756
1756
|
}
|
|
1757
1757
|
|
|
1758
|
-
var _excluded$6 = ["className", "readOnly"];
|
|
1758
|
+
var _excluded$6 = ["className", "readOnly", "resetInput"];
|
|
1759
1759
|
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
1760
|
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
1761
|
var Input = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1762
1762
|
var className = _ref.className,
|
|
1763
1763
|
readOnly = _ref.readOnly,
|
|
1764
|
+
resetInput = _ref.resetInput,
|
|
1764
1765
|
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
1765
|
-
return /*#__PURE__*/
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1766
|
+
return /*#__PURE__*/jsxs("div", {
|
|
1767
|
+
style: {
|
|
1768
|
+
position: 'relative'
|
|
1769
|
+
},
|
|
1770
|
+
children: [/*#__PURE__*/jsx("input", _objectSpread$d({
|
|
1771
|
+
ref: ref,
|
|
1772
|
+
className: classnames(input, readOnly ? readonly : undefined, className),
|
|
1773
|
+
readOnly: readOnly,
|
|
1774
|
+
"data-test-id": "barrier-input-text",
|
|
1775
|
+
style: {
|
|
1776
|
+
paddingLeft: resetInput ? '40px' : undefined
|
|
1777
|
+
} // Platzierung des Pfeils
|
|
1778
|
+
}, props)), resetInput && /*#__PURE__*/jsx(ArrowBack, {
|
|
1779
|
+
onClick: function onClick() {
|
|
1780
|
+
return resetInput();
|
|
1781
|
+
},
|
|
1782
|
+
style: {
|
|
1783
|
+
position: 'absolute',
|
|
1784
|
+
left: '8px',
|
|
1785
|
+
// Platzierung des Pfeils
|
|
1786
|
+
top: '50%',
|
|
1787
|
+
transform: 'translateY(-50%)',
|
|
1788
|
+
// Vertikale Zentrierung
|
|
1789
|
+
cursor: 'pointer'
|
|
1790
|
+
}
|
|
1791
|
+
})]
|
|
1792
|
+
});
|
|
1771
1793
|
});
|
|
1772
1794
|
|
|
1773
1795
|
function SimpleLogin (_ref) {
|
|
@@ -2235,8 +2257,14 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2235
2257
|
value:
|
|
2236
2258
|
/*#__PURE__*/
|
|
2237
2259
|
_regeneratorRuntime.mark(function openComponent(action) {
|
|
2238
|
-
var _this$componentChange,
|
|
2239
|
-
|
|
2260
|
+
var _this$componentChange,
|
|
2261
|
+
_config2,
|
|
2262
|
+
_config3,
|
|
2263
|
+
_this2 = this,
|
|
2264
|
+
_config6,
|
|
2265
|
+
_config8,
|
|
2266
|
+
_config9;
|
|
2267
|
+
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;
|
|
2240
2268
|
return _regeneratorRuntime.wrap(function openComponent$(_context) {
|
|
2241
2269
|
while (1) switch (_context.prev = _context.next) {
|
|
2242
2270
|
case 0:
|
|
@@ -2283,18 +2311,59 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2283
2311
|
return c.route && (route === null || route === void 0 ? void 0 : route.startsWith(c.route));
|
|
2284
2312
|
});
|
|
2285
2313
|
}
|
|
2286
|
-
|
|
2314
|
+
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')) {
|
|
2315
|
+
_context.next = 23;
|
|
2316
|
+
break;
|
|
2317
|
+
}
|
|
2318
|
+
parent = undefined;
|
|
2319
|
+
if (this.root.dataStore.organization.type == undefined && this.root.dataStore.organization.parentType == 'RETAILER') {
|
|
2320
|
+
parent = (_this$root$dataStore$ = this.root.dataStore.organization.parentOrganizations) === null || _this$root$dataStore$ === void 0 ? void 0 : _this$root$dataStore$.find(function (o) {
|
|
2321
|
+
return o.type == 'RETAILER';
|
|
2322
|
+
});
|
|
2323
|
+
} else if (this.root.dataStore.organization.type == undefined && this.root.dataStore.organization.parentType == 'ASSOCIATION') {
|
|
2324
|
+
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) {
|
|
2325
|
+
return o.type == 'ASSOCIATION';
|
|
2326
|
+
});
|
|
2327
|
+
}
|
|
2328
|
+
if (!parent) {
|
|
2329
|
+
_context.next = 23;
|
|
2330
|
+
break;
|
|
2331
|
+
}
|
|
2332
|
+
this.openModal({
|
|
2333
|
+
title: this.root.t('action.opencomponent.diva6.warning.title'),
|
|
2334
|
+
text: this.root.t('action.opencomponent.diva6.warning.text', {
|
|
2335
|
+
type: ((_config4 = config) === null || _config4 === void 0 ? void 0 : _config4.type) == 'CATEGORY_MANAGER' ? 'Category Manager' : 'Sortiments Manager',
|
|
2336
|
+
parent: parent.displayName
|
|
2337
|
+
}),
|
|
2338
|
+
accept: true,
|
|
2339
|
+
reject: true,
|
|
2340
|
+
rejectByIcon: true,
|
|
2341
|
+
callback: function callback(accept) {
|
|
2342
|
+
if (accept) {
|
|
2343
|
+
var _config5;
|
|
2344
|
+
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);
|
|
2345
|
+
_this2.openInNewTab({
|
|
2346
|
+
url: url,
|
|
2347
|
+
openInNewTab: true
|
|
2348
|
+
});
|
|
2349
|
+
}
|
|
2350
|
+
}
|
|
2351
|
+
});
|
|
2352
|
+
this.root.loadingAndErrorStore.toggleLoading('openComponent');
|
|
2353
|
+
return _context.abrupt("return");
|
|
2354
|
+
case 23:
|
|
2355
|
+
newTab = action.openInNewTab || ((_config6 = config) === null || _config6 === void 0 ? void 0 : _config6.openInNewTab);
|
|
2287
2356
|
if (!newTab) {
|
|
2288
|
-
_context.next =
|
|
2357
|
+
_context.next = 29;
|
|
2289
2358
|
break;
|
|
2290
2359
|
}
|
|
2291
2360
|
base = typeof action.openInNewTab == 'string' ? action.openInNewTab : window.origin;
|
|
2292
|
-
this.openInNewTab(action, "".concat(base).concat(((
|
|
2361
|
+
this.openInNewTab(action, "".concat(base).concat(((_config7 = config) === null || _config7 === void 0 ? void 0 : _config7.route) || ''));
|
|
2293
2362
|
this.root.loadingAndErrorStore.toggleLoading('openComponent');
|
|
2294
2363
|
return _context.abrupt("return");
|
|
2295
|
-
case
|
|
2364
|
+
case 29:
|
|
2296
2365
|
if (!(!this.root.dataStore.user && !this.isPublic(action))) {
|
|
2297
|
-
_context.next =
|
|
2366
|
+
_context.next = 35;
|
|
2298
2367
|
break;
|
|
2299
2368
|
}
|
|
2300
2369
|
LOG$9.debug("Component is restricted, open login form");
|
|
@@ -2302,9 +2371,9 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2302
2371
|
this.root.authorizationStore.showLogin();
|
|
2303
2372
|
this.root.loadingAndErrorStore.toggleLoading('openComponent');
|
|
2304
2373
|
return _context.abrupt("return");
|
|
2305
|
-
case
|
|
2374
|
+
case 35:
|
|
2306
2375
|
if (config) {
|
|
2307
|
-
_context.next =
|
|
2376
|
+
_context.next = 40;
|
|
2308
2377
|
break;
|
|
2309
2378
|
}
|
|
2310
2379
|
this._restrictedComponent = action;
|
|
@@ -2316,7 +2385,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2316
2385
|
}
|
|
2317
2386
|
}), 'CORE_0005');
|
|
2318
2387
|
return _context.abrupt("return");
|
|
2319
|
-
case
|
|
2388
|
+
case 40:
|
|
2320
2389
|
settings = undefined;
|
|
2321
2390
|
if (config.settings) {
|
|
2322
2391
|
settings = config.settings;
|
|
@@ -2329,8 +2398,8 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2329
2398
|
openModuleLables = parameters;
|
|
2330
2399
|
parameters = otherPrams;
|
|
2331
2400
|
}
|
|
2332
|
-
module = this.mapTypeToModule((
|
|
2333
|
-
LOG$9.businessEvent('onOpenModule', module, "Open module ".concat((
|
|
2401
|
+
module = this.mapTypeToModule((_config8 = config) === null || _config8 === void 0 ? void 0 : _config8.type);
|
|
2402
|
+
LOG$9.businessEvent('onOpenModule', module, "Open module ".concat((_config9 = config) === null || _config9 === void 0 ? void 0 : _config9.type), openModuleLables);
|
|
2334
2403
|
prevType = this.visible;
|
|
2335
2404
|
prevState = this.state.get(this.visible || '');
|
|
2336
2405
|
currentState = this.state.get(config.type);
|
|
@@ -2342,7 +2411,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2342
2411
|
this.state.set(config.type, componentState);
|
|
2343
2412
|
this.visible = config.type;
|
|
2344
2413
|
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
|
|
2414
|
+
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
2415
|
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
2416
|
return config.barrier.excludeParams.includes(p);
|
|
2348
2417
|
})) this.loginBarrier(true, config.barrier);
|
|
@@ -2374,7 +2443,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2374
2443
|
}
|
|
2375
2444
|
this.setGlobalClass();
|
|
2376
2445
|
this.root.loadingAndErrorStore.toggleLoading('openComponent');
|
|
2377
|
-
case
|
|
2446
|
+
case 60:
|
|
2378
2447
|
case "end":
|
|
2379
2448
|
return _context.stop();
|
|
2380
2449
|
}
|
|
@@ -2383,7 +2452,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2383
2452
|
}, {
|
|
2384
2453
|
key: "openComponentInFullscreen",
|
|
2385
2454
|
value: /*#__PURE__*/_regeneratorRuntime.mark(function openComponentInFullscreen(component) {
|
|
2386
|
-
var
|
|
2455
|
+
var _config10, _config11;
|
|
2387
2456
|
var type, parameters, internal, route, config, settings, module, componentState;
|
|
2388
2457
|
return _regeneratorRuntime.wrap(function openComponentInFullscreen$(_context2) {
|
|
2389
2458
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -2433,8 +2502,8 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2433
2502
|
case 17:
|
|
2434
2503
|
settings = _context2.sent;
|
|
2435
2504
|
case 18:
|
|
2436
|
-
module = this.mapTypeToModule((
|
|
2437
|
-
LOG$9.businessEvent('onOpenModule', module, "Open module ".concat((
|
|
2505
|
+
module = this.mapTypeToModule((_config10 = config) === null || _config10 === void 0 ? void 0 : _config10.type);
|
|
2506
|
+
LOG$9.businessEvent('onOpenModule', module, "Open module ".concat((_config11 = config) === null || _config11 === void 0 ? void 0 : _config11.type));
|
|
2438
2507
|
componentState = {
|
|
2439
2508
|
key: config.type,
|
|
2440
2509
|
parameters: parameters,
|
|
@@ -2505,7 +2574,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2505
2574
|
value: function loginBarrier(anon, settings) {
|
|
2506
2575
|
var _settings$title,
|
|
2507
2576
|
_settings$text,
|
|
2508
|
-
|
|
2577
|
+
_this3 = this;
|
|
2509
2578
|
this.openBarrier({
|
|
2510
2579
|
type: settings !== null && settings !== void 0 && settings.skipVerify ? 'SIMPLE' : 'GET_EMAIL',
|
|
2511
2580
|
rejectable: false,
|
|
@@ -2520,22 +2589,22 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2520
2589
|
return;
|
|
2521
2590
|
}
|
|
2522
2591
|
LOG$9.debug("Request email verification for ".concat(email));
|
|
2523
|
-
|
|
2592
|
+
_this3.root.apiHandler.sendVerificationEmail({
|
|
2524
2593
|
email: email,
|
|
2525
2594
|
emailVariant: (_settings$emailVarian = settings === null || settings === void 0 ? void 0 : settings.emailVariant) !== null && _settings$emailVarian !== void 0 ? _settings$emailVarian : 'DEMO'
|
|
2526
2595
|
});
|
|
2527
|
-
|
|
2528
|
-
title:
|
|
2529
|
-
text:
|
|
2596
|
+
_this3.openModal({
|
|
2597
|
+
title: _this3.root.t('loginbarrier.verify.title'),
|
|
2598
|
+
text: _this3.root.t('loginbarrier.verify.text'),
|
|
2530
2599
|
maxWidth: 500,
|
|
2531
2600
|
actions: [{
|
|
2532
|
-
text:
|
|
2601
|
+
text: _this3.root.t('loginbarrier.verify.button'),
|
|
2533
2602
|
variant: 'contained',
|
|
2534
2603
|
id: 'verify',
|
|
2535
2604
|
closeable: false
|
|
2536
2605
|
}],
|
|
2537
2606
|
callback: function callback() {
|
|
2538
|
-
|
|
2607
|
+
_this3.loginBarrier(false, settings);
|
|
2539
2608
|
}
|
|
2540
2609
|
});
|
|
2541
2610
|
}
|
|
@@ -2551,9 +2620,9 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2551
2620
|
* @param logo the custom logo
|
|
2552
2621
|
*/
|
|
2553
2622
|
function updateCustomLogo(components, logo) {
|
|
2554
|
-
var
|
|
2623
|
+
var _this4 = this;
|
|
2555
2624
|
components.forEach(function (c) {
|
|
2556
|
-
return logo ?
|
|
2625
|
+
return logo ? _this4.customLogoMap.set(c, logo) : _this4.customLogoMap["delete"](c);
|
|
2557
2626
|
});
|
|
2558
2627
|
}
|
|
2559
2628
|
|
|
@@ -2565,9 +2634,9 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2565
2634
|
}, {
|
|
2566
2635
|
key: "updateCustomHeaderElement",
|
|
2567
2636
|
value: function updateCustomHeaderElement(components, element) {
|
|
2568
|
-
var
|
|
2637
|
+
var _this5 = this;
|
|
2569
2638
|
components.forEach(function (c) {
|
|
2570
|
-
return element ?
|
|
2639
|
+
return element ? _this5.customHeaderComponentMap.set(c, element) : _this5.customHeaderComponentMap["delete"](c);
|
|
2571
2640
|
});
|
|
2572
2641
|
}
|
|
2573
2642
|
|
|
@@ -2646,7 +2715,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2646
2715
|
}, {
|
|
2647
2716
|
key: "breadcrumbs",
|
|
2648
2717
|
get: function get() {
|
|
2649
|
-
var
|
|
2718
|
+
var _this6 = this;
|
|
2650
2719
|
if (!this.visible) {
|
|
2651
2720
|
return undefined;
|
|
2652
2721
|
}
|
|
@@ -2658,7 +2727,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2658
2727
|
var group = _step2.value;
|
|
2659
2728
|
var path = group.path.find(function (p) {
|
|
2660
2729
|
return componentsEqual(p.component, {
|
|
2661
|
-
type:
|
|
2730
|
+
type: _this6.visible,
|
|
2662
2731
|
parameters: state.parameters,
|
|
2663
2732
|
internal: state.internal
|
|
2664
2733
|
});
|
|
@@ -2712,9 +2781,9 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2712
2781
|
}, {
|
|
2713
2782
|
key: "currentComponent",
|
|
2714
2783
|
get: function get() {
|
|
2715
|
-
var
|
|
2784
|
+
var _this7 = this;
|
|
2716
2785
|
return this.root.configurationStore.components.find(function (c) {
|
|
2717
|
-
return c.type ==
|
|
2786
|
+
return c.type == _this7.visible;
|
|
2718
2787
|
});
|
|
2719
2788
|
}
|
|
2720
2789
|
|
|
@@ -2751,11 +2820,11 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2751
2820
|
}, {
|
|
2752
2821
|
key: "allowHidePrices",
|
|
2753
2822
|
get: function get() {
|
|
2754
|
-
var _this$root$dataStore$
|
|
2823
|
+
var _this$root$dataStore$4;
|
|
2755
2824
|
if (!this.visible) {
|
|
2756
2825
|
return false;
|
|
2757
2826
|
}
|
|
2758
|
-
if (((_this$root$dataStore$
|
|
2827
|
+
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
2828
|
return this.root.dataStore.organization.settings.hidePrices.startsWith('DEFAULT');
|
|
2760
2829
|
}
|
|
2761
2830
|
return true;
|
|
@@ -2770,8 +2839,8 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2770
2839
|
key: "hidePrices",
|
|
2771
2840
|
get: function get() {
|
|
2772
2841
|
if (this._hidePrices === undefined) {
|
|
2773
|
-
var _this$root$dataStore$
|
|
2774
|
-
if ((_this$root$dataStore$
|
|
2842
|
+
var _this$root$dataStore$5;
|
|
2843
|
+
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
2844
|
switch (this.root.dataStore.organization.settings.hidePrices) {
|
|
2776
2845
|
case 'DEFAULT_HIDDEN':
|
|
2777
2846
|
case 'ONLY_HIDDEN':
|
|
@@ -2995,11 +3064,11 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2995
3064
|
}, {
|
|
2996
3065
|
key: "openBarrier",
|
|
2997
3066
|
value: function openBarrier(barrier) {
|
|
2998
|
-
var _this$root$dataStore$
|
|
2999
|
-
_this$root$dataStore$
|
|
3067
|
+
var _this$root$dataStore$6,
|
|
3068
|
+
_this$root$dataStore$7,
|
|
3000
3069
|
_barrier$actions,
|
|
3001
|
-
|
|
3002
|
-
if (barrier.anonOnly && (_this$root$dataStore$
|
|
3070
|
+
_this8 = this;
|
|
3071
|
+
if (barrier.anonOnly && (_this$root$dataStore$6 = this.root.dataStore.user) !== null && _this$root$dataStore$6 !== void 0 && _this$root$dataStore$6.mainEmail) {
|
|
3003
3072
|
LOG$9.debug('Skip barrier because user is logged in');
|
|
3004
3073
|
return;
|
|
3005
3074
|
}
|
|
@@ -3014,25 +3083,25 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3014
3083
|
},
|
|
3015
3084
|
content: /*#__PURE__*/React.createElement(Barrier, {
|
|
3016
3085
|
type: barrier.type,
|
|
3017
|
-
currentEmail: (_this$root$dataStore$
|
|
3086
|
+
currentEmail: (_this$root$dataStore$7 = this.root.dataStore.user) === null || _this$root$dataStore$7 === void 0 ? void 0 : _this$root$dataStore$7.mainEmail,
|
|
3018
3087
|
actions: (_barrier$actions = barrier.actions) === null || _barrier$actions === void 0 ? void 0 : _barrier$actions.map(function (a) {
|
|
3019
3088
|
return _objectSpread$b(_objectSpread$b({}, a), {}, {
|
|
3020
3089
|
onClick: function () {
|
|
3021
3090
|
var _onClick = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(email) {
|
|
3022
|
-
var
|
|
3091
|
+
var _this8$root$dataStore;
|
|
3023
3092
|
var doLogin;
|
|
3024
3093
|
return _regeneratorRuntime.wrap(function _callee$(_context3) {
|
|
3025
3094
|
while (1) switch (_context3.prev = _context3.next) {
|
|
3026
3095
|
case 0:
|
|
3027
|
-
|
|
3096
|
+
_this8.closeModal();
|
|
3028
3097
|
doLogin = (a.loginType ? a.loginType : barrier.type) === 'SIMPLE';
|
|
3029
|
-
if (!(doLogin && ((
|
|
3098
|
+
if (!(doLogin && ((_this8$root$dataStore = _this8.root.dataStore.user) === null || _this8$root$dataStore === void 0 ? void 0 : _this8$root$dataStore.mainEmail) != email)) {
|
|
3030
3099
|
_context3.next = 11;
|
|
3031
3100
|
break;
|
|
3032
3101
|
}
|
|
3033
3102
|
_context3.prev = 3;
|
|
3034
3103
|
_context3.next = 6;
|
|
3035
|
-
return flowResult(
|
|
3104
|
+
return flowResult(_this8.root.authorizationStore.login(email, undefined, true, _this8.root.dataStore.organizationId));
|
|
3036
3105
|
case 6:
|
|
3037
3106
|
_context3.next = 11;
|
|
3038
3107
|
break;
|
|
@@ -3078,7 +3147,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3078
3147
|
}, {
|
|
3079
3148
|
key: "sendEmail",
|
|
3080
3149
|
value: function sendEmail(_ref4) {
|
|
3081
|
-
var
|
|
3150
|
+
var _this9 = this;
|
|
3082
3151
|
var dialogText = _ref4.dialogText,
|
|
3083
3152
|
showDialog = _ref4.showDialog,
|
|
3084
3153
|
callback = _ref4.callback,
|
|
@@ -3095,12 +3164,12 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3095
3164
|
}
|
|
3096
3165
|
_context4.next = 4;
|
|
3097
3166
|
return new Promise(function (resolve) {
|
|
3098
|
-
return
|
|
3167
|
+
return _this9.openModal({
|
|
3099
3168
|
reject: true,
|
|
3100
3169
|
accept: true,
|
|
3101
|
-
text: dialogText ?
|
|
3170
|
+
text: dialogText ? _this9.root.t(dialogText, {
|
|
3102
3171
|
to: content.to
|
|
3103
|
-
}) :
|
|
3172
|
+
}) : _this9.root.t('email.question.default', {
|
|
3104
3173
|
to: content.to
|
|
3105
3174
|
}),
|
|
3106
3175
|
callback: function callback(accept) {
|
|
@@ -3116,20 +3185,20 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3116
3185
|
}
|
|
3117
3186
|
return _context4.abrupt("return");
|
|
3118
3187
|
case 6:
|
|
3119
|
-
|
|
3188
|
+
_this9.root.loadingAndErrorStore.toggleLoading('sendingEmail');
|
|
3120
3189
|
_context4.prev = 7;
|
|
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 :
|
|
3190
|
+
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();
|
|
3122
3191
|
_context4.next = 11;
|
|
3123
|
-
return
|
|
3192
|
+
return _this9.root.apiHandler.sendEmail({
|
|
3124
3193
|
content: content,
|
|
3125
|
-
organizationIds:
|
|
3194
|
+
organizationIds: _this9.root.dataStore.fullParentList
|
|
3126
3195
|
});
|
|
3127
3196
|
case 11:
|
|
3128
3197
|
if (callback) {
|
|
3129
3198
|
callback(true);
|
|
3130
3199
|
} else {
|
|
3131
|
-
|
|
3132
|
-
text:
|
|
3200
|
+
_this9.openModal({
|
|
3201
|
+
text: _this9.root.t('email.send.success'),
|
|
3133
3202
|
accept: true
|
|
3134
3203
|
});
|
|
3135
3204
|
}
|
|
@@ -3141,14 +3210,14 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3141
3210
|
if (callback) {
|
|
3142
3211
|
callback(false);
|
|
3143
3212
|
} else {
|
|
3144
|
-
|
|
3145
|
-
text:
|
|
3213
|
+
_this9.openModal({
|
|
3214
|
+
text: _this9.root.t('email.send.error'),
|
|
3146
3215
|
accept: true
|
|
3147
3216
|
});
|
|
3148
3217
|
}
|
|
3149
3218
|
case 17:
|
|
3150
3219
|
_context4.prev = 17;
|
|
3151
|
-
|
|
3220
|
+
_this9.root.loadingAndErrorStore.toggleLoading('sendingEmail');
|
|
3152
3221
|
return _context4.finish(17);
|
|
3153
3222
|
case 20:
|
|
3154
3223
|
case "end":
|
|
@@ -3244,10 +3313,10 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3244
3313
|
key: "availableComponents",
|
|
3245
3314
|
get: function get() {
|
|
3246
3315
|
var _this$root,
|
|
3247
|
-
|
|
3316
|
+
_this10 = this;
|
|
3248
3317
|
return (_this$root = this.root) === null || _this$root === void 0 ? void 0 : _this$root.configurationStore.components.filter(function (component) {
|
|
3249
3318
|
//the component must be passed to diva core
|
|
3250
|
-
if (!
|
|
3319
|
+
if (!_this10.configuration.find(function (config) {
|
|
3251
3320
|
return config.name == component.type;
|
|
3252
3321
|
})) {
|
|
3253
3322
|
return false;
|
|
@@ -3258,11 +3327,11 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3258
3327
|
return true;
|
|
3259
3328
|
}
|
|
3260
3329
|
//if the user is not logged in the component must be public
|
|
3261
|
-
if (!
|
|
3330
|
+
if (!_this10.root.dataStore.user) {
|
|
3262
3331
|
return false;
|
|
3263
3332
|
}
|
|
3264
3333
|
//if there is a permission specified, the user must have it
|
|
3265
|
-
return component.permission ?
|
|
3334
|
+
return component.permission ? _this10.root.dataStore.userHasPermission(component.permission) : true;
|
|
3266
3335
|
});
|
|
3267
3336
|
}
|
|
3268
3337
|
|
|
@@ -3272,14 +3341,14 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3272
3341
|
}, {
|
|
3273
3342
|
key: "components",
|
|
3274
3343
|
get: function get() {
|
|
3275
|
-
var
|
|
3344
|
+
var _this11 = this;
|
|
3276
3345
|
var componentDefinitionToRender = this.configuration.filter(function (config) {
|
|
3277
3346
|
//there must be a state present in order for the component to be rendered
|
|
3278
|
-
if (!
|
|
3347
|
+
if (!_this11.state.has(config.name)) {
|
|
3279
3348
|
return false;
|
|
3280
3349
|
}
|
|
3281
3350
|
//the component must be contained in the available components list in order to be rendered
|
|
3282
|
-
return
|
|
3351
|
+
return _this11.availableComponents.find(function (component) {
|
|
3283
3352
|
return component.type == config.name;
|
|
3284
3353
|
});
|
|
3285
3354
|
});
|
|
@@ -3287,7 +3356,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3287
3356
|
//when a new component is added we have to make sure that for the currently open components the existing instance is reused
|
|
3288
3357
|
//withTransaction creates a new instance if APM is active, so we would loose the state of currently open components
|
|
3289
3358
|
componentDefinitionToRender.forEach(function (cmp) {
|
|
3290
|
-
var toRender =
|
|
3359
|
+
var toRender = _this11._currentlyRendered.find(function (c) {
|
|
3291
3360
|
return c.name == cmp.name;
|
|
3292
3361
|
});
|
|
3293
3362
|
if (!toRender) {
|
|
@@ -3308,10 +3377,10 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3308
3377
|
}, {
|
|
3309
3378
|
key: "fullscreenComponent",
|
|
3310
3379
|
get: function get() {
|
|
3311
|
-
var
|
|
3380
|
+
var _this12 = this;
|
|
3312
3381
|
var component = this.availableComponents.find(function (component) {
|
|
3313
|
-
var
|
|
3314
|
-
return component.type == ((
|
|
3382
|
+
var _this12$_fullscreenCo;
|
|
3383
|
+
return component.type == ((_this12$_fullscreenCo = _this12._fullscreenComponent) === null || _this12$_fullscreenCo === void 0 ? void 0 : _this12$_fullscreenCo.key);
|
|
3315
3384
|
});
|
|
3316
3385
|
var cmp = this.configuration.find(function (config) {
|
|
3317
3386
|
return (component === null || component === void 0 ? void 0 : component.type) == config.name;
|
|
@@ -3358,24 +3427,24 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3358
3427
|
key: "availableButtons",
|
|
3359
3428
|
get: function get() {
|
|
3360
3429
|
var _this$root$configurat,
|
|
3361
|
-
|
|
3430
|
+
_this13 = this;
|
|
3362
3431
|
return (_this$root$configurat = this.root.configurationStore.navigation) === null || _this$root$configurat === void 0 ? void 0 : _this$root$configurat.buttons.filter(function (button) {
|
|
3363
3432
|
//if component is public it can be displayed
|
|
3364
3433
|
if (button.isPublic) {
|
|
3365
3434
|
return true;
|
|
3366
3435
|
}
|
|
3367
3436
|
//if the user is not logged in the component must be public
|
|
3368
|
-
if (!
|
|
3437
|
+
if (!_this13.root.dataStore.user) {
|
|
3369
3438
|
return false;
|
|
3370
3439
|
}
|
|
3371
3440
|
|
|
3372
3441
|
//if the button is opening a component, the component must be availalbe
|
|
3373
|
-
if (button.action.type && !
|
|
3442
|
+
if (button.action.type && !_this13.availableComponentList.includes(button.action.type)) {
|
|
3374
3443
|
return false;
|
|
3375
3444
|
}
|
|
3376
3445
|
|
|
3377
3446
|
//if there is a permission specified, the user must have it
|
|
3378
|
-
return button.permission ?
|
|
3447
|
+
return button.permission ? _this13.root.dataStore.userHasPermission(button.permission) : true;
|
|
3379
3448
|
});
|
|
3380
3449
|
}
|
|
3381
3450
|
|
|
@@ -3460,7 +3529,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3460
3529
|
}, {
|
|
3461
3530
|
key: "updateStateAfterLogout",
|
|
3462
3531
|
value: function updateStateAfterLogout() {
|
|
3463
|
-
var
|
|
3532
|
+
var _this14 = this;
|
|
3464
3533
|
var _iterator3 = _createForOfIteratorHelper(this.state.entries()),
|
|
3465
3534
|
_step3;
|
|
3466
3535
|
try {
|
|
@@ -3468,19 +3537,19 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3468
3537
|
var _step3$value = _slicedToArray(_step3.value, 2),
|
|
3469
3538
|
type = _step3$value[0],
|
|
3470
3539
|
component = _step3$value[1];
|
|
3471
|
-
var config =
|
|
3540
|
+
var config = _this14.root.configurationStore.components.find(function (c) {
|
|
3472
3541
|
return c.type == type;
|
|
3473
3542
|
});
|
|
3474
3543
|
if (!(config !== null && config !== void 0 && config.isPublic)) {
|
|
3475
|
-
|
|
3476
|
-
if (
|
|
3477
|
-
|
|
3478
|
-
|
|
3544
|
+
_this14.state["delete"](type);
|
|
3545
|
+
if (_this14.visible == type) {
|
|
3546
|
+
_this14.visible = undefined;
|
|
3547
|
+
_this14._restrictedComponent = {
|
|
3479
3548
|
type: type,
|
|
3480
3549
|
parameters: component.parameters,
|
|
3481
3550
|
internal: component.internal
|
|
3482
3551
|
};
|
|
3483
|
-
|
|
3552
|
+
_this14.root.authorizationStore.showLogin();
|
|
3484
3553
|
}
|
|
3485
3554
|
}
|
|
3486
3555
|
};
|
|
@@ -3513,7 +3582,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3513
3582
|
if (action.url) {
|
|
3514
3583
|
link = this.resoveUrl(action.url);
|
|
3515
3584
|
} else {
|
|
3516
|
-
var _this$root$dataStore$
|
|
3585
|
+
var _this$root$dataStore$8;
|
|
3517
3586
|
var _ref5 = action,
|
|
3518
3587
|
parameters = _ref5.parameters;
|
|
3519
3588
|
var url = new URL(baseUrl);
|
|
@@ -3524,7 +3593,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3524
3593
|
if (this.root.language) {
|
|
3525
3594
|
params.append('lang', this.root.language);
|
|
3526
3595
|
}
|
|
3527
|
-
if ((_this$root$dataStore$
|
|
3596
|
+
if ((_this$root$dataStore$8 = this.root.dataStore.organization) !== null && _this$root$dataStore$8 !== void 0 && _this$root$dataStore$8._id) {
|
|
3528
3597
|
params.append('organizationId', this.root.dataStore.organization._id);
|
|
3529
3598
|
}
|
|
3530
3599
|
link = url.href;
|
|
@@ -5190,21 +5259,27 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5190
5259
|
}
|
|
5191
5260
|
return _context7.abrupt("return", undefined);
|
|
5192
5261
|
case 9:
|
|
5262
|
+
if (!(response.status == 403)) {
|
|
5263
|
+
_context7.next = 11;
|
|
5264
|
+
break;
|
|
5265
|
+
}
|
|
5266
|
+
return _context7.abrupt("return", 'FORBIDDEN');
|
|
5267
|
+
case 11:
|
|
5193
5268
|
throw new DivaError("Error from server while loading organization. HTTP status: ".concat(response.status), {
|
|
5194
5269
|
code: 'CORE_0001'
|
|
5195
5270
|
});
|
|
5196
|
-
case
|
|
5197
|
-
_context7.prev =
|
|
5271
|
+
case 14:
|
|
5272
|
+
_context7.prev = 14;
|
|
5198
5273
|
_context7.t0 = _context7["catch"](1);
|
|
5199
5274
|
throw new DivaError('Error while loading organization', {
|
|
5200
5275
|
code: 'CORE_0001',
|
|
5201
5276
|
cause: _context7.t0
|
|
5202
5277
|
});
|
|
5203
|
-
case
|
|
5278
|
+
case 17:
|
|
5204
5279
|
case "end":
|
|
5205
5280
|
return _context7.stop();
|
|
5206
5281
|
}
|
|
5207
|
-
}, _callee7, this, [[1,
|
|
5282
|
+
}, _callee7, this, [[1, 14]]);
|
|
5208
5283
|
}));
|
|
5209
5284
|
function fetchOrganization(_x8) {
|
|
5210
5285
|
return _fetchOrganization.apply(this, arguments);
|
|
@@ -5602,14 +5677,14 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5602
5677
|
return getOrganizationBySearch;
|
|
5603
5678
|
}()
|
|
5604
5679
|
}, {
|
|
5605
|
-
key: "
|
|
5680
|
+
key: "getOrganizationParentByType",
|
|
5606
5681
|
value: function () {
|
|
5607
|
-
var
|
|
5608
|
-
var url, response;
|
|
5682
|
+
var _getOrganizationParentByType = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(organizationId, type) {
|
|
5683
|
+
var url, response, _data$data, data;
|
|
5609
5684
|
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
5610
5685
|
while (1) switch (_context14.prev = _context14.next) {
|
|
5611
5686
|
case 0:
|
|
5612
|
-
url = new URL("".concat(this.authService, "/v2/organizations/").concat(organizationId));
|
|
5687
|
+
url = new URL("".concat(this.authService, "/v2/organizations/").concat(organizationId, "/parents/").concat(type.toLocaleLowerCase()));
|
|
5613
5688
|
_context14.prev = 1;
|
|
5614
5689
|
_context14.next = 4;
|
|
5615
5690
|
return this.fetch({
|
|
@@ -5619,88 +5694,38 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5619
5694
|
case 4:
|
|
5620
5695
|
response = _context14.sent;
|
|
5621
5696
|
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;
|
|
5697
|
+
_context14.next = 10;
|
|
5673
5698
|
break;
|
|
5674
5699
|
}
|
|
5675
|
-
|
|
5700
|
+
_context14.next = 8;
|
|
5676
5701
|
return response.json();
|
|
5677
5702
|
case 8:
|
|
5678
|
-
data =
|
|
5679
|
-
return
|
|
5703
|
+
data = _context14.sent;
|
|
5704
|
+
return _context14.abrupt("return", (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data[0]);
|
|
5680
5705
|
case 10:
|
|
5681
5706
|
throw new DivaError("Error from server while searching organizations. HTTP status: ".concat(response.status), {
|
|
5682
5707
|
code: 'CORE_0001'
|
|
5683
5708
|
});
|
|
5684
5709
|
case 13:
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
if (!(
|
|
5688
|
-
|
|
5710
|
+
_context14.prev = 13;
|
|
5711
|
+
_context14.t0 = _context14["catch"](1);
|
|
5712
|
+
if (!(_context14.t0 instanceof DivaError)) {
|
|
5713
|
+
_context14.next = 17;
|
|
5689
5714
|
break;
|
|
5690
5715
|
}
|
|
5691
|
-
throw
|
|
5716
|
+
throw _context14.t0;
|
|
5692
5717
|
case 17:
|
|
5693
5718
|
throw new DivaError('Error while getting organization', {
|
|
5694
5719
|
code: 'CORE_0001',
|
|
5695
|
-
cause:
|
|
5720
|
+
cause: _context14.t0
|
|
5696
5721
|
});
|
|
5697
5722
|
case 18:
|
|
5698
5723
|
case "end":
|
|
5699
|
-
return
|
|
5724
|
+
return _context14.stop();
|
|
5700
5725
|
}
|
|
5701
|
-
},
|
|
5726
|
+
}, _callee14, this, [[1, 13]]);
|
|
5702
5727
|
}));
|
|
5703
|
-
function getOrganizationParentByType(
|
|
5728
|
+
function getOrganizationParentByType(_x24, _x25) {
|
|
5704
5729
|
return _getOrganizationParentByType.apply(this, arguments);
|
|
5705
5730
|
}
|
|
5706
5731
|
return getOrganizationParentByType;
|
|
@@ -5708,10 +5733,10 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5708
5733
|
}, {
|
|
5709
5734
|
key: "getRetailerLocationsForArea",
|
|
5710
5735
|
value: function () {
|
|
5711
|
-
var _getRetailerLocationsForArea = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
5736
|
+
var _getRetailerLocationsForArea = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(organizationId, location, radius) {
|
|
5712
5737
|
var url, response;
|
|
5713
|
-
return _regeneratorRuntime.wrap(function
|
|
5714
|
-
while (1) switch (
|
|
5738
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
5739
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
5715
5740
|
case 0:
|
|
5716
5741
|
url = new URL("".concat(this.authService, "/organizations/").concat(organizationId, "/retailer-locations"));
|
|
5717
5742
|
if (location) {
|
|
@@ -5719,43 +5744,43 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5719
5744
|
url.searchParams.append('lng', String(location.lng()));
|
|
5720
5745
|
}
|
|
5721
5746
|
url.searchParams.append('radius', radius);
|
|
5722
|
-
|
|
5723
|
-
|
|
5747
|
+
_context15.prev = 3;
|
|
5748
|
+
_context15.next = 6;
|
|
5724
5749
|
return this.fetch({
|
|
5725
5750
|
url: url.toString(),
|
|
5726
5751
|
jwt: this.jwt
|
|
5727
5752
|
});
|
|
5728
5753
|
case 6:
|
|
5729
|
-
response =
|
|
5754
|
+
response = _context15.sent;
|
|
5730
5755
|
if (!response.ok) {
|
|
5731
|
-
|
|
5756
|
+
_context15.next = 9;
|
|
5732
5757
|
break;
|
|
5733
5758
|
}
|
|
5734
|
-
return
|
|
5759
|
+
return _context15.abrupt("return", response.json());
|
|
5735
5760
|
case 9:
|
|
5736
5761
|
throw new DivaError("Error from server while searching retailer locations. HTTP status: ".concat(response.status), {
|
|
5737
5762
|
code: 'CORE_0001'
|
|
5738
5763
|
});
|
|
5739
5764
|
case 12:
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
if (!(
|
|
5743
|
-
|
|
5765
|
+
_context15.prev = 12;
|
|
5766
|
+
_context15.t0 = _context15["catch"](3);
|
|
5767
|
+
if (!(_context15.t0 instanceof DivaError)) {
|
|
5768
|
+
_context15.next = 16;
|
|
5744
5769
|
break;
|
|
5745
5770
|
}
|
|
5746
|
-
throw
|
|
5771
|
+
throw _context15.t0;
|
|
5747
5772
|
case 16:
|
|
5748
5773
|
throw new DivaError('Error while getting retailer locations', {
|
|
5749
5774
|
code: 'CORE_0001',
|
|
5750
|
-
cause:
|
|
5775
|
+
cause: _context15.t0
|
|
5751
5776
|
});
|
|
5752
5777
|
case 17:
|
|
5753
5778
|
case "end":
|
|
5754
|
-
return
|
|
5779
|
+
return _context15.stop();
|
|
5755
5780
|
}
|
|
5756
|
-
},
|
|
5781
|
+
}, _callee15, this, [[3, 12]]);
|
|
5757
5782
|
}));
|
|
5758
|
-
function getRetailerLocationsForArea(_x27, _x28
|
|
5783
|
+
function getRetailerLocationsForArea(_x26, _x27, _x28) {
|
|
5759
5784
|
return _getRetailerLocationsForArea.apply(this, arguments);
|
|
5760
5785
|
}
|
|
5761
5786
|
return getRetailerLocationsForArea;
|
|
@@ -5771,10 +5796,10 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5771
5796
|
};
|
|
5772
5797
|
return fetch;
|
|
5773
5798
|
}(/*#__PURE__*/function () {
|
|
5774
|
-
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
5799
|
+
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(_ref6) {
|
|
5775
5800
|
var url, _ref6$method, method, jwt, body, headers;
|
|
5776
|
-
return _regeneratorRuntime.wrap(function
|
|
5777
|
-
while (1) switch (
|
|
5801
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context16) {
|
|
5802
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
5778
5803
|
case 0:
|
|
5779
5804
|
url = _ref6.url, _ref6$method = _ref6.method, method = _ref6$method === void 0 ? 'GET' : _ref6$method, jwt = _ref6.jwt, body = _ref6.body;
|
|
5780
5805
|
headers = {
|
|
@@ -5784,21 +5809,21 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5784
5809
|
if (jwt) {
|
|
5785
5810
|
headers.Authorization = "Bearer ".concat(jwt);
|
|
5786
5811
|
}
|
|
5787
|
-
|
|
5812
|
+
_context16.next = 5;
|
|
5788
5813
|
return fetch(url, {
|
|
5789
5814
|
method: method,
|
|
5790
5815
|
headers: headers,
|
|
5791
5816
|
body: body ? JSON.stringify(body) : undefined
|
|
5792
5817
|
});
|
|
5793
5818
|
case 5:
|
|
5794
|
-
return
|
|
5819
|
+
return _context16.abrupt("return", _context16.sent);
|
|
5795
5820
|
case 6:
|
|
5796
5821
|
case "end":
|
|
5797
|
-
return
|
|
5822
|
+
return _context16.stop();
|
|
5798
5823
|
}
|
|
5799
|
-
},
|
|
5824
|
+
}, _callee16);
|
|
5800
5825
|
}));
|
|
5801
|
-
return function (
|
|
5826
|
+
return function (_x29) {
|
|
5802
5827
|
return _ref7.apply(this, arguments);
|
|
5803
5828
|
};
|
|
5804
5829
|
}())
|
|
@@ -5967,7 +5992,7 @@ var OrganizationHandler = /*#__PURE__*/function () {
|
|
|
5967
5992
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
5968
5993
|
while (1) switch (_context5.prev = _context5.next) {
|
|
5969
5994
|
case 0:
|
|
5970
|
-
return _context5.abrupt("return", this.apiHandler.
|
|
5995
|
+
return _context5.abrupt("return", this.apiHandler.fetchOrganization(organizationId));
|
|
5971
5996
|
case 1:
|
|
5972
5997
|
case "end":
|
|
5973
5998
|
return _context5.stop();
|
|
@@ -6138,17 +6163,17 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6138
6163
|
return getMediaById;
|
|
6139
6164
|
}()
|
|
6140
6165
|
}, {
|
|
6141
|
-
key: "
|
|
6166
|
+
key: "getMediaItemByRefId",
|
|
6142
6167
|
value: function () {
|
|
6143
|
-
var
|
|
6168
|
+
var _getMediaItemByRefId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(refid) {
|
|
6144
6169
|
var fullUrl, res, resData;
|
|
6145
6170
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
6146
6171
|
while (1) switch (_context3.prev = _context3.next) {
|
|
6147
6172
|
case 0:
|
|
6148
|
-
fullUrl = this.mediaService + '/
|
|
6173
|
+
fullUrl = this.mediaService + '/v1/mediaitemref/' + refid + '/mediaitem';
|
|
6149
6174
|
_context3.prev = 1;
|
|
6150
6175
|
_context3.next = 4;
|
|
6151
|
-
return fetch(
|
|
6176
|
+
return fetch(fullUrl, {
|
|
6152
6177
|
headers: {
|
|
6153
6178
|
Authorization: 'Bearer ' + this.jwt,
|
|
6154
6179
|
'Content-Type': 'application/json'
|
|
@@ -6160,27 +6185,72 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6160
6185
|
return res.json();
|
|
6161
6186
|
case 7:
|
|
6162
6187
|
resData = _context3.sent;
|
|
6163
|
-
|
|
6164
|
-
|
|
6188
|
+
if (!res.ok) {
|
|
6189
|
+
_context3.next = 10;
|
|
6190
|
+
break;
|
|
6191
|
+
}
|
|
6192
|
+
return _context3.abrupt("return", resData);
|
|
6165
6193
|
case 10:
|
|
6166
|
-
|
|
6194
|
+
throw new Error(resData.error || 'Could not fetch mediaItem');
|
|
6195
|
+
case 13:
|
|
6196
|
+
_context3.prev = 13;
|
|
6167
6197
|
_context3.t0 = _context3["catch"](1);
|
|
6198
|
+
throw new Error("Could not fetch mediaItem: ".concat(_context3.t0.message));
|
|
6199
|
+
case 16:
|
|
6200
|
+
case "end":
|
|
6201
|
+
return _context3.stop();
|
|
6202
|
+
}
|
|
6203
|
+
}, _callee3, this, [[1, 13]]);
|
|
6204
|
+
}));
|
|
6205
|
+
function getMediaItemByRefId(_x3) {
|
|
6206
|
+
return _getMediaItemByRefId.apply(this, arguments);
|
|
6207
|
+
}
|
|
6208
|
+
return getMediaItemByRefId;
|
|
6209
|
+
}()
|
|
6210
|
+
}, {
|
|
6211
|
+
key: "getHQRenderScriptById",
|
|
6212
|
+
value: function () {
|
|
6213
|
+
var _getHQRenderScriptById = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(id) {
|
|
6214
|
+
var fullUrl, res, resData;
|
|
6215
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
6216
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
6217
|
+
case 0:
|
|
6218
|
+
fullUrl = this.mediaService + '/hqrenderscripts';
|
|
6219
|
+
_context4.prev = 1;
|
|
6220
|
+
_context4.next = 4;
|
|
6221
|
+
return fetch("".concat(fullUrl, "/").concat(id), {
|
|
6222
|
+
headers: {
|
|
6223
|
+
Authorization: 'Bearer ' + this.jwt,
|
|
6224
|
+
'Content-Type': 'application/json'
|
|
6225
|
+
}
|
|
6226
|
+
});
|
|
6227
|
+
case 4:
|
|
6228
|
+
res = _context4.sent;
|
|
6229
|
+
_context4.next = 7;
|
|
6230
|
+
return res.json();
|
|
6231
|
+
case 7:
|
|
6232
|
+
resData = _context4.sent;
|
|
6233
|
+
_context4.next = 13;
|
|
6234
|
+
break;
|
|
6235
|
+
case 10:
|
|
6236
|
+
_context4.prev = 10;
|
|
6237
|
+
_context4.t0 = _context4["catch"](1);
|
|
6168
6238
|
throw new Error('Could not fetch mediaItem');
|
|
6169
6239
|
case 13:
|
|
6170
6240
|
if (!res.ok) {
|
|
6171
|
-
|
|
6241
|
+
_context4.next = 15;
|
|
6172
6242
|
break;
|
|
6173
6243
|
}
|
|
6174
|
-
return
|
|
6244
|
+
return _context4.abrupt("return", resData);
|
|
6175
6245
|
case 15:
|
|
6176
6246
|
throw new Error(resData.error);
|
|
6177
6247
|
case 16:
|
|
6178
6248
|
case "end":
|
|
6179
|
-
return
|
|
6249
|
+
return _context4.stop();
|
|
6180
6250
|
}
|
|
6181
|
-
},
|
|
6251
|
+
}, _callee4, this, [[1, 10]]);
|
|
6182
6252
|
}));
|
|
6183
|
-
function getHQRenderScriptById(
|
|
6253
|
+
function getHQRenderScriptById(_x4) {
|
|
6184
6254
|
return _getHQRenderScriptById.apply(this, arguments);
|
|
6185
6255
|
}
|
|
6186
6256
|
return getHQRenderScriptById;
|
|
@@ -6188,10 +6258,10 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6188
6258
|
}, {
|
|
6189
6259
|
key: "getRooms",
|
|
6190
6260
|
value: function () {
|
|
6191
|
-
var _getRooms = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6261
|
+
var _getRooms = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(id, mainCategory, style, name) {
|
|
6192
6262
|
var fullUrl, filterParts, filter, res, resData;
|
|
6193
|
-
return _regeneratorRuntime.wrap(function
|
|
6194
|
-
while (1) switch (
|
|
6263
|
+
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
6264
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
6195
6265
|
case 0:
|
|
6196
6266
|
fullUrl = new URL(this.mediaService + '/rooms');
|
|
6197
6267
|
fullUrl.searchParams.append('limit', '20');
|
|
@@ -6214,8 +6284,8 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6214
6284
|
if (filter) {
|
|
6215
6285
|
fullUrl.searchParams.append('filter', encodeURIComponent(filter));
|
|
6216
6286
|
}
|
|
6217
|
-
|
|
6218
|
-
|
|
6287
|
+
_context5.prev = 7;
|
|
6288
|
+
_context5.next = 10;
|
|
6219
6289
|
return fetch(fullUrl.toString(), {
|
|
6220
6290
|
headers: {
|
|
6221
6291
|
Authorization: 'Bearer ' + this.jwt,
|
|
@@ -6223,32 +6293,32 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6223
6293
|
}
|
|
6224
6294
|
});
|
|
6225
6295
|
case 10:
|
|
6226
|
-
res =
|
|
6227
|
-
|
|
6296
|
+
res = _context5.sent;
|
|
6297
|
+
_context5.next = 13;
|
|
6228
6298
|
return res.json();
|
|
6229
6299
|
case 13:
|
|
6230
|
-
resData =
|
|
6231
|
-
|
|
6300
|
+
resData = _context5.sent;
|
|
6301
|
+
_context5.next = 19;
|
|
6232
6302
|
break;
|
|
6233
6303
|
case 16:
|
|
6234
|
-
|
|
6235
|
-
|
|
6304
|
+
_context5.prev = 16;
|
|
6305
|
+
_context5.t0 = _context5["catch"](7);
|
|
6236
6306
|
throw new Error('Could not get rooms');
|
|
6237
6307
|
case 19:
|
|
6238
6308
|
if (!res.ok) {
|
|
6239
|
-
|
|
6309
|
+
_context5.next = 21;
|
|
6240
6310
|
break;
|
|
6241
6311
|
}
|
|
6242
|
-
return
|
|
6312
|
+
return _context5.abrupt("return", resData.data);
|
|
6243
6313
|
case 21:
|
|
6244
6314
|
throw new Error(resData.error);
|
|
6245
6315
|
case 22:
|
|
6246
6316
|
case "end":
|
|
6247
|
-
return
|
|
6317
|
+
return _context5.stop();
|
|
6248
6318
|
}
|
|
6249
|
-
},
|
|
6319
|
+
}, _callee5, this, [[7, 16]]);
|
|
6250
6320
|
}));
|
|
6251
|
-
function getRooms(
|
|
6321
|
+
function getRooms(_x5, _x6, _x7, _x8) {
|
|
6252
6322
|
return _getRooms.apply(this, arguments);
|
|
6253
6323
|
}
|
|
6254
6324
|
return getRooms;
|
|
@@ -6256,20 +6326,17 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6256
6326
|
}, {
|
|
6257
6327
|
key: "getRoomsNew",
|
|
6258
6328
|
value: function () {
|
|
6259
|
-
var _getRoomsNew = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6329
|
+
var _getRoomsNew = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(id, mainCategory, organizationId) {
|
|
6260
6330
|
var fullUrl, filterParts, filter, res, resData;
|
|
6261
|
-
return _regeneratorRuntime.wrap(function
|
|
6262
|
-
while (1) switch (
|
|
6331
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
6332
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
6263
6333
|
case 0:
|
|
6264
6334
|
fullUrl = new URL(this.mediaService + '/rooms');
|
|
6265
|
-
fullUrl.searchParams.append('limit', '
|
|
6335
|
+
fullUrl.searchParams.append('limit', '1000');
|
|
6266
6336
|
fullUrl.searchParams.append('skip', '0');
|
|
6267
6337
|
if (organizationId) {
|
|
6268
6338
|
fullUrl.searchParams.append('organizationId', organizationId);
|
|
6269
6339
|
}
|
|
6270
|
-
if (hideStandardRooms) {
|
|
6271
|
-
fullUrl.searchParams.append('hideStandardRooms', hideStandardRooms.toString());
|
|
6272
|
-
}
|
|
6273
6340
|
filterParts = [];
|
|
6274
6341
|
if (id) {
|
|
6275
6342
|
filterParts.push("+[{_id,eq,".concat(id, "},{variants.id,eq,").concat(id, "}]"));
|
|
@@ -6282,41 +6349,41 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6282
6349
|
if (filter) {
|
|
6283
6350
|
fullUrl.searchParams.append('filter', encodeURIComponent(filter));
|
|
6284
6351
|
}
|
|
6285
|
-
|
|
6286
|
-
|
|
6352
|
+
_context6.prev = 8;
|
|
6353
|
+
_context6.next = 11;
|
|
6287
6354
|
return fetch(fullUrl.toString(), {
|
|
6288
6355
|
headers: {
|
|
6289
6356
|
Authorization: 'Bearer ' + this.jwt,
|
|
6290
6357
|
'Content-Type': 'application/json'
|
|
6291
6358
|
}
|
|
6292
6359
|
});
|
|
6293
|
-
case
|
|
6294
|
-
res =
|
|
6295
|
-
|
|
6360
|
+
case 11:
|
|
6361
|
+
res = _context6.sent;
|
|
6362
|
+
_context6.next = 14;
|
|
6296
6363
|
return res.json();
|
|
6297
|
-
case
|
|
6298
|
-
resData =
|
|
6299
|
-
|
|
6364
|
+
case 14:
|
|
6365
|
+
resData = _context6.sent;
|
|
6366
|
+
_context6.next = 20;
|
|
6300
6367
|
break;
|
|
6301
|
-
case
|
|
6302
|
-
|
|
6303
|
-
|
|
6368
|
+
case 17:
|
|
6369
|
+
_context6.prev = 17;
|
|
6370
|
+
_context6.t0 = _context6["catch"](8);
|
|
6304
6371
|
throw new Error('Could not get rooms');
|
|
6305
|
-
case
|
|
6372
|
+
case 20:
|
|
6306
6373
|
if (!res.ok) {
|
|
6307
|
-
|
|
6374
|
+
_context6.next = 22;
|
|
6308
6375
|
break;
|
|
6309
6376
|
}
|
|
6310
|
-
return
|
|
6311
|
-
case
|
|
6377
|
+
return _context6.abrupt("return", resData.data);
|
|
6378
|
+
case 22:
|
|
6312
6379
|
throw new Error(resData.error);
|
|
6313
|
-
case
|
|
6380
|
+
case 23:
|
|
6314
6381
|
case "end":
|
|
6315
|
-
return
|
|
6382
|
+
return _context6.stop();
|
|
6316
6383
|
}
|
|
6317
|
-
},
|
|
6384
|
+
}, _callee6, this, [[8, 17]]);
|
|
6318
6385
|
}));
|
|
6319
|
-
function getRoomsNew(
|
|
6386
|
+
function getRoomsNew(_x9, _x10, _x11) {
|
|
6320
6387
|
return _getRoomsNew.apply(this, arguments);
|
|
6321
6388
|
}
|
|
6322
6389
|
return getRoomsNew;
|
|
@@ -6324,17 +6391,14 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6324
6391
|
}, {
|
|
6325
6392
|
key: "getRoomsGrouped",
|
|
6326
6393
|
value: function () {
|
|
6327
|
-
var _getRoomsGrouped = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6394
|
+
var _getRoomsGrouped = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(id, mainCategory, style, organizationId) {
|
|
6328
6395
|
var fullUrl, filterParts, filter, res, resData;
|
|
6329
|
-
return _regeneratorRuntime.wrap(function
|
|
6330
|
-
while (1) switch (
|
|
6396
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
6397
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
6331
6398
|
case 0:
|
|
6332
6399
|
fullUrl = new URL(this.mediaService + '/rooms');
|
|
6333
6400
|
if (organizationId) {
|
|
6334
6401
|
fullUrl = new URL(this.mediaService + "/rooms/".concat(organizationId, "/grouped"));
|
|
6335
|
-
if (hideStandardRooms) {
|
|
6336
|
-
fullUrl.searchParams.append('hideStandardRooms', hideStandardRooms.toString());
|
|
6337
|
-
}
|
|
6338
6402
|
}
|
|
6339
6403
|
fullUrl.searchParams.append('limit', '20');
|
|
6340
6404
|
fullUrl.searchParams.append('skip', '0');
|
|
@@ -6353,8 +6417,8 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6353
6417
|
if (filter) {
|
|
6354
6418
|
fullUrl.searchParams.append('filter', encodeURIComponent(filter));
|
|
6355
6419
|
}
|
|
6356
|
-
|
|
6357
|
-
|
|
6420
|
+
_context7.prev = 8;
|
|
6421
|
+
_context7.next = 11;
|
|
6358
6422
|
return fetch(fullUrl.toString(), {
|
|
6359
6423
|
headers: {
|
|
6360
6424
|
Authorization: 'Bearer ' + this.jwt,
|
|
@@ -6362,32 +6426,32 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6362
6426
|
}
|
|
6363
6427
|
});
|
|
6364
6428
|
case 11:
|
|
6365
|
-
res =
|
|
6366
|
-
|
|
6429
|
+
res = _context7.sent;
|
|
6430
|
+
_context7.next = 14;
|
|
6367
6431
|
return res.json();
|
|
6368
6432
|
case 14:
|
|
6369
|
-
resData =
|
|
6370
|
-
|
|
6433
|
+
resData = _context7.sent;
|
|
6434
|
+
_context7.next = 20;
|
|
6371
6435
|
break;
|
|
6372
6436
|
case 17:
|
|
6373
|
-
|
|
6374
|
-
|
|
6437
|
+
_context7.prev = 17;
|
|
6438
|
+
_context7.t0 = _context7["catch"](8);
|
|
6375
6439
|
throw new Error('Could not get rooms');
|
|
6376
6440
|
case 20:
|
|
6377
6441
|
if (!res.ok) {
|
|
6378
|
-
|
|
6442
|
+
_context7.next = 22;
|
|
6379
6443
|
break;
|
|
6380
6444
|
}
|
|
6381
|
-
return
|
|
6445
|
+
return _context7.abrupt("return", organizationId ? resData : resData.data);
|
|
6382
6446
|
case 22:
|
|
6383
6447
|
throw new Error(resData.error);
|
|
6384
6448
|
case 23:
|
|
6385
6449
|
case "end":
|
|
6386
|
-
return
|
|
6450
|
+
return _context7.stop();
|
|
6387
6451
|
}
|
|
6388
|
-
},
|
|
6452
|
+
}, _callee7, this, [[8, 17]]);
|
|
6389
6453
|
}));
|
|
6390
|
-
function getRoomsGrouped(_x12, _x13, _x14, _x15
|
|
6454
|
+
function getRoomsGrouped(_x12, _x13, _x14, _x15) {
|
|
6391
6455
|
return _getRoomsGrouped.apply(this, arguments);
|
|
6392
6456
|
}
|
|
6393
6457
|
return getRoomsGrouped;
|
|
@@ -6395,15 +6459,15 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6395
6459
|
}, {
|
|
6396
6460
|
key: "getRoomColors",
|
|
6397
6461
|
value: function () {
|
|
6398
|
-
var _getRoomColors = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6462
|
+
var _getRoomColors = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(name) {
|
|
6399
6463
|
var fullUrl, res, resData;
|
|
6400
|
-
return _regeneratorRuntime.wrap(function
|
|
6401
|
-
while (1) switch (
|
|
6464
|
+
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
6465
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
6402
6466
|
case 0:
|
|
6403
6467
|
fullUrl = this.mediaService + '/rooms/' + name + '/colors';
|
|
6404
6468
|
resData = [];
|
|
6405
|
-
|
|
6406
|
-
|
|
6469
|
+
_context8.prev = 2;
|
|
6470
|
+
_context8.next = 5;
|
|
6407
6471
|
return fetch(fullUrl, {
|
|
6408
6472
|
headers: {
|
|
6409
6473
|
Authorization: 'Bearer ' + this.jwt,
|
|
@@ -6411,32 +6475,32 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6411
6475
|
}
|
|
6412
6476
|
});
|
|
6413
6477
|
case 5:
|
|
6414
|
-
res =
|
|
6415
|
-
|
|
6478
|
+
res = _context8.sent;
|
|
6479
|
+
_context8.next = 8;
|
|
6416
6480
|
return res.json();
|
|
6417
6481
|
case 8:
|
|
6418
|
-
resData =
|
|
6419
|
-
|
|
6482
|
+
resData = _context8.sent;
|
|
6483
|
+
_context8.next = 14;
|
|
6420
6484
|
break;
|
|
6421
6485
|
case 11:
|
|
6422
|
-
|
|
6423
|
-
|
|
6486
|
+
_context8.prev = 11;
|
|
6487
|
+
_context8.t0 = _context8["catch"](2);
|
|
6424
6488
|
throw new Error('Could not get room variants');
|
|
6425
6489
|
case 14:
|
|
6426
6490
|
if (!res.ok) {
|
|
6427
|
-
|
|
6491
|
+
_context8.next = 16;
|
|
6428
6492
|
break;
|
|
6429
6493
|
}
|
|
6430
|
-
return
|
|
6494
|
+
return _context8.abrupt("return", resData);
|
|
6431
6495
|
case 16:
|
|
6432
6496
|
throw new Error(resData.error);
|
|
6433
6497
|
case 17:
|
|
6434
6498
|
case "end":
|
|
6435
|
-
return
|
|
6499
|
+
return _context8.stop();
|
|
6436
6500
|
}
|
|
6437
|
-
},
|
|
6501
|
+
}, _callee8, this, [[2, 11]]);
|
|
6438
6502
|
}));
|
|
6439
|
-
function getRoomColors(
|
|
6503
|
+
function getRoomColors(_x16) {
|
|
6440
6504
|
return _getRoomColors.apply(this, arguments);
|
|
6441
6505
|
}
|
|
6442
6506
|
return getRoomColors;
|
|
@@ -6444,15 +6508,15 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6444
6508
|
}, {
|
|
6445
6509
|
key: "getRoomVariants",
|
|
6446
6510
|
value: function () {
|
|
6447
|
-
var _getRoomVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6511
|
+
var _getRoomVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(id) {
|
|
6448
6512
|
var fullUrl, res, resData;
|
|
6449
|
-
return _regeneratorRuntime.wrap(function
|
|
6450
|
-
while (1) switch (
|
|
6513
|
+
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
6514
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
6451
6515
|
case 0:
|
|
6452
6516
|
fullUrl = this.mediaService + '/rooms/' + id + '/variants';
|
|
6453
6517
|
resData = [];
|
|
6454
|
-
|
|
6455
|
-
|
|
6518
|
+
_context9.prev = 2;
|
|
6519
|
+
_context9.next = 5;
|
|
6456
6520
|
return fetch(fullUrl, {
|
|
6457
6521
|
headers: {
|
|
6458
6522
|
Authorization: 'Bearer ' + this.jwt,
|
|
@@ -6460,32 +6524,32 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6460
6524
|
}
|
|
6461
6525
|
});
|
|
6462
6526
|
case 5:
|
|
6463
|
-
res =
|
|
6464
|
-
|
|
6527
|
+
res = _context9.sent;
|
|
6528
|
+
_context9.next = 8;
|
|
6465
6529
|
return res.json();
|
|
6466
6530
|
case 8:
|
|
6467
|
-
resData =
|
|
6468
|
-
|
|
6531
|
+
resData = _context9.sent;
|
|
6532
|
+
_context9.next = 14;
|
|
6469
6533
|
break;
|
|
6470
6534
|
case 11:
|
|
6471
|
-
|
|
6472
|
-
|
|
6535
|
+
_context9.prev = 11;
|
|
6536
|
+
_context9.t0 = _context9["catch"](2);
|
|
6473
6537
|
throw new Error('Could not get room variants');
|
|
6474
6538
|
case 14:
|
|
6475
6539
|
if (!res.ok) {
|
|
6476
|
-
|
|
6540
|
+
_context9.next = 16;
|
|
6477
6541
|
break;
|
|
6478
6542
|
}
|
|
6479
|
-
return
|
|
6543
|
+
return _context9.abrupt("return", resData);
|
|
6480
6544
|
case 16:
|
|
6481
6545
|
throw new Error(resData.error);
|
|
6482
6546
|
case 17:
|
|
6483
6547
|
case "end":
|
|
6484
|
-
return
|
|
6548
|
+
return _context9.stop();
|
|
6485
6549
|
}
|
|
6486
|
-
},
|
|
6550
|
+
}, _callee9, this, [[2, 11]]);
|
|
6487
6551
|
}));
|
|
6488
|
-
function getRoomVariants(
|
|
6552
|
+
function getRoomVariants(_x17) {
|
|
6489
6553
|
return _getRoomVariants.apply(this, arguments);
|
|
6490
6554
|
}
|
|
6491
6555
|
return getRoomVariants;
|
|
@@ -6493,16 +6557,16 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6493
6557
|
}, {
|
|
6494
6558
|
key: "getRenderPackages",
|
|
6495
6559
|
value: function () {
|
|
6496
|
-
var _getRenderPackages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6560
|
+
var _getRenderPackages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(organizationId) {
|
|
6497
6561
|
var fullUrl, res, resData;
|
|
6498
|
-
return _regeneratorRuntime.wrap(function
|
|
6499
|
-
while (1) switch (
|
|
6562
|
+
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
6563
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
6500
6564
|
case 0:
|
|
6501
6565
|
fullUrl = new URL(this.mediaService + '/renderpackages');
|
|
6502
6566
|
if (organizationId) fullUrl.searchParams.append('organizationId', organizationId);
|
|
6503
6567
|
fullUrl.searchParams.append('sort', encodeURIComponent('{position}'));
|
|
6504
|
-
|
|
6505
|
-
|
|
6568
|
+
_context10.prev = 3;
|
|
6569
|
+
_context10.next = 6;
|
|
6506
6570
|
return fetch(fullUrl, {
|
|
6507
6571
|
headers: {
|
|
6508
6572
|
Authorization: 'Bearer ' + this.jwt,
|
|
@@ -6510,32 +6574,32 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6510
6574
|
}
|
|
6511
6575
|
});
|
|
6512
6576
|
case 6:
|
|
6513
|
-
res =
|
|
6514
|
-
|
|
6577
|
+
res = _context10.sent;
|
|
6578
|
+
_context10.next = 9;
|
|
6515
6579
|
return res.json();
|
|
6516
6580
|
case 9:
|
|
6517
|
-
resData =
|
|
6518
|
-
|
|
6581
|
+
resData = _context10.sent;
|
|
6582
|
+
_context10.next = 15;
|
|
6519
6583
|
break;
|
|
6520
6584
|
case 12:
|
|
6521
|
-
|
|
6522
|
-
|
|
6585
|
+
_context10.prev = 12;
|
|
6586
|
+
_context10.t0 = _context10["catch"](3);
|
|
6523
6587
|
throw new Error('Could not get render packages');
|
|
6524
6588
|
case 15:
|
|
6525
6589
|
if (!res.ok) {
|
|
6526
|
-
|
|
6590
|
+
_context10.next = 17;
|
|
6527
6591
|
break;
|
|
6528
6592
|
}
|
|
6529
|
-
return
|
|
6593
|
+
return _context10.abrupt("return", resData);
|
|
6530
6594
|
case 17:
|
|
6531
6595
|
throw new Error(resData.error);
|
|
6532
6596
|
case 18:
|
|
6533
6597
|
case "end":
|
|
6534
|
-
return
|
|
6598
|
+
return _context10.stop();
|
|
6535
6599
|
}
|
|
6536
|
-
},
|
|
6600
|
+
}, _callee10, this, [[3, 12]]);
|
|
6537
6601
|
}));
|
|
6538
|
-
function getRenderPackages(
|
|
6602
|
+
function getRenderPackages(_x18) {
|
|
6539
6603
|
return _getRenderPackages.apply(this, arguments);
|
|
6540
6604
|
}
|
|
6541
6605
|
return getRenderPackages;
|
|
@@ -9530,7 +9594,7 @@ var SideMenu$1 = observer(SideMenu);
|
|
|
9530
9594
|
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
9595
|
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
9596
|
var LazyModals$1 = /*#__PURE__*/React.lazy(function () {
|
|
9533
|
-
return import('./ModalsWrapper-
|
|
9597
|
+
return import('./ModalsWrapper-b3779fb1.js');
|
|
9534
9598
|
});
|
|
9535
9599
|
function Fullscreen() {
|
|
9536
9600
|
var _useDivaCoreContext = useDivaCoreContext(),
|
|
@@ -9984,10 +10048,10 @@ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
|
|
|
9984
10048
|
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
10049
|
var LOG$2 = getLogger('Framework', 'Root');
|
|
9986
10050
|
var LazyAuth = /*#__PURE__*/React.lazy(function () {
|
|
9987
|
-
return import('./index-
|
|
10051
|
+
return import('./index-07cb65cf.js');
|
|
9988
10052
|
});
|
|
9989
10053
|
var LazyModals = /*#__PURE__*/React.lazy(function () {
|
|
9990
|
-
return import('./ModalsWrapper-
|
|
10054
|
+
return import('./ModalsWrapper-b3779fb1.js');
|
|
9991
10055
|
});
|
|
9992
10056
|
function ContentComponent() {
|
|
9993
10057
|
var context = useDivaCoreContext();
|
|
@@ -10976,4 +11040,4 @@ LOG.startTransaction({
|
|
|
10976
11040
|
});
|
|
10977
11041
|
window.DIVA_VERSION = "v".concat(process.env.VERSION);
|
|
10978
11042
|
|
|
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,
|
|
11043
|
+
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, useDivaCoreContext as u };
|