@sme.up/ketchup 7.4.1 → 7.4.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/dist/cjs/{f-button-5856cd74.js → f-button-daddd700.js} +2 -2
- package/dist/cjs/{f-cell-9d7a9e97.js → f-cell-3682fad4.js} +6 -6
- package/dist/cjs/{f-checkbox-1148e791.js → f-checkbox-593f72c3.js} +1 -1
- package/dist/cjs/{f-chip-675ed121.js → f-chip-9d540d94.js} +3 -3
- package/dist/cjs/{f-image-48facc89.js → f-image-7b42d149.js} +2 -2
- package/dist/cjs/{f-paginator-utils-0c1227f6.js → f-paginator-utils-1baeba0f.js} +3 -3
- package/dist/cjs/{f-text-field-3d8e7417.js → f-text-field-a6ed2d22.js} +2 -2
- package/dist/cjs/{index-1f177abc.js → index-74433248.js} +3 -0
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +3 -3
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +9 -9
- package/dist/cjs/kup-box.cjs.entry.js +10 -10
- package/dist/cjs/kup-calendar.cjs.entry.js +5 -5
- package/dist/cjs/kup-cell.cjs.entry.js +7 -7
- package/dist/cjs/kup-dash-list.cjs.entry.js +2 -2
- package/dist/cjs/kup-dash_2.cjs.entry.js +2 -2
- package/dist/cjs/kup-dashboard.cjs.entry.js +6 -6
- package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
- package/dist/cjs/kup-echart.cjs.entry.js +2 -2
- package/dist/cjs/kup-family-tree.cjs.entry.js +4 -4
- package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
- package/dist/cjs/kup-image-list.cjs.entry.js +8 -8
- package/dist/cjs/kup-lazy.cjs.entry.js +2 -2
- package/dist/cjs/kup-magic-box.cjs.entry.js +3 -3
- package/dist/cjs/{kup-manager-22bb9699.js → kup-manager-10351449.js} +1 -1
- package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
- package/dist/cjs/kup-photo-frame.cjs.entry.js +2 -2
- package/dist/cjs/kup-planner.cjs.entry.js +969 -544
- package/dist/cjs/kup-probe.cjs.entry.js +2 -2
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +4 -4
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/kup-planner/kup-planner-declarations.js +45 -14
- package/dist/collection/components/kup-planner/kup-planner-helper.js +54 -0
- package/dist/collection/components/kup-planner/kup-planner.css +16 -18
- package/dist/collection/components/kup-planner/kup-planner.js +424 -62
- package/dist/components/kup-autocomplete2.js +1 -1
- package/dist/components/kup-planner.js +968 -532
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-spinner.js +1 -1
- package/dist/components/kup-switch.js +1 -1
- package/dist/components/kup-tab-bar.js +1 -1
- package/dist/components/kup-text-field.js +1 -1
- package/dist/components/kup-time-picker.js +1 -1
- package/dist/components/kup-tree.js +1 -1
- package/dist/esm/{f-button-eedbdba1.js → f-button-8d15b5a0.js} +2 -2
- package/dist/esm/{f-cell-90a418d2.js → f-cell-7b706e57.js} +6 -6
- package/dist/esm/{f-checkbox-9b3f5f5b.js → f-checkbox-ec85b437.js} +1 -1
- package/dist/esm/{f-chip-45e7b3f6.js → f-chip-c671fe90.js} +3 -3
- package/dist/esm/{f-image-3026f0fe.js → f-image-21451b15.js} +2 -2
- package/dist/esm/{f-paginator-utils-6369da7c.js → f-paginator-utils-92bbf277.js} +3 -3
- package/dist/esm/{f-text-field-3b70a6f0.js → f-text-field-0bb2d109.js} +2 -2
- package/dist/esm/{index-8bd38435.js → index-b326ffc9.js} +3 -1
- package/dist/esm/ketchup.js +4 -4
- package/dist/esm/kup-accordion.entry.js +3 -3
- package/dist/esm/kup-autocomplete_27.entry.js +9 -9
- package/dist/esm/kup-box.entry.js +10 -10
- package/dist/esm/kup-calendar.entry.js +5 -5
- package/dist/esm/kup-cell.entry.js +7 -7
- package/dist/esm/kup-dash-list.entry.js +2 -2
- package/dist/esm/kup-dash_2.entry.js +2 -2
- package/dist/esm/kup-dashboard.entry.js +6 -6
- package/dist/esm/kup-drawer.entry.js +2 -2
- package/dist/esm/kup-echart.entry.js +2 -2
- package/dist/esm/kup-family-tree.entry.js +4 -4
- package/dist/esm/kup-iframe.entry.js +2 -2
- package/dist/esm/kup-image-list.entry.js +8 -8
- package/dist/esm/kup-lazy.entry.js +2 -2
- package/dist/esm/kup-magic-box.entry.js +3 -3
- package/dist/esm/{kup-manager-cad802b1.js → kup-manager-6145d980.js} +1 -1
- package/dist/esm/kup-nav-bar.entry.js +2 -2
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-photo-frame.entry.js +2 -2
- package/dist/esm/kup-planner.entry.js +957 -532
- package/dist/esm/kup-probe.entry.js +2 -2
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +4 -4
- package/dist/esm/loader.js +4 -4
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-02a26d59.entry.js +9 -0
- package/dist/ketchup/{p-1ad48de4.entry.js → p-0c1cbf8b.entry.js} +1 -1
- package/dist/ketchup/{p-97afbd71.entry.js → p-0c9b7c80.entry.js} +1 -1
- package/dist/ketchup/{p-138ac8b9.entry.js → p-1242366a.entry.js} +1 -1
- package/dist/ketchup/{p-fe34fa6e.entry.js → p-281cff81.entry.js} +1 -1
- package/dist/ketchup/{p-73becdb8.entry.js → p-2915a66a.entry.js} +1 -1
- package/dist/ketchup/{p-d0f4457e.entry.js → p-2a2dc2a8.entry.js} +1 -1
- package/dist/ketchup/{p-a89f0884.entry.js → p-32517a99.entry.js} +1 -1
- package/dist/ketchup/{p-eea29062.entry.js → p-439ac105.entry.js} +1 -1
- package/dist/ketchup/p-462475ac.entry.js +10 -0
- package/dist/ketchup/{p-9f1184cd.entry.js → p-4d039705.entry.js} +6 -6
- package/dist/ketchup/p-5292ef67.js +30 -0
- package/dist/ketchup/{p-263b2c73.entry.js → p-76bf53df.entry.js} +1 -1
- package/dist/ketchup/{p-a1adab40.js → p-7cfdce27.js} +1 -1
- package/dist/ketchup/{p-4505a48d.js → p-826c91d7.js} +1 -1
- package/dist/ketchup/p-849ad5d8.entry.js +1 -0
- package/dist/ketchup/{p-c1d8fd43.entry.js → p-89ac80c1.entry.js} +1 -1
- package/dist/ketchup/p-9f00ad0f.js +1 -0
- package/dist/ketchup/{p-23288eed.entry.js → p-a641780a.entry.js} +1 -1
- package/dist/ketchup/{p-32dc31ad.js → p-ae4fffe0.js} +1 -1
- package/dist/ketchup/p-be61dd36.entry.js +39 -0
- package/dist/ketchup/{p-bb6921bc.entry.js → p-c022824e.entry.js} +1 -1
- package/dist/ketchup/{p-b1da7902.entry.js → p-c222d070.entry.js} +1 -1
- package/dist/ketchup/{p-9f9b6656.js → p-c26975bf.js} +1 -1
- package/dist/ketchup/{p-7bd28eac.js → p-c4d9e3e2.js} +1 -1
- package/dist/ketchup/{p-9dcfbb1e.js → p-d4ece435.js} +2 -2
- package/dist/ketchup/{p-2d8b5bba.entry.js → p-d87fb5ff.entry.js} +1 -1
- package/dist/ketchup/{p-b0675bce.entry.js → p-da37c417.entry.js} +1 -1
- package/dist/ketchup/{p-1cd45a72.entry.js → p-e4975ffa.entry.js} +1 -1
- package/dist/ketchup/{p-4e68f629.entry.js → p-e83e70e2.entry.js} +1 -1
- package/dist/ketchup/{p-ae3e0d31.js → p-ea16ddc0.js} +1 -1
- package/dist/types/components/kup-planner/kup-planner-declarations.d.ts +54 -15
- package/dist/types/components/kup-planner/kup-planner-helper.d.ts +6 -0
- package/dist/types/components/kup-planner/kup-planner.d.ts +118 -3
- package/dist/types/components.d.ts +234 -2
- package/package.json +6 -4
- package/dist/ketchup/p-2217be0a.entry.js +0 -1
- package/dist/ketchup/p-a7ae0b4d.js +0 -1
- package/dist/ketchup/p-b63a5a44.js +0 -30
- package/dist/ketchup/p-cb6c8417.entry.js +0 -10
- package/dist/ketchup/p-fd948af0.entry.js +0 -9
- package/dist/ketchup/p-ff11d6d0.entry.js +0 -39
|
@@ -14,15 +14,17 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
14
14
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15
15
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
16
16
|
};
|
|
17
|
-
var _KupPlanner_instances, _KupPlanner_kupManager, _KupPlanner_rootPlanner, _KupPlanner_lastOnChangeReceived, _KupPlanner_renderReactPlannerElement, _KupPlanner_toTasks, _KupPlanner_getTask, _KupPlanner_removePhases, _KupPlanner_handleOnClickOnTask, _KupPlanner_handleOnClickOnPhase, _KupPlanner_emitOnChangeEventsReceived;
|
|
17
|
+
var _KupPlanner_instances, _KupPlanner_kupManager, _KupPlanner_rootPlanner, _KupPlanner_lastOnChangeReceived, _KupPlanner_renderReactPlannerElement, _KupPlanner_toTasks, _KupPlanner_toDetails, _KupPlanner_getTask, _KupPlanner_removePhases, _KupPlanner_handleOnClickOnTask, _KupPlanner_handleOnClickOnPhase, _KupPlanner_handleOnClickOnDetail, _KupPlanner_emitOnChangeEventsReceived;
|
|
18
18
|
import { forceUpdate, h, Host, } from '@stencil/core';
|
|
19
19
|
import { kupManagerInstance, } from '../../managers/kup-manager/kup-manager';
|
|
20
|
-
import { KupPlannerLastOnChangeReceived, KupPlannerProps, KupPlannerTaskAction, } from './kup-planner-declarations';
|
|
20
|
+
import { defaultStylingOptions, KupPlannerLastOnChangeReceived, KupPlannerProps, KupPlannerTaskAction, KupPlannerGanttRowType, } from './kup-planner-declarations';
|
|
21
21
|
import { getProps, setProps } from '../../utils/utils';
|
|
22
22
|
import { componentWrapperId } from '../../variables/GenericVariables';
|
|
23
23
|
import { createRoot } from 'react-dom/client';
|
|
24
24
|
import React from 'react';
|
|
25
25
|
import { Planner, } from '@sme.up/gantt-component';
|
|
26
|
+
import { getCellValueForDisplay } from '../../utils/cell-utils';
|
|
27
|
+
import { getValuesToShow, isAtLeastOneDateValid, sanitizeAllDates, } from './kup-planner-helper';
|
|
26
28
|
export class KupPlanner {
|
|
27
29
|
constructor() {
|
|
28
30
|
_KupPlanner_instances.add(this);
|
|
@@ -35,7 +37,16 @@ export class KupPlanner {
|
|
|
35
37
|
this.plannerProps = undefined;
|
|
36
38
|
this.customStyle = '';
|
|
37
39
|
this.data = undefined;
|
|
38
|
-
this.
|
|
40
|
+
this.detailData = undefined;
|
|
41
|
+
this.detailColorCol = undefined;
|
|
42
|
+
this.detailColumns = undefined;
|
|
43
|
+
this.detailDates = undefined;
|
|
44
|
+
this.detailHeight = undefined;
|
|
45
|
+
this.detailIdCol = undefined;
|
|
46
|
+
this.detailNameCol = undefined;
|
|
47
|
+
this.detailPrevDates = undefined;
|
|
48
|
+
this.listCellWidth = '300px';
|
|
49
|
+
this.maxWidth = '90vw';
|
|
39
50
|
this.phaseColorCol = undefined;
|
|
40
51
|
this.phaseColumns = undefined;
|
|
41
52
|
this.phaseColParDep = undefined;
|
|
@@ -43,8 +54,10 @@ export class KupPlanner {
|
|
|
43
54
|
this.phaseIdCol = undefined;
|
|
44
55
|
this.phaseNameCol = undefined;
|
|
45
56
|
this.phasePrevDates = undefined;
|
|
57
|
+
this.showSecondaryDates = false;
|
|
46
58
|
this.taskColumns = undefined;
|
|
47
59
|
this.taskDates = undefined;
|
|
60
|
+
this.taskHeight = undefined;
|
|
48
61
|
this.taskIdCol = undefined;
|
|
49
62
|
this.taskNameCol = undefined;
|
|
50
63
|
this.taskPrevDates = undefined;
|
|
@@ -98,21 +111,29 @@ export class KupPlanner {
|
|
|
98
111
|
var _a;
|
|
99
112
|
const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
|
|
100
113
|
if (task) {
|
|
101
|
-
task.phases = (_a = data.rows) === null || _a === void 0 ? void 0 : _a.map((row) => {
|
|
114
|
+
task.phases = (_a = data.rows) === null || _a === void 0 ? void 0 : _a.filter((row) => isAtLeastOneDateValid(row.cells[this.phaseDates[0]], row.cells[this.phaseDates[1]])).map((row) => {
|
|
115
|
+
const datesSanitized = sanitizeAllDates(row.cells[this.phaseDates[0]], row.cells[this.phaseDates[1]], row.cells[this.phasePrevDates[0]], row.cells[this.phasePrevDates[1]]);
|
|
116
|
+
const valuesToShow = getValuesToShow(row, this.phaseIdCol, this.phaseNameCol, data.columns, this.phaseColumns, () => this.phaseColumns.map((col) => col == this.phaseDates[0]
|
|
117
|
+
? '#START#'
|
|
118
|
+
: col == this.phaseDates[1]
|
|
119
|
+
? '#END#'
|
|
120
|
+
: getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
|
|
102
121
|
let phase = {
|
|
103
122
|
taskRow: task.taskRow,
|
|
104
123
|
phaseRow: row,
|
|
105
|
-
id: row.cells[this.phaseIdCol].value,
|
|
124
|
+
id: task.id + '_' + row.cells[this.phaseIdCol].value,
|
|
106
125
|
phaseRowId: row.id,
|
|
107
126
|
taskRowId: task.taskRowId,
|
|
108
127
|
name: row.cells[this.phaseNameCol].value,
|
|
109
|
-
startDate:
|
|
110
|
-
endDate:
|
|
111
|
-
secondaryStartDate:
|
|
112
|
-
secondaryEndDate:
|
|
113
|
-
type: '
|
|
128
|
+
startDate: datesSanitized.dateValues[0],
|
|
129
|
+
endDate: datesSanitized.dateValues[1],
|
|
130
|
+
secondaryStartDate: datesSanitized.secDateValues[0],
|
|
131
|
+
secondaryEndDate: datesSanitized.secDateValues[1],
|
|
132
|
+
type: 'task',
|
|
114
133
|
color: row.cells[this.phaseColorCol].value,
|
|
115
|
-
|
|
134
|
+
selectedColor: row.cells[this.phaseColorCol].value,
|
|
135
|
+
valuesToShow: valuesToShow,
|
|
136
|
+
rowType: KupPlannerGanttRowType.PHASE,
|
|
116
137
|
};
|
|
117
138
|
return phase;
|
|
118
139
|
});
|
|
@@ -121,8 +142,8 @@ export class KupPlanner {
|
|
|
121
142
|
}
|
|
122
143
|
handleOnClick(nativeEvent) {
|
|
123
144
|
console.log('handleOnClick', nativeEvent);
|
|
124
|
-
switch (nativeEvent.
|
|
125
|
-
case
|
|
145
|
+
switch (nativeEvent.rowType) {
|
|
146
|
+
case KupPlannerGanttRowType.TASK:
|
|
126
147
|
const taskAction = nativeEvent.phases
|
|
127
148
|
? KupPlannerTaskAction.onClosing
|
|
128
149
|
: KupPlannerTaskAction.onOpening;
|
|
@@ -130,11 +151,16 @@ export class KupPlanner {
|
|
|
130
151
|
this.onKupClick(nativeEvent, taskAction);
|
|
131
152
|
}
|
|
132
153
|
break;
|
|
133
|
-
case
|
|
154
|
+
case KupPlannerGanttRowType.PHASE:
|
|
134
155
|
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnPhase).call(this)) {
|
|
135
156
|
this.onKupClick(nativeEvent);
|
|
136
157
|
}
|
|
137
158
|
break;
|
|
159
|
+
case KupPlannerGanttRowType.DETAIL:
|
|
160
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnDetail).call(this)) {
|
|
161
|
+
this.onKupClick(nativeEvent);
|
|
162
|
+
}
|
|
163
|
+
break;
|
|
138
164
|
}
|
|
139
165
|
}
|
|
140
166
|
handleOnDateChange(nativeEvent) {
|
|
@@ -148,12 +174,34 @@ export class KupPlanner {
|
|
|
148
174
|
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.register(this);
|
|
149
175
|
}
|
|
150
176
|
componentDidLoad() {
|
|
177
|
+
let details = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toDetails).call(this, this.detailData);
|
|
178
|
+
if (details && details.length == 0) {
|
|
179
|
+
details = undefined;
|
|
180
|
+
}
|
|
151
181
|
this.plannerProps = {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
182
|
+
mainGantt: {
|
|
183
|
+
title: this.titleMess,
|
|
184
|
+
items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toTasks).call(this, this.data),
|
|
185
|
+
stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
|
|
186
|
+
hideLabel: true,
|
|
187
|
+
ganttHeight: this.taskHeight,
|
|
188
|
+
showSecondaryDates: this.showSecondaryDates,
|
|
189
|
+
onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
|
|
190
|
+
onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
|
|
191
|
+
},
|
|
192
|
+
secondaryGantt: details
|
|
193
|
+
? {
|
|
194
|
+
title: '',
|
|
195
|
+
items: details,
|
|
196
|
+
stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
|
|
197
|
+
hideLabel: true,
|
|
198
|
+
ganttHeight: this.detailHeight,
|
|
199
|
+
onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
|
|
200
|
+
onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
|
|
201
|
+
}
|
|
202
|
+
: undefined,
|
|
156
203
|
};
|
|
204
|
+
console.log('kup-planner.tsx componentDidLoad plannerProps', this.plannerProps);
|
|
157
205
|
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_renderReactPlannerElement).call(this);
|
|
158
206
|
this.kupReady.emit({
|
|
159
207
|
comp: this,
|
|
@@ -169,7 +217,8 @@ export class KupPlanner {
|
|
|
169
217
|
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logRender(this, true);
|
|
170
218
|
}
|
|
171
219
|
render() {
|
|
172
|
-
|
|
220
|
+
//console.log('kup-planner.tsx render');
|
|
221
|
+
return (h(Host, null, h("div", { id: componentWrapperId, style: { maxWidth: this.maxWidth } })));
|
|
173
222
|
}
|
|
174
223
|
disconnectedCallback() {
|
|
175
224
|
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.unregister(this);
|
|
@@ -228,27 +277,212 @@ export class KupPlanner {
|
|
|
228
277
|
"required": false,
|
|
229
278
|
"optional": false,
|
|
230
279
|
"docs": {
|
|
231
|
-
"tags": [
|
|
232
|
-
|
|
280
|
+
"tags": [{
|
|
281
|
+
"name": "default",
|
|
282
|
+
"text": "null"
|
|
283
|
+
}],
|
|
284
|
+
"text": "Dataset containg the tasks list"
|
|
233
285
|
}
|
|
234
286
|
},
|
|
235
|
-
"
|
|
236
|
-
"type": "
|
|
287
|
+
"detailData": {
|
|
288
|
+
"type": "unknown",
|
|
237
289
|
"mutable": false,
|
|
238
290
|
"complexType": {
|
|
239
|
-
"original": "
|
|
240
|
-
"resolved": "
|
|
291
|
+
"original": "KupDataDataset",
|
|
292
|
+
"resolved": "KupDataDataset",
|
|
293
|
+
"references": {
|
|
294
|
+
"KupDataDataset": {
|
|
295
|
+
"location": "import",
|
|
296
|
+
"path": "../../managers/kup-data/kup-data-declarations"
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
"required": false,
|
|
301
|
+
"optional": false,
|
|
302
|
+
"docs": {
|
|
303
|
+
"tags": [{
|
|
304
|
+
"name": "default",
|
|
305
|
+
"text": "null"
|
|
306
|
+
}],
|
|
307
|
+
"text": "Dataset containg the details list"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"detailColorCol": {
|
|
311
|
+
"type": "string",
|
|
312
|
+
"mutable": false,
|
|
313
|
+
"complexType": {
|
|
314
|
+
"original": "string",
|
|
315
|
+
"resolved": "string",
|
|
241
316
|
"references": {}
|
|
242
317
|
},
|
|
243
318
|
"required": false,
|
|
244
319
|
"optional": false,
|
|
245
320
|
"docs": {
|
|
246
|
-
"tags": [
|
|
247
|
-
|
|
321
|
+
"tags": [{
|
|
322
|
+
"name": "default",
|
|
323
|
+
"text": "null"
|
|
324
|
+
}],
|
|
325
|
+
"text": "Column containing the detail color, in hex format"
|
|
326
|
+
},
|
|
327
|
+
"attribute": "detail-color-col",
|
|
328
|
+
"reflect": false
|
|
329
|
+
},
|
|
330
|
+
"detailColumns": {
|
|
331
|
+
"type": "unknown",
|
|
332
|
+
"mutable": false,
|
|
333
|
+
"complexType": {
|
|
334
|
+
"original": "string[]",
|
|
335
|
+
"resolved": "string[]",
|
|
336
|
+
"references": {}
|
|
337
|
+
},
|
|
338
|
+
"required": false,
|
|
339
|
+
"optional": false,
|
|
340
|
+
"docs": {
|
|
341
|
+
"tags": [{
|
|
342
|
+
"name": "default",
|
|
343
|
+
"text": "null"
|
|
344
|
+
}],
|
|
345
|
+
"text": "Columns containing informations displayed in the left box, near the gantt of details"
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
"detailDates": {
|
|
349
|
+
"type": "unknown",
|
|
350
|
+
"mutable": false,
|
|
351
|
+
"complexType": {
|
|
352
|
+
"original": "string[]",
|
|
353
|
+
"resolved": "string[]",
|
|
354
|
+
"references": {}
|
|
355
|
+
},
|
|
356
|
+
"required": false,
|
|
357
|
+
"optional": false,
|
|
358
|
+
"docs": {
|
|
359
|
+
"tags": [{
|
|
360
|
+
"name": "default",
|
|
361
|
+
"text": "null"
|
|
362
|
+
}],
|
|
363
|
+
"text": "Columns containing detail duration, from (firstDate) to (secondDate)"
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
"detailHeight": {
|
|
367
|
+
"type": "number",
|
|
368
|
+
"mutable": false,
|
|
369
|
+
"complexType": {
|
|
370
|
+
"original": "number",
|
|
371
|
+
"resolved": "number",
|
|
372
|
+
"references": {}
|
|
373
|
+
},
|
|
374
|
+
"required": false,
|
|
375
|
+
"optional": false,
|
|
376
|
+
"docs": {
|
|
377
|
+
"tags": [{
|
|
378
|
+
"name": "default",
|
|
379
|
+
"text": "null"
|
|
380
|
+
}],
|
|
381
|
+
"text": "Height for detail gantt"
|
|
382
|
+
},
|
|
383
|
+
"attribute": "detail-height",
|
|
384
|
+
"reflect": false
|
|
385
|
+
},
|
|
386
|
+
"detailIdCol": {
|
|
387
|
+
"type": "string",
|
|
388
|
+
"mutable": false,
|
|
389
|
+
"complexType": {
|
|
390
|
+
"original": "string",
|
|
391
|
+
"resolved": "string",
|
|
392
|
+
"references": {}
|
|
393
|
+
},
|
|
394
|
+
"required": false,
|
|
395
|
+
"optional": false,
|
|
396
|
+
"docs": {
|
|
397
|
+
"tags": [{
|
|
398
|
+
"name": "default",
|
|
399
|
+
"text": "null"
|
|
400
|
+
}],
|
|
401
|
+
"text": "Column containing unique detail identifier"
|
|
248
402
|
},
|
|
249
|
-
"attribute": "
|
|
403
|
+
"attribute": "detail-id-col",
|
|
250
404
|
"reflect": false
|
|
251
405
|
},
|
|
406
|
+
"detailNameCol": {
|
|
407
|
+
"type": "string",
|
|
408
|
+
"mutable": false,
|
|
409
|
+
"complexType": {
|
|
410
|
+
"original": "string",
|
|
411
|
+
"resolved": "string",
|
|
412
|
+
"references": {}
|
|
413
|
+
},
|
|
414
|
+
"required": false,
|
|
415
|
+
"optional": false,
|
|
416
|
+
"docs": {
|
|
417
|
+
"tags": [{
|
|
418
|
+
"name": "default",
|
|
419
|
+
"text": "null"
|
|
420
|
+
}],
|
|
421
|
+
"text": "Column containing detail name displayed"
|
|
422
|
+
},
|
|
423
|
+
"attribute": "detail-name-col",
|
|
424
|
+
"reflect": false
|
|
425
|
+
},
|
|
426
|
+
"detailPrevDates": {
|
|
427
|
+
"type": "unknown",
|
|
428
|
+
"mutable": false,
|
|
429
|
+
"complexType": {
|
|
430
|
+
"original": "string[]",
|
|
431
|
+
"resolved": "string[]",
|
|
432
|
+
"references": {}
|
|
433
|
+
},
|
|
434
|
+
"required": false,
|
|
435
|
+
"optional": false,
|
|
436
|
+
"docs": {
|
|
437
|
+
"tags": [{
|
|
438
|
+
"name": "default",
|
|
439
|
+
"text": "null"
|
|
440
|
+
}],
|
|
441
|
+
"text": "Columns containing fForecast detail duration, from (firstDate) to (secondDate)"
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
"listCellWidth": {
|
|
445
|
+
"type": "string",
|
|
446
|
+
"mutable": false,
|
|
447
|
+
"complexType": {
|
|
448
|
+
"original": "string",
|
|
449
|
+
"resolved": "string",
|
|
450
|
+
"references": {}
|
|
451
|
+
},
|
|
452
|
+
"required": false,
|
|
453
|
+
"optional": false,
|
|
454
|
+
"docs": {
|
|
455
|
+
"tags": [{
|
|
456
|
+
"name": "default",
|
|
457
|
+
"text": "'300px'"
|
|
458
|
+
}],
|
|
459
|
+
"text": "Total size of the cells inside to the left box, near the gantt"
|
|
460
|
+
},
|
|
461
|
+
"attribute": "list-cell-width",
|
|
462
|
+
"reflect": false,
|
|
463
|
+
"defaultValue": "'300px'"
|
|
464
|
+
},
|
|
465
|
+
"maxWidth": {
|
|
466
|
+
"type": "string",
|
|
467
|
+
"mutable": false,
|
|
468
|
+
"complexType": {
|
|
469
|
+
"original": "string",
|
|
470
|
+
"resolved": "string",
|
|
471
|
+
"references": {}
|
|
472
|
+
},
|
|
473
|
+
"required": false,
|
|
474
|
+
"optional": false,
|
|
475
|
+
"docs": {
|
|
476
|
+
"tags": [{
|
|
477
|
+
"name": "default",
|
|
478
|
+
"text": "'90vw'"
|
|
479
|
+
}],
|
|
480
|
+
"text": "Max width for component"
|
|
481
|
+
},
|
|
482
|
+
"attribute": "max-width",
|
|
483
|
+
"reflect": false,
|
|
484
|
+
"defaultValue": "'90vw'"
|
|
485
|
+
},
|
|
252
486
|
"phaseColorCol": {
|
|
253
487
|
"type": "string",
|
|
254
488
|
"mutable": false,
|
|
@@ -260,8 +494,11 @@ export class KupPlanner {
|
|
|
260
494
|
"required": false,
|
|
261
495
|
"optional": false,
|
|
262
496
|
"docs": {
|
|
263
|
-
"tags": [
|
|
264
|
-
|
|
497
|
+
"tags": [{
|
|
498
|
+
"name": "default",
|
|
499
|
+
"text": "null"
|
|
500
|
+
}],
|
|
501
|
+
"text": "Column containing the phase color in hex format"
|
|
265
502
|
},
|
|
266
503
|
"attribute": "phase-color-col",
|
|
267
504
|
"reflect": false
|
|
@@ -277,8 +514,11 @@ export class KupPlanner {
|
|
|
277
514
|
"required": false,
|
|
278
515
|
"optional": false,
|
|
279
516
|
"docs": {
|
|
280
|
-
"tags": [
|
|
281
|
-
|
|
517
|
+
"tags": [{
|
|
518
|
+
"name": "default",
|
|
519
|
+
"text": "null"
|
|
520
|
+
}],
|
|
521
|
+
"text": "Columns containing informations displayed in the left box ,near the gantt of phases"
|
|
282
522
|
}
|
|
283
523
|
},
|
|
284
524
|
"phaseColParDep": {
|
|
@@ -292,8 +532,11 @@ export class KupPlanner {
|
|
|
292
532
|
"required": false,
|
|
293
533
|
"optional": false,
|
|
294
534
|
"docs": {
|
|
295
|
-
"tags": [
|
|
296
|
-
|
|
535
|
+
"tags": [{
|
|
536
|
+
"name": "default",
|
|
537
|
+
"text": "null"
|
|
538
|
+
}],
|
|
539
|
+
"text": "Column containing the name of the parent phases"
|
|
297
540
|
},
|
|
298
541
|
"attribute": "phase-col-par-dep",
|
|
299
542
|
"reflect": false
|
|
@@ -309,8 +552,11 @@ export class KupPlanner {
|
|
|
309
552
|
"required": false,
|
|
310
553
|
"optional": false,
|
|
311
554
|
"docs": {
|
|
312
|
-
"tags": [
|
|
313
|
-
|
|
555
|
+
"tags": [{
|
|
556
|
+
"name": "default",
|
|
557
|
+
"text": "null"
|
|
558
|
+
}],
|
|
559
|
+
"text": "Columns containing phase duration, from (firstDate) to (secondDate)"
|
|
314
560
|
}
|
|
315
561
|
},
|
|
316
562
|
"phaseIdCol": {
|
|
@@ -324,8 +570,11 @@ export class KupPlanner {
|
|
|
324
570
|
"required": false,
|
|
325
571
|
"optional": false,
|
|
326
572
|
"docs": {
|
|
327
|
-
"tags": [
|
|
328
|
-
|
|
573
|
+
"tags": [{
|
|
574
|
+
"name": "default",
|
|
575
|
+
"text": "null"
|
|
576
|
+
}],
|
|
577
|
+
"text": "Column containing unique phase identifier"
|
|
329
578
|
},
|
|
330
579
|
"attribute": "phase-id-col",
|
|
331
580
|
"reflect": false
|
|
@@ -341,8 +590,11 @@ export class KupPlanner {
|
|
|
341
590
|
"required": false,
|
|
342
591
|
"optional": false,
|
|
343
592
|
"docs": {
|
|
344
|
-
"tags": [
|
|
345
|
-
|
|
593
|
+
"tags": [{
|
|
594
|
+
"name": "default",
|
|
595
|
+
"text": "null"
|
|
596
|
+
}],
|
|
597
|
+
"text": "Column containing phase name displayed"
|
|
346
598
|
},
|
|
347
599
|
"attribute": "phase-name-col",
|
|
348
600
|
"reflect": false
|
|
@@ -358,10 +610,34 @@ export class KupPlanner {
|
|
|
358
610
|
"required": false,
|
|
359
611
|
"optional": false,
|
|
360
612
|
"docs": {
|
|
361
|
-
"tags": [
|
|
362
|
-
|
|
613
|
+
"tags": [{
|
|
614
|
+
"name": "default",
|
|
615
|
+
"text": "null"
|
|
616
|
+
}],
|
|
617
|
+
"text": "Columns containing forecast phase duration, from (firstDate) to (secondDate)"
|
|
363
618
|
}
|
|
364
619
|
},
|
|
620
|
+
"showSecondaryDates": {
|
|
621
|
+
"type": "boolean",
|
|
622
|
+
"mutable": false,
|
|
623
|
+
"complexType": {
|
|
624
|
+
"original": "boolean",
|
|
625
|
+
"resolved": "boolean",
|
|
626
|
+
"references": {}
|
|
627
|
+
},
|
|
628
|
+
"required": false,
|
|
629
|
+
"optional": false,
|
|
630
|
+
"docs": {
|
|
631
|
+
"tags": [{
|
|
632
|
+
"name": "default",
|
|
633
|
+
"text": "false"
|
|
634
|
+
}],
|
|
635
|
+
"text": "Enable/disable display of secondary dates"
|
|
636
|
+
},
|
|
637
|
+
"attribute": "show-secondary-dates",
|
|
638
|
+
"reflect": false,
|
|
639
|
+
"defaultValue": "false"
|
|
640
|
+
},
|
|
365
641
|
"taskColumns": {
|
|
366
642
|
"type": "unknown",
|
|
367
643
|
"mutable": false,
|
|
@@ -373,8 +649,11 @@ export class KupPlanner {
|
|
|
373
649
|
"required": false,
|
|
374
650
|
"optional": false,
|
|
375
651
|
"docs": {
|
|
376
|
-
"tags": [
|
|
377
|
-
|
|
652
|
+
"tags": [{
|
|
653
|
+
"name": "default",
|
|
654
|
+
"text": "null"
|
|
655
|
+
}],
|
|
656
|
+
"text": "Columns containing informations displayed in the left box, near the gantt"
|
|
378
657
|
}
|
|
379
658
|
},
|
|
380
659
|
"taskDates": {
|
|
@@ -388,10 +667,33 @@ export class KupPlanner {
|
|
|
388
667
|
"required": false,
|
|
389
668
|
"optional": false,
|
|
390
669
|
"docs": {
|
|
391
|
-
"tags": [
|
|
392
|
-
|
|
670
|
+
"tags": [{
|
|
671
|
+
"name": "default",
|
|
672
|
+
"text": "null"
|
|
673
|
+
}],
|
|
674
|
+
"text": "Columns containing task duration, from (firstDate) to (secondDate)"
|
|
393
675
|
}
|
|
394
676
|
},
|
|
677
|
+
"taskHeight": {
|
|
678
|
+
"type": "number",
|
|
679
|
+
"mutable": false,
|
|
680
|
+
"complexType": {
|
|
681
|
+
"original": "number",
|
|
682
|
+
"resolved": "number",
|
|
683
|
+
"references": {}
|
|
684
|
+
},
|
|
685
|
+
"required": false,
|
|
686
|
+
"optional": false,
|
|
687
|
+
"docs": {
|
|
688
|
+
"tags": [{
|
|
689
|
+
"name": "default",
|
|
690
|
+
"text": "null"
|
|
691
|
+
}],
|
|
692
|
+
"text": "Height for main gantt"
|
|
693
|
+
},
|
|
694
|
+
"attribute": "task-height",
|
|
695
|
+
"reflect": false
|
|
696
|
+
},
|
|
395
697
|
"taskIdCol": {
|
|
396
698
|
"type": "string",
|
|
397
699
|
"mutable": false,
|
|
@@ -403,8 +705,11 @@ export class KupPlanner {
|
|
|
403
705
|
"required": false,
|
|
404
706
|
"optional": false,
|
|
405
707
|
"docs": {
|
|
406
|
-
"tags": [
|
|
407
|
-
|
|
708
|
+
"tags": [{
|
|
709
|
+
"name": "default",
|
|
710
|
+
"text": "null"
|
|
711
|
+
}],
|
|
712
|
+
"text": "Column containing unique task identifier"
|
|
408
713
|
},
|
|
409
714
|
"attribute": "task-id-col",
|
|
410
715
|
"reflect": false
|
|
@@ -420,8 +725,11 @@ export class KupPlanner {
|
|
|
420
725
|
"required": false,
|
|
421
726
|
"optional": false,
|
|
422
727
|
"docs": {
|
|
423
|
-
"tags": [
|
|
424
|
-
|
|
728
|
+
"tags": [{
|
|
729
|
+
"name": "default",
|
|
730
|
+
"text": "null"
|
|
731
|
+
}],
|
|
732
|
+
"text": "Column containing task name displayed"
|
|
425
733
|
},
|
|
426
734
|
"attribute": "task-name-col",
|
|
427
735
|
"reflect": false
|
|
@@ -437,8 +745,11 @@ export class KupPlanner {
|
|
|
437
745
|
"required": false,
|
|
438
746
|
"optional": false,
|
|
439
747
|
"docs": {
|
|
440
|
-
"tags": [
|
|
441
|
-
|
|
748
|
+
"tags": [{
|
|
749
|
+
"name": "default",
|
|
750
|
+
"text": "null"
|
|
751
|
+
}],
|
|
752
|
+
"text": "Columns containing forecast task duration, from (firstDate) to (secondDate)"
|
|
442
753
|
}
|
|
443
754
|
},
|
|
444
755
|
"titleMess": {
|
|
@@ -452,8 +763,11 @@ export class KupPlanner {
|
|
|
452
763
|
"required": false,
|
|
453
764
|
"optional": false,
|
|
454
765
|
"docs": {
|
|
455
|
-
"tags": [
|
|
456
|
-
|
|
766
|
+
"tags": [{
|
|
767
|
+
"name": "default",
|
|
768
|
+
"text": "null"
|
|
769
|
+
}],
|
|
770
|
+
"text": "Message displayed on top"
|
|
457
771
|
},
|
|
458
772
|
"attribute": "title-mess",
|
|
459
773
|
"reflect": false
|
|
@@ -634,6 +948,10 @@ export class KupPlanner {
|
|
|
634
948
|
"KupPlannerPhase": {
|
|
635
949
|
"location": "import",
|
|
636
950
|
"path": "./kup-planner-declarations"
|
|
951
|
+
},
|
|
952
|
+
"TaskType": {
|
|
953
|
+
"location": "import",
|
|
954
|
+
"path": "@sme.up/gantt-component/dist/types/public-types"
|
|
637
955
|
}
|
|
638
956
|
},
|
|
639
957
|
"return": "Promise<void>"
|
|
@@ -663,28 +981,70 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
|
|
|
663
981
|
}
|
|
664
982
|
}, _KupPlanner_toTasks = function _KupPlanner_toTasks(data) {
|
|
665
983
|
var _a;
|
|
666
|
-
let tasks = (_a = data.rows) === null || _a === void 0 ? void 0 : _a.map((row) => {
|
|
984
|
+
let tasks = (_a = data.rows) === null || _a === void 0 ? void 0 : _a.filter((row) => isAtLeastOneDateValid(row.cells[this.taskDates[0]], row.cells[this.taskDates[1]])).map((row) => {
|
|
985
|
+
const datesSanitized = sanitizeAllDates(row.cells[this.taskDates[0]], row.cells[this.taskDates[1]], row.cells[this.taskPrevDates[0]], row.cells[this.taskPrevDates[1]]);
|
|
986
|
+
const valuesToShow = getValuesToShow(row, this.taskIdCol, this.taskNameCol, data.columns, this.taskColumns);
|
|
667
987
|
let task = {
|
|
668
988
|
taskRow: row,
|
|
669
989
|
taskRowId: row.id,
|
|
670
990
|
id: row.cells[this.taskIdCol].value,
|
|
671
991
|
name: row.cells[this.taskNameCol].value,
|
|
672
|
-
startDate:
|
|
673
|
-
endDate:
|
|
674
|
-
secondaryStartDate:
|
|
675
|
-
secondaryEndDate:
|
|
676
|
-
type: '
|
|
677
|
-
valuesToShow:
|
|
992
|
+
startDate: datesSanitized.dateValues[0],
|
|
993
|
+
endDate: datesSanitized.dateValues[1],
|
|
994
|
+
secondaryStartDate: datesSanitized.secDateValues[0],
|
|
995
|
+
secondaryEndDate: datesSanitized.secDateValues[1],
|
|
996
|
+
type: 'project',
|
|
997
|
+
valuesToShow: valuesToShow,
|
|
998
|
+
rowType: KupPlannerGanttRowType.TASK,
|
|
678
999
|
};
|
|
679
1000
|
return task;
|
|
680
1001
|
});
|
|
681
1002
|
return tasks;
|
|
1003
|
+
}, _KupPlanner_toDetails = function _KupPlanner_toDetails(data) {
|
|
1004
|
+
let details = [];
|
|
1005
|
+
if (!data || !data.rows) {
|
|
1006
|
+
return details;
|
|
1007
|
+
}
|
|
1008
|
+
data.rows
|
|
1009
|
+
.filter((row) => isAtLeastOneDateValid(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]))
|
|
1010
|
+
.forEach((row) => {
|
|
1011
|
+
const detailId = row.cells[this.detailIdCol].value;
|
|
1012
|
+
const detailNameId = row.cells[this.detailNameCol].value;
|
|
1013
|
+
const datesSanitized = sanitizeAllDates(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]);
|
|
1014
|
+
const valuesToShow = getValuesToShow(row, this.detailIdCol, this.detailNameCol, data.columns, this.detailColumns);
|
|
1015
|
+
let detail = details.find((det) => det.id == detailId);
|
|
1016
|
+
if (!detail) {
|
|
1017
|
+
detail = {
|
|
1018
|
+
id: detailId,
|
|
1019
|
+
name: detailNameId,
|
|
1020
|
+
type: 'timeline',
|
|
1021
|
+
valuesToShow: valuesToShow,
|
|
1022
|
+
rowType: KupPlannerGanttRowType.DETAIL,
|
|
1023
|
+
schedule: [],
|
|
1024
|
+
};
|
|
1025
|
+
details.push(detail);
|
|
1026
|
+
}
|
|
1027
|
+
detail.schedule.push({
|
|
1028
|
+
startDate: datesSanitized.dateValues[0],
|
|
1029
|
+
endDate: datesSanitized.dateValues[1],
|
|
1030
|
+
color: this.detailColorCol
|
|
1031
|
+
? row.cells[this.detailColorCol].value
|
|
1032
|
+
: '#D9D9D8',
|
|
1033
|
+
selectedColor: this.detailColorCol
|
|
1034
|
+
? row.cells[this.detailColorCol].value
|
|
1035
|
+
: '#D9D9D8',
|
|
1036
|
+
});
|
|
1037
|
+
});
|
|
1038
|
+
return details;
|
|
682
1039
|
}, _KupPlanner_getTask = function _KupPlanner_getTask(taskId) {
|
|
683
|
-
return this.plannerProps.items.find((task) => task.id == taskId);
|
|
1040
|
+
return this.plannerProps.mainGantt.items.find((task) => task.id == taskId);
|
|
684
1041
|
}, _KupPlanner_removePhases = function _KupPlanner_removePhases(taskId) {
|
|
685
1042
|
const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
|
|
686
1043
|
if (task)
|
|
687
1044
|
task.phases = undefined;
|
|
1045
|
+
// this.plannerProps.mainGantt = JSON.parse(
|
|
1046
|
+
// JSON.stringify(this.plannerProps.mainGantt)
|
|
1047
|
+
// );
|
|
688
1048
|
this.plannerProps = Object.assign({}, this.plannerProps);
|
|
689
1049
|
}, _KupPlanner_handleOnClickOnTask = function _KupPlanner_handleOnClickOnTask(nativeEvent) {
|
|
690
1050
|
const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, nativeEvent.id);
|
|
@@ -694,6 +1054,8 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
|
|
|
694
1054
|
return true;
|
|
695
1055
|
}, _KupPlanner_handleOnClickOnPhase = function _KupPlanner_handleOnClickOnPhase() {
|
|
696
1056
|
return true;
|
|
1057
|
+
}, _KupPlanner_handleOnClickOnDetail = function _KupPlanner_handleOnClickOnDetail() {
|
|
1058
|
+
return true;
|
|
697
1059
|
}, _KupPlanner_emitOnChangeEventsReceived = function _KupPlanner_emitOnChangeEventsReceived(nativeEvent) {
|
|
698
1060
|
let emitEvent = false;
|
|
699
1061
|
if (!__classPrivateFieldGet(this, _KupPlanner_lastOnChangeReceived, "f")) {
|