hiplot-mm 0.0.1__py3-none-any.whl → 0.0.3rc0__py3-none-any.whl

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 (58) hide show
  1. hiplot/ipython.py +38 -6
  2. hiplot/pkginfo.py +18 -2
  3. hiplot/server.py +8 -2
  4. hiplot/static/built/hiplot.bundle.js +1 -1
  5. hiplot/static/built/streamlit_component/hiplot_streamlit.bundle.js +1 -1
  6. hiplot/streamlit_helpers.py +11 -2
  7. {hiplot_mm-0.0.1.dist-info → hiplot_mm-0.0.3rc0.dist-info}/METADATA +51 -27
  8. hiplot_mm-0.0.3rc0.dist-info/RECORD +33 -0
  9. {hiplot_mm-0.0.1.dist-info → hiplot_mm-0.0.3rc0.dist-info}/WHEEL +1 -1
  10. {hiplot_mm-0.0.1.dist-info → hiplot_mm-0.0.3rc0.dist-info}/entry_points.txt +0 -1
  11. hiplot/static/built/component.d.ts +0 -109
  12. hiplot/static/built/component.js +0 -528
  13. hiplot/static/built/contextmenu.d.ts +0 -26
  14. hiplot/static/built/contextmenu.js +0 -90
  15. hiplot/static/built/controls.d.ts +0 -52
  16. hiplot/static/built/controls.js +0 -163
  17. hiplot/static/built/filters.d.ts +0 -21
  18. hiplot/static/built/filters.js +0 -96
  19. hiplot/static/built/header.d.ts +0 -39
  20. hiplot/static/built/header.js +0 -176
  21. hiplot/static/built/hiplot-mm-0.0.0.tar.gz +0 -0
  22. hiplot/static/built/hiplot.bundle.js.LICENSE.txt +0 -88
  23. hiplot/static/built/hiplot.bundle.js.map +0 -1
  24. hiplot/static/built/hiplot.d.ts +0 -8
  25. hiplot/static/built/hiplot.js +0 -14
  26. hiplot/static/built/hiplot.lib.js +0 -57712
  27. hiplot/static/built/hiplot.lib.js.map +0 -1
  28. hiplot/static/built/hiplot.licenses.txt +0 -682
  29. hiplot/static/built/hiplot_mm-0.0.0-py3-none-any.whl +0 -0
  30. hiplot/static/built/hiplot_streamlit.bundle.js +0 -3
  31. hiplot/static/built/hiplot_streamlit.bundle.js.LICENSE.txt +0 -97
  32. hiplot/static/built/hiplot_streamlit.bundle.js.map +0 -1
  33. hiplot/static/built/hiplot_streamlit.d.ts +0 -1
  34. hiplot/static/built/hiplot_streamlit.js +0 -85
  35. hiplot/static/built/hiplot_streamlit.licenses.txt +0 -689
  36. hiplot/static/built/hiplot_test.bundle.js +0 -3
  37. hiplot/static/built/hiplot_test.bundle.js.LICENSE.txt +0 -88
  38. hiplot/static/built/hiplot_test.bundle.js.map +0 -1
  39. hiplot/static/built/hiplot_test.d.ts +0 -46
  40. hiplot/static/built/hiplot_test.js +0 -238
  41. hiplot/static/built/hiplot_test.licenses.txt +0 -682
  42. hiplot/static/built/hiplot_web.d.ts +0 -3
  43. hiplot/static/built/hiplot_web.js +0 -54
  44. hiplot/static/built/infertypes.d.ts +0 -38
  45. hiplot/static/built/infertypes.js +0 -316
  46. hiplot/static/built/plotxy.d.ts +0 -62
  47. hiplot/static/built/plotxy.js +0 -602
  48. hiplot/static/built/plugin.d.ts +0 -38
  49. hiplot/static/built/plugin.js +0 -8
  50. hiplot/static/built/rowsdisplaytable.d.ts +0 -35
  51. hiplot/static/built/rowsdisplaytable.js +0 -284
  52. hiplot/static/built/streamlit_component/hiplot.bundle.js +0 -3
  53. hiplot/static/built/types.d.ts +0 -64
  54. hiplot/static/built/types.js +0 -55
  55. hiplot_mm-0.0.1.dist-info/RECORD +0 -77
  56. {hiplot_mm-0.0.1.dist-info → hiplot_mm-0.0.3rc0.dist-info/licenses}/LICENSE +0 -0
  57. {hiplot_mm-0.0.1.dist-info → hiplot_mm-0.0.3rc0.dist-info/licenses}/NOTICE +0 -0
  58. {hiplot_mm-0.0.1.dist-info → hiplot_mm-0.0.3rc0.dist-info}/top_level.txt +0 -0
