@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.
Files changed (31) hide show
  1. package/dist/cjs/filters/constants/common/FILTER_SCOPE.d.ts +2 -1
  2. package/dist/cjs/filters/constants/common/FILTER_SCOPE.js +2 -0
  3. package/dist/cjs/filters/constants/common/FILTER_SCOPES.js +1 -0
  4. package/dist/cjs/filters/constants/common/FILTER_SCOPE_INFO.js +8 -0
  5. package/dist/cjs/filters/constants/common/FILTER_SCOPE_LABEL.d.ts +2 -1
  6. package/dist/cjs/filters/constants/common/FILTER_SCOPE_LABEL.js +1 -0
  7. package/dist/cjs/filters/constants/settings/FILTER_SETTINGS_DEFAULT.js +23 -0
  8. package/dist/cjs/filters/helpers/common/getFiltersByScopesIds.d.ts +1 -0
  9. package/dist/cjs/filters/helpers/common/getFiltersByScopesIds.js +3 -3
  10. package/dist/cjs/filters/helpers/common/getFiltersByVisibility.d.ts +1 -1
  11. package/dist/cjs/filters/helpers/common/getFiltersByVisibility.js +1 -1
  12. package/dist/cjs/globalization/interfaces/filters/II18nFilterPanelScopeTitle.d.ts +1 -0
  13. package/dist/cjs/globalization/interfaces/filters/II18nFilterScopes.d.ts +1 -0
  14. package/dist/cjs/globalization/labels/filters/I18N_FILTER.js +1 -0
  15. package/dist/cjs/globalization/labels/filters/I18N_FILTER_SCOPE.js +1 -0
  16. package/dist/filters/constants/common/FILTER_SCOPE.d.ts +2 -1
  17. package/dist/filters/constants/common/FILTER_SCOPE.js +2 -0
  18. package/dist/filters/constants/common/FILTER_SCOPES.js +1 -0
  19. package/dist/filters/constants/common/FILTER_SCOPE_INFO.js +8 -0
  20. package/dist/filters/constants/common/FILTER_SCOPE_LABEL.d.ts +2 -1
  21. package/dist/filters/constants/common/FILTER_SCOPE_LABEL.js +1 -0
  22. package/dist/filters/constants/settings/FILTER_SETTINGS_DEFAULT.js +23 -0
  23. package/dist/filters/helpers/common/getFiltersByScopesIds.d.ts +1 -0
  24. package/dist/filters/helpers/common/getFiltersByScopesIds.js +3 -3
  25. package/dist/filters/helpers/common/getFiltersByVisibility.d.ts +1 -1
  26. package/dist/filters/helpers/common/getFiltersByVisibility.js +1 -1
  27. package/dist/globalization/interfaces/filters/II18nFilterPanelScopeTitle.d.ts +1 -0
  28. package/dist/globalization/interfaces/filters/II18nFilterScopes.d.ts +1 -0
  29. package/dist/globalization/labels/filters/I18N_FILTER.js +1 -0
  30. package/dist/globalization/labels/filters/I18N_FILTER_SCOPE.js +1 -0
  31. package/package.json +1 -1
@@ -6,5 +6,6 @@ export declare enum FILTER_SCOPE {
6
6
  TAB = "TAB",
7
7
  DEFAULT = "DEFAULT",
8
8
  CHART = "CHART",
9
- ACTION = "ACTION"
9
+ ACTION = "ACTION",
10
+ FLOW = "FLOW"
10
11
  }
@@ -11,4 +11,6 @@ var FILTER_SCOPE;
11
11
  FILTER_SCOPE["DEFAULT"] = "DEFAULT";
12
12
  FILTER_SCOPE["CHART"] = "CHART";
13
13
  FILTER_SCOPE["ACTION"] = "ACTION";
14
+ // Other scopes
15
+ FILTER_SCOPE["FLOW"] = "FLOW";
14
16
  })(FILTER_SCOPE = exports.FILTER_SCOPE || (exports.FILTER_SCOPE = {}));
@@ -11,4 +11,5 @@ exports.FILTER_SCOPES = [
11
11
  FILTER_SCOPE_1.FILTER_SCOPE.DEFAULT,
12
12
  FILTER_SCOPE_1.FILTER_SCOPE.CHART,
13
13
  FILTER_SCOPE_1.FILTER_SCOPE.ACTION,
14
+ FILTER_SCOPE_1.FILTER_SCOPE.FLOW,
14
15
  ];
@@ -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
  ];
@@ -6,5 +6,6 @@ export declare enum FILTER_SCOPE_LABEL {
6
6
  TAB = "Tab",
7
7
  DEFAULT = "Default",
8
8
  CHART = "Panel",
9
- ACTION = "Action"
9
+ ACTION = "Action",
10
+ FLOW = "Automation"
10
11
  }
