@qrvey/utils 1.5.0-6 → 1.5.0-7

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.5.0-6*
1
+ # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.5.0-7*
2
2
 
3
3
  > Helper, Utils for all Qrvey Projects
4
4
 
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.defineXYChartFormat = void 0;
4
4
  const AGGREGATE_1 = require("../../charts/constants/AGGREGATE");
5
5
  const COLUMN_1 = require("../../columns/constants/COLUMN");
6
- const definition_1 = require("../../format/definition");
7
6
  const isEmpty_1 = require("../../general/mix/isEmpty");
8
7
  const CALCULATION_LABEL_1 = require("../../qrvey/constants/CALCULATION_LABEL");
9
8
  const CHART_GROUP_1 = require("../constants/CHART_GROUP");
10
9
  const DATEGROUP_UNSUPPORT_FORMAT_1 = require("../constants/DATEGROUP_UNSUPPORT_FORMAT");
10
+ const DURATION_PARTS_LIST_1 = require("../constants/DURATION_PARTS_LIST");
11
11
  const STRING_FORMAT_1 = require("../constants/STRING_FORMAT");
12
12
  const columnTypeByChart_1 = require("./columnTypeByChart");
13
13
  /**
@@ -38,9 +38,8 @@ const defineXYChartFormat = (column, settings) => {
38
38
  const hasDefaultFormat = (0, isEmpty_1.isEmpty)(selectedFormat) ||
39
39
  (outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format) === defaultText ||
40
40
  (selectedFormat === null || selectedFormat === void 0 ? void 0 : selectedFormat.format) === defaultText;
41
- const newOutputFormat = definition_1.STANDARD_NUMERIC_FORMATS.includes(outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format)
42
- ? outputFormat
43
- : Object.assign(Object.assign({}, outputFormat), { template: outputFormat.format, format: "Duration" });
41
+ const newOutputFormat = DURATION_PARTS_LIST_1.DURATION_PARTS_LIST.includes(outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format)
42
+ ? Object.assign(Object.assign({}, outputFormat), { template: outputFormat.format, format: "Duration" }) : outputFormat;
44
43
  switch (columnType) {
45
44
  case COLUMN_1.COLUMN.YES_NO:
46
45
  case COLUMN_1.COLUMN.PHONE:
@@ -1,10 +1,10 @@
1
1
  import { AGGREGATE } from "../../charts/constants/AGGREGATE";
2
2
  import { COLUMN } from "../../columns/constants/COLUMN";
3
- import { STANDARD_NUMERIC_FORMATS } from "../../format/definition";
4
3
  import { isEmpty } from "../../general/mix/isEmpty";
5
4
  import { CALCULATION_LABEL } from "../../qrvey/constants/CALCULATION_LABEL";
6
5
  import { CHART_GROUPS } from "../constants/CHART_GROUP";
7
6
  import { DATEGROUP_UNSUPPORT_FORMAT } from "../constants/DATEGROUP_UNSUPPORT_FORMAT";
7
+ import { DURATION_PARTS_LIST } from "../constants/DURATION_PARTS_LIST";
8
8
  import { STRING_FORMAT } from "../constants/STRING_FORMAT";
9
9
  import { columnTypeByChart } from "./columnTypeByChart";
10
10
  /**
@@ -35,9 +35,8 @@ export const defineXYChartFormat = (column, settings) => {
35
35
  const hasDefaultFormat = isEmpty(selectedFormat) ||
36
36
  (outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format) === defaultText ||
37
37
  (selectedFormat === null || selectedFormat === void 0 ? void 0 : selectedFormat.format) === defaultText;
38
- const newOutputFormat = STANDARD_NUMERIC_FORMATS.includes(outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format)
39
- ? outputFormat
40
- : Object.assign(Object.assign({}, outputFormat), { template: outputFormat.format, format: "Duration" });
38
+ const newOutputFormat = DURATION_PARTS_LIST.includes(outputFormat === null || outputFormat === void 0 ? void 0 : outputFormat.format)
39
+ ? Object.assign(Object.assign({}, outputFormat), { template: outputFormat.format, format: "Duration" }) : outputFormat;
41
40
  switch (columnType) {
42
41
  case COLUMN.YES_NO:
43
42
  case COLUMN.PHONE:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrvey/utils",
3
- "version": "1.5.0-6",
3
+ "version": "1.5.0-7",
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",