@next-bricks/ai-portal 0.41.0 → 0.41.1

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 (25) hide show
  1. package/dist/bricks.json +33 -33
  2. package/dist/chunks/{2608.e0bf7de9.js → 2608.33f641c9.js} +2 -2
  3. package/dist/chunks/{2608.e0bf7de9.js.map → 2608.33f641c9.js.map} +1 -1
  4. package/dist/chunks/{382.6655f2dc.js → 382.d2e3f46f.js} +2 -2
  5. package/dist/chunks/{382.6655f2dc.js.map → 382.d2e3f46f.js.map} +1 -1
  6. package/dist/chunks/{4957.b0937d56.js → 4957.f878df32.js} +3 -3
  7. package/dist/chunks/{4957.b0937d56.js.map → 4957.f878df32.js.map} +1 -1
  8. package/dist/chunks/{5521.eeb5a205.js → 5521.ef48a4d3.js} +2 -2
  9. package/dist/chunks/{5521.eeb5a205.js.map → 5521.ef48a4d3.js.map} +1 -1
  10. package/dist/chunks/{6862.fc9c39ee.js → 6862.32630cc8.js} +3 -3
  11. package/dist/chunks/{6862.fc9c39ee.js.map → 6862.32630cc8.js.map} +1 -1
  12. package/dist/chunks/goal-card-list.5f61cd91.js +3 -0
  13. package/dist/chunks/{goal-card-list.7a0aecb2.js.map → goal-card-list.5f61cd91.js.map} +1 -1
  14. package/dist/chunks/{main.8a0a20f0.js → main.c7c296c8.js} +2 -2
  15. package/dist/chunks/{main.8a0a20f0.js.map → main.c7c296c8.js.map} +1 -1
  16. package/dist/examples.json +22 -22
  17. package/dist/{index.b28b88f6.js → index.663fc8d5.js} +2 -2
  18. package/dist/{index.b28b88f6.js.map → index.663fc8d5.js.map} +1 -1
  19. package/dist/manifest.json +235 -235
  20. package/dist/types.json +454 -454
  21. package/package.json +2 -2
  22. package/dist/chunks/goal-card-list.7a0aecb2.js +0 -3
  23. /package/dist/chunks/{4957.b0937d56.js.LICENSE.txt → 4957.f878df32.js.LICENSE.txt} +0 -0
  24. /package/dist/chunks/{6862.fc9c39ee.js.LICENSE.txt → 6862.32630cc8.js.LICENSE.txt} +0 -0
  25. /package/dist/chunks/{goal-card-list.7a0aecb2.js.LICENSE.txt → goal-card-list.5f61cd91.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/ai-portal",
3
- "version": "0.41.0",
3
+ "version": "0.41.1",
4
4
  "homepage": "https://github.com/easyops-cn/next-advanced-bricks/tree/master/bricks/ai-portal",
5
5
  "repository": {
6
6
  "type": "git",
@@ -48,5 +48,5 @@
48
48
  "@next-bricks/presentational": "*",
49
49
  "@next-bricks/vs": "*"
50
50
  },
51
- "gitHead": "4f960963f5bf8c8cdc2501dd0b35b0ee2aca4fbe"
51
+ "gitHead": "a38f6e1eb73b840c26b34b35f74bc762a234db83"
52
52
  }
