@worktile/gantt 11.0.2 → 12.0.1

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.
Files changed (232) hide show
  1. package/.all-contributorsrc +53 -0
  2. package/.angulardoc.json +4 -0
  3. package/.circleci/config.yml +17 -0
  4. package/.coveralls.yml +1 -0
  5. package/.docgenirc.js +64 -0
  6. package/.editorconfig +22 -0
  7. package/.prettierrc +24 -0
  8. package/.travis.yml +23 -0
  9. package/CHANGELOG.md +564 -0
  10. package/Dockerfile +4 -0
  11. package/LICENSE +21 -0
  12. package/README.md +116 -13
  13. package/angular.json +136 -0
  14. package/docs/guides/basic/components.md +54 -0
  15. package/docs/guides/basic/event.md +70 -0
  16. package/docs/guides/basic/index.md +4 -0
  17. package/docs/guides/basic/style.md +68 -0
  18. package/docs/guides/basic/type.md +70 -0
  19. package/docs/guides/basic/usage.md +189 -0
  20. package/docs/guides/index.md +5 -0
  21. package/docs/guides/intro/getting-started.md +79 -0
  22. package/docs/guides/intro/index.md +51 -0
  23. package/docs/index.md +0 -0
  24. package/example/browserslist +12 -0
  25. package/example/src/app/app-routing.module.ts +26 -0
  26. package/example/src/app/app.component.html +2 -0
  27. package/example/src/app/app.component.ts +11 -0
  28. package/example/src/app/app.module.ts +57 -0
  29. package/example/src/app/components/components.component.html +6 -0
  30. package/example/src/app/components/components.component.ts +33 -0
  31. package/example/src/app/configuration/parameters/api/zh-cn.js +350 -0
  32. package/example/src/app/configuration/parameters/doc/zh-cn.md +5 -0
  33. package/example/src/app/gantt/gantt.component.html +51 -0
  34. package/example/src/app/gantt/gantt.component.ts +119 -0
  35. package/example/src/app/gantt-advanced/component/flat.component.html +30 -0
  36. package/example/src/app/gantt-advanced/component/flat.component.ts +72 -0
  37. package/example/src/app/gantt-advanced/component/flat.scss +31 -0
  38. package/example/src/app/gantt-advanced/gantt-advanced.component.html +32 -0
  39. package/example/src/app/gantt-advanced/gantt-advanced.component.ts +34 -0
  40. package/example/src/app/gantt-advanced/mocks.ts +158 -0
  41. package/example/src/app/gantt-groups/gantt-groups.component.html +42 -0
  42. package/example/src/app/gantt-groups/gantt-groups.component.ts +62 -0
  43. package/example/src/app/gantt-range/gantt-range.component.html +66 -0
  44. package/example/src/app/gantt-range/gantt-range.component.ts +67 -0
  45. package/example/src/app/gantt-range/mocks.ts +150 -0
  46. package/example/src/app/helper.ts +38 -0
  47. package/example/src/assets/.gitkeep +0 -0
  48. package/example/src/environments/environment.prod.ts +3 -0
  49. package/example/src/environments/environment.ts +16 -0
  50. package/example/src/favicon.ico +0 -0
  51. package/example/src/index.html +13 -0
  52. package/example/src/main.ts +12 -0
  53. package/example/src/polyfills.ts +63 -0
  54. package/example/src/styles.scss +56 -0
  55. package/example/tsconfig.app.json +18 -0
  56. package/nginx.conf +17 -0
  57. package/package.json +113 -17
  58. package/packages/gantt/README.md +24 -0
  59. package/packages/gantt/karma.conf.js +46 -0
  60. package/packages/gantt/ng-package.json +7 -0
  61. package/packages/gantt/ng-package.prod.json +7 -0
  62. package/packages/gantt/package.json +16 -0
  63. package/packages/gantt/src/class/date-point.ts +14 -0
  64. package/{class/event.d.ts → packages/gantt/src/class/event.ts} +12 -6
  65. package/packages/gantt/src/class/group.ts +36 -0
  66. package/{class/index.d.ts → packages/gantt/src/class/index.ts} +0 -0
  67. package/packages/gantt/src/class/item.ts +129 -0
  68. package/packages/gantt/src/class/test/group.spec.ts +21 -0
  69. package/packages/gantt/src/class/test/item.spec.ts +102 -0
  70. package/packages/gantt/src/class/view-type.ts +7 -0
  71. package/packages/gantt/src/components/bar/bar-drag.ts +298 -0
  72. package/packages/gantt/src/components/bar/bar.component.html +17 -0
  73. package/packages/gantt/src/components/bar/bar.component.scss +169 -0
  74. package/packages/gantt/src/components/bar/bar.component.ts +109 -0
  75. package/packages/gantt/src/components/bar/test/bar.component.spec.ts +54 -0
  76. package/packages/gantt/src/components/bar/test/bar.drag.spec.ts +196 -0
  77. package/packages/gantt/src/components/calendar/calendar.component.html +52 -0
  78. package/packages/gantt/src/components/calendar/calendar.component.scss +77 -0
  79. package/packages/gantt/src/components/calendar/calendar.component.ts +100 -0
  80. package/packages/gantt/src/components/drag-backdrop/drag-backdrop.component.html +6 -0
  81. package/packages/gantt/src/components/drag-backdrop/drag-backdrop.component.scss +48 -0
  82. package/packages/gantt/src/components/drag-backdrop/drag-backdrop.component.ts +13 -0
  83. package/packages/gantt/src/components/icon/icon.component.scss +13 -0
  84. package/packages/gantt/src/components/icon/icon.component.ts +28 -0
  85. package/packages/gantt/src/components/icon/icons.ts +86 -0
  86. package/packages/gantt/src/components/links/links.component.html +19 -0
  87. package/packages/gantt/src/components/links/links.component.scss +27 -0
  88. package/packages/gantt/src/components/links/links.component.ts +263 -0
  89. package/packages/gantt/src/components/main/gantt-main.component.html +35 -0
  90. package/packages/gantt/src/components/main/gantt-main.component.ts +35 -0
  91. package/packages/gantt/src/components/range/range.component.html +8 -0
  92. package/packages/gantt/src/components/range/range.component.scss +35 -0
  93. package/packages/gantt/src/components/range/range.component.ts +27 -0
  94. package/packages/gantt/src/components/range/test/range.component.spec.ts +80 -0
  95. package/packages/gantt/src/components/table/gantt-table.component.html +105 -0
  96. package/packages/gantt/src/components/table/gantt-table.component.scss +144 -0
  97. package/packages/gantt/src/components/table/gantt-table.component.ts +166 -0
  98. package/packages/gantt/src/components/table/test/table.spec.ts +129 -0
  99. package/packages/gantt/src/gantt-abstract.ts +14 -0
  100. package/packages/gantt/src/gantt-dom.service.ts +134 -0
  101. package/packages/gantt/src/gantt-drag-container.ts +73 -0
  102. package/packages/gantt/src/gantt-item-upper.ts +50 -0
  103. package/packages/gantt/src/gantt-print.service.ts +104 -0
  104. package/packages/gantt/src/gantt-upper.ts +289 -0
  105. package/packages/gantt/src/gantt.component.html +18 -0
  106. package/packages/gantt/src/gantt.component.scss +77 -0
  107. package/packages/gantt/src/gantt.component.ts +134 -0
  108. package/packages/gantt/src/gantt.module.ts +47 -0
  109. package/packages/gantt/src/gantt.pipe.ts +31 -0
  110. package/packages/gantt/src/gantt.styles.ts +28 -0
  111. package/{public-api.d.ts → packages/gantt/src/public-api.ts} +6 -0
  112. package/packages/gantt/src/root.component.html +12 -0
  113. package/packages/gantt/src/root.component.ts +121 -0
  114. package/packages/gantt/src/styles/index.scss +9 -0
  115. package/packages/gantt/src/styles/variables.scss +46 -0
  116. package/packages/gantt/src/table/gantt-column.component.ts +25 -0
  117. package/packages/gantt/src/table/gantt-table.component.ts +14 -0
  118. package/packages/gantt/src/table/test/table.spec.ts +56 -0
  119. package/packages/gantt/src/test/gantt.component.spec.ts +404 -0
  120. package/packages/gantt/src/test/mocks/data.ts +303 -0
  121. package/packages/gantt/src/test.ts +21 -0
  122. package/packages/gantt/src/utils/date.ts +276 -0
  123. package/packages/gantt/src/utils/helpers.ts +66 -0
  124. package/packages/gantt/src/utils/test/date.spec.ts +105 -0
  125. package/packages/gantt/src/utils/test/helpers.spec.ts +73 -0
  126. package/packages/gantt/src/utils/testing.ts +64 -0
  127. package/packages/gantt/src/views/day.ts +74 -0
  128. package/packages/gantt/src/views/factory.ts +25 -0
  129. package/packages/gantt/src/views/month.ts +66 -0
  130. package/packages/gantt/src/views/quarter.ts +68 -0
  131. package/packages/gantt/src/views/test/day.spec.ts +45 -0
  132. package/packages/gantt/src/views/test/factory.spec.ts +41 -0
  133. package/packages/gantt/src/views/test/mock.ts +14 -0
  134. package/packages/gantt/src/views/test/month.spec.ts +45 -0
  135. package/packages/gantt/src/views/test/quarter.spec.ts +45 -0
  136. package/packages/gantt/src/views/test/view.spec.ts +144 -0
  137. package/packages/gantt/src/views/test/week.spec.ts +45 -0
  138. package/packages/gantt/src/views/test/year.spec.ts +45 -0
  139. package/packages/gantt/src/views/view.ts +186 -0
  140. package/packages/gantt/src/views/week.ts +66 -0
  141. package/packages/gantt/src/views/year.ts +62 -0
  142. package/packages/gantt/tsconfig.lib.json +20 -0
  143. package/packages/gantt/tsconfig.lib.prod.json +9 -0
  144. package/packages/gantt/tsconfig.schematics.json +25 -0
  145. package/packages/gantt/tsconfig.spec.json +17 -0
  146. package/packages/gantt/tslint.json +18 -0
  147. package/scss-bundle.config.json +7 -0
  148. package/tsconfig.json +26 -0
  149. package/tslint.json +51 -0
  150. package/bundles/worktile-gantt.umd.js +0 -3129
  151. package/bundles/worktile-gantt.umd.js.map +0 -1
  152. package/bundles/worktile-gantt.umd.min.js +0 -16
  153. package/bundles/worktile-gantt.umd.min.js.map +0 -1
  154. package/class/date-point.d.ts +0 -15
  155. package/class/group.d.ts +0 -22
  156. package/class/item.d.ts +0 -70
  157. package/class/view-type.d.ts +0 -7
  158. package/components/bar/bar-drag.d.ts +0 -34
  159. package/components/bar/bar.component.d.ts +0 -23
  160. package/components/calendar/calendar.component.d.ts +0 -25
  161. package/components/drag-backdrop/drag-backdrop.component.d.ts +0 -6
  162. package/components/icon/icon.component.d.ts +0 -10
  163. package/components/icon/icons.d.ts +0 -8
  164. package/components/links/links.component.d.ts +0 -44
  165. package/components/main/gantt-main.component.d.ts +0 -18
  166. package/components/range/range.component.d.ts +0 -10
  167. package/components/table/gantt-table.component.d.ts +0 -31
  168. package/esm2015/class/date-point.js +0 -10
  169. package/esm2015/class/event.js +0 -13
  170. package/esm2015/class/group.js +0 -17
  171. package/esm2015/class/index.js +0 -6
  172. package/esm2015/class/item.js +0 -78
  173. package/esm2015/class/view-type.js +0 -9
  174. package/esm2015/components/bar/bar-drag.js +0 -266
  175. package/esm2015/components/bar/bar.component.js +0 -91
  176. package/esm2015/components/calendar/calendar.component.js +0 -82
  177. package/esm2015/components/drag-backdrop/drag-backdrop.component.js +0 -18
  178. package/esm2015/components/icon/icon.component.js +0 -36
  179. package/esm2015/components/icon/icons.js +0 -87
  180. package/esm2015/components/links/links.component.js +0 -207
  181. package/esm2015/components/main/gantt-main.component.js +0 -35
  182. package/esm2015/components/range/range.component.js +0 -32
  183. package/esm2015/components/table/gantt-table.component.js +0 -128
  184. package/esm2015/gantt-dom.service.js +0 -101
  185. package/esm2015/gantt-drag-container.js +0 -57
  186. package/esm2015/gantt-item-upper.js +0 -55
  187. package/esm2015/gantt-print.service.js +0 -92
  188. package/esm2015/gantt-upper.js +0 -231
  189. package/esm2015/gantt.component.js +0 -105
  190. package/esm2015/gantt.module.js +0 -43
  191. package/esm2015/gantt.pipe.js +0 -33
  192. package/esm2015/gantt.styles.js +0 -15
  193. package/esm2015/public-api.js +0 -16
  194. package/esm2015/root.component.js +0 -111
  195. package/esm2015/table/gantt-column.component.js +0 -28
  196. package/esm2015/table/gantt-table.component.js +0 -18
  197. package/esm2015/utils/date.js +0 -160
  198. package/esm2015/utils/helpers.js +0 -45
  199. package/esm2015/views/day.js +0 -54
  200. package/esm2015/views/factory.js +0 -23
  201. package/esm2015/views/month.js +0 -48
  202. package/esm2015/views/quarter.js +0 -51
  203. package/esm2015/views/view.js +0 -121
  204. package/esm2015/views/week.js +0 -49
  205. package/esm2015/views/year.js +0 -50
  206. package/esm2015/worktile-gantt.js +0 -16
  207. package/fesm2015/worktile-gantt.js +0 -2491
  208. package/fesm2015/worktile-gantt.js.map +0 -1
  209. package/gantt-dom.service.d.ts +0 -29
  210. package/gantt-drag-container.d.ts +0 -20
  211. package/gantt-item-upper.d.ts +0 -17
  212. package/gantt-print.service.d.ts +0 -10
  213. package/gantt-upper.d.ts +0 -62
  214. package/gantt.component.d.ts +0 -28
  215. package/gantt.module.d.ts +0 -2
  216. package/gantt.pipe.d.ts +0 -11
  217. package/gantt.styles.d.ts +0 -15
  218. package/root.component.d.ts +0 -25
  219. package/style.scss +0 -645
  220. package/table/gantt-column.component.d.ts +0 -12
  221. package/table/gantt-table.component.d.ts +0 -7
  222. package/utils/date.d.ts +0 -59
  223. package/utils/helpers.d.ts +0 -11
  224. package/views/day.d.ts +0 -14
  225. package/views/factory.d.ts +0 -8
  226. package/views/month.d.ts +0 -12
  227. package/views/quarter.d.ts +0 -12
  228. package/views/view.d.ts +0 -56
  229. package/views/week.d.ts +0 -12
  230. package/views/year.d.ts +0 -12
  231. package/worktile-gantt.d.ts +0 -15
  232. package/worktile-gantt.metadata.json +0 -1