@@ -1,52 +0,0 @@
1
- import React from "react";
2
- import { IDatasets } from "./types";
3
- export interface HiPlotDataControlProps extends IDatasets {
4
- restoreAllRows: () => void;
5
- filterRows: (keep: boolean) => void;
6
- }
7
- interface HiPlotDataControlState {
8
- btnEnabled: boolean;
9
- }
10
- export declare class KeepOrExcludeDataBtn extends React.Component<HiPlotDataControlProps, HiPlotDataControlState> {
11
- btnRef: React.RefObject<HTMLButtonElement>;
12
- keep: boolean;
13
- title: string;
14
- label: string;
15
- style: string;
16
- constructor(props: HiPlotDataControlProps);
17
- btnEnabled(): boolean;
18
- componentDidUpdate(): void;
19
- onClick(): void;
20
- render(): JSX.Element;
21
- }
22
- export declare class KeepDataBtn extends KeepOrExcludeDataBtn {
23
- keep: boolean;
24
- title: string;
25
- label: string;
26
- style: string;
27
- }
28
- export declare class ExcludeDataBtn extends KeepOrExcludeDataBtn {
29
- keep: boolean;
30
- title: string;
31
- label: string;
32
- style: string;
33
- }
34
- export declare class ExportDataCSVBtn extends React.Component<HiPlotDataControlProps, HiPlotDataControlState> {
35
- onClick(): void;
36
- render(): JSX.Element;
37
- }
38
- export declare class RestoreDataBtn extends React.Component<HiPlotDataControlProps, HiPlotDataControlState> {
39
- constructor(props: HiPlotDataControlProps);
40
- btnEnabled(): boolean;
41
- componentDidUpdate(): void;
42
- onClick(): void;
43
- render(): JSX.Element;
44
- }
45
- export declare class SelectedCountProgressBar extends React.Component<HiPlotDataControlProps, HiPlotDataControlState> {
46
- selectedBar: React.RefObject<HTMLDivElement>;
47
- componentDidMount(): void;
48
- componentDidUpdate(): void;
49
- updateBarWidth(): void;
50
- render(): JSX.Element;
51
- }
52
- export {};
@@ -1,163 +0,0 @@
1
- /*
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
- var __extends = (this && this.__extends) || (function () {
8
- var extendStatics = function (d, b) {
9
- extendStatics = Object.setPrototypeOf ||
10
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
12
- return extendStatics(d, b);
13
- };
14
- return function (d, b) {
15
- extendStatics(d, b);
16
- function __() { this.constructor = d; }
17
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18
- };
19
- })();
20
- import * as d3 from "d3";
21
- import React from "react";
22
- import style from "./hiplot.scss";
23
- ;
24
- var KeepOrExcludeDataBtn = /** @class */ (function (_super) {
25
- __extends(KeepOrExcludeDataBtn, _super);
26
- function KeepOrExcludeDataBtn(props) {
27
- var _this = _super.call(this, props) || this;
28
- _this.btnRef = React.createRef();
29
- _this.state = {
30
- btnEnabled: _this.btnEnabled()
31
- };
32
- return _this;
33
- }
34
- KeepOrExcludeDataBtn.prototype.btnEnabled = function () {
35
- return 0 < this.props.rows_selected.length && this.props.rows_selected.length < this.props.rows_filtered.length;
36
- };
37
- KeepOrExcludeDataBtn.prototype.componentDidUpdate = function () {
38
- if (this.state.btnEnabled != this.btnEnabled()) {
39
- this.setState({ btnEnabled: this.btnEnabled() });
40
- }
41
- };
42
- KeepOrExcludeDataBtn.prototype.onClick = function () {
43
- this.props.filterRows(this.keep);
44
- };
45
- KeepOrExcludeDataBtn.prototype.render = function () {
46
- return (React.createElement("button", { title: this.title, ref: this.btnRef, className: "btn btn-sm btn-" + this.style, disabled: !this.state.btnEnabled, onClick: this.onClick.bind(this) }, this.label));
47
- };
48
- return KeepOrExcludeDataBtn;
49
- }(React.Component));
50
- export { KeepOrExcludeDataBtn };
51
- ;
52
- var KeepDataBtn = /** @class */ (function (_super) {
53
- __extends(KeepDataBtn, _super);
54
- function KeepDataBtn() {
55
- var _this = _super !== null && _super.apply(this, arguments) || this;
56
- _this.keep = true;
57
- _this.title = "Zoom in on selected data";
58
- _this.label = "Keep";
59
- _this.style = "success";
60
- return _this;
61
- }
62
- return KeepDataBtn;
63
- }(KeepOrExcludeDataBtn));
64
- export { KeepDataBtn };
65
- ;
66
- var ExcludeDataBtn = /** @class */ (function (_super) {
67
- __extends(ExcludeDataBtn, _super);
68
- function ExcludeDataBtn() {
69
- var _this = _super !== null && _super.apply(this, arguments) || this;
70
- _this.keep = false;
71
- _this.title = "Remove selected data";
72
- _this.label = "Exclude";
73
- _this.style = "danger";
74
- return _this;
75
- }
76
- return ExcludeDataBtn;
77
- }(KeepOrExcludeDataBtn));
78
- export { ExcludeDataBtn };
79
- ;
80
- function downloadURL(url, filename) {
81
- var element = document.createElement('a');
82
- element.setAttribute('href', url);
83
- element.setAttribute('download', filename);
84
- element.style.display = 'none';
85
- document.body.appendChild(element);
86
- element.click();
87
- document.body.removeChild(element);
88
- }
89
- var ExportDataCSVBtn = /** @class */ (function (_super) {
90
- __extends(ExportDataCSVBtn, _super);
91
- function ExportDataCSVBtn() {
92
- return _super !== null && _super.apply(this, arguments) || this;
93
- }
94
- ExportDataCSVBtn.prototype.onClick = function () {
95
- var all_selected = this.props.rows_selected;
96
- var csv = d3.csvFormat(all_selected);
97
- var blob = new Blob([csv], { type: "text/csv" });
98
- var url = window.URL.createObjectURL(blob);
99
- downloadURL(url, "hiplot-selected-" + all_selected.length + ".csv");
100
- };
101
- ExportDataCSVBtn.prototype.render = function () {
102
- return (React.createElement("button", { title: "Export data as CSV", className: "btn btn-sm btn-light", onClick: this.onClick.bind(this) }, "Export"));
103
- };
104
- return ExportDataCSVBtn;
105
- }(React.Component));
106
- export { ExportDataCSVBtn };
107
- ;
108
- var RestoreDataBtn = /** @class */ (function (_super) {
109
- __extends(RestoreDataBtn, _super);
110
- function RestoreDataBtn(props) {
111
- var _this = _super.call(this, props) || this;
112
- _this.state = {
113
- btnEnabled: _this.btnEnabled()
114
- };
115
- return _this;
116
- }
117
- RestoreDataBtn.prototype.btnEnabled = function () {
118
- return this.props.rows_all_unfiltered.length != this.props.rows_filtered.length;
119
- };
120
- RestoreDataBtn.prototype.componentDidUpdate = function () {
121
- var btnEnabled = this.btnEnabled();
122
- if (btnEnabled != this.state.btnEnabled) {
123
- this.setState({ btnEnabled: btnEnabled });
124
- }
125
- };
126
- RestoreDataBtn.prototype.onClick = function () {
127
- this.props.restoreAllRows();
128
- };
129
- RestoreDataBtn.prototype.render = function () {
130
- return (React.createElement("button", { title: "Remove all applied filters", className: "btn btn-sm btn-sm btn-info", disabled: !this.state.btnEnabled, onClick: this.onClick.bind(this) }, "Restore"));
131
- };
132
- return RestoreDataBtn;
133
- }(React.Component));
134
- export { RestoreDataBtn };
135
- ;
136
- var SelectedCountProgressBar = /** @class */ (function (_super) {
137
- __extends(SelectedCountProgressBar, _super);
138
- function SelectedCountProgressBar() {
139
- var _this = _super !== null && _super.apply(this, arguments) || this;
140
- _this.selectedBar = React.createRef();
141
- return _this;
142
- }
143
- SelectedCountProgressBar.prototype.componentDidMount = function () {
144
- this.updateBarWidth();
145
- };
146
- SelectedCountProgressBar.prototype.componentDidUpdate = function () {
147
- this.updateBarWidth();
148
- };
149
- SelectedCountProgressBar.prototype.updateBarWidth = function () {
150
- var selected = this.props.rows_selected.length;
151
- var filtered = this.props.rows_filtered.length;
152
- var selectedBar = this.selectedBar.current;
153
- selectedBar.style.width = (100 * selected / filtered) + "%";
154
- };
155
- SelectedCountProgressBar.prototype.render = function () {
156
- return (React.createElement("div", { className: style.fillbar },
157
- React.createElement("div", { ref: this.selectedBar, className: style.selectedBar },
158
- React.createElement("div", { style: { 'width': '100%' }, className: style.renderedBar }, "\u00A0"))));
159
- };
160
- return SelectedCountProgressBar;
161
- }(React.Component));
162
- export { SelectedCountProgressBar };
163
- ;
@@ -1,21 +0,0 @@
1
- import { Datapoint } from "./types";
2
- export interface Filter {
3
- type: string;
4
- data: object;
5
- }
6
- export declare enum FilterType {
7
- All = "All",
8
- Range = "Range",
9
- Not = "Not",
10
- Search = "Search",
11
- None = "None"
12
- }
13
- export interface FilterRange {
14
- col: string;
15
- type: string;
16
- min: any;
17
- max: any;
18
- include_infnans?: boolean;
19
- }
20
- export declare function apply_filter(rows: Array<Datapoint>, filter: Filter): Array<Datapoint>;
21
- export declare function apply_filters(rows: Array<Datapoint>, filters: Array<Filter>): Array<Datapoint>;
@@ -1,96 +0,0 @@
1
- /*
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
- var _a;
8
- import $ from "jquery";
9
- import { convert_to_categorical_input } from "./lib/d3_scales";
10
- import { ParamType } from "./types";
11
- ;
12
- export var FilterType;
13
- (function (FilterType) {
14
- FilterType["All"] = "All";
15
- FilterType["Range"] = "Range";
16
- FilterType["Not"] = "Not";
17
- FilterType["Search"] = "Search";
18
- FilterType["None"] = "None";
19
- })(FilterType || (FilterType = {}));
20
- var FILTERS = (_a = {},
21
- _a[FilterType.All] = filter_all,
22
- _a[FilterType.Range] = filter_range,
23
- _a[FilterType.Not] = filter_not,
24
- _a[FilterType.Search] = filter_search,
25
- _a[FilterType.None] = function () { return function (dp) { return false; }; },
26
- _a);
27
- ;
28
- function filter_range(data) {
29
- if (data.type == ParamType.CATEGORICAL) {
30
- console.assert(typeof data.min == typeof data.max, data.min, data.max);
31
- return function (dp) {
32
- var value = dp[data.col];
33
- if (value === undefined) {
34
- return false;
35
- }
36
- value = convert_to_categorical_input(value);
37
- return data.min <= value && value <= data.max;
38
- };
39
- }
40
- return function (dp) {
41
- var value = dp[data.col];
42
- if (value === undefined) {
43
- return false;
44
- }
45
- value = parseFloat(value);
46
- if (data.min <= value && value <= data.max) {
47
- // Easy, in range
48
- return true;
49
- }
50
- else if (data.include_infnans) {
51
- // Not in `[min, max]`, but we also include inf and nans
52
- return Number.isNaN(value) || !Number.isFinite(value);
53
- }
54
- else {
55
- return false;
56
- }
57
- };
58
- }
59
- ;
60
- function filter_search(data) {
61
- // Copied from Datatables to losely match search
62
- var escapeRegexp = $.fn.dataTable.util.escapeRegex;
63
- var pattern = escapeRegexp(data);
64
- var caseInsensitive = true;
65
- var regexp = new RegExp(pattern, caseInsensitive ? 'i' : '');
66
- return function (dp) {
67
- var sFilterRow = Object.values(dp).join(' ');
68
- return regexp.test(sFilterRow);
69
- };
70
- }
71
- function filter_all(data) {
72
- var f = data.map(function (f) { return FILTERS[f.type](f.data); });
73
- return function (dp) {
74
- return f.every(function (fn) { return fn(dp); });
75
- };
76
- }
77
- ;
78
- function filter_not(data) {
79
- var f = FILTERS[data.type];
80
- console.assert(f !== undefined, "Invalid filter", data);
81
- var fn = f(data.data);
82
- return function (dp) { return !fn(dp); };
83
- }
84
- ;
85
- export function apply_filter(rows, filter) {
86
- var f = FILTERS[filter.type];
87
- console.assert(f !== undefined, "Invalid filter", filter);
88
- rows = rows.filter(f(filter.data));
89
- return rows;
90
- }
91
- export function apply_filters(rows, filters) {
92
- filters.forEach(function (filter) {
93
- rows = apply_filter(rows, filter);
94
- });
95
- return rows;
96
- }
@@ -1,39 +0,0 @@
1
- import React from "react";
2
- import { HiPlotLoadStatus, IDatasets } from "./types";
3
- import { HiPlotDataControlProps } from "./controls";
4
- import { DataProviderClass } from "./plugin";
5
- import { PersistentState } from "./lib/savedstate";
6
- interface HeaderBarProps extends IDatasets, HiPlotDataControlProps {
7
- weightColumn?: string;
8
- loadStatus: HiPlotLoadStatus;
9
- persistentState: PersistentState;
10
- onLoadExperiment: (load_promise: Promise<any>) => void;
11
- dark: boolean;
12
- dataProvider: DataProviderClass;
13
- }
14
- interface HeaderBarState {
15
- isTextareaFocused: boolean;
16
- hasTutorial: boolean;
17
- selectedPct: string;
18
- selectedPctWeighted: string;
19
- }
20
- export declare class HeaderBar extends React.Component<HeaderBarProps, HeaderBarState> {
21
- dataProviderRef: React.RefObject<DataProviderClass>;
22
- controls_root_ref: React.RefObject<HTMLDivElement>;
23
- constructor(props: HeaderBarProps);
24
- recomputeMetrics(): void;
25
- recomputeSelectedWeightedSum(): void;
26
- componentDidMount(): void;
27
- componentDidUpdate(prevProps: HeaderBarProps, prevState: HeaderBarState): void;
28
- onToggleTutorial(): void;
29
- onRefresh(): void;
30
- renderControls(): JSX.Element;
31
- render(): JSX.Element;
32
- }
33
- interface ErrorDisplayProps {
34
- error: string;
35
- }
36
- export declare class ErrorDisplay extends React.Component<ErrorDisplayProps> {
37
- render(): JSX.Element;
38
- }
39
- export {};
@@ -1,176 +0,0 @@
1
- /*
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
- var __extends = (this && this.__extends) || (function () {
8
- var extendStatics = function (d, b) {
9
- extendStatics = Object.setPrototypeOf ||
10
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
12
- return extendStatics(d, b);
13
- };
14
- return function (d, b) {
15
- extendStatics(d, b);
16
- function __() { this.constructor = d; }
17
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18
- };
19
- })();
20
- var __assign = (this && this.__assign) || function () {
21
- __assign = Object.assign || function(t) {
22
- for (var s, i = 1, n = arguments.length; i < n; i++) {
23
- s = arguments[i];
24
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
25
- t[p] = s[p];
26
- }
27
- return t;
28
- };
29
- return __assign.apply(this, arguments);
30
- };
31
- import style from "./hiplot.scss";
32
- import React from "react";
33
- import { HiPlotLoadStatus } from "./types";
34
- import { RestoreDataBtn, ExcludeDataBtn, ExportDataCSVBtn, KeepDataBtn } from "./controls";
35
- //@ts-ignore
36
- import IconSVG from "../hiplot/static/icon.svg";
37
- //@ts-ignore
38
- import IconSVGW from "../hiplot/static/icon-w.svg";
39
- import { HiPlotTutorial } from "./tutorial/tutorial";
40
- ;
41
- ;
42
- var HeaderBar = /** @class */ (function (_super) {
43
- __extends(HeaderBar, _super);
44
- function HeaderBar(props) {
45
- var _this = _super.call(this, props) || this;
46
- _this.dataProviderRef = React.createRef();
47
- _this.controls_root_ref = React.createRef();
48
- _this.state = {
49
- isTextareaFocused: false,
50
- hasTutorial: false,
51
- selectedPct: '???',
52
- selectedPctWeighted: '???'
53
- };
54
- return _this;
55
- }
56
- HeaderBar.prototype.recomputeMetrics = function () {
57
- var newSelectedPct = (100 * this.props.rows_selected.length / this.props.rows_filtered.length).toPrecision(3);
58
- if (newSelectedPct != this.state.selectedPct) {
59
- this.setState({
60
- selectedPct: (100 * this.props.rows_selected.length / this.props.rows_filtered.length).toPrecision(3)
61
- });
62
- }
63
- };
64
- HeaderBar.prototype.recomputeSelectedWeightedSum = function () {
65
- if (!this.props.weightColumn) {
66
- this.setState({
67
- selectedPctWeighted: '???'
68
- });
69
- return;
70
- }
71
- var getWeight = function (dp) {
72
- var w = parseFloat(dp[this.props.weightColumn]);
73
- return !isNaN(w) && isFinite(w) && w > 0.0 ? w : 1.0;
74
- }.bind(this);
75
- var totalWeightFiltered = 0.0, totalWeightSelected = 0.0;
76
- this.props.rows_filtered.forEach(function (dp) {
77
- totalWeightFiltered += getWeight(dp);
78
- });
79
- this.props.rows_selected.forEach(function (dp) {
80
- totalWeightSelected += getWeight(dp);
81
- });
82
- var pctage = (100 * totalWeightSelected / totalWeightFiltered);
83
- console.assert(!isNaN(pctage), { "pctage": pctage, "totalWeightFiltered": totalWeightFiltered, "totalWeightSelected": totalWeightSelected });
84
- this.setState({
85
- selectedPctWeighted: pctage.toPrecision(3)
86
- });
87
- };
88
- HeaderBar.prototype.componentDidMount = function () {
89
- this.recomputeMetrics();
90
- this.recomputeSelectedWeightedSum();
91
- };
92
- HeaderBar.prototype.componentDidUpdate = function (prevProps, prevState) {
93
- this.recomputeMetrics();
94
- if (prevProps.weightColumn != this.props.weightColumn || this.props.rows_selected != prevProps.rows_selected || this.props.rows_filtered != prevProps.rows_filtered) {
95
- this.recomputeSelectedWeightedSum();
96
- }
97
- };
98
- HeaderBar.prototype.onToggleTutorial = function () {
99
- this.setState(function (prevState, prevProps) {
100
- return {
101
- hasTutorial: !prevState.hasTutorial
102
- };
103
- });
104
- };
105
- HeaderBar.prototype.onRefresh = function () {
106
- var promise = this.dataProviderRef.current.refresh();
107
- if (promise !== null) {
108
- this.props.onLoadExperiment(promise);
109
- }
110
- };
111
- HeaderBar.prototype.renderControls = function () {
112
- var _this = this;
113
- var dataProviderProps = {
114
- ref: this.dataProviderRef,
115
- persistentState: this.props.persistentState,
116
- loadStatus: this.props.loadStatus,
117
- hasFocus: this.state.isTextareaFocused,
118
- onFocusChange: function (hasFocus) { return _this.setState({ isTextareaFocused: hasFocus }); },
119
- onLoadExperiment: this.props.onLoadExperiment
120
- };
121
- return (React.createElement(React.Fragment, null,
122
- React.createElement(this.props.dataProvider, dataProviderProps),
123
- this.props.loadStatus == HiPlotLoadStatus.Loaded && !this.state.isTextareaFocused &&
124
- React.createElement(React.Fragment, null,
125
- React.createElement("div", { className: style.controlGroup },
126
- React.createElement(RestoreDataBtn, __assign({}, this.props)),
127
- React.createElement(KeepDataBtn, __assign({}, this.props)),
128
- React.createElement(ExcludeDataBtn, __assign({}, this.props)),
129
- this.dataProviderRef.current && this.dataProviderRef.current.refresh &&
130
- React.createElement("button", { title: "Refresh", className: "btn btn-sm btn-light", onClick: this.onRefresh.bind(this) }, "Refresh"),
131
- React.createElement(ExportDataCSVBtn, __assign({}, this.props)),
132
- React.createElement("button", { title: "Start HiPlot tutorial", className: "btn btn-sm btn-light", onClick: this.onToggleTutorial.bind(this) }, "Help"),
133
- React.createElement("div", { style: { clear: 'both' } })),
134
- React.createElement("div", { className: style.controlGroup },
135
- React.createElement("div", { style: { "fontFamily": "monospace", "fontSize": "14px" } },
136
- "Selected: ",
137
- React.createElement("strong", { style: { "minWidth": "4em", "textAlign": "right", "display": "inline-block" } }, this.props.rows_selected.length),
138
- "/",
139
- React.createElement("strong", { style: { "minWidth": "4em", "textAlign": "left", "display": "inline-block" } }, this.props.rows_filtered.length),
140
- " (",
141
- !this.props.weightColumn &&
142
- React.createElement(React.Fragment, null,
143
- React.createElement("span", { style: { "minWidth": "3em", "textAlign": "right", "display": "inline-block" } }, this.state.selectedPct),
144
- "%"),
145
- this.props.weightColumn &&
146
- React.createElement(React.Fragment, null,
147
- React.createElement("span", { style: { "minWidth": "3em", "textAlign": "right", "display": "inline-block" } }, this.state.selectedPctWeighted),
148
- "% weighted"),
149
- ")")))));
150
- };
151
- HeaderBar.prototype.render = function () {
152
- var _this = this;
153
- return (React.createElement("div", { ref: this.controls_root_ref, className: "container-fluid " + style.header },
154
- React.createElement("div", { className: "d-flex flex-wrap" },
155
- React.createElement("img", { style: { height: '55px' }, src: this.props.dark ? IconSVGW : IconSVG }),
156
- this.renderControls()),
157
- this.state.hasTutorial && React.createElement(HiPlotTutorial, { navbarRoot: this.controls_root_ref, onTutorialDone: (function () { return _this.setState({ hasTutorial: false }); }).bind(this) })));
158
- };
159
- return HeaderBar;
160
- }(React.Component));
161
- export { HeaderBar };
162
- ;
163
- var ErrorDisplay = /** @class */ (function (_super) {
164
- __extends(ErrorDisplay, _super);
165
- function ErrorDisplay() {
166
- return _super !== null && _super.apply(this, arguments) || this;
167
- }
168
- ErrorDisplay.prototype.render = function () {
169
- return (React.createElement("div", { className: "alert alert-danger", role: "alert" },
170
- React.createElement("div", { className: "container" },
171
- React.createElement("h4", { className: "alert-heading" }, this.props.error),
172
- React.createElement("p", { className: "mb-0" }, "HiPlot encountered the error above - more information might be available in your browser's developer web console, or in the server output"))));
173
- };
174
- return ErrorDisplay;
175
- }(React.Component));
176
- export { ErrorDisplay };
Binary file
@@ -1,88 +0,0 @@
1
- /*
2
- object-assign
3
- (c) Sindre Sorhus
4
- @license MIT
5
- */
6
-
7
- /*!
8
- * Sizzle CSS Selector Engine v2.3.5
9
- * https://sizzlejs.com/
10
- *
11
- * Copyright JS Foundation and other contributors
12
- * Released under the MIT license
13
- * https://js.foundation/
14
- *
15
- * Date: 2020-03-14
16
- */
17
-
18
- /*!
19
- * Copyright (c) Facebook, Inc. and its affiliates.
20
- *
21
- * This source code is licensed under the MIT license found in the
22
- * LICENSE file in the root directory of this source tree.
23
- */
24
-
25
- /*!
26
- * jQuery JavaScript Library v3.5.1
27
- * https://jquery.com/
28
- *
29
- * Includes Sizzle.js
30
- * https://sizzlejs.com/
31
- *
32
- * Copyright JS Foundation and other contributors
33
- * Released under the MIT license
34
- * https://jquery.org/license
35
- *
36
- * Date: 2020-05-04T22:49Z
37
- */
38
-
39
- /*! Bootstrap 4 styling wrapper for ColReorder
40
- * ©2018 SpryMedia Ltd - datatables.net/license
41
- */
42
-
43
- /*! Bootstrap integration for DataTables' Buttons
44
- * ©2016 SpryMedia Ltd - datatables.net/license
45
- */
46
-
47
- /*! Buttons for DataTables 1.7.1
48
- * ©2016-2021 SpryMedia Ltd - datatables.net/license
49
- */
50
-
51
- /*! ColReorder 1.5.6
52
- * ©2010-2022 SpryMedia Ltd - datatables.net/license
53
- */
54
-
55
- /*! DataTables 1.12.1
56
- * ©2008-2022 SpryMedia Ltd - datatables.net/license
57
- */
58
-
59
- /*! DataTables Bootstrap 4 integration
60
- * ©2011-2017 SpryMedia Ltd - datatables.net/license
61
- */
62
-
63
- /** @license React v0.20.2
64
- * scheduler.production.min.js
65
- *
66
- * Copyright (c) Facebook, Inc. and its affiliates.
67
- *
68
- * This source code is licensed under the MIT license found in the
69
- * LICENSE file in the root directory of this source tree.
70
- */
71
-
72
- /** @license React v17.0.2
73
- * react-dom.production.min.js
74
- *
75
- * Copyright (c) Facebook, Inc. and its affiliates.
76
- *
77
- * This source code is licensed under the MIT license found in the
78
- * LICENSE file in the root directory of this source tree.
79
- */
80
-
81
- /** @license React v17.0.2
82
- * react.production.min.js
83
- *
84
- * Copyright (c) Facebook, Inc. and its affiliates.
85
- *
86
- * This source code is licensed under the MIT license found in the
87
- * LICENSE file in the root directory of this source tree.
88
- */