buckaroo-js-core 0.8.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 (159) hide show
  1. package/.prettierrc +16 -0
  2. package/CHANGELOG.md +23 -0
  3. package/LICENSE +15 -0
  4. package/README.md +66 -0
  5. package/buckaroo_js/baked_data/colorMap.d.ts +3 -0
  6. package/buckaroo_js/baked_data/colorMap.d.ts.map +1 -0
  7. package/buckaroo_js/baked_data/colorMap.js +520 -0
  8. package/buckaroo_js/baked_data/colorMap.js.map +1 -0
  9. package/buckaroo_js/baked_data/staticData.d.ts +124 -0
  10. package/buckaroo_js/baked_data/staticData.d.ts.map +1 -0
  11. package/buckaroo_js/baked_data/staticData.js +459 -0
  12. package/buckaroo_js/baked_data/staticData.js.map +1 -0
  13. package/buckaroo_js/components/ColumnsEditor.d.ts +19 -0
  14. package/buckaroo_js/components/ColumnsEditor.d.ts.map +1 -0
  15. package/buckaroo_js/components/ColumnsEditor.js +68 -0
  16. package/buckaroo_js/components/ColumnsEditor.js.map +1 -0
  17. package/buckaroo_js/components/CommandUtils.d.ts +22 -0
  18. package/buckaroo_js/components/CommandUtils.d.ts.map +1 -0
  19. package/buckaroo_js/components/CommandUtils.js +17 -0
  20. package/buckaroo_js/components/CommandUtils.js.map +1 -0
  21. package/buckaroo_js/components/DCFCell.d.ts +28 -0
  22. package/buckaroo_js/components/DCFCell.d.ts.map +1 -0
  23. package/buckaroo_js/components/DCFCell.js +120 -0
  24. package/buckaroo_js/components/DCFCell.js.map +1 -0
  25. package/buckaroo_js/components/DFViewerParts/DFViewer.d.ts +29 -0
  26. package/buckaroo_js/components/DFViewerParts/DFViewer.d.ts.map +1 -0
  27. package/buckaroo_js/components/DFViewerParts/DFViewer.js +163 -0
  28. package/buckaroo_js/components/DFViewerParts/DFViewer.js.map +1 -0
  29. package/buckaroo_js/components/DFViewerParts/DFWhole.d.ts +111 -0
  30. package/buckaroo_js/components/DFViewerParts/DFWhole.d.ts.map +1 -0
  31. package/buckaroo_js/components/DFViewerParts/DFWhole.js +17 -0
  32. package/buckaroo_js/components/DFViewerParts/DFWhole.js.map +1 -0
  33. package/buckaroo_js/components/DFViewerParts/Displayer.d.ts +19 -0
  34. package/buckaroo_js/components/DFViewerParts/Displayer.d.ts.map +1 -0
  35. package/buckaroo_js/components/DFViewerParts/Displayer.js +221 -0
  36. package/buckaroo_js/components/DFViewerParts/Displayer.js.map +1 -0
  37. package/buckaroo_js/components/DFViewerParts/HistogramCell.d.ts +20 -0
  38. package/buckaroo_js/components/DFViewerParts/HistogramCell.d.ts.map +1 -0
  39. package/buckaroo_js/components/DFViewerParts/HistogramCell.js +184 -0
  40. package/buckaroo_js/components/DFViewerParts/HistogramCell.js.map +1 -0
  41. package/buckaroo_js/components/DFViewerParts/SeriesSummaryTooltip.d.ts +5 -0
  42. package/buckaroo_js/components/DFViewerParts/SeriesSummaryTooltip.d.ts.map +1 -0
  43. package/buckaroo_js/components/DFViewerParts/SeriesSummaryTooltip.js +18 -0
  44. package/buckaroo_js/components/DFViewerParts/SeriesSummaryTooltip.js.map +1 -0
  45. package/buckaroo_js/components/DFViewerParts/gridUtils.d.ts +24 -0
  46. package/buckaroo_js/components/DFViewerParts/gridUtils.d.ts.map +1 -0
  47. package/buckaroo_js/components/DFViewerParts/gridUtils.js +230 -0
  48. package/buckaroo_js/components/DFViewerParts/gridUtils.js.map +1 -0
  49. package/buckaroo_js/components/DependentTabs.d.ts +33 -0
  50. package/buckaroo_js/components/DependentTabs.d.ts.map +1 -0
  51. package/buckaroo_js/components/DependentTabs.js +108 -0
  52. package/buckaroo_js/components/DependentTabs.js.map +1 -0
  53. package/buckaroo_js/components/OperationDetail.d.ts +16 -0
  54. package/buckaroo_js/components/OperationDetail.d.ts.map +1 -0
  55. package/buckaroo_js/components/OperationDetail.js +144 -0
  56. package/buckaroo_js/components/OperationDetail.js.map +1 -0
  57. package/buckaroo_js/components/OperationUtils.d.ts +17 -0
  58. package/buckaroo_js/components/OperationUtils.d.ts.map +1 -0
  59. package/buckaroo_js/components/OperationUtils.js +14 -0
  60. package/buckaroo_js/components/OperationUtils.js.map +1 -0
  61. package/buckaroo_js/components/Operations.d.ts +24 -0
  62. package/buckaroo_js/components/Operations.d.ts.map +1 -0
  63. package/buckaroo_js/components/Operations.js +209 -0
  64. package/buckaroo_js/components/Operations.js.map +1 -0
  65. package/buckaroo_js/components/StatusBar.d.ts +12 -0
  66. package/buckaroo_js/components/StatusBar.d.ts.map +1 -0
  67. package/buckaroo_js/components/StatusBar.js +155 -0
  68. package/buckaroo_js/components/StatusBar.js.map +1 -0
  69. package/buckaroo_js/components/WidgetTypes.d.ts +25 -0
  70. package/buckaroo_js/components/WidgetTypes.d.ts.map +1 -0
  71. package/buckaroo_js/components/WidgetTypes.js +3 -0
  72. package/buckaroo_js/components/WidgetTypes.js.map +1 -0
  73. package/buckaroo_js/components/bakedOperationDefaults.d.ts +5 -0
  74. package/buckaroo_js/components/bakedOperationDefaults.d.ts.map +1 -0
  75. package/buckaroo_js/components/bakedOperationDefaults.js +15 -0
  76. package/buckaroo_js/components/bakedOperationDefaults.js.map +1 -0
  77. package/buckaroo_js/components/utils.d.ts +294 -0
  78. package/buckaroo_js/components/utils.d.ts.map +1 -0
  79. package/buckaroo_js/components/utils.js +143 -0
  80. package/buckaroo_js/components/utils.js.map +1 -0
  81. package/buckaroo_js/extension.d.ts +2 -0
  82. package/buckaroo_js/extension.d.ts.map +1 -0
  83. package/buckaroo_js/extension.js +20 -0
  84. package/buckaroo_js/extension.js.map +1 -0
  85. package/buckaroo_js/index.d.ts +25 -0
  86. package/buckaroo_js/index.d.ts.map +1 -0
  87. package/buckaroo_js/index.js +46 -0
  88. package/buckaroo_js/index.js.map +1 -0
  89. package/buckaroo_js/vendor/RechartExtra.d.ts +38 -0
  90. package/buckaroo_js/vendor/RechartExtra.d.ts.map +1 -0
  91. package/buckaroo_js/vendor/RechartExtra.js +17 -0
  92. package/buckaroo_js/vendor/RechartExtra.js.map +1 -0
  93. package/buckaroo_js/vendor/RechartTooltip.d.ts +82 -0
  94. package/buckaroo_js/vendor/RechartTooltip.d.ts.map +1 -0
  95. package/buckaroo_js/vendor/RechartTooltip.js +232 -0
  96. package/buckaroo_js/vendor/RechartTooltip.js.map +1 -0
  97. package/codecov.yml +16 -0
  98. package/eslint.config.mjs +88 -0
  99. package/examples/App.tsx +160 -0
  100. package/examples/CodeBlock.tsx +27 -0
  101. package/examples/CodePenButton.tsx +77 -0
  102. package/examples/ReadmeBlock.tsx +11 -0
  103. package/examples/app.css +29 -0
  104. package/examples/ex/ColumnsEditorEx.tsx +5 -0
  105. package/examples/ex/CommandViewerEx.tsx +20 -0
  106. package/examples/ex/DFViewerEx.tsx +3 -0
  107. package/examples/ex/DFViewerEx_large.tsx +266 -0
  108. package/examples/ex/DFViewerEx_real_summary.tsx +20 -0
  109. package/examples/ex/DFViewerEx_short_data.tsx +22 -0
  110. package/examples/ex/DFViewerEx_string_index.tsx +1012 -0
  111. package/examples/ex/HistogramEx.tsx +67 -0
  112. package/examples/ex/StatusBarEx.tsx +46 -0
  113. package/examples/ex/WidgetDCFCellEx.tsx +6 -0
  114. package/examples/example.css +20 -0
  115. package/examples/index-iframe.hnottml +24 -0
  116. package/examples/index-react18.tsx +8 -0
  117. package/examples/index.html +20 -0
  118. package/examples/jsx-loader.ts +16 -0
  119. package/examples/tsconfig.json +31 -0
  120. package/index.d.ts +2 -0
  121. package/index.d.ts.map +1 -0
  122. package/index.js +7 -0
  123. package/index.js.map +1 -0
  124. package/jest.config.js +24 -0
  125. package/package.json +117 -0
  126. package/screen-animation.gif +0 -0
  127. package/src/buckaroo_js/baked_data/colorMap.ts +523 -0
  128. package/src/buckaroo_js/baked_data/staticData.ts +503 -0
  129. package/src/buckaroo_js/components/ColumnsEditor.tsx +66 -0
  130. package/src/buckaroo_js/components/CommandUtils.ts +40 -0
  131. package/src/buckaroo_js/components/DCFCell.tsx +175 -0
  132. package/src/buckaroo_js/components/DFViewerParts/DFViewer.tsx +215 -0
  133. package/src/buckaroo_js/components/DFViewerParts/DFWhole.ts +190 -0
  134. package/src/buckaroo_js/components/DFViewerParts/Displayer.ts +215 -0
  135. package/src/buckaroo_js/components/DFViewerParts/HistogramCell.tsx +251 -0
  136. package/src/buckaroo_js/components/DFViewerParts/SeriesSummaryTooltip.tsx +20 -0
  137. package/src/buckaroo_js/components/DFViewerParts/gridUtils.ts +290 -0
  138. package/src/buckaroo_js/components/DependentTabs.tsx +134 -0
  139. package/src/buckaroo_js/components/OperationDetail.tsx +203 -0
  140. package/src/buckaroo_js/components/OperationUtils.ts +33 -0
  141. package/src/buckaroo_js/components/Operations.tsx +243 -0
  142. package/src/buckaroo_js/components/StatusBar.tsx +190 -0
  143. package/src/buckaroo_js/components/WidgetTypes.tsx +42 -0
  144. package/src/buckaroo_js/components/bakedOperationDefaults.ts +14 -0
  145. package/src/buckaroo_js/components/utils.ts +60 -0
  146. package/src/buckaroo_js/extension.ts +15 -0
  147. package/src/buckaroo_js/index.ts +34 -0
  148. package/src/buckaroo_js/style/dcf-npm.css +244 -0
  149. package/src/buckaroo_js/style/icons/arrow-down-short-dark.svg +4 -0
  150. package/src/buckaroo_js/style/icons/arrow-down-short.svg +4 -0
  151. package/src/buckaroo_js/style/icons/arrow-up-short-dark.svg +4 -0
  152. package/src/buckaroo_js/style/icons/arrow-up-short.svg +4 -0
  153. package/src/buckaroo_js/style/icons/filter-dark.svg +3 -0
  154. package/src/buckaroo_js/style/icons/filter.svg +3 -0
  155. package/src/buckaroo_js/vendor/RechartExtra.ts +60 -0
  156. package/src/buckaroo_js/vendor/RechartTooltip.tsx +357 -0
  157. package/src/index.tsx +3 -0
  158. package/tsconfig.json +41 -0
  159. package/webpack.config.ts +97 -0
