gdu 12.6.1 → 12.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lib/mfe.js
CHANGED
|
@@ -3,20 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getMfeMountPoint = void 0;
|
|
4
4
|
const utilities_1 = require("@autoguru/utilities");
|
|
5
5
|
const queryShadowRoot = (wrapElement, selector) => {
|
|
6
|
-
var _a, _b, _c, _d;
|
|
7
6
|
if (wrapElement && wrapElement.length > 0) {
|
|
8
7
|
for (const element of wrapElement) {
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
const firstChild = element.firstChild;
|
|
9
|
+
if (firstChild instanceof Element && firstChild.shadowRoot) {
|
|
10
|
+
const shadowRoot = firstChild.shadowRoot.querySelector(selector);
|
|
11
|
+
if (shadowRoot) {
|
|
12
|
+
return shadowRoot;
|
|
13
|
+
}
|
|
11
14
|
}
|
|
12
15
|
}
|
|
13
16
|
}
|
|
14
|
-
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
+
return null;
|
|
17
18
|
};
|
|
18
19
|
const getMfeMountPoint = ({ mountDOMId, mountDOMClass, projectName, }) => {
|
|
19
|
-
var _a;
|
|
20
20
|
(0, utilities_1.invariant)(mountDOMId || mountDOMClass, 'You must provide a mountDOMId or mountDOMClass');
|
|
21
21
|
let point = null;
|
|
22
22
|
const wrapElements = Array.from(document.querySelectorAll(`.${mountDOMId || mountDOMClass}-wrap`));
|
|
@@ -29,7 +29,7 @@ const getMfeMountPoint = ({ mountDOMId, mountDOMClass, projectName, }) => {
|
|
|
29
29
|
const elements = [queryShadowRoot(wrapElements, '.' + mountDOMClass)] ||
|
|
30
30
|
Array.from(document.querySelectorAll('.' + mountDOMClass));
|
|
31
31
|
for (const element of elements) {
|
|
32
|
-
if (element
|
|
32
|
+
if (element) {
|
|
33
33
|
point = element;
|
|
34
34
|
break;
|
|
35
35
|
}
|
package/dist/lib/mfe.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mfe.js","sourceRoot":"","sources":["../../lib/mfe.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAiBhD,MAAM,eAAe,GAAG,CAAC,WAA2B,EAAE,QAAgB,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"mfe.js","sourceRoot":"","sources":["../../lib/mfe.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AAiBhD,MAAM,eAAe,GAAG,CAAC,WAA2B,EAAE,QAAgB,EAAE,EAAE;IAEzE,IAAI,WAAW,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC3C,KAAK,MAAM,OAAO,IAAI,WAAW,EAAE,CAAC;YACnC,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;YACtC,IAAI,UAAU,YAAY,OAAO,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;gBAC5D,MAAM,UAAU,GACf,UAAU,CAAC,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;gBAC/C,IAAI,UAAU,EAAE,CAAC;oBAChB,OAAO,UAAU,CAAC;gBACnB,CAAC;YACF,CAAC;QACF,CAAC;IACF,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC,CAAC;AACK,MAAM,gBAAgB,GAAG,CAAC,EAChC,UAAU,EACV,aAAa,EACb,WAAW,GACJ,EAAsB,EAAE;IAC/B,IAAA,qBAAS,EACR,UAAU,IAAI,aAAa,EAC3B,gDAAgD,CAChD,CAAC;IAEF,IAAI,KAAK,GAAsB,IAAI,CAAC;IACpC,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAC9B,QAAQ,CAAC,gBAAgB,CAAC,IAAI,UAAU,IAAI,aAAa,OAAO,CAAC,CACjE,CAAC;IACF,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QACpC,KAAK;YACJ,eAAe,CAAC,YAAY,EAAE,GAAG,GAAG,UAAU,CAAC;gBAC/C,QAAQ,CAAC,aAAa,CAAC,GAAG,GAAG,UAAU,CAAC,CAAC;IAC3C,CAAC;SAAM,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE,CAAC;QAC9C,MAAM,QAAQ,GAEb,CAAC,eAAe,CAAC,YAAY,EAAE,GAAG,GAAG,aAAa,CAAC,CAAC;YACpD,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,GAAG,GAAG,aAAa,CAAC,CAAC,CAAC;QAC5D,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAChC,IAAI,OAAO,EAAE,CAAC;gBACb,KAAK,GAAG,OAAsB,CAAC;gBAC/B,MAAM;YACP,CAAC;QACF,CAAC;IACF,CAAC;SAAM,CAAC;QACP,KAAK,GAAG,UAAU,CAAC;IACpB,CAAC;IACD,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACxC,KAAK,CAAC,OAAO,CAAC,UAAU,GAAG,WAAW,CAAC;QACvC,KAAK,CAAC,YAAY,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;IAC5C,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC,CAAC;AArCW,QAAA,gBAAgB,oBAqC3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gdu",
|
|
3
|
-
"version": "12.6.
|
|
3
|
+
"version": "12.6.3",
|
|
4
4
|
"description": "AutoGuru's development toolkit",
|
|
5
5
|
"homepage": "https://github.com/autoguru-au/octane/tree/master/packages/gdu#readme",
|
|
6
6
|
"repository": "https://github.com/autoguru-au/octane/tree/master/packages/gdu",
|