From bda1d36b3b6f55ba66064abd52829fea4bb4e318 Mon Sep 17 00:00:00 2001 From: wladyslaw Date: Wed, 24 Aug 2022 10:15:37 +0200 Subject: [PATCH] update Bootstrap Tinymce Plugin update Bootstrap 4 styles for select2 --- src/Resources/private/js/main.js | 18 ------------------ .../bootstrap/assets/css/editor-content.css | 8 +++++--- .../assets/css/editor-content.min.css | 2 +- .../js/plugins/bootstrap/langs/fr_FR.js | 5 ++--- .../private/js/plugins/bootstrap/plugin.js | 10 +++++++++- .../private/js/plugins/bootstrap/plugin.min.js | 2 +- .../bootstrap/snippets/snippets-manager.html | 6 +++--- .../bootstrap/templates/templates-manager.html | 6 +++--- .../private/js/plugins/bootstrap/version.txt | 2 +- src/Resources/private/scss/style.scss | 2 +- 10 files changed, 26 insertions(+), 35 deletions(-) diff --git a/src/Resources/private/js/main.js b/src/Resources/private/js/main.js index 1e54e51..74a75a0 100644 --- a/src/Resources/private/js/main.js +++ b/src/Resources/private/js/main.js @@ -88,28 +88,10 @@ $(document).ready(function () { } }); - // $("#category-tree .open-children").on("click", function () { - // var id = $(this).data("id"); - // $("ul#" + id).toggleClass("active"); - // }); - // - // if ("#active-tree-element") { - // var parentsTree = $("#active-tree-element").parents("ul"); - // $.each(parentsTree, function (index, value) { - // $(value).addClass("active"); - // }); - // } - $(".select2").select2({ theme: "bootstrap4", }); - // $(".images_widget_image").on("click", function () { - // var radioID = $(this).attr("data-id"); - // var inputID = "#" + radioID; - // $(inputID).prop("checked", !$(inputID).prop("checked")); - // }); - $("body").on("click", ".open-file-manager-btn", function () { const _self = this; const _$self = $(_self); diff --git a/src/Resources/private/js/plugins/bootstrap/assets/css/editor-content.css b/src/Resources/private/js/plugins/bootstrap/assets/css/editor-content.css index e9f370c..c9a6abc 100644 --- a/src/Resources/private/js/plugins/bootstrap/assets/css/editor-content.css +++ b/src/Resources/private/js/plugins/bootstrap/assets/css/editor-content.css @@ -11,6 +11,7 @@ width: calc(100% + 14px); height: calc(100% + 14px); border: 1px dashed #aaa; + pointer-events: none; } .breadcrumb .tbp-active:after, @@ -23,7 +24,8 @@ /* Template buttons -------------------------------------------------- */ -.row, .col { +.row, +.col { position: relative; } @@ -57,14 +59,14 @@ pointer-events: none; } -[class*="col"] > .context-trigger-wrapper .btn { +[class*="col"]>.context-trigger-wrapper .btn { padding: .0625rem .125rem; font-size: .4375rem; line-height: .375; filter: saturate(25%) brightness(120%); } -[class*="col"] > .context-trigger-wrapper button span.svg-icon { +[class*="col"]>.context-trigger-wrapper button span.svg-icon { transform: scale(.75); } diff --git a/src/Resources/private/js/plugins/bootstrap/assets/css/editor-content.min.css b/src/Resources/private/js/plugins/bootstrap/assets/css/editor-content.min.css index 51350da..1a84e3d 100644 --- a/src/Resources/private/js/plugins/bootstrap/assets/css/editor-content.min.css +++ b/src/Resources/private/js/plugins/bootstrap/assets/css/editor-content.min.css @@ -1 +1 @@ -.tbp-active{position:relative}.tbp-active:not(.table):after{content:' ';display:block;position:absolute;top:-7px;left:-7px;width:calc(100% + 14px);height:calc(100% + 14px);border:1px dashed #aaa}.breadcrumb .tbp-active:after,.nav li.tbp-active:after,.tab-pane:after{content:''!important;display:none!important}.col,.row{position:relative}.tbp-context-active{margin-top:2.62em}.context-trigger-wrapper{position:absolute;display:flex;justify-content:flex-end;align-items:start;bottom:calc(100% + 4px);border:1px solid #ccc;min-width:100%;left:0;z-index:1}.col:last-child .context-trigger-wrapper{left:auto;right:0}.context-trigger-wrapper .flex-grow-1{line-height:1}.context-trigger-wrapper button span.svg-icon,.no-events{pointer-events:none}[class*=col]>.context-trigger-wrapper .btn{padding:.0625rem .125rem;font-size:.4375rem;line-height:.375;-webkit-filter:saturate(25%) brightness(120%);filter:saturate(25%) brightness(120%)}[class*=col]>.context-trigger-wrapper button span.svg-icon{transform:scale(.75)}.context-trigger-wrapper .btn{fill:currentColor}input.btn.tbp-active{border:5px solid #fff;outline:1px dashed #aaa}.collapse{display:block!important}.tab-content .tab-pane{display:block!important;border:1px dashed #ccc;margin-bottom:5px}.modal{pointer-events:none} \ No newline at end of file +.tbp-active{position:relative}.tbp-active:not(.table):after{content:' ';display:block;position:absolute;top:-7px;left:-7px;width:calc(100% + 14px);height:calc(100% + 14px);border:1px dashed #aaa;pointer-events:none}.breadcrumb .tbp-active:after,.nav li.tbp-active:after,.tab-pane:after{content:''!important;display:none!important}.row,.col{position:relative}.tbp-context-active{margin-top:2.62em}.context-trigger-wrapper{position:absolute;display:flex;justify-content:flex-end;align-items:start;bottom:calc(100% + 4px);border:1px solid #ccc;min-width:100%;left:0;z-index:1}.col:last-child .context-trigger-wrapper{left:auto;right:0}.context-trigger-wrapper .flex-grow-1{line-height:1}.context-trigger-wrapper button span.svg-icon,.no-events{pointer-events:none}[class*="col"]>.context-trigger-wrapper .btn{padding:.0625rem .125rem;font-size:.4375rem;line-height:.375;filter:saturate(25%) brightness(120%)}[class*="col"]>.context-trigger-wrapper button span.svg-icon{transform:scale(.75)}.context-trigger-wrapper .btn{fill:currentColor}input.btn.tbp-active{border:5px solid #fff;outline:1px dashed #aaa}.collapse{display:block!important}.tab-content .tab-pane{display:block!important;border:1px dashed #ccc;margin-bottom:5px}.modal{pointer-events:none} \ No newline at end of file diff --git a/src/Resources/private/js/plugins/bootstrap/langs/fr_FR.js b/src/Resources/private/js/plugins/bootstrap/langs/fr_FR.js index 627145f..8ec59c2 100644 --- a/src/Resources/private/js/plugins/bootstrap/langs/fr_FR.js +++ b/src/Resources/private/js/plugins/bootstrap/langs/fr_FR.js @@ -1,5 +1,4 @@ -tinymce.addI18n("fr_FR", { - "lgtest": "mon cul", +const bootstrapUiI18n = { "Add col after": "Ajouter une colonne après", "Add col before": "Ajouter une colonne avant", "Add paragraph after": "Ajouter un paragraphe après", @@ -52,4 +51,4 @@ tinymce.addI18n("fr_FR", { "Snippet": "Snippet", "Table": "Tableau", "Template": "Template" -}); +}; diff --git a/src/Resources/private/js/plugins/bootstrap/plugin.js b/src/Resources/private/js/plugins/bootstrap/plugin.js index 574fb2b..5bdbea4 100644 --- a/src/Resources/private/js/plugins/bootstrap/plugin.js +++ b/src/Resources/private/js/plugins/bootstrap/plugin.js @@ -140,7 +140,7 @@ var defaultConfig = { bootstrapColumns: 12, - bootstrapCss: 'https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css', + bootstrapCss: 'https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css', editorStyleFormats: { textStyles: true, blockStyles: true, @@ -6017,6 +6017,14 @@ var nodeType = match[1]; var prop_1 = match[2]; var value = match[3]; + var range = tinymce.activeEditor.selection.getRng(); + var selectedLength = range.endOffset - range.startOffset; + if (selectedLength > 0) { + var ct = tinymce.activeEditor.selection.getContent(); + tinymce.activeEditor.selection.setContent(tinymce.activeEditor.dom.createHTML('span', { id: 'tbp-span' }, ct)); + tinymce.activeEditor.selection.select(tinymce.activeEditor.dom.select('#tbp-span')[0]); + tinymce.activeEditor.dom.setAttrib('tbp-span', 'id', ''); + } var $node_1 = tinymce.activeEditor.selection.getNode(); if (nodeType === 'block') { $node_1 = _this.$($node_1).closest(_this.styleFormatConfig.blockSelector); diff --git a/src/Resources/private/js/plugins/bootstrap/plugin.min.js b/src/Resources/private/js/plugins/bootstrap/plugin.min.js index 77f4d64..364e642 100644 --- a/src/Resources/private/js/plugins/bootstrap/plugin.min.js +++ b/src/Resources/private/js/plugins/bootstrap/plugin.min.js @@ -1 +1 @@ -!function(){"use strict";function t(){for(var t=0,e=0,s=arguments.length;e',badge:'',bootstrap:'',breadcrumb:'',btn:'',card:'',check:'',cross:'',desktop:'',icon:'',image:'',label:'',minus:'',mobile:'',pager:'',pagination:'',edit:'',move:' ',plus:'',snippet:'',tab:' ',tabvertical:' ',table:'',tablethorizontal:'',tablet:'',template:''}},c=function(){function c(t,c){var i=this;this.headStyles=[],this.styleFormatsActive=[],this.validParagraphParents=["a","article","aside","blockquote","body","caption","dd","dialog","div","figcaption","figure","footer","form","header","li","main","nav","section","td","th"],this.editor=t,this.uiButtons={},this.$=tinymce.dom.DomQuery,void 0===this.editor.settings.bootstrapConfig&&alert('Error: bootstrapConfig is not defined - you must init tinyMce with at least bootstrapConfig.url\nThe url must lead to the "bootstrap" folder'),this.pluginUrl=t.settings.bootstrapConfig.url.replace(/\/?$/,"/"),Object.assign(this,l),Object.assign(this,t.settings.bootstrapConfig),this.jsonSnippetsUrl=t.settings.bootstrapConfig.jsonSnippetsUrl||this.pluginUrl+"snippets/snippets.json",this.jsonTemplatesUrl=t.settings.bootstrapConfig.jsonTemplatesUrl||this.pluginUrl+"templates/templates.json",this.imagesPath=t.settings.bootstrapConfig.imagesPath||this.pluginUrl+l.imagesPath,this.imagesPath=this.imagesPath.replace(/\/?$/,"/");var a=s[this.iconFont];this.iconBaseClasses=a.baseClasses,this.iconSearchClass=a.selector,this.iconCss=a.css,this.editor.settings.content_css=this.getContentCss(),this.editorIcons=r();for(var m=0,n=Object.entries(this.editorIcons);m1||"xs"!==i.editorStyleFormats.responsive[0])&&o.items.push(c)}})),e.items.push(o)}else e.items.push(s),s.items.forEach((function(t){"classes"in t?i.addStyleFormat(t):"items"in t&&t.items.forEach((function(t){"classes"in t&&i.addStyleFormat(t)}))}))})),k.push(e)}else k.push(t)}})),this.editor.settings.style_formats=k;for(var y=[],f=0,v=Object.entries(this.elements);f0){if(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),-1!==i.$.inArray(i.$(e)[0].tagName.toLowerCase(),i.validParagraphParents))i.addParagraph(e,"append");else{for(var s=!1,l=void 0,o=0;!0!==s;)l=i.$(e).parent()[0],-1!==i.$.inArray(i.$(l)[0].tagName.toLowerCase(),i.validParagraphParents)?s=!0:e=l,o>5&&(s=!0),o++;i.addParagraph(e,"after")}return!1}}}))}return c.prototype.init=function(){var e=this;this.editor.on("BeforeExecCommand",(function(s){if("mceToggleFormat"===s.command){s.value.match(/rounded$/)&&(s.value=s.value.replace("rounded","rounded-rounded"));var l=/(?:^custom-)?(text|block|container)\s([a-z-]+-)([^_]+)/;s.value.split(" ").length-1==2&&(l=/(?:^custom-)?(text|block|container)\s([a-z-]+)\s([^_]+)/);var o=l.exec(s.value);if(null!==o){var r=o[1],c=o[2],i=o[3],a=tinymce.activeEditor.selection.getNode();"block"===r?a=e.$(a).closest(e.styleFormatConfig.blockSelector):"container"===r&&(a=e.$(a).closest(e.styleFormatConfig.containerSelector));var m=e.styleFormatsActive[r][c].slice(),n=m.indexOf(i);if(n>-1&&m.splice(n,1),-1!==c.indexOf("border")){if(-1===c.indexOf("-")){m=t(m,["border-top","border-right","border-bottom","border-left"])}c=""}if(-1!==c.indexOf("rounded-")&&"rounded"!==i){m=t(m=m.map((function(t){return c+t})),["rounded"]),c=""}m.forEach((function(t){e.$(a).removeClass(c+t)}))}}})),this.editor.on("BeforeGetContent",(function(t){tinymce.dom.DomQuery(e.editor.dom.select("body")).find(".tbp-context-active").removeClass("tbp-context-active").children(".context-trigger-wrapper").remove()})),!0===this.enableTemplateEdition&&tinymce.dom.DomQuery(this.editor.dom.select("body")).addClass("templatesEnabled"),null!==this.key.match(/key-here$/g)&&this.throwRegistrationAlert(),this.editor.ui.registry.addContextMenu("bootstrap",{update:function(t){var e="addParagraphBefore addParagraphAfter | addParagraphAtBeginning addParagraphAtEnd";return tinymce.dom.DomQuery(t).closest(".container, .container-fluid").length>0&&(e+=" | addParagraphAtBeginningContainer addParagraphAtEndContainer"),tinymce.dom.DomQuery(tinymce.activeEditor.dom.select("body")).hasClass("templatesEnabled")?e+=" | disableTemplateEdition":e+=" | enableTemplateEdition",e}}),this.editor.on("KeyDown",(function(t){var s=e.editor.selection.getNode();e.$(s).is("p")&&2===e.$(s)[0].innerText.length&&(e.$(s).html(e.$(s).html().replace(" ","")),e.editor.selection.setCursorLocation(e.$(s)[0],1))}));var s=this.pluginUrl+"assets/css/editor-ui.min.css",l=this.editor.dom.create("link",{rel:"stylesheet",href:s});document.getElementsByTagName("head")[0].appendChild(l);var o=this.editor.settings.bootstrapConfig.tinymceBackgroundColor;""!==o&&this.editor.dom.addStyle(".mce-content-body {background-color: "+o+" !important}"),this.enableUiButtonsToggle(),this.loadHtmlTemplates(),this.enableContextToolbarsEvents();var r=new URLSearchParams({data:this.key}).toString(),c=new XMLHttpRequest;c.open("GET","https://www.registration.miglisoft.com/verify.json?"+r,!0),c.send()},c.prototype.activate=function(t,e){var s;if("icon"===e?this.editor.selection.setCursorLocation(t):".btn"===e&&("input"!==this.$(t)[0].tagName.toLowerCase()&&this.editor.selection.setCursorLocation(t,!0),s=this.$(t)),".table"===e){var l=this.$(t).closest(".table");s=l;var o=l.parent('[class*="table-responsive"]');o.length>0&&(s=o)}else if(".breadcrumb"===e){var r=this.$(t).closest(".breadcrumb");s=r;var c=r.parent('nav[aria-label="breadcrumb"]');c.length>0&&(s=c)}else s=".badge"===e?this.$(t).closest(".badge"):".pagination"===e?this.$(t).closest(".pagination").parent("nav"):".alert"===e?this.$(t).closest(".alert"):".card"===e?this.$(t).closest(".card"):this.$(t);s.addClass("tbp-active"),this.activateUiButton(e)},c.prototype.activateUiButton=function(t){var e=t.replace(".","").replace("img","image");this.hasToolbar&&"buttons"===this.toolbarStyle&&(this.uiButtons[e].addClass("tox-tbtn--enabled"),this.uiButtons[e].attr("aria-pressed",!0))},c.prototype.deactivateAll=function(){if(this.hasToolbar&&"buttons"===this.toolbarStyle)for(var t=0,e=Object.entries(this.uiButtons);t0?t.$(e.target).hasClass("btn")?s=".btn":t.isIcon(e.target)?s="icon":t.$(e.target).hasClass("badge")&&(s=".badge"):null!==e.target.closest(".table")&&(s=".table"),null!==e.target.closest(".breadcrumb")?s=".breadcrumb":null!==e.target.closest(".pagination")?s=".pagination":null!==e.target.closest(".alert")?s=".alert":null!==e.target.closest(".card")&&(s=".card"),t.deactivateAll(),""!==s&&t.activate(e.target,s))})),this.deactivateAll()},c.prototype.createContextToolbars=function(t){var e=this,s=tinymce.util.I18n.translate("Screens").toLowerCase(),l=[{title:tinymce.util.I18n.translate("Default"),icon:"mobile",prefix:""},{title:tinymce.util.I18n.translate("Small")+" "+s,icon:"tablet",prefix:"sm-"},{title:tinymce.util.I18n.translate("Medium")+" "+s,icon:"tablethorizontal",prefix:"md-"},{title:tinymce.util.I18n.translate("Large")+" "+s,icon:"desktop",prefix:"lg-"}];["Before","After"].forEach((function(t){for(var s=function(s){var l="column";s>1&&(l="columns"),e.editor.ui.registry.addButton("addRow"+t+s,{text:s+" "+tinymce.util.I18n.translate(l),onAction:function(){e.insertEditorContent("row",s,t.toLowerCase())}})},l=1;l<5;l++)s(l);e.editor.ui.registry.addContextToolbar("bsRow"+t+"ContextToolbar",{predicate:function(e){return tinymce.dom.DomQuery(e).hasClass("add-row-"+t.toLowerCase()+"-btn")},items:"addRow"+t+"1 addRow"+t+"2 addRow"+t+"3 addRow"+t+"4",position:"node",scope:"node"})}));[{name:"justifyContent",text:"justify-content",icon:"tab",prefix:"justify-content-",suffix:[{name:"start",value:"start"},{name:"end",value:"end"},{name:"center",value:"center"},{name:"between",value:"between"},{name:"around",value:"around"}]},{name:"alignItems",text:"align-items",icon:"tabvertical",prefix:"align-items-",suffix:[{name:"start",value:"start"},{name:"end",value:"end"},{name:"center",value:"center"},{name:"between",value:"between"},{name:"around",value:"around"}]}].forEach((function(t){e.editor.ui.registry.addMenuButton(t.name,{text:t.text,icon:t.icon,fetch:function(s){var o=[];l.forEach((function(s){o.push({type:"nestedmenuitem",text:s.title,icon:s.icon,getSubmenuItems:function(){var l=[];return t.suffix.forEach((function(o){var r=null;e.$(e.currentRow).hasClass(t.prefix+s.prefix+o.value)&&(r="check"),l.push({type:"menuitem",text:o.name,icon:r,onAction:function(){return e.$(e.currentRow).hasClass(t.prefix+s.prefix+o.value)||t.suffix.forEach((function(l){e.$(e.currentRow).removeClass(t.prefix+s.prefix+l.value)})),e.$(e.currentRow).toggleClass(t.prefix+s.prefix+o.value),!1}})})),l}})})),s(o)}}),e.editor.ui.registry.addContextToolbar("bsRowEditContextToolbar",{predicate:function(t){return tinymce.dom.DomQuery(t).hasClass("edit-row-btn")},items:"justifyContent alignItems",position:"node",scope:"node"})}));var o=[];o.push({name:"auto",value:""});for(var r=1;r<=this.bootstrapColumns;r++)o.push({name:r.toString()+"/"+this.bootstrapColumns.toString(),value:r.toString()});[{name:"width",text:"width",icon:"template",prefix:"col-",suffix:o}].forEach((function(t){e.editor.ui.registry.addMenuButton(t.name,{text:t.text,icon:t.icon,fetch:function(s){var o=[];l.forEach((function(s){o.push({type:"nestedmenuitem",text:s.title,icon:s.icon,getSubmenuItems:function(){var l=[];return t.suffix.forEach((function(o){var r=null;e.$(e.currentCol).hasClass(t.prefix+s.prefix+o.value)&&(r="check"),l.push({type:"menuitem",text:o.name,icon:r,onAction:function(){var l=t.prefix;return e.$(e.currentCol).hasClass(l+s.prefix+o.value)||t.suffix.forEach((function(t){e.$(e.currentCol).removeClass(l+s.prefix+t.value)})),""===o.value&&(""===s.prefix&&(l=l.slice(0,-1)),s.prefix=s.prefix.slice(0,-1)),e.$(e.currentCol).toggleClass(l+s.prefix+o.value),!1}})})),l}})})),s(o)}}),e.editor.ui.registry.addContextToolbar("bsColEditContextToolbar",{predicate:function(t){return tinymce.dom.DomQuery(t).hasClass("edit-col-btn")},items:"width",position:"node",scope:"node"})}));["Before","After"].forEach((function(t){for(var s=function(s){var l="column";s>1&&(l="columns"),e.editor.ui.registry.addButton("addCol"+t+s,{text:s+" "+tinymce.util.I18n.translate(l),onAction:function(){e.insertEditorContent("col",s,t.toLowerCase())}})},l=1;l<5;l++)s(l);e.editor.ui.registry.addContextToolbar("bsCol"+t+"ContextToolbar",{predicate:function(e){return tinymce.dom.DomQuery(e).hasClass("add-col-"+t.toLowerCase()+"-btn")},items:"addCol"+t+"1 addCol"+t+"2 addCol"+t+"3 addCol"+t+"4",position:"node",scope:"node"})})),this.editor.ui.registry.addButton("showModal",{text:""+tinymce.util.I18n.translate("Show Modal"),onAction:function(){var t=tinymce.dom.DomQuery,s=t(e.editor.dom.select(".tbp-active")).attr("data-target");t(e.editor.dom.select(s)).addClass("show").css("display","block"),t('').appendTo(t(e.editor.dom.select("body")))}}),this.editor.ui.registry.addButton("hideModal",{text:""+tinymce.util.I18n.translate("Hide Modal"),onAction:function(){var t=tinymce.dom.DomQuery,s=t(e.editor.dom.select(".modal.show")).attr("id");t(e.editor.dom.select("#"+s)).removeClass("show").css("display","none"),t(e.editor.dom.select("body")).find(".modal-backdrop").remove()}}),this.editor.ui.registry.addContextToolbar("modalShowContextToolbar",{predicate:function(t){return"modal"===tinymce.dom.DomQuery(t).attr("data-toggle")},items:"showModal",position:"node",scope:"node"}),this.editor.ui.registry.addContextToolbar("modalHideContextToolbar",{predicate:function(t){return!!(tinymce.dom.DomQuery(t).hasClass("modal-dialog")&&tinymce.dom.DomQuery(t).closest(".modal.show").length>0)},items:"hideModal",position:"node",scope:"node"})},c.prototype.enableContextToolbarsEvents=function(){var t=this;this.editor.on("Click",(function(e){if(!0===t.enableTemplateEdition)if(t.$(e.target).hasClass("remove-row-btn"))t.editor.windowManager.confirm(tinymce.util.I18n.translate("Remove row")+"?",(function(e){e&&t.removeEditorContent("row")}));else if(t.$(e.target).hasClass("remove-col-btn"))t.editor.windowManager.confirm(tinymce.util.I18n.translate("Remove col")+"?",(function(e){e&&t.removeEditorContent("col")}));else{var s=t.findClosestCol(e.target);if(null!==t.currentCol&&t.$(s).hasClass("tbp-context-active"))return;if(null!==s){if(t.$(s).prepend(t.htmlTemplates.toolbars.col).addClass("tbp-context-active"),-1===t.headStyles.indexOf("col"))void 0!==(o=t.$(e.target).closest('[class*="col"].tbp-context-active').find(".context-trigger-wrapper")[0].offsetHeight)&&(t.headStyles.push("col"),t.editor.dom.addStyle('[class*="col"].tbp-context-active{margin-top:'+(o+1)+"px !important;}"));parseInt(t.$(s)[0].offsetWidth,10)<260&&t.$(s).find(".context-trigger-wrapper .badge").remove(),s!==t.currentCol&&t.$(t.currentCol).removeClass("tbp-context-active").children(".context-trigger-wrapper").remove(),t.currentCol=s}else null!==t.currentCol&&t.$(t.currentCol).removeClass("tbp-context-active").children(".context-trigger-wrapper").remove();var l=e.target.closest(".row");if(null!==t.currentRow&&t.$(l).hasClass("tbp-context-active"))return;if(null!==l){var o;if(t.$(l).prepend(t.htmlTemplates.toolbars.row).addClass("tbp-context-active"),-1===t.headStyles.indexOf("row"))void 0!==(o=t.$(e.target).closest(".row.tbp-context-active").find(".context-trigger-wrapper")[0].offsetHeight)&&(t.headStyles.push("row"),t.editor.dom.addStyle(".row.tbp-context-active{margin-top:"+(o+1)+"px !important;}"));l!==t.currentRow&&t.$(t.currentRow).removeClass("tbp-context-active").children(".context-trigger-wrapper").remove(),t.currentRow=l}else null!==t.currentRow&&t.$(t.currentRow).removeClass("tbp-context-active").children(".context-trigger-wrapper").remove()}}))},c.prototype.insertEditorContent=function(t,e,s){var l,o;switch(t){case"col":var r=this.findClosestCol(this.editor.selection.getNode());this.editor.selection.setCursorLocation(r,0),l=this.$("
");for(var c=0;c0)return l.toString(this.cjs.enc.Utf8);throw new Error}catch(t){return this.throwRegistrationAlert(),""}},c.prototype.getValidElements=function(){return"@[aria-*|data-*|role|accesskey|draggable|style|class|hidden|tabindex|contenteditable|id|title|contextmenu|lang|dir\n
'+tinymce.util.I18n.translate("Edit "+e)+'
\n
\n \n \n \n \n
\n "})),this.htmlTemplates.col='

'+tinymce.util.I18n.translate("New column")+"

",this.htmlTemplates.row='
'},c.prototype.throwRegistrationAlert=function(){this.editor.setContent('

Your Bootstrap plugin is not registered.

Open your registration file and enter your purchase code, then paste the key in tinymce.init({bootstrapConfig {key}}) to make it work properly.

')},c}(),i=function(t,e){tinymce.PluginManager.requireLangPack("bootstrap",t.settings.bootstrapConfig.language);var s=new c(t,e);return s.editor.on("init",(function(){s.init()})),{getMetadata:function(){return{name:"Bootstrap plugin",url:"https://www.tinymce-bootstrap-plugin.com"}},getInstance:function(){return s}}};tinymce.PluginManager.add("bootstrap",i)}(); \ No newline at end of file +!function(){"use strict";function t(){for(var t=0,e=0,s=arguments.length;e',badge:'',bootstrap:'',breadcrumb:'',btn:'',card:'',check:'',cross:'',desktop:'',icon:'',image:'',label:'',minus:'',mobile:'',pager:'',pagination:'',edit:'',move:' ',plus:'',snippet:'',tab:' ',tabvertical:' ',table:'',tablethorizontal:'',tablet:'',template:''}},c=function(){function c(t,c){var i=this;this.headStyles=[],this.styleFormatsActive=[],this.validParagraphParents=["a","article","aside","blockquote","body","caption","dd","dialog","div","figcaption","figure","footer","form","header","li","main","nav","section","td","th"],this.editor=t,this.uiButtons={},this.$=tinymce.dom.DomQuery,void 0===this.editor.settings.bootstrapConfig&&alert('Error: bootstrapConfig is not defined - you must init tinyMce with at least bootstrapConfig.url\nThe url must lead to the "bootstrap" folder'),this.pluginUrl=t.settings.bootstrapConfig.url.replace(/\/?$/,"/"),Object.assign(this,l),Object.assign(this,t.settings.bootstrapConfig),this.jsonSnippetsUrl=t.settings.bootstrapConfig.jsonSnippetsUrl||this.pluginUrl+"snippets/snippets.json",this.jsonTemplatesUrl=t.settings.bootstrapConfig.jsonTemplatesUrl||this.pluginUrl+"templates/templates.json",this.imagesPath=t.settings.bootstrapConfig.imagesPath||this.pluginUrl+l.imagesPath,this.imagesPath=this.imagesPath.replace(/\/?$/,"/");var a=s[this.iconFont];this.iconBaseClasses=a.baseClasses,this.iconSearchClass=a.selector,this.iconCss=a.css,this.editor.settings.content_css=this.getContentCss(),this.editorIcons=r();for(var m=0,n=Object.entries(this.editorIcons);m1||"xs"!==i.editorStyleFormats.responsive[0])&&o.items.push(c)}})),e.items.push(o)}else e.items.push(s),s.items.forEach((function(t){"classes"in t?i.addStyleFormat(t):"items"in t&&t.items.forEach((function(t){"classes"in t&&i.addStyleFormat(t)}))}))})),k.push(e)}else k.push(t)}})),this.editor.settings.style_formats=k;for(var y=[],f=0,v=Object.entries(this.elements);f0){if(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),-1!==i.$.inArray(i.$(e)[0].tagName.toLowerCase(),i.validParagraphParents))i.addParagraph(e,"append");else{for(var s=!1,l=void 0,o=0;!0!==s;)l=i.$(e).parent()[0],-1!==i.$.inArray(i.$(l)[0].tagName.toLowerCase(),i.validParagraphParents)?s=!0:e=l,o>5&&(s=!0),o++;i.addParagraph(e,"after")}return!1}}}))}return c.prototype.init=function(){var e=this;this.editor.on("BeforeExecCommand",(function(s){if("mceToggleFormat"===s.command){s.value.match(/rounded$/)&&(s.value=s.value.replace("rounded","rounded-rounded"));var l=/(?:^custom-)?(text|block|container)\s([a-z-]+-)([^_]+)/;s.value.split(" ").length-1==2&&(l=/(?:^custom-)?(text|block|container)\s([a-z-]+)\s([^_]+)/);var o=l.exec(s.value);if(null!==o){var r=o[1],c=o[2],i=o[3],a=tinymce.activeEditor.selection.getRng();if(a.endOffset-a.startOffset>0){var m=tinymce.activeEditor.selection.getContent();tinymce.activeEditor.selection.setContent(tinymce.activeEditor.dom.createHTML("span",{id:"tbp-span"},m)),tinymce.activeEditor.selection.select(tinymce.activeEditor.dom.select("#tbp-span")[0]),tinymce.activeEditor.dom.setAttrib("tbp-span","id","")}var n=tinymce.activeEditor.selection.getNode();"block"===r?n=e.$(n).closest(e.styleFormatConfig.blockSelector):"container"===r&&(n=e.$(n).closest(e.styleFormatConfig.containerSelector));var d=e.styleFormatsActive[r][c].slice(),b=d.indexOf(i);if(b>-1&&d.splice(b,1),-1!==c.indexOf("border")){if(-1===c.indexOf("-")){d=t(d,["border-top","border-right","border-bottom","border-left"])}c=""}if(-1!==c.indexOf("rounded-")&&"rounded"!==i){d=t(d=d.map((function(t){return c+t})),["rounded"]),c=""}d.forEach((function(t){e.$(n).removeClass(c+t)}))}}})),this.editor.on("BeforeGetContent",(function(t){tinymce.dom.DomQuery(e.editor.dom.select("body")).find(".tbp-context-active").removeClass("tbp-context-active").children(".context-trigger-wrapper").remove()})),!0===this.enableTemplateEdition&&tinymce.dom.DomQuery(this.editor.dom.select("body")).addClass("templatesEnabled"),null!==this.key.match(/key-here$/g)&&this.throwRegistrationAlert(),this.editor.ui.registry.addContextMenu("bootstrap",{update:function(t){var e="addParagraphBefore addParagraphAfter | addParagraphAtBeginning addParagraphAtEnd";return tinymce.dom.DomQuery(t).closest(".container, .container-fluid").length>0&&(e+=" | addParagraphAtBeginningContainer addParagraphAtEndContainer"),tinymce.dom.DomQuery(tinymce.activeEditor.dom.select("body")).hasClass("templatesEnabled")?e+=" | disableTemplateEdition":e+=" | enableTemplateEdition",e}}),this.editor.on("KeyDown",(function(t){var s=e.editor.selection.getNode();e.$(s).is("p")&&2===e.$(s)[0].innerText.length&&(e.$(s).html(e.$(s).html().replace(" ","")),e.editor.selection.setCursorLocation(e.$(s)[0],1))}));var s=this.pluginUrl+"assets/css/editor-ui.min.css",l=this.editor.dom.create("link",{rel:"stylesheet",href:s});document.getElementsByTagName("head")[0].appendChild(l);var o=this.editor.settings.bootstrapConfig.tinymceBackgroundColor;""!==o&&this.editor.dom.addStyle(".mce-content-body {background-color: "+o+" !important}"),this.enableUiButtonsToggle(),this.loadHtmlTemplates(),this.enableContextToolbarsEvents();var r=new URLSearchParams({data:this.key}).toString(),c=new XMLHttpRequest;c.open("GET","https://www.registration.miglisoft.com/verify.json?"+r,!0),c.send()},c.prototype.activate=function(t,e){var s;if("icon"===e?this.editor.selection.setCursorLocation(t):".btn"===e&&("input"!==this.$(t)[0].tagName.toLowerCase()&&this.editor.selection.setCursorLocation(t,!0),s=this.$(t)),".table"===e){var l=this.$(t).closest(".table");s=l;var o=l.parent('[class*="table-responsive"]');o.length>0&&(s=o)}else if(".breadcrumb"===e){var r=this.$(t).closest(".breadcrumb");s=r;var c=r.parent('nav[aria-label="breadcrumb"]');c.length>0&&(s=c)}else s=".badge"===e?this.$(t).closest(".badge"):".pagination"===e?this.$(t).closest(".pagination").parent("nav"):".alert"===e?this.$(t).closest(".alert"):".card"===e?this.$(t).closest(".card"):this.$(t);s.addClass("tbp-active"),this.activateUiButton(e)},c.prototype.activateUiButton=function(t){var e=t.replace(".","").replace("img","image");this.hasToolbar&&"buttons"===this.toolbarStyle&&(this.uiButtons[e].addClass("tox-tbtn--enabled"),this.uiButtons[e].attr("aria-pressed",!0))},c.prototype.deactivateAll=function(){if(this.hasToolbar&&"buttons"===this.toolbarStyle)for(var t=0,e=Object.entries(this.uiButtons);t0?t.$(e.target).hasClass("btn")?s=".btn":t.isIcon(e.target)?s="icon":t.$(e.target).hasClass("badge")&&(s=".badge"):null!==e.target.closest(".table")&&(s=".table"),null!==e.target.closest(".breadcrumb")?s=".breadcrumb":null!==e.target.closest(".pagination")?s=".pagination":null!==e.target.closest(".alert")?s=".alert":null!==e.target.closest(".card")&&(s=".card"),t.deactivateAll(),""!==s&&t.activate(e.target,s))})),this.deactivateAll()},c.prototype.createContextToolbars=function(t){var e=this,s=tinymce.util.I18n.translate("Screens").toLowerCase(),l=[{title:tinymce.util.I18n.translate("Default"),icon:"mobile",prefix:""},{title:tinymce.util.I18n.translate("Small")+" "+s,icon:"tablet",prefix:"sm-"},{title:tinymce.util.I18n.translate("Medium")+" "+s,icon:"tablethorizontal",prefix:"md-"},{title:tinymce.util.I18n.translate("Large")+" "+s,icon:"desktop",prefix:"lg-"}];["Before","After"].forEach((function(t){for(var s=function(s){var l="column";s>1&&(l="columns"),e.editor.ui.registry.addButton("addRow"+t+s,{text:s+" "+tinymce.util.I18n.translate(l),onAction:function(){e.insertEditorContent("row",s,t.toLowerCase())}})},l=1;l<5;l++)s(l);e.editor.ui.registry.addContextToolbar("bsRow"+t+"ContextToolbar",{predicate:function(e){return tinymce.dom.DomQuery(e).hasClass("add-row-"+t.toLowerCase()+"-btn")},items:"addRow"+t+"1 addRow"+t+"2 addRow"+t+"3 addRow"+t+"4",position:"node",scope:"node"})}));[{name:"justifyContent",text:"justify-content",icon:"tab",prefix:"justify-content-",suffix:[{name:"start",value:"start"},{name:"end",value:"end"},{name:"center",value:"center"},{name:"between",value:"between"},{name:"around",value:"around"}]},{name:"alignItems",text:"align-items",icon:"tabvertical",prefix:"align-items-",suffix:[{name:"start",value:"start"},{name:"end",value:"end"},{name:"center",value:"center"},{name:"between",value:"between"},{name:"around",value:"around"}]}].forEach((function(t){e.editor.ui.registry.addMenuButton(t.name,{text:t.text,icon:t.icon,fetch:function(s){var o=[];l.forEach((function(s){o.push({type:"nestedmenuitem",text:s.title,icon:s.icon,getSubmenuItems:function(){var l=[];return t.suffix.forEach((function(o){var r=null;e.$(e.currentRow).hasClass(t.prefix+s.prefix+o.value)&&(r="check"),l.push({type:"menuitem",text:o.name,icon:r,onAction:function(){return e.$(e.currentRow).hasClass(t.prefix+s.prefix+o.value)||t.suffix.forEach((function(l){e.$(e.currentRow).removeClass(t.prefix+s.prefix+l.value)})),e.$(e.currentRow).toggleClass(t.prefix+s.prefix+o.value),!1}})})),l}})})),s(o)}}),e.editor.ui.registry.addContextToolbar("bsRowEditContextToolbar",{predicate:function(t){return tinymce.dom.DomQuery(t).hasClass("edit-row-btn")},items:"justifyContent alignItems",position:"node",scope:"node"})}));var o=[];o.push({name:"auto",value:""});for(var r=1;r<=this.bootstrapColumns;r++)o.push({name:r.toString()+"/"+this.bootstrapColumns.toString(),value:r.toString()});[{name:"width",text:"width",icon:"template",prefix:"col-",suffix:o}].forEach((function(t){e.editor.ui.registry.addMenuButton(t.name,{text:t.text,icon:t.icon,fetch:function(s){var o=[];l.forEach((function(s){o.push({type:"nestedmenuitem",text:s.title,icon:s.icon,getSubmenuItems:function(){var l=[];return t.suffix.forEach((function(o){var r=null;e.$(e.currentCol).hasClass(t.prefix+s.prefix+o.value)&&(r="check"),l.push({type:"menuitem",text:o.name,icon:r,onAction:function(){var l=t.prefix;return e.$(e.currentCol).hasClass(l+s.prefix+o.value)||t.suffix.forEach((function(t){e.$(e.currentCol).removeClass(l+s.prefix+t.value)})),""===o.value&&(""===s.prefix&&(l=l.slice(0,-1)),s.prefix=s.prefix.slice(0,-1)),e.$(e.currentCol).toggleClass(l+s.prefix+o.value),!1}})})),l}})})),s(o)}}),e.editor.ui.registry.addContextToolbar("bsColEditContextToolbar",{predicate:function(t){return tinymce.dom.DomQuery(t).hasClass("edit-col-btn")},items:"width",position:"node",scope:"node"})}));["Before","After"].forEach((function(t){for(var s=function(s){var l="column";s>1&&(l="columns"),e.editor.ui.registry.addButton("addCol"+t+s,{text:s+" "+tinymce.util.I18n.translate(l),onAction:function(){e.insertEditorContent("col",s,t.toLowerCase())}})},l=1;l<5;l++)s(l);e.editor.ui.registry.addContextToolbar("bsCol"+t+"ContextToolbar",{predicate:function(e){return tinymce.dom.DomQuery(e).hasClass("add-col-"+t.toLowerCase()+"-btn")},items:"addCol"+t+"1 addCol"+t+"2 addCol"+t+"3 addCol"+t+"4",position:"node",scope:"node"})})),this.editor.ui.registry.addButton("showModal",{text:""+tinymce.util.I18n.translate("Show Modal"),onAction:function(){var t=tinymce.dom.DomQuery,s=t(e.editor.dom.select(".tbp-active")).attr("data-target");t(e.editor.dom.select(s)).addClass("show").css("display","block"),t('').appendTo(t(e.editor.dom.select("body")))}}),this.editor.ui.registry.addButton("hideModal",{text:""+tinymce.util.I18n.translate("Hide Modal"),onAction:function(){var t=tinymce.dom.DomQuery,s=t(e.editor.dom.select(".modal.show")).attr("id");t(e.editor.dom.select("#"+s)).removeClass("show").css("display","none"),t(e.editor.dom.select("body")).find(".modal-backdrop").remove()}}),this.editor.ui.registry.addContextToolbar("modalShowContextToolbar",{predicate:function(t){return"modal"===tinymce.dom.DomQuery(t).attr("data-toggle")},items:"showModal",position:"node",scope:"node"}),this.editor.ui.registry.addContextToolbar("modalHideContextToolbar",{predicate:function(t){return!!(tinymce.dom.DomQuery(t).hasClass("modal-dialog")&&tinymce.dom.DomQuery(t).closest(".modal.show").length>0)},items:"hideModal",position:"node",scope:"node"})},c.prototype.enableContextToolbarsEvents=function(){var t=this;this.editor.on("Click",(function(e){if(!0===t.enableTemplateEdition)if(t.$(e.target).hasClass("remove-row-btn"))t.editor.windowManager.confirm(tinymce.util.I18n.translate("Remove row")+"?",(function(e){e&&t.removeEditorContent("row")}));else if(t.$(e.target).hasClass("remove-col-btn"))t.editor.windowManager.confirm(tinymce.util.I18n.translate("Remove col")+"?",(function(e){e&&t.removeEditorContent("col")}));else{var s=t.findClosestCol(e.target);if(null!==t.currentCol&&t.$(s).hasClass("tbp-context-active"))return;if(null!==s){if(t.$(s).prepend(t.htmlTemplates.toolbars.col).addClass("tbp-context-active"),-1===t.headStyles.indexOf("col"))void 0!==(o=t.$(e.target).closest('[class*="col"].tbp-context-active').find(".context-trigger-wrapper")[0].offsetHeight)&&(t.headStyles.push("col"),t.editor.dom.addStyle('[class*="col"].tbp-context-active{margin-top:'+(o+1)+"px !important;}"));parseInt(t.$(s)[0].offsetWidth,10)<260&&t.$(s).find(".context-trigger-wrapper .badge").remove(),s!==t.currentCol&&t.$(t.currentCol).removeClass("tbp-context-active").children(".context-trigger-wrapper").remove(),t.currentCol=s}else null!==t.currentCol&&t.$(t.currentCol).removeClass("tbp-context-active").children(".context-trigger-wrapper").remove();var l=e.target.closest(".row");if(null!==t.currentRow&&t.$(l).hasClass("tbp-context-active"))return;if(null!==l){var o;if(t.$(l).prepend(t.htmlTemplates.toolbars.row).addClass("tbp-context-active"),-1===t.headStyles.indexOf("row"))void 0!==(o=t.$(e.target).closest(".row.tbp-context-active").find(".context-trigger-wrapper")[0].offsetHeight)&&(t.headStyles.push("row"),t.editor.dom.addStyle(".row.tbp-context-active{margin-top:"+(o+1)+"px !important;}"));l!==t.currentRow&&t.$(t.currentRow).removeClass("tbp-context-active").children(".context-trigger-wrapper").remove(),t.currentRow=l}else null!==t.currentRow&&t.$(t.currentRow).removeClass("tbp-context-active").children(".context-trigger-wrapper").remove()}}))},c.prototype.insertEditorContent=function(t,e,s){var l,o;switch(t){case"col":var r=this.findClosestCol(this.editor.selection.getNode());this.editor.selection.setCursorLocation(r,0),l=this.$("
");for(var c=0;c0)return l.toString(this.cjs.enc.Utf8);throw new Error}catch(t){return this.throwRegistrationAlert(),""}},c.prototype.getValidElements=function(){return"@[aria-*|data-*|role|accesskey|draggable|style|class|hidden|tabindex|contenteditable|id|title|contextmenu|lang|dir\n
'+tinymce.util.I18n.translate("Edit "+e)+'
\n
\n \n \n \n \n
\n "})),this.htmlTemplates.col='

'+tinymce.util.I18n.translate("New column")+"

",this.htmlTemplates.row='
'},c.prototype.throwRegistrationAlert=function(){this.editor.setContent('

Your Bootstrap plugin is not registered.

Open your registration file and enter your purchase code, then paste the key in tinymce.init({bootstrapConfig {key}}) to make it work properly.

')},c}(),i=function(t,e){tinymce.PluginManager.requireLangPack("bootstrap",t.settings.bootstrapConfig.language);var s=new c(t,e);return s.editor.on("init",(function(){s.init()})),{getMetadata:function(){return{name:"Bootstrap plugin",url:"https://www.tinymce-bootstrap-plugin.com"}},getInstance:function(){return s}}};tinymce.PluginManager.add("bootstrap",i)}(); \ No newline at end of file diff --git a/src/Resources/private/js/plugins/bootstrap/snippets/snippets-manager.html b/src/Resources/private/js/plugins/bootstrap/snippets/snippets-manager.html index 00fef1a..22e6d6a 100644 --- a/src/Resources/private/js/plugins/bootstrap/snippets/snippets-manager.html +++ b/src/Resources/private/js/plugins/bootstrap/snippets/snippets-manager.html @@ -13,7 +13,7 @@ - Bootstrap Plugin for TinyMCE - Snippets Manager + Tinymce Bootstrap Plugin - Bootstrap 4 Snippets Manager @@ -25,7 +25,7 @@ -

Bootstrap Plugin for TinyMCE
Snippets Manager

+

Tinymce Bootstrap Plugin
Bootstrap 4 Snippets Manager

@@ -42,7 +42,7 @@

Bootstrap Plugin for TinyMCE
<
  • re-order the categories & snippets
  • The snippets are available in the main plugin Snippet dialog.

    -

    Bootstrap Plugin for TinyMCE - Documentation

    +

    Tinymce Bootstrap Plugin - Documentation

    diff --git a/src/Resources/private/js/plugins/bootstrap/templates/templates-manager.html b/src/Resources/private/js/plugins/bootstrap/templates/templates-manager.html index 73f8518..4593a51 100644 --- a/src/Resources/private/js/plugins/bootstrap/templates/templates-manager.html +++ b/src/Resources/private/js/plugins/bootstrap/templates/templates-manager.html @@ -15,7 +15,7 @@ .small { font-size: 75%; } .template-category { border: 1px solid #E8E9EB; } .template-name, .template-code { position: relative; } .template-name:after, .template-code:after { position: absolute; right: 5px; bottom: 2px; display: block; color: #99a6b1; opacity: .5; } .template-name { border: 1px dashed #6c757d; } .template-name:after { content: "Template Name"; font-size: .75em; } .template-code-wrapper { position:relative; min-height: 150px; } .template-code { margin: auto; height: 200px; width: 100%; } .template-code:after { content: "Template Code"; } .drag-me { cursor: move; } .category-remove, .template-remove { cursor: pointer; } a[data-toggle="collapse"] { -webkit-transition: all 200ms ease-in-out; -moz-transition: all 200ms ease-in-out; -ms-transition: all 200ms ease-in-out; -o-transition: all 200ms ease-in-out; transition: all 200ms ease-in-out; } a[data-toggle="collapse"][aria-expanded="true"] { -moz-transform: rotate(90deg); -webkit-transform: rotate(90deg); -o-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); } - Bootstrap Plugin for TinyMCE - Templates Manager + Tinymce Bootstrap Plugin - Bootstrap 4 Templates Manager @@ -27,7 +27,7 @@ -

    Bootstrap Plugin for TinyMCE
    Templates Manager

    +

    Tinymce Bootstrap Plugin
    Bootstrap 4 Templates Manager

    @@ -44,7 +44,7 @@

    Bootstrap Plugin for TinyMCE
    <
  • re-order the categories & templates
  • The templates are available in the main plugin Template dialog.

    -

    Bootstrap Plugin for TinyMCE - Documentation

    +

    Tinymce Bootstrap Plugin - Documentation

    diff --git a/src/Resources/private/js/plugins/bootstrap/version.txt b/src/Resources/private/js/plugins/bootstrap/version.txt index 56e972a..3c8ff8c 100644 --- a/src/Resources/private/js/plugins/bootstrap/version.txt +++ b/src/Resources/private/js/plugins/bootstrap/version.txt @@ -1 +1 @@ -3.5 \ No newline at end of file +3.5.1 \ No newline at end of file diff --git a/src/Resources/private/scss/style.scss b/src/Resources/private/scss/style.scss index b0d5820..3abcf87 100644 --- a/src/Resources/private/scss/style.scss +++ b/src/Resources/private/scss/style.scss @@ -19,7 +19,7 @@ $icomoon-font-path: '../../fonts'; @import "lightbox"; @import "~select2/src/scss/core"; -@import "~@ttskch/select2-bootstrap4-theme/src/layout"; +@import "~@ttskch/select2-bootstrap4-theme/src/select2-bootstrap4"; @import "~cropper/dist/cropper.min.css";