@@ -1,3 +0,0 @@
1
- /*! For license information please see goal-card-list.7a0aecb2.js.LICENSE.txt */
2
- (globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[2052,4322],{2373:(t,e,n)=>{"use strict";let i;function r(t){return t?function(){if("boolean"!=typeof i){const t=document.createElement("div");t.setAttribute("contenteditable","PLAINTEXT-ONLY"),i="plaintext-only"===t.contentEditable}return i}()?"plaintext-only":"true":"false"}n.d(e,{U:()=>r})},5536:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var i=n(12559);function r(t,e,n){return n((0,i.A)(t,e))}},10335:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(36758),r=n.n(i),o=n(40935),a=n.n(o)()(r());a.push([t.id,":host{display:inline-block}:host([hidden]){display:none}.goal-container{display:flex;flex-direction:column;gap:4px}.loading{display:flex;align-items:center;justify-content:center;padding:24px;font-size:20px;color:#595959}",""]);const s=a.toString()},11369:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var i=n(17545);function r(t){var e=function(t){if("object"!=(0,i.A)(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=(0,i.A)(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==(0,i.A)(e)?e:e+""}},12559:(t,e,n)=>{"use strict";function i(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}n.d(e,{A:()=>i})},17545:(t,e,n)=>{"use strict";function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}n.d(e,{A:()=>i})},26902:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var i=n(17545);function r(t){if(Object(t)!==t)throw TypeError("right-hand side of 'in' should be an object, got "+(null!==t?(0,i.A)(t):"null"));return t}},30404:(t,e,n)=>{"use strict";n.r(e),n.d(e,{GoalCardList:()=>X});var i,r=n(74635),o=n(70918),a=n(26902),s=n(5536),c=n(86121),l=n(70829),u=n(62740),p=n(18769),d=n.n(p),m=n(7921),g=n(11280),f=(n(65168),n(87117)),h=n(46134),v=n(46342),y=n(10335),b=n(71513);let A,S,T,w,k,E,x,C,N,_,U,I,W,j,M,P,L,O,R,K,z,D,B;(0,f.initializeI18n)(h.NS,h.I);const{defineElement:G,property:H,event:F}=(0,m.createDecorators)(),V=(0,g.wrapBrick)("eo-icon");let X;var q=new WeakMap,Y=new WeakMap,$=new WeakMap,J=new WeakMap,Q=new WeakSet,Z=new WeakMap,tt=new WeakMap,et=new WeakMap,nt=new WeakMap,it=new WeakMap,rt=new WeakMap,ot=new WeakMap;class at extends g.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Q),(0,o.A)(this,q,S(this)),(0,o.A)(this,Y,(T(this),w(this))),(0,o.A)(this,$,(k(this),E(this))),(0,o.A)(this,J,(x(this),C(this))),(0,o.A)(this,Z,(U(this),t=>{(0,s.A)(Q,this,N).emit(t)})),(0,o.A)(this,tt,I(this)),(0,o.A)(this,et,(M(this),t=>{(0,s.A)(Q,this,W).emit(t)})),(0,o.A)(this,nt,P(this)),(0,o.A)(this,it,(R(this),t=>{(0,s.A)(Q,this,L).emit(t)})),(0,o.A)(this,rt,K(this)),(0,o.A)(this,ot,(B(this),t=>{(0,s.A)(Q,this,z).emit(t)}))}get goalList(){return(0,l.A)(q,this)}set goalList(t){(0,c.A)(q,this,t)}get cardStyle(){return(0,l.A)(Y,this)}set cardStyle(t){(0,c.A)(Y,this,t)}get activeKey(){return(0,l.A)($,this)}set activeKey(t){(0,c.A)($,this,t)}render(){return d().createElement(st,{goalList:this.goalList,cardStyle:this.cardStyle,onTitleChange:(0,l.A)(it,this),onStatusChange:(0,l.A)(et,this),onItemClick:(0,l.A)(Z,this),onNewChat:(0,l.A)(ot,this),activeKey:this.activeKey})}}function st(t){let{goalList:e,cardStyle:n,onTitleChange:i,onStatusChange:r,onItemClick:o,onNewChat:a,activeKey:s}=t;const[c,l]=(0,p.useState)(e);(0,p.useEffect)((()=>{l(e)}),[e]);const u=(t,e,n,i)=>{const r={...t,[e]:n};l(null==c?void 0:c.map((t=>t.instanceId===r.instanceId?r:t))),null==i||i(r)};return c?d().createElement("div",{className:"goal-container"},null==c?void 0:c.map((t=>d().createElement(b.B,{key:t.instanceId,isActive:s===t.instanceId,goalItem:t,cardStyle:n,onTitleChange:e=>((t,e)=>{u(e,"title",t,i)})(e,t),onStatusChange:e=>((t,e)=>{u(e,"state",t,r)})(e,t),onNewChat:()=>null==a?void 0:a(t),onClick:()=>null==o?void 0:o(t)})))):d().createElement("div",{className:"loading"},d().createElement(V,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))}i=at,({e:[S,T,w,k,E,x,C,N,_,U,I,W,j,M,P,L,O,R,K,z,D,B],c:[X,A]}=(0,u.A)(i,[G("ai-portal.goal-card-list",{styleTexts:[y.A,v.A]})],[[H({attribute:!1}),1,"goalList"],[H({attribute:!1}),1,"cardStyle"],[H(),1,"activeKey"],[F({type:"item.click"}),1,"itemClickEvent",t=>(0,l.A)(J,t),(t,e)=>(0,c.A)(J,t,e)],[F({type:"item.status.change"}),1,"itemStatusChangeEvent",t=>(0,l.A)(tt,t),(t,e)=>(0,c.A)(tt,t,e)],[F({type:"item.title.change"}),1,"itemTitleChangeEvent",t=>(0,l.A)(nt,t),(t,e)=>(0,c.A)(nt,t,e)],[F({type:"item.new.chat"}),1,"itemNewChatEvent",t=>(0,l.A)(rt,t),(t,e)=>(0,c.A)(rt,t,e)]],0,(t=>ot.has((0,a.A)(t))),g.ReactNextElement)),A()},36758:t=>{"use strict";t.exports=function(t){return t[1]}},40935:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,i,r,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(i)for(var s=0;s<this.length;s++){var c=this[s][0];null!=c&&(a[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);i&&a[u[0]]||(void 0!==o&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},e}},46134:(t,e,n)=>{"use strict";n.d(e,{I:()=>a,K:()=>r,NS:()=>o,t:()=>s});var i=n(87117);let r=function(t){return t.UN_START_STATUS="UN_START_STATUS",t.RUNNING_STATUS="RUNNING_STATUS",t.COMPLETED_STATUS="COMPLETED_STATUS",t.NEW_CHAT="NEW_CHAT",t}({});const o="bricks/ai-portal/goal-card-list",a={en:{UN_START_STATUS:"Not Start",RUNNING_STATUS:"Running",COMPLETED_STATUS:"Completed",NEW_CHAT:"New Chat"},zh:{UN_START_STATUS:"未开始",RUNNING_STATUS:"运行中",COMPLETED_STATUS:"已完成",NEW_CHAT:"新对话"}},s=i.i18n.getFixedT(null,o)},46342:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(36758),r=n.n(i),o=n(40935),a=n.n(o)()(r());a.push([t.id,".goal-item{display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;padding:14px 24px;background-color:rgba(255,255,255,0.6);border-radius:8px;-webkit-user-select:none;user-select:none}.goal-item:hover{background-color:rgba(0,0,0,0.05)}.goal-item:hover .end .operation{display:block}.goal-item:hover .end .info{display:none}.goal-item.completed .serial-number,.goal-item.completed .title{color:#bfbfbf}.goal-item.active{background:rgba(37,64,255,0.1);border:1px solid #2540ff}.goal-item > *{-webkit-user-select:auto;user-select:auto}.goal-item .start,.goal-item .end{display:flex;align-items:center}.goal-item .start{flex:1;min-width:0;column-gap:16px;min-width:0}.goal-item .end{flex-shrink:0;column-gap:30px}.goal-item .end .operation{display:none}.goal-item .end .operation .new-chat::part(button){height:28px;font-size:13px;padding:5px 10px}.goal-item .end .info{display:inline-flex;align-items:center;column-gap:16px}.goal-item .serial-number{font-weight:400;color:var(--palette-gray-7)}.goal-item .title{font-weight:500;padding:2px 4px;color:var(--palette-gray-10);border:1px solid transparent;border-radius:8px;cursor:pointer;min-width:0}.goal-item .title:hover{background-color:rgba(255,255,255,0.6);border:1px solid var(--palette-gray-5);cursor:text}.goal-item .title:focus{outline:none;background-color:rgba(255,255,255,0.6);border:1px solid var(--elevo-color-brand)}.goal-item .icon{border-radius:8px;padding:4px;margin-top:4px}.goal-item .icon:hover{background-color:rgba(0,0,0,0.04)}.goal-item .message{color:var(--palette-gray-7);display:inline-flex;align-items:center;column-gap:6px}.goal-item .message .count{font-weight:500;color:var(--palette-gray-10)}.goal-item:not(.editing) .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}",""]);const s=a.toString()},53373:(t,e)=>{var n;!function(){"use strict";var i={}.hasOwnProperty;function r(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(t=a(t,o(n)))}return t}function o(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return r.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var n in t)i.call(t,n)&&t[n]&&(e=a(e,n));return e}function a(t,e){return e?t?t+" "+e:t+e:t}t.exports?(r.default=r,t.exports=r):void 0===(n=function(){return r}.apply(e,[]))||(t.exports=n)}()},62740:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(17545),r=n(26902);function o(t,e,n){"symbol"==(0,i.A)(e)&&(e=(e=e.description)?"["+e+"]":"");try{Object.defineProperty(t,"name",{configurable:!0,value:n?n+" "+e:e})}catch(t){}return t}var a=n(11369);function s(t,e,n,s,c,l){var u,p,d,m,g,f,h,v=Symbol.metadata||Symbol.for("Symbol.metadata"),y=Object.defineProperty,b=Object.create,A=[b(null),b(null)],S=e.length;function T(e,n,i){return function(r,o){n&&(o=r,r=t);for(var a=0;a<e.length;a++)o=e[a].apply(r,i?[o]:[]);return i?o:r}}function w(t,e,n,i){if("function"!=typeof t&&(i||void 0!==t))throw new TypeError(e+" must "+(n||"be")+" a function"+(i?"":" or undefined"));return t}function k(t,e,n,r,a,s,c,l,d,m,g){function f(t){if(!g(t))throw new TypeError("Attempted to access private element on non-instance")}var h=[].concat(e[0]),v=e[3],b=!c,S=1===a,k=3===a,E=4===a,x=2===a;function C(e,n,i){return function(r,o){return n&&(o=r,r=t),i&&i(r),N[e].call(r,o)}}if(!b){var N={},_=[],U=k?"get":E||S?"set":"value";if(d?(m||S?N={get:o((function(){return v(this)}),r,"get"),set:function(t){e[4](this,t)}}:N[U]=v,m||o(N[U],r,x?"":U)):m||(N=Object.getOwnPropertyDescriptor(t,r)),!m&&!d){if((p=A[+l][r])&&7!=(p^a))throw Error("Decorating two elements with the same name ("+N[U].name+") is not supported yet");A[+l][r]=a<3?1:a}}for(var I=t,W=h.length-1;W>=0;W-=n?2:1){var j=w(h[W],"A decorator","be",!0),M=n?h[W-1]:void 0,P={},L={kind:["field","accessor","method","getter","setter","class"][a],name:r,metadata:u,addInitializer:function(t,e){if(t.v)throw Error("attempted to call addInitializer after decoration was finished");w(e,"An initializer","be",!0),s.push(e)}.bind(null,P)};if(b)p=j.call(M,I,L),P.v=1,w(p,"class decorators","return")&&(I=p);else if(L.static=l,L.private=d,p=L.access={has:d?g.bind():function(t){return r in t}},E||(p.get=d?x?function(t){return f(t),N.value}:C("get",0,f):function(t){return t[r]}),x||k||(p.set=d?C("set",0,f):function(t,e){t[r]=e}),I=j.call(M,S?{get:N.get,set:N.set}:N[U],L),P.v=1,S){if("object"==(0,i.A)(I)&&I)(p=w(I.get,"accessor.get"))&&(N.get=p),(p=w(I.set,"accessor.set"))&&(N.set=p),(p=w(I.init,"accessor.init"))&&_.unshift(p);else if(void 0!==I)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else w(I,(m?"field":"method")+" decorators","return")&&(m?_.unshift(I):N[U]=I)}return a<2&&c.push(T(_,l,1),T(s,l,0)),m||b||(d?S?c.splice(-1,0,C("get",l),C("set",l)):c.push(x?N[U]:w.call.bind(N[U])):y(t,r,N)),I}function E(t){return y(t,v,{configurable:!0,enumerable:!0,value:u})}return void 0!==l&&(u=l[v]),u=b(null==u?null:u),g=[],f=function(t){t&&g.push(T(t))},h=function(e,i){for(var o=0;o<n.length;o++){var s=n[o],l=s[1],u=7&l;if((8&l)==e&&!u==i){var p=s[2],f=!!s[3],h=16&l;k(e?t:t.prototype,s,h,f?"#"+p:(0,a.A)(p),u,u<2?[]:e?m=m||[]:d=d||[],g,!!e,f,i,e&&f?function(e){return(0,r.A)(e)===t}:c)}}},h(8,0),h(0,0),h(8,1),h(0,1),f(d),f(m),p=g,S||E(t),{e:p,get c(){var n=[];return S&&[E(t=k(t,[e],s,t.name,5,n)),T(n,1)]}}}},70829:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var i=n(12559);function r(t,e){return t.get((0,i.A)(t,e))}},70918:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var i=n(72016);function r(t,e,n){(0,i.A)(t,e),e.set(t,n)}},71513:(t,e,n)=>{"use strict";n.d(e,{B:()=>v});var i=n(18769),r=n.n(i),o=n(87117),a=n(11280),s=n(53373),c=n.n(s),l=n(46134),u=n(2373);(0,o.initializeI18n)(l.NS,l.I);const p=(0,a.wrapBrick)("eo-icon"),d=(0,a.wrapBrick)("eo-dropdown-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),m=(0,a.wrapBrick)("eo-easyops-avatar"),g=(0,a.wrapBrick)("eo-button"),f={ready:"uncheck-status",working:"active-status",completed:"check-status"},h=[{key:"ready",icon:{icon:"uncheck-status",lib:"easyops",category:"colored-common"},text:(0,l.t)(l.K.UN_START_STATUS)},{key:"working",icon:{icon:"active-status",lib:"easyops",category:"colored-common"},text:(0,l.t)(l.K.RUNNING_STATUS)},{key:"completed",icon:{icon:"check-status",lib:"easyops",category:"colored-common"},text:(0,l.t)(l.K.COMPLETED_STATUS)}];function v(t){let{goalItem:e,cardStyle:n,onStatusChange:o,onTitleChange:a,onClick:s,onNewChat:v,isActive:y}=t;const{state:b,id:A,title:S,conversations:T,owner:w}=e,k=(0,i.useRef)(!1),E=(0,i.useCallback)((()=>{k.current=!0}),[]),x=(0,i.useCallback)((()=>{k.current=!1}),[]),[C,N]=(0,i.useState)(!1),_=(0,i.useCallback)((()=>{N(!0)}),[]),U=(0,i.useCallback)((t=>{N(!1);const e=t.currentTarget.textContent;null!==e&&S!==e&&(null==a||a(e))}),[S,a]),I=(0,i.useCallback)((t=>{k.current||"Enter"===t.key&&(t.preventDefault(),t.currentTarget.blur())}),[]);return r().createElement("div",{className:c()("goal-item",e.state,{editing:C},{active:y}),style:{paddingLeft:`${e.offsetX}px`,...n},onClick:s},r().createElement("div",{className:"start"},r().createElement(d,{actions:h,onActionClick:t=>{return e=t.detail,void(null==o||o(e.key));var e}},r().createElement(p,{className:"icon",lib:"easyops",category:"colored-common",icon:f[b],onClick:t=>t.stopPropagation()})),r().createElement("span",{className:"serial-number"},"#",A),r().createElement("span",{className:"title",onClick:t=>t.stopPropagation(),onFocus:_,onBlur:U,onKeyDown:I,onCompositionStart:E,onCompositionEnd:x,contentEditable:(0,u.U)(!0),suppressContentEditableWarning:!0},S)),r().createElement("div",{className:"end"},r().createElement("div",{className:"info"},r().createElement("div",{className:"message"},r().createElement(p,{lib:"easyops",category:"common",icon:"message"}),r().createElement("span",{className:"count"},T||0)),r().createElement(m,{nameOrInstanceId:null==w?void 0:w.instanceId,size:"small"})),r().createElement("div",{className:"operation",onClick:t=>t.stopPropagation()},r().createElement(g,{className:"new-chat",themeVariant:"elevo",type:"neutral",size:"small",onClick:v},(0,l.t)(l.K.NEW_CHAT)))))}},72016:(t,e,n)=>{"use strict";function i(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}n.d(e,{A:()=>i})},74635:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var i=n(72016);function r(t,e){(0,i.A)(t,e),e.add(t)}},86121:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var i=n(12559);function r(t,e,n){return t.set((0,i.A)(t,e),n),n}}}]);
3
- //# sourceMappingURL=goal-card-list.7a0aecb2.js.map