@helpdice/ui 1.4.9 → 1.5.1
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/CircularProgress/index.js +6 -6
- package/dist/Placeholder/index.js +41 -41
- package/dist/auto-complete/index.js +60 -60
- package/dist/avatar/index.js +28 -28
- package/dist/badge/index.js +27 -27
- package/dist/breadcrumbs/index.js +34 -34
- package/dist/button/button.compact.d.ts +2 -2
- package/dist/button/index.js +46 -45
- package/dist/button-dropdown/index.js +34 -34
- package/dist/button-group/index.js +25 -25
- package/dist/capacity/index.js +26 -26
- package/dist/card/index.js +44 -44
- package/dist/checkbox/index.js +30 -30
- package/dist/code/index.js +27 -27
- package/dist/col/index.js +8 -8
- package/dist/collapse/index.js +30 -30
- package/dist/css-baseline/index.js +6 -6
- package/dist/description/index.js +26 -26
- package/dist/display/index.js +26 -26
- package/dist/divider/index.js +26 -26
- package/dist/dot/index.js +25 -25
- package/dist/drawer/index.js +53 -53
- package/dist/fieldset/index.js +33 -33
- package/dist/form/FormWrapper.d.ts +7 -7
- package/dist/form/connect.d.ts +1 -0
- package/dist/grid/index.js +33 -33
- package/dist/html-renderer/index.d.ts +6 -0
- package/dist/image/index.js +37 -37
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1899 -547
- package/dist/input/index.js +40 -40
- package/dist/keyboard/index.js +28 -28
- package/dist/link/index.js +29 -29
- package/dist/loading/index.js +26 -26
- package/dist/modal/index.js +75 -75
- package/dist/note/index.js +27 -27
- package/dist/page/index.js +30 -30
- package/dist/pagination/index.js +27 -27
- package/dist/popover/index.js +57 -57
- package/dist/progress/index.js +29 -29
- package/dist/radio/index.js +30 -30
- package/dist/rating/index.js +29 -29
- package/dist/row/index.js +11 -11
- package/dist/search-bar/index.js +1826 -61
- package/dist/select/index.js +60 -60
- package/dist/slider/index.js +35 -35
- package/dist/snippet/index.js +30 -30
- package/dist/spacer/index.js +25 -25
- package/dist/spinner/index.js +24 -24
- package/dist/table/index.js +224 -211
- package/dist/tabs/index.js +39 -39
- package/dist/tag/index.js +26 -26
- package/dist/text/index.js +40 -40
- package/dist/textarea/index.js +29 -29
- package/dist/themes/index.js +2 -2
- package/dist/toggle/index.js +27 -27
- package/dist/tooltip/index.js +42 -42
- package/dist/tree/index.js +23 -23
- package/dist/ui-provider/index.js +48 -48
- package/dist/use-all-themes/index.js +2 -2
- package/dist/use-body-scroll/index.js +5 -5
- package/dist/use-clipboard/index.js +1 -1
- package/dist/use-current-state/index.js +1 -1
- package/dist/use-input/index.js +1 -1
- package/dist/use-keyboard/index.js +5 -5
- package/dist/use-media-query/index.js +5 -5
- package/dist/use-modal/index.js +1 -1
- package/dist/use-scale/index.js +19 -19
- package/dist/use-tabs/index.js +1 -1
- package/dist/use-theme/index.js +2 -2
- package/dist/use-toasts/index.js +3 -3
- package/dist/user/index.js +36 -36
- package/esm/button/button.compact.d.ts +2 -2
- package/esm/button/button.compact.js +4 -2
- package/esm/form/FastField.js +1 -1
- package/esm/form/FormWrapper.d.ts +7 -7
- package/esm/form/FormWrapper.js +2 -2
- package/esm/form/connect.d.ts +1 -0
- package/esm/form/connect.js +2 -1
- package/esm/html-renderer/index.d.ts +6 -0
- package/esm/html-renderer/index.js +12 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/link/link.js +2 -0
- package/esm/login-with/LoginSocialAmazon/index.js +162 -134
- package/esm/login-with/index.js +2 -0
- package/esm/search-bar/components/index.js +4 -7
- package/esm/table/data-table.js +6 -4
- package/esm/table/table.js +12 -1
- package/package.json +5 -3
- package/esm/formik-native/src/index.js +0 -12
- package/esm/formik-native/test/blah.test.js +0 -5
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ function _arrayWithoutHoles(r) {
|
|
|
36
36
|
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
37
37
|
}
|
|
38
38
|
function _assertThisInitialized(e) {
|
|
39
|
-
if (
|
|
39
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
40
40
|
return e;
|
|
41
41
|
}
|
|
42
42
|
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
@@ -60,7 +60,7 @@ function _asyncToGenerator(n) {
|
|
|
60
60
|
function _throw(n) {
|
|
61
61
|
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
62
62
|
}
|
|
63
|
-
_next(
|
|
63
|
+
_next(void 0);
|
|
64
64
|
});
|
|
65
65
|
};
|
|
66
66
|
}
|
|
@@ -250,7 +250,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
250
250
|
}
|
|
251
251
|
function _possibleConstructorReturn(t, e) {
|
|
252
252
|
if (e && ("object" == typeof e || "function" == typeof e)) return e;
|
|
253
|
-
if (
|
|
253
|
+
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
|
|
254
254
|
return _assertThisInitialized(t);
|
|
255
255
|
}
|
|
256
256
|
function _regeneratorRuntime() {
|
|
@@ -453,7 +453,7 @@ function _regeneratorRuntime() {
|
|
|
453
453
|
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
454
454
|
return this;
|
|
455
455
|
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
456
|
-
|
|
456
|
+
void 0 === i && (i = Promise);
|
|
457
457
|
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
458
458
|
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
459
459
|
return t.done ? t.value : a.next();
|
|
@@ -568,8 +568,8 @@ function _toConsumableArray(r) {
|
|
|
568
568
|
function _toPrimitive(t, r) {
|
|
569
569
|
if ("object" != typeof t || !t) return t;
|
|
570
570
|
var e = t[Symbol.toPrimitive];
|
|
571
|
-
if (
|
|
572
|
-
var i = e.call(t, r
|
|
571
|
+
if (void 0 !== e) {
|
|
572
|
+
var i = e.call(t, r);
|
|
573
573
|
if ("object" != typeof i) return i;
|
|
574
574
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
575
575
|
}
|
|
@@ -592,7 +592,7 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
592
592
|
if (r) {
|
|
593
593
|
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
594
594
|
var t = {}.toString.call(r).slice(8, -1);
|
|
595
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) :
|
|
595
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
598
|
|
|
@@ -628,7 +628,7 @@ function requireIndex () {
|
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
630
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
631
|
-
_defineProperties(Constructor.prototype, protoProps);
|
|
631
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
632
632
|
return Constructor;
|
|
633
633
|
}
|
|
634
634
|
var isProd = typeof process !== "undefined" && process.env && process.env.NODE_ENV === "production";
|
|
@@ -637,7 +637,7 @@ function requireIndex () {
|
|
|
637
637
|
};
|
|
638
638
|
var StyleSheet = /*#__PURE__*/ function() {
|
|
639
639
|
function StyleSheet(param) {
|
|
640
|
-
var ref = param ===
|
|
640
|
+
var ref = param === void 0 ? {} : param, _name = ref.name, name = _name === void 0 ? "stylesheet" : _name, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? isProd : _optimizeForSpeed;
|
|
641
641
|
invariant$1(isString(name), "`name` must be a string");
|
|
642
642
|
this._name = name;
|
|
643
643
|
this._deletedRulePlaceholder = "#" + name + "-deleted-rule____{}";
|
|
@@ -895,7 +895,7 @@ function requireIndex () {
|
|
|
895
895
|
}
|
|
896
896
|
|
|
897
897
|
function mapRulesToStyle(cssRules, options) {
|
|
898
|
-
if (options ===
|
|
898
|
+
if (options === void 0) options = {};
|
|
899
899
|
return cssRules.map(function(args) {
|
|
900
900
|
var id = args[0];
|
|
901
901
|
var css = args[1];
|
|
@@ -912,7 +912,7 @@ function requireIndex () {
|
|
|
912
912
|
}
|
|
913
913
|
var StyleSheetRegistry = /*#__PURE__*/ function() {
|
|
914
914
|
function StyleSheetRegistry(param) {
|
|
915
|
-
var ref = param ===
|
|
915
|
+
var ref = param === void 0 ? {} : param, _styleSheet = ref.styleSheet, styleSheet = _styleSheet === void 0 ? null : _styleSheet, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? false : _optimizeForSpeed;
|
|
916
916
|
this._sheet = styleSheet || new StyleSheet({
|
|
917
917
|
name: "styled-jsx",
|
|
918
918
|
optimizeForSpeed: optimizeForSpeed
|
|
@@ -1340,17 +1340,17 @@ var hasUserCustomTheme = function hasUserCustomTheme() {
|
|
|
1340
1340
|
return isAvailableThemeType(item.type);
|
|
1341
1341
|
});
|
|
1342
1342
|
};
|
|
1343
|
-
var create = function create(base, custom) {
|
|
1343
|
+
var create$1 = function create(base, custom) {
|
|
1344
1344
|
if (!isAvailableThemeType(custom.type)) {
|
|
1345
1345
|
throw new Error('Duplicate or unavailable theme type');
|
|
1346
1346
|
}
|
|
1347
1347
|
return _deepDuplicable(base, custom);
|
|
1348
1348
|
};
|
|
1349
1349
|
var createFromDark = function createFromDark(custom) {
|
|
1350
|
-
return create(themes, custom);
|
|
1350
|
+
return create$1(themes, custom);
|
|
1351
1351
|
};
|
|
1352
1352
|
var createFromLight = function createFromLight(custom) {
|
|
1353
|
-
return create(themes$1, custom);
|
|
1353
|
+
return create$1(themes$1, custom);
|
|
1354
1354
|
};
|
|
1355
1355
|
var Themes = {
|
|
1356
1356
|
isPresetTheme: isPresetTheme,
|
|
@@ -1358,7 +1358,7 @@ var Themes = {
|
|
|
1358
1358
|
hasUserCustomTheme: hasUserCustomTheme,
|
|
1359
1359
|
getPresets: getPresets,
|
|
1360
1360
|
getPresetStaticTheme: getPresetStaticTheme,
|
|
1361
|
-
create: create,
|
|
1361
|
+
create: create$1,
|
|
1362
1362
|
createFromDark: createFromDark,
|
|
1363
1363
|
createFromLight: createFromLight
|
|
1364
1364
|
};
|
|
@@ -1400,7 +1400,7 @@ var InputBlockLabel = /*#__PURE__*/React$1.memo(InputBlockLabelComponent);
|
|
|
1400
1400
|
var InputIconComponent = function InputIconComponent(_ref) {
|
|
1401
1401
|
var icon = _ref.icon,
|
|
1402
1402
|
_ref$clickable = _ref.clickable,
|
|
1403
|
-
clickable = _ref$clickable ===
|
|
1403
|
+
clickable = _ref$clickable === void 0 ? false : _ref$clickable,
|
|
1404
1404
|
onClick = _ref.onClick;
|
|
1405
1405
|
return /*#__PURE__*/React$1.createElement("span", {
|
|
1406
1406
|
onClick: onClick,
|
|
@@ -1660,7 +1660,7 @@ var isChildElement = function isChildElement(parent, child) {
|
|
|
1660
1660
|
};
|
|
1661
1661
|
var isGeistElement = function isGeistElement(el) {
|
|
1662
1662
|
if (!el) return false;
|
|
1663
|
-
if (el !== null && el !==
|
|
1663
|
+
if (el !== null && el !== void 0 && el.dataset && el !== null && el !== void 0 && el.dataset['helpdice']) return true;
|
|
1664
1664
|
el.attributes.getNamedItem('data-helpdice');
|
|
1665
1665
|
return !!el.attributes.getNamedItem('data-helpdice');
|
|
1666
1666
|
};
|
|
@@ -1762,9 +1762,9 @@ var withScale = function withScale(Render) {
|
|
|
1762
1762
|
margin = props.margin,
|
|
1763
1763
|
padding = props.padding,
|
|
1764
1764
|
_props$unit = props.unit,
|
|
1765
|
-
unit = _props$unit ===
|
|
1765
|
+
unit = _props$unit === void 0 ? layout.unit : _props$unit,
|
|
1766
1766
|
_props$scale = props.scale,
|
|
1767
|
-
scale = _props$scale ===
|
|
1767
|
+
scale = _props$scale === void 0 ? 1 : _props$scale;
|
|
1768
1768
|
var makeScaleHandler = function makeScaleHandler(attrValue) {
|
|
1769
1769
|
return function (scale1x, defaultValue) {
|
|
1770
1770
|
// 0 means disable scale and the default value is 0
|
|
@@ -1785,20 +1785,20 @@ var withScale = function withScale(Render) {
|
|
|
1785
1785
|
var value = {
|
|
1786
1786
|
unit: unit,
|
|
1787
1787
|
SCALES: {
|
|
1788
|
-
pt: makeScaleHandler((_ref2 = (_ref3 = paddingTop !== null && paddingTop !==
|
|
1789
|
-
pr: makeScaleHandler((_ref4 = (_ref5 = paddingRight !== null && paddingRight !==
|
|
1790
|
-
pb: makeScaleHandler((_ref6 = (_ref7 = paddingBottom !== null && paddingBottom !==
|
|
1791
|
-
pl: makeScaleHandler((_ref8 = (_ref9 = paddingLeft !== null && paddingLeft !==
|
|
1792
|
-
px: makeScaleHandler((_ref10 = (_ref11 = (_ref12 = (_ref13 = px !== null && px !==
|
|
1793
|
-
py: makeScaleHandler((_ref14 = (_ref15 = (_ref16 = (_ref17 = py !== null && py !==
|
|
1794
|
-
mt: makeScaleHandler((_ref18 = (_ref19 = marginTop !== null && marginTop !==
|
|
1795
|
-
mr: makeScaleHandler((_ref20 = (_ref21 = marginRight !== null && marginRight !==
|
|
1796
|
-
mb: makeScaleHandler((_ref22 = (_ref23 = marginBottom !== null && marginBottom !==
|
|
1797
|
-
ml: makeScaleHandler((_ref24 = (_ref25 = marginLeft !== null && marginLeft !==
|
|
1798
|
-
mx: makeScaleHandler((_ref26 = (_ref27 = (_ref28 = (_ref29 = mx !== null && mx !==
|
|
1799
|
-
my: makeScaleHandler((_ref30 = (_ref31 = (_ref32 = (_ref33 = my !== null && my !==
|
|
1800
|
-
width: makeScaleHandler(width !== null && width !==
|
|
1801
|
-
height: makeScaleHandler(height !== null && height !==
|
|
1788
|
+
pt: makeScaleHandler((_ref2 = (_ref3 = paddingTop !== null && paddingTop !== void 0 ? paddingTop : pt) !== null && _ref3 !== void 0 ? _ref3 : py) !== null && _ref2 !== void 0 ? _ref2 : padding),
|
|
1789
|
+
pr: makeScaleHandler((_ref4 = (_ref5 = paddingRight !== null && paddingRight !== void 0 ? paddingRight : pr) !== null && _ref5 !== void 0 ? _ref5 : px) !== null && _ref4 !== void 0 ? _ref4 : padding),
|
|
1790
|
+
pb: makeScaleHandler((_ref6 = (_ref7 = paddingBottom !== null && paddingBottom !== void 0 ? paddingBottom : pb) !== null && _ref7 !== void 0 ? _ref7 : py) !== null && _ref6 !== void 0 ? _ref6 : padding),
|
|
1791
|
+
pl: makeScaleHandler((_ref8 = (_ref9 = paddingLeft !== null && paddingLeft !== void 0 ? paddingLeft : pl) !== null && _ref9 !== void 0 ? _ref9 : px) !== null && _ref8 !== void 0 ? _ref8 : padding),
|
|
1792
|
+
px: makeScaleHandler((_ref10 = (_ref11 = (_ref12 = (_ref13 = px !== null && px !== void 0 ? px : paddingLeft) !== null && _ref13 !== void 0 ? _ref13 : paddingRight) !== null && _ref12 !== void 0 ? _ref12 : pl) !== null && _ref11 !== void 0 ? _ref11 : pr) !== null && _ref10 !== void 0 ? _ref10 : padding),
|
|
1793
|
+
py: makeScaleHandler((_ref14 = (_ref15 = (_ref16 = (_ref17 = py !== null && py !== void 0 ? py : paddingTop) !== null && _ref17 !== void 0 ? _ref17 : paddingBottom) !== null && _ref16 !== void 0 ? _ref16 : pt) !== null && _ref15 !== void 0 ? _ref15 : pb) !== null && _ref14 !== void 0 ? _ref14 : padding),
|
|
1794
|
+
mt: makeScaleHandler((_ref18 = (_ref19 = marginTop !== null && marginTop !== void 0 ? marginTop : mt) !== null && _ref19 !== void 0 ? _ref19 : my) !== null && _ref18 !== void 0 ? _ref18 : margin),
|
|
1795
|
+
mr: makeScaleHandler((_ref20 = (_ref21 = marginRight !== null && marginRight !== void 0 ? marginRight : mr) !== null && _ref21 !== void 0 ? _ref21 : mx) !== null && _ref20 !== void 0 ? _ref20 : margin),
|
|
1796
|
+
mb: makeScaleHandler((_ref22 = (_ref23 = marginBottom !== null && marginBottom !== void 0 ? marginBottom : mb) !== null && _ref23 !== void 0 ? _ref23 : my) !== null && _ref22 !== void 0 ? _ref22 : margin),
|
|
1797
|
+
ml: makeScaleHandler((_ref24 = (_ref25 = marginLeft !== null && marginLeft !== void 0 ? marginLeft : ml) !== null && _ref25 !== void 0 ? _ref25 : mx) !== null && _ref24 !== void 0 ? _ref24 : margin),
|
|
1798
|
+
mx: makeScaleHandler((_ref26 = (_ref27 = (_ref28 = (_ref29 = mx !== null && mx !== void 0 ? mx : marginLeft) !== null && _ref29 !== void 0 ? _ref29 : marginRight) !== null && _ref28 !== void 0 ? _ref28 : ml) !== null && _ref27 !== void 0 ? _ref27 : mr) !== null && _ref26 !== void 0 ? _ref26 : margin),
|
|
1799
|
+
my: makeScaleHandler((_ref30 = (_ref31 = (_ref32 = (_ref33 = my !== null && my !== void 0 ? my : marginTop) !== null && _ref33 !== void 0 ? _ref33 : marginBottom) !== null && _ref32 !== void 0 ? _ref32 : mt) !== null && _ref31 !== void 0 ? _ref31 : mb) !== null && _ref30 !== void 0 ? _ref30 : margin),
|
|
1800
|
+
width: makeScaleHandler(width !== null && width !== void 0 ? width : w),
|
|
1801
|
+
height: makeScaleHandler(height !== null && height !== void 0 ? height : h),
|
|
1802
1802
|
font: makeScaleHandler(font)
|
|
1803
1803
|
},
|
|
1804
1804
|
getScaleProps: generateGetScaleProps(props),
|
|
@@ -1825,35 +1825,35 @@ var InputComponent = /*#__PURE__*/React$1.forwardRef(function (_ref, ref) {
|
|
|
1825
1825
|
var label = _ref.label,
|
|
1826
1826
|
labelRight = _ref.labelRight,
|
|
1827
1827
|
_ref$type = _ref.type,
|
|
1828
|
-
type = _ref$type ===
|
|
1828
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
1829
1829
|
error = _ref.error,
|
|
1830
1830
|
_ref$htmlType = _ref.htmlType,
|
|
1831
|
-
htmlType = _ref$htmlType ===
|
|
1831
|
+
htmlType = _ref$htmlType === void 0 ? 'text' : _ref$htmlType,
|
|
1832
1832
|
icon = _ref.icon,
|
|
1833
1833
|
iconRight = _ref.iconRight,
|
|
1834
1834
|
_ref$iconClickable = _ref.iconClickable,
|
|
1835
|
-
iconClickable = _ref$iconClickable ===
|
|
1835
|
+
iconClickable = _ref$iconClickable === void 0 ? false : _ref$iconClickable,
|
|
1836
1836
|
onIconClick = _ref.onIconClick,
|
|
1837
1837
|
_ref$initialValue = _ref.initialValue,
|
|
1838
|
-
initialValue = _ref$initialValue ===
|
|
1838
|
+
initialValue = _ref$initialValue === void 0 ? '' : _ref$initialValue,
|
|
1839
1839
|
onChange = _ref.onChange,
|
|
1840
1840
|
_ref$readOnly = _ref.readOnly,
|
|
1841
|
-
readOnly = _ref$readOnly ===
|
|
1841
|
+
readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
|
|
1842
1842
|
value = _ref.value,
|
|
1843
1843
|
onClearClick = _ref.onClearClick,
|
|
1844
1844
|
_ref$clearable = _ref.clearable,
|
|
1845
|
-
clearable = _ref$clearable ===
|
|
1845
|
+
clearable = _ref$clearable === void 0 ? false : _ref$clearable,
|
|
1846
1846
|
_ref$className = _ref.className,
|
|
1847
|
-
className = _ref$className ===
|
|
1847
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
1848
1848
|
onBlur = _ref.onBlur,
|
|
1849
1849
|
onFocus = _ref.onFocus,
|
|
1850
1850
|
_ref$autoComplete = _ref.autoComplete,
|
|
1851
|
-
autoComplete = _ref$autoComplete ===
|
|
1851
|
+
autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete,
|
|
1852
1852
|
_ref$placeholder = _ref.placeholder,
|
|
1853
|
-
placeholder = _ref$placeholder ===
|
|
1853
|
+
placeholder = _ref$placeholder === void 0 ? '' : _ref$placeholder,
|
|
1854
1854
|
children = _ref.children,
|
|
1855
1855
|
_ref$disabled = _ref.disabled,
|
|
1856
|
-
disabled = _ref$disabled ===
|
|
1856
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
1857
1857
|
props = _objectWithoutProperties(_ref, _excluded$1o);
|
|
1858
1858
|
var theme = useTheme();
|
|
1859
1859
|
var _useScale = useScale(),
|
|
@@ -2006,22 +2006,22 @@ var _excluded$1n = ["type", "disabled", "readOnly", "onFocus", "onBlur", "classN
|
|
|
2006
2006
|
tuple('none', 'both', 'horizontal', 'vertical', 'initial', 'inherit');
|
|
2007
2007
|
var TextareaComponent = /*#__PURE__*/React$1.forwardRef(function (_ref, ref) {
|
|
2008
2008
|
var _ref$type = _ref.type,
|
|
2009
|
-
type = _ref$type ===
|
|
2009
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
2010
2010
|
_ref$disabled = _ref.disabled,
|
|
2011
|
-
disabled = _ref$disabled ===
|
|
2011
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
2012
2012
|
_ref$readOnly = _ref.readOnly,
|
|
2013
|
-
readOnly = _ref$readOnly ===
|
|
2013
|
+
readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
|
|
2014
2014
|
onFocus = _ref.onFocus,
|
|
2015
2015
|
onBlur = _ref.onBlur,
|
|
2016
2016
|
_ref$className = _ref.className,
|
|
2017
|
-
className = _ref$className ===
|
|
2017
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
2018
2018
|
_ref$initialValue = _ref.initialValue,
|
|
2019
|
-
initialValue = _ref$initialValue ===
|
|
2019
|
+
initialValue = _ref$initialValue === void 0 ? '' : _ref$initialValue,
|
|
2020
2020
|
onChange = _ref.onChange,
|
|
2021
2021
|
value = _ref.value,
|
|
2022
2022
|
placeholder = _ref.placeholder,
|
|
2023
2023
|
_ref$resize = _ref.resize,
|
|
2024
|
-
resize = _ref$resize ===
|
|
2024
|
+
resize = _ref$resize === void 0 ? 'none' : _ref$resize,
|
|
2025
2025
|
props = _objectWithoutProperties(_ref, _excluded$1n);
|
|
2026
2026
|
var theme = useTheme();
|
|
2027
2027
|
var _useScale = useScale(),
|
|
@@ -2292,17 +2292,17 @@ var _excluded$1l = ["children", "className", "visible", "enterTime", "leaveTime"
|
|
|
2292
2292
|
var CssTransition = function CssTransition(_ref) {
|
|
2293
2293
|
var children = _ref.children,
|
|
2294
2294
|
_ref$className = _ref.className,
|
|
2295
|
-
className = _ref$className ===
|
|
2295
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
2296
2296
|
_ref$visible = _ref.visible,
|
|
2297
|
-
visible = _ref$visible ===
|
|
2297
|
+
visible = _ref$visible === void 0 ? false : _ref$visible,
|
|
2298
2298
|
_ref$enterTime = _ref.enterTime,
|
|
2299
|
-
enterTime = _ref$enterTime ===
|
|
2299
|
+
enterTime = _ref$enterTime === void 0 ? 60 : _ref$enterTime,
|
|
2300
2300
|
_ref$leaveTime = _ref.leaveTime,
|
|
2301
|
-
leaveTime = _ref$leaveTime ===
|
|
2301
|
+
leaveTime = _ref$leaveTime === void 0 ? 60 : _ref$leaveTime,
|
|
2302
2302
|
_ref$clearTime = _ref.clearTime,
|
|
2303
|
-
clearTime = _ref$clearTime ===
|
|
2303
|
+
clearTime = _ref$clearTime === void 0 ? 60 : _ref$clearTime,
|
|
2304
2304
|
_ref$name = _ref.name,
|
|
2305
|
-
name = _ref$name ===
|
|
2305
|
+
name = _ref$name === void 0 ? 'transition' : _ref$name,
|
|
2306
2306
|
props = _objectWithoutProperties(_ref, _excluded$1l);
|
|
2307
2307
|
var _useState = React$1.useState(''),
|
|
2308
2308
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -2375,7 +2375,7 @@ var useDOMObserver = function useDOMObserver(ref) {
|
|
|
2375
2375
|
var unmount = false;
|
|
2376
2376
|
var done = function done() {
|
|
2377
2377
|
if (unmount) return;
|
|
2378
|
-
callback.apply(
|
|
2378
|
+
callback.apply(void 0, arguments);
|
|
2379
2379
|
};
|
|
2380
2380
|
var observer = new MutationObserver(done);
|
|
2381
2381
|
observer.observe(ref.current, config);
|
|
@@ -2446,12 +2446,12 @@ var getRefRect = function getRefRect(ref, getContainer) {
|
|
|
2446
2446
|
};
|
|
2447
2447
|
var getEventRect = function getEventRect(event, getContainer) {
|
|
2448
2448
|
var _event$target;
|
|
2449
|
-
var rect = event === null || event ===
|
|
2449
|
+
var rect = event === null || event === void 0 || (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.getBoundingClientRect();
|
|
2450
2450
|
if (!rect) return defaultRect$2;
|
|
2451
2451
|
return getRectFromDOMWithContainer(rect, getContainer);
|
|
2452
2452
|
};
|
|
2453
2453
|
var isRefTarget = function isRefTarget(eventOrRef) {
|
|
2454
|
-
return typeof (eventOrRef === null || eventOrRef ===
|
|
2454
|
+
return typeof (eventOrRef === null || eventOrRef === void 0 ? void 0 : eventOrRef.target) === 'undefined';
|
|
2455
2455
|
};
|
|
2456
2456
|
var useRect = function useRect(initialState) {
|
|
2457
2457
|
var _useState = React$1.useState(initialState || defaultRect$2),
|
|
@@ -2557,9 +2557,9 @@ var AutoCompleteDropdown = function AutoCompleteDropdown(_ref) {
|
|
|
2557
2557
|
var children = _ref.children,
|
|
2558
2558
|
visible = _ref.visible,
|
|
2559
2559
|
_ref$className = _ref.className,
|
|
2560
|
-
className = _ref$className ===
|
|
2560
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
2561
2561
|
_ref$dropdownStyle = _ref.dropdownStyle,
|
|
2562
|
-
dropdownStyle = _ref$dropdownStyle ===
|
|
2562
|
+
dropdownStyle = _ref$dropdownStyle === void 0 ? {} : _ref$dropdownStyle,
|
|
2563
2563
|
disableMatchWidth = _ref.disableMatchWidth,
|
|
2564
2564
|
getPopupContainer = _ref.getPopupContainer;
|
|
2565
2565
|
var theme = useTheme();
|
|
@@ -2613,9 +2613,9 @@ var AutoCompleteSearch = withScale(AutoCompleteSearchComponent);
|
|
|
2613
2613
|
var AutoCompleteEmpty = function AutoCompleteEmpty(_ref) {
|
|
2614
2614
|
var children = _ref.children,
|
|
2615
2615
|
_ref$hidden = _ref.hidden,
|
|
2616
|
-
hidden = _ref$hidden ===
|
|
2616
|
+
hidden = _ref$hidden === void 0 ? false : _ref$hidden,
|
|
2617
2617
|
_ref$className = _ref.className,
|
|
2618
|
-
className = _ref$className ===
|
|
2618
|
+
className = _ref$className === void 0 ? '' : _ref$className;
|
|
2619
2619
|
if (hidden) return null;
|
|
2620
2620
|
return /*#__PURE__*/React$1.createElement(AutoCompleteSearch, {
|
|
2621
2621
|
className: className
|
|
@@ -2637,12 +2637,12 @@ var getIconBgColor = function getIconBgColor(type, palette, color) {
|
|
|
2637
2637
|
var LoadingComponent = function LoadingComponent(_ref) {
|
|
2638
2638
|
var children = _ref.children,
|
|
2639
2639
|
_ref$type = _ref.type,
|
|
2640
|
-
type = _ref$type ===
|
|
2640
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
2641
2641
|
color = _ref.color,
|
|
2642
2642
|
_ref$className = _ref.className,
|
|
2643
|
-
className = _ref$className ===
|
|
2643
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
2644
2644
|
_ref$spaceRatio = _ref.spaceRatio,
|
|
2645
|
-
spaceRatio = _ref$spaceRatio ===
|
|
2645
|
+
spaceRatio = _ref$spaceRatio === void 0 ? 1 : _ref$spaceRatio,
|
|
2646
2646
|
props = _objectWithoutProperties(_ref, _excluded$1k);
|
|
2647
2647
|
var theme = useTheme();
|
|
2648
2648
|
var _useScale = useScale(),
|
|
@@ -12593,9 +12593,9 @@ var getSearchIcon = function getSearchIcon(searching) {
|
|
|
12593
12593
|
};
|
|
12594
12594
|
var AutoCompleteComponent = /*#__PURE__*/React$1.forwardRef(function (_ref, userRef) {
|
|
12595
12595
|
var _ref$options = _ref.options,
|
|
12596
|
-
options = _ref$options ===
|
|
12596
|
+
options = _ref$options === void 0 ? [] : _ref$options,
|
|
12597
12597
|
_ref$initialValue = _ref.initialValue,
|
|
12598
|
-
customInitialValue = _ref$initialValue ===
|
|
12598
|
+
customInitialValue = _ref$initialValue === void 0 ? '' : _ref$initialValue,
|
|
12599
12599
|
onSelect = _ref.onSelect,
|
|
12600
12600
|
onSearch = _ref.onSearch,
|
|
12601
12601
|
onChange = _ref.onChange,
|
|
@@ -12604,15 +12604,15 @@ var AutoCompleteComponent = /*#__PURE__*/React$1.forwardRef(function (_ref, user
|
|
|
12604
12604
|
type = _ref.type,
|
|
12605
12605
|
value = _ref.value,
|
|
12606
12606
|
_ref$clearable = _ref.clearable,
|
|
12607
|
-
clearable = _ref$clearable ===
|
|
12607
|
+
clearable = _ref$clearable === void 0 ? false : _ref$clearable,
|
|
12608
12608
|
_ref$disabled = _ref.disabled,
|
|
12609
|
-
disabled = _ref$disabled ===
|
|
12609
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
12610
12610
|
dropdownClassName = _ref.dropdownClassName,
|
|
12611
12611
|
dropdownStyle = _ref.dropdownStyle,
|
|
12612
12612
|
_ref$disableMatchWidt = _ref.disableMatchWidth,
|
|
12613
|
-
disableMatchWidth = _ref$disableMatchWidt ===
|
|
12613
|
+
disableMatchWidth = _ref$disableMatchWidt === void 0 ? false : _ref$disableMatchWidt,
|
|
12614
12614
|
_ref$disableFreeSolo = _ref.disableFreeSolo,
|
|
12615
|
-
disableFreeSolo = _ref$disableFreeSolo ===
|
|
12615
|
+
disableFreeSolo = _ref$disableFreeSolo === void 0 ? false : _ref$disableFreeSolo,
|
|
12616
12616
|
getPopupContainer = _ref.getPopupContainer,
|
|
12617
12617
|
props = _objectWithoutProperties(_ref, _excluded$1j);
|
|
12618
12618
|
var resetTimer = React$1.useRef();
|
|
@@ -12770,13 +12770,13 @@ var safeText = function safeText(text) {
|
|
|
12770
12770
|
var AvatarComponent = function AvatarComponent(_ref) {
|
|
12771
12771
|
var src = _ref.src,
|
|
12772
12772
|
_ref$stacked = _ref.stacked,
|
|
12773
|
-
stacked = _ref$stacked ===
|
|
12773
|
+
stacked = _ref$stacked === void 0 ? false : _ref$stacked,
|
|
12774
12774
|
_ref$text = _ref.text,
|
|
12775
|
-
text = _ref$text ===
|
|
12775
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
12776
12776
|
_ref$isSquare = _ref.isSquare,
|
|
12777
|
-
isSquare = _ref$isSquare ===
|
|
12777
|
+
isSquare = _ref$isSquare === void 0 ? false : _ref$isSquare,
|
|
12778
12778
|
_ref$className = _ref.className,
|
|
12779
|
-
className = _ref$className ===
|
|
12779
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
12780
12780
|
props = _objectWithoutProperties(_ref, _excluded$1i);
|
|
12781
12781
|
var theme = useTheme();
|
|
12782
12782
|
var _useScale = useScale(),
|
|
@@ -12806,7 +12806,7 @@ var Avatar = withScale(AvatarComponent);
|
|
|
12806
12806
|
var AvatarGroupComponent = function AvatarGroupComponent(_ref) {
|
|
12807
12807
|
var count = _ref.count,
|
|
12808
12808
|
_ref$className = _ref.className,
|
|
12809
|
-
className = _ref$className ===
|
|
12809
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
12810
12810
|
children = _ref.children;
|
|
12811
12811
|
var theme = useTheme();
|
|
12812
12812
|
var _useScale = useScale(),
|
|
@@ -12840,12 +12840,12 @@ var getBgColor = function getBgColor(type, palette) {
|
|
|
12840
12840
|
};
|
|
12841
12841
|
var BadgeComponent = function BadgeComponent(_ref) {
|
|
12842
12842
|
var _ref$type = _ref.type,
|
|
12843
|
-
type = _ref$type ===
|
|
12843
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
12844
12844
|
_ref$className = _ref.className,
|
|
12845
|
-
className = _ref$className ===
|
|
12845
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
12846
12846
|
children = _ref.children,
|
|
12847
12847
|
_ref$dot = _ref.dot,
|
|
12848
|
-
dot = _ref$dot ===
|
|
12848
|
+
dot = _ref$dot === void 0 ? false : _ref$dot,
|
|
12849
12849
|
props = _objectWithoutProperties(_ref, _excluded$1h);
|
|
12850
12850
|
var theme = useTheme();
|
|
12851
12851
|
var _useScale = useScale(),
|
|
@@ -12903,7 +12903,7 @@ var getTransform = function getTransform(placement) {
|
|
|
12903
12903
|
var BadgeAnchor = function BadgeAnchor(_ref) {
|
|
12904
12904
|
var children = _ref.children,
|
|
12905
12905
|
_ref$placement = _ref.placement,
|
|
12906
|
-
placement = _ref$placement ===
|
|
12906
|
+
placement = _ref$placement === void 0 ? 'topRight' : _ref$placement;
|
|
12907
12907
|
var _pickChild = pickChild(children, Badge),
|
|
12908
12908
|
_pickChild2 = _slicedToArray(_pickChild, 2),
|
|
12909
12909
|
withoutBadgeChildren = _pickChild2[0],
|
|
@@ -12935,7 +12935,7 @@ Badge.Anchor = BadgeAnchor;
|
|
|
12935
12935
|
var Separator = function Separator(_ref) {
|
|
12936
12936
|
var children = _ref.children,
|
|
12937
12937
|
_ref$className = _ref.className,
|
|
12938
|
-
className = _ref$className ===
|
|
12938
|
+
className = _ref$className === void 0 ? '' : _ref$className;
|
|
12939
12939
|
var _useScale = useScale(),
|
|
12940
12940
|
SCALES = _useScale.SCALES;
|
|
12941
12941
|
var classes = useClasses('separator', className);
|
|
@@ -12986,10 +12986,10 @@ var addColorAlpha = function addColorAlpha(color, alpha) {
|
|
|
12986
12986
|
|
|
12987
12987
|
var BreadcrumbsComponent = function BreadcrumbsComponent(_ref) {
|
|
12988
12988
|
var _ref$separator = _ref.separator,
|
|
12989
|
-
separator = _ref$separator ===
|
|
12989
|
+
separator = _ref$separator === void 0 ? '/' : _ref$separator,
|
|
12990
12990
|
children = _ref.children,
|
|
12991
12991
|
_ref$className = _ref.className,
|
|
12992
|
-
className = _ref$className ===
|
|
12992
|
+
className = _ref$className === void 0 ? '' : _ref$className;
|
|
12993
12993
|
var theme = useTheme();
|
|
12994
12994
|
var _useScale = useScale(),
|
|
12995
12995
|
SCALES = _useScale.SCALES;
|
|
@@ -13050,18 +13050,18 @@ var LinkIcon = /*#__PURE__*/React$1.memo(LinkIconComponent);
|
|
|
13050
13050
|
var _excluded$1g = ["href", "showColor", "underline", "children", "className", "block", "icon"];
|
|
13051
13051
|
var LinkComponent = /*#__PURE__*/React$1.forwardRef(function (_ref, ref) {
|
|
13052
13052
|
var _ref$href = _ref.href,
|
|
13053
|
-
href = _ref$href ===
|
|
13053
|
+
href = _ref$href === void 0 ? '' : _ref$href,
|
|
13054
13054
|
_ref$showColor = _ref.showColor,
|
|
13055
|
-
showColor = _ref$showColor ===
|
|
13055
|
+
showColor = _ref$showColor === void 0 ? false : _ref$showColor,
|
|
13056
13056
|
_ref$underline = _ref.underline,
|
|
13057
|
-
underline = _ref$underline ===
|
|
13057
|
+
underline = _ref$underline === void 0 ? false : _ref$underline,
|
|
13058
13058
|
children = _ref.children,
|
|
13059
13059
|
_ref$className = _ref.className,
|
|
13060
|
-
className = _ref$className ===
|
|
13060
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
13061
13061
|
_ref$block = _ref.block,
|
|
13062
|
-
block = _ref$block ===
|
|
13062
|
+
block = _ref$block === void 0 ? false : _ref$block,
|
|
13063
13063
|
_ref$icon = _ref.icon,
|
|
13064
|
-
icon = _ref$icon ===
|
|
13064
|
+
icon = _ref$icon === void 0 ? false : _ref$icon,
|
|
13065
13065
|
props = _objectWithoutProperties(_ref, _excluded$1g);
|
|
13066
13066
|
var theme = useTheme();
|
|
13067
13067
|
var _useScale = useScale(),
|
|
@@ -13089,11 +13089,11 @@ var _excluded$1f = ["href", "nextLink", "onClick", "children", "className"];
|
|
|
13089
13089
|
var BreadcrumbsItem = /*#__PURE__*/React$1.forwardRef(function (_ref, ref) {
|
|
13090
13090
|
var href = _ref.href,
|
|
13091
13091
|
_ref$nextLink = _ref.nextLink,
|
|
13092
|
-
nextLink = _ref$nextLink ===
|
|
13092
|
+
nextLink = _ref$nextLink === void 0 ? false : _ref$nextLink,
|
|
13093
13093
|
onClick = _ref.onClick,
|
|
13094
13094
|
children = _ref.children,
|
|
13095
13095
|
_ref$className = _ref.className,
|
|
13096
|
-
className = _ref$className ===
|
|
13096
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
13097
13097
|
props = _objectWithoutProperties(_ref, _excluded$1f);
|
|
13098
13098
|
var isLink = React$1.useMemo(function () {
|
|
13099
13099
|
return href !== undefined || nextLink;
|
|
@@ -13127,9 +13127,9 @@ Breadcrumbs.Separator = BreadcrumbsSeparator;
|
|
|
13127
13127
|
|
|
13128
13128
|
var ButtonDrip = function ButtonDrip(_ref) {
|
|
13129
13129
|
var _ref$x = _ref.x,
|
|
13130
|
-
x = _ref$x ===
|
|
13130
|
+
x = _ref$x === void 0 ? 0 : _ref$x,
|
|
13131
13131
|
_ref$y = _ref.y,
|
|
13132
|
-
y = _ref$y ===
|
|
13132
|
+
y = _ref$y === void 0 ? 0 : _ref$y,
|
|
13133
13133
|
color = _ref.color,
|
|
13134
13134
|
onCompleted = _ref.onCompleted;
|
|
13135
13135
|
var dripRef = React$1.useRef(null);
|
|
@@ -13194,11 +13194,11 @@ ButtonLoading.displayName = 'GeistButtonLoading';
|
|
|
13194
13194
|
var _excluded$1e = ["isRight", "isSingle", "children", "className"];
|
|
13195
13195
|
var ButtonIcon = function ButtonIcon(_ref) {
|
|
13196
13196
|
var _ref$isRight = _ref.isRight,
|
|
13197
|
-
isRight = _ref$isRight ===
|
|
13197
|
+
isRight = _ref$isRight === void 0 ? false : _ref$isRight,
|
|
13198
13198
|
isSingle = _ref.isSingle,
|
|
13199
13199
|
children = _ref.children,
|
|
13200
13200
|
_ref$className = _ref.className,
|
|
13201
|
-
className = _ref$className ===
|
|
13201
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
13202
13202
|
props = _objectWithoutProperties(_ref, _excluded$1e);
|
|
13203
13203
|
var classes = useClasses('icon', {
|
|
13204
13204
|
right: isRight,
|
|
@@ -13333,7 +13333,7 @@ var getButtonColors = function getButtonColors(palette, props) {
|
|
|
13333
13333
|
* Color['success'] === Color['success-light']
|
|
13334
13334
|
* Color['warning'] === Color['warning-light']
|
|
13335
13335
|
*/
|
|
13336
|
-
var withoutLightType = type === null || type ===
|
|
13336
|
+
var withoutLightType = type === null || type === void 0 ? void 0 : type.replace('-light', '');
|
|
13337
13337
|
var defaultColor = colors["default"];
|
|
13338
13338
|
if (ghost) return getButtonGhostColors(palette, withoutLightType) || defaultColor;
|
|
13339
13339
|
return colors[withoutLightType] || defaultColor;
|
|
@@ -13472,27 +13472,27 @@ var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
|
|
|
13472
13472
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
13473
13473
|
var children = filteredProps.children,
|
|
13474
13474
|
_filteredProps$disabl = filteredProps.disabled,
|
|
13475
|
-
disabled = _filteredProps$disabl ===
|
|
13475
|
+
disabled = _filteredProps$disabl === void 0 ? false : _filteredProps$disabl;
|
|
13476
13476
|
filteredProps.type;
|
|
13477
13477
|
var _filteredProps$loadin = filteredProps.loading,
|
|
13478
|
-
loading = _filteredProps$loadin ===
|
|
13478
|
+
loading = _filteredProps$loadin === void 0 ? false : _filteredProps$loadin,
|
|
13479
13479
|
_filteredProps$shadow = filteredProps.shadow,
|
|
13480
|
-
shadow = _filteredProps$shadow ===
|
|
13480
|
+
shadow = _filteredProps$shadow === void 0 ? false : _filteredProps$shadow,
|
|
13481
13481
|
_filteredProps$ghost = filteredProps.ghost,
|
|
13482
|
-
ghost = _filteredProps$ghost ===
|
|
13482
|
+
ghost = _filteredProps$ghost === void 0 ? false : _filteredProps$ghost,
|
|
13483
13483
|
_filteredProps$effect = filteredProps.effect,
|
|
13484
|
-
effect = _filteredProps$effect ===
|
|
13484
|
+
effect = _filteredProps$effect === void 0 ? true : _filteredProps$effect,
|
|
13485
13485
|
_filteredProps$round = filteredProps.round,
|
|
13486
|
-
round = _filteredProps$round ===
|
|
13486
|
+
round = _filteredProps$round === void 0 ? false : _filteredProps$round,
|
|
13487
13487
|
onClick = filteredProps.onClick,
|
|
13488
13488
|
_filteredProps$auto = filteredProps.auto,
|
|
13489
|
-
auto = _filteredProps$auto ===
|
|
13489
|
+
auto = _filteredProps$auto === void 0 ? false : _filteredProps$auto,
|
|
13490
13490
|
icon = filteredProps.icon,
|
|
13491
13491
|
_filteredProps$htmlTy = filteredProps.htmlType,
|
|
13492
|
-
htmlType = _filteredProps$htmlTy ===
|
|
13492
|
+
htmlType = _filteredProps$htmlTy === void 0 ? 'button' : _filteredProps$htmlTy,
|
|
13493
13493
|
iconRight = filteredProps.iconRight,
|
|
13494
13494
|
_filteredProps$classN = filteredProps.className,
|
|
13495
|
-
className = _filteredProps$classN ===
|
|
13495
|
+
className = _filteredProps$classN === void 0 ? '' : _filteredProps$classN;
|
|
13496
13496
|
filteredProps.crossOrigin;
|
|
13497
13497
|
var props = _objectWithoutProperties(filteredProps, _excluded$1d);
|
|
13498
13498
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
@@ -13563,14 +13563,14 @@ var ButtonComponent = /*#__PURE__*/React$1.forwardRef(function (btnProps, ref) {
|
|
|
13563
13563
|
ButtonComponent.displayName = 'Button';
|
|
13564
13564
|
var Button = withScale(ButtonComponent);
|
|
13565
13565
|
|
|
13566
|
-
function CompactButton(_ref) {
|
|
13566
|
+
var CompactButton = function CompactButton(_ref) {
|
|
13567
13567
|
var _ref$to = _ref.to,
|
|
13568
|
-
to = _ref$to ===
|
|
13568
|
+
to = _ref$to === void 0 ? '/' : _ref$to,
|
|
13569
13569
|
children = _ref.children,
|
|
13570
13570
|
iconRight = _ref.iconRight,
|
|
13571
13571
|
icon = _ref.icon,
|
|
13572
13572
|
_ref$scale = _ref.scale,
|
|
13573
|
-
scale = _ref$scale ===
|
|
13573
|
+
scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
|
|
13574
13574
|
type = _ref.type,
|
|
13575
13575
|
style = _ref.style,
|
|
13576
13576
|
a = _ref.a,
|
|
@@ -13638,7 +13638,8 @@ function CompactButton(_ref) {
|
|
|
13638
13638
|
px: 0.6,
|
|
13639
13639
|
iconRight: iconRight
|
|
13640
13640
|
}, children);
|
|
13641
|
-
}
|
|
13641
|
+
};
|
|
13642
|
+
var button_compact = /*#__PURE__*/React$1.memo(CompactButton);
|
|
13642
13643
|
|
|
13643
13644
|
/* "use client" */
|
|
13644
13645
|
|
|
@@ -13749,11 +13750,11 @@ var _excluded$1c = ["children", "onClick", "className", "main", "icon", "type"];
|
|
|
13749
13750
|
var ButtonDropdownItem = function ButtonDropdownItem(_ref) {
|
|
13750
13751
|
var children = _ref.children,
|
|
13751
13752
|
_ref$onClick = _ref.onClick,
|
|
13752
|
-
onClick = _ref$onClick ===
|
|
13753
|
+
onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
|
|
13753
13754
|
_ref$className = _ref.className,
|
|
13754
|
-
className = _ref$className ===
|
|
13755
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
13755
13756
|
_ref$main = _ref.main,
|
|
13756
|
-
main = _ref$main ===
|
|
13757
|
+
main = _ref$main === void 0 ? false : _ref$main,
|
|
13757
13758
|
icon = _ref.icon,
|
|
13758
13759
|
selfType = _ref.type,
|
|
13759
13760
|
props = _objectWithoutProperties(_ref, _excluded$1c);
|
|
@@ -13801,15 +13802,15 @@ var stopPropagation$1 = function stopPropagation(event) {
|
|
|
13801
13802
|
var ButtonDropdownComponent = function ButtonDropdownComponent(_ref) {
|
|
13802
13803
|
var children = _ref.children,
|
|
13803
13804
|
_ref$type = _ref.type,
|
|
13804
|
-
type = _ref$type ===
|
|
13805
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
13805
13806
|
_ref$auto = _ref.auto,
|
|
13806
|
-
auto = _ref$auto ===
|
|
13807
|
+
auto = _ref$auto === void 0 ? false : _ref$auto,
|
|
13807
13808
|
_ref$className = _ref.className,
|
|
13808
|
-
className = _ref$className ===
|
|
13809
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
13809
13810
|
_ref$disabled = _ref.disabled,
|
|
13810
|
-
disabled = _ref$disabled ===
|
|
13811
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
13811
13812
|
_ref$loading = _ref.loading,
|
|
13812
|
-
loading = _ref$loading ===
|
|
13813
|
+
loading = _ref$loading === void 0 ? false : _ref$loading,
|
|
13813
13814
|
icon = _ref.icon,
|
|
13814
13815
|
props = _objectWithoutProperties(_ref, _excluded$1b);
|
|
13815
13816
|
var _useScale = useScale(),
|
|
@@ -13888,9 +13889,9 @@ ButtonDropdown.Item = ButtonDropdownItem;
|
|
|
13888
13889
|
var _excluded$1a = ["disabled", "type", "ghost", "vertical", "children", "className"];
|
|
13889
13890
|
var getGroupBorderColors = function getGroupBorderColors(palette, props) {
|
|
13890
13891
|
var _props$ghost = props.ghost,
|
|
13891
|
-
ghost = _props$ghost ===
|
|
13892
|
+
ghost = _props$ghost === void 0 ? false : _props$ghost,
|
|
13892
13893
|
_props$type = props.type,
|
|
13893
|
-
type = _props$type ===
|
|
13894
|
+
type = _props$type === void 0 ? 'default' : _props$type;
|
|
13894
13895
|
if (!ghost && type !== 'default') return palette.background;
|
|
13895
13896
|
var colors = {
|
|
13896
13897
|
"default": palette.border,
|
|
@@ -13977,12 +13978,12 @@ var getColor$3 = function getColor(val, palette) {
|
|
|
13977
13978
|
};
|
|
13978
13979
|
var CapacityComponent = function CapacityComponent(_ref) {
|
|
13979
13980
|
var _ref$value = _ref.value,
|
|
13980
|
-
value = _ref$value ===
|
|
13981
|
+
value = _ref$value === void 0 ? 0 : _ref$value,
|
|
13981
13982
|
_ref$limit = _ref.limit,
|
|
13982
|
-
limit = _ref$limit ===
|
|
13983
|
+
limit = _ref$limit === void 0 ? 100 : _ref$limit,
|
|
13983
13984
|
userColor = _ref.color,
|
|
13984
13985
|
_ref$className = _ref.className,
|
|
13985
|
-
className = _ref$className ===
|
|
13986
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
13986
13987
|
props = _objectWithoutProperties(_ref, _excluded$19);
|
|
13987
13988
|
var theme = useTheme();
|
|
13988
13989
|
var _useScale = useScale(),
|
|
@@ -14064,9 +14065,9 @@ var _excluded$18 = ["children", "className", "disableAutoMargin"];
|
|
|
14064
14065
|
var CardFooterComponent = function CardFooterComponent(_ref) {
|
|
14065
14066
|
var children = _ref.children,
|
|
14066
14067
|
_ref$className = _ref.className,
|
|
14067
|
-
className = _ref$className ===
|
|
14068
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
14068
14069
|
_ref$disableAutoMargi = _ref.disableAutoMargin,
|
|
14069
|
-
disableAutoMargin = _ref$disableAutoMargi ===
|
|
14070
|
+
disableAutoMargin = _ref$disableAutoMargi === void 0 ? false : _ref$disableAutoMargi,
|
|
14070
14071
|
props = _objectWithoutProperties(_ref, _excluded$18);
|
|
14071
14072
|
var theme = useTheme();
|
|
14072
14073
|
var _useScale = useScale(),
|
|
@@ -14087,7 +14088,7 @@ var CardFooter = withScale(CardFooterComponent);
|
|
|
14087
14088
|
var _excluded$17 = ["className", "children"];
|
|
14088
14089
|
var CardContentComponent = function CardContentComponent(_ref) {
|
|
14089
14090
|
var _ref$className = _ref.className,
|
|
14090
|
-
className = _ref$className ===
|
|
14091
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
14091
14092
|
children = _ref.children,
|
|
14092
14093
|
props = _objectWithoutProperties(_ref, _excluded$17);
|
|
14093
14094
|
var _useScale = useScale(),
|
|
@@ -14105,7 +14106,7 @@ var CardContent = withScale(CardContentComponent);
|
|
|
14105
14106
|
var _excluded$16 = ["opacity"];
|
|
14106
14107
|
var ImageSkeleton = /*#__PURE__*/React$1.memo(function (_ref) {
|
|
14107
14108
|
var _ref$opacity = _ref.opacity,
|
|
14108
|
-
opacity = _ref$opacity ===
|
|
14109
|
+
opacity = _ref$opacity === void 0 ? 0.5 : _ref$opacity,
|
|
14109
14110
|
props = _objectWithoutProperties(_ref, _excluded$16);
|
|
14110
14111
|
var theme = useTheme();
|
|
14111
14112
|
return /*#__PURE__*/React$1.createElement("div", _extends({}, props, {
|
|
@@ -14136,11 +14137,11 @@ var _excluded$15 = ["src", "disableSkeleton", "className", "maxDelay"];
|
|
|
14136
14137
|
var ImageComponent = function ImageComponent(_ref) {
|
|
14137
14138
|
var src = _ref.src,
|
|
14138
14139
|
_ref$disableSkeleton = _ref.disableSkeleton,
|
|
14139
|
-
disableSkeleton = _ref$disableSkeleton ===
|
|
14140
|
+
disableSkeleton = _ref$disableSkeleton === void 0 ? false : _ref$disableSkeleton,
|
|
14140
14141
|
_ref$className = _ref.className,
|
|
14141
|
-
className = _ref$className ===
|
|
14142
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
14142
14143
|
_ref$maxDelay = _ref.maxDelay,
|
|
14143
|
-
maxDelay = _ref$maxDelay ===
|
|
14144
|
+
maxDelay = _ref$maxDelay === void 0 ? 3000 : _ref$maxDelay,
|
|
14144
14145
|
props = _objectWithoutProperties(_ref, _excluded$15);
|
|
14145
14146
|
var _useScale = useScale(),
|
|
14146
14147
|
SCALES = _useScale.SCALES,
|
|
@@ -14265,13 +14266,13 @@ var ImageBrowserComponent = /*#__PURE__*/React$1.forwardRef(function (_ref, ref)
|
|
|
14265
14266
|
title = _ref.title,
|
|
14266
14267
|
children = _ref.children,
|
|
14267
14268
|
_ref$showFullLink = _ref.showFullLink,
|
|
14268
|
-
showFullLink = _ref$showFullLink ===
|
|
14269
|
+
showFullLink = _ref$showFullLink === void 0 ? false : _ref$showFullLink,
|
|
14269
14270
|
_ref$invert = _ref.invert,
|
|
14270
|
-
invert = _ref$invert ===
|
|
14271
|
+
invert = _ref$invert === void 0 ? false : _ref$invert,
|
|
14271
14272
|
_ref$anchorProps = _ref.anchorProps,
|
|
14272
|
-
anchorProps = _ref$anchorProps ===
|
|
14273
|
+
anchorProps = _ref$anchorProps === void 0 ? {} : _ref$anchorProps,
|
|
14273
14274
|
_ref$className = _ref.className,
|
|
14274
|
-
className = _ref$className ===
|
|
14275
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
14275
14276
|
props = _objectWithoutProperties(_ref, _excluded$14);
|
|
14276
14277
|
var theme = useTheme();
|
|
14277
14278
|
var _useScale = useScale(),
|
|
@@ -14312,13 +14313,13 @@ var _excluded$13 = ["children", "hoverable", "className", "shadow", "type"];
|
|
|
14312
14313
|
var CardComponent = function CardComponent(_ref) {
|
|
14313
14314
|
var children = _ref.children,
|
|
14314
14315
|
_ref$hoverable = _ref.hoverable,
|
|
14315
|
-
hoverable = _ref$hoverable ===
|
|
14316
|
+
hoverable = _ref$hoverable === void 0 ? false : _ref$hoverable,
|
|
14316
14317
|
_ref$className = _ref.className,
|
|
14317
|
-
className = _ref$className ===
|
|
14318
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
14318
14319
|
_ref$shadow = _ref.shadow,
|
|
14319
|
-
shadow = _ref$shadow ===
|
|
14320
|
+
shadow = _ref$shadow === void 0 ? false : _ref$shadow,
|
|
14320
14321
|
_ref$type = _ref.type,
|
|
14321
|
-
type = _ref$type ===
|
|
14322
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
14322
14323
|
props = _objectWithoutProperties(_ref, _excluded$13);
|
|
14323
14324
|
var theme = useTheme();
|
|
14324
14325
|
var _useScale = useScale(),
|
|
@@ -14445,17 +14446,17 @@ var _excluded$12 = ["checked", "initialChecked", "disabled", "onChange", "classN
|
|
|
14445
14446
|
var CheckboxComponent = function CheckboxComponent(_ref) {
|
|
14446
14447
|
var checked = _ref.checked,
|
|
14447
14448
|
_ref$initialChecked = _ref.initialChecked,
|
|
14448
|
-
initialChecked = _ref$initialChecked ===
|
|
14449
|
+
initialChecked = _ref$initialChecked === void 0 ? false : _ref$initialChecked,
|
|
14449
14450
|
_ref$disabled = _ref.disabled,
|
|
14450
|
-
disabled = _ref$disabled ===
|
|
14451
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
14451
14452
|
onChange = _ref.onChange,
|
|
14452
14453
|
_ref$className = _ref.className,
|
|
14453
|
-
className = _ref$className ===
|
|
14454
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
14454
14455
|
children = _ref.children,
|
|
14455
14456
|
_ref$type = _ref.type,
|
|
14456
|
-
type = _ref$type ===
|
|
14457
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
14457
14458
|
_ref$value = _ref.value,
|
|
14458
|
-
value = _ref$value ===
|
|
14459
|
+
value = _ref$value === void 0 ? '' : _ref$value,
|
|
14459
14460
|
props = _objectWithoutProperties(_ref, _excluded$12);
|
|
14460
14461
|
var theme = useTheme();
|
|
14461
14462
|
var _useScale = useScale(),
|
|
@@ -14533,12 +14534,12 @@ var Checkbox = withScale(CheckboxComponent);
|
|
|
14533
14534
|
var _excluded$11 = ["disabled", "onChange", "value", "children", "className"];
|
|
14534
14535
|
var CheckboxGroupComponent = function CheckboxGroupComponent(_ref) {
|
|
14535
14536
|
var _ref$disabled = _ref.disabled,
|
|
14536
|
-
disabled = _ref$disabled ===
|
|
14537
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
14537
14538
|
onChange = _ref.onChange,
|
|
14538
14539
|
value = _ref.value,
|
|
14539
14540
|
children = _ref.children,
|
|
14540
14541
|
_ref$className = _ref.className,
|
|
14541
|
-
className = _ref$className ===
|
|
14542
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
14542
14543
|
props = _objectWithoutProperties(_ref, _excluded$11);
|
|
14543
14544
|
var _useScale = useScale(),
|
|
14544
14545
|
SCALES = _useScale.SCALES;
|
|
@@ -14590,13 +14591,13 @@ var _excluded$10 = ["children", "block", "className", "name", "classic"];
|
|
|
14590
14591
|
var CodeComponent = function CodeComponent(_ref) {
|
|
14591
14592
|
var children = _ref.children,
|
|
14592
14593
|
_ref$block = _ref.block,
|
|
14593
|
-
block = _ref$block ===
|
|
14594
|
+
block = _ref$block === void 0 ? false : _ref$block,
|
|
14594
14595
|
_ref$className = _ref.className,
|
|
14595
|
-
className = _ref$className ===
|
|
14596
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
14596
14597
|
_ref$name = _ref.name,
|
|
14597
|
-
name = _ref$name ===
|
|
14598
|
+
name = _ref$name === void 0 ? '' : _ref$name,
|
|
14598
14599
|
_ref$classic = _ref.classic,
|
|
14599
|
-
classic = _ref$classic ===
|
|
14600
|
+
classic = _ref$classic === void 0 ? false : _ref$classic,
|
|
14600
14601
|
props = _objectWithoutProperties(_ref, _excluded$10);
|
|
14601
14602
|
var _useScale = useScale(),
|
|
14602
14603
|
SCALES = _useScale.SCALES;
|
|
@@ -14937,9 +14938,9 @@ var useRealShape = function useRealShape(ref) {
|
|
|
14937
14938
|
|
|
14938
14939
|
var Expand = function Expand(_ref) {
|
|
14939
14940
|
var _ref$isExpanded = _ref.isExpanded,
|
|
14940
|
-
isExpanded = _ref$isExpanded ===
|
|
14941
|
+
isExpanded = _ref$isExpanded === void 0 ? false : _ref$isExpanded,
|
|
14941
14942
|
_ref$delay = _ref.delay,
|
|
14942
|
-
delay = _ref$delay ===
|
|
14943
|
+
delay = _ref$delay === void 0 ? 200 : _ref$delay,
|
|
14943
14944
|
children = _ref.children;
|
|
14944
14945
|
var _useState = React$1.useState(isExpanded ? 'auto' : '0'),
|
|
14945
14946
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -15030,11 +15031,11 @@ var CollapseComponent = function CollapseComponent(_ref) {
|
|
|
15030
15031
|
title = _ref.title,
|
|
15031
15032
|
subtitle = _ref.subtitle,
|
|
15032
15033
|
_ref$initialVisible = _ref.initialVisible,
|
|
15033
|
-
initialVisible = _ref$initialVisible ===
|
|
15034
|
+
initialVisible = _ref$initialVisible === void 0 ? false : _ref$initialVisible,
|
|
15034
15035
|
_ref$shadow = _ref.shadow,
|
|
15035
|
-
shadow = _ref$shadow ===
|
|
15036
|
+
shadow = _ref$shadow === void 0 ? false : _ref$shadow,
|
|
15036
15037
|
_ref$className = _ref.className,
|
|
15037
|
-
className = _ref$className ===
|
|
15038
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15038
15039
|
index = _ref.index,
|
|
15039
15040
|
props = _objectWithoutProperties(_ref, _excluded$_);
|
|
15040
15041
|
var theme = useTheme();
|
|
@@ -15096,9 +15097,9 @@ var _excluded$Z = ["children", "accordion", "className"];
|
|
|
15096
15097
|
var CollapseGroupComponent = function CollapseGroupComponent(_ref) {
|
|
15097
15098
|
var children = _ref.children,
|
|
15098
15099
|
_ref$accordion = _ref.accordion,
|
|
15099
|
-
accordion = _ref$accordion ===
|
|
15100
|
+
accordion = _ref$accordion === void 0 ? true : _ref$accordion,
|
|
15100
15101
|
_ref$className = _ref.className,
|
|
15101
|
-
className = _ref$className ===
|
|
15102
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15102
15103
|
props = _objectWithoutProperties(_ref, _excluded$Z);
|
|
15103
15104
|
var _useScale = useScale(),
|
|
15104
15105
|
SCALES = _useScale.SCALES;
|
|
@@ -15155,11 +15156,11 @@ Collapse.Group = CollapseGroup;
|
|
|
15155
15156
|
var _excluded$Y = ["title", "content", "className"];
|
|
15156
15157
|
var DescriptionComponent = function DescriptionComponent(_ref) {
|
|
15157
15158
|
var _ref$title = _ref.title,
|
|
15158
|
-
title = _ref$title ===
|
|
15159
|
+
title = _ref$title === void 0 ? 'Title' : _ref$title,
|
|
15159
15160
|
_ref$content = _ref.content,
|
|
15160
|
-
content = _ref$content ===
|
|
15161
|
+
content = _ref$content === void 0 ? '' : _ref$content,
|
|
15161
15162
|
_ref$className = _ref.className,
|
|
15162
|
-
className = _ref$className ===
|
|
15163
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15163
15164
|
props = _objectWithoutProperties(_ref, _excluded$Y);
|
|
15164
15165
|
var theme = useTheme();
|
|
15165
15166
|
var _useScale = useScale(),
|
|
@@ -15183,11 +15184,11 @@ var _excluded$X = ["children", "caption", "shadow", "className"];
|
|
|
15183
15184
|
var DisplayComponent = function DisplayComponent(_ref) {
|
|
15184
15185
|
var children = _ref.children,
|
|
15185
15186
|
_ref$caption = _ref.caption,
|
|
15186
|
-
caption = _ref$caption ===
|
|
15187
|
+
caption = _ref$caption === void 0 ? '' : _ref$caption,
|
|
15187
15188
|
_ref$shadow = _ref.shadow,
|
|
15188
|
-
shadow = _ref$shadow ===
|
|
15189
|
+
shadow = _ref$shadow === void 0 ? false : _ref$shadow,
|
|
15189
15190
|
_ref$className = _ref.className,
|
|
15190
|
-
className = _ref$className ===
|
|
15191
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15191
15192
|
props = _objectWithoutProperties(_ref, _excluded$X);
|
|
15192
15193
|
var theme = useTheme();
|
|
15193
15194
|
var _useScale = useScale(),
|
|
@@ -15225,12 +15226,12 @@ var getColor$2 = function getColor(type, palette) {
|
|
|
15225
15226
|
};
|
|
15226
15227
|
var DividerComponent = function DividerComponent(_ref) {
|
|
15227
15228
|
var _ref$type = _ref.type,
|
|
15228
|
-
type = _ref$type ===
|
|
15229
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
15229
15230
|
_ref$align = _ref.align,
|
|
15230
|
-
align = _ref$align ===
|
|
15231
|
+
align = _ref$align === void 0 ? 'center' : _ref$align,
|
|
15231
15232
|
children = _ref.children,
|
|
15232
15233
|
_ref$className = _ref.className,
|
|
15233
|
-
className = _ref$className ===
|
|
15234
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15234
15235
|
props = _objectWithoutProperties(_ref, _excluded$W);
|
|
15235
15236
|
var theme = useTheme();
|
|
15236
15237
|
var _useScale = useScale(),
|
|
@@ -15272,10 +15273,10 @@ var getColor$1 = function getColor(type, theme) {
|
|
|
15272
15273
|
};
|
|
15273
15274
|
var DotComponent = function DotComponent(_ref) {
|
|
15274
15275
|
var _ref$type = _ref.type,
|
|
15275
|
-
type = _ref$type ===
|
|
15276
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
15276
15277
|
children = _ref.children,
|
|
15277
15278
|
_ref$className = _ref.className,
|
|
15278
|
-
className = _ref$className ===
|
|
15279
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15279
15280
|
props = _objectWithoutProperties(_ref, _excluded$V);
|
|
15280
15281
|
var theme = useTheme();
|
|
15281
15282
|
var _useScale = useScale(),
|
|
@@ -15303,12 +15304,12 @@ var defaultOptions$1 = {
|
|
|
15303
15304
|
};
|
|
15304
15305
|
var elementStack = new Map();
|
|
15305
15306
|
var getOwnerPaddingRight = function getOwnerPaddingRight(element) {
|
|
15306
|
-
var owner = (element === null || element ===
|
|
15307
|
+
var owner = (element === null || element === void 0 ? void 0 : element.ownerDocument) || document;
|
|
15307
15308
|
var view = owner.defaultView || window;
|
|
15308
15309
|
return Number.parseInt(view.getComputedStyle(element).paddingRight, 10) || 0;
|
|
15309
15310
|
};
|
|
15310
15311
|
var getOwnerScrollbarWidth = function getOwnerScrollbarWidth(element) {
|
|
15311
|
-
var doc = (element === null || element ===
|
|
15312
|
+
var doc = (element === null || element === void 0 ? void 0 : element.ownerDocument) || document;
|
|
15312
15313
|
return Math.abs(window.innerWidth - doc.documentElement.clientWidth);
|
|
15313
15314
|
};
|
|
15314
15315
|
var useBodyScroll = function useBodyScroll(elementRef, options) {
|
|
@@ -15481,15 +15482,15 @@ var useKeyboard = function useKeyboard(handler, keyBindings) {
|
|
|
15481
15482
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
15482
15483
|
var bindings = Array.isArray(keyBindings) ? keyBindings : [keyBindings];
|
|
15483
15484
|
var _options$disableGloba = options.disableGlobalEvent,
|
|
15484
|
-
disableGlobalEvent = _options$disableGloba ===
|
|
15485
|
+
disableGlobalEvent = _options$disableGloba === void 0 ? false : _options$disableGloba,
|
|
15485
15486
|
_options$capture = options.capture,
|
|
15486
|
-
capture = _options$capture ===
|
|
15487
|
+
capture = _options$capture === void 0 ? false : _options$capture,
|
|
15487
15488
|
_options$stopPropagat = options.stopPropagation,
|
|
15488
|
-
stopPropagation = _options$stopPropagat ===
|
|
15489
|
+
stopPropagation = _options$stopPropagat === void 0 ? false : _options$stopPropagat,
|
|
15489
15490
|
_options$preventDefau = options.preventDefault,
|
|
15490
|
-
preventDefault = _options$preventDefau ===
|
|
15491
|
+
preventDefault = _options$preventDefau === void 0 ? true : _options$preventDefau,
|
|
15491
15492
|
_options$event = options.event,
|
|
15492
|
-
event = _options$event ===
|
|
15493
|
+
event = _options$event === void 0 ? 'keydown' : _options$event;
|
|
15493
15494
|
var activeModMap = getActiveModMap(bindings);
|
|
15494
15495
|
var keyCode = bindings.filter(function (item) {
|
|
15495
15496
|
return !KeyMod[item];
|
|
@@ -15546,18 +15547,18 @@ var _excluded$U = ["children", "onClick", "visible", "width", "onContentClick",
|
|
|
15546
15547
|
var Backdrop = /*#__PURE__*/React$1.memo(function (_ref) {
|
|
15547
15548
|
var children = _ref.children,
|
|
15548
15549
|
_ref$onClick = _ref.onClick,
|
|
15549
|
-
onClick = _ref$onClick ===
|
|
15550
|
+
onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
|
|
15550
15551
|
_ref$visible = _ref.visible,
|
|
15551
|
-
visible = _ref$visible ===
|
|
15552
|
+
visible = _ref$visible === void 0 ? false : _ref$visible,
|
|
15552
15553
|
width = _ref.width,
|
|
15553
15554
|
_ref$onContentClick = _ref.onContentClick,
|
|
15554
|
-
onContentClick = _ref$onContentClick ===
|
|
15555
|
+
onContentClick = _ref$onContentClick === void 0 ? function () {} : _ref$onContentClick,
|
|
15555
15556
|
_ref$backdropClassNam = _ref.backdropClassName,
|
|
15556
|
-
backdropClassName = _ref$backdropClassNam ===
|
|
15557
|
+
backdropClassName = _ref$backdropClassNam === void 0 ? '' : _ref$backdropClassNam,
|
|
15557
15558
|
_ref$positionClassNam = _ref.positionClassName,
|
|
15558
|
-
positionClassName = _ref$positionClassNam ===
|
|
15559
|
+
positionClassName = _ref$positionClassNam === void 0 ? '' : _ref$positionClassNam,
|
|
15559
15560
|
_ref$layerClassName = _ref.layerClassName,
|
|
15560
|
-
layerClassName = _ref$layerClassName ===
|
|
15561
|
+
layerClassName = _ref$layerClassName === void 0 ? '' : _ref$layerClassName,
|
|
15561
15562
|
props = _objectWithoutProperties(_ref, _excluded$U);
|
|
15562
15563
|
var theme = useTheme();
|
|
15563
15564
|
var _useCurrentState = useCurrentState(false),
|
|
@@ -15629,10 +15630,10 @@ var getDrawerTransform = function getDrawerTransform(placement) {
|
|
|
15629
15630
|
var _excluded$T = ["className", "children", "visible", "placement"];
|
|
15630
15631
|
var DrawerWrapper = function DrawerWrapper(_ref) {
|
|
15631
15632
|
var _ref$className = _ref.className,
|
|
15632
|
-
className = _ref$className ===
|
|
15633
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15633
15634
|
children = _ref.children,
|
|
15634
15635
|
_ref$visible = _ref.visible,
|
|
15635
|
-
visible = _ref$visible ===
|
|
15636
|
+
visible = _ref$visible === void 0 ? false : _ref$visible,
|
|
15636
15637
|
placement = _ref.placement,
|
|
15637
15638
|
props = _objectWithoutProperties(_ref, _excluded$T);
|
|
15638
15639
|
var theme = useTheme();
|
|
@@ -15698,16 +15699,16 @@ var _excluded$S = ["visible", "keyboard", "disableBackdropClick", "onClose", "on
|
|
|
15698
15699
|
var DrawerComponent = function DrawerComponent(_ref) {
|
|
15699
15700
|
var customVisible = _ref.visible,
|
|
15700
15701
|
_ref$keyboard = _ref.keyboard,
|
|
15701
|
-
keyboard = _ref$keyboard ===
|
|
15702
|
+
keyboard = _ref$keyboard === void 0 ? true : _ref$keyboard,
|
|
15702
15703
|
_ref$disableBackdropC = _ref.disableBackdropClick,
|
|
15703
|
-
disableBackdropClick = _ref$disableBackdropC ===
|
|
15704
|
+
disableBackdropClick = _ref$disableBackdropC === void 0 ? false : _ref$disableBackdropC,
|
|
15704
15705
|
onClose = _ref.onClose,
|
|
15705
15706
|
onContentClick = _ref.onContentClick,
|
|
15706
15707
|
_ref$wrapClassName = _ref.wrapClassName,
|
|
15707
|
-
wrapClassName = _ref$wrapClassName ===
|
|
15708
|
+
wrapClassName = _ref$wrapClassName === void 0 ? '' : _ref$wrapClassName,
|
|
15708
15709
|
children = _ref.children,
|
|
15709
15710
|
_ref$placement = _ref.placement,
|
|
15710
|
-
placement = _ref$placement ===
|
|
15711
|
+
placement = _ref$placement === void 0 ? 'right' : _ref$placement,
|
|
15711
15712
|
props = _objectWithoutProperties(_ref, _excluded$S);
|
|
15712
15713
|
var portal = usePortal('drawer');
|
|
15713
15714
|
var _useState = React$1.useState(false),
|
|
@@ -15756,7 +15757,7 @@ DrawerComponent.displayName = 'Drawer';
|
|
|
15756
15757
|
var _excluded$R = ["className", "children"];
|
|
15757
15758
|
var ModalTitleComponent = function ModalTitleComponent(_ref) {
|
|
15758
15759
|
var _ref$className = _ref.className,
|
|
15759
|
-
className = _ref$className ===
|
|
15760
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15760
15761
|
children = _ref.children,
|
|
15761
15762
|
props = _objectWithoutProperties(_ref, _excluded$R);
|
|
15762
15763
|
var theme = useTheme();
|
|
@@ -15775,7 +15776,7 @@ var ModalTitle = withScale(ModalTitleComponent);
|
|
|
15775
15776
|
var _excluded$Q = ["className", "children"];
|
|
15776
15777
|
var ModalSubtitleComponent = function ModalSubtitleComponent(_ref) {
|
|
15777
15778
|
var _ref$className = _ref.className,
|
|
15778
|
-
className = _ref$className ===
|
|
15779
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15779
15780
|
children = _ref.children,
|
|
15780
15781
|
props = _objectWithoutProperties(_ref, _excluded$Q);
|
|
15781
15782
|
var theme = useTheme();
|
|
@@ -15794,7 +15795,7 @@ var ModalSubtitle = withScale(ModalSubtitleComponent);
|
|
|
15794
15795
|
var _excluded$P = ["className", "children"];
|
|
15795
15796
|
var ModalContentComponent = function ModalContentComponent(_ref) {
|
|
15796
15797
|
var _ref$className = _ref.className,
|
|
15797
|
-
className = _ref$className ===
|
|
15798
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15798
15799
|
children = _ref.children,
|
|
15799
15800
|
props = _objectWithoutProperties(_ref, _excluded$P);
|
|
15800
15801
|
var _useScale = useScale(),
|
|
@@ -15817,7 +15818,7 @@ DrawerComponent.Content = ModalContent;
|
|
|
15817
15818
|
var _excluded$O = ["className", "children"];
|
|
15818
15819
|
var FieldsetTitle = function FieldsetTitle(_ref) {
|
|
15819
15820
|
var _ref$className = _ref.className,
|
|
15820
|
-
className = _ref$className ===
|
|
15821
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15821
15822
|
children = _ref.children,
|
|
15822
15823
|
props = _objectWithoutProperties(_ref, _excluded$O);
|
|
15823
15824
|
var classes = useClasses('title', className);
|
|
@@ -15832,7 +15833,7 @@ FieldsetTitle.displayName = 'FieldsetTitle';
|
|
|
15832
15833
|
var _excluded$N = ["className", "children"];
|
|
15833
15834
|
var FieldsetSubtitle = function FieldsetSubtitle(_ref) {
|
|
15834
15835
|
var _ref$className = _ref.className,
|
|
15835
|
-
className = _ref$className ===
|
|
15836
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15836
15837
|
children = _ref.children,
|
|
15837
15838
|
props = _objectWithoutProperties(_ref, _excluded$N);
|
|
15838
15839
|
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("div", _extends({}, props, {
|
|
@@ -15846,7 +15847,7 @@ FieldsetSubtitle.displayName = 'FieldsetSubtitle';
|
|
|
15846
15847
|
var _excluded$M = ["className", "children"];
|
|
15847
15848
|
var FieldsetFooterComponent = function FieldsetFooterComponent(_ref) {
|
|
15848
15849
|
var _ref$className = _ref.className,
|
|
15849
|
-
className = _ref$className ===
|
|
15850
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15850
15851
|
children = _ref.children,
|
|
15851
15852
|
props = _objectWithoutProperties(_ref, _excluded$M);
|
|
15852
15853
|
var theme = useTheme();
|
|
@@ -15865,7 +15866,7 @@ var FieldsetFooter = withScale(FieldsetFooterComponent);
|
|
|
15865
15866
|
var _excluded$L = ["className", "children"];
|
|
15866
15867
|
var FieldsetContentComponent = function FieldsetContentComponent(_ref) {
|
|
15867
15868
|
var _ref$className = _ref.className,
|
|
15868
|
-
className = _ref$className ===
|
|
15869
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15869
15870
|
children = _ref.children,
|
|
15870
15871
|
props = _objectWithoutProperties(_ref, _excluded$L);
|
|
15871
15872
|
var _useScale = useScale(),
|
|
@@ -15895,16 +15896,16 @@ var useFieldset = function useFieldset() {
|
|
|
15895
15896
|
var _excluded$K = ["className", "title", "subtitle", "children", "value", "label"];
|
|
15896
15897
|
var FieldsetComponent = function FieldsetComponent(_ref) {
|
|
15897
15898
|
var _ref$className = _ref.className,
|
|
15898
|
-
className = _ref$className ===
|
|
15899
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15899
15900
|
_ref$title = _ref.title,
|
|
15900
|
-
title = _ref$title ===
|
|
15901
|
+
title = _ref$title === void 0 ? '' : _ref$title,
|
|
15901
15902
|
_ref$subtitle = _ref.subtitle,
|
|
15902
|
-
subtitle = _ref$subtitle ===
|
|
15903
|
+
subtitle = _ref$subtitle === void 0 ? '' : _ref$subtitle,
|
|
15903
15904
|
children = _ref.children,
|
|
15904
15905
|
_ref$value = _ref.value,
|
|
15905
|
-
value = _ref$value ===
|
|
15906
|
+
value = _ref$value === void 0 ? '' : _ref$value,
|
|
15906
15907
|
_ref$label = _ref.label,
|
|
15907
|
-
label = _ref$label ===
|
|
15908
|
+
label = _ref$label === void 0 ? '' : _ref$label,
|
|
15908
15909
|
props = _objectWithoutProperties(_ref, _excluded$K);
|
|
15909
15910
|
var theme = useTheme();
|
|
15910
15911
|
var _useScale = useScale(),
|
|
@@ -15962,7 +15963,7 @@ var Fieldset = withScale(FieldsetComponent);
|
|
|
15962
15963
|
var _excluded$J = ["className", "children", "value", "onChange"];
|
|
15963
15964
|
var FieldsetGroupComponent = function FieldsetGroupComponent(_ref) {
|
|
15964
15965
|
var _ref$className = _ref.className,
|
|
15965
|
-
className = _ref$className ===
|
|
15966
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
15966
15967
|
children = _ref.children,
|
|
15967
15968
|
value = _ref.value,
|
|
15968
15969
|
onChange = _ref.onChange,
|
|
@@ -20119,7 +20120,7 @@ function requireClone () {
|
|
|
20119
20120
|
}
|
|
20120
20121
|
|
|
20121
20122
|
var cloneExports = requireClone();
|
|
20122
|
-
var clone = /*@__PURE__*/getDefaultExportFromCjs(cloneExports);
|
|
20123
|
+
var clone$1 = /*@__PURE__*/getDefaultExportFromCjs(cloneExports);
|
|
20123
20124
|
|
|
20124
20125
|
/**
|
|
20125
20126
|
* A specialized version of `_.map` for arrays without support for iteratee
|
|
@@ -20608,7 +20609,7 @@ function getIn(obj, key, def) {
|
|
|
20608
20609
|
* @see https://github.com/jaredpalmer/formik/pull/123
|
|
20609
20610
|
*/
|
|
20610
20611
|
function setIn(obj, path, value) {
|
|
20611
|
-
var res = clone(obj); // this keeps inheritance when obj is a class
|
|
20612
|
+
var res = clone$1(obj); // this keeps inheritance when obj is a class
|
|
20612
20613
|
var resVal = res;
|
|
20613
20614
|
var i = 0;
|
|
20614
20615
|
var pathArray = toPath(path);
|
|
@@ -20616,7 +20617,7 @@ function setIn(obj, path, value) {
|
|
|
20616
20617
|
var currentPath = pathArray[i];
|
|
20617
20618
|
var currentObj = getIn(obj, pathArray.slice(0, i + 1));
|
|
20618
20619
|
if (currentObj && (isObject(currentObj) || Array.isArray(currentObj))) {
|
|
20619
|
-
resVal = resVal[currentPath] = clone(currentObj);
|
|
20620
|
+
resVal = resVal[currentPath] = clone$1(currentObj);
|
|
20620
20621
|
} else {
|
|
20621
20622
|
var nextPath = pathArray[i + 1];
|
|
20622
20623
|
resVal = resVal[currentPath] = isInteger(nextPath) && Number(nextPath) >= 0 ? [] : {};
|
|
@@ -20738,7 +20739,7 @@ function formikReducer(state, msg) {
|
|
|
20738
20739
|
}
|
|
20739
20740
|
}
|
|
20740
20741
|
|
|
20741
|
-
// Initial empty states // objects
|
|
20742
|
+
// Initial empty states // objects // FormikErrors<unkown>
|
|
20742
20743
|
var emptyErrors = {};
|
|
20743
20744
|
var emptyTouched = {};
|
|
20744
20745
|
|
|
@@ -20747,14 +20748,14 @@ var emptyTouched = {};
|
|
|
20747
20748
|
|
|
20748
20749
|
function useFormik(_ref) {
|
|
20749
20750
|
var _ref$validateOnChange = _ref.validateOnChange,
|
|
20750
|
-
validateOnChange = _ref$validateOnChange ===
|
|
20751
|
+
validateOnChange = _ref$validateOnChange === void 0 ? true : _ref$validateOnChange,
|
|
20751
20752
|
_ref$validateOnBlur = _ref.validateOnBlur,
|
|
20752
|
-
validateOnBlur = _ref$validateOnBlur ===
|
|
20753
|
+
validateOnBlur = _ref$validateOnBlur === void 0 ? true : _ref$validateOnBlur,
|
|
20753
20754
|
_ref$validateOnMount = _ref.validateOnMount,
|
|
20754
|
-
validateOnMount = _ref$validateOnMount ===
|
|
20755
|
+
validateOnMount = _ref$validateOnMount === void 0 ? false : _ref$validateOnMount,
|
|
20755
20756
|
isInitialValid = _ref.isInitialValid,
|
|
20756
20757
|
_ref$enableReinitiali = _ref.enableReinitialize,
|
|
20757
|
-
enableReinitialize = _ref$enableReinitiali ===
|
|
20758
|
+
enableReinitialize = _ref$enableReinitiali === void 0 ? false : _ref$enableReinitiali,
|
|
20758
20759
|
onSubmit = _ref.onSubmit,
|
|
20759
20760
|
rest = _objectWithoutProperties(_ref, _excluded$I);
|
|
20760
20761
|
var props = _objectSpread2({
|
|
@@ -20928,7 +20929,7 @@ function useFormik(_ref) {
|
|
|
20928
20929
|
});
|
|
20929
20930
|
}
|
|
20930
20931
|
return combinedErrors;
|
|
20931
|
-
});
|
|
20932
|
+
}); // CODE UPDATED
|
|
20932
20933
|
});
|
|
20933
20934
|
React__namespace.useEffect(function () {
|
|
20934
20935
|
if (validateOnMount && isMounted.current === true && isEqual(initialValues.current, props.initialValues)) {
|
|
@@ -21627,7 +21628,7 @@ function useEventCallback(fn) {
|
|
|
21627
21628
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
21628
21629
|
args[_key] = arguments[_key];
|
|
21629
21630
|
}
|
|
21630
|
-
return ref.current.apply(
|
|
21631
|
+
return ref.current.apply(void 0, args);
|
|
21631
21632
|
}, []);
|
|
21632
21633
|
}
|
|
21633
21634
|
|
|
@@ -21654,7 +21655,7 @@ var _excluded$H = ["mapPropsToValues"],
|
|
|
21654
21655
|
*/
|
|
21655
21656
|
function withFormik(_ref) {
|
|
21656
21657
|
var _ref$mapPropsToValues = _ref.mapPropsToValues,
|
|
21657
|
-
mapPropsToValues = _ref$mapPropsToValues ===
|
|
21658
|
+
mapPropsToValues = _ref$mapPropsToValues === void 0 ? function (vanillaProps) {
|
|
21658
21659
|
var val = {};
|
|
21659
21660
|
for (var k in vanillaProps) {
|
|
21660
21661
|
if (vanillaProps.hasOwnProperty(k) && typeof vanillaProps[k] !== 'function') {
|
|
@@ -21799,7 +21800,7 @@ var ThemeProvider = function ThemeProvider(_ref) {
|
|
|
21799
21800
|
var children = _ref.children,
|
|
21800
21801
|
themeType = _ref.themeType,
|
|
21801
21802
|
_ref$themes = _ref.themes,
|
|
21802
|
-
themes = _ref$themes ===
|
|
21803
|
+
themes = _ref$themes === void 0 ? [] : _ref$themes;
|
|
21803
21804
|
var _React$useState = React$1.useState({
|
|
21804
21805
|
themes: Themes.getPresets()
|
|
21805
21806
|
}),
|
|
@@ -21814,7 +21815,7 @@ var ThemeProvider = function ThemeProvider(_ref) {
|
|
|
21814
21815
|
return Themes.getPresetStaticTheme();
|
|
21815
21816
|
}, [allThemes, themeType]);
|
|
21816
21817
|
React$1.useEffect(function () {
|
|
21817
|
-
if (!(themes !== null && themes !==
|
|
21818
|
+
if (!(themes !== null && themes !== void 0 && themes.length)) return;
|
|
21818
21819
|
setAllThemes(function (last) {
|
|
21819
21820
|
var safeThemes = themes.filter(function (item) {
|
|
21820
21821
|
return Themes.isAvailableThemeType(item.type);
|
|
@@ -22111,22 +22112,22 @@ var getItemLayout = function getItemLayout(val) {
|
|
|
22111
22112
|
};
|
|
22112
22113
|
var GridBasicItem = function GridBasicItem(_ref) {
|
|
22113
22114
|
var _ref$xs = _ref.xs,
|
|
22114
|
-
xs = _ref$xs ===
|
|
22115
|
+
xs = _ref$xs === void 0 ? false : _ref$xs,
|
|
22115
22116
|
_ref$sm = _ref.sm,
|
|
22116
|
-
sm = _ref$sm ===
|
|
22117
|
+
sm = _ref$sm === void 0 ? false : _ref$sm,
|
|
22117
22118
|
_ref$md = _ref.md,
|
|
22118
|
-
md = _ref$md ===
|
|
22119
|
+
md = _ref$md === void 0 ? false : _ref$md,
|
|
22119
22120
|
_ref$lg = _ref.lg,
|
|
22120
|
-
lg = _ref$lg ===
|
|
22121
|
+
lg = _ref$lg === void 0 ? false : _ref$lg,
|
|
22121
22122
|
_ref$xl = _ref.xl,
|
|
22122
|
-
xl = _ref$xl ===
|
|
22123
|
+
xl = _ref$xl === void 0 ? false : _ref$xl,
|
|
22123
22124
|
justify = _ref.justify,
|
|
22124
22125
|
direction = _ref.direction,
|
|
22125
22126
|
alignItems = _ref.alignItems,
|
|
22126
22127
|
alignContent = _ref.alignContent,
|
|
22127
22128
|
children = _ref.children,
|
|
22128
22129
|
_ref$className = _ref.className,
|
|
22129
|
-
className = _ref$className ===
|
|
22130
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
22130
22131
|
props = _objectWithoutProperties(_ref, _excluded$F);
|
|
22131
22132
|
var theme = useTheme();
|
|
22132
22133
|
var _useScale = useScale(),
|
|
@@ -22171,7 +22172,7 @@ var _excluded$E = ["children", "className"];
|
|
|
22171
22172
|
var GridComponent = function GridComponent(_ref) {
|
|
22172
22173
|
var children = _ref.children,
|
|
22173
22174
|
_ref$className = _ref.className,
|
|
22174
|
-
className = _ref$className ===
|
|
22175
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
22175
22176
|
props = _objectWithoutProperties(_ref, _excluded$E);
|
|
22176
22177
|
var _useScale = useScale(),
|
|
22177
22178
|
SCALES = _useScale.SCALES;
|
|
@@ -22195,12 +22196,12 @@ var Grid = withScale(GridComponent);
|
|
|
22195
22196
|
var _excluded$D = ["gap", "wrap", "children", "className"];
|
|
22196
22197
|
var GridContainerComponent = function GridContainerComponent(_ref) {
|
|
22197
22198
|
var _ref$gap = _ref.gap,
|
|
22198
|
-
gap = _ref$gap ===
|
|
22199
|
+
gap = _ref$gap === void 0 ? 0 : _ref$gap,
|
|
22199
22200
|
_ref$wrap = _ref.wrap,
|
|
22200
|
-
wrap = _ref$wrap ===
|
|
22201
|
+
wrap = _ref$wrap === void 0 ? 'wrap' : _ref$wrap,
|
|
22201
22202
|
children = _ref.children,
|
|
22202
22203
|
_ref$className = _ref.className,
|
|
22203
|
-
className = _ref$className ===
|
|
22204
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
22204
22205
|
props = _objectWithoutProperties(_ref, _excluded$D);
|
|
22205
22206
|
var _useScale = useScale(),
|
|
22206
22207
|
unit = _useScale.unit,
|
|
@@ -22227,19 +22228,1356 @@ var GridContainer = withScale(GridContainerComponent);
|
|
|
22227
22228
|
|
|
22228
22229
|
Grid.Container = GridContainer;
|
|
22229
22230
|
|
|
22231
|
+
/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
|
|
22232
|
+
|
|
22233
|
+
const {
|
|
22234
|
+
entries,
|
|
22235
|
+
setPrototypeOf,
|
|
22236
|
+
isFrozen,
|
|
22237
|
+
getPrototypeOf,
|
|
22238
|
+
getOwnPropertyDescriptor
|
|
22239
|
+
} = Object;
|
|
22240
|
+
let {
|
|
22241
|
+
freeze,
|
|
22242
|
+
seal,
|
|
22243
|
+
create
|
|
22244
|
+
} = Object; // eslint-disable-line import/no-mutable-exports
|
|
22245
|
+
let {
|
|
22246
|
+
apply,
|
|
22247
|
+
construct
|
|
22248
|
+
} = typeof Reflect !== 'undefined' && Reflect;
|
|
22249
|
+
if (!freeze) {
|
|
22250
|
+
freeze = function freeze(x) {
|
|
22251
|
+
return x;
|
|
22252
|
+
};
|
|
22253
|
+
}
|
|
22254
|
+
if (!seal) {
|
|
22255
|
+
seal = function seal(x) {
|
|
22256
|
+
return x;
|
|
22257
|
+
};
|
|
22258
|
+
}
|
|
22259
|
+
if (!apply) {
|
|
22260
|
+
apply = function apply(fun, thisValue, args) {
|
|
22261
|
+
return fun.apply(thisValue, args);
|
|
22262
|
+
};
|
|
22263
|
+
}
|
|
22264
|
+
if (!construct) {
|
|
22265
|
+
construct = function construct(Func, args) {
|
|
22266
|
+
return new Func(...args);
|
|
22267
|
+
};
|
|
22268
|
+
}
|
|
22269
|
+
const arrayForEach = unapply(Array.prototype.forEach);
|
|
22270
|
+
const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
|
|
22271
|
+
const arrayPop = unapply(Array.prototype.pop);
|
|
22272
|
+
const arrayPush = unapply(Array.prototype.push);
|
|
22273
|
+
const arraySplice = unapply(Array.prototype.splice);
|
|
22274
|
+
const stringToLowerCase = unapply(String.prototype.toLowerCase);
|
|
22275
|
+
const stringToString = unapply(String.prototype.toString);
|
|
22276
|
+
const stringMatch = unapply(String.prototype.match);
|
|
22277
|
+
const stringReplace = unapply(String.prototype.replace);
|
|
22278
|
+
const stringIndexOf = unapply(String.prototype.indexOf);
|
|
22279
|
+
const stringTrim = unapply(String.prototype.trim);
|
|
22280
|
+
const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
|
|
22281
|
+
const regExpTest = unapply(RegExp.prototype.test);
|
|
22282
|
+
const typeErrorCreate = unconstruct(TypeError);
|
|
22283
|
+
/**
|
|
22284
|
+
* Creates a new function that calls the given function with a specified thisArg and arguments.
|
|
22285
|
+
*
|
|
22286
|
+
* @param func - The function to be wrapped and called.
|
|
22287
|
+
* @returns A new function that calls the given function with a specified thisArg and arguments.
|
|
22288
|
+
*/
|
|
22289
|
+
function unapply(func) {
|
|
22290
|
+
return function (thisArg) {
|
|
22291
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
22292
|
+
args[_key - 1] = arguments[_key];
|
|
22293
|
+
}
|
|
22294
|
+
return apply(func, thisArg, args);
|
|
22295
|
+
};
|
|
22296
|
+
}
|
|
22297
|
+
/**
|
|
22298
|
+
* Creates a new function that constructs an instance of the given constructor function with the provided arguments.
|
|
22299
|
+
*
|
|
22300
|
+
* @param func - The constructor function to be wrapped and called.
|
|
22301
|
+
* @returns A new function that constructs an instance of the given constructor function with the provided arguments.
|
|
22302
|
+
*/
|
|
22303
|
+
function unconstruct(func) {
|
|
22304
|
+
return function () {
|
|
22305
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
22306
|
+
args[_key2] = arguments[_key2];
|
|
22307
|
+
}
|
|
22308
|
+
return construct(func, args);
|
|
22309
|
+
};
|
|
22310
|
+
}
|
|
22311
|
+
/**
|
|
22312
|
+
* Add properties to a lookup table
|
|
22313
|
+
*
|
|
22314
|
+
* @param set - The set to which elements will be added.
|
|
22315
|
+
* @param array - The array containing elements to be added to the set.
|
|
22316
|
+
* @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.
|
|
22317
|
+
* @returns The modified set with added elements.
|
|
22318
|
+
*/
|
|
22319
|
+
function addToSet(set, array) {
|
|
22320
|
+
let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;
|
|
22321
|
+
if (setPrototypeOf) {
|
|
22322
|
+
// Make 'in' and truthy checks like Boolean(set.constructor)
|
|
22323
|
+
// independent of any properties defined on Object.prototype.
|
|
22324
|
+
// Prevent prototype setters from intercepting set as a this value.
|
|
22325
|
+
setPrototypeOf(set, null);
|
|
22326
|
+
}
|
|
22327
|
+
let l = array.length;
|
|
22328
|
+
while (l--) {
|
|
22329
|
+
let element = array[l];
|
|
22330
|
+
if (typeof element === 'string') {
|
|
22331
|
+
const lcElement = transformCaseFunc(element);
|
|
22332
|
+
if (lcElement !== element) {
|
|
22333
|
+
// Config presets (e.g. tags.js, attrs.js) are immutable.
|
|
22334
|
+
if (!isFrozen(array)) {
|
|
22335
|
+
array[l] = lcElement;
|
|
22336
|
+
}
|
|
22337
|
+
element = lcElement;
|
|
22338
|
+
}
|
|
22339
|
+
}
|
|
22340
|
+
set[element] = true;
|
|
22341
|
+
}
|
|
22342
|
+
return set;
|
|
22343
|
+
}
|
|
22344
|
+
/**
|
|
22345
|
+
* Clean up an array to harden against CSPP
|
|
22346
|
+
*
|
|
22347
|
+
* @param array - The array to be cleaned.
|
|
22348
|
+
* @returns The cleaned version of the array
|
|
22349
|
+
*/
|
|
22350
|
+
function cleanArray(array) {
|
|
22351
|
+
for (let index = 0; index < array.length; index++) {
|
|
22352
|
+
const isPropertyExist = objectHasOwnProperty(array, index);
|
|
22353
|
+
if (!isPropertyExist) {
|
|
22354
|
+
array[index] = null;
|
|
22355
|
+
}
|
|
22356
|
+
}
|
|
22357
|
+
return array;
|
|
22358
|
+
}
|
|
22359
|
+
/**
|
|
22360
|
+
* Shallow clone an object
|
|
22361
|
+
*
|
|
22362
|
+
* @param object - The object to be cloned.
|
|
22363
|
+
* @returns A new object that copies the original.
|
|
22364
|
+
*/
|
|
22365
|
+
function clone(object) {
|
|
22366
|
+
const newObject = create(null);
|
|
22367
|
+
for (const [property, value] of entries(object)) {
|
|
22368
|
+
const isPropertyExist = objectHasOwnProperty(object, property);
|
|
22369
|
+
if (isPropertyExist) {
|
|
22370
|
+
if (Array.isArray(value)) {
|
|
22371
|
+
newObject[property] = cleanArray(value);
|
|
22372
|
+
} else if (value && typeof value === 'object' && value.constructor === Object) {
|
|
22373
|
+
newObject[property] = clone(value);
|
|
22374
|
+
} else {
|
|
22375
|
+
newObject[property] = value;
|
|
22376
|
+
}
|
|
22377
|
+
}
|
|
22378
|
+
}
|
|
22379
|
+
return newObject;
|
|
22380
|
+
}
|
|
22381
|
+
/**
|
|
22382
|
+
* This method automatically checks if the prop is function or getter and behaves accordingly.
|
|
22383
|
+
*
|
|
22384
|
+
* @param object - The object to look up the getter function in its prototype chain.
|
|
22385
|
+
* @param prop - The property name for which to find the getter function.
|
|
22386
|
+
* @returns The getter function found in the prototype chain or a fallback function.
|
|
22387
|
+
*/
|
|
22388
|
+
function lookupGetter(object, prop) {
|
|
22389
|
+
while (object !== null) {
|
|
22390
|
+
const desc = getOwnPropertyDescriptor(object, prop);
|
|
22391
|
+
if (desc) {
|
|
22392
|
+
if (desc.get) {
|
|
22393
|
+
return unapply(desc.get);
|
|
22394
|
+
}
|
|
22395
|
+
if (typeof desc.value === 'function') {
|
|
22396
|
+
return unapply(desc.value);
|
|
22397
|
+
}
|
|
22398
|
+
}
|
|
22399
|
+
object = getPrototypeOf(object);
|
|
22400
|
+
}
|
|
22401
|
+
function fallbackValue() {
|
|
22402
|
+
return null;
|
|
22403
|
+
}
|
|
22404
|
+
return fallbackValue;
|
|
22405
|
+
}
|
|
22406
|
+
|
|
22407
|
+
const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
|
|
22408
|
+
const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
|
|
22409
|
+
const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
|
|
22410
|
+
// List of SVG elements that are disallowed by default.
|
|
22411
|
+
// We still need to know them so that we can do namespace
|
|
22412
|
+
// checks properly in case one wants to add them to
|
|
22413
|
+
// allow-list.
|
|
22414
|
+
const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);
|
|
22415
|
+
const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);
|
|
22416
|
+
// Similarly to SVG, we want to know all MathML elements,
|
|
22417
|
+
// even those that we disallow by default.
|
|
22418
|
+
const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);
|
|
22419
|
+
const text = freeze(['#text']);
|
|
22420
|
+
|
|
22421
|
+
const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
|
|
22422
|
+
const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
|
|
22423
|
+
const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);
|
|
22424
|
+
const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
|
|
22425
|
+
|
|
22426
|
+
// eslint-disable-next-line unicorn/better-regex
|
|
22427
|
+
const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode
|
|
22428
|
+
const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
|
|
22429
|
+
const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm); // eslint-disable-line unicorn/better-regex
|
|
22430
|
+
const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/); // eslint-disable-line no-useless-escape
|
|
22431
|
+
const ARIA_ATTR = seal(/^aria-[\-\w]+$/); // eslint-disable-line no-useless-escape
|
|
22432
|
+
const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape
|
|
22433
|
+
);
|
|
22434
|
+
const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
|
|
22435
|
+
const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex
|
|
22436
|
+
);
|
|
22437
|
+
const DOCTYPE_NAME = seal(/^html$/i);
|
|
22438
|
+
const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
22439
|
+
|
|
22440
|
+
var EXPRESSIONS = /*#__PURE__*/Object.freeze({
|
|
22441
|
+
__proto__: null,
|
|
22442
|
+
ARIA_ATTR: ARIA_ATTR,
|
|
22443
|
+
ATTR_WHITESPACE: ATTR_WHITESPACE,
|
|
22444
|
+
CUSTOM_ELEMENT: CUSTOM_ELEMENT,
|
|
22445
|
+
DATA_ATTR: DATA_ATTR,
|
|
22446
|
+
DOCTYPE_NAME: DOCTYPE_NAME,
|
|
22447
|
+
ERB_EXPR: ERB_EXPR,
|
|
22448
|
+
IS_ALLOWED_URI: IS_ALLOWED_URI,
|
|
22449
|
+
IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,
|
|
22450
|
+
MUSTACHE_EXPR: MUSTACHE_EXPR,
|
|
22451
|
+
TMPLIT_EXPR: TMPLIT_EXPR
|
|
22452
|
+
});
|
|
22453
|
+
|
|
22454
|
+
/* eslint-disable @typescript-eslint/indent */
|
|
22455
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
|
|
22456
|
+
const NODE_TYPE = {
|
|
22457
|
+
element: 1,
|
|
22458
|
+
text: 3,
|
|
22459
|
+
// Deprecated
|
|
22460
|
+
progressingInstruction: 7,
|
|
22461
|
+
comment: 8,
|
|
22462
|
+
document: 9};
|
|
22463
|
+
const getGlobal = function getGlobal() {
|
|
22464
|
+
return typeof window === 'undefined' ? null : window;
|
|
22465
|
+
};
|
|
22466
|
+
/**
|
|
22467
|
+
* Creates a no-op policy for internal use only.
|
|
22468
|
+
* Don't export this function outside this module!
|
|
22469
|
+
* @param trustedTypes The policy factory.
|
|
22470
|
+
* @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).
|
|
22471
|
+
* @return The policy created (or null, if Trusted Types
|
|
22472
|
+
* are not supported or creating the policy failed).
|
|
22473
|
+
*/
|
|
22474
|
+
const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {
|
|
22475
|
+
if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {
|
|
22476
|
+
return null;
|
|
22477
|
+
}
|
|
22478
|
+
// Allow the callers to control the unique policy name
|
|
22479
|
+
// by adding a data-tt-policy-suffix to the script element with the DOMPurify.
|
|
22480
|
+
// Policy creation with duplicate names throws in Trusted Types.
|
|
22481
|
+
let suffix = null;
|
|
22482
|
+
const ATTR_NAME = 'data-tt-policy-suffix';
|
|
22483
|
+
if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
|
|
22484
|
+
suffix = purifyHostElement.getAttribute(ATTR_NAME);
|
|
22485
|
+
}
|
|
22486
|
+
const policyName = 'dompurify' + (suffix ? '#' + suffix : '');
|
|
22487
|
+
try {
|
|
22488
|
+
return trustedTypes.createPolicy(policyName, {
|
|
22489
|
+
createHTML(html) {
|
|
22490
|
+
return html;
|
|
22491
|
+
},
|
|
22492
|
+
createScriptURL(scriptUrl) {
|
|
22493
|
+
return scriptUrl;
|
|
22494
|
+
}
|
|
22495
|
+
});
|
|
22496
|
+
} catch (_) {
|
|
22497
|
+
// Policy creation failed (most likely another DOMPurify script has
|
|
22498
|
+
// already run). Skip creating the policy, as this will only cause errors
|
|
22499
|
+
// if TT are enforced.
|
|
22500
|
+
console.warn('TrustedTypes policy ' + policyName + ' could not be created.');
|
|
22501
|
+
return null;
|
|
22502
|
+
}
|
|
22503
|
+
};
|
|
22504
|
+
const _createHooksMap = function _createHooksMap() {
|
|
22505
|
+
return {
|
|
22506
|
+
afterSanitizeAttributes: [],
|
|
22507
|
+
afterSanitizeElements: [],
|
|
22508
|
+
afterSanitizeShadowDOM: [],
|
|
22509
|
+
beforeSanitizeAttributes: [],
|
|
22510
|
+
beforeSanitizeElements: [],
|
|
22511
|
+
beforeSanitizeShadowDOM: [],
|
|
22512
|
+
uponSanitizeAttribute: [],
|
|
22513
|
+
uponSanitizeElement: [],
|
|
22514
|
+
uponSanitizeShadowNode: []
|
|
22515
|
+
};
|
|
22516
|
+
};
|
|
22517
|
+
function createDOMPurify() {
|
|
22518
|
+
let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
|
|
22519
|
+
const DOMPurify = root => createDOMPurify(root);
|
|
22520
|
+
DOMPurify.version = '3.2.4';
|
|
22521
|
+
DOMPurify.removed = [];
|
|
22522
|
+
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
|
|
22523
|
+
// Not running in a browser, provide a factory function
|
|
22524
|
+
// so that you can pass your own Window
|
|
22525
|
+
DOMPurify.isSupported = false;
|
|
22526
|
+
return DOMPurify;
|
|
22527
|
+
}
|
|
22528
|
+
let {
|
|
22529
|
+
document
|
|
22530
|
+
} = window;
|
|
22531
|
+
const originalDocument = document;
|
|
22532
|
+
const currentScript = originalDocument.currentScript;
|
|
22533
|
+
const {
|
|
22534
|
+
DocumentFragment,
|
|
22535
|
+
HTMLTemplateElement,
|
|
22536
|
+
Node,
|
|
22537
|
+
Element,
|
|
22538
|
+
NodeFilter,
|
|
22539
|
+
NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,
|
|
22540
|
+
HTMLFormElement,
|
|
22541
|
+
DOMParser,
|
|
22542
|
+
trustedTypes
|
|
22543
|
+
} = window;
|
|
22544
|
+
const ElementPrototype = Element.prototype;
|
|
22545
|
+
const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');
|
|
22546
|
+
const remove = lookupGetter(ElementPrototype, 'remove');
|
|
22547
|
+
const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');
|
|
22548
|
+
const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');
|
|
22549
|
+
const getParentNode = lookupGetter(ElementPrototype, 'parentNode');
|
|
22550
|
+
// As per issue #47, the web-components registry is inherited by a
|
|
22551
|
+
// new document created via createHTMLDocument. As per the spec
|
|
22552
|
+
// (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)
|
|
22553
|
+
// a new empty registry is used when creating a template contents owner
|
|
22554
|
+
// document, so we use that as our parent document to ensure nothing
|
|
22555
|
+
// is inherited.
|
|
22556
|
+
if (typeof HTMLTemplateElement === 'function') {
|
|
22557
|
+
const template = document.createElement('template');
|
|
22558
|
+
if (template.content && template.content.ownerDocument) {
|
|
22559
|
+
document = template.content.ownerDocument;
|
|
22560
|
+
}
|
|
22561
|
+
}
|
|
22562
|
+
let trustedTypesPolicy;
|
|
22563
|
+
let emptyHTML = '';
|
|
22564
|
+
const {
|
|
22565
|
+
implementation,
|
|
22566
|
+
createNodeIterator,
|
|
22567
|
+
createDocumentFragment,
|
|
22568
|
+
getElementsByTagName
|
|
22569
|
+
} = document;
|
|
22570
|
+
const {
|
|
22571
|
+
importNode
|
|
22572
|
+
} = originalDocument;
|
|
22573
|
+
let hooks = _createHooksMap();
|
|
22574
|
+
/**
|
|
22575
|
+
* Expose whether this browser supports running the full DOMPurify.
|
|
22576
|
+
*/
|
|
22577
|
+
DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;
|
|
22578
|
+
const {
|
|
22579
|
+
MUSTACHE_EXPR,
|
|
22580
|
+
ERB_EXPR,
|
|
22581
|
+
TMPLIT_EXPR,
|
|
22582
|
+
DATA_ATTR,
|
|
22583
|
+
ARIA_ATTR,
|
|
22584
|
+
IS_SCRIPT_OR_DATA,
|
|
22585
|
+
ATTR_WHITESPACE,
|
|
22586
|
+
CUSTOM_ELEMENT
|
|
22587
|
+
} = EXPRESSIONS;
|
|
22588
|
+
let {
|
|
22589
|
+
IS_ALLOWED_URI: IS_ALLOWED_URI$1
|
|
22590
|
+
} = EXPRESSIONS;
|
|
22591
|
+
/**
|
|
22592
|
+
* We consider the elements and attributes below to be safe. Ideally
|
|
22593
|
+
* don't add any new ones but feel free to remove unwanted ones.
|
|
22594
|
+
*/
|
|
22595
|
+
/* allowed element names */
|
|
22596
|
+
let ALLOWED_TAGS = null;
|
|
22597
|
+
const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
|
|
22598
|
+
/* Allowed attribute names */
|
|
22599
|
+
let ALLOWED_ATTR = null;
|
|
22600
|
+
const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);
|
|
22601
|
+
/*
|
|
22602
|
+
* Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.
|
|
22603
|
+
* @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)
|
|
22604
|
+
* @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)
|
|
22605
|
+
* @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
|
|
22606
|
+
*/
|
|
22607
|
+
let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
|
|
22608
|
+
tagNameCheck: {
|
|
22609
|
+
writable: true,
|
|
22610
|
+
configurable: false,
|
|
22611
|
+
enumerable: true,
|
|
22612
|
+
value: null
|
|
22613
|
+
},
|
|
22614
|
+
attributeNameCheck: {
|
|
22615
|
+
writable: true,
|
|
22616
|
+
configurable: false,
|
|
22617
|
+
enumerable: true,
|
|
22618
|
+
value: null
|
|
22619
|
+
},
|
|
22620
|
+
allowCustomizedBuiltInElements: {
|
|
22621
|
+
writable: true,
|
|
22622
|
+
configurable: false,
|
|
22623
|
+
enumerable: true,
|
|
22624
|
+
value: false
|
|
22625
|
+
}
|
|
22626
|
+
}));
|
|
22627
|
+
/* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */
|
|
22628
|
+
let FORBID_TAGS = null;
|
|
22629
|
+
/* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
|
|
22630
|
+
let FORBID_ATTR = null;
|
|
22631
|
+
/* Decide if ARIA attributes are okay */
|
|
22632
|
+
let ALLOW_ARIA_ATTR = true;
|
|
22633
|
+
/* Decide if custom data attributes are okay */
|
|
22634
|
+
let ALLOW_DATA_ATTR = true;
|
|
22635
|
+
/* Decide if unknown protocols are okay */
|
|
22636
|
+
let ALLOW_UNKNOWN_PROTOCOLS = false;
|
|
22637
|
+
/* Decide if self-closing tags in attributes are allowed.
|
|
22638
|
+
* Usually removed due to a mXSS issue in jQuery 3.0 */
|
|
22639
|
+
let ALLOW_SELF_CLOSE_IN_ATTR = true;
|
|
22640
|
+
/* Output should be safe for common template engines.
|
|
22641
|
+
* This means, DOMPurify removes data attributes, mustaches and ERB
|
|
22642
|
+
*/
|
|
22643
|
+
let SAFE_FOR_TEMPLATES = false;
|
|
22644
|
+
/* Output should be safe even for XML used within HTML and alike.
|
|
22645
|
+
* This means, DOMPurify removes comments when containing risky content.
|
|
22646
|
+
*/
|
|
22647
|
+
let SAFE_FOR_XML = true;
|
|
22648
|
+
/* Decide if document with <html>... should be returned */
|
|
22649
|
+
let WHOLE_DOCUMENT = false;
|
|
22650
|
+
/* Track whether config is already set on this instance of DOMPurify. */
|
|
22651
|
+
let SET_CONFIG = false;
|
|
22652
|
+
/* Decide if all elements (e.g. style, script) must be children of
|
|
22653
|
+
* document.body. By default, browsers might move them to document.head */
|
|
22654
|
+
let FORCE_BODY = false;
|
|
22655
|
+
/* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html
|
|
22656
|
+
* string (or a TrustedHTML object if Trusted Types are supported).
|
|
22657
|
+
* If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead
|
|
22658
|
+
*/
|
|
22659
|
+
let RETURN_DOM = false;
|
|
22660
|
+
/* Decide if a DOM `DocumentFragment` should be returned, instead of a html
|
|
22661
|
+
* string (or a TrustedHTML object if Trusted Types are supported) */
|
|
22662
|
+
let RETURN_DOM_FRAGMENT = false;
|
|
22663
|
+
/* Try to return a Trusted Type object instead of a string, return a string in
|
|
22664
|
+
* case Trusted Types are not supported */
|
|
22665
|
+
let RETURN_TRUSTED_TYPE = false;
|
|
22666
|
+
/* Output should be free from DOM clobbering attacks?
|
|
22667
|
+
* This sanitizes markups named with colliding, clobberable built-in DOM APIs.
|
|
22668
|
+
*/
|
|
22669
|
+
let SANITIZE_DOM = true;
|
|
22670
|
+
/* Achieve full DOM Clobbering protection by isolating the namespace of named
|
|
22671
|
+
* properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.
|
|
22672
|
+
*
|
|
22673
|
+
* HTML/DOM spec rules that enable DOM Clobbering:
|
|
22674
|
+
* - Named Access on Window (§7.3.3)
|
|
22675
|
+
* - DOM Tree Accessors (§3.1.5)
|
|
22676
|
+
* - Form Element Parent-Child Relations (§4.10.3)
|
|
22677
|
+
* - Iframe srcdoc / Nested WindowProxies (§4.8.5)
|
|
22678
|
+
* - HTMLCollection (§4.2.10.2)
|
|
22679
|
+
*
|
|
22680
|
+
* Namespace isolation is implemented by prefixing `id` and `name` attributes
|
|
22681
|
+
* with a constant string, i.e., `user-content-`
|
|
22682
|
+
*/
|
|
22683
|
+
let SANITIZE_NAMED_PROPS = false;
|
|
22684
|
+
const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';
|
|
22685
|
+
/* Keep element content when removing element? */
|
|
22686
|
+
let KEEP_CONTENT = true;
|
|
22687
|
+
/* If a `Node` is passed to sanitize(), then performs sanitization in-place instead
|
|
22688
|
+
* of importing it into a new Document and returning a sanitized copy */
|
|
22689
|
+
let IN_PLACE = false;
|
|
22690
|
+
/* Allow usage of profiles like html, svg and mathMl */
|
|
22691
|
+
let USE_PROFILES = {};
|
|
22692
|
+
/* Tags to ignore content of when KEEP_CONTENT is true */
|
|
22693
|
+
let FORBID_CONTENTS = null;
|
|
22694
|
+
const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
|
|
22695
|
+
/* Tags that are safe for data: URIs */
|
|
22696
|
+
let DATA_URI_TAGS = null;
|
|
22697
|
+
const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
|
|
22698
|
+
/* Attributes safe for values like "javascript:" */
|
|
22699
|
+
let URI_SAFE_ATTRIBUTES = null;
|
|
22700
|
+
const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);
|
|
22701
|
+
const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
|
|
22702
|
+
const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
|
|
22703
|
+
const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
|
|
22704
|
+
/* Document namespace */
|
|
22705
|
+
let NAMESPACE = HTML_NAMESPACE;
|
|
22706
|
+
let IS_EMPTY_INPUT = false;
|
|
22707
|
+
/* Allowed XHTML+XML namespaces */
|
|
22708
|
+
let ALLOWED_NAMESPACES = null;
|
|
22709
|
+
const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
|
|
22710
|
+
let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);
|
|
22711
|
+
let HTML_INTEGRATION_POINTS = addToSet({}, ['annotation-xml']);
|
|
22712
|
+
// Certain elements are allowed in both SVG and HTML
|
|
22713
|
+
// namespace. We need to specify them explicitly
|
|
22714
|
+
// so that they don't get erroneously deleted from
|
|
22715
|
+
// HTML namespace.
|
|
22716
|
+
const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);
|
|
22717
|
+
/* Parsing of strict XHTML documents */
|
|
22718
|
+
let PARSER_MEDIA_TYPE = null;
|
|
22719
|
+
const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];
|
|
22720
|
+
const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';
|
|
22721
|
+
let transformCaseFunc = null;
|
|
22722
|
+
/* Keep a reference to config to pass to hooks */
|
|
22723
|
+
let CONFIG = null;
|
|
22724
|
+
/* Ideally, do not touch anything below this line */
|
|
22725
|
+
/* ______________________________________________ */
|
|
22726
|
+
const formElement = document.createElement('form');
|
|
22727
|
+
const isRegexOrFunction = function isRegexOrFunction(testValue) {
|
|
22728
|
+
return testValue instanceof RegExp || testValue instanceof Function;
|
|
22729
|
+
};
|
|
22730
|
+
/**
|
|
22731
|
+
* _parseConfig
|
|
22732
|
+
*
|
|
22733
|
+
* @param cfg optional config literal
|
|
22734
|
+
*/
|
|
22735
|
+
// eslint-disable-next-line complexity
|
|
22736
|
+
const _parseConfig = function _parseConfig() {
|
|
22737
|
+
let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
22738
|
+
if (CONFIG && CONFIG === cfg) {
|
|
22739
|
+
return;
|
|
22740
|
+
}
|
|
22741
|
+
/* Shield configuration object from tampering */
|
|
22742
|
+
if (!cfg || typeof cfg !== 'object') {
|
|
22743
|
+
cfg = {};
|
|
22744
|
+
}
|
|
22745
|
+
/* Shield configuration object from prototype pollution */
|
|
22746
|
+
cfg = clone(cfg);
|
|
22747
|
+
PARSER_MEDIA_TYPE =
|
|
22748
|
+
// eslint-disable-next-line unicorn/prefer-includes
|
|
22749
|
+
SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
|
|
22750
|
+
// HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
|
|
22751
|
+
transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;
|
|
22752
|
+
/* Set configuration parameters */
|
|
22753
|
+
ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
|
|
22754
|
+
ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
|
|
22755
|
+
ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
|
|
22756
|
+
URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
|
|
22757
|
+
DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
|
|
22758
|
+
FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
|
|
22759
|
+
FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};
|
|
22760
|
+
FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};
|
|
22761
|
+
USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;
|
|
22762
|
+
ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
|
|
22763
|
+
ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
|
|
22764
|
+
ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false
|
|
22765
|
+
ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true
|
|
22766
|
+
SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false
|
|
22767
|
+
SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true
|
|
22768
|
+
WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false
|
|
22769
|
+
RETURN_DOM = cfg.RETURN_DOM || false; // Default false
|
|
22770
|
+
RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false
|
|
22771
|
+
RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false
|
|
22772
|
+
FORCE_BODY = cfg.FORCE_BODY || false; // Default false
|
|
22773
|
+
SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true
|
|
22774
|
+
SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false
|
|
22775
|
+
KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true
|
|
22776
|
+
IN_PLACE = cfg.IN_PLACE || false; // Default false
|
|
22777
|
+
IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
|
|
22778
|
+
NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
|
|
22779
|
+
MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
|
|
22780
|
+
HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
|
|
22781
|
+
CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
|
|
22782
|
+
if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
|
|
22783
|
+
CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
|
|
22784
|
+
}
|
|
22785
|
+
if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
|
|
22786
|
+
CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
|
|
22787
|
+
}
|
|
22788
|
+
if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {
|
|
22789
|
+
CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
|
|
22790
|
+
}
|
|
22791
|
+
if (SAFE_FOR_TEMPLATES) {
|
|
22792
|
+
ALLOW_DATA_ATTR = false;
|
|
22793
|
+
}
|
|
22794
|
+
if (RETURN_DOM_FRAGMENT) {
|
|
22795
|
+
RETURN_DOM = true;
|
|
22796
|
+
}
|
|
22797
|
+
/* Parse profile info */
|
|
22798
|
+
if (USE_PROFILES) {
|
|
22799
|
+
ALLOWED_TAGS = addToSet({}, text);
|
|
22800
|
+
ALLOWED_ATTR = [];
|
|
22801
|
+
if (USE_PROFILES.html === true) {
|
|
22802
|
+
addToSet(ALLOWED_TAGS, html$1);
|
|
22803
|
+
addToSet(ALLOWED_ATTR, html);
|
|
22804
|
+
}
|
|
22805
|
+
if (USE_PROFILES.svg === true) {
|
|
22806
|
+
addToSet(ALLOWED_TAGS, svg$1);
|
|
22807
|
+
addToSet(ALLOWED_ATTR, svg);
|
|
22808
|
+
addToSet(ALLOWED_ATTR, xml);
|
|
22809
|
+
}
|
|
22810
|
+
if (USE_PROFILES.svgFilters === true) {
|
|
22811
|
+
addToSet(ALLOWED_TAGS, svgFilters);
|
|
22812
|
+
addToSet(ALLOWED_ATTR, svg);
|
|
22813
|
+
addToSet(ALLOWED_ATTR, xml);
|
|
22814
|
+
}
|
|
22815
|
+
if (USE_PROFILES.mathMl === true) {
|
|
22816
|
+
addToSet(ALLOWED_TAGS, mathMl$1);
|
|
22817
|
+
addToSet(ALLOWED_ATTR, mathMl);
|
|
22818
|
+
addToSet(ALLOWED_ATTR, xml);
|
|
22819
|
+
}
|
|
22820
|
+
}
|
|
22821
|
+
/* Merge configuration parameters */
|
|
22822
|
+
if (cfg.ADD_TAGS) {
|
|
22823
|
+
if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
|
|
22824
|
+
ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
|
22825
|
+
}
|
|
22826
|
+
addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
|
|
22827
|
+
}
|
|
22828
|
+
if (cfg.ADD_ATTR) {
|
|
22829
|
+
if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
|
|
22830
|
+
ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
|
22831
|
+
}
|
|
22832
|
+
addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
|
|
22833
|
+
}
|
|
22834
|
+
if (cfg.ADD_URI_SAFE_ATTR) {
|
|
22835
|
+
addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
|
|
22836
|
+
}
|
|
22837
|
+
if (cfg.FORBID_CONTENTS) {
|
|
22838
|
+
if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
|
|
22839
|
+
FORBID_CONTENTS = clone(FORBID_CONTENTS);
|
|
22840
|
+
}
|
|
22841
|
+
addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
|
|
22842
|
+
}
|
|
22843
|
+
/* Add #text in case KEEP_CONTENT is set to true */
|
|
22844
|
+
if (KEEP_CONTENT) {
|
|
22845
|
+
ALLOWED_TAGS['#text'] = true;
|
|
22846
|
+
}
|
|
22847
|
+
/* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */
|
|
22848
|
+
if (WHOLE_DOCUMENT) {
|
|
22849
|
+
addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);
|
|
22850
|
+
}
|
|
22851
|
+
/* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */
|
|
22852
|
+
if (ALLOWED_TAGS.table) {
|
|
22853
|
+
addToSet(ALLOWED_TAGS, ['tbody']);
|
|
22854
|
+
delete FORBID_TAGS.tbody;
|
|
22855
|
+
}
|
|
22856
|
+
if (cfg.TRUSTED_TYPES_POLICY) {
|
|
22857
|
+
if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {
|
|
22858
|
+
throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
22859
|
+
}
|
|
22860
|
+
if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {
|
|
22861
|
+
throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
22862
|
+
}
|
|
22863
|
+
// Overwrite existing TrustedTypes policy.
|
|
22864
|
+
trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
|
|
22865
|
+
// Sign local variables required by `sanitize`.
|
|
22866
|
+
emptyHTML = trustedTypesPolicy.createHTML('');
|
|
22867
|
+
} else {
|
|
22868
|
+
// Uninitialized policy, attempt to initialize the internal dompurify policy.
|
|
22869
|
+
if (trustedTypesPolicy === undefined) {
|
|
22870
|
+
trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
|
|
22871
|
+
}
|
|
22872
|
+
// If creating the internal policy succeeded sign internal variables.
|
|
22873
|
+
if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {
|
|
22874
|
+
emptyHTML = trustedTypesPolicy.createHTML('');
|
|
22875
|
+
}
|
|
22876
|
+
}
|
|
22877
|
+
// Prevent further manipulation of configuration.
|
|
22878
|
+
// Not available in IE8, Safari 5, etc.
|
|
22879
|
+
if (freeze) {
|
|
22880
|
+
freeze(cfg);
|
|
22881
|
+
}
|
|
22882
|
+
CONFIG = cfg;
|
|
22883
|
+
};
|
|
22884
|
+
/* Keep track of all possible SVG and MathML tags
|
|
22885
|
+
* so that we can perform the namespace checks
|
|
22886
|
+
* correctly. */
|
|
22887
|
+
const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
|
|
22888
|
+
const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
|
|
22889
|
+
/**
|
|
22890
|
+
* @param element a DOM element whose namespace is being checked
|
|
22891
|
+
* @returns Return false if the element has a
|
|
22892
|
+
* namespace that a spec-compliant parser would never
|
|
22893
|
+
* return. Return true otherwise.
|
|
22894
|
+
*/
|
|
22895
|
+
const _checkValidNamespace = function _checkValidNamespace(element) {
|
|
22896
|
+
let parent = getParentNode(element);
|
|
22897
|
+
// In JSDOM, if we're inside shadow DOM, then parentNode
|
|
22898
|
+
// can be null. We just simulate parent in this case.
|
|
22899
|
+
if (!parent || !parent.tagName) {
|
|
22900
|
+
parent = {
|
|
22901
|
+
namespaceURI: NAMESPACE,
|
|
22902
|
+
tagName: 'template'
|
|
22903
|
+
};
|
|
22904
|
+
}
|
|
22905
|
+
const tagName = stringToLowerCase(element.tagName);
|
|
22906
|
+
const parentTagName = stringToLowerCase(parent.tagName);
|
|
22907
|
+
if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
|
|
22908
|
+
return false;
|
|
22909
|
+
}
|
|
22910
|
+
if (element.namespaceURI === SVG_NAMESPACE) {
|
|
22911
|
+
// The only way to switch from HTML namespace to SVG
|
|
22912
|
+
// is via <svg>. If it happens via any other tag, then
|
|
22913
|
+
// it should be killed.
|
|
22914
|
+
if (parent.namespaceURI === HTML_NAMESPACE) {
|
|
22915
|
+
return tagName === 'svg';
|
|
22916
|
+
}
|
|
22917
|
+
// The only way to switch from MathML to SVG is via`
|
|
22918
|
+
// svg if parent is either <annotation-xml> or MathML
|
|
22919
|
+
// text integration points.
|
|
22920
|
+
if (parent.namespaceURI === MATHML_NAMESPACE) {
|
|
22921
|
+
return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
|
|
22922
|
+
}
|
|
22923
|
+
// We only allow elements that are defined in SVG
|
|
22924
|
+
// spec. All others are disallowed in SVG namespace.
|
|
22925
|
+
return Boolean(ALL_SVG_TAGS[tagName]);
|
|
22926
|
+
}
|
|
22927
|
+
if (element.namespaceURI === MATHML_NAMESPACE) {
|
|
22928
|
+
// The only way to switch from HTML namespace to MathML
|
|
22929
|
+
// is via <math>. If it happens via any other tag, then
|
|
22930
|
+
// it should be killed.
|
|
22931
|
+
if (parent.namespaceURI === HTML_NAMESPACE) {
|
|
22932
|
+
return tagName === 'math';
|
|
22933
|
+
}
|
|
22934
|
+
// The only way to switch from SVG to MathML is via
|
|
22935
|
+
// <math> and HTML integration points
|
|
22936
|
+
if (parent.namespaceURI === SVG_NAMESPACE) {
|
|
22937
|
+
return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
|
|
22938
|
+
}
|
|
22939
|
+
// We only allow elements that are defined in MathML
|
|
22940
|
+
// spec. All others are disallowed in MathML namespace.
|
|
22941
|
+
return Boolean(ALL_MATHML_TAGS[tagName]);
|
|
22942
|
+
}
|
|
22943
|
+
if (element.namespaceURI === HTML_NAMESPACE) {
|
|
22944
|
+
// The only way to switch from SVG to HTML is via
|
|
22945
|
+
// HTML integration points, and from MathML to HTML
|
|
22946
|
+
// is via MathML text integration points
|
|
22947
|
+
if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
|
|
22948
|
+
return false;
|
|
22949
|
+
}
|
|
22950
|
+
if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
|
|
22951
|
+
return false;
|
|
22952
|
+
}
|
|
22953
|
+
// We disallow tags that are specific for MathML
|
|
22954
|
+
// or SVG and should never appear in HTML namespace
|
|
22955
|
+
return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
|
|
22956
|
+
}
|
|
22957
|
+
// For XHTML and XML documents that support custom namespaces
|
|
22958
|
+
if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {
|
|
22959
|
+
return true;
|
|
22960
|
+
}
|
|
22961
|
+
// The code should never reach this place (this means
|
|
22962
|
+
// that the element somehow got namespace that is not
|
|
22963
|
+
// HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).
|
|
22964
|
+
// Return false just in case.
|
|
22965
|
+
return false;
|
|
22966
|
+
};
|
|
22967
|
+
/**
|
|
22968
|
+
* _forceRemove
|
|
22969
|
+
*
|
|
22970
|
+
* @param node a DOM node
|
|
22971
|
+
*/
|
|
22972
|
+
const _forceRemove = function _forceRemove(node) {
|
|
22973
|
+
arrayPush(DOMPurify.removed, {
|
|
22974
|
+
element: node
|
|
22975
|
+
});
|
|
22976
|
+
try {
|
|
22977
|
+
// eslint-disable-next-line unicorn/prefer-dom-node-remove
|
|
22978
|
+
getParentNode(node).removeChild(node);
|
|
22979
|
+
} catch (_) {
|
|
22980
|
+
remove(node);
|
|
22981
|
+
}
|
|
22982
|
+
};
|
|
22983
|
+
/**
|
|
22984
|
+
* _removeAttribute
|
|
22985
|
+
*
|
|
22986
|
+
* @param name an Attribute name
|
|
22987
|
+
* @param element a DOM node
|
|
22988
|
+
*/
|
|
22989
|
+
const _removeAttribute = function _removeAttribute(name, element) {
|
|
22990
|
+
try {
|
|
22991
|
+
arrayPush(DOMPurify.removed, {
|
|
22992
|
+
attribute: element.getAttributeNode(name),
|
|
22993
|
+
from: element
|
|
22994
|
+
});
|
|
22995
|
+
} catch (_) {
|
|
22996
|
+
arrayPush(DOMPurify.removed, {
|
|
22997
|
+
attribute: null,
|
|
22998
|
+
from: element
|
|
22999
|
+
});
|
|
23000
|
+
}
|
|
23001
|
+
element.removeAttribute(name);
|
|
23002
|
+
// We void attribute values for unremovable "is" attributes
|
|
23003
|
+
if (name === 'is') {
|
|
23004
|
+
if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
|
|
23005
|
+
try {
|
|
23006
|
+
_forceRemove(element);
|
|
23007
|
+
} catch (_) {}
|
|
23008
|
+
} else {
|
|
23009
|
+
try {
|
|
23010
|
+
element.setAttribute(name, '');
|
|
23011
|
+
} catch (_) {}
|
|
23012
|
+
}
|
|
23013
|
+
}
|
|
23014
|
+
};
|
|
23015
|
+
/**
|
|
23016
|
+
* _initDocument
|
|
23017
|
+
*
|
|
23018
|
+
* @param dirty - a string of dirty markup
|
|
23019
|
+
* @return a DOM, filled with the dirty markup
|
|
23020
|
+
*/
|
|
23021
|
+
const _initDocument = function _initDocument(dirty) {
|
|
23022
|
+
/* Create a HTML document */
|
|
23023
|
+
let doc = null;
|
|
23024
|
+
let leadingWhitespace = null;
|
|
23025
|
+
if (FORCE_BODY) {
|
|
23026
|
+
dirty = '<remove></remove>' + dirty;
|
|
23027
|
+
} else {
|
|
23028
|
+
/* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */
|
|
23029
|
+
const matches = stringMatch(dirty, /^[\r\n\t ]+/);
|
|
23030
|
+
leadingWhitespace = matches && matches[0];
|
|
23031
|
+
}
|
|
23032
|
+
if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {
|
|
23033
|
+
// Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)
|
|
23034
|
+
dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + '</body></html>';
|
|
23035
|
+
}
|
|
23036
|
+
const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
|
|
23037
|
+
/*
|
|
23038
|
+
* Use the DOMParser API by default, fallback later if needs be
|
|
23039
|
+
* DOMParser not work for svg when has multiple root element.
|
|
23040
|
+
*/
|
|
23041
|
+
if (NAMESPACE === HTML_NAMESPACE) {
|
|
23042
|
+
try {
|
|
23043
|
+
doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
|
|
23044
|
+
} catch (_) {}
|
|
23045
|
+
}
|
|
23046
|
+
/* Use createHTMLDocument in case DOMParser is not available */
|
|
23047
|
+
if (!doc || !doc.documentElement) {
|
|
23048
|
+
doc = implementation.createDocument(NAMESPACE, 'template', null);
|
|
23049
|
+
try {
|
|
23050
|
+
doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
|
|
23051
|
+
} catch (_) {
|
|
23052
|
+
// Syntax error if dirtyPayload is invalid xml
|
|
23053
|
+
}
|
|
23054
|
+
}
|
|
23055
|
+
const body = doc.body || doc.documentElement;
|
|
23056
|
+
if (dirty && leadingWhitespace) {
|
|
23057
|
+
body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
|
|
23058
|
+
}
|
|
23059
|
+
/* Work on whole document or just its body */
|
|
23060
|
+
if (NAMESPACE === HTML_NAMESPACE) {
|
|
23061
|
+
return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];
|
|
23062
|
+
}
|
|
23063
|
+
return WHOLE_DOCUMENT ? doc.documentElement : body;
|
|
23064
|
+
};
|
|
23065
|
+
/**
|
|
23066
|
+
* Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
|
|
23067
|
+
*
|
|
23068
|
+
* @param root The root element or node to start traversing on.
|
|
23069
|
+
* @return The created NodeIterator
|
|
23070
|
+
*/
|
|
23071
|
+
const _createNodeIterator = function _createNodeIterator(root) {
|
|
23072
|
+
return createNodeIterator.call(root.ownerDocument || root, root,
|
|
23073
|
+
// eslint-disable-next-line no-bitwise
|
|
23074
|
+
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
|
|
23075
|
+
};
|
|
23076
|
+
/**
|
|
23077
|
+
* _isClobbered
|
|
23078
|
+
*
|
|
23079
|
+
* @param element element to check for clobbering attacks
|
|
23080
|
+
* @return true if clobbered, false if safe
|
|
23081
|
+
*/
|
|
23082
|
+
const _isClobbered = function _isClobbered(element) {
|
|
23083
|
+
return element instanceof HTMLFormElement && (typeof element.nodeName !== 'string' || typeof element.textContent !== 'string' || typeof element.removeChild !== 'function' || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== 'function' || typeof element.setAttribute !== 'function' || typeof element.namespaceURI !== 'string' || typeof element.insertBefore !== 'function' || typeof element.hasChildNodes !== 'function');
|
|
23084
|
+
};
|
|
23085
|
+
/**
|
|
23086
|
+
* Checks whether the given object is a DOM node.
|
|
23087
|
+
*
|
|
23088
|
+
* @param value object to check whether it's a DOM node
|
|
23089
|
+
* @return true is object is a DOM node
|
|
23090
|
+
*/
|
|
23091
|
+
const _isNode = function _isNode(value) {
|
|
23092
|
+
return typeof Node === 'function' && value instanceof Node;
|
|
23093
|
+
};
|
|
23094
|
+
function _executeHooks(hooks, currentNode, data) {
|
|
23095
|
+
arrayForEach(hooks, hook => {
|
|
23096
|
+
hook.call(DOMPurify, currentNode, data, CONFIG);
|
|
23097
|
+
});
|
|
23098
|
+
}
|
|
23099
|
+
/**
|
|
23100
|
+
* _sanitizeElements
|
|
23101
|
+
*
|
|
23102
|
+
* @protect nodeName
|
|
23103
|
+
* @protect textContent
|
|
23104
|
+
* @protect removeChild
|
|
23105
|
+
* @param currentNode to check for permission to exist
|
|
23106
|
+
* @return true if node was killed, false if left alive
|
|
23107
|
+
*/
|
|
23108
|
+
const _sanitizeElements = function _sanitizeElements(currentNode) {
|
|
23109
|
+
let content = null;
|
|
23110
|
+
/* Execute a hook if present */
|
|
23111
|
+
_executeHooks(hooks.beforeSanitizeElements, currentNode, null);
|
|
23112
|
+
/* Check if element is clobbered or can clobber */
|
|
23113
|
+
if (_isClobbered(currentNode)) {
|
|
23114
|
+
_forceRemove(currentNode);
|
|
23115
|
+
return true;
|
|
23116
|
+
}
|
|
23117
|
+
/* Now let's check the element's type and name */
|
|
23118
|
+
const tagName = transformCaseFunc(currentNode.nodeName);
|
|
23119
|
+
/* Execute a hook if present */
|
|
23120
|
+
_executeHooks(hooks.uponSanitizeElement, currentNode, {
|
|
23121
|
+
tagName,
|
|
23122
|
+
allowedTags: ALLOWED_TAGS
|
|
23123
|
+
});
|
|
23124
|
+
/* Detect mXSS attempts abusing namespace confusion */
|
|
23125
|
+
if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) {
|
|
23126
|
+
_forceRemove(currentNode);
|
|
23127
|
+
return true;
|
|
23128
|
+
}
|
|
23129
|
+
/* Remove any occurrence of processing instructions */
|
|
23130
|
+
if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
|
|
23131
|
+
_forceRemove(currentNode);
|
|
23132
|
+
return true;
|
|
23133
|
+
}
|
|
23134
|
+
/* Remove any kind of possibly harmful comments */
|
|
23135
|
+
if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
|
|
23136
|
+
_forceRemove(currentNode);
|
|
23137
|
+
return true;
|
|
23138
|
+
}
|
|
23139
|
+
/* Remove element if anything forbids its presence */
|
|
23140
|
+
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
|
23141
|
+
/* Check if we have a custom element to handle */
|
|
23142
|
+
if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
|
|
23143
|
+
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
|
|
23144
|
+
return false;
|
|
23145
|
+
}
|
|
23146
|
+
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
|
|
23147
|
+
return false;
|
|
23148
|
+
}
|
|
23149
|
+
}
|
|
23150
|
+
/* Keep content except for bad-listed elements */
|
|
23151
|
+
if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
|
|
23152
|
+
const parentNode = getParentNode(currentNode) || currentNode.parentNode;
|
|
23153
|
+
const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
|
|
23154
|
+
if (childNodes && parentNode) {
|
|
23155
|
+
const childCount = childNodes.length;
|
|
23156
|
+
for (let i = childCount - 1; i >= 0; --i) {
|
|
23157
|
+
const childClone = cloneNode(childNodes[i], true);
|
|
23158
|
+
childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
|
|
23159
|
+
parentNode.insertBefore(childClone, getNextSibling(currentNode));
|
|
23160
|
+
}
|
|
23161
|
+
}
|
|
23162
|
+
}
|
|
23163
|
+
_forceRemove(currentNode);
|
|
23164
|
+
return true;
|
|
23165
|
+
}
|
|
23166
|
+
/* Check whether element has a valid namespace */
|
|
23167
|
+
if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
|
|
23168
|
+
_forceRemove(currentNode);
|
|
23169
|
+
return true;
|
|
23170
|
+
}
|
|
23171
|
+
/* Make sure that older browsers don't get fallback-tag mXSS */
|
|
23172
|
+
if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
|
|
23173
|
+
_forceRemove(currentNode);
|
|
23174
|
+
return true;
|
|
23175
|
+
}
|
|
23176
|
+
/* Sanitize element content to be template-safe */
|
|
23177
|
+
if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
|
|
23178
|
+
/* Get the element's text content */
|
|
23179
|
+
content = currentNode.textContent;
|
|
23180
|
+
arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
|
|
23181
|
+
content = stringReplace(content, expr, ' ');
|
|
23182
|
+
});
|
|
23183
|
+
if (currentNode.textContent !== content) {
|
|
23184
|
+
arrayPush(DOMPurify.removed, {
|
|
23185
|
+
element: currentNode.cloneNode()
|
|
23186
|
+
});
|
|
23187
|
+
currentNode.textContent = content;
|
|
23188
|
+
}
|
|
23189
|
+
}
|
|
23190
|
+
/* Execute a hook if present */
|
|
23191
|
+
_executeHooks(hooks.afterSanitizeElements, currentNode, null);
|
|
23192
|
+
return false;
|
|
23193
|
+
};
|
|
23194
|
+
/**
|
|
23195
|
+
* _isValidAttribute
|
|
23196
|
+
*
|
|
23197
|
+
* @param lcTag Lowercase tag name of containing element.
|
|
23198
|
+
* @param lcName Lowercase attribute name.
|
|
23199
|
+
* @param value Attribute value.
|
|
23200
|
+
* @return Returns true if `value` is valid, otherwise false.
|
|
23201
|
+
*/
|
|
23202
|
+
// eslint-disable-next-line complexity
|
|
23203
|
+
const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
|
|
23204
|
+
/* Make sure attribute cannot clobber */
|
|
23205
|
+
if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {
|
|
23206
|
+
return false;
|
|
23207
|
+
}
|
|
23208
|
+
/* Allow valid data-* attributes: At least one character after "-"
|
|
23209
|
+
(https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
|
|
23210
|
+
XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
|
|
23211
|
+
We don't need to check the value; it's always URI safe. */
|
|
23212
|
+
if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
|
|
23213
|
+
if (
|
|
23214
|
+
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
23215
|
+
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
23216
|
+
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
23217
|
+
_isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||
|
|
23218
|
+
// Alternative, second condition checks if it's an `is`-attribute, AND
|
|
23219
|
+
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
23220
|
+
lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {
|
|
23221
|
+
return false;
|
|
23222
|
+
}
|
|
23223
|
+
/* Check value is safe. First, is attr inert? If so, is safe */
|
|
23224
|
+
} else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {
|
|
23225
|
+
return false;
|
|
23226
|
+
} else ;
|
|
23227
|
+
return true;
|
|
23228
|
+
};
|
|
23229
|
+
/**
|
|
23230
|
+
* _isBasicCustomElement
|
|
23231
|
+
* checks if at least one dash is included in tagName, and it's not the first char
|
|
23232
|
+
* for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
|
|
23233
|
+
*
|
|
23234
|
+
* @param tagName name of the tag of the node to sanitize
|
|
23235
|
+
* @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.
|
|
23236
|
+
*/
|
|
23237
|
+
const _isBasicCustomElement = function _isBasicCustomElement(tagName) {
|
|
23238
|
+
return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);
|
|
23239
|
+
};
|
|
23240
|
+
/**
|
|
23241
|
+
* _sanitizeAttributes
|
|
23242
|
+
*
|
|
23243
|
+
* @protect attributes
|
|
23244
|
+
* @protect nodeName
|
|
23245
|
+
* @protect removeAttribute
|
|
23246
|
+
* @protect setAttribute
|
|
23247
|
+
*
|
|
23248
|
+
* @param currentNode to sanitize
|
|
23249
|
+
*/
|
|
23250
|
+
const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
|
|
23251
|
+
/* Execute a hook if present */
|
|
23252
|
+
_executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
|
|
23253
|
+
const {
|
|
23254
|
+
attributes
|
|
23255
|
+
} = currentNode;
|
|
23256
|
+
/* Check if we have attributes; if not we might have a text node */
|
|
23257
|
+
if (!attributes || _isClobbered(currentNode)) {
|
|
23258
|
+
return;
|
|
23259
|
+
}
|
|
23260
|
+
const hookEvent = {
|
|
23261
|
+
attrName: '',
|
|
23262
|
+
attrValue: '',
|
|
23263
|
+
keepAttr: true,
|
|
23264
|
+
allowedAttributes: ALLOWED_ATTR,
|
|
23265
|
+
forceKeepAttr: undefined
|
|
23266
|
+
};
|
|
23267
|
+
let l = attributes.length;
|
|
23268
|
+
/* Go backwards over all attributes; safely remove bad ones */
|
|
23269
|
+
while (l--) {
|
|
23270
|
+
const attr = attributes[l];
|
|
23271
|
+
const {
|
|
23272
|
+
name,
|
|
23273
|
+
namespaceURI,
|
|
23274
|
+
value: attrValue
|
|
23275
|
+
} = attr;
|
|
23276
|
+
const lcName = transformCaseFunc(name);
|
|
23277
|
+
let value = name === 'value' ? attrValue : stringTrim(attrValue);
|
|
23278
|
+
/* Execute a hook if present */
|
|
23279
|
+
hookEvent.attrName = lcName;
|
|
23280
|
+
hookEvent.attrValue = value;
|
|
23281
|
+
hookEvent.keepAttr = true;
|
|
23282
|
+
hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set
|
|
23283
|
+
_executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
|
|
23284
|
+
value = hookEvent.attrValue;
|
|
23285
|
+
/* Full DOM Clobbering protection via namespace isolation,
|
|
23286
|
+
* Prefix id and name attributes with `user-content-`
|
|
23287
|
+
*/
|
|
23288
|
+
if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {
|
|
23289
|
+
// Remove the attribute with this value
|
|
23290
|
+
_removeAttribute(name, currentNode);
|
|
23291
|
+
// Prefix the value and later re-create the attribute with the sanitized value
|
|
23292
|
+
value = SANITIZE_NAMED_PROPS_PREFIX + value;
|
|
23293
|
+
}
|
|
23294
|
+
/* Work around a security issue with comments inside attributes */
|
|
23295
|
+
if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title)/i, value)) {
|
|
23296
|
+
_removeAttribute(name, currentNode);
|
|
23297
|
+
continue;
|
|
23298
|
+
}
|
|
23299
|
+
/* Did the hooks approve of the attribute? */
|
|
23300
|
+
if (hookEvent.forceKeepAttr) {
|
|
23301
|
+
continue;
|
|
23302
|
+
}
|
|
23303
|
+
/* Remove attribute */
|
|
23304
|
+
_removeAttribute(name, currentNode);
|
|
23305
|
+
/* Did the hooks approve of the attribute? */
|
|
23306
|
+
if (!hookEvent.keepAttr) {
|
|
23307
|
+
continue;
|
|
23308
|
+
}
|
|
23309
|
+
/* Work around a security issue in jQuery 3.0 */
|
|
23310
|
+
if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
|
|
23311
|
+
_removeAttribute(name, currentNode);
|
|
23312
|
+
continue;
|
|
23313
|
+
}
|
|
23314
|
+
/* Sanitize attribute content to be template-safe */
|
|
23315
|
+
if (SAFE_FOR_TEMPLATES) {
|
|
23316
|
+
arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
|
|
23317
|
+
value = stringReplace(value, expr, ' ');
|
|
23318
|
+
});
|
|
23319
|
+
}
|
|
23320
|
+
/* Is `value` valid for this attribute? */
|
|
23321
|
+
const lcTag = transformCaseFunc(currentNode.nodeName);
|
|
23322
|
+
if (!_isValidAttribute(lcTag, lcName, value)) {
|
|
23323
|
+
continue;
|
|
23324
|
+
}
|
|
23325
|
+
/* Handle attributes that require Trusted Types */
|
|
23326
|
+
if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {
|
|
23327
|
+
if (namespaceURI) ; else {
|
|
23328
|
+
switch (trustedTypes.getAttributeType(lcTag, lcName)) {
|
|
23329
|
+
case 'TrustedHTML':
|
|
23330
|
+
{
|
|
23331
|
+
value = trustedTypesPolicy.createHTML(value);
|
|
23332
|
+
break;
|
|
23333
|
+
}
|
|
23334
|
+
case 'TrustedScriptURL':
|
|
23335
|
+
{
|
|
23336
|
+
value = trustedTypesPolicy.createScriptURL(value);
|
|
23337
|
+
break;
|
|
23338
|
+
}
|
|
23339
|
+
}
|
|
23340
|
+
}
|
|
23341
|
+
}
|
|
23342
|
+
/* Handle invalid data-* attribute set by try-catching it */
|
|
23343
|
+
try {
|
|
23344
|
+
if (namespaceURI) {
|
|
23345
|
+
currentNode.setAttributeNS(namespaceURI, name, value);
|
|
23346
|
+
} else {
|
|
23347
|
+
/* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
|
|
23348
|
+
currentNode.setAttribute(name, value);
|
|
23349
|
+
}
|
|
23350
|
+
if (_isClobbered(currentNode)) {
|
|
23351
|
+
_forceRemove(currentNode);
|
|
23352
|
+
} else {
|
|
23353
|
+
arrayPop(DOMPurify.removed);
|
|
23354
|
+
}
|
|
23355
|
+
} catch (_) {}
|
|
23356
|
+
}
|
|
23357
|
+
/* Execute a hook if present */
|
|
23358
|
+
_executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
|
|
23359
|
+
};
|
|
23360
|
+
/**
|
|
23361
|
+
* _sanitizeShadowDOM
|
|
23362
|
+
*
|
|
23363
|
+
* @param fragment to iterate over recursively
|
|
23364
|
+
*/
|
|
23365
|
+
const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
|
|
23366
|
+
let shadowNode = null;
|
|
23367
|
+
const shadowIterator = _createNodeIterator(fragment);
|
|
23368
|
+
/* Execute a hook if present */
|
|
23369
|
+
_executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
|
|
23370
|
+
while (shadowNode = shadowIterator.nextNode()) {
|
|
23371
|
+
/* Execute a hook if present */
|
|
23372
|
+
_executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
|
|
23373
|
+
/* Sanitize tags and elements */
|
|
23374
|
+
_sanitizeElements(shadowNode);
|
|
23375
|
+
/* Check attributes next */
|
|
23376
|
+
_sanitizeAttributes(shadowNode);
|
|
23377
|
+
/* Deep shadow DOM detected */
|
|
23378
|
+
if (shadowNode.content instanceof DocumentFragment) {
|
|
23379
|
+
_sanitizeShadowDOM(shadowNode.content);
|
|
23380
|
+
}
|
|
23381
|
+
}
|
|
23382
|
+
/* Execute a hook if present */
|
|
23383
|
+
_executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
|
|
23384
|
+
};
|
|
23385
|
+
// eslint-disable-next-line complexity
|
|
23386
|
+
DOMPurify.sanitize = function (dirty) {
|
|
23387
|
+
let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
23388
|
+
let body = null;
|
|
23389
|
+
let importedNode = null;
|
|
23390
|
+
let currentNode = null;
|
|
23391
|
+
let returnNode = null;
|
|
23392
|
+
/* Make sure we have a string to sanitize.
|
|
23393
|
+
DO NOT return early, as this will return the wrong type if
|
|
23394
|
+
the user has requested a DOM object rather than a string */
|
|
23395
|
+
IS_EMPTY_INPUT = !dirty;
|
|
23396
|
+
if (IS_EMPTY_INPUT) {
|
|
23397
|
+
dirty = '<!-->';
|
|
23398
|
+
}
|
|
23399
|
+
/* Stringify, in case dirty is an object */
|
|
23400
|
+
if (typeof dirty !== 'string' && !_isNode(dirty)) {
|
|
23401
|
+
if (typeof dirty.toString === 'function') {
|
|
23402
|
+
dirty = dirty.toString();
|
|
23403
|
+
if (typeof dirty !== 'string') {
|
|
23404
|
+
throw typeErrorCreate('dirty is not a string, aborting');
|
|
23405
|
+
}
|
|
23406
|
+
} else {
|
|
23407
|
+
throw typeErrorCreate('toString is not a function');
|
|
23408
|
+
}
|
|
23409
|
+
}
|
|
23410
|
+
/* Return dirty HTML if DOMPurify cannot run */
|
|
23411
|
+
if (!DOMPurify.isSupported) {
|
|
23412
|
+
return dirty;
|
|
23413
|
+
}
|
|
23414
|
+
/* Assign config vars */
|
|
23415
|
+
if (!SET_CONFIG) {
|
|
23416
|
+
_parseConfig(cfg);
|
|
23417
|
+
}
|
|
23418
|
+
/* Clean up removed elements */
|
|
23419
|
+
DOMPurify.removed = [];
|
|
23420
|
+
/* Check if dirty is correctly typed for IN_PLACE */
|
|
23421
|
+
if (typeof dirty === 'string') {
|
|
23422
|
+
IN_PLACE = false;
|
|
23423
|
+
}
|
|
23424
|
+
if (IN_PLACE) {
|
|
23425
|
+
/* Do some early pre-sanitization to avoid unsafe root nodes */
|
|
23426
|
+
if (dirty.nodeName) {
|
|
23427
|
+
const tagName = transformCaseFunc(dirty.nodeName);
|
|
23428
|
+
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
|
23429
|
+
throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');
|
|
23430
|
+
}
|
|
23431
|
+
}
|
|
23432
|
+
} else if (dirty instanceof Node) {
|
|
23433
|
+
/* If dirty is a DOM element, append to an empty document to avoid
|
|
23434
|
+
elements being stripped by the parser */
|
|
23435
|
+
body = _initDocument('<!---->');
|
|
23436
|
+
importedNode = body.ownerDocument.importNode(dirty, true);
|
|
23437
|
+
if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {
|
|
23438
|
+
/* Node is already a body, use as is */
|
|
23439
|
+
body = importedNode;
|
|
23440
|
+
} else if (importedNode.nodeName === 'HTML') {
|
|
23441
|
+
body = importedNode;
|
|
23442
|
+
} else {
|
|
23443
|
+
// eslint-disable-next-line unicorn/prefer-dom-node-append
|
|
23444
|
+
body.appendChild(importedNode);
|
|
23445
|
+
}
|
|
23446
|
+
} else {
|
|
23447
|
+
/* Exit directly if we have nothing to do */
|
|
23448
|
+
if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&
|
|
23449
|
+
// eslint-disable-next-line unicorn/prefer-includes
|
|
23450
|
+
dirty.indexOf('<') === -1) {
|
|
23451
|
+
return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
|
|
23452
|
+
}
|
|
23453
|
+
/* Initialize the document to work on */
|
|
23454
|
+
body = _initDocument(dirty);
|
|
23455
|
+
/* Check we have a DOM node from the data */
|
|
23456
|
+
if (!body) {
|
|
23457
|
+
return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';
|
|
23458
|
+
}
|
|
23459
|
+
}
|
|
23460
|
+
/* Remove first element node (ours) if FORCE_BODY is set */
|
|
23461
|
+
if (body && FORCE_BODY) {
|
|
23462
|
+
_forceRemove(body.firstChild);
|
|
23463
|
+
}
|
|
23464
|
+
/* Get node iterator */
|
|
23465
|
+
const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
|
|
23466
|
+
/* Now start iterating over the created document */
|
|
23467
|
+
while (currentNode = nodeIterator.nextNode()) {
|
|
23468
|
+
/* Sanitize tags and elements */
|
|
23469
|
+
_sanitizeElements(currentNode);
|
|
23470
|
+
/* Check attributes next */
|
|
23471
|
+
_sanitizeAttributes(currentNode);
|
|
23472
|
+
/* Shadow DOM detected, sanitize it */
|
|
23473
|
+
if (currentNode.content instanceof DocumentFragment) {
|
|
23474
|
+
_sanitizeShadowDOM(currentNode.content);
|
|
23475
|
+
}
|
|
23476
|
+
}
|
|
23477
|
+
/* If we sanitized `dirty` in-place, return it. */
|
|
23478
|
+
if (IN_PLACE) {
|
|
23479
|
+
return dirty;
|
|
23480
|
+
}
|
|
23481
|
+
/* Return sanitized string or DOM */
|
|
23482
|
+
if (RETURN_DOM) {
|
|
23483
|
+
if (RETURN_DOM_FRAGMENT) {
|
|
23484
|
+
returnNode = createDocumentFragment.call(body.ownerDocument);
|
|
23485
|
+
while (body.firstChild) {
|
|
23486
|
+
// eslint-disable-next-line unicorn/prefer-dom-node-append
|
|
23487
|
+
returnNode.appendChild(body.firstChild);
|
|
23488
|
+
}
|
|
23489
|
+
} else {
|
|
23490
|
+
returnNode = body;
|
|
23491
|
+
}
|
|
23492
|
+
if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {
|
|
23493
|
+
/*
|
|
23494
|
+
AdoptNode() is not used because internal state is not reset
|
|
23495
|
+
(e.g. the past names map of a HTMLFormElement), this is safe
|
|
23496
|
+
in theory but we would rather not risk another attack vector.
|
|
23497
|
+
The state that is cloned by importNode() is explicitly defined
|
|
23498
|
+
by the specs.
|
|
23499
|
+
*/
|
|
23500
|
+
returnNode = importNode.call(originalDocument, returnNode, true);
|
|
23501
|
+
}
|
|
23502
|
+
return returnNode;
|
|
23503
|
+
}
|
|
23504
|
+
let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
|
|
23505
|
+
/* Serialize doctype if allowed */
|
|
23506
|
+
if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
|
|
23507
|
+
serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\n' + serializedHTML;
|
|
23508
|
+
}
|
|
23509
|
+
/* Sanitize final string template-safe */
|
|
23510
|
+
if (SAFE_FOR_TEMPLATES) {
|
|
23511
|
+
arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
|
|
23512
|
+
serializedHTML = stringReplace(serializedHTML, expr, ' ');
|
|
23513
|
+
});
|
|
23514
|
+
}
|
|
23515
|
+
return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
|
|
23516
|
+
};
|
|
23517
|
+
DOMPurify.setConfig = function () {
|
|
23518
|
+
let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
23519
|
+
_parseConfig(cfg);
|
|
23520
|
+
SET_CONFIG = true;
|
|
23521
|
+
};
|
|
23522
|
+
DOMPurify.clearConfig = function () {
|
|
23523
|
+
CONFIG = null;
|
|
23524
|
+
SET_CONFIG = false;
|
|
23525
|
+
};
|
|
23526
|
+
DOMPurify.isValidAttribute = function (tag, attr, value) {
|
|
23527
|
+
/* Initialize shared config vars if necessary. */
|
|
23528
|
+
if (!CONFIG) {
|
|
23529
|
+
_parseConfig({});
|
|
23530
|
+
}
|
|
23531
|
+
const lcTag = transformCaseFunc(tag);
|
|
23532
|
+
const lcName = transformCaseFunc(attr);
|
|
23533
|
+
return _isValidAttribute(lcTag, lcName, value);
|
|
23534
|
+
};
|
|
23535
|
+
DOMPurify.addHook = function (entryPoint, hookFunction) {
|
|
23536
|
+
if (typeof hookFunction !== 'function') {
|
|
23537
|
+
return;
|
|
23538
|
+
}
|
|
23539
|
+
arrayPush(hooks[entryPoint], hookFunction);
|
|
23540
|
+
};
|
|
23541
|
+
DOMPurify.removeHook = function (entryPoint, hookFunction) {
|
|
23542
|
+
if (hookFunction !== undefined) {
|
|
23543
|
+
const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
|
|
23544
|
+
return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];
|
|
23545
|
+
}
|
|
23546
|
+
return arrayPop(hooks[entryPoint]);
|
|
23547
|
+
};
|
|
23548
|
+
DOMPurify.removeHooks = function (entryPoint) {
|
|
23549
|
+
hooks[entryPoint] = [];
|
|
23550
|
+
};
|
|
23551
|
+
DOMPurify.removeAllHooks = function () {
|
|
23552
|
+
hooks = _createHooksMap();
|
|
23553
|
+
};
|
|
23554
|
+
return DOMPurify;
|
|
23555
|
+
}
|
|
23556
|
+
var purify = createDOMPurify();
|
|
23557
|
+
|
|
23558
|
+
var HtmlRenderer = function HtmlRenderer(_ref) {
|
|
23559
|
+
var htmlString = _ref.htmlString;
|
|
23560
|
+
var sanitizedHTML = purify.sanitize(htmlString);
|
|
23561
|
+
return /*#__PURE__*/React$1.createElement("div", {
|
|
23562
|
+
dangerouslySetInnerHTML: {
|
|
23563
|
+
__html: sanitizedHTML
|
|
23564
|
+
}
|
|
23565
|
+
});
|
|
23566
|
+
};
|
|
23567
|
+
|
|
22230
23568
|
var _excluded$C = ["command", "shift", "option", "ctrl", "children", "className"];
|
|
22231
23569
|
var KeyboardComponent = function KeyboardComponent(_ref) {
|
|
22232
23570
|
var _ref$command = _ref.command,
|
|
22233
|
-
command = _ref$command ===
|
|
23571
|
+
command = _ref$command === void 0 ? false : _ref$command,
|
|
22234
23572
|
_ref$shift = _ref.shift,
|
|
22235
|
-
shift = _ref$shift ===
|
|
23573
|
+
shift = _ref$shift === void 0 ? false : _ref$shift,
|
|
22236
23574
|
_ref$option = _ref.option,
|
|
22237
|
-
option = _ref$option ===
|
|
23575
|
+
option = _ref$option === void 0 ? false : _ref$option,
|
|
22238
23576
|
_ref$ctrl = _ref.ctrl,
|
|
22239
|
-
ctrl = _ref$ctrl ===
|
|
23577
|
+
ctrl = _ref$ctrl === void 0 ? false : _ref$ctrl,
|
|
22240
23578
|
children = _ref.children,
|
|
22241
23579
|
_ref$className = _ref.className,
|
|
22242
|
-
className = _ref$className ===
|
|
23580
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
22243
23581
|
props = _objectWithoutProperties(_ref, _excluded$C);
|
|
22244
23582
|
var theme = useTheme();
|
|
22245
23583
|
var _useScale = useScale(),
|
|
@@ -22267,10 +23605,10 @@ var Keyboard = withScale(KeyboardComponent);
|
|
|
22267
23605
|
var _excluded$B = ["className", "children", "visible"];
|
|
22268
23606
|
var ModalWrapper = function ModalWrapper(_ref) {
|
|
22269
23607
|
var _ref$className = _ref.className,
|
|
22270
|
-
className = _ref$className ===
|
|
23608
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
22271
23609
|
children = _ref.children,
|
|
22272
23610
|
_ref$visible = _ref.visible,
|
|
22273
|
-
visible = _ref$visible ===
|
|
23611
|
+
visible = _ref$visible === void 0 ? false : _ref$visible,
|
|
22274
23612
|
props = _objectWithoutProperties(_ref, _excluded$B);
|
|
22275
23613
|
var theme = useTheme();
|
|
22276
23614
|
var _useScale = useScale(),
|
|
@@ -22338,13 +23676,13 @@ var useModalContext = function useModalContext() {
|
|
|
22338
23676
|
var _excluded$A = ["className", "children", "onClick", "passive", "disabled"];
|
|
22339
23677
|
var ModalActionComponent = /*#__PURE__*/React$1.forwardRef(function (_ref, ref) {
|
|
22340
23678
|
var _ref$className = _ref.className,
|
|
22341
|
-
className = _ref$className ===
|
|
23679
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
22342
23680
|
children = _ref.children,
|
|
22343
23681
|
onClick = _ref.onClick,
|
|
22344
23682
|
_ref$passive = _ref.passive,
|
|
22345
|
-
passive = _ref$passive ===
|
|
23683
|
+
passive = _ref$passive === void 0 ? false : _ref$passive,
|
|
22346
23684
|
_ref$disabled = _ref.disabled,
|
|
22347
|
-
disabled = _ref$disabled ===
|
|
23685
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
22348
23686
|
props = _objectWithoutProperties(_ref, _excluded$A);
|
|
22349
23687
|
var theme = useTheme();
|
|
22350
23688
|
var _useScale = useScale(),
|
|
@@ -22426,18 +23764,18 @@ var ModalComponent = function ModalComponent(_ref) {
|
|
|
22426
23764
|
onClose = _ref.onClose,
|
|
22427
23765
|
children = _ref.children,
|
|
22428
23766
|
_ref$keyboard = _ref.keyboard,
|
|
22429
|
-
keyboard = _ref$keyboard ===
|
|
23767
|
+
keyboard = _ref$keyboard === void 0 ? true : _ref$keyboard,
|
|
22430
23768
|
_ref$wrapClassName = _ref.wrapClassName,
|
|
22431
|
-
wrapClassName = _ref$wrapClassName ===
|
|
23769
|
+
wrapClassName = _ref$wrapClassName === void 0 ? '' : _ref$wrapClassName,
|
|
22432
23770
|
onContentClick = _ref.onContentClick,
|
|
22433
23771
|
_ref$disableBackdropC = _ref.disableBackdropClick,
|
|
22434
|
-
disableBackdropClick = _ref$disableBackdropC ===
|
|
23772
|
+
disableBackdropClick = _ref$disableBackdropC === void 0 ? false : _ref$disableBackdropC,
|
|
22435
23773
|
_ref$positionClassNam = _ref.positionClassName,
|
|
22436
|
-
positionClassName = _ref$positionClassNam ===
|
|
23774
|
+
positionClassName = _ref$positionClassNam === void 0 ? '' : _ref$positionClassNam,
|
|
22437
23775
|
_ref$backdropClassNam = _ref.backdropClassName,
|
|
22438
|
-
backdropClassName = _ref$backdropClassNam ===
|
|
23776
|
+
backdropClassName = _ref$backdropClassNam === void 0 ? '' : _ref$backdropClassNam,
|
|
22439
23777
|
_ref$layerClassName = _ref.layerClassName,
|
|
22440
|
-
layerClassName = _ref$layerClassName ===
|
|
23778
|
+
layerClassName = _ref$layerClassName === void 0 ? '' : _ref$layerClassName;
|
|
22441
23779
|
var portal = usePortal('modal');
|
|
22442
23780
|
var _useScale = useScale(),
|
|
22443
23781
|
SCALES = _useScale.SCALES;
|
|
@@ -22528,13 +23866,13 @@ var getStatusColor = function getStatusColor(type, filled, theme) {
|
|
|
22528
23866
|
var NoteComponent = function NoteComponent(_ref) {
|
|
22529
23867
|
var children = _ref.children,
|
|
22530
23868
|
_ref$type = _ref.type,
|
|
22531
|
-
type = _ref$type ===
|
|
23869
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
22532
23870
|
_ref$label = _ref.label,
|
|
22533
|
-
label = _ref$label ===
|
|
23871
|
+
label = _ref$label === void 0 ? 'note' : _ref$label,
|
|
22534
23872
|
_ref$filled = _ref.filled,
|
|
22535
|
-
filled = _ref$filled ===
|
|
23873
|
+
filled = _ref$filled === void 0 ? false : _ref$filled,
|
|
22536
23874
|
_ref$className = _ref.className,
|
|
22537
|
-
className = _ref$className ===
|
|
23875
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
22538
23876
|
props = _objectWithoutProperties(_ref, _excluded$y);
|
|
22539
23877
|
var theme = useTheme();
|
|
22540
23878
|
var _useScale = useScale(),
|
|
@@ -22562,7 +23900,7 @@ var Note = withScale(NoteComponent);
|
|
|
22562
23900
|
var _excluded$x = ["className", "children"];
|
|
22563
23901
|
var PageContentComponent = function PageContentComponent(_ref) {
|
|
22564
23902
|
var _ref$className = _ref.className,
|
|
22565
|
-
className = _ref$className ===
|
|
23903
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
22566
23904
|
children = _ref.children,
|
|
22567
23905
|
props = _objectWithoutProperties(_ref, _excluded$x);
|
|
22568
23906
|
var _useScale = useScale(),
|
|
@@ -22598,14 +23936,14 @@ var DotStyles = function DotStyles(_ref) {
|
|
|
22598
23936
|
var PageComponent = function PageComponent(_ref2) {
|
|
22599
23937
|
var children = _ref2.children,
|
|
22600
23938
|
_ref2$render = _ref2.render,
|
|
22601
|
-
render = _ref2$render ===
|
|
23939
|
+
render = _ref2$render === void 0 ? 'default' : _ref2$render,
|
|
22602
23940
|
_ref2$dotBackdrop = _ref2.dotBackdrop,
|
|
22603
|
-
dotBackdrop = _ref2$dotBackdrop ===
|
|
23941
|
+
dotBackdrop = _ref2$dotBackdrop === void 0 ? false : _ref2$dotBackdrop,
|
|
22604
23942
|
className = _ref2.className,
|
|
22605
23943
|
_ref2$dotSize = _ref2.dotSize,
|
|
22606
|
-
dotSize = _ref2$dotSize ===
|
|
23944
|
+
dotSize = _ref2$dotSize === void 0 ? '1px' : _ref2$dotSize,
|
|
22607
23945
|
_ref2$dotSpace = _ref2.dotSpace,
|
|
22608
|
-
dotSpace = _ref2$dotSpace ===
|
|
23946
|
+
dotSpace = _ref2$dotSpace === void 0 ? 1 : _ref2$dotSpace,
|
|
22609
23947
|
props = _objectWithoutProperties(_ref2, _excluded$w);
|
|
22610
23948
|
var theme = useTheme();
|
|
22611
23949
|
var _useScale = useScale(),
|
|
@@ -22649,9 +23987,9 @@ var _excluded$v = ["children", "center", "className"];
|
|
|
22649
23987
|
var PageHeaderComponent = function PageHeaderComponent(_ref) {
|
|
22650
23988
|
var children = _ref.children,
|
|
22651
23989
|
_ref$center = _ref.center,
|
|
22652
|
-
center = _ref$center ===
|
|
23990
|
+
center = _ref$center === void 0 ? false : _ref$center,
|
|
22653
23991
|
_ref$className = _ref.className,
|
|
22654
|
-
className = _ref$className ===
|
|
23992
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
22655
23993
|
props = _objectWithoutProperties(_ref, _excluded$v);
|
|
22656
23994
|
var _useScale = useScale(),
|
|
22657
23995
|
SCALES = _useScale.SCALES;
|
|
@@ -22915,15 +24253,15 @@ var _excluded$q = ["page", "initialPage", "count", "limit", "children", "onChang
|
|
|
22915
24253
|
var PaginationComponent = function PaginationComponent(_ref) {
|
|
22916
24254
|
var customPage = _ref.page,
|
|
22917
24255
|
_ref$initialPage = _ref.initialPage,
|
|
22918
|
-
initialPage = _ref$initialPage ===
|
|
24256
|
+
initialPage = _ref$initialPage === void 0 ? 1 : _ref$initialPage,
|
|
22919
24257
|
_ref$count = _ref.count,
|
|
22920
|
-
count = _ref$count ===
|
|
24258
|
+
count = _ref$count === void 0 ? 1 : _ref$count,
|
|
22921
24259
|
_ref$limit = _ref.limit,
|
|
22922
|
-
limit = _ref$limit ===
|
|
24260
|
+
limit = _ref$limit === void 0 ? 7 : _ref$limit,
|
|
22923
24261
|
children = _ref.children,
|
|
22924
24262
|
onChange = _ref.onChange,
|
|
22925
24263
|
_ref$className = _ref.className,
|
|
22926
|
-
className = _ref$className ===
|
|
24264
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
22927
24265
|
props = _objectWithoutProperties(_ref, _excluded$q);
|
|
22928
24266
|
var _useScale = useScale(),
|
|
22929
24267
|
SCALES = _useScale.SCALES;
|
|
@@ -23281,28 +24619,28 @@ var _excluded$p = ["children", "initialVisible", "text", "offset", "placement",
|
|
|
23281
24619
|
var TooltipComponent = function TooltipComponent(_ref) {
|
|
23282
24620
|
var children = _ref.children,
|
|
23283
24621
|
_ref$initialVisible = _ref.initialVisible,
|
|
23284
|
-
initialVisible = _ref$initialVisible ===
|
|
24622
|
+
initialVisible = _ref$initialVisible === void 0 ? false : _ref$initialVisible,
|
|
23285
24623
|
text = _ref.text,
|
|
23286
24624
|
_ref$offset = _ref.offset,
|
|
23287
|
-
offset = _ref$offset ===
|
|
24625
|
+
offset = _ref$offset === void 0 ? 12 : _ref$offset,
|
|
23288
24626
|
_ref$placement = _ref.placement,
|
|
23289
|
-
placement = _ref$placement ===
|
|
24627
|
+
placement = _ref$placement === void 0 ? 'top' : _ref$placement,
|
|
23290
24628
|
_ref$portalClassName = _ref.portalClassName,
|
|
23291
|
-
portalClassName = _ref$portalClassName ===
|
|
24629
|
+
portalClassName = _ref$portalClassName === void 0 ? '' : _ref$portalClassName,
|
|
23292
24630
|
_ref$enterDelay = _ref.enterDelay,
|
|
23293
|
-
enterDelay = _ref$enterDelay ===
|
|
24631
|
+
enterDelay = _ref$enterDelay === void 0 ? 100 : _ref$enterDelay,
|
|
23294
24632
|
_ref$leaveDelay = _ref.leaveDelay,
|
|
23295
|
-
leaveDelay = _ref$leaveDelay ===
|
|
24633
|
+
leaveDelay = _ref$leaveDelay === void 0 ? 150 : _ref$leaveDelay,
|
|
23296
24634
|
_ref$trigger = _ref.trigger,
|
|
23297
|
-
trigger = _ref$trigger ===
|
|
24635
|
+
trigger = _ref$trigger === void 0 ? 'hover' : _ref$trigger,
|
|
23298
24636
|
_ref$type = _ref.type,
|
|
23299
|
-
type = _ref$type ===
|
|
24637
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
23300
24638
|
_ref$className = _ref.className,
|
|
23301
|
-
className = _ref$className ===
|
|
24639
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
23302
24640
|
_ref$onVisibleChange = _ref.onVisibleChange,
|
|
23303
|
-
onVisibleChange = _ref$onVisibleChange ===
|
|
24641
|
+
onVisibleChange = _ref$onVisibleChange === void 0 ? function () {} : _ref$onVisibleChange,
|
|
23304
24642
|
_ref$hideArrow = _ref.hideArrow,
|
|
23305
|
-
hideArrow = _ref$hideArrow ===
|
|
24643
|
+
hideArrow = _ref$hideArrow === void 0 ? false : _ref$hideArrow,
|
|
23306
24644
|
customVisible = _ref.visible,
|
|
23307
24645
|
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
23308
24646
|
var timer = React$1.useRef();
|
|
@@ -23312,7 +24650,7 @@ var TooltipComponent = function TooltipComponent(_ref) {
|
|
|
23312
24650
|
visible = _useState2[0],
|
|
23313
24651
|
setVisible = _useState2[1];
|
|
23314
24652
|
var iconOffset = React$1.useMemo(function () {
|
|
23315
|
-
if (!(ref !== null && ref !==
|
|
24653
|
+
if (!(ref !== null && ref !== void 0 && ref.current)) return {
|
|
23316
24654
|
x: '0.75em',
|
|
23317
24655
|
y: '0.75em'
|
|
23318
24656
|
};
|
|
@@ -23321,7 +24659,7 @@ var TooltipComponent = function TooltipComponent(_ref) {
|
|
|
23321
24659
|
x: "".concat(rect.width ? rect.width / 2 : 0, "px"),
|
|
23322
24660
|
y: "".concat(rect.height ? rect.height / 2 : 0, "px")
|
|
23323
24661
|
};
|
|
23324
|
-
}, [ref === null || ref ===
|
|
24662
|
+
}, [ref === null || ref === void 0 ? void 0 : ref.current]);
|
|
23325
24663
|
var contentProps = {
|
|
23326
24664
|
type: type,
|
|
23327
24665
|
visible: visible,
|
|
@@ -23401,25 +24739,25 @@ var PopoverComponent = function PopoverComponent(_ref) {
|
|
|
23401
24739
|
var child = _ref.child,
|
|
23402
24740
|
children = _ref.children,
|
|
23403
24741
|
_ref$enterDelay = _ref.enterDelay,
|
|
23404
|
-
enterDelay = _ref$enterDelay ===
|
|
24742
|
+
enterDelay = _ref$enterDelay === void 0 ? 100 : _ref$enterDelay,
|
|
23405
24743
|
_ref$leaveDelay = _ref.leaveDelay,
|
|
23406
|
-
leaveDelay = _ref$leaveDelay ===
|
|
24744
|
+
leaveDelay = _ref$leaveDelay === void 0 ? 150 : _ref$leaveDelay,
|
|
23407
24745
|
_ref$offset = _ref.offset,
|
|
23408
|
-
offset = _ref$offset ===
|
|
24746
|
+
offset = _ref$offset === void 0 ? 12 : _ref$offset,
|
|
23409
24747
|
_ref$type = _ref.type,
|
|
23410
|
-
type = _ref$type ===
|
|
24748
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
23411
24749
|
_ref$trigger = _ref.trigger,
|
|
23412
|
-
trigger = _ref$trigger ===
|
|
24750
|
+
trigger = _ref$trigger === void 0 ? 'click' : _ref$trigger,
|
|
23413
24751
|
_ref$placement = _ref.placement,
|
|
23414
|
-
placement = _ref$placement ===
|
|
24752
|
+
placement = _ref$placement === void 0 ? 'bottom' : _ref$placement,
|
|
23415
24753
|
_ref$initialVisible = _ref.initialVisible,
|
|
23416
|
-
initialVisible = _ref$initialVisible ===
|
|
24754
|
+
initialVisible = _ref$initialVisible === void 0 ? false : _ref$initialVisible,
|
|
23417
24755
|
_ref$portalClassName = _ref.portalClassName,
|
|
23418
|
-
portalClassName = _ref$portalClassName ===
|
|
24756
|
+
portalClassName = _ref$portalClassName === void 0 ? '' : _ref$portalClassName,
|
|
23419
24757
|
_ref$disableItemsAuto = _ref.disableItemsAutoClose,
|
|
23420
|
-
disableItemsAutoClose = _ref$disableItemsAuto ===
|
|
24758
|
+
disableItemsAutoClose = _ref$disableItemsAuto === void 0 ? false : _ref$disableItemsAuto,
|
|
23421
24759
|
_ref$onVisibleChange = _ref.onVisibleChange,
|
|
23422
|
-
onVisibleChange = _ref$onVisibleChange ===
|
|
24760
|
+
onVisibleChange = _ref$onVisibleChange === void 0 ? function () {} : _ref$onVisibleChange,
|
|
23423
24761
|
customVisible = _ref.visible,
|
|
23424
24762
|
props = _objectWithoutProperties(_ref, _excluded$o);
|
|
23425
24763
|
var _useScale = useScale(),
|
|
@@ -23474,16 +24812,16 @@ var _excluded$n = ["children", "line", "showTitle", "className", "onClick", "sel
|
|
|
23474
24812
|
var PopoverItemComponent = function PopoverItemComponent(_ref) {
|
|
23475
24813
|
var children = _ref.children,
|
|
23476
24814
|
_ref$line = _ref.line,
|
|
23477
|
-
line = _ref$line ===
|
|
24815
|
+
line = _ref$line === void 0 ? false : _ref$line,
|
|
23478
24816
|
_ref$showTitle = _ref.showTitle,
|
|
23479
|
-
showTitle = _ref$showTitle ===
|
|
24817
|
+
showTitle = _ref$showTitle === void 0 ? false : _ref$showTitle,
|
|
23480
24818
|
_ref$className = _ref.className,
|
|
23481
|
-
className = _ref$className ===
|
|
24819
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
23482
24820
|
onClick = _ref.onClick,
|
|
23483
24821
|
_ref$selected = _ref.selected,
|
|
23484
|
-
selected = _ref$selected ===
|
|
24822
|
+
selected = _ref$selected === void 0 ? false : _ref$selected,
|
|
23485
24823
|
_ref$disableAutoClose = _ref.disableAutoClose,
|
|
23486
|
-
disableAutoClose = _ref$disableAutoClose ===
|
|
24824
|
+
disableAutoClose = _ref$disableAutoClose === void 0 ? false : _ref$disableAutoClose,
|
|
23487
24825
|
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
23488
24826
|
var theme = useTheme();
|
|
23489
24827
|
var _useScale = useScale(),
|
|
@@ -23546,18 +24884,18 @@ var getCurrentColor = function getCurrentColor(ratio, palette, type) {
|
|
|
23546
24884
|
};
|
|
23547
24885
|
var ProgressComponent = function ProgressComponent(_ref) {
|
|
23548
24886
|
var _ref$value = _ref.value,
|
|
23549
|
-
value = _ref$value ===
|
|
24887
|
+
value = _ref$value === void 0 ? 0 : _ref$value,
|
|
23550
24888
|
_ref$max = _ref.max,
|
|
23551
|
-
max = _ref$max ===
|
|
24889
|
+
max = _ref$max === void 0 ? 100 : _ref$max,
|
|
23552
24890
|
_ref$className = _ref.className,
|
|
23553
|
-
className = _ref$className ===
|
|
24891
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
23554
24892
|
_ref$type = _ref.type,
|
|
23555
|
-
type = _ref$type ===
|
|
24893
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
23556
24894
|
colors = _ref.colors,
|
|
23557
24895
|
_ref$fixedTop = _ref.fixedTop,
|
|
23558
|
-
fixedTop = _ref$fixedTop ===
|
|
24896
|
+
fixedTop = _ref$fixedTop === void 0 ? false : _ref$fixedTop,
|
|
23559
24897
|
_ref$fixedBottom = _ref.fixedBottom,
|
|
23560
|
-
fixedBottom = _ref$fixedBottom ===
|
|
24898
|
+
fixedBottom = _ref$fixedBottom === void 0 ? false : _ref$fixedBottom,
|
|
23561
24899
|
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
23562
24900
|
var theme = useTheme();
|
|
23563
24901
|
var _useScale = useScale(),
|
|
@@ -23600,7 +24938,7 @@ var useRadioContext = function useRadioContext() {
|
|
|
23600
24938
|
var _excluded$l = ["className", "children"];
|
|
23601
24939
|
var RadioDescriptionComponent = function RadioDescriptionComponent(_ref) {
|
|
23602
24940
|
var _ref$className = _ref.className,
|
|
23603
|
-
className = _ref$className ===
|
|
24941
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
23604
24942
|
children = _ref.children,
|
|
23605
24943
|
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
23606
24944
|
var theme = useTheme();
|
|
@@ -23651,13 +24989,13 @@ var getColors$4 = function getColors(palette, status) {
|
|
|
23651
24989
|
var _excluded$k = ["className", "checked", "onChange", "disabled", "type", "value", "children"];
|
|
23652
24990
|
var RadioComponent = function RadioComponent(_ref) {
|
|
23653
24991
|
var _ref$className = _ref.className,
|
|
23654
|
-
className = _ref$className ===
|
|
24992
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
23655
24993
|
checked = _ref.checked,
|
|
23656
24994
|
onChange = _ref.onChange,
|
|
23657
24995
|
_ref$disabled = _ref.disabled,
|
|
23658
|
-
disabled = _ref$disabled ===
|
|
24996
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
23659
24997
|
_ref$type = _ref.type,
|
|
23660
|
-
type = _ref$type ===
|
|
24998
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
23661
24999
|
radioValue = _ref.value,
|
|
23662
25000
|
children = _ref.children,
|
|
23663
25001
|
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
@@ -23745,15 +25083,15 @@ var Radio = withScale(RadioComponent);
|
|
|
23745
25083
|
var _excluded$j = ["disabled", "onChange", "value", "children", "className", "initialValue", "useRow"];
|
|
23746
25084
|
var RadioGroupComponent = function RadioGroupComponent(_ref) {
|
|
23747
25085
|
var _ref$disabled = _ref.disabled,
|
|
23748
|
-
disabled = _ref$disabled ===
|
|
25086
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
23749
25087
|
onChange = _ref.onChange,
|
|
23750
25088
|
value = _ref.value,
|
|
23751
25089
|
children = _ref.children,
|
|
23752
25090
|
_ref$className = _ref.className,
|
|
23753
|
-
className = _ref$className ===
|
|
25091
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
23754
25092
|
initialValue = _ref.initialValue,
|
|
23755
25093
|
_ref$useRow = _ref.useRow,
|
|
23756
|
-
useRow = _ref$useRow ===
|
|
25094
|
+
useRow = _ref$useRow === void 0 ? false : _ref$useRow,
|
|
23757
25095
|
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
23758
25096
|
var _useScale = useScale(),
|
|
23759
25097
|
SCALES = _useScale.SCALES;
|
|
@@ -23824,19 +25162,19 @@ var getColor = function getColor(type, palette) {
|
|
|
23824
25162
|
};
|
|
23825
25163
|
var RatingComponent = function RatingComponent(_ref) {
|
|
23826
25164
|
var _ref$type = _ref.type,
|
|
23827
|
-
type = _ref$type ===
|
|
25165
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
23828
25166
|
_ref$className = _ref.className,
|
|
23829
|
-
className = _ref$className ===
|
|
25167
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
23830
25168
|
_ref$icon = _ref.icon,
|
|
23831
|
-
icon = _ref$icon ===
|
|
25169
|
+
icon = _ref$icon === void 0 ? /*#__PURE__*/React$1.createElement(RatingIcon, null) : _ref$icon,
|
|
23832
25170
|
_ref$count = _ref.count,
|
|
23833
|
-
count = _ref$count ===
|
|
25171
|
+
count = _ref$count === void 0 ? 5 : _ref$count,
|
|
23834
25172
|
customValue = _ref.value,
|
|
23835
25173
|
_ref$initialValue = _ref.initialValue,
|
|
23836
|
-
initialValue = _ref$initialValue ===
|
|
25174
|
+
initialValue = _ref$initialValue === void 0 ? 1 : _ref$initialValue,
|
|
23837
25175
|
onValueChange = _ref.onValueChange,
|
|
23838
25176
|
_ref$locked = _ref.locked,
|
|
23839
|
-
locked = _ref$locked ===
|
|
25177
|
+
locked = _ref$locked === void 0 ? false : _ref$locked,
|
|
23840
25178
|
onLockedChange = _ref.onLockedChange,
|
|
23841
25179
|
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
23842
25180
|
var theme = useTheme();
|
|
@@ -23932,9 +25270,9 @@ var SelectDropdown = /*#__PURE__*/React$1.forwardRef(function (_ref, dropdownRef
|
|
|
23932
25270
|
var visible = _ref.visible,
|
|
23933
25271
|
children = _ref.children,
|
|
23934
25272
|
_ref$className = _ref.className,
|
|
23935
|
-
className = _ref$className ===
|
|
25273
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
23936
25274
|
_ref$dropdownStyle = _ref.dropdownStyle,
|
|
23937
|
-
dropdownStyle = _ref$dropdownStyle ===
|
|
25275
|
+
dropdownStyle = _ref$dropdownStyle === void 0 ? {} : _ref$dropdownStyle,
|
|
23938
25276
|
disableMatchWidth = _ref.disableMatchWidth,
|
|
23939
25277
|
getPopupContainer = _ref.getPopupContainer;
|
|
23940
25278
|
var theme = useTheme();
|
|
@@ -24059,7 +25397,7 @@ var SelectInput = /*#__PURE__*/React$1.forwardRef(function (_ref, inputRef) {
|
|
|
24059
25397
|
React$1.useEffect(function () {
|
|
24060
25398
|
if (visible) {
|
|
24061
25399
|
var _ref$current;
|
|
24062
|
-
(_ref$current = ref.current) === null || _ref$current ===
|
|
25400
|
+
(_ref$current = ref.current) === null || _ref$current === void 0 || _ref$current.focus();
|
|
24063
25401
|
}
|
|
24064
25402
|
}, [visible]);
|
|
24065
25403
|
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("input", {
|
|
@@ -24084,30 +25422,30 @@ var SelectComponent = /*#__PURE__*/React$1.forwardRef(function (_ref, selectRef)
|
|
|
24084
25422
|
var children = _ref.children,
|
|
24085
25423
|
label = _ref.label,
|
|
24086
25424
|
_ref$type = _ref.type,
|
|
24087
|
-
type = _ref$type ===
|
|
25425
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
24088
25426
|
_ref$disabled = _ref.disabled,
|
|
24089
|
-
disabled = _ref$disabled ===
|
|
25427
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
24090
25428
|
init = _ref.initialValue,
|
|
24091
25429
|
customValue = _ref.value,
|
|
24092
25430
|
_ref$icon = _ref.icon,
|
|
24093
|
-
Icon = _ref$icon ===
|
|
25431
|
+
Icon = _ref$icon === void 0 ? SelectIcon : _ref$icon,
|
|
24094
25432
|
onChange = _ref.onChange,
|
|
24095
25433
|
_ref$pure = _ref.pure,
|
|
24096
|
-
pure = _ref$pure ===
|
|
25434
|
+
pure = _ref$pure === void 0 ? false : _ref$pure,
|
|
24097
25435
|
_ref$multiple = _ref.multiple,
|
|
24098
|
-
multiple = _ref$multiple ===
|
|
25436
|
+
multiple = _ref$multiple === void 0 ? false : _ref$multiple,
|
|
24099
25437
|
_ref$clearable = _ref.clearable,
|
|
24100
|
-
clearable = _ref$clearable ===
|
|
25438
|
+
clearable = _ref$clearable === void 0 ? true : _ref$clearable,
|
|
24101
25439
|
placeholder = _ref.placeholder,
|
|
24102
25440
|
_ref$className = _ref.className,
|
|
24103
|
-
className = _ref$className ===
|
|
25441
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
24104
25442
|
dropdownClassName = _ref.dropdownClassName,
|
|
24105
25443
|
dropdownStyle = _ref.dropdownStyle,
|
|
24106
25444
|
_ref$disableMatchWidt = _ref.disableMatchWidth,
|
|
24107
|
-
disableMatchWidth = _ref$disableMatchWidt ===
|
|
25445
|
+
disableMatchWidth = _ref$disableMatchWidt === void 0 ? false : _ref$disableMatchWidt,
|
|
24108
25446
|
getPopupContainer = _ref.getPopupContainer,
|
|
24109
25447
|
_ref$onDropdownVisibl = _ref.onDropdownVisibleChange,
|
|
24110
|
-
onDropdownVisibleChange = _ref$onDropdownVisibl ===
|
|
25448
|
+
onDropdownVisibleChange = _ref$onDropdownVisibl === void 0 ? function () {} : _ref$onDropdownVisibl,
|
|
24111
25449
|
props = _objectWithoutProperties(_ref, _excluded$h);
|
|
24112
25450
|
var theme = useTheme();
|
|
24113
25451
|
var _useScale = useScale(),
|
|
@@ -24192,15 +25530,15 @@ var SelectComponent = /*#__PURE__*/React$1.forwardRef(function (_ref, selectRef)
|
|
|
24192
25530
|
return {
|
|
24193
25531
|
focus: function focus() {
|
|
24194
25532
|
var _inputRef$current;
|
|
24195
|
-
return (_inputRef$current = inputRef.current) === null || _inputRef$current ===
|
|
25533
|
+
return (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
24196
25534
|
},
|
|
24197
25535
|
blur: function blur() {
|
|
24198
25536
|
var _inputRef$current2;
|
|
24199
|
-
return (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 ===
|
|
25537
|
+
return (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.blur();
|
|
24200
25538
|
},
|
|
24201
25539
|
scrollTo: function scrollTo(options) {
|
|
24202
25540
|
var _dropdownRef$current;
|
|
24203
|
-
return (_dropdownRef$current = dropdownRef.current) === null || _dropdownRef$current ===
|
|
25541
|
+
return (_dropdownRef$current = dropdownRef.current) === null || _dropdownRef$current === void 0 ? void 0 : _dropdownRef$current.scrollTo(options);
|
|
24204
25542
|
}
|
|
24205
25543
|
};
|
|
24206
25544
|
}, [inputRef, dropdownRef]);
|
|
@@ -24284,16 +25622,16 @@ var _excluded$g = ["value", "className", "children", "disabled", "divider", "lab
|
|
|
24284
25622
|
var SelectOptionComponent = function SelectOptionComponent(_ref) {
|
|
24285
25623
|
var identValue = _ref.value,
|
|
24286
25624
|
_ref$className = _ref.className,
|
|
24287
|
-
className = _ref$className ===
|
|
25625
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
24288
25626
|
children = _ref.children,
|
|
24289
25627
|
_ref$disabled = _ref.disabled,
|
|
24290
|
-
disabled = _ref$disabled ===
|
|
25628
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
24291
25629
|
_ref$divider = _ref.divider,
|
|
24292
|
-
divider = _ref$divider ===
|
|
25630
|
+
divider = _ref$divider === void 0 ? false : _ref$divider,
|
|
24293
25631
|
_ref$label = _ref.label,
|
|
24294
|
-
label = _ref$label ===
|
|
25632
|
+
label = _ref$label === void 0 ? false : _ref$label,
|
|
24295
25633
|
_ref$preventAllEvents = _ref.preventAllEvents,
|
|
24296
|
-
preventAllEvents = _ref$preventAllEvents ===
|
|
25634
|
+
preventAllEvents = _ref$preventAllEvents === void 0 ? false : _ref$preventAllEvents,
|
|
24297
25635
|
props = _objectWithoutProperties(_ref, _excluded$g);
|
|
24298
25636
|
var theme = useTheme();
|
|
24299
25637
|
var _useScale = useScale(),
|
|
@@ -24422,11 +25760,11 @@ var useDrag = function useDrag(elementRef) {
|
|
|
24422
25760
|
var SliderDot = /*#__PURE__*/React$1.forwardRef(function (_ref, ref) {
|
|
24423
25761
|
var children = _ref.children,
|
|
24424
25762
|
_ref$disabled = _ref.disabled,
|
|
24425
|
-
disabled = _ref$disabled ===
|
|
25763
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
24426
25764
|
_ref$left = _ref.left,
|
|
24427
|
-
left = _ref$left ===
|
|
25765
|
+
left = _ref$left === void 0 ? 0 : _ref$left,
|
|
24428
25766
|
_ref$isClick = _ref.isClick,
|
|
24429
|
-
isClick = _ref$isClick ===
|
|
25767
|
+
isClick = _ref$isClick === void 0 ? false : _ref$isClick;
|
|
24430
25768
|
var theme = useTheme();
|
|
24431
25769
|
var classes = useClasses('dot', {
|
|
24432
25770
|
disabled: disabled,
|
|
@@ -24511,25 +25849,25 @@ var getValue = function getValue(max, min, step, offsetX, railWidth) {
|
|
|
24511
25849
|
};
|
|
24512
25850
|
var SliderComponent = function SliderComponent(_ref) {
|
|
24513
25851
|
var _ref$hideValue = _ref.hideValue,
|
|
24514
|
-
hideValue = _ref$hideValue ===
|
|
25852
|
+
hideValue = _ref$hideValue === void 0 ? false : _ref$hideValue,
|
|
24515
25853
|
_ref$disabled = _ref.disabled,
|
|
24516
|
-
disabled = _ref$disabled ===
|
|
25854
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
24517
25855
|
_ref$type = _ref.type,
|
|
24518
|
-
type = _ref$type ===
|
|
25856
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
24519
25857
|
_ref$step = _ref.step,
|
|
24520
|
-
step = _ref$step ===
|
|
25858
|
+
step = _ref$step === void 0 ? 1 : _ref$step,
|
|
24521
25859
|
_ref$max = _ref.max,
|
|
24522
|
-
max = _ref$max ===
|
|
25860
|
+
max = _ref$max === void 0 ? 100 : _ref$max,
|
|
24523
25861
|
_ref$min = _ref.min,
|
|
24524
|
-
min = _ref$min ===
|
|
25862
|
+
min = _ref$min === void 0 ? 0 : _ref$min,
|
|
24525
25863
|
_ref$initialValue = _ref.initialValue,
|
|
24526
|
-
initialValue = _ref$initialValue ===
|
|
25864
|
+
initialValue = _ref$initialValue === void 0 ? 0 : _ref$initialValue,
|
|
24527
25865
|
customValue = _ref.value,
|
|
24528
25866
|
onChange = _ref.onChange,
|
|
24529
25867
|
_ref$className = _ref.className,
|
|
24530
|
-
className = _ref$className ===
|
|
25868
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
24531
25869
|
_ref$showMarkers = _ref.showMarkers,
|
|
24532
|
-
showMarkers = _ref$showMarkers ===
|
|
25870
|
+
showMarkers = _ref$showMarkers === void 0 ? false : _ref$showMarkers,
|
|
24533
25871
|
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
24534
25872
|
var theme = useTheme();
|
|
24535
25873
|
var _useScale = useScale(),
|
|
@@ -24840,21 +26178,21 @@ var textArrayToString = function textArrayToString(text) {
|
|
|
24840
26178
|
};
|
|
24841
26179
|
var SnippetComponent = function SnippetComponent(_ref) {
|
|
24842
26180
|
var _ref$type = _ref.type,
|
|
24843
|
-
type = _ref$type ===
|
|
26181
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
24844
26182
|
_ref$filled = _ref.filled,
|
|
24845
|
-
filled = _ref$filled ===
|
|
26183
|
+
filled = _ref$filled === void 0 ? false : _ref$filled,
|
|
24846
26184
|
children = _ref.children,
|
|
24847
26185
|
_ref$symbol = _ref.symbol,
|
|
24848
|
-
symbol = _ref$symbol ===
|
|
26186
|
+
symbol = _ref$symbol === void 0 ? '$' : _ref$symbol,
|
|
24849
26187
|
_ref$toastText = _ref.toastText,
|
|
24850
|
-
toastText = _ref$toastText ===
|
|
26188
|
+
toastText = _ref$toastText === void 0 ? 'Copied to clipboard!' : _ref$toastText,
|
|
24851
26189
|
_ref$toastType = _ref.toastType,
|
|
24852
|
-
toastType = _ref$toastType ===
|
|
26190
|
+
toastType = _ref$toastType === void 0 ? 'success' : _ref$toastType,
|
|
24853
26191
|
text = _ref.text,
|
|
24854
26192
|
_ref$copy = _ref.copy,
|
|
24855
|
-
copyType = _ref$copy ===
|
|
26193
|
+
copyType = _ref$copy === void 0 ? 'default' : _ref$copy,
|
|
24856
26194
|
_ref$className = _ref.className,
|
|
24857
|
-
className = _ref$className ===
|
|
26195
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
24858
26196
|
props = _objectWithoutProperties(_ref, _excluded$e);
|
|
24859
26197
|
var theme = useTheme();
|
|
24860
26198
|
var _useScale = useScale(),
|
|
@@ -24914,9 +26252,9 @@ var Snippet = withScale(SnippetComponent);
|
|
|
24914
26252
|
var _excluded$d = ["inline", "className"];
|
|
24915
26253
|
var SpacerComponent = function SpacerComponent(_ref) {
|
|
24916
26254
|
var _ref$inline = _ref.inline,
|
|
24917
|
-
inline = _ref$inline ===
|
|
26255
|
+
inline = _ref$inline === void 0 ? false : _ref$inline,
|
|
24918
26256
|
_ref$className = _ref.className,
|
|
24919
|
-
className = _ref$className ===
|
|
26257
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
24920
26258
|
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
24921
26259
|
var _useScale = useScale(),
|
|
24922
26260
|
SCALES = _useScale.SCALES;
|
|
@@ -24944,7 +26282,7 @@ var getSpans = function getSpans(theme) {
|
|
|
24944
26282
|
};
|
|
24945
26283
|
var SpinnerComponent = function SpinnerComponent(_ref) {
|
|
24946
26284
|
var _ref$className = _ref.className,
|
|
24947
|
-
className = _ref$className ===
|
|
26285
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
24948
26286
|
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
24949
26287
|
var theme = useTheme();
|
|
24950
26288
|
var _useScale = useScale(),
|
|
@@ -42233,7 +43571,7 @@ var TableHead = function TableHead(props) {
|
|
|
42233
43571
|
var Header = col.label,
|
|
42234
43572
|
accessor = col.filter,
|
|
42235
43573
|
options = col.options;
|
|
42236
|
-
var filterName = (_String = String(col === null || col ===
|
|
43574
|
+
var filterName = (_String = String(col === null || col === void 0 ? void 0 : col.label)) === null || _String === void 0 ? void 0 : _String.replace(' ', '_').toLowerCase();
|
|
42237
43575
|
var unq_accessor = _.uniqueId(filterName);
|
|
42238
43576
|
// if (Header === 'actions') {
|
|
42239
43577
|
// return (
|
|
@@ -42252,7 +43590,7 @@ var TableHead = function TableHead(props) {
|
|
|
42252
43590
|
// key={unq_accessor}
|
|
42253
43591
|
// name={filterName}
|
|
42254
43592
|
, {
|
|
42255
|
-
value: (_filters$filterName = filters[filterName]) !== null && _filters$filterName !==
|
|
43593
|
+
value: (_filters$filterName = filters[filterName]) !== null && _filters$filterName !== void 0 ? _filters$filterName : 'All',
|
|
42256
43594
|
onChange: function onChange(newValue) {
|
|
42257
43595
|
return handleFilterChange(filterName, newValue);
|
|
42258
43596
|
}
|
|
@@ -42302,16 +43640,16 @@ var TableHead = function TableHead(props) {
|
|
|
42302
43640
|
className: _JSXStyle.dynamic([["2156261549", [stickyHeader && "\n position: sticky;\n top: 0;\n z-index: 1;\n ", theme.palette.accents_5, theme.palette.accents_1, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius]]])
|
|
42303
43641
|
}, columns.map(function (column, index) {
|
|
42304
43642
|
var _String2;
|
|
42305
|
-
var dataName = (_String2 = String(column === null || column ===
|
|
43643
|
+
var dataName = (_String2 = String(column === null || column === void 0 ? void 0 : column.label)) === null || _String2 === void 0 ? void 0 : _String2.replace(' ', '_').toLowerCase();
|
|
42306
43644
|
return /*#__PURE__*/React$1.createElement("th", {
|
|
42307
43645
|
style: _objectSpread2({
|
|
42308
43646
|
// textAlign: `${column?.align} !important`,
|
|
42309
43647
|
// paddingLeft: '0.3rem',
|
|
42310
43648
|
// paddingRight: '0.3rem',
|
|
42311
43649
|
backgroundColor: '#fff',
|
|
42312
|
-
color: "".concat(column !== null && column !==
|
|
42313
|
-
whiteSpace: column !== null && column !==
|
|
42314
|
-
}, column === null || column ===
|
|
43650
|
+
color: "".concat(column !== null && column !== void 0 && column.color ? column === null || column === void 0 ? void 0 : column.color : '#333'),
|
|
43651
|
+
whiteSpace: column !== null && column !== void 0 && column.noWrap ? 'nowrap' : 'normal'
|
|
43652
|
+
}, column === null || column === void 0 ? void 0 : column.style),
|
|
42315
43653
|
key: "table-th-".concat(column.prop.toString(), "-").concat(index),
|
|
42316
43654
|
"data-column": dataName,
|
|
42317
43655
|
className: _JSXStyle.dynamic([["2156261549", [stickyHeader && "\n position: sticky;\n top: 0;\n z-index: 1;\n ", theme.palette.accents_5, theme.palette.accents_1, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius, theme.palette.border, theme.palette.border, theme.palette.border, theme.layout.radius, theme.layout.radius]]]) + " " + (column.className || "")
|
|
@@ -42346,17 +43684,17 @@ var TableCell = function TableCell(_ref) {
|
|
|
42346
43684
|
var currentRowValue = row[column.prop];
|
|
42347
43685
|
var cellValue = currentRowValue || emptyText;
|
|
42348
43686
|
var shouldBeRenderElement = column.renderHandler(currentRowValue, row, rowIndex);
|
|
42349
|
-
var dataName = (_String = String(column === null || column ===
|
|
43687
|
+
var dataName = (_String = String(column === null || column === void 0 ? void 0 : column.label)) === null || _String === void 0 ? void 0 : _String.replace(' ', '_').toLowerCase();
|
|
42350
43688
|
return /*#__PURE__*/React$1.createElement("td", {
|
|
42351
43689
|
style: _objectSpread2({
|
|
42352
|
-
fontSize: "".concat(column === null || column ===
|
|
42353
|
-
textAlign: "".concat(column === null || column ===
|
|
43690
|
+
fontSize: "".concat(column === null || column === void 0 ? void 0 : column.fontSize),
|
|
43691
|
+
textAlign: "".concat(column === null || column === void 0 ? void 0 : column.align, " !important"),
|
|
42354
43692
|
paddingLeft: '0.3rem',
|
|
42355
43693
|
paddingRight: '0.3rem',
|
|
42356
|
-
color: "".concat(column === null || column ===
|
|
43694
|
+
color: "".concat(column === null || column === void 0 ? void 0 : column.color),
|
|
42357
43695
|
boxSizing: 'border-box',
|
|
42358
|
-
whiteSpace: column !== null && column !==
|
|
42359
|
-
}, currentRowValue === null || currentRowValue ===
|
|
43696
|
+
whiteSpace: column !== null && column !== void 0 && column.noWrap ? 'nowrap' : 'normal'
|
|
43697
|
+
}, currentRowValue === null || currentRowValue === void 0 ? void 0 : currentRowValue.style),
|
|
42360
43698
|
"data-column": dataName,
|
|
42361
43699
|
key: "row-td-".concat(index, "-").concat(column.prop.toString()),
|
|
42362
43700
|
onClick: function onClick() {
|
|
@@ -42697,9 +44035,9 @@ var TextChild = function TextChild(_ref) {
|
|
|
42697
44035
|
var children = _ref.children,
|
|
42698
44036
|
tag = _ref.tag,
|
|
42699
44037
|
_ref$className = _ref.className,
|
|
42700
|
-
className = _ref$className ===
|
|
44038
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
42701
44039
|
_ref$type = _ref.type,
|
|
42702
|
-
type = _ref$type ===
|
|
44040
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
42703
44041
|
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
42704
44042
|
var Component = tag;
|
|
42705
44043
|
var theme = useTheme();
|
|
@@ -42756,36 +44094,36 @@ var _getModifierChild = function getModifierChild(tags, children) {
|
|
|
42756
44094
|
};
|
|
42757
44095
|
var TextComponent = function TextComponent(_ref) {
|
|
42758
44096
|
var _ref$h = _ref.h1,
|
|
42759
|
-
h1 = _ref$h ===
|
|
44097
|
+
h1 = _ref$h === void 0 ? false : _ref$h,
|
|
42760
44098
|
_ref$h2 = _ref.h2,
|
|
42761
|
-
h2 = _ref$h2 ===
|
|
44099
|
+
h2 = _ref$h2 === void 0 ? false : _ref$h2,
|
|
42762
44100
|
_ref$h3 = _ref.h3,
|
|
42763
|
-
h3 = _ref$h3 ===
|
|
44101
|
+
h3 = _ref$h3 === void 0 ? false : _ref$h3,
|
|
42764
44102
|
_ref$h4 = _ref.h4,
|
|
42765
|
-
h4 = _ref$h4 ===
|
|
44103
|
+
h4 = _ref$h4 === void 0 ? false : _ref$h4,
|
|
42766
44104
|
_ref$h5 = _ref.h5,
|
|
42767
|
-
h5 = _ref$h5 ===
|
|
44105
|
+
h5 = _ref$h5 === void 0 ? false : _ref$h5,
|
|
42768
44106
|
_ref$h6 = _ref.h6,
|
|
42769
|
-
h6 = _ref$h6 ===
|
|
44107
|
+
h6 = _ref$h6 === void 0 ? false : _ref$h6,
|
|
42770
44108
|
_ref$p = _ref.p,
|
|
42771
|
-
p = _ref$p ===
|
|
44109
|
+
p = _ref$p === void 0 ? false : _ref$p,
|
|
42772
44110
|
_ref$b = _ref.b,
|
|
42773
|
-
b = _ref$b ===
|
|
44111
|
+
b = _ref$b === void 0 ? false : _ref$b,
|
|
42774
44112
|
_ref$small = _ref.small,
|
|
42775
|
-
small = _ref$small ===
|
|
44113
|
+
small = _ref$small === void 0 ? false : _ref$small,
|
|
42776
44114
|
_ref$i = _ref.i,
|
|
42777
|
-
i = _ref$i ===
|
|
44115
|
+
i = _ref$i === void 0 ? false : _ref$i,
|
|
42778
44116
|
_ref$span = _ref.span,
|
|
42779
|
-
span = _ref$span ===
|
|
44117
|
+
span = _ref$span === void 0 ? false : _ref$span,
|
|
42780
44118
|
_ref$del = _ref.del,
|
|
42781
|
-
del = _ref$del ===
|
|
44119
|
+
del = _ref$del === void 0 ? false : _ref$del,
|
|
42782
44120
|
_ref$em = _ref.em,
|
|
42783
|
-
em = _ref$em ===
|
|
44121
|
+
em = _ref$em === void 0 ? false : _ref$em,
|
|
42784
44122
|
_ref$blockquote = _ref.blockquote,
|
|
42785
|
-
blockquote = _ref$blockquote ===
|
|
44123
|
+
blockquote = _ref$blockquote === void 0 ? false : _ref$blockquote,
|
|
42786
44124
|
children = _ref.children,
|
|
42787
44125
|
_ref$className = _ref.className,
|
|
42788
|
-
className = _ref$className ===
|
|
44126
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
42789
44127
|
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
42790
44128
|
var elements = {
|
|
42791
44129
|
h1: h1,
|
|
@@ -42856,7 +44194,7 @@ function Placeholder(_ref) {
|
|
|
42856
44194
|
dataLength = _ref.dataLength,
|
|
42857
44195
|
children = _ref.children,
|
|
42858
44196
|
_ref$hide = _ref.hide,
|
|
42859
|
-
hide = _ref$hide ===
|
|
44197
|
+
hide = _ref$hide === void 0 ? false : _ref$hide;
|
|
42860
44198
|
msg = access_denied ? 'Access Denied!' : msg;
|
|
42861
44199
|
if (dataLength !== undefined && dataLength > 0 || hide) {
|
|
42862
44200
|
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, children);
|
|
@@ -42935,34 +44273,34 @@ function Placeholder(_ref) {
|
|
|
42935
44273
|
|
|
42936
44274
|
function DataTable(_ref) {
|
|
42937
44275
|
var _ref$cols = _ref.cols,
|
|
42938
|
-
cols = _ref$cols ===
|
|
44276
|
+
cols = _ref$cols === void 0 ? [] : _ref$cols,
|
|
42939
44277
|
_ref$rows = _ref.rows,
|
|
42940
|
-
rows = _ref$rows ===
|
|
44278
|
+
rows = _ref$rows === void 0 ? [] : _ref$rows,
|
|
42941
44279
|
_ref$readOnly = _ref.readOnly,
|
|
42942
|
-
readOnly = _ref$readOnly ===
|
|
44280
|
+
readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
|
|
42943
44281
|
_ref$heading = _ref.heading,
|
|
42944
|
-
heading = _ref$heading ===
|
|
44282
|
+
heading = _ref$heading === void 0 ? [] : _ref$heading,
|
|
42945
44283
|
_ref$filter = _ref.filter,
|
|
42946
|
-
filter = _ref$filter ===
|
|
44284
|
+
filter = _ref$filter === void 0 ? true : _ref$filter,
|
|
42947
44285
|
menu = _ref.menu,
|
|
42948
44286
|
_ref$sideMenu = _ref.sideMenu,
|
|
42949
|
-
sideMenu = _ref$sideMenu ===
|
|
44287
|
+
sideMenu = _ref$sideMenu === void 0 ? false : _ref$sideMenu,
|
|
42950
44288
|
_ref$style = _ref.style,
|
|
42951
|
-
style = _ref$style ===
|
|
44289
|
+
style = _ref$style === void 0 ? {} : _ref$style,
|
|
42952
44290
|
children = _ref.children,
|
|
42953
44291
|
_ref$onBack = _ref.onBack,
|
|
42954
|
-
onBack = _ref$onBack ===
|
|
44292
|
+
onBack = _ref$onBack === void 0 ? function () {
|
|
42955
44293
|
window.history.back();
|
|
42956
44294
|
} : _ref$onBack,
|
|
42957
44295
|
onRefresh = _ref.onRefresh,
|
|
42958
|
-
|
|
44296
|
+
_onFilters = _ref.onFilters,
|
|
42959
44297
|
onSelectedDelete = _ref.onSelectedDelete,
|
|
42960
44298
|
onSelectedEdit = _ref.onSelectedEdit,
|
|
42961
44299
|
onSelected = _ref.onSelected,
|
|
42962
44300
|
_ref$disableViewColum = _ref.disableViewColumn,
|
|
42963
|
-
disableViewColumn = _ref$disableViewColum ===
|
|
44301
|
+
disableViewColumn = _ref$disableViewColum === void 0 ? false : _ref$disableViewColum,
|
|
42964
44302
|
_ref$rowDraggable = _ref.rowDraggable,
|
|
42965
|
-
rowDraggable = _ref$rowDraggable ===
|
|
44303
|
+
rowDraggable = _ref$rowDraggable === void 0 ? false : _ref$rowDraggable,
|
|
42966
44304
|
onDragOver = _ref.onDragOver,
|
|
42967
44305
|
onDragEnter = _ref.onDragEnter,
|
|
42968
44306
|
onDragLeave = _ref.onDragLeave,
|
|
@@ -42972,15 +44310,15 @@ function DataTable(_ref) {
|
|
|
42972
44310
|
viewLength = _ref.viewLength,
|
|
42973
44311
|
_onPageChange = _ref.onPageChange,
|
|
42974
44312
|
_ref$disableMenu = _ref.disableMenu,
|
|
42975
|
-
disableMenu = _ref$disableMenu ===
|
|
44313
|
+
disableMenu = _ref$disableMenu === void 0 ? false : _ref$disableMenu,
|
|
42976
44314
|
_ref$cursorPagination = _ref.cursorPagination,
|
|
42977
|
-
cursorPagination = _ref$cursorPagination ===
|
|
44315
|
+
cursorPagination = _ref$cursorPagination === void 0 ? false : _ref$cursorPagination,
|
|
42978
44316
|
previousCursor = _ref.previousCursor,
|
|
42979
44317
|
nextCursor = _ref.nextCursor,
|
|
42980
44318
|
_ref$hasMore = _ref.hasMore,
|
|
42981
|
-
hasMore = _ref$hasMore ===
|
|
44319
|
+
hasMore = _ref$hasMore === void 0 ? false : _ref$hasMore,
|
|
42982
44320
|
_ref$stickyHeader = _ref.stickyHeader,
|
|
42983
|
-
stickyHeader = _ref$stickyHeader ===
|
|
44321
|
+
stickyHeader = _ref$stickyHeader === void 0 ? false : _ref$stickyHeader,
|
|
42984
44322
|
onNextPage = _ref.onNextPage,
|
|
42985
44323
|
onPreviousPage = _ref.onPreviousPage;
|
|
42986
44324
|
var TABLE_ID = _.uniqueId('tbl');
|
|
@@ -43017,7 +44355,7 @@ function DataTable(_ref) {
|
|
|
43017
44355
|
React$1.useEffect(function () {
|
|
43018
44356
|
cols.forEach(function (col) {
|
|
43019
44357
|
var _String;
|
|
43020
|
-
var dataName = (_String = String(col === null || col ===
|
|
44358
|
+
var dataName = (_String = String(col === null || col === void 0 ? void 0 : col.name)) === null || _String === void 0 ? void 0 : _String.replace(' ', '_').toLowerCase();
|
|
43021
44359
|
if (hideColumn.includes(col.name)) {
|
|
43022
44360
|
document.querySelectorAll("[data-column=\"".concat(dataName, "\"]")).forEach(function (el) {
|
|
43023
44361
|
el.style.display = 'none !important';
|
|
@@ -43031,7 +44369,7 @@ function DataTable(_ref) {
|
|
|
43031
44369
|
}, [hideColumn, cols]);
|
|
43032
44370
|
function handleHideColumnClick(_event, _id) {
|
|
43033
44371
|
var _String2;
|
|
43034
|
-
var id = (_String2 = String(_id)) === null || _String2 ===
|
|
44372
|
+
var id = (_String2 = String(_id)) === null || _String2 === void 0 ? void 0 : _String2.replace(' ', '_').toLowerCase();
|
|
43035
44373
|
var selectedIndex = hideColumn.indexOf(id);
|
|
43036
44374
|
var newSelected = [];
|
|
43037
44375
|
if (selectedIndex === -1) {
|
|
@@ -43082,14 +44420,14 @@ function DataTable(_ref) {
|
|
|
43082
44420
|
|
|
43083
44421
|
var COLUMNS = cols.filter(function (col) {
|
|
43084
44422
|
var _String3;
|
|
43085
|
-
var dataName = (_String3 = String(col === null || col ===
|
|
44423
|
+
var dataName = (_String3 = String(col === null || col === void 0 ? void 0 : col.name)) === null || _String3 === void 0 ? void 0 : _String3.replace(' ', '_').toLowerCase();
|
|
43086
44424
|
return !hideColumn.includes(dataName);
|
|
43087
44425
|
});
|
|
43088
44426
|
var content = function content() {
|
|
43089
44427
|
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, cols.map(function (option, index) {
|
|
43090
44428
|
var _String4;
|
|
43091
44429
|
var colunqid = _.uniqueId("".concat(option.name, "-").concat(index));
|
|
43092
|
-
var dataName = (_String4 = String(option.name)) === null || _String4 ===
|
|
44430
|
+
var dataName = (_String4 = String(option.name)) === null || _String4 === void 0 ? void 0 : _String4.replace(' ', '_').toLowerCase();
|
|
43093
44431
|
var isSelected = !hideColumn.includes(dataName);
|
|
43094
44432
|
return /*#__PURE__*/React$1.createElement(Popover.Item, {
|
|
43095
44433
|
selected: isSelected,
|
|
@@ -43136,7 +44474,7 @@ function DataTable(_ref) {
|
|
|
43136
44474
|
},
|
|
43137
44475
|
justify: "flex-end",
|
|
43138
44476
|
alignContent: "center"
|
|
43139
|
-
}, menu, !children && !readOnly ? /*#__PURE__*/React$1.createElement(React$1.Fragment, null, onSelectedEdit && selected.length === 1 ? /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
44477
|
+
}, menu, !children && !readOnly ? /*#__PURE__*/React$1.createElement(React$1.Fragment, null, onSelected && onSelected, onSelectedEdit && selected.length === 1 ? /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
43140
44478
|
text: "Edit Selected",
|
|
43141
44479
|
placement: "bottom",
|
|
43142
44480
|
font: 0.8,
|
|
@@ -43184,7 +44522,7 @@ function DataTable(_ref) {
|
|
|
43184
44522
|
scale: 2 / 3,
|
|
43185
44523
|
px: 0.6,
|
|
43186
44524
|
iconRight: /*#__PURE__*/React$1.createElement(Refresh$1, null)
|
|
43187
|
-
})) : null,
|
|
44525
|
+
})) : null, _onFilters && filter ? /*#__PURE__*/React$1.createElement(Tooltip, {
|
|
43188
44526
|
text: "Filters",
|
|
43189
44527
|
placement: "bottomEnd",
|
|
43190
44528
|
font: 0.8,
|
|
@@ -43269,7 +44607,9 @@ function DataTable(_ref) {
|
|
|
43269
44607
|
onSelected: function onSelected(selected) {
|
|
43270
44608
|
return setSelected(selected);
|
|
43271
44609
|
},
|
|
43272
|
-
onFilters: onFilters
|
|
44610
|
+
onFilters: function onFilters(filters) {
|
|
44611
|
+
return _onFilters && _onFilters(filters);
|
|
44612
|
+
},
|
|
43273
44613
|
data: rows,
|
|
43274
44614
|
style: {
|
|
43275
44615
|
borderCollapse: 'collapse',
|
|
@@ -43277,15 +44617,15 @@ function DataTable(_ref) {
|
|
|
43277
44617
|
}
|
|
43278
44618
|
}, COLUMNS.map(function (column, index) {
|
|
43279
44619
|
return /*#__PURE__*/React$1.createElement(Table.Column, {
|
|
43280
|
-
style: column === null || column ===
|
|
43281
|
-
options: column === null || column ===
|
|
43282
|
-
fontSize: column === null || column ===
|
|
44620
|
+
style: column === null || column === void 0 ? void 0 : column.style,
|
|
44621
|
+
options: column === null || column === void 0 ? void 0 : column.options,
|
|
44622
|
+
fontSize: column === null || column === void 0 ? void 0 : column.fontSize,
|
|
43283
44623
|
key: "".concat(column.id, "-").concat(index),
|
|
43284
44624
|
prop: column.id,
|
|
43285
44625
|
label: column.name,
|
|
43286
|
-
filter: column === null || column ===
|
|
43287
|
-
noWrap: column === null || column ===
|
|
43288
|
-
align: column === null || column ===
|
|
44626
|
+
filter: column === null || column === void 0 ? void 0 : column.filter,
|
|
44627
|
+
noWrap: column === null || column === void 0 ? void 0 : column.noWrap,
|
|
44628
|
+
align: column === null || column === void 0 ? void 0 : column.align
|
|
43289
44629
|
});
|
|
43290
44630
|
})))));
|
|
43291
44631
|
}
|
|
@@ -43298,9 +44638,9 @@ var TableBody = function TableBody(_ref) {
|
|
|
43298
44638
|
onCell = _ref.onCell,
|
|
43299
44639
|
rowClassName = _ref.rowClassName,
|
|
43300
44640
|
_ref$rowDraggable = _ref.rowDraggable,
|
|
43301
|
-
rowDraggable = _ref$rowDraggable ===
|
|
44641
|
+
rowDraggable = _ref$rowDraggable === void 0 ? false : _ref$rowDraggable,
|
|
43302
44642
|
_ref$readOnly = _ref.readOnly,
|
|
43303
|
-
readOnly = _ref$readOnly ===
|
|
44643
|
+
readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
|
|
43304
44644
|
onSelected = _ref.onSelected;
|
|
43305
44645
|
var theme = useTheme();
|
|
43306
44646
|
var _useState = React$1.useState([]),
|
|
@@ -43355,8 +44695,8 @@ var TableBody = function TableBody(_ref) {
|
|
|
43355
44695
|
var urid = _.uniqueId();
|
|
43356
44696
|
var className = rowClassName(row, index);
|
|
43357
44697
|
var rw = _objectSpread2({}, row);
|
|
43358
|
-
var rowStyle = (_row$style = row === null || row ===
|
|
43359
|
-
var onDragStart = row === null || row ===
|
|
44698
|
+
var rowStyle = (_row$style = row === null || row === void 0 ? void 0 : row.style) !== null && _row$style !== void 0 ? _row$style : {};
|
|
44699
|
+
var onDragStart = row === null || row === void 0 ? void 0 : row.onDragStart;
|
|
43360
44700
|
delete rw.table;
|
|
43361
44701
|
delete rw.style;
|
|
43362
44702
|
delete rw.onDragStart;
|
|
@@ -43398,9 +44738,9 @@ var TableBody = function TableBody(_ref) {
|
|
|
43398
44738
|
dynamic: [theme.palette.accents_1, theme.palette.border, theme.palette.accents_6]
|
|
43399
44739
|
}, "tr.__jsx-style-dynamic-selector{-webkit-transition:background-color 0.25s ease;transition:background-color 0.25s ease;font-size:inherit;}tr.hover.__jsx-style-dynamic-selector:hover{background-color:".concat(theme.palette.accents_1, ";}tr.draggable.__jsx-style-dynamic-selector:hover{border:2px dashed #dfdfdf;margin:3px;}tr.__jsx-style-dynamic-selector td{padding:0 0.5em;border-bottom:1px solid ").concat(theme.palette.border, ";color:").concat(theme.palette.accents_6, ";font-size:calc(0.875 * var(--table-font-size));text-align:left;}tr.__jsx-style-dynamic-selector .cell{min-height:calc(2.125 * var(--table-font-size));display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;}")));
|
|
43400
44740
|
}
|
|
43401
|
-
if ((data === null || data ===
|
|
44741
|
+
if ((data === null || data === void 0 ? void 0 : data.length) === 0) {
|
|
43402
44742
|
return /*#__PURE__*/React$1.createElement("tbody", null, /*#__PURE__*/React$1.createElement("tr", null, /*#__PURE__*/React$1.createElement("td", {
|
|
43403
|
-
colSpan: columns === null || columns ===
|
|
44743
|
+
colSpan: columns === null || columns === void 0 ? void 0 : columns.length
|
|
43404
44744
|
}, /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement(Placeholder, {
|
|
43405
44745
|
empty: true,
|
|
43406
44746
|
msg: "No Entries Found"
|
|
@@ -43421,7 +44761,7 @@ var TableBody = function TableBody(_ref) {
|
|
|
43421
44761
|
className: _JSXStyle.dynamic([["1422656197", [theme.palette.accents_1, theme.palette.border, theme.palette.accents_6]]])
|
|
43422
44762
|
}, "\u2003"));
|
|
43423
44763
|
}
|
|
43424
|
-
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, renderRow(columns, row, index), (row === null || row ===
|
|
44764
|
+
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, renderRow(columns, row, index), (row === null || row === void 0 ? void 0 : row.table) && /*#__PURE__*/React$1.createElement("tr", {
|
|
43425
44765
|
key: qid,
|
|
43426
44766
|
className: _JSXStyle.dynamic([["1422656197", [theme.palette.accents_1, theme.palette.border, theme.palette.accents_6]]])
|
|
43427
44767
|
}, /*#__PURE__*/React$1.createElement("td", {
|
|
@@ -43435,11 +44775,11 @@ var TableBody = function TableBody(_ref) {
|
|
|
43435
44775
|
stickyHeader: false,
|
|
43436
44776
|
style: _objectSpread2({
|
|
43437
44777
|
height: 'auto !important'
|
|
43438
|
-
}, row === null || row ===
|
|
43439
|
-
menu: (_row$table2 = row.table) === null || _row$table2 ===
|
|
43440
|
-
rows: (_row$table3 = row.table) === null || _row$table3 ===
|
|
43441
|
-
heading: (_row$table4 = row.table) === null || _row$table4 ===
|
|
43442
|
-
cols: (_row$table5 = row.table) === null || _row$table5 ===
|
|
44778
|
+
}, row === null || row === void 0 || (_row$table = row.table) === null || _row$table === void 0 ? void 0 : _row$table.style),
|
|
44779
|
+
menu: (_row$table2 = row.table) === null || _row$table2 === void 0 ? void 0 : _row$table2.menu,
|
|
44780
|
+
rows: (_row$table3 = row.table) === null || _row$table3 === void 0 ? void 0 : _row$table3.rows,
|
|
44781
|
+
heading: (_row$table4 = row.table) === null || _row$table4 === void 0 ? void 0 : _row$table4.heading,
|
|
44782
|
+
cols: (_row$table5 = row.table) === null || _row$table5 === void 0 ? void 0 : _row$table5.cols
|
|
43443
44783
|
}))));
|
|
43444
44784
|
|
|
43445
44785
|
// return (
|
|
@@ -43478,9 +44818,9 @@ var TableColumn = function TableColumn(columnProps) {
|
|
|
43478
44818
|
style = _ref.style,
|
|
43479
44819
|
color = _ref.color,
|
|
43480
44820
|
_ref$fontSize = _ref.fontSize,
|
|
43481
|
-
fontSize = _ref$fontSize ===
|
|
44821
|
+
fontSize = _ref$fontSize === void 0 ? 'smaller' : _ref$fontSize,
|
|
43482
44822
|
_ref$className = _ref.className,
|
|
43483
|
-
className = _ref$className ===
|
|
44823
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
43484
44824
|
renderHandler = _ref.render;
|
|
43485
44825
|
var _useTableContext = useTableContext(),
|
|
43486
44826
|
updateColumn = _useTableContext.updateColumn;
|
|
@@ -43515,17 +44855,17 @@ function TableComponent(tableProps) {
|
|
|
43515
44855
|
children = _ref.children,
|
|
43516
44856
|
customData = _ref.data,
|
|
43517
44857
|
_ref$initialData = _ref.initialData,
|
|
43518
|
-
initialData = _ref$initialData ===
|
|
44858
|
+
initialData = _ref$initialData === void 0 ? [] : _ref$initialData,
|
|
43519
44859
|
_ref$hover = _ref.hover,
|
|
43520
|
-
hover = _ref$hover ===
|
|
44860
|
+
hover = _ref$hover === void 0 ? true : _ref$hover,
|
|
43521
44861
|
_ref$emptyText = _ref.emptyText,
|
|
43522
|
-
emptyText = _ref$emptyText ===
|
|
44862
|
+
emptyText = _ref$emptyText === void 0 ? '' : _ref$emptyText,
|
|
43523
44863
|
_ref$rowDraggable = _ref.rowDraggable,
|
|
43524
|
-
rowDraggable = _ref$rowDraggable ===
|
|
44864
|
+
rowDraggable = _ref$rowDraggable === void 0 ? false : _ref$rowDraggable,
|
|
43525
44865
|
_ref$readOnly = _ref.readOnly,
|
|
43526
|
-
readOnly = _ref$readOnly ===
|
|
44866
|
+
readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
|
|
43527
44867
|
_ref$cursorPagination = _ref.cursorPagination,
|
|
43528
|
-
cursorPagination = _ref$cursorPagination ===
|
|
44868
|
+
cursorPagination = _ref$cursorPagination === void 0 ? false : _ref$cursorPagination,
|
|
43529
44869
|
previousCursor = _ref.previousCursor,
|
|
43530
44870
|
nextCursor = _ref.nextCursor;
|
|
43531
44871
|
_ref.hasMore;
|
|
@@ -43537,16 +44877,16 @@ function TableComponent(tableProps) {
|
|
|
43537
44877
|
var onFilters = _ref.onFilters,
|
|
43538
44878
|
onPageChange = _ref.onPageChange,
|
|
43539
44879
|
_ref$showFilters = _ref.showFilters,
|
|
43540
|
-
showFilters = _ref$showFilters ===
|
|
44880
|
+
showFilters = _ref$showFilters === void 0 ? false : _ref$showFilters,
|
|
43541
44881
|
_ref$stickyHeader = _ref.stickyHeader,
|
|
43542
|
-
stickyHeader = _ref$stickyHeader ===
|
|
44882
|
+
stickyHeader = _ref$stickyHeader === void 0 ? false : _ref$stickyHeader,
|
|
43543
44883
|
onSelected = _ref.onSelected,
|
|
43544
44884
|
dataLength = _ref.dataLength,
|
|
43545
44885
|
viewLength = _ref.viewLength,
|
|
43546
44886
|
_ref$className = _ref.className,
|
|
43547
|
-
className = _ref$className ===
|
|
44887
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
43548
44888
|
_ref$rowClassName = _ref.rowClassName,
|
|
43549
|
-
rowClassName = _ref$rowClassName ===
|
|
44889
|
+
rowClassName = _ref$rowClassName === void 0 ? function () {
|
|
43550
44890
|
return '';
|
|
43551
44891
|
} : _ref$rowClassName,
|
|
43552
44892
|
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
@@ -43601,6 +44941,15 @@ function TableComponent(tableProps) {
|
|
|
43601
44941
|
endIndex: endIndex
|
|
43602
44942
|
};
|
|
43603
44943
|
};
|
|
44944
|
+
var _useState5 = React$1.useState({}),
|
|
44945
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
44946
|
+
filters = _useState6[0],
|
|
44947
|
+
setFilters = _useState6[1];
|
|
44948
|
+
React$1.useEffect(function () {
|
|
44949
|
+
if (onFilters) {
|
|
44950
|
+
onFilters(filters);
|
|
44951
|
+
}
|
|
44952
|
+
}, [filters]);
|
|
43604
44953
|
return /*#__PURE__*/React$1.createElement(TableContext.Provider, {
|
|
43605
44954
|
value: contextValue
|
|
43606
44955
|
}, /*#__PURE__*/React$1.createElement("table", _extends({
|
|
@@ -43610,7 +44959,9 @@ function TableComponent(tableProps) {
|
|
|
43610
44959
|
}), /*#__PURE__*/React$1.createElement(TableHead, {
|
|
43611
44960
|
stickyHeader: stickyHeader,
|
|
43612
44961
|
columns: columns,
|
|
43613
|
-
onFilters: onFilters
|
|
44962
|
+
onFilters: function onFilters(filters) {
|
|
44963
|
+
return setFilters(filters);
|
|
44964
|
+
},
|
|
43614
44965
|
showFilters: showFilters,
|
|
43615
44966
|
width: width
|
|
43616
44967
|
}), /*#__PURE__*/React$1.createElement(TableBody, {
|
|
@@ -43626,7 +44977,7 @@ function TableComponent(tableProps) {
|
|
|
43626
44977
|
}), children, cursorPagination ? /*#__PURE__*/React$1.createElement("tfoot", {
|
|
43627
44978
|
className: _JSXStyle.dynamic([["1971279331", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]])
|
|
43628
44979
|
}, /*#__PURE__*/React$1.createElement("td", {
|
|
43629
|
-
colSpan: columns === null || columns ===
|
|
44980
|
+
colSpan: columns === null || columns === void 0 ? void 0 : columns.length,
|
|
43630
44981
|
className: _JSXStyle.dynamic([["1971279331", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]])
|
|
43631
44982
|
}, /*#__PURE__*/React$1.createElement("div", {
|
|
43632
44983
|
style: {
|
|
@@ -43660,7 +45011,7 @@ function TableComponent(tableProps) {
|
|
|
43660
45011
|
}))))) : dataLength && viewLength && onPageChange ? /*#__PURE__*/React$1.createElement("tfoot", {
|
|
43661
45012
|
className: _JSXStyle.dynamic([["1971279331", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]])
|
|
43662
45013
|
}, /*#__PURE__*/React$1.createElement("td", {
|
|
43663
|
-
colSpan: columns === null || columns ===
|
|
45014
|
+
colSpan: columns === null || columns === void 0 ? void 0 : columns.length,
|
|
43664
45015
|
className: _JSXStyle.dynamic([["1971279331", [SCALES.font(1), SCALES.width(1, '100%'), SCALES.height(1, 'auto'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0)]]])
|
|
43665
45016
|
}, /*#__PURE__*/React$1.createElement(Pagination, {
|
|
43666
45017
|
style: {
|
|
@@ -43712,11 +45063,11 @@ var Highlight = function Highlight(_ref) {
|
|
|
43712
45063
|
var rect = _ref.rect,
|
|
43713
45064
|
visible = _ref.visible,
|
|
43714
45065
|
_ref$hoverHeightRatio = _ref.hoverHeightRatio,
|
|
43715
|
-
hoverHeightRatio = _ref$hoverHeightRatio ===
|
|
45066
|
+
hoverHeightRatio = _ref$hoverHeightRatio === void 0 ? 1 : _ref$hoverHeightRatio,
|
|
43716
45067
|
_ref$hoverWidthRatio = _ref.hoverWidthRatio,
|
|
43717
|
-
hoverWidthRatio = _ref$hoverWidthRatio ===
|
|
45068
|
+
hoverWidthRatio = _ref$hoverWidthRatio === void 0 ? 1 : _ref$hoverWidthRatio,
|
|
43718
45069
|
_ref$activeOpacity = _ref.activeOpacity,
|
|
43719
|
-
activeOpacity = _ref$activeOpacity ===
|
|
45070
|
+
activeOpacity = _ref$activeOpacity === void 0 ? 0.8 : _ref$activeOpacity,
|
|
43720
45071
|
className = _ref.className,
|
|
43721
45072
|
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
43722
45073
|
var theme = useTheme();
|
|
@@ -43748,26 +45099,26 @@ var TabsComponent = function TabsComponent(_ref) {
|
|
|
43748
45099
|
var userCustomInitialValue = _ref.initialValue,
|
|
43749
45100
|
value = _ref.value,
|
|
43750
45101
|
_ref$hideDivider = _ref.hideDivider,
|
|
43751
|
-
hideDivider = _ref$hideDivider ===
|
|
45102
|
+
hideDivider = _ref$hideDivider === void 0 ? false : _ref$hideDivider,
|
|
43752
45103
|
hideBorder = _ref.hideBorder,
|
|
43753
45104
|
children = _ref.children,
|
|
43754
45105
|
onChange = _ref.onChange,
|
|
43755
45106
|
_ref$className = _ref.className,
|
|
43756
|
-
className = _ref$className ===
|
|
45107
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
43757
45108
|
_ref$leftSpace = _ref.leftSpace,
|
|
43758
|
-
leftSpace = _ref$leftSpace ===
|
|
45109
|
+
leftSpace = _ref$leftSpace === void 0 ? '12px' : _ref$leftSpace,
|
|
43759
45110
|
_ref$highlight = _ref.highlight,
|
|
43760
|
-
highlight = _ref$highlight ===
|
|
45111
|
+
highlight = _ref$highlight === void 0 ? true : _ref$highlight,
|
|
43761
45112
|
_ref$hoverHeightRatio = _ref.hoverHeightRatio,
|
|
43762
|
-
hoverHeightRatio = _ref$hoverHeightRatio ===
|
|
45113
|
+
hoverHeightRatio = _ref$hoverHeightRatio === void 0 ? 0.7 : _ref$hoverHeightRatio,
|
|
43763
45114
|
_ref$hoverWidthRatio = _ref.hoverWidthRatio,
|
|
43764
|
-
hoverWidthRatio = _ref$hoverWidthRatio ===
|
|
45115
|
+
hoverWidthRatio = _ref$hoverWidthRatio === void 0 ? 1.15 : _ref$hoverWidthRatio,
|
|
43765
45116
|
_ref$activeClassName = _ref.activeClassName,
|
|
43766
|
-
activeClassName = _ref$activeClassName ===
|
|
45117
|
+
activeClassName = _ref$activeClassName === void 0 ? '' : _ref$activeClassName,
|
|
43767
45118
|
_ref$activeStyle = _ref.activeStyle,
|
|
43768
|
-
activeStyle = _ref$activeStyle ===
|
|
45119
|
+
activeStyle = _ref$activeStyle === void 0 ? {} : _ref$activeStyle,
|
|
43769
45120
|
_ref$align = _ref.align,
|
|
43770
|
-
align = _ref$align ===
|
|
45121
|
+
align = _ref$align === void 0 ? 'left' : _ref$align,
|
|
43771
45122
|
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
43772
45123
|
var theme = useTheme();
|
|
43773
45124
|
var _useScale = useScale(),
|
|
@@ -43871,7 +45222,7 @@ var TabsItemComponent = function TabsItemComponent(_ref) {
|
|
|
43871
45222
|
value = _ref.value,
|
|
43872
45223
|
label = _ref.label,
|
|
43873
45224
|
_ref$disabled = _ref.disabled,
|
|
43874
|
-
disabled = _ref$disabled ===
|
|
45225
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
|
43875
45226
|
var _useScale = useScale(),
|
|
43876
45227
|
SCALES = _useScale.SCALES;
|
|
43877
45228
|
var _useTabsContext = useTabsContext(),
|
|
@@ -43971,12 +45322,12 @@ var getColors$1 = function getColors(type, palette, invert) {
|
|
|
43971
45322
|
};
|
|
43972
45323
|
var TagComponent = function TagComponent(_ref) {
|
|
43973
45324
|
var _ref$type = _ref.type,
|
|
43974
|
-
type = _ref$type ===
|
|
45325
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
43975
45326
|
children = _ref.children,
|
|
43976
45327
|
_ref$className = _ref.className,
|
|
43977
|
-
className = _ref$className ===
|
|
45328
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
43978
45329
|
_ref$invert = _ref.invert,
|
|
43979
|
-
invert = _ref$invert ===
|
|
45330
|
+
invert = _ref$invert === void 0 ? false : _ref$invert,
|
|
43980
45331
|
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
43981
45332
|
var theme = useTheme();
|
|
43982
45333
|
var _useScale = useScale(),
|
|
@@ -44022,15 +45373,15 @@ var getColors = function getColors(palette, status) {
|
|
|
44022
45373
|
var _excluded$5 = ["initialChecked", "checked", "disabled", "onChange", "type", "className", "children"];
|
|
44023
45374
|
var ToggleComponent = function ToggleComponent(_ref) {
|
|
44024
45375
|
var _ref$initialChecked = _ref.initialChecked,
|
|
44025
|
-
initialChecked = _ref$initialChecked ===
|
|
45376
|
+
initialChecked = _ref$initialChecked === void 0 ? false : _ref$initialChecked,
|
|
44026
45377
|
checked = _ref.checked,
|
|
44027
45378
|
_ref$disabled = _ref.disabled,
|
|
44028
|
-
disabled = _ref$disabled ===
|
|
45379
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
44029
45380
|
onChange = _ref.onChange,
|
|
44030
45381
|
_ref$type = _ref.type,
|
|
44031
|
-
type = _ref$type ===
|
|
45382
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
44032
45383
|
_ref$className = _ref.className,
|
|
44033
|
-
className = _ref$className ===
|
|
45384
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
44034
45385
|
children = _ref.children,
|
|
44035
45386
|
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
44036
45387
|
var theme = useTheme();
|
|
@@ -44092,9 +45443,9 @@ var Toggle = withScale(ToggleComponent);
|
|
|
44092
45443
|
var TreeFileIcon = function TreeFileIcon(_ref) {
|
|
44093
45444
|
var color = _ref.color,
|
|
44094
45445
|
_ref$width = _ref.width,
|
|
44095
|
-
width = _ref$width ===
|
|
45446
|
+
width = _ref$width === void 0 ? 22 : _ref$width,
|
|
44096
45447
|
_ref$height = _ref.height,
|
|
44097
|
-
height = _ref$height ===
|
|
45448
|
+
height = _ref$height === void 0 ? 22 : _ref$height;
|
|
44098
45449
|
var theme = useTheme();
|
|
44099
45450
|
return /*#__PURE__*/React$1.createElement("svg", {
|
|
44100
45451
|
viewBox: "0 0 24 24",
|
|
@@ -44166,12 +45517,12 @@ var _excluded$4 = ["name", "parentPath", "level", "extra", "className"];
|
|
|
44166
45517
|
var TreeFile = function TreeFile(_ref) {
|
|
44167
45518
|
var name = _ref.name,
|
|
44168
45519
|
_ref$parentPath = _ref.parentPath,
|
|
44169
|
-
parentPath = _ref$parentPath ===
|
|
45520
|
+
parentPath = _ref$parentPath === void 0 ? '' : _ref$parentPath,
|
|
44170
45521
|
_ref$level = _ref.level,
|
|
44171
|
-
level = _ref$level ===
|
|
45522
|
+
level = _ref$level === void 0 ? 0 : _ref$level,
|
|
44172
45523
|
extra = _ref.extra,
|
|
44173
45524
|
_ref$className = _ref.className,
|
|
44174
|
-
className = _ref$className ===
|
|
45525
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
44175
45526
|
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
44176
45527
|
var theme = useTheme();
|
|
44177
45528
|
var _useTreeContext = useTreeContext(),
|
|
@@ -44207,9 +45558,9 @@ TreeFile.displayName = 'TreeFile';
|
|
|
44207
45558
|
var TreeFolderIcon = function TreeFolderIcon(_ref) {
|
|
44208
45559
|
var color = _ref.color,
|
|
44209
45560
|
_ref$width = _ref.width,
|
|
44210
|
-
width = _ref$width ===
|
|
45561
|
+
width = _ref$width === void 0 ? 22 : _ref$width,
|
|
44211
45562
|
_ref$height = _ref.height,
|
|
44212
|
-
height = _ref$height ===
|
|
45563
|
+
height = _ref$height === void 0 ? 22 : _ref$height;
|
|
44213
45564
|
var theme = useTheme();
|
|
44214
45565
|
return /*#__PURE__*/React$1.createElement("svg", {
|
|
44215
45566
|
viewBox: "0 0 24 24",
|
|
@@ -44235,11 +45586,11 @@ TreeFolderIcon.displayName = 'TreeFolderIcon';
|
|
|
44235
45586
|
var TreeStatusIcon = function TreeStatusIcon(_ref) {
|
|
44236
45587
|
var color = _ref.color,
|
|
44237
45588
|
_ref$width = _ref.width,
|
|
44238
|
-
width = _ref$width ===
|
|
45589
|
+
width = _ref$width === void 0 ? 12 : _ref$width,
|
|
44239
45590
|
_ref$height = _ref.height,
|
|
44240
|
-
height = _ref$height ===
|
|
45591
|
+
height = _ref$height === void 0 ? 12 : _ref$height,
|
|
44241
45592
|
_ref$active = _ref.active,
|
|
44242
|
-
active = _ref$active ===
|
|
45593
|
+
active = _ref$active === void 0 ? false : _ref$active;
|
|
44243
45594
|
var theme = useTheme();
|
|
44244
45595
|
return /*#__PURE__*/React$1.createElement("svg", {
|
|
44245
45596
|
viewBox: "0 0 24 24",
|
|
@@ -44277,11 +45628,11 @@ var _excluded$3 = ["name", "children", "parentPath", "level", "extra", "classNam
|
|
|
44277
45628
|
var _TreeFolder = function TreeFolder(_ref) {
|
|
44278
45629
|
var name = _ref.name,
|
|
44279
45630
|
_ref$children = _ref.children,
|
|
44280
|
-
children = _ref$children ===
|
|
45631
|
+
children = _ref$children === void 0 ? '' : _ref$children,
|
|
44281
45632
|
_ref$parentPath = _ref.parentPath,
|
|
44282
|
-
parentPath = _ref$parentPath ===
|
|
45633
|
+
parentPath = _ref$parentPath === void 0 ? '' : _ref$parentPath,
|
|
44283
45634
|
_ref$level = _ref.level,
|
|
44284
|
-
parentLevel = _ref$level ===
|
|
45635
|
+
parentLevel = _ref$level === void 0 ? 0 : _ref$level,
|
|
44285
45636
|
extra = _ref.extra,
|
|
44286
45637
|
className = _ref.className,
|
|
44287
45638
|
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
@@ -44363,7 +45714,7 @@ var Tree = function Tree(_ref) {
|
|
|
44363
45714
|
var children = _ref.children,
|
|
44364
45715
|
onClick = _ref.onClick,
|
|
44365
45716
|
_ref$initialExpand = _ref.initialExpand,
|
|
44366
|
-
initialExpand = _ref$initialExpand ===
|
|
45717
|
+
initialExpand = _ref$initialExpand === void 0 ? false : _ref$initialExpand,
|
|
44367
45718
|
value = _ref.value,
|
|
44368
45719
|
className = _ref.className,
|
|
44369
45720
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
@@ -44524,7 +45875,7 @@ function useTimer() {
|
|
|
44524
45875
|
expiry = _ref.expiryTimestamp,
|
|
44525
45876
|
onExpire = _ref.onExpire,
|
|
44526
45877
|
_ref$autoStart = _ref.autoStart,
|
|
44527
|
-
autoStart = _ref$autoStart ===
|
|
45878
|
+
autoStart = _ref$autoStart === void 0 ? true : _ref$autoStart;
|
|
44528
45879
|
var _useState = React$1.useState(expiry),
|
|
44529
45880
|
_useState2 = _slicedToArray(_useState, 2),
|
|
44530
45881
|
expiryTimestamp = _useState2[0],
|
|
@@ -44664,7 +46015,7 @@ var UserComponent = function UserComponent(_ref) {
|
|
|
44664
46015
|
name = _ref.name,
|
|
44665
46016
|
children = _ref.children,
|
|
44666
46017
|
_ref$className = _ref.className,
|
|
44667
|
-
className = _ref$className ===
|
|
46018
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
44668
46019
|
altText = _ref.altText,
|
|
44669
46020
|
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
44670
46021
|
var theme = useTheme();
|
|
@@ -44697,7 +46048,7 @@ var _excluded = ["href", "className", "children"];
|
|
|
44697
46048
|
var UserLink = /*#__PURE__*/React$1.forwardRef(function (_ref, ref) {
|
|
44698
46049
|
var href = _ref.href,
|
|
44699
46050
|
_ref$className = _ref.className,
|
|
44700
|
-
className = _ref$className ===
|
|
46051
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
44701
46052
|
children = _ref.children,
|
|
44702
46053
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
44703
46054
|
return /*#__PURE__*/React$1.createElement("div", _extends({}, props, {
|
|
@@ -44740,9 +46091,9 @@ var makeQueries = function makeQueries(bp, up, down) {
|
|
|
44740
46091
|
var useMediaQuery = function useMediaQuery(breakpoint) {
|
|
44741
46092
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultResponsiveOptions;
|
|
44742
46093
|
var _options$match = options.match,
|
|
44743
|
-
matchType = _options$match ===
|
|
46094
|
+
matchType = _options$match === void 0 ? 'default' : _options$match,
|
|
44744
46095
|
_options$ssrMatchMedi = options.ssrMatchMedia,
|
|
44745
|
-
ssrMatchMedia = _options$ssrMatchMedi ===
|
|
46096
|
+
ssrMatchMedia = _options$ssrMatchMedi === void 0 ? null : _options$ssrMatchMedi;
|
|
44746
46097
|
var supportMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';
|
|
44747
46098
|
var theme = useTheme();
|
|
44748
46099
|
var mediaQueries = React$1.useMemo(function () {
|
|
@@ -44892,7 +46243,7 @@ var Skeleton = function Skeleton(_ref) {
|
|
|
44892
46243
|
width !== null ? skeletonStyle.width = width : skeletonStyle.width = "";
|
|
44893
46244
|
height !== null ? skeletonStyle.height = height : skeletonStyle.height = "";
|
|
44894
46245
|
shape === "circle" ? skeletonStyle.borderRadius = "50%" : skeletonStyle.borderRadius = "";
|
|
44895
|
-
style !== null ? skeletonStyle = _objectSpread2(_objectSpread2({}, skeletonStyle), style) :
|
|
46246
|
+
style !== null ? skeletonStyle = _objectSpread2(_objectSpread2({}, skeletonStyle), style) : void 0;
|
|
44896
46247
|
backgroundColor !== null ? skeletonStyle.backgroundColor = backgroundColor : skeletonStyle.backgroundColor = "white";
|
|
44897
46248
|
if (duration) setTimeout(hideSkeleton, duration);
|
|
44898
46249
|
|
|
@@ -45037,14 +46388,14 @@ var CartProvider = function CartProvider(_ref) {
|
|
|
45037
46388
|
var children = _ref.children,
|
|
45038
46389
|
cartId = _ref.id,
|
|
45039
46390
|
_ref$defaultItems = _ref.defaultItems,
|
|
45040
|
-
defaultItems = _ref$defaultItems ===
|
|
46391
|
+
defaultItems = _ref$defaultItems === void 0 ? [] : _ref$defaultItems,
|
|
45041
46392
|
onSetItems = _ref.onSetItems,
|
|
45042
46393
|
onItemAdd = _ref.onItemAdd,
|
|
45043
46394
|
onItemUpdate = _ref.onItemUpdate,
|
|
45044
46395
|
onItemRemove = _ref.onItemRemove,
|
|
45045
46396
|
onEmptyCart = _ref.onEmptyCart,
|
|
45046
46397
|
_ref$storage = _ref.storage,
|
|
45047
|
-
storage = _ref$storage ===
|
|
46398
|
+
storage = _ref$storage === void 0 ? useLocalStorage : _ref$storage,
|
|
45048
46399
|
metadata = _ref.metadata;
|
|
45049
46400
|
var id = cartId ? cartId : createCartIdentifier();
|
|
45050
46401
|
var _storage = storage(cartId ? "react-use-cart-".concat(id) : "react-use-cart", JSON.stringify(_objectSpread2(_objectSpread2({
|
|
@@ -45203,32 +46554,32 @@ var _window$2 = global.window;
|
|
|
45203
46554
|
var LoginSocialFacebook = function LoginSocialFacebook(_ref) {
|
|
45204
46555
|
var appId = _ref.appId,
|
|
45205
46556
|
_ref$scope = _ref.scope,
|
|
45206
|
-
scope = _ref$scope ===
|
|
46557
|
+
scope = _ref$scope === void 0 ? 'email,public_profile' : _ref$scope,
|
|
45207
46558
|
_ref$state = _ref.state,
|
|
45208
|
-
state = _ref$state ===
|
|
46559
|
+
state = _ref$state === void 0 ? true : _ref$state,
|
|
45209
46560
|
_ref$xfbml = _ref.xfbml,
|
|
45210
|
-
xfbml = _ref$xfbml ===
|
|
46561
|
+
xfbml = _ref$xfbml === void 0 ? true : _ref$xfbml,
|
|
45211
46562
|
_ref$cookie = _ref.cookie,
|
|
45212
|
-
cookie = _ref$cookie ===
|
|
46563
|
+
cookie = _ref$cookie === void 0 ? true : _ref$cookie,
|
|
45213
46564
|
_ref$version = _ref.version,
|
|
45214
|
-
version = _ref$version ===
|
|
46565
|
+
version = _ref$version === void 0 ? 'v2.7' : _ref$version,
|
|
45215
46566
|
_ref$language = _ref.language,
|
|
45216
|
-
language = _ref$language ===
|
|
46567
|
+
language = _ref$language === void 0 ? 'en_EN' : _ref$language,
|
|
45217
46568
|
_ref$auth_type = _ref.auth_type,
|
|
45218
|
-
auth_type = _ref$auth_type ===
|
|
46569
|
+
auth_type = _ref$auth_type === void 0 ? '' : _ref$auth_type,
|
|
45219
46570
|
className = _ref.className,
|
|
45220
46571
|
onLoginStart = _ref.onLoginStart,
|
|
45221
46572
|
onReject = _ref.onReject,
|
|
45222
46573
|
onResolve = _ref.onResolve,
|
|
45223
46574
|
redirect_uri = _ref.redirect_uri,
|
|
45224
46575
|
_ref$fieldsProfile = _ref.fieldsProfile,
|
|
45225
|
-
fieldsProfile = _ref$fieldsProfile ===
|
|
46576
|
+
fieldsProfile = _ref$fieldsProfile === void 0 ? 'id,first_name,last_name,middle_name,name,name_format,picture,short_name,email,gender' : _ref$fieldsProfile,
|
|
45226
46577
|
_ref$response_type = _ref.response_type,
|
|
45227
|
-
response_type = _ref$response_type ===
|
|
46578
|
+
response_type = _ref$response_type === void 0 ? 'code' : _ref$response_type,
|
|
45228
46579
|
_ref$return_scopes = _ref.return_scopes,
|
|
45229
|
-
return_scopes = _ref$return_scopes ===
|
|
46580
|
+
return_scopes = _ref$return_scopes === void 0 ? true : _ref$return_scopes,
|
|
45230
46581
|
_ref$isOnlyGetToken = _ref.isOnlyGetToken,
|
|
45231
|
-
isOnlyGetToken = _ref$isOnlyGetToken ===
|
|
46582
|
+
isOnlyGetToken = _ref$isOnlyGetToken === void 0 ? false : _ref$isOnlyGetToken,
|
|
45232
46583
|
children = _ref.children;
|
|
45233
46584
|
var scriptNodeRef = React$1.useRef(null);
|
|
45234
46585
|
var _useState = React$1.useState(false),
|
|
@@ -45343,36 +46694,36 @@ var _window$1 = global.window;
|
|
|
45343
46694
|
var LoginSocialGoogle = function LoginSocialGoogle(_ref) {
|
|
45344
46695
|
var client_id = _ref.client_id,
|
|
45345
46696
|
_ref$scope = _ref.scope,
|
|
45346
|
-
scope = _ref$scope ===
|
|
46697
|
+
scope = _ref$scope === void 0 ? 'https://www.googleapis.com/auth/userinfo.profile' : _ref$scope,
|
|
45347
46698
|
_ref$prompt = _ref.prompt,
|
|
45348
|
-
prompt = _ref$prompt ===
|
|
46699
|
+
prompt = _ref$prompt === void 0 ? 'select_account' : _ref$prompt,
|
|
45349
46700
|
_ref$typeResponse = _ref.typeResponse,
|
|
45350
|
-
typeResponse = _ref$typeResponse ===
|
|
46701
|
+
typeResponse = _ref$typeResponse === void 0 ? 'accessToken' : _ref$typeResponse,
|
|
45351
46702
|
ux_mode = _ref.ux_mode,
|
|
45352
46703
|
_ref$className = _ref.className,
|
|
45353
|
-
className = _ref$className ===
|
|
46704
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
45354
46705
|
_ref$login_hint = _ref.login_hint,
|
|
45355
|
-
login_hint = _ref$login_hint ===
|
|
46706
|
+
login_hint = _ref$login_hint === void 0 ? '' : _ref$login_hint,
|
|
45356
46707
|
_ref$access_type = _ref.access_type,
|
|
45357
|
-
access_type = _ref$access_type ===
|
|
46708
|
+
access_type = _ref$access_type === void 0 ? 'online' : _ref$access_type,
|
|
45358
46709
|
onLoginStart = _ref.onLoginStart,
|
|
45359
46710
|
onReject = _ref.onReject,
|
|
45360
46711
|
onResolve = _ref.onResolve,
|
|
45361
46712
|
_ref$redirect_uri = _ref.redirect_uri,
|
|
45362
|
-
redirect_uri = _ref$redirect_uri ===
|
|
46713
|
+
redirect_uri = _ref$redirect_uri === void 0 ? '/' : _ref$redirect_uri,
|
|
45363
46714
|
_ref$auto_select = _ref.auto_select,
|
|
45364
|
-
auto_select = _ref$auto_select ===
|
|
46715
|
+
auto_select = _ref$auto_select === void 0 ? false : _ref$auto_select,
|
|
45365
46716
|
_ref$isOnlyGetToken = _ref.isOnlyGetToken,
|
|
45366
|
-
isOnlyGetToken = _ref$isOnlyGetToken ===
|
|
46717
|
+
isOnlyGetToken = _ref$isOnlyGetToken === void 0 ? false : _ref$isOnlyGetToken,
|
|
45367
46718
|
_ref$cookie_policy = _ref.cookie_policy,
|
|
45368
|
-
cookie_policy = _ref$cookie_policy ===
|
|
46719
|
+
cookie_policy = _ref$cookie_policy === void 0 ? 'single_host_origin' : _ref$cookie_policy,
|
|
45369
46720
|
_ref$hosted_domain = _ref.hosted_domain,
|
|
45370
|
-
hosted_domain = _ref$hosted_domain ===
|
|
46721
|
+
hosted_domain = _ref$hosted_domain === void 0 ? '' : _ref$hosted_domain,
|
|
45371
46722
|
_ref$discoveryDocs = _ref.discoveryDocs,
|
|
45372
|
-
discoveryDocs = _ref$discoveryDocs ===
|
|
46723
|
+
discoveryDocs = _ref$discoveryDocs === void 0 ? '' : _ref$discoveryDocs,
|
|
45373
46724
|
children = _ref.children,
|
|
45374
46725
|
_ref$fetch_basic_prof = _ref.fetch_basic_profile,
|
|
45375
|
-
fetch_basic_profile = _ref$fetch_basic_prof ===
|
|
46726
|
+
fetch_basic_profile = _ref$fetch_basic_prof === void 0 ? true : _ref$fetch_basic_prof;
|
|
45376
46727
|
var scriptNodeRef = React$1.useRef(null);
|
|
45377
46728
|
var _useState = React$1.useState(false),
|
|
45378
46729
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -45451,7 +46802,7 @@ var LoginSocialGoogle = function LoginSocialGoogle(_ref) {
|
|
|
45451
46802
|
provider: 'google',
|
|
45452
46803
|
data: res
|
|
45453
46804
|
});else {
|
|
45454
|
-
if (res !== null && res !==
|
|
46805
|
+
if (res !== null && res !== void 0 && res.access_token) {
|
|
45455
46806
|
if (isOnlyGetToken) onResolve({
|
|
45456
46807
|
provider: 'google',
|
|
45457
46808
|
data: res
|
|
@@ -45535,20 +46886,20 @@ var PREVENT_CORS_URL$4 = ''; //https://cors.bridged.cc
|
|
|
45535
46886
|
|
|
45536
46887
|
var LoginSocialGithub$1 = function LoginSocialGithub(_ref) {
|
|
45537
46888
|
var _ref$state = _ref.state,
|
|
45538
|
-
state = _ref$state ===
|
|
46889
|
+
state = _ref$state === void 0 ? '' : _ref$state,
|
|
45539
46890
|
_ref$scope = _ref.scope,
|
|
45540
|
-
scope = _ref$scope ===
|
|
46891
|
+
scope = _ref$scope === void 0 ? 'repo,gist' : _ref$scope,
|
|
45541
46892
|
client_id = _ref.client_id,
|
|
45542
46893
|
client_secret = _ref.client_secret,
|
|
45543
46894
|
_ref$className = _ref.className,
|
|
45544
|
-
className = _ref$className ===
|
|
46895
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
45545
46896
|
redirect_uri = _ref.redirect_uri,
|
|
45546
46897
|
_ref$allow_signup = _ref.allow_signup,
|
|
45547
|
-
allow_signup = _ref$allow_signup ===
|
|
46898
|
+
allow_signup = _ref$allow_signup === void 0 ? false : _ref$allow_signup,
|
|
45548
46899
|
_ref$isOnlyGetToken = _ref.isOnlyGetToken,
|
|
45549
|
-
isOnlyGetToken = _ref$isOnlyGetToken ===
|
|
46900
|
+
isOnlyGetToken = _ref$isOnlyGetToken === void 0 ? false : _ref$isOnlyGetToken,
|
|
45550
46901
|
_ref$isOnlyGetCode = _ref.isOnlyGetCode,
|
|
45551
|
-
isOnlyGetCode = _ref$isOnlyGetCode ===
|
|
46902
|
+
isOnlyGetCode = _ref$isOnlyGetCode === void 0 ? false : _ref$isOnlyGetCode,
|
|
45552
46903
|
children = _ref.children,
|
|
45553
46904
|
onReject = _ref.onReject,
|
|
45554
46905
|
onResolve = _ref.onResolve,
|
|
@@ -45557,7 +46908,7 @@ var LoginSocialGithub$1 = function LoginSocialGithub(_ref) {
|
|
|
45557
46908
|
var popupWindowURL = new URL(window.location.href);
|
|
45558
46909
|
var code = popupWindowURL.searchParams.get('code');
|
|
45559
46910
|
var state = popupWindowURL.searchParams.get('state');
|
|
45560
|
-
if (state !== null && state !==
|
|
46911
|
+
if (state !== null && state !== void 0 && state.includes('_github') && code) {
|
|
45561
46912
|
localStorage.setItem('github', code);
|
|
45562
46913
|
window.close();
|
|
45563
46914
|
}
|
|
@@ -45682,21 +47033,21 @@ var INSTAGRAM_API_URL = 'https://graph.instagram.com/';
|
|
|
45682
47033
|
var PREVENT_CORS_URL$3 = '';
|
|
45683
47034
|
var LoginSocialInstagram = function LoginSocialInstagram(_ref) {
|
|
45684
47035
|
var _ref$state = _ref.state,
|
|
45685
|
-
state = _ref$state ===
|
|
47036
|
+
state = _ref$state === void 0 ? '' : _ref$state,
|
|
45686
47037
|
client_id = _ref.client_id,
|
|
45687
47038
|
client_secret = _ref.client_secret,
|
|
45688
47039
|
className = _ref.className,
|
|
45689
47040
|
redirect_uri = _ref.redirect_uri,
|
|
45690
47041
|
_ref$fields = _ref.fields,
|
|
45691
|
-
fields = _ref$fields ===
|
|
47042
|
+
fields = _ref$fields === void 0 ? 'id,username,account_type,media_count' : _ref$fields,
|
|
45692
47043
|
_ref$scope = _ref.scope,
|
|
45693
|
-
scope = _ref$scope ===
|
|
47044
|
+
scope = _ref$scope === void 0 ? 'user_profile,user_media' : _ref$scope,
|
|
45694
47045
|
_ref$response_type = _ref.response_type,
|
|
45695
|
-
response_type = _ref$response_type ===
|
|
47046
|
+
response_type = _ref$response_type === void 0 ? 'code' : _ref$response_type,
|
|
45696
47047
|
_ref$isOnlyGetCode = _ref.isOnlyGetCode,
|
|
45697
|
-
isOnlyGetCode = _ref$isOnlyGetCode ===
|
|
47048
|
+
isOnlyGetCode = _ref$isOnlyGetCode === void 0 ? false : _ref$isOnlyGetCode,
|
|
45698
47049
|
_ref$isOnlyGetToken = _ref.isOnlyGetToken,
|
|
45699
|
-
isOnlyGetToken = _ref$isOnlyGetToken ===
|
|
47050
|
+
isOnlyGetToken = _ref$isOnlyGetToken === void 0 ? false : _ref$isOnlyGetToken,
|
|
45700
47051
|
children = _ref.children,
|
|
45701
47052
|
onReject = _ref.onReject,
|
|
45702
47053
|
onResolve = _ref.onResolve,
|
|
@@ -45705,7 +47056,7 @@ var LoginSocialInstagram = function LoginSocialInstagram(_ref) {
|
|
|
45705
47056
|
var popupWindowURL = new URL(window.location.href);
|
|
45706
47057
|
var code = popupWindowURL.searchParams.get('code');
|
|
45707
47058
|
var state = popupWindowURL.searchParams.get('state');
|
|
45708
|
-
if (state !== null && state !==
|
|
47059
|
+
if (state !== null && state !== void 0 && state.includes('_instagram') && code) {
|
|
45709
47060
|
localStorage.setItem('instagram', code);
|
|
45710
47061
|
window.close();
|
|
45711
47062
|
}
|
|
@@ -45816,29 +47167,29 @@ var MICROSOFT_API_URL = 'https://graph.microsoft.com';
|
|
|
45816
47167
|
|
|
45817
47168
|
var LoginSocialMicrosoft = function LoginSocialMicrosoft(_ref) {
|
|
45818
47169
|
var _ref$tenant = _ref.tenant,
|
|
45819
|
-
tenant = _ref$tenant ===
|
|
47170
|
+
tenant = _ref$tenant === void 0 ? 'common' : _ref$tenant,
|
|
45820
47171
|
_ref$state = _ref.state,
|
|
45821
|
-
state = _ref$state ===
|
|
47172
|
+
state = _ref$state === void 0 ? '' : _ref$state,
|
|
45822
47173
|
client_id = _ref.client_id,
|
|
45823
47174
|
className = _ref.className,
|
|
45824
47175
|
redirect_uri = _ref.redirect_uri,
|
|
45825
47176
|
_ref$scope = _ref.scope,
|
|
45826
|
-
scope = _ref$scope ===
|
|
47177
|
+
scope = _ref$scope === void 0 ? 'profile openid email' : _ref$scope,
|
|
45827
47178
|
_ref$response_type = _ref.response_type,
|
|
45828
|
-
response_type = _ref$response_type ===
|
|
47179
|
+
response_type = _ref$response_type === void 0 ? 'code' : _ref$response_type,
|
|
45829
47180
|
_ref$response_mode = _ref.response_mode,
|
|
45830
|
-
response_mode = _ref$response_mode ===
|
|
47181
|
+
response_mode = _ref$response_mode === void 0 ? 'query' : _ref$response_mode,
|
|
45831
47182
|
children = _ref.children,
|
|
45832
47183
|
_ref$code_challenge = _ref.code_challenge,
|
|
45833
|
-
code_challenge = _ref$code_challenge ===
|
|
47184
|
+
code_challenge = _ref$code_challenge === void 0 ? '19cfc47c216dacba8ca23eeee817603e2ba34fe0976378662ba31688ed302fa9' : _ref$code_challenge,
|
|
45834
47185
|
_ref$code_challenge_m = _ref.code_challenge_method,
|
|
45835
|
-
code_challenge_method = _ref$code_challenge_m ===
|
|
47186
|
+
code_challenge_method = _ref$code_challenge_m === void 0 ? 'plain' : _ref$code_challenge_m,
|
|
45836
47187
|
_ref$prompt = _ref.prompt,
|
|
45837
|
-
prompt = _ref$prompt ===
|
|
47188
|
+
prompt = _ref$prompt === void 0 ? 'select_account' : _ref$prompt,
|
|
45838
47189
|
_ref$isOnlyGetCode = _ref.isOnlyGetCode,
|
|
45839
|
-
isOnlyGetCode = _ref$isOnlyGetCode ===
|
|
47190
|
+
isOnlyGetCode = _ref$isOnlyGetCode === void 0 ? false : _ref$isOnlyGetCode,
|
|
45840
47191
|
_ref$isOnlyGetToken = _ref.isOnlyGetToken,
|
|
45841
|
-
isOnlyGetToken = _ref$isOnlyGetToken ===
|
|
47192
|
+
isOnlyGetToken = _ref$isOnlyGetToken === void 0 ? false : _ref$isOnlyGetToken,
|
|
45842
47193
|
onLoginStart = _ref.onLoginStart,
|
|
45843
47194
|
onReject = _ref.onReject,
|
|
45844
47195
|
onResolve = _ref.onResolve;
|
|
@@ -45846,7 +47197,7 @@ var LoginSocialMicrosoft = function LoginSocialMicrosoft(_ref) {
|
|
|
45846
47197
|
var popupWindowURL = new URL(window.location.href);
|
|
45847
47198
|
var code = popupWindowURL.searchParams.get('code');
|
|
45848
47199
|
var state = popupWindowURL.searchParams.get('state');
|
|
45849
|
-
if (state !== null && state !==
|
|
47200
|
+
if (state !== null && state !== void 0 && state.includes('_microsoft') && code) {
|
|
45850
47201
|
localStorage.setItem('microsoft', code);
|
|
45851
47202
|
window.close();
|
|
45852
47203
|
}
|
|
@@ -45958,20 +47309,20 @@ var LINKEDIN_API_URL = 'https://api.linkedin.com';
|
|
|
45958
47309
|
var PREVENT_CORS_URL$2 = '';
|
|
45959
47310
|
var LoginSocialLinkedin = function LoginSocialLinkedin(_ref) {
|
|
45960
47311
|
var _ref$state = _ref.state,
|
|
45961
|
-
state = _ref$state ===
|
|
47312
|
+
state = _ref$state === void 0 ? '' : _ref$state,
|
|
45962
47313
|
_ref$scope = _ref.scope,
|
|
45963
|
-
scope = _ref$scope ===
|
|
47314
|
+
scope = _ref$scope === void 0 ? 'r_liteprofile' : _ref$scope,
|
|
45964
47315
|
client_id = _ref.client_id,
|
|
45965
47316
|
client_secret = _ref.client_secret,
|
|
45966
47317
|
_ref$className = _ref.className,
|
|
45967
|
-
className = _ref$className ===
|
|
47318
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
45968
47319
|
redirect_uri = _ref.redirect_uri,
|
|
45969
47320
|
_ref$response_type = _ref.response_type,
|
|
45970
|
-
response_type = _ref$response_type ===
|
|
47321
|
+
response_type = _ref$response_type === void 0 ? 'code' : _ref$response_type,
|
|
45971
47322
|
_ref$isOnlyGetCode = _ref.isOnlyGetCode,
|
|
45972
|
-
isOnlyGetCode = _ref$isOnlyGetCode ===
|
|
47323
|
+
isOnlyGetCode = _ref$isOnlyGetCode === void 0 ? false : _ref$isOnlyGetCode,
|
|
45973
47324
|
_ref$isOnlyGetToken = _ref.isOnlyGetToken,
|
|
45974
|
-
isOnlyGetToken = _ref$isOnlyGetToken ===
|
|
47325
|
+
isOnlyGetToken = _ref$isOnlyGetToken === void 0 ? false : _ref$isOnlyGetToken,
|
|
45975
47326
|
children = _ref.children,
|
|
45976
47327
|
onLoginStart = _ref.onLoginStart,
|
|
45977
47328
|
onReject = _ref.onReject,
|
|
@@ -45980,7 +47331,7 @@ var LoginSocialLinkedin = function LoginSocialLinkedin(_ref) {
|
|
|
45980
47331
|
var popupWindowURL = new URL(window.location.href);
|
|
45981
47332
|
var code = popupWindowURL.searchParams.get('code');
|
|
45982
47333
|
var state = popupWindowURL.searchParams.get('state');
|
|
45983
|
-
if (state !== null && state !==
|
|
47334
|
+
if (state !== null && state !== void 0 && state.includes('_linkedin') && code) {
|
|
45984
47335
|
localStorage.setItem('linkedin', code);
|
|
45985
47336
|
window.close();
|
|
45986
47337
|
}
|
|
@@ -46095,18 +47446,18 @@ var PINTEREST_URL_API = 'https://api.pinterest.com/v5';
|
|
|
46095
47446
|
var PREVENT_CORS_URL$1 = '';
|
|
46096
47447
|
var LoginSocialPinterest = function LoginSocialPinterest(_ref) {
|
|
46097
47448
|
var _ref$state = _ref.state,
|
|
46098
|
-
state = _ref$state ===
|
|
47449
|
+
state = _ref$state === void 0 ? '' : _ref$state,
|
|
46099
47450
|
_ref$scope = _ref.scope,
|
|
46100
|
-
scope = _ref$scope ===
|
|
47451
|
+
scope = _ref$scope === void 0 ? 'boards:read,pins:read,user_accounts:read' : _ref$scope,
|
|
46101
47452
|
client_id = _ref.client_id,
|
|
46102
47453
|
client_secret = _ref.client_secret,
|
|
46103
47454
|
_ref$className = _ref.className,
|
|
46104
|
-
className = _ref$className ===
|
|
47455
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
46105
47456
|
redirect_uri = _ref.redirect_uri,
|
|
46106
47457
|
_ref$isOnlyGetCode = _ref.isOnlyGetCode,
|
|
46107
|
-
isOnlyGetCode = _ref$isOnlyGetCode ===
|
|
47458
|
+
isOnlyGetCode = _ref$isOnlyGetCode === void 0 ? false : _ref$isOnlyGetCode,
|
|
46108
47459
|
_ref$isOnlyGetToken = _ref.isOnlyGetToken,
|
|
46109
|
-
isOnlyGetToken = _ref$isOnlyGetToken ===
|
|
47460
|
+
isOnlyGetToken = _ref$isOnlyGetToken === void 0 ? false : _ref$isOnlyGetToken,
|
|
46110
47461
|
children = _ref.children,
|
|
46111
47462
|
onLoginStart = _ref.onLoginStart,
|
|
46112
47463
|
onReject = _ref.onReject,
|
|
@@ -46115,7 +47466,7 @@ var LoginSocialPinterest = function LoginSocialPinterest(_ref) {
|
|
|
46115
47466
|
var popupWindowURL = new URL(window.location.href);
|
|
46116
47467
|
var code = popupWindowURL.searchParams.get('code');
|
|
46117
47468
|
var state = popupWindowURL.searchParams.get('state');
|
|
46118
|
-
if (state !== null && state !==
|
|
47469
|
+
if (state !== null && state !== void 0 && state.includes('_pinterest') && code) {
|
|
46119
47470
|
localStorage.setItem('pinterest', code);
|
|
46120
47471
|
window.close();
|
|
46121
47472
|
}
|
|
@@ -46254,19 +47605,19 @@ var PREVENT_CORS_URL = '';
|
|
|
46254
47605
|
var LoginSocialTwitter = function LoginSocialTwitter(_ref) {
|
|
46255
47606
|
var client_id = _ref.client_id,
|
|
46256
47607
|
_ref$className = _ref.className,
|
|
46257
|
-
className = _ref$className ===
|
|
47608
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
46258
47609
|
redirect_uri = _ref.redirect_uri,
|
|
46259
47610
|
children = _ref.children,
|
|
46260
47611
|
_ref$fields = _ref.fields,
|
|
46261
|
-
fields = _ref$fields ===
|
|
47612
|
+
fields = _ref$fields === void 0 ? 'created_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,public_metrics,url,username,verified,withheld' : _ref$fields,
|
|
46262
47613
|
_ref$state = _ref.state,
|
|
46263
|
-
state = _ref$state ===
|
|
47614
|
+
state = _ref$state === void 0 ? 'state' : _ref$state,
|
|
46264
47615
|
_ref$scope = _ref.scope,
|
|
46265
|
-
scope = _ref$scope ===
|
|
47616
|
+
scope = _ref$scope === void 0 ? 'users.read%20tweet.read' : _ref$scope,
|
|
46266
47617
|
_ref$isOnlyGetCode = _ref.isOnlyGetCode,
|
|
46267
|
-
isOnlyGetCode = _ref$isOnlyGetCode ===
|
|
47618
|
+
isOnlyGetCode = _ref$isOnlyGetCode === void 0 ? false : _ref$isOnlyGetCode,
|
|
46268
47619
|
_ref$isOnlyGetToken = _ref.isOnlyGetToken,
|
|
46269
|
-
isOnlyGetToken = _ref$isOnlyGetToken ===
|
|
47620
|
+
isOnlyGetToken = _ref$isOnlyGetToken === void 0 ? false : _ref$isOnlyGetToken,
|
|
46270
47621
|
onLoginStart = _ref.onLoginStart,
|
|
46271
47622
|
onReject = _ref.onReject,
|
|
46272
47623
|
onResolve = _ref.onResolve;
|
|
@@ -46274,7 +47625,7 @@ var LoginSocialTwitter = function LoginSocialTwitter(_ref) {
|
|
|
46274
47625
|
var popupWindowURL = new URL(window.location.href);
|
|
46275
47626
|
var code = popupWindowURL.searchParams.get('code');
|
|
46276
47627
|
var state = popupWindowURL.searchParams.get('state');
|
|
46277
|
-
if (state !== null && state !==
|
|
47628
|
+
if (state !== null && state !== void 0 && state.includes('_twitter') && code) {
|
|
46278
47629
|
localStorage.setItem('twitter', code);
|
|
46279
47630
|
window.close();
|
|
46280
47631
|
}
|
|
@@ -46418,14 +47769,14 @@ var _window = global.window;
|
|
|
46418
47769
|
var LoginSocialApple = function LoginSocialApple(_ref) {
|
|
46419
47770
|
var client_id = _ref.client_id,
|
|
46420
47771
|
_ref$scope = _ref.scope,
|
|
46421
|
-
scope = _ref$scope ===
|
|
47772
|
+
scope = _ref$scope === void 0 ? 'name email' : _ref$scope,
|
|
46422
47773
|
_ref$className = _ref.className,
|
|
46423
|
-
className = _ref$className ===
|
|
47774
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
46424
47775
|
onLoginStart = _ref.onLoginStart,
|
|
46425
47776
|
onReject = _ref.onReject,
|
|
46426
47777
|
onResolve = _ref.onResolve,
|
|
46427
47778
|
_ref$redirect_uri = _ref.redirect_uri,
|
|
46428
|
-
redirect_uri = _ref$redirect_uri ===
|
|
47779
|
+
redirect_uri = _ref$redirect_uri === void 0 ? '/' : _ref$redirect_uri,
|
|
46429
47780
|
children = _ref.children;
|
|
46430
47781
|
var scriptNodeRef = React$1.useRef(null);
|
|
46431
47782
|
var _useState = React$1.useState(false),
|
|
@@ -46459,7 +47810,7 @@ var LoginSocialApple = function LoginSocialApple(_ref) {
|
|
|
46459
47810
|
appleScriptTag.onload = cb;
|
|
46460
47811
|
}, []);
|
|
46461
47812
|
var handleResponse = React$1.useCallback(function (res) {
|
|
46462
|
-
if (res !== null && res !==
|
|
47813
|
+
if (res !== null && res !== void 0 && res.access_token) {
|
|
46463
47814
|
onResolve({
|
|
46464
47815
|
provider: 'apple',
|
|
46465
47816
|
data: res
|
|
@@ -46547,12 +47898,12 @@ var TIKTOK_URL = 'https://www.tiktok.com';
|
|
|
46547
47898
|
|
|
46548
47899
|
var LoginSocialGithub = function LoginSocialGithub(_ref) {
|
|
46549
47900
|
var _ref$state = _ref.state,
|
|
46550
|
-
state = _ref$state ===
|
|
47901
|
+
state = _ref$state === void 0 ? '' : _ref$state,
|
|
46551
47902
|
_ref$scope = _ref.scope,
|
|
46552
|
-
scope = _ref$scope ===
|
|
47903
|
+
scope = _ref$scope === void 0 ? 'user.info.basic' : _ref$scope,
|
|
46553
47904
|
client_key = _ref.client_key,
|
|
46554
47905
|
_ref$className = _ref.className,
|
|
46555
|
-
className = _ref$className ===
|
|
47906
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
46556
47907
|
redirect_uri = _ref.redirect_uri,
|
|
46557
47908
|
children = _ref.children,
|
|
46558
47909
|
onResolve = _ref.onResolve,
|
|
@@ -46561,7 +47912,7 @@ var LoginSocialGithub = function LoginSocialGithub(_ref) {
|
|
|
46561
47912
|
var popupWindowURL = new URL(window.location.href);
|
|
46562
47913
|
var code = popupWindowURL.searchParams.get('code');
|
|
46563
47914
|
var state = popupWindowURL.searchParams.get('state');
|
|
46564
|
-
if (state !== null && state !==
|
|
47915
|
+
if (state !== null && state !== void 0 && state.includes('_tiktok') && code) {
|
|
46565
47916
|
localStorage.setItem('tiktok', code);
|
|
46566
47917
|
window.close();
|
|
46567
47918
|
}
|
|
@@ -46713,13 +48064,14 @@ exports.FormikContext = FormikContext;
|
|
|
46713
48064
|
exports.FormikProvider = FormikProvider;
|
|
46714
48065
|
exports.Grid = Grid;
|
|
46715
48066
|
exports.Highlight = Highlight;
|
|
48067
|
+
exports.HtmlRenderer = HtmlRenderer;
|
|
46716
48068
|
exports.Image = Image;
|
|
46717
48069
|
exports.Input = Input;
|
|
46718
48070
|
exports.KeyCode = KeyCode;
|
|
46719
48071
|
exports.KeyMod = KeyMod;
|
|
46720
48072
|
exports.Keyboard = Keyboard;
|
|
46721
48073
|
exports.Link = Link;
|
|
46722
|
-
exports.LinkButton =
|
|
48074
|
+
exports.LinkButton = button_compact;
|
|
46723
48075
|
exports.Loading = Loading;
|
|
46724
48076
|
exports.LoginWithApple = index$1;
|
|
46725
48077
|
exports.LoginWithFacebook = index$9;
|