@protobase/ui 0.54.6 → 0.55.0
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.
- package/dist/app/app.js +1 -1
- package/dist/app/create/create-values.js +5 -5
- package/dist/app/field-editor.js +1 -1
- package/dist/app/field-types/built-in-fields.js +6 -0
- package/dist/app/field-types/members/member-chip.js +20 -0
- package/dist/app/field-types/members/member-ids.js +13 -0
- package/dist/app/field-types/members/members-display.js +44 -0
- package/dist/app/field-types/members/members-editor.js +44 -0
- package/dist/app/field-types/members/members-field.js +16 -0
- package/dist/app/field-types/members/messages.js +18 -0
- package/dist/app/field-types/members/use-members-field.js +18 -0
- package/dist/app/field-types/shown-widget.js +11 -6
- package/dist/app/picker/picker-combobox.js +140 -0
- package/dist/app/relation-picker.js +27 -124
- package/dist/filter-panel/facet-combobox.js +1 -1
- package/dist/index.js +1 -1
- package/dist/live/field-values.js +22 -1
- package/dist/organizations/organizations-page.js +1 -1
- package/dist/package.js +1 -1
- package/dist/shell/assets/app-tBBnYXLP.js +9 -0
- package/dist/shell/assets/{index-IMD8ceia.js → index-DvCa5s54.js} +2 -2
- package/dist/shell/assets/{records-map-TXpdTT7s.js → records-map-BWSeQRmm.js} +2 -2
- package/dist/shell/assets/shared-protobase-ui-Br4XDldp.js +2 -0
- package/dist/shell/index.html +3 -3
- package/dist/shell/protobase.shell.json +1 -1
- package/dist/shell/protobase.sw.js +2 -2
- package/dist/shell-source-maps/assets/app-tBBnYXLP.js.map +1 -0
- package/dist/shell-source-maps/assets/{index-IMD8ceia.js.map → index-DvCa5s54.js.map} +1 -1
- package/dist/shell-source-maps/assets/{records-map-TXpdTT7s.js.map → records-map-BWSeQRmm.js.map} +1 -1
- package/dist/shell-source-maps/assets/{shared-protobase-ui-BHIhZYVr.js.map → shared-protobase-ui-Br4XDldp.js.map} +1 -1
- package/package.json +4 -4
- package/dist/shell/assets/app-Y_3vlU3f.js +0 -9
- package/dist/shell/assets/shared-protobase-ui-BHIhZYVr.js +0 -2
- package/dist/shell-source-maps/assets/app-Y_3vlU3f.js.map +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-CR5VJ85Q.js";import{G as r,V as i,q as a}from"./vendor-xNCj9Gc_.js";import{$ as o,A as s,At as c,B as l,C as u,Ct as d,D as f,Dt as p,E as m,Et as h,F as ee,Ft as te,H as ne,I as re,It as ie,J as ae,K as oe,L as se,M as g,Mt as _,N as v,Nt as y,O as b,Ot as x,P as S,Pt as C,Q as w,R as T,S as E,St as D,T as O,U as k,V as A,W as j,X as M,Y as N,Z as P,_ as F,_t as I,a as L,at as R,b as z,bt as B,c as V,ct as H,d as U,dt as W,et as G,f as K,ft as q,g as ce,gt as le,h as ue,ht as J,i as de,it as fe,j as pe,jt as me,k as Y,kt as he,l as ge,lt as _e,m as ve,mt as ye,n as be,nt as xe,o as Se,ot as Ce,p as we,pt as Te,q as Ee,r as De,rt as Oe,s as ke,st as Ae,t as je,tt as Me,u as Ne,ut as Pe,v as Fe,vt as Ie,w as Le,wt as X,x as Re,xt as ze,y as Be,yt as Ve,z as He}from"./app-Y_3vlU3f.js";import{n as Ue}from"./preload-helper-SYSsmQ2O.js";import{t as Z}from"./cn-Bi0ZEjD9.js";var We=e=>new Date(Date.parse(`${e}T00:00:00Z`)-864e5).toISOString().slice(0,10),Ge=(e,t,n=X())=>d(Date.parse(e),n)===d(Date.parse(t),n),Q=(e,t=Date.now(),n=X())=>{let r=d(Date.parse(e),n),i=d(t,n);return r===i?Y(`today`):r===We(i)?Y(`yesterday`):D(Date.parse(`${r}T00:00:00Z`))},$=e(n(),1),Ke=({tone:e=`day`,label:t})=>{let n=t??Y(`newMessages`),r=Z(`h-px flex-1`,e===`new`?`bg-danger`:`bg-border`);return(0,$.jsxs)(`div`,{role:`separator`,"aria-label":n,"data-tone":e,"data-chat-divider":``,className:`flex items-center gap-3 text-xs font-medium`,children:[(0,$.jsx)(`span`,{className:r}),(0,$.jsx)(`span`,{className:e===`new`?`text-danger`:`text-muted-foreground`,children:n}),(0,$.jsx)(`span`,{className:r})]})},qe=({row:e,resource:t,recordKey:n,...r})=>{let i=Ee(),a=R(),o=t??i?.resource??a?.model.name;if(o===void 0)throw Error(`RecordLink needs a resource outside a list display or a record`);return(0,$.jsx)(J,{to:{kind:`record`,resource:o,key:e?e.key:n},...r})},Je={width:640,height:480},Ye=e=>e.flatMap(e=>{if(`src`in e)return[{image:{url:e.src},alt:e.alt}];let t=I(e,Je);return t?[{image:t,alt:e.alt??``}]:[]}),Xe=({images:e,label:t,fit:n=`cover`,swipe:r=!0,className:i})=>{let a=Ye(e),o=ae(a.length);return(0,$.jsxs)(`div`,{role:`group`,"aria-roledescription":`carousel`,"aria-label":t,className:Z(`group/carousel relative overflow-hidden`,i),children:[(0,$.jsx)(N,{"data-carousel-track":!0,carousel:o,swipe:r,slides:a.map(({image:e,alt:t})=>(0,$.jsx)(Pe,{image:e,alt:t,loading:`lazy`,className:Z(`size-full`,n===`cover`?`object-cover`:`object-contain`)}))}),(0,$.jsx)(M,{carousel:o,count:a.length,swipe:r,reveal:`group-hover/carousel:opacity-100`,className:`inset-0`})]})},Ze=({name:e,label:t,options:n,value:r,onChange:i})=>(0,$.jsx)(`div`,{role:`radiogroup`,"aria-label":t,className:`flex flex-col gap-2`,children:n.map(t=>(0,$.jsxs)(`label`,{className:Z(`block rounded-lg border p-3 transition-colors has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-primary`,t.disabled?`cursor-default bg-background opacity-60`:t.value===r?`cursor-pointer border-primary bg-primary-soft`:`cursor-pointer bg-background hover:bg-surface`),children:[(0,$.jsx)(`input`,{type:`radio`,name:e,value:t.value,checked:t.value===r,disabled:t.disabled,onChange:()=>i(t.value),className:`sr-only`}),(0,$.jsx)(`span`,{className:Z(`block font-medium`,t.value===r&&`text-primary-text`),children:t.label}),t.description&&(0,$.jsx)(`span`,{className:`mt-0.5 block text-xs leading-snug text-muted-foreground`,children:t.description})]},t.value))}),Qe=(e,t,n)=>{let o=C(),s=a(),c=[...new Set(n)].sort();return i({queryKey:ie.pickedLabels(e.name,c.join(`,`)),enabled:c.length>0,placeholderData:r,queryFn:()=>Me(s,o,e,c,t)}).data??new Map},$e=e(t(),1),et=e=>{let{resources:t,views:n}=c(),r=t[e.resource];if(!r)throw Error(`RecordPicker: the app has no resource named "${e.resource}"`);if(r.primaryKey.length!==1)throw Error(`RecordPicker: "${e.resource}" has a composite key, which a picker cannot name`);let i=n[e.resource],a=e.multiple?e.value:e.value===void 0?[]:[e.value],[o,s]=(0,$e.useState)({}),l=Qe(r,i,a),u=e=>o[e]??l.get(e)??e,d=(e,t)=>s(n=>({...n,[e]:t}));if(!e.multiple){let{value:t,onChange:n}=e;return(0,$.jsx)(q,{target:r,view:i,value:t??``,label:t===void 0?void 0:u(t),invalid:e.invalid,onChange:(e,t)=>{d(e,t),n(e)}})}let{value:f,onChange:p}=e;return(0,$.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,$.jsx)(q,{target:r,view:i,value:``,chosen:f,several:!0,invalid:e.invalid,onChange:(e,t)=>{d(e,t),p(f.includes(e)?f.filter(t=>t!==e):[...f,e])}}),f.length>0&&(0,$.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:f.map(e=>(0,$.jsx)(w,{label:u(e),onRemove:()=>p(f.filter(t=>t!==e))},e))})]})};export{z as ActionCard,Ce as ActionInputError,y as ApiProvider,je as App,J as AppLink,U as AssistantDock,k as AuthLayout,x as Button,Xe as Carousel,Ke as ChatDivider,b as ChatMessage,f as ChatThread,Ze as Choices,se as CodeForm,Fe as CompactTable,E as Composer,p as Dialog,ue as DiffView,Ve as Field,Be as FieldList,V as Form,B as Input,o as LogoMark,Ae as Markdown,Le as MentionBox,u as MentionedText,j as MenuSelect,W as OtpInput,we as PartView,qe as RecordLink,et as RecordPicker,T as ResendCodeButton,h as ResponsiveDialog,Ie as Section,Ue as Segmented,Re as SidePanel,P as SignInPrompt,me as Spinner,ve as StepList,ye as Textarea,He as allowDelayMs,he as buttonClass,Q as chatDayLabel,H as definePlugin,_e as defineUi,ce as diffStats,O as emptyDraft,be as isConflict,l as isFramed,m as mentionedIds,ee as mergeUi,F as parseDiff,g as pluginApi,v as protobaseVersion,Ge as sameChatDay,re as uiFromModule,pe as useApiToken,le as useAppAddress,A as useArmedAfterFocus,Ne as useAssistant,ge as useAssistantClient,K as useBackendData,C as useClient,xe as useFacets,ze as useFieldControl,ne as useGuardedPress,Oe as useHistogram,de as useInbox,R as useLayoutRecord,Te as useList,oe as useListDisplay,L as useMarkNotificationsRead,G as useMembers,_ as useMeta,S as usePlugin,ke as usePushNotifications,s as useRecord,te as useResourceClient,fe as useSeries,Se as useUnreadNotifications,De as useUpdateRecord};
|
|
2
|
-
//# debugId=47221658-56b4-449d-95b2-f4cfd8c1ebec
|