plottable 3.12.0 → 4.0.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 (131) hide show
  1. package/README.md +9 -2
  2. package/build/src/animators/easingAnimator.d.ts +2 -2
  3. package/build/src/animators/easingAnimator.js +1 -1
  4. package/build/src/animators/index.js +2 -2
  5. package/build/src/axes/axis.d.ts +1 -1
  6. package/build/src/axes/axis.js +5 -5
  7. package/build/src/axes/categoryAxis.js +8 -7
  8. package/build/src/axes/index.js +3 -3
  9. package/build/src/axes/numericAxis.js +1 -1
  10. package/build/src/axes/timeAxis.d.ts +5 -5
  11. package/build/src/axes/timeAxis.js +6 -6
  12. package/build/src/components/component.d.ts +4 -4
  13. package/build/src/components/component.js +6 -6
  14. package/build/src/components/componentContainer.js +1 -1
  15. package/build/src/components/dragBoxLayer.d.ts +1 -1
  16. package/build/src/components/dragBoxLayer.js +1 -1
  17. package/build/src/components/dragLineLayer.js +1 -1
  18. package/build/src/components/gridlines.js +1 -1
  19. package/build/src/components/group.js +1 -1
  20. package/build/src/components/guideLineLayer.js +1 -1
  21. package/build/src/components/index.js +14 -14
  22. package/build/src/components/interpolatedColorLegend.js +1 -1
  23. package/build/src/components/label.d.ts +1 -1
  24. package/build/src/components/label.js +3 -3
  25. package/build/src/components/legend.js +7 -7
  26. package/build/src/components/plotGroup.js +1 -1
  27. package/build/src/components/selectionBoxLayer.js +2 -2
  28. package/build/src/components/table.js +1 -1
  29. package/build/src/components/wrappedLabel.js +1 -1
  30. package/build/src/components/xDragBoxLayer.js +1 -1
  31. package/build/src/components/yDragBoxLayer.js +1 -1
  32. package/build/src/core/dataset.d.ts +1 -1
  33. package/build/src/core/formatters.d.ts +2 -2
  34. package/build/src/core/formatters.js +16 -13
  35. package/build/src/core/interfaces.d.ts +9 -9
  36. package/build/src/core/renderController.d.ts +1 -1
  37. package/build/src/core/renderController.js +6 -6
  38. package/build/src/core/symbolFactories.d.ts +2 -2
  39. package/build/src/core/symbolFactories.js +15 -15
  40. package/build/src/core/version.js +1 -1
  41. package/build/src/dispatchers/index.js +3 -3
  42. package/build/src/dispatchers/keyDispatcher.d.ts +1 -1
  43. package/build/src/dispatchers/keyDispatcher.js +1 -1
  44. package/build/src/dispatchers/mouseDispatcher.d.ts +1 -1
  45. package/build/src/dispatchers/mouseDispatcher.js +1 -1
  46. package/build/src/dispatchers/touchDispatcher.d.ts +1 -1
  47. package/build/src/dispatchers/touchDispatcher.js +1 -1
  48. package/build/src/drawers/arcDrawer.js +1 -1
  49. package/build/src/drawers/arcOutlineDrawer.js +1 -1
  50. package/build/src/drawers/areaDrawer.js +3 -3
  51. package/build/src/drawers/canvasBuffer.js +2 -2
  52. package/build/src/drawers/canvasDrawer.d.ts +1 -1
  53. package/build/src/drawers/canvasDrawer.js +8 -8
  54. package/build/src/drawers/drawStep.d.ts +2 -2
  55. package/build/src/drawers/index.js +11 -11
  56. package/build/src/drawers/lineDrawer.js +3 -3
  57. package/build/src/drawers/rectangleDrawer.js +2 -2
  58. package/build/src/drawers/segmentDrawer.js +1 -1
  59. package/build/src/drawers/symbolDrawer.js +3 -3
  60. package/build/src/index.js +14 -14
  61. package/build/src/interactions/clickInteraction.d.ts +1 -1
  62. package/build/src/interactions/clickInteraction.js +1 -1
  63. package/build/src/interactions/dragInteraction.d.ts +2 -2
  64. package/build/src/interactions/dragInteraction.js +1 -1
  65. package/build/src/interactions/index.js +5 -5
  66. package/build/src/interactions/keyInteraction.d.ts +1 -1
  67. package/build/src/interactions/keyInteraction.js +1 -1
  68. package/build/src/interactions/panZoomConstraints.js +5 -6
  69. package/build/src/interactions/panZoomInteraction.d.ts +4 -4
  70. package/build/src/interactions/panZoomInteraction.js +9 -10
  71. package/build/src/interactions/pointerInteraction.d.ts +1 -1
  72. package/build/src/interactions/pointerInteraction.js +1 -1
  73. package/build/src/memoize/index.js +3 -3
  74. package/build/src/memoize/memThunk.d.ts +1 -1
  75. package/build/src/memoize/memThunk.js +1 -2
  76. package/build/src/memoize/memoize.d.ts +1 -1
  77. package/build/src/memoize/memoize.js +1 -2
  78. package/build/src/memoize/memoizeProjectors.js +4 -5
  79. package/build/src/memoize/signature.d.ts +1 -1
  80. package/build/src/memoize/signature.js +10 -10
  81. package/build/src/plots/areaPlot.js +4 -3
  82. package/build/src/plots/barPlot.d.ts +3 -3
  83. package/build/src/plots/barPlot.js +6 -6
  84. package/build/src/plots/clusteredBarPlot.js +1 -1
  85. package/build/src/plots/commons.js +1 -1
  86. package/build/src/plots/index.js +12 -12
  87. package/build/src/plots/linePlot.d.ts +2 -3
  88. package/build/src/plots/linePlot.js +3 -2
  89. package/build/src/plots/piePlot.js +3 -2
  90. package/build/src/plots/plot.d.ts +2 -2
  91. package/build/src/plots/plot.js +9 -9
  92. package/build/src/plots/rectanglePlot.js +3 -4
  93. package/build/src/plots/scatterPlot.js +4 -4
  94. package/build/src/plots/segmentPlot.js +1 -1
  95. package/build/src/plots/stackedAreaPlot.js +5 -6
  96. package/build/src/plots/stackedBarPlot.js +4 -4
  97. package/build/src/plots/waterfallPlot.js +1 -1
  98. package/build/src/plots/xyPlot.js +3 -3
  99. package/build/src/scales/categoryScale.js +2 -2
  100. package/build/src/scales/colorScale.js +24 -5
  101. package/build/src/scales/index.js +9 -9
  102. package/build/src/scales/interpolatedColorScale.js +6 -6
  103. package/build/src/scales/linearScale.js +3 -3
  104. package/build/src/scales/logScale.js +3 -3
  105. package/build/src/scales/modifiedLogScale.js +2 -2
  106. package/build/src/scales/quantitativeScale.js +1 -1
  107. package/build/src/scales/scale.d.ts +1 -1
  108. package/build/src/scales/tickGenerators.js +2 -3
  109. package/build/src/scales/timeScale.js +4 -4
  110. package/build/src/utils/arrayUtils.js +5 -7
  111. package/build/src/utils/callbackSet.js +1 -1
  112. package/build/src/utils/coerceD3.js +1 -2
  113. package/build/src/utils/colorUtils.js +3 -4
  114. package/build/src/utils/d3ShapeUtils.d.ts +11 -0
  115. package/build/src/utils/d3ShapeUtils.js +17 -0
  116. package/build/src/utils/domUtils.js +20 -20
  117. package/build/src/utils/index.js +8 -8
  118. package/build/src/utils/makeEnum.js +1 -2
  119. package/build/src/utils/mathUtils.d.ts +2 -2
  120. package/build/src/utils/mathUtils.js +17 -18
  121. package/build/src/utils/objectUtils.js +1 -2
  122. package/build/src/utils/rTree.d.ts +1 -1
  123. package/build/src/utils/rTree.js +4 -4
  124. package/build/src/utils/rTreeSplitStrategies.d.ts +1 -1
  125. package/build/src/utils/stackingUtils.d.ts +6 -6
  126. package/build/src/utils/stackingUtils.js +8 -9
  127. package/build/src/utils/transformAwareTranslator.js +2 -2
  128. package/build/src/utils/windowUtils.js +4 -5
  129. package/package.json +12 -11
  130. package/plottable.js +19210 -46909
  131. package/plottable.js.map +1 -1
