tsichart-core 1.0.5 → 2.0.0-beta.1
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 +22 -22
- package/README.md +80 -0
- package/dist/index.d.ts +1744 -0
- package/dist/index.js +14284 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +14209 -0
- package/dist/index.mjs.map +1 -0
- package/dist/{tsiclient.css → styles/index.css} +9498 -9497
- package/dist/styles/index.css.map +1 -0
- package/package.json +115 -124
- package/README.MD +0 -171
- package/dist/AggregateExpression.d.ts +0 -13
- package/dist/AggregateExpression.js +0 -70
- package/dist/AvailabilityChart-C8ewvn3T.js +0 -488
- package/dist/AvailabilityChart.d.ts +0 -59
- package/dist/AvailabilityChart.js +0 -26
- package/dist/ChartComponent-Dg8P-BTZ.js +0 -302
- package/dist/ChartComponent-ONNW31RL.d.ts +0 -80
- package/dist/ChartComponentData-DBW8_FnY.d.ts +0 -47
- package/dist/ChartDataOptions-CNTSB636.js +0 -49
- package/dist/ChartDataOptions-D0BJuRZy.d.ts +0 -38
- package/dist/ChartVisualizationComponent-CTs5Q_sg.js +0 -23
- package/dist/ChartVisualizationComponent-CpR8xZla.d.ts +0 -8
- package/dist/ColorPicker-0p6vkATj.js +0 -120
- package/dist/ColorPicker.d.ts +0 -28
- package/dist/ColorPicker.js +0 -6
- package/dist/Component-BgifJdKl.js +0 -401
- package/dist/Component-DXwYPoSo.d.ts +0 -226
- package/dist/ContextMenu-wqGGgAzp.js +0 -197
- package/dist/DateTimeButton-D7N8XG0S.js +0 -38
- package/dist/DateTimeButton-DfJL5kvr.d.ts +0 -16
- package/dist/DateTimeButtonRange-BM_J646m.js +0 -71
- package/dist/DateTimeButtonRange.d.ts +0 -19
- package/dist/DateTimeButtonRange.js +0 -15
- package/dist/DateTimeButtonSingle-BxMSitQG.js +0 -48
- package/dist/DateTimeButtonSingle.d.ts +0 -17
- package/dist/DateTimeButtonSingle.js +0 -14
- package/dist/DateTimePicker-BgTi-DY9.js +0 -532
- package/dist/DateTimePicker.d.ts +0 -69
- package/dist/DateTimePicker.js +0 -13
- package/dist/EllipsisMenu-CxJ0LoVm.js +0 -116
- package/dist/EllipsisMenu.d.ts +0 -20
- package/dist/EllipsisMenu.js +0 -6
- package/dist/Enums-DWpaQlXk.d.ts +0 -12
- package/dist/EventsTable-CsnBvvIW.js +0 -553
- package/dist/EventsTable.d.ts +0 -34
- package/dist/EventsTable.js +0 -10
- package/dist/GeoProcessGraphic-CUBMHIHX.js +0 -145
- package/dist/GeoProcessGraphic.d.ts +0 -34
- package/dist/GeoProcessGraphic.js +0 -7
- package/dist/Grid-uoHKTet9.js +0 -874
- package/dist/Grid.d.ts +0 -43
- package/dist/Grid.js +0 -6
- package/dist/GroupedBarChart-Bc3cGhgz.js +0 -579
- package/dist/GroupedBarChart.d.ts +0 -22
- package/dist/GroupedBarChart.js +0 -17
- package/dist/GroupedBarChartData-B7BTM9JH.d.ts +0 -20
- package/dist/GroupedBarChartData-Ml5JJimg.js +0 -121
- package/dist/Heatmap-5gFc_AVW.js +0 -524
- package/dist/Heatmap.d.ts +0 -31
- package/dist/Heatmap.js +0 -14
- package/dist/Hierarchy-C5ueDsus.js +0 -260
- package/dist/Hierarchy.d.ts +0 -39
- package/dist/Hierarchy.js +0 -6
- package/dist/HierarchyNavigation-C3Pwt0D6.js +0 -336
- package/dist/HierarchyNavigation.d.ts +0 -34
- package/dist/HierarchyNavigation.js +0 -6
- package/dist/HistoryPlayback-D09bter3.js +0 -175
- package/dist/HistoryPlayback-DmJ6u7lU.d.ts +0 -68
- package/dist/Interfaces-R_1l9lIT.d.ts +0 -6
- package/dist/Legend-gCIrAytG.js +0 -497
- package/dist/LineChart-CzDp5ULB.js +0 -3181
- package/dist/LineChart.d.ts +0 -163
- package/dist/LineChart.js +0 -18
- package/dist/ModelAutocomplete-lU71Ndju.js +0 -100
- package/dist/ModelAutocomplete.d.ts +0 -12
- package/dist/ModelAutocomplete.js +0 -7
- package/dist/ModelSearch-OF4DygOJ.js +0 -189
- package/dist/ModelSearch.d.ts +0 -23
- package/dist/ModelSearch.js +0 -9
- package/dist/PieChart-XLc9Itne.js +0 -258
- package/dist/PieChart.d.ts +0 -26
- package/dist/PieChart.js +0 -17
- package/dist/PlaybackControls-DbG9gExy.js +0 -195
- package/dist/PlaybackControls.d.ts +0 -39
- package/dist/PlaybackControls.js +0 -13
- package/dist/ProcessGraphic-Cft1b4Mf.js +0 -154
- package/dist/ProcessGraphic.d.ts +0 -31
- package/dist/ProcessGraphic.js +0 -7
- package/dist/ScatterPlot-CdnqSHq2.js +0 -924
- package/dist/ScatterPlot.d.ts +0 -115
- package/dist/ScatterPlot.js +0 -17
- package/dist/SingleDateTimePicker-Ddr-ogTk.js +0 -213
- package/dist/SingleDateTimePicker.d.ts +0 -45
- package/dist/SingleDateTimePicker.js +0 -12
- package/dist/Slider-CX0nvlqx.js +0 -186
- package/dist/Slider.d.ts +0 -31
- package/dist/Slider.js +0 -6
- package/dist/TemporalXAxisComponent-DXmMekYq.js +0 -129
- package/dist/TemporalXAxisComponent-PIeiJYUr.d.ts +0 -23
- package/dist/TimezonePicker-CQpXR5eb.js +0 -58
- package/dist/TimezonePicker.d.ts +0 -16
- package/dist/TimezonePicker.js +0 -10
- package/dist/Tooltip-C13k0eeH.js +0 -104
- package/dist/TsqExpression.d.ts +0 -36
- package/dist/TsqExpression.js +0 -89
- package/dist/UXClient-Bn1afElm.js +0 -230
- package/dist/UXClient.d.ts +0 -74
- package/dist/UXClient.js +0 -47
- package/dist/Utils-BcQeZOM3.d.ts +0 -104
- package/dist/Utils-DDGqSryb.js +0 -1138
- package/dist/Utils.d.ts +0 -7
- package/dist/Utils.js +0 -7
- package/dist/_tslib-BYFmvNeL.js +0 -96
- package/dist/pikaday-jh_aVtJs.js +0 -1252
- package/dist/tsiclient.cjs.js +0 -3
- package/dist/tsiclient.cjs.js.LICENSE.txt +0 -19
- package/dist/tsiclient.cjs.js.map +0 -1
- package/dist/tsiclient.d.ts +0 -46
- package/dist/tsiclient.esm.js +0 -3
- package/dist/tsiclient.esm.js.LICENSE.txt +0 -19
- package/dist/tsiclient.esm.js.map +0 -1
- package/dist/tsiclient.js +0 -58
- package/dist/tsiclient.min.css +0 -6
- package/dist/tsiclient.min.css.map +0 -1
- package/dist/tsiclient.umd.js +0 -3
- package/dist/tsiclient.umd.js.LICENSE.txt +0 -19
- package/dist/tsiclient.umd.js.map +0 -1
- package/dist/tsiclient.umd.min.js +0 -3
- package/dist/tsiclient.umd.min.js.LICENSE.txt +0 -19
- package/dist/tsiclient.umd.min.js.map +0 -1
- package/tsiclient.css +0 -17323
- package/tsiclient.d.ts +0 -46
- package/tsiclient.js +0 -58
- package/tsiclient.min.css +0 -6
package/dist/LineChart.d.ts
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import { T as TemporalXAxisComponent } from './TemporalXAxisComponent-PIeiJYUr.js';
|
|
2
|
-
import { C as ChartComponentData } from './ChartComponentData-DBW8_FnY.js';
|
|
3
|
-
import './ChartVisualizationComponent-CpR8xZla.js';
|
|
4
|
-
import './ChartComponent-ONNW31RL.js';
|
|
5
|
-
import './Enums-DWpaQlXk.js';
|
|
6
|
-
import './Component-DXwYPoSo.js';
|
|
7
|
-
import './Interfaces-R_1l9lIT.js';
|
|
8
|
-
import './EllipsisMenu.js';
|
|
9
|
-
|
|
10
|
-
declare class LineChartData extends ChartComponentData {
|
|
11
|
-
timeMap: any;
|
|
12
|
-
get yExtents(): Array<any>;
|
|
13
|
-
private _yExtents;
|
|
14
|
-
setYExtents(idx: number, value: [number, number]): void;
|
|
15
|
-
resetYExtents(): void;
|
|
16
|
-
setTimeMap(): void;
|
|
17
|
-
constructor();
|
|
18
|
-
mergeDataToDisplayStateAndTimeArrays(data: any, aggregateExpressionOptions?: any): void;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
declare class LineChart extends TemporalXAxisComponent {
|
|
22
|
-
private targetElement;
|
|
23
|
-
private focus;
|
|
24
|
-
private horizontalValueBox;
|
|
25
|
-
private verticalValueBox;
|
|
26
|
-
private horizontalValueBar;
|
|
27
|
-
private contextMenu;
|
|
28
|
-
private brushContextMenu;
|
|
29
|
-
private setDisplayStateFromData;
|
|
30
|
-
private minBrushWidth;
|
|
31
|
-
private strokeOpacity;
|
|
32
|
-
private nonFocusStrokeOpactiy;
|
|
33
|
-
chartComponentData: LineChartData;
|
|
34
|
-
private surpressBrushTimeSet;
|
|
35
|
-
private hasStackedButton;
|
|
36
|
-
private stackedButton;
|
|
37
|
-
private visibleAggCount;
|
|
38
|
-
private swimLaneLabelGroup;
|
|
39
|
-
private horizontalLabelOffset;
|
|
40
|
-
private tooltip;
|
|
41
|
-
private height;
|
|
42
|
-
private xLowerBound;
|
|
43
|
-
private xUpperBound;
|
|
44
|
-
private y;
|
|
45
|
-
private yMap;
|
|
46
|
-
private line;
|
|
47
|
-
private areaPath;
|
|
48
|
-
private envelope;
|
|
49
|
-
private voronoi;
|
|
50
|
-
private possibleTimesArray;
|
|
51
|
-
private colorMap;
|
|
52
|
-
private markers;
|
|
53
|
-
private seriesLabelsMarker;
|
|
54
|
-
private markerGuidMap;
|
|
55
|
-
private isDroppingMarker;
|
|
56
|
-
private activeMarker;
|
|
57
|
-
private brush;
|
|
58
|
-
private brushElem;
|
|
59
|
-
brushStartTime: Date;
|
|
60
|
-
brushEndTime: Date;
|
|
61
|
-
private brushStartPosition;
|
|
62
|
-
private brushEndPosition;
|
|
63
|
-
private hasBrush;
|
|
64
|
-
private isClearingBrush;
|
|
65
|
-
private previousAggregateData;
|
|
66
|
-
private previousIncludeDots;
|
|
67
|
-
private voronoiDiagram;
|
|
68
|
-
private voronoiRegion;
|
|
69
|
-
private mx;
|
|
70
|
-
private my;
|
|
71
|
-
private focusedAggKey;
|
|
72
|
-
private focusedSplitby;
|
|
73
|
-
private plotComponents;
|
|
74
|
-
private isFirstMarkerDrop;
|
|
75
|
-
private xOffset;
|
|
76
|
-
private swimlaneYExtents;
|
|
77
|
-
private swimLaneContents;
|
|
78
|
-
private originalSwimLanes;
|
|
79
|
-
private originalSwimLaneOptions;
|
|
80
|
-
constructor(renderTarget: Element);
|
|
81
|
-
LineChart(): void;
|
|
82
|
-
getBrushPositions(): {
|
|
83
|
-
leftPos: any;
|
|
84
|
-
rightPos: any;
|
|
85
|
-
};
|
|
86
|
-
private resetValueElementsFocus;
|
|
87
|
-
private hideFocusElements;
|
|
88
|
-
private voronoiMouseout;
|
|
89
|
-
private createMarkerInstructions;
|
|
90
|
-
private destroyMarkerInstructions;
|
|
91
|
-
triggerLineFocus: (aggKey: string, splitBy: string) => void;
|
|
92
|
-
private getMouseoverFunction;
|
|
93
|
-
private getMouseoutFunction;
|
|
94
|
-
private focusOnlyHoveredSeries;
|
|
95
|
-
private discreteEventsMouseover;
|
|
96
|
-
private discreteEventsMouseout;
|
|
97
|
-
private mismatchingChartType;
|
|
98
|
-
private categoricalMouseover;
|
|
99
|
-
private categoricalMouseout;
|
|
100
|
-
private setHorizontalValuePosAndText;
|
|
101
|
-
private setVerticalValueAndPosition;
|
|
102
|
-
private voronoiMouseover;
|
|
103
|
-
private getYExtent;
|
|
104
|
-
private getFilteredValues;
|
|
105
|
-
private getFilteredAndSticky;
|
|
106
|
-
stickyOrUnstickySeries: (aggKey: any, splitBy: any) => void;
|
|
107
|
-
unstickySeries: (aggKey: any, splitby?: any) => void;
|
|
108
|
-
private stickySeries;
|
|
109
|
-
private getHandleHeight;
|
|
110
|
-
private getXPosition;
|
|
111
|
-
setBrushStartTime(startTime: any): void;
|
|
112
|
-
setBrushEndTime(endTime: any): void;
|
|
113
|
-
setBrush(): void;
|
|
114
|
-
private findClosestValidTime;
|
|
115
|
-
private getMarkerMarginLeft;
|
|
116
|
-
exportMarkers(): void;
|
|
117
|
-
private createOnMarkerChange;
|
|
118
|
-
private renderMarker;
|
|
119
|
-
private sortMarkers;
|
|
120
|
-
private getAllLinesTransitionsComplete;
|
|
121
|
-
private importMarkers;
|
|
122
|
-
private createSeriesLabelsMarker;
|
|
123
|
-
private renderSeriesLabelsMarker;
|
|
124
|
-
private renderAllMarkers;
|
|
125
|
-
private focusOnEllipsis;
|
|
126
|
-
private filteredValueExist;
|
|
127
|
-
addMarker: () => void;
|
|
128
|
-
private voronoiExists;
|
|
129
|
-
private voronoiMousemove;
|
|
130
|
-
private voronoiContextMenu;
|
|
131
|
-
private voronoiClick;
|
|
132
|
-
private getValueOfVisible;
|
|
133
|
-
private brushBrush;
|
|
134
|
-
private brushEnd;
|
|
135
|
-
private focusMarkerLabel;
|
|
136
|
-
labelMouseout: () => void;
|
|
137
|
-
labelMouseover: (aggregateKey: string, splitBy?: string) => void;
|
|
138
|
-
private drawBrushRange;
|
|
139
|
-
private getSVGLeftOffset;
|
|
140
|
-
updateBrushRange(): void;
|
|
141
|
-
deleteBrushRange(): void;
|
|
142
|
-
getYExtents(): any[];
|
|
143
|
-
private nextStackedState;
|
|
144
|
-
private clearBrush;
|
|
145
|
-
private getVisibleNumerics;
|
|
146
|
-
private getSwimlaneOffsets;
|
|
147
|
-
private setSwimLaneYExtents;
|
|
148
|
-
private getEventsCollapsedSwimlaneHeight;
|
|
149
|
-
private createYOffsets;
|
|
150
|
-
private heightNonNumeric;
|
|
151
|
-
private getGroupYExtent;
|
|
152
|
-
private getAggAxisType;
|
|
153
|
-
private adjustSwimLanes;
|
|
154
|
-
private overwriteSwimLanes;
|
|
155
|
-
private getHorizontalMarkersWithYScales;
|
|
156
|
-
private getAdditionalOffsetFromHorizontalMargin;
|
|
157
|
-
private drawHorizontalMarkers;
|
|
158
|
-
private createSwimlaneLabels;
|
|
159
|
-
render(data: any, options: any, aggregateExpressionOptions: any): void;
|
|
160
|
-
private createPlot;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export { LineChart as default };
|
package/dist/LineChart.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export { L as default } from './LineChart-CzDp5ULB.js';
|
|
2
|
-
import './_tslib-BYFmvNeL.js';
|
|
3
|
-
import 'd3';
|
|
4
|
-
import 'd3-voronoi';
|
|
5
|
-
import './Utils-DDGqSryb.js';
|
|
6
|
-
import 'moment-timezone';
|
|
7
|
-
import './Legend-gCIrAytG.js';
|
|
8
|
-
import './Component-BgifJdKl.js';
|
|
9
|
-
import './TemporalXAxisComponent-DXmMekYq.js';
|
|
10
|
-
import './ChartVisualizationComponent-CTs5Q_sg.js';
|
|
11
|
-
import './ChartComponent-Dg8P-BTZ.js';
|
|
12
|
-
import './Grid-uoHKTet9.js';
|
|
13
|
-
import 'split.js';
|
|
14
|
-
import './EllipsisMenu-CxJ0LoVm.js';
|
|
15
|
-
import './ChartDataOptions-CNTSB636.js';
|
|
16
|
-
import './ContextMenu-wqGGgAzp.js';
|
|
17
|
-
import './Tooltip-C13k0eeH.js';
|
|
18
|
-
import 'd3-interpolate-path';
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { _ as __extends } from './_tslib-BYFmvNeL.js';
|
|
2
|
-
import * as d3 from 'd3';
|
|
3
|
-
import 'awesomplete';
|
|
4
|
-
import { a as ChartOptions, C as Component } from './Component-BgifJdKl.js';
|
|
5
|
-
import { U as Utils } from './Utils-DDGqSryb.js';
|
|
6
|
-
|
|
7
|
-
var ModelAutocomplete = /** @class */ (function (_super) {
|
|
8
|
-
__extends(ModelAutocomplete, _super);
|
|
9
|
-
function ModelAutocomplete(renderTarget) {
|
|
10
|
-
var _this = _super.call(this, renderTarget) || this;
|
|
11
|
-
_this.chartOptions = new ChartOptions(); // TODO handle onkeyup and oninput in chart options
|
|
12
|
-
return _this;
|
|
13
|
-
}
|
|
14
|
-
ModelAutocomplete.prototype.render = function (environmentFqdn, getToken, chartOptions) {
|
|
15
|
-
var _this = this;
|
|
16
|
-
this.chartOptions.setOptions(chartOptions);
|
|
17
|
-
var targetElement = d3.select(this.renderTarget);
|
|
18
|
-
targetElement.html("");
|
|
19
|
-
var wrapper = targetElement
|
|
20
|
-
.append("div")
|
|
21
|
-
.attr("class", "tsi-modelAutocompleteWrapper");
|
|
22
|
-
_super.prototype.themify.call(this, wrapper, this.chartOptions.theme);
|
|
23
|
-
var inputWrapper = wrapper.append("div").attr("class", "tsi-search");
|
|
24
|
-
inputWrapper.append("i").classed("tsi-search-icon", true);
|
|
25
|
-
var input = inputWrapper
|
|
26
|
-
.append("input")
|
|
27
|
-
.attr("class", "tsi-searchInput")
|
|
28
|
-
.attr("aria-label", this.getString("Search Time Series Instances"))
|
|
29
|
-
.attr("aria-describedby", "tsi-search-desc")
|
|
30
|
-
.attr("role", "combobox")
|
|
31
|
-
.attr("aria-owns", "tsi-search-results")
|
|
32
|
-
.attr("aria-expanded", "false")
|
|
33
|
-
.attr("aria-haspopup", "listbox")
|
|
34
|
-
.attr("placeholder", this.getString("Search Time Series Instances") + "...");
|
|
35
|
-
var clear = inputWrapper
|
|
36
|
-
.append("div")
|
|
37
|
-
.attr("class", "tsi-clear")
|
|
38
|
-
.attr("tabindex", "0")
|
|
39
|
-
.attr("role", "button")
|
|
40
|
-
.attr("aria-label", "Clear Search")
|
|
41
|
-
.on("click keydown", function (event) {
|
|
42
|
-
if (Utils.isKeyDownAndNotEnter(event)) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
input.node().value = "";
|
|
46
|
-
noSuggest = true;
|
|
47
|
-
input.dispatch("input");
|
|
48
|
-
self.ap.close();
|
|
49
|
-
d3.select(this).classed("tsi-shown", false);
|
|
50
|
-
});
|
|
51
|
-
inputWrapper
|
|
52
|
-
.append("span")
|
|
53
|
-
.attr("id", "tsi-search-desc")
|
|
54
|
-
.style("display", "none")
|
|
55
|
-
.text(this.getString("Search suggestion instruction"));
|
|
56
|
-
inputWrapper
|
|
57
|
-
.append("div")
|
|
58
|
-
.attr("class", "tsi-search-results-info")
|
|
59
|
-
.attr("aria-live", "assertive");
|
|
60
|
-
var Awesomplete = window.Awesomplete;
|
|
61
|
-
this.ap = new Awesomplete(input.node(), { minChars: 1 });
|
|
62
|
-
var noSuggest = false;
|
|
63
|
-
var justAwesompleted = false;
|
|
64
|
-
input.node().addEventListener("awesomplete-selectcomplete", function (event) {
|
|
65
|
-
noSuggest = true;
|
|
66
|
-
input.dispatch("input");
|
|
67
|
-
_this.ap.close();
|
|
68
|
-
justAwesompleted = true;
|
|
69
|
-
});
|
|
70
|
-
input.on("keydown", function (event) {
|
|
71
|
-
_this.chartOptions.onKeydown(event, _this.ap);
|
|
72
|
-
});
|
|
73
|
-
input.node().addEventListener("keyup", function (event) {
|
|
74
|
-
if (justAwesompleted) {
|
|
75
|
-
justAwesompleted = false;
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
var key = event.which || event.keyCode;
|
|
79
|
-
if (key === 13) {
|
|
80
|
-
noSuggest = true;
|
|
81
|
-
input.dispatch("input");
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
var searchText;
|
|
85
|
-
var self = this;
|
|
86
|
-
input.on("input", function (event) {
|
|
87
|
-
searchText = this.value;
|
|
88
|
-
if (searchText.replace(/ /g, "") && !noSuggest) ;
|
|
89
|
-
else {
|
|
90
|
-
self.ap.close();
|
|
91
|
-
}
|
|
92
|
-
self.chartOptions.onInput(searchText, noSuggest ? { which: 13 } : event);
|
|
93
|
-
noSuggest = false;
|
|
94
|
-
clear.classed("tsi-shown", searchText.length);
|
|
95
|
-
});
|
|
96
|
-
};
|
|
97
|
-
return ModelAutocomplete;
|
|
98
|
-
}(Component));
|
|
99
|
-
|
|
100
|
-
export { ModelAutocomplete as M };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { C as Component } from './Component-DXwYPoSo.js';
|
|
2
|
-
import './Enums-DWpaQlXk.js';
|
|
3
|
-
import './Interfaces-R_1l9lIT.js';
|
|
4
|
-
|
|
5
|
-
declare class ModelAutocomplete extends Component {
|
|
6
|
-
chartOptions: any;
|
|
7
|
-
ap: any;
|
|
8
|
-
constructor(renderTarget: Element);
|
|
9
|
-
render(environmentFqdn: string, getToken: any, chartOptions: any): void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { ModelAutocomplete as default };
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { _ as __extends, a as __assign } from './_tslib-BYFmvNeL.js';
|
|
2
|
-
import * as d3 from 'd3';
|
|
3
|
-
import { U as Utils } from './Utils-DDGqSryb.js';
|
|
4
|
-
import { C as Component } from './Component-BgifJdKl.js';
|
|
5
|
-
import 'awesomplete';
|
|
6
|
-
import { H as Hierarchy } from './Hierarchy-C5ueDsus.js';
|
|
7
|
-
import { M as ModelAutocomplete } from './ModelAutocomplete-lU71Ndju.js';
|
|
8
|
-
|
|
9
|
-
var ModelSearch = /** @class */ (function (_super) {
|
|
10
|
-
__extends(ModelSearch, _super);
|
|
11
|
-
function ModelSearch(renderTarget) {
|
|
12
|
-
var _this = _super.call(this, renderTarget) || this;
|
|
13
|
-
_this.usedContinuationTokens = {};
|
|
14
|
-
_this.currentResultIndex = -1;
|
|
15
|
-
_this.stripHits = function (str) {
|
|
16
|
-
return str
|
|
17
|
-
.split("<hit>")
|
|
18
|
-
.map(function (h) {
|
|
19
|
-
return h
|
|
20
|
-
.split("</hit>")
|
|
21
|
-
.map(function (h2) { return Utils.strip(h2); })
|
|
22
|
-
.join("</hit>");
|
|
23
|
-
})
|
|
24
|
-
.join("<hit>");
|
|
25
|
-
};
|
|
26
|
-
d3.select("html").on("click." + Utils.guid(), function (event) {
|
|
27
|
-
if (_this.clickedInstance &&
|
|
28
|
-
event.target != _this.clickedInstance &&
|
|
29
|
-
_this.contextMenu) {
|
|
30
|
-
_this.closeContextMenu();
|
|
31
|
-
_this.clickedInstance = null;
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
return _this;
|
|
35
|
-
}
|
|
36
|
-
ModelSearch.prototype.ModelSearch = function () { };
|
|
37
|
-
ModelSearch.prototype.render = function (environmentFqdn, getToken, hierarchyData, chartOptions) {
|
|
38
|
-
var _this = this;
|
|
39
|
-
this.chartOptions.setOptions(chartOptions);
|
|
40
|
-
var self = this;
|
|
41
|
-
var continuationToken, searchText;
|
|
42
|
-
var targetElement = d3.select(this.renderTarget);
|
|
43
|
-
targetElement.html("");
|
|
44
|
-
this.wrapper = targetElement
|
|
45
|
-
.append("div")
|
|
46
|
-
.attr("class", "tsi-modelSearchWrapper");
|
|
47
|
-
_super.prototype.themify.call(this, this.wrapper, this.chartOptions.theme);
|
|
48
|
-
var inputWrapper = this.wrapper
|
|
49
|
-
.append("div")
|
|
50
|
-
.attr("class", "tsi-modelSearchInputWrapper");
|
|
51
|
-
var autocompleteOnInput = function (st, event) {
|
|
52
|
-
self.usedContinuationTokens = {};
|
|
53
|
-
// blow results away if no text
|
|
54
|
-
if (st.length === 0) {
|
|
55
|
-
searchText = st;
|
|
56
|
-
self.instanceResults.html("");
|
|
57
|
-
self.currentResultIndex = -1;
|
|
58
|
-
hierarchyElement.node().style.display = "block";
|
|
59
|
-
showMore.node().style.display = "none";
|
|
60
|
-
noResults.style("display", "none");
|
|
61
|
-
}
|
|
62
|
-
else if (event.which === 13 || event.keyCode === 13) {
|
|
63
|
-
hierarchyElement.node().style.display = "none";
|
|
64
|
-
self.instanceResults.html("");
|
|
65
|
-
self.currentResultIndex = -1;
|
|
66
|
-
noResults.style("display", "none");
|
|
67
|
-
searchInstances();
|
|
68
|
-
searchText = st;
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
var modelAutocomplete = new ModelAutocomplete(inputWrapper.node());
|
|
72
|
-
modelAutocomplete.render(environmentFqdn, getToken, __assign({ onInput: autocompleteOnInput, onKeydown: function (event, ap) {
|
|
73
|
-
_this.handleKeydown(event, ap);
|
|
74
|
-
} }, chartOptions));
|
|
75
|
-
modelAutocomplete.ap;
|
|
76
|
-
var results = this.wrapper
|
|
77
|
-
.append("div")
|
|
78
|
-
.attr("class", "tsi-modelSearchResults")
|
|
79
|
-
.on("scroll", function () {
|
|
80
|
-
self.closeContextMenu();
|
|
81
|
-
var that = this;
|
|
82
|
-
if (that.scrollTop + that.clientHeight + 150 >
|
|
83
|
-
self.instanceResults.node().clientHeight &&
|
|
84
|
-
searchText.length !== 0) {
|
|
85
|
-
searchInstances(searchText, continuationToken);
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
var noResults = results
|
|
89
|
-
.append("div")
|
|
90
|
-
.text(this.getString("No results"))
|
|
91
|
-
.classed("tsi-noResults", true)
|
|
92
|
-
.style("display", "none");
|
|
93
|
-
var instanceResultsWrapper = results
|
|
94
|
-
.append("div")
|
|
95
|
-
.attr("class", "tsi-modelSearchInstancesWrapper");
|
|
96
|
-
this.instanceResults = instanceResultsWrapper
|
|
97
|
-
.append("div")
|
|
98
|
-
.attr("class", "tsi-modelSearchInstances");
|
|
99
|
-
var showMore = instanceResultsWrapper
|
|
100
|
-
.append("div")
|
|
101
|
-
.attr("class", "tsi-showMore")
|
|
102
|
-
.text(this.getString("Show more") + "...")
|
|
103
|
-
.on("click", function () { return searchInstances(searchText, continuationToken); })
|
|
104
|
-
.style("display", "none");
|
|
105
|
-
var hierarchyElement = this.wrapper
|
|
106
|
-
.append("div")
|
|
107
|
-
.attr("class", "tsi-hierarchyWrapper");
|
|
108
|
-
var hierarchy = new Hierarchy(hierarchyElement.node());
|
|
109
|
-
hierarchy.render(hierarchyData, __assign(__assign({}, this.chartOptions), { withContextMenu: true }));
|
|
110
|
-
var searchInstances = function (searchText, ct) {
|
|
111
|
-
if (ct === void 0) { ct = null; }
|
|
112
|
-
var self = _this;
|
|
113
|
-
if (ct === "END")
|
|
114
|
-
return;
|
|
115
|
-
if (ct === null || !self.usedContinuationTokens[ct]) {
|
|
116
|
-
self.usedContinuationTokens[ct] = true;
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
getToken().then(function (token) {
|
|
120
|
-
});
|
|
121
|
-
// get types
|
|
122
|
-
getToken().then(function (token) {
|
|
123
|
-
});
|
|
124
|
-
};
|
|
125
|
-
ModelSearch.prototype.handleKeydown = function (event, ap) {
|
|
126
|
-
if (!ap.isOpened) {
|
|
127
|
-
var results = this.instanceResults.selectAll(".tsi-modelResultWrapper");
|
|
128
|
-
if (results.size()) {
|
|
129
|
-
if (event.keyCode === 40 &&
|
|
130
|
-
this.currentResultIndex < results.nodes().length - 1) {
|
|
131
|
-
this.currentResultIndex++;
|
|
132
|
-
results.nodes()[this.currentResultIndex].focus();
|
|
133
|
-
}
|
|
134
|
-
else if (event.keyCode === 38) {
|
|
135
|
-
this.currentResultIndex--;
|
|
136
|
-
if (this.currentResultIndex <= -1) {
|
|
137
|
-
this.currentResultIndex = -1;
|
|
138
|
-
ap.input.focus();
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
results.nodes()[this.currentResultIndex].focus();
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
ModelSearch.prototype.closeContextMenu = function () {
|
|
148
|
-
if (this.contextMenu) {
|
|
149
|
-
this.contextMenu.remove();
|
|
150
|
-
}
|
|
151
|
-
d3.selectAll(".tsi-resultSelected").classed("tsi-resultSelected", false);
|
|
152
|
-
};
|
|
153
|
-
ModelSearch.prototype.getInstanceHtml = function (i) {
|
|
154
|
-
var _this = this;
|
|
155
|
-
return "<div class=\"tsi-modelResult\">\n <div class=\"tsi-modelPK\">\n ".concat(i.highlights.name
|
|
156
|
-
? this.stripHits(i.highlights.name)
|
|
157
|
-
: this.stripHits(i.highlights.timeSeriesIds
|
|
158
|
-
? i.highlights.timeSeriesIds.join(" ")
|
|
159
|
-
: i.highlights.timeSeriesId.join(" ")), "\n </div>\n <div class=\"tsi-modelHighlights\">\n ").concat(this.stripHits(i.highlights.description &&
|
|
160
|
-
i.highlights.description.length
|
|
161
|
-
? i.highlights.description
|
|
162
|
-
: this.getString("No description")), "\n <br/><table>\n ").concat(i.highlights.name
|
|
163
|
-
? "<tr><td>" +
|
|
164
|
-
this.getString("Time Series ID") +
|
|
165
|
-
"</td><td>" +
|
|
166
|
-
this.stripHits(i.highlights.timeSeriesIds
|
|
167
|
-
? i.highlights.timeSeriesIds.join(" ")
|
|
168
|
-
: i.highlights.timeSeriesId.join(" ")) +
|
|
169
|
-
"</td></tr>"
|
|
170
|
-
: "", " \n ").concat(i.highlights.instanceFieldNames
|
|
171
|
-
.map(function (ifn, idx) {
|
|
172
|
-
var val = i.highlights.instanceFieldValues[idx];
|
|
173
|
-
if (ifn.indexOf("<hit>") !== -1 ||
|
|
174
|
-
val.indexOf("<hit>") !== -1) {
|
|
175
|
-
return val.length === 0
|
|
176
|
-
? ""
|
|
177
|
-
: "<tr><td>" +
|
|
178
|
-
_this.stripHits(ifn) +
|
|
179
|
-
"</td><td>" +
|
|
180
|
-
_this.stripHits(val) +
|
|
181
|
-
"</tr>";
|
|
182
|
-
}
|
|
183
|
-
})
|
|
184
|
-
.join(""), "\n </table>\n </div>\n </div>");
|
|
185
|
-
};
|
|
186
|
-
return ModelSearch;
|
|
187
|
-
}(Component));
|
|
188
|
-
|
|
189
|
-
export { ModelSearch as M };
|
package/dist/ModelSearch.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { C as Component } from './Component-DXwYPoSo.js';
|
|
2
|
-
import './Enums-DWpaQlXk.js';
|
|
3
|
-
import './Interfaces-R_1l9lIT.js';
|
|
4
|
-
|
|
5
|
-
declare class ModelSearch extends Component {
|
|
6
|
-
private hierarchies;
|
|
7
|
-
private clickedInstance;
|
|
8
|
-
private wrapper;
|
|
9
|
-
private types;
|
|
10
|
-
private instanceResults;
|
|
11
|
-
private usedContinuationTokens;
|
|
12
|
-
private contextMenu;
|
|
13
|
-
private currentResultIndex;
|
|
14
|
-
constructor(renderTarget: Element);
|
|
15
|
-
ModelSearch(): void;
|
|
16
|
-
render(environmentFqdn: string, getToken: any, hierarchyData: any, chartOptions: any): void;
|
|
17
|
-
handleKeydown(event: any, ap: any): void;
|
|
18
|
-
private closeContextMenu;
|
|
19
|
-
private stripHits;
|
|
20
|
-
private getInstanceHtml;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export { ModelSearch as default };
|
package/dist/ModelSearch.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { M as default } from './ModelSearch-OF4DygOJ.js';
|
|
2
|
-
import './_tslib-BYFmvNeL.js';
|
|
3
|
-
import 'd3';
|
|
4
|
-
import './Utils-DDGqSryb.js';
|
|
5
|
-
import 'moment-timezone';
|
|
6
|
-
import './Component-BgifJdKl.js';
|
|
7
|
-
import 'awesomplete';
|
|
8
|
-
import './Hierarchy-C5ueDsus.js';
|
|
9
|
-
import './ModelAutocomplete-lU71Ndju.js';
|