@qrvey/utils 1.18.0 → 1.18.1

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 (43) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/comparativeAnalysis/index.js +467 -0
  3. package/dist/cjs/elements/helpers/fixed.js +10 -1
  4. package/dist/cjs/elements/helpers/gridStrategy.js +10 -0
  5. package/dist/cjs/elements/helpers/responsive.js +10 -1
  6. package/dist/cjs/elements/helpers/vem-element/constants/vem.constants.js +33 -0
  7. package/dist/cjs/elements/helpers/vem-element/definitions/main.definitions.js +263 -0
  8. package/dist/cjs/elements/helpers/vem-element/helpers/vem.helpers.js +76 -0
  9. package/dist/cjs/elements/helpers/vem-element/models/vem.models.js +3 -0
  10. package/dist/cjs/elements/interfaces/IVemCore.js +12 -0
  11. package/dist/cjs/filters/helpers/OLD_getAggFilters.js +10 -2
  12. package/dist/cjs/globalization/service/i18nServiceV2.js +3 -0
  13. package/dist/cjs/globalization/service/i18nextBuilder.js +3 -0
  14. package/dist/cjs/index.js +1 -0
  15. package/dist/cjs/tokens/getCustomTokenBoxParse.js +1 -0
  16. package/dist/comparativeAnalysis/index.d.ts +54 -0
  17. package/dist/comparativeAnalysis/index.js +451 -0
  18. package/dist/elements/helpers/fixed.d.ts +3 -2
  19. package/dist/elements/helpers/fixed.js +9 -1
  20. package/dist/elements/helpers/gridStrategy.d.ts +8 -1
  21. package/dist/elements/helpers/gridStrategy.js +10 -2
  22. package/dist/elements/helpers/responsive.d.ts +3 -2
  23. package/dist/elements/helpers/responsive.js +9 -1
  24. package/dist/elements/helpers/vem-element/constants/vem.constants.d.ts +24 -0
  25. package/dist/elements/helpers/vem-element/constants/vem.constants.js +30 -0
  26. package/dist/elements/helpers/vem-element/definitions/main.definitions.d.ts +9 -0
  27. package/dist/elements/helpers/vem-element/definitions/main.definitions.js +260 -0
  28. package/dist/elements/helpers/vem-element/helpers/vem.helpers.d.ts +8 -0
  29. package/dist/elements/helpers/vem-element/helpers/vem.helpers.js +70 -0
  30. package/dist/elements/helpers/vem-element/models/vem.models.d.ts +85 -0
  31. package/dist/elements/helpers/vem-element/models/vem.models.js +1 -0
  32. package/dist/elements/interfaces/ICanvasGrid.d.ts +24 -0
  33. package/dist/elements/interfaces/IVemCore.d.ts +14 -0
  34. package/dist/elements/interfaces/IVemCore.js +11 -0
  35. package/dist/elements/utils/element.d.ts +1 -1
  36. package/dist/filters/helpers/OLD_getAggFilters.js +10 -2
  37. package/dist/globalization/service/i18nServiceV2.js +3 -0
  38. package/dist/globalization/service/i18nextBuilder.js +3 -0
  39. package/dist/index.d.ts +1 -0
  40. package/dist/index.js +1 -0
  41. package/dist/interfaces/CustomTokens.interface.d.ts +1 -0
  42. package/dist/tokens/getCustomTokenBoxParse.js +1 -0
  43. package/package.json +4 -1
