@qrvey/utils 1.11.2 → 1.11.4
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/dist/cjs/filters/constants/common/FILTER_SCOPE.d.ts +2 -1
- package/dist/cjs/filters/constants/common/FILTER_SCOPE.js +2 -0
- package/dist/cjs/filters/constants/common/FILTER_SCOPES.js +1 -0
- package/dist/cjs/filters/constants/common/FILTER_SCOPE_INFO.js +8 -0
- package/dist/cjs/filters/constants/common/FILTER_SCOPE_LABEL.d.ts +2 -1
- package/dist/cjs/filters/constants/common/FILTER_SCOPE_LABEL.js +1 -0
- package/dist/cjs/filters/constants/settings/FILTER_SETTINGS_DEFAULT.js +23 -0
- package/dist/cjs/filters/helpers/common/getFiltersByScopesIds.d.ts +1 -0
- package/dist/cjs/filters/helpers/common/getFiltersByScopesIds.js +3 -3
- package/dist/cjs/filters/helpers/common/getFiltersByVisibility.d.ts +1 -1
- package/dist/cjs/filters/helpers/common/getFiltersByVisibility.js +1 -1
- package/dist/cjs/globalization/interfaces/filters/II18nFilterPanelScopeTitle.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/filters/II18nFilterScopes.d.ts +1 -0
- package/dist/cjs/globalization/labels/filters/I18N_FILTER.js +1 -0
- package/dist/cjs/globalization/labels/filters/I18N_FILTER_SCOPE.js +1 -0
- package/dist/filters/constants/common/FILTER_SCOPE.d.ts +2 -1
- package/dist/filters/constants/common/FILTER_SCOPE.js +2 -0
- package/dist/filters/constants/common/FILTER_SCOPES.js +1 -0
- package/dist/filters/constants/common/FILTER_SCOPE_INFO.js +8 -0
- package/dist/filters/constants/common/FILTER_SCOPE_LABEL.d.ts +2 -1
- package/dist/filters/constants/common/FILTER_SCOPE_LABEL.js +1 -0
- package/dist/filters/constants/settings/FILTER_SETTINGS_DEFAULT.js +23 -0
- package/dist/filters/helpers/common/getFiltersByScopesIds.d.ts +1 -0
- package/dist/filters/helpers/common/getFiltersByScopesIds.js +3 -3
- package/dist/filters/helpers/common/getFiltersByVisibility.d.ts +1 -1
- package/dist/filters/helpers/common/getFiltersByVisibility.js +1 -1
- package/dist/globalization/interfaces/filters/II18nFilterPanelScopeTitle.d.ts +1 -0
- package/dist/globalization/interfaces/filters/II18nFilterScopes.d.ts +1 -0
- package/dist/globalization/labels/filters/I18N_FILTER.js +1 -0
- package/dist/globalization/labels/filters/I18N_FILTER_SCOPE.js +1 -0
- package/package.json +1 -1
|
@@ -68,4 +68,12 @@ exports.FILTER_SCOPE_INFO = [
|
|
|
68
68
|
displayed: true,
|
|
69
69
|
i18nLabelPath: "filter.scopes.action",
|
|
70
70
|
},
|
|
71
|
+
{
|
|
72
|
+
label: FILTER_SCOPE_LABEL_1.FILTER_SCOPE_LABEL.FLOW,
|
|
73
|
+
shortLabel: "Action",
|
|
74
|
+
abbrLabel: "ACT",
|
|
75
|
+
value: FILTER_SCOPE_1.FILTER_SCOPE.FLOW,
|
|
76
|
+
displayed: false,
|
|
77
|
+
i18nLabelPath: "filter.scopes.flow",
|
|
78
|
+
},
|
|
71
79
|
];
|
|
@@ -11,4 +11,5 @@ var FILTER_SCOPE_LABEL;
|
|
|
11
11
|
FILTER_SCOPE_LABEL["DEFAULT"] = "Default";
|
|
12
12
|
FILTER_SCOPE_LABEL["CHART"] = "Panel";
|
|
13
13
|
FILTER_SCOPE_LABEL["ACTION"] = "Action";
|
|
14
|
+
FILTER_SCOPE_LABEL["FLOW"] = "Automation";
|
|
14
15
|
})(FILTER_SCOPE_LABEL = exports.FILTER_SCOPE_LABEL || (exports.FILTER_SCOPE_LABEL = {}));
|
|
@@ -235,5 +235,28 @@ exports.FILTER_SETTINGS_DEFAULT = {
|
|
|
235
235
|
label: undefined,
|
|
236
236
|
readonly: false,
|
|
237
237
|
},
|
|
238
|
+
[FILTER_SCOPE_1.FILTER_SCOPE.FLOW]: {
|
|
239
|
+
canCollapse: true,
|
|
240
|
+
collapsed: false,
|
|
241
|
+
color: "#C0C0C0",
|
|
242
|
+
colorized: true,
|
|
243
|
+
colorPickerDisplayed: true,
|
|
244
|
+
displayed: true,
|
|
245
|
+
enabled: true,
|
|
246
|
+
icon: "ico_workflows",
|
|
247
|
+
iconsDisplayed: true,
|
|
248
|
+
interaction: {
|
|
249
|
+
createDisplayed: true,
|
|
250
|
+
createEnabled: true,
|
|
251
|
+
deleteDisplayed: true,
|
|
252
|
+
deleteEnabled: true,
|
|
253
|
+
editDisplayed: true,
|
|
254
|
+
editEnabled: true,
|
|
255
|
+
enableDisplayed: true,
|
|
256
|
+
enableEnabled: true,
|
|
257
|
+
},
|
|
258
|
+
label: undefined,
|
|
259
|
+
readonly: false,
|
|
260
|
+
},
|
|
238
261
|
},
|
|
239
262
|
};
|
|
@@ -3,6 +3,7 @@ import { IFSScopeID } from "../../interfaces/common/IFSScopeID";
|
|
|
3
3
|
import { IFUData } from "../../interfaces/ui/IFUData";
|
|
4
4
|
/**
|
|
5
5
|
* Gets filters from Filter Data by Scopes/Scope IDs.
|
|
6
|
+
* If some scope Id property is not recieved into the collection, the filter is skipped.
|
|
6
7
|
* @param filterData The filter data
|
|
7
8
|
* @param scopes The collection of Scopes/Scope IDs
|
|
8
9
|
* @returns a new Filter Data
|
|
@@ -3,9 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getFiltersByScopesIds = void 0;
|
|
4
4
|
const isEmpty_1 = require("../../../general/mix/isEmpty");
|
|
5
5
|
const cloneDeep_1 = require("../../../general/object/cloneDeep");
|
|
6
|
-
const
|
|
6
|
+
const hasProperty_1 = require("../../../general/object/hasProperty");
|
|
7
7
|
/**
|
|
8
8
|
* Gets filters from Filter Data by Scopes/Scope IDs.
|
|
9
|
+
* If some scope Id property is not recieved into the collection, the filter is skipped.
|
|
9
10
|
* @param filterData The filter data
|
|
10
11
|
* @param scopes The collection of Scopes/Scope IDs
|
|
11
12
|
* @returns a new Filter Data
|
|
@@ -16,8 +17,7 @@ function getFiltersByScopesIds(filterData, scopes = []) {
|
|
|
16
17
|
const _filterData = (0, cloneDeep_1.cloneDeep)(filterData);
|
|
17
18
|
_filterData.scopes = scopes.reduce((newScopes, scope) => {
|
|
18
19
|
const filteredScopes = _filterData.scopes.filter((fScope) => scope.label === fScope.scope &&
|
|
19
|
-
(scope.id === fScope.scopeid ||
|
|
20
|
-
(fScope.scope === FILTER_SCOPE_1.FILTER_SCOPE.GLOBAL && fScope.scopeid == null)) &&
|
|
20
|
+
(scope.id === fScope.scopeid || !(0, hasProperty_1._hasProperty)(scope, "id")) &&
|
|
21
21
|
fScope.datasets.length > 0);
|
|
22
22
|
return newScopes.concat(filteredScopes);
|
|
23
23
|
}, []);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IFSData } from "../../interfaces/common/IFSData";
|
|
2
|
-
import { IFUData } from "../../interfaces/ui/IFUData";
|
|
3
2
|
import { IFSScopeID } from "../../interfaces/common/IFSScopeID";
|
|
3
|
+
import { IFUData } from "../../interfaces/ui/IFUData";
|
|
4
4
|
/**
|
|
5
5
|
* Get a new Filter Data by filtering scopes/scope IDs and enabled flags
|
|
6
6
|
* @param filterData a Filter Data or UI Filter Data
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getFiltersByVisibility = void 0;
|
|
4
|
-
const getFiltersByScopesIds_1 = require("./getFiltersByScopesIds");
|
|
5
4
|
const getFiltersByParams_1 = require("./getFiltersByParams");
|
|
5
|
+
const getFiltersByScopesIds_1 = require("./getFiltersByScopesIds");
|
|
6
6
|
const isEmpty_1 = require("../../../general/mix/isEmpty");
|
|
7
7
|
const cloneDeep_1 = require("../../../general/object/cloneDeep");
|
|
8
8
|
/**
|
|
@@ -65,4 +65,12 @@ export const FILTER_SCOPE_INFO = [
|
|
|
65
65
|
displayed: true,
|
|
66
66
|
i18nLabelPath: "filter.scopes.action",
|
|
67
67
|
},
|
|
68
|
+
{
|
|
69
|
+
label: FILTER_SCOPE_LABEL.FLOW,
|
|
70
|
+
shortLabel: "Action",
|
|
71
|
+
abbrLabel: "ACT",
|
|
72
|
+
value: FILTER_SCOPE.FLOW,
|
|
73
|
+
displayed: false,
|
|
74
|
+
i18nLabelPath: "filter.scopes.flow",
|
|
75
|
+
},
|
|
68
76
|
];
|
|
@@ -232,5 +232,28 @@ export const FILTER_SETTINGS_DEFAULT = {
|
|
|
232
232
|
label: undefined,
|
|
233
233
|
readonly: false,
|
|
234
234
|
},
|
|
235
|
+
[FILTER_SCOPE.FLOW]: {
|
|
236
|
+
canCollapse: true,
|
|
237
|
+
collapsed: false,
|
|
238
|
+
color: "#C0C0C0",
|
|
239
|
+
colorized: true,
|
|
240
|
+
colorPickerDisplayed: true,
|
|
241
|
+
displayed: true,
|
|
242
|
+
enabled: true,
|
|
243
|
+
icon: "ico_workflows",
|
|
244
|
+
iconsDisplayed: true,
|
|
245
|
+
interaction: {
|
|
246
|
+
createDisplayed: true,
|
|
247
|
+
createEnabled: true,
|
|
248
|
+
deleteDisplayed: true,
|
|
249
|
+
deleteEnabled: true,
|
|
250
|
+
editDisplayed: true,
|
|
251
|
+
editEnabled: true,
|
|
252
|
+
enableDisplayed: true,
|
|
253
|
+
enableEnabled: true,
|
|
254
|
+
},
|
|
255
|
+
label: undefined,
|
|
256
|
+
readonly: false,
|
|
257
|
+
},
|
|
235
258
|
},
|
|
236
259
|
};
|
|
@@ -3,6 +3,7 @@ import { IFSScopeID } from "../../interfaces/common/IFSScopeID";
|
|
|
3
3
|
import { IFUData } from "../../interfaces/ui/IFUData";
|
|
4
4
|
/**
|
|
5
5
|
* Gets filters from Filter Data by Scopes/Scope IDs.
|
|
6
|
+
* If some scope Id property is not recieved into the collection, the filter is skipped.
|
|
6
7
|
* @param filterData The filter data
|
|
7
8
|
* @param scopes The collection of Scopes/Scope IDs
|
|
8
9
|
* @returns a new Filter Data
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { isEmpty } from "../../../general/mix/isEmpty";
|
|
2
2
|
import { cloneDeep } from "../../../general/object/cloneDeep";
|
|
3
|
-
import {
|
|
3
|
+
import { _hasProperty } from "../../../general/object/hasProperty";
|
|
4
4
|
/**
|
|
5
5
|
* Gets filters from Filter Data by Scopes/Scope IDs.
|
|
6
|
+
* If some scope Id property is not recieved into the collection, the filter is skipped.
|
|
6
7
|
* @param filterData The filter data
|
|
7
8
|
* @param scopes The collection of Scopes/Scope IDs
|
|
8
9
|
* @returns a new Filter Data
|
|
@@ -13,8 +14,7 @@ export function getFiltersByScopesIds(filterData, scopes = []) {
|
|
|
13
14
|
const _filterData = cloneDeep(filterData);
|
|
14
15
|
_filterData.scopes = scopes.reduce((newScopes, scope) => {
|
|
15
16
|
const filteredScopes = _filterData.scopes.filter((fScope) => scope.label === fScope.scope &&
|
|
16
|
-
(scope.id === fScope.scopeid ||
|
|
17
|
-
(fScope.scope === FILTER_SCOPE.GLOBAL && fScope.scopeid == null)) &&
|
|
17
|
+
(scope.id === fScope.scopeid || !_hasProperty(scope, "id")) &&
|
|
18
18
|
fScope.datasets.length > 0);
|
|
19
19
|
return newScopes.concat(filteredScopes);
|
|
20
20
|
}, []);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IFSData } from "../../interfaces/common/IFSData";
|
|
2
|
-
import { IFUData } from "../../interfaces/ui/IFUData";
|
|
3
2
|
import { IFSScopeID } from "../../interfaces/common/IFSScopeID";
|
|
3
|
+
import { IFUData } from "../../interfaces/ui/IFUData";
|
|
4
4
|
/**
|
|
5
5
|
* Get a new Filter Data by filtering scopes/scope IDs and enabled flags
|
|
6
6
|
* @param filterData a Filter Data or UI Filter Data
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getFiltersByScopesIds } from "./getFiltersByScopesIds";
|
|
2
1
|
import { getFiltersByParams } from "./getFiltersByParams";
|
|
2
|
+
import { getFiltersByScopesIds } from "./getFiltersByScopesIds";
|
|
3
3
|
import { isEmpty } from "../../../general/mix/isEmpty";
|
|
4
4
|
import { cloneDeep } from "../../../general/object/cloneDeep";
|
|
5
5
|
/**
|