@leankylin-sheet/react 4.0.15 → 4.0.17

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/index.umd.js CHANGED
@@ -92906,6 +92906,41 @@
92906
92906
  PERFORMANCE OF THIS SOFTWARE.
92907
92907
  ***************************************************************************** */
92908
92908
 
92909
+ var __assign = function() {
92910
+ __assign = Object.assign || function __assign(t) {
92911
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
92912
+ s = arguments[i];
92913
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
92914
+ }
92915
+ return t;
92916
+ };
92917
+ return __assign.apply(this, arguments);
92918
+ };
92919
+
92920
+ function __rest(s, e) {
92921
+ var t = {};
92922
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
92923
+ t[p] = s[p];
92924
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
92925
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
92926
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
92927
+ t[p[i]] = s[p[i]];
92928
+ }
92929
+ return t;
92930
+ }
92931
+
92932
+ function __values(o) {
92933
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
92934
+ if (m) return m.call(o);
92935
+ if (o && typeof o.length === "number") return {
92936
+ next: function () {
92937
+ if (o && i >= o.length) o = void 0;
92938
+ return { value: o && o[i++], done: !o };
92939
+ }
92940
+ };
92941
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
92942
+ }
92943
+
92909
92944
  function __read(o, n) {
92910
92945
  var m = typeof Symbol === "function" && o[Symbol.iterator];
92911
92946
  if (!m) return o;
@@ -92967,6 +93002,14 @@
92967
93002
  return memoizedFn.current;
92968
93003
  }
92969
93004
 