@@ -0,0 +1,260 @@
1
+ import { DEFAULT_DELTA_RESIZE_IN_FIXED, DEFAULT_DELTA_RESIZE_IN_RESPONSIVE, DEFAULT_HEIGHT_IN_FIXED, DEFAULT_HEIGHT_IN_RESPONSIVE, DEFAULT_MIN_FONT_TO_AUTO_RESIZE, DEFAULT_WIDTH_IN_FIXED, DEFAULT_WIDTH_IN_RESPONSIVE, FILTER_LIST_TYPE, FILTER_TRIGGER_TYPE, } from "../constants/vem.constants";
2
+ export const IMAGE_ITEM_DEFINITION = {
3
+ behavior: {
4
+ addingConfig: {
5
+ defaultDimensions: {
6
+ responsive: {
7
+ colSpan: 2,
8
+ rowSpan: 6,
9
+ },
10
+ fixed: {
11
+ width: 100,
12
+ height: 100,
13
+ },
14
+ },
15
+ defaultItemData: {
16
+ aspect: "cover",
17
+ },
18
+ },
19
+ },
20
+ };
21
+ export const BUTTON_ITEM_DEFINITION = {
22
+ behavior: {
23
+ addingConfig: {
24
+ defaultDimensions: {
25
+ responsive: {
26
+ colSpan: 1,
27
+ rowSpan: 1,
28
+ },
29
+ fixed: {
30
+ width: 100,
31
+ height: 30,
32
+ },
33
+ },
34
+ defaultItemData: () => ({
35
+ background: "#FF5300",
36
+ color: "#ffffff",
37
+ fontFamily: "Inter, serif",
38
+ fontSize: "12px",
39
+ url: "",
40
+ label: "",
41
+ }),
42
+ minSize: {
43
+ fixed: {
44
+ height: 30,
45
+ width: 30,
46
+ customSize: (itemData) => {
47
+ const fontSizeValue = parseInt(itemData.fontSize.replace("px", ""), 10);
48
+ const minHeight = fontSizeValue > DEFAULT_MIN_FONT_TO_AUTO_RESIZE
49
+ ? fontSizeValue * DEFAULT_DELTA_RESIZE_IN_FIXED
50
+ : 30;
51
+ return {
52
+ height: minHeight,
53
+ width: 30,
54
+ };
55
+ },
56
+ },
57
+ responsive: {
58
+ height: 1,
59
+ width: 1,
60
+ customSize: (itemData) => {
61
+ const fontSizeValue = parseInt(itemData.fontSize.replace("px", ""), 10);
62
+ const minHeightPx = fontSizeValue > DEFAULT_MIN_FONT_TO_AUTO_RESIZE
63
+ ? fontSizeValue * DEFAULT_DELTA_RESIZE_IN_RESPONSIVE
64
+ : 30;
65
+ return {
66
+ height: Math.round(minHeightPx / 32),
67
+ width: 1,
68
+ };
69
+ },
70
+ },
71
+ },
72
+ },
73
+ },
74
+ };
75
+ export const TEXT_ITEM_DEFINITION = {
76
+ behavior: {
77
+ addingConfig: {
78
+ defaultDimensions: {
79
+ responsive: {
80
+ colSpan: 2,
81
+ rowSpan: 6,
82
+ },
83
+ fixed: {
84
+ width: 200,
85
+ height: 100,
86
+ },
87
+ },
88
+ defaultItemData: {
89
+ backgroundColor: "rgba(0,0,0,0)",
90
+ borderColor: "#000000",
91
+ borderWidth: "1px",
92
+ borderStyle: "none",
93
+ fontFamily: "Inter, serif",
94
+ fontSize: "12px",
95
+ fontColor: "#000000",
96
+ paddingTop: 5,
97
+ paddingBottom: 5,
98
+ paddingLeft: 5,
99
+ paddingRight: 5,
100
+ },
101
+ },
102
+ },
103
+ };
104
+ export const ANALYTICS_ITEM_DEFINITION = {
105
+ behavior: {
106
+ addingConfig: {
107
+ defaultDimensions: {
108
+ responsive: {
109
+ colSpan: 4,
110
+ rowSpan: 10,
111
+ },
112
+ fixed: {
113
+ width: 400,
114
+ height: 400,
115
+ },
116
+ },
117
+ },
118
+ },
119
+ };
120
+ export const FILTER_INPUT_ITEM_DEFINITION = {
121
+ behavior: {
122
+ addingConfig: {
123
+ defaultDimensions: {
124
+ responsive: {
125
+ colSpan: DEFAULT_WIDTH_IN_RESPONSIVE,
126
+ rowSpan: DEFAULT_HEIGHT_IN_RESPONSIVE,
127
+ },
128
+ fixed: {
129
+ width: DEFAULT_WIDTH_IN_FIXED,
130
+ height: DEFAULT_HEIGHT_IN_FIXED,
131
+ },
132
+ },
133
+ minSize: {
134
+ fixed: {
135
+ height: 76,
136
+ width: 200,
137
+ customSize: () => {
138
+ return {
139
+ height: 76,
140
+ width: 200,
141
+ };
142
+ },
143
+ },
144
+ responsive: {
145
+ height: 1,
146
+ width: 1,
147
+ customSize: () => {
148
+ return {
149
+ height: 1,
150
+ width: 1,
151
+ };
152
+ },
153
+ },
154
+ },
155
+ },
156
+ },
157
+ };
158
+ export const FILTER_LIST_ITEM_DEFINITION = {
159
+ behavior: {
160
+ addingConfig: {
161
+ defaultDimensions: {
162
+ responsive: {
163
+ colSpan: DEFAULT_WIDTH_IN_RESPONSIVE,
164
+ rowSpan: 2,
165
+ },
166
+ fixed: {
167
+ width: DEFAULT_WIDTH_IN_FIXED,
168
+ height: DEFAULT_HEIGHT_IN_FIXED,
169
+ },
170
+ },
171
+ minSize: {
172
+ fixed: {
173
+ height: 30,
174
+ width: 130,
175
+ customSize: (itemData) => {
176
+ const minHeight = itemData.type === FILTER_LIST_TYPE.LIST ? 100 : 30;
177
+ return {
178
+ height: minHeight,
179
+ width: 130,
180
+ };
181
+ },
182
+ },
183
+ responsive: {
184
+ height: 1,
185
+ width: 1,
186
+ customSize: () => {
187
+ return {
188
+ height: 1,
189
+ width: 1,
190
+ };
191
+ },
192
+ },
193
+ },
194
+ },
195
+ },
196
+ };
197
+ export const FILTER_DATE_ITEM_DEFINITION = {
198
+ behavior: {
199
+ addingConfig: {
200
+ defaultDimensions: {
201
+ responsive: {
202
+ colSpan: DEFAULT_WIDTH_IN_RESPONSIVE,
203
+ rowSpan: DEFAULT_HEIGHT_IN_RESPONSIVE,
204
+ },
205
+ fixed: {
206
+ width: DEFAULT_WIDTH_IN_FIXED,
207
+ height: DEFAULT_HEIGHT_IN_FIXED,
208
+ },
209
+ },
210
+ defaultItemData: {
211
+ validators: [],
212
+ trigger: FILTER_TRIGGER_TYPE.BUTTON,
213
+ selectorColor: "#FF5300",
214
+ buttonBackgroundColor: "#FF5300",
215
+ buttonTextColor: "#ffffff",
216
+ buttonBorderColor: "#FF5300",
217
+ borderColor: "#e3e3e3",
218
+ fontColor: "#5F5F5F",
219
+ },
220
+ minSize: {
221
+ fixed: {
222
+ height: 30,
223
+ width: 100,
224
+ customSize: () => {
225
+ return {
226
+ height: 30,
227
+ width: 100,
228
+ };
229
+ },
230
+ },
231
+ responsive: {
232
+ height: 1,
233
+ width: 1,
234
+ customSize: () => {
235
+ return {
236
+ height: 1,
237
+ width: 1,
238
+ };
239
+ },
240
+ },
241
+ },
242
+ },
243
+ },
244
+ };
245
+ export const CONTAINER_ITEM_DEFINITION = {
246
+ behavior: {
247
+ addingConfig: {
248
+ defaultDimensions: {
249
+ responsive: {
250
+ colSpan: 10,
251
+ rowSpan: 10,
252
+ },
253
+ fixed: {
254
+ width: 900,
255
+ height: 500,
256
+ },
257
+ },
258
+ },
259
+ },
260
+ };
@@ -0,0 +1,8 @@
1
+ import { CanvasDevice, CanvasGridConfig, CanvasGridConfigFixed, CanvasGridConfigResponsive } from "../../../interfaces/ICanvasGrid";
2
+ import { Vem, VemFixed, VemResponsive } from "../../../interfaces/IVemCore";
3
+ import { VemPositionFixed, VemPositionResponsive, VemPositionType } from "../../../interfaces/IVemPosition";
4
+ import { VemDefinitionConfig } from "../models/vem.models";
5
+ export declare const VEM_DEFINITIONS: VemDefinitionConfig;
6
+ export declare const updateDimension: (element: VemFixed | VemResponsive, canvasConfig: CanvasGridConfig<CanvasGridConfigResponsive | CanvasGridConfigFixed>, positionType: VemPositionType, deviceList?: CanvasDevice[]) => VemResponsive;
7
+ export declare const getDefaultDimensions: (item: Vem, positionType: VemPositionType) => VemPositionFixed | VemPositionResponsive;
8
+ export declare const validateDimension: (baseElem: VemResponsive, columnsCount: number, canvasDevice: CanvasDevice) => VemResponsive;
@@ -0,0 +1,70 @@
1
+ import { CanvasDevice, } from "../../../interfaces/ICanvasGrid";
2
+ import { VemPositionType, } from "../../../interfaces/IVemPosition";
3
+ import { setElementPosition } from "../../../utils/position";
4
+ import { DEVICE_LIST } from "../constants/vem.constants";
5
+ import { ANALYTICS_ITEM_DEFINITION, BUTTON_ITEM_DEFINITION, CONTAINER_ITEM_DEFINITION, FILTER_DATE_ITEM_DEFINITION, FILTER_INPUT_ITEM_DEFINITION, FILTER_LIST_ITEM_DEFINITION, IMAGE_ITEM_DEFINITION, TEXT_ITEM_DEFINITION, } from "../definitions/main.definitions";
6
+ export const VEM_DEFINITIONS = {
7
+ image: IMAGE_ITEM_DEFINITION,
8
+ button: BUTTON_ITEM_DEFINITION,
9
+ text: TEXT_ITEM_DEFINITION,
10
+ analytics: ANALYTICS_ITEM_DEFINITION,
11
+ filterInput: FILTER_INPUT_ITEM_DEFINITION,
12
+ filterDate: FILTER_DATE_ITEM_DEFINITION,
13
+ filterList: FILTER_LIST_ITEM_DEFINITION,
14
+ container: CONTAINER_ITEM_DEFINITION,
15
+ };
16
+ export const updateDimension = (element, canvasConfig, positionType, deviceList = DEVICE_LIST) => {
17
+ const position = getDefaultDimensions(element, positionType);
18
+ let newElement = element;
19
+ deviceList.forEach((device) => {
20
+ const isForceAddField = device !== CanvasDevice.DESKTOP;
21
+ const newPosition = {
22
+ ...position,
23
+ ...(isForceAddField && { preCalculated: true }),
24
+ };
25
+ const updatedElement = setElementPosition(newElement, positionType, device, newPosition);
26
+ if (positionType === VemPositionType.RESPONSIVE) {
27
+ const columns = canvasConfig[device]
28
+ .columns.count;
29
+ newElement = validateDimension(updatedElement, columns, device);
30
+ }
31
+ else {
32
+ newElement = updatedElement;
33
+ }
34
+ });
35
+ return newElement;
36
+ };
37
+ const normalizeSize = (item, positionType) => {
38
+ const vemDefinition = VEM_DEFINITIONS[item.type];
39
+ const rawSize = vemDefinition.behavior.addingConfig.defaultDimensions[positionType];
40
+ const customSizeResolver = vemDefinition?.behavior.addingConfig.minSize?.[positionType]?.customSize;
41
+ const baseHeight = "height" in rawSize ? rawSize.height : rawSize.rowSpan;
42
+ const baseWidth = "width" in rawSize ? rawSize.width : rawSize.colSpan;
43
+ if (!customSizeResolver)
44
+ return { height: baseHeight, width: baseWidth };
45
+ const customSize = customSizeResolver(item.itemData);
46
+ return {
47
+ height: Math.max(customSize.height, baseHeight),
48
+ width: Math.max(customSize.width, baseWidth),
49
+ };
50
+ };
51
+ export const getDefaultDimensions = (item, positionType) => {
52
+ const { height, width } = normalizeSize(item, positionType);
53
+ if (positionType === VemPositionType.FIXED) {
54
+ return { x: 0, y: 0, height, width, z: 1 };
55
+ }
56
+ return { colSpan: width, rowSpan: height, colStart: 1, rowStart: 1 };
57
+ };
58
+ export const validateDimension = (baseElem, columnsCount, canvasDevice) => {
59
+ const currentPosition = baseElem.position.responsive[canvasDevice];
60
+ if (!currentPosition)
61
+ return baseElem;
62
+ const fixedColSpan = currentPosition.colSpan <= columnsCount
63
+ ? currentPosition?.colSpan
64
+ : columnsCount;
65
+ const position = {
66
+ ...currentPosition,
67
+ colSpan: fixedColSpan,
68
+ };
69
+ return setElementPosition(baseElem, VemPositionType.RESPONSIVE, canvasDevice, position);
70
+ };
@@ -0,0 +1,85 @@
1
+ import { VemCreation, VemType } from "../../../interfaces/IVemCore";
2
+ import { VemPositionType, VemSizeConfig } from "../../../interfaces/IVemPosition";
3
+ export interface VemDefinition<T = unknown> {
4
+ behavior: VemItemBehavior<T>;
5
+ }
6
+ interface VemItemBehavior<T> {
7
+ addingConfig: VemAddingConfig<T>;
8
+ }
9
+ export interface VemActionManager {
10
+ checkAutoLinks: (data: unknown) => unknown[] | undefined;
11
+ }
12
+ interface VemAddingConfig<T> {
13
+ defaultDimensions: VemSizeConfig;
14
+ defaultActionData?: ((item: VemCreation, actionManager: VemActionManager) => unknown[] | undefined) | unknown[];
15
+ defaultItemData?: ((item: VemCreation) => T) | T;
16
+ minSize?: VemMinSize;
17
+ }
18
+ export interface VemMinSizeConfig {
19
+ width: number;
20
+ height: number;
21
+ customSize: (item: Record<string, unknown>) => {
22
+ height: number;
23
+ width: number;
24
+ };
25
+ }
26
+ export interface VemMinSize {
27
+ [VemPositionType.FIXED]: VemMinSizeConfig;
28
+ [VemPositionType.RESPONSIVE]: VemMinSizeConfig;
29
+ }
30
+ export type VemDefinitionConfig = Record<VemType, VemDefinition>;
31
+ export type VemImageAspect = "cover" | "fill" | "contain";
32
+ export interface VemImage {
33
+ image?: string;
34
+ aspect?: VemImageAspect;
35
+ fromFile?: boolean;
36
+ fileName?: string;
37
+ linkUrl?: string;
38
+ }
39
+ export interface VemButton {
40
+ label: string;
41
+ background: string;
42
+ color: string;
43
+ url?: string;
44
+ targetLink?: boolean;
45
+ fontFamily?: string;
46
+ fontSize?: string;
47
+ }
48
+ export interface VemText {
49
+ text?: string;
50
+ link?: string;
51
+ fontFamily?: string;
52
+ fontSize?: string;
53
+ fontColor?: string;
54
+ fontWeight?: string;
55
+ backgroundColor?: string;
56
+ alignText?: string;
57
+ textDecoration?: string;
58
+ verticalAlign?: string;
59
+ textWrapping?: string;
60
+ borderStyle?: string;
61
+ borderColor?: string;
62
+ borderWidth?: string;
63
+ paddingLeft?: number;
64
+ paddingTop?: number;
65
+ paddingRight?: number;
66
+ paddingBottom?: number;
67
+ format?: string;
68
+ whiteSpace?: string;
69
+ orderedList?: boolean;
70
+ bulletList?: boolean;
71
+ textWrap?: string;
72
+ textExpanded?: boolean;
73
+ selectedFormat?: Record<string, unknown>;
74
+ }
75
+ export interface VemAnalytics {
76
+ filters?: unknown[];
77
+ qrveyId: string;
78
+ chartType: string;
79
+ metricId?: string;
80
+ chartId?: string;
81
+ summaryId?: string;
82
+ showOriginal?: string;
83
+ originalData?: unknown;
84
+ }
85
+ export {};
@@ -0,0 +1 @@
1
+ import { VemPositionType, } from "../../../interfaces/IVemPosition";
@@ -1,5 +1,29 @@
1
+ export interface CanvasGridConfigDetailResponsive {
2
+ count: number;
3
+ gap: number;
4
+ autoCount?: boolean;
5
+ }
6
+ export interface CanvasGridConfigResponsive {
7
+ columns: CanvasGridConfigDetailResponsive;
8
+ rows: CanvasGridConfigDetailResponsive;
9
+ autoPosition?: boolean;
10
+ }
11
+ export interface CanvasGridConfigFixed {
12
+ height: number;
13
+ width: number;
14
+ autoHeight: boolean;
15
+ }
16
+ type CanvasGridConfigGeneric = CanvasGridConfigFixed | CanvasGridConfigResponsive;
17
+ export interface CanvasGridConfig<TGridConfig extends CanvasGridConfigGeneric = CanvasGridConfigGeneric> {
18
+ desktop: TGridConfig;
19
+ tablet?: TGridConfig;
20
+ mobile?: TGridConfig;
21
+ snapToGrid?: boolean;
22
+ gridLines?: boolean;
23
+ }
1
24
  export declare enum CanvasDevice {
2
25
  DESKTOP = "desktop",
3
26
  TABLET = "tablet",
4
27
  MOBILE = "mobile"
5
28
  }
