avo 2.9.1.pre4 → 2.9.1.pre5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of avo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -3
- data/app/assets/builds/avo.js +1 -1
- data/app/assets/builds/avo.js.map +2 -2
- data/app/components/avo/actions_component.rb +2 -6
- data/app/components/avo/base_component.rb +0 -2
- data/app/components/avo/fields/common/single_file_viewer_component.rb +1 -1
- data/app/components/avo/index/ordering/button_component.rb +13 -3
- data/app/components/avo/views/resource_index_component.rb +2 -2
- data/app/controllers/avo/application_controller.rb +3 -24
- data/app/javascript/avo.js +1 -5
- data/app/views/avo/partials/_javascript.html.erb +1 -1
- data/config/routes.rb +1 -1
- data/lib/avo/app.rb +4 -8
- data/lib/avo/base_card.rb +7 -1
- data/lib/avo/dashboards/base_dashboard.rb +1 -1
- data/lib/avo/fields/has_base_field.rb +1 -3
- data/lib/avo/fields/has_one_field.rb +1 -4
- data/lib/avo/menu/builder.rb +6 -1
- data/lib/avo/version.rb +1 -1
- data/lib/avo.rb +0 -1
- data/lib/generators/avo/templates/locales/avo.fr.yml +115 -0
- data/public/avo-assets/avo.js +1 -1
- data/public/avo-assets/avo.js.map +2 -2
- metadata +2 -2
- data/lib/avo/services/uri_service.rb +0 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6512a0f8b1ec04fdbc67d8929d47113b9711d38b014e7784b6c25bccaf0163de
|
4
|
+
data.tar.gz: 95e7535efc1dec6f0ce785953cc6324de2776f56465d2a3f1cd824022f436c91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ee889a86a4db15637aa7e3c67f6f3d39df08d4642aa8710bbe622eb3787621a3d071da9144f2bc498fbda4443e9a99afdf60842eafa8c8f279399306cb956c9
|
7
|
+
data.tar.gz: 5cbc078905436417b6051b6afe3607751cc1ebe7373588bb6656b88bbb0ff0c446fdebd4c97b72c468aff03920aba6f040e27a3ee622f6a4c8841926922cda10
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
avo (2.9.1.
|
4
|
+
avo (2.9.1.pre5)
|
5
5
|
active_link_to
|
6
6
|
addressable
|
7
7
|
breadcrumbs_on_rails
|
@@ -252,8 +252,6 @@ GEM
|
|
252
252
|
nokogiri (1.13.4)
|
253
253
|
mini_portile2 (~> 2.8.0)
|
254
254
|
racc (~> 1.4)
|
255
|
-
nokogiri (1.13.4-x86_64-linux)
|
256
|
-
racc (~> 1.4)
|
257
255
|
orm_adapter (0.5.0)
|
258
256
|
pagy (5.10.1)
|
259
257
|
activesupport
|
data/app/assets/builds/avo.js
CHANGED
@@ -413,7 +413,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
413
413
|
%t [data-trix-cursor-target=right] {
|
414
414
|
vertical-align: bottom !important;
|
415
415
|
margin-right: -1px !important;
|
416
|
-
}`,trixId:{get:function(){return this.hasAttribute("trix-id")?this.getAttribute("trix-id"):(this.setAttribute("trix-id",++T),this.trixId)}},labels:{get:function(){var D,M,P;return M=[],this.id&&this.ownerDocument&&M.push.apply(M,this.ownerDocument.querySelectorAll("label[for='"+this.id+"']")),(D=i(this,{matchingSelector:"label"}))&&((P=D.control)===this||P===null)&&M.push(D),M}},toolbarElement:{get:function(){var D,M,P;return this.hasAttribute("toolbar")?(M=this.ownerDocument)!=null?M.getElementById(this.getAttribute("toolbar")):void 0:this.parentNode?(P="trix-toolbar-"+this.trixId,this.setAttribute("toolbar",P),D=s("trix-toolbar",{id:P}),this.parentNode.insertBefore(D,this),D):void 0}},inputElement:{get:function(){var D,M,P;return this.hasAttribute("input")?(P=this.ownerDocument)!=null?P.getElementById(this.getAttribute("input")):void 0:this.parentNode?(M="trix-input-"+this.trixId,this.setAttribute("input",M),D=s("input",{type:"hidden",id:M}),this.parentNode.insertBefore(D,this.nextElementSibling),D):void 0}},editor:{get:function(){var D;return(D=this.editorController)!=null?D.editor:void 0}},name:{get:function(){var D;return(D=this.inputElement)!=null?D.name:void 0}},value:{get:function(){var D;return(D=this.inputElement)!=null?D.value:void 0},set:function(D){var M;return this.defaultValue=D,(M=this.editor)!=null?M.loadHTML(this.defaultValue):void 0}},notify:function(D,M){return this.editorController?u("trix-"+D,{onElement:this,attributes:M}):void 0},setInputElementValue:function(D){var M;return(M=this.inputElement)!=null?M.value=D:void 0},initialize:function(){return this.hasAttribute("data-trix-internal")?void 0:(k(this),f(this),w(this))},connect:function(){return this.hasAttribute("data-trix-internal")?void 0:(this.editorController||(u("trix-before-initialize",{onElement:this}),this.editorController=new e.EditorController({editorElement:this,html:this.defaultValue=this.value}),requestAnimationFrame(function(D){return function(){return u("trix-initialize",{onElement:D})}}(this))),this.editorController.registerSelectionManager(),this.registerResetListener(),this.registerClickListener(),p(this))},disconnect:function(){var D;return(D=this.editorController)!=null&&D.unregisterSelectionManager(),this.unregisterResetListener(),this.unregisterClickListener()},registerResetListener:function(){return this.resetListener=this.resetBubbled.bind(this),window.addEventListener("reset",this.resetListener,!1)},unregisterResetListener:function(){return window.removeEventListener("reset",this.resetListener,!1)},registerClickListener:function(){return this.clickListener=this.clickBubbled.bind(this),window.addEventListener("click",this.clickListener,!1)},unregisterClickListener:function(){return window.removeEventListener("click",this.clickListener,!1)},resetBubbled:function(D){var M;if(!D.defaultPrevented&&D.target===((M=this.inputElement)!=null?M.form:void 0))return this.reset()},clickBubbled:function(D){var M;if(!(D.defaultPrevented||this.contains(D.target)||!(M=i(D.target,{matchingSelector:"label"}))||c.call(this.labels,M)<0))return this.focus()},reset:function(){return this.value=this.defaultValue}}}())}.call(this),function(){}.call(this)}).call(this),typeof Ch=="object"&&Ch.exports?Ch.exports=e:typeof define=="function"&&define.amd&&define(e)}.call(Eh)});var ZMt,yC,$fe=se(()=>{ZMt=Vr(Vfe());Nr();Qg();yC=class extends At{get resourceId(){return this.controllerTarget.dataset.resourceId}get resourceName(){return this.controllerTarget.dataset.resourceName}get attachmentKey(){return this.controllerTarget.dataset.attachmentKey}get attachmentsDisabled(){return fo(this.controllerTarget.dataset.attachmentsDisabled)}get hideAttachmentFilename(){return fo(this.controllerTarget.dataset.hideAttachmentFilename)}get hideAttachmentFilesize(){return fo(this.controllerTarget.dataset.hideAttachmentFilesize)}get hideAttachmentUrl(){return fo(this.controllerTarget.dataset.hideAttachmentUrl)}get uploadUrl(){return`${window.location.origin}${window.Avo.configuration.root_path}/avo_api/resources/${this.resourceName}/${this.resourceId}/attachments`}connect(){this.attachmentsDisabled&&this.controllerTarget.querySelector(".trix-button-group--file-tools").remove(),window.addEventListener("trix-file-accept",t=>{if(t.target===this.editorTarget){if(this.attachmentsDisabled){t.preventDefault(),window.toastr.warning("This field has attachments disabled.");return}if(this.resourceId===""){t.preventDefault(),window.toastr.warning("You can't upload files into the Trix editor until you save the resource.");return}this.attachmentKey===""&&(t.preventDefault(),window.toastr.warning("You haven't set an <a href='https://google.com' class='!text-blue-700 underline'>attachment_key</a> to this Trix field."))}}),window.addEventListener("trix-attachment-add",t=>{t.target===this.editorTarget&&t.attachment.file&&this.uploadFileAttachment(t.attachment)})}uploadFileAttachment(t){this.uploadFile(t.file,e=>t.setUploadProgress(e),e=>t.setAttributes(e))}uploadFile(t,e,r){let n=this.createFormData(t),i=new XMLHttpRequest;i.open("POST",this.uploadUrl,!0),i.setRequestHeader("X-CSRF-Token",document.querySelector('meta[name="csrf-token"]').content),i.upload.addEventListener("progress",o=>{let a=o.loaded/o.total*100;e(a)}),i.addEventListener("load",()=>{if(i.status===200){let o;try{o=JSON.parse(i.response)}catch(s){o={}}let a={url:o.url,href:o.href};this.hideAttachmentFilename&&(a.filename=null),this.hideAttachmentFilesize&&(a.filesize=null),this.hideAttachmentUrl&&(a.href=null),r(a)}}),i.send(n)}createFormData(t){let e=new FormData;return e.append("Content-Type",t.type),e.append("file",t),e.append("filename",t.name),e.append("attachment_key",this.attachmentKey),e}};Ct(yC,"targets",["editor","controller"])});var Yfe=se(()=>{wre();_re();Mre();Ire();Lre();jre();Gne();Xne();Qne();goe();em();moe();voe();yoe();boe();xoe();woe();_oe();Soe();koe();Eoe();lse();use();cse();Ece();Ace();Tce();yfe();Cfe();Afe();Tfe();Ufe();$fe();xr.register("action",m1);xr.register("actions-picker",n0);xr.register("attachments",_1);xr.register("boolean-filter",T1);xr.register("copy-to-clipboard",rq);xr.register("dashboard-card",L1);xr.register("filter",Ca);xr.register("hidden-input",rE);xr.register("item-select-all",nE);xr.register("item-selector",iE);xr.register("loading-button",eF);xr.register("menu",aE);xr.register("mobile",sE);xr.register("modal",lE);xr.register("multiple-select-filter",uE);xr.register("per-page",cE);xr.register("resource-edit",w0);xr.register("resource-index",oF);xr.register("resource-show",aF);xr.register("search",qE);xr.register("select",FE);xr.register("select-filter",NE);xr.register("tags-field",dC);xr.register("text-filter",hC);xr.register("tippy",pC);xr.register("toggle-panel",vC);xr.register("belongs-to-field",S1);xr.register("code-field",I1);xr.register("date-field",tE);xr.register("key-value",oE);xr.register("simple-mde",fC);xr.register("trix-field",yC)});var Trt=Z(Qfe=>{var qIt=Vr(JG()),FIt=Vr(eX()),Kfe=Vr(rX()),Gfe=Vr(aL());CL();var Xfe=Vr(JX());nP();zte();Hte();Yfe();Xfe.default.start();window.Turbolinks=Vd;var bC=null;Gfe.bind("r r r",()=>{bC=document.scrollingElement.scrollTop,Vd.visit(window.location.href,{action:"replace"})});function Art(){window.navigator.userAgent.indexOf("Mac OS X")?(document.body.classList.add("os-mac"),document.body.classList.remove("os-pc")):(document.body.classList.add("os-pc"),document.body.classList.remove("os-mac"))}function rN(){$S('[data-tippy="tooltip"]',{theme:"light",content(t){let e=t.getAttribute("title");return t.removeAttribute("title"),t.removeAttribute("data-tippy"),e}})}window.initTippy=rN;Kfe.start();document.addEventListener("turbo:load",()=>{document.body.classList.remove("turbo-loading"),rN(),Art(),bC&&setTimeout(()=>{document.scrollingElement.scrollTo(0,bC),bC=0},50)});document.addEventListener("turbo:frame-load",()=>{rN()});document.addEventListener("turbo:before-fetch-response",t=>jN(Qfe,null,function*(){
|
416
|
+
}`,trixId:{get:function(){return this.hasAttribute("trix-id")?this.getAttribute("trix-id"):(this.setAttribute("trix-id",++T),this.trixId)}},labels:{get:function(){var D,M,P;return M=[],this.id&&this.ownerDocument&&M.push.apply(M,this.ownerDocument.querySelectorAll("label[for='"+this.id+"']")),(D=i(this,{matchingSelector:"label"}))&&((P=D.control)===this||P===null)&&M.push(D),M}},toolbarElement:{get:function(){var D,M,P;return this.hasAttribute("toolbar")?(M=this.ownerDocument)!=null?M.getElementById(this.getAttribute("toolbar")):void 0:this.parentNode?(P="trix-toolbar-"+this.trixId,this.setAttribute("toolbar",P),D=s("trix-toolbar",{id:P}),this.parentNode.insertBefore(D,this),D):void 0}},inputElement:{get:function(){var D,M,P;return this.hasAttribute("input")?(P=this.ownerDocument)!=null?P.getElementById(this.getAttribute("input")):void 0:this.parentNode?(M="trix-input-"+this.trixId,this.setAttribute("input",M),D=s("input",{type:"hidden",id:M}),this.parentNode.insertBefore(D,this.nextElementSibling),D):void 0}},editor:{get:function(){var D;return(D=this.editorController)!=null?D.editor:void 0}},name:{get:function(){var D;return(D=this.inputElement)!=null?D.name:void 0}},value:{get:function(){var D;return(D=this.inputElement)!=null?D.value:void 0},set:function(D){var M;return this.defaultValue=D,(M=this.editor)!=null?M.loadHTML(this.defaultValue):void 0}},notify:function(D,M){return this.editorController?u("trix-"+D,{onElement:this,attributes:M}):void 0},setInputElementValue:function(D){var M;return(M=this.inputElement)!=null?M.value=D:void 0},initialize:function(){return this.hasAttribute("data-trix-internal")?void 0:(k(this),f(this),w(this))},connect:function(){return this.hasAttribute("data-trix-internal")?void 0:(this.editorController||(u("trix-before-initialize",{onElement:this}),this.editorController=new e.EditorController({editorElement:this,html:this.defaultValue=this.value}),requestAnimationFrame(function(D){return function(){return u("trix-initialize",{onElement:D})}}(this))),this.editorController.registerSelectionManager(),this.registerResetListener(),this.registerClickListener(),p(this))},disconnect:function(){var D;return(D=this.editorController)!=null&&D.unregisterSelectionManager(),this.unregisterResetListener(),this.unregisterClickListener()},registerResetListener:function(){return this.resetListener=this.resetBubbled.bind(this),window.addEventListener("reset",this.resetListener,!1)},unregisterResetListener:function(){return window.removeEventListener("reset",this.resetListener,!1)},registerClickListener:function(){return this.clickListener=this.clickBubbled.bind(this),window.addEventListener("click",this.clickListener,!1)},unregisterClickListener:function(){return window.removeEventListener("click",this.clickListener,!1)},resetBubbled:function(D){var M;if(!D.defaultPrevented&&D.target===((M=this.inputElement)!=null?M.form:void 0))return this.reset()},clickBubbled:function(D){var M;if(!(D.defaultPrevented||this.contains(D.target)||!(M=i(D.target,{matchingSelector:"label"}))||c.call(this.labels,M)<0))return this.focus()},reset:function(){return this.value=this.defaultValue}}}())}.call(this),function(){}.call(this)}).call(this),typeof Ch=="object"&&Ch.exports?Ch.exports=e:typeof define=="function"&&define.amd&&define(e)}.call(Eh)});var ZMt,yC,$fe=se(()=>{ZMt=Vr(Vfe());Nr();Qg();yC=class extends At{get resourceId(){return this.controllerTarget.dataset.resourceId}get resourceName(){return this.controllerTarget.dataset.resourceName}get attachmentKey(){return this.controllerTarget.dataset.attachmentKey}get attachmentsDisabled(){return fo(this.controllerTarget.dataset.attachmentsDisabled)}get hideAttachmentFilename(){return fo(this.controllerTarget.dataset.hideAttachmentFilename)}get hideAttachmentFilesize(){return fo(this.controllerTarget.dataset.hideAttachmentFilesize)}get hideAttachmentUrl(){return fo(this.controllerTarget.dataset.hideAttachmentUrl)}get uploadUrl(){return`${window.location.origin}${window.Avo.configuration.root_path}/avo_api/resources/${this.resourceName}/${this.resourceId}/attachments`}connect(){this.attachmentsDisabled&&this.controllerTarget.querySelector(".trix-button-group--file-tools").remove(),window.addEventListener("trix-file-accept",t=>{if(t.target===this.editorTarget){if(this.attachmentsDisabled){t.preventDefault(),window.toastr.warning("This field has attachments disabled.");return}if(this.resourceId===""){t.preventDefault(),window.toastr.warning("You can't upload files into the Trix editor until you save the resource.");return}this.attachmentKey===""&&(t.preventDefault(),window.toastr.warning("You haven't set an <a href='https://google.com' class='!text-blue-700 underline'>attachment_key</a> to this Trix field."))}}),window.addEventListener("trix-attachment-add",t=>{t.target===this.editorTarget&&t.attachment.file&&this.uploadFileAttachment(t.attachment)})}uploadFileAttachment(t){this.uploadFile(t.file,e=>t.setUploadProgress(e),e=>t.setAttributes(e))}uploadFile(t,e,r){let n=this.createFormData(t),i=new XMLHttpRequest;i.open("POST",this.uploadUrl,!0),i.setRequestHeader("X-CSRF-Token",document.querySelector('meta[name="csrf-token"]').content),i.upload.addEventListener("progress",o=>{let a=o.loaded/o.total*100;e(a)}),i.addEventListener("load",()=>{if(i.status===200){let o;try{o=JSON.parse(i.response)}catch(s){o={}}let a={url:o.url,href:o.href};this.hideAttachmentFilename&&(a.filename=null),this.hideAttachmentFilesize&&(a.filesize=null),this.hideAttachmentUrl&&(a.href=null),r(a)}}),i.send(n)}createFormData(t){let e=new FormData;return e.append("Content-Type",t.type),e.append("file",t),e.append("filename",t.name),e.append("attachment_key",this.attachmentKey),e}};Ct(yC,"targets",["editor","controller"])});var Yfe=se(()=>{wre();_re();Mre();Ire();Lre();jre();Gne();Xne();Qne();goe();em();moe();voe();yoe();boe();xoe();woe();_oe();Soe();koe();Eoe();lse();use();cse();Ece();Ace();Tce();yfe();Cfe();Afe();Tfe();Ufe();$fe();xr.register("action",m1);xr.register("actions-picker",n0);xr.register("attachments",_1);xr.register("boolean-filter",T1);xr.register("copy-to-clipboard",rq);xr.register("dashboard-card",L1);xr.register("filter",Ca);xr.register("hidden-input",rE);xr.register("item-select-all",nE);xr.register("item-selector",iE);xr.register("loading-button",eF);xr.register("menu",aE);xr.register("mobile",sE);xr.register("modal",lE);xr.register("multiple-select-filter",uE);xr.register("per-page",cE);xr.register("resource-edit",w0);xr.register("resource-index",oF);xr.register("resource-show",aF);xr.register("search",qE);xr.register("select",FE);xr.register("select-filter",NE);xr.register("tags-field",dC);xr.register("text-filter",hC);xr.register("tippy",pC);xr.register("toggle-panel",vC);xr.register("belongs-to-field",S1);xr.register("code-field",I1);xr.register("date-field",tE);xr.register("key-value",oE);xr.register("simple-mde",fC);xr.register("trix-field",yC)});var Trt=Z(Qfe=>{var qIt=Vr(JG()),FIt=Vr(eX()),Kfe=Vr(rX()),Gfe=Vr(aL());CL();var Xfe=Vr(JX());nP();zte();Hte();Yfe();Xfe.default.start();window.Turbolinks=Vd;var bC=null;Gfe.bind("r r r",()=>{bC=document.scrollingElement.scrollTop,Vd.visit(window.location.href,{action:"replace"})});function Art(){window.navigator.userAgent.indexOf("Mac OS X")?(document.body.classList.add("os-mac"),document.body.classList.remove("os-pc")):(document.body.classList.add("os-pc"),document.body.classList.remove("os-mac"))}function rN(){$S('[data-tippy="tooltip"]',{theme:"light",content(t){let e=t.getAttribute("title");return t.removeAttribute("title"),t.removeAttribute("data-tippy"),e}})}window.initTippy=rN;Kfe.start();document.addEventListener("turbo:load",()=>{document.body.classList.remove("turbo-loading"),rN(),Art(),bC&&setTimeout(()=>{document.scrollingElement.scrollTo(0,bC),bC=0},50)});document.addEventListener("turbo:frame-load",()=>{rN()});document.addEventListener("turbo:before-fetch-response",t=>jN(Qfe,null,function*(){if(t.detail.fetchResponse.response.status===500){let{id:e,src:r}=t.target;t.target.src=`${window.Avo.configuration.root_path}/failed_to_load?turbo_frame=${e}&src=${r}`}}));document.addEventListener("turbo:visit",()=>document.body.classList.add("turbo-loading"));document.addEventListener("turbo:submit-start",()=>document.body.classList.add("turbo-loading"));document.addEventListener("turbo:submit-end",()=>document.body.classList.remove("turbo-loading"));document.addEventListener("turbo:before-cache",()=>{document.querySelectorAll("[data-turbo-remove-before-cache]").forEach(t=>t.remove())});window.Avo=window.Avo||{configuration:{}};window.Avo.menus={resetCollapsedState(){Array.from(document.querySelectorAll("[data-menu-key-param]")).map(t=>t.getAttribute("data-menu-key-param")).filter(Boolean).forEach(t=>{window.localStorage.removeItem(t)})}}});Trt();})();
|
417
417
|
/*!
|
418
418
|
* @kurkle/color v0.1.9
|
419
419
|
* https://github.com/kurkle/color#readme
|