@datagrok/api-samples 1.0.4 → 1.0.6
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/README.md +5 -3
- package/dist/package-test.js +2 -519
- package/dist/package.js +2 -30
- package/layouts/demog-table-layout.json +236 -0
- package/package.json +2 -7
- package/scripts/data-access/db/db-edit.js +27 -0
- package/scripts/data-access/dynamic-query.js +13 -0
- package/scripts/data-access/output-layouts.js +5 -0
- package/scripts/data-frame/events/calculated-columns/update.js +1 -1
- package/scripts/data-frame/join-link/join-tables.js +5 -6
- package/scripts/misc/paint/paint.js +14 -0
- package/scripts/misc/utils/hide-empty-columns.js +6 -0
- package/scripts/shell/current-object.js +1 -1
- package/scripts/ui/components/balloons.js +6 -0
- package/scripts/ui/components/breadcrumbs.js +4 -0
- package/scripts/ui/components/drop-down.js +7 -0
- package/scripts/ui/docking/README.md +3 -3
- package/scripts/ui/elements/inputs/tags-input.js +12 -0
- package/scripts/ui/elements/inputs/typeahead-input.js +8 -0
- package/scripts/ui/handlers/handlers.js +1 -1
- package/scripts/ui/layouts/templates/2 Column.js +1 -1
- package/scripts/ui/layouts/templates/3 Column.js +1 -1
- package/scripts/ui/layouts/templates/Flex box.js +1 -1
- package/scripts/ui/layouts/templates/Fluid layout.js +1 -1
- package/scripts/ui/layouts/templates/Gallery grid.js +1 -1
- package/scripts/ui/layouts/templates/Splitter (1 Column 2 Row).js +1 -1
- package/scripts/ui/layouts/templates/Splitter (2 Column).js +1 -1
- package/scripts/ui/layouts/templates/Splitter (2 Row).js +1 -1
- package/scripts/ui/layouts/templates/Splitter (2-3 Column).js +1 -1
- package/scripts/ui/layouts/templates/Tabs 2 column.js +1 -1
- package/scripts/ui/layouts/templates/Tabs navbar.js +1 -1
- package/scripts/ui/viewers/advanced/sketch-form.js +9 -0
- package/scripts/ui/viewers/filters/custom-filters.js +8 -3
- package/scripts/ui/viewers/style-settings.js +22 -0
- package/scripts/ui/viewers/types/form-advanced.js +7 -0
- package/scripts/ux/Interactivity/hints.js +20 -17
- package/scripts/ux/Interactivity/wizard-hints.js +15 -0
- package/scripts/ux/Layouts/example-1.js +2 -2
- package/scripts/ux/Layouts/example-2.js +2 -2
- package/scripts/ux/Layouts/example-3.js +2 -2
- package/scripts/ux/Layouts/example-4.js +2 -2
- package/scripts/ux/Views/property-panel.js +2 -2
- package/scripts/ux/Views/toolbar.js +3 -18
- package/tsconfig.json +1 -1
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
const df = grok.data.demo.demog();
|
|
2
2
|
const view = grok.shell.addTableView(df);
|
|
3
|
+
let scatterPlot = view.scatterPlot();
|
|
4
|
+
let histogram = view.histogram();
|
|
3
5
|
|
|
4
|
-
// Place a hint on a visual component in your application
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
// Place a hint on a visual component in your application.
|
|
7
|
+
// Remove it by clicking on the root element event or by time-out.
|
|
8
|
+
const icon1 = $('div.d4-ribbon-item').has('i.svg-remove-selected-rows')[0];
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
// Hints can be removed both programmatically and by the user (via the close icon).
|
|
11
|
-
$(addNCIcon).on('click', () => {
|
|
12
|
-
ui.hints.remove(addNCIcon);
|
|
13
|
-
});
|
|
10
|
+
let indicator1 = ui.hints.addHintIndicator(icon1, false, 4000);
|
|
11
|
+
let indicator2 = ui.hints.addHintIndicator(scatterPlot.root, true);
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
.
|
|
19
|
-
|
|
20
|
-
ui.
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
// Place a hint popup with a custom HTMLElement.
|
|
14
|
+
let msg = ui.divV([
|
|
15
|
+
ui.h1('Title'),
|
|
16
|
+
ui.divV([
|
|
17
|
+
ui.divText('Click on Scatter plot to close hint indicator'),
|
|
18
|
+
ui.link('Remove hint-indicator and hint-popup',()=>{
|
|
19
|
+
indicator2.click();
|
|
20
|
+
popup.remove();
|
|
21
|
+
}, '','')
|
|
22
|
+
])
|
|
23
|
+
]);
|
|
24
|
+
|
|
25
|
+
let popup = ui.hints.addHint(scatterPlot.root, msg, 'left');
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const df = grok.data.demo.demog();
|
|
2
|
+
const view = grok.shell.addTableView(df);
|
|
3
|
+
|
|
4
|
+
// You can describe a series of visual components in the wizard. Each wizard page is associated
|
|
5
|
+
// with the [showNextTo] element. Provide either [text] or [root] parameter to populate the page, the
|
|
6
|
+
// other parameters are optional. The wizard header is shown only if [title] or [helpUrl] are provided.
|
|
7
|
+
// The user can use the arrow buttons to navigate the set of instructions. The wizard can be closed
|
|
8
|
+
// from the dialog header (the "x" icon), via the "Cancel" button, or via the [Wizard.close()] method.
|
|
9
|
+
const sp = view.scatterPlot();
|
|
10
|
+
const hist = view.histogram();
|
|
11
|
+
|
|
12
|
+
const wizard = ui.hints.addTextHint({title: 'Viewers', pages: [
|
|
13
|
+
{caption: 'First Hint', text: 'Welcome! This is the 1st hint about a scatter plot.', showNextTo: sp.root},
|
|
14
|
+
{caption: 'Second Hint', root: ui.divText('This is the 2nd hint about a histogram.'), showNextTo: hist.root},
|
|
15
|
+
]});
|
|
@@ -6,8 +6,8 @@ view.box = true;
|
|
|
6
6
|
|
|
7
7
|
let windows = grok.shell.windows;
|
|
8
8
|
windows.showToolbox = false; //*hide tool box
|
|
9
|
-
windows.
|
|
10
|
-
windows.showHelp = false; //*hide
|
|
9
|
+
windows.showContextPanel = false; //*hide context panel
|
|
10
|
+
windows.showHelp = false; //*hide context help
|
|
11
11
|
|
|
12
12
|
//inputs
|
|
13
13
|
let colInput = ui.columnInput('Column', data, data.col('age'), ()=>{
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
let windows = grok.shell.windows;
|
|
4
4
|
windows.showToolbox = false; //*hide tool box
|
|
5
|
-
windows.
|
|
6
|
-
windows.showHelp = false; //*hide
|
|
5
|
+
windows.showContextPanel = false; //*hide context panel
|
|
6
|
+
windows.showHelp = false; //*hide context help
|
|
7
7
|
|
|
8
8
|
let col2 = ui.block50([]);
|
|
9
9
|
let col3 = ui.block([]);
|
|
@@ -6,8 +6,8 @@ view.box = true;
|
|
|
6
6
|
|
|
7
7
|
let windows = grok.shell.windows;
|
|
8
8
|
windows.showToolbox = false; //*hide tool box
|
|
9
|
-
windows.
|
|
10
|
-
windows.showHelp = false; //*hide
|
|
9
|
+
windows.showContextPanel = false; //*hide context panel
|
|
10
|
+
windows.showHelp = false; //*hide context help
|
|
11
11
|
|
|
12
12
|
let sideChart = ui.block();
|
|
13
13
|
let sideDetails = ui.block();
|
|
@@ -6,8 +6,8 @@ view.box = true;
|
|
|
6
6
|
|
|
7
7
|
let windows = grok.shell.windows;
|
|
8
8
|
windows.showToolbox = false; //*hide tool box
|
|
9
|
-
windows.
|
|
10
|
-
windows.showHelp = false; //*hide
|
|
9
|
+
windows.showContextPanel = false; //*hide context panel
|
|
10
|
+
windows.showHelp = false; //*hide context help
|
|
11
11
|
|
|
12
12
|
let tabs = ui.tabControl();
|
|
13
13
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//tags: View
|
|
2
|
-
//
|
|
2
|
+
//Context panel
|
|
3
3
|
|
|
4
4
|
let testData = {
|
|
5
5
|
demog: grok.data.testData('demog'),
|
|
@@ -103,7 +103,7 @@ let testData = {
|
|
|
103
103
|
let windows = grok.shell.windows;
|
|
104
104
|
windows.showHelp = false;
|
|
105
105
|
|
|
106
|
-
let view = grok.shell.newView('
|
|
106
|
+
let view = grok.shell.newView('Context panel');
|
|
107
107
|
view.append(ui.divV([
|
|
108
108
|
ui.panel([
|
|
109
109
|
ui.h1('Datagrok test data'),
|
|
@@ -40,24 +40,9 @@ let header = ui.block([
|
|
|
40
40
|
grok.shell.bottomPanel.append(footer)
|
|
41
41
|
})
|
|
42
42
|
.separator()
|
|
43
|
-
.item('Toolbox', ()=>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
else
|
|
47
|
-
windows.showToolbox = true
|
|
48
|
-
})
|
|
49
|
-
.item('Property panel', ()=> {
|
|
50
|
-
if (windows.showProperties)
|
|
51
|
-
windows.showProperties = false
|
|
52
|
-
else
|
|
53
|
-
windows.showProperties = true
|
|
54
|
-
})
|
|
55
|
-
.item('Context help', ()=> {
|
|
56
|
-
if (windows.showHelp)
|
|
57
|
-
windows.showHelp = false
|
|
58
|
-
else
|
|
59
|
-
windows.showHelp = true
|
|
60
|
-
})
|
|
43
|
+
.item('Toolbox', () => windows.showToolbox = !windows.showToolbox)
|
|
44
|
+
.item('Context panel', () => windows.showContextPanel = !windows.showContextPanel)
|
|
45
|
+
.item('Context help', () => windows.showHelp = !windows.showHelp)
|
|
61
46
|
.separator()
|
|
62
47
|
ribbonMenu.item('Hide all', ()=>{
|
|
63
48
|
grok.shell.topPanel.innerHTML = '';
|
package/tsconfig.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// "incremental": true, /* Enable incremental compilation */
|
|
7
7
|
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
|
|
8
8
|
"module": "es2020", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
|
|
9
|
-
"lib": ["
|
|
9
|
+
"lib": ["ES2022", "dom"], /* Specify library files to be included in the compilation. */
|
|
10
10
|
// "allowJs": true, /* Allow javascript files to be compiled. */
|
|
11
11
|
// "checkJs": true, /* Report errors in .js files. */
|
|
12
12
|
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
|