@qrvey/utils 1.9.0-4 → 1.9.0-6

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.9.0-4*
1
+ # [@qrvey/utils](https://bitbucket.org/qrvey/qrvey_utils/wiki/Home) *1.9.0-6*
2
2
 
3
3
  > Helper, Utils for all Qrvey Projects
4
4
 
@@ -16,7 +16,6 @@ function buildExpression(filter) {
16
16
  const expression = {
17
17
  groupValue: (0, getBackendGroupValue_1.getBackendGroupValue)(filter),
18
18
  questionid: filter.column.id,
19
- questionType: filter.column.type,
20
19
  property: (0, getBackendProperty_1.getBackendProperty)(filter),
21
20
  validationType: (0, getBackendValidator_1.getBackendValidator)(filter),
22
21
  value: (0, getBackendValues_1.getBackendValues)(filter),
@@ -144,7 +144,6 @@ UChartApi._getPreviewRequestBody = (uFilter, filterLogic = [], chartSettings) =>
144
144
  return {
145
145
  charts: chartsBody,
146
146
  logic: filters,
147
- qrveyid: uFilter.column.qrveyid,
148
147
  };
149
148
  };
150
149
  /**
@@ -171,11 +170,8 @@ UChartApi._getDimensionsBody = (uFilter, chartSettings) => {
171
170
  dimensions = [
172
171
  {
173
172
  questionid: column.id,
174
- qrveyid: column.qrveyid,
175
173
  maxDataPoints: UChartApi._getMaxDataPoints(column, chartSettings),
176
- type: column.type,
177
- formulaType: column.type === "FORMULA" ? column.formulaType : undefined,
178
- sortOption: UChartApi._getSortOption(column),
174
+ sort: UChartApi._getSortOption(column),
179
175
  },
180
176
  ];
181
177
  dimensions = UChartApi._refineBodies([...dimensions], uFilter);
@@ -207,7 +203,7 @@ UChartApi._getSortOption = (column) => {
207
203
  if (sortDirection == null)
208
204
  sortDirection = "DESC";
209
205
  }
210
- return { sortBy, sortDirection };
206
+ return { by: sortBy, direction: sortDirection };
211
207
  };
212
208
  /**
213
209
  * Gets summaries body structure
@@ -222,7 +218,6 @@ UChartApi._getSummariesBody = (uFilter) => {
222
218
  property: !(0, isDateColumn_1.isDateColumn)(uFilter.column) && uFilter.column.type !== COLUMN_1.COLUMN.TIME
223
219
  ? uFilter.property
224
220
  : undefined,
225
- type: column.type,
226
221
  };
227
222
  let summaries = [summary];
228
223
  if ((0, isNumericalColumn_1.isNumericalColumn)(column) || (0, isRangeValidator_1.isRangeValidator)(validator)) {
@@ -245,7 +240,6 @@ UChartApi._refineBodies = (bodies, uFilter) => {
245
240
  _bodies.forEach((body) => {
246
241
  if ((0, isDateColumn_1.isDateColumn)(uFilter.column) ||
247
242
  uFilter.column.type === COLUMN_1.COLUMN.TIME) {
248
- body.groupType = "DATE";
249
243
  body.groupValue = uFilter.property.toUpperCase();
250
244
  }
251
245
  else {
@@ -171,8 +171,6 @@ UChartPaginationApi._getDimensionsBody = (uFilter) => {
171
171
  dimensions = [
172
172
  {
173
173
  questionid: column.id,
174
- type: column.type,
175
- formulaType: column.type === COLUMN_1.COLUMN.FORMULA ? column.formulaType : undefined,
176
174
  sort: UChartPaginationApi._getSortOption(column),
177
175
  },
178
176
  ];
@@ -187,9 +185,6 @@ UChartPaginationApi._getDimensionsBody = (uFilter) => {
187
185
  */
188
186
  UChartPaginationApi._getDimensionsBodyAdapter = (dimensions = []) => dimensions.map((dimension) => ({
189
187
  questionid: dimension.questionid,
190
- type: dimension.type,
191
- formulaType: dimension.type === COLUMN_1.COLUMN.FORMULA ? dimension.formulaType : undefined,
192
- groupType: dimension.groupType,
193
188
  groupValue: dimension.groupValue,
194
189
  sort: {
195
190
  by: (0, get_1._get)(dimension, "sortOption.sortBy", "VALUE"),
@@ -236,7 +231,6 @@ UChartPaginationApi._getSummariesBody = (uFilter) => {
236
231
  property: !(0, isDateColumn_1.isDateColumn)(uFilter.column) && uFilter.column.type !== COLUMN_1.COLUMN.TIME
237
232
  ? uFilter.property
238
233
  : undefined,
239
- type: column.type,
240
234
  };
241
235
  let summaries = [summary];
242
236
  if ((0, isNumericalColumn_1.isNumericalColumn)(column) || (0, isRangeValidator_1.isRangeValidator)(validator)) {
@@ -259,7 +253,6 @@ UChartPaginationApi._refineBodies = (bodies, uFilter) => {
259
253
  _bodies.forEach((body) => {
260
254
  if ((0, isDateColumn_1.isDateColumn)(uFilter.column) ||
261
255
  uFilter.column.type === COLUMN_1.COLUMN.TIME) {
262
- body.groupType = "DATE";
263
256
  body.groupValue = uFilter.property.toUpperCase();
264
257
  }
265
258
  else {
@@ -13,7 +13,6 @@ export function buildExpression(filter) {
13
13
  const expression = {
14
14
  groupValue: getBackendGroupValue(filter),
15
15
  questionid: filter.column.id,
16
- questionType: filter.column.type,
17
16
  property: getBackendProperty(filter),
18
17
  validationType: getBackendValidator(filter),
19
18
  value: getBackendValues(filter),
@@ -138,7 +138,6 @@ UChartApi._getPreviewRequestBody = (uFilter, filterLogic = [], chartSettings) =>
138
138
  return {
139
139
  charts: chartsBody,
140
140
  logic: filters,
141
- qrveyid: uFilter.column.qrveyid,
142
141
  };
143
142
  };
144
143
  /**
@@ -165,11 +164,8 @@ UChartApi._getDimensionsBody = (uFilter, chartSettings) => {
165
164
  dimensions = [
166
165
  {
167
166
  questionid: column.id,
168
- qrveyid: column.qrveyid,
169
167
  maxDataPoints: UChartApi._getMaxDataPoints(column, chartSettings),
170
- type: column.type,
171
- formulaType: column.type === "FORMULA" ? column.formulaType : undefined,
172
- sortOption: UChartApi._getSortOption(column),
168
+ sort: UChartApi._getSortOption(column),
173
169
  },
174
170
  ];
175
171
  dimensions = UChartApi._refineBodies([...dimensions], uFilter);
@@ -201,7 +197,7 @@ UChartApi._getSortOption = (column) => {
201
197
  if (sortDirection == null)
202
198
  sortDirection = "DESC";
203
199
  }
204
- return { sortBy, sortDirection };
200
+ return { by: sortBy, direction: sortDirection };
205
201
  };
206
202
  /**
207
203
  * Gets summaries body structure
@@ -216,7 +212,6 @@ UChartApi._getSummariesBody = (uFilter) => {
216
212
  property: !isDateColumn(uFilter.column) && uFilter.column.type !== COLUMN.TIME
217
213
  ? uFilter.property
218
214
  : undefined,
219
- type: column.type,
220
215
  };
221
216
  let summaries = [summary];
222
217
  if (isNumericalColumn(column) || isRangeValidator(validator)) {
@@ -239,7 +234,6 @@ UChartApi._refineBodies = (bodies, uFilter) => {
239
234
  _bodies.forEach((body) => {
240
235
  if (isDateColumn(uFilter.column) ||
241
236
  uFilter.column.type === COLUMN.TIME) {
242
- body.groupType = "DATE";
243
237
  body.groupValue = uFilter.property.toUpperCase();
244
238
  }
245
239
  else {
@@ -165,8 +165,6 @@ UChartPaginationApi._getDimensionsBody = (uFilter) => {
165
165
  dimensions = [
166
166
  {
167
167
  questionid: column.id,
168
- type: column.type,
169
- formulaType: column.type === COLUMN.FORMULA ? column.formulaType : undefined,
170
168
  sort: UChartPaginationApi._getSortOption(column),
171
169
  },
172
170
  ];
@@ -181,9 +179,6 @@ UChartPaginationApi._getDimensionsBody = (uFilter) => {
181
179
  */
182
180
  UChartPaginationApi._getDimensionsBodyAdapter = (dimensions = []) => dimensions.map((dimension) => ({
183
181
  questionid: dimension.questionid,
184
- type: dimension.type,
185
- formulaType: dimension.type === COLUMN.FORMULA ? dimension.formulaType : undefined,
186
- groupType: dimension.groupType,
187
182
  groupValue: dimension.groupValue,
188
183
  sort: {
189
184
  by: _get(dimension, "sortOption.sortBy", "VALUE"),
@@ -230,7 +225,6 @@ UChartPaginationApi._getSummariesBody = (uFilter) => {
230
225
  property: !isDateColumn(uFilter.column) && uFilter.column.type !== COLUMN.TIME
231
226
  ? uFilter.property
232
227
  : undefined,
233
- type: column.type,
234
228
  };
235
229
  let summaries = [summary];
236
230
  if (isNumericalColumn(column) || isRangeValidator(validator)) {
@@ -253,7 +247,6 @@ UChartPaginationApi._refineBodies = (bodies, uFilter) => {
253
247
  _bodies.forEach((body) => {
254
248
  if (isDateColumn(uFilter.column) ||
255
249
  uFilter.column.type === COLUMN.TIME) {
256
- body.groupType = "DATE";
257
250
  body.groupValue = uFilter.property.toUpperCase();
258
251
  }
259
252
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrvey/utils",
3
- "version": "1.9.0-4",
3
+ "version": "1.9.0-6",
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",