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,82 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties, ReactNode, ReactElement, SVGProps } from 'react';
|
|
2
|
-
import type { ValueType, NameType, Payload, DefaultProps } from './RechartExtra';
|
|
3
|
-
import { AnimationDuration, AnimationTiming } from './RechartExtra';
|
|
4
|
-
export type ContentType<TValue extends ValueType, TName extends NameType> = ReactElement | ((props: TooltipProps<TValue, TName>) => ReactNode);
|
|
5
|
-
type UniqueFunc<TValue extends ValueType, TName extends NameType> = (entry: Payload<TValue, TName>) => unknown;
|
|
6
|
-
type UniqueOption<TValue extends ValueType, TName extends NameType> = boolean | UniqueFunc<TValue, TName>;
|
|
7
|
-
export type OptionalCoords = {
|
|
8
|
-
x?: number;
|
|
9
|
-
y?: number;
|
|
10
|
-
};
|
|
11
|
-
export type TooltipProps<TValue extends ValueType, TName extends NameType> = DefaultProps<TValue, TName> & {
|
|
12
|
-
allowEscapeViewBox?: {
|
|
13
|
-
x?: boolean;
|
|
14
|
-
y?: boolean;
|
|
15
|
-
};
|
|
16
|
-
reverseDirection?: {
|
|
17
|
-
x?: boolean;
|
|
18
|
-
y?: boolean;
|
|
19
|
-
};
|
|
20
|
-
content?: ContentType<TValue, TName>;
|
|
21
|
-
viewBox?: {
|
|
22
|
-
x?: number;
|
|
23
|
-
y?: number;
|
|
24
|
-
width?: number;
|
|
25
|
-
height?: number;
|
|
26
|
-
};
|
|
27
|
-
active?: boolean;
|
|
28
|
-
offset?: number;
|
|
29
|
-
wrapperStyle?: CSSProperties;
|
|
30
|
-
cursor?: boolean | ReactElement | SVGProps<SVGElement>;
|
|
31
|
-
coordinate?: OptionalCoords;
|
|
32
|
-
position?: OptionalCoords;
|
|
33
|
-
trigger?: 'hover' | 'click';
|
|
34
|
-
shared?: boolean;
|
|
35
|
-
payloadUniqBy?: UniqueOption<TValue, TName>;
|
|
36
|
-
isAnimationActive?: boolean;
|
|
37
|
-
animationDuration?: AnimationDuration;
|
|
38
|
-
animationEasing?: AnimationTiming;
|
|
39
|
-
filterNull?: boolean;
|
|
40
|
-
useTranslate3d?: boolean;
|
|
41
|
-
box?: OptionalCoords;
|
|
42
|
-
};
|
|
43
|
-
export declare const Tooltip: {
|
|
44
|
-
<TValue extends ValueType, TName extends NameType>(props: DefaultProps<TValue, TName> & {
|
|
45
|
-
allowEscapeViewBox?: {
|
|
46
|
-
x?: boolean | undefined;
|
|
47
|
-
y?: boolean | undefined;
|
|
48
|
-
} | undefined;
|
|
49
|
-
reverseDirection?: {
|
|
50
|
-
x?: boolean | undefined;
|
|
51
|
-
y?: boolean | undefined;
|
|
52
|
-
} | undefined;
|
|
53
|
-
content?: ContentType<TValue, TName> | undefined;
|
|
54
|
-
viewBox?: {
|
|
55
|
-
x?: number | undefined;
|
|
56
|
-
y?: number | undefined;
|
|
57
|
-
width?: number | undefined;
|
|
58
|
-
height?: number | undefined;
|
|
59
|
-
} | undefined;
|
|
60
|
-
active?: boolean | undefined;
|
|
61
|
-
offset?: number | undefined;
|
|
62
|
-
wrapperStyle?: React.CSSProperties | undefined;
|
|
63
|
-
cursor?: boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.SVGProps<SVGElement> | undefined;
|
|
64
|
-
coordinate?: OptionalCoords | undefined;
|
|
65
|
-
position?: OptionalCoords | undefined;
|
|
66
|
-
trigger?: "hover" | "click" | undefined;
|
|
67
|
-
shared?: boolean | undefined;
|
|
68
|
-
payloadUniqBy?: UniqueOption<TValue, TName> | undefined;
|
|
69
|
-
isAnimationActive?: boolean | undefined;
|
|
70
|
-
animationDuration?: number | undefined;
|
|
71
|
-
animationEasing?: AnimationTiming | undefined;
|
|
72
|
-
filterNull?: boolean | undefined;
|
|
73
|
-
useTranslate3d?: boolean | undefined;
|
|
74
|
-
box?: OptionalCoords | undefined;
|
|
75
|
-
} & {
|
|
76
|
-
children?: React.ReactNode;
|
|
77
|
-
}): React.JSX.Element;
|
|
78
|
-
displayName: string;
|
|
79
|
-
defaultProps: TooltipProps<number, string>;
|
|
80
|
-
};
|
|
81
|
-
export {};
|
|
82
|
-
//# sourceMappingURL=RechartTooltip.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RechartTooltip.d.ts","sourceRoot":"","sources":["../../src/buckaroo_js/vendor/RechartTooltip.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EACV,aAAa,EACb,SAAS,EACT,YAAY,EACZ,QAAQ,EAKX,MAAM,OAAO,CAAC;AAMf,OAAO,KAAK,EAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAM/E,OAAO,EAAC,iBAAiB,EAAE,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAQlE,MAAM,MAAM,WAAW,CAAC,MAAM,SAAS,SAAS,EAAE,KAAK,SAAS,QAAQ,IAClE,YAAY,GACZ,CAAC,CAAC,KAAK,EAAE,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,SAAS,CAAC,CAAC;AAE1D,KAAK,UAAU,CAAC,MAAM,SAAS,SAAS,EAAE,KAAK,SAAS,QAAQ,IAAI,CAChE,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,KAC5B,OAAO,CAAC;AACb,KAAK,YAAY,CAAC,MAAM,SAAS,SAAS,EAAE,KAAK,SAAS,QAAQ,IAC5D,OAAO,GACP,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAoChC,MAAM,MAAM,cAAc,GAAG;IACzB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,M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CAAC;CACxB,CAAC;AA4BF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBACiC,eAAe;;;;CAqMnE,CAAC"}
|
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
37
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
38
|
-
if (!m) return o;
|
|
39
|
-
var i = m.call(o), r, ar = [], e;
|
|
40
|
-
try {
|
|
41
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
42
|
-
}
|
|
43
|
-
catch (error) { e = { error: error }; }
|
|
44
|
-
finally {
|
|
45
|
-
try {
|
|
46
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
47
|
-
}
|
|
48
|
-
finally { if (e) throw e.error; }
|
|
49
|
-
}
|
|
50
|
-
return ar;
|
|
51
|
-
};
|
|
52
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
53
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
54
|
-
};
|
|
55
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56
|
-
exports.Tooltip = void 0;
|
|
57
|
-
var react_1 = __importStar(require("react"));
|
|
58
|
-
var lodash_1 = __importDefault(require("lodash"));
|
|
59
|
-
var RechartExtra_1 = require("./RechartExtra");
|
|
60
|
-
var recharts_1 = require("recharts");
|
|
61
|
-
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
62
|
-
var EPS = 1;
|
|
63
|
-
function defaultUniqBy(entry) {
|
|
64
|
-
return entry.dataKey;
|
|
65
|
-
}
|
|
66
|
-
function getUniqPayload(option, payload) {
|
|
67
|
-
if (option === true) {
|
|
68
|
-
return lodash_1.default.uniqBy(payload, defaultUniqBy);
|
|
69
|
-
}
|
|
70
|
-
if (lodash_1.default.isFunction(option)) {
|
|
71
|
-
return lodash_1.default.uniqBy(payload, option);
|
|
72
|
-
}
|
|
73
|
-
return payload;
|
|
74
|
-
}
|
|
75
|
-
function renderContent(content, props) {
|
|
76
|
-
if (react_1.default.isValidElement(content)) {
|
|
77
|
-
return react_1.default.cloneElement(content, props);
|
|
78
|
-
}
|
|
79
|
-
if (lodash_1.default.isFunction(content)) {
|
|
80
|
-
return react_1.default.createElement(content, props);
|
|
81
|
-
}
|
|
82
|
-
return react_1.default.createElement(recharts_1.DefaultTooltipContent, __assign({}, props));
|
|
83
|
-
}
|
|
84
|
-
var tooltipDefaultProps = {
|
|
85
|
-
active: false,
|
|
86
|
-
allowEscapeViewBox: { x: false, y: false },
|
|
87
|
-
reverseDirection: { x: false, y: false },
|
|
88
|
-
offset: 10,
|
|
89
|
-
viewBox: { x: 0, y: 0, height: 0, width: 0 },
|
|
90
|
-
coordinate: { x: 0, y: 0 },
|
|
91
|
-
cursorStyle: {},
|
|
92
|
-
separator: ' : ',
|
|
93
|
-
wrapperStyle: {},
|
|
94
|
-
contentStyle: {},
|
|
95
|
-
itemStyle: {},
|
|
96
|
-
labelStyle: {},
|
|
97
|
-
cursor: true,
|
|
98
|
-
trigger: 'hover',
|
|
99
|
-
isAnimationActive: !RechartExtra_1.Global.isSsr,
|
|
100
|
-
animationEasing: 'ease',
|
|
101
|
-
animationDuration: 400,
|
|
102
|
-
filterNull: true,
|
|
103
|
-
useTranslate3d: false,
|
|
104
|
-
box: { x: 0, y: 0 }
|
|
105
|
-
};
|
|
106
|
-
var Tooltip = function (props) {
|
|
107
|
-
var _a = __read((0, react_1.useState)(-1), 2), boxWidth = _a[0], setBoxWidth = _a[1];
|
|
108
|
-
var _b = __read((0, react_1.useState)(-1), 2), boxHeight = _b[0], setBoxHeight = _b[1];
|
|
109
|
-
var _c = __read((0, react_1.useState)(false), 2), dismissed = _c[0], setDismissed = _c[1];
|
|
110
|
-
var _d = __read((0, react_1.useState)({
|
|
111
|
-
x: 0,
|
|
112
|
-
y: 0
|
|
113
|
-
}), 2), dismissedAtCoordinate = _d[0], setDismissedAtCoordinate = _d[1];
|
|
114
|
-
var _e = __read((0, react_1.useState)({ x: 0, y: 0 }), 2), boxCoords = _e[0], setBoxCoords = _e[1];
|
|
115
|
-
var wrapperNode = (0, react_1.useRef)();
|
|
116
|
-
var allowEscapeViewBox = props.allowEscapeViewBox, reverseDirection = props.reverseDirection, coordinate = props.coordinate, offset = props.offset, position = props.position, viewBox = props.viewBox;
|
|
117
|
-
var handleKeyDown = (0, react_1.useCallback)(function (event) {
|
|
118
|
-
if (event.key === 'Escape') {
|
|
119
|
-
setDismissed(true);
|
|
120
|
-
setDismissedAtCoordinate(function (prev) { return (__assign(__assign({}, prev), { x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y })); });
|
|
121
|
-
}
|
|
122
|
-
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
123
|
-
(0, react_1.useEffect)(function () {
|
|
124
|
-
var updateBBox = function () {
|
|
125
|
-
if (dismissed) {
|
|
126
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
127
|
-
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x ||
|
|
128
|
-
(coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
129
|
-
setDismissed(false);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
document.addEventListener('keydown', handleKeyDown);
|
|
134
|
-
}
|
|
135
|
-
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
136
|
-
var box = wrapperNode.current.getBoundingClientRect();
|
|
137
|
-
setBoxCoords({ x: box.x, y: box.y });
|
|
138
|
-
if (Math.abs(box.width - boxWidth) > EPS ||
|
|
139
|
-
Math.abs(box.height - boxHeight) > EPS) {
|
|
140
|
-
setBoxWidth(box.width);
|
|
141
|
-
setBoxHeight(box.height);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
145
|
-
setBoxWidth(-1);
|
|
146
|
-
setBoxHeight(-1);
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
updateBBox();
|
|
150
|
-
return function () {
|
|
151
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
152
|
-
};
|
|
153
|
-
}, [
|
|
154
|
-
boxHeight,
|
|
155
|
-
boxWidth,
|
|
156
|
-
coordinate,
|
|
157
|
-
dismissed,
|
|
158
|
-
dismissedAtCoordinate.x,
|
|
159
|
-
dismissedAtCoordinate.y,
|
|
160
|
-
handleKeyDown
|
|
161
|
-
]);
|
|
162
|
-
var getTranslate = function (_a) {
|
|
163
|
-
var key = _a.key, tooltipDimension = _a.tooltipDimension, viewBoxDimension = _a.viewBoxDimension;
|
|
164
|
-
if (position && (0, RechartExtra_1.isNumber)(position[key])) {
|
|
165
|
-
return position[key];
|
|
166
|
-
}
|
|
167
|
-
var pCoordinate = coordinate || { x: 0, y: 0 };
|
|
168
|
-
var negative = (pCoordinate[key] || 0) - tooltipDimension - (offset || 0);
|
|
169
|
-
var positive = (pCoordinate[key] || 0) + offset;
|
|
170
|
-
if (allowEscapeViewBox === null || allowEscapeViewBox === void 0 ? void 0 : allowEscapeViewBox[key]) {
|
|
171
|
-
return reverseDirection[key] ? negative : positive;
|
|
172
|
-
}
|
|
173
|
-
if (reverseDirection === null || reverseDirection === void 0 ? void 0 : reverseDirection[key]) {
|
|
174
|
-
var tooltipBoundary_1 = negative;
|
|
175
|
-
var viewBoxBoundary_1 = viewBox[key];
|
|
176
|
-
if (tooltipBoundary_1 < viewBoxBoundary_1) {
|
|
177
|
-
return Math.max(positive, viewBox[key]);
|
|
178
|
-
}
|
|
179
|
-
return Math.max(negative, viewBox[key]);
|
|
180
|
-
}
|
|
181
|
-
var tooltipBoundary = positive + tooltipDimension;
|
|
182
|
-
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
183
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
184
|
-
return Math.max(negative, viewBox[key]);
|
|
185
|
-
}
|
|
186
|
-
return Math.max(positive, viewBox[key]);
|
|
187
|
-
};
|
|
188
|
-
var payload = props.payload, payloadUniqBy = props.payloadUniqBy, filterNull = props.filterNull, active = props.active, wrapperStyle = props.wrapperStyle, useTranslate3d = props.useTranslate3d, isAnimationActive = props.isAnimationActive, animationDuration = props.animationDuration, animationEasing = props.animationEasing;
|
|
189
|
-
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length
|
|
190
|
-
? payload.filter(function (entry) { return !lodash_1.default.isNil(entry.value); })
|
|
191
|
-
: payload);
|
|
192
|
-
var hasPayload = finalPayload && finalPayload.length;
|
|
193
|
-
var content = props.content;
|
|
194
|
-
var outerStyle = __assign({ pointerEvents: 'none', visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden', position: 'absolute', top: 0, left: 0 }, wrapperStyle);
|
|
195
|
-
var translateX, translateY;
|
|
196
|
-
if (position && (0, RechartExtra_1.isNumber)(position.x) && (0, RechartExtra_1.isNumber)(position.y)) {
|
|
197
|
-
translateX = position.x;
|
|
198
|
-
translateY = position.y;
|
|
199
|
-
}
|
|
200
|
-
else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
201
|
-
translateX = getTranslate({
|
|
202
|
-
key: 'x',
|
|
203
|
-
tooltipDimension: boxWidth,
|
|
204
|
-
viewBoxDimension: viewBox.width
|
|
205
|
-
});
|
|
206
|
-
translateY = getTranslate({
|
|
207
|
-
key: 'y',
|
|
208
|
-
tooltipDimension: boxHeight,
|
|
209
|
-
viewBoxDimension: viewBox.height
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
else {
|
|
213
|
-
outerStyle.visibility = 'hidden';
|
|
214
|
-
}
|
|
215
|
-
outerStyle = __assign({
|
|
216
|
-
transform: useTranslate3d
|
|
217
|
-
? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)")
|
|
218
|
-
: "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
219
|
-
}, outerStyle);
|
|
220
|
-
if (isAnimationActive && active) {
|
|
221
|
-
outerStyle = __assign({
|
|
222
|
-
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
223
|
-
}, outerStyle);
|
|
224
|
-
}
|
|
225
|
-
var cls = "".concat(CLS_PREFIX, "-top");
|
|
226
|
-
return (react_1.default.createElement("div", { tabIndex: -1, role: 'dialog', className: cls, style: outerStyle, ref: wrapperNode }, renderContent(content, __assign(__assign({}, props), { box: boxCoords, payload: finalPayload }))));
|
|
227
|
-
};
|
|
228
|
-
exports.Tooltip = Tooltip;
|
|
229
|
-
exports.Tooltip.displayName = 'Tooltip';
|
|
230
|
-
exports.Tooltip.defaultProps = tooltipDefaultProps;
|
|
231
|
-
//# sourceMappingURL=RechartTooltip.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RechartTooltip.js","sourceRoot":"","sources":["../../src/buckaroo_js/vendor/RechartTooltip.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,6CASe;AACf,kDAAuB;AAQvB,+CAAgD;AAKhD,qCAA+C;AAE/C,IAAM,UAAU,GAAG,0BAA0B,CAAC;AAE9C,IAAM,GAAG,GAAG,CAAC,CAAC;AAYd,SAAS,aAAa,CAClB,KAA6B;IAE7B,OAAO,KAAK,CAAC,OAAO,CAAC;AACzB,CAAC;AACD,SAAS,cAAc,CACnB,MAAmC,EACnC,OAAsC;IAEtC,IAAI,MAAM,KAAK,IAAI,EAAE;QAEjB,OAAO,gBAAC,CAAC,MAAM,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;KAC3C;IAED,IAAI,gBAAC,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;QACtB,OAAO,gBAAC,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;KACpC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC;AAED,SAAS,aAAa,CAClB,OAAmC,EACnC,KAAkC;IAElC,IAAI,eAAK,CAAC,cAAc,CAAC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,uCAAK,QAAQ,EAAE,CAAC,CAAC,EAAE,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,WAAW,IAC/E,aAAa,CAAC,OAAO,wBACf,KAAK,KACR,GAAG,EAAE,SAAS,EACd,OAAO,EAAE,YAAY,IACvB,CACA,CACT,CAAC;AACN,CAAC,CAAC;AAtMW,QAAA,OAAO,WAsMlB;AAGF,eAAO,CAAC,WAAW,GAAG,SAAS,CAAC;AAOhC,eAAO,CAAC,YAAY,GAAG,mBAAmB,CAAC"}
|
package/codecov.yml
DELETED
package/eslint.config.mjs
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import typescriptEslint from "@typescript-eslint/eslint-plugin";
|
|
2
|
-
import react from "eslint-plugin-react";
|
|
3
|
-
import reactHooks from "eslint-plugin-react-hooks";
|
|
4
|
-
import _import from "eslint-plugin-import";
|
|
5
|
-
import prettier from "eslint-plugin-prettier";
|
|
6
|
-
import { fixupPluginRules } from "@eslint/compat";
|
|
7
|
-
import globals from "globals";
|
|
8
|
-
import tsParser from "@typescript-eslint/parser";
|
|
9
|
-
import path from "node:path";
|
|
10
|
-
import { fileURLToPath } from "node:url";
|
|
11
|
-
import js from "@eslint/js";
|
|
12
|
-
import { FlatCompat } from "@eslint/eslintrc";
|
|
13
|
-
|
|
14
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
15
|
-
const __dirname = path.dirname(__filename);
|
|
16
|
-
const compat = new FlatCompat({
|
|
17
|
-
baseDirectory: __dirname,
|
|
18
|
-
recommendedConfig: js.configs.recommended,
|
|
19
|
-
allConfig: js.configs.all
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
export default [{
|
|
23
|
-
ignores: ["**/webpack.config.ts", "**/jest.config.js"],
|
|
24
|
-
}, ...compat.extends(
|
|
25
|
-
"plugin:@typescript-eslint/recommended",
|
|
26
|
-
"plugin:react/recommended",
|
|
27
|
-
"plugin:prettier/recommended",
|
|
28
|
-
), {
|
|
29
|
-
plugins: {
|
|
30
|
-
"@typescript-eslint": typescriptEslint,
|
|
31
|
-
react,
|
|
32
|
-
"react-hooks": fixupPluginRules(reactHooks),
|
|
33
|
-
import: fixupPluginRules(_import),
|
|
34
|
-
prettier,
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
languageOptions: {
|
|
38
|
-
globals: {
|
|
39
|
-
...globals.browser,
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
parser: tsParser,
|
|
43
|
-
ecmaVersion: 2020,
|
|
44
|
-
sourceType: "module",
|
|
45
|
-
|
|
46
|
-
parserOptions: {
|
|
47
|
-
project: ["tsconfig.json", "examples/tsconfig.json", "test/tsconfig.json"],
|
|
48
|
-
|
|
49
|
-
ecmaFeatures: {
|
|
50
|
-
jsx: true,
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
settings: {
|
|
56
|
-
react: {
|
|
57
|
-
version: "detect",
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
rules: {
|
|
62
|
-
"@typescript-eslint/explicit-function-return-type": "off",
|
|
63
|
-
"@typescript-eslint/no-unused-vars": "off",
|
|
64
|
-
"@typescript-eslint/no-non-null-assertion": "off",
|
|
65
|
-
"@typescript-eslint/no-non-null-asserted-optional-chain": "off",
|
|
66
|
-
|
|
67
|
-
"react/jsx-filename-extension": ["warn", {
|
|
68
|
-
extensions: [".jsx", ".tsx"],
|
|
69
|
-
}],
|
|
70
|
-
|
|
71
|
-
"react/prop-types": "off",
|
|
72
|
-
"react-hooks/rules-of-hooks": "error",
|
|
73
|
-
"react-hooks/exhaustive-deps": "warn",
|
|
74
|
-
"no-console": "warn",
|
|
75
|
-
|
|
76
|
-
quotes: [2, "single", {
|
|
77
|
-
avoidEscape: true,
|
|
78
|
-
}],
|
|
79
|
-
|
|
80
|
-
"react/jsx-key": "off",
|
|
81
|
-
},
|
|
82
|
-
}, {
|
|
83
|
-
files: ["examples/ex/*.tsx"],
|
|
84
|
-
|
|
85
|
-
rules: {
|
|
86
|
-
"no-console": "off",
|
|
87
|
-
},
|
|
88
|
-
}];
|
package/examples/App.tsx
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import {HashRouter as Router, Route, Link} from 'react-router-dom';
|
|
4
|
-
import {Button} from 'react-bootstrap';
|
|
5
|
-
|
|
6
|
-
import './app.css';
|
|
7
|
-
|
|
8
|
-
const examples = {
|
|
9
|
-
|
|
10
|
-
WidgetDCFCellEx: {
|
|
11
|
-
title: 'WigetDCFCell',
|
|
12
|
-
file: 'WidgetDCFCellEx',
|
|
13
|
-
layout: 'HBox',
|
|
14
|
-
},
|
|
15
|
-
ColumnsEditorEx: {
|
|
16
|
-
title: 'ColumnsEditor',
|
|
17
|
-
file: 'ColumnsEditorEx',
|
|
18
|
-
layout: 'HBox',
|
|
19
|
-
},
|
|
20
|
-
CommandViewerEx: {
|
|
21
|
-
title: 'CommandViewer',
|
|
22
|
-
file: 'CommandViewerEx',
|
|
23
|
-
layout: 'HBox',
|
|
24
|
-
},
|
|
25
|
-
DFViewerEx: { title: 'DFViewer', file: 'DFViewerEx', layout: 'HBox' },
|
|
26
|
-
DFViewerEx_string_index: {
|
|
27
|
-
title: 'DFViewer string index',
|
|
28
|
-
file: 'DFViewerEx_string_index',
|
|
29
|
-
layout: 'HBox',
|
|
30
|
-
},
|
|
31
|
-
DFViewerEx_large: {
|
|
32
|
-
title: 'DFViewer large',
|
|
33
|
-
file: 'DFViewerEx_large',
|
|
34
|
-
layout: 'HBox',
|
|
35
|
-
},
|
|
36
|
-
DFViewerEx_real_summary: {
|
|
37
|
-
title: 'DFViewer summary',
|
|
38
|
-
file: 'DFViewerEx_real_summary',
|
|
39
|
-
layout: 'HBox',
|
|
40
|
-
},
|
|
41
|
-
DFViewerEx_short_data: {
|
|
42
|
-
title: 'DFViewer short_data',
|
|
43
|
-
file: 'DFViewerEx_short_data',
|
|
44
|
-
layout: 'HBox',
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
StatusBarEx: { title: 'StatusBar', file: 'StatusBarEx', layout: 'VBox' },
|
|
48
|
-
HistogramEx: { title: 'Histogram', file: 'HistogramEx', layout: 'HBox' },
|
|
49
|
-
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
// The examples use a code-loading technique that I have described in
|
|
53
|
-
// https://mmomtchev.medium.com/making-examples-displaying-code-along-its-output-with-webpack-a28dcf5439c6
|
|
54
|
-
|
|
55
|
-
const ReadmeBlock = React.lazy(() => import(/* webpackPrefetch: true */ './ReadmeBlock'));
|
|
56
|
-
const CodeBlock = React.lazy(() => import(/* webpackPrefetch: true */ './CodeBlock'));
|
|
57
|
-
|
|
58
|
-
for (const ex of Object.keys(examples)) {
|
|
59
|
-
examples[ex].comp = React.lazy(
|
|
60
|
-
() => import(/* webpackPrefetch: true */ `./ex/${examples[ex].file}.tsx`)
|
|
61
|
-
);
|
|
62
|
-
examples[ex].code = import(
|
|
63
|
-
/* webpackPrefetch: true */ `!!html-loader?{"minimize":false}!./jsx-loader.ts!./ex/${examples[ex].file}.tsx`
|
|
64
|
-
).then((code) => code.default);
|
|
65
|
-
examples[ex].text = import(
|
|
66
|
-
/* webpackPrefetch: true */ `!!raw-loader!./ex/${examples[ex].file}.tsx`
|
|
67
|
-
).then((text) => text.default);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
const LeftMenuItem = (props): JSX.Element => (
|
|
71
|
-
<Link to={props.id}>
|
|
72
|
-
<Button className='w-100' variant='light'>
|
|
73
|
-
{props.title}
|
|
74
|
-
</Button>
|
|
75
|
-
</Link>
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
// eslint-disable-next-line no-var
|
|
79
|
-
declare var VERSION: string;
|
|
80
|
-
|
|
81
|
-
// eslint-disable-next-line no-var
|
|
82
|
-
//declare var VERSION: string = "handwritten";
|
|
83
|
-
|
|
84
|
-
const RenderEl = (ex: any): JSX.Element => {
|
|
85
|
-
if (ex.layout === 'HBox') {
|
|
86
|
-
return (
|
|
87
|
-
<div className="row">
|
|
88
|
-
<div className="col-12 col-xl-5 mb-1">
|
|
89
|
-
<React.Suspense fallback={<div>Loading component...</div>}>
|
|
90
|
-
<div className="component-example">
|
|
91
|
-
<h2> Component example </h2>
|
|
92
|
-
{React.createElement(ex.comp)}
|
|
93
|
-
</div>
|
|
94
|
-
</React.Suspense>
|
|
95
|
-
</div>
|
|
96
|
-
<div className="col-12 col-xl-7">
|
|
97
|
-
<React.Suspense fallback={<div>Parsing code...</div>}>
|
|
98
|
-
<CodeBlock title={ex.title} code={ex.code} text={ex.text} />
|
|
99
|
-
</React.Suspense>
|
|
100
|
-
</div>
|
|
101
|
-
</div>
|
|
102
|
-
);
|
|
103
|
-
} else {
|
|
104
|
-
return (
|
|
105
|
-
<div className="row">
|
|
106
|
-
<div className="row">
|
|
107
|
-
<React.Suspense fallback={<div>Loading component...</div>}>
|
|
108
|
-
<div className="component-example">
|
|
109
|
-
<h2> Component example </h2>
|
|
110
|
-
{React.createElement(ex.comp)}
|
|
111
|
-
</div>
|
|
112
|
-
</React.Suspense>
|
|
113
|
-
</div>
|
|
114
|
-
<div className="row">
|
|
115
|
-
<React.Suspense fallback={<div>Parsing code...</div>}>
|
|
116
|
-
<CodeBlock title={ex.title} code={ex.code} text={ex.text} />
|
|
117
|
-
</React.Suspense>
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
const App = (): JSX.Element => {
|
|
125
|
-
const [jsText, setJSText] = React.useState<string>('');
|
|
126
|
-
|
|
127
|
-
return (
|
|
128
|
-
<Router>
|
|
129
|
-
<h1 className='m-2'>
|
|
130
|
-
<strong>react-edit-list {VERSION} Examples</strong>
|
|
131
|
-
</h1>
|
|
132
|
-
<div className='d-flex flex-row p-3'>
|
|
133
|
-
<div className='d-flex flex-column left-menu me-2'>
|
|
134
|
-
<LeftMenuItem id={''} title={'Home'} />
|
|
135
|
-
{Object.keys(examples).map((e) => (
|
|
136
|
-
<LeftMenuItem key={e} id={e} title={examples[e].title} />
|
|
137
|
-
))}
|
|
138
|
-
</div>
|
|
139
|
-
<div className='d-flex flex-column w-100 overflow-hidden'>
|
|
140
|
-
<div className='fluid-container'>
|
|
141
|
-
<Route exact path='/'>
|
|
142
|
-
<div className='ml-2'>
|
|
143
|
-
<React.Suspense fallback={<div>Loading...</div>}>
|
|
144
|
-
<ReadmeBlock />
|
|
145
|
-
</React.Suspense>
|
|
146
|
-
</div>
|
|
147
|
-
</Route>
|
|
148
|
-
{Object.keys(examples).map((e) => (
|
|
149
|
-
<Route key={e} path={`/${e}`}>
|
|
150
|
-
{RenderEl(examples[e])}
|
|
151
|
-
</Route>
|
|
152
|
-
))}
|
|
153
|
-
</div>
|
|
154
|
-
</div>
|
|
155
|
-
</div>
|
|
156
|
-
</Router>
|
|
157
|
-
);
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
export default App;
|
package/examples/CodeBlock.tsx
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import CodePenButton from './CodePenButton';
|
|
3
|
-
import 'prism-themes/themes/prism-vsc-dark-plus.css';
|
|
4
|
-
|
|
5
|
-
// This is expensive to render
|
|
6
|
-
const CodeBlock = React.memo(function CodeBlockRaw(props: {
|
|
7
|
-
title: string;
|
|
8
|
-
code: Promise<string>;
|
|
9
|
-
text: Promise<string>;
|
|
10
|
-
}) {
|
|
11
|
-
const [code, setCode] = React.useState('loading()');
|
|
12
|
-
React.useEffect(() => {
|
|
13
|
-
props.code.then((r) => setCode(r));
|
|
14
|
-
}, [props.code, props.text]);
|
|
15
|
-
return (
|
|
16
|
-
<div className='position-relative'>
|
|
17
|
-
<CodePenButton title={props.title} text={props.text} />
|
|
18
|
-
<div className='codeblock'>
|
|
19
|
-
<pre className='p-2' style={{backgroundColor: 'rgb(43, 43, 43)', fontSize: '16px'}}>
|
|
20
|
-
<code className='language-tsx' dangerouslySetInnerHTML={{__html: code}} />
|
|
21
|
-
</pre>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
);
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
export default CodeBlock;
|