tsichart-core 1.0.4 → 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.
Files changed (133) hide show
  1. package/LICENSE +22 -22
  2. package/README.md +80 -0
  3. package/dist/index.d.ts +1744 -0
  4. package/dist/index.js +14284 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.mjs +14209 -0
  7. package/dist/index.mjs.map +1 -0
  8. package/dist/{tsiclient.css → styles/index.css} +9388 -9387
  9. package/dist/styles/index.css.map +1 -0
  10. package/package.json +115 -125
  11. package/README.MD +0 -171
  12. package/dist/AggregateExpression.d.ts +0 -13
  13. package/dist/AggregateExpression.js +0 -70
  14. package/dist/AvailabilityChart-vciRThEz.js +0 -488
  15. package/dist/AvailabilityChart.d.ts +0 -59
  16. package/dist/AvailabilityChart.js +0 -26
  17. package/dist/ChartComponent-BxPbycj0.js +0 -302
  18. package/dist/ChartComponent-L_dR-Eny.d.ts +0 -80
  19. package/dist/ChartComponentData-ClzAtU_E.d.ts +0 -47
  20. package/dist/ChartDataOptions-DBu_M5gU.d.ts +0 -38
  21. package/dist/ChartDataOptions-rcIzlQJO.js +0 -49
  22. package/dist/ChartVisualizationComponent-CswB2P7Z.d.ts +0 -8
  23. package/dist/ChartVisualizationComponent-NsvZCsc-.js +0 -23
  24. package/dist/ColorPicker-CUZt1uup.js +0 -120
  25. package/dist/ColorPicker.d.ts +0 -28
  26. package/dist/ColorPicker.js +0 -6
  27. package/dist/Component-C9fQU2ia.js +0 -401
  28. package/dist/Component-CdI_Pyko.d.ts +0 -226
  29. package/dist/ContextMenu-CP1qV7pP.js +0 -197
  30. package/dist/DateTimeButton-Ck71nL87.d.ts +0 -16
  31. package/dist/DateTimeButton-DnqhATyX.js +0 -38
  32. package/dist/DateTimeButtonRange-CT1zOoCf.js +0 -71
  33. package/dist/DateTimeButtonRange.d.ts +0 -19
  34. package/dist/DateTimeButtonRange.js +0 -15
  35. package/dist/DateTimeButtonSingle-DZk5fW35.js +0 -48
  36. package/dist/DateTimeButtonSingle.d.ts +0 -17
  37. package/dist/DateTimeButtonSingle.js +0 -14
  38. package/dist/DateTimePicker-CuGwz86U.js +0 -532
  39. package/dist/DateTimePicker.d.ts +0 -69
  40. package/dist/DateTimePicker.js +0 -13
  41. package/dist/EllipsisMenu-CNWSo-qQ.js +0 -116
  42. package/dist/EllipsisMenu.d.ts +0 -20
  43. package/dist/EllipsisMenu.js +0 -6
  44. package/dist/Enums-CEhu18PC.d.ts +0 -12
  45. package/dist/EventsTable-mjoOfc0E.js +0 -553
  46. package/dist/EventsTable.d.ts +0 -34
  47. package/dist/EventsTable.js +0 -10
  48. package/dist/GeoProcessGraphic-CSsTL4zj.js +0 -145
  49. package/dist/GeoProcessGraphic.d.ts +0 -34
  50. package/dist/GeoProcessGraphic.js +0 -7
  51. package/dist/Grid-ByDh3Qdn.js +0 -874
  52. package/dist/Grid.d.ts +0 -43
  53. package/dist/Grid.js +0 -6
  54. package/dist/GroupedBarChart-DrSrSHNj.js +0 -579
  55. package/dist/GroupedBarChart.d.ts +0 -22
  56. package/dist/GroupedBarChart.js +0 -17
  57. package/dist/GroupedBarChartData-CpJKvTDQ.js +0 -121
  58. package/dist/GroupedBarChartData-DK30DLVh.d.ts +0 -20
  59. package/dist/Heatmap-BbWcAgp6.js +0 -524
  60. package/dist/Heatmap.d.ts +0 -31
  61. package/dist/Heatmap.js +0 -14
  62. package/dist/Hierarchy-BsvoKnCY.js +0 -260
  63. package/dist/Hierarchy.d.ts +0 -39
  64. package/dist/Hierarchy.js +0 -6
  65. package/dist/HierarchyNavigation-C5yoj--u.js +0 -336
  66. package/dist/HierarchyNavigation.d.ts +0 -34
  67. package/dist/HierarchyNavigation.js +0 -6
  68. package/dist/HistoryPlayback-DIhAsAOi.d.ts +0 -68
  69. package/dist/HistoryPlayback-DiflRzRf.js +0 -175
  70. package/dist/Interfaces-CdAVFIA6.d.ts +0 -6
  71. package/dist/Legend-CQ5yaF8f.js +0 -497
  72. package/dist/LineChart-DcUenMrZ.js +0 -3181
  73. package/dist/LineChart.d.ts +0 -163
  74. package/dist/LineChart.js +0 -18
  75. package/dist/ModelAutocomplete-sxVy4m65.js +0 -100
  76. package/dist/ModelAutocomplete.d.ts +0 -12
  77. package/dist/ModelAutocomplete.js +0 -7
  78. package/dist/ModelSearch-DEg5KwKw.js +0 -189
  79. package/dist/ModelSearch.d.ts +0 -23
  80. package/dist/ModelSearch.js +0 -9
  81. package/dist/PieChart-DDxMXcXE.js +0 -258
  82. package/dist/PieChart.d.ts +0 -26
  83. package/dist/PieChart.js +0 -17
  84. package/dist/PlaybackControls-DSoUncDP.js +0 -195
  85. package/dist/PlaybackControls.d.ts +0 -39
  86. package/dist/PlaybackControls.js +0 -13
  87. package/dist/ProcessGraphic-1f-FoGDy.js +0 -154
  88. package/dist/ProcessGraphic.d.ts +0 -31
  89. package/dist/ProcessGraphic.js +0 -7
  90. package/dist/README.MD +0 -171
  91. package/dist/ScatterPlot-BAn6r8ml.js +0 -924
  92. package/dist/ScatterPlot.d.ts +0 -115
  93. package/dist/ScatterPlot.js +0 -17
  94. package/dist/SingleDateTimePicker-BrFB5iPu.js +0 -213
  95. package/dist/SingleDateTimePicker.d.ts +0 -45
  96. package/dist/SingleDateTimePicker.js +0 -12
  97. package/dist/Slider-BpNCqoBD.js +0 -186
  98. package/dist/Slider.d.ts +0 -31
  99. package/dist/Slider.js +0 -6
  100. package/dist/TemporalXAxisComponent-BsTQyVO6.js +0 -129
  101. package/dist/TemporalXAxisComponent-DohbI08i.d.ts +0 -23
  102. package/dist/TimezonePicker-DHkC2iKE.js +0 -58
  103. package/dist/TimezonePicker.d.ts +0 -16
  104. package/dist/TimezonePicker.js +0 -10
  105. package/dist/Tooltip-B-mIKo4g.js +0 -104
  106. package/dist/TsqExpression.d.ts +0 -36
  107. package/dist/TsqExpression.js +0 -89
  108. package/dist/UXClient-BTulvzpq.js +0 -230
  109. package/dist/UXClient.d.ts +0 -74
  110. package/dist/UXClient.js +0 -47
  111. package/dist/Utils-CdKMmmwx.js +0 -1138
  112. package/dist/Utils-ChzaAbch.d.ts +0 -104
  113. package/dist/Utils.d.ts +0 -7
  114. package/dist/Utils.js +0 -7
  115. package/dist/_tslib-DYvz7dIO.js +0 -96
  116. package/dist/package.json +0 -125
  117. package/dist/pikaday-C_DS7oEN.js +0 -1252
  118. package/dist/tsiclient.cjs.js +0 -3
  119. package/dist/tsiclient.cjs.js.LICENSE.txt +0 -19
  120. package/dist/tsiclient.cjs.js.map +0 -1
  121. package/dist/tsiclient.d.ts +0 -46
  122. package/dist/tsiclient.esm.js +0 -3
  123. package/dist/tsiclient.esm.js.LICENSE.txt +0 -19
  124. package/dist/tsiclient.esm.js.map +0 -1
  125. package/dist/tsiclient.js +0 -58
  126. package/dist/tsiclient.min.css +0 -6
  127. package/dist/tsiclient.min.css.map +0 -1
  128. package/dist/tsiclient.umd.js +0 -3
  129. package/dist/tsiclient.umd.js.LICENSE.txt +0 -19
  130. package/dist/tsiclient.umd.js.map +0 -1
  131. package/dist/tsiclient.umd.min.js +0 -3
  132. package/dist/tsiclient.umd.min.js.LICENSE.txt +0 -19
  133. package/dist/tsiclient.umd.min.js.map +0 -1
