mirror of
https://github.com/pocketbase/pocketbase.git
synced 2025-02-08 03:40:51 +02:00
updated api preview docs
This commit is contained in:
parent
ca1a395628
commit
3e487f7e9d
@ -2,7 +2,7 @@
|
||||
|
||||
- Added Patreon OAuth2 provider ([#3323](https://github.com/pocketbase/pocketbase/pull/3323); thanks @ghostdevv).
|
||||
|
||||
- (@todo docs) Added support for `:excerpt(max, withEllipsis?)` `fields` modifier that will return a short plain text version of any string value (html tags are stripped).
|
||||
- Added support for `:excerpt(max, withEllipsis?)` `fields` modifier that will return a short plain text version of any string value (html tags are stripped).
|
||||
This could be used to minimize the downloaded json data when listing records with large `editor` html values.
|
||||
```js
|
||||
await pb.collection("example").getList(1, 20, {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import{S as Se,i as ye,s as Te,O as G,e as c,w,b as k,c as se,f as p,g as d,h as a,m as ae,x as U,P as ve,Q as je,k as Ae,R as Be,n as Oe,t as W,a as V,o as u,d as ne,C as Fe,p as Qe,r as L,u as Ne,N as He}from"./index-4c7ca1d0.js";import{S as Ke}from"./SdkTabs-5ff67765.js";import{F as qe}from"./FieldsQueryParam-9cc13943.js";function Ce(n,l,o){const s=n.slice();return s[5]=l[o],s}function Pe(n,l,o){const s=n.slice();return s[5]=l[o],s}function $e(n,l){let o,s=l[5].code+"",_,f,i,h;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=c("button"),_=w(s),f=k(),p(o,"class","tab-item"),L(o,"active",l[1]===l[5].code),this.first=o},m(v,C){d(v,o,C),a(o,_),a(o,f),i||(h=Ne(o,"click",m),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&U(_,s),C&6&&L(o,"active",l[1]===l[5].code)},d(v){v&&u(o),i=!1,h()}}}function Me(n,l){let o,s,_,f;return s=new He({props:{content:l[5].body}}),{key:n,first:null,c(){o=c("div"),se(s.$$.fragment),_=k(),p(o,"class","tab-item"),L(o,"active",l[1]===l[5].code),this.first=o},m(i,h){d(i,o,h),ae(s,o,null),a(o,_),f=!0},p(i,h){l=i;const m={};h&4&&(m.content=l[5].body),s.$set(m),(!f||h&6)&&L(o,"active",l[1]===l[5].code)},i(i){f||(W(s.$$.fragment,i),f=!0)},o(i){V(s.$$.fragment,i),f=!1},d(i){i&&u(o),ne(s)}}}function ze(n){var be,ke;let l,o,s=n[0].name+"",_,f,i,h,m,v,C,H=n[0].name+"",E,ie,I,P,J,j,Y,$,K,ce,q,A,re,R,z=n[0].name+"",X,de,Z,B,x,M,ee,ue,te,T,le,O,oe,S,F,g=[],he=new Map,me,Q,b=[],fe=new Map,y;P=new Ke({props:{js:`
|
||||
import{S as Se,i as ye,s as Te,O as G,e as c,w,b as k,c as se,f as p,g as d,h as a,m as ae,x as U,P as ve,Q as je,k as Ae,R as Be,n as Oe,t as W,a as V,o as u,d as ne,C as Fe,p as Qe,r as L,u as Ne,N as He}from"./index-4edb1c99.js";import{S as Ke}from"./SdkTabs-3741b181.js";import{F as qe}from"./FieldsQueryParam-3e41088d.js";function Ce(n,l,o){const s=n.slice();return s[5]=l[o],s}function Pe(n,l,o){const s=n.slice();return s[5]=l[o],s}function $e(n,l){let o,s=l[5].code+"",_,f,i,h;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=c("button"),_=w(s),f=k(),p(o,"class","tab-item"),L(o,"active",l[1]===l[5].code),this.first=o},m(v,C){d(v,o,C),a(o,_),a(o,f),i||(h=Ne(o,"click",m),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&U(_,s),C&6&&L(o,"active",l[1]===l[5].code)},d(v){v&&u(o),i=!1,h()}}}function Me(n,l){let o,s,_,f;return s=new He({props:{content:l[5].body}}),{key:n,first:null,c(){o=c("div"),se(s.$$.fragment),_=k(),p(o,"class","tab-item"),L(o,"active",l[1]===l[5].code),this.first=o},m(i,h){d(i,o,h),ae(s,o,null),a(o,_),f=!0},p(i,h){l=i;const m={};h&4&&(m.content=l[5].body),s.$set(m),(!f||h&6)&&L(o,"active",l[1]===l[5].code)},i(i){f||(W(s.$$.fragment,i),f=!0)},o(i){V(s.$$.fragment,i),f=!1},d(i){i&&u(o),ne(s)}}}function ze(n){var be,ke;let l,o,s=n[0].name+"",_,f,i,h,m,v,C,H=n[0].name+"",E,ie,I,P,J,j,Y,$,K,ce,q,A,re,R,z=n[0].name+"",X,de,Z,B,x,M,ee,ue,te,T,le,O,oe,S,F,g=[],he=new Map,me,Q,b=[],fe=new Map,y;P=new Ke({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${n[3]}');
|
@ -1,4 +1,4 @@
|
||||
import{S as je,i as xe,s as Je,N as Ue,O as J,e as s,w as k,b as p,c as K,f as b,g as d,h as o,m as I,x as de,P as Ee,Q as Ke,k as Ie,R as We,n as Ge,t as N,a as V,o as u,d as W,C as Le,p as Xe,r as G,u as Ye}from"./index-4c7ca1d0.js";import{S as Ze}from"./SdkTabs-5ff67765.js";import{F as et}from"./FieldsQueryParam-9cc13943.js";function Ne(r,l,a){const n=r.slice();return n[5]=l[a],n}function Ve(r,l,a){const n=r.slice();return n[5]=l[a],n}function ze(r,l){let a,n=l[5].code+"",m,_,i,h;function g(){return l[4](l[5])}return{key:r,first:null,c(){a=s("button"),m=k(n),_=p(),b(a,"class","tab-item"),G(a,"active",l[1]===l[5].code),this.first=a},m(v,w){d(v,a,w),o(a,m),o(a,_),i||(h=Ye(a,"click",g),i=!0)},p(v,w){l=v,w&4&&n!==(n=l[5].code+"")&&de(m,n),w&6&&G(a,"active",l[1]===l[5].code)},d(v){v&&u(a),i=!1,h()}}}function Qe(r,l){let a,n,m,_;return n=new Ue({props:{content:l[5].body}}),{key:r,first:null,c(){a=s("div"),K(n.$$.fragment),m=p(),b(a,"class","tab-item"),G(a,"active",l[1]===l[5].code),this.first=a},m(i,h){d(i,a,h),I(n,a,null),o(a,m),_=!0},p(i,h){l=i;const g={};h&4&&(g.content=l[5].body),n.$set(g),(!_||h&6)&&G(a,"active",l[1]===l[5].code)},i(i){_||(N(n.$$.fragment,i),_=!0)},o(i){V(n.$$.fragment,i),_=!1},d(i){i&&u(a),W(n)}}}function tt(r){var De,Fe;let l,a,n=r[0].name+"",m,_,i,h,g,v,w,M,X,S,z,ue,Q,q,pe,Y,U=r[0].name+"",Z,he,fe,j,ee,D,te,T,oe,be,F,C,le,me,ae,_e,f,ke,R,ge,ve,$e,se,ye,ne,Se,we,Te,re,Ce,Pe,A,ie,O,ce,P,H,y=[],Re=new Map,Ae,E,$=[],Be=new Map,B;v=new Ze({props:{js:`
|
||||
import{S as je,i as xe,s as Je,N as Ue,O as J,e as s,w as k,b as p,c as K,f as b,g as d,h as o,m as I,x as de,P as Ee,Q as Ke,k as Ie,R as We,n as Ge,t as N,a as V,o as u,d as W,C as Le,p as Xe,r as G,u as Ye}from"./index-4edb1c99.js";import{S as Ze}from"./SdkTabs-3741b181.js";import{F as et}from"./FieldsQueryParam-3e41088d.js";function Ne(r,l,a){const n=r.slice();return n[5]=l[a],n}function Ve(r,l,a){const n=r.slice();return n[5]=l[a],n}function ze(r,l){let a,n=l[5].code+"",m,_,i,h;function g(){return l[4](l[5])}return{key:r,first:null,c(){a=s("button"),m=k(n),_=p(),b(a,"class","tab-item"),G(a,"active",l[1]===l[5].code),this.first=a},m(v,w){d(v,a,w),o(a,m),o(a,_),i||(h=Ye(a,"click",g),i=!0)},p(v,w){l=v,w&4&&n!==(n=l[5].code+"")&&de(m,n),w&6&&G(a,"active",l[1]===l[5].code)},d(v){v&&u(a),i=!1,h()}}}function Qe(r,l){let a,n,m,_;return n=new Ue({props:{content:l[5].body}}),{key:r,first:null,c(){a=s("div"),K(n.$$.fragment),m=p(),b(a,"class","tab-item"),G(a,"active",l[1]===l[5].code),this.first=a},m(i,h){d(i,a,h),I(n,a,null),o(a,m),_=!0},p(i,h){l=i;const g={};h&4&&(g.content=l[5].body),n.$set(g),(!_||h&6)&&G(a,"active",l[1]===l[5].code)},i(i){_||(N(n.$$.fragment,i),_=!0)},o(i){V(n.$$.fragment,i),_=!1},d(i){i&&u(a),W(n)}}}function tt(r){var De,Fe;let l,a,n=r[0].name+"",m,_,i,h,g,v,w,M,X,S,z,ue,Q,q,pe,Y,U=r[0].name+"",Z,he,fe,j,ee,D,te,T,oe,be,F,C,le,me,ae,_e,f,ke,R,ge,ve,$e,se,ye,ne,Se,we,Te,re,Ce,Pe,A,ie,O,ce,P,H,y=[],Re=new Map,Ae,E,$=[],Be=new Map,B;v=new Ze({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${r[3]}');
|
@ -1,4 +1,4 @@
|
||||
import{S as Le,i as Ee,s as Je,N as Ve,O as z,e as s,w as k,b as h,c as I,f as p,g as r,h as a,m as K,x as pe,P as We,Q as Ne,k as Qe,R as ze,n as Ie,t as V,a as L,o as c,d as G,C as Ue,p as Ke,r as X,u as Ge}from"./index-4c7ca1d0.js";import{S as Xe}from"./SdkTabs-5ff67765.js";import{F as Ye}from"./FieldsQueryParam-9cc13943.js";function Be(i,l,o){const n=i.slice();return n[5]=l[o],n}function Fe(i,l,o){const n=i.slice();return n[5]=l[o],n}function He(i,l){let o,n=l[5].code+"",f,g,d,b;function _(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),f=k(n),g=h(),p(o,"class","tab-item"),X(o,"active",l[1]===l[5].code),this.first=o},m(v,A){r(v,o,A),a(o,f),a(o,g),d||(b=Ge(o,"click",_),d=!0)},p(v,A){l=v,A&4&&n!==(n=l[5].code+"")&&pe(f,n),A&6&&X(o,"active",l[1]===l[5].code)},d(v){v&&c(o),d=!1,b()}}}function je(i,l){let o,n,f,g;return n=new Ve({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),I(n.$$.fragment),f=h(),p(o,"class","tab-item"),X(o,"active",l[1]===l[5].code),this.first=o},m(d,b){r(d,o,b),K(n,o,null),a(o,f),g=!0},p(d,b){l=d;const _={};b&4&&(_.content=l[5].body),n.$set(_),(!g||b&6)&&X(o,"active",l[1]===l[5].code)},i(d){g||(V(n.$$.fragment,d),g=!0)},o(d){L(n.$$.fragment,d),g=!1},d(d){d&&c(o),G(n)}}}function Ze(i){let l,o,n=i[0].name+"",f,g,d,b,_,v,A,P,Y,S,E,be,J,R,me,Z,N=i[0].name+"",ee,fe,te,M,ae,x,le,W,oe,y,se,ge,U,$,ne,ke,ie,_e,m,ve,C,we,Oe,Ae,re,Se,ce,ye,$e,Te,de,Ce,qe,q,ue,B,he,T,F,O=[],De=new Map,Pe,H,w=[],Re=new Map,D;v=new Xe({props:{js:`
|
||||
import{S as Le,i as Ee,s as Je,N as Ve,O as z,e as s,w as k,b as h,c as I,f as p,g as r,h as a,m as K,x as pe,P as We,Q as Ne,k as Qe,R as ze,n as Ie,t as V,a as L,o as c,d as G,C as Ue,p as Ke,r as X,u as Ge}from"./index-4edb1c99.js";import{S as Xe}from"./SdkTabs-3741b181.js";import{F as Ye}from"./FieldsQueryParam-3e41088d.js";function Be(i,l,o){const n=i.slice();return n[5]=l[o],n}function Fe(i,l,o){const n=i.slice();return n[5]=l[o],n}function He(i,l){let o,n=l[5].code+"",f,g,d,b;function _(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),f=k(n),g=h(),p(o,"class","tab-item"),X(o,"active",l[1]===l[5].code),this.first=o},m(v,A){r(v,o,A),a(o,f),a(o,g),d||(b=Ge(o,"click",_),d=!0)},p(v,A){l=v,A&4&&n!==(n=l[5].code+"")&&pe(f,n),A&6&&X(o,"active",l[1]===l[5].code)},d(v){v&&c(o),d=!1,b()}}}function je(i,l){let o,n,f,g;return n=new Ve({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),I(n.$$.fragment),f=h(),p(o,"class","tab-item"),X(o,"active",l[1]===l[5].code),this.first=o},m(d,b){r(d,o,b),K(n,o,null),a(o,f),g=!0},p(d,b){l=d;const _={};b&4&&(_.content=l[5].body),n.$set(_),(!g||b&6)&&X(o,"active",l[1]===l[5].code)},i(d){g||(V(n.$$.fragment,d),g=!0)},o(d){L(n.$$.fragment,d),g=!1},d(d){d&&c(o),G(n)}}}function Ze(i){let l,o,n=i[0].name+"",f,g,d,b,_,v,A,P,Y,S,E,be,J,R,me,Z,N=i[0].name+"",ee,fe,te,M,ae,x,le,W,oe,y,se,ge,U,$,ne,ke,ie,_e,m,ve,C,we,Oe,Ae,re,Se,ce,ye,$e,Te,de,Ce,qe,q,ue,B,he,T,F,O=[],De=new Map,Pe,H,w=[],Re=new Map,D;v=new Xe({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${i[3]}');
|
@ -1,4 +1,4 @@
|
||||
import{S as we,i as ye,s as $e,N as ve,O as ot,e as n,w as p,b as d,c as nt,f as m,g as r,h as e,m as st,x as Dt,P as pe,Q as Pe,k as Re,R as Ce,n as Oe,t as Z,a as x,o as c,d as it,C as fe,p as Ae,r as rt,u as Te}from"./index-4c7ca1d0.js";import{S as Ue}from"./SdkTabs-5ff67765.js";import{F as Me}from"./FieldsQueryParam-9cc13943.js";function he(s,l,a){const i=s.slice();return i[8]=l[a],i}function be(s,l,a){const i=s.slice();return i[8]=l[a],i}function De(s){let l;return{c(){l=p("email")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function Ee(s){let l;return{c(){l=p("username")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function We(s){let l;return{c(){l=p("username/email")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function me(s){let l;return{c(){l=n("strong"),l.textContent="username"},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function _e(s){let l;return{c(){l=p("or")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function ke(s){let l;return{c(){l=n("strong"),l.textContent="email"},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function ge(s,l){let a,i=l[8].code+"",g,b,f,u;function _(){return l[7](l[8])}return{key:s,first:null,c(){a=n("button"),g=p(i),b=d(),m(a,"class","tab-item"),rt(a,"active",l[3]===l[8].code),this.first=a},m(R,C){r(R,a,C),e(a,g),e(a,b),f||(u=Te(a,"click",_),f=!0)},p(R,C){l=R,C&16&&i!==(i=l[8].code+"")&&Dt(g,i),C&24&&rt(a,"active",l[3]===l[8].code)},d(R){R&&c(a),f=!1,u()}}}function Se(s,l){let a,i,g,b;return i=new ve({props:{content:l[8].body}}),{key:s,first:null,c(){a=n("div"),nt(i.$$.fragment),g=d(),m(a,"class","tab-item"),rt(a,"active",l[3]===l[8].code),this.first=a},m(f,u){r(f,a,u),st(i,a,null),e(a,g),b=!0},p(f,u){l=f;const _={};u&16&&(_.content=l[8].body),i.$set(_),(!b||u&24)&&rt(a,"active",l[3]===l[8].code)},i(f){b||(Z(i.$$.fragment,f),b=!0)},o(f){x(i.$$.fragment,f),b=!1},d(f){f&&c(a),it(i)}}}function Le(s){var re,ce;let l,a,i=s[0].name+"",g,b,f,u,_,R,C,O,B,Et,ct,T,dt,N,ut,U,tt,Wt,et,I,Lt,pt,lt=s[0].name+"",ft,Bt,ht,V,bt,M,mt,qt,Q,D,_t,Ft,kt,Ht,$,Yt,gt,St,vt,Nt,wt,yt,j,$t,E,Pt,It,J,W,Rt,Vt,Ct,Qt,k,jt,q,Jt,Kt,zt,Ot,Gt,At,Xt,Zt,xt,Tt,te,ee,F,Ut,K,Mt,L,z,A=[],le=new Map,ae,G,S=[],oe=new Map,H;function ne(t,o){if(t[1]&&t[2])return We;if(t[1])return Ee;if(t[2])return De}let Y=ne(s),P=Y&&Y(s);T=new Ue({props:{js:`
|
||||
import{S as we,i as ye,s as $e,N as ve,O as ot,e as n,w as p,b as d,c as nt,f as m,g as r,h as e,m as st,x as Dt,P as pe,Q as Pe,k as Re,R as Ce,n as Oe,t as Z,a as x,o as c,d as it,C as fe,p as Ae,r as rt,u as Te}from"./index-4edb1c99.js";import{S as Ue}from"./SdkTabs-3741b181.js";import{F as Me}from"./FieldsQueryParam-3e41088d.js";function he(s,l,a){const i=s.slice();return i[8]=l[a],i}function be(s,l,a){const i=s.slice();return i[8]=l[a],i}function De(s){let l;return{c(){l=p("email")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function Ee(s){let l;return{c(){l=p("username")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function We(s){let l;return{c(){l=p("username/email")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function me(s){let l;return{c(){l=n("strong"),l.textContent="username"},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function _e(s){let l;return{c(){l=p("or")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function ke(s){let l;return{c(){l=n("strong"),l.textContent="email"},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function ge(s,l){let a,i=l[8].code+"",g,b,f,u;function _(){return l[7](l[8])}return{key:s,first:null,c(){a=n("button"),g=p(i),b=d(),m(a,"class","tab-item"),rt(a,"active",l[3]===l[8].code),this.first=a},m(R,C){r(R,a,C),e(a,g),e(a,b),f||(u=Te(a,"click",_),f=!0)},p(R,C){l=R,C&16&&i!==(i=l[8].code+"")&&Dt(g,i),C&24&&rt(a,"active",l[3]===l[8].code)},d(R){R&&c(a),f=!1,u()}}}function Se(s,l){let a,i,g,b;return i=new ve({props:{content:l[8].body}}),{key:s,first:null,c(){a=n("div"),nt(i.$$.fragment),g=d(),m(a,"class","tab-item"),rt(a,"active",l[3]===l[8].code),this.first=a},m(f,u){r(f,a,u),st(i,a,null),e(a,g),b=!0},p(f,u){l=f;const _={};u&16&&(_.content=l[8].body),i.$set(_),(!b||u&24)&&rt(a,"active",l[3]===l[8].code)},i(f){b||(Z(i.$$.fragment,f),b=!0)},o(f){x(i.$$.fragment,f),b=!1},d(f){f&&c(a),it(i)}}}function Le(s){var re,ce;let l,a,i=s[0].name+"",g,b,f,u,_,R,C,O,B,Et,ct,T,dt,N,ut,U,tt,Wt,et,I,Lt,pt,lt=s[0].name+"",ft,Bt,ht,V,bt,M,mt,qt,Q,D,_t,Ft,kt,Ht,$,Yt,gt,St,vt,Nt,wt,yt,j,$t,E,Pt,It,J,W,Rt,Vt,Ct,Qt,k,jt,q,Jt,Kt,zt,Ot,Gt,At,Xt,Zt,xt,Tt,te,ee,F,Ut,K,Mt,L,z,A=[],le=new Map,ae,G,S=[],oe=new Map,H;function ne(t,o){if(t[1]&&t[2])return We;if(t[1])return Ee;if(t[2])return De}let Y=ne(s),P=Y&&Y(s);T=new Ue({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${s[6]}');
|
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
import{S as $e,i as Pe,s as Se,O as Y,e as r,w as v,b as k,c as ge,f as b,g as d,h as o,m as ve,x as j,P as ue,Q as we,k as Oe,R as Re,n as Te,t as x,a as ee,o as m,d as Ce,C as ye,p as Ee,r as H,u as Be,N as qe}from"./index-4c7ca1d0.js";import{S as Ae}from"./SdkTabs-5ff67765.js";function be(n,l,s){const a=n.slice();return a[5]=l[s],a}function _e(n,l,s){const a=n.slice();return a[5]=l[s],a}function he(n,l){let s,a=l[5].code+"",_,u,i,p;function f(){return l[4](l[5])}return{key:n,first:null,c(){s=r("button"),_=v(a),u=k(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(C,$){d(C,s,$),o(s,_),o(s,u),i||(p=Be(s,"click",f),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&j(_,a),$&6&&H(s,"active",l[1]===l[5].code)},d(C){C&&m(s),i=!1,p()}}}function ke(n,l){let s,a,_,u;return a=new qe({props:{content:l[5].body}}),{key:n,first:null,c(){s=r("div"),ge(a.$$.fragment),_=k(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(i,p){d(i,s,p),ve(a,s,null),o(s,_),u=!0},p(i,p){l=i;const f={};p&4&&(f.content=l[5].body),a.$set(f),(!u||p&6)&&H(s,"active",l[1]===l[5].code)},i(i){u||(x(a.$$.fragment,i),u=!0)},o(i){ee(a.$$.fragment,i),u=!1},d(i){i&&m(s),Ce(a)}}}function Ue(n){var de,me;let l,s,a=n[0].name+"",_,u,i,p,f,C,$,D=n[0].name+"",F,te,I,P,L,R,Q,S,N,le,K,T,se,z,M=n[0].name+"",G,ae,J,y,V,E,X,B,Z,w,q,g=[],ne=new Map,oe,A,h=[],ie=new Map,O;P=new Ae({props:{js:`
|
||||
import{S as $e,i as Pe,s as Se,O as Y,e as r,w as v,b as k,c as ge,f as b,g as d,h as o,m as ve,x as j,P as ue,Q as we,k as Oe,R as Re,n as Te,t as x,a as ee,o as m,d as Ce,C as ye,p as Ee,r as H,u as Be,N as qe}from"./index-4edb1c99.js";import{S as Ae}from"./SdkTabs-3741b181.js";function be(n,l,s){const a=n.slice();return a[5]=l[s],a}function _e(n,l,s){const a=n.slice();return a[5]=l[s],a}function he(n,l){let s,a=l[5].code+"",_,u,i,p;function f(){return l[4](l[5])}return{key:n,first:null,c(){s=r("button"),_=v(a),u=k(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(C,$){d(C,s,$),o(s,_),o(s,u),i||(p=Be(s,"click",f),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&j(_,a),$&6&&H(s,"active",l[1]===l[5].code)},d(C){C&&m(s),i=!1,p()}}}function ke(n,l){let s,a,_,u;return a=new qe({props:{content:l[5].body}}),{key:n,first:null,c(){s=r("div"),ge(a.$$.fragment),_=k(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(i,p){d(i,s,p),ve(a,s,null),o(s,_),u=!0},p(i,p){l=i;const f={};p&4&&(f.content=l[5].body),a.$set(f),(!u||p&6)&&H(s,"active",l[1]===l[5].code)},i(i){u||(x(a.$$.fragment,i),u=!0)},o(i){ee(a.$$.fragment,i),u=!1},d(i){i&&m(s),Ce(a)}}}function Ue(n){var de,me;let l,s,a=n[0].name+"",_,u,i,p,f,C,$,D=n[0].name+"",F,te,I,P,L,R,Q,S,N,le,K,T,se,z,M=n[0].name+"",G,ae,J,y,V,E,X,B,Z,w,q,g=[],ne=new Map,oe,A,h=[],ie=new Map,O;P=new Ae({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${n[3]}');
|
@ -1,4 +1,4 @@
|
||||
import{S as Re,i as Oe,s as Ce,O as K,e as r,w,b as h,c as ge,f as b,g as d,h as n,m as Pe,x as U,P as _e,Q as Ne,k as We,R as $e,n as Ee,t as ee,a as te,o as p,d as Se,C as ye,p as Ae,r as j,u as Te,N as De}from"./index-4c7ca1d0.js";import{S as qe}from"./SdkTabs-5ff67765.js";function ke(o,s,l){const a=o.slice();return a[5]=s[l],a}function he(o,s,l){const a=o.slice();return a[5]=s[l],a}function ve(o,s){let l,a=s[5].code+"",_,u,i,f;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=r("button"),_=w(a),u=h(),b(l,"class","tab-item"),j(l,"active",s[1]===s[5].code),this.first=l},m(g,P){d(g,l,P),n(l,_),n(l,u),i||(f=Te(l,"click",m),i=!0)},p(g,P){s=g,P&4&&a!==(a=s[5].code+"")&&U(_,a),P&6&&j(l,"active",s[1]===s[5].code)},d(g){g&&p(l),i=!1,f()}}}function we(o,s){let l,a,_,u;return a=new De({props:{content:s[5].body}}),{key:o,first:null,c(){l=r("div"),ge(a.$$.fragment),_=h(),b(l,"class","tab-item"),j(l,"active",s[1]===s[5].code),this.first=l},m(i,f){d(i,l,f),Pe(a,l,null),n(l,_),u=!0},p(i,f){s=i;const m={};f&4&&(m.content=s[5].body),a.$set(m),(!u||f&6)&&j(l,"active",s[1]===s[5].code)},i(i){u||(ee(a.$$.fragment,i),u=!0)},o(i){te(a.$$.fragment,i),u=!1},d(i){i&&p(l),Se(a)}}}function Be(o){var fe,me;let s,l,a=o[0].name+"",_,u,i,f,m,g,P,q=o[0].name+"",H,se,le,L,Q,S,z,N,G,R,B,ae,M,W,ne,J,F=o[0].name+"",V,oe,X,$,Y,E,Z,y,x,O,A,v=[],ie=new Map,ce,T,k=[],re=new Map,C;S=new qe({props:{js:`
|
||||
import{S as Re,i as Oe,s as Ce,O as K,e as r,w,b as h,c as ge,f as b,g as d,h as n,m as Pe,x as U,P as _e,Q as Ne,k as We,R as $e,n as Ee,t as ee,a as te,o as p,d as Se,C as ye,p as Ae,r as j,u as Te,N as De}from"./index-4edb1c99.js";import{S as qe}from"./SdkTabs-3741b181.js";function ke(o,s,l){const a=o.slice();return a[5]=s[l],a}function he(o,s,l){const a=o.slice();return a[5]=s[l],a}function ve(o,s){let l,a=s[5].code+"",_,u,i,f;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=r("button"),_=w(a),u=h(),b(l,"class","tab-item"),j(l,"active",s[1]===s[5].code),this.first=l},m(g,P){d(g,l,P),n(l,_),n(l,u),i||(f=Te(l,"click",m),i=!0)},p(g,P){s=g,P&4&&a!==(a=s[5].code+"")&&U(_,a),P&6&&j(l,"active",s[1]===s[5].code)},d(g){g&&p(l),i=!1,f()}}}function we(o,s){let l,a,_,u;return a=new De({props:{content:s[5].body}}),{key:o,first:null,c(){l=r("div"),ge(a.$$.fragment),_=h(),b(l,"class","tab-item"),j(l,"active",s[1]===s[5].code),this.first=l},m(i,f){d(i,l,f),Pe(a,l,null),n(l,_),u=!0},p(i,f){s=i;const m={};f&4&&(m.content=s[5].body),a.$set(m),(!u||f&6)&&j(l,"active",s[1]===s[5].code)},i(i){u||(ee(a.$$.fragment,i),u=!0)},o(i){te(a.$$.fragment,i),u=!1},d(i){i&&p(l),Se(a)}}}function Be(o){var fe,me;let s,l,a=o[0].name+"",_,u,i,f,m,g,P,q=o[0].name+"",H,se,le,L,Q,S,z,N,G,R,B,ae,M,W,ne,J,F=o[0].name+"",V,oe,X,$,Y,E,Z,y,x,O,A,v=[],ie=new Map,ce,T,k=[],re=new Map,C;S=new qe({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${o[3]}');
|
@ -1,4 +1,4 @@
|
||||
import{S as Se,i as Te,s as Be,O as D,e as r,w as g,b as k,c as ye,f as h,g as f,h as n,m as Ce,x as H,P as ke,Q as Re,k as qe,R as Oe,n as Ee,t as x,a as ee,o as d,d as Pe,C as Ne,p as Ve,r as F,u as Ke,N as Me}from"./index-4c7ca1d0.js";import{S as Ae}from"./SdkTabs-5ff67765.js";function ve(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function we(o,l){let s,a=l[5].code+"",b,m,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),b=g(a),m=k(),h(s,"class","tab-item"),F(s,"active",l[1]===l[5].code),this.first=s},m(w,$){f(w,s,$),n(s,b),n(s,m),i||(p=Ke(s,"click",u),i=!0)},p(w,$){l=w,$&4&&a!==(a=l[5].code+"")&&H(b,a),$&6&&F(s,"active",l[1]===l[5].code)},d(w){w&&d(s),i=!1,p()}}}function $e(o,l){let s,a,b,m;return a=new Me({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),ye(a.$$.fragment),b=k(),h(s,"class","tab-item"),F(s,"active",l[1]===l[5].code),this.first=s},m(i,p){f(i,s,p),Ce(a,s,null),n(s,b),m=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!m||p&6)&&F(s,"active",l[1]===l[5].code)},i(i){m||(x(a.$$.fragment,i),m=!0)},o(i){ee(a.$$.fragment,i),m=!1},d(i){i&&d(s),Pe(a)}}}function Ue(o){var fe,de,pe,ue;let l,s,a=o[0].name+"",b,m,i,p,u,w,$,K=o[0].name+"",I,te,L,y,Q,T,z,C,M,le,A,B,se,G,U=o[0].name+"",J,ae,W,R,X,q,Y,O,Z,P,E,v=[],oe=new Map,ne,N,_=[],ie=new Map,S;y=new Ae({props:{js:`
|
||||
import{S as Se,i as Te,s as Be,O as D,e as r,w as g,b as k,c as ye,f as h,g as f,h as n,m as Ce,x as H,P as ke,Q as Re,k as qe,R as Oe,n as Ee,t as x,a as ee,o as d,d as Pe,C as Ne,p as Ve,r as F,u as Ke,N as Me}from"./index-4edb1c99.js";import{S as Ae}from"./SdkTabs-3741b181.js";function ve(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function we(o,l){let s,a=l[5].code+"",b,m,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),b=g(a),m=k(),h(s,"class","tab-item"),F(s,"active",l[1]===l[5].code),this.first=s},m(w,$){f(w,s,$),n(s,b),n(s,m),i||(p=Ke(s,"click",u),i=!0)},p(w,$){l=w,$&4&&a!==(a=l[5].code+"")&&H(b,a),$&6&&F(s,"active",l[1]===l[5].code)},d(w){w&&d(s),i=!1,p()}}}function $e(o,l){let s,a,b,m;return a=new Me({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),ye(a.$$.fragment),b=k(),h(s,"class","tab-item"),F(s,"active",l[1]===l[5].code),this.first=s},m(i,p){f(i,s,p),Ce(a,s,null),n(s,b),m=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!m||p&6)&&F(s,"active",l[1]===l[5].code)},i(i){m||(x(a.$$.fragment,i),m=!0)},o(i){ee(a.$$.fragment,i),m=!1},d(i){i&&d(s),Pe(a)}}}function Ue(o){var fe,de,pe,ue;let l,s,a=o[0].name+"",b,m,i,p,u,w,$,K=o[0].name+"",I,te,L,y,Q,T,z,C,M,le,A,B,se,G,U=o[0].name+"",J,ae,W,R,X,q,Y,O,Z,P,E,v=[],oe=new Map,ne,N,_=[],ie=new Map,S;y=new Ae({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${o[3]}');
|
@ -1,4 +1,4 @@
|
||||
import{S as qt,i as Ot,s as Mt,C as Q,O as ne,N as Tt,e as i,w as _,b as u,c as _e,f as v,g as r,h as n,m as he,x,P as Be,Q as ht,k as Ht,R as Lt,n as Pt,t as ue,a as fe,o as d,d as ke,p as Ft,r as ye,u as Rt,y as ae}from"./index-4c7ca1d0.js";import{S as At}from"./SdkTabs-5ff67765.js";import{F as Bt}from"./FieldsQueryParam-9cc13943.js";function kt(o,e,t){const a=o.slice();return a[8]=e[t],a}function yt(o,e,t){const a=o.slice();return a[8]=e[t],a}function vt(o,e,t){const a=o.slice();return a[13]=e[t],a}function gt(o){let e;return{c(){e=i("p"),e.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",v(e,"class","txt-hint txt-sm txt-right")},m(t,a){r(t,e,a)},d(t){t&&d(e)}}}function wt(o){let e,t,a,f,m,c,p,y,S,T,w,H,D,E,P,I,j,B,$,N,q,g,b;function O(h,C){var ee,K;return(K=(ee=h[0])==null?void 0:ee.options)!=null&&K.requireEmail?Dt:jt}let z=O(o),F=z(o);return{c(){e=i("tr"),e.innerHTML='<td colspan="3" class="txt-hint">Auth fields</td>',t=u(),a=i("tr"),a.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span> <span>username</span></div></td> <td><span class="label">String</span></td> <td>The username of the auth record.
|
||||
import{S as qt,i as Ot,s as Mt,C as Q,O as ne,N as Tt,e as i,w as _,b as u,c as _e,f as v,g as r,h as n,m as he,x,P as Be,Q as ht,k as Ht,R as Lt,n as Pt,t as ue,a as fe,o as d,d as ke,p as Ft,r as ye,u as Rt,y as ae}from"./index-4edb1c99.js";import{S as At}from"./SdkTabs-3741b181.js";import{F as Bt}from"./FieldsQueryParam-3e41088d.js";function kt(o,e,t){const a=o.slice();return a[8]=e[t],a}function yt(o,e,t){const a=o.slice();return a[8]=e[t],a}function vt(o,e,t){const a=o.slice();return a[13]=e[t],a}function gt(o){let e;return{c(){e=i("p"),e.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",v(e,"class","txt-hint txt-sm txt-right")},m(t,a){r(t,e,a)},d(t){t&&d(e)}}}function wt(o){let e,t,a,f,m,c,p,y,S,T,w,H,D,E,P,I,j,B,$,N,q,g,b;function O(h,C){var ee,K;return(K=(ee=h[0])==null?void 0:ee.options)!=null&&K.requireEmail?Dt:jt}let z=O(o),F=z(o);return{c(){e=i("tr"),e.innerHTML='<td colspan="3" class="txt-hint">Auth fields</td>',t=u(),a=i("tr"),a.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span> <span>username</span></div></td> <td><span class="label">String</span></td> <td>The username of the auth record.
|
||||
<br/>
|
||||
If not set, it will be auto generated.</td>`,f=u(),m=i("tr"),c=i("td"),p=i("div"),F.c(),y=u(),S=i("span"),S.textContent="email",T=u(),w=i("td"),w.innerHTML='<span class="label">String</span>',H=u(),D=i("td"),D.textContent="Auth record email address.",E=u(),P=i("tr"),P.innerHTML='<td><div class="inline-flex"><span class="label label-warning">Optional</span> <span>emailVisibility</span></div></td> <td><span class="label">Boolean</span></td> <td>Whether to show/hide the auth record email when fetching the record data.</td>',I=u(),j=i("tr"),j.innerHTML='<td><div class="inline-flex"><span class="label label-success">Required</span> <span>password</span></div></td> <td><span class="label">String</span></td> <td>Auth record password.</td>',B=u(),$=i("tr"),$.innerHTML='<td><div class="inline-flex"><span class="label label-success">Required</span> <span>passwordConfirm</span></div></td> <td><span class="label">String</span></td> <td>Auth record password confirmation.</td>',N=u(),q=i("tr"),q.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span> <span>verified</span></div></td> <td><span class="label">Boolean</span></td> <td>Indicates whether the auth record is verified or not.
|
||||
<br/>
|
@ -1,4 +1,4 @@
|
||||
import{S as Re,i as Pe,s as Ee,O as j,e as c,w as y,b as k,c as De,f as m,g as p,h as i,m as Ce,x as ee,P as he,Q as Oe,k as Te,R as Be,n as Ie,t as te,a as le,o as u,d as we,C as Ae,p as Me,r as N,u as Se,N as qe}from"./index-4c7ca1d0.js";import{S as He}from"./SdkTabs-5ff67765.js";function ke(a,l,s){const o=a.slice();return o[6]=l[s],o}function ge(a,l,s){const o=a.slice();return o[6]=l[s],o}function ve(a){let l;return{c(){l=c("p"),l.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",m(l,"class","txt-hint txt-sm txt-right")},m(s,o){p(s,l,o)},d(s){s&&u(l)}}}function ye(a,l){let s,o,h;function d(){return l[5](l[6])}return{key:a,first:null,c(){s=c("button"),s.textContent=`${l[6].code} `,m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(n,r){p(n,s,r),o||(h=Se(s,"click",d),o=!0)},p(n,r){l=n,r&20&&N(s,"active",l[2]===l[6].code)},d(n){n&&u(s),o=!1,h()}}}function $e(a,l){let s,o,h,d;return o=new qe({props:{content:l[6].body}}),{key:a,first:null,c(){s=c("div"),De(o.$$.fragment),h=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(n,r){p(n,s,r),Ce(o,s,null),i(s,h),d=!0},p(n,r){l=n,(!d||r&20)&&N(s,"active",l[2]===l[6].code)},i(n){d||(te(o.$$.fragment,n),d=!0)},o(n){le(o.$$.fragment,n),d=!1},d(n){n&&u(s),we(o)}}}function Le(a){var ue,me;let l,s,o=a[0].name+"",h,d,n,r,$,D,z,S=a[0].name+"",F,se,K,C,Q,E,G,g,q,ae,H,P,oe,J,L=a[0].name+"",V,ne,W,ie,X,O,Y,T,Z,B,x,w,I,v=[],ce=new Map,de,A,b=[],re=new Map,R;C=new He({props:{js:`
|
||||
import{S as Re,i as Pe,s as Ee,O as j,e as c,w as y,b as k,c as De,f as m,g as p,h as i,m as Ce,x as ee,P as he,Q as Oe,k as Te,R as Be,n as Ie,t as te,a as le,o as u,d as we,C as Ae,p as Me,r as N,u as Se,N as qe}from"./index-4edb1c99.js";import{S as He}from"./SdkTabs-3741b181.js";function ke(a,l,s){const o=a.slice();return o[6]=l[s],o}function ge(a,l,s){const o=a.slice();return o[6]=l[s],o}function ve(a){let l;return{c(){l=c("p"),l.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",m(l,"class","txt-hint txt-sm txt-right")},m(s,o){p(s,l,o)},d(s){s&&u(l)}}}function ye(a,l){let s,o,h;function d(){return l[5](l[6])}return{key:a,first:null,c(){s=c("button"),s.textContent=`${l[6].code} `,m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(n,r){p(n,s,r),o||(h=Se(s,"click",d),o=!0)},p(n,r){l=n,r&20&&N(s,"active",l[2]===l[6].code)},d(n){n&&u(s),o=!1,h()}}}function $e(a,l){let s,o,h,d;return o=new qe({props:{content:l[6].body}}),{key:a,first:null,c(){s=c("div"),De(o.$$.fragment),h=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(n,r){p(n,s,r),Ce(o,s,null),i(s,h),d=!0},p(n,r){l=n,(!d||r&20)&&N(s,"active",l[2]===l[6].code)},i(n){d||(te(o.$$.fragment,n),d=!0)},o(n){le(o.$$.fragment,n),d=!1},d(n){n&&u(s),we(o)}}}function Le(a){var ue,me;let l,s,o=a[0].name+"",h,d,n,r,$,D,z,S=a[0].name+"",F,se,K,C,Q,E,G,g,q,ae,H,P,oe,J,L=a[0].name+"",V,ne,W,ie,X,O,Y,T,Z,B,x,w,I,v=[],ce=new Map,de,A,b=[],re=new Map,R;C=new He({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${a[3]}');
|
9
ui/dist/assets/FieldsQueryParam-3e41088d.js
vendored
Normal file
9
ui/dist/assets/FieldsQueryParam-3e41088d.js
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import{S as L,i as S,s as k,N as E,e as s,b as o,w as $,c as F,f as H,g as M,h as e,m as T,y as q,t as N,a as B,o as I,d as J}from"./index-4edb1c99.js";function O(v){let t,i,x,p,g,n,a,h,c,_,r,b,f,y,u,C,m,d;return r=new E({props:{content:`
|
||||
?fields=*,expand.relField.name
|
||||
`}}),{c(){t=s("tr"),i=s("td"),i.textContent="fields",x=o(),p=s("td"),p.innerHTML='<span class="label">String</span>',g=o(),n=s("td"),a=s("p"),h=$(`Comma separated string of the fields to return in the JSON response
|
||||
`),c=s("em"),c.textContent="(by default returns all fields)",_=$(`. Ex.:
|
||||
`),F(r.$$.fragment),b=o(),f=s("p"),f.innerHTML="<code>*</code> targets all keys from the specific depth level.",y=o(),u=s("p"),u.textContent="In addition, the following field modifiers are also supported:",C=o(),m=s("ul"),m.innerHTML=`<li><code>:excerpt(maxLength, withEllipsis?)</code> <br/>
|
||||
Returns a short plain text version of the field string value.
|
||||
<br/>
|
||||
Ex.:
|
||||
<code>?fields=*,description:excerpt(200,true)</code></li>`,H(i,"id","query-page")},m(l,w){M(l,t,w),e(t,i),e(t,x),e(t,p),e(t,g),e(t,n),e(n,a),e(a,h),e(a,c),e(a,_),T(r,a,null),e(n,b),e(n,f),e(n,y),e(n,u),e(n,C),e(n,m),d=!0},p:q,i(l){d||(N(r.$$.fragment,l),d=!0)},o(l){B(r.$$.fragment,l),d=!1},d(l){l&&I(t),J(r)}}}class Q extends L{constructor(t){super(),S(this,t,null,O,k,{})}}export{Q as F};
|
3
ui/dist/assets/FieldsQueryParam-9cc13943.js
vendored
3
ui/dist/assets/FieldsQueryParam-9cc13943.js
vendored
@ -1,3 +0,0 @@
|
||||
import{S as d,i as n,s as i,e as l,g as o,y as s,o as p}from"./index-4c7ca1d0.js";function c(a){let e;return{c(){e=l("tr"),e.innerHTML=`<td id="query-page">fields</td> <td><span class="label">String</span></td> <td>Comma separated string of the fields to return in the JSON response
|
||||
<em>(by default returns all fields)</em>. For example:
|
||||
<br/> <code>?fields=id,expand.relField.id,expand.relField.created</code></td>`},m(t,r){o(t,e,r)},p:s,i:s,o:s,d(t){t&&p(e)}}}class f extends d{constructor(e){super(),n(this,e,null,c,i,{})}}export{f as F};
|
File diff suppressed because one or more lines are too long
141
ui/dist/assets/ListApiDocs-2519296f.js
vendored
141
ui/dist/assets/ListApiDocs-2519296f.js
vendored
@ -1,141 +0,0 @@
|
||||
import{S as Ze,i as tl,s as el,e,b as s,E as sl,f as a,g as u,u as ll,y as Ue,o as m,w as _,h as t,N as Fe,O as te,c as ee,m as le,x as ke,P as je,Q as nl,k as ol,R as al,n as il,t as Bt,a as Gt,d as se,T as rl,C as ve,p as cl,r as Le}from"./index-4c7ca1d0.js";import{S as dl}from"./SdkTabs-5ff67765.js";function pl(d){let n,o,i;return{c(){n=e("span"),n.textContent="Show details",o=s(),i=e("i"),a(n,"class","txt"),a(i,"class","ri-arrow-down-s-line")},m(f,h){u(f,n,h),u(f,o,h),u(f,i,h)},d(f){f&&(m(n),m(o),m(i))}}}function fl(d){let n,o,i;return{c(){n=e("span"),n.textContent="Hide details",o=s(),i=e("i"),a(n,"class","txt"),a(i,"class","ri-arrow-up-s-line")},m(f,h){u(f,n,h),u(f,o,h),u(f,i,h)},d(f){f&&(m(n),m(o),m(i))}}}function ze(d){let n,o,i,f,h,r,b,C,$,g,p,Z,Ct,Ut,E,jt,M,it,S,tt,ne,G,U,oe,rt,$t,et,kt,ae,ct,dt,lt,N,zt,yt,y,st,vt,Jt,Ft,j,nt,Lt,Kt,At,F,pt,Tt,ie,ft,re,D,Pt,ot,St,O,ut,ce,z,Ot,Qt,Rt,de,q,Vt,J,mt,pe,I,fe,B,ue,P,Et,K,ht,me,bt,he,w,Nt,at,qt,be,Ht,Wt,Q,gt,ge,Mt,_e,_t,xe,V,xt,we,wt,Xt,W,Yt,L,X,R,Dt,Ce,Y,v,It;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format
|
||||
<code><span class="txt-success">OPERAND</span> <span class="txt-danger">OPERATOR</span> <span class="txt-success">OPERAND</span></code>, where:`,o=s(),i=e("ul"),f=e("li"),f.innerHTML=`<code class="txt-success">OPERAND</code> - could be any of the above field literal, string (single
|
||||
or double quoted), number, null, true, false`,h=s(),r=e("li"),b=e("code"),b.textContent="OPERATOR",C=_(` - is one of:
|
||||
`),$=e("br"),g=s(),p=e("ul"),Z=e("li"),Ct=e("code"),Ct.textContent="=",Ut=s(),E=e("span"),E.textContent="Equal",jt=s(),M=e("li"),it=e("code"),it.textContent="!=",S=s(),tt=e("span"),tt.textContent="NOT equal",ne=s(),G=e("li"),U=e("code"),U.textContent=">",oe=s(),rt=e("span"),rt.textContent="Greater than",$t=s(),et=e("li"),kt=e("code"),kt.textContent=">=",ae=s(),ct=e("span"),ct.textContent="Greater than or equal",dt=s(),lt=e("li"),N=e("code"),N.textContent="<",zt=s(),yt=e("span"),yt.textContent="Less than",y=s(),st=e("li"),vt=e("code"),vt.textContent="<=",Jt=s(),Ft=e("span"),Ft.textContent="Less than or equal",j=s(),nt=e("li"),Lt=e("code"),Lt.textContent="~",Kt=s(),At=e("span"),At.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
|
||||
wildcard match)`,F=s(),pt=e("li"),Tt=e("code"),Tt.textContent="!~",ie=s(),ft=e("span"),ft.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
|
||||
wildcard match)`,re=s(),D=e("li"),Pt=e("code"),Pt.textContent="?=",ot=s(),St=e("em"),St.textContent="Any/At least one of",O=s(),ut=e("span"),ut.textContent="Equal",ce=s(),z=e("li"),Ot=e("code"),Ot.textContent="?!=",Qt=s(),Rt=e("em"),Rt.textContent="Any/At least one of",de=s(),q=e("span"),q.textContent="NOT equal",Vt=s(),J=e("li"),mt=e("code"),mt.textContent="?>",pe=s(),I=e("em"),I.textContent="Any/At least one of",fe=s(),B=e("span"),B.textContent="Greater than",ue=s(),P=e("li"),Et=e("code"),Et.textContent="?>=",K=s(),ht=e("em"),ht.textContent="Any/At least one of",me=s(),bt=e("span"),bt.textContent="Greater than or equal",he=s(),w=e("li"),Nt=e("code"),Nt.textContent="?<",at=s(),qt=e("em"),qt.textContent="Any/At least one of",be=s(),Ht=e("span"),Ht.textContent="Less than",Wt=s(),Q=e("li"),gt=e("code"),gt.textContent="?<=",ge=s(),Mt=e("em"),Mt.textContent="Any/At least one of",_e=s(),_t=e("span"),_t.textContent="Less than or equal",xe=s(),V=e("li"),xt=e("code"),xt.textContent="?~",we=s(),wt=e("em"),wt.textContent="Any/At least one of",Xt=s(),W=e("span"),W.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
|
||||
wildcard match)`,Yt=s(),L=e("li"),X=e("code"),X.textContent="?!~",R=s(),Dt=e("em"),Dt.textContent="Any/At least one of",Ce=s(),Y=e("span"),Y.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
|
||||
wildcard match)`,v=s(),It=e("p"),It.innerHTML=`To group and combine several expressions you could use brackets
|
||||
<code>(...)</code>, <code>&&</code> (AND) and <code>||</code> (OR) tokens.`,a(b,"class","txt-danger"),a(Ct,"class","filter-op svelte-1w7s5nw"),a(E,"class","txt"),a(it,"class","filter-op svelte-1w7s5nw"),a(tt,"class","txt"),a(U,"class","filter-op svelte-1w7s5nw"),a(rt,"class","txt"),a(kt,"class","filter-op svelte-1w7s5nw"),a(ct,"class","txt"),a(N,"class","filter-op svelte-1w7s5nw"),a(yt,"class","txt"),a(vt,"class","filter-op svelte-1w7s5nw"),a(Ft,"class","txt"),a(Lt,"class","filter-op svelte-1w7s5nw"),a(At,"class","txt"),a(Tt,"class","filter-op svelte-1w7s5nw"),a(ft,"class","txt"),a(Pt,"class","filter-op svelte-1w7s5nw"),a(St,"class","txt-hint"),a(ut,"class","txt"),a(Ot,"class","filter-op svelte-1w7s5nw"),a(Rt,"class","txt-hint"),a(q,"class","txt"),a(mt,"class","filter-op svelte-1w7s5nw"),a(I,"class","txt-hint"),a(B,"class","txt"),a(Et,"class","filter-op svelte-1w7s5nw"),a(ht,"class","txt-hint"),a(bt,"class","txt"),a(Nt,"class","filter-op svelte-1w7s5nw"),a(qt,"class","txt-hint"),a(Ht,"class","txt"),a(gt,"class","filter-op svelte-1w7s5nw"),a(Mt,"class","txt-hint"),a(_t,"class","txt"),a(xt,"class","filter-op svelte-1w7s5nw"),a(wt,"class","txt-hint"),a(W,"class","txt"),a(X,"class","filter-op svelte-1w7s5nw"),a(Dt,"class","txt-hint"),a(Y,"class","txt")},m(A,k){u(A,n,k),u(A,o,k),u(A,i,k),t(i,f),t(i,h),t(i,r),t(r,b),t(r,C),t(r,$),t(r,g),t(r,p),t(p,Z),t(Z,Ct),t(Z,Ut),t(Z,E),t(p,jt),t(p,M),t(M,it),t(M,S),t(M,tt),t(p,ne),t(p,G),t(G,U),t(G,oe),t(G,rt),t(p,$t),t(p,et),t(et,kt),t(et,ae),t(et,ct),t(p,dt),t(p,lt),t(lt,N),t(lt,zt),t(lt,yt),t(p,y),t(p,st),t(st,vt),t(st,Jt),t(st,Ft),t(p,j),t(p,nt),t(nt,Lt),t(nt,Kt),t(nt,At),t(p,F),t(p,pt),t(pt,Tt),t(pt,ie),t(pt,ft),t(p,re),t(p,D),t(D,Pt),t(D,ot),t(D,St),t(D,O),t(D,ut),t(p,ce),t(p,z),t(z,Ot),t(z,Qt),t(z,Rt),t(z,de),t(z,q),t(p,Vt),t(p,J),t(J,mt),t(J,pe),t(J,I),t(J,fe),t(J,B),t(p,ue),t(p,P),t(P,Et),t(P,K),t(P,ht),t(P,me),t(P,bt),t(p,he),t(p,w),t(w,Nt),t(w,at),t(w,qt),t(w,be),t(w,Ht),t(p,Wt),t(p,Q),t(Q,gt),t(Q,ge),t(Q,Mt),t(Q,_e),t(Q,_t),t(p,xe),t(p,V),t(V,xt),t(V,we),t(V,wt),t(V,Xt),t(V,W),t(p,Yt),t(p,L),t(L,X),t(L,R),t(L,Dt),t(L,Ce),t(L,Y),u(A,v,k),u(A,It,k)},d(A){A&&(m(n),m(o),m(i),m(v),m(It))}}}function ul(d){let n,o,i,f,h;function r(g,p){return g[0]?fl:pl}let b=r(d),C=b(d),$=d[0]&&ze();return{c(){n=e("button"),C.c(),o=s(),$&&$.c(),i=sl(),a(n,"class","btn btn-sm btn-secondary m-t-10")},m(g,p){u(g,n,p),C.m(n,null),u(g,o,p),$&&$.m(g,p),u(g,i,p),f||(h=ll(n,"click",d[1]),f=!0)},p(g,[p]){b!==(b=r(g))&&(C.d(1),C=b(g),C&&(C.c(),C.m(n,null))),g[0]?$||($=ze(),$.c(),$.m(i.parentNode,i)):$&&($.d(1),$=null)},i:Ue,o:Ue,d(g){g&&(m(n),m(o),m(i)),C.d(),$&&$.d(g),f=!1,h()}}}function ml(d,n,o){let i=!1;function f(){o(0,i=!i)}return[i,f]}class hl extends Ze{constructor(n){super(),tl(this,n,ml,ul,el,{})}}function Je(d,n,o){const i=d.slice();return i[7]=n[o],i}function Ke(d,n,o){const i=d.slice();return i[7]=n[o],i}function Qe(d,n,o){const i=d.slice();return i[12]=n[o],i[14]=o,i}function Ve(d){let n;return{c(){n=e("p"),n.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",a(n,"class","txt-hint txt-sm txt-right")},m(o,i){u(o,n,i)},d(o){o&&m(n)}}}function We(d){let n,o=d[12]+"",i,f=d[14]<d[4].length-1?", ":"",h;return{c(){n=e("code"),i=_(o),h=_(f)},m(r,b){u(r,n,b),t(n,i),u(r,h,b)},p(r,b){b&16&&o!==(o=r[12]+"")&&ke(i,o),b&16&&f!==(f=r[14]<r[4].length-1?", ":"")&&ke(h,f)},d(r){r&&(m(n),m(h))}}}function Xe(d,n){let o,i,f;function h(){return n[6](n[7])}return{key:d,first:null,c(){o=e("button"),o.textContent=`${n[7].code} `,a(o,"type","button"),a(o,"class","tab-item"),Le(o,"active",n[2]===n[7].code),this.first=o},m(r,b){u(r,o,b),i||(f=ll(o,"click",h),i=!0)},p(r,b){n=r,b&36&&Le(o,"active",n[2]===n[7].code)},d(r){r&&m(o),i=!1,f()}}}function Ye(d,n){let o,i,f,h;return i=new Fe({props:{content:n[7].body}}),{key:d,first:null,c(){o=e("div"),ee(i.$$.fragment),f=s(),a(o,"class","tab-item"),Le(o,"active",n[2]===n[7].code),this.first=o},m(r,b){u(r,o,b),le(i,o,null),t(o,f),h=!0},p(r,b){n=r,(!h||b&36)&&Le(o,"active",n[2]===n[7].code)},i(r){h||(Bt(i.$$.fragment,r),h=!0)},o(r){Gt(i.$$.fragment,r),h=!1},d(r){r&&m(o),se(i)}}}function bl(d){var Pe,Se,Oe,Re,Ee,Ne;let n,o,i=d[0].name+"",f,h,r,b,C,$,g,p=d[0].name+"",Z,Ct,Ut,E,jt,M,it,S,tt,ne,G,U,oe,rt,$t=d[0].name+"",et,kt,ae,ct,dt,lt,N,zt,yt,y,st,vt,Jt,Ft,j,nt,Lt,Kt,At,F,pt,Tt,ie,ft,re,D,Pt,ot,St,O,ut,ce,z,Ot,Qt,Rt,de,q,Vt,J,mt,pe,I,fe,B,ue,P,Et,K,ht,me,bt,he,w,Nt,at,qt,be,Ht,Wt,Q,gt,ge,Mt,_e,_t,xe,V,xt,we,wt,Xt,W,Yt,L,X,R=[],Dt=new Map,Ce,Y,v=[],It=new Map,A;E=new dl({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${d[3]}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
const resultList = await pb.collection('${(Pe=d[0])==null?void 0:Pe.name}').getList(1, 50, {
|
||||
filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2',
|
||||
});
|
||||
|
||||
// you can also fetch all records at once via getFullList
|
||||
const records = await pb.collection('${(Se=d[0])==null?void 0:Se.name}').getFullList({
|
||||
sort: '-created',
|
||||
});
|
||||
|
||||
// or fetch only the first record that matches the specified filter
|
||||
const record = await pb.collection('${(Oe=d[0])==null?void 0:Oe.name}').getFirstListItem('someField="test"', {
|
||||
expand: 'relField1,relField2.subRelField',
|
||||
});
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${d[3]}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
final resultList = await pb.collection('${(Re=d[0])==null?void 0:Re.name}').getList(
|
||||
page: 1,
|
||||
perPage: 50,
|
||||
filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2',
|
||||
);
|
||||
|
||||
// you can also fetch all records at once via getFullList
|
||||
final records = await pb.collection('${(Ee=d[0])==null?void 0:Ee.name}').getFullList(
|
||||
sort: '-created',
|
||||
);
|
||||
|
||||
// or fetch only the first record that matches the specified filter
|
||||
final record = await pb.collection('${(Ne=d[0])==null?void 0:Ne.name}').getFirstListItem(
|
||||
'someField="test"',
|
||||
expand: 'relField1,relField2.subRelField',
|
||||
);
|
||||
`}});let k=d[1]&&Ve();ot=new Fe({props:{content:`
|
||||
// DESC by created and ASC by id
|
||||
?sort=-created,id
|
||||
`}});let Zt=te(d[4]),T=[];for(let l=0;l<Zt.length;l+=1)T[l]=We(Qe(d,Zt,l));B=new Fe({props:{content:`
|
||||
?filter=(id='abc' && created>'2022-01-01')
|
||||
`}}),P=new hl({}),at=new Fe({props:{content:"?expand=relField1,relField2.subRelField"}});let ye=te(d[5]);const Ae=l=>l[7].code;for(let l=0;l<ye.length;l+=1){let c=Ke(d,ye,l),x=Ae(c);Dt.set(x,R[l]=Xe(x,c))}let $e=te(d[5]);const Te=l=>l[7].code;for(let l=0;l<$e.length;l+=1){let c=Je(d,$e,l),x=Te(c);It.set(x,v[l]=Ye(x,c))}return{c(){n=e("h3"),o=_("List/Search ("),f=_(i),h=_(")"),r=s(),b=e("div"),C=e("p"),$=_("Fetch a paginated "),g=e("strong"),Z=_(p),Ct=_(" records list, supporting sorting and filtering."),Ut=s(),ee(E.$$.fragment),jt=s(),M=e("h6"),M.textContent="API details",it=s(),S=e("div"),tt=e("strong"),tt.textContent="GET",ne=s(),G=e("div"),U=e("p"),oe=_("/api/collections/"),rt=e("strong"),et=_($t),kt=_("/records"),ae=s(),k&&k.c(),ct=s(),dt=e("div"),dt.textContent="Query parameters",lt=s(),N=e("table"),zt=e("thead"),zt.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="60%">Description</th></tr>',yt=s(),y=e("tbody"),st=e("tr"),st.innerHTML='<td>page</td> <td><span class="label">Number</span></td> <td>The page (aka. offset) of the paginated list (default to 1).</td>',vt=s(),Jt=e("tr"),Jt.innerHTML='<td>perPage</td> <td><span class="label">Number</span></td> <td>Specify the max returned records per page (default to 30).</td>',Ft=s(),j=e("tr"),nt=e("td"),nt.textContent="sort",Lt=s(),Kt=e("td"),Kt.innerHTML='<span class="label">String</span>',At=s(),F=e("td"),pt=_("Specify the records order attribute(s). "),Tt=e("br"),ie=_(`
|
||||
Add `),ft=e("code"),ft.textContent="-",re=_(" / "),D=e("code"),D.textContent="+",Pt=_(` (default) in front of the attribute for DESC / ASC order.
|
||||
Ex.:
|
||||
`),ee(ot.$$.fragment),St=s(),O=e("p"),ut=e("strong"),ut.textContent="Supported record sort fields:",ce=s(),z=e("br"),Ot=s(),Qt=e("code"),Qt.textContent="@random",Rt=_(`,
|
||||
`);for(let l=0;l<T.length;l+=1)T[l].c();de=s(),q=e("tr"),Vt=e("td"),Vt.textContent="filter",J=s(),mt=e("td"),mt.innerHTML='<span class="label">String</span>',pe=s(),I=e("td"),fe=_(`Filter the returned records. Ex.:
|
||||
`),ee(B.$$.fragment),ue=s(),ee(P.$$.fragment),Et=s(),K=e("tr"),ht=e("td"),ht.textContent="expand",me=s(),bt=e("td"),bt.innerHTML='<span class="label">String</span>',he=s(),w=e("td"),Nt=_(`Auto expand record relations. Ex.:
|
||||
`),ee(at.$$.fragment),qt=_(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),be=e("br"),Ht=_(`
|
||||
The expanded relations will be appended to each individual record under the
|
||||
`),Wt=e("code"),Wt.textContent="expand",Q=_(" property (eg. "),gt=e("code"),gt.textContent='"expand": {"relField1": {...}, ...}',ge=_(`).
|
||||
`),Mt=e("br"),_e=_(`
|
||||
Only the relations to which the request user has permissions to `),_t=e("strong"),_t.textContent="view",xe=_(" will be expanded."),V=s(),xt=e("tr"),xt.innerHTML=`<td id="query-page">fields</td> <td><span class="label">String</span></td> <td>Comma separated string of the fields to return in the JSON response
|
||||
<em>(by default returns all fields)</em>.
|
||||
<br/>
|
||||
Use <code>*</code> to target all keys from the specific depth level.
|
||||
<br/>
|
||||
For example: <code>?fields=*,expand.author.name</code></td>`,we=s(),wt=e("tr"),wt.innerHTML=`<td id="query-page">skipTotal</td> <td><span class="label">Boolean</span></td> <td>If it is set the total counts query will be skipped and the response fields
|
||||
<code>totalItems</code> and <code>totalPages</code> will have <code>-1</code> value.
|
||||
<br/>
|
||||
This could drastically speed up the search queries when the total counters are not needed or cursor
|
||||
based pagination is used.
|
||||
<br/>
|
||||
For optimization purposes, it is set by default for the
|
||||
<code>getFirstListItem()</code>
|
||||
and
|
||||
<code>getFullList()</code> SDKs methods.</td>`,Xt=s(),W=e("div"),W.textContent="Responses",Yt=s(),L=e("div"),X=e("div");for(let l=0;l<R.length;l+=1)R[l].c();Ce=s(),Y=e("div");for(let l=0;l<v.length;l+=1)v[l].c();a(n,"class","m-b-sm"),a(b,"class","content txt-lg m-b-sm"),a(M,"class","m-b-xs"),a(tt,"class","label label-primary"),a(G,"class","content"),a(S,"class","alert alert-info"),a(dt,"class","section-title"),a(N,"class","table-compact table-border m-b-base"),a(W,"class","section-title"),a(X,"class","tabs-header compact combined left"),a(Y,"class","tabs-content"),a(L,"class","tabs")},m(l,c){u(l,n,c),t(n,o),t(n,f),t(n,h),u(l,r,c),u(l,b,c),t(b,C),t(C,$),t(C,g),t(g,Z),t(C,Ct),u(l,Ut,c),le(E,l,c),u(l,jt,c),u(l,M,c),u(l,it,c),u(l,S,c),t(S,tt),t(S,ne),t(S,G),t(G,U),t(U,oe),t(U,rt),t(rt,et),t(U,kt),t(S,ae),k&&k.m(S,null),u(l,ct,c),u(l,dt,c),u(l,lt,c),u(l,N,c),t(N,zt),t(N,yt),t(N,y),t(y,st),t(y,vt),t(y,Jt),t(y,Ft),t(y,j),t(j,nt),t(j,Lt),t(j,Kt),t(j,At),t(j,F),t(F,pt),t(F,Tt),t(F,ie),t(F,ft),t(F,re),t(F,D),t(F,Pt),le(ot,F,null),t(F,St),t(F,O),t(O,ut),t(O,ce),t(O,z),t(O,Ot),t(O,Qt),t(O,Rt);for(let x=0;x<T.length;x+=1)T[x]&&T[x].m(O,null);t(y,de),t(y,q),t(q,Vt),t(q,J),t(q,mt),t(q,pe),t(q,I),t(I,fe),le(B,I,null),t(I,ue),le(P,I,null),t(y,Et),t(y,K),t(K,ht),t(K,me),t(K,bt),t(K,he),t(K,w),t(w,Nt),le(at,w,null),t(w,qt),t(w,be),t(w,Ht),t(w,Wt),t(w,Q),t(w,gt),t(w,ge),t(w,Mt),t(w,_e),t(w,_t),t(w,xe),t(y,V),t(y,xt),t(y,we),t(y,wt),u(l,Xt,c),u(l,W,c),u(l,Yt,c),u(l,L,c),t(L,X);for(let x=0;x<R.length;x+=1)R[x]&&R[x].m(X,null);t(L,Ce),t(L,Y);for(let x=0;x<v.length;x+=1)v[x]&&v[x].m(Y,null);A=!0},p(l,[c]){var qe,He,Me,De,Ie,Be;(!A||c&1)&&i!==(i=l[0].name+"")&&ke(f,i),(!A||c&1)&&p!==(p=l[0].name+"")&&ke(Z,p);const x={};if(c&9&&(x.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${l[3]}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
const resultList = await pb.collection('${(qe=l[0])==null?void 0:qe.name}').getList(1, 50, {
|
||||
filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2',
|
||||
});
|
||||
|
||||
// you can also fetch all records at once via getFullList
|
||||
const records = await pb.collection('${(He=l[0])==null?void 0:He.name}').getFullList({
|
||||
sort: '-created',
|
||||
});
|
||||
|
||||
// or fetch only the first record that matches the specified filter
|
||||
const record = await pb.collection('${(Me=l[0])==null?void 0:Me.name}').getFirstListItem('someField="test"', {
|
||||
expand: 'relField1,relField2.subRelField',
|
||||
});
|
||||
`),c&9&&(x.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${l[3]}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
final resultList = await pb.collection('${(De=l[0])==null?void 0:De.name}').getList(
|
||||
page: 1,
|
||||
perPage: 50,
|
||||
filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2',
|
||||
);
|
||||
|
||||
// you can also fetch all records at once via getFullList
|
||||
final records = await pb.collection('${(Ie=l[0])==null?void 0:Ie.name}').getFullList(
|
||||
sort: '-created',
|
||||
);
|
||||
|
||||
// or fetch only the first record that matches the specified filter
|
||||
final record = await pb.collection('${(Be=l[0])==null?void 0:Be.name}').getFirstListItem(
|
||||
'someField="test"',
|
||||
expand: 'relField1,relField2.subRelField',
|
||||
);
|
||||
`),E.$set(x),(!A||c&1)&&$t!==($t=l[0].name+"")&&ke(et,$t),l[1]?k||(k=Ve(),k.c(),k.m(S,null)):k&&(k.d(1),k=null),c&16){Zt=te(l[4]);let H;for(H=0;H<Zt.length;H+=1){const Ge=Qe(l,Zt,H);T[H]?T[H].p(Ge,c):(T[H]=We(Ge),T[H].c(),T[H].m(O,null))}for(;H<T.length;H+=1)T[H].d(1);T.length=Zt.length}c&36&&(ye=te(l[5]),R=je(R,c,Ae,1,l,ye,Dt,X,nl,Xe,null,Ke)),c&36&&($e=te(l[5]),ol(),v=je(v,c,Te,1,l,$e,It,Y,al,Ye,null,Je),il())},i(l){if(!A){Bt(E.$$.fragment,l),Bt(ot.$$.fragment,l),Bt(B.$$.fragment,l),Bt(P.$$.fragment,l),Bt(at.$$.fragment,l);for(let c=0;c<$e.length;c+=1)Bt(v[c]);A=!0}},o(l){Gt(E.$$.fragment,l),Gt(ot.$$.fragment,l),Gt(B.$$.fragment,l),Gt(P.$$.fragment,l),Gt(at.$$.fragment,l);for(let c=0;c<v.length;c+=1)Gt(v[c]);A=!1},d(l){l&&(m(n),m(r),m(b),m(Ut),m(jt),m(M),m(it),m(S),m(ct),m(dt),m(lt),m(N),m(Xt),m(W),m(Yt),m(L)),se(E,l),k&&k.d(),se(ot),rl(T,l),se(B),se(P),se(at);for(let c=0;c<R.length;c+=1)R[c].d();for(let c=0;c<v.length;c+=1)v[c].d()}}}function gl(d,n,o){let i,f,h,{collection:r}=n,b=200,C=[];const $=g=>o(2,b=g.code);return d.$$set=g=>{"collection"in g&&o(0,r=g.collection)},d.$$.update=()=>{d.$$.dirty&1&&o(4,i=ve.getAllCollectionIdentifiers(r)),d.$$.dirty&1&&o(1,f=(r==null?void 0:r.listRule)===null),d.$$.dirty&3&&r!=null&&r.id&&(C.push({code:200,body:JSON.stringify({page:1,perPage:30,totalPages:1,totalItems:2,items:[ve.dummyCollectionRecord(r),ve.dummyCollectionRecord(r)]},null,2)}),C.push({code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Something went wrong while processing your request. Invalid filter.",
|
||||
"data": {}
|
||||
}
|
||||
`}),f&&C.push({code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "Only admins can access this action.",
|
||||
"data": {}
|
||||
}
|
||||
`}))},o(3,h=ve.getApiExampleUrl(cl.baseUrl)),[r,f,b,h,i,C,$]}class wl extends Ze{constructor(n){super(),tl(this,n,gl,bl,el,{collection:0})}}export{wl as default};
|
136
ui/dist/assets/ListApiDocs-9ff5f4b4.js
vendored
Normal file
136
ui/dist/assets/ListApiDocs-9ff5f4b4.js
vendored
Normal file
@ -0,0 +1,136 @@
|
||||
import{S as Ze,i as tl,s as el,e,b as s,E as sl,f as a,g as u,u as ll,y as Qe,o as m,w as _,h as t,N as Fe,O as se,c as Qt,m as Ut,x as ke,P as Ue,Q as nl,k as ol,R as al,n as il,t as $t,a as Ct,d as jt,T as rl,C as ve,p as cl,r as Le}from"./index-4edb1c99.js";import{S as dl}from"./SdkTabs-3741b181.js";import{F as pl}from"./FieldsQueryParam-3e41088d.js";function fl(d){let n,o,i;return{c(){n=e("span"),n.textContent="Show details",o=s(),i=e("i"),a(n,"class","txt"),a(i,"class","ri-arrow-down-s-line")},m(f,h){u(f,n,h),u(f,o,h),u(f,i,h)},d(f){f&&(m(n),m(o),m(i))}}}function ul(d){let n,o,i;return{c(){n=e("span"),n.textContent="Hide details",o=s(),i=e("i"),a(n,"class","txt"),a(i,"class","ri-arrow-up-s-line")},m(f,h){u(f,n,h),u(f,o,h),u(f,i,h)},d(f){f&&(m(n),m(o),m(i))}}}function je(d){let n,o,i,f,h,r,b,$,C,g,p,tt,kt,zt,E,Kt,H,rt,R,et,ne,Q,U,oe,ct,yt,lt,vt,ae,dt,pt,st,N,Jt,Ft,y,nt,Lt,Vt,At,j,ot,Tt,Wt,Pt,F,ft,Rt,ie,ut,re,M,Ot,at,St,O,mt,ce,z,Et,Xt,Nt,de,q,Yt,K,ht,pe,I,fe,B,ue,P,qt,J,bt,me,gt,he,x,Dt,it,Ht,be,Mt,Zt,V,_t,ge,It,_e,wt,we,W,G,xe,xt,te,X,ee,L,Y,S,Bt,$e,Z,v,Gt;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format
|
||||
<code><span class="txt-success">OPERAND</span> <span class="txt-danger">OPERATOR</span> <span class="txt-success">OPERAND</span></code>, where:`,o=s(),i=e("ul"),f=e("li"),f.innerHTML=`<code class="txt-success">OPERAND</code> - could be any of the above field literal, string (single
|
||||
or double quoted), number, null, true, false`,h=s(),r=e("li"),b=e("code"),b.textContent="OPERATOR",$=_(` - is one of:
|
||||
`),C=e("br"),g=s(),p=e("ul"),tt=e("li"),kt=e("code"),kt.textContent="=",zt=s(),E=e("span"),E.textContent="Equal",Kt=s(),H=e("li"),rt=e("code"),rt.textContent="!=",R=s(),et=e("span"),et.textContent="NOT equal",ne=s(),Q=e("li"),U=e("code"),U.textContent=">",oe=s(),ct=e("span"),ct.textContent="Greater than",yt=s(),lt=e("li"),vt=e("code"),vt.textContent=">=",ae=s(),dt=e("span"),dt.textContent="Greater than or equal",pt=s(),st=e("li"),N=e("code"),N.textContent="<",Jt=s(),Ft=e("span"),Ft.textContent="Less than",y=s(),nt=e("li"),Lt=e("code"),Lt.textContent="<=",Vt=s(),At=e("span"),At.textContent="Less than or equal",j=s(),ot=e("li"),Tt=e("code"),Tt.textContent="~",Wt=s(),Pt=e("span"),Pt.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
|
||||
wildcard match)`,F=s(),ft=e("li"),Rt=e("code"),Rt.textContent="!~",ie=s(),ut=e("span"),ut.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
|
||||
wildcard match)`,re=s(),M=e("li"),Ot=e("code"),Ot.textContent="?=",at=s(),St=e("em"),St.textContent="Any/At least one of",O=s(),mt=e("span"),mt.textContent="Equal",ce=s(),z=e("li"),Et=e("code"),Et.textContent="?!=",Xt=s(),Nt=e("em"),Nt.textContent="Any/At least one of",de=s(),q=e("span"),q.textContent="NOT equal",Yt=s(),K=e("li"),ht=e("code"),ht.textContent="?>",pe=s(),I=e("em"),I.textContent="Any/At least one of",fe=s(),B=e("span"),B.textContent="Greater than",ue=s(),P=e("li"),qt=e("code"),qt.textContent="?>=",J=s(),bt=e("em"),bt.textContent="Any/At least one of",me=s(),gt=e("span"),gt.textContent="Greater than or equal",he=s(),x=e("li"),Dt=e("code"),Dt.textContent="?<",it=s(),Ht=e("em"),Ht.textContent="Any/At least one of",be=s(),Mt=e("span"),Mt.textContent="Less than",Zt=s(),V=e("li"),_t=e("code"),_t.textContent="?<=",ge=s(),It=e("em"),It.textContent="Any/At least one of",_e=s(),wt=e("span"),wt.textContent="Less than or equal",we=s(),W=e("li"),G=e("code"),G.textContent="?~",xe=s(),xt=e("em"),xt.textContent="Any/At least one of",te=s(),X=e("span"),X.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
|
||||
wildcard match)`,ee=s(),L=e("li"),Y=e("code"),Y.textContent="?!~",S=s(),Bt=e("em"),Bt.textContent="Any/At least one of",$e=s(),Z=e("span"),Z.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
|
||||
wildcard match)`,v=s(),Gt=e("p"),Gt.innerHTML=`To group and combine several expressions you could use brackets
|
||||
<code>(...)</code>, <code>&&</code> (AND) and <code>||</code> (OR) tokens.`,a(b,"class","txt-danger"),a(kt,"class","filter-op svelte-1w7s5nw"),a(E,"class","txt"),a(rt,"class","filter-op svelte-1w7s5nw"),a(et,"class","txt"),a(U,"class","filter-op svelte-1w7s5nw"),a(ct,"class","txt"),a(vt,"class","filter-op svelte-1w7s5nw"),a(dt,"class","txt"),a(N,"class","filter-op svelte-1w7s5nw"),a(Ft,"class","txt"),a(Lt,"class","filter-op svelte-1w7s5nw"),a(At,"class","txt"),a(Tt,"class","filter-op svelte-1w7s5nw"),a(Pt,"class","txt"),a(Rt,"class","filter-op svelte-1w7s5nw"),a(ut,"class","txt"),a(Ot,"class","filter-op svelte-1w7s5nw"),a(St,"class","txt-hint"),a(mt,"class","txt"),a(Et,"class","filter-op svelte-1w7s5nw"),a(Nt,"class","txt-hint"),a(q,"class","txt"),a(ht,"class","filter-op svelte-1w7s5nw"),a(I,"class","txt-hint"),a(B,"class","txt"),a(qt,"class","filter-op svelte-1w7s5nw"),a(bt,"class","txt-hint"),a(gt,"class","txt"),a(Dt,"class","filter-op svelte-1w7s5nw"),a(Ht,"class","txt-hint"),a(Mt,"class","txt"),a(_t,"class","filter-op svelte-1w7s5nw"),a(It,"class","txt-hint"),a(wt,"class","txt"),a(G,"class","filter-op svelte-1w7s5nw"),a(xt,"class","txt-hint"),a(X,"class","txt"),a(Y,"class","filter-op svelte-1w7s5nw"),a(Bt,"class","txt-hint"),a(Z,"class","txt")},m(A,k){u(A,n,k),u(A,o,k),u(A,i,k),t(i,f),t(i,h),t(i,r),t(r,b),t(r,$),t(r,C),t(r,g),t(r,p),t(p,tt),t(tt,kt),t(tt,zt),t(tt,E),t(p,Kt),t(p,H),t(H,rt),t(H,R),t(H,et),t(p,ne),t(p,Q),t(Q,U),t(Q,oe),t(Q,ct),t(p,yt),t(p,lt),t(lt,vt),t(lt,ae),t(lt,dt),t(p,pt),t(p,st),t(st,N),t(st,Jt),t(st,Ft),t(p,y),t(p,nt),t(nt,Lt),t(nt,Vt),t(nt,At),t(p,j),t(p,ot),t(ot,Tt),t(ot,Wt),t(ot,Pt),t(p,F),t(p,ft),t(ft,Rt),t(ft,ie),t(ft,ut),t(p,re),t(p,M),t(M,Ot),t(M,at),t(M,St),t(M,O),t(M,mt),t(p,ce),t(p,z),t(z,Et),t(z,Xt),t(z,Nt),t(z,de),t(z,q),t(p,Yt),t(p,K),t(K,ht),t(K,pe),t(K,I),t(K,fe),t(K,B),t(p,ue),t(p,P),t(P,qt),t(P,J),t(P,bt),t(P,me),t(P,gt),t(p,he),t(p,x),t(x,Dt),t(x,it),t(x,Ht),t(x,be),t(x,Mt),t(p,Zt),t(p,V),t(V,_t),t(V,ge),t(V,It),t(V,_e),t(V,wt),t(p,we),t(p,W),t(W,G),t(W,xe),t(W,xt),t(W,te),t(W,X),t(p,ee),t(p,L),t(L,Y),t(L,S),t(L,Bt),t(L,$e),t(L,Z),u(A,v,k),u(A,Gt,k)},d(A){A&&(m(n),m(o),m(i),m(v),m(Gt))}}}function ml(d){let n,o,i,f,h;function r(g,p){return g[0]?ul:fl}let b=r(d),$=b(d),C=d[0]&&je();return{c(){n=e("button"),$.c(),o=s(),C&&C.c(),i=sl(),a(n,"class","btn btn-sm btn-secondary m-t-10")},m(g,p){u(g,n,p),$.m(n,null),u(g,o,p),C&&C.m(g,p),u(g,i,p),f||(h=ll(n,"click",d[1]),f=!0)},p(g,[p]){b!==(b=r(g))&&($.d(1),$=b(g),$&&($.c(),$.m(n,null))),g[0]?C||(C=je(),C.c(),C.m(i.parentNode,i)):C&&(C.d(1),C=null)},i:Qe,o:Qe,d(g){g&&(m(n),m(o),m(i)),$.d(),C&&C.d(g),f=!1,h()}}}function hl(d,n,o){let i=!1;function f(){o(0,i=!i)}return[i,f]}class bl extends Ze{constructor(n){super(),tl(this,n,hl,ml,el,{})}}function ze(d,n,o){const i=d.slice();return i[7]=n[o],i}function Ke(d,n,o){const i=d.slice();return i[7]=n[o],i}function Je(d,n,o){const i=d.slice();return i[12]=n[o],i[14]=o,i}function Ve(d){let n;return{c(){n=e("p"),n.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",a(n,"class","txt-hint txt-sm txt-right")},m(o,i){u(o,n,i)},d(o){o&&m(n)}}}function We(d){let n,o=d[12]+"",i,f=d[14]<d[4].length-1?", ":"",h;return{c(){n=e("code"),i=_(o),h=_(f)},m(r,b){u(r,n,b),t(n,i),u(r,h,b)},p(r,b){b&16&&o!==(o=r[12]+"")&&ke(i,o),b&16&&f!==(f=r[14]<r[4].length-1?", ":"")&&ke(h,f)},d(r){r&&(m(n),m(h))}}}function Xe(d,n){let o,i,f;function h(){return n[6](n[7])}return{key:d,first:null,c(){o=e("button"),o.textContent=`${n[7].code} `,a(o,"type","button"),a(o,"class","tab-item"),Le(o,"active",n[2]===n[7].code),this.first=o},m(r,b){u(r,o,b),i||(f=ll(o,"click",h),i=!0)},p(r,b){n=r,b&36&&Le(o,"active",n[2]===n[7].code)},d(r){r&&m(o),i=!1,f()}}}function Ye(d,n){let o,i,f,h;return i=new Fe({props:{content:n[7].body}}),{key:d,first:null,c(){o=e("div"),Qt(i.$$.fragment),f=s(),a(o,"class","tab-item"),Le(o,"active",n[2]===n[7].code),this.first=o},m(r,b){u(r,o,b),Ut(i,o,null),t(o,f),h=!0},p(r,b){n=r,(!h||b&36)&&Le(o,"active",n[2]===n[7].code)},i(r){h||($t(i.$$.fragment,r),h=!0)},o(r){Ct(i.$$.fragment,r),h=!1},d(r){r&&m(o),jt(i)}}}function gl(d){var Pe,Re,Oe,Se,Ee,Ne;let n,o,i=d[0].name+"",f,h,r,b,$,C,g,p=d[0].name+"",tt,kt,zt,E,Kt,H,rt,R,et,ne,Q,U,oe,ct,yt=d[0].name+"",lt,vt,ae,dt,pt,st,N,Jt,Ft,y,nt,Lt,Vt,At,j,ot,Tt,Wt,Pt,F,ft,Rt,ie,ut,re,M,Ot,at,St,O,mt,ce,z,Et,Xt,Nt,de,q,Yt,K,ht,pe,I,fe,B,ue,P,qt,J,bt,me,gt,he,x,Dt,it,Ht,be,Mt,Zt,V,_t,ge,It,_e,wt,we,W,G,xe,xt,te,X,ee,L,Y,S=[],Bt=new Map,$e,Z,v=[],Gt=new Map,A;E=new dl({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${d[3]}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
const resultList = await pb.collection('${(Pe=d[0])==null?void 0:Pe.name}').getList(1, 50, {
|
||||
filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2',
|
||||
});
|
||||
|
||||
// you can also fetch all records at once via getFullList
|
||||
const records = await pb.collection('${(Re=d[0])==null?void 0:Re.name}').getFullList({
|
||||
sort: '-created',
|
||||
});
|
||||
|
||||
// or fetch only the first record that matches the specified filter
|
||||
const record = await pb.collection('${(Oe=d[0])==null?void 0:Oe.name}').getFirstListItem('someField="test"', {
|
||||
expand: 'relField1,relField2.subRelField',
|
||||
});
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${d[3]}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
final resultList = await pb.collection('${(Se=d[0])==null?void 0:Se.name}').getList(
|
||||
page: 1,
|
||||
perPage: 50,
|
||||
filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2',
|
||||
);
|
||||
|
||||
// you can also fetch all records at once via getFullList
|
||||
final records = await pb.collection('${(Ee=d[0])==null?void 0:Ee.name}').getFullList(
|
||||
sort: '-created',
|
||||
);
|
||||
|
||||
// or fetch only the first record that matches the specified filter
|
||||
final record = await pb.collection('${(Ne=d[0])==null?void 0:Ne.name}').getFirstListItem(
|
||||
'someField="test"',
|
||||
expand: 'relField1,relField2.subRelField',
|
||||
);
|
||||
`}});let k=d[1]&&Ve();at=new Fe({props:{content:`
|
||||
// DESC by created and ASC by id
|
||||
?sort=-created,id
|
||||
`}});let le=se(d[4]),T=[];for(let l=0;l<le.length;l+=1)T[l]=We(Je(d,le,l));B=new Fe({props:{content:`
|
||||
?filter=(id='abc' && created>'2022-01-01')
|
||||
`}}),P=new bl({}),it=new Fe({props:{content:"?expand=relField1,relField2.subRelField"}}),G=new pl({});let ye=se(d[5]);const Ae=l=>l[7].code;for(let l=0;l<ye.length;l+=1){let c=Ke(d,ye,l),w=Ae(c);Bt.set(w,S[l]=Xe(w,c))}let Ce=se(d[5]);const Te=l=>l[7].code;for(let l=0;l<Ce.length;l+=1){let c=ze(d,Ce,l),w=Te(c);Gt.set(w,v[l]=Ye(w,c))}return{c(){n=e("h3"),o=_("List/Search ("),f=_(i),h=_(")"),r=s(),b=e("div"),$=e("p"),C=_("Fetch a paginated "),g=e("strong"),tt=_(p),kt=_(" records list, supporting sorting and filtering."),zt=s(),Qt(E.$$.fragment),Kt=s(),H=e("h6"),H.textContent="API details",rt=s(),R=e("div"),et=e("strong"),et.textContent="GET",ne=s(),Q=e("div"),U=e("p"),oe=_("/api/collections/"),ct=e("strong"),lt=_(yt),vt=_("/records"),ae=s(),k&&k.c(),dt=s(),pt=e("div"),pt.textContent="Query parameters",st=s(),N=e("table"),Jt=e("thead"),Jt.innerHTML='<tr><th>Param</th> <th>Type</th> <th width="60%">Description</th></tr>',Ft=s(),y=e("tbody"),nt=e("tr"),nt.innerHTML='<td>page</td> <td><span class="label">Number</span></td> <td>The page (aka. offset) of the paginated list (default to 1).</td>',Lt=s(),Vt=e("tr"),Vt.innerHTML='<td>perPage</td> <td><span class="label">Number</span></td> <td>Specify the max returned records per page (default to 30).</td>',At=s(),j=e("tr"),ot=e("td"),ot.textContent="sort",Tt=s(),Wt=e("td"),Wt.innerHTML='<span class="label">String</span>',Pt=s(),F=e("td"),ft=_("Specify the records order attribute(s). "),Rt=e("br"),ie=_(`
|
||||
Add `),ut=e("code"),ut.textContent="-",re=_(" / "),M=e("code"),M.textContent="+",Ot=_(` (default) in front of the attribute for DESC / ASC order.
|
||||
Ex.:
|
||||
`),Qt(at.$$.fragment),St=s(),O=e("p"),mt=e("strong"),mt.textContent="Supported record sort fields:",ce=s(),z=e("br"),Et=s(),Xt=e("code"),Xt.textContent="@random",Nt=_(`,
|
||||
`);for(let l=0;l<T.length;l+=1)T[l].c();de=s(),q=e("tr"),Yt=e("td"),Yt.textContent="filter",K=s(),ht=e("td"),ht.innerHTML='<span class="label">String</span>',pe=s(),I=e("td"),fe=_(`Filter the returned records. Ex.:
|
||||
`),Qt(B.$$.fragment),ue=s(),Qt(P.$$.fragment),qt=s(),J=e("tr"),bt=e("td"),bt.textContent="expand",me=s(),gt=e("td"),gt.innerHTML='<span class="label">String</span>',he=s(),x=e("td"),Dt=_(`Auto expand record relations. Ex.:
|
||||
`),Qt(it.$$.fragment),Ht=_(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),be=e("br"),Mt=_(`
|
||||
The expanded relations will be appended to each individual record under the
|
||||
`),Zt=e("code"),Zt.textContent="expand",V=_(" property (eg. "),_t=e("code"),_t.textContent='"expand": {"relField1": {...}, ...}',ge=_(`).
|
||||
`),It=e("br"),_e=_(`
|
||||
Only the relations to which the request user has permissions to `),wt=e("strong"),wt.textContent="view",we=_(" will be expanded."),W=s(),Qt(G.$$.fragment),xe=s(),xt=e("tr"),xt.innerHTML=`<td id="query-page">skipTotal</td> <td><span class="label">Boolean</span></td> <td>If it is set the total counts query will be skipped and the response fields
|
||||
<code>totalItems</code> and <code>totalPages</code> will have <code>-1</code> value.
|
||||
<br/>
|
||||
This could drastically speed up the search queries when the total counters are not needed or cursor
|
||||
based pagination is used.
|
||||
<br/>
|
||||
For optimization purposes, it is set by default for the
|
||||
<code>getFirstListItem()</code>
|
||||
and
|
||||
<code>getFullList()</code> SDKs methods.</td>`,te=s(),X=e("div"),X.textContent="Responses",ee=s(),L=e("div"),Y=e("div");for(let l=0;l<S.length;l+=1)S[l].c();$e=s(),Z=e("div");for(let l=0;l<v.length;l+=1)v[l].c();a(n,"class","m-b-sm"),a(b,"class","content txt-lg m-b-sm"),a(H,"class","m-b-xs"),a(et,"class","label label-primary"),a(Q,"class","content"),a(R,"class","alert alert-info"),a(pt,"class","section-title"),a(N,"class","table-compact table-border m-b-base"),a(X,"class","section-title"),a(Y,"class","tabs-header compact combined left"),a(Z,"class","tabs-content"),a(L,"class","tabs")},m(l,c){u(l,n,c),t(n,o),t(n,f),t(n,h),u(l,r,c),u(l,b,c),t(b,$),t($,C),t($,g),t(g,tt),t($,kt),u(l,zt,c),Ut(E,l,c),u(l,Kt,c),u(l,H,c),u(l,rt,c),u(l,R,c),t(R,et),t(R,ne),t(R,Q),t(Q,U),t(U,oe),t(U,ct),t(ct,lt),t(U,vt),t(R,ae),k&&k.m(R,null),u(l,dt,c),u(l,pt,c),u(l,st,c),u(l,N,c),t(N,Jt),t(N,Ft),t(N,y),t(y,nt),t(y,Lt),t(y,Vt),t(y,At),t(y,j),t(j,ot),t(j,Tt),t(j,Wt),t(j,Pt),t(j,F),t(F,ft),t(F,Rt),t(F,ie),t(F,ut),t(F,re),t(F,M),t(F,Ot),Ut(at,F,null),t(F,St),t(F,O),t(O,mt),t(O,ce),t(O,z),t(O,Et),t(O,Xt),t(O,Nt);for(let w=0;w<T.length;w+=1)T[w]&&T[w].m(O,null);t(y,de),t(y,q),t(q,Yt),t(q,K),t(q,ht),t(q,pe),t(q,I),t(I,fe),Ut(B,I,null),t(I,ue),Ut(P,I,null),t(y,qt),t(y,J),t(J,bt),t(J,me),t(J,gt),t(J,he),t(J,x),t(x,Dt),Ut(it,x,null),t(x,Ht),t(x,be),t(x,Mt),t(x,Zt),t(x,V),t(x,_t),t(x,ge),t(x,It),t(x,_e),t(x,wt),t(x,we),t(y,W),Ut(G,y,null),t(y,xe),t(y,xt),u(l,te,c),u(l,X,c),u(l,ee,c),u(l,L,c),t(L,Y);for(let w=0;w<S.length;w+=1)S[w]&&S[w].m(Y,null);t(L,$e),t(L,Z);for(let w=0;w<v.length;w+=1)v[w]&&v[w].m(Z,null);A=!0},p(l,[c]){var qe,De,He,Me,Ie,Be;(!A||c&1)&&i!==(i=l[0].name+"")&&ke(f,i),(!A||c&1)&&p!==(p=l[0].name+"")&&ke(tt,p);const w={};if(c&9&&(w.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${l[3]}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
const resultList = await pb.collection('${(qe=l[0])==null?void 0:qe.name}').getList(1, 50, {
|
||||
filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2',
|
||||
});
|
||||
|
||||
// you can also fetch all records at once via getFullList
|
||||
const records = await pb.collection('${(De=l[0])==null?void 0:De.name}').getFullList({
|
||||
sort: '-created',
|
||||
});
|
||||
|
||||
// or fetch only the first record that matches the specified filter
|
||||
const record = await pb.collection('${(He=l[0])==null?void 0:He.name}').getFirstListItem('someField="test"', {
|
||||
expand: 'relField1,relField2.subRelField',
|
||||
});
|
||||
`),c&9&&(w.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final pb = PocketBase('${l[3]}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
final resultList = await pb.collection('${(Me=l[0])==null?void 0:Me.name}').getList(
|
||||
page: 1,
|
||||
perPage: 50,
|
||||
filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2',
|
||||
);
|
||||
|
||||
// you can also fetch all records at once via getFullList
|
||||
final records = await pb.collection('${(Ie=l[0])==null?void 0:Ie.name}').getFullList(
|
||||
sort: '-created',
|
||||
);
|
||||
|
||||
// or fetch only the first record that matches the specified filter
|
||||
final record = await pb.collection('${(Be=l[0])==null?void 0:Be.name}').getFirstListItem(
|
||||
'someField="test"',
|
||||
expand: 'relField1,relField2.subRelField',
|
||||
);
|
||||
`),E.$set(w),(!A||c&1)&&yt!==(yt=l[0].name+"")&&ke(lt,yt),l[1]?k||(k=Ve(),k.c(),k.m(R,null)):k&&(k.d(1),k=null),c&16){le=se(l[4]);let D;for(D=0;D<le.length;D+=1){const Ge=Je(l,le,D);T[D]?T[D].p(Ge,c):(T[D]=We(Ge),T[D].c(),T[D].m(O,null))}for(;D<T.length;D+=1)T[D].d(1);T.length=le.length}c&36&&(ye=se(l[5]),S=Ue(S,c,Ae,1,l,ye,Bt,Y,nl,Xe,null,Ke)),c&36&&(Ce=se(l[5]),ol(),v=Ue(v,c,Te,1,l,Ce,Gt,Z,al,Ye,null,ze),il())},i(l){if(!A){$t(E.$$.fragment,l),$t(at.$$.fragment,l),$t(B.$$.fragment,l),$t(P.$$.fragment,l),$t(it.$$.fragment,l),$t(G.$$.fragment,l);for(let c=0;c<Ce.length;c+=1)$t(v[c]);A=!0}},o(l){Ct(E.$$.fragment,l),Ct(at.$$.fragment,l),Ct(B.$$.fragment,l),Ct(P.$$.fragment,l),Ct(it.$$.fragment,l),Ct(G.$$.fragment,l);for(let c=0;c<v.length;c+=1)Ct(v[c]);A=!1},d(l){l&&(m(n),m(r),m(b),m(zt),m(Kt),m(H),m(rt),m(R),m(dt),m(pt),m(st),m(N),m(te),m(X),m(ee),m(L)),jt(E,l),k&&k.d(),jt(at),rl(T,l),jt(B),jt(P),jt(it),jt(G);for(let c=0;c<S.length;c+=1)S[c].d();for(let c=0;c<v.length;c+=1)v[c].d()}}}function _l(d,n,o){let i,f,h,{collection:r}=n,b=200,$=[];const C=g=>o(2,b=g.code);return d.$$set=g=>{"collection"in g&&o(0,r=g.collection)},d.$$.update=()=>{d.$$.dirty&1&&o(4,i=ve.getAllCollectionIdentifiers(r)),d.$$.dirty&1&&o(1,f=(r==null?void 0:r.listRule)===null),d.$$.dirty&3&&r!=null&&r.id&&($.push({code:200,body:JSON.stringify({page:1,perPage:30,totalPages:1,totalItems:2,items:[ve.dummyCollectionRecord(r),ve.dummyCollectionRecord(r)]},null,2)}),$.push({code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Something went wrong while processing your request. Invalid filter.",
|
||||
"data": {}
|
||||
}
|
||||
`}),f&&$.push({code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "Only admins can access this action.",
|
||||
"data": {}
|
||||
}
|
||||
`}))},o(3,h=ve.getApiExampleUrl(cl.baseUrl)),[r,f,b,h,i,$,C]}class Cl extends Ze{constructor(n){super(),tl(this,n,_l,gl,el,{collection:0})}}export{Cl as default};
|
@ -1,4 +1,4 @@
|
||||
import{S as ze,i as Qe,s as Ue,O as F,e as i,w as v,b as m,c as pe,f as b,g as c,h as a,m as ue,x as N,P as Oe,Q as je,k as Fe,R as Ne,n as Ge,t as G,a as K,o as d,d as me,C as Ke,p as Je,r as J,u as Ve,N as Xe}from"./index-4c7ca1d0.js";import{S as Ye}from"./SdkTabs-5ff67765.js";import{F as Ze}from"./FieldsQueryParam-9cc13943.js";function De(o,l,s){const n=o.slice();return n[5]=l[s],n}function He(o,l,s){const n=o.slice();return n[5]=l[s],n}function Re(o,l){let s,n=l[5].code+"",f,_,r,u;function h(){return l[4](l[5])}return{key:o,first:null,c(){s=i("button"),f=v(n),_=m(),b(s,"class","tab-item"),J(s,"active",l[1]===l[5].code),this.first=s},m(w,y){c(w,s,y),a(s,f),a(s,_),r||(u=Ve(s,"click",h),r=!0)},p(w,y){l=w,y&4&&n!==(n=l[5].code+"")&&N(f,n),y&6&&J(s,"active",l[1]===l[5].code)},d(w){w&&d(s),r=!1,u()}}}function We(o,l){let s,n,f,_;return n=new Xe({props:{content:l[5].body}}),{key:o,first:null,c(){s=i("div"),pe(n.$$.fragment),f=m(),b(s,"class","tab-item"),J(s,"active",l[1]===l[5].code),this.first=s},m(r,u){c(r,s,u),ue(n,s,null),a(s,f),_=!0},p(r,u){l=r;const h={};u&4&&(h.content=l[5].body),n.$set(h),(!_||u&6)&&J(s,"active",l[1]===l[5].code)},i(r){_||(G(n.$$.fragment,r),_=!0)},o(r){K(n.$$.fragment,r),_=!1},d(r){r&&d(s),me(n)}}}function xe(o){var Ce,Se,Ee,Ie;let l,s,n=o[0].name+"",f,_,r,u,h,w,y,R=o[0].name+"",V,be,fe,X,Y,P,Z,I,x,$,W,he,z,T,_e,ee,Q=o[0].name+"",te,ke,le,ve,ge,U,se,B,ae,q,oe,L,ne,A,ie,$e,ce,E,de,M,re,C,O,g=[],we=new Map,ye,D,k=[],Pe=new Map,S;P=new Ye({props:{js:`
|
||||
import{S as ze,i as Qe,s as Ue,O as F,e as i,w as v,b as m,c as pe,f as b,g as c,h as a,m as ue,x as N,P as Oe,Q as je,k as Fe,R as Ne,n as Ge,t as G,a as K,o as d,d as me,C as Ke,p as Je,r as J,u as Ve,N as Xe}from"./index-4edb1c99.js";import{S as Ye}from"./SdkTabs-3741b181.js";import{F as Ze}from"./FieldsQueryParam-3e41088d.js";function De(o,l,s){const n=o.slice();return n[5]=l[s],n}function He(o,l,s){const n=o.slice();return n[5]=l[s],n}function Re(o,l){let s,n=l[5].code+"",f,_,r,u;function h(){return l[4](l[5])}return{key:o,first:null,c(){s=i("button"),f=v(n),_=m(),b(s,"class","tab-item"),J(s,"active",l[1]===l[5].code),this.first=s},m(w,y){c(w,s,y),a(s,f),a(s,_),r||(u=Ve(s,"click",h),r=!0)},p(w,y){l=w,y&4&&n!==(n=l[5].code+"")&&N(f,n),y&6&&J(s,"active",l[1]===l[5].code)},d(w){w&&d(s),r=!1,u()}}}function We(o,l){let s,n,f,_;return n=new Xe({props:{content:l[5].body}}),{key:o,first:null,c(){s=i("div"),pe(n.$$.fragment),f=m(),b(s,"class","tab-item"),J(s,"active",l[1]===l[5].code),this.first=s},m(r,u){c(r,s,u),ue(n,s,null),a(s,f),_=!0},p(r,u){l=r;const h={};u&4&&(h.content=l[5].body),n.$set(h),(!_||u&6)&&J(s,"active",l[1]===l[5].code)},i(r){_||(G(n.$$.fragment,r),_=!0)},o(r){K(n.$$.fragment,r),_=!1},d(r){r&&d(s),me(n)}}}function xe(o){var Ce,Se,Ee,Ie;let l,s,n=o[0].name+"",f,_,r,u,h,w,y,R=o[0].name+"",V,be,fe,X,Y,P,Z,I,x,$,W,he,z,T,_e,ee,Q=o[0].name+"",te,ke,le,ve,ge,U,se,B,ae,q,oe,L,ne,A,ie,$e,ce,E,de,M,re,C,O,g=[],we=new Map,ye,D,k=[],Pe=new Map,S;P=new Ye({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${o[3]}');
|
@ -1,2 +1,2 @@
|
||||
import{S as E,i as G,s as I,F as K,c as R,m as A,t as B,a as N,d as T,C as M,q as J,e as _,w as P,b as k,f,r as L,g as b,h as c,u as j,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as q}from"./index-4c7ca1d0.js";function y(i){let e,n,s;return{c(){e=P("for "),n=_("strong"),s=P(i[3]),f(n,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,n,t),c(n,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&(w(e),w(n))}}}function x(i){let e,n,s,l,t,u,p,d;return{c(){e=_("label"),n=P("New password"),l=k(),t=_("input"),f(e,"for",s=i[8]),f(t,"type","password"),f(t,"id",u=i[8]),t.required=!0,t.autofocus=!0},m(r,a){b(r,e,a),c(e,n),b(r,l,a),b(r,t,a),q(t,i[0]),t.focus(),p||(d=j(t,"input",i[6]),p=!0)},p(r,a){a&256&&s!==(s=r[8])&&f(e,"for",s),a&256&&u!==(u=r[8])&&f(t,"id",u),a&1&&t.value!==r[0]&&q(t,r[0])},d(r){r&&(w(e),w(l),w(t)),p=!1,d()}}}function ee(i){let e,n,s,l,t,u,p,d;return{c(){e=_("label"),n=P("New password confirm"),l=k(),t=_("input"),f(e,"for",s=i[8]),f(t,"type","password"),f(t,"id",u=i[8]),t.required=!0},m(r,a){b(r,e,a),c(e,n),b(r,l,a),b(r,t,a),q(t,i[1]),p||(d=j(t,"input",i[7]),p=!0)},p(r,a){a&256&&s!==(s=r[8])&&f(e,"for",s),a&256&&u!==(u=r[8])&&f(t,"id",u),a&2&&t.value!==r[1]&&q(t,r[1])},d(r){r&&(w(e),w(l),w(t)),p=!1,d()}}}function te(i){let e,n,s,l,t,u,p,d,r,a,g,S,C,v,h,F,z,m=i[3]&&y(i);return u=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:o})=>({8:o}),({uniqueId:o})=>o?256:0]},$$scope:{ctx:i}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:o})=>({8:o}),({uniqueId:o})=>o?256:0]},$$scope:{ctx:i}}}),{c(){e=_("form"),n=_("div"),s=_("h4"),l=P(`Reset your admin password
|
||||
import{S as E,i as G,s as I,F as K,c as R,m as A,t as B,a as N,d as T,C as M,q as J,e as _,w as P,b as k,f,r as L,g as b,h as c,u as j,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as q}from"./index-4edb1c99.js";function y(i){let e,n,s;return{c(){e=P("for "),n=_("strong"),s=P(i[3]),f(n,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,n,t),c(n,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&(w(e),w(n))}}}function x(i){let e,n,s,l,t,u,p,d;return{c(){e=_("label"),n=P("New password"),l=k(),t=_("input"),f(e,"for",s=i[8]),f(t,"type","password"),f(t,"id",u=i[8]),t.required=!0,t.autofocus=!0},m(r,a){b(r,e,a),c(e,n),b(r,l,a),b(r,t,a),q(t,i[0]),t.focus(),p||(d=j(t,"input",i[6]),p=!0)},p(r,a){a&256&&s!==(s=r[8])&&f(e,"for",s),a&256&&u!==(u=r[8])&&f(t,"id",u),a&1&&t.value!==r[0]&&q(t,r[0])},d(r){r&&(w(e),w(l),w(t)),p=!1,d()}}}function ee(i){let e,n,s,l,t,u,p,d;return{c(){e=_("label"),n=P("New password confirm"),l=k(),t=_("input"),f(e,"for",s=i[8]),f(t,"type","password"),f(t,"id",u=i[8]),t.required=!0},m(r,a){b(r,e,a),c(e,n),b(r,l,a),b(r,t,a),q(t,i[1]),p||(d=j(t,"input",i[7]),p=!0)},p(r,a){a&256&&s!==(s=r[8])&&f(e,"for",s),a&256&&u!==(u=r[8])&&f(t,"id",u),a&2&&t.value!==r[1]&&q(t,r[1])},d(r){r&&(w(e),w(l),w(t)),p=!1,d()}}}function te(i){let e,n,s,l,t,u,p,d,r,a,g,S,C,v,h,F,z,m=i[3]&&y(i);return u=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:o})=>({8:o}),({uniqueId:o})=>o?256:0]},$$scope:{ctx:i}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:o})=>({8:o}),({uniqueId:o})=>o?256:0]},$$scope:{ctx:i}}}),{c(){e=_("form"),n=_("div"),s=_("h4"),l=P(`Reset your admin password
|
||||
`),m&&m.c(),t=k(),R(u.$$.fragment),p=k(),R(d.$$.fragment),r=k(),a=_("button"),g=_("span"),g.textContent="Set new password",S=k(),C=_("div"),v=_("a"),v.textContent="Back to login",f(s,"class","m-b-xs"),f(n,"class","content txt-center m-b-sm"),f(g,"class","txt"),f(a,"type","submit"),f(a,"class","btn btn-lg btn-block"),a.disabled=i[2],L(a,"btn-loading",i[2]),f(e,"class","m-b-base"),f(v,"href","/login"),f(v,"class","link-hint"),f(C,"class","content txt-center")},m(o,$){b(o,e,$),c(e,n),c(n,s),c(s,l),m&&m.m(s,null),c(e,t),A(u,e,null),c(e,p),A(d,e,null),c(e,r),c(e,a),c(a,g),b(o,S,$),b(o,C,$),c(C,v),h=!0,F||(z=[j(e,"submit",O(i[4])),Q(U.call(null,v))],F=!0)},p(o,$){o[3]?m?m.p(o,$):(m=y(o),m.c(),m.m(s,null)):m&&(m.d(1),m=null);const D={};$&769&&(D.$$scope={dirty:$,ctx:o}),u.$set(D);const H={};$&770&&(H.$$scope={dirty:$,ctx:o}),d.$set(H),(!h||$&4)&&(a.disabled=o[2]),(!h||$&4)&&L(a,"btn-loading",o[2])},i(o){h||(B(u.$$.fragment,o),B(d.$$.fragment,o),h=!0)},o(o){N(u.$$.fragment,o),N(d.$$.fragment,o),h=!1},d(o){o&&(w(e),w(S),w(C)),m&&m.d(),T(u),T(d),F=!1,V(z)}}}function se(i){let e,n;return e=new K({props:{$$slots:{default:[te]},$$scope:{ctx:i}}}),{c(){R(e.$$.fragment)},m(s,l){A(e,s,l),n=!0},p(s,[l]){const t={};l&527&&(t.$$scope={dirty:l,ctx:s}),e.$set(t)},i(s){n||(B(e.$$.fragment,s),n=!0)},o(s){N(e.$$.fragment,s),n=!1},d(s){T(e,s)}}}function le(i,e,n){let s,{params:l}=e,t="",u="",p=!1;async function d(){if(!p){n(2,p=!0);try{await W.admins.confirmPasswordReset(l==null?void 0:l.token,t,u),X("Successfully set a new admin password."),Y("/")}catch(g){W.error(g)}n(2,p=!1)}}function r(){t=this.value,n(0,t)}function a(){u=this.value,n(1,u)}return i.$$set=g=>{"params"in g&&n(5,l=g.params)},i.$$.update=()=>{i.$$.dirty&32&&n(3,s=M.getJWTPayload(l==null?void 0:l.token).email||"")},[t,u,p,s,d,l,r,a]}class ae extends E{constructor(e){super(),G(this,e,le,se,I,{params:5})}}export{ae as default};
|
@ -1 +1 @@
|
||||
import{S as M,i as T,s as j,F as z,c as R,m as S,t as w,a as y,d as E,b as v,e as _,f as p,g,h as d,j as A,l as B,k as N,n as D,o as k,p as C,q as G,r as F,u as H,v as I,w as h,x as J,y as P,z as L}from"./index-4c7ca1d0.js";function K(u){let e,s,n,l,t,o,c,m,r,a,b,f;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:i})=>({5:i}),({uniqueId:i})=>i?32:0]},$$scope:{ctx:u}}}),{c(){e=_("form"),s=_("div"),s.innerHTML='<h4 class="m-b-xs">Forgotten admin password</h4> <p>Enter the email associated with your account and we’ll send you a recovery link:</p>',n=v(),R(l.$$.fragment),t=v(),o=_("button"),c=_("i"),m=v(),r=_("span"),r.textContent="Send recovery link",p(s,"class","content txt-center m-b-sm"),p(c,"class","ri-mail-send-line"),p(r,"class","txt"),p(o,"type","submit"),p(o,"class","btn btn-lg btn-block"),o.disabled=u[1],F(o,"btn-loading",u[1]),p(e,"class","m-b-base")},m(i,$){g(i,e,$),d(e,s),d(e,n),S(l,e,null),d(e,t),d(e,o),d(o,c),d(o,m),d(o,r),a=!0,b||(f=H(e,"submit",I(u[3])),b=!0)},p(i,$){const q={};$&97&&(q.$$scope={dirty:$,ctx:i}),l.$set(q),(!a||$&2)&&(o.disabled=i[1]),(!a||$&2)&&F(o,"btn-loading",i[1])},i(i){a||(w(l.$$.fragment,i),a=!0)},o(i){y(l.$$.fragment,i),a=!1},d(i){i&&k(e),E(l),b=!1,f()}}}function O(u){let e,s,n,l,t,o,c,m,r;return{c(){e=_("div"),s=_("div"),s.innerHTML='<i class="ri-checkbox-circle-line"></i>',n=v(),l=_("div"),t=_("p"),o=h("Check "),c=_("strong"),m=h(u[0]),r=h(" for the recovery link."),p(s,"class","icon"),p(c,"class","txt-nowrap"),p(l,"class","content"),p(e,"class","alert alert-success")},m(a,b){g(a,e,b),d(e,s),d(e,n),d(e,l),d(l,t),d(t,o),d(t,c),d(c,m),d(t,r)},p(a,b){b&1&&J(m,a[0])},i:P,o:P,d(a){a&&k(e)}}}function Q(u){let e,s,n,l,t,o,c,m;return{c(){e=_("label"),s=h("Email"),l=v(),t=_("input"),p(e,"for",n=u[5]),p(t,"type","email"),p(t,"id",o=u[5]),t.required=!0,t.autofocus=!0},m(r,a){g(r,e,a),d(e,s),g(r,l,a),g(r,t,a),L(t,u[0]),t.focus(),c||(m=H(t,"input",u[4]),c=!0)},p(r,a){a&32&&n!==(n=r[5])&&p(e,"for",n),a&32&&o!==(o=r[5])&&p(t,"id",o),a&1&&t.value!==r[0]&&L(t,r[0])},d(r){r&&(k(e),k(l),k(t)),c=!1,m()}}}function U(u){let e,s,n,l,t,o,c,m;const r=[O,K],a=[];function b(f,i){return f[2]?0:1}return e=b(u),s=a[e]=r[e](u),{c(){s.c(),n=v(),l=_("div"),t=_("a"),t.textContent="Back to login",p(t,"href","/login"),p(t,"class","link-hint"),p(l,"class","content txt-center")},m(f,i){a[e].m(f,i),g(f,n,i),g(f,l,i),d(l,t),o=!0,c||(m=A(B.call(null,t)),c=!0)},p(f,i){let $=e;e=b(f),e===$?a[e].p(f,i):(N(),y(a[$],1,1,()=>{a[$]=null}),D(),s=a[e],s?s.p(f,i):(s=a[e]=r[e](f),s.c()),w(s,1),s.m(n.parentNode,n))},i(f){o||(w(s),o=!0)},o(f){y(s),o=!1},d(f){f&&(k(n),k(l)),a[e].d(f),c=!1,m()}}}function V(u){let e,s;return e=new z({props:{$$slots:{default:[U]},$$scope:{ctx:u}}}),{c(){R(e.$$.fragment)},m(n,l){S(e,n,l),s=!0},p(n,[l]){const t={};l&71&&(t.$$scope={dirty:l,ctx:n}),e.$set(t)},i(n){s||(w(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function W(u,e,s){let n="",l=!1,t=!1;async function o(){if(!l){s(1,l=!0);try{await C.admins.requestPasswordReset(n),s(2,t=!0)}catch(m){C.error(m)}s(1,l=!1)}}function c(){n=this.value,s(0,n)}return[n,l,t,o,c]}class Y extends M{constructor(e){super(),T(this,e,W,V,j,{})}}export{Y as default};
|
||||
import{S as M,i as T,s as j,F as z,c as R,m as S,t as w,a as y,d as E,b as v,e as _,f as p,g,h as d,j as A,l as B,k as N,n as D,o as k,p as C,q as G,r as F,u as H,v as I,w as h,x as J,y as P,z as L}from"./index-4edb1c99.js";function K(u){let e,s,n,l,t,o,c,m,r,a,b,f;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:i})=>({5:i}),({uniqueId:i})=>i?32:0]},$$scope:{ctx:u}}}),{c(){e=_("form"),s=_("div"),s.innerHTML='<h4 class="m-b-xs">Forgotten admin password</h4> <p>Enter the email associated with your account and we’ll send you a recovery link:</p>',n=v(),R(l.$$.fragment),t=v(),o=_("button"),c=_("i"),m=v(),r=_("span"),r.textContent="Send recovery link",p(s,"class","content txt-center m-b-sm"),p(c,"class","ri-mail-send-line"),p(r,"class","txt"),p(o,"type","submit"),p(o,"class","btn btn-lg btn-block"),o.disabled=u[1],F(o,"btn-loading",u[1]),p(e,"class","m-b-base")},m(i,$){g(i,e,$),d(e,s),d(e,n),S(l,e,null),d(e,t),d(e,o),d(o,c),d(o,m),d(o,r),a=!0,b||(f=H(e,"submit",I(u[3])),b=!0)},p(i,$){const q={};$&97&&(q.$$scope={dirty:$,ctx:i}),l.$set(q),(!a||$&2)&&(o.disabled=i[1]),(!a||$&2)&&F(o,"btn-loading",i[1])},i(i){a||(w(l.$$.fragment,i),a=!0)},o(i){y(l.$$.fragment,i),a=!1},d(i){i&&k(e),E(l),b=!1,f()}}}function O(u){let e,s,n,l,t,o,c,m,r;return{c(){e=_("div"),s=_("div"),s.innerHTML='<i class="ri-checkbox-circle-line"></i>',n=v(),l=_("div"),t=_("p"),o=h("Check "),c=_("strong"),m=h(u[0]),r=h(" for the recovery link."),p(s,"class","icon"),p(c,"class","txt-nowrap"),p(l,"class","content"),p(e,"class","alert alert-success")},m(a,b){g(a,e,b),d(e,s),d(e,n),d(e,l),d(l,t),d(t,o),d(t,c),d(c,m),d(t,r)},p(a,b){b&1&&J(m,a[0])},i:P,o:P,d(a){a&&k(e)}}}function Q(u){let e,s,n,l,t,o,c,m;return{c(){e=_("label"),s=h("Email"),l=v(),t=_("input"),p(e,"for",n=u[5]),p(t,"type","email"),p(t,"id",o=u[5]),t.required=!0,t.autofocus=!0},m(r,a){g(r,e,a),d(e,s),g(r,l,a),g(r,t,a),L(t,u[0]),t.focus(),c||(m=H(t,"input",u[4]),c=!0)},p(r,a){a&32&&n!==(n=r[5])&&p(e,"for",n),a&32&&o!==(o=r[5])&&p(t,"id",o),a&1&&t.value!==r[0]&&L(t,r[0])},d(r){r&&(k(e),k(l),k(t)),c=!1,m()}}}function U(u){let e,s,n,l,t,o,c,m;const r=[O,K],a=[];function b(f,i){return f[2]?0:1}return e=b(u),s=a[e]=r[e](u),{c(){s.c(),n=v(),l=_("div"),t=_("a"),t.textContent="Back to login",p(t,"href","/login"),p(t,"class","link-hint"),p(l,"class","content txt-center")},m(f,i){a[e].m(f,i),g(f,n,i),g(f,l,i),d(l,t),o=!0,c||(m=A(B.call(null,t)),c=!0)},p(f,i){let $=e;e=b(f),e===$?a[e].p(f,i):(N(),y(a[$],1,1,()=>{a[$]=null}),D(),s=a[e],s?s.p(f,i):(s=a[e]=r[e](f),s.c()),w(s,1),s.m(n.parentNode,n))},i(f){o||(w(s),o=!0)},o(f){y(s),o=!1},d(f){f&&(k(n),k(l)),a[e].d(f),c=!1,m()}}}function V(u){let e,s;return e=new z({props:{$$slots:{default:[U]},$$scope:{ctx:u}}}),{c(){R(e.$$.fragment)},m(n,l){S(e,n,l),s=!0},p(n,[l]){const t={};l&71&&(t.$$scope={dirty:l,ctx:n}),e.$set(t)},i(n){s||(w(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function W(u,e,s){let n="",l=!1,t=!1;async function o(){if(!l){s(1,l=!0);try{await C.admins.requestPasswordReset(n),s(2,t=!0)}catch(m){C.error(m)}s(1,l=!1)}}function c(){n=this.value,s(0,n)}return[n,l,t,o,c]}class Y extends M{constructor(e){super(),T(this,e,W,V,j,{})}}export{Y as default};
|
@ -1 +1 @@
|
||||
import{S as o,i,s as c,e as r,f as l,g as u,y as s,o as d,I as h}from"./index-4c7ca1d0.js";function f(n){let t;return{c(){t=r("div"),t.innerHTML='<h3 class="m-b-sm">Auth completed.</h3> <h5>You can go back to the app if this window is not automatically closed.</h5>',l(t,"class","content txt-hint txt-center p-base")},m(e,a){u(e,t,a)},p:s,i:s,o:s,d(e){e&&d(t)}}}function m(n){return h(()=>{window.close()}),[]}class x extends o{constructor(t){super(),i(this,t,m,f,c,{})}}export{x as default};
|
||||
import{S as o,i,s as c,e as r,f as l,g as u,y as s,o as d,I as h}from"./index-4edb1c99.js";function f(n){let t;return{c(){t=r("div"),t.innerHTML='<h3 class="m-b-sm">Auth completed.</h3> <h5>You can go back to the app if this window is not automatically closed.</h5>',l(t,"class","content txt-hint txt-center p-base")},m(e,a){u(e,t,a)},p:s,i:s,o:s,d(e){e&&d(t)}}}function m(n){return h(()=>{window.close()}),[]}class x extends o{constructor(t){super(),i(this,t,m,f,c,{})}}export{x as default};
|
@ -1,2 +1,2 @@
|
||||
import{S as G,i as I,s as J,F as M,c as S,m as L,t as h,a as v,d as z,C as N,E as R,g as _,k as W,n as Y,o as b,G as j,H as A,p as B,q as D,e as m,w as y,b as C,f as p,r as T,h as g,u as P,v as K,y as E,x as O,z as F}from"./index-4c7ca1d0.js";function Q(i){let e,t,n,l,s,o,f,a,r,u,k,$,d=i[3]&&H(i);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[V,({uniqueId:c})=>({8:c}),({uniqueId:c})=>c?256:0]},$$scope:{ctx:i}}}),{c(){e=m("form"),t=m("div"),n=m("h5"),l=y(`Type your password to confirm changing your email address
|
||||
import{S as G,i as I,s as J,F as M,c as S,m as L,t as h,a as v,d as z,C as N,E as R,g as _,k as W,n as Y,o as b,G as j,H as A,p as B,q as D,e as m,w as y,b as C,f as p,r as T,h as g,u as P,v as K,y as E,x as O,z as F}from"./index-4edb1c99.js";function Q(i){let e,t,n,l,s,o,f,a,r,u,k,$,d=i[3]&&H(i);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[V,({uniqueId:c})=>({8:c}),({uniqueId:c})=>c?256:0]},$$scope:{ctx:i}}}),{c(){e=m("form"),t=m("div"),n=m("h5"),l=y(`Type your password to confirm changing your email address
|
||||
`),d&&d.c(),s=C(),S(o.$$.fragment),f=C(),a=m("button"),r=m("span"),r.textContent="Confirm new email",p(t,"class","content txt-center m-b-base"),p(r,"class","txt"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block"),a.disabled=i[1],T(a,"btn-loading",i[1])},m(c,w){_(c,e,w),g(e,t),g(t,n),g(n,l),d&&d.m(n,null),g(e,s),L(o,e,null),g(e,f),g(e,a),g(a,r),u=!0,k||($=P(e,"submit",K(i[4])),k=!0)},p(c,w){c[3]?d?d.p(c,w):(d=H(c),d.c(),d.m(n,null)):d&&(d.d(1),d=null);const q={};w&769&&(q.$$scope={dirty:w,ctx:c}),o.$set(q),(!u||w&2)&&(a.disabled=c[1]),(!u||w&2)&&T(a,"btn-loading",c[1])},i(c){u||(h(o.$$.fragment,c),u=!0)},o(c){v(o.$$.fragment,c),u=!1},d(c){c&&b(e),d&&d.d(),z(o),k=!1,$()}}}function U(i){let e,t,n,l,s;return{c(){e=m("div"),e.innerHTML='<div class="icon"><i class="ri-checkbox-circle-line"></i></div> <div class="content txt-bold"><p>Successfully changed the user email address.</p> <p>You can now sign in with your new email address.</p></div>',t=C(),n=m("button"),n.textContent="Close",p(e,"class","alert alert-success"),p(n,"type","button"),p(n,"class","btn btn-transparent btn-block")},m(o,f){_(o,e,f),_(o,t,f),_(o,n,f),l||(s=P(n,"click",i[6]),l=!0)},p:E,i:E,o:E,d(o){o&&(b(e),b(t),b(n)),l=!1,s()}}}function H(i){let e,t,n;return{c(){e=y("to "),t=m("strong"),n=y(i[3]),p(t,"class","txt-nowrap")},m(l,s){_(l,e,s),_(l,t,s),g(t,n)},p(l,s){s&8&&O(n,l[3])},d(l){l&&(b(e),b(t))}}}function V(i){let e,t,n,l,s,o,f,a;return{c(){e=m("label"),t=y("Password"),l=C(),s=m("input"),p(e,"for",n=i[8]),p(s,"type","password"),p(s,"id",o=i[8]),s.required=!0,s.autofocus=!0},m(r,u){_(r,e,u),g(e,t),_(r,l,u),_(r,s,u),F(s,i[0]),s.focus(),f||(a=P(s,"input",i[7]),f=!0)},p(r,u){u&256&&n!==(n=r[8])&&p(e,"for",n),u&256&&o!==(o=r[8])&&p(s,"id",o),u&1&&s.value!==r[0]&&F(s,r[0])},d(r){r&&(b(e),b(l),b(s)),f=!1,a()}}}function X(i){let e,t,n,l;const s=[U,Q],o=[];function f(a,r){return a[2]?0:1}return e=f(i),t=o[e]=s[e](i),{c(){t.c(),n=R()},m(a,r){o[e].m(a,r),_(a,n,r),l=!0},p(a,r){let u=e;e=f(a),e===u?o[e].p(a,r):(W(),v(o[u],1,1,()=>{o[u]=null}),Y(),t=o[e],t?t.p(a,r):(t=o[e]=s[e](a),t.c()),h(t,1),t.m(n.parentNode,n))},i(a){l||(h(t),l=!0)},o(a){v(t),l=!1},d(a){a&&b(n),o[e].d(a)}}}function Z(i){let e,t;return e=new M({props:{nobranding:!0,$$slots:{default:[X]},$$scope:{ctx:i}}}),{c(){S(e.$$.fragment)},m(n,l){L(e,n,l),t=!0},p(n,[l]){const s={};l&527&&(s.$$scope={dirty:l,ctx:n}),e.$set(s)},i(n){t||(h(e.$$.fragment,n),t=!0)},o(n){v(e.$$.fragment,n),t=!1},d(n){z(e,n)}}}function x(i,e,t){let n,{params:l}=e,s="",o=!1,f=!1;async function a(){if(o)return;t(1,o=!0);const k=new j("../");try{const $=A(l==null?void 0:l.token);await k.collection($.collectionId).confirmEmailChange(l==null?void 0:l.token,s),t(2,f=!0)}catch($){B.error($)}t(1,o=!1)}const r=()=>window.close();function u(){s=this.value,t(0,s)}return i.$$set=k=>{"params"in k&&t(5,l=k.params)},i.$$.update=()=>{i.$$.dirty&32&&t(3,n=N.getJWTPayload(l==null?void 0:l.token).newEmail||"")},[s,o,f,n,a,l,r,u]}class te extends G{constructor(e){super(),I(this,e,x,Z,J,{params:5})}}export{te as default};
|
@ -1,2 +1,2 @@
|
||||
import{S as J,i as M,s as W,F as Y,c as H,m as N,t as P,a as y,d as T,C as j,E as A,g as _,k as B,n as D,o as m,G as K,H as O,p as Q,q as E,e as b,w as q,b as C,f as p,r as G,h as w,u as S,v as U,y as F,x as V,z as R}from"./index-4c7ca1d0.js";function X(a){let e,l,s,n,t,o,c,r,i,u,v,g,k,h,d=a[4]&&I(a);return o=new E({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:a}}}),r=new E({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:a}}}),{c(){e=b("form"),l=b("div"),s=b("h5"),n=q(`Reset your user password
|
||||
import{S as J,i as M,s as W,F as Y,c as H,m as N,t as P,a as y,d as T,C as j,E as A,g as _,k as B,n as D,o as m,G as K,H as O,p as Q,q as E,e as b,w as q,b as C,f as p,r as G,h as w,u as S,v as U,y as F,x as V,z as R}from"./index-4edb1c99.js";function X(a){let e,l,s,n,t,o,c,r,i,u,v,g,k,h,d=a[4]&&I(a);return o=new E({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:a}}}),r=new E({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:a}}}),{c(){e=b("form"),l=b("div"),s=b("h5"),n=q(`Reset your user password
|
||||
`),d&&d.c(),t=C(),H(o.$$.fragment),c=C(),H(r.$$.fragment),i=C(),u=b("button"),v=b("span"),v.textContent="Set new password",p(l,"class","content txt-center m-b-base"),p(v,"class","txt"),p(u,"type","submit"),p(u,"class","btn btn-lg btn-block"),u.disabled=a[2],G(u,"btn-loading",a[2])},m(f,$){_(f,e,$),w(e,l),w(l,s),w(s,n),d&&d.m(s,null),w(e,t),N(o,e,null),w(e,c),N(r,e,null),w(e,i),w(e,u),w(u,v),g=!0,k||(h=S(e,"submit",U(a[5])),k=!0)},p(f,$){f[4]?d?d.p(f,$):(d=I(f),d.c(),d.m(s,null)):d&&(d.d(1),d=null);const L={};$&3073&&(L.$$scope={dirty:$,ctx:f}),o.$set(L);const z={};$&3074&&(z.$$scope={dirty:$,ctx:f}),r.$set(z),(!g||$&4)&&(u.disabled=f[2]),(!g||$&4)&&G(u,"btn-loading",f[2])},i(f){g||(P(o.$$.fragment,f),P(r.$$.fragment,f),g=!0)},o(f){y(o.$$.fragment,f),y(r.$$.fragment,f),g=!1},d(f){f&&m(e),d&&d.d(),T(o),T(r),k=!1,h()}}}function Z(a){let e,l,s,n,t;return{c(){e=b("div"),e.innerHTML='<div class="icon"><i class="ri-checkbox-circle-line"></i></div> <div class="content txt-bold"><p>Successfully changed the user password.</p> <p>You can now sign in with your new password.</p></div>',l=C(),s=b("button"),s.textContent="Close",p(e,"class","alert alert-success"),p(s,"type","button"),p(s,"class","btn btn-transparent btn-block")},m(o,c){_(o,e,c),_(o,l,c),_(o,s,c),n||(t=S(s,"click",a[7]),n=!0)},p:F,i:F,o:F,d(o){o&&(m(e),m(l),m(s)),n=!1,t()}}}function I(a){let e,l,s;return{c(){e=q("for "),l=b("strong"),s=q(a[4])},m(n,t){_(n,e,t),_(n,l,t),w(l,s)},p(n,t){t&16&&V(s,n[4])},d(n){n&&(m(e),m(l))}}}function x(a){let e,l,s,n,t,o,c,r;return{c(){e=b("label"),l=q("New password"),n=C(),t=b("input"),p(e,"for",s=a[10]),p(t,"type","password"),p(t,"id",o=a[10]),t.required=!0,t.autofocus=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),R(t,a[0]),t.focus(),c||(r=S(t,"input",a[8]),c=!0)},p(i,u){u&1024&&s!==(s=i[10])&&p(e,"for",s),u&1024&&o!==(o=i[10])&&p(t,"id",o),u&1&&t.value!==i[0]&&R(t,i[0])},d(i){i&&(m(e),m(n),m(t)),c=!1,r()}}}function ee(a){let e,l,s,n,t,o,c,r;return{c(){e=b("label"),l=q("New password confirm"),n=C(),t=b("input"),p(e,"for",s=a[10]),p(t,"type","password"),p(t,"id",o=a[10]),t.required=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),R(t,a[1]),c||(r=S(t,"input",a[9]),c=!0)},p(i,u){u&1024&&s!==(s=i[10])&&p(e,"for",s),u&1024&&o!==(o=i[10])&&p(t,"id",o),u&2&&t.value!==i[1]&&R(t,i[1])},d(i){i&&(m(e),m(n),m(t)),c=!1,r()}}}function te(a){let e,l,s,n;const t=[Z,X],o=[];function c(r,i){return r[3]?0:1}return e=c(a),l=o[e]=t[e](a),{c(){l.c(),s=A()},m(r,i){o[e].m(r,i),_(r,s,i),n=!0},p(r,i){let u=e;e=c(r),e===u?o[e].p(r,i):(B(),y(o[u],1,1,()=>{o[u]=null}),D(),l=o[e],l?l.p(r,i):(l=o[e]=t[e](r),l.c()),P(l,1),l.m(s.parentNode,s))},i(r){n||(P(l),n=!0)},o(r){y(l),n=!1},d(r){r&&m(s),o[e].d(r)}}}function se(a){let e,l;return e=new Y({props:{nobranding:!0,$$slots:{default:[te]},$$scope:{ctx:a}}}),{c(){H(e.$$.fragment)},m(s,n){N(e,s,n),l=!0},p(s,[n]){const t={};n&2079&&(t.$$scope={dirty:n,ctx:s}),e.$set(t)},i(s){l||(P(e.$$.fragment,s),l=!0)},o(s){y(e.$$.fragment,s),l=!1},d(s){T(e,s)}}}function le(a,e,l){let s,{params:n}=e,t="",o="",c=!1,r=!1;async function i(){if(c)return;l(2,c=!0);const k=new K("../");try{const h=O(n==null?void 0:n.token);await k.collection(h.collectionId).confirmPasswordReset(n==null?void 0:n.token,t,o),l(3,r=!0)}catch(h){Q.error(h)}l(2,c=!1)}const u=()=>window.close();function v(){t=this.value,l(0,t)}function g(){o=this.value,l(1,o)}return a.$$set=k=>{"params"in k&&l(6,n=k.params)},a.$$.update=()=>{a.$$.dirty&64&&l(4,s=j.getJWTPayload(n==null?void 0:n.token).email||"")},[t,o,c,r,s,i,n,u,v,g]}class oe extends J{constructor(e){super(),M(this,e,le,se,W,{params:6})}}export{oe as default};
|
@ -1 +1 @@
|
||||
import{S as v,i as y,s as g,F as w,c as C,m as x,t as $,a as H,d as L,G as P,H as T,E as M,g as a,o as r,e as f,b as _,f as d,u as b,y as p}from"./index-4c7ca1d0.js";function S(c){let t,s,e,n,l;return{c(){t=f("div"),t.innerHTML='<div class="icon"><i class="ri-error-warning-line"></i></div> <div class="content txt-bold"><p>Invalid or expired verification token.</p></div>',s=_(),e=f("button"),e.textContent="Close",d(t,"class","alert alert-danger"),d(e,"type","button"),d(e,"class","btn btn-transparent btn-block")},m(i,o){a(i,t,o),a(i,s,o),a(i,e,o),n||(l=b(e,"click",c[4]),n=!0)},p,d(i){i&&(r(t),r(s),r(e)),n=!1,l()}}}function h(c){let t,s,e,n,l;return{c(){t=f("div"),t.innerHTML='<div class="icon"><i class="ri-checkbox-circle-line"></i></div> <div class="content txt-bold"><p>Successfully verified email address.</p></div>',s=_(),e=f("button"),e.textContent="Close",d(t,"class","alert alert-success"),d(e,"type","button"),d(e,"class","btn btn-transparent btn-block")},m(i,o){a(i,t,o),a(i,s,o),a(i,e,o),n||(l=b(e,"click",c[3]),n=!0)},p,d(i){i&&(r(t),r(s),r(e)),n=!1,l()}}}function F(c){let t;return{c(){t=f("div"),t.innerHTML='<div class="loader loader-lg"><em>Please wait...</em></div>',d(t,"class","txt-center")},m(s,e){a(s,t,e)},p,d(s){s&&r(t)}}}function I(c){let t;function s(l,i){return l[1]?F:l[0]?h:S}let e=s(c),n=e(c);return{c(){n.c(),t=M()},m(l,i){n.m(l,i),a(l,t,i)},p(l,i){e===(e=s(l))&&n?n.p(l,i):(n.d(1),n=e(l),n&&(n.c(),n.m(t.parentNode,t)))},d(l){l&&r(t),n.d(l)}}}function V(c){let t,s;return t=new w({props:{nobranding:!0,$$slots:{default:[I]},$$scope:{ctx:c}}}),{c(){C(t.$$.fragment)},m(e,n){x(t,e,n),s=!0},p(e,[n]){const l={};n&67&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){s||($(t.$$.fragment,e),s=!0)},o(e){H(t.$$.fragment,e),s=!1},d(e){L(t,e)}}}function q(c,t,s){let{params:e}=t,n=!1,l=!1;i();async function i(){s(1,l=!0);const u=new P("../");try{const m=T(e==null?void 0:e.token);await u.collection(m.collectionId).confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch{s(0,n=!1)}s(1,l=!1)}const o=()=>window.close(),k=()=>window.close();return c.$$set=u=>{"params"in u&&s(2,e=u.params)},[n,l,e,o,k]}class G extends v{constructor(t){super(),y(this,t,q,V,g,{params:2})}}export{G as default};
|
||||
import{S as v,i as y,s as g,F as w,c as C,m as x,t as $,a as H,d as L,G as P,H as T,E as M,g as a,o as r,e as f,b as _,f as d,u as b,y as p}from"./index-4edb1c99.js";function S(c){let t,s,e,n,l;return{c(){t=f("div"),t.innerHTML='<div class="icon"><i class="ri-error-warning-line"></i></div> <div class="content txt-bold"><p>Invalid or expired verification token.</p></div>',s=_(),e=f("button"),e.textContent="Close",d(t,"class","alert alert-danger"),d(e,"type","button"),d(e,"class","btn btn-transparent btn-block")},m(i,o){a(i,t,o),a(i,s,o),a(i,e,o),n||(l=b(e,"click",c[4]),n=!0)},p,d(i){i&&(r(t),r(s),r(e)),n=!1,l()}}}function h(c){let t,s,e,n,l;return{c(){t=f("div"),t.innerHTML='<div class="icon"><i class="ri-checkbox-circle-line"></i></div> <div class="content txt-bold"><p>Successfully verified email address.</p></div>',s=_(),e=f("button"),e.textContent="Close",d(t,"class","alert alert-success"),d(e,"type","button"),d(e,"class","btn btn-transparent btn-block")},m(i,o){a(i,t,o),a(i,s,o),a(i,e,o),n||(l=b(e,"click",c[3]),n=!0)},p,d(i){i&&(r(t),r(s),r(e)),n=!1,l()}}}function F(c){let t;return{c(){t=f("div"),t.innerHTML='<div class="loader loader-lg"><em>Please wait...</em></div>',d(t,"class","txt-center")},m(s,e){a(s,t,e)},p,d(s){s&&r(t)}}}function I(c){let t;function s(l,i){return l[1]?F:l[0]?h:S}let e=s(c),n=e(c);return{c(){n.c(),t=M()},m(l,i){n.m(l,i),a(l,t,i)},p(l,i){e===(e=s(l))&&n?n.p(l,i):(n.d(1),n=e(l),n&&(n.c(),n.m(t.parentNode,t)))},d(l){l&&r(t),n.d(l)}}}function V(c){let t,s;return t=new w({props:{nobranding:!0,$$slots:{default:[I]},$$scope:{ctx:c}}}),{c(){C(t.$$.fragment)},m(e,n){x(t,e,n),s=!0},p(e,[n]){const l={};n&67&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){s||($(t.$$.fragment,e),s=!0)},o(e){H(t.$$.fragment,e),s=!1},d(e){L(t,e)}}}function q(c,t,s){let{params:e}=t,n=!1,l=!1;i();async function i(){s(1,l=!0);const u=new P("../");try{const m=T(e==null?void 0:e.token);await u.collection(m.collectionId).confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch{s(0,n=!1)}s(1,l=!1)}const o=()=>window.close(),k=()=>window.close();return c.$$set=u=>{"params"in u&&s(2,e=u.params)},[n,l,e,o,k]}class G extends v{constructor(t){super(),y(this,t,q,V,g,{params:2})}}export{G as default};
|
@ -1,4 +1,4 @@
|
||||
import{S as re,i as ae,s as be,N as pe,C as P,e as p,w as y,b as a,c as se,f as u,g as s,h as I,m as ne,x as ue,t as ie,a as ce,o as n,d as le,p as me}from"./index-4c7ca1d0.js";import{S as de}from"./SdkTabs-5ff67765.js";function fe(t){var B,U,W,A,H,L,T,q,M,N,j,J;let i,m,c=t[0].name+"",b,d,D,f,_,$,k,l,S,g,C,v,w,h,E,r,R;return l=new de({props:{js:`
|
||||
import{S as re,i as ae,s as be,N as pe,C as P,e as p,w as y,b as a,c as se,f as u,g as s,h as I,m as ne,x as ue,t as ie,a as ce,o as n,d as le,p as me}from"./index-4edb1c99.js";import{S as de}from"./SdkTabs-3741b181.js";function fe(t){var B,U,W,A,H,L,T,q,M,N,j,J;let i,m,c=t[0].name+"",b,d,D,f,_,$,k,l,S,g,C,v,w,h,E,r,R;return l=new de({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${t[1]}');
|
@ -1,4 +1,4 @@
|
||||
import{S as Ee,i as Be,s as Se,O as L,e as r,w as v,b as k,c as Ce,f as b,g as d,h as n,m as ye,x as N,P as ve,Q as Re,k as Me,R as Ae,n as We,t as ee,a as te,o as m,d as Te,C as ze,p as He,r as F,u as Oe,N as Ue}from"./index-4c7ca1d0.js";import{S as je}from"./SdkTabs-5ff67765.js";function we(o,l,a){const s=o.slice();return s[5]=l[a],s}function $e(o,l,a){const s=o.slice();return s[5]=l[a],s}function qe(o,l){let a,s=l[5].code+"",h,f,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){a=r("button"),h=v(s),f=k(),b(a,"class","tab-item"),F(a,"active",l[1]===l[5].code),this.first=a},m($,q){d($,a,q),n(a,h),n(a,f),i||(p=Oe(a,"click",u),i=!0)},p($,q){l=$,q&4&&s!==(s=l[5].code+"")&&N(h,s),q&6&&F(a,"active",l[1]===l[5].code)},d($){$&&m(a),i=!1,p()}}}function Pe(o,l){let a,s,h,f;return s=new Ue({props:{content:l[5].body}}),{key:o,first:null,c(){a=r("div"),Ce(s.$$.fragment),h=k(),b(a,"class","tab-item"),F(a,"active",l[1]===l[5].code),this.first=a},m(i,p){d(i,a,p),ye(s,a,null),n(a,h),f=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),s.$set(u),(!f||p&6)&&F(a,"active",l[1]===l[5].code)},i(i){f||(ee(s.$$.fragment,i),f=!0)},o(i){te(s.$$.fragment,i),f=!1},d(i){i&&m(a),Te(s)}}}function De(o){var pe,ue,be,fe;let l,a,s=o[0].name+"",h,f,i,p,u,$,q,z=o[0].name+"",I,le,K,P,Q,T,G,w,H,ae,O,E,se,J,U=o[0].name+"",V,oe,ne,j,X,B,Y,S,Z,R,x,C,M,g=[],ie=new Map,ce,A,_=[],re=new Map,y;P=new je({props:{js:`
|
||||
import{S as Ee,i as Be,s as Se,O as L,e as r,w as v,b as k,c as Ce,f as b,g as d,h as n,m as ye,x as N,P as ve,Q as Re,k as Me,R as Ae,n as We,t as ee,a as te,o as m,d as Te,C as ze,p as He,r as F,u as Oe,N as Ue}from"./index-4edb1c99.js";import{S as je}from"./SdkTabs-3741b181.js";function we(o,l,a){const s=o.slice();return s[5]=l[a],s}function $e(o,l,a){const s=o.slice();return s[5]=l[a],s}function qe(o,l){let a,s=l[5].code+"",h,f,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){a=r("button"),h=v(s),f=k(),b(a,"class","tab-item"),F(a,"active",l[1]===l[5].code),this.first=a},m($,q){d($,a,q),n(a,h),n(a,f),i||(p=Oe(a,"click",u),i=!0)},p($,q){l=$,q&4&&s!==(s=l[5].code+"")&&N(h,s),q&6&&F(a,"active",l[1]===l[5].code)},d($){$&&m(a),i=!1,p()}}}function Pe(o,l){let a,s,h,f;return s=new Ue({props:{content:l[5].body}}),{key:o,first:null,c(){a=r("div"),Ce(s.$$.fragment),h=k(),b(a,"class","tab-item"),F(a,"active",l[1]===l[5].code),this.first=a},m(i,p){d(i,a,p),ye(s,a,null),n(a,h),f=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),s.$set(u),(!f||p&6)&&F(a,"active",l[1]===l[5].code)},i(i){f||(ee(s.$$.fragment,i),f=!0)},o(i){te(s.$$.fragment,i),f=!1},d(i){i&&m(a),Te(s)}}}function De(o){var pe,ue,be,fe;let l,a,s=o[0].name+"",h,f,i,p,u,$,q,z=o[0].name+"",I,le,K,P,Q,T,G,w,H,ae,O,E,se,J,U=o[0].name+"",V,oe,ne,j,X,B,Y,S,Z,R,x,C,M,g=[],ie=new Map,ce,A,_=[],re=new Map,y;P=new je({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${o[3]}');
|
@ -1,4 +1,4 @@
|
||||
import{S as Pe,i as $e,s as qe,O as I,e as r,w as g,b as h,c as ve,f as b,g as d,h as n,m as ge,x as L,P as fe,Q as ye,k as Re,R as Be,n as Ce,t as x,a as ee,o as p,d as we,C as Se,p as Te,r as N,u as Me,N as Ae}from"./index-4c7ca1d0.js";import{S as Ue}from"./SdkTabs-5ff67765.js";function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s,l){const a=o.slice();return a[5]=s[l],a}function ke(o,s){let l,a=s[5].code+"",_,f,i,u;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=r("button"),_=g(a),f=h(),b(l,"class","tab-item"),N(l,"active",s[1]===s[5].code),this.first=l},m(w,P){d(w,l,P),n(l,_),n(l,f),i||(u=Me(l,"click",m),i=!0)},p(w,P){s=w,P&4&&a!==(a=s[5].code+"")&&L(_,a),P&6&&N(l,"active",s[1]===s[5].code)},d(w){w&&p(l),i=!1,u()}}}function he(o,s){let l,a,_,f;return a=new Ae({props:{content:s[5].body}}),{key:o,first:null,c(){l=r("div"),ve(a.$$.fragment),_=h(),b(l,"class","tab-item"),N(l,"active",s[1]===s[5].code),this.first=l},m(i,u){d(i,l,u),ge(a,l,null),n(l,_),f=!0},p(i,u){s=i;const m={};u&4&&(m.content=s[5].body),a.$set(m),(!f||u&6)&&N(l,"active",s[1]===s[5].code)},i(i){f||(x(a.$$.fragment,i),f=!0)},o(i){ee(a.$$.fragment,i),f=!1},d(i){i&&p(l),we(a)}}}function je(o){var de,pe;let s,l,a=o[0].name+"",_,f,i,u,m,w,P,D=o[0].name+"",Q,te,z,$,G,B,J,q,H,se,O,C,le,K,E=o[0].name+"",V,ae,W,S,X,T,Y,M,Z,y,A,v=[],oe=new Map,ne,U,k=[],ie=new Map,R;$=new Ue({props:{js:`
|
||||
import{S as Pe,i as $e,s as qe,O as I,e as r,w as g,b as h,c as ve,f as b,g as d,h as n,m as ge,x as L,P as fe,Q as ye,k as Re,R as Be,n as Ce,t as x,a as ee,o as p,d as we,C as Se,p as Te,r as N,u as Me,N as Ae}from"./index-4edb1c99.js";import{S as Ue}from"./SdkTabs-3741b181.js";function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s,l){const a=o.slice();return a[5]=s[l],a}function ke(o,s){let l,a=s[5].code+"",_,f,i,u;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=r("button"),_=g(a),f=h(),b(l,"class","tab-item"),N(l,"active",s[1]===s[5].code),this.first=l},m(w,P){d(w,l,P),n(l,_),n(l,f),i||(u=Me(l,"click",m),i=!0)},p(w,P){s=w,P&4&&a!==(a=s[5].code+"")&&L(_,a),P&6&&N(l,"active",s[1]===s[5].code)},d(w){w&&p(l),i=!1,u()}}}function he(o,s){let l,a,_,f;return a=new Ae({props:{content:s[5].body}}),{key:o,first:null,c(){l=r("div"),ve(a.$$.fragment),_=h(),b(l,"class","tab-item"),N(l,"active",s[1]===s[5].code),this.first=l},m(i,u){d(i,l,u),ge(a,l,null),n(l,_),f=!0},p(i,u){s=i;const m={};u&4&&(m.content=s[5].body),a.$set(m),(!f||u&6)&&N(l,"active",s[1]===s[5].code)},i(i){f||(x(a.$$.fragment,i),f=!0)},o(i){ee(a.$$.fragment,i),f=!1},d(i){i&&p(l),we(a)}}}function je(o){var de,pe;let s,l,a=o[0].name+"",_,f,i,u,m,w,P,D=o[0].name+"",Q,te,z,$,G,B,J,q,H,se,O,C,le,K,E=o[0].name+"",V,ae,W,S,X,T,Y,M,Z,y,A,v=[],oe=new Map,ne,U,k=[],ie=new Map,R;$=new Ue({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${o[3]}');
|
@ -1,4 +1,4 @@
|
||||
import{S as qe,i as we,s as Pe,O as F,e as r,w as g,b as h,c as ve,f as b,g as d,h as n,m as ge,x as I,P as pe,Q as ye,k as Be,R as Ce,n as Se,t as x,a as ee,o as f,d as $e,C as Te,p as Re,r as L,u as Ve,N as Me}from"./index-4c7ca1d0.js";import{S as Ae}from"./SdkTabs-5ff67765.js";function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l,s){const a=o.slice();return a[5]=l[s],a}function ke(o,l){let s,a=l[5].code+"",_,p,i,u;function m(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),_=g(a),p=h(),b(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m($,q){d($,s,q),n(s,_),n(s,p),i||(u=Ve(s,"click",m),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&I(_,a),q&6&&L(s,"active",l[1]===l[5].code)},d($){$&&f(s),i=!1,u()}}}function he(o,l){let s,a,_,p;return a=new Me({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),ve(a.$$.fragment),_=h(),b(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m(i,u){d(i,s,u),ge(a,s,null),n(s,_),p=!0},p(i,u){l=i;const m={};u&4&&(m.content=l[5].body),a.$set(m),(!p||u&6)&&L(s,"active",l[1]===l[5].code)},i(i){p||(x(a.$$.fragment,i),p=!0)},o(i){ee(a.$$.fragment,i),p=!1},d(i){i&&f(s),$e(a)}}}function Ue(o){var de,fe;let l,s,a=o[0].name+"",_,p,i,u,m,$,q,j=o[0].name+"",N,te,Q,w,z,C,G,P,D,le,H,S,se,J,O=o[0].name+"",K,ae,W,T,X,R,Y,V,Z,y,M,v=[],oe=new Map,ne,A,k=[],ie=new Map,B;w=new Ae({props:{js:`
|
||||
import{S as qe,i as we,s as Pe,O as F,e as r,w as g,b as h,c as ve,f as b,g as d,h as n,m as ge,x as I,P as pe,Q as ye,k as Be,R as Ce,n as Se,t as x,a as ee,o as f,d as $e,C as Te,p as Re,r as L,u as Ve,N as Me}from"./index-4edb1c99.js";import{S as Ae}from"./SdkTabs-3741b181.js";function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l,s){const a=o.slice();return a[5]=l[s],a}function ke(o,l){let s,a=l[5].code+"",_,p,i,u;function m(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),_=g(a),p=h(),b(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m($,q){d($,s,q),n(s,_),n(s,p),i||(u=Ve(s,"click",m),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&I(_,a),q&6&&L(s,"active",l[1]===l[5].code)},d($){$&&f(s),i=!1,u()}}}function he(o,l){let s,a,_,p;return a=new Me({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),ve(a.$$.fragment),_=h(),b(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m(i,u){d(i,s,u),ge(a,s,null),n(s,_),p=!0},p(i,u){l=i;const m={};u&4&&(m.content=l[5].body),a.$set(m),(!p||u&6)&&L(s,"active",l[1]===l[5].code)},i(i){p||(x(a.$$.fragment,i),p=!0)},o(i){ee(a.$$.fragment,i),p=!1},d(i){i&&f(s),$e(a)}}}function Ue(o){var de,fe;let l,s,a=o[0].name+"",_,p,i,u,m,$,q,j=o[0].name+"",N,te,Q,w,z,C,G,P,D,le,H,S,se,J,O=o[0].name+"",K,ae,W,T,X,R,Y,V,Z,y,M,v=[],oe=new Map,ne,A,k=[],ie=new Map,B;w=new Ae({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${o[3]}');
|
@ -1 +1 @@
|
||||
import{S as B,i as F,s as J,O as j,e as v,b as S,f as h,g as w,h as m,P as D,Q as O,k as Q,R as Y,n as z,t as N,a as P,o as C,w as E,r as y,u as A,x as q,N as G,c as H,m as L,d as U}from"./index-4c7ca1d0.js";function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function R(o,e,l){const s=o.slice();return s[6]=e[l],s}function T(o,e){let l,s,g=e[6].title+"",r,i,n,k;function c(){return e[5](e[6])}return{key:o,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=S(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),y(l,"active",e[1]===e[6].language),this.first=l},m(_,f){w(_,l,f),m(l,s),m(s,r),m(l,i),n||(k=A(l,"click",c),n=!0)},p(_,f){e=_,f&4&&g!==(g=e[6].title+"")&&q(r,g),f&6&&y(l,"active",e[1]===e[6].language)},d(_){_&&C(l),n=!1,k()}}}function I(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,_,f,p,d;return s=new G({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),H(s.$$.fragment),g=S(),r=v("div"),i=v("em"),n=v("a"),c=E(k),_=E(" SDK"),p=S(),h(n,"href",f=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),y(l,"active",e[1]===e[6].language),this.first=l},m(b,t){w(b,l,t),L(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,_),m(l,p),d=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!d||t&4)&&k!==(k=e[6].title+"")&&q(c,k),(!d||t&4&&f!==(f=e[6].url))&&h(n,"href",f),(!d||t&6)&&y(l,"active",e[1]===e[6].language)},i(b){d||(N(s.$$.fragment,b),d=!0)},o(b){P(s.$$.fragment,b),d=!1},d(b){b&&C(l),U(s)}}}function V(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,_,f=j(o[2]);const p=t=>t[6].language;for(let t=0;t<f.length;t+=1){let a=R(o,f,t),u=p(a);g.set(u,s[t]=T(u,a))}let d=j(o[2]);const b=t=>t[6].language;for(let t=0;t<d.length;t+=1){let a=K(o,d,t),u=b(a);k.set(u,n[t]=I(u,a))}return{c(){e=v("div"),l=v("div");for(let t=0;t<s.length;t+=1)s[t].c();r=S(),i=v("div");for(let t=0;t<n.length;t+=1)n[t].c();h(l,"class","tabs-header compact combined left"),h(i,"class","tabs-content"),h(e,"class",c="tabs sdk-tabs "+o[0]+" svelte-1maocj6")},m(t,a){w(t,e,a),m(e,l);for(let u=0;u<s.length;u+=1)s[u]&&s[u].m(l,null);m(e,r),m(e,i);for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(i,null);_=!0},p(t,[a]){a&6&&(f=j(t[2]),s=D(s,a,p,1,t,f,g,l,O,T,null,R)),a&6&&(d=j(t[2]),Q(),n=D(n,a,b,1,t,d,k,i,Y,I,null,K),z()),(!_||a&1&&c!==(c="tabs sdk-tabs "+t[0]+" svelte-1maocj6"))&&h(e,"class",c)},i(t){if(!_){for(let a=0;a<d.length;a+=1)N(n[a]);_=!0}},o(t){for(let a=0;a<n.length;a+=1)P(n[a]);_=!1},d(t){t&&C(e);for(let a=0;a<s.length;a+=1)s[a].d();for(let a=0;a<n.length;a+=1)n[a].d()}}}const M="pb_sdk_preference";function W(o,e,l){let s,{class:g="m-b-sm"}=e,{js:r=""}=e,{dart:i=""}=e,n=localStorage.getItem(M)||"javascript";const k=c=>l(1,n=c.language);return o.$$set=c=>{"class"in c&&l(0,g=c.class),"js"in c&&l(3,r=c.js),"dart"in c&&l(4,i=c.dart)},o.$$.update=()=>{o.$$.dirty&2&&n&&localStorage.setItem(M,n),o.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk"}])},[g,n,s,r,i,k]}class Z extends B{constructor(e){super(),F(this,e,W,V,J,{class:0,js:3,dart:4})}}export{Z as S};
|
||||
import{S as B,i as F,s as J,O as j,e as v,b as S,f as h,g as w,h as m,P as D,Q as O,k as Q,R as Y,n as z,t as N,a as P,o as C,w as E,r as y,u as A,x as q,N as G,c as H,m as L,d as U}from"./index-4edb1c99.js";function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function R(o,e,l){const s=o.slice();return s[6]=e[l],s}function T(o,e){let l,s,g=e[6].title+"",r,i,n,k;function c(){return e[5](e[6])}return{key:o,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=S(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),y(l,"active",e[1]===e[6].language),this.first=l},m(_,f){w(_,l,f),m(l,s),m(s,r),m(l,i),n||(k=A(l,"click",c),n=!0)},p(_,f){e=_,f&4&&g!==(g=e[6].title+"")&&q(r,g),f&6&&y(l,"active",e[1]===e[6].language)},d(_){_&&C(l),n=!1,k()}}}function I(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,_,f,p,d;return s=new G({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),H(s.$$.fragment),g=S(),r=v("div"),i=v("em"),n=v("a"),c=E(k),_=E(" SDK"),p=S(),h(n,"href",f=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),y(l,"active",e[1]===e[6].language),this.first=l},m(b,t){w(b,l,t),L(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,_),m(l,p),d=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!d||t&4)&&k!==(k=e[6].title+"")&&q(c,k),(!d||t&4&&f!==(f=e[6].url))&&h(n,"href",f),(!d||t&6)&&y(l,"active",e[1]===e[6].language)},i(b){d||(N(s.$$.fragment,b),d=!0)},o(b){P(s.$$.fragment,b),d=!1},d(b){b&&C(l),U(s)}}}function V(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,_,f=j(o[2]);const p=t=>t[6].language;for(let t=0;t<f.length;t+=1){let a=R(o,f,t),u=p(a);g.set(u,s[t]=T(u,a))}let d=j(o[2]);const b=t=>t[6].language;for(let t=0;t<d.length;t+=1){let a=K(o,d,t),u=b(a);k.set(u,n[t]=I(u,a))}return{c(){e=v("div"),l=v("div");for(let t=0;t<s.length;t+=1)s[t].c();r=S(),i=v("div");for(let t=0;t<n.length;t+=1)n[t].c();h(l,"class","tabs-header compact combined left"),h(i,"class","tabs-content"),h(e,"class",c="tabs sdk-tabs "+o[0]+" svelte-1maocj6")},m(t,a){w(t,e,a),m(e,l);for(let u=0;u<s.length;u+=1)s[u]&&s[u].m(l,null);m(e,r),m(e,i);for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(i,null);_=!0},p(t,[a]){a&6&&(f=j(t[2]),s=D(s,a,p,1,t,f,g,l,O,T,null,R)),a&6&&(d=j(t[2]),Q(),n=D(n,a,b,1,t,d,k,i,Y,I,null,K),z()),(!_||a&1&&c!==(c="tabs sdk-tabs "+t[0]+" svelte-1maocj6"))&&h(e,"class",c)},i(t){if(!_){for(let a=0;a<d.length;a+=1)N(n[a]);_=!0}},o(t){for(let a=0;a<n.length;a+=1)P(n[a]);_=!1},d(t){t&&C(e);for(let a=0;a<s.length;a+=1)s[a].d();for(let a=0;a<n.length;a+=1)n[a].d()}}}const M="pb_sdk_preference";function W(o,e,l){let s,{class:g="m-b-sm"}=e,{js:r=""}=e,{dart:i=""}=e,n=localStorage.getItem(M)||"javascript";const k=c=>l(1,n=c.language);return o.$$set=c=>{"class"in c&&l(0,g=c.class),"js"in c&&l(3,r=c.js),"dart"in c&&l(4,i=c.dart)},o.$$.update=()=>{o.$$.dirty&2&&n&&localStorage.setItem(M,n),o.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk"}])},[g,n,s,r,i,k]}class Z extends B{constructor(e){super(),F(this,e,W,V,J,{class:0,js:3,dart:4})}}export{Z as S};
|
@ -1,4 +1,4 @@
|
||||
import{S as Oe,i as De,s as Me,O as j,e as i,w as g,b as f,c as Be,f as b,g as d,h as a,m as Ue,x as I,P as Ae,Q as We,k as ze,R as He,n as Le,t as oe,a as ae,o as u,d as qe,C as Re,p as je,r as N,u as Ie,N as Ne}from"./index-4c7ca1d0.js";import{S as Ke}from"./SdkTabs-5ff67765.js";function Ce(n,l,o){const s=n.slice();return s[5]=l[o],s}function Te(n,l,o){const s=n.slice();return s[5]=l[o],s}function Ee(n,l){let o,s=l[5].code+"",_,h,c,p;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=g(s),h=f(),b(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m($,P){d($,o,P),a(o,_),a(o,h),c||(p=Ie(o,"click",m),c=!0)},p($,P){l=$,P&4&&s!==(s=l[5].code+"")&&I(_,s),P&6&&N(o,"active",l[1]===l[5].code)},d($){$&&u(o),c=!1,p()}}}function Se(n,l){let o,s,_,h;return s=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Be(s.$$.fragment),_=f(),b(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Ue(s,o,null),a(o,_),h=!0},p(c,p){l=c;const m={};p&4&&(m.content=l[5].body),s.$set(m),(!h||p&6)&&N(o,"active",l[1]===l[5].code)},i(c){h||(oe(s.$$.fragment,c),h=!0)},o(c){ae(s.$$.fragment,c),h=!1},d(c){c&&u(o),qe(s)}}}function Qe(n){var _e,ke,ge,ve;let l,o,s=n[0].name+"",_,h,c,p,m,$,P,M=n[0].name+"",K,se,ne,Q,F,A,G,E,J,w,W,ie,z,y,ce,V,H=n[0].name+"",X,re,Y,de,Z,ue,L,x,S,ee,B,te,U,le,C,q,v=[],pe=new Map,me,O,k=[],be=new Map,T;A=new Ke({props:{js:`
|
||||
import{S as Oe,i as De,s as Me,O as j,e as i,w as g,b as f,c as Be,f as b,g as d,h as a,m as Ue,x as I,P as Ae,Q as We,k as ze,R as He,n as Le,t as oe,a as ae,o as u,d as qe,C as Re,p as je,r as N,u as Ie,N as Ne}from"./index-4edb1c99.js";import{S as Ke}from"./SdkTabs-3741b181.js";function Ce(n,l,o){const s=n.slice();return s[5]=l[o],s}function Te(n,l,o){const s=n.slice();return s[5]=l[o],s}function Ee(n,l){let o,s=l[5].code+"",_,h,c,p;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=g(s),h=f(),b(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m($,P){d($,o,P),a(o,_),a(o,h),c||(p=Ie(o,"click",m),c=!0)},p($,P){l=$,P&4&&s!==(s=l[5].code+"")&&I(_,s),P&6&&N(o,"active",l[1]===l[5].code)},d($){$&&u(o),c=!1,p()}}}function Se(n,l){let o,s,_,h;return s=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Be(s.$$.fragment),_=f(),b(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Ue(s,o,null),a(o,_),h=!0},p(c,p){l=c;const m={};p&4&&(m.content=l[5].body),s.$set(m),(!h||p&6)&&N(o,"active",l[1]===l[5].code)},i(c){h||(oe(s.$$.fragment,c),h=!0)},o(c){ae(s.$$.fragment,c),h=!1},d(c){c&&u(o),qe(s)}}}function Qe(n){var _e,ke,ge,ve;let l,o,s=n[0].name+"",_,h,c,p,m,$,P,M=n[0].name+"",K,se,ne,Q,F,A,G,E,J,w,W,ie,z,y,ce,V,H=n[0].name+"",X,re,Y,de,Z,ue,L,x,S,ee,B,te,U,le,C,q,v=[],pe=new Map,me,O,k=[],be=new Map,T;A=new Ke({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${n[3]}');
|
@ -1,4 +1,4 @@
|
||||
import{S as $t,i as Mt,s as qt,C as I,O as Z,N as Ot,e as r,w as b,b as f,c as he,f as v,g as i,h as s,m as ye,x as J,P as Ee,Q as _t,k as Ht,R as Rt,n as Dt,t as ce,a as pe,o as d,d as ke,p as Lt,r as ve,u as Pt,y as ee}from"./index-4c7ca1d0.js";import{S as Ft}from"./SdkTabs-5ff67765.js";import{F as Nt}from"./FieldsQueryParam-9cc13943.js";function ht(c,e,t){const n=c.slice();return n[8]=e[t],n}function yt(c,e,t){const n=c.slice();return n[8]=e[t],n}function kt(c,e,t){const n=c.slice();return n[13]=e[t],n}function vt(c){let e;return{c(){e=r("p"),e.innerHTML=`<em>Note that in case of a password change all previously issued tokens for the current record
|
||||
import{S as $t,i as Mt,s as qt,C as I,O as Z,N as Ot,e as r,w as b,b as f,c as he,f as v,g as i,h as s,m as ye,x as J,P as Ee,Q as _t,k as Ht,R as Rt,n as Dt,t as ce,a as pe,o as d,d as ke,p as Lt,r as ve,u as Pt,y as ee}from"./index-4edb1c99.js";import{S as Ft}from"./SdkTabs-3741b181.js";import{F as Nt}from"./FieldsQueryParam-3e41088d.js";function ht(c,e,t){const n=c.slice();return n[8]=e[t],n}function yt(c,e,t){const n=c.slice();return n[8]=e[t],n}function kt(c,e,t){const n=c.slice();return n[13]=e[t],n}function vt(c){let e;return{c(){e=r("p"),e.innerHTML=`<em>Note that in case of a password change all previously issued tokens for the current record
|
||||
will be automatically invalidated and if you want your user to remain signed in you need to
|
||||
reauthenticate manually after the update call.</em>`},m(t,n){i(t,e,n)},d(t){t&&d(e)}}}function gt(c){let e;return{c(){e=r("p"),e.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",v(e,"class","txt-hint txt-sm txt-right")},m(t,n){i(t,e,n)},d(t){t&&d(e)}}}function wt(c){let e,t,n,u,m,o,p,h,w,S,g,$,P,E,M,U,F;return{c(){e=r("tr"),e.innerHTML='<td colspan="3" class="txt-hint">Auth fields</td>',t=f(),n=r("tr"),n.innerHTML='<td><div class="inline-flex"><span class="label label-warning">Optional</span> <span>username</span></div></td> <td><span class="label">String</span></td> <td>The username of the auth record.</td>',u=f(),m=r("tr"),m.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span> <span>email</span></div></td> <td><span class="label">String</span></td> <td>The auth record email address.
|
||||
<br/>
|
@ -1,4 +1,4 @@
|
||||
import{S as lt,i as nt,s as st,N as tt,O as K,e as o,w as _,b as m,c as W,f as b,g as r,h as l,m as X,x as ve,P as Je,Q as ot,k as at,R as it,n as rt,t as Q,a as U,o as d,d as Y,C as Ke,p as dt,r as Z,u as ct}from"./index-4c7ca1d0.js";import{S as pt}from"./SdkTabs-5ff67765.js";import{F as ut}from"./FieldsQueryParam-9cc13943.js";function We(a,n,s){const i=a.slice();return i[6]=n[s],i}function Xe(a,n,s){const i=a.slice();return i[6]=n[s],i}function Ye(a){let n;return{c(){n=o("p"),n.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",b(n,"class","txt-hint txt-sm txt-right")},m(s,i){r(s,n,i)},d(s){s&&d(n)}}}function Ze(a,n){let s,i,v;function p(){return n[5](n[6])}return{key:a,first:null,c(){s=o("button"),s.textContent=`${n[6].code} `,b(s,"class","tab-item"),Z(s,"active",n[2]===n[6].code),this.first=s},m(c,f){r(c,s,f),i||(v=ct(s,"click",p),i=!0)},p(c,f){n=c,f&20&&Z(s,"active",n[2]===n[6].code)},d(c){c&&d(s),i=!1,v()}}}function et(a,n){let s,i,v,p;return i=new tt({props:{content:n[6].body}}),{key:a,first:null,c(){s=o("div"),W(i.$$.fragment),v=m(),b(s,"class","tab-item"),Z(s,"active",n[2]===n[6].code),this.first=s},m(c,f){r(c,s,f),X(i,s,null),l(s,v),p=!0},p(c,f){n=c,(!p||f&20)&&Z(s,"active",n[2]===n[6].code)},i(c){p||(Q(i.$$.fragment,c),p=!0)},o(c){U(i.$$.fragment,c),p=!1},d(c){c&&d(s),Y(i)}}}function ft(a){var je,Ve;let n,s,i=a[0].name+"",v,p,c,f,w,C,ee,j=a[0].name+"",te,$e,le,F,ne,x,se,$,V,ye,z,T,we,oe,G=a[0].name+"",ae,Ce,ie,Fe,re,B,de,A,ce,I,pe,R,ue,Re,M,O,fe,Oe,me,Pe,h,De,E,Te,Ee,Se,be,xe,_e,Be,Ae,Ie,he,Me,qe,S,ke,q,ge,P,H,y=[],He=new Map,Le,L,k=[],Ne=new Map,D;F=new pt({props:{js:`
|
||||
import{S as lt,i as nt,s as st,N as tt,O as K,e as o,w as _,b as m,c as W,f as b,g as r,h as l,m as X,x as ve,P as Je,Q as ot,k as at,R as it,n as rt,t as Q,a as U,o as d,d as Y,C as Ke,p as dt,r as Z,u as ct}from"./index-4edb1c99.js";import{S as pt}from"./SdkTabs-3741b181.js";import{F as ut}from"./FieldsQueryParam-3e41088d.js";function We(a,n,s){const i=a.slice();return i[6]=n[s],i}function Xe(a,n,s){const i=a.slice();return i[6]=n[s],i}function Ye(a){let n;return{c(){n=o("p"),n.innerHTML="Requires admin <code>Authorization:TOKEN</code> header",b(n,"class","txt-hint txt-sm txt-right")},m(s,i){r(s,n,i)},d(s){s&&d(n)}}}function Ze(a,n){let s,i,v;function p(){return n[5](n[6])}return{key:a,first:null,c(){s=o("button"),s.textContent=`${n[6].code} `,b(s,"class","tab-item"),Z(s,"active",n[2]===n[6].code),this.first=s},m(c,f){r(c,s,f),i||(v=ct(s,"click",p),i=!0)},p(c,f){n=c,f&20&&Z(s,"active",n[2]===n[6].code)},d(c){c&&d(s),i=!1,v()}}}function et(a,n){let s,i,v,p;return i=new tt({props:{content:n[6].body}}),{key:a,first:null,c(){s=o("div"),W(i.$$.fragment),v=m(),b(s,"class","tab-item"),Z(s,"active",n[2]===n[6].code),this.first=s},m(c,f){r(c,s,f),X(i,s,null),l(s,v),p=!0},p(c,f){n=c,(!p||f&20)&&Z(s,"active",n[2]===n[6].code)},i(c){p||(Q(i.$$.fragment,c),p=!0)},o(c){U(i.$$.fragment,c),p=!1},d(c){c&&d(s),Y(i)}}}function ft(a){var je,Ve;let n,s,i=a[0].name+"",v,p,c,f,w,C,ee,j=a[0].name+"",te,$e,le,F,ne,x,se,$,V,ye,z,T,we,oe,G=a[0].name+"",ae,Ce,ie,Fe,re,B,de,A,ce,I,pe,R,ue,Re,M,O,fe,Oe,me,Pe,h,De,E,Te,Ee,Se,be,xe,_e,Be,Ae,Ie,he,Me,qe,S,ke,q,ge,P,H,y=[],He=new Map,Le,L,k=[],Ne=new Map,D;F=new pt({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = new PocketBase('${a[3]}');
|
File diff suppressed because one or more lines are too long
2
ui/dist/index.html
vendored
2
ui/dist/index.html
vendored
@ -45,7 +45,7 @@
|
||||
window.Prism = window.Prism || {};
|
||||
window.Prism.manual = true;
|
||||
</script>
|
||||
<script type="module" crossorigin src="./assets/index-4c7ca1d0.js"></script>
|
||||
<script type="module" crossorigin src="./assets/index-4edb1c99.js"></script>
|
||||
<link rel="stylesheet" href="./assets/index-438f50cd.css">
|
||||
</head>
|
||||
<body>
|
||||
|
@ -1,12 +1,35 @@
|
||||
<script>
|
||||
import CodeBlock from "@/components/base/CodeBlock.svelte";
|
||||
</script>
|
||||
|
||||
<tr>
|
||||
<td id="query-page">fields</td>
|
||||
<td>
|
||||
<span class="label">String</span>
|
||||
</td>
|
||||
<td>
|
||||
Comma separated string of the fields to return in the JSON response
|
||||
<em>(by default returns all fields)</em>. For example:
|
||||
<br>
|
||||
<code>?fields=id,expand.relField.id,expand.relField.created</code>
|
||||
<p>
|
||||
Comma separated string of the fields to return in the JSON response
|
||||
<em>(by default returns all fields)</em>. Ex.:
|
||||
<CodeBlock
|
||||
content={`
|
||||
?fields=*,expand.relField.name
|
||||
`}
|
||||
/>
|
||||
</p>
|
||||
<p>
|
||||
<code>*</code> targets all keys from the specific depth level.
|
||||
</p>
|
||||
<p>In addition, the following field modifiers are also supported:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<code>:excerpt(maxLength, withEllipsis?)</code>
|
||||
<br />
|
||||
Returns a short plain text version of the field string value.
|
||||
<br />
|
||||
Ex.:
|
||||
<code>?fields=*,description:excerpt(200,true)</code>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -4,6 +4,7 @@
|
||||
import CodeBlock from "@/components/base/CodeBlock.svelte";
|
||||
import FilterSyntax from "@/components/collections/docs/FilterSyntax.svelte";
|
||||
import SdkTabs from "@/components/collections/docs/SdkTabs.svelte";
|
||||
import FieldsQueryParam from "@/components/collections/docs/FieldsQueryParam.svelte";
|
||||
|
||||
export let collection;
|
||||
|
||||
@ -209,20 +210,7 @@
|
||||
Only the relations to which the request user has permissions to <strong>view</strong> will be expanded.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="query-page">fields</td>
|
||||
<td>
|
||||
<span class="label">String</span>
|
||||
</td>
|
||||
<td>
|
||||
Comma separated string of the fields to return in the JSON response
|
||||
<em>(by default returns all fields)</em>.
|
||||
<br />
|
||||
Use <code>*</code> to target all keys from the specific depth level.
|
||||
<br />
|
||||
For example: <code>?fields=*,expand.author.name</code>
|
||||
</td>
|
||||
</tr>
|
||||
<FieldsQueryParam />
|
||||
<tr>
|
||||
<td id="query-page">skipTotal</td>
|
||||
<td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user