@crystaldesign/diva-core 25.7.0-beta.8 → 25.7.0-rc.0
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-73074c08.js → ModalsWrapper-48c89d09.js} +1 -1
- package/build/esm/{index-a9fb5803.js → index-4eb2f914.js} +1 -1
- package/build/esm/{index-011f3484.js → index-8d03daef.js} +300 -480
- package/build/esm/index.js +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/AuthorizationHandler/index.d.ts +6 -3
- package/build/types/core/src/handler/AuthorizationHandler/index.d.ts.map +1 -1
- package/build/types/core/src/handler/InternalApiHandler.d.ts +3 -14
- package/build/types/core/src/handler/InternalApiHandler.d.ts.map +1 -1
- package/build/types/core/src/handler/OrganizationHandler/index.d.ts +1 -11
- package/build/types/core/src/handler/OrganizationHandler/index.d.ts.map +1 -1
- package/build/types/core/src/store/AuthorizationStore.d.ts.map +1 -1
- package/build/types/core/src/store/ConfigurationStore.d.ts +1 -0
- package/build/types/core/src/store/ConfigurationStore.d.ts.map +1 -1
- package/build/types/core/src/store/RootStore.d.ts +2 -7
- package/build/types/core/src/store/RootStore.d.ts.map +1 -1
- package/build/types/core/src/store/index.d.ts +0 -2
- package/build/types/core/src/store/index.d.ts.map +1 -1
- package/build/types/core/src/store/mock/index.d.ts.map +1 -1
- package/build/types/core/src/types.d.ts +1 -0
- package/build/types/core/src/types.d.ts.map +1 -1
- package/build/umd/{287.diva-core.umd.min.js → 212.diva-core.umd.min.js} +2 -2
- package/build/umd/212.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/{785.diva-core.umd.min.js → 22.diva-core.umd.min.js} +2 -2
- package/build/umd/22.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/{271.diva-core.umd.min.js → 324.diva-core.umd.min.js} +2 -2
- package/build/umd/324.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/{304.diva-core.umd.min.js → 53.diva-core.umd.min.js} +2 -2
- package/build/umd/53.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/843.diva-core.umd.min.js +2 -0
- package/build/umd/843.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/diva-core.umd.min.js +1 -1
- package/build/umd/report.html +1 -1
- package/package.json +10 -10
- package/build/types/core/src/handler/ContentItemHandler/index.d.ts +0 -18
- package/build/types/core/src/handler/ContentItemHandler/index.d.ts.map +0 -1
- package/build/umd/271.diva-core.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/287.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/637.diva-core.umd.min.js +0 -2
- package/build/umd/637.diva-core.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/785.diva-core.umd.min.js.LICENSE.txt +0 -1
|
@@ -46,7 +46,7 @@ import { actions } from '@storybook/addon-actions';
|
|
|
46
46
|
import * as Styles from '@mui/styles';
|
|
47
47
|
|
|
48
48
|
(function() {
|
|
49
|
-
const env = {"STAGE":"production","VERSION":"25.7.0-
|
|
49
|
+
const env = {"STAGE":"production","VERSION":"25.7.0-rc.0"};
|
|
50
50
|
try {
|
|
51
51
|
if (process) {
|
|
52
52
|
process.env = Object.assign({}, process.env);
|
|
@@ -123,8 +123,8 @@ function baseUrl() {
|
|
|
123
123
|
return urlParts[urlParts.length - 2] + '.' + urlParts[urlParts.length - 1];
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
function ownKeys$
|
|
127
|
-
function _objectSpread$
|
|
126
|
+
function ownKeys$h(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
127
|
+
function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$h(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
128
128
|
var _existingLogger = new Map();
|
|
129
129
|
var _apmInitialized = false;
|
|
130
130
|
var _onErrorEvent = function _onErrorEvent() {};
|
|
@@ -205,9 +205,9 @@ var ApplicationLogger = /*#__PURE__*/function () {
|
|
|
205
205
|
this.transactions["delete"](eventId);
|
|
206
206
|
event.end = end;
|
|
207
207
|
var cleanLabels = this.cleanLabels(labels);
|
|
208
|
-
event.event.labels = _objectSpread$
|
|
208
|
+
event.event.labels = _objectSpread$h(_objectSpread$h({}, event.event.labels), cleanLabels);
|
|
209
209
|
if (event.event.span) {
|
|
210
|
-
event.event.span.addLabels(_objectSpread$
|
|
210
|
+
event.event.span.addLabels(_objectSpread$h(_objectSpread$h(_objectSpread$h({}, event.event.labels), cleanLabels), {}, {
|
|
211
211
|
eventId: eventId
|
|
212
212
|
}));
|
|
213
213
|
event.event.span.end();
|
|
@@ -215,7 +215,7 @@ var ApplicationLogger = /*#__PURE__*/function () {
|
|
|
215
215
|
clearTimeout(event.event.warningTimeout);
|
|
216
216
|
clearTimeout(event.event.errorTimeout);
|
|
217
217
|
this.debug("Transaction ".concat(event.event.type, " (").concat(event.event.message, ") took ").concat(Math.floor(end - event.start), "ms"));
|
|
218
|
-
DivaUtils.businessMetrics.logEvent(event.event.type, this.module, event.event.message, _objectSpread$
|
|
218
|
+
DivaUtils.businessMetrics.logEvent(event.event.type, this.module, event.event.message, _objectSpread$h(_objectSpread$h(_objectSpread$h({}, event.event.labels), cleanLabels), {}, {
|
|
219
219
|
eventId: eventId,
|
|
220
220
|
status: event.event.timeout ? 'TIMEOUT' : 'SUCCESS',
|
|
221
221
|
eventDuration: Math.floor(end - event.start),
|
|
@@ -250,9 +250,9 @@ var ApplicationLogger = /*#__PURE__*/function () {
|
|
|
250
250
|
}
|
|
251
251
|
event.end = end;
|
|
252
252
|
var cleanLabels = this.cleanLabels(labels);
|
|
253
|
-
event.event.labels = _objectSpread$
|
|
253
|
+
event.event.labels = _objectSpread$h(_objectSpread$h({}, event.event.labels), cleanLabels);
|
|
254
254
|
if (event.event.span) {
|
|
255
|
-
event.event.span.addLabels(_objectSpread$
|
|
255
|
+
event.event.span.addLabels(_objectSpread$h(_objectSpread$h(_objectSpread$h({}, event.event.labels), cleanLabels), {}, {
|
|
256
256
|
eventId: eventId
|
|
257
257
|
}));
|
|
258
258
|
event.event.span.end();
|
|
@@ -260,7 +260,7 @@ var ApplicationLogger = /*#__PURE__*/function () {
|
|
|
260
260
|
clearTimeout(event.event.warningTimeout);
|
|
261
261
|
clearTimeout(event.event.errorTimeout);
|
|
262
262
|
this.debug("Transaction ".concat(event.event.type, " (").concat(event.event.message, ") failed after ").concat(Math.floor(end - event.start), "ms"));
|
|
263
|
-
DivaUtils.businessMetrics.logEvent(event.event.type, this.module, event.event.message, _objectSpread$
|
|
263
|
+
DivaUtils.businessMetrics.logEvent(event.event.type, this.module, event.event.message, _objectSpread$h(_objectSpread$h(_objectSpread$h({}, event.event.labels), cleanLabels), {}, {
|
|
264
264
|
error: code,
|
|
265
265
|
errorMessage: message,
|
|
266
266
|
eventId: eventId,
|
|
@@ -359,7 +359,7 @@ var ApplicationLogger = /*#__PURE__*/function () {
|
|
|
359
359
|
_onErrorEvent(_error.message, _error.name);
|
|
360
360
|
|
|
361
361
|
//for apm we spread the custom object directly on the error object, so that the are added to APM as custom attributes
|
|
362
|
-
var forApm = _objectSpread$
|
|
362
|
+
var forApm = _objectSpread$h(_objectSpread$h({}, _error), _error.custom);
|
|
363
363
|
(_getApmInstance = getApmInstance()) === null || _getApmInstance === void 0 || _getApmInstance.captureError(forApm);
|
|
364
364
|
}
|
|
365
365
|
}, {
|
|
@@ -433,8 +433,8 @@ if (typeof __webpack_public_path__ !== 'undefined') {
|
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
|
|
436
|
-
function ownKeys$
|
|
437
|
-
function _objectSpread$
|
|
436
|
+
function ownKeys$g(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
437
|
+
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$g(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
438
438
|
function _callSuper$2(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
439
439
|
function _isNativeReflectConstruct$2() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$2 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
440
440
|
var LOG$e = getLogger('Framework', 'webcomponent');
|
|
@@ -658,14 +658,14 @@ var CoreWrapper = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
658
658
|
if (!components) {
|
|
659
659
|
return /*#__PURE__*/jsx(Fragment, {});
|
|
660
660
|
}
|
|
661
|
-
return /*#__PURE__*/jsx(DivaCore, _objectSpread$
|
|
661
|
+
return /*#__PURE__*/jsx(DivaCore, _objectSpread$g(_objectSpread$g({}, props), {}, {
|
|
662
662
|
components: components,
|
|
663
663
|
ref: ref
|
|
664
664
|
}));
|
|
665
665
|
});
|
|
666
666
|
|
|
667
667
|
//we have to externalize the materialUI styling here, so that also in UMD the same instance is used
|
|
668
|
-
window.MaterialUIStyles = _objectSpread$
|
|
668
|
+
window.MaterialUIStyles = _objectSpread$g(_objectSpread$g({}, Styles), CoreStyles);
|
|
669
669
|
if (!window.customElements.get('diva-framework')) {
|
|
670
670
|
window.customElements.define('diva-framework', DivaFramework);
|
|
671
671
|
}
|
|
@@ -768,8 +768,8 @@ var defaultTheme = {
|
|
|
768
768
|
}
|
|
769
769
|
};
|
|
770
770
|
|
|
771
|
-
function ownKeys$
|
|
772
|
-
function _objectSpread$
|
|
771
|
+
function ownKeys$f(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
772
|
+
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
773
773
|
var LOG$d = getLogger('Framework', 'ConfigurationStore');
|
|
774
774
|
var ConfigurationStore = /*#__PURE__*/function () {
|
|
775
775
|
function ConfigurationStore(root, identifier, defaultApiConfig, domain) {
|
|
@@ -814,42 +814,48 @@ var ConfigurationStore = /*#__PURE__*/function () {
|
|
|
814
814
|
}
|
|
815
815
|
}
|
|
816
816
|
}, {
|
|
817
|
-
key: "
|
|
817
|
+
key: "excludedOrganizations",
|
|
818
818
|
get: function get() {
|
|
819
819
|
var _this$_configuration3;
|
|
820
|
-
return (
|
|
820
|
+
return (_this$_configuration3 = this._configuration) === null || _this$_configuration3 === void 0 ? void 0 : _this$_configuration3.excludeOrganizations;
|
|
821
|
+
}
|
|
822
|
+
}, {
|
|
823
|
+
key: "components",
|
|
824
|
+
get: function get() {
|
|
825
|
+
var _this$_configuration4;
|
|
826
|
+
return ((_this$_configuration4 = this._configuration) === null || _this$_configuration4 === void 0 || (_this$_configuration4 = _this$_configuration4.components) === null || _this$_configuration4 === void 0 ? void 0 : _this$_configuration4.available) || [];
|
|
821
827
|
}
|
|
822
828
|
}, {
|
|
823
829
|
key: "defaultComponent",
|
|
824
830
|
get: function get() {
|
|
825
|
-
var _this$
|
|
831
|
+
var _this$_configuration5, _this$_configuration6;
|
|
826
832
|
var dataStore = this.root.dataStore;
|
|
827
|
-
if (dataStore && (_this$
|
|
833
|
+
if (dataStore && (_this$_configuration5 = this._configuration) !== null && _this$_configuration5 !== void 0 && _this$_configuration5.components.openSellerDefaultForRetailer) {
|
|
828
834
|
if (dataStore.userHasPermission('retail') && !dataStore.userHasPermission('acquisition') && !dataStore.userHasPermission('category_manager')) {
|
|
829
835
|
return {
|
|
830
836
|
type: 'SELLER'
|
|
831
837
|
};
|
|
832
838
|
}
|
|
833
839
|
}
|
|
834
|
-
return (_this$
|
|
840
|
+
return (_this$_configuration6 = this._configuration) === null || _this$_configuration6 === void 0 ? void 0 : _this$_configuration6.components["default"];
|
|
835
841
|
}
|
|
836
842
|
}, {
|
|
837
843
|
key: "locales",
|
|
838
844
|
get: function get() {
|
|
839
|
-
var _this$
|
|
840
|
-
return (_this$
|
|
845
|
+
var _this$_configuration7;
|
|
846
|
+
return (_this$_configuration7 = this._configuration) === null || _this$_configuration7 === void 0 ? void 0 : _this$_configuration7.locales;
|
|
841
847
|
}
|
|
842
848
|
}, {
|
|
843
849
|
key: "spinner",
|
|
844
850
|
get: function get() {
|
|
845
|
-
var _this$
|
|
846
|
-
return (_this$
|
|
851
|
+
var _this$_configuration8;
|
|
852
|
+
return (_this$_configuration8 = this._configuration) === null || _this$_configuration8 === void 0 ? void 0 : _this$_configuration8.spinner;
|
|
847
853
|
}
|
|
848
854
|
}, {
|
|
849
855
|
key: "theme",
|
|
850
856
|
get: function get() {
|
|
851
|
-
var _this$
|
|
852
|
-
var theme = (_this$
|
|
857
|
+
var _this$_configuration9, _theme$palette$primar, _theme$palette, _theme$palette$primar2, _theme$palette2, _theme$palette$primar3, _theme$palette3, _theme$palette$primar4, _theme$palette4, _ref, _theme$palette$second, _theme$palette5, _theme$palette6, _ref2, _theme$palette$second2, _theme$palette7, _theme$palette8, _ref3, _theme$palette$second3, _theme$palette9, _theme$palette10, _ref4, _theme$palette$second4, _theme$palette11, _theme$palette12, _theme$palette$text$p, _theme$palette13, _theme$palette$text$s, _theme$palette14, _theme$typography$fon, _theme$typography, _theme$components;
|
|
858
|
+
var theme = (_this$_configuration9 = this._configuration) === null || _this$_configuration9 === void 0 ? void 0 : _this$_configuration9.theme;
|
|
853
859
|
return {
|
|
854
860
|
palette: {
|
|
855
861
|
primary: {
|
|
@@ -878,138 +884,138 @@ var ConfigurationStore = /*#__PURE__*/function () {
|
|
|
878
884
|
}, {
|
|
879
885
|
key: "navigation",
|
|
880
886
|
get: function get() {
|
|
881
|
-
var _this$
|
|
887
|
+
var _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, _this$_configuration27, _this$root$dataStore$, _this$_configuration28;
|
|
882
888
|
return {
|
|
883
|
-
buttons: ((_this$
|
|
884
|
-
imprintUrl: (_this$
|
|
885
|
-
privacyUrl: (_this$
|
|
886
|
-
tosUrl: (_this$
|
|
887
|
-
conditionsUrl: (_this$
|
|
888
|
-
supportUrl: (_this$
|
|
889
|
-
feedbackUrl: (_this$
|
|
890
|
-
logoUrl: (_this$
|
|
891
|
-
logoAction: (_this$
|
|
892
|
-
enableMobile: (_this$
|
|
893
|
-
hideHeader: (_this$
|
|
894
|
-
welcomeText: (_this$
|
|
895
|
-
showOrgName: (_this$
|
|
896
|
-
showUserName: (_this$
|
|
897
|
-
showDescription: (_this$
|
|
898
|
-
qrCodeScanner: (_this$
|
|
899
|
-
greetingsText: (_this$
|
|
900
|
-
showSnow: (_this$
|
|
901
|
-
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$
|
|
889
|
+
buttons: ((_this$_configuration10 = this._configuration) === null || _this$_configuration10 === void 0 || (_this$_configuration10 = _this$_configuration10.navigation) === null || _this$_configuration10 === void 0 ? void 0 : _this$_configuration10.buttons) || [],
|
|
890
|
+
imprintUrl: (_this$_configuration11 = this._configuration) === null || _this$_configuration11 === void 0 || (_this$_configuration11 = _this$_configuration11.navigation) === null || _this$_configuration11 === void 0 ? void 0 : _this$_configuration11.imprintUrl,
|
|
891
|
+
privacyUrl: (_this$_configuration12 = this._configuration) === null || _this$_configuration12 === void 0 || (_this$_configuration12 = _this$_configuration12.navigation) === null || _this$_configuration12 === void 0 ? void 0 : _this$_configuration12.privacyUrl,
|
|
892
|
+
tosUrl: (_this$_configuration13 = this._configuration) === null || _this$_configuration13 === void 0 || (_this$_configuration13 = _this$_configuration13.navigation) === null || _this$_configuration13 === void 0 ? void 0 : _this$_configuration13.tosUrl,
|
|
893
|
+
conditionsUrl: (_this$_configuration14 = this._configuration) === null || _this$_configuration14 === void 0 || (_this$_configuration14 = _this$_configuration14.navigation) === null || _this$_configuration14 === void 0 ? void 0 : _this$_configuration14.conditionsUrl,
|
|
894
|
+
supportUrl: (_this$_configuration15 = this._configuration) === null || _this$_configuration15 === void 0 || (_this$_configuration15 = _this$_configuration15.navigation) === null || _this$_configuration15 === void 0 ? void 0 : _this$_configuration15.supportUrl,
|
|
895
|
+
feedbackUrl: (_this$_configuration16 = this._configuration) === null || _this$_configuration16 === void 0 || (_this$_configuration16 = _this$_configuration16.navigation) === null || _this$_configuration16 === void 0 ? void 0 : _this$_configuration16.feedbackUrl,
|
|
896
|
+
logoUrl: (_this$_configuration17 = this._configuration) === null || _this$_configuration17 === void 0 || (_this$_configuration17 = _this$_configuration17.navigation) === null || _this$_configuration17 === void 0 ? void 0 : _this$_configuration17.logoUrl,
|
|
897
|
+
logoAction: (_this$_configuration18 = this._configuration) === null || _this$_configuration18 === void 0 || (_this$_configuration18 = _this$_configuration18.navigation) === null || _this$_configuration18 === void 0 ? void 0 : _this$_configuration18.logoAction,
|
|
898
|
+
enableMobile: (_this$_configuration19 = this._configuration) === null || _this$_configuration19 === void 0 || (_this$_configuration19 = _this$_configuration19.navigation) === null || _this$_configuration19 === void 0 ? void 0 : _this$_configuration19.enableMobile,
|
|
899
|
+
hideHeader: (_this$_configuration20 = this._configuration) === null || _this$_configuration20 === void 0 || (_this$_configuration20 = _this$_configuration20.navigation) === null || _this$_configuration20 === void 0 ? void 0 : _this$_configuration20.hideHeader,
|
|
900
|
+
welcomeText: (_this$_configuration21 = this._configuration) === null || _this$_configuration21 === void 0 || (_this$_configuration21 = _this$_configuration21.navigation) === null || _this$_configuration21 === void 0 ? void 0 : _this$_configuration21.welcomeText,
|
|
901
|
+
showOrgName: (_this$_configuration22 = this._configuration) === null || _this$_configuration22 === void 0 || (_this$_configuration22 = _this$_configuration22.navigation) === null || _this$_configuration22 === void 0 ? void 0 : _this$_configuration22.showOrgName,
|
|
902
|
+
showUserName: (_this$_configuration23 = this._configuration) === null || _this$_configuration23 === void 0 || (_this$_configuration23 = _this$_configuration23.navigation) === null || _this$_configuration23 === void 0 ? void 0 : _this$_configuration23.showUserName,
|
|
903
|
+
showDescription: (_this$_configuration24 = this._configuration) === null || _this$_configuration24 === void 0 || (_this$_configuration24 = _this$_configuration24.navigation) === null || _this$_configuration24 === void 0 ? void 0 : _this$_configuration24.showDescription,
|
|
904
|
+
qrCodeScanner: (_this$_configuration25 = this._configuration) === null || _this$_configuration25 === void 0 || (_this$_configuration25 = _this$_configuration25.navigation) === null || _this$_configuration25 === void 0 ? void 0 : _this$_configuration25.qrCodeScanner,
|
|
905
|
+
greetingsText: (_this$_configuration26 = this._configuration) === null || _this$_configuration26 === void 0 || (_this$_configuration26 = _this$_configuration26.navigation) === null || _this$_configuration26 === void 0 ? void 0 : _this$_configuration26.greetingsText,
|
|
906
|
+
showSnow: (_this$_configuration27 = this._configuration) === null || _this$_configuration27 === void 0 || (_this$_configuration27 = _this$_configuration27.navigation) === null || _this$_configuration27 === void 0 ? void 0 : _this$_configuration27.showSnow,
|
|
907
|
+
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$_configuration28 = this._configuration) === null || _this$_configuration28 === void 0 || (_this$_configuration28 = _this$_configuration28.components.available) === null || _this$_configuration28 === void 0 || (_this$_configuration28 = _this$_configuration28.find(function (c) {
|
|
902
908
|
return c.type === 'DIVA_WEBPLANNER';
|
|
903
|
-
})) === null || _this$
|
|
909
|
+
})) === null || _this$_configuration28 === void 0 || (_this$_configuration28 = _this$_configuration28.settings) === null || _this$_configuration28 === void 0 || (_this$_configuration28 = _this$_configuration28.ViewConfig) === null || _this$_configuration28 === void 0 ? void 0 : _this$_configuration28.pricePreview)
|
|
904
910
|
};
|
|
905
911
|
}
|
|
906
912
|
}, {
|
|
907
913
|
key: "googleMapsconfig",
|
|
908
914
|
get: function get() {
|
|
909
|
-
var _this$
|
|
915
|
+
var _this$_configuration29, _this$_configuration30, _this$_configuration31, _this$_configuration32;
|
|
910
916
|
return {
|
|
911
|
-
id: (_this$
|
|
912
|
-
googleMapsApiKey: (_this$
|
|
913
|
-
language: (_this$
|
|
914
|
-
region: (_this$
|
|
917
|
+
id: (_this$_configuration29 = this._configuration) === null || _this$_configuration29 === void 0 || (_this$_configuration29 = _this$_configuration29.googleMapsConfig) === null || _this$_configuration29 === void 0 ? void 0 : _this$_configuration29.id,
|
|
918
|
+
googleMapsApiKey: (_this$_configuration30 = this._configuration) === null || _this$_configuration30 === void 0 || (_this$_configuration30 = _this$_configuration30.googleMapsConfig) === null || _this$_configuration30 === void 0 ? void 0 : _this$_configuration30.googleMapsApiKey,
|
|
919
|
+
language: (_this$_configuration31 = this._configuration) === null || _this$_configuration31 === void 0 || (_this$_configuration31 = _this$_configuration31.googleMapsConfig) === null || _this$_configuration31 === void 0 ? void 0 : _this$_configuration31.language,
|
|
920
|
+
region: (_this$_configuration32 = this._configuration) === null || _this$_configuration32 === void 0 || (_this$_configuration32 = _this$_configuration32.googleMapsConfig) === null || _this$_configuration32 === void 0 ? void 0 : _this$_configuration32.region
|
|
915
921
|
};
|
|
916
922
|
}
|
|
917
923
|
}, {
|
|
918
924
|
key: "cometchatConfig",
|
|
919
925
|
get: function get() {
|
|
920
|
-
var _this$
|
|
926
|
+
var _this$_configuration33, _this$_configuration34, _this$_configuration35;
|
|
921
927
|
return {
|
|
922
|
-
app_id: (_this$
|
|
923
|
-
app_region: (_this$
|
|
924
|
-
listener_id: (_this$
|
|
928
|
+
app_id: (_this$_configuration33 = this._configuration) === null || _this$_configuration33 === void 0 || (_this$_configuration33 = _this$_configuration33.cometChatConfig) === null || _this$_configuration33 === void 0 ? void 0 : _this$_configuration33.app_id,
|
|
929
|
+
app_region: (_this$_configuration34 = this._configuration) === null || _this$_configuration34 === void 0 || (_this$_configuration34 = _this$_configuration34.cometChatConfig) === null || _this$_configuration34 === void 0 ? void 0 : _this$_configuration34.app_region,
|
|
930
|
+
listener_id: (_this$_configuration35 = this._configuration) === null || _this$_configuration35 === void 0 || (_this$_configuration35 = _this$_configuration35.cometChatConfig) === null || _this$_configuration35 === void 0 ? void 0 : _this$_configuration35.listener_id
|
|
925
931
|
};
|
|
926
932
|
}
|
|
927
933
|
}, {
|
|
928
934
|
key: "hasAuthentication",
|
|
929
935
|
get: function get() {
|
|
930
|
-
var _this$
|
|
931
|
-
return !!((_this$
|
|
936
|
+
var _this$_configuration36;
|
|
937
|
+
return !!((_this$_configuration36 = this._configuration) !== null && _this$_configuration36 !== void 0 && _this$_configuration36.authentication);
|
|
932
938
|
}
|
|
933
939
|
}, {
|
|
934
940
|
key: "authentication",
|
|
935
941
|
get: function get() {
|
|
936
|
-
var _this$_configuration$, _this$
|
|
937
|
-
return _objectSpread$
|
|
942
|
+
var _this$_configuration$, _this$_configuration37, _this$_configuration38, _this$_configuration39, _this$_configuration40, _this$_configuration41, _this$_configuration42, _this$_configuration43, _this$_configuration44, _this$_configuration45, _this$_configuration$2, _this$_configuration46;
|
|
943
|
+
return _objectSpread$f(_objectSpread$f({}, (_this$_configuration$ = (_this$_configuration37 = this._configuration) === null || _this$_configuration37 === void 0 ? void 0 : _this$_configuration37.authentication) !== null && _this$_configuration$ !== void 0 ? _this$_configuration$ : {}), {}, {
|
|
938
944
|
loginMethods: {
|
|
939
|
-
google: (_this$
|
|
940
|
-
microsoft: (_this$
|
|
941
|
-
standard: (_this$
|
|
942
|
-
generic: (_this$
|
|
945
|
+
google: (_this$_configuration38 = this._configuration) !== null && _this$_configuration38 !== void 0 && (_this$_configuration38 = _this$_configuration38.authentication) !== null && _this$_configuration38 !== void 0 && _this$_configuration38.loginMethods ? (_this$_configuration39 = this._configuration) === null || _this$_configuration39 === void 0 || (_this$_configuration39 = _this$_configuration39.authentication) === null || _this$_configuration39 === void 0 ? void 0 : _this$_configuration39.loginMethods.google : true,
|
|
946
|
+
microsoft: (_this$_configuration40 = this._configuration) !== null && _this$_configuration40 !== void 0 && (_this$_configuration40 = _this$_configuration40.authentication) !== null && _this$_configuration40 !== void 0 && _this$_configuration40.loginMethods ? (_this$_configuration41 = this._configuration) === null || _this$_configuration41 === void 0 || (_this$_configuration41 = _this$_configuration41.authentication) === null || _this$_configuration41 === void 0 ? void 0 : _this$_configuration41.loginMethods.microsoft : true,
|
|
947
|
+
standard: (_this$_configuration42 = this._configuration) !== null && _this$_configuration42 !== void 0 && (_this$_configuration42 = _this$_configuration42.authentication) !== null && _this$_configuration42 !== void 0 && _this$_configuration42.loginMethods ? (_this$_configuration43 = this._configuration) === null || _this$_configuration43 === void 0 || (_this$_configuration43 = _this$_configuration43.authentication) === null || _this$_configuration43 === void 0 ? void 0 : _this$_configuration43.loginMethods.standard : true,
|
|
948
|
+
generic: (_this$_configuration44 = this._configuration) !== null && _this$_configuration44 !== void 0 && (_this$_configuration44 = _this$_configuration44.authentication) !== null && _this$_configuration44 !== void 0 && _this$_configuration44.loginMethods ? this._configuration.authentication.loginMethods.generic : false
|
|
943
949
|
},
|
|
944
|
-
contentBox: (_this$
|
|
950
|
+
contentBox: (_this$_configuration45 = this._configuration) === null || _this$_configuration45 === void 0 || (_this$_configuration45 = _this$_configuration45.authentication) === null || _this$_configuration45 === void 0 ? void 0 : _this$_configuration45.contentBox,
|
|
945
951
|
resetPassword: {
|
|
946
|
-
returnToLogin: (_this$_configuration$2 = (_this$
|
|
952
|
+
returnToLogin: (_this$_configuration$2 = (_this$_configuration46 = this._configuration) === null || _this$_configuration46 === void 0 || (_this$_configuration46 = _this$_configuration46.authentication) === null || _this$_configuration46 === void 0 || (_this$_configuration46 = _this$_configuration46.resetPassword) === null || _this$_configuration46 === void 0 ? void 0 : _this$_configuration46.returnToLogin) !== null && _this$_configuration$2 !== void 0 ? _this$_configuration$2 : true
|
|
947
953
|
}
|
|
948
954
|
});
|
|
949
955
|
}
|
|
950
956
|
}, {
|
|
951
957
|
key: "enableRouting",
|
|
952
958
|
get: function get() {
|
|
953
|
-
var _this$
|
|
954
|
-
return (_this$
|
|
959
|
+
var _this$_configuration47;
|
|
960
|
+
return (_this$_configuration47 = this._configuration) === null || _this$_configuration47 === void 0 ? void 0 : _this$_configuration47.enableRouting;
|
|
955
961
|
}
|
|
956
962
|
}, {
|
|
957
963
|
key: "enableStorage",
|
|
958
964
|
get: function get() {
|
|
959
|
-
var _this$
|
|
960
|
-
return (_this$
|
|
965
|
+
var _this$_configuration48;
|
|
966
|
+
return (_this$_configuration48 = this._configuration) === null || _this$_configuration48 === void 0 ? void 0 : _this$_configuration48.enableStorage;
|
|
961
967
|
}
|
|
962
968
|
}, {
|
|
963
969
|
key: "telemetrySettings",
|
|
964
970
|
get: function get() {
|
|
965
|
-
var _this$
|
|
966
|
-
return (_this$
|
|
971
|
+
var _this$_configuration49;
|
|
972
|
+
return (_this$_configuration49 = this._configuration) === null || _this$_configuration49 === void 0 ? void 0 : _this$_configuration49.telemetry;
|
|
967
973
|
}
|
|
968
974
|
}, {
|
|
969
975
|
key: "enableModals",
|
|
970
976
|
get: function get() {
|
|
971
|
-
var _this$
|
|
972
|
-
return !((_this$
|
|
977
|
+
var _this$_configuration50;
|
|
978
|
+
return !((_this$_configuration50 = this._configuration) !== null && _this$_configuration50 !== void 0 && _this$_configuration50.disableModals);
|
|
973
979
|
}
|
|
974
980
|
}, {
|
|
975
981
|
key: "enableSupport",
|
|
976
982
|
get: function get() {
|
|
977
|
-
var _this$
|
|
978
|
-
return (_this$
|
|
983
|
+
var _this$_configuration51;
|
|
984
|
+
return (_this$_configuration51 = this._configuration) === null || _this$_configuration51 === void 0 ? void 0 : _this$_configuration51.enableSupport;
|
|
979
985
|
}
|
|
980
986
|
}, {
|
|
981
987
|
key: "showInitWarnBanner",
|
|
982
988
|
get: function get() {
|
|
983
|
-
var _this$defaultApiConfi, _this$defaultApiConfi2, _this$defaultApiConfi3, _this$
|
|
989
|
+
var _this$defaultApiConfi, _this$defaultApiConfi2, _this$defaultApiConfi3, _this$_configuration52;
|
|
984
990
|
if (!((_this$defaultApiConfi = this.defaultApiConfig) !== null && _this$defaultApiConfi !== void 0 && _this$defaultApiConfi.showInitWarnBanner) || ((_this$defaultApiConfi2 = this.defaultApiConfig) === null || _this$defaultApiConfi2 === void 0 ? void 0 : _this$defaultApiConfi2.showInitWarnBanner) === 'false') {
|
|
985
991
|
localStorage.removeItem('bannerViews');
|
|
986
992
|
}
|
|
987
|
-
return ((_this$defaultApiConfi3 = this.defaultApiConfig) === null || _this$defaultApiConfi3 === void 0 ? void 0 : _this$defaultApiConfi3.showInitWarnBanner) === 'true' && ((_this$
|
|
993
|
+
return ((_this$defaultApiConfi3 = this.defaultApiConfig) === null || _this$defaultApiConfi3 === void 0 ? void 0 : _this$defaultApiConfi3.showInitWarnBanner) === 'true' && ((_this$_configuration52 = this._configuration) === null || _this$_configuration52 === void 0 ? void 0 : _this$_configuration52.showInitWarnBanner);
|
|
988
994
|
}
|
|
989
995
|
}, {
|
|
990
996
|
key: "apiConfig",
|
|
991
997
|
get: function get() {
|
|
992
|
-
var _this$
|
|
993
|
-
return parseApiConfig((_this$
|
|
998
|
+
var _this$_configuration53;
|
|
999
|
+
return parseApiConfig((_this$_configuration53 = this._configuration) === null || _this$_configuration53 === void 0 ? void 0 : _this$_configuration53.api, this.defaultApiConfig, this.root.dataStore.organization);
|
|
994
1000
|
}
|
|
995
1001
|
}, {
|
|
996
1002
|
key: "applicationEnvironment",
|
|
997
1003
|
get: function get() {
|
|
998
|
-
var _this$_configuration$3, _this$
|
|
999
|
-
return (_this$_configuration$3 = (_this$
|
|
1004
|
+
var _this$_configuration$3, _this$_configuration54;
|
|
1005
|
+
return (_this$_configuration$3 = (_this$_configuration54 = this._configuration) === null || _this$_configuration54 === void 0 ? void 0 : _this$_configuration54.applicationEnvironment) !== null && _this$_configuration$3 !== void 0 ? _this$_configuration$3 : 'SELLER';
|
|
1000
1006
|
}
|
|
1001
1007
|
}, {
|
|
1002
1008
|
key: "priceFormat",
|
|
1003
1009
|
get: function get() {
|
|
1004
|
-
var _this$
|
|
1005
|
-
if ((_this$
|
|
1006
|
-
var _this$
|
|
1007
|
-
return _objectSpread$
|
|
1008
|
-
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$
|
|
1010
|
+
var _this$_configuration55;
|
|
1011
|
+
if ((_this$_configuration55 = this._configuration) !== null && _this$_configuration55 !== void 0 && _this$_configuration55.priceFormat) {
|
|
1012
|
+
var _this$_configuration56, _this$root$dataStore$2, _this$root$dataStore$3, _this$_configuration57;
|
|
1013
|
+
return _objectSpread$f(_objectSpread$f({}, (_this$_configuration56 = this._configuration) === null || _this$_configuration56 === void 0 ? void 0 : _this$_configuration56.priceFormat), {}, {
|
|
1014
|
+
currency: (_this$root$dataStore$2 = (_this$root$dataStore$3 = this.root.dataStore.organization) === null || _this$root$dataStore$3 === void 0 ? void 0 : _this$root$dataStore$3.settings.defaultCurrency) !== null && _this$root$dataStore$2 !== void 0 ? _this$root$dataStore$2 : (_this$_configuration57 = this._configuration) === null || _this$_configuration57 === void 0 ? void 0 : _this$_configuration57.priceFormat.currency
|
|
1009
1015
|
});
|
|
1010
1016
|
} else {
|
|
1011
1017
|
var _this$root$dataStore$4, _this$root$dataStore$5;
|
|
1012
|
-
return _objectSpread$
|
|
1018
|
+
return _objectSpread$f(_objectSpread$f({}, DivaUtils.defaultPriceFormat), {}, {
|
|
1013
1019
|
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
|
|
1014
1020
|
});
|
|
1015
1021
|
}
|
|
@@ -1017,17 +1023,17 @@ var ConfigurationStore = /*#__PURE__*/function () {
|
|
|
1017
1023
|
}, {
|
|
1018
1024
|
key: "countryCodesFile",
|
|
1019
1025
|
get: function get() {
|
|
1020
|
-
var _this$
|
|
1021
|
-
return (_this$
|
|
1026
|
+
var _this$_configuration58;
|
|
1027
|
+
return (_this$_configuration58 = this._configuration) === null || _this$_configuration58 === void 0 ? void 0 : _this$_configuration58.countryCodesFile;
|
|
1022
1028
|
}
|
|
1023
1029
|
}, {
|
|
1024
1030
|
key: "allowedOrganizationTypes",
|
|
1025
1031
|
get: function get() {
|
|
1026
|
-
var _this$
|
|
1027
|
-
if (!((_this$
|
|
1032
|
+
var _this$_configuration59, _this$_configuration60, _this$_configuration61, _this$_configuration62;
|
|
1033
|
+
if (!((_this$_configuration59 = this._configuration) !== null && _this$_configuration59 !== void 0 && _this$_configuration59.allowedOrganizationTypes)) {
|
|
1028
1034
|
return ['RETAILER'];
|
|
1029
1035
|
}
|
|
1030
|
-
return Array.isArray((_this$
|
|
1036
|
+
return Array.isArray((_this$_configuration60 = this._configuration) === null || _this$_configuration60 === void 0 ? void 0 : _this$_configuration60.allowedOrganizationTypes) ? (_this$_configuration61 = this._configuration) === null || _this$_configuration61 === void 0 ? void 0 : _this$_configuration61.allowedOrganizationTypes : [(_this$_configuration62 = this._configuration) === null || _this$_configuration62 === void 0 ? void 0 : _this$_configuration62.allowedOrganizationTypes];
|
|
1031
1037
|
}
|
|
1032
1038
|
}, {
|
|
1033
1039
|
key: "resetConfigurationCache",
|
|
@@ -1220,8 +1226,8 @@ function isIpadOS() {
|
|
|
1220
1226
|
return navigator.maxTouchPoints && navigator.maxTouchPoints > 2 && /MacIntel/.test(navigator.platform);
|
|
1221
1227
|
}
|
|
1222
1228
|
|
|
1223
|
-
function ownKeys$
|
|
1224
|
-
function _objectSpread$
|
|
1229
|
+
function ownKeys$e(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1230
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1225
1231
|
var LOG$c = getLogger('Framework', 'DataStore');
|
|
1226
1232
|
var DataStore = /*#__PURE__*/function () {
|
|
1227
1233
|
function DataStore(root) {
|
|
@@ -1259,8 +1265,8 @@ var DataStore = /*#__PURE__*/function () {
|
|
|
1259
1265
|
key: "organization",
|
|
1260
1266
|
get: function get() {
|
|
1261
1267
|
var _settings$defaultCurr, _settings;
|
|
1262
|
-
return this._organization ? _objectSpread$
|
|
1263
|
-
settings: _objectSpread$
|
|
1268
|
+
return this._organization ? _objectSpread$e(_objectSpread$e({}, this._organization), {}, {
|
|
1269
|
+
settings: _objectSpread$e(_objectSpread$e({}, this._organization.settings), {}, {
|
|
1264
1270
|
defaultCurrency: (_settings$defaultCurr = (_settings = this._organization.settings) === null || _settings === void 0 ? void 0 : _settings.defaultCurrency) !== null && _settings$defaultCurr !== void 0 ? _settings$defaultCurr : '€'
|
|
1265
1271
|
})
|
|
1266
1272
|
}) : this._organization;
|
|
@@ -1301,7 +1307,7 @@ var DataStore = /*#__PURE__*/function () {
|
|
|
1301
1307
|
return [].concat(_toConsumableArray(((_this$_organization$p = (_this$_organization$p2 = this._organization.parentOrganizations) === null || _this$_organization$p2 === void 0 ? void 0 : _this$_organization$p2.filter(function (org) {
|
|
1302
1308
|
return _this._parentOrganizations.includes(org._id);
|
|
1303
1309
|
})) !== null && _this$_organization$p !== void 0 ? _this$_organization$p : []).map(function (org) {
|
|
1304
|
-
return _objectSpread$
|
|
1310
|
+
return _objectSpread$e(_objectSpread$e({}, org), {}, {
|
|
1305
1311
|
type: org.type != 'SUPPLIER' ? org.parentType : undefined //supplier should not be accessed directly, only its children, so the simpliest solution is to remove here the type
|
|
1306
1312
|
});
|
|
1307
1313
|
}).reverse()), [{
|
|
@@ -1744,8 +1750,8 @@ var css_248z$6 = ".titlecontainer-LeRMj {\n text-align: center;\n color: #4747
|
|
|
1744
1750
|
styleInject(css_248z$6);
|
|
1745
1751
|
|
|
1746
1752
|
var _excluded$7 = ["className", "disabled", "children", "onClick", "style"];
|
|
1747
|
-
function ownKeys$
|
|
1748
|
-
function _objectSpread$
|
|
1753
|
+
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; }
|
|
1754
|
+
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; }
|
|
1749
1755
|
function AuthButton(_ref) {
|
|
1750
1756
|
var className = _ref.className,
|
|
1751
1757
|
disabled = _ref.disabled,
|
|
@@ -1753,7 +1759,7 @@ function AuthButton(_ref) {
|
|
|
1753
1759
|
onClick = _ref.onClick,
|
|
1754
1760
|
style = _ref.style,
|
|
1755
1761
|
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
1756
|
-
return /*#__PURE__*/jsx(Button, _objectSpread$
|
|
1762
|
+
return /*#__PURE__*/jsx(Button, _objectSpread$d(_objectSpread$d({
|
|
1757
1763
|
id: "submit",
|
|
1758
1764
|
variant: "contained",
|
|
1759
1765
|
disabled: disabled,
|
|
@@ -1766,8 +1772,8 @@ function AuthButton(_ref) {
|
|
|
1766
1772
|
}
|
|
1767
1773
|
|
|
1768
1774
|
var _excluded$6 = ["className", "readOnly", "resetInput"];
|
|
1769
|
-
function ownKeys$
|
|
1770
|
-
function _objectSpread$
|
|
1775
|
+
function ownKeys$c(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1776
|
+
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1771
1777
|
var Input = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1772
1778
|
var className = _ref.className,
|
|
1773
1779
|
readOnly = _ref.readOnly,
|
|
@@ -1777,7 +1783,7 @@ var Input = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1777
1783
|
style: {
|
|
1778
1784
|
position: 'relative'
|
|
1779
1785
|
},
|
|
1780
|
-
children: [/*#__PURE__*/jsx("input", _objectSpread$
|
|
1786
|
+
children: [/*#__PURE__*/jsx("input", _objectSpread$c({
|
|
1781
1787
|
ref: ref,
|
|
1782
1788
|
className: classnames(input, readOnly ? readonly : undefined, className),
|
|
1783
1789
|
readOnly: readOnly,
|
|
@@ -1969,8 +1975,8 @@ function Fallback () {
|
|
|
1969
1975
|
}
|
|
1970
1976
|
|
|
1971
1977
|
var _excluded$5 = ["children"];
|
|
1972
|
-
function ownKeys$
|
|
1973
|
-
function _objectSpread$
|
|
1978
|
+
function ownKeys$b(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; }
|
|
1979
|
+
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1974
1980
|
var LOG$a = getLogger('Framework', 'root');
|
|
1975
1981
|
var DivaCore = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1976
1982
|
var children = _ref.children,
|
|
@@ -1978,7 +1984,7 @@ var DivaCore = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1978
1984
|
useEffect(function () {
|
|
1979
1985
|
LOG$a.successTransaction('UNTIL_RENDER');
|
|
1980
1986
|
}, []);
|
|
1981
|
-
return /*#__PURE__*/jsx(DivaCoreProvider, _objectSpread$
|
|
1987
|
+
return /*#__PURE__*/jsx(DivaCoreProvider, _objectSpread$b(_objectSpread$b({}, props), {}, {
|
|
1982
1988
|
ref: ref,
|
|
1983
1989
|
children: /*#__PURE__*/jsx(ContentWrapper, {
|
|
1984
1990
|
children: /*#__PURE__*/jsx(Fragment, {
|
|
@@ -2107,8 +2113,8 @@ var _excluded$4 = ["openFrom"],
|
|
|
2107
2113
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
2108
2114
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
2109
2115
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
2110
|
-
function ownKeys$
|
|
2111
|
-
function _objectSpread$
|
|
2116
|
+
function ownKeys$a(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; }
|
|
2117
|
+
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2112
2118
|
var LOG$9 = getLogger('Framework', 'ContentStore');
|
|
2113
2119
|
var ContentStore = /*#__PURE__*/function () {
|
|
2114
2120
|
function ContentStore(components, root) {
|
|
@@ -2445,8 +2451,8 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
2445
2451
|
currentState = this.state.get(config.type);
|
|
2446
2452
|
componentState = {};
|
|
2447
2453
|
componentState.settings = toJS(settings);
|
|
2448
|
-
componentState.parameters = _objectSpread$
|
|
2449
|
-
componentState.internal = _objectSpread$
|
|
2454
|
+
componentState.parameters = _objectSpread$a(_objectSpread$a({}, keepOldState && currentState ? currentState.parameters : {}), parameters);
|
|
2455
|
+
componentState.internal = _objectSpread$a(_objectSpread$a({}, keepOldState && currentState ? currentState.internal : {}), internal);
|
|
2450
2456
|
componentState.path = route;
|
|
2451
2457
|
this.state.set(config.type, componentState);
|
|
2452
2458
|
this.visible = config.type;
|
|
@@ -3057,7 +3063,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3057
3063
|
onClose = _ref3$onClose === void 0 ? this.closeSideMenu.bind(this) : _ref3$onClose,
|
|
3058
3064
|
sideMenu = _objectWithoutProperties(_ref3, _excluded2$1);
|
|
3059
3065
|
if (sideMenu.open === undefined) sideMenu.open = (_this$_sideMenu$open = (_this$_sideMenu = this._sideMenu) === null || _this$_sideMenu === void 0 ? void 0 : _this$_sideMenu.open) !== null && _this$_sideMenu$open !== void 0 ? _this$_sideMenu$open : false;
|
|
3060
|
-
this._sideMenu = _objectSpread$
|
|
3066
|
+
this._sideMenu = _objectSpread$a(_objectSpread$a({}, sideMenu), {}, {
|
|
3061
3067
|
onClose: onClose
|
|
3062
3068
|
});
|
|
3063
3069
|
}
|
|
@@ -3068,7 +3074,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3068
3074
|
}, {
|
|
3069
3075
|
key: "closeSideMenu",
|
|
3070
3076
|
value: function closeSideMenu() {
|
|
3071
|
-
if (this._sideMenu) this._sideMenu = _objectSpread$
|
|
3077
|
+
if (this._sideMenu) this._sideMenu = _objectSpread$a(_objectSpread$a({}, this._sideMenu), {}, {
|
|
3072
3078
|
open: false
|
|
3073
3079
|
});
|
|
3074
3080
|
}
|
|
@@ -3125,7 +3131,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3125
3131
|
type: barrier.type,
|
|
3126
3132
|
currentEmail: (_this$root$dataStore$7 = this.root.dataStore.user) === null || _this$root$dataStore$7 === void 0 ? void 0 : _this$root$dataStore$7.mainEmail,
|
|
3127
3133
|
actions: (_barrier$actions = barrier.actions) === null || _barrier$actions === void 0 ? void 0 : _barrier$actions.map(function (a) {
|
|
3128
|
-
return _objectSpread$
|
|
3134
|
+
return _objectSpread$a(_objectSpread$a({}, a), {}, {
|
|
3129
3135
|
onClick: function () {
|
|
3130
3136
|
var _onClick = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(email) {
|
|
3131
3137
|
var _this8$root$dataStore;
|
|
@@ -3276,7 +3282,7 @@ var ContentStore = /*#__PURE__*/function () {
|
|
|
3276
3282
|
key: "getState",
|
|
3277
3283
|
value: function getState(type) {
|
|
3278
3284
|
var state = this.state.get(type);
|
|
3279
|
-
return state ? _objectSpread$
|
|
3285
|
+
return state ? _objectSpread$a(_objectSpread$a({}, state), {}, {
|
|
3280
3286
|
isVisible: this.isVisible(type)
|
|
3281
3287
|
}) : {
|
|
3282
3288
|
settings: {}
|
|
@@ -4312,8 +4318,8 @@ var BrowserStateStore = /*#__PURE__*/function () {
|
|
|
4312
4318
|
}]);
|
|
4313
4319
|
}();
|
|
4314
4320
|
|
|
4315
|
-
function ownKeys$
|
|
4316
|
-
function _objectSpread$
|
|
4321
|
+
function ownKeys$9(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; }
|
|
4322
|
+
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4317
4323
|
var LOG$6 = getLogger('Framework', 'AuthorizationStore');
|
|
4318
4324
|
var AuthorizationStore = /*#__PURE__*/function () {
|
|
4319
4325
|
function AuthorizationStore(root) {
|
|
@@ -4371,7 +4377,7 @@ var AuthorizationStore = /*#__PURE__*/function () {
|
|
|
4371
4377
|
if (debug) {
|
|
4372
4378
|
this._state = {
|
|
4373
4379
|
type: 'LOGIN',
|
|
4374
|
-
loginMethods: _objectSpread$
|
|
4380
|
+
loginMethods: _objectSpread$9(_objectSpread$9({}, loginMethods), {}, {
|
|
4375
4381
|
standard: true
|
|
4376
4382
|
}),
|
|
4377
4383
|
organizationId: organizationId
|
|
@@ -4548,7 +4554,8 @@ var AuthorizationStore = /*#__PURE__*/function () {
|
|
|
4548
4554
|
organizationId: organizationId,
|
|
4549
4555
|
nToken: nToken !== null && nToken !== void 0 ? nToken : this._nToken,
|
|
4550
4556
|
validParents: this.root.configurationStore.organizations.includes('*') ? undefined : this.root.configurationStore.organizations,
|
|
4551
|
-
validOrganizationTypes: this.root.configurationStore.allowedOrganizationTypes
|
|
4557
|
+
validOrganizationTypes: this.root.configurationStore.allowedOrganizationTypes,
|
|
4558
|
+
excludeOrganizations: this.root.configurationStore.excludedOrganizations
|
|
4552
4559
|
});
|
|
4553
4560
|
case 5:
|
|
4554
4561
|
authorizationData = _context3.sent;
|
|
@@ -4610,6 +4617,7 @@ var AuthorizationStore = /*#__PURE__*/function () {
|
|
|
4610
4617
|
invitationId: invitationId,
|
|
4611
4618
|
validParents: this.root.configurationStore.organizations.includes('*') ? undefined : this.root.configurationStore.organizations,
|
|
4612
4619
|
validOrganizationTypes: this.root.configurationStore.allowedOrganizationTypes,
|
|
4620
|
+
excludeOrganizations: this.root.configurationStore.excludedOrganizations,
|
|
4613
4621
|
otp: otp
|
|
4614
4622
|
});
|
|
4615
4623
|
case 4:
|
|
@@ -4653,6 +4661,7 @@ var AuthorizationStore = /*#__PURE__*/function () {
|
|
|
4653
4661
|
simple: loginSimple,
|
|
4654
4662
|
validParents: this.root.configurationStore.organizations.includes('*') ? undefined : this.root.configurationStore.organizations,
|
|
4655
4663
|
validOrganizationTypes: this.root.configurationStore.allowedOrganizationTypes,
|
|
4664
|
+
excludeOrganizations: this.root.configurationStore.excludedOrganizations,
|
|
4656
4665
|
invitationId: invitationId,
|
|
4657
4666
|
otp: otp
|
|
4658
4667
|
});
|
|
@@ -5464,6 +5473,7 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5464
5473
|
var organizationId,
|
|
5465
5474
|
skip,
|
|
5466
5475
|
allowed,
|
|
5476
|
+
excluded,
|
|
5467
5477
|
limit,
|
|
5468
5478
|
filterText,
|
|
5469
5479
|
url,
|
|
@@ -5475,49 +5485,51 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5475
5485
|
organizationId = _args10.length > 2 && _args10[2] !== undefined ? _args10[2] : 'ROOT';
|
|
5476
5486
|
skip = _args10.length > 3 ? _args10[3] : undefined;
|
|
5477
5487
|
allowed = _args10.length > 4 ? _args10[4] : undefined;
|
|
5478
|
-
|
|
5479
|
-
|
|
5488
|
+
excluded = _args10.length > 5 ? _args10[5] : undefined;
|
|
5489
|
+
limit = _args10.length > 6 ? _args10[6] : undefined;
|
|
5490
|
+
filterText = _args10.length > 7 ? _args10[7] : undefined;
|
|
5480
5491
|
url = new URL("".concat(this.authService, "/v2/users/").concat(userId, "/organizations/").concat(organizationId, "/children"));
|
|
5481
5492
|
url.searchParams.append('organizationTypes', allowedOrganizationTypes.join(','));
|
|
5482
5493
|
if (allowed) url.searchParams.append('validParents', allowed.join(','));
|
|
5494
|
+
if (excluded) url.searchParams.append('excluded', excluded.join(','));
|
|
5483
5495
|
if (skip) url.searchParams.append('skip', skip.toString());
|
|
5484
5496
|
if (limit) url.searchParams.append('limit', limit.toString());
|
|
5485
5497
|
if (filterText) url.searchParams.append('filterText', encodeURIComponent(filterText.toString()));
|
|
5486
|
-
_context10.prev =
|
|
5487
|
-
_context10.next =
|
|
5498
|
+
_context10.prev = 13;
|
|
5499
|
+
_context10.next = 16;
|
|
5488
5500
|
return this.fetch({
|
|
5489
5501
|
url: url.toString(),
|
|
5490
5502
|
jwt: this.jwt
|
|
5491
5503
|
});
|
|
5492
|
-
case
|
|
5504
|
+
case 16:
|
|
5493
5505
|
response = _context10.sent;
|
|
5494
5506
|
if (!response.ok) {
|
|
5495
|
-
_context10.next =
|
|
5507
|
+
_context10.next = 19;
|
|
5496
5508
|
break;
|
|
5497
5509
|
}
|
|
5498
5510
|
return _context10.abrupt("return", response.json());
|
|
5499
|
-
case
|
|
5511
|
+
case 19:
|
|
5500
5512
|
throw new DivaError("Error from server while searching organizations. HTTP status: ".concat(response.status), {
|
|
5501
5513
|
code: 'CORE_0001'
|
|
5502
5514
|
});
|
|
5503
|
-
case
|
|
5504
|
-
_context10.prev =
|
|
5505
|
-
_context10.t0 = _context10["catch"](
|
|
5515
|
+
case 22:
|
|
5516
|
+
_context10.prev = 22;
|
|
5517
|
+
_context10.t0 = _context10["catch"](13);
|
|
5506
5518
|
if (!(_context10.t0 instanceof DivaError)) {
|
|
5507
|
-
_context10.next =
|
|
5519
|
+
_context10.next = 26;
|
|
5508
5520
|
break;
|
|
5509
5521
|
}
|
|
5510
5522
|
throw _context10.t0;
|
|
5511
|
-
case
|
|
5523
|
+
case 26:
|
|
5512
5524
|
throw new DivaError('Error while searching organizations', {
|
|
5513
5525
|
code: 'CORE_0001',
|
|
5514
5526
|
cause: _context10.t0
|
|
5515
5527
|
});
|
|
5516
|
-
case
|
|
5528
|
+
case 27:
|
|
5517
5529
|
case "end":
|
|
5518
5530
|
return _context10.stop();
|
|
5519
5531
|
}
|
|
5520
|
-
}, _callee10, this, [[
|
|
5532
|
+
}, _callee10, this, [[13, 22]]);
|
|
5521
5533
|
}));
|
|
5522
5534
|
function getOrganizationsChildren(_x11, _x12) {
|
|
5523
5535
|
return _getOrganizationsChildren.apply(this, arguments);
|
|
@@ -5530,6 +5542,7 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5530
5542
|
var _getOrganizationRelatives = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(userId, allowedOrganizationTypes, organizationId) {
|
|
5531
5543
|
var skip,
|
|
5532
5544
|
allowed,
|
|
5545
|
+
excluded,
|
|
5533
5546
|
limit,
|
|
5534
5547
|
url,
|
|
5535
5548
|
response,
|
|
@@ -5539,48 +5552,50 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5539
5552
|
case 0:
|
|
5540
5553
|
skip = _args11.length > 3 && _args11[3] !== undefined ? _args11[3] : 0;
|
|
5541
5554
|
allowed = _args11.length > 4 ? _args11[4] : undefined;
|
|
5542
|
-
|
|
5555
|
+
excluded = _args11.length > 5 ? _args11[5] : undefined;
|
|
5556
|
+
limit = _args11.length > 6 ? _args11[6] : undefined;
|
|
5543
5557
|
url = new URL("".concat(this.authService, "/v2/users/").concat(userId, "/organizations/relatives"));
|
|
5544
5558
|
url.searchParams.append('organizationTypes', allowedOrganizationTypes.join(','));
|
|
5545
5559
|
url.searchParams.append('skip', skip.toString());
|
|
5546
5560
|
if (organizationId) url.searchParams.append('organizationId', organizationId);
|
|
5547
5561
|
if (limit) url.searchParams.append('limit', limit.toString());
|
|
5548
5562
|
if (allowed) url.searchParams.append('allowed', allowed.join());
|
|
5549
|
-
|
|
5550
|
-
_context11.
|
|
5563
|
+
if (excluded) url.searchParams.append('excluded', excluded.join());
|
|
5564
|
+
_context11.prev = 11;
|
|
5565
|
+
_context11.next = 14;
|
|
5551
5566
|
return this.fetch({
|
|
5552
5567
|
url: url.toString(),
|
|
5553
5568
|
jwt: this.jwt
|
|
5554
5569
|
});
|
|
5555
|
-
case
|
|
5570
|
+
case 14:
|
|
5556
5571
|
response = _context11.sent;
|
|
5557
5572
|
if (!response.ok) {
|
|
5558
|
-
_context11.next =
|
|
5573
|
+
_context11.next = 17;
|
|
5559
5574
|
break;
|
|
5560
5575
|
}
|
|
5561
5576
|
return _context11.abrupt("return", response.json());
|
|
5562
|
-
case
|
|
5577
|
+
case 17:
|
|
5563
5578
|
throw new DivaError("Error from server while searching organizations. HTTP status: ".concat(response.status), {
|
|
5564
5579
|
code: 'CORE_0001'
|
|
5565
5580
|
});
|
|
5566
|
-
case
|
|
5567
|
-
_context11.prev =
|
|
5568
|
-
_context11.t0 = _context11["catch"](
|
|
5581
|
+
case 20:
|
|
5582
|
+
_context11.prev = 20;
|
|
5583
|
+
_context11.t0 = _context11["catch"](11);
|
|
5569
5584
|
if (!(_context11.t0 instanceof DivaError)) {
|
|
5570
|
-
_context11.next =
|
|
5585
|
+
_context11.next = 24;
|
|
5571
5586
|
break;
|
|
5572
5587
|
}
|
|
5573
5588
|
throw _context11.t0;
|
|
5574
|
-
case
|
|
5589
|
+
case 24:
|
|
5575
5590
|
throw new DivaError('Error while searching organizations', {
|
|
5576
5591
|
code: 'CORE_0001',
|
|
5577
5592
|
cause: _context11.t0
|
|
5578
5593
|
});
|
|
5579
|
-
case
|
|
5594
|
+
case 25:
|
|
5580
5595
|
case "end":
|
|
5581
5596
|
return _context11.stop();
|
|
5582
5597
|
}
|
|
5583
|
-
}, _callee11, this, [[
|
|
5598
|
+
}, _callee11, this, [[11, 20]]);
|
|
5584
5599
|
}));
|
|
5585
5600
|
function getOrganizationRelatives(_x13, _x14, _x15) {
|
|
5586
5601
|
return _getOrganizationRelatives.apply(this, arguments);
|
|
@@ -5588,30 +5603,31 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5588
5603
|
return getOrganizationRelatives;
|
|
5589
5604
|
}()
|
|
5590
5605
|
}, {
|
|
5591
|
-
key: "
|
|
5606
|
+
key: "getOrganizationBySearch",
|
|
5592
5607
|
value: function () {
|
|
5593
|
-
var
|
|
5608
|
+
var _getOrganizationBySearch = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(userId, allowedOrganizationTypes, allowed, excluded, query) {
|
|
5594
5609
|
var skip,
|
|
5595
|
-
organizationId,
|
|
5596
5610
|
url,
|
|
5597
5611
|
response,
|
|
5598
5612
|
_args12 = arguments;
|
|
5599
5613
|
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
5600
5614
|
while (1) switch (_context12.prev = _context12.next) {
|
|
5601
5615
|
case 0:
|
|
5602
|
-
skip = _args12.length >
|
|
5603
|
-
|
|
5604
|
-
url
|
|
5605
|
-
url.searchParams.append('limit', '10');
|
|
5616
|
+
skip = _args12.length > 5 && _args12[5] !== undefined ? _args12[5] : 0;
|
|
5617
|
+
url = new URL("".concat(this.authService, "/v2/users/").concat(userId, "/organizations/hirachy"));
|
|
5618
|
+
url.searchParams.append('limit', '20');
|
|
5606
5619
|
url.searchParams.append('fields', '{_id,displayName,parentOrganizations}');
|
|
5607
5620
|
url.searchParams.append('organizationTypes', allowedOrganizationTypes.join(','));
|
|
5608
5621
|
url.searchParams.append('skip', skip.toString());
|
|
5609
|
-
if (
|
|
5610
|
-
url.searchParams.append('
|
|
5622
|
+
if (query) {
|
|
5623
|
+
url.searchParams.append('filter', encodeURIComponent("[+[{displayName,contains,".concat(query, "},{_id,eq,").concat(query, "}]]")));
|
|
5611
5624
|
}
|
|
5612
5625
|
if (allowed) {
|
|
5613
5626
|
url.searchParams.append('allowed', allowed.join());
|
|
5614
5627
|
}
|
|
5628
|
+
if (excluded) {
|
|
5629
|
+
url.searchParams.append('excluded', excluded.join());
|
|
5630
|
+
}
|
|
5615
5631
|
_context12.prev = 9;
|
|
5616
5632
|
_context12.next = 12;
|
|
5617
5633
|
return this.fetch({
|
|
@@ -5648,71 +5664,7 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5648
5664
|
}
|
|
5649
5665
|
}, _callee12, this, [[9, 18]]);
|
|
5650
5666
|
}));
|
|
5651
|
-
function
|
|
5652
|
-
return _getOrganizationHyrachy.apply(this, arguments);
|
|
5653
|
-
}
|
|
5654
|
-
return getOrganizationHyrachy;
|
|
5655
|
-
}()
|
|
5656
|
-
}, {
|
|
5657
|
-
key: "getOrganizationBySearch",
|
|
5658
|
-
value: function () {
|
|
5659
|
-
var _getOrganizationBySearch = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(userId, allowedOrganizationTypes, allowed, query) {
|
|
5660
|
-
var skip,
|
|
5661
|
-
url,
|
|
5662
|
-
response,
|
|
5663
|
-
_args13 = arguments;
|
|
5664
|
-
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
5665
|
-
while (1) switch (_context13.prev = _context13.next) {
|
|
5666
|
-
case 0:
|
|
5667
|
-
skip = _args13.length > 4 && _args13[4] !== undefined ? _args13[4] : 0;
|
|
5668
|
-
url = new URL("".concat(this.authService, "/v2/users/").concat(userId, "/organizations/hirachy"));
|
|
5669
|
-
url.searchParams.append('limit', '20');
|
|
5670
|
-
url.searchParams.append('fields', '{_id,displayName,parentOrganizations}');
|
|
5671
|
-
url.searchParams.append('organizationTypes', allowedOrganizationTypes.join(','));
|
|
5672
|
-
url.searchParams.append('skip', skip.toString());
|
|
5673
|
-
if (query) {
|
|
5674
|
-
url.searchParams.append('filter', encodeURIComponent("[+[{displayName,contains,".concat(query, "},{_id,eq,").concat(query, "}]]")));
|
|
5675
|
-
}
|
|
5676
|
-
if (allowed) {
|
|
5677
|
-
url.searchParams.append('allowed', allowed.join());
|
|
5678
|
-
}
|
|
5679
|
-
_context13.prev = 8;
|
|
5680
|
-
_context13.next = 11;
|
|
5681
|
-
return this.fetch({
|
|
5682
|
-
url: url.toString(),
|
|
5683
|
-
jwt: this.jwt
|
|
5684
|
-
});
|
|
5685
|
-
case 11:
|
|
5686
|
-
response = _context13.sent;
|
|
5687
|
-
if (!response.ok) {
|
|
5688
|
-
_context13.next = 14;
|
|
5689
|
-
break;
|
|
5690
|
-
}
|
|
5691
|
-
return _context13.abrupt("return", response.json());
|
|
5692
|
-
case 14:
|
|
5693
|
-
throw new DivaError("Error from server while searching organizations. HTTP status: ".concat(response.status), {
|
|
5694
|
-
code: 'CORE_0001'
|
|
5695
|
-
});
|
|
5696
|
-
case 17:
|
|
5697
|
-
_context13.prev = 17;
|
|
5698
|
-
_context13.t0 = _context13["catch"](8);
|
|
5699
|
-
if (!(_context13.t0 instanceof DivaError)) {
|
|
5700
|
-
_context13.next = 21;
|
|
5701
|
-
break;
|
|
5702
|
-
}
|
|
5703
|
-
throw _context13.t0;
|
|
5704
|
-
case 21:
|
|
5705
|
-
throw new DivaError('Error while searching organizations', {
|
|
5706
|
-
code: 'CORE_0001',
|
|
5707
|
-
cause: _context13.t0
|
|
5708
|
-
});
|
|
5709
|
-
case 22:
|
|
5710
|
-
case "end":
|
|
5711
|
-
return _context13.stop();
|
|
5712
|
-
}
|
|
5713
|
-
}, _callee13, this, [[8, 17]]);
|
|
5714
|
-
}));
|
|
5715
|
-
function getOrganizationBySearch(_x20, _x21, _x22, _x23) {
|
|
5667
|
+
function getOrganizationBySearch(_x16, _x17, _x18, _x19, _x20) {
|
|
5716
5668
|
return _getOrganizationBySearch.apply(this, arguments);
|
|
5717
5669
|
}
|
|
5718
5670
|
return getOrganizationBySearch;
|
|
@@ -5720,53 +5672,53 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5720
5672
|
}, {
|
|
5721
5673
|
key: "getOrganizationParentByType",
|
|
5722
5674
|
value: function () {
|
|
5723
|
-
var _getOrganizationParentByType = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
5675
|
+
var _getOrganizationParentByType = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(organizationId, type) {
|
|
5724
5676
|
var url, response, _data$data, data;
|
|
5725
|
-
return _regeneratorRuntime.wrap(function
|
|
5726
|
-
while (1) switch (
|
|
5677
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
5678
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
5727
5679
|
case 0:
|
|
5728
5680
|
url = new URL("".concat(this.authService, "/v2/organizations/").concat(organizationId, "/parents/").concat(type.toLocaleLowerCase()));
|
|
5729
|
-
|
|
5730
|
-
|
|
5681
|
+
_context13.prev = 1;
|
|
5682
|
+
_context13.next = 4;
|
|
5731
5683
|
return this.fetch({
|
|
5732
5684
|
url: url.toString(),
|
|
5733
5685
|
jwt: this.jwt
|
|
5734
5686
|
});
|
|
5735
5687
|
case 4:
|
|
5736
|
-
response =
|
|
5688
|
+
response = _context13.sent;
|
|
5737
5689
|
if (!response.ok) {
|
|
5738
|
-
|
|
5690
|
+
_context13.next = 10;
|
|
5739
5691
|
break;
|
|
5740
5692
|
}
|
|
5741
|
-
|
|
5693
|
+
_context13.next = 8;
|
|
5742
5694
|
return response.json();
|
|
5743
5695
|
case 8:
|
|
5744
|
-
data =
|
|
5745
|
-
return
|
|
5696
|
+
data = _context13.sent;
|
|
5697
|
+
return _context13.abrupt("return", (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data[0]);
|
|
5746
5698
|
case 10:
|
|
5747
5699
|
throw new DivaError("Error from server while searching organizations. HTTP status: ".concat(response.status), {
|
|
5748
5700
|
code: 'CORE_0001'
|
|
5749
5701
|
});
|
|
5750
5702
|
case 13:
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
if (!(
|
|
5754
|
-
|
|
5703
|
+
_context13.prev = 13;
|
|
5704
|
+
_context13.t0 = _context13["catch"](1);
|
|
5705
|
+
if (!(_context13.t0 instanceof DivaError)) {
|
|
5706
|
+
_context13.next = 17;
|
|
5755
5707
|
break;
|
|
5756
5708
|
}
|
|
5757
|
-
throw
|
|
5709
|
+
throw _context13.t0;
|
|
5758
5710
|
case 17:
|
|
5759
5711
|
throw new DivaError('Error while getting organization', {
|
|
5760
5712
|
code: 'CORE_0001',
|
|
5761
|
-
cause:
|
|
5713
|
+
cause: _context13.t0
|
|
5762
5714
|
});
|
|
5763
5715
|
case 18:
|
|
5764
5716
|
case "end":
|
|
5765
|
-
return
|
|
5717
|
+
return _context13.stop();
|
|
5766
5718
|
}
|
|
5767
|
-
},
|
|
5719
|
+
}, _callee13, this, [[1, 13]]);
|
|
5768
5720
|
}));
|
|
5769
|
-
function getOrganizationParentByType(
|
|
5721
|
+
function getOrganizationParentByType(_x21, _x22) {
|
|
5770
5722
|
return _getOrganizationParentByType.apply(this, arguments);
|
|
5771
5723
|
}
|
|
5772
5724
|
return getOrganizationParentByType;
|
|
@@ -5774,10 +5726,10 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5774
5726
|
}, {
|
|
5775
5727
|
key: "getRetailerLocationsForArea",
|
|
5776
5728
|
value: function () {
|
|
5777
|
-
var _getRetailerLocationsForArea = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
5729
|
+
var _getRetailerLocationsForArea = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(organizationId, location, radius) {
|
|
5778
5730
|
var url, response;
|
|
5779
|
-
return _regeneratorRuntime.wrap(function
|
|
5780
|
-
while (1) switch (
|
|
5731
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
5732
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
5781
5733
|
case 0:
|
|
5782
5734
|
url = new URL("".concat(this.authService, "/organizations/").concat(organizationId, "/retailer-locations"));
|
|
5783
5735
|
if (location) {
|
|
@@ -5785,43 +5737,43 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5785
5737
|
url.searchParams.append('lng', String(location.lng()));
|
|
5786
5738
|
}
|
|
5787
5739
|
url.searchParams.append('radius', radius);
|
|
5788
|
-
|
|
5789
|
-
|
|
5740
|
+
_context14.prev = 3;
|
|
5741
|
+
_context14.next = 6;
|
|
5790
5742
|
return this.fetch({
|
|
5791
5743
|
url: url.toString(),
|
|
5792
5744
|
jwt: this.jwt
|
|
5793
5745
|
});
|
|
5794
5746
|
case 6:
|
|
5795
|
-
response =
|
|
5747
|
+
response = _context14.sent;
|
|
5796
5748
|
if (!response.ok) {
|
|
5797
|
-
|
|
5749
|
+
_context14.next = 9;
|
|
5798
5750
|
break;
|
|
5799
5751
|
}
|
|
5800
|
-
return
|
|
5752
|
+
return _context14.abrupt("return", response.json());
|
|
5801
5753
|
case 9:
|
|
5802
5754
|
throw new DivaError("Error from server while searching retailer locations. HTTP status: ".concat(response.status), {
|
|
5803
5755
|
code: 'CORE_0001'
|
|
5804
5756
|
});
|
|
5805
5757
|
case 12:
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
if (!(
|
|
5809
|
-
|
|
5758
|
+
_context14.prev = 12;
|
|
5759
|
+
_context14.t0 = _context14["catch"](3);
|
|
5760
|
+
if (!(_context14.t0 instanceof DivaError)) {
|
|
5761
|
+
_context14.next = 16;
|
|
5810
5762
|
break;
|
|
5811
5763
|
}
|
|
5812
|
-
throw
|
|
5764
|
+
throw _context14.t0;
|
|
5813
5765
|
case 16:
|
|
5814
5766
|
throw new DivaError('Error while getting retailer locations', {
|
|
5815
5767
|
code: 'CORE_0001',
|
|
5816
|
-
cause:
|
|
5768
|
+
cause: _context14.t0
|
|
5817
5769
|
});
|
|
5818
5770
|
case 17:
|
|
5819
5771
|
case "end":
|
|
5820
|
-
return
|
|
5772
|
+
return _context14.stop();
|
|
5821
5773
|
}
|
|
5822
|
-
},
|
|
5774
|
+
}, _callee14, this, [[3, 12]]);
|
|
5823
5775
|
}));
|
|
5824
|
-
function getRetailerLocationsForArea(
|
|
5776
|
+
function getRetailerLocationsForArea(_x23, _x24, _x25) {
|
|
5825
5777
|
return _getRetailerLocationsForArea.apply(this, arguments);
|
|
5826
5778
|
}
|
|
5827
5779
|
return getRetailerLocationsForArea;
|
|
@@ -5837,10 +5789,10 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5837
5789
|
};
|
|
5838
5790
|
return fetch;
|
|
5839
5791
|
}(/*#__PURE__*/function () {
|
|
5840
|
-
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
5792
|
+
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(_ref6) {
|
|
5841
5793
|
var url, _ref6$method, method, jwt, body, headers;
|
|
5842
|
-
return _regeneratorRuntime.wrap(function
|
|
5843
|
-
while (1) switch (
|
|
5794
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
5795
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
5844
5796
|
case 0:
|
|
5845
5797
|
url = _ref6.url, _ref6$method = _ref6.method, method = _ref6$method === void 0 ? 'GET' : _ref6$method, jwt = _ref6.jwt, body = _ref6.body;
|
|
5846
5798
|
headers = {
|
|
@@ -5850,21 +5802,21 @@ var ApiHandler = /*#__PURE__*/function () {
|
|
|
5850
5802
|
if (jwt) {
|
|
5851
5803
|
headers.Authorization = "Bearer ".concat(jwt);
|
|
5852
5804
|
}
|
|
5853
|
-
|
|
5805
|
+
_context15.next = 5;
|
|
5854
5806
|
return fetch(url, {
|
|
5855
5807
|
method: method,
|
|
5856
5808
|
headers: headers,
|
|
5857
5809
|
body: body ? JSON.stringify(body) : undefined
|
|
5858
5810
|
});
|
|
5859
5811
|
case 5:
|
|
5860
|
-
return
|
|
5812
|
+
return _context15.abrupt("return", _context15.sent);
|
|
5861
5813
|
case 6:
|
|
5862
5814
|
case "end":
|
|
5863
|
-
return
|
|
5815
|
+
return _context15.stop();
|
|
5864
5816
|
}
|
|
5865
|
-
},
|
|
5817
|
+
}, _callee15);
|
|
5866
5818
|
}));
|
|
5867
|
-
return function (
|
|
5819
|
+
return function (_x26) {
|
|
5868
5820
|
return _ref7.apply(this, arguments);
|
|
5869
5821
|
};
|
|
5870
5822
|
}())
|
|
@@ -5902,61 +5854,38 @@ var OrganizationHandler = /*#__PURE__*/function () {
|
|
|
5902
5854
|
return this.root.validOrganizations;
|
|
5903
5855
|
}
|
|
5904
5856
|
}, {
|
|
5905
|
-
key: "
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
while (1) switch (_context.prev = _context.next) {
|
|
5910
|
-
case 0:
|
|
5911
|
-
if (!this.user) {
|
|
5912
|
-
_context.next = 2;
|
|
5913
|
-
break;
|
|
5914
|
-
}
|
|
5915
|
-
return _context.abrupt("return", this.apiHandler.getOrganizationHyrachy(this.user._id, this.allowedOrganizationTypes, query, this.validOrganizations, skip, organizationId));
|
|
5916
|
-
case 2:
|
|
5917
|
-
return _context.abrupt("return", {
|
|
5918
|
-
data: [],
|
|
5919
|
-
total: 0
|
|
5920
|
-
});
|
|
5921
|
-
case 3:
|
|
5922
|
-
case "end":
|
|
5923
|
-
return _context.stop();
|
|
5924
|
-
}
|
|
5925
|
-
}, _callee, this);
|
|
5926
|
-
}));
|
|
5927
|
-
function getOrganizationHirachy(_x, _x2, _x3) {
|
|
5928
|
-
return _getOrganizationHirachy.apply(this, arguments);
|
|
5929
|
-
}
|
|
5930
|
-
return getOrganizationHirachy;
|
|
5931
|
-
}()
|
|
5857
|
+
key: "excludedOrganizations",
|
|
5858
|
+
get: function get() {
|
|
5859
|
+
return this.root.excludedOrganizations;
|
|
5860
|
+
}
|
|
5932
5861
|
}, {
|
|
5933
5862
|
key: "getOrganizationsChildren",
|
|
5934
5863
|
value: function () {
|
|
5935
|
-
var _getOrganizationsChildren = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
5936
|
-
return _regeneratorRuntime.wrap(function
|
|
5937
|
-
while (1) switch (
|
|
5864
|
+
var _getOrganizationsChildren = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(organizationId, skip, limit, filterText) {
|
|
5865
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
5866
|
+
while (1) switch (_context.prev = _context.next) {
|
|
5938
5867
|
case 0:
|
|
5939
5868
|
if (!this.user) {
|
|
5940
|
-
|
|
5869
|
+
_context.next = 4;
|
|
5941
5870
|
break;
|
|
5942
5871
|
}
|
|
5943
|
-
|
|
5944
|
-
return this.apiHandler.getOrganizationsChildren(this.user._id, this.allowedOrganizationTypes, organizationId, skip, this.validOrganizations, limit, filterText);
|
|
5872
|
+
_context.next = 3;
|
|
5873
|
+
return this.apiHandler.getOrganizationsChildren(this.user._id, this.allowedOrganizationTypes, organizationId, skip, this.validOrganizations, this.excludedOrganizations, limit, filterText);
|
|
5945
5874
|
case 3:
|
|
5946
|
-
return
|
|
5875
|
+
return _context.abrupt("return", _context.sent);
|
|
5947
5876
|
case 4:
|
|
5948
|
-
return
|
|
5877
|
+
return _context.abrupt("return", {
|
|
5949
5878
|
data: [],
|
|
5950
5879
|
total: 0,
|
|
5951
5880
|
flatTotal: 0
|
|
5952
5881
|
});
|
|
5953
5882
|
case 5:
|
|
5954
5883
|
case "end":
|
|
5955
|
-
return
|
|
5884
|
+
return _context.stop();
|
|
5956
5885
|
}
|
|
5957
|
-
},
|
|
5886
|
+
}, _callee, this);
|
|
5958
5887
|
}));
|
|
5959
|
-
function getOrganizationsChildren(
|
|
5888
|
+
function getOrganizationsChildren(_x, _x2, _x3, _x4) {
|
|
5960
5889
|
return _getOrganizationsChildren.apply(this, arguments);
|
|
5961
5890
|
}
|
|
5962
5891
|
return getOrganizationsChildren;
|
|
@@ -5964,36 +5893,36 @@ var OrganizationHandler = /*#__PURE__*/function () {
|
|
|
5964
5893
|
}, {
|
|
5965
5894
|
key: "getOrganizationRelatives",
|
|
5966
5895
|
value: function () {
|
|
5967
|
-
var _getOrganizationRelatives = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
5896
|
+
var _getOrganizationRelatives = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(organizationId, skip, limit) {
|
|
5968
5897
|
var result;
|
|
5969
|
-
return _regeneratorRuntime.wrap(function
|
|
5970
|
-
while (1) switch (
|
|
5898
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
5899
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
5971
5900
|
case 0:
|
|
5972
5901
|
if (!this.user) {
|
|
5973
|
-
|
|
5902
|
+
_context2.next = 5;
|
|
5974
5903
|
break;
|
|
5975
5904
|
}
|
|
5976
|
-
|
|
5977
|
-
return this.apiHandler.getOrganizationRelatives(this.user._id, this.allowedOrganizationTypes, organizationId, skip, this.validOrganizations, limit);
|
|
5905
|
+
_context2.next = 3;
|
|
5906
|
+
return this.apiHandler.getOrganizationRelatives(this.user._id, this.allowedOrganizationTypes, organizationId, skip, this.validOrganizations, this.excludedOrganizations, limit);
|
|
5978
5907
|
case 3:
|
|
5979
|
-
result =
|
|
5980
|
-
return
|
|
5908
|
+
result = _context2.sent;
|
|
5909
|
+
return _context2.abrupt("return", {
|
|
5981
5910
|
parentOrganizations: result.parentOrganizations,
|
|
5982
5911
|
brotherOrganizations: result.brotherOrganizations,
|
|
5983
5912
|
childrenOrganizations: result.childrenOrganizations
|
|
5984
5913
|
});
|
|
5985
5914
|
case 5:
|
|
5986
|
-
return
|
|
5915
|
+
return _context2.abrupt("return", {
|
|
5987
5916
|
data: [],
|
|
5988
5917
|
total: 0
|
|
5989
5918
|
});
|
|
5990
5919
|
case 6:
|
|
5991
5920
|
case "end":
|
|
5992
|
-
return
|
|
5921
|
+
return _context2.stop();
|
|
5993
5922
|
}
|
|
5994
|
-
},
|
|
5923
|
+
}, _callee2, this);
|
|
5995
5924
|
}));
|
|
5996
|
-
function getOrganizationRelatives(
|
|
5925
|
+
function getOrganizationRelatives(_x5, _x6, _x7) {
|
|
5997
5926
|
return _getOrganizationRelatives.apply(this, arguments);
|
|
5998
5927
|
}
|
|
5999
5928
|
return getOrganizationRelatives;
|
|
@@ -6001,27 +5930,27 @@ var OrganizationHandler = /*#__PURE__*/function () {
|
|
|
6001
5930
|
}, {
|
|
6002
5931
|
key: "getOrganizationBySearch",
|
|
6003
5932
|
value: function () {
|
|
6004
|
-
var _getOrganizationBySearch = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6005
|
-
return _regeneratorRuntime.wrap(function
|
|
6006
|
-
while (1) switch (
|
|
5933
|
+
var _getOrganizationBySearch = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(query, skip) {
|
|
5934
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
5935
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
6007
5936
|
case 0:
|
|
6008
5937
|
if (!this.user) {
|
|
6009
|
-
|
|
5938
|
+
_context3.next = 2;
|
|
6010
5939
|
break;
|
|
6011
5940
|
}
|
|
6012
|
-
return
|
|
5941
|
+
return _context3.abrupt("return", this.apiHandler.getOrganizationBySearch(this.user._id, this.allowedOrganizationTypes, this.validOrganizations, this.excludedOrganizations, query, skip));
|
|
6013
5942
|
case 2:
|
|
6014
|
-
return
|
|
5943
|
+
return _context3.abrupt("return", {
|
|
6015
5944
|
data: [],
|
|
6016
5945
|
total: 0
|
|
6017
5946
|
});
|
|
6018
5947
|
case 3:
|
|
6019
5948
|
case "end":
|
|
6020
|
-
return
|
|
5949
|
+
return _context3.stop();
|
|
6021
5950
|
}
|
|
6022
|
-
},
|
|
5951
|
+
}, _callee3, this);
|
|
6023
5952
|
}));
|
|
6024
|
-
function getOrganizationBySearch(
|
|
5953
|
+
function getOrganizationBySearch(_x8, _x9) {
|
|
6025
5954
|
return _getOrganizationBySearch.apply(this, arguments);
|
|
6026
5955
|
}
|
|
6027
5956
|
return getOrganizationBySearch;
|
|
@@ -6029,18 +5958,18 @@ var OrganizationHandler = /*#__PURE__*/function () {
|
|
|
6029
5958
|
}, {
|
|
6030
5959
|
key: "getOrganizationDataById",
|
|
6031
5960
|
value: function () {
|
|
6032
|
-
var _getOrganizationDataById = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6033
|
-
return _regeneratorRuntime.wrap(function
|
|
6034
|
-
while (1) switch (
|
|
5961
|
+
var _getOrganizationDataById = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(organizationId) {
|
|
5962
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
5963
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
6035
5964
|
case 0:
|
|
6036
|
-
return
|
|
5965
|
+
return _context4.abrupt("return", this.apiHandler.fetchOrganization(organizationId));
|
|
6037
5966
|
case 1:
|
|
6038
5967
|
case "end":
|
|
6039
|
-
return
|
|
5968
|
+
return _context4.stop();
|
|
6040
5969
|
}
|
|
6041
|
-
},
|
|
5970
|
+
}, _callee4, this);
|
|
6042
5971
|
}));
|
|
6043
|
-
function getOrganizationDataById(
|
|
5972
|
+
function getOrganizationDataById(_x10) {
|
|
6044
5973
|
return _getOrganizationDataById.apply(this, arguments);
|
|
6045
5974
|
}
|
|
6046
5975
|
return getOrganizationDataById;
|
|
@@ -6048,18 +5977,18 @@ var OrganizationHandler = /*#__PURE__*/function () {
|
|
|
6048
5977
|
}, {
|
|
6049
5978
|
key: "getOrganizationParentByType",
|
|
6050
5979
|
value: function () {
|
|
6051
|
-
var _getOrganizationParentByType = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6052
|
-
return _regeneratorRuntime.wrap(function
|
|
6053
|
-
while (1) switch (
|
|
5980
|
+
var _getOrganizationParentByType = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(organizationId, type) {
|
|
5981
|
+
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
5982
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
6054
5983
|
case 0:
|
|
6055
|
-
return
|
|
5984
|
+
return _context5.abrupt("return", this.apiHandler.getOrganizationParentByType(organizationId, type));
|
|
6056
5985
|
case 1:
|
|
6057
5986
|
case "end":
|
|
6058
|
-
return
|
|
5987
|
+
return _context5.stop();
|
|
6059
5988
|
}
|
|
6060
|
-
},
|
|
5989
|
+
}, _callee5, this);
|
|
6061
5990
|
}));
|
|
6062
|
-
function getOrganizationParentByType(
|
|
5991
|
+
function getOrganizationParentByType(_x11, _x12) {
|
|
6063
5992
|
return _getOrganizationParentByType.apply(this, arguments);
|
|
6064
5993
|
}
|
|
6065
5994
|
return getOrganizationParentByType;
|
|
@@ -6067,27 +5996,27 @@ var OrganizationHandler = /*#__PURE__*/function () {
|
|
|
6067
5996
|
}, {
|
|
6068
5997
|
key: "getRetailerLocationsForArea",
|
|
6069
5998
|
value: function () {
|
|
6070
|
-
var _getRetailerLocationsForArea = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
6071
|
-
return _regeneratorRuntime.wrap(function
|
|
6072
|
-
while (1) switch (
|
|
5999
|
+
var _getRetailerLocationsForArea = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(organizationId, location, radius) {
|
|
6000
|
+
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
6001
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
6073
6002
|
case 0:
|
|
6074
6003
|
if (!this.user) {
|
|
6075
|
-
|
|
6004
|
+
_context6.next = 2;
|
|
6076
6005
|
break;
|
|
6077
6006
|
}
|
|
6078
|
-
return
|
|
6007
|
+
return _context6.abrupt("return", this.apiHandler.getRetailerLocationsForArea(organizationId ? organizationId : this.organization._id, location, radius));
|
|
6079
6008
|
case 2:
|
|
6080
|
-
return
|
|
6009
|
+
return _context6.abrupt("return", {
|
|
6081
6010
|
data: [],
|
|
6082
6011
|
area: null
|
|
6083
6012
|
});
|
|
6084
6013
|
case 3:
|
|
6085
6014
|
case "end":
|
|
6086
|
-
return
|
|
6015
|
+
return _context6.stop();
|
|
6087
6016
|
}
|
|
6088
|
-
},
|
|
6017
|
+
}, _callee6, this);
|
|
6089
6018
|
}));
|
|
6090
|
-
function getRetailerLocationsForArea(
|
|
6019
|
+
function getRetailerLocationsForArea(_x13, _x14, _x15) {
|
|
6091
6020
|
return _getRetailerLocationsForArea.apply(this, arguments);
|
|
6092
6021
|
}
|
|
6093
6022
|
return getRetailerLocationsForArea;
|
|
@@ -7150,8 +7079,8 @@ var RequestStatus = /*#__PURE__*/function (RequestStatus) {
|
|
|
7150
7079
|
return RequestStatus;
|
|
7151
7080
|
}({});
|
|
7152
7081
|
|
|
7153
|
-
function ownKeys$
|
|
7154
|
-
function _objectSpread$
|
|
7082
|
+
function ownKeys$8(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; }
|
|
7083
|
+
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7155
7084
|
var SupportHandler = /*#__PURE__*/function () {
|
|
7156
7085
|
function SupportHandler(root) {
|
|
7157
7086
|
_classCallCheck(this, SupportHandler);
|
|
@@ -7234,7 +7163,7 @@ var SupportHandler = /*#__PURE__*/function () {
|
|
|
7234
7163
|
Authorization: 'Bearer ' + this.jwt,
|
|
7235
7164
|
'Content-Type': 'application/json'
|
|
7236
7165
|
},
|
|
7237
|
-
body: JSON.stringify(_objectSpread$
|
|
7166
|
+
body: JSON.stringify(_objectSpread$8({
|
|
7238
7167
|
divaNr: divaNr
|
|
7239
7168
|
}, participantEmail && {
|
|
7240
7169
|
participantEmail: participantEmail
|
|
@@ -7805,11 +7734,11 @@ var AuthorizationHandler = /*#__PURE__*/function () {
|
|
|
7805
7734
|
value: function () {
|
|
7806
7735
|
var _authorize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref) {
|
|
7807
7736
|
var _errorCode;
|
|
7808
|
-
var organizationId, nToken, validParents, validOrganizationTypes, force, url, response, result, error, errorCode, errorResponse;
|
|
7737
|
+
var organizationId, nToken, validParents, validOrganizationTypes, excludeOrganizations, force, url, response, result, error, errorCode, errorResponse;
|
|
7809
7738
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
7810
7739
|
while (1) switch (_context3.prev = _context3.next) {
|
|
7811
7740
|
case 0:
|
|
7812
|
-
organizationId = _ref.organizationId, nToken = _ref.nToken, validParents = _ref.validParents, validOrganizationTypes = _ref.validOrganizationTypes, force = _ref.force;
|
|
7741
|
+
organizationId = _ref.organizationId, nToken = _ref.nToken, validParents = _ref.validParents, validOrganizationTypes = _ref.validOrganizationTypes, excludeOrganizations = _ref.excludeOrganizations, force = _ref.force;
|
|
7813
7742
|
url = new URL("".concat(this.authService, "/v2/authorization/users"));
|
|
7814
7743
|
if (organizationId) {
|
|
7815
7744
|
url.searchParams.append('organizationId', organizationId);
|
|
@@ -7824,7 +7753,8 @@ var AuthorizationHandler = /*#__PURE__*/function () {
|
|
|
7824
7753
|
jwt: nToken,
|
|
7825
7754
|
body: {
|
|
7826
7755
|
validParents: validParents,
|
|
7827
|
-
validOrganizationTypes: validOrganizationTypes
|
|
7756
|
+
validOrganizationTypes: validOrganizationTypes,
|
|
7757
|
+
excludeOrganizations: excludeOrganizations
|
|
7828
7758
|
}
|
|
7829
7759
|
});
|
|
7830
7760
|
case 6:
|
|
@@ -7896,11 +7826,11 @@ var AuthorizationHandler = /*#__PURE__*/function () {
|
|
|
7896
7826
|
key: "register",
|
|
7897
7827
|
value: function () {
|
|
7898
7828
|
var _register = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(_ref2) {
|
|
7899
|
-
var email, password, name, familyName, invitationId, validParents, validOrganizationTypes, otp, url, response, error;
|
|
7829
|
+
var email, password, name, familyName, invitationId, validParents, validOrganizationTypes, excludeOrganizations, otp, url, response, error;
|
|
7900
7830
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
7901
7831
|
while (1) switch (_context4.prev = _context4.next) {
|
|
7902
7832
|
case 0:
|
|
7903
|
-
email = _ref2.email, password = _ref2.password, name = _ref2.name, familyName = _ref2.familyName, invitationId = _ref2.invitationId, validParents = _ref2.validParents, validOrganizationTypes = _ref2.validOrganizationTypes, otp = _ref2.otp;
|
|
7833
|
+
email = _ref2.email, password = _ref2.password, name = _ref2.name, familyName = _ref2.familyName, invitationId = _ref2.invitationId, validParents = _ref2.validParents, validOrganizationTypes = _ref2.validOrganizationTypes, excludeOrganizations = _ref2.excludeOrganizations, otp = _ref2.otp;
|
|
7904
7834
|
url = "".concat(this.authService, "/v2/authorization/users/register?invitationId=").concat(encodeURIComponent(invitationId));
|
|
7905
7835
|
_context4.next = 4;
|
|
7906
7836
|
return this.fetch({
|
|
@@ -7914,7 +7844,8 @@ var AuthorizationHandler = /*#__PURE__*/function () {
|
|
|
7914
7844
|
password: password,
|
|
7915
7845
|
otp: otp,
|
|
7916
7846
|
validParents: validParents,
|
|
7917
|
-
validOrganizationTypes: validOrganizationTypes
|
|
7847
|
+
validOrganizationTypes: validOrganizationTypes,
|
|
7848
|
+
excludeOrganizations: excludeOrganizations
|
|
7918
7849
|
}
|
|
7919
7850
|
});
|
|
7920
7851
|
case 4:
|
|
@@ -7975,11 +7906,11 @@ var AuthorizationHandler = /*#__PURE__*/function () {
|
|
|
7975
7906
|
key: "login",
|
|
7976
7907
|
value: function () {
|
|
7977
7908
|
var _login = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(_ref3) {
|
|
7978
|
-
var organizationId, email, password, simple, validParents, validOrganizationTypes, invitationId, otp, url, queryParams, response, errorResponse, _errorResponse$error;
|
|
7909
|
+
var organizationId, email, password, simple, validParents, validOrganizationTypes, invitationId, otp, excludeOrganizations, url, queryParams, response, errorResponse, _errorResponse$error;
|
|
7979
7910
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
7980
7911
|
while (1) switch (_context5.prev = _context5.next) {
|
|
7981
7912
|
case 0:
|
|
7982
|
-
organizationId = _ref3.organizationId, email = _ref3.email, password = _ref3.password, simple = _ref3.simple, validParents = _ref3.validParents, validOrganizationTypes = _ref3.validOrganizationTypes, invitationId = _ref3.invitationId, otp = _ref3.otp;
|
|
7913
|
+
organizationId = _ref3.organizationId, email = _ref3.email, password = _ref3.password, simple = _ref3.simple, validParents = _ref3.validParents, validOrganizationTypes = _ref3.validOrganizationTypes, invitationId = _ref3.invitationId, otp = _ref3.otp, excludeOrganizations = _ref3.excludeOrganizations;
|
|
7983
7914
|
url = "".concat(this.authService, "/v2/authorization/users/login");
|
|
7984
7915
|
queryParams = [];
|
|
7985
7916
|
if (organizationId && !otp) {
|
|
@@ -8004,7 +7935,8 @@ var AuthorizationHandler = /*#__PURE__*/function () {
|
|
|
8004
7935
|
password: password,
|
|
8005
7936
|
simple: simple,
|
|
8006
7937
|
validParents: validParents,
|
|
8007
|
-
validOrganizationTypes: validOrganizationTypes
|
|
7938
|
+
validOrganizationTypes: validOrganizationTypes,
|
|
7939
|
+
excludeOrganizations: excludeOrganizations
|
|
8008
7940
|
}
|
|
8009
7941
|
});
|
|
8010
7942
|
case 9:
|
|
@@ -8406,106 +8338,6 @@ var ClientArticleHandler = /*#__PURE__*/function () {
|
|
|
8406
8338
|
}]);
|
|
8407
8339
|
}();
|
|
8408
8340
|
|
|
8409
|
-
function ownKeys$8(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; }
|
|
8410
|
-
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8411
|
-
getLogger('Framework', 'ConetentItemHandler');
|
|
8412
|
-
var ContentItemHandler = /*#__PURE__*/function () {
|
|
8413
|
-
function ContentItemHandler(root) {
|
|
8414
|
-
_classCallCheck(this, ContentItemHandler);
|
|
8415
|
-
this.root = root;
|
|
8416
|
-
}
|
|
8417
|
-
return _createClass(ContentItemHandler, [{
|
|
8418
|
-
key: "catalogService",
|
|
8419
|
-
get: function get() {
|
|
8420
|
-
return this.root.apiConfig.catalogService;
|
|
8421
|
-
}
|
|
8422
|
-
}, {
|
|
8423
|
-
key: "mediaService",
|
|
8424
|
-
get: function get() {
|
|
8425
|
-
return this.root.apiConfig.mediaService;
|
|
8426
|
-
}
|
|
8427
|
-
}, {
|
|
8428
|
-
key: "organization",
|
|
8429
|
-
get: function get() {
|
|
8430
|
-
return this.root.organization;
|
|
8431
|
-
}
|
|
8432
|
-
}, {
|
|
8433
|
-
key: "user",
|
|
8434
|
-
get: function get() {
|
|
8435
|
-
return this.root.user;
|
|
8436
|
-
}
|
|
8437
|
-
}, {
|
|
8438
|
-
key: "langs",
|
|
8439
|
-
get: function get() {
|
|
8440
|
-
return this.root.languages;
|
|
8441
|
-
}
|
|
8442
|
-
}, {
|
|
8443
|
-
key: "jwt",
|
|
8444
|
-
get: function get() {
|
|
8445
|
-
return this.root.jwt;
|
|
8446
|
-
}
|
|
8447
|
-
}, {
|
|
8448
|
-
key: "getContentItem",
|
|
8449
|
-
value: function () {
|
|
8450
|
-
var _getContentItem = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(id, lang) {
|
|
8451
|
-
var _res;
|
|
8452
|
-
var fullUrl, res, resData;
|
|
8453
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
8454
|
-
while (1) switch (_context.prev = _context.next) {
|
|
8455
|
-
case 0:
|
|
8456
|
-
fullUrl = this.catalogService + '/contentItems/' + id + '?language=' + lang;
|
|
8457
|
-
_context.prev = 1;
|
|
8458
|
-
_context.next = 4;
|
|
8459
|
-
return axios.get(fullUrl, {
|
|
8460
|
-
headers: _objectSpread$8({}, this.getHeaders())
|
|
8461
|
-
});
|
|
8462
|
-
case 4:
|
|
8463
|
-
res = _context.sent;
|
|
8464
|
-
_context.next = 7;
|
|
8465
|
-
return res.data;
|
|
8466
|
-
case 7:
|
|
8467
|
-
resData = _context.sent;
|
|
8468
|
-
_context.next = 13;
|
|
8469
|
-
break;
|
|
8470
|
-
case 10:
|
|
8471
|
-
_context.prev = 10;
|
|
8472
|
-
_context.t0 = _context["catch"](1);
|
|
8473
|
-
throw new DivaError('Could not get content item', {
|
|
8474
|
-
cause: _context.t0
|
|
8475
|
-
});
|
|
8476
|
-
case 13:
|
|
8477
|
-
if (!(((_res = res) === null || _res === void 0 ? void 0 : _res.status) == 200)) {
|
|
8478
|
-
_context.next = 15;
|
|
8479
|
-
break;
|
|
8480
|
-
}
|
|
8481
|
-
return _context.abrupt("return", resData);
|
|
8482
|
-
case 15:
|
|
8483
|
-
throw new Error(resData.error);
|
|
8484
|
-
case 16:
|
|
8485
|
-
case "end":
|
|
8486
|
-
return _context.stop();
|
|
8487
|
-
}
|
|
8488
|
-
}, _callee, this, [[1, 10]]);
|
|
8489
|
-
}));
|
|
8490
|
-
function getContentItem(_x, _x2) {
|
|
8491
|
-
return _getContentItem.apply(this, arguments);
|
|
8492
|
-
}
|
|
8493
|
-
return getContentItem;
|
|
8494
|
-
}()
|
|
8495
|
-
}, {
|
|
8496
|
-
key: "getHeaders",
|
|
8497
|
-
value: function getHeaders() {
|
|
8498
|
-
var headers = undefined;
|
|
8499
|
-
if (this.jwt) headers = {
|
|
8500
|
-
Authorization: 'Bearer ' + this.jwt
|
|
8501
|
-
};
|
|
8502
|
-
if (!headers) {
|
|
8503
|
-
throw new Error('jwt and apiKey not set');
|
|
8504
|
-
} else return headers;
|
|
8505
|
-
}
|
|
8506
|
-
}]);
|
|
8507
|
-
}();
|
|
8508
|
-
|
|
8509
8341
|
function ownKeys$7(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; }
|
|
8510
8342
|
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8511
8343
|
var LOGINMODE_LOCALSTORAGE_KEY = 'diva-login-mode';
|
|
@@ -8543,7 +8375,6 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
8543
8375
|
_defineProperty(this, "_productHandler", void 0);
|
|
8544
8376
|
_defineProperty(this, "_reportHandler", void 0);
|
|
8545
8377
|
_defineProperty(this, "_organizationHandler", void 0);
|
|
8546
|
-
_defineProperty(this, "_contentItemHandler", void 0);
|
|
8547
8378
|
_defineProperty(this, "_mediaHandler", void 0);
|
|
8548
8379
|
_defineProperty(this, "_adminHandler", void 0);
|
|
8549
8380
|
_defineProperty(this, "_analyticsHandler", void 0);
|
|
@@ -8574,7 +8405,6 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
8574
8405
|
this._productHandler = new ProductHandler(this, this.contentStore.openModal.bind(this.contentStore), this.contentStore.closeModal.bind(this.contentStore));
|
|
8575
8406
|
this._reportHandler = new ReportHandler(this);
|
|
8576
8407
|
this._organizationHandler = new OrganizationHandler(this);
|
|
8577
|
-
this._contentItemHandler = new ContentItemHandler(this);
|
|
8578
8408
|
this._mediaHandler = new MediaHandler(this);
|
|
8579
8409
|
this._adminHandler = new AdminHandler(this);
|
|
8580
8410
|
this._analyticsHandler = new AnalyticsHandler(this);
|
|
@@ -8766,14 +8596,6 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
8766
8596
|
get: function get() {
|
|
8767
8597
|
return this._productHandler;
|
|
8768
8598
|
}
|
|
8769
|
-
/**
|
|
8770
|
-
* get the contentItem instance with the current configuration
|
|
8771
|
-
*/
|
|
8772
|
-
}, {
|
|
8773
|
-
key: "contentItemHandler",
|
|
8774
|
-
get: function get() {
|
|
8775
|
-
return this._contentItemHandler;
|
|
8776
|
-
}
|
|
8777
8599
|
|
|
8778
8600
|
/**
|
|
8779
8601
|
* get the organizationHandler instance with the current configuration
|
|
@@ -8862,6 +8684,11 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
8862
8684
|
get: function get() {
|
|
8863
8685
|
return this.configurationStore.validOrganizations;
|
|
8864
8686
|
}
|
|
8687
|
+
}, {
|
|
8688
|
+
key: "excludedOrganizations",
|
|
8689
|
+
get: function get() {
|
|
8690
|
+
return this.configurationStore.excludedOrganizations;
|
|
8691
|
+
}
|
|
8865
8692
|
|
|
8866
8693
|
/**
|
|
8867
8694
|
* Initalizes the application
|
|
@@ -9347,7 +9174,6 @@ var DivaCoreProvider = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
9347
9174
|
}),
|
|
9348
9175
|
handler: {
|
|
9349
9176
|
productHandler: store.productHandler,
|
|
9350
|
-
contentItemHandler: store.contentItemHandler,
|
|
9351
9177
|
organizationHandler: store.organizationHandler,
|
|
9352
9178
|
mediaHandler: store.mediaHandler,
|
|
9353
9179
|
adminHandler: store.adminHandler,
|
|
@@ -9447,7 +9273,6 @@ var DivaCoreProvider = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
9447
9273
|
}),
|
|
9448
9274
|
handler: {
|
|
9449
9275
|
productHandler: store.productHandler,
|
|
9450
|
-
contentItemHandler: store.contentItemHandler,
|
|
9451
9276
|
organizationHandler: store.organizationHandler,
|
|
9452
9277
|
mediaHandler: store.mediaHandler,
|
|
9453
9278
|
adminHandler: store.adminHandler,
|
|
@@ -9791,7 +9616,7 @@ var SideMenu$1 = observer(SideMenu);
|
|
|
9791
9616
|
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; }
|
|
9792
9617
|
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; }
|
|
9793
9618
|
var LazyModals$1 = /*#__PURE__*/React.lazy(function () {
|
|
9794
|
-
return import('./ModalsWrapper-
|
|
9619
|
+
return import('./ModalsWrapper-48c89d09.js');
|
|
9795
9620
|
});
|
|
9796
9621
|
function Fullscreen(_ref) {
|
|
9797
9622
|
var inAbsoluteFullscreen = _ref.inAbsoluteFullscreen;
|
|
@@ -10249,10 +10074,10 @@ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
|
|
|
10249
10074
|
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; }
|
|
10250
10075
|
var LOG$2 = getLogger('Framework', 'Root');
|
|
10251
10076
|
var LazyAuth = /*#__PURE__*/React.lazy(function () {
|
|
10252
|
-
return import('./index-
|
|
10077
|
+
return import('./index-4eb2f914.js');
|
|
10253
10078
|
});
|
|
10254
10079
|
var LazyModals = /*#__PURE__*/React.lazy(function () {
|
|
10255
|
-
return import('./ModalsWrapper-
|
|
10080
|
+
return import('./ModalsWrapper-48c89d09.js');
|
|
10256
10081
|
});
|
|
10257
10082
|
function ContentComponent() {
|
|
10258
10083
|
var context = useDivaCoreContext();
|
|
@@ -10633,6 +10458,7 @@ var MockedRootStore = /*#__PURE__*/function () {
|
|
|
10633
10458
|
});
|
|
10634
10459
|
_defineProperty(this, "_language", 'de');
|
|
10635
10460
|
_defineProperty(this, "dataStore", {});
|
|
10461
|
+
_defineProperty(this, "excludedOrganizations", void 0);
|
|
10636
10462
|
_defineProperty(this, "t", instance.t.bind(instance));
|
|
10637
10463
|
this._apiHandler = new ApiHandler(this);
|
|
10638
10464
|
this.handlers = mockCoreHandlers(this);
|
|
@@ -10794,11 +10620,6 @@ var MockedRootStore = /*#__PURE__*/function () {
|
|
|
10794
10620
|
get: function get() {
|
|
10795
10621
|
return this.handlers.productHandler;
|
|
10796
10622
|
}
|
|
10797
|
-
}, {
|
|
10798
|
-
key: "contentItemHandler",
|
|
10799
|
-
get: function get() {
|
|
10800
|
-
return this.handlers.contentItemHandler;
|
|
10801
|
-
}
|
|
10802
10623
|
}, {
|
|
10803
10624
|
key: "organizationHandler",
|
|
10804
10625
|
get: function get() {
|
|
@@ -11219,7 +11040,6 @@ var MockedRootStore = /*#__PURE__*/function () {
|
|
|
11219
11040
|
function mockCoreHandlers(root) {
|
|
11220
11041
|
return {
|
|
11221
11042
|
productHandler: new ProductHandler(root),
|
|
11222
|
-
contentItemHandler: new ContentItemHandler(root),
|
|
11223
11043
|
organizationHandler: new OrganizationHandler(root),
|
|
11224
11044
|
mediaHandler: new MediaHandler(root),
|
|
11225
11045
|
adminHandler: new AdminHandler(root),
|