@qrvey/utils 1.11.1 → 1.11.3

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 (34) hide show
  1. package/README.md +1784 -1784
  2. package/dist/cjs/filters/constants/common/FILTER_SCOPE.d.ts +2 -1
  3. package/dist/cjs/filters/constants/common/FILTER_SCOPE.js +2 -0
  4. package/dist/cjs/filters/constants/common/FILTER_SCOPES.js +1 -0
  5. package/dist/cjs/filters/constants/common/FILTER_SCOPE_INFO.js +8 -0
  6. package/dist/cjs/filters/constants/common/FILTER_SCOPE_LABEL.d.ts +2 -1
  7. package/dist/cjs/filters/constants/common/FILTER_SCOPE_LABEL.js +1 -0
  8. package/dist/cjs/filters/constants/settings/FILTER_SETTINGS_DEFAULT.js +23 -0
  9. package/dist/cjs/filters/helpers/common/mergeFilters.js +3 -3
  10. package/dist/cjs/general/object/mergeDeep.js +2 -2
  11. package/dist/cjs/general/object/objectCopy.d.ts +1 -0
  12. package/dist/cjs/general/object/objectCopy.js +1 -0
  13. package/dist/cjs/general/object/removeUndefinedDeep.js +2 -2
  14. package/dist/cjs/globalization/interfaces/filters/II18nFilterPanelScopeTitle.d.ts +1 -0
  15. package/dist/cjs/globalization/interfaces/filters/II18nFilterScopes.d.ts +1 -0
  16. package/dist/cjs/globalization/labels/filters/I18N_FILTER.js +1 -0
  17. package/dist/cjs/globalization/labels/filters/I18N_FILTER_SCOPE.js +1 -0
  18. package/dist/filters/constants/common/FILTER_SCOPE.d.ts +2 -1
  19. package/dist/filters/constants/common/FILTER_SCOPE.js +2 -0
  20. package/dist/filters/constants/common/FILTER_SCOPES.js +1 -0
  21. package/dist/filters/constants/common/FILTER_SCOPE_INFO.js +8 -0
  22. package/dist/filters/constants/common/FILTER_SCOPE_LABEL.d.ts +2 -1
  23. package/dist/filters/constants/common/FILTER_SCOPE_LABEL.js +1 -0
  24. package/dist/filters/constants/settings/FILTER_SETTINGS_DEFAULT.js +23 -0
  25. package/dist/filters/helpers/common/mergeFilters.js +3 -3
  26. package/dist/general/object/mergeDeep.js +2 -2
  27. package/dist/general/object/objectCopy.d.ts +1 -0
  28. package/dist/general/object/objectCopy.js +1 -0
  29. package/dist/general/object/removeUndefinedDeep.js +2 -2
  30. package/dist/globalization/interfaces/filters/II18nFilterPanelScopeTitle.d.ts +1 -0
  31. package/dist/globalization/interfaces/filters/II18nFilterScopes.d.ts +1 -0
  32. package/dist/globalization/labels/filters/I18N_FILTER.js +1 -0
  33. package/dist/globalization/labels/filters/I18N_FILTER_SCOPE.js +1 -0
  34. 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,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.mergeFilters = void 0;
4
4
  const isEmpty_1 = require("../../../general/mix/isEmpty");
5
5
  const mergeDeep_1 = require("../../../general/object/mergeDeep");
6
- const objectCopy_1 = require("../../../general/object/objectCopy");
6
+ const cloneDeep_1 = require("../../../general/object/cloneDeep");
7
7
  const getFilterid_1 = require("./getFilterid");
8
8
  const getMergeFiltersSettings_1 = require("./getMergeFiltersSettings");
9
9
  const mergeValues_1 = require("./mergeValues");
@@ -29,8 +29,8 @@ function mergeFilters(filterData1, filterData2, settings) {
29
29
  }
30
30
  if ((0, isEmpty_1.isEmpty)(filterData2) || (0, isEmpty_1.isEmpty)(filterData2.scopes))
31
31
  return filterData1;
32
- const newFilterData1 = (0, objectCopy_1.objectCopy)(filterData1);
33
- const newFilterData2 = (0, objectCopy_1.objectCopy)(filterData2);
32
+ const newFilterData1 = (0, cloneDeep_1.cloneDeep)(filterData1);
33
+ const newFilterData2 = (0, cloneDeep_1.cloneDeep)(filterData2);
34
34
  const defaultSettings = (0, getMergeFiltersSettings_1.getMergeFiltersSettings)(settings);
35
35
  const scopes = mergeScopes(newFilterData1.scopes, newFilterData2.scopes, defaultSettings);
