@syncfusion/ej2-gantt 19.4.56 → 20.1.47-1460716

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 (211) hide show
  1. package/CHANGELOG.md +1072 -1060
  2. package/README.md +75 -75
  3. package/dist/ej2-gantt.umd.min.js +1 -10
  4. package/dist/ej2-gantt.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-gantt.es2015.js +274 -176
  6. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  7. package/dist/es6/ej2-gantt.es5.js +642 -534
  8. package/dist/es6/ej2-gantt.es5.js.map +1 -1
  9. package/dist/global/ej2-gantt.min.js +1 -10
  10. package/dist/global/ej2-gantt.min.js.map +1 -1
  11. package/dist/global/index.d.ts +0 -9
  12. package/dist/ts/components.ts +4 -0
  13. package/dist/ts/gantt/actions/actions.ts +18 -0
  14. package/dist/ts/gantt/actions/cell-edit.ts +606 -0
  15. package/dist/ts/gantt/actions/chart-scroll.ts +167 -0
  16. package/dist/ts/gantt/actions/column-menu.ts +35 -0
  17. package/dist/ts/gantt/actions/column-reorder.ts +52 -0
  18. package/dist/ts/gantt/actions/column-resize.ts +52 -0
  19. package/dist/ts/gantt/actions/connector-line-edit.ts +829 -0
  20. package/dist/ts/gantt/actions/context-menu.ts +754 -0
  21. package/dist/ts/gantt/actions/day-markers.ts +80 -0
  22. package/dist/ts/gantt/actions/dependency.ts +692 -0
  23. package/dist/ts/gantt/actions/dialog-edit.ts +2208 -0
  24. package/dist/ts/gantt/actions/edit.ts +3499 -0
  25. package/dist/ts/gantt/actions/excel-export.ts +61 -0
  26. package/dist/ts/gantt/actions/filter.ts +302 -0
  27. package/dist/ts/gantt/actions/keyboard.ts +306 -0
  28. package/dist/ts/gantt/actions/pdf-export.ts +214 -0
  29. package/dist/ts/gantt/actions/rowdragdrop.ts +839 -0
  30. package/dist/ts/gantt/actions/selection.ts +536 -0
  31. package/dist/ts/gantt/actions/sort.ts +98 -0
  32. package/dist/ts/gantt/actions/taskbar-edit.ts +1940 -0
  33. package/dist/ts/gantt/actions/toolbar.ts +489 -0
  34. package/dist/ts/gantt/actions/virtual-scroll.ts +60 -0
  35. package/dist/ts/gantt/base/common.ts +9 -0
  36. package/dist/ts/gantt/base/constant.ts +13 -0
  37. package/dist/ts/gantt/base/css-constants.ts +148 -0
  38. package/dist/ts/gantt/base/date-processor.ts +1257 -0
  39. package/dist/ts/gantt/base/enum.ts +372 -0
  40. package/dist/ts/gantt/base/gantt-chart.ts +1248 -0
  41. package/dist/ts/gantt/base/gantt.ts +4069 -0
  42. package/dist/ts/gantt/base/interface.ts +955 -0
  43. package/dist/ts/gantt/base/splitter.ts +174 -0
  44. package/dist/ts/gantt/base/task-processor.ts +2217 -0
  45. package/dist/ts/gantt/base/tree-grid.ts +694 -0
  46. package/dist/ts/gantt/base/utils.ts +208 -0
  47. package/dist/ts/gantt/export/export-helper.ts +552 -0
  48. package/dist/ts/gantt/export/pdf-base/dictionary.ts +152 -0
  49. package/dist/ts/gantt/export/pdf-base/pdf-borders.ts +277 -0
  50. package/dist/ts/gantt/export/pdf-base/pdf-grid-table.ts +901 -0
  51. package/dist/ts/gantt/export/pdf-base/pdf-style/gantt-theme.ts +131 -0
  52. package/dist/ts/gantt/export/pdf-base/pdf-style/style.ts +91 -0
  53. package/dist/ts/gantt/export/pdf-base/treegrid-layouter.ts +414 -0
  54. package/dist/ts/gantt/export/pdf-connector-line.ts +422 -0
  55. package/dist/ts/gantt/export/pdf-gantt.ts +282 -0
  56. package/dist/ts/gantt/export/pdf-taskbar.ts +395 -0
  57. package/dist/ts/gantt/export/pdf-timeline.ts +202 -0
  58. package/dist/ts/gantt/export/pdf-treegrid.ts +406 -0
  59. package/dist/ts/gantt/models/add-dialog-field-settings.ts +33 -0
  60. package/dist/ts/gantt/models/column.ts +464 -0
  61. package/dist/ts/gantt/models/day-working-time.ts +22 -0
  62. package/dist/ts/gantt/models/edit-dialog-field-settings.ts +33 -0
  63. package/dist/ts/gantt/models/edit-settings.ts +79 -0
  64. package/dist/ts/gantt/models/event-marker.ts +27 -0
  65. package/dist/ts/gantt/models/filter-settings.ts +53 -0
  66. package/dist/ts/gantt/models/holiday.ts +34 -0
  67. package/dist/ts/gantt/models/label-settings.ts +30 -0
  68. package/dist/ts/gantt/models/models.ts +36 -0
  69. package/dist/ts/gantt/models/resource-fields.ts +38 -0
  70. package/dist/ts/gantt/models/search-settings.ts +77 -0
  71. package/dist/ts/gantt/models/selection-settings.ts +56 -0
  72. package/dist/ts/gantt/models/sort-settings.ts +50 -0
  73. package/dist/ts/gantt/models/splitter-settings.ts +47 -0
  74. package/dist/ts/gantt/models/task-fields.ts +171 -0
  75. package/dist/ts/gantt/models/timeline-settings.ts +112 -0
  76. package/dist/ts/gantt/models/tooltip-settings.ts +46 -0
  77. package/dist/ts/gantt/renderer/chart-rows.ts +1838 -0
  78. package/dist/ts/gantt/renderer/connector-line.ts +1025 -0
  79. package/dist/ts/gantt/renderer/edit-tooltip.ts +228 -0
  80. package/dist/ts/gantt/renderer/event-marker.ts +96 -0
  81. package/dist/ts/gantt/renderer/nonworking-day.ts +205 -0
  82. package/dist/ts/gantt/renderer/render.ts +5 -0
  83. package/dist/ts/gantt/renderer/timeline.ts +1397 -0
  84. package/dist/ts/gantt/renderer/tooltip.ts +450 -0
  85. package/dist/ts/gantt/renderer/virtual-content-render.ts +50 -0
  86. package/license +9 -9
  87. package/package.json +80 -80
  88. package/src/gantt/actions/cell-edit.js +2 -1
  89. package/src/gantt/actions/dialog-edit.js +2 -1
  90. package/src/gantt/actions/edit.js +11 -2
  91. package/src/gantt/actions/rowdragdrop.js +37 -15
  92. package/src/gantt/actions/taskbar-edit.js +24 -24
  93. package/src/gantt/base/date-processor.js +0 -1
  94. package/src/gantt/base/gantt-chart.js +9 -4
  95. package/src/gantt/base/gantt-model.d.ts +779 -779
  96. package/src/gantt/base/gantt.d.ts +27 -27
  97. package/src/gantt/base/gantt.js +22 -22
  98. package/src/gantt/base/splitter.js +1 -0
  99. package/src/gantt/base/task-processor.js +13 -13
  100. package/src/gantt/base/tree-grid.js +3 -1
  101. package/src/gantt/export/pdf-base/treegrid-layouter.js +13 -13
  102. package/src/gantt/export/pdf-connector-line.js +11 -11
  103. package/src/gantt/export/pdf-gantt.js +24 -24
  104. package/src/gantt/export/pdf-taskbar.js +11 -11
  105. package/src/gantt/export/pdf-treegrid.js +13 -13
  106. package/src/gantt/models/add-dialog-field-settings-model.d.ts +21 -21
  107. package/src/gantt/models/add-dialog-field-settings.js +19 -19
  108. package/src/gantt/models/day-working-time-model.d.ts +11 -11
  109. package/src/gantt/models/day-working-time.js +19 -19
  110. package/src/gantt/models/edit-dialog-field-settings-model.d.ts +21 -21
  111. package/src/gantt/models/edit-dialog-field-settings.js +19 -19
  112. package/src/gantt/models/edit-settings-model.d.ts +50 -50
  113. package/src/gantt/models/edit-settings.js +19 -19
  114. package/src/gantt/models/event-marker-model.d.ts +16 -16
  115. package/src/gantt/models/event-marker.js +19 -19
  116. package/src/gantt/models/filter-settings-model.d.ts +34 -34
  117. package/src/gantt/models/filter-settings.js +19 -19
  118. package/src/gantt/models/holiday-model.d.ts +21 -21
  119. package/src/gantt/models/holiday.js +19 -19
  120. package/src/gantt/models/label-settings-model.d.ts +16 -16
  121. package/src/gantt/models/label-settings.js +19 -19
  122. package/src/gantt/models/resource-fields-model.d.ts +21 -21
  123. package/src/gantt/models/resource-fields.js +19 -19
  124. package/src/gantt/models/search-settings-model.d.ts +56 -56
  125. package/src/gantt/models/search-settings.js +19 -19
  126. package/src/gantt/models/selection-settings-model.d.ts +35 -35
  127. package/src/gantt/models/selection-settings.js +19 -19
  128. package/src/gantt/models/sort-settings-model.d.ts +24 -24
  129. package/src/gantt/models/sort-settings.js +19 -19
  130. package/src/gantt/models/splitter-settings-model.d.ts +30 -30
  131. package/src/gantt/models/splitter-settings.js +19 -19
  132. package/src/gantt/models/task-fields-model.d.ts +110 -110
  133. package/src/gantt/models/task-fields.js +19 -19
  134. package/src/gantt/models/timeline-settings-model.d.ts +71 -71
  135. package/src/gantt/models/timeline-settings.js +19 -19
  136. package/src/gantt/models/tooltip-settings-model.d.ts +26 -26
  137. package/src/gantt/models/tooltip-settings.js +19 -19
  138. package/src/gantt/renderer/chart-rows.js +49 -37
  139. package/src/gantt/renderer/connector-line.js +22 -18
  140. package/src/gantt/renderer/event-marker.js +1 -0
  141. package/src/gantt/renderer/nonworking-day.js +13 -6
  142. package/src/gantt/renderer/timeline.d.ts +1 -0
  143. package/src/gantt/renderer/timeline.js +48 -12
  144. package/src/gantt/renderer/tooltip.js +11 -3
  145. package/styles/bootstrap-dark.css +442 -427
  146. package/styles/bootstrap.css +442 -433
  147. package/styles/bootstrap4.css +454 -479
  148. package/styles/bootstrap5-dark.css +457 -433
  149. package/styles/bootstrap5.css +457 -433
  150. package/styles/fabric-dark.css +438 -421
  151. package/styles/fabric.css +445 -428
  152. package/styles/fluent-dark.css +1938 -0
  153. package/styles/fluent-dark.scss +1 -0
  154. package/styles/fluent.css +1938 -0
  155. package/styles/fluent.scss +1 -0
  156. package/styles/gantt/_all.scss +2 -2
  157. package/styles/gantt/_bootstrap-dark-definition.scss +210 -156
  158. package/styles/gantt/_bootstrap-definition.scss +211 -157
  159. package/styles/gantt/_bootstrap4-definition.scss +213 -158
  160. package/styles/gantt/_bootstrap5-definition.scss +215 -162
  161. package/styles/gantt/_fabric-dark-definition.scss +211 -157
  162. package/styles/gantt/_fabric-definition.scss +211 -157
  163. package/styles/gantt/_fluent-dark-definition.scss +1 -0
  164. package/styles/gantt/_fluent-definition.scss +215 -162
  165. package/styles/gantt/_fusionnew-definition.scss +214 -0
  166. package/styles/gantt/_highcontrast-definition.scss +211 -157
  167. package/styles/gantt/_highcontrast-light-definition.scss +211 -157
  168. package/styles/gantt/_layout.scss +1446 -1027
  169. package/styles/gantt/_material-dark-definition.scss +212 -157
  170. package/styles/gantt/_material-definition.scss +212 -157
  171. package/styles/gantt/_material3-definition.scss +215 -0
  172. package/styles/gantt/_tailwind-definition.scss +215 -161
  173. package/styles/gantt/_theme.scss +702 -668
  174. package/styles/gantt/bootstrap-dark.css +442 -427
  175. package/styles/gantt/bootstrap.css +442 -433
  176. package/styles/gantt/bootstrap4.css +454 -479
  177. package/styles/gantt/bootstrap5-dark.css +457 -433
  178. package/styles/gantt/bootstrap5.css +457 -433
  179. package/styles/gantt/fabric-dark.css +438 -421
  180. package/styles/gantt/fabric.css +445 -428
  181. package/styles/gantt/fluent-dark.css +1938 -0
  182. package/styles/gantt/fluent-dark.scss +22 -0
  183. package/styles/gantt/fluent.css +1938 -0
  184. package/styles/gantt/fluent.scss +22 -0
  185. package/styles/gantt/highcontrast-light.css +405 -405
  186. package/styles/gantt/highcontrast.css +444 -456
  187. package/styles/gantt/icons/_bootstrap-dark.scss +124 -113
  188. package/styles/gantt/icons/_bootstrap.scss +124 -113
  189. package/styles/gantt/icons/_bootstrap4.scss +124 -113
  190. package/styles/gantt/icons/_bootstrap5.scss +124 -112
  191. package/styles/gantt/icons/_fabric-dark.scss +124 -112
  192. package/styles/gantt/icons/_fabric.scss +124 -112
  193. package/styles/gantt/icons/_fluent-dark.scss +1 -0
  194. package/styles/gantt/icons/_fluent.scss +124 -112
  195. package/styles/gantt/icons/_fusionnew.scss +120 -0
  196. package/styles/gantt/icons/_highcontrast.scss +124 -112
  197. package/styles/gantt/icons/_material-dark.scss +124 -112
  198. package/styles/gantt/icons/_material.scss +124 -112
  199. package/styles/gantt/icons/_material3.scss +124 -0
  200. package/styles/gantt/icons/_tailwind-dark.scss +124 -113
  201. package/styles/gantt/icons/_tailwind.scss +124 -113
  202. package/styles/gantt/material-dark.css +446 -417
  203. package/styles/gantt/material.css +445 -419
  204. package/styles/gantt/tailwind-dark.css +452 -482
  205. package/styles/gantt/tailwind.css +449 -479
  206. package/styles/highcontrast-light.css +405 -405
  207. package/styles/highcontrast.css +444 -456
  208. package/styles/material-dark.css +446 -417
  209. package/styles/material.css +445 -419
  210. package/styles/tailwind-dark.css +452 -482
  211. package/styles/tailwind.css +449 -479
