@agrotools1/at-mf-utils 0.2.6 → 0.2.8

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.
@@ -8,7 +8,7 @@ declare type IResponse = {
8
8
  * @param url URL do módulo
9
9
  * @param app Instância do Vue
10
10
  *
11
- * Não cacheie o objeto de retorno da `getModule`. Se precisar de um valor do objeto, chame a função novamente.
11
+ * Não cacheie o objeto de retorno da `getModule`. Se precisar de um valor do objeto chame a função novamente.
12
12
  */
13
13
  export default function getModule(moduleId: string, url: string, app?: any): Promise<IResponse>;
14
14
  export {};
@@ -1 +1 @@
1
- function p(){const e=document.querySelectorAll('link[from="athost"]');for(let t=0;t<e.length;t++)e[t].remove()}function c(e,t){const o=document.getElementById(e);o&&o.remove(),window[t]=void 0}async function l(e,t){if(!e||!t)return;const o=Object.entries(e);for(let r=0;r<o.length;r++){const[s,n]=o[r],i=await n();t.appContext.app.component(s,i.default)}}async function m(e,t,o){return await __webpack_init_sharing__?.("default"),new Promise(r=>{const s=`remote-entry-${e}`,n=document.createElement("script");p(),c(s,e),n.type="text/javascript",n.src=t,n.defer=!0,n.async=!0,n.id=s,document.head.appendChild(n),n.onload=async()=>{const i=window[e],u=typeof __webpack_share_scopes__<"u"?__webpack_share_scopes__:null;await i?.init(u?.default);const a=(await(await i.get?.(e))().default)?.default;l(a.asyncComponents,o);const d={...a||{},defaultImport:a,mount:()=>(c(s,e),a?.unmount?.(),a.mount),unmount:()=>{document.getElementById("agrotools-app")?.remove(),p(),c(s,e)}};r(d)}})}export{m as default};
1
+ function l(){const e=document.querySelectorAll('link[from="athost"]');for(let n=0;n<e.length;n++)e[n].remove()}function d(e,n){const o=document.getElementById(e);window[n]=null,o?.remove()}async function m(e,n){if(!e||!n)return;const o=Object.entries(e);for(let s=0;s<o.length;s++){const[i,t]=o[s],r=await t();n.appContext.app.component(i,r.default)}}async function c(e,n){return new Promise(o=>{l(),d(e,n),o()})}async function f(e,n,o){const s=`remote-entry-${e}`;return await c(s,e),await __webpack_init_sharing__?.("default"),new Promise(i=>{const t=document.createElement("script");t.type="text/javascript",t.src=n,t.defer=!0,t.async=!0,t.id=s,document.head.appendChild(t),t.onload=async()=>{const r=window[e],p=typeof __webpack_share_scopes__<"u"?__webpack_share_scopes__:null;await r?.init(p?.default);const a=(await(await r.get?.(e))().default)?.default;m(a.asyncComponents,o);const u={...a||{},defaultImport:a,unmount:async()=>{a?.unmount(),c(s,e),document.getElementById("agrotools-app")?.remove()}};i(u)}})}export{f as default};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@agrotools1/at-mf-utils",
3
3
  "type": "module",
4
- "version": "0.2.6",
4
+ "version": "0.2.8",
5
5
  "private": false,
6
6
  "packageManager": "pnpm@9.1.0",
7
7
  "description": "Métodos utilitários de MF da Agrotools",