@osovitny/anatoly 2.0.21 → 2.0.22
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/bundles/osovitny-anatoly.umd.js +1 -1
- package/bundles/osovitny-anatoly.umd.js.map +1 -1
- package/bundles/osovitny-anatoly.umd.min.js +1 -1
- package/bundles/osovitny-anatoly.umd.min.js.map +1 -1
- package/esm2015/lib/ui/components/html-editor/forms-html-editor.component.js +2 -2
- package/fesm2015/osovitny-anatoly.js +1 -1
- package/fesm2015/osovitny-anatoly.js.map +1 -1
- package/package.json +1 -1
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
15
|
***************************************************************************** */
|
|
16
|
-
var S=function(t,e){return(S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function x(t,e){function n(){this.constructor=t}S(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;function C(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function P(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function E(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(P(arguments[e]));return t}Object.create;var w=function(){function t(t){this.http=t,this.baseUrl=""}return t.prototype.serializeParams=function(t){return t?"?"+$.param(t):""},t.prototype.get=function(t,e,n){n||(n="json");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.get(r,{responseType:n}).pipe(a.map((function(t){return t})))},t.prototype.post=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t;return this.http.post(r,e,{responseType:n})},t.prototype.postQS=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.post(r,null,{responseType:n})},t.prototype.delete=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.delete(r,{responseType:n})},t.prototype.getById=function(t){return this.get("getById",{id:t})},t.prototype.getAll=function(t){return this.get("getall",t).pipe(a.map((function(t){return t})))},t.prototype.getJsonFile=function(t,e,n){e||(e="/dist/jsons"),n||(n="1.0");var r=e+"/"+t+"?"+n;return this.http.get(r).pipe(a.map((function(t){return t})))},t.prototype.getNewGuid=function(){var t=this.baseUrl+"/getNewGuid";return this.http.get(t,{responseType:"text"})},t}();w.decorators=[{type:r.Injectable}],w.ctorParameters=function(){return[{type:i.HttpClient}]};var U=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.current=null,n.successes=[],n.subscription=null,n.baseUrl="/api/appContext",n}return x(e,t),e.prototype.getCurrent=function(t){var e=this;void 0!==t&&(null==this.current?(this.successes.push(t),null==this.subscription&&(this.subscription=this.get("GetCurrentContext",null).subscribe((function(t){e.dataReceived(t)}),(function(t){})))):t(this.current))},e.prototype.dataReceived=function(t){this.current=t;for(var e=0;e<this.successes.length;e++){(0,this.successes[e])(t)}this.successes=[],this.subscription.unsubscribe(),this.subscription=null,this.current=null},e.prototype.isUserSignedIn=function(){return p.isUserSignedIn},e.prototype.isUserAdmin=function(){return p.isUserAdmin},e}(w);U.decorators=[{type:r.Injectable}],U.ctorParameters=function(){return[{type:i.HttpClient}]};var A=function(t){function e(){var e=t.call(this,!1)||this;return e.counter=0,e.isFreezed=!1,e}return x(e,t),e.prototype.show=function(){this.counter++;var t=this;setTimeout((function(){t.counter>0&&t.next(!0)}),1e3)},e.prototype.hide=function(){this.counter<=0||(this.counter--,0==this.counter&&this.next(!1))},e.prototype.freeze=function(t){var e=this;void 0===t&&(t=1e3),this.isFreezed=!0;setTimeout((function(){e.isFreezed=!1}),t)},e}(s.BehaviorSubject);A.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new A},token:A,providedIn:"root"}),A.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],A.ctorParameters=function(){return[]};var O=function(){function t(t,e){this.loadingService=t,this.loggingService=e,this.longRunningExceptionsList=[],this.autoCDNSASTokenUrls=["chunks","resources"],this.externalSiteUrls=["azurewebsites.net"]}return t.prototype.intercept=function(t,e){var n,r,o,s,u,l,c=this,p=d.IsCDNEnabled,f=d.CDNSASToken,h=this.loadingService.isFreezed,m=!h,y=t.url.toLowerCase(),g=t.url;if(!h)try{for(var v=C(this.longRunningExceptionsList),b=v.next();!b.done;b=v.next()){var I=b.value;if(y.indexOf(this.longRunningExceptionsList[I])>=0){m=!1;break}}}catch(t){n={error:t}}finally{try{b&&!b.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}if(p)try{for(var S=C(this.autoCDNSASTokenUrls),x=S.next();!x.done;x=S.next()){I=x.value;if(y.indexOf(this.autoCDNSASTokenUrls[I])>=0){t=t.clone({url:g+f});break}}}catch(t){o={error:t}}finally{try{x&&!x.done&&(s=S.return)&&s.call(S)}finally{if(o)throw o.error}}try{for(var P=C(this.externalSiteUrls),E=P.next();!E.done;E=P.next()){I=E.value;if(y.indexOf(this.externalSiteUrls[I])>=0){!0;break}}}catch(t){u={error:t}}finally{try{E&&!E.done&&(l=P.return)&&l.call(P)}finally{if(u)throw u.error}}if(y.indexOf("/api/")>-1){var w="",U=(new Date).getTime().toString();w=y.indexOf("?")>-1?g+"&t="+U:g+"?t="+U,t=t.clone({url:w})}return t=t.clone({headers:t.headers.set("Accept","application/json")}),this.onRequestStart(m),e.handle(t).pipe(a.tap((function(t){t instanceof i.HttpResponse&&c.onRequestEnd(m)}),(function(t){c.onRequestEnd(m),c.loggingService.logError(t)})))},t.prototype.onRequestStart=function(t){t&&this.loadingService.show()},t.prototype.onRequestEnd=function(t){t&&this.loadingService.hide()},t}();O.decorators=[{type:r.Injectable}],O.ctorParameters=function(){return[{type:A},{type:b}]};var T=[b,U,A],q=function(t,e){this.injector=t,f(e,"AnatolyCoreModule"),this.injector};q.decorators=[{type:r.NgModule,args:[{imports:[u.CommonModule],providers:E(T)}]}],q.ctorParameters=function(){return[{type:r.Injector},{type:q,decorators:[{type:r.Optional},{type:r.SkipSelf}]}]};var B=function(t){function e(e){var n=t.call(this,[])||this;return n.http=e,n.baseReadUrl="",n.data=[],n}return x(e,t),e.prototype.serializeParams=function(t){return t?"?"+$.param(t):""},e.prototype.read=function(e,n,r){var o=this;if(this.data.length)return t.prototype.next.call(this,this.data);var i=this.baseReadUrl;void 0===e&&(e=this.savedReadParams),e&&(i=this.baseReadUrl+""+this.serializeParams(e),this.savedReadParams=e),this.http.get(i).pipe(a.map((function(t){return t}))).subscribe((function(e){t.prototype.next.call(o,e),n&&n()}),(function(t){r&&r(t)}))},e}(s.BehaviorSubject);B.decorators=[{type:r.Injectable}],B.ctorParameters=function(){return[{type:i.HttpClient}]};var N=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.baseUrl="",n}return x(e,t),e.prototype.reset=function(){this.data=[]},e.prototype.resetItem=function(e){if(e){var n=this.data.find((function(t){return t.Id===e.Id}));Object.assign(n,e),t.prototype.next.call(this,this.data)}},e.prototype.save=function(t,e,n){var r=this,o=e?"add":"update";this.reset(),this.post(o,t).subscribe((function(){}),(function(){r.read()}),(function(){r.read(),n&&n()}))},e.prototype.remove=function(t,e){var n=this;this.reset(),this.post("remove",t).subscribe((function(){}),(function(){n.read()}),(function(){n.read(),e&&e()}))},e.prototype.post=function(t,e){var n=this.baseUrl+""+t+this.serializeParams(e);return this.http.post(n,e).pipe(a.map((function(t){return t})))},e}(B);N.decorators=[{type:r.Injectable}],N.ctorParameters=function(){return[{type:i.HttpClient}]};var j=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.baseUrl+="billing/",n}return x(e,t),e.prototype.requestNewSubscription=function(t,e,n){this.postQS("requestNewSubscription",{requestedPlan:t}).subscribe((function(t){}),(function(t){n&&n()}),(function(){e&&e()}))},e.prototype.cancelRequestedSubscription=function(t,e){this.postQS("cancelRequestedSubscription",null).subscribe((function(t){}),(function(t){e&&e()}),(function(){t&&t()}))},e.prototype.buyAccess=function(t,e,n){this.postQS("buyAccess",{requestedPlan:t}).subscribe((function(t){}),(function(t){n&&n()}),(function(){e&&e()}))},e}(w);j.decorators=[{type:r.Injectable}],j.ctorParameters=function(){return[{type:i.HttpClient}]};var R=function(){};R.decorators=[{type:r.NgModule,args:[{imports:[u.CommonModule],providers:[j]}]}];var k=function(){function t(t,e){this.appcontext=t,this.api=e,this.contextUpdated=!1,this.isUserSignedIn=!1,this.currentPlan=0,this.currentPlanTitle=""}return t.prototype.ngOnInit=function(){var t=this;this.appcontext.isUserSignedIn()?this.appcontext.getCurrent((function(e){t.isUserSignedIn=e.isUserSignedIn,t.isUserSignedIn&&(t.currentPlan=e.account.billingPlan,t.currentPlanTitle=e.account.billingPlanAsString),t.contextUpdated=!0})):this.contextUpdated=!0},t.prototype.onBuyPlan=function(){var t="Requested plan: "+this.plantitle+" ",e=this;h.AreYouSure(t,"Buying access","Confirm change","Cancel",(function(){e.api.buyAccess(e.plan,(function(){h.Success("Access Granted",null,(function(){window.location.reload()}))}))}))},t}();k.decorators=[{type:r.Component,args:[{selector:"anatoly-buyaccess-button",template:'<div *ngIf="contextUpdated">\r\n <div *ngIf="!isUserSignedIn">\r\n <anatoly-signup-button classbtn="btn btn-block btn-primary"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf="isUserSignedIn">\r\n <button class="btn btn-block btn-success selectPlan" *ngIf="plan == currentPlan">\r\n Your Plan\r\n </button>\r\n\r\n <button class="btn btn-block btn-warning selectPlan" *ngIf="plan != currentPlan && currentPlan == 1" (click)="onBuyPlan()">\r\n Buy Now\r\n </button>\r\n </div>\r\n</div>\r\n'}]}],k.ctorParameters=function(){return[{type:U},{type:j}]},k.propDecorators={plan:[{type:r.Input}],plantitle:[{type:r.Input}]};var z=function(){function t(t){this.appcontext=t,this.contextUpdated=!1,this.isUserSignedIn=!1,this.currentPlan=0,this.currentPlanTitle="",this.requestedPlan=0,this.requestedPlanTitle=""}return t.prototype.ngOnInit=function(){var t=this;this.appcontext.isUserSignedIn()?this.appcontext.getCurrent((function(e){t.isUserSignedIn=e.isUserSignedIn,t.isUserSignedIn&&(t.currentPlan=e.account.billingPlan,t.currentPlanTitle=e.account.billingPlanAsString,t.requestedPlan=e.account.requestedBillingPlan,t.requestedPlanTitle=e.account.requestedBillingPlanAsString),t.contextUpdated=!0})):this.contextUpdated=!0},t}();z.decorators=[{type:r.Component,args:[{selector:"anatoly-subscribe-plan-button",template:'<div *ngIf="contextUpdated">\r\n <div *ngIf="!isUserSignedIn">\r\n <anatoly-signup-button classbtn="btn btn-block btn-primary"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf="isUserSignedIn">\r\n <button class="btn btn-block btn-success selectPlan" *ngIf="plan == currentPlan">\r\n Your Plan\r\n </button>\r\n\r\n <button class="btn btn-block btn-warning selectPlan" *ngIf="requestedPlan != null && requestedPlan != 0 && plan == requestedPlan">\r\n Requested\r\n </button>\r\n\r\n <anatoly-upgrade-plan-button *ngIf="plan != currentPlan && plan != requestedPlan"\r\n [currentplantitle]="currentPlanTitle"\r\n [requestedplan]=plan\r\n [requestedplantitle]="plantitle">\r\n </anatoly-upgrade-plan-button>\r\n </div>\r\n</div>\r\n'}]}],z.ctorParameters=function(){return[{type:U}]},z.propDecorators={plan:[{type:r.Input}],plantitle:[{type:r.Input}]};var F=function(){function t(t){this.api=t}return t.prototype.onUpgradePlan=function(){var t="Current plan: "+this.currentplantitle+" New plan: "+this.requestedplantitle,e=this;h.AreYouSure(t,"Change billing plan","Confirm change","Cancel",(function(){e.api.requestNewSubscription(e.requestedplan,(function(){h.Success("Your request for changing plan has been sent.",null,(function(){window.location.reload()}))}))}))},t}();F.decorators=[{type:r.Component,args:[{selector:"anatoly-upgrade-plan-button",template:'<button class="btn btn-block btn-primary" (click)="onUpgradePlan()">\r\n Upgrade\r\n</button>\r\n'}]}],F.ctorParameters=function(){return[{type:j}]},F.propDecorators={currentplantitle:[{type:r.Input}],requestedplan:[{type:r.Input}],requestedplantitle:[{type:r.Input}]};var D=function(){};D.decorators=[{type:r.Component,args:[{selector:"anatoly-signin-button",template:'<a href="identity/signIn" class="{{classbtn}}">Sign In</a>\r\n'}]}],D.ctorParameters=function(){return[]},D.propDecorators={classbtn:[{type:r.Input}]};var M=function(){};M.decorators=[{type:r.Component,args:[{selector:"anatoly-signout-button",template:'<a href="identity/signOut" class="{{classbtn}}">Sign Out</a>\r\n'}]}],M.ctorParameters=function(){return[]},M.propDecorators={classbtn:[{type:r.Input}]};var G=function(){};G.decorators=[{type:r.Component,args:[{selector:"anatoly-signup-button",template:'<a href="identity/signup" class="{{classbtn}}">Sign Up</a>\r\n'}]}],G.propDecorators={classbtn:[{type:r.Input}]};var V=function(){function t(){}return t.prototype.ngOnInit=function(){null==this.title&&(this.title="")},t}();V.decorators=[{type:r.Component,args:[{selector:"anatoly-content-header",template:'<h2 class="page-header">\r\n {{title}}\r\n \x3c!--<small>Optional {{title}}</small>--\x3e\r\n</h2>\r\n'}]}],V.propDecorators={title:[{type:r.Input}]};var L=function(){function t(){}return t.prototype.getQSId=function(){var t=m.getValueByNameInQS("id");return void 0===t||""==t?null:t},t}(),H=function(t){function e(){var e=t.call(this)||this;return e.formSubmitted=!1,e}return x(e,t),e.prototype.isActionAdding=function(){var t=m.getValueByNameInQS("id");return void 0===t||""==t},e.prototype.getEntityId=function(){return this.getQSId()},e.prototype.isControlValid=function(t,e){return void 0===e&&(e=null),!this.isControlInvalid(t,e)},e.prototype.isControlInvalid=function(t,e){if(void 0===e&&(e=null),void 0===t||""==t)return!1;var n=e||this.formGroup;return!!n&&(!!n.get(t)&&(this.formSubmitted&&n.get(t).invalid||n.get(t).touched&&n.get(t).invalid))},e.prototype.getFormValue=function(t,e){return void 0===e&&(e=null),(e||this.formGroup).controls[t].value},e.prototype.setFormValue=function(t,e,n){void 0===n&&(n=null),(n||this.formGroup).controls[t].setValue(e)},e.prototype.getFormGroupValue=function(t,e,n){return void 0===n&&(n=null),(n||this.formGroup).controls[t].get(e).value},e.prototype.setFormGroupValue=function(t,e,n,r){void 0===r&&(r=null),(r||this.formGroup).controls[t].get(e).setValue(n)},e}(L);H.propDecorators={formGroup:[{type:r.Input}],formSubmitted:[{type:r.Input}]};var K={placeholderText:"Edit Your Content Here",charCounterCount:!0,heightMin:100,toolbarInline:!1,toolbarButtons:{moreText:{buttons:["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","textColor","backgroundColor","inlineClass","inlineStyle"]},moreParagraph:{buttons:["alignLeft","alignCenter","formatOLSimple","alignRight","alignJustify","formatOL","formatUL","paragraphFormat","paragraphStyle","lineHeight","outdent","indent","quote"]},moreRich:{buttons:["insertLink","insertImage","insertTable","emoticons","fontAwesome","specialCharacters","embedly"]},moreMisc:{buttons:["selectAll","clearFormatting","html","undo","redo","fullscreen"],align:"right"}},imageUploadURL:"/api/HtmlEditor/UploadImage",imageAllowedTypes:["jpeg","jpg","png"],imageUploadParams:{uploadType:"",uploadParentId:""}},_=function(t){function e(){var e=t.call(this)||this;return e.froalaEditorInitialized=!1,e.afterInitializedActions=[],e.editorLabelText="Html",e.editorOptions={},e}return x(e,t),e.prototype.ngOnInit=function(){var t=this.editorOptions;"string"==typeof this.editorOptions&&(t=JSON.parse(this.editorOptions));var e=$.extend({},K,t),n=d.froalaEditorKey;n&&(e=$.extend({},e,JSON.parse('{ "key": "'+n+'" }'))),e.events&&e.events.initialized&&(e.events.initialized.overridden=!1),this.options=e},e.prototype.ngAfterViewInit=function(){var t=this;setTimeout((function(){t.froalaEditorInitialized=!0,t.onInitialized()}),300)},e.prototype.onInitialized=function(){var t=this.afterInitializedActions;if(this.afterInitializedActions=[],t)for(var e=0;e<t.length;e++)t[e]()},e.prototype.getEditor=function(){return this.froalaEditor?this.froalaEditor.getEditor():null},e.prototype.doAfterInitialized=function(t){var e=this;this.froalaEditorInitialized?t(e):this.afterInitializedActions.push((function(){t(e)}))},e.prototype.initializeControl=function(t){this.froalaEditor=t,this.froalaEditor.initialize()},e.prototype.setUploadParams=function(t,e){this.doAfterInitialized((function(n){var r=n.getEditor();void 0!==r&&null!=r&&(r.opts.imageUploadParams.uploadType=t,r.opts.imageUploadParams.uploadParentId=e)}))},e}(H);_.propDecorators={editorLabelText:[{type:r.Input}],editorOptions:[{type:r.Input}]};var Q=function(t){function e(){return t.call(this)||this}return x(e,t),e.prototype.setHtml=function(t){this.doAfterInitialized((function(e){var n=e.getEditor();void 0!==n&&null!=n&&n.html.set(t)}))},e.prototype.getHtml=function(){var t=this.getEditor();if(void 0!==t&&null!=t)return t.html.get(!1)},e}(_);Q.decorators=[{type:r.Component,args:[{selector:"anatoly-html-editor",template:'<div>\r\n <label>{{ editorLabelText }}</label>\r\n <textarea [froalaEditor]="options" (froalaInit)="initializeControl($event)">\r\n </textarea>\r\n</div>'}]}],Q.ctorParameters=function(){return[]};var Y=function(t){function e(){var e=t.call(this)||this;return e.editorFormKey="html",e}return x(e,t),e.prototype.setFormValueAfterInitialized=function(t,e){this.doAfterInitialized((function(n){n.setFormValue(t,e)}))},e}(_);Y.decorators=[{type:r.Component,args:[{selector:"anatoly-forms-html-editor",template:'<div [formGroup]="formGroup">\r\n <div class="form-group" [ngClass]="{\'has-error\': isItemInvalid(editorFormKey) }">\r\n <label class="control-label">{{ editorLabelText }}</label>\r\n <textarea [formControlName]="editorFormKey"\r\n [froalaEditor]="options" (froalaInit)="initializeControl($event)">\r\n </textarea>\r\n <anatoly-item-validation-summary [formGroup]="formGroup"\r\n [formSubmitted]="formSubmitted"\r\n [controlName]="editorFormKey"\r\n [controlTitle]="editorLabelText">\r\n </anatoly-item-validation-summary>\r\n </div>\r\n</div>\r\n'}]}],Y.ctorParameters=function(){return[]},Y.propDecorators={editorFormKey:[{type:r.Input}]};var J=function(t){function e(){return t.call(this)||this}return x(e,t),e.prototype.getFormValidationMessages=function(){var t=this,e=[];return Object.keys(this.formGroup.controls).forEach((function(n){var r=t.formGroup.controls[n];null!=r.controls?Object.keys(r.controls).forEach((function(n){var o=r.controls[n];t.getValidationMessages(o,t.getControlName(o,n)).forEach((function(t){return e.push(t)}))})):t.getValidationMessages(r,t.getControlName(r,n)).forEach((function(t){return e.push(t)}))})),e},e.prototype.getValidationMessages=function(t,e){var n=t.path||e,r=[];if(t.errors)for(var o in t.errors)if(t.errors.hasOwnProperty(o))switch(o){case"required":r.push(n+" is required");break;case"minlength":r.push(n+" must be at least "+t.errors.minlength.requiredLength+" characters");break;case"pattern":r.push(n+" contains illegal characters");break;case"format":r.push(n+" format mismatch");break;case"maxlength":r.push(n+" must have maximum "+t.errors.maxlength.requiredLength+" characters");break;case"specialcharacters":r.push(n+" contains special characters")}return r},e.prototype.getControlName=function(t,e){var n=this.getControlTitle(t);return n||e},e.prototype.getControlTitle=function(t){if(null==t?void 0:t.nativeElement){var e=this.getTitleAttribute(t.nativeElement);if(e)return e}},e.prototype.getTitleAttribute=function(t){var e,n,r,o,i,a,s;switch(t.tagName){case"KENDO-TIMEPICKER":case"KENDO-DATEPICKER":s=null===(o=null===(r=null===(n=null===(e=t.children[0])||void 0===e?void 0:e.children[0])||void 0===n?void 0:n.children[0])||void 0===r?void 0:r.children[0])||void 0===o?void 0:o.getAttribute("title");break;case"KENDO-NUMERICTEXTBOX":s=null===(a=null===(i=t.children[0])||void 0===i?void 0:i.children[0])||void 0===a?void 0:a.getAttribute("title");break;default:s=t.getAttribute("title")}return s},e}(H),W=function(t){function e(){var e=t.call(this)||this;return e.visible=!1,e.customerrors=[],e.viewtype=0,e}return x(e,t),e.prototype.getErrors=function(){if(1==this.viewtype)return this.customerrors;var t=this.getFormValidationMessages();if(0==this.viewtype)return t;var e=[];return t.length>0&&e.push.apply(e,E(t)),this.customerrors.length>0&&e.push.apply(e,E(this.customerrors)),e},e}(J);W.decorators=[{type:r.Component,args:[{selector:"anatoly-form-validation-summary",template:'<div class="callout callout-danger" *ngIf="visible">\r\n <h6 class="box-title">There are problems with the form</h6>\r\n <ul>\r\n <li *ngFor="let error of getErrors()"><span>{{error}}</span></li>\r\n </ul>\r\n</div>\r\n\r\n'}]}],W.ctorParameters=function(){return[]},W.propDecorators={visible:[{type:r.Input}],customerrors:[{type:r.Input}],viewtype:[{type:r.Input}]};var X=function(t){function e(){return t.call(this)||this}return x(e,t),e}(J);X.decorators=[{type:r.Component,args:[{selector:"anatoly-item-validation-summary",template:'<ul class="list-unstyled" *ngIf="isControlInvalid(controlName)">\r\n <li *ngFor="let error of getValidationMessages(formGroup.get(controlName), controlTitle)">\r\n <span class="help-block">{{ error }}</span>\r\n </li>\r\n</ul>\r\n\r\n'}]}],X.ctorParameters=function(){return[]},X.propDecorators={controlName:[{type:r.Input}],controlTitle:[{type:r.Input}]};var Z=function(){function t(t,e){this.el=t,this.control=e}return t.prototype.ngOnInit=function(){this.control.control.nativeElement=this.el.nativeElement},t}();Z.decorators=[{type:r.Directive,args:[{selector:"[formControl], [formControlName]"}]}],Z.ctorParameters=function(){return[{type:r.ElementRef},{type:l.NgControl}]};var tt=c.FroalaEditorModule.forRoot(),et=c.FroalaViewModule.forRoot(),nt=function(){};nt.decorators=[{type:r.NgModule,args:[{imports:[u.CommonModule,l.ReactiveFormsModule,l.FormsModule,tt,et],exports:[z,F,k,D,G,M,W,X,Q,Y,V,Z],declarations:[z,F,k,D,G,M,W,X,Q,Y,V,Z]}]}],t.Alerts=h,t.AnatolyCoreModule=q,t.AnatolyDataModule=R,t.AnatolyHttpInterceptor=O,t.AnatolyUIModule=nt,t.AppContextService=U,t.AppCoreSettings=d,t.BaseApiService=w,t.BaseComponent=L,t.BaseEditComponent=H,t.BaseGoService=v,t.BaseGridEditService=N,t.BaseGridReadService=B,t.BillingApiService=j,t.BuyAccessButtonComponent=k,t.ContentHeaderComponent=V,t.ContextInitState=p,t.FormValidationSummaryComponent=W,t.FormsHtmlEditorComponent=Y,t.GlobalErrorHandler=I,t.Guid=g,t.HtmlEditorComponent=Q,t.ItemValidationSummaryComponent=X,t.LoadingService=A,t.LoggingService=b,t.NativeElementDirective=Z,t.SignInButtonComponent=D,t.SignOutButtonComponent=M,t.SignUpButtonComponent=G,t.Subs=y,t.SubscribePlanButtonComponent=z,t.UpgradePlanButtonComponent=F,t.Utils=m,t.ValidationSummaryComponent=J,t.throwIfAlreadyLoaded=f,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
16
|
+
var S=function(t,e){return(S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function x(t,e){function n(){this.constructor=t}S(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;function C(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function P(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function E(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(P(arguments[e]));return t}Object.create;var w=function(){function t(t){this.http=t,this.baseUrl=""}return t.prototype.serializeParams=function(t){return t?"?"+$.param(t):""},t.prototype.get=function(t,e,n){n||(n="json");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.get(r,{responseType:n}).pipe(a.map((function(t){return t})))},t.prototype.post=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t;return this.http.post(r,e,{responseType:n})},t.prototype.postQS=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.post(r,null,{responseType:n})},t.prototype.delete=function(t,e,n){n||(n="text");var r=this.baseUrl+"/"+t+this.serializeParams(e);return this.http.delete(r,{responseType:n})},t.prototype.getById=function(t){return this.get("getById",{id:t})},t.prototype.getAll=function(t){return this.get("getall",t).pipe(a.map((function(t){return t})))},t.prototype.getJsonFile=function(t,e,n){e||(e="/dist/jsons"),n||(n="1.0");var r=e+"/"+t+"?"+n;return this.http.get(r).pipe(a.map((function(t){return t})))},t.prototype.getNewGuid=function(){var t=this.baseUrl+"/getNewGuid";return this.http.get(t,{responseType:"text"})},t}();w.decorators=[{type:r.Injectable}],w.ctorParameters=function(){return[{type:i.HttpClient}]};var U=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.current=null,n.successes=[],n.subscription=null,n.baseUrl="/api/appContext",n}return x(e,t),e.prototype.getCurrent=function(t){var e=this;void 0!==t&&(null==this.current?(this.successes.push(t),null==this.subscription&&(this.subscription=this.get("GetCurrentContext",null).subscribe((function(t){e.dataReceived(t)}),(function(t){})))):t(this.current))},e.prototype.dataReceived=function(t){this.current=t;for(var e=0;e<this.successes.length;e++){(0,this.successes[e])(t)}this.successes=[],this.subscription.unsubscribe(),this.subscription=null,this.current=null},e.prototype.isUserSignedIn=function(){return p.isUserSignedIn},e.prototype.isUserAdmin=function(){return p.isUserAdmin},e}(w);U.decorators=[{type:r.Injectable}],U.ctorParameters=function(){return[{type:i.HttpClient}]};var A=function(t){function e(){var e=t.call(this,!1)||this;return e.counter=0,e.isFreezed=!1,e}return x(e,t),e.prototype.show=function(){this.counter++;var t=this;setTimeout((function(){t.counter>0&&t.next(!0)}),1e3)},e.prototype.hide=function(){this.counter<=0||(this.counter--,0==this.counter&&this.next(!1))},e.prototype.freeze=function(t){var e=this;void 0===t&&(t=1e3),this.isFreezed=!0;setTimeout((function(){e.isFreezed=!1}),t)},e}(s.BehaviorSubject);A.ɵprov=r.ɵɵdefineInjectable({factory:function(){return new A},token:A,providedIn:"root"}),A.decorators=[{type:r.Injectable,args:[{providedIn:"root"}]}],A.ctorParameters=function(){return[]};var O=function(){function t(t,e){this.loadingService=t,this.loggingService=e,this.longRunningExceptionsList=[],this.autoCDNSASTokenUrls=["chunks","resources"],this.externalSiteUrls=["azurewebsites.net"]}return t.prototype.intercept=function(t,e){var n,r,o,s,u,l,c=this,p=d.IsCDNEnabled,f=d.CDNSASToken,h=this.loadingService.isFreezed,m=!h,y=t.url.toLowerCase(),g=t.url;if(!h)try{for(var v=C(this.longRunningExceptionsList),b=v.next();!b.done;b=v.next()){var I=b.value;if(y.indexOf(this.longRunningExceptionsList[I])>=0){m=!1;break}}}catch(t){n={error:t}}finally{try{b&&!b.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}if(p)try{for(var S=C(this.autoCDNSASTokenUrls),x=S.next();!x.done;x=S.next()){I=x.value;if(y.indexOf(this.autoCDNSASTokenUrls[I])>=0){t=t.clone({url:g+f});break}}}catch(t){o={error:t}}finally{try{x&&!x.done&&(s=S.return)&&s.call(S)}finally{if(o)throw o.error}}try{for(var P=C(this.externalSiteUrls),E=P.next();!E.done;E=P.next()){I=E.value;if(y.indexOf(this.externalSiteUrls[I])>=0){!0;break}}}catch(t){u={error:t}}finally{try{E&&!E.done&&(l=P.return)&&l.call(P)}finally{if(u)throw u.error}}if(y.indexOf("/api/")>-1){var w="",U=(new Date).getTime().toString();w=y.indexOf("?")>-1?g+"&t="+U:g+"?t="+U,t=t.clone({url:w})}return t=t.clone({headers:t.headers.set("Accept","application/json")}),this.onRequestStart(m),e.handle(t).pipe(a.tap((function(t){t instanceof i.HttpResponse&&c.onRequestEnd(m)}),(function(t){c.onRequestEnd(m),c.loggingService.logError(t)})))},t.prototype.onRequestStart=function(t){t&&this.loadingService.show()},t.prototype.onRequestEnd=function(t){t&&this.loadingService.hide()},t}();O.decorators=[{type:r.Injectable}],O.ctorParameters=function(){return[{type:A},{type:b}]};var T=[b,U,A],q=function(t,e){this.injector=t,f(e,"AnatolyCoreModule"),this.injector};q.decorators=[{type:r.NgModule,args:[{imports:[u.CommonModule],providers:E(T)}]}],q.ctorParameters=function(){return[{type:r.Injector},{type:q,decorators:[{type:r.Optional},{type:r.SkipSelf}]}]};var B=function(t){function e(e){var n=t.call(this,[])||this;return n.http=e,n.baseReadUrl="",n.data=[],n}return x(e,t),e.prototype.serializeParams=function(t){return t?"?"+$.param(t):""},e.prototype.read=function(e,n,r){var o=this;if(this.data.length)return t.prototype.next.call(this,this.data);var i=this.baseReadUrl;void 0===e&&(e=this.savedReadParams),e&&(i=this.baseReadUrl+""+this.serializeParams(e),this.savedReadParams=e),this.http.get(i).pipe(a.map((function(t){return t}))).subscribe((function(e){t.prototype.next.call(o,e),n&&n()}),(function(t){r&&r(t)}))},e}(s.BehaviorSubject);B.decorators=[{type:r.Injectable}],B.ctorParameters=function(){return[{type:i.HttpClient}]};var N=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.baseUrl="",n}return x(e,t),e.prototype.reset=function(){this.data=[]},e.prototype.resetItem=function(e){if(e){var n=this.data.find((function(t){return t.Id===e.Id}));Object.assign(n,e),t.prototype.next.call(this,this.data)}},e.prototype.save=function(t,e,n){var r=this,o=e?"add":"update";this.reset(),this.post(o,t).subscribe((function(){}),(function(){r.read()}),(function(){r.read(),n&&n()}))},e.prototype.remove=function(t,e){var n=this;this.reset(),this.post("remove",t).subscribe((function(){}),(function(){n.read()}),(function(){n.read(),e&&e()}))},e.prototype.post=function(t,e){var n=this.baseUrl+""+t+this.serializeParams(e);return this.http.post(n,e).pipe(a.map((function(t){return t})))},e}(B);N.decorators=[{type:r.Injectable}],N.ctorParameters=function(){return[{type:i.HttpClient}]};var j=function(t){function e(e){var n=t.call(this,e)||this;return n.http=e,n.baseUrl+="billing/",n}return x(e,t),e.prototype.requestNewSubscription=function(t,e,n){this.postQS("requestNewSubscription",{requestedPlan:t}).subscribe((function(t){}),(function(t){n&&n()}),(function(){e&&e()}))},e.prototype.cancelRequestedSubscription=function(t,e){this.postQS("cancelRequestedSubscription",null).subscribe((function(t){}),(function(t){e&&e()}),(function(){t&&t()}))},e.prototype.buyAccess=function(t,e,n){this.postQS("buyAccess",{requestedPlan:t}).subscribe((function(t){}),(function(t){n&&n()}),(function(){e&&e()}))},e}(w);j.decorators=[{type:r.Injectable}],j.ctorParameters=function(){return[{type:i.HttpClient}]};var R=function(){};R.decorators=[{type:r.NgModule,args:[{imports:[u.CommonModule],providers:[j]}]}];var k=function(){function t(t,e){this.appcontext=t,this.api=e,this.contextUpdated=!1,this.isUserSignedIn=!1,this.currentPlan=0,this.currentPlanTitle=""}return t.prototype.ngOnInit=function(){var t=this;this.appcontext.isUserSignedIn()?this.appcontext.getCurrent((function(e){t.isUserSignedIn=e.isUserSignedIn,t.isUserSignedIn&&(t.currentPlan=e.account.billingPlan,t.currentPlanTitle=e.account.billingPlanAsString),t.contextUpdated=!0})):this.contextUpdated=!0},t.prototype.onBuyPlan=function(){var t="Requested plan: "+this.plantitle+" ",e=this;h.AreYouSure(t,"Buying access","Confirm change","Cancel",(function(){e.api.buyAccess(e.plan,(function(){h.Success("Access Granted",null,(function(){window.location.reload()}))}))}))},t}();k.decorators=[{type:r.Component,args:[{selector:"anatoly-buyaccess-button",template:'<div *ngIf="contextUpdated">\r\n <div *ngIf="!isUserSignedIn">\r\n <anatoly-signup-button classbtn="btn btn-block btn-primary"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf="isUserSignedIn">\r\n <button class="btn btn-block btn-success selectPlan" *ngIf="plan == currentPlan">\r\n Your Plan\r\n </button>\r\n\r\n <button class="btn btn-block btn-warning selectPlan" *ngIf="plan != currentPlan && currentPlan == 1" (click)="onBuyPlan()">\r\n Buy Now\r\n </button>\r\n </div>\r\n</div>\r\n'}]}],k.ctorParameters=function(){return[{type:U},{type:j}]},k.propDecorators={plan:[{type:r.Input}],plantitle:[{type:r.Input}]};var z=function(){function t(t){this.appcontext=t,this.contextUpdated=!1,this.isUserSignedIn=!1,this.currentPlan=0,this.currentPlanTitle="",this.requestedPlan=0,this.requestedPlanTitle=""}return t.prototype.ngOnInit=function(){var t=this;this.appcontext.isUserSignedIn()?this.appcontext.getCurrent((function(e){t.isUserSignedIn=e.isUserSignedIn,t.isUserSignedIn&&(t.currentPlan=e.account.billingPlan,t.currentPlanTitle=e.account.billingPlanAsString,t.requestedPlan=e.account.requestedBillingPlan,t.requestedPlanTitle=e.account.requestedBillingPlanAsString),t.contextUpdated=!0})):this.contextUpdated=!0},t}();z.decorators=[{type:r.Component,args:[{selector:"anatoly-subscribe-plan-button",template:'<div *ngIf="contextUpdated">\r\n <div *ngIf="!isUserSignedIn">\r\n <anatoly-signup-button classbtn="btn btn-block btn-primary"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf="isUserSignedIn">\r\n <button class="btn btn-block btn-success selectPlan" *ngIf="plan == currentPlan">\r\n Your Plan\r\n </button>\r\n\r\n <button class="btn btn-block btn-warning selectPlan" *ngIf="requestedPlan != null && requestedPlan != 0 && plan == requestedPlan">\r\n Requested\r\n </button>\r\n\r\n <anatoly-upgrade-plan-button *ngIf="plan != currentPlan && plan != requestedPlan"\r\n [currentplantitle]="currentPlanTitle"\r\n [requestedplan]=plan\r\n [requestedplantitle]="plantitle">\r\n </anatoly-upgrade-plan-button>\r\n </div>\r\n</div>\r\n'}]}],z.ctorParameters=function(){return[{type:U}]},z.propDecorators={plan:[{type:r.Input}],plantitle:[{type:r.Input}]};var F=function(){function t(t){this.api=t}return t.prototype.onUpgradePlan=function(){var t="Current plan: "+this.currentplantitle+" New plan: "+this.requestedplantitle,e=this;h.AreYouSure(t,"Change billing plan","Confirm change","Cancel",(function(){e.api.requestNewSubscription(e.requestedplan,(function(){h.Success("Your request for changing plan has been sent.",null,(function(){window.location.reload()}))}))}))},t}();F.decorators=[{type:r.Component,args:[{selector:"anatoly-upgrade-plan-button",template:'<button class="btn btn-block btn-primary" (click)="onUpgradePlan()">\r\n Upgrade\r\n</button>\r\n'}]}],F.ctorParameters=function(){return[{type:j}]},F.propDecorators={currentplantitle:[{type:r.Input}],requestedplan:[{type:r.Input}],requestedplantitle:[{type:r.Input}]};var D=function(){};D.decorators=[{type:r.Component,args:[{selector:"anatoly-signin-button",template:'<a href="identity/signIn" class="{{classbtn}}">Sign In</a>\r\n'}]}],D.ctorParameters=function(){return[]},D.propDecorators={classbtn:[{type:r.Input}]};var M=function(){};M.decorators=[{type:r.Component,args:[{selector:"anatoly-signout-button",template:'<a href="identity/signOut" class="{{classbtn}}">Sign Out</a>\r\n'}]}],M.ctorParameters=function(){return[]},M.propDecorators={classbtn:[{type:r.Input}]};var G=function(){};G.decorators=[{type:r.Component,args:[{selector:"anatoly-signup-button",template:'<a href="identity/signup" class="{{classbtn}}">Sign Up</a>\r\n'}]}],G.propDecorators={classbtn:[{type:r.Input}]};var V=function(){function t(){}return t.prototype.ngOnInit=function(){null==this.title&&(this.title="")},t}();V.decorators=[{type:r.Component,args:[{selector:"anatoly-content-header",template:'<h2 class="page-header">\r\n {{title}}\r\n \x3c!--<small>Optional {{title}}</small>--\x3e\r\n</h2>\r\n'}]}],V.propDecorators={title:[{type:r.Input}]};var L=function(){function t(){}return t.prototype.getQSId=function(){var t=m.getValueByNameInQS("id");return void 0===t||""==t?null:t},t}(),H=function(t){function e(){var e=t.call(this)||this;return e.formSubmitted=!1,e}return x(e,t),e.prototype.isActionAdding=function(){var t=m.getValueByNameInQS("id");return void 0===t||""==t},e.prototype.getEntityId=function(){return this.getQSId()},e.prototype.isControlValid=function(t,e){return void 0===e&&(e=null),!this.isControlInvalid(t,e)},e.prototype.isControlInvalid=function(t,e){if(void 0===e&&(e=null),void 0===t||""==t)return!1;var n=e||this.formGroup;return!!n&&(!!n.get(t)&&(this.formSubmitted&&n.get(t).invalid||n.get(t).touched&&n.get(t).invalid))},e.prototype.getFormValue=function(t,e){return void 0===e&&(e=null),(e||this.formGroup).controls[t].value},e.prototype.setFormValue=function(t,e,n){void 0===n&&(n=null),(n||this.formGroup).controls[t].setValue(e)},e.prototype.getFormGroupValue=function(t,e,n){return void 0===n&&(n=null),(n||this.formGroup).controls[t].get(e).value},e.prototype.setFormGroupValue=function(t,e,n,r){void 0===r&&(r=null),(r||this.formGroup).controls[t].get(e).setValue(n)},e}(L);H.propDecorators={formGroup:[{type:r.Input}],formSubmitted:[{type:r.Input}]};var K={placeholderText:"Edit Your Content Here",charCounterCount:!0,heightMin:100,toolbarInline:!1,toolbarButtons:{moreText:{buttons:["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","textColor","backgroundColor","inlineClass","inlineStyle"]},moreParagraph:{buttons:["alignLeft","alignCenter","formatOLSimple","alignRight","alignJustify","formatOL","formatUL","paragraphFormat","paragraphStyle","lineHeight","outdent","indent","quote"]},moreRich:{buttons:["insertLink","insertImage","insertTable","emoticons","fontAwesome","specialCharacters","embedly"]},moreMisc:{buttons:["selectAll","clearFormatting","html","undo","redo","fullscreen"],align:"right"}},imageUploadURL:"/api/HtmlEditor/UploadImage",imageAllowedTypes:["jpeg","jpg","png"],imageUploadParams:{uploadType:"",uploadParentId:""}},_=function(t){function e(){var e=t.call(this)||this;return e.froalaEditorInitialized=!1,e.afterInitializedActions=[],e.editorLabelText="Html",e.editorOptions={},e}return x(e,t),e.prototype.ngOnInit=function(){var t=this.editorOptions;"string"==typeof this.editorOptions&&(t=JSON.parse(this.editorOptions));var e=$.extend({},K,t),n=d.froalaEditorKey;n&&(e=$.extend({},e,JSON.parse('{ "key": "'+n+'" }'))),e.events&&e.events.initialized&&(e.events.initialized.overridden=!1),this.options=e},e.prototype.ngAfterViewInit=function(){var t=this;setTimeout((function(){t.froalaEditorInitialized=!0,t.onInitialized()}),300)},e.prototype.onInitialized=function(){var t=this.afterInitializedActions;if(this.afterInitializedActions=[],t)for(var e=0;e<t.length;e++)t[e]()},e.prototype.getEditor=function(){return this.froalaEditor?this.froalaEditor.getEditor():null},e.prototype.doAfterInitialized=function(t){var e=this;this.froalaEditorInitialized?t(e):this.afterInitializedActions.push((function(){t(e)}))},e.prototype.initializeControl=function(t){this.froalaEditor=t,this.froalaEditor.initialize()},e.prototype.setUploadParams=function(t,e){this.doAfterInitialized((function(n){var r=n.getEditor();void 0!==r&&null!=r&&(r.opts.imageUploadParams.uploadType=t,r.opts.imageUploadParams.uploadParentId=e)}))},e}(H);_.propDecorators={editorLabelText:[{type:r.Input}],editorOptions:[{type:r.Input}]};var Q=function(t){function e(){return t.call(this)||this}return x(e,t),e.prototype.setHtml=function(t){this.doAfterInitialized((function(e){var n=e.getEditor();void 0!==n&&null!=n&&n.html.set(t)}))},e.prototype.getHtml=function(){var t=this.getEditor();if(void 0!==t&&null!=t)return t.html.get(!1)},e}(_);Q.decorators=[{type:r.Component,args:[{selector:"anatoly-html-editor",template:'<div>\r\n <label>{{ editorLabelText }}</label>\r\n <textarea [froalaEditor]="options" (froalaInit)="initializeControl($event)">\r\n </textarea>\r\n</div>'}]}],Q.ctorParameters=function(){return[]};var Y=function(t){function e(){var e=t.call(this)||this;return e.editorFormKey="html",e}return x(e,t),e.prototype.setFormValueAfterInitialized=function(t,e){this.doAfterInitialized((function(n){n.setFormValue(t,e)}))},e}(_);Y.decorators=[{type:r.Component,args:[{selector:"anatoly-forms-html-editor",template:'<div [formGroup]="formGroup">\r\n <div class="form-group" [ngClass]="{\'has-error\': isControlInvalid(editorFormKey) }">\r\n <label class="control-label">{{ editorLabelText }}</label>\r\n <textarea [formControlName]="editorFormKey"\r\n [froalaEditor]="options" (froalaInit)="initializeControl($event)">\r\n </textarea>\r\n <anatoly-item-validation-summary [formGroup]="formGroup"\r\n [formSubmitted]="formSubmitted"\r\n [controlName]="editorFormKey"\r\n [controlTitle]="editorLabelText">\r\n </anatoly-item-validation-summary>\r\n </div>\r\n</div>\r\n'}]}],Y.ctorParameters=function(){return[]},Y.propDecorators={editorFormKey:[{type:r.Input}]};var J=function(t){function e(){return t.call(this)||this}return x(e,t),e.prototype.getFormValidationMessages=function(){var t=this,e=[];return Object.keys(this.formGroup.controls).forEach((function(n){var r=t.formGroup.controls[n];null!=r.controls?Object.keys(r.controls).forEach((function(n){var o=r.controls[n];t.getValidationMessages(o,t.getControlName(o,n)).forEach((function(t){return e.push(t)}))})):t.getValidationMessages(r,t.getControlName(r,n)).forEach((function(t){return e.push(t)}))})),e},e.prototype.getValidationMessages=function(t,e){var n=t.path||e,r=[];if(t.errors)for(var o in t.errors)if(t.errors.hasOwnProperty(o))switch(o){case"required":r.push(n+" is required");break;case"minlength":r.push(n+" must be at least "+t.errors.minlength.requiredLength+" characters");break;case"pattern":r.push(n+" contains illegal characters");break;case"format":r.push(n+" format mismatch");break;case"maxlength":r.push(n+" must have maximum "+t.errors.maxlength.requiredLength+" characters");break;case"specialcharacters":r.push(n+" contains special characters")}return r},e.prototype.getControlName=function(t,e){var n=this.getControlTitle(t);return n||e},e.prototype.getControlTitle=function(t){if(null==t?void 0:t.nativeElement){var e=this.getTitleAttribute(t.nativeElement);if(e)return e}},e.prototype.getTitleAttribute=function(t){var e,n,r,o,i,a,s;switch(t.tagName){case"KENDO-TIMEPICKER":case"KENDO-DATEPICKER":s=null===(o=null===(r=null===(n=null===(e=t.children[0])||void 0===e?void 0:e.children[0])||void 0===n?void 0:n.children[0])||void 0===r?void 0:r.children[0])||void 0===o?void 0:o.getAttribute("title");break;case"KENDO-NUMERICTEXTBOX":s=null===(a=null===(i=t.children[0])||void 0===i?void 0:i.children[0])||void 0===a?void 0:a.getAttribute("title");break;default:s=t.getAttribute("title")}return s},e}(H),W=function(t){function e(){var e=t.call(this)||this;return e.visible=!1,e.customerrors=[],e.viewtype=0,e}return x(e,t),e.prototype.getErrors=function(){if(1==this.viewtype)return this.customerrors;var t=this.getFormValidationMessages();if(0==this.viewtype)return t;var e=[];return t.length>0&&e.push.apply(e,E(t)),this.customerrors.length>0&&e.push.apply(e,E(this.customerrors)),e},e}(J);W.decorators=[{type:r.Component,args:[{selector:"anatoly-form-validation-summary",template:'<div class="callout callout-danger" *ngIf="visible">\r\n <h6 class="box-title">There are problems with the form</h6>\r\n <ul>\r\n <li *ngFor="let error of getErrors()"><span>{{error}}</span></li>\r\n </ul>\r\n</div>\r\n\r\n'}]}],W.ctorParameters=function(){return[]},W.propDecorators={visible:[{type:r.Input}],customerrors:[{type:r.Input}],viewtype:[{type:r.Input}]};var X=function(t){function e(){return t.call(this)||this}return x(e,t),e}(J);X.decorators=[{type:r.Component,args:[{selector:"anatoly-item-validation-summary",template:'<ul class="list-unstyled" *ngIf="isControlInvalid(controlName)">\r\n <li *ngFor="let error of getValidationMessages(formGroup.get(controlName), controlTitle)">\r\n <span class="help-block">{{ error }}</span>\r\n </li>\r\n</ul>\r\n\r\n'}]}],X.ctorParameters=function(){return[]},X.propDecorators={controlName:[{type:r.Input}],controlTitle:[{type:r.Input}]};var Z=function(){function t(t,e){this.el=t,this.control=e}return t.prototype.ngOnInit=function(){this.control.control.nativeElement=this.el.nativeElement},t}();Z.decorators=[{type:r.Directive,args:[{selector:"[formControl], [formControlName]"}]}],Z.ctorParameters=function(){return[{type:r.ElementRef},{type:l.NgControl}]};var tt=c.FroalaEditorModule.forRoot(),et=c.FroalaViewModule.forRoot(),nt=function(){};nt.decorators=[{type:r.NgModule,args:[{imports:[u.CommonModule,l.ReactiveFormsModule,l.FormsModule,tt,et],exports:[z,F,k,D,G,M,W,X,Q,Y,V,Z],declarations:[z,F,k,D,G,M,W,X,Q,Y,V,Z]}]}],t.Alerts=h,t.AnatolyCoreModule=q,t.AnatolyDataModule=R,t.AnatolyHttpInterceptor=O,t.AnatolyUIModule=nt,t.AppContextService=U,t.AppCoreSettings=d,t.BaseApiService=w,t.BaseComponent=L,t.BaseEditComponent=H,t.BaseGoService=v,t.BaseGridEditService=N,t.BaseGridReadService=B,t.BillingApiService=j,t.BuyAccessButtonComponent=k,t.ContentHeaderComponent=V,t.ContextInitState=p,t.FormValidationSummaryComponent=W,t.FormsHtmlEditorComponent=Y,t.GlobalErrorHandler=I,t.Guid=g,t.HtmlEditorComponent=Q,t.ItemValidationSummaryComponent=X,t.LoadingService=A,t.LoggingService=b,t.NativeElementDirective=Z,t.SignInButtonComponent=D,t.SignOutButtonComponent=M,t.SignUpButtonComponent=G,t.Subs=y,t.SubscribePlanButtonComponent=z,t.UpgradePlanButtonComponent=F,t.Utils=m,t.ValidationSummaryComponent=J,t.throwIfAlreadyLoaded=f,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
17
17
|
//# sourceMappingURL=osovitny-anatoly.umd.min.js.map
|