@deephaven/dashboard-core-plugins 0.5.2-matplotlib.2 → 0.6.1-fixed-deps.2
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/dist/ChartPlugin.js +25 -22
- package/dist/ChartPlugin.js.map +1 -1
- package/dist/ConsolePlugin.d.ts.map +1 -1
- package/dist/ConsolePlugin.js +130 -134
- package/dist/ConsolePlugin.js.map +1 -1
- package/dist/FilterPlugin.d.ts.map +1 -1
- package/dist/FilterPlugin.js +114 -116
- package/dist/FilterPlugin.js.map +1 -1
- package/dist/GridPlugin.js +29 -26
- package/dist/GridPlugin.js.map +1 -1
- package/dist/LinkerPlugin.js +7 -5
- package/dist/LinkerPlugin.js.map +1 -1
- package/dist/MarkdownPlugin.js +44 -45
- package/dist/MarkdownPlugin.js.map +1 -1
- package/dist/PandasPlugin.d.ts +5 -2
- package/dist/PandasPlugin.d.ts.map +1 -1
- package/dist/PandasPlugin.js +12 -12
- package/dist/PandasPlugin.js.map +1 -1
- package/dist/controls/ControlType.d.ts +1 -0
- package/dist/controls/ControlType.d.ts.map +1 -1
- package/dist/controls/ControlType.js +3 -5
- package/dist/controls/ControlType.js.map +1 -1
- package/dist/controls/dropdown-filter/DropdownFilter.d.ts +6 -0
- package/dist/controls/dropdown-filter/DropdownFilter.d.ts.map +1 -1
- package/dist/controls/dropdown-filter/DropdownFilter.js +356 -394
- package/dist/controls/dropdown-filter/DropdownFilter.js.map +1 -1
- package/dist/controls/input-filter/InputFilter.d.ts +6 -0
- package/dist/controls/input-filter/InputFilter.d.ts.map +1 -1
- package/dist/controls/input-filter/InputFilter.js +256 -270
- package/dist/controls/input-filter/InputFilter.js.map +1 -1
- package/dist/controls/markdown/MarkdownContainer.js +18 -56
- package/dist/controls/markdown/MarkdownContainer.js.map +1 -1
- package/dist/controls/markdown/MarkdownEditor.js +36 -75
- package/dist/controls/markdown/MarkdownEditor.js.map +1 -1
- package/dist/controls/markdown/MarkdownStartPage.js +93 -133
- package/dist/controls/markdown/MarkdownStartPage.js.map +1 -1
- package/dist/controls/markdown/MarkdownUtils.js +17 -32
- package/dist/controls/markdown/MarkdownUtils.js.map +1 -1
- package/dist/events/ChartEvent.js +1 -5
- package/dist/events/ChartEvent.js.map +1 -1
- package/dist/events/ConsoleEvent.js +1 -5
- package/dist/events/ConsoleEvent.js.map +1 -1
- package/dist/events/ControlEvent.js +1 -5
- package/dist/events/ControlEvent.js.map +1 -1
- package/dist/events/InputFilterEvent.d.ts +2 -0
- package/dist/events/InputFilterEvent.d.ts.map +1 -1
- package/dist/events/InputFilterEvent.js +3 -5
- package/dist/events/InputFilterEvent.js.map +1 -1
- package/dist/events/IrisGridEvent.js +1 -5
- package/dist/events/IrisGridEvent.js.map +1 -1
- package/dist/events/NotebookEvent.js +1 -5
- package/dist/events/NotebookEvent.js.map +1 -1
- package/dist/events/PQEvent.js +1 -5
- package/dist/events/PQEvent.js.map +1 -1
- package/dist/events/PandasEvent.js +1 -5
- package/dist/events/PandasEvent.js.map +1 -1
- package/dist/events/TabEvent.js +1 -5
- package/dist/events/TabEvent.js.map +1 -1
- package/dist/events/index.d.ts +0 -1
- package/dist/events/index.js +9 -10
- package/dist/events/index.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -11
- package/dist/index.js.map +1 -1
- package/dist/linker/Linker.d.ts +1 -1
- package/dist/linker/Linker.js +594 -606
- package/dist/linker/Linker.js.map +1 -1
- package/dist/linker/LinkerLink.js +92 -126
- package/dist/linker/LinkerLink.js.map +1 -1
- package/dist/linker/LinkerOverlayContent.js +162 -220
- package/dist/linker/LinkerOverlayContent.js.map +1 -1
- package/dist/linker/LinkerUtils.js +105 -114
- package/dist/linker/LinkerUtils.js.map +1 -1
- package/dist/panels/ChartColumnSelectorOverlay.js +19 -25
- package/dist/panels/ChartColumnSelectorOverlay.js.map +1 -1
- package/dist/panels/ChartFilterOverlay.js +18 -24
- package/dist/panels/ChartFilterOverlay.js.map +1 -1
- package/dist/panels/ChartPanel.d.ts +3 -0
- package/dist/panels/ChartPanel.d.ts.map +1 -1
- package/dist/panels/ChartPanel.js +839 -873
- package/dist/panels/ChartPanel.js.map +1 -1
- package/dist/panels/CommandHistoryPanel.d.ts.map +1 -1
- package/dist/panels/CommandHistoryPanel.js +160 -186
- package/dist/panels/CommandHistoryPanel.js.map +1 -1
- package/dist/panels/ConsolePanel.d.ts +1 -1
- package/dist/panels/ConsolePanel.d.ts.map +1 -1
- package/dist/panels/ConsolePanel.js +327 -374
- package/dist/panels/ConsolePanel.js.map +1 -1
- package/dist/panels/DropdownFilterPanel.d.ts +6 -0
- package/dist/panels/DropdownFilterPanel.d.ts.map +1 -1
- package/dist/panels/DropdownFilterPanel.js +537 -566
- package/dist/panels/DropdownFilterPanel.js.map +1 -1
- package/dist/panels/FileExplorerPanel.d.ts +6 -1
- package/dist/panels/FileExplorerPanel.d.ts.map +1 -1
- package/dist/panels/FileExplorerPanel.js +208 -210
- package/dist/panels/FileExplorerPanel.js.map +1 -1
- package/dist/panels/FilterSetManager.css +111 -0
- package/dist/panels/FilterSetManager.css.map +1 -0
- package/dist/panels/FilterSetManager.d.ts +66 -0
- package/dist/panels/FilterSetManager.d.ts.map +1 -0
- package/dist/panels/FilterSetManager.js +732 -0
- package/dist/panels/FilterSetManager.js.map +1 -0
- package/dist/panels/FilterSetManagerPanel.css +33 -0
- package/dist/panels/FilterSetManagerPanel.css.map +1 -0
- package/dist/panels/FilterSetManagerPanel.d.ts +69 -0
- package/dist/panels/FilterSetManagerPanel.d.ts.map +1 -0
- package/dist/panels/FilterSetManagerPanel.js +383 -0
- package/dist/panels/FilterSetManagerPanel.js.map +1 -0
- package/dist/panels/InputFilterPanel.d.ts +7 -0
- package/dist/panels/InputFilterPanel.d.ts.map +1 -1
- package/dist/panels/InputFilterPanel.js +198 -206
- package/dist/panels/InputFilterPanel.js.map +1 -1
- package/dist/panels/IrisGridPanel.d.ts +11 -3
- package/dist/panels/IrisGridPanel.d.ts.map +1 -1
- package/dist/panels/IrisGridPanel.js +779 -771
- package/dist/panels/IrisGridPanel.js.map +1 -1
- package/dist/panels/LogPanel.js +80 -116
- package/dist/panels/LogPanel.js.map +1 -1
- package/dist/panels/MarkdownPanel.js +165 -199
- package/dist/panels/MarkdownPanel.js.map +1 -1
- package/dist/panels/NotebookPanel.d.ts +3 -1
- package/dist/panels/NotebookPanel.d.ts.map +1 -1
- package/dist/panels/NotebookPanel.js +870 -862
- package/dist/panels/NotebookPanel.js.map +1 -1
- package/dist/panels/PandasPanel.js +56 -90
- package/dist/panels/PandasPanel.js.map +1 -1
- package/dist/panels/Panel.js +282 -313
- package/dist/panels/Panel.js.map +1 -1
- package/dist/panels/PanelContextMenu.js +107 -158
- package/dist/panels/PanelContextMenu.js.map +1 -1
- package/dist/panels/RenameDialog.js +144 -172
- package/dist/panels/RenameDialog.js.map +1 -1
- package/dist/panels/Shortcuts.js +1 -1
- package/dist/panels/Shortcuts.js.map +1 -1
- package/dist/panels/WidgetPanel.js +133 -163
- package/dist/panels/WidgetPanel.js.map +1 -1
- package/dist/panels/WidgetPanelTooltip.js +7 -5
- package/dist/panels/WidgetPanelTooltip.js.map +1 -1
- package/dist/panels/index.d.ts +1 -1
- package/dist/panels/index.js +16 -16
- package/dist/panels/index.js.map +1 -1
- package/dist/prop-types/CommonPropTypes.js +4 -8
- package/dist/prop-types/CommonPropTypes.js.map +1 -1
- package/dist/prop-types/UIPropTypes.js +6 -6
- package/dist/prop-types/UIPropTypes.js.map +1 -1
- package/dist/prop-types/index.js +2 -2
- package/dist/prop-types/index.js.map +1 -1
- package/dist/redux/actions.d.ts +1 -0
- package/dist/redux/actions.d.ts.map +1 -1
- package/dist/redux/actions.js +33 -54
- package/dist/redux/actions.js.map +1 -1
- package/dist/redux/index.js +6 -21
- package/dist/redux/index.js.map +1 -1
- package/dist/redux/reducers/index.js +2 -2
- package/dist/redux/reducers/index.js.map +1 -1
- package/dist/redux/reducers/sessionWrapper.js +1 -1
- package/dist/redux/reducers/sessionWrapper.js.map +1 -1
- package/dist/redux/selectors.d.ts +1 -0
- package/dist/redux/selectors.d.ts.map +1 -1
- package/dist/redux/selectors.js +22 -18
- package/dist/redux/selectors.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +27 -54
- package/dist/MatPlotLibPlugin.d.ts +0 -5
- package/dist/MatPlotLibPlugin.d.ts.map +0 -1
- package/dist/MatPlotLibPlugin.js +0 -45
- package/dist/MatPlotLibPlugin.js.map +0 -1
- package/dist/events/MatPlotLibEvent.d.ts +0 -5
- package/dist/events/MatPlotLibEvent.d.ts.map +0 -1
- package/dist/events/MatPlotLibEvent.js +0 -12
- package/dist/events/MatPlotLibEvent.js.map +0 -1
- package/dist/panels/MatPlotLibPanel.d.ts +0 -22
- package/dist/panels/MatPlotLibPanel.d.ts.map +0 -1
- package/dist/panels/MatPlotLibPanel.js +0 -123
- package/dist/panels/MatPlotLibPanel.js.map +0 -1
|
@@ -1,45 +1,3 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2
|
-
|
|
3
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
-
|
|
5
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
-
|
|
7
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
8
|
-
|
|
9
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
10
|
-
|
|
11
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
12
|
-
|
|
13
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
14
|
-
|
|
15
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
16
|
-
|
|
17
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
18
|
-
|
|
19
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
20
|
-
|
|
21
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
22
|
-
|
|
23
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24
|
-
|
|
25
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
26
|
-
|
|
27
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
28
|
-
|
|
29
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
30
|
-
|
|
31
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
32
|
-
|
|
33
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
34
|
-
|
|
35
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
36
|
-
|
|
37
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
38
|
-
|
|
39
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
40
|
-
|
|
41
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
42
|
-
|
|
43
1
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
44
2
|
|
|
45
3
|
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
@@ -57,42 +15,34 @@ import memoizee from 'memoizee';
|
|
|
57
15
|
import memoize from 'memoize-one';
|
|
58
16
|
import debounce from 'lodash.debounce';
|
|
59
17
|
import Log from '@deephaven/log';
|
|
60
|
-
import { UIPropTypes } from
|
|
18
|
+
import { UIPropTypes } from "../../prop-types/index.js";
|
|
61
19
|
import "./DropdownFilter.css";
|
|
62
20
|
var log = Log.module('DropdownFilter');
|
|
63
21
|
var UPDATE_DEBOUNCE = 150;
|
|
64
22
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
var _super = _createSuper(DropdownFilter);
|
|
69
|
-
|
|
70
|
-
function DropdownFilter(props) {
|
|
71
|
-
var _this;
|
|
23
|
+
class DropdownFilter extends Component {
|
|
24
|
+
constructor(props) {
|
|
25
|
+
super(props);
|
|
72
26
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
var type = _ref.type;
|
|
80
|
-
return TableUtils.isCompatibleType(type, source.columnType);
|
|
81
|
-
}) : [];
|
|
82
|
-
}));
|
|
27
|
+
_defineProperty(this, "getCompatibleColumns", memoize((source, columns) => source ? columns.filter((_ref) => {
|
|
28
|
+
var {
|
|
29
|
+
type
|
|
30
|
+
} = _ref;
|
|
31
|
+
return TableUtils.isCompatibleType(type, source.columnType);
|
|
32
|
+
}) : []));
|
|
83
33
|
|
|
84
|
-
_defineProperty(
|
|
34
|
+
_defineProperty(this, "getColumnOptions", memoize((columns, selectedColumn) => {
|
|
85
35
|
var selectedIndex = -1;
|
|
86
36
|
var options = [];
|
|
87
37
|
options.push( /*#__PURE__*/React.createElement("option", {
|
|
88
38
|
key: "placeholder",
|
|
89
39
|
value: "-1"
|
|
90
40
|
}, "Select a column"));
|
|
91
|
-
columns.forEach(
|
|
41
|
+
columns.forEach((columnItem, index) => {
|
|
92
42
|
options.push( /*#__PURE__*/React.createElement("option", {
|
|
93
43
|
key: "".concat(columnItem.name, "/").concat(columnItem.type),
|
|
94
44
|
value: index
|
|
95
|
-
},
|
|
45
|
+
}, this.getItemLabel(columns, index)));
|
|
96
46
|
|
|
97
47
|
if (selectedColumn !== null && columnItem.name === selectedColumn.name && columnItem.type === selectedColumn.type) {
|
|
98
48
|
selectedIndex = index;
|
|
@@ -101,27 +51,22 @@ var DropdownFilter = /*#__PURE__*/function (_Component) {
|
|
|
101
51
|
return [options, selectedIndex];
|
|
102
52
|
}));
|
|
103
53
|
|
|
104
|
-
_defineProperty(
|
|
105
|
-
return values.indexOf(value);
|
|
106
|
-
}));
|
|
54
|
+
_defineProperty(this, "getSelectedOptionIndex", memoize((values, value) => values.indexOf(value)));
|
|
107
55
|
|
|
108
|
-
_defineProperty(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
key: "".concat(index, "/").concat(val)
|
|
117
|
-
}, val);
|
|
118
|
-
})));
|
|
119
|
-
}));
|
|
56
|
+
_defineProperty(this, "getValueOptions", memoize(values => [/*#__PURE__*/React.createElement("option", {
|
|
57
|
+
value: "-1",
|
|
58
|
+
key: "-1"
|
|
59
|
+
}, DropdownFilter.PLACEHOLDER), ...values.map((val, index) => /*#__PURE__*/React.createElement("option", {
|
|
60
|
+
value: index // eslint-disable-next-line react/no-array-index-key
|
|
61
|
+
,
|
|
62
|
+
key: "".concat(index, "/").concat(val)
|
|
63
|
+
}, val))]));
|
|
120
64
|
|
|
121
|
-
_defineProperty(
|
|
122
|
-
var
|
|
123
|
-
|
|
124
|
-
|
|
65
|
+
_defineProperty(this, "getItemLabel", memoizee((columns, index) => {
|
|
66
|
+
var {
|
|
67
|
+
name,
|
|
68
|
+
type
|
|
69
|
+
} = columns[index];
|
|
125
70
|
|
|
126
71
|
if (index > 0 && columns[index - 1].name === name || index < columns.length - 1 && columns[index + 1].name === name) {
|
|
127
72
|
var shortType = type.substring(type.lastIndexOf('.') + 1);
|
|
@@ -131,341 +76,358 @@ var DropdownFilter = /*#__PURE__*/function (_Component) {
|
|
|
131
76
|
return name;
|
|
132
77
|
}));
|
|
133
78
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
var
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
79
|
+
this.handleColumnChange = this.handleColumnChange.bind(this);
|
|
80
|
+
this.handleSettingsCancel = this.handleSettingsCancel.bind(this);
|
|
81
|
+
this.handleSettingsClick = this.handleSettingsClick.bind(this);
|
|
82
|
+
this.handleSettingsSave = this.handleSettingsSave.bind(this);
|
|
83
|
+
this.handleBackgroundClick = this.handleBackgroundClick.bind(this);
|
|
84
|
+
this.handleDropdownKeyPress = this.handleDropdownKeyPress.bind(this);
|
|
85
|
+
this.handleValueChange = this.handleValueChange.bind(this);
|
|
86
|
+
this.sendUpdate = debounce(this.sendUpdate.bind(this), UPDATE_DEBOUNCE);
|
|
87
|
+
this.dropdownRef = /*#__PURE__*/React.createRef();
|
|
88
|
+
var {
|
|
89
|
+
column,
|
|
90
|
+
isValueShown,
|
|
91
|
+
value: _value
|
|
92
|
+
} = props;
|
|
93
|
+
this.state = {
|
|
94
|
+
column,
|
|
148
95
|
selectedColumn: column,
|
|
149
96
|
disableCancel: !isValueShown,
|
|
150
|
-
isValueShown
|
|
97
|
+
isValueShown,
|
|
151
98
|
value: _value
|
|
152
99
|
};
|
|
153
|
-
return _this;
|
|
154
100
|
}
|
|
155
101
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
if (values !== prevProps.values && value !== '' && !values.includes(value)) {
|
|
174
|
-
// Value list loaded, but doesn't contain the current value
|
|
175
|
-
this.resetValue();
|
|
176
|
-
}
|
|
102
|
+
componentDidUpdate(prevProps, prevState) {
|
|
103
|
+
var {
|
|
104
|
+
source,
|
|
105
|
+
values,
|
|
106
|
+
isLoaded
|
|
107
|
+
} = this.props;
|
|
108
|
+
var {
|
|
109
|
+
column,
|
|
110
|
+
value,
|
|
111
|
+
isValueShown
|
|
112
|
+
} = this.state;
|
|
113
|
+
|
|
114
|
+
if (isLoaded) {
|
|
115
|
+
if (source !== prevProps.source) {
|
|
116
|
+
this.sourceUpdated();
|
|
117
|
+
}
|
|
177
118
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
}
|
|
119
|
+
if (values !== prevProps.values && value !== '' && !values.includes(value)) {
|
|
120
|
+
// Value list loaded, but doesn't contain the current value
|
|
121
|
+
this.resetValue();
|
|
122
|
+
}
|
|
183
123
|
|
|
184
|
-
|
|
185
|
-
|
|
124
|
+
if (isValueShown !== prevState.isValueShown) {
|
|
125
|
+
if (isValueShown) {
|
|
126
|
+
this.focusInput();
|
|
186
127
|
}
|
|
187
128
|
}
|
|
188
|
-
}
|
|
189
|
-
}, {
|
|
190
|
-
key: "componentWillUnmount",
|
|
191
|
-
value: function componentWillUnmount() {
|
|
192
|
-
this.sendUpdate.flush();
|
|
193
|
-
}
|
|
194
|
-
}, {
|
|
195
|
-
key: "handleColumnChange",
|
|
196
|
-
value: function handleColumnChange(event) {
|
|
197
|
-
var value = event.target.value;
|
|
198
|
-
log.debug2('handleColumnChange', value);
|
|
199
|
-
|
|
200
|
-
if (value < 0) {
|
|
201
|
-
this.setState({
|
|
202
|
-
selectedColumn: null
|
|
203
|
-
});
|
|
204
|
-
return;
|
|
205
|
-
}
|
|
206
129
|
|
|
207
|
-
|
|
208
|
-
allColumns = _this$props2.columns,
|
|
209
|
-
source = _this$props2.source;
|
|
210
|
-
var columns = this.getCompatibleColumns(source, allColumns);
|
|
211
|
-
this.setState({
|
|
212
|
-
selectedColumn: columns[value]
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
}, {
|
|
216
|
-
key: "handleDropdownKeyPress",
|
|
217
|
-
value: function handleDropdownKeyPress(event) {
|
|
218
|
-
if (event.key === 'Enter') {
|
|
219
|
-
event.preventDefault();
|
|
220
|
-
event.stopPropagation();
|
|
221
|
-
log.debug2('handleDropdownKeyPress');
|
|
130
|
+
if (column !== prevState.column || value !== prevState.value || isValueShown !== prevState.isValueShown) {
|
|
222
131
|
this.sendUpdate();
|
|
223
|
-
this.sendUpdate.flush();
|
|
224
132
|
}
|
|
225
133
|
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
} else if (index >= 0 && index < values.length) {
|
|
238
|
-
value = values[index];
|
|
239
|
-
} else {
|
|
240
|
-
log.error('Invalid index', index, values);
|
|
241
|
-
return;
|
|
242
|
-
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
componentWillUnmount() {
|
|
137
|
+
this.sendUpdate.flush();
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
handleColumnChange(event) {
|
|
141
|
+
var {
|
|
142
|
+
value
|
|
143
|
+
} = event.target;
|
|
144
|
+
log.debug2('handleColumnChange', value);
|
|
243
145
|
|
|
244
|
-
|
|
146
|
+
if (value < 0) {
|
|
245
147
|
this.setState({
|
|
246
|
-
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
}, {
|
|
250
|
-
key: "handleSettingsCancel",
|
|
251
|
-
value: function handleSettingsCancel() {
|
|
252
|
-
this.setState(function (_ref2) {
|
|
253
|
-
var column = _ref2.column;
|
|
254
|
-
return {
|
|
255
|
-
selectedColumn: column,
|
|
256
|
-
isValueShown: true
|
|
257
|
-
};
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
}, {
|
|
261
|
-
key: "handleSettingsSave",
|
|
262
|
-
value: function handleSettingsSave() {
|
|
263
|
-
this.setState(function (_ref3) {
|
|
264
|
-
var column = _ref3.column,
|
|
265
|
-
selectedColumn = _ref3.selectedColumn,
|
|
266
|
-
value = _ref3.value;
|
|
267
|
-
return {
|
|
268
|
-
column: selectedColumn,
|
|
269
|
-
// Reset value if column changed
|
|
270
|
-
value: column === selectedColumn ? value : '',
|
|
271
|
-
isValueShown: true,
|
|
272
|
-
disableCancel: false
|
|
273
|
-
};
|
|
148
|
+
selectedColumn: null
|
|
274
149
|
});
|
|
150
|
+
return;
|
|
275
151
|
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
152
|
+
|
|
153
|
+
var {
|
|
154
|
+
columns: allColumns,
|
|
155
|
+
source
|
|
156
|
+
} = this.props;
|
|
157
|
+
var columns = this.getCompatibleColumns(source, allColumns);
|
|
158
|
+
this.setState({
|
|
159
|
+
selectedColumn: columns[value]
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
handleDropdownKeyPress(event) {
|
|
164
|
+
if (event.key === 'Enter') {
|
|
165
|
+
event.preventDefault();
|
|
279
166
|
event.stopPropagation();
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
key: "handleBackgroundClick",
|
|
284
|
-
value: function handleBackgroundClick(event) {
|
|
285
|
-
// allow clicking anywhere in the background to select and focus the input
|
|
286
|
-
if (event.target !== this.dropdownRef.current) {
|
|
287
|
-
this.focusInput();
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
}, {
|
|
291
|
-
key: "handleMouseEnter",
|
|
292
|
-
value: function handleMouseEnter() {
|
|
293
|
-
var onSourceMouseEnter = this.props.onSourceMouseEnter;
|
|
294
|
-
onSourceMouseEnter();
|
|
295
|
-
}
|
|
296
|
-
}, {
|
|
297
|
-
key: "handleMouseLeave",
|
|
298
|
-
value: function handleMouseLeave() {
|
|
299
|
-
var onSourceMouseLeave = this.props.onSourceMouseLeave;
|
|
300
|
-
onSourceMouseLeave();
|
|
167
|
+
log.debug2('handleDropdownKeyPress');
|
|
168
|
+
this.sendUpdate();
|
|
169
|
+
this.sendUpdate.flush();
|
|
301
170
|
}
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
handleValueChange(event) {
|
|
174
|
+
var {
|
|
175
|
+
value: valueIndex
|
|
176
|
+
} = event.target;
|
|
177
|
+
var index = parseInt(valueIndex, 10); // Default empty string value for 'clear filter'
|
|
178
|
+
|
|
179
|
+
var value = '';
|
|
180
|
+
var {
|
|
181
|
+
values
|
|
182
|
+
} = this.props;
|
|
183
|
+
|
|
184
|
+
if (index === -1) {
|
|
185
|
+
log.debug2('Selected default item');
|
|
186
|
+
} else if (index >= 0 && index < values.length) {
|
|
187
|
+
value = values[index];
|
|
188
|
+
} else {
|
|
189
|
+
log.error('Invalid index', index, values);
|
|
190
|
+
return;
|
|
312
191
|
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
192
|
+
|
|
193
|
+
log.debug2('handleValueChange', value);
|
|
194
|
+
this.setState({
|
|
195
|
+
value
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
handleSettingsCancel() {
|
|
200
|
+
this.setState((_ref2) => {
|
|
201
|
+
var {
|
|
202
|
+
column
|
|
203
|
+
} = _ref2;
|
|
204
|
+
return {
|
|
318
205
|
selectedColumn: column,
|
|
319
|
-
isValueShown:
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
key: "focusInput",
|
|
324
|
-
value: function focusInput() {
|
|
325
|
-
if (this.dropdownRef.current !== null) {
|
|
326
|
-
this.dropdownRef.current.focus();
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
}, {
|
|
330
|
-
key: "resetValue",
|
|
331
|
-
value: function resetValue() {
|
|
332
|
-
this.setState({
|
|
333
|
-
value: ''
|
|
334
|
-
});
|
|
335
|
-
} // Called by the parent component via ref
|
|
206
|
+
isValueShown: true
|
|
207
|
+
};
|
|
208
|
+
});
|
|
209
|
+
}
|
|
336
210
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
211
|
+
handleSettingsSave() {
|
|
212
|
+
this.setState((_ref3) => {
|
|
213
|
+
var {
|
|
214
|
+
column,
|
|
215
|
+
selectedColumn,
|
|
216
|
+
value
|
|
217
|
+
} = _ref3;
|
|
218
|
+
return {
|
|
219
|
+
column: selectedColumn,
|
|
220
|
+
// Reset value if column changed
|
|
221
|
+
value: column === selectedColumn ? value : '',
|
|
222
|
+
isValueShown: true,
|
|
223
|
+
disableCancel: false
|
|
224
|
+
};
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
handleSettingsClick(event) {
|
|
229
|
+
event.stopPropagation();
|
|
230
|
+
this.showSettings();
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
handleBackgroundClick(event) {
|
|
234
|
+
// allow clicking anywhere in the background to select and focus the input
|
|
235
|
+
if (event.target !== this.dropdownRef.current) {
|
|
236
|
+
this.focusInput();
|
|
355
237
|
}
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
isFlipped: isFlipped
|
|
396
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
397
|
-
className: "dropdown-filter-settings-card"
|
|
398
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
399
|
-
className: "dropdown-filter-card-content"
|
|
400
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
401
|
-
className: "dropdown-filter-settings-grid"
|
|
402
|
-
}, /*#__PURE__*/React.createElement("label", null, "Source Column"), /*#__PURE__*/React.createElement(SocketedButton, {
|
|
403
|
-
isLinked: isLinked,
|
|
404
|
-
onClick: onColumnSelected,
|
|
405
|
-
onMouseEnter: onSourceMouseEnter,
|
|
406
|
-
onMouseLeave: onSourceMouseLeave,
|
|
407
|
-
className: DropdownFilter.SOURCE_BUTTON_CLASS_NAME,
|
|
408
|
-
disabled: disableLinking
|
|
409
|
-
}, sourceButtonLabel), /*#__PURE__*/React.createElement("div", {
|
|
410
|
-
className: "text-muted small"
|
|
411
|
-
}, "Select a source column for the list by linking to a table."), /*#__PURE__*/React.createElement("label", null, "Filter Column"), /*#__PURE__*/React.createElement("select", {
|
|
412
|
-
value: selectedIndex,
|
|
413
|
-
className: "custom-select",
|
|
414
|
-
onChange: this.handleColumnChange,
|
|
415
|
-
disabled: columnSelectionDisabled
|
|
416
|
-
}, columnOptions), /*#__PURE__*/React.createElement("div", {
|
|
417
|
-
className: "text-muted small"
|
|
418
|
-
}, "Dropdown filter control will apply its filter to all columns matching this name in this dashboard.")), settingsError && /*#__PURE__*/React.createElement("div", {
|
|
419
|
-
className: "error-message text-center"
|
|
420
|
-
}, settingsError), isLinked && /*#__PURE__*/React.createElement("div", {
|
|
421
|
-
className: "dropdown-filter-settings-buttons"
|
|
422
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
423
|
-
kind: "secondary",
|
|
424
|
-
type: "button",
|
|
425
|
-
onClick: this.handleSettingsCancel,
|
|
426
|
-
disabled: disableCancel || isValueShown || isLinkerActive,
|
|
427
|
-
tooltip: isLinkerActive ? 'Cancel disabled while linker open' : null
|
|
428
|
-
}, "Cancel"), /*#__PURE__*/React.createElement(Button, {
|
|
429
|
-
kind: "primary",
|
|
430
|
-
type: "button",
|
|
431
|
-
className: "ml-2",
|
|
432
|
-
onClick: this.handleSettingsSave,
|
|
433
|
-
disabled: disableSave || isValueShown || isLinkerActive,
|
|
434
|
-
tooltip: isLinkerActive ? 'Save disabled while linker open' : null
|
|
435
|
-
}, "Save")))), /*#__PURE__*/React.createElement("div", {
|
|
436
|
-
className: "dropdown-filter-value-card",
|
|
437
|
-
onClick: this.handleBackgroundClick
|
|
438
|
-
}, isLoaded && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
439
|
-
className: "dropdown-filter-column"
|
|
440
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
441
|
-
className: "dropdown-filter-column-title"
|
|
442
|
-
}, filterTitle)), /*#__PURE__*/React.createElement("div", {
|
|
443
|
-
className: "dropdown-filter-card-content"
|
|
444
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
445
|
-
className: "dropdown-filter-value-input d-flex flex-column justify-content-center"
|
|
446
|
-
}, /*#__PURE__*/React.createElement("select", {
|
|
447
|
-
className: "custom-select",
|
|
448
|
-
value: selectedOption,
|
|
449
|
-
ref: this.dropdownRef,
|
|
450
|
-
onChange: this.handleValueChange,
|
|
451
|
-
onKeyPress: this.handleDropdownKeyPress
|
|
452
|
-
}, valueOptions)), settingsError && /*#__PURE__*/React.createElement("div", {
|
|
453
|
-
className: "error-message mt-3 text-center"
|
|
454
|
-
}, settingsError)), /*#__PURE__*/React.createElement("div", {
|
|
455
|
-
className: "dropdown-filter-menu"
|
|
456
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
457
|
-
type: "button",
|
|
458
|
-
className: "btn btn-link btn-link-icon m-2 px-2",
|
|
459
|
-
onClick: this.handleSettingsClick
|
|
460
|
-
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
461
|
-
icon: vsGear,
|
|
462
|
-
transform: "grow-4"
|
|
463
|
-
}))))));
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
handleMouseEnter() {
|
|
241
|
+
var {
|
|
242
|
+
onSourceMouseEnter
|
|
243
|
+
} = this.props;
|
|
244
|
+
onSourceMouseEnter();
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
handleMouseLeave() {
|
|
248
|
+
var {
|
|
249
|
+
onSourceMouseLeave
|
|
250
|
+
} = this.props;
|
|
251
|
+
onSourceMouseLeave();
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
sourceUpdated() {
|
|
255
|
+
this.setState({
|
|
256
|
+
column: null,
|
|
257
|
+
selectedColumn: null,
|
|
258
|
+
isValueShown: false,
|
|
259
|
+
disableCancel: true,
|
|
260
|
+
value: ''
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
showSettings() {
|
|
265
|
+
var {
|
|
266
|
+
column
|
|
267
|
+
} = this.state;
|
|
268
|
+
this.setState({
|
|
269
|
+
selectedColumn: column,
|
|
270
|
+
isValueShown: false
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
focusInput() {
|
|
275
|
+
if (this.dropdownRef.current !== null) {
|
|
276
|
+
this.dropdownRef.current.focus();
|
|
464
277
|
}
|
|
465
|
-
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
resetValue() {
|
|
281
|
+
this.setState({
|
|
282
|
+
value: ''
|
|
283
|
+
});
|
|
284
|
+
} // Called by the parent component via ref
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
clearFilter() {
|
|
288
|
+
this.resetValue();
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
setFilterState(_ref4) {
|
|
292
|
+
var {
|
|
293
|
+
name,
|
|
294
|
+
type,
|
|
295
|
+
value,
|
|
296
|
+
isValueShown
|
|
297
|
+
} = _ref4;
|
|
298
|
+
var column = name != null && type != null ? {
|
|
299
|
+
name,
|
|
300
|
+
type
|
|
301
|
+
} : null;
|
|
302
|
+
this.setState({
|
|
303
|
+
column,
|
|
304
|
+
value,
|
|
305
|
+
isValueShown
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
sendUpdate() {
|
|
310
|
+
var {
|
|
311
|
+
onChange
|
|
312
|
+
} = this.props;
|
|
313
|
+
var {
|
|
314
|
+
column,
|
|
315
|
+
value,
|
|
316
|
+
isValueShown
|
|
317
|
+
} = this.state;
|
|
318
|
+
onChange({
|
|
319
|
+
column,
|
|
320
|
+
isValueShown,
|
|
321
|
+
value
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
render() {
|
|
326
|
+
var _source$columnName;
|
|
327
|
+
|
|
328
|
+
var {
|
|
329
|
+
columns: allColumns,
|
|
330
|
+
disableLinking,
|
|
331
|
+
isLinkerActive,
|
|
332
|
+
isLoaded,
|
|
333
|
+
source,
|
|
334
|
+
onColumnSelected,
|
|
335
|
+
onSourceMouseEnter,
|
|
336
|
+
onSourceMouseLeave,
|
|
337
|
+
values,
|
|
338
|
+
settingsError
|
|
339
|
+
} = this.props;
|
|
340
|
+
var {
|
|
341
|
+
column,
|
|
342
|
+
disableCancel,
|
|
343
|
+
isValueShown,
|
|
344
|
+
selectedColumn,
|
|
345
|
+
value
|
|
346
|
+
} = this.state;
|
|
347
|
+
var columnSelectionDisabled = source === null;
|
|
348
|
+
var columns = this.getCompatibleColumns(source, allColumns);
|
|
349
|
+
var isLinked = source != null;
|
|
350
|
+
var sourceButtonLabel = (_source$columnName = source === null || source === void 0 ? void 0 : source.columnName) !== null && _source$columnName !== void 0 ? _source$columnName : DropdownFilter.SOURCE_BUTTON_PLACEHOLDER;
|
|
351
|
+
var filterTitle = column != null ? "".concat(column.name, " Filter") : null;
|
|
352
|
+
var [columnOptions, selectedIndex] = this.getColumnOptions(columns, selectedColumn);
|
|
353
|
+
var valueOptions = this.getValueOptions(values);
|
|
354
|
+
var selectedOption = this.getSelectedOptionIndex(values, value);
|
|
355
|
+
var disableSave = !isLinked || selectedColumn == null;
|
|
356
|
+
var isFlipped = isValueShown && !isLinkerActive;
|
|
357
|
+
return /*#__PURE__*/React.createElement(CardFlip, {
|
|
358
|
+
className: "dropdown-filter fill-parent-absolute",
|
|
359
|
+
isFlipped: isFlipped
|
|
360
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
361
|
+
className: "dropdown-filter-settings-card"
|
|
362
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
363
|
+
className: "dropdown-filter-card-content"
|
|
364
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
365
|
+
className: "dropdown-filter-settings-grid"
|
|
366
|
+
}, /*#__PURE__*/React.createElement("label", null, "Source Column"), /*#__PURE__*/React.createElement(SocketedButton, {
|
|
367
|
+
isLinked: isLinked,
|
|
368
|
+
onClick: onColumnSelected,
|
|
369
|
+
onMouseEnter: onSourceMouseEnter,
|
|
370
|
+
onMouseLeave: onSourceMouseLeave,
|
|
371
|
+
className: DropdownFilter.SOURCE_BUTTON_CLASS_NAME,
|
|
372
|
+
disabled: disableLinking
|
|
373
|
+
}, sourceButtonLabel), /*#__PURE__*/React.createElement("div", {
|
|
374
|
+
className: "text-muted small"
|
|
375
|
+
}, "Select a source column for the list by linking to a table."), /*#__PURE__*/React.createElement("label", null, "Filter Column"), /*#__PURE__*/React.createElement("select", {
|
|
376
|
+
value: selectedIndex,
|
|
377
|
+
className: "custom-select",
|
|
378
|
+
onChange: this.handleColumnChange,
|
|
379
|
+
disabled: columnSelectionDisabled
|
|
380
|
+
}, columnOptions), /*#__PURE__*/React.createElement("div", {
|
|
381
|
+
className: "text-muted small"
|
|
382
|
+
}, "Dropdown filter control will apply its filter to all columns matching this name in this dashboard.")), settingsError && /*#__PURE__*/React.createElement("div", {
|
|
383
|
+
className: "error-message text-center"
|
|
384
|
+
}, settingsError), isLinked && /*#__PURE__*/React.createElement("div", {
|
|
385
|
+
className: "dropdown-filter-settings-buttons"
|
|
386
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
387
|
+
kind: "secondary",
|
|
388
|
+
type: "button",
|
|
389
|
+
onClick: this.handleSettingsCancel,
|
|
390
|
+
disabled: disableCancel || isValueShown || isLinkerActive,
|
|
391
|
+
tooltip: isLinkerActive ? 'Cancel disabled while linker open' : null
|
|
392
|
+
}, "Cancel"), /*#__PURE__*/React.createElement(Button, {
|
|
393
|
+
kind: "primary",
|
|
394
|
+
type: "button",
|
|
395
|
+
className: "ml-2",
|
|
396
|
+
onClick: this.handleSettingsSave,
|
|
397
|
+
disabled: disableSave || isValueShown || isLinkerActive,
|
|
398
|
+
tooltip: isLinkerActive ? 'Save disabled while linker open' : null
|
|
399
|
+
}, "Save")))), /*#__PURE__*/React.createElement("div", {
|
|
400
|
+
className: "dropdown-filter-value-card",
|
|
401
|
+
onClick: this.handleBackgroundClick
|
|
402
|
+
}, isLoaded && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
403
|
+
className: "dropdown-filter-column"
|
|
404
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
405
|
+
className: "dropdown-filter-column-title"
|
|
406
|
+
}, filterTitle)), /*#__PURE__*/React.createElement("div", {
|
|
407
|
+
className: "dropdown-filter-card-content"
|
|
408
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
409
|
+
className: "dropdown-filter-value-input d-flex flex-column justify-content-center"
|
|
410
|
+
}, /*#__PURE__*/React.createElement("select", {
|
|
411
|
+
className: "custom-select",
|
|
412
|
+
value: selectedOption,
|
|
413
|
+
ref: this.dropdownRef,
|
|
414
|
+
onChange: this.handleValueChange,
|
|
415
|
+
onKeyPress: this.handleDropdownKeyPress
|
|
416
|
+
}, valueOptions)), settingsError && /*#__PURE__*/React.createElement("div", {
|
|
417
|
+
className: "error-message mt-3 text-center"
|
|
418
|
+
}, settingsError)), /*#__PURE__*/React.createElement("div", {
|
|
419
|
+
className: "dropdown-filter-menu"
|
|
420
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
421
|
+
type: "button",
|
|
422
|
+
className: "btn btn-link btn-link-icon m-2 px-2",
|
|
423
|
+
onClick: this.handleSettingsClick
|
|
424
|
+
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
425
|
+
icon: vsGear,
|
|
426
|
+
transform: "grow-4"
|
|
427
|
+
}))))));
|
|
428
|
+
}
|
|
466
429
|
|
|
467
|
-
|
|
468
|
-
}(Component);
|
|
430
|
+
}
|
|
469
431
|
|
|
470
432
|
_defineProperty(DropdownFilter, "PLACEHOLDER", 'Select a value...');
|
|
471
433
|
|
|
@@ -499,9 +461,9 @@ DropdownFilter.defaultProps = {
|
|
|
499
461
|
source: null,
|
|
500
462
|
value: '',
|
|
501
463
|
values: [],
|
|
502
|
-
onColumnSelected:
|
|
503
|
-
onSourceMouseEnter:
|
|
504
|
-
onSourceMouseLeave:
|
|
464
|
+
onColumnSelected: () => {},
|
|
465
|
+
onSourceMouseEnter: () => {},
|
|
466
|
+
onSourceMouseLeave: () => {}
|
|
505
467
|
};
|
|
506
468
|
export default DropdownFilter;
|
|
507
469
|
//# sourceMappingURL=DropdownFilter.js.map
|