@stratusjs/angular 0.2.89 → 0.2.93
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.
- package/package.json +5 -10
- package/src/app.module.js +2 -13
- package/src/app.module.js.map +1 -1
- package/src/app.module.min.js +1 -1
- package/src/app.module.ts +0 -7
- package/src/base/base.component.js +1 -1
- package/src/base/base.component.js.map +1 -1
- package/src/base/base.component.min.js +1 -1
- package/src/core/responsive.component.js +1 -7
- package/src/core/responsive.component.js.map +1 -1
- package/src/core/responsive.component.min.js +1 -1
- package/src/core/responsive.component.ts +8 -7
- package/src/data/contact-meta.interface.ts +1 -1
- package/src/editor/editor.component.js +1 -1
- package/src/editor/editor.component.js.map +1 -1
- package/src/editor/editor.component.min.js +1 -1
- package/src/media-selector/media-selector.component.html +32 -45
- package/src/media-selector/media-selector.component.js +1 -1
- package/src/media-selector/media-selector.component.js.map +1 -1
- package/src/media-selector/media-selector.component.min.html +1 -1
- package/src/media-selector/media-selector.component.min.js +1 -1
- package/src/media-selector/media-selector.horizontal.component.html +1 -1
- package/src/selector/selector-autocomplete.component.html +3 -3
- package/src/selector/selector.component.js +1 -1
- package/src/selector/selector.component.js.map +1 -1
- package/src/selector/selector.component.min.js +1 -1
- package/src/tree/legacy/tree.nested.component.html +2 -2
- package/src/tree/tree-dialog.component.html +1 -1
- package/src/tree/tree-dialog.component.min.html +1 -1
- package/src/tree/tree.component.js +1 -1
- package/src/tree/tree.component.js.map +1 -1
- package/src/tree/tree.component.min.js +1 -1
- package/src/changeset-viewer/changeset-viewer-dialog.component.html +0 -12
- package/src/changeset-viewer/changeset-viewer-dialog.component.min.html +0 -1
- package/src/changeset-viewer/changeset-viewer-dialog.component.ts +0 -46
- package/src/changeset-viewer/changeset-viewer-dialog.scss +0 -0
- package/src/changeset-viewer/changeset-viewer.component.html +0 -1
- package/src/changeset-viewer/changeset-viewer.component.min.html +0 -1
- package/src/changeset-viewer/changeset-viewer.component.scss +0 -3
- package/src/changeset-viewer/changeset-viewer.component.ts +0 -114
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["@angular/core","@angular/forms","@angular/material/dialog","rxjs","rxjs/operators","@angular/platform-browser","@stratusjs/runtime/stratus","lodash","@stratusjs/angular/core/root.component","@stratusjs/angular/editor/media-dialog.component","@stratusjs/angularjs/services/registry","@stratusjs/core/environment","@stratusjs/core/events/eventManager","@stratusjs/angular/editor/code-view-dialog.component","codemirror/lib/codemirror","codemirror/mode/xml/xml","html2pdf","font-awesome","froala-plugins","froala-embedly","froala-font-awesome","froala-image-tui","@stratusjs/angular/froala/plugins/mediaManager"],function(e,t){"use strict";var i,a,n,r,o,s,l,d,c,g,m,u,p,h,f,b,y,v,k,w,S,x,C=this&&this.__decorate||function(e,t,i,a){var n,r=arguments.length,o=r<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--)(n=e[s])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},M=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){n=e},function(e){r=e},function(e){o=e},function(e){s=e},function(e){l=e},function(e){d=e},function(e){c=e},function(e){g=e},function(e){m=e},function(e){u=e},function(e){p=e},function(e){h=e},function(e){f=e},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){}],execute:function(){"@stratusjs/angular","froala-editor","codemirror",b="editor",y=u.cookie("env")?"":".min",v=`${l.Stratus.BaseUrl}${boot.configuration.paths["@stratusjs/angular/*"].replace(/[^\/]*$/,"")}`,k=`${l.Stratus.BaseUrl}${boot.configuration.paths["codemirror/*"].replace(/[^\/]*$/,"")}`,w=`${l.Stratus.BaseUrl}${boot.configuration.paths["froala-editor"].replace(/js\/[^\/]*$/,"")}`,S=(e,t)=>d.default.has(e,t)&&!d.default.isEmpty(d.default.get(e,t)),x=class extends c.RootComponent{constructor(e,t,i,n,s){super(),this.sanitizer=e,this.ref=t,this.elementRef=i,this.fb=n,this.dialog=s,this.title="editor_component",this.dev=!!u.cookie("env"),this.editor="froala",this._=d.default,this.has=S,this.log=console.log,this.Stratus=l.Stratus,this.registry=new m.Registry,this.onChange=new r.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.dataString="",this.froalaButtons=["bold","italic","underline","strikeThrough","subscript","superscript","|","formatBlock","blockStyle","inlineStyle","paragraphStyle","paragraphFormat","align","formatOL","formatUL","outdent","indent","|","insertLink","insertImage","insertVideo","insertFile","insertTable","|","undo","redo","removeFormat","wordPaste","help","html","fullscreen"],this.froalaStandardButtons={moreText:["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","textColor","backgroundColor","inlineClass","inlineStyle","clearFormatting"],moreParagraph:["alignLeft","alignCenter","alignRight","alignJustify","indent","outdent","paragraphFormat","paragraphStyle","formatOL","formatUL","quote"],moreRich:["insertLink","insertImage","insertVideo","insertFile","insertTable","insertHR","specialCharacters","embedly"],moreMisc:["undo","redo","fullscreen","html","print","selectAll","help"]},this.froalaConfig={attribution:!1,key:l.Stratus.Environment.get("froalaKey"),zIndex:9999,events:{initialized:e=>{this.froalaEditorDirective=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:f,codeMirrorOptions:{indentWithTabs:!1,lineNumbers:!0,lineWrapping:!0,mode:"text/html",tabMode:"space",tabSize:4},fileInsertButtons:["fileBack","|","mediaManager"],fileUploadURL:"https://app.sitetheory.io/?session="+u.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","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","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","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"],htmlRemoveTags:[],htmlSimpleAmpersand:!1,imageInsertButtons:["imageBack","|","mediaManager","imageUpload","imageByURL"],imageUpload:!0,imageUploadRemoteUrls:!0,imageUploadURL:"https://app.sitetheory.io/?session="+u.cookie("SITETHEORY"),imageManagerPageSize:20,imageManagerScrollOffset:10,imageManagerLoadMethod:"GET",imageManagerLoadURL:"/Api/Media?payload-only=true",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","lists","mediaManager","paragraphFormat","paragraphStyle","print","quickInsert","quote","save","specialCharacters","table","url","video","wordPaste"],quickInsertButtons:["image","video","media","embedly","table","ul","ol","hr"],scrollableContainer:l.Stratus.Environment.get("viewPort")||"body",spellcheck:!0,toolbarSticky:!0,toolbarButtons:{moreText:{buttons:this.froalaStandardButtons.moreText,buttonsVisible:0},moreParagraph:{buttons:this.froalaStandardButtons.moreParagraph,buttonsVisible:8},moreRich:{buttons:this.froalaStandardButtons.moreRich,buttonsVisible:5},moreMisc:{buttons:this.froalaStandardButtons.moreMisc,align:"right",buttonsVisible:4}},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:4}},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:2}},useClasses:!0,videoInsertButtons:["videoBack","|","mediaManager","videoByURL","videoEmbed","videoUpload"],videoUpload:!0,videoUploadURL:"https://app.sitetheory.io/?session="+u.cookie("SITETHEORY")},this.uid=d.default.uniqueId(`sa_${d.default.snakeCase(b)}_component_`),l.Stratus.Instances[this.uid]=this,l.Stratus.Internals.LoadCss([`${v}editor/editor.component${y}.css`,`${k}lib/codemirror.css`,`${w}css/froala_editor.pkgd${y}.css`,`${w}css/third_party/embedly${y}.css`,`${w}css/third_party/font_awesome${y}.css`,`${w}css/third_party/image_tui${y}.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","dataString","froalaEditorDirective","froalaButtons","froalaStandardButtons","froalaConfig","sanitizer","ref","elementRef","fb","dialog","ngOnInit","listDuplicates","normalizeIn","normalizeOut","changeImgSize","handleError","fetchData","dataDefer","dataRef","onDataChange","created","changedEditor","onChangeEvent","onFocus","onBlur","bypassHTML","trigger","openMediaDialog","openCodeViewDialog","hydrate","disableRefresh","stagger","reloading","refresh","ngOnDestroy"]),this.fetchData().then(e=>{if(!(e&&e instanceof p.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 r.Observable(e=>this.dataDefer(e)),this.dataSub.pipe(o.debounce(()=>r.timer(500)),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())})}ngOnInit(){this.initialized=!0;this.form.get("dataString").valueChanges.forEach(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.dev&&this.listDuplicates(this.froalaConfig)}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 n=/^<img\s(.+?)(-[A-Z]{2})?\.(?=[^.]*$)(.+)>/gi.exec(i);if(null!==n)if(i.includes("data-stratus-src"))e=e.replace(i,`<img ${n[1]}-${t}.${n[3]}>`);else{if(!i.includes("cdn.sitetheory.io"))continue;if(d.default.isEmpty(n[2]))continue;e=e.replace(i,`<img data-stratus-src ${n[1]}-${t}.${n[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;const t=this.dataString,i=this.dataRef();if(i){if(!this.froalaConfig.useClasses){if(t===this.dataString)return;this.dev&&console.log("changed value pushed to subscriber:",t,this.dataString)}this.subscriber.next(i)}else setTimeout(()=>{this.dataDefer(e)},500)}dataRef(){return this.model?this.dataString=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.focused=!0,this.blurred=!1}onBlur(e){this.focused=!1,this.blurred=!0}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):"code-view"===e&&this.openCodeViewDialog()}openMediaDialog(e){const t=this.dialog.open(g.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))})}},C([i.Input(),M("design:type",String)],x.prototype,"target",void 0),C([i.Input(),M("design:type",String)],x.prototype,"targetSuffix",void 0),C([i.Input(),M("design:type",Number)],x.prototype,"id",void 0),C([i.Input(),M("design:type",Boolean)],x.prototype,"manifest",void 0),C([i.Input(),M("design:type",Boolean)],x.prototype,"decouple",void 0),C([i.Input(),M("design:type",Boolean)],x.prototype,"direct",void 0),C([i.Input(),M("design:type",Object)],x.prototype,"api",void 0),C([i.Input(),M("design:type",String)],x.prototype,"urlRoot",void 0),C([i.Input(),M("design:type",String)],x.prototype,"property",void 0),x=C([i.Component({selector:"sa-editor",templateUrl:`${v}/editor/editor.component${y}.html`}),M("design:paramtypes",[s.DomSanitizer,i.ChangeDetectorRef,i.ElementRef,a.FormBuilder,n.MatDialog])],x),e("EditorComponent",x)}}});
|
|
1
|
+
System.register(["@angular/core","@angular/forms","@angular/material/dialog","rxjs","rxjs/operators","@angular/platform-browser","@stratusjs/runtime/stratus","lodash","@stratusjs/angular/core/root.component","@stratusjs/angular/editor/media-dialog.component","@stratusjs/angularjs/services/registry","@stratusjs/core/environment","@stratusjs/core/events/eventManager","@stratusjs/angular/editor/code-view-dialog.component","codemirror/lib/codemirror","codemirror/mode/xml/xml","html2pdf","font-awesome","froala-plugins","froala-embedly","froala-font-awesome","froala-image-tui","@stratusjs/angular/froala/plugins/mediaManager"],function(e,t){"use strict";var i,a,n,r,o,s,l,d,c,g,m,u,p,h,f,b,y,v,k,w,S,x,C=this&&this.__decorate||function(e,t,i,a){var n,r=arguments.length,o=r<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--)(n=e[s])&&(o=(r<3?n(o):r>3?n(t,i,o):n(t,i))||o);return r>3&&o&&Object.defineProperty(t,i,o),o},M=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){n=e},function(e){r=e},function(e){o=e},function(e){s=e},function(e){l=e},function(e){d=e},function(e){c=e},function(e){g=e},function(e){m=e},function(e){u=e},function(e){p=e},function(e){h=e},function(e){f=e},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){},function(e){}],execute:function(){"@stratusjs/angular","froala-editor","codemirror",b="editor",y=u.cookie("env")?"":".min",v=`${l.Stratus.BaseUrl}${boot.configuration.paths["@stratusjs/angular/*"].replace(/[^\/]*$/,"")}`,k=`${l.Stratus.BaseUrl}${boot.configuration.paths["codemirror/*"].replace(/[^\/]*$/,"")}`,w=`${l.Stratus.BaseUrl}${boot.configuration.paths["froala-editor"].replace(/js\/[^\/]*$/,"")}`,S=(e,t)=>d.default.has(e,t)&&!d.default.isEmpty(d.default.get(e,t)),x=class extends c.RootComponent{constructor(e,t,i,n,s){super(),this.sanitizer=e,this.ref=t,this.elementRef=i,this.fb=n,this.dialog=s,this.title="editor_component",this.dev=!!u.cookie("env"),this.editor="froala",this._=d.default,this.has=S,this.log=console.log,this.Stratus=l.Stratus,this.registry=new m.Registry,this.onChange=new r.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.dataString="",this.froalaButtons=["bold","italic","underline","strikeThrough","subscript","superscript","|","formatBlock","blockStyle","inlineStyle","paragraphStyle","paragraphFormat","align","formatOL","formatUL","outdent","indent","|","insertLink","insertImage","insertVideo","insertFile","insertTable","|","undo","redo","removeFormat","wordPaste","help","html","fullscreen"],this.froalaStandardButtons={moreText:["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","textColor","backgroundColor","inlineClass","inlineStyle","clearFormatting"],moreParagraph:["alignLeft","alignCenter","alignRight","alignJustify","indent","outdent","paragraphFormat","paragraphStyle","formatOL","formatUL","quote"],moreRich:["insertLink","insertImage","insertVideo","insertFile","insertTable","insertHR","specialCharacters","embedly"],moreMisc:["undo","redo","fullscreen","html","print","selectAll","help"]},this.froalaConfig={attribution:!1,key:l.Stratus.Environment.get("froalaKey"),zIndex:9999,events:{initialized:e=>{this.froalaEditorDirective=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:f,codeMirrorOptions:{indentWithTabs:!1,lineNumbers:!0,lineWrapping:!0,mode:"text/html",tabMode:"space",tabSize:4},fileInsertButtons:["fileBack","|","mediaManager"],fileUploadURL:"https://app.sitetheory.io/?session="+u.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","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","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","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"],htmlRemoveTags:[],htmlSimpleAmpersand:!1,imageInsertButtons:["imageBack","|","mediaManager","imageUpload","imageByURL"],imageUpload:!0,imageUploadRemoteUrls:!0,imageUploadURL:"https://app.sitetheory.io/?session="+u.cookie("SITETHEORY"),imageManagerPageSize:20,imageManagerScrollOffset:10,imageManagerLoadMethod:"GET",imageManagerLoadURL:"/Api/Media?payload-only=true",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","lists","mediaManager","paragraphFormat","paragraphStyle","print","quickInsert","quote","save","specialCharacters","table","url","video","wordPaste"],quickInsertButtons:["image","video","media","embedly","table","ul","ol","hr"],scrollableContainer:l.Stratus.Environment.get("viewPort")||"body",spellcheck:!0,toolbarSticky:!0,toolbarButtons:{moreText:{buttons:this.froalaStandardButtons.moreText,buttonsVisible:0},moreParagraph:{buttons:this.froalaStandardButtons.moreParagraph,buttonsVisible:8},moreRich:{buttons:this.froalaStandardButtons.moreRich,buttonsVisible:5},moreMisc:{buttons:this.froalaStandardButtons.moreMisc,align:"right",buttonsVisible:4}},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:4}},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:2}},useClasses:!0,videoInsertButtons:["videoBack","|","mediaManager","videoByURL","videoEmbed","videoUpload"],videoUpload:!0,videoUploadURL:"https://app.sitetheory.io/?session="+u.cookie("SITETHEORY")},this.uid=d.default.uniqueId(`sa_${d.default.snakeCase(b)}_component_`),l.Stratus.Instances[this.uid]=this,l.Stratus.Internals.LoadCss([`${v}editor/editor.component${y}.css`,`${k}lib/codemirror.css`,`${w}css/froala_editor.pkgd${y}.css`,`${w}css/third_party/embedly${y}.css`,`${w}css/third_party/font_awesome${y}.css`,`${w}css/third_party/image_tui${y}.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","dataString","froalaEditorDirective","froalaButtons","froalaStandardButtons","froalaConfig","sanitizer","ref","elementRef","fb","dialog","ngOnInit","listDuplicates","normalizeIn","normalizeOut","changeImgSize","handleError","fetchData","dataDefer","dataRef","onDataChange","created","changedEditor","onChangeEvent","onFocus","onBlur","bypassHTML","trigger","openMediaDialog","openCodeViewDialog","hydrate","reloading","refresh","ngOnDestroy"]),this.fetchData().then(e=>{if(!(e&&e instanceof p.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 r.Observable(e=>this.dataDefer(e)),this.dataSub.pipe(o.debounce(()=>r.timer(500)),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())})}ngOnInit(){this.initialized=!0;this.form.get("dataString").valueChanges.forEach(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.dev&&this.listDuplicates(this.froalaConfig)}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 n=/^<img\s(.+?)(-[A-Z]{2})?\.(?=[^.]*$)(.+)>/gi.exec(i);if(null!==n)if(i.includes("data-stratus-src"))e=e.replace(i,`<img ${n[1]}-${t}.${n[3]}>`);else{if(!i.includes("cdn.sitetheory.io"))continue;if(d.default.isEmpty(n[2]))continue;e=e.replace(i,`<img data-stratus-src ${n[1]}-${t}.${n[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;const t=this.dataString,i=this.dataRef();if(i){if(!this.froalaConfig.useClasses){if(t===this.dataString)return;this.dev&&console.log("changed value pushed to subscriber:",t,this.dataString)}this.subscriber.next(i)}else setTimeout(()=>{this.dataDefer(e)},500)}dataRef(){return this.model?this.dataString=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.focused=!0,this.blurred=!1}onBlur(e){this.focused=!1,this.blurred=!0}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):"code-view"===e&&this.openCodeViewDialog()}openMediaDialog(e){const t=this.dialog.open(g.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))})}},C([i.Input(),M("design:type",String)],x.prototype,"target",void 0),C([i.Input(),M("design:type",String)],x.prototype,"targetSuffix",void 0),C([i.Input(),M("design:type",Number)],x.prototype,"id",void 0),C([i.Input(),M("design:type",Boolean)],x.prototype,"manifest",void 0),C([i.Input(),M("design:type",Boolean)],x.prototype,"decouple",void 0),C([i.Input(),M("design:type",Boolean)],x.prototype,"direct",void 0),C([i.Input(),M("design:type",Object)],x.prototype,"api",void 0),C([i.Input(),M("design:type",String)],x.prototype,"urlRoot",void 0),C([i.Input(),M("design:type",String)],x.prototype,"property",void 0),x=C([i.Component({selector:"sa-editor",templateUrl:`${v}/editor/editor.component${y}.html`}),M("design:paramtypes",[s.DomSanitizer,i.ChangeDetectorRef,i.ElementRef,a.FormBuilder,n.MatDialog])],x),e("EditorComponent",x)}}});
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
<span class="file-type uppercase"
|
|
92
92
|
[innerText]="_.get(selectedModel, 'extension') || _.get(selectedModel, 'service') || (_.get(selectedModel, '_embedCode') ? 'Embedded Video' : '')">
|
|
93
93
|
</span>
|
|
94
|
-
<!-- TODO: evaluate the possibility of an ng-container here instead -->
|
|
94
|
+
<!-- TODO: evaluate the possibility of an data-ng-container here instead -->
|
|
95
95
|
<span class="delimiter"
|
|
96
96
|
*ngIf="_.get(selectedModel, 'bytesHuman') && _.get(selectedModel, 'bytesHuman') !== 'Empty'"></span>
|
|
97
97
|
<span class="file-size"
|
|
@@ -103,50 +103,37 @@
|
|
|
103
103
|
</p>
|
|
104
104
|
<div class="position-action-area">
|
|
105
105
|
<div class="action-btns">
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
href="#"
|
|
138
|
-
matTooltip="Remove selection"
|
|
139
|
-
*ngIf="isSelector">
|
|
140
|
-
<!--<md-tooltip>Remove selection</md-tooltip>-->
|
|
141
|
-
<mat-icon class="clear-icon"
|
|
142
|
-
svgIcon="media_selector_clear"
|
|
143
|
-
aria-hidden="true"
|
|
144
|
-
aria-label="Clear">
|
|
145
|
-
Clear
|
|
146
|
-
</mat-icon>
|
|
147
|
-
</a>
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
106
|
+
<span (click)="showDetails(selectedModel)">
|
|
107
|
+
<a class="border-radius-default"
|
|
108
|
+
href="#"
|
|
109
|
+
[matTooltip]="'Show Details - ' + _.get(selectedModel, 'name')">
|
|
110
|
+
<!--<md-tooltip>Show details</md-tooltip>-->
|
|
111
|
+
<mat-icon class="info-icon"
|
|
112
|
+
svgIcon="media_selector_info"
|
|
113
|
+
aria-hidden="true"
|
|
114
|
+
aria-label="Info"></mat-icon>
|
|
115
|
+
</a>
|
|
116
|
+
</span>
|
|
117
|
+
<span (click)="remove(selectedModel)">
|
|
118
|
+
<a class="border-radius-default"
|
|
119
|
+
href="#"
|
|
120
|
+
matTooltip="Permanently Delete from Libary"
|
|
121
|
+
*ngIf="!isSelector">
|
|
122
|
+
<mat-icon class="delete-icon"
|
|
123
|
+
svgIcon="media_selector_delete"
|
|
124
|
+
aria-hidden="true"
|
|
125
|
+
aria-label="Delete"></mat-icon>
|
|
126
|
+
</a>
|
|
127
|
+
<a class="border-radius-default"
|
|
128
|
+
href="#"
|
|
129
|
+
matTooltip="Remove Selection"
|
|
130
|
+
*ngIf="isSelector">
|
|
131
|
+
<mat-icon class="clear-icon"
|
|
132
|
+
svgIcon="media_selector_clear"
|
|
133
|
+
aria-hidden="true"
|
|
134
|
+
aria-label="Clear"></mat-icon>
|
|
135
|
+
</a>
|
|
136
|
+
</span>
|
|
150
137
|
</div>
|
|
151
138
|
</div>
|
|
152
139
|
</div>
|
|
@@ -141,7 +141,7 @@ System.register(["@angular/core", "@angular/cdk/drag-drop", "rxjs", "@angular/pl
|
|
|
141
141
|
this.styled = true;
|
|
142
142
|
this.refresh();
|
|
143
143
|
});
|
|
144
|
-
this.hydrate(elementRef, sanitizer, ["title", "uid", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "type", "property", "endpoint", "_", "has", "log", "Stratus", "registry", "fetched", "data", "collection", "model", "dataSub", "onChange", "subscriber", "eventID", "svgIcons", "styled", "empty", "libraryDisplay", "isSelector", "isGrid", "disableRefresh", "listGroup", "placeholder", "targetList", "targetIndex", "sourceList", "sourceIndex", "dragIndex", "activeContainer", "iconRegistry", "sanitizer", "ref", "elementRef", "viewportRuler", "drop", "moveModel", "goToUrl", "remove", "fetchData", "dataDefer", "dataRef", "onDataChange", "prioritize", "getSvg", "addSvgIcon", "toggleLibrary", "showDetails", "deleteMedia", "removeFromSelected", "move", "moveItemInGrid", "enterPredicate", "getPointerPositionOnPage", "hydrate", "
|
|
144
|
+
this.hydrate(elementRef, sanitizer, ["title", "uid", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "type", "property", "endpoint", "_", "has", "log", "Stratus", "registry", "fetched", "data", "collection", "model", "dataSub", "onChange", "subscriber", "eventID", "svgIcons", "styled", "empty", "libraryDisplay", "isSelector", "isGrid", "disableRefresh", "listGroup", "placeholder", "targetList", "targetIndex", "sourceList", "sourceIndex", "dragIndex", "activeContainer", "iconRegistry", "sanitizer", "ref", "elementRef", "viewportRuler", "drop", "moveModel", "goToUrl", "remove", "fetchData", "dataDefer", "dataRef", "onDataChange", "prioritize", "getSvg", "addSvgIcon", "toggleLibrary", "showDetails", "deleteMedia", "removeFromSelected", "move", "moveItemInGrid", "enterPredicate", "getPointerPositionOnPage", "hydrate", "reloading", "refresh", "ngOnDestroy"]);
|
|
145
145
|
this.eventID = `${this.target}:${this.id}:${this.property}`;
|
|
146
146
|
this.fetchData()
|
|
147
147
|
.then(data => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["media-selector.component.ts"],"names":[],"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YACV;gBAAR,YAAK,EAAE;;oEAAkB;YACjB;gBAAR,YAAK,EAAE;;oEAAkB;YACjB;gBAAR,YAAK,EAAE;;kEAAgB;YACf;gBAAR,YAAK,EAAE;;+DAAY;YACX;gBAAR,YAAK,EAAE;;mEAAgB;YAGf;gBAAR,YAAK,EAAE;;gEAAa;YACZ;gBAAR,YAAK,EAAE;;oEAAiB;YAChB;gBAAR,YAAK,EAAE;;oEAAiB;YA2CI;gBAA5B,gBAAS,CAAC,4BAAgB,CAAC;0CAAY,4BAAgB;qEAAa;YAC7C;gBAAvB,gBAAS,CAAC,uBAAW,CAAC;0CAAc,uBAAW;uEAAA;YA/DvC,sBAAsB;gBAXlC,gBAAS,CAAC;oBACP,QAAQ,EAAE,MAAM,UAAU,EAAE;oBAC5B,WAAW,EAAE,GAAG,QAAQ,IAAI,UAAU,IAAI,UAAU,aAAa,GAAG,OAAO;iBAO9E,CAAC;iDA6E4B,sBAAe;oBAClB,+BAAY;oBAChB,wBAAiB;oBACZ,iBAAU;oBACP,yBAAa;eA/E/B,sBAAsB,CAmelC;;QAqBD,CAAC","file":"media-selector.component.js"}
|
|
@@ -11,4 +11,4 @@
|
|
|
11
11
|
&& !_.get(selectedModel, 'mime').includes('audio')
|
|
12
12
|
&& !_.get(selectedModel, 'mime').includes('application')
|
|
13
13
|
)
|
|
14
|
-
}" [ngStyle]="{'background': 'url(' + (_.get(selectedModel, '_thumbnailUrl') || _.get(selectedModel, 'bestImage.thumb') || _.get(selectedModel, 'meta.thumbnail_small')) + ') no-repeat center center', 'background-size': 'cover'}"><img class="shapeholder" [src]="Stratus.BaseUrl + 'sitetheorycore/images/shapeholder-square.png'"><div class="thumb-gradient"> </div><h4 *ngIf="!_.get(selectedModel, '_thumbnailUrl') && !_.get(selectedModel, 'bestImage.thumb') && !_.get(selectedModel, 'meta.thumbnail_small')" class="thumb-title position-center" [innerText]="_.get(selectedModel, 'name')"></h4><div class="thumb-icon"><mat-icon *ngIf="_.get(selectedModel, 'mime') && _.get(selectedModel, 'mime').includes('image')" svgIcon="media_selector_image" aria-hidden="true" aria-label="Image">Image</mat-icon><mat-icon *ngIf="_.get(selectedModel, 'mime') && _.get(selectedModel, 'mime').includes('video')" svgIcon="media_selector_video" aria-hidden="true" aria-label="Video">Video</mat-icon><mat-icon *ngIf="_.get(selectedModel, 'mime') && _.get(selectedModel, 'mime').includes('audio')" svgIcon="media_selector_audio" aria-hidden="true" aria-label="Audio">Audio</mat-icon><mat-icon *ngIf="_.get(selectedModel, 'mime') && _.get(selectedModel, 'mime').includes('document')" svgIcon="media_selector_document" aria-hidden="true" aria-label="Document">Document</mat-icon></div></div><div class="info-hover-container" (mouseover)="hovering=true" (mouseout)="hovering=false"><div class="border-radius-default image-hover-info" layout="column" layout-align="space-between center"><div class="format-size"><div class="small-all-caps file-details"><span class="file-type uppercase" [innerText]="_.get(selectedModel, 'extension') || _.get(selectedModel, 'service') || (_.get(selectedModel, '_embedCode') ? 'Embedded Video' : '')"></span><span class="delimiter" *ngIf="_.get(selectedModel, 'bytesHuman') && _.get(selectedModel, 'bytesHuman') !== 'Empty'"></span> <span class="file-size" [innerText]="(_.get(selectedModel, 'bytesHuman') && _.get(selectedModel, 'bytesHuman') !== 'Empty') ? _.get(selectedModel, 'bytesHuman') : ''"></span></div></div><p class="font-body image-title" [innerText]="_.get(selectedModel, 'name') || 'No title'"></p><div class="position-action-area"><div class="action-btns"><
|
|
14
|
+
}" [ngStyle]="{'background': 'url(' + (_.get(selectedModel, '_thumbnailUrl') || _.get(selectedModel, 'bestImage.thumb') || _.get(selectedModel, 'meta.thumbnail_small')) + ') no-repeat center center', 'background-size': 'cover'}"><img class="shapeholder" [src]="Stratus.BaseUrl + 'sitetheorycore/images/shapeholder-square.png'"><div class="thumb-gradient"> </div><h4 *ngIf="!_.get(selectedModel, '_thumbnailUrl') && !_.get(selectedModel, 'bestImage.thumb') && !_.get(selectedModel, 'meta.thumbnail_small')" class="thumb-title position-center" [innerText]="_.get(selectedModel, 'name')"></h4><div class="thumb-icon"><mat-icon *ngIf="_.get(selectedModel, 'mime') && _.get(selectedModel, 'mime').includes('image')" svgIcon="media_selector_image" aria-hidden="true" aria-label="Image">Image</mat-icon><mat-icon *ngIf="_.get(selectedModel, 'mime') && _.get(selectedModel, 'mime').includes('video')" svgIcon="media_selector_video" aria-hidden="true" aria-label="Video">Video</mat-icon><mat-icon *ngIf="_.get(selectedModel, 'mime') && _.get(selectedModel, 'mime').includes('audio')" svgIcon="media_selector_audio" aria-hidden="true" aria-label="Audio">Audio</mat-icon><mat-icon *ngIf="_.get(selectedModel, 'mime') && _.get(selectedModel, 'mime').includes('document')" svgIcon="media_selector_document" aria-hidden="true" aria-label="Document">Document</mat-icon></div></div><div class="info-hover-container" (mouseover)="hovering=true" (mouseout)="hovering=false"><div class="border-radius-default image-hover-info" layout="column" layout-align="space-between center"><div class="format-size"><div class="small-all-caps file-details"><span class="file-type uppercase" [innerText]="_.get(selectedModel, 'extension') || _.get(selectedModel, 'service') || (_.get(selectedModel, '_embedCode') ? 'Embedded Video' : '')"></span><span class="delimiter" *ngIf="_.get(selectedModel, 'bytesHuman') && _.get(selectedModel, 'bytesHuman') !== 'Empty'"></span> <span class="file-size" [innerText]="(_.get(selectedModel, 'bytesHuman') && _.get(selectedModel, 'bytesHuman') !== 'Empty') ? _.get(selectedModel, 'bytesHuman') : ''"></span></div></div><p class="font-body image-title" [innerText]="_.get(selectedModel, 'name') || 'No title'"></p><div class="position-action-area"><div class="action-btns"><span (click)="showDetails(selectedModel)"><a class="border-radius-default" href="#" [matTooltip]="'Show Details - ' + _.get(selectedModel, 'name')"><mat-icon class="info-icon" svgIcon="media_selector_info" aria-hidden="true" aria-label="Info"></mat-icon></a></span><span (click)="remove(selectedModel)"><a class="border-radius-default" href="#" matTooltip="Permanently Delete from Libary" *ngIf="!isSelector"><mat-icon class="delete-icon" svgIcon="media_selector_delete" aria-hidden="true" aria-label="Delete"></mat-icon></a><a class="border-radius-default" href="#" matTooltip="Remove Selection" *ngIf="isSelector"><mat-icon class="clear-icon" svgIcon="media_selector_clear" aria-hidden="true" aria-label="Clear"></mat-icon></a></span></div></div></div></div></div></div></div><div class="media-selected-list media-selected-list-grid"><div class="library-toggle media-selected-box media-selected-box-grid"><a class="position-anchor accent-background-hover border-default border-default-all color-primary" [matTooltip]="(libraryDisplay ? 'Open' : 'Close') + ' Media Library'" (click)="toggleLibrary()" [ngClass]="{'library-toggle-open': libraryDisplay}"><div aria-hidden="true"><mat-icon class="position-center" *ngIf="!libraryDisplay" svgIcon="media_selector_add" aria-hidden="false" aria-label="Add">Add</mat-icon><div class="btn-text small-all-caps position-center">Close Library</div><img class="shapeholder" [src]="Stratus.BaseUrl + 'sitetheorycore/images/shapeholder-square.png'"></div></a></div></div></div></div></div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["@angular/core","@angular/cdk/drag-drop","rxjs","@angular/platform-browser","@angular/material/icon","@stratusjs/runtime/stratus","lodash","@stratusjs/core/environment","@stratusjs/angular/core/root.component","@stratusjs/angularjs/services/registry","@stratusjs/core/events/eventManager","@angular/cdk/scrolling"],function(e,t){"use strict";var i,r,s,o,n,a,l,d,c,h,u,g,p,m,f,y,v,I=this&&this.__decorate||function(e,t,i,r){var s,o=arguments.length,n=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(n=(o<3?s(n):o>3?s(t,i,n):s(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},S=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};t&&t.id;function b(e,t){return Array.prototype.indexOf.call(e,t)}return{setters:[function(e){i=e},function(e){r=e},function(e){s=e},function(e){o=e},function(e){n=e},function(e){a=e},function(e){l=e},function(e){d=e},function(e){c=e},function(e){h=e},function(e){u=e},function(e){g=e}],execute:function(){"@stratusjs/angular",p="media-selector",m=d.cookie("env")?"":".min",f=`${a.Stratus.BaseUrl}${boot.configuration.paths["@stratusjs/angular/*"].replace(/[^/]*$/,"")}`,y=(e,t)=>l.default.has(e,t)&&!l.default.isEmpty(l.default.get(e,t)),v=class extends c.RootComponent{constructor(e,t,i,r,o){super(),this.iconRegistry=e,this.sanitizer=t,this.ref=i,this.elementRef=r,this.viewportRuler=o,this.title=p+"_component",this._=l.default,this.has=y,this.log=console.log,this.Stratus=a.Stratus,this.registry=new h.Registry,this.onChange=new s.Subject,this.svgIcons={},this.styled=!1,this.empty=!1,this.libraryDisplay=!1,this.isSelector=!0,this.isGrid=!0,this.disableRefresh=!0,this.enterPredicate=(e,t)=>{if(t===this.placeholder)return!0;if(t!==this.activeContainer)return!1;const i=this.placeholder.element.nativeElement,r=e.dropContainer.element.nativeElement,s=t.element.nativeElement,o=b(s.parentElement.children,this.sourceList?i:r),n=b(s.parentElement.children,s);return this.sourceList||(this.sourceIndex=o,this.sourceList=e.dropContainer,i.style.width=r.clientWidth+"px",i.style.height=r.clientHeight+"px",r.parentElement.removeChild(r)),this.targetIndex=n,this.targetList=t,i.style.display="",s.parentElement.insertBefore(i,n>o?s.nextSibling:s),this.placeholder._dropListRef.enter(e._dragRef,e.element.nativeElement.offsetLeft,e.element.nativeElement.offsetTop),!1},this.uid=l.default.uniqueId(`sa_${l.default.snakeCase(p)}_component_`),a.Stratus.Instances[this.uid]=this,this.dataSub=new s.Observable(e=>this.dataDefer(e)),this.targetList=null,this.sourceList=null,l.default.forEach({media_selector_add:`${a.Stratus.BaseUrl}sitetheorycore/images/icons/actionButtons/add.svg`,media_selector_clear:`${a.Stratus.BaseUrl}sitetheorycore/images/icons/actionButtons/clear.svg`,media_selector_delete:`${a.Stratus.BaseUrl}sitetheorycore/images/icons/actionButtons/delete.svg`,media_selector_edit:`${a.Stratus.BaseUrl}sitetheorycore/images/icons/actionButtons/edit.svg`,media_selector_info:`${a.Stratus.BaseUrl}sitetheorycore/images/icons/actionButtons/info.svg`,media_selector_image:`${a.Stratus.BaseUrl}sitetheorymedia/images/mediaTypeIcons/media-icon-image.svg`,media_selector_video:`${a.Stratus.BaseUrl}sitetheorymedia/images/mediaTypeIcons/media-icon-video.svg`,media_selector_audio:`${a.Stratus.BaseUrl}sitetheorymedia/images/mediaTypeIcons/media-icon-audio.svg`,media_selector_document:`${a.Stratus.BaseUrl}sitetheorymedia/images/mediaTypeIcons/media-icon-document.svg`},(i,r)=>e.addSvgIcon(r,t.bypassSecurityTrustResourceUrl(i)).getNamedSvgIcon(r)),a.Stratus.Internals.CssLoader(`${f}${p}/${p}.component${m}.css`).then(()=>{this.styled=!0,this.refresh()}).catch(e=>{console.warn("Issue detected in CSS Loader for Component:",this),console.error(e),this.styled=!0,this.refresh()}),this.hydrate(r,t,["title","uid","target","targetSuffix","id","manifest","decouple","direct","api","urlRoot","type","property","endpoint","_","has","log","Stratus","registry","fetched","data","collection","model","dataSub","onChange","subscriber","eventID","svgIcons","styled","empty","libraryDisplay","isSelector","isGrid","disableRefresh","listGroup","placeholder","targetList","targetIndex","sourceList","sourceIndex","dragIndex","activeContainer","iconRegistry","sanitizer","ref","elementRef","viewportRuler","drop","moveModel","goToUrl","remove","fetchData","dataDefer","dataRef","onDataChange","prioritize","getSvg","addSvgIcon","toggleLibrary","showDetails","deleteMedia","removeFromSelected","move","moveItemInGrid","enterPredicate","getPointerPositionOnPage","hydrate","stagger","reloading","refresh","ngOnDestroy"]),this.eventID=`${this.target}:${this.id}:${this.property}`,this.fetchData().then(e=>{if(!(e&&e instanceof u.EventManager))return void console.warn("Unable to bind data from Registry!");const t=()=>{e.completed&&(this.dataDefer(this.subscriber),this.prioritize(),this.refresh())};e.on("change",t),t()})}drop(e){const t=this.dataRef();if(!t||!t.length)return;this.isGrid&&this.moveItemInGrid(t)||(this.isGrid&&d.cookie("env")&&console.warn("moving item in grid failed. attempting fallback."),r.moveItemInArray(t,e.previousIndex,e.currentIndex));let i=0;l.default.forEach(t,e=>e.priority=i++),this.model.trigger("change")}moveModel(e,t){const i=this.dataRef();if(!i||!i.length)return;r.moveItemInArray(i,e,t);let s=0;l.default.forEach(i,e=>e.priority=s++),this.model.trigger("change")}goToUrl(e){e&&e.contentType?window.open(e.contentType.editUrl+"?id="+e.id,"_blank"):console.error("unable to execute goToUrl() because a valid model content was not provided.")}remove(e){const t=this.dataRef();if(!t||!t.length)return console.error("unable to remove model from selection:",t),void this.refresh();let i=t.indexOf(e);if(-1===i){const r=t.map(t=>e.id===t.id?t:null).filter(e=>e);l.default.isArray(r)&&r.length&&(i=t.indexOf(l.default.first(r)))}-1!==i?(t.splice(i,1),this.model.trigger("change"),this.removeFromSelected(e.id)):console.error("unable to find model:",e,"in selection:",t)}fetchData(){return this.fetched?this.fetched:this.fetched=this.registry.fetch(a.Stratus.Select(this.elementRef.nativeElement),this)}dataDefer(e){if(this.subscriber=this.subscriber||e,!this.subscriber||!this.model||!this.model.completed)return void setTimeout(()=>{this.dataDefer(e)},500);const t=this.dataRef();this.empty=!t.length,this.subscriber.next(t),this.refresh()}dataRef(){if(!this.model)return[];const e=this.model.get(this.property);return e&&l.default.isArray(e)?e:[]}onDataChange(){this.prioritize(),this.dataDefer(this.subscriber),this.refresh()}prioritize(){const e=this.dataRef();if(!e||!e.length)return;let t=0;l.default.forEach(e,e=>e.priority=t++)}getSvg(e,t){const i=this.addSvgIcon(e,t);return new s.Observable(t=>{this.iconRegistry.getNamedSvgIcon(i).subscribe({error(t){console.error(`getSvg(${e}): ${t}`)},complete(){t.next(i)}})})}addSvgIcon(e,t){if(e in this.svgIcons)return this.svgIcons[e];t||(t={});const i=this.svgIcons[e]=l.default.uniqueId("media_selector_svg");return this.iconRegistry.addSvgIcon(i,this.sanitizer.bypassSecurityTrustResourceUrl(e),t),i}toggleLibrary(){this.libraryDisplay=!this.libraryDisplay,a.Stratus.Environment.trigger(this.eventID,"toggleLibrary"),a.Stratus.Environment.trigger(`${this.eventID}:toggleLibrary`,this.libraryDisplay)}showDetails(e){a.Stratus.Environment.trigger(this.eventID,"showDetails"),a.Stratus.Environment.trigger(`${this.eventID}:showDetails`,e)}deleteMedia(e){a.Stratus.Environment.trigger(this.eventID,"deleteMedia"),a.Stratus.Environment.trigger(`${this.eventID}:deleteMedia`,e)}removeFromSelected(e){a.Stratus.Environment.trigger(this.eventID,"removeFromSelected"),a.Stratus.Environment.trigger(`${this.eventID}:removeFromSelected`,e)}move(e){const t=this.getPointerPositionOnPage(e.event);!l.default.isUndefined(this.listGroup)&&this.listGroup?l.default.isUndefined(this.listGroup._items)?console.warn("this.listGroup._items does not exist:",this.listGroup):this.listGroup._items.forEach(e=>{(function(e,t,i){const{top:r,bottom:s,left:o,right:n}=e.element.nativeElement.getBoundingClientRect();return i>=r&&i<=s&&t>=o&&t<=n})(e,t.x,t.y)&&(this.activeContainer=e)}):console.warn("this.listGroup does not exist:",this)}moveItemInGrid(e){if(!this.targetList)return!1;const t=this.placeholder.element.nativeElement,i=t.parentElement;return t.style.display="none",i.removeChild(t),i.appendChild(t),i.insertBefore(this.sourceList.element.nativeElement,i.children[this.sourceIndex]),this.targetList=null,this.sourceList=null,this.sourceIndex!==this.targetIndex&&(r.moveItemInArray(e,this.sourceIndex,this.targetIndex),!0)}getPointerPositionOnPage(e){const t=function(e){return e.type.startsWith("touch")}(e)?e.touches[0]||e.changedTouches[0]:e,i=this.viewportRuler.getViewportScrollPosition();return{x:t.pageX-i.left,y:t.pageY-i.top}}},I([i.Input(),S("design:type",String)],v.prototype,"target",void 0),I([i.Input(),S("design:type",String)],v.prototype,"targetSuffix",void 0),I([i.Input(),S("design:type",Number)],v.prototype,"id",void 0),I([i.Input(),S("design:type",Boolean)],v.prototype,"manifest",void 0),I([i.Input(),S("design:type",Boolean)],v.prototype,"decouple",void 0),I([i.Input(),S("design:type",Boolean)],v.prototype,"direct",void 0),I([i.Input(),S("design:type",Object)],v.prototype,"api",void 0),I([i.Input(),S("design:type",String)],v.prototype,"urlRoot",void 0),I([i.Input(),S("design:type",String)],v.prototype,"type",void 0),I([i.Input(),S("design:type",String)],v.prototype,"property",void 0),I([i.Input(),S("design:type",String)],v.prototype,"endpoint",void 0),I([i.ViewChild(r.CdkDropListGroup),S("design:type",r.CdkDropListGroup)],v.prototype,"listGroup",void 0),I([i.ViewChild(r.CdkDropList),S("design:type",r.CdkDropList)],v.prototype,"placeholder",void 0),v=I([i.Component({selector:`sa-${p}`,templateUrl:`${f}/${p}/${p}.component${m}.html`}),S("design:paramtypes",[n.MatIconRegistry,o.DomSanitizer,i.ChangeDetectorRef,i.ElementRef,g.ViewportRuler])],v),e("MediaSelectorComponent",v)}}});
|
|
1
|
+
System.register(["@angular/core","@angular/cdk/drag-drop","rxjs","@angular/platform-browser","@angular/material/icon","@stratusjs/runtime/stratus","lodash","@stratusjs/core/environment","@stratusjs/angular/core/root.component","@stratusjs/angularjs/services/registry","@stratusjs/core/events/eventManager","@angular/cdk/scrolling"],function(e,t){"use strict";var i,r,s,o,n,a,l,d,c,h,u,g,p,m,f,y,v,I=this&&this.__decorate||function(e,t,i,r){var s,o=arguments.length,n=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(n=(o<3?s(n):o>3?s(t,i,n):s(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},S=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};t&&t.id;function b(e,t){return Array.prototype.indexOf.call(e,t)}return{setters:[function(e){i=e},function(e){r=e},function(e){s=e},function(e){o=e},function(e){n=e},function(e){a=e},function(e){l=e},function(e){d=e},function(e){c=e},function(e){h=e},function(e){u=e},function(e){g=e}],execute:function(){"@stratusjs/angular",p="media-selector",m=d.cookie("env")?"":".min",f=`${a.Stratus.BaseUrl}${boot.configuration.paths["@stratusjs/angular/*"].replace(/[^/]*$/,"")}`,y=(e,t)=>l.default.has(e,t)&&!l.default.isEmpty(l.default.get(e,t)),v=class extends c.RootComponent{constructor(e,t,i,r,o){super(),this.iconRegistry=e,this.sanitizer=t,this.ref=i,this.elementRef=r,this.viewportRuler=o,this.title=p+"_component",this._=l.default,this.has=y,this.log=console.log,this.Stratus=a.Stratus,this.registry=new h.Registry,this.onChange=new s.Subject,this.svgIcons={},this.styled=!1,this.empty=!1,this.libraryDisplay=!1,this.isSelector=!0,this.isGrid=!0,this.disableRefresh=!0,this.enterPredicate=(e,t)=>{if(t===this.placeholder)return!0;if(t!==this.activeContainer)return!1;const i=this.placeholder.element.nativeElement,r=e.dropContainer.element.nativeElement,s=t.element.nativeElement,o=b(s.parentElement.children,this.sourceList?i:r),n=b(s.parentElement.children,s);return this.sourceList||(this.sourceIndex=o,this.sourceList=e.dropContainer,i.style.width=r.clientWidth+"px",i.style.height=r.clientHeight+"px",r.parentElement.removeChild(r)),this.targetIndex=n,this.targetList=t,i.style.display="",s.parentElement.insertBefore(i,n>o?s.nextSibling:s),this.placeholder._dropListRef.enter(e._dragRef,e.element.nativeElement.offsetLeft,e.element.nativeElement.offsetTop),!1},this.uid=l.default.uniqueId(`sa_${l.default.snakeCase(p)}_component_`),a.Stratus.Instances[this.uid]=this,this.dataSub=new s.Observable(e=>this.dataDefer(e)),this.targetList=null,this.sourceList=null,l.default.forEach({media_selector_add:`${a.Stratus.BaseUrl}sitetheorycore/images/icons/actionButtons/add.svg`,media_selector_clear:`${a.Stratus.BaseUrl}sitetheorycore/images/icons/actionButtons/clear.svg`,media_selector_delete:`${a.Stratus.BaseUrl}sitetheorycore/images/icons/actionButtons/delete.svg`,media_selector_edit:`${a.Stratus.BaseUrl}sitetheorycore/images/icons/actionButtons/edit.svg`,media_selector_info:`${a.Stratus.BaseUrl}sitetheorycore/images/icons/actionButtons/info.svg`,media_selector_image:`${a.Stratus.BaseUrl}sitetheorymedia/images/mediaTypeIcons/media-icon-image.svg`,media_selector_video:`${a.Stratus.BaseUrl}sitetheorymedia/images/mediaTypeIcons/media-icon-video.svg`,media_selector_audio:`${a.Stratus.BaseUrl}sitetheorymedia/images/mediaTypeIcons/media-icon-audio.svg`,media_selector_document:`${a.Stratus.BaseUrl}sitetheorymedia/images/mediaTypeIcons/media-icon-document.svg`},(i,r)=>e.addSvgIcon(r,t.bypassSecurityTrustResourceUrl(i)).getNamedSvgIcon(r)),a.Stratus.Internals.CssLoader(`${f}${p}/${p}.component${m}.css`).then(()=>{this.styled=!0,this.refresh()}).catch(e=>{console.warn("Issue detected in CSS Loader for Component:",this),console.error(e),this.styled=!0,this.refresh()}),this.hydrate(r,t,["title","uid","target","targetSuffix","id","manifest","decouple","direct","api","urlRoot","type","property","endpoint","_","has","log","Stratus","registry","fetched","data","collection","model","dataSub","onChange","subscriber","eventID","svgIcons","styled","empty","libraryDisplay","isSelector","isGrid","disableRefresh","listGroup","placeholder","targetList","targetIndex","sourceList","sourceIndex","dragIndex","activeContainer","iconRegistry","sanitizer","ref","elementRef","viewportRuler","drop","moveModel","goToUrl","remove","fetchData","dataDefer","dataRef","onDataChange","prioritize","getSvg","addSvgIcon","toggleLibrary","showDetails","deleteMedia","removeFromSelected","move","moveItemInGrid","enterPredicate","getPointerPositionOnPage","hydrate","reloading","refresh","ngOnDestroy"]),this.eventID=`${this.target}:${this.id}:${this.property}`,this.fetchData().then(e=>{if(!(e&&e instanceof u.EventManager))return void console.warn("Unable to bind data from Registry!");const t=()=>{e.completed&&(this.dataDefer(this.subscriber),this.prioritize(),this.refresh())};e.on("change",t),t()})}drop(e){const t=this.dataRef();if(!t||!t.length)return;this.isGrid&&this.moveItemInGrid(t)||(this.isGrid&&d.cookie("env")&&console.warn("moving item in grid failed. attempting fallback."),r.moveItemInArray(t,e.previousIndex,e.currentIndex));let i=0;l.default.forEach(t,e=>e.priority=i++),this.model.trigger("change")}moveModel(e,t){const i=this.dataRef();if(!i||!i.length)return;r.moveItemInArray(i,e,t);let s=0;l.default.forEach(i,e=>e.priority=s++),this.model.trigger("change")}goToUrl(e){e&&e.contentType?window.open(e.contentType.editUrl+"?id="+e.id,"_blank"):console.error("unable to execute goToUrl() because a valid model content was not provided.")}remove(e){const t=this.dataRef();if(!t||!t.length)return console.error("unable to remove model from selection:",t),void this.refresh();let i=t.indexOf(e);if(-1===i){const r=t.map(t=>e.id===t.id?t:null).filter(e=>e);l.default.isArray(r)&&r.length&&(i=t.indexOf(l.default.first(r)))}-1!==i?(t.splice(i,1),this.model.trigger("change"),this.removeFromSelected(e.id)):console.error("unable to find model:",e,"in selection:",t)}fetchData(){return this.fetched?this.fetched:this.fetched=this.registry.fetch(a.Stratus.Select(this.elementRef.nativeElement),this)}dataDefer(e){if(this.subscriber=this.subscriber||e,!this.subscriber||!this.model||!this.model.completed)return void setTimeout(()=>{this.dataDefer(e)},500);const t=this.dataRef();this.empty=!t.length,this.subscriber.next(t),this.refresh()}dataRef(){if(!this.model)return[];const e=this.model.get(this.property);return e&&l.default.isArray(e)?e:[]}onDataChange(){this.prioritize(),this.dataDefer(this.subscriber),this.refresh()}prioritize(){const e=this.dataRef();if(!e||!e.length)return;let t=0;l.default.forEach(e,e=>e.priority=t++)}getSvg(e,t){const i=this.addSvgIcon(e,t);return new s.Observable(t=>{this.iconRegistry.getNamedSvgIcon(i).subscribe({error(t){console.error(`getSvg(${e}): ${t}`)},complete(){t.next(i)}})})}addSvgIcon(e,t){if(e in this.svgIcons)return this.svgIcons[e];t||(t={});const i=this.svgIcons[e]=l.default.uniqueId("media_selector_svg");return this.iconRegistry.addSvgIcon(i,this.sanitizer.bypassSecurityTrustResourceUrl(e),t),i}toggleLibrary(){this.libraryDisplay=!this.libraryDisplay,a.Stratus.Environment.trigger(this.eventID,"toggleLibrary"),a.Stratus.Environment.trigger(`${this.eventID}:toggleLibrary`,this.libraryDisplay)}showDetails(e){a.Stratus.Environment.trigger(this.eventID,"showDetails"),a.Stratus.Environment.trigger(`${this.eventID}:showDetails`,e)}deleteMedia(e){a.Stratus.Environment.trigger(this.eventID,"deleteMedia"),a.Stratus.Environment.trigger(`${this.eventID}:deleteMedia`,e)}removeFromSelected(e){a.Stratus.Environment.trigger(this.eventID,"removeFromSelected"),a.Stratus.Environment.trigger(`${this.eventID}:removeFromSelected`,e)}move(e){const t=this.getPointerPositionOnPage(e.event);!l.default.isUndefined(this.listGroup)&&this.listGroup?l.default.isUndefined(this.listGroup._items)?console.warn("this.listGroup._items does not exist:",this.listGroup):this.listGroup._items.forEach(e=>{(function(e,t,i){const{top:r,bottom:s,left:o,right:n}=e.element.nativeElement.getBoundingClientRect();return i>=r&&i<=s&&t>=o&&t<=n})(e,t.x,t.y)&&(this.activeContainer=e)}):console.warn("this.listGroup does not exist:",this)}moveItemInGrid(e){if(!this.targetList)return!1;const t=this.placeholder.element.nativeElement,i=t.parentElement;return t.style.display="none",i.removeChild(t),i.appendChild(t),i.insertBefore(this.sourceList.element.nativeElement,i.children[this.sourceIndex]),this.targetList=null,this.sourceList=null,this.sourceIndex!==this.targetIndex&&(r.moveItemInArray(e,this.sourceIndex,this.targetIndex),!0)}getPointerPositionOnPage(e){const t=function(e){return e.type.startsWith("touch")}(e)?e.touches[0]||e.changedTouches[0]:e,i=this.viewportRuler.getViewportScrollPosition();return{x:t.pageX-i.left,y:t.pageY-i.top}}},I([i.Input(),S("design:type",String)],v.prototype,"target",void 0),I([i.Input(),S("design:type",String)],v.prototype,"targetSuffix",void 0),I([i.Input(),S("design:type",Number)],v.prototype,"id",void 0),I([i.Input(),S("design:type",Boolean)],v.prototype,"manifest",void 0),I([i.Input(),S("design:type",Boolean)],v.prototype,"decouple",void 0),I([i.Input(),S("design:type",Boolean)],v.prototype,"direct",void 0),I([i.Input(),S("design:type",Object)],v.prototype,"api",void 0),I([i.Input(),S("design:type",String)],v.prototype,"urlRoot",void 0),I([i.Input(),S("design:type",String)],v.prototype,"type",void 0),I([i.Input(),S("design:type",String)],v.prototype,"property",void 0),I([i.Input(),S("design:type",String)],v.prototype,"endpoint",void 0),I([i.ViewChild(r.CdkDropListGroup),S("design:type",r.CdkDropListGroup)],v.prototype,"listGroup",void 0),I([i.ViewChild(r.CdkDropList),S("design:type",r.CdkDropList)],v.prototype,"placeholder",void 0),v=I([i.Component({selector:`sa-${p}`,templateUrl:`${f}/${p}/${p}.component${m}.html`}),S("design:paramtypes",[n.MatIconRegistry,o.DomSanitizer,i.ChangeDetectorRef,i.ElementRef,g.ViewportRuler])],v),e("MediaSelectorComponent",v)}}});
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
<span class="file-type uppercase"
|
|
85
85
|
[innerText]="selectedModel.extension || selectedModel.service || (selectedModel._embedCode ? 'Embedded Video' : '')">
|
|
86
86
|
</span>
|
|
87
|
-
<!-- TODO: evaluate the possibility of an ng-container here instead -->
|
|
87
|
+
<!-- TODO: evaluate the possibility of an data-ng-container here instead -->
|
|
88
88
|
<span class="delimiter"
|
|
89
89
|
*ngIf="selectedModel.bytesHuman && selectedModel.bytesHuman !== 'Empty'"></span>
|
|
90
90
|
<span class="file-size"
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
due to styling.
|
|
5
5
|
-->
|
|
6
6
|
|
|
7
|
-
<!-- ng-disabled="itemDisabled = isSelected(model)" -->
|
|
7
|
+
<!-- data-ng-disabled="itemDisabled = isSelected(model)" -->
|
|
8
8
|
<div class="autocomplete-option"
|
|
9
9
|
[class]="model.contentType.class"
|
|
10
10
|
[class.selected]="isSelected(model)">
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
aria-hidden="true"
|
|
58
58
|
svgIcon="{{ model.contentType.iconResourcePath | assetPath }}"></mat-icon>
|
|
59
59
|
<span class="comment content-type-name font-body"
|
|
60
|
-
ng-class="(model.contentType.name | lowercase) + '-color'"
|
|
61
|
-
ng-bind="model.contentType.name"></span>
|
|
60
|
+
data-ng-class="(model.contentType.name | lowercase) + '-color'"
|
|
61
|
+
data-ng-bind="model.contentType.name"></span>
|
|
62
62
|
</div>
|
|
63
63
|
-->
|
|
64
64
|
<h3 class="title">
|
|
@@ -92,7 +92,7 @@ System.register(["@angular/core", "@angular/forms", "@angular/cdk/drag-drop", "r
|
|
|
92
92
|
this.styled = true;
|
|
93
93
|
this.refresh();
|
|
94
94
|
});
|
|
95
|
-
this.hydrate(elementRef, sanitizer, ["title", "uid", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "type", "property", "endpoint", "_", "has", "log", "Stratus", "selectCtrl", "registry", "fetched", "data", "collection", "model", "dataSub", "onChange", "subscriber", "svgIcons", "styled", "empty", "iconRegistry", "sanitizer", "ref", "elementRef", "drop", "goToUrl", "remove", "fetchData", "dataDefer", "dataRef", "onDataChange", "prioritize", "getSvg", "addSvgIcon", "hydrate", "
|
|
95
|
+
this.hydrate(elementRef, sanitizer, ["title", "uid", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "type", "property", "endpoint", "_", "has", "log", "Stratus", "selectCtrl", "registry", "fetched", "data", "collection", "model", "dataSub", "onChange", "subscriber", "svgIcons", "styled", "empty", "iconRegistry", "sanitizer", "ref", "elementRef", "drop", "goToUrl", "remove", "fetchData", "dataDefer", "dataRef", "onDataChange", "prioritize", "getSvg", "addSvgIcon", "hydrate", "reloading", "refresh", "ngOnDestroy"]);
|
|
96
96
|
this.fetchData()
|
|
97
97
|
.then(data => {
|
|
98
98
|
if (!data || !(data instanceof eventManager_1.EventManager)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["selector.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAqDM,SAAS,GAAG,oBAAoB,CAAA;YAChC,UAAU,GAAG,UAAU,CAAA;YAGvB,GAAG,GAAG,CAAC,oBAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA;YAClC,QAAQ,GAAG,GAAG,iBAAO,CAAC,OAAO,GAAG,IAAI,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;gBACd,CAAC;aAcJ,CAAA;YAjWY;gBAAR,YAAK,EAAE;;6DAAe;YACd;gBAAR,YAAK,EAAE;;mEAAqB;YACpB;gBAAR,YAAK,EAAE;;yDAAW;YACV;gBAAR,YAAK,EAAE;;+DAAkB;YACjB;gBAAR,YAAK,EAAE;;+DAAkB;YACjB;gBAAR,YAAK,EAAE;;6DAAgB;YACf;gBAAR,YAAK,EAAE;;0DAAY;YACX;gBAAR,YAAK,EAAE;;8DAAgB;YAGf;gBAAR,YAAK,EAAE;;2DAAa;YACZ;gBAAR,YAAK,EAAE;;+DAAiB;YAChB;gBAAR,YAAK,EAAE;;+DAAiB;YAnBhB,iBAAiB;gBAZ7B,gBAAS,CAAC;oBAEP,QAAQ,EAAE,MAAM,UAAU,EAAE;oBAC5B,WAAW,EAAE,GAAG,QAAQ,IAAI,UAAU,IAAI,UAAU,aAAa,GAAG,OAAO;iBAO9E,CAAC;iDA4D4B,sBAAe;oBAClB,+BAAY;oBAChB,wBAAiB;oBACZ,iBAAU;eA7DzB,iBAAiB,CAwW7B;;QACD,CAAC","file":"selector.component.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["@angular/core","@angular/forms","@angular/cdk/drag-drop","rxjs","@angular/platform-browser","@angular/material/icon","@stratusjs/runtime/stratus","lodash","@stratusjs/core/environment","@stratusjs/angular/core/root.component","@stratusjs/angularjs/services/registry","@stratusjs/core/events/eventManager"],function(e
|
|
1
|
+
System.register(["@angular/core","@angular/forms","@angular/cdk/drag-drop","rxjs","@angular/platform-browser","@angular/material/icon","@stratusjs/runtime/stratus","lodash","@stratusjs/core/environment","@stratusjs/angular/core/root.component","@stratusjs/angularjs/services/registry","@stratusjs/core/events/eventManager"],function(t,e){"use strict";var r,s,o,n,i,a,c,d,l,u,h,f,p,g,y,m,v,b=this&&this.__decorate||function(t,e,r,s){var o,n=arguments.length,i=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,r):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(n<3?o(i):n>3?o(e,r,i):o(e,r))||i);return n>3&&i&&Object.defineProperty(e,r,i),i},S=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};e&&e.id;return{setters:[function(t){r=t},function(t){s=t},function(t){o=t},function(t){n=t},function(t){i=t},function(t){a=t},function(t){c=t},function(t){d=t},function(t){l=t},function(t){u=t},function(t){h=t},function(t){f=t}],execute:function(){"@stratusjs/angular",p="selector",g=l.cookie("env")?"":".min",y=`${c.Stratus.BaseUrl}${boot.configuration.paths["@stratusjs/angular/*"].replace(/[^/]*$/,"")}`,m=(t,e)=>d.default.has(t,e)&&!d.default.isEmpty(d.default.get(t,e)),v=class extends u.RootComponent{constructor(t,e,r,o){super(),this.iconRegistry=t,this.sanitizer=e,this.ref=r,this.elementRef=o,this.title="selector_component",this._=d.default,this.has=m,this.log=console.log,this.Stratus=c.Stratus,this.selectCtrl=new s.FormControl,this.registry=new h.Registry,this.onChange=new n.Subject,this.svgIcons={},this.styled=!1,this.empty=!1,this.uid=d.default.uniqueId(`sa_${d.default.snakeCase(p)}_component_`),c.Stratus.Instances[this.uid]=this,this.dataSub=new n.Observable(t=>this.dataDefer(t)),d.default.forEach({selector_delete:`${c.Stratus.BaseUrl}sitetheorycore/images/icons/actionButtons/delete.svg`,selector_edit:`${c.Stratus.BaseUrl}sitetheorycore/images/icons/actionButtons/edit.svg`},(r,s)=>t.addSvgIcon(s,e.bypassSecurityTrustResourceUrl(r)).getNamedSvgIcon(s)),c.Stratus.Internals.CssLoader(`${y}selector/selector.component${g}.css`).then(()=>{this.styled=!0,this.refresh()}).catch(t=>{console.warn("Issue detected in CSS Loader for Component:",this),console.error(t),this.styled=!0,this.refresh()}),this.hydrate(o,e,["title","uid","target","targetSuffix","id","manifest","decouple","direct","api","urlRoot","type","property","endpoint","_","has","log","Stratus","selectCtrl","registry","fetched","data","collection","model","dataSub","onChange","subscriber","svgIcons","styled","empty","iconRegistry","sanitizer","ref","elementRef","drop","goToUrl","remove","fetchData","dataDefer","dataRef","onDataChange","prioritize","getSvg","addSvgIcon","hydrate","reloading","refresh","ngOnDestroy"]),this.fetchData().then(t=>{if(!(t&&t instanceof f.EventManager))return void console.warn("Unable to bind data from Registry!");const e=()=>{t.completed&&(this.dataDefer(this.subscriber),this.prioritize(),this.refresh())};t.on("change",e),e()})}drop(t){const e=this.dataRef();if(!e||!e.length)return;o.moveItemInArray(e,t.previousIndex,t.currentIndex);let r=0;d.default.forEach(e,t=>t.priority=r++),this.model.trigger("change")}goToUrl(t){t&&t.contentType?window.open(t.contentType.editUrl+"?id="+t.id,"_blank"):console.error("unable to execute goToUrl() because a valid model content was not provided.")}remove(t){const e=this.dataRef();if(!e||!e.length)return console.error("unable to remove model from selection:",e),void this.refresh();let r=e.indexOf(t);if(-1===r){const s=e.map(e=>t.id===e.id?e:null).filter(t=>t);d.default.isArray(s)&&s.length&&(r=e.indexOf(d.default.first(s)))}-1!==r?(e.splice(r,1),this.model.trigger("change")):console.error("unable to find model:",t,"in selection:",e)}fetchData(){return this.fetched?this.fetched:this.fetched=this.registry.fetch(c.Stratus.Select(this.elementRef.nativeElement),this)}dataDefer(t){if(this.subscriber=this.subscriber||t,!this.subscriber||!this.model||!this.model.completed)return void setTimeout(()=>{this.dataDefer(t)},500);const e=this.dataRef();this.empty=!e.length,this.subscriber.next(e),this.refresh()}dataRef(){if(!this.model)return[];const t=this.model.get(this.property);return t&&d.default.isArray(t)?t:[]}onDataChange(){this.prioritize(),this.dataDefer(this.subscriber),this.refresh()}prioritize(){const t=this.dataRef();if(!t||!t.length)return;let e=0;d.default.forEach(t,t=>t.priority=e++)}getSvg(t,e){const r=this.addSvgIcon(t,e);return new n.Observable(e=>{this.iconRegistry.getNamedSvgIcon(r).subscribe({error(e){console.error(`getSvg(${t}): ${e}`)},complete(){e.next(r)}})})}addSvgIcon(t,e){if(t in this.svgIcons)return this.svgIcons[t];e||(e={});const r=this.svgIcons[t]=d.default.uniqueId("selector_svg");return this.iconRegistry.addSvgIcon(r,this.sanitizer.bypassSecurityTrustResourceUrl(t),e),r}},b([r.Input(),S("design:type",String)],v.prototype,"target",void 0),b([r.Input(),S("design:type",String)],v.prototype,"targetSuffix",void 0),b([r.Input(),S("design:type",Number)],v.prototype,"id",void 0),b([r.Input(),S("design:type",Boolean)],v.prototype,"manifest",void 0),b([r.Input(),S("design:type",Boolean)],v.prototype,"decouple",void 0),b([r.Input(),S("design:type",Boolean)],v.prototype,"direct",void 0),b([r.Input(),S("design:type",Object)],v.prototype,"api",void 0),b([r.Input(),S("design:type",String)],v.prototype,"urlRoot",void 0),b([r.Input(),S("design:type",String)],v.prototype,"type",void 0),b([r.Input(),S("design:type",String)],v.prototype,"property",void 0),b([r.Input(),S("design:type",String)],v.prototype,"endpoint",void 0),v=b([r.Component({selector:"sa-selector",templateUrl:`${y}/selector/selector.component${g}.html`}),S("design:paramtypes",[a.MatIconRegistry,i.DomSanitizer,r.ChangeDetectorRef,r.ElementRef])],v),t("SelectorComponent",v)}}});
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
(cdkDropListDropped)="onDragDrop($event)"
|
|
39
39
|
class="tree-node-drop-list"></div>
|
|
40
40
|
|
|
41
|
-
<!-- Display Name &
|
|
41
|
+
<!-- Display Name & dialog Button -->
|
|
42
42
|
<!-- {{node.model.data.name}} -->
|
|
43
43
|
<!-- <a mat-raised-button (click)="openDialog(node.model)">-->
|
|
44
44
|
<!-- <i class="fas fa-pencil-alt"></i>-->
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
<!-- (cdkDropListDropped)="onDragDrop($event)"-->
|
|
93
93
|
<!-- class="tree-node-drop-list"></div>-->
|
|
94
94
|
|
|
95
|
-
<!-- Display Name &
|
|
95
|
+
<!-- Display Name & dialog Button -->
|
|
96
96
|
<!-- {{node.model.data.name}} -->
|
|
97
97
|
<!-- <a mat-raised-button (click)="openDialog(node.model)">-->
|
|
98
98
|
<!-- <i class="fas fa-pencil-alt"></i>-->
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
<!-- Title & Route Display -->
|
|
103
103
|
<!--<span [class.selected-item]="isSelected(model)">-->
|
|
104
104
|
{{(model && model.version) ? model.version.title : 'Untitled'}}
|
|
105
|
-
<small *ngIf="model.routing.length">
|
|
105
|
+
<small *ngIf="model.routing && model.routing.length">
|
|
106
106
|
{{'/' + model.routing[0].url}}
|
|
107
107
|
</small>
|
|
108
108
|
</mat-option>
|