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,226 +0,0 @@
1
- import { Y as YAxisStates, T as TooltipMeasureFormat } from './Enums-CEhu18PC.js';
2
- import { H as HorizontalMarker } from './Interfaces-CdAVFIA6.js';
3
-
4
- declare class Strings {
5
- private stringValueDefaults;
6
- private stringValues;
7
- constructor();
8
- mergeStrings(stringKeyValues: any): void;
9
- getString(stringKey: string): any;
10
- toObject(): any;
11
- }
12
-
13
- interface swimLaneOption {
14
- yAxisType: YAxisStates;
15
- label?: string;
16
- onClick?: (lane: number) => any;
17
- collapseEvents?: string;
18
- horizontalMarkers?: Array<HorizontalMarker>;
19
- }
20
- declare class ChartOptions {
21
- aggTopMargin: number;
22
- arcWidthRatio: number;
23
- autoTriggerBrushContextMenu: boolean;
24
- availabilityLeftMargin: number;
25
- bucketSizeMillis: number;
26
- brushClearable: boolean;
27
- brushContextMenuActions: Array<any>;
28
- brushHandlesVisible: boolean;
29
- brushMoveAction: any;
30
- brushMoveEndAction: any;
31
- brushRangeVisible: boolean;
32
- canDownload: boolean;
33
- color: string;
34
- colors: Array<string>;
35
- dateLocale: string;
36
- defaultAvailabilityZoomRangeMillis: number;
37
- defaultColor: any;
38
- dTPIsModal: boolean;
39
- ellipsisItems: Array<any>;
40
- focusHidden: boolean;
41
- fromChart: boolean;
42
- grid: boolean;
43
- hideChartControlPanel: boolean;
44
- includeDots: boolean;
45
- includeEnvelope: boolean;
46
- includeTimezones: boolean;
47
- initialValue: any;
48
- interpolationFunction: any;
49
- isArea: boolean;
50
- isColorValueHidden: boolean;
51
- isCompact: boolean;
52
- isTemporal: boolean;
53
- is24HourTime: boolean;
54
- keepBrush: boolean;
55
- keepSplitByColor: boolean;
56
- labelSeriesWithMarker: boolean;
57
- legend: string;
58
- markers: Array<any>;
59
- maxBuckets: number;
60
- minBrushWidth: number;
61
- minutesForTimeLabels: boolean;
62
- noAnimate: boolean;
63
- numberOfColors: number;
64
- updateInterval: number;
65
- offset: any;
66
- isRelative: any;
67
- currentQuickTime: any;
68
- onClick: (d3Event: any) => void;
69
- onInput: (searchText: string, event: any) => void;
70
- onInstanceClick: (instance: any) => any;
71
- onKeydown: (d3Event: any, awesompleteObject: any) => void;
72
- onMarkersChange: (markers: Array<number>) => any;
73
- onMouseout: () => void;
74
- onMouseover: (aggKey: string, splitBy: string) => void;
75
- onSelect: (value: any) => void;
76
- onSticky: (aggKey: string, splitBy: string) => void;
77
- onUnsticky: (aggKey: string, splitBy: string) => void;
78
- preserveAvailabilityState: boolean;
79
- persistDateTimeButtonRange: boolean;
80
- scaledToCurrentTime: boolean;
81
- spMeasures: Array<string>;
82
- scatterPlotRadius: Array<number>;
83
- spAxisLabels: Array<string>;
84
- singleLineXAxisLabel: boolean;
85
- snapBrush: boolean;
86
- stacked: boolean;
87
- shouldSticky: boolean;
88
- strings: any;
89
- suppressResizeListener: boolean;
90
- swimLaneOptions: {
91
- [key: number]: swimLaneOption;
92
- } | null;
93
- theme: string;
94
- timeFrame: any;
95
- timestamp: any;
96
- tooltip: boolean;
97
- throttleSlider: boolean;
98
- warmStoreRange: Array<string>;
99
- xAxisHidden: boolean;
100
- xAxisTimeFormat: (d: any, i: any, isFirst: any, isLast: any) => {};
101
- yAxisHidden: boolean;
102
- yAxisState: string;
103
- yExtent: any;
104
- zeroYAxis: boolean;
105
- withContextMenu: boolean;
106
- hierarchyOptions: any;
107
- onError: (titleKey: any, messageKey: any, xhr: any) => any;
108
- timeSeriesIdProperties: Array<{
109
- name: string;
110
- type: any;
111
- }>;
112
- stringsInstance: Strings;
113
- private getInterpolationFunction;
114
- setOptions(chartOptionsObj: any): void;
115
- private mergeStrings;
116
- private mergeValue;
117
- toObject(): {
118
- grid: boolean;
119
- preserveAvailabilityState: boolean;
120
- persistDateTimeButtonRange: boolean;
121
- isCompact: boolean;
122
- keepBrush: boolean;
123
- isArea: boolean;
124
- noAnimate: boolean;
125
- minutesForTimeLabels: boolean;
126
- aggTopMargin: number;
127
- color: string;
128
- maxBuckets: number;
129
- yAxisHidden: boolean;
130
- focusHidden: boolean;
131
- singleLineXAxisLabel: boolean;
132
- legend: string;
133
- tooltip: boolean;
134
- throttleSlider: boolean;
135
- snapBrush: boolean;
136
- minBrushWidth: number;
137
- theme: string;
138
- keepSplitByColor: boolean;
139
- brushContextMenuActions: any[];
140
- timeFrame: any;
141
- fromChart: boolean;
142
- timestamp: any;
143
- stacked: boolean;
144
- scaledToCurrentTime: boolean;
145
- zeroYAxis: boolean;
146
- arcWidthRatio: number;
147
- brushClearable: boolean;
148
- brushMoveAction: any;
149
- yAxisState: string;
150
- xAxisHidden: boolean;
151
- suppressResizeListener: boolean;
152
- brushMoveEndAction: any;
153
- onMouseout: () => void;
154
- onMouseover: (aggKey: string, splitBy: string) => void;
155
- onSticky: (aggKey: string, splitBy: string) => void;
156
- onUnsticky: (aggKey: string, splitBy: string) => void;
157
- onKeydown: (d3Event: any, awesompleteObject: any) => void;
158
- onInput: (searchText: string, event: any) => void;
159
- brushHandlesVisible: boolean;
160
- hideChartControlPanel: boolean;
161
- offset: any;
162
- is24HourTime: () => boolean;
163
- includeTimezones: boolean;
164
- availabilityLeftMargin: number;
165
- onInstanceClick: (instance: any) => any;
166
- interpolationFunction: any;
167
- includeEnvelope: boolean;
168
- canDownload: boolean;
169
- withContextMenu: boolean;
170
- autoTriggerBrushContextMenu: boolean;
171
- includeDots: boolean;
172
- yExtent: any;
173
- ellipsisItems: any[];
174
- markers: any[];
175
- onMarkersChange: (markers: Array<number>) => any;
176
- xAxisTimeFormat: (d: any, i: any, isFirst: any, isLast: any) => {};
177
- spMeasures: string[];
178
- scatterPlotRadius: number[];
179
- spAxisLabels: string[];
180
- brushRangeVisible: boolean;
181
- strings: any;
182
- dateLocale: string;
183
- defaultAvailabilityZoomRangeMillis: number;
184
- warmStoreRange: string[];
185
- initialValue: any;
186
- bucketSizeMillis: number;
187
- updateInterval: number;
188
- dTPIsModal: boolean;
189
- numberOfColors: number;
190
- defaultColor: any;
191
- isColorValueHidden: boolean;
192
- onClick: (d3Event: any) => void;
193
- onSelect: (value: any) => void;
194
- colors: string[];
195
- swimLaneOptions: {
196
- [key: number]: swimLaneOption;
197
- };
198
- hierarchyOptions: any;
199
- onError: (titleKey: any, messageKey: any, xhr: any) => any;
200
- labelSeriesWithMarker: boolean;
201
- timeSeriesIdProperties: {
202
- name: string;
203
- type: any;
204
- }[];
205
- shouldSticky: boolean;
206
- isRelative: any;
207
- currentQuickTime: any;
208
- };
209
- }
210
-
211
- declare class Component {
212
- renderTarget: any;
213
- protected currentTheme: string;
214
- readonly TRANSDURATION: number;
215
- usesSeconds: boolean;
216
- usesMillis: boolean;
217
- protected chartOptions: ChartOptions;
218
- protected getString(str: string): any;
219
- constructor(renderTarget: Element);
220
- protected themify(targetElement: any, theme: string): void;
221
- protected teardropD: (width: any, height: any) => string;
222
- protected tooltipFormat(d: any, text: any, measureFormat: TooltipMeasureFormat, xyrMeasures?: any): void;
223
- protected createTooltipSeriesInfo(d: any, group: any, cDO: any): void;
224
- }
225
-
226
- export { Component as C, ChartOptions as a };
@@ -1,197 +0,0 @@
1
- import { _ as __extends } from './_tslib-DYvz7dIO.js';
2
- import * as d3 from 'd3';
3
- import { C as Component } from './Component-C9fQU2ia.js';
4
-
5
- var ACTIONELEMENTHEIGHT = 28;
6
- var ACTIONELEMENTMAXWIDTH = 200;
7
- var ACTIONELEMENTCONTAINERMAXHEIGHT = 200;
8
- var VERTICALPADDING = 4;
9
- var ContextMenu = /** @class */ (function (_super) {
10
- __extends(ContextMenu, _super);
11
- function ContextMenu(drawChart, renderTarget) {
12
- var _this = _super.call(this, renderTarget) || this;
13
- _this.contextMenuVisible = false;
14
- _this.drawChart = drawChart;
15
- _this.contextMenuElement = d3.select(renderTarget).insert("div", ":first-child")
16
- .attr("class", "tsi-contextMenu")
17
- .style("left", "0px")
18
- .style("top", "0px");
19
- return _this;
20
- }
21
- ContextMenu.prototype.launchSubMenu = function (parent, subMenuActions, subLevel, top) {
22
- var container = this.contextMenuElement
23
- .selectAll(".tsi-actionElementContainer".concat(subLevel))
24
- .data([{ subLevel: subLevel }]);
25
- var enteredContainer = container.enter()
26
- .append('div')
27
- .attr("class", function (d) { return "tsi-actionElementContainer tsi-actionElementContainer".concat(d.subLevel); })
28
- .merge(container)
29
- .style('max-height', "".concat(ACTIONELEMENTCONTAINERMAXHEIGHT, "px"))
30
- .style('display', 'block');
31
- this.createActionElements(enteredContainer, subMenuActions, subLevel);
32
- this.positionAEC(enteredContainer, subMenuActions.length, top, subLevel);
33
- container.exit().remove();
34
- };
35
- ContextMenu.prototype.positionAEC = function (container, subMenuActionsCount, top, subLevel) {
36
- this.verticalPositionAEC(container, top, subMenuActionsCount, subLevel);
37
- this.horizontalPositionAEC(container, subLevel);
38
- };
39
- ContextMenu.prototype.shouldHorizontalFlip = function (rawLeft) {
40
- var containerLeft = rawLeft + this.left;
41
- var totalWidth = d3.select(this.renderTarget).node().getBoundingClientRect().width;
42
- return ((containerLeft + ACTIONELEMENTMAXWIDTH) > totalWidth);
43
- };
44
- ContextMenu.prototype.shouldVerticalFlip = function (rawTop, elementCount) {
45
- var containerTop = rawTop + this.top;
46
- var totalHeight = d3.select(this.renderTarget).node().getBoundingClientRect().height;
47
- var heightOfElements = Math.min(elementCount * ACTIONELEMENTHEIGHT + (VERTICALPADDING * 2), ACTIONELEMENTCONTAINERMAXHEIGHT);
48
- return ((containerTop + heightOfElements) > totalHeight);
49
- };
50
- //determine position relative to the chart as a whole
51
- ContextMenu.prototype.getRelativeHorizontalPosition = function (node, isLeft) {
52
- if (isLeft === void 0) { isLeft = true; }
53
- return node.getBoundingClientRect().x + (isLeft ? 0 : node.getBoundingClientRect().width) - this.renderTarget.getBoundingClientRect().x;
54
- };
55
- ContextMenu.prototype.verticalPositionAEC = function (actionElementContainer, rawTop, elementCount, subLevel) {
56
- var totalHeight = this.contextMenuElement.node().getBoundingClientRect().height;
57
- if (this.shouldVerticalFlip(rawTop, elementCount)) {
58
- actionElementContainer.style('bottom', "".concat((totalHeight - rawTop) - (subLevel === 0 ? 0 : ACTIONELEMENTHEIGHT + VERTICALPADDING), "px"))
59
- .style('top', null);
60
- }
61
- else {
62
- actionElementContainer.style('top', "".concat(rawTop - VERTICALPADDING, "px"))
63
- .style('bottom', null);
64
- }
65
- };
66
- ContextMenu.prototype.horizontalPositionAEC = function (actionElementContainer, subLevel) {
67
- var leftPosition = 0;
68
- var rightPosition = 0;
69
- if (subLevel !== 0) {
70
- var oneLevelUp = this.contextMenuElement.selectAll(".tsi-actionElementContainer".concat(subLevel - 1));
71
- if (oneLevelUp.size()) {
72
- rightPosition = this.getRelativeHorizontalPosition(oneLevelUp.nodes()[0], false) - this.left;
73
- leftPosition = this.getRelativeHorizontalPosition(oneLevelUp.nodes()[0], true) - this.left;
74
- }
75
- }
76
- if (this.shouldHorizontalFlip(rightPosition)) {
77
- actionElementContainer.style('left', null)
78
- .style('right', "".concat(0 - leftPosition, "px"));
79
- }
80
- else {
81
- actionElementContainer.style('left', "".concat(rightPosition, "px"))
82
- .style('right', null);
83
- }
84
- };
85
- ContextMenu.prototype.getActionElementContainerTop = function (launchedFromActionNode) {
86
- if (launchedFromActionNode === void 0) { launchedFromActionNode = null; }
87
- if (launchedFromActionNode === null) {
88
- return 0;
89
- }
90
- return launchedFromActionNode.getBoundingClientRect().top -
91
- this.contextMenuElement.node().getBoundingClientRect().top;
92
- };
93
- ContextMenu.prototype.removeSubMenusAboveLevel = function (level) {
94
- d3.select(this.renderTarget).selectAll('.tsi-actionElementContainer').filter(function (subMenuD) {
95
- return (subMenuD.subLevel > level);
96
- }).remove();
97
- };
98
- ContextMenu.prototype.createActionElements = function (container, actions, subLevel) {
99
- if (subLevel === void 0) { subLevel = 0; }
100
- var self = this;
101
- var actionElements = container.selectAll(".tsi-actionElement")
102
- .data(actions.map(function (a) {
103
- a.subLevel = subLevel;
104
- return a;
105
- }));
106
- var actionElementsEntered = actionElements.enter()
107
- .append("div")
108
- .attr("class", "tsi-actionElement")
109
- .classed('tsi-hasSubMenu', function (d) { return d.isNested; })
110
- .merge(actionElements)
111
- .text(function (d) { return d.name; })
112
- .on('mouseenter', function (event, d) {
113
- var e = actionElementsEntered.nodes();
114
- var i = e.indexOf(event.currentTarget);
115
- if (d.isNested) {
116
- self.launchSubMenu(d3.select(this), d.subActions, subLevel + 1, self.getActionElementContainerTop(this));
117
- self.subMenuFromActionIndex = i;
118
- self.subMenuFromSubLevel = d.subLevel;
119
- return;
120
- }
121
- if ((d.subLevel === self.subMenuFromSubLevel && i !== self.subMenuFromActionIndex) || d.subLevel < self.subMenuFromSubLevel) {
122
- self.removeSubMenusAboveLevel(d.subLevel);
123
- }
124
- })
125
- .on("click", function (event, d) {
126
- if (d.isNested) {
127
- return;
128
- }
129
- if (self.endTime) { // if endTime is present, this is a brush action
130
- var startTime = self.startTime ? self.startTime.toISOString().slice(0, -5) + "Z" : null;
131
- var endTime = self.endTime ? self.endTime.toISOString().slice(0, -5) + "Z" : null;
132
- d.action(startTime, endTime);
133
- }
134
- else {
135
- var timestamp = self.startTime ? self.startTime.toISOString().slice(0, -5) + "Z" : null;
136
- d.action(self.ae, self.splitBy, timestamp, event);
137
- }
138
- self.hide();
139
- if (self.onClick)
140
- self.onClick();
141
- });
142
- actionElements.exit().remove();
143
- };
144
- ContextMenu.prototype.draw = function (chartComponentData, renderTarget, options, mousePosition, aggKey, splitBy, onClick, startTime, endTime, event) {
145
- var _this = this;
146
- if (onClick === void 0) { onClick = null; }
147
- if (startTime === void 0) { startTime = null; }
148
- if (endTime === void 0) { endTime = null; }
149
- this.contextMenuVisible = true;
150
- if (!endTime) {
151
- this.actions = chartComponentData.displayState[aggKey].contextMenuActions;
152
- this.ae = chartComponentData.displayState[aggKey].aggregateExpression;
153
- }
154
- else {
155
- this.actions = options.brushContextMenuActions;
156
- }
157
- this.splitBy = splitBy;
158
- this.startTime = startTime;
159
- this.endTime = endTime;
160
- this.onClick = onClick;
161
- _super.prototype.themify.call(this, this.contextMenuElement, options.theme);
162
- this.left = mousePosition[0];
163
- this.top = mousePosition[1];
164
- this.contextMenuElement
165
- .style('left', this.left + 'px')
166
- .style('top', this.top + 'px');
167
- this.contextMenuElement.selectAll('*').remove();
168
- this.contextMenuElement.style("display", "block")
169
- .on('mouseleave', function () {
170
- _this.removeSubMenusAboveLevel(0);
171
- });
172
- var actionContainer = this.contextMenuElement
173
- .selectAll('.tsi-actionElementContainer0')
174
- .data([{ subLevel: 0 }]);
175
- var actionContainerEntered = actionContainer.enter()
176
- .append('div')
177
- .attr('class', 'tsi-actionElementContainer tsi-actionElementContainer0');
178
- this.createActionElements(actionContainerEntered, this.actions);
179
- this.positionAEC(actionContainerEntered, this.actions.length, 0, 0);
180
- var self = this;
181
- d3.select(this.renderTarget).on("click", function (event) {
182
- if (!d3.select(event.srcElement).classed('tsi-actionElement')) {
183
- if (onClick) {
184
- onClick();
185
- }
186
- self.hide();
187
- }
188
- });
189
- };
190
- ContextMenu.prototype.hide = function () {
191
- this.contextMenuElement.style("display", "none");
192
- this.contextMenuVisible = false;
193
- };
194
- return ContextMenu;
195
- }(Component));
196
-
197
- export { ContextMenu as C };
@@ -1,16 +0,0 @@
1
- import { C as ChartComponent } from './ChartComponent-L_dR-Eny.js';
2
-
3
- declare class DateTimeButton extends ChartComponent {
4
- protected dateTimePicker: any;
5
- private pickerIsVisible;
6
- protected minMillis: number;
7
- protected maxMillis: number;
8
- protected onSet: any;
9
- protected dateTimeButton: any;
10
- protected dateTimePickerContainer: any;
11
- constructor(renderTarget: Element);
12
- protected buttonDateTimeFormat(millis: any): string;
13
- render(chartOptions: any, minMillis: any, maxMillis: any, onSet?: any): void;
14
- }
15
-
16
- export { DateTimeButton as D };
@@ -1,38 +0,0 @@
1
- import { _ as __extends } from './_tslib-DYvz7dIO.js';
2
- import * as d3 from 'd3';
3
- import { U as Utils } from './Utils-CdKMmmwx.js';
4
- import { C as ChartComponent } from './ChartComponent-BxPbycj0.js';
5
-
6
- var DateTimeButton = /** @class */ (function (_super) {
7
- __extends(DateTimeButton, _super);
8
- function DateTimeButton(renderTarget) {
9
- var _this = _super.call(this, renderTarget) || this;
10
- _this.pickerIsVisible = false;
11
- return _this;
12
- }
13
- DateTimeButton.prototype.buttonDateTimeFormat = function (millis) {
14
- return Utils.timeFormat(!this.chartOptions.minutesForTimeLabels, !this.chartOptions.minutesForTimeLabels, this.chartOptions.offset, this.chartOptions.is24HourTime, 0, null, this.chartOptions.dateLocale)(millis);
15
- };
16
- DateTimeButton.prototype.render = function (chartOptions, minMillis, maxMillis, onSet) {
17
- if (onSet === void 0) { onSet = null; }
18
- this.chartOptions.setOptions(chartOptions);
19
- this.minMillis = minMillis;
20
- this.maxMillis = maxMillis;
21
- this.onSet = onSet ? onSet : function () { };
22
- var dateTimeContainer = d3.select(this.renderTarget);
23
- if (!this.dateTimeButton) {
24
- this.dateTimeButton = dateTimeContainer.append("button")
25
- .classed('tsi-dateTimeButton', true);
26
- }
27
- if (!this.dateTimePickerContainer) {
28
- this.dateTimePickerContainer = dateTimeContainer.append('div').classed('tsi-dateTimePickerContainer', true)
29
- .attr('role', 'dialog')
30
- .attr('aria-label', this.getString('a time selection control dialog'));
31
- this.dateTimePickerContainer.style('display', 'none');
32
- }
33
- _super.prototype.themify.call(this, d3.select(this.renderTarget), this.chartOptions.theme);
34
- };
35
- return DateTimeButton;
36
- }(ChartComponent));
37
-
38
- export { DateTimeButton as D };
@@ -1,71 +0,0 @@
1
- import { _ as __extends } from './_tslib-DYvz7dIO.js';
2
- import * as d3 from 'd3';
3
- import { D as DateTimeButton } from './DateTimeButton-DnqhATyX.js';
4
- import { D as DateTimePicker } from './DateTimePicker-CuGwz86U.js';
5
- import { U as Utils } from './Utils-CdKMmmwx.js';
6
-
7
- var DateTimeButtonRange = /** @class */ (function (_super) {
8
- __extends(DateTimeButtonRange, _super);
9
- function DateTimeButtonRange(renderTarget) {
10
- return _super.call(this, renderTarget) || this;
11
- }
12
- DateTimeButtonRange.prototype.setButtonText = function (fromMillis, toMillis, isRelative, quickTime) {
13
- var fromString = this.buttonDateTimeFormat(fromMillis);
14
- var tzAbbr = Utils.createTimezoneAbbreviation(this.chartOptions.offset);
15
- var toString = this.buttonDateTimeFormat(toMillis) + ' (' + tzAbbr + ')';
16
- if (!isRelative) {
17
- this.dateTimeButton.text("".concat(fromString, " - ").concat(toString));
18
- this.dateTimeButton.attr('aria-label', "".concat(this.getString('a button to launch a time selection dialog current selected time is '), " ").concat(fromString, " - ").concat(toString));
19
- }
20
- else {
21
- var quickTimeText = this.dateTimePicker.getQuickTimeText(quickTime);
22
- var text = quickTimeText !== null ? "".concat(quickTimeText, " (").concat(fromString, " - ").concat(toString, ")") : "".concat(fromString, " - ").concat(this.getString('Latest'), " (").concat(toString, ")");
23
- this.dateTimeButton.text(text);
24
- this.dateTimeButton.attr('aria-label', "".concat(this.getString('a button to launch a time selection dialog current selected time is '), " ").concat(text));
25
- }
26
- };
27
- DateTimeButtonRange.prototype.onClose = function () {
28
- this.dateTimePickerContainer.style("display", "none");
29
- this.dateTimeButton.node().focus();
30
- };
31
- DateTimeButtonRange.prototype.render = function (chartOptions, minMillis, maxMillis, fromMillis, toMillis, onSet, onCancel) {
32
- var _this = this;
33
- if (chartOptions === void 0) { chartOptions = {}; }
34
- if (fromMillis === void 0) { fromMillis = null; }
35
- if (toMillis === void 0) { toMillis = null; }
36
- if (onSet === void 0) { onSet = null; }
37
- if (onCancel === void 0) { onCancel = null; }
38
- _super.prototype.render.call(this, chartOptions, minMillis, maxMillis, onSet);
39
- d3.select(this.renderTarget).classed('tsi-dateTimeContainerRange', true);
40
- this.fromMillis = fromMillis;
41
- this.toMillis = toMillis;
42
- this.onCancel = onCancel ? onCancel : function () { };
43
- if (!this.dateTimePicker) {
44
- this.dateTimePicker = new DateTimePicker(this.dateTimePickerContainer.node());
45
- }
46
- this.setButtonText(fromMillis, toMillis, toMillis === maxMillis, this.toMillis - this.fromMillis);
47
- this.dateTimeButton.on("click", function () {
48
- if (_this.dateTimePickerContainer.style("display") !== "none") {
49
- _this.onClose(); // close if already open
50
- }
51
- else {
52
- _this.chartOptions.dTPIsModal = true;
53
- _this.dateTimePickerContainer.style("display", "block");
54
- _this.dateTimePicker.render(_this.chartOptions, minMillis, maxMillis, _this.fromMillis, _this.toMillis, function (fromMillis, toMillis, offset, isRelative, currentQuickTime) {
55
- _this.chartOptions.offset = offset;
56
- _this.fromMillis = fromMillis;
57
- _this.toMillis = toMillis;
58
- _this.setButtonText(fromMillis, toMillis, isRelative, currentQuickTime);
59
- _this.onSet(fromMillis, toMillis, offset, isRelative, currentQuickTime);
60
- _this.onClose();
61
- }, function () {
62
- _this.onClose();
63
- _this.onCancel();
64
- });
65
- }
66
- });
67
- };
68
- return DateTimeButtonRange;
69
- }(DateTimeButton));
70
-
71
- export { DateTimeButtonRange as D };
@@ -1,19 +0,0 @@
1
- import { D as DateTimeButton } from './DateTimeButton-Ck71nL87.js';
2
- import './ChartComponent-L_dR-Eny.js';
3
- import './Enums-CEhu18PC.js';
4
- import './Component-CdI_Pyko.js';
5
- import './Interfaces-CdAVFIA6.js';
6
- import './ChartComponentData-ClzAtU_E.js';
7
- import './EllipsisMenu.js';
8
-
9
- declare class DateTimeButtonRange extends DateTimeButton {
10
- private onCancel;
11
- private fromMillis;
12
- private toMillis;
13
- constructor(renderTarget: Element);
14
- private setButtonText;
15
- private onClose;
16
- render(chartOptions: any, minMillis: number, maxMillis: number, fromMillis?: number, toMillis?: number, onSet?: any, onCancel?: any): void;
17
- }
18
-
19
- export { DateTimeButtonRange as default };
@@ -1,15 +0,0 @@
1
- export { D as default } from './DateTimeButtonRange-CT1zOoCf.js';
2
- import './_tslib-DYvz7dIO.js';
3
- import 'd3';
4
- import './DateTimeButton-DnqhATyX.js';
5
- import './Utils-CdKMmmwx.js';
6
- import 'moment-timezone';
7
- import './ChartComponent-BxPbycj0.js';
8
- import './Component-C9fQU2ia.js';
9
- import './Grid-ByDh3Qdn.js';
10
- import 'split.js';
11
- import './EllipsisMenu-CNWSo-qQ.js';
12
- import './DateTimePicker-CuGwz86U.js';
13
- import './pikaday-C_DS7oEN.js';
14
- import 'moment';
15
- import './TimezonePicker-DHkC2iKE.js';
@@ -1,48 +0,0 @@
1
- import { _ as __extends } from './_tslib-DYvz7dIO.js';
2
- import * as d3 from 'd3';
3
- import { D as DateTimeButton } from './DateTimeButton-DnqhATyX.js';
4
- import { S as SingleDateTimePicker } from './SingleDateTimePicker-BrFB5iPu.js';
5
-
6
- var DateTimeButtonSingle = /** @class */ (function (_super) {
7
- __extends(DateTimeButtonSingle, _super);
8
- function DateTimeButtonSingle(renderTarget) {
9
- var _this = _super.call(this, renderTarget) || this;
10
- _this.sDTPOnSet = function (millis) {
11
- if (millis === void 0) { millis = null; }
12
- if (millis !== null) {
13
- _this.dateTimeButton.text(_this.buttonDateTimeFormat(millis));
14
- _this.selectedMillis = millis;
15
- _this.onSet(millis);
16
- }
17
- _this.closeSDTP();
18
- };
19
- return _this;
20
- }
21
- DateTimeButtonSingle.prototype.closeSDTP = function () {
22
- this.dateTimePickerContainer.style("display", "none");
23
- this.dateTimeButton.node().focus();
24
- };
25
- DateTimeButtonSingle.prototype.render = function (chartOptions, minMillis, maxMillis, selectedMillis, onSet) {
26
- var _this = this;
27
- if (chartOptions === void 0) { chartOptions = {}; }
28
- if (selectedMillis === void 0) { selectedMillis = null; }
29
- if (onSet === void 0) { onSet = null; }
30
- _super.prototype.render.call(this, chartOptions, minMillis, maxMillis, onSet);
31
- this.selectedMillis = selectedMillis;
32
- d3.select(this.renderTarget).classed('tsi-dateTimeContainerSingle', true);
33
- this.dateTimeButton.text(this.buttonDateTimeFormat(selectedMillis));
34
- if (!this.dateTimePicker) {
35
- this.dateTimePicker = new SingleDateTimePicker(this.dateTimePickerContainer.node());
36
- }
37
- var targetElement = d3.select(this.renderTarget);
38
- (targetElement.select(".tsi-dateTimePickerContainer")).selectAll("*");
39
- this.dateTimeButton.on("click", function () {
40
- _this.chartOptions.dTPIsModal = true;
41
- _this.dateTimePickerContainer.style("display", "block");
42
- _this.dateTimePicker.render(_this.chartOptions, _this.minMillis, _this.maxMillis, _this.selectedMillis, _this.sDTPOnSet);
43
- });
44
- };
45
- return DateTimeButtonSingle;
46
- }(DateTimeButton));
47
-
48
- export { DateTimeButtonSingle as D };
@@ -1,17 +0,0 @@
1
- import { D as DateTimeButton } from './DateTimeButton-Ck71nL87.js';
2
- import './ChartComponent-L_dR-Eny.js';
3
- import './Enums-CEhu18PC.js';
4
- import './Component-CdI_Pyko.js';
5
- import './Interfaces-CdAVFIA6.js';
6
- import './ChartComponentData-ClzAtU_E.js';
7
- import './EllipsisMenu.js';
8
-
9
- declare class DateTimeButtonSingle extends DateTimeButton {
10
- private selectedMillis;
11
- constructor(renderTarget: Element);
12
- private closeSDTP;
13
- private sDTPOnSet;
14
- render(chartOptions: any, minMillis: number, maxMillis: number, selectedMillis?: number, onSet?: any): void;
15
- }
16
-
17
- export { DateTimeButtonSingle as default };
@@ -1,14 +0,0 @@
1
- export { D as default } from './DateTimeButtonSingle-DZk5fW35.js';
2
- import './_tslib-DYvz7dIO.js';
3
- import 'd3';
4
- import './DateTimeButton-DnqhATyX.js';
5
- import './Utils-CdKMmmwx.js';
6
- import 'moment-timezone';
7
- import './ChartComponent-BxPbycj0.js';
8
- import './Component-C9fQU2ia.js';
9
- import './Grid-ByDh3Qdn.js';
10
- import 'split.js';
11
- import './EllipsisMenu-CNWSo-qQ.js';
12
- import './SingleDateTimePicker-BrFB5iPu.js';
13
- import './pikaday-C_DS7oEN.js';
14
- import 'moment';