@crystaldesign/diva-core 25.4.0-beta.3 → 25.4.0-beta.30
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-b818dd4f.js → ModalsWrapper-17e2282f.js} +4 -16
- package/build/esm/{index-ded2933f.js → index-5635e73a.js} +1 -1
- package/build/esm/{index-63d33033.js → index-6787cdc0.js} +171 -132
- package/build/esm/index.js +1 -1
- package/build/types/core/src/elements/Modal/index.d.ts.map +1 -1
- package/build/types/core/src/externalTypes.d.ts +2 -0
- package/build/types/core/src/externalTypes.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/store/ConfigurationStore.d.ts.map +1 -1
- package/build/umd/126.diva-core.umd.min.js +2 -0
- package/build/umd/126.diva-core.umd.min.js.LICENSE.txt +1 -0
- 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/146.diva-core.umd.min.js +2 -0
- package/build/umd/146.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/{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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as styleInject, u as useDivaCoreContext } from './index-
|
|
1
|
+
import { i as styleInject, u as useDivaCoreContext } from './index-6787cdc0.js';
|
|
2
2
|
import { useState, useEffect, useCallback } from 'react';
|
|
3
3
|
import { observer } from 'mobx-react-lite';
|
|
4
4
|
import Button from '@mui/material/Button';
|
|
@@ -89,7 +89,7 @@ var Progress = function Progress(_ref) {
|
|
|
89
89
|
var Progress$1 = observer(Progress);
|
|
90
90
|
|
|
91
91
|
function Modal() {
|
|
92
|
-
var _pureModal$actions;
|
|
92
|
+
var _pureModal$actions, _pureModal$actions2;
|
|
93
93
|
var _useDivaCoreContext = useDivaCoreContext(),
|
|
94
94
|
contentStore = _useDivaCoreContext.contentStore;
|
|
95
95
|
var _useTranslation = useTranslation(),
|
|
@@ -114,18 +114,6 @@ function Modal() {
|
|
|
114
114
|
}
|
|
115
115
|
modal === null || modal === void 0 || (_modal$callback3 = modal.callback) === null || _modal$callback3 === void 0 || _modal$callback3.call(modal, id);
|
|
116
116
|
};
|
|
117
|
-
var escFunction = useCallback(function (event) {
|
|
118
|
-
if (!contentStore.modal) return;
|
|
119
|
-
if (event.key === 'Escape') {
|
|
120
|
-
onReject();
|
|
121
|
-
}
|
|
122
|
-
}, []);
|
|
123
|
-
useEffect(function () {
|
|
124
|
-
document.addEventListener('keydown', escFunction, false);
|
|
125
|
-
return function () {
|
|
126
|
-
document.removeEventListener('keydown', escFunction, false);
|
|
127
|
-
};
|
|
128
|
-
}, []);
|
|
129
117
|
function tryDecodeURIComponent(val) {
|
|
130
118
|
try {
|
|
131
119
|
return decodeURIComponent(val);
|
|
@@ -181,7 +169,7 @@ function Modal() {
|
|
|
181
169
|
id: "diva-dialog-submitbtn",
|
|
182
170
|
children: typeof pureModal.accept == 'string' ? t(pureModal.accept) : t('modal.accept')
|
|
183
171
|
})]
|
|
184
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
172
|
+
}), !!(pureModal.image || pureModal.progress !== undefined || (_pureModal$actions = pureModal.actions) !== null && _pureModal$actions !== void 0 && _pureModal$actions.length) && /*#__PURE__*/jsxs("div", {
|
|
185
173
|
style: {
|
|
186
174
|
margin: 10
|
|
187
175
|
},
|
|
@@ -192,7 +180,7 @@ function Modal() {
|
|
|
192
180
|
}
|
|
193
181
|
}), pureModal.progress !== undefined && /*#__PURE__*/jsx(Progress$1, {
|
|
194
182
|
progress: pureModal.progress
|
|
195
|
-
}), (_pureModal$
|
|
183
|
+
}), (_pureModal$actions2 = pureModal.actions) === null || _pureModal$actions2 === void 0 ? void 0 : _pureModal$actions2.map(function (a) {
|
|
196
184
|
var _a$variant;
|
|
197
185
|
return /*#__PURE__*/jsx(Button, {
|
|
198
186
|
fullWidth: true,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as useDivaCoreContext, B as Button, s as socialButton, g as google, m as microsoft, a as getLogger, e as error, b as separator, I as Input, r as resetInput, l as link, c as success, d as auth, f as loginBox, h as logoContainer } from './index-
|
|
1
|
+
import { u as useDivaCoreContext, B as Button, s as socialButton, g as google, m as microsoft, a as getLogger, e as error, b as separator, I as Input, r as resetInput, l as link, c as success, d as auth, f as loginBox, h as logoContainer } from './index-6787cdc0.js';
|
|
2
2
|
import { useState, useRef, useEffect, useMemo } from 'react';
|
|
3
3
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
4
4
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
@@ -44,7 +44,7 @@ import { actions } from '@storybook/addon-actions';
|
|
|
44
44
|
import * as Styles from '@mui/styles';
|
|
45
45
|
|
|
46
46
|
(function() {
|
|
47
|
-
const env = {"STAGE":"production","VERSION":"25.4.0-beta.
|
|
47
|
+
const env = {"STAGE":"production","VERSION":"25.4.0-beta.30"};
|
|
48
48
|
try {
|
|
49
49
|
if (process) {
|
|
50
50
|
process.env = Object.assign({}, process.env);
|
|
@@ -876,7 +876,7 @@ var ConfigurationStore = /*#__PURE__*/function () {
|
|
|
876
876
|
}, {
|
|
877
877
|
key: "navigation",
|
|
878
878
|
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;
|
|
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$root$dataStore$, _this$_configuration26;
|
|
880
880
|
return {
|
|
881
881
|
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
882
|
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 +895,9 @@ var ConfigurationStore = /*#__PURE__*/function () {
|
|
|
895
895
|
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
896
|
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
897
|
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) {
|
|
898
|
+
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.find(function (c) {
|
|
899
899
|
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
|
|
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
901
|
};
|
|
902
902
|
}
|
|
903
903
|
}, {
|
|
@@ -1000,14 +1000,14 @@ var ConfigurationStore = /*#__PURE__*/function () {
|
|
|
1000
1000
|
get: function get() {
|
|
1001
1001
|
var _this$_configuration53;
|
|
1002
1002
|
if ((_this$_configuration53 = this._configuration) !== null && _this$_configuration53 !== void 0 && _this$_configuration53.priceFormat) {
|
|
1003
|
-
var _this$_configuration54, _this$root$dataStore
|
|
1003
|
+
var _this$_configuration54, _this$root$dataStore$2, _this$root$dataStore$3, _this$_configuration55;
|
|
1004
1004
|
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$
|
|
1005
|
+
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
1006
|
});
|
|
1007
1007
|
} else {
|
|
1008
|
-
var _this$root$dataStore$
|
|
1008
|
+
var _this$root$dataStore$4, _this$root$dataStore$5;
|
|
1009
1009
|
return _objectSpread$g(_objectSpread$g({}, DivaUtils.defaultPriceFormat), {}, {
|
|
1010
|
-
currency: (_this$root$dataStore$
|
|
1010
|
+
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
1011
|
});
|
|
1012
1012
|
}
|
|
1013
1013
|
}
|
|
@@ -6138,17 +6138,17 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6138
6138
|
return getMediaById;
|
|
6139
6139
|
}()
|
|
6140
6140
|
}, {
|
|
6141
|
-
key: "
|
|
6141
|
+
key: "getMediaItemByRefId",
|
|
6142
6142
|
value: function () {
|
|
6143
|
-
var
|
|
6143
|
+
var _getMediaItemByRefId = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(refid) {
|
|
6144
6144
|
var fullUrl, res, resData;
|
|
6145
6145
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
6146
6146
|
while (1) switch (_context3.prev = _context3.next) {
|
|
6147
6147
|
case 0:
|
|
6148
|
-
fullUrl = this.mediaService + '/
|
|
6148
|
+
fullUrl = this.mediaService + '/v1/mediaitemref/' + refid + '/mediaitem';
|
|
6149
6149
|
_context3.prev = 1;
|
|
6150
6150
|
_context3.next = 4;
|
|
6151
|
-
return fetch(
|
|
6151
|
+
return fetch(fullUrl, {
|
|
6152
6152
|
headers: {
|
|
6153
6153
|
Authorization: 'Bearer ' + this.jwt,
|
|
6154
6154
|
'Content-Type': 'application/json'
|
|
@@ -6160,27 +6160,72 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6160
6160
|
return res.json();
|
|
6161
6161
|
case 7:
|
|
6162
6162
|
resData = _context3.sent;
|
|
6163
|
-
|
|
6164
|
-
|
|
6163
|
+
if (!res.ok) {
|
|
6164
|
+
_context3.next = 10;
|
|
6165
|
+
break;
|
|
6166
|
+
}
|
|
6167
|
+
return _context3.abrupt("return", resData);
|
|
6165
6168
|
case 10:
|
|
6166
|
-
|
|
6169
|
+
throw new Error(resData.error || 'Could not fetch mediaItem');
|
|
6170
|
+
case 13:
|
|
6171
|
+
_context3.prev = 13;
|
|
6167
6172
|
_context3.t0 = _context3["catch"](1);
|
|
6173
|
+
throw new Error("Could not fetch mediaItem: ".concat(_context3.t0.message));
|
|
6174
|
+
case 16:
|
|
6175
|
+
case "end":
|
|
6176
|
+
return _context3.stop();
|
|
6177
|
+
}
|
|
6178
|
+
}, _callee3, this, [[1, 13]]);
|
|
6179
|
+
}));
|
|
6180
|
+
function getMediaItemByRefId(_x3) {
|
|
6181
|
+
return _getMediaItemByRefId.apply(this, arguments);
|
|
6182
|
+
}
|
|
6183
|
+
return getMediaItemByRefId;
|
|
6184
|
+
}()
|
|
6185
|
+
}, {
|
|
6186
|
+
key: "getHQRenderScriptById",
|
|
6187
|
+
value: function () {
|
|
6188
|
+
var _getHQRenderScriptById = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(id) {
|
|
6189
|
+
var fullUrl, res, resData;
|
|
6190
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
6191
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
6192
|
+
case 0:
|
|
6193
|
+
fullUrl = this.mediaService + '/hqrenderscripts';
|
|
6194
|
+
_context4.prev = 1;
|
|
6195
|
+
_context4.next = 4;
|
|
6196
|
+
return fetch("".concat(fullUrl, "/").concat(id), {
|
|
6197
|
+
headers: {
|
|
6198
|
+
Authorization: 'Bearer ' + this.jwt,
|
|
6199
|
+
'Content-Type': 'application/json'
|
|
6200
|
+
}
|
|
6201
|
+
});
|
|
6202
|
+
case 4:
|
|
6203
|
+
res = _context4.sent;
|
|
6204
|
+
_context4.next = 7;
|
|
6205
|
+
return res.json();
|
|
6206
|
+
case 7:
|
|
6207
|
+
resData = _context4.sent;
|
|
6208
|
+
_context4.next = 13;
|
|
6209
|
+
break;
|
|
6210
|
+
case 10:
|
|
6211
|
+
_context4.prev = 10;
|
|
6212
|
+
_context4.t0 = _context4["catch"](1);
|
|
6168
6213
|
throw new Error('Could not fetch mediaItem');
|
|
6169
6214
|
case 13:
|
|
6170
6215
|
if (!res.ok) {
|
|
6171
|
-
|
|
6216
|
+
_context4.next = 15;
|
|
6172
6217
|
break;
|
|
6173
6218
|
}
|
|
6174
|
-
return
|
|
6219
|
+
return _context4.abrupt("return", resData);
|
|
6175
6220
|
case 15:
|
|
6176
6221
|
throw new Error(resData.error);
|
|
6177
6222
|
case 16:
|
|
6178
6223
|
case "end":
|
|
6179
|
-
return
|
|
6224
|
+
return _context4.stop();
|
|
6180
6225
|
}
|
|
6181
|
-
},
|
|
6226
|
+
}, _callee4, this, [[1, 10]]);
|
|
6182
6227
|
}));
|
|
6183
|
-
function getHQRenderScriptById(
|
|
6228
|
+
function getHQRenderScriptById(_x4) {
|
|
6184
6229
|
return _getHQRenderScriptById.apply(this, arguments);
|
|
6185
6230
|
}
|
|
6186
6231
|
return getHQRenderScriptById;
|
|
@@ -6188,10 +6233,10 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6188
6233
|
}, {
|
|
6189
6234
|
key: "getRooms",
|
|
6190
6235
|
value: function () {
|
|
6191
|
-
var _getRooms = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6236
|
+
var _getRooms = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(id, mainCategory, style, name) {
|
|
6192
6237
|
var fullUrl, filterParts, filter, res, resData;
|
|
6193
|
-
return _regeneratorRuntime.wrap(function
|
|
6194
|
-
while (1) switch (
|
|
6238
|
+
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
6239
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
6195
6240
|
case 0:
|
|
6196
6241
|
fullUrl = new URL(this.mediaService + '/rooms');
|
|
6197
6242
|
fullUrl.searchParams.append('limit', '20');
|
|
@@ -6214,8 +6259,8 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6214
6259
|
if (filter) {
|
|
6215
6260
|
fullUrl.searchParams.append('filter', encodeURIComponent(filter));
|
|
6216
6261
|
}
|
|
6217
|
-
|
|
6218
|
-
|
|
6262
|
+
_context5.prev = 7;
|
|
6263
|
+
_context5.next = 10;
|
|
6219
6264
|
return fetch(fullUrl.toString(), {
|
|
6220
6265
|
headers: {
|
|
6221
6266
|
Authorization: 'Bearer ' + this.jwt,
|
|
@@ -6223,32 +6268,32 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6223
6268
|
}
|
|
6224
6269
|
});
|
|
6225
6270
|
case 10:
|
|
6226
|
-
res =
|
|
6227
|
-
|
|
6271
|
+
res = _context5.sent;
|
|
6272
|
+
_context5.next = 13;
|
|
6228
6273
|
return res.json();
|
|
6229
6274
|
case 13:
|
|
6230
|
-
resData =
|
|
6231
|
-
|
|
6275
|
+
resData = _context5.sent;
|
|
6276
|
+
_context5.next = 19;
|
|
6232
6277
|
break;
|
|
6233
6278
|
case 16:
|
|
6234
|
-
|
|
6235
|
-
|
|
6279
|
+
_context5.prev = 16;
|
|
6280
|
+
_context5.t0 = _context5["catch"](7);
|
|
6236
6281
|
throw new Error('Could not get rooms');
|
|
6237
6282
|
case 19:
|
|
6238
6283
|
if (!res.ok) {
|
|
6239
|
-
|
|
6284
|
+
_context5.next = 21;
|
|
6240
6285
|
break;
|
|
6241
6286
|
}
|
|
6242
|
-
return
|
|
6287
|
+
return _context5.abrupt("return", resData);
|
|
6243
6288
|
case 21:
|
|
6244
6289
|
throw new Error(resData.error);
|
|
6245
6290
|
case 22:
|
|
6246
6291
|
case "end":
|
|
6247
|
-
return
|
|
6292
|
+
return _context5.stop();
|
|
6248
6293
|
}
|
|
6249
|
-
},
|
|
6294
|
+
}, _callee5, this, [[7, 16]]);
|
|
6250
6295
|
}));
|
|
6251
|
-
function getRooms(
|
|
6296
|
+
function getRooms(_x5, _x6, _x7, _x8) {
|
|
6252
6297
|
return _getRooms.apply(this, arguments);
|
|
6253
6298
|
}
|
|
6254
6299
|
return getRooms;
|
|
@@ -6256,20 +6301,17 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6256
6301
|
}, {
|
|
6257
6302
|
key: "getRoomsNew",
|
|
6258
6303
|
value: function () {
|
|
6259
|
-
var _getRoomsNew = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6304
|
+
var _getRoomsNew = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(id, mainCategory, organizationId) {
|
|
6260
6305
|
var fullUrl, filterParts, filter, res, resData;
|
|
6261
|
-
return _regeneratorRuntime.wrap(function
|
|
6262
|
-
while (1) switch (
|
|
6306
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
6307
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
6263
6308
|
case 0:
|
|
6264
6309
|
fullUrl = new URL(this.mediaService + '/rooms');
|
|
6265
|
-
fullUrl.searchParams.append('limit', '
|
|
6310
|
+
fullUrl.searchParams.append('limit', '1000');
|
|
6266
6311
|
fullUrl.searchParams.append('skip', '0');
|
|
6267
6312
|
if (organizationId) {
|
|
6268
6313
|
fullUrl.searchParams.append('organizationId', organizationId);
|
|
6269
6314
|
}
|
|
6270
|
-
if (hideStandardRooms) {
|
|
6271
|
-
fullUrl.searchParams.append('hideStandardRooms', hideStandardRooms.toString());
|
|
6272
|
-
}
|
|
6273
6315
|
filterParts = [];
|
|
6274
6316
|
if (id) {
|
|
6275
6317
|
filterParts.push("+[{_id,eq,".concat(id, "},{variants.id,eq,").concat(id, "}]"));
|
|
@@ -6282,41 +6324,41 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6282
6324
|
if (filter) {
|
|
6283
6325
|
fullUrl.searchParams.append('filter', encodeURIComponent(filter));
|
|
6284
6326
|
}
|
|
6285
|
-
|
|
6286
|
-
|
|
6327
|
+
_context6.prev = 8;
|
|
6328
|
+
_context6.next = 11;
|
|
6287
6329
|
return fetch(fullUrl.toString(), {
|
|
6288
6330
|
headers: {
|
|
6289
6331
|
Authorization: 'Bearer ' + this.jwt,
|
|
6290
6332
|
'Content-Type': 'application/json'
|
|
6291
6333
|
}
|
|
6292
6334
|
});
|
|
6293
|
-
case
|
|
6294
|
-
res =
|
|
6295
|
-
|
|
6335
|
+
case 11:
|
|
6336
|
+
res = _context6.sent;
|
|
6337
|
+
_context6.next = 14;
|
|
6296
6338
|
return res.json();
|
|
6297
|
-
case
|
|
6298
|
-
resData =
|
|
6299
|
-
|
|
6339
|
+
case 14:
|
|
6340
|
+
resData = _context6.sent;
|
|
6341
|
+
_context6.next = 20;
|
|
6300
6342
|
break;
|
|
6301
|
-
case
|
|
6302
|
-
|
|
6303
|
-
|
|
6343
|
+
case 17:
|
|
6344
|
+
_context6.prev = 17;
|
|
6345
|
+
_context6.t0 = _context6["catch"](8);
|
|
6304
6346
|
throw new Error('Could not get rooms');
|
|
6305
|
-
case
|
|
6347
|
+
case 20:
|
|
6306
6348
|
if (!res.ok) {
|
|
6307
|
-
|
|
6349
|
+
_context6.next = 22;
|
|
6308
6350
|
break;
|
|
6309
6351
|
}
|
|
6310
|
-
return
|
|
6311
|
-
case
|
|
6352
|
+
return _context6.abrupt("return", resData);
|
|
6353
|
+
case 22:
|
|
6312
6354
|
throw new Error(resData.error);
|
|
6313
|
-
case
|
|
6355
|
+
case 23:
|
|
6314
6356
|
case "end":
|
|
6315
|
-
return
|
|
6357
|
+
return _context6.stop();
|
|
6316
6358
|
}
|
|
6317
|
-
},
|
|
6359
|
+
}, _callee6, this, [[8, 17]]);
|
|
6318
6360
|
}));
|
|
6319
|
-
function getRoomsNew(
|
|
6361
|
+
function getRoomsNew(_x9, _x10, _x11) {
|
|
6320
6362
|
return _getRoomsNew.apply(this, arguments);
|
|
6321
6363
|
}
|
|
6322
6364
|
return getRoomsNew;
|
|
@@ -6324,17 +6366,14 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6324
6366
|
}, {
|
|
6325
6367
|
key: "getRoomsGrouped",
|
|
6326
6368
|
value: function () {
|
|
6327
|
-
var _getRoomsGrouped = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6369
|
+
var _getRoomsGrouped = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(id, mainCategory, style, organizationId) {
|
|
6328
6370
|
var fullUrl, filterParts, filter, res, resData;
|
|
6329
|
-
return _regeneratorRuntime.wrap(function
|
|
6330
|
-
while (1) switch (
|
|
6371
|
+
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
6372
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
6331
6373
|
case 0:
|
|
6332
6374
|
fullUrl = new URL(this.mediaService + '/rooms');
|
|
6333
6375
|
if (organizationId) {
|
|
6334
6376
|
fullUrl = new URL(this.mediaService + "/rooms/".concat(organizationId, "/grouped"));
|
|
6335
|
-
if (hideStandardRooms) {
|
|
6336
|
-
fullUrl.searchParams.append('hideStandardRooms', hideStandardRooms.toString());
|
|
6337
|
-
}
|
|
6338
6377
|
}
|
|
6339
6378
|
fullUrl.searchParams.append('limit', '20');
|
|
6340
6379
|
fullUrl.searchParams.append('skip', '0');
|
|
@@ -6353,8 +6392,8 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6353
6392
|
if (filter) {
|
|
6354
6393
|
fullUrl.searchParams.append('filter', encodeURIComponent(filter));
|
|
6355
6394
|
}
|
|
6356
|
-
|
|
6357
|
-
|
|
6395
|
+
_context7.prev = 8;
|
|
6396
|
+
_context7.next = 11;
|
|
6358
6397
|
return fetch(fullUrl.toString(), {
|
|
6359
6398
|
headers: {
|
|
6360
6399
|
Authorization: 'Bearer ' + this.jwt,
|
|
@@ -6362,32 +6401,32 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6362
6401
|
}
|
|
6363
6402
|
});
|
|
6364
6403
|
case 11:
|
|
6365
|
-
res =
|
|
6366
|
-
|
|
6404
|
+
res = _context7.sent;
|
|
6405
|
+
_context7.next = 14;
|
|
6367
6406
|
return res.json();
|
|
6368
6407
|
case 14:
|
|
6369
|
-
resData =
|
|
6370
|
-
|
|
6408
|
+
resData = _context7.sent;
|
|
6409
|
+
_context7.next = 20;
|
|
6371
6410
|
break;
|
|
6372
6411
|
case 17:
|
|
6373
|
-
|
|
6374
|
-
|
|
6412
|
+
_context7.prev = 17;
|
|
6413
|
+
_context7.t0 = _context7["catch"](8);
|
|
6375
6414
|
throw new Error('Could not get rooms');
|
|
6376
6415
|
case 20:
|
|
6377
6416
|
if (!res.ok) {
|
|
6378
|
-
|
|
6417
|
+
_context7.next = 22;
|
|
6379
6418
|
break;
|
|
6380
6419
|
}
|
|
6381
|
-
return
|
|
6420
|
+
return _context7.abrupt("return", resData);
|
|
6382
6421
|
case 22:
|
|
6383
6422
|
throw new Error(resData.error);
|
|
6384
6423
|
case 23:
|
|
6385
6424
|
case "end":
|
|
6386
|
-
return
|
|
6425
|
+
return _context7.stop();
|
|
6387
6426
|
}
|
|
6388
|
-
},
|
|
6427
|
+
}, _callee7, this, [[8, 17]]);
|
|
6389
6428
|
}));
|
|
6390
|
-
function getRoomsGrouped(_x12, _x13, _x14, _x15
|
|
6429
|
+
function getRoomsGrouped(_x12, _x13, _x14, _x15) {
|
|
6391
6430
|
return _getRoomsGrouped.apply(this, arguments);
|
|
6392
6431
|
}
|
|
6393
6432
|
return getRoomsGrouped;
|
|
@@ -6395,15 +6434,15 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6395
6434
|
}, {
|
|
6396
6435
|
key: "getRoomColors",
|
|
6397
6436
|
value: function () {
|
|
6398
|
-
var _getRoomColors = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6437
|
+
var _getRoomColors = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(name) {
|
|
6399
6438
|
var fullUrl, res, resData;
|
|
6400
|
-
return _regeneratorRuntime.wrap(function
|
|
6401
|
-
while (1) switch (
|
|
6439
|
+
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
6440
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
6402
6441
|
case 0:
|
|
6403
6442
|
fullUrl = this.mediaService + '/rooms/' + name + '/colors';
|
|
6404
6443
|
resData = [];
|
|
6405
|
-
|
|
6406
|
-
|
|
6444
|
+
_context8.prev = 2;
|
|
6445
|
+
_context8.next = 5;
|
|
6407
6446
|
return fetch(fullUrl, {
|
|
6408
6447
|
headers: {
|
|
6409
6448
|
Authorization: 'Bearer ' + this.jwt,
|
|
@@ -6411,32 +6450,32 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6411
6450
|
}
|
|
6412
6451
|
});
|
|
6413
6452
|
case 5:
|
|
6414
|
-
res =
|
|
6415
|
-
|
|
6453
|
+
res = _context8.sent;
|
|
6454
|
+
_context8.next = 8;
|
|
6416
6455
|
return res.json();
|
|
6417
6456
|
case 8:
|
|
6418
|
-
resData =
|
|
6419
|
-
|
|
6457
|
+
resData = _context8.sent;
|
|
6458
|
+
_context8.next = 14;
|
|
6420
6459
|
break;
|
|
6421
6460
|
case 11:
|
|
6422
|
-
|
|
6423
|
-
|
|
6461
|
+
_context8.prev = 11;
|
|
6462
|
+
_context8.t0 = _context8["catch"](2);
|
|
6424
6463
|
throw new Error('Could not get room variants');
|
|
6425
6464
|
case 14:
|
|
6426
6465
|
if (!res.ok) {
|
|
6427
|
-
|
|
6466
|
+
_context8.next = 16;
|
|
6428
6467
|
break;
|
|
6429
6468
|
}
|
|
6430
|
-
return
|
|
6469
|
+
return _context8.abrupt("return", resData);
|
|
6431
6470
|
case 16:
|
|
6432
6471
|
throw new Error(resData.error);
|
|
6433
6472
|
case 17:
|
|
6434
6473
|
case "end":
|
|
6435
|
-
return
|
|
6474
|
+
return _context8.stop();
|
|
6436
6475
|
}
|
|
6437
|
-
},
|
|
6476
|
+
}, _callee8, this, [[2, 11]]);
|
|
6438
6477
|
}));
|
|
6439
|
-
function getRoomColors(
|
|
6478
|
+
function getRoomColors(_x16) {
|
|
6440
6479
|
return _getRoomColors.apply(this, arguments);
|
|
6441
6480
|
}
|
|
6442
6481
|
return getRoomColors;
|
|
@@ -6444,15 +6483,15 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6444
6483
|
}, {
|
|
6445
6484
|
key: "getRoomVariants",
|
|
6446
6485
|
value: function () {
|
|
6447
|
-
var _getRoomVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6486
|
+
var _getRoomVariants = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(id) {
|
|
6448
6487
|
var fullUrl, res, resData;
|
|
6449
|
-
return _regeneratorRuntime.wrap(function
|
|
6450
|
-
while (1) switch (
|
|
6488
|
+
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
6489
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
6451
6490
|
case 0:
|
|
6452
6491
|
fullUrl = this.mediaService + '/rooms/' + id + '/variants';
|
|
6453
6492
|
resData = [];
|
|
6454
|
-
|
|
6455
|
-
|
|
6493
|
+
_context9.prev = 2;
|
|
6494
|
+
_context9.next = 5;
|
|
6456
6495
|
return fetch(fullUrl, {
|
|
6457
6496
|
headers: {
|
|
6458
6497
|
Authorization: 'Bearer ' + this.jwt,
|
|
@@ -6460,32 +6499,32 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6460
6499
|
}
|
|
6461
6500
|
});
|
|
6462
6501
|
case 5:
|
|
6463
|
-
res =
|
|
6464
|
-
|
|
6502
|
+
res = _context9.sent;
|
|
6503
|
+
_context9.next = 8;
|
|
6465
6504
|
return res.json();
|
|
6466
6505
|
case 8:
|
|
6467
|
-
resData =
|
|
6468
|
-
|
|
6506
|
+
resData = _context9.sent;
|
|
6507
|
+
_context9.next = 14;
|
|
6469
6508
|
break;
|
|
6470
6509
|
case 11:
|
|
6471
|
-
|
|
6472
|
-
|
|
6510
|
+
_context9.prev = 11;
|
|
6511
|
+
_context9.t0 = _context9["catch"](2);
|
|
6473
6512
|
throw new Error('Could not get room variants');
|
|
6474
6513
|
case 14:
|
|
6475
6514
|
if (!res.ok) {
|
|
6476
|
-
|
|
6515
|
+
_context9.next = 16;
|
|
6477
6516
|
break;
|
|
6478
6517
|
}
|
|
6479
|
-
return
|
|
6518
|
+
return _context9.abrupt("return", resData);
|
|
6480
6519
|
case 16:
|
|
6481
6520
|
throw new Error(resData.error);
|
|
6482
6521
|
case 17:
|
|
6483
6522
|
case "end":
|
|
6484
|
-
return
|
|
6523
|
+
return _context9.stop();
|
|
6485
6524
|
}
|
|
6486
|
-
},
|
|
6525
|
+
}, _callee9, this, [[2, 11]]);
|
|
6487
6526
|
}));
|
|
6488
|
-
function getRoomVariants(
|
|
6527
|
+
function getRoomVariants(_x17) {
|
|
6489
6528
|
return _getRoomVariants.apply(this, arguments);
|
|
6490
6529
|
}
|
|
6491
6530
|
return getRoomVariants;
|
|
@@ -6493,16 +6532,16 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6493
6532
|
}, {
|
|
6494
6533
|
key: "getRenderPackages",
|
|
6495
6534
|
value: function () {
|
|
6496
|
-
var _getRenderPackages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6535
|
+
var _getRenderPackages = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee10(organizationId) {
|
|
6497
6536
|
var fullUrl, res, resData;
|
|
6498
|
-
return _regeneratorRuntime.wrap(function
|
|
6499
|
-
while (1) switch (
|
|
6537
|
+
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
6538
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
6500
6539
|
case 0:
|
|
6501
6540
|
fullUrl = new URL(this.mediaService + '/renderpackages');
|
|
6502
6541
|
if (organizationId) fullUrl.searchParams.append('organizationId', organizationId);
|
|
6503
6542
|
fullUrl.searchParams.append('sort', encodeURIComponent('{position}'));
|
|
6504
|
-
|
|
6505
|
-
|
|
6543
|
+
_context10.prev = 3;
|
|
6544
|
+
_context10.next = 6;
|
|
6506
6545
|
return fetch(fullUrl, {
|
|
6507
6546
|
headers: {
|
|
6508
6547
|
Authorization: 'Bearer ' + this.jwt,
|
|
@@ -6510,32 +6549,32 @@ var MediaHandler = /*#__PURE__*/function () {
|
|
|
6510
6549
|
}
|
|
6511
6550
|
});
|
|
6512
6551
|
case 6:
|
|
6513
|
-
res =
|
|
6514
|
-
|
|
6552
|
+
res = _context10.sent;
|
|
6553
|
+
_context10.next = 9;
|
|
6515
6554
|
return res.json();
|
|
6516
6555
|
case 9:
|
|
6517
|
-
resData =
|
|
6518
|
-
|
|
6556
|
+
resData = _context10.sent;
|
|
6557
|
+
_context10.next = 15;
|
|
6519
6558
|
break;
|
|
6520
6559
|
case 12:
|
|
6521
|
-
|
|
6522
|
-
|
|
6560
|
+
_context10.prev = 12;
|
|
6561
|
+
_context10.t0 = _context10["catch"](3);
|
|
6523
6562
|
throw new Error('Could not get render packages');
|
|
6524
6563
|
case 15:
|
|
6525
6564
|
if (!res.ok) {
|
|
6526
|
-
|
|
6565
|
+
_context10.next = 17;
|
|
6527
6566
|
break;
|
|
6528
6567
|
}
|
|
6529
|
-
return
|
|
6568
|
+
return _context10.abrupt("return", resData);
|
|
6530
6569
|
case 17:
|
|
6531
6570
|
throw new Error(resData.error);
|
|
6532
6571
|
case 18:
|
|
6533
6572
|
case "end":
|
|
6534
|
-
return
|
|
6573
|
+
return _context10.stop();
|
|
6535
6574
|
}
|
|
6536
|
-
},
|
|
6575
|
+
}, _callee10, this, [[3, 12]]);
|
|
6537
6576
|
}));
|
|
6538
|
-
function getRenderPackages(
|
|
6577
|
+
function getRenderPackages(_x18) {
|
|
6539
6578
|
return _getRenderPackages.apply(this, arguments);
|
|
6540
6579
|
}
|
|
6541
6580
|
return getRenderPackages;
|
|
@@ -9530,7 +9569,7 @@ var SideMenu$1 = observer(SideMenu);
|
|
|
9530
9569
|
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
9570
|
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
9571
|
var LazyModals$1 = /*#__PURE__*/React.lazy(function () {
|
|
9533
|
-
return import('./ModalsWrapper-
|
|
9572
|
+
return import('./ModalsWrapper-17e2282f.js');
|
|
9534
9573
|
});
|
|
9535
9574
|
function Fullscreen() {
|
|
9536
9575
|
var _useDivaCoreContext = useDivaCoreContext(),
|
|
@@ -9984,10 +10023,10 @@ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
|
|
|
9984
10023
|
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
10024
|
var LOG$2 = getLogger('Framework', 'Root');
|
|
9986
10025
|
var LazyAuth = /*#__PURE__*/React.lazy(function () {
|
|
9987
|
-
return import('./index-
|
|
10026
|
+
return import('./index-5635e73a.js');
|
|
9988
10027
|
});
|
|
9989
10028
|
var LazyModals = /*#__PURE__*/React.lazy(function () {
|
|
9990
|
-
return import('./ModalsWrapper-
|
|
10029
|
+
return import('./ModalsWrapper-17e2282f.js');
|
|
9991
10030
|
});
|
|
9992
10031
|
function ContentComponent() {
|
|
9993
10032
|
var context = useDivaCoreContext();
|