@abtnode/webapp 1.8.67-beta-794a8082 → 1.8.68-beta-500af7e5

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.
Files changed (28) hide show
  1. package/README.md +7 -0
  2. package/blocklet.js +1 -1
  3. package/blocklet.yml +1 -1
  4. package/build/asset-manifest.json +12 -12
  5. package/build/index.html +1 -1
  6. package/build/static/js/154.ed29c7ae.chunk.js +1 -0
  7. package/build/static/js/{2997.14267b41.chunk.js → 2657.134c2d90.chunk.js} +1 -1
  8. package/build/static/js/{4691.767ce122.chunk.js → 4691.83db69c0.chunk.js} +2 -2
  9. package/build/static/js/7327.569ee69d.chunk.js +1 -0
  10. package/build/static/js/8213.b0d24efb.chunk.js +1 -0
  11. package/build/static/js/8352.09c5b09c.chunk.js +1 -0
  12. package/build/static/js/851.4e470c57.chunk.js +1 -0
  13. package/build/static/js/898.4ded69a6.chunk.js +1 -0
  14. package/build/static/js/9455.f923c76e.chunk.js +1 -0
  15. package/build/static/js/{9575.a2843f46.chunk.js → 9575.f1600167.chunk.js} +2 -2
  16. package/build/static/js/main.dd5f65f5.js +2 -0
  17. package/package.json +1 -1
  18. package/build/static/js/1005.d8a68847.chunk.js +0 -1
  19. package/build/static/js/154.24e25881.chunk.js +0 -1
  20. package/build/static/js/1850.b1684fda.chunk.js +0 -1
  21. package/build/static/js/7327.d53d18a8.chunk.js +0 -1
  22. package/build/static/js/8213.e97524cc.chunk.js +0 -1
  23. package/build/static/js/8352.145a0c55.chunk.js +0 -1
  24. package/build/static/js/851.3096ea1f.chunk.js +0 -1
  25. package/build/static/js/main.a8f35e12.js +0 -2
  26. /package/build/static/js/{4691.767ce122.chunk.js.LICENSE.txt → 4691.83db69c0.chunk.js.LICENSE.txt} +0 -0
  27. /package/build/static/js/{9575.a2843f46.chunk.js.LICENSE.txt → 9575.f1600167.chunk.js.LICENSE.txt} +0 -0
  28. /package/build/static/js/{main.a8f35e12.js.LICENSE.txt → main.dd5f65f5.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[7327],{77327:function(e,t,n){n.r(t),n.d(t,{BlockletList:function(){return fe},default:function(){return me}});var l,o,a=n(71171),i=n(33028),r=n(32723),s=n(34795),c=n(96234),d=n(5057),u=n(33518),m=n(85493),f=n(15849),p=n(67654),x=n(11750),h=n(37565),b=n(21769),g=n(74490),k=n(39948),v=n(72904),j=n(37298),y=n(78146),C=n(44846),Z=n(42873),w=n(19561),S=n(31290),L=n(13714),_=n(52118),A=n(35432),B=n(32356),D=n(30746),P=n(80514),N=n(98867),R=n(56048),T=n(82594),I=n(54474),F=n(38242),O=n(60411),z=n(52926),E=n(74094),M=n(17265),U=n(59740),W=n(49603),J=n(24138),V=n(96266),q=["blocklet","skipAccessibilityCheck"];function G(e){var t=e.blocklet,n=e.skipAccessibilityCheck,l=void 0!==n&&n,o=(0,U.Z)(e,q),a=(0,d.useContext)(_.LocaleContext).t,r=(0,J.BZ)(t),s=r.urls,c=r.loading,u=r.recommendedUrl;if(c&&!l)return(0,V.jsx)(C.Z,(0,i.Z)({size:12},o));var m=l?s[0]:u;return m?(0,V.jsx)(K,(0,i.Z)((0,i.Z)({},o),{},{children:(0,V.jsx)(H,{children:(0,V.jsx)(W.Z,{href:m,target:"_blank",className:"blocklet-interface",underline:"hover",children:a("common.open")})})})):a("blocklet.router.noAccessibleUrl")}var H=u.default.div(l||(l=(0,a.Z)(["\n display: flex;\n margin: 4px 0;\n"]))),K=u.default.div(o||(o=(0,a.Z)(["\n .blocklet-interface {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n white-space: nowrap;\n\n img {\n margin-right: 4px;\n }\n }\n"])));G.defaultProps={skipAccessibilityCheck:!1};var Q=n(44919),X=n(75e3),Y=n(29316),$=n(50438),ee=n(31853),te=n(99593),ne=n(50453),le=n(47020),oe=n(57090),ae=n(48208);function ie(e){var t=e.onCancel,n=e.onSuccess,l=(0,O.h6)().info,o=(0,_.useLocaleContext)().t,a=(0,ae.useSessionContext)().api,i=(0,ee.default)({loading:!1,error:"",title:"",description:"",isConnectOpen:!1}),r=(0,c.Z)(i,2),s=r[0],d=r[1];return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(te.default,{title:o("blocklet.installFromCreate"),fullWidth:!0,maxWidth:"sm",onClose:function(){return t()},showCloseButton:!0,open:!0,actions:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(L.default,{onClick:function(e){e.stopPropagation(),t()},color:"inherit",children:o("common.cancel")}),(0,V.jsxs)(L.default,{onClick:function(e){e.stopPropagation(),d({loading:!0,isConnectOpen:!0})},color:"primary","data-cy":"install-blocklet-next-step",variant:"contained",disabled:s.loading||s.error||!s.title||!s.description,style:{marginLeft:8},children:[s.loading&&(0,V.jsx)(C.Z,{size:16}),o("common.create")]})]}),children:[(0,V.jsx)(ne.Z,{component:"div",children:(0,V.jsxs)(x.Z,{component:"div",children:[(0,V.jsx)(le.Z,{style:{marginBottom:24},label:"Blocklet ".concat(o("common.title")),autoComplete:"off",variant:"outlined",fullWidth:!0,autoFocus:!0,value:s.title,onChange:function(e){d({error:"",title:e.target.value})},disabled:s.loading}),(0,V.jsx)(le.Z,{label:"Blocklet ".concat(o("common.description")),autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.description,onChange:function(e){d({error:"",description:e.target.value})},disabled:s.loading})]})}),!!s.error&&(0,V.jsx)(S.default,{type:"error",style:{width:"100%",marginTop:8},children:s.error})]}),(0,V.jsx)(oe.default,{popup:!0,open:s.isConnectOpen,forceConnected:!1,className:"launch-from-create-auth",action:"launch-free-blocklet-by-session",checkFn:a.get,checkTimeout:3e5,webWalletUrl:(0,E.yP)(l),onSuccess:function(e){d({loading:!1,isConnectOpen:!1}),n(e)},extraParams:{title:s.title,description:s.description},messages:{title:o("setup.keyPair.title"),scan:o("setup.keyPair.scan"),confirm:o("setup.keyPair.confirm"),success:o("setup.keyPair.success")},onClose:function(){d({loading:!1,isConnectOpen:!1})}})]})}function re(e){var t=e.onCreate,n=(0,m.s0)(),l=(0,_.useLocaleContext)().t,o=(0,d.useState)(""),a=(0,c.Z)(o,2),i=a[0],u=a[1],f=(0,d.useState)(""),p=(0,c.Z)(f,2),x=p[0],h=p[1],b=(0,d.useState)(null),g=(0,c.Z)(b,2),k=g[0],v=g[1],j=(0,d.useState)(null),y=(0,c.Z)(j,2),C=y[0],Z=y[1],w=function(){v(null)},S=function(){var e=(0,s.Z)((0,r.Z)().mark((function e(){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n("/blocklets/restore-from-spaces");case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(Y.default,{onClick:function(){return n("/store")},menuButtonProps:{"data-cy":"open-install-menu"},menu:[(0,V.jsx)(Y.default.Item,{"data-cy":"open-install-form",onClick:function(){v({onCancel:function(){w(),v(null)},onSuccess:function(){w()}})},children:l("blocklet.installFromUrl")},"1"),(0,V.jsx)(Y.default.Item,{"data-cy":"open-create-form",onClick:function(){Z({onCancel:function(){Z(null)},onSuccess:function(){Z(null),t.apply(void 0,arguments)}})},children:l("blocklet.installFromCreate")},"2"),(0,V.jsx)(Y.default.Item,{"data-cy":"open-install-from-spaces",onClick:function(){return S()},children:l("blocklet.restoreFromSpaces.title")},"3")].filter(Boolean),children:[(0,V.jsx)(Q.default,{}),l("blocklet.installFromMarket")]}),!!i&&(0,V.jsx)(X.default,{variant:"error",message:i,onClose:function(){return u("")}}),!!x&&(0,V.jsx)(X.default,{variant:"success",duration:3e3,message:x,onClose:function(){return h("")}}),k&&(0,V.jsx)($.default,{onCancel:k.onCancel,onSuccess:k.onSuccess}),C&&(0,V.jsx)(ie,{onCancel:C.onCancel,onSuccess:C.onSuccess})]})}ie.defaultProps={},re.defaultProps={onCreate:function(){}};var se,ce,de=n(7199),ue="internal";function me(){return(0,V.jsx)(P.DeletingBlockletProvider,{children:(0,V.jsx)(fe,{})})}function fe(){var e=(0,m.s0)(),t=(0,O.h6)(),n=(0,f.useSearchParams)(),l=(0,c.Z)(n,2),o=l[0],a=l[1],u=(0,z.RJ)(),U=u.data,W=u.externalData,J=u.error,q=u.refresh,H=u.loading,K=(0,P.useDeletingBlockletContext)(),Q=K.deletingBlocklets,X=K.addDeletingDid,Y=K.removeDeletingDid,$=K.matchDeletingDid,ee=(0,_.useLocaleContext)(),te=ee.t,ne=ee.locale,le=(0,d.useState)(o.get("searchText")),oe=(0,c.Z)(le,2),ae=oe[0],ie=oe[1],se=(0,p.default)("show-external-blocklet-actions",!1),ce=(0,c.Z)(se,1)[0],me=[{id:ue,name:te("blocklet.internal")},{id:"external",name:te("blocklet.external")}],fe=(0,d.useState)(ue),he=(0,c.Z)(fe,2),be=he[0],ge=he[1],ke=be===ue?U:W,ve=(null===t||void 0===t?void 0:t.info.mode)!==A.NODE_MODES.SERVERLESS;$(ke.map((function(e){return e.meta.did})));var je=function(e){var t=e.action,n=e.blocklet;"remove"===t&&X(n.meta.did)},ye=function(){var e=(0,s.Z)((0,r.Z)().mark((function e(n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.error){e.next=4;break}return B.default.error(n.error.message),"remove"===n.action&&Y(n.blocklet.meta.did),e.abrupt("return");case 4:"remove"===n.action&&t.refresh({silent:!0});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ce=(0,v.Z)((function(e){return e.breakpoints.up("md")})),Ze=null,we=ke||[];if(J)Ze=(0,V.jsx)(S.default,{type:"error",variant:"icon",children:(0,V.jsxs)("div",{children:[(0,E.Z)(J),(0,V.jsx)(L.default,{onClick:function(){return q({silent:!1})},children:(0,V.jsx)("span",{style:{color:"#44cdc6",textDecoration:"underline"},children:te("common.retry")})})]})});else if(we.length>0||H){var Se=["installedAt","startedAt","stoppedAt","createdAt"],Le=function(e){if("starting"===e.status)return new Date("2199").getTime();if("running"===e.status){if(e.appRuntimeInfo)return e.appRuntimeInfo.startAt;if(e.startedAt)return e.startedAt.getTime()}return 0},_e=we.map((function(e){return Se.forEach((function(t){if(e[t]){var n=new Date(e[t]);e[t]=n}})),e})).sort((function(e,t){var n=Le(e);return Le(t)-n}));ae&&(_e=_e.filter((function(e){var t,n=(0,F.getDisplayName)(e,!0)||"",l=(null===(t=e.site)||void 0===t?void 0:t.domainAliases)||[],o=ae.trim().toLocaleLowerCase();return n.toLocaleLowerCase().includes(o)||l.some((function(e){var t;return null===(t=e.value)||void 0===t?void 0:t.toLocaleLowerCase().includes(o)}))})));var Ae=(0,j.getDurableData)("blocklets-list");Ae.searchText&&!ae&&ie(Ae.searchText);var Be=[{label:te("common.name"),name:"meta.title",options:{customBodyRenderLite:function(e){var t=_e[e],n=(0,F.getAppMissingConfigs)(t).length>0?"components":"overview";return(0,V.jsx)(f.Link,{to:"/blocklets/".concat(t.meta.did,"/").concat(n),className:"blocklet-name-wrapper",children:(0,V.jsxs)(x.Z,{component:"strong",variant:"body1",className:"blocklet-name",children:[(0,V.jsx)(I.Z,{blocklet:t,style:{marginRight:8}}),(0,V.jsxs)(k.Z,{children:[(0,V.jsx)(k.Z,{children:(0,F.getDisplayName)(t)}),(0,V.jsxs)(k.Z,{children:[(0,V.jsx)(T.default,{mode:t.mode||""}),t.controller&&(0,V.jsx)(R.default,{type:"primary",children:te("blocklet.external")})]})]})]})},t.meta.did)}}},be===ue?{label:te("common.visit"),name:"runtimeInfo.pid",align:"left",options:{sort:!1,customBodyRenderLite:function(e){var t=_e[e];return(0,V.jsx)(G,{blocklet:t},t.meta.did)}}}:null,{label:te("common.version"),name:"meta.version",options:{customBodyRenderLite:function(e){var t=_e[e];return(0,V.jsx)(N.default,{blocklet:t,checkUpgrade:!1},t.meta.did)}}},{label:te("common.installedAt"),name:"installedAt",options:{customBodyRenderLite:function(e){var t=_e[e];return t.installedAt?(0,V.jsx)(y.default,{value:t.installedAt.getTime(),locale:ne},t.meta.did):t.createdAt?(0,V.jsx)(y.default,{value:t.createdAt.getTime(),locale:ne},t.meta.did):""}}},{label:te("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite:function(e){var t=_e[e];return"running"===t.status&&t.appRuntimeInfo?(0,V.jsx)(y.default,{value:t.appRuntimeInfo.startAt,locale:ne},t.meta.did):""}}},{label:te("common.status"),name:"status",width:120,align:"center",options:{customBodyRenderLite:function(e){var t=_e[e];return(0,V.jsx)(D.default,{"data-cy":"blocklet-status","status-blocklet-did":t.meta.did,status:Q.includes(t.meta.did)?"deleting":t.status,source:t.source},t.meta.did)}}},be===ue||ce?{label:te("common.actions"),name:"",width:90,options:{sort:!1,customBodyRenderLite:function(e){var t=_e[e];return(0,V.jsx)(M.Z,{blocklet:t,variant:"menu",onStart:je,onComplete:ye},t.meta.did)}}}:null].filter(Boolean),De={};Ce||(De.TableBody=function(e){if(H)return(0,V.jsx)(Z.default,{relative:"parent",children:(0,V.jsx)(C.Z,{})});var t=e.page,n=e.rowsPerPage,l=_e.slice(t*n,(t+1)*n);return l.length?(0,V.jsx)("div",{children:l.map((function(e){var t=(0,F.getAppMissingConfigs)(e).length>0?"components":"overview";return(0,V.jsxs)(k.Z,{className:"blocklet-item--mobile",display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,V.jsx)(I.Z,{className:"blocklet__avatar",blocklet:e,size:Ce?40:60}),(0,V.jsxs)(f.Link,{className:"blocklet__content",to:"/blocklets/".concat(e.meta.did,"/").concat(t),children:[(0,V.jsxs)(k.Z,{display:"flex",justifyContent:"space-between",alignItems:"flex-start",children:[(0,V.jsx)(x.Z,{component:"strong",variant:"body1",className:"blocklet__name",children:(0,F.getDisplayName)(e,!0)}),(0,V.jsx)(M.Z,{blocklet:e,variant:"menu",onStart:je,onComplete:ye},e.meta.did)]}),(0,V.jsxs)(x.Z,{component:"small",className:"blocklet__addons",children:[(0,V.jsxs)(k.Z,{display:"flex",alignItems:"center",children:[(0,V.jsx)(N.default,{blocklet:e}),(0,V.jsx)(G,{blocklet:e,style:{marginLeft:16,fontSize:14}})]}),(0,V.jsx)(D.default,{"status-blocklet-did":e.meta.did,status:e.status,source:e.source},e.meta.did)]})]})]})}))}):(0,V.jsx)(w.default,{children:te("common.empty")})}),Ze=(0,V.jsx)(pe,{children:(0,V.jsx)(j.default,{loading:H,className:"blocklet-list",title:(0,V.jsx)(k.Z,{display:"flex",alignItems:"center",children:te("blocklet.index.tableTitle")}),locale:ne,data:_e,columns:Be,durable:"blocklets-list",options:(0,i.Z)((0,i.Z)({download:!1,filter:!1,print:!1,searchPlaceholder:te("common.search"),searchAlwaysOpen:!0,sortOrder:{name:"uptime",direction:"desc"},searchDebounceTime:300,onSearchChange:function(e){ie(e),a({searchText:null!==e&&void 0!==e?e:""})},customSearch:function(){return!0}},Ae),{},{searchText:ae}),components:De})})}else 0===we.length&&(Ze=(0,V.jsx)(S.default,{type:"warning",variant:"icon",children:te("blocklet.index.noBlocklet")}));return(0,V.jsxs)(xe,{children:[(0,V.jsxs)(x.Z,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:[(0,V.jsxs)(k.Z,{display:"flex",alignItems:"center",children:[te("common.blocklets"),!(!W||!W.length)&&(0,V.jsx)(h.Z,{sx:{ml:1},children:(0,V.jsx)(b.Z,{value:be,onChange:function(e){return ge(e.target.value)},size:"small",children:me.map((function(e){return(0,V.jsx)(g.Z,{value:e.id,children:te(e.name)},e.id)}))})})]}),(0,V.jsx)(de.Z,{permission:"mutate_blocklets",children:ve&&(0,V.jsx)(re,{onCreate:function(t){e("/blocklets/".concat(t.blockletDid,"/components"))}})})]}),Ze]})}var pe=u.default.div(se||(se=(0,a.Z)(["\n .blocklet-item--mobile {\n padding: 16px 0;\n }\n"]))),xe=u.default.main(ce||(ce=(0,a.Z)(["\n .page-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .blocklet-list {\n .blocklet-item--mobile {\n .blocklet__avatar {\n margin-right: -60px;\n }\n .blocklet__content {\n padding-left: 68px;\n flex: 1;\n display: flex;\n flex-direction: column;\n z-index: 1;\n }\n .blocklet__name {\n font-weight: bold;\n text-decoration: none;\n white-space: normal;\n word-break: break-all;\n }\n .blocklet__addons {\n display: flex;\n justify-content: space-between;\n margin-top: 5px;\n margin-bottom: -10px;\n }\n }\n .blocklet-name-wrapper {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n }\n .blocklet-name {\n font-weight: bold;\n text-decoration: underline;\n display: flex;\n align-items: center;\n white-space: normal;\n word-break: break-all;\n }\n\n .blocklet-interface {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n\n img {\n margin-right: 4px;\n }\n }\n\n .MuiToolbar-root {\n display: flex;\n }\n }\n"])))}}]);