@qrvey/utils 1.6.0-6 → 1.7.0-0

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.
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.adaptFilterValues = void 0;
4
4
  const isEmpty_1 = require("../../general/mix/isEmpty");
5
5
  const COLUMN_1 = require("../../columns/constants/COLUMN");
6
+ const constants_1 = require("../constants");
6
7
  /**
7
8
  * [TODO: For 2022, eliminate this adapter]
8
9
  * Gets an adapted filter value array. Validates the enabled property and sets
@@ -12,7 +13,9 @@ const COLUMN_1 = require("../../columns/constants/COLUMN");
12
13
  function adaptFilterValues(filter) {
13
14
  const setValue = (value) => (Object.assign(Object.assign({}, value), { value: (0, isEmpty_1.isEmpty)(value.value) ? undefined : value.value, displayed: (0, isEmpty_1.isEmpty)(value.displayed) ? true : value.displayed, enabled: (0, isEmpty_1.isEmpty)(value.enabled) ? true : value.enabled }));
14
15
  if (filter.column.type === COLUMN_1.COLUMN.RANKING &&
15
- (0, isEmpty_1.isEmpty)(filter.column.aggregate)) {
16
+ (0, isEmpty_1.isEmpty)(filter.column.aggregate) &&
17
+ filter.validator !== constants_1.FILTER_VALIDATOR.IS_NULL &&
18
+ filter.validator !== constants_1.FILTER_VALIDATOR.IS_NOT_NULL) {
16
19
  return (filter.values || []).map((rValues) => rValues.map(setValue));
17
20
  }
18
21
  return ((filter.values || []) || []).map(setValue);
@@ -2,3 +2,4 @@ export * from "./duration/index";
2
2
  export * from "./definition";
3
3
  export * from "./format";
4
4
  export * from "./localization";
5
+ export * from "./helpers/index";
@@ -18,3 +18,4 @@ __exportStar(require("./duration/index"), exports);
18
18
  __exportStar(require("./definition"), exports);
19
19
  __exportStar(require("./format"), exports);
20
20
  __exportStar(require("./localization"), exports);
21
+ __exportStar(require("./helpers/index"), exports);
@@ -37,4 +37,6 @@ export interface II18nChartBuilderStyleOptions {
37
37
  values_check: string;
38
38
  x_axis_title: string;
39
39
  y_axis_title: string;
40
+ heatmap_pivot_axis_caption: string;
41
+ global_y_axis_caption: string;
40
42
  }
@@ -41,6 +41,8 @@ exports.I18N_CHART_BUILDER_STYLE_OPTIONS = {
41
41
  values_check: "Values",
42
42
  x_axis_title: "X - Axis",
43
43
  y_axis_title: "Y - Axis",
44
+ heatmap_pivot_axis_caption: "pivot",
45
+ global_y_axis_caption: "global",
44
46
  },
45
47
  color_settings: {
46
48
  color_by_category: "By category",
@@ -1,5 +1,6 @@
1
1
  import { isEmpty } from "../../general/mix/isEmpty";
2
2
  import { COLUMN } from "../../columns/constants/COLUMN";
3
+ import { FILTER_VALIDATOR } from "../constants";
3
4
  /**
4
5
  * [TODO: For 2022, eliminate this adapter]
5
6
  * Gets an adapted filter value array. Validates the enabled property and sets
@@ -9,7 +10,9 @@ import { COLUMN } from "../../columns/constants/COLUMN";
9
10
  export function adaptFilterValues(filter) {
10
11
  const setValue = (value) => (Object.assign(Object.assign({}, value), { value: isEmpty(value.value) ? undefined : value.value, displayed: isEmpty(value.displayed) ? true : value.displayed, enabled: isEmpty(value.enabled) ? true : value.enabled }));
11
12
  if (filter.column.type === COLUMN.RANKING &&
12
- isEmpty(filter.column.aggregate)) {
13
+ isEmpty(filter.column.aggregate) &&
14
+ filter.validator !== FILTER_VALIDATOR.IS_NULL &&
15
+ filter.validator !== FILTER_VALIDATOR.IS_NOT_NULL) {
13
16
  return (filter.values || []).map((rValues) => rValues.map(setValue));
14
17
  }
15
18
  return ((filter.values || []) || []).map(setValue);
@@ -2,3 +2,4 @@ export * from "./duration/index";
2
2
  export * from "./definition";
3
3
  export * from "./format";
4
4
  export * from "./localization";
5
+ export * from "./helpers/index";
@@ -2,3 +2,4 @@ export * from "./duration/index";
2
2
  export * from "./definition";
3
3
  export * from "./format";
4
4
  export * from "./localization";
5
+ export * from "./helpers/index";
@@ -37,4 +37,6 @@ export interface II18nChartBuilderStyleOptions {
37
37
  values_check: string;
38
38
  x_axis_title: string;
39
39
  y_axis_title: string;
40
+ heatmap_pivot_axis_caption: string;
41
+ global_y_axis_caption: string;
40
42
  }
@@ -38,6 +38,8 @@ export const I18N_CHART_BUILDER_STYLE_OPTIONS = {
38
38
  values_check: "Values",
39
39
  x_axis_title: "X - Axis",
40
40
  y_axis_title: "Y - Axis",
41
+ heatmap_pivot_axis_caption: "pivot",
42
+ global_y_axis_caption: "global",
41
43
  },
42
44
  color_settings: {
43
45
  color_by_category: "By category",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrvey/utils",
3
- "version": "1.6.0-6",
3
+ "version": "1.7.0-0",
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",