@factoringplus/pl-components-pack-v3 1.2.26-pre-23 → 1.2.26-pre-25

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.
@@ -5510,10 +5510,9 @@ const pN = YA({
5510
5510
  }),
5511
5511
  actions: {
5512
5512
  async cancelAllRequests() {
5513
- console.log(2, this.requests);
5514
5513
  for (const e in this.requests)
5515
- console.log("await request.controler.abort()"), await this.requests[e].controler.abort(), console.log("controler.aborted");
5516
- this.requests = {}, console.log(3, this.requests);
5514
+ await this.requests[e].controler.abort();
5515
+ this.requests = {};
5517
5516
  }
5518
5517
  }
5519
5518
  }), Or = (e, t) => (e.install = (n) => {
@@ -5525,7 +5524,6 @@ const pN = YA({
5525
5524
  }) : r.requests[o] = {
5526
5525
  controler: s
5527
5526
  }, new Promise((i, u) => {
5528
- var d;
5529
5527
  const c = { ...e };
5530
5528
  bp({
5531
5529
  url: c.url,
@@ -5537,16 +5535,15 @@ const pN = YA({
5537
5535
  },
5538
5536
  data: c.realDate ? c.data : Pu(c.data, !0),
5539
5537
  responseType: c.responseType,
5540
- signal: c.cancelPendingRequests || e.signalController ? ((d = e == null ? void 0 : e.signalController) == null ? void 0 : d.signal) || r.requests[o].controler.signal : null
5541
- }).then((v) => {
5542
- i(t ? c.realDate ? v : Pu(v) : c.realDate ? v.data : Pu(v.data));
5543
- }).catch((v) => {
5544
- u(v.response);
5545
- }), (window.navigator.userAgent.indexOf("MSIE ") > -1 || window.navigator.userAgent.indexOf("Trident/") > -1) && bp.interceptors.request.use((v) => (v.url.indexOf("GetRequirementItems") !== -1 && (console.log(v.url), v.headers.pragma = "no-cache", v.headers.cacheControl = "no-cache", v.headers.expires = "Sat, 01 Jan 2000 00:00:00 GMT"), v));
5538
+ signal: r.requests[o].controler.signal
5539
+ }).then((d) => {
5540
+ i(t ? c.realDate ? d : Pu(d) : c.realDate ? d.data : Pu(d.data));
5541
+ }).catch((d) => {
5542
+ u(d.response);
5543
+ }), (window.navigator.userAgent.indexOf("MSIE ") > -1 || window.navigator.userAgent.indexOf("Trident/") > -1) && bp.interceptors.request.use((d) => (d.url.indexOf("GetRequirementItems") !== -1 && (console.log(d.url), d.headers.pragma = "no-cache", d.headers.cacheControl = "no-cache", d.headers.expires = "Sat, 01 Jan 2000 00:00:00 GMT"), d));
5546
5544
  });
5547
5545
  }, BA = () => {
5548
- const e = pN();
5549
- console.log("requestStore.cancelAllRequests()"), e.cancelAllRequests();
5546
+ pN().cancelAllRequests();
5550
5547
  }, VA = Or(
5551
5548
  BA,
5552
5549
  "cancelAllApiRequests"
@@ -36,7 +36,7 @@ Only state can be modified.`);c[0]="$state",v3=!1,r.set(i,c,r.state.value),v3=!0
36
36
  Found in store "${b.$id}".`),g&&i&&o.hydrate&&o.hydrate(b.$state,g),f=!0,C=!0,b}function EN(t,n,o){let r,s;const i=typeof n=="function";if(typeof t=="string")r=t,s=i?o:n;else if(s=t,r=t.id,process.env.NODE_ENV!=="production"&&typeof r!="string")throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');function c(d,u){const f=e.hasInjectionContext();if(d=(process.env.NODE_ENV==="test"&&Eo&&Eo._testing?null:d)||(f?e.inject(Di,null):null),d&&So(d),process.env.NODE_ENV!=="production"&&!Eo)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Did you forget to install pinia?
37
37
  const pinia = createPinia()
38
38
  app.use(pinia)
39
- This will fail in production.`);d=Eo,d._s.has(r)||(i?A4(r,n,s,d):Ai(r,s,d),process.env.NODE_ENV!=="production"&&(c._pinia=d));const C=d._s.get(r);if(process.env.NODE_ENV!=="production"&&u){const p="__hot:"+r,_=i?A4(p,n,s,d,!0):Ai(p,Wt({},s),d,!0);u._hotUpdate(_),delete d.state.value[p],d._s.delete(p)}if(process.env.NODE_ENV!=="production"&&Fr){const p=e.getCurrentInstance();if(p&&p.proxy&&!u){const _=p.proxy,M="_pStores"in _?_._pStores:_._pStores={};M[r]=C}}return C}return c.$id=r,c}const Pi=EN({id:"requests",state:()=>({requests:{}}),actions:{async cancelAllRequests(){console.log(2,this.requests);for(const t in this.requests)console.log("await request.controler.abort()"),await this.requests[t].controler.abort(),console.log("controler.aborted");this.requests={},console.log(3,this.requests)}}}),zt=(t,n)=>(t.install=o=>{t._context=o._context,o.config.globalProperties[n]=t,o.component(n,t)},t),SN=function(t,n=!1,o){const r=Pi(),s=`${t.method}${t.url}`,i=t.signalController||new AbortController;return t.cancelPendingRequests&&r.requests[s]?(r.requests[s].controler.abort(),r.requests[s]={controler:i}):r.requests[s]={controler:i},new Promise((c,d)=>{var f;const u={...t};T4({url:u.url,method:u.method,params:u.realDate?u.params:Yr(u.params,!0),headers:{authorization:o,...u.headers},data:u.realDate?u.data:Yr(u.data,!0),responseType:u.responseType,signal:u.cancelPendingRequests||t.signalController?((f=t==null?void 0:t.signalController)==null?void 0:f.signal)||r.requests[s].controler.signal:null}).then(C=>{c(n?u.realDate?C:Yr(C):u.realDate?C.data:Yr(C.data))}).catch(C=>{d(C.response)}),(window.navigator.userAgent.indexOf("MSIE ")>-1||window.navigator.userAgent.indexOf("Trident/")>-1)&&T4.interceptors.request.use(C=>(C.url.indexOf("GetRequirementItems")!==-1&&(console.log(C.url),C.headers.pragma="no-cache",C.headers.cacheControl="no-cache",C.headers.expires="Sat, 01 Jan 2000 00:00:00 GMT"),C))})},Hi=zt(()=>{const t=Pi();console.log("requestStore.cancelAllRequests()"),t.cancelAllRequests()},"cancelAllApiRequests");function $N(t){return function(...n){const o=this;if(n[1]!==void 0){const s=document.getElementById(n[1]);if(s!==null){const i=document.createElement("div");i.className="loading__body",i.style.background="rgb(255 255 255 / 80%)",i.innerHTML+=`
39
+ This will fail in production.`);d=Eo,d._s.has(r)||(i?A4(r,n,s,d):Ai(r,s,d),process.env.NODE_ENV!=="production"&&(c._pinia=d));const C=d._s.get(r);if(process.env.NODE_ENV!=="production"&&u){const p="__hot:"+r,_=i?A4(p,n,s,d,!0):Ai(p,Wt({},s),d,!0);u._hotUpdate(_),delete d.state.value[p],d._s.delete(p)}if(process.env.NODE_ENV!=="production"&&Fr){const p=e.getCurrentInstance();if(p&&p.proxy&&!u){const _=p.proxy,M="_pStores"in _?_._pStores:_._pStores={};M[r]=C}}return C}return c.$id=r,c}const Pi=EN({id:"requests",state:()=>({requests:{}}),actions:{async cancelAllRequests(){for(const t in this.requests)await this.requests[t].controler.abort();this.requests={}}}}),zt=(t,n)=>(t.install=o=>{t._context=o._context,o.config.globalProperties[n]=t,o.component(n,t)},t),SN=function(t,n=!1,o){const r=Pi(),s=`${t.method}${t.url}`,i=t.signalController||new AbortController;return t.cancelPendingRequests&&r.requests[s]?(r.requests[s].controler.abort(),r.requests[s]={controler:i}):r.requests[s]={controler:i},new Promise((c,d)=>{const u={...t};T4({url:u.url,method:u.method,params:u.realDate?u.params:Yr(u.params,!0),headers:{authorization:o,...u.headers},data:u.realDate?u.data:Yr(u.data,!0),responseType:u.responseType,signal:r.requests[s].controler.signal}).then(f=>{c(n?u.realDate?f:Yr(f):u.realDate?f.data:Yr(f.data))}).catch(f=>{d(f.response)}),(window.navigator.userAgent.indexOf("MSIE ")>-1||window.navigator.userAgent.indexOf("Trident/")>-1)&&T4.interceptors.request.use(f=>(f.url.indexOf("GetRequirementItems")!==-1&&(console.log(f.url),f.headers.pragma="no-cache",f.headers.cacheControl="no-cache",f.headers.expires="Sat, 01 Jan 2000 00:00:00 GMT"),f))})},Hi=zt(()=>{Pi().cancelAllRequests()},"cancelAllApiRequests");function $N(t){return function(...n){const o=this;if(n[1]!==void 0){const s=document.getElementById(n[1]);if(s!==null){const i=document.createElement("div");i.className="loading__body",i.style.background="rgb(255 255 255 / 80%)",i.innerHTML+=`
40
40
  <div class='loading__spinner-wrapper' data-testid='loading-plus'>
41
41
  <svg>
42
42
  <circle cx='18' cy='18' r='18'></circle>
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "require": "./dist/pl-components-pack-v3.umd.js"
15
15
  }
16
16
  },
17
- "version": "1.2.26-pre-23",
17
+ "version": "1.2.26-pre-25",
18
18
  "scripts": {
19
19
  "dev": "vite",
20
20
  "build": "vite build",