@@ -0,0 +1,152 @@
1
+ /**
2
+ * Dictionary class
3
+ *
4
+ * @private
5
+ * @hidden
6
+ */
7
+ export class TemporaryDictionary<K, V> {
8
+ /**
9
+ * @hidden
10
+ * @private
11
+ */
12
+ private mKeys: K[] = [];
13
+ /**
14
+ * @hidden
15
+ * @private
16
+ */
17
+ private mValues: V[] = [];
18
+ /**
19
+ * @returns {number} .
20
+ * @hidden
21
+ * @private
22
+ */
23
+ public size(): number {
24
+ return this.mKeys.length;
25
+ }
26
+ /**
27
+ * @template K
28
+ * @template V
29
+ * @param {K} key .
30
+ * @param {V} value .
31
+ * @returns {void} .
32
+ * @hidden
33
+ * @private
34
+ */
35
+ public add(key: K, value: V): number {
36
+ if (key === undefined || key === null || value === undefined || value === null) {
37
+ throw new ReferenceError('Provided key or value is not valid.');
38
+ }
39
+ const index: number = this.mKeys.indexOf(key);
40
+ if (index < 0) {
41
+ this.mKeys.push(key);
42
+ this.mValues.push(value);
43
+ return 1;
44
+ } else {
45
+ throw new RangeError('An item with the same key has already been added.');
46
+ }
47
+ }
48
+ /**
49
+ * @template K
50
+ * @returns {K[]} .
51
+ * @hidden
52
+ * @private
53
+ */
54
+ public keys(): K[] {
55
+ return this.mKeys;
56
+ }
57
+ /**
58
+ * @template V
59
+ * @returns {V[]} .
60
+ * @hidden
61
+ * @private
62
+ */
63
+ public values(): V[] {
64
+ return this.mValues;
65
+ }
66
+ /**
67
+ * @template K
68
+ * @template V
69
+ * @param {K} key .
70
+ * @returns {V} .
71
+ * @hidden
72
+ * @private
73
+ */
74
+ public getValue(key: K): V {
75
+ if (key === undefined || key === null) {
76
+ throw new ReferenceError('Provided key is not valid.');
77
+ }
78
+ const index: number = this.mKeys.indexOf(key);
79
+ if (index < 0) {
80
+ throw new RangeError('No item with the specified key has been added.');
81
+ } else {
82
+ return this.mValues[index];
83
+ }
84
+ }
85
+ /**
86
+ * @template K
87
+ * @template V
88
+ * @param {K} key .
89
+ * @param {V} value .
90
+ * @returns {void} .
91
+ * @hidden
92
+ * @private
93
+ */
94
+ public setValue(key: K, value: V): void {
95
+ if (key === undefined || key === null) {
96
+ throw new ReferenceError('Provided key is not valid.');
97
+ }
98
+ const index: number = this.mKeys.indexOf(key);
99
+ if (index < 0) {
100
+ this.mKeys.push(key);
101
+ this.mValues.push(value);
102
+ } else {
103
+ this.mValues[index] = value;
104
+ }
105
+ }
106
+ /**
107
+ * @template K
108
+ * @param {K} key .
109
+ * @returns {boolean} .
110
+ * @hidden
111
+ * @private
112
+ */
113
+ public remove(key: K): boolean {
114
+ if (key === undefined || key === null) {
115
+ throw new ReferenceError('Provided key is not valid.');
116
+ }
117
+ const index: number = this.mKeys.indexOf(key);
118
+ if (index < 0) {
119
+ throw new RangeError('No item with the specified key has been added.');
120
+ } else {
121
+ this.mKeys.splice(index, 1);
122
+ this.mValues.splice(index, 1);
123
+ return true;
124
+ }
125
+ }
126
+ /**
127
+ * @template K
128
+ * @param {K} key .
129
+ * @returns {boolean} .
130
+ * @hidden
131
+ * @private
132
+ */
133
+ public containsKey(key: K): boolean {
134
+ if (key === undefined || key === null) {
135
+ throw new ReferenceError('Provided key is not valid.');
136
+ }
137
+ const index: number = this.mKeys.indexOf(key);
138
+ if (index < 0) {
139
+ return false;
140
+ }
141
+ return true;
142
+ }
143
+ /**
144
+ * @returns {void} .
145
+ * @hidden
146
+ * @private
147
+ */
148
+ public clear(): void {
149
+ this.mKeys = [];
150
+ this.mValues = [];
151
+ }
152
+ }
@@ -0,0 +1,277 @@
1
+ /**
2
+ * PdfBorders.ts class for EJ2-PDF
3
+ */
4
+ import { PdfPen, PdfDashStyle, PdfColor } from '@syncfusion/ej2-pdf-export';
5
+ /**
6
+ * `PdfBorders` class used represents the cell border of the PDF grid.
7
+ */
8
+ export class PdfBorders {
9
+ // Fields
10
+ /**
11
+ * The `left` border.
12
+ *
13
+ * @private
14
+ */
15
+ private leftPen: PdfPen;
16
+ /**
17
+ * The `right` border.
18
+ *
19
+ * @private
20
+ */
21
+ private rightPen: PdfPen;
22
+ /**
23
+ * The `top` border.
24
+ *
25
+ * @private
26
+ */
27
+ private topPen: PdfPen;
28
+ /**
29
+ * The `bottom` border.
30
+ *
31
+ * @private
32
+ */
33
+ private bottomPen: PdfPen;
34
+ // Properties
35
+ /**
36
+ * Gets or sets the `Left`.
37
+ *
38
+ * @returns {PdfPen} .
39
+ * @private
40
+ */
41
+ public get left(): PdfPen {
42
+ return this.leftPen;
43
+ }
44
+ public set left(value: PdfPen) {
45
+ this.leftPen = value;
46
+ }
47
+ /**
48
+ * Gets or sets the `Right`.
49
+ *
50
+ * @returns {PdfPen} .
51
+ * @private
52
+ */
53
+ public get right(): PdfPen {
54
+ return this.rightPen;
55
+ }
56
+ public set right(value: PdfPen) {
57
+ this.rightPen = value;
58
+ }
59
+ /**
60
+ * Gets or sets the `Top`.
61
+ *
62
+ * @returns {PdfPen} .
63
+ * @private
64
+ */
65
+ public get top(): PdfPen {
66
+ return this.topPen;
67
+ }
68
+ public set top(value: PdfPen) {
69
+ this.topPen = value;
70
+ }
71
+ /**
72
+ * Gets or sets the `Bottom`.
73
+ *
74
+ * @returns {PdfPen} .
75
+ * @private
76
+ */
77
+ public get bottom(): PdfPen {
78
+ return this.bottomPen;
79
+ }
80
+ public set bottom(value: PdfPen) {
81
+ this.bottomPen = value;
82
+ }
83
+ /**
84
+ * sets the `All`.
85
+ *
86
+ * @param {PdfPen} value .
87
+ * @private
88
+ */
89
+ public set all(value: PdfPen) {
90
+ this.leftPen = this.rightPen = this.topPen = this.bottomPen = value;
91
+ }
92
+ /**
93
+ * Gets a value indicating whether this instance `is all`.
94
+ *
95
+ * @returns {boolean} .
96
+ * @private
97
+ */
98
+ public get isAll(): boolean {
99
+ return ((this.leftPen === this.rightPen) && (this.leftPen === this.topPen) && (this.leftPen === this.bottomPen));
100
+ }
101
+ /**
102
+ * Gets the `default`.
103
+ *
104
+ * @returns {PdfBorders} .
105
+ * @private
106
+ */
107
+ public static get default(): PdfBorders {
108
+ return new PdfBorders();
109
+ }
110
+
111
+ // Constructor
112
+ /**
113
+ * Create a new instance for `PdfBorders` class.
114
+ *
115
+ * @private
116
+ */
117
+ public constructor() {
118
+ const defaultBorderPenLeft: PdfPen = new PdfPen(new PdfColor(0, 0, 0));
119
+ defaultBorderPenLeft.dashStyle = PdfDashStyle.Solid;
120
+ const defaultBorderPenRight: PdfPen = new PdfPen(new PdfColor(0, 0, 0));
121
+ defaultBorderPenRight.dashStyle = PdfDashStyle.Solid;
122
+ const defaultBorderPenTop: PdfPen = new PdfPen(new PdfColor(0, 0, 0));
123
+ defaultBorderPenTop.dashStyle = PdfDashStyle.Solid;
124
+ const defaultBorderPenBottom: PdfPen = new PdfPen(new PdfColor(0, 0, 0));
125
+ defaultBorderPenBottom.dashStyle = PdfDashStyle.Solid;
126
+ this.leftPen = defaultBorderPenLeft;
127
+ this.rightPen = defaultBorderPenRight;
128
+ this.topPen = defaultBorderPenTop;
129
+ this.bottomPen = defaultBorderPenBottom;
130
+ }
131
+ }
132
+ export class PdfPaddings {
133
+ //Fields
134
+ /**
135
+ * The `left` padding.
136
+ *
137
+ * @private
138
+ */
139
+ private leftPad: number;
140
+ /**
141
+ * The `right` padding.
142
+ *
143
+ * @private
144
+ */
145
+ private rightPad: number;
146
+ /**
147
+ * The `top` padding.
148
+ *
149
+ * @private
150
+ */
151
+ private topPad: number;
152
+ /**
153
+ * The `bottom` padding.
154
+ *
155
+ * @private
156
+ */
157
+ private bottomPad: number;
158
+ /**
159
+ * The 'left' border padding set.
160
+ *
161
+ * @private
162
+ */
163
+ public hasLeftPad: boolean = false;
164
+ /**
165
+ * The 'right' border padding set.
166
+ *
167
+ * @private
168
+ */
169
+ public hasRightPad: boolean = false;
170
+ /**
171
+ * The 'top' border padding set.
172
+ *
173
+ * @private
174
+ */
175
+ public hasTopPad: boolean = false;
176
+ /**
177
+ * The 'bottom' border padding set.
178
+ *
179
+ * @private
180
+ */
181
+ public hasBottomPad: boolean = false;
182
+ // Properties
183
+ /**
184
+ * Gets or sets the `left` value of the edge
185
+ *
186
+ * @returns {number} .
187
+ * @private
188
+ */
189
+ public get left(): number {
190
+ return this.leftPad;
191
+ }
192
+ public set left(value: number) {
193
+ this.leftPad = value;
194
+ this.hasLeftPad = true;
195
+ }
196
+ /**
197
+ * Gets or sets the `right` value of the edge.
198
+ *
199
+ * @returns {number} .
200
+ * @private
201
+ */
202
+ public get right(): number {
203
+ return this.rightPad;
204
+ }
205
+ public set right(value: number) {
206
+ this.rightPad = value;
207
+ this.hasRightPad = true;
208
+ }
209
+ /**
210
+ * Gets or sets the `top` value of the edge
211
+ *
212
+ * @returns {number} .
213
+ * @private
214
+ */
215
+ public get top(): number {
216
+ return this.topPad;
217
+ }
218
+ public set top(value: number) {
219
+ this.topPad = value;
220
+ this.hasTopPad = true;
221
+ }
222
+ /**
223
+ * Gets or sets the `bottom` value of the edge.
224
+ *
225
+ * @returns {number} .
226
+ * @private
227
+ */
228
+ public get bottom(): number {
229
+ return this.bottomPad;
230
+ }
231
+ public set bottom(value: number) {
232
+ this.bottomPad = value;
233
+ this.hasBottomPad = true;
234
+ }
235
+ /**
236
+ * Sets value to all sides `left,right,top and bottom`.s
237
+ *
238
+ * @param {number} value .
239
+ * @private
240
+ */
241
+ public set all(value: number) {
242
+ this.leftPad = this.rightPad = this.topPad = this.bottomPad = value;
243
+ this.hasLeftPad = true;
244
+ this.hasRightPad = true;
245
+ this.hasTopPad = true;
246
+ this.hasBottomPad = true;
247
+ }
248
+ /**
249
+ * Initializes a new instance of the `PdfPaddings` class.
250
+ *
251
+ * @private
252
+ */
253
+ public constructor()
254
+ /**
255
+ * Initializes a new instance of the `PdfPaddings` class.
256
+ *
257
+ * @private
258
+ */
259
+ public constructor(left: number, right: number, top: number, bottom: number)
260
+ public constructor(left?: number, right?: number, top?: number, bottom?: number) {
261
+ if (typeof left === 'undefined') {
262
+ //5.76 and 0 are taken from ms-word default table margins.
263
+ this.leftPad = this.rightPad = 5.76;
264
+ //0.5 is set for top and bottom by default.
265
+ this.bottomPad = this.topPad = 0.5;
266
+ } else {
267
+ this.leftPad = left;
268
+ this.rightPad = right;
269
+ this.topPad = top;
270
+ this.bottomPad = bottom;
271
+ this.hasLeftPad = true;
272
+ this.hasRightPad = true;
273
+ this.hasTopPad = true;
274
+ this.hasBottomPad = true;
275
+ }
276
+ }
277
+ }