@stratusjs/angular 0.5.12 → 0.5.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- System.register(["@angular/core","@angular/forms","@angular/material/dialog","rxjs","rxjs/operators","@angular/platform-browser","@stratusjs/runtime/stratus","lodash","../core/root.component","./citation-dialog.component","./link-dialog.component","./media-dialog.component","./code-view-dialog.component","./code-mirror-bridge","@stratusjs/angularjs/services/registry","@stratusjs/core/environment","@stratusjs/core/events/eventManager","html2pdf","font-awesome","froala-plugins","froala-embedly","froala-font-awesome","froala-image-tui","../froala/plugins/citationManager","../froala/plugins/linkManager","../froala/plugins/mediaManager","codemirror","@codemirror/lang-html","@codemirror/theme-one-dark"],function(e,t){"use strict";var i,a,r,o,n,s,l,d,c,u,g,m,h,p,f,b,v,y,k,w,x,S,C,D,M,E=this&&this.__decorate||function(e,t,i,a){var r,o=arguments.length,n=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},T=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};t&&t.id;return{setters:[function(e){i=e},function(e){a=e},function(e){r=e},function(e){o=e},function(e){n=e},function(e){s=e},function(e){l=e},function(e){d=e},function(e){c=e},function(e){u=e},function(e){g=e},function(e){m=e},function(e){h=e},function(e){p=e},function(e){f=e},function(e){b=e},function(e){v=e},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){y=e},function(e){k=e},function(e){w=e}],execute:function(){"@stratusjs/angular","froala-editor","editor",x=b.cookie("env")?"":".min",S=`${l.Stratus.BaseUrl}${boot.configuration.paths["@stratusjs/angular/*"].replace(/[^\/]*$/,"").replace(/\/dist\/$/,"/src/")}`,C=`${l.Stratus.BaseUrl}${boot.configuration.paths["froala-editor"].replace(/js\/[^\/]*$/,"")}`,D=(e,t)=>d.default.has(e,t)&&!d.default.isEmpty(d.default.get(e,t)),M=class extends c.RootComponent{constructor(e,t,i,r,s){super(),this.sanitizer=e,this.ref=t,this.elementRef=i,this.fb=r,this.dialog=s,this.title="editor_component",this.dev=!!b.cookie("env"),this.debug=!!b.cookie("debug_editor"),this.editor="froala",this._=d.default,this.has=D,this.log=console.log,this.Stratus=l.Stratus,this.registry=new f.Registry,this.onChange=new o.Subject,this.svgIcons={},this.initialized=!1,this.styled=!1,this.blurred=!1,this.focused=!1,this.form=this.fb.group({dataString:new a.FormControl}),this.dataChangeLog=[],this.incomingData="",this.outgoingData="",this.debounceSave=!0,this.debounceTime=5e3,this.forceSave=!1,this.froalaStandardButtons={moreText:["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","textColor","backgroundColor","inlineClass","inlineStyle","clearFormatting"],moreParagraph:["linkManager","formatOL","formatUL","indent","outdent","quote","paragraphFormat","paragraphStyle","alignLeft","alignCenter","alignRight","alignJustify"],moreRich:["mediaManager","insertTable","insertImage","insertVideo","insertFile","citationInsert","insertHR","specialCharacters"],moreMisc:["html","undo","redo","fullscreen","print","selectAll","help"]},this.froalaConfig={attribution:!1,key:l.Stratus.Environment.get("froalaKey"),zIndex:9999,events:{initialized:e=>{this.froalaEditorDirective=e},blur:e=>this.onBlur(e),focus:e=>this.onFocus(e)},codeBeautifierOptions:{end_with_newline:!0,indent_inner_html:!0,extra_liners:'["p", "h1", "h2", "h3", "h4", "h5", "h6", "blockquote", "pre", "ul", "ol", "table", "dl"]',brace_style:"expand",indent_char:" ",indent_size:4,wrap_line_length:0},codeMirror:{fromTextArea:(e,t)=>{const i=[y.basicSetup,k.html({})];return b.cookie("dark")&&i.push(w.oneDarkTheme),new p.CodeMirrorBridge({extensions:i}).fromTextArea(e,t)}},codeMirrorOptions:{indentWithTabs:!1,lineNumbers:!0,lineWrapping:!0,mode:"text/html",tabMode:"space",tabSize:4},fileInsertButtons:["fileBack"],fileUploadURL:"https://app.sitetheory.io/?session="+b.cookie("SITETHEORY"),fontFamily:{"Arial,Helvetica,sans-serif":"Arial","Georgia,serif":"Georgia","Impact,Charcoal,sans-serif":"Impact","Tahoma,Geneva,sans-serif":"Tahoma",'"Times New Roman",Times,serif':"Times New Roman","Verdana,Geneva,sans-serif":"Verdana"},heightMax:window.innerHeight||document.documentElement.clientHeight||500,htmlAllowedAttrs:["aria-.+","data-.+","ng-.+","stratus-.+","sa-.+","accept","accept-charset","accesskey","action","align","allow","allowfullscreen","allowtransparency","alt","async","autocomplete","autofocus","autoplay","autosave","background","bgcolor","border","charset","cellpadding","cellspacing","checked","cite","class","color","cols","colspan","content","contenteditable","contextmenu","controls","coords","data","datetime","default","defer","dir","dirname","disabled","download","draggable","dropzone","enctype","for","form","formaction","frameborder","headers","height","hidden","high","href","hreflang","http-equiv","icon","id","ismap","itemprop","keytype","kind","label","lang","language","list","loop","low","max","maxlength","media","method","min","mozallowfullscreen","multiple","muted","name","novalidate","open","optimum","pattern","ping","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","reversed","rows","rowspan","sandbox","scope","scoped","scrolling","seamless","selected","shape","size","sizes","span","src","srcdoc","srclang","srcset","start","step","summary","spellcheck","style","tabindex","target","title","type","translate","usemap","value","valign","webkitallowfullscreen","width","wrap","xmlns","xmlns:xlink","accent-height","accumulate","additive","alignment-baseline","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","clip","clipPathUnits","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","crossorigin","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fr","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","horiz-adv-x","horiz-origin-x","ideographic","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","marker-mid","marker-start","markerHeight","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","panose-1","paint-order","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","referrerPolicy","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","surfaceScale","systemLanguage","tableValues","targetX","targetY","text-anchor","text-decoration","text-rendering","textLength","to","transform","transform-origin","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","values","vector-effect","version","vert-adv-y","vert-origin-x","vert-origin-y","viewBox","viewTarget","visibility","widths","word-spacing","writing-mode","x","x-height","x1","x2","xChannelSelector","xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xml:space","y","y1","y2","yChannelSelector","z","zoomAndPan"],htmlAllowedEmptyTags:["textarea","a","iframe","object","video","style","script","form","hr","div","animate","animateMotion","animateTransform","circle","clipPath","defs","desc","discard","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tspan","unknown","use","view","ng-app","ng-bind","ng-bind-html","ng-bind-template","ng-blur","ng-change","ng-checked","ng-class","ng-class-even","ng-class-odd","ng-click","ng-cloak","ng-controller","ng-copy","ng-csp","ng-cut","ng-dblclick","ng-disabled","ng-focus","ng-form","ng-hide","ng-href","ng-if","ng-include","ng-init","ng-jq","ng-keydown","ng-keypress","ng-keyup","ng-list","ng-maxlength","ng-minlength","ng-model","ng-model-options","ng-mousedown","ng-mouseenter","ng-mouseleave","ng-mousemove","ng-mouseover","ng-mouseup","ng-non-bindable","ng-on","ng-open","ng-options","ng-paste","ng-pattern","ng-pluralize","ng-prop","ng-readonly","ng-ref","ng-repeat","ng-required","ng-selected","ng-show","ng-src","ng-srcset","ng-style","ng-submit","ng-switch","ng-transclude","ng-value","ng-animate-children","ng-animate-swap","ng-outlet","ng-message","ng-message-default","ng-message-exp","ng-messages","ng-messages-include","ng-view","ng-swipe-left","ng-swipe-right","md-autocomplete","md-autofocus","md-button","md-calendar","md-card","md-checkbox","md-chip","md-chip-remove","md-chips","md-colors","md-contact-chips","md-content","md-datepicker","md-dialog","md-divider","md-fab-actions","md-fab-speed-dial","md-fab-toolbar","md-force-height","md-grid-list","md-grid-tile","md-highlight-text","md-icon","md-ink-ripple","md-input","md-input-container","md-list","md-list-item","md-menu","md-menu-bar","md-nav-bar","md-nav-item","md-optgroup","md-option","md-progress-circular","md-progress-linear","md-radio-button","md-radio-group","md-select","md-select-on-focus","md-sidenav","md-slider","md-slider-container","md-subheader","md-swipe-down","md-swipe-left","md-swipe-right","md-swipe-up","md-switch","md-tab","md-tabs","md-toolbar","md-tooltip","md-truncate","md-virtual-repeat","md-virtual-repeat-container","md-whiteframe","md-svg-src","stratus-base","stratus-calculator-mortgage","stratus-calendar","stratus-citation","stratus-citation-notitle","stratus-contact-form","stratus-content-selector","stratus-date-time","stratus-delete","stratus-error-message","stratus-facebook","stratus-filter","stratus-help","stratus-idx-disclaimer","stratus-idx-map","stratus-idx-member-details","stratus-idx-member-list","stratus-idx-member-search","stratus-idx-office-list","stratus-idx-office-search","stratus-idx-property-details","stratus-idx-property-details-sub-section","stratus-idx-property-list","stratus-idx-property-search","stratus-image-carousel","stratus-json-editor","stratus-media-details","stratus-media-drag-drop","stratus-media-library","stratus-media-selector","stratus-media-short-details","stratus-media-uploader","stratus-open-houses","stratus-option-value","stratus-pagination","stratus-password-reset","stratus-permissions","stratus-proposal-alert","stratus-publish","stratus-role","stratus-search","stratus-single-sign-on","stratus-social-media","stratus-sort","stratus-swiper-carousel","stratus-tag","stratus-theme-selector","stratus-twitter-feed","stratus-user-authentication","stratus-user-selector","stratus-visual-selector","sa-boot","sa-editor","sa-map","sa-media-selector","sa-selector","sa-stripe-payment-method-list","sa-stripe-payment-method-selector","sa-tree"],htmlAllowedStyleProps:[".*"],htmlAllowedTags:["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","br","button","canvas","caption","cite","code","col","colgroup","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meter","nav","noscript","object","ol","optgroup","option","output","p","param","pre","progress","queue","rp","rt","ruby","s","samp","script","style","section","select","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","animate","animateMotion","animateTransform","circle","clipPath","defs","desc","discard","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tspan","unknown","use","view","ng-app","ng-bind","ng-bind-html","ng-bind-template","ng-blur","ng-change","ng-checked","ng-class","ng-class-even","ng-class-odd","ng-click","ng-cloak","ng-controller","ng-copy","ng-csp","ng-cut","ng-dblclick","ng-disabled","ng-focus","ng-form","ng-hide","ng-href","ng-if","ng-include","ng-init","ng-jq","ng-keydown","ng-keypress","ng-keyup","ng-list","ng-maxlength","ng-minlength","ng-model","ng-model-options","ng-mousedown","ng-mouseenter","ng-mouseleave","ng-mousemove","ng-mouseover","ng-mouseup","ng-non-bindable","ng-on","ng-open","ng-options","ng-paste","ng-pattern","ng-pluralize","ng-prop","ng-readonly","ng-ref","ng-repeat","ng-required","ng-selected","ng-show","ng-src","ng-srcset","ng-style","ng-submit","ng-switch","ng-transclude","ng-value","ng-animate-children","ng-animate-swap","ng-outlet","ng-message","ng-message-default","ng-message-exp","ng-messages","ng-messages-include","ng-view","ng-swipe-left","ng-swipe-right","md-autocomplete","md-autofocus","md-button","md-calendar","md-card","md-checkbox","md-chip","md-chip-remove","md-chips","md-colors","md-contact-chips","md-content","md-datepicker","md-dialog","md-divider","md-fab-actions","md-fab-speed-dial","md-fab-toolbar","md-force-height","md-grid-list","md-grid-tile","md-highlight-text","md-icon","md-ink-ripple","md-input","md-input-container","md-list","md-list-item","md-menu","md-menu-bar","md-nav-bar","md-nav-item","md-optgroup","md-option","md-progress-circular","md-progress-linear","md-radio-button","md-radio-group","md-select","md-select-on-focus","md-sidenav","md-slider","md-slider-container","md-subheader","md-swipe-down","md-swipe-left","md-swipe-right","md-swipe-up","md-switch","md-tab","md-tabs","md-toolbar","md-tooltip","md-truncate","md-virtual-repeat","md-virtual-repeat-container","md-whiteframe","md-svg-src","sa-boot","sa-editor","sa-map","sa-media-selector","sa-selector","sa-stripe-payment-method-list","sa-stripe-payment-method-selector","sa-tree","stratus-.+"],htmlRemoveTags:[],htmlSimpleAmpersand:!1,imageInsertButtons:["imageBack","|","imageUpload","imageByURL"],imageUpload:!0,imageUploadRemoteUrls:!0,imageUploadURL:"https://app.sitetheory.io/?session="+b.cookie("SITETHEORY"),imageManagerPageSize:20,imageManagerScrollOffset:10,imageManagerLoadMethod:"GET",imageManagerLoadURL:"/Api/Media?payload-only=true",linkEditButtons:["linkOpen","linkManagerEdit","linkRemove"],linkInsertButtons:["linkBack"],multiLine:!0,paragraphStyles:{btn:"Button",header:"Header",title:"Title","alt-title":"Alt Title (over)",subtitle:"Subtitle",pullout:"Pullout Quote"},pasteDeniedAttrs:["id","class","style","dir","data-.+","aria-.+","ng-.+","stratus-.+","sa-.+"],pasteDeniedTags:["form","input","label","style"],pastePlain:!1,pluginsEnabled:["align","charCounter","codeBeautifier","codeView","colors","draggable","embedly","entities","file","fontAwesome","fontFamily","fontSize","fullscreen","help","image","imageTUI","inlineStyle","inlineClass","lineBreaker","link","linkManager","citationManager","lists","mediaManager","paragraphFormat","paragraphStyle","print","quickInsert","quote","save","specialCharacters","table","url","video","wordPaste"],quickInsertButtons:["media","link","video","embedly","table","ul","ol","hr"],scrollableContainer:l.Stratus.Environment.get("viewPort")||"body",spellcheck:!0,theme:b.cookie("dark")?"dark":null,toolbarSticky:!0,toolbarButtons:{moreText:{buttons:this.froalaStandardButtons.moreText,buttonsVisible:3},moreParagraph:{buttons:this.froalaStandardButtons.moreParagraph,buttonsVisible:8},moreRich:{buttons:this.froalaStandardButtons.moreRich,buttonsVisible:1},moreMisc:{buttons:this.froalaStandardButtons.moreMisc,align:"right",buttonsVisible:1}},toolbarButtonsSM:{moreText:{buttons:this.froalaStandardButtons.moreText,buttonsVisible:3},moreParagraph:{buttons:this.froalaStandardButtons.moreParagraph,buttonsVisible:0},moreRich:{buttons:this.froalaStandardButtons.moreRich,buttonsVisible:3},moreMisc:{buttons:this.froalaStandardButtons.moreMisc,align:"right",buttonsVisible:0}},toolbarButtonsXS:{moreText:{buttons:this.froalaStandardButtons.moreText,buttonsVisible:0},moreParagraph:{buttons:this.froalaStandardButtons.moreParagraph,buttonsVisible:0},moreRich:{buttons:this.froalaStandardButtons.moreRich,buttonsVisible:0},moreMisc:{buttons:this.froalaStandardButtons.moreMisc,align:"right",buttonsVisible:0}},useClasses:!0,videoInsertButtons:["videoBack","|","videoByURL","videoEmbed","videoUpload"],videoUpload:!0,videoUploadURL:"https://app.sitetheory.io/?session="+b.cookie("SITETHEORY")},this.uid=d.default.uniqueId(`sa_${d.default.snakeCase("editor")}_component_`),l.Stratus.Instances[this.uid]=this,l.Stratus.Internals.LoadCss([`${S}editor/editor.component${x}.css`,`${C}css/froala_editor.pkgd${x}.css`,`${C}css/themes/dark${x}.css`,`${C}css/third_party/embedly${x}.css`,`${C}css/third_party/font_awesome${x}.css`,`${C}css/third_party/image_tui${x}.css`]).then(()=>{this.styled=!0,this.refresh()}).catch(e=>{console.error(e),console.warn("Issue detected in CSS Loader for Component:",this.uid),this.styled=!0,this.refresh()}),this.hydrate(i,e,["title","uid","dev","debug","editor","target","targetSuffix","id","manifest","decouple","direct","api","urlRoot","property","_","has","log","Stratus","registry","fetched","data","collection","model","dataSub","onChange","subscriber","svgIcons","initialized","styled","blurred","focused","codeViewIsOpen","form","dataChangeLog","incomingData","outgoingData","debounceSave","debounceTime","forceSave","froalaEditorDirective","froalaStandardButtons","froalaConfig","sanitizer","ref","elementRef","fb","dialog","ngOnInit","modelSave","listDuplicates","normalizeIn","normalizeOut","changeImgSize","handleError","fetchData","dataDefer","dataRef","onDataChange","created","changedEditor","onChangeEvent","onFocus","onBlur","bypassHTML","trigger","openCitationDialog","openLinkDialog","openMediaDialog","openCodeViewDialog","hydrate","disableRefresh","stagger","reloading","refresh","ngOnDestroy"]),this.fetchData().then(e=>{if(!(e&&e instanceof v.EventManager))return void console.warn("Unable to bind data from Registry!");const t=()=>{e.completed&&(this.dataDefer(this.subscriber),this.codeViewIsOpen)};e.on("change",t),t()}),this.dataSub=new o.Observable(e=>(this.dev&&console.warn("[observable] creating subscriber on "+this.uid,e),this.dataDefer(e))),this.dataSub.pipe(n.debounce(()=>o.timer(250)),n.catchError(this.handleError)).subscribe(e=>{if(this.focused)return void(this.dev&&console.warn("[subscriber] waiting on updates due to focus on "+this.uid));const t=this.form.get("dataString");t.value!==e?(t.patchValue(e),this.refresh()):this.initialized&&this.refresh()})}ngOnInit(){this.initialized=!0;const e=this.form.get("dataString");this.debounceSave?(e.valueChanges.pipe(n.debounce(()=>o.timer(this.debounceTime)),n.catchError(this.handleError)).subscribe(e=>this.modelSave(e)),e.valueChanges.pipe(n.debounce(()=>o.timer(250)),n.catchError(this.handleError)).subscribe(e=>{this.model.changedExternal||(this.model.changedExternal=!0,this.model.trigger("change"))}),e.valueChanges.forEach(e=>this.outgoingData=e)):e.valueChanges.forEach(e=>this.modelSave(e)),this.dev&&this.listDuplicates(this.froalaConfig)}modelSave(e){if(!this.model.completed)return;let t=null;!this.froalaConfig.useClasses&&this.froalaEditorDirective&&this.froalaEditorDirective.getEditor()&&this.froalaEditorDirective.getEditor().el&&this.froalaEditorDirective.getEditor().el.innerHTML&&(t=this.froalaEditorDirective.getEditor().el.innerHTML),this.model.set(this.property,this.normalizeOut(t||e)),this.debounceSave&&(this.model.changedExternal=!1),this.forceSave&&!d.default.isEmpty(this.model.getIdentifier())&&this.model.save()}listDuplicates(e){return d.default.forEach(e,(e,t)=>{if(!d.default.isArray(e))return;const i={};e.forEach(e=>i[e]=(i[e]||0)+1);const a=d.default.filter(d.default.map(i,(e,t)=>e>1?t:null));a.length&&console.warn("Froala Config:",t,"has duplicates:",a)}),e}normalizeIn(e){return e&&d.default.isString(e)?this.changeImgSize(e,"hq"):""}normalizeOut(e){return null===e?"":d.default.isString(e)?this.changeImgSize(e,"xs"):e}changeImgSize(e,t){if(!e||!d.default.isString(e))return e;if(!t||!d.default.isString(t))return e;const i=/<img([\w\W]+?)>/gi;let a;for(;a=i.exec(e);){const i=a[0];if(i.includes("data:image"))continue;const r=/^<img\s(.+?)(-[A-Z]{2})?\.(?=[^.]*$)(.+)>/gi.exec(i);if(null!==r)if(i.includes("data-stratus-src"))e=e.replace(i,`<img ${r[1]}-${t}.${r[3]}>`);else{if(!i.includes("cdn.sitetheory.io"))continue;if(d.default.isEmpty(r[2]))continue;e=e.replace(i,`<img data-stratus-src ${r[1]}-${t}.${r[3]}>`)}else console.warn("Unable to find file name for image src:",i)}return e}handleError(e){return console.error(e),e}fetchData(){return this.fetched?this.fetched:this.fetched=this.registry.fetch(l.Stratus.Select(this.elementRef.nativeElement),this)}dataDefer(e){if(this.subscriber=this.subscriber||e,!this.subscriber)return this.dev&&console.warn("[defer] debouncing due to empty subscriber on "+this.uid),void setTimeout(()=>{this.dev&&console.warn("[defer] debounced subscriber returned on "+this.uid),this.dataDefer(e)},250);const t=d.default.clone(this.incomingData),i=this.dataRef();return t!==i?i||this.data&&this.data.completed?void((this.froalaConfig.useClasses||t!==i)&&(this.dev&&console.warn(`[subscriber] new value submitted on ${this.uid}:`,i),this.subscriber.next(i))):(this.dev&&console.warn("[defer] debouncing subscriber due to unavailable data on "+this.uid,this.data),void setTimeout(()=>{this.dev&&console.warn("[defer] debounced subscriber returned on "+this.uid),this.dataDefer(e)},250)):void 0}dataRef(){return this.model?this.incomingData=this.normalizeIn(this.model.get(this.property)):""}onDataChange(){this.dataDefer(this.subscriber),this.refresh()}created(){}changedEditor(e){console.log("editor-change:",e)}onChangeEvent(e){console.log("change:",e)}onFocus(e){this.dev&&this.debug&&console.warn("[onFocus] triggered on "+this.uid),this.focused=!0,this.blurred=!1}onBlur(e){this.dev&&this.debug&&console.warn("[onBlur] triggered on "+this.uid),this.focused=!1,this.blurred=!0,this.debounceSave&&this.modelSave(this.outgoingData)}bypassHTML(e){return this.sanitizer.bypassSecurityTrustHtml(e)}trigger(e,t,i){this.dev&&this.debug&&console.log("editor.trigger:",e,i),"media-library"===e?this.openMediaDialog(i):"citation-input"===e?this.openCitationDialog(i):"link-library"===e?this.openLinkDialog(i,t):"code-view"===e&&this.openCodeViewDialog()}openCitationDialog(e){const t=this.dialog.open(u.CitationDialogComponent,{width:"1000px",data:{editor:this,eventManager:e,form:this.form,model:this.model,property:this.property}}),i=this;t.afterClosed().subscribe(e=>{e&&!d.default.isEmpty(e)&&(i.refresh(),this.dev&&e&&console.log("citation dialog result:",e))})}openLinkDialog(e,t){const i=this.dialog.open(g.LinkDialogComponent,{width:"500px",data:{editor:this,eventManager:e,element:t,form:this.form,model:this.model,property:this.property}});this.refresh();const a=this;i.afterClosed().subscribe(e=>{e&&!d.default.isEmpty(e)&&(a.refresh(),this.dev&&e&&console.log("link dialog result:",e))})}openMediaDialog(e){const t=this.dialog.open(m.MediaDialogComponent,{width:"1000px",data:{editor:this,eventManager:e,form:this.form,model:this.model,property:this.property}});this.refresh();const i=this;t.afterClosed().subscribe(e=>{e&&!d.default.isEmpty(e)&&(i.refresh(),this.dev&&e&&console.log("media dialog result:",e))})}openCodeViewDialog(){this.codeViewIsOpen=!0;const e=this.dialog.open(h.CodeViewDialogComponent,{width:"1000px",data:{form:this.form,model:this.model,property:this.property}});this.refresh(),e.afterClosed().subscribe(e=>{this.codeViewIsOpen=!1,e&&!d.default.isEmpty(e)&&(this.refresh(),this.dev&&e&&console.log("code view dialog result:",e))})}},E([i.Input(),T("design:type",String)],M.prototype,"target",void 0),E([i.Input(),T("design:type",String)],M.prototype,"targetSuffix",void 0),E([i.Input(),T("design:type",Number)],M.prototype,"id",void 0),E([i.Input(),T("design:type",Boolean)],M.prototype,"manifest",void 0),E([i.Input(),T("design:type",Boolean)],M.prototype,"decouple",void 0),E([i.Input(),T("design:type",Boolean)],M.prototype,"direct",void 0),E([i.Input(),T("design:type",Object)],M.prototype,"api",void 0),E([i.Input(),T("design:type",String)],M.prototype,"urlRoot",void 0),E([i.Input(),T("design:type",String)],M.prototype,"property",void 0),M=E([i.Component({selector:"sa-editor",templateUrl:`${S}/editor/editor.component${x}.html`}),T("design:paramtypes",[s.DomSanitizer,i.ChangeDetectorRef,i.ElementRef,a.FormBuilder,r.MatDialog])],M),e("EditorComponent",M)}}});
1
+ System.register(["@angular/core","@angular/forms","@angular/material/dialog","rxjs","rxjs/operators","@angular/platform-browser","@stratusjs/runtime/stratus","lodash","../core/root.component","./citation-dialog.component","./link-dialog.component","./media-dialog.component","./code-view-dialog.component","./code-mirror-bridge","@stratusjs/angularjs/services/registry","@stratusjs/core/environment","@stratusjs/core/events/eventManager","html2pdf","font-awesome","froala-plugins","froala-embedly","froala-font-awesome","froala-image-tui","../froala/plugins/citationManager","../froala/plugins/linkManager","../froala/plugins/mediaManager","codemirror","@codemirror/lang-html","@codemirror/theme-one-dark"],function(e,t){"use strict";var i,a,r,n,o,s,l,d,c,u,g,m,h,p,f,b,v,y,k,w,x,S,C,D,M,E=this&&this.__decorate||function(e,t,i,a){var r,n=arguments.length,o=n<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o},T=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};t&&t.id;return{setters:[function(e){i=e},function(e){a=e},function(e){r=e},function(e){n=e},function(e){o=e},function(e){s=e},function(e){l=e},function(e){d=e},function(e){c=e},function(e){u=e},function(e){g=e},function(e){m=e},function(e){h=e},function(e){p=e},function(e){f=e},function(e){b=e},function(e){v=e},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){y=e},function(e){k=e},function(e){w=e}],execute:function(){"@stratusjs/angular","froala-editor","editor",x=b.cookie("env")?"":".min",S=`${l.Stratus.BaseUrl}${boot.configuration.paths["@stratusjs/angular/*"].replace(/[^\/]*$/,"").replace(/\/dist\/$/,"/src/")}`,C=`${l.Stratus.BaseUrl}${boot.configuration.paths["froala-editor"].replace(/js\/[^\/]*$/,"")}`,D=(e,t)=>d.default.has(e,t)&&!d.default.isEmpty(d.default.get(e,t)),M=class extends c.RootComponent{constructor(e,t,i,r,s){super(),this.sanitizer=e,this.ref=t,this.elementRef=i,this.fb=r,this.dialog=s,this.title="editor_component",this.dev=!!b.cookie("env"),this.debug=!!b.cookie("debug_editor"),this.editor="froala",this._=d.default,this.has=D,this.log=console.log,this.Stratus=l.Stratus,this.registry=new f.Registry,this.onChange=new n.Subject,this.svgIcons={},this.initialized=!1,this.styled=!1,this.blurred=!1,this.focused=!1,this.form=this.fb.group({dataString:new a.FormControl}),this.dataChangeLog=[],this.incomingData="",this.outgoingData="",this.debounceSave=!0,this.debounceTime=5e3,this.forceSave=!1,this.froalaStandardButtons={moreText:["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","textColor","backgroundColor","inlineClass","inlineStyle","clearFormatting"],moreParagraph:["linkManager","formatOL","formatUL","indent","outdent","quote","paragraphFormat","paragraphStyle","alignLeft","alignCenter","alignRight","alignJustify"],moreRich:["mediaManager","insertTable","insertImage","insertVideo","insertFile","citationInsert","insertHR","specialCharacters"],moreMisc:["html","undo","redo","fullscreen","print","selectAll","help"]},this.froalaConfig={attribution:!1,key:l.Stratus.Environment.get("froalaKey"),zIndex:9999,events:{initialized:e=>{this.froalaEditorDirective=e},blur:e=>this.onBlur(e),focus:e=>this.onFocus(e)},codeBeautifierOptions:{end_with_newline:!0,indent_inner_html:!0,extra_liners:'["p", "h1", "h2", "h3", "h4", "h5", "h6", "blockquote", "pre", "ul", "ol", "table", "dl"]',brace_style:"expand",indent_char:" ",indent_size:4,wrap_line_length:0},codeMirror:{fromTextArea:(e,t)=>{const i=[y.basicSetup,y.EditorView.lineWrapping,k.html({})];return b.cookie("dark")&&i.push(w.oneDarkTheme),new p.CodeMirrorBridge({extensions:i}).fromTextArea(e,t)}},codeMirrorOptions:{indentWithTabs:!1,lineNumbers:!0,lineWrapping:!0,mode:"text/html",tabMode:"space",tabSize:4},fileInsertButtons:["fileBack"],fileUploadURL:"https://app.sitetheory.io/?session="+b.cookie("SITETHEORY"),fontFamily:{"Arial,Helvetica,sans-serif":"Arial","Georgia,serif":"Georgia","Impact,Charcoal,sans-serif":"Impact","Tahoma,Geneva,sans-serif":"Tahoma",'"Times New Roman",Times,serif':"Times New Roman","Verdana,Geneva,sans-serif":"Verdana"},heightMax:window.innerHeight||document.documentElement.clientHeight||500,htmlAllowedAttrs:["aria-.+","data-.+","ng-.+","stratus-.+","sa-.+","accept","accept-charset","accesskey","action","align","allow","allowfullscreen","allowtransparency","alt","async","autocomplete","autofocus","autoplay","autosave","background","bgcolor","border","charset","cellpadding","cellspacing","checked","cite","class","color","cols","colspan","content","contenteditable","contextmenu","controls","coords","data","datetime","default","defer","dir","dirname","disabled","download","draggable","dropzone","enctype","for","form","formaction","frameborder","headers","height","hidden","high","href","hreflang","http-equiv","icon","id","ismap","itemprop","keytype","kind","label","lang","language","list","loop","low","max","maxlength","media","method","min","mozallowfullscreen","multiple","muted","name","novalidate","open","optimum","pattern","ping","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","reversed","rows","rowspan","sandbox","scope","scoped","scrolling","seamless","selected","shape","size","sizes","span","src","srcdoc","srclang","srcset","start","step","summary","spellcheck","style","tabindex","target","title","type","translate","usemap","value","valign","webkitallowfullscreen","width","wrap","xmlns","xmlns:xlink","accent-height","accumulate","additive","alignment-baseline","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","clip","clipPathUnits","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","crossorigin","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fr","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","horiz-adv-x","horiz-origin-x","ideographic","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","marker-mid","marker-start","markerHeight","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","panose-1","paint-order","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","referrerPolicy","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","surfaceScale","systemLanguage","tableValues","targetX","targetY","text-anchor","text-decoration","text-rendering","textLength","to","transform","transform-origin","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","values","vector-effect","version","vert-adv-y","vert-origin-x","vert-origin-y","viewBox","viewTarget","visibility","widths","word-spacing","writing-mode","x","x-height","x1","x2","xChannelSelector","xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xml:space","y","y1","y2","yChannelSelector","z","zoomAndPan"],htmlAllowedEmptyTags:["textarea","a","iframe","object","video","style","script","form","hr","div","animate","animateMotion","animateTransform","circle","clipPath","defs","desc","discard","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tspan","unknown","use","view","ng-app","ng-bind","ng-bind-html","ng-bind-template","ng-blur","ng-change","ng-checked","ng-class","ng-class-even","ng-class-odd","ng-click","ng-cloak","ng-controller","ng-copy","ng-csp","ng-cut","ng-dblclick","ng-disabled","ng-focus","ng-form","ng-hide","ng-href","ng-if","ng-include","ng-init","ng-jq","ng-keydown","ng-keypress","ng-keyup","ng-list","ng-maxlength","ng-minlength","ng-model","ng-model-options","ng-mousedown","ng-mouseenter","ng-mouseleave","ng-mousemove","ng-mouseover","ng-mouseup","ng-non-bindable","ng-on","ng-open","ng-options","ng-paste","ng-pattern","ng-pluralize","ng-prop","ng-readonly","ng-ref","ng-repeat","ng-required","ng-selected","ng-show","ng-src","ng-srcset","ng-style","ng-submit","ng-switch","ng-transclude","ng-value","ng-animate-children","ng-animate-swap","ng-outlet","ng-message","ng-message-default","ng-message-exp","ng-messages","ng-messages-include","ng-view","ng-swipe-left","ng-swipe-right","md-autocomplete","md-autofocus","md-button","md-calendar","md-card","md-checkbox","md-chip","md-chip-remove","md-chips","md-colors","md-contact-chips","md-content","md-datepicker","md-dialog","md-divider","md-fab-actions","md-fab-speed-dial","md-fab-toolbar","md-force-height","md-grid-list","md-grid-tile","md-highlight-text","md-icon","md-ink-ripple","md-input","md-input-container","md-list","md-list-item","md-menu","md-menu-bar","md-nav-bar","md-nav-item","md-optgroup","md-option","md-progress-circular","md-progress-linear","md-radio-button","md-radio-group","md-select","md-select-on-focus","md-sidenav","md-slider","md-slider-container","md-subheader","md-swipe-down","md-swipe-left","md-swipe-right","md-swipe-up","md-switch","md-tab","md-tabs","md-toolbar","md-tooltip","md-truncate","md-virtual-repeat","md-virtual-repeat-container","md-whiteframe","md-svg-src","stratus-base","stratus-calculator-mortgage","stratus-calendar","stratus-citation","stratus-citation-notitle","stratus-contact-form","stratus-content-selector","stratus-date-time","stratus-delete","stratus-error-message","stratus-facebook","stratus-filter","stratus-help","stratus-idx-disclaimer","stratus-idx-map","stratus-idx-member-details","stratus-idx-member-list","stratus-idx-member-search","stratus-idx-office-list","stratus-idx-office-search","stratus-idx-property-details","stratus-idx-property-details-sub-section","stratus-idx-property-list","stratus-idx-property-search","stratus-image-carousel","stratus-json-editor","stratus-media-details","stratus-media-drag-drop","stratus-media-library","stratus-media-selector","stratus-media-short-details","stratus-media-uploader","stratus-open-houses","stratus-option-value","stratus-pagination","stratus-password-reset","stratus-permissions","stratus-proposal-alert","stratus-publish","stratus-role","stratus-search","stratus-single-sign-on","stratus-social-media","stratus-sort","stratus-swiper-carousel","stratus-tag","stratus-theme-selector","stratus-twitter-feed","stratus-user-authentication","stratus-user-selector","stratus-visual-selector","sa-boot","sa-editor","sa-map","sa-media-selector","sa-selector","sa-stripe-payment-method-list","sa-stripe-payment-method-selector","sa-tree"],htmlAllowedStyleProps:[".*"],htmlAllowedTags:["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","br","button","canvas","caption","cite","code","col","colgroup","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meter","nav","noscript","object","ol","optgroup","option","output","p","param","pre","progress","queue","rp","rt","ruby","s","samp","script","style","section","select","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","animate","animateMotion","animateTransform","circle","clipPath","defs","desc","discard","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tspan","unknown","use","view","ng-app","ng-bind","ng-bind-html","ng-bind-template","ng-blur","ng-change","ng-checked","ng-class","ng-class-even","ng-class-odd","ng-click","ng-cloak","ng-controller","ng-copy","ng-csp","ng-cut","ng-dblclick","ng-disabled","ng-focus","ng-form","ng-hide","ng-href","ng-if","ng-include","ng-init","ng-jq","ng-keydown","ng-keypress","ng-keyup","ng-list","ng-maxlength","ng-minlength","ng-model","ng-model-options","ng-mousedown","ng-mouseenter","ng-mouseleave","ng-mousemove","ng-mouseover","ng-mouseup","ng-non-bindable","ng-on","ng-open","ng-options","ng-paste","ng-pattern","ng-pluralize","ng-prop","ng-readonly","ng-ref","ng-repeat","ng-required","ng-selected","ng-show","ng-src","ng-srcset","ng-style","ng-submit","ng-switch","ng-transclude","ng-value","ng-animate-children","ng-animate-swap","ng-outlet","ng-message","ng-message-default","ng-message-exp","ng-messages","ng-messages-include","ng-view","ng-swipe-left","ng-swipe-right","md-autocomplete","md-autofocus","md-button","md-calendar","md-card","md-checkbox","md-chip","md-chip-remove","md-chips","md-colors","md-contact-chips","md-content","md-datepicker","md-dialog","md-divider","md-fab-actions","md-fab-speed-dial","md-fab-toolbar","md-force-height","md-grid-list","md-grid-tile","md-highlight-text","md-icon","md-ink-ripple","md-input","md-input-container","md-list","md-list-item","md-menu","md-menu-bar","md-nav-bar","md-nav-item","md-optgroup","md-option","md-progress-circular","md-progress-linear","md-radio-button","md-radio-group","md-select","md-select-on-focus","md-sidenav","md-slider","md-slider-container","md-subheader","md-swipe-down","md-swipe-left","md-swipe-right","md-swipe-up","md-switch","md-tab","md-tabs","md-toolbar","md-tooltip","md-truncate","md-virtual-repeat","md-virtual-repeat-container","md-whiteframe","md-svg-src","sa-boot","sa-editor","sa-map","sa-media-selector","sa-selector","sa-stripe-payment-method-list","sa-stripe-payment-method-selector","sa-tree","stratus-.+"],htmlRemoveTags:[],htmlSimpleAmpersand:!1,imageInsertButtons:["imageBack","|","imageUpload","imageByURL"],imageUpload:!0,imageUploadRemoteUrls:!0,imageUploadURL:"https://app.sitetheory.io/?session="+b.cookie("SITETHEORY"),imageManagerPageSize:20,imageManagerScrollOffset:10,imageManagerLoadMethod:"GET",imageManagerLoadURL:"/Api/Media?payload-only=true",linkEditButtons:["linkOpen","linkManagerEdit","linkRemove"],linkInsertButtons:["linkBack"],multiLine:!0,paragraphStyles:{btn:"Button",header:"Header",title:"Title","alt-title":"Alt Title (over)",subtitle:"Subtitle",pullout:"Pullout Quote"},pasteDeniedAttrs:["id","class","style","dir","data-.+","aria-.+","ng-.+","stratus-.+","sa-.+"],pasteDeniedTags:["form","input","label","style"],pastePlain:!1,pluginsEnabled:["align","charCounter","codeBeautifier","codeView","colors","draggable","embedly","entities","file","fontAwesome","fontFamily","fontSize","fullscreen","help","image","imageTUI","inlineStyle","inlineClass","lineBreaker","link","linkManager","citationManager","lists","mediaManager","paragraphFormat","paragraphStyle","print","quickInsert","quote","save","specialCharacters","table","url","video","wordPaste"],quickInsertButtons:["media","link","video","embedly","table","ul","ol","hr"],scrollableContainer:l.Stratus.Environment.get("viewPort")||"body",spellcheck:!0,theme:b.cookie("dark")?"dark":null,toolbarSticky:!0,toolbarButtons:{moreText:{buttons:this.froalaStandardButtons.moreText,buttonsVisible:3},moreParagraph:{buttons:this.froalaStandardButtons.moreParagraph,buttonsVisible:8},moreRich:{buttons:this.froalaStandardButtons.moreRich,buttonsVisible:1},moreMisc:{buttons:this.froalaStandardButtons.moreMisc,align:"right",buttonsVisible:1}},toolbarButtonsSM:{moreText:{buttons:this.froalaStandardButtons.moreText,buttonsVisible:3},moreParagraph:{buttons:this.froalaStandardButtons.moreParagraph,buttonsVisible:0},moreRich:{buttons:this.froalaStandardButtons.moreRich,buttonsVisible:3},moreMisc:{buttons:this.froalaStandardButtons.moreMisc,align:"right",buttonsVisible:0}},toolbarButtonsXS:{moreText:{buttons:this.froalaStandardButtons.moreText,buttonsVisible:0},moreParagraph:{buttons:this.froalaStandardButtons.moreParagraph,buttonsVisible:0},moreRich:{buttons:this.froalaStandardButtons.moreRich,buttonsVisible:0},moreMisc:{buttons:this.froalaStandardButtons.moreMisc,align:"right",buttonsVisible:0}},useClasses:!0,videoInsertButtons:["videoBack","|","videoByURL","videoEmbed","videoUpload"],videoUpload:!0,videoUploadURL:"https://app.sitetheory.io/?session="+b.cookie("SITETHEORY")},this.uid=d.default.uniqueId(`sa_${d.default.snakeCase("editor")}_component_`),l.Stratus.Instances[this.uid]=this,l.Stratus.Internals.LoadCss([`${S}editor/editor.component${x}.css`,`${C}css/froala_editor.pkgd${x}.css`,`${C}css/themes/dark${x}.css`,`${C}css/third_party/embedly${x}.css`,`${C}css/third_party/font_awesome${x}.css`,`${C}css/third_party/image_tui${x}.css`]).then(()=>{this.styled=!0,this.refresh()}).catch(e=>{console.error(e),console.warn("Issue detected in CSS Loader for Component:",this.uid),this.styled=!0,this.refresh()}),this.hydrate(i,e,["title","uid","dev","debug","editor","target","targetSuffix","id","manifest","decouple","direct","api","urlRoot","property","_","has","log","Stratus","registry","fetched","data","collection","model","dataSub","onChange","subscriber","svgIcons","initialized","styled","blurred","focused","codeViewIsOpen","form","dataChangeLog","incomingData","outgoingData","debounceSave","debounceTime","forceSave","froalaEditorDirective","froalaStandardButtons","froalaConfig","sanitizer","ref","elementRef","fb","dialog","ngOnInit","modelSave","listDuplicates","normalizeIn","normalizeOut","changeImgSize","handleError","fetchData","dataDefer","dataRef","onDataChange","created","changedEditor","onChangeEvent","onFocus","onBlur","bypassHTML","trigger","openCitationDialog","openLinkDialog","openMediaDialog","openCodeViewDialog","hydrate","disableRefresh","stagger","reloading","refresh","ngOnDestroy"]),this.fetchData().then(e=>{if(!(e&&e instanceof v.EventManager))return void console.warn("Unable to bind data from Registry!");const t=()=>{e.completed&&(this.dataDefer(this.subscriber),this.codeViewIsOpen)};e.on("change",t),t()}),this.dataSub=new n.Observable(e=>(this.dev&&console.warn("[observable] creating subscriber on "+this.uid,e),this.dataDefer(e))),this.dataSub.pipe(o.debounce(()=>n.timer(250)),o.catchError(this.handleError)).subscribe(e=>{if(this.focused)return void(this.dev&&console.warn("[subscriber] waiting on updates due to focus on "+this.uid));const t=this.form.get("dataString");t.value!==e?(t.patchValue(e),this.refresh()):this.initialized&&this.refresh()})}ngOnInit(){this.initialized=!0;const e=this.form.get("dataString");this.debounceSave?(e.valueChanges.pipe(o.debounce(()=>n.timer(this.debounceTime)),o.catchError(this.handleError)).subscribe(e=>this.modelSave(e)),e.valueChanges.pipe(o.debounce(()=>n.timer(250)),o.catchError(this.handleError)).subscribe(e=>{this.model.changedExternal||(this.model.changedExternal=!0,this.model.trigger("change"))}),e.valueChanges.forEach(e=>this.outgoingData=e)):e.valueChanges.forEach(e=>this.modelSave(e)),this.dev&&this.listDuplicates(this.froalaConfig)}modelSave(e){if(!this.model.completed)return;let t=null;!this.froalaConfig.useClasses&&this.froalaEditorDirective&&this.froalaEditorDirective.getEditor()&&this.froalaEditorDirective.getEditor().el&&this.froalaEditorDirective.getEditor().el.innerHTML&&(t=this.froalaEditorDirective.getEditor().el.innerHTML),this.model.set(this.property,this.normalizeOut(t||e)),this.debounceSave&&(this.model.changedExternal=!1),this.forceSave&&!d.default.isEmpty(this.model.getIdentifier())&&this.model.save()}listDuplicates(e){return d.default.forEach(e,(e,t)=>{if(!d.default.isArray(e))return;const i={};e.forEach(e=>i[e]=(i[e]||0)+1);const a=d.default.filter(d.default.map(i,(e,t)=>e>1?t:null));a.length&&console.warn("Froala Config:",t,"has duplicates:",a)}),e}normalizeIn(e){return e&&d.default.isString(e)?this.changeImgSize(e,"hq"):""}normalizeOut(e){return null===e?"":d.default.isString(e)?this.changeImgSize(e,"xs"):e}changeImgSize(e,t){if(!e||!d.default.isString(e))return e;if(!t||!d.default.isString(t))return e;const i=/<img([\w\W]+?)>/gi;let a;for(;a=i.exec(e);){const i=a[0];if(i.includes("data:image"))continue;const r=/^<img\s(.+?)(-[A-Z]{2})?\.(?=[^.]*$)(.+)>/gi.exec(i);if(null!==r)if(i.includes("data-stratus-src"))e=e.replace(i,`<img ${r[1]}-${t}.${r[3]}>`);else{if(!i.includes("cdn.sitetheory.io"))continue;if(d.default.isEmpty(r[2]))continue;e=e.replace(i,`<img data-stratus-src ${r[1]}-${t}.${r[3]}>`)}else console.warn("Unable to find file name for image src:",i)}return e}handleError(e){return console.error(e),e}fetchData(){return this.fetched?this.fetched:this.fetched=this.registry.fetch(l.Stratus.Select(this.elementRef.nativeElement),this)}dataDefer(e){if(this.subscriber=this.subscriber||e,!this.subscriber)return this.dev&&console.warn("[defer] debouncing due to empty subscriber on "+this.uid),void setTimeout(()=>{this.dev&&console.warn("[defer] debounced subscriber returned on "+this.uid),this.dataDefer(e)},250);const t=d.default.clone(this.incomingData),i=this.dataRef();return t!==i?i||this.data&&this.data.completed?void((this.froalaConfig.useClasses||t!==i)&&(this.dev&&console.warn(`[subscriber] new value submitted on ${this.uid}:`,i),this.subscriber.next(i))):(this.dev&&console.warn("[defer] debouncing subscriber due to unavailable data on "+this.uid,this.data),void setTimeout(()=>{this.dev&&console.warn("[defer] debounced subscriber returned on "+this.uid),this.dataDefer(e)},250)):void 0}dataRef(){return this.model?this.incomingData=this.normalizeIn(this.model.get(this.property)):""}onDataChange(){this.dataDefer(this.subscriber),this.refresh()}created(){}changedEditor(e){console.log("editor-change:",e)}onChangeEvent(e){console.log("change:",e)}onFocus(e){this.dev&&this.debug&&console.warn("[onFocus] triggered on "+this.uid),this.focused=!0,this.blurred=!1}onBlur(e){this.dev&&this.debug&&console.warn("[onBlur] triggered on "+this.uid),this.focused=!1,this.blurred=!0,this.debounceSave&&this.modelSave(this.outgoingData)}bypassHTML(e){return this.sanitizer.bypassSecurityTrustHtml(e)}trigger(e,t,i){this.dev&&this.debug&&console.log("editor.trigger:",e,i),"media-library"===e?this.openMediaDialog(i):"citation-input"===e?this.openCitationDialog(i):"link-library"===e?this.openLinkDialog(i,t):"code-view"===e&&this.openCodeViewDialog()}openCitationDialog(e){const t=this.dialog.open(u.CitationDialogComponent,{width:"1000px",data:{editor:this,eventManager:e,form:this.form,model:this.model,property:this.property}}),i=this;t.afterClosed().subscribe(e=>{e&&!d.default.isEmpty(e)&&(i.refresh(),this.dev&&e&&console.log("citation dialog result:",e))})}openLinkDialog(e,t){const i=this.dialog.open(g.LinkDialogComponent,{width:"500px",data:{editor:this,eventManager:e,element:t,form:this.form,model:this.model,property:this.property}});this.refresh();const a=this;i.afterClosed().subscribe(e=>{e&&!d.default.isEmpty(e)&&(a.refresh(),this.dev&&e&&console.log("link dialog result:",e))})}openMediaDialog(e){const t=this.dialog.open(m.MediaDialogComponent,{width:"1000px",data:{editor:this,eventManager:e,form:this.form,model:this.model,property:this.property}});this.refresh();const i=this;t.afterClosed().subscribe(e=>{e&&!d.default.isEmpty(e)&&(i.refresh(),this.dev&&e&&console.log("media dialog result:",e))})}openCodeViewDialog(){this.codeViewIsOpen=!0;const e=this.dialog.open(h.CodeViewDialogComponent,{width:"1000px",data:{form:this.form,model:this.model,property:this.property}});this.refresh(),e.afterClosed().subscribe(e=>{this.codeViewIsOpen=!1,e&&!d.default.isEmpty(e)&&(this.refresh(),this.dev&&e&&console.log("code view dialog result:",e))})}},E([i.Input(),T("design:type",String)],M.prototype,"target",void 0),E([i.Input(),T("design:type",String)],M.prototype,"targetSuffix",void 0),E([i.Input(),T("design:type",Number)],M.prototype,"id",void 0),E([i.Input(),T("design:type",Boolean)],M.prototype,"manifest",void 0),E([i.Input(),T("design:type",Boolean)],M.prototype,"decouple",void 0),E([i.Input(),T("design:type",Boolean)],M.prototype,"direct",void 0),E([i.Input(),T("design:type",Object)],M.prototype,"api",void 0),E([i.Input(),T("design:type",String)],M.prototype,"urlRoot",void 0),E([i.Input(),T("design:type",String)],M.prototype,"property",void 0),M=E([i.Component({selector:"sa-editor",templateUrl:`${S}/editor/editor.component${x}.html`}),T("design:paramtypes",[s.DomSanitizer,i.ChangeDetectorRef,i.ElementRef,a.FormBuilder,r.MatDialog])],M),e("EditorComponent",M)}}});
@@ -180,7 +180,10 @@ import '../froala/plugins/mediaManager'
180
180
  import {FroalaEditorDirective} from 'angular-froala-wysiwyg'
