@qrvey/utils 1.9.0-filter-visibility-0 → 1.9.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.
Files changed (78) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/constants/Charts.Const.d.ts +2 -1
  3. package/dist/cjs/constants/Charts.Const.js +1 -0
  4. package/dist/cjs/filters/adapters/FDToFlatUI.js +1 -5
  5. package/dist/cjs/filters/adapters/UIToFlatUI.js +0 -4
  6. package/dist/cjs/filters/adapters/UIToOldLogic.js +0 -1
  7. package/dist/cjs/filters/adapters/flatUIToFD.js +0 -4
  8. package/dist/cjs/filters/adapters/flatUIToUI.js +0 -4
  9. package/dist/cjs/filters/adapters/logicToFlatUI.js +4 -7
  10. package/dist/cjs/filters/constants/settings/FILTER_SETTINGS_DEFAULT.js +0 -2
  11. package/dist/cjs/filters/helpers/backend/buildExpression.js +0 -1
  12. package/dist/cjs/filters/helpers/common/resolveDatasetConditions.js +0 -5
  13. package/dist/cjs/filters/helpers/common/resolveFilterConditions.js +0 -5
  14. package/dist/cjs/filters/helpers/common/resolveScopeConditions.js +0 -5
  15. package/dist/cjs/filters/helpers/getTokensFromFilters.js +5 -2
  16. package/dist/cjs/filters/interfaces/OLD_IFilterDetail.d.ts +0 -4
  17. package/dist/cjs/filters/interfaces/builder/IFilterBuilderSettings.d.ts +0 -5
  18. package/dist/cjs/filters/interfaces/common/IFSFilter.d.ts +0 -3
  19. package/dist/cjs/filters/interfaces/common/IFSParamsToGetFilter.d.ts +0 -2
  20. package/dist/cjs/filters/interfaces/common/index.d.ts +0 -1
  21. package/dist/cjs/filters/interfaces/common/index.js +0 -1
  22. package/dist/cjs/filters/interfaces/settings/IFSettingsFilterBuilder.d.ts +0 -1
  23. package/dist/cjs/filters/interfaces/settings/IFSettingsFilterPanel.d.ts +0 -1
  24. package/dist/cjs/filters/services/UChartApi.d.ts +7 -0
  25. package/dist/cjs/filters/services/UChartApi.js +24 -16
  26. package/dist/cjs/filters/services/UChartPaginationApi.d.ts +7 -0
  27. package/dist/cjs/filters/services/UChartPaginationApi.js +14 -10
  28. package/dist/cjs/globalization/interfaces/tabular_view/II18nTabularView.d.ts +20 -1
  29. package/dist/cjs/globalization/labels/tabular_view/I18N_TABULAR_VIEW.js +20 -1
  30. package/dist/cjs/globalization/service/i18nextBuilder.js +4 -1
  31. package/dist/cjs/qrvey/constants/APP_DATASET_TYPE_LIST.js +1 -0
  32. package/dist/cjs/qrvey/constants/APP_TYPE.d.ts +2 -1
  33. package/dist/cjs/qrvey/constants/APP_TYPE.js +1 -0
  34. package/dist/cjs/qrvey/helpers/transformValue.js +8 -4
  35. package/dist/cjs/services/api/Charts.api.js +1 -1
  36. package/dist/cjs/services/constants/UCHART_ENDPOINT.js +2 -2
  37. package/dist/cjs/services/constants/UCHART_PAGINATION_ENDPOINT.js +2 -2
  38. package/dist/constants/Charts.Const.d.ts +2 -1
  39. package/dist/constants/Charts.Const.js +1 -0
  40. package/dist/filters/adapters/FDToFlatUI.js +1 -5
  41. package/dist/filters/adapters/UIToFlatUI.js +0 -4
  42. package/dist/filters/adapters/UIToOldLogic.js +0 -1
  43. package/dist/filters/adapters/flatUIToFD.js +0 -4
  44. package/dist/filters/adapters/flatUIToUI.js +0 -4
  45. package/dist/filters/adapters/logicToFlatUI.js +4 -7
  46. package/dist/filters/constants/settings/FILTER_SETTINGS_DEFAULT.js +0 -2
  47. package/dist/filters/helpers/backend/buildExpression.js +0 -1
  48. package/dist/filters/helpers/common/resolveDatasetConditions.js +0 -5
  49. package/dist/filters/helpers/common/resolveFilterConditions.js +0 -5
  50. package/dist/filters/helpers/common/resolveScopeConditions.js +0 -5
  51. package/dist/filters/helpers/getTokensFromFilters.js +5 -2
  52. package/dist/filters/interfaces/OLD_IFilterDetail.d.ts +0 -4
  53. package/dist/filters/interfaces/builder/IFilterBuilderSettings.d.ts +0 -5
  54. package/dist/filters/interfaces/common/IFSFilter.d.ts +0 -3
  55. package/dist/filters/interfaces/common/IFSParamsToGetFilter.d.ts +0 -2
  56. package/dist/filters/interfaces/common/index.d.ts +0 -1
  57. package/dist/filters/interfaces/common/index.js +0 -1
  58. package/dist/filters/interfaces/settings/IFSettingsFilterBuilder.d.ts +0 -1
  59. package/dist/filters/interfaces/settings/IFSettingsFilterPanel.d.ts +0 -1
  60. package/dist/filters/services/UChartApi.d.ts +7 -0
  61. package/dist/filters/services/UChartApi.js +24 -16
  62. package/dist/filters/services/UChartPaginationApi.d.ts +7 -0
  63. package/dist/filters/services/UChartPaginationApi.js +14 -10
  64. package/dist/globalization/interfaces/tabular_view/II18nTabularView.d.ts +20 -1
  65. package/dist/globalization/labels/tabular_view/I18N_TABULAR_VIEW.js +20 -1
  66. package/dist/globalization/service/i18nextBuilder.js +4 -1
  67. package/dist/qrvey/constants/APP_DATASET_TYPE_LIST.js +1 -0
  68. package/dist/qrvey/constants/APP_TYPE.d.ts +2 -1
  69. package/dist/qrvey/constants/APP_TYPE.js +1 -0
  70. package/dist/qrvey/helpers/transformValue.js +8 -4
  71. package/dist/services/api/Charts.api.js +1 -1
  72. package/dist/services/constants/UCHART_ENDPOINT.js +2 -2
  73. package/dist/services/constants/UCHART_PAGINATION_ENDPOINT.js +2 -2
  74. package/package.json +1 -1
  75. package/dist/cjs/filters/interfaces/common/IFSParamsToGetFilterDisplayeds.d.ts +0 -9
  76. package/dist/cjs/filters/interfaces/common/IFSParamsToGetFilterDisplayeds.js +0 -2
  77. package/dist/filters/interfaces/common/IFSParamsToGetFilterDisplayeds.d.ts +0 -9
  78. package/dist/filters/interfaces/common/IFSParamsToGetFilterDisplayeds.js +0 -1
