@nulogy/components 7.2.3 → 7.3.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.
- package/dist/main.js +333 -2155
- package/dist/main.module.js +371 -2199
- package/dist/src/BrandedNavBar/BrandLogoContainer.d.ts +10 -0
- package/dist/src/BrandedNavBar/DesktopMenu.d.ts +3 -3
- package/dist/src/BrandedNavBar/EnvironmentBanner.d.ts +1 -1
- package/dist/src/BrandedNavBar/NavBarBackground.d.ts +8 -0
- package/dist/src/BrandedNavBar/SmallNavBar.d.ts +24 -0
- package/dist/src/BrandedNavBar/index.d.ts +12 -0
- package/dist/src/Button/IconicButton.d.ts +1 -1
- package/dist/src/StyledProps/index.d.ts +2 -2
- package/dist/src/index.d.ts +2 -1
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/withMenuState.d.ts +6 -0
- package/package.json +2 -2
package/dist/main.module.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { useContext, useState, useRef, useEffect, useMemo, createElement, createContext, useLayoutEffect, useCallback, forwardRef, Fragment, Component as Component$1, cloneElement, Children, isValidElement,
|
|
2
|
+
import React__default, { useContext, useState, useRef, useEffect, useMemo, createElement, createContext, useLayoutEffect, useCallback, forwardRef, Fragment, Component as Component$1, cloneElement, Children, isValidElement, useImperativeHandle, PureComponent } from 'react';
|
|
3
3
|
import styled, { createGlobalStyle, ThemeProvider, useTheme, ThemeContext as ThemeContext$1 } from 'styled-components';
|
|
4
|
-
import _typeof$
|
|
5
|
-
import _classCallCheck$
|
|
6
|
-
import _createClass$
|
|
7
|
-
import _defineProperty$
|
|
4
|
+
import _typeof$1 from '@babel/runtime/helpers/typeof';
|
|
5
|
+
import _classCallCheck$1 from '@babel/runtime/helpers/classCallCheck';
|
|
6
|
+
import _createClass$1 from '@babel/runtime/helpers/createClass';
|
|
7
|
+
import _defineProperty$1 from '@babel/runtime/helpers/defineProperty';
|
|
8
8
|
import assign$1 from 'object-assign';
|
|
9
9
|
import icons from '@nulogy/icons';
|
|
10
10
|
import _extends$4 from '@babel/runtime/helpers/extends';
|
|
11
|
-
import _assertThisInitialized$
|
|
11
|
+
import _assertThisInitialized$2 from '@babel/runtime/helpers/assertThisInitialized';
|
|
12
12
|
import _inheritsLoose$2 from '@babel/runtime/helpers/inheritsLoose';
|
|
13
|
-
import PropTypes
|
|
13
|
+
import PropTypes from 'prop-types';
|
|
14
14
|
import isEqual$2 from 'react-fast-compare';
|
|
15
15
|
import warning$1 from 'warning';
|
|
16
16
|
import _slicedToArray$1 from '@babel/runtime/helpers/slicedToArray';
|
|
17
17
|
import _objectWithoutPropertiesLoose$2 from '@babel/runtime/helpers/objectWithoutPropertiesLoose';
|
|
18
18
|
import deepEqual from 'deep-equal';
|
|
19
19
|
import createContext$1 from 'create-react-context';
|
|
20
|
-
import
|
|
20
|
+
import ReactResizeDetector from 'react-resize-detector';
|
|
21
21
|
import WindowedSelect, { components as components$1 } from 'react-windowed-select';
|
|
22
|
+
import reactDom, { findDOMNode, createPortal } from 'react-dom';
|
|
22
23
|
import exenv from 'exenv';
|
|
23
24
|
import smoothscroll from 'smoothscroll-polyfill';
|
|
24
25
|
import t from 'classnames';
|
|
@@ -42,12 +43,12 @@ function getDefaults() {
|
|
|
42
43
|
}
|
|
43
44
|
var ReportNamespaces = function () {
|
|
44
45
|
function ReportNamespaces() {
|
|
45
|
-
_classCallCheck$
|
|
46
|
+
_classCallCheck$1(this, ReportNamespaces);
|
|
46
47
|
|
|
47
48
|
this.usedNamespaces = {};
|
|
48
49
|
}
|
|
49
50
|
|
|
50
|
-
_createClass$
|
|
51
|
+
_createClass$1(ReportNamespaces, [{
|
|
51
52
|
key: "addUsedNamespaces",
|
|
52
53
|
value: function addUsedNamespaces(namespaces) {
|
|
53
54
|
var _this = this;
|
|
@@ -135,7 +136,7 @@ function hasLoadedNamespace(ns, i18n) {
|
|
|
135
136
|
|
|
136
137
|
function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
137
138
|
|
|
138
|
-
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$5(Object(source), true).forEach(function (key) { _defineProperty$
|
|
139
|
+
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$5(Object(source), true).forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
139
140
|
function useTranslation(ns) {
|
|
140
141
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
141
142
|
var i18nFromProps = props.i18n;
|
|
@@ -451,23 +452,23 @@ var Theme = {
|
|
|
451
452
|
}
|
|
452
453
|
};
|
|
453
454
|
|
|
454
|
-
function _typeof
|
|
455
|
+
function _typeof(obj) {
|
|
455
456
|
"@babel/helpers - typeof";
|
|
456
457
|
|
|
457
458
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
458
|
-
_typeof
|
|
459
|
+
_typeof = function _typeof(obj) {
|
|
459
460
|
return typeof obj;
|
|
460
461
|
};
|
|
461
462
|
} else {
|
|
462
|
-
_typeof
|
|
463
|
+
_typeof = function _typeof(obj) {
|
|
463
464
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
464
465
|
};
|
|
465
466
|
}
|
|
466
467
|
|
|
467
|
-
return _typeof
|
|
468
|
+
return _typeof(obj);
|
|
468
469
|
}
|
|
469
470
|
|
|
470
|
-
function _defineProperty
|
|
471
|
+
function _defineProperty(obj, key, value) {
|
|
471
472
|
if (key in obj) {
|
|
472
473
|
Object.defineProperty(obj, key, {
|
|
473
474
|
value: value,
|
|
@@ -494,20 +495,20 @@ function _objectSpread$5(target) {
|
|
|
494
495
|
}
|
|
495
496
|
|
|
496
497
|
ownKeys.forEach(function (key) {
|
|
497
|
-
_defineProperty
|
|
498
|
+
_defineProperty(target, key, source[key]);
|
|
498
499
|
});
|
|
499
500
|
}
|
|
500
501
|
|
|
501
502
|
return target;
|
|
502
503
|
}
|
|
503
504
|
|
|
504
|
-
function _classCallCheck
|
|
505
|
+
function _classCallCheck(instance, Constructor) {
|
|
505
506
|
if (!(instance instanceof Constructor)) {
|
|
506
507
|
throw new TypeError("Cannot call a class as a function");
|
|
507
508
|
}
|
|
508
509
|
}
|
|
509
510
|
|
|
510
|
-
function _defineProperties
|
|
511
|
+
function _defineProperties(target, props) {
|
|
511
512
|
for (var i = 0; i < props.length; i++) {
|
|
512
513
|
var descriptor = props[i];
|
|
513
514
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
@@ -517,13 +518,13 @@ function _defineProperties$2(target, props) {
|
|
|
517
518
|
}
|
|
518
519
|
}
|
|
519
520
|
|
|
520
|
-
function _createClass
|
|
521
|
-
if (protoProps) _defineProperties
|
|
522
|
-
if (staticProps) _defineProperties
|
|
521
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
522
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
523
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
523
524
|
return Constructor;
|
|
524
525
|
}
|
|
525
526
|
|
|
526
|
-
function _assertThisInitialized$
|
|
527
|
+
function _assertThisInitialized$1(self) {
|
|
527
528
|
if (self === void 0) {
|
|
528
529
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
529
530
|
}
|
|
@@ -531,31 +532,31 @@ function _assertThisInitialized$3(self) {
|
|
|
531
532
|
return self;
|
|
532
533
|
}
|
|
533
534
|
|
|
534
|
-
function _possibleConstructorReturn
|
|
535
|
-
if (call && (_typeof$
|
|
535
|
+
function _possibleConstructorReturn(self, call) {
|
|
536
|
+
if (call && (_typeof$1(call) === "object" || typeof call === "function")) {
|
|
536
537
|
return call;
|
|
537
538
|
}
|
|
538
539
|
|
|
539
|
-
return _assertThisInitialized$
|
|
540
|
+
return _assertThisInitialized$1(self);
|
|
540
541
|
}
|
|
541
542
|
|
|
542
|
-
function _getPrototypeOf
|
|
543
|
-
_getPrototypeOf
|
|
543
|
+
function _getPrototypeOf(o) {
|
|
544
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
544
545
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
545
546
|
};
|
|
546
|
-
return _getPrototypeOf
|
|
547
|
+
return _getPrototypeOf(o);
|
|
547
548
|
}
|
|
548
549
|
|
|
549
|
-
function _setPrototypeOf$
|
|
550
|
-
_setPrototypeOf$
|
|
550
|
+
function _setPrototypeOf$1(o, p) {
|
|
551
|
+
_setPrototypeOf$1 = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
551
552
|
o.__proto__ = p;
|
|
552
553
|
return o;
|
|
553
554
|
};
|
|
554
555
|
|
|
555
|
-
return _setPrototypeOf$
|
|
556
|
+
return _setPrototypeOf$1(o, p);
|
|
556
557
|
}
|
|
557
558
|
|
|
558
|
-
function _inherits
|
|
559
|
+
function _inherits(subClass, superClass) {
|
|
559
560
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
560
561
|
throw new TypeError("Super expression must either be null or a function");
|
|
561
562
|
}
|
|
@@ -567,7 +568,7 @@ function _inherits$2(subClass, superClass) {
|
|
|
567
568
|
configurable: true
|
|
568
569
|
}
|
|
569
570
|
});
|
|
570
|
-
if (superClass) _setPrototypeOf$
|
|
571
|
+
if (superClass) _setPrototypeOf$1(subClass, superClass);
|
|
571
572
|
}
|
|
572
573
|
|
|
573
574
|
var consoleLogger = {
|
|
@@ -590,12 +591,12 @@ var Logger = function () {
|
|
|
590
591
|
function Logger(concreteLogger) {
|
|
591
592
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
592
593
|
|
|
593
|
-
_classCallCheck
|
|
594
|
+
_classCallCheck(this, Logger);
|
|
594
595
|
|
|
595
596
|
this.init(concreteLogger, options);
|
|
596
597
|
}
|
|
597
598
|
|
|
598
|
-
_createClass
|
|
599
|
+
_createClass(Logger, [{
|
|
599
600
|
key: "init",
|
|
600
601
|
value: function init(concreteLogger) {
|
|
601
602
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -668,12 +669,12 @@ var baseLogger = new Logger();
|
|
|
668
669
|
|
|
669
670
|
var EventEmitter = function () {
|
|
670
671
|
function EventEmitter() {
|
|
671
|
-
_classCallCheck
|
|
672
|
+
_classCallCheck(this, EventEmitter);
|
|
672
673
|
|
|
673
674
|
this.observers = {};
|
|
674
675
|
}
|
|
675
676
|
|
|
676
|
-
_createClass
|
|
677
|
+
_createClass(EventEmitter, [{
|
|
677
678
|
key: "on",
|
|
678
679
|
value: function on(events, listener) {
|
|
679
680
|
var _this = this;
|
|
@@ -850,7 +851,7 @@ function escape(data) {
|
|
|
850
851
|
var isIE10$1 = typeof window !== 'undefined' && window.navigator && window.navigator.userAgent && window.navigator.userAgent.indexOf('MSIE') > -1;
|
|
851
852
|
|
|
852
853
|
var ResourceStore = function (_EventEmitter) {
|
|
853
|
-
_inherits
|
|
854
|
+
_inherits(ResourceStore, _EventEmitter);
|
|
854
855
|
|
|
855
856
|
function ResourceStore(data) {
|
|
856
857
|
var _this;
|
|
@@ -860,12 +861,12 @@ var ResourceStore = function (_EventEmitter) {
|
|
|
860
861
|
defaultNS: 'translation'
|
|
861
862
|
};
|
|
862
863
|
|
|
863
|
-
_classCallCheck
|
|
864
|
+
_classCallCheck(this, ResourceStore);
|
|
864
865
|
|
|
865
|
-
_this = _possibleConstructorReturn
|
|
866
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(ResourceStore).call(this));
|
|
866
867
|
|
|
867
868
|
if (isIE10$1) {
|
|
868
|
-
EventEmitter.call(_assertThisInitialized$
|
|
869
|
+
EventEmitter.call(_assertThisInitialized$1(_this));
|
|
869
870
|
}
|
|
870
871
|
|
|
871
872
|
_this.data = data || {};
|
|
@@ -878,7 +879,7 @@ var ResourceStore = function (_EventEmitter) {
|
|
|
878
879
|
return _this;
|
|
879
880
|
}
|
|
880
881
|
|
|
881
|
-
_createClass
|
|
882
|
+
_createClass(ResourceStore, [{
|
|
882
883
|
key: "addNamespaces",
|
|
883
884
|
value: function addNamespaces(ns) {
|
|
884
885
|
if (this.options.ns.indexOf(ns) < 0) {
|
|
@@ -1027,22 +1028,22 @@ var postProcessor = {
|
|
|
1027
1028
|
var checkedLoadedFor = {};
|
|
1028
1029
|
|
|
1029
1030
|
var Translator = function (_EventEmitter) {
|
|
1030
|
-
_inherits
|
|
1031
|
+
_inherits(Translator, _EventEmitter);
|
|
1031
1032
|
|
|
1032
1033
|
function Translator(services) {
|
|
1033
1034
|
var _this;
|
|
1034
1035
|
|
|
1035
1036
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1036
1037
|
|
|
1037
|
-
_classCallCheck
|
|
1038
|
+
_classCallCheck(this, Translator);
|
|
1038
1039
|
|
|
1039
|
-
_this = _possibleConstructorReturn
|
|
1040
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(Translator).call(this));
|
|
1040
1041
|
|
|
1041
1042
|
if (isIE10$1) {
|
|
1042
|
-
EventEmitter.call(_assertThisInitialized$
|
|
1043
|
+
EventEmitter.call(_assertThisInitialized$1(_this));
|
|
1043
1044
|
}
|
|
1044
1045
|
|
|
1045
|
-
copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, _assertThisInitialized$
|
|
1046
|
+
copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, _assertThisInitialized$1(_this));
|
|
1046
1047
|
_this.options = options;
|
|
1047
1048
|
|
|
1048
1049
|
if (_this.options.keySeparator === undefined) {
|
|
@@ -1053,7 +1054,7 @@ var Translator = function (_EventEmitter) {
|
|
|
1053
1054
|
return _this;
|
|
1054
1055
|
}
|
|
1055
1056
|
|
|
1056
|
-
_createClass
|
|
1057
|
+
_createClass(Translator, [{
|
|
1057
1058
|
key: "changeLanguage",
|
|
1058
1059
|
value: function changeLanguage(lng) {
|
|
1059
1060
|
if (lng) this.language = lng;
|
|
@@ -1101,7 +1102,7 @@ var Translator = function (_EventEmitter) {
|
|
|
1101
1102
|
value: function translate(keys, options, lastKey) {
|
|
1102
1103
|
var _this2 = this;
|
|
1103
1104
|
|
|
1104
|
-
if (_typeof
|
|
1105
|
+
if (_typeof(options) !== 'object' && this.options.overloadTranslationOptionHandler) {
|
|
1105
1106
|
options = this.options.overloadTranslationOptionHandler(arguments);
|
|
1106
1107
|
}
|
|
1107
1108
|
|
|
@@ -1400,7 +1401,7 @@ function capitalize(string) {
|
|
|
1400
1401
|
|
|
1401
1402
|
var LanguageUtil = function () {
|
|
1402
1403
|
function LanguageUtil(options) {
|
|
1403
|
-
_classCallCheck
|
|
1404
|
+
_classCallCheck(this, LanguageUtil);
|
|
1404
1405
|
|
|
1405
1406
|
this.options = options;
|
|
1406
1407
|
this.whitelist = this.options.supportedLngs || false;
|
|
@@ -1408,7 +1409,7 @@ var LanguageUtil = function () {
|
|
|
1408
1409
|
this.logger = baseLogger.create('languageUtils');
|
|
1409
1410
|
}
|
|
1410
1411
|
|
|
1411
|
-
_createClass
|
|
1412
|
+
_createClass(LanguageUtil, [{
|
|
1412
1413
|
key: "getScriptPartFromCode",
|
|
1413
1414
|
value: function getScriptPartFromCode(code) {
|
|
1414
1415
|
if (!code || code.indexOf('-') < 0) return null;
|
|
@@ -1729,7 +1730,7 @@ var PluralResolver = function () {
|
|
|
1729
1730
|
function PluralResolver(languageUtils) {
|
|
1730
1731
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1731
1732
|
|
|
1732
|
-
_classCallCheck
|
|
1733
|
+
_classCallCheck(this, PluralResolver);
|
|
1733
1734
|
|
|
1734
1735
|
this.languageUtils = languageUtils;
|
|
1735
1736
|
this.options = options;
|
|
@@ -1737,7 +1738,7 @@ var PluralResolver = function () {
|
|
|
1737
1738
|
this.rules = createRules();
|
|
1738
1739
|
}
|
|
1739
1740
|
|
|
1740
|
-
_createClass
|
|
1741
|
+
_createClass(PluralResolver, [{
|
|
1741
1742
|
key: "addRule",
|
|
1742
1743
|
value: function addRule(lng, obj) {
|
|
1743
1744
|
this.rules[lng] = obj;
|
|
@@ -1823,7 +1824,7 @@ var Interpolator = function () {
|
|
|
1823
1824
|
function Interpolator() {
|
|
1824
1825
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1825
1826
|
|
|
1826
|
-
_classCallCheck
|
|
1827
|
+
_classCallCheck(this, Interpolator);
|
|
1827
1828
|
|
|
1828
1829
|
this.logger = baseLogger.create('interpolator');
|
|
1829
1830
|
this.options = options;
|
|
@@ -1835,7 +1836,7 @@ var Interpolator = function () {
|
|
|
1835
1836
|
this.init(options);
|
|
1836
1837
|
}
|
|
1837
1838
|
|
|
1838
|
-
_createClass
|
|
1839
|
+
_createClass(Interpolator, [{
|
|
1839
1840
|
key: "init",
|
|
1840
1841
|
value: function init() {
|
|
1841
1842
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -2030,19 +2031,19 @@ function remove(arr, what) {
|
|
|
2030
2031
|
}
|
|
2031
2032
|
|
|
2032
2033
|
var Connector = function (_EventEmitter) {
|
|
2033
|
-
_inherits
|
|
2034
|
+
_inherits(Connector, _EventEmitter);
|
|
2034
2035
|
|
|
2035
2036
|
function Connector(backend, store, services) {
|
|
2036
2037
|
var _this;
|
|
2037
2038
|
|
|
2038
2039
|
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
2039
2040
|
|
|
2040
|
-
_classCallCheck
|
|
2041
|
+
_classCallCheck(this, Connector);
|
|
2041
2042
|
|
|
2042
|
-
_this = _possibleConstructorReturn
|
|
2043
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(Connector).call(this));
|
|
2043
2044
|
|
|
2044
2045
|
if (isIE10$1) {
|
|
2045
|
-
EventEmitter.call(_assertThisInitialized$
|
|
2046
|
+
EventEmitter.call(_assertThisInitialized$1(_this));
|
|
2046
2047
|
}
|
|
2047
2048
|
|
|
2048
2049
|
_this.backend = backend;
|
|
@@ -2061,7 +2062,7 @@ var Connector = function (_EventEmitter) {
|
|
|
2061
2062
|
return _this;
|
|
2062
2063
|
}
|
|
2063
2064
|
|
|
2064
|
-
_createClass
|
|
2065
|
+
_createClass(Connector, [{
|
|
2065
2066
|
key: "queueLoad",
|
|
2066
2067
|
value: function queueLoad(languages, namespaces, options, callback) {
|
|
2067
2068
|
var _this2 = this;
|
|
@@ -2287,11 +2288,11 @@ function get$2() {
|
|
|
2287
2288
|
appendNamespaceToCIMode: false,
|
|
2288
2289
|
overloadTranslationOptionHandler: function handle(args) {
|
|
2289
2290
|
var ret = {};
|
|
2290
|
-
if (_typeof
|
|
2291
|
+
if (_typeof(args[1]) === 'object') ret = args[1];
|
|
2291
2292
|
if (typeof args[1] === 'string') ret.defaultValue = args[1];
|
|
2292
2293
|
if (typeof args[2] === 'string') ret.tDescription = args[2];
|
|
2293
2294
|
|
|
2294
|
-
if (_typeof
|
|
2295
|
+
if (_typeof(args[2]) === 'object' || _typeof(args[3]) === 'object') {
|
|
2295
2296
|
var options = args[3] || args[2];
|
|
2296
2297
|
Object.keys(options).forEach(function (key) {
|
|
2297
2298
|
ret[key] = options[key];
|
|
@@ -2344,7 +2345,7 @@ function transformOptions(options) {
|
|
|
2344
2345
|
function noop$2() {}
|
|
2345
2346
|
|
|
2346
2347
|
var I18n = function (_EventEmitter) {
|
|
2347
|
-
_inherits
|
|
2348
|
+
_inherits(I18n, _EventEmitter);
|
|
2348
2349
|
|
|
2349
2350
|
function I18n() {
|
|
2350
2351
|
var _this;
|
|
@@ -2352,12 +2353,12 @@ var I18n = function (_EventEmitter) {
|
|
|
2352
2353
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2353
2354
|
var callback = arguments.length > 1 ? arguments[1] : undefined;
|
|
2354
2355
|
|
|
2355
|
-
_classCallCheck
|
|
2356
|
+
_classCallCheck(this, I18n);
|
|
2356
2357
|
|
|
2357
|
-
_this = _possibleConstructorReturn
|
|
2358
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(I18n).call(this));
|
|
2358
2359
|
|
|
2359
2360
|
if (isIE10$1) {
|
|
2360
|
-
EventEmitter.call(_assertThisInitialized$
|
|
2361
|
+
EventEmitter.call(_assertThisInitialized$1(_this));
|
|
2361
2362
|
}
|
|
2362
2363
|
|
|
2363
2364
|
_this.options = transformOptions(options);
|
|
@@ -2371,7 +2372,7 @@ var I18n = function (_EventEmitter) {
|
|
|
2371
2372
|
if (!_this.options.initImmediate) {
|
|
2372
2373
|
_this.init(options, callback);
|
|
2373
2374
|
|
|
2374
|
-
return _possibleConstructorReturn
|
|
2375
|
+
return _possibleConstructorReturn(_this, _assertThisInitialized$1(_this));
|
|
2375
2376
|
}
|
|
2376
2377
|
|
|
2377
2378
|
setTimeout(function () {
|
|
@@ -2382,7 +2383,7 @@ var I18n = function (_EventEmitter) {
|
|
|
2382
2383
|
return _this;
|
|
2383
2384
|
}
|
|
2384
2385
|
|
|
2385
|
-
_createClass
|
|
2386
|
+
_createClass(I18n, [{
|
|
2386
2387
|
key: "init",
|
|
2387
2388
|
value: function init() {
|
|
2388
2389
|
var _this2 = this;
|
|
@@ -2679,7 +2680,7 @@ var I18n = function (_EventEmitter) {
|
|
|
2679
2680
|
var fixedT = function fixedT(key, opts) {
|
|
2680
2681
|
var options;
|
|
2681
2682
|
|
|
2682
|
-
if (_typeof
|
|
2683
|
+
if (_typeof(opts) !== 'object') {
|
|
2683
2684
|
for (var _len3 = arguments.length, rest = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
|
|
2684
2685
|
rest[_key3 - 2] = arguments[_key3];
|
|
2685
2686
|
}
|
|
@@ -3630,8 +3631,8 @@ function useVisualElementContext() {
|
|
|
3630
3631
|
return useContext(MotionContext).visualElement;
|
|
3631
3632
|
}
|
|
3632
3633
|
|
|
3633
|
-
var isBrowser$
|
|
3634
|
-
var useIsomorphicLayoutEffect$2 = isBrowser$
|
|
3634
|
+
var isBrowser$5 = typeof window !== "undefined";
|
|
3635
|
+
var useIsomorphicLayoutEffect$2 = isBrowser$5 ? useLayoutEffect : useEffect;
|
|
3635
3636
|
|
|
3636
3637
|
function useSnapshotOnUnmount(visualElement) {
|
|
3637
3638
|
var syncLayout = useContext(SharedLayoutContext);
|
|
@@ -5179,16 +5180,16 @@ var wrapHandler = function (handler, shouldFilterPrimaryPointer) {
|
|
|
5179
5180
|
: listener;
|
|
5180
5181
|
};
|
|
5181
5182
|
|
|
5182
|
-
var isBrowser$
|
|
5183
|
+
var isBrowser$4 = typeof window !== "undefined";
|
|
5183
5184
|
// We check for event support via functions in case they've been mocked by a testing suite.
|
|
5184
5185
|
var supportsPointerEvents = function () {
|
|
5185
|
-
return isBrowser$
|
|
5186
|
+
return isBrowser$4 && window.onpointerdown === null;
|
|
5186
5187
|
};
|
|
5187
5188
|
var supportsTouchEvents = function () {
|
|
5188
|
-
return isBrowser$
|
|
5189
|
+
return isBrowser$4 && window.ontouchstart === null;
|
|
5189
5190
|
};
|
|
5190
5191
|
var supportsMouseEvents = function () {
|
|
5191
|
-
return isBrowser$
|
|
5192
|
+
return isBrowser$4 && window.onmousedown === null;
|
|
5192
5193
|
};
|
|
5193
5194
|
|
|
5194
5195
|
var mouseEventNames = {
|
|
@@ -11882,7 +11883,7 @@ var textOverflow = system({
|
|
|
11882
11883
|
textOverflow: true
|
|
11883
11884
|
});
|
|
11884
11885
|
|
|
11885
|
-
var addStyledProps = compose(border, shadow, color, cursor$1, layout, overflow, space, textOverflow, transform, transition, typography, visibility);
|
|
11886
|
+
var addStyledProps = compose(border, shadow, color, cursor$1, layout, overflow, space, textOverflow, transform, transition, typography, visibility, flexbox);
|
|
11886
11887
|
|
|
11887
11888
|
var getAttrs = function getAttrs(inline) {
|
|
11888
11889
|
return inline ? {
|
|
@@ -11980,7 +11981,7 @@ var WindowDimensions = /*#__PURE__*/function (_React$Component) {
|
|
|
11980
11981
|
width: 0,
|
|
11981
11982
|
height: 0
|
|
11982
11983
|
};
|
|
11983
|
-
_this.updateWindowDimensions = _this.updateWindowDimensions.bind(_assertThisInitialized$
|
|
11984
|
+
_this.updateWindowDimensions = _this.updateWindowDimensions.bind(_assertThisInitialized$2(_this));
|
|
11984
11985
|
return _this;
|
|
11985
11986
|
}
|
|
11986
11987
|
|
|
@@ -12027,7 +12028,7 @@ var DetectOutsideClick = /*#__PURE__*/function (_React$Component) {
|
|
|
12027
12028
|
var _this;
|
|
12028
12029
|
|
|
12029
12030
|
_this = _React$Component.call(this, props) || this;
|
|
12030
|
-
_this.handleOutsideClick = _this.handleOutsideClick.bind(_assertThisInitialized$
|
|
12031
|
+
_this.handleOutsideClick = _this.handleOutsideClick.bind(_assertThisInitialized$2(_this));
|
|
12031
12032
|
return _this;
|
|
12032
12033
|
}
|
|
12033
12034
|
|
|
@@ -12304,7 +12305,7 @@ var ScrollIndicators = /*#__PURE__*/function (_React$Component) {
|
|
|
12304
12305
|
scrollTop: 0
|
|
12305
12306
|
};
|
|
12306
12307
|
_this.menuRef = /*#__PURE__*/React__default.createRef();
|
|
12307
|
-
_this.handleScroll = _this.handleScroll.bind(_assertThisInitialized$
|
|
12308
|
+
_this.handleScroll = _this.handleScroll.bind(_assertThisInitialized$2(_this));
|
|
12308
12309
|
_this.offsetHeight = null;
|
|
12309
12310
|
_this.scrollHeight = null;
|
|
12310
12311
|
return _this;
|
|
@@ -12389,10 +12390,10 @@ var MenuState = /*#__PURE__*/function (_MenuStateInt) {
|
|
|
12389
12390
|
_this.state = {
|
|
12390
12391
|
isOpen: defaultOpen
|
|
12391
12392
|
};
|
|
12392
|
-
_this.handleKeyDown = _this.handleKeyDown.bind(_assertThisInitialized$
|
|
12393
|
-
_this.toggleMenu = _this.toggleMenu.bind(_assertThisInitialized$
|
|
12394
|
-
_this.openMenu = _this.openMenu.bind(_assertThisInitialized$
|
|
12395
|
-
_this.closeMenu = _this.closeMenu.bind(_assertThisInitialized$
|
|
12393
|
+
_this.handleKeyDown = _this.handleKeyDown.bind(_assertThisInitialized$2(_this));
|
|
12394
|
+
_this.toggleMenu = _this.toggleMenu.bind(_assertThisInitialized$2(_this));
|
|
12395
|
+
_this.openMenu = _this.openMenu.bind(_assertThisInitialized$2(_this));
|
|
12396
|
+
_this.closeMenu = _this.closeMenu.bind(_assertThisInitialized$2(_this));
|
|
12396
12397
|
return _this;
|
|
12397
12398
|
}
|
|
12398
12399
|
|
|
@@ -12924,14 +12925,14 @@ function _extends$2() {
|
|
|
12924
12925
|
function _inheritsLoose$1(subClass, superClass) {
|
|
12925
12926
|
subClass.prototype = Object.create(superClass.prototype);
|
|
12926
12927
|
subClass.prototype.constructor = subClass;
|
|
12927
|
-
_setPrototypeOf$
|
|
12928
|
+
_setPrototypeOf$1(subClass, superClass);
|
|
12928
12929
|
}
|
|
12929
12930
|
|
|
12930
12931
|
function _isNativeFunction(fn) {
|
|
12931
12932
|
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
12932
12933
|
}
|
|
12933
12934
|
|
|
12934
|
-
function _isNativeReflectConstruct$
|
|
12935
|
+
function _isNativeReflectConstruct$6() {
|
|
12935
12936
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
12936
12937
|
if (Reflect.construct.sham) return false;
|
|
12937
12938
|
if (typeof Proxy === "function") return true;
|
|
@@ -12945,7 +12946,7 @@ function _isNativeReflectConstruct$8() {
|
|
|
12945
12946
|
}
|
|
12946
12947
|
|
|
12947
12948
|
function _construct(Parent, args, Class) {
|
|
12948
|
-
if (_isNativeReflectConstruct$
|
|
12949
|
+
if (_isNativeReflectConstruct$6()) {
|
|
12949
12950
|
_construct = Reflect.construct;
|
|
12950
12951
|
} else {
|
|
12951
12952
|
_construct = function _construct(Parent, args, Class) {
|
|
@@ -12953,7 +12954,7 @@ function _construct(Parent, args, Class) {
|
|
|
12953
12954
|
a.push.apply(a, args);
|
|
12954
12955
|
var Constructor = Function.bind.apply(Parent, a);
|
|
12955
12956
|
var instance = new Constructor();
|
|
12956
|
-
if (Class) _setPrototypeOf$
|
|
12957
|
+
if (Class) _setPrototypeOf$1(instance, Class.prototype);
|
|
12957
12958
|
return instance;
|
|
12958
12959
|
};
|
|
12959
12960
|
}
|
|
@@ -12978,7 +12979,7 @@ function _wrapNativeSuper(Class) {
|
|
|
12978
12979
|
}
|
|
12979
12980
|
|
|
12980
12981
|
function Wrapper() {
|
|
12981
|
-
return _construct(Class, arguments, _getPrototypeOf
|
|
12982
|
+
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
|
|
12982
12983
|
}
|
|
12983
12984
|
|
|
12984
12985
|
Wrapper.prototype = Object.create(Class.prototype, {
|
|
@@ -12989,7 +12990,7 @@ function _wrapNativeSuper(Class) {
|
|
|
12989
12990
|
configurable: true
|
|
12990
12991
|
}
|
|
12991
12992
|
});
|
|
12992
|
-
return _setPrototypeOf$
|
|
12993
|
+
return _setPrototypeOf$1(Wrapper, Class);
|
|
12993
12994
|
};
|
|
12994
12995
|
|
|
12995
12996
|
return _wrapNativeSuper(Class);
|
|
@@ -13123,7 +13124,7 @@ function (_Error) {
|
|
|
13123
13124
|
_this = _Error.call(this, format$3.apply(void 0, [ERRORS[code]].concat(args))) || this;
|
|
13124
13125
|
}
|
|
13125
13126
|
|
|
13126
|
-
return _assertThisInitialized$
|
|
13127
|
+
return _assertThisInitialized$1(_this);
|
|
13127
13128
|
}
|
|
13128
13129
|
|
|
13129
13130
|
return PolishedError;
|
|
@@ -15540,7 +15541,7 @@ function orderModifiers(modifiers) {
|
|
|
15540
15541
|
}, []);
|
|
15541
15542
|
}
|
|
15542
15543
|
|
|
15543
|
-
function debounce$
|
|
15544
|
+
function debounce$2(fn) {
|
|
15544
15545
|
var pending;
|
|
15545
15546
|
return function () {
|
|
15546
15547
|
if (!pending) {
|
|
@@ -15847,7 +15848,7 @@ function popperGenerator(generatorOptions) {
|
|
|
15847
15848
|
},
|
|
15848
15849
|
// Async and optimistically optimized update – it will not be executed if
|
|
15849
15850
|
// not necessary (debounced to run at most once-per-tick)
|
|
15850
|
-
update: debounce$
|
|
15851
|
+
update: debounce$2(function () {
|
|
15851
15852
|
return new Promise(function (resolve) {
|
|
15852
15853
|
instance.forceUpdate();
|
|
15853
15854
|
resolve(state);
|
|
@@ -16967,12 +16968,12 @@ var DropdownMenuContainer = styled(Box).withConfig({
|
|
|
16967
16968
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16968
16969
|
* SOFTWARE.
|
|
16969
16970
|
*/
|
|
16970
|
-
var isBrowser$
|
|
16971
|
+
var isBrowser$3 = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';
|
|
16971
16972
|
|
|
16972
16973
|
var timeoutDuration = function () {
|
|
16973
16974
|
var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
|
|
16974
16975
|
for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
|
|
16975
|
-
if (isBrowser$
|
|
16976
|
+
if (isBrowser$3 && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
|
|
16976
16977
|
return 1;
|
|
16977
16978
|
}
|
|
16978
16979
|
}
|
|
@@ -17006,7 +17007,7 @@ function taskDebounce(fn) {
|
|
|
17006
17007
|
};
|
|
17007
17008
|
}
|
|
17008
17009
|
|
|
17009
|
-
var supportsMicroTasks = isBrowser$
|
|
17010
|
+
var supportsMicroTasks = isBrowser$3 && window.Promise;
|
|
17010
17011
|
|
|
17011
17012
|
/**
|
|
17012
17013
|
* Create a debounced version of a method, that's asynchronously deferred
|
|
@@ -17017,7 +17018,7 @@ var supportsMicroTasks = isBrowser$4 && window.Promise;
|
|
|
17017
17018
|
* @argument {Function} fn
|
|
17018
17019
|
* @returns {Function}
|
|
17019
17020
|
*/
|
|
17020
|
-
var debounce$
|
|
17021
|
+
var debounce$1 = supportsMicroTasks ? microtaskDebounce : taskDebounce;
|
|
17021
17022
|
|
|
17022
17023
|
/**
|
|
17023
17024
|
* Check if the given variable is a function
|
|
@@ -17026,7 +17027,7 @@ var debounce$2 = supportsMicroTasks ? microtaskDebounce : taskDebounce;
|
|
|
17026
17027
|
* @argument {Any} functionToCheck - variable to check
|
|
17027
17028
|
* @returns {Boolean} answer to: is a function?
|
|
17028
17029
|
*/
|
|
17029
|
-
function isFunction
|
|
17030
|
+
function isFunction(functionToCheck) {
|
|
17030
17031
|
var getType = {};
|
|
17031
17032
|
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
|
|
17032
17033
|
}
|
|
@@ -17108,8 +17109,8 @@ function getReferenceNode(reference) {
|
|
|
17108
17109
|
return reference && reference.referenceNode ? reference.referenceNode : reference;
|
|
17109
17110
|
}
|
|
17110
17111
|
|
|
17111
|
-
var isIE11 = isBrowser$
|
|
17112
|
-
var isIE10 = isBrowser$
|
|
17112
|
+
var isIE11 = isBrowser$3 && !!(window.MSInputMethodContext && document.documentMode);
|
|
17113
|
+
var isIE10 = isBrowser$3 && /MSIE 10/.test(navigator.userAgent);
|
|
17113
17114
|
|
|
17114
17115
|
/**
|
|
17115
17116
|
* Determines if the browser is Internet Explorer
|
|
@@ -17287,7 +17288,7 @@ function includeScroll(rect, element) {
|
|
|
17287
17288
|
* @return {number} borders - The borders size of the given axis
|
|
17288
17289
|
*/
|
|
17289
17290
|
|
|
17290
|
-
function getBordersSize
|
|
17291
|
+
function getBordersSize(styles, axis) {
|
|
17291
17292
|
var sideA = axis === 'x' ? 'Left' : 'Top';
|
|
17292
17293
|
var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
|
|
17293
17294
|
|
|
@@ -17426,8 +17427,8 @@ function getBoundingClientRect(element) {
|
|
|
17426
17427
|
// we make this check conditional for performance reasons
|
|
17427
17428
|
if (horizScrollbar || vertScrollbar) {
|
|
17428
17429
|
var styles = getStyleComputedProperty(element);
|
|
17429
|
-
horizScrollbar -= getBordersSize
|
|
17430
|
-
vertScrollbar -= getBordersSize
|
|
17430
|
+
horizScrollbar -= getBordersSize(styles, 'x');
|
|
17431
|
+
vertScrollbar -= getBordersSize(styles, 'y');
|
|
17431
17432
|
|
|
17432
17433
|
result.width -= horizScrollbar;
|
|
17433
17434
|
result.height -= vertScrollbar;
|
|
@@ -17835,7 +17836,7 @@ function runModifiers(modifiers, data, ends) {
|
|
|
17835
17836
|
console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
|
|
17836
17837
|
}
|
|
17837
17838
|
var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation
|
|
17838
|
-
if (modifier.enabled && isFunction
|
|
17839
|
+
if (modifier.enabled && isFunction(fn)) {
|
|
17839
17840
|
// Add properties to offsets to make them a complete clientRect object
|
|
17840
17841
|
// we do this before each modifier to make sure the previous one doesn't
|
|
17841
17842
|
// mess with these values
|
|
@@ -18211,7 +18212,7 @@ function getRoundedOffsets(data, shouldRound) {
|
|
|
18211
18212
|
};
|
|
18212
18213
|
}
|
|
18213
18214
|
|
|
18214
|
-
var isFirefox = isBrowser$
|
|
18215
|
+
var isFirefox = isBrowser$3 && /Firefox/i.test(navigator.userAgent);
|
|
18215
18216
|
|
|
18216
18217
|
/**
|
|
18217
18218
|
* @function
|
|
@@ -19424,7 +19425,7 @@ var Popper$3 = function () {
|
|
|
19424
19425
|
};
|
|
19425
19426
|
|
|
19426
19427
|
// make update() debounced, so that it only runs at most once-per-tick
|
|
19427
|
-
this.update = debounce$
|
|
19428
|
+
this.update = debounce$1(this.update.bind(this));
|
|
19428
19429
|
|
|
19429
19430
|
// with {} we create a new object with the options inside it
|
|
19430
19431
|
this.options = _extends$1({}, Popper.Defaults, options);
|
|
@@ -19462,7 +19463,7 @@ var Popper$3 = function () {
|
|
|
19462
19463
|
// they could add new properties to their options configuration
|
|
19463
19464
|
// BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!
|
|
19464
19465
|
this.modifiers.forEach(function (modifierOptions) {
|
|
19465
|
-
if (modifierOptions.enabled && isFunction
|
|
19466
|
+
if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
|
|
19466
19467
|
modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
|
|
19467
19468
|
}
|
|
19468
19469
|
});
|
|
@@ -19574,9 +19575,9 @@ function (_React$Component) {
|
|
|
19574
19575
|
|
|
19575
19576
|
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
19576
19577
|
|
|
19577
|
-
_defineProperty$
|
|
19578
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "referenceNode", void 0);
|
|
19578
19579
|
|
|
19579
|
-
_defineProperty$
|
|
19580
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "setReferenceNode", function (newReferenceNode) {
|
|
19580
19581
|
if (newReferenceNode && _this.referenceNode !== newReferenceNode) {
|
|
19581
19582
|
_this.referenceNode = newReferenceNode;
|
|
19582
19583
|
|
|
@@ -19684,18 +19685,18 @@ function (_React$Component) {
|
|
|
19684
19685
|
|
|
19685
19686
|
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
19686
19687
|
|
|
19687
|
-
_defineProperty$
|
|
19688
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "state", {
|
|
19688
19689
|
data: undefined,
|
|
19689
19690
|
placement: undefined
|
|
19690
19691
|
});
|
|
19691
19692
|
|
|
19692
|
-
_defineProperty$
|
|
19693
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "popperInstance", void 0);
|
|
19693
19694
|
|
|
19694
|
-
_defineProperty$
|
|
19695
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "popperNode", null);
|
|
19695
19696
|
|
|
19696
|
-
_defineProperty$
|
|
19697
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "arrowNode", null);
|
|
19697
19698
|
|
|
19698
|
-
_defineProperty$
|
|
19699
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "setPopperNode", function (popperNode) {
|
|
19699
19700
|
if (!popperNode || _this.popperNode === popperNode) return;
|
|
19700
19701
|
setRef$1(_this.props.innerRef, popperNode);
|
|
19701
19702
|
_this.popperNode = popperNode;
|
|
@@ -19703,11 +19704,11 @@ function (_React$Component) {
|
|
|
19703
19704
|
_this.updatePopperInstance();
|
|
19704
19705
|
});
|
|
19705
19706
|
|
|
19706
|
-
_defineProperty$
|
|
19707
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "setArrowNode", function (arrowNode) {
|
|
19707
19708
|
_this.arrowNode = arrowNode;
|
|
19708
19709
|
});
|
|
19709
19710
|
|
|
19710
|
-
_defineProperty$
|
|
19711
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "updateStateModifier", {
|
|
19711
19712
|
enabled: true,
|
|
19712
19713
|
order: 900,
|
|
19713
19714
|
fn: function fn(data) {
|
|
@@ -19722,7 +19723,7 @@ function (_React$Component) {
|
|
|
19722
19723
|
}
|
|
19723
19724
|
});
|
|
19724
19725
|
|
|
19725
|
-
_defineProperty$
|
|
19726
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "getOptions", function () {
|
|
19726
19727
|
return {
|
|
19727
19728
|
placement: _this.props.placement,
|
|
19728
19729
|
eventsEnabled: _this.props.eventsEnabled,
|
|
@@ -19740,25 +19741,25 @@ function (_React$Component) {
|
|
|
19740
19741
|
};
|
|
19741
19742
|
});
|
|
19742
19743
|
|
|
19743
|
-
_defineProperty$
|
|
19744
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "getPopperStyle", function () {
|
|
19744
19745
|
return !_this.popperNode || !_this.state.data ? initialStyle : _extends$4({
|
|
19745
19746
|
position: _this.state.data.offsets.popper.position
|
|
19746
19747
|
}, _this.state.data.styles);
|
|
19747
19748
|
});
|
|
19748
19749
|
|
|
19749
|
-
_defineProperty$
|
|
19750
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "getPopperPlacement", function () {
|
|
19750
19751
|
return !_this.state.data ? undefined : _this.state.placement;
|
|
19751
19752
|
});
|
|
19752
19753
|
|
|
19753
|
-
_defineProperty$
|
|
19754
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "getArrowStyle", function () {
|
|
19754
19755
|
return !_this.arrowNode || !_this.state.data ? initialArrowStyle : _this.state.data.arrowStyles;
|
|
19755
19756
|
});
|
|
19756
19757
|
|
|
19757
|
-
_defineProperty$
|
|
19758
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "getOutOfBoundariesState", function () {
|
|
19758
19759
|
return _this.state.data ? _this.state.data.hide : undefined;
|
|
19759
19760
|
});
|
|
19760
19761
|
|
|
19761
|
-
_defineProperty$
|
|
19762
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "destroyPopperInstance", function () {
|
|
19762
19763
|
if (!_this.popperInstance) return;
|
|
19763
19764
|
|
|
19764
19765
|
_this.popperInstance.destroy();
|
|
@@ -19766,10 +19767,10 @@ function (_React$Component) {
|
|
|
19766
19767
|
_this.popperInstance = null;
|
|
19767
19768
|
});
|
|
19768
19769
|
|
|
19769
|
-
_defineProperty$
|
|
19770
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "updatePopperInstance", function () {
|
|
19770
19771
|
_this.destroyPopperInstance();
|
|
19771
19772
|
|
|
19772
|
-
var _assertThisInitialize = _assertThisInitialized$
|
|
19773
|
+
var _assertThisInitialize = _assertThisInitialized$2(_this),
|
|
19773
19774
|
popperNode = _assertThisInitialize.popperNode;
|
|
19774
19775
|
|
|
19775
19776
|
var referenceElement = _this.props.referenceElement;
|
|
@@ -19777,7 +19778,7 @@ function (_React$Component) {
|
|
|
19777
19778
|
_this.popperInstance = new Popper$3(referenceElement, popperNode, _this.getOptions());
|
|
19778
19779
|
});
|
|
19779
19780
|
|
|
19780
|
-
_defineProperty$
|
|
19781
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "scheduleUpdate", function () {
|
|
19781
19782
|
if (_this.popperInstance) {
|
|
19782
19783
|
_this.popperInstance.scheduleUpdate();
|
|
19783
19784
|
}
|
|
@@ -19836,7 +19837,7 @@ function (_React$Component) {
|
|
|
19836
19837
|
return InnerPopper;
|
|
19837
19838
|
}(React.Component);
|
|
19838
19839
|
|
|
19839
|
-
_defineProperty$
|
|
19840
|
+
_defineProperty$1(InnerPopper, "defaultProps", {
|
|
19840
19841
|
placement: 'bottom',
|
|
19841
19842
|
eventsEnabled: true,
|
|
19842
19843
|
referenceElement: undefined,
|
|
@@ -19867,7 +19868,7 @@ function (_React$Component) {
|
|
|
19867
19868
|
|
|
19868
19869
|
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
19869
19870
|
|
|
19870
|
-
_defineProperty$
|
|
19871
|
+
_defineProperty$1(_assertThisInitialized$2(_this), "refHandler", function (node) {
|
|
19871
19872
|
setRef$1(_this.props.innerRef, node);
|
|
19872
19873
|
safeInvoke$1(_this.props.setReferenceNode, node);
|
|
19873
19874
|
});
|
|
@@ -20750,1841 +20751,6 @@ var Input$1 = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
20750
20751
|
}));
|
|
20751
20752
|
});
|
|
20752
20753
|
|
|
20753
|
-
/**
|
|
20754
|
-
* A collection of shims that provide minimal functionality of the ES6 collections.
|
|
20755
|
-
*
|
|
20756
|
-
* These implementations are not meant to be used outside of the ResizeObserver
|
|
20757
|
-
* modules as they cover only a limited range of use cases.
|
|
20758
|
-
*/
|
|
20759
|
-
/* eslint-disable require-jsdoc, valid-jsdoc */
|
|
20760
|
-
var MapShim = (function () {
|
|
20761
|
-
if (typeof Map !== 'undefined') {
|
|
20762
|
-
return Map;
|
|
20763
|
-
}
|
|
20764
|
-
/**
|
|
20765
|
-
* Returns index in provided array that matches the specified key.
|
|
20766
|
-
*
|
|
20767
|
-
* @param {Array<Array>} arr
|
|
20768
|
-
* @param {*} key
|
|
20769
|
-
* @returns {number}
|
|
20770
|
-
*/
|
|
20771
|
-
function getIndex(arr, key) {
|
|
20772
|
-
var result = -1;
|
|
20773
|
-
arr.some(function (entry, index) {
|
|
20774
|
-
if (entry[0] === key) {
|
|
20775
|
-
result = index;
|
|
20776
|
-
return true;
|
|
20777
|
-
}
|
|
20778
|
-
return false;
|
|
20779
|
-
});
|
|
20780
|
-
return result;
|
|
20781
|
-
}
|
|
20782
|
-
return /** @class */ (function () {
|
|
20783
|
-
function class_1() {
|
|
20784
|
-
this.__entries__ = [];
|
|
20785
|
-
}
|
|
20786
|
-
Object.defineProperty(class_1.prototype, "size", {
|
|
20787
|
-
/**
|
|
20788
|
-
* @returns {boolean}
|
|
20789
|
-
*/
|
|
20790
|
-
get: function () {
|
|
20791
|
-
return this.__entries__.length;
|
|
20792
|
-
},
|
|
20793
|
-
enumerable: true,
|
|
20794
|
-
configurable: true
|
|
20795
|
-
});
|
|
20796
|
-
/**
|
|
20797
|
-
* @param {*} key
|
|
20798
|
-
* @returns {*}
|
|
20799
|
-
*/
|
|
20800
|
-
class_1.prototype.get = function (key) {
|
|
20801
|
-
var index = getIndex(this.__entries__, key);
|
|
20802
|
-
var entry = this.__entries__[index];
|
|
20803
|
-
return entry && entry[1];
|
|
20804
|
-
};
|
|
20805
|
-
/**
|
|
20806
|
-
* @param {*} key
|
|
20807
|
-
* @param {*} value
|
|
20808
|
-
* @returns {void}
|
|
20809
|
-
*/
|
|
20810
|
-
class_1.prototype.set = function (key, value) {
|
|
20811
|
-
var index = getIndex(this.__entries__, key);
|
|
20812
|
-
if (~index) {
|
|
20813
|
-
this.__entries__[index][1] = value;
|
|
20814
|
-
}
|
|
20815
|
-
else {
|
|
20816
|
-
this.__entries__.push([key, value]);
|
|
20817
|
-
}
|
|
20818
|
-
};
|
|
20819
|
-
/**
|
|
20820
|
-
* @param {*} key
|
|
20821
|
-
* @returns {void}
|
|
20822
|
-
*/
|
|
20823
|
-
class_1.prototype.delete = function (key) {
|
|
20824
|
-
var entries = this.__entries__;
|
|
20825
|
-
var index = getIndex(entries, key);
|
|
20826
|
-
if (~index) {
|
|
20827
|
-
entries.splice(index, 1);
|
|
20828
|
-
}
|
|
20829
|
-
};
|
|
20830
|
-
/**
|
|
20831
|
-
* @param {*} key
|
|
20832
|
-
* @returns {void}
|
|
20833
|
-
*/
|
|
20834
|
-
class_1.prototype.has = function (key) {
|
|
20835
|
-
return !!~getIndex(this.__entries__, key);
|
|
20836
|
-
};
|
|
20837
|
-
/**
|
|
20838
|
-
* @returns {void}
|
|
20839
|
-
*/
|
|
20840
|
-
class_1.prototype.clear = function () {
|
|
20841
|
-
this.__entries__.splice(0);
|
|
20842
|
-
};
|
|
20843
|
-
/**
|
|
20844
|
-
* @param {Function} callback
|
|
20845
|
-
* @param {*} [ctx=null]
|
|
20846
|
-
* @returns {void}
|
|
20847
|
-
*/
|
|
20848
|
-
class_1.prototype.forEach = function (callback, ctx) {
|
|
20849
|
-
if (ctx === void 0) { ctx = null; }
|
|
20850
|
-
for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
|
|
20851
|
-
var entry = _a[_i];
|
|
20852
|
-
callback.call(ctx, entry[1], entry[0]);
|
|
20853
|
-
}
|
|
20854
|
-
};
|
|
20855
|
-
return class_1;
|
|
20856
|
-
}());
|
|
20857
|
-
})();
|
|
20858
|
-
|
|
20859
|
-
/**
|
|
20860
|
-
* Detects whether window and document objects are available in current environment.
|
|
20861
|
-
*/
|
|
20862
|
-
var isBrowser$3 = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
|
|
20863
|
-
|
|
20864
|
-
// Returns global object of a current environment.
|
|
20865
|
-
var global$1 = (function () {
|
|
20866
|
-
if (typeof global !== 'undefined' && global.Math === Math) {
|
|
20867
|
-
return global;
|
|
20868
|
-
}
|
|
20869
|
-
if (typeof self !== 'undefined' && self.Math === Math) {
|
|
20870
|
-
return self;
|
|
20871
|
-
}
|
|
20872
|
-
if (typeof window !== 'undefined' && window.Math === Math) {
|
|
20873
|
-
return window;
|
|
20874
|
-
}
|
|
20875
|
-
// eslint-disable-next-line no-new-func
|
|
20876
|
-
return Function('return this')();
|
|
20877
|
-
})();
|
|
20878
|
-
|
|
20879
|
-
/**
|
|
20880
|
-
* A shim for the requestAnimationFrame which falls back to the setTimeout if
|
|
20881
|
-
* first one is not supported.
|
|
20882
|
-
*
|
|
20883
|
-
* @returns {number} Requests' identifier.
|
|
20884
|
-
*/
|
|
20885
|
-
var requestAnimationFrame$1 = (function () {
|
|
20886
|
-
if (typeof requestAnimationFrame === 'function') {
|
|
20887
|
-
// It's required to use a bounded function because IE sometimes throws
|
|
20888
|
-
// an "Invalid calling object" error if rAF is invoked without the global
|
|
20889
|
-
// object on the left hand side.
|
|
20890
|
-
return requestAnimationFrame.bind(global$1);
|
|
20891
|
-
}
|
|
20892
|
-
return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
|
|
20893
|
-
})();
|
|
20894
|
-
|
|
20895
|
-
// Defines minimum timeout before adding a trailing call.
|
|
20896
|
-
var trailingTimeout = 2;
|
|
20897
|
-
/**
|
|
20898
|
-
* Creates a wrapper function which ensures that provided callback will be
|
|
20899
|
-
* invoked only once during the specified delay period.
|
|
20900
|
-
*
|
|
20901
|
-
* @param {Function} callback - Function to be invoked after the delay period.
|
|
20902
|
-
* @param {number} delay - Delay after which to invoke callback.
|
|
20903
|
-
* @returns {Function}
|
|
20904
|
-
*/
|
|
20905
|
-
function throttle$1 (callback, delay) {
|
|
20906
|
-
var leadingCall = false, trailingCall = false, lastCallTime = 0;
|
|
20907
|
-
/**
|
|
20908
|
-
* Invokes the original callback function and schedules new invocation if
|
|
20909
|
-
* the "proxy" was called during current request.
|
|
20910
|
-
*
|
|
20911
|
-
* @returns {void}
|
|
20912
|
-
*/
|
|
20913
|
-
function resolvePending() {
|
|
20914
|
-
if (leadingCall) {
|
|
20915
|
-
leadingCall = false;
|
|
20916
|
-
callback();
|
|
20917
|
-
}
|
|
20918
|
-
if (trailingCall) {
|
|
20919
|
-
proxy();
|
|
20920
|
-
}
|
|
20921
|
-
}
|
|
20922
|
-
/**
|
|
20923
|
-
* Callback invoked after the specified delay. It will further postpone
|
|
20924
|
-
* invocation of the original function delegating it to the
|
|
20925
|
-
* requestAnimationFrame.
|
|
20926
|
-
*
|
|
20927
|
-
* @returns {void}
|
|
20928
|
-
*/
|
|
20929
|
-
function timeoutCallback() {
|
|
20930
|
-
requestAnimationFrame$1(resolvePending);
|
|
20931
|
-
}
|
|
20932
|
-
/**
|
|
20933
|
-
* Schedules invocation of the original function.
|
|
20934
|
-
*
|
|
20935
|
-
* @returns {void}
|
|
20936
|
-
*/
|
|
20937
|
-
function proxy() {
|
|
20938
|
-
var timeStamp = Date.now();
|
|
20939
|
-
if (leadingCall) {
|
|
20940
|
-
// Reject immediately following calls.
|
|
20941
|
-
if (timeStamp - lastCallTime < trailingTimeout) {
|
|
20942
|
-
return;
|
|
20943
|
-
}
|
|
20944
|
-
// Schedule new call to be in invoked when the pending one is resolved.
|
|
20945
|
-
// This is important for "transitions" which never actually start
|
|
20946
|
-
// immediately so there is a chance that we might miss one if change
|
|
20947
|
-
// happens amids the pending invocation.
|
|
20948
|
-
trailingCall = true;
|
|
20949
|
-
}
|
|
20950
|
-
else {
|
|
20951
|
-
leadingCall = true;
|
|
20952
|
-
trailingCall = false;
|
|
20953
|
-
setTimeout(timeoutCallback, delay);
|
|
20954
|
-
}
|
|
20955
|
-
lastCallTime = timeStamp;
|
|
20956
|
-
}
|
|
20957
|
-
return proxy;
|
|
20958
|
-
}
|
|
20959
|
-
|
|
20960
|
-
// Minimum delay before invoking the update of observers.
|
|
20961
|
-
var REFRESH_DELAY = 20;
|
|
20962
|
-
// A list of substrings of CSS properties used to find transition events that
|
|
20963
|
-
// might affect dimensions of observed elements.
|
|
20964
|
-
var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
|
|
20965
|
-
// Check if MutationObserver is available.
|
|
20966
|
-
var mutationObserverSupported = typeof MutationObserver !== 'undefined';
|
|
20967
|
-
/**
|
|
20968
|
-
* Singleton controller class which handles updates of ResizeObserver instances.
|
|
20969
|
-
*/
|
|
20970
|
-
var ResizeObserverController = /** @class */ (function () {
|
|
20971
|
-
/**
|
|
20972
|
-
* Creates a new instance of ResizeObserverController.
|
|
20973
|
-
*
|
|
20974
|
-
* @private
|
|
20975
|
-
*/
|
|
20976
|
-
function ResizeObserverController() {
|
|
20977
|
-
/**
|
|
20978
|
-
* Indicates whether DOM listeners have been added.
|
|
20979
|
-
*
|
|
20980
|
-
* @private {boolean}
|
|
20981
|
-
*/
|
|
20982
|
-
this.connected_ = false;
|
|
20983
|
-
/**
|
|
20984
|
-
* Tells that controller has subscribed for Mutation Events.
|
|
20985
|
-
*
|
|
20986
|
-
* @private {boolean}
|
|
20987
|
-
*/
|
|
20988
|
-
this.mutationEventsAdded_ = false;
|
|
20989
|
-
/**
|
|
20990
|
-
* Keeps reference to the instance of MutationObserver.
|
|
20991
|
-
*
|
|
20992
|
-
* @private {MutationObserver}
|
|
20993
|
-
*/
|
|
20994
|
-
this.mutationsObserver_ = null;
|
|
20995
|
-
/**
|
|
20996
|
-
* A list of connected observers.
|
|
20997
|
-
*
|
|
20998
|
-
* @private {Array<ResizeObserverSPI>}
|
|
20999
|
-
*/
|
|
21000
|
-
this.observers_ = [];
|
|
21001
|
-
this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
|
|
21002
|
-
this.refresh = throttle$1(this.refresh.bind(this), REFRESH_DELAY);
|
|
21003
|
-
}
|
|
21004
|
-
/**
|
|
21005
|
-
* Adds observer to observers list.
|
|
21006
|
-
*
|
|
21007
|
-
* @param {ResizeObserverSPI} observer - Observer to be added.
|
|
21008
|
-
* @returns {void}
|
|
21009
|
-
*/
|
|
21010
|
-
ResizeObserverController.prototype.addObserver = function (observer) {
|
|
21011
|
-
if (!~this.observers_.indexOf(observer)) {
|
|
21012
|
-
this.observers_.push(observer);
|
|
21013
|
-
}
|
|
21014
|
-
// Add listeners if they haven't been added yet.
|
|
21015
|
-
if (!this.connected_) {
|
|
21016
|
-
this.connect_();
|
|
21017
|
-
}
|
|
21018
|
-
};
|
|
21019
|
-
/**
|
|
21020
|
-
* Removes observer from observers list.
|
|
21021
|
-
*
|
|
21022
|
-
* @param {ResizeObserverSPI} observer - Observer to be removed.
|
|
21023
|
-
* @returns {void}
|
|
21024
|
-
*/
|
|
21025
|
-
ResizeObserverController.prototype.removeObserver = function (observer) {
|
|
21026
|
-
var observers = this.observers_;
|
|
21027
|
-
var index = observers.indexOf(observer);
|
|
21028
|
-
// Remove observer if it's present in registry.
|
|
21029
|
-
if (~index) {
|
|
21030
|
-
observers.splice(index, 1);
|
|
21031
|
-
}
|
|
21032
|
-
// Remove listeners if controller has no connected observers.
|
|
21033
|
-
if (!observers.length && this.connected_) {
|
|
21034
|
-
this.disconnect_();
|
|
21035
|
-
}
|
|
21036
|
-
};
|
|
21037
|
-
/**
|
|
21038
|
-
* Invokes the update of observers. It will continue running updates insofar
|
|
21039
|
-
* it detects changes.
|
|
21040
|
-
*
|
|
21041
|
-
* @returns {void}
|
|
21042
|
-
*/
|
|
21043
|
-
ResizeObserverController.prototype.refresh = function () {
|
|
21044
|
-
var changesDetected = this.updateObservers_();
|
|
21045
|
-
// Continue running updates if changes have been detected as there might
|
|
21046
|
-
// be future ones caused by CSS transitions.
|
|
21047
|
-
if (changesDetected) {
|
|
21048
|
-
this.refresh();
|
|
21049
|
-
}
|
|
21050
|
-
};
|
|
21051
|
-
/**
|
|
21052
|
-
* Updates every observer from observers list and notifies them of queued
|
|
21053
|
-
* entries.
|
|
21054
|
-
*
|
|
21055
|
-
* @private
|
|
21056
|
-
* @returns {boolean} Returns "true" if any observer has detected changes in
|
|
21057
|
-
* dimensions of it's elements.
|
|
21058
|
-
*/
|
|
21059
|
-
ResizeObserverController.prototype.updateObservers_ = function () {
|
|
21060
|
-
// Collect observers that have active observations.
|
|
21061
|
-
var activeObservers = this.observers_.filter(function (observer) {
|
|
21062
|
-
return observer.gatherActive(), observer.hasActive();
|
|
21063
|
-
});
|
|
21064
|
-
// Deliver notifications in a separate cycle in order to avoid any
|
|
21065
|
-
// collisions between observers, e.g. when multiple instances of
|
|
21066
|
-
// ResizeObserver are tracking the same element and the callback of one
|
|
21067
|
-
// of them changes content dimensions of the observed target. Sometimes
|
|
21068
|
-
// this may result in notifications being blocked for the rest of observers.
|
|
21069
|
-
activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
|
|
21070
|
-
return activeObservers.length > 0;
|
|
21071
|
-
};
|
|
21072
|
-
/**
|
|
21073
|
-
* Initializes DOM listeners.
|
|
21074
|
-
*
|
|
21075
|
-
* @private
|
|
21076
|
-
* @returns {void}
|
|
21077
|
-
*/
|
|
21078
|
-
ResizeObserverController.prototype.connect_ = function () {
|
|
21079
|
-
// Do nothing if running in a non-browser environment or if listeners
|
|
21080
|
-
// have been already added.
|
|
21081
|
-
if (!isBrowser$3 || this.connected_) {
|
|
21082
|
-
return;
|
|
21083
|
-
}
|
|
21084
|
-
// Subscription to the "Transitionend" event is used as a workaround for
|
|
21085
|
-
// delayed transitions. This way it's possible to capture at least the
|
|
21086
|
-
// final state of an element.
|
|
21087
|
-
document.addEventListener('transitionend', this.onTransitionEnd_);
|
|
21088
|
-
window.addEventListener('resize', this.refresh);
|
|
21089
|
-
if (mutationObserverSupported) {
|
|
21090
|
-
this.mutationsObserver_ = new MutationObserver(this.refresh);
|
|
21091
|
-
this.mutationsObserver_.observe(document, {
|
|
21092
|
-
attributes: true,
|
|
21093
|
-
childList: true,
|
|
21094
|
-
characterData: true,
|
|
21095
|
-
subtree: true
|
|
21096
|
-
});
|
|
21097
|
-
}
|
|
21098
|
-
else {
|
|
21099
|
-
document.addEventListener('DOMSubtreeModified', this.refresh);
|
|
21100
|
-
this.mutationEventsAdded_ = true;
|
|
21101
|
-
}
|
|
21102
|
-
this.connected_ = true;
|
|
21103
|
-
};
|
|
21104
|
-
/**
|
|
21105
|
-
* Removes DOM listeners.
|
|
21106
|
-
*
|
|
21107
|
-
* @private
|
|
21108
|
-
* @returns {void}
|
|
21109
|
-
*/
|
|
21110
|
-
ResizeObserverController.prototype.disconnect_ = function () {
|
|
21111
|
-
// Do nothing if running in a non-browser environment or if listeners
|
|
21112
|
-
// have been already removed.
|
|
21113
|
-
if (!isBrowser$3 || !this.connected_) {
|
|
21114
|
-
return;
|
|
21115
|
-
}
|
|
21116
|
-
document.removeEventListener('transitionend', this.onTransitionEnd_);
|
|
21117
|
-
window.removeEventListener('resize', this.refresh);
|
|
21118
|
-
if (this.mutationsObserver_) {
|
|
21119
|
-
this.mutationsObserver_.disconnect();
|
|
21120
|
-
}
|
|
21121
|
-
if (this.mutationEventsAdded_) {
|
|
21122
|
-
document.removeEventListener('DOMSubtreeModified', this.refresh);
|
|
21123
|
-
}
|
|
21124
|
-
this.mutationsObserver_ = null;
|
|
21125
|
-
this.mutationEventsAdded_ = false;
|
|
21126
|
-
this.connected_ = false;
|
|
21127
|
-
};
|
|
21128
|
-
/**
|
|
21129
|
-
* "Transitionend" event handler.
|
|
21130
|
-
*
|
|
21131
|
-
* @private
|
|
21132
|
-
* @param {TransitionEvent} event
|
|
21133
|
-
* @returns {void}
|
|
21134
|
-
*/
|
|
21135
|
-
ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
|
|
21136
|
-
var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
|
|
21137
|
-
// Detect whether transition may affect dimensions of an element.
|
|
21138
|
-
var isReflowProperty = transitionKeys.some(function (key) {
|
|
21139
|
-
return !!~propertyName.indexOf(key);
|
|
21140
|
-
});
|
|
21141
|
-
if (isReflowProperty) {
|
|
21142
|
-
this.refresh();
|
|
21143
|
-
}
|
|
21144
|
-
};
|
|
21145
|
-
/**
|
|
21146
|
-
* Returns instance of the ResizeObserverController.
|
|
21147
|
-
*
|
|
21148
|
-
* @returns {ResizeObserverController}
|
|
21149
|
-
*/
|
|
21150
|
-
ResizeObserverController.getInstance = function () {
|
|
21151
|
-
if (!this.instance_) {
|
|
21152
|
-
this.instance_ = new ResizeObserverController();
|
|
21153
|
-
}
|
|
21154
|
-
return this.instance_;
|
|
21155
|
-
};
|
|
21156
|
-
/**
|
|
21157
|
-
* Holds reference to the controller's instance.
|
|
21158
|
-
*
|
|
21159
|
-
* @private {ResizeObserverController}
|
|
21160
|
-
*/
|
|
21161
|
-
ResizeObserverController.instance_ = null;
|
|
21162
|
-
return ResizeObserverController;
|
|
21163
|
-
}());
|
|
21164
|
-
|
|
21165
|
-
/**
|
|
21166
|
-
* Defines non-writable/enumerable properties of the provided target object.
|
|
21167
|
-
*
|
|
21168
|
-
* @param {Object} target - Object for which to define properties.
|
|
21169
|
-
* @param {Object} props - Properties to be defined.
|
|
21170
|
-
* @returns {Object} Target object.
|
|
21171
|
-
*/
|
|
21172
|
-
var defineConfigurable = (function (target, props) {
|
|
21173
|
-
for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
|
|
21174
|
-
var key = _a[_i];
|
|
21175
|
-
Object.defineProperty(target, key, {
|
|
21176
|
-
value: props[key],
|
|
21177
|
-
enumerable: false,
|
|
21178
|
-
writable: false,
|
|
21179
|
-
configurable: true
|
|
21180
|
-
});
|
|
21181
|
-
}
|
|
21182
|
-
return target;
|
|
21183
|
-
});
|
|
21184
|
-
|
|
21185
|
-
/**
|
|
21186
|
-
* Returns the global object associated with provided element.
|
|
21187
|
-
*
|
|
21188
|
-
* @param {Object} target
|
|
21189
|
-
* @returns {Object}
|
|
21190
|
-
*/
|
|
21191
|
-
var getWindowOf = (function (target) {
|
|
21192
|
-
// Assume that the element is an instance of Node, which means that it
|
|
21193
|
-
// has the "ownerDocument" property from which we can retrieve a
|
|
21194
|
-
// corresponding global object.
|
|
21195
|
-
var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
|
|
21196
|
-
// Return the local global object if it's not possible extract one from
|
|
21197
|
-
// provided element.
|
|
21198
|
-
return ownerGlobal || global$1;
|
|
21199
|
-
});
|
|
21200
|
-
|
|
21201
|
-
// Placeholder of an empty content rectangle.
|
|
21202
|
-
var emptyRect = createRectInit(0, 0, 0, 0);
|
|
21203
|
-
/**
|
|
21204
|
-
* Converts provided string to a number.
|
|
21205
|
-
*
|
|
21206
|
-
* @param {number|string} value
|
|
21207
|
-
* @returns {number}
|
|
21208
|
-
*/
|
|
21209
|
-
function toFloat(value) {
|
|
21210
|
-
return parseFloat(value) || 0;
|
|
21211
|
-
}
|
|
21212
|
-
/**
|
|
21213
|
-
* Extracts borders size from provided styles.
|
|
21214
|
-
*
|
|
21215
|
-
* @param {CSSStyleDeclaration} styles
|
|
21216
|
-
* @param {...string} positions - Borders positions (top, right, ...)
|
|
21217
|
-
* @returns {number}
|
|
21218
|
-
*/
|
|
21219
|
-
function getBordersSize(styles) {
|
|
21220
|
-
var positions = [];
|
|
21221
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
21222
|
-
positions[_i - 1] = arguments[_i];
|
|
21223
|
-
}
|
|
21224
|
-
return positions.reduce(function (size, position) {
|
|
21225
|
-
var value = styles['border-' + position + '-width'];
|
|
21226
|
-
return size + toFloat(value);
|
|
21227
|
-
}, 0);
|
|
21228
|
-
}
|
|
21229
|
-
/**
|
|
21230
|
-
* Extracts paddings sizes from provided styles.
|
|
21231
|
-
*
|
|
21232
|
-
* @param {CSSStyleDeclaration} styles
|
|
21233
|
-
* @returns {Object} Paddings box.
|
|
21234
|
-
*/
|
|
21235
|
-
function getPaddings(styles) {
|
|
21236
|
-
var positions = ['top', 'right', 'bottom', 'left'];
|
|
21237
|
-
var paddings = {};
|
|
21238
|
-
for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
|
|
21239
|
-
var position = positions_1[_i];
|
|
21240
|
-
var value = styles['padding-' + position];
|
|
21241
|
-
paddings[position] = toFloat(value);
|
|
21242
|
-
}
|
|
21243
|
-
return paddings;
|
|
21244
|
-
}
|
|
21245
|
-
/**
|
|
21246
|
-
* Calculates content rectangle of provided SVG element.
|
|
21247
|
-
*
|
|
21248
|
-
* @param {SVGGraphicsElement} target - Element content rectangle of which needs
|
|
21249
|
-
* to be calculated.
|
|
21250
|
-
* @returns {DOMRectInit}
|
|
21251
|
-
*/
|
|
21252
|
-
function getSVGContentRect(target) {
|
|
21253
|
-
var bbox = target.getBBox();
|
|
21254
|
-
return createRectInit(0, 0, bbox.width, bbox.height);
|
|
21255
|
-
}
|
|
21256
|
-
/**
|
|
21257
|
-
* Calculates content rectangle of provided HTMLElement.
|
|
21258
|
-
*
|
|
21259
|
-
* @param {HTMLElement} target - Element for which to calculate the content rectangle.
|
|
21260
|
-
* @returns {DOMRectInit}
|
|
21261
|
-
*/
|
|
21262
|
-
function getHTMLElementContentRect(target) {
|
|
21263
|
-
// Client width & height properties can't be
|
|
21264
|
-
// used exclusively as they provide rounded values.
|
|
21265
|
-
var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
|
|
21266
|
-
// By this condition we can catch all non-replaced inline, hidden and
|
|
21267
|
-
// detached elements. Though elements with width & height properties less
|
|
21268
|
-
// than 0.5 will be discarded as well.
|
|
21269
|
-
//
|
|
21270
|
-
// Without it we would need to implement separate methods for each of
|
|
21271
|
-
// those cases and it's not possible to perform a precise and performance
|
|
21272
|
-
// effective test for hidden elements. E.g. even jQuery's ':visible' filter
|
|
21273
|
-
// gives wrong results for elements with width & height less than 0.5.
|
|
21274
|
-
if (!clientWidth && !clientHeight) {
|
|
21275
|
-
return emptyRect;
|
|
21276
|
-
}
|
|
21277
|
-
var styles = getWindowOf(target).getComputedStyle(target);
|
|
21278
|
-
var paddings = getPaddings(styles);
|
|
21279
|
-
var horizPad = paddings.left + paddings.right;
|
|
21280
|
-
var vertPad = paddings.top + paddings.bottom;
|
|
21281
|
-
// Computed styles of width & height are being used because they are the
|
|
21282
|
-
// only dimensions available to JS that contain non-rounded values. It could
|
|
21283
|
-
// be possible to utilize the getBoundingClientRect if only it's data wasn't
|
|
21284
|
-
// affected by CSS transformations let alone paddings, borders and scroll bars.
|
|
21285
|
-
var width = toFloat(styles.width), height = toFloat(styles.height);
|
|
21286
|
-
// Width & height include paddings and borders when the 'border-box' box
|
|
21287
|
-
// model is applied (except for IE).
|
|
21288
|
-
if (styles.boxSizing === 'border-box') {
|
|
21289
|
-
// Following conditions are required to handle Internet Explorer which
|
|
21290
|
-
// doesn't include paddings and borders to computed CSS dimensions.
|
|
21291
|
-
//
|
|
21292
|
-
// We can say that if CSS dimensions + paddings are equal to the "client"
|
|
21293
|
-
// properties then it's either IE, and thus we don't need to subtract
|
|
21294
|
-
// anything, or an element merely doesn't have paddings/borders styles.
|
|
21295
|
-
if (Math.round(width + horizPad) !== clientWidth) {
|
|
21296
|
-
width -= getBordersSize(styles, 'left', 'right') + horizPad;
|
|
21297
|
-
}
|
|
21298
|
-
if (Math.round(height + vertPad) !== clientHeight) {
|
|
21299
|
-
height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
|
|
21300
|
-
}
|
|
21301
|
-
}
|
|
21302
|
-
// Following steps can't be applied to the document's root element as its
|
|
21303
|
-
// client[Width/Height] properties represent viewport area of the window.
|
|
21304
|
-
// Besides, it's as well not necessary as the <html> itself neither has
|
|
21305
|
-
// rendered scroll bars nor it can be clipped.
|
|
21306
|
-
if (!isDocumentElement$1(target)) {
|
|
21307
|
-
// In some browsers (only in Firefox, actually) CSS width & height
|
|
21308
|
-
// include scroll bars size which can be removed at this step as scroll
|
|
21309
|
-
// bars are the only difference between rounded dimensions + paddings
|
|
21310
|
-
// and "client" properties, though that is not always true in Chrome.
|
|
21311
|
-
var vertScrollbar = Math.round(width + horizPad) - clientWidth;
|
|
21312
|
-
var horizScrollbar = Math.round(height + vertPad) - clientHeight;
|
|
21313
|
-
// Chrome has a rather weird rounding of "client" properties.
|
|
21314
|
-
// E.g. for an element with content width of 314.2px it sometimes gives
|
|
21315
|
-
// the client width of 315px and for the width of 314.7px it may give
|
|
21316
|
-
// 314px. And it doesn't happen all the time. So just ignore this delta
|
|
21317
|
-
// as a non-relevant.
|
|
21318
|
-
if (Math.abs(vertScrollbar) !== 1) {
|
|
21319
|
-
width -= vertScrollbar;
|
|
21320
|
-
}
|
|
21321
|
-
if (Math.abs(horizScrollbar) !== 1) {
|
|
21322
|
-
height -= horizScrollbar;
|
|
21323
|
-
}
|
|
21324
|
-
}
|
|
21325
|
-
return createRectInit(paddings.left, paddings.top, width, height);
|
|
21326
|
-
}
|
|
21327
|
-
/**
|
|
21328
|
-
* Checks whether provided element is an instance of the SVGGraphicsElement.
|
|
21329
|
-
*
|
|
21330
|
-
* @param {Element} target - Element to be checked.
|
|
21331
|
-
* @returns {boolean}
|
|
21332
|
-
*/
|
|
21333
|
-
var isSVGGraphicsElement = (function () {
|
|
21334
|
-
// Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
|
|
21335
|
-
// interface.
|
|
21336
|
-
if (typeof SVGGraphicsElement !== 'undefined') {
|
|
21337
|
-
return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
|
|
21338
|
-
}
|
|
21339
|
-
// If it's so, then check that element is at least an instance of the
|
|
21340
|
-
// SVGElement and that it has the "getBBox" method.
|
|
21341
|
-
// eslint-disable-next-line no-extra-parens
|
|
21342
|
-
return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
|
|
21343
|
-
typeof target.getBBox === 'function'); };
|
|
21344
|
-
})();
|
|
21345
|
-
/**
|
|
21346
|
-
* Checks whether provided element is a document element (<html>).
|
|
21347
|
-
*
|
|
21348
|
-
* @param {Element} target - Element to be checked.
|
|
21349
|
-
* @returns {boolean}
|
|
21350
|
-
*/
|
|
21351
|
-
function isDocumentElement$1(target) {
|
|
21352
|
-
return target === getWindowOf(target).document.documentElement;
|
|
21353
|
-
}
|
|
21354
|
-
/**
|
|
21355
|
-
* Calculates an appropriate content rectangle for provided html or svg element.
|
|
21356
|
-
*
|
|
21357
|
-
* @param {Element} target - Element content rectangle of which needs to be calculated.
|
|
21358
|
-
* @returns {DOMRectInit}
|
|
21359
|
-
*/
|
|
21360
|
-
function getContentRect(target) {
|
|
21361
|
-
if (!isBrowser$3) {
|
|
21362
|
-
return emptyRect;
|
|
21363
|
-
}
|
|
21364
|
-
if (isSVGGraphicsElement(target)) {
|
|
21365
|
-
return getSVGContentRect(target);
|
|
21366
|
-
}
|
|
21367
|
-
return getHTMLElementContentRect(target);
|
|
21368
|
-
}
|
|
21369
|
-
/**
|
|
21370
|
-
* Creates rectangle with an interface of the DOMRectReadOnly.
|
|
21371
|
-
* Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
|
|
21372
|
-
*
|
|
21373
|
-
* @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
|
|
21374
|
-
* @returns {DOMRectReadOnly}
|
|
21375
|
-
*/
|
|
21376
|
-
function createReadOnlyRect(_a) {
|
|
21377
|
-
var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
|
|
21378
|
-
// If DOMRectReadOnly is available use it as a prototype for the rectangle.
|
|
21379
|
-
var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
|
|
21380
|
-
var rect = Object.create(Constr.prototype);
|
|
21381
|
-
// Rectangle's properties are not writable and non-enumerable.
|
|
21382
|
-
defineConfigurable(rect, {
|
|
21383
|
-
x: x, y: y, width: width, height: height,
|
|
21384
|
-
top: y,
|
|
21385
|
-
right: x + width,
|
|
21386
|
-
bottom: height + y,
|
|
21387
|
-
left: x
|
|
21388
|
-
});
|
|
21389
|
-
return rect;
|
|
21390
|
-
}
|
|
21391
|
-
/**
|
|
21392
|
-
* Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
|
|
21393
|
-
* Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
|
|
21394
|
-
*
|
|
21395
|
-
* @param {number} x - X coordinate.
|
|
21396
|
-
* @param {number} y - Y coordinate.
|
|
21397
|
-
* @param {number} width - Rectangle's width.
|
|
21398
|
-
* @param {number} height - Rectangle's height.
|
|
21399
|
-
* @returns {DOMRectInit}
|
|
21400
|
-
*/
|
|
21401
|
-
function createRectInit(x, y, width, height) {
|
|
21402
|
-
return { x: x, y: y, width: width, height: height };
|
|
21403
|
-
}
|
|
21404
|
-
|
|
21405
|
-
/**
|
|
21406
|
-
* Class that is responsible for computations of the content rectangle of
|
|
21407
|
-
* provided DOM element and for keeping track of it's changes.
|
|
21408
|
-
*/
|
|
21409
|
-
var ResizeObservation = /** @class */ (function () {
|
|
21410
|
-
/**
|
|
21411
|
-
* Creates an instance of ResizeObservation.
|
|
21412
|
-
*
|
|
21413
|
-
* @param {Element} target - Element to be observed.
|
|
21414
|
-
*/
|
|
21415
|
-
function ResizeObservation(target) {
|
|
21416
|
-
/**
|
|
21417
|
-
* Broadcasted width of content rectangle.
|
|
21418
|
-
*
|
|
21419
|
-
* @type {number}
|
|
21420
|
-
*/
|
|
21421
|
-
this.broadcastWidth = 0;
|
|
21422
|
-
/**
|
|
21423
|
-
* Broadcasted height of content rectangle.
|
|
21424
|
-
*
|
|
21425
|
-
* @type {number}
|
|
21426
|
-
*/
|
|
21427
|
-
this.broadcastHeight = 0;
|
|
21428
|
-
/**
|
|
21429
|
-
* Reference to the last observed content rectangle.
|
|
21430
|
-
*
|
|
21431
|
-
* @private {DOMRectInit}
|
|
21432
|
-
*/
|
|
21433
|
-
this.contentRect_ = createRectInit(0, 0, 0, 0);
|
|
21434
|
-
this.target = target;
|
|
21435
|
-
}
|
|
21436
|
-
/**
|
|
21437
|
-
* Updates content rectangle and tells whether it's width or height properties
|
|
21438
|
-
* have changed since the last broadcast.
|
|
21439
|
-
*
|
|
21440
|
-
* @returns {boolean}
|
|
21441
|
-
*/
|
|
21442
|
-
ResizeObservation.prototype.isActive = function () {
|
|
21443
|
-
var rect = getContentRect(this.target);
|
|
21444
|
-
this.contentRect_ = rect;
|
|
21445
|
-
return (rect.width !== this.broadcastWidth ||
|
|
21446
|
-
rect.height !== this.broadcastHeight);
|
|
21447
|
-
};
|
|
21448
|
-
/**
|
|
21449
|
-
* Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
|
|
21450
|
-
* from the corresponding properties of the last observed content rectangle.
|
|
21451
|
-
*
|
|
21452
|
-
* @returns {DOMRectInit} Last observed content rectangle.
|
|
21453
|
-
*/
|
|
21454
|
-
ResizeObservation.prototype.broadcastRect = function () {
|
|
21455
|
-
var rect = this.contentRect_;
|
|
21456
|
-
this.broadcastWidth = rect.width;
|
|
21457
|
-
this.broadcastHeight = rect.height;
|
|
21458
|
-
return rect;
|
|
21459
|
-
};
|
|
21460
|
-
return ResizeObservation;
|
|
21461
|
-
}());
|
|
21462
|
-
|
|
21463
|
-
var ResizeObserverEntry = /** @class */ (function () {
|
|
21464
|
-
/**
|
|
21465
|
-
* Creates an instance of ResizeObserverEntry.
|
|
21466
|
-
*
|
|
21467
|
-
* @param {Element} target - Element that is being observed.
|
|
21468
|
-
* @param {DOMRectInit} rectInit - Data of the element's content rectangle.
|
|
21469
|
-
*/
|
|
21470
|
-
function ResizeObserverEntry(target, rectInit) {
|
|
21471
|
-
var contentRect = createReadOnlyRect(rectInit);
|
|
21472
|
-
// According to the specification following properties are not writable
|
|
21473
|
-
// and are also not enumerable in the native implementation.
|
|
21474
|
-
//
|
|
21475
|
-
// Property accessors are not being used as they'd require to define a
|
|
21476
|
-
// private WeakMap storage which may cause memory leaks in browsers that
|
|
21477
|
-
// don't support this type of collections.
|
|
21478
|
-
defineConfigurable(this, { target: target, contentRect: contentRect });
|
|
21479
|
-
}
|
|
21480
|
-
return ResizeObserverEntry;
|
|
21481
|
-
}());
|
|
21482
|
-
|
|
21483
|
-
var ResizeObserverSPI = /** @class */ (function () {
|
|
21484
|
-
/**
|
|
21485
|
-
* Creates a new instance of ResizeObserver.
|
|
21486
|
-
*
|
|
21487
|
-
* @param {ResizeObserverCallback} callback - Callback function that is invoked
|
|
21488
|
-
* when one of the observed elements changes it's content dimensions.
|
|
21489
|
-
* @param {ResizeObserverController} controller - Controller instance which
|
|
21490
|
-
* is responsible for the updates of observer.
|
|
21491
|
-
* @param {ResizeObserver} callbackCtx - Reference to the public
|
|
21492
|
-
* ResizeObserver instance which will be passed to callback function.
|
|
21493
|
-
*/
|
|
21494
|
-
function ResizeObserverSPI(callback, controller, callbackCtx) {
|
|
21495
|
-
/**
|
|
21496
|
-
* Collection of resize observations that have detected changes in dimensions
|
|
21497
|
-
* of elements.
|
|
21498
|
-
*
|
|
21499
|
-
* @private {Array<ResizeObservation>}
|
|
21500
|
-
*/
|
|
21501
|
-
this.activeObservations_ = [];
|
|
21502
|
-
/**
|
|
21503
|
-
* Registry of the ResizeObservation instances.
|
|
21504
|
-
*
|
|
21505
|
-
* @private {Map<Element, ResizeObservation>}
|
|
21506
|
-
*/
|
|
21507
|
-
this.observations_ = new MapShim();
|
|
21508
|
-
if (typeof callback !== 'function') {
|
|
21509
|
-
throw new TypeError('The callback provided as parameter 1 is not a function.');
|
|
21510
|
-
}
|
|
21511
|
-
this.callback_ = callback;
|
|
21512
|
-
this.controller_ = controller;
|
|
21513
|
-
this.callbackCtx_ = callbackCtx;
|
|
21514
|
-
}
|
|
21515
|
-
/**
|
|
21516
|
-
* Starts observing provided element.
|
|
21517
|
-
*
|
|
21518
|
-
* @param {Element} target - Element to be observed.
|
|
21519
|
-
* @returns {void}
|
|
21520
|
-
*/
|
|
21521
|
-
ResizeObserverSPI.prototype.observe = function (target) {
|
|
21522
|
-
if (!arguments.length) {
|
|
21523
|
-
throw new TypeError('1 argument required, but only 0 present.');
|
|
21524
|
-
}
|
|
21525
|
-
// Do nothing if current environment doesn't have the Element interface.
|
|
21526
|
-
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
|
21527
|
-
return;
|
|
21528
|
-
}
|
|
21529
|
-
if (!(target instanceof getWindowOf(target).Element)) {
|
|
21530
|
-
throw new TypeError('parameter 1 is not of type "Element".');
|
|
21531
|
-
}
|
|
21532
|
-
var observations = this.observations_;
|
|
21533
|
-
// Do nothing if element is already being observed.
|
|
21534
|
-
if (observations.has(target)) {
|
|
21535
|
-
return;
|
|
21536
|
-
}
|
|
21537
|
-
observations.set(target, new ResizeObservation(target));
|
|
21538
|
-
this.controller_.addObserver(this);
|
|
21539
|
-
// Force the update of observations.
|
|
21540
|
-
this.controller_.refresh();
|
|
21541
|
-
};
|
|
21542
|
-
/**
|
|
21543
|
-
* Stops observing provided element.
|
|
21544
|
-
*
|
|
21545
|
-
* @param {Element} target - Element to stop observing.
|
|
21546
|
-
* @returns {void}
|
|
21547
|
-
*/
|
|
21548
|
-
ResizeObserverSPI.prototype.unobserve = function (target) {
|
|
21549
|
-
if (!arguments.length) {
|
|
21550
|
-
throw new TypeError('1 argument required, but only 0 present.');
|
|
21551
|
-
}
|
|
21552
|
-
// Do nothing if current environment doesn't have the Element interface.
|
|
21553
|
-
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
|
21554
|
-
return;
|
|
21555
|
-
}
|
|
21556
|
-
if (!(target instanceof getWindowOf(target).Element)) {
|
|
21557
|
-
throw new TypeError('parameter 1 is not of type "Element".');
|
|
21558
|
-
}
|
|
21559
|
-
var observations = this.observations_;
|
|
21560
|
-
// Do nothing if element is not being observed.
|
|
21561
|
-
if (!observations.has(target)) {
|
|
21562
|
-
return;
|
|
21563
|
-
}
|
|
21564
|
-
observations.delete(target);
|
|
21565
|
-
if (!observations.size) {
|
|
21566
|
-
this.controller_.removeObserver(this);
|
|
21567
|
-
}
|
|
21568
|
-
};
|
|
21569
|
-
/**
|
|
21570
|
-
* Stops observing all elements.
|
|
21571
|
-
*
|
|
21572
|
-
* @returns {void}
|
|
21573
|
-
*/
|
|
21574
|
-
ResizeObserverSPI.prototype.disconnect = function () {
|
|
21575
|
-
this.clearActive();
|
|
21576
|
-
this.observations_.clear();
|
|
21577
|
-
this.controller_.removeObserver(this);
|
|
21578
|
-
};
|
|
21579
|
-
/**
|
|
21580
|
-
* Collects observation instances the associated element of which has changed
|
|
21581
|
-
* it's content rectangle.
|
|
21582
|
-
*
|
|
21583
|
-
* @returns {void}
|
|
21584
|
-
*/
|
|
21585
|
-
ResizeObserverSPI.prototype.gatherActive = function () {
|
|
21586
|
-
var _this = this;
|
|
21587
|
-
this.clearActive();
|
|
21588
|
-
this.observations_.forEach(function (observation) {
|
|
21589
|
-
if (observation.isActive()) {
|
|
21590
|
-
_this.activeObservations_.push(observation);
|
|
21591
|
-
}
|
|
21592
|
-
});
|
|
21593
|
-
};
|
|
21594
|
-
/**
|
|
21595
|
-
* Invokes initial callback function with a list of ResizeObserverEntry
|
|
21596
|
-
* instances collected from active resize observations.
|
|
21597
|
-
*
|
|
21598
|
-
* @returns {void}
|
|
21599
|
-
*/
|
|
21600
|
-
ResizeObserverSPI.prototype.broadcastActive = function () {
|
|
21601
|
-
// Do nothing if observer doesn't have active observations.
|
|
21602
|
-
if (!this.hasActive()) {
|
|
21603
|
-
return;
|
|
21604
|
-
}
|
|
21605
|
-
var ctx = this.callbackCtx_;
|
|
21606
|
-
// Create ResizeObserverEntry instance for every active observation.
|
|
21607
|
-
var entries = this.activeObservations_.map(function (observation) {
|
|
21608
|
-
return new ResizeObserverEntry(observation.target, observation.broadcastRect());
|
|
21609
|
-
});
|
|
21610
|
-
this.callback_.call(ctx, entries, ctx);
|
|
21611
|
-
this.clearActive();
|
|
21612
|
-
};
|
|
21613
|
-
/**
|
|
21614
|
-
* Clears the collection of active observations.
|
|
21615
|
-
*
|
|
21616
|
-
* @returns {void}
|
|
21617
|
-
*/
|
|
21618
|
-
ResizeObserverSPI.prototype.clearActive = function () {
|
|
21619
|
-
this.activeObservations_.splice(0);
|
|
21620
|
-
};
|
|
21621
|
-
/**
|
|
21622
|
-
* Tells whether observer has active observations.
|
|
21623
|
-
*
|
|
21624
|
-
* @returns {boolean}
|
|
21625
|
-
*/
|
|
21626
|
-
ResizeObserverSPI.prototype.hasActive = function () {
|
|
21627
|
-
return this.activeObservations_.length > 0;
|
|
21628
|
-
};
|
|
21629
|
-
return ResizeObserverSPI;
|
|
21630
|
-
}());
|
|
21631
|
-
|
|
21632
|
-
// Registry of internal observers. If WeakMap is not available use current shim
|
|
21633
|
-
// for the Map collection as it has all required methods and because WeakMap
|
|
21634
|
-
// can't be fully polyfilled anyway.
|
|
21635
|
-
var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
|
|
21636
|
-
/**
|
|
21637
|
-
* ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
|
|
21638
|
-
* exposing only those methods and properties that are defined in the spec.
|
|
21639
|
-
*/
|
|
21640
|
-
var ResizeObserver = /** @class */ (function () {
|
|
21641
|
-
/**
|
|
21642
|
-
* Creates a new instance of ResizeObserver.
|
|
21643
|
-
*
|
|
21644
|
-
* @param {ResizeObserverCallback} callback - Callback that is invoked when
|
|
21645
|
-
* dimensions of the observed elements change.
|
|
21646
|
-
*/
|
|
21647
|
-
function ResizeObserver(callback) {
|
|
21648
|
-
if (!(this instanceof ResizeObserver)) {
|
|
21649
|
-
throw new TypeError('Cannot call a class as a function.');
|
|
21650
|
-
}
|
|
21651
|
-
if (!arguments.length) {
|
|
21652
|
-
throw new TypeError('1 argument required, but only 0 present.');
|
|
21653
|
-
}
|
|
21654
|
-
var controller = ResizeObserverController.getInstance();
|
|
21655
|
-
var observer = new ResizeObserverSPI(callback, controller, this);
|
|
21656
|
-
observers.set(this, observer);
|
|
21657
|
-
}
|
|
21658
|
-
return ResizeObserver;
|
|
21659
|
-
}());
|
|
21660
|
-
// Expose public methods of ResizeObserver.
|
|
21661
|
-
[
|
|
21662
|
-
'observe',
|
|
21663
|
-
'unobserve',
|
|
21664
|
-
'disconnect'
|
|
21665
|
-
].forEach(function (method) {
|
|
21666
|
-
ResizeObserver.prototype[method] = function () {
|
|
21667
|
-
var _a;
|
|
21668
|
-
return (_a = observers.get(this))[method].apply(_a, arguments);
|
|
21669
|
-
};
|
|
21670
|
-
});
|
|
21671
|
-
|
|
21672
|
-
var index = (function () {
|
|
21673
|
-
// Export existing implementation if available.
|
|
21674
|
-
if (typeof global$1.ResizeObserver !== 'undefined') {
|
|
21675
|
-
return global$1.ResizeObserver;
|
|
21676
|
-
}
|
|
21677
|
-
return ResizeObserver;
|
|
21678
|
-
})();
|
|
21679
|
-
|
|
21680
|
-
var rafSchd = function rafSchd(fn) {
|
|
21681
|
-
var lastArgs = [];
|
|
21682
|
-
var frameId = null;
|
|
21683
|
-
|
|
21684
|
-
var wrapperFn = function wrapperFn() {
|
|
21685
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
21686
|
-
args[_key] = arguments[_key];
|
|
21687
|
-
}
|
|
21688
|
-
|
|
21689
|
-
lastArgs = args;
|
|
21690
|
-
|
|
21691
|
-
if (frameId) {
|
|
21692
|
-
return;
|
|
21693
|
-
}
|
|
21694
|
-
|
|
21695
|
-
frameId = requestAnimationFrame(function () {
|
|
21696
|
-
frameId = null;
|
|
21697
|
-
fn.apply(void 0, lastArgs);
|
|
21698
|
-
});
|
|
21699
|
-
};
|
|
21700
|
-
|
|
21701
|
-
wrapperFn.cancel = function () {
|
|
21702
|
-
if (!frameId) {
|
|
21703
|
-
return;
|
|
21704
|
-
}
|
|
21705
|
-
|
|
21706
|
-
cancelAnimationFrame(frameId);
|
|
21707
|
-
frameId = null;
|
|
21708
|
-
};
|
|
21709
|
-
|
|
21710
|
-
return wrapperFn;
|
|
21711
|
-
};
|
|
21712
|
-
|
|
21713
|
-
/**
|
|
21714
|
-
* Checks if `value` is the
|
|
21715
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
21716
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
21717
|
-
*
|
|
21718
|
-
* @static
|
|
21719
|
-
* @memberOf _
|
|
21720
|
-
* @since 0.1.0
|
|
21721
|
-
* @category Lang
|
|
21722
|
-
* @param {*} value The value to check.
|
|
21723
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
21724
|
-
* @example
|
|
21725
|
-
*
|
|
21726
|
-
* _.isObject({});
|
|
21727
|
-
* // => true
|
|
21728
|
-
*
|
|
21729
|
-
* _.isObject([1, 2, 3]);
|
|
21730
|
-
* // => true
|
|
21731
|
-
*
|
|
21732
|
-
* _.isObject(_.noop);
|
|
21733
|
-
* // => true
|
|
21734
|
-
*
|
|
21735
|
-
* _.isObject(null);
|
|
21736
|
-
* // => false
|
|
21737
|
-
*/
|
|
21738
|
-
function isObject(value) {
|
|
21739
|
-
var type = typeof value;
|
|
21740
|
-
return value != null && (type == 'object' || type == 'function');
|
|
21741
|
-
}
|
|
21742
|
-
|
|
21743
|
-
/** Detect free variable `global` from Node.js. */
|
|
21744
|
-
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
|
21745
|
-
|
|
21746
|
-
/** Detect free variable `self`. */
|
|
21747
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
21748
|
-
|
|
21749
|
-
/** Used as a reference to the global object. */
|
|
21750
|
-
var root = freeGlobal || freeSelf || Function('return this')();
|
|
21751
|
-
|
|
21752
|
-
/**
|
|
21753
|
-
* Gets the timestamp of the number of milliseconds that have elapsed since
|
|
21754
|
-
* the Unix epoch (1 January 1970 00:00:00 UTC).
|
|
21755
|
-
*
|
|
21756
|
-
* @static
|
|
21757
|
-
* @memberOf _
|
|
21758
|
-
* @since 2.4.0
|
|
21759
|
-
* @category Date
|
|
21760
|
-
* @returns {number} Returns the timestamp.
|
|
21761
|
-
* @example
|
|
21762
|
-
*
|
|
21763
|
-
* _.defer(function(stamp) {
|
|
21764
|
-
* console.log(_.now() - stamp);
|
|
21765
|
-
* }, _.now());
|
|
21766
|
-
* // => Logs the number of milliseconds it took for the deferred invocation.
|
|
21767
|
-
*/
|
|
21768
|
-
var now = function() {
|
|
21769
|
-
return root.Date.now();
|
|
21770
|
-
};
|
|
21771
|
-
|
|
21772
|
-
/** Used to match a single whitespace character. */
|
|
21773
|
-
var reWhitespace = /\s/;
|
|
21774
|
-
|
|
21775
|
-
/**
|
|
21776
|
-
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
|
|
21777
|
-
* character of `string`.
|
|
21778
|
-
*
|
|
21779
|
-
* @private
|
|
21780
|
-
* @param {string} string The string to inspect.
|
|
21781
|
-
* @returns {number} Returns the index of the last non-whitespace character.
|
|
21782
|
-
*/
|
|
21783
|
-
function trimmedEndIndex(string) {
|
|
21784
|
-
var index = string.length;
|
|
21785
|
-
|
|
21786
|
-
while (index-- && reWhitespace.test(string.charAt(index))) {}
|
|
21787
|
-
return index;
|
|
21788
|
-
}
|
|
21789
|
-
|
|
21790
|
-
/** Used to match leading whitespace. */
|
|
21791
|
-
var reTrimStart = /^\s+/;
|
|
21792
|
-
|
|
21793
|
-
/**
|
|
21794
|
-
* The base implementation of `_.trim`.
|
|
21795
|
-
*
|
|
21796
|
-
* @private
|
|
21797
|
-
* @param {string} string The string to trim.
|
|
21798
|
-
* @returns {string} Returns the trimmed string.
|
|
21799
|
-
*/
|
|
21800
|
-
function baseTrim(string) {
|
|
21801
|
-
return string
|
|
21802
|
-
? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
|
|
21803
|
-
: string;
|
|
21804
|
-
}
|
|
21805
|
-
|
|
21806
|
-
/** Built-in value references. */
|
|
21807
|
-
var Symbol$1 = root.Symbol;
|
|
21808
|
-
|
|
21809
|
-
/** Used for built-in method references. */
|
|
21810
|
-
var objectProto$1 = Object.prototype;
|
|
21811
|
-
|
|
21812
|
-
/** Used to check objects for own properties. */
|
|
21813
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
21814
|
-
|
|
21815
|
-
/**
|
|
21816
|
-
* Used to resolve the
|
|
21817
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
21818
|
-
* of values.
|
|
21819
|
-
*/
|
|
21820
|
-
var nativeObjectToString$1 = objectProto$1.toString;
|
|
21821
|
-
|
|
21822
|
-
/** Built-in value references. */
|
|
21823
|
-
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
21824
|
-
|
|
21825
|
-
/**
|
|
21826
|
-
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
21827
|
-
*
|
|
21828
|
-
* @private
|
|
21829
|
-
* @param {*} value The value to query.
|
|
21830
|
-
* @returns {string} Returns the raw `toStringTag`.
|
|
21831
|
-
*/
|
|
21832
|
-
function getRawTag(value) {
|
|
21833
|
-
var isOwn = hasOwnProperty$1.call(value, symToStringTag$1),
|
|
21834
|
-
tag = value[symToStringTag$1];
|
|
21835
|
-
|
|
21836
|
-
try {
|
|
21837
|
-
value[symToStringTag$1] = undefined;
|
|
21838
|
-
var unmasked = true;
|
|
21839
|
-
} catch (e) {}
|
|
21840
|
-
|
|
21841
|
-
var result = nativeObjectToString$1.call(value);
|
|
21842
|
-
if (unmasked) {
|
|
21843
|
-
if (isOwn) {
|
|
21844
|
-
value[symToStringTag$1] = tag;
|
|
21845
|
-
} else {
|
|
21846
|
-
delete value[symToStringTag$1];
|
|
21847
|
-
}
|
|
21848
|
-
}
|
|
21849
|
-
return result;
|
|
21850
|
-
}
|
|
21851
|
-
|
|
21852
|
-
/** Used for built-in method references. */
|
|
21853
|
-
var objectProto = Object.prototype;
|
|
21854
|
-
|
|
21855
|
-
/**
|
|
21856
|
-
* Used to resolve the
|
|
21857
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
21858
|
-
* of values.
|
|
21859
|
-
*/
|
|
21860
|
-
var nativeObjectToString = objectProto.toString;
|
|
21861
|
-
|
|
21862
|
-
/**
|
|
21863
|
-
* Converts `value` to a string using `Object.prototype.toString`.
|
|
21864
|
-
*
|
|
21865
|
-
* @private
|
|
21866
|
-
* @param {*} value The value to convert.
|
|
21867
|
-
* @returns {string} Returns the converted string.
|
|
21868
|
-
*/
|
|
21869
|
-
function objectToString(value) {
|
|
21870
|
-
return nativeObjectToString.call(value);
|
|
21871
|
-
}
|
|
21872
|
-
|
|
21873
|
-
/** `Object#toString` result references. */
|
|
21874
|
-
var nullTag = '[object Null]',
|
|
21875
|
-
undefinedTag = '[object Undefined]';
|
|
21876
|
-
|
|
21877
|
-
/** Built-in value references. */
|
|
21878
|
-
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
21879
|
-
|
|
21880
|
-
/**
|
|
21881
|
-
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
21882
|
-
*
|
|
21883
|
-
* @private
|
|
21884
|
-
* @param {*} value The value to query.
|
|
21885
|
-
* @returns {string} Returns the `toStringTag`.
|
|
21886
|
-
*/
|
|
21887
|
-
function baseGetTag(value) {
|
|
21888
|
-
if (value == null) {
|
|
21889
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
21890
|
-
}
|
|
21891
|
-
return (symToStringTag && symToStringTag in Object(value))
|
|
21892
|
-
? getRawTag(value)
|
|
21893
|
-
: objectToString(value);
|
|
21894
|
-
}
|
|
21895
|
-
|
|
21896
|
-
/**
|
|
21897
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
21898
|
-
* and has a `typeof` result of "object".
|
|
21899
|
-
*
|
|
21900
|
-
* @static
|
|
21901
|
-
* @memberOf _
|
|
21902
|
-
* @since 4.0.0
|
|
21903
|
-
* @category Lang
|
|
21904
|
-
* @param {*} value The value to check.
|
|
21905
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
21906
|
-
* @example
|
|
21907
|
-
*
|
|
21908
|
-
* _.isObjectLike({});
|
|
21909
|
-
* // => true
|
|
21910
|
-
*
|
|
21911
|
-
* _.isObjectLike([1, 2, 3]);
|
|
21912
|
-
* // => true
|
|
21913
|
-
*
|
|
21914
|
-
* _.isObjectLike(_.noop);
|
|
21915
|
-
* // => false
|
|
21916
|
-
*
|
|
21917
|
-
* _.isObjectLike(null);
|
|
21918
|
-
* // => false
|
|
21919
|
-
*/
|
|
21920
|
-
function isObjectLike(value) {
|
|
21921
|
-
return value != null && typeof value == 'object';
|
|
21922
|
-
}
|
|
21923
|
-
|
|
21924
|
-
/** `Object#toString` result references. */
|
|
21925
|
-
var symbolTag = '[object Symbol]';
|
|
21926
|
-
|
|
21927
|
-
/**
|
|
21928
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
21929
|
-
*
|
|
21930
|
-
* @static
|
|
21931
|
-
* @memberOf _
|
|
21932
|
-
* @since 4.0.0
|
|
21933
|
-
* @category Lang
|
|
21934
|
-
* @param {*} value The value to check.
|
|
21935
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
21936
|
-
* @example
|
|
21937
|
-
*
|
|
21938
|
-
* _.isSymbol(Symbol.iterator);
|
|
21939
|
-
* // => true
|
|
21940
|
-
*
|
|
21941
|
-
* _.isSymbol('abc');
|
|
21942
|
-
* // => false
|
|
21943
|
-
*/
|
|
21944
|
-
function isSymbol(value) {
|
|
21945
|
-
return typeof value == 'symbol' ||
|
|
21946
|
-
(isObjectLike(value) && baseGetTag(value) == symbolTag);
|
|
21947
|
-
}
|
|
21948
|
-
|
|
21949
|
-
/** Used as references for various `Number` constants. */
|
|
21950
|
-
var NAN = 0 / 0;
|
|
21951
|
-
|
|
21952
|
-
/** Used to detect bad signed hexadecimal string values. */
|
|
21953
|
-
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
21954
|
-
|
|
21955
|
-
/** Used to detect binary string values. */
|
|
21956
|
-
var reIsBinary = /^0b[01]+$/i;
|
|
21957
|
-
|
|
21958
|
-
/** Used to detect octal string values. */
|
|
21959
|
-
var reIsOctal = /^0o[0-7]+$/i;
|
|
21960
|
-
|
|
21961
|
-
/** Built-in method references without a dependency on `root`. */
|
|
21962
|
-
var freeParseInt = parseInt;
|
|
21963
|
-
|
|
21964
|
-
/**
|
|
21965
|
-
* Converts `value` to a number.
|
|
21966
|
-
*
|
|
21967
|
-
* @static
|
|
21968
|
-
* @memberOf _
|
|
21969
|
-
* @since 4.0.0
|
|
21970
|
-
* @category Lang
|
|
21971
|
-
* @param {*} value The value to process.
|
|
21972
|
-
* @returns {number} Returns the number.
|
|
21973
|
-
* @example
|
|
21974
|
-
*
|
|
21975
|
-
* _.toNumber(3.2);
|
|
21976
|
-
* // => 3.2
|
|
21977
|
-
*
|
|
21978
|
-
* _.toNumber(Number.MIN_VALUE);
|
|
21979
|
-
* // => 5e-324
|
|
21980
|
-
*
|
|
21981
|
-
* _.toNumber(Infinity);
|
|
21982
|
-
* // => Infinity
|
|
21983
|
-
*
|
|
21984
|
-
* _.toNumber('3.2');
|
|
21985
|
-
* // => 3.2
|
|
21986
|
-
*/
|
|
21987
|
-
function toNumber(value) {
|
|
21988
|
-
if (typeof value == 'number') {
|
|
21989
|
-
return value;
|
|
21990
|
-
}
|
|
21991
|
-
if (isSymbol(value)) {
|
|
21992
|
-
return NAN;
|
|
21993
|
-
}
|
|
21994
|
-
if (isObject(value)) {
|
|
21995
|
-
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
|
21996
|
-
value = isObject(other) ? (other + '') : other;
|
|
21997
|
-
}
|
|
21998
|
-
if (typeof value != 'string') {
|
|
21999
|
-
return value === 0 ? value : +value;
|
|
22000
|
-
}
|
|
22001
|
-
value = baseTrim(value);
|
|
22002
|
-
var isBinary = reIsBinary.test(value);
|
|
22003
|
-
return (isBinary || reIsOctal.test(value))
|
|
22004
|
-
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
|
22005
|
-
: (reIsBadHex.test(value) ? NAN : +value);
|
|
22006
|
-
}
|
|
22007
|
-
|
|
22008
|
-
/** Error message constants. */
|
|
22009
|
-
var FUNC_ERROR_TEXT$1 = 'Expected a function';
|
|
22010
|
-
|
|
22011
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
22012
|
-
var nativeMax = Math.max,
|
|
22013
|
-
nativeMin = Math.min;
|
|
22014
|
-
|
|
22015
|
-
/**
|
|
22016
|
-
* Creates a debounced function that delays invoking `func` until after `wait`
|
|
22017
|
-
* milliseconds have elapsed since the last time the debounced function was
|
|
22018
|
-
* invoked. The debounced function comes with a `cancel` method to cancel
|
|
22019
|
-
* delayed `func` invocations and a `flush` method to immediately invoke them.
|
|
22020
|
-
* Provide `options` to indicate whether `func` should be invoked on the
|
|
22021
|
-
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
|
|
22022
|
-
* with the last arguments provided to the debounced function. Subsequent
|
|
22023
|
-
* calls to the debounced function return the result of the last `func`
|
|
22024
|
-
* invocation.
|
|
22025
|
-
*
|
|
22026
|
-
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
|
22027
|
-
* invoked on the trailing edge of the timeout only if the debounced function
|
|
22028
|
-
* is invoked more than once during the `wait` timeout.
|
|
22029
|
-
*
|
|
22030
|
-
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
|
22031
|
-
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
|
22032
|
-
*
|
|
22033
|
-
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
|
22034
|
-
* for details over the differences between `_.debounce` and `_.throttle`.
|
|
22035
|
-
*
|
|
22036
|
-
* @static
|
|
22037
|
-
* @memberOf _
|
|
22038
|
-
* @since 0.1.0
|
|
22039
|
-
* @category Function
|
|
22040
|
-
* @param {Function} func The function to debounce.
|
|
22041
|
-
* @param {number} [wait=0] The number of milliseconds to delay.
|
|
22042
|
-
* @param {Object} [options={}] The options object.
|
|
22043
|
-
* @param {boolean} [options.leading=false]
|
|
22044
|
-
* Specify invoking on the leading edge of the timeout.
|
|
22045
|
-
* @param {number} [options.maxWait]
|
|
22046
|
-
* The maximum time `func` is allowed to be delayed before it's invoked.
|
|
22047
|
-
* @param {boolean} [options.trailing=true]
|
|
22048
|
-
* Specify invoking on the trailing edge of the timeout.
|
|
22049
|
-
* @returns {Function} Returns the new debounced function.
|
|
22050
|
-
* @example
|
|
22051
|
-
*
|
|
22052
|
-
* // Avoid costly calculations while the window size is in flux.
|
|
22053
|
-
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
|
|
22054
|
-
*
|
|
22055
|
-
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
|
|
22056
|
-
* jQuery(element).on('click', _.debounce(sendMail, 300, {
|
|
22057
|
-
* 'leading': true,
|
|
22058
|
-
* 'trailing': false
|
|
22059
|
-
* }));
|
|
22060
|
-
*
|
|
22061
|
-
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
|
|
22062
|
-
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
|
|
22063
|
-
* var source = new EventSource('/stream');
|
|
22064
|
-
* jQuery(source).on('message', debounced);
|
|
22065
|
-
*
|
|
22066
|
-
* // Cancel the trailing debounced invocation.
|
|
22067
|
-
* jQuery(window).on('popstate', debounced.cancel);
|
|
22068
|
-
*/
|
|
22069
|
-
function debounce$1(func, wait, options) {
|
|
22070
|
-
var lastArgs,
|
|
22071
|
-
lastThis,
|
|
22072
|
-
maxWait,
|
|
22073
|
-
result,
|
|
22074
|
-
timerId,
|
|
22075
|
-
lastCallTime,
|
|
22076
|
-
lastInvokeTime = 0,
|
|
22077
|
-
leading = false,
|
|
22078
|
-
maxing = false,
|
|
22079
|
-
trailing = true;
|
|
22080
|
-
|
|
22081
|
-
if (typeof func != 'function') {
|
|
22082
|
-
throw new TypeError(FUNC_ERROR_TEXT$1);
|
|
22083
|
-
}
|
|
22084
|
-
wait = toNumber(wait) || 0;
|
|
22085
|
-
if (isObject(options)) {
|
|
22086
|
-
leading = !!options.leading;
|
|
22087
|
-
maxing = 'maxWait' in options;
|
|
22088
|
-
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
22089
|
-
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
|
22090
|
-
}
|
|
22091
|
-
|
|
22092
|
-
function invokeFunc(time) {
|
|
22093
|
-
var args = lastArgs,
|
|
22094
|
-
thisArg = lastThis;
|
|
22095
|
-
|
|
22096
|
-
lastArgs = lastThis = undefined;
|
|
22097
|
-
lastInvokeTime = time;
|
|
22098
|
-
result = func.apply(thisArg, args);
|
|
22099
|
-
return result;
|
|
22100
|
-
}
|
|
22101
|
-
|
|
22102
|
-
function leadingEdge(time) {
|
|
22103
|
-
// Reset any `maxWait` timer.
|
|
22104
|
-
lastInvokeTime = time;
|
|
22105
|
-
// Start the timer for the trailing edge.
|
|
22106
|
-
timerId = setTimeout(timerExpired, wait);
|
|
22107
|
-
// Invoke the leading edge.
|
|
22108
|
-
return leading ? invokeFunc(time) : result;
|
|
22109
|
-
}
|
|
22110
|
-
|
|
22111
|
-
function remainingWait(time) {
|
|
22112
|
-
var timeSinceLastCall = time - lastCallTime,
|
|
22113
|
-
timeSinceLastInvoke = time - lastInvokeTime,
|
|
22114
|
-
timeWaiting = wait - timeSinceLastCall;
|
|
22115
|
-
|
|
22116
|
-
return maxing
|
|
22117
|
-
? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
|
|
22118
|
-
: timeWaiting;
|
|
22119
|
-
}
|
|
22120
|
-
|
|
22121
|
-
function shouldInvoke(time) {
|
|
22122
|
-
var timeSinceLastCall = time - lastCallTime,
|
|
22123
|
-
timeSinceLastInvoke = time - lastInvokeTime;
|
|
22124
|
-
|
|
22125
|
-
// Either this is the first call, activity has stopped and we're at the
|
|
22126
|
-
// trailing edge, the system time has gone backwards and we're treating
|
|
22127
|
-
// it as the trailing edge, or we've hit the `maxWait` limit.
|
|
22128
|
-
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
|
|
22129
|
-
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
|
|
22130
|
-
}
|
|
22131
|
-
|
|
22132
|
-
function timerExpired() {
|
|
22133
|
-
var time = now();
|
|
22134
|
-
if (shouldInvoke(time)) {
|
|
22135
|
-
return trailingEdge(time);
|
|
22136
|
-
}
|
|
22137
|
-
// Restart the timer.
|
|
22138
|
-
timerId = setTimeout(timerExpired, remainingWait(time));
|
|
22139
|
-
}
|
|
22140
|
-
|
|
22141
|
-
function trailingEdge(time) {
|
|
22142
|
-
timerId = undefined;
|
|
22143
|
-
|
|
22144
|
-
// Only invoke if we have `lastArgs` which means `func` has been
|
|
22145
|
-
// debounced at least once.
|
|
22146
|
-
if (trailing && lastArgs) {
|
|
22147
|
-
return invokeFunc(time);
|
|
22148
|
-
}
|
|
22149
|
-
lastArgs = lastThis = undefined;
|
|
22150
|
-
return result;
|
|
22151
|
-
}
|
|
22152
|
-
|
|
22153
|
-
function cancel() {
|
|
22154
|
-
if (timerId !== undefined) {
|
|
22155
|
-
clearTimeout(timerId);
|
|
22156
|
-
}
|
|
22157
|
-
lastInvokeTime = 0;
|
|
22158
|
-
lastArgs = lastCallTime = lastThis = timerId = undefined;
|
|
22159
|
-
}
|
|
22160
|
-
|
|
22161
|
-
function flush() {
|
|
22162
|
-
return timerId === undefined ? result : trailingEdge(now());
|
|
22163
|
-
}
|
|
22164
|
-
|
|
22165
|
-
function debounced() {
|
|
22166
|
-
var time = now(),
|
|
22167
|
-
isInvoking = shouldInvoke(time);
|
|
22168
|
-
|
|
22169
|
-
lastArgs = arguments;
|
|
22170
|
-
lastThis = this;
|
|
22171
|
-
lastCallTime = time;
|
|
22172
|
-
|
|
22173
|
-
if (isInvoking) {
|
|
22174
|
-
if (timerId === undefined) {
|
|
22175
|
-
return leadingEdge(lastCallTime);
|
|
22176
|
-
}
|
|
22177
|
-
if (maxing) {
|
|
22178
|
-
// Handle invocations in a tight loop.
|
|
22179
|
-
clearTimeout(timerId);
|
|
22180
|
-
timerId = setTimeout(timerExpired, wait);
|
|
22181
|
-
return invokeFunc(lastCallTime);
|
|
22182
|
-
}
|
|
22183
|
-
}
|
|
22184
|
-
if (timerId === undefined) {
|
|
22185
|
-
timerId = setTimeout(timerExpired, wait);
|
|
22186
|
-
}
|
|
22187
|
-
return result;
|
|
22188
|
-
}
|
|
22189
|
-
debounced.cancel = cancel;
|
|
22190
|
-
debounced.flush = flush;
|
|
22191
|
-
return debounced;
|
|
22192
|
-
}
|
|
22193
|
-
|
|
22194
|
-
/** Error message constants. */
|
|
22195
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
22196
|
-
|
|
22197
|
-
/**
|
|
22198
|
-
* Creates a throttled function that only invokes `func` at most once per
|
|
22199
|
-
* every `wait` milliseconds. The throttled function comes with a `cancel`
|
|
22200
|
-
* method to cancel delayed `func` invocations and a `flush` method to
|
|
22201
|
-
* immediately invoke them. Provide `options` to indicate whether `func`
|
|
22202
|
-
* should be invoked on the leading and/or trailing edge of the `wait`
|
|
22203
|
-
* timeout. The `func` is invoked with the last arguments provided to the
|
|
22204
|
-
* throttled function. Subsequent calls to the throttled function return the
|
|
22205
|
-
* result of the last `func` invocation.
|
|
22206
|
-
*
|
|
22207
|
-
* **Note:** If `leading` and `trailing` options are `true`, `func` is
|
|
22208
|
-
* invoked on the trailing edge of the timeout only if the throttled function
|
|
22209
|
-
* is invoked more than once during the `wait` timeout.
|
|
22210
|
-
*
|
|
22211
|
-
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
|
|
22212
|
-
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
|
|
22213
|
-
*
|
|
22214
|
-
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
|
|
22215
|
-
* for details over the differences between `_.throttle` and `_.debounce`.
|
|
22216
|
-
*
|
|
22217
|
-
* @static
|
|
22218
|
-
* @memberOf _
|
|
22219
|
-
* @since 0.1.0
|
|
22220
|
-
* @category Function
|
|
22221
|
-
* @param {Function} func The function to throttle.
|
|
22222
|
-
* @param {number} [wait=0] The number of milliseconds to throttle invocations to.
|
|
22223
|
-
* @param {Object} [options={}] The options object.
|
|
22224
|
-
* @param {boolean} [options.leading=true]
|
|
22225
|
-
* Specify invoking on the leading edge of the timeout.
|
|
22226
|
-
* @param {boolean} [options.trailing=true]
|
|
22227
|
-
* Specify invoking on the trailing edge of the timeout.
|
|
22228
|
-
* @returns {Function} Returns the new throttled function.
|
|
22229
|
-
* @example
|
|
22230
|
-
*
|
|
22231
|
-
* // Avoid excessively updating the position while scrolling.
|
|
22232
|
-
* jQuery(window).on('scroll', _.throttle(updatePosition, 100));
|
|
22233
|
-
*
|
|
22234
|
-
* // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
|
|
22235
|
-
* var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
|
|
22236
|
-
* jQuery(element).on('click', throttled);
|
|
22237
|
-
*
|
|
22238
|
-
* // Cancel the trailing throttled invocation.
|
|
22239
|
-
* jQuery(window).on('popstate', throttled.cancel);
|
|
22240
|
-
*/
|
|
22241
|
-
function throttle(func, wait, options) {
|
|
22242
|
-
var leading = true,
|
|
22243
|
-
trailing = true;
|
|
22244
|
-
|
|
22245
|
-
if (typeof func != 'function') {
|
|
22246
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
22247
|
-
}
|
|
22248
|
-
if (isObject(options)) {
|
|
22249
|
-
leading = 'leading' in options ? !!options.leading : leading;
|
|
22250
|
-
trailing = 'trailing' in options ? !!options.trailing : trailing;
|
|
22251
|
-
}
|
|
22252
|
-
return debounce$1(func, wait, {
|
|
22253
|
-
'leading': leading,
|
|
22254
|
-
'maxWait': wait,
|
|
22255
|
-
'trailing': trailing
|
|
22256
|
-
});
|
|
22257
|
-
}
|
|
22258
|
-
|
|
22259
|
-
var listHandle = {
|
|
22260
|
-
debounce: debounce$1,
|
|
22261
|
-
throttle: throttle
|
|
22262
|
-
};
|
|
22263
|
-
var getHandle = function getHandle(type) {
|
|
22264
|
-
return listHandle[type];
|
|
22265
|
-
};
|
|
22266
|
-
var isFunction = function isFunction(fn) {
|
|
22267
|
-
return typeof fn === 'function';
|
|
22268
|
-
};
|
|
22269
|
-
var isSSR = function isSSR() {
|
|
22270
|
-
return typeof window === 'undefined';
|
|
22271
|
-
};
|
|
22272
|
-
var isDOMElement = function isDOMElement(element) {
|
|
22273
|
-
return element instanceof Element || element instanceof HTMLDocument;
|
|
22274
|
-
};
|
|
22275
|
-
|
|
22276
|
-
function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
|
|
22277
|
-
|
|
22278
|
-
function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
22279
|
-
|
|
22280
|
-
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
22281
|
-
|
|
22282
|
-
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
|
|
22283
|
-
|
|
22284
|
-
function _inherits$1(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$2(subClass, superClass); }
|
|
22285
|
-
|
|
22286
|
-
function _setPrototypeOf$2(o, p) { _setPrototypeOf$2 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$2(o, p); }
|
|
22287
|
-
|
|
22288
|
-
function _createSuper$7(Derived) { return function () { var Super = _getPrototypeOf$1(Derived), result; if (_isNativeReflectConstruct$7()) { var NewTarget = _getPrototypeOf$1(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn$1(this, result); }; }
|
|
22289
|
-
|
|
22290
|
-
function _possibleConstructorReturn$1(self, call) { if (call && (_typeof$1(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized$2(self); }
|
|
22291
|
-
|
|
22292
|
-
function _assertThisInitialized$2(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22293
|
-
|
|
22294
|
-
function _isNativeReflectConstruct$7() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
22295
|
-
|
|
22296
|
-
function _getPrototypeOf$1(o) { _getPrototypeOf$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$1(o); }
|
|
22297
|
-
|
|
22298
|
-
var ChildWrapper = /*#__PURE__*/function (_PureComponent) {
|
|
22299
|
-
_inherits$1(ChildWrapper, _PureComponent);
|
|
22300
|
-
|
|
22301
|
-
var _super = _createSuper$7(ChildWrapper);
|
|
22302
|
-
|
|
22303
|
-
function ChildWrapper() {
|
|
22304
|
-
_classCallCheck$1(this, ChildWrapper);
|
|
22305
|
-
|
|
22306
|
-
return _super.apply(this, arguments);
|
|
22307
|
-
}
|
|
22308
|
-
|
|
22309
|
-
_createClass$1(ChildWrapper, [{
|
|
22310
|
-
key: "render",
|
|
22311
|
-
value: function render() {
|
|
22312
|
-
// eslint-disable-next-line react/prop-types
|
|
22313
|
-
return this.props.children;
|
|
22314
|
-
}
|
|
22315
|
-
}]);
|
|
22316
|
-
|
|
22317
|
-
return ChildWrapper;
|
|
22318
|
-
}(PureComponent);
|
|
22319
|
-
|
|
22320
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
22321
|
-
|
|
22322
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
22323
|
-
|
|
22324
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
22325
|
-
|
|
22326
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
22327
|
-
|
|
22328
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$1(subClass, superClass); }
|
|
22329
|
-
|
|
22330
|
-
function _setPrototypeOf$1(o, p) { _setPrototypeOf$1 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$1(o, p); }
|
|
22331
|
-
|
|
22332
|
-
function _createSuper$6(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct$6()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
22333
|
-
|
|
22334
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized$1(self); }
|
|
22335
|
-
|
|
22336
|
-
function _assertThisInitialized$1(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22337
|
-
|
|
22338
|
-
function _isNativeReflectConstruct$6() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
22339
|
-
|
|
22340
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
22341
|
-
|
|
22342
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
22343
|
-
|
|
22344
|
-
var ResizeDetector = /*#__PURE__*/function (_PureComponent) {
|
|
22345
|
-
_inherits(ResizeDetector, _PureComponent);
|
|
22346
|
-
|
|
22347
|
-
var _super = _createSuper$6(ResizeDetector);
|
|
22348
|
-
|
|
22349
|
-
function ResizeDetector(props) {
|
|
22350
|
-
var _this;
|
|
22351
|
-
|
|
22352
|
-
_classCallCheck(this, ResizeDetector);
|
|
22353
|
-
|
|
22354
|
-
_this = _super.call(this, props);
|
|
22355
|
-
|
|
22356
|
-
_defineProperty(_assertThisInitialized$1(_this), "cancelHandler", function () {
|
|
22357
|
-
if (_this.resizeHandler && _this.resizeHandler.cancel) {
|
|
22358
|
-
// cancel debounced handler
|
|
22359
|
-
_this.resizeHandler.cancel();
|
|
22360
|
-
|
|
22361
|
-
_this.resizeHandler = null;
|
|
22362
|
-
}
|
|
22363
|
-
});
|
|
22364
|
-
|
|
22365
|
-
_defineProperty(_assertThisInitialized$1(_this), "rafClean", function () {
|
|
22366
|
-
if (_this.raf && _this.raf.cancel) {
|
|
22367
|
-
_this.raf.cancel();
|
|
22368
|
-
|
|
22369
|
-
_this.raf = null;
|
|
22370
|
-
}
|
|
22371
|
-
});
|
|
22372
|
-
|
|
22373
|
-
_defineProperty(_assertThisInitialized$1(_this), "toggleObserver", function (type) {
|
|
22374
|
-
var element = _this.getElement();
|
|
22375
|
-
|
|
22376
|
-
if (!element || !_this.resizeObserver[type]) return;
|
|
22377
|
-
|
|
22378
|
-
_this.resizeObserver[type](element);
|
|
22379
|
-
});
|
|
22380
|
-
|
|
22381
|
-
_defineProperty(_assertThisInitialized$1(_this), "getElement", function () {
|
|
22382
|
-
var _this$props = _this.props,
|
|
22383
|
-
querySelector = _this$props.querySelector,
|
|
22384
|
-
targetDomEl = _this$props.targetDomEl;
|
|
22385
|
-
if (isSSR()) return undefined;
|
|
22386
|
-
if (querySelector) return document.querySelector(querySelector);
|
|
22387
|
-
if (targetDomEl && isDOMElement(targetDomEl)) return targetDomEl; // eslint-disable-next-line react/no-find-dom-node
|
|
22388
|
-
|
|
22389
|
-
var currentElement = _this.element && findDOMNode(_this.element);
|
|
22390
|
-
if (!currentElement) return undefined;
|
|
22391
|
-
return currentElement.parentElement;
|
|
22392
|
-
});
|
|
22393
|
-
|
|
22394
|
-
_defineProperty(_assertThisInitialized$1(_this), "createUpdater", function () {
|
|
22395
|
-
_this.rafClean();
|
|
22396
|
-
|
|
22397
|
-
_this.raf = rafSchd(function (_ref) {
|
|
22398
|
-
var width = _ref.width,
|
|
22399
|
-
height = _ref.height;
|
|
22400
|
-
var onResize = _this.props.onResize;
|
|
22401
|
-
|
|
22402
|
-
if (isFunction(onResize)) {
|
|
22403
|
-
onResize(width, height);
|
|
22404
|
-
}
|
|
22405
|
-
|
|
22406
|
-
_this.setState({
|
|
22407
|
-
width: width,
|
|
22408
|
-
height: height
|
|
22409
|
-
});
|
|
22410
|
-
});
|
|
22411
|
-
return _this.raf;
|
|
22412
|
-
});
|
|
22413
|
-
|
|
22414
|
-
_defineProperty(_assertThisInitialized$1(_this), "createResizeHandler", function (entries) {
|
|
22415
|
-
var _this$state = _this.state,
|
|
22416
|
-
widthCurrent = _this$state.width,
|
|
22417
|
-
heightCurrent = _this$state.height;
|
|
22418
|
-
var _this$props2 = _this.props,
|
|
22419
|
-
handleWidth = _this$props2.handleWidth,
|
|
22420
|
-
handleHeight = _this$props2.handleHeight;
|
|
22421
|
-
if (!handleWidth && !handleHeight) return;
|
|
22422
|
-
|
|
22423
|
-
var updater = _this.createUpdater();
|
|
22424
|
-
|
|
22425
|
-
entries.forEach(function (entry) {
|
|
22426
|
-
var _ref2 = entry && entry.contentRect || {},
|
|
22427
|
-
width = _ref2.width,
|
|
22428
|
-
height = _ref2.height;
|
|
22429
|
-
|
|
22430
|
-
var isWidthChanged = handleWidth && widthCurrent !== width;
|
|
22431
|
-
var isHeightChanged = handleHeight && heightCurrent !== height;
|
|
22432
|
-
var isSizeChanged = isWidthChanged || isHeightChanged;
|
|
22433
|
-
var shouldSetSize = !_this.skipOnMount && isSizeChanged && !isSSR();
|
|
22434
|
-
|
|
22435
|
-
if (shouldSetSize) {
|
|
22436
|
-
updater({
|
|
22437
|
-
width: width,
|
|
22438
|
-
height: height
|
|
22439
|
-
});
|
|
22440
|
-
}
|
|
22441
|
-
|
|
22442
|
-
_this.skipOnMount = false;
|
|
22443
|
-
});
|
|
22444
|
-
});
|
|
22445
|
-
|
|
22446
|
-
_defineProperty(_assertThisInitialized$1(_this), "onRef", function (el) {
|
|
22447
|
-
_this.element = el;
|
|
22448
|
-
});
|
|
22449
|
-
|
|
22450
|
-
_defineProperty(_assertThisInitialized$1(_this), "getRenderType", function () {
|
|
22451
|
-
var _this$props3 = _this.props,
|
|
22452
|
-
render = _this$props3.render,
|
|
22453
|
-
children = _this$props3.children;
|
|
22454
|
-
|
|
22455
|
-
if (isFunction(render)) {
|
|
22456
|
-
return 'renderProp';
|
|
22457
|
-
}
|
|
22458
|
-
|
|
22459
|
-
if (isFunction(children)) {
|
|
22460
|
-
return 'childFunction';
|
|
22461
|
-
}
|
|
22462
|
-
|
|
22463
|
-
if (isValidElement(children)) {
|
|
22464
|
-
return 'child';
|
|
22465
|
-
}
|
|
22466
|
-
|
|
22467
|
-
if (Array.isArray(children)) {
|
|
22468
|
-
return 'childArray';
|
|
22469
|
-
}
|
|
22470
|
-
|
|
22471
|
-
return 'parent';
|
|
22472
|
-
});
|
|
22473
|
-
|
|
22474
|
-
_defineProperty(_assertThisInitialized$1(_this), "getTargetComponent", function () {
|
|
22475
|
-
var _this$props4 = _this.props,
|
|
22476
|
-
render = _this$props4.render,
|
|
22477
|
-
children = _this$props4.children,
|
|
22478
|
-
nodeType = _this$props4.nodeType;
|
|
22479
|
-
var _this$state2 = _this.state,
|
|
22480
|
-
width = _this$state2.width,
|
|
22481
|
-
height = _this$state2.height;
|
|
22482
|
-
var childProps = {
|
|
22483
|
-
width: width,
|
|
22484
|
-
height: height
|
|
22485
|
-
};
|
|
22486
|
-
|
|
22487
|
-
var renderType = _this.getRenderType();
|
|
22488
|
-
|
|
22489
|
-
switch (renderType) {
|
|
22490
|
-
case 'renderProp':
|
|
22491
|
-
return cloneElement(render(childProps), {
|
|
22492
|
-
key: 'resize-detector'
|
|
22493
|
-
});
|
|
22494
|
-
|
|
22495
|
-
case 'childFunction':
|
|
22496
|
-
return cloneElement(children(childProps));
|
|
22497
|
-
|
|
22498
|
-
case 'child':
|
|
22499
|
-
return cloneElement(children, childProps);
|
|
22500
|
-
|
|
22501
|
-
case 'childArray':
|
|
22502
|
-
return children.map(function (el) {
|
|
22503
|
-
return !!el && cloneElement(el, childProps);
|
|
22504
|
-
});
|
|
22505
|
-
|
|
22506
|
-
default:
|
|
22507
|
-
return createElement(nodeType);
|
|
22508
|
-
}
|
|
22509
|
-
});
|
|
22510
|
-
|
|
22511
|
-
var skipOnMount = props.skipOnMount,
|
|
22512
|
-
refreshMode = props.refreshMode,
|
|
22513
|
-
refreshRate = props.refreshRate,
|
|
22514
|
-
refreshOptions = props.refreshOptions;
|
|
22515
|
-
_this.state = {
|
|
22516
|
-
width: undefined,
|
|
22517
|
-
height: undefined
|
|
22518
|
-
};
|
|
22519
|
-
_this.skipOnMount = skipOnMount;
|
|
22520
|
-
_this.raf = null;
|
|
22521
|
-
_this.element = null;
|
|
22522
|
-
_this.unmounted = false;
|
|
22523
|
-
var handle = getHandle(refreshMode);
|
|
22524
|
-
_this.resizeHandler = handle ? handle(_this.createResizeHandler, refreshRate, refreshOptions) : _this.createResizeHandler;
|
|
22525
|
-
_this.resizeObserver = new index(_this.resizeHandler);
|
|
22526
|
-
return _this;
|
|
22527
|
-
}
|
|
22528
|
-
|
|
22529
|
-
_createClass(ResizeDetector, [{
|
|
22530
|
-
key: "componentDidMount",
|
|
22531
|
-
value: function componentDidMount() {
|
|
22532
|
-
this.toggleObserver('observe');
|
|
22533
|
-
}
|
|
22534
|
-
}, {
|
|
22535
|
-
key: "componentWillUnmount",
|
|
22536
|
-
value: function componentWillUnmount() {
|
|
22537
|
-
this.toggleObserver('unobserve');
|
|
22538
|
-
this.rafClean();
|
|
22539
|
-
this.cancelHandler();
|
|
22540
|
-
this.unmounted = true;
|
|
22541
|
-
}
|
|
22542
|
-
}, {
|
|
22543
|
-
key: "render",
|
|
22544
|
-
value: function render() {
|
|
22545
|
-
return /*#__PURE__*/React__default.createElement(ChildWrapper, {
|
|
22546
|
-
ref: this.onRef
|
|
22547
|
-
}, this.getTargetComponent());
|
|
22548
|
-
}
|
|
22549
|
-
}]);
|
|
22550
|
-
|
|
22551
|
-
return ResizeDetector;
|
|
22552
|
-
}(PureComponent);
|
|
22553
|
-
|
|
22554
|
-
ResizeDetector.propTypes = {
|
|
22555
|
-
handleWidth: bool,
|
|
22556
|
-
handleHeight: bool,
|
|
22557
|
-
skipOnMount: bool,
|
|
22558
|
-
refreshRate: number$1,
|
|
22559
|
-
refreshMode: string,
|
|
22560
|
-
refreshOptions: shape({
|
|
22561
|
-
leading: bool,
|
|
22562
|
-
trailing: bool
|
|
22563
|
-
}),
|
|
22564
|
-
querySelector: string,
|
|
22565
|
-
targetDomEl: any,
|
|
22566
|
-
// eslint-disable-line react/forbid-prop-types
|
|
22567
|
-
onResize: func,
|
|
22568
|
-
render: func,
|
|
22569
|
-
children: any,
|
|
22570
|
-
// eslint-disable-line react/forbid-prop-types
|
|
22571
|
-
nodeType: node
|
|
22572
|
-
};
|
|
22573
|
-
ResizeDetector.defaultProps = {
|
|
22574
|
-
handleWidth: false,
|
|
22575
|
-
handleHeight: false,
|
|
22576
|
-
skipOnMount: false,
|
|
22577
|
-
refreshRate: 1000,
|
|
22578
|
-
refreshMode: undefined,
|
|
22579
|
-
refreshOptions: undefined,
|
|
22580
|
-
querySelector: null,
|
|
22581
|
-
targetDomEl: null,
|
|
22582
|
-
onResize: null,
|
|
22583
|
-
render: undefined,
|
|
22584
|
-
children: null,
|
|
22585
|
-
nodeType: 'div'
|
|
22586
|
-
};
|
|
22587
|
-
|
|
22588
20754
|
var _excluded = ["name", "onSubmit"];
|
|
22589
20755
|
|
|
22590
20756
|
var BaseNavBarSearch = function BaseNavBarSearch(_ref) {
|
|
@@ -22684,9 +20850,9 @@ var StatelessNavBarDropdownMenu$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
22684
20850
|
var _this;
|
|
22685
20851
|
|
|
22686
20852
|
_this = _React$Component.call(this, props) || this;
|
|
22687
|
-
_this.handleOutsideClick = _this.handleOutsideClick.bind(_assertThisInitialized$
|
|
22688
|
-
_this.setMenuRef = _this.setMenuRef.bind(_assertThisInitialized$
|
|
22689
|
-
_this.setTriggerRef = _this.setTriggerRef.bind(_assertThisInitialized$
|
|
20853
|
+
_this.handleOutsideClick = _this.handleOutsideClick.bind(_assertThisInitialized$2(_this));
|
|
20854
|
+
_this.setMenuRef = _this.setMenuRef.bind(_assertThisInitialized$2(_this));
|
|
20855
|
+
_this.setTriggerRef = _this.setTriggerRef.bind(_assertThisInitialized$2(_this));
|
|
22690
20856
|
return _this;
|
|
22691
20857
|
}
|
|
22692
20858
|
|
|
@@ -24033,7 +22199,7 @@ var SelectNavBarBasedOnWidth$1 = function SelectNavBarBasedOnWidth(_a) {
|
|
|
24033
22199
|
};
|
|
24034
22200
|
|
|
24035
22201
|
var NavBar$1 = function NavBar(props) {
|
|
24036
|
-
return /*#__PURE__*/React__default.createElement(
|
|
22202
|
+
return /*#__PURE__*/React__default.createElement(ReactResizeDetector, {
|
|
24037
22203
|
handleWidth: true
|
|
24038
22204
|
}, /*#__PURE__*/React__default.createElement(SelectNavBarBasedOnWidth$1, Object.assign({}, props)));
|
|
24039
22205
|
};
|
|
@@ -27697,12 +25863,12 @@ var TabScrollIndicators = /*#__PURE__*/function (_React$Component) {
|
|
|
27697
25863
|
contentHiddenLeft: _this.contentHiddenLeft(),
|
|
27698
25864
|
contentHiddenRight: _this.contentHiddenRight()
|
|
27699
25865
|
};
|
|
27700
|
-
_this.handleIndicatorClick = _this.handleIndicatorClick.bind(_assertThisInitialized$
|
|
27701
|
-
_this.getScrollLeftValueByTabIndex = _this.getScrollLeftValueByTabIndex.bind(_assertThisInitialized$
|
|
27702
|
-
_this.contentHiddenLeft = _this.contentHiddenLeft.bind(_assertThisInitialized$
|
|
27703
|
-
_this.contentHiddenRight = _this.contentHiddenRight.bind(_assertThisInitialized$
|
|
27704
|
-
_this.handleScroll = _this.handleScroll.bind(_assertThisInitialized$
|
|
27705
|
-
_this.handleResize = _this.handleResize.bind(_assertThisInitialized$
|
|
25866
|
+
_this.handleIndicatorClick = _this.handleIndicatorClick.bind(_assertThisInitialized$2(_this));
|
|
25867
|
+
_this.getScrollLeftValueByTabIndex = _this.getScrollLeftValueByTabIndex.bind(_assertThisInitialized$2(_this));
|
|
25868
|
+
_this.contentHiddenLeft = _this.contentHiddenLeft.bind(_assertThisInitialized$2(_this));
|
|
25869
|
+
_this.contentHiddenRight = _this.contentHiddenRight.bind(_assertThisInitialized$2(_this));
|
|
25870
|
+
_this.handleScroll = _this.handleScroll.bind(_assertThisInitialized$2(_this));
|
|
25871
|
+
_this.handleResize = _this.handleResize.bind(_assertThisInitialized$2(_this));
|
|
27706
25872
|
return _this;
|
|
27707
25873
|
}
|
|
27708
25874
|
|
|
@@ -27897,8 +26063,8 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
|
|
|
27897
26063
|
_this.tabContent = [];
|
|
27898
26064
|
_this.tabContainerRef = /*#__PURE__*/React__default.createRef();
|
|
27899
26065
|
_this.tabRefs = [];
|
|
27900
|
-
_this.handleTabClick = _this.handleTabClick.bind(_assertThisInitialized$
|
|
27901
|
-
_this.getTabs = _this.getTabs.bind(_assertThisInitialized$
|
|
26066
|
+
_this.handleTabClick = _this.handleTabClick.bind(_assertThisInitialized$2(_this));
|
|
26067
|
+
_this.getTabs = _this.getTabs.bind(_assertThisInitialized$2(_this));
|
|
27902
26068
|
return _this;
|
|
27903
26069
|
}
|
|
27904
26070
|
|
|
@@ -28007,7 +26173,7 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
|
|
|
28007
26173
|
role: "tablist",
|
|
28008
26174
|
onScroll: handleScroll,
|
|
28009
26175
|
ref: _this3.tabContainerRef
|
|
28010
|
-
}, spaceProps), /*#__PURE__*/React__default.createElement(
|
|
26176
|
+
}, spaceProps), /*#__PURE__*/React__default.createElement(ReactResizeDetector, {
|
|
28011
26177
|
handleWidth: true,
|
|
28012
26178
|
onResize: handleResize
|
|
28013
26179
|
}), _this3.getTabs(setFocusedIndex, focusedIndex, handleArrowNavigation));
|
|
@@ -44408,9 +42574,9 @@ var StatelessNavBarDropdownMenu = /*#__PURE__*/function (_StatelessNavBarDropd)
|
|
|
44408
42574
|
var _this;
|
|
44409
42575
|
|
|
44410
42576
|
_this = _StatelessNavBarDropd.call(this, props) || this;
|
|
44411
|
-
_this.handleOutsideClick = _this.handleOutsideClick.bind(_assertThisInitialized$
|
|
44412
|
-
_this.setMenuRef = _this.setMenuRef.bind(_assertThisInitialized$
|
|
44413
|
-
_this.setTriggerRef = _this.setTriggerRef.bind(_assertThisInitialized$
|
|
42577
|
+
_this.handleOutsideClick = _this.handleOutsideClick.bind(_assertThisInitialized$2(_this));
|
|
42578
|
+
_this.setMenuRef = _this.setMenuRef.bind(_assertThisInitialized$2(_this));
|
|
42579
|
+
_this.setTriggerRef = _this.setTriggerRef.bind(_assertThisInitialized$2(_this));
|
|
44414
42580
|
return _this;
|
|
44415
42581
|
}
|
|
44416
42582
|
|
|
@@ -44998,16 +43164,17 @@ var renderMenuItem = function renderMenuItem(menuItem, themeColorObject, layer)
|
|
|
44998
43164
|
return getRenderFunction$1(menuItem)(menuItem, themeColorObject, layer);
|
|
44999
43165
|
};
|
|
45000
43166
|
|
|
45001
|
-
var BaseDesktopMenu = function
|
|
43167
|
+
var BaseDesktopMenu = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
|
|
45002
43168
|
var menuData = _a.menuData,
|
|
45003
43169
|
themeColorObject = _a.themeColorObject,
|
|
45004
43170
|
props = __rest(_a, ["menuData", "themeColorObject"]);
|
|
45005
43171
|
|
|
45006
|
-
return /*#__PURE__*/React__default.createElement(Nav$1, Object.assign({}, props
|
|
43172
|
+
return /*#__PURE__*/React__default.createElement(Nav$1, Object.assign({}, props, {
|
|
43173
|
+
ref: ref
|
|
43174
|
+
}), menuData.map(function (menuItem) {
|
|
45007
43175
|
return renderMenuItem(menuItem, themeColorObject, 0);
|
|
45008
43176
|
}));
|
|
45009
|
-
};
|
|
45010
|
-
|
|
43177
|
+
});
|
|
45011
43178
|
var DesktopMenu = styled(BaseDesktopMenu).withConfig({
|
|
45012
43179
|
displayName: "DesktopMenu",
|
|
45013
43180
|
componentId: "sc-8mrjkc-3"
|
|
@@ -45073,6 +43240,83 @@ var NulogyLogo = function NulogyLogo() {
|
|
|
45073
43240
|
};
|
|
45074
43241
|
|
|
45075
43242
|
var borderStyle$1 = "1px solid #e4e7eb";
|
|
43243
|
+
var NulogyLogoContainer = function NulogyLogoContainer(_ref) {
|
|
43244
|
+
var subText = _ref.subText,
|
|
43245
|
+
height = _ref.height;
|
|
43246
|
+
return /*#__PURE__*/React__default.createElement(Flex, {
|
|
43247
|
+
px: "x1",
|
|
43248
|
+
py: "half",
|
|
43249
|
+
alignItems: "center",
|
|
43250
|
+
// boxShadow="small"
|
|
43251
|
+
justifyContent: "center",
|
|
43252
|
+
flexDirection: subText ? "column" : "row",
|
|
43253
|
+
height: height,
|
|
43254
|
+
borderLeft: borderStyle$1,
|
|
43255
|
+
borderRight: borderStyle$1
|
|
43256
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
43257
|
+
width: "76px",
|
|
43258
|
+
height: "18px"
|
|
43259
|
+
}, /*#__PURE__*/React__default.createElement(NulogyLogo, null)), subText && /*#__PURE__*/React__default.createElement(Text, {
|
|
43260
|
+
fontSize: "8px",
|
|
43261
|
+
lineHeight: "10px",
|
|
43262
|
+
color: "darkGrey",
|
|
43263
|
+
fontWeight: "medium",
|
|
43264
|
+
textTransform: "uppercase",
|
|
43265
|
+
letterSpacing: ".5px"
|
|
43266
|
+
}, subText));
|
|
43267
|
+
};
|
|
43268
|
+
|
|
43269
|
+
var EnvironmentBanner = function EnvironmentBanner(_ref) {
|
|
43270
|
+
var children = _ref.children;
|
|
43271
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
43272
|
+
bg: "darkBlue",
|
|
43273
|
+
textAlign: "center"
|
|
43274
|
+
}, /*#__PURE__*/React__default.createElement(Text, {
|
|
43275
|
+
fontSize: "10px",
|
|
43276
|
+
letterSpacing: "0.5px",
|
|
43277
|
+
fontWeight: "bold",
|
|
43278
|
+
color: "white",
|
|
43279
|
+
textTransform: "uppercase",
|
|
43280
|
+
py: "2px"
|
|
43281
|
+
}, children));
|
|
43282
|
+
};
|
|
43283
|
+
|
|
43284
|
+
var MAX_LOGO_WIDTH = "184px";
|
|
43285
|
+
var MAX_LOGO_HEIGHT = "36px";
|
|
43286
|
+
|
|
43287
|
+
var BrandLogoContainer = function BrandLogoContainer(_ref) {
|
|
43288
|
+
var logoSrc = _ref.logoSrc,
|
|
43289
|
+
brandingLinkHref = _ref.brandingLinkHref,
|
|
43290
|
+
brandingLinkTo = _ref.brandingLinkTo,
|
|
43291
|
+
brandingLinkComponent = _ref.brandingLinkComponent,
|
|
43292
|
+
subtext = _ref.subtext;
|
|
43293
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
43294
|
+
maxWidth: MAX_LOGO_WIDTH,
|
|
43295
|
+
maxHeight: MAX_LOGO_HEIGHT
|
|
43296
|
+
}, /*#__PURE__*/React__default.createElement(Link, {
|
|
43297
|
+
"aria-label": "Home",
|
|
43298
|
+
href: brandingLinkHref,
|
|
43299
|
+
to: brandingLinkTo,
|
|
43300
|
+
as: brandingLinkComponent,
|
|
43301
|
+
underline: false,
|
|
43302
|
+
style: {
|
|
43303
|
+
display: "block"
|
|
43304
|
+
}
|
|
43305
|
+
}, logoSrc && /*#__PURE__*/React__default.createElement("img", {
|
|
43306
|
+
src: logoSrc,
|
|
43307
|
+
style: {
|
|
43308
|
+
maxWidth: MAX_LOGO_WIDTH,
|
|
43309
|
+
maxHeight: MAX_LOGO_HEIGHT
|
|
43310
|
+
},
|
|
43311
|
+
alt: ""
|
|
43312
|
+
}), !logoSrc && /*#__PURE__*/React__default.createElement(Branding, {
|
|
43313
|
+
size: subtext ? "small" : "medium",
|
|
43314
|
+
logoColor: "blue",
|
|
43315
|
+
subtext: subtext
|
|
43316
|
+
})));
|
|
43317
|
+
};
|
|
43318
|
+
|
|
43319
|
+
var borderStyle = "1px solid #e4e7eb";
|
|
45076
43320
|
var BrandingWrap = styled.div.withConfig({
|
|
45077
43321
|
displayName: "MobileMenu__BrandingWrap",
|
|
45078
43322
|
componentId: "sc-18t6zrc-0"
|
|
@@ -45299,7 +43543,7 @@ var BaseMobileMenu = function BaseMobileMenu(_a) {
|
|
|
45299
43543
|
logoColor: themeColorObject && themeColorObject.logoColor
|
|
45300
43544
|
})), /*#__PURE__*/React__default.createElement(Menu$1, null, menuData.primaryMenu && renderTopLayerMenuItems(menuData.primaryMenu, closeMenu, themeColorObject), menuData.secondaryMenu && renderTopLayerMenuItems(menuData.secondaryMenu, closeMenu, themeColorObject)), logoSrc && /*#__PURE__*/React__default.createElement(Flex, {
|
|
45301
43545
|
textAlign: "center",
|
|
45302
|
-
borderTop: borderStyle
|
|
43546
|
+
borderTop: borderStyle,
|
|
45303
43547
|
height: "40px",
|
|
45304
43548
|
alignItems: "center",
|
|
45305
43549
|
justifyContent: "center"
|
|
@@ -45318,163 +43562,28 @@ var MobileMenu = styled(BaseMobileMenu).withConfig({
|
|
|
45318
43562
|
componentId: "sc-18t6zrc-6"
|
|
45319
43563
|
})(display);
|
|
45320
43564
|
|
|
45321
|
-
var borderStyle = "1px solid #e4e7eb";
|
|
45322
|
-
var NulogyLogoContainer = function NulogyLogoContainer(_ref) {
|
|
45323
|
-
var subText = _ref.subText,
|
|
45324
|
-
height = _ref.height;
|
|
45325
|
-
return /*#__PURE__*/React__default.createElement(Flex, {
|
|
45326
|
-
px: "x1",
|
|
45327
|
-
py: "half",
|
|
45328
|
-
alignItems: "center",
|
|
45329
|
-
// boxShadow="small"
|
|
45330
|
-
justifyContent: "center",
|
|
45331
|
-
flexDirection: subText ? "column" : "row",
|
|
45332
|
-
height: height,
|
|
45333
|
-
borderLeft: borderStyle,
|
|
45334
|
-
borderRight: borderStyle
|
|
45335
|
-
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
45336
|
-
width: "76px",
|
|
45337
|
-
height: "18px"
|
|
45338
|
-
}, /*#__PURE__*/React__default.createElement(NulogyLogo, null)), subText && /*#__PURE__*/React__default.createElement(Text, {
|
|
45339
|
-
fontSize: "8px",
|
|
45340
|
-
lineHeight: "10px",
|
|
45341
|
-
color: "darkGrey",
|
|
45342
|
-
fontWeight: "medium",
|
|
45343
|
-
textTransform: "uppercase",
|
|
45344
|
-
letterSpacing: ".5px"
|
|
45345
|
-
}, subText));
|
|
45346
|
-
};
|
|
45347
|
-
|
|
45348
|
-
var EnvironmentBanner = function EnvironmentBanner(_ref) {
|
|
45349
|
-
var children = _ref.children;
|
|
45350
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
45351
|
-
bg: "darkBlue",
|
|
45352
|
-
textAlign: "center"
|
|
45353
|
-
}, /*#__PURE__*/React__default.createElement(Text, {
|
|
45354
|
-
fontSize: "10px",
|
|
45355
|
-
letterSpacing: "0.5px",
|
|
45356
|
-
fontWeight: "bold",
|
|
45357
|
-
color: "white",
|
|
45358
|
-
textTransform: "uppercase",
|
|
45359
|
-
py: "2px"
|
|
45360
|
-
}, children));
|
|
45361
|
-
};
|
|
45362
|
-
|
|
45363
|
-
var MAX_LOGO_WIDTH = "184px";
|
|
45364
|
-
var MAX_LOGO_HEIGHT = "36px";
|
|
45365
|
-
var NAVBAR_HEIGHT = "56px";
|
|
45366
|
-
var themeColorObject = {
|
|
45367
|
-
color: "darkBlue",
|
|
45368
|
-
hoverColor: "blackBlue",
|
|
45369
|
-
background: "white",
|
|
45370
|
-
hoverBackground: "whiteGrey",
|
|
45371
|
-
textColor: "blackBlue",
|
|
45372
|
-
logoColor: "blue"
|
|
45373
|
-
};
|
|
45374
43565
|
var NavBarBackground = styled(Flex).withConfig({
|
|
45375
|
-
displayName: "
|
|
45376
|
-
componentId: "
|
|
43566
|
+
displayName: "NavBarBackground",
|
|
43567
|
+
componentId: "sc-1g75y9j-0"
|
|
45377
43568
|
})(function (_ref) {
|
|
45378
|
-
var
|
|
45379
|
-
theme = _ref.theme;
|
|
43569
|
+
var theme = _ref.theme;
|
|
45380
43570
|
return {
|
|
45381
|
-
background: backgroundColor,
|
|
45382
43571
|
padding: "0 " + theme.space.x3,
|
|
45383
43572
|
borderBottom: "1px solid " + theme.colors.lightGrey,
|
|
45384
43573
|
alignItems: "center",
|
|
45385
|
-
height: NAVBAR_HEIGHT,
|
|
45386
43574
|
zIndex: theme.zIndices.navBar,
|
|
45387
43575
|
position: "relative"
|
|
45388
43576
|
};
|
|
45389
|
-
});
|
|
45390
|
-
|
|
45391
|
-
var BrandLogoContainer = function BrandLogoContainer(_ref2) {
|
|
45392
|
-
var logoSrc = _ref2.logoSrc,
|
|
45393
|
-
brandingLinkHref = _ref2.brandingLinkHref,
|
|
45394
|
-
brandingLinkTo = _ref2.brandingLinkTo,
|
|
45395
|
-
brandingLinkComponent = _ref2.brandingLinkComponent,
|
|
45396
|
-
subtext = _ref2.subtext;
|
|
45397
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
45398
|
-
maxWidth: MAX_LOGO_WIDTH,
|
|
45399
|
-
maxHeight: MAX_LOGO_HEIGHT
|
|
45400
|
-
}, /*#__PURE__*/React__default.createElement(Link, {
|
|
45401
|
-
"aria-label": "Home",
|
|
45402
|
-
href: brandingLinkHref,
|
|
45403
|
-
to: brandingLinkTo,
|
|
45404
|
-
as: brandingLinkComponent,
|
|
45405
|
-
underline: false,
|
|
45406
|
-
style: {
|
|
45407
|
-
display: "block"
|
|
45408
|
-
}
|
|
45409
|
-
}, logoSrc && /*#__PURE__*/React__default.createElement("img", {
|
|
45410
|
-
src: logoSrc,
|
|
45411
|
-
style: {
|
|
45412
|
-
maxWidth: MAX_LOGO_WIDTH,
|
|
45413
|
-
maxHeight: MAX_LOGO_HEIGHT
|
|
45414
|
-
},
|
|
45415
|
-
alt: ""
|
|
45416
|
-
}), !logoSrc && /*#__PURE__*/React__default.createElement(Branding, {
|
|
45417
|
-
size: subtext ? "small" : "medium",
|
|
45418
|
-
logoColor: "blue",
|
|
45419
|
-
subtext: subtext
|
|
45420
|
-
})));
|
|
45421
|
-
};
|
|
45422
|
-
|
|
45423
|
-
var MediumNavBar = function MediumNavBar(_a) {
|
|
45424
|
-
var menuData = _a.menuData,
|
|
45425
|
-
subtext = _a.subtext,
|
|
45426
|
-
environment = _a.environment,
|
|
45427
|
-
logoSrc = _a.logoSrc,
|
|
45428
|
-
_a$brandingLinkHref = _a.brandingLinkHref,
|
|
45429
|
-
brandingLinkHref = _a$brandingLinkHref === void 0 ? "/" : _a$brandingLinkHref,
|
|
45430
|
-
brandingLinkTo = _a.brandingLinkTo,
|
|
45431
|
-
brandingLinkComponent = _a.brandingLinkComponent,
|
|
45432
|
-
props = __rest(_a, ["menuData", "subtext", "environment", "logoSrc", "brandingLinkHref", "brandingLinkTo", "brandingLinkComponent"]);
|
|
45433
|
-
|
|
45434
|
-
var _useTranslation = useTranslation(),
|
|
45435
|
-
t = _useTranslation.t;
|
|
45436
|
-
|
|
45437
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, environment && /*#__PURE__*/React__default.createElement(EnvironmentBanner, null, environment), /*#__PURE__*/React__default.createElement("header", Object.assign({}, props), /*#__PURE__*/React__default.createElement(NavBarBackground, {
|
|
45438
|
-
backgroundColor: "white"
|
|
45439
|
-
}, /*#__PURE__*/React__default.createElement(BrandLogoContainer, {
|
|
45440
|
-
logoSrc: logoSrc,
|
|
45441
|
-
brandingLinkHref: brandingLinkHref,
|
|
45442
|
-
brandingLinkTo: brandingLinkTo,
|
|
45443
|
-
brandingLinkComponent: brandingLinkComponent,
|
|
45444
|
-
subtext: subtext
|
|
45445
|
-
}), /*#__PURE__*/React__default.createElement(Flex, {
|
|
45446
|
-
justifyContent: "space-between",
|
|
45447
|
-
alignContent: "flex-end",
|
|
45448
|
-
flexGrow: 1,
|
|
45449
|
-
ml: "x3",
|
|
45450
|
-
alignItems: "center"
|
|
45451
|
-
}, menuData.primaryMenu && /*#__PURE__*/React__default.createElement(DesktopMenu, {
|
|
45452
|
-
themeColorObject: themeColorObject,
|
|
45453
|
-
"aria-label": t("primary navigation"),
|
|
45454
|
-
menuData: menuData.primaryMenu
|
|
45455
|
-
}), /*#__PURE__*/React__default.createElement(Flex, {
|
|
45456
|
-
justifySelf: "flex-end",
|
|
45457
|
-
alignItems: "center"
|
|
45458
|
-
}, menuData.secondaryMenu && /*#__PURE__*/React__default.createElement(DesktopMenu, {
|
|
45459
|
-
themeColorObject: themeColorObject,
|
|
45460
|
-
"aria-label": t("secondary navigation"),
|
|
45461
|
-
menuData: menuData.secondaryMenu
|
|
45462
|
-
}), logoSrc && /*#__PURE__*/React__default.createElement(Box, {
|
|
45463
|
-
pl: "x3"
|
|
45464
|
-
}, /*#__PURE__*/React__default.createElement(NulogyLogoContainer, {
|
|
45465
|
-
height: NAVBAR_HEIGHT,
|
|
45466
|
-
subText: subtext
|
|
45467
|
-
})))))));
|
|
45468
|
-
};
|
|
43577
|
+
}, addStyledProps);
|
|
45469
43578
|
|
|
45470
43579
|
var MobileMenuTrigger = styled.button.withConfig({
|
|
45471
|
-
displayName: "
|
|
45472
|
-
componentId: "
|
|
45473
|
-
})(function (
|
|
45474
|
-
var color =
|
|
45475
|
-
hoverColor =
|
|
45476
|
-
hoverBackground =
|
|
45477
|
-
theme =
|
|
43580
|
+
displayName: "SmallNavBar__MobileMenuTrigger",
|
|
43581
|
+
componentId: "ykabay-0"
|
|
43582
|
+
})(function (_ref) {
|
|
43583
|
+
var color = _ref.color,
|
|
43584
|
+
hoverColor = _ref.hoverColor,
|
|
43585
|
+
hoverBackground = _ref.hoverBackground,
|
|
43586
|
+
theme = _ref.theme;
|
|
45478
43587
|
return {
|
|
45479
43588
|
color: theme.colors[color] || color,
|
|
45480
43589
|
background: "none",
|
|
@@ -45496,11 +43605,11 @@ var MobileMenuTrigger = styled.button.withConfig({
|
|
|
45496
43605
|
};
|
|
45497
43606
|
});
|
|
45498
43607
|
var SmallHeader = styled.header.withConfig({
|
|
45499
|
-
displayName: "
|
|
45500
|
-
componentId: "
|
|
45501
|
-
})(function (
|
|
45502
|
-
var isOpen =
|
|
45503
|
-
theme =
|
|
43608
|
+
displayName: "SmallNavBar__SmallHeader",
|
|
43609
|
+
componentId: "ykabay-1"
|
|
43610
|
+
})(function (_ref2) {
|
|
43611
|
+
var isOpen = _ref2.isOpen,
|
|
43612
|
+
theme = _ref2.theme;
|
|
45504
43613
|
return isOpen ? {
|
|
45505
43614
|
position: "fixed",
|
|
45506
43615
|
width: "100%",
|
|
@@ -45515,15 +43624,11 @@ var SmallHeader = styled.header.withConfig({
|
|
|
45515
43624
|
} : null;
|
|
45516
43625
|
});
|
|
45517
43626
|
|
|
45518
|
-
var
|
|
45519
|
-
|
|
45520
|
-
};
|
|
45521
|
-
|
|
45522
|
-
var MenuIcon = function MenuIcon(_ref5) {
|
|
45523
|
-
var isOpen = _ref5.isOpen;
|
|
43627
|
+
var MenuIcon = function MenuIcon(_ref3) {
|
|
43628
|
+
var isOpen = _ref3.isOpen;
|
|
45524
43629
|
|
|
45525
|
-
var
|
|
45526
|
-
t =
|
|
43630
|
+
var _useTranslation = useTranslation(),
|
|
43631
|
+
t = _useTranslation.t;
|
|
45527
43632
|
|
|
45528
43633
|
var icon = isOpen ? "close" : "menu";
|
|
45529
43634
|
var title = isOpen ? t("close menu") : t("open menu");
|
|
@@ -45542,14 +43647,16 @@ var SmallNavBarNoState = function SmallNavBarNoState(_a) {
|
|
|
45542
43647
|
toggleMenu = _a$menuState.toggleMenu,
|
|
45543
43648
|
closeMenu = _a$menuState.closeMenu,
|
|
45544
43649
|
subtext = _a.subtext,
|
|
45545
|
-
_a$
|
|
45546
|
-
brandingLinkHref = _a$
|
|
43650
|
+
_a$brandingLinkHref = _a.brandingLinkHref,
|
|
43651
|
+
brandingLinkHref = _a$brandingLinkHref === void 0 ? "/" : _a$brandingLinkHref,
|
|
45547
43652
|
brandingLinkTo = _a.brandingLinkTo,
|
|
45548
43653
|
environment = _a.environment,
|
|
45549
43654
|
logoSrc = _a.logoSrc,
|
|
45550
43655
|
_a$breakpointLower = _a.breakpointLower,
|
|
45551
43656
|
breakpointLower = _a$breakpointLower === void 0 ? "small" : _a$breakpointLower,
|
|
45552
|
-
|
|
43657
|
+
themeColorObject = _a.themeColorObject,
|
|
43658
|
+
navBarHeight = _a.navBarHeight,
|
|
43659
|
+
props = __rest(_a, ["menuData", "menuState", "subtext", "brandingLinkHref", "brandingLinkTo", "environment", "logoSrc", "breakpointLower", "themeColorObject", "navBarHeight"]);
|
|
45553
43660
|
|
|
45554
43661
|
var navRef = React__default.useRef(null);
|
|
45555
43662
|
useEffect(function () {
|
|
@@ -45566,7 +43673,8 @@ var SmallNavBarNoState = function SmallNavBarNoState(_a) {
|
|
|
45566
43673
|
isOpen: isOpen,
|
|
45567
43674
|
breakpointLower: breakpoints ? breakpoints[breakpointLower] : breakpointLower
|
|
45568
43675
|
}, props), environment && /*#__PURE__*/React__default.createElement(EnvironmentBanner, null, environment), /*#__PURE__*/React__default.createElement(NavBarBackground, {
|
|
45569
|
-
backgroundColor: "white"
|
|
43676
|
+
backgroundColor: "white",
|
|
43677
|
+
height: navBarHeight
|
|
45570
43678
|
}, /*#__PURE__*/React__default.createElement(BrandLogoContainer, {
|
|
45571
43679
|
logoSrc: logoSrc,
|
|
45572
43680
|
brandingLinkHref: brandingLinkHref,
|
|
@@ -45598,6 +43706,68 @@ var SmallNavBarNoState = function SmallNavBarNoState(_a) {
|
|
|
45598
43706
|
|
|
45599
43707
|
var SmallNavBar = withMenuState(SmallNavBarNoState);
|
|
45600
43708
|
|
|
43709
|
+
var NAVBAR_HEIGHT = "56px";
|
|
43710
|
+
var themeColorObject = {
|
|
43711
|
+
color: "darkBlue",
|
|
43712
|
+
hoverColor: "blackBlue",
|
|
43713
|
+
background: "white",
|
|
43714
|
+
hoverBackground: "whiteGrey",
|
|
43715
|
+
textColor: "blackBlue",
|
|
43716
|
+
logoColor: "blue"
|
|
43717
|
+
};
|
|
43718
|
+
|
|
43719
|
+
var MediumNavBar = function MediumNavBar(_a) {
|
|
43720
|
+
var menuData = _a.menuData,
|
|
43721
|
+
subtext = _a.subtext,
|
|
43722
|
+
environment = _a.environment,
|
|
43723
|
+
logoSrc = _a.logoSrc,
|
|
43724
|
+
_a$brandingLinkHref = _a.brandingLinkHref,
|
|
43725
|
+
brandingLinkHref = _a$brandingLinkHref === void 0 ? "/" : _a$brandingLinkHref,
|
|
43726
|
+
brandingLinkTo = _a.brandingLinkTo,
|
|
43727
|
+
brandingLinkComponent = _a.brandingLinkComponent,
|
|
43728
|
+
props = __rest(_a, ["menuData", "subtext", "environment", "logoSrc", "brandingLinkHref", "brandingLinkTo", "brandingLinkComponent"]);
|
|
43729
|
+
|
|
43730
|
+
var _useTranslation = useTranslation(),
|
|
43731
|
+
t = _useTranslation.t;
|
|
43732
|
+
|
|
43733
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, environment && /*#__PURE__*/React__default.createElement(EnvironmentBanner, null, environment), /*#__PURE__*/React__default.createElement("header", Object.assign({}, props), /*#__PURE__*/React__default.createElement(NavBarBackground, {
|
|
43734
|
+
backgroundColor: "white",
|
|
43735
|
+
height: NAVBAR_HEIGHT
|
|
43736
|
+
}, /*#__PURE__*/React__default.createElement(BrandLogoContainer, {
|
|
43737
|
+
logoSrc: logoSrc,
|
|
43738
|
+
brandingLinkHref: brandingLinkHref,
|
|
43739
|
+
brandingLinkTo: brandingLinkTo,
|
|
43740
|
+
brandingLinkComponent: brandingLinkComponent,
|
|
43741
|
+
subtext: subtext
|
|
43742
|
+
}), /*#__PURE__*/React__default.createElement(Flex, {
|
|
43743
|
+
justifyContent: "space-between",
|
|
43744
|
+
alignContent: "flex-end",
|
|
43745
|
+
flexGrow: 1,
|
|
43746
|
+
ml: "x3",
|
|
43747
|
+
alignItems: "center"
|
|
43748
|
+
}, menuData.primaryMenu && /*#__PURE__*/React__default.createElement(DesktopMenu, {
|
|
43749
|
+
themeColorObject: themeColorObject,
|
|
43750
|
+
"aria-label": t("primary navigation"),
|
|
43751
|
+
menuData: menuData.primaryMenu
|
|
43752
|
+
}), /*#__PURE__*/React__default.createElement(Flex, {
|
|
43753
|
+
justifySelf: "flex-end",
|
|
43754
|
+
alignItems: "center"
|
|
43755
|
+
}, menuData.secondaryMenu && /*#__PURE__*/React__default.createElement(DesktopMenu, {
|
|
43756
|
+
themeColorObject: themeColorObject,
|
|
43757
|
+
"aria-label": t("secondary navigation"),
|
|
43758
|
+
menuData: menuData.secondaryMenu
|
|
43759
|
+
}), logoSrc && /*#__PURE__*/React__default.createElement(Box, {
|
|
43760
|
+
pl: "x3"
|
|
43761
|
+
}, /*#__PURE__*/React__default.createElement(NulogyLogoContainer, {
|
|
43762
|
+
height: NAVBAR_HEIGHT,
|
|
43763
|
+
subText: subtext
|
|
43764
|
+
})))))));
|
|
43765
|
+
};
|
|
43766
|
+
|
|
43767
|
+
var pixelDigitsFrom = function pixelDigitsFrom(pixelString) {
|
|
43768
|
+
return parseInt(pixelString, 10);
|
|
43769
|
+
};
|
|
43770
|
+
|
|
45601
43771
|
var SelectNavBarBasedOnWidth = function SelectNavBarBasedOnWidth(_a) {
|
|
45602
43772
|
var width = _a.width,
|
|
45603
43773
|
defaultOpen = _a.defaultOpen,
|
|
@@ -45611,7 +43781,9 @@ var SelectNavBarBasedOnWidth = function SelectNavBarBasedOnWidth(_a) {
|
|
|
45611
43781
|
} else {
|
|
45612
43782
|
return /*#__PURE__*/React__default.createElement(SmallNavBar, Object.assign({}, props, {
|
|
45613
43783
|
width: currentWidth,
|
|
45614
|
-
defaultOpen: defaultOpen
|
|
43784
|
+
defaultOpen: defaultOpen,
|
|
43785
|
+
themeColorObject: themeColorObject,
|
|
43786
|
+
navBarHeight: NAVBAR_HEIGHT
|
|
45615
43787
|
}));
|
|
45616
43788
|
}
|
|
45617
43789
|
};
|
|
@@ -45622,10 +43794,10 @@ var BaseNavBar = function BaseNavBar(_a) {
|
|
|
45622
43794
|
breakpointUpper = _a$breakpointUpper === void 0 ? "medium" : _a$breakpointUpper,
|
|
45623
43795
|
props = __rest(_a, ["environment", "breakpointUpper"]);
|
|
45624
43796
|
|
|
45625
|
-
var
|
|
45626
|
-
breakpoints =
|
|
43797
|
+
var _useTheme = useTheme(),
|
|
43798
|
+
breakpoints = _useTheme.breakpoints;
|
|
45627
43799
|
|
|
45628
|
-
return /*#__PURE__*/React__default.createElement(
|
|
43800
|
+
return /*#__PURE__*/React__default.createElement(ReactResizeDetector, {
|
|
45629
43801
|
handleWidth: true
|
|
45630
43802
|
}, /*#__PURE__*/React__default.createElement(SelectNavBarBasedOnWidth, Object.assign({
|
|
45631
43803
|
breakpointUpper: breakpoints[breakpointUpper] || breakpointUpper
|
|
@@ -45636,7 +43808,7 @@ var BaseNavBar = function BaseNavBar(_a) {
|
|
|
45636
43808
|
|
|
45637
43809
|
var NavBar = styled(BaseNavBar).withConfig({
|
|
45638
43810
|
displayName: "NavBar",
|
|
45639
|
-
componentId: "cszq6w-
|
|
43811
|
+
componentId: "cszq6w-0"
|
|
45640
43812
|
})({});
|
|
45641
43813
|
|
|
45642
43814
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -47660,7 +45832,7 @@ function classNames(prefix, state, className) {
|
|
|
47660
45832
|
|
|
47661
45833
|
var cleanValue = function cleanValue(value) {
|
|
47662
45834
|
if (Array.isArray(value)) return value.filter(Boolean);
|
|
47663
|
-
if (_typeof
|
|
45835
|
+
if (_typeof(value) === 'object' && value !== null) return [value];
|
|
47664
45836
|
return [];
|
|
47665
45837
|
}; // ==============================
|
|
47666
45838
|
// Handle Input Change
|
|
@@ -47809,9 +45981,9 @@ function isMobileDevice() {
|
|
|
47809
45981
|
|
|
47810
45982
|
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
47811
45983
|
|
|
47812
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty
|
|
45984
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
47813
45985
|
|
|
47814
|
-
function _createSuper$5(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$5(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
45986
|
+
function _createSuper$5(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$5(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
47815
45987
|
|
|
47816
45988
|
function _isNativeReflectConstruct$5() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
47817
45989
|
function getMenuPlacement(_ref) {
|
|
@@ -48000,21 +46172,21 @@ var menuCSS = function menuCSS(_ref2) {
|
|
|
48000
46172
|
colors = _ref2$theme.colors;
|
|
48001
46173
|
return _ref3 = {
|
|
48002
46174
|
label: 'menu'
|
|
48003
|
-
}, _defineProperty
|
|
46175
|
+
}, _defineProperty(_ref3, alignToControl(placement), '100%'), _defineProperty(_ref3, "backgroundColor", colors.neutral0), _defineProperty(_ref3, "borderRadius", borderRadius), _defineProperty(_ref3, "boxShadow", '0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)'), _defineProperty(_ref3, "marginBottom", spacing.menuGutter), _defineProperty(_ref3, "marginTop", spacing.menuGutter), _defineProperty(_ref3, "position", 'absolute'), _defineProperty(_ref3, "width", '100%'), _defineProperty(_ref3, "zIndex", 1), _ref3;
|
|
48004
46176
|
};
|
|
48005
46177
|
var PortalPlacementContext = /*#__PURE__*/createContext({
|
|
48006
46178
|
getPortalPlacement: null
|
|
48007
46179
|
}); // NOTE: internal only
|
|
48008
46180
|
|
|
48009
46181
|
var MenuPlacer = /*#__PURE__*/function (_Component) {
|
|
48010
|
-
_inherits
|
|
46182
|
+
_inherits(MenuPlacer, _Component);
|
|
48011
46183
|
|
|
48012
46184
|
var _super = _createSuper$5(MenuPlacer);
|
|
48013
46185
|
|
|
48014
46186
|
function MenuPlacer() {
|
|
48015
46187
|
var _this;
|
|
48016
46188
|
|
|
48017
|
-
_classCallCheck
|
|
46189
|
+
_classCallCheck(this, MenuPlacer);
|
|
48018
46190
|
|
|
48019
46191
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
48020
46192
|
args[_key] = arguments[_key];
|
|
@@ -48065,7 +46237,7 @@ var MenuPlacer = /*#__PURE__*/function (_Component) {
|
|
|
48065
46237
|
return _this;
|
|
48066
46238
|
}
|
|
48067
46239
|
|
|
48068
|
-
_createClass
|
|
46240
|
+
_createClass(MenuPlacer, [{
|
|
48069
46241
|
key: "render",
|
|
48070
46242
|
value: function render() {
|
|
48071
46243
|
var children = this.props.children;
|
|
@@ -48195,14 +46367,14 @@ var menuPortalCSS = function menuPortalCSS(_ref6) {
|
|
|
48195
46367
|
};
|
|
48196
46368
|
};
|
|
48197
46369
|
var MenuPortal = /*#__PURE__*/function (_Component2) {
|
|
48198
|
-
_inherits
|
|
46370
|
+
_inherits(MenuPortal, _Component2);
|
|
48199
46371
|
|
|
48200
46372
|
var _super2 = _createSuper$5(MenuPortal);
|
|
48201
46373
|
|
|
48202
46374
|
function MenuPortal() {
|
|
48203
46375
|
var _this2;
|
|
48204
46376
|
|
|
48205
|
-
_classCallCheck
|
|
46377
|
+
_classCallCheck(this, MenuPortal);
|
|
48206
46378
|
|
|
48207
46379
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
48208
46380
|
args[_key2] = arguments[_key2];
|
|
@@ -48227,7 +46399,7 @@ var MenuPortal = /*#__PURE__*/function (_Component2) {
|
|
|
48227
46399
|
return _this2;
|
|
48228
46400
|
}
|
|
48229
46401
|
|
|
48230
|
-
_createClass
|
|
46402
|
+
_createClass(MenuPortal, [{
|
|
48231
46403
|
key: "render",
|
|
48232
46404
|
value: function render() {
|
|
48233
46405
|
var _this$props2 = this.props,
|
|
@@ -48275,7 +46447,7 @@ function equal(a, b) {
|
|
|
48275
46447
|
// fast-deep-equal index.js 2.0.1
|
|
48276
46448
|
if (a === b) return true;
|
|
48277
46449
|
|
|
48278
|
-
if (a && b && _typeof
|
|
46450
|
+
if (a && b && _typeof(a) == 'object' && _typeof(b) == 'object') {
|
|
48279
46451
|
var arrA = isArray(a),
|
|
48280
46452
|
arrB = isArray(b),
|
|
48281
46453
|
i,
|
|
@@ -48695,7 +46867,7 @@ var Control = function Control(props) {
|
|
|
48695
46867
|
|
|
48696
46868
|
function ownKeys$1$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
48697
46869
|
|
|
48698
|
-
function _objectSpread$1$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1$1(Object(source), true).forEach(function (key) { _defineProperty
|
|
46870
|
+
function _objectSpread$1$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
48699
46871
|
var groupCSS = function groupCSS(_ref) {
|
|
48700
46872
|
var spacing = _ref.theme.spacing;
|
|
48701
46873
|
return {
|
|
@@ -48762,7 +46934,7 @@ var GroupHeading = function GroupHeading(props) {
|
|
|
48762
46934
|
|
|
48763
46935
|
function ownKeys$2$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
48764
46936
|
|
|
48765
|
-
function _objectSpread$2$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2$1(Object(source), true).forEach(function (key) { _defineProperty
|
|
46937
|
+
function _objectSpread$2$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
48766
46938
|
var inputCSS = function inputCSS(_ref) {
|
|
48767
46939
|
var isDisabled = _ref.isDisabled,
|
|
48768
46940
|
_ref$theme = _ref.theme,
|
|
@@ -48817,7 +46989,7 @@ var Input = function Input(_ref2) {
|
|
|
48817
46989
|
|
|
48818
46990
|
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
48819
46991
|
|
|
48820
|
-
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$3(Object(source), true).forEach(function (key) { _defineProperty
|
|
46992
|
+
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$3(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
48821
46993
|
var multiValueCSS = function multiValueCSS(_ref) {
|
|
48822
46994
|
var _ref$theme = _ref.theme,
|
|
48823
46995
|
spacing = _ref$theme.spacing,
|
|
@@ -49047,7 +47219,7 @@ var SingleValue = function SingleValue(props) {
|
|
|
49047
47219
|
|
|
49048
47220
|
function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
49049
47221
|
|
|
49050
|
-
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$4(Object(source), true).forEach(function (key) { _defineProperty
|
|
47222
|
+
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$4(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
49051
47223
|
var components = {
|
|
49052
47224
|
ClearIndicator: ClearIndicator,
|
|
49053
47225
|
Control: Control,
|
|
@@ -49430,7 +47602,7 @@ var stripDiacritics = function stripDiacritics(str) {
|
|
|
49430
47602
|
|
|
49431
47603
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
49432
47604
|
|
|
49433
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty
|
|
47605
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
49434
47606
|
|
|
49435
47607
|
var trimString = function trimString(str) {
|
|
49436
47608
|
return str.replace(/^\s+|\s+$/g, '');
|
|
@@ -49525,22 +47697,22 @@ function DummyInput(_ref) {
|
|
|
49525
47697
|
}));
|
|
49526
47698
|
}
|
|
49527
47699
|
|
|
49528
|
-
function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
47700
|
+
function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
49529
47701
|
|
|
49530
47702
|
function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
49531
47703
|
|
|
49532
47704
|
var NodeResolver = /*#__PURE__*/function (_Component) {
|
|
49533
|
-
_inherits
|
|
47705
|
+
_inherits(NodeResolver, _Component);
|
|
49534
47706
|
|
|
49535
47707
|
var _super = _createSuper$2(NodeResolver);
|
|
49536
47708
|
|
|
49537
47709
|
function NodeResolver() {
|
|
49538
|
-
_classCallCheck
|
|
47710
|
+
_classCallCheck(this, NodeResolver);
|
|
49539
47711
|
|
|
49540
47712
|
return _super.apply(this, arguments);
|
|
49541
47713
|
}
|
|
49542
47714
|
|
|
49543
|
-
_createClass
|
|
47715
|
+
_createClass(NodeResolver, [{
|
|
49544
47716
|
key: "componentDidMount",
|
|
49545
47717
|
value: function componentDidMount() {
|
|
49546
47718
|
this.props.innerRef(findDOMNode(this));
|
|
@@ -49592,21 +47764,21 @@ function isTouchDevice() {
|
|
|
49592
47764
|
return 'ontouchstart' in window || navigator.maxTouchPoints;
|
|
49593
47765
|
}
|
|
49594
47766
|
|
|
49595
|
-
function _createSuper$1$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1$1(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
47767
|
+
function _createSuper$1$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
49596
47768
|
|
|
49597
47769
|
function _isNativeReflectConstruct$1$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
49598
47770
|
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
49599
47771
|
var activeScrollLocks = 0;
|
|
49600
47772
|
|
|
49601
47773
|
var ScrollLock = /*#__PURE__*/function (_Component) {
|
|
49602
|
-
_inherits
|
|
47774
|
+
_inherits(ScrollLock, _Component);
|
|
49603
47775
|
|
|
49604
47776
|
var _super = _createSuper$1$1(ScrollLock);
|
|
49605
47777
|
|
|
49606
47778
|
function ScrollLock() {
|
|
49607
47779
|
var _this;
|
|
49608
47780
|
|
|
49609
|
-
_classCallCheck
|
|
47781
|
+
_classCallCheck(this, ScrollLock);
|
|
49610
47782
|
|
|
49611
47783
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
49612
47784
|
args[_key] = arguments[_key];
|
|
@@ -49621,7 +47793,7 @@ var ScrollLock = /*#__PURE__*/function (_Component) {
|
|
|
49621
47793
|
return _this;
|
|
49622
47794
|
}
|
|
49623
47795
|
|
|
49624
|
-
_createClass
|
|
47796
|
+
_createClass(ScrollLock, [{
|
|
49625
47797
|
key: "componentDidMount",
|
|
49626
47798
|
value: function componentDidMount() {
|
|
49627
47799
|
var _this2 = this;
|
|
@@ -49723,7 +47895,7 @@ ScrollLock.defaultProps = {
|
|
|
49723
47895
|
|
|
49724
47896
|
function _EMOTION_STRINGIFIED_CSS_ERROR__$1() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
49725
47897
|
|
|
49726
|
-
function _createSuper$2$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2$1(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
47898
|
+
function _createSuper$2$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
49727
47899
|
|
|
49728
47900
|
function _isNativeReflectConstruct$2$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
49729
47901
|
|
|
@@ -49742,14 +47914,14 @@ var _ref$1 = process.env.NODE_ENV === "production" ? {
|
|
|
49742
47914
|
// - createRef() https://reactjs.org/docs/react-api.html#reactcreateref
|
|
49743
47915
|
// - forwardRef() https://reactjs.org/docs/react-api.html#reactforwardref
|
|
49744
47916
|
var ScrollBlock = /*#__PURE__*/function (_PureComponent) {
|
|
49745
|
-
_inherits
|
|
47917
|
+
_inherits(ScrollBlock, _PureComponent);
|
|
49746
47918
|
|
|
49747
47919
|
var _super = _createSuper$2$1(ScrollBlock);
|
|
49748
47920
|
|
|
49749
47921
|
function ScrollBlock() {
|
|
49750
47922
|
var _this;
|
|
49751
47923
|
|
|
49752
|
-
_classCallCheck
|
|
47924
|
+
_classCallCheck(this, ScrollBlock);
|
|
49753
47925
|
|
|
49754
47926
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
49755
47927
|
args[_key] = arguments[_key];
|
|
@@ -49777,7 +47949,7 @@ var ScrollBlock = /*#__PURE__*/function (_PureComponent) {
|
|
|
49777
47949
|
return _this;
|
|
49778
47950
|
}
|
|
49779
47951
|
|
|
49780
|
-
_createClass
|
|
47952
|
+
_createClass(ScrollBlock, [{
|
|
49781
47953
|
key: "render",
|
|
49782
47954
|
value: function render() {
|
|
49783
47955
|
var _this$props = this.props,
|
|
@@ -49813,19 +47985,19 @@ var ScrollBlock = /*#__PURE__*/function (_PureComponent) {
|
|
|
49813
47985
|
return ScrollBlock;
|
|
49814
47986
|
}(PureComponent);
|
|
49815
47987
|
|
|
49816
|
-
function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
47988
|
+
function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
49817
47989
|
|
|
49818
47990
|
function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
49819
47991
|
|
|
49820
47992
|
var ScrollCaptor = /*#__PURE__*/function (_Component) {
|
|
49821
|
-
_inherits
|
|
47993
|
+
_inherits(ScrollCaptor, _Component);
|
|
49822
47994
|
|
|
49823
47995
|
var _super = _createSuper$3(ScrollCaptor);
|
|
49824
47996
|
|
|
49825
47997
|
function ScrollCaptor() {
|
|
49826
47998
|
var _this;
|
|
49827
47999
|
|
|
49828
|
-
_classCallCheck
|
|
48000
|
+
_classCallCheck(this, ScrollCaptor);
|
|
49829
48001
|
|
|
49830
48002
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
49831
48003
|
args[_key] = arguments[_key];
|
|
@@ -49914,7 +48086,7 @@ var ScrollCaptor = /*#__PURE__*/function (_Component) {
|
|
|
49914
48086
|
return _this;
|
|
49915
48087
|
}
|
|
49916
48088
|
|
|
49917
|
-
_createClass
|
|
48089
|
+
_createClass(ScrollCaptor, [{
|
|
49918
48090
|
key: "componentDidMount",
|
|
49919
48091
|
value: function componentDidMount() {
|
|
49920
48092
|
this.startListening(this.scrollTarget);
|
|
@@ -50107,9 +48279,9 @@ var defaultTheme = {
|
|
|
50107
48279
|
|
|
50108
48280
|
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
50109
48281
|
|
|
50110
|
-
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(Object(source), true).forEach(function (key) { _defineProperty
|
|
48282
|
+
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
50111
48283
|
|
|
50112
|
-
function _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
48284
|
+
function _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
50113
48285
|
|
|
50114
48286
|
function _isNativeReflectConstruct$4() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
50115
48287
|
var defaultProps$2 = {
|
|
@@ -50160,7 +48332,7 @@ var defaultProps$2 = {
|
|
|
50160
48332
|
var instanceId = 1;
|
|
50161
48333
|
|
|
50162
48334
|
var Select = /*#__PURE__*/function (_Component) {
|
|
50163
|
-
_inherits
|
|
48335
|
+
_inherits(Select, _Component);
|
|
50164
48336
|
|
|
50165
48337
|
var _super = _createSuper$4(Select);
|
|
50166
48338
|
|
|
@@ -50174,7 +48346,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
50174
48346
|
function Select(_props) {
|
|
50175
48347
|
var _this;
|
|
50176
48348
|
|
|
50177
|
-
_classCallCheck
|
|
48349
|
+
_classCallCheck(this, Select);
|
|
50178
48350
|
|
|
50179
48351
|
_this = _super.call(this, _props);
|
|
50180
48352
|
_this.state = {
|
|
@@ -50961,7 +49133,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
50961
49133
|
};
|
|
50962
49134
|
|
|
50963
49135
|
var _value = _props.value;
|
|
50964
|
-
_this.cacheComponents = memoizeOne(_this.cacheComponents, exportedEqual).bind(_assertThisInitialized$
|
|
49136
|
+
_this.cacheComponents = memoizeOne(_this.cacheComponents, exportedEqual).bind(_assertThisInitialized$1(_this));
|
|
50965
49137
|
|
|
50966
49138
|
_this.cacheComponents(_props.components);
|
|
50967
49139
|
|
|
@@ -50981,7 +49153,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
50981
49153
|
lastSelectValue = _ref9[1];
|
|
50982
49154
|
|
|
50983
49155
|
return newSelectValue === lastSelectValue && newProps.inputValue === lastProps.inputValue && newProps.options === lastProps.options;
|
|
50984
|
-
}).bind(_assertThisInitialized$
|
|
49156
|
+
}).bind(_assertThisInitialized$1(_this));
|
|
50985
49157
|
|
|
50986
49158
|
var _menuOptions = _props.menuIsOpen ? _this.buildMenuOptions(_props, _selectValue) : {
|
|
50987
49159
|
render: [],
|
|
@@ -50993,7 +49165,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
50993
49165
|
return _this;
|
|
50994
49166
|
}
|
|
50995
49167
|
|
|
50996
|
-
_createClass
|
|
49168
|
+
_createClass(Select, [{
|
|
50997
49169
|
key: "componentDidMount",
|
|
50998
49170
|
value: function componentDidMount() {
|
|
50999
49171
|
this.startListeningComposition();
|
|
@@ -51962,7 +50134,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
51962
50134
|
|
|
51963
50135
|
Select.defaultProps = defaultProps$2;
|
|
51964
50136
|
|
|
51965
|
-
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
50137
|
+
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
51966
50138
|
|
|
51967
50139
|
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
51968
50140
|
var defaultProps$1 = {
|
|
@@ -51975,14 +50147,14 @@ var manageState = function manageState(SelectComponent) {
|
|
|
51975
50147
|
var _class, _temp;
|
|
51976
50148
|
|
|
51977
50149
|
return _temp = _class = /*#__PURE__*/function (_Component) {
|
|
51978
|
-
_inherits
|
|
50150
|
+
_inherits(StateManager, _Component);
|
|
51979
50151
|
|
|
51980
50152
|
var _super = _createSuper$1(StateManager);
|
|
51981
50153
|
|
|
51982
50154
|
function StateManager() {
|
|
51983
50155
|
var _this;
|
|
51984
50156
|
|
|
51985
|
-
_classCallCheck
|
|
50157
|
+
_classCallCheck(this, StateManager);
|
|
51986
50158
|
|
|
51987
50159
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
51988
50160
|
args[_key] = arguments[_key];
|
|
@@ -52033,7 +50205,7 @@ var manageState = function manageState(SelectComponent) {
|
|
|
52033
50205
|
return _this;
|
|
52034
50206
|
}
|
|
52035
50207
|
|
|
52036
|
-
_createClass
|
|
50208
|
+
_createClass(StateManager, [{
|
|
52037
50209
|
key: "focus",
|
|
52038
50210
|
value: function focus() {
|
|
52039
50211
|
this.select.focus();
|
|
@@ -52093,7 +50265,7 @@ var manageState = function manageState(SelectComponent) {
|
|
|
52093
50265
|
}(Component$1), _class.defaultProps = defaultProps$1, _temp;
|
|
52094
50266
|
};
|
|
52095
50267
|
|
|
52096
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf
|
|
50268
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
52097
50269
|
|
|
52098
50270
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
52099
50271
|
var defaultProps = {
|
|
@@ -52106,14 +50278,14 @@ var makeAsyncSelect = function makeAsyncSelect(SelectComponent) {
|
|
|
52106
50278
|
var _class, _temp;
|
|
52107
50279
|
|
|
52108
50280
|
return _temp = _class = /*#__PURE__*/function (_Component) {
|
|
52109
|
-
_inherits
|
|
50281
|
+
_inherits(Async, _Component);
|
|
52110
50282
|
|
|
52111
50283
|
var _super = _createSuper(Async);
|
|
52112
50284
|
|
|
52113
50285
|
function Async(props) {
|
|
52114
50286
|
var _this;
|
|
52115
50287
|
|
|
52116
|
-
_classCallCheck
|
|
50288
|
+
_classCallCheck(this, Async);
|
|
52117
50289
|
|
|
52118
50290
|
_this = _super.call(this);
|
|
52119
50291
|
_this.select = void 0;
|
|
@@ -52191,7 +50363,7 @@ var makeAsyncSelect = function makeAsyncSelect(SelectComponent) {
|
|
|
52191
50363
|
return _this;
|
|
52192
50364
|
}
|
|
52193
50365
|
|
|
52194
|
-
_createClass
|
|
50366
|
+
_createClass(Async, [{
|
|
52195
50367
|
key: "componentDidMount",
|
|
52196
50368
|
value: function componentDidMount() {
|
|
52197
50369
|
var _this2 = this;
|
|
@@ -52733,4 +50905,4 @@ var SortingTable = function SortingTable(_a) {
|
|
|
52733
50905
|
}, props));
|
|
52734
50906
|
};
|
|
52735
50907
|
|
|
52736
|
-
export { ALL_NDS_LOCALES, Alert, AnimatedBox, ApplicationFrame, AsyncSelect, Box, NavBar as BrandedNavBar, Branding, Breadcrumbs, Button, ButtonGroup, Card, CardSet, Checkbox, CheckboxGroup, ControlIcon, DangerButton, DatePicker, DateRange, Divider, DropdownButton, DropdownItem, DropdownLink, DropdownMenu, DropdownText, Field, FieldLabel, Fieldset, Flex, Form, FormSection, Heading1, Heading2, Heading3, Heading4, HelpText, Icon, IconicButton, InlineIcon, InlineValidation, Input$1 as Input, Link, List, ListItem, LoadingAnimation, Modal, NDSProvider, NavBar$1 as NavBar, Overlay, Page, Pagination, PrimaryButton, QuietButton, Radio, RadioGroup, RangeContainer, RequirementText, ReactSelect as Select, SelectClearIndicator, SelectContainer$1 as SelectContainer, SelectControl, SelectDropdownIndicator, SelectInput, SelectMenu, SelectMultiValue, SelectOption, Sidebar, SortingTable, StatusIndicator, Switch, Switcher, Tab, Table, Tabs, Text, Textarea, TimePicker, TimeRange, Toast, ToggleComponent as Toggle, Tooltip, TruncatedText, addStyledProps, Theme as theme, useWindowDimensions };
|
|
50908
|
+
export { ALL_NDS_LOCALES, Alert, AnimatedBox, ApplicationFrame, AsyncSelect, Box, BrandLogoContainer, NavBar as BrandedNavBar, Branding, Breadcrumbs, Button, ButtonGroup, Card, CardSet, Checkbox, CheckboxGroup, ControlIcon, DangerButton, DatePicker, DateRange, DesktopMenu, Divider, DropdownButton, DropdownItem, DropdownLink, DropdownMenu, DropdownText, EnvironmentBanner, Field, FieldLabel, Fieldset, Flex, Form, FormSection, Heading1, Heading2, Heading3, Heading4, HelpText, Icon, IconicButton, InlineIcon, InlineValidation, Input$1 as Input, Link, List, ListItem, LoadingAnimation, MenuTrigger, Modal, NDSProvider, NavBar$1 as NavBar, NavBarBackground, Overlay, Page, Pagination, PrimaryButton, QuietButton, Radio, RadioGroup, RangeContainer, RequirementText, ReactSelect as Select, SelectClearIndicator, SelectContainer$1 as SelectContainer, SelectControl, SelectDropdownIndicator, SelectInput, SelectMenu, SelectMultiValue, SelectOption, Sidebar, SmallNavBar, SortingTable, StatusIndicator, Switch, Switcher, Tab, Table, Tabs, Text, Textarea, TimePicker, TimeRange, Toast, ToggleComponent as Toggle, Tooltip, TruncatedText, addStyledProps, Theme as theme, useWindowDimensions };
|