plottable 3.11.0 → 3.12.0

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 (180) hide show
  1. package/build/src/animators/easingAnimator.d.ts +2 -2
  2. package/build/src/animators/easingAnimator.js +3 -2
  3. package/build/src/animators/index.js +2 -2
  4. package/build/src/animators/nullAnimator.js +2 -1
  5. package/build/src/axes/axis.d.ts +9 -5
  6. package/build/src/axes/axis.js +4 -3
  7. package/build/src/axes/categoryAxis.d.ts +9 -5
  8. package/build/src/axes/categoryAxis.js +13 -11
  9. package/build/src/axes/index.js +3 -3
  10. package/build/src/axes/numericAxis.d.ts +9 -5
  11. package/build/src/axes/numericAxis.js +2 -1
  12. package/build/src/axes/timeAxis.d.ts +18 -14
  13. package/build/src/axes/timeAxis.js +6 -5
  14. package/build/src/components/component.d.ts +2 -2
  15. package/build/src/components/component.js +7 -6
  16. package/build/src/components/componentContainer.js +3 -2
  17. package/build/src/components/dragBoxLayer.d.ts +4 -4
  18. package/build/src/components/dragBoxLayer.js +3 -2
  19. package/build/src/components/dragLineLayer.js +2 -1
  20. package/build/src/components/gridlines.d.ts +2 -2
  21. package/build/src/components/gridlines.js +2 -1
  22. package/build/src/components/group.js +2 -1
  23. package/build/src/components/guideLineLayer.d.ts +1 -1
  24. package/build/src/components/guideLineLayer.js +2 -1
  25. package/build/src/components/index.js +14 -14
  26. package/build/src/components/interpolatedColorLegend.d.ts +7 -3
  27. package/build/src/components/interpolatedColorLegend.js +4 -3
  28. package/build/src/components/label.js +4 -3
  29. package/build/src/components/legend.d.ts +5 -1
  30. package/build/src/components/legend.js +2 -1
  31. package/build/src/components/plotGroup.js +2 -1
  32. package/build/src/components/selectionBoxLayer.d.ts +4 -4
  33. package/build/src/components/selectionBoxLayer.js +2 -1
  34. package/build/src/components/table.d.ts +10 -6
  35. package/build/src/components/table.js +4 -3
  36. package/build/src/components/wrappedLabel.js +2 -1
  37. package/build/src/components/xDragBoxLayer.js +2 -1
  38. package/build/src/components/yDragBoxLayer.js +2 -1
  39. package/build/src/core/config.js +1 -0
  40. package/build/src/core/dataset.d.ts +5 -1
  41. package/build/src/core/dataset.js +1 -0
  42. package/build/src/core/formatters.d.ts +4 -0
  43. package/build/src/core/formatters.js +1 -0
  44. package/build/src/core/renderController.d.ts +1 -1
  45. package/build/src/core/renderController.js +2 -1
  46. package/build/src/core/renderPolicy.d.ts +4 -0
  47. package/build/src/core/renderPolicy.js +1 -0
  48. package/build/src/core/symbolFactories.d.ts +4 -0
  49. package/build/src/core/symbolFactories.js +1 -0
  50. package/build/src/core/version.d.ts +4 -0
  51. package/build/src/core/version.js +2 -1
  52. package/build/src/core/version.js.bak +1 -0
  53. package/build/src/dispatchers/dispatcher.d.ts +7 -3
  54. package/build/src/dispatchers/dispatcher.js +2 -1
  55. package/build/src/dispatchers/index.js +3 -3
  56. package/build/src/dispatchers/keyDispatcher.d.ts +2 -2
  57. package/build/src/dispatchers/keyDispatcher.js +2 -1
  58. package/build/src/dispatchers/mouseDispatcher.d.ts +1 -1
  59. package/build/src/dispatchers/mouseDispatcher.js +2 -1
  60. package/build/src/dispatchers/touchDispatcher.d.ts +1 -1
  61. package/build/src/dispatchers/touchDispatcher.js +2 -1
  62. package/build/src/drawers/arcDrawer.js +2 -1
  63. package/build/src/drawers/arcOutlineDrawer.js +2 -1
  64. package/build/src/drawers/areaDrawer.js +6 -5
  65. package/build/src/drawers/canvasBuffer.js +1 -0
  66. package/build/src/drawers/canvasDrawer.js +1 -0
  67. package/build/src/drawers/drawer.js +1 -0
  68. package/build/src/drawers/index.js +11 -10
  69. package/build/src/drawers/lineDrawer.js +4 -3
  70. package/build/src/drawers/rectangleDrawer.js +7 -5
  71. package/build/src/drawers/segmentDrawer.js +2 -1
  72. package/build/src/drawers/svgDrawer.d.ts +2 -2
  73. package/build/src/drawers/svgDrawer.js +1 -0
  74. package/build/src/drawers/symbolDrawer.js +6 -6
  75. package/build/src/index.d.ts +1 -1
  76. package/build/src/index.js +17 -14
  77. package/build/src/interactions/clickInteraction.d.ts +4 -4
  78. package/build/src/interactions/clickInteraction.js +2 -1
  79. package/build/src/interactions/dragInteraction.d.ts +4 -4
  80. package/build/src/interactions/dragInteraction.js +2 -1
  81. package/build/src/interactions/index.js +7 -6
  82. package/build/src/interactions/interaction.d.ts +2 -2
  83. package/build/src/interactions/interaction.js +1 -0
  84. package/build/src/interactions/keyInteraction.d.ts +2 -2
  85. package/build/src/interactions/keyInteraction.js +2 -1
  86. package/build/src/interactions/panZoomConstraints.js +1 -0
  87. package/build/src/interactions/panZoomInteraction.d.ts +13 -9
  88. package/build/src/interactions/panZoomInteraction.js +4 -3
  89. package/build/src/interactions/pointerInteraction.d.ts +3 -3
  90. package/build/src/interactions/pointerInteraction.js +2 -1
  91. package/build/src/memoize/index.js +5 -4
  92. package/build/src/memoize/memThunk.js +2 -1
  93. package/build/src/memoize/memoize.d.ts +5 -0
  94. package/build/src/memoize/memoize.js +2 -1
  95. package/build/src/memoize/memoizeProjectors.js +3 -2
  96. package/build/src/memoize/signature.d.ts +14 -0
  97. package/build/src/memoize/signature.js +4 -3
  98. package/build/src/plots/areaPlot.d.ts +9 -5
  99. package/build/src/plots/areaPlot.js +4 -3
  100. package/build/src/plots/barPlot.d.ts +16 -22
  101. package/build/src/plots/barPlot.js +6 -5
  102. package/build/src/plots/clusteredBarPlot.d.ts +3 -5
  103. package/build/src/plots/clusteredBarPlot.js +2 -1
  104. package/build/src/plots/commons.js +1 -0
  105. package/build/src/plots/deferredRenderer.d.ts +1 -1
  106. package/build/src/plots/deferredRenderer.js +1 -0
  107. package/build/src/plots/index.js +12 -12
  108. package/build/src/plots/linePlot.d.ts +6 -6
  109. package/build/src/plots/linePlot.js +5 -4
  110. package/build/src/plots/piePlot.d.ts +9 -5
  111. package/build/src/plots/piePlot.js +3 -2
  112. package/build/src/plots/plot.d.ts +5 -5
  113. package/build/src/plots/plot.js +7 -6
  114. package/build/src/plots/rectanglePlot.d.ts +10 -6
  115. package/build/src/plots/rectanglePlot.js +2 -1
  116. package/build/src/plots/scatterPlot.d.ts +8 -9
  117. package/build/src/plots/scatterPlot.js +3 -2
  118. package/build/src/plots/segmentPlot.d.ts +7 -3
  119. package/build/src/plots/segmentPlot.js +3 -2
  120. package/build/src/plots/stackedAreaPlot.d.ts +6 -2
  121. package/build/src/plots/stackedAreaPlot.js +4 -3
  122. package/build/src/plots/stackedBarPlot.d.ts +5 -4
  123. package/build/src/plots/stackedBarPlot.js +5 -4
  124. package/build/src/plots/waterfallPlot.d.ts +4 -6
  125. package/build/src/plots/waterfallPlot.js +2 -1
  126. package/build/src/plots/xyPlot.d.ts +5 -5
  127. package/build/src/plots/xyPlot.js +2 -1
  128. package/build/src/scales/categoryScale.d.ts +7 -3
  129. package/build/src/scales/categoryScale.js +3 -2
  130. package/build/src/scales/colorScale.d.ts +5 -1
  131. package/build/src/scales/colorScale.js +2 -1
  132. package/build/src/scales/index.d.ts +1 -1
  133. package/build/src/scales/index.js +8 -7
  134. package/build/src/scales/interpolatedColorScale.d.ts +7 -3
  135. package/build/src/scales/interpolatedColorScale.js +5 -4
  136. package/build/src/scales/linearScale.d.ts +4 -0
  137. package/build/src/scales/linearScale.js +2 -1
  138. package/build/src/scales/logScale.d.ts +4 -0
  139. package/build/src/scales/logScale.js +2 -1
  140. package/build/src/scales/modifiedLogScale.d.ts +8 -4
  141. package/build/src/scales/modifiedLogScale.js +2 -1
  142. package/build/src/scales/quantitativeScale.d.ts +5 -1
  143. package/build/src/scales/quantitativeScale.js +3 -2
  144. package/build/src/scales/scale.d.ts +4 -0
  145. package/build/src/scales/scale.js +1 -0
  146. package/build/src/scales/tickGenerators.js +1 -0
  147. package/build/src/scales/timeScale.js +2 -1
  148. package/build/src/utils/addD3SelectionMulti.d.ts +8 -0
  149. package/build/src/utils/arrayUtils.d.ts +4 -0
  150. package/build/src/utils/arrayUtils.js +1 -0
  151. package/build/src/utils/bucket.js +1 -0
  152. package/build/src/utils/callbackSet.js +2 -1
  153. package/build/src/utils/coerceD3.js +1 -0
  154. package/build/src/utils/colorUtils.d.ts +4 -0
  155. package/build/src/utils/colorUtils.js +1 -0
  156. package/build/src/utils/domUtils.d.ts +3 -10
  157. package/build/src/utils/domUtils.js +1 -0
  158. package/build/src/utils/entityStore.js +1 -0
  159. package/build/src/utils/index.d.ts +1 -1
  160. package/build/src/utils/index.js +9 -8
  161. package/build/src/utils/makeEnum.js +1 -0
  162. package/build/src/utils/map.d.ts +4 -0
  163. package/build/src/utils/map.js +1 -0
  164. package/build/src/utils/mathUtils.d.ts +4 -0
  165. package/build/src/utils/mathUtils.js +3 -2
  166. package/build/src/utils/objectUtils.js +1 -0
  167. package/build/src/utils/rTree.d.ts +1 -1
  168. package/build/src/utils/rTree.js +1 -0
  169. package/build/src/utils/rTreeSplitStrategies.d.ts +2 -2
  170. package/build/src/utils/rTreeSplitStrategies.js +1 -0
  171. package/build/src/utils/set.js +1 -0
  172. package/build/src/utils/stackingUtils.d.ts +5 -1
  173. package/build/src/utils/stackingUtils.js +6 -5
  174. package/build/src/utils/transformAwareTranslator.d.ts +4 -0
  175. package/build/src/utils/transformAwareTranslator.js +1 -0
  176. package/build/src/utils/windowUtils.d.ts +4 -0
  177. package/build/src/utils/windowUtils.js +1 -0
  178. package/package.json +6 -5
  179. package/plottable.js +40761 -29021
  180. package/plottable.js.map +1 -1
