diff --git a/cmd/qor5/admin-template/admin/config.go b/cmd/qor5/admin-template/admin/config.go index 088b2a1..f91dd4a 100644 --- a/cmd/qor5/admin-template/admin/config.go +++ b/cmd/qor5/admin-template/admin/config.go @@ -6,8 +6,8 @@ import ( "github.com/qor5/admin/v3/presets" "github.com/qor5/admin/v3/presets/gorm2op" "github.com/qor5/docs/v3/cmd/qor5/admin-template/models" - . "github.com/qor5/ui/v3/vuetify" "github.com/qor5/web/v3" + . "github.com/qor5/x/v3/ui/vuetify" . "github.com/theplant/htmlgo" ) diff --git a/cmd/qor5/website-template/admin/config.go b/cmd/qor5/website-template/admin/config.go index 50e2949..e0185a3 100644 --- a/cmd/qor5/website-template/admin/config.go +++ b/cmd/qor5/website-template/admin/config.go @@ -14,10 +14,10 @@ import ( "github.com/qor5/admin/v3/publish" "github.com/qor5/admin/v3/seo" "github.com/qor5/admin/v3/utils" - "github.com/qor5/ui/v3/vuetify" "github.com/qor5/web/v3" "github.com/qor5/x/v3/login" "github.com/qor5/x/v3/perm" + "github.com/qor5/x/v3/ui/vuetify" h "github.com/theplant/htmlgo" "golang.org/x/text/language" ) diff --git a/docs/activity-log.html b/docs/activity-log.html index fe48cf3..14aeeb8 100644 --- a/docs/activity-log.html +++ b/docs/activity-log.html @@ -237,7 +237,7 @@
This example demonstrates how to register Product into the activity. The activities on the product model will be automatically recorded when it is created, updated, or deleted.
By default, the activity package will use the primary key as the key to indentify the current model data. You can use SetKeys and AddKeys methods to customize it.
When diffing the modified data, the activity package will ignore the ID, CreatedAt, UpdatedAt, DeletedAt fields. You can either use AddIgnoredFields to append your own fields to the default ignored fields. Or SetIgnoredFields method to replace the default ignored fields.
For special fields like time.Time or media files handled by QOR5 media_library, activity package already handled them. You can use AddTypeHanders method to handle your own field types.
Assume we have a status filed in Post. It has 2 possible values, "draft" and "online". If we want to filter posts by its status. We can add a filter like this:
Use .Attr(web.VField("Abc")...) to set the field name, make the name matches your data struct field name.
diff --git a/docs/basics/i18n.html b/docs/basics/i18n.html
index f06fa03..c38c962 100644
--- a/docs/basics/i18n.html
+++ b/docs/basics/i18n.html
@@ -229,7 +229,7 @@
Register locales here.
-You can use GetSupportLocaleCodesFromRequestFunc to determine who can use which locales.
SupportLocalesFunc to determine who can use which locales.
-Use l10n_view.Configure() func to configure l10n view.
The Switch Locale ui will appear below the Brand.
@@ -239,13 +239,13 @@
What we did with above code:
@@ -257,7 +257,7 @@FilterDataFunc of presets.ListingBuilder setup to have the filter menu or not.
@@ -284,7 +284,7 @@
Query string name must be from the Filter's item configuration key field.
The example shows how to enable both username/password login and OAuth login.
-To enable Username/Password login, the UserModel needs to implement the UserPasser interface. There is a default implementation - UserPass.
This page have several state that encoded in the url:
diff --git a/docs/basics/menu.html b/docs/basics/menu.html index fc3cfb0..278ef62 100644 --- a/docs/basics/menu.html +++ b/docs/basics/menu.html @@ -236,7 +236,7 @@Note that you have to mount the web.Page(...) instance to http.ServeMux with a path to be able to access the PageFunc in your browser, when mounting you can also wrap the PageFunc with middleware, which is func(in PageFunc) (out PageFunc) a func that take a page func and do some wrapping and return a new page func
web.Portal().Name("part1") Place a placeholder inside you page, and append web.PortalUpdate to er.UpdatePortals to update the portal with that name.
@@ -251,7 +251,7 @@
It is not only load the portal in separate AJAX request, Also you can reload it with ease er.ReloadPortals = []string{"related_products"} in an event func.
And this *presets.Builder instance is actually also a http.Handler, So that we can mount it
diff --git a/docs/basics/publish.html b/docs/basics/publish.html
index a012473..8ebae7c 100644
--- a/docs/basics/publish.html
+++ b/docs/basics/publish.html
@@ -233,7 +233,7 @@
Create publisher and configure Publish view for model, and remember to display Status and Schedule fields in Editing
-Implement the publish interfaces if there is a need to publish content to storage(filesystem, AWS S3, ...)
ctx.Flash Object is used to pass data between web.EventFunc to web.PageFunc just after the event func is executed. quite similar to Rails's Flash.
diff --git a/docs/basics/shortcut.html b/docs/basics/shortcut.html
index 5f88c81..c672c00 100644
--- a/docs/basics/shortcut.html
+++ b/docs/basics/shortcut.html
@@ -224,13 +224,13 @@
Also you can setup the filter function to limit when this event can be triggered by shortcut.
In the example, the event would only be triggered when locals.shortCutEnabled is opened.
When running the above demo, If you check Chrome Developer Tools about Network requests,
diff --git a/docs/basics/web-scope.html b/docs/basics/web-scope.html
index 615406f..4ad8af8 100644
--- a/docs/basics/web-scope.html
+++ b/docs/basics/web-scope.html
@@ -233,7 +233,7 @@
Use web.Scope() to determine the effective scope of the variable, then use .Init(...).VSlot("{ locals }") to initialize the variable and slot it into the locals object.
Use web.Scope().VSlot("{ form }") to determine the scope of a form.
Action Worker is used to visualize the progress of long-running actions.
-You can see from the example, We have created Navbar and Carousel components by
diff --git a/docs/components-guide/integrate-a-heavy-vue-component.html b/docs/components-guide/integrate-a-heavy-vue-component.html
index 9fe3ba4..743f83a 100644
--- a/docs/components-guide/integrate-a-heavy-vue-component.html
+++ b/docs/components-guide/integrate-a-heavy-vue-component.html
@@ -264,14 +264,14 @@
And we write a page func to use it like any other component:
-And now let's check out our fruits:
diff --git a/docs/index.js b/docs/index.js index 4e4e114..aa30385 100644 --- a/docs/index.js +++ b/docs/index.js @@ -3,13 +3,16726 @@ * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ -var Vue=function(e){"use strict"; -/*! #__NO_SIDE_EFFECTS__ */function t(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const n={},s=[],o=()=>{},r=()=>!1,i=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),l=e=>e.startsWith("onUpdate:"),c=Object.assign,a=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},u=Object.prototype.hasOwnProperty,d=(e,t)=>u.call(e,t),p=Array.isArray,h=e=>"[object Map]"===x(e),f=e=>"[object Set]"===x(e),m=e=>"[object Date]"===x(e),g=e=>"function"==typeof e,y=e=>"string"==typeof e,v=e=>"symbol"==typeof e,b=e=>null!==e&&"object"==typeof e,_=e=>(b(e)||g(e))&&g(e.then)&&g(e.catch),S=Object.prototype.toString,x=e=>S.call(e),C=e=>x(e).slice(8,-1),k=e=>"[object Object]"===x(e),T=e=>y(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,w=t(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),A=t("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),E=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},N=/-(\w)/g,I=E((e=>e.replace(N,((e,t)=>t?t.toUpperCase():"")))),R=/\B([A-Z])/g,O=E((e=>e.replace(R,"-$1").toLowerCase())),L=E((e=>e.charAt(0).toUpperCase()+e.slice(1))),F=E((e=>e?`on${L(e)}`:"")),M=(e,t)=>!Object.is(e,t),P=(e,t)=>{for(let n=0;nd?J(e,r,i,!0,!1,p):A(t,n,o,r,i,l,c,a,p)},H=(e,t,n,o,r,i,l,c,a)=>{let u=0;const d=t.length;let p=e.length-1,h=d-1;for(;u<=p&&u<=h;){const s=e[u],o=t[u]=a?rr(t[u]):or(t[u]);if(!Xo(s,o))break;v(s,o,n,null,r,i,l,c,a),u++}for(;u<=p&&u<=h;){const s=e[p],o=t[h]=a?rr(t[h]):or(t[h]);if(!Xo(s,o))break;v(s,o,n,null,r,i,l,c,a),p--,h--}if(u>p){if(u<=h){const e=h+1,s=e0;let f=!1,m=0,g=!1,y=!1,b=!1,_=!1,S=!1,x=!1;const C=[],k=e=>{u.length&&(d.push(Ql(ou(u),c)),u=[]),e&&d.push(e)},T=()=>{t.scopes.vFor>0&&u.push(Zl(Yl("ref_for",!0),Yl("true")))},E=({key:e,value:n})=>{if(yc(e)){const r=e.content,l=i(r);if(!l||s&&!o||"onclick"===r.toLowerCase()||"onUpdate:modelValue"===r||w(r)||(_=!0),l&&w(r)&&(x=!0),l&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&Sa(n,t)>0)return;"ref"===r?g=!0:"class"===r?y=!0:"style"===r?b=!0:"key"===r||C.includes(r)||C.push(r),!s||"class"!==r&&"style"!==r||C.includes(r)||C.push(r)}else S=!0};for(let i=0;it(e,n,void 0,r&&r[n])));else{const n=Object.keys(e);o=new Array(n.length);for(let s=0,i=n.length;sy(e)?e:null==e?"":p(e)||b(e)&&(e.toString===S||!g(e.toString))?JSON.stringify(e,se,2):String(e),e.toHandlerKey=F,e.toHandlers=function(e,t){const n={};for(const s in e)n[t&&/[A-Z]/.test(s)?`on:${s}`:F(s)]=e[s];return n},e.toRaw=Ct,e.toRef=function(e,t,n){return It(e)?e:g(e)?new Dt(e):b(e)&&arguments.length>1?Ut(e,t,n):Rt(e)},e.toRefs=function(e){const t=p(e)?new Array(e.length):{};for(const n in e)t[n]=Ut(e,n);return t},e.toValue=function(e){return g(e)?e():Ft(e)},e.transformVNodeArgs=function(e){},e.triggerRef=function(e){Nt(e,4)},e.unref=Ft,e.useAttrs=function(){return Os().attrs},e.useCssModule=function(e="$style"){return n},e.useCssVars=function(e){const t=pr();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>ci(e,n)))},s=()=>{const s=e(t.proxy);li(t.subTree,s),n(s)};ys((()=>{Mn(s);const e=new MutationObserver(s);e.observe(t.subTree.el.parentNode,{childList:!0}),Ss((()=>e.disconnect()))}))},e.useModel=function(e,t,s=n){const o=pr(),r=I(t),i=O(t),l=Bt(((n,l)=>{let c;return Pn((()=>{const n=e[t];M(c,n)&&(c=n,l())})),{get:()=>(n(),s.get?s.get(c):c),set(e){const n=o.vnode.props;n&&(t in n||r in n||i in n)&&(`onUpdate:${t}`in n||`onUpdate:${r}`in n||`onUpdate:${i}`in n)||!M(e,c)||(c=e,l()),o.emit(`update:${t}`,s.set?s.set(e):e)}}})),c="modelValue"===t?"modelModifiers":`${t}Modifiers`;return l[Symbol.iterator]=()=>{let t=0;return{next:()=>t<2?{value:t++?e[c]||{}:l,done:!1}:{done:!0}}},l},e.useSSRContext=()=>{},e.useSlots=function(){return Os().slots},e.useTransitionState=Kn,e.vModelCheckbox=Di,e.vModelDynamic=zi,e.vModelRadio=ji,e.vModelSelect=Hi,e.vModelText=Vi,e.vShow=oi,e.version=Rr,e.warn=Or,e.watch=Bn,e.watchEffect=function(e,t){return Vn(e,null,t)},e.watchPostEffect=Mn,e.watchSyncEffect=Pn,e.withAsyncContext=function(e){const t=pr();let n=e();return gr(),_(n)&&(n=n.catch((e=>{throw mr(t),e}))),[n,()=>mr(t)]},e.withCtx=gn,e.withDefaults=function(e,t){return null},e.withDirectives=function(e,t){if(null===hn)return e;const s=wr(hn)||hn.proxy,o=e.dirs||(e.dirs=[]);for(let r=0;r