@@ -0,0 +1,77 @@
1
+ import * as React from 'react';
2
+
3
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
4
+ // @ts-ignore
5
+ import exampleCss from '!!raw-loader!./example.css';
6
+
7
+ const CodePenButton = React.memo(function CodePenButtonRaw(props: {
8
+ text: Promise<string>;
9
+ title: string;
10
+ }) {
11
+ const [text, setText] = React.useState('loading()');
12
+ React.useEffect(() => {
13
+ props.text.then((r) => {
14
+ r = r.replace(
15
+ /import (.*) from '(.*)'/g,
16
+ (match, g1, g2) => `import ${g1} from "https://cdn.skypack.dev/${g2}"`
17
+ );
18
+ r = r.replace(/import '.*';\n/g, '');
19
+ r = r.replace(/export default function (.*)/, 'function Comp() {');
20
+ r = 'import * as ReactDOM from "https://cdn.skypack.dev/react-dom";\n' + r;
21
+ r += '\nReactDOM.render(<Comp />, document.getElementById("root"));\n';
22
+ setText(r);
23
+ });
24
+ }, [props.text]);
25
+
26
+ const ref = React.useRef<HTMLFormElement>();
27
+
28
+ return (
29
+ <form
30
+ className='position-absolute my-2 mx-4'
31
+ style={{top: '0px', right: '0px'}}
32
+ ref={ref}
33
+ action='https://codepen.io/pen/define'
34
+ method='POST'
35
+ target='_blank'
36
+ >
37
+ <input
38
+ type='hidden'
39
+ name='data'
40
+ value={JSON.stringify({
41
+ title: 'react-edit-list ' + props.title,
42
+ html: '<div id="root"></div>',
43
+ js: text,
44
+ js_pre_processor: 'typescript',
45
+ css: exampleCss,
46
+ js_external:
47
+ 'https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js',
48
+ css_external:
49
+ 'https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css;' +
50
+ 'https://unpkg.com/react-day-picker/dist/style.css'
51
+ })}
52
+ />
53
+ <button
54
+ className='btn border mb-2 bg-light'
55
+ onClick={() => {
56
+ ref.current.submit();
57
+ }}
58
+ >
59
+ <span className='me-2 align-middle'>Edit on</span>
60
+ <svg
61
+ xmlns='http://www.w3.org/2000/svg'
62
+ viewBox='0 0 138 26'
63
+ height='24px'
64
+ fill='none'
65
+ stroke='#000'
66
+ strokeWidth='2.3'
67
+ strokeLinecap='round'
68
+ strokeLinejoin='round'
69
+ >
70
+ <path d='M80 6h-9v14h9 M114 6h-9 v14h9 M111 13h-6 M77 13h-6 M122 20V6l11 14V6 M22 16.7L33 24l11-7.3V9.3L33 2L22 9.3V16.7z M44 16.7L33 9.3l-11 7.4 M22 9.3l11 7.3 l11-7.3 M33 2v7.3 M33 16.7V24 M88 14h6c2.2 0 4-1.8 4-4s-1.8-4-4-4h-6v14 M15 8c-1.3-1.3-3-2-5-2c-4 0-7 3-7 7s3 7 7 7 c2 0 3.7-0.8 5-2 M64 13c0 4-3 7-7 7h-5V6h5C61 6 64 9 64 13z' />
71
+ </svg>
72
+ </button>
73
+ </form>
74
+ );
75
+ });
76
+
77
+ export default CodePenButton;
@@ -0,0 +1,11 @@
1
+ /* eslint-disable @typescript-eslint/ban-ts-comment */
2
+ import React from 'react';
3
+ // @ts-ignore
4
+ import READMEmd from '../README.md';
5
+
6
+ // This is expensive to render
7
+ const ReadmeBlock = React.memo(function _README() {
8
+ return <div dangerouslySetInnerHTML={{__html: READMEmd}} />;
9
+ });
10
+
11
+ export default ReadmeBlock;
@@ -0,0 +1,29 @@
1
+ .left-menu button {
2
+ text-align: left;
3
+ font-weight: bold;
4
+ color: #333333;
5
+ }
6
+
7
+ .left-menu a:hover {
8
+ text-decoration: none;
9
+ }
10
+
11
+ .left-menu {
12
+ width: 10em;
13
+ min-width: 10em;
14
+ max-width: 10em;
15
+ }
16
+
17
+ .codeblock {
18
+ max-height: 90vh;
19
+ overflow-y: scroll;
20
+ }
21
+
22
+ .codeblock > pre {
23
+ margin-top: 0 !important;
24
+ }
25
+
26
+ .codeblock > pre > code {
27
+ font-size: 0.9rem !important;
28
+ line-height: 1.1 !important;
29
+ }
@@ -0,0 +1,5 @@
1
+ import { extraComponents } from 'buckaroo';
2
+ import 'ag-grid-community/styles/ag-grid.css';
3
+ import 'ag-grid-community/styles/ag-theme-alpine.css';
4
+
5
+ export default extraComponents.ColumnsEditorEx;
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+
3
+ //import {bakedOperations, bakedCommandConfig } from '../../../js/baked_data/staticData';
4
+ import { bakedData } from 'buckaroo';
5
+ import { extraComponents } from 'buckaroo';
6
+
7
+
8
+ export default function Simple() {
9
+ return (
10
+ <extraComponents.OperationViewer
11
+ operations={bakedData.bakedOperations}
12
+ setOperations={(foo: unknown) => {
13
+ console.log('setCommands sent', foo);
14
+ }}
15
+ activeColumn={'foo-column'}
16
+ allColumns={['foo-col', 'bar-col', 'baz-col']}
17
+ commandConfig={bakedData.bakedCommandConfig}
18
+ />
19
+ );
20
+ }
@@ -0,0 +1,3 @@
1
+ import { extraComponents } from 'buckaroo';
2
+
3
+ export default extraComponents.DFViewerEx;
@@ -0,0 +1,266 @@
1
+ import React, { useState} from 'react';
2
+ import _ from 'lodash';
3
+
4
+ import { extraComponents } from 'buckaroo';
5
+ //import { DFData, DFViewerConfig } from 'buckaroo';
6
+
7
+ const data = [
8
+ {
9
+ "index": 0,
10
+ "a": 5,
11
+ "b": 2.8571428571
12
+ },
13
+ {
14
+ "index": 1,
15
+ "a": 28,
16
+ "b": 12.8571428571
17
+ },
18
+
19
+ ]
20
+
21
+ const summary_stats_data =[
22
+ {
23
+ "index": "dtype",
24
+ "a": "int64",
25
+ "b": "float64"
26
+ },
27
+ {
28
+ "index": "is_numeric",
29
+ "a": true,
30
+ "b": true
31
+ },
32
+ {
33
+ "index": "_type",
34
+ "a": "integer",
35
+ "b": "float"
36
+ },
37
+ {
38
+ "index": "histogram",
39
+ "a": [
40
+ {
41
+ "name": "1 - 1.0",
42
+ "tail": 1
43
+ },
44
+ {
45
+ "name": "2-7",
46
+ "population": 16
47
+ },
48
+ {
49
+ "name": "7-11",
50
+ "population": 11
51
+ },
52
+ {
53
+ "name": "11-16",
54
+ "population": 6
55
+ },
56
+ {
57
+ "name": "16-20",
58
+ "population": 11
59
+ },
60
+ {
61
+ "name": "20-25",
62
+ "population": 5
63
+ },
64
+ {
65
+ "name": "25-30",
66
+ "population": 14
67
+ },
68
+ {
69
+ "name": "30-34",
70
+ "population": 9
71
+ },
72
+ {
73
+ "name": "34-39",
74
+ "population": 9
75
+ },
76
+ {
77
+ "name": "39-43",
78
+ "population": 11
79
+ },
80
+ {
81
+ "name": "43-48",
82
+ "population": 10
83
+ },
84
+ {
85
+ "name": "49.0 - 49",
86
+ "tail": 1
87
+ }
88
+ ],
89
+ "b": [
90
+ {
91
+ "name": "1.4285714285714286 - 1.4285714285714286",
92
+ "tail": 1
93
+ },
94
+ {
95
+ "name": "3-7",
96
+ "population": 12
97
+ },
98
+ {
99
+ "name": "7-10",
100
+ "population": 16
101
+ },
102
+ {
103
+ "name": "10-14",
104
+ "population": 9
105
+ },
106
+ {
107
+ "name": "14-18",
108
+ "population": 9
109
+ },
110
+ {
111
+ "name": "18-21",
112
+ "population": 9
113
+ },
114
+ {
115
+ "name": "21-25",
116
+ "population": 12
117
+ },
118
+ {
119
+ "name": "25-29",
120
+ "population": 14
121
+ },
122
+ {
123
+ "name": "29-33",
124
+ "population": 6
125
+ },
126
+ {
127
+ "name": "33-36",
128
+ "population": 7
129
+ },
130
+ {
131
+ "name": "36-40",
132
+ "population": 6
133
+ },
134
+ {
135
+ "name": "41.42857142857143 - 41.42857142857143",
136
+ "tail": 1
137
+ }
138
+ ]
139
+ }
140
+ ];
141
+
142
+ function genInt(len, min, max) {
143
+ const a = new Array(len);
144
+ return _.map(a, a => _.random(min, max))
145
+ }
146
+
147
+ function genString(items:number, minLen:number, maxLen:number) : string[] {
148
+
149
+ const a = new Array(items);
150
+ const randStrings = _.map(a, () => {
151
+ const strLen = _.random(minLen, maxLen);
152
+ const b = new Array(strLen)
153
+ const randLenStr = _.map(b, () => { return String.fromCharCode(_.random(65, 90)) }).join('')
154
+ return randLenStr
155
+ })
156
+ return randStrings
157
+ }
158
+
159
+ const dictOfListsToListOfDicts = (a: Record<string, any[]>) : Record<string, any>[] => {
160
+ const firstKey = _.keys(a)[0];
161
+ const data : Record<string, any>[] = _.map(a[firstKey], (_val, idx):Record<string, any> => {
162
+ const pairs: [string, any][] = _.map(a, (arr, key) => {
163
+ return [key, arr[idx]]
164
+ })
165
+ const row:Record<string, any> = _.fromPairs(pairs);
166
+ return row;
167
+ })
168
+ return data
169
+ }
170
+
171
+ export default function DFViewerExString() {
172
+ const [activeCol, setActiveCol] = useState('tripduration');
173
+ const samples= 1_000;
174
+ const data = dictOfListsToListOfDicts({
175
+ 'a':genInt(samples, 2, 30),
176
+ 'b':genInt(samples, 10, 8),
177
+ 'c':genString(samples, 3, 10),
178
+ 'd':genInt(samples, 100, 999),
179
+ 'e':genInt(samples, -30_000, 55_123_123),
180
+ 'f':genString(samples, 3, 70),
181
+ 'g':genInt(samples, -3, 55),
182
+ })
183
+ //const current: {'df':DFData, 'df_viewer_config':DFViewerConfig, 'summary_stats_data':DFData} = {
184
+ const current: {'df':any, 'df_viewer_config': any, 'summary_stats_data': any} = {
185
+
186
+ "df": data,
187
+ "df_viewer_config": {
188
+ "pinned_rows": [
189
+ {
190
+ "primary_key_val": "dtype",
191
+ "displayer_args": {
192
+ "displayer": "obj"
193
+ }
194
+ },
195
+ {
196
+ "primary_key_val": "histogram",
197
+ "displayer_args": {
198
+ "displayer": "histogram"
199
+ }
200
+ }
201
+ ],
202
+ component_config: {height_fraction:1.15},
203
+
204
+ "column_config": [
205
+ {
206
+ "col_name": "index",
207
+ "displayer_args": {
208
+ "displayer": "obj"
209
+ }
210
+ },
211
+ {
212
+ "col_name": "a",
213
+ "displayer_args": {
214
+ "displayer": "obj"
215
+ }
216
+ },
217
+ {
218
+ "col_name": "b",
219
+ "displayer_args": {
220
+ "displayer": "obj"
221
+ }
222
+ },
223
+ {
224
+ "col_name": "c",
225
+ "displayer_args": {
226
+ "displayer": "obj"
227
+ }
228
+ },
229
+ {
230
+ "col_name": "d",
231
+ "displayer_args": {
232
+ "displayer": "obj"
233
+ }
234
+ },
235
+ {
236
+ "col_name": "e",
237
+ "displayer_args": {
238
+ "displayer": "obj"
239
+ }
240
+ },
241
+ {
242
+ "col_name": "f",
243
+ "displayer_args": {
244
+ "displayer": "obj"
245
+ }
246
+ },
247
+ {
248
+ "col_name": "g",
249
+ "displayer_args": {
250
+ "displayer": "obj"
251
+ }
252
+ },
253
+
254
+
255
+ ]
256
+ },
257
+ "summary_stats_data": summary_stats_data
258
+ }
259
+
260
+
261
+ return <extraComponents.DFViewer df_data={current.df}
262
+ df_viewer_config={current.df_viewer_config}
263
+ summary_stats_data={current.summary_stats_data}
264
+ activeCol={activeCol} setActiveCol={setActiveCol} />;
265
+ }
266
+
@@ -0,0 +1,20 @@
1
+ import React, { useState} from 'react';
2
+ import { extraComponents, bakedData } from 'buckaroo';
3
+
4
+ //import { realSummaryConfig, realSummaryTableData } from '../../../js/baked_data/staticData';
5
+ //import { realSummaryConfig, realSummaryTableData } from 'buckaroo';
6
+
7
+
8
+ export default function DFViewerExString() {
9
+ const [activeCol, setActiveCol] = useState('tripduration');
10
+
11
+ const current = {
12
+ 'df': bakedData.realSummaryTableData, 'df_viewer_config': bakedData.realSummaryConfig,
13
+ 'summary_stats_data': bakedData.realSummaryTableData };
14
+
15
+ return <extraComponents.DFViewer df_data={current.df}
16
+ df_viewer_config={current.df_viewer_config}
17
+ summary_stats_data={current.summary_stats_data}
18
+ activeCol={activeCol} setActiveCol={setActiveCol} />;
19
+ }
20
+
@@ -0,0 +1,22 @@
1
+ import React, { useState} from 'react';
2
+ import { bakedData, extraComponents } from 'buckaroo';
3
+
4
+
5
+
6
+ export default function DFViewerExString() {
7
+ const [activeCol, setActiveCol] = useState('tripduration');
8
+ // const dfv_config:DFViewerConfig = {
9
+ const dfv_config:any = {
10
+ column_config: bakedData.realSummaryConfig.column_config,
11
+ pinned_rows: []}
12
+
13
+ const current = {
14
+ 'df':bakedData.realSummaryTableData, 'df_viewer_config': bakedData.realSummaryConfig,
15
+ 'summary_stats_data': bakedData.realSummaryTableData };
16
+
17
+ return <extraComponents.DFViewer df_data={current.df.slice(0,3)}
18
+ df_viewer_config={dfv_config}
19
+ summary_stats_data={[]}
20
+ activeCol={activeCol} setActiveCol={setActiveCol} />;
21
+ }
22
+