piral-feeds
Advanced tools
Comparing version 1.8.0-beta.7653 to 1.8.0-beta.7655
{ | ||
"name": "piral-feeds", | ||
"version": "1.8.0-beta.7653", | ||
"version": "1.8.0-beta.7655", | ||
"description": "Plugin for connecting data feeds in Piral.", | ||
@@ -53,6 +53,6 @@ "keywords": [ | ||
"@types/react": "^18.0.0", | ||
"piral-core": "1.8.0-beta.7653", | ||
"piral-core": "1.8.0-beta.7655", | ||
"react": "^18.0.0" | ||
}, | ||
"gitHead": "bcb81e936bf3e74c0a503382076ef1b8617e263f" | ||
"gitHead": "68e1232fe36c56cf7edaa546389bc635693907bf" | ||
} |
@@ -1,1 +0,1 @@ | ||
var piralFeeds=(()=>{var K=Object.create;var m=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var _=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var P=t=>m(t,"__esModule",{value:!0});var s=(t=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(t,{get:(e,r)=>(typeof require!="undefined"?require:e)[r]}):t)(function(t){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var b=(t,e)=>{P(t);for(var r in e)m(t,r,{get:e[r],enumerable:!0})},k=(t,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of V(e))!j.call(t,o)&&o!=="default"&&m(t,o,{get:()=>e[o],enumerable:!(r=N(e,o))||r.enumerable});return t},c=t=>k(P(m(t!=null?K(_(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var H={};b(H,{createFeedsApi:()=>B,useFeed:()=>D,withFeed:()=>g});var y={};b(y,{createFeed:()=>L,destroyFeed:()=>$,loadFeed:()=>q,loadedFeed:()=>l,updateFeed:()=>x});var f=c(s("piral-core"));function L(t,e){t.dispatch(r=>({...r,feeds:(0,f.withKey)(r.feeds,e,{data:void 0,error:void 0,loaded:!1,loading:!1})}))}function $(t,e){t.dispatch(r=>({...r,feeds:(0,f.withoutKey)(r.feeds,e)}))}function q(t,e){let{id:r}=e;return t.dispatch(o=>({...o,feeds:(0,f.withKey)(o.feeds,r,{data:void 0,error:void 0,loaded:!1,loading:!0})})),e.initialize().then(o=>{l(t,r,o,void 0),e.dispose=e.connect(n=>{x(t,r,n,e.update)})},o=>l(t,r,void 0,o))}function l(t,e,r,o){t.dispatch(n=>({...n,feeds:(0,f.withKey)(n.feeds,e,{loading:!1,loaded:!0,error:o,data:r})}))}function x(t,e,r,o){let n=t.readState(a=>a.feeds[e]),i=o(n.data,r);if(i instanceof Promise)return i.then(a=>l(t,e,a,void 0)).catch(a=>l(t,e,void 0,a));i!==n.data&&l(t,e,i,void 0)}var A=c(s("piral-core"));var T=c(s("react")),C=c(s("piral-core"));var R=c(s("react")),F=c(s("piral-core"));function D(t){let{loaded:e,loading:r,error:o,data:n}=(0,F.useGlobalState)(a=>a.feeds[t.id]),i=(0,F.useAction)("loadFeed");return(0,R.useEffect)(()=>{!e&&!r&&i(t)},[e]),[e,n,o]}function g(t,e){let r=o=>{let[n,i,a]=D(e);return n?i?T.createElement(t,{...o,data:i}):T.createElement(C.RegisteredErrorInfo,{type:"feed",error:a}):T.createElement(C.RegisteredLoadingIndicator,null)};return r.displayName=`FeedView_${e.id}`,r}var w=c(s("piral-core")),S=()=>{};function G(t,e){return(0,w.isfunc)(e)?{id:t,initialize(){return e()},connect(){return S},update(r){return Promise.resolve(r)},immediately:!1,reducers:{}}:{id:t,initialize(){return e.initialize()},connect(r){return typeof e.connect=="function"?e.connect(r):S},update(r,o){return typeof e.update=="function"?e.update(r,o):Promise.resolve(r)},immediately:e.immediately,reducers:e.reducers||{}}}function B(t={}){return e=>(e.defineActions(y),e.dispatch(r=>({...r,feeds:{}})),(r,o)=>{let n=0;return{createConnector(i){let a=(0,A.buildName)(o.name,n++),d=G(a,i),h=()=>{d.dispose?.(),e.createFeed(d.id)};d.immediately?e.loadFeed(d):h();let u=p=>g(p,d);return Object.keys(d.reducers).forEach(p=>{let I=d.reducers[p];typeof I=="function"&&(u[p]=(...O)=>{e.updateFeed(a,O,(z,E)=>I.call(u,z,...E))})}),u.invalidate=h,u}}})}return H;})(); | ||
var piralFeeds=(()=>{var E=Object.create;var m=Object.defineProperty;var K=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var V=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty;var s=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var P=(t,e)=>{for(var n in e)m(t,n,{get:e[n],enumerable:!0})},h=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of N(e))!_.call(t,r)&&r!==n&&m(t,r,{get:()=>e[r],enumerable:!(o=K(e,r))||o.enumerable});return t};var j=(t,e,n)=>(n=t!=null?E(V(t)):{},h(e||!t||!t.__esModule?m(n,"default",{value:t,enumerable:!0}):n,t)),k=t=>h(m({},"__esModule",{value:!0}),t);var H={};P(H,{createFeedsApi:()=>B,useFeed:()=>D,withFeed:()=>y});var C={};P(C,{createFeed:()=>L,destroyFeed:()=>$,loadFeed:()=>q,loadedFeed:()=>f,updateFeed:()=>b});var c=s("piral-core");function L(t,e){t.dispatch(n=>({...n,feeds:(0,c.withKey)(n.feeds,e,{data:void 0,error:void 0,loaded:!1,loading:!1})}))}function $(t,e){t.dispatch(n=>({...n,feeds:(0,c.withoutKey)(n.feeds,e)}))}function q(t,e){let{id:n}=e;return t.dispatch(o=>({...o,feeds:(0,c.withKey)(o.feeds,n,{data:void 0,error:void 0,loaded:!1,loading:!0})})),e.initialize().then(o=>{f(t,n,o,void 0),e.dispose=e.connect(r=>{b(t,n,r,e.update)})},o=>f(t,n,void 0,o))}function f(t,e,n,o){t.dispatch(r=>({...r,feeds:(0,c.withKey)(r.feeds,e,{loading:!1,loaded:!0,error:o,data:n})}))}function b(t,e,n,o){let r=t.readState(a=>a.feeds[e]),i=o(r.data,n);if(i instanceof Promise)return i.then(a=>f(t,e,a,void 0)).catch(a=>f(t,e,void 0,a));i!==r.data&&f(t,e,i,void 0)}var w=s("piral-core");var F=j(s("react")),T=s("piral-core");var x=s("react"),p=s("piral-core");function D(t){let{loaded:e,loading:n,error:o,data:r}=(0,p.useGlobalState)(a=>a.feeds[t.id]),i=(0,p.useAction)("loadFeed");return(0,x.useEffect)(()=>{!e&&!n&&i(t)},[e]),[e,r,o]}function y(t,e){let n=o=>{let[r,i,a]=D(e);return r?i?F.createElement(t,{...o,data:i}):F.createElement(T.RegisteredErrorInfo,{type:"feed",error:a}):F.createElement(T.RegisteredLoadingIndicator,null)};return n.displayName=`FeedView_${e.id}`,n}var S=s("piral-core"),R=()=>{};function G(t,e){return(0,S.isfunc)(e)?{id:t,initialize(){return e()},connect(){return R},update(n){return Promise.resolve(n)},immediately:!1,reducers:{}}:{id:t,initialize(){return e.initialize()},connect(n){return typeof e.connect=="function"?e.connect(n):R},update(n,o){return typeof e.update=="function"?e.update(n,o):Promise.resolve(n)},immediately:e.immediately,reducers:e.reducers||{}}}function B(t={}){return e=>(e.defineActions(C),e.dispatch(n=>({...n,feeds:{}})),(n,o)=>{let r=0;return{createConnector(i){let a=(0,w.buildName)(o.name,r++),d=G(a,i),g=()=>{d.dispose?.(),e.createFeed(d.id)};d.immediately?e.loadFeed(d):g();let u=l=>y(l,d);return Object.keys(d.reducers).forEach(l=>{let I=d.reducers[l];typeof I=="function"&&(u[l]=(...A)=>{e.updateFeed(a,A,(O,z)=>I.call(u,O,...z))})}),u.invalidate=g,u}}})}return k(H);})(); |
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
61509
1412