@kevinburke/flot 5.1.2 → 5.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/flot.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @kevinburke/flot v5.1.2 | MIT License | https://github.com/kevinburke/flot */
1
+ /*! @kevinburke/flot v5.1.3 | MIT License | https://github.com/kevinburke/flot */
2
2
  var browser = {
3
3
  getPageXY: function (e) {
4
4
  var doc = document.documentElement,
@@ -4530,7 +4530,7 @@ Licensed under the MIT license.
4530
4530
  // Plugin registry. Plugins push to this array to register themselves.
4531
4531
  var plugins = [];
4532
4532
 
4533
- var version = "5.1.2";
4533
+ var version = "5.1.3";
4534
4534
 
4535
4535
  // The main plot function.
4536
4536
  function plot(placeholder, data, options) {
@@ -1,4 +1,4 @@
1
- /*! @kevinburke/flot v5.1.2 | MIT License | https://github.com/kevinburke/flot */
1
+ /*! @kevinburke/flot v5.1.3 | MIT License | https://github.com/kevinburke/flot */
2
2
  (function ($) {
3
3
  'use strict';
4
4
 
@@ -168,8 +168,10 @@
168
168
  function removeData(el, key) {
169
169
  var store = dataStore.get(el);
170
170
  if (store) {
171
- {
171
+ if (key) {
172
172
  delete store[key];
173
+ } else {
174
+ dataStore.delete(el);
173
175
  }
174
176
  }
175
177
  }
@@ -192,7 +194,7 @@
192
194
  return triggerImpl(el, type, args);
193
195
  }
194
196
 
195
- function setTrigger(fn) {
197
+ function setTrigger$1(fn) {
196
198
  triggerImpl = fn;
197
199
  }
198
200
 
@@ -235,6 +237,20 @@
235
237
  }
236
238
  }
237
239
 
240
+ var helpers = /*#__PURE__*/Object.freeze({
241
+ __proto__: null,
242
+ bind: bind,
243
+ css: css,
244
+ data: data,
245
+ extend: extend,
246
+ height: height,
247
+ removeData: removeData,
248
+ setTrigger: setTrigger$1,
249
+ trigger: trigger,
250
+ unbind: unbind,
251
+ width: width
252
+ });
253
+
238
254
  /** ## jquery.flot.canvaswrapper
239
255
 
240
256
  This plugin contains the function for creating and manipulating both the canvas
@@ -4537,7 +4553,7 @@
4537
4553
  // Plugin registry. Plugins push to this array to register themselves.
4538
4554
  var plugins = [];
4539
4555
 
4540
- var version = "5.1.2";
4556
+ var version = "5.1.3";
4541
4557
 
4542
4558
  // The main plot function.
4543
4559
  function plot(placeholder, data, options) {
@@ -9921,6 +9937,7 @@
9921
9937
  // import '@kevinburke/flot/jquery';
9922
9938
  // $.plot("#placeholder", data, options);
9923
9939
 
9940
+ var setTrigger = setTrigger$1;
9924
9941
 
9925
9942
  // Route flot's internal trigger() through jQuery so plugin handlers bound
9926
9943
  // via $(el).on(type, fn) see the same data shape as upstream flot/flot.
@@ -9941,12 +9958,12 @@
9941
9958
  });
9942
9959
 
9943
9960
  // Register $.plot and $.color on the jQuery object.
9944
- $.plot = function(placeholder, data, options) {
9961
+ $.plot = /** @type {typeof $.plot} */ (function(placeholder, data, options) {
9945
9962
  var el = typeof placeholder === 'string'
9946
9963
  ? document.querySelector(placeholder)
9947
9964
  : (placeholder instanceof $ ? placeholder[0] : placeholder);
9948
9965
  return plot(el, data, options);
9949
- };
9966
+ });
9950
9967
 
9951
9968
  $.plot.plugins = plugins;
9952
9969
  $.plot.version = version;
@@ -9984,6 +10001,11 @@
9984
10001
  window.Flot = {};
9985
10002
  }
9986
10003
  window.Flot.Canvas = Canvas;
10004
+ // Exposed so standalone plugin bundles (dist/plugins/*.js) can resolve
10005
+ // their `import { plugins } from './jquery.flot.js'` and
10006
+ // `import { ... } from './helpers.js'` to live objects on this global.
10007
+ window.Flot.plugins = plugins;
10008
+ window.Flot.helpers = helpers;
9987
10009
  }
9988
10010
 
9989
10011
  })(jQuery);