@crystaldesign/diva-core 25.7.0-beta.13 → 25.7.0-beta.15
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-51616154.js → ModalsWrapper-7e086e9b.js} +1 -1
- package/build/esm/{index-315fff07.js → index-151b1674.js} +1 -1
- package/build/esm/{index-675855e7.js → index-d04cee88.js} +256 -318
- package/build/esm/index.js +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 -0
- package/build/types/core/src/store/RootStore.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/diva-core.umd.min.js +1 -1
- package/build/umd/report.html +1 -1
- package/package.json +10 -10
|
@@ -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-beta.
|
|
49
|
+
const env = {"STAGE":"production","VERSION":"25.7.0-beta.15"};
|
|
50
50
|
try {
|
|
51
51
|
if (process) {
|
|
52
52
|
process.env = Object.assign({}, process.env);
|
|
@@ -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,134 +884,134 @@ 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$g(_objectSpread$g({}, (_this$_configuration$ = (_this$
|
|
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$g(_objectSpread$g({}, (_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$g(_objectSpread$g({}, (_this$
|
|
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$g(_objectSpread$g({}, (_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;
|
|
@@ -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",
|
|
@@ -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;
|
|
@@ -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:
|
|
@@ -8862,6 +8794,11 @@ var RootStore = /*#__PURE__*/function () {
|
|
|
8862
8794
|
get: function get() {
|
|
8863
8795
|
return this.configurationStore.validOrganizations;
|
|
8864
8796
|
}
|
|
8797
|
+
}, {
|
|
8798
|
+
key: "excludedOrganizations",
|
|
8799
|
+
get: function get() {
|
|
8800
|
+
return this.configurationStore.excludedOrganizations;
|
|
8801
|
+
}
|
|
8865
8802
|
|
|
8866
8803
|
/**
|
|
8867
8804
|
* Initalizes the application
|
|
@@ -9791,7 +9728,7 @@ var SideMenu$1 = observer(SideMenu);
|
|
|
9791
9728
|
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
9729
|
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
9730
|
var LazyModals$1 = /*#__PURE__*/React.lazy(function () {
|
|
9794
|
-
return import('./ModalsWrapper-
|
|
9731
|
+
return import('./ModalsWrapper-7e086e9b.js');
|
|
9795
9732
|
});
|
|
9796
9733
|
function Fullscreen(_ref) {
|
|
9797
9734
|
var inAbsoluteFullscreen = _ref.inAbsoluteFullscreen;
|
|
@@ -10249,10 +10186,10 @@ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymb
|
|
|
10249
10186
|
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
10187
|
var LOG$2 = getLogger('Framework', 'Root');
|
|
10251
10188
|
var LazyAuth = /*#__PURE__*/React.lazy(function () {
|
|
10252
|
-
return import('./index-
|
|
10189
|
+
return import('./index-151b1674.js');
|
|
10253
10190
|
});
|
|
10254
10191
|
var LazyModals = /*#__PURE__*/React.lazy(function () {
|
|
10255
|
-
return import('./ModalsWrapper-
|
|
10192
|
+
return import('./ModalsWrapper-7e086e9b.js');
|
|
10256
10193
|
});
|
|
10257
10194
|
function ContentComponent() {
|
|
10258
10195
|
var context = useDivaCoreContext();
|
|
@@ -10633,6 +10570,7 @@ var MockedRootStore = /*#__PURE__*/function () {
|
|
|
10633
10570
|
});
|
|
10634
10571
|
_defineProperty(this, "_language", 'de');
|
|
10635
10572
|
_defineProperty(this, "dataStore", {});
|
|
10573
|
+
_defineProperty(this, "excludedOrganizations", void 0);
|
|
10636
10574
|
_defineProperty(this, "t", instance.t.bind(instance));
|
|
10637
10575
|
this._apiHandler = new ApiHandler(this);
|
|
10638
10576
|
this.handlers = mockCoreHandlers(this);
|