@sme.up/ketchup 7.4.1 → 7.5.0-SNAPSHOT
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-a508a0a1.js} +1 -1
- package/dist/cjs/{f-cell-9d7a9e97.js → f-cell-52d724f5.js} +4 -4
- package/dist/cjs/{f-chip-675ed121.js → f-chip-cbb70aed.js} +2 -2
- package/dist/cjs/{f-image-48facc89.js → f-image-510563ed.js} +4 -4
- package/dist/cjs/{f-paginator-utils-0c1227f6.js → f-paginator-utils-ff531caa.js} +2 -2
- package/dist/cjs/{f-text-field-3d8e7417.js → f-text-field-d17e5aa0.js} +1 -1
- package/dist/cjs/ketchup.cjs.js +2 -2
- package/dist/cjs/kup-accordion.cjs.entry.js +2 -2
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +18 -12
- package/dist/cjs/kup-box.cjs.entry.js +7 -7
- package/dist/cjs/kup-calendar.cjs.entry.js +4 -4
- package/dist/cjs/kup-cell.cjs.entry.js +5 -5
- package/dist/cjs/kup-dash-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-dash_2.cjs.entry.js +1 -1
- package/dist/cjs/kup-dashboard.cjs.entry.js +4 -7
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +1 -1
- package/dist/cjs/kup-family-tree.cjs.entry.js +4 -4
- package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +6 -6
- package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
- package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
- package/dist/cjs/{kup-manager-22bb9699.js → kup-manager-9e1680dd.js} +3 -0
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
- package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
- package/dist/cjs/kup-planner.cjs.entry.js +1043 -558
- package/dist/cjs/kup-probe.cjs.entry.js +1 -1
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/kup-card/kup-card.css +4 -8
- package/dist/collection/components/kup-dashboard/kup-dashboard.js +0 -3
- package/dist/collection/components/kup-data-table/kup-data-table.css +3 -6
- package/dist/collection/components/kup-data-table/kup-data-table.js +1 -4
- package/dist/collection/components/kup-family-tree/kup-family-tree.css +2 -2
- package/dist/collection/components/kup-image/kup-image.js +28 -0
- package/dist/collection/components/kup-list/kup-list.css +1 -1
- package/dist/collection/components/kup-planner/kup-planner-declarations.js +49 -16
- package/dist/collection/components/kup-planner/kup-planner-helper.js +54 -0
- package/dist/collection/components/kup-planner/kup-planner.css +21 -18
- package/dist/collection/components/kup-planner/kup-planner.js +483 -69
- package/dist/collection/components/kup-qlik/kup-qlik.css +4 -8
- package/dist/collection/components/kup-spinner/kup-spinner.css +2 -4
- package/dist/collection/f-components/f-image/f-image.js +3 -3
- package/dist/collection/managers/kup-data/kup-data-column-helper.js +1 -0
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +1 -0
- package/dist/collection/types/GenericTypes.js +1 -0
- package/dist/components/kup-autocomplete2.js +18 -9
- package/dist/components/kup-dashboard.js +0 -3
- package/dist/components/kup-family-tree.js +1 -1
- package/dist/components/kup-planner.js +1039 -547
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.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-b7f77b26.js} +1 -1
- package/dist/esm/{f-cell-90a418d2.js → f-cell-dc3beffe.js} +4 -4
- package/dist/esm/{f-chip-45e7b3f6.js → f-chip-0a678211.js} +2 -2
- package/dist/esm/{f-image-3026f0fe.js → f-image-f84dbd7c.js} +4 -4
- package/dist/esm/{f-paginator-utils-6369da7c.js → f-paginator-utils-52902bd6.js} +2 -2
- package/dist/esm/{f-text-field-3b70a6f0.js → f-text-field-7dd143be.js} +1 -1
- package/dist/esm/ketchup.js +2 -2
- package/dist/esm/kup-accordion.entry.js +2 -2
- package/dist/esm/kup-autocomplete_27.entry.js +18 -12
- package/dist/esm/kup-box.entry.js +7 -7
- package/dist/esm/kup-calendar.entry.js +4 -4
- package/dist/esm/kup-cell.entry.js +5 -5
- package/dist/esm/kup-dash-list.entry.js +1 -1
- package/dist/esm/kup-dash_2.entry.js +1 -1
- package/dist/esm/kup-dashboard.entry.js +4 -7
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +1 -1
- package/dist/esm/kup-family-tree.entry.js +4 -4
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +6 -6
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +2 -2
- package/dist/esm/{kup-manager-cad802b1.js → kup-manager-a5ab58a0.js} +3 -0
- package/dist/esm/kup-nav-bar.entry.js +1 -1
- package/dist/esm/kup-numeric-picker.entry.js +2 -2
- package/dist/esm/kup-photo-frame.entry.js +1 -1
- package/dist/esm/kup-planner.entry.js +1031 -546
- package/dist/esm/kup-probe.entry.js +1 -1
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +3 -3
- package/dist/esm/loader.js +2 -2
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-c1d8fd43.entry.js → p-00fc0f80.entry.js} +1 -1
- package/dist/ketchup/{p-b1da7902.entry.js → p-166257d0.entry.js} +1 -1
- package/dist/ketchup/{p-ae3e0d31.js → p-28efed63.js} +1 -1
- package/dist/ketchup/{p-fe34fa6e.entry.js → p-3ae1409f.entry.js} +1 -1
- package/dist/ketchup/p-4fd6c34c.js +30 -0
- package/dist/ketchup/{p-73becdb8.entry.js → p-6022c951.entry.js} +1 -1
- package/dist/ketchup/{p-4505a48d.js → p-69f3b9da.js} +1 -1
- package/dist/ketchup/p-7040cab7.entry.js +1 -0
- package/dist/ketchup/{p-a1adab40.js → p-7065b172.js} +1 -1
- package/dist/ketchup/p-71cb80ac.entry.js +9 -0
- package/dist/ketchup/{p-b0675bce.entry.js → p-78d1fc60.entry.js} +1 -1
- package/dist/ketchup/{p-a89f0884.entry.js → p-871cfe60.entry.js} +1 -1
- package/dist/ketchup/p-8d0e6825.entry.js +1 -0
- package/dist/ketchup/{p-9f1184cd.entry.js → p-98ff4101.entry.js} +6 -6
- package/dist/ketchup/{p-eea29062.entry.js → p-9ae47a0d.entry.js} +1 -1
- package/dist/ketchup/{p-1cd45a72.entry.js → p-a122b8d3.entry.js} +1 -1
- package/dist/ketchup/{p-23288eed.entry.js → p-a32cc181.entry.js} +1 -1
- package/dist/ketchup/{p-1ad48de4.entry.js → p-beb0907a.entry.js} +1 -1
- package/dist/ketchup/{p-32dc31ad.js → p-c5c6a2fb.js} +1 -1
- package/dist/ketchup/{p-138ac8b9.entry.js → p-c797ab39.entry.js} +1 -1
- package/dist/ketchup/p-d1e3573f.js +1 -0
- package/dist/ketchup/{p-d0f4457e.entry.js → p-d2670436.entry.js} +1 -1
- package/dist/ketchup/{p-97afbd71.entry.js → p-d315f7fa.entry.js} +1 -1
- package/dist/ketchup/{p-2d8b5bba.entry.js → p-d711e9ae.entry.js} +1 -1
- package/dist/ketchup/{p-7bd28eac.js → p-de34eb56.js} +1 -1
- package/dist/ketchup/{p-263b2c73.entry.js → p-e92d1972.entry.js} +1 -1
- package/dist/ketchup/{p-2217be0a.entry.js → p-efb80719.entry.js} +1 -1
- package/dist/ketchup/p-f158836b.entry.js +39 -0
- package/dist/ketchup/p-f69a6d89.entry.js +10 -0
- package/dist/types/components/kup-image/kup-image.d.ts +2 -0
- package/dist/types/components/kup-planner/kup-planner-declarations.d.ts +58 -17
- package/dist/types/components/kup-planner/kup-planner-helper.d.ts +6 -0
- package/dist/types/components/kup-planner/kup-planner.d.ts +120 -5
- package/dist/types/components.d.ts +235 -2
- package/dist/types/f-components/f-image/f-image-declarations.d.ts +1 -0
- package/dist/types/types/GenericTypes.d.ts +1 -0
- package/package.json +8 -6
- package/dist/ketchup/p-4e68f629.entry.js +0 -1
- package/dist/ketchup/p-a7ae0b4d.js +0 -1
- package/dist/ketchup/p-b63a5a44.js +0 -30
- package/dist/ketchup/p-bb6921bc.entry.js +0 -1
- 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,21 @@ 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, _KupPlanner_onFilter;
|
|
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';
|
|
28
|
+
import { FTextField } from '../../f-components/f-text-field/f-text-field';
|
|
29
|
+
import { FTextFieldMDC } from '../../f-components/f-text-field/f-text-field-mdc';
|
|
30
|
+
import { KupThemeIconValues } from '../../managers/kup-theme/kup-theme-declarations';
|
|
31
|
+
import { KupLanguageSearch } from '../../managers/kup-language/kup-language-declarations';
|
|
26
32
|
export class KupPlanner {
|
|
27
33
|
constructor() {
|
|
28
34
|
_KupPlanner_instances.add(this);
|
|
@@ -35,7 +41,16 @@ export class KupPlanner {
|
|
|
35
41
|
this.plannerProps = undefined;
|
|
36
42
|
this.customStyle = '';
|
|
37
43
|
this.data = undefined;
|
|
38
|
-
this.
|
|
44
|
+
this.detailData = undefined;
|
|
45
|
+
this.detailColorCol = undefined;
|
|
46
|
+
this.detailColumns = undefined;
|
|
47
|
+
this.detailDates = undefined;
|
|
48
|
+
this.detailHeight = undefined;
|
|
49
|
+
this.detailIdCol = undefined;
|
|
50
|
+
this.detailNameCol = undefined;
|
|
51
|
+
this.detailPrevDates = undefined;
|
|
52
|
+
this.listCellWidth = '300px';
|
|
53
|
+
this.maxWidth = '90vw';
|
|
39
54
|
this.phaseColorCol = undefined;
|
|
40
55
|
this.phaseColumns = undefined;
|
|
41
56
|
this.phaseColParDep = undefined;
|
|
@@ -43,8 +58,10 @@ export class KupPlanner {
|
|
|
43
58
|
this.phaseIdCol = undefined;
|
|
44
59
|
this.phaseNameCol = undefined;
|
|
45
60
|
this.phasePrevDates = undefined;
|
|
61
|
+
this.showSecondaryDates = false;
|
|
46
62
|
this.taskColumns = undefined;
|
|
47
63
|
this.taskDates = undefined;
|
|
64
|
+
this.taskHeight = undefined;
|
|
48
65
|
this.taskIdCol = undefined;
|
|
49
66
|
this.taskNameCol = undefined;
|
|
50
67
|
this.taskPrevDates = undefined;
|
|
@@ -58,11 +75,12 @@ export class KupPlanner {
|
|
|
58
75
|
taskAction: taskAction,
|
|
59
76
|
});
|
|
60
77
|
}
|
|
61
|
-
onKupDateChange(event) {
|
|
78
|
+
onKupDateChange(event, taskAction) {
|
|
62
79
|
this.kupDateChange.emit({
|
|
63
80
|
comp: this,
|
|
64
81
|
id: this.rootElement.id,
|
|
65
82
|
value: event,
|
|
83
|
+
taskAction: taskAction,
|
|
66
84
|
});
|
|
67
85
|
}
|
|
68
86
|
/*-------------------------------------------------*/
|
|
@@ -98,21 +116,29 @@ export class KupPlanner {
|
|
|
98
116
|
var _a;
|
|
99
117
|
const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
|
|
100
118
|
if (task) {
|
|
101
|
-
task.phases = (_a = data.rows) === null || _a === void 0 ? void 0 : _a.map((row) => {
|
|
119
|
+
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) => {
|
|
120
|
+
const datesSanitized = sanitizeAllDates(row.cells[this.phaseDates[0]], row.cells[this.phaseDates[1]], row.cells[this.phasePrevDates[0]], row.cells[this.phasePrevDates[1]]);
|
|
121
|
+
const valuesToShow = getValuesToShow(row, this.phaseIdCol, this.phaseNameCol, data.columns, this.phaseColumns, () => this.phaseColumns.map((col) => col == this.phaseDates[0]
|
|
122
|
+
? '#START#'
|
|
123
|
+
: col == this.phaseDates[1]
|
|
124
|
+
? '#END#'
|
|
125
|
+
: getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
|
|
102
126
|
let phase = {
|
|
103
127
|
taskRow: task.taskRow,
|
|
104
128
|
phaseRow: row,
|
|
105
|
-
id: row.cells[this.phaseIdCol].value,
|
|
129
|
+
id: task.id + '_' + row.cells[this.phaseIdCol].value,
|
|
106
130
|
phaseRowId: row.id,
|
|
107
131
|
taskRowId: task.taskRowId,
|
|
108
132
|
name: row.cells[this.phaseNameCol].value,
|
|
109
|
-
startDate:
|
|
110
|
-
endDate:
|
|
111
|
-
secondaryStartDate:
|
|
112
|
-
secondaryEndDate:
|
|
113
|
-
type: '
|
|
133
|
+
startDate: datesSanitized.dateValues[0],
|
|
134
|
+
endDate: datesSanitized.dateValues[1],
|
|
135
|
+
secondaryStartDate: datesSanitized.secDateValues[0],
|
|
136
|
+
secondaryEndDate: datesSanitized.secDateValues[1],
|
|
137
|
+
type: 'task',
|
|
114
138
|
color: row.cells[this.phaseColorCol].value,
|
|
115
|
-
|
|
139
|
+
selectedColor: row.cells[this.phaseColorCol].value,
|
|
140
|
+
valuesToShow: valuesToShow,
|
|
141
|
+
rowType: KupPlannerGanttRowType.PHASE,
|
|
116
142
|
};
|
|
117
143
|
return phase;
|
|
118
144
|
});
|
|
@@ -120,27 +146,34 @@ export class KupPlanner {
|
|
|
120
146
|
this.plannerProps = Object.assign({}, this.plannerProps);
|
|
121
147
|
}
|
|
122
148
|
handleOnClick(nativeEvent) {
|
|
123
|
-
console.log('handleOnClick', nativeEvent);
|
|
124
|
-
switch (nativeEvent.
|
|
125
|
-
case
|
|
149
|
+
console.log('kup-planner.handleOnClick', nativeEvent);
|
|
150
|
+
switch (nativeEvent.rowType) {
|
|
151
|
+
case KupPlannerGanttRowType.TASK:
|
|
126
152
|
const taskAction = nativeEvent.phases
|
|
127
|
-
? KupPlannerTaskAction.
|
|
128
|
-
: KupPlannerTaskAction.
|
|
153
|
+
? KupPlannerTaskAction.onTaskClosing
|
|
154
|
+
: KupPlannerTaskAction.onTaskOpening;
|
|
129
155
|
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnTask).call(this, nativeEvent)) {
|
|
130
156
|
this.onKupClick(nativeEvent, taskAction);
|
|
131
157
|
}
|
|
132
158
|
break;
|
|
133
|
-
case
|
|
159
|
+
case KupPlannerGanttRowType.PHASE:
|
|
134
160
|
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnPhase).call(this)) {
|
|
135
|
-
this.onKupClick(nativeEvent);
|
|
161
|
+
this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
|
|
162
|
+
}
|
|
163
|
+
break;
|
|
164
|
+
case KupPlannerGanttRowType.DETAIL:
|
|
165
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnDetail).call(this)) {
|
|
166
|
+
this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
|
|
136
167
|
}
|
|
137
168
|
break;
|
|
138
169
|
}
|
|
139
170
|
}
|
|
140
171
|
handleOnDateChange(nativeEvent) {
|
|
141
172
|
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_emitOnChangeEventsReceived).call(this, nativeEvent)) {
|
|
142
|
-
|
|
143
|
-
|
|
173
|
+
if (nativeEvent.rowType != KupPlannerGanttRowType.DETAIL) {
|
|
174
|
+
console.log('kup-planner.handleOnDateChange', nativeEvent);
|
|
175
|
+
this.onKupDateChange(nativeEvent, KupPlannerTaskAction.onResize);
|
|
176
|
+
}
|
|
144
177
|
}
|
|
145
178
|
}
|
|
146
179
|
componentWillLoad() {
|
|
@@ -148,11 +181,40 @@ export class KupPlanner {
|
|
|
148
181
|
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.register(this);
|
|
149
182
|
}
|
|
150
183
|
componentDidLoad() {
|
|
184
|
+
let details = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toDetails).call(this, this.detailData);
|
|
185
|
+
if (details && details.length == 0) {
|
|
186
|
+
details = undefined;
|
|
187
|
+
}
|
|
188
|
+
const mainFilter = this.rootElement.shadowRoot.querySelector('#main-filter');
|
|
189
|
+
FTextFieldMDC(mainFilter);
|
|
190
|
+
const secondaryFilter = this.rootElement.shadowRoot.querySelector('#secondary-filter');
|
|
191
|
+
if (details) {
|
|
192
|
+
FTextFieldMDC(secondaryFilter);
|
|
193
|
+
}
|
|
151
194
|
this.plannerProps = {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
195
|
+
mainGantt: {
|
|
196
|
+
title: this.titleMess,
|
|
197
|
+
items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toTasks).call(this, this.data),
|
|
198
|
+
stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
|
|
199
|
+
filter: mainFilter,
|
|
200
|
+
hideLabel: true,
|
|
201
|
+
ganttHeight: this.taskHeight,
|
|
202
|
+
showSecondaryDates: this.showSecondaryDates,
|
|
203
|
+
onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
|
|
204
|
+
onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
|
|
205
|
+
},
|
|
206
|
+
secondaryGantt: details
|
|
207
|
+
? {
|
|
208
|
+
title: '',
|
|
209
|
+
items: details,
|
|
210
|
+
stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
|
|
211
|
+
filter: secondaryFilter,
|
|
212
|
+
hideLabel: true,
|
|
213
|
+
ganttHeight: this.detailHeight,
|
|
214
|
+
onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
|
|
215
|
+
onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
|
|
216
|
+
}
|
|
217
|
+
: undefined,
|
|
156
218
|
};
|
|
157
219
|
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_renderReactPlannerElement).call(this);
|
|
158
220
|
this.kupReady.emit({
|
|
@@ -169,7 +231,17 @@ export class KupPlanner {
|
|
|
169
231
|
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logRender(this, true);
|
|
170
232
|
}
|
|
171
233
|
render() {
|
|
172
|
-
|
|
234
|
+
var _a;
|
|
235
|
+
//console.log('kup-planner.tsx render');
|
|
236
|
+
return (h(Host, null, h("style", null, __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId, style: { maxWidth: this.maxWidth } }), h(FTextField, { icon: KupThemeIconValues.SEARCH, id: "main-filter", label: __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), onKeyDown: (e) => {
|
|
237
|
+
if (e.key === 'Enter') {
|
|
238
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e);
|
|
239
|
+
}
|
|
240
|
+
}, wrapperClass: "filter" }), ((_a = this.detailData) === null || _a === void 0 ? void 0 : _a.rows) && this.detailData.rows.length > 0 ? (h(FTextField, { icon: KupThemeIconValues.SEARCH, id: "secondary-filter", label: __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), onKeyDown: (e) => {
|
|
241
|
+
if (e.key === 'Enter') {
|
|
242
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e, true);
|
|
243
|
+
}
|
|
244
|
+
}, wrapperClass: "filter" })) : null));
|
|
173
245
|
}
|
|
174
246
|
disconnectedCallback() {
|
|
175
247
|
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.unregister(this);
|
|
@@ -228,27 +300,212 @@ export class KupPlanner {
|
|
|
228
300
|
"required": false,
|
|
229
301
|
"optional": false,
|
|
230
302
|
"docs": {
|
|
231
|
-
"tags": [
|
|
232
|
-
|
|
303
|
+
"tags": [{
|
|
304
|
+
"name": "default",
|
|
305
|
+
"text": "null"
|
|
306
|
+
}],
|
|
307
|
+
"text": "Dataset containg the tasks list"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"detailData": {
|
|
311
|
+
"type": "unknown",
|
|
312
|
+
"mutable": false,
|
|
313
|
+
"complexType": {
|
|
314
|
+
"original": "KupDataDataset",
|
|
315
|
+
"resolved": "KupDataDataset",
|
|
316
|
+
"references": {
|
|
317
|
+
"KupDataDataset": {
|
|
318
|
+
"location": "import",
|
|
319
|
+
"path": "../../managers/kup-data/kup-data-declarations"
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
"required": false,
|
|
324
|
+
"optional": false,
|
|
325
|
+
"docs": {
|
|
326
|
+
"tags": [{
|
|
327
|
+
"name": "default",
|
|
328
|
+
"text": "null"
|
|
329
|
+
}],
|
|
330
|
+
"text": "Dataset containg the details list"
|
|
233
331
|
}
|
|
234
332
|
},
|
|
235
|
-
"
|
|
236
|
-
"type": "
|
|
333
|
+
"detailColorCol": {
|
|
334
|
+
"type": "string",
|
|
237
335
|
"mutable": false,
|
|
238
336
|
"complexType": {
|
|
239
|
-
"original": "
|
|
240
|
-
"resolved": "
|
|
337
|
+
"original": "string",
|
|
338
|
+
"resolved": "string",
|
|
241
339
|
"references": {}
|
|
242
340
|
},
|
|
243
341
|
"required": false,
|
|
244
342
|
"optional": false,
|
|
245
343
|
"docs": {
|
|
246
|
-
"tags": [
|
|
247
|
-
|
|
344
|
+
"tags": [{
|
|
345
|
+
"name": "default",
|
|
346
|
+
"text": "null"
|
|
347
|
+
}],
|
|
348
|
+
"text": "Column containing the detail color, in hex format"
|
|
248
349
|
},
|
|
249
|
-
"attribute": "
|
|
350
|
+
"attribute": "detail-color-col",
|
|
250
351
|
"reflect": false
|
|
251
352
|
},
|
|
353
|
+
"detailColumns": {
|
|
354
|
+
"type": "unknown",
|
|
355
|
+
"mutable": false,
|
|
356
|
+
"complexType": {
|
|
357
|
+
"original": "string[]",
|
|
358
|
+
"resolved": "string[]",
|
|
359
|
+
"references": {}
|
|
360
|
+
},
|
|
361
|
+
"required": false,
|
|
362
|
+
"optional": false,
|
|
363
|
+
"docs": {
|
|
364
|
+
"tags": [{
|
|
365
|
+
"name": "default",
|
|
366
|
+
"text": "null"
|
|
367
|
+
}],
|
|
368
|
+
"text": "Columns containing informations displayed in the left box, near the gantt of details"
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
"detailDates": {
|
|
372
|
+
"type": "unknown",
|
|
373
|
+
"mutable": false,
|
|
374
|
+
"complexType": {
|
|
375
|
+
"original": "string[]",
|
|
376
|
+
"resolved": "string[]",
|
|
377
|
+
"references": {}
|
|
378
|
+
},
|
|
379
|
+
"required": false,
|
|
380
|
+
"optional": false,
|
|
381
|
+
"docs": {
|
|
382
|
+
"tags": [{
|
|
383
|
+
"name": "default",
|
|
384
|
+
"text": "null"
|
|
385
|
+
}],
|
|
386
|
+
"text": "Columns containing detail duration, from (firstDate) to (secondDate)"
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
"detailHeight": {
|
|
390
|
+
"type": "number",
|
|
391
|
+
"mutable": false,
|
|
392
|
+
"complexType": {
|
|
393
|
+
"original": "number",
|
|
394
|
+
"resolved": "number",
|
|
395
|
+
"references": {}
|
|
396
|
+
},
|
|
397
|
+
"required": false,
|
|
398
|
+
"optional": false,
|
|
399
|
+
"docs": {
|
|
400
|
+
"tags": [{
|
|
401
|
+
"name": "default",
|
|
402
|
+
"text": "null"
|
|
403
|
+
}],
|
|
404
|
+
"text": "Height for detail gantt"
|
|
405
|
+
},
|
|
406
|
+
"attribute": "detail-height",
|
|
407
|
+
"reflect": false
|
|
408
|
+
},
|
|
409
|
+
"detailIdCol": {
|
|
410
|
+
"type": "string",
|
|
411
|
+
"mutable": false,
|
|
412
|
+
"complexType": {
|
|
413
|
+
"original": "string",
|
|
414
|
+
"resolved": "string",
|
|
415
|
+
"references": {}
|
|
416
|
+
},
|
|
417
|
+
"required": false,
|
|
418
|
+
"optional": false,
|
|
419
|
+
"docs": {
|
|
420
|
+
"tags": [{
|
|
421
|
+
"name": "default",
|
|
422
|
+
"text": "null"
|
|
423
|
+
}],
|
|
424
|
+
"text": "Column containing unique detail identifier"
|
|
425
|
+
},
|
|
426
|
+
"attribute": "detail-id-col",
|
|
427
|
+
"reflect": false
|
|
428
|
+
},
|
|
429
|
+
"detailNameCol": {
|
|
430
|
+
"type": "string",
|
|
431
|
+
"mutable": false,
|
|
432
|
+
"complexType": {
|
|
433
|
+
"original": "string",
|
|
434
|
+
"resolved": "string",
|
|
435
|
+
"references": {}
|
|
436
|
+
},
|
|
437
|
+
"required": false,
|
|
438
|
+
"optional": false,
|
|
439
|
+
"docs": {
|
|
440
|
+
"tags": [{
|
|
441
|
+
"name": "default",
|
|
442
|
+
"text": "null"
|
|
443
|
+
}],
|
|
444
|
+
"text": "Column containing detail name displayed"
|
|
445
|
+
},
|
|
446
|
+
"attribute": "detail-name-col",
|
|
447
|
+
"reflect": false
|
|
448
|
+
},
|
|
449
|
+
"detailPrevDates": {
|
|
450
|
+
"type": "unknown",
|
|
451
|
+
"mutable": false,
|
|
452
|
+
"complexType": {
|
|
453
|
+
"original": "string[]",
|
|
454
|
+
"resolved": "string[]",
|
|
455
|
+
"references": {}
|
|
456
|
+
},
|
|
457
|
+
"required": false,
|
|
458
|
+
"optional": false,
|
|
459
|
+
"docs": {
|
|
460
|
+
"tags": [{
|
|
461
|
+
"name": "default",
|
|
462
|
+
"text": "null"
|
|
463
|
+
}],
|
|
464
|
+
"text": "Columns containing fForecast detail duration, from (firstDate) to (secondDate)"
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
"listCellWidth": {
|
|
468
|
+
"type": "string",
|
|
469
|
+
"mutable": false,
|
|
470
|
+
"complexType": {
|
|
471
|
+
"original": "string",
|
|
472
|
+
"resolved": "string",
|
|
473
|
+
"references": {}
|
|
474
|
+
},
|
|
475
|
+
"required": false,
|
|
476
|
+
"optional": false,
|
|
477
|
+
"docs": {
|
|
478
|
+
"tags": [{
|
|
479
|
+
"name": "default",
|
|
480
|
+
"text": "'300px'"
|
|
481
|
+
}],
|
|
482
|
+
"text": "Total size of the cells inside to the left box, near the gantt"
|
|
483
|
+
},
|
|
484
|
+
"attribute": "list-cell-width",
|
|
485
|
+
"reflect": false,
|
|
486
|
+
"defaultValue": "'300px'"
|
|
487
|
+
},
|
|
488
|
+
"maxWidth": {
|
|
489
|
+
"type": "string",
|
|
490
|
+
"mutable": false,
|
|
491
|
+
"complexType": {
|
|
492
|
+
"original": "string",
|
|
493
|
+
"resolved": "string",
|
|
494
|
+
"references": {}
|
|
495
|
+
},
|
|
496
|
+
"required": false,
|
|
497
|
+
"optional": false,
|
|
498
|
+
"docs": {
|
|
499
|
+
"tags": [{
|
|
500
|
+
"name": "default",
|
|
501
|
+
"text": "'90vw'"
|
|
502
|
+
}],
|
|
503
|
+
"text": "Max width for component"
|
|
504
|
+
},
|
|
505
|
+
"attribute": "max-width",
|
|
506
|
+
"reflect": false,
|
|
507
|
+
"defaultValue": "'90vw'"
|
|
508
|
+
},
|
|
252
509
|
"phaseColorCol": {
|
|
253
510
|
"type": "string",
|
|
254
511
|
"mutable": false,
|
|
@@ -260,8 +517,11 @@ export class KupPlanner {
|
|
|
260
517
|
"required": false,
|
|
261
518
|
"optional": false,
|
|
262
519
|
"docs": {
|
|
263
|
-
"tags": [
|
|
264
|
-
|
|
520
|
+
"tags": [{
|
|
521
|
+
"name": "default",
|
|
522
|
+
"text": "null"
|
|
523
|
+
}],
|
|
524
|
+
"text": "Column containing the phase color in hex format"
|
|
265
525
|
},
|
|
266
526
|
"attribute": "phase-color-col",
|
|
267
527
|
"reflect": false
|
|
@@ -277,8 +537,11 @@ export class KupPlanner {
|
|
|
277
537
|
"required": false,
|
|
278
538
|
"optional": false,
|
|
279
539
|
"docs": {
|
|
280
|
-
"tags": [
|
|
281
|
-
|
|
540
|
+
"tags": [{
|
|
541
|
+
"name": "default",
|
|
542
|
+
"text": "null"
|
|
543
|
+
}],
|
|
544
|
+
"text": "Columns containing informations displayed in the left box ,near the gantt of phases"
|
|
282
545
|
}
|
|
283
546
|
},
|
|
284
547
|
"phaseColParDep": {
|
|
@@ -292,8 +555,11 @@ export class KupPlanner {
|
|
|
292
555
|
"required": false,
|
|
293
556
|
"optional": false,
|
|
294
557
|
"docs": {
|
|
295
|
-
"tags": [
|
|
296
|
-
|
|
558
|
+
"tags": [{
|
|
559
|
+
"name": "default",
|
|
560
|
+
"text": "null"
|
|
561
|
+
}],
|
|
562
|
+
"text": "Column containing the name of the parent phases"
|
|
297
563
|
},
|
|
298
564
|
"attribute": "phase-col-par-dep",
|
|
299
565
|
"reflect": false
|
|
@@ -309,8 +575,11 @@ export class KupPlanner {
|
|
|
309
575
|
"required": false,
|
|
310
576
|
"optional": false,
|
|
311
577
|
"docs": {
|
|
312
|
-
"tags": [
|
|
313
|
-
|
|
578
|
+
"tags": [{
|
|
579
|
+
"name": "default",
|
|
580
|
+
"text": "null"
|
|
581
|
+
}],
|
|
582
|
+
"text": "Columns containing phase duration, from (firstDate) to (secondDate)"
|
|
314
583
|
}
|
|
315
584
|
},
|
|
316
585
|
"phaseIdCol": {
|
|
@@ -324,8 +593,11 @@ export class KupPlanner {
|
|
|
324
593
|
"required": false,
|
|
325
594
|
"optional": false,
|
|
326
595
|
"docs": {
|
|
327
|
-
"tags": [
|
|
328
|
-
|
|
596
|
+
"tags": [{
|
|
597
|
+
"name": "default",
|
|
598
|
+
"text": "null"
|
|
599
|
+
}],
|
|
600
|
+
"text": "Column containing unique phase identifier"
|
|
329
601
|
},
|
|
330
602
|
"attribute": "phase-id-col",
|
|
331
603
|
"reflect": false
|
|
@@ -341,8 +613,11 @@ export class KupPlanner {
|
|
|
341
613
|
"required": false,
|
|
342
614
|
"optional": false,
|
|
343
615
|
"docs": {
|
|
344
|
-
"tags": [
|
|
345
|
-
|
|
616
|
+
"tags": [{
|
|
617
|
+
"name": "default",
|
|
618
|
+
"text": "null"
|
|
619
|
+
}],
|
|
620
|
+
"text": "Column containing phase name displayed"
|
|
346
621
|
},
|
|
347
622
|
"attribute": "phase-name-col",
|
|
348
623
|
"reflect": false
|
|
@@ -358,10 +633,34 @@ export class KupPlanner {
|
|
|
358
633
|
"required": false,
|
|
359
634
|
"optional": false,
|
|
360
635
|
"docs": {
|
|
361
|
-
"tags": [
|
|
362
|
-
|
|
636
|
+
"tags": [{
|
|
637
|
+
"name": "default",
|
|
638
|
+
"text": "null"
|
|
639
|
+
}],
|
|
640
|
+
"text": "Columns containing forecast phase duration, from (firstDate) to (secondDate)"
|
|
363
641
|
}
|
|
364
642
|
},
|
|
643
|
+
"showSecondaryDates": {
|
|
644
|
+
"type": "boolean",
|
|
645
|
+
"mutable": false,
|
|
646
|
+
"complexType": {
|
|
647
|
+
"original": "boolean",
|
|
648
|
+
"resolved": "boolean",
|
|
649
|
+
"references": {}
|
|
650
|
+
},
|
|
651
|
+
"required": false,
|
|
652
|
+
"optional": false,
|
|
653
|
+
"docs": {
|
|
654
|
+
"tags": [{
|
|
655
|
+
"name": "default",
|
|
656
|
+
"text": "false"
|
|
657
|
+
}],
|
|
658
|
+
"text": "Enable/disable display of secondary dates"
|
|
659
|
+
},
|
|
660
|
+
"attribute": "show-secondary-dates",
|
|
661
|
+
"reflect": false,
|
|
662
|
+
"defaultValue": "false"
|
|
663
|
+
},
|
|
365
664
|
"taskColumns": {
|
|
366
665
|
"type": "unknown",
|
|
367
666
|
"mutable": false,
|
|
@@ -373,8 +672,11 @@ export class KupPlanner {
|
|
|
373
672
|
"required": false,
|
|
374
673
|
"optional": false,
|
|
375
674
|
"docs": {
|
|
376
|
-
"tags": [
|
|
377
|
-
|
|
675
|
+
"tags": [{
|
|
676
|
+
"name": "default",
|
|
677
|
+
"text": "null"
|
|
678
|
+
}],
|
|
679
|
+
"text": "Columns containing informations displayed in the left box, near the gantt"
|
|
378
680
|
}
|
|
379
681
|
},
|
|
380
682
|
"taskDates": {
|
|
@@ -388,10 +690,33 @@ export class KupPlanner {
|
|
|
388
690
|
"required": false,
|
|
389
691
|
"optional": false,
|
|
390
692
|
"docs": {
|
|
391
|
-
"tags": [
|
|
392
|
-
|
|
693
|
+
"tags": [{
|
|
694
|
+
"name": "default",
|
|
695
|
+
"text": "null"
|
|
696
|
+
}],
|
|
697
|
+
"text": "Columns containing task duration, from (firstDate) to (secondDate)"
|
|
393
698
|
}
|
|
394
699
|
},
|
|
700
|
+
"taskHeight": {
|
|
701
|
+
"type": "number",
|
|
702
|
+
"mutable": false,
|
|
703
|
+
"complexType": {
|
|
704
|
+
"original": "number",
|
|
705
|
+
"resolved": "number",
|
|
706
|
+
"references": {}
|
|
707
|
+
},
|
|
708
|
+
"required": false,
|
|
709
|
+
"optional": false,
|
|
710
|
+
"docs": {
|
|
711
|
+
"tags": [{
|
|
712
|
+
"name": "default",
|
|
713
|
+
"text": "null"
|
|
714
|
+
}],
|
|
715
|
+
"text": "Height for main gantt"
|
|
716
|
+
},
|
|
717
|
+
"attribute": "task-height",
|
|
718
|
+
"reflect": false
|
|
719
|
+
},
|
|
395
720
|
"taskIdCol": {
|
|
396
721
|
"type": "string",
|
|
397
722
|
"mutable": false,
|
|
@@ -403,8 +728,11 @@ export class KupPlanner {
|
|
|
403
728
|
"required": false,
|
|
404
729
|
"optional": false,
|
|
405
730
|
"docs": {
|
|
406
|
-
"tags": [
|
|
407
|
-
|
|
731
|
+
"tags": [{
|
|
732
|
+
"name": "default",
|
|
733
|
+
"text": "null"
|
|
734
|
+
}],
|
|
735
|
+
"text": "Column containing unique task identifier"
|
|
408
736
|
},
|
|
409
737
|
"attribute": "task-id-col",
|
|
410
738
|
"reflect": false
|
|
@@ -420,8 +748,11 @@ export class KupPlanner {
|
|
|
420
748
|
"required": false,
|
|
421
749
|
"optional": false,
|
|
422
750
|
"docs": {
|
|
423
|
-
"tags": [
|
|
424
|
-
|
|
751
|
+
"tags": [{
|
|
752
|
+
"name": "default",
|
|
753
|
+
"text": "null"
|
|
754
|
+
}],
|
|
755
|
+
"text": "Column containing task name displayed"
|
|
425
756
|
},
|
|
426
757
|
"attribute": "task-name-col",
|
|
427
758
|
"reflect": false
|
|
@@ -437,8 +768,11 @@ export class KupPlanner {
|
|
|
437
768
|
"required": false,
|
|
438
769
|
"optional": false,
|
|
439
770
|
"docs": {
|
|
440
|
-
"tags": [
|
|
441
|
-
|
|
771
|
+
"tags": [{
|
|
772
|
+
"name": "default",
|
|
773
|
+
"text": "null"
|
|
774
|
+
}],
|
|
775
|
+
"text": "Columns containing forecast task duration, from (firstDate) to (secondDate)"
|
|
442
776
|
}
|
|
443
777
|
},
|
|
444
778
|
"titleMess": {
|
|
@@ -452,8 +786,11 @@ export class KupPlanner {
|
|
|
452
786
|
"required": false,
|
|
453
787
|
"optional": false,
|
|
454
788
|
"docs": {
|
|
455
|
-
"tags": [
|
|
456
|
-
|
|
789
|
+
"tags": [{
|
|
790
|
+
"name": "default",
|
|
791
|
+
"text": "null"
|
|
792
|
+
}],
|
|
793
|
+
"text": "Message displayed on top"
|
|
457
794
|
},
|
|
458
795
|
"attribute": "title-mess",
|
|
459
796
|
"reflect": false
|
|
@@ -634,6 +971,10 @@ export class KupPlanner {
|
|
|
634
971
|
"KupPlannerPhase": {
|
|
635
972
|
"location": "import",
|
|
636
973
|
"path": "./kup-planner-declarations"
|
|
974
|
+
},
|
|
975
|
+
"TaskType": {
|
|
976
|
+
"location": "import",
|
|
977
|
+
"path": "@sme.up/gantt-component/dist/types/public-types"
|
|
637
978
|
}
|
|
638
979
|
},
|
|
639
980
|
"return": "Promise<void>"
|
|
@@ -663,28 +1004,71 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
|
|
|
663
1004
|
}
|
|
664
1005
|
}, _KupPlanner_toTasks = function _KupPlanner_toTasks(data) {
|
|
665
1006
|
var _a;
|
|
666
|
-
let tasks = (_a = data.rows) === null || _a === void 0 ? void 0 : _a.map((row) => {
|
|
1007
|
+
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) => {
|
|
1008
|
+
const datesSanitized = sanitizeAllDates(row.cells[this.taskDates[0]], row.cells[this.taskDates[1]], row.cells[this.taskPrevDates[0]], row.cells[this.taskPrevDates[1]]);
|
|
1009
|
+
const valuesToShow = getValuesToShow(row, this.taskIdCol, this.taskNameCol, data.columns, this.taskColumns);
|
|
667
1010
|
let task = {
|
|
668
1011
|
taskRow: row,
|
|
669
1012
|
taskRowId: row.id,
|
|
670
1013
|
id: row.cells[this.taskIdCol].value,
|
|
671
1014
|
name: row.cells[this.taskNameCol].value,
|
|
672
|
-
startDate:
|
|
673
|
-
endDate:
|
|
674
|
-
secondaryStartDate:
|
|
675
|
-
secondaryEndDate:
|
|
676
|
-
type: '
|
|
677
|
-
valuesToShow:
|
|
1015
|
+
startDate: datesSanitized.dateValues[0],
|
|
1016
|
+
endDate: datesSanitized.dateValues[1],
|
|
1017
|
+
secondaryStartDate: datesSanitized.secDateValues[0],
|
|
1018
|
+
secondaryEndDate: datesSanitized.secDateValues[1],
|
|
1019
|
+
type: 'project',
|
|
1020
|
+
valuesToShow: valuesToShow,
|
|
1021
|
+
rowType: KupPlannerGanttRowType.TASK,
|
|
678
1022
|
};
|
|
679
1023
|
return task;
|
|
680
1024
|
});
|
|
681
1025
|
return tasks;
|
|
1026
|
+
}, _KupPlanner_toDetails = function _KupPlanner_toDetails(data) {
|
|
1027
|
+
let details = [];
|
|
1028
|
+
if (!data || !data.rows) {
|
|
1029
|
+
return details;
|
|
1030
|
+
}
|
|
1031
|
+
data.rows
|
|
1032
|
+
.filter((row) => isAtLeastOneDateValid(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]))
|
|
1033
|
+
.forEach((row) => {
|
|
1034
|
+
var _a, _b;
|
|
1035
|
+
const detailId = row.cells[this.detailIdCol].value;
|
|
1036
|
+
const detailNameId = row.cells[this.detailNameCol].value;
|
|
1037
|
+
const datesSanitized = sanitizeAllDates(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]);
|
|
1038
|
+
const valuesToShow = getValuesToShow(row, this.detailIdCol, this.detailNameCol, data.columns, this.detailColumns);
|
|
1039
|
+
let detail = details.find((det) => det.id == detailId);
|
|
1040
|
+
if (!detail) {
|
|
1041
|
+
detail = {
|
|
1042
|
+
id: detailId,
|
|
1043
|
+
name: detailNameId,
|
|
1044
|
+
type: 'timeline',
|
|
1045
|
+
valuesToShow: valuesToShow,
|
|
1046
|
+
rowType: KupPlannerGanttRowType.DETAIL,
|
|
1047
|
+
schedule: [],
|
|
1048
|
+
};
|
|
1049
|
+
details.push(detail);
|
|
1050
|
+
}
|
|
1051
|
+
detail.schedule.push({
|
|
1052
|
+
startDate: datesSanitized.dateValues[0],
|
|
1053
|
+
endDate: datesSanitized.dateValues[1],
|
|
1054
|
+
color: this.detailColorCol
|
|
1055
|
+
? (_a = row.cells[this.detailColorCol].value) !== null && _a !== void 0 ? _a : '#D9D9D8'
|
|
1056
|
+
: '#D9D9D8',
|
|
1057
|
+
selectedColor: this.detailColorCol
|
|
1058
|
+
? (_b = row.cells[this.detailColorCol].value) !== null && _b !== void 0 ? _b : '#D9D9D8'
|
|
1059
|
+
: '#D9D9D8',
|
|
1060
|
+
});
|
|
1061
|
+
});
|
|
1062
|
+
return details;
|
|
682
1063
|
}, _KupPlanner_getTask = function _KupPlanner_getTask(taskId) {
|
|
683
|
-
return this.plannerProps.items.find((task) => task.id == taskId);
|
|
1064
|
+
return this.plannerProps.mainGantt.items.find((task) => task.id == taskId);
|
|
684
1065
|
}, _KupPlanner_removePhases = function _KupPlanner_removePhases(taskId) {
|
|
685
1066
|
const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
|
|
686
1067
|
if (task)
|
|
687
1068
|
task.phases = undefined;
|
|
1069
|
+
// this.plannerProps.mainGantt = JSON.parse(
|
|
1070
|
+
// JSON.stringify(this.plannerProps.mainGantt)
|
|
1071
|
+
// );
|
|
688
1072
|
this.plannerProps = Object.assign({}, this.plannerProps);
|
|
689
1073
|
}, _KupPlanner_handleOnClickOnTask = function _KupPlanner_handleOnClickOnTask(nativeEvent) {
|
|
690
1074
|
const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, nativeEvent.id);
|
|
@@ -694,6 +1078,8 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
|
|
|
694
1078
|
return true;
|
|
695
1079
|
}, _KupPlanner_handleOnClickOnPhase = function _KupPlanner_handleOnClickOnPhase() {
|
|
696
1080
|
return true;
|
|
1081
|
+
}, _KupPlanner_handleOnClickOnDetail = function _KupPlanner_handleOnClickOnDetail() {
|
|
1082
|
+
return true;
|
|
697
1083
|
}, _KupPlanner_emitOnChangeEventsReceived = function _KupPlanner_emitOnChangeEventsReceived(nativeEvent) {
|
|
698
1084
|
let emitEvent = false;
|
|
699
1085
|
if (!__classPrivateFieldGet(this, _KupPlanner_lastOnChangeReceived, "f")) {
|
|
@@ -705,4 +1091,32 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
|
|
|
705
1091
|
emitEvent = true;
|
|
706
1092
|
}
|
|
707
1093
|
return emitEvent;
|
|
1094
|
+
}, _KupPlanner_onFilter = function _KupPlanner_onFilter(e, isDetail) {
|
|
1095
|
+
const tempData = {
|
|
1096
|
+
columns: this.data.columns,
|
|
1097
|
+
rows: [],
|
|
1098
|
+
};
|
|
1099
|
+
const value = e.target.value;
|
|
1100
|
+
const data = isDetail ? this.detailData : this.data;
|
|
1101
|
+
for (let index = 0; index < data.rows.length; index++) {
|
|
1102
|
+
const row = data.rows[index];
|
|
1103
|
+
const valuesToShow = isDetail
|
|
1104
|
+
? getValuesToShow(row, this.detailIdCol, this.detailNameCol, data.columns, this.detailColumns)
|
|
1105
|
+
: getValuesToShow(row, this.taskIdCol, this.taskNameCol, data.columns, this.taskColumns);
|
|
1106
|
+
for (let index = 0; index < valuesToShow.length; index++) {
|
|
1107
|
+
const valueToShow = valuesToShow[index];
|
|
1108
|
+
if (valueToShow.toLowerCase().indexOf(value.toLowerCase()) > -1) {
|
|
1109
|
+
tempData.rows.push(row);
|
|
1110
|
+
break;
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
const newGantt = isDetail
|
|
1115
|
+
? {
|
|
1116
|
+
secondaryGantt: Object.assign(Object.assign({}, this.plannerProps.secondaryGantt), { items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toDetails).call(this, tempData) }),
|
|
1117
|
+
}
|
|
1118
|
+
: {
|
|
1119
|
+
mainGantt: Object.assign(Object.assign({}, this.plannerProps.mainGantt), { items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toTasks).call(this, tempData) }),
|
|
1120
|
+
};
|
|
1121
|
+
this.plannerProps = Object.assign(Object.assign({}, this.plannerProps), newGantt);
|
|
708
1122
|
};
|