@@ -1,16 +0,0 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("rxjs/operators"),require("rxjs"),require("date-fns"),require("@angular/cdk/coercion"),require("@angular/cdk/drag-drop"),require("html2canvas")):"function"==typeof define&&define.amd?define("@worktile/gantt",["exports","@angular/core","@angular/common","rxjs/operators","rxjs","date-fns","@angular/cdk/coercion","@angular/cdk/drag-drop","html2canvas"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).worktile=t.worktile||{},t.worktile.gantt={}),t.ng.core,t.ng.common,t.rxjs.operators,t.rxjs,t.dateFns,t.ng.cdk.coercion,t.ng.cdk.dragDrop,t.html2canvas)}(this,(function(t,e,n,r,i,a,s,o,l){"use strict";function p(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var d=p(l),u=function(t,e){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
7
-
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}u(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.create;function g(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 h(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return s}function f(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(h(arguments[e]));return t}Object.create;var m,y,v=function(t,e,n,r,i){this.start=t,this.text=e,this.x=n,this.y=r,this.additions=i},b=function(){},w=function(){},k=function(){},C=function(){},x=function(){},D=function(){},O=function(){function t(t){if(t)if(t instanceof Date)this.value=t;else{if("string"!=typeof t&&"number"!=typeof t)throw new Error("The input date type is not supported expect Date | string\n | number | { date: number; with_time: 0 | 1}, actual "+JSON.stringify(t));t.toString().length<13?this.value=a.fromUnixTime(+t):this.value=new Date(t)}else this.value=new Date}return t.prototype.getYear=function(){return this.value.getFullYear()},t.prototype.getMonth=function(){return this.value.getMonth()},t.prototype.getDay=function(){return this.value.getDay()},t.prototype.getTime=function(){return this.value.getTime()},t.prototype.getDate=function(){return this.value.getDate()},t.prototype.getHours=function(){return this.value.getHours()},t.prototype.getMinutes=function(){return this.value.getMinutes()},t.prototype.getSeconds=function(){return this.value.getSeconds()},t.prototype.getMilliseconds=function(){return this.value.getMilliseconds()},t.prototype.getWeek=function(t){return void 0===t&&(t={weekStartsOn:1}),a.getWeek(this.value,t)},t.prototype.getDaysInMonth=function(){return a.getDaysInMonth(this.value)},t.prototype.getDaysInQuarter=function(){return a.differenceInCalendarDays(this.endOfQuarter().addSeconds(1).value,this.startOfQuarter().value)},t.prototype.getDaysInYear=function(){return a.differenceInCalendarDays(this.endOfYear().addSeconds(1).value,this.startOfYear().value)},t.prototype.setDate=function(e){return new t(a.setDate(this.value,e))},t.prototype.clone=function(){return new t(new Date(this.value))},t.prototype.add=function(e,n){switch(n){case"second":return new t(this.value).addSeconds(e);case"minute":return new t(this.value).addMinutes(e);case"hour":return new t(this.value).addHours(e);case"day":return new t(this.value).addDays(e);case"week":return new t(this.value).addWeeks(e);case"month":return new t(this.value).addMonths(e);case"quarter":return new t(this.value).addQuarters(e);case"year":return new t(this.value).addYears(e);default:return new t(this.value).addSeconds(e)}},t.prototype.addSeconds=function(e){return new t(a.addSeconds(this.value,e))},t.prototype.addMinutes=function(e){return new t(a.addMinutes(this.value,e))},t.prototype.addHours=function(e){return new t(a.addHours(this.value,e))},t.prototype.addDays=function(e){return new t(a.addDays(this.value,e))},t.prototype.addWeeks=function(e){return new t(a.addWeeks(this.value,e))},t.prototype.addMonths=function(e){return new t(a.addMonths(this.value,e))},t.prototype.addQuarters=function(e){return new t(a.addQuarters(this.value,e))},t.prototype.addYears=function(e){return new t(a.addYears(this.value,e))},t.prototype.startOfDay=function(){return new t(a.startOfDay(this.value))},t.prototype.startOfWeek=function(e){return new t(a.startOfWeek(this.value,e))},t.prototype.startOfMonth=function(){return new t(a.startOfMonth(this.value))},t.prototype.startOfQuarter=function(){return new t(a.startOfQuarter(this.value))},t.prototype.startOfYear=function(){return new t(a.startOfYear(this.value))},t.prototype.endOfDay=function(){return new t(a.endOfDay(this.value))},t.prototype.endOfWeek=function(e){return new t(a.endOfWeek(this.value,e))},t.prototype.endOfMonth=function(){return new t(a.endOfMonth(this.value))},t.prototype.endOfQuarter=function(){return new t(a.endOfQuarter(this.value))},t.prototype.endOfYear=function(){return new t(a.endOfYear(this.value))},t.prototype.getUnixTime=function(){return a.getUnixTime(this.value)},t.prototype.format=function(t,e){return a.format(this.value,t,e)},t.prototype.isWeekend=function(){return a.isWeekend(this.value)},t.prototype.isToday=function(){return a.isToday(this.value)},t}();(m=t.GanttViewType||(t.GanttViewType={})).day="day",m.quarter="quarter",m.month="month",m.year="year",m.week="week",(y=t.GanttItemType||(t.GanttItemType={})).bar="bar",y.range="range",y.custom="custom";var E=function(){function e(n,r){var a=this;this.refs$=new i.BehaviorSubject(null),this.origin=n,this.id=this.origin.id,this.links=this.origin.links||[],this.color=this.origin.color,this.barStyle=this.origin.barStyle,this.linkable=void 0===this.origin.linkable||this.origin.linkable,this.draggable=void 0===this.origin.draggable||this.origin.draggable,this.expandable=this.origin.expandable||(this.origin.children||[]).length>0,this.expanded=void 0!==this.origin.expanded&&this.origin.expanded,this.start=n.start?new O(n.start):null,this.end=n.end?new O(n.end):null,this.viewType=r&&r.viewType?r.viewType:t.GanttViewType.month,this.children=(n.children||[]).map((function(t){return new e(t,{viewType:a.viewType})})),this.type=this.origin.type||t.GanttItemType.bar,this.progress=this.origin.progress,this.fillItemStartOrEnd(n)}return Object.defineProperty(e.prototype,"refs",{get:function(){return this.refs$.getValue()},enumerable:!1,configurable:!0}),e.prototype.fillItemStartOrEnd=function(e){var n;switch(this.viewType){case t.GanttViewType.day:case t.GanttViewType.week:n=0;break;default:n=30}e.start&&!e.end&&(this.end=new O(e.start).addDays(n).endOfDay()),!e.start&&e.end&&(this.start=new O(e.end).addDays(-n).startOfDay())},e.prototype.updateRefs=function(t){this.refs$.next(t)},e.prototype.updateDate=function(t,e){this.start=t.startOfDay(),this.end=e.endOfDay(),this.origin.start=this.start.getUnixTime(),this.origin.end=this.end.getUnixTime()},e.prototype.addChildren=function(t){var n=this;this.origin.children=t,this.children=(t||[]).map((function(t){return new e(t,{viewType:n.viewType})}))},e.prototype.setExpand=function(t){this.expanded=t,this.origin.expanded=t},e.prototype.addLink=function(t){this.links=f(this.links,[t]),this.origin.links=this.links},e}(),I=function(){function t(t){this.refs={},this.id=t.id,this.origin=t,this.title=t.title,this.expanded=void 0===t.expanded||t.expanded,this.items=[],this.mergedItems=[[]],this.class=t.class||""}return t.prototype.setExpand=function(t){this.expanded=t,this.origin.expanded=t},t}(),T=18,S={min:(new O).addYears(-1).startOfYear(),max:(new O).addYears(1).endOfYear()},P=function(){function t(t,e,n){this.showTimeline=!0,this.options=Object.assign({},S,n);var r=t.isCustom?this.startOf(t.date):this.startOf(t.date.value<this.options.start.value?t.date:this.options.start),a=e.isCustom?this.endOf(e.date):this.endOf(e.date.value>this.options.end.value?e.date:this.options.end);this.start$=new i.BehaviorSubject(r),this.end$=new i.BehaviorSubject(a),this.initialize()}return Object.defineProperty(t.prototype,"start",{get:function(){return this.start$.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this.end$.getValue()},enumerable:!1,configurable:!0}),t.prototype.getDateIntervalWidth=function(t,e){for(var n=0,r=a.differenceInDays(e.value,t.value),i=0;i<Math.abs(r);i++)n+=this.getDayOccupancyWidth(t.addDays(i));return n=r>=0?n:-n,Number(n.toFixed(3))},t.prototype.initialize=function(){this.primaryDatePoints=this.getPrimaryDatePoints(),this.secondaryDatePoints=this.getSecondaryDatePoints(),this.width=this.getWidth(),this.cellWidth=this.getCellWidth(),this.primaryWidth=this.getPrimaryWidth()},t.prototype.addStartDate=function(){var t=this.startOf(this.start.add(-1*this.options.addAmount,this.options.addUnit));if(t.value>=this.options.min.value){var e=this.start;return this.start$.next(t),this.initialize(),{start:this.start,end:e}}return null},t.prototype.addEndDate=function(){var t=this.endOf(this.end.add(this.options.addAmount,this.options.addUnit));if(t.value<=this.options.max.value){var e=this.end;return this.end$.next(t),this.initialize(),{start:e,end:this.end}}return null},t.prototype.updateDate=function(t,e){t=this.startOf(t),e=this.endOf(e),t.value<this.start.value&&this.start$.next(t),e.value>this.end.value&&this.end$.next(e),this.initialize()},t.prototype.getWidth=function(){return this.getCellWidth()*this.secondaryDatePoints.length},t.prototype.getCellWidth=function(){return this.options.cellWidth},t.prototype.getTodayXPoint=function(){var t=(new O).startOfDay();return t.value>this.start.value&&t.value<this.end.value?this.getXPointByDate(t)+this.getDayOccupancyWidth(t)/2:null},t.prototype.getXPointByDate=function(t){return this.getDateIntervalWidth(this.start,t)},t.prototype.getDateByXPoint=function(t){var e=Math.floor(t/this.getCellWidth()),n=this.secondaryDatePoints[e],r=this.getDayOccupancyWidth(null==n?void 0:n.start);if(r===this.getCellWidth())return null==n?void 0:n.start;var i=Math.floor(t%this.getCellWidth()/r)+1;return this.getCellWidth()/r==7?null==n?void 0:n.start.addDays(i):null==n?void 0:n.start.setDate(i)},t.prototype.getDateRangeWidth=function(t,e){return this.getDateIntervalWidth(t,e.addSeconds(1))},t}(),W={start:(new O).startOfQuarter().addQuarters(-1),end:(new O).endOfQuarter().addQuarters(2),cellWidth:280,addAmount:1,addUnit:"quarter"},L=function(t){function e(e,n,r){return t.call(this,e,n,Object.assign({},W,r))||this}return c(e,t),e.prototype.startOf=function(t){return t.startOfQuarter()},e.prototype.endOf=function(t){return t.endOfQuarter()},e.prototype.getPrimaryWidth=function(){return 3*this.getCellWidth()},e.prototype.getDayOccupancyWidth=function(t){return this.cellWidth/t.getDaysInMonth()},e.prototype.getPrimaryDatePoints=function(){for(var t=a.differenceInCalendarQuarters(this.end.addSeconds(1).value,this.start.value),e=[],n=0;n<t;n++){var r=this.start.addQuarters(n),i=new v(r,r.format("yyyy年QQQ"),3*this.getCellWidth()/2+n*(3*this.getCellWidth()),T);e.push(i)}return e},e.prototype.getSecondaryDatePoints=function(){for(var t=a.eachMonthOfInterval({start:this.start.value,end:this.end.value}),e=[],n=0;n<t.length;n++){var r=new O(t[n]),i=new v(r,r.getMonth()+1+"月",n*this.getCellWidth()+this.getCellWidth()/2,36);e.push(i)}return e},e}(P),R={start:(new O).addYears(-1).startOfYear(),end:(new O).addYears(1).endOfYear(),min:(new O).addYears(-2).startOfYear(),max:(new O).addYears(2).endOfYear(),cellWidth:500,addAmount:1,addUnit:"year"},B=function(t){function e(e,n,r){return t.call(this,e,n,Object.assign({},R,r))||this}return c(e,t),e.prototype.startOf=function(t){return t.startOfYear()},e.prototype.endOf=function(t){return t.endOfYear()},e.prototype.getPrimaryWidth=function(){return 4*this.getCellWidth()},e.prototype.getDayOccupancyWidth=function(t){return this.cellWidth/t.getDaysInQuarter()},e.prototype.getPrimaryDatePoints=function(){for(var t=a.eachYearOfInterval({start:this.start.value,end:this.end.value}),e=[],n=0;n<t.length;n++){var r=new O(t[n]),i=new v(r,r.format("yyyy")+"年",4*this.getCellWidth()/2+n*(4*this.getCellWidth()),T);e.push(i)}return e},e.prototype.getSecondaryDatePoints=function(){for(var t=a.differenceInCalendarQuarters(this.end.value,this.start.value),e=[],n=0;n<=t;n++){var r=this.start.addQuarters(n),i=new v(r,r.format("QQQ"),n*this.getCellWidth()+this.getCellWidth()/2,36);e.push(i)}return e},e}(P),M={cellWidth:35,start:(new O).startOfYear().startOfWeek({weekStartsOn:1}),end:(new O).endOfYear().endOfWeek({weekStartsOn:1}),addAmount:1,addUnit:"month"},U=function(t){function e(e,n,r){var i=t.call(this,e,n,Object.assign({},M,r))||this;return i.showWeekBackdrop=!0,i.showTimeline=!1,i}return c(e,t),e.prototype.startOf=function(t){return t.startOfWeek({weekStartsOn:1})},e.prototype.endOf=function(t){return t.endOfWeek({weekStartsOn:1})},e.prototype.getPrimaryWidth=function(){return 7*this.getCellWidth()},e.prototype.getDayOccupancyWidth=function(){return this.cellWidth},e.prototype.getPrimaryDatePoints=function(){for(var t=a.eachWeekOfInterval({start:this.start.value,end:this.end.addSeconds(1).value},{weekStartsOn:1}),e=[],n=0;n<t.length;n++){var r=new O(t[n]),i=r.getDaysInMonth()-r.getDate()>=3?0:1,s=new v(r,r.addWeeks(i).format("yyyy年MM月"),7*this.getCellWidth()/2+n*(7*this.getCellWidth()),T);e.push(s)}return e},e.prototype.getSecondaryDatePoints=function(){for(var t=a.eachDayOfInterval({start:this.start.value,end:this.end.value}),e=[],n=0;n<t.length;n++){var r=new O(t[n]),i=new v(r,r.getDate().toString(),n*this.getCellWidth()+this.getCellWidth()/2,36,{isWeekend:r.isWeekend(),isToday:r.isToday()});e.push(i)}return e},e}(P),j={cellWidth:280,start:(new O).startOfYear().startOfWeek({weekStartsOn:1}),end:(new O).endOfYear().endOfWeek({weekStartsOn:1}),addAmount:1,addUnit:"month"},H=function(t){function e(e,n,r){return t.call(this,e,n,Object.assign({},j,r))||this}return c(e,t),e.prototype.startOf=function(t){return t.startOfWeek({weekStartsOn:1})},e.prototype.endOf=function(t){return t.endOfWeek({weekStartsOn:1})},e.prototype.getPrimaryWidth=function(){return this.getCellWidth()},e.prototype.getDayOccupancyWidth=function(){return this.cellWidth/7},e.prototype.getPrimaryDatePoints=function(){for(var t=a.eachWeekOfInterval({start:this.start.value,end:this.end.addSeconds(1).value},{weekStartsOn:1}),e=[],n=0;n<t.length;n++){var r=new O(t[n]),i=r.getDaysInMonth()-r.getDate()>=3?0:1,s=new v(r,r.addWeeks(i).format("yyyy年"),this.getCellWidth()/2+n*this.getCellWidth(),T);e.push(s)}return e},e.prototype.getSecondaryDatePoints=function(){for(var t=a.eachWeekOfInterval({start:this.start.value,end:this.end.value}),e=[],n=0;n<t.length;n++){var r=new O(t[n]),i=new v(r,"第"+r.format("w")+"周",n*this.getCellWidth()+this.getCellWidth()/2,36);e.push(i)}return e},e}(P),G={cellWidth:480,start:(new O).addYears(-1).startOfYear(),end:(new O).addYears(1).endOfYear(),addAmount:1,addUnit:"year"},$=function(t){function e(e,n,r){return t.call(this,e,n,Object.assign({},G,r))||this}return c(e,t),e.prototype.startOf=function(t){return t.startOfYear()},e.prototype.endOf=function(t){return t.endOfYear()},e.prototype.getPrimaryWidth=function(){return this.getCellWidth()},e.prototype.getDayOccupancyWidth=function(t){return this.cellWidth/t.getDaysInYear()},e.prototype.getPrimaryDatePoints=function(){for(var t=a.eachYearOfInterval({start:this.start.value,end:this.end.value}),e=[],n=0;n<t.length;n++){var r=new O(t[n]),i=new v(r,"",this.getCellWidth()/2+n*this.getCellWidth(),T);e.push(i)}return e},e.prototype.getSecondaryDatePoints=function(){for(var t=a.differenceInCalendarYears(this.end.value,this.start.value),e=[],n=0;n<=t;n++){var r=this.start.addYears(n),i=new v(r,r.format("yyyy")+"年",n*this.getCellWidth()+this.getCellWidth()/2,27);e.push(i)}return e},e}(P);var Y={lineHeight:44,barHeight:22};function V(t){return"number"==typeof t}function A(t,e){return void 0===e&&(e=1),/^#/g.test(t)?"rgba("+parseInt(t.slice(1,3),16)+","+parseInt(t.slice(3,5),16)+","+parseInt(t.slice(5,7),16)+","+e+")":t}function N(t){return t.reduce((function(t,e){return t.concat(Array.isArray(e)?N(e):e)}),[])}function F(t){var e=[];return(t||[]).forEach((function(t){e.push(t),t.expanded&&t.children&&e.push.apply(e,f(F(t.children)))})),e}var Q=function(){function n(n,r,a){this.elementRef=n,this.cdr=r,this.ngZone=a,this.originItems=[],this.originGroups=[],this.viewType=t.GanttViewType.month,this.showTodayLine=!0,this.loadOnScroll=new e.EventEmitter,this.dragStarted=new e.EventEmitter,this.dragEnded=new e.EventEmitter,this.barClick=new e.EventEmitter,this.linkDragEnded=new e.EventEmitter,this.items=[],this.groups=[],this.viewChange=new e.EventEmitter,this.expandChange=new e.EventEmitter,this.firstChange=!0,this.unsubscribe$=new i.Subject,this.expandedItemIds=[],this.ganttClass=!0}return Object.defineProperty(n.prototype,"element",{get:function(){return this.elementRef.nativeElement},enumerable:!1,configurable:!0}),n.prototype.createView=function(){var e=this.getViewDate();this.view=function(e,n,r,i){switch(e){case t.GanttViewType.month:return new L(n,r,i);case t.GanttViewType.week:return new H(n,r,i);case t.GanttViewType.quarter:return new B(n,r,i);case t.GanttViewType.day:return new U(n,r,i);case t.GanttViewType.year:return new $(n,r,i);default:throw new Error("gantt view type invalid")}}(this.viewType,e.start,e.end,this.viewOptions)},n.prototype.setupGroups=function(){var t=this,e=this.groups.filter((function(t){return!1===t.expanded})).map((function(t){return t.id}));this.groupsMap={},this.groups=[],this.originGroups.forEach((function(n){var r=new I(n);r.expanded=!e.includes(r.id),t.groupsMap[r.id]=r,t.groups.push(r)}))},n.prototype.setupItems=function(){var t,e,n,r,i=this;this.items=[],this.originItems=(t=this.originItems,e="id",n={},r=[],(t||[]).forEach((function(t){var i=t[e];n[i]||(n[i]=t,r.push(t))})),r),this.originItems.forEach((function(t){i.firstChange||(t.expanded=t.expanded||i.expandedItemIds.includes(t.id))})),this.groups.length>0?this.originItems.forEach((function(t){var e=i.groupsMap[t.group_id];if(e){var n=new E(t,{viewType:i.viewType});e.items.push(n)}})):this.originItems.forEach((function(t){var e=new E(t,{viewType:i.viewType});i.items.push(e)}))},n.prototype.setupExpandedState=function(){var t=this,e=[];e=this.items.length>0?F(this.items):N(this.groups.map((function(t){return F(t.items)}))),this.expandedItemIds=[],e.forEach((function(e){e.origin.expanded&&t.expandedItemIds.push(e.id)}))},n.prototype.getViewDate=function(){var t=this,e=this.start,n=this.end;return this.start&&this.end||this.originItems.forEach((function(r){r.start&&!t.start&&(e=e?Math.min(e,r.start):r.start),r.end&&!t.end&&(n=n?Math.max(n,r.end):r.end)})),{start:{date:new O(e),isCustom:!!this.start},end:{date:new O(n),isCustom:!!this.end}}},n.prototype.computeRefs=function(){var t=this;this.groups.forEach((function(e){var n=F(e.items);t.computeItemsRefs.apply(t,f(n))}));var e=F(this.items);this.computeItemsRefs.apply(this,f(e))},n.prototype.expandGroups=function(t){this.groups.forEach((function(e){e.setExpand(t)})),this.expandChange.next(),this.cdr.detectChanges()},n.prototype.onInit=function(){var t=this;this.styles=Object.assign({},Y,this.styles),this.createView(),this.setupGroups(),this.setupItems(),this.computeRefs(),this.firstChange=!1,this.ngZone.onStable.pipe(r.take(1)).subscribe((function(){t.element.style.opacity="1",t.dragContainer.dragStarted.subscribe((function(e){t.dragStarted.emit(e)})),t.dragContainer.dragEnded.subscribe((function(e){t.dragEnded.emit(e),t.computeRefs(),t.detectChanges()}))})),this.view.start$.pipe(r.skip(1),r.takeUntil(this.unsubscribe$)).subscribe((function(){t.computeRefs()}))},n.prototype.onChanges=function(t){this.firstChange||(t.viewType&&t.viewType.currentValue&&(this.createView(),this.setupGroups(),this.setupItems(),this.computeRefs(),this.viewChange.emit(this.view)),(t.originItems||t.originGroups)&&(this.setupExpandedState(),this.setupGroups(),this.setupItems(),this.computeRefs()))},n.prototype.onDestroy=function(){this.unsubscribe$.next(),this.unsubscribe$.complete()},n.prototype.computeItemsRefs=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach((function(e){e.updateRefs({width:e.start&&e.end?t.view.getDateRangeWidth(e.start.startOfDay(),e.end.endOfDay()):0,x:e.start?t.view.getXPointByDate(e.start):0,y:(t.styles.lineHeight-t.styles.barHeight)/2-1})}))},n.prototype.trackBy=function(t,e){return t.id||e},n.prototype.detectChanges=function(){this.cdr.detectChanges()},n.prototype.expandGroup=function(t){t.setExpand(!t.expanded),this.expandChange.emit(),this.cdr.detectChanges()},n.prototype.expandAll=function(){this.expandGroups(!0)},n.prototype.collapseAll=function(){this.expandGroups(!1)},n}();Q.decorators=[{type:e.Directive}],Q.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef},{type:e.NgZone}]},Q.propDecorators={originItems:[{type:e.Input,args:["items"]}],originGroups:[{type:e.Input,args:["groups"]}],viewType:[{type:e.Input}],start:[{type:e.Input}],end:[{type:e.Input}],showTodayLine:[{type:e.Input}],draggable:[{type:e.Input}],styles:[{type:e.Input}],viewOptions:[{type:e.Input}],disabledLoadOnScroll:[{type:e.Input}],loadOnScroll:[{type:e.Output}],dragStarted:[{type:e.Output}],dragEnded:[{type:e.Output}],barClick:[{type:e.Output}],barTemplate:[{type:e.ContentChild,args:["bar",{static:!0}]}],rangeTemplate:[{type:e.ContentChild,args:["range",{static:!0}]}],itemTemplate:[{type:e.ContentChild,args:["item",{static:!0}]}],groupTemplate:[{type:e.ContentChild,args:["group",{static:!0}]}],groupHeaderTemplate:[{type:e.ContentChild,args:["groupHeader",{static:!0}]}],ganttClass:[{type:e.HostBinding,args:["class.gantt"]}]};var q=new e.InjectionToken("GANTT_UPPER_TOKEN"),z=function(){function t(t){this.ganttUpper=t}return Object.defineProperty(t.prototype,"width",{set:function(t){this.columnWidth=s.coerceCssPixelValue(t)},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){},t}();z.decorators=[{type:e.Component,args:[{selector:"ngx-gantt-column",template:""}]}],z.ctorParameters=function(){return[{type:Q,decorators:[{type:e.Inject,args:[q]}]}]},z.propDecorators={width:[{type:e.Input}],name:[{type:e.Input}],templateRef:[{type:e.ContentChild,args:["cell",{static:!0}]}],headerTemplateRef:[{type:e.ContentChild,args:["header",{static:!0}]}]};var X=function(){function t(){this.columnChanges=new e.EventEmitter}return t.prototype.ngOnInit=function(){},t}();X.decorators=[{type:e.Component,args:[{selector:"ngx-gantt-table",template:""}]}],X.ctorParameters=function(){return[]},X.propDecorators={columnChanges:[{type:e.Output}]};var Z=function(t){function n(n,r,a){var s=t.call(this,n,r,a)||this;return s.maxLevel=2,s.linkDragStarted=new e.EventEmitter,s.linkDragEnded=new e.EventEmitter,s.lineClick=new e.EventEmitter,s.ngUnsubscribe$=new i.Subject,s.sideTableWidth=400,s}return c(n,t),n.prototype.ngOnInit=function(){var e=this;t.prototype.onInit.call(this),this.ngZone.onStable.pipe(r.take(1)).subscribe((function(){e.dragContainer.linkDragStarted.pipe(r.takeUntil(e.ngUnsubscribe$)).subscribe((function(t){e.linkDragStarted.emit(t)})),e.dragContainer.linkDragEnded.pipe(r.takeUntil(e.ngUnsubscribe$)).subscribe((function(t){e.linkDragEnded.emit(t)}))}))},n.prototype.ngAfterViewInit=function(){var t=this;this.columns.changes.pipe(r.startWith(!0),r.takeUntil(this.ngUnsubscribe$)).subscribe((function(){t.columns.forEach((function(t){t.columnWidth||(t.columnWidth=s.coerceCssPixelValue(100))})),t.cdr.detectChanges()}))},n.prototype.ngOnChanges=function(e){t.prototype.onChanges.call(this,e)},n.prototype.expandChildren=function(t){var e=this;t.expanded?(t.setExpand(!1),this.expandChange.emit()):(t.setExpand(!0),this.async&&this.childrenResolve&&0===t.children.length?(t.loading=!0,this.childrenResolve(t.origin).pipe(r.take(1),r.finalize((function(){t.loading=!1,e.expandChange.emit(),e.cdr.detectChanges()}))).subscribe((function(n){t.addChildren(n),e.computeItemsRefs.apply(e,f(t.children))}))):(this.computeItemsRefs.apply(this,f(t.children)),this.expandChange.emit()))},n.prototype.ngOnDestroy=function(){t.prototype.onDestroy.call(this)},n}(Q);Z.decorators=[{type:e.Component,args:[{selector:"ngx-gantt",template:'<ngx-gantt-root>\n <ng-template #sideTemplate>\n <gantt-table [groups]="groups" [items]="items" [columns]="columns" [groupTemplate]="groupTemplate" [emptyTemplate]="tableEmptyTemplate"></gantt-table>\n </ng-template>\n <ng-template #mainTemplate>\n <gantt-main\n [groups]="groups"\n [items]="items"\n [groupHeaderTemplate]="groupHeaderTemplate"\n [itemTemplate]="itemTemplate"\n [barTemplate]="barTemplate"\n [rangeTemplate]="rangeTemplate"\n (barClick)="barClick.emit($event)"\n (lineClick)="lineClick.emit($event)"\n >\n </gantt-main>\n </ng-template>\n</ngx-gantt-root>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,providers:[{provide:q,useExisting:Z}]}]}],Z.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef},{type:e.NgZone}]},Z.propDecorators={maxLevel:[{type:e.Input}],async:[{type:e.Input}],childrenResolve:[{type:e.Input}],linkable:[{type:e.Input}],linkDragStarted:[{type:e.Output}],linkDragEnded:[{type:e.Output}],lineClick:[{type:e.Output}],table:[{type:e.ContentChild,args:[X]}],columns:[{type:e.ContentChildren,args:[z,{descendants:!0}]}],tableEmptyTemplate:[{type:e.ContentChild,args:["tableEmpty",{static:!0}]}]};var _=function(){function e(e,n,r){this.ganttUpper=e,this.ngZone=n,this.elementRef=r,this.unsubscribe$=new i.Subject,this.headerHeight=44,this.mainHeight=5e3,this.todayHeight=24,this.todayWidth=35,this.todayBorderRadius=4,this.viewTypes=t.GanttViewType,this.className=!0}return Object.defineProperty(e.prototype,"view",{get:function(){return this.ganttUpper.view},enumerable:!1,configurable:!0}),e.prototype.setTodayPoint=function(){var t=this.view.getTodayXPoint(),e=(new O).getDate(),n=this.elementRef.nativeElement.getElementsByClassName("gantt-calendar-today-overlay")[0],r=this.elementRef.nativeElement.getElementsByClassName("today-rect")[0],i=this.elementRef.nativeElement.getElementsByClassName("today-line")[0];V(t)?(r&&(r.style.left=t-17.5+"px",r.style.top="20px",r.innerHTML=e.toString()),i&&(i.style.left=t+"px",i.style.top="44px",i.style.bottom="-5000px")):n.style.display="none"},e.prototype.ngOnInit=function(){var t=this;this.ngZone.onStable.pipe(r.take(1)).subscribe((function(){i.merge(t.ganttUpper.viewChange,t.ganttUpper.view.start$).pipe(r.takeUntil(t.unsubscribe$)).subscribe((function(){t.setTodayPoint()}))}))},e.prototype.ngAfterViewInit=function(){},e.prototype.ngOnChanges=function(t){},e.prototype.trackBy=function(t,e){return t.text||e},e.prototype.ngOnDestroy=function(){this.unsubscribe$.next(),this.unsubscribe$.complete()},e}();_.decorators=[{type:e.Component,args:[{selector:"gantt-calendar-overlay",template:'<div class="gantt-calendar-today-overlay" [style.width.px]="view.width">\n <span class="today-rect" [hidden]="ganttUpper.viewType !== viewTypes.day"> </span>\n <span class="today-line" *ngIf="ganttUpper.showTodayLine"> </span>\n</div>\n\n<svg class="gantt-calendar-overlay-main" [attr.width]="view.width" [attr.height]="headerHeight">\n <g>\n <text class="primary-text" *ngFor="let point of view.primaryDatePoints; trackBy: trackBy" [attr.x]="point.x" [attr.y]="point.y">\n {{ point.text }}\n </text>\n <ng-container *ngFor="let point of view.secondaryDatePoints; trackBy: trackBy">\n <text class="secondary-text" [class.secondary-text-weekend]="point.additions?.isWeekend" [attr.x]="point.x" [attr.y]="point.y">\n {{ point.text }}\n </text>\n </ng-container>\n\n <g>\n <line\n *ngFor="let point of view.primaryDatePoints; let i = index; trackBy: trackBy"\n [attr.x1]="(i + 1) * view.primaryWidth"\n [attr.x2]="(i + 1) * view.primaryWidth"\n [attr.y1]="0"\n [attr.y2]="mainHeight"\n class="primary-line"\n ></line>\n </g>\n\n <g>\n <line [attr.x1]="0" [attr.x2]="view.width" [attr.y1]="headerHeight" [attr.y2]="headerHeight" class="header-line"></line>\n </g>\n </g>\n <g>\n <g *ngIf="view.showTimeline">\n <line\n *ngFor="let point of view.secondaryDatePoints; let i = index; trackBy: trackBy"\n [attr.x1]="(i + 1) * view.cellWidth"\n [attr.x2]="(i + 1) * view.cellWidth"\n [attr.y1]="headerHeight"\n [attr.y2]="mainHeight"\n class="secondary-line"\n ></line>\n <line\n *ngFor="let point of view.primaryDatePoints; let i = index; trackBy: trackBy"\n [attr.x1]="(i + 1) * view.primaryWidth"\n [attr.x2]="(i + 1) * view.primaryWidth"\n [attr.y1]="0"\n [attr.y2]="mainHeight"\n class="primary-line"\n ></line>\n </g>\n </g>\n</svg>\n'}]}],_.ctorParameters=function(){return[{type:Q,decorators:[{type:e.Inject,args:[q]}]},{type:e.NgZone},{type:e.ElementRef}]},_.propDecorators={className:[{type:e.HostBinding,args:["class.gantt-calendar-overlay"]}]};var K=function(){function t(t,e){this.gantt=t,this.elementRef=e,this.ganttTableClass=!0,this.ganttTableEmptyClass=!1}return Object.defineProperty(t.prototype,"columns",{set:function(t){t.forEach((function(t){t.columnWidth||(t.columnWidth=s.coerceCssPixelValue(100))})),this.columnList=t},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.ngOnChanges=function(t){var e,n;(null===(e=t.groups.currentValue)||void 0===e?void 0:e.length)||(null===(n=t.items.currentValue)||void 0===n?void 0:n.length)?this.ganttTableEmptyClass=!1:this.ganttTableEmptyClass=!0},t.prototype.dragFixed=function(t){t.movedWidth<t.minWidth&&(t.target.style.transform="translate3d("+(t.minWidth-t.originWidth)+"px, 0, 0)")},t.prototype.expandGroup=function(t){this.gantt.expandGroup(t)},t.prototype.expandChildren=function(t){this.gantt.expandChildren(t)},t.prototype.dragStarted=function(t){var e=t.source.element.nativeElement;this.dragStartLeft=e.getBoundingClientRect().left},t.prototype.dragMoved=function(t,e){var n,r,i,a=t.source.element.nativeElement,s=a.getBoundingClientRect().left;e?(r=(n=parseInt(e.columnWidth,10))+(s-this.dragStartLeft),i=80):(r=(n=this.elementRef.nativeElement.getBoundingClientRect().width)+(s-this.dragStartLeft),i=80*this.columnList.length),this.dragFixed({target:a,originWidth:n,movedWidth:r,minWidth:i}),this.showAuxiliaryLine(t)},t.prototype.columnDragEnded=function(t,e){var n=t.source.element.nativeElement.getBoundingClientRect().left,r=parseInt(e.columnWidth,10)+(n-this.dragStartLeft),i=Math.max(r||0,80);e.columnWidth=s.coerceCssPixelValue(i),this.gantt.table&&this.gantt.table.columnChanges.emit({columns:this.columnList}),this.hideAuxiliaryLine(),t.source.reset()},t.prototype.tableDragEnded=function(t){var e=t.source.element.nativeElement.getBoundingClientRect().left,n=this.elementRef.nativeElement.getBoundingClientRect().width,r=e-this.dragStartLeft;this.columnList.forEach((function(t){var e=parseInt(t.columnWidth,10),i=parseInt(String(r*(e/n)),10),a=Math.max(e+i||0,80);t.columnWidth=s.coerceCssPixelValue(a)})),this.gantt.table&&this.gantt.table.columnChanges.emit({columns:this.columnList}),this.hideAuxiliaryLine(),t.source.reset()},t.prototype.showAuxiliaryLine=function(t){var e=this.elementRef.nativeElement.getBoundingClientRect(),n=t.source.element.nativeElement.getBoundingClientRect(),r=n.left-e.left;n.top,e.top;this.draglineElementRef.nativeElement.style.left=r+"px",this.draglineElementRef.nativeElement.style.display="block"},t.prototype.hideAuxiliaryLine=function(){this.draglineElementRef.nativeElement.style.display="none"},t}();K.decorators=[{type:e.Component,args:[{selector:"gantt-table",template:'<div class="gantt-table-header gantt-table-row">\n <div class="gantt-table-column" *ngFor="let column of columnList; let i = index" [style.width]="column.columnWidth">\n <ng-container *ngIf="column.headerTemplateRef; else default" [ngTemplateOutlet]="column.headerTemplateRef"></ng-container>\n <ng-template #default>\n {{ column.name }}\n </ng-template>\n <div\n class="gantt-table-drag-trigger"\n cdkDrag\n cdkDragLockAxis="x"\n cdkDragBoundary=".gantt"\n (cdkDragMoved)="dragMoved($event, column)"\n (cdkDragStarted)="dragStarted($event)"\n (cdkDragEnded)="columnDragEnded($event, column)"\n ></div>\n </div>\n</div>\n<div class="gantt-table-body">\n <ng-container *ngIf="!groups.length && !items.length">\n <ng-container *ngIf="!emptyTemplate">\n <gantt-icon class="empty-icon" iconName="empty"></gantt-icon>\n <div class="empty-text">没有数据</div>\n </ng-container>\n <ng-template [ngTemplateOutlet]="emptyTemplate"></ng-template>\n </ng-container>\n\n <ng-container *ngIf="groups && groups.length > 0; else itemsTemplate">\n <ng-container *ngFor="let group of groups">\n <div class="gantt-table-group" [ngClass]="group.class">\n <div class="gantt-table-group-title" [class.expanded]="group.expanded" (click)="expandGroup(group)">\n <gantt-icon class="expand-icon" [iconName]="group.expanded ? \'angle-down\' : \'angle-right\'"></gantt-icon>\n <ng-container *ngIf="groupTemplate; else default">\n <ng-template\n [ngTemplateOutlet]="groupTemplate"\n [ngTemplateOutletContext]="{ $implicit: group.origin, group: group.origin }"\n ></ng-template>\n </ng-container>\n <ng-template #default>\n <span class="group-title">{{ group.title }}</span>\n </ng-template>\n </div>\n </div>\n\n <ng-container *ngIf="group.expanded">\n <ng-template\n [ngTemplateOutlet]="ganttItems"\n [ngTemplateOutletContext]="{ group: group, items: group.items, level: 0 }"\n ></ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n</div>\n\n<div\n class="gantt-table-drag-trigger"\n cdkDrag\n cdkDragLockAxis="x"\n cdkDragBoundary=".gantt"\n (cdkDragMoved)="dragMoved($event)"\n (cdkDragStarted)="dragStarted($event)"\n (cdkDragEnded)="tableDragEnded($event)"\n></div>\n\n<div #dragLine class="gantt-table-drag-auxiliary-line"></div>\n\n<ng-template #itemsTemplate>\n <ng-template [ngTemplateOutlet]="ganttItems" [ngTemplateOutletContext]="{ items: items, level: 0 }"></ng-template>\n</ng-template>\n\n<ng-template #ganttItems let-group="group" let-items="items" let-level="level">\n <ng-container *ngFor="let item of items">\n <div\n class="gantt-table-item gantt-table-row"\n [class.gantt-table-item-first-level-group]="level === 0 && (item.type | isGanttRangeItem)"\n [class.gantt-table-item-with-group]="group"\n [style.height.px]="gantt.styles.lineHeight"\n [style.lineHeight.px]="gantt.styles.lineHeight"\n >\n <div class="gantt-table-column" *ngFor="let column of columnList; let first = first" [style.width]="column.columnWidth">\n <div *ngIf="first" class="gantt-expand-icon" [style.marginLeft.px]="level * 20">\n <ng-container *ngIf="level < gantt.maxLevel - 1 && item.expandable">\n <gantt-icon\n *ngIf="!item.loading"\n class="expand-icon"\n [iconName]="item.expanded ? \'angle-down\' : \'angle-right\'"\n (click)="expandChildren(item)"\n ></gantt-icon>\n <gantt-icon *ngIf="item.loading" [iconName]="\'loading\'"></gantt-icon>\n </ng-container>\n </div>\n <div class="gantt-table-column-content">\n <ng-template\n [ngTemplateOutlet]="column.templateRef"\n [ngTemplateOutletContext]="{ $implicit: item.origin, item: item.origin }"\n ></ng-template>\n </div>\n </div>\n </div>\n <ng-template\n *ngIf="item.children && item.expanded"\n [ngTemplateOutlet]="ganttItems"\n [ngTemplateOutletContext]="{ items: item.children, level: level + 1, group: group }"\n ></ng-template>\n </ng-container>\n</ng-template>\n'}]}],K.ctorParameters=function(){return[{type:Z},{type:e.ElementRef}]},K.propDecorators={groups:[{type:e.Input}],items:[{type:e.Input}],columns:[{type:e.Input}],groupTemplate:[{type:e.Input}],emptyTemplate:[{type:e.Input}],draglineElementRef:[{type:e.ViewChild,args:["dragLine",{static:!0}]}],ganttTableClass:[{type:e.HostBinding,args:["class.gantt-table"]}],ganttTableEmptyClass:[{type:e.HostBinding,args:["class.gantt-table-empty"]}]};var J;!function(t){t[t.NONE=0]="NONE",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT"}(J||(J={}));var tt=function(){function t(){this.unsubscribe$=new i.Subject}return t.prototype.monitorScrollChange=function(){var t=this;i.merge(i.fromEvent(this.mainContainer,"scroll"),i.fromEvent(this.sideContainer,"scroll")).pipe(r.takeUntil(this.unsubscribe$)).subscribe((function(e){t.syncScroll(e)})),i.fromEvent(this.mainContainer,"scroll").pipe(r.startWith(),r.takeUntil(this.unsubscribe$)).subscribe((function(t){}))},t.prototype.syncScroll=function(t){var e=t.currentTarget;this.calendarOverlay.scrollLeft=this.mainContainer.scrollLeft,this.sideContainer.scrollTop=e.scrollTop,this.mainContainer.scrollTop=e.scrollTop},t.prototype.disableBrowserWheelEvent=function(){var t=this.mainContainer;i.fromEvent(t,"wheel").pipe(r.takeUntil(this.unsubscribe$)).subscribe((function(e){var n=e.deltaX;n&&(t.scrollLeft+t.offsetWidth===t.scrollWidth&&n>0||0===t.scrollLeft&&n<0)&&e.preventDefault()}))},t.prototype.initialize=function(t){this.root=t.nativeElement,this.side=this.root.getElementsByClassName("gantt-side")[0],this.container=this.root.getElementsByClassName("gantt-container")[0],this.sideContainer=this.root.getElementsByClassName("gantt-side-container")[0],this.mainContainer=this.root.getElementsByClassName("gantt-main-container")[0],this.calendarOverlay=this.root.getElementsByClassName("gantt-calendar-overlay")[0],this.monitorScrollChange(),this.disableBrowserWheelEvent()},t.prototype.getViewerScroll=function(){var t=this;return i.fromEvent(this.mainContainer,"scroll").pipe(r.map((function(){return t.mainContainer.scrollLeft})),r.pairwise(),r.map((function(e){var n=h(e,2),r=n[0],i=n[1],a={target:t.mainContainer,direction:J.NONE};return i-r<0&&t.mainContainer.scrollLeft<50&&t.mainContainer.scrollLeft>0&&(a.direction=J.LEFT),i-r>0&&t.mainContainer.scrollWidth-t.mainContainer.clientWidth-t.mainContainer.scrollLeft<50&&(a.direction=J.RIGHT),a})))},t.prototype.getResize=function(){return i.fromEvent(window,"resize").pipe(r.auditTime(150))},t.prototype.scrollMainContainer=function(t){if(V(t)){var e=t-this.mainContainer.clientWidth/2;this.mainContainer.scrollLeft=e>50?e:0,this.calendarOverlay.scrollLeft=this.mainContainer.scrollLeft}},t.prototype.ngOnDestroy=function(){this.unsubscribe$.next(),this.unsubscribe$.complete()},t}();tt.decorators=[{type:e.Injectable}],tt.ctorParameters=function(){return[]};var et=function(){function t(){this.dragStarted=new e.EventEmitter,this.dragEnded=new e.EventEmitter,this.linkDragStarted=new e.EventEmitter,this.linkDragEntered=new e.EventEmitter,this.linkDragEnded=new e.EventEmitter}return t.prototype.emitLinkDragStarted=function(t,e){this.linkDraggingId=e.id,this.linkDragFrom=t,this.linkDragSource="source"===this.linkDragFrom?e:null,this.linkDragTarget="target"===this.linkDragFrom?e:null,this.linkDragStarted.emit({source:this.linkDragSource&&this.linkDragSource.origin,target:this.linkDragTarget&&this.linkDragTarget.origin})},t.prototype.emitLinkDragEntered=function(t){"source"===this.linkDragFrom?this.linkDragTarget=t:this.linkDragSource=t,this.linkDragEntered.emit({source:this.linkDragSource.origin,target:this.linkDragTarget.origin})},t.prototype.emitLinkDragLeaved=function(){"source"===this.linkDragFrom?this.linkDragTarget=null:this.linkDragSource=null},t.prototype.emitLinkDragEnded=function(){this.linkDraggingId=null,this.linkDragSource&&this.linkDragTarget&&(this.linkDragSource.addLink(this.linkDragTarget.id),this.linkDragEnded.emit({source:this.linkDragSource.origin,target:this.linkDragTarget.origin})),this.linkDragSource=null,this.linkDragTarget=null},t}();et.decorators=[{type:e.Injectable}],et.ctorParameters=function(){return[]};var nt="gantt-bar-active",rt="gantt-bar-link-drop";function it(t,e){var n=document.createElementNS("http://www.w3.org/2000/svg",t);return n.classList.add(e),n}var at=function(){function t(t,e,n){this.dragDrop=t,this.dom=e,this.dragContainer=n,this.dragRefs=[],this.destroy$=new i.Subject}return Object.defineProperty(t.prototype,"dragDisabled",{get:function(){return!this.item.draggable||!this.ganttUpper.draggable},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"linkDragDisabled",{get:function(){return!this.item.linkable||!this.ganttUpper.linkable},enumerable:!1,configurable:!0}),t.prototype.createMouseEvents=function(){var t=this;i.fromEvent(this.barElement,"mouseenter").pipe(r.takeUntil(this.destroy$)).subscribe((function(){t.dragContainer.linkDraggingId&&t.dragContainer.linkDraggingId!==t.item.id?t.item.linkable&&(t.barElement.classList.add(rt),t.dragContainer.emitLinkDragEntered(t.item)):t.barElement.classList.add(nt)})),i.fromEvent(this.barElement,"mouseleave").pipe(r.takeUntil(this.destroy$)).subscribe((function(){t.dragContainer.linkDraggingId?t.dragContainer.emitLinkDragLeaved():t.barElement.classList.remove(nt),t.barElement.classList.remove(rt)}))},t.prototype.createBarDrag=function(){var t=this,e=this.dragDrop.createDrag(this.barElement);return e.lockAxis="x",e.started.subscribe((function(){t.setDraggingStyles(),t.dragContainer.dragStarted.emit({item:t.item.origin})})),e.moved.subscribe((function(e){var n=t.item.refs.x+e.distance.x,r=a.differenceInCalendarDays(t.item.end.value,t.item.start.value),i=t.ganttUpper.view.getDateByXPoint(n).addDays(r);t.openDragBackdrop(t.barElement,t.ganttUpper.view.getDateByXPoint(n),i)})),e.ended.subscribe((function(e){var n=a.differenceInCalendarDays(t.item.end.value,t.item.start.value),r=t.ganttUpper.view.getDateByXPoint(t.item.refs.x+e.distance.x),i=r.addDays(n);t.item.updateDate(r,i),t.clearDraggingStyles(),t.closeDragBackdrop(),e.source.reset(),t.dragContainer.dragEnded.emit({item:t.item.origin})})),this.barDragRef=e,e},t.prototype.createBarHandleDrags=function(){var t=this,e=[];return this.barElement.querySelectorAll(".drag-handles .handle").forEach((function(n,r){var i=0===r,a=t.dragDrop.createDrag(n);a.lockAxis="x",a.withBoundaryElement(t.dom.root),a.started.subscribe((function(){t.setDraggingStyles(),t.dragContainer.dragStarted.emit({item:t.item.origin})})),a.moved.subscribe((function(e){if(i){var n=t.item.refs.x+e.distance.x;(r=t.item.refs.width+-1*e.distance.x)>10&&(t.barElement.style.width=r+"px",t.barElement.style.left=n+"px",t.openDragBackdrop(t.barElement,t.ganttUpper.view.getDateByXPoint(n),t.ganttUpper.view.getDateByXPoint(n+r)))}else{var r;(r=t.item.refs.width+e.distance.x)>10&&(t.barElement.style.width=r+"px",t.openDragBackdrop(t.barElement,t.ganttUpper.view.getDateByXPoint(t.item.refs.x),t.ganttUpper.view.getDateByXPoint(t.item.refs.x+r)))}e.source.reset()})),a.ended.subscribe((function(e){i?t.item.refs.width+-1*e.distance.x>10?t.item.updateDate(t.ganttUpper.view.getDateByXPoint(t.item.refs.x+e.distance.x),t.item.end):t.item.updateDate(t.item.end.startOfDay(),t.item.end):t.item.refs.width+e.distance.x>10?t.item.updateDate(t.item.start,t.ganttUpper.view.getDateByXPoint(t.item.refs.x+t.item.refs.width+e.distance.x)):t.item.updateDate(t.item.start,t.item.start.endOfDay());t.clearDraggingStyles(),t.closeDragBackdrop(),t.dragContainer.dragEnded.emit({item:t.item.origin})})),e.push(a)})),e},t.prototype.createLinkHandleDrags=function(){var t=this,e=[];return this.barElement.querySelectorAll(".link-handles .handle").forEach((function(n,r){var i=0===r,a=t.dragDrop.createDrag(n);a.withBoundaryElement(t.dom.root),a.beforeStarted.subscribe((function(){n.style.pointerEvents="none",t.barDragRef&&(t.barDragRef.disabled=!0),t.createLinkDraggingLine(),t.dragContainer.emitLinkDragStarted(i?"target":"source",t.item)})),a.moved.subscribe((function(){var e=t.calcLinkLinePositions(n,i);t.linkDraggingLine.setAttribute("x1",e.x1.toString()),t.linkDraggingLine.setAttribute("y1",e.y1.toString()),t.linkDraggingLine.setAttribute("x2",e.x2.toString()),t.linkDraggingLine.setAttribute("y2",e.y2.toString())})),a.ended.subscribe((function(e){e.source.reset(),n.style.pointerEvents="",t.barDragRef&&(t.barDragRef.disabled=!1),t.barElement.classList.remove(nt),t.destroyLinkDraggingLine(),t.dragContainer.emitLinkDragEnded()})),e.push(a)})),e},t.prototype.openDragBackdrop=function(t,e,n){var r=this.dom.root.querySelector(".gantt-drag-mask"),i=this.dom.root.querySelector(".gantt-drag-backdrop"),a=this.dom.root.getBoundingClientRect(),s=t.getBoundingClientRect(),o=s.left-a.left-this.dom.side.clientWidth,l=s.right-s.left;r.style.left=o+"px",r.style.width=l+"px",r.querySelector(".start").innerHTML=e.format("MM-dd"),r.querySelector(".end").innerHTML=n.format("MM-dd"),r.style.display="block",i.style.display="block"},t.prototype.closeDragBackdrop=function(){var t=this.dom.root.querySelector(".gantt-drag-mask"),e=this.dom.root.querySelector(".gantt-drag-backdrop");t.style.display="none",e.style.display="none"},t.prototype.setDraggingStyles=function(){this.barElement.style.pointerEvents="none",this.barElement.classList.add("gantt-bar-draggable-drag")},t.prototype.clearDraggingStyles=function(){this.barElement.style.pointerEvents="",this.barElement.classList.remove("gantt-bar-draggable-drag")},t.prototype.calcLinkLinePositions=function(t,e){var n=this.dom.root.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.parentElement.parentElement.getBoundingClientRect();return{x1:i.left+(e?0:i.width)-n.left,y1:i.top+i.height/2-n.top,x2:r.left-n.left+r.width/2,y2:r.top-n.top+r.height/2}},t.prototype.createLinkDraggingLine=function(){if(!this.linkDraggingLine){var t=it("svg","gantt-link-drag-container"),e=it("line","link-dragging-line");t.appendChild(e),this.dom.root.appendChild(t),this.linkDraggingLine=e}},t.prototype.destroyLinkDraggingLine=function(){this.linkDraggingLine&&(this.linkDraggingLine.parentElement.remove(),this.linkDraggingLine=null)},t.prototype.createDrags=function(t,e,n){var r,i;if(this.item=e,this.barElement=t.nativeElement,this.ganttUpper=n,!(!e.draggable||this.dragDisabled&&this.linkDragDisabled)){if(this.createMouseEvents(),!this.dragDisabled){var a=this.createBarDrag(),s=this.createBarHandleDrags();(r=this.dragRefs).push.apply(r,f([a],s))}if(!this.linkDragDisabled){var o=this.createLinkHandleDrags();(i=this.dragRefs).push.apply(i,f(o))}}},t.prototype.ngOnDestroy=function(){this.closeDragBackdrop(),this.dragRefs.forEach((function(t){return t.dispose()})),this.destroy$.next(),this.destroy$.complete()},t}();at.decorators=[{type:e.Injectable}],at.ctorParameters=function(){return[{type:o.DragDrop},{type:tt},{type:et}]};var st=function(){function e(t,e){this.elementRef=t,this.ganttUpper=e,this.firstChange=!0,this.unsubscribe$=new i.Subject}return e.prototype.onInit=function(){var t=this;this.firstChange=!1,this.item.refs$.pipe(r.takeUntil(this.unsubscribe$)).subscribe((function(){t.setPositions()}))},e.prototype.onChanges=function(){this.firstChange||this.setPositions()},e.prototype.setPositions=function(){var e=this.elementRef.nativeElement;e.style.left=this.item.refs.x+"px",e.style.top=this.item.refs.y+"px",e.style.width=this.item.refs.width+"px",this.item.type===t.GanttItemType.bar?e.style.height=this.ganttUpper.styles.barHeight+"px":this.item.type===t.GanttItemType.range&&(e.style.height="17px")},e.prototype.onDestroy=function(){this.unsubscribe$.next(),this.unsubscribe$.complete()},e}();function ot(t,e,n){return"linear-gradient("+t+","+e+" 0%,"+n+" 40%)"}st.decorators=[{type:e.Directive}],st.ctorParameters=function(){return[{type:e.ElementRef},{type:Q,decorators:[{type:e.Inject,args:[q]}]}]},st.propDecorators={template:[{type:e.Input}],item:[{type:e.Input}]};var lt=function(t){function n(n,r,i,a){var s=t.call(this,i,a)||this;return s.dragContainer=n,s.drag=r,s.ganttUpper=a,s.barClick=new e.EventEmitter,s.ganttItemClass=!0,s.color="red",s}return c(n,t),n.prototype.ngOnInit=function(){var e=this;t.prototype.onInit.call(this),this.dragContainer.dragEnded.pipe(r.takeUntil(this.unsubscribe$)).subscribe((function(){e.setContentBackground()}))},n.prototype.ngAfterViewInit=function(){this.drag.createDrags(this.elementRef,this.item,this.ganttUpper),this.setContentBackground()},n.prototype.ngOnChanges=function(){t.prototype.onChanges.call(this)},n.prototype.onBarClick=function(t){this.barClick.emit({event:t,item:this.item.origin})},n.prototype.setContentBackground=function(){var t=this.contentElementRef.nativeElement,e=this.item.color||"#348fe4",n=this.item.barStyle||{};if(this.item.origin.start&&this.item.origin.end&&(n.background=e,n.borderRadius=""),this.item.origin.start&&!this.item.origin.end&&(n.background=ot("to left",A(e,.55),A(e,1)),n.borderRadius="4px 12.5px 12.5px 4px"),!this.item.origin.start&&this.item.origin.end&&(n.background=ot("to right",A(e,.55),A(e,1)),n.borderRadius="12.5px 4px 4px 12.5px"),this.item.progress>=0){var r=t.querySelector(".gantt-bar-content-progress");n.background=A(e,.3),n.borderRadius="",r.style.background=e}for(var i in n)n.hasOwnProperty(i)&&(t.style[i]=n[i])},n.prototype.stopPropagation=function(t){t.stopPropagation()},n.prototype.ngOnDestroy=function(){t.prototype.onDestroy.call(this)},n}(st);lt.decorators=[{type:e.Component,args:[{selector:"ngx-gantt-bar,gantt-bar",template:'<div class="gantt-bar-layer">\n <div *ngIf="item.draggable && ganttUpper.draggable" class="drag-handles">\n <ng-container>\n <span class="handle" (mousedown)="stopPropagation($event)"></span>\n <span class="handle" (mousedown)="stopPropagation($event)"></span>\n </ng-container>\n </div>\n <div *ngIf="item.linkable && ganttUpper.linkable" class="link-handles">\n <span class="handle"><span class="point"></span></span>\n <span class="handle"> <span class="point"></span></span>\n </div>\n</div>\n<div class="gantt-bar-border"></div>\n<div #content class="gantt-bar-content" (click)="onBarClick($event)">\n <div class="gantt-bar-content-progress" *ngIf="item.progress >= 0" [style.width.%]="item.progress * 100"></div>\n <ng-template [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ item: item.origin, refs: item.refs }"></ng-template>\n</div>\n',providers:[at]}]}],lt.ctorParameters=function(){return[{type:et},{type:at},{type:e.ElementRef},{type:Q,decorators:[{type:e.Inject,args:[q]}]}]},lt.propDecorators={barClick:[{type:e.Output}],contentElementRef:[{type:e.ViewChild,args:["content"]}],ganttItemClass:[{type:e.HostBinding,args:["class.gantt-bar"]}]};var pt=function(){function t(t){this.ganttUpper=t,this.barClick=new e.EventEmitter,this.lineClick=new e.EventEmitter,this.ganttMainClass=!0}return t.prototype.ngOnInit=function(){},t.prototype.trackBy=function(t,e){return t.id||e},t}();pt.decorators=[{type:e.Component,args:[{selector:"gantt-main",template:'<gantt-links-overlay [groups]="groups" [items]="items" (lineClick)="lineClick.emit($event)"></gantt-links-overlay>\n\x3c!-- groups --\x3e\n<div class="gantt-main-groups" *ngIf="groups && groups.length > 0; else itemsTemplate" [style.width.px]="ganttUpper.view.width">\n <ng-container *ngFor="let group of groups; trackBy: trackBy">\n <div class="gantt-group" [ngClass]="group.class">\n <ng-template [ngTemplateOutlet]="groupHeaderTemplate" [ngTemplateOutletContext]="{ group: group }"></ng-template>\n </div>\n <div *ngIf="group.expanded" class="gantt-items">\n <ng-template [ngTemplateOutlet]="ganttItems" [ngTemplateOutletContext]="{ items: group.items }"></ng-template>\n </div>\n </ng-container>\n</div>\n\x3c!-- items --\x3e\n<ng-template #itemsTemplate>\n <div class="gantt-main-items" [style.width.px]="ganttUpper.view.width">\n <ng-template [ngTemplateOutlet]="ganttItems" [ngTemplateOutletContext]="{ items: items }"></ng-template>\n </div>\n</ng-template>\n\n<ng-template #ganttItems let-items="items">\n <ng-container *ngFor="let item of items; trackBy: trackBy">\n <div class="gantt-item" [style.height.px]="ganttUpper.styles.lineHeight">\n <ng-container *ngIf="item.type | isGanttCustomItem">\n <ng-template [ngTemplateOutlet]="itemTemplate" [ngTemplateOutletContext]="{ item: item.origin, refs: item.refs }"></ng-template>\n </ng-container>\n <gantt-range *ngIf="item.type | isGanttRangeItem" [template]="rangeTemplate" [item]="item"></gantt-range>\n <gantt-bar *ngIf="item.type | isGanttBarItem" [item]="item" [template]="barTemplate" (barClick)="barClick.emit($event)"></gantt-bar>\n </div>\n <ng-template\n *ngIf="item.children && item.expanded"\n [ngTemplateOutlet]="ganttItems"\n [ngTemplateOutletContext]="{ items: item.children }"\n ></ng-template>\n </ng-container>\n</ng-template>\n'}]}],pt.ctorParameters=function(){return[{type:Q,decorators:[{type:e.Inject,args:[q]}]}]},pt.propDecorators={groups:[{type:e.Input}],items:[{type:e.Input}],groupHeaderTemplate:[{type:e.Input}],itemTemplate:[{type:e.Input}],barTemplate:[{type:e.Input}],rangeTemplate:[{type:e.Input}],barClick:[{type:e.Output}],lineClick:[{type:e.Output}],ganttMainClass:[{type:e.HostBinding,args:["class.gantt-main-container"]}]};var dt={"angle-right":'<svg xmlns="http://www.w3.org/2000/svg" fit="" preserveAspectRatio="xMidYMid meet" focusable="false"><g id="amnavigation/angle-right" stroke-width="1" fill-rule="evenodd"><path d="M7.978 11.498l-.005.005L2.3 5.831 3.13 5l4.848 4.848L12.826 5l.83.831-5.673 5.672-.005-.005z" transform="rotate(-90 7.978 8.252)"></path></g></svg>',"angle-down":'<svg xmlns="http://www.w3.org/2000/svg" fit="" preserveAspectRatio="xMidYMid meet" focusable="false"><g id="aknavigation/angle-down" stroke-width="1" fill-rule="evenodd"><path d="M7.978 11.997l-.005.006L2.3 6.33l.83-.831 4.848 4.848L12.826 5.5l.83.83-5.673 5.673-.005-.006z" ></path></g></svg>',"plus-square":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fit="" preserveAspectRatio="xMidYMid meet" focusable="false"><g id="kxaction/plus-square" stroke-width="1" fill-rule="evenodd"><path d="M2 0h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2zm0 1.2a.8.8 0 0 0-.8.8v12a.8.8 0 0 0 .8.8h12a.8.8 0 0 0 .8-.8V2a.8.8 0 0 0-.8-.8H2zm5.45 6.2V4.75h1.2V7.4h2.65v1.2H8.65v2.65h-1.2V8.6H4.8V7.4h2.65z"></path></g></svg>',"minus-square":'<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fit="" preserveAspectRatio="xMidYMid meet" focusable="false"><g id="jnaction/minus-square" stroke-width="1" fill-rule="evenodd"><path d="M2 0h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2zm0 1.2a.8.8 0 0 0-.8.8v12a.8.8 0 0 0 .8.8h12a.8.8 0 0 0 .8-.8V2a.8.8 0 0 0-.8-.8H2zm2.8 6.2h6.5v1.2H4.8V7.4z"></path></g></svg>',loading:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50" xml:space="preserve">\n<path fill="#aaa" d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z" transform="rotate(275.098 25 25)">\n <animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite"></animateTransform>\n</path>\n</svg>',empty:'<svg\nwidth="148px"\nheight="134px"\nviewBox="0 0 148 134"\nversion="1.1"\nxmlns="http://www.w3.org/2000/svg"\nxmlns:xlink="http://www.w3.org/1999/xlink"\n>\n<defs>\n <filter x="0.0%" y="0.0%" width="100.0%" height="100.0%" filterUnits="objectBoundingBox" id="filter-1">\n <feGaussianBlur stdDeviation="0" in="SourceGraphic"></feGaussianBlur>\n </filter>\n</defs>\n<g id="148x134" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g id="编组-6" transform="translate(1.000000, 1.000000)">\n <ellipse\n id="椭圆形"\n fill="#EDEEF2"\n opacity="0.3"\n filter="url(#filter-1)"\n cx="73.0800017"\n cy="115.920003"\n rx="73.0800017"\n ry="16.8000004"\n ></ellipse>\n <g id="编组-5" transform="translate(15.120000, 0.000000)">\n <polygon\n id="矩形"\n fill="#E2E4E9"\n points="19.2789848 49.5600011 99.1200023 48.7200011 117.600003 75.9297673 117.600003 92.313049 0 92.313049 0 75.0356267"\n ></polygon>\n <path\n d="M23.5200005,0 L94.0800002,0 C97.7913538,2.06413823e-16 100.8,3.00864655 100.8,6.72000015 L100.8,99.1200023 L100.8,99.1200023 L16.8000004,99.1200023 L16.8000004,6.72000015 C16.8000004,3.00864655 19.8086469,1.56994302e-15 23.5200005,0 Z"\n id="矩形"\n fill="#F9FAFB"\n ></path>\n <path\n d="M30.9200007,12.4400003 L86.6800019,12.4400003 C88.5356787,12.4400003 90.040002,13.9443236 90.040002,15.8000004 L90.040002,42.000001 C90.040002,43.8556778 88.5356787,45.360001 86.6800019,45.360001 L30.9200007,45.360001 C29.0643239,45.360001 27.5600006,43.8556778 27.5600006,42.000001 L27.5600006,15.8000004 C27.5600006,13.9443236 29.0643239,12.4400003 30.9200007,12.4400003 Z"\n id="矩形"\n fill="#E8EAEE"\n ></path>\n <text\n id="&lt;/null&gt;"\n font-family="PingFangSC-Medium, PingFang SC"\n font-size="15.1200003"\n font-weight="400"\n fill="#BCBECD"\n >\n <tspan x="33.6000008" y="32.8000004">&lt;/null&gt;</tspan>\n </text>\n <rect id="矩形" fill="#E8EAEE" x="27.5600006" y="52.0800012" width="61.4800014" height="5.04000011" rx="2.52000006"></rect>\n <rect\n id="矩形备份"\n fill="#E8EAEE"\n x="27.5600006"\n y="63.8400014"\n width="61.4800014"\n height="5.04000011"\n rx="2.52000006"\n ></rect>\n <path\n d="M0,75.6000017 L29.280235,75.6000017 C32.0637502,75.6000017 34.3202352,77.8564866 34.3202352,80.6400018 L34.3202352,86.2591426 C34.3202352,89.0426578 36.5767201,91.2991427 39.3602353,91.2991427 L78.4136737,91.2991427 C81.1971889,91.2991427 83.4536738,89.0426578 83.4536738,86.2591426 L83.4536738,80.6400018 C83.4536738,77.8564866 85.7101587,75.6000017 88.4936739,75.6000017 L117.600003,75.6000017 L117.600003,75.6000017 L117.600003,110.880003 C117.600003,115.519195 113.839194,119.280003 109.200002,119.280003 L8.40000019,119.280003 C3.76080819,119.280003 -6.53729019e-15,115.519195 0,110.880003 L0,75.6000017 L0,75.6000017 Z"\n id="矩形"\n fill="#EDEFF2"\n ></path>\n </g>\n </g>\n</g>\n</svg>'},ut=function(){function t(t){this.elementRef=t,this.isIcon=!0}return Object.defineProperty(t.prototype,"iconName",{set:function(t){this.setSvg(t)},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.ngAfterViewInit=function(){},t.prototype.setSvg=function(t){var e=dt[t];this.elementRef.nativeElement.innerHTML=e||""},t}();ut.decorators=[{type:e.Component,args:[{selector:"gantt-icon",template:""}]}],ut.ctorParameters=function(){return[{type:e.ElementRef}]},ut.propDecorators={isIcon:[{type:e.HostBinding,args:["class.gantt-icon"]}],iconName:[{type:e.Input}]};var ct,gt=function(){function t(){this.backdropClass=!0}return t.prototype.ngOnInit=function(){},t}();gt.decorators=[{type:e.Component,args:[{selector:"gantt-drag-backdrop",template:'<div class="gantt-drag-mask">\n <div class="date-range">\n <span class="start"></span>\n <span class="end"></span>\n </div>\n</div>\n'}]}],gt.ctorParameters=function(){return[]},gt.propDecorators={backdropClass:[{type:e.HostBinding,args:["class.gantt-drag-backdrop"]}]},function(t){t.default="#cacaca",t.blocked="#FF7575",t.active="#348FE4"}(ct||(ct={}));var ht=function(){function t(t,n,r,a){this.ganttUpper=t,this.cdr=n,this.elementRef=r,this.ganttDragContainer=a,this.groups=[],this.items=[],this.lineClick=new e.EventEmitter,this.links=[],this.linkItems=[],this.bezierWeight=-.5,this.firstChange=!0,this.unsubscribe$=new i.Subject,this.ganttLinksOverlay=!0}return t.prototype.ngOnInit=function(){var t=this;this.buildLinks(),this.firstChange=!1,this.ganttDragContainer.dragStarted.pipe(r.takeUntil(this.unsubscribe$)).subscribe((function(){t.elementRef.nativeElement.style.visibility="hidden"})),i.merge(this.ganttUpper.viewChange,this.ganttUpper.expandChange,this.ganttUpper.view.start$,this.ganttUpper.dragEnded,this.ganttUpper.linkDragEnded).pipe(r.takeUntil(this.unsubscribe$),r.skip(1)).subscribe((function(){t.elementRef.nativeElement.style.visibility="visible",t.buildLinks(),t.cdr.detectChanges()}))},t.prototype.ngOnChanges=function(){this.firstChange||this.buildLinks()},t.prototype.computeItemPosition=function(){var t=this,e=this.ganttUpper.styles.lineHeight,n=this.ganttUpper.styles.barHeight;if(this.linkItems=[],this.groups.length>0){var r=0,i=0;this.groups.forEach((function(a){if(i++,a.expanded){var s=F(a.items);s.forEach((function(a,s){var o=(i+r+s)*e+a.refs.y+n/2;t.linkItems.push(Object.assign(Object.assign({},a),{before:{x:a.refs.x,y:o},after:{x:a.refs.x+a.refs.width,y:o}}))})),r+=s.length}}))}else{F(this.items).forEach((function(r,i){var a=i*e+r.refs.y+n/2;t.linkItems.push(Object.assign(Object.assign({},r),{before:{x:r.refs.x,y:a},after:{x:r.refs.x+r.refs.width,y:a}}))}))}},t.prototype.generatePath=function(t,e){if(t.before&&t.after&&e.before&&e.after){var n=t.after.x,r=t.after.y,i=e.before.x,a=e.before.y,s=Math.abs(i-n)*this.bezierWeight,o=n-s,l=i+s,p=(n+i)/2,d=(r+a)/2,u=this.ganttUpper.styles.lineHeight/2,c=this.ganttUpper.styles.lineHeight/2;return n>=i?a>r?Math.abs(a-r)<=this.ganttUpper.styles.lineHeight?"M "+n+" "+r+"\n C "+(n+u)+" "+r+" "+(n+u)+" "+(r+u)+" "+n+" "+(r+c)+"\n L "+n+" "+(r+c)+" "+p+" "+d+"\n\n M "+i+" "+a+"\n C "+(i-u)+" "+a+" "+(i-u)+" "+(a-u)+" "+i+" "+(a-c)+"\n L "+i+" "+(a-c)+" "+p+" "+d:"M "+n+" "+r+"\n C "+(n+(u=this.ganttUpper.styles.lineHeight))+" "+r+" "+(n+u)+" "+(r+u)+" "+p+" "+d+"\n\n\n M "+i+" "+a+"\n C "+(i-u)+" "+a+" "+(i-u)+" "+(a-u)+" "+p+" "+d:Math.abs(a-r)<=this.ganttUpper.styles.lineHeight?"M "+n+" "+r+"\n C "+(n+u)+" "+r+" "+(n+u)+" "+(r-u)+" "+n+" "+(r-c)+"\n L "+n+" "+(r-c)+" "+p+" "+d+"\n\n M "+i+" "+a+"\n C "+(i-u)+" "+a+" "+(i-u)+" "+(a+u)+" "+i+" "+(a+c)+"\n L "+i+" "+(a+c)+" "+p+" "+d+"\n ":"M "+n+" "+r+"\n C "+(n+(u=this.ganttUpper.styles.lineHeight))+" "+r+" "+(n+u)+" "+(r-u)+" "+p+" "+d+"\n\n M "+i+" "+a+"\n C "+(i-u)+" "+a+" "+(i-u)+" "+(a+u)+" "+p+" "+d:"M "+n+" "+r+" C "+o+" "+r+" "+l+" "+a+" "+i+" "+a}},t.prototype.buildLinks=function(){var t=this;this.computeItemPosition(),this.links=[],this.linkItems.forEach((function(e){(e.origin.start||e.origin.end)&&e.links.forEach((function(n){var r=t.linkItems.find((function(t){return t.id===n}));r&&(r.origin.start||r.origin.end)&&t.links.push({path:t.generatePath(e,r),source:e.origin,target:r.origin,color:e.end.getTime()>r.start.getTime()?ct.blocked:ct.default})}))}))},t.prototype.trackBy=function(t){return t},t.prototype.onLineClick=function(t,e){this.lineClick.emit({event:t,source:e.source,target:e.target})},t.prototype.mouseEnterPath=function(t){t.color===ct.default&&(t.color=ct.active)},t.prototype.mouseLeavePath=function(t){t.color===ct.active&&(t.color=ct.default)},t.prototype.ngOnDestroy=function(){this.unsubscribe$.next(),this.unsubscribe$.complete()},t}();ht.decorators=[{type:e.Component,args:[{selector:"gantt-links-overlay",template:'<svg [attr.width]="ganttUpper.view.width" class="gantt-links-overlay-main">\n <ng-container *ngFor="let link of links; let i = index; trackBy: trackBy">\n <path [attr.d]="link.path" fill="transparent" stroke-width="2" [attr.stroke]="link.color" pointer-events="none"></path>\n <g>\n <path\n class="link-line"\n (click)="onLineClick($event, link)"\n (mouseenter)="mouseEnterPath(link)"\n (mouseleave)="mouseLeavePath(link)"\n [attr.d]="link.path"\n stroke="transparent"\n stroke-width="9"\n fill="none"\n cursor="pointer"\n ></path>\n </g>\n </ng-container>\n <line class="link-dragging-line"></line>\n</svg>\n'}]}],ht.ctorParameters=function(){return[{type:Q,decorators:[{type:e.Inject,args:[q]}]},{type:e.ChangeDetectorRef},{type:e.ElementRef},{type:et}]},ht.propDecorators={groups:[{type:e.Input}],items:[{type:e.Input}],lineClick:[{type:e.Output}],ganttLinksOverlay:[{type:e.HostBinding,args:["class.gantt-links-overlay"]}]};var ft=function(){function t(){}return t.prototype.setInlineStyles=function(t){var e,n,r=Array.from(t.getElementsByTagName("svg"));try{for(var i=g(r),a=i.next();!a.done;a=i.next()){var s=a.value;this.recursElementChildren(s)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}},t.prototype.recursElementChildren=function(t){var e,n,r,i;if(t.style){var a=getComputedStyle(t);try{for(var s=g(["fill","color","font-size","stroke","font","text-anchor","stroke-dasharray","shape-rendering","stroke-width"]),o=s.next();!o.done;o=s.next()){var l=o.value;t.style[l]=a[l]}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}try{for(var p=g(Array.from(t.childNodes)),d=p.next();!d.done;d=p.next()){var u=d.value;this.recursElementChildren(u)}}catch(t){r={error:t}}finally{try{d&&!d.done&&(i=p.return)&&i.call(p)}finally{if(r)throw r.error}}}},t.prototype.register=function(t){this.root=t.nativeElement,this.mainContainer=this.root.getElementsByClassName("gantt-main-container")[0]},t.prototype.print=function(t,e){var n=this;void 0===t&&(t="download");var r=this.root,i=this.mainContainer,a=r.offsetWidth,s=r.offsetHeight-i.offsetHeight+i.scrollHeight;d.default(r,{logging:!1,allowTaint:!0,useCORS:!0,width:a,height:s,ignoreElements:function(t){return!(!e||!t.classList.contains(e))||(!!t.classList.contains("gantt-calendar-today-overlay")||void 0)},onclone:function(t){var e=r.className,i=t.querySelector("."+e.replace(/\s+/g,".")),o=t.querySelector(".gantt-container"),l=t.querySelector(".gantt-calendar-overlay-main"),p=t.querySelector(".gantt-links-overlay-main");i.style.width=a+"px",i.style.height=s+"px",i.style.overflow="unset",o.style.backgroundColor="#fff",l.setAttribute("height",""+s),l.setAttribute("style","background: transparent"),p&&(p.setAttribute("height",""+s),p.setAttribute("style","height: "+s+"px")),n.setInlineStyles(i)}}).then((function(e){var n=document.createElement("a"),r=e.toDataURL("image/png");n.download=t+".png",n.href=r,n.click()}))},t}();ft.decorators=[{type:e.Injectable}],ft.ctorParameters=function(){return[]};var mt=function(){function t(t,e,n,r,a,s){this.elementRef=t,this.ngZone=e,this.dom=n,this.dragContainer=r,this.ganttUpper=a,this.printService=s,this.ganttClass=!0,this.unsubscribe$=new i.Subject,this.ganttUpper.dragContainer=r}return Object.defineProperty(t.prototype,"view",{get:function(){return this.ganttUpper.view},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.ngZone.onStable.pipe(r.take(1)).subscribe((function(){t.dom.initialize(t.elementRef),t.printService&&t.printService.register(t.elementRef),t.setupScrollClass(),t.setupResize(),t.setupViewScroll(),t.elementRef.nativeElement.style.opacity="1",t.ganttUpper.viewChange.pipe(r.startWith(null)).subscribe((function(){t.scrollToToday()}))}))},t.prototype.setupViewScroll=function(){var t=this;this.ganttUpper.disabledLoadOnScroll||this.dom.getViewerScroll().pipe(r.takeUntil(this.unsubscribe$)).subscribe((function(e){if(e.direction===J.LEFT){var n=t.view.addStartDate();n&&(e.target.scrollLeft+=t.view.getDateRangeWidth(n.start,n.end),t.ngZone.run((function(){t.ganttUpper.loadOnScroll.emit({start:n.start.getUnixTime(),end:n.end.getUnixTime()})})))}if(e.direction===J.RIGHT){var r=t.view.addEndDate();r&&t.ngZone.run((function(){t.ganttUpper.loadOnScroll.emit({start:r.start.getUnixTime(),end:r.end.getUnixTime()})}))}}))},t.prototype.setupResize=function(){var t=this;this.dom.getResize().pipe(r.takeUntil(this.unsubscribe$)).subscribe((function(){t.setupScrollClass()}))},t.prototype.setupScrollClass=function(){var t=this.dom.mainContainer,e=t.offsetHeight,n=t.scrollHeight;this.elementRef.nativeElement.className=n>e?"gantt gantt-scroll":"gantt"},t.prototype.scrollToToday=function(){var t=this.view.getTodayXPoint();this.dom.scrollMainContainer(t)},t}();mt.decorators=[{type:e.Component,args:[{selector:"ngx-gantt-root",template:'<div class="gantt-side" [style.width.px]="sideWidth">\n <div class="gantt-side-container">\n <ng-template [ngTemplateOutlet]="sideTemplate"></ng-template>\n </div>\n</div>\n<div class="gantt-container">\n <gantt-calendar-overlay></gantt-calendar-overlay>\n <gantt-drag-backdrop></gantt-drag-backdrop>\n <div class="gantt-main">\n <ng-template [ngTemplateOutlet]="mainTemplate"></ng-template>\n </div>\n</div>\n',providers:[tt,et]}]}],mt.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone},{type:tt},{type:et},{type:Q,decorators:[{type:e.Inject,args:[q]}]},{type:ft,decorators:[{type:e.Optional}]}]},mt.propDecorators={sideWidth:[{type:e.Input}],ganttClass:[{type:e.HostBinding,args:["class.gantt"]}],sideTemplate:[{type:e.ContentChild,args:["sideTemplate",{static:!0}]}],mainTemplate:[{type:e.ContentChild,args:["mainTemplate",{static:!0}]}]};var yt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.ganttRangeClass=!0,r}return c(e,t),e.prototype.ngOnInit=function(){t.prototype.onInit.call(this)},e.prototype.ngOnChanges=function(){t.prototype.onChanges.call(this)},e.prototype.ngOnDestroy=function(){t.prototype.onDestroy.call(this)},e}(st);yt.decorators=[{type:e.Component,args:[{selector:"ngx-gantt-range,gantt-range",template:'<ng-container *ngIf="item.start && item.end">\n <div class="gantt-range-main">\n <div class="gantt-range-main-progress" *ngIf="item.progress >= 0" [style.width.%]="item.progress * 100"></div>\n </div>\n <div class="gantt-range-triangle left"></div>\n <div class="gantt-range-triangle right"></div>\n <ng-template [ngTemplateOutlet]="template" [ngTemplateOutletContext]="{ item: item.origin, refs: item.refs }"></ng-template>\n</ng-container>\n'}]}],yt.ctorParameters=function(){return[{type:e.ElementRef},{type:Q,decorators:[{type:e.Inject,args:[q]}]}]},yt.propDecorators={ganttRangeClass:[{type:e.HostBinding,args:["class.gantt-range"]}]};var vt=function(){function e(){}return e.prototype.transform=function(e){return e===t.GanttItemType.range},e}();vt.decorators=[{type:e.Pipe,args:[{name:"isGanttRangeItem"}]}];var bt=function(){function e(){}return e.prototype.transform=function(e){return e===t.GanttItemType.bar},e}();bt.decorators=[{type:e.Pipe,args:[{name:"isGanttBarItem"}]}];var wt=function(){function e(){}return e.prototype.transform=function(e){return e===t.GanttItemType.custom},e}();wt.decorators=[{type:e.Pipe,args:[{name:"isGanttCustomItem"}]}];var kt=function(){};kt.decorators=[{type:e.NgModule,args:[{imports:[n.CommonModule,o.DragDropModule],exports:[Z,X,z,mt,lt],declarations:[Z,X,z,K,pt,_,ht,lt,ut,gt,yt,mt,vt,bt,wt],providers:[]}]}],Object.defineProperty(t,"addDays",{enumerable:!0,get:function(){return a.addDays}}),Object.defineProperty(t,"addHours",{enumerable:!0,get:function(){return a.addHours}}),Object.defineProperty(t,"addMinutes",{enumerable:!0,get:function(){return a.addMinutes}}),Object.defineProperty(t,"addMonths",{enumerable:!0,get:function(){return a.addMonths}}),Object.defineProperty(t,"addQuarters",{enumerable:!0,get:function(){return a.addQuarters}}),Object.defineProperty(t,"addSeconds",{enumerable:!0,get:function(){return a.addSeconds}}),Object.defineProperty(t,"addWeeks",{enumerable:!0,get:function(){return a.addWeeks}}),Object.defineProperty(t,"addYears",{enumerable:!0,get:function(){return a.addYears}}),Object.defineProperty(t,"differenceInCalendarDays",{enumerable:!0,get:function(){return a.differenceInCalendarDays}}),Object.defineProperty(t,"differenceInCalendarQuarters",{enumerable:!0,get:function(){return a.differenceInCalendarQuarters}}),Object.defineProperty(t,"differenceInDays",{enumerable:!0,get:function(){return a.differenceInDays}}),Object.defineProperty(t,"eachDayOfInterval",{enumerable:!0,get:function(){return a.eachDayOfInterval}}),Object.defineProperty(t,"eachMonthOfInterval",{enumerable:!0,get:function(){return a.eachMonthOfInterval}}),Object.defineProperty(t,"eachWeekOfInterval",{enumerable:!0,get:function(){return a.eachWeekOfInterval}}),Object.defineProperty(t,"endOfDay",{enumerable:!0,get:function(){return a.endOfDay}}),Object.defineProperty(t,"endOfMonth",{enumerable:!0,get:function(){return a.endOfMonth}}),Object.defineProperty(t,"endOfQuarter",{enumerable:!0,get:function(){return a.endOfQuarter}}),Object.defineProperty(t,"endOfWeek",{enumerable:!0,get:function(){return a.endOfWeek}}),Object.defineProperty(t,"endOfYear",{enumerable:!0,get:function(){return a.endOfYear}}),Object.defineProperty(t,"format",{enumerable:!0,get:function(){return a.format}}),Object.defineProperty(t,"fromUnixTime",{enumerable:!0,get:function(){return a.fromUnixTime}}),Object.defineProperty(t,"getDaysInMonth",{enumerable:!0,get:function(){return a.getDaysInMonth}}),Object.defineProperty(t,"getUnixTime",{enumerable:!0,get:function(){return a.getUnixTime}}),Object.defineProperty(t,"getWeek",{enumerable:!0,get:function(){return a.getWeek}}),Object.defineProperty(t,"isToday",{enumerable:!0,get:function(){return a.isToday}}),Object.defineProperty(t,"isWeekend",{enumerable:!0,get:function(){return a.isWeekend}}),Object.defineProperty(t,"setDate",{enumerable:!0,get:function(){return a.setDate}}),Object.defineProperty(t,"startOfDay",{enumerable:!0,get:function(){return a.startOfDay}}),Object.defineProperty(t,"startOfMonth",{enumerable:!0,get:function(){return a.startOfMonth}}),Object.defineProperty(t,"startOfQuarter",{enumerable:!0,get:function(){return a.startOfQuarter}}),Object.defineProperty(t,"startOfWeek",{enumerable:!0,get:function(){return a.startOfWeek}}),Object.defineProperty(t,"startOfYear",{enumerable:!0,get:function(){return a.startOfYear}}),t.GANTT_UPPER_TOKEN=q,t.GanttBarClickEvent=D,t.GanttDate=O,t.GanttDatePoint=v,t.GanttDragEvent=b,t.GanttGroupInternal=I,t.GanttItemInternal=E,t.GanttItemUpper=st,t.GanttLineClickEvent=x,t.GanttLinkDragEvent=k,t.GanttLoadOnScrollEvent=C,t.GanttPrintService=ft,t.GanttTableEvent=w,t.GanttUpper=Q,t.GanttView=P,t.IsGanttBarItemPipe=bt,t.IsGanttCustomItemPipe=wt,t.IsGanttRangeItemPipe=vt,t.NgxGanttComponent=Z,t.NgxGanttModule=kt,t.NgxGanttRootComponent=mt,t.NgxGanttTableColumnComponent=z,t.NgxGanttTableComponent=X,t.defaultColumnWidth=100,t.minColumnWidth=80,t.primaryDatePointTop=T,t.secondaryDatePointTop=36,t.ɵa=tt,t.ɵb=et,t.ɵc=lt,t.ɵd=at,t.ɵe=K,t.ɵf=pt,t.ɵg=_,t.ɵh=ht,t.ɵi=ut,t.ɵj=gt,t.ɵk=yt,Object.defineProperty(t,"__esModule",{value:!0})}));
16
- //# sourceMappingURL=worktile-gantt.umd.min.js.map