1 | import { renderers } from './renderer/renderers';
|
2 | import { toolbarActions, toolbarDialogAddons } from './ui/toolbar';
|
3 | function resolveToolbarActions(col, keys, lookup) {
|
4 | var actions = [];
|
5 | keys.forEach(function (key) {
|
6 | if (lookup.hasOwnProperty(key)) {
|
7 | actions.push(lookup[key]);
|
8 | }
|
9 | else {
|
10 | console.warn("cannot find toolbar action of type: \"" + col.desc.type + "\" with key \"" + key + "\"");
|
11 | }
|
12 | });
|
13 | return actions;
|
14 | }
|
15 | function resolveToolbarDialogAddons(col, keys, lookup) {
|
16 | var actions = [];
|
17 | keys.forEach(function (key) {
|
18 | if (lookup.hasOwnProperty(key)) {
|
19 | actions.push(lookup[key]);
|
20 | }
|
21 | else {
|
22 | console.warn("cannot find toolbar dialog addon of type: \"" + col.desc.type + "\" with key \"" + key + "\"");
|
23 | }
|
24 | });
|
25 | return actions;
|
26 | }
|
27 | export function defaultOptions() {
|
28 | return {
|
29 | toolbarActions: toolbarActions,
|
30 | toolbarDialogAddons: toolbarDialogAddons,
|
31 | resolveToolbarActions: resolveToolbarActions,
|
32 | resolveToolbarDialogAddons: resolveToolbarDialogAddons,
|
33 | renderers: Object.assign({}, renderers),
|
34 | canRender: function () { return true; },
|
35 | labelRotation: 0,
|
36 | summaryHeader: true,
|
37 | animated: true,
|
38 | expandLineOnHover: false,
|
39 | sidePanel: true,
|
40 | sidePanelCollapsed: false,
|
41 | hierarchyIndicator: true,
|
42 | defaultSlopeGraphMode: 'item',
|
43 | overviewMode: false,
|
44 | livePreviews: {
|
45 | search: true,
|
46 | filter: true,
|
47 | vis: true,
|
48 | sort: true,
|
49 | group: true,
|
50 | groupSort: true,
|
51 | colorMapping: true
|
52 | },
|
53 | onDialogBackgroundClick: 'cancel',
|
54 | rowHeight: 18,
|
55 | groupHeight: 40,
|
56 | groupPadding: 5,
|
57 | rowPadding: 2,
|
58 | levelOfDetail: function () { return 'high'; },
|
59 | customRowUpdate: function () { return undefined; },
|
60 | dynamicHeight: function () { return null; },
|
61 | flags: {
|
62 | disableFrozenColumns: true,
|
63 | advancedRankingFeatures: true,
|
64 | advancedModelFeatures: true,
|
65 | advancedUIFeatures: true,
|
66 | },
|
67 | ignoreUnsupportedBrowser: false
|
68 | };
|
69 | }
|
70 |
|
\ | No newline at end of file |