@@ -1,163 +0,0 @@
1
- import { T as TemporalXAxisComponent } from './TemporalXAxisComponent-DohbI08i.js';
2
- import { C as ChartComponentData } from './ChartComponentData-ClzAtU_E.js';
3
- import './ChartVisualizationComponent-CswB2P7Z.js';
4
- import './ChartComponent-L_dR-Eny.js';
5
- import './Enums-CEhu18PC.js';
6
- import './Component-CdI_Pyko.js';
7
- import './Interfaces-CdAVFIA6.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-DcUenMrZ.js';
2
- import './_tslib-DYvz7dIO.js';
3
- import 'd3';
4
- import 'd3-voronoi';
5
- import './Utils-CdKMmmwx.js';
6
- import 'moment-timezone';
7
- import './Legend-CQ5yaF8f.js';
8
- import './Component-C9fQU2ia.js';
9
- import './TemporalXAxisComponent-BsTQyVO6.js';
10
- import './ChartVisualizationComponent-NsvZCsc-.js';
11
- import './ChartComponent-BxPbycj0.js';
12
- import './Grid-ByDh3Qdn.js';
13
- import 'split.js';
14
- import './EllipsisMenu-CNWSo-qQ.js';
15
- import './ChartDataOptions-rcIzlQJO.js';
16
- import './ContextMenu-CP1qV7pP.js';
17
- import './Tooltip-B-mIKo4g.js';
18
- import 'd3-interpolate-path';
@@ -1,100 +0,0 @@
1
- import { _ as __extends } from './_tslib-DYvz7dIO.js';
2
- import * as d3 from 'd3';
3
- import 'awesomplete';
4
- import { a as ChartOptions, C as Component } from './Component-C9fQU2ia.js';
5
- import { U as Utils } from './Utils-CdKMmmwx.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-CdI_Pyko.js';
2
- import './Enums-CEhu18PC.js';
3
- import './Interfaces-CdAVFIA6.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,7 +0,0 @@
1
- export { M as default } from './ModelAutocomplete-sxVy4m65.js';
2
- import './_tslib-DYvz7dIO.js';
3
- import 'd3';
4
- import 'awesomplete';
5
- import './Component-C9fQU2ia.js';
6
- import './Utils-CdKMmmwx.js';
7
- import 'moment-timezone';
@@ -1,189 +0,0 @@
1
- import { _ as __extends, a as __assign } from './_tslib-DYvz7dIO.js';
2
- import * as d3 from 'd3';
3
- import { U as Utils } from './Utils-CdKMmmwx.js';
4
- import { C as Component } from './Component-C9fQU2ia.js';
5
- import 'awesomplete';
6
- import { H as Hierarchy } from './Hierarchy-BsvoKnCY.js';
7
- import { M as ModelAutocomplete } from './ModelAutocomplete-sxVy4m65.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 };
@@ -1,23 +0,0 @@
1
- import { C as Component } from './Component-CdI_Pyko.js';
2
- import './Enums-CEhu18PC.js';
3
- import './Interfaces-CdAVFIA6.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 };
@@ -1,9 +0,0 @@
1
- export { M as default } from './ModelSearch-DEg5KwKw.js';
2
- import './_tslib-DYvz7dIO.js';
3
- import 'd3';
4
- import './Utils-CdKMmmwx.js';
5
- import 'moment-timezone';
6
- import './Component-C9fQU2ia.js';
7
- import 'awesomplete';
8
- import './Hierarchy-BsvoKnCY.js';
9
- import './ModelAutocomplete-sxVy4m65.js';