datavis-glide 4.0.0-PRE.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/LICENSE +45 -0
  2. package/README.md +129 -0
  3. package/datavis.js +101 -0
  4. package/dist/wcdatavis.css +1957 -0
  5. package/dist/wcdatavis.min.js +1 -0
  6. package/global-jquery.js +4 -0
  7. package/ie-fixes.js +13 -0
  8. package/index.js +70 -0
  9. package/meteor.js +1 -0
  10. package/package.json +102 -0
  11. package/src/flags.js +6 -0
  12. package/src/graph.js +1079 -0
  13. package/src/graph_renderer.js +85 -0
  14. package/src/grid.js +2777 -0
  15. package/src/grid_control.js +1957 -0
  16. package/src/grid_filter.js +1073 -0
  17. package/src/grid_renderer.js +276 -0
  18. package/src/group_fun_win.js +121 -0
  19. package/src/lang/en-US.js +188 -0
  20. package/src/lang/es-MX.js +188 -0
  21. package/src/lang/fr-FR.js +188 -0
  22. package/src/lang/id-ID.js +188 -0
  23. package/src/lang/nl-NL.js +188 -0
  24. package/src/lang/pt-BR.js +188 -0
  25. package/src/lang/ru-RU.js +188 -0
  26. package/src/lang/th-TH.js +188 -0
  27. package/src/lang/vi-VN.js +188 -0
  28. package/src/lang/zh-Hans-CN.js +188 -0
  29. package/src/operations_palette.js +176 -0
  30. package/src/prefs_modules.js +132 -0
  31. package/src/reg/graph_renderer.js +17 -0
  32. package/src/renderers/graph/chartjs.js +457 -0
  33. package/src/renderers/graph/google.js +584 -0
  34. package/src/renderers/graph/jit.js +61 -0
  35. package/src/renderers/graph/svelte-gantt.js +168 -0
  36. package/src/renderers/grid/dummy.js +79 -0
  37. package/src/renderers/grid/handlebars.js +217 -0
  38. package/src/renderers/grid/squirrelly.js +215 -0
  39. package/src/renderers/grid/table/group_detail.js +1404 -0
  40. package/src/renderers/grid/table/group_summary.js +380 -0
  41. package/src/renderers/grid/table/pivot.js +915 -0
  42. package/src/renderers/grid/table/plain.js +1592 -0
  43. package/src/renderers/grid/table.js +2510 -0
  44. package/src/trans.js +101 -0
  45. package/src/ui/collapsible.js +234 -0
  46. package/src/ui/filters/date.js +283 -0
  47. package/src/ui/grid_filter.js +398 -0
  48. package/src/ui/popup_menu.js +224 -0
  49. package/src/ui/popup_window.js +572 -0
  50. package/src/ui/slider.js +156 -0
  51. package/src/ui/tabs.js +202 -0
  52. package/src/ui/templates.js +131 -0
  53. package/src/ui/toolbar.js +63 -0
  54. package/src/ui/toolbars/grid.js +873 -0
  55. package/src/ui/windows/col_config.js +341 -0
  56. package/src/ui/windows/debug.js +164 -0
  57. package/src/ui/windows/grid_table_opts.js +139 -0
  58. package/src/util/handlebars.js +158 -0
  59. package/src/util/jquery.js +630 -0
  60. package/src/util/misc.js +1058 -0
  61. package/src/util/squirrelly.js +155 -0
  62. package/wcdatavis.css +1601 -0
@@ -0,0 +1,85 @@
1
+ import _ from 'underscore';
2
+
3
+ import {
4
+ makeSubclass,
5
+ mixinEventHandling,
6
+ mixinLogging,
7
+ } from './util/misc.js';
8
+
9
+ // GraphRenderer {{{1
10
+
11
+ var GraphRenderer = (function () {
12
+ var instanceId = 0;
13
+
14
+ return makeSubclass('GraphRenderer', Object, function (graph, elt, view, opts) {
15
+ var self = this;
16
+
17
+ self.graph = graph;
18
+ self.elt = elt;
19
+ self.view = view;
20
+ self.opts = opts;
21
+ self._instanceId = instanceId++;
22
+ });
23
+ })();
24
+
25
+ mixinEventHandling(GraphRenderer, [
26
+ 'draw'
27
+ ]);
28
+ mixinLogging(GraphRenderer);
29
+
30
+ // #toString {{{2
31
+
32
+ GraphRenderer.prototype.toString = function () {
33
+ var self = this;
34
+
35
+ return '<GraphRenderer #' + self._instanceId + ' id="' + self.graph.id + '">';
36
+ };
37
+
38
+ // #_validateConfig {{{2
39
+
40
+ GraphRenderer.prototype._validateConfig = function () {
41
+
42
+ _.each(['Plain', 'Group', 'Pivot'], function (kind) {
43
+ var propName = 'when' + kind;
44
+
45
+ if (config[propName] == null) {
46
+ return; // It's OK to be undefined.
47
+ }
48
+
49
+ var config = config[propName];
50
+
51
+ if (typeof config !== 'function' && typeof config !== 'object') {
52
+ //self.error(kind + ' configuration must be a function or an object');
53
+ config[propName] = null;
54
+ return;
55
+ }
56
+ });
57
+ };
58
+
59
+ // #addRedrawHandlers {{{2
60
+
61
+ GraphRenderer.prototype.addRedrawHandlers = function () {
62
+ var self = this;
63
+
64
+ self.logDebug(self.makeLogTag('addRedrawHandlers') + ' Adding redraw handlers');
65
+
66
+ self.view.on('workEnd', function () {
67
+ self.logDebug(self.makeLogTag('handler:View(workEnd)') + ' Redrawing graph because the view has finished doing work');
68
+ self.draw(self.graph.devConfig, self.graph.userConfig);
69
+ }, { who: self });
70
+ };
71
+
72
+ // #destroy {{{2
73
+
74
+ GraphRenderer.prototype.destroy = function () {
75
+ var self = this;
76
+
77
+ self.view.off('workEnd', self);
78
+ self.elt.children().remove();
79
+ };
80
+
81
+ // Exports {{{1
82
+
83
+ export {
84
+ GraphRenderer,
85
+ };