buckaroo-js-core 0.8.4 → 0.11.7
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/LICENSE +24 -12
- package/README.md +55 -51
- package/dist/index.cjs.js +114 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.es.js +60790 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.esm.js +60790 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/jest.setup.d.ts +0 -0
- package/dist/src/SampleComponent.d.ts +10 -0
- package/{buckaroo_js → dist/src}/baked_data/colorMap.d.ts +0 -1
- package/dist/src/baked_data/olympic-winners.d.ts +12 -0
- package/dist/src/components/BuckarooInfiniteWidget.flash.test.d.ts +1 -0
- package/dist/src/components/BuckarooStaticTable.d.ts +26 -0
- package/dist/src/components/BuckarooWidgetInfinite.d.ts +38 -0
- package/{buckaroo_js → dist/src}/components/ColumnsEditor.d.ts +5 -8
- package/{buckaroo_js → dist/src}/components/CommandUtils.d.ts +8 -5
- package/dist/src/components/DCFCell.d.ts +19 -0
- package/dist/src/components/DFViewerParts/ChartCell.d.ts +43 -0
- package/dist/src/components/DFViewerParts/DFViewerConfigs.d.ts +5 -0
- package/dist/src/components/DFViewerParts/DFViewerDataHelper.d.ts +20 -0
- package/dist/src/components/DFViewerParts/DFViewerInfinite.d.ts +43 -0
- package/dist/src/components/DFViewerParts/DFViewerInfinite.flash.test.d.ts +1 -0
- package/dist/src/components/DFViewerParts/DFViewerInfinite.test.d.ts +1 -0
- package/dist/src/components/DFViewerParts/DFWhole.d.ts +173 -0
- package/{buckaroo_js → dist/src}/components/DFViewerParts/Displayer.d.ts +20 -6
- package/dist/src/components/DFViewerParts/HistogramCell.d.ts +29 -0
- package/dist/src/components/DFViewerParts/HistogramCell.hooks.test.d.ts +1 -0
- package/dist/src/components/DFViewerParts/OtherRenderers.d.ts +5 -0
- package/dist/src/components/DFViewerParts/RowCache.d.ts +61 -0
- package/dist/src/components/DFViewerParts/RowCache.test.d.ts +1 -0
- package/dist/src/components/DFViewerParts/RowStore.d.ts +22 -0
- package/dist/src/components/DFViewerParts/RowStore.test.d.ts +1 -0
- package/dist/src/components/DFViewerParts/RowStoreGc.d.ts +22 -0
- package/dist/src/components/DFViewerParts/RowStoreGc.test.d.ts +1 -0
- package/dist/src/components/DFViewerParts/SeriesSummaryTooltip.d.ts +13 -0
- package/dist/src/components/DFViewerParts/SmartRowCache.d.ts +83 -0
- package/dist/src/components/DFViewerParts/SmartRowCache.test.d.ts +23 -0
- package/dist/src/components/DFViewerParts/Styler.d.ts +33 -0
- package/dist/src/components/DFViewerParts/TableInfinite.d.ts +10 -0
- package/dist/src/components/DFViewerParts/ViewRegistry.d.ts +21 -0
- package/dist/src/components/DFViewerParts/ViewRegistry.test.d.ts +1 -0
- package/dist/src/components/DFViewerParts/Views.d.ts +53 -0
- package/dist/src/components/DFViewerParts/Views.test.d.ts +1 -0
- package/dist/src/components/DFViewerParts/autocleaning.toggle.integration.test.d.ts +27 -0
- package/dist/src/components/DFViewerParts/gridUtils.d.ts +81 -0
- package/dist/src/components/DFViewerParts/gridUtils.test.d.ts +1 -0
- package/dist/src/components/DFViewerParts/resolveDFData.d.ts +29 -0
- package/dist/src/components/DFViewerParts/resolveDFData.test.d.ts +1 -0
- package/dist/src/components/DFViewerParts/xorqWindow.dom.test.d.ts +1 -0
- package/dist/src/components/DFViewerParts/xorqWindow.test.d.ts +1 -0
- package/{buckaroo_js → dist/src}/components/DependentTabs.d.ts +8 -13
- package/dist/src/components/MessageBox.d.ts +8 -0
- package/{buckaroo_js → dist/src}/components/OperationDetail.d.ts +4 -6
- package/dist/src/components/OperationExamples.d.ts +8 -0
- package/{buckaroo_js → dist/src}/components/OperationUtils.d.ts +1 -1
- package/dist/src/components/Operations.d.ts +14 -0
- package/dist/src/components/Operations.test.d.ts +4 -0
- package/dist/src/components/OperationsList.d.ts +9 -0
- package/dist/src/components/OperationsList.test.d.ts +0 -0
- package/dist/src/components/StatusBar.d.ts +15 -0
- package/{buckaroo_js → dist/src}/components/WidgetTypes.d.ts +3 -4
- package/dist/src/components/useColorScheme.d.ts +7 -0
- package/dist/src/components/utils.d.ts +299 -0
- package/dist/src/index.d.ts +59 -0
- package/dist/src/stories/BuckarooWidgetTest.stories.d.ts +12 -0
- package/dist/src/stories/ChartCell.stories.d.ts +20 -0
- package/dist/src/stories/ColumnsEditor.stories.d.ts +17 -0
- package/dist/src/stories/DFViewer.stories.d.ts +26 -0
- package/dist/src/stories/DFViewerInfiniteRaw.stories.d.ts +24 -0
- package/dist/src/stories/DFViewerInfiniteShadow.stories.d.ts +31 -0
- package/dist/src/stories/HistogramCell.stories.d.ts +18 -0
- package/dist/src/stories/InheritEdgeCases.stories.d.ts +12 -0
- package/dist/src/stories/InheritPinnedRows.stories.d.ts +13 -0
- package/dist/src/stories/MessageBox.stories.d.ts +26 -0
- package/dist/src/stories/OperationViewer.stories.d.ts +24 -0
- package/dist/src/stories/OperationsList.stories.d.ts +19 -0
- package/dist/src/stories/OutsideParamsInconsistency.stories.d.ts +16 -0
- package/dist/src/stories/PinnedRowsDynamic.stories.d.ts +12 -0
- package/dist/src/stories/PinnedRowsRace.stories.d.ts +12 -0
- package/dist/src/stories/PinnedRowsTranscriptReplayer.stories.d.ts +13 -0
- package/dist/src/stories/RawAGGrid.stories.d.ts +17 -0
- package/dist/src/stories/SmallDFScroll.stories.d.ts +11 -0
- package/dist/src/stories/StatusBar.stories.d.ts +19 -0
- package/dist/src/stories/StoryUtils.d.ts +13 -0
- package/dist/src/stories/Styling.stories.d.ts +15 -0
- package/dist/src/stories/StylingIssues.stories.d.ts +54 -0
- package/dist/src/stories/ThemeCustomization.stories.d.ts +22 -0
- package/dist/src/stories/UseMemoExamples.stories.d.ts +12 -0
- package/dist/src/stories/WeirdTypes.stories.d.ts +17 -0
- package/dist/src/test-utils/agGridSpy.d.ts +50 -0
- package/dist/src/widgetUtils.d.ts +1 -0
- package/dist/style.css +1 -0
- package/package.json +109 -101
- package/.prettierrc +0 -16
- package/CHANGELOG.md +0 -23
- package/buckaroo_js/baked_data/colorMap.d.ts.map +0 -1
- package/buckaroo_js/baked_data/colorMap.js +0 -520
- package/buckaroo_js/baked_data/colorMap.js.map +0 -1
- package/buckaroo_js/baked_data/staticData.d.ts +0 -124
- package/buckaroo_js/baked_data/staticData.d.ts.map +0 -1
- package/buckaroo_js/baked_data/staticData.js +0 -459
- package/buckaroo_js/baked_data/staticData.js.map +0 -1
- package/buckaroo_js/components/ColumnsEditor.d.ts.map +0 -1
- package/buckaroo_js/components/ColumnsEditor.js +0 -68
- package/buckaroo_js/components/ColumnsEditor.js.map +0 -1
- package/buckaroo_js/components/CommandUtils.d.ts.map +0 -1
- package/buckaroo_js/components/CommandUtils.js +0 -17
- package/buckaroo_js/components/CommandUtils.js.map +0 -1
- package/buckaroo_js/components/DCFCell.d.ts +0 -28
- package/buckaroo_js/components/DCFCell.d.ts.map +0 -1
- package/buckaroo_js/components/DCFCell.js +0 -120
- package/buckaroo_js/components/DCFCell.js.map +0 -1
- package/buckaroo_js/components/DFViewerParts/DFViewer.d.ts +0 -29
- package/buckaroo_js/components/DFViewerParts/DFViewer.d.ts.map +0 -1
- package/buckaroo_js/components/DFViewerParts/DFViewer.js +0 -163
- package/buckaroo_js/components/DFViewerParts/DFViewer.js.map +0 -1
- package/buckaroo_js/components/DFViewerParts/DFWhole.d.ts +0 -111
- package/buckaroo_js/components/DFViewerParts/DFWhole.d.ts.map +0 -1
- package/buckaroo_js/components/DFViewerParts/DFWhole.js +0 -17
- package/buckaroo_js/components/DFViewerParts/DFWhole.js.map +0 -1
- package/buckaroo_js/components/DFViewerParts/Displayer.d.ts.map +0 -1
- package/buckaroo_js/components/DFViewerParts/Displayer.js +0 -221
- package/buckaroo_js/components/DFViewerParts/Displayer.js.map +0 -1
- package/buckaroo_js/components/DFViewerParts/HistogramCell.d.ts +0 -20
- package/buckaroo_js/components/DFViewerParts/HistogramCell.d.ts.map +0 -1
- package/buckaroo_js/components/DFViewerParts/HistogramCell.js +0 -184
- package/buckaroo_js/components/DFViewerParts/HistogramCell.js.map +0 -1
- package/buckaroo_js/components/DFViewerParts/SeriesSummaryTooltip.d.ts +0 -5
- package/buckaroo_js/components/DFViewerParts/SeriesSummaryTooltip.d.ts.map +0 -1
- package/buckaroo_js/components/DFViewerParts/SeriesSummaryTooltip.js +0 -18
- package/buckaroo_js/components/DFViewerParts/SeriesSummaryTooltip.js.map +0 -1
- package/buckaroo_js/components/DFViewerParts/gridUtils.d.ts +0 -24
- package/buckaroo_js/components/DFViewerParts/gridUtils.d.ts.map +0 -1
- package/buckaroo_js/components/DFViewerParts/gridUtils.js +0 -230
- package/buckaroo_js/components/DFViewerParts/gridUtils.js.map +0 -1
- package/buckaroo_js/components/DependentTabs.d.ts.map +0 -1
- package/buckaroo_js/components/DependentTabs.js +0 -108
- package/buckaroo_js/components/DependentTabs.js.map +0 -1
- package/buckaroo_js/components/OperationDetail.d.ts.map +0 -1
- package/buckaroo_js/components/OperationDetail.js +0 -144
- package/buckaroo_js/components/OperationDetail.js.map +0 -1
- package/buckaroo_js/components/OperationUtils.d.ts.map +0 -1
- package/buckaroo_js/components/OperationUtils.js +0 -14
- package/buckaroo_js/components/OperationUtils.js.map +0 -1
- package/buckaroo_js/components/Operations.d.ts +0 -24
- package/buckaroo_js/components/Operations.d.ts.map +0 -1
- package/buckaroo_js/components/Operations.js +0 -209
- package/buckaroo_js/components/Operations.js.map +0 -1
- package/buckaroo_js/components/StatusBar.d.ts +0 -12
- package/buckaroo_js/components/StatusBar.d.ts.map +0 -1
- package/buckaroo_js/components/StatusBar.js +0 -155
- package/buckaroo_js/components/StatusBar.js.map +0 -1
- package/buckaroo_js/components/WidgetTypes.d.ts.map +0 -1
- package/buckaroo_js/components/WidgetTypes.js +0 -3
- package/buckaroo_js/components/WidgetTypes.js.map +0 -1
- package/buckaroo_js/components/bakedOperationDefaults.d.ts +0 -5
- package/buckaroo_js/components/bakedOperationDefaults.d.ts.map +0 -1
- package/buckaroo_js/components/bakedOperationDefaults.js +0 -15
- package/buckaroo_js/components/bakedOperationDefaults.js.map +0 -1
- package/buckaroo_js/components/utils.d.ts +0 -294
- package/buckaroo_js/components/utils.d.ts.map +0 -1
- package/buckaroo_js/components/utils.js +0 -143
- package/buckaroo_js/components/utils.js.map +0 -1
- package/buckaroo_js/extension.d.ts +0 -2
- package/buckaroo_js/extension.d.ts.map +0 -1
- package/buckaroo_js/extension.js +0 -20
- package/buckaroo_js/extension.js.map +0 -1
- package/buckaroo_js/index.d.ts +0 -25
- package/buckaroo_js/index.d.ts.map +0 -1
- package/buckaroo_js/index.js +0 -46
- package/buckaroo_js/index.js.map +0 -1
- package/buckaroo_js/vendor/RechartExtra.d.ts +0 -38
- package/buckaroo_js/vendor/RechartExtra.d.ts.map +0 -1
- package/buckaroo_js/vendor/RechartExtra.js +0 -17
- package/buckaroo_js/vendor/RechartExtra.js.map +0 -1
- package/buckaroo_js/vendor/RechartTooltip.d.ts +0 -82
- package/buckaroo_js/vendor/RechartTooltip.d.ts.map +0 -1
- package/buckaroo_js/vendor/RechartTooltip.js +0 -231
- package/buckaroo_js/vendor/RechartTooltip.js.map +0 -1
- package/codecov.yml +0 -16
- package/eslint.config.mjs +0 -88
- package/examples/App.tsx +0 -160
- package/examples/CodeBlock.tsx +0 -27
- package/examples/CodePenButton.tsx +0 -72
- package/examples/ReadmeBlock.tsx +0 -11
- package/examples/app.css +0 -29
- package/examples/ex/ColumnsEditorEx.tsx +0 -5
- package/examples/ex/CommandViewerEx.tsx +0 -18
- package/examples/ex/DFViewerEx.tsx +0 -3
- package/examples/ex/DFViewerEx_large.tsx +0 -266
- package/examples/ex/DFViewerEx_real_summary.tsx +0 -18
- package/examples/ex/DFViewerEx_short_data.tsx +0 -22
- package/examples/ex/DFViewerEx_string_index.tsx +0 -1012
- package/examples/ex/HistogramEx.tsx +0 -66
- package/examples/ex/StatusBarEx.tsx +0 -46
- package/examples/ex/WidgetDCFCellEx.tsx +0 -6
- package/examples/example.css +0 -20
- package/examples/index-iframe.hnottml +0 -24
- package/examples/index-react18.tsx +0 -8
- package/examples/index.html +0 -20
- package/examples/jsx-loader.ts +0 -16
- package/examples/tsconfig.json +0 -31
- package/index.d.ts +0 -2
- package/index.d.ts.map +0 -1
- package/index.js +0 -7
- package/index.js.map +0 -1
- package/jest.config.js +0 -24
- package/screen-animation.gif +0 -0
- package/src/buckaroo_js/baked_data/colorMap.ts +0 -523
- package/src/buckaroo_js/baked_data/staticData.ts +0 -503
- package/src/buckaroo_js/components/ColumnsEditor.tsx +0 -66
- package/src/buckaroo_js/components/CommandUtils.ts +0 -40
- package/src/buckaroo_js/components/DCFCell.tsx +0 -175
- package/src/buckaroo_js/components/DFViewerParts/DFViewer.tsx +0 -215
- package/src/buckaroo_js/components/DFViewerParts/DFWhole.ts +0 -190
- package/src/buckaroo_js/components/DFViewerParts/Displayer.ts +0 -215
- package/src/buckaroo_js/components/DFViewerParts/HistogramCell.tsx +0 -251
- package/src/buckaroo_js/components/DFViewerParts/SeriesSummaryTooltip.tsx +0 -20
- package/src/buckaroo_js/components/DFViewerParts/gridUtils.ts +0 -290
- package/src/buckaroo_js/components/DependentTabs.tsx +0 -134
- package/src/buckaroo_js/components/OperationDetail.tsx +0 -203
- package/src/buckaroo_js/components/OperationUtils.ts +0 -33
- package/src/buckaroo_js/components/Operations.tsx +0 -243
- package/src/buckaroo_js/components/StatusBar.tsx +0 -190
- package/src/buckaroo_js/components/WidgetTypes.tsx +0 -42
- package/src/buckaroo_js/components/bakedOperationDefaults.ts +0 -14
- package/src/buckaroo_js/components/utils.ts +0 -60
- package/src/buckaroo_js/extension.ts +0 -15
- package/src/buckaroo_js/index.ts +0 -34
- package/src/buckaroo_js/style/dcf-npm.css +0 -244
- package/src/buckaroo_js/style/icons/arrow-down-short-dark.svg +0 -4
- package/src/buckaroo_js/style/icons/arrow-down-short.svg +0 -4
- package/src/buckaroo_js/style/icons/arrow-up-short-dark.svg +0 -4
- package/src/buckaroo_js/style/icons/arrow-up-short.svg +0 -4
- package/src/buckaroo_js/style/icons/filter-dark.svg +0 -3
- package/src/buckaroo_js/style/icons/filter.svg +0 -3
- package/src/buckaroo_js/vendor/RechartExtra.ts +0 -60
- package/src/buckaroo_js/vendor/RechartTooltip.tsx +0 -356
- package/src/index.tsx +0 -3
- package/tsconfig.json +0 -41
- package/webpack.config.ts +0 -98
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
.column-list {
|
|
2
|
-
width: 100%;
|
|
3
|
-
font-size: 1rem;
|
|
4
|
-
}
|
|
5
|
-
.column-list dl {
|
|
6
|
-
display: flex;
|
|
7
|
-
margin: 0;
|
|
8
|
-
padding: 0;
|
|
9
|
-
}
|
|
10
|
-
.column-list dl div.list-item {
|
|
11
|
-
padding: 3px;
|
|
12
|
-
}
|
|
13
|
-
.column-list dl div.list-item dt {
|
|
14
|
-
float: left;
|
|
15
|
-
max-width: 90px;
|
|
16
|
-
overflow: hidden;
|
|
17
|
-
max-height: 1rem;
|
|
18
|
-
}
|
|
19
|
-
.column-list dl div.list-item dd {
|
|
20
|
-
float: right;
|
|
21
|
-
}
|
|
22
|
-
.column-list dl div.list-item .column-editor {
|
|
23
|
-
width: 100%;
|
|
24
|
-
clear: both;
|
|
25
|
-
height: 30px;
|
|
26
|
-
}
|
|
27
|
-
.column-list dl div.list-item .column-editor label span {
|
|
28
|
-
float: left;
|
|
29
|
-
}
|
|
30
|
-
.column-list dl div.list-item .column-editor label input[type=checkbox] {
|
|
31
|
-
float: left;
|
|
32
|
-
}
|
|
33
|
-
.dependent-tabs {
|
|
34
|
-
font-size: 1rem;
|
|
35
|
-
}
|
|
36
|
-
.dependent-tabs ul.tabs li {
|
|
37
|
-
float: left;
|
|
38
|
-
background: var(--ag-background-color);
|
|
39
|
-
color: var(--ag-foreground-color);
|
|
40
|
-
border: 1px solid purple;
|
|
41
|
-
border-bottom: none;
|
|
42
|
-
list-style: none;
|
|
43
|
-
margin-right: 5px;
|
|
44
|
-
padding: 2px;
|
|
45
|
-
}
|
|
46
|
-
.dependent-tabs ul.tabs li.active {
|
|
47
|
-
background: var(--ag-range-selection-background-color-3);
|
|
48
|
-
color: var(--ag-alpine-active-color);
|
|
49
|
-
}
|
|
50
|
-
.dependent-tabs .output-area {
|
|
51
|
-
clear: both;
|
|
52
|
-
float: none;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.python-displayer, .command-displayer {
|
|
56
|
-
width: 100%;
|
|
57
|
-
height: 100%;
|
|
58
|
-
background: hsl(0, 0%, 13%);
|
|
59
|
-
overflow: hidden;
|
|
60
|
-
padding: 16px;
|
|
61
|
-
/*border:1px solid red; */
|
|
62
|
-
}
|
|
63
|
-
.python-displayer pre, .command-displayer pre {
|
|
64
|
-
color: #41FF00;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.command-displayer pre {
|
|
68
|
-
overflow: hidden;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.features {
|
|
72
|
-
font-size: 1.7rem;
|
|
73
|
-
}
|
|
74
|
-
.features div {
|
|
75
|
-
padding: 0.5rem;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.modal {
|
|
79
|
-
position: absolute;
|
|
80
|
-
background-color: #ffffff;
|
|
81
|
-
border: 1px solid black;
|
|
82
|
-
padding: 16px;
|
|
83
|
-
list-style: none;
|
|
84
|
-
}
|
|
85
|
-
.modal > li {
|
|
86
|
-
padding: 8px;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.command-viewer {
|
|
90
|
-
border: 1px solid;
|
|
91
|
-
color: black;
|
|
92
|
-
font-size: 1rem;
|
|
93
|
-
}
|
|
94
|
-
.command-viewer .operation-adder {
|
|
95
|
-
clear: both;
|
|
96
|
-
}
|
|
97
|
-
.command-viewer .operation-adder span.column-name {
|
|
98
|
-
float: left;
|
|
99
|
-
display: block;
|
|
100
|
-
color: black;
|
|
101
|
-
}
|
|
102
|
-
.command-viewer .operation-adder fieldset {
|
|
103
|
-
float: left;
|
|
104
|
-
}
|
|
105
|
-
.command-viewer .operations-box {
|
|
106
|
-
clear: left;
|
|
107
|
-
display: flex;
|
|
108
|
-
overflow: auto;
|
|
109
|
-
}
|
|
110
|
-
.command-viewer .operations-box h4 {
|
|
111
|
-
font-size: 1em;
|
|
112
|
-
border: 1px orange;
|
|
113
|
-
color: black;
|
|
114
|
-
}
|
|
115
|
-
.command-viewer .operations-box div {
|
|
116
|
-
overflow-x: scroll;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.operation-detail {
|
|
120
|
-
overflow: auto;
|
|
121
|
-
}
|
|
122
|
-
.operation-detail button {
|
|
123
|
-
float: left;
|
|
124
|
-
}
|
|
125
|
-
.operation-detail .arg-getters button {
|
|
126
|
-
float: left;
|
|
127
|
-
}
|
|
128
|
-
.operation-detail .arg-getters fieldset {
|
|
129
|
-
float: left;
|
|
130
|
-
}
|
|
131
|
-
.operation-detail .arg-getters div.col-enum {
|
|
132
|
-
float: left;
|
|
133
|
-
width: 800px;
|
|
134
|
-
overflow-x: scroll;
|
|
135
|
-
}
|
|
136
|
-
.operation-detail .arg-getters div.col-enum table td, .operation-detail .arg-getters div.col-enum table th {
|
|
137
|
-
border: 1px solid black;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.col-enum table {
|
|
141
|
-
margin-bottom:9px;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.ag-theme-alpine-dark {
|
|
145
|
-
--ag-grid-size:3px;
|
|
146
|
-
--ag-list-item-height: 20px;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
div.dependent-tabs ul.tabs li.active {
|
|
150
|
-
background:rgba(33, 150, 243, 0.49);
|
|
151
|
-
/* border:1px solid red; */
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.ag-row .ag-cell {
|
|
155
|
-
font-family: monospace;
|
|
156
|
-
white-space: pre;
|
|
157
|
-
}
|
|
158
|
-
.left-menu {
|
|
159
|
-
color:black;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.dev-examples .statusBar {
|
|
163
|
-
width:800px; border:3px dashed purple;
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.custom-tooltip {
|
|
172
|
-
color:black;
|
|
173
|
-
background:green;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
.histogram-component {
|
|
178
|
-
margin:0;
|
|
179
|
-
border-left:1px solid #68686e;
|
|
180
|
-
border-right:1px solid #68686e;
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.floating-tooltip {
|
|
186
|
-
color:black;;
|
|
187
|
-
background:white;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
.floating-tooltip dl {
|
|
192
|
-
border:1px solid black;
|
|
193
|
-
padding:1px 4px;
|
|
194
|
-
margin:0;
|
|
195
|
-
display:flow-root;
|
|
196
|
-
}
|
|
197
|
-
.floating-tooltip dl dt {
|
|
198
|
-
font-weight:bold;
|
|
199
|
-
float:left;
|
|
200
|
-
margin:0;
|
|
201
|
-
padding:0;
|
|
202
|
-
|
|
203
|
-
}
|
|
204
|
-
.floating-tooltip dl dd {
|
|
205
|
-
|
|
206
|
-
float:left;
|
|
207
|
-
margin:0 0 0 10px;
|
|
208
|
-
clear:right;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.df-viewer.short-mode .ag-center-cols-viewport {
|
|
212
|
-
/* min-height: unset !important; */
|
|
213
|
-
min-height: 50px;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.df-viewer.in-iframe.short-mode {
|
|
217
|
-
.ag-center-cols-viewport {
|
|
218
|
-
min-height:450px;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
.df-viewer.in-iframe {
|
|
222
|
-
.ag-center-cols-viewport {
|
|
223
|
-
min-height:450px;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
/*
|
|
229
|
-
.df-viewer.short-mode > div {
|
|
230
|
-
|
|
231
|
-
min-height: 100;
|
|
232
|
-
max-height: 800
|
|
233
|
-
}
|
|
234
|
-
*/
|
|
235
|
-
/*# sourceMappingURL=dcf-npm.css.map */
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
.ag-root-wrapper-body .ag-cell-inline-editing {
|
|
239
|
-
/* this is trying to remove the weird styling thing that sometimes happens with the editted cell where the
|
|
240
|
-
edit box moves up and is only half visible */
|
|
241
|
-
|
|
242
|
-
height: 100%;
|
|
243
|
-
|
|
244
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg class="bi bi-arrow-down-short" width="1em" height="1em" viewBox="0 0 20 20" fill="#ffffff" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" d="M6.646 9.646a.5.5 0 01.708 0L10 12.293l2.646-2.647a.5.5 0 01.708.708l-3 3a.5.5 0 01-.708 0l-3-3a.5.5 0 010-.708z" clip-rule="evenodd"/>
|
|
3
|
-
<path fill-rule="evenodd" d="M10 6.5a.5.5 0 01.5.5v5a.5.5 0 01-1 0V7a.5.5 0 01.5-.5z" clip-rule="evenodd"/>
|
|
4
|
-
</svg>
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg class="bi bi-arrow-down-short" width="1em" height="1em" viewBox="0 0 20 20" fill="#000000" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" d="M6.646 9.646a.5.5 0 01.708 0L10 12.293l2.646-2.647a.5.5 0 01.708.708l-3 3a.5.5 0 01-.708 0l-3-3a.5.5 0 010-.708z" clip-rule="evenodd"/>
|
|
3
|
-
<path fill-rule="evenodd" d="M10 6.5a.5.5 0 01.5.5v5a.5.5 0 01-1 0V7a.5.5 0 01.5-.5z" clip-rule="evenodd"/>
|
|
4
|
-
</svg>
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg class="bi bi-arrow-up-short" width="1em" height="1em" viewBox="0 0 20 20" fill="#ffffff" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" d="M10 7.5a.5.5 0 01.5.5v5a.5.5 0 01-1 0V8a.5.5 0 01.5-.5z" clip-rule="evenodd"/>
|
|
3
|
-
<path fill-rule="evenodd" d="M9.646 6.646a.5.5 0 01.708 0l3 3a.5.5 0 01-.708.708L10 7.707l-2.646 2.647a.5.5 0 01-.708-.708l3-3z" clip-rule="evenodd"/>
|
|
4
|
-
</svg>
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg class="bi bi-arrow-up-short" width="1em" height="1em" viewBox="0 0 20 20" fill="#000000" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" d="M10 7.5a.5.5 0 01.5.5v5a.5.5 0 01-1 0V8a.5.5 0 01.5-.5z" clip-rule="evenodd"/>
|
|
3
|
-
<path fill-rule="evenodd" d="M9.646 6.646a.5.5 0 01.708 0l3 3a.5.5 0 01-.708.708L10 7.707l-2.646 2.647a.5.5 0 01-.708-.708l3-3z" clip-rule="evenodd"/>
|
|
4
|
-
</svg>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg class="bi bi-filter" width="1em" height="1em" viewBox="0 0 20 20" fill="#ffffff" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" d="M7.5 13a.5.5 0 01.5-.5h4a.5.5 0 010 1H8a.5.5 0 01-.5-.5zm-2-3a.5.5 0 01.5-.5h8a.5.5 0 010 1H6a.5.5 0 01-.5-.5zm-2-3a.5.5 0 01.5-.5h12a.5.5 0 010 1H4a.5.5 0 01-.5-.5z" clip-rule="evenodd"/>
|
|
3
|
-
</svg>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg class="bi bi-filter" width="1em" height="1em" viewBox="0 0 20 20" fill="#000000" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" d="M7.5 13a.5.5 0 01.5-.5h4a.5.5 0 010 1H8a.5.5 0 01-.5-.5zm-2-3a.5.5 0 01.5-.5h8a.5.5 0 010 1H6a.5.5 0 01-.5-.5zm-2-3a.5.5 0 01.5-.5h12a.5.5 0 010 1H4a.5.5 0 01-.5-.5z" clip-rule="evenodd"/>
|
|
3
|
-
</svg>
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This module contains the standard library from rechart so that base rechart code cna be imported with the minimum amount of rewriting
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import _ from 'lodash';
|
|
6
|
-
import {CSSProperties, ReactNode} from 'react';
|
|
7
|
-
export {Global, DefaultTooltipContent} from 'recharts';
|
|
8
|
-
|
|
9
|
-
//export Global;
|
|
10
|
-
|
|
11
|
-
//import { AnimationDuration, AnimationTiming } from '../util/types';
|
|
12
|
-
/** The type of easing function to use for animations */
|
|
13
|
-
export type AnimationTiming = 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear';
|
|
14
|
-
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
15
|
-
export type AnimationDuration = number;
|
|
16
|
-
|
|
17
|
-
export type TooltipType = 'none';
|
|
18
|
-
export type ValueType = number | string | Array<number | string>;
|
|
19
|
-
export type NameType = number | string;
|
|
20
|
-
|
|
21
|
-
export type Formatter<TValue extends ValueType, TName extends NameType> = (
|
|
22
|
-
value: TValue,
|
|
23
|
-
name: TName,
|
|
24
|
-
item: Payload<TValue, TName>,
|
|
25
|
-
index: number,
|
|
26
|
-
payload: Array<Payload<TValue, TName>>
|
|
27
|
-
) => [React.ReactNode, TName] | React.ReactNode;
|
|
28
|
-
|
|
29
|
-
export interface Payload<TValue extends ValueType, TName extends NameType> {
|
|
30
|
-
type?: TooltipType;
|
|
31
|
-
color?: string;
|
|
32
|
-
formatter?: Formatter<TValue, TName>;
|
|
33
|
-
name?: TName;
|
|
34
|
-
value?: TValue;
|
|
35
|
-
unit?: ReactNode;
|
|
36
|
-
dataKey?: string | number;
|
|
37
|
-
payload?: any;
|
|
38
|
-
chartType?: string;
|
|
39
|
-
stroke?: string;
|
|
40
|
-
strokeDasharray?: string | number;
|
|
41
|
-
strokeWidth?: number | string;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface DefaultProps<TValue extends ValueType, TName extends NameType> {
|
|
45
|
-
separator?: string;
|
|
46
|
-
wrapperClassName?: string;
|
|
47
|
-
labelClassName?: string;
|
|
48
|
-
formatter?: Formatter<TValue, TName>;
|
|
49
|
-
contentStyle?: CSSProperties;
|
|
50
|
-
itemStyle?: CSSProperties;
|
|
51
|
-
labelStyle?: CSSProperties;
|
|
52
|
-
labelFormatter?: (label: any, payload: Array<Payload<TValue, TName>>) => ReactNode;
|
|
53
|
-
label?: any;
|
|
54
|
-
payload?: Array<Payload<TValue, TName>>;
|
|
55
|
-
itemSorter?: (item: Payload<TValue, TName>) => number | string;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export const isNumber = (value: unknown): value is number => _.isNumber(value) && !_.isNaN(value);
|
|
59
|
-
export const isNumOrStr = (value: unknown): value is number | string =>
|
|
60
|
-
isNumber(value as number) || _.isString(value);
|
|
@@ -1,356 +0,0 @@
|
|
|
1
|
-
//@ts-nocheck
|
|
2
|
-
/**
|
|
3
|
-
* Reimplementation of rechart tooltips. most of this is copied from ??? in the recharts source tree because the parts we are editting are deeply embedded into functions.
|
|
4
|
-
|
|
5
|
-
Most of the point of this is to get tooltips to be absolutely positioned off of document.body, not the nearest parent element. AG-Grid hides those tooltips otherwise.
|
|
6
|
-
*/
|
|
7
|
-
import React, {
|
|
8
|
-
CSSProperties,
|
|
9
|
-
ReactNode,
|
|
10
|
-
ReactElement,
|
|
11
|
-
SVGProps,
|
|
12
|
-
useEffect,
|
|
13
|
-
useState,
|
|
14
|
-
useRef,
|
|
15
|
-
useCallback
|
|
16
|
-
} from 'react';
|
|
17
|
-
import _ from 'lodash';
|
|
18
|
-
//import classNames from 'classnames';
|
|
19
|
-
|
|
20
|
-
//import { DefaultTooltipContent, ValueType, NameType, Payload, Props as DefaultProps } from './DefaultTooltipContent';
|
|
21
|
-
|
|
22
|
-
import type {ValueType, NameType, Payload, DefaultProps} from './RechartExtra';
|
|
23
|
-
//import { Global } from '../util/Global';
|
|
24
|
-
//import { isNumber } from '../util/DataUtils';
|
|
25
|
-
import {Global, isNumber} from './RechartExtra';
|
|
26
|
-
|
|
27
|
-
//import { AnimationDuration, AnimationTiming } from '../util/types';
|
|
28
|
-
import {AnimationDuration, AnimationTiming} from './RechartExtra';
|
|
29
|
-
|
|
30
|
-
import {DefaultTooltipContent} from 'recharts';
|
|
31
|
-
|
|
32
|
-
const CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
33
|
-
|
|
34
|
-
const EPS = 1;
|
|
35
|
-
|
|
36
|
-
export type ContentType<TValue extends ValueType, TName extends NameType> =
|
|
37
|
-
| ReactElement
|
|
38
|
-
| ((props: TooltipProps<TValue, TName>) => ReactNode);
|
|
39
|
-
|
|
40
|
-
type UniqueFunc<TValue extends ValueType, TName extends NameType> = (
|
|
41
|
-
entry: Payload<TValue, TName>
|
|
42
|
-
) => unknown;
|
|
43
|
-
type UniqueOption<TValue extends ValueType, TName extends NameType> =
|
|
44
|
-
| boolean
|
|
45
|
-
| UniqueFunc<TValue, TName>;
|
|
46
|
-
function defaultUniqBy<TValue extends ValueType, TName extends NameType>(
|
|
47
|
-
entry: Payload<TValue, TName>
|
|
48
|
-
) {
|
|
49
|
-
return entry.dataKey;
|
|
50
|
-
}
|
|
51
|
-
function getUniqPayload<TValue extends ValueType, TName extends NameType>(
|
|
52
|
-
option: UniqueOption<TValue, TName>,
|
|
53
|
-
payload: Array<Payload<TValue, TName>>
|
|
54
|
-
) {
|
|
55
|
-
if (option === true) {
|
|
56
|
-
//@ts-ignore
|
|
57
|
-
return _.uniqBy(payload, defaultUniqBy);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (_.isFunction(option)) {
|
|
61
|
-
return _.uniqBy(payload, option);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return payload;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function renderContent<TValue extends ValueType, TName extends NameType>(
|
|
68
|
-
content: ContentType<TValue, TName>,
|
|
69
|
-
props: TooltipProps<TValue, TName>
|
|
70
|
-
) {
|
|
71
|
-
if (React.isValidElement(content)) {
|
|
72
|
-
return React.cloneElement(content, props);
|
|
73
|
-
}
|
|
74
|
-
if (_.isFunction(content)) {
|
|
75
|
-
return React.createElement(content as any, props);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return <DefaultTooltipContent {...props} />;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export type OptionalCoords = {
|
|
82
|
-
x?: number;
|
|
83
|
-
y?: number;
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export type TooltipProps<TValue extends ValueType, TName extends NameType> = DefaultProps<
|
|
87
|
-
TValue,
|
|
88
|
-
TName
|
|
89
|
-
> & {
|
|
90
|
-
allowEscapeViewBox?: {
|
|
91
|
-
x?: boolean;
|
|
92
|
-
y?: boolean;
|
|
93
|
-
};
|
|
94
|
-
reverseDirection?: {
|
|
95
|
-
x?: boolean;
|
|
96
|
-
y?: boolean;
|
|
97
|
-
};
|
|
98
|
-
content?: ContentType<TValue, TName>;
|
|
99
|
-
viewBox?: {
|
|
100
|
-
x?: number;
|
|
101
|
-
y?: number;
|
|
102
|
-
width?: number;
|
|
103
|
-
height?: number;
|
|
104
|
-
};
|
|
105
|
-
active?: boolean;
|
|
106
|
-
offset?: number;
|
|
107
|
-
wrapperStyle?: CSSProperties;
|
|
108
|
-
cursor?: boolean | ReactElement | SVGProps<SVGElement>;
|
|
109
|
-
coordinate?: OptionalCoords;
|
|
110
|
-
position?: OptionalCoords;
|
|
111
|
-
trigger?: 'hover' | 'click';
|
|
112
|
-
shared?: boolean;
|
|
113
|
-
payloadUniqBy?: UniqueOption<TValue, TName>;
|
|
114
|
-
isAnimationActive?: boolean;
|
|
115
|
-
animationDuration?: AnimationDuration;
|
|
116
|
-
animationEasing?: AnimationTiming;
|
|
117
|
-
filterNull?: boolean;
|
|
118
|
-
useTranslate3d?: boolean;
|
|
119
|
-
box?: OptionalCoords;
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
const tooltipDefaultProps: TooltipProps<number, string> = {
|
|
123
|
-
active: false,
|
|
124
|
-
allowEscapeViewBox: {x: false, y: false},
|
|
125
|
-
reverseDirection: {x: false, y: false},
|
|
126
|
-
offset: 10,
|
|
127
|
-
viewBox: {x: 0, y: 0, height: 0, width: 0},
|
|
128
|
-
coordinate: {x: 0, y: 0},
|
|
129
|
-
// this doesn't exist on TooltipProps
|
|
130
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
131
|
-
// @ts-ignore
|
|
132
|
-
cursorStyle: {},
|
|
133
|
-
separator: ' : ',
|
|
134
|
-
wrapperStyle: {},
|
|
135
|
-
contentStyle: {},
|
|
136
|
-
itemStyle: {},
|
|
137
|
-
labelStyle: {},
|
|
138
|
-
cursor: true,
|
|
139
|
-
trigger: 'hover',
|
|
140
|
-
isAnimationActive: !Global.isSsr,
|
|
141
|
-
animationEasing: 'ease',
|
|
142
|
-
animationDuration: 400,
|
|
143
|
-
filterNull: true,
|
|
144
|
-
useTranslate3d: false,
|
|
145
|
-
box: {x: 0, y: 0}
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
export const Tooltip = <TValue extends ValueType, TName extends NameType>(
|
|
149
|
-
props: TooltipProps<TValue, TName> & {children?: React.ReactNode}
|
|
150
|
-
) => {
|
|
151
|
-
const [boxWidth, setBoxWidth] = useState(-1);
|
|
152
|
-
const [boxHeight, setBoxHeight] = useState(-1);
|
|
153
|
-
const [dismissed, setDismissed] = useState(false);
|
|
154
|
-
const [dismissedAtCoordinate, setDismissedAtCoordinate] = useState({
|
|
155
|
-
x: 0,
|
|
156
|
-
y: 0
|
|
157
|
-
});
|
|
158
|
-
const [boxCoords, setBoxCoords] = useState({x: 0, y: 0});
|
|
159
|
-
|
|
160
|
-
const wrapperNode = useRef<HTMLDivElement>();
|
|
161
|
-
const {allowEscapeViewBox, reverseDirection, coordinate, offset, position, viewBox} = props;
|
|
162
|
-
|
|
163
|
-
const handleKeyDown = useCallback(
|
|
164
|
-
(event: KeyboardEvent) => {
|
|
165
|
-
if (event.key === 'Escape') {
|
|
166
|
-
setDismissed(true);
|
|
167
|
-
setDismissedAtCoordinate((prev) => ({
|
|
168
|
-
...prev,
|
|
169
|
-
x: coordinate?.x,
|
|
170
|
-
y: coordinate?.y
|
|
171
|
-
}));
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
[coordinate?.x, coordinate?.y]
|
|
175
|
-
);
|
|
176
|
-
|
|
177
|
-
useEffect(() => {
|
|
178
|
-
const updateBBox = () => {
|
|
179
|
-
if (dismissed) {
|
|
180
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
181
|
-
if (
|
|
182
|
-
coordinate?.x !== dismissedAtCoordinate.x ||
|
|
183
|
-
coordinate?.y !== dismissedAtCoordinate.y
|
|
184
|
-
) {
|
|
185
|
-
setDismissed(false);
|
|
186
|
-
}
|
|
187
|
-
} else {
|
|
188
|
-
document.addEventListener('keydown', handleKeyDown);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
192
|
-
const box = wrapperNode.current.getBoundingClientRect();
|
|
193
|
-
setBoxCoords({x: box.x, y: box.y});
|
|
194
|
-
if (
|
|
195
|
-
Math.abs(box.width - boxWidth) > EPS ||
|
|
196
|
-
Math.abs(box.height - boxHeight) > EPS
|
|
197
|
-
) {
|
|
198
|
-
setBoxWidth(box.width);
|
|
199
|
-
setBoxHeight(box.height);
|
|
200
|
-
}
|
|
201
|
-
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
202
|
-
setBoxWidth(-1);
|
|
203
|
-
setBoxHeight(-1);
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
updateBBox();
|
|
208
|
-
|
|
209
|
-
return () => {
|
|
210
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
211
|
-
};
|
|
212
|
-
}, [
|
|
213
|
-
boxHeight,
|
|
214
|
-
boxWidth,
|
|
215
|
-
coordinate,
|
|
216
|
-
dismissed,
|
|
217
|
-
dismissedAtCoordinate.x,
|
|
218
|
-
dismissedAtCoordinate.y,
|
|
219
|
-
handleKeyDown
|
|
220
|
-
]);
|
|
221
|
-
|
|
222
|
-
const getTranslate = ({
|
|
223
|
-
key,
|
|
224
|
-
tooltipDimension,
|
|
225
|
-
viewBoxDimension
|
|
226
|
-
}: {
|
|
227
|
-
key: 'x' | 'y';
|
|
228
|
-
tooltipDimension: number;
|
|
229
|
-
viewBoxDimension: number;
|
|
230
|
-
}) => {
|
|
231
|
-
if (position && isNumber(position[key])) {
|
|
232
|
-
return position[key];
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
const pCoordinate = coordinate || {x: 0, y: 0};
|
|
236
|
-
const negative = (pCoordinate[key] || 0) - tooltipDimension - (offset || 0);
|
|
237
|
-
const positive = (pCoordinate[key] || 0) + offset;
|
|
238
|
-
if (allowEscapeViewBox?.[key]) {
|
|
239
|
-
return reverseDirection[key] ? negative : positive;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
if (reverseDirection?.[key]) {
|
|
243
|
-
const tooltipBoundary = negative;
|
|
244
|
-
const viewBoxBoundary = viewBox[key];
|
|
245
|
-
if (tooltipBoundary < viewBoxBoundary) {
|
|
246
|
-
return Math.max(positive, viewBox[key]);
|
|
247
|
-
}
|
|
248
|
-
return Math.max(negative, viewBox[key]);
|
|
249
|
-
}
|
|
250
|
-
const tooltipBoundary = positive + tooltipDimension;
|
|
251
|
-
const viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
252
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
253
|
-
return Math.max(negative, viewBox[key]);
|
|
254
|
-
}
|
|
255
|
-
return Math.max(positive, viewBox[key]);
|
|
256
|
-
};
|
|
257
|
-
|
|
258
|
-
const {
|
|
259
|
-
payload,
|
|
260
|
-
payloadUniqBy,
|
|
261
|
-
filterNull,
|
|
262
|
-
active,
|
|
263
|
-
wrapperStyle,
|
|
264
|
-
useTranslate3d,
|
|
265
|
-
isAnimationActive,
|
|
266
|
-
animationDuration,
|
|
267
|
-
animationEasing
|
|
268
|
-
} = props;
|
|
269
|
-
const finalPayload = getUniqPayload(
|
|
270
|
-
payloadUniqBy,
|
|
271
|
-
filterNull && payload && payload.length
|
|
272
|
-
? payload.filter((entry) => !_.isNil(entry.value))
|
|
273
|
-
: payload
|
|
274
|
-
);
|
|
275
|
-
const hasPayload = finalPayload && finalPayload.length;
|
|
276
|
-
const {content} = props;
|
|
277
|
-
let outerStyle: CSSProperties = {
|
|
278
|
-
pointerEvents: 'none',
|
|
279
|
-
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
280
|
-
position: 'absolute',
|
|
281
|
-
top: 0,
|
|
282
|
-
left: 0,
|
|
283
|
-
...wrapperStyle
|
|
284
|
-
};
|
|
285
|
-
let translateX, translateY;
|
|
286
|
-
|
|
287
|
-
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
288
|
-
translateX = position.x;
|
|
289
|
-
translateY = position.y;
|
|
290
|
-
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
291
|
-
translateX = getTranslate({
|
|
292
|
-
key: 'x',
|
|
293
|
-
tooltipDimension: boxWidth,
|
|
294
|
-
viewBoxDimension: viewBox.width
|
|
295
|
-
});
|
|
296
|
-
|
|
297
|
-
translateY = getTranslate({
|
|
298
|
-
key: 'y',
|
|
299
|
-
tooltipDimension: boxHeight,
|
|
300
|
-
viewBoxDimension: viewBox.height
|
|
301
|
-
});
|
|
302
|
-
} else {
|
|
303
|
-
outerStyle.visibility = 'hidden';
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
outerStyle = {
|
|
307
|
-
...{
|
|
308
|
-
transform: useTranslate3d
|
|
309
|
-
? `translate3d(${translateX}px, ${translateY}px, 0)`
|
|
310
|
-
: `translate(${translateX}px, ${translateY}px)`
|
|
311
|
-
},
|
|
312
|
-
...outerStyle
|
|
313
|
-
};
|
|
314
|
-
|
|
315
|
-
if (isAnimationActive && active) {
|
|
316
|
-
outerStyle = {
|
|
317
|
-
...{
|
|
318
|
-
transition: `transform ${animationDuration}ms ${animationEasing}`
|
|
319
|
-
},
|
|
320
|
-
...outerStyle
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
// eslint-disable-next-line
|
|
325
|
-
// const cls = classNames(CLS_PREFIX, {
|
|
326
|
-
// [`${CLS_PREFIX}-right`]: isNumber(translateX) && coordinate && isNumber(coordinate.x) && translateX >= coordinate.x,
|
|
327
|
-
// [`${CLS_PREFIX}-left`]: isNumber(translateX) && coordinate && isNumber(coordinate.x) && translateX < coordinate.x,
|
|
328
|
-
// [`${CLS_PREFIX}-bottom`]:
|
|
329
|
-
// isNumber(translateY) && coordinate && isNumber(coordinate.y) && translateY >= coordinate.y,
|
|
330
|
-
// [`${CLS_PREFIX}-top`]: isNumber(translateY) && coordinate && isNumber(coordinate.y) && translateY < coordinate.y,
|
|
331
|
-
// });
|
|
332
|
-
|
|
333
|
-
const cls = `${CLS_PREFIX}-top`;
|
|
334
|
-
return (
|
|
335
|
-
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
336
|
-
// https://github.com/recharts/recharts/pull/2925
|
|
337
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
338
|
-
<div tabIndex={-1} role='dialog' className={cls} style={outerStyle} ref={wrapperNode}>
|
|
339
|
-
{renderContent(content, {
|
|
340
|
-
...props,
|
|
341
|
-
box: boxCoords,
|
|
342
|
-
payload: finalPayload
|
|
343
|
-
})}
|
|
344
|
-
</div>
|
|
345
|
-
);
|
|
346
|
-
};
|
|
347
|
-
|
|
348
|
-
// needs to be set so that renderByOrder can find the correct handler function
|
|
349
|
-
Tooltip.displayName = 'Tooltip';
|
|
350
|
-
|
|
351
|
-
/**
|
|
352
|
-
* needs to be set so that renderByOrder can access an have default values for
|
|
353
|
-
* children.props when there are no props set by the consumer
|
|
354
|
-
* doesn't work if using default parameters
|
|
355
|
-
*/
|
|
356
|
-
Tooltip.defaultProps = tooltipDefaultProps;
|
package/src/index.tsx
DELETED