@@ -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 FILTER_SCOPE_1 = require("../../constants/common/FILTER_SCOPE");
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
  /**
@@ -7,4 +7,5 @@ export interface II18nFilterPanelScopeTitle {
7
7
  chart: string;
8
8
  default: string;
9
9
  action: string;
10
+ flow: string;
10
11
  }
@@ -7,4 +7,5 @@ export interface II18nFilterScopes {
7
7
  default: string;
8
8
  chart: string;
9
9
  action: string;
10
+ flow: string;
10
11
  }
@@ -30,6 +30,7 @@ exports.I18N_FILTER = {
30
30
  chart: "Panel Filters",
31
31
  default: "Default Filters",
32
32
  action: "Action Filters",
33
+ flow: "Automation Filters",
33
34
  },
34
35
  scopes: I18N_FILTER_SCOPE_1.I18N_FILTER_SCOPE,
35
36
  slidebar: I18N_SLIDEBAR_1.I18N_SLIDEBAR,
@@ -11,4 +11,5 @@ exports.I18N_FILTER_SCOPE = {
11
11
  default: FILTER_SCOPE_LABEL_1.FILTER_SCOPE_LABEL.DEFAULT,
12
12
  chart: FILTER_SCOPE_LABEL_1.FILTER_SCOPE_LABEL.CHART,
13
13
  action: FILTER_SCOPE_LABEL_1.FILTER_SCOPE_LABEL.ACTION,
14
+ flow: FILTER_SCOPE_LABEL_1.FILTER_SCOPE_LABEL.FLOW,
14
15
  };
@@ -6,5 +6,6 @@ export declare enum FILTER_SCOPE {
6
6
  TAB = "TAB",
7
7
  DEFAULT = "DEFAULT",
8
8
  CHART = "CHART",
9
- ACTION = "ACTION"
9
+ ACTION = "ACTION",
10
+ FLOW = "FLOW"
10
11
  }
@@ -8,4 +8,6 @@ export var FILTER_SCOPE;
8
8
  FILTER_SCOPE["DEFAULT"] = "DEFAULT";
9
9
  FILTER_SCOPE["CHART"] = "CHART";
10
10
  FILTER_SCOPE["ACTION"] = "ACTION";
11
+ // Other scopes
12
+ FILTER_SCOPE["FLOW"] = "FLOW";
11
13
  })(FILTER_SCOPE || (FILTER_SCOPE = {}));
@@ -8,4 +8,5 @@ export const FILTER_SCOPES = [
8
8
  FILTER_SCOPE.DEFAULT,
9
9
  FILTER_SCOPE.CHART,
10
10
  FILTER_SCOPE.ACTION,
11
+ FILTER_SCOPE.FLOW,
11
12
  ];
@@ -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
  ];
@@ -6,5 +6,6 @@ export declare enum FILTER_SCOPE_LABEL {
6
6
  TAB = "Tab",
7
7
  DEFAULT = "Default",
8
8
  CHART = "Panel",
9
- ACTION = "Action"
9
+ ACTION = "Action",
10
+ FLOW = "Automation"
10
11
  }
@@ -8,4 +8,5 @@ export var FILTER_SCOPE_LABEL;
8
8
  FILTER_SCOPE_LABEL["DEFAULT"] = "Default";
9
9
  FILTER_SCOPE_LABEL["CHART"] = "Panel";
10
10
  FILTER_SCOPE_LABEL["ACTION"] = "Action";
11
+ FILTER_SCOPE_LABEL["FLOW"] = "Automation";
11
12
  })(FILTER_SCOPE_LABEL || (FILTER_SCOPE_LABEL = {}));
@@ -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 { FILTER_SCOPE } from "../../constants/common/FILTER_SCOPE";
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
  /**
@@ -7,4 +7,5 @@ export interface II18nFilterPanelScopeTitle {
7
7
  chart: string;
8
8
  default: string;
9
9
  action: string;
10
+ flow: string;
10
11
  }
@@ -7,4 +7,5 @@ export interface II18nFilterScopes {
7
7
  default: string;
8
8
  chart: string;
9
9
  action: string;
10
+ flow: string;
10
11
  }
@@ -27,6 +27,7 @@ export const I18N_FILTER = {
27
27
  chart: "Panel Filters",
28
28
  default: "Default Filters",
29
29
  action: "Action Filters",
30
+ flow: "Automation Filters",
30
31
  },
31
32
  scopes: I18N_FILTER_SCOPE,
32
33
  slidebar: I18N_SLIDEBAR,
@@ -8,4 +8,5 @@ export const I18N_FILTER_SCOPE = {
8
8
  default: FILTER_SCOPE_LABEL.DEFAULT,
9
9
  chart: FILTER_SCOPE_LABEL.CHART,
10
10
  action: FILTER_SCOPE_LABEL.ACTION,
11
+ flow: FILTER_SCOPE_LABEL.FLOW,
11
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrvey/utils",
3
- "version": "1.11.2",
3
+ "version": "1.11.4",
4
4
  "description": "Helper, Utils for all Qrvey Projects",
5
5
  "homepage": "https://bitbucket.org/qrvey/qrvey_utils/wiki/Home",
6
6
  "main": "dist/index.js",