first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
+971
View File
@@ -0,0 +1,971 @@
{
"name": "@fluentui/dom-utilities",
"entries": [
{
"date": "Fri, 21 Feb 2025 07:20:19 GMT",
"tag": "@fluentui/dom-utilities_v2.3.10",
"version": "2.3.10",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.24",
"commit": "37cb222b6d035ea02d490aa26a2aaf7dfd94c761"
}
]
}
},
{
"date": "Fri, 11 Oct 2024 16:51:53 GMT",
"tag": "@fluentui/dom-utilities_v2.3.9",
"version": "2.3.9",
"comments": {
"patch": [
{
"author": "miclo@microsoft.com",
"package": "@fluentui/dom-utilities",
"commit": "3fec026661e874b8e458bb4f2deab1b3a9e73cd1",
"comment": "Fix regression caused by #32996"
}
]
}
},
{
"date": "Tue, 08 Oct 2024 07:23:46 GMT",
"tag": "@fluentui/dom-utilities_v2.3.8",
"version": "2.3.8",
"comments": {
"patch": [
{
"author": "miclo@microsoft.com",
"package": "@fluentui/dom-utilities",
"commit": "65d3fdc217bcd5dff76dd3fd9ebb9d9f032f097a",
"comment": "Fix TypeError in portalContainsElement when element is Document or similar"
}
]
}
},
{
"date": "Thu, 01 Aug 2024 07:24:43 GMT",
"tag": "@fluentui/dom-utilities_v2.3.7",
"version": "2.3.7",
"comments": {
"none": [
{
"author": "vgenaev@gmail.com",
"package": "@fluentui/dom-utilities",
"commit": "ff2c81325d734ddff92e606ac681c22c710f262f",
"comment": "remove redundant forceConsistentCasingInFileNames option"
},
{
"author": "martinhochel@microsoft.com",
"package": "@fluentui/dom-utilities",
"commit": "674cdee6cfb1cb34e6ba1b24f665d0b8751a5dea",
"comment": "chore: remove npmScope from project name"
},
{
"author": "martinhochel@microsoft.com",
"package": "@fluentui/dom-utilities",
"commit": "3da4204265901049d9ef777df15cb25b881a6284",
"comment": "chore: add project.json tags"
}
]
}
},
{
"date": "Mon, 24 Jun 2024 07:33:22 GMT",
"tag": "@fluentui/dom-utilities_v2.3.7",
"version": "2.3.7",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.23",
"commit": "444d2ef497b5be5b4252f4af86ded3d2db7a0850"
}
]
}
},
{
"date": "Thu, 06 Jun 2024 07:26:46 GMT",
"tag": "@fluentui/dom-utilities_v2.3.6",
"version": "2.3.6",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.22",
"commit": "e5e806f46bd00bc7baffbfe7514a617600ba2d47"
}
]
}
},
{
"date": "Tue, 28 May 2024 07:28:20 GMT",
"tag": "@fluentui/dom-utilities_v2.3.5",
"version": "2.3.5",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.21",
"commit": "a96863b605b797397efab6fbecc6534ed8bd5e99"
}
]
}
},
{
"date": "Fri, 24 May 2024 07:28:17 GMT",
"tag": "@fluentui/dom-utilities_v2.3.4",
"version": "2.3.4",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.20",
"commit": "e5b614623b9aa1ae3f1f86f3e753b934943a4601"
}
]
}
},
{
"date": "Thu, 23 May 2024 07:28:51 GMT",
"tag": "@fluentui/dom-utilities_v2.3.3",
"version": "2.3.3",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.19",
"commit": "10e6758b203de79c53ce31ba264e137f83f50ff4"
}
]
}
},
{
"date": "Mon, 20 May 2024 07:29:20 GMT",
"tag": "@fluentui/dom-utilities_v2.3.2",
"version": "2.3.2",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.18",
"commit": "eadc00f974b3199e6c34d2e9d16015add154ec3b"
}
]
}
},
{
"date": "Wed, 24 Apr 2024 07:27:48 GMT",
"tag": "@fluentui/dom-utilities_v2.3.1",
"version": "2.3.1",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.17",
"commit": "45f80cfd2d3eb5f29202040d98099c3e74563959"
}
]
}
},
{
"date": "Mon, 22 Apr 2024 07:28:25 GMT",
"tag": "@fluentui/dom-utilities_v2.3.0",
"version": "2.3.0",
"comments": {
"minor": [
{
"author": "seanmonahan@microsoft.com",
"package": "@fluentui/dom-utilities",
"commit": "7181c431a13178dafbf09ad3cbc4ab7c9740bbcf",
"comment": "feat: add shadow DOM support for DOM APIs"
}
]
}
},
{
"date": "Fri, 12 Apr 2024 07:29:11 GMT",
"tag": "@fluentui/dom-utilities_v2.2.16",
"version": "2.2.16",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.16",
"commit": "89ca3a5f03955ddeef940ef537263e9882ecdb67"
}
]
}
},
{
"date": "Wed, 03 Apr 2024 07:29:31 GMT",
"tag": "@fluentui/dom-utilities_v2.2.15",
"version": "2.2.15",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.15",
"commit": "d7a9f5b4b802c28692dd9a91b6c150a218f03e09"
}
]
}
},
{
"date": "Wed, 10 Jan 2024 07:28:48 GMT",
"tag": "@fluentui/dom-utilities_v2.2.14",
"version": "2.2.14",
"comments": {
"patch": [
{
"author": "seanmonahan@microsoft.com",
"package": "@fluentui/dom-utilities",
"commit": "5858fe05255460fa9b13370e613c5243ae3b92d0",
"comment": "chore: disallow document and window access"
},
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.14",
"commit": "5858fe05255460fa9b13370e613c5243ae3b92d0"
}
]
}
},
{
"date": "Thu, 14 Dec 2023 07:30:10 GMT",
"tag": "@fluentui/dom-utilities_v2.2.13",
"version": "2.2.13",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.13",
"commit": "26acec917d2d47c80b9d06215c2f8454aa9520b3"
}
]
}
},
{
"date": "Sat, 28 Oct 2023 00:29:16 GMT",
"tag": "@fluentui/dom-utilities_v2.2.12",
"version": "2.2.12",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.12",
"commit": "70d0762fd12eb211f7c1dbe31a23b2fbb73a67c4"
}
]
}
},
{
"date": "Tue, 26 Sep 2023 07:44:56 GMT",
"tag": "@fluentui/dom-utilities_v2.2.11",
"version": "2.2.11",
"comments": {
"none": [
{
"author": "martinhochel@microsoft.com",
"package": "@fluentui/dom-utilities",
"commit": "ccc380cada5d9a6057bd8fca127700b700815fdc",
"comment": "chore: add ES2015.Iterable to tsconfig lib as jest types need it"
}
]
}
},
{
"date": "Wed, 28 Jun 2023 07:37:32 GMT",
"tag": "@fluentui/dom-utilities_v2.2.11",
"version": "2.2.11",
"comments": {
"none": [
{
"author": "martinhochel@microsoft.com",
"package": "@fluentui/dom-utilities",
"commit": "fbe878e9c9785588197481f172c42c2c0a230292",
"comment": "fix: update .npmignore to unify v8 packages and exclude project.json"
}
]
}
},
{
"date": "Wed, 31 May 2023 07:38:40 GMT",
"tag": "@fluentui/dom-utilities_v2.2.11",
"version": "2.2.11",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.11",
"commit": "dd8c30d9b97f68eb332366fc0e69775a88775319"
}
]
}
},
{
"date": "Tue, 30 May 2023 07:36:09 GMT",
"tag": "@fluentui/dom-utilities_v2.2.10",
"version": "2.2.10",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.10",
"commit": "588b9393a673137dd8a867686d1e1cd45c350ca4"
}
]
}
},
{
"date": "Fri, 05 May 2023 18:14:03 GMT",
"tag": "@fluentui/dom-utilities_v2.2.9",
"version": "2.2.9",
"comments": {
"patch": [
{
"author": "tristan.watanabe@gmail.com",
"package": "@fluentui/dom-utilities",
"commit": "0475089ff40110402c8f1e31f8c52c17f8b2e0e2",
"comment": "fix: explicitly ship dist/ folder."
},
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.9",
"commit": "0475089ff40110402c8f1e31f8c52c17f8b2e0e2"
}
]
}
},
{
"date": "Tue, 02 May 2023 00:58:14 GMT",
"tag": "@fluentui/dom-utilities_v2.2.8",
"version": "2.2.8",
"comments": {
"patch": [
{
"author": "tristan.watanabe@gmail.com",
"package": "@fluentui/dom-utilities",
"commit": "c2326dc86037b18a6673697885703b5953ffd0c2",
"comment": "fix: esm, cjs, and amd folders should all be published correctly."
},
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.8",
"commit": "c2326dc86037b18a6673697885703b5953ffd0c2"
}
]
}
},
{
"date": "Mon, 01 May 2023 07:39:54 GMT",
"tag": "@fluentui/dom-utilities_v2.2.7",
"version": "2.2.7",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.7",
"commit": "46f19b90d2088f055f9cd4bfad840f72fe68f0d8"
}
]
}
},
{
"date": "Fri, 17 Mar 2023 08:15:56 GMT",
"tag": "@fluentui/dom-utilities_v2.2.6",
"version": "2.2.6",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.6",
"commit": "36f3bd6c4f0280b91ad10133b5ddd9c439a1de73"
}
]
}
},
{
"date": "Fri, 03 Feb 2023 07:50:06 GMT",
"tag": "@fluentui/dom-utilities_v2.2.5",
"version": "2.2.5",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.5",
"commit": "09da68fa3dd4695fb969b76814d76f88e671111f"
}
]
}
},
{
"date": "Wed, 11 Jan 2023 07:50:51 GMT",
"tag": "@fluentui/dom-utilities_v2.2.4",
"version": "2.2.4",
"comments": {
"none": [
{
"author": "martinhochel@microsoft.com",
"package": "@fluentui/dom-utilities",
"commit": "64bb45980d68de1219c6b36a7db5363f0a9cff9f",
"comment": "chore: migrate to packaged scripts"
}
]
}
},
{
"date": "Tue, 10 Jan 2023 07:50:15 GMT",
"tag": "@fluentui/dom-utilities_v2.2.4",
"version": "2.2.4",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.4",
"commit": "49ead1dcd8c34cf87b151e0c0cc7bd716260f22f"
}
]
}
},
{
"date": "Mon, 02 Jan 2023 07:46:41 GMT",
"tag": "@fluentui/dom-utilities_v2.2.3",
"version": "2.2.3",
"comments": {
"none": [
{
"author": "martinhochel@microsoft.com",
"package": "@fluentui/dom-utilities",
"commit": "4ec2b998b294d6d9c3196d3d82893bdd97d0c105",
"comment": "chore(scripts): move index.ts to to follow sub-folder domain packaging"
}
]
}
},
{
"date": "Fri, 30 Dec 2022 07:50:59 GMT",
"tag": "@fluentui/dom-utilities_v2.2.3",
"version": "2.2.3",
"comments": {
"none": [
{
"author": "martinhochel@microsoft.com",
"package": "@fluentui/dom-utilities",
"commit": "194b0cf0cc27c1c1233aa945f09b3ad29778d8ca",
"comment": "chore(scripts): use for @fluentui/scripts version within all package.json"
}
]
}
},
{
"date": "Thu, 01 Dec 2022 07:57:07 GMT",
"tag": "@fluentui/dom-utilities_v2.2.3",
"version": "2.2.3",
"comments": {
"none": [
{
"author": "martinhochel@microsoft.com",
"package": "@fluentui/dom-utilities",
"commit": "c46ff8dec351ebf57efb4114366016010b285429",
"comment": "chore: enable isolateModules"
}
]
}
},
{
"date": "Wed, 09 Nov 2022 07:48:12 GMT",
"tag": "@fluentui/dom-utilities_v2.2.3",
"version": "2.2.3",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.3",
"commit": "99542b13a50433f03228b30113f305bc38a1340c"
}
]
}
},
{
"date": "Mon, 08 Aug 2022 07:39:33 GMT",
"tag": "@fluentui/dom-utilities_v2.2.2",
"version": "2.2.2",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.2",
"commit": "1e8c83109fbe238c250862aa4ab773e9fff7d70d"
}
]
}
},
{
"date": "Fri, 13 May 2022 07:45:35 GMT",
"tag": "@fluentui/dom-utilities_v2.2.1",
"version": "2.2.1",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.1",
"commit": "bcafc0d8c2fdaa68473a317b6d179c5534257602"
}
]
}
},
{
"date": "Thu, 03 Mar 2022 07:24:26 GMT",
"tag": "@fluentui/dom-utilities_v2.2.0",
"version": "2.2.0",
"comments": {
"minor": [
{
"author": "dzearing@microsoft.com",
"package": "@fluentui/dom-utilities",
"commit": "f2f1c0ea948cc3517eeb442c05433eb0918def29",
"comment": "Adding explicit export maps on all consumer packages for FUIR 8 and 9."
},
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.2.0",
"commit": "e6fd843a2d46bb138f5b05f4656b4c3726bc5aed"
}
]
}
},
{
"date": "Thu, 25 Nov 2021 14:54:16 GMT",
"tag": "@fluentui/dom-utilities_v2.1.5",
"version": "2.1.5",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/dom-utilities",
"comment": "Bump @fluentui/set-version to v8.1.5",
"commit": "b851427662a56e25eb4af2c7e5583ea162356186"
}
]
}
},
{
"date": "Mon, 20 Sep 2021 07:36:26 GMT",
"tag": "@fluentui/dom-utilities_v2.1.4",
"version": "2.1.4",
"comments": {
"none": [
{
"author": "lingfangao@hotmail.com",
"package": "@fluentui/dom-utilities",
"comment": "chore: use versioon eslint-plugin and react-conformance in dev dependencies",
"commit": "b8a304770f77c0353553a152dad34421070400a6"
},
{
"author": "lingfangao@hotmail.com",
"package": "@fluentui/dom-utilities",
"commit": "b8a304770f77c0353553a152dad34421070400a6",
"comment": "Bump @fluentui/dom-utilities to v2.1.4"
}
]
}
},
{
"date": "Tue, 24 Aug 2021 07:34:48 GMT",
"tag": "@fluentui/dom-utilities_v2.1.4",
"version": "2.1.4",
"comments": {
"none": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.4.1",
"author": "dzearing@hotmail.com",
"commit": "0abd957c8d4421018e6d792c2a4aa8876967392b",
"package": "@fluentui/dom-utilities"
}
]
}
},
{
"date": "Fri, 20 Aug 2021 07:37:28 GMT",
"tag": "@fluentui/dom-utilities_v2.1.4",
"version": "2.1.4",
"comments": {
"none": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.4.0",
"author": "behowell@microsoft.com",
"commit": "21df8406417c5c5c1d053561a498b920ac962b4b",
"package": "@fluentui/dom-utilities"
}
]
}
},
{
"date": "Tue, 03 Aug 2021 07:39:30 GMT",
"tag": "@fluentui/dom-utilities_v2.1.4",
"version": "2.1.4",
"comments": {
"patch": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.3.3",
"author": "behowell@microsoft.com",
"commit": "86476ee0511ad2693c2829b959f93a87ad10f095",
"package": "@fluentui/dom-utilities"
}
]
}
},
{
"date": "Fri, 09 Jul 2021 07:39:31 GMT",
"tag": "@fluentui/dom-utilities_v2.1.3",
"version": "2.1.3",
"comments": {
"patch": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.3.2",
"author": "martinhochel@microsoft.com",
"commit": "18902eb64710aa6253a79781357b8390bb13665c",
"package": "@fluentui/dom-utilities"
}
]
}
},
{
"date": "Mon, 07 Jun 2021 07:38:15 GMT",
"tag": "@fluentui/dom-utilities_v2.1.2",
"version": "2.1.2",
"comments": {
"patch": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.3.1",
"author": "martinhochel@microsoft.com",
"commit": "f856cb3f7fbc3edb3646204c0c7e435fc7678dd1",
"package": "@fluentui/dom-utilities"
}
]
}
},
{
"date": "Thu, 20 May 2021 07:41:54 GMT",
"tag": "@fluentui/dom-utilities_v2.1.1",
"version": "2.1.1",
"comments": {
"patch": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.3.0",
"author": "elcraig@microsoft.com",
"commit": "630b71c415cd40ed0e36773eab99d62cd02a30fb",
"package": "@fluentui/dom-utilities"
}
]
}
},
{
"date": "Fri, 30 Apr 2021 07:42:23 GMT",
"tag": "@fluentui/dom-utilities_v2.1.0",
"version": "2.1.0",
"comments": {
"minor": [
{
"comment": "Upgrade to typescript 4.1.5",
"author": "joschect@microsoft.com",
"commit": "2b62c457bb860f6675fae4acae86ee6c0b06c279",
"package": "@fluentui/dom-utilities"
}
],
"patch": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.2.0",
"author": "joschect@microsoft.com",
"commit": "2b62c457bb860f6675fae4acae86ee6c0b06c279",
"package": "@fluentui/dom-utilities"
},
{
"comment": "Bump @fluentui/set-version to v8.1.0",
"author": "joschect@microsoft.com",
"commit": "2b62c457bb860f6675fae4acae86ee6c0b06c279",
"package": "@fluentui/dom-utilities"
},
{
"comment": "Bump @fluentui/scripts to v1.0.0",
"author": "joschect@microsoft.com",
"commit": "2b62c457bb860f6675fae4acae86ee6c0b06c279",
"package": "@fluentui/dom-utilities"
}
]
}
},
{
"date": "Fri, 23 Apr 2021 07:37:10 GMT",
"tag": "@fluentui/dom-utilities_v2.0.3",
"version": "2.0.3",
"comments": {
"patch": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.1.1",
"author": "olfedias@microsoft.com",
"commit": "7d1a9a8aee217022e55b8c39c723b1390b5d8095",
"package": "@fluentui/dom-utilities"
}
]
}
},
{
"date": "Wed, 31 Mar 2021 00:53:43 GMT",
"tag": "@fluentui/dom-utilities_v2.0.2",
"version": "2.0.2",
"comments": {
"patch": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.1.0",
"author": "elcraig@microsoft.com",
"commit": "d41b79242e6b682dfa58fcd76797ecfd9146d4cf",
"package": "@fluentui/dom-utilities"
}
]
}
},
{
"date": "Mon, 15 Mar 2021 07:36:20 GMT",
"tag": "@fluentui/dom-utilities_v2.0.1",
"version": "2.0.1",
"comments": {
"none": [
{
"comment": "Remove unneeded scripts",
"author": "elcraig@microsoft.com",
"commit": "3b4dd6b9e941da11297cea43c5218a4da2d277d5",
"package": "@fluentui/dom-utilities"
}
]
}
},
{
"date": "Fri, 12 Mar 2021 20:04:27 GMT",
"tag": "@fluentui/dom-utilities_v2.0.1",
"version": "2.0.1",
"comments": {
"none": [
{
"comment": "Move `@types/node` and `@types/webpack-env` devDependencies to root, and remove unneeded references",
"author": "elcraig@microsoft.com",
"commit": "8789ee1074aad852bd0a95d0183dbdf2ee718e1d",
"package": "@fluentui/dom-utilities"
}
]
}
},
{
"date": "Fri, 26 Feb 2021 01:16:27 GMT",
"tag": "@fluentui/dom-utilities_v2.0.1",
"version": "2.0.1",
"comments": {
"patch": [
{
"comment": "Release major version",
"author": "elcraig@microsoft.com",
"commit": "71f0a43b375b4a932ecbcf6778288422db2dc267",
"package": "@fluentui/dom-utilities"
}
]
}
},
{
"date": "Thu, 18 Feb 2021 12:27:34 GMT",
"tag": "@fluentui/dom-utilities_v2.0.0-beta.2",
"version": "2.0.0-beta.2",
"comments": {
"prerelease": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.0.0-beta.2",
"author": "elcraig@microsoft.com",
"commit": "1072765ed2e0ffda34688d84d376a8bc4bf928f0",
"package": "@fluentui/dom-utilities"
}
]
}
},
{
"date": "Wed, 17 Feb 2021 12:21:39 GMT",
"tag": "@fluentui/dom-utilities_v2.0.0-beta.1",
"version": "2.0.0-beta.1",
"comments": {
"none": [
{
"comment": "chore: apply single version policy on jest",
"author": "martinhochel@microsoft.com",
"commit": "0de01d003589b5e2f166bc070729dca20125a091",
"package": "@fluentui/dom-utilities"
}
]
}
},
{
"date": "Thu, 11 Feb 2021 12:18:41 GMT",
"tag": "@fluentui/dom-utilities_v2.0.0-beta.1",
"version": "2.0.0-beta.1",
"comments": {
"none": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.0.0-beta.1",
"author": "martinhochel@microsoft.com",
"commit": "7566015a7edd355b4fcd3796bc8f44f732ef0877",
"package": "@fluentui/dom-utilities"
}
]
}
},
{
"date": "Wed, 03 Feb 2021 05:51:40 GMT",
"tag": "@fluentui/dom-utilities_v2.0.0-beta.1",
"version": "2.0.0-beta.1",
"comments": {
"none": [
{
"comment": "refactor: remove unused .npmrc in packages",
"author": "hantatsang@gmail.com",
"commit": "c688ee2ea6f192c4874974ebf11598523ccf6db9",
"package": "@fluentui/dom-utilities"
}
]
}
},
{
"date": "Thu, 28 Jan 2021 12:25:56 GMT",
"tag": "@fluentui/dom-utilities_v2.0.0-beta.1",
"version": "2.0.0-beta.1",
"comments": {
"none": [
{
"comment": "Delete update-api script which is no longer needed",
"author": "elcraig@microsoft.com",
"commit": "943a9ef5768a9cd77ade84217d142f93b1be6127",
"package": "@fluentui/dom-utilities"
}
]
}
},
{
"date": "Fri, 23 Oct 2020 03:26:15 GMT",
"tag": "@fluentui/dom-utilities_v2.0.0-beta.0",
"version": "2.0.0-beta.0",
"comments": {
"prerelease": [
{
"comment": "Add missing version.ts; Remove unneeded package dependencies.",
"author": "xgao@microsoft.com",
"commit": "9775badfc989f8820a437367a53f761cc3ca7512",
"package": "@fluentui/dom-utilities"
},
{
"comment": "Rename @uifabric/set-version to @fluentui/set-version",
"author": "ololubek@microsoft.com",
"commit": "2eba5d5be163a7a64975f058dc38b465f2363064",
"package": "@fluentui/dom-utilities"
}
],
"none": [
{
"comment": "Update npmignore",
"author": "elcraig@microsoft.com",
"commit": "aec02d96e7cef745e9867c03a528426a5ad28038",
"package": "@fluentui/dom-utilities"
},
{
"comment": "Rename build-related packages",
"author": "elcraig@microsoft.com",
"commit": "32a158fd2c7fca8dc308a3e41f692817e6c26c44",
"package": "@fluentui/dom-utilities"
},
{
"comment": "Update package version for @fluentui/react version 8 beta release.",
"author": "xgao@microsoft.com",
"commit": "ee2622a8572c11f1eeb9d7f1c8d759d6ae0281ca",
"package": "@fluentui/dom-utilities"
}
]
}
},
{
"date": "Fri, 25 Sep 2020 12:25:17 GMT",
"tag": "@fluentui/dom-utilities_v1.1.1",
"version": "1.1.1",
"comments": {
"none": [
{
"comment": "Remove same-package path aliases",
"author": "elcraig@microsoft.com",
"commit": "85432b281ce55e1a990dd811e5adebbad84e7cb8",
"package": "@fluentui/dom-utilities"
}
]
}
},
{
"date": "Thu, 17 Sep 2020 15:52:49 GMT",
"tag": "@fluentui/dom-utilities_v1.1.1",
"version": "1.1.1",
"comments": {
"patch": [
{
"comment": "fix: elementContains should behave like .contains()",
"author": "olfedias@microsoft.com",
"commit": "1cdb4aa1cd69dce6eabf8fc9551191eed2158821",
"package": "@fluentui/dom-utilities"
}
]
}
},
{
"date": "Wed, 16 Sep 2020 12:27:22 GMT",
"tag": "@fluentui/dom-utilities_v1.1.0",
"version": "1.1.0",
"comments": {
"patch": [
{
"comment": "Add API report file",
"author": "elcraig@microsoft.com",
"commit": "7d093f59a06527fc39656c903cab4470650e3acd",
"package": "@fluentui/dom-utilities"
}
],
"minor": [
{
"comment": "Port over virtual DOM utilities and tests",
"author": "tmichon@microsoft.com",
"commit": "0903cff93e15f9865634c79a42fb2fbc14e7964e",
"package": "@fluentui/dom-utilities"
}
]
}
}
]
}
+388
View File
@@ -0,0 +1,388 @@
# Change Log - @fluentui/dom-utilities
This log was last generated on Fri, 21 Feb 2025 07:20:19 GMT and should not be manually modified.
<!-- Start content -->
## [2.3.10](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.3.10)
Fri, 21 Feb 2025 07:20:19 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.3.9..@fluentui/dom-utilities_v2.3.10)
### Patches
- Bump @fluentui/set-version to v8.2.24 ([PR #33879](https://github.com/microsoft/fluentui/pull/33879) by beachball)
## [2.3.9](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.3.9)
Fri, 11 Oct 2024 16:51:53 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.3.8..@fluentui/dom-utilities_v2.3.9)
### Patches
- Fix regression caused by #32996 ([PR #33024](https://github.com/microsoft/fluentui/pull/33024) by miclo@microsoft.com)
## [2.3.8](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.3.8)
Tue, 08 Oct 2024 07:23:46 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.3.7..@fluentui/dom-utilities_v2.3.8)
### Patches
- Fix TypeError in portalContainsElement when element is Document or similar ([PR #32996](https://github.com/microsoft/fluentui/pull/32996) by miclo@microsoft.com)
## [2.3.7](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.3.7)
Mon, 24 Jun 2024 07:33:22 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.3.6..@fluentui/dom-utilities_v2.3.7)
### Patches
- Bump @fluentui/set-version to v8.2.23 ([commit](https://github.com/microsoft/fluentui/commit/444d2ef497b5be5b4252f4af86ded3d2db7a0850) by beachball)
## [2.3.6](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.3.6)
Thu, 06 Jun 2024 07:26:46 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.3.5..@fluentui/dom-utilities_v2.3.6)
### Patches
- Bump @fluentui/set-version to v8.2.22 ([commit](https://github.com/microsoft/fluentui/commit/e5e806f46bd00bc7baffbfe7514a617600ba2d47) by beachball)
## [2.3.5](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.3.5)
Tue, 28 May 2024 07:28:20 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.3.4..@fluentui/dom-utilities_v2.3.5)
### Patches
- Bump @fluentui/set-version to v8.2.21 ([PR #31324](https://github.com/microsoft/fluentui/pull/31324) by beachball)
## [2.3.4](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.3.4)
Fri, 24 May 2024 07:28:17 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.3.3..@fluentui/dom-utilities_v2.3.4)
### Patches
- Bump @fluentui/set-version to v8.2.20 ([commit](https://github.com/microsoft/fluentui/commit/e5b614623b9aa1ae3f1f86f3e753b934943a4601) by beachball)
## [2.3.3](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.3.3)
Thu, 23 May 2024 07:28:51 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.3.2..@fluentui/dom-utilities_v2.3.3)
### Patches
- Bump @fluentui/set-version to v8.2.19 ([commit](https://github.com/microsoft/fluentui/commit/10e6758b203de79c53ce31ba264e137f83f50ff4) by beachball)
## [2.3.2](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.3.2)
Mon, 20 May 2024 07:29:20 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.3.1..@fluentui/dom-utilities_v2.3.2)
### Patches
- Bump @fluentui/set-version to v8.2.18 ([commit](https://github.com/microsoft/fluentui/commit/eadc00f974b3199e6c34d2e9d16015add154ec3b) by beachball)
## [2.3.1](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.3.1)
Wed, 24 Apr 2024 07:27:48 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.3.0..@fluentui/dom-utilities_v2.3.1)
### Patches
- Bump @fluentui/set-version to v8.2.17 ([PR #31130](https://github.com/microsoft/fluentui/pull/31130) by beachball)
## [2.3.0](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.3.0)
Mon, 22 Apr 2024 07:28:25 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.2.16..@fluentui/dom-utilities_v2.3.0)
### Minor changes
- feat: add shadow DOM support for DOM APIs ([PR #30689](https://github.com/microsoft/fluentui/pull/30689) by seanmonahan@microsoft.com)
## [2.2.16](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.2.16)
Fri, 12 Apr 2024 07:29:11 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.2.15..@fluentui/dom-utilities_v2.2.16)
### Patches
- Bump @fluentui/set-version to v8.2.16 ([PR #31022](https://github.com/microsoft/fluentui/pull/31022) by beachball)
## [2.2.15](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.2.15)
Wed, 03 Apr 2024 07:29:31 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.2.14..@fluentui/dom-utilities_v2.2.15)
### Patches
- Bump @fluentui/set-version to v8.2.15 ([PR #30943](https://github.com/microsoft/fluentui/pull/30943) by beachball)
## [2.2.14](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.2.14)
Wed, 10 Jan 2024 07:28:48 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.2.13..@fluentui/dom-utilities_v2.2.14)
### Patches
- chore: disallow document and window access ([PR #30063](https://github.com/microsoft/fluentui/pull/30063) by seanmonahan@microsoft.com)
- Bump @fluentui/set-version to v8.2.14 ([PR #30063](https://github.com/microsoft/fluentui/pull/30063) by beachball)
## [2.2.13](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.2.13)
Thu, 14 Dec 2023 07:30:10 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.2.12..@fluentui/dom-utilities_v2.2.13)
### Patches
- Bump @fluentui/set-version to v8.2.13 ([PR #30061](https://github.com/microsoft/fluentui/pull/30061) by beachball)
## [2.2.12](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.2.12)
Sat, 28 Oct 2023 00:29:16 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.2.11..@fluentui/dom-utilities_v2.2.12)
### Patches
- Bump @fluentui/set-version to v8.2.12 ([commit](https://github.com/microsoft/fluentui/commit/70d0762fd12eb211f7c1dbe31a23b2fbb73a67c4) by beachball)
## [2.2.11](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.2.11)
Wed, 31 May 2023 07:38:40 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.2.10..@fluentui/dom-utilities_v2.2.11)
### Patches
- Bump @fluentui/set-version to v8.2.11 ([commit](https://github.com/microsoft/fluentui/commit/dd8c30d9b97f68eb332366fc0e69775a88775319) by beachball)
## [2.2.10](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.2.10)
Tue, 30 May 2023 07:36:09 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.2.9..@fluentui/dom-utilities_v2.2.10)
### Patches
- Bump @fluentui/set-version to v8.2.10 ([PR #27685](https://github.com/microsoft/fluentui/pull/27685) by beachball)
## [2.2.9](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.2.9)
Fri, 05 May 2023 18:14:03 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.2.8..@fluentui/dom-utilities_v2.2.9)
### Patches
- fix: explicitly ship dist/ folder. ([PR #27769](https://github.com/microsoft/fluentui/pull/27769) by tristan.watanabe@gmail.com)
- Bump @fluentui/set-version to v8.2.9 ([PR #27769](https://github.com/microsoft/fluentui/pull/27769) by beachball)
## [2.2.8](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.2.8)
Tue, 02 May 2023 00:58:14 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.2.7..@fluentui/dom-utilities_v2.2.8)
### Patches
- fix: esm, cjs, and amd folders should all be published correctly. ([PR #27736](https://github.com/microsoft/fluentui/pull/27736) by tristan.watanabe@gmail.com)
- Bump @fluentui/set-version to v8.2.8 ([PR #27736](https://github.com/microsoft/fluentui/pull/27736) by beachball)
## [2.2.7](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.2.7)
Mon, 01 May 2023 07:39:54 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.2.6..@fluentui/dom-utilities_v2.2.7)
### Patches
- Bump @fluentui/set-version to v8.2.7 ([PR #27724](https://github.com/microsoft/fluentui/pull/27724) by beachball)
## [2.2.6](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.2.6)
Fri, 17 Mar 2023 08:15:56 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.2.5..@fluentui/dom-utilities_v2.2.6)
### Patches
- Bump @fluentui/set-version to v8.2.6 ([PR #27210](https://github.com/microsoft/fluentui/pull/27210) by beachball)
## [2.2.5](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.2.5)
Fri, 03 Feb 2023 07:50:06 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.2.4..@fluentui/dom-utilities_v2.2.5)
### Patches
- Bump @fluentui/set-version to v8.2.5 ([PR #26569](https://github.com/microsoft/fluentui/pull/26569) by beachball)
## [2.2.4](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.2.4)
Tue, 10 Jan 2023 07:50:15 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.2.3..@fluentui/dom-utilities_v2.2.4)
### Patches
- Bump @fluentui/set-version to v8.2.4 ([PR #26260](https://github.com/microsoft/fluentui/pull/26260) by beachball)
## [2.2.3](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.2.3)
Wed, 09 Nov 2022 07:48:12 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.2.2..@fluentui/dom-utilities_v2.2.3)
### Patches
- Bump @fluentui/set-version to v8.2.3 ([PR #25564](https://github.com/microsoft/fluentui/pull/25564) by beachball)
## [2.2.2](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.2.2)
Mon, 08 Aug 2022 07:39:33 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.2.1..@fluentui/dom-utilities_v2.2.2)
### Patches
- Bump @fluentui/set-version to v8.2.2 ([PR #24212](https://github.com/microsoft/fluentui/pull/24212) by beachball)
## [2.2.1](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.2.1)
Fri, 13 May 2022 07:45:35 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.2.0..@fluentui/dom-utilities_v2.2.1)
### Patches
- Bump @fluentui/set-version to v8.2.1 ([PR #22966](https://github.com/microsoft/fluentui/pull/22966) by beachball)
## [2.2.0](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.2.0)
Thu, 03 Mar 2022 07:24:26 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.1.5..@fluentui/dom-utilities_v2.2.0)
### Minor changes
- Adding explicit export maps on all consumer packages for FUIR 8 and 9. ([PR #21508](https://github.com/microsoft/fluentui/pull/21508) by dzearing@microsoft.com)
- Bump @fluentui/set-version to v8.2.0 ([PR #21919](https://github.com/microsoft/fluentui/pull/21919) by beachball)
## [2.1.5](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.1.5)
Thu, 25 Nov 2021 14:54:16 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.1.4..@fluentui/dom-utilities_v2.1.5)
### Patches
- Bump @fluentui/set-version to v8.1.5 ([PR #20784](https://github.com/microsoft/fluentui/pull/20784) by beachball)
## [2.1.4](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.1.4)
Tue, 03 Aug 2021 07:39:30 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.1.3..@fluentui/dom-utilities_v2.1.4)
### Patches
- Bump @fluentui/eslint-plugin to v1.3.3 ([PR #19169](https://github.com/microsoft/fluentui/pull/19169) by behowell@microsoft.com)
## [2.1.3](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.1.3)
Fri, 09 Jul 2021 07:39:31 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.1.2..@fluentui/dom-utilities_v2.1.3)
### Patches
- Bump @fluentui/eslint-plugin to v1.3.2 ([PR #18808](https://github.com/microsoft/fluentui/pull/18808) by martinhochel@microsoft.com)
## [2.1.2](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.1.2)
Mon, 07 Jun 2021 07:38:15 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.1.1..@fluentui/dom-utilities_v2.1.2)
### Patches
- Bump @fluentui/eslint-plugin to v1.3.1 ([PR #18437](https://github.com/microsoft/fluentui/pull/18437) by martinhochel@microsoft.com)
## [2.1.1](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.1.1)
Thu, 20 May 2021 07:41:54 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.1.0..@fluentui/dom-utilities_v2.1.1)
### Patches
- Bump @fluentui/eslint-plugin to v1.3.0 ([PR #18024](https://github.com/microsoft/fluentui/pull/18024) by elcraig@microsoft.com)
## [2.1.0](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.1.0)
Fri, 30 Apr 2021 07:42:23 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.0.3..@fluentui/dom-utilities_v2.1.0)
### Minor changes
- Upgrade to typescript 4.1.5 ([PR #17932](https://github.com/microsoft/fluentui/pull/17932) by joschect@microsoft.com)
### Patches
- Bump @fluentui/eslint-plugin to v1.2.0 ([PR #17932](https://github.com/microsoft/fluentui/pull/17932) by joschect@microsoft.com)
- Bump @fluentui/set-version to v8.1.0 ([PR #17932](https://github.com/microsoft/fluentui/pull/17932) by joschect@microsoft.com)
- Bump @fluentui/scripts to v1.0.0 ([PR #17932](https://github.com/microsoft/fluentui/pull/17932) by joschect@microsoft.com)
## [2.0.3](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.0.3)
Fri, 23 Apr 2021 07:37:10 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.0.2..@fluentui/dom-utilities_v2.0.3)
### Patches
- Bump @fluentui/eslint-plugin to v1.1.1 ([PR #17894](https://github.com/microsoft/fluentui/pull/17894) by olfedias@microsoft.com)
## [2.0.2](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.0.2)
Wed, 31 Mar 2021 00:53:43 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.0.1..@fluentui/dom-utilities_v2.0.2)
### Patches
- Bump @fluentui/eslint-plugin to v1.1.0 ([PR #17568](https://github.com/microsoft/fluentui/pull/17568) by elcraig@microsoft.com)
## [2.0.1](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.0.1)
Fri, 26 Feb 2021 01:16:27 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.0.0-beta.2..@fluentui/dom-utilities_v2.0.1)
### Patches
- Release major version ([PR #17169](https://github.com/microsoft/fluentui/pull/17169) by elcraig@microsoft.com)
## [2.0.0-beta.2](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.0.0-beta.2)
Thu, 18 Feb 2021 12:27:34 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v2.0.0-beta.1..@fluentui/dom-utilities_v2.0.0-beta.2)
### Changes
- Bump @fluentui/eslint-plugin to v1.0.0-beta.2 ([PR #16975](https://github.com/microsoft/fluentui/pull/16975) by elcraig@microsoft.com)
## [2.0.0-beta.0](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.0.0-beta.0)
Fri, 23 Oct 2020 03:26:15 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v1.1.1..@fluentui/dom-utilities_v2.0.0-beta.0)
### Changes
- Add missing version.ts; Remove unneeded package dependencies. ([PR #15456](https://github.com/microsoft/fluentui/pull/15456) by xgao@microsoft.com)
- Rename @uifabric/set-version to @fluentui/set-version ([PR #15616](https://github.com/microsoft/fluentui/pull/15616) by ololubek@microsoft.com)
## [1.1.1](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v1.1.1)
Thu, 17 Sep 2020 15:52:49 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/dom-utilities_v1.1.0..@fluentui/dom-utilities_v1.1.1)
### Patches
- fix: elementContains should behave like .contains() ([PR #15089](https://github.com/microsoft/fluentui/pull/15089) by olfedias@microsoft.com)
## [1.1.0](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v1.1.0)
Wed, 16 Sep 2020 12:27:22 GMT
### Minor changes
- Port over virtual DOM utilities and tests ([PR #15039](https://github.com/microsoft/fluentui/pull/15039) by tmichon@microsoft.com)
### Patches
- Add API report file ([PR #15058](https://github.com/microsoft/fluentui/pull/15058) by elcraig@microsoft.com)
+15
View File
@@ -0,0 +1,15 @@
@fluentui/dom-utilities
Copyright (c) Microsoft Corporation
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Note: Usage of the fonts and icons referenced in Fluent UI React is subject to the terms listed at https://aka.ms/fluentui-assets-license
+7
View File
@@ -0,0 +1,7 @@
# @fluentui/dom-utilities
**DOM Utilities for use within [Fluent UI React](https://developer.microsoft.com/en-us/fluentui)**
This package contains extensions for traversing DOM within Fluent components, which should generally be used instead of the native equivalents.
Fluent supports the concept of 'layers', which leverage React 'Portals' to project popups and other overlay content over other content.
However, since this is not a native DOM concept, this library provides functionality to traverse the DOM in a way which reflects the hierarchy established by the projections.
+3
View File
@@ -0,0 +1,3 @@
{
"extends": "@fluentui/scripts-api-extractor/api-extractor.common.json"
}
+99
View File
@@ -0,0 +1,99 @@
export declare const DATA_PORTAL_ATTRIBUTE = "data-portal-element";
/**
* Determines whether or not a parent element contains a given child element.
* If `allowVirtualParents` is true, this method may return `true` if the child
* has the parent in its virtual element hierarchy.
*
* @public
*/
export declare function elementContains(parent: HTMLElement | null, child: HTMLElement | null, allowVirtualParents?: boolean): boolean;
/**
* Determines if an element, or any of its ancestors, contain the given attribute
* @param element - element to start searching at
* @param attribute - the attribute to search for
* @returns the value of the first instance found
*/
export declare function elementContainsAttribute(element: HTMLElement, attribute: string, doc?: Document): string | null;
/**
* Finds the first parent element where the matchFunction returns true
* @param element - element to start searching at
* @param matchFunction - the function that determines if the element is a match
* @returns the matched element or null no match was found
*/
export declare function findElementRecursive(element: HTMLElement | null, matchFunction: (element: HTMLElement) => boolean, doc?: Document): HTMLElement | null;
export declare const getActiveElement: (doc: Document) => Element | null;
/**
* Gets the elements which are child elements of the given element.
* If `allowVirtualChildren` is `true`, this method enumerates virtual child elements
* after the original children.
* @param parent - The element to get the children of.
* @param allowVirtualChildren - true if the method should enumerate virtual child elements.
*/
export declare function getChildren(parent: HTMLElement, allowVirtualChildren?: boolean): HTMLElement[];
export declare const getEventTarget: (event: Event) => HTMLElement | null;
/**
* Gets the element which is the parent of a given element.
* If `allowVirtuaParents` is `true`, this method prefers the virtual parent over
* real DOM parent when present.
*
* @public
*/
export declare function getParent(child: HTMLElement, allowVirtualParents?: boolean): HTMLElement | null;
/**
* Gets the virtual parent given the child element, if it exists.
*
* @public
*/
export declare function getVirtualParent(child: HTMLElement): HTMLElement | undefined;
/**
* Determines whether or not an element has the virtual hierarchy extension.
*
* @public
*/
export declare function isVirtualElement(element: HTMLElement | IVirtualElement): element is IVirtualElement;
/**
* Attached interface for elements which support virtual references.
* Used internally by the virtual hierarchy methods.
*/
export declare interface IVirtualElement extends HTMLElement {
_virtual: {
parent?: IVirtualElement;
children: IVirtualElement[];
};
}
/**
* Determine whether a target is within a portal from perspective of root or optional parent.
* This function only works against portal components that use the setPortalAttribute function.
* If both parent and child are within the same portal this function will return false.
* @param target - Element to query portal containment status of.
* @param parent - Optional parent perspective. Search for containing portal stops at parent
* (or root if parent is undefined or invalid.)
*/
export declare function portalContainsElement(target: HTMLElement, parent?: HTMLElement, doc?: Document): boolean;
/**
* Identify element as a portal by setting an attribute.
* @param element - Element to mark as a portal.
*/
export declare function setPortalAttribute(element: HTMLElement): void;
/**
* Sets the virtual parent of an element.
* Pass `undefined` as the `parent` to clear the virtual parent.
*
* @public
*/
export declare function setVirtualParent(child: HTMLElement, parent: HTMLElement | null): void;
export { }
+57
View File
@@ -0,0 +1,57 @@
## API Report File for "@fluentui/dom-utilities"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
// @public (undocumented)
export const DATA_PORTAL_ATTRIBUTE = "data-portal-element";
// @public
export function elementContains(parent: HTMLElement | null, child: HTMLElement | null, allowVirtualParents?: boolean): boolean;
// @public
export function elementContainsAttribute(element: HTMLElement, attribute: string, doc?: Document): string | null;
// @public
export function findElementRecursive(element: HTMLElement | null, matchFunction: (element: HTMLElement) => boolean, doc?: Document): HTMLElement | null;
// @public (undocumented)
export const getActiveElement: (doc: Document) => Element | null;
// @public
export function getChildren(parent: HTMLElement, allowVirtualChildren?: boolean): HTMLElement[];
// @public (undocumented)
export const getEventTarget: (event: Event) => HTMLElement | null;
// @public
export function getParent(child: HTMLElement, allowVirtualParents?: boolean): HTMLElement | null;
// @public
export function getVirtualParent(child: HTMLElement): HTMLElement | undefined;
// @public
export function isVirtualElement(element: HTMLElement | IVirtualElement): element is IVirtualElement;
// @public
export interface IVirtualElement extends HTMLElement {
// (undocumented)
_virtual: {
parent?: IVirtualElement;
children: IVirtualElement[];
};
}
// @public
export function portalContainsElement(target: HTMLElement, parent?: HTMLElement, doc?: Document): boolean;
// @public
export function setPortalAttribute(element: HTMLElement): void;
// @public
export function setVirtualParent(child: HTMLElement, parent: HTMLElement | null): void;
// (No @packageDocumentation comment for this package)
```
+3
View File
@@ -0,0 +1,3 @@
import { preset } from '@fluentui/scripts-tasks';
preset();
+10
View File
@@ -0,0 +1,10 @@
/**
* Attached interface for elements which support virtual references.
* Used internally by the virtual hierarchy methods.
*/
export interface IVirtualElement extends HTMLElement {
_virtual: {
parent?: IVirtualElement;
children: IVirtualElement[];
};
}
+5
View File
@@ -0,0 +1,5 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
});
//# sourceMappingURL=IVirtualElement.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"IVirtualElement.js","sourceRoot":"../src/","sources":["IVirtualElement.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Attached interface for elements which support virtual references.\n * Used internally by the virtual hierarchy methods.\n */\nexport interface IVirtualElement extends HTMLElement {\n _virtual: {\n parent?: IVirtualElement;\n children: IVirtualElement[];\n };\n}\n"]}
+8
View File
@@ -0,0 +1,8 @@
/**
* Determines whether or not a parent element contains a given child element.
* If `allowVirtualParents` is true, this method may return `true` if the child
* has the parent in its virtual element hierarchy.
*
* @public
*/
export declare function elementContains(parent: HTMLElement | null, child: HTMLElement | null, allowVirtualParents?: boolean): boolean;
+40
View File
@@ -0,0 +1,40 @@
define(["require", "exports", "./getParent"], function (require, exports, getParent_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.elementContains = void 0;
/**
* Determines whether or not a parent element contains a given child element.
* If `allowVirtualParents` is true, this method may return `true` if the child
* has the parent in its virtual element hierarchy.
*
* @public
*/
function elementContains(parent, child, allowVirtualParents) {
if (allowVirtualParents === void 0) { allowVirtualParents = true; }
var isContained = false;
if (parent && child) {
if (allowVirtualParents) {
if (parent === child) {
isContained = true;
}
else {
isContained = false;
while (child) {
var nextParent = (0, getParent_1.getParent)(child);
if (nextParent === parent) {
isContained = true;
break;
}
child = nextParent;
}
}
}
else if (parent.contains) {
isContained = parent.contains(child);
}
}
return isContained;
}
exports.elementContains = elementContains;
});
//# sourceMappingURL=elementContains.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"elementContains.js","sourceRoot":"../src/","sources":["elementContains.ts"],"names":[],"mappings":";;;;IACA;;;;;;OAMG;IACH,SAAgB,eAAe,CAC7B,MAA0B,EAC1B,KAAyB,EACzB,mBAAmC;QAAnC,oCAAA,EAAA,0BAAmC;QAEnC,IAAI,WAAW,GAAG,KAAK,CAAC;QAExB,IAAI,MAAM,IAAI,KAAK,EAAE,CAAC;YACpB,IAAI,mBAAmB,EAAE,CAAC;gBACxB,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;oBACrB,WAAW,GAAG,IAAI,CAAC;gBACrB,CAAC;qBAAM,CAAC;oBACN,WAAW,GAAG,KAAK,CAAC;oBAEpB,OAAO,KAAK,EAAE,CAAC;wBACb,IAAM,UAAU,GAAuB,IAAA,qBAAS,EAAC,KAAK,CAAC,CAAC;wBAExD,IAAI,UAAU,KAAK,MAAM,EAAE,CAAC;4BAC1B,WAAW,GAAG,IAAI,CAAC;4BACnB,MAAM;wBACR,CAAC;wBAED,KAAK,GAAG,UAAU,CAAC;oBACrB,CAAC;gBACH,CAAC;YACH,CAAC;iBAAM,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;gBAC3B,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YACvC,CAAC;QACH,CAAC;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;IA/BD,0CA+BC","sourcesContent":["import { getParent } from './getParent';\n/**\n * Determines whether or not a parent element contains a given child element.\n * If `allowVirtualParents` is true, this method may return `true` if the child\n * has the parent in its virtual element hierarchy.\n *\n * @public\n */\nexport function elementContains(\n parent: HTMLElement | null,\n child: HTMLElement | null,\n allowVirtualParents: boolean = true,\n): boolean {\n let isContained = false;\n\n if (parent && child) {\n if (allowVirtualParents) {\n if (parent === child) {\n isContained = true;\n } else {\n isContained = false;\n\n while (child) {\n const nextParent: HTMLElement | null = getParent(child);\n\n if (nextParent === parent) {\n isContained = true;\n break;\n }\n\n child = nextParent;\n }\n }\n } else if (parent.contains) {\n isContained = parent.contains(child);\n }\n }\n\n return isContained;\n}\n"]}
@@ -0,0 +1,7 @@
/**
* Determines if an element, or any of its ancestors, contain the given attribute
* @param element - element to start searching at
* @param attribute - the attribute to search for
* @returns the value of the first instance found
*/
export declare function elementContainsAttribute(element: HTMLElement, attribute: string, doc?: Document): string | null;
@@ -0,0 +1,17 @@
define(["require", "exports", "./findElementRecursive"], function (require, exports, findElementRecursive_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.elementContainsAttribute = void 0;
/**
* Determines if an element, or any of its ancestors, contain the given attribute
* @param element - element to start searching at
* @param attribute - the attribute to search for
* @returns the value of the first instance found
*/
function elementContainsAttribute(element, attribute, doc) {
var elementMatch = (0, findElementRecursive_1.findElementRecursive)(element, function (testElement) { return testElement.hasAttribute(attribute); }, doc);
return elementMatch && elementMatch.getAttribute(attribute);
}
exports.elementContainsAttribute = elementContainsAttribute;
});
//# sourceMappingURL=elementContainsAttribute.js.map
@@ -0,0 +1 @@
{"version":3,"file":"elementContainsAttribute.js","sourceRoot":"../src/","sources":["elementContainsAttribute.ts"],"names":[],"mappings":";;;;IAEA;;;;;OAKG;IACH,SAAgB,wBAAwB,CAAC,OAAoB,EAAE,SAAiB,EAAE,GAAc;QAC9F,IAAM,YAAY,GAAG,IAAA,2CAAoB,EACvC,OAAO,EACP,UAAC,WAAwB,IAAK,OAAA,WAAW,CAAC,YAAY,CAAC,SAAS,CAAC,EAAnC,CAAmC,EACjE,GAAG,CACJ,CAAC;QAEF,OAAO,YAAY,IAAI,YAAY,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IAC9D,CAAC;IARD,4DAQC","sourcesContent":["import { findElementRecursive } from './findElementRecursive';\n\n/**\n * Determines if an element, or any of its ancestors, contain the given attribute\n * @param element - element to start searching at\n * @param attribute - the attribute to search for\n * @returns the value of the first instance found\n */\nexport function elementContainsAttribute(element: HTMLElement, attribute: string, doc?: Document): string | null {\n const elementMatch = findElementRecursive(\n element,\n (testElement: HTMLElement) => testElement.hasAttribute(attribute),\n doc,\n );\n\n return elementMatch && elementMatch.getAttribute(attribute);\n}\n"]}
@@ -0,0 +1,7 @@
/**
* Finds the first parent element where the matchFunction returns true
* @param element - element to start searching at
* @param matchFunction - the function that determines if the element is a match
* @returns the matched element or null no match was found
*/
export declare function findElementRecursive(element: HTMLElement | null, matchFunction: (element: HTMLElement) => boolean, doc?: Document): HTMLElement | null;
+21
View File
@@ -0,0 +1,21 @@
define(["require", "exports", "./getParent"], function (require, exports, getParent_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.findElementRecursive = void 0;
/**
* Finds the first parent element where the matchFunction returns true
* @param element - element to start searching at
* @param matchFunction - the function that determines if the element is a match
* @returns the matched element or null no match was found
*/
function findElementRecursive(element, matchFunction, doc) {
// eslint-disable-next-line no-restricted-globals
doc !== null && doc !== void 0 ? doc : (doc = document);
if (!element || element === doc.body || element instanceof Document) {
return null;
}
return matchFunction(element) ? element : findElementRecursive((0, getParent_1.getParent)(element), matchFunction);
}
exports.findElementRecursive = findElementRecursive;
});
//# sourceMappingURL=findElementRecursive.js.map
@@ -0,0 +1 @@
{"version":3,"file":"findElementRecursive.js","sourceRoot":"../src/","sources":["findElementRecursive.ts"],"names":[],"mappings":";;;;IACA;;;;;OAKG;IACH,SAAgB,oBAAoB,CAClC,OAA2B,EAC3B,aAAgD,EAChD,GAAc;QAEd,iDAAiD;QACjD,GAAG,aAAH,GAAG,cAAH,GAAG,IAAH,GAAG,GAAK,QAAQ,EAAC;QACjB,IAAI,CAAC,OAAO,IAAI,OAAO,KAAK,GAAG,CAAC,IAAI,IAAI,OAAO,YAAY,QAAQ,EAAE,CAAC;YACpE,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,oBAAoB,CAAC,IAAA,qBAAS,EAAC,OAAO,CAAC,EAAE,aAAa,CAAC,CAAC;IACpG,CAAC;IAXD,oDAWC","sourcesContent":["import { getParent } from './getParent';\n/**\n * Finds the first parent element where the matchFunction returns true\n * @param element - element to start searching at\n * @param matchFunction - the function that determines if the element is a match\n * @returns the matched element or null no match was found\n */\nexport function findElementRecursive(\n element: HTMLElement | null,\n matchFunction: (element: HTMLElement) => boolean,\n doc?: Document,\n): HTMLElement | null {\n // eslint-disable-next-line no-restricted-globals\n doc ??= document;\n if (!element || element === doc.body || element instanceof Document) {\n return null;\n }\n return matchFunction(element) ? element : findElementRecursive(getParent(element), matchFunction);\n}\n"]}
+1
View File
@@ -0,0 +1 @@
export declare const getActiveElement: (doc: Document) => Element | null;
+14
View File
@@ -0,0 +1,14 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getActiveElement = void 0;
var getActiveElement = function (doc) {
var ae = doc.activeElement;
while (ae === null || ae === void 0 ? void 0 : ae.shadowRoot) {
ae = ae.shadowRoot.activeElement;
}
return ae;
};
exports.getActiveElement = getActiveElement;
});
//# sourceMappingURL=getActiveElement.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"getActiveElement.js","sourceRoot":"../src/","sources":["getActiveElement.ts"],"names":[],"mappings":";;;;IAAO,IAAM,gBAAgB,GAAG,UAAC,GAAa;QAC5C,IAAI,EAAE,GAAG,GAAG,CAAC,aAAa,CAAC;QAE3B,OAAO,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,UAAU,EAAE,CAAC;YACtB,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC;QACnC,CAAC;QAED,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC;IARW,QAAA,gBAAgB,oBAQ3B","sourcesContent":["export const getActiveElement = (doc: Document): Element | null => {\n let ae = doc.activeElement;\n\n while (ae?.shadowRoot) {\n ae = ae.shadowRoot.activeElement;\n }\n\n return ae;\n};\n"]}
+8
View File
@@ -0,0 +1,8 @@
/**
* Gets the elements which are child elements of the given element.
* If `allowVirtualChildren` is `true`, this method enumerates virtual child elements
* after the original children.
* @param parent - The element to get the children of.
* @param allowVirtualChildren - true if the method should enumerate virtual child elements.
*/
export declare function getChildren(parent: HTMLElement, allowVirtualChildren?: boolean): HTMLElement[];
+27
View File
@@ -0,0 +1,27 @@
define(["require", "exports", "./isVirtualElement"], function (require, exports, isVirtualElement_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getChildren = void 0;
/**
* Gets the elements which are child elements of the given element.
* If `allowVirtualChildren` is `true`, this method enumerates virtual child elements
* after the original children.
* @param parent - The element to get the children of.
* @param allowVirtualChildren - true if the method should enumerate virtual child elements.
*/
function getChildren(parent, allowVirtualChildren) {
if (allowVirtualChildren === void 0) { allowVirtualChildren = true; }
var children = [];
if (parent) {
for (var i = 0; i < parent.children.length; i++) {
children.push(parent.children.item(i));
}
if (allowVirtualChildren && (0, isVirtualElement_1.isVirtualElement)(parent)) {
children.push.apply(children, parent._virtual.children);
}
}
return children;
}
exports.getChildren = getChildren;
});
//# sourceMappingURL=getChildren.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"getChildren.js","sourceRoot":"../src/","sources":["getChildren.ts"],"names":[],"mappings":";;;;IACA;;;;;;OAMG;IACH,SAAgB,WAAW,CAAC,MAAmB,EAAE,oBAAoC;QAApC,qCAAA,EAAA,2BAAoC;QACnF,IAAM,QAAQ,GAAkB,EAAE,CAAC;QACnC,IAAI,MAAM,EAAE,CAAC;YACX,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBAChD,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAgB,CAAC,CAAC;YACxD,CAAC;YACD,IAAI,oBAAoB,IAAI,IAAA,mCAAgB,EAAC,MAAM,CAAC,EAAE,CAAC;gBACrD,QAAQ,CAAC,IAAI,OAAb,QAAQ,EAAS,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE;YAC7C,CAAC;QACH,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAXD,kCAWC","sourcesContent":["import { isVirtualElement } from './isVirtualElement';\n/**\n * Gets the elements which are child elements of the given element.\n * If `allowVirtualChildren` is `true`, this method enumerates virtual child elements\n * after the original children.\n * @param parent - The element to get the children of.\n * @param allowVirtualChildren - true if the method should enumerate virtual child elements.\n */\nexport function getChildren(parent: HTMLElement, allowVirtualChildren: boolean = true): HTMLElement[] {\n const children: HTMLElement[] = [];\n if (parent) {\n for (let i = 0; i < parent.children.length; i++) {\n children.push(parent.children.item(i) as HTMLElement);\n }\n if (allowVirtualChildren && isVirtualElement(parent)) {\n children.push(...parent._virtual.children);\n }\n }\n return children;\n}\n"]}
+1
View File
@@ -0,0 +1 @@
export declare const getEventTarget: (event: Event) => HTMLElement | null;
+14
View File
@@ -0,0 +1,14 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEventTarget = void 0;
var getEventTarget = function (event) {
var target = event.target;
if (target && target.shadowRoot) {
target = event.composedPath()[0];
}
return target;
};
exports.getEventTarget = getEventTarget;
});
//# sourceMappingURL=getEventTarget.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"getEventTarget.js","sourceRoot":"../src/","sources":["getEventTarget.ts"],"names":[],"mappings":";;;;IAAO,IAAM,cAAc,GAAG,UAAC,KAAY;QACzC,IAAI,MAAM,GAAG,KAAK,CAAC,MAAqB,CAAC;QACzC,IAAI,MAAM,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;YAChC,MAAM,GAAG,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,CAAgB,CAAC;QAClD,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;IAPW,QAAA,cAAc,kBAOzB","sourcesContent":["export const getEventTarget = (event: Event): HTMLElement | null => {\n let target = event.target as HTMLElement;\n if (target && target.shadowRoot) {\n target = event.composedPath()[0] as HTMLElement;\n }\n\n return target;\n};\n"]}
+8
View File
@@ -0,0 +1,8 @@
/**
* Gets the element which is the parent of a given element.
* If `allowVirtuaParents` is `true`, this method prefers the virtual parent over
* real DOM parent when present.
*
* @public
*/
export declare function getParent(child: HTMLElement, allowVirtualParents?: boolean): HTMLElement | null;
+38
View File
@@ -0,0 +1,38 @@
define(["require", "exports", "./getVirtualParent"], function (require, exports, getVirtualParent_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getParent = void 0;
/**
* Gets the element which is the parent of a given element.
* If `allowVirtuaParents` is `true`, this method prefers the virtual parent over
* real DOM parent when present.
*
* @public
*/
function getParent(child, allowVirtualParents) {
var _a, _b;
if (allowVirtualParents === void 0) { allowVirtualParents = true; }
if (!child) {
return null;
}
var parent = allowVirtualParents && (0, getVirtualParent_1.getVirtualParent)(child);
if (parent) {
return parent;
}
// Support looking for parents in shadow DOM
if (typeof child.assignedElements !== 'function' && ((_a = child.assignedSlot) === null || _a === void 0 ? void 0 : _a.parentNode)) {
// Element is slotted
return child.assignedSlot;
}
else if (((_b = child.parentNode) === null || _b === void 0 ? void 0 : _b.nodeType) === 11) {
// nodeType 11 is DOCUMENT_FRAGMENT
// Element is in shadow root
return child.parentNode.host;
}
else {
return child.parentNode;
}
}
exports.getParent = getParent;
});
//# sourceMappingURL=getParent.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"getParent.js","sourceRoot":"../src/","sources":["getParent.ts"],"names":[],"mappings":";;;;IACA;;;;;;OAMG;IACH,SAAgB,SAAS,CAAC,KAAkB,EAAE,mBAAmC;;QAAnC,oCAAA,EAAA,0BAAmC;QAC/E,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,IAAI,CAAC;QACd,CAAC;QAED,IAAM,MAAM,GAAG,mBAAmB,IAAI,IAAA,mCAAgB,EAAC,KAAK,CAAC,CAAC;QAE9D,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,4CAA4C;QAC5C,IAAI,OAAQ,KAAyB,CAAC,gBAAgB,KAAK,UAAU,KAAI,MAAA,KAAK,CAAC,YAAY,0CAAE,UAAU,CAAA,EAAE,CAAC;YACxG,qBAAqB;YACrB,OAAO,KAAK,CAAC,YAA2B,CAAC;QAC3C,CAAC;aAAM,IAAI,CAAA,MAAA,KAAK,CAAC,UAAU,0CAAE,QAAQ,MAAK,EAAE,EAAE,CAAC;YAC7C,mCAAmC;YACnC,4BAA4B;YAC5B,OAAQ,KAAK,CAAC,UAAyB,CAAC,IAAmB,CAAC;QAC9D,CAAC;aAAM,CAAC;YACN,OAAO,KAAK,CAAC,UAAyB,CAAC;QACzC,CAAC;IACH,CAAC;IAtBD,8BAsBC","sourcesContent":["import { getVirtualParent } from './getVirtualParent';\n/**\n * Gets the element which is the parent of a given element.\n * If `allowVirtuaParents` is `true`, this method prefers the virtual parent over\n * real DOM parent when present.\n *\n * @public\n */\nexport function getParent(child: HTMLElement, allowVirtualParents: boolean = true): HTMLElement | null {\n if (!child) {\n return null;\n }\n\n const parent = allowVirtualParents && getVirtualParent(child);\n\n if (parent) {\n return parent;\n }\n\n // Support looking for parents in shadow DOM\n if (typeof (child as HTMLSlotElement).assignedElements !== 'function' && child.assignedSlot?.parentNode) {\n // Element is slotted\n return child.assignedSlot as HTMLElement;\n } else if (child.parentNode?.nodeType === 11) {\n // nodeType 11 is DOCUMENT_FRAGMENT\n // Element is in shadow root\n return (child.parentNode as ShadowRoot).host as HTMLElement;\n } else {\n return child.parentNode as HTMLElement;\n }\n}\n"]}
+6
View File
@@ -0,0 +1,6 @@
/**
* Gets the virtual parent given the child element, if it exists.
*
* @public
*/
export declare function getVirtualParent(child: HTMLElement): HTMLElement | undefined;
+19
View File
@@ -0,0 +1,19 @@
define(["require", "exports", "./isVirtualElement"], function (require, exports, isVirtualElement_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getVirtualParent = void 0;
/**
* Gets the virtual parent given the child element, if it exists.
*
* @public
*/
function getVirtualParent(child) {
var parent;
if (child && (0, isVirtualElement_1.isVirtualElement)(child)) {
parent = child._virtual.parent;
}
return parent;
}
exports.getVirtualParent = getVirtualParent;
});
//# sourceMappingURL=getVirtualParent.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"getVirtualParent.js","sourceRoot":"../src/","sources":["getVirtualParent.ts"],"names":[],"mappings":";;;;IACA;;;;OAIG;IACH,SAAgB,gBAAgB,CAAC,KAAkB;QACjD,IAAI,MAA+B,CAAC;QACpC,IAAI,KAAK,IAAI,IAAA,mCAAgB,EAAC,KAAK,CAAC,EAAE,CAAC;YACrC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;QACjC,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAND,4CAMC","sourcesContent":["import { isVirtualElement } from './isVirtualElement';\n/**\n * Gets the virtual parent given the child element, if it exists.\n *\n * @public\n */\nexport function getVirtualParent(child: HTMLElement): HTMLElement | undefined {\n let parent: HTMLElement | undefined;\n if (child && isVirtualElement(child)) {\n parent = child._virtual.parent;\n }\n return parent;\n}\n"]}
+14
View File
@@ -0,0 +1,14 @@
export type { IVirtualElement } from './IVirtualElement';
export { elementContains } from './elementContains';
export { elementContainsAttribute } from './elementContainsAttribute';
export { findElementRecursive } from './findElementRecursive';
export { getActiveElement } from './getActiveElement';
export { getChildren } from './getChildren';
export { getEventTarget } from './getEventTarget';
export { getParent } from './getParent';
export { getVirtualParent } from './getVirtualParent';
export { isVirtualElement } from './isVirtualElement';
export { portalContainsElement } from './portalContainsElement';
export { DATA_PORTAL_ATTRIBUTE, setPortalAttribute } from './setPortalAttribute';
export { setVirtualParent } from './setVirtualParent';
import './version';
+19
View File
@@ -0,0 +1,19 @@
define(["require", "exports", "./elementContains", "./elementContainsAttribute", "./findElementRecursive", "./getActiveElement", "./getChildren", "./getEventTarget", "./getParent", "./getVirtualParent", "./isVirtualElement", "./portalContainsElement", "./setPortalAttribute", "./setVirtualParent", "./version"], function (require, exports, elementContains_1, elementContainsAttribute_1, findElementRecursive_1, getActiveElement_1, getChildren_1, getEventTarget_1, getParent_1, getVirtualParent_1, isVirtualElement_1, portalContainsElement_1, setPortalAttribute_1, setVirtualParent_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setVirtualParent = exports.setPortalAttribute = exports.DATA_PORTAL_ATTRIBUTE = exports.portalContainsElement = exports.isVirtualElement = exports.getVirtualParent = exports.getParent = exports.getEventTarget = exports.getChildren = exports.getActiveElement = exports.findElementRecursive = exports.elementContainsAttribute = exports.elementContains = void 0;
Object.defineProperty(exports, "elementContains", { enumerable: true, get: function () { return elementContains_1.elementContains; } });
Object.defineProperty(exports, "elementContainsAttribute", { enumerable: true, get: function () { return elementContainsAttribute_1.elementContainsAttribute; } });
Object.defineProperty(exports, "findElementRecursive", { enumerable: true, get: function () { return findElementRecursive_1.findElementRecursive; } });
Object.defineProperty(exports, "getActiveElement", { enumerable: true, get: function () { return getActiveElement_1.getActiveElement; } });
Object.defineProperty(exports, "getChildren", { enumerable: true, get: function () { return getChildren_1.getChildren; } });
Object.defineProperty(exports, "getEventTarget", { enumerable: true, get: function () { return getEventTarget_1.getEventTarget; } });
Object.defineProperty(exports, "getParent", { enumerable: true, get: function () { return getParent_1.getParent; } });
Object.defineProperty(exports, "getVirtualParent", { enumerable: true, get: function () { return getVirtualParent_1.getVirtualParent; } });
Object.defineProperty(exports, "isVirtualElement", { enumerable: true, get: function () { return isVirtualElement_1.isVirtualElement; } });
Object.defineProperty(exports, "portalContainsElement", { enumerable: true, get: function () { return portalContainsElement_1.portalContainsElement; } });
Object.defineProperty(exports, "DATA_PORTAL_ATTRIBUTE", { enumerable: true, get: function () { return setPortalAttribute_1.DATA_PORTAL_ATTRIBUTE; } });
Object.defineProperty(exports, "setPortalAttribute", { enumerable: true, get: function () { return setPortalAttribute_1.setPortalAttribute; } });
Object.defineProperty(exports, "setVirtualParent", { enumerable: true, get: function () { return setVirtualParent_1.setVirtualParent; } });
});
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":";;;;IACS,kHAAA,eAAe,OAAA;IACf,oIAAA,wBAAwB,OAAA;IACxB,4HAAA,oBAAoB,OAAA;IACpB,oHAAA,gBAAgB,OAAA;IAChB,0GAAA,WAAW,OAAA;IACX,gHAAA,cAAc,OAAA;IACd,sGAAA,SAAS,OAAA;IACT,oHAAA,gBAAgB,OAAA;IAChB,oHAAA,gBAAgB,OAAA;IAChB,8HAAA,qBAAqB,OAAA;IACrB,2HAAA,qBAAqB,OAAA;IAAE,wHAAA,kBAAkB,OAAA;IACzC,oHAAA,gBAAgB,OAAA","sourcesContent":["export type { IVirtualElement } from './IVirtualElement';\nexport { elementContains } from './elementContains';\nexport { elementContainsAttribute } from './elementContainsAttribute';\nexport { findElementRecursive } from './findElementRecursive';\nexport { getActiveElement } from './getActiveElement';\nexport { getChildren } from './getChildren';\nexport { getEventTarget } from './getEventTarget';\nexport { getParent } from './getParent';\nexport { getVirtualParent } from './getVirtualParent';\nexport { isVirtualElement } from './isVirtualElement';\nexport { portalContainsElement } from './portalContainsElement';\nexport { DATA_PORTAL_ATTRIBUTE, setPortalAttribute } from './setPortalAttribute';\nexport { setVirtualParent } from './setVirtualParent';\n\nimport './version';\n"]}
+7
View File
@@ -0,0 +1,7 @@
import { IVirtualElement } from './IVirtualElement';
/**
* Determines whether or not an element has the virtual hierarchy extension.
*
* @public
*/
export declare function isVirtualElement(element: HTMLElement | IVirtualElement): element is IVirtualElement;
+15
View File
@@ -0,0 +1,15 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isVirtualElement = void 0;
/**
* Determines whether or not an element has the virtual hierarchy extension.
*
* @public
*/
function isVirtualElement(element) {
return element && !!element._virtual;
}
exports.isVirtualElement = isVirtualElement;
});
//# sourceMappingURL=isVirtualElement.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"isVirtualElement.js","sourceRoot":"../src/","sources":["isVirtualElement.ts"],"names":[],"mappings":";;;;IACA;;;;OAIG;IACH,SAAgB,gBAAgB,CAAC,OAAsC;QACrE,OAAO,OAAO,IAAI,CAAC,CAAmB,OAAQ,CAAC,QAAQ,CAAC;IAC1D,CAAC;IAFD,4CAEC","sourcesContent":["import { IVirtualElement } from './IVirtualElement';\n/**\n * Determines whether or not an element has the virtual hierarchy extension.\n *\n * @public\n */\nexport function isVirtualElement(element: HTMLElement | IVirtualElement): element is IVirtualElement {\n return element && !!(<IVirtualElement>element)._virtual;\n}\n"]}
@@ -0,0 +1,9 @@
/**
* Determine whether a target is within a portal from perspective of root or optional parent.
* This function only works against portal components that use the setPortalAttribute function.
* If both parent and child are within the same portal this function will return false.
* @param target - Element to query portal containment status of.
* @param parent - Optional parent perspective. Search for containing portal stops at parent
* (or root if parent is undefined or invalid.)
*/
export declare function portalContainsElement(target: HTMLElement, parent?: HTMLElement, doc?: Document): boolean;
+20
View File
@@ -0,0 +1,20 @@
define(["require", "exports", "./findElementRecursive", "./setPortalAttribute"], function (require, exports, findElementRecursive_1, setPortalAttribute_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.portalContainsElement = void 0;
/**
* Determine whether a target is within a portal from perspective of root or optional parent.
* This function only works against portal components that use the setPortalAttribute function.
* If both parent and child are within the same portal this function will return false.
* @param target - Element to query portal containment status of.
* @param parent - Optional parent perspective. Search for containing portal stops at parent
* (or root if parent is undefined or invalid.)
*/
function portalContainsElement(target, parent, doc) {
var _a;
var elementMatch = (0, findElementRecursive_1.findElementRecursive)(target, function (testElement) { var _a; return parent === testElement || !!((_a = testElement.hasAttribute) === null || _a === void 0 ? void 0 : _a.call(testElement, setPortalAttribute_1.DATA_PORTAL_ATTRIBUTE)); }, doc);
return elementMatch !== null && !!((_a = elementMatch.hasAttribute) === null || _a === void 0 ? void 0 : _a.call(elementMatch, setPortalAttribute_1.DATA_PORTAL_ATTRIBUTE));
}
exports.portalContainsElement = portalContainsElement;
});
//# sourceMappingURL=portalContainsElement.js.map
@@ -0,0 +1 @@
{"version":3,"file":"portalContainsElement.js","sourceRoot":"../src/","sources":["portalContainsElement.ts"],"names":[],"mappings":";;;;IAGA;;;;;;;OAOG;IACH,SAAgB,qBAAqB,CAAC,MAAmB,EAAE,MAAoB,EAAE,GAAc;;QAC7F,IAAM,YAAY,GAAG,IAAA,2CAAoB,EACvC,MAAM,EACN,UAAC,WAAwB,YAAK,OAAA,MAAM,KAAK,WAAW,IAAI,CAAC,CAAC,CAAA,MAAA,WAAW,CAAC,YAAY,4DAAG,0CAAqB,CAAC,CAAA,CAAA,EAAA,EAC3G,GAAG,CACJ,CAAC;QACF,OAAO,YAAY,KAAK,IAAI,IAAI,CAAC,CAAC,CAAA,MAAA,YAAY,CAAC,YAAY,6DAAG,0CAAqB,CAAC,CAAA,CAAC;IACvF,CAAC;IAPD,sDAOC","sourcesContent":["import { findElementRecursive } from './findElementRecursive';\nimport { DATA_PORTAL_ATTRIBUTE } from './setPortalAttribute';\n\n/**\n * Determine whether a target is within a portal from perspective of root or optional parent.\n * This function only works against portal components that use the setPortalAttribute function.\n * If both parent and child are within the same portal this function will return false.\n * @param target - Element to query portal containment status of.\n * @param parent - Optional parent perspective. Search for containing portal stops at parent\n * (or root if parent is undefined or invalid.)\n */\nexport function portalContainsElement(target: HTMLElement, parent?: HTMLElement, doc?: Document): boolean {\n const elementMatch = findElementRecursive(\n target,\n (testElement: HTMLElement) => parent === testElement || !!testElement.hasAttribute?.(DATA_PORTAL_ATTRIBUTE),\n doc,\n );\n return elementMatch !== null && !!elementMatch.hasAttribute?.(DATA_PORTAL_ATTRIBUTE);\n}\n"]}
+6
View File
@@ -0,0 +1,6 @@
export declare const DATA_PORTAL_ATTRIBUTE = "data-portal-element";
/**
* Identify element as a portal by setting an attribute.
* @param element - Element to mark as a portal.
*/
export declare function setPortalAttribute(element: HTMLElement): void;
+15
View File
@@ -0,0 +1,15 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setPortalAttribute = exports.DATA_PORTAL_ATTRIBUTE = void 0;
exports.DATA_PORTAL_ATTRIBUTE = 'data-portal-element';
/**
* Identify element as a portal by setting an attribute.
* @param element - Element to mark as a portal.
*/
function setPortalAttribute(element) {
element.setAttribute(exports.DATA_PORTAL_ATTRIBUTE, 'true');
}
exports.setPortalAttribute = setPortalAttribute;
});
//# sourceMappingURL=setPortalAttribute.js.map
@@ -0,0 +1 @@
{"version":3,"file":"setPortalAttribute.js","sourceRoot":"../src/","sources":["setPortalAttribute.ts"],"names":[],"mappings":";;;;IAAa,QAAA,qBAAqB,GAAG,qBAAqB,CAAC;IAE3D;;;OAGG;IACH,SAAgB,kBAAkB,CAAC,OAAoB;QACrD,OAAO,CAAC,YAAY,CAAC,6BAAqB,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC;IAFD,gDAEC","sourcesContent":["export const DATA_PORTAL_ATTRIBUTE = 'data-portal-element';\n\n/**\n * Identify element as a portal by setting an attribute.\n * @param element - Element to mark as a portal.\n */\nexport function setPortalAttribute(element: HTMLElement): void {\n element.setAttribute(DATA_PORTAL_ATTRIBUTE, 'true');\n}\n"]}
+7
View File
@@ -0,0 +1,7 @@
/**
* Sets the virtual parent of an element.
* Pass `undefined` as the `parent` to clear the virtual parent.
*
* @public
*/
export declare function setVirtualParent(child: HTMLElement, parent: HTMLElement | null): void;
+39
View File
@@ -0,0 +1,39 @@
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setVirtualParent = void 0;
/**
* Sets the virtual parent of an element.
* Pass `undefined` as the `parent` to clear the virtual parent.
*
* @public
*/
function setVirtualParent(child, parent) {
var virtualChild = child;
var virtualParent = parent;
if (!virtualChild._virtual) {
virtualChild._virtual = {
children: [],
};
}
var oldParent = virtualChild._virtual.parent;
if (oldParent && oldParent !== parent) {
// Remove the child from its old parent.
var index = oldParent._virtual.children.indexOf(virtualChild);
if (index > -1) {
oldParent._virtual.children.splice(index, 1);
}
}
virtualChild._virtual.parent = virtualParent || undefined;
if (virtualParent) {
if (!virtualParent._virtual) {
virtualParent._virtual = {
children: [],
};
}
virtualParent._virtual.children.push(virtualChild);
}
}
exports.setVirtualParent = setVirtualParent;
});
//# sourceMappingURL=setVirtualParent.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"setVirtualParent.js","sourceRoot":"../src/","sources":["setVirtualParent.ts"],"names":[],"mappings":";;;;IACA;;;;;OAKG;IACH,SAAgB,gBAAgB,CAAC,KAAkB,EAAE,MAA0B;QAC7E,IAAM,YAAY,GAAoB,KAAK,CAAC;QAC5C,IAAM,aAAa,GAA2B,MAAM,CAAC;QAErD,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;YAC3B,YAAY,CAAC,QAAQ,GAAG;gBACtB,QAAQ,EAAE,EAAE;aACb,CAAC;QACJ,CAAC;QAED,IAAM,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC;QAE/C,IAAI,SAAS,IAAI,SAAS,KAAK,MAAM,EAAE,CAAC;YACtC,wCAAwC;YACxC,IAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YAEhE,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC;gBACf,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YAC/C,CAAC;QACH,CAAC;QAED,YAAY,CAAC,QAAQ,CAAC,MAAM,GAAG,aAAa,IAAI,SAAS,CAAC;QAE1D,IAAI,aAAa,EAAE,CAAC;YAClB,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;gBAC5B,aAAa,CAAC,QAAQ,GAAG;oBACvB,QAAQ,EAAE,EAAE;iBACb,CAAC;YACJ,CAAC;YAED,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;IAhCD,4CAgCC","sourcesContent":["import { IVirtualElement } from './IVirtualElement';\n/**\n * Sets the virtual parent of an element.\n * Pass `undefined` as the `parent` to clear the virtual parent.\n *\n * @public\n */\nexport function setVirtualParent(child: HTMLElement, parent: HTMLElement | null): void {\n const virtualChild = <IVirtualElement>child;\n const virtualParent = <IVirtualElement | null>parent;\n\n if (!virtualChild._virtual) {\n virtualChild._virtual = {\n children: [],\n };\n }\n\n const oldParent = virtualChild._virtual.parent;\n\n if (oldParent && oldParent !== parent) {\n // Remove the child from its old parent.\n const index = oldParent._virtual.children.indexOf(virtualChild);\n\n if (index > -1) {\n oldParent._virtual.children.splice(index, 1);\n }\n }\n\n virtualChild._virtual.parent = virtualParent || undefined;\n\n if (virtualParent) {\n if (!virtualParent._virtual) {\n virtualParent._virtual = {\n children: [],\n };\n }\n\n virtualParent._virtual.children.push(virtualChild);\n }\n}\n"]}
+1
View File
@@ -0,0 +1 @@
export {};
+6
View File
@@ -0,0 +1,6 @@
define(["require", "exports", "@fluentui/set-version"], function (require, exports, set_version_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
(0, set_version_1.setVersion)('@fluentui/dom-utilities', '2.3.10');
});
//# sourceMappingURL=version.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"version.js","sourceRoot":"../src/","sources":["version.ts"],"names":[],"mappings":";;;IAGA,IAAA,wBAAU,EAAC,yBAAyB,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["// Do not modify this file; it is generated as part of publish.\n// The checked in version is a placeholder only and will not be updated.\nimport { setVersion } from '@fluentui/set-version';\nsetVersion('@fluentui/dom-utilities', '2.3.10');"]}
+10
View File
@@ -0,0 +1,10 @@
/**
* Attached interface for elements which support virtual references.
* Used internally by the virtual hierarchy methods.
*/
export interface IVirtualElement extends HTMLElement {
_virtual: {
parent?: IVirtualElement;
children: IVirtualElement[];
};
}
+3
View File
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IVirtualElement.js.map
@@ -0,0 +1 @@
{"version":3,"file":"IVirtualElement.js","sourceRoot":"../src/","sources":["IVirtualElement.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Attached interface for elements which support virtual references.\n * Used internally by the virtual hierarchy methods.\n */\nexport interface IVirtualElement extends HTMLElement {\n _virtual: {\n parent?: IVirtualElement;\n children: IVirtualElement[];\n };\n}\n"]}
@@ -0,0 +1,8 @@
/**
* Determines whether or not a parent element contains a given child element.
* If `allowVirtualParents` is true, this method may return `true` if the child
* has the parent in its virtual element hierarchy.
*
* @public
*/
export declare function elementContains(parent: HTMLElement | null, child: HTMLElement | null, allowVirtualParents?: boolean): boolean;
+39
View File
@@ -0,0 +1,39 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.elementContains = void 0;
var getParent_1 = require("./getParent");
/**
* Determines whether or not a parent element contains a given child element.
* If `allowVirtualParents` is true, this method may return `true` if the child
* has the parent in its virtual element hierarchy.
*
* @public
*/
function elementContains(parent, child, allowVirtualParents) {
if (allowVirtualParents === void 0) { allowVirtualParents = true; }
var isContained = false;
if (parent && child) {
if (allowVirtualParents) {
if (parent === child) {
isContained = true;
}
else {
isContained = false;
while (child) {
var nextParent = (0, getParent_1.getParent)(child);
if (nextParent === parent) {
isContained = true;
break;
}
child = nextParent;
}
}
}
else if (parent.contains) {
isContained = parent.contains(child);
}
}
return isContained;
}
exports.elementContains = elementContains;
//# sourceMappingURL=elementContains.js.map
@@ -0,0 +1 @@
{"version":3,"file":"elementContains.js","sourceRoot":"../src/","sources":["elementContains.ts"],"names":[],"mappings":";;;AAAA,yCAAwC;AACxC;;;;;;GAMG;AACH,SAAgB,eAAe,CAC7B,MAA0B,EAC1B,KAAyB,EACzB,mBAAmC;IAAnC,oCAAA,EAAA,0BAAmC;IAEnC,IAAI,WAAW,GAAG,KAAK,CAAC;IAExB,IAAI,MAAM,IAAI,KAAK,EAAE,CAAC;QACpB,IAAI,mBAAmB,EAAE,CAAC;YACxB,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;gBACrB,WAAW,GAAG,IAAI,CAAC;YACrB,CAAC;iBAAM,CAAC;gBACN,WAAW,GAAG,KAAK,CAAC;gBAEpB,OAAO,KAAK,EAAE,CAAC;oBACb,IAAM,UAAU,GAAuB,IAAA,qBAAS,EAAC,KAAK,CAAC,CAAC;oBAExD,IAAI,UAAU,KAAK,MAAM,EAAE,CAAC;wBAC1B,WAAW,GAAG,IAAI,CAAC;wBACnB,MAAM;oBACR,CAAC;oBAED,KAAK,GAAG,UAAU,CAAC;gBACrB,CAAC;YACH,CAAC;QACH,CAAC;aAAM,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YAC3B,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC;IACH,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC;AA/BD,0CA+BC","sourcesContent":["import { getParent } from './getParent';\n/**\n * Determines whether or not a parent element contains a given child element.\n * If `allowVirtualParents` is true, this method may return `true` if the child\n * has the parent in its virtual element hierarchy.\n *\n * @public\n */\nexport function elementContains(\n parent: HTMLElement | null,\n child: HTMLElement | null,\n allowVirtualParents: boolean = true,\n): boolean {\n let isContained = false;\n\n if (parent && child) {\n if (allowVirtualParents) {\n if (parent === child) {\n isContained = true;\n } else {\n isContained = false;\n\n while (child) {\n const nextParent: HTMLElement | null = getParent(child);\n\n if (nextParent === parent) {\n isContained = true;\n break;\n }\n\n child = nextParent;\n }\n }\n } else if (parent.contains) {\n isContained = parent.contains(child);\n }\n }\n\n return isContained;\n}\n"]}
@@ -0,0 +1,7 @@
/**
* Determines if an element, or any of its ancestors, contain the given attribute
* @param element - element to start searching at
* @param attribute - the attribute to search for
* @returns the value of the first instance found
*/
export declare function elementContainsAttribute(element: HTMLElement, attribute: string, doc?: Document): string | null;
@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.elementContainsAttribute = void 0;
var findElementRecursive_1 = require("./findElementRecursive");
/**
* Determines if an element, or any of its ancestors, contain the given attribute
* @param element - element to start searching at
* @param attribute - the attribute to search for
* @returns the value of the first instance found
*/
function elementContainsAttribute(element, attribute, doc) {
var elementMatch = (0, findElementRecursive_1.findElementRecursive)(element, function (testElement) { return testElement.hasAttribute(attribute); }, doc);
return elementMatch && elementMatch.getAttribute(attribute);
}
exports.elementContainsAttribute = elementContainsAttribute;
//# sourceMappingURL=elementContainsAttribute.js.map
@@ -0,0 +1 @@
{"version":3,"file":"elementContainsAttribute.js","sourceRoot":"../src/","sources":["elementContainsAttribute.ts"],"names":[],"mappings":";;;AAAA,+DAA8D;AAE9D;;;;;GAKG;AACH,SAAgB,wBAAwB,CAAC,OAAoB,EAAE,SAAiB,EAAE,GAAc;IAC9F,IAAM,YAAY,GAAG,IAAA,2CAAoB,EACvC,OAAO,EACP,UAAC,WAAwB,IAAK,OAAA,WAAW,CAAC,YAAY,CAAC,SAAS,CAAC,EAAnC,CAAmC,EACjE,GAAG,CACJ,CAAC;IAEF,OAAO,YAAY,IAAI,YAAY,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;AAC9D,CAAC;AARD,4DAQC","sourcesContent":["import { findElementRecursive } from './findElementRecursive';\n\n/**\n * Determines if an element, or any of its ancestors, contain the given attribute\n * @param element - element to start searching at\n * @param attribute - the attribute to search for\n * @returns the value of the first instance found\n */\nexport function elementContainsAttribute(element: HTMLElement, attribute: string, doc?: Document): string | null {\n const elementMatch = findElementRecursive(\n element,\n (testElement: HTMLElement) => testElement.hasAttribute(attribute),\n doc,\n );\n\n return elementMatch && elementMatch.getAttribute(attribute);\n}\n"]}
@@ -0,0 +1,7 @@
/**
* Finds the first parent element where the matchFunction returns true
* @param element - element to start searching at
* @param matchFunction - the function that determines if the element is a match
* @returns the matched element or null no match was found
*/
export declare function findElementRecursive(element: HTMLElement | null, matchFunction: (element: HTMLElement) => boolean, doc?: Document): HTMLElement | null;
@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.findElementRecursive = void 0;
var getParent_1 = require("./getParent");
/**
* Finds the first parent element where the matchFunction returns true
* @param element - element to start searching at
* @param matchFunction - the function that determines if the element is a match
* @returns the matched element or null no match was found
*/
function findElementRecursive(element, matchFunction, doc) {
// eslint-disable-next-line no-restricted-globals
doc !== null && doc !== void 0 ? doc : (doc = document);
if (!element || element === doc.body || element instanceof Document) {
return null;
}
return matchFunction(element) ? element : findElementRecursive((0, getParent_1.getParent)(element), matchFunction);
}
exports.findElementRecursive = findElementRecursive;
//# sourceMappingURL=findElementRecursive.js.map
@@ -0,0 +1 @@
{"version":3,"file":"findElementRecursive.js","sourceRoot":"../src/","sources":["findElementRecursive.ts"],"names":[],"mappings":";;;AAAA,yCAAwC;AACxC;;;;;GAKG;AACH,SAAgB,oBAAoB,CAClC,OAA2B,EAC3B,aAAgD,EAChD,GAAc;IAEd,iDAAiD;IACjD,GAAG,aAAH,GAAG,cAAH,GAAG,IAAH,GAAG,GAAK,QAAQ,EAAC;IACjB,IAAI,CAAC,OAAO,IAAI,OAAO,KAAK,GAAG,CAAC,IAAI,IAAI,OAAO,YAAY,QAAQ,EAAE,CAAC;QACpE,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,oBAAoB,CAAC,IAAA,qBAAS,EAAC,OAAO,CAAC,EAAE,aAAa,CAAC,CAAC;AACpG,CAAC;AAXD,oDAWC","sourcesContent":["import { getParent } from './getParent';\n/**\n * Finds the first parent element where the matchFunction returns true\n * @param element - element to start searching at\n * @param matchFunction - the function that determines if the element is a match\n * @returns the matched element or null no match was found\n */\nexport function findElementRecursive(\n element: HTMLElement | null,\n matchFunction: (element: HTMLElement) => boolean,\n doc?: Document,\n): HTMLElement | null {\n // eslint-disable-next-line no-restricted-globals\n doc ??= document;\n if (!element || element === doc.body || element instanceof Document) {\n return null;\n }\n return matchFunction(element) ? element : findElementRecursive(getParent(element), matchFunction);\n}\n"]}
@@ -0,0 +1 @@
export declare const getActiveElement: (doc: Document) => Element | null;
+12
View File
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getActiveElement = void 0;
var getActiveElement = function (doc) {
var ae = doc.activeElement;
while (ae === null || ae === void 0 ? void 0 : ae.shadowRoot) {
ae = ae.shadowRoot.activeElement;
}
return ae;
};
exports.getActiveElement = getActiveElement;
//# sourceMappingURL=getActiveElement.js.map
@@ -0,0 +1 @@
{"version":3,"file":"getActiveElement.js","sourceRoot":"../src/","sources":["getActiveElement.ts"],"names":[],"mappings":";;;AAAO,IAAM,gBAAgB,GAAG,UAAC,GAAa;IAC5C,IAAI,EAAE,GAAG,GAAG,CAAC,aAAa,CAAC;IAE3B,OAAO,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,UAAU,EAAE,CAAC;QACtB,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC;IACnC,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AARW,QAAA,gBAAgB,oBAQ3B","sourcesContent":["export const getActiveElement = (doc: Document): Element | null => {\n let ae = doc.activeElement;\n\n while (ae?.shadowRoot) {\n ae = ae.shadowRoot.activeElement;\n }\n\n return ae;\n};\n"]}
+8
View File
@@ -0,0 +1,8 @@
/**
* Gets the elements which are child elements of the given element.
* If `allowVirtualChildren` is `true`, this method enumerates virtual child elements
* after the original children.
* @param parent - The element to get the children of.
* @param allowVirtualChildren - true if the method should enumerate virtual child elements.
*/
export declare function getChildren(parent: HTMLElement, allowVirtualChildren?: boolean): HTMLElement[];
+26
View File
@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getChildren = void 0;
var isVirtualElement_1 = require("./isVirtualElement");
/**
* Gets the elements which are child elements of the given element.
* If `allowVirtualChildren` is `true`, this method enumerates virtual child elements
* after the original children.
* @param parent - The element to get the children of.
* @param allowVirtualChildren - true if the method should enumerate virtual child elements.
*/
function getChildren(parent, allowVirtualChildren) {
if (allowVirtualChildren === void 0) { allowVirtualChildren = true; }
var children = [];
if (parent) {
for (var i = 0; i < parent.children.length; i++) {
children.push(parent.children.item(i));
}
if (allowVirtualChildren && (0, isVirtualElement_1.isVirtualElement)(parent)) {
children.push.apply(children, parent._virtual.children);
}
}
return children;
}
exports.getChildren = getChildren;
//# sourceMappingURL=getChildren.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"getChildren.js","sourceRoot":"../src/","sources":["getChildren.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AACtD;;;;;;GAMG;AACH,SAAgB,WAAW,CAAC,MAAmB,EAAE,oBAAoC;IAApC,qCAAA,EAAA,2BAAoC;IACnF,IAAM,QAAQ,GAAkB,EAAE,CAAC;IACnC,IAAI,MAAM,EAAE,CAAC;QACX,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAChD,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAgB,CAAC,CAAC;QACxD,CAAC;QACD,IAAI,oBAAoB,IAAI,IAAA,mCAAgB,EAAC,MAAM,CAAC,EAAE,CAAC;YACrD,QAAQ,CAAC,IAAI,OAAb,QAAQ,EAAS,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE;QAC7C,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAXD,kCAWC","sourcesContent":["import { isVirtualElement } from './isVirtualElement';\n/**\n * Gets the elements which are child elements of the given element.\n * If `allowVirtualChildren` is `true`, this method enumerates virtual child elements\n * after the original children.\n * @param parent - The element to get the children of.\n * @param allowVirtualChildren - true if the method should enumerate virtual child elements.\n */\nexport function getChildren(parent: HTMLElement, allowVirtualChildren: boolean = true): HTMLElement[] {\n const children: HTMLElement[] = [];\n if (parent) {\n for (let i = 0; i < parent.children.length; i++) {\n children.push(parent.children.item(i) as HTMLElement);\n }\n if (allowVirtualChildren && isVirtualElement(parent)) {\n children.push(...parent._virtual.children);\n }\n }\n return children;\n}\n"]}
@@ -0,0 +1 @@
export declare const getEventTarget: (event: Event) => HTMLElement | null;
+12
View File
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEventTarget = void 0;
var getEventTarget = function (event) {
var target = event.target;
if (target && target.shadowRoot) {
target = event.composedPath()[0];
}
return target;
};
exports.getEventTarget = getEventTarget;
//# sourceMappingURL=getEventTarget.js.map
@@ -0,0 +1 @@
{"version":3,"file":"getEventTarget.js","sourceRoot":"../src/","sources":["getEventTarget.ts"],"names":[],"mappings":";;;AAAO,IAAM,cAAc,GAAG,UAAC,KAAY;IACzC,IAAI,MAAM,GAAG,KAAK,CAAC,MAAqB,CAAC;IACzC,IAAI,MAAM,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QAChC,MAAM,GAAG,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,CAAgB,CAAC;IAClD,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAPW,QAAA,cAAc,kBAOzB","sourcesContent":["export const getEventTarget = (event: Event): HTMLElement | null => {\n let target = event.target as HTMLElement;\n if (target && target.shadowRoot) {\n target = event.composedPath()[0] as HTMLElement;\n }\n\n return target;\n};\n"]}
+8
View File
@@ -0,0 +1,8 @@
/**
* Gets the element which is the parent of a given element.
* If `allowVirtuaParents` is `true`, this method prefers the virtual parent over
* real DOM parent when present.
*
* @public
*/
export declare function getParent(child: HTMLElement, allowVirtualParents?: boolean): HTMLElement | null;
+37
View File
@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getParent = void 0;
var getVirtualParent_1 = require("./getVirtualParent");
/**
* Gets the element which is the parent of a given element.
* If `allowVirtuaParents` is `true`, this method prefers the virtual parent over
* real DOM parent when present.
*
* @public
*/
function getParent(child, allowVirtualParents) {
var _a, _b;
if (allowVirtualParents === void 0) { allowVirtualParents = true; }
if (!child) {
return null;
}
var parent = allowVirtualParents && (0, getVirtualParent_1.getVirtualParent)(child);
if (parent) {
return parent;
}
// Support looking for parents in shadow DOM
if (typeof child.assignedElements !== 'function' && ((_a = child.assignedSlot) === null || _a === void 0 ? void 0 : _a.parentNode)) {
// Element is slotted
return child.assignedSlot;
}
else if (((_b = child.parentNode) === null || _b === void 0 ? void 0 : _b.nodeType) === 11) {
// nodeType 11 is DOCUMENT_FRAGMENT
// Element is in shadow root
return child.parentNode.host;
}
else {
return child.parentNode;
}
}
exports.getParent = getParent;
//# sourceMappingURL=getParent.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"getParent.js","sourceRoot":"../src/","sources":["getParent.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AACtD;;;;;;GAMG;AACH,SAAgB,SAAS,CAAC,KAAkB,EAAE,mBAAmC;;IAAnC,oCAAA,EAAA,0BAAmC;IAC/E,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAM,MAAM,GAAG,mBAAmB,IAAI,IAAA,mCAAgB,EAAC,KAAK,CAAC,CAAC;IAE9D,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,4CAA4C;IAC5C,IAAI,OAAQ,KAAyB,CAAC,gBAAgB,KAAK,UAAU,KAAI,MAAA,KAAK,CAAC,YAAY,0CAAE,UAAU,CAAA,EAAE,CAAC;QACxG,qBAAqB;QACrB,OAAO,KAAK,CAAC,YAA2B,CAAC;IAC3C,CAAC;SAAM,IAAI,CAAA,MAAA,KAAK,CAAC,UAAU,0CAAE,QAAQ,MAAK,EAAE,EAAE,CAAC;QAC7C,mCAAmC;QACnC,4BAA4B;QAC5B,OAAQ,KAAK,CAAC,UAAyB,CAAC,IAAmB,CAAC;IAC9D,CAAC;SAAM,CAAC;QACN,OAAO,KAAK,CAAC,UAAyB,CAAC;IACzC,CAAC;AACH,CAAC;AAtBD,8BAsBC","sourcesContent":["import { getVirtualParent } from './getVirtualParent';\n/**\n * Gets the element which is the parent of a given element.\n * If `allowVirtuaParents` is `true`, this method prefers the virtual parent over\n * real DOM parent when present.\n *\n * @public\n */\nexport function getParent(child: HTMLElement, allowVirtualParents: boolean = true): HTMLElement | null {\n if (!child) {\n return null;\n }\n\n const parent = allowVirtualParents && getVirtualParent(child);\n\n if (parent) {\n return parent;\n }\n\n // Support looking for parents in shadow DOM\n if (typeof (child as HTMLSlotElement).assignedElements !== 'function' && child.assignedSlot?.parentNode) {\n // Element is slotted\n return child.assignedSlot as HTMLElement;\n } else if (child.parentNode?.nodeType === 11) {\n // nodeType 11 is DOCUMENT_FRAGMENT\n // Element is in shadow root\n return (child.parentNode as ShadowRoot).host as HTMLElement;\n } else {\n return child.parentNode as HTMLElement;\n }\n}\n"]}
@@ -0,0 +1,6 @@
/**
* Gets the virtual parent given the child element, if it exists.
*
* @public
*/
export declare function getVirtualParent(child: HTMLElement): HTMLElement | undefined;
+18
View File
@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getVirtualParent = void 0;
var isVirtualElement_1 = require("./isVirtualElement");
/**
* Gets the virtual parent given the child element, if it exists.
*
* @public
*/
function getVirtualParent(child) {
var parent;
if (child && (0, isVirtualElement_1.isVirtualElement)(child)) {
parent = child._virtual.parent;
}
return parent;
}
exports.getVirtualParent = getVirtualParent;
//# sourceMappingURL=getVirtualParent.js.map
@@ -0,0 +1 @@
{"version":3,"file":"getVirtualParent.js","sourceRoot":"../src/","sources":["getVirtualParent.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AACtD;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,KAAkB;IACjD,IAAI,MAA+B,CAAC;IACpC,IAAI,KAAK,IAAI,IAAA,mCAAgB,EAAC,KAAK,CAAC,EAAE,CAAC;QACrC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;IACjC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAND,4CAMC","sourcesContent":["import { isVirtualElement } from './isVirtualElement';\n/**\n * Gets the virtual parent given the child element, if it exists.\n *\n * @public\n */\nexport function getVirtualParent(child: HTMLElement): HTMLElement | undefined {\n let parent: HTMLElement | undefined;\n if (child && isVirtualElement(child)) {\n parent = child._virtual.parent;\n }\n return parent;\n}\n"]}
+14
View File
@@ -0,0 +1,14 @@
export type { IVirtualElement } from './IVirtualElement';
export { elementContains } from './elementContains';
export { elementContainsAttribute } from './elementContainsAttribute';
export { findElementRecursive } from './findElementRecursive';
export { getActiveElement } from './getActiveElement';
export { getChildren } from './getChildren';
export { getEventTarget } from './getEventTarget';
export { getParent } from './getParent';
export { getVirtualParent } from './getVirtualParent';
export { isVirtualElement } from './isVirtualElement';
export { portalContainsElement } from './portalContainsElement';
export { DATA_PORTAL_ATTRIBUTE, setPortalAttribute } from './setPortalAttribute';
export { setVirtualParent } from './setVirtualParent';
import './version';
+30
View File
@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setVirtualParent = exports.setPortalAttribute = exports.DATA_PORTAL_ATTRIBUTE = exports.portalContainsElement = exports.isVirtualElement = exports.getVirtualParent = exports.getParent = exports.getEventTarget = exports.getChildren = exports.getActiveElement = exports.findElementRecursive = exports.elementContainsAttribute = exports.elementContains = void 0;
var elementContains_1 = require("./elementContains");
Object.defineProperty(exports, "elementContains", { enumerable: true, get: function () { return elementContains_1.elementContains; } });
var elementContainsAttribute_1 = require("./elementContainsAttribute");
Object.defineProperty(exports, "elementContainsAttribute", { enumerable: true, get: function () { return elementContainsAttribute_1.elementContainsAttribute; } });
var findElementRecursive_1 = require("./findElementRecursive");
Object.defineProperty(exports, "findElementRecursive", { enumerable: true, get: function () { return findElementRecursive_1.findElementRecursive; } });
var getActiveElement_1 = require("./getActiveElement");
Object.defineProperty(exports, "getActiveElement", { enumerable: true, get: function () { return getActiveElement_1.getActiveElement; } });
var getChildren_1 = require("./getChildren");
Object.defineProperty(exports, "getChildren", { enumerable: true, get: function () { return getChildren_1.getChildren; } });
var getEventTarget_1 = require("./getEventTarget");
Object.defineProperty(exports, "getEventTarget", { enumerable: true, get: function () { return getEventTarget_1.getEventTarget; } });
var getParent_1 = require("./getParent");
Object.defineProperty(exports, "getParent", { enumerable: true, get: function () { return getParent_1.getParent; } });
var getVirtualParent_1 = require("./getVirtualParent");
Object.defineProperty(exports, "getVirtualParent", { enumerable: true, get: function () { return getVirtualParent_1.getVirtualParent; } });
var isVirtualElement_1 = require("./isVirtualElement");
Object.defineProperty(exports, "isVirtualElement", { enumerable: true, get: function () { return isVirtualElement_1.isVirtualElement; } });
var portalContainsElement_1 = require("./portalContainsElement");
Object.defineProperty(exports, "portalContainsElement", { enumerable: true, get: function () { return portalContainsElement_1.portalContainsElement; } });
var setPortalAttribute_1 = require("./setPortalAttribute");
Object.defineProperty(exports, "DATA_PORTAL_ATTRIBUTE", { enumerable: true, get: function () { return setPortalAttribute_1.DATA_PORTAL_ATTRIBUTE; } });
Object.defineProperty(exports, "setPortalAttribute", { enumerable: true, get: function () { return setPortalAttribute_1.setPortalAttribute; } });
var setVirtualParent_1 = require("./setVirtualParent");
Object.defineProperty(exports, "setVirtualParent", { enumerable: true, get: function () { return setVirtualParent_1.setVirtualParent; } });
require("./version");
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":";;;AACA,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AACjC,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA;AAC9B,2DAAiF;AAAxE,2HAAA,qBAAqB,OAAA;AAAE,wHAAA,kBAAkB,OAAA;AAClD,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AAEzB,qBAAmB","sourcesContent":["export type { IVirtualElement } from './IVirtualElement';\nexport { elementContains } from './elementContains';\nexport { elementContainsAttribute } from './elementContainsAttribute';\nexport { findElementRecursive } from './findElementRecursive';\nexport { getActiveElement } from './getActiveElement';\nexport { getChildren } from './getChildren';\nexport { getEventTarget } from './getEventTarget';\nexport { getParent } from './getParent';\nexport { getVirtualParent } from './getVirtualParent';\nexport { isVirtualElement } from './isVirtualElement';\nexport { portalContainsElement } from './portalContainsElement';\nexport { DATA_PORTAL_ATTRIBUTE, setPortalAttribute } from './setPortalAttribute';\nexport { setVirtualParent } from './setVirtualParent';\n\nimport './version';\n"]}
@@ -0,0 +1,7 @@
import { IVirtualElement } from './IVirtualElement';
/**
* Determines whether or not an element has the virtual hierarchy extension.
*
* @public
*/
export declare function isVirtualElement(element: HTMLElement | IVirtualElement): element is IVirtualElement;
+13
View File
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isVirtualElement = void 0;
/**
* Determines whether or not an element has the virtual hierarchy extension.
*
* @public
*/
function isVirtualElement(element) {
return element && !!element._virtual;
}
exports.isVirtualElement = isVirtualElement;
//# sourceMappingURL=isVirtualElement.js.map
@@ -0,0 +1 @@
{"version":3,"file":"isVirtualElement.js","sourceRoot":"../src/","sources":["isVirtualElement.ts"],"names":[],"mappings":";;;AACA;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,OAAsC;IACrE,OAAO,OAAO,IAAI,CAAC,CAAmB,OAAQ,CAAC,QAAQ,CAAC;AAC1D,CAAC;AAFD,4CAEC","sourcesContent":["import { IVirtualElement } from './IVirtualElement';\n/**\n * Determines whether or not an element has the virtual hierarchy extension.\n *\n * @public\n */\nexport function isVirtualElement(element: HTMLElement | IVirtualElement): element is IVirtualElement {\n return element && !!(<IVirtualElement>element)._virtual;\n}\n"]}
@@ -0,0 +1,9 @@
/**
* Determine whether a target is within a portal from perspective of root or optional parent.
* This function only works against portal components that use the setPortalAttribute function.
* If both parent and child are within the same portal this function will return false.
* @param target - Element to query portal containment status of.
* @param parent - Optional parent perspective. Search for containing portal stops at parent
* (or root if parent is undefined or invalid.)
*/
export declare function portalContainsElement(target: HTMLElement, parent?: HTMLElement, doc?: Document): boolean;
@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.portalContainsElement = void 0;
var findElementRecursive_1 = require("./findElementRecursive");
var setPortalAttribute_1 = require("./setPortalAttribute");
/**
* Determine whether a target is within a portal from perspective of root or optional parent.
* This function only works against portal components that use the setPortalAttribute function.
* If both parent and child are within the same portal this function will return false.
* @param target - Element to query portal containment status of.
* @param parent - Optional parent perspective. Search for containing portal stops at parent
* (or root if parent is undefined or invalid.)
*/
function portalContainsElement(target, parent, doc) {
var _a;
var elementMatch = (0, findElementRecursive_1.findElementRecursive)(target, function (testElement) { var _a; return parent === testElement || !!((_a = testElement.hasAttribute) === null || _a === void 0 ? void 0 : _a.call(testElement, setPortalAttribute_1.DATA_PORTAL_ATTRIBUTE)); }, doc);
return elementMatch !== null && !!((_a = elementMatch.hasAttribute) === null || _a === void 0 ? void 0 : _a.call(elementMatch, setPortalAttribute_1.DATA_PORTAL_ATTRIBUTE));
}
exports.portalContainsElement = portalContainsElement;
//# sourceMappingURL=portalContainsElement.js.map
@@ -0,0 +1 @@
{"version":3,"file":"portalContainsElement.js","sourceRoot":"../src/","sources":["portalContainsElement.ts"],"names":[],"mappings":";;;AAAA,+DAA8D;AAC9D,2DAA6D;AAE7D;;;;;;;GAOG;AACH,SAAgB,qBAAqB,CAAC,MAAmB,EAAE,MAAoB,EAAE,GAAc;;IAC7F,IAAM,YAAY,GAAG,IAAA,2CAAoB,EACvC,MAAM,EACN,UAAC,WAAwB,YAAK,OAAA,MAAM,KAAK,WAAW,IAAI,CAAC,CAAC,CAAA,MAAA,WAAW,CAAC,YAAY,4DAAG,0CAAqB,CAAC,CAAA,CAAA,EAAA,EAC3G,GAAG,CACJ,CAAC;IACF,OAAO,YAAY,KAAK,IAAI,IAAI,CAAC,CAAC,CAAA,MAAA,YAAY,CAAC,YAAY,6DAAG,0CAAqB,CAAC,CAAA,CAAC;AACvF,CAAC;AAPD,sDAOC","sourcesContent":["import { findElementRecursive } from './findElementRecursive';\nimport { DATA_PORTAL_ATTRIBUTE } from './setPortalAttribute';\n\n/**\n * Determine whether a target is within a portal from perspective of root or optional parent.\n * This function only works against portal components that use the setPortalAttribute function.\n * If both parent and child are within the same portal this function will return false.\n * @param target - Element to query portal containment status of.\n * @param parent - Optional parent perspective. Search for containing portal stops at parent\n * (or root if parent is undefined or invalid.)\n */\nexport function portalContainsElement(target: HTMLElement, parent?: HTMLElement, doc?: Document): boolean {\n const elementMatch = findElementRecursive(\n target,\n (testElement: HTMLElement) => parent === testElement || !!testElement.hasAttribute?.(DATA_PORTAL_ATTRIBUTE),\n doc,\n );\n return elementMatch !== null && !!elementMatch.hasAttribute?.(DATA_PORTAL_ATTRIBUTE);\n}\n"]}
@@ -0,0 +1,6 @@
export declare const DATA_PORTAL_ATTRIBUTE = "data-portal-element";
/**
* Identify element as a portal by setting an attribute.
* @param element - Element to mark as a portal.
*/
export declare function setPortalAttribute(element: HTMLElement): void;
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setPortalAttribute = exports.DATA_PORTAL_ATTRIBUTE = void 0;
exports.DATA_PORTAL_ATTRIBUTE = 'data-portal-element';
/**
* Identify element as a portal by setting an attribute.
* @param element - Element to mark as a portal.
*/
function setPortalAttribute(element) {
element.setAttribute(exports.DATA_PORTAL_ATTRIBUTE, 'true');
}
exports.setPortalAttribute = setPortalAttribute;
//# sourceMappingURL=setPortalAttribute.js.map
@@ -0,0 +1 @@
{"version":3,"file":"setPortalAttribute.js","sourceRoot":"../src/","sources":["setPortalAttribute.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG,qBAAqB,CAAC;AAE3D;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,OAAoB;IACrD,OAAO,CAAC,YAAY,CAAC,6BAAqB,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC;AAFD,gDAEC","sourcesContent":["export const DATA_PORTAL_ATTRIBUTE = 'data-portal-element';\n\n/**\n * Identify element as a portal by setting an attribute.\n * @param element - Element to mark as a portal.\n */\nexport function setPortalAttribute(element: HTMLElement): void {\n element.setAttribute(DATA_PORTAL_ATTRIBUTE, 'true');\n}\n"]}
@@ -0,0 +1,7 @@
/**
* Sets the virtual parent of an element.
* Pass `undefined` as the `parent` to clear the virtual parent.
*
* @public
*/
export declare function setVirtualParent(child: HTMLElement, parent: HTMLElement | null): void;
+37
View File
@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setVirtualParent = void 0;
/**
* Sets the virtual parent of an element.
* Pass `undefined` as the `parent` to clear the virtual parent.
*
* @public
*/
function setVirtualParent(child, parent) {
var virtualChild = child;
var virtualParent = parent;
if (!virtualChild._virtual) {
virtualChild._virtual = {
children: [],
};
}
var oldParent = virtualChild._virtual.parent;
if (oldParent && oldParent !== parent) {
// Remove the child from its old parent.
var index = oldParent._virtual.children.indexOf(virtualChild);
if (index > -1) {
oldParent._virtual.children.splice(index, 1);
}
}
virtualChild._virtual.parent = virtualParent || undefined;
if (virtualParent) {
if (!virtualParent._virtual) {
virtualParent._virtual = {
children: [],
};
}
virtualParent._virtual.children.push(virtualChild);
}
}
exports.setVirtualParent = setVirtualParent;
//# sourceMappingURL=setVirtualParent.js.map
@@ -0,0 +1 @@
{"version":3,"file":"setVirtualParent.js","sourceRoot":"../src/","sources":["setVirtualParent.ts"],"names":[],"mappings":";;;AACA;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,KAAkB,EAAE,MAA0B;IAC7E,IAAM,YAAY,GAAoB,KAAK,CAAC;IAC5C,IAAM,aAAa,GAA2B,MAAM,CAAC;IAErD,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;QAC3B,YAAY,CAAC,QAAQ,GAAG;YACtB,QAAQ,EAAE,EAAE;SACb,CAAC;IACJ,CAAC;IAED,IAAM,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC;IAE/C,IAAI,SAAS,IAAI,SAAS,KAAK,MAAM,EAAE,CAAC;QACtC,wCAAwC;QACxC,IAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAEhE,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC;YACf,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;IAED,YAAY,CAAC,QAAQ,CAAC,MAAM,GAAG,aAAa,IAAI,SAAS,CAAC;IAE1D,IAAI,aAAa,EAAE,CAAC;QAClB,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;YAC5B,aAAa,CAAC,QAAQ,GAAG;gBACvB,QAAQ,EAAE,EAAE;aACb,CAAC;QACJ,CAAC;QAED,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACrD,CAAC;AACH,CAAC;AAhCD,4CAgCC","sourcesContent":["import { IVirtualElement } from './IVirtualElement';\n/**\n * Sets the virtual parent of an element.\n * Pass `undefined` as the `parent` to clear the virtual parent.\n *\n * @public\n */\nexport function setVirtualParent(child: HTMLElement, parent: HTMLElement | null): void {\n const virtualChild = <IVirtualElement>child;\n const virtualParent = <IVirtualElement | null>parent;\n\n if (!virtualChild._virtual) {\n virtualChild._virtual = {\n children: [],\n };\n }\n\n const oldParent = virtualChild._virtual.parent;\n\n if (oldParent && oldParent !== parent) {\n // Remove the child from its old parent.\n const index = oldParent._virtual.children.indexOf(virtualChild);\n\n if (index > -1) {\n oldParent._virtual.children.splice(index, 1);\n }\n }\n\n virtualChild._virtual.parent = virtualParent || undefined;\n\n if (virtualParent) {\n if (!virtualParent._virtual) {\n virtualParent._virtual = {\n children: [],\n };\n }\n\n virtualParent._virtual.children.push(virtualChild);\n }\n}\n"]}
+1
View File
@@ -0,0 +1 @@
export {};
+7
View File
@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// Do not modify this file; it is generated as part of publish.
// The checked in version is a placeholder only and will not be updated.
var set_version_1 = require("@fluentui/set-version");
(0, set_version_1.setVersion)('@fluentui/dom-utilities', '2.3.10');
//# sourceMappingURL=version.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"version.js","sourceRoot":"../src/","sources":["version.ts"],"names":[],"mappings":";;AAAA,+DAA+D;AAC/D,wEAAwE;AACxE,qDAAmD;AACnD,IAAA,wBAAU,EAAC,yBAAyB,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["// Do not modify this file; it is generated as part of publish.\n// The checked in version is a placeholder only and will not be updated.\nimport { setVersion } from '@fluentui/set-version';\nsetVersion('@fluentui/dom-utilities', '2.3.10');"]}
+10
View File
@@ -0,0 +1,10 @@
/**
* Attached interface for elements which support virtual references.
* Used internally by the virtual hierarchy methods.
*/
export interface IVirtualElement extends HTMLElement {
_virtual: {
parent?: IVirtualElement;
children: IVirtualElement[];
};
}
+2
View File
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=IVirtualElement.js.map

Some files were not shown because too many files have changed in this diff Show More