@@ -8,6 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import i18next from "i18next";
11
+ import { _get } from "../../general";
11
12
  import { mergeDeep } from "../../general/object/mergeDeep";
12
13
  export class I18nServiceBuilder {
13
14
  static buildI18n(i18nDefault, i18nResource) {
@@ -15,7 +16,9 @@ export class I18nServiceBuilder {
15
16
  }
16
17
  static _initI18n(i18nDefault, i18nResource) {
17
18
  return __awaiter(this, void 0, void 0, function* () {
18
- if (!i18next.isInitialized) {
19
+ if (!i18next.isInitialized ||
20
+ _get(i18next, "store.data.en.translation.common.aggregates") !==
21
+ _get(i18nResource, "common.aggregates")) {
19
22
  yield this.getI18nInstance(i18nDefault, i18nResource, i18next);
20
23
  }
21
24
  return new I18nServiceConcrete(i18next);
@@ -10,4 +10,5 @@ export const APP_DATASET_TYPE_LIST = [
10
10
  APP_TYPE.MS_SQL_LIVE,
11
11
  APP_TYPE.MYSQL_LIVE,
12
12
  APP_TYPE.ORACLE_LIVE,
13
+ APP_TYPE.LIVE,
13
14
  ];
@@ -12,5 +12,6 @@ export declare enum APP_TYPE {
12
12
  SURVEY = "SURVEY",
13
13
  FORM = "FORM",
14
14
  ONLINEFORM = "ONLINEFORM",
15
- QUIZ = "QUIZ"
15
+ QUIZ = "QUIZ",
16
+ LIVE = "LIVE"
16
17
  }
@@ -14,4 +14,5 @@ export var APP_TYPE;
14
14
  APP_TYPE["FORM"] = "FORM";
15
15
  APP_TYPE["ONLINEFORM"] = "ONLINEFORM";
16
16
  APP_TYPE["QUIZ"] = "QUIZ";
17
+ APP_TYPE["LIVE"] = "LIVE";
17
18
  })(APP_TYPE || (APP_TYPE = {}));
@@ -29,7 +29,8 @@ export function transformValue(value, settings) {
29
29
  * @returns the outputformat settings
30
30
  */
31
31
  function getOutputFormat(settings) {
32
- let type, format;
32
+ var _a, _b;
33
+ let type, format, decimals;
33
34
  const isDateTime = [
34
35
  DATE_GROUPING_TIME_PROPERTY.HOUR,
35
36
  DATE_GROUPING_TIME_PROPERTY.MINUTE,
@@ -47,19 +48,22 @@ function getOutputFormat(settings) {
47
48
  }
48
49
  else if (isNumericalColumn(settings.column)) {
49
50
  type = "NUMERIC";
51
+ format = "Default";
52
+ decimals = (_b = (_a = settings === null || settings === void 0 ? void 0 : settings.column) === null || _a === void 0 ? void 0 : _a.outputFormat) === null || _b === void 0 ? void 0 : _b.decimals;
50
53
  }
51
54
  return {
52
55
  type,
53
56
  format,
57
+ decimals,
54
58
  originalFormat: isDateTime ? settings.column.outputFormat : undefined,
55
59
  };
56
60
  }
57
61
  /**
58
- * Gets the format config
62
+ * Gets the format config if the locale exists in i18n settings
59
63
  * @param settings The settings of the transformValue function
60
64
  * @returns the format config
61
65
  */
62
66
  function getFormatConfig(settings) {
63
- var _a;
64
- return { lang: (_a = settings.i18n) === null || _a === void 0 ? void 0 : _a.locale };
67
+ var _a, _b;
68
+ return ((_a = settings.i18n) === null || _a === void 0 ? void 0 : _a.locale) && { lang: (_b = settings.i18n) === null || _b === void 0 ? void 0 : _b.locale };
65
69
  }
@@ -18,7 +18,7 @@ export default class ChartsApi {
18
18
  data.logic = data.filters;
19
19
  delete data.filters;
20
20
  }
21
- return Request.post(Object.assign(Object.assign({}, this.config), { endpoint: newEndpoint ? UCHART_ENDPOINT : CHART_ENDPOINT, signal }), "/results", data);
21
+ return Request.post(Object.assign(Object.assign({}, this.config), { endpoint: newEndpoint ? UCHART_ENDPOINT : CHART_ENDPOINT, signal }), newEndpoint ? "" : "/results", data);
22
22
  }
23
23
  getResultsPagination(data, ignoreSignal = false) {
24
24
  const signal = ignoreSignal ? undefined : this.createSignal();
@@ -1,4 +1,4 @@
1
1
  export const UCHART_ENDPOINT = {
2
- uri: "/app/:app_id/qrvey/:qrvey_id/analytiq/uchart",
3
- version: 4,
2
+ uri: "/app/:app_id/qrvey/:qrvey_id/analytics/results/chart",
3
+ version: 5,
4
4
  };
@@ -1,4 +1,4 @@
1
1
  export const UCHART_PAGINATION_ENDPOINT = {
2
- uri: "/app/:app_id/qrvey/:qrvey_id/analytiq/uchart/results/pagination",
3
- version: 4,
2
+ uri: "/app/:app_id/qrvey/:qrvey_id/analytics/results/groups",
3
+ version: 5,
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrvey/utils",
3
- "version": "1.9.0-filter-visibility-0",
3
+ "version": "1.9.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",
@@ -1,9 +0,0 @@
1
- /**
2
- * Structure for filter structure displayed flags
3
- */
4
- export interface IFSParamsToGetFilterDisplayeds {
5
- scopes?: boolean;
6
- datasets?: boolean;
7
- filters?: boolean;
8
- values?: boolean;
9
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +0,0 @@
1
- /**
2
- * Structure for filter structure displayed flags
3
- */
4
- export interface IFSParamsToGetFilterDisplayeds {
5
- scopes?: boolean;
6
- datasets?: boolean;
7
- filters?: boolean;
8
- values?: boolean;
9
- }