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
package/LICENSE ADDED
@@ -0,0 +1,45 @@
1
+ Source Available License
2
+
3
+ Copyright (c) 2017-2026 Medical Informatics Engineering, LLC. All rights reserved.
4
+
5
+ This software and associated documentation files (the "Software") are the
6
+ proprietary property of Medical Informatics Engineering, LLC. ("MIE").
7
+
8
+ OPEN SOURCE / NON-COMMERCIAL USE
9
+
10
+ Permission is hereby granted, free of charge, to any person or organization
11
+ obtaining a copy of this Software, to use, copy, modify, merge, and distribute
12
+ the Software for non-commercial purposes, subject to the following conditions:
13
+
14
+ 1. Attribution Required: The above copyright notice, this permission notice,
15
+ and clear attribution to Medical Informatics Engineering, LLC. shall be
16
+ included in all copies or substantial portions of the Software.
17
+
18
+ 2. Open Source Requirement: If you distribute the Software or any derivative
19
+ works, you must do so under an open source license approved by the Open
20
+ Source Initiative (OSI) and make the source code publicly available.
21
+
22
+ 3. Non-Commercial Use Only: This license does not grant permission to use the
23
+ Software for commercial purposes. "Commercial purposes" means any use
24
+ intended for or directed toward commercial advantage or monetary
25
+ compensation.
26
+
27
+ COMMERCIAL USE
28
+
29
+ For commercial use, including but not limited to:
30
+ - Use in proprietary/closed-source products
31
+ - Use in products or services sold for profit
32
+ - Use by for-profit organizations for internal business operations
33
+
34
+ You must obtain a separate commercial license from Medical Informatics
35
+ Engineering, LLC. Contact: https://www.mieweb.com or helpdesk@mieweb.com
36
+
37
+ NO WARRANTY
38
+
39
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
40
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
41
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
42
+ MEDICAL INFORMATICS ENGINEERING, LLC. OR ITS AFFILIATES BE LIABLE FOR ANY
43
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
44
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
45
+ OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,129 @@
1
+ ![DataVis GLIDE Logo](logo.png)
2
+
3
+ # DataVis GLIDE
4
+
5
+ DataVis is a system for exploring, manipulating, and visualizing data. It consists of multiple components in multiple layers, each responsible for different elements of a complete system. This layer, DataVis GLIDE, provides user interfaces for exploring data. This includes:
6
+
7
+ - Complete interactive controls to filter, group, pivot, aggregate, sort, and export data.
8
+ - “Grids” to display tabular data, including a “tree mode” details view for grouped data.
9
+ - “Graphs” to display aggregate results.
10
+ - View saving, column resizing, row selection, floating headers, pagination, and much more.
11
+
12
+ **GLIDE = Graphical Layer for Interactive Data Exploration**
13
+
14
+ ## How to Use
15
+
16
+ ### Vite
17
+
18
+ Stick this in your `package.json` obviously.
19
+
20
+ ```
21
+ "dependencies": {
22
+ "wcdatavis": "git+ssh://git@github.com:mieweb/wcdatavis.git",
23
+ "vite": "=7.3.1"
24
+ }
25
+ ```
26
+
27
+ #### Building a Page
28
+
29
+ Inside a module script tag, import the CSS for DataVis and its dependents. This is necessary when using Vite in this configuration, but not if using a version of DataVis built via Rollup (which uses the PostCSS plugin to automatically extract and bundle all CSS files imported from JS).
30
+
31
+ ```
32
+ import 'jquery-ui/dist/themes/base/jquery-ui.min.css';
33
+ import 'sumoselect/sumoselect.min.css';
34
+ import 'wcdatavis/wcdatavis.css';
35
+ ```
36
+
37
+ Then just use DataVis like normal:
38
+
39
+ ```
40
+ import { Source, ComputedView, Grid } from 'wcdatavis/index.js';
41
+
42
+ document.addEventListener('DOMContentLoaded', () => {
43
+ const source = new Source({
44
+ type: 'http',
45
+ url: 'fruit.csv'
46
+ });
47
+ const computedView = new ComputedView(source);
48
+ new Grid({
49
+ id: 'grid',
50
+ computedView: computedView
51
+ }, {
52
+ title: 'DataVis NPM Example (Using Vite)'
53
+ });
54
+ });
55
+ ```
56
+
57
+ Make sure you also have a div to contain the grid on the page.
58
+
59
+ ```
60
+ <div id=”grid”></div>
61
+ ```
62
+
63
+ #### Available Exports
64
+
65
+ | Export | Description |
66
+ | -------------- | ------------------------------------------------------------ |
67
+ | `Source` | Fetches and decodes data from HTTP, files, or local JavaScript |
68
+ | `ComputedView` | Implements filtering, grouping, pivoting, and aggregation |
69
+ | `Grid` | Renders data in a table with interactive controls |
70
+ | `Graph` | Renders data as charts using Chart.js |
71
+ | `Prefs` | User preferences management |
72
+ | `Perspective` | Save and restore view configurations |
73
+ | `ParamInput` | Parameter input handling for sources |
74
+
75
+ ### Traditional Website
76
+
77
+ 1. Run `make setup` to get dependencies.
78
+ 2. Run `make datavis` to build the JS file.
79
+ 3. Copy `dist/wcdatavis.js` and `dist/wcdatavis.css` to your server.
80
+ 4. Include them like any other JS and CSS files.
81
+
82
+ ## How to Develop
83
+
84
+ See the [Development section of the Manual](doc/md/development/index.md) for a full explanation. What follows is a synopsis.
85
+
86
+ ### Quickstart
87
+
88
+ We use GNU Make to provide a simple interface to the various tools to build and test DataVis.
89
+
90
+ * `make setup` — Installs all dependencies.
91
+ * `make datavis` — Build the compressed DataVis JS and CSS files.
92
+ * `make tests` — Same as `make`, then copy to tests directory, and build test data.
93
+ * `make [PORT=] serve` — Start local server for interactive testing.
94
+ * `make test` — Same as `make tests`, then run automated tests using Mocha & Selenium.
95
+ * `make doc` — Build all documentation.
96
+ * `make jsdoc` — Build JS API documentation from comments in the source.
97
+ * `make manual` — Build the Manual from Markdown files.
98
+ * `make clean` — Remove all build products and generated test data.
99
+ * `make teardown` — Resets the development environment.
100
+
101
+ ## Tree Structure
102
+
103
+ * `bin` — Contains programs used to build other stuff, e.g. a JSON generator.
104
+ * `dist` — After compiling with `make`, contains the JS and CSS files for DataVis.
105
+ * `doc` — The user & developer manual.
106
+ * `md` — Manual Markdown source files.
107
+ * `html` — Manual HTML output files.
108
+ * `src` — Contains all the source JS files.
109
+ * `renderers` — Classes for DataVis output.
110
+ * `ui` — Classes for user interface components.
111
+ * `filters` — Filter widget implementation.
112
+ * `windows` — Modal dialogs.
113
+ * `util` — Classes and modules for utilities.
114
+ * `reg` — Registry files.
115
+ * `lang` — Compiled language packs.
116
+ * `tests`
117
+ * `data` — Data files for testing and examples.
118
+ * `*.json5` — Input for generating JSON files.
119
+ * `*.in.json` — Input for generating JSON files.
120
+ * `lib` — Auxiliary JS files to help make writing test cases easier.
121
+ * `pages` — HTML pages used for running Selenium tests.
122
+ * `grid` — Tests specifically for the grid.
123
+ * `graph` — Tests specifically for the graph.
124
+ * `qunit` — Unit tests, mostly for the view.
125
+ * `selenium` — Selenium test case files.
126
+
127
+ ## History
128
+
129
+ The original DataVis project consisted of both the data processing and interactive UI functions. It has now been split into two projects: DataVis ACE (this project) and DataVis GLIDE (an intuitive but complete user interface to explore the data).
package/datavis.js ADDED
@@ -0,0 +1,101 @@
1
+ import './ie-fixes.js';
2
+ import 'core-js/es/number/is-integer';
3
+
4
+ import jQuery from 'jquery';
5
+
6
+ // Don't try to inline this code, it won't work. Imports are lifted,
7
+ // and this code needs to run before we import jQuery UI. Yes, this
8
+ // is an unhinged workaround.
9
+
10
+ import original_jQuery from './global-jquery.js';
11
+
12
+ import 'block-ui';
13
+ import 'flatpickr';
14
+ import 'jquery-ui/dist/jquery-ui.min.js';
15
+ import 'sumoselect';
16
+
17
+ import 'jquery-ui/dist/themes/base/jquery-ui.min.css';
18
+ import 'sumoselect/sumoselect.min.css';
19
+ import './wcdatavis.css';
20
+ import './src/ui/popup_menu.css';
21
+ import './src/ui/popup_window.css';
22
+ import './src/ui/tabs.css';
23
+ import './src/ui/collapsible.css';
24
+
25
+ import * as Util from './src/util/misc.js';
26
+ import {
27
+ OrdMap,
28
+ Lock,
29
+ Aggregate,
30
+ AGGREGATE_REGISTRY,
31
+ ParamInput,
32
+ Source,
33
+ ComputedView,
34
+ MirageView,
35
+ GroupFunction,
36
+ GROUP_FUNCTION_REGISTRY,
37
+ Prefs,
38
+ Perspective,
39
+ PrefsBackend,
40
+ PREFS_BACKEND_REGISTRY,
41
+ PrefsModule,
42
+ PREFS_MODULE_REGISTRY,
43
+ } from 'datavis-ace';
44
+ import { Grid } from './src/grid.js';
45
+ import { Graph } from './src/graph.js';
46
+ import { trans } from './src/trans.js';
47
+
48
+ // So we only import Svelte-Gantt when we're building an IIFE via Rollup. This is mainly because
49
+ // Meteor + Svelte 4 + Typescript isn't working, so it had to be removed from the main code.
50
+
51
+ import GraphRendererSvelteGantt from './src/renderers/graph/svelte-gantt.js';
52
+ import GRAPH_RENDERER_REGISTRY from './src/reg/graph_renderer.js';
53
+
54
+ GRAPH_RENDERER_REGISTRY.set('svelte-gantt', GraphRendererSvelteGantt);
55
+
56
+ // Set some global variables for <script> tag usage.
57
+
58
+ window.MIE = window.MIE || {};
59
+ window.MIE.OrdMap = OrdMap;
60
+ window.MIE.Lock = Lock;
61
+ window.MIE.trans = trans;
62
+ window.MIE.makeSubclass = Util.makeSubclass;
63
+
64
+ window.MIE.WC_DataVis = window.MIE.WC_DataVis || {};
65
+ window.MIE.WC_DataVis.Aggregate = Aggregate;
66
+ window.MIE.WC_DataVis.ParamInput = ParamInput;
67
+ window.MIE.WC_DataVis.Source = Source;
68
+ window.MIE.WC_DataVis.GroupFunction = GroupFunction;
69
+ window.MIE.WC_DataVis.ComputedView = ComputedView;
70
+ window.MIE.WC_DataVis.MirageView = MirageView;
71
+ window.MIE.WC_DataVis.Grid = Grid;
72
+ window.MIE.WC_DataVis.grids = {};
73
+ window.MIE.WC_DataVis.Graph = Graph;
74
+ window.MIE.WC_DataVis.graphs = {};
75
+ window.MIE.WC_DataVis.Perspective = Perspective;
76
+ window.MIE.WC_DataVis.Prefs = Prefs;
77
+ window.MIE.WC_DataVis.PrefsBackend = PrefsBackend;
78
+ window.MIE.WC_DataVis.PrefsModule = PrefsModule;
79
+ window.MIE.WC_DataVis.EXPORT_URL = 'export.php';
80
+
81
+ // Expose "registry" extension points
82
+
83
+ window.MIE.WC_DataVis.AGGREGATE_REGISTRY = AGGREGATE_REGISTRY;
84
+ window.MIE.WC_DataVis.GROUP_FUNCTION_REGISTRY = GROUP_FUNCTION_REGISTRY;
85
+ window.MIE.WC_DataVis.PREFS_BACKEND_REGISTRY = PREFS_BACKEND_REGISTRY;
86
+ window.MIE.WC_DataVis.PREFS_MODULE_REGISTRY = PREFS_MODULE_REGISTRY;
87
+
88
+ window.MIE.WC_DataVis.Util = Util;
89
+
90
+ // We left the global jQuery around long enough for jQuery UI to install itself, and that same
91
+ // jQuery object has been used by all other plugins and DataVis code. Now that we're all done,
92
+ // make it so nobody can access our jQuery, to avoid conflicts.
93
+
94
+ window.MIE.WC_DataVis.jQuery = jQuery;
95
+
96
+ if (original_jQuery != null) {
97
+ window.jQuery = original_jQuery;
98
+ }
99
+ else {
100
+ delete window.jQuery;
101
+ }