@protobase/ui 0.45.18 → 0.45.20

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/dist/auth/auth-provider.js +47 -4
  2. package/dist/data/api-provider.d.ts +8 -0
  3. package/dist/index.d.ts +3 -1
  4. package/dist/index.js +2 -1
  5. package/dist/notifications/push/push-browser.js +23 -0
  6. package/dist/notifications/push/push-notifications.js +27 -0
  7. package/dist/notifications/push/push-records.js +23 -0
  8. package/dist/notifications/push/use-push-notifications.d.ts +15 -0
  9. package/dist/notifications/push/use-push-notifications.js +32 -0
  10. package/dist/notifications/push/web-push.d.ts +5 -0
  11. package/dist/notifications/push/web-push.js +165 -0
  12. package/dist/package.js +1 -1
  13. package/dist/shell/assets/app-1nDh53tv.js +9 -0
  14. package/dist/shell/assets/{index-B0JFYV-j.js → index-CvTuaRIF.js} +2 -2
  15. package/dist/shell/assets/{records-map-oHfGVxXB.js → records-map-DXlU-ssW.js} +2 -2
  16. package/dist/shell/assets/shared-protobase-ui-CUeF-xz_.js +2 -0
  17. package/dist/shell/index.html +3 -3
  18. package/dist/shell/protobase.shell.json +1 -1
  19. package/dist/shell/protobase.sw.js +99 -2
  20. package/dist/shell-source-maps/assets/app-1nDh53tv.js.map +1 -0
  21. package/dist/shell-source-maps/assets/{index-B0JFYV-j.js.map → index-CvTuaRIF.js.map} +1 -1
  22. package/dist/shell-source-maps/assets/{records-map-oHfGVxXB.js.map → records-map-DXlU-ssW.js.map} +1 -1
  23. package/dist/shell-source-maps/assets/shared-protobase-ui-CUeF-xz_.js.map +1 -0
  24. package/package.json +4 -4
  25. package/dist/shell/assets/app-DQVyVFlF.js +0 -9
  26. package/dist/shell/assets/shared-protobase-ui-CESxq5P1.js +0 -2
  27. package/dist/shell-source-maps/assets/app-DQVyVFlF.js.map +0 -1
  28. package/dist/shell-source-maps/assets/shared-protobase-ui-CESxq5P1.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{B as r,K as i,W as a}from"./vendor-C4-Hop1T.js";import{$ as o,A as s,B as c,C as l,D as u,E as d,F as f,G as p,H as m,I as h,J as g,K as ee,L as te,M as ne,N as re,O as _,P as v,Q as y,R as b,S as x,T as S,U as C,V as w,W as T,X as E,Y as D,Z as O,_ as k,_t as A,a as j,at as M,b as N,c as P,ct as F,d as I,dt as L,et as R,f as z,ft as B,g as V,gt as H,h as U,i as W,it as G,j as K,k as q,l as J,lt as Y,m as X,n as ie,nt as ae,ot as oe,p as se,pt as ce,q as le,r as ue,rt as de,s as fe,st as pe,t as me,tt as he,u as ge,ut as _e,v as ve,vt as ye,w as be,x as xe,y as Se,yt as Z,z as Ce}from"./app-DQVyVFlF.js";import{r as we}from"./preload-helper-C24C2MCK.js";import{t as Q}from"./cn-Bi0ZEjD9.js";var $=e(n(),1),Te=({row:e,resource:t,recordKey:n,...r})=>{let i=P(),a=X(),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)(b,{to:{kind:`record`,resource:o,key:e?e.key:n},...r})},Ee=({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:Q(`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:Q(`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))}),De=(e,t,n)=>{let o=M(),s=i(),c=[...new Set(n)].sort();return r({queryKey:pe.pickedLabels(e.name,c.join(`,`)),enabled:c.length>0,placeholderData:a,queryFn:()=>ge(s,o,e,c,t)}).data??new Map},Oe=e(t(),1),ke=e=>{let{resources:t,views:n}=ae(),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,Oe.useState)({}),c=De(r,i,a),l=e=>o[e]??c.get(e)??e,u=(e,t)=>s(n=>({...n,[e]:t}));if(!e.multiple){let{value:t,onChange:n}=e;return(0,$.jsx)(f,{target:r,view:i,value:t??``,label:t===void 0?void 0:l(t),invalid:e.invalid,onChange:(e,t)=>{u(e,t),n(e)}})}let{value:d,onChange:p}=e;return(0,$.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,$.jsx)(f,{target:r,view:i,value:``,chosen:d,several:!0,invalid:e.invalid,onChange:(e,t)=>{u(e,t),p(d.includes(e)?d.filter(t=>t!==e):[...d,e])}}),d.length>0&&(0,$.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:d.map(e=>(0,$.jsx)(J,{label:l(e),onRemove:()=>p(d.filter(t=>t!==e))},e))})]})};export{u as ActionCard,U as ActionInputError,G as ApiProvider,me as App,b as AppLink,ve as AssistantDock,O as AuthLayout,B as Button,K as ChatMessage,s as ChatThread,Ee as Choices,D as CodeForm,S as CompactTable,q as Composer,L as Dialog,x as DiffView,w as Field,d as FieldList,W as Form,A as Input,Z as LogoMark,ne as Markdown,j as MenuSelect,_e as OtpInput,N as PartView,Te as RecordLink,ke as RecordPicker,E as ResendCodeButton,Y as ResponsiveDialog,c as Section,we as Segmented,_ as SidePanel,F as SignInPrompt,H as Spinner,xe as StepList,te as Textarea,y as allowDelayMs,ce as buttonClass,re as definePlugin,v as defineUi,l as diffStats,ie as isConflict,o as isFramed,le as mergeUi,be as parseDiff,T as pluginApi,p as protobaseVersion,g as uiFromModule,C as useApiToken,Ce as useAppAddress,R as useArmedAfterFocus,k as useAssistant,V as useAssistantClient,Se as useBackendData,M as useClient,I as useFacets,ye as useFieldControl,he as useGuardedPress,z as useHistogram,X as useLayoutRecord,h as useList,fe as useListDisplay,de as useMeta,ee as usePlugin,m as useRecord,oe as useResourceClient,se as useSeries,ue as useUpdateRecord};
2
- //# debugId=844b1ab9-3f54-4c67-8cc1-22b863adf588