@@ -4,10 +4,11 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.ArcSVGDrawer = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var svgDrawer_1 = require("./svgDrawer");
9
10
  var ArcSVGDrawer = /** @class */ (function (_super) {
10
- tslib_1.__extends(ArcSVGDrawer, _super);
11
+ (0, tslib_1.__extends)(ArcSVGDrawer, _super);
11
12
  function ArcSVGDrawer() {
12
13
  return _super.call(this, "path", "arc fill") || this;
13
14
  }
@@ -4,10 +4,11 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.ArcOutlineSVGDrawer = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var svgDrawer_1 = require("./svgDrawer");
9
10
  var ArcOutlineSVGDrawer = /** @class */ (function (_super) {
10
- tslib_1.__extends(ArcOutlineSVGDrawer, _super);
11
+ (0, tslib_1.__extends)(ArcOutlineSVGDrawer, _super);
11
12
  function ArcOutlineSVGDrawer() {
12
13
  return _super.call(this, "path", "arc outline") || this;
13
14
  }
@@ -4,11 +4,12 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.makeAreaCanvasDrawStep = exports.AreaSVGDrawer = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var canvasDrawer_1 = require("./canvasDrawer");
9
10
  var svgDrawer_1 = require("./svgDrawer");
10
11
  var AreaSVGDrawer = /** @class */ (function (_super) {
11
- tslib_1.__extends(AreaSVGDrawer, _super);
12
+ (0, tslib_1.__extends)(AreaSVGDrawer, _super);
12
13
  function AreaSVGDrawer() {
13
14
  return _super.call(this, "path", "area") || this;
14
15
  }
@@ -27,10 +28,10 @@ var AREA_FILL_ATTRS = ["opacity", "fill", "fill-opacity"];
27
28
  var AREA_STROKE_ATTRS = ["opacity", "stroke", "stroke-width"];
28
29
  function makeAreaCanvasDrawStep(d3AreaFactory, d3LineFactory) {
29
30
  return function (context, data, projector) {
30
- var fillAttrs = canvasDrawer_1.resolveAttributes(projector, AREA_FILL_ATTRS, data[0], 0);
31
- canvasDrawer_1.renderArea(context, d3AreaFactory(), data[0], fillAttrs);
32
- var strokeAttrs = canvasDrawer_1.resolveAttributes(projector, AREA_STROKE_ATTRS, data[0], 0);
33
- canvasDrawer_1.renderLine(context, d3LineFactory(), data[0], strokeAttrs);
31
+ var fillAttrs = (0, canvasDrawer_1.resolveAttributes)(projector, AREA_FILL_ATTRS, data[0], 0);
32
+ (0, canvasDrawer_1.renderArea)(context, d3AreaFactory(), data[0], fillAttrs);
33
+ var strokeAttrs = (0, canvasDrawer_1.resolveAttributes)(projector, AREA_STROKE_ATTRS, data[0], 0);
34
+ (0, canvasDrawer_1.renderLine)(context, d3LineFactory(), data[0], strokeAttrs);
34
35
  };
35
36
  }
36
37
  exports.makeAreaCanvasDrawStep = makeAreaCanvasDrawStep;
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.CanvasBuffer = void 0;
7
8
  var CanvasBuffer = /** @class */ (function () {
8
9
  function CanvasBuffer(screenWidth, screenHeight, devicePixelRatio) {
9
10
  if (devicePixelRatio === void 0) { devicePixelRatio = window.devicePixelRatio; }
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.renderPathWithStyle = exports.renderLine = exports.renderArea = exports.getStrokeDashArray = exports.getStrokeWidth = exports.resolveAttributes = exports.resolveAttributesSubsetWithStyles = exports.ContextStyleAttrs = exports.CanvasDrawer = void 0;
7
8
  var d3 = require("d3");
8
9
  /**
9
10
  * A CanvasDrawer draws data onto a supplied Canvas Context.
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.ProxyDrawer = void 0;
7
8
  /**
8
9
  * A Drawer is a stateful class that holds one SVGDrawer and one CanvasDrawer, and can switch between
9
10
  * the two.
@@ -5,13 +5,14 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  var tslib_1 = require("tslib");
8
- tslib_1.__exportStar(require("./arcDrawer"), exports);
9
- tslib_1.__exportStar(require("./arcOutlineDrawer"), exports);
10
- tslib_1.__exportStar(require("./areaDrawer"), exports);
11
- tslib_1.__exportStar(require("./canvasDrawer"), exports);
12
- tslib_1.__exportStar(require("./drawer"), exports);
13
- tslib_1.__exportStar(require("./lineDrawer"), exports);
14
- tslib_1.__exportStar(require("./rectangleDrawer"), exports);
15
- tslib_1.__exportStar(require("./segmentDrawer"), exports);
16
- tslib_1.__exportStar(require("./svgDrawer"), exports);
17
- tslib_1.__exportStar(require("./symbolDrawer"), exports);
8
+ (0, tslib_1.__exportStar)(require("./arcDrawer"), exports);
9
+ (0, tslib_1.__exportStar)(require("./arcOutlineDrawer"), exports);
10
+ (0, tslib_1.__exportStar)(require("./areaDrawer"), exports);
11
+ (0, tslib_1.__exportStar)(require("./canvasDrawer"), exports);
12
+ (0, tslib_1.__exportStar)(require("./drawer"), exports);
13
+ (0, tslib_1.__exportStar)(require("./drawStep"), exports);
14
+ (0, tslib_1.__exportStar)(require("./lineDrawer"), exports);
15
+ (0, tslib_1.__exportStar)(require("./rectangleDrawer"), exports);
16
+ (0, tslib_1.__exportStar)(require("./segmentDrawer"), exports);
17
+ (0, tslib_1.__exportStar)(require("./svgDrawer"), exports);
18
+ (0, tslib_1.__exportStar)(require("./symbolDrawer"), exports);
@@ -4,11 +4,12 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.makeLineCanvasDrawStep = exports.LineSVGDrawer = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var canvasDrawer_1 = require("./canvasDrawer");
9
10
  var svgDrawer_1 = require("./svgDrawer");
10
11
  var LineSVGDrawer = /** @class */ (function (_super) {
11
- tslib_1.__extends(LineSVGDrawer, _super);
12
+ (0, tslib_1.__extends)(LineSVGDrawer, _super);
12
13
  function LineSVGDrawer() {
13
14
  return _super.call(this, "path", "line") || this;
14
15
  }
@@ -36,8 +37,8 @@ var LINE_ATTRIBUTES = [
36
37
  */
37
38
  function makeLineCanvasDrawStep(d3LineFactory) {
38
39
  return function (context, data, attrToAppliedProjector) {
39
- var lineStyle = canvasDrawer_1.resolveAttributes(attrToAppliedProjector, LINE_ATTRIBUTES, data[0], 0);
40
- canvasDrawer_1.renderLine(context, d3LineFactory(), data[0], lineStyle);
40
+ var lineStyle = (0, canvasDrawer_1.resolveAttributes)(attrToAppliedProjector, LINE_ATTRIBUTES, data[0], 0);
41
+ (0, canvasDrawer_1.renderLine)(context, d3LineFactory(), data[0], lineStyle);
41
42
  };
42
43
  }
43
44
  exports.makeLineCanvasDrawStep = makeLineCanvasDrawStep;
@@ -4,11 +4,12 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.RectangleCanvasDrawer = exports.RectangleCanvasDrawStep = exports.RectangleSVGDrawer = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var canvasDrawer_1 = require("./canvasDrawer");
9
10
  var svgDrawer_1 = require("./svgDrawer");
10
11
  var RectangleSVGDrawer = /** @class */ (function (_super) {
11
- tslib_1.__extends(RectangleSVGDrawer, _super);
12
+ (0, tslib_1.__extends)(RectangleSVGDrawer, _super);
12
13
  function RectangleSVGDrawer(_rootClassName) {
13
14
  if (_rootClassName === void 0) { _rootClassName = ""; }
14
15
  var _this = _super.call(this, "rect", "") || this;
@@ -20,7 +21,7 @@ var RectangleSVGDrawer = /** @class */ (function (_super) {
20
21
  }(svgDrawer_1.SVGDrawer));
21
22
  exports.RectangleSVGDrawer = RectangleSVGDrawer;
22
23
  var RECT_ATTRS = canvasDrawer_1.ContextStyleAttrs.concat(["x", "y", "width", "height"]);
23
- exports.RectangleCanvasDrawStep = function (context, data, projector) {
24
+ var RectangleCanvasDrawStep = function (context, data, projector) {
24
25
  context.save();
25
26
  var dataLen = data.length;
26
27
  for (var index = 0; index < dataLen; index++) {
@@ -28,15 +29,16 @@ exports.RectangleCanvasDrawStep = function (context, data, projector) {
28
29
  if (datum == null) {
29
30
  continue;
30
31
  }
31
- var attrs = canvasDrawer_1.resolveAttributes(projector, RECT_ATTRS, datum, index);
32
+ var attrs = (0, canvasDrawer_1.resolveAttributes)(projector, RECT_ATTRS, datum, index);
32
33
  context.beginPath();
33
34
  context.rect(attrs["x"], attrs["y"], attrs["width"], attrs["height"]);
34
- canvasDrawer_1.renderPathWithStyle(context, attrs);
35
+ (0, canvasDrawer_1.renderPathWithStyle)(context, attrs);
35
36
  }
36
37
  context.restore();
37
38
  };
39
+ exports.RectangleCanvasDrawStep = RectangleCanvasDrawStep;
38
40
  var RectangleCanvasDrawer = /** @class */ (function (_super) {
39
- tslib_1.__extends(RectangleCanvasDrawer, _super);
41
+ (0, tslib_1.__extends)(RectangleCanvasDrawer, _super);
40
42
  function RectangleCanvasDrawer(ctx) {
41
43
  return _super.call(this, ctx, exports.RectangleCanvasDrawStep) || this;
42
44
  }
@@ -4,10 +4,11 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.SegmentSVGDrawer = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var svgDrawer_1 = require("./svgDrawer");
9
10
  var SegmentSVGDrawer = /** @class */ (function (_super) {
10
- tslib_1.__extends(SegmentSVGDrawer, _super);
11
+ (0, tslib_1.__extends)(SegmentSVGDrawer, _super);
11
12
  function SegmentSVGDrawer() {
12
13
  return _super.call(this, "line", "") || this;
13
14
  }
@@ -46,11 +46,11 @@ export declare class SVGDrawer implements IDrawer {
46
46
  */
47
47
  selector(): string;
48
48
  protected _applyDefaultAttributes(selection: SimpleSelection<any>): void;
49
- private _createAndDestroyDOMElements(data);
49
+ private _createAndDestroyDOMElements;
50
50
  /**
51
51
  * Draws data using one step
52
52
  *
53
53
  * @param{AppliedDrawStep} step The step, how data should be drawn.
54
54
  */
55
- private _drawStep(step);
55
+ private _drawStep;
56
56
  }
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.SVGDrawer = void 0;
7
8
  var d3 = require("d3");
8
9
  var Utils = require("../utils");
9
10
  /**
@@ -4,12 +4,13 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.makeSymbolCanvasDrawStep = exports.SymbolSVGDrawer = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var canvasDrawer_1 = require("./canvasDrawer");
9
10
  var canvasBuffer_1 = require("./canvasBuffer");
10
11
  var svgDrawer_1 = require("./svgDrawer");
11
12
  var SymbolSVGDrawer = /** @class */ (function (_super) {
12
- tslib_1.__extends(SymbolSVGDrawer, _super);
13
+ (0, tslib_1.__extends)(SymbolSVGDrawer, _super);
13
14
  function SymbolSVGDrawer() {
14
15
  return _super.call(this, "path", "symbol") || this;
15
16
  }
@@ -18,7 +19,6 @@ var SymbolSVGDrawer = /** @class */ (function (_super) {
18
19
  exports.SymbolSVGDrawer = SymbolSVGDrawer;
19
20
  var SYMBOL_ATTRS = canvasDrawer_1.ContextStyleAttrs.concat(["x", "y"]);
20
21
  function makeSymbolCanvasDrawStep(dataset, symbolProjector, sizeProjector, stepBuffer) {
21
- var _this = this;
22
22
  return function (context, data, attrToAppliedProjector) {
23
23
  var _a = context.canvas, clientWidth = _a.clientWidth, clientHeight = _a.clientHeight;
24
24
  var buffer = (stepBuffer === undefined) ? new canvasBuffer_1.CanvasBuffer(0, 0) : stepBuffer;
@@ -33,20 +33,20 @@ function makeSymbolCanvasDrawStep(dataset, symbolProjector, sizeProjector, stepB
33
33
  continue;
34
34
  }
35
35
  // check symbol is in viewport
36
- var attrs = canvasDrawer_1.resolveAttributes(attrToAppliedProjector, SYMBOL_ATTRS, datum, index);
36
+ var attrs = (0, canvasDrawer_1.resolveAttributes)(attrToAppliedProjector, SYMBOL_ATTRS, datum, index);
37
37
  var symbolSize = sizeAccessor(datum, index, dataset);
38
38
  if (!squareOverlapsBounds(clientWidth, clientHeight, attrs["x"], attrs["y"], symbolSize)) {
39
39
  continue;
40
40
  }
41
41
  // check attributes and symbol type
42
42
  var attrsSame = isAttributeValuesEqual(prevAttrs, attrs, canvasDrawer_1.ContextStyleAttrs);
43
- var symbolGenerator = symbolAccessor(datum, index, _this._dataset);
43
+ var symbolGenerator = symbolAccessor(datum, index, dataset);
44
44
  if (attrsSame && prevSymbolSize == symbolSize && prevSymbolGenerator == symbolGenerator) {
45
45
  // no-op;
46
46
  }
47
47
  else {
48
48
  // make room for bigger symbol if needed
49
- var strokeWidth = canvasDrawer_1.getStrokeWidth(attrs);
49
+ var strokeWidth = (0, canvasDrawer_1.getStrokeWidth)(attrs);
50
50
  // +1 to account for subpixel aliasing
51
51
  var wantedBufferSize = symbolSize + strokeWidth + 1;
52
52
  if (wantedBufferSize > buffer.screenWidth || wantedBufferSize > buffer.screenHeight) {
@@ -58,7 +58,7 @@ function makeSymbolCanvasDrawStep(dataset, symbolProjector, sizeProjector, stepB
58
58
  bufferCtx.beginPath();
59
59
  symbolGenerator(symbolSize).context(bufferCtx)(null);
60
60
  bufferCtx.closePath();
61
- canvasDrawer_1.renderPathWithStyle(bufferCtx, attrs);
61
+ (0, canvasDrawer_1.renderPathWithStyle)(bufferCtx, attrs);
62
62
  // save the values that are in the buffer
63
63
  prevSymbolGenerator = symbolGenerator;
64
64
  prevSymbolSize = symbolSize;
@@ -13,7 +13,7 @@ import * as Interactions from "./interactions";
13
13
  import * as Plots from "./plots";
14
14
  import * as Scales from "./scales";
15
15
  import * as Utils from "./utils";
16
- export { Animators, Axes, Components, Configs, Formatters, RenderController, RenderPolicies, SymbolFactories, Dispatchers, Drawers, Interactions, Plots, Scales, Utils };
16
+ export { Animators, Axes, Components, Configs, Formatters, RenderController, RenderPolicies, SymbolFactories, Dispatchers, Drawers, Interactions, Plots, Scales, Utils, };
17
17
  export * from "./animators/animator";
18
18
  export * from "./axes/axis";
19
19
  export { TimeInterval } from "./axes/timeAxis";
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.version = exports.TimeInterval = exports.Utils = exports.Scales = exports.Plots = exports.Interactions = exports.Drawers = exports.Dispatchers = exports.SymbolFactories = exports.RenderPolicies = exports.RenderController = exports.Formatters = exports.Configs = exports.Components = exports.Axes = exports.Animators = void 0;
3
4
  var tslib_1 = require("tslib");
4
5
  // HACKHACK d3-selection-multi doesn't play well with default "d3" package in a
5
6
  // bundler environment (e.g. webpack) - see https://github.com/d3/d3-selection-multi/issues/11
@@ -33,19 +34,21 @@ var Scales = require("./scales");
33
34
  exports.Scales = Scales;
34
35
  var Utils = require("./utils");
35
36
  exports.Utils = Utils;
36
- tslib_1.__exportStar(require("./axes/axis"), exports);
37
+ (0, tslib_1.__exportStar)(require("./animators/animator"), exports);
38
+ (0, tslib_1.__exportStar)(require("./axes/axis"), exports);
37
39
  var timeAxis_1 = require("./axes/timeAxis");
38
- exports.TimeInterval = timeAxis_1.TimeInterval;
39
- tslib_1.__exportStar(require("./components/component"), exports);
40
- tslib_1.__exportStar(require("./components/componentContainer"), exports);
41
- tslib_1.__exportStar(require("./core/dataset"), exports);
40
+ Object.defineProperty(exports, "TimeInterval", { enumerable: true, get: function () { return timeAxis_1.TimeInterval; } });
41
+ (0, tslib_1.__exportStar)(require("./components/component"), exports);
42
+ (0, tslib_1.__exportStar)(require("./components/componentContainer"), exports);
43
+ (0, tslib_1.__exportStar)(require("./core/dataset"), exports);
44
+ (0, tslib_1.__exportStar)(require("./core/interfaces"), exports);
42
45
  var version_1 = require("./core/version");
43
- exports.version = version_1.version;
44
- tslib_1.__exportStar(require("./dispatchers/dispatcher"), exports);
45
- tslib_1.__exportStar(require("./drawers/drawer"), exports);
46
- tslib_1.__exportStar(require("./interactions/interaction"), exports);
47
- tslib_1.__exportStar(require("./interactions/keyInteraction"), exports);
48
- tslib_1.__exportStar(require("./plots/xyPlot"), exports);
49
- tslib_1.__exportStar(require("./plots/plot"), exports);
50
- tslib_1.__exportStar(require("./scales/quantitativeScale"), exports);
51
- tslib_1.__exportStar(require("./scales/scale"), exports);
46
+ Object.defineProperty(exports, "version", { enumerable: true, get: function () { return version_1.version; } });
47
+ (0, tslib_1.__exportStar)(require("./dispatchers/dispatcher"), exports);
48
+ (0, tslib_1.__exportStar)(require("./drawers/drawer"), exports);
49
+ (0, tslib_1.__exportStar)(require("./interactions/interaction"), exports);
50
+ (0, tslib_1.__exportStar)(require("./interactions/keyInteraction"), exports);
51
+ (0, tslib_1.__exportStar)(require("./plots/xyPlot"), exports);
52
+ (0, tslib_1.__exportStar)(require("./plots/plot"), exports);
53
+ (0, tslib_1.__exportStar)(require("./scales/quantitativeScale"), exports);
54
+ (0, tslib_1.__exportStar)(require("./scales/scale"), exports);
@@ -26,10 +26,10 @@ export declare class Click extends Interaction {
26
26
  private _touchCancelCallback;
27
27
  protected _anchor(component: Component): void;
28
28
  protected _unanchor(): void;
29
- private _handleClickDown(p, event);
30
- private _handleClickUp(p, event);
31
- private _handleDblClick(p, event);
32
- private static _pointsEqual(p1, p2);
29
+ private _handleClickDown;
30
+ private _handleClickUp;
31
+ private _handleDblClick;
32
+ private static _pointsEqual;
33
33
  /**
34
34
  * Adds a callback to be called when the Component is clicked.
35
35
  *
@@ -4,12 +4,13 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Click = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var Dispatchers = require("../dispatchers");
9
10
  var Utils = require("../utils");
10
11
  var interaction_1 = require("./interaction");
11
12
  var Click = /** @class */ (function (_super) {
12
- tslib_1.__extends(Click, _super);
13
+ (0, tslib_1.__extends)(Click, _super);
13
14
  function Click() {
14
15
  var _this = _super !== null && _super.apply(this, arguments) || this;
15
16
  _this._clickedDown = false;
@@ -32,10 +32,10 @@ export declare class Drag extends Interaction {
32
32
  private _touchEndCallback;
33
33
  protected _anchor(component: Component): void;
34
34
  protected _unanchor(): void;
35
- private _translateAndConstrain(p);
36
- private _startDrag(point, event);
37
- private _doDrag(point, event);
38
- private _endDrag(point, event);
35
+ private _translateAndConstrain;
36
+ private _startDrag;
37
+ private _doDrag;
38
+ private _endDrag;
39
39
  constructor(mouseButton?: number);
40
40
  /**
41
41
  * Gets whether the Drag Interaction constrains Points passed to its
@@ -4,12 +4,13 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Drag = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var Dispatchers = require("../dispatchers");
9
10
  var Utils = require("../utils");
10
11
  var interaction_1 = require("./interaction");
11
12
  var Drag = /** @class */ (function (_super) {
12
- tslib_1.__extends(Drag, _super);
13
+ (0, tslib_1.__extends)(Drag, _super);
13
14
  function Drag(mouseButton) {
14
15
  var _this = _super.call(this) || this;
15
16
  _this._dragging = false;
@@ -4,11 +4,12 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.zoomOut = void 0;
7
8
  var tslib_1 = require("tslib");
8
- tslib_1.__exportStar(require("./clickInteraction"), exports);
9
- tslib_1.__exportStar(require("./dragInteraction"), exports);
10
- tslib_1.__exportStar(require("./keyInteraction"), exports);
11
- tslib_1.__exportStar(require("./panZoomInteraction"), exports);
12
- tslib_1.__exportStar(require("./pointerInteraction"), exports);
9
+ (0, tslib_1.__exportStar)(require("./clickInteraction"), exports);
10
+ (0, tslib_1.__exportStar)(require("./dragInteraction"), exports);
11
+ (0, tslib_1.__exportStar)(require("./keyInteraction"), exports);
12
+ (0, tslib_1.__exportStar)(require("./panZoomInteraction"), exports);
13
+ (0, tslib_1.__exportStar)(require("./pointerInteraction"), exports);
13
14
  var panZoomConstraints_1 = require("./panZoomConstraints");
14
- exports.zoomOut = panZoomConstraints_1.zoomOut;
15
+ Object.defineProperty(exports, "zoomOut", { enumerable: true, get: function () { return panZoomConstraints_1.zoomOut; } });
@@ -55,6 +55,6 @@ export declare class Interaction {
55
55
  * @return {boolean} Whether or not the point is inside the Component.
56
56
  */
57
57
  protected _isInsideComponent(p: Point): boolean;
58
- private _connect();
59
- private _disconnect();
58
+ private _connect;
59
+ private _disconnect;
60
60
  }
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Interaction = void 0;
7
8
  var Interaction = /** @class */ (function () {
8
9
  function Interaction() {
9
10
  var _this = this;
@@ -20,8 +20,8 @@ export declare class Key extends Interaction {
20
20
  private _keyUpCallback;
21
21
  protected _anchor(component: Component): void;
22
22
  protected _unanchor(): void;
23
- private _handleKeyDownEvent(keyCode, event);
24
- private _handleKeyUpEvent(keyCode);
23
+ private _handleKeyDownEvent;
24
+ private _handleKeyUpEvent;
25
25
  /**
26
26
  * Adds a callback to be called when the key with the given keyCode is
27
27
  * pressed and the user is moused over the Component.
@@ -4,12 +4,13 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Key = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var Dispatchers = require("../dispatchers");
9
10
  var Utils = require("../utils");
10
11
  var interaction_1 = require("./interaction");
11
12
  var Key = /** @class */ (function (_super) {
12
- tslib_1.__extends(Key, _super);
13
+ (0, tslib_1.__extends)(Key, _super);
13
14
  function Key() {
14
15
  var _this = _super !== null && _super.apply(this, arguments) || this;
15
16
  _this._keyPressCallbacks = {};
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.constrainedTranslation = exports.constrainZoomValues = exports.constrainZoomExtents = exports.constrainedZoom = exports.zoomOut = void 0;
7
8
  /**
8
9
  * Return `value` if its distance to `center` was scaled by `zoom`.
9
10
  *
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Copyright 2014-present Palantir Technologies
3
+ * @license MIT
4
+ */
1
5
  import { Component } from "../components/component";
2
6
  import { Point } from "../core/interfaces";
3
7
  import { TransformableScale } from "../scales/scale";
@@ -81,19 +85,19 @@ export declare class PanZoom extends Interaction {
81
85
  };
82
86
  protected _anchor(component: Component): void;
83
87
  protected _unanchor(): void;
84
- private _handleTouchStart(ids, idToPoint, e);
85
- private _handlePinch(ids, idToPoint, e);
88
+ private _handleTouchStart;
89
+ private _handlePinch;
86
90
  static centerPoint(point1: Point, point2: Point): {
87
91
  x: number;
88
92
  y: number;
89
93
  };
90
- private static _pointDistance(point1, point2);
91
- private _handleTouchEnd(ids, idToPoint, e);
92
- private _handleWheelEvent(p, e);
93
- private _constrainedZoom(scale, zoomAmount, centerPoint);
94
- private _constrainedTranslation(scale, translation);
95
- private _setupDragInteraction();
96
- private _nonLinearScaleWithExtents(scale);
94
+ private static _pointDistance;
95
+ private _handleTouchEnd;
96
+ private _handleWheelEvent;
97
+ private _constrainedZoom;
98
+ private _constrainedTranslation;
99
+ private _setupDragInteraction;
100
+ private _nonLinearScaleWithExtents;
97
101
  /**
98
102
  * Gets the x scales for this PanZoom Interaction.
99
103
  */
@@ -4,6 +4,7 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.PanZoom = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var d3 = require("d3");
9
10
  var Dispatchers = require("../dispatchers");
@@ -13,7 +14,7 @@ var Interactions = require("./");
13
14
  var interaction_1 = require("./interaction");
14
15
  var panZoomConstraints_1 = require("./panZoomConstraints");
15
16
  var PanZoom = /** @class */ (function (_super) {
16
- tslib_1.__extends(PanZoom, _super);
17
+ (0, tslib_1.__extends)(PanZoom, _super);
17
18
  /**
18
19
  * A PanZoom Interaction updates the domains of an x-scale and/or a y-scale
19
20
  * in response to the user panning or zooming.
@@ -240,10 +241,10 @@ var PanZoom = /** @class */ (function (_super) {
240
241
  }
241
242
  };
242
243
  PanZoom.prototype._constrainedZoom = function (scale, zoomAmount, centerPoint) {
243
- return panZoomConstraints_1.constrainedZoom(scale, zoomAmount, centerPoint, this.minDomainExtent(scale), this.maxDomainExtent(scale), this.minDomainValue(scale), this.maxDomainValue(scale));
244
+ return (0, panZoomConstraints_1.constrainedZoom)(scale, zoomAmount, centerPoint, this.minDomainExtent(scale), this.maxDomainExtent(scale), this.minDomainValue(scale), this.maxDomainValue(scale));
244
245
  };
245
246
  PanZoom.prototype._constrainedTranslation = function (scale, translation) {
246
- return panZoomConstraints_1.constrainedTranslation(scale, translation, this.minDomainValue(scale), this.maxDomainValue(scale));
247
+ return (0, panZoomConstraints_1.constrainedTranslation)(scale, translation, this.minDomainValue(scale), this.maxDomainValue(scale));
247
248
  };
248
249
  PanZoom.prototype._setupDragInteraction = function () {
249
250
  var _this = this;
@@ -17,9 +17,9 @@ export declare class Pointer extends Interaction {
17
17
  private _touchStartCallback;
18
18
  protected _anchor(component: Component): void;
19
19
  protected _unanchor(): void;
20
- private _handleMouseEvent(p, e);
21
- private _handleTouchEvent(p, e);
22
- private _handlePointerEvent(p, insideSVG);
20
+ private _handleMouseEvent;
21
+ private _handleTouchEvent;
22
+ private _handlePointerEvent;
23
23
  /**
24
24
  * Adds a callback to be called when the pointer enters the Component.
25
25
  *
@@ -4,12 +4,13 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Pointer = void 0;
7
8
  var tslib_1 = require("tslib");
8
9
  var Dispatchers = require("../dispatchers");
9
10
  var Utils = require("../utils");
10
11
  var interaction_1 = require("./interaction");
11
12
  var Pointer = /** @class */ (function (_super) {
12
- tslib_1.__extends(Pointer, _super);
13
+ (0, tslib_1.__extends)(Pointer, _super);
13
14
  function Pointer() {
14
15
  var _this = _super !== null && _super.apply(this, arguments) || this;
15
16
  _this._overComponent = false;
@@ -4,9 +4,10 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.sign = void 0;
7
8
  var tslib_1 = require("tslib");
8
- tslib_1.__exportStar(require("./memoize"), exports);
9
- tslib_1.__exportStar(require("./memoizeProjectors"), exports);
10
- tslib_1.__exportStar(require("./memThunk"), exports);
9
+ (0, tslib_1.__exportStar)(require("./memoize"), exports);
10
+ (0, tslib_1.__exportStar)(require("./memoizeProjectors"), exports);
11
+ (0, tslib_1.__exportStar)(require("./memThunk"), exports);
11
12
  var signature_1 = require("./signature");
12
- exports.sign = signature_1.sign;
13
+ Object.defineProperty(exports, "sign", { enumerable: true, get: function () { return signature_1.sign; } });
@@ -6,6 +6,7 @@
6
6
  * of creating a memoized function that takes its inputs from mutable class properties.
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.memThunk = void 0;
9
10
  var index_1 = require("./index");
10
11
  /**
11
12
  * First pass argument thunks that will be evaluated whenever the memThunk
@@ -26,7 +27,7 @@ function memThunk() {
26
27
  }
27
28
  var inputs = argsAndCompute.slice(0, -1);
28
29
  var compute = argsAndCompute[argsAndCompute.length - 1];
29
- var memoizedCompute = index_1.memoize(compute);
30
+ var memoizedCompute = (0, index_1.memoize)(compute);
30
31
  var memoizedThunk = function () {
31
32
  var _this = this;
32
33
  var inputEval = inputs.map(function (inputFn) { return inputFn.apply(_this); });
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Copyright 2014-present Palantir Technologies
3
+ * @license MIT
4
+ * @fileoverview Implements a function memoizer using the Signature API.
5
+ */
1
6
  export interface IMemoizedFunctionMethods {
2
7
  /**
3
8
  * Lock the memoization to always return the cached
@@ -5,6 +5,7 @@
5
5
  * @fileoverview Implements a function memoizer using the Signature API.
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.memoize = void 0;
8
9
  var signature_1 = require("./signature");
9
10
  /**
10
11
  * Return a memoized version of the input function. The memoized function
@@ -43,7 +44,7 @@ function memoize(compute) {
43
44
  if (locked) {
44
45
  return lastValue;
45
46
  }
46
- var inputSignature = signature_1.signArray(args);
47
+ var inputSignature = (0, signature_1.signArray)(args);
47
48
  if (lastSignature === undefined
48
49
  || lastSignature.isDifferent(inputSignature)) {
49
50
  if (logPerformance) {