@qrvey/utils 1.16.0-2 → 1.16.0-20
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/dist/cache-managers/cache-model-manager.js +6 -1
- package/dist/charts/adapters/RequestAdapterMetric.d.ts +2 -1
- package/dist/charts/adapters/RequestAdapterMetric.js +22 -5
- package/dist/charts/adapters/convertChartObjectFromV2toV1.d.ts +2 -0
- package/dist/charts/adapters/convertChartObjectFromV2toV1.js +63 -0
- package/dist/charts/adapters/getPanelBodyByChart.d.ts +2 -0
- package/dist/charts/adapters/getPanelBodyByChart.js +289 -0
- package/dist/charts/adapters/index.d.ts +2 -0
- package/dist/charts/adapters/index.js +2 -0
- package/dist/charts/constants/AGGREGATE.d.ts +3 -1
- package/dist/charts/constants/AGGREGATE.js +2 -0
- package/dist/charts/constants/AGGREGATE_ABBREVIATION.d.ts +3 -1
- package/dist/charts/constants/AGGREGATE_ABBREVIATION.js +2 -0
- package/dist/charts/constants/AGGREGATE_INFO.js +16 -0
- package/dist/charts/constants/AGGREGATE_LABEL.d.ts +3 -1
- package/dist/charts/constants/AGGREGATE_LABEL.js +2 -0
- package/dist/charts/constants/CHART_OBJECT.d.ts +564 -0
- package/dist/charts/constants/CHART_OBJECT.js +53 -0
- package/dist/charts/constants/QUESTION_TYPES.d.ts +241 -0
- package/dist/charts/constants/QUESTION_TYPES.js +410 -0
- package/dist/charts/constants/TIME_PERIOD.d.ts +10 -0
- package/dist/charts/constants/TIME_PERIOD.js +25 -0
- package/dist/charts/constants/index.d.ts +3 -0
- package/dist/charts/constants/index.js +3 -0
- package/dist/charts/helpers/chartTypes.d.ts +24 -0
- package/dist/charts/helpers/chartTypes.js +118 -0
- package/dist/charts/helpers/defaultColumnBuilder.d.ts +56 -0
- package/dist/charts/helpers/defaultColumnBuilder.js +322 -0
- package/dist/charts/helpers/getChartDimensions.d.ts +2 -0
- package/dist/charts/helpers/getChartDimensions.js +263 -0
- package/dist/charts/helpers/index.d.ts +4 -0
- package/dist/charts/helpers/index.js +4 -0
- package/dist/charts/helpers/styleSettingsByChartType.d.ts +60 -0
- package/dist/charts/helpers/styleSettingsByChartType.js +532 -0
- package/dist/charts/interfaces/IChartV2.d.ts +537 -0
- package/dist/charts/interfaces/IChartV2.js +33 -0
- package/dist/charts/interfaces/IRequestAdapterMetric.d.ts +5 -2
- package/dist/charts/interfaces/index.d.ts +1 -0
- package/dist/charts/interfaces/index.js +1 -0
- package/dist/cjs/cache-managers/cache-model-manager.js +6 -1
- package/dist/cjs/charts/adapters/RequestAdapterMetric.d.ts +2 -1
- package/dist/cjs/charts/adapters/RequestAdapterMetric.js +24 -6
- package/dist/cjs/charts/adapters/convertChartObjectFromV2toV1.d.ts +2 -0
- package/dist/cjs/charts/adapters/convertChartObjectFromV2toV1.js +67 -0
- package/dist/cjs/charts/adapters/getPanelBodyByChart.d.ts +2 -0
- package/dist/cjs/charts/adapters/getPanelBodyByChart.js +294 -0
- package/dist/cjs/charts/adapters/index.d.ts +2 -0
- package/dist/cjs/charts/adapters/index.js +2 -0
- package/dist/cjs/charts/constants/AGGREGATE.d.ts +3 -1
- package/dist/cjs/charts/constants/AGGREGATE.js +2 -0
- package/dist/cjs/charts/constants/AGGREGATE_ABBREVIATION.d.ts +3 -1
- package/dist/cjs/charts/constants/AGGREGATE_ABBREVIATION.js +2 -0
- package/dist/cjs/charts/constants/AGGREGATE_INFO.js +16 -0
- package/dist/cjs/charts/constants/AGGREGATE_LABEL.d.ts +3 -1
- package/dist/cjs/charts/constants/AGGREGATE_LABEL.js +2 -0
- package/dist/cjs/charts/constants/CHART_OBJECT.d.ts +564 -0
- package/dist/cjs/charts/constants/CHART_OBJECT.js +56 -0
- package/dist/cjs/charts/constants/QUESTION_TYPES.d.ts +241 -0
- package/dist/cjs/charts/constants/QUESTION_TYPES.js +413 -0
- package/dist/cjs/charts/constants/TIME_PERIOD.d.ts +10 -0
- package/dist/cjs/charts/constants/TIME_PERIOD.js +28 -0
- package/dist/cjs/charts/constants/index.d.ts +3 -0
- package/dist/cjs/charts/constants/index.js +3 -0
- package/dist/cjs/charts/helpers/chartTypes.d.ts +24 -0
- package/dist/cjs/charts/helpers/chartTypes.js +138 -0
- package/dist/cjs/charts/helpers/defaultColumnBuilder.d.ts +56 -0
- package/dist/cjs/charts/helpers/defaultColumnBuilder.js +326 -0
- package/dist/cjs/charts/helpers/getChartDimensions.d.ts +2 -0
- package/dist/cjs/charts/helpers/getChartDimensions.js +267 -0
- package/dist/cjs/charts/helpers/index.d.ts +4 -0
- package/dist/cjs/charts/helpers/index.js +4 -0
- package/dist/cjs/charts/helpers/styleSettingsByChartType.d.ts +60 -0
- package/dist/cjs/charts/helpers/styleSettingsByChartType.js +541 -0
- package/dist/cjs/charts/interfaces/IChartV2.d.ts +537 -0
- package/dist/cjs/charts/interfaces/IChartV2.js +36 -0
- package/dist/cjs/charts/interfaces/IRequestAdapterMetric.d.ts +5 -2
- package/dist/cjs/charts/interfaces/index.d.ts +1 -0
- package/dist/cjs/charts/interfaces/index.js +1 -0
- package/dist/cjs/column_format/helpers/columnTypeByChart.js +3 -1
- package/dist/cjs/columns/interfaces/IColumn.d.ts +1 -0
- package/dist/cjs/columns/interfaces/IColunmCalculation.d.ts +5 -0
- package/dist/cjs/constants/Charts.Const.d.ts +2 -1
- package/dist/cjs/constants/Charts.Const.js +1 -0
- package/dist/cjs/elements/helpers/fixed.d.ts +12 -1
- package/dist/cjs/elements/helpers/fixed.js +33 -8
- package/dist/cjs/elements/helpers/gridStrategy.d.ts +13 -0
- package/dist/cjs/elements/helpers/gridStrategy.js +31 -3
- package/dist/cjs/elements/helpers/responsive.d.ts +11 -1
- package/dist/cjs/elements/helpers/responsive.js +31 -1
- package/dist/cjs/elements/utils/fixed.position.d.ts +1 -0
- package/dist/cjs/elements/utils/fixed.position.js +8 -1
- package/dist/cjs/filters/constants/common/FILTER_SCOPE.d.ts +1 -0
- package/dist/cjs/filters/constants/common/FILTER_SCOPE.js +1 -0
- package/dist/cjs/filters/constants/common/FILTER_SCOPES.js +1 -0
- package/dist/cjs/filters/constants/common/FILTER_SCOPE_INFO.js +8 -0
- package/dist/cjs/filters/constants/common/FILTER_SCOPE_LABEL.d.ts +1 -0
- package/dist/cjs/filters/constants/common/FILTER_SCOPE_LABEL.js +1 -0
- package/dist/cjs/filters/constants/settings/FILTER_SETTINGS_DEFAULT.js +29 -6
- package/dist/cjs/filters/helpers/common/excludeFiltersByDatasetsColumns.d.ts +10 -0
- package/dist/cjs/filters/helpers/common/excludeFiltersByDatasetsColumns.js +64 -0
- package/dist/cjs/filters/helpers/common/index.d.ts +1 -0
- package/dist/cjs/filters/helpers/common/index.js +1 -0
- package/dist/cjs/format/duration/durationFormatter.js +4 -1
- package/dist/cjs/formulas/constants/FORMULA.d.ts +1 -0
- package/dist/cjs/formulas/constants/FORMULA.js +2 -1
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderMessagesGeneral.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/chart_builder/II18nChartBuilderStyleOptions.d.ts +4 -0
- package/dist/cjs/globalization/interfaces/dashboard/II18nDashboardAddChart.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/filters/II18nFilterPanelScopeTitle.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/filters/II18nFilterScopes.d.ts +1 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderCreateModal.d.ts +2 -0
- package/dist/cjs/globalization/interfaces/formula_builder/II18nFormulaBuilderV2Functions.d.ts +7 -7
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.js +1 -0
- package/dist/cjs/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +4 -0
- package/dist/cjs/globalization/labels/dashboard/I18N_DASHBOARD.js +1 -0
- package/dist/cjs/globalization/labels/filters/I18N_FILTER.js +1 -0
- package/dist/cjs/globalization/labels/filters/I18N_FILTER_SCOPE.js +1 -0
- package/dist/cjs/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +16 -14
- package/dist/column_format/helpers/columnTypeByChart.js +4 -2
- package/dist/columns/interfaces/IColumn.d.ts +1 -0
- package/dist/columns/interfaces/IColunmCalculation.d.ts +5 -0
- package/dist/constants/Charts.Const.d.ts +2 -1
- package/dist/constants/Charts.Const.js +1 -0
- package/dist/elements/helpers/fixed.d.ts +12 -1
- package/dist/elements/helpers/fixed.js +30 -6
- package/dist/elements/helpers/gridStrategy.d.ts +13 -0
- package/dist/elements/helpers/gridStrategy.js +31 -4
- package/dist/elements/helpers/responsive.d.ts +11 -1
- package/dist/elements/helpers/responsive.js +29 -0
- package/dist/elements/utils/fixed.position.d.ts +1 -0
- package/dist/elements/utils/fixed.position.js +6 -0
- package/dist/filters/constants/common/FILTER_SCOPE.d.ts +1 -0
- package/dist/filters/constants/common/FILTER_SCOPE.js +1 -0
- package/dist/filters/constants/common/FILTER_SCOPES.js +1 -0
- package/dist/filters/constants/common/FILTER_SCOPE_INFO.js +8 -0
- package/dist/filters/constants/common/FILTER_SCOPE_LABEL.d.ts +1 -0
- package/dist/filters/constants/common/FILTER_SCOPE_LABEL.js +1 -0
- package/dist/filters/constants/settings/FILTER_SETTINGS_DEFAULT.js +29 -6
- package/dist/filters/helpers/common/excludeFiltersByDatasetsColumns.d.ts +10 -0
- package/dist/filters/helpers/common/excludeFiltersByDatasetsColumns.js +60 -0
- package/dist/filters/helpers/common/index.d.ts +1 -0
- package/dist/filters/helpers/common/index.js +1 -0
- package/dist/format/duration/durationFormatter.js +4 -1
- package/dist/formulas/constants/FORMULA.d.ts +1 -0
- package/dist/formulas/constants/FORMULA.js +1 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderMessagesGeneral.d.ts +1 -0
- package/dist/globalization/interfaces/chart_builder/II18nChartBuilderStyleOptions.d.ts +4 -0
- package/dist/globalization/interfaces/dashboard/II18nDashboardAddChart.d.ts +1 -0
- package/dist/globalization/interfaces/filters/II18nFilterPanelScopeTitle.d.ts +1 -0
- package/dist/globalization/interfaces/filters/II18nFilterScopes.d.ts +1 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderCreateModal.d.ts +2 -0
- package/dist/globalization/interfaces/formula_builder/II18nFormulaBuilderV2Functions.d.ts +7 -7
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_GENERAL.js +1 -0
- package/dist/globalization/labels/chart_builder/I18N_CHART_BUILDER_STYLE_OPTIONS.js +4 -0
- package/dist/globalization/labels/dashboard/I18N_DASHBOARD.js +1 -0
- package/dist/globalization/labels/filters/I18N_FILTER.js +1 -0
- package/dist/globalization/labels/filters/I18N_FILTER_SCOPE.js +1 -0
- package/dist/globalization/labels/formula_builder/I18N_FORMULA_BUILDER.js +16 -14
- package/package.json +3 -3
|
@@ -0,0 +1,537 @@
|
|
|
1
|
+
import { IChartColumn } from "../../column_format/interfaces/IChartColumn";
|
|
2
|
+
import { IColumnType } from "../../columns/interfaces/IColumnType";
|
|
3
|
+
import { IColumnCalculation } from "../../columns/interfaces/IColunmCalculation";
|
|
4
|
+
import { CHART_TYPE } from "../../constants";
|
|
5
|
+
import { IOutputFormat } from "../../interfaces/IChartBuilder.Interface";
|
|
6
|
+
import { AutoType, CHART_ORIENTATION, CHART_THICKNESS, CONDITIONAL_CROSS, ICustomization, IDateRange, legendState, LINE_STYLE, LINE_TYPE, PIE_TYPE } from "../constants/CHART_OBJECT";
|
|
7
|
+
import { QUESTIONS_TYPES } from "../constants/QUESTION_TYPES";
|
|
8
|
+
import { MetricRequestResponse } from "./IRequestAdapterMetric";
|
|
9
|
+
export interface VisualizationSortBy {
|
|
10
|
+
type: string;
|
|
11
|
+
order: string;
|
|
12
|
+
}
|
|
13
|
+
export interface VisualizationAggregate {
|
|
14
|
+
text: string;
|
|
15
|
+
label: string;
|
|
16
|
+
abbreviation: string;
|
|
17
|
+
id: string;
|
|
18
|
+
key: string;
|
|
19
|
+
}
|
|
20
|
+
export interface VisualizationSorting {
|
|
21
|
+
sortBy: string;
|
|
22
|
+
showIndicator: boolean;
|
|
23
|
+
order: string;
|
|
24
|
+
}
|
|
25
|
+
export interface VisualizationColumn {
|
|
26
|
+
aggregate: VisualizationAggregate;
|
|
27
|
+
id?: string;
|
|
28
|
+
label: string;
|
|
29
|
+
qrveyid: string;
|
|
30
|
+
sorting: VisualizationSorting;
|
|
31
|
+
uniqueid: string;
|
|
32
|
+
type: IColumnType;
|
|
33
|
+
text: string;
|
|
34
|
+
shelfTypeSort: string;
|
|
35
|
+
colIndex: number;
|
|
36
|
+
uniqueCode: string;
|
|
37
|
+
maxmin: unknown;
|
|
38
|
+
visualization: string;
|
|
39
|
+
}
|
|
40
|
+
export interface VisualizationSortByColumn {
|
|
41
|
+
type: string;
|
|
42
|
+
order: string;
|
|
43
|
+
column: VisualizationColumn;
|
|
44
|
+
}
|
|
45
|
+
interface VisualizationNullData {
|
|
46
|
+
value: boolean;
|
|
47
|
+
option: string;
|
|
48
|
+
}
|
|
49
|
+
export interface VisualizationMaxOption {
|
|
50
|
+
value: boolean;
|
|
51
|
+
option: number;
|
|
52
|
+
}
|
|
53
|
+
interface VisualizationCalculationsOptions {
|
|
54
|
+
sums: boolean;
|
|
55
|
+
}
|
|
56
|
+
interface VisualizationCalculations {
|
|
57
|
+
value: boolean;
|
|
58
|
+
options: VisualizationCalculationsOptions;
|
|
59
|
+
}
|
|
60
|
+
interface VisualizationPagination {
|
|
61
|
+
enabled: boolean;
|
|
62
|
+
recordsPage: number;
|
|
63
|
+
}
|
|
64
|
+
export interface VisualizationTableMenu {
|
|
65
|
+
label_edit: boolean;
|
|
66
|
+
sorting: boolean;
|
|
67
|
+
multi_sorting: boolean;
|
|
68
|
+
value_view: boolean;
|
|
69
|
+
totals: boolean;
|
|
70
|
+
calculations: VisualizationCalculations;
|
|
71
|
+
pagination: VisualizationPagination;
|
|
72
|
+
filtering: boolean;
|
|
73
|
+
column_resizing: boolean;
|
|
74
|
+
column_arrangement: boolean;
|
|
75
|
+
column_update: boolean;
|
|
76
|
+
change_aggregation: boolean;
|
|
77
|
+
}
|
|
78
|
+
interface VisualizationCrosstabLabelsOptions {
|
|
79
|
+
sorting: boolean;
|
|
80
|
+
}
|
|
81
|
+
interface VisualizationCrosstabLabels {
|
|
82
|
+
value: boolean;
|
|
83
|
+
options: VisualizationCrosstabLabelsOptions;
|
|
84
|
+
}
|
|
85
|
+
interface VisualizationGlobalSettings {
|
|
86
|
+
size: number;
|
|
87
|
+
legend: string;
|
|
88
|
+
sort_by: VisualizationSortBy;
|
|
89
|
+
sort_by_column: VisualizationSortByColumn;
|
|
90
|
+
sort_by_multi_columns: VisualizationSortByColumn[];
|
|
91
|
+
auto_sort_by: boolean;
|
|
92
|
+
calculation_direction: string;
|
|
93
|
+
tooltips: {
|
|
94
|
+
value: boolean;
|
|
95
|
+
advanced?: any;
|
|
96
|
+
};
|
|
97
|
+
drilldown: boolean;
|
|
98
|
+
quick_sort: boolean;
|
|
99
|
+
null_data: VisualizationNullData;
|
|
100
|
+
max_data_point: VisualizationMaxOption;
|
|
101
|
+
max_series_point: VisualizationMaxOption;
|
|
102
|
+
max_rows: VisualizationMaxOption;
|
|
103
|
+
max_groups: VisualizationMaxOption;
|
|
104
|
+
max_value_point: VisualizationMaxOption;
|
|
105
|
+
table_menu: VisualizationTableMenu;
|
|
106
|
+
crosstab_labels: VisualizationCrosstabLabels;
|
|
107
|
+
crosstab_totals: {
|
|
108
|
+
value: boolean;
|
|
109
|
+
option: string;
|
|
110
|
+
};
|
|
111
|
+
average: boolean;
|
|
112
|
+
crosstab_subtotals: boolean;
|
|
113
|
+
chartVersion: string;
|
|
114
|
+
fit_panel: boolean;
|
|
115
|
+
i18nTokenMode: string;
|
|
116
|
+
hasPivot: boolean;
|
|
117
|
+
metric_scale?: IMetricScale;
|
|
118
|
+
startNumeric: string | number;
|
|
119
|
+
endNumeric: string | number;
|
|
120
|
+
startDate?: IDateRange;
|
|
121
|
+
endDate?: IDateRange;
|
|
122
|
+
startTime: string;
|
|
123
|
+
endTime: string;
|
|
124
|
+
labelRotation?: number;
|
|
125
|
+
customization?: Partial<ICustomization>;
|
|
126
|
+
}
|
|
127
|
+
interface IMetricScale {
|
|
128
|
+
value: boolean;
|
|
129
|
+
min_value: number;
|
|
130
|
+
max_value: number;
|
|
131
|
+
}
|
|
132
|
+
interface VisualizationFormat {
|
|
133
|
+
value: string;
|
|
134
|
+
currency: string;
|
|
135
|
+
decimals: number;
|
|
136
|
+
}
|
|
137
|
+
interface VisualizationScale {
|
|
138
|
+
type: string;
|
|
139
|
+
steps: unknown;
|
|
140
|
+
min_range: unknown;
|
|
141
|
+
max_range: unknown;
|
|
142
|
+
}
|
|
143
|
+
export interface VisualizationAxis {
|
|
144
|
+
labels: boolean;
|
|
145
|
+
showAxisTitle: boolean;
|
|
146
|
+
custom_label: unknown;
|
|
147
|
+
fontType: unknown;
|
|
148
|
+
fontWeight: string;
|
|
149
|
+
fontSize: string;
|
|
150
|
+
fontColor: unknown;
|
|
151
|
+
values: boolean;
|
|
152
|
+
fontTypeValues: unknown;
|
|
153
|
+
fontWeightValues: string;
|
|
154
|
+
fontSizeValues: string;
|
|
155
|
+
fontColorValues: unknown;
|
|
156
|
+
rotation: number;
|
|
157
|
+
customValue: unknown;
|
|
158
|
+
customRotation: number;
|
|
159
|
+
format: VisualizationFormat;
|
|
160
|
+
scale: VisualizationScale;
|
|
161
|
+
}
|
|
162
|
+
interface VisualizationSimpleLabels {
|
|
163
|
+
border: boolean;
|
|
164
|
+
format: VisualizationFormat;
|
|
165
|
+
}
|
|
166
|
+
interface VisualizationDataLabels {
|
|
167
|
+
value: boolean;
|
|
168
|
+
simple_labels: VisualizationSimpleLabels;
|
|
169
|
+
pie_labels?: {
|
|
170
|
+
position: number;
|
|
171
|
+
};
|
|
172
|
+
visible?: boolean;
|
|
173
|
+
}
|
|
174
|
+
export interface VisualizationTableHeaderStyle {
|
|
175
|
+
headerColor: string;
|
|
176
|
+
headerFontColor: string;
|
|
177
|
+
outerBorder: boolean;
|
|
178
|
+
fontFamily: string;
|
|
179
|
+
fontSize: string;
|
|
180
|
+
fontWeight: string;
|
|
181
|
+
}
|
|
182
|
+
export interface VisualizationTableBodyStyle {
|
|
183
|
+
borderColor: string;
|
|
184
|
+
outerBorder: string;
|
|
185
|
+
verticalBorder: string;
|
|
186
|
+
}
|
|
187
|
+
export interface ITableDimensions {
|
|
188
|
+
rowHeight: AutoType | number;
|
|
189
|
+
columnWidth: AutoType | number;
|
|
190
|
+
textWrap: boolean;
|
|
191
|
+
fitToData: boolean;
|
|
192
|
+
}
|
|
193
|
+
export declare const enum SYMBOL_FILL_TYPE {
|
|
194
|
+
FILLED = "Filled",
|
|
195
|
+
HOLLOW = "Hollow"
|
|
196
|
+
}
|
|
197
|
+
export declare enum SYMBOL_TYPE {
|
|
198
|
+
CIRCLE = "circle",
|
|
199
|
+
TRIANGLE_UP = "triangle-up",
|
|
200
|
+
TRIANGLE_DOWN = "triangle-down",
|
|
201
|
+
SQUARE = "square",
|
|
202
|
+
DIAMOND = "diamond",
|
|
203
|
+
X = "x",
|
|
204
|
+
CROSS = "cross",
|
|
205
|
+
SORT_ASC = "sort-asc",
|
|
206
|
+
SORT_DESC = "sort-desc",
|
|
207
|
+
SYMBOL_FILL = "symbol-fill",
|
|
208
|
+
TRIANGLE = "triangle"
|
|
209
|
+
}
|
|
210
|
+
export interface VisualizationStylesSettings {
|
|
211
|
+
bar_type?: string;
|
|
212
|
+
color_type: string;
|
|
213
|
+
color: string;
|
|
214
|
+
custom_color: boolean;
|
|
215
|
+
theme: string[];
|
|
216
|
+
custom_theme: boolean;
|
|
217
|
+
match_colors: boolean;
|
|
218
|
+
x_axis: VisualizationAxis;
|
|
219
|
+
y_axis: VisualizationAxis;
|
|
220
|
+
data_labels: VisualizationDataLabels;
|
|
221
|
+
tableHeaderStyle: VisualizationTableHeaderStyle;
|
|
222
|
+
tableBodyStyle: VisualizationTableBodyStyle;
|
|
223
|
+
tableDimensions: ITableDimensions;
|
|
224
|
+
useThemeColor: boolean;
|
|
225
|
+
offset: IStyleSettingOptionsOffset;
|
|
226
|
+
orientation: CHART_ORIENTATION;
|
|
227
|
+
thickness: CHART_THICKNESS;
|
|
228
|
+
shadding: boolean;
|
|
229
|
+
category_labels: {
|
|
230
|
+
segments: boolean;
|
|
231
|
+
categories: boolean;
|
|
232
|
+
};
|
|
233
|
+
percent_labels?: unknown;
|
|
234
|
+
pie_type?: PIE_TYPE;
|
|
235
|
+
line_type?: LINE_TYPE;
|
|
236
|
+
line_style?: LINE_STYLE;
|
|
237
|
+
bullet_target?: IBulletTarget;
|
|
238
|
+
opacity?: string | number;
|
|
239
|
+
format?: VisualizationFormat;
|
|
240
|
+
indicator_font?: IIndicatorFont;
|
|
241
|
+
animation?: {
|
|
242
|
+
enable: boolean;
|
|
243
|
+
};
|
|
244
|
+
dial_size?: number;
|
|
245
|
+
gauge?: string;
|
|
246
|
+
metric_comparison?: IMetricComparison;
|
|
247
|
+
comparison_font?: IComparisonFont;
|
|
248
|
+
indicator_symbol?: IIndicatorSymbol;
|
|
249
|
+
legend?: legendState;
|
|
250
|
+
tooltips?: IMetricTooltips;
|
|
251
|
+
repeatebleRows?: unknown;
|
|
252
|
+
symbol_fill?: SYMBOL_FILL_TYPE;
|
|
253
|
+
symbol_type?: SYMBOL_TYPE;
|
|
254
|
+
reverse_color?: boolean;
|
|
255
|
+
pivot_axis?: unknown;
|
|
256
|
+
}
|
|
257
|
+
export declare const enum OFFSET_TYPE {
|
|
258
|
+
PERCENTAGE = "PERCENTAGE",
|
|
259
|
+
PIXELS = "PIXELS"
|
|
260
|
+
}
|
|
261
|
+
export type offsetType = OFFSET_TYPE;
|
|
262
|
+
export interface IStyleSettingOptionsOffset {
|
|
263
|
+
type: offsetType;
|
|
264
|
+
left?: number;
|
|
265
|
+
bottom?: number;
|
|
266
|
+
top?: number;
|
|
267
|
+
}
|
|
268
|
+
interface IMetricTooltips {
|
|
269
|
+
value: boolean;
|
|
270
|
+
advanced?: {
|
|
271
|
+
data: any;
|
|
272
|
+
columns: any;
|
|
273
|
+
description?: string;
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
interface IIndicatorSymbol {
|
|
277
|
+
increase: IIndicatorSymbolOption;
|
|
278
|
+
decrease: IIndicatorSymbolOption;
|
|
279
|
+
nochange: IIndicatorSymbolOption;
|
|
280
|
+
}
|
|
281
|
+
interface IIndicatorSymbolOption {
|
|
282
|
+
symbol: string;
|
|
283
|
+
color: string;
|
|
284
|
+
}
|
|
285
|
+
interface IComparisonFont {
|
|
286
|
+
color: string;
|
|
287
|
+
style: string;
|
|
288
|
+
size: number;
|
|
289
|
+
automatic: boolean;
|
|
290
|
+
}
|
|
291
|
+
interface IMetricComparison {
|
|
292
|
+
value: boolean;
|
|
293
|
+
color: string;
|
|
294
|
+
}
|
|
295
|
+
interface IIndicatorFont {
|
|
296
|
+
color: string;
|
|
297
|
+
style: string;
|
|
298
|
+
size: number;
|
|
299
|
+
automatic: boolean;
|
|
300
|
+
}
|
|
301
|
+
interface IBulletTarget {
|
|
302
|
+
indicator: string;
|
|
303
|
+
value: number;
|
|
304
|
+
label: string;
|
|
305
|
+
color: string;
|
|
306
|
+
}
|
|
307
|
+
interface VisualizationComboLayer {
|
|
308
|
+
color_type: string;
|
|
309
|
+
color: string;
|
|
310
|
+
custom_color: boolean;
|
|
311
|
+
theme: string[];
|
|
312
|
+
custom_theme: boolean;
|
|
313
|
+
match_colors: boolean;
|
|
314
|
+
x_axis: VisualizationAxis;
|
|
315
|
+
y_axis: VisualizationAxis;
|
|
316
|
+
data_labels: VisualizationDataLabels;
|
|
317
|
+
tableHeaderStyle: VisualizationTableHeaderStyle;
|
|
318
|
+
useThemeColor: boolean;
|
|
319
|
+
offset: IStyleSettingOptionsOffset;
|
|
320
|
+
orientation: string;
|
|
321
|
+
thickness: string;
|
|
322
|
+
shadding: boolean;
|
|
323
|
+
symbol_type: string;
|
|
324
|
+
symbol_fill: string;
|
|
325
|
+
line_style: string;
|
|
326
|
+
line_type: string;
|
|
327
|
+
layer_type: string;
|
|
328
|
+
bar_type: string;
|
|
329
|
+
}
|
|
330
|
+
export interface VisualizationDimensionColumn extends IChartColumn, VisualizationConditions {
|
|
331
|
+
id: string;
|
|
332
|
+
text: string;
|
|
333
|
+
type: IColumnType;
|
|
334
|
+
qrveyid: string;
|
|
335
|
+
aggregate: VisualizationAggregate;
|
|
336
|
+
comboLayer: VisualizationComboLayer;
|
|
337
|
+
axisId: string;
|
|
338
|
+
uniqueCode: string;
|
|
339
|
+
colIndex: number;
|
|
340
|
+
dataField: string;
|
|
341
|
+
resultingType?: string;
|
|
342
|
+
columnTitle?: string;
|
|
343
|
+
groupAggregate: VisualizationAggregate;
|
|
344
|
+
visualization?: "Bars" | "Values";
|
|
345
|
+
maxmin?: unknown;
|
|
346
|
+
label?: string;
|
|
347
|
+
index?: number;
|
|
348
|
+
uniqueid?: string;
|
|
349
|
+
shelfTypeSort?: string;
|
|
350
|
+
sortOrder?: string;
|
|
351
|
+
formulaInputType?: string;
|
|
352
|
+
columnSetting?: {
|
|
353
|
+
imageField?: ImageFieldConfig;
|
|
354
|
+
hierarchy?: IHierarchyConfig;
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
export interface IHierarchyConfig {
|
|
358
|
+
enabled: boolean;
|
|
359
|
+
hierarchy: string;
|
|
360
|
+
hierarchyId: string;
|
|
361
|
+
rootValue: {
|
|
362
|
+
null: boolean;
|
|
363
|
+
otherValue: string;
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
export interface ImageFieldConfig {
|
|
367
|
+
id: string;
|
|
368
|
+
size: {
|
|
369
|
+
id: TableImageSizeId;
|
|
370
|
+
width: number;
|
|
371
|
+
height: number;
|
|
372
|
+
};
|
|
373
|
+
display: TableImageDisplay;
|
|
374
|
+
aspect: TableImageAspect;
|
|
375
|
+
}
|
|
376
|
+
export declare enum TableImageSizeId {
|
|
377
|
+
SMALL = "SMALL",
|
|
378
|
+
MEDIUM = "MEDIUM",
|
|
379
|
+
LARGE = "LARGE",
|
|
380
|
+
CUSTOM = "CUSTOM"
|
|
381
|
+
}
|
|
382
|
+
export declare enum TableImageDisplay {
|
|
383
|
+
LEFT = "LEFT",
|
|
384
|
+
RIGHT = "RIGHT",
|
|
385
|
+
ONLYIMAGE = "ONLYIMAGE"
|
|
386
|
+
}
|
|
387
|
+
export declare enum TableImageAspect {
|
|
388
|
+
CONTAIN = "CONTAIN",
|
|
389
|
+
COVER = "COVER",
|
|
390
|
+
FILL = "FILL"
|
|
391
|
+
}
|
|
392
|
+
export type AvailableColumn = {
|
|
393
|
+
label: string;
|
|
394
|
+
value: {
|
|
395
|
+
id: string;
|
|
396
|
+
type: string;
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
export interface RecursiveGrouping {
|
|
400
|
+
enabled?: boolean;
|
|
401
|
+
hierarchicalGroup?: object;
|
|
402
|
+
hierarchy?: object;
|
|
403
|
+
hierarchyId?: object;
|
|
404
|
+
}
|
|
405
|
+
export interface VisualizationDimensionsCategory extends VisualizationDimensionColumn {
|
|
406
|
+
}
|
|
407
|
+
export interface VisualizationCondition {
|
|
408
|
+
conditionPriority: number;
|
|
409
|
+
columnRef?: string;
|
|
410
|
+
crossRef?: {
|
|
411
|
+
id: CONDITIONAL_CROSS;
|
|
412
|
+
uniqueCode: string;
|
|
413
|
+
};
|
|
414
|
+
color?: string;
|
|
415
|
+
textColor?: string;
|
|
416
|
+
type?: SYMBOL_FILL_TYPE;
|
|
417
|
+
text?: string;
|
|
418
|
+
}
|
|
419
|
+
interface VisualizationConditions {
|
|
420
|
+
conditions?: VisualizationCondition[];
|
|
421
|
+
}
|
|
422
|
+
export interface VisualizationDimensionsValue extends VisualizationDimensionsCategory {
|
|
423
|
+
calculation?: IColumnCalculation;
|
|
424
|
+
}
|
|
425
|
+
export interface VisualizationDimensionsSerie extends VisualizationDimensionsCategory {
|
|
426
|
+
}
|
|
427
|
+
export interface VisualizationDimensions {
|
|
428
|
+
categories: VisualizationDimensionsCategory[];
|
|
429
|
+
values: VisualizationDimensionsValue[];
|
|
430
|
+
series: VisualizationDimensionsSerie[];
|
|
431
|
+
pivots: VisualizationDimensionColumn[];
|
|
432
|
+
smallmultiple: VisualizationDimensionColumn[];
|
|
433
|
+
trend: VisualizationDimensionColumn[];
|
|
434
|
+
reference: VisualizationDimensionColumn[];
|
|
435
|
+
geolocation: VisualizationDimensionColumn[];
|
|
436
|
+
comparison: VisualizationDimensionColumn[];
|
|
437
|
+
thresholds: VisualizationDimensionColumn[];
|
|
438
|
+
tableTotals: VisualizationDimensionColumn[];
|
|
439
|
+
}
|
|
440
|
+
interface VisualizationDataset {
|
|
441
|
+
text?: string;
|
|
442
|
+
}
|
|
443
|
+
export type IQuestionTypes = keyof typeof QUESTIONS_TYPES;
|
|
444
|
+
export type FORMULA_MODE = "STANDARD" | "ADVANCED";
|
|
445
|
+
export interface IQrveyModelDataset {
|
|
446
|
+
sourceid: string;
|
|
447
|
+
qrveyid: string;
|
|
448
|
+
name: string;
|
|
449
|
+
text: string;
|
|
450
|
+
linkid: string;
|
|
451
|
+
}
|
|
452
|
+
export interface ISortingOptions {
|
|
453
|
+
order?: string;
|
|
454
|
+
sortBy?: string;
|
|
455
|
+
showIndicator?: boolean;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* The MetricThresholdRequestResponse type is an object that contains an array of numbers called
|
|
459
|
+
* "summary".
|
|
460
|
+
* @property {number[]} summary - The `summary` property is an array of numbers.
|
|
461
|
+
*/
|
|
462
|
+
export type MetricThresholdRequestResponse = {
|
|
463
|
+
summary: number[];
|
|
464
|
+
};
|
|
465
|
+
export type MetricResultRequest = MetricRequestResponse | MetricThresholdRequestResponse;
|
|
466
|
+
export interface IQrveyModelColumn {
|
|
467
|
+
id: string;
|
|
468
|
+
qid: string;
|
|
469
|
+
text: string;
|
|
470
|
+
name: string;
|
|
471
|
+
typeLabel?: string;
|
|
472
|
+
type: IQuestionTypes;
|
|
473
|
+
answers?: unknown[];
|
|
474
|
+
archived?: boolean;
|
|
475
|
+
linked?: string;
|
|
476
|
+
bucketType?: string;
|
|
477
|
+
formulaType?: string;
|
|
478
|
+
formulaMode?: FORMULA_MODE;
|
|
479
|
+
property?: string;
|
|
480
|
+
calculation?: unknown;
|
|
481
|
+
dataset?: IQrveyModelDataset;
|
|
482
|
+
label?: string;
|
|
483
|
+
imageUploadOption?: "Text" | "Object" | "None";
|
|
484
|
+
outputFormat?: IOutputFormat;
|
|
485
|
+
sorting?: ISortingOptions;
|
|
486
|
+
selectedFormat?: IOutputFormat;
|
|
487
|
+
dateGroup?: unknown;
|
|
488
|
+
timeGroup?: unknown;
|
|
489
|
+
uniqueCode?: string;
|
|
490
|
+
colIndex?: string;
|
|
491
|
+
activeCat?: unknown;
|
|
492
|
+
formulaInputType?: string;
|
|
493
|
+
}
|
|
494
|
+
export interface ChartV2Model {
|
|
495
|
+
chart?: unknown;
|
|
496
|
+
component?: {
|
|
497
|
+
getVisibleRows?: () => unknown;
|
|
498
|
+
};
|
|
499
|
+
question?: IQrveyModelColumn;
|
|
500
|
+
type: CHART_TYPE;
|
|
501
|
+
previousType: CHART_TYPE;
|
|
502
|
+
panelId?: string;
|
|
503
|
+
defaultFilters?: unknown;
|
|
504
|
+
position: number;
|
|
505
|
+
title: string;
|
|
506
|
+
version: number;
|
|
507
|
+
globalSettings: VisualizationGlobalSettings;
|
|
508
|
+
stylesSettings: VisualizationStylesSettings;
|
|
509
|
+
dimensions: VisualizationDimensions;
|
|
510
|
+
chartid?: string;
|
|
511
|
+
metricid?: string;
|
|
512
|
+
createDate: string;
|
|
513
|
+
modifyDate: string;
|
|
514
|
+
dataset?: VisualizationDataset;
|
|
515
|
+
v2?: unknown;
|
|
516
|
+
results?: MetricResultRequest;
|
|
517
|
+
thresholdResults?: MetricResultRequest;
|
|
518
|
+
branchInfo?: unknown;
|
|
519
|
+
customTokens?: unknown[];
|
|
520
|
+
conditions?: unknown[];
|
|
521
|
+
comparisonList?: unknown;
|
|
522
|
+
qrveyid?: string;
|
|
523
|
+
hasDefaultConfig?: boolean;
|
|
524
|
+
isMulti?: boolean;
|
|
525
|
+
isTrend?: boolean;
|
|
526
|
+
isReference?: boolean;
|
|
527
|
+
isGrouped?: boolean;
|
|
528
|
+
isCombolayer?: boolean;
|
|
529
|
+
isCombo?: boolean;
|
|
530
|
+
isStakedBar?: boolean;
|
|
531
|
+
isSmallMultiples?: boolean;
|
|
532
|
+
isTableChartGrouped?: boolean;
|
|
533
|
+
isOldChart: boolean;
|
|
534
|
+
isMultipleSorted?: boolean;
|
|
535
|
+
trendsCharts?: unknown[];
|
|
536
|
+
}
|
|
537
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TableImageAspect = exports.TableImageDisplay = exports.TableImageSizeId = exports.SYMBOL_TYPE = void 0;
|
|
4
|
+
var SYMBOL_TYPE;
|
|
5
|
+
(function (SYMBOL_TYPE) {
|
|
6
|
+
SYMBOL_TYPE["CIRCLE"] = "circle";
|
|
7
|
+
SYMBOL_TYPE["TRIANGLE_UP"] = "triangle-up";
|
|
8
|
+
SYMBOL_TYPE["TRIANGLE_DOWN"] = "triangle-down";
|
|
9
|
+
SYMBOL_TYPE["SQUARE"] = "square";
|
|
10
|
+
SYMBOL_TYPE["DIAMOND"] = "diamond";
|
|
11
|
+
SYMBOL_TYPE["X"] = "x";
|
|
12
|
+
SYMBOL_TYPE["CROSS"] = "cross";
|
|
13
|
+
SYMBOL_TYPE["SORT_ASC"] = "sort-asc";
|
|
14
|
+
SYMBOL_TYPE["SORT_DESC"] = "sort-desc";
|
|
15
|
+
SYMBOL_TYPE["SYMBOL_FILL"] = "symbol-fill";
|
|
16
|
+
SYMBOL_TYPE["TRIANGLE"] = "triangle";
|
|
17
|
+
})(SYMBOL_TYPE || (exports.SYMBOL_TYPE = SYMBOL_TYPE = {}));
|
|
18
|
+
var TableImageSizeId;
|
|
19
|
+
(function (TableImageSizeId) {
|
|
20
|
+
TableImageSizeId["SMALL"] = "SMALL";
|
|
21
|
+
TableImageSizeId["MEDIUM"] = "MEDIUM";
|
|
22
|
+
TableImageSizeId["LARGE"] = "LARGE";
|
|
23
|
+
TableImageSizeId["CUSTOM"] = "CUSTOM";
|
|
24
|
+
})(TableImageSizeId || (exports.TableImageSizeId = TableImageSizeId = {}));
|
|
25
|
+
var TableImageDisplay;
|
|
26
|
+
(function (TableImageDisplay) {
|
|
27
|
+
TableImageDisplay["LEFT"] = "LEFT";
|
|
28
|
+
TableImageDisplay["RIGHT"] = "RIGHT";
|
|
29
|
+
TableImageDisplay["ONLYIMAGE"] = "ONLYIMAGE";
|
|
30
|
+
})(TableImageDisplay || (exports.TableImageDisplay = TableImageDisplay = {}));
|
|
31
|
+
var TableImageAspect;
|
|
32
|
+
(function (TableImageAspect) {
|
|
33
|
+
TableImageAspect["CONTAIN"] = "CONTAIN";
|
|
34
|
+
TableImageAspect["COVER"] = "COVER";
|
|
35
|
+
TableImageAspect["FILL"] = "FILL";
|
|
36
|
+
})(TableImageAspect || (exports.TableImageAspect = TableImageAspect = {}));
|
|
@@ -2,7 +2,7 @@ import { IBColumn, IColumnType } from "../../columns";
|
|
|
2
2
|
import { IDateGroupingProperty, RelativeCursor } from "../../dates";
|
|
3
3
|
import { IFBLogic } from "../../filters";
|
|
4
4
|
import { TimePeriod, TP_CUSTOM_RANGE } from "../../interfaces";
|
|
5
|
-
import { AGGREGATE_LABEL } from "../constants";
|
|
5
|
+
import { AGGREGATE, AGGREGATE_LABEL } from "../constants";
|
|
6
6
|
export interface MetricRequestPayload {
|
|
7
7
|
logic: IFBLogic[];
|
|
8
8
|
value: MetricValue;
|
|
@@ -18,9 +18,10 @@ export interface MetricRequestPayload {
|
|
|
18
18
|
* property "answered".
|
|
19
19
|
*/
|
|
20
20
|
export type MetricValue = {
|
|
21
|
-
aggregate
|
|
21
|
+
aggregate?: AGGREGATE_LABEL;
|
|
22
22
|
questionid: string;
|
|
23
23
|
property?: string | null;
|
|
24
|
+
dateAsText?: boolean;
|
|
24
25
|
};
|
|
25
26
|
/**
|
|
26
27
|
* A `RelativeDateConfig` is an object with a `questionid` property, a `cursor` property, an optional
|
|
@@ -109,9 +110,11 @@ export type MetricConfigData = {
|
|
|
109
110
|
value: {
|
|
110
111
|
id: string;
|
|
111
112
|
property: string;
|
|
113
|
+
formulaInputType?: string;
|
|
112
114
|
};
|
|
113
115
|
valueAggregate: {
|
|
114
116
|
label: AGGREGATE_LABEL;
|
|
117
|
+
id: AGGREGATE;
|
|
115
118
|
};
|
|
116
119
|
};
|
|
117
120
|
export type MetricTimeCustomRange = {
|
|
@@ -19,3 +19,4 @@ __exportStar(require("./IAggregateInfo"), exports);
|
|
|
19
19
|
__exportStar(require("./IAggregateLabel"), exports);
|
|
20
20
|
__exportStar(require("./IAggregateType"), exports);
|
|
21
21
|
__exportStar(require("./IRequestAdapterMetric"), exports);
|
|
22
|
+
__exportStar(require("./IChartV2"), exports);
|
|
@@ -17,6 +17,7 @@ const parseFormulaTypeByCharts_1 = require("./parseFormulaTypeByCharts");
|
|
|
17
17
|
* @returns The column type of the column.
|
|
18
18
|
*/
|
|
19
19
|
const columnTypeByChart = (column, shelfType, chartGroup, isGroupedTable) => {
|
|
20
|
+
var _a;
|
|
20
21
|
if (!column)
|
|
21
22
|
return;
|
|
22
23
|
const currentType = column.type === columns_1.COLUMN.FORMULA
|
|
@@ -25,7 +26,8 @@ const columnTypeByChart = (column, shelfType, chartGroup, isGroupedTable) => {
|
|
|
25
26
|
const isNumericalColumn = __1.NUMERICAL_COLUMNS.some((colType) => colType === currentType) ||
|
|
26
27
|
(chartGroup === CHART_GROUP_1.CHART_GROUPS.TABLES &&
|
|
27
28
|
isGroupedTable === true &&
|
|
28
|
-
shelfType === SHELF_TYPE_1.SHELF_TYPE.COLUMNS
|
|
29
|
+
shelfType === SHELF_TYPE_1.SHELF_TYPE.COLUMNS &&
|
|
30
|
+
![__1.AGGREGATE.MIN, __1.AGGREGATE.MAX].includes((_a = column === null || column === void 0 ? void 0 : column.aggregate) === null || _a === void 0 ? void 0 : _a.id)) ||
|
|
29
31
|
(chartGroup === CHART_GROUP_1.CHART_GROUPS.XY && shelfType === SHELF_TYPE_1.SHELF_TYPE.VALUE);
|
|
30
32
|
return isNumericalColumn === true ? __1.NUMERICAL_COLUMN.NUMERIC : currentType;
|
|
31
33
|
};
|
|
@@ -30,7 +30,8 @@ export declare enum CHART_TYPE {
|
|
|
30
30
|
RADAR_CHART = "RADAR_CHART",
|
|
31
31
|
TREEMAP_CHART = "TREEMAP_CHART",
|
|
32
32
|
AREA_CHART = "AREA_CHART",
|
|
33
|
-
AREA_CHART_MS = "AREA_CHART_MS"
|
|
33
|
+
AREA_CHART_MS = "AREA_CHART_MS",
|
|
34
|
+
SCATTER_CHART = "SCATTER_CHART"
|
|
34
35
|
}
|
|
35
36
|
export declare enum CHART_DIMENSION {
|
|
36
37
|
CATEGORIES = "categories",
|
|
@@ -35,6 +35,7 @@ var CHART_TYPE;
|
|
|
35
35
|
CHART_TYPE["TREEMAP_CHART"] = "TREEMAP_CHART";
|
|
36
36
|
CHART_TYPE["AREA_CHART"] = "AREA_CHART";
|
|
37
37
|
CHART_TYPE["AREA_CHART_MS"] = "AREA_CHART_MS";
|
|
38
|
+
CHART_TYPE["SCATTER_CHART"] = "SCATTER_CHART";
|
|
38
39
|
})(CHART_TYPE || (exports.CHART_TYPE = CHART_TYPE = {}));
|
|
39
40
|
var CHART_DIMENSION;
|
|
40
41
|
(function (CHART_DIMENSION) {
|