UNPKG

@ulb-darmstadt/shacl-form

Version:
1 lines 829 B
var e={d:(t,r)=>{for(var i in r)e.o(r,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};e.d(t,{p:()=>i});class r{constructor(e,t){this.predicate=e.predicate,this.datatype=e.datatype,t&&(this.stylesheet=new CSSStyleSheet,this.stylesheet.replaceSync(t))}createViewer(e,t){return e.config.theme.createViewer(e.label,t,e)}}class i extends r{constructor(e,t,r){super(e),this.onChange=t,this.fileType=r}createEditor(e){var t;const r=void 0!==e.minCount&&e.minCount>0,i=e.config.theme.createFileEditor(e.label,null,r,e);return i.addEventListener("change",(e=>{e.stopPropagation(),this.onChange(e)})),this.fileType&&(null===(t=i.querySelector('input[type="file"]'))||void 0===t||t.setAttribute("accept",this.fileType)),i}}var a=t.p;export{a as FileUploadPlugin};