181
181
 
182
182
  // CodeMirror Requirements
183
- import {basicSetup} from 'codemirror'
183
+ import {
184
+ basicSetup,
185
+ EditorView
186
+ } from 'codemirror'
184
187
  import {Extension} from '@codemirror/state'
185
188
  import {html} from '@codemirror/lang-html'
186
189
  import {oneDarkTheme} from '@codemirror/theme-one-dark'
@@ -512,6 +515,7 @@ export class EditorComponent extends RootComponent implements OnInit, TriggerInt
512
515
  fromTextArea: (el: HTMLTextAreaElement, opts: LooseObject) => {
513
516
  const extensions: Array<Extension> = [
514
517
  basicSetup,
518
+ EditorView.lineWrapping,
515
519
  html({
516
520
  // extraTags: [
517
521
  // 'sa-editor'
@@ -5,7 +5,8 @@
5
5
  *ngIf="isStyled"
6
6
  [formGroup]='dialogContentForm'>
7
7
 
8
- <mat-form-field class="form-field">
8
+ <mat-form-field class="form-field"
9
+ *ngIf="dialogContentForm.get('linkTextInput').value !== ''">
9
10
  <mat-label>Link Text</m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EAA6E,CAAC,CAAA;wBAC5F,OAAM;qBACT;oBACD,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAA;gBAC5E,CAAC;aACJ,CAAA;YA7cY,mBAAmB;gBAL/B,gBAAS,CAAC;oBACP,QAAQ,EAAE,MAAM,UAAU,EAAE;oBAC5B,WAAW,EAAE,GAAG,QAAQ,IAAI,gBAAgB,IAAI,UAAU,aAAa,GAAG,OAAO;iBAEpF,CAAC;gBA2DO,WAAA,aAAM,CAAC,wBAAe,CAAC,CAAA;iDADN,qBAAY,UAElB,mBAAW;oBACN,gCAAc;oBACb,uBAAW;oBACP,sBAAe;oBAClB,+BAAY;oBAChB,wBAAiB;eAhE3B,mBAAmB,CA6c/B;;QAmBD,CAAC","file":"link-dialog.component.js"}
@@ -1 +1 @@
1
- <h1 mat-dialog-title>Link Selector</h1><div mat-dialog-content class="link-dialog-content"><form class="dialog-form" *ngIf="isStyled" [formGroup]="dialogContentForm"><mat-form-field class="form-field"><mat-label>Link Text</mat-label><input matInput aria-label="Link Text" formControlName="linkTextInput"></mat-form-field><h4><label id="link-type-label">Link Type:</label></h4><mat-radio-group class="radio-group" aria-labelledby="link-type-label" formControlName="linkTypeRadio"><mat-radio-button class="radio-button" value="content">Website Page</mat-radio-button><mat-radio-button class="radio-button" value="url">Custom Link</mat-radio-button></mat-radio-group><mat-form-field class="form-field" *ngIf="linkType == 'content'"><input matInput placeholder="Search Content" aria-label="Search Content" [matAutocomplete]="auto" formControlName="contentSelectorInput"></mat-form-field><mat-autocomplete autoActiveFirstOption #auto="matAutocomplete" [displayWith]="displayContentText"><mat-option *ngIf="isContentLoading || isSingleContentLoading" class="is-loading"><mat-progress-bar mode="indeterminate"></mat-progress-bar></mat-option><ng-container *ngIf="!isContentLoading"><mat-option *ngFor="let model of contentEntities" [value]="model"><mat-icon aria-hidden="true" *ngIf="_.get(model, 'contentType.iconResourcePath')" [svgIcon]="getSvg(Stratus.BaseUrl + _.get(model, 'contentType.iconResourcePath')) | async">Icon</mat-icon>{{(model && model.version) ? model.version.title : 'Untitled'}} <small *ngIf="model.routing && model.routing.length">{{'/' + model.routing[0].url}}</small></mat-option></ng-container></mat-autocomplete><mat-form-field class="form-field" *ngIf="linkType == 'url'"><input matInput placeholder="Edit URL" aria-label="Edit URL" formControlName="linkURLInput"></mat-form-field><br><mat-checkbox formControlName="linkTargetCheckbox">Open in new tab</mat-checkbox></form><mat-progress-bar mode="indeterminate" *ngIf="!isListView && !isStyled"></mat-progress-bar><mat-progress-bar mode="indeterminate" *ngIf="isListView && (isContentLoading || !isStyled)"></mat-progress-bar><div class="content-list" *ngIf="isListView && isStyled"><div class="content-list-row content-box" [ngClass]="{'active': _.get(model, 'status') === 1, 'inactive' : _.get(model, 'status') !== 1, 'published': _.get(model, 'version.published') === 1, 'unpublished': _.get(model, 'version.published') !== 1, 'selected': isSelected(model)}" (click)="select(model)" *ngFor="let model of contentEntities"><div class="content-list-container"><div class="column-image position-anchor"><div class="image position-all" *ngIf="_.has(model, 'version.bestImage._thumbnailUrl')" [attr.data-stratus-src]="!_.get(model, 'version.bestImage.service') ? true : false" [ngStyle]="{'background': 'url(' + _.get(model, 'version.bestImage._thumbnailUrl') + ') no-repeat center center', 'background-size': 'cover'}"></div><div class="no-image-icon position-all" *ngIf="!_.has(model, 'version.bestImage._thumbnailUrl')" [ngClass]="_.get(model, 'contentType.class') + '-background-color'"><mat-icon class="content-type-icon position-center" [svgIcon]="getSvg(Stratus.BaseUrl + (_.get(model, 'contentType.iconResourcePath') || _.get(model, 'iconResourcePath'))) | async">Icon</mat-icon></div><img class="shapeholder" [src]="Stratus.BaseUrl + 'sitetheorycore/images/shapeholder-square.png'"></div><div class="column-title"><div class="content-type" *ngIf="_.has(model, 'contentType.iconResourcePath')"><mat-icon class="content-type-icon" [svgIcon]="getSvg(Stratus.BaseUrl + _.get(model, 'contentType.iconResourcePath')) | async">ContentType Icon</mat-icon><span class="comment content-type-name font-body" [ngClass]="((_.get(model, 'contentType.name') || _.get(model, 'name')) | lowercase) + '-color'" [textContent]="(_.get(model, 'contentType.name') || _.get(model, 'name')) + ((_.get(model, 'status') !== 1) ? ' (hidden)' : '') + ((_.get(model, 'version.published') !== 1) ? ' (unpublished)' : '')"></span></div><h3 [innerHTML]="_.get(model, 'version.bestIdentifier') || _.get(model, 'name') || (_.get(model, 'contentType.controller') === 'Content\\Module' ? _.get(model, 'version.internalIdentifier') : 'Untitled ' + _.get(model, 'contentType.name') + ' (' + _.get(model, 'id') + ')')"></h3><span class="routing" [textContent]="(_.has(model, 'routing') ? '/' + _.get(model, 'routing[0].url') : null) || _.get(model, 'description') || ''"></span></div><div class="column-action"><a mat-button *ngIf="_.has(model, 'contentType.editUrl')" [matTooltip]="'Edit ' + (_.get(model, 'contentType.name') || _.get(model, 'name'))" aria-label="Edit Item in New Window" class="btn btn-edit" (click)="goToUrl(model, '_blank');"><mat-icon svgIcon="selector_edit" aria-hidden="false" aria-label="Edit Item">Edit</mat-icon></a></div></div></div></div></div><div mat-dialog-actions><mat-progress-bar mode="indeterminate" *ngIf="isSingleContentLoading"></mat-progress-bar><button mat-button mat-dialog-close (click)="onCancelClick()">Cancel</button> <button mat-button (click)="onAcceptClick()">Ok</button></div>
1
+ <h1 mat-dialog-title>Link Selector</h1><div mat-dialog-content class="link-dialog-content"><form class="dialog-form" *ngIf="isStyled" [formGroup]="dialogContentForm"><mat-form-field class="form-field" *ngIf="dialogContentForm.get('linkTextInput').value !== ''"><mat-label>Link Text</mat-label><input matInput aria-label="Link Text" formControlName="linkTextInput"></mat-form-field><h4><label id="link-type-label">Link Type:</label></h4><mat-radio-group class="radio-group" aria-labelledby="link-type-label" formControlName="linkTypeRadio"><mat-radio-button class="radio-button" value="content">Website Page</mat-radio-button><mat-radio-button class="radio-button" value="url">Custom Link</mat-radio-button></mat-radio-group><mat-form-field class="form-field" *ngIf="linkType == 'content'"><input matInput placeholder="Search Content" aria-label="Search Content" [matAutocomplete]="auto" formControlName="contentSelectorInput"></mat-form-field><mat-autocomplete autoActiveFirstOption #auto="matAutocomplete" [displayWith]="displayContentText"><mat-option *ngIf="isContentLoading || isSingleContentLoading" class="is-loading"><mat-progress-bar mode="indeterminate"></mat-progress-bar></mat-option><ng-container *ngIf="!isContentLoading"><mat-option *ngFor="let model of contentEntities" [value]="model"><mat-icon aria-hidden="true" *ngIf="_.get(model, 'contentType.iconResourcePath')" [svgIcon]="getSvg(Stratus.BaseUrl + _.get(model, 'contentType.iconResourcePath')) | async">Icon</mat-icon>{{(model && model.version) ? model.version.title : 'Untitled'}} <small *ngIf="model.routing && model.routing.length">{{'/' + model.routing[0].url}}</small></mat-option></ng-container></mat-autocomplete><mat-form-field class="form-field" *ngIf="linkType == 'url'"><input matInput placeholder="Edit URL" aria-label="Edit URL" formControlName="linkURLInput"></mat-form-field><br><mat-checkbox formControlName="linkTargetCheckbox">Open in new tab</mat-checkbox></form><mat-progress-bar mode="indeterminate" *ngIf="!isListView && !isStyled"></mat-progress-bar><mat-progress-bar mode="indeterminate" *ngIf="isListView && (isContentLoading || !isStyled)"></mat-progress-bar><div class="content-list" *ngIf="isListView && isStyled"><div class="content-list-row content-box" [ngClass]="{'active': _.get(model, 'status') === 1, 'inactive' : _.get(model, 'status') !== 1, 'published': _.get(model, 'version.published') === 1, 'unpublished': _.get(model, 'version.published') !== 1, 'selected': isSelected(model)}" (click)="select(model)" *ngFor="let model of contentEntities"><div class="content-list-container"><div class="column-image position-anchor"><div class="image position-all" *ngIf="_.has(model, 'version.bestImage._thumbnailUrl')" [attr.data-stratus-src]="!_.get(model, 'version.bestImage.service') ? true : false" [ngStyle]="{'background': 'url(' + _.get(model, 'version.bestImage._thumbnailUrl') + ') no-repeat center center', 'background-size': 'cover'}"></div><div class="no-image-icon position-all" *ngIf="!_.has(model, 'version.bestImage._thumbnailUrl')" [ngClass]="_.get(model, 'contentType.class') + '-background-color'"><mat-icon class="content-type-icon position-center" [svgIcon]="getSvg(Stratus.BaseUrl + (_.get(model, 'contentType.iconResourcePath') || _.get(model, 'iconResourcePath'))) | async">Icon</mat-icon></div><img class="shapeholder" [src]="Stratus.BaseUrl + 'sitetheorycore/images/shapeholder-square.png'"></div><div class="column-title"><div class="content-type" *ngIf="_.has(model, 'contentType.iconResourcePath')"><mat-icon class="content-type-icon" [svgIcon]="getSvg(Stratus.BaseUrl + _.get(model, 'contentType.iconResourcePath')) | async">ContentType Icon</mat-icon><span class="comment content-type-name font-body" [ngClass]="((_.get(model, 'contentType.name') || _.get(model, 'name')) | lowercase) + '-color'" [textContent]="(_.get(model, 'contentType.name') || _.get(model, 'name')) + ((_.get(model, 'status') !== 1) ? ' (hidden)' : '') + ((_.get(model, 'version.published') !== 1) ? ' (unpublished)' : '')"></span></div><h3 [innerHTML]="_.get(model, 'version.bestIdentifier') || _.get(model, 'name') || (_.get(model, 'contentType.controller') === 'Content\\Module' ? _.get(model, 'version.internalIdentifier') : 'Untitled ' + _.get(model, 'contentType.name') + ' (' + _.get(model, 'id') + ')')"></h3><span class="routing" [textContent]="(_.has(model, 'routing') ? '/' + _.get(model, 'routing[0].url') : null) || _.get(model, 'description') || ''"></span></div><div class="column-action"><a mat-button *ngIf="_.has(model, 'contentType.editUrl')" [matTooltip]="'Edit ' + (_.get(model, 'contentType.name') || _.get(model, 'name'))" aria-label="Edit Item in New Window" class="btn btn-edit" (click)="goToUrl(model, '_blank');"><mat-icon svgIcon="selector_edit" aria-hidden="false" aria-label="Edit Item">Edit</mat-icon></a></div></div></div></div></div><div mat-dialog-actions><mat-progress-bar mode="indeterminate" *ngIf="isSingleContentLoading"></mat-progress-bar><button mat-button mat-dialog-close (click)="onCancelClick()">Cancel</button> <button mat-button (click)="onAcceptClick()">Ok</button></div>
@@ -3,7 +3,8 @@ import {
3
3
  // ChangeDetectionStrategy,
4
4
  ChangeDetectorRef,
5
5
  Component,
6
- Inject, OnDestroy,
6
+ Inject,
7
+ OnDestroy,
7
8
  OnInit
8
9
  } from '@angular/core'
9
10
  import {
@@ -58,6 +58,9 @@ System.register(["@stratusjs/runtime/stratus", "lodash"], function (exports_1, c
58
58
  this.saveSelection();
59
59
  }
60
60
  this.updateSnapshot();
61
+ if (this.debug) {
62
+ console.log(`[${this.eventName}]:`, { instance, data });
63
+ }
61
64
  instance.trigger(this.eventName, data, this);
62
65
  }
63
66
  trigger(name, data, callee) {
@@ -72,7 +75,7 @@ System.register(["@stratusjs/runtime/stratus", "lodash"], function (exports_1, c
72
75
  console.warn(`${this.name}.trigger(): unable to inject html without a set editor.`);
73
76
  return;
74
77
  }
75
- if (['insert', 'restore'].includes(name)) {
78
+ if (!['insert', 'restore'].includes(name)) {
76
79
  console.warn(`${this.name}.trigger():`, name, 'event is not supported.');
77
80
  return;
78
81
  }
@@ -100,7 +103,13 @@ System.register(["@stratusjs/runtime/stratus", "lodash"], function (exports_1, c
100
103
  console.warn(`${this.name}.restoreSnapshot(): unable to restore editor session without a snapshot.`);
101
104
  return false;
102
105
  }
106
+ if (this.debug) {
107
+ console.log('[restoreSnapshot]is focused:', this.editor.core.hasFocus());
108
+ }
109
+ this.editor.events.disableBlur();
110
+ this.editor.events.focus();
103
111
  this.editor.snapshot.restore(this.snapshot);
112
+ this.editor.events.enableBlur();
104
113
  return true;
105
114
  }
106
115
  updateSnapshot() {
@@ -114,7 +123,13 @@ System.register(["@stratusjs/runtime/stratus", "lodash"], function (exports_1, c
114
123
  console.warn(`${this.name}.restoreSelection(): unable to restore editor selection.`);
115
124
  return false;
116
125
  }
126
+ if (this.debug) {
127
+ console.log('[restoreSelection]is focused:', this.editor.core.hasFocus());
128
+ }
129
+ this.editor.events.disableBlur();
130
+ this.editor.events.focus();
117
131
  this.editor.selection.restore();
132
+ this.editor.events.enableBlur();
118
133
  return true;
119
134
  }
120
135
  saveSelection() {
@@ -122,7 +137,9 @@ System.register(["@stratusjs/runtime/stratus", "lodash"], function (exports_1, c
122
137
  console.warn(`${this.name}.saveSelection(): unable to save editor selection.`);
123
138
  return false;
124
139
  }
140
+ this.editor.events.disableBlur();
125
141
  this.editor.selection.save();
142
+ this.editor.events.enableBlur();
126
143
  return true;
127
144
  }
128
145
  clearSelection() {
@@ -1 +1 @@
1
- {"version":3,"sources":["inputButton.ts"],"names":[],"mappings":";;;;;;;;;;;;;;YAiBA,oBAAA,MAAa,iBAAiB;gBAiB1B,YAAY,OAAY;oBAXxB,UAAK,GAAG,KAAK,CAAA;oBACb,SAAI,GAAG,aAAa,CAAA;oBACpB,cAAS,GAAG,cAAc,CAAA;oBAG1B,yBAAoB,GAAG,KAAK,CAAA;oBAC5B,sBAAiB,GAAG,KAAK,CAAA;oBACzB,sBAAiB,GAAG,KAAK,CAAA;oBACzB,qBAAgB,GAAG,KAAK,CAAA;oBAKpB,IAAI,CAAC,GAAG,GAAG,gBAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAA;oBACtC,iBAAO,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;oBAElC,IAAI,CAAC,KAAK,GAAG,OAAO,IAAI,OAAO,CAAC,KAAK,CAAA;oBAGrC,IAAI,CAAC,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;wBACzC,OAAO,GAAG,EAAE,CAAA;qBACf;oBACD,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAA;oBACrC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,CAAA;oBACpD,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,IAAI,CAAA;oBACpC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,IAAI,CAAA;oBACpC,IAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,IAAI,IAAI,CAAA;oBAChE,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,IAAI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AE,CAAA;oBAEhC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;oBAE1B,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,CAAA;oBAE/B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,CAAA;oBAC/B,OAAO,IAAI,CAAA;gBACf,CAAC;gBAED,aAAa;oBACT,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;wBACxB,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,oDAAoD,CAAC,CAAA;wBAC9E,OAAO,KAAK,CAAA;qBACf;oBAED,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,CAAA;oBAEhC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,CAAA;oBAE5B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,CAAA;oBAC/B,OAAO,IAAI,CAAA;gBACf,CAAC;gBAED,cAAc;oBACV,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;wBACxB,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,sDAAsD,CAAC,CAAA;wBAChF,OAAO,KAAK,CAAA;qBACf;oBACD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,CAAA;oBAC7B,OAAO,IAAI,CAAA;gBACf,CAAC;aACJ,CAAA;;QACD,CAAC","file":"inputButton.js"}
@@ -1 +1 @@
1
- System.register(["@stratusjs/runtime/stratus","lodash"],function(t,e){"use strict";var i,n;e&&e.id;return{setters:[function(t){i=t},function(t){n=t}],execute:function(){t("InputButtonPlugin",class{constructor(t){this.debug=!1,this.name="inputButton",this.eventName="input-button",this.autoRestoreSelection=!1,this.autoSaveSelection=!1,this.maintainSelection=!1,this.maintainSnapshot=!1,this.uid=n.default.uniqueId("input_button_"),i.Stratus.Instances[this.uid]=this,this.debug=t&&t.debug,t&&"object"==typeof t||(t={}),this.name=t.name||this.name,this.eventName=t.eventName||this.eventName,this.editor=t.editor||null,this.insert=t.insert||null,this.autoRestoreSelection=t.autoRestoreSelection||null,this.autoSaveSelection=t.autoSaveSelection||null,this.maintainSelection=t.maintainSelection||null,this.maintainSnapshot=t.maintainSnapshot||null}findUID(t){return"uid"in t.dataset?t.dataset.uid:this.findUID(t.parentElement)}getInstance(t){if(t in i.Stratus.Instances)return i.Stratus.Instances[t]}onClick(t,e){const i=this.findUID(t),n=this.getInstance(i);n&&(this.autoSaveSelection&&this.saveSelection(),this.updateSnapshot(),n.trigger(this.eventName,e,this))}trigger(t,e,i){this.debug&&console.log(this.name+".trigger():",t,e,i),n.default.isEmpty(e)?console.warn(this.name+".trigger():",e,"is not valid data."):this.editor?["insert","restore"].includes(t)?console.warn(this.name+".trigger():",t,"event is not supported."):this.restoreSnapshot()&&(this.autoRestoreSelection&&this.restoreSelection(),"insert"===t?(this.insert?this.insert(e):this.editor.html.insert(e),this.updateSnapshot(),this.maintainSelection&&this.saveSelection()):console.warn(this.name+".trigger():",t,"event is not supported.")):console.warn(this.name+".trigger(): unable to inject html without a set editor.")}restoreSnapshot(){return!this.maintainSnapshot||(this.snapshot?(this.editor.snapshot.restore(this.snapshot),!0):(console.warn(this.name+".restoreSnapshot(): unable to restore editor session without a snapshot."),!1))}updateSnapshot(){if(!this.maintainSnapshot)return!0;this.snapshot=this.editor.snapshot.get()}restoreSelection(){return this.editor.selection?(this.editor.selection.restore(),!0):(console.warn(this.name+".restoreSelection(): unable to restore editor selection."),!1)}saveSelection(){return this.editor.selection?(this.editor.selection.save(),!0):(console.warn(this.name+".saveSelection(): unable to save editor selection."),!1)}clearSelection(){return this.editor.selection?(this.editor.selection.clear(),!0):(console.warn(this.name+".clearSelection(): unable to clear editor selection."),!1)}})}}});
1
+ System.register(["@stratusjs/runtime/stratus","lodash"],function(t,e){"use strict";var s,i;e&&e.id;return{setters:[function(t){s=t},function(t){i=t}],execute:function(){t("InputButtonPlugin",class{constructor(t){this.debug=!1,this.name="inputButton",this.eventName="input-button",this.autoRestoreSelection=!1,this.autoSaveSelection=!1,this.maintainSelection=!1,this.maintainSnapshot=!1,this.uid=i.default.uniqueId("input_button_"),s.Stratus.Instances[this.uid]=this,this.debug=t&&t.debug,t&&"object"==typeof t||(t={}),this.name=t.name||this.name,this.eventName=t.eventName||this.eventName,this.editor=t.editor||null,this.insert=t.insert||null,this.autoRestoreSelection=t.autoRestoreSelection||null,this.autoSaveSelection=t.autoSaveSelection||null,this.maintainSelection=t.maintainSelection||null,this.maintainSnapshot=t.maintainSnapshot||null}findUID(t){return"uid"in t.dataset?t.dataset.uid:this.findUID(t.parentElement)}getInstance(t){if(t in s.Stratus.Instances)return s.Stratus.Instances[t]}onClick(t,e){const s=this.findUID(t),i=this.getInstance(s);i&&(this.autoSaveSelection&&this.saveSelection(),this.updateSnapshot(),this.debug&&console.log(`[${this.eventName}]:`,{instance:i,data:e}),i.trigger(this.eventName,e,this))}trigger(t,e,s){this.debug&&console.log(this.name+".trigger():",t,e,s),i.default.isEmpty(e)?console.warn(this.name+".trigger():",e,"is not valid data."):this.editor?["insert","restore"].includes(t)?this.restoreSnapshot()&&(this.autoRestoreSelection&&this.restoreSelection(),"insert"===t?(this.insert?this.insert(e):this.editor.html.insert(e),this.updateSnapshot(),this.maintainSelection&&this.saveSelection()):console.warn(this.name+".trigger():",t,"event is not supported.")):console.warn(this.name+".trigger():",t,"event is not supported."):console.warn(this.name+".trigger(): unable to inject html without a set editor.")}restoreSnapshot(){return!this.maintainSnapshot||(this.snapshot?(this.debug&&console.log("[restoreSnapshot]is focused:",this.editor.core.hasFocus()),this.editor.events.disableBlur(),this.editor.events.focus(),this.editor.snapshot.restore(this.snapshot),this.editor.events.enableBlur(),!0):(console.warn(this.name+".restoreSnapshot(): unable to restore editor session without a snapshot."),!1))}updateSnapshot(){if(!this.maintainSnapshot)return!0;this.snapshot=this.editor.snapshot.get()}restoreSelection(){return this.editor.selection?(this.debug&&console.log("[restoreSelection]is focused:",this.editor.core.hasFocus()),this.editor.events.disableBlur(),this.editor.events.focus(),this.editor.selection.restore(),this.editor.events.enableBlur(),!0):(console.warn(this.name+".restoreSelection(): unable to restore editor selection."),!1)}saveSelection(){return this.editor.selection?(this.editor.events.disableBlur(),this.editor.selection.save(),this.editor.events.enableBlur(),!0):(console.warn(this.name+".saveSelection(): unable to save editor selection."),!1)}clearSelection(){return this.editor.selection?(this.editor.selection.clear(),!0):(console.warn(this.name+".clearSelection(): unable to clear editor selection."),!1)}})}}});
@@ -14,7 +14,7 @@ import {
14
14
  import _ from 'lodash'
15
15
 
16
16
  // Universal Button
17
- // TODO: Move this elsewhere, since it isn't specific to Froala
17
+ // TODO: Some of this can move elsewhere, since it isn't completely specific to Froala
18
18
  export class InputButtonPlugin<EventData = string|LooseObject> implements TriggerInterface {
19
19
  // Local
20
20
  uid: string
@@ -79,6 +79,9 @@ export class InputButtonPlugin<EventData = string|LooseObject> implements Trigge
79
79
  }
80
80
  // Get snapshot before passing off event
81
81
  this.updateSnapshot()
82
+ if (this.debug) {
83
+ console.log(`[${this.eventName}]:`, {instance, data})
84
+ }
82
85
  instance.trigger(this.eventName, data, this)
83
86
  }
84
87
 
@@ -97,7 +100,7 @@ export class InputButtonPlugin<EventData = string|LooseObject> implements Trigge
97
100
  return
98
101
  }
99
102
  // Ensure we only continue for 'insert' or 'restore' events
100
- if (['insert', 'restore'].includes(name)) {
103
+ if (!['insert', 'restore'].includes(name)) {
101
104
  console.warn(`${this.name}.trigger():`, name, 'event is not supported.')
102
105
  return
103
106
  }
@@ -133,11 +136,17 @@ export class InputButtonPlugin<EventData = string|LooseObject> implements Trigge
133
136
  return false
134
137
  }
135
138
  // Get focus back to the editor
136
- // Note: This is disabled because it makes the cursor jolt to the top
137
- // console.log('[restoreSnapshot]is focused:', this.editor.core.hasFocus())
138
- //this.editor.events.focus()
139
+ if (this.debug) {
140
+ console.log('[restoreSnapshot]is focused:', this.editor.core.hasFocus())
141
+ }
142
+ // Always disable blur before changing focus
143
+ this.editor.events.disableBlur()
144
+ // Get focus back to the editor
145
+ this.editor.events.focus()
139
146
  // Restore last snapshot
140
147
  this.editor.snapshot.restore(this.snapshot)
148
+ // Enable Blur after snapshot
149
+ this.editor.events.enableBlur()
141
150
  return true
142
151
  }
143
152
 
@@ -154,12 +163,18 @@ export class InputButtonPlugin<EventData = string|LooseObject> implements Trigge
154
163
  console.warn(`${this.name}.restoreSelection(): unable to restore editor selection.`)
155
164
  return false
156
165
  }
166
+ // Note Focus
167
+ if (this.debug) {
168
+ console.log('[restoreSelection]is focused:', this.editor.core.hasFocus())
169
+ }
170
+ // Always disable blur before changing focus
171
+ this.editor.events.disableBlur()
157
172
  // Get focus back to the editor
158
- // Note: This is disabled because it makes the cursor jolt to the top
159
- // console.log('[restoreSelection]is focused:', this.editor.core.hasFocus())
160
- // this.editor.events.focus()
173
+ this.editor.events.focus()
161
174
  // Restore last selection
162
175
  this.editor.selection.restore()
176
+ // Enable Blur
177
+ this.editor.events.enableBlur()
163
178
  return true
164
179
  }
165
180
 
@@ -168,7 +183,12 @@ export class InputButtonPlugin<EventData = string|LooseObject> implements Trigge
168
183
  console.warn(`${this.name}.saveSelection(): unable to save editor selection.`)
169
184
  return false
170
185
  }
186
+ // Disable blur before save
187
+ this.editor.events.disableBlur()
188
+ // Save selection inside Content-Editable HTML on DOM
171
189
  this.editor.selection.save()
190
+ // Enable Blur after save
191
+ this.editor.events.enableBlur()
172
192
  return true
173
193
  }
174
194
 
@@ -1,12 +1,18 @@
1
- System.register(["./inputButton", "froala-editor"], function (exports_1, context_1) {
1
+ System.register(["./inputButton", "@stratusjs/runtime/stratus", "lodash", "froala-editor"], function (exports_1, context_1) {
2
2
  "use strict";
3
- var inputButton_1, froala_editor_1;
3
+ var inputButton_1, stratus_1, lodash_1, froala_editor_1;
4
4
  var __moduleName = context_1 && context_1.id;
5
5
  return {
6
6
  setters: [
7
7
  function (inputButton_1_1) {
8
8
  inputButton_1 = inputButton_1_1;
9
9
  },
10
+ function (stratus_1_1) {
11
+ stratus_1 = stratus_1_1;
12
+ },
13
+ function (lodash_1_1) {
14
+ lodash_1 = lodash_1_1;
15
+ },
10
16
  function (froala_editor_1_1) {
11
17
  froala_editor_1 = froala_editor_1_1;
12
18
  }
@@ -17,9 +23,10 @@ System.register(["./inputButton", "froala-editor"], function (exports_1, context
17
23
  });
18
24
  froala_editor_1.default.PLUGINS.linkManager = function linkManager(editor) {
19
25
  let inputButton;
20
- const linkPlugin = froala_editor_1.default.PLUGINS.link(editor);
21
26
  const debug = false;
22
27
  function _init() {
28
+ this.uid = lodash_1.uniqueId(`froala_link_manager_`);
29
+ stratus_1.Stratus.Instances[this.uid] = this;
23
30
  inputButton = new inputButton_1.InputButtonPlugin({
24
31
  name: 'Link Manager',
25
32
  eventName: 'link-library',
@@ -32,25 +39,32 @@ System.register(["./inputButton", "froala-editor"], function (exports_1, context
32
39
  if (link.target) {
33
40
  attrs.target = '_blank';
34
41
  }
35
- linkPlugin.insert(link.url, link.text, attrs);
42
+ editor.link.insert(link.url, link.text, attrs);
36
43
  },
37
44
  autoSaveSelection: true,
38
45
  autoRestoreSelection: true,
39
46
  debug
40
47
  });
48
+ this.inputButton = inputButton;
49
+ this.editor = editor;
41
50
  if (debug) {
42
51
  console.log('initialized:', {
43
52
  options: editor.opts.endpoint,
44
- instance: this
53
+ instance: this,
54
+ inputButton: inputButton.uid,
45
55
  });
46
56
  }
47
57
  }
48
- function onClick() {
58
+ function onClick(el, data) {
49
59
  if (!editor.el) {
50
60
  console.warn('linkManager.onClick(): unable to find element');
51
61
  return;
52
62
  }
53
- inputButton.onClick(editor.el, linkPlugin.get());
63
+ const link = editor.link.get();
64
+ if (debug) {
65
+ console.log('[linkManager.onClick()]:', link);
66
+ }
67
+ inputButton.onClick(editor.el, link);
54
68
  }
55
69
  return {
56
70
  _init,
@@ -60,10 +74,11 @@ System.register(["./inputButton", "froala-editor"], function (exports_1, context
60
74
  froala_editor_1.default.RegisterCommand('linkManager', {
61
75
  title: 'Insert from Link Library',
62
76
  undo: false,
63
- focus: false,
77
+ focus: true,
64
78
  modal: true,
79
+ refreshOnCallback: false,
65
80
  callback() {
66
- this.linkManager.onClick(undefined, froala_editor_1.default.PLUGINS.link(this).get());
81
+ this.linkManager.onClick();
67
82
  },
68
83
  plugin: 'linkManager',
69
84
  }),
@@ -74,7 +89,7 @@ System.register(["./inputButton", "froala-editor"], function (exports_1, context
74
89
  focus: false,
75
90
  modal: true,
76
91
  callback() {
77
- this.linkManager.onClick(undefined, froala_editor_1.default.PLUGINS.link(this).get());
92
+ this.linkManager.onClick(undefined, this.link.get());
78
93
  },
79
94
  plugin: 'linkManager',
80
95
  }),
@@ -91,7 +106,7 @@ System.register(["./inputButton", "froala-editor"], function (exports_1, context
91
106
  eventName: 'link-library',
92
107
  editor: this,
93
108
  insert: (link) => {
94
- froala_editor_1.default.PLUGINS.link(this).insert(link.url, '', { 'aria-label': link.title });
109
+ this.link.insert(link.url, '', { 'aria-label': link.title });
95
110
  },
96
111
  autoSaveSelection: true,
97
112
  autoRestoreSelection: true,