@@ -4,9 +4,11 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.normalizeKey = exports.stackedExtent = exports.stackedExtents = exports.stack = exports.IStackingOrder = void 0;
8
- var d3 = require("d3");
9
- var lodash_es_1 = require("lodash-es");
7
+ exports.normalizeKey = exports.IStackingOrder = void 0;
8
+ exports.stack = stack;
9
+ exports.stackedExtents = stackedExtents;
10
+ exports.stackedExtent = stackedExtent;
11
+ var memoize_1 = require("lodash-es/memoize");
10
12
  var Utils = require("./");
11
13
  var makeEnum_1 = require("./makeEnum");
12
14
  /**
@@ -28,8 +30,8 @@ var nativeMath = window.Math;
28
30
  */
29
31
  function stack(datasets, keyAccessor, valueAccessor, stackingOrder) {
30
32
  if (stackingOrder === void 0) { stackingOrder = "bottomup"; }
31
- var positiveOffsets = d3.map();
32
- var negativeOffsets = d3.map();
33
+ var positiveOffsets = new Map();
34
+ var negativeOffsets = new Map();
33
35
  var datasetToKeyToStackedDatum = new Utils.Map();
34
36
  if (stackingOrder === "topdown") {
35
37
  datasets = datasets.slice();
@@ -68,7 +70,6 @@ function stack(datasets, keyAccessor, valueAccessor, stackingOrder) {
68
70
  }
69
71
  return datasetToKeyToStackedDatum;
70
72
  }
71
- exports.stack = stack;
72
73
  /**
73
74
  * Computes the maximum and minimum extents of each stack individually.
74
75
  *
@@ -102,7 +103,6 @@ function stackedExtents(stackingResult) {
102
103
  });
103
104
  return { maximumExtents: maximumExtents, minimumExtents: minimumExtents };
104
105
  }
105
- exports.stackedExtents = stackedExtents;
106
106
  /**
107
107
  * Computes the total extent over all data points in all Datasets, taking stacking into consideration.
108
108
  *
@@ -129,13 +129,12 @@ function stackedExtent(stackingResult, keyAccessor, filter) {
129
129
  var minStackExtent = Utils.Math.min(extents, 0);
130
130
  return [nativeMath.min(minStackExtent, 0), nativeMath.max(0, maxStackExtent)];
131
131
  }
132
- exports.stackedExtent = stackedExtent;
133
132
  /**
134
133
  * Normalizes a key used for stacking
135
134
  *
136
135
  * @param {any} key The key to be normalized
137
136
  * @return {string} The stringified key
138
137
  */
139
- exports.normalizeKey = (0, lodash_es_1.memoize)(function (key) {
138
+ exports.normalizeKey = (0, memoize_1.default)(function (key) {
140
139
  return String(key);
141
140
  });
@@ -4,7 +4,8 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.Translator = exports.getTranslator = void 0;
7
+ exports.Translator = void 0;
8
+ exports.getTranslator = getTranslator;
8
9
  var Utils = require("../utils");
9
10
  var _TRANSLATOR_KEY = "__Plottable_ClientTranslator";
10
11
  /**
@@ -19,7 +20,6 @@ function getTranslator(component) {
19
20
  }
20
21
  return translator;
21
22
  }
22
- exports.getTranslator = getTranslator;
23
23
  /**
24
24
  * The translator implements CSS transform aware position measuring. We manually
25
25
  * compute a cumulative CSS3 of the root element ancestors up to `<body>`.
@@ -4,7 +4,10 @@
4
4
  * @license MIT
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.deprecated = exports.debounce = exports.setTimeout = exports.warn = void 0;
7
+ exports.warn = warn;
8
+ exports.setTimeout = setTimeout;
9
+ exports.debounce = debounce;
10
+ exports.deprecated = deprecated;
8
11
  var Configs = require("../core/config");
9
12
  /**
10
13
  * Print a warning message to the console, if it is available.
@@ -18,7 +21,6 @@ function warn(warning) {
18
21
  // tslint:disable-next-line:no-console
19
22
  console.warn(warning);
20
23
  }
21
- exports.warn = warn;
22
24
  /**
23
25
  * Is like setTimeout, but activates synchronously if time=0
24
26
  * We special case 0 because of an observed issue where calling setTimeout causes visible flickering.
@@ -40,7 +42,6 @@ function setTimeout(f, time) {
40
42
  return window.setTimeout(f, time, args);
41
43
  }
42
44
  }
43
- exports.setTimeout = setTimeout;
44
45
  /**
45
46
  * Debounces the supplied callback and returns a function with the same
46
47
  * arguments.
@@ -68,7 +69,6 @@ function debounce(msec, callback, context) {
68
69
  timeoutToken = setTimeout(deferredCallback, msec);
69
70
  };
70
71
  }
71
- exports.debounce = debounce;
72
72
  /**
73
73
  * Sends a deprecation warning to the console. The warning includes the name of the deprecated method,
74
74
  * version number of the deprecation, and an optional message.
@@ -84,4 +84,3 @@ function deprecated(callingMethod, version, message) {
84
84
  warn("Method " + callingMethod + " has been deprecated in version " + version +
85
85
  ". Please refer to the release notes. " + message);
86
86
  }
87
- exports.deprecated = deprecated;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "plottable",
3
3
  "description": "A modular charting library built on D3",
4
- "version": "3.12.0",
4
+ "version": "4.0.0",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -27,7 +27,8 @@
27
27
  "start:watch-tsc": "tsc -w -p .",
28
28
  "start:webpack-dev-server": "webpack-dev-server",
29
29
  "test": "grunt test-local",
30
- "test:ci": "grunt test-ci"
30
+ "test:ci": "grunt test-ci",
31
+ "test:browser": "node scripts/test-browser.js"
31
32
  },
32
33
  "devDependencies": {
33
34
  "@types/chai": "^3.4.34",
@@ -38,9 +39,8 @@
38
39
  "@types/sinon": "^1.16.36",
39
40
  "awesome-typescript-loader": "^3.4.1",
40
41
  "chai": "2.0.0",
41
- "circle-github-bot": "1.0.0",
42
+ "circle-github-bot": "^2.1.0",
42
43
  "grunt": "~0.4.5",
43
- "grunt-blanket-mocha": "^1.0.0",
44
44
  "grunt-bump": "0.7.0",
45
45
  "grunt-cli": "0.1.13",
46
46
  "grunt-contrib-connect": "0.11.2",
@@ -48,29 +48,30 @@
48
48
  "grunt-eslint": "17.3.1",
49
49
  "grunt-exec": "1.0.1",
50
50
  "grunt-jscs": "2.6.0",
51
- "grunt-saucelabs": "8.6.2",
52
51
  "jquery": "^3.3.1",
53
52
  "load-grunt-tasks": "3.4.0",
54
53
  "mocha": "2.2.5",
55
54
  "npm-run-all": "4.0.1",
55
+ "playwright": "^1.58.2",
56
56
  "requirejs": "2.1.18",
57
57
  "sinon": "^2.1.0",
58
58
  "tslint": "5.18.0",
59
- "typescript": "~4.4",
59
+ "typescript": "~5.9.3",
60
60
  "webpack": "2.6.1",
61
61
  "webpack-dev-server": "2.11.1",
62
62
  "webpack-merge": "^4.1.0"
63
63
  },
64
64
  "dependencies": {
65
- "@types/d3": "^4.13.0",
66
- "@types/d3-shape": "^1.2.5",
65
+ "@types/d3": "^7.4.3",
67
66
  "@types/is-plain-object": "^0.0.2",
68
- "d3": "^4.13.0",
69
- "d3-ease": "^1.0.0",
70
- "d3-shape": "^1.0.0",
67
+ "d3": "^7.9.0",
68
+ "d3-color": "^3.1.0",
71
69
  "is-plain-object": "^2.0.4",
72
70
  "lodash-es": "^4.17.15",
73
71
  "tslib": "~2.3.1",
74
72
  "typesettable": "4.1.0"
73
+ },
74
+ "engines": {
75
+ "node": ">=22.12.0"
75
76
  }
76
77
  }