ng-gantt
Version:
Angular Gantt Editor (wrapper for [jsgantt-improved](https://github.com/jsGanttImproved/jsgantt-improved)). View/Edit Gantt file with formatting.
2 lines • 3 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("jsgantt-improved")):"function"==typeof define&&define.amd?define("ng-gantt",["exports","@angular/core","@angular/common","jsgantt-improved"],e):e((t=t||self)["ng-gantt"]={},t.ng.core,t.ng.common,t.jsganttImproved)}(this,function(t,e,o,n){"use strict";var i=function(){return(i=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function r(t,e,o,n){var i,r=arguments.length,a=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(r<3?i(a):r>3?i(e,o,a):i(e,o))||a);return r>3&&a&&Object.defineProperty(e,o,a),a}function a(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}var s=function(){},d=function(){function t(){this.id="anggantteditor"+Math.floor(1e6*Math.random()),this.optionsChanged=!1,this.formats=["Hour","Day","Week","Month","Quarter"],this.options=new s,this.format="week"}return Object.defineProperty(t.prototype,"data",{set:function(t){this._data=t,this.editor&&(this.destroy(),this.ngOnInit())},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this.options;!this.optionsChanged&&this.editor&&(t=this.editor.options);var e=this.editor=new n.GanttChart(this.ganttEditorContainer.nativeElement,this.format);null!=e.getDivId()&&(e.setOptions(i({vCaptionType:"Complete",vQuarterColWidth:36,vDateTaskDisplayFormat:"day dd month yyyy",vDayMajorDateDisplayFormat:"mon yyyy - Week ww",vWeekMinorDateDisplayFormat:"dd mon",vShowTaskInfoLink:1,vShowEndWeekDate:0,vUseSingleCell:1e4,vFormatArr:this.formats.slice(1)},t)),this._data&&this._data.forEach&&this._data.forEach(function(t){t.pGantt=e,e.AddTaskItemObject(t)}),e.Draw())},t.prototype.setOptions=function(t){this.editor&&this.destroy(),this.optionsChanged=!0,this.options=t,this.ngOnInit()},t.prototype.destroy=function(){},r([e.ViewChild("ganttEditorContainer",{static:!0}),a("design:type",e.ElementRef)],t.prototype,"ganttEditorContainer",void 0),r([e.Input(),a("design:type",s)],t.prototype,"options",void 0),r([e.Input(),a("design:type",Object)],t.prototype,"format",void 0),r([e.Input("data"),a("design:type",Object),a("design:paramtypes",[Object])],t.prototype,"data",null),t=r([e.Component({selector:"ng-gantt",template:'<div [id]="id" #ganttEditorContainer></div>'}),a("design:paramtypes",[])],t)}(),p=function(){function t(){}var n;return n=t,t.forRoot=function(){return{ngModule:n,providers:[]}},t=n=r([e.NgModule({imports:[o.CommonModule],declarations:[d],exports:[d]})],t)}();t.GanttEditorComponent=d,t.GanttEditorOptions=s,t.NgGanttEditorModule=p,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ng-gantt.umd.min.js.map