@fluentui/dom-utilities
Advanced tools
Comparing version 2.3.7 to 2.3.8
@@ -5,6 +5,48 @@ { | ||
{ | ||
"date": "Mon, 24 Jun 2024 07:30:26 GMT", | ||
"date": "Tue, 08 Oct 2024 07:21:37 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": [ | ||
@@ -11,0 +53,0 @@ { |
# Change Log - @fluentui/dom-utilities | ||
This log was last generated on Mon, 24 Jun 2024 07:30:26 GMT and should not be manually modified. | ||
This log was last generated on Tue, 08 Oct 2024 07:21:37 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## [2.3.8](https://github.com/microsoft/fluentui/tree/@fluentui/dom-utilities_v2.3.8) | ||
Tue, 08 Oct 2024 07:21:37 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:30:26 GMT | ||
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) | ||
@@ -11,0 +20,0 @@ |
@@ -14,3 +14,3 @@ define(["require", "exports", "./getParent"], function (require, exports, getParent_1) { | ||
doc !== null && doc !== void 0 ? doc : (doc = document); | ||
if (!element || element === doc.body) { | ||
if (!element || element === doc.body || element instanceof Document) { | ||
return null; | ||
@@ -17,0 +17,0 @@ } |
@@ -22,6 +22,7 @@ define(["require", "exports", "./getVirtualParent"], function (require, exports, getVirtualParent_1) { | ||
} | ||
var parentElement; | ||
// 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; | ||
parentElement = child.assignedSlot; | ||
} | ||
@@ -31,7 +32,8 @@ else if (((_b = child.parentNode) === null || _b === void 0 ? void 0 : _b.nodeType) === 11) { | ||
// Element is in shadow root | ||
return child.parentNode.host; | ||
parentElement = child.parentNode.host; | ||
} | ||
else { | ||
return child.parentNode; | ||
parentElement = child.parentNode; | ||
} | ||
return !!parentElement && parentElement instanceof HTMLElement ? parentElement : null; | ||
} | ||
@@ -38,0 +40,0 @@ exports.getParent = getParent; |
@@ -14,4 +14,5 @@ define(["require", "exports", "./findElementRecursive", "./setPortalAttribute"], function (require, exports, findElementRecursive_1, setPortalAttribute_1) { | ||
function portalContainsElement(target, parent, doc) { | ||
var elementMatch = (0, findElementRecursive_1.findElementRecursive)(target, function (testElement) { return parent === testElement || testElement.hasAttribute(setPortalAttribute_1.DATA_PORTAL_ATTRIBUTE); }, doc); | ||
return elementMatch !== null && elementMatch.hasAttribute(setPortalAttribute_1.DATA_PORTAL_ATTRIBUTE); | ||
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)); | ||
} | ||
@@ -18,0 +19,0 @@ exports.portalContainsElement = portalContainsElement; |
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.7'); | ||
(0, set_version_1.setVersion)('@fluentui/dom-utilities', '2.3.8'); | ||
}); | ||
//# sourceMappingURL=version.js.map |
@@ -14,3 +14,3 @@ "use strict"; | ||
doc !== null && doc !== void 0 ? doc : (doc = document); | ||
if (!element || element === doc.body) { | ||
if (!element || element === doc.body || element instanceof Document) { | ||
return null; | ||
@@ -17,0 +17,0 @@ } |
@@ -22,6 +22,7 @@ "use strict"; | ||
} | ||
var parentElement; | ||
// 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; | ||
parentElement = child.assignedSlot; | ||
} | ||
@@ -31,9 +32,10 @@ else if (((_b = child.parentNode) === null || _b === void 0 ? void 0 : _b.nodeType) === 11) { | ||
// Element is in shadow root | ||
return child.parentNode.host; | ||
parentElement = child.parentNode.host; | ||
} | ||
else { | ||
return child.parentNode; | ||
parentElement = child.parentNode; | ||
} | ||
return !!parentElement && parentElement instanceof HTMLElement ? parentElement : null; | ||
} | ||
exports.getParent = getParent; | ||
//# sourceMappingURL=getParent.js.map |
@@ -15,6 +15,7 @@ "use strict"; | ||
function portalContainsElement(target, parent, doc) { | ||
var elementMatch = (0, findElementRecursive_1.findElementRecursive)(target, function (testElement) { return parent === testElement || testElement.hasAttribute(setPortalAttribute_1.DATA_PORTAL_ATTRIBUTE); }, doc); | ||
return elementMatch !== null && elementMatch.hasAttribute(setPortalAttribute_1.DATA_PORTAL_ATTRIBUTE); | ||
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 |
@@ -6,3 +6,3 @@ "use strict"; | ||
var set_version_1 = require("@fluentui/set-version"); | ||
(0, set_version_1.setVersion)('@fluentui/dom-utilities', '2.3.7'); | ||
(0, set_version_1.setVersion)('@fluentui/dom-utilities', '2.3.8'); | ||
//# sourceMappingURL=version.js.map |
@@ -11,3 +11,3 @@ import { getParent } from './getParent'; | ||
doc !== null && doc !== void 0 ? doc : (doc = document); | ||
if (!element || element === doc.body) { | ||
if (!element || element === doc.body || element instanceof Document) { | ||
return null; | ||
@@ -14,0 +14,0 @@ } |
@@ -19,6 +19,7 @@ import { getVirtualParent } from './getVirtualParent'; | ||
} | ||
var parentElement; | ||
// 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; | ||
parentElement = child.assignedSlot; | ||
} | ||
@@ -28,8 +29,9 @@ else if (((_b = child.parentNode) === null || _b === void 0 ? void 0 : _b.nodeType) === 11) { | ||
// Element is in shadow root | ||
return child.parentNode.host; | ||
parentElement = child.parentNode.host; | ||
} | ||
else { | ||
return child.parentNode; | ||
parentElement = child.parentNode; | ||
} | ||
return !!parentElement && parentElement instanceof HTMLElement ? parentElement : null; | ||
} | ||
//# sourceMappingURL=getParent.js.map |
@@ -12,5 +12,6 @@ import { findElementRecursive } from './findElementRecursive'; | ||
export function portalContainsElement(target, parent, doc) { | ||
var elementMatch = findElementRecursive(target, function (testElement) { return parent === testElement || testElement.hasAttribute(DATA_PORTAL_ATTRIBUTE); }, doc); | ||
return elementMatch !== null && elementMatch.hasAttribute(DATA_PORTAL_ATTRIBUTE); | ||
var _a; | ||
var elementMatch = findElementRecursive(target, function (testElement) { var _a; return parent === testElement || !!((_a = testElement.hasAttribute) === null || _a === void 0 ? void 0 : _a.call(testElement, DATA_PORTAL_ATTRIBUTE)); }, doc); | ||
return elementMatch !== null && !!((_a = elementMatch.hasAttribute) === null || _a === void 0 ? void 0 : _a.call(elementMatch, DATA_PORTAL_ATTRIBUTE)); | ||
} | ||
//# sourceMappingURL=portalContainsElement.js.map |
// 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. | ||
import { setVersion } from '@fluentui/set-version'; | ||
setVersion('@fluentui/dom-utilities', '2.3.7'); | ||
setVersion('@fluentui/dom-utilities', '2.3.8'); | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@fluentui/dom-utilities", | ||
"version": "2.3.7", | ||
"version": "2.3.8", | ||
"description": "DOM utilities for use within Fluent web components", | ||
@@ -5,0 +5,0 @@ "main": "lib-commonjs/index.js", |
{ | ||
"name": "@fluentui/dom-utilities", | ||
"name": "dom-utilities", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"projectType": "library", | ||
"tags": ["v8"], | ||
"implicitDependencies": [] | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
156380
2153