29
+ export {};
@@ -23,4 +23,18 @@ export interface VemElementMap<T = unknown> {
23
23
  [VemPositionType.FIXED]: VemFixed<T>;
24
24
  [VemPositionType.RESPONSIVE]: VemResponsive<T>;
25
25
  }
26
+ export type VemCreation<T = unknown> = Omit<Vem<T>, "elementId"> & {
27
+ baseData?: T;
28
+ elementId?: string;
29
+ };
30
+ export declare enum VemType {
31
+ IMAGE = "image",
32
+ BUTTON = "button",
33
+ TEXT = "text",
34
+ ANALYTICS = "analytics",
35
+ FILTER_INPUT = "filterInput",
36
+ FILTER_LIST = "filterList",
37
+ FILTER_DATE = "filterDate",
38
+ CONTAINER = "container"
39
+ }
26
40
  export {};
@@ -1 +1,12 @@
1
1
  import { VemPositionType, } from "./IVemPosition";
2
+ export var VemType;
3
+ (function (VemType) {
4
+ VemType["IMAGE"] = "image";
5
+ VemType["BUTTON"] = "button";
6
+ VemType["TEXT"] = "text";
7
+ VemType["ANALYTICS"] = "analytics";
8
+ VemType["FILTER_INPUT"] = "filterInput";
9
+ VemType["FILTER_LIST"] = "filterList";
10
+ VemType["FILTER_DATE"] = "filterDate";
11
+ VemType["CONTAINER"] = "container";
12
+ })(VemType || (VemType = {}));
@@ -1,7 +1,7 @@
1
1
  import { CanvasDevice } from "../interfaces/ICanvasGrid";
