diff --git a/.nvmrc b/.nvmrc index f599e28b8..3c032078a 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -10 +18 diff --git a/client/dist/js/LeftAndMain.Ping.js b/client/dist/js/LeftAndMain.Ping.js index 8fc46d016..69a5ef1e9 100644 --- a/client/dist/js/LeftAndMain.Ping.js +++ b/client/dist/js/LeftAndMain.Ping.js @@ -1 +1 @@ -webpackJsonp([2],{"./client/src/legacy/LeftAndMain.Ping.js":function(n,e,t){"use strict";var i=t("jquery");(function(n){return n&&n.__esModule?n:{default:n}})(i).default.entwine("ss.ping",function(n){n(".cms-container").entwine({PingIntervalSeconds:300,onadd:function(){this._setupPinging(),this._super()},_setupPinging:function(){var e=null,t=null,i=function(n,i){n.status<400&&0!=n.responseText||(t&&!t.closed||(t=window.open("Security/login"))||(alert("Please enable pop-ups for this site"),clearInterval(e)),t&&t.focus())};e=setInterval(function(){n.ajax({url:"Security/ping",global:!1,type:"POST",complete:i})},1e3*this.getPingIntervalSeconds())}})})}},["./client/src/legacy/LeftAndMain.Ping.js"]); \ No newline at end of file +"use strict";(self.webpackChunksilverstripe_admin=self.webpackChunksilverstripe_admin||[]).push([[302],{13790:function(e,n,t){var i;((i=t(19755))&&i.__esModule?i:{default:i}).default.entwine("ss.ping",(function(e){e(".cms-container").entwine({PingIntervalSeconds:300,onadd:function(){this._setupPinging(),this._super()},_setupPinging:function(){var n=null,t=null,i=function(e,i){e.status<400&&0!=e.responseText||(t&&!t.closed||(t=window.open("Security/login"))||(alert("Please enable pop-ups for this site"),clearInterval(n)),t&&t.focus())};n=setInterval((function(){e.ajax({url:"Security/ping",global:!1,type:"POST",complete:i})}),1e3*this.getPingIntervalSeconds())}})}))}},function(e){var n;n=13790,e(e.s=n)}]); \ No newline at end of file diff --git a/client/dist/js/TinyMCE_sslink-email.js b/client/dist/js/TinyMCE_sslink-email.js index 5f0b75923..55de4d680 100644 --- a/client/dist/js/TinyMCE_sslink-email.js +++ b/client/dist/js/TinyMCE_sslink-email.js @@ -1 +1 @@ -!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="./client/src/legacy/TinyMCE_sslink-email.js")}({"./client/src/legacy/TinyMCE_sslink-email.js":function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n("i18n"),o=i(r),a=n("lib/TinyMCEActionRegistrar"),l=i(a),s=n("react"),c=i(s),d=n("react-dom"),u=i(d),m=n("jquery"),f=i(m),p=n("containers/InsertLinkModal/InsertLinkModal"),g=n("lib/Injector");l.default.addAction("sslink",{text:o.default._t("Admin.LINKLABEL_EMAIL","Link to email address"),onclick:function(e){return e.execCommand("sslinkemail")},priority:51},editorIdentifier).addCommandWithUrlTest("sslinkemail",/^mailto:/);var k={init:function(e){e.addCommand("sslinkemail",function(){window.jQuery("#"+e.id).entwine("ss").openLinkEmailDialog()})}},b="insert-link__dialog-wrapper--email",I=(0,g.loadComponent)((0,p.createInsertLinkModal)("SilverStripe\\Admin\\LeftAndMain","EditorEmailLink"));f.default.entwine("ss",function(e){e("textarea.htmleditor").entwine({openLinkEmailDialog:function(){var t=e("#"+b);t.length||(t=e('
'),e("body").append(t)),t.addClass("insert-link__dialog-wrapper"),t.setElement(this),t.open()}}),e("#"+b).entwine({renderModal:function(e){var t=this,n=function(){return t.close()},i=function(){return t.handleInsert.apply(t,arguments)},r=this.getOriginalAttributes(),a=this.getElement().getEditor(),l=a.getInstance().selection,s=a.getSelection(),d=l.getNode().tagName,m="A"!==d&&""===s.trim();u.default.render(c.default.createElement(I,{isOpen:e,onInsert:i,onClosed:n,title:o.default._t("Admin.LINK_EMAIL","Insert email link"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--email",fileAttributes:r,identifier:"Admin.InsertLinkEmailModal",requireLinkText:m}),this[0])},getOriginalAttributes:function(){var t=this.getElement().getEditor(),n=e(t.getSelectedNode()),i=(n.attr("href")||"").split("?"),r=i[0].replace(/^mailto:/,"").split("?")[0];r.match(/.+@.+\..+/)||(r="");var o=i[1]?i[1].match(/subject=([^&]+)/):"";return{Link:r,Subject:o?decodeURIComponent(o[1]):"",Description:n.attr("title")}},buildAttributes:function(e){var t=this._super(e),n="",i=t.href.replace(/^mailto:/,"").split("?")[0];return i.match(/.+@.+\..+/)||(i=""),i&&(n="mailto:"+i),n&&e.Subject&&(n=n+"?subject="+encodeURIComponent(e.Subject)),t.href=n,delete t.target,t}})}),tinymce.PluginManager.add("sslinkemail",function(e){return k.init(e)}),t.default=k},"containers/InsertLinkModal/InsertLinkModal":function(e,t){e.exports=InsertLinkModal},i18n:function(e,t){e.exports=i18n},jquery:function(e,t){e.exports=jQuery},"lib/Injector":function(e,t){e.exports=Injector},"lib/TinyMCEActionRegistrar":function(e,t){e.exports=TinyMCEActionRegistrar},react:function(e,t){e.exports=React},"react-dom":function(e,t){e.exports=ReactDom}}); \ No newline at end of file +!function(){"use strict";var t={745:function(t,e,i){var n=i(394);e.createRoot=n.createRoot,e.hydrateRoot=n.hydrateRoot},648:function(t){t.exports=Injector},595:function(t){t.exports=InsertLinkModal},363:function(t){t.exports=React},394:function(t){t.exports=ReactDom},196:function(t){t.exports=TinyMCEActionRegistrar},754:function(t){t.exports=i18n},311:function(t){t.exports=jQuery}},e={};function i(n){var o=e[n];if(void 0!==o)return o.exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}!function(){var t=s(i(754)),e=s(i(196)),n=s(i(363)),o=i(745),r=s(i(311)),a=i(595),l=i(648);function s(t){return t&&t.__esModule?t:{default:t}}const d="sslinkemail";e.default.addAction("sslink",{text:t.default._t("Admin.LINKLABEL_EMAIL","Link to email address"),onclick:t=>t.execCommand(d),priority:51},editorIdentifier).addCommandWithUrlTest(d,/^mailto:/);const c={init(t){t.addCommand(d,(()=>{window.jQuery(`#${t.id}`).entwine("ss").openLinkEmailDialog()}))}},u="insert-link__dialog-wrapper--email",m=(0,l.loadComponent)((0,a.createInsertLinkModal)("SilverStripe\\Admin\\LeftAndMain","EditorEmailLink"));r.default.entwine("ss",(e=>{e("textarea.htmleditor").entwine({openLinkEmailDialog(){let t=e(`#${u}`);t.length||(t=e(``),e("body").append(t)),t.addClass("insert-link__dialog-wrapper"),t.setElement(this),t.open()}}),e(`#${u}`).entwine({ReactRoot:null,renderModal(e){var i=this;const r=this.getOriginalAttributes(),a=this.getElement().getEditor(),l=a.getInstance().selection,s=a.getSelection(),d="A"!==l.getNode().tagName&&""===s.trim();let c=this.getReactRoot();c||(c=(0,o.createRoot)(this[0]),this.setReactRoot(c)),c.render(n.default.createElement(m,{isOpen:e,onInsert:function(){return i.handleInsert(...arguments)},onClosed:()=>this.close(),title:t.default._t("Admin.LINK_EMAIL","Insert email link"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--email",fileAttributes:r,identifier:"Admin.InsertLinkEmailModal",requireLinkText:d}))},getOriginalAttributes(){const t=this.getElement().getEditor(),i=e(t.getSelectedNode()),n=(i.attr("href")||"").split("?");let o=n[0].replace(/^mailto:/,"").split("?")[0];o.match(/.+@.+\..+/)||(o="");const r=n[1]?n[1].match(/subject=([^&]+)/):"";return{Link:o,Subject:r?decodeURIComponent(r[1]):"",Description:i.attr("title")}},buildAttributes(t){const e=this._super(t);let i="",n=e.href.replace(/^mailto:/,"").split("?")[0];return n.match(/.+@.+\..+/)||(n=""),n&&(i=`mailto:${n}`),i&&t.Subject&&(i=`${i}?subject=${encodeURIComponent(t.Subject)}`),e.href=i,delete e.target,e}})})),tinymce.PluginManager.add(d,(t=>c.init(t)))}()}(); \ No newline at end of file diff --git a/client/dist/js/TinyMCE_sslink-external.js b/client/dist/js/TinyMCE_sslink-external.js index 1108ac697..275755186 100644 --- a/client/dist/js/TinyMCE_sslink-external.js +++ b/client/dist/js/TinyMCE_sslink-external.js @@ -1 +1 @@ -!function(e){function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}var t={};n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s="./client/src/legacy/TinyMCE_sslink-external.js")}({"./client/src/legacy/TinyMCE_sslink-external.js":function(e,n,t){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var r=t("i18n"),o=i(r),a=t("lib/TinyMCEActionRegistrar"),l=i(a),s=t("react"),c=i(s),d=t("react-dom"),u=i(d),f=t("jquery"),p=i(f),x=t("containers/InsertLinkModal/InsertLinkModal"),m=t("lib/Injector");l.default.addAction("sslink",{text:o.default._t("Admin.LINKLABEL_EXTERNALURL","Link to external URL"),onAction:function(e){return e.execCommand("sslinkexternal")},priority:70},editorIdentifier);var g={init:function(e){e.addCommand("sslinkexternal",function(){window.jQuery("#"+e.id).entwine("ss").openLinkExternalDialog()})}},k="insert-link__dialog-wrapper--external",L=(0,m.loadComponent)((0,x.createInsertLinkModal)("SilverStripe\\Admin\\LeftAndMain","EditorExternalLink"));p.default.entwine("ss",function(e){e("textarea.htmleditor").entwine({openLinkExternalDialog:function(){var n=e("#"+k);n.length||(n=e(''),e("body").append(n)),n.addClass("insert-link__dialog-wrapper"),n.setElement(this),n.open()}}),e("#"+k).entwine({renderModal:function(e){var n=this,t=function(){return n.close()},i=function(){return n.handleInsert.apply(n,arguments)},r=this.getOriginalAttributes(),a=this.getElement().getEditor(),l=a.getInstance().selection,s=a.getSelection(),d=l.getNode().tagName,f="A"!==d&&""===s.trim();u.default.render(c.default.createElement(L,{isOpen:e,onInsert:i,onClosed:t,title:o.default._t("Admin.LINK_EXTERNAL","Insert external link"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--external",fileAttributes:r,identifier:"Admin.InsertLinkExternalModal",requireLinkText:f}),this[0])},buildAttributes:function(e){var n=this._super(e),t=n.href;return t.match(/:\/\//)||(t=window.location.protocol+"//"+t),t=t.replace(/.*:\/\/(#.*)$/,"$1"),t.match(/:\/\/$/)&&(t=""),n.href=t,n}})}),tinymce.PluginManager.add("sslinkexternal",function(e){return g.init(e)}),n.default=g},"containers/InsertLinkModal/InsertLinkModal":function(e,n){e.exports=InsertLinkModal},i18n:function(e,n){e.exports=i18n},jquery:function(e,n){e.exports=jQuery},"lib/Injector":function(e,n){e.exports=Injector},"lib/TinyMCEActionRegistrar":function(e,n){e.exports=TinyMCEActionRegistrar},react:function(e,n){e.exports=React},"react-dom":function(e,n){e.exports=ReactDom}}); \ No newline at end of file +!function(){"use strict";var t={745:function(t,e,n){var i=n(394);e.createRoot=i.createRoot,e.hydrateRoot=i.hydrateRoot},648:function(t){t.exports=Injector},595:function(t){t.exports=InsertLinkModal},363:function(t){t.exports=React},394:function(t){t.exports=ReactDom},196:function(t){t.exports=TinyMCEActionRegistrar},754:function(t){t.exports=i18n},311:function(t){t.exports=jQuery}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}!function(){var t=s(n(754)),e=s(n(196)),i=s(n(363)),r=n(745),o=s(n(311)),a=n(595),l=n(648);function s(t){return t&&t.__esModule?t:{default:t}}e.default.addAction("sslink",{text:t.default._t("Admin.LINKLABEL_EXTERNALURL","Link to external URL"),onAction:t=>t.execCommand("sslinkexternal"),priority:70},editorIdentifier);const d={init(t){t.addCommand("sslinkexternal",(()=>{window.jQuery(`#${t.id}`).entwine("ss").openLinkExternalDialog()}))}},c="insert-link__dialog-wrapper--external",u=(0,l.loadComponent)((0,a.createInsertLinkModal)("SilverStripe\\Admin\\LeftAndMain","EditorExternalLink"));o.default.entwine("ss",(e=>{e("textarea.htmleditor").entwine({openLinkExternalDialog(){let t=e(`#${c}`);t.length||(t=e(``),e("body").append(t)),t.addClass("insert-link__dialog-wrapper"),t.setElement(this),t.open()}}),e(`#${c}`).entwine({ReactRoot:null,renderModal(e){var n=this;const o=this.getOriginalAttributes(),a=this.getElement().getEditor(),l=a.getInstance().selection,s=a.getSelection(),d="A"!==l.getNode().tagName&&""===s.trim();let c=this.getReactRoot();c||(c=(0,r.createRoot)(this[0]),this.setReactRoot(c)),c.render(i.default.createElement(u,{isOpen:e,onInsert:function(){return n.handleInsert(...arguments)},onClosed:()=>this.close(),title:t.default._t("Admin.LINK_EXTERNAL","Insert external link"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--external",fileAttributes:o,identifier:"Admin.InsertLinkExternalModal",requireLinkText:d}))},buildAttributes(t){const e=this._super(t);let n=e.href;return n.match(/:\/\//)||(n=`${window.location.protocol}//${n}`),n=n.replace(/.*:\/\/(#.*)$/,"$1"),n.match(/:\/\/$/)&&(n=""),e.href=n,e}})})),tinymce.PluginManager.add("sslinkexternal",(t=>d.init(t)))}()}(); \ No newline at end of file diff --git a/client/dist/js/TinyMCE_sslink.js b/client/dist/js/TinyMCE_sslink.js index 6efa214e8..5ed941829 100644 --- a/client/dist/js/TinyMCE_sslink.js +++ b/client/dist/js/TinyMCE_sslink.js @@ -1 +1 @@ -!function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s="./client/src/legacy/TinyMCE_sslink.js")}({"./client/src/legacy/TinyMCE_sslink.js":function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n("lib/TinyMCEActionRegistrar"),o=i(r),s=n("react-dom"),a=i(s),l=n("jquery"),u=i(l),c=n("lib/ShortcodeSerialiser"),d=n("i18n"),f=i(d),m={init:function(t){function e(){var e=tinymce.activeEditor.selection.getNode(),n=e.getAttribute("href");n&&t.execCommand(o.default.getEditorCommandFromUrl(n))}var n=this,i=navigator.platform.toUpperCase().includes("MAC")?"⌘":"Ctrl",r=f.default._t("Admin.INSERT_LINK","Insert link"),s=f.default.inject(f.default._t("Admin.INSERT_LINK_WITH_SHORTCUT","Insert link {shortcut}"),{shortcut:"["+i+"+K]"}),a=o.default.getSortedActions("sslink",t.getParam("editorIdentifier"),!0).map(function(e){return Object.assign({},e,{onAction:function(){return e.onAction(t)}})});return t.ui.registry.addMenuButton("sslink",{icon:"link",tooltip:s,fetch:function(t){return t(a)}}),t.ui.registry.addNestedMenuItem("sslink",{icon:"link",text:r,getSubmenuItems:function(){return a}}),t.addShortcut("Meta+k","Open link menu",function(){(0,u.default)('[aria-label^="'+r+'"] > button',t.container).first().click()}),t.ui.registry.addButton("sslink-edit",{text:f.default._t("Admin.EDIT_LINK","Edit link"),onAction:e}),t.ui.registry.addButton("sslink-remove",{text:f.default._t("Admin.REMOVE_LINK","Remove link"),onAction:function(){return n.handleRemoveLinkClick(t)}}),t.ui.registry.addContextToolbar("sslink",{predicate:function(e){return t.dom.is(e,"a[href]")},position:"node",scope:"node",items:"sslink-edit sslink-remove"}),{getMetadata:function(){return{name:"Silverstripe Link",url:"https://docs.silverstripe.org/en/4/developer_guides/forms/field_types/htmleditorfield"}}}},handleRemoveLinkClick:function(t){var e=t.execCommand("unlink"),n=t.selection.getNode();return n&&void 0!==n.normalize&&n.normalize(),e}};u.default.entwine("ss",function(t){t(".insert-link__dialog-wrapper").entwine({Element:null,Data:{},Bookmark:null,onunmatch:function(){this._clearModal()},_clearModal:function(){a.default.unmountComponentAtNode(this[0])},open:function(){var t=this.getElement().getEditor().getInstance();this.setBookmark(t.selection.getBookmark(2,!0)),this.renderModal(!0)},close:function(){this.setData({}),this.renderModal(!1)},renderModal:function(){},handleInsert:function(t){this.getElement().getEditor().getInstance().selection.moveToBookmark(this.getBookmark());var e=this.buildAttributes(t),n=(0,c.createHTMLSanitiser)(),i=n(t.Text);return this.insertLinkInEditor(e,i),this.close(),Promise.resolve()},buildAttributes:function(t){var e=t.Anchor,n=t.Link,i=t.TargetBlank,r=t.Description,o=e&&e.length?"#"+e:"";return o=o.replace(/^#+/,"#"),{href:""+n+o,target:i?"_blank":"",title:r}},insertLinkInEditor:function(t,e){var n=this.getElement().getEditor();n.insertLink(t,null,e),n.addUndo(),n.repaint();var i=n.getInstance(),r=i.selection;setTimeout(function(){return r&&r.collapse()},0)},getOriginalAttributes:function(){var e=this.getElement().getEditor(),n=t(e.getSelectedNode()),i=(n.attr("href")||"").split("#");return{Link:i[0]||"",Anchor:i[1]||"",Description:n.attr("title"),TargetBlank:!!n.attr("target")}}})}),tinymce.PluginManager.add("sslink",function(t){return m.init(t)}),e.default=m},i18n:function(t,e){t.exports=i18n},jquery:function(t,e){t.exports=jQuery},"lib/ShortcodeSerialiser":function(t,e){t.exports=ShortcodeSerialiser},"lib/TinyMCEActionRegistrar":function(t,e){t.exports=TinyMCEActionRegistrar},"react-dom":function(t,e){t.exports=ReactDom}}); \ No newline at end of file +!function(){"use strict";var t={394:function(t){t.exports=ReactDom},265:function(t){t.exports=ShortcodeSerialiser},196:function(t){t.exports=TinyMCEActionRegistrar},754:function(t){t.exports=i18n},311:function(t){t.exports=jQuery}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}!function(){var t=s(n(196)),e=s(n(394)),i=s(n(311)),o=n(265),r=s(n(754));function s(t){return t&&t.__esModule?t:{default:t}}const l={init(e){const n=navigator.platform.toUpperCase().includes("MAC")?"⌘":"Ctrl",o=r.default._t("Admin.INSERT_LINK","Insert link"),s=r.default.inject(r.default._t("Admin.INSERT_LINK_WITH_SHORTCUT","Insert link {shortcut}"),{shortcut:`[${n}+K]`}),l=t.default.getSortedActions("sslink",e.getParam("editorIdentifier"),!0).map((t=>Object.assign({},t,{onAction:()=>t.onAction(e)})));return e.ui.registry.addMenuButton("sslink",{icon:"link",tooltip:s,fetch:t=>t(l)}),e.ui.registry.addNestedMenuItem("sslink",{icon:"link",text:o,getSubmenuItems:()=>l}),e.addShortcut("Meta+k","Open link menu",(()=>{(0,i.default)(`[aria-label^="${o}"] > button`,e.container).first().click()})),e.ui.registry.addButton("sslink-edit",{text:r.default._t("Admin.EDIT_LINK","Edit link"),onAction:function(){const n=tinymce.activeEditor.selection.getNode().getAttribute("href");n&&e.execCommand(t.default.getEditorCommandFromUrl(n))}}),e.ui.registry.addButton("sslink-remove",{text:r.default._t("Admin.REMOVE_LINK","Remove link"),onAction:()=>this.handleRemoveLinkClick(e)}),e.ui.registry.addContextToolbar("sslink",{predicate:t=>e.dom.is(t,"a[href]"),position:"node",scope:"node",items:"sslink-edit sslink-remove"}),{getMetadata(){return{name:"Silverstripe Link",url:"https://docs.silverstripe.org/en/4/developer_guides/forms/field_types/htmleditorfield"}}}},handleRemoveLinkClick(t){const e=t.execCommand("unlink"),n=t.selection.getNode();return n&&void 0!==n.normalize&&n.normalize(),e}};i.default.entwine("ss",(t=>{t(".insert-link__dialog-wrapper").entwine({Element:null,Data:{},Bookmark:null,onunmatch(){this._clearModal()},_clearModal(){e.default.unmountComponentAtNode(this[0])},open(){const t=this.getElement().getEditor().getInstance();this.setBookmark(t.selection.getBookmark(2,!0)),this.renderModal(!0)},close(){this.setData({}),this.renderModal(!1)},renderModal(){},handleInsert(t){this.getElement().getEditor().getInstance().selection.moveToBookmark(this.getBookmark());const e=this.buildAttributes(t),n=(0,o.createHTMLSanitiser)()(t.Text);return this.insertLinkInEditor(e,n),this.close(),Promise.resolve()},buildAttributes(t){let{Anchor:e,Link:n,TargetBlank:i,Description:o}=t,r=e&&e.length?`#${e}`:"";r=r.replace(/^#+/,"#");return{href:`${n}${r}`,target:i?"_blank":"",title:o}},insertLinkInEditor(t,e){const n=this.getElement().getEditor();n.insertLink(t,null,e),n.addUndo(),n.repaint();const i=n.getInstance().selection;setTimeout((()=>i&&i.collapse()),0)},getOriginalAttributes(){const e=this.getElement().getEditor(),n=t(e.getSelectedNode()),i=(n.attr("href")||"").split("#");return{Link:i[0]||"",Anchor:i[1]||"",Description:n.attr("title"),TargetBlank:!!n.attr("target")}}})})),tinymce.PluginManager.add("sslink",(t=>l.init(t)))}()}(); \ No newline at end of file diff --git a/client/dist/js/browserWarning.js b/client/dist/js/browserWarning.js deleted file mode 100644 index e10f535c4..000000000 --- a/client/dist/js/browserWarning.js +++ /dev/null @@ -1 +0,0 @@ -webpackJsonp([1],{"./client/src/lib/browserWarning.js":function(e,r,n){"use strict";var s=n("./node_modules/detect-browser/browser.js"),a=function(e){return e&&e.__esModule?e:{default:e}}(s);if("ie"===a.default.name&&parseInt(a.default.version,10)<=10){var t=document.getElementById("browser-warning-wrapper");t&&(t.className=t.className+" browser-warning-wrapper--incompatible")}}},["./client/src/lib/browserWarning.js"]); \ No newline at end of file diff --git a/client/dist/js/bundle.js b/client/dist/js/bundle.js index 281787847..1625912e3 100644 --- a/client/dist/js/bundle.js +++ b/client/dist/js/bundle.js @@ -1 +1,38 @@ -webpackJsonp([0],{"./client/src/boot/BootRoutes.js":function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n