diff --git a/packages/forms/dist/components/file-upload.js b/packages/forms/dist/components/file-upload.js index f8d37ba34ea..bf860cd6fc4 100644 --- a/packages/forms/dist/components/file-upload.js +++ b/packages/forms/dist/components/file-upload.js @@ -42,7 +42,7 @@ ${p.outerHTML}${w} filepond/dist/filepond.esm.js: (*! - * FilePond 4.32.5 + * FilePond 4.32.6 * Licensed under MIT, https://opensource.org/licenses/MIT/ * Please visit https://pqina.nl/filepond/ for details. *) diff --git a/packages/forms/dist/components/rich-editor.js b/packages/forms/dist/components/rich-editor.js index b84eac023a7..121e40e5208 100644 --- a/packages/forms/dist/components/rich-editor.js +++ b/packages/forms/dist/components/rich-editor.js @@ -1,4 +1,4 @@ -var po="2.1.11",wt="[data-trix-attachment]",mi={preview:{presentation:"gallery",caption:{name:!0,size:!0}},file:{caption:{size:!0}}},W={default:{tagName:"div",parse:!1},quote:{tagName:"blockquote",nestable:!0},heading1:{tagName:"h1",terminal:!0,breakOnReturn:!0,group:!1},code:{tagName:"pre",terminal:!0,htmlAttributes:["language"],text:{plaintext:!0}},bulletList:{tagName:"ul",parse:!1},bullet:{tagName:"li",listAttribute:"bulletList",group:!1,nestable:!0,test(i){return Gi(i.parentNode)===W[this.listAttribute].tagName}},numberList:{tagName:"ol",parse:!1},number:{tagName:"li",listAttribute:"numberList",group:!1,nestable:!0,test(i){return Gi(i.parentNode)===W[this.listAttribute].tagName}},attachmentGallery:{tagName:"div",exclusive:!0,terminal:!0,parse:!1,group:!1}},Gi=i=>{var t;return i==null||(t=i.tagName)===null||t===void 0?void 0:t.toLowerCase()},$i=navigator.userAgent.match(/android\s([0-9]+.*Chrome)/i),En=$i&&parseInt($i[1]),xe={composesExistingText:/Android.*Chrome/.test(navigator.userAgent),recentAndroid:En&&En>12,samsungAndroid:En&&navigator.userAgent.match(/Android.*SM-/),forcesObjectResizing:/Trident.*rv:11/.test(navigator.userAgent),supportsInputEvents:typeof InputEvent<"u"&&["data","getTargetRanges","inputType"].every(i=>i in InputEvent.prototype)},Lr={ADD_ATTR:["language"],SAFE_FOR_XML:!1,RETURN_DOM:!0},m={attachFiles:"Attach Files",bold:"Bold",bullets:"Bullets",byte:"Byte",bytes:"Bytes",captionPlaceholder:"Add a caption\u2026",code:"Code",heading1:"Heading",indent:"Increase Level",italic:"Italic",link:"Link",numbers:"Numbers",outdent:"Decrease Level",quote:"Quote",redo:"Redo",remove:"Remove",strike:"Strikethrough",undo:"Undo",unlink:"Unlink",url:"URL",urlPlaceholder:"Enter a URL\u2026",GB:"GB",KB:"KB",MB:"MB",PB:"PB",TB:"TB"},fo=[m.bytes,m.KB,m.MB,m.GB,m.TB,m.PB],Dr={prefix:"IEC",precision:2,formatter(i){switch(i){case 0:return"0 ".concat(m.bytes);case 1:return"1 ".concat(m.byte);default:let t;this.prefix==="SI"?t=1e3:this.prefix==="IEC"&&(t=1024);let e=Math.floor(Math.log(i)/Math.log(t)),n=(i/Math.pow(t,e)).toFixed(this.precision).replace(/0*$/,"").replace(/\.$/,"");return"".concat(n," ").concat(fo[e])}}},an="\uFEFF",bt="\xA0",Nr=function(i){for(let t in i){let e=i[t];this[t]=e}return this},pi=document.documentElement,bo=pi.matches,S=function(i){let{onElement:t,matchingSelector:e,withCallback:n,inPhase:r,preventDefault:o,times:s}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=t||pi,c=e,u=r==="capturing",d=function(C){s!=null&&--s==0&&d.destroy();let T=vt(C.target,{matchingSelector:c});T!=null&&(n?.call(T,C,T),o&&C.preventDefault())};return d.destroy=()=>l.removeEventListener(i,d,u),l.addEventListener(i,d,u),d},he=function(i){let{onElement:t,bubbles:e,cancelable:n,attributes:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=t??pi;e=e!==!1,n=n!==!1;let s=document.createEvent("Events");return s.initEvent(i,e,n),r!=null&&Nr.call(s,r),o.dispatchEvent(s)},Ir=function(i,t){if(i?.nodeType===1)return bo.call(i,t)},vt=function(i){let{matchingSelector:t,untilNode:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(;i&&i.nodeType!==Node.ELEMENT_NODE;)i=i.parentNode;if(i!=null){if(t==null)return i;if(i.closest&&e==null)return i.closest(t);for(;i&&i!==e;){if(Ir(i,t))return i;i=i.parentNode}}},fi=i=>document.activeElement!==i&&Tt(i,document.activeElement),Tt=function(i,t){if(i&&t)for(;t;){if(t===i)return!0;t=t.parentNode}},Sn=function(i){var t;if((t=i)===null||t===void 0||!t.parentNode)return;let e=0;for(i=i.previousSibling;i;)e++,i=i.previousSibling;return e},At=i=>{var t;return i==null||(t=i.parentNode)===null||t===void 0?void 0:t.removeChild(i)},je=function(i){let{onlyNodesOfType:t,usingFilter:e,expandEntityReferences:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(()=>{switch(t){case"element":return NodeFilter.SHOW_ELEMENT;case"text":return NodeFilter.SHOW_TEXT;case"comment":return NodeFilter.SHOW_COMMENT;default:return NodeFilter.SHOW_ALL}})();return document.createTreeWalker(i,r,e??null,n===!0)},j=i=>{var t;return i==null||(t=i.tagName)===null||t===void 0?void 0:t.toLowerCase()},p=function(i){let t,e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof i=="object"?(n=i,i=n.tagName):n={attributes:n};let r=document.createElement(i);if(n.editable!=null&&(n.attributes==null&&(n.attributes={}),n.attributes.contenteditable=n.editable),n.attributes)for(t in n.attributes)e=n.attributes[t],r.setAttribute(t,e);if(n.style)for(t in n.style)e=n.style[t],r.style[t]=e;if(n.data)for(t in n.data)e=n.data[t],r.dataset[t]=e;return n.className&&n.className.split(" ").forEach(o=>{r.classList.add(o)}),n.textContent&&(r.textContent=n.textContent),n.childNodes&&[].concat(n.childNodes).forEach(o=>{r.appendChild(o)}),r},ie,de=function(){if(ie!=null)return ie;ie=[];for(let i in W){let t=W[i];t.tagName&&ie.push(t.tagName)}return ie},kn=i=>qt(i?.firstChild),Yi=function(i){let{strict:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{strict:!0};return t?qt(i):qt(i)||!qt(i.firstChild)&&function(e){return de().includes(j(e))&&!de().includes(j(e.firstChild))}(i)},qt=i=>vo(i)&&i?.data==="block",vo=i=>i?.nodeType===Node.COMMENT_NODE,Ht=function(i){let{name:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(i)return ge(i)?i.data===an?!t||i.parentNode.dataset.trixCursorTarget===t:void 0:Ht(i.firstChild)},Lt=i=>Ir(i,wt),Or=i=>ge(i)&&i?.data==="",ge=i=>i?.nodeType===Node.TEXT_NODE,bi={level2Enabled:!0,getLevel(){return this.level2Enabled&&xe.supportsInputEvents?2:0},pickFiles(i){let t=p("input",{type:"file",multiple:!0,hidden:!0,id:this.fileInputId});t.addEventListener("change",()=>{i(t.files),At(t)}),At(document.getElementById(this.fileInputId)),document.body.appendChild(t),t.click()}},Me={removeBlankTableCells:!1,tableCellSeparator:" | ",tableRowSeparator:` +var po="2.1.12",wt="[data-trix-attachment]",mi={preview:{presentation:"gallery",caption:{name:!0,size:!0}},file:{caption:{size:!0}}},W={default:{tagName:"div",parse:!1},quote:{tagName:"blockquote",nestable:!0},heading1:{tagName:"h1",terminal:!0,breakOnReturn:!0,group:!1},code:{tagName:"pre",terminal:!0,htmlAttributes:["language"],text:{plaintext:!0}},bulletList:{tagName:"ul",parse:!1},bullet:{tagName:"li",listAttribute:"bulletList",group:!1,nestable:!0,test(i){return Gi(i.parentNode)===W[this.listAttribute].tagName}},numberList:{tagName:"ol",parse:!1},number:{tagName:"li",listAttribute:"numberList",group:!1,nestable:!0,test(i){return Gi(i.parentNode)===W[this.listAttribute].tagName}},attachmentGallery:{tagName:"div",exclusive:!0,terminal:!0,parse:!1,group:!1}},Gi=i=>{var t;return i==null||(t=i.tagName)===null||t===void 0?void 0:t.toLowerCase()},$i=navigator.userAgent.match(/android\s([0-9]+.*Chrome)/i),Sn=$i&&parseInt($i[1]),xe={composesExistingText:/Android.*Chrome/.test(navigator.userAgent),recentAndroid:Sn&&Sn>12,samsungAndroid:Sn&&navigator.userAgent.match(/Android.*SM-/),forcesObjectResizing:/Trident.*rv:11/.test(navigator.userAgent),supportsInputEvents:typeof InputEvent<"u"&&["data","getTargetRanges","inputType"].every(i=>i in InputEvent.prototype)},Lr={ADD_ATTR:["language"],SAFE_FOR_XML:!1,RETURN_DOM:!0},m={attachFiles:"Attach Files",bold:"Bold",bullets:"Bullets",byte:"Byte",bytes:"Bytes",captionPlaceholder:"Add a caption\u2026",code:"Code",heading1:"Heading",indent:"Increase Level",italic:"Italic",link:"Link",numbers:"Numbers",outdent:"Decrease Level",quote:"Quote",redo:"Redo",remove:"Remove",strike:"Strikethrough",undo:"Undo",unlink:"Unlink",url:"URL",urlPlaceholder:"Enter a URL\u2026",GB:"GB",KB:"KB",MB:"MB",PB:"PB",TB:"TB"},fo=[m.bytes,m.KB,m.MB,m.GB,m.TB,m.PB],Dr={prefix:"IEC",precision:2,formatter(i){switch(i){case 0:return"0 ".concat(m.bytes);case 1:return"1 ".concat(m.byte);default:let t;this.prefix==="SI"?t=1e3:this.prefix==="IEC"&&(t=1024);let e=Math.floor(Math.log(i)/Math.log(t)),n=(i/Math.pow(t,e)).toFixed(this.precision).replace(/0*$/,"").replace(/\.$/,"");return"".concat(n," ").concat(fo[e])}}},ln="\uFEFF",bt="\xA0",Nr=function(i){for(let t in i){let e=i[t];this[t]=e}return this},pi=document.documentElement,bo=pi.matches,S=function(i){let{onElement:t,matchingSelector:e,withCallback:n,inPhase:r,preventDefault:o,times:s}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=t||pi,c=e,u=r==="capturing",d=function(C){s!=null&&--s==0&&d.destroy();let T=vt(C.target,{matchingSelector:c});T!=null&&(n?.call(T,C,T),o&&C.preventDefault())};return d.destroy=()=>l.removeEventListener(i,d,u),l.addEventListener(i,d,u),d},he=function(i){let{onElement:t,bubbles:e,cancelable:n,attributes:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=t??pi;e=e!==!1,n=n!==!1;let s=document.createEvent("Events");return s.initEvent(i,e,n),r!=null&&Nr.call(s,r),o.dispatchEvent(s)},Ir=function(i,t){if(i?.nodeType===1)return bo.call(i,t)},vt=function(i){let{matchingSelector:t,untilNode:e}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(;i&&i.nodeType!==Node.ELEMENT_NODE;)i=i.parentNode;if(i!=null){if(t==null)return i;if(i.closest&&e==null)return i.closest(t);for(;i&&i!==e;){if(Ir(i,t))return i;i=i.parentNode}}},fi=i=>document.activeElement!==i&&Tt(i,document.activeElement),Tt=function(i,t){if(i&&t)for(;t;){if(t===i)return!0;t=t.parentNode}},kn=function(i){var t;if((t=i)===null||t===void 0||!t.parentNode)return;let e=0;for(i=i.previousSibling;i;)e++,i=i.previousSibling;return e},At=i=>{var t;return i==null||(t=i.parentNode)===null||t===void 0?void 0:t.removeChild(i)},je=function(i){let{onlyNodesOfType:t,usingFilter:e,expandEntityReferences:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(()=>{switch(t){case"element":return NodeFilter.SHOW_ELEMENT;case"text":return NodeFilter.SHOW_TEXT;case"comment":return NodeFilter.SHOW_COMMENT;default:return NodeFilter.SHOW_ALL}})();return document.createTreeWalker(i,r,e??null,n===!0)},j=i=>{var t;return i==null||(t=i.tagName)===null||t===void 0?void 0:t.toLowerCase()},p=function(i){let t,e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};typeof i=="object"?(n=i,i=n.tagName):n={attributes:n};let r=document.createElement(i);if(n.editable!=null&&(n.attributes==null&&(n.attributes={}),n.attributes.contenteditable=n.editable),n.attributes)for(t in n.attributes)e=n.attributes[t],r.setAttribute(t,e);if(n.style)for(t in n.style)e=n.style[t],r.style[t]=e;if(n.data)for(t in n.data)e=n.data[t],r.dataset[t]=e;return n.className&&n.className.split(" ").forEach(o=>{r.classList.add(o)}),n.textContent&&(r.textContent=n.textContent),n.childNodes&&[].concat(n.childNodes).forEach(o=>{r.appendChild(o)}),r},ie,de=function(){if(ie!=null)return ie;ie=[];for(let i in W){let t=W[i];t.tagName&&ie.push(t.tagName)}return ie},Rn=i=>qt(i?.firstChild),Yi=function(i){let{strict:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{strict:!0};return t?qt(i):qt(i)||!qt(i.firstChild)&&function(e){return de().includes(j(e))&&!de().includes(j(e.firstChild))}(i)},qt=i=>vo(i)&&i?.data==="block",vo=i=>i?.nodeType===Node.COMMENT_NODE,Ht=function(i){let{name:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(i)return ge(i)?i.data===ln?!t||i.parentNode.dataset.trixCursorTarget===t:void 0:Ht(i.firstChild)},Lt=i=>Ir(i,wt),Or=i=>ge(i)&&i?.data==="",ge=i=>i?.nodeType===Node.TEXT_NODE,bi={level2Enabled:!0,getLevel(){return this.level2Enabled&&xe.supportsInputEvents?2:0},pickFiles(i){let t=p("input",{type:"file",multiple:!0,hidden:!0,id:this.fileInputId});t.addEventListener("change",()=>{i(t.files),At(t)}),At(document.getElementById(this.fileInputId)),document.body.appendChild(t),t.click()}},Me={removeBlankTableCells:!1,tableCellSeparator:" | ",tableRowSeparator:` `},It={bold:{tagName:"strong",inheritable:!0,parser(i){let t=window.getComputedStyle(i);return t.fontWeight==="bold"||t.fontWeight>=600}},italic:{tagName:"em",inheritable:!0,parser:i=>window.getComputedStyle(i).fontStyle==="italic"},href:{groupTagName:"a",parser(i){let t="a:not(".concat(wt,")"),e=i.closest(t);if(e)return e.getAttribute("href")}},strike:{tagName:"del",inheritable:!0},frozen:{style:{backgroundColor:"highlight"}}},Fr={getDefaultHTML:()=>`