2
2
  import { Vem } from "../interfaces/IVemCore";
3
3
  import { VemPositionType } from "../interfaces/IVemPosition";
4
- export declare const copyDesktopPositionToDevice: (elements: Vem[], newCanvasDevice: CanvasDevice, canvasType: VemPositionType) => Vem[];
4
+ export declare const copyDesktopPositionToDevice: (elements: Vem[], newCanvasDevice: CanvasDevice, canvasType: VemPositionType) => Vem<unknown, VemPositionType>[];
5
5
  export declare const normalizeElements: (elements: Vem[], newCanvasDevice: CanvasDevice, canvasType: VemPositionType) => {
6
6
  scopeElements: Vem[];
7
7
  newElements: Vem[];
@@ -12,9 +12,16 @@ export function getAggFilters(logics = [], summaries = []) {
12
12
  root: logic[0].filters,
13
13
  getChildren: (node) => node.expressions,
14
14
  isLeaf: (node) => !("operator" in node),
15
- onLeaf: (expression) => {
15
+ onLeaf: (expression, parent) => {
16
16
  const { enabled, validationType, value } = expression;
17
17
  const summaryIndex = getIndexByExpression(expression, summaries);
18
+ if (summaryIndex < 0) {
19
+ if (parent && parent.expressions) {
20
+ const parentFilter = parent;
21
+ parentFilter.expressions = parentFilter.expressions.filter((e) => e !== expression);
22
+ }
23
+ return;
24
+ }
18
25
  Object.keys(expression).forEach((key) => {
19
26
  delete expression[key];
20
27
  });
@@ -24,7 +31,8 @@ export function getAggFilters(logics = [], summaries = []) {
24
31
  expression.value = value;
25
32
  },
26
33
  });
27
- return logic[0].filters[0];
34
+ const filters = logic[0].filters[0];
35
+ return isEmpty(filters.expressions) ? undefined : filters;
28
36
  }
29
37
  function getAggregateFilters(logics = []) {
30
38
  const _logics = objectCopy(logics);
@@ -16,6 +16,9 @@ export class I18nServiceV2 {
16
16
  defaultNS: DEFAULT_NS,
17
17
  fallbackLng: false,
18
18
  keySeparator: ".",
19
+ interpolation: {
20
+ escapeValue: false,
21
+ },
19
22
  lng: language,
20
23
  nsSeparator: false,
21
24
  resources: {
@@ -23,6 +23,9 @@ export class I18nServiceBuilder {
23
23
  keySeparator: ".",
24
24
  fallbackLng: false,
25
25
  defaultNS: "translation",
26
+ interpolation: {
27
+ escapeValue: false,
28
+ },
26
29
  resources: {
27
30
  en: {
28
31
  translation: this.setTranslations(i18nResource, i18nDefault),
package/dist/index.d.ts CHANGED
@@ -17,3 +17,4 @@ export * from "./tokens/index";
17
17
  export * from "./column_format/index";
18
18
  export * from "./themes/index";
19
19
  export * from "./elements/index";
20
+ export * from "./comparativeAnalysis/index";
package/dist/index.js CHANGED
@@ -17,3 +17,4 @@ export * from "./tokens/index";
17
17
  export * from "./column_format/index";
18
18
  export * from "./themes/index";
19
19
  export * from "./elements/index";
20
+ export * from "./comparativeAnalysis/index";
@@ -12,6 +12,7 @@ export interface ICustomTokensComplex {
12
12
  export interface ICustomTokensBoxDetail {
13
13
  alias: string;
14
14
  label: string;
15
+ value: string | number;
15
16
  }
16
17
  export interface ICustomTokensBox {
17
18
  [key: string]: ICustomTokensBoxDetail[];
@@ -8,6 +8,7 @@ export function getCustomTokenBoxParse(customTokens) {
8
8
  tokensList[tokenKey] = customTokens[tokenKey].map((token) => ({
9
9
  alias: token.label,
10
10
  label: `{{customTokens${subGroup}.${token.key}}}`,
11
+ value: token.value,
11
12
  }));
12
13
  }
13
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrvey/utils",
3
- "version": "1.18.0",
3
+ "version": "1.18.1",
4
4
  "description": "Helper, Utils for all Qrvey Projects",
5
5
  "homepage": "https://bitbucket.org/qrvey/qrvey_utils/wiki/Home",
6
6
  "main": "dist/cjs/index.js",
@@ -81,6 +81,9 @@
81
81
  "files": [
82
82
  "dist/**/*"
83
83
  ],
84
+ "overrides": {
85
+ "js-yaml": "4.2.0"
86
+ },
84
87
  "sideEffects": false,
85
88
  "types": "dist/index.d.ts"
86
89
  }