gdu 7.1.1 → 7.1.2
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 +6 -8
- package/dist/lib/mfe.js.map +1 -1
- package/package.json +1 -1
package/dist/lib/mfe.js
CHANGED
|
@@ -5,26 +5,24 @@ const utilities_1 = require("@autoguru/utilities");
|
|
|
5
5
|
const queryShadowRoot = (wrapElement, selector) => {
|
|
6
6
|
if (wrapElement && wrapElement.length > 0) {
|
|
7
7
|
for (const element of wrapElement) {
|
|
8
|
-
if (element.childNodes.length === 0) {
|
|
9
|
-
return
|
|
8
|
+
if (element.firstChild.shadowRoot.firstChild.childNodes.length === 0) {
|
|
9
|
+
return element.firstChild.shadowRoot.querySelector(selector);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
wrapElement.firstChild.shadowRoot) {
|
|
16
|
-
return wrapElement.firstChild.shadowRoot.querySelectorAll(selector);
|
|
13
|
+
else {
|
|
14
|
+
return null;
|
|
17
15
|
}
|
|
18
|
-
return null;
|
|
19
16
|
};
|
|
20
17
|
const getMfeMountPoint = ({ mountDOMId, mountDOMClass, projectName, }) => {
|
|
21
18
|
(0, utilities_1.invariant)(mountDOMId || mountDOMClass, 'You must provide a mountDOMId or mountDOMClass');
|
|
19
|
+
debugger;
|
|
22
20
|
let point = null;
|
|
23
21
|
const wrapElements = Array.from(document.querySelectorAll(`.${mountDOMId || mountDOMClass}-wrap`));
|
|
24
22
|
if (typeof mountDOMId === 'string') {
|
|
25
23
|
point =
|
|
26
24
|
queryShadowRoot(wrapElements, '#' + mountDOMId) ||
|
|
27
|
-
document.querySelector('#' + mountDOMId)
|
|
25
|
+
document.querySelector('#' + mountDOMId);
|
|
28
26
|
}
|
|
29
27
|
else if (typeof mountDOMClass === 'string') {
|
|
30
28
|
const elements = queryShadowRoot(wrapElements, '.' + mountDOMClass) ||
|
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,
|
|
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;QAC1C,KAAK,MAAM,OAAO,IAAI,WAAW,EAAE;YAClC,IACC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,EAC/D;gBAED,OAAO,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;aAC7D;SACD;KACD;SAAM;QACN,OAAO,IAAI,CAAC;KACZ;AACF,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;IACF,QAAQ,CAAC;IACT,IAAI,KAAK,GAAuB,IAAI,CAAC;IACrC,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;QACnC,KAAK;YACJ,eAAe,CAAC,YAAY,EAAE,GAAG,GAAG,UAAU,CAAC;gBAC/C,QAAQ,CAAC,aAAa,CAAC,GAAG,GAAG,UAAU,CAAC,CAAC;KAC1C;SAAM,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;QAC7C,MAAM,QAAQ,GACb,eAAe,CAAC,YAAY,EAAE,GAAG,GAAG,aAAa,CAAC;YAClD,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,GAAG,GAAG,aAAa,CAAC,CAAC,CAAC;QAC5D,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;YAC/B,IAAI,OAAO,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;gBACpC,KAAK,GAAG,OAAsB,CAAC;gBAC/B,MAAM;aACN;SACD;KACD;SAAM;QACN,KAAK,GAAG,UAAU,CAAC;KACnB;IACD,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QACvC,KAAK,CAAC,OAAO,CAAC,UAAU,GAAG,WAAW,CAAC;QACvC,KAAK,CAAC,YAAY,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;KAC3C;IACD,OAAO,KAAK,CAAC;AACd,CAAC,CAAC;AApCW,QAAA,gBAAgB,oBAoC3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gdu",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.2",
|
|
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",
|