tg-ganttchart 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tg-ganttchart",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Vue js compnonet for dynamic list in which we can provide and schema and data. It will render the table view according to the dynamic fields",
5
5
  "main": "./dist/tgganttchart.umd.cjs",
6
6
  "module": "./dist/tgganttchart.es.js",
@@ -18,6 +18,7 @@
18
18
  "dependencies": {
19
19
  "core-js": "^3.8.3",
20
20
  "dayjs": "^1.11.13",
21
+ "dotenv-webpack": "^8.1.0",
21
22
  "resize-observer-polyfill": "^1.5.1",
22
23
  "vue": "^2.6.10",
23
24
  "vue-loader": "^15.11.1",
@@ -161,7 +161,7 @@ export default {
161
161
  created() {
162
162
  debugger; // eslint-disable-line no-debugger
163
163
  console.log("this.localScale", this.root);
164
- this.localScale = this.root.state.options?.times?.timeZoom;
164
+ this.localScale = this.root.state.options.times.timeZoom;
165
165
  this.localHeight = this.root.state.options.row.height;
166
166
  this.localBefore = this.root.state.options.scope.before;
167
167
  this.localPercent = this.root.state.options.taskList.percent;
@@ -53,7 +53,7 @@ export default {
53
53
  },
54
54
  methods: {
55
55
  emitEvent(eventName, event) {
56
- const eventHandler = this.column.events?.[eventName];
56
+ const eventHandler = this.column.events.eventName;
57
57
  if (eventHandler) {
58
58
  eventHandler({ event, data: this.task, column: this.column });
59
59
  }
@@ -0,0 +1,308 @@
1
+
2
+ export default function getStyle(fontSize = '12px', fontFamily = 'Arial, sans-serif') {
3
+ return {
4
+ fontSize,
5
+ fontFamily,
6
+ 'main-view': {
7
+ background: '#FFFFFF'
8
+ },
9
+ 'main-container-wrapper': {
10
+ overflow: 'hidden',
11
+ 'border-top': '1px solid #eee',
12
+ 'border-bottom': '1px solid #eee'
13
+ },
14
+ 'main-container': {
15
+ float: 'left',
16
+ 'max-width': '100%'
17
+ },
18
+ 'main-view-container': {},
19
+ container: {
20
+ display: 'flex',
21
+ 'max-width': '100%',
22
+ height: '100%'
23
+ },
24
+ 'calendar-wrapper': {
25
+ 'user-select': 'none'
26
+ },
27
+ calendar: {
28
+ width: '100%',
29
+ background: '#f3f5f7',
30
+ display: 'block'
31
+ },
32
+ 'calendar-row': {
33
+ display: 'flex',
34
+ 'justify-content': 'space-evenly'
35
+ },
36
+ 'calendar-row--month': {},
37
+ 'calendar-row--day': {},
38
+ 'calendar-row--hour': {
39
+ 'border-bottom': '1px solid #eee'
40
+ },
41
+ 'calendar-row-rect': {
42
+ background: 'transparent',
43
+ display: 'flex'
44
+ },
45
+ 'calendar-row-rect--month': {},
46
+ 'calendar-row-rect--day': {},
47
+ 'calendar-row-rect--hour': {},
48
+ 'calendar-row-rect-child': {
49
+ display: 'block',
50
+ 'border-right-width': '1px', // Calendar
51
+ 'border-right-color': '#dadada',
52
+ 'border-right-style': 'solid',
53
+ position: 'relative'
54
+ },
55
+ 'calendar-row-rect-child--month': {},
56
+ 'calendar-row-rect-child--day': { 'text-align': 'center' },
57
+ 'calendar-row-rect-child--hour': { 'text-align': 'center' },
58
+ 'calendar-row-text': {
59
+ 'font-family': fontFamily, // GanttElastic
60
+ 'font-size': fontSize, //GanttElastic
61
+ color: '#606060',
62
+ display: 'inline-block',
63
+ position: 'relative'
64
+ },
65
+ 'calendar-row-text--month': {},
66
+ 'calendar-row-text--day': {},
67
+ 'calendar-row-text--hour': {},
68
+ 'task-list-wrapper': {},
69
+ 'task-list': { background: 'transparent', 'border-color': '#eee' },
70
+ 'task-list-header': {
71
+ display: 'flex',
72
+ 'user-select': 'none',
73
+ 'vertical-align': 'middle',
74
+ 'border-bottom': '1px solid #eee',
75
+ 'border-left': '1px solid #eee'
76
+ },
77
+ 'task-list-header-column': {
78
+ 'border-left': '1px solid #00000050',
79
+ 'box-sizing': 'border-box',
80
+ display: 'flex',
81
+ background: '#f3f5f7',
82
+ 'border-color': 'transparent'
83
+ },
84
+ 'task-list-expander-wrapper': {
85
+ display: 'inline-flex',
86
+ 'flex-shrink': '0',
87
+ 'box-sizing': 'border-box',
88
+ margin: '0 0 0 10px'
89
+ },
90
+ 'task-list-expander-content': {
91
+ display: 'inline-flex',
92
+ cursor: 'pointer',
93
+ margin: 'auto 0px',
94
+ 'box-sizing': 'border-box',
95
+ 'user-select': 'none'
96
+ },
97
+ 'task-list-expander-line': {
98
+ fill: 'transparent',
99
+ stroke: '#000000',
100
+ 'stroke-width': '1',
101
+ 'stroke-linecap': 'round'
102
+ },
103
+ 'task-list-expander-border': {
104
+ fill: '#ffffffa0',
105
+ stroke: '#000000A0'
106
+ },
107
+ 'chart-expander-wrapper': {
108
+ display: 'block',
109
+ 'line-height': '1',
110
+ 'box-sizing': 'border-box',
111
+ margin: '0'
112
+ },
113
+ 'chart-expander-content': {
114
+ display: 'inline-flex',
115
+ cursor: 'pointer',
116
+ margin: 'auto 0px',
117
+ 'box-sizing': 'border-box',
118
+ 'user-select': 'none'
119
+ },
120
+ 'chart-expander-line': {
121
+ fill: 'transparent',
122
+ stroke: '#000000',
123
+ 'stroke-width': '1',
124
+ 'stroke-linecap': 'round'
125
+ },
126
+ 'chart-expander-border': {
127
+ fill: '#ffffffa0',
128
+ stroke: '#000000A0'
129
+ },
130
+ 'task-list-container': {},
131
+ 'task-list-header-label': {
132
+ overflow: 'hidden',
133
+ 'text-overflow': 'ellipsis',
134
+ 'font-family': fontFamily,
135
+ 'font-size': fontSize,
136
+ 'box-sizing': 'border-box',
137
+ margin: 'auto 6px',
138
+ 'flex-grow': '1',
139
+ 'vertical-align': 'middle'
140
+ },
141
+ 'task-list-header-resizer-wrapper': {
142
+ background: 'transparent',
143
+ height: '100%',
144
+ width: '6px',
145
+ cursor: 'col-resize',
146
+ display: 'inline-flex',
147
+ 'vertical-align': 'center'
148
+ },
149
+ 'task-list-header-resizer': { margin: 'auto 0px' },
150
+ 'task-list-header-resizer-dot': {
151
+ width: '3px',
152
+ height: '3px',
153
+ background: '#ddd',
154
+ 'border-radius': '100%',
155
+ margin: '4px 0px'
156
+ },
157
+ 'task-list-items': {
158
+ overflow: 'hidden'
159
+ },
160
+ 'task-list-item': {
161
+ 'border-top': '1px solid #eee',
162
+ 'border-right': '1px solid #eee',
163
+ 'box-sizing': 'border-box',
164
+ display: 'flex',
165
+ background: 'transparent'
166
+ },
167
+ 'task-list-item-column': {
168
+ display: 'inline-flex',
169
+ 'flex-shrink': '0',
170
+ 'border-left': '1px solid #00000050',
171
+ 'box-sizing': 'border-box',
172
+ 'border-color': '#eee'
173
+ },
174
+ 'task-list-item-value-wrapper': {
175
+ overflow: 'hidden',
176
+ display: 'flex',
177
+ width: '100%'
178
+ },
179
+ 'task-list-item-value-container': {
180
+ margin: 'auto 0px',
181
+ overflow: 'hidden'
182
+ },
183
+ 'task-list-item-value': {
184
+ display: 'block',
185
+ 'flex-shrink': '100',
186
+ 'font-family': fontFamily,
187
+ 'font-size': fontSize,
188
+ 'margin-top': 'auto',
189
+ 'margin-bottom': 'auto',
190
+ 'margin-left': '6px', // TaskList
191
+ 'margin-right': '6px',
192
+ overflow: 'hidden',
193
+ 'text-overflow': 'ellipsis',
194
+ 'line-height': '1.5em',
195
+ 'word-break': 'keep-all',
196
+ 'white-space': 'nowrap',
197
+ color: '#606060',
198
+ background: '#FFFFFF'
199
+ },
200
+ 'grid-lines': {},
201
+ 'grid-line-horizontal': {
202
+ stroke: '#00000010',
203
+ 'stroke-width': 1
204
+ },
205
+ 'grid-line-vertical': {
206
+ stroke: '#00000010',
207
+ 'stroke-width': 1
208
+ },
209
+ 'grid-line-time': {
210
+ stroke: '#FF000080',
211
+ 'stroke-width': 1
212
+ },
213
+ chart: {
214
+ 'user-select': 'none',
215
+ overflow: 'hidden'
216
+ },
217
+ 'chart-calendar-container': {
218
+ 'user-select': 'none',
219
+ overflow: 'hidden',
220
+ 'max-width': '100%',
221
+ 'border-right': '1px solid #eee'
222
+ },
223
+ 'chart-graph-container': {
224
+ 'user-select': 'none',
225
+ overflow: 'hidden',
226
+ 'max-width': '100%',
227
+ 'border-right': '1px solid #eee'
228
+ },
229
+ 'chart-area': {},
230
+ 'chart-graph': {
231
+ overflow: 'hidden'
232
+ },
233
+ 'chart-row-text-wrapper': {},
234
+ 'chart-row-text': {
235
+ background: '#ffffffa0',
236
+ 'border-radius': '10px',
237
+ 'font-family': fontFamily,
238
+ 'font-size': fontSize,
239
+ 'font-weight': 'normal',
240
+ color: '#000000a0',
241
+ height: '100%',
242
+ display: 'inline-block'
243
+ },
244
+ 'chart-row-text-content': {
245
+ padding: '0px 6px'
246
+ },
247
+ 'chart-row-text-content--text': {},
248
+ 'chart-row-text-content--html': {},
249
+ 'chart-row-wrapper': {},
250
+ 'chart-row-bar-wrapper': {},
251
+ 'chart-row-bar': {},
252
+ 'chart-row-bar-polygon': {
253
+ stroke: '#E74C3C',
254
+ 'stroke-width': 1,
255
+ fill: '#F75C4C'
256
+ },
257
+ 'chart-row-project-wrapper': {},
258
+ 'chart-row-project': {},
259
+ 'chart-row-project-polygon': {},
260
+ 'chart-row-milestone-wrapper': {},
261
+ 'chart-row-milestone': {},
262
+ 'chart-row-milestone-polygon': {},
263
+ 'chart-row-task-wrapper': {},
264
+ 'chart-row-task': {},
265
+ 'chart-row-task-polygon': {},
266
+ 'chart-row-progress-bar-wrapper': {},
267
+ 'chart-row-progress-bar': {},
268
+ 'chart-row-progress-bar-line': {
269
+ stroke: '#ffffff25',
270
+ 'stroke-width': 20
271
+ },
272
+ 'chart-row-progress-bar-solid': {
273
+ fill: '#0EAC51',
274
+ height: '20%'
275
+ },
276
+ 'chart-row-progress-bar-pattern': {
277
+ fill: 'url(#diagonalHatch)',
278
+ transform: 'translateY(0.1) scaleY(0.8)'
279
+ },
280
+ 'chart-row-progress-bar-outline': {
281
+ stroke: '#E74C3C',
282
+ 'stroke-width': 1
283
+ },
284
+ 'chart-dependency-lines-wrapper': {},
285
+ 'chart-dependency-lines-path': {
286
+ fill: 'transparent',
287
+ stroke: '#FFa00090',
288
+ 'stroke-width': 2
289
+ },
290
+ 'chart-scroll-container': {},
291
+ 'chart-scroll-container--horizontal': {
292
+ overflow: 'auto',
293
+ 'max-width': '100%'
294
+ },
295
+ 'chart-scroll-container--vertical': {
296
+ 'overflow-y': 'auto',
297
+ 'overflow-x': 'hidden',
298
+ 'max-height': '100%',
299
+ float: 'right'
300
+ },
301
+ 'chart-days-highlight-rect': {
302
+ fill: '#f3f5f780'
303
+ },
304
+ 'slot-header-beforeOptions': {
305
+ display: 'inline-block'
306
+ }
307
+ };
308
+ }