survey-analytics 1.9.48 → 1.9.49
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/package.json +4 -2
- package/survey.analytics.css +1 -1
- package/survey.analytics.datatables.css +1 -1
- package/survey.analytics.datatables.d.ts +838 -0
- package/survey.analytics.datatables.js +2 -2
- package/survey.analytics.datatables.min.css +1 -1
- package/survey.analytics.datatables.min.js +1 -1
- package/survey.analytics.js +1 -1
- package/survey.analytics.min.css +1 -1
- package/survey.analytics.min.js +1 -1
- package/survey.analytics.tabulator.css +1 -1
- package/survey.analytics.tabulator.d.ts +873 -0
- package/survey.analytics.tabulator.js +18 -6
- package/survey.analytics.tabulator.min.css +1 -1
- package/survey.analytics.tabulator.min.js +2 -2
|
@@ -0,0 +1,838 @@
|
|
|
1
|
+
declare module "localization/english" {
|
|
2
|
+
export var englishStrings: {
|
|
3
|
+
groupButton: string;
|
|
4
|
+
ungroupButton: string;
|
|
5
|
+
selectButton: string;
|
|
6
|
+
hideColumn: string;
|
|
7
|
+
showColumn: string;
|
|
8
|
+
makePrivateColumn: string;
|
|
9
|
+
makePublicColumn: string;
|
|
10
|
+
moveToDetail: string;
|
|
11
|
+
showAsColumn: string;
|
|
12
|
+
filterPlaceholder: string;
|
|
13
|
+
removeRows: string;
|
|
14
|
+
showLabel: string;
|
|
15
|
+
entriesLabel: string;
|
|
16
|
+
visualizer_text: string;
|
|
17
|
+
visualizer_wordcloud: string;
|
|
18
|
+
visualizer_histogram: string;
|
|
19
|
+
visualizer_number: string;
|
|
20
|
+
visualizer_choices: string;
|
|
21
|
+
visualizer_selectBase: string;
|
|
22
|
+
chartType_bar: string;
|
|
23
|
+
chartType_vbar: string;
|
|
24
|
+
chartType_stackedbar: string;
|
|
25
|
+
chartType_doughnut: string;
|
|
26
|
+
chartType_pie: string;
|
|
27
|
+
chartType_scatter: string;
|
|
28
|
+
chartType_gauge: string;
|
|
29
|
+
chartType_bullet: string;
|
|
30
|
+
hideButton: string;
|
|
31
|
+
makePrivateButton: string;
|
|
32
|
+
makePublicButton: string;
|
|
33
|
+
showButton: string;
|
|
34
|
+
filter: string;
|
|
35
|
+
resetFilter: string;
|
|
36
|
+
changeLocale: string;
|
|
37
|
+
en: string;
|
|
38
|
+
fr: string;
|
|
39
|
+
ru: string;
|
|
40
|
+
de: string;
|
|
41
|
+
clearButton: string;
|
|
42
|
+
addElement: string;
|
|
43
|
+
defaultOrder: string;
|
|
44
|
+
ascOrder: string;
|
|
45
|
+
descOrder: string;
|
|
46
|
+
showMinorColumns: string;
|
|
47
|
+
otherCommentTitle: string;
|
|
48
|
+
showPercentages: string;
|
|
49
|
+
hidePercentages: string;
|
|
50
|
+
pdfDownloadCaption: string;
|
|
51
|
+
xlsxDownloadCaption: string;
|
|
52
|
+
csvDownloadCaption: string;
|
|
53
|
+
saveDiagramAsPNG: string;
|
|
54
|
+
hideEmptyAnswers: string;
|
|
55
|
+
showEmptyAnswers: string;
|
|
56
|
+
"topNValueText-1": string;
|
|
57
|
+
topNValueText5: string;
|
|
58
|
+
topNValueText10: string;
|
|
59
|
+
topNValueText20: string;
|
|
60
|
+
hideMissingAnswers: string;
|
|
61
|
+
showMissingAnswers: string;
|
|
62
|
+
missingAnswersLabel: string;
|
|
63
|
+
noVisualizerForQuestion: string;
|
|
64
|
+
noResults: string;
|
|
65
|
+
showPerValues: string;
|
|
66
|
+
showPerColumns: string;
|
|
67
|
+
answer: string;
|
|
68
|
+
percent: string;
|
|
69
|
+
responses: string;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
declare module "localizationManager" {
|
|
73
|
+
export var localization: {
|
|
74
|
+
currentLocaleValue: string;
|
|
75
|
+
defaultLocaleValue: string;
|
|
76
|
+
locales: {
|
|
77
|
+
[index: string]: any;
|
|
78
|
+
};
|
|
79
|
+
localeNames: {
|
|
80
|
+
[index: string]: any;
|
|
81
|
+
};
|
|
82
|
+
supportedLocales: any[];
|
|
83
|
+
currentLocale: string;
|
|
84
|
+
defaultLocale: string;
|
|
85
|
+
getString: (strName: string) => any;
|
|
86
|
+
getLocales: () => Array<string>;
|
|
87
|
+
};
|
|
88
|
+
export var surveyStrings: {
|
|
89
|
+
groupButton: string;
|
|
90
|
+
ungroupButton: string;
|
|
91
|
+
selectButton: string;
|
|
92
|
+
hideColumn: string;
|
|
93
|
+
showColumn: string;
|
|
94
|
+
makePrivateColumn: string;
|
|
95
|
+
makePublicColumn: string;
|
|
96
|
+
moveToDetail: string;
|
|
97
|
+
showAsColumn: string;
|
|
98
|
+
filterPlaceholder: string;
|
|
99
|
+
removeRows: string;
|
|
100
|
+
showLabel: string;
|
|
101
|
+
entriesLabel: string;
|
|
102
|
+
visualizer_text: string;
|
|
103
|
+
visualizer_wordcloud: string;
|
|
104
|
+
visualizer_histogram: string;
|
|
105
|
+
visualizer_number: string;
|
|
106
|
+
visualizer_choices: string;
|
|
107
|
+
visualizer_selectBase: string;
|
|
108
|
+
chartType_bar: string;
|
|
109
|
+
chartType_vbar: string;
|
|
110
|
+
chartType_stackedbar: string;
|
|
111
|
+
chartType_doughnut: string;
|
|
112
|
+
chartType_pie: string;
|
|
113
|
+
chartType_scatter: string;
|
|
114
|
+
chartType_gauge: string;
|
|
115
|
+
chartType_bullet: string;
|
|
116
|
+
hideButton: string;
|
|
117
|
+
makePrivateButton: string;
|
|
118
|
+
makePublicButton: string;
|
|
119
|
+
showButton: string;
|
|
120
|
+
filter: string;
|
|
121
|
+
resetFilter: string;
|
|
122
|
+
changeLocale: string;
|
|
123
|
+
en: string;
|
|
124
|
+
fr: string;
|
|
125
|
+
ru: string;
|
|
126
|
+
de: string;
|
|
127
|
+
clearButton: string;
|
|
128
|
+
addElement: string;
|
|
129
|
+
defaultOrder: string;
|
|
130
|
+
ascOrder: string;
|
|
131
|
+
descOrder: string;
|
|
132
|
+
showMinorColumns: string;
|
|
133
|
+
otherCommentTitle: string;
|
|
134
|
+
showPercentages: string;
|
|
135
|
+
hidePercentages: string;
|
|
136
|
+
pdfDownloadCaption: string;
|
|
137
|
+
xlsxDownloadCaption: string;
|
|
138
|
+
csvDownloadCaption: string;
|
|
139
|
+
saveDiagramAsPNG: string;
|
|
140
|
+
hideEmptyAnswers: string;
|
|
141
|
+
showEmptyAnswers: string;
|
|
142
|
+
"topNValueText-1": string;
|
|
143
|
+
topNValueText5: string;
|
|
144
|
+
topNValueText10: string;
|
|
145
|
+
topNValueText20: string;
|
|
146
|
+
hideMissingAnswers: string;
|
|
147
|
+
showMissingAnswers: string;
|
|
148
|
+
missingAnswersLabel: string;
|
|
149
|
+
noVisualizerForQuestion: string;
|
|
150
|
+
noResults: string;
|
|
151
|
+
showPerValues: string;
|
|
152
|
+
showPerColumns: string;
|
|
153
|
+
answer: string;
|
|
154
|
+
percent: string;
|
|
155
|
+
responses: string;
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
declare module "localization/farsi" {
|
|
159
|
+
export var farsiStrings: {
|
|
160
|
+
groupButton: string;
|
|
161
|
+
ungroupButton: string;
|
|
162
|
+
selectButton: string;
|
|
163
|
+
hideColumn: string;
|
|
164
|
+
showColumn: string;
|
|
165
|
+
moveToDetail: string;
|
|
166
|
+
showAsColumn: string;
|
|
167
|
+
visualizer_text: string;
|
|
168
|
+
visualizer_wordcloud: string;
|
|
169
|
+
chartType_bar: string;
|
|
170
|
+
chartType_pie: string;
|
|
171
|
+
chartType_scatter: string;
|
|
172
|
+
chartType_gauge: string;
|
|
173
|
+
chartType_bullet: string;
|
|
174
|
+
hideButton: string;
|
|
175
|
+
resetFilter: string;
|
|
176
|
+
clearButton: string;
|
|
177
|
+
addElement: string;
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
declare module "localization/french" {
|
|
181
|
+
export var frenchStrings: {
|
|
182
|
+
groupButton: string;
|
|
183
|
+
ungroupButton: string;
|
|
184
|
+
selectButton: string;
|
|
185
|
+
hideColumn: string;
|
|
186
|
+
showColumn: string;
|
|
187
|
+
makePrivateColumn: string;
|
|
188
|
+
makePublicColumn: string;
|
|
189
|
+
moveToDetail: string;
|
|
190
|
+
showAsColumn: string;
|
|
191
|
+
visualizer_text: string;
|
|
192
|
+
visualizer_wordcloud: string;
|
|
193
|
+
chartType_bar: string;
|
|
194
|
+
chartType_stackedbar: string;
|
|
195
|
+
chartType_doughnut: string;
|
|
196
|
+
chartType_pie: string;
|
|
197
|
+
chartType_scatter: string;
|
|
198
|
+
chartType_gauge: string;
|
|
199
|
+
chartType_bullet: string;
|
|
200
|
+
filter: string;
|
|
201
|
+
hideButton: string;
|
|
202
|
+
resetFilter: string;
|
|
203
|
+
clearButton: string;
|
|
204
|
+
addElement: string;
|
|
205
|
+
defaultOrder: string;
|
|
206
|
+
ascOrder: string;
|
|
207
|
+
descOrder: string;
|
|
208
|
+
showMinorColumns: string;
|
|
209
|
+
otherCommentTitle: string;
|
|
210
|
+
noVisualizerForQuestion: string;
|
|
211
|
+
noResults: string;
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
declare module "localization/norwegian" {
|
|
215
|
+
export var norwegianStrings: {
|
|
216
|
+
groupButton: string;
|
|
217
|
+
ungroupButton: string;
|
|
218
|
+
selectButton: string;
|
|
219
|
+
hideColumn: string;
|
|
220
|
+
showColumn: string;
|
|
221
|
+
makePrivateColumn: string;
|
|
222
|
+
makePublicColumn: string;
|
|
223
|
+
moveToDetail: string;
|
|
224
|
+
showAsColumn: string;
|
|
225
|
+
filterPlaceholder: string;
|
|
226
|
+
removeRows: string;
|
|
227
|
+
showLabel: string;
|
|
228
|
+
entriesLabel: string;
|
|
229
|
+
visualizer_text: string;
|
|
230
|
+
visualizer_wordcloud: string;
|
|
231
|
+
chartType_bar: string;
|
|
232
|
+
chartType_stackedbar: string;
|
|
233
|
+
chartType_doughnut: string;
|
|
234
|
+
chartType_pie: string;
|
|
235
|
+
chartType_scatter: string;
|
|
236
|
+
chartType_gauge: string;
|
|
237
|
+
chartType_bullet: string;
|
|
238
|
+
hideButton: string;
|
|
239
|
+
makePrivateButton: string;
|
|
240
|
+
makePublicButton: string;
|
|
241
|
+
showButton: string;
|
|
242
|
+
resetFilter: string;
|
|
243
|
+
changeLocale: string;
|
|
244
|
+
clearButton: string;
|
|
245
|
+
addElement: string;
|
|
246
|
+
defaultOrder: string;
|
|
247
|
+
ascOrder: string;
|
|
248
|
+
descOrder: string;
|
|
249
|
+
showMinorColumns: string;
|
|
250
|
+
otherCommentTitle: string;
|
|
251
|
+
showPercentages: string;
|
|
252
|
+
hidePercentages: string;
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
declare module "localization/portuguese" {
|
|
256
|
+
export var portugueseStrings: {
|
|
257
|
+
groupButton: string;
|
|
258
|
+
ungroupButton: string;
|
|
259
|
+
selectButton: string;
|
|
260
|
+
hideColumn: string;
|
|
261
|
+
showColumn: string;
|
|
262
|
+
makePrivateColumn: string;
|
|
263
|
+
makePublicColumn: string;
|
|
264
|
+
moveToDetail: string;
|
|
265
|
+
showAsColumn: string;
|
|
266
|
+
filterPlaceholder: string;
|
|
267
|
+
removeRows: string;
|
|
268
|
+
showLabel: string;
|
|
269
|
+
entriesLabel: string;
|
|
270
|
+
visualizer_text: string;
|
|
271
|
+
chartType_bar: string;
|
|
272
|
+
chartType_stackedbar: string;
|
|
273
|
+
chartType_doughnut: string;
|
|
274
|
+
chartType_pie: string;
|
|
275
|
+
chartType_scatter: string;
|
|
276
|
+
chartType_gauge: string;
|
|
277
|
+
chartType_bullet: string;
|
|
278
|
+
hideButton: string;
|
|
279
|
+
makePrivateButton: string;
|
|
280
|
+
makePublicButton: string;
|
|
281
|
+
showButton: string;
|
|
282
|
+
filter: string;
|
|
283
|
+
resetFilter: string;
|
|
284
|
+
changeLocale: string;
|
|
285
|
+
clearButton: string;
|
|
286
|
+
addElement: string;
|
|
287
|
+
defaultOrder: string;
|
|
288
|
+
ascOrder: string;
|
|
289
|
+
descOrder: string;
|
|
290
|
+
showMinorColumns: string;
|
|
291
|
+
otherCommentTitle: string;
|
|
292
|
+
showPercentages: string;
|
|
293
|
+
hidePercentages: string;
|
|
294
|
+
saveDiagramAsPNG: string;
|
|
295
|
+
hideEmptyAnswers: string;
|
|
296
|
+
showEmptyAnswers: string;
|
|
297
|
+
"topNValueText-1": string;
|
|
298
|
+
topNValueText5: string;
|
|
299
|
+
topNValueText10: string;
|
|
300
|
+
topNValueText20: string;
|
|
301
|
+
noVisualizerForQuestion: string;
|
|
302
|
+
noResults: string;
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
declare module "localization/russian" {
|
|
306
|
+
export var russianStrings: {
|
|
307
|
+
groupButton: string;
|
|
308
|
+
ungroupButton: string;
|
|
309
|
+
selectButton: string;
|
|
310
|
+
hideColumn: string;
|
|
311
|
+
showColumn: string;
|
|
312
|
+
makePrivateColumn: string;
|
|
313
|
+
makePublicColumn: string;
|
|
314
|
+
moveToDetail: string;
|
|
315
|
+
filter: string;
|
|
316
|
+
showAsColumn: string;
|
|
317
|
+
visualizer_text: string;
|
|
318
|
+
visualizer_wordcloud: string;
|
|
319
|
+
chartType_bar: string;
|
|
320
|
+
chartType_stackedbar: string;
|
|
321
|
+
chartType_doughnut: string;
|
|
322
|
+
chartType_pie: string;
|
|
323
|
+
chartType_scatter: string;
|
|
324
|
+
chartType_gauge: string;
|
|
325
|
+
chartType_bullet: string;
|
|
326
|
+
hideButton: string;
|
|
327
|
+
showButton: string;
|
|
328
|
+
resetFilter: string;
|
|
329
|
+
changeLocale: string;
|
|
330
|
+
clearButton: string;
|
|
331
|
+
addElement: string;
|
|
332
|
+
defaultOrder: string;
|
|
333
|
+
ascOrder: string;
|
|
334
|
+
descOrder: string;
|
|
335
|
+
showMinorColumns: string;
|
|
336
|
+
otherCommentTitle: string;
|
|
337
|
+
noVisualizerForQuestion: string;
|
|
338
|
+
noResults: string;
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
declare module "localization/dutch" {
|
|
342
|
+
export var dutchStrings: {
|
|
343
|
+
groupButton: string;
|
|
344
|
+
ungroupButton: string;
|
|
345
|
+
selectButton: string;
|
|
346
|
+
hideColumn: string;
|
|
347
|
+
showColumn: string;
|
|
348
|
+
makePrivateColumn: string;
|
|
349
|
+
makePublicColumn: string;
|
|
350
|
+
moveToDetail: string;
|
|
351
|
+
showAsColumn: string;
|
|
352
|
+
filterPlaceholder: string;
|
|
353
|
+
removeRows: string;
|
|
354
|
+
showLabel: string;
|
|
355
|
+
entriesLabel: string;
|
|
356
|
+
visualizer_text: string;
|
|
357
|
+
visualizer_wordcloud: string;
|
|
358
|
+
chartType_bar: string;
|
|
359
|
+
chartType_stackedbar: string;
|
|
360
|
+
chartType_doughnut: string;
|
|
361
|
+
chartType_pie: string;
|
|
362
|
+
chartType_scatter: string;
|
|
363
|
+
chartType_gauge: string;
|
|
364
|
+
chartType_bullet: string;
|
|
365
|
+
hideButton: string;
|
|
366
|
+
makePrivateButton: string;
|
|
367
|
+
makePublicButton: string;
|
|
368
|
+
showButton: string;
|
|
369
|
+
resetFilter: string;
|
|
370
|
+
changeLocale: string;
|
|
371
|
+
clearButton: string;
|
|
372
|
+
addElement: string;
|
|
373
|
+
defaultOrder: string;
|
|
374
|
+
ascOrder: string;
|
|
375
|
+
descOrder: string;
|
|
376
|
+
showMinorColumns: string;
|
|
377
|
+
otherCommentTitle: string;
|
|
378
|
+
showPercentages: string;
|
|
379
|
+
hidePercentages: string;
|
|
380
|
+
pdfDownloadCaption: string;
|
|
381
|
+
xlsxDownloadCaption: string;
|
|
382
|
+
csvDownloadCaption: string;
|
|
383
|
+
saveDiagramAsPNG: string;
|
|
384
|
+
hideEmptyAnswers: string;
|
|
385
|
+
showEmptyAnswers: string;
|
|
386
|
+
"topNValueText-1": string;
|
|
387
|
+
topNValueText5: string;
|
|
388
|
+
topNValueText10: string;
|
|
389
|
+
topNValueText20: string;
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
declare module "tables/config" {
|
|
393
|
+
import { Question } from "survey-core";
|
|
394
|
+
import { Table } from "tables/table";
|
|
395
|
+
export enum QuestionLocation {
|
|
396
|
+
Column = 0,
|
|
397
|
+
Row = 1
|
|
398
|
+
}
|
|
399
|
+
export enum ColumnDataType {
|
|
400
|
+
Text = 0,
|
|
401
|
+
FileLink = 1,
|
|
402
|
+
Image = 2
|
|
403
|
+
}
|
|
404
|
+
export interface ICellData {
|
|
405
|
+
question: Question;
|
|
406
|
+
displayValue: any;
|
|
407
|
+
}
|
|
408
|
+
export interface IColumnData {
|
|
409
|
+
name: string;
|
|
410
|
+
displayName: string;
|
|
411
|
+
dataType: ColumnDataType;
|
|
412
|
+
isVisible: boolean;
|
|
413
|
+
isPublic: boolean;
|
|
414
|
+
location: QuestionLocation;
|
|
415
|
+
width?: string | number;
|
|
416
|
+
isComment?: boolean;
|
|
417
|
+
}
|
|
418
|
+
export interface IColumn extends IColumnData {
|
|
419
|
+
visibleIndex?: number;
|
|
420
|
+
fromJSON(json: any): void;
|
|
421
|
+
getCellData(table: Table, data: any): ICellData;
|
|
422
|
+
}
|
|
423
|
+
export interface ITableState {
|
|
424
|
+
locale?: string;
|
|
425
|
+
elements?: IColumnData[];
|
|
426
|
+
pageSize?: number;
|
|
427
|
+
}
|
|
428
|
+
export interface IPermission {
|
|
429
|
+
name: string;
|
|
430
|
+
isPublic: boolean;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
declare module "utils/index" {
|
|
434
|
+
export class DocumentHelper {
|
|
435
|
+
static createSelector(options: Array<{
|
|
436
|
+
value: string;
|
|
437
|
+
text: string;
|
|
438
|
+
}>, isSelected: (option: {
|
|
439
|
+
value: string;
|
|
440
|
+
text: string;
|
|
441
|
+
}) => boolean, handler: (e: any) => void): HTMLDivElement;
|
|
442
|
+
static createButton(handler: (e: any) => void, text?: string, className?: string): HTMLElement;
|
|
443
|
+
static createElement(tagName: string, className?: string, attrs?: any): HTMLElement;
|
|
444
|
+
static createSvgElement(path: string): SVGSVGElement;
|
|
445
|
+
static createSvgButton(path: string): HTMLButtonElement;
|
|
446
|
+
static createSvgToggleButton(svgPath1: string, svPpath2: string, text1: string, text2: string, handler1: (e: any) => any, handler2: (e: any) => any, state?: string, className?: string): HTMLElement;
|
|
447
|
+
static createInput(className: string, placeholder?: string, defaultValue?: string): HTMLInputElement;
|
|
448
|
+
}
|
|
449
|
+
export var options: {
|
|
450
|
+
runningInBrowser: boolean;
|
|
451
|
+
};
|
|
452
|
+
export function allowDomRendering(): boolean;
|
|
453
|
+
export function createCommercialLicenseLink(): HTMLElement;
|
|
454
|
+
export class DataHelper {
|
|
455
|
+
static zipArrays(...arrays: any[]): any[][];
|
|
456
|
+
static unzipArrays(zipArray: any[][]): any[][];
|
|
457
|
+
static sortDictionary(keys: any[], values: any[], desc: boolean): {
|
|
458
|
+
keys: any[];
|
|
459
|
+
values: any[];
|
|
460
|
+
};
|
|
461
|
+
static toPercentage(value: number, maxValue: number): number;
|
|
462
|
+
}
|
|
463
|
+
export function createLinksContainer(links: Array<{
|
|
464
|
+
name: string;
|
|
465
|
+
content: any;
|
|
466
|
+
}>): HTMLElement;
|
|
467
|
+
export function createImagesContainer(links: Array<{
|
|
468
|
+
name: string;
|
|
469
|
+
content: any;
|
|
470
|
+
}>): HTMLElement;
|
|
471
|
+
}
|
|
472
|
+
declare module "tables/extensions/tableextensions" {
|
|
473
|
+
import { Table } from "tables/table";
|
|
474
|
+
interface ITableExtension {
|
|
475
|
+
location: string;
|
|
476
|
+
name: string;
|
|
477
|
+
visibleIndex: number;
|
|
478
|
+
render: (table: Table, opt: any) => HTMLElement;
|
|
479
|
+
destroy?: () => void;
|
|
480
|
+
}
|
|
481
|
+
export class TableExtensions {
|
|
482
|
+
private table;
|
|
483
|
+
constructor(table: Table);
|
|
484
|
+
private static extensions;
|
|
485
|
+
private renderedExtensions;
|
|
486
|
+
render(targetNode: HTMLElement, location: string, options?: any): void;
|
|
487
|
+
destroy(): void;
|
|
488
|
+
static registerExtension(extension: ITableExtension): void;
|
|
489
|
+
private static removeExtension;
|
|
490
|
+
static unregisterExtension(location: string, actionName: string): void;
|
|
491
|
+
static findExtension(location: string, actionName: string): ITableExtension;
|
|
492
|
+
private sortExtensions;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
declare module "tables/extensions/detailsextensions" {
|
|
496
|
+
import { TableRow } from "tables/table";
|
|
497
|
+
import { Table } from "tables/table";
|
|
498
|
+
export class Details {
|
|
499
|
+
protected table: Table;
|
|
500
|
+
private row;
|
|
501
|
+
protected targetNode: HTMLElement;
|
|
502
|
+
constructor(table: Table, row: TableRow, targetNode: HTMLElement);
|
|
503
|
+
private detailsTable;
|
|
504
|
+
protected location: string;
|
|
505
|
+
open(): void;
|
|
506
|
+
protected createShowAsColumnButton: (columnName: string) => HTMLElement;
|
|
507
|
+
close(): void;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
declare module "tables/columns" {
|
|
511
|
+
import { MatrixRowModel, Question, QuestionCompositeModel, QuestionCustomModel, QuestionFileModel, QuestionMatrixDropdownModel, QuestionMatrixModel } from "survey-core";
|
|
512
|
+
import { ICellData, IColumn, ColumnDataType, QuestionLocation, IColumnData } from "tables/config";
|
|
513
|
+
import { ITableOptions, Table } from "tables/table";
|
|
514
|
+
export class BaseColumn<T extends Question = Question> implements IColumn {
|
|
515
|
+
protected question: T;
|
|
516
|
+
protected table: Table;
|
|
517
|
+
dataType: ColumnDataType;
|
|
518
|
+
isVisible: boolean;
|
|
519
|
+
isPublic: boolean;
|
|
520
|
+
location: QuestionLocation;
|
|
521
|
+
width?: string | number;
|
|
522
|
+
visibleIndex?: number;
|
|
523
|
+
isComment?: boolean;
|
|
524
|
+
private nameValue;
|
|
525
|
+
private displayNameValue?;
|
|
526
|
+
constructor(question: T, table: Table);
|
|
527
|
+
get name(): string;
|
|
528
|
+
set name(val: string);
|
|
529
|
+
get displayName(): string;
|
|
530
|
+
set displayName(val: string);
|
|
531
|
+
protected getDisplayName(): string;
|
|
532
|
+
protected getName(): string;
|
|
533
|
+
protected getDataType(): ColumnDataType;
|
|
534
|
+
protected getDisplayValueCore(data: any): any;
|
|
535
|
+
protected setupReadyChangedCallback(table: Table, question: Question): void;
|
|
536
|
+
protected getDisplayValue(data: any, table: Table, options: ITableOptions): any;
|
|
537
|
+
private formatDisplayValue;
|
|
538
|
+
getCellData(table: Table, data: any): ICellData;
|
|
539
|
+
toJSON(): IColumnData;
|
|
540
|
+
fromJSON(data: IColumnData): void;
|
|
541
|
+
}
|
|
542
|
+
export class DefaultColumn extends BaseColumn {
|
|
543
|
+
protected getDisplayValue(data: any, table: Table, options: ITableOptions): any;
|
|
544
|
+
}
|
|
545
|
+
export class CommentColumn extends BaseColumn {
|
|
546
|
+
protected getName(): string;
|
|
547
|
+
protected getDisplayName(): string;
|
|
548
|
+
protected getDisplayValue(data: any, table: Table, options: ITableOptions): string;
|
|
549
|
+
}
|
|
550
|
+
export class MatrixColumn extends BaseColumn<QuestionMatrixModel> {
|
|
551
|
+
private row;
|
|
552
|
+
private valueName;
|
|
553
|
+
private valuePath;
|
|
554
|
+
constructor(question: QuestionMatrixModel, row: MatrixRowModel, table: Table);
|
|
555
|
+
protected getName(): string;
|
|
556
|
+
protected getDisplayName(): string;
|
|
557
|
+
protected getDisplayValue(data: any, table: Table, options: ITableOptions): any;
|
|
558
|
+
}
|
|
559
|
+
export class ImageColumn extends BaseColumn {
|
|
560
|
+
protected getDataType(): ColumnDataType;
|
|
561
|
+
}
|
|
562
|
+
export class FileColumn extends BaseColumn<QuestionFileModel> {
|
|
563
|
+
protected getDataType(): ColumnDataType;
|
|
564
|
+
protected getDisplayValue(data: any, table: Table, options: ITableOptions): any;
|
|
565
|
+
}
|
|
566
|
+
export class MatrixDropdownColumn extends BaseColumn<QuestionMatrixDropdownModel> {
|
|
567
|
+
protected row: any;
|
|
568
|
+
protected col: any;
|
|
569
|
+
private rowValue;
|
|
570
|
+
private colName;
|
|
571
|
+
constructor(question: QuestionMatrixDropdownModel, row: any, col: any, table: Table);
|
|
572
|
+
protected getName(): string;
|
|
573
|
+
protected getDisplayName(): string;
|
|
574
|
+
protected getDisplayValue(data: any, table: Table, options: ITableOptions): any;
|
|
575
|
+
}
|
|
576
|
+
export class CustomQuestionColumn extends BaseColumn<QuestionCustomModel> {
|
|
577
|
+
getCellData(table: Table, data: any): ICellData;
|
|
578
|
+
}
|
|
579
|
+
export class CompositeQuestionColumn extends BaseColumn<QuestionCompositeModel> {
|
|
580
|
+
getCellData(table: Table, data: any): ICellData;
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
declare module "tables/columnbuilder" {
|
|
584
|
+
import { Question, QuestionCompositeModel, QuestionCustomModel, QuestionFileModel, QuestionMatrixDropdownModel, QuestionMatrixModel } from "survey-core";
|
|
585
|
+
import { BaseColumn, CompositeQuestionColumn, CustomQuestionColumn, FileColumn, ImageColumn } from "tables/columns";
|
|
586
|
+
import { IColumn } from "tables/config";
|
|
587
|
+
import { Table } from "tables/table";
|
|
588
|
+
export interface IColumnsBuilder {
|
|
589
|
+
buildColumns(question: Question, table: Table): Array<IColumn>;
|
|
590
|
+
}
|
|
591
|
+
export class DefaultColumnsBuilder<T extends Question = Question> implements IColumnsBuilder {
|
|
592
|
+
protected createColumn(question: T, table: Table): BaseColumn<T>;
|
|
593
|
+
protected buildColumnsCore(question: T, table: Table): Array<IColumn>;
|
|
594
|
+
buildColumns(question: T, table: Table): Array<IColumn>;
|
|
595
|
+
}
|
|
596
|
+
export class ColumnsBuilderFactory {
|
|
597
|
+
static Instance: ColumnsBuilderFactory;
|
|
598
|
+
private constructor();
|
|
599
|
+
private readonly columnsBuilders;
|
|
600
|
+
private readonly defaultColumnsBuilder;
|
|
601
|
+
registerBuilderColumn(type: string, columnsBuilder: IColumnsBuilder): void;
|
|
602
|
+
getColumnsBuilder(type: string): IColumnsBuilder;
|
|
603
|
+
}
|
|
604
|
+
export class MatrixColumnsBuilder extends DefaultColumnsBuilder<QuestionMatrixModel> {
|
|
605
|
+
protected buildColumnsCore(questionBase: Question, table: Table): IColumn[];
|
|
606
|
+
}
|
|
607
|
+
export class ImageColumnsBuilder extends DefaultColumnsBuilder {
|
|
608
|
+
protected createColumn(question: Question, table: Table): ImageColumn;
|
|
609
|
+
}
|
|
610
|
+
export class FileColumnsBuilder extends DefaultColumnsBuilder<QuestionFileModel> {
|
|
611
|
+
protected createColumn(question: QuestionFileModel, table: Table): FileColumn;
|
|
612
|
+
}
|
|
613
|
+
export class MatrixDropdownColumnBuilder extends DefaultColumnsBuilder {
|
|
614
|
+
buildColumns(questionBase: QuestionMatrixDropdownModel, table: Table): Array<IColumn>;
|
|
615
|
+
}
|
|
616
|
+
export class CustomColumnsBuilder extends DefaultColumnsBuilder<QuestionCustomModel> {
|
|
617
|
+
protected createColumn(question: QuestionCustomModel, table: Table): CustomQuestionColumn;
|
|
618
|
+
}
|
|
619
|
+
export class CompositeColumnsBuilder extends DefaultColumnsBuilder<QuestionCompositeModel> {
|
|
620
|
+
protected createColumn(question: QuestionCompositeModel, table: Table): CompositeQuestionColumn;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
declare module "tables/table" {
|
|
624
|
+
import { SurveyModel, Question, Event } from "survey-core";
|
|
625
|
+
import { IPermission, QuestionLocation, ITableState, IColumn, IColumnData } from "tables/config";
|
|
626
|
+
import { Details } from "tables/extensions/detailsextensions";
|
|
627
|
+
import { TableExtensions } from "tables/extensions/tableextensions";
|
|
628
|
+
export interface ITableOptions {
|
|
629
|
+
[index: string]: any;
|
|
630
|
+
/**
|
|
631
|
+
* Set this property to true to render column headings using question names
|
|
632
|
+
*/
|
|
633
|
+
useNamesAsTitles?: boolean;
|
|
634
|
+
/**
|
|
635
|
+
* Use this event to change the display value of question in table.
|
|
636
|
+
* <br/> `sender` - the table object that fires the event.
|
|
637
|
+
* <br/> `options.question` - the question obect for which event is fired.
|
|
638
|
+
* <br/> `options.displayValue` - the question display value. You can change this option before it is displayed in the table.
|
|
639
|
+
*/
|
|
640
|
+
onGetQuestionValue?: (options: {
|
|
641
|
+
question: Question;
|
|
642
|
+
displayValue: any;
|
|
643
|
+
}) => void;
|
|
644
|
+
}
|
|
645
|
+
export abstract class Table {
|
|
646
|
+
protected _survey: SurveyModel;
|
|
647
|
+
protected data: Array<Object>;
|
|
648
|
+
protected _options: ITableOptions;
|
|
649
|
+
protected _columnsData: Array<IColumnData>;
|
|
650
|
+
static showFilesAsImages: boolean;
|
|
651
|
+
static haveCommercialLicense: boolean;
|
|
652
|
+
protected tableData: any;
|
|
653
|
+
protected extensions: TableExtensions;
|
|
654
|
+
private haveCommercialLicense;
|
|
655
|
+
protected _columns: Array<IColumn>;
|
|
656
|
+
constructor(_survey: SurveyModel, data: Array<Object>, _options?: ITableOptions, _columnsData?: Array<IColumnData>);
|
|
657
|
+
protected renderResult: HTMLElement;
|
|
658
|
+
protected currentPageSize: number;
|
|
659
|
+
protected currentPageNumber: number;
|
|
660
|
+
protected _rows: TableRow[];
|
|
661
|
+
protected isColumnReorderEnabled: boolean;
|
|
662
|
+
onColumnsVisibilityChanged: Event<(sender: Table, options: any) => any, any>;
|
|
663
|
+
onColumnsLocationChanged: Event<(sender: Table, options: any) => any, any>;
|
|
664
|
+
onRowRemoved: Event<(sender: Table, options: any) => any, any>;
|
|
665
|
+
renderDetailActions: (container: HTMLElement, row: TableRow) => HTMLElement;
|
|
666
|
+
getData(): Object[];
|
|
667
|
+
get survey(): SurveyModel;
|
|
668
|
+
get options(): ITableOptions;
|
|
669
|
+
abstract applyFilter(value: string): void;
|
|
670
|
+
abstract applyColumnFilter(columnName: string, value: string): void;
|
|
671
|
+
abstract sortByColumn(columnName: string, direction: string): void;
|
|
672
|
+
render(targetNode: HTMLElement | string): void;
|
|
673
|
+
enableColumnReorder(): void;
|
|
674
|
+
disableColumnReorder(): void;
|
|
675
|
+
getPageNumber(): number;
|
|
676
|
+
setPageNumber(value: number): void;
|
|
677
|
+
getPageSize(): number;
|
|
678
|
+
setPageSize(value: number): void;
|
|
679
|
+
getCreatedRows(): TableRow[];
|
|
680
|
+
clearCreatedRows(): void;
|
|
681
|
+
get useNamesAsTitles(): boolean;
|
|
682
|
+
protected buildColumns: (survey: SurveyModel) => IColumn[];
|
|
683
|
+
isColumnVisible(column: IColumn): boolean;
|
|
684
|
+
get columns(): Array<IColumn>;
|
|
685
|
+
set columns(columns: Array<IColumn>);
|
|
686
|
+
protected initTableData(data: Array<any>): void;
|
|
687
|
+
moveColumn(from: number, to: number): void;
|
|
688
|
+
setColumnLocation(columnName: string, location: QuestionLocation): void;
|
|
689
|
+
getColumnByName(columnName: string): IColumn;
|
|
690
|
+
setColumnVisibility(columnName: string, isVisible: boolean): void;
|
|
691
|
+
setColumnWidth(columnName: string, width: string | number): void;
|
|
692
|
+
removeRow(row: TableRow): void;
|
|
693
|
+
/**
|
|
694
|
+
* Returns current locale of the table.
|
|
695
|
+
* If locales more than one, the language selection dropdown will be added in the toolbar
|
|
696
|
+
*/
|
|
697
|
+
get locale(): string;
|
|
698
|
+
/**
|
|
699
|
+
* Sets locale for table.
|
|
700
|
+
*/
|
|
701
|
+
set locale(newLocale: string);
|
|
702
|
+
getLocales(): Array<string>;
|
|
703
|
+
refresh(hard?: boolean): void;
|
|
704
|
+
destroy(): void;
|
|
705
|
+
get isRendered(): boolean;
|
|
706
|
+
/**
|
|
707
|
+
* Vizualization panel state getter.
|
|
708
|
+
*/
|
|
709
|
+
get state(): ITableState;
|
|
710
|
+
/**
|
|
711
|
+
* Vizualization panel state setter.
|
|
712
|
+
*/
|
|
713
|
+
set state(newState: ITableState);
|
|
714
|
+
private updateColumnsFromData;
|
|
715
|
+
/**
|
|
716
|
+
* Fires when table state changed.
|
|
717
|
+
*/
|
|
718
|
+
onStateChanged: Event<(sender: Table, options: any) => any, any>;
|
|
719
|
+
/**
|
|
720
|
+
* Gets table permissions.
|
|
721
|
+
*/
|
|
722
|
+
get permissions(): IPermission[];
|
|
723
|
+
/**
|
|
724
|
+
* Sets table permissions.
|
|
725
|
+
*/
|
|
726
|
+
set permissions(permissions: IPermission[]);
|
|
727
|
+
/**
|
|
728
|
+
* Fires when permissions changed
|
|
729
|
+
*/
|
|
730
|
+
onPermissionsChangedCallback: any;
|
|
731
|
+
}
|
|
732
|
+
export abstract class TableRow {
|
|
733
|
+
protected table: Table;
|
|
734
|
+
protected extensionsContainer: HTMLElement;
|
|
735
|
+
protected detailsContainer: HTMLElement;
|
|
736
|
+
constructor(table: Table, extensionsContainer: HTMLElement, detailsContainer: HTMLElement);
|
|
737
|
+
details: Details;
|
|
738
|
+
extensions: TableExtensions;
|
|
739
|
+
private detailedRowClass;
|
|
740
|
+
private isDetailsExpanded;
|
|
741
|
+
onToggleDetails: Event<(sender: TableRow, options: any) => any, any>;
|
|
742
|
+
/**
|
|
743
|
+
* Returns row's html element
|
|
744
|
+
*/
|
|
745
|
+
abstract getElement(): HTMLElement;
|
|
746
|
+
/**
|
|
747
|
+
* Returns data, which is displayed in the row.
|
|
748
|
+
*/
|
|
749
|
+
abstract getRowData(): any;
|
|
750
|
+
/**
|
|
751
|
+
* Returns position of row in the table's data.
|
|
752
|
+
*/
|
|
753
|
+
abstract getDataPosition(): number;
|
|
754
|
+
protected isSelected: boolean;
|
|
755
|
+
render(): void;
|
|
756
|
+
openDetails(): void;
|
|
757
|
+
closeDetails(): void;
|
|
758
|
+
toggleDetails(): void;
|
|
759
|
+
getIsSelected(): boolean;
|
|
760
|
+
toggleSelect(): void;
|
|
761
|
+
remove(): void;
|
|
762
|
+
private onColumnLocationChangedCallback;
|
|
763
|
+
destroy(): void;
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
declare module "tables/extensions/rowextensions" { }
|
|
767
|
+
declare module "tables/extensions/headerextensions" { }
|
|
768
|
+
declare module "tables/extensions/columnextensions" { }
|
|
769
|
+
declare module "tables/datatables" {
|
|
770
|
+
import { ITableOptions, Table, TableRow } from "tables/table";
|
|
771
|
+
import { SurveyModel, Event } from "survey-core";
|
|
772
|
+
import { IColumnData, QuestionLocation } from "tables/config";
|
|
773
|
+
interface DataTablesOptions extends ITableOptions {
|
|
774
|
+
buttons: boolean | string[] | any[] | any;
|
|
775
|
+
dom: string;
|
|
776
|
+
orderFixed: Array<number | string> | Array<Array<number | string>> | object;
|
|
777
|
+
rowGroup: boolean | any;
|
|
778
|
+
headerCallback: any;
|
|
779
|
+
}
|
|
780
|
+
export class DataTables extends Table {
|
|
781
|
+
datatableApi: any;
|
|
782
|
+
currentPageNumber: number;
|
|
783
|
+
/**
|
|
784
|
+
* The event is fired columns configuration has been changed.
|
|
785
|
+
* <br/> sender the datatables adapter
|
|
786
|
+
* <br/> options.survey current survey
|
|
787
|
+
* @see getColumns
|
|
788
|
+
*/
|
|
789
|
+
onColumnsReorder: Event<(sender: DataTables, options: any) => any, any>;
|
|
790
|
+
static initJQuery($: any): void;
|
|
791
|
+
static set haveCommercialLicense(val: boolean);
|
|
792
|
+
constructor(survey: SurveyModel, data: Array<Object>, options?: DataTablesOptions, _columnsData?: Array<IColumnData>);
|
|
793
|
+
destroy(): void;
|
|
794
|
+
setColumnVisibility(columnName: string, isVisible: boolean): void;
|
|
795
|
+
setColumnLocation(columnName: string, location: QuestionLocation): void;
|
|
796
|
+
applyFilter(value: string): void;
|
|
797
|
+
applyColumnFilter(columnName: string, value: string): void;
|
|
798
|
+
sortByColumn(columnName: string, direction: string): void;
|
|
799
|
+
setPageSize(value: number): void;
|
|
800
|
+
setPageNumber(value: number): void;
|
|
801
|
+
getPageNumber(): number;
|
|
802
|
+
render(targetNode: HTMLElement | string): void;
|
|
803
|
+
getColumns(): Array<any>;
|
|
804
|
+
layout(): void;
|
|
805
|
+
}
|
|
806
|
+
export class DatatablesRow extends TableRow {
|
|
807
|
+
protected table: Table;
|
|
808
|
+
protected extensionsContainer: HTMLElement;
|
|
809
|
+
protected detailsContainer: HTMLElement;
|
|
810
|
+
private _innerRow;
|
|
811
|
+
constructor(table: Table, extensionsContainer: HTMLElement, detailsContainer: HTMLElement, _innerRow: any);
|
|
812
|
+
private rowElement;
|
|
813
|
+
private rowData;
|
|
814
|
+
get innerRow(): any;
|
|
815
|
+
getElement(): HTMLElement;
|
|
816
|
+
getRowData(): HTMLElement;
|
|
817
|
+
getDataPosition(): number;
|
|
818
|
+
remove(): void;
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
declare module "entries/datatables" {
|
|
822
|
+
export * from "localizationManager";
|
|
823
|
+
import "localization/farsi";
|
|
824
|
+
import "localization/french";
|
|
825
|
+
import "localization/norwegian";
|
|
826
|
+
import "localization/portuguese";
|
|
827
|
+
import "localization/russian";
|
|
828
|
+
import "localization/dutch";
|
|
829
|
+
import "tables/extensions/rowextensions";
|
|
830
|
+
import "tables/extensions/headerextensions";
|
|
831
|
+
import "tables/extensions/columnextensions";
|
|
832
|
+
import "tables/extensions/detailsextensions";
|
|
833
|
+
export * from "tables/table";
|
|
834
|
+
export * from "tables/datatables";
|
|
835
|
+
export { TableExtensions } from "tables/extensions/tableextensions";
|
|
836
|
+
export { DocumentHelper } from "utils/index";
|
|
837
|
+
}
|
|
838
|
+
declare module 'survey-analytics/survey.analytics.datatables' { import main = require('entries/datatables'); export = main; }
|