@qrvey/utils 1.15.0-8 → 1.15.0-9
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.
|
@@ -19,7 +19,6 @@ const getScopesToDisplay_1 = require("./getScopesToDisplay");
|
|
|
19
19
|
*/
|
|
20
20
|
function getFilterSettings(filterSettings, allowedScopes = [], otherSettings) {
|
|
21
21
|
let settings = (0, mergeDeep_1.mergeDeep)(FILTER_SETTINGS_DEFAULT_1.FILTER_SETTINGS_DEFAULT, (0, objectCopy_1.objectCopy)(filterSettings));
|
|
22
|
-
settings = (0, mergeDeep_1.mergeDeep)(settings, otherSettings);
|
|
23
22
|
const scopesSettings = (0, getScopesToDisplay_1.getScopesToDisplay)(settings).filter((scope) => allowedScopes.includes(scope.id));
|
|
24
23
|
if (scopesSettings.length > 1) {
|
|
25
24
|
settings = getFilterSettingsByMultipleScopes(settings, allowedScopes);
|
|
@@ -30,6 +29,7 @@ function getFilterSettings(filterSettings, allowedScopes = [], otherSettings) {
|
|
|
30
29
|
else {
|
|
31
30
|
settings = getFilterSettingsByNoScopes(settings);
|
|
32
31
|
}
|
|
32
|
+
settings = (0, mergeDeep_1.mergeDeep)(settings, otherSettings);
|
|
33
33
|
return settings;
|
|
34
34
|
}
|
|
35
35
|
exports.getFilterSettings = getFilterSettings;
|
|
@@ -16,7 +16,6 @@ import { getScopesToDisplay } from "./getScopesToDisplay";
|
|
|
16
16
|
*/
|
|
17
17
|
export function getFilterSettings(filterSettings, allowedScopes = [], otherSettings) {
|
|
18
18
|
let settings = mergeDeep(FILTER_SETTINGS_DEFAULT, objectCopy(filterSettings));
|
|
19
|
-
settings = mergeDeep(settings, otherSettings);
|
|
20
19
|
const scopesSettings = getScopesToDisplay(settings).filter((scope) => allowedScopes.includes(scope.id));
|
|
21
20
|
if (scopesSettings.length > 1) {
|
|
22
21
|
settings = getFilterSettingsByMultipleScopes(settings, allowedScopes);
|
|
@@ -27,6 +26,7 @@ export function getFilterSettings(filterSettings, allowedScopes = [], otherSetti
|
|
|
27
26
|
else {
|
|
28
27
|
settings = getFilterSettingsByNoScopes(settings);
|
|
29
28
|
}
|
|
29
|
+
settings = mergeDeep(settings, otherSettings);
|
|
30
30
|
return settings;
|
|
31
31
|
}
|
|
32
32
|
/**
|