36
36
  if (defaultSettings.mergeFilterDataProps) {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.mergeDeep = void 0;
4
4
  const isObject_1 = require("./isObject");
5
- const objectCopy_1 = require("./objectCopy");
5
+ const cloneDeep_1 = require("./cloneDeep");
6
6
  /**
7
7
  * Merges two objects into a new one.
8
8
  * The second given argument to the first given argument.
@@ -14,7 +14,7 @@ const objectCopy_1 = require("./objectCopy");
14
14
  function mergeDeep(obj1, obj2, settings) {
15
15
  const defaultSettings = getParamsToMergeDeep(settings);
16
16
  if (!isValid(obj1, obj2))
17
- return (0, objectCopy_1.objectCopy)(obj1);
17
+ return (0, cloneDeep_1.cloneDeep)(obj1);
18
18
  const result = Array.isArray(obj1) ? [] : {};
19
19
  for (const i in obj1) {
20
20
  if ((0, isObject_1.isObject)(obj1[i]) || Array.isArray(obj1[i])) {
@@ -1,4 +1,5 @@
1
1
  /**
2
+ * @deprecated since version 1.11.1. Qrvey version 8.2. This module generates a memory leak, so use a different solution at possible (cloneDeep)
2
3
  * Created a new reference of the given argument
3
4
  * @param entity The variable to be copied
4
5
  * @param cache
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.objectCopy = void 0;
4
4
  /**
5
+ * @deprecated since version 1.11.1. Qrvey version 8.2. This module generates a memory leak, so use a different solution at possible (cloneDeep)
5
6
  * Created a new reference of the given argument
6
7
  * @param entity The variable to be copied
7
8
  * @param cache
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.removeUndefinedDeep = void 0;
4
4
  const isObject_1 = require("./isObject");
5
- const objectCopy_1 = require("./objectCopy");
5
+ const cloneDeep_1 = require("./cloneDeep");
6
6
  /**
7
7
  * Removes and returns the given object cleaning the undefined values
8
8
  * @param obj an object
@@ -12,7 +12,7 @@ function removeUndefinedDeep(obj) {
12
12
  const isArray = Array.isArray(obj);
13
13
  if (obj == null || (!(0, isObject_1.isObject)(obj) && !isArray))
14
14
  return obj;
15
- let _obj = (0, objectCopy_1.objectCopy)(obj);
15
+ let _obj = (0, cloneDeep_1.cloneDeep)(obj);
16
16
  if (isArray)
17
17
  _obj = _obj.filter(Boolean);
18
18
  Object.keys(_obj).forEach((key) => {
@@ -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
  };
@@ -1,6 +1,6 @@
1
1
  import { isEmpty } from "../../../general/mix/isEmpty";
2
2
  import { mergeDeep } from "../../../general/object/mergeDeep";
3
- import { objectCopy } from "../../../general/object/objectCopy";
3
+ import { cloneDeep } from "../../../general/object/cloneDeep";
4
4
  import { getFilterid } from "./getFilterid";
5
5
  import { getMergeFiltersSettings } from "./getMergeFiltersSettings";
6
6
  import { mergeValues } from "./mergeValues";
@@ -26,8 +26,8 @@ export function mergeFilters(filterData1, filterData2, settings) {
26
26
  }
27
27
  if (isEmpty(filterData2) || isEmpty(filterData2.scopes))
28
28
  return filterData1;
29
- const newFilterData1 = objectCopy(filterData1);
30
- const newFilterData2 = objectCopy(filterData2);
29
+ const newFilterData1 = cloneDeep(filterData1);
30
+ const newFilterData2 = cloneDeep(filterData2);
31
31
  const defaultSettings = getMergeFiltersSettings(settings);
32
32
  const scopes = mergeScopes(newFilterData1.scopes, newFilterData2.scopes, defaultSettings);
33
33
  if (defaultSettings.mergeFilterDataProps) {
@@ -1,5 +1,5 @@
1
1
  import { isObject } from "./isObject";
2
- import { objectCopy } from "./objectCopy";
2
+ import { cloneDeep } from "./cloneDeep";
3
3
  /**
4
4
  * Merges two objects into a new one.
5
5
  * The second given argument to the first given argument.
@@ -11,7 +11,7 @@ import { objectCopy } from "./objectCopy";
11
11
  export function mergeDeep(obj1, obj2, settings) {
12
12
  const defaultSettings = getParamsToMergeDeep(settings);
13
13
  if (!isValid(obj1, obj2))
14
- return objectCopy(obj1);
14
+ return cloneDeep(obj1);
15
15
  const result = Array.isArray(obj1) ? [] : {};
16
16
  for (const i in obj1) {
17
17
  if (isObject(obj1[i]) || Array.isArray(obj1[i])) {
@@ -1,4 +1,5 @@
1
1
  /**
2
+ * @deprecated since version 1.11.1. Qrvey version 8.2. This module generates a memory leak, so use a different solution at possible (cloneDeep)
2
3
  * Created a new reference of the given argument
3
4
  * @param entity The variable to be copied
4
5
  * @param cache
@@ -1,4 +1,5 @@
1
1
  /**
2
+ * @deprecated since version 1.11.1. Qrvey version 8.2. This module generates a memory leak, so use a different solution at possible (cloneDeep)
2
3
  * Created a new reference of the given argument
3
4
  * @param entity The variable to be copied
4
5
  * @param cache
@@ -1,5 +1,5 @@
1
1
  import { isObject } from "./isObject";
2
- import { objectCopy } from "./objectCopy";
2
+ import { cloneDeep } from "./cloneDeep";
3
3
  /**
4
4
  * Removes and returns the given object cleaning the undefined values
5
5
  * @param obj an object
@@ -9,7 +9,7 @@ export function removeUndefinedDeep(obj) {
9
9
  const isArray = Array.isArray(obj);
10
10
  if (obj == null || (!isObject(obj) && !isArray))
11
11
  return obj;
12
- let _obj = objectCopy(obj);
12
+ let _obj = cloneDeep(obj);
13
13
  if (isArray)
14
14
  _obj = _obj.filter(Boolean);
15
15
  Object.keys(_obj).forEach((key) => {
@@ -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.1",
3
+ "version": "1.11.3",
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",