@vitrosoftware/common-ui-ts 1.1.226 → 1.1.227
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/css/std/controls/alert/alert.css +47 -10
- package/css/std/controls/bim-viewer/bim-viewer-index.css +0 -4
- package/css/std/controls/bim-viewer/style.css +0 -4
- package/css/std/controls/dialog/dialog-content.css +0 -3
- package/css/std/controls/dialog/dialog-footer.css +0 -2
- package/css/std/controls/dxf-viewer/common.css +0 -4
- package/css/std/controls/dxf-viewer/dxf-viewer-index.css +0 -4
- package/css/std/controls/field-iterator/field-iterator.css +0 -6
- package/css/std/controls/file/file.css +4 -5
- package/css/std/controls/file/img/file-button-context.svg +6 -0
- package/css/std/controls/filter/filter.css +1 -1
- package/css/std/controls/lookup-picker/lookup-picker.css +19 -41
- package/css/std/controls/pdf-viewer/custom.css +0 -4
- package/css/std/controls/pdf-viewer/pdf-viewer-index.css +0 -69
- package/css/std/controls/pdf-viewer/pdf-viewer.css +0 -65
- package/css/std/controls/select/select.css +1 -25
- package/css/std/controls/tab-group/tab-group.css +3 -6
- package/css/std/controls/table-view/treegrid-cell.css +0 -1
- package/css/std/controls/table-view/treegrid-context-menu.css +0 -19
- package/css/std/controls/video-viewer/video-viewer.css +1 -1
- package/dist/index.css +77 -100
- package/dist/index.js +1161 -1507
- package/dist/index.js.map +1 -1
- package/dist/src/constants/Factory.d.ts +0 -1
- package/dist/src/controls/Alert/Alert.d.ts +4 -0
- package/dist/src/controls/Dialog/Dialog.d.ts +0 -2
- package/dist/src/controls/Dialog/DialogContent.d.ts +0 -1
- package/dist/src/controls/LookupPicker/RightButtonGroup.d.ts +2 -2
- package/dist/src/controls/PdfViewer/services/PdfViewerService.d.ts +0 -2
- package/dist/src/controls/ScrollBar/ScrollBar.d.ts +2 -3
- package/dist/src/controls/Search/Search.d.ts +2 -3
- package/dist/src/controls/TabGroup/Tab.d.ts +3 -3
- package/dist/src/controls/TabGroup/TabGroup.d.ts +1 -0
- package/dist/src/controls/TabGroup/TabGroupComponent.d.ts +1 -0
- package/dist/src/controls/TabGroup/models/Tab.d.ts +1 -2
- package/dist/src/controls/TableView/TableView.d.ts +0 -2
- package/dist/src/controls/TableView/TableViewConstants.d.ts +2 -7
- package/dist/src/controls/TableView/models/TableViewMenuItem.d.ts +0 -2
- package/dist/src/controls/TableView/services/TableViewService.d.ts +0 -3
- package/dist/src/controls/TableView/services/impl/TableViewServiceImpl.d.ts +1 -5
- package/dist/src/controls/View/View.d.ts +1 -1
- package/dist/src/models/Item.d.ts +1 -0
- package/dist/src/models/ItemId.d.ts +0 -2
- package/dist/src/services/ItemSelectDialogService.d.ts +1 -1
- package/dist/src/services.d.ts +0 -3
- package/lib/dxf-viewer/OrbitControls.js +2 -6
- package/package.json +1 -1
- package/src/controls/BimViewer/js/bim-viewer.js +3 -3
- package/src/controls/DxfViewer/js/dxf-viewer.js +33 -67
- package/src/controls/PdfViewer/js/pdf-viewer.js +4 -748
package/dist/index.js
CHANGED
|
@@ -516,13 +516,10 @@ var styles$1 = {"vitro-scrollbar-content":"_scrollbar_vitro-scrollbar-content_3H
|
|
|
516
516
|
|
|
517
517
|
var CSS_CLASS_SCROLL_Y = 'ps-scroll-y';
|
|
518
518
|
var w = window;
|
|
519
|
-
var ScrollBar =
|
|
519
|
+
var ScrollBar = function ScrollBar(props) {
|
|
520
520
|
var ref = React.useRef(null);
|
|
521
521
|
var scrollElementRef = React.useRef(null);
|
|
522
522
|
var observerRef = React.useRef();
|
|
523
|
-
React.useImperativeHandle(outerRef, function () {
|
|
524
|
-
return ref.current;
|
|
525
|
-
}, []);
|
|
526
523
|
React.useEffect(function () {
|
|
527
524
|
return function () {
|
|
528
525
|
if (observerRef.current) {
|
|
@@ -594,9 +591,7 @@ var ScrollBar = React.forwardRef(function (props, outerRef) {
|
|
|
594
591
|
}
|
|
595
592
|
};
|
|
596
593
|
var onWheel = function onWheel(e) {
|
|
597
|
-
|
|
598
|
-
e.stopPropagation();
|
|
599
|
-
}
|
|
594
|
+
e.stopPropagation();
|
|
600
595
|
};
|
|
601
596
|
var onScrollY = function onScrollY(e) {
|
|
602
597
|
if (ref.current && props.onScrollY) {
|
|
@@ -606,12 +601,12 @@ var ScrollBar = React.forwardRef(function (props, outerRef) {
|
|
|
606
601
|
return React__default.createElement("div", {
|
|
607
602
|
ref: ref,
|
|
608
603
|
className: props.className || CTRL.EMPTY
|
|
609
|
-
}, React__default.createElement("div",
|
|
604
|
+
}, React__default.createElement("div", {
|
|
610
605
|
ref: props.contentRef,
|
|
611
606
|
onWheel: onWheel,
|
|
612
607
|
className: styles$1['vitro-scrollbar-content'] + (props.contentClassName ? CTRL.SPACE + props.contentClassName : CTRL.EMPTY)
|
|
613
|
-
}
|
|
614
|
-
}
|
|
608
|
+
}, props.children));
|
|
609
|
+
};
|
|
615
610
|
|
|
616
611
|
(function (EVENT) {
|
|
617
612
|
EVENT["MOUSEDOWN"] = "mousedown";
|
|
@@ -979,17 +974,14 @@ function createCommonjsModule(fn, module) {
|
|
|
979
974
|
|
|
980
975
|
var jquery = createCommonjsModule(function (module) {
|
|
981
976
|
/*!
|
|
982
|
-
* jQuery JavaScript Library v3.
|
|
977
|
+
* jQuery JavaScript Library v3.7.1
|
|
983
978
|
* https://jquery.com/
|
|
984
979
|
*
|
|
985
|
-
* Includes Sizzle.js
|
|
986
|
-
* https://sizzlejs.com/
|
|
987
|
-
*
|
|
988
980
|
* Copyright OpenJS Foundation and other contributors
|
|
989
981
|
* Released under the MIT license
|
|
990
982
|
* https://jquery.org/license
|
|
991
983
|
*
|
|
992
|
-
* Date:
|
|
984
|
+
* Date: 2023-08-28T13:37Z
|
|
993
985
|
*/
|
|
994
986
|
( function( global, factory ) {
|
|
995
987
|
|
|
@@ -1120,8 +1112,9 @@ function toType( obj ) {
|
|
|
1120
1112
|
|
|
1121
1113
|
|
|
1122
1114
|
|
|
1123
|
-
var
|
|
1124
|
-
|
|
1115
|
+
var version = "3.7.1",
|
|
1116
|
+
|
|
1117
|
+
rhtmlSuffix = /HTML$/i,
|
|
1125
1118
|
|
|
1126
1119
|
// Define a local copy of jQuery
|
|
1127
1120
|
jQuery = function( selector, context ) {
|
|
@@ -1367,6 +1360,38 @@ jQuery.extend( {
|
|
|
1367
1360
|
return obj;
|
|
1368
1361
|
},
|
|
1369
1362
|
|
|
1363
|
+
|
|
1364
|
+
// Retrieve the text value of an array of DOM nodes
|
|
1365
|
+
text: function( elem ) {
|
|
1366
|
+
var node,
|
|
1367
|
+
ret = "",
|
|
1368
|
+
i = 0,
|
|
1369
|
+
nodeType = elem.nodeType;
|
|
1370
|
+
|
|
1371
|
+
if ( !nodeType ) {
|
|
1372
|
+
|
|
1373
|
+
// If no nodeType, this is expected to be an array
|
|
1374
|
+
while ( ( node = elem[ i++ ] ) ) {
|
|
1375
|
+
|
|
1376
|
+
// Do not traverse comment nodes
|
|
1377
|
+
ret += jQuery.text( node );
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
if ( nodeType === 1 || nodeType === 11 ) {
|
|
1381
|
+
return elem.textContent;
|
|
1382
|
+
}
|
|
1383
|
+
if ( nodeType === 9 ) {
|
|
1384
|
+
return elem.documentElement.textContent;
|
|
1385
|
+
}
|
|
1386
|
+
if ( nodeType === 3 || nodeType === 4 ) {
|
|
1387
|
+
return elem.nodeValue;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
// Do not include comment or processing instruction nodes
|
|
1391
|
+
|
|
1392
|
+
return ret;
|
|
1393
|
+
},
|
|
1394
|
+
|
|
1370
1395
|
// results is for internal usage only
|
|
1371
1396
|
makeArray: function( arr, results ) {
|
|
1372
1397
|
var ret = results || [];
|
|
@@ -1389,6 +1414,15 @@ jQuery.extend( {
|
|
|
1389
1414
|
return arr == null ? -1 : indexOf.call( arr, elem, i );
|
|
1390
1415
|
},
|
|
1391
1416
|
|
|
1417
|
+
isXMLDoc: function( elem ) {
|
|
1418
|
+
var namespace = elem && elem.namespaceURI,
|
|
1419
|
+
docElem = elem && ( elem.ownerDocument || elem ).documentElement;
|
|
1420
|
+
|
|
1421
|
+
// Assume HTML when documentElement doesn't yet exist, such as inside
|
|
1422
|
+
// document fragments.
|
|
1423
|
+
return !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || "HTML" );
|
|
1424
|
+
},
|
|
1425
|
+
|
|
1392
1426
|
// Support: Android <=4.0 only, PhantomJS 1 only
|
|
1393
1427
|
// push.apply(_, arraylike) throws on ancient WebKit
|
|
1394
1428
|
merge: function( first, second ) {
|
|
@@ -1490,43 +1524,98 @@ function isArrayLike( obj ) {
|
|
|
1490
1524
|
return type === "array" || length === 0 ||
|
|
1491
1525
|
typeof length === "number" && length > 0 && ( length - 1 ) in obj;
|
|
1492
1526
|
}
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1527
|
+
|
|
1528
|
+
|
|
1529
|
+
function nodeName( elem, name ) {
|
|
1530
|
+
|
|
1531
|
+
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
|
1532
|
+
|
|
1533
|
+
}
|
|
1534
|
+
var pop = arr.pop;
|
|
1535
|
+
|
|
1536
|
+
|
|
1537
|
+
var sort = arr.sort;
|
|
1538
|
+
|
|
1539
|
+
|
|
1540
|
+
var splice = arr.splice;
|
|
1541
|
+
|
|
1542
|
+
|
|
1543
|
+
var whitespace = "[\\x20\\t\\r\\n\\f]";
|
|
1544
|
+
|
|
1545
|
+
|
|
1546
|
+
var rtrimCSS = new RegExp(
|
|
1547
|
+
"^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
|
|
1548
|
+
"g"
|
|
1549
|
+
);
|
|
1550
|
+
|
|
1551
|
+
|
|
1552
|
+
|
|
1553
|
+
|
|
1554
|
+
// Note: an element does not contain itself
|
|
1555
|
+
jQuery.contains = function( a, b ) {
|
|
1556
|
+
var bup = b && b.parentNode;
|
|
1557
|
+
|
|
1558
|
+
return a === bup || !!( bup && bup.nodeType === 1 && (
|
|
1559
|
+
|
|
1560
|
+
// Support: IE 9 - 11+
|
|
1561
|
+
// IE doesn't have `contains` on SVG.
|
|
1562
|
+
a.contains ?
|
|
1563
|
+
a.contains( bup ) :
|
|
1564
|
+
a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
|
|
1565
|
+
) );
|
|
1566
|
+
};
|
|
1567
|
+
|
|
1568
|
+
|
|
1569
|
+
|
|
1570
|
+
|
|
1571
|
+
// CSS string/identifier serialization
|
|
1572
|
+
// https://drafts.csswg.org/cssom/#common-serializing-idioms
|
|
1573
|
+
var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
|
|
1574
|
+
|
|
1575
|
+
function fcssescape( ch, asCodePoint ) {
|
|
1576
|
+
if ( asCodePoint ) {
|
|
1577
|
+
|
|
1578
|
+
// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
|
|
1579
|
+
if ( ch === "\0" ) {
|
|
1580
|
+
return "\uFFFD";
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
// Control characters and (dependent upon position) numbers get escaped as code points
|
|
1584
|
+
return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
// Other potentially-special ASCII characters get backslash-escaped
|
|
1588
|
+
return "\\" + ch;
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
jQuery.escapeSelector = function( sel ) {
|
|
1592
|
+
return ( sel + "" ).replace( rcssescape, fcssescape );
|
|
1593
|
+
};
|
|
1594
|
+
|
|
1595
|
+
|
|
1596
|
+
|
|
1597
|
+
|
|
1598
|
+
var preferredDoc = document,
|
|
1599
|
+
pushNative = push;
|
|
1600
|
+
|
|
1601
|
+
( function() {
|
|
1602
|
+
|
|
1505
1603
|
var i,
|
|
1506
|
-
support,
|
|
1507
1604
|
Expr,
|
|
1508
|
-
getText,
|
|
1509
|
-
isXML,
|
|
1510
|
-
tokenize,
|
|
1511
|
-
compile,
|
|
1512
|
-
select,
|
|
1513
1605
|
outermostContext,
|
|
1514
1606
|
sortInput,
|
|
1515
1607
|
hasDuplicate,
|
|
1608
|
+
push = pushNative,
|
|
1516
1609
|
|
|
1517
1610
|
// Local document vars
|
|
1518
|
-
setDocument,
|
|
1519
1611
|
document,
|
|
1520
|
-
|
|
1612
|
+
documentElement,
|
|
1521
1613
|
documentIsHTML,
|
|
1522
1614
|
rbuggyQSA,
|
|
1523
|
-
rbuggyMatches,
|
|
1524
1615
|
matches,
|
|
1525
|
-
contains,
|
|
1526
1616
|
|
|
1527
1617
|
// Instance-specific data
|
|
1528
|
-
expando =
|
|
1529
|
-
preferredDoc = window.document,
|
|
1618
|
+
expando = jQuery.expando,
|
|
1530
1619
|
dirruns = 0,
|
|
1531
1620
|
done = 0,
|
|
1532
1621
|
classCache = createCache(),
|
|
@@ -1540,47 +1629,22 @@ var i,
|
|
|
1540
1629
|
return 0;
|
|
1541
1630
|
},
|
|
1542
1631
|
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
arr = [],
|
|
1546
|
-
pop = arr.pop,
|
|
1547
|
-
pushNative = arr.push,
|
|
1548
|
-
push = arr.push,
|
|
1549
|
-
slice = arr.slice,
|
|
1550
|
-
|
|
1551
|
-
// Use a stripped-down indexOf as it's faster than native
|
|
1552
|
-
// https://jsperf.com/thor-indexof-vs-for/5
|
|
1553
|
-
indexOf = function( list, elem ) {
|
|
1554
|
-
var i = 0,
|
|
1555
|
-
len = list.length;
|
|
1556
|
-
for ( ; i < len; i++ ) {
|
|
1557
|
-
if ( list[ i ] === elem ) {
|
|
1558
|
-
return i;
|
|
1559
|
-
}
|
|
1560
|
-
}
|
|
1561
|
-
return -1;
|
|
1562
|
-
},
|
|
1563
|
-
|
|
1564
|
-
booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" +
|
|
1565
|
-
"ismap|loop|multiple|open|readonly|required|scoped",
|
|
1632
|
+
booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|" +
|
|
1633
|
+
"loop|multiple|open|readonly|required|scoped",
|
|
1566
1634
|
|
|
1567
1635
|
// Regular expressions
|
|
1568
1636
|
|
|
1569
|
-
// http://www.w3.org/TR/css3-selectors/#whitespace
|
|
1570
|
-
whitespace = "[\\x20\\t\\r\\n\\f]",
|
|
1571
|
-
|
|
1572
1637
|
// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram
|
|
1573
1638
|
identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace +
|
|
1574
1639
|
"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",
|
|
1575
1640
|
|
|
1576
|
-
// Attribute selectors:
|
|
1641
|
+
// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors
|
|
1577
1642
|
attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
|
|
1578
1643
|
|
|
1579
1644
|
// Operator (capture 2)
|
|
1580
1645
|
"*([*^$|!~]?=)" + whitespace +
|
|
1581
1646
|
|
|
1582
|
-
// "Attribute values must be CSS identifiers [capture 5]
|
|
1583
|
-
// or strings [capture 3 or capture 4]"
|
|
1647
|
+
// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
|
|
1584
1648
|
"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" +
|
|
1585
1649
|
whitespace + "*\\]",
|
|
1586
1650
|
|
|
@@ -1599,101 +1663,88 @@ var i,
|
|
|
1599
1663
|
|
|
1600
1664
|
// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
|
|
1601
1665
|
rwhitespace = new RegExp( whitespace + "+", "g" ),
|
|
1602
|
-
rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" +
|
|
1603
|
-
whitespace + "+$", "g" ),
|
|
1604
1666
|
|
|
1605
1667
|
rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
|
|
1606
|
-
|
|
1607
|
-
"*" ),
|
|
1668
|
+
rleadingCombinator = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" +
|
|
1669
|
+
whitespace + "*" ),
|
|
1608
1670
|
rdescend = new RegExp( whitespace + "|>" ),
|
|
1609
1671
|
|
|
1610
1672
|
rpseudo = new RegExp( pseudos ),
|
|
1611
1673
|
ridentifier = new RegExp( "^" + identifier + "$" ),
|
|
1612
1674
|
|
|
1613
1675
|
matchExpr = {
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1676
|
+
ID: new RegExp( "^#(" + identifier + ")" ),
|
|
1677
|
+
CLASS: new RegExp( "^\\.(" + identifier + ")" ),
|
|
1678
|
+
TAG: new RegExp( "^(" + identifier + "|[*])" ),
|
|
1679
|
+
ATTR: new RegExp( "^" + attributes ),
|
|
1680
|
+
PSEUDO: new RegExp( "^" + pseudos ),
|
|
1681
|
+
CHILD: new RegExp(
|
|
1682
|
+
"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
|
|
1683
|
+
whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +
|
|
1684
|
+
whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
|
|
1685
|
+
bool: new RegExp( "^(?:" + booleans + ")$", "i" ),
|
|
1623
1686
|
|
|
1624
1687
|
// For use in libraries implementing .is()
|
|
1625
1688
|
// We use this for POS matching in `select`
|
|
1626
|
-
|
|
1689
|
+
needsContext: new RegExp( "^" + whitespace +
|
|
1627
1690
|
"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
|
|
1628
1691
|
"*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
|
|
1629
1692
|
},
|
|
1630
1693
|
|
|
1631
|
-
rhtml = /HTML$/i,
|
|
1632
1694
|
rinputs = /^(?:input|select|textarea|button)$/i,
|
|
1633
1695
|
rheader = /^h\d$/i,
|
|
1634
1696
|
|
|
1635
|
-
rnative = /^[^{]+\{\s*\[native \w/,
|
|
1636
|
-
|
|
1637
1697
|
// Easily-parseable/retrievable ID or TAG or CLASS selectors
|
|
1638
1698
|
rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
|
|
1639
1699
|
|
|
1640
1700
|
rsibling = /[+~]/,
|
|
1641
1701
|
|
|
1642
1702
|
// CSS escapes
|
|
1643
|
-
//
|
|
1644
|
-
runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace +
|
|
1703
|
+
// https://www.w3.org/TR/CSS21/syndata.html#escaped-characters
|
|
1704
|
+
runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace +
|
|
1705
|
+
"?|\\\\([^\\r\\n\\f])", "g" ),
|
|
1645
1706
|
funescape = function( escape, nonHex ) {
|
|
1646
1707
|
var high = "0x" + escape.slice( 1 ) - 0x10000;
|
|
1647
1708
|
|
|
1648
|
-
|
|
1709
|
+
if ( nonHex ) {
|
|
1649
1710
|
|
|
1650
1711
|
// Strip the backslash prefix from a non-hex escape sequence
|
|
1651
|
-
nonHex
|
|
1652
|
-
|
|
1653
|
-
// Replace a hexadecimal escape sequence with the encoded Unicode code point
|
|
1654
|
-
// Support: IE <=11+
|
|
1655
|
-
// For values outside the Basic Multilingual Plane (BMP), manually construct a
|
|
1656
|
-
// surrogate pair
|
|
1657
|
-
high < 0 ?
|
|
1658
|
-
String.fromCharCode( high + 0x10000 ) :
|
|
1659
|
-
String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
|
|
1660
|
-
},
|
|
1661
|
-
|
|
1662
|
-
// CSS string/identifier serialization
|
|
1663
|
-
// https://drafts.csswg.org/cssom/#common-serializing-idioms
|
|
1664
|
-
rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
|
|
1665
|
-
fcssescape = function( ch, asCodePoint ) {
|
|
1666
|
-
if ( asCodePoint ) {
|
|
1667
|
-
|
|
1668
|
-
// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
|
|
1669
|
-
if ( ch === "\0" ) {
|
|
1670
|
-
return "\uFFFD";
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
|
-
// Control characters and (dependent upon position) numbers get escaped as code points
|
|
1674
|
-
return ch.slice( 0, -1 ) + "\\" +
|
|
1675
|
-
ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
|
|
1712
|
+
return nonHex;
|
|
1676
1713
|
}
|
|
1677
1714
|
|
|
1678
|
-
//
|
|
1679
|
-
|
|
1715
|
+
// Replace a hexadecimal escape sequence with the encoded Unicode code point
|
|
1716
|
+
// Support: IE <=11+
|
|
1717
|
+
// For values outside the Basic Multilingual Plane (BMP), manually construct a
|
|
1718
|
+
// surrogate pair
|
|
1719
|
+
return high < 0 ?
|
|
1720
|
+
String.fromCharCode( high + 0x10000 ) :
|
|
1721
|
+
String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
|
|
1680
1722
|
},
|
|
1681
1723
|
|
|
1682
|
-
// Used for iframes
|
|
1683
|
-
//
|
|
1724
|
+
// Used for iframes; see `setDocument`.
|
|
1725
|
+
// Support: IE 9 - 11+, Edge 12 - 18+
|
|
1684
1726
|
// Removing the function wrapper causes a "Permission Denied"
|
|
1685
|
-
// error in IE
|
|
1727
|
+
// error in IE/Edge.
|
|
1686
1728
|
unloadHandler = function() {
|
|
1687
1729
|
setDocument();
|
|
1688
1730
|
},
|
|
1689
1731
|
|
|
1690
1732
|
inDisabledFieldset = addCombinator(
|
|
1691
1733
|
function( elem ) {
|
|
1692
|
-
return elem.disabled === true &&
|
|
1734
|
+
return elem.disabled === true && nodeName( elem, "fieldset" );
|
|
1693
1735
|
},
|
|
1694
1736
|
{ dir: "parentNode", next: "legend" }
|
|
1695
1737
|
);
|
|
1696
1738
|
|
|
1739
|
+
// Support: IE <=9 only
|
|
1740
|
+
// Accessing document.activeElement can throw unexpectedly
|
|
1741
|
+
// https://bugs.jquery.com/ticket/13393
|
|
1742
|
+
function safeActiveElement() {
|
|
1743
|
+
try {
|
|
1744
|
+
return document.activeElement;
|
|
1745
|
+
} catch ( err ) { }
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1697
1748
|
// Optimize for push.apply( _, NodeList )
|
|
1698
1749
|
try {
|
|
1699
1750
|
push.apply(
|
|
@@ -1701,32 +1752,22 @@ try {
|
|
|
1701
1752
|
preferredDoc.childNodes
|
|
1702
1753
|
);
|
|
1703
1754
|
|
|
1704
|
-
// Support: Android
|
|
1755
|
+
// Support: Android <=4.0
|
|
1705
1756
|
// Detect silently failing push.apply
|
|
1706
1757
|
// eslint-disable-next-line no-unused-expressions
|
|
1707
1758
|
arr[ preferredDoc.childNodes.length ].nodeType;
|
|
1708
1759
|
} catch ( e ) {
|
|
1709
|
-
push = {
|
|
1710
|
-
|
|
1711
|
-
// Leverage slice if possible
|
|
1712
|
-
function( target, els ) {
|
|
1760
|
+
push = {
|
|
1761
|
+
apply: function( target, els ) {
|
|
1713
1762
|
pushNative.apply( target, slice.call( els ) );
|
|
1714
|
-
}
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
// Otherwise append directly
|
|
1718
|
-
function( target, els ) {
|
|
1719
|
-
var j = target.length,
|
|
1720
|
-
i = 0;
|
|
1721
|
-
|
|
1722
|
-
// Can't trust NodeList.length
|
|
1723
|
-
while ( ( target[ j++ ] = els[ i++ ] ) ) {}
|
|
1724
|
-
target.length = j - 1;
|
|
1763
|
+
},
|
|
1764
|
+
call: function( target ) {
|
|
1765
|
+
pushNative.apply( target, slice.call( arguments, 1 ) );
|
|
1725
1766
|
}
|
|
1726
1767
|
};
|
|
1727
1768
|
}
|
|
1728
1769
|
|
|
1729
|
-
function
|
|
1770
|
+
function find( selector, context, results, seed ) {
|
|
1730
1771
|
var m, i, elem, nid, match, groups, newSelector,
|
|
1731
1772
|
newContext = context && context.ownerDocument,
|
|
1732
1773
|
|
|
@@ -1760,11 +1801,10 @@ function Sizzle( selector, context, results, seed ) {
|
|
|
1760
1801
|
if ( nodeType === 9 ) {
|
|
1761
1802
|
if ( ( elem = context.getElementById( m ) ) ) {
|
|
1762
1803
|
|
|
1763
|
-
// Support: IE
|
|
1764
|
-
// TODO: identify versions
|
|
1804
|
+
// Support: IE 9 only
|
|
1765
1805
|
// getElementById can match elements by name instead of ID
|
|
1766
1806
|
if ( elem.id === m ) {
|
|
1767
|
-
|
|
1807
|
+
push.call( results, elem );
|
|
1768
1808
|
return results;
|
|
1769
1809
|
}
|
|
1770
1810
|
} else {
|
|
@@ -1774,14 +1814,13 @@ function Sizzle( selector, context, results, seed ) {
|
|
|
1774
1814
|
// Element context
|
|
1775
1815
|
} else {
|
|
1776
1816
|
|
|
1777
|
-
// Support: IE
|
|
1778
|
-
// TODO: identify versions
|
|
1817
|
+
// Support: IE 9 only
|
|
1779
1818
|
// getElementById can match elements by name instead of ID
|
|
1780
1819
|
if ( newContext && ( elem = newContext.getElementById( m ) ) &&
|
|
1781
|
-
contains( context, elem ) &&
|
|
1820
|
+
find.contains( context, elem ) &&
|
|
1782
1821
|
elem.id === m ) {
|
|
1783
1822
|
|
|
1784
|
-
|
|
1823
|
+
push.call( results, elem );
|
|
1785
1824
|
return results;
|
|
1786
1825
|
}
|
|
1787
1826
|
}
|
|
@@ -1792,22 +1831,15 @@ function Sizzle( selector, context, results, seed ) {
|
|
|
1792
1831
|
return results;
|
|
1793
1832
|
|
|
1794
1833
|
// Class selector
|
|
1795
|
-
} else if ( ( m = match[ 3 ] ) &&
|
|
1796
|
-
context.getElementsByClassName ) {
|
|
1797
|
-
|
|
1834
|
+
} else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) {
|
|
1798
1835
|
push.apply( results, context.getElementsByClassName( m ) );
|
|
1799
1836
|
return results;
|
|
1800
1837
|
}
|
|
1801
1838
|
}
|
|
1802
1839
|
|
|
1803
1840
|
// Take advantage of querySelectorAll
|
|
1804
|
-
if (
|
|
1805
|
-
!
|
|
1806
|
-
( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&
|
|
1807
|
-
|
|
1808
|
-
// Support: IE 8 only
|
|
1809
|
-
// Exclude object elements
|
|
1810
|
-
( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) {
|
|
1841
|
+
if ( !nonnativeSelectorCache[ selector + " " ] &&
|
|
1842
|
+
( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {
|
|
1811
1843
|
|
|
1812
1844
|
newSelector = selector;
|
|
1813
1845
|
newContext = context;
|
|
@@ -1820,7 +1852,7 @@ function Sizzle( selector, context, results, seed ) {
|
|
|
1820
1852
|
// as such selectors are not recognized by querySelectorAll.
|
|
1821
1853
|
// Thanks to Andrew Dupont for this technique.
|
|
1822
1854
|
if ( nodeType === 1 &&
|
|
1823
|
-
( rdescend.test( selector ) ||
|
|
1855
|
+
( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {
|
|
1824
1856
|
|
|
1825
1857
|
// Expand context for sibling selectors
|
|
1826
1858
|
newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
|
|
@@ -1828,11 +1860,15 @@ function Sizzle( selector, context, results, seed ) {
|
|
|
1828
1860
|
|
|
1829
1861
|
// We can use :scope instead of the ID hack if the browser
|
|
1830
1862
|
// supports it & if we're not changing the context.
|
|
1831
|
-
|
|
1863
|
+
// Support: IE 11+, Edge 17 - 18+
|
|
1864
|
+
// IE/Edge sometimes throw a "Permission denied" error when
|
|
1865
|
+
// strict-comparing two documents; shallow comparisons work.
|
|
1866
|
+
// eslint-disable-next-line eqeqeq
|
|
1867
|
+
if ( newContext != context || !support.scope ) {
|
|
1832
1868
|
|
|
1833
1869
|
// Capture the context ID, setting it first if necessary
|
|
1834
1870
|
if ( ( nid = context.getAttribute( "id" ) ) ) {
|
|
1835
|
-
nid =
|
|
1871
|
+
nid = jQuery.escapeSelector( nid );
|
|
1836
1872
|
} else {
|
|
1837
1873
|
context.setAttribute( "id", ( nid = expando ) );
|
|
1838
1874
|
}
|
|
@@ -1849,27 +1885,6 @@ function Sizzle( selector, context, results, seed ) {
|
|
|
1849
1885
|
}
|
|
1850
1886
|
|
|
1851
1887
|
try {
|
|
1852
|
-
|
|
1853
|
-
// `qSA` may not throw for unrecognized parts using forgiving parsing:
|
|
1854
|
-
// https://drafts.csswg.org/selectors/#forgiving-selector
|
|
1855
|
-
// like the `:has()` pseudo-class:
|
|
1856
|
-
// https://drafts.csswg.org/selectors/#relational
|
|
1857
|
-
// `CSS.supports` is still expected to return `false` then:
|
|
1858
|
-
// https://drafts.csswg.org/css-conditional-4/#typedef-supports-selector-fn
|
|
1859
|
-
// https://drafts.csswg.org/css-conditional-4/#dfn-support-selector
|
|
1860
|
-
if ( support.cssSupportsSelector &&
|
|
1861
|
-
|
|
1862
|
-
// eslint-disable-next-line no-undef
|
|
1863
|
-
!CSS.supports( "selector(:is(" + newSelector + "))" ) ) {
|
|
1864
|
-
|
|
1865
|
-
// Support: IE 11+
|
|
1866
|
-
// Throw to get to the same code path as an error directly in qSA.
|
|
1867
|
-
// Note: once we only support browser supporting
|
|
1868
|
-
// `CSS.supports('selector(...)')`, we can most likely drop
|
|
1869
|
-
// the `try-catch`. IE doesn't implement the API.
|
|
1870
|
-
throw new Error();
|
|
1871
|
-
}
|
|
1872
|
-
|
|
1873
1888
|
push.apply( results,
|
|
1874
1889
|
newContext.querySelectorAll( newSelector )
|
|
1875
1890
|
);
|
|
@@ -1886,7 +1901,7 @@ function Sizzle( selector, context, results, seed ) {
|
|
|
1886
1901
|
}
|
|
1887
1902
|
|
|
1888
1903
|
// All others
|
|
1889
|
-
return select( selector.replace(
|
|
1904
|
+
return select( selector.replace( rtrimCSS, "$1" ), context, results, seed );
|
|
1890
1905
|
}
|
|
1891
1906
|
|
|
1892
1907
|
/**
|
|
@@ -1900,7 +1915,8 @@ function createCache() {
|
|
|
1900
1915
|
|
|
1901
1916
|
function cache( key, value ) {
|
|
1902
1917
|
|
|
1903
|
-
// Use (key + " ") to avoid collision with native prototype properties
|
|
1918
|
+
// Use (key + " ") to avoid collision with native prototype properties
|
|
1919
|
+
// (see https://github.com/jquery/sizzle/issues/157)
|
|
1904
1920
|
if ( keys.push( key + " " ) > Expr.cacheLength ) {
|
|
1905
1921
|
|
|
1906
1922
|
// Only keep the most recent entries
|
|
@@ -1912,7 +1928,7 @@ function createCache() {
|
|
|
1912
1928
|
}
|
|
1913
1929
|
|
|
1914
1930
|
/**
|
|
1915
|
-
* Mark a function for special use by
|
|
1931
|
+
* Mark a function for special use by jQuery selector module
|
|
1916
1932
|
* @param {Function} fn The function to mark
|
|
1917
1933
|
*/
|
|
1918
1934
|
function markFunction( fn ) {
|
|
@@ -1943,56 +1959,13 @@ function assert( fn ) {
|
|
|
1943
1959
|
}
|
|
1944
1960
|
}
|
|
1945
1961
|
|
|
1946
|
-
/**
|
|
1947
|
-
* Adds the same handler for all of the specified attrs
|
|
1948
|
-
* @param {String} attrs Pipe-separated list of attributes
|
|
1949
|
-
* @param {Function} handler The method that will be applied
|
|
1950
|
-
*/
|
|
1951
|
-
function addHandle( attrs, handler ) {
|
|
1952
|
-
var arr = attrs.split( "|" ),
|
|
1953
|
-
i = arr.length;
|
|
1954
|
-
|
|
1955
|
-
while ( i-- ) {
|
|
1956
|
-
Expr.attrHandle[ arr[ i ] ] = handler;
|
|
1957
|
-
}
|
|
1958
|
-
}
|
|
1959
|
-
|
|
1960
|
-
/**
|
|
1961
|
-
* Checks document order of two siblings
|
|
1962
|
-
* @param {Element} a
|
|
1963
|
-
* @param {Element} b
|
|
1964
|
-
* @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
|
|
1965
|
-
*/
|
|
1966
|
-
function siblingCheck( a, b ) {
|
|
1967
|
-
var cur = b && a,
|
|
1968
|
-
diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
|
|
1969
|
-
a.sourceIndex - b.sourceIndex;
|
|
1970
|
-
|
|
1971
|
-
// Use IE sourceIndex if available on both nodes
|
|
1972
|
-
if ( diff ) {
|
|
1973
|
-
return diff;
|
|
1974
|
-
}
|
|
1975
|
-
|
|
1976
|
-
// Check if b follows a
|
|
1977
|
-
if ( cur ) {
|
|
1978
|
-
while ( ( cur = cur.nextSibling ) ) {
|
|
1979
|
-
if ( cur === b ) {
|
|
1980
|
-
return -1;
|
|
1981
|
-
}
|
|
1982
|
-
}
|
|
1983
|
-
}
|
|
1984
|
-
|
|
1985
|
-
return a ? 1 : -1;
|
|
1986
|
-
}
|
|
1987
|
-
|
|
1988
1962
|
/**
|
|
1989
1963
|
* Returns a function to use in pseudos for input types
|
|
1990
1964
|
* @param {String} type
|
|
1991
1965
|
*/
|
|
1992
1966
|
function createInputPseudo( type ) {
|
|
1993
1967
|
return function( elem ) {
|
|
1994
|
-
|
|
1995
|
-
return name === "input" && elem.type === type;
|
|
1968
|
+
return nodeName( elem, "input" ) && elem.type === type;
|
|
1996
1969
|
};
|
|
1997
1970
|
}
|
|
1998
1971
|
|
|
@@ -2002,8 +1975,8 @@ function createInputPseudo( type ) {
|
|
|
2002
1975
|
*/
|
|
2003
1976
|
function createButtonPseudo( type ) {
|
|
2004
1977
|
return function( elem ) {
|
|
2005
|
-
|
|
2006
|
-
|
|
1978
|
+
return ( nodeName( elem, "input" ) || nodeName( elem, "button" ) ) &&
|
|
1979
|
+
elem.type === type;
|
|
2007
1980
|
};
|
|
2008
1981
|
}
|
|
2009
1982
|
|
|
@@ -2039,14 +2012,13 @@ function createDisabledPseudo( disabled ) {
|
|
|
2039
2012
|
}
|
|
2040
2013
|
}
|
|
2041
2014
|
|
|
2042
|
-
// Support: IE 6 - 11
|
|
2015
|
+
// Support: IE 6 - 11+
|
|
2043
2016
|
// Use the isDisabled shortcut property to check for disabled fieldset ancestors
|
|
2044
2017
|
return elem.isDisabled === disabled ||
|
|
2045
2018
|
|
|
2046
2019
|
// Where there is no isDisabled, check manually
|
|
2047
|
-
/* jshint -W018 */
|
|
2048
2020
|
elem.isDisabled !== !disabled &&
|
|
2049
|
-
|
|
2021
|
+
inDisabledFieldset( elem ) === disabled;
|
|
2050
2022
|
}
|
|
2051
2023
|
|
|
2052
2024
|
return elem.disabled === disabled;
|
|
@@ -2086,7 +2058,7 @@ function createPositionalPseudo( fn ) {
|
|
|
2086
2058
|
}
|
|
2087
2059
|
|
|
2088
2060
|
/**
|
|
2089
|
-
* Checks a node for validity as a
|
|
2061
|
+
* Checks a node for validity as a jQuery selector context
|
|
2090
2062
|
* @param {Element|Object=} context
|
|
2091
2063
|
* @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
|
|
2092
2064
|
*/
|
|
@@ -2094,31 +2066,13 @@ function testContext( context ) {
|
|
|
2094
2066
|
return context && typeof context.getElementsByTagName !== "undefined" && context;
|
|
2095
2067
|
}
|
|
2096
2068
|
|
|
2097
|
-
// Expose support vars for convenience
|
|
2098
|
-
support = Sizzle.support = {};
|
|
2099
|
-
|
|
2100
|
-
/**
|
|
2101
|
-
* Detects XML nodes
|
|
2102
|
-
* @param {Element|Object} elem An element or a document
|
|
2103
|
-
* @returns {Boolean} True iff elem is a non-HTML XML node
|
|
2104
|
-
*/
|
|
2105
|
-
isXML = Sizzle.isXML = function( elem ) {
|
|
2106
|
-
var namespace = elem && elem.namespaceURI,
|
|
2107
|
-
docElem = elem && ( elem.ownerDocument || elem ).documentElement;
|
|
2108
|
-
|
|
2109
|
-
// Support: IE <=8
|
|
2110
|
-
// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes
|
|
2111
|
-
// https://bugs.jquery.com/ticket/4833
|
|
2112
|
-
return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" );
|
|
2113
|
-
};
|
|
2114
|
-
|
|
2115
2069
|
/**
|
|
2116
2070
|
* Sets document-related variables once based on the current document
|
|
2117
|
-
* @param {Element|Object} [
|
|
2071
|
+
* @param {Element|Object} [node] An element or document object to use to set the document
|
|
2118
2072
|
* @returns {Object} Returns the current document
|
|
2119
2073
|
*/
|
|
2120
|
-
|
|
2121
|
-
var
|
|
2074
|
+
function setDocument( node ) {
|
|
2075
|
+
var subWindow,
|
|
2122
2076
|
doc = node ? node.ownerDocument || node : preferredDoc;
|
|
2123
2077
|
|
|
2124
2078
|
// Return early if doc is invalid or already selected
|
|
@@ -2132,112 +2086,90 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
|
2132
2086
|
|
|
2133
2087
|
// Update global variables
|
|
2134
2088
|
document = doc;
|
|
2135
|
-
|
|
2136
|
-
documentIsHTML = !
|
|
2089
|
+
documentElement = document.documentElement;
|
|
2090
|
+
documentIsHTML = !jQuery.isXMLDoc( document );
|
|
2091
|
+
|
|
2092
|
+
// Support: iOS 7 only, IE 9 - 11+
|
|
2093
|
+
// Older browsers didn't support unprefixed `matches`.
|
|
2094
|
+
matches = documentElement.matches ||
|
|
2095
|
+
documentElement.webkitMatchesSelector ||
|
|
2096
|
+
documentElement.msMatchesSelector;
|
|
2137
2097
|
|
|
2138
2098
|
// Support: IE 9 - 11+, Edge 12 - 18+
|
|
2139
|
-
// Accessing iframe documents after unload throws "permission denied" errors
|
|
2140
|
-
//
|
|
2141
|
-
// IE
|
|
2142
|
-
//
|
|
2143
|
-
|
|
2144
|
-
if ( preferredDoc != document &&
|
|
2145
|
-
( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {
|
|
2099
|
+
// Accessing iframe documents after unload throws "permission denied" errors
|
|
2100
|
+
// (see trac-13936).
|
|
2101
|
+
// Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`,
|
|
2102
|
+
// all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well.
|
|
2103
|
+
if ( documentElement.msMatchesSelector &&
|
|
2146
2104
|
|
|
2147
|
-
// Support: IE 11
|
|
2148
|
-
|
|
2149
|
-
|
|
2105
|
+
// Support: IE 11+, Edge 17 - 18+
|
|
2106
|
+
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
|
2107
|
+
// two documents; shallow comparisons work.
|
|
2108
|
+
// eslint-disable-next-line eqeqeq
|
|
2109
|
+
preferredDoc != document &&
|
|
2110
|
+
( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {
|
|
2150
2111
|
|
|
2151
|
-
// Support: IE 9 -
|
|
2152
|
-
|
|
2153
|
-
subWindow.attachEvent( "onunload", unloadHandler );
|
|
2154
|
-
}
|
|
2112
|
+
// Support: IE 9 - 11+, Edge 12 - 18+
|
|
2113
|
+
subWindow.addEventListener( "unload", unloadHandler );
|
|
2155
2114
|
}
|
|
2156
2115
|
|
|
2157
|
-
// Support: IE
|
|
2158
|
-
//
|
|
2159
|
-
//
|
|
2160
|
-
//
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
!el.querySelectorAll( ":scope fieldset div" ).length;
|
|
2166
|
-
} );
|
|
2167
|
-
|
|
2168
|
-
// Support: Chrome 105+, Firefox 104+, Safari 15.4+
|
|
2169
|
-
// Make sure forgiving mode is not used in `CSS.supports( "selector(...)" )`.
|
|
2170
|
-
//
|
|
2171
|
-
// `:is()` uses a forgiving selector list as an argument and is widely
|
|
2172
|
-
// implemented, so it's a good one to test against.
|
|
2173
|
-
support.cssSupportsSelector = assert( function() {
|
|
2174
|
-
/* eslint-disable no-undef */
|
|
2175
|
-
|
|
2176
|
-
return CSS.supports( "selector(*)" ) &&
|
|
2177
|
-
|
|
2178
|
-
// Support: Firefox 78-81 only
|
|
2179
|
-
// In old Firefox, `:is()` didn't use forgiving parsing. In that case,
|
|
2180
|
-
// fail this test as there's no selector to test against that.
|
|
2181
|
-
// `CSS.supports` uses unforgiving parsing
|
|
2182
|
-
document.querySelectorAll( ":is(:jqfake)" ) &&
|
|
2183
|
-
|
|
2184
|
-
// `*` is needed as Safari & newer Chrome implemented something in between
|
|
2185
|
-
// for `:has()` - it throws in `qSA` if it only contains an unsupported
|
|
2186
|
-
// argument but multiple ones, one of which is supported, are fine.
|
|
2187
|
-
// We want to play safe in case `:is()` gets the same treatment.
|
|
2188
|
-
!CSS.supports( "selector(:is(*,:jqfake))" );
|
|
2189
|
-
|
|
2190
|
-
/* eslint-enable */
|
|
2116
|
+
// Support: IE <10
|
|
2117
|
+
// Check if getElementById returns elements by name
|
|
2118
|
+
// The broken getElementById methods don't pick up programmatically-set names,
|
|
2119
|
+
// so use a roundabout getElementsByName test
|
|
2120
|
+
support.getById = assert( function( el ) {
|
|
2121
|
+
documentElement.appendChild( el ).id = jQuery.expando;
|
|
2122
|
+
return !document.getElementsByName ||
|
|
2123
|
+
!document.getElementsByName( jQuery.expando ).length;
|
|
2191
2124
|
} );
|
|
2192
2125
|
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
// (excepting IE8 booleans)
|
|
2199
|
-
support.attributes = assert( function( el ) {
|
|
2200
|
-
el.className = "i";
|
|
2201
|
-
return !el.getAttribute( "className" );
|
|
2126
|
+
// Support: IE 9 only
|
|
2127
|
+
// Check to see if it's possible to do matchesSelector
|
|
2128
|
+
// on a disconnected node.
|
|
2129
|
+
support.disconnectedMatch = assert( function( el ) {
|
|
2130
|
+
return matches.call( el, "*" );
|
|
2202
2131
|
} );
|
|
2203
2132
|
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
support.getElementsByTagName = assert( function( el ) {
|
|
2209
|
-
el.appendChild( document.createComment( "" ) );
|
|
2210
|
-
return !el.getElementsByTagName( "*" ).length;
|
|
2133
|
+
// Support: IE 9 - 11+, Edge 12 - 18+
|
|
2134
|
+
// IE/Edge don't support the :scope pseudo-class.
|
|
2135
|
+
support.scope = assert( function() {
|
|
2136
|
+
return document.querySelectorAll( ":scope" );
|
|
2211
2137
|
} );
|
|
2212
2138
|
|
|
2213
|
-
// Support:
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
//
|
|
2217
|
-
//
|
|
2218
|
-
//
|
|
2219
|
-
//
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2139
|
+
// Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only
|
|
2140
|
+
// Make sure the `:has()` argument is parsed unforgivingly.
|
|
2141
|
+
// We include `*` in the test to detect buggy implementations that are
|
|
2142
|
+
// _selectively_ forgiving (specifically when the list includes at least
|
|
2143
|
+
// one valid selector).
|
|
2144
|
+
// Note that we treat complete lack of support for `:has()` as if it were
|
|
2145
|
+
// spec-compliant support, which is fine because use of `:has()` in such
|
|
2146
|
+
// environments will fail in the qSA path and fall back to jQuery traversal
|
|
2147
|
+
// anyway.
|
|
2148
|
+
support.cssHas = assert( function() {
|
|
2149
|
+
try {
|
|
2150
|
+
document.querySelector( ":has(*,:jqfake)" );
|
|
2151
|
+
return false;
|
|
2152
|
+
} catch ( e ) {
|
|
2153
|
+
return true;
|
|
2154
|
+
}
|
|
2223
2155
|
} );
|
|
2224
2156
|
|
|
2225
2157
|
// ID filter and find
|
|
2226
2158
|
if ( support.getById ) {
|
|
2227
|
-
Expr.filter
|
|
2159
|
+
Expr.filter.ID = function( id ) {
|
|
2228
2160
|
var attrId = id.replace( runescape, funescape );
|
|
2229
2161
|
return function( elem ) {
|
|
2230
2162
|
return elem.getAttribute( "id" ) === attrId;
|
|
2231
2163
|
};
|
|
2232
2164
|
};
|
|
2233
|
-
Expr.find
|
|
2165
|
+
Expr.find.ID = function( id, context ) {
|
|
2234
2166
|
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
|
2235
2167
|
var elem = context.getElementById( id );
|
|
2236
2168
|
return elem ? [ elem ] : [];
|
|
2237
2169
|
}
|
|
2238
2170
|
};
|
|
2239
2171
|
} else {
|
|
2240
|
-
Expr.filter
|
|
2172
|
+
Expr.filter.ID = function( id ) {
|
|
2241
2173
|
var attrId = id.replace( runescape, funescape );
|
|
2242
2174
|
return function( elem ) {
|
|
2243
2175
|
var node = typeof elem.getAttributeNode !== "undefined" &&
|
|
@@ -2248,7 +2180,7 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
|
2248
2180
|
|
|
2249
2181
|
// Support: IE 6 - 7 only
|
|
2250
2182
|
// getElementById is not reliable as a find shortcut
|
|
2251
|
-
Expr.find
|
|
2183
|
+
Expr.find.ID = function( id, context ) {
|
|
2252
2184
|
if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
|
|
2253
2185
|
var node, i, elems,
|
|
2254
2186
|
elem = context.getElementById( id );
|
|
@@ -2278,40 +2210,18 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
|
2278
2210
|
}
|
|
2279
2211
|
|
|
2280
2212
|
// Tag
|
|
2281
|
-
Expr.find
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
return context.getElementsByTagName( tag );
|
|
2213
|
+
Expr.find.TAG = function( tag, context ) {
|
|
2214
|
+
if ( typeof context.getElementsByTagName !== "undefined" ) {
|
|
2215
|
+
return context.getElementsByTagName( tag );
|
|
2285
2216
|
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
function( tag, context ) {
|
|
2293
|
-
var elem,
|
|
2294
|
-
tmp = [],
|
|
2295
|
-
i = 0,
|
|
2296
|
-
|
|
2297
|
-
// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
|
|
2298
|
-
results = context.getElementsByTagName( tag );
|
|
2299
|
-
|
|
2300
|
-
// Filter out possible comments
|
|
2301
|
-
if ( tag === "*" ) {
|
|
2302
|
-
while ( ( elem = results[ i++ ] ) ) {
|
|
2303
|
-
if ( elem.nodeType === 1 ) {
|
|
2304
|
-
tmp.push( elem );
|
|
2305
|
-
}
|
|
2306
|
-
}
|
|
2307
|
-
|
|
2308
|
-
return tmp;
|
|
2309
|
-
}
|
|
2310
|
-
return results;
|
|
2311
|
-
};
|
|
2217
|
+
// DocumentFragment nodes don't have gEBTN
|
|
2218
|
+
} else {
|
|
2219
|
+
return context.querySelectorAll( tag );
|
|
2220
|
+
}
|
|
2221
|
+
};
|
|
2312
2222
|
|
|
2313
2223
|
// Class
|
|
2314
|
-
Expr.find
|
|
2224
|
+
Expr.find.CLASS = function( className, context ) {
|
|
2315
2225
|
if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
|
|
2316
2226
|
return context.getElementsByClassName( className );
|
|
2317
2227
|
}
|
|
@@ -2322,195 +2232,94 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
|
2322
2232
|
|
|
2323
2233
|
// QSA and matchesSelector support
|
|
2324
2234
|
|
|
2325
|
-
// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
|
|
2326
|
-
rbuggyMatches = [];
|
|
2327
|
-
|
|
2328
|
-
// qSa(:focus) reports false when true (Chrome 21)
|
|
2329
|
-
// We allow this because of a bug in IE8/9 that throws an error
|
|
2330
|
-
// whenever `document.activeElement` is accessed on an iframe
|
|
2331
|
-
// So, we allow :focus to pass through QSA all the time to avoid the IE error
|
|
2332
|
-
// See https://bugs.jquery.com/ticket/13378
|
|
2333
2235
|
rbuggyQSA = [];
|
|
2334
2236
|
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
// Regex strategy adopted from Diego Perini
|
|
2339
|
-
assert( function( el ) {
|
|
2340
|
-
|
|
2341
|
-
var input;
|
|
2342
|
-
|
|
2343
|
-
// Select is set to empty string on purpose
|
|
2344
|
-
// This is to test IE's treatment of not explicitly
|
|
2345
|
-
// setting a boolean content attribute,
|
|
2346
|
-
// since its presence should be enough
|
|
2347
|
-
// https://bugs.jquery.com/ticket/12359
|
|
2348
|
-
docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" +
|
|
2349
|
-
"<select id='" + expando + "-\r\\' msallowcapture=''>" +
|
|
2350
|
-
"<option selected=''></option></select>";
|
|
2351
|
-
|
|
2352
|
-
// Support: IE8, Opera 11-12.16
|
|
2353
|
-
// Nothing should be selected when empty strings follow ^= or $= or *=
|
|
2354
|
-
// The test attribute must be unknown in Opera but "safe" for WinRT
|
|
2355
|
-
// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
|
|
2356
|
-
if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) {
|
|
2357
|
-
rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
|
|
2358
|
-
}
|
|
2359
|
-
|
|
2360
|
-
// Support: IE8
|
|
2361
|
-
// Boolean attributes and "value" are not treated correctly
|
|
2362
|
-
if ( !el.querySelectorAll( "[selected]" ).length ) {
|
|
2363
|
-
rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
|
|
2364
|
-
}
|
|
2365
|
-
|
|
2366
|
-
// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
|
|
2367
|
-
if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
|
|
2368
|
-
rbuggyQSA.push( "~=" );
|
|
2369
|
-
}
|
|
2370
|
-
|
|
2371
|
-
// Support: IE 11+, Edge 15 - 18+
|
|
2372
|
-
// IE 11/Edge don't find elements on a `[name='']` query in some cases.
|
|
2373
|
-
// Adding a temporary attribute to the document before the selection works
|
|
2374
|
-
// around the issue.
|
|
2375
|
-
// Interestingly, IE 10 & older don't seem to have the issue.
|
|
2376
|
-
input = document.createElement( "input" );
|
|
2377
|
-
input.setAttribute( "name", "" );
|
|
2378
|
-
el.appendChild( input );
|
|
2379
|
-
if ( !el.querySelectorAll( "[name='']" ).length ) {
|
|
2380
|
-
rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" +
|
|
2381
|
-
whitespace + "*(?:''|\"\")" );
|
|
2382
|
-
}
|
|
2383
|
-
|
|
2384
|
-
// Webkit/Opera - :checked should return selected option elements
|
|
2385
|
-
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
|
|
2386
|
-
// IE8 throws error here and will not see later tests
|
|
2387
|
-
if ( !el.querySelectorAll( ":checked" ).length ) {
|
|
2388
|
-
rbuggyQSA.push( ":checked" );
|
|
2389
|
-
}
|
|
2390
|
-
|
|
2391
|
-
// Support: Safari 8+, iOS 8+
|
|
2392
|
-
// https://bugs.webkit.org/show_bug.cgi?id=136851
|
|
2393
|
-
// In-page `selector#id sibling-combinator selector` fails
|
|
2394
|
-
if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
|
|
2395
|
-
rbuggyQSA.push( ".#.+[+~]" );
|
|
2396
|
-
}
|
|
2397
|
-
|
|
2398
|
-
// Support: Firefox <=3.6 - 5 only
|
|
2399
|
-
// Old Firefox doesn't throw on a badly-escaped identifier.
|
|
2400
|
-
el.querySelectorAll( "\\\f" );
|
|
2401
|
-
rbuggyQSA.push( "[\\r\\n\\f]" );
|
|
2402
|
-
} );
|
|
2237
|
+
// Build QSA regex
|
|
2238
|
+
// Regex strategy adopted from Diego Perini
|
|
2239
|
+
assert( function( el ) {
|
|
2403
2240
|
|
|
2404
|
-
|
|
2405
|
-
el.innerHTML = "<a href='' disabled='disabled'></a>" +
|
|
2406
|
-
"<select disabled='disabled'><option/></select>";
|
|
2241
|
+
var input;
|
|
2407
2242
|
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
el.appendChild( input ).setAttribute( "name", "D" );
|
|
2243
|
+
documentElement.appendChild( el ).innerHTML =
|
|
2244
|
+
"<a id='" + expando + "' href='' disabled='disabled'></a>" +
|
|
2245
|
+
"<select id='" + expando + "-\r\\' disabled='disabled'>" +
|
|
2246
|
+
"<option selected=''></option></select>";
|
|
2413
2247
|
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
|
|
2421
|
-
// IE8 throws error here and will not see later tests
|
|
2422
|
-
if ( el.querySelectorAll( ":enabled" ).length !== 2 ) {
|
|
2423
|
-
rbuggyQSA.push( ":enabled", ":disabled" );
|
|
2424
|
-
}
|
|
2425
|
-
|
|
2426
|
-
// Support: IE9-11+
|
|
2427
|
-
// IE's :disabled selector does not pick up the children of disabled fieldsets
|
|
2428
|
-
docElem.appendChild( el ).disabled = true;
|
|
2429
|
-
if ( el.querySelectorAll( ":disabled" ).length !== 2 ) {
|
|
2430
|
-
rbuggyQSA.push( ":enabled", ":disabled" );
|
|
2431
|
-
}
|
|
2248
|
+
// Support: iOS <=7 - 8 only
|
|
2249
|
+
// Boolean attributes and "value" are not treated correctly in some XML documents
|
|
2250
|
+
if ( !el.querySelectorAll( "[selected]" ).length ) {
|
|
2251
|
+
rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
|
|
2252
|
+
}
|
|
2432
2253
|
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
} );
|
|
2438
|
-
}
|
|
2254
|
+
// Support: iOS <=7 - 8 only
|
|
2255
|
+
if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
|
|
2256
|
+
rbuggyQSA.push( "~=" );
|
|
2257
|
+
}
|
|
2439
2258
|
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2259
|
+
// Support: iOS 8 only
|
|
2260
|
+
// https://bugs.webkit.org/show_bug.cgi?id=136851
|
|
2261
|
+
// In-page `selector#id sibling-combinator selector` fails
|
|
2262
|
+
if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
|
|
2263
|
+
rbuggyQSA.push( ".#.+[+~]" );
|
|
2264
|
+
}
|
|
2445
2265
|
|
|
2446
|
-
|
|
2266
|
+
// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+
|
|
2267
|
+
// In some of the document kinds, these selectors wouldn't work natively.
|
|
2268
|
+
// This is probably OK but for backwards compatibility we want to maintain
|
|
2269
|
+
// handling them through jQuery traversal in jQuery 3.x.
|
|
2270
|
+
if ( !el.querySelectorAll( ":checked" ).length ) {
|
|
2271
|
+
rbuggyQSA.push( ":checked" );
|
|
2272
|
+
}
|
|
2447
2273
|
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2274
|
+
// Support: Windows 8 Native Apps
|
|
2275
|
+
// The type and name attributes are restricted during .innerHTML assignment
|
|
2276
|
+
input = document.createElement( "input" );
|
|
2277
|
+
input.setAttribute( "type", "hidden" );
|
|
2278
|
+
el.appendChild( input ).setAttribute( "name", "D" );
|
|
2279
|
+
|
|
2280
|
+
// Support: IE 9 - 11+
|
|
2281
|
+
// IE's :disabled selector does not pick up the children of disabled fieldsets
|
|
2282
|
+
// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+
|
|
2283
|
+
// In some of the document kinds, these selectors wouldn't work natively.
|
|
2284
|
+
// This is probably OK but for backwards compatibility we want to maintain
|
|
2285
|
+
// handling them through jQuery traversal in jQuery 3.x.
|
|
2286
|
+
documentElement.appendChild( el ).disabled = true;
|
|
2287
|
+
if ( el.querySelectorAll( ":disabled" ).length !== 2 ) {
|
|
2288
|
+
rbuggyQSA.push( ":enabled", ":disabled" );
|
|
2289
|
+
}
|
|
2451
2290
|
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2291
|
+
// Support: IE 11+, Edge 15 - 18+
|
|
2292
|
+
// IE 11/Edge don't find elements on a `[name='']` query in some cases.
|
|
2293
|
+
// Adding a temporary attribute to the document before the selection works
|
|
2294
|
+
// around the issue.
|
|
2295
|
+
// Interestingly, IE 10 & older don't seem to have the issue.
|
|
2296
|
+
input = document.createElement( "input" );
|
|
2297
|
+
input.setAttribute( "name", "" );
|
|
2298
|
+
el.appendChild( input );
|
|
2299
|
+
if ( !el.querySelectorAll( "[name='']" ).length ) {
|
|
2300
|
+
rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" +
|
|
2301
|
+
whitespace + "*(?:''|\"\")" );
|
|
2302
|
+
}
|
|
2303
|
+
} );
|
|
2458
2304
|
|
|
2459
|
-
if ( !support.
|
|
2305
|
+
if ( !support.cssHas ) {
|
|
2460
2306
|
|
|
2461
|
-
// Support: Chrome 105+, Safari 15.4+
|
|
2462
|
-
//
|
|
2463
|
-
//
|
|
2464
|
-
//
|
|
2465
|
-
//
|
|
2466
|
-
//
|
|
2307
|
+
// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+
|
|
2308
|
+
// Our regular `try-catch` mechanism fails to detect natively-unsupported
|
|
2309
|
+
// pseudo-classes inside `:has()` (such as `:has(:contains("Foo"))`)
|
|
2310
|
+
// in browsers that parse the `:has()` argument as a forgiving selector list.
|
|
2311
|
+
// https://drafts.csswg.org/selectors/#relational now requires the argument
|
|
2312
|
+
// to be parsed unforgivingly, but browsers have not yet fully adjusted.
|
|
2467
2313
|
rbuggyQSA.push( ":has" );
|
|
2468
2314
|
}
|
|
2469
2315
|
|
|
2470
2316
|
rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) );
|
|
2471
|
-
rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) );
|
|
2472
|
-
|
|
2473
|
-
/* Contains
|
|
2474
|
-
---------------------------------------------------------------------- */
|
|
2475
|
-
hasCompare = rnative.test( docElem.compareDocumentPosition );
|
|
2476
|
-
|
|
2477
|
-
// Element contains another
|
|
2478
|
-
// Purposefully self-exclusive
|
|
2479
|
-
// As in, an element does not contain itself
|
|
2480
|
-
contains = hasCompare || rnative.test( docElem.contains ) ?
|
|
2481
|
-
function( a, b ) {
|
|
2482
|
-
|
|
2483
|
-
// Support: IE <9 only
|
|
2484
|
-
// IE doesn't have `contains` on `document` so we need to check for
|
|
2485
|
-
// `documentElement` presence.
|
|
2486
|
-
// We need to fall back to `a` when `documentElement` is missing
|
|
2487
|
-
// as `ownerDocument` of elements within `<template/>` may have
|
|
2488
|
-
// a null one - a default behavior of all modern browsers.
|
|
2489
|
-
var adown = a.nodeType === 9 && a.documentElement || a,
|
|
2490
|
-
bup = b && b.parentNode;
|
|
2491
|
-
return a === bup || !!( bup && bup.nodeType === 1 && (
|
|
2492
|
-
adown.contains ?
|
|
2493
|
-
adown.contains( bup ) :
|
|
2494
|
-
a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
|
|
2495
|
-
) );
|
|
2496
|
-
} :
|
|
2497
|
-
function( a, b ) {
|
|
2498
|
-
if ( b ) {
|
|
2499
|
-
while ( ( b = b.parentNode ) ) {
|
|
2500
|
-
if ( b === a ) {
|
|
2501
|
-
return true;
|
|
2502
|
-
}
|
|
2503
|
-
}
|
|
2504
|
-
}
|
|
2505
|
-
return false;
|
|
2506
|
-
};
|
|
2507
2317
|
|
|
2508
2318
|
/* Sorting
|
|
2509
2319
|
---------------------------------------------------------------------- */
|
|
2510
2320
|
|
|
2511
2321
|
// Document order sorting
|
|
2512
|
-
sortOrder =
|
|
2513
|
-
function( a, b ) {
|
|
2322
|
+
sortOrder = function( a, b ) {
|
|
2514
2323
|
|
|
2515
2324
|
// Flag for duplicate removal
|
|
2516
2325
|
if ( a === b ) {
|
|
@@ -2544,8 +2353,8 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
|
2544
2353
|
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
|
2545
2354
|
// two documents; shallow comparisons work.
|
|
2546
2355
|
// eslint-disable-next-line eqeqeq
|
|
2547
|
-
if ( a
|
|
2548
|
-
contains( preferredDoc, a ) ) {
|
|
2356
|
+
if ( a === document || a.ownerDocument == preferredDoc &&
|
|
2357
|
+
find.contains( preferredDoc, a ) ) {
|
|
2549
2358
|
return -1;
|
|
2550
2359
|
}
|
|
2551
2360
|
|
|
@@ -2553,100 +2362,33 @@ setDocument = Sizzle.setDocument = function( node ) {
|
|
|
2553
2362
|
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
|
2554
2363
|
// two documents; shallow comparisons work.
|
|
2555
2364
|
// eslint-disable-next-line eqeqeq
|
|
2556
|
-
if ( b
|
|
2557
|
-
contains( preferredDoc, b ) ) {
|
|
2365
|
+
if ( b === document || b.ownerDocument == preferredDoc &&
|
|
2366
|
+
find.contains( preferredDoc, b ) ) {
|
|
2558
2367
|
return 1;
|
|
2559
2368
|
}
|
|
2560
2369
|
|
|
2561
2370
|
// Maintain original order
|
|
2562
2371
|
return sortInput ?
|
|
2563
|
-
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
|
|
2372
|
+
( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
|
|
2564
2373
|
0;
|
|
2565
2374
|
}
|
|
2566
2375
|
|
|
2567
2376
|
return compare & 4 ? -1 : 1;
|
|
2568
|
-
} :
|
|
2569
|
-
function( a, b ) {
|
|
2570
|
-
|
|
2571
|
-
// Exit early if the nodes are identical
|
|
2572
|
-
if ( a === b ) {
|
|
2573
|
-
hasDuplicate = true;
|
|
2574
|
-
return 0;
|
|
2575
|
-
}
|
|
2576
|
-
|
|
2577
|
-
var cur,
|
|
2578
|
-
i = 0,
|
|
2579
|
-
aup = a.parentNode,
|
|
2580
|
-
bup = b.parentNode,
|
|
2581
|
-
ap = [ a ],
|
|
2582
|
-
bp = [ b ];
|
|
2583
|
-
|
|
2584
|
-
// Parentless nodes are either documents or disconnected
|
|
2585
|
-
if ( !aup || !bup ) {
|
|
2586
|
-
|
|
2587
|
-
// Support: IE 11+, Edge 17 - 18+
|
|
2588
|
-
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
|
2589
|
-
// two documents; shallow comparisons work.
|
|
2590
|
-
/* eslint-disable eqeqeq */
|
|
2591
|
-
return a == document ? -1 :
|
|
2592
|
-
b == document ? 1 :
|
|
2593
|
-
/* eslint-enable eqeqeq */
|
|
2594
|
-
aup ? -1 :
|
|
2595
|
-
bup ? 1 :
|
|
2596
|
-
sortInput ?
|
|
2597
|
-
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
|
|
2598
|
-
0;
|
|
2599
|
-
|
|
2600
|
-
// If the nodes are siblings, we can do a quick check
|
|
2601
|
-
} else if ( aup === bup ) {
|
|
2602
|
-
return siblingCheck( a, b );
|
|
2603
|
-
}
|
|
2604
|
-
|
|
2605
|
-
// Otherwise we need full lists of their ancestors for comparison
|
|
2606
|
-
cur = a;
|
|
2607
|
-
while ( ( cur = cur.parentNode ) ) {
|
|
2608
|
-
ap.unshift( cur );
|
|
2609
|
-
}
|
|
2610
|
-
cur = b;
|
|
2611
|
-
while ( ( cur = cur.parentNode ) ) {
|
|
2612
|
-
bp.unshift( cur );
|
|
2613
|
-
}
|
|
2614
|
-
|
|
2615
|
-
// Walk down the tree looking for a discrepancy
|
|
2616
|
-
while ( ap[ i ] === bp[ i ] ) {
|
|
2617
|
-
i++;
|
|
2618
|
-
}
|
|
2619
|
-
|
|
2620
|
-
return i ?
|
|
2621
|
-
|
|
2622
|
-
// Do a sibling check if the nodes have a common ancestor
|
|
2623
|
-
siblingCheck( ap[ i ], bp[ i ] ) :
|
|
2624
|
-
|
|
2625
|
-
// Otherwise nodes in our document sort first
|
|
2626
|
-
// Support: IE 11+, Edge 17 - 18+
|
|
2627
|
-
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
|
2628
|
-
// two documents; shallow comparisons work.
|
|
2629
|
-
/* eslint-disable eqeqeq */
|
|
2630
|
-
ap[ i ] == preferredDoc ? -1 :
|
|
2631
|
-
bp[ i ] == preferredDoc ? 1 :
|
|
2632
|
-
/* eslint-enable eqeqeq */
|
|
2633
|
-
0;
|
|
2634
2377
|
};
|
|
2635
2378
|
|
|
2636
2379
|
return document;
|
|
2637
|
-
}
|
|
2380
|
+
}
|
|
2638
2381
|
|
|
2639
|
-
|
|
2640
|
-
return
|
|
2382
|
+
find.matches = function( expr, elements ) {
|
|
2383
|
+
return find( expr, null, null, elements );
|
|
2641
2384
|
};
|
|
2642
2385
|
|
|
2643
|
-
|
|
2386
|
+
find.matchesSelector = function( elem, expr ) {
|
|
2644
2387
|
setDocument( elem );
|
|
2645
2388
|
|
|
2646
|
-
if (
|
|
2389
|
+
if ( documentIsHTML &&
|
|
2647
2390
|
!nonnativeSelectorCache[ expr + " " ] &&
|
|
2648
|
-
( !
|
|
2649
|
-
( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
|
|
2391
|
+
( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
|
|
2650
2392
|
|
|
2651
2393
|
try {
|
|
2652
2394
|
var ret = matches.call( elem, expr );
|
|
@@ -2654,9 +2396,9 @@ Sizzle.matchesSelector = function( elem, expr ) {
|
|
|
2654
2396
|
// IE 9's matchesSelector returns false on disconnected nodes
|
|
2655
2397
|
if ( ret || support.disconnectedMatch ||
|
|
2656
2398
|
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2399
|
+
// As well, disconnected nodes are said to be in a document
|
|
2400
|
+
// fragment in IE 9
|
|
2401
|
+
elem.document && elem.document.nodeType !== 11 ) {
|
|
2660
2402
|
return ret;
|
|
2661
2403
|
}
|
|
2662
2404
|
} catch ( e ) {
|
|
@@ -2664,10 +2406,10 @@ Sizzle.matchesSelector = function( elem, expr ) {
|
|
|
2664
2406
|
}
|
|
2665
2407
|
}
|
|
2666
2408
|
|
|
2667
|
-
return
|
|
2409
|
+
return find( expr, document, null, [ elem ] ).length > 0;
|
|
2668
2410
|
};
|
|
2669
2411
|
|
|
2670
|
-
|
|
2412
|
+
find.contains = function( context, elem ) {
|
|
2671
2413
|
|
|
2672
2414
|
// Set document vars if needed
|
|
2673
2415
|
// Support: IE 11+, Edge 17 - 18+
|
|
@@ -2677,10 +2419,11 @@ Sizzle.contains = function( context, elem ) {
|
|
|
2677
2419
|
if ( ( context.ownerDocument || context ) != document ) {
|
|
2678
2420
|
setDocument( context );
|
|
2679
2421
|
}
|
|
2680
|
-
return contains( context, elem );
|
|
2422
|
+
return jQuery.contains( context, elem );
|
|
2681
2423
|
};
|
|
2682
2424
|
|
|
2683
|
-
|
|
2425
|
+
|
|
2426
|
+
find.attr = function( elem, name ) {
|
|
2684
2427
|
|
|
2685
2428
|
// Set document vars if needed
|
|
2686
2429
|
// Support: IE 11+, Edge 17 - 18+
|
|
@@ -2693,25 +2436,19 @@ Sizzle.attr = function( elem, name ) {
|
|
|
2693
2436
|
|
|
2694
2437
|
var fn = Expr.attrHandle[ name.toLowerCase() ],
|
|
2695
2438
|
|
|
2696
|
-
// Don't get fooled by Object.prototype properties (
|
|
2439
|
+
// Don't get fooled by Object.prototype properties (see trac-13807)
|
|
2697
2440
|
val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
|
|
2698
2441
|
fn( elem, name, !documentIsHTML ) :
|
|
2699
2442
|
undefined;
|
|
2700
2443
|
|
|
2701
|
-
|
|
2702
|
-
val
|
|
2703
|
-
|
|
2704
|
-
elem.getAttribute( name ) :
|
|
2705
|
-
( val = elem.getAttributeNode( name ) ) && val.specified ?
|
|
2706
|
-
val.value :
|
|
2707
|
-
null;
|
|
2708
|
-
};
|
|
2444
|
+
if ( val !== undefined ) {
|
|
2445
|
+
return val;
|
|
2446
|
+
}
|
|
2709
2447
|
|
|
2710
|
-
|
|
2711
|
-
return ( sel + "" ).replace( rcssescape, fcssescape );
|
|
2448
|
+
return elem.getAttribute( name );
|
|
2712
2449
|
};
|
|
2713
2450
|
|
|
2714
|
-
|
|
2451
|
+
find.error = function( msg ) {
|
|
2715
2452
|
throw new Error( "Syntax error, unrecognized expression: " + msg );
|
|
2716
2453
|
};
|
|
2717
2454
|
|
|
@@ -2719,16 +2456,20 @@ Sizzle.error = function( msg ) {
|
|
|
2719
2456
|
* Document sorting and removing duplicates
|
|
2720
2457
|
* @param {ArrayLike} results
|
|
2721
2458
|
*/
|
|
2722
|
-
|
|
2459
|
+
jQuery.uniqueSort = function( results ) {
|
|
2723
2460
|
var elem,
|
|
2724
2461
|
duplicates = [],
|
|
2725
2462
|
j = 0,
|
|
2726
2463
|
i = 0;
|
|
2727
2464
|
|
|
2728
2465
|
// Unless we *know* we can detect duplicates, assume their presence
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2466
|
+
//
|
|
2467
|
+
// Support: Android <=4.0+
|
|
2468
|
+
// Testing for detecting duplicates is unpredictable so instead assume we can't
|
|
2469
|
+
// depend on duplicate detection in all browsers without a stable sort.
|
|
2470
|
+
hasDuplicate = !support.sortStable;
|
|
2471
|
+
sortInput = !support.sortStable && slice.call( results, 0 );
|
|
2472
|
+
sort.call( results, sortOrder );
|
|
2732
2473
|
|
|
2733
2474
|
if ( hasDuplicate ) {
|
|
2734
2475
|
while ( ( elem = results[ i++ ] ) ) {
|
|
@@ -2737,7 +2478,7 @@ Sizzle.uniqueSort = function( results ) {
|
|
|
2737
2478
|
}
|
|
2738
2479
|
}
|
|
2739
2480
|
while ( j-- ) {
|
|
2740
|
-
|
|
2481
|
+
splice.call( results, duplicates[ j ], 1 );
|
|
2741
2482
|
}
|
|
2742
2483
|
}
|
|
2743
2484
|
|
|
@@ -2748,47 +2489,11 @@ Sizzle.uniqueSort = function( results ) {
|
|
|
2748
2489
|
return results;
|
|
2749
2490
|
};
|
|
2750
2491
|
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
* @param {Array|Element} elem
|
|
2754
|
-
*/
|
|
2755
|
-
getText = Sizzle.getText = function( elem ) {
|
|
2756
|
-
var node,
|
|
2757
|
-
ret = "",
|
|
2758
|
-
i = 0,
|
|
2759
|
-
nodeType = elem.nodeType;
|
|
2760
|
-
|
|
2761
|
-
if ( !nodeType ) {
|
|
2762
|
-
|
|
2763
|
-
// If no nodeType, this is expected to be an array
|
|
2764
|
-
while ( ( node = elem[ i++ ] ) ) {
|
|
2765
|
-
|
|
2766
|
-
// Do not traverse comment nodes
|
|
2767
|
-
ret += getText( node );
|
|
2768
|
-
}
|
|
2769
|
-
} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
|
|
2770
|
-
|
|
2771
|
-
// Use textContent for elements
|
|
2772
|
-
// innerText usage removed for consistency of new lines (jQuery #11153)
|
|
2773
|
-
if ( typeof elem.textContent === "string" ) {
|
|
2774
|
-
return elem.textContent;
|
|
2775
|
-
} else {
|
|
2776
|
-
|
|
2777
|
-
// Traverse its children
|
|
2778
|
-
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
|
|
2779
|
-
ret += getText( elem );
|
|
2780
|
-
}
|
|
2781
|
-
}
|
|
2782
|
-
} else if ( nodeType === 3 || nodeType === 4 ) {
|
|
2783
|
-
return elem.nodeValue;
|
|
2784
|
-
}
|
|
2785
|
-
|
|
2786
|
-
// Do not include comment or processing instruction nodes
|
|
2787
|
-
|
|
2788
|
-
return ret;
|
|
2492
|
+
jQuery.fn.uniqueSort = function() {
|
|
2493
|
+
return this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );
|
|
2789
2494
|
};
|
|
2790
2495
|
|
|
2791
|
-
Expr =
|
|
2496
|
+
Expr = jQuery.expr = {
|
|
2792
2497
|
|
|
2793
2498
|
// Can be adjusted by the user
|
|
2794
2499
|
cacheLength: 50,
|
|
@@ -2809,12 +2514,12 @@ Expr = Sizzle.selectors = {
|
|
|
2809
2514
|
},
|
|
2810
2515
|
|
|
2811
2516
|
preFilter: {
|
|
2812
|
-
|
|
2517
|
+
ATTR: function( match ) {
|
|
2813
2518
|
match[ 1 ] = match[ 1 ].replace( runescape, funescape );
|
|
2814
2519
|
|
|
2815
2520
|
// Move the given value to match[3] whether quoted or unquoted
|
|
2816
|
-
match[ 3 ] = ( match[ 3 ] || match[ 4 ] ||
|
|
2817
|
-
|
|
2521
|
+
match[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || "" )
|
|
2522
|
+
.replace( runescape, funescape );
|
|
2818
2523
|
|
|
2819
2524
|
if ( match[ 2 ] === "~=" ) {
|
|
2820
2525
|
match[ 3 ] = " " + match[ 3 ] + " ";
|
|
@@ -2823,7 +2528,7 @@ Expr = Sizzle.selectors = {
|
|
|
2823
2528
|
return match.slice( 0, 4 );
|
|
2824
2529
|
},
|
|
2825
2530
|
|
|
2826
|
-
|
|
2531
|
+
CHILD: function( match ) {
|
|
2827
2532
|
|
|
2828
2533
|
/* matches from matchExpr["CHILD"]
|
|
2829
2534
|
1 type (only|nth|...)
|
|
@@ -2841,29 +2546,30 @@ Expr = Sizzle.selectors = {
|
|
|
2841
2546
|
|
|
2842
2547
|
// nth-* requires argument
|
|
2843
2548
|
if ( !match[ 3 ] ) {
|
|
2844
|
-
|
|
2549
|
+
find.error( match[ 0 ] );
|
|
2845
2550
|
}
|
|
2846
2551
|
|
|
2847
2552
|
// numeric x and y parameters for Expr.filter.CHILD
|
|
2848
2553
|
// remember that false/true cast respectively to 0/1
|
|
2849
2554
|
match[ 4 ] = +( match[ 4 ] ?
|
|
2850
2555
|
match[ 5 ] + ( match[ 6 ] || 1 ) :
|
|
2851
|
-
2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" )
|
|
2556
|
+
2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" )
|
|
2557
|
+
);
|
|
2852
2558
|
match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" );
|
|
2853
2559
|
|
|
2854
|
-
|
|
2560
|
+
// other types prohibit arguments
|
|
2855
2561
|
} else if ( match[ 3 ] ) {
|
|
2856
|
-
|
|
2562
|
+
find.error( match[ 0 ] );
|
|
2857
2563
|
}
|
|
2858
2564
|
|
|
2859
2565
|
return match;
|
|
2860
2566
|
},
|
|
2861
2567
|
|
|
2862
|
-
|
|
2568
|
+
PSEUDO: function( match ) {
|
|
2863
2569
|
var excess,
|
|
2864
2570
|
unquoted = !match[ 6 ] && match[ 2 ];
|
|
2865
2571
|
|
|
2866
|
-
if ( matchExpr
|
|
2572
|
+
if ( matchExpr.CHILD.test( match[ 0 ] ) ) {
|
|
2867
2573
|
return null;
|
|
2868
2574
|
}
|
|
2869
2575
|
|
|
@@ -2892,36 +2598,36 @@ Expr = Sizzle.selectors = {
|
|
|
2892
2598
|
|
|
2893
2599
|
filter: {
|
|
2894
2600
|
|
|
2895
|
-
|
|
2896
|
-
var
|
|
2601
|
+
TAG: function( nodeNameSelector ) {
|
|
2602
|
+
var expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
|
|
2897
2603
|
return nodeNameSelector === "*" ?
|
|
2898
2604
|
function() {
|
|
2899
2605
|
return true;
|
|
2900
2606
|
} :
|
|
2901
2607
|
function( elem ) {
|
|
2902
|
-
return
|
|
2608
|
+
return nodeName( elem, expectedNodeName );
|
|
2903
2609
|
};
|
|
2904
2610
|
},
|
|
2905
2611
|
|
|
2906
|
-
|
|
2612
|
+
CLASS: function( className ) {
|
|
2907
2613
|
var pattern = classCache[ className + " " ];
|
|
2908
2614
|
|
|
2909
2615
|
return pattern ||
|
|
2910
|
-
( pattern = new RegExp( "(^|" + whitespace +
|
|
2911
|
-
"
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2616
|
+
( pattern = new RegExp( "(^|" + whitespace + ")" + className +
|
|
2617
|
+
"(" + whitespace + "|$)" ) ) &&
|
|
2618
|
+
classCache( className, function( elem ) {
|
|
2619
|
+
return pattern.test(
|
|
2620
|
+
typeof elem.className === "string" && elem.className ||
|
|
2621
|
+
typeof elem.getAttribute !== "undefined" &&
|
|
2622
|
+
elem.getAttribute( "class" ) ||
|
|
2623
|
+
""
|
|
2624
|
+
);
|
|
2919
2625
|
} );
|
|
2920
2626
|
},
|
|
2921
2627
|
|
|
2922
|
-
|
|
2628
|
+
ATTR: function( name, operator, check ) {
|
|
2923
2629
|
return function( elem ) {
|
|
2924
|
-
var result =
|
|
2630
|
+
var result = find.attr( elem, name );
|
|
2925
2631
|
|
|
2926
2632
|
if ( result == null ) {
|
|
2927
2633
|
return operator === "!=";
|
|
@@ -2932,22 +2638,34 @@ Expr = Sizzle.selectors = {
|
|
|
2932
2638
|
|
|
2933
2639
|
result += "";
|
|
2934
2640
|
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2641
|
+
if ( operator === "=" ) {
|
|
2642
|
+
return result === check;
|
|
2643
|
+
}
|
|
2644
|
+
if ( operator === "!=" ) {
|
|
2645
|
+
return result !== check;
|
|
2646
|
+
}
|
|
2647
|
+
if ( operator === "^=" ) {
|
|
2648
|
+
return check && result.indexOf( check ) === 0;
|
|
2649
|
+
}
|
|
2650
|
+
if ( operator === "*=" ) {
|
|
2651
|
+
return check && result.indexOf( check ) > -1;
|
|
2652
|
+
}
|
|
2653
|
+
if ( operator === "$=" ) {
|
|
2654
|
+
return check && result.slice( -check.length ) === check;
|
|
2655
|
+
}
|
|
2656
|
+
if ( operator === "~=" ) {
|
|
2657
|
+
return ( " " + result.replace( rwhitespace, " " ) + " " )
|
|
2658
|
+
.indexOf( check ) > -1;
|
|
2659
|
+
}
|
|
2660
|
+
if ( operator === "|=" ) {
|
|
2661
|
+
return result === check || result.slice( 0, check.length + 1 ) === check + "-";
|
|
2662
|
+
}
|
|
2946
2663
|
|
|
2664
|
+
return false;
|
|
2947
2665
|
};
|
|
2948
2666
|
},
|
|
2949
2667
|
|
|
2950
|
-
|
|
2668
|
+
CHILD: function( type, what, _argument, first, last ) {
|
|
2951
2669
|
var simple = type.slice( 0, 3 ) !== "nth",
|
|
2952
2670
|
forward = type.slice( -4 ) !== "last",
|
|
2953
2671
|
ofType = what === "of-type";
|
|
@@ -2960,7 +2678,7 @@ Expr = Sizzle.selectors = {
|
|
|
2960
2678
|
} :
|
|
2961
2679
|
|
|
2962
2680
|
function( elem, _context, xml ) {
|
|
2963
|
-
var cache,
|
|
2681
|
+
var cache, outerCache, node, nodeIndex, start,
|
|
2964
2682
|
dir = simple !== forward ? "nextSibling" : "previousSibling",
|
|
2965
2683
|
parent = elem.parentNode,
|
|
2966
2684
|
name = ofType && elem.nodeName.toLowerCase(),
|
|
@@ -2975,7 +2693,7 @@ Expr = Sizzle.selectors = {
|
|
|
2975
2693
|
node = elem;
|
|
2976
2694
|
while ( ( node = node[ dir ] ) ) {
|
|
2977
2695
|
if ( ofType ?
|
|
2978
|
-
|
|
2696
|
+
nodeName( node, name ) :
|
|
2979
2697
|
node.nodeType === 1 ) {
|
|
2980
2698
|
|
|
2981
2699
|
return false;
|
|
@@ -2994,17 +2712,8 @@ Expr = Sizzle.selectors = {
|
|
|
2994
2712
|
if ( forward && useCache ) {
|
|
2995
2713
|
|
|
2996
2714
|
// Seek `elem` from a previously-cached index
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
node = parent;
|
|
3000
|
-
outerCache = node[ expando ] || ( node[ expando ] = {} );
|
|
3001
|
-
|
|
3002
|
-
// Support: IE <9 only
|
|
3003
|
-
// Defend against cloned attroperties (jQuery gh-1709)
|
|
3004
|
-
uniqueCache = outerCache[ node.uniqueID ] ||
|
|
3005
|
-
( outerCache[ node.uniqueID ] = {} );
|
|
3006
|
-
|
|
3007
|
-
cache = uniqueCache[ type ] || [];
|
|
2715
|
+
outerCache = parent[ expando ] || ( parent[ expando ] = {} );
|
|
2716
|
+
cache = outerCache[ type ] || [];
|
|
3008
2717
|
nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
|
|
3009
2718
|
diff = nodeIndex && cache[ 2 ];
|
|
3010
2719
|
node = nodeIndex && parent.childNodes[ nodeIndex ];
|
|
@@ -3016,7 +2725,7 @@ Expr = Sizzle.selectors = {
|
|
|
3016
2725
|
|
|
3017
2726
|
// When found, cache indexes on `parent` and break
|
|
3018
2727
|
if ( node.nodeType === 1 && ++diff && node === elem ) {
|
|
3019
|
-
|
|
2728
|
+
outerCache[ type ] = [ dirruns, nodeIndex, diff ];
|
|
3020
2729
|
break;
|
|
3021
2730
|
}
|
|
3022
2731
|
}
|
|
@@ -3025,17 +2734,8 @@ Expr = Sizzle.selectors = {
|
|
|
3025
2734
|
|
|
3026
2735
|
// Use previously-cached element index if available
|
|
3027
2736
|
if ( useCache ) {
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
node = elem;
|
|
3031
|
-
outerCache = node[ expando ] || ( node[ expando ] = {} );
|
|
3032
|
-
|
|
3033
|
-
// Support: IE <9 only
|
|
3034
|
-
// Defend against cloned attroperties (jQuery gh-1709)
|
|
3035
|
-
uniqueCache = outerCache[ node.uniqueID ] ||
|
|
3036
|
-
( outerCache[ node.uniqueID ] = {} );
|
|
3037
|
-
|
|
3038
|
-
cache = uniqueCache[ type ] || [];
|
|
2737
|
+
outerCache = elem[ expando ] || ( elem[ expando ] = {} );
|
|
2738
|
+
cache = outerCache[ type ] || [];
|
|
3039
2739
|
nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
|
|
3040
2740
|
diff = nodeIndex;
|
|
3041
2741
|
}
|
|
@@ -3049,7 +2749,7 @@ Expr = Sizzle.selectors = {
|
|
|
3049
2749
|
( diff = nodeIndex = 0 ) || start.pop() ) ) {
|
|
3050
2750
|
|
|
3051
2751
|
if ( ( ofType ?
|
|
3052
|
-
|
|
2752
|
+
nodeName( node, name ) :
|
|
3053
2753
|
node.nodeType === 1 ) &&
|
|
3054
2754
|
++diff ) {
|
|
3055
2755
|
|
|
@@ -3057,13 +2757,7 @@ Expr = Sizzle.selectors = {
|
|
|
3057
2757
|
if ( useCache ) {
|
|
3058
2758
|
outerCache = node[ expando ] ||
|
|
3059
2759
|
( node[ expando ] = {} );
|
|
3060
|
-
|
|
3061
|
-
// Support: IE <9 only
|
|
3062
|
-
// Defend against cloned attroperties (jQuery gh-1709)
|
|
3063
|
-
uniqueCache = outerCache[ node.uniqueID ] ||
|
|
3064
|
-
( outerCache[ node.uniqueID ] = {} );
|
|
3065
|
-
|
|
3066
|
-
uniqueCache[ type ] = [ dirruns, diff ];
|
|
2760
|
+
outerCache[ type ] = [ dirruns, diff ];
|
|
3067
2761
|
}
|
|
3068
2762
|
|
|
3069
2763
|
if ( node === elem ) {
|
|
@@ -3081,19 +2775,19 @@ Expr = Sizzle.selectors = {
|
|
|
3081
2775
|
};
|
|
3082
2776
|
},
|
|
3083
2777
|
|
|
3084
|
-
|
|
2778
|
+
PSEUDO: function( pseudo, argument ) {
|
|
3085
2779
|
|
|
3086
2780
|
// pseudo-class names are case-insensitive
|
|
3087
|
-
//
|
|
2781
|
+
// https://www.w3.org/TR/selectors/#pseudo-classes
|
|
3088
2782
|
// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
|
|
3089
2783
|
// Remember that setFilters inherits from pseudos
|
|
3090
2784
|
var args,
|
|
3091
2785
|
fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
|
|
3092
|
-
|
|
2786
|
+
find.error( "unsupported pseudo: " + pseudo );
|
|
3093
2787
|
|
|
3094
2788
|
// The user may use createPseudo to indicate that
|
|
3095
2789
|
// arguments are needed to create the filter function
|
|
3096
|
-
// just as
|
|
2790
|
+
// just as jQuery does
|
|
3097
2791
|
if ( fn[ expando ] ) {
|
|
3098
2792
|
return fn( argument );
|
|
3099
2793
|
}
|
|
@@ -3107,7 +2801,7 @@ Expr = Sizzle.selectors = {
|
|
|
3107
2801
|
matched = fn( seed, argument ),
|
|
3108
2802
|
i = matched.length;
|
|
3109
2803
|
while ( i-- ) {
|
|
3110
|
-
idx = indexOf( seed, matched[ i ] );
|
|
2804
|
+
idx = indexOf.call( seed, matched[ i ] );
|
|
3111
2805
|
seed[ idx ] = !( matches[ idx ] = matched[ i ] );
|
|
3112
2806
|
}
|
|
3113
2807
|
} ) :
|
|
@@ -3123,14 +2817,14 @@ Expr = Sizzle.selectors = {
|
|
|
3123
2817
|
pseudos: {
|
|
3124
2818
|
|
|
3125
2819
|
// Potentially complex pseudos
|
|
3126
|
-
|
|
2820
|
+
not: markFunction( function( selector ) {
|
|
3127
2821
|
|
|
3128
2822
|
// Trim the selector passed to compile
|
|
3129
2823
|
// to avoid treating leading and trailing
|
|
3130
2824
|
// spaces as combinators
|
|
3131
2825
|
var input = [],
|
|
3132
2826
|
results = [],
|
|
3133
|
-
matcher = compile( selector.replace(
|
|
2827
|
+
matcher = compile( selector.replace( rtrimCSS, "$1" ) );
|
|
3134
2828
|
|
|
3135
2829
|
return matcher[ expando ] ?
|
|
3136
2830
|
markFunction( function( seed, matches, _context, xml ) {
|
|
@@ -3149,22 +2843,23 @@ Expr = Sizzle.selectors = {
|
|
|
3149
2843
|
input[ 0 ] = elem;
|
|
3150
2844
|
matcher( input, null, xml, results );
|
|
3151
2845
|
|
|
3152
|
-
// Don't keep the element
|
|
2846
|
+
// Don't keep the element
|
|
2847
|
+
// (see https://github.com/jquery/sizzle/issues/299)
|
|
3153
2848
|
input[ 0 ] = null;
|
|
3154
2849
|
return !results.pop();
|
|
3155
2850
|
};
|
|
3156
2851
|
} ),
|
|
3157
2852
|
|
|
3158
|
-
|
|
2853
|
+
has: markFunction( function( selector ) {
|
|
3159
2854
|
return function( elem ) {
|
|
3160
|
-
return
|
|
2855
|
+
return find( selector, elem ).length > 0;
|
|
3161
2856
|
};
|
|
3162
2857
|
} ),
|
|
3163
2858
|
|
|
3164
|
-
|
|
2859
|
+
contains: markFunction( function( text ) {
|
|
3165
2860
|
text = text.replace( runescape, funescape );
|
|
3166
2861
|
return function( elem ) {
|
|
3167
|
-
return ( elem.textContent ||
|
|
2862
|
+
return ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1;
|
|
3168
2863
|
};
|
|
3169
2864
|
} ),
|
|
3170
2865
|
|
|
@@ -3174,12 +2869,12 @@ Expr = Sizzle.selectors = {
|
|
|
3174
2869
|
// or beginning with the identifier C immediately followed by "-".
|
|
3175
2870
|
// The matching of C against the element's language value is performed case-insensitively.
|
|
3176
2871
|
// The identifier C does not have to be a valid language name."
|
|
3177
|
-
//
|
|
3178
|
-
|
|
2872
|
+
// https://www.w3.org/TR/selectors/#lang-pseudo
|
|
2873
|
+
lang: markFunction( function( lang ) {
|
|
3179
2874
|
|
|
3180
2875
|
// lang value must be a valid identifier
|
|
3181
2876
|
if ( !ridentifier.test( lang || "" ) ) {
|
|
3182
|
-
|
|
2877
|
+
find.error( "unsupported lang: " + lang );
|
|
3183
2878
|
}
|
|
3184
2879
|
lang = lang.replace( runescape, funescape ).toLowerCase();
|
|
3185
2880
|
return function( elem ) {
|
|
@@ -3198,43 +2893,42 @@ Expr = Sizzle.selectors = {
|
|
|
3198
2893
|
} ),
|
|
3199
2894
|
|
|
3200
2895
|
// Miscellaneous
|
|
3201
|
-
|
|
2896
|
+
target: function( elem ) {
|
|
3202
2897
|
var hash = window.location && window.location.hash;
|
|
3203
2898
|
return hash && hash.slice( 1 ) === elem.id;
|
|
3204
2899
|
},
|
|
3205
2900
|
|
|
3206
|
-
|
|
3207
|
-
return elem ===
|
|
2901
|
+
root: function( elem ) {
|
|
2902
|
+
return elem === documentElement;
|
|
3208
2903
|
},
|
|
3209
2904
|
|
|
3210
|
-
|
|
3211
|
-
return elem ===
|
|
3212
|
-
|
|
2905
|
+
focus: function( elem ) {
|
|
2906
|
+
return elem === safeActiveElement() &&
|
|
2907
|
+
document.hasFocus() &&
|
|
3213
2908
|
!!( elem.type || elem.href || ~elem.tabIndex );
|
|
3214
2909
|
},
|
|
3215
2910
|
|
|
3216
2911
|
// Boolean properties
|
|
3217
|
-
|
|
3218
|
-
|
|
2912
|
+
enabled: createDisabledPseudo( false ),
|
|
2913
|
+
disabled: createDisabledPseudo( true ),
|
|
3219
2914
|
|
|
3220
|
-
|
|
2915
|
+
checked: function( elem ) {
|
|
3221
2916
|
|
|
3222
2917
|
// In CSS3, :checked should return both checked and selected elements
|
|
3223
|
-
//
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
( nodeName === "option" && !!elem.selected );
|
|
2918
|
+
// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
|
|
2919
|
+
return ( nodeName( elem, "input" ) && !!elem.checked ) ||
|
|
2920
|
+
( nodeName( elem, "option" ) && !!elem.selected );
|
|
3227
2921
|
},
|
|
3228
2922
|
|
|
3229
|
-
|
|
2923
|
+
selected: function( elem ) {
|
|
3230
2924
|
|
|
3231
2925
|
return elem.selected === true;
|
|
3232
2926
|
},
|
|
3233
2927
|
|
|
3234
2928
|
// Contents
|
|
3235
|
-
|
|
2929
|
+
empty: function( elem ) {
|
|
3236
2930
|
|
|
3237
|
-
//
|
|
2931
|
+
// https://www.w3.org/TR/selectors/#empty-pseudo
|
|
3238
2932
|
// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
|
|
3239
2933
|
// but not by others (comment: 8; processing instruction: 7; etc.)
|
|
3240
2934
|
// nodeType < 6 works because attributes (2) do not appear as children
|
|
@@ -3246,49 +2940,49 @@ Expr = Sizzle.selectors = {
|
|
|
3246
2940
|
return true;
|
|
3247
2941
|
},
|
|
3248
2942
|
|
|
3249
|
-
|
|
3250
|
-
return !Expr.pseudos
|
|
2943
|
+
parent: function( elem ) {
|
|
2944
|
+
return !Expr.pseudos.empty( elem );
|
|
3251
2945
|
},
|
|
3252
2946
|
|
|
3253
2947
|
// Element/input types
|
|
3254
|
-
|
|
2948
|
+
header: function( elem ) {
|
|
3255
2949
|
return rheader.test( elem.nodeName );
|
|
3256
2950
|
},
|
|
3257
2951
|
|
|
3258
|
-
|
|
2952
|
+
input: function( elem ) {
|
|
3259
2953
|
return rinputs.test( elem.nodeName );
|
|
3260
2954
|
},
|
|
3261
2955
|
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
2956
|
+
button: function( elem ) {
|
|
2957
|
+
return nodeName( elem, "input" ) && elem.type === "button" ||
|
|
2958
|
+
nodeName( elem, "button" );
|
|
3265
2959
|
},
|
|
3266
2960
|
|
|
3267
|
-
|
|
2961
|
+
text: function( elem ) {
|
|
3268
2962
|
var attr;
|
|
3269
|
-
return
|
|
3270
|
-
elem.type === "text" &&
|
|
2963
|
+
return nodeName( elem, "input" ) && elem.type === "text" &&
|
|
3271
2964
|
|
|
3272
2965
|
// Support: IE <10 only
|
|
3273
|
-
// New HTML5 attribute values (e.g., "search") appear
|
|
2966
|
+
// New HTML5 attribute values (e.g., "search") appear
|
|
2967
|
+
// with elem.type === "text"
|
|
3274
2968
|
( ( attr = elem.getAttribute( "type" ) ) == null ||
|
|
3275
2969
|
attr.toLowerCase() === "text" );
|
|
3276
2970
|
},
|
|
3277
2971
|
|
|
3278
2972
|
// Position-in-collection
|
|
3279
|
-
|
|
2973
|
+
first: createPositionalPseudo( function() {
|
|
3280
2974
|
return [ 0 ];
|
|
3281
2975
|
} ),
|
|
3282
2976
|
|
|
3283
|
-
|
|
2977
|
+
last: createPositionalPseudo( function( _matchIndexes, length ) {
|
|
3284
2978
|
return [ length - 1 ];
|
|
3285
2979
|
} ),
|
|
3286
2980
|
|
|
3287
|
-
|
|
2981
|
+
eq: createPositionalPseudo( function( _matchIndexes, length, argument ) {
|
|
3288
2982
|
return [ argument < 0 ? argument + length : argument ];
|
|
3289
2983
|
} ),
|
|
3290
2984
|
|
|
3291
|
-
|
|
2985
|
+
even: createPositionalPseudo( function( matchIndexes, length ) {
|
|
3292
2986
|
var i = 0;
|
|
3293
2987
|
for ( ; i < length; i += 2 ) {
|
|
3294
2988
|
matchIndexes.push( i );
|
|
@@ -3296,7 +2990,7 @@ Expr = Sizzle.selectors = {
|
|
|
3296
2990
|
return matchIndexes;
|
|
3297
2991
|
} ),
|
|
3298
2992
|
|
|
3299
|
-
|
|
2993
|
+
odd: createPositionalPseudo( function( matchIndexes, length ) {
|
|
3300
2994
|
var i = 1;
|
|
3301
2995
|
for ( ; i < length; i += 2 ) {
|
|
3302
2996
|
matchIndexes.push( i );
|
|
@@ -3304,19 +2998,24 @@ Expr = Sizzle.selectors = {
|
|
|
3304
2998
|
return matchIndexes;
|
|
3305
2999
|
} ),
|
|
3306
3000
|
|
|
3307
|
-
|
|
3308
|
-
var i
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3001
|
+
lt: createPositionalPseudo( function( matchIndexes, length, argument ) {
|
|
3002
|
+
var i;
|
|
3003
|
+
|
|
3004
|
+
if ( argument < 0 ) {
|
|
3005
|
+
i = argument + length;
|
|
3006
|
+
} else if ( argument > length ) {
|
|
3007
|
+
i = length;
|
|
3008
|
+
} else {
|
|
3009
|
+
i = argument;
|
|
3010
|
+
}
|
|
3011
|
+
|
|
3313
3012
|
for ( ; --i >= 0; ) {
|
|
3314
3013
|
matchIndexes.push( i );
|
|
3315
3014
|
}
|
|
3316
3015
|
return matchIndexes;
|
|
3317
3016
|
} ),
|
|
3318
3017
|
|
|
3319
|
-
|
|
3018
|
+
gt: createPositionalPseudo( function( matchIndexes, length, argument ) {
|
|
3320
3019
|
var i = argument < 0 ? argument + length : argument;
|
|
3321
3020
|
for ( ; ++i < length; ) {
|
|
3322
3021
|
matchIndexes.push( i );
|
|
@@ -3326,7 +3025,7 @@ Expr = Sizzle.selectors = {
|
|
|
3326
3025
|
}
|
|
3327
3026
|
};
|
|
3328
3027
|
|
|
3329
|
-
Expr.pseudos
|
|
3028
|
+
Expr.pseudos.nth = Expr.pseudos.eq;
|
|
3330
3029
|
|
|
3331
3030
|
// Add button/input type pseudos
|
|
3332
3031
|
for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
|
|
@@ -3341,7 +3040,7 @@ function setFilters() {}
|
|
|
3341
3040
|
setFilters.prototype = Expr.filters = Expr.pseudos;
|
|
3342
3041
|
Expr.setFilters = new setFilters();
|
|
3343
3042
|
|
|
3344
|
-
|
|
3043
|
+
function tokenize( selector, parseOnly ) {
|
|
3345
3044
|
var matched, match, tokens, type,
|
|
3346
3045
|
soFar, groups, preFilters,
|
|
3347
3046
|
cached = tokenCache[ selector + " " ];
|
|
@@ -3369,13 +3068,13 @@ tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
|
|
|
3369
3068
|
matched = false;
|
|
3370
3069
|
|
|
3371
3070
|
// Combinators
|
|
3372
|
-
if ( ( match =
|
|
3071
|
+
if ( ( match = rleadingCombinator.exec( soFar ) ) ) {
|
|
3373
3072
|
matched = match.shift();
|
|
3374
3073
|
tokens.push( {
|
|
3375
3074
|
value: matched,
|
|
3376
3075
|
|
|
3377
3076
|
// Cast descendant combinators to space
|
|
3378
|
-
type: match[ 0 ].replace(
|
|
3077
|
+
type: match[ 0 ].replace( rtrimCSS, " " )
|
|
3379
3078
|
} );
|
|
3380
3079
|
soFar = soFar.slice( matched.length );
|
|
3381
3080
|
}
|
|
@@ -3402,14 +3101,16 @@ tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
|
|
|
3402
3101
|
// Return the length of the invalid excess
|
|
3403
3102
|
// if we're just parsing
|
|
3404
3103
|
// Otherwise, throw an error or return tokens
|
|
3405
|
-
|
|
3406
|
-
soFar.length
|
|
3407
|
-
|
|
3408
|
-
Sizzle.error( selector ) :
|
|
3104
|
+
if ( parseOnly ) {
|
|
3105
|
+
return soFar.length;
|
|
3106
|
+
}
|
|
3409
3107
|
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3108
|
+
return soFar ?
|
|
3109
|
+
find.error( selector ) :
|
|
3110
|
+
|
|
3111
|
+
// Cache the tokens
|
|
3112
|
+
tokenCache( selector, groups ).slice( 0 );
|
|
3113
|
+
}
|
|
3413
3114
|
|
|
3414
3115
|
function toSelector( tokens ) {
|
|
3415
3116
|
var i = 0,
|
|
@@ -3442,7 +3143,7 @@ function addCombinator( matcher, combinator, base ) {
|
|
|
3442
3143
|
|
|
3443
3144
|
// Check against all ancestor/preceding elements
|
|
3444
3145
|
function( elem, context, xml ) {
|
|
3445
|
-
var oldCache,
|
|
3146
|
+
var oldCache, outerCache,
|
|
3446
3147
|
newCache = [ dirruns, doneName ];
|
|
3447
3148
|
|
|
3448
3149
|
// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
|
|
@@ -3459,14 +3160,9 @@ function addCombinator( matcher, combinator, base ) {
|
|
|
3459
3160
|
if ( elem.nodeType === 1 || checkNonElements ) {
|
|
3460
3161
|
outerCache = elem[ expando ] || ( elem[ expando ] = {} );
|
|
3461
3162
|
|
|
3462
|
-
|
|
3463
|
-
// Defend against cloned attroperties (jQuery gh-1709)
|
|
3464
|
-
uniqueCache = outerCache[ elem.uniqueID ] ||
|
|
3465
|
-
( outerCache[ elem.uniqueID ] = {} );
|
|
3466
|
-
|
|
3467
|
-
if ( skip && skip === elem.nodeName.toLowerCase() ) {
|
|
3163
|
+
if ( skip && nodeName( elem, skip ) ) {
|
|
3468
3164
|
elem = elem[ dir ] || elem;
|
|
3469
|
-
} else if ( ( oldCache =
|
|
3165
|
+
} else if ( ( oldCache = outerCache[ key ] ) &&
|
|
3470
3166
|
oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
|
|
3471
3167
|
|
|
3472
3168
|
// Assign to newCache so results back-propagate to previous elements
|
|
@@ -3474,7 +3170,7 @@ function addCombinator( matcher, combinator, base ) {
|
|
|
3474
3170
|
} else {
|
|
3475
3171
|
|
|
3476
3172
|
// Reuse newcache so results back-propagate to previous elements
|
|
3477
|
-
|
|
3173
|
+
outerCache[ key ] = newCache;
|
|
3478
3174
|
|
|
3479
3175
|
// A match means we're done; a fail means we have to keep checking
|
|
3480
3176
|
if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {
|
|
@@ -3506,7 +3202,7 @@ function multipleContexts( selector, contexts, results ) {
|
|
|
3506
3202
|
var i = 0,
|
|
3507
3203
|
len = contexts.length;
|
|
3508
3204
|
for ( ; i < len; i++ ) {
|
|
3509
|
-
|
|
3205
|
+
find( selector, contexts[ i ], results );
|
|
3510
3206
|
}
|
|
3511
3207
|
return results;
|
|
3512
3208
|
}
|
|
@@ -3540,38 +3236,37 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS
|
|
|
3540
3236
|
postFinder = setMatcher( postFinder, postSelector );
|
|
3541
3237
|
}
|
|
3542
3238
|
return markFunction( function( seed, results, context, xml ) {
|
|
3543
|
-
var temp, i, elem,
|
|
3239
|
+
var temp, i, elem, matcherOut,
|
|
3544
3240
|
preMap = [],
|
|
3545
3241
|
postMap = [],
|
|
3546
3242
|
preexisting = results.length,
|
|
3547
3243
|
|
|
3548
3244
|
// Get initial elements from seed or context
|
|
3549
|
-
elems = seed ||
|
|
3550
|
-
selector || "*",
|
|
3551
|
-
|
|
3552
|
-
[]
|
|
3553
|
-
),
|
|
3245
|
+
elems = seed ||
|
|
3246
|
+
multipleContexts( selector || "*",
|
|
3247
|
+
context.nodeType ? [ context ] : context, [] ),
|
|
3554
3248
|
|
|
3555
3249
|
// Prefilter to get matcher input, preserving a map for seed-results synchronization
|
|
3556
3250
|
matcherIn = preFilter && ( seed || !selector ) ?
|
|
3557
3251
|
condense( elems, preMap, preFilter, context, xml ) :
|
|
3558
|
-
elems
|
|
3252
|
+
elems;
|
|
3559
3253
|
|
|
3560
|
-
|
|
3254
|
+
if ( matcher ) {
|
|
3561
3255
|
|
|
3562
|
-
|
|
3563
|
-
|
|
3256
|
+
// If we have a postFinder, or filtered seed, or non-seed postFilter
|
|
3257
|
+
// or preexisting results,
|
|
3258
|
+
matcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
|
|
3564
3259
|
|
|
3565
|
-
|
|
3566
|
-
|
|
3260
|
+
// ...intermediate processing is necessary
|
|
3261
|
+
[] :
|
|
3567
3262
|
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
matcherIn;
|
|
3263
|
+
// ...otherwise use results directly
|
|
3264
|
+
results;
|
|
3571
3265
|
|
|
3572
|
-
|
|
3573
|
-
if ( matcher ) {
|
|
3266
|
+
// Find primary matches
|
|
3574
3267
|
matcher( matcherIn, matcherOut, context, xml );
|
|
3268
|
+
} else {
|
|
3269
|
+
matcherOut = matcherIn;
|
|
3575
3270
|
}
|
|
3576
3271
|
|
|
3577
3272
|
// Apply postFilter
|
|
@@ -3609,7 +3304,7 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS
|
|
|
3609
3304
|
i = matcherOut.length;
|
|
3610
3305
|
while ( i-- ) {
|
|
3611
3306
|
if ( ( elem = matcherOut[ i ] ) &&
|
|
3612
|
-
( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) {
|
|
3307
|
+
( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) {
|
|
3613
3308
|
|
|
3614
3309
|
seed[ temp ] = !( results[ temp ] = elem );
|
|
3615
3310
|
}
|
|
@@ -3644,15 +3339,21 @@ function matcherFromTokens( tokens ) {
|
|
|
3644
3339
|
return elem === checkContext;
|
|
3645
3340
|
}, implicitRelative, true ),
|
|
3646
3341
|
matchAnyContext = addCombinator( function( elem ) {
|
|
3647
|
-
return indexOf( checkContext, elem ) > -1;
|
|
3342
|
+
return indexOf.call( checkContext, elem ) > -1;
|
|
3648
3343
|
}, implicitRelative, true ),
|
|
3649
3344
|
matchers = [ function( elem, context, xml ) {
|
|
3650
|
-
|
|
3345
|
+
|
|
3346
|
+
// Support: IE 11+, Edge 17 - 18+
|
|
3347
|
+
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
|
|
3348
|
+
// two documents; shallow comparisons work.
|
|
3349
|
+
// eslint-disable-next-line eqeqeq
|
|
3350
|
+
var ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || (
|
|
3651
3351
|
( checkContext = context ).nodeType ?
|
|
3652
3352
|
matchContext( elem, context, xml ) :
|
|
3653
3353
|
matchAnyContext( elem, context, xml ) );
|
|
3654
3354
|
|
|
3655
|
-
// Avoid hanging onto element
|
|
3355
|
+
// Avoid hanging onto element
|
|
3356
|
+
// (see https://github.com/jquery/sizzle/issues/299)
|
|
3656
3357
|
checkContext = null;
|
|
3657
3358
|
return ret;
|
|
3658
3359
|
} ];
|
|
@@ -3677,11 +3378,10 @@ function matcherFromTokens( tokens ) {
|
|
|
3677
3378
|
i > 1 && elementMatcher( matchers ),
|
|
3678
3379
|
i > 1 && toSelector(
|
|
3679
3380
|
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
).replace( rtrim, "$1" ),
|
|
3381
|
+
// If the preceding token was a descendant combinator, insert an implicit any-element `*`
|
|
3382
|
+
tokens.slice( 0, i - 1 )
|
|
3383
|
+
.concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } )
|
|
3384
|
+
).replace( rtrimCSS, "$1" ),
|
|
3685
3385
|
matcher,
|
|
3686
3386
|
i < j && matcherFromTokens( tokens.slice( i, j ) ),
|
|
3687
3387
|
j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),
|
|
@@ -3707,7 +3407,7 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
|
|
3707
3407
|
contextBackup = outermostContext,
|
|
3708
3408
|
|
|
3709
3409
|
// We must always have either seed elements or outermost context
|
|
3710
|
-
elems = seed || byElement && Expr.find
|
|
3410
|
+
elems = seed || byElement && Expr.find.TAG( "*", outermost ),
|
|
3711
3411
|
|
|
3712
3412
|
// Use integer dirruns iff this is the outermost matcher
|
|
3713
3413
|
dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),
|
|
@@ -3723,8 +3423,9 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
|
|
3723
3423
|
}
|
|
3724
3424
|
|
|
3725
3425
|
// Add elements passing elementMatchers directly to results
|
|
3726
|
-
// Support:
|
|
3727
|
-
// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching
|
|
3426
|
+
// Support: iOS <=7 - 9 only
|
|
3427
|
+
// Tolerate NodeList properties (IE: "length"; Safari: <number>) matching
|
|
3428
|
+
// elements by id. (see trac-14142)
|
|
3728
3429
|
for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {
|
|
3729
3430
|
if ( byElement && elem ) {
|
|
3730
3431
|
j = 0;
|
|
@@ -3739,7 +3440,7 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
|
|
3739
3440
|
}
|
|
3740
3441
|
while ( ( matcher = elementMatchers[ j++ ] ) ) {
|
|
3741
3442
|
if ( matcher( elem, context || document, xml ) ) {
|
|
3742
|
-
|
|
3443
|
+
push.call( results, elem );
|
|
3743
3444
|
break;
|
|
3744
3445
|
}
|
|
3745
3446
|
}
|
|
@@ -3802,7 +3503,7 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
|
|
3802
3503
|
if ( outermost && !seed && setMatched.length > 0 &&
|
|
3803
3504
|
( matchedCount + setMatchers.length ) > 1 ) {
|
|
3804
3505
|
|
|
3805
|
-
|
|
3506
|
+
jQuery.uniqueSort( results );
|
|
3806
3507
|
}
|
|
3807
3508
|
}
|
|
3808
3509
|
|
|
@@ -3820,7 +3521,7 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
|
|
|
3820
3521
|
superMatcher;
|
|
3821
3522
|
}
|
|
3822
3523
|
|
|
3823
|
-
|
|
3524
|
+
function compile( selector, match /* Internal Use Only */ ) {
|
|
3824
3525
|
var i,
|
|
3825
3526
|
setMatchers = [],
|
|
3826
3527
|
elementMatchers = [],
|
|
@@ -3843,27 +3544,25 @@ compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
|
|
|
3843
3544
|
}
|
|
3844
3545
|
|
|
3845
3546
|
// Cache the compiled function
|
|
3846
|
-
cached = compilerCache(
|
|
3847
|
-
|
|
3848
|
-
matcherFromGroupMatchers( elementMatchers, setMatchers )
|
|
3849
|
-
);
|
|
3547
|
+
cached = compilerCache( selector,
|
|
3548
|
+
matcherFromGroupMatchers( elementMatchers, setMatchers ) );
|
|
3850
3549
|
|
|
3851
3550
|
// Save selector and tokenization
|
|
3852
3551
|
cached.selector = selector;
|
|
3853
3552
|
}
|
|
3854
3553
|
return cached;
|
|
3855
|
-
}
|
|
3554
|
+
}
|
|
3856
3555
|
|
|
3857
3556
|
/**
|
|
3858
|
-
* A low-level selection function that works with
|
|
3557
|
+
* A low-level selection function that works with jQuery's compiled
|
|
3859
3558
|
* selector functions
|
|
3860
3559
|
* @param {String|Function} selector A selector or a pre-compiled
|
|
3861
|
-
* selector function built with
|
|
3560
|
+
* selector function built with jQuery selector compile
|
|
3862
3561
|
* @param {Element} context
|
|
3863
3562
|
* @param {Array} [results]
|
|
3864
3563
|
* @param {Array} [seed] A set of elements to match against
|
|
3865
3564
|
*/
|
|
3866
|
-
|
|
3565
|
+
function select( selector, context, results, seed ) {
|
|
3867
3566
|
var i, tokens, token, type, find,
|
|
3868
3567
|
compiled = typeof selector === "function" && selector,
|
|
3869
3568
|
match = !seed && tokenize( ( selector = compiled.selector || selector ) );
|
|
@@ -3877,10 +3576,12 @@ select = Sizzle.select = function( selector, context, results, seed ) {
|
|
|
3877
3576
|
// Reduce context if the leading compound selector is an ID
|
|
3878
3577
|
tokens = match[ 0 ] = match[ 0 ].slice( 0 );
|
|
3879
3578
|
if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" &&
|
|
3880
|
-
|
|
3579
|
+
context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {
|
|
3881
3580
|
|
|
3882
|
-
context = ( Expr.find
|
|
3883
|
-
.replace( runescape, funescape ),
|
|
3581
|
+
context = ( Expr.find.ID(
|
|
3582
|
+
token.matches[ 0 ].replace( runescape, funescape ),
|
|
3583
|
+
context
|
|
3584
|
+
) || [] )[ 0 ];
|
|
3884
3585
|
if ( !context ) {
|
|
3885
3586
|
return results;
|
|
3886
3587
|
|
|
@@ -3893,7 +3594,7 @@ select = Sizzle.select = function( selector, context, results, seed ) {
|
|
|
3893
3594
|
}
|
|
3894
3595
|
|
|
3895
3596
|
// Fetch a seed set for right-to-left matching
|
|
3896
|
-
i = matchExpr
|
|
3597
|
+
i = matchExpr.needsContext.test( selector ) ? 0 : tokens.length;
|
|
3897
3598
|
while ( i-- ) {
|
|
3898
3599
|
token = tokens[ i ];
|
|
3899
3600
|
|
|
@@ -3906,8 +3607,8 @@ select = Sizzle.select = function( selector, context, results, seed ) {
|
|
|
3906
3607
|
// Search, expanding context for leading sibling combinators
|
|
3907
3608
|
if ( ( seed = find(
|
|
3908
3609
|
token.matches[ 0 ].replace( runescape, funescape ),
|
|
3909
|
-
rsibling.test( tokens[ 0 ].type ) &&
|
|
3910
|
-
context
|
|
3610
|
+
rsibling.test( tokens[ 0 ].type ) &&
|
|
3611
|
+
testContext( context.parentNode ) || context
|
|
3911
3612
|
) ) ) {
|
|
3912
3613
|
|
|
3913
3614
|
// If seed is empty or no tokens remain, we can return early
|
|
@@ -3934,21 +3635,18 @@ select = Sizzle.select = function( selector, context, results, seed ) {
|
|
|
3934
3635
|
!context || rsibling.test( selector ) && testContext( context.parentNode ) || context
|
|
3935
3636
|
);
|
|
3936
3637
|
return results;
|
|
3937
|
-
}
|
|
3638
|
+
}
|
|
3938
3639
|
|
|
3939
3640
|
// One-time assignments
|
|
3940
3641
|
|
|
3642
|
+
// Support: Android <=4.0 - 4.1+
|
|
3941
3643
|
// Sort stability
|
|
3942
3644
|
support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando;
|
|
3943
3645
|
|
|
3944
|
-
// Support: Chrome 14-35+
|
|
3945
|
-
// Always assume duplicates if they aren't passed to the comparison function
|
|
3946
|
-
support.detectDuplicates = !!hasDuplicate;
|
|
3947
|
-
|
|
3948
3646
|
// Initialize against the default document
|
|
3949
3647
|
setDocument();
|
|
3950
3648
|
|
|
3951
|
-
// Support:
|
|
3649
|
+
// Support: Android <=4.0 - 4.1+
|
|
3952
3650
|
// Detached nodes confoundingly follow *each other*
|
|
3953
3651
|
support.sortDetached = assert( function( el ) {
|
|
3954
3652
|
|
|
@@ -3956,68 +3654,29 @@ support.sortDetached = assert( function( el ) {
|
|
|
3956
3654
|
return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1;
|
|
3957
3655
|
} );
|
|
3958
3656
|
|
|
3959
|
-
|
|
3960
|
-
// Prevent attribute/property "interpolation"
|
|
3961
|
-
// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
|
|
3962
|
-
if ( !assert( function( el ) {
|
|
3963
|
-
el.innerHTML = "<a href='#'></a>";
|
|
3964
|
-
return el.firstChild.getAttribute( "href" ) === "#";
|
|
3965
|
-
} ) ) {
|
|
3966
|
-
addHandle( "type|href|height|width", function( elem, name, isXML ) {
|
|
3967
|
-
if ( !isXML ) {
|
|
3968
|
-
return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
|
|
3969
|
-
}
|
|
3970
|
-
} );
|
|
3971
|
-
}
|
|
3972
|
-
|
|
3973
|
-
// Support: IE<9
|
|
3974
|
-
// Use defaultValue in place of getAttribute("value")
|
|
3975
|
-
if ( !support.attributes || !assert( function( el ) {
|
|
3976
|
-
el.innerHTML = "<input/>";
|
|
3977
|
-
el.firstChild.setAttribute( "value", "" );
|
|
3978
|
-
return el.firstChild.getAttribute( "value" ) === "";
|
|
3979
|
-
} ) ) {
|
|
3980
|
-
addHandle( "value", function( elem, _name, isXML ) {
|
|
3981
|
-
if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
|
|
3982
|
-
return elem.defaultValue;
|
|
3983
|
-
}
|
|
3984
|
-
} );
|
|
3985
|
-
}
|
|
3986
|
-
|
|
3987
|
-
// Support: IE<9
|
|
3988
|
-
// Use getAttributeNode to fetch booleans when getAttribute lies
|
|
3989
|
-
if ( !assert( function( el ) {
|
|
3990
|
-
return el.getAttribute( "disabled" ) == null;
|
|
3991
|
-
} ) ) {
|
|
3992
|
-
addHandle( booleans, function( elem, name, isXML ) {
|
|
3993
|
-
var val;
|
|
3994
|
-
if ( !isXML ) {
|
|
3995
|
-
return elem[ name ] === true ? name.toLowerCase() :
|
|
3996
|
-
( val = elem.getAttributeNode( name ) ) && val.specified ?
|
|
3997
|
-
val.value :
|
|
3998
|
-
null;
|
|
3999
|
-
}
|
|
4000
|
-
} );
|
|
4001
|
-
}
|
|
4002
|
-
|
|
4003
|
-
return Sizzle;
|
|
4004
|
-
|
|
4005
|
-
} )( window );
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
jQuery.find = Sizzle;
|
|
4010
|
-
jQuery.expr = Sizzle.selectors;
|
|
3657
|
+
jQuery.find = find;
|
|
4011
3658
|
|
|
4012
3659
|
// Deprecated
|
|
4013
3660
|
jQuery.expr[ ":" ] = jQuery.expr.pseudos;
|
|
4014
|
-
jQuery.
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
3661
|
+
jQuery.unique = jQuery.uniqueSort;
|
|
3662
|
+
|
|
3663
|
+
// These have always been private, but they used to be documented as part of
|
|
3664
|
+
// Sizzle so let's maintain them for now for backwards compatibility purposes.
|
|
3665
|
+
find.compile = compile;
|
|
3666
|
+
find.select = select;
|
|
3667
|
+
find.setDocument = setDocument;
|
|
3668
|
+
find.tokenize = tokenize;
|
|
4019
3669
|
|
|
3670
|
+
find.escape = jQuery.escapeSelector;
|
|
3671
|
+
find.getText = jQuery.text;
|
|
3672
|
+
find.isXML = jQuery.isXMLDoc;
|
|
3673
|
+
find.selectors = jQuery.expr;
|
|
3674
|
+
find.support = jQuery.support;
|
|
3675
|
+
find.uniqueSort = jQuery.uniqueSort;
|
|
4020
3676
|
|
|
3677
|
+
/* eslint-enable */
|
|
3678
|
+
|
|
3679
|
+
} )();
|
|
4021
3680
|
|
|
4022
3681
|
|
|
4023
3682
|
var dir = function( elem, dir, until ) {
|
|
@@ -4051,13 +3710,6 @@ var siblings = function( n, elem ) {
|
|
|
4051
3710
|
|
|
4052
3711
|
var rneedsContext = jQuery.expr.match.needsContext;
|
|
4053
3712
|
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
function nodeName( elem, name ) {
|
|
4057
|
-
|
|
4058
|
-
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
|
4059
|
-
|
|
4060
|
-
}
|
|
4061
3713
|
var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
|
|
4062
3714
|
|
|
4063
3715
|
|
|
@@ -4308,7 +3960,7 @@ jQuery.fn.extend( {
|
|
|
4308
3960
|
if ( cur.nodeType < 11 && ( targets ?
|
|
4309
3961
|
targets.index( cur ) > -1 :
|
|
4310
3962
|
|
|
4311
|
-
// Don't pass non-elements to
|
|
3963
|
+
// Don't pass non-elements to jQuery#find
|
|
4312
3964
|
cur.nodeType === 1 &&
|
|
4313
3965
|
jQuery.find.matchesSelector( cur, selectors ) ) ) {
|
|
4314
3966
|
|
|
@@ -4863,7 +4515,7 @@ jQuery.extend( {
|
|
|
4863
4515
|
|
|
4864
4516
|
if ( jQuery.Deferred.exceptionHook ) {
|
|
4865
4517
|
jQuery.Deferred.exceptionHook( e,
|
|
4866
|
-
process.
|
|
4518
|
+
process.error );
|
|
4867
4519
|
}
|
|
4868
4520
|
|
|
4869
4521
|
// Support: Promises/A+ section 2.3.3.3.4.1
|
|
@@ -4891,10 +4543,17 @@ jQuery.extend( {
|
|
|
4891
4543
|
process();
|
|
4892
4544
|
} else {
|
|
4893
4545
|
|
|
4894
|
-
// Call an optional hook to record the
|
|
4546
|
+
// Call an optional hook to record the error, in case of exception
|
|
4895
4547
|
// since it's otherwise lost when execution goes async
|
|
4896
|
-
if ( jQuery.Deferred.
|
|
4897
|
-
process.
|
|
4548
|
+
if ( jQuery.Deferred.getErrorHook ) {
|
|
4549
|
+
process.error = jQuery.Deferred.getErrorHook();
|
|
4550
|
+
|
|
4551
|
+
// The deprecated alias of the above. While the name suggests
|
|
4552
|
+
// returning the stack, not an error instance, jQuery just passes
|
|
4553
|
+
// it directly to `console.warn` so both will work; an instance
|
|
4554
|
+
// just better cooperates with source maps.
|
|
4555
|
+
} else if ( jQuery.Deferred.getStackHook ) {
|
|
4556
|
+
process.error = jQuery.Deferred.getStackHook();
|
|
4898
4557
|
}
|
|
4899
4558
|
window.setTimeout( process );
|
|
4900
4559
|
}
|
|
@@ -5069,12 +4728,16 @@ jQuery.extend( {
|
|
|
5069
4728
|
// warn about them ASAP rather than swallowing them by default.
|
|
5070
4729
|
var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
|
|
5071
4730
|
|
|
5072
|
-
jQuery.Deferred.
|
|
4731
|
+
// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error
|
|
4732
|
+
// captured before the async barrier to get the original error cause
|
|
4733
|
+
// which may otherwise be hidden.
|
|
4734
|
+
jQuery.Deferred.exceptionHook = function( error, asyncError ) {
|
|
5073
4735
|
|
|
5074
4736
|
// Support: IE 8 - 9 only
|
|
5075
4737
|
// Console exists when dev tools are open, which can happen at any time
|
|
5076
4738
|
if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {
|
|
5077
|
-
window.console.warn( "jQuery.Deferred exception: " + error.message,
|
|
4739
|
+
window.console.warn( "jQuery.Deferred exception: " + error.message,
|
|
4740
|
+
error.stack, asyncError );
|
|
5078
4741
|
}
|
|
5079
4742
|
};
|
|
5080
4743
|
|
|
@@ -6130,25 +5793,6 @@ function returnFalse() {
|
|
|
6130
5793
|
return false;
|
|
6131
5794
|
}
|
|
6132
5795
|
|
|
6133
|
-
// Support: IE <=9 - 11+
|
|
6134
|
-
// focus() and blur() are asynchronous, except when they are no-op.
|
|
6135
|
-
// So expect focus to be synchronous when the element is already active,
|
|
6136
|
-
// and blur to be synchronous when the element is not already active.
|
|
6137
|
-
// (focus and blur are always synchronous in other supported browsers,
|
|
6138
|
-
// this just defines when we can count on it).
|
|
6139
|
-
function expectSync( elem, type ) {
|
|
6140
|
-
return ( elem === safeActiveElement() ) === ( type === "focus" );
|
|
6141
|
-
}
|
|
6142
|
-
|
|
6143
|
-
// Support: IE <=9 only
|
|
6144
|
-
// Accessing document.activeElement can throw unexpectedly
|
|
6145
|
-
// https://bugs.jquery.com/ticket/13393
|
|
6146
|
-
function safeActiveElement() {
|
|
6147
|
-
try {
|
|
6148
|
-
return document.activeElement;
|
|
6149
|
-
} catch ( err ) { }
|
|
6150
|
-
}
|
|
6151
|
-
|
|
6152
5796
|
function on( elem, types, selector, data, fn, one ) {
|
|
6153
5797
|
var origFn, type;
|
|
6154
5798
|
|
|
@@ -6586,7 +6230,7 @@ jQuery.event = {
|
|
|
6586
6230
|
el.click && nodeName( el, "input" ) ) {
|
|
6587
6231
|
|
|
6588
6232
|
// dataPriv.set( el, "click", ... )
|
|
6589
|
-
leverageNative( el, "click",
|
|
6233
|
+
leverageNative( el, "click", true );
|
|
6590
6234
|
}
|
|
6591
6235
|
|
|
6592
6236
|
// Return false to allow normal processing in the caller
|
|
@@ -6637,10 +6281,10 @@ jQuery.event = {
|
|
|
6637
6281
|
// synthetic events by interrupting progress until reinvoked in response to
|
|
6638
6282
|
// *native* events that it fires directly, ensuring that state changes have
|
|
6639
6283
|
// already occurred before other listeners are invoked.
|
|
6640
|
-
function leverageNative( el, type,
|
|
6284
|
+
function leverageNative( el, type, isSetup ) {
|
|
6641
6285
|
|
|
6642
|
-
// Missing
|
|
6643
|
-
if ( !
|
|
6286
|
+
// Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add
|
|
6287
|
+
if ( !isSetup ) {
|
|
6644
6288
|
if ( dataPriv.get( el, type ) === undefined ) {
|
|
6645
6289
|
jQuery.event.add( el, type, returnTrue );
|
|
6646
6290
|
}
|
|
@@ -6652,15 +6296,13 @@ function leverageNative( el, type, expectSync ) {
|
|
|
6652
6296
|
jQuery.event.add( el, type, {
|
|
6653
6297
|
namespace: false,
|
|
6654
6298
|
handler: function( event ) {
|
|
6655
|
-
var
|
|
6299
|
+
var result,
|
|
6656
6300
|
saved = dataPriv.get( this, type );
|
|
6657
6301
|
|
|
6658
6302
|
if ( ( event.isTrigger & 1 ) && this[ type ] ) {
|
|
6659
6303
|
|
|
6660
6304
|
// Interrupt processing of the outer synthetic .trigger()ed event
|
|
6661
|
-
|
|
6662
|
-
// from an async native handler (gh-4350)
|
|
6663
|
-
if ( !saved.length ) {
|
|
6305
|
+
if ( !saved ) {
|
|
6664
6306
|
|
|
6665
6307
|
// Store arguments for use when handling the inner native event
|
|
6666
6308
|
// There will always be at least one argument (an event object), so this array
|
|
@@ -6669,33 +6311,22 @@ function leverageNative( el, type, expectSync ) {
|
|
|
6669
6311
|
dataPriv.set( this, type, saved );
|
|
6670
6312
|
|
|
6671
6313
|
// Trigger the native event and capture its result
|
|
6672
|
-
// Support: IE <=9 - 11+
|
|
6673
|
-
// focus() and blur() are asynchronous
|
|
6674
|
-
notAsync = expectSync( this, type );
|
|
6675
6314
|
this[ type ]();
|
|
6676
6315
|
result = dataPriv.get( this, type );
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
} else {
|
|
6680
|
-
result = {};
|
|
6681
|
-
}
|
|
6316
|
+
dataPriv.set( this, type, false );
|
|
6317
|
+
|
|
6682
6318
|
if ( saved !== result ) {
|
|
6683
6319
|
|
|
6684
6320
|
// Cancel the outer synthetic event
|
|
6685
6321
|
event.stopImmediatePropagation();
|
|
6686
6322
|
event.preventDefault();
|
|
6687
6323
|
|
|
6688
|
-
|
|
6689
|
-
// In Chrome, if an element having a focusout handler is blurred by
|
|
6690
|
-
// clicking outside of it, it invokes the handler synchronously. If
|
|
6691
|
-
// that handler calls `.remove()` on the element, the data is cleared,
|
|
6692
|
-
// leaving `result` undefined. We need to guard against this.
|
|
6693
|
-
return result && result.value;
|
|
6324
|
+
return result;
|
|
6694
6325
|
}
|
|
6695
6326
|
|
|
6696
6327
|
// If this is an inner synthetic event for an event with a bubbling surrogate
|
|
6697
|
-
// (focus or blur), assume that the surrogate already propagated from triggering
|
|
6698
|
-
// native event and prevent that from happening again here.
|
|
6328
|
+
// (focus or blur), assume that the surrogate already propagated from triggering
|
|
6329
|
+
// the native event and prevent that from happening again here.
|
|
6699
6330
|
// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the
|
|
6700
6331
|
// bubbling surrogate propagates *after* the non-bubbling base), but that seems
|
|
6701
6332
|
// less bad than duplication.
|
|
@@ -6705,22 +6336,25 @@ function leverageNative( el, type, expectSync ) {
|
|
|
6705
6336
|
|
|
6706
6337
|
// If this is a native event triggered above, everything is now in order
|
|
6707
6338
|
// Fire an inner synthetic event with the original arguments
|
|
6708
|
-
} else if ( saved
|
|
6339
|
+
} else if ( saved ) {
|
|
6709
6340
|
|
|
6710
6341
|
// ...and capture the result
|
|
6711
|
-
dataPriv.set( this, type,
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
//
|
|
6723
|
-
|
|
6342
|
+
dataPriv.set( this, type, jQuery.event.trigger(
|
|
6343
|
+
saved[ 0 ],
|
|
6344
|
+
saved.slice( 1 ),
|
|
6345
|
+
this
|
|
6346
|
+
) );
|
|
6347
|
+
|
|
6348
|
+
// Abort handling of the native event by all jQuery handlers while allowing
|
|
6349
|
+
// native handlers on the same element to run. On target, this is achieved
|
|
6350
|
+
// by stopping immediate propagation just on the jQuery event. However,
|
|
6351
|
+
// the native event is re-wrapped by a jQuery one on each level of the
|
|
6352
|
+
// propagation so the only way to stop it for jQuery is to stop it for
|
|
6353
|
+
// everyone via native `stopPropagation()`. This is not a problem for
|
|
6354
|
+
// focus/blur which don't bubble, but it does also stop click on checkboxes
|
|
6355
|
+
// and radios. We accept this limitation.
|
|
6356
|
+
event.stopPropagation();
|
|
6357
|
+
event.isImmediatePropagationStopped = returnTrue;
|
|
6724
6358
|
}
|
|
6725
6359
|
}
|
|
6726
6360
|
} );
|
|
@@ -6859,18 +6493,73 @@ jQuery.each( {
|
|
|
6859
6493
|
}, jQuery.event.addProp );
|
|
6860
6494
|
|
|
6861
6495
|
jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {
|
|
6496
|
+
|
|
6497
|
+
function focusMappedHandler( nativeEvent ) {
|
|
6498
|
+
if ( document.documentMode ) {
|
|
6499
|
+
|
|
6500
|
+
// Support: IE 11+
|
|
6501
|
+
// Attach a single focusin/focusout handler on the document while someone wants
|
|
6502
|
+
// focus/blur. This is because the former are synchronous in IE while the latter
|
|
6503
|
+
// are async. In other browsers, all those handlers are invoked synchronously.
|
|
6504
|
+
|
|
6505
|
+
// `handle` from private data would already wrap the event, but we need
|
|
6506
|
+
// to change the `type` here.
|
|
6507
|
+
var handle = dataPriv.get( this, "handle" ),
|
|
6508
|
+
event = jQuery.event.fix( nativeEvent );
|
|
6509
|
+
event.type = nativeEvent.type === "focusin" ? "focus" : "blur";
|
|
6510
|
+
event.isSimulated = true;
|
|
6511
|
+
|
|
6512
|
+
// First, handle focusin/focusout
|
|
6513
|
+
handle( nativeEvent );
|
|
6514
|
+
|
|
6515
|
+
// ...then, handle focus/blur
|
|
6516
|
+
//
|
|
6517
|
+
// focus/blur don't bubble while focusin/focusout do; simulate the former by only
|
|
6518
|
+
// invoking the handler at the lower level.
|
|
6519
|
+
if ( event.target === event.currentTarget ) {
|
|
6520
|
+
|
|
6521
|
+
// The setup part calls `leverageNative`, which, in turn, calls
|
|
6522
|
+
// `jQuery.event.add`, so event handle will already have been set
|
|
6523
|
+
// by this point.
|
|
6524
|
+
handle( event );
|
|
6525
|
+
}
|
|
6526
|
+
} else {
|
|
6527
|
+
|
|
6528
|
+
// For non-IE browsers, attach a single capturing handler on the document
|
|
6529
|
+
// while someone wants focusin/focusout.
|
|
6530
|
+
jQuery.event.simulate( delegateType, nativeEvent.target,
|
|
6531
|
+
jQuery.event.fix( nativeEvent ) );
|
|
6532
|
+
}
|
|
6533
|
+
}
|
|
6534
|
+
|
|
6862
6535
|
jQuery.event.special[ type ] = {
|
|
6863
6536
|
|
|
6864
6537
|
// Utilize native event if possible so blur/focus sequence is correct
|
|
6865
6538
|
setup: function() {
|
|
6866
6539
|
|
|
6540
|
+
var attaches;
|
|
6541
|
+
|
|
6867
6542
|
// Claim the first handler
|
|
6868
6543
|
// dataPriv.set( this, "focus", ... )
|
|
6869
6544
|
// dataPriv.set( this, "blur", ... )
|
|
6870
|
-
leverageNative( this, type,
|
|
6545
|
+
leverageNative( this, type, true );
|
|
6871
6546
|
|
|
6872
|
-
|
|
6873
|
-
|
|
6547
|
+
if ( document.documentMode ) {
|
|
6548
|
+
|
|
6549
|
+
// Support: IE 9 - 11+
|
|
6550
|
+
// We use the same native handler for focusin & focus (and focusout & blur)
|
|
6551
|
+
// so we need to coordinate setup & teardown parts between those events.
|
|
6552
|
+
// Use `delegateType` as the key as `type` is already used by `leverageNative`.
|
|
6553
|
+
attaches = dataPriv.get( this, delegateType );
|
|
6554
|
+
if ( !attaches ) {
|
|
6555
|
+
this.addEventListener( delegateType, focusMappedHandler );
|
|
6556
|
+
}
|
|
6557
|
+
dataPriv.set( this, delegateType, ( attaches || 0 ) + 1 );
|
|
6558
|
+
} else {
|
|
6559
|
+
|
|
6560
|
+
// Return false to allow normal processing in the caller
|
|
6561
|
+
return false;
|
|
6562
|
+
}
|
|
6874
6563
|
},
|
|
6875
6564
|
trigger: function() {
|
|
6876
6565
|
|
|
@@ -6881,6 +6570,24 @@ jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateTyp
|
|
|
6881
6570
|
return true;
|
|
6882
6571
|
},
|
|
6883
6572
|
|
|
6573
|
+
teardown: function() {
|
|
6574
|
+
var attaches;
|
|
6575
|
+
|
|
6576
|
+
if ( document.documentMode ) {
|
|
6577
|
+
attaches = dataPriv.get( this, delegateType ) - 1;
|
|
6578
|
+
if ( !attaches ) {
|
|
6579
|
+
this.removeEventListener( delegateType, focusMappedHandler );
|
|
6580
|
+
dataPriv.remove( this, delegateType );
|
|
6581
|
+
} else {
|
|
6582
|
+
dataPriv.set( this, delegateType, attaches );
|
|
6583
|
+
}
|
|
6584
|
+
} else {
|
|
6585
|
+
|
|
6586
|
+
// Return false to indicate standard teardown should be applied
|
|
6587
|
+
return false;
|
|
6588
|
+
}
|
|
6589
|
+
},
|
|
6590
|
+
|
|
6884
6591
|
// Suppress native focus or blur if we're currently inside
|
|
6885
6592
|
// a leveraged native-event stack
|
|
6886
6593
|
_default: function( event ) {
|
|
@@ -6889,6 +6596,58 @@ jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateTyp
|
|
|
6889
6596
|
|
|
6890
6597
|
delegateType: delegateType
|
|
6891
6598
|
};
|
|
6599
|
+
|
|
6600
|
+
// Support: Firefox <=44
|
|
6601
|
+
// Firefox doesn't have focus(in | out) events
|
|
6602
|
+
// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
|
|
6603
|
+
//
|
|
6604
|
+
// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
|
|
6605
|
+
// focus(in | out) events fire after focus & blur events,
|
|
6606
|
+
// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
|
|
6607
|
+
// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
|
|
6608
|
+
//
|
|
6609
|
+
// Support: IE 9 - 11+
|
|
6610
|
+
// To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,
|
|
6611
|
+
// attach a single handler for both events in IE.
|
|
6612
|
+
jQuery.event.special[ delegateType ] = {
|
|
6613
|
+
setup: function() {
|
|
6614
|
+
|
|
6615
|
+
// Handle: regular nodes (via `this.ownerDocument`), window
|
|
6616
|
+
// (via `this.document`) & document (via `this`).
|
|
6617
|
+
var doc = this.ownerDocument || this.document || this,
|
|
6618
|
+
dataHolder = document.documentMode ? this : doc,
|
|
6619
|
+
attaches = dataPriv.get( dataHolder, delegateType );
|
|
6620
|
+
|
|
6621
|
+
// Support: IE 9 - 11+
|
|
6622
|
+
// We use the same native handler for focusin & focus (and focusout & blur)
|
|
6623
|
+
// so we need to coordinate setup & teardown parts between those events.
|
|
6624
|
+
// Use `delegateType` as the key as `type` is already used by `leverageNative`.
|
|
6625
|
+
if ( !attaches ) {
|
|
6626
|
+
if ( document.documentMode ) {
|
|
6627
|
+
this.addEventListener( delegateType, focusMappedHandler );
|
|
6628
|
+
} else {
|
|
6629
|
+
doc.addEventListener( type, focusMappedHandler, true );
|
|
6630
|
+
}
|
|
6631
|
+
}
|
|
6632
|
+
dataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 );
|
|
6633
|
+
},
|
|
6634
|
+
teardown: function() {
|
|
6635
|
+
var doc = this.ownerDocument || this.document || this,
|
|
6636
|
+
dataHolder = document.documentMode ? this : doc,
|
|
6637
|
+
attaches = dataPriv.get( dataHolder, delegateType ) - 1;
|
|
6638
|
+
|
|
6639
|
+
if ( !attaches ) {
|
|
6640
|
+
if ( document.documentMode ) {
|
|
6641
|
+
this.removeEventListener( delegateType, focusMappedHandler );
|
|
6642
|
+
} else {
|
|
6643
|
+
doc.removeEventListener( type, focusMappedHandler, true );
|
|
6644
|
+
}
|
|
6645
|
+
dataPriv.remove( dataHolder, delegateType );
|
|
6646
|
+
} else {
|
|
6647
|
+
dataPriv.set( dataHolder, delegateType, attaches );
|
|
6648
|
+
}
|
|
6649
|
+
}
|
|
6650
|
+
};
|
|
6892
6651
|
} );
|
|
6893
6652
|
|
|
6894
6653
|
// Create mouseenter/leave events using mouseover/out and event-time checks
|
|
@@ -7120,7 +6879,7 @@ function domManip( collection, args, callback, ignored ) {
|
|
|
7120
6879
|
if ( hasScripts ) {
|
|
7121
6880
|
doc = scripts[ scripts.length - 1 ].ownerDocument;
|
|
7122
6881
|
|
|
7123
|
-
//
|
|
6882
|
+
// Re-enable scripts
|
|
7124
6883
|
jQuery.map( scripts, restoreScript );
|
|
7125
6884
|
|
|
7126
6885
|
// Evaluate executable scripts on first document insertion
|
|
@@ -7191,7 +6950,8 @@ jQuery.extend( {
|
|
|
7191
6950
|
if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
|
|
7192
6951
|
!jQuery.isXMLDoc( elem ) ) {
|
|
7193
6952
|
|
|
7194
|
-
// We eschew
|
|
6953
|
+
// We eschew jQuery#find here for performance reasons:
|
|
6954
|
+
// https://jsperf.com/getall-vs-sizzle/2
|
|
7195
6955
|
destElements = getAll( clone );
|
|
7196
6956
|
srcElements = getAll( elem );
|
|
7197
6957
|
|
|
@@ -7467,15 +7227,6 @@ var swap = function( elem, options, callback ) {
|
|
|
7467
7227
|
|
|
7468
7228
|
var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
|
7469
7229
|
|
|
7470
|
-
var whitespace = "[\\x20\\t\\r\\n\\f]";
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
var rtrimCSS = new RegExp(
|
|
7474
|
-
"^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
|
|
7475
|
-
"g"
|
|
7476
|
-
);
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
7230
|
|
|
7480
7231
|
|
|
7481
7232
|
( function() {
|
|
@@ -7585,7 +7336,7 @@ var rtrimCSS = new RegExp(
|
|
|
7585
7336
|
trChild = document.createElement( "div" );
|
|
7586
7337
|
|
|
7587
7338
|
table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate";
|
|
7588
|
-
tr.style.cssText = "border:1px solid";
|
|
7339
|
+
tr.style.cssText = "box-sizing:content-box;border:1px solid";
|
|
7589
7340
|
|
|
7590
7341
|
// Support: Chrome 86+
|
|
7591
7342
|
// Height set through cssText does not get applied.
|
|
@@ -7597,7 +7348,7 @@ var rtrimCSS = new RegExp(
|
|
|
7597
7348
|
// In our bodyBackground.html iframe,
|
|
7598
7349
|
// display for all div elements is set to "inline",
|
|
7599
7350
|
// which causes a problem only in Android 8 Chrome 86.
|
|
7600
|
-
// Ensuring the div is display: block
|
|
7351
|
+
// Ensuring the div is `display: block`
|
|
7601
7352
|
// gets around this issue.
|
|
7602
7353
|
trChild.style.display = "block";
|
|
7603
7354
|
|
|
@@ -7784,7 +7535,8 @@ function setPositiveNumber( _elem, value, subtract ) {
|
|
|
7784
7535
|
function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
|
|
7785
7536
|
var i = dimension === "width" ? 1 : 0,
|
|
7786
7537
|
extra = 0,
|
|
7787
|
-
delta = 0
|
|
7538
|
+
delta = 0,
|
|
7539
|
+
marginDelta = 0;
|
|
7788
7540
|
|
|
7789
7541
|
// Adjustment may not be necessary
|
|
7790
7542
|
if ( box === ( isBorderBox ? "border" : "content" ) ) {
|
|
@@ -7794,8 +7546,10 @@ function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computed
|
|
|
7794
7546
|
for ( ; i < 4; i += 2 ) {
|
|
7795
7547
|
|
|
7796
7548
|
// Both box models exclude margin
|
|
7549
|
+
// Count margin delta separately to only add it after scroll gutter adjustment.
|
|
7550
|
+
// This is needed to make negative margins work with `outerHeight( true )` (gh-3982).
|
|
7797
7551
|
if ( box === "margin" ) {
|
|
7798
|
-
|
|
7552
|
+
marginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
|
|
7799
7553
|
}
|
|
7800
7554
|
|
|
7801
7555
|
// If we get here with a content-box, we're seeking "padding" or "border" or "margin"
|
|
@@ -7846,7 +7600,7 @@ function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computed
|
|
|
7846
7600
|
) ) || 0;
|
|
7847
7601
|
}
|
|
7848
7602
|
|
|
7849
|
-
return delta;
|
|
7603
|
+
return delta + marginDelta;
|
|
7850
7604
|
}
|
|
7851
7605
|
|
|
7852
7606
|
function getWidthOrHeight( elem, dimension, extra ) {
|
|
@@ -7944,26 +7698,35 @@ jQuery.extend( {
|
|
|
7944
7698
|
|
|
7945
7699
|
// Don't automatically add "px" to these possibly-unitless properties
|
|
7946
7700
|
cssNumber: {
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
|
|
7962
|
-
|
|
7963
|
-
|
|
7964
|
-
|
|
7965
|
-
|
|
7966
|
-
|
|
7701
|
+
animationIterationCount: true,
|
|
7702
|
+
aspectRatio: true,
|
|
7703
|
+
borderImageSlice: true,
|
|
7704
|
+
columnCount: true,
|
|
7705
|
+
flexGrow: true,
|
|
7706
|
+
flexShrink: true,
|
|
7707
|
+
fontWeight: true,
|
|
7708
|
+
gridArea: true,
|
|
7709
|
+
gridColumn: true,
|
|
7710
|
+
gridColumnEnd: true,
|
|
7711
|
+
gridColumnStart: true,
|
|
7712
|
+
gridRow: true,
|
|
7713
|
+
gridRowEnd: true,
|
|
7714
|
+
gridRowStart: true,
|
|
7715
|
+
lineHeight: true,
|
|
7716
|
+
opacity: true,
|
|
7717
|
+
order: true,
|
|
7718
|
+
orphans: true,
|
|
7719
|
+
scale: true,
|
|
7720
|
+
widows: true,
|
|
7721
|
+
zIndex: true,
|
|
7722
|
+
zoom: true,
|
|
7723
|
+
|
|
7724
|
+
// SVG-related
|
|
7725
|
+
fillOpacity: true,
|
|
7726
|
+
floodOpacity: true,
|
|
7727
|
+
stopOpacity: true,
|
|
7728
|
+
strokeMiterlimit: true,
|
|
7729
|
+
strokeOpacity: true
|
|
7967
7730
|
},
|
|
7968
7731
|
|
|
7969
7732
|
// Add in properties whose names you wish to fix before
|
|
@@ -9671,9 +9434,39 @@ jQuery.each( [ "radio", "checkbox" ], function() {
|
|
|
9671
9434
|
|
|
9672
9435
|
|
|
9673
9436
|
// Return jQuery for attributes-only inclusion
|
|
9437
|
+
var location = window.location;
|
|
9438
|
+
|
|
9439
|
+
var nonce = { guid: Date.now() };
|
|
9440
|
+
|
|
9441
|
+
var rquery = ( /\?/ );
|
|
9442
|
+
|
|
9443
|
+
|
|
9444
|
+
|
|
9445
|
+
// Cross-browser xml parsing
|
|
9446
|
+
jQuery.parseXML = function( data ) {
|
|
9447
|
+
var xml, parserErrorElem;
|
|
9448
|
+
if ( !data || typeof data !== "string" ) {
|
|
9449
|
+
return null;
|
|
9450
|
+
}
|
|
9674
9451
|
|
|
9452
|
+
// Support: IE 9 - 11 only
|
|
9453
|
+
// IE throws on parseFromString with invalid input.
|
|
9454
|
+
try {
|
|
9455
|
+
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
|
|
9456
|
+
} catch ( e ) {}
|
|
9675
9457
|
|
|
9676
|
-
|
|
9458
|
+
parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ];
|
|
9459
|
+
if ( !xml || parserErrorElem ) {
|
|
9460
|
+
jQuery.error( "Invalid XML: " + (
|
|
9461
|
+
parserErrorElem ?
|
|
9462
|
+
jQuery.map( parserErrorElem.childNodes, function( el ) {
|
|
9463
|
+
return el.textContent;
|
|
9464
|
+
} ).join( "\n" ) :
|
|
9465
|
+
data
|
|
9466
|
+
) );
|
|
9467
|
+
}
|
|
9468
|
+
return xml;
|
|
9469
|
+
};
|
|
9677
9470
|
|
|
9678
9471
|
|
|
9679
9472
|
var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
|
|
@@ -9861,85 +9654,6 @@ jQuery.fn.extend( {
|
|
|
9861
9654
|
} );
|
|
9862
9655
|
|
|
9863
9656
|
|
|
9864
|
-
// Support: Firefox <=44
|
|
9865
|
-
// Firefox doesn't have focus(in | out) events
|
|
9866
|
-
// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
|
|
9867
|
-
//
|
|
9868
|
-
// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
|
|
9869
|
-
// focus(in | out) events fire after focus & blur events,
|
|
9870
|
-
// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
|
|
9871
|
-
// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
|
|
9872
|
-
if ( !support.focusin ) {
|
|
9873
|
-
jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
|
|
9874
|
-
|
|
9875
|
-
// Attach a single capturing handler on the document while someone wants focusin/focusout
|
|
9876
|
-
var handler = function( event ) {
|
|
9877
|
-
jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
|
|
9878
|
-
};
|
|
9879
|
-
|
|
9880
|
-
jQuery.event.special[ fix ] = {
|
|
9881
|
-
setup: function() {
|
|
9882
|
-
|
|
9883
|
-
// Handle: regular nodes (via `this.ownerDocument`), window
|
|
9884
|
-
// (via `this.document`) & document (via `this`).
|
|
9885
|
-
var doc = this.ownerDocument || this.document || this,
|
|
9886
|
-
attaches = dataPriv.access( doc, fix );
|
|
9887
|
-
|
|
9888
|
-
if ( !attaches ) {
|
|
9889
|
-
doc.addEventListener( orig, handler, true );
|
|
9890
|
-
}
|
|
9891
|
-
dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
|
|
9892
|
-
},
|
|
9893
|
-
teardown: function() {
|
|
9894
|
-
var doc = this.ownerDocument || this.document || this,
|
|
9895
|
-
attaches = dataPriv.access( doc, fix ) - 1;
|
|
9896
|
-
|
|
9897
|
-
if ( !attaches ) {
|
|
9898
|
-
doc.removeEventListener( orig, handler, true );
|
|
9899
|
-
dataPriv.remove( doc, fix );
|
|
9900
|
-
|
|
9901
|
-
} else {
|
|
9902
|
-
dataPriv.access( doc, fix, attaches );
|
|
9903
|
-
}
|
|
9904
|
-
}
|
|
9905
|
-
};
|
|
9906
|
-
} );
|
|
9907
|
-
}
|
|
9908
|
-
var location = window.location;
|
|
9909
|
-
|
|
9910
|
-
var nonce = { guid: Date.now() };
|
|
9911
|
-
|
|
9912
|
-
var rquery = ( /\?/ );
|
|
9913
|
-
|
|
9914
|
-
|
|
9915
|
-
|
|
9916
|
-
// Cross-browser xml parsing
|
|
9917
|
-
jQuery.parseXML = function( data ) {
|
|
9918
|
-
var xml, parserErrorElem;
|
|
9919
|
-
if ( !data || typeof data !== "string" ) {
|
|
9920
|
-
return null;
|
|
9921
|
-
}
|
|
9922
|
-
|
|
9923
|
-
// Support: IE 9 - 11 only
|
|
9924
|
-
// IE throws on parseFromString with invalid input.
|
|
9925
|
-
try {
|
|
9926
|
-
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
|
|
9927
|
-
} catch ( e ) {}
|
|
9928
|
-
|
|
9929
|
-
parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ];
|
|
9930
|
-
if ( !xml || parserErrorElem ) {
|
|
9931
|
-
jQuery.error( "Invalid XML: " + (
|
|
9932
|
-
parserErrorElem ?
|
|
9933
|
-
jQuery.map( parserErrorElem.childNodes, function( el ) {
|
|
9934
|
-
return el.textContent;
|
|
9935
|
-
} ).join( "\n" ) :
|
|
9936
|
-
data
|
|
9937
|
-
) );
|
|
9938
|
-
}
|
|
9939
|
-
return xml;
|
|
9940
|
-
};
|
|
9941
|
-
|
|
9942
|
-
|
|
9943
9657
|
var
|
|
9944
9658
|
rbracket = /\[\]$/,
|
|
9945
9659
|
rCRLF = /\r?\n/g,
|
|
@@ -11784,7 +11498,9 @@ jQuery.fn.extend( {
|
|
|
11784
11498
|
},
|
|
11785
11499
|
|
|
11786
11500
|
hover: function( fnOver, fnOut ) {
|
|
11787
|
-
return this
|
|
11501
|
+
return this
|
|
11502
|
+
.on( "mouseenter", fnOver )
|
|
11503
|
+
.on( "mouseleave", fnOut || fnOver );
|
|
11788
11504
|
}
|
|
11789
11505
|
} );
|
|
11790
11506
|
|
|
@@ -21412,7 +21128,6 @@ var CFG_ATTRIBUTE;
|
|
|
21412
21128
|
CFG_ATTRIBUTE["SHOW_V_SCROLL"] = "ShowVScroll";
|
|
21413
21129
|
CFG_ATTRIBUTE["MID_WIDTH"] = "MidWidth";
|
|
21414
21130
|
CFG_ATTRIBUTE["RIGHT_WIDTH"] = "RightWidth";
|
|
21415
|
-
CFG_ATTRIBUTE["SCROLL_TOP"] = "ScrollTop";
|
|
21416
21131
|
})(CFG_ATTRIBUTE || (CFG_ATTRIBUTE = {}));
|
|
21417
21132
|
var URL;
|
|
21418
21133
|
(function (URL) {
|
|
@@ -21484,10 +21199,6 @@ var ATTRIBUTE$1;
|
|
|
21484
21199
|
ATTRIBUTE["ADDED"] = "Added";
|
|
21485
21200
|
ATTRIBUTE["FORMULA"] = "Formula";
|
|
21486
21201
|
ATTRIBUTE["FORMAT"] = "Format";
|
|
21487
|
-
ATTRIBUTE["SPAN"] = "Span";
|
|
21488
|
-
ATTRIBUTE["LANG"] = "Lang";
|
|
21489
|
-
ATTRIBUTE["GMT"] = "GMT";
|
|
21490
|
-
ATTRIBUTE["ACTIONS"] = "Actions";
|
|
21491
21202
|
})(ATTRIBUTE$1 || (ATTRIBUTE$1 = {}));
|
|
21492
21203
|
var DRAG_ITEM_TYPE;
|
|
21493
21204
|
(function (DRAG_ITEM_TYPE) {
|
|
@@ -21702,7 +21413,6 @@ var TableViewServiceImpl = /*#__PURE__*/function () {
|
|
|
21702
21413
|
this.gridChangesFormat = 'JSON';
|
|
21703
21414
|
this.searchCriterionMap = new Map();
|
|
21704
21415
|
this.visibleColumnList = [];
|
|
21705
|
-
this.disabledActionList = [];
|
|
21706
21416
|
this.grid = grid;
|
|
21707
21417
|
this.id = grid.id;
|
|
21708
21418
|
this.grid.Source.Upload.Format = this.gridChangesFormat;
|
|
@@ -21715,7 +21425,6 @@ var TableViewServiceImpl = /*#__PURE__*/function () {
|
|
|
21715
21425
|
} else {
|
|
21716
21426
|
this.clearSearchCriterionList(searchId);
|
|
21717
21427
|
}
|
|
21718
|
-
this.grid.searchCriterionList = Array.from(this.searchCriterionMap.values()).flat();
|
|
21719
21428
|
};
|
|
21720
21429
|
_proto.setCfgAttribute = function setCfgAttribute(attr, value) {
|
|
21721
21430
|
var attrList = attr.split(CTRL.DOT);
|
|
@@ -22101,7 +21810,7 @@ var TableViewServiceImpl = /*#__PURE__*/function () {
|
|
|
22101
21810
|
var filterContentTypeListJson = JSON.stringify(this.filterContentTypeList);
|
|
22102
21811
|
newData = this.setXmlPart(newData, "FilterContentTypeList='" + filterContentTypeListJson + "'", XML_TAG.PAGE_SETTINGS);
|
|
22103
21812
|
}
|
|
22104
|
-
newData = this.
|
|
21813
|
+
newData = this.setSearchCriterionLisXml(newData);
|
|
22105
21814
|
newData = this.setVisibleColumnListXml(newData);
|
|
22106
21815
|
return newData;
|
|
22107
21816
|
};
|
|
@@ -22122,7 +21831,7 @@ var TableViewServiceImpl = /*#__PURE__*/function () {
|
|
|
22122
21831
|
}
|
|
22123
21832
|
return xmlString;
|
|
22124
21833
|
};
|
|
22125
|
-
_proto.
|
|
21834
|
+
_proto.setSearchCriterionLisXml = function setSearchCriterionLisXml(data) {
|
|
22126
21835
|
var searchCriterionList = this.getSearchCriterionList();
|
|
22127
21836
|
if (searchCriterionList && searchCriterionList.length) {
|
|
22128
21837
|
var searchCriterionListJson = JSON.stringify(searchCriterionList);
|
|
@@ -22154,9 +21863,6 @@ var TableViewServiceImpl = /*#__PURE__*/function () {
|
|
|
22154
21863
|
}
|
|
22155
21864
|
}
|
|
22156
21865
|
};
|
|
22157
|
-
_proto.getNextCol = function getNextCol(col) {
|
|
22158
|
-
return this.grid.GetNextCol(col);
|
|
22159
|
-
};
|
|
22160
21866
|
_createClass(TableViewServiceImpl, [{
|
|
22161
21867
|
key: "columnList",
|
|
22162
21868
|
get: function get() {
|
|
@@ -22275,84 +21981,10 @@ var TableViewServiceImpl = /*#__PURE__*/function () {
|
|
|
22275
21981
|
get: function get() {
|
|
22276
21982
|
return this.grid.Source;
|
|
22277
21983
|
}
|
|
22278
|
-
}, {
|
|
22279
|
-
key: "linkItemId",
|
|
22280
|
-
get: function get() {
|
|
22281
|
-
return this.grid.linkItemId;
|
|
22282
|
-
},
|
|
22283
|
-
set: function set(id) {
|
|
22284
|
-
this.grid.linkItemId = id;
|
|
22285
|
-
}
|
|
22286
21984
|
}]);
|
|
22287
21985
|
return TableViewServiceImpl;
|
|
22288
21986
|
}();
|
|
22289
21987
|
|
|
22290
|
-
var TableViewOnCustomAjaxServiceImpl = /*#__PURE__*/function () {
|
|
22291
|
-
function TableViewOnCustomAjaxServiceImpl(ajaxService) {
|
|
22292
|
-
this.id = EVENT$1.ON_CUSTOM_AJAX;
|
|
22293
|
-
this.data = 'Data';
|
|
22294
|
-
this.dataRequestUrl = '/api/tableViewRequest/' + this.data;
|
|
22295
|
-
this.dataResultString = '<Grid><Body><B /></Body></Grid>';
|
|
22296
|
-
this.getRequest = 'Get';
|
|
22297
|
-
this.treeGrid = 'treegrid/';
|
|
22298
|
-
this.api = '/api/';
|
|
22299
|
-
this.cacheVersionParam = 'CacheVersion';
|
|
22300
|
-
this.ajaxService = ajaxService;
|
|
22301
|
-
}
|
|
22302
|
-
var _proto = TableViewOnCustomAjaxServiceImpl.prototype;
|
|
22303
|
-
_proto.process = function process(tableView, source, data, func) {
|
|
22304
|
-
var success = function success(ret) {
|
|
22305
|
-
return func(0, ret);
|
|
22306
|
-
};
|
|
22307
|
-
if (source.Url && source.Url.indexOf(this.dataRequestUrl) === 0) {
|
|
22308
|
-
success(this.dataResultString);
|
|
22309
|
-
return true;
|
|
22310
|
-
}
|
|
22311
|
-
var fail = function fail() {
|
|
22312
|
-
return func(0, '<Grid><IO / > <Body><B Pos="0" Count = "0" /> </Body></Grid>');
|
|
22313
|
-
};
|
|
22314
|
-
var url = source.Url;
|
|
22315
|
-
if (url.indexOf(this.api) !== 0) {
|
|
22316
|
-
url = this.getTreeGridFileUrl(tableView[this.cacheVersionParam], source);
|
|
22317
|
-
}
|
|
22318
|
-
if (source.Method === this.getRequest) {
|
|
22319
|
-
this.ajaxService.get(url, tableView.scope).then(success)["catch"](fail);
|
|
22320
|
-
} else {
|
|
22321
|
-
var formData = new FormData();
|
|
22322
|
-
formData.set(this.data, data);
|
|
22323
|
-
this.ajaxService.post(url, formData, tableView.scope).then(success)["catch"](fail);
|
|
22324
|
-
}
|
|
22325
|
-
return true;
|
|
22326
|
-
};
|
|
22327
|
-
_proto.getTreeGridFileUrl = function getTreeGridFileUrl(cacheVersion, source) {
|
|
22328
|
-
var url = source.Url;
|
|
22329
|
-
if (url[0] !== CTRL.SLASH) {
|
|
22330
|
-
if (url.indexOf(this.treeGrid) !== 0) {
|
|
22331
|
-
url = this.treeGrid + source.Url;
|
|
22332
|
-
}
|
|
22333
|
-
url = CTRL.SLASH + url;
|
|
22334
|
-
}
|
|
22335
|
-
if (url.indexOf(CTRL.QUESTION) === -1) {
|
|
22336
|
-
url += CTRL.QUESTION + this.cacheVersionParam + CTRL.EQUAL + cacheVersion;
|
|
22337
|
-
}
|
|
22338
|
-
return url;
|
|
22339
|
-
};
|
|
22340
|
-
return TableViewOnCustomAjaxServiceImpl;
|
|
22341
|
-
}();
|
|
22342
|
-
|
|
22343
|
-
var SERVICE = function SERVICE() {};
|
|
22344
|
-
SERVICE.LOCALE = 'LocaleService';
|
|
22345
|
-
SERVICE.LOCAL_STORAGE = 'LocalStorageService';
|
|
22346
|
-
SERVICE.COLUMN = 'ColumnService';
|
|
22347
|
-
SERVICE.GUID = 'GuidService';
|
|
22348
|
-
SERVICE.EVENT = 'EventService';
|
|
22349
|
-
SERVICE.IMAGE = 'ImageService';
|
|
22350
|
-
SERVICE.ITEM = 'ItemService';
|
|
22351
|
-
SERVICE.CONTENT_TYPE = 'ContentTypeService';
|
|
22352
|
-
SERVICE.LOOKUP_LIST_ITEM = 'LookupListItemService';
|
|
22353
|
-
SERVICE.ITEM_SELECT_DIALOG = 'ItemSelectDialogService';
|
|
22354
|
-
SERVICE.AJAX = 'AjaxService';
|
|
22355
|
-
|
|
22356
21988
|
var styles$5 = {"vitro-table-view":"_table-view_vitro-table-view_1tTs32D"};
|
|
22357
21989
|
|
|
22358
21990
|
var w$2 = window;
|
|
@@ -22424,22 +22056,6 @@ var TreeGrid = function TreeGrid(props) {
|
|
|
22424
22056
|
return [URL.API, controller, dataKey, props.listCode].join(CTRL.SLASH);
|
|
22425
22057
|
}
|
|
22426
22058
|
};
|
|
22427
|
-
var initOnCustomAjax = function initOnCustomAjax() {
|
|
22428
|
-
if (props.onCustomAjax) {
|
|
22429
|
-
var onCustomAjax = props.onCustomAjax;
|
|
22430
|
-
w$2.TGSetEvent(EVENT$1.ON_CUSTOM_AJAX, props.id, function (grid, source, data, func) {
|
|
22431
|
-
return onCustomAjax(grid, source, data, func);
|
|
22432
|
-
});
|
|
22433
|
-
} else if (props.container) {
|
|
22434
|
-
var ajaxService = props.container.get(SERVICE.AJAX);
|
|
22435
|
-
if (ajaxService) {
|
|
22436
|
-
var tableViewOnCustomAjaxService = new TableViewOnCustomAjaxServiceImpl(ajaxService);
|
|
22437
|
-
w$2.TGSetEvent(EVENT$1.ON_CUSTOM_AJAX, props.id, function (grid, source, data, func) {
|
|
22438
|
-
return tableViewOnCustomAjaxService.process(grid, source, data, func);
|
|
22439
|
-
});
|
|
22440
|
-
}
|
|
22441
|
-
}
|
|
22442
|
-
};
|
|
22443
22059
|
React.useEffect(function () {
|
|
22444
22060
|
if (prevGridIdRef.current) {
|
|
22445
22061
|
disposeTableViewById(prevGridIdRef.current);
|
|
@@ -22449,10 +22065,15 @@ var TreeGrid = function TreeGrid(props) {
|
|
|
22449
22065
|
w$2.TGSetEvent(EVENT$1.ON_LOADED, props.id, function (grid, next) {
|
|
22450
22066
|
return onGridLoaded(grid, next);
|
|
22451
22067
|
});
|
|
22452
|
-
w$2.TGSetEvent(EVENT$1.ON_INIT, props.id, function (grid) {
|
|
22068
|
+
w$2.TGSetEvent(EVENT$1.ON_INIT, props.id, function (grid, reload) {
|
|
22453
22069
|
return onGridInit(grid);
|
|
22454
22070
|
});
|
|
22455
|
-
|
|
22071
|
+
if (props.onCustomAjax) {
|
|
22072
|
+
var onCustomAjax = props.onCustomAjax;
|
|
22073
|
+
w$2.TGSetEvent(EVENT$1.ON_CUSTOM_AJAX, props.id, function (grid, source, data, func) {
|
|
22074
|
+
return onCustomAjax(grid, source, data, func);
|
|
22075
|
+
});
|
|
22076
|
+
}
|
|
22456
22077
|
}
|
|
22457
22078
|
if (w$2.TreeGrid) {
|
|
22458
22079
|
if (props.layout || props.data) {
|
|
@@ -22554,7 +22175,6 @@ var MicroFrontendServiceImpl = /*#__PURE__*/function () {
|
|
|
22554
22175
|
|
|
22555
22176
|
var styles$6 = {"vitro-micro-frontend":"_micro-frontend_vitro-micro-frontend_3PhlRuX"};
|
|
22556
22177
|
|
|
22557
|
-
var index = 1;
|
|
22558
22178
|
var MicroFrontend = React.forwardRef(function (props, ref) {
|
|
22559
22179
|
var _useState = React.useState(),
|
|
22560
22180
|
id = _useState[0],
|
|
@@ -22569,7 +22189,7 @@ var MicroFrontend = React.forwardRef(function (props, ref) {
|
|
|
22569
22189
|
if (props.data.containerId) {
|
|
22570
22190
|
setId(props.data.containerId);
|
|
22571
22191
|
} else {
|
|
22572
|
-
var containerId =
|
|
22192
|
+
var containerId = id ? id : getId(rootRef.current);
|
|
22573
22193
|
setId(containerId);
|
|
22574
22194
|
props.data.containerId = containerId;
|
|
22575
22195
|
}
|
|
@@ -23104,6 +22724,18 @@ var DropZone = React.forwardRef(function (props, ref) {
|
|
|
23104
22724
|
}, props.label)));
|
|
23105
22725
|
});
|
|
23106
22726
|
|
|
22727
|
+
var SERVICE = function SERVICE() {};
|
|
22728
|
+
SERVICE.LOCALE = 'LocaleService';
|
|
22729
|
+
SERVICE.LOCAL_STORAGE = 'LocalStorageService';
|
|
22730
|
+
SERVICE.COLUMN = 'ColumnService';
|
|
22731
|
+
SERVICE.GUID = 'GuidService';
|
|
22732
|
+
SERVICE.EVENT = 'EventService';
|
|
22733
|
+
SERVICE.IMAGE = 'ImageService';
|
|
22734
|
+
SERVICE.ITEM = 'ItemService';
|
|
22735
|
+
SERVICE.CONTENT_TYPE = 'ContentTypeService';
|
|
22736
|
+
SERVICE.LOOKUP_LIST_ITEM = 'LookupListItemService';
|
|
22737
|
+
SERVICE.ITEM_SELECT_DIALOG = 'ItemSelectDialogService';
|
|
22738
|
+
|
|
23107
22739
|
var styles$a = {"vitro-uploader":"_uploader_vitro-uploader_237vX7T","vitro-upload-container":"_uploader_vitro-upload-container_2ASGHSS","vitro-drop-zone":"_uploader_vitro-drop-zone_3w2dluc","vitro-progress-info":"_uploader_vitro-progress-info_J4BRjZ0","vitro-button-close":"_uploader_vitro-button-close_30As0AM","vitro-button-show":"_uploader_vitro-button-show_uUmWVJc","vitro-button-hide":"_uploader_vitro-button-hide_LYS1px9","vitro-hidden":"_uploader_vitro-hidden_12825pc","vitro-progress":"_uploader_vitro-progress_2NtaSj2","vitro-progress-bar":"_uploader_vitro-progress-bar_3YXLbbu"};
|
|
23108
22740
|
|
|
23109
22741
|
var $$2 = window.$;
|
|
@@ -56754,6 +56386,35 @@ var BootstrapAlert = Object.assign(Alert, {
|
|
|
56754
56386
|
Heading: AlertHeading
|
|
56755
56387
|
});
|
|
56756
56388
|
|
|
56389
|
+
const Button$1 = /*#__PURE__*/React.forwardRef(({
|
|
56390
|
+
as,
|
|
56391
|
+
bsPrefix,
|
|
56392
|
+
variant = 'primary',
|
|
56393
|
+
size,
|
|
56394
|
+
active = false,
|
|
56395
|
+
disabled = false,
|
|
56396
|
+
className,
|
|
56397
|
+
...props
|
|
56398
|
+
}, ref) => {
|
|
56399
|
+
const prefix = useBootstrapPrefix(bsPrefix, 'btn');
|
|
56400
|
+
const [buttonProps, {
|
|
56401
|
+
tagName
|
|
56402
|
+
}] = useButtonProps({
|
|
56403
|
+
tagName: as,
|
|
56404
|
+
disabled,
|
|
56405
|
+
...props
|
|
56406
|
+
});
|
|
56407
|
+
const Component = tagName;
|
|
56408
|
+
return /*#__PURE__*/jsxRuntime.jsx(Component, {
|
|
56409
|
+
...buttonProps,
|
|
56410
|
+
...props,
|
|
56411
|
+
ref: ref,
|
|
56412
|
+
disabled: disabled,
|
|
56413
|
+
className: classnames(className, prefix, active && 'active', variant && `${prefix}-${variant}`, size && `${prefix}-${size}`, props.href && disabled && 'disabled')
|
|
56414
|
+
});
|
|
56415
|
+
});
|
|
56416
|
+
Button$1.displayName = 'Button';
|
|
56417
|
+
|
|
56757
56418
|
const context = /*#__PURE__*/React.createContext(null);
|
|
56758
56419
|
context.displayName = 'CardHeaderContext';
|
|
56759
56420
|
|
|
@@ -60251,12 +59912,11 @@ var DialogComponent = function DialogComponent(props) {
|
|
|
60251
59912
|
}, props.children);
|
|
60252
59913
|
};
|
|
60253
59914
|
|
|
60254
|
-
var styles$e = {"vitro-dialog-content":"_dialog-content_vitro-dialog-content_qQNWu6x"
|
|
59915
|
+
var styles$e = {"vitro-dialog-content":"_dialog-content_vitro-dialog-content_qQNWu6x"};
|
|
60255
59916
|
|
|
60256
59917
|
var DialogContent = function DialogContent(props) {
|
|
60257
|
-
var className = [styles$e['vitro-dialog-content'], props.isCustomContainer ? CTRL.EMPTY : styles$e['vitro-dialog-content-padding'], props.className || CTRL.EMPTY].join(CTRL.SPACE);
|
|
60258
59918
|
return React__default.createElement("div", {
|
|
60259
|
-
className: className
|
|
59919
|
+
className: styles$e['vitro-dialog-content'] + (props.className ? CTRL.SPACE + props.className : CTRL.EMPTY)
|
|
60260
59920
|
}, props.children);
|
|
60261
59921
|
};
|
|
60262
59922
|
|
|
@@ -60323,7 +59983,7 @@ var styles$h = {"vitro-button":"_button_vitro-button_hVfBuSO","vitro-animation-r
|
|
|
60323
59983
|
|
|
60324
59984
|
var HTML_ELEMENT_SPAN = 'span';
|
|
60325
59985
|
var TYPE_BUTTON = 'button';
|
|
60326
|
-
var Button$
|
|
59986
|
+
var Button$2 = React.forwardRef(function (props, ref) {
|
|
60327
59987
|
var _useState = React.useState(false),
|
|
60328
59988
|
pending = _useState[0],
|
|
60329
59989
|
setPending = _useState[1];
|
|
@@ -60402,7 +60062,7 @@ var Button$1 = React.forwardRef(function (props, ref) {
|
|
|
60402
60062
|
});
|
|
60403
60063
|
|
|
60404
60064
|
var ButtonCancel = function ButtonCancel(props) {
|
|
60405
|
-
return React__default.createElement(Button$
|
|
60065
|
+
return React__default.createElement(Button$2, Object.assign({}, props, {
|
|
60406
60066
|
className: STYLE.OUTLINE_LIGHT + (props.className ? CTRL.SPACE + props.className : CTRL.EMPTY)
|
|
60407
60067
|
}));
|
|
60408
60068
|
};
|
|
@@ -60414,7 +60074,7 @@ var ButtonGroup = React.forwardRef(function (props, ref) {
|
|
|
60414
60074
|
ref: ref,
|
|
60415
60075
|
className: styles$i['vitro-button-group'] + (props.className ? CTRL.SPACE + props.className : CTRL.EMPTY)
|
|
60416
60076
|
}, props.itemList && props.itemList.length > 0 ? props.itemList.map(function (item, index) {
|
|
60417
|
-
return React__default.createElement(Button$
|
|
60077
|
+
return React__default.createElement(Button$2, Object.assign({}, item, {
|
|
60418
60078
|
key: index
|
|
60419
60079
|
}));
|
|
60420
60080
|
}) : null, props.children);
|
|
@@ -60490,7 +60150,7 @@ var DialogFooter = function DialogFooter(props) {
|
|
|
60490
60150
|
onClick: props.onClose,
|
|
60491
60151
|
className: styles$k['vitro-button']
|
|
60492
60152
|
}), (_props$buttonList2 = props.buttonList) !== null && _props$buttonList2 !== void 0 && _props$buttonList2.length ? props.buttonList.map(function (button) {
|
|
60493
|
-
return React__default.createElement(Button$
|
|
60153
|
+
return React__default.createElement(Button$2, Object.assign({}, button, {
|
|
60494
60154
|
onClick: function onClick() {
|
|
60495
60155
|
var _button$onClick;
|
|
60496
60156
|
return (_button$onClick = button.onClick) === null || _button$onClick === void 0 ? void 0 : _button$onClick.call(button, props.dialog);
|
|
@@ -60629,8 +60289,7 @@ var Dialog = function Dialog(props) {
|
|
|
60629
60289
|
content: props.headerContent,
|
|
60630
60290
|
className: props.headerClassName
|
|
60631
60291
|
}), component && React__default.createElement(DialogContent, {
|
|
60632
|
-
className: props.contentClassName
|
|
60633
|
-
isCustomContainer: props.isCustomContentContainer
|
|
60292
|
+
className: props.contentClassName
|
|
60634
60293
|
}, component), props.children, isMobileView && props.hiddenContent && React__default.createElement(DialogDetailExpandButton, {
|
|
60635
60294
|
onClick: onClickDetailButton
|
|
60636
60295
|
}), props.hiddenContent && React__default.createElement("div", {
|
|
@@ -61442,188 +61101,25 @@ var OverflowButton = function OverflowButton(props) {
|
|
|
61442
61101
|
});
|
|
61443
61102
|
};
|
|
61444
61103
|
|
|
61445
|
-
var CSS_PROPERTY = function CSS_PROPERTY() {};
|
|
61446
|
-
CSS_PROPERTY.FONT_WEIGHT = 'font-weight';
|
|
61447
|
-
CSS_PROPERTY.FONT_SIZE = 'font-size';
|
|
61448
|
-
CSS_PROPERTY.FONT_FAMILY = 'font-family';
|
|
61449
|
-
|
|
61450
|
-
var ValueTooltip = React.forwardRef(function (props, ref) {
|
|
61451
|
-
var _useState = React.useState(false),
|
|
61452
|
-
isEnabled = _useState[0],
|
|
61453
|
-
setIsEnabled = _useState[1];
|
|
61454
|
-
var _useState2 = React.useState(false),
|
|
61455
|
-
isShow = _useState2[0],
|
|
61456
|
-
setIsShow = _useState2[1];
|
|
61457
|
-
var _useState3 = React.useState(props.text),
|
|
61458
|
-
text = _useState3[0],
|
|
61459
|
-
_setText = _useState3[1];
|
|
61460
|
-
var canvasRef = React.useRef();
|
|
61461
|
-
var containerRef = React.useRef();
|
|
61462
|
-
var onShowTimeout = React.useMemo(function () {
|
|
61463
|
-
return {
|
|
61464
|
-
id: null
|
|
61465
|
-
};
|
|
61466
|
-
}, []);
|
|
61467
|
-
var resizeObserver = React__default.useMemo(function () {
|
|
61468
|
-
return new window.ResizeObserver(function (entries) {
|
|
61469
|
-
for (var _iterator = _createForOfIteratorHelperLoose(entries), _step; !(_step = _iterator()).done;) {
|
|
61470
|
-
var entry = _step.value;
|
|
61471
|
-
setIsEnabled(isValueOverflow(text, entry.target));
|
|
61472
|
-
}
|
|
61473
|
-
});
|
|
61474
|
-
}, [text]);
|
|
61475
|
-
React.useEffect(function () {
|
|
61476
|
-
if (props.containerRef && props.containerRef.current) {
|
|
61477
|
-
containerRef.current = props.containerRef.current;
|
|
61478
|
-
resizeObserver.observe(containerRef.current);
|
|
61479
|
-
containerRef.current.addEventListener(exports.EVENT.MOUSEENTER, onMouseEnter);
|
|
61480
|
-
containerRef.current.addEventListener(exports.EVENT.MOUSELEAVE, onMouseLeave);
|
|
61481
|
-
}
|
|
61482
|
-
return function () {
|
|
61483
|
-
if (containerRef.current) {
|
|
61484
|
-
containerRef.current.removeEventListener(exports.EVENT.MOUSEENTER, onMouseEnter);
|
|
61485
|
-
containerRef.current.removeEventListener(exports.EVENT.MOUSELEAVE, onMouseLeave);
|
|
61486
|
-
}
|
|
61487
|
-
};
|
|
61488
|
-
}, [props.containerRef, resizeObserver]);
|
|
61489
|
-
React.useEffect(function () {
|
|
61490
|
-
return function () {
|
|
61491
|
-
resizeObserver.disconnect();
|
|
61492
|
-
};
|
|
61493
|
-
}, []);
|
|
61494
|
-
React.useEffect(function () {
|
|
61495
|
-
_setText(props.text);
|
|
61496
|
-
if (containerRef.current) {
|
|
61497
|
-
setIsEnabled(isValueOverflow(props.text, containerRef.current));
|
|
61498
|
-
} else {
|
|
61499
|
-
setIsEnabled(true);
|
|
61500
|
-
}
|
|
61501
|
-
}, [props.text]);
|
|
61502
|
-
React.useEffect(function () {
|
|
61503
|
-
if (props.onUpdate) {
|
|
61504
|
-
props.onUpdate(isEnabled);
|
|
61505
|
-
}
|
|
61506
|
-
}, [isEnabled]);
|
|
61507
|
-
React.useImperativeHandle(ref, function () {
|
|
61508
|
-
return {
|
|
61509
|
-
update: function update() {
|
|
61510
|
-
if (containerRef.current) {
|
|
61511
|
-
setIsEnabled(isValueOverflow(text, containerRef.current));
|
|
61512
|
-
}
|
|
61513
|
-
},
|
|
61514
|
-
setIsShow: function setIsShow(value) {
|
|
61515
|
-
if (value === false) {
|
|
61516
|
-
setIsEnabled(false);
|
|
61517
|
-
} else {
|
|
61518
|
-
if (containerRef.current) {
|
|
61519
|
-
setIsEnabled(isValueOverflow(text, containerRef.current));
|
|
61520
|
-
} else {
|
|
61521
|
-
setIsEnabled(true);
|
|
61522
|
-
}
|
|
61523
|
-
}
|
|
61524
|
-
},
|
|
61525
|
-
setText: function setText(value) {
|
|
61526
|
-
_setText(value);
|
|
61527
|
-
}
|
|
61528
|
-
};
|
|
61529
|
-
});
|
|
61530
|
-
var isValueOverflow = function isValueOverflow(value, container) {
|
|
61531
|
-
if (props.isMultiline) {
|
|
61532
|
-
return isValueVerticalOverflow(container);
|
|
61533
|
-
}
|
|
61534
|
-
return isValueHorizontalOverflow(value, container);
|
|
61535
|
-
};
|
|
61536
|
-
var isValueHorizontalOverflow = function isValueHorizontalOverflow(value, container) {
|
|
61537
|
-
var textWidth = getTextWidth(value, getCanvasFont(container), container.scrollWidth);
|
|
61538
|
-
if (container && textWidth > getAvailableWidth(container)) {
|
|
61539
|
-
return true;
|
|
61540
|
-
} else {
|
|
61541
|
-
return false;
|
|
61542
|
-
}
|
|
61543
|
-
};
|
|
61544
|
-
var isValueVerticalOverflow = function isValueVerticalOverflow(container) {
|
|
61545
|
-
return container.clientHeight + 1 < container.scrollHeight;
|
|
61546
|
-
};
|
|
61547
|
-
var getTextWidth = function getTextWidth(text, font, scrollWidth) {
|
|
61548
|
-
if (!canvasRef.current) {
|
|
61549
|
-
canvasRef.current = document.createElement('canvas');
|
|
61550
|
-
}
|
|
61551
|
-
var canvas = canvasRef.current;
|
|
61552
|
-
var context = canvas.getContext('2d');
|
|
61553
|
-
if (context) {
|
|
61554
|
-
context.font = font;
|
|
61555
|
-
var metrics = context.measureText(text);
|
|
61556
|
-
return metrics.width;
|
|
61557
|
-
}
|
|
61558
|
-
return scrollWidth;
|
|
61559
|
-
};
|
|
61560
|
-
var getAvailableWidth = function getAvailableWidth(element) {
|
|
61561
|
-
var style = getComputedStyle(element);
|
|
61562
|
-
var paddingX = getNumber(style.paddingLeft) + getNumber(style.paddingRight);
|
|
61563
|
-
var borderX = getNumber(style.borderLeftWidth) + getNumber(style.borderRightWidth);
|
|
61564
|
-
return element.offsetWidth - paddingX - borderX;
|
|
61565
|
-
};
|
|
61566
|
-
var getNumber = function getNumber(value) {
|
|
61567
|
-
return parseFloat(value) || 0;
|
|
61568
|
-
};
|
|
61569
|
-
var getCssStyle = function getCssStyle(element, prop) {
|
|
61570
|
-
return window.getComputedStyle(element, null).getPropertyValue(prop);
|
|
61571
|
-
};
|
|
61572
|
-
var getCanvasFont = function getCanvasFont(el) {
|
|
61573
|
-
if (el === void 0) {
|
|
61574
|
-
el = document.body;
|
|
61575
|
-
}
|
|
61576
|
-
var fontWeight = getCssStyle(el, CSS_PROPERTY.FONT_WEIGHT);
|
|
61577
|
-
var fontSize = getCssStyle(el, CSS_PROPERTY.FONT_SIZE);
|
|
61578
|
-
var fontFamily = getCssStyle(el, CSS_PROPERTY.FONT_FAMILY);
|
|
61579
|
-
return fontWeight + " " + fontSize + " " + fontFamily;
|
|
61580
|
-
};
|
|
61581
|
-
var onMouseEnter = function onMouseEnter(e) {
|
|
61582
|
-
if (onShowTimeout.id) {
|
|
61583
|
-
clearTimeout(onShowTimeout.id);
|
|
61584
|
-
}
|
|
61585
|
-
if (e.target == containerRef.current) {
|
|
61586
|
-
onShowTimeout.id = setTimeout(function () {
|
|
61587
|
-
setIsShow(true);
|
|
61588
|
-
}, 750);
|
|
61589
|
-
}
|
|
61590
|
-
};
|
|
61591
|
-
var onMouseLeave = function onMouseLeave(e) {
|
|
61592
|
-
if (onShowTimeout.id) {
|
|
61593
|
-
clearTimeout(onShowTimeout.id);
|
|
61594
|
-
}
|
|
61595
|
-
setTimeout(function () {
|
|
61596
|
-
return setIsShow(false);
|
|
61597
|
-
}, 300);
|
|
61598
|
-
};
|
|
61599
|
-
return React__default.createElement(Tooltip$1, Object.assign({}, props, {
|
|
61600
|
-
text: text,
|
|
61601
|
-
isShow: isEnabled ? isShow : false,
|
|
61602
|
-
isHideOnHover: false
|
|
61603
|
-
}), props.children);
|
|
61604
|
-
});
|
|
61605
|
-
|
|
61606
61104
|
var styles$r = {"vitro-tab":"_tab-group_vitro-tab_1Qb50HL","vitro-item":"_tab-group_vitro-item_2YnBcmb","active":"_tab-group_active_3M-IIR2"};
|
|
61607
61105
|
|
|
61608
61106
|
var Tab = function Tab(props) {
|
|
61609
|
-
|
|
61107
|
+
if (!props.icon && !props.title) {
|
|
61108
|
+
return null;
|
|
61109
|
+
}
|
|
61610
61110
|
return React__default.createElement("div", {
|
|
61611
61111
|
key: props.index,
|
|
61612
61112
|
className: styles$r['vitro-item']
|
|
61613
|
-
}, React__default.createElement(ValueTooltip, {
|
|
61614
|
-
text: props.text,
|
|
61615
|
-
containerRef: linkRef
|
|
61616
61113
|
}, React__default.createElement(Nav$2.Item, {
|
|
61617
61114
|
className: props.active ? styles$r['active'] : undefined,
|
|
61618
61115
|
onClick: function onClick() {
|
|
61619
61116
|
return props.onClick(props.index);
|
|
61620
61117
|
}
|
|
61621
61118
|
}, React__default.createElement(Nav$2.Link, {
|
|
61622
|
-
eventKey: props.eventKey
|
|
61623
|
-
|
|
61624
|
-
|
|
61625
|
-
|
|
61626
|
-
}), props.text)))));
|
|
61119
|
+
eventKey: props.eventKey
|
|
61120
|
+
}, React__default.createElement("span", null, props.icon && React__default.createElement(Image, {
|
|
61121
|
+
defaultUrl: props.icon
|
|
61122
|
+
}), props.title))));
|
|
61627
61123
|
};
|
|
61628
61124
|
|
|
61629
61125
|
var TabGroupHeader = function TabGroupHeader(props) {
|
|
@@ -61671,8 +61167,8 @@ var TabGroupHeader = function TabGroupHeader(props) {
|
|
|
61671
61167
|
active: index === props.currentTab,
|
|
61672
61168
|
onClick: onClick,
|
|
61673
61169
|
eventKey: item.eventKey,
|
|
61674
|
-
|
|
61675
|
-
|
|
61170
|
+
icon: item.icon,
|
|
61171
|
+
title: item.text
|
|
61676
61172
|
});
|
|
61677
61173
|
}
|
|
61678
61174
|
if (activeItem && activeItem.index === index) {
|
|
@@ -61686,8 +61182,8 @@ var TabGroupHeader = function TabGroupHeader(props) {
|
|
|
61686
61182
|
active: true,
|
|
61687
61183
|
onClick: function onClick() {},
|
|
61688
61184
|
eventKey: activeItem.eventKey,
|
|
61689
|
-
|
|
61690
|
-
|
|
61185
|
+
icon: activeItem.icon,
|
|
61186
|
+
title: activeItem.text
|
|
61691
61187
|
}), props.itemList && props.wrap && React__default.createElement(OverflowButton, {
|
|
61692
61188
|
list: overflowTabList,
|
|
61693
61189
|
offset: props.itemList.length - overflowTabList.length,
|
|
@@ -61751,11 +61247,10 @@ var TabGroupComponent = React.forwardRef(function (props, forwardedRef) {
|
|
|
61751
61247
|
}
|
|
61752
61248
|
return null;
|
|
61753
61249
|
};
|
|
61754
|
-
var isShowHeader = props.itemList.length === 1 ? props.itemList[0].isAlwaysShown === true : true;
|
|
61755
61250
|
return React__default.createElement("div", {
|
|
61756
61251
|
className: styles$r['vitro-tab'] + (props.className ? CTRL.SPACE + props.className : CTRL.EMPTY),
|
|
61757
61252
|
ref: ref
|
|
61758
|
-
},
|
|
61253
|
+
}, props.itemList.length === 1 && props.isHideSingleHeader === true ? null : React__default.createElement(TabGroupHeader, {
|
|
61759
61254
|
itemList: props.itemList.map(function (item, index) {
|
|
61760
61255
|
return _extends({}, item, {
|
|
61761
61256
|
index: index
|
|
@@ -61766,7 +61261,7 @@ var TabGroupComponent = React.forwardRef(function (props, forwardedRef) {
|
|
|
61766
61261
|
changeTab: changeTab,
|
|
61767
61262
|
wrap: props.wrap,
|
|
61768
61263
|
isDisabled: props.isDisabled
|
|
61769
|
-
})
|
|
61264
|
+
}), React__default.createElement("div", {
|
|
61770
61265
|
className: 'vitro-content'
|
|
61771
61266
|
}, getContent()));
|
|
61772
61267
|
});
|
|
@@ -61851,8 +61346,7 @@ var GroupControl = function GroupControl(props) {
|
|
|
61851
61346
|
horizontal: true
|
|
61852
61347
|
}, React__default.createElement(ScrollBar, {
|
|
61853
61348
|
contentClassName: styles$u['vitro-content'],
|
|
61854
|
-
contentRef: scrollbarContentRef
|
|
61855
|
-
key: props.key
|
|
61349
|
+
contentRef: scrollbarContentRef
|
|
61856
61350
|
}, props.componentList && props.componentList.map(function (viewPart) {
|
|
61857
61351
|
return React__default.createElement(ViewPart, {
|
|
61858
61352
|
component: viewPart.component,
|
|
@@ -61869,18 +61363,17 @@ var View = React.forwardRef(function (props, ref) {
|
|
|
61869
61363
|
tabList = _useState[0],
|
|
61870
61364
|
setTabList = _useState[1];
|
|
61871
61365
|
var createTabList = function createTabList(tabList) {
|
|
61872
|
-
return tabList.map(function (tab
|
|
61873
|
-
return
|
|
61366
|
+
return tabList.map(function (tab) {
|
|
61367
|
+
return {
|
|
61874
61368
|
text: tab.text,
|
|
61875
61369
|
content: {
|
|
61876
61370
|
component: GroupControl,
|
|
61877
61371
|
props: {
|
|
61878
61372
|
item: props.item,
|
|
61879
|
-
componentList: tab.componentList
|
|
61880
|
-
key: index
|
|
61373
|
+
componentList: tab.componentList
|
|
61881
61374
|
}
|
|
61882
61375
|
}
|
|
61883
|
-
}
|
|
61376
|
+
};
|
|
61884
61377
|
});
|
|
61885
61378
|
};
|
|
61886
61379
|
React.useEffect(function () {
|
|
@@ -61889,11 +61382,12 @@ var View = React.forwardRef(function (props, ref) {
|
|
|
61889
61382
|
}
|
|
61890
61383
|
}, [props.tabList]);
|
|
61891
61384
|
return tabList && React__default.createElement("div", {
|
|
61892
|
-
className: styles$u['vitro-view']
|
|
61385
|
+
className: styles$u['vitro-view']
|
|
61893
61386
|
}, React__default.createElement(TabGroup, {
|
|
61894
61387
|
itemList: tabList,
|
|
61895
61388
|
isDisabled: props.isDisabled,
|
|
61896
61389
|
className: styles$u['vitro-tab'],
|
|
61390
|
+
isHideSingleHeader: props.isHideSingleTabHeader,
|
|
61897
61391
|
ref: ref,
|
|
61898
61392
|
wrap: true
|
|
61899
61393
|
}));
|
|
@@ -62018,7 +61512,7 @@ var TabButtonGroup = function TabButtonGroup(props) {
|
|
|
62018
61512
|
return ((_tabList$index = tabList[index]) === null || _tabList$index === void 0 ? void 0 : _tabList$index.id) == activeItem;
|
|
62019
61513
|
};
|
|
62020
61514
|
var getTabButton = function getTabButton(item, index) {
|
|
62021
|
-
return React__default.createElement(Button$
|
|
61515
|
+
return React__default.createElement(Button$2, {
|
|
62022
61516
|
key: item.id,
|
|
62023
61517
|
className: isTabButtonActive(index) ? styles$v[CSS_CLASS_ACTIVE] : CTRL.EMPTY,
|
|
62024
61518
|
text: item.text,
|
|
@@ -62049,7 +61543,7 @@ var TabButtonGroup = function TabButtonGroup(props) {
|
|
|
62049
61543
|
}
|
|
62050
61544
|
overflowTabList.push(item);
|
|
62051
61545
|
return null;
|
|
62052
|
-
}), activeItemTabBtn && React__default.createElement(Button$
|
|
61546
|
+
}), activeItemTabBtn && React__default.createElement(Button$2, {
|
|
62053
61547
|
key: activeItemTabBtn.id,
|
|
62054
61548
|
className: styles$v[CSS_CLASS_ACTIVE],
|
|
62055
61549
|
text: activeItemTabBtn.text,
|
|
@@ -63071,7 +62565,7 @@ var AddFieldButton = React.forwardRef(function (props, ref) {
|
|
|
63071
62565
|
};
|
|
63072
62566
|
return React__default.createElement("div", {
|
|
63073
62567
|
className: styles$H['vitro-add-field']
|
|
63074
|
-
}, React__default.createElement(Button$
|
|
62568
|
+
}, React__default.createElement(Button$2, {
|
|
63075
62569
|
ref: addFieldButtonRef,
|
|
63076
62570
|
text: props.labelAddField,
|
|
63077
62571
|
onClick: props.onAddField,
|
|
@@ -63439,9 +62933,170 @@ var CriterionFieldIterator = function CriterionFieldIterator(props) {
|
|
|
63439
62933
|
})));
|
|
63440
62934
|
};
|
|
63441
62935
|
|
|
62936
|
+
var CSS_PROPERTY = function CSS_PROPERTY() {};
|
|
62937
|
+
CSS_PROPERTY.FONT_WEIGHT = 'font-weight';
|
|
62938
|
+
CSS_PROPERTY.FONT_SIZE = 'font-size';
|
|
62939
|
+
CSS_PROPERTY.FONT_FAMILY = 'font-family';
|
|
62940
|
+
|
|
62941
|
+
var ValueTooltip = React.forwardRef(function (props, ref) {
|
|
62942
|
+
var _useState = React.useState(false),
|
|
62943
|
+
isEnabled = _useState[0],
|
|
62944
|
+
setIsEnabled = _useState[1];
|
|
62945
|
+
var _useState2 = React.useState(false),
|
|
62946
|
+
isShow = _useState2[0],
|
|
62947
|
+
setIsShow = _useState2[1];
|
|
62948
|
+
var _useState3 = React.useState(props.text),
|
|
62949
|
+
text = _useState3[0],
|
|
62950
|
+
_setText = _useState3[1];
|
|
62951
|
+
var canvasRef = React.useRef();
|
|
62952
|
+
var containerRef = React.useRef();
|
|
62953
|
+
var onShowTimeout = React.useMemo(function () {
|
|
62954
|
+
return {
|
|
62955
|
+
id: null
|
|
62956
|
+
};
|
|
62957
|
+
}, []);
|
|
62958
|
+
var resizeObserver = React__default.useMemo(function () {
|
|
62959
|
+
return new window.ResizeObserver(function (entries) {
|
|
62960
|
+
for (var _iterator = _createForOfIteratorHelperLoose(entries), _step; !(_step = _iterator()).done;) {
|
|
62961
|
+
var entry = _step.value;
|
|
62962
|
+
setIsEnabled(isValueOverflow(text, entry.target));
|
|
62963
|
+
}
|
|
62964
|
+
});
|
|
62965
|
+
}, [text]);
|
|
62966
|
+
React.useEffect(function () {
|
|
62967
|
+
if (props.containerRef && props.containerRef.current) {
|
|
62968
|
+
containerRef.current = props.containerRef.current;
|
|
62969
|
+
resizeObserver.observe(containerRef.current);
|
|
62970
|
+
containerRef.current.addEventListener(exports.EVENT.MOUSEENTER, onMouseEnter);
|
|
62971
|
+
containerRef.current.addEventListener(exports.EVENT.MOUSELEAVE, onMouseLeave);
|
|
62972
|
+
}
|
|
62973
|
+
return function () {
|
|
62974
|
+
if (containerRef.current) {
|
|
62975
|
+
containerRef.current.removeEventListener(exports.EVENT.MOUSEENTER, onMouseEnter);
|
|
62976
|
+
containerRef.current.removeEventListener(exports.EVENT.MOUSELEAVE, onMouseLeave);
|
|
62977
|
+
}
|
|
62978
|
+
};
|
|
62979
|
+
}, [props.containerRef, resizeObserver]);
|
|
62980
|
+
React.useEffect(function () {
|
|
62981
|
+
return function () {
|
|
62982
|
+
resizeObserver.disconnect();
|
|
62983
|
+
};
|
|
62984
|
+
}, []);
|
|
62985
|
+
React.useEffect(function () {
|
|
62986
|
+
_setText(props.text);
|
|
62987
|
+
if (containerRef.current) {
|
|
62988
|
+
setIsEnabled(isValueOverflow(props.text, containerRef.current));
|
|
62989
|
+
} else {
|
|
62990
|
+
setIsEnabled(true);
|
|
62991
|
+
}
|
|
62992
|
+
}, [props.text]);
|
|
62993
|
+
React.useEffect(function () {
|
|
62994
|
+
if (props.onUpdate) {
|
|
62995
|
+
props.onUpdate(isEnabled);
|
|
62996
|
+
}
|
|
62997
|
+
}, [isEnabled]);
|
|
62998
|
+
React.useImperativeHandle(ref, function () {
|
|
62999
|
+
return {
|
|
63000
|
+
update: function update() {
|
|
63001
|
+
if (containerRef.current) {
|
|
63002
|
+
setIsEnabled(isValueOverflow(text, containerRef.current));
|
|
63003
|
+
}
|
|
63004
|
+
},
|
|
63005
|
+
setIsShow: function setIsShow(value) {
|
|
63006
|
+
if (value === false) {
|
|
63007
|
+
setIsEnabled(false);
|
|
63008
|
+
} else {
|
|
63009
|
+
if (containerRef.current) {
|
|
63010
|
+
setIsEnabled(isValueOverflow(text, containerRef.current));
|
|
63011
|
+
} else {
|
|
63012
|
+
setIsEnabled(true);
|
|
63013
|
+
}
|
|
63014
|
+
}
|
|
63015
|
+
},
|
|
63016
|
+
setText: function setText(value) {
|
|
63017
|
+
_setText(value);
|
|
63018
|
+
}
|
|
63019
|
+
};
|
|
63020
|
+
});
|
|
63021
|
+
var isValueOverflow = function isValueOverflow(value, container) {
|
|
63022
|
+
if (props.isMultiline) {
|
|
63023
|
+
return isValueVerticalOverflow(container);
|
|
63024
|
+
}
|
|
63025
|
+
return isValueHorizontalOverflow(value, container);
|
|
63026
|
+
};
|
|
63027
|
+
var isValueHorizontalOverflow = function isValueHorizontalOverflow(value, container) {
|
|
63028
|
+
var textWidth = getTextWidth(value, getCanvasFont(container), container.scrollWidth);
|
|
63029
|
+
if (container && textWidth > getAvailableWidth(container)) {
|
|
63030
|
+
return true;
|
|
63031
|
+
} else {
|
|
63032
|
+
return false;
|
|
63033
|
+
}
|
|
63034
|
+
};
|
|
63035
|
+
var isValueVerticalOverflow = function isValueVerticalOverflow(container) {
|
|
63036
|
+
return container.clientHeight + 1 < container.scrollHeight;
|
|
63037
|
+
};
|
|
63038
|
+
var getTextWidth = function getTextWidth(text, font, scrollWidth) {
|
|
63039
|
+
if (!canvasRef.current) {
|
|
63040
|
+
canvasRef.current = document.createElement('canvas');
|
|
63041
|
+
}
|
|
63042
|
+
var canvas = canvasRef.current;
|
|
63043
|
+
var context = canvas.getContext('2d');
|
|
63044
|
+
if (context) {
|
|
63045
|
+
context.font = font;
|
|
63046
|
+
var metrics = context.measureText(text);
|
|
63047
|
+
return metrics.width;
|
|
63048
|
+
}
|
|
63049
|
+
return scrollWidth;
|
|
63050
|
+
};
|
|
63051
|
+
var getAvailableWidth = function getAvailableWidth(element) {
|
|
63052
|
+
var style = getComputedStyle(element);
|
|
63053
|
+
var paddingX = getNumber(style.paddingLeft) + getNumber(style.paddingRight);
|
|
63054
|
+
var borderX = getNumber(style.borderLeftWidth) + getNumber(style.borderRightWidth);
|
|
63055
|
+
return element.offsetWidth - paddingX - borderX;
|
|
63056
|
+
};
|
|
63057
|
+
var getNumber = function getNumber(value) {
|
|
63058
|
+
return parseFloat(value) || 0;
|
|
63059
|
+
};
|
|
63060
|
+
var getCssStyle = function getCssStyle(element, prop) {
|
|
63061
|
+
return window.getComputedStyle(element, null).getPropertyValue(prop);
|
|
63062
|
+
};
|
|
63063
|
+
var getCanvasFont = function getCanvasFont(el) {
|
|
63064
|
+
if (el === void 0) {
|
|
63065
|
+
el = document.body;
|
|
63066
|
+
}
|
|
63067
|
+
var fontWeight = getCssStyle(el, CSS_PROPERTY.FONT_WEIGHT);
|
|
63068
|
+
var fontSize = getCssStyle(el, CSS_PROPERTY.FONT_SIZE);
|
|
63069
|
+
var fontFamily = getCssStyle(el, CSS_PROPERTY.FONT_FAMILY);
|
|
63070
|
+
return fontWeight + " " + fontSize + " " + fontFamily;
|
|
63071
|
+
};
|
|
63072
|
+
var onMouseEnter = function onMouseEnter(e) {
|
|
63073
|
+
if (onShowTimeout.id) {
|
|
63074
|
+
clearTimeout(onShowTimeout.id);
|
|
63075
|
+
}
|
|
63076
|
+
if (e.target == containerRef.current) {
|
|
63077
|
+
onShowTimeout.id = setTimeout(function () {
|
|
63078
|
+
setIsShow(true);
|
|
63079
|
+
}, 750);
|
|
63080
|
+
}
|
|
63081
|
+
};
|
|
63082
|
+
var onMouseLeave = function onMouseLeave(e) {
|
|
63083
|
+
if (onShowTimeout.id) {
|
|
63084
|
+
clearTimeout(onShowTimeout.id);
|
|
63085
|
+
}
|
|
63086
|
+
setTimeout(function () {
|
|
63087
|
+
return setIsShow(false);
|
|
63088
|
+
}, 300);
|
|
63089
|
+
};
|
|
63090
|
+
return React__default.createElement(Tooltip$1, Object.assign({}, props, {
|
|
63091
|
+
text: text,
|
|
63092
|
+
isShow: isEnabled ? isShow : false,
|
|
63093
|
+
isHideOnHover: false
|
|
63094
|
+
}), props.children);
|
|
63095
|
+
});
|
|
63096
|
+
|
|
63442
63097
|
var styles$M = {"vitro-selected-item-multi":"_lookup-picker-selected-item_vitro-selected-item-multi_bzL7ugZ","vitro-selected-item":"_lookup-picker-selected-item_vitro-selected-item_hw-euth","vitro-button-close":"_lookup-picker-selected-item_vitro-button-close_1SRnr_0"};
|
|
63443
63098
|
|
|
63444
|
-
var styles$N = {"vitro-lookup-picker":"_lookup-picker_vitro-lookup-picker_1aXYQEG","vitro-content":"_lookup-picker_vitro-content_37L0slb","vitro-
|
|
63099
|
+
var styles$N = {"vitro-lookup-picker":"_lookup-picker_vitro-lookup-picker_1aXYQEG","vitro-content":"_lookup-picker_vitro-content_37L0slb","vitro-lookup-picker-multi-select":"_lookup-picker_vitro-lookup-picker-multi-select_3Lkq2tk","vitro-value-container":"_lookup-picker_vitro-value-container_3GeBIaW","vitro-right":"_lookup-picker_vitro-right_1XFsL1w","vitro-read-only":"_lookup-picker_vitro-read-only_32NOdGB","vitro-label":"_lookup-picker_vitro-label_2QoJkUz","vitro-focus":"_lookup-picker_vitro-focus_2UGpxXD","vitro-error":"_lookup-picker_vitro-error_dF7iopC","vitro-error-message":"_lookup-picker_vitro-error-message_2iBjyRP","vitro-copy-button":"_lookup-picker_vitro-copy-button_3UItrZb","vitro-button-close":"_lookup-picker_vitro-button-close_3_Qndrj","vitro-button-collapse-up":"_lookup-picker_vitro-button-collapse-up_3i0OJub","vitro-button-collapse-bottom":"_lookup-picker_vitro-button-collapse-bottom_3o0Pl83","vitro-tooltip":"_lookup-picker_vitro-tooltip_2a12Z4P","vitro-library-button":"_lookup-picker_vitro-library-button_1zwNYAA"};
|
|
63445
63100
|
|
|
63446
63101
|
var htmlValueStyles = {"vitro-item-html-value":"_lookup-picker-html-value_vitro-item-html-value_2QBoTey"};
|
|
63447
63102
|
|
|
@@ -63577,8 +63232,7 @@ var ValueList = function ValueList(props) {
|
|
|
63577
63232
|
}, React__default.createElement("div", {
|
|
63578
63233
|
onMouseDown: onMouseDown
|
|
63579
63234
|
}, React__default.createElement(ScrollBar, {
|
|
63580
|
-
onInit: setScrollableElement
|
|
63581
|
-
isPreventParentScroll: true
|
|
63235
|
+
onInit: setScrollableElement
|
|
63582
63236
|
}, props.isPending && React__default.createElement(Progress, null), !props.isPending && React__default.createElement(React__default.Fragment, null, props.list.length > 0 ? props.list.sort(sortValueList).map(function (x) {
|
|
63583
63237
|
return React__default.createElement(ValueListItem, {
|
|
63584
63238
|
item: x,
|
|
@@ -63590,7 +63244,7 @@ var ValueList = function ValueList(props) {
|
|
|
63590
63244
|
className: valueListStyles['vitro-placeholder-empty']
|
|
63591
63245
|
}, props.emptyPlaceholder))), props.button && React__default.createElement(FlexBox, {
|
|
63592
63246
|
className: valueListStyles['vitro-flex']
|
|
63593
|
-
}, React__default.createElement(Button$
|
|
63247
|
+
}, React__default.createElement(Button$2, Object.assign({}, props.button, {
|
|
63594
63248
|
className: valueListStyles['vitro-button']
|
|
63595
63249
|
})))));
|
|
63596
63250
|
};
|
|
@@ -63646,10 +63300,9 @@ var CopyButton = function CopyButton(props) {
|
|
|
63646
63300
|
});
|
|
63647
63301
|
};
|
|
63648
63302
|
|
|
63649
|
-
var RightButtonGroup =
|
|
63303
|
+
var RightButtonGroup = function RightButtonGroup(props) {
|
|
63650
63304
|
return React__default.createElement(FlexBox, {
|
|
63651
|
-
className: styles$N['vitro-right']
|
|
63652
|
-
ref: ref
|
|
63305
|
+
className: styles$N['vitro-right']
|
|
63653
63306
|
}, props.isShowButtonClear && React__default.createElement(ImageButton, {
|
|
63654
63307
|
className: styles$N['vitro-button-close'],
|
|
63655
63308
|
onClick: function onClick() {
|
|
@@ -63669,7 +63322,7 @@ var RightButtonGroup = React.forwardRef(function (props, ref) {
|
|
|
63669
63322
|
return props.selectedValueTemplate(x);
|
|
63670
63323
|
}).join(CTRL.COMMA)
|
|
63671
63324
|
}) : null);
|
|
63672
|
-
}
|
|
63325
|
+
};
|
|
63673
63326
|
|
|
63674
63327
|
var LOCALE$6;
|
|
63675
63328
|
(function (LOCALE) {
|
|
@@ -63708,8 +63361,6 @@ var LookupPicker = React.forwardRef(function (props, ref) {
|
|
|
63708
63361
|
var contentRef = React.useRef(null);
|
|
63709
63362
|
var containerRef = React.useRef(null);
|
|
63710
63363
|
var isShowTooltipRef = React.useRef(true);
|
|
63711
|
-
var scrollBarRef = React.useRef(null);
|
|
63712
|
-
var rightButtonGroupRef = React.useRef(null);
|
|
63713
63364
|
var updatePending = function updatePending(valueList) {
|
|
63714
63365
|
return setPending(valueList ? false : true);
|
|
63715
63366
|
};
|
|
@@ -63785,6 +63436,9 @@ var LookupPicker = React.forwardRef(function (props, ref) {
|
|
|
63785
63436
|
}
|
|
63786
63437
|
}
|
|
63787
63438
|
};
|
|
63439
|
+
React.useEffect(function () {
|
|
63440
|
+
onInputValueUpdated();
|
|
63441
|
+
}, [inputValue]);
|
|
63788
63442
|
React.useEffect(function () {
|
|
63789
63443
|
if (props.valueList && selectedValueList) {
|
|
63790
63444
|
updateFilteredValueList(props.valueList.filter(function (x) {
|
|
@@ -63826,10 +63480,11 @@ var LookupPicker = React.forwardRef(function (props, ref) {
|
|
|
63826
63480
|
return props.selectedValueTemplate ? props.selectedValueTemplate(value) : value.title;
|
|
63827
63481
|
};
|
|
63828
63482
|
var onChange = function onChange(e) {
|
|
63483
|
+
var _inputRef$current;
|
|
63829
63484
|
setState(styles$N['vitro-focus']);
|
|
63830
63485
|
setValueListVisible(true);
|
|
63831
63486
|
setInputValue(e.target.value);
|
|
63832
|
-
|
|
63487
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
63833
63488
|
};
|
|
63834
63489
|
var onKeyDown = function onKeyDown(e) {
|
|
63835
63490
|
var keyBoardBackSpace = 8;
|
|
@@ -63898,8 +63553,8 @@ var LookupPicker = React.forwardRef(function (props, ref) {
|
|
|
63898
63553
|
};
|
|
63899
63554
|
var onOptionValueDelete = function onOptionValueDelete(id) {
|
|
63900
63555
|
if (!props.isDisabled) {
|
|
63901
|
-
var _inputRef$
|
|
63902
|
-
(_inputRef$
|
|
63556
|
+
var _inputRef$current2;
|
|
63557
|
+
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.focus();
|
|
63903
63558
|
var newSelectedValueList = id ? selectedValueList.filter(function (x) {
|
|
63904
63559
|
return x.id !== id;
|
|
63905
63560
|
}) : [];
|
|
@@ -63911,12 +63566,9 @@ var LookupPicker = React.forwardRef(function (props, ref) {
|
|
|
63911
63566
|
};
|
|
63912
63567
|
var onFocusOut = function onFocusOut(e) {
|
|
63913
63568
|
var _document$activeEleme;
|
|
63914
|
-
if (scrollBarRef.current) {
|
|
63915
|
-
scrollBarRef.current.scrollTop = 0;
|
|
63916
|
-
}
|
|
63917
63569
|
var target = e.currentTarget;
|
|
63918
63570
|
var isValueListItem = Boolean(props.isMultiSelect && ((_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 ? void 0 : _document$activeEleme.classList.contains(valueListStyles['vitro-item'])));
|
|
63919
|
-
if (!target.contains(document.activeElement) && !
|
|
63571
|
+
if (!target.contains(document.activeElement) && !isValueListItem) {
|
|
63920
63572
|
setValueListVisible(false);
|
|
63921
63573
|
setInputValue(CTRL.EMPTY);
|
|
63922
63574
|
if (props.onBlur && !props.isDisabled) {
|
|
@@ -63928,22 +63580,21 @@ var LookupPicker = React.forwardRef(function (props, ref) {
|
|
|
63928
63580
|
}
|
|
63929
63581
|
};
|
|
63930
63582
|
var onFocus = function onFocus(e) {
|
|
63931
|
-
var _inputRef$
|
|
63932
|
-
if (scrollBarRef.current) {
|
|
63933
|
-
scrollBarRef.current.scrollTop = scrollBarRef.current.scrollHeight;
|
|
63934
|
-
}
|
|
63583
|
+
var _inputRef$current3;
|
|
63935
63584
|
onInputValueUpdated();
|
|
63936
63585
|
isShowTooltipRef.current = false;
|
|
63937
63586
|
setState(styles$N['vitro-focus']);
|
|
63938
63587
|
setValueListVisible(true);
|
|
63939
|
-
(_inputRef$
|
|
63588
|
+
(_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.focus();
|
|
63940
63589
|
if (props.onFocus) {
|
|
63941
63590
|
props.onFocus(e);
|
|
63942
63591
|
}
|
|
63943
63592
|
};
|
|
63944
63593
|
var onCollapseButtonClick = function onCollapseButtonClick(valueListVisible) {
|
|
63945
63594
|
setValueListVisible(!valueListVisible);
|
|
63946
|
-
|
|
63595
|
+
if (!valueListVisible) {
|
|
63596
|
+
onInputValueUpdated();
|
|
63597
|
+
}
|
|
63947
63598
|
};
|
|
63948
63599
|
var getClassName = function getClassName() {
|
|
63949
63600
|
var classList = [styles$N['vitro-lookup-picker'], props.className];
|
|
@@ -63983,23 +63634,6 @@ var LookupPicker = React.forwardRef(function (props, ref) {
|
|
|
63983
63634
|
});
|
|
63984
63635
|
}
|
|
63985
63636
|
};
|
|
63986
|
-
var content = React__default.createElement(React__default.Fragment, null, selectedValueList && selectedValueList.length > 0 && (props.isMultiSelect ? true : inputValue.length === 0) ? React__default.createElement(SelectedValueList, {
|
|
63987
|
-
list: selectedValueList,
|
|
63988
|
-
onOptionValueDelete: onOptionValueDelete,
|
|
63989
|
-
selectedValueTemplate: selectedValueTemplate,
|
|
63990
|
-
isMultiSelect: props.isMultiSelect,
|
|
63991
|
-
isReadOnly: props.isReadOnly,
|
|
63992
|
-
isValueListVisible: valueListVisible,
|
|
63993
|
-
getHtmlValue: getHtmlValue
|
|
63994
|
-
}) : !valueListVisible && props.placeholder && React__default.createElement("div", {
|
|
63995
|
-
className: styles$N['vitro-placeholder']
|
|
63996
|
-
}, props.placeholder), isEditable && React__default.createElement("input", {
|
|
63997
|
-
ref: inputRef,
|
|
63998
|
-
value: inputValue,
|
|
63999
|
-
onKeyDown: onKeyDown,
|
|
64000
|
-
onChange: onChange
|
|
64001
|
-
}), !props.isDisabled && props.children);
|
|
64002
|
-
var isShowButtonClear = props.isShowButtonClear !== false && !props.isMultiSelect && selectedValueList && selectedValueList.length > 0 && isEditable;
|
|
64003
63637
|
return React__default.createElement("div", {
|
|
64004
63638
|
className: getClassName(),
|
|
64005
63639
|
tabIndex: 1,
|
|
@@ -64013,27 +63647,36 @@ var LookupPicker = React.forwardRef(function (props, ref) {
|
|
|
64013
63647
|
}), React__default.createElement(FlexBox, {
|
|
64014
63648
|
className: styles$N['vitro-content'],
|
|
64015
63649
|
ref: contentRef
|
|
64016
|
-
},
|
|
64017
|
-
contentClassName: styles$N['vitro-multi-value-container'],
|
|
64018
|
-
onClick: onFocus,
|
|
64019
|
-
ref: scrollBarRef
|
|
64020
|
-
}, content) : React__default.createElement(FlexBox, {
|
|
63650
|
+
}, React__default.createElement(FlexBox, {
|
|
64021
63651
|
className: styles$N['vitro-value-container'],
|
|
64022
63652
|
onClick: onFocus
|
|
64023
|
-
},
|
|
63653
|
+
}, selectedValueList && selectedValueList.length > 0 && (props.isMultiSelect ? true : inputValue.length === 0) ? React__default.createElement(SelectedValueList, {
|
|
63654
|
+
list: selectedValueList,
|
|
63655
|
+
onOptionValueDelete: onOptionValueDelete,
|
|
63656
|
+
selectedValueTemplate: selectedValueTemplate,
|
|
63657
|
+
isMultiSelect: props.isMultiSelect,
|
|
63658
|
+
isReadOnly: props.isReadOnly,
|
|
63659
|
+
isValueListVisible: valueListVisible,
|
|
63660
|
+
getHtmlValue: getHtmlValue
|
|
63661
|
+
}) : !valueListVisible && React__default.createElement(React__default.Fragment, null, props.placeholder), isEditable && React__default.createElement("input", {
|
|
63662
|
+
ref: inputRef,
|
|
63663
|
+
value: inputValue,
|
|
63664
|
+
onKeyDown: onKeyDown,
|
|
63665
|
+
onChange: onChange,
|
|
63666
|
+
onFocus: onFocus
|
|
63667
|
+
}), !props.isDisabled && props.children), React__default.createElement(RightButtonGroup, {
|
|
64024
63668
|
selectedValueList: selectedValueList,
|
|
64025
63669
|
isReadOnly: props.isReadOnly,
|
|
64026
63670
|
isEditable: isEditable,
|
|
64027
|
-
isShowButtonClear: isShowButtonClear,
|
|
63671
|
+
isShowButtonClear: props.isShowButtonClear !== false && !props.isMultiSelect && selectedValueList && selectedValueList.length > 0 && isEditable,
|
|
64028
63672
|
isValueListVisible: valueListVisible,
|
|
64029
63673
|
isShowExpandButton: props.filterMinLength == 0,
|
|
64030
63674
|
isShowSearchButton: props.isShowSearchButton,
|
|
64031
63675
|
onClickSearchButton: onSearch,
|
|
64032
63676
|
onOptionValueDelete: onOptionValueDelete,
|
|
64033
63677
|
onCollapseButtonClick: onCollapseButtonClick,
|
|
64034
|
-
selectedValueTemplate: props.selectedValueTemplate
|
|
64035
|
-
|
|
64036
|
-
}) : null), isEditable && (!props.filterMinLength || props.filterMinLength <= inputValue.length) && React__default.createElement(ValueList, {
|
|
63678
|
+
selectedValueTemplate: props.selectedValueTemplate
|
|
63679
|
+
})), isEditable && (!props.filterMinLength || props.filterMinLength <= inputValue.length) && React__default.createElement(ValueList, {
|
|
64037
63680
|
isPending: pending,
|
|
64038
63681
|
inputValue: inputValue,
|
|
64039
63682
|
list: filteredValueList,
|
|
@@ -64164,7 +63807,7 @@ var BaseLookupPicker = function BaseLookupPicker(props) {
|
|
|
64164
63807
|
var _exit = false;
|
|
64165
63808
|
var _temp2 = function () {
|
|
64166
63809
|
if (data.list) {
|
|
64167
|
-
return Promise.resolve(itemSelectDialogService.show(data.list, undefined, isMultiSelect, undefined,
|
|
63810
|
+
return Promise.resolve(itemSelectDialogService.show(data.list, undefined, isMultiSelect, undefined, {
|
|
64168
63811
|
isShowSelection: isMultiSelect
|
|
64169
63812
|
})).then(function (itemIdList) {
|
|
64170
63813
|
if (itemIdList && itemIdList.length) {
|
|
@@ -65483,6 +65126,13 @@ var DatePicker = React.forwardRef(function (props, ref) {
|
|
|
65483
65126
|
React.useEffect(function () {
|
|
65484
65127
|
props.errorMessage ? setState(styles$T['vitro-error']) : setState(CTRL.EMPTY);
|
|
65485
65128
|
}, [props.errorMessage]);
|
|
65129
|
+
React.useEffect(function () {
|
|
65130
|
+
$$6(inputRef.current).data(componentName).setOptions({
|
|
65131
|
+
change: function change(e) {
|
|
65132
|
+
onChange(e);
|
|
65133
|
+
}
|
|
65134
|
+
});
|
|
65135
|
+
}, [props.onChange]);
|
|
65486
65136
|
React.useImperativeHandle(ref, function () {
|
|
65487
65137
|
return {
|
|
65488
65138
|
focus: function focus() {
|
|
@@ -66421,7 +66071,7 @@ var SortFilter = function SortFilter(props) {
|
|
|
66421
66071
|
isClearChangedFieldValueMap: true
|
|
66422
66072
|
}) : CTRL.EMPTY, React__default.createElement("div", {
|
|
66423
66073
|
className: CSS_CLASS_ADD_FIELD
|
|
66424
|
-
}, React__default.createElement(Button$
|
|
66074
|
+
}, React__default.createElement(Button$2, {
|
|
66425
66075
|
ref: addFieldButtonRef,
|
|
66426
66076
|
text: props.labelAddField,
|
|
66427
66077
|
onClick: onAddSortField,
|
|
@@ -66577,7 +66227,7 @@ var SearchDialog = function SearchDialog(props) {
|
|
|
66577
66227
|
}, React__default.createElement(ButtonCancel, {
|
|
66578
66228
|
text: getSearchLabel(ACTION$2.CANCEL),
|
|
66579
66229
|
onClick: props.onCancel
|
|
66580
|
-
}), React__default.createElement(Button$
|
|
66230
|
+
}), React__default.createElement(Button$2, {
|
|
66581
66231
|
text: getSearchLabel(ACTION$2.SEARCH),
|
|
66582
66232
|
onClick: props.onSearch,
|
|
66583
66233
|
className: STYLE.PRIMARY
|
|
@@ -66604,7 +66254,7 @@ var styles$W = {"vitro-search":"_search_vitro-search_QkJksC_","vitro-active":"_s
|
|
|
66604
66254
|
|
|
66605
66255
|
var CONDITION_CONTAINS = 11;
|
|
66606
66256
|
var CSS_CLASS_ACTIVE$1 = 'vitro-active';
|
|
66607
|
-
var Search =
|
|
66257
|
+
var Search = function Search(props) {
|
|
66608
66258
|
var _useState = React.useState(false),
|
|
66609
66259
|
isShowDialog = _useState[0],
|
|
66610
66260
|
setIsShowDialog = _useState[1];
|
|
@@ -66625,20 +66275,12 @@ var Search = React.forwardRef(function (props, ref) {
|
|
|
66625
66275
|
setSendedSearchCriterionList = _useState6[1];
|
|
66626
66276
|
var searchInputRef = React.useRef(null);
|
|
66627
66277
|
var searchRef = React.useRef(null);
|
|
66628
|
-
var destinationRef = React.useRef(props.destination);
|
|
66629
66278
|
var eventService = inversifyReact.useInjection(SERVICE.EVENT);
|
|
66630
66279
|
var localeService = inversifyReact.useInjection(SERVICE.LOCALE);
|
|
66631
66280
|
var columnService = inversifyReact.useInjection(SERVICE.COLUMN);
|
|
66632
66281
|
var guidService = inversifyReact.useInjection(SERVICE.GUID);
|
|
66633
66282
|
var inputPlaceholder = localeService.create(LOCALE$8.SEARCH_INPUT_PLACEHOLDER);
|
|
66634
66283
|
var defaultSearchFieldName = FIELD$1.NAME;
|
|
66635
|
-
React.useImperativeHandle(ref, function () {
|
|
66636
|
-
return {
|
|
66637
|
-
setDestination: function setDestination(destination) {
|
|
66638
|
-
destinationRef.current = destination;
|
|
66639
|
-
}
|
|
66640
|
-
};
|
|
66641
|
-
});
|
|
66642
66284
|
React.useEffect(function () {
|
|
66643
66285
|
if (props.searchCriterionList) {
|
|
66644
66286
|
setSearchCriterionList(props.searchCriterionList);
|
|
@@ -66675,7 +66317,7 @@ var Search = React.forwardRef(function (props, ref) {
|
|
|
66675
66317
|
eventService.send(exports.EVENT.SEARCH, {
|
|
66676
66318
|
searchCriterionList: list,
|
|
66677
66319
|
source: props.id,
|
|
66678
|
-
destination:
|
|
66320
|
+
destination: props.destination
|
|
66679
66321
|
});
|
|
66680
66322
|
}
|
|
66681
66323
|
}, [props.parentId]);
|
|
@@ -66788,7 +66430,7 @@ var Search = React.forwardRef(function (props, ref) {
|
|
|
66788
66430
|
eventService.send(exports.EVENT.SEARCH, {
|
|
66789
66431
|
searchCriterionList: null,
|
|
66790
66432
|
source: props.id,
|
|
66791
|
-
destination:
|
|
66433
|
+
destination: props.destination
|
|
66792
66434
|
});
|
|
66793
66435
|
};
|
|
66794
66436
|
var getInputCriterionList = function getInputCriterionList(value) {
|
|
@@ -66841,7 +66483,7 @@ var Search = React.forwardRef(function (props, ref) {
|
|
|
66841
66483
|
eventService.send(exports.EVENT.SEARCH, {
|
|
66842
66484
|
searchCriterionList: list,
|
|
66843
66485
|
source: props.id,
|
|
66844
|
-
destination:
|
|
66486
|
+
destination: props.destination
|
|
66845
66487
|
});
|
|
66846
66488
|
};
|
|
66847
66489
|
return React__default.createElement("div", {
|
|
@@ -66877,7 +66519,7 @@ var Search = React.forwardRef(function (props, ref) {
|
|
|
66877
66519
|
setSearchCriterionList: setSearchCriterionList,
|
|
66878
66520
|
searchRef: searchRef
|
|
66879
66521
|
}));
|
|
66880
|
-
}
|
|
66522
|
+
};
|
|
66881
66523
|
|
|
66882
66524
|
var styles$X = {"vitro-viewer-issue-list":"_viewer-issue-list_vitro-viewer-issue-list_NgsIC86","vitro-search-wrap":"_viewer-issue-list_vitro-search-wrap_1relfMg","vitro-issue-list-wrap":"_viewer-issue-list_vitro-issue-list-wrap_jT8ou5P"};
|
|
66883
66525
|
|
|
@@ -67112,7 +66754,7 @@ var Viewer = function Viewer(props) {
|
|
|
67112
66754
|
};
|
|
67113
66755
|
|
|
67114
66756
|
var name = "@vitrosoftware/common-ui-ts";
|
|
67115
|
-
var version$1 = "1.1.
|
|
66757
|
+
var version$1 = "1.1.227";
|
|
67116
66758
|
var description = "vitro software common ui ts";
|
|
67117
66759
|
var author = "";
|
|
67118
66760
|
var license = "MIT";
|
|
@@ -67414,7 +67056,7 @@ var styles$12 = {"vitro-submit-button":"_login-submit-button_vitro-submit-button
|
|
|
67414
67056
|
|
|
67415
67057
|
var LoginSubmitButton = function LoginSubmitButton(props) {
|
|
67416
67058
|
var localeService = inversifyReact.useInjection(SERVICE.LOCALE);
|
|
67417
|
-
return React__default.createElement(Button$
|
|
67059
|
+
return React__default.createElement(Button$2, {
|
|
67418
67060
|
className: STYLE.PRIMARY + CTRL.SPACE + styles$12['vitro-submit-button'] + (props.className ? CTRL.SPACE + props.className : CTRL.EMPTY),
|
|
67419
67061
|
text: localeService.create(LOCALE$9.ACTION_LOGIN),
|
|
67420
67062
|
onClick: props.onClick,
|
|
@@ -67581,7 +67223,7 @@ var LoginForm = React.forwardRef(function (props, ref) {
|
|
|
67581
67223
|
}, localeService.create(LOCALE$9.LOGIN_FORM_SEPARATOR_TEXT)), React__default.createElement("div", {
|
|
67582
67224
|
className: styles$14['vitro-button-list']
|
|
67583
67225
|
}, props.buttonList.map(function (button) {
|
|
67584
|
-
return React__default.createElement(Button$
|
|
67226
|
+
return React__default.createElement(Button$2, Object.assign({}, button, {
|
|
67585
67227
|
className: styles$14['vitro-button']
|
|
67586
67228
|
}));
|
|
67587
67229
|
}))) : React__default.createElement(React__default.Fragment, null), props.onRegister && React__default.createElement(Link, {
|
|
@@ -67776,7 +67418,7 @@ var CommandMenu = React.forwardRef(function (props, ref) {
|
|
|
67776
67418
|
var styles$19 = {"vitro-command-menu-button":"_command-menu-button_vitro-command-menu-button_2IiXVbP","vitro-image":"_command-menu-button_vitro-image_27yILgG"};
|
|
67777
67419
|
|
|
67778
67420
|
var CommandMenuButton = function CommandMenuButton(props) {
|
|
67779
|
-
return React__default.createElement("li", null, React__default.createElement(Button$
|
|
67421
|
+
return React__default.createElement("li", null, React__default.createElement(Button$2, Object.assign({}, props, {
|
|
67780
67422
|
className: styles$19['vitro-command-menu-button'] + CTRL.SPACE + (props.className ? props.className : STYLE.LIGHT)
|
|
67781
67423
|
})));
|
|
67782
67424
|
};
|
|
@@ -68519,7 +68161,7 @@ var AlertConstants = {
|
|
|
68519
68161
|
get TYPE () { return TYPE$2; }
|
|
68520
68162
|
};
|
|
68521
68163
|
|
|
68522
|
-
var styles$1h = {"vitro-alert":"_alert_vitro-alert_3sPAkJb","vitro-position-absolute":"_alert_vitro-position-absolute_2A33Lq4","vitro-alert-content":"_alert_vitro-alert-content_10fW1n4","vitro-button-close":"_alert_vitro-button-close_39K9cqW","vitro-icon":"_alert_vitro-icon_pK385gF","vitro-text":"_alert_vitro-text_37Erxqj","vitro-
|
|
68164
|
+
var styles$1h = {"vitro-alert":"_alert_vitro-alert_3sPAkJb","vitro-position-absolute":"_alert_vitro-position-absolute_2A33Lq4","vitro-alert-content":"_alert_vitro-alert-content_10fW1n4","vitro-button-close":"_alert_vitro-button-close_39K9cqW","vitro-icon":"_alert_vitro-icon_pK385gF","vitro-text":"_alert_vitro-text_37Erxqj","vitro-alert-action-list":"_alert_vitro-alert-action-list_2XzbaCO","vitro-position-center":"_alert_vitro-position-center_1r_lK_e"};
|
|
68523
68165
|
|
|
68524
68166
|
var TYPE_DANGER = 'danger';
|
|
68525
68167
|
var Alert$1 = function Alert(props) {
|
|
@@ -68529,6 +68171,12 @@ var Alert$1 = function Alert(props) {
|
|
|
68529
68171
|
ref.current.focus();
|
|
68530
68172
|
}
|
|
68531
68173
|
}, [props]);
|
|
68174
|
+
var actionOnClick = function actionOnClick(action) {
|
|
68175
|
+
if (action) {
|
|
68176
|
+
action();
|
|
68177
|
+
}
|
|
68178
|
+
props.setMessage(null);
|
|
68179
|
+
};
|
|
68532
68180
|
var onClose = function onClose() {
|
|
68533
68181
|
if (props.onClose) {
|
|
68534
68182
|
props.onClose();
|
|
@@ -68545,6 +68193,16 @@ var Alert$1 = function Alert(props) {
|
|
|
68545
68193
|
}, 100);
|
|
68546
68194
|
}
|
|
68547
68195
|
};
|
|
68196
|
+
var actionList = props.actionList && React__default.createElement("div", {
|
|
68197
|
+
className: styles$1h['vitro-alert-action-list']
|
|
68198
|
+
}, props.actionList.map(function (a) {
|
|
68199
|
+
return React__default.createElement(Button$1, {
|
|
68200
|
+
key: a.text,
|
|
68201
|
+
onClick: function onClick() {
|
|
68202
|
+
return actionOnClick(a.onClick);
|
|
68203
|
+
}
|
|
68204
|
+
}, a.text);
|
|
68205
|
+
}));
|
|
68548
68206
|
var className = [styles$1h['vitro-alert'], props.isPositionCenter ? styles$1h['vitro-position-center'] : CTRL.EMPTY, props.isPositionAbsolute ? styles$1h['vitro-position-absolute'] : CTRL.EMPTY, props.className || CTRL.EMPTY].join(CTRL.SPACE);
|
|
68549
68207
|
return React__default.createElement("div", {
|
|
68550
68208
|
tabIndex: 1,
|
|
@@ -68558,15 +68216,12 @@ var Alert$1 = function Alert(props) {
|
|
|
68558
68216
|
className: styles$1h['vitro-alert-content']
|
|
68559
68217
|
}, React__default.createElement("div", {
|
|
68560
68218
|
className: styles$1h['vitro-icon']
|
|
68561
|
-
}), React__default.createElement(
|
|
68562
|
-
className: styles$1h['vitro-content-container'],
|
|
68563
|
-
isColumn: true
|
|
68564
|
-
}, (props.title || props.text) && React__default.createElement("div", {
|
|
68219
|
+
}), React__default.createElement("div", {
|
|
68565
68220
|
className: styles$1h['vitro-text']
|
|
68566
|
-
}, props.title && React__default.createElement("strong", null, props.title), props.text
|
|
68221
|
+
}, props.title && React__default.createElement("strong", null, props.title), props.text, !props.text && props.children), !props.isMultiline && actionList, props.isDismissible && React__default.createElement("div", {
|
|
68567
68222
|
className: styles$1h['vitro-button-close'],
|
|
68568
68223
|
onClick: onClose
|
|
68569
|
-
}))));
|
|
68224
|
+
})), props.text && props.children, props.isMultiline && actionList));
|
|
68570
68225
|
};
|
|
68571
68226
|
|
|
68572
68227
|
var styles$1i = {"vitro-user-profile":"_user-profile_vitro-user-profile_11XpBoQ","vitro-dropdown-item":"_user-profile_vitro-dropdown-item_dSErsta","vitro-avatar":"_user-profile_vitro-avatar_3SzDPAi"};
|
|
@@ -82893,8 +82548,7 @@ var File = function File(props) {
|
|
|
82893
82548
|
isColumn: true
|
|
82894
82549
|
}, props.actionList && props.actionList.length ? React__default.createElement(DropdownButton, {
|
|
82895
82550
|
itemList: props.actionList,
|
|
82896
|
-
|
|
82897
|
-
className: STYLE$1.CONTEXT
|
|
82551
|
+
className: styles$1k['vitro-dropdown-button']
|
|
82898
82552
|
}) : null, props.preview && React__default.createElement(Tooltip$1, {
|
|
82899
82553
|
placement: PLACEMENT.TOP,
|
|
82900
82554
|
text: props.tooltip || CTRL.EMPTY
|
|
@@ -83483,6 +83137,7 @@ var EditableFieldIterator = function EditableFieldIterator(props) {
|
|
|
83483
83137
|
changedFieldValueMap: changedFieldValueMap,
|
|
83484
83138
|
componentMap: componentMap,
|
|
83485
83139
|
onChange: onChange,
|
|
83140
|
+
isVisibleOverflow: true,
|
|
83486
83141
|
className: styles$1r['vitro-field-iterator']
|
|
83487
83142
|
}) : React__default.createElement(ScrollBar, {
|
|
83488
83143
|
className: styles$1r['vitro-scrollbar']
|
|
@@ -83492,6 +83147,7 @@ var EditableFieldIterator = function EditableFieldIterator(props) {
|
|
|
83492
83147
|
changedFieldValueMap: changedFieldValueMap,
|
|
83493
83148
|
componentMap: componentMap,
|
|
83494
83149
|
onChange: onChange,
|
|
83150
|
+
isVisibleOverflow: true,
|
|
83495
83151
|
className: styles$1r['vitro-field-iterator']
|
|
83496
83152
|
})));
|
|
83497
83153
|
};
|
|
@@ -84893,7 +84549,7 @@ var DxfViewer = function DxfViewer(props) {
|
|
|
84893
84549
|
});
|
|
84894
84550
|
};
|
|
84895
84551
|
|
|
84896
|
-
var styles$1O = {"vitro-select":"_select_vitro-select_EObExkL","vitro-active":"_select_vitro-active_3I2oZ9Y","vitro-label":"_select_vitro-label_1sD79dR","vitro-list-container":"_select_vitro-list-container_1iaPtG5","vitro-item":"_select_vitro-item_3Q88bWt"
|
|
84552
|
+
var styles$1O = {"vitro-select":"_select_vitro-select_EObExkL","vitro-active":"_select_vitro-active_3I2oZ9Y","vitro-label":"_select_vitro-label_1sD79dR","vitro-list-container":"_select_vitro-list-container_1iaPtG5","vitro-item":"_select_vitro-item_3Q88bWt"};
|
|
84897
84553
|
|
|
84898
84554
|
var Select = function Select(props) {
|
|
84899
84555
|
var _useState = React.useState(null),
|
|
@@ -84959,13 +84615,11 @@ var Select = function Select(props) {
|
|
|
84959
84615
|
}), React__default.createElement(itemTemplate, value), React__default.createElement("div", {
|
|
84960
84616
|
className: styles$1O['vitro-list-container'],
|
|
84961
84617
|
ref: listRef
|
|
84962
|
-
}, React__default.createElement(ScrollBar, {
|
|
84963
|
-
className: styles$1O['vitro-scrollbar']
|
|
84964
84618
|
}, React__default.createElement(List$1, {
|
|
84965
84619
|
itemList: props.itemList,
|
|
84966
84620
|
onClick: onClick,
|
|
84967
84621
|
itemTemplate: itemTemplate
|
|
84968
|
-
})))
|
|
84622
|
+
})));
|
|
84969
84623
|
};
|
|
84970
84624
|
|
|
84971
84625
|
var styles$1P = {"vitro-switch":"_switch_vitro-switch_1noCcra","vitro-slider":"_switch_vitro-slider_3wesxda","vitro-active":"_switch_vitro-active_3LJI9TW"};
|
|
@@ -85876,7 +85530,7 @@ var TelerikMediaPlayerServiceImpl = /*#__PURE__*/function () {
|
|
|
85876
85530
|
media: {
|
|
85877
85531
|
title: settings.media.title ? settings.media.title : CTRL.EMPTY,
|
|
85878
85532
|
source: settings.media.url,
|
|
85879
|
-
poster: settings.media.
|
|
85533
|
+
poster: settings.media.title ? settings.media.title : false
|
|
85880
85534
|
},
|
|
85881
85535
|
autoPlay: settings.isAutoPlay === false ? settings.isAutoPlay : true,
|
|
85882
85536
|
autoRepeat: settings.isAutoRepeat ? settings.isAutoRepeat : false,
|
|
@@ -86171,7 +85825,7 @@ var SlideUpButton = function SlideUpButton(props) {
|
|
|
86171
85825
|
props.onClick(e);
|
|
86172
85826
|
}
|
|
86173
85827
|
};
|
|
86174
|
-
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Button$
|
|
85828
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(Button$2, {
|
|
86175
85829
|
onClick: onClick,
|
|
86176
85830
|
text: CTRL.EMPTY,
|
|
86177
85831
|
imageUrl: props.imageUrl,
|
|
@@ -86209,7 +85863,7 @@ exports.BUTTON = ButtonConstants;
|
|
|
86209
85863
|
exports.BimViewer = BimViewer;
|
|
86210
85864
|
exports.BottomAlignControlGroup = BottomAlignControlGroup;
|
|
86211
85865
|
exports.Breadcrumbs = Breadcrumbs;
|
|
86212
|
-
exports.Button = Button$
|
|
85866
|
+
exports.Button = Button$2;
|
|
86213
85867
|
exports.ButtonCancel = ButtonCancel;
|
|
86214
85868
|
exports.ButtonGroup = ButtonGroup;
|
|
86215
85869
|
exports.CONTROL = CONTROL;
|