@datagrok/api-samples 1.0.6 → 1.0.8
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/.eslintrc.json +47 -0
- package/CHANGELOG.md +9 -0
- package/README.md +8 -8
- package/dist/package-test.js +2 -2
- package/files.js +39 -0
- package/package.json +18 -9
- package/scripts/dapi/groups.js +3 -0
- package/scripts/dapi/users.js +1 -1
- package/scripts/data-access/db-master-details-manual.js +3 -3
- package/scripts/data-access/parameterized-query.js +3 -3
- package/scripts/data-frame/bitset/similarity-metrics.js +3 -3
- package/scripts/data-frame/construction/create-from-csv-format.js +3 -3
- package/scripts/data-frame/filtering/update-filter-state.js +13 -0
- package/scripts/data-frame/modification/remove-where.js +8 -0
- package/scripts/data-frame/row-matching/patterns.js +1 -3
- package/scripts/domains/chem/chem-benchmark.js +26 -26
- package/scripts/domains/chem/descriptors.js +1 -2
- package/scripts/domains/chem/diversity-search.js +3 -5
- package/scripts/domains/chem/inspect-molecule.js +1 -1
- package/scripts/domains/chem/mcs.js +2 -3
- package/scripts/domains/chem/mol-atoms-bonds.js +1 -2
- package/scripts/domains/chem/mol-panel.js +0 -1
- package/scripts/domains/chem/mol-rendering-canvas.js +4 -6
- package/scripts/domains/chem/mol-rendering.js +0 -1
- package/scripts/domains/chem/r-group.js +3 -5
- package/scripts/domains/chem/similarity-scoring-scores.js +0 -3
- package/scripts/domains/chem/similarity-scoring-sorted.js +0 -3
- package/scripts/domains/chem/substructure-search-benchmark.js +5 -8
- package/scripts/domains/chem/substructure-search-smarts-molfile-als.js +6 -9
- package/scripts/domains/chem/substructure-search-smarts.js +4 -7
- package/scripts/domains/chem/substructure-search.js +1 -4
- package/scripts/domains/data-science/predictive-model.js +2 -3
- package/scripts/functions/caching-results.js +36 -0
- package/scripts/functions/calling.js +2 -2
- package/scripts/functions/discover-functions.js +1 -1
- package/scripts/functions/func-call.js +18 -0
- package/scripts/functions/progress.js +2 -7
- package/scripts/grid/advanced/charts-in-cells.js +16 -14
- package/scripts/grid/advanced/link-click.js +19 -0
- package/scripts/grid/advanced/pinned-columns.js +7 -0
- package/scripts/grid/advanced/pinned-rows.js +8 -0
- package/scripts/grid/advanced/visible-cells.js +3 -4
- package/scripts/grid/scroll-to-pixels.js +9 -4
- package/scripts/misc/audit/activity-today.js +3 -3
- package/scripts/misc/audit/errors-summary.js +2 -4
- package/scripts/misc/audit/test-tracking.js +2 -4
- package/scripts/misc/audit/users-today.js +6 -7
- package/scripts/misc/package-credentials.js +2 -4
- package/scripts/misc/sdtm.js +8 -10
- package/scripts/misc/utils/hide-empty-columns.js +17 -4
- package/scripts/performance/all-chembl-structures.js +1 -1
- package/scripts/scripting/grok-scripting.js +1 -1
- package/scripts/scripting/scripting.js +2 -2
- package/scripts/shell/last-error.js +0 -4
- package/scripts/shell/windows/shell-windows.js +6 -0
- package/scripts/ui/components/balloons.js +4 -1
- package/scripts/ui/{elements → components}/color-palettes.js +4 -4
- package/scripts/ui/components/html-tables.js +27 -0
- package/scripts/ui/components/loading-indicators.js +4 -6
- package/scripts/ui/components/menu-customization.js +18 -0
- package/scripts/ui/components/property-grid.js +10 -10
- package/scripts/ui/{layouts → containers}/splitters.js +3 -3
- package/scripts/ui/css.js +20 -0
- package/scripts/ui/inputs/advanced/all-input-types.js +47 -0
- package/scripts/ui/inputs/{for-properties.js → advanced/for-properties.js} +17 -2
- package/scripts/ui/inputs/advanced/input-form.js +10 -0
- package/scripts/ui/inputs/forms.js +35 -0
- package/scripts/ui/inputs/grid-input.js +14 -0
- package/scripts/ui/inputs/inputs.js +24 -0
- package/scripts/ui/{elements/inputs → inputs}/table-input.js +1 -2
- package/scripts/ui/inputs/typeahead-input.js +19 -0
- package/scripts/ui/viewers/custom-scatterplot-rendering.js +1 -1
- package/scripts/ui/viewers/custom-viewer-properties.js +5 -5
- package/scripts/ui/viewers/js viewers/chord-viewer.js +3 -0
- package/scripts/ui/viewers/js viewers/globe-viewer.js +13 -0
- package/scripts/ui/viewers/js viewers/radar-viewer.js +9 -0
- package/scripts/ui/viewers/js viewers/sankey-viewer.js +4 -0
- package/scripts/ui/viewers/js viewers/sunburst-viewer.js +3 -0
- package/scripts/ui/viewers/js viewers/surface-plot.js +2 -0
- package/scripts/ui/viewers/js viewers/timelines-viewer.js +3 -0
- package/scripts/ui/viewers/js viewers/tree-viewer.js +3 -0
- package/scripts/ui/viewers/js viewers/word-cloud.js +5 -0
- package/scripts/ui/viewers/trellis-plot-with-summary-viewer.js +14 -0
- package/scripts/ui/views/currently-open-views.js +5 -5
- package/src/package-test.ts +40 -1
- package/scripts/dapi/files.js +0 -39
- package/scripts/misc/audit/errors.js +0 -4
- package/scripts/misc/audit/event-types-summary.js +0 -4
- package/scripts/misc/audit/rolling-events.js +0 -11
- package/scripts/ui/apps/color-checker.js +0 -328
- package/scripts/ui/components/panels.js +0 -19
- package/scripts/ui/docking/README.md +0 -16
- package/scripts/ui/elements/html-tables.js +0 -24
- package/scripts/ui/elements/inputs/inputs.js +0 -46
- package/scripts/ui/elements/inputs/typeahead-input.js +0 -8
- package/scripts/ui/layouts/templates/2 Column.js +0 -14
- package/scripts/ui/layouts/templates/3 Column.js +0 -15
- package/scripts/ui/layouts/templates/Flex box.js +0 -16
- package/scripts/ui/layouts/templates/Fluid layout.js +0 -19
- package/scripts/ui/layouts/templates/Gallery grid.js +0 -18
- package/scripts/ui/layouts/templates/Splitter (1 Column 2 Row).js +0 -19
- package/scripts/ui/layouts/templates/Splitter (2 Column).js +0 -16
- package/scripts/ui/layouts/templates/Splitter (2 Row).js +0 -18
- package/scripts/ui/layouts/templates/Splitter (2-3 Column).js +0 -23
- package/scripts/ui/layouts/templates/Tabs 2 column.js +0 -19
- package/scripts/ui/layouts/templates/Tabs navbar.js +0 -16
- package/scripts/ui/viewers/types/google-map.js +0 -5
- package/scripts/ux/Dialogs/add-new-column-dlg.js +0 -58
- package/scripts/ux/Dialogs/link-table-dlg.js +0 -23
- package/scripts/ux/Filters/data-filtering.js +0 -99
- package/scripts/ux/Input forms/form-types.js +0 -133
- package/scripts/ux/Input forms/misc.js +0 -52
- package/scripts/ux/Layouts/example-1.js +0 -50
- package/scripts/ux/Layouts/example-2.js +0 -63
- package/scripts/ux/Layouts/example-3.js +0 -192
- package/scripts/ux/Layouts/example-4.js +0 -51
- package/scripts/ux/Managing Collections/datasource-view.js +0 -47
- package/scripts/ux/Views/property-panel.js +0 -120
- package/scripts/ux/Views/toolbar.js +0 -131
- package/scripts/ux/Views/toolbox.js +0 -124
- /package/scripts/ui/{elements → components}/buttons.js +0 -0
- /package/scripts/ui/{elements → components}/icons.js +0 -0
- /package/scripts/ui/{elements → components}/image.js +0 -0
- /package/scripts/ui/{elements → components}/list.js +0 -0
- /package/scripts/ui/{elements → components}/range-slider.js +0 -0
- /package/scripts/ui/{cards → components}/summary-card.js +0 -0
- /package/scripts/ui/{elements → components}/typography.js +0 -0
- /package/scripts/ui/{layouts → containers}/blocks.js +0 -0
- /package/scripts/ui/{layouts → containers}/box.js +0 -0
- /package/scripts/ui/{layouts → containers}/containers.js +0 -0
- /package/scripts/ui/{layouts → containers}/flexbox.js +0 -0
- /package/scripts/ui/{layouts → containers}/panels.js +0 -0
- /package/scripts/ui/inputs/{custom-inputs.js → advanced/custom-inputs.js} +0 -0
- /package/scripts/ui/inputs/{for-columns.js → advanced/for-columns.js} +0 -0
- /package/scripts/ui/inputs/{input-events.js → advanced/input-events.js} +0 -0
- /package/scripts/ui/inputs/{master-details.js → advanced/master-details.js} +0 -0
- /package/scripts/ui/{elements/inputs → inputs}/choice-input.js +0 -0
- /package/scripts/ui/{elements/inputs → inputs}/column-combo-box.js +0 -0
- /package/scripts/ui/{elements/inputs → inputs}/column-inputs.js +0 -0
- /package/scripts/ui/{elements/inputs → inputs}/inputs-events.js +0 -0
- /package/scripts/ui/{elements/inputs → inputs}/inputs-extended.js +0 -0
- /package/scripts/ui/{elements/inputs → inputs}/molecule-input.js +0 -0
- /package/scripts/ui/{elements/inputs → inputs}/tags-input.js +0 -0
- /package/scripts/{ux/Interactivity → ui/interactivity}/drag-and-drop.js +0 -0
- /package/scripts/{ux/Interactivity → ui/interactivity}/hints.js +0 -0
- /package/scripts/{ux/Interactivity → ui/interactivity}/wizard-hints.js +0 -0
- /package/scripts/{ux/Rendering → ui/rendering}/render-items.js +0 -0
- /package/scripts/ui/{components/tooltips → tooltips}/row-group-tooltips.js +0 -0
- /package/scripts/ui/{components/tooltips → tooltips}/tooltip-events.js +0 -0
- /package/scripts/ui/{components/tooltips → tooltips}/tooltips.js +0 -0
- /package/scripts/{ux/Navigations → ui/views}/navigation.js +0 -0
- /package/scripts/{ux/Managing Collections → ui/views}/virtual-view.js +0 -0
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
//tags: View
|
|
2
|
-
//Toolbox
|
|
3
|
-
|
|
4
|
-
let view = grok.shell.newView('Toolbox simple view');
|
|
5
|
-
view.box = true;
|
|
6
|
-
|
|
7
|
-
let rows = ui.intInput('Rows', 100);
|
|
8
|
-
let choiceData = ui.choiceInput('Data', '',['','demog','wells','geo']);
|
|
9
|
-
let data = '';
|
|
10
|
-
let chartView = ui.splitV([]);
|
|
11
|
-
let gridView = ui.box();
|
|
12
|
-
let stats = ui.div();
|
|
13
|
-
let statsView = ui.box();
|
|
14
|
-
statsView.style.maxWidth='180px';
|
|
15
|
-
statsView.style.maxHeight = '280px';
|
|
16
|
-
let colInput;
|
|
17
|
-
|
|
18
|
-
view.append(ui.splitH([gridView, chartView]))
|
|
19
|
-
let scatter = ui.iconFA('chart-scatter',()=>{
|
|
20
|
-
if (data != '')
|
|
21
|
-
chartView.append(DG.Viewer.fromType('Scatter plot', data).root)
|
|
22
|
-
});
|
|
23
|
-
scatter.style.fontSize = '20px';
|
|
24
|
-
scatter.style.fontWeight = '500';
|
|
25
|
-
scatter.style.color = 'var(--warm-grey-3)';
|
|
26
|
-
|
|
27
|
-
let lineChart = ui.iconFA('chart-line',()=>{
|
|
28
|
-
if (data != '')
|
|
29
|
-
chartView.append(DG.Viewer.fromType('Line chart', data).root)
|
|
30
|
-
});
|
|
31
|
-
lineChart.style.fontSize = '20px';
|
|
32
|
-
lineChart.style.fontWeight = '500';
|
|
33
|
-
lineChart.style.color = 'var(--warm-grey-3)';
|
|
34
|
-
|
|
35
|
-
let barChart = ui.iconFA('chart-bar',()=>{
|
|
36
|
-
if (data != '')
|
|
37
|
-
chartView.append(DG.Viewer.fromType('Bar chart', data).root)
|
|
38
|
-
});
|
|
39
|
-
barChart.style.fontSize = '20px';
|
|
40
|
-
barChart.style.fontWeight = '500';
|
|
41
|
-
barChart.style.color = 'var(--warm-grey-3)';
|
|
42
|
-
|
|
43
|
-
let pieChart = ui.iconFA('chart-pie',()=>{
|
|
44
|
-
if (data != '')
|
|
45
|
-
chartView.append(DG.Viewer.fromType('Pie chart', data).root)
|
|
46
|
-
});
|
|
47
|
-
pieChart.style.fontSize = '20px';
|
|
48
|
-
pieChart.style.fontWeight = '500';
|
|
49
|
-
pieChart.style.color = 'var(--warm-grey-3)';
|
|
50
|
-
|
|
51
|
-
let acc = ui.accordion();
|
|
52
|
-
acc.addPane('Demo data',()=>ui.buttonsInput([
|
|
53
|
-
choiceData,
|
|
54
|
-
rows,
|
|
55
|
-
ui.bigButton('Apply',()=>{
|
|
56
|
-
if (choiceData.value == 'demog')
|
|
57
|
-
data = grok.data.demo.demog(rows.value)
|
|
58
|
-
if (choiceData.value == 'wells')
|
|
59
|
-
data = grok.data.demo.wells(rows.value)
|
|
60
|
-
if (choiceData.value == 'geo')
|
|
61
|
-
data= grok.data.demo.geo(rows.value)
|
|
62
|
-
if (choiceData.value == ''){
|
|
63
|
-
data = '';
|
|
64
|
-
gridView.innerHTML = '';
|
|
65
|
-
chartView.innerHTML = '';
|
|
66
|
-
stats.innerHTML = '';
|
|
67
|
-
grok.shell.error('Select data');
|
|
68
|
-
}
|
|
69
|
-
gridView.innerHTML = '';
|
|
70
|
-
chartView.innerHTML = '';
|
|
71
|
-
if (data != ''){
|
|
72
|
-
colInput = ui.choiceInput('Column', '', data.columns.toList(), col=>{
|
|
73
|
-
statsView.innerHTML = '';
|
|
74
|
-
statsView.append(ui.tableFromMap({
|
|
75
|
-
name: col.name,
|
|
76
|
-
totalCount: col.stats.totalCount,
|
|
77
|
-
'missing values': col.stats.missingValueCount,
|
|
78
|
-
valueCount: col.stats.valueCount,
|
|
79
|
-
min: col.stats.min,
|
|
80
|
-
max: col.stats.max,
|
|
81
|
-
avg: col.stats.avg,
|
|
82
|
-
stdev: col.stats.stdev,
|
|
83
|
-
variance: col.stats.variance,
|
|
84
|
-
skew: col.stats.skew,
|
|
85
|
-
kurt: col.stats.kurt,
|
|
86
|
-
med: col.stats.med,
|
|
87
|
-
q1: col.stats.q1,
|
|
88
|
-
q2: col.stats.q2,
|
|
89
|
-
q3: col.stats.q3
|
|
90
|
-
}))
|
|
91
|
-
});
|
|
92
|
-
gridView.append(DG.Viewer.grid(data).root);
|
|
93
|
-
stats.innerHTML = '';
|
|
94
|
-
statsView.innerHTML = '';
|
|
95
|
-
stats.append(ui.divV([colInput,statsView]));
|
|
96
|
-
}
|
|
97
|
-
})
|
|
98
|
-
]), true);
|
|
99
|
-
|
|
100
|
-
acc.addPane('Viewers',()=>ui.divV([
|
|
101
|
-
ui.divH([
|
|
102
|
-
ui.tooltip.bind(scatter, 'Scatter plot'),
|
|
103
|
-
ui.tooltip.bind(lineChart, 'Line chart'),
|
|
104
|
-
ui.tooltip.bind(barChart, 'Bar chart'),
|
|
105
|
-
ui.tooltip.bind(pieChart, 'Pie chart'),
|
|
106
|
-
], {style:{marginRight:'20px',justifyContent:'space-between'}})
|
|
107
|
-
]));
|
|
108
|
-
acc.addPane('Statistic',()=> stats);
|
|
109
|
-
acc.addPane('Actions',()=>ui.divV([
|
|
110
|
-
ui.link('Add View', ()=>{grok.shell.addTableView(data)}, '',''),
|
|
111
|
-
ui.link('Add Filters',()=>{grok.shell.dockManager.dock(DG.Viewer.fromType('Filters', data).root, 'left',null,'Filters',0.2);},'',''),
|
|
112
|
-
ui.link('General Info', ()=>{
|
|
113
|
-
grok.shell.info(data.name);
|
|
114
|
-
grok.shell.info(data.rowCount);
|
|
115
|
-
}, '',''),
|
|
116
|
-
ui.link('Clear View', ()=>{
|
|
117
|
-
data = '';
|
|
118
|
-
gridView.innerHTML = '';
|
|
119
|
-
chartView.innerHTML = '';
|
|
120
|
-
stats.innerHTML = '';
|
|
121
|
-
}, '','')
|
|
122
|
-
]));
|
|
123
|
-
|
|
124
|
-
view.toolbox = acc.root
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|