93005
+ function depsAreSame(oldDeps, deps) {
93006
+ if (oldDeps === deps) return true;
93007
+ for (var i = 0; i < oldDeps.length; i++) {
93008
+ if (!Object.is(oldDeps[i], deps[i])) return false;
93009
+ }
93010
+ return true;
93011
+ }
93012
+
92970
93013
  function useLatest(value) {
92971
93014
  var ref = React.useRef(value);
92972
93015
  ref.current = value;
@@ -93496,6 +93539,8 @@
93496
93539
 
93497
93540
  var debounce_1 = debounce;
93498
93541
 
93542
+ var isBrowser = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
93543
+
93499
93544
  /** Error message constants. */
93500
93545
  var FUNC_ERROR_TEXT$1 = 'Expected a function';
93501
93546
 
@@ -93563,6 +93608,1134 @@
93563
93608
 
93564
93609
  var throttle_1 = throttle;
93565
93610
 
93611
+ function getTargetElement(target, defaultElement) {
93612
+ if (!isBrowser) {
93613
+ return undefined;
93614
+ }
93615
+ if (!target) {
93616
+ return defaultElement;
93617
+ }
93618
+ var targetElement;
93619
+ if (isFunction(target)) {
93620
+ targetElement = target();
93621
+ } else if ('current' in target) {
93622
+ targetElement = target.current;
93623
+ } else {
93624
+ targetElement = target;
93625
+ }
93626
+ return targetElement;
93627
+ }
93628
+
93629
+ var createEffectWithTarget = function (useEffectType) {
93630
+ /**
93631
+ *
93632
+ * @param effect
93633
+ * @param deps
93634
+ * @param target target should compare ref.current vs ref.current, dom vs dom, ()=>dom vs ()=>dom
93635
+ */
93636
+ var useEffectWithTarget = function (effect, deps, target) {
93637
+ var hasInitRef = React.useRef(false);
93638
+ var lastElementRef = React.useRef([]);
93639
+ var lastDepsRef = React.useRef([]);
93640
+ var unLoadRef = React.useRef();
93641
+ useEffectType(function () {
93642
+ var _a;
93643
+ var targets = Array.isArray(target) ? target : [target];
93644
+ var els = targets.map(function (item) {
93645
+ return getTargetElement(item);
93646
+ });
93647
+ // init run
93648
+ if (!hasInitRef.current) {
93649
+ hasInitRef.current = true;
93650
+ lastElementRef.current = els;
93651
+ lastDepsRef.current = deps;
93652
+ unLoadRef.current = effect();
93653
+ return;
93654
+ }
93655
+ if (els.length !== lastElementRef.current.length || !depsAreSame(lastElementRef.current, els) || !depsAreSame(lastDepsRef.current, deps)) {
93656
+ (_a = unLoadRef.current) === null || _a === void 0 ? void 0 : _a.call(unLoadRef);
93657
+ lastElementRef.current = els;
93658
+ lastDepsRef.current = deps;
93659
+ unLoadRef.current = effect();
93660
+ }
93661
+ });
93662
+ useUnmount(function () {
93663
+ var _a;
93664
+ (_a = unLoadRef.current) === null || _a === void 0 ? void 0 : _a.call(unLoadRef);
93665
+ // for react-refresh
93666
+ hasInitRef.current = false;
93667
+ });
93668
+ };
93669
+ return useEffectWithTarget;
93670
+ };
93671
+
93672
+ var useEffectWithTarget = createEffectWithTarget(React.useEffect);
93673
+
93674
+ /**
93675
+ * Copyright 2016 Google Inc. All Rights Reserved.
93676
+ *
93677
+ * Licensed under the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE.
93678
+ *
93679
+ * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
93680
+ *
93681
+ */
93682
+ (function() {
93683
+
93684
+ // Exit early if we're not running in a browser.
93685
+ if (typeof window !== 'object') {
93686
+ return;
93687
+ }
93688
+
93689
+ // Exit early if all IntersectionObserver and IntersectionObserverEntry
93690
+ // features are natively supported.
93691
+ if ('IntersectionObserver' in window &&
93692
+ 'IntersectionObserverEntry' in window &&
93693
+ 'intersectionRatio' in window.IntersectionObserverEntry.prototype) {
93694
+
93695
+ // Minimal polyfill for Edge 15's lack of `isIntersecting`
93696
+ // See: https://github.com/w3c/IntersectionObserver/issues/211
93697
+ if (!('isIntersecting' in window.IntersectionObserverEntry.prototype)) {
93698
+ Object.defineProperty(window.IntersectionObserverEntry.prototype,
93699
+ 'isIntersecting', {
93700
+ get: function () {
93701
+ return this.intersectionRatio > 0;
93702
+ }
93703
+ });
93704
+ }
93705
+ return;
93706
+ }
93707
+
93708
+ /**
93709
+ * Returns the embedding frame element, if any.
93710
+ * @param {!Document} doc
93711
+ * @return {!Element}
93712
+ */
93713
+ function getFrameElement(doc) {
93714
+ try {
93715
+ return doc.defaultView && doc.defaultView.frameElement || null;
93716
+ } catch (e) {
93717
+ // Ignore the error.
93718
+ return null;
93719
+ }
93720
+ }
93721
+
93722
+ /**
93723
+ * A local reference to the root document.
93724
+ */
93725
+ var document = (function(startDoc) {
93726
+ var doc = startDoc;
93727
+ var frame = getFrameElement(doc);
93728
+ while (frame) {
93729
+ doc = frame.ownerDocument;
93730
+ frame = getFrameElement(doc);
93731
+ }
93732
+ return doc;
93733
+ })(window.document);
93734
+
93735
+ /**
93736
+ * An IntersectionObserver registry. This registry exists to hold a strong
93737
+ * reference to IntersectionObserver instances currently observing a target
93738
+ * element. Without this registry, instances without another reference may be
93739
+ * garbage collected.
93740
+ */
93741
+ var registry = [];
93742
+
93743
+ /**
93744
+ * The signal updater for cross-origin intersection. When not null, it means
93745
+ * that the polyfill is configured to work in a cross-origin mode.
93746
+ * @type {function(DOMRect|ClientRect, DOMRect|ClientRect)}
93747
+ */
93748
+ var crossOriginUpdater = null;
93749
+
93750
+ /**
93751
+ * The current cross-origin intersection. Only used in the cross-origin mode.
93752
+ * @type {DOMRect|ClientRect}
93753
+ */
93754
+ var crossOriginRect = null;
93755
+
93756
+
93757
+ /**
93758
+ * Creates the global IntersectionObserverEntry constructor.
93759
+ * https://w3c.github.io/IntersectionObserver/#intersection-observer-entry
93760
+ * @param {Object} entry A dictionary of instance properties.
93761
+ * @constructor
93762
+ */
93763
+ function IntersectionObserverEntry(entry) {
93764
+ this.time = entry.time;
93765
+ this.target = entry.target;
93766
+ this.rootBounds = ensureDOMRect(entry.rootBounds);
93767
+ this.boundingClientRect = ensureDOMRect(entry.boundingClientRect);
93768
+ this.intersectionRect = ensureDOMRect(entry.intersectionRect || getEmptyRect());
93769
+ this.isIntersecting = !!entry.intersectionRect;
93770
+
93771
+ // Calculates the intersection ratio.
93772
+ var targetRect = this.boundingClientRect;
93773
+ var targetArea = targetRect.width * targetRect.height;
93774
+ var intersectionRect = this.intersectionRect;
93775
+ var intersectionArea = intersectionRect.width * intersectionRect.height;
93776
+
93777
+ // Sets intersection ratio.
93778
+ if (targetArea) {
93779
+ // Round the intersection ratio to avoid floating point math issues:
93780
+ // https://github.com/w3c/IntersectionObserver/issues/324
93781
+ this.intersectionRatio = Number((intersectionArea / targetArea).toFixed(4));
93782
+ } else {
93783
+ // If area is zero and is intersecting, sets to 1, otherwise to 0
93784
+ this.intersectionRatio = this.isIntersecting ? 1 : 0;
93785
+ }
93786
+ }
93787
+
93788
+
93789
+ /**
93790
+ * Creates the global IntersectionObserver constructor.
93791
+ * https://w3c.github.io/IntersectionObserver/#intersection-observer-interface
93792
+ * @param {Function} callback The function to be invoked after intersection
93793
+ * changes have queued. The function is not invoked if the queue has
93794
+ * been emptied by calling the `takeRecords` method.
93795
+ * @param {Object=} opt_options Optional configuration options.
93796
+ * @constructor
93797
+ */
93798
+ function IntersectionObserver(callback, opt_options) {
93799
+
93800
+ var options = opt_options || {};
93801
+
93802
+ if (typeof callback != 'function') {
93803
+ throw new Error('callback must be a function');
93804
+ }
93805
+
93806
+ if (
93807
+ options.root &&
93808
+ options.root.nodeType != 1 &&
93809
+ options.root.nodeType != 9
93810
+ ) {
93811
+ throw new Error('root must be a Document or Element');
93812
+ }
93813
+
93814
+ // Binds and throttles `this._checkForIntersections`.
93815
+ this._checkForIntersections = throttle(
93816
+ this._checkForIntersections.bind(this), this.THROTTLE_TIMEOUT);
93817
+
93818
+ // Private properties.
93819
+ this._callback = callback;
93820
+ this._observationTargets = [];
93821
+ this._queuedEntries = [];
93822
+ this._rootMarginValues = this._parseRootMargin(options.rootMargin);
93823
+
93824
+ // Public properties.
93825
+ this.thresholds = this._initThresholds(options.threshold);
93826
+ this.root = options.root || null;
93827
+ this.rootMargin = this._rootMarginValues.map(function(margin) {
93828
+ return margin.value + margin.unit;
93829
+ }).join(' ');
93830
+
93831
+ /** @private @const {!Array<!Document>} */
93832
+ this._monitoringDocuments = [];
93833
+ /** @private @const {!Array<function()>} */
93834
+ this._monitoringUnsubscribes = [];
93835
+ }
93836
+
93837
+
93838
+ /**
93839
+ * The minimum interval within which the document will be checked for
93840
+ * intersection changes.
93841
+ */
93842
+ IntersectionObserver.prototype.THROTTLE_TIMEOUT = 100;
93843
+
93844
+
93845
+ /**
93846
+ * The frequency in which the polyfill polls for intersection changes.
93847
+ * this can be updated on a per instance basis and must be set prior to
93848
+ * calling `observe` on the first target.
93849
+ */
93850
+ IntersectionObserver.prototype.POLL_INTERVAL = null;
93851
+
93852
+ /**
93853
+ * Use a mutation observer on the root element
93854
+ * to detect intersection changes.
93855
+ */
93856
+ IntersectionObserver.prototype.USE_MUTATION_OBSERVER = true;
93857
+
93858
+
93859
+ /**
93860
+ * Sets up the polyfill in the cross-origin mode. The result is the
93861
+ * updater function that accepts two arguments: `boundingClientRect` and
93862
+ * `intersectionRect` - just as these fields would be available to the
93863
+ * parent via `IntersectionObserverEntry`. This function should be called
93864
+ * each time the iframe receives intersection information from the parent
93865
+ * window, e.g. via messaging.
93866
+ * @return {function(DOMRect|ClientRect, DOMRect|ClientRect)}
93867
+ */
93868
+ IntersectionObserver._setupCrossOriginUpdater = function() {
93869
+ if (!crossOriginUpdater) {
93870
+ /**
93871
+ * @param {DOMRect|ClientRect} boundingClientRect
93872
+ * @param {DOMRect|ClientRect} intersectionRect
93873
+ */
93874
+ crossOriginUpdater = function(boundingClientRect, intersectionRect) {
93875
+ if (!boundingClientRect || !intersectionRect) {
93876
+ crossOriginRect = getEmptyRect();
93877
+ } else {
93878
+ crossOriginRect = convertFromParentRect(boundingClientRect, intersectionRect);
93879
+ }
93880
+ registry.forEach(function(observer) {
93881
+ observer._checkForIntersections();
93882
+ });
93883
+ };
93884
+ }
93885
+ return crossOriginUpdater;
93886
+ };
93887
+
93888
+
93889
+ /**
93890
+ * Resets the cross-origin mode.
93891
+ */
93892
+ IntersectionObserver._resetCrossOriginUpdater = function() {
93893
+ crossOriginUpdater = null;
93894
+ crossOriginRect = null;
93895
+ };
93896
+
93897
+
93898
+ /**
93899
+ * Starts observing a target element for intersection changes based on
93900
+ * the thresholds values.
93901
+ * @param {Element} target The DOM element to observe.
93902
+ */
93903
+ IntersectionObserver.prototype.observe = function(target) {
93904
+ var isTargetAlreadyObserved = this._observationTargets.some(function(item) {
93905
+ return item.element == target;
93906
+ });
93907
+
93908
+ if (isTargetAlreadyObserved) {
93909
+ return;
93910
+ }
93911
+
93912
+ if (!(target && target.nodeType == 1)) {
93913
+ throw new Error('target must be an Element');
93914
+ }
93915
+
93916
+ this._registerInstance();
93917
+ this._observationTargets.push({element: target, entry: null});
93918
+ this._monitorIntersections(target.ownerDocument);
93919
+ this._checkForIntersections();
93920
+ };
93921
+
93922
+
93923
+ /**
93924
+ * Stops observing a target element for intersection changes.
93925
+ * @param {Element} target The DOM element to observe.
93926
+ */
93927
+ IntersectionObserver.prototype.unobserve = function(target) {
93928
+ this._observationTargets =
93929
+ this._observationTargets.filter(function(item) {
93930
+ return item.element != target;
93931
+ });
93932
+ this._unmonitorIntersections(target.ownerDocument);
93933
+ if (this._observationTargets.length == 0) {
93934
+ this._unregisterInstance();
93935
+ }
93936
+ };
93937
+
93938
+
93939
+ /**
93940
+ * Stops observing all target elements for intersection changes.
93941
+ */
93942
+ IntersectionObserver.prototype.disconnect = function() {
93943
+ this._observationTargets = [];
93944
+ this._unmonitorAllIntersections();
93945
+ this._unregisterInstance();
93946
+ };
93947
+
93948
+
93949
+ /**
93950
+ * Returns any queue entries that have not yet been reported to the
93951
+ * callback and clears the queue. This can be used in conjunction with the
93952
+ * callback to obtain the absolute most up-to-date intersection information.
93953
+ * @return {Array} The currently queued entries.
93954
+ */
93955
+ IntersectionObserver.prototype.takeRecords = function() {
93956
+ var records = this._queuedEntries.slice();
93957
+ this._queuedEntries = [];
93958
+ return records;
93959
+ };
93960
+
93961
+
93962
+ /**
93963
+ * Accepts the threshold value from the user configuration object and
93964
+ * returns a sorted array of unique threshold values. If a value is not
93965
+ * between 0 and 1 and error is thrown.
93966
+ * @private
93967
+ * @param {Array|number=} opt_threshold An optional threshold value or
93968
+ * a list of threshold values, defaulting to [0].
93969
+ * @return {Array} A sorted list of unique and valid threshold values.
93970
+ */
93971
+ IntersectionObserver.prototype._initThresholds = function(opt_threshold) {
93972
+ var threshold = opt_threshold || [0];
93973
+ if (!Array.isArray(threshold)) threshold = [threshold];
93974
+
93975
+ return threshold.sort().filter(function(t, i, a) {
93976
+ if (typeof t != 'number' || isNaN(t) || t < 0 || t > 1) {
93977
+ throw new Error('threshold must be a number between 0 and 1 inclusively');
93978
+ }
93979
+ return t !== a[i - 1];
93980
+ });
93981
+ };
93982
+
93983
+
93984
+ /**
93985
+ * Accepts the rootMargin value from the user configuration object
93986
+ * and returns an array of the four margin values as an object containing
93987
+ * the value and unit properties. If any of the values are not properly
93988
+ * formatted or use a unit other than px or %, and error is thrown.
93989
+ * @private
93990
+ * @param {string=} opt_rootMargin An optional rootMargin value,
93991
+ * defaulting to '0px'.
93992
+ * @return {Array<Object>} An array of margin objects with the keys
93993
+ * value and unit.
93994
+ */
93995
+ IntersectionObserver.prototype._parseRootMargin = function(opt_rootMargin) {
93996
+ var marginString = opt_rootMargin || '0px';
93997
+ var margins = marginString.split(/\s+/).map(function(margin) {
93998
+ var parts = /^(-?\d*\.?\d+)(px|%)$/.exec(margin);
93999
+ if (!parts) {
94000
+ throw new Error('rootMargin must be specified in pixels or percent');
94001
+ }
94002
+ return {value: parseFloat(parts[1]), unit: parts[2]};
94003
+ });
94004
+
94005
+ // Handles shorthand.
94006
+ margins[1] = margins[1] || margins[0];
94007
+ margins[2] = margins[2] || margins[0];
94008
+ margins[3] = margins[3] || margins[1];
94009
+
94010
+ return margins;
94011
+ };
94012
+
94013
+
94014
+ /**
94015
+ * Starts polling for intersection changes if the polling is not already
94016
+ * happening, and if the page's visibility state is visible.
94017
+ * @param {!Document} doc
94018
+ * @private
94019
+ */
94020
+ IntersectionObserver.prototype._monitorIntersections = function(doc) {
94021
+ var win = doc.defaultView;
94022
+ if (!win) {
94023
+ // Already destroyed.
94024
+ return;
94025
+ }
94026
+ if (this._monitoringDocuments.indexOf(doc) != -1) {
94027
+ // Already monitoring.
94028
+ return;
94029
+ }
94030
+
94031
+ // Private state for monitoring.
94032
+ var callback = this._checkForIntersections;
94033
+ var monitoringInterval = null;
94034
+ var domObserver = null;
94035
+
94036
+ // If a poll interval is set, use polling instead of listening to
94037
+ // resize and scroll events or DOM mutations.
94038
+ if (this.POLL_INTERVAL) {
94039
+ monitoringInterval = win.setInterval(callback, this.POLL_INTERVAL);
94040
+ } else {
94041
+ addEvent(win, 'resize', callback, true);
94042
+ addEvent(doc, 'scroll', callback, true);
94043
+ if (this.USE_MUTATION_OBSERVER && 'MutationObserver' in win) {
94044
+ domObserver = new win.MutationObserver(callback);
94045
+ domObserver.observe(doc, {
94046
+ attributes: true,
94047
+ childList: true,
94048
+ characterData: true,
94049
+ subtree: true
94050
+ });
94051
+ }
94052
+ }
94053
+
94054
+ this._monitoringDocuments.push(doc);
94055
+ this._monitoringUnsubscribes.push(function() {
94056
+ // Get the window object again. When a friendly iframe is destroyed, it
94057
+ // will be null.
94058
+ var win = doc.defaultView;
94059
+
94060
+ if (win) {
94061
+ if (monitoringInterval) {
94062
+ win.clearInterval(monitoringInterval);
94063
+ }
94064
+ removeEvent(win, 'resize', callback, true);
94065
+ }
94066
+
94067
+ removeEvent(doc, 'scroll', callback, true);
94068
+ if (domObserver) {
94069
+ domObserver.disconnect();
94070
+ }
94071
+ });
94072
+
94073
+ // Also monitor the parent.
94074
+ var rootDoc =
94075
+ (this.root && (this.root.ownerDocument || this.root)) || document;
94076
+ if (doc != rootDoc) {
94077
+ var frame = getFrameElement(doc);
94078
+ if (frame) {
94079
+ this._monitorIntersections(frame.ownerDocument);
94080
+ }
94081
+ }
94082
+ };
94083
+
94084
+
94085
+ /**
94086
+ * Stops polling for intersection changes.
94087
+ * @param {!Document} doc
94088
+ * @private
94089
+ */
94090
+ IntersectionObserver.prototype._unmonitorIntersections = function(doc) {
94091
+ var index = this._monitoringDocuments.indexOf(doc);
94092
+ if (index == -1) {
94093
+ return;
94094
+ }
94095
+
94096
+ var rootDoc =
94097
+ (this.root && (this.root.ownerDocument || this.root)) || document;
94098
+
94099
+ // Check if any dependent targets are still remaining.
94100
+ var hasDependentTargets =
94101
+ this._observationTargets.some(function(item) {
94102
+ var itemDoc = item.element.ownerDocument;
94103
+ // Target is in this context.
94104
+ if (itemDoc == doc) {
94105
+ return true;
94106
+ }
94107
+ // Target is nested in this context.
94108
+ while (itemDoc && itemDoc != rootDoc) {
94109
+ var frame = getFrameElement(itemDoc);
94110
+ itemDoc = frame && frame.ownerDocument;
94111
+ if (itemDoc == doc) {
94112
+ return true;
94113
+ }
94114
+ }
94115
+ return false;
94116
+ });
94117
+ if (hasDependentTargets) {
94118
+ return;
94119
+ }
94120
+
94121
+ // Unsubscribe.
94122
+ var unsubscribe = this._monitoringUnsubscribes[index];
94123
+ this._monitoringDocuments.splice(index, 1);
94124
+ this._monitoringUnsubscribes.splice(index, 1);
94125
+ unsubscribe();
94126
+
94127
+ // Also unmonitor the parent.
94128
+ if (doc != rootDoc) {
94129
+ var frame = getFrameElement(doc);
94130
+ if (frame) {
94131
+ this._unmonitorIntersections(frame.ownerDocument);
94132
+ }
94133
+ }
94134
+ };
94135
+
94136
+
94137
+ /**
94138
+ * Stops polling for intersection changes.
94139
+ * @param {!Document} doc
94140
+ * @private
94141
+ */
94142
+ IntersectionObserver.prototype._unmonitorAllIntersections = function() {
94143
+ var unsubscribes = this._monitoringUnsubscribes.slice(0);
94144
+ this._monitoringDocuments.length = 0;
94145
+ this._monitoringUnsubscribes.length = 0;
94146
+ for (var i = 0; i < unsubscribes.length; i++) {
94147
+ unsubscribes[i]();
94148
+ }
94149
+ };
94150
+
94151
+
94152
+ /**
94153
+ * Scans each observation target for intersection changes and adds them
94154
+ * to the internal entries queue. If new entries are found, it
94155
+ * schedules the callback to be invoked.
94156
+ * @private
94157
+ */
94158
+ IntersectionObserver.prototype._checkForIntersections = function() {
94159
+ if (!this.root && crossOriginUpdater && !crossOriginRect) {
94160
+ // Cross origin monitoring, but no initial data available yet.
94161
+ return;
94162
+ }
94163
+
94164
+ var rootIsInDom = this._rootIsInDom();
94165
+ var rootRect = rootIsInDom ? this._getRootRect() : getEmptyRect();
94166
+
94167
+ this._observationTargets.forEach(function(item) {
94168
+ var target = item.element;
94169
+ var targetRect = getBoundingClientRect(target);
94170
+ var rootContainsTarget = this._rootContainsTarget(target);
94171
+ var oldEntry = item.entry;
94172
+ var intersectionRect = rootIsInDom && rootContainsTarget &&
94173
+ this._computeTargetAndRootIntersection(target, targetRect, rootRect);
94174
+
94175
+ var rootBounds = null;
94176
+ if (!this._rootContainsTarget(target)) {
94177
+ rootBounds = getEmptyRect();
94178
+ } else if (!crossOriginUpdater || this.root) {
94179
+ rootBounds = rootRect;
94180
+ }
94181
+
94182
+ var newEntry = item.entry = new IntersectionObserverEntry({
94183
+ time: now(),
94184
+ target: target,
94185
+ boundingClientRect: targetRect,
94186
+ rootBounds: rootBounds,
94187
+ intersectionRect: intersectionRect
94188
+ });
94189
+
94190
+ if (!oldEntry) {
94191
+ this._queuedEntries.push(newEntry);
94192
+ } else if (rootIsInDom && rootContainsTarget) {
94193
+ // If the new entry intersection ratio has crossed any of the
94194
+ // thresholds, add a new entry.
94195
+ if (this._hasCrossedThreshold(oldEntry, newEntry)) {
94196
+ this._queuedEntries.push(newEntry);
94197
+ }
94198
+ } else {
94199
+ // If the root is not in the DOM or target is not contained within
94200
+ // root but the previous entry for this target had an intersection,
94201
+ // add a new record indicating removal.
94202
+ if (oldEntry && oldEntry.isIntersecting) {
94203
+ this._queuedEntries.push(newEntry);
94204
+ }
94205
+ }
94206
+ }, this);
94207
+
94208
+ if (this._queuedEntries.length) {
94209
+ this._callback(this.takeRecords(), this);
94210
+ }
94211
+ };
94212
+
94213
+
94214
+ /**
94215
+ * Accepts a target and root rect computes the intersection between then
94216
+ * following the algorithm in the spec.
94217
+ * TODO(philipwalton): at this time clip-path is not considered.
94218
+ * https://w3c.github.io/IntersectionObserver/#calculate-intersection-rect-algo
94219
+ * @param {Element} target The target DOM element
94220
+ * @param {Object} targetRect The bounding rect of the target.
94221
+ * @param {Object} rootRect The bounding rect of the root after being
94222
+ * expanded by the rootMargin value.
94223
+ * @return {?Object} The final intersection rect object or undefined if no
94224
+ * intersection is found.
94225
+ * @private
94226
+ */
94227
+ IntersectionObserver.prototype._computeTargetAndRootIntersection =
94228
+ function(target, targetRect, rootRect) {
94229
+ // If the element isn't displayed, an intersection can't happen.
94230
+ if (window.getComputedStyle(target).display == 'none') return;
94231
+
94232
+ var intersectionRect = targetRect;
94233
+ var parent = getParentNode(target);
94234
+ var atRoot = false;
94235
+
94236
+ while (!atRoot && parent) {
94237
+ var parentRect = null;
94238
+ var parentComputedStyle = parent.nodeType == 1 ?
94239
+ window.getComputedStyle(parent) : {};
94240
+
94241
+ // If the parent isn't displayed, an intersection can't happen.
94242
+ if (parentComputedStyle.display == 'none') return null;
94243
+
94244
+ if (parent == this.root || parent.nodeType == /* DOCUMENT */ 9) {
94245
+ atRoot = true;
94246
+ if (parent == this.root || parent == document) {
94247
+ if (crossOriginUpdater && !this.root) {
94248
+ if (!crossOriginRect ||
94249
+ crossOriginRect.width == 0 && crossOriginRect.height == 0) {
94250
+ // A 0-size cross-origin intersection means no-intersection.
94251
+ parent = null;
94252
+ parentRect = null;
94253
+ intersectionRect = null;
94254
+ } else {
94255
+ parentRect = crossOriginRect;
94256
+ }
94257
+ } else {
94258
+ parentRect = rootRect;
94259
+ }
94260
+ } else {
94261
+ // Check if there's a frame that can be navigated to.
94262
+ var frame = getParentNode(parent);
94263
+ var frameRect = frame && getBoundingClientRect(frame);
94264
+ var frameIntersect =
94265
+ frame &&
94266
+ this._computeTargetAndRootIntersection(frame, frameRect, rootRect);
94267
+ if (frameRect && frameIntersect) {
94268
+ parent = frame;
94269
+ parentRect = convertFromParentRect(frameRect, frameIntersect);
94270
+ } else {
94271
+ parent = null;
94272
+ intersectionRect = null;
94273
+ }
94274
+ }
94275
+ } else {
94276
+ // If the element has a non-visible overflow, and it's not the <body>
94277
+ // or <html> element, update the intersection rect.
94278
+ // Note: <body> and <html> cannot be clipped to a rect that's not also
94279
+ // the document rect, so no need to compute a new intersection.
94280
+ var doc = parent.ownerDocument;
94281
+ if (parent != doc.body &&
94282
+ parent != doc.documentElement &&
94283
+ parentComputedStyle.overflow != 'visible') {
94284
+ parentRect = getBoundingClientRect(parent);
94285
+ }
94286
+ }
94287
+
94288
+ // If either of the above conditionals set a new parentRect,
94289
+ // calculate new intersection data.
94290
+ if (parentRect) {
94291
+ intersectionRect = computeRectIntersection(parentRect, intersectionRect);
94292
+ }
94293
+ if (!intersectionRect) break;
94294
+ parent = parent && getParentNode(parent);
94295
+ }
94296
+ return intersectionRect;
94297
+ };
94298
+
94299
+
94300
+ /**
94301
+ * Returns the root rect after being expanded by the rootMargin value.
94302
+ * @return {ClientRect} The expanded root rect.
94303
+ * @private
94304
+ */
94305
+ IntersectionObserver.prototype._getRootRect = function() {
94306
+ var rootRect;
94307
+ if (this.root && !isDoc(this.root)) {
94308
+ rootRect = getBoundingClientRect(this.root);
94309
+ } else {
94310
+ // Use <html>/<body> instead of window since scroll bars affect size.
94311
+ var doc = isDoc(this.root) ? this.root : document;
94312
+ var html = doc.documentElement;
94313
+ var body = doc.body;
94314
+ rootRect = {
94315
+ top: 0,
94316
+ left: 0,
94317
+ right: html.clientWidth || body.clientWidth,
94318
+ width: html.clientWidth || body.clientWidth,
94319
+ bottom: html.clientHeight || body.clientHeight,
94320
+ height: html.clientHeight || body.clientHeight
94321
+ };
94322
+ }
94323
+ return this._expandRectByRootMargin(rootRect);
94324
+ };
94325
+
94326
+
94327
+ /**
94328
+ * Accepts a rect and expands it by the rootMargin value.
94329
+ * @param {DOMRect|ClientRect} rect The rect object to expand.
94330
+ * @return {ClientRect} The expanded rect.
94331
+ * @private
94332
+ */
94333
+ IntersectionObserver.prototype._expandRectByRootMargin = function(rect) {
94334
+ var margins = this._rootMarginValues.map(function(margin, i) {
94335
+ return margin.unit == 'px' ? margin.value :
94336
+ margin.value * (i % 2 ? rect.width : rect.height) / 100;
94337
+ });
94338
+ var newRect = {
94339
+ top: rect.top - margins[0],
94340
+ right: rect.right + margins[1],
94341
+ bottom: rect.bottom + margins[2],
94342
+ left: rect.left - margins[3]
94343
+ };
94344
+ newRect.width = newRect.right - newRect.left;
94345
+ newRect.height = newRect.bottom - newRect.top;
94346
+
94347
+ return newRect;
94348
+ };
94349
+
94350
+
94351
+ /**
94352
+ * Accepts an old and new entry and returns true if at least one of the
94353
+ * threshold values has been crossed.
94354
+ * @param {?IntersectionObserverEntry} oldEntry The previous entry for a
94355
+ * particular target element or null if no previous entry exists.
94356
+ * @param {IntersectionObserverEntry} newEntry The current entry for a
94357
+ * particular target element.
94358
+ * @return {boolean} Returns true if a any threshold has been crossed.
94359
+ * @private
94360
+ */
94361
+ IntersectionObserver.prototype._hasCrossedThreshold =
94362
+ function(oldEntry, newEntry) {
94363
+
94364
+ // To make comparing easier, an entry that has a ratio of 0
94365
+ // but does not actually intersect is given a value of -1
94366
+ var oldRatio = oldEntry && oldEntry.isIntersecting ?
94367
+ oldEntry.intersectionRatio || 0 : -1;
94368
+ var newRatio = newEntry.isIntersecting ?
94369
+ newEntry.intersectionRatio || 0 : -1;
94370
+
94371
+ // Ignore unchanged ratios
94372
+ if (oldRatio === newRatio) return;
94373
+
94374
+ for (var i = 0; i < this.thresholds.length; i++) {
94375
+ var threshold = this.thresholds[i];
94376
+
94377
+ // Return true if an entry matches a threshold or if the new ratio
94378
+ // and the old ratio are on the opposite sides of a threshold.
94379
+ if (threshold == oldRatio || threshold == newRatio ||
94380
+ threshold < oldRatio !== threshold < newRatio) {
94381
+ return true;
94382
+ }
94383
+ }
94384
+ };
94385
+
94386
+
94387
+ /**
94388
+ * Returns whether or not the root element is an element and is in the DOM.
94389
+ * @return {boolean} True if the root element is an element and is in the DOM.
94390
+ * @private
94391
+ */
94392
+ IntersectionObserver.prototype._rootIsInDom = function() {
94393
+ return !this.root || containsDeep(document, this.root);
94394
+ };
94395
+
94396
+
94397
+ /**
94398
+ * Returns whether or not the target element is a child of root.
94399
+ * @param {Element} target The target element to check.
94400
+ * @return {boolean} True if the target element is a child of root.
94401
+ * @private
94402
+ */
94403
+ IntersectionObserver.prototype._rootContainsTarget = function(target) {
94404
+ var rootDoc =
94405
+ (this.root && (this.root.ownerDocument || this.root)) || document;
94406
+ return (
94407
+ containsDeep(rootDoc, target) &&
94408
+ (!this.root || rootDoc == target.ownerDocument)
94409
+ );
94410
+ };
94411
+
94412
+
94413
+ /**
94414
+ * Adds the instance to the global IntersectionObserver registry if it isn't
94415
+ * already present.
94416
+ * @private
94417
+ */
94418
+ IntersectionObserver.prototype._registerInstance = function() {
94419
+ if (registry.indexOf(this) < 0) {
94420
+ registry.push(this);
94421
+ }
94422
+ };
94423
+
94424
+
94425
+ /**
94426
+ * Removes the instance from the global IntersectionObserver registry.
94427
+ * @private
94428
+ */
94429
+ IntersectionObserver.prototype._unregisterInstance = function() {
94430
+ var index = registry.indexOf(this);
94431
+ if (index != -1) registry.splice(index, 1);
94432
+ };
94433
+
94434
+
94435
+ /**
94436
+ * Returns the result of the performance.now() method or null in browsers
94437
+ * that don't support the API.
94438
+ * @return {number} The elapsed time since the page was requested.
94439
+ */
94440
+ function now() {
94441
+ return window.performance && performance.now && performance.now();
94442
+ }
94443
+
94444
+
94445
+ /**
94446
+ * Throttles a function and delays its execution, so it's only called at most
94447
+ * once within a given time period.
94448
+ * @param {Function} fn The function to throttle.
94449
+ * @param {number} timeout The amount of time that must pass before the
94450
+ * function can be called again.
94451
+ * @return {Function} The throttled function.
94452
+ */
94453
+ function throttle(fn, timeout) {
94454
+ var timer = null;
94455
+ return function () {
94456
+ if (!timer) {
94457
+ timer = setTimeout(function() {
94458
+ fn();
94459
+ timer = null;
94460
+ }, timeout);
94461
+ }
94462
+ };
94463
+ }
94464
+
94465
+
94466
+ /**
94467
+ * Adds an event handler to a DOM node ensuring cross-browser compatibility.
94468
+ * @param {Node} node The DOM node to add the event handler to.
94469
+ * @param {string} event The event name.
94470
+ * @param {Function} fn The event handler to add.
94471
+ * @param {boolean} opt_useCapture Optionally adds the even to the capture
94472
+ * phase. Note: this only works in modern browsers.
94473
+ */
94474
+ function addEvent(node, event, fn, opt_useCapture) {
94475
+ if (typeof node.addEventListener == 'function') {
94476
+ node.addEventListener(event, fn, opt_useCapture || false);
94477
+ }
94478
+ else if (typeof node.attachEvent == 'function') {
94479
+ node.attachEvent('on' + event, fn);
94480
+ }
94481
+ }
94482
+
94483
+
94484
+ /**
94485
+ * Removes a previously added event handler from a DOM node.
94486
+ * @param {Node} node The DOM node to remove the event handler from.
94487
+ * @param {string} event The event name.
94488
+ * @param {Function} fn The event handler to remove.
94489
+ * @param {boolean} opt_useCapture If the event handler was added with this
94490
+ * flag set to true, it should be set to true here in order to remove it.
94491
+ */
94492
+ function removeEvent(node, event, fn, opt_useCapture) {
94493
+ if (typeof node.removeEventListener == 'function') {
94494
+ node.removeEventListener(event, fn, opt_useCapture || false);
94495
+ }
94496
+ else if (typeof node.detachEvent == 'function') {
94497
+ node.detachEvent('on' + event, fn);
94498
+ }
94499
+ }
94500
+
94501
+
94502
+ /**
94503
+ * Returns the intersection between two rect objects.
94504
+ * @param {Object} rect1 The first rect.
94505
+ * @param {Object} rect2 The second rect.
94506
+ * @return {?Object|?ClientRect} The intersection rect or undefined if no
94507
+ * intersection is found.
94508
+ */
94509
+ function computeRectIntersection(rect1, rect2) {
94510
+ var top = Math.max(rect1.top, rect2.top);
94511
+ var bottom = Math.min(rect1.bottom, rect2.bottom);
94512
+ var left = Math.max(rect1.left, rect2.left);
94513
+ var right = Math.min(rect1.right, rect2.right);
94514
+ var width = right - left;
94515
+ var height = bottom - top;
94516
+
94517
+ return (width >= 0 && height >= 0) && {
94518
+ top: top,
94519
+ bottom: bottom,
94520
+ left: left,
94521
+ right: right,
94522
+ width: width,
94523
+ height: height
94524
+ } || null;
94525
+ }
94526
+
94527
+
94528
+ /**
94529
+ * Shims the native getBoundingClientRect for compatibility with older IE.
94530
+ * @param {Element} el The element whose bounding rect to get.
94531
+ * @return {DOMRect|ClientRect} The (possibly shimmed) rect of the element.
94532
+ */
94533
+ function getBoundingClientRect(el) {
94534
+ var rect;
94535
+
94536
+ try {
94537
+ rect = el.getBoundingClientRect();
94538
+ } catch (err) {
94539
+ // Ignore Windows 7 IE11 "Unspecified error"
94540
+ // https://github.com/w3c/IntersectionObserver/pull/205
94541
+ }
94542
+
94543
+ if (!rect) return getEmptyRect();
94544
+
94545
+ // Older IE
94546
+ if (!(rect.width && rect.height)) {
94547
+ rect = {
94548
+ top: rect.top,
94549
+ right: rect.right,
94550
+ bottom: rect.bottom,
94551
+ left: rect.left,
94552
+ width: rect.right - rect.left,
94553
+ height: rect.bottom - rect.top
94554
+ };
94555
+ }
94556
+ return rect;
94557
+ }
94558
+
94559
+
94560
+ /**
94561
+ * Returns an empty rect object. An empty rect is returned when an element
94562
+ * is not in the DOM.
94563
+ * @return {ClientRect} The empty rect.
94564
+ */
94565
+ function getEmptyRect() {
94566
+ return {
94567
+ top: 0,
94568
+ bottom: 0,
94569
+ left: 0,
94570
+ right: 0,
94571
+ width: 0,
94572
+ height: 0
94573
+ };
94574
+ }
94575
+
94576
+
94577
+ /**
94578
+ * Ensure that the result has all of the necessary fields of the DOMRect.
94579
+ * Specifically this ensures that `x` and `y` fields are set.
94580
+ *
94581
+ * @param {?DOMRect|?ClientRect} rect
94582
+ * @return {?DOMRect}
94583
+ */
94584
+ function ensureDOMRect(rect) {
94585
+ // A `DOMRect` object has `x` and `y` fields.
94586
+ if (!rect || 'x' in rect) {
94587
+ return rect;
94588
+ }
94589
+ // A IE's `ClientRect` type does not have `x` and `y`. The same is the case
94590
+ // for internally calculated Rect objects. For the purposes of
94591
+ // `IntersectionObserver`, it's sufficient to simply mirror `left` and `top`
94592
+ // for these fields.
94593
+ return {
94594
+ top: rect.top,
94595
+ y: rect.top,
94596
+ bottom: rect.bottom,
94597
+ left: rect.left,
94598
+ x: rect.left,
94599
+ right: rect.right,
94600
+ width: rect.width,
94601
+ height: rect.height
94602
+ };
94603
+ }
94604
+
94605
+
94606
+ /**
94607
+ * Inverts the intersection and bounding rect from the parent (frame) BCR to
94608
+ * the local BCR space.
94609
+ * @param {DOMRect|ClientRect} parentBoundingRect The parent's bound client rect.
94610
+ * @param {DOMRect|ClientRect} parentIntersectionRect The parent's own intersection rect.
94611
+ * @return {ClientRect} The local root bounding rect for the parent's children.
94612
+ */
94613
+ function convertFromParentRect(parentBoundingRect, parentIntersectionRect) {
94614
+ var top = parentIntersectionRect.top - parentBoundingRect.top;
94615
+ var left = parentIntersectionRect.left - parentBoundingRect.left;
94616
+ return {
94617
+ top: top,
94618
+ left: left,
94619
+ height: parentIntersectionRect.height,
94620
+ width: parentIntersectionRect.width,
94621
+ bottom: top + parentIntersectionRect.height,
94622
+ right: left + parentIntersectionRect.width
94623
+ };
94624
+ }
94625
+
94626
+
94627
+ /**
94628
+ * Checks to see if a parent element contains a child element (including inside
94629
+ * shadow DOM).
94630
+ * @param {Node} parent The parent element.
94631
+ * @param {Node} child The child element.
94632
+ * @return {boolean} True if the parent node contains the child node.
94633
+ */
94634
+ function containsDeep(parent, child) {
94635
+ var node = child;
94636
+ while (node) {
94637
+ if (node == parent) return true;
94638
+
94639
+ node = getParentNode(node);
94640
+ }
94641
+ return false;
94642
+ }
94643
+
94644
+
94645
+ /**
94646
+ * Gets the parent node of an element or its host element if the parent node
94647
+ * is a shadow root.
94648
+ * @param {Node} node The node whose parent to get.
94649
+ * @return {Node|null} The parent node or null if no parent exists.
94650
+ */
94651
+ function getParentNode(node) {
94652
+ var parent = node.parentNode;
94653
+
94654
+ if (node.nodeType == /* DOCUMENT */ 9 && node != document) {
94655
+ // If this node is a document node, look for the embedding frame.
94656
+ return getFrameElement(node);
94657
+ }
94658
+
94659
+ // If the parent has element that is assigned through shadow root slot
94660
+ if (parent && parent.assignedSlot) {
94661
+ parent = parent.assignedSlot.parentNode;
94662
+ }
94663
+
94664
+ if (parent && parent.nodeType == 11 && parent.host) {
94665
+ // If the parent is a shadow root, return the host element.
94666
+ return parent.host;
94667
+ }
94668
+
94669
+ return parent;
94670
+ }
94671
+
94672
+ /**
94673
+ * Returns true if `node` is a Document.
94674
+ * @param {!Node} node
94675
+ * @returns {boolean}
94676
+ */
94677
+ function isDoc(node) {
94678
+ return node && node.nodeType === 9;
94679
+ }
94680
+
94681
+
94682
+ // Exposes the constructors globally.
94683
+ window.IntersectionObserver = IntersectionObserver;
94684
+ window.IntersectionObserverEntry = IntersectionObserverEntry;
94685
+
94686
+ }());
94687
+
94688
+ function useInViewport(target, options) {
94689
+ var _a = options || {},
94690
+ callback = _a.callback,
94691
+ option = __rest(_a, ["callback"]);
94692
+ var _b = __read(React.useState(), 2),
94693
+ state = _b[0],
94694
+ setState = _b[1];
94695
+ var _c = __read(React.useState(), 2),
94696
+ ratio = _c[0],
94697
+ setRatio = _c[1];
94698
+ useEffectWithTarget(function () {
94699
+ var targets = Array.isArray(target) ? target : [target];
94700
+ var els = targets.map(function (element) {
94701
+ return getTargetElement(element);
94702
+ }).filter(Boolean);
94703
+ if (!els.length) {
94704
+ return;
94705
+ }
94706
+ var observer = new IntersectionObserver(function (entries) {
94707
+ var e_1, _a;
94708
+ try {
94709
+ for (var entries_1 = __values(entries), entries_1_1 = entries_1.next(); !entries_1_1.done; entries_1_1 = entries_1.next()) {
94710
+ var entry = entries_1_1.value;
94711
+ setRatio(entry.intersectionRatio);
94712
+ setState(entry.isIntersecting);
94713
+ callback === null || callback === void 0 ? void 0 : callback(entry);
94714
+ }
94715
+ } catch (e_1_1) {
94716
+ e_1 = {
94717
+ error: e_1_1
94718
+ };
94719
+ } finally {
94720
+ try {
94721
+ if (entries_1_1 && !entries_1_1.done && (_a = entries_1.return)) _a.call(entries_1);
94722
+ } finally {
94723
+ if (e_1) throw e_1.error;
94724
+ }
94725
+ }
94726
+ }, __assign(__assign({}, option), {
94727
+ root: getTargetElement(options === null || options === void 0 ? void 0 : options.root)
94728
+ }));
94729
+ els.forEach(function (el) {
94730
+ return observer.observe(el);
94731
+ });
94732
+ return function () {
94733
+ observer.disconnect();
94734
+ };
94735
+ }, [options === null || options === void 0 ? void 0 : options.rootMargin, options === null || options === void 0 ? void 0 : options.threshold, callback], target);
94736
+ return [state, ratio];
94737
+ }
94738
+
93566
94739
  function useThrottleFn(fn, options) {
93567
94740
  var _a;
93568
94741
  {
@@ -94684,13 +95857,17 @@
94684
95857
  context = _useContext.context,
94685
95858
  refs = _useContext.refs,
94686
95859
  setContext = _useContext.setContext;
95860
+ var ref = axis === "x" ? refs.scrollbarX : refs.scrollbarY;
95861
+ var _useInViewport = useInViewport(ref),
95862
+ _useInViewport2 = _slicedToArray(_useInViewport, 1),
95863
+ inViewport = _useInViewport2[0];
94687
95864
  React.useEffect(function () {
94688
95865
  if (axis === "x") {
94689
95866
  refs.scrollbarX.current.scrollLeft = context.scrollLeft;
94690
95867
  } else {
94691
95868
  refs.scrollbarY.current.scrollTop = context.scrollTop;
94692
95869
  }
94693
- }, [axis === "x" ? context.scrollLeft : context.scrollTop]);
95870
+ }, [axis === "x" ? context.scrollLeft : context.scrollTop, inViewport]);
94694
95871
  var getHidden = function getHidden() {
94695
95872
  var _refs$scrollbarY$curr;
94696
95873
  if (axis === "x") {
@@ -94700,7 +95877,7 @@
94700
95877
  };
94701
95878
  var hidden = getHidden();
94702
95879
  return /*#__PURE__*/React__default['default'].createElement("div", {
94703
- ref: axis === "x" ? refs.scrollbarX : refs.scrollbarY,
95880
+ ref: ref,
94704
95881
  style: axis === "x" ? {
94705
95882
  left: context.rowHeaderWidth,
94706
95883
  width: "calc(100% - ".concat(context.rowHeaderWidth, "px)"),
@@ -95815,11 +96992,14 @@
95815
96992
  style: {
95816
96993
  width: "100%",
95817
96994
  height: "100%",
95818
- overflow: "hidden",
96995
+ overflow: "auto",
95819
96996
  display: "flex",
95820
96997
  flexDirection: "column"
95821
96998
  },
95822
- onWheel: function onWheel(e) {
96999
+ onContextMenu: function onContextMenu(e) {
97000
+ return e.stopPropagation();
97001
+ },
97002
+ onWheelCapture: function onWheelCapture(e) {
95823
97003
  return e.stopPropagation();
95824
97004
  },
95825
97005
  id: "".concat(commentId, "-editor"),