@sme.up/ketchup 7.4.2 → 8.0.0
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/{component-72a5b626.js → component-85c2bd4d.js} +1 -1
- package/dist/cjs/{f-button-daddd700.js → f-button-49b2c37c.js} +1 -1
- package/dist/cjs/{f-cell-3682fad4.js → f-cell-9a6bc55c.js} +4 -4
- package/dist/cjs/{f-chip-9d540d94.js → f-chip-dee84122.js} +2 -2
- package/dist/cjs/{f-image-7b42d149.js → f-image-27f965ff.js} +4 -4
- package/dist/cjs/{f-paginator-utils-1baeba0f.js → f-paginator-utils-4a30189d.js} +2 -2
- package/dist/cjs/{f-text-field-a6ed2d22.js → f-text-field-04a663b4.js} +1 -1
- package/dist/cjs/{f-text-field-mdc-85997738.js → f-text-field-mdc-0e22f3e3.js} +2 -2
- package/dist/cjs/ketchup.cjs.js +2 -2
- package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +814 -819
- 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 +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 +7 -10
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +25 -8
- package/dist/cjs/kup-family-tree.cjs.entry.js +8 -19
- package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +8 -8
- 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-10351449.js → kup-manager-2ff5d258.js} +80 -1
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +5 -5
- package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
- package/dist/cjs/kup-planner.cjs.entry.js +1127 -218
- 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 +4 -4
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{tslib.es6-0ee02c67.js → tslib.es6-386654de.js} +9 -5
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/kup-card/kup-card.css +4 -8
- package/dist/collection/components/kup-chip/kup-chip.js +4 -3
- 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 +6 -20
- package/dist/collection/components/kup-echart/kup-echart-declarations.js +2 -0
- package/dist/collection/components/kup-echart/kup-echart.js +23 -8
- package/dist/collection/components/kup-family-tree/kup-family-tree.css +2 -2
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +4 -15
- 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 +5 -2
- package/dist/collection/components/kup-planner/kup-planner.css +6 -3
- package/dist/collection/components/kup-planner/kup-planner.js +347 -65
- package/dist/collection/components/kup-qlik/kup-qlik.css +4 -8
- package/dist/collection/components/kup-snackbar/kup-snackbar.css +4 -3
- package/dist/collection/components/kup-spinner/kup-spinner.css +2 -4
- package/dist/collection/components/kup-tree/kup-tree.js +66 -67
- 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-manager/kup-manager.js +18 -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 +228 -151
- package/dist/components/kup-dashboard.js +0 -3
- package/dist/components/kup-echart2.js +24 -7
- package/dist/components/kup-family-tree.js +5 -16
- package/dist/components/kup-planner.js +1127 -219
- 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-snackbar.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/{component-b1bedf1d.js → component-120651a0.js} +1 -1
- package/dist/esm/{f-button-8d15b5a0.js → f-button-744cf1f6.js} +1 -1
- package/dist/esm/{f-cell-7b706e57.js → f-cell-b319c869.js} +4 -4
- package/dist/esm/{f-chip-c671fe90.js → f-chip-7e3e4180.js} +2 -2
- package/dist/esm/{f-image-21451b15.js → f-image-098c26ce.js} +4 -4
- package/dist/esm/{f-paginator-utils-92bbf277.js → f-paginator-utils-674cb2ae.js} +2 -2
- package/dist/esm/{f-text-field-0bb2d109.js → f-text-field-c38ef113.js} +1 -1
- package/dist/esm/{f-text-field-mdc-d42d3f9e.js → f-text-field-mdc-cee583ea.js} +2 -2
- package/dist/esm/ketchup.js +2 -2
- package/dist/esm/kup-accordion.entry.js +4 -4
- package/dist/esm/kup-autocomplete_27.entry.js +814 -819
- 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 +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 +7 -10
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +25 -8
- package/dist/esm/kup-family-tree.entry.js +8 -19
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +8 -8
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +2 -2
- package/dist/esm/{kup-manager-6145d980.js → kup-manager-b41eb2a8.js} +80 -2
- package/dist/esm/kup-nav-bar.entry.js +1 -1
- package/dist/esm/kup-numeric-picker.entry.js +5 -5
- package/dist/esm/kup-photo-frame.entry.js +1 -1
- package/dist/esm/kup-planner.entry.js +1128 -219
- 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 +4 -4
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{tslib.es6-3eea2234.js → tslib.es6-8c2af864.js} +9 -5
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-439ac105.entry.js → p-0b0b61cb.entry.js} +1 -1
- package/dist/ketchup/p-0b91f5f8.entry.js +1 -0
- package/dist/ketchup/{p-81605f08.js → p-10d84b1b.js} +1 -1
- package/dist/ketchup/{p-a203f78b.js → p-27a56c87.js} +1 -1
- package/dist/ketchup/{p-32517a99.entry.js → p-395e1960.entry.js} +1 -1
- package/dist/ketchup/{p-76bf53df.entry.js → p-3b41aca7.entry.js} +1 -1
- package/dist/ketchup/{p-4d039705.entry.js → p-3efe7f43.entry.js} +1 -1
- package/dist/ketchup/{p-a641780a.entry.js → p-4325d965.entry.js} +1 -1
- package/dist/ketchup/{p-2915a66a.entry.js → p-4ae2ca6f.entry.js} +1 -1
- package/dist/ketchup/{p-e4975ffa.entry.js → p-5ce2b4fc.entry.js} +1 -1
- package/dist/ketchup/p-5d398e42.js +1 -0
- package/dist/ketchup/{p-7cfdce27.js → p-77e3d537.js} +1 -1
- package/dist/ketchup/p-7f59211b.js +1 -0
- package/dist/ketchup/p-940a5feb.js +30 -0
- package/dist/ketchup/{p-826c91d7.js → p-9700eb32.js} +1 -1
- package/dist/ketchup/p-a7e19620.entry.js +39 -0
- package/dist/ketchup/p-a877a87b.entry.js +9 -0
- package/dist/ketchup/p-a9b7533b.entry.js +25 -0
- package/dist/ketchup/{p-89ac80c1.entry.js → p-af82131e.entry.js} +1 -1
- package/dist/ketchup/{p-da37c417.entry.js → p-b032f47d.entry.js} +1 -1
- package/dist/ketchup/{p-0c1cbf8b.entry.js → p-b244f5ca.entry.js} +1 -1
- package/dist/ketchup/{p-2a2dc2a8.entry.js → p-bb17c1ba.entry.js} +1 -1
- package/dist/ketchup/{p-0c9b7c80.entry.js → p-bd42562d.entry.js} +1 -1
- package/dist/ketchup/{p-849ad5d8.entry.js → p-c8b7790a.entry.js} +1 -1
- package/dist/ketchup/{p-c022824e.entry.js → p-c968e93d.entry.js} +1 -1
- package/dist/ketchup/{p-1242366a.entry.js → p-d739710a.entry.js} +1 -1
- package/dist/ketchup/{p-ae4fffe0.js → p-d98fdb9b.js} +1 -1
- package/dist/ketchup/{p-c222d070.entry.js → p-da891093.entry.js} +1 -1
- package/dist/ketchup/{p-281cff81.entry.js → p-df316daf.entry.js} +1 -1
- package/dist/ketchup/{p-d87fb5ff.entry.js → p-e02b5141.entry.js} +1 -1
- package/dist/ketchup/{p-ea16ddc0.js → p-e714f4dc.js} +1 -1
- package/dist/ketchup/{p-c4d9e3e2.js → p-ef614656.js} +1 -1
- package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +2 -0
- package/dist/types/components/kup-image/kup-image.d.ts +2 -0
- package/dist/types/components/kup-planner/kup-planner-declarations.d.ts +18 -3
- package/dist/types/components/kup-planner/kup-planner.d.ts +36 -11
- package/dist/types/components/kup-tree/kup-tree.d.ts +1 -5
- package/dist/types/components.d.ts +39 -4
- package/dist/types/f-components/f-image/f-image-declarations.d.ts +1 -0
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +1 -1
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +1 -0
- package/dist/types/managers/kup-manager/kup-manager.d.ts +7 -0
- package/dist/types/types/GenericTypes.d.ts +1 -0
- package/package.json +8 -20
- package/dist/ketchup/p-02a26d59.entry.js +0 -9
- package/dist/ketchup/p-462475ac.entry.js +0 -10
- package/dist/ketchup/p-5292ef67.js +0 -30
- package/dist/ketchup/p-79b0730b.js +0 -15
- package/dist/ketchup/p-9f00ad0f.js +0 -1
- package/dist/ketchup/p-be61dd36.entry.js +0 -39
- package/dist/ketchup/p-e83e70e2.entry.js +0 -1
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
-
if (kind === "a" && !f)
|
|
3
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
5
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
6
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
7
|
-
};
|
|
8
1
|
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
9
2
|
if (kind === "m")
|
|
10
3
|
throw new TypeError("Private method is not writable");
|
|
@@ -14,8 +7,15 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
14
7
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15
8
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
16
9
|
};
|
|
17
|
-
var
|
|
18
|
-
|
|
10
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
11
|
+
if (kind === "a" && !f)
|
|
12
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
14
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
15
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
16
|
+
};
|
|
17
|
+
var _KupPlanner_instances, _KupPlanner_kupManager, _KupPlanner_lastOnChangeReceived, _KupPlanner_rootPlanner, _KupPlanner_phases, _KupPlanner_showSecondaryDatesLocal, _KupPlanner_renderReactPlannerElement, _KupPlanner_toTasks, _KupPlanner_toDetails, _KupPlanner_getTask, _KupPlanner_removePhases, _KupPlanner_handleOnClickOnTask, _KupPlanner_handleOnClickOnPhase, _KupPlanner_handleOnClickOnDetail, _KupPlanner_handleOnContextMenuOnTask, _KupPlanner_handleOnContextMenuOnPhase, _KupPlanner_handleOnContextMenuOnDetail, _KupPlanner_emitOnChangeEventsReceived, _KupPlanner_onFilter, _KupPlanner_getIconUrl, _KupPlanner_getIconColor;
|
|
18
|
+
import { forceUpdate, getAssetPath, h, Host, } from '@stencil/core';
|
|
19
19
|
import { kupManagerInstance, } from '../../managers/kup-manager/kup-manager';
|
|
20
20
|
import { defaultStylingOptions, KupPlannerLastOnChangeReceived, KupPlannerProps, KupPlannerTaskAction, KupPlannerGanttRowType, } from './kup-planner-declarations';
|
|
21
21
|
import { getProps, setProps } from '../../utils/utils';
|
|
@@ -25,6 +25,10 @@ import React from 'react';
|
|
|
25
25
|
import { Planner, } from '@sme.up/gantt-component';
|
|
26
26
|
import { getCellValueForDisplay } from '../../utils/cell-utils';
|
|
27
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';
|
|
28
32
|
export class KupPlanner {
|
|
29
33
|
constructor() {
|
|
30
34
|
_KupPlanner_instances.add(this);
|
|
@@ -32,9 +36,11 @@ export class KupPlanner {
|
|
|
32
36
|
/* I n t e r n a l V a r i a b l e s */
|
|
33
37
|
/*-------------------------------------------------*/
|
|
34
38
|
_KupPlanner_kupManager.set(this, kupManagerInstance());
|
|
35
|
-
_KupPlanner_rootPlanner.set(this, void 0);
|
|
36
39
|
_KupPlanner_lastOnChangeReceived.set(this, void 0);
|
|
37
|
-
this
|
|
40
|
+
_KupPlanner_rootPlanner.set(this, void 0);
|
|
41
|
+
_KupPlanner_phases.set(this, {});
|
|
42
|
+
// no re-render
|
|
43
|
+
_KupPlanner_showSecondaryDatesLocal.set(this, false);
|
|
38
44
|
this.customStyle = '';
|
|
39
45
|
this.data = undefined;
|
|
40
46
|
this.detailData = undefined;
|
|
@@ -42,6 +48,7 @@ export class KupPlanner {
|
|
|
42
48
|
this.detailColumns = undefined;
|
|
43
49
|
this.detailDates = undefined;
|
|
44
50
|
this.detailHeight = undefined;
|
|
51
|
+
this.detailIconCol = undefined;
|
|
45
52
|
this.detailIdCol = undefined;
|
|
46
53
|
this.detailNameCol = undefined;
|
|
47
54
|
this.detailPrevDates = undefined;
|
|
@@ -51,6 +58,7 @@ export class KupPlanner {
|
|
|
51
58
|
this.phaseColumns = undefined;
|
|
52
59
|
this.phaseColParDep = undefined;
|
|
53
60
|
this.phaseDates = undefined;
|
|
61
|
+
this.phaseIconCol = undefined;
|
|
54
62
|
this.phaseIdCol = undefined;
|
|
55
63
|
this.phaseNameCol = undefined;
|
|
56
64
|
this.phasePrevDates = undefined;
|
|
@@ -58,25 +66,23 @@ export class KupPlanner {
|
|
|
58
66
|
this.taskColumns = undefined;
|
|
59
67
|
this.taskDates = undefined;
|
|
60
68
|
this.taskHeight = undefined;
|
|
69
|
+
this.taskIconCol = undefined;
|
|
61
70
|
this.taskIdCol = undefined;
|
|
62
71
|
this.taskNameCol = undefined;
|
|
63
72
|
this.taskPrevDates = undefined;
|
|
64
73
|
this.titleMess = undefined;
|
|
74
|
+
this.plannerProps = undefined;
|
|
65
75
|
}
|
|
66
|
-
|
|
67
|
-
this
|
|
68
|
-
comp: this,
|
|
69
|
-
id: this.rootElement.id,
|
|
70
|
-
value: event,
|
|
71
|
-
taskAction: taskAction,
|
|
72
|
-
});
|
|
76
|
+
dataChanged() {
|
|
77
|
+
__classPrivateFieldSet(this, _KupPlanner_phases, {}, "f");
|
|
73
78
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
showSecondaryDatesChanged() {
|
|
80
|
+
var _a;
|
|
81
|
+
__classPrivateFieldSet(this, _KupPlanner_showSecondaryDatesLocal, this.showSecondaryDates, "f");
|
|
82
|
+
if ((_a = this.plannerProps) === null || _a === void 0 ? void 0 : _a.mainGantt) {
|
|
83
|
+
this.plannerProps.mainGantt.showSecondaryDates =
|
|
84
|
+
this.showSecondaryDates;
|
|
85
|
+
}
|
|
80
86
|
}
|
|
81
87
|
/*-------------------------------------------------*/
|
|
82
88
|
/* P u b l i c M e t h o d s */
|
|
@@ -111,6 +117,7 @@ export class KupPlanner {
|
|
|
111
117
|
var _a;
|
|
112
118
|
const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
|
|
113
119
|
if (task) {
|
|
120
|
+
__classPrivateFieldGet(this, _KupPlanner_phases, "f")[taskId] = data;
|
|
114
121
|
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
122
|
const datesSanitized = sanitizeAllDates(row.cells[this.phaseDates[0]], row.cells[this.phaseDates[1]], row.cells[this.phasePrevDates[0]], row.cells[this.phasePrevDates[1]]);
|
|
116
123
|
const valuesToShow = getValuesToShow(row, this.phaseIdCol, this.phaseNameCol, data.columns, this.phaseColumns, () => this.phaseColumns.map((col) => col == this.phaseDates[0]
|
|
@@ -118,6 +125,8 @@ export class KupPlanner {
|
|
|
118
125
|
: col == this.phaseDates[1]
|
|
119
126
|
? '#END#'
|
|
120
127
|
: getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
|
|
128
|
+
let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.phaseIconCol);
|
|
129
|
+
let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.phaseIconCol);
|
|
121
130
|
let phase = {
|
|
122
131
|
taskRow: task.taskRow,
|
|
123
132
|
phaseRow: row,
|
|
@@ -134,59 +143,43 @@ export class KupPlanner {
|
|
|
134
143
|
selectedColor: row.cells[this.phaseColorCol].value,
|
|
135
144
|
valuesToShow: valuesToShow,
|
|
136
145
|
rowType: KupPlannerGanttRowType.PHASE,
|
|
146
|
+
icon: iconUrl
|
|
147
|
+
? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
|
|
148
|
+
: undefined,
|
|
137
149
|
};
|
|
138
150
|
return phase;
|
|
139
151
|
});
|
|
140
152
|
}
|
|
141
153
|
this.plannerProps = Object.assign({}, this.plannerProps);
|
|
142
154
|
}
|
|
143
|
-
|
|
144
|
-
console.log('handleOnClick', nativeEvent);
|
|
145
|
-
switch (nativeEvent.rowType) {
|
|
146
|
-
case KupPlannerGanttRowType.TASK:
|
|
147
|
-
const taskAction = nativeEvent.phases
|
|
148
|
-
? KupPlannerTaskAction.onClosing
|
|
149
|
-
: KupPlannerTaskAction.onOpening;
|
|
150
|
-
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnTask).call(this, nativeEvent)) {
|
|
151
|
-
this.onKupClick(nativeEvent, taskAction);
|
|
152
|
-
}
|
|
153
|
-
break;
|
|
154
|
-
case KupPlannerGanttRowType.PHASE:
|
|
155
|
-
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnPhase).call(this)) {
|
|
156
|
-
this.onKupClick(nativeEvent);
|
|
157
|
-
}
|
|
158
|
-
break;
|
|
159
|
-
case KupPlannerGanttRowType.DETAIL:
|
|
160
|
-
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnDetail).call(this)) {
|
|
161
|
-
this.onKupClick(nativeEvent);
|
|
162
|
-
}
|
|
163
|
-
break;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
handleOnDateChange(nativeEvent) {
|
|
167
|
-
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_emitOnChangeEventsReceived).call(this, nativeEvent)) {
|
|
168
|
-
console.log('handleOnDateChange', nativeEvent);
|
|
169
|
-
this.onKupDateChange(nativeEvent);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
155
|
+
//---- Lifecycle hooks ----
|
|
172
156
|
componentWillLoad() {
|
|
173
157
|
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logLoad(this, false);
|
|
174
158
|
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.register(this);
|
|
175
159
|
}
|
|
176
160
|
componentDidLoad() {
|
|
161
|
+
__classPrivateFieldSet(this, _KupPlanner_showSecondaryDatesLocal, this.showSecondaryDates, "f");
|
|
177
162
|
let details = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toDetails).call(this, this.detailData);
|
|
178
163
|
if (details && details.length == 0) {
|
|
179
164
|
details = undefined;
|
|
180
165
|
}
|
|
166
|
+
const mainFilter = this.rootElement.shadowRoot.querySelector('#main-filter');
|
|
167
|
+
FTextFieldMDC(mainFilter);
|
|
168
|
+
const secondaryFilter = this.rootElement.shadowRoot.querySelector('#secondary-filter');
|
|
169
|
+
if (details) {
|
|
170
|
+
FTextFieldMDC(secondaryFilter);
|
|
171
|
+
}
|
|
181
172
|
this.plannerProps = {
|
|
182
173
|
mainGantt: {
|
|
183
174
|
title: this.titleMess,
|
|
184
175
|
items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toTasks).call(this, this.data),
|
|
185
176
|
stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
|
|
177
|
+
filter: mainFilter,
|
|
186
178
|
hideLabel: true,
|
|
187
179
|
ganttHeight: this.taskHeight,
|
|
188
|
-
showSecondaryDates: this
|
|
180
|
+
showSecondaryDates: __classPrivateFieldGet(this, _KupPlanner_showSecondaryDatesLocal, "f"),
|
|
189
181
|
onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
|
|
182
|
+
onContextMenu: (event, row) => this.handleOnContextMenu(event, row),
|
|
190
183
|
onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
|
|
191
184
|
},
|
|
192
185
|
secondaryGantt: details
|
|
@@ -194,14 +187,16 @@ export class KupPlanner {
|
|
|
194
187
|
title: '',
|
|
195
188
|
items: details,
|
|
196
189
|
stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
|
|
190
|
+
filter: secondaryFilter,
|
|
197
191
|
hideLabel: true,
|
|
198
192
|
ganttHeight: this.detailHeight,
|
|
199
193
|
onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
|
|
194
|
+
onContextMenu: (event, row) => this.handleOnContextMenu(event, row),
|
|
200
195
|
onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
|
|
201
196
|
}
|
|
202
197
|
: undefined,
|
|
198
|
+
onSetDoubleView: (checked) => this.handleOnSetDoubleView(checked),
|
|
203
199
|
};
|
|
204
|
-
console.log('kup-planner.tsx componentDidLoad plannerProps', this.plannerProps);
|
|
205
200
|
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_renderReactPlannerElement).call(this);
|
|
206
201
|
this.kupReady.emit({
|
|
207
202
|
comp: this,
|
|
@@ -216,9 +211,125 @@ export class KupPlanner {
|
|
|
216
211
|
componentDidRender() {
|
|
217
212
|
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logRender(this, true);
|
|
218
213
|
}
|
|
214
|
+
onKupClick(event, taskAction) {
|
|
215
|
+
this.kupClick.emit({
|
|
216
|
+
comp: this,
|
|
217
|
+
id: this.rootElement.id,
|
|
218
|
+
value: event,
|
|
219
|
+
taskAction: taskAction,
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
onKupContextMenu(event, ganttRow, taskAction) {
|
|
223
|
+
let row;
|
|
224
|
+
let cell;
|
|
225
|
+
let column;
|
|
226
|
+
switch (ganttRow.type) {
|
|
227
|
+
case 'project': {
|
|
228
|
+
row = ganttRow.taskRow;
|
|
229
|
+
cell = row.cells[this.taskIdCol];
|
|
230
|
+
column = this.data.columns[this.taskIdCol];
|
|
231
|
+
break;
|
|
232
|
+
}
|
|
233
|
+
case 'task': {
|
|
234
|
+
row = ganttRow.phaseRow;
|
|
235
|
+
cell = row.cells[this.phaseIdCol];
|
|
236
|
+
//column = this.data.columns[this.taskIdCol];
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
case 'timeline': {
|
|
240
|
+
row = ganttRow.detailRow;
|
|
241
|
+
cell = row.cells[this.detailIdCol];
|
|
242
|
+
column = this.data.columns[this.detailIdCol];
|
|
243
|
+
break;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
this.kupContextMenu.emit({
|
|
247
|
+
comp: this,
|
|
248
|
+
id: this.rootElement.id,
|
|
249
|
+
value: ganttRow,
|
|
250
|
+
taskAction: taskAction,
|
|
251
|
+
details: {
|
|
252
|
+
cell: cell,
|
|
253
|
+
column: column,
|
|
254
|
+
originalEvent: event,
|
|
255
|
+
row: row,
|
|
256
|
+
},
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
onKupDateChange(event, taskAction) {
|
|
260
|
+
this.kupDateChange.emit({
|
|
261
|
+
comp: this,
|
|
262
|
+
id: this.rootElement.id,
|
|
263
|
+
value: event,
|
|
264
|
+
taskAction: taskAction,
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
handleOnClick(nativeEvent) {
|
|
268
|
+
switch (nativeEvent.rowType) {
|
|
269
|
+
case KupPlannerGanttRowType.TASK:
|
|
270
|
+
const taskAction = nativeEvent.phases
|
|
271
|
+
? KupPlannerTaskAction.onTaskClosing
|
|
272
|
+
: KupPlannerTaskAction.onTaskOpening;
|
|
273
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnTask).call(this, nativeEvent)) {
|
|
274
|
+
this.onKupClick(nativeEvent, taskAction);
|
|
275
|
+
}
|
|
276
|
+
break;
|
|
277
|
+
case KupPlannerGanttRowType.PHASE:
|
|
278
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnPhase).call(this)) {
|
|
279
|
+
this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
|
|
280
|
+
}
|
|
281
|
+
break;
|
|
282
|
+
case KupPlannerGanttRowType.DETAIL:
|
|
283
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnDetail).call(this)) {
|
|
284
|
+
this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
|
|
285
|
+
}
|
|
286
|
+
break;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
handleOnContextMenu(event, row) {
|
|
290
|
+
switch (row.rowType) {
|
|
291
|
+
case KupPlannerGanttRowType.TASK:
|
|
292
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnTask).call(this)) {
|
|
293
|
+
this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
|
|
294
|
+
}
|
|
295
|
+
break;
|
|
296
|
+
case KupPlannerGanttRowType.PHASE:
|
|
297
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnPhase).call(this)) {
|
|
298
|
+
this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
|
|
299
|
+
}
|
|
300
|
+
break;
|
|
301
|
+
case KupPlannerGanttRowType.DETAIL:
|
|
302
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnDetail).call(this)) {
|
|
303
|
+
this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
|
|
304
|
+
}
|
|
305
|
+
break;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
handleOnSetDoubleView(checked) {
|
|
309
|
+
var _a;
|
|
310
|
+
__classPrivateFieldSet(this, _KupPlanner_showSecondaryDatesLocal, checked, "f");
|
|
311
|
+
if ((_a = this.plannerProps) === null || _a === void 0 ? void 0 : _a.mainGantt) {
|
|
312
|
+
this.plannerProps.mainGantt.showSecondaryDates = checked;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
handleOnDateChange(nativeEvent) {
|
|
316
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_emitOnChangeEventsReceived).call(this, nativeEvent)) {
|
|
317
|
+
if (nativeEvent.rowType != KupPlannerGanttRowType.DETAIL) {
|
|
318
|
+
this.onKupDateChange(nativeEvent, KupPlannerTaskAction.onResize);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
219
322
|
render() {
|
|
220
|
-
|
|
221
|
-
return (h(Host, null, h("div", { id: componentWrapperId, style: { maxWidth: this.maxWidth } })))
|
|
323
|
+
var _a;
|
|
324
|
+
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) => {
|
|
325
|
+
if (e.key === 'Enter') {
|
|
326
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e);
|
|
327
|
+
}
|
|
328
|
+
}, 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) => {
|
|
329
|
+
if (e.key === 'Enter') {
|
|
330
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e, true);
|
|
331
|
+
}
|
|
332
|
+
}, wrapperClass: "filter" })) : null));
|
|
222
333
|
}
|
|
223
334
|
disconnectedCallback() {
|
|
224
335
|
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.unregister(this);
|
|
@@ -383,6 +494,26 @@ export class KupPlanner {
|
|
|
383
494
|
"attribute": "detail-height",
|
|
384
495
|
"reflect": false
|
|
385
496
|
},
|
|
497
|
+
"detailIconCol": {
|
|
498
|
+
"type": "string",
|
|
499
|
+
"mutable": false,
|
|
500
|
+
"complexType": {
|
|
501
|
+
"original": "string",
|
|
502
|
+
"resolved": "string",
|
|
503
|
+
"references": {}
|
|
504
|
+
},
|
|
505
|
+
"required": false,
|
|
506
|
+
"optional": false,
|
|
507
|
+
"docs": {
|
|
508
|
+
"tags": [{
|
|
509
|
+
"name": "default",
|
|
510
|
+
"text": "null"
|
|
511
|
+
}],
|
|
512
|
+
"text": "Column containing icon name to show, for detail"
|
|
513
|
+
},
|
|
514
|
+
"attribute": "detail-icon-col",
|
|
515
|
+
"reflect": false
|
|
516
|
+
},
|
|
386
517
|
"detailIdCol": {
|
|
387
518
|
"type": "string",
|
|
388
519
|
"mutable": false,
|
|
@@ -438,7 +569,7 @@ export class KupPlanner {
|
|
|
438
569
|
"name": "default",
|
|
439
570
|
"text": "null"
|
|
440
571
|
}],
|
|
441
|
-
"text": "Columns containing
|
|
572
|
+
"text": "Columns containing forecast detail duration, from (firstDate) to (secondDate)"
|
|
442
573
|
}
|
|
443
574
|
},
|
|
444
575
|
"listCellWidth": {
|
|
@@ -559,6 +690,26 @@ export class KupPlanner {
|
|
|
559
690
|
"text": "Columns containing phase duration, from (firstDate) to (secondDate)"
|
|
560
691
|
}
|
|
561
692
|
},
|
|
693
|
+
"phaseIconCol": {
|
|
694
|
+
"type": "string",
|
|
695
|
+
"mutable": false,
|
|
696
|
+
"complexType": {
|
|
697
|
+
"original": "string",
|
|
698
|
+
"resolved": "string",
|
|
699
|
+
"references": {}
|
|
700
|
+
},
|
|
701
|
+
"required": false,
|
|
702
|
+
"optional": false,
|
|
703
|
+
"docs": {
|
|
704
|
+
"tags": [{
|
|
705
|
+
"name": "default",
|
|
706
|
+
"text": "null"
|
|
707
|
+
}],
|
|
708
|
+
"text": "Column containing icon name to show, for phase"
|
|
709
|
+
},
|
|
710
|
+
"attribute": "phase-icon-col",
|
|
711
|
+
"reflect": false
|
|
712
|
+
},
|
|
562
713
|
"phaseIdCol": {
|
|
563
714
|
"type": "string",
|
|
564
715
|
"mutable": false,
|
|
@@ -694,6 +845,26 @@ export class KupPlanner {
|
|
|
694
845
|
"attribute": "task-height",
|
|
695
846
|
"reflect": false
|
|
696
847
|
},
|
|
848
|
+
"taskIconCol": {
|
|
849
|
+
"type": "string",
|
|
850
|
+
"mutable": false,
|
|
851
|
+
"complexType": {
|
|
852
|
+
"original": "string",
|
|
853
|
+
"resolved": "string",
|
|
854
|
+
"references": {}
|
|
855
|
+
},
|
|
856
|
+
"required": false,
|
|
857
|
+
"optional": false,
|
|
858
|
+
"docs": {
|
|
859
|
+
"tags": [{
|
|
860
|
+
"name": "default",
|
|
861
|
+
"text": "null"
|
|
862
|
+
}],
|
|
863
|
+
"text": "Column containing icon name to show, for task"
|
|
864
|
+
},
|
|
865
|
+
"attribute": "task-icon-col",
|
|
866
|
+
"reflect": false
|
|
867
|
+
},
|
|
697
868
|
"taskIdCol": {
|
|
698
869
|
"type": "string",
|
|
699
870
|
"mutable": false,
|
|
@@ -840,6 +1011,26 @@ export class KupPlanner {
|
|
|
840
1011
|
}
|
|
841
1012
|
}
|
|
842
1013
|
}
|
|
1014
|
+
}, {
|
|
1015
|
+
"method": "kupContextMenu",
|
|
1016
|
+
"name": "kup-planner-contextmenu",
|
|
1017
|
+
"bubbles": true,
|
|
1018
|
+
"cancelable": false,
|
|
1019
|
+
"composed": true,
|
|
1020
|
+
"docs": {
|
|
1021
|
+
"tags": [],
|
|
1022
|
+
"text": "Generic right click event on planner."
|
|
1023
|
+
},
|
|
1024
|
+
"complexType": {
|
|
1025
|
+
"original": "KupPlannerClickEventPayload",
|
|
1026
|
+
"resolved": "KupPlannerClickEventPayload",
|
|
1027
|
+
"references": {
|
|
1028
|
+
"KupPlannerClickEventPayload": {
|
|
1029
|
+
"location": "import",
|
|
1030
|
+
"path": "./kup-planner-declarations"
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
843
1034
|
}];
|
|
844
1035
|
}
|
|
845
1036
|
static get methods() {
|
|
@@ -970,8 +1161,17 @@ export class KupPlanner {
|
|
|
970
1161
|
};
|
|
971
1162
|
}
|
|
972
1163
|
static get elementRef() { return "rootElement"; }
|
|
1164
|
+
static get watchers() {
|
|
1165
|
+
return [{
|
|
1166
|
+
"propName": "data",
|
|
1167
|
+
"methodName": "dataChanged"
|
|
1168
|
+
}, {
|
|
1169
|
+
"propName": "showSecondaryDates",
|
|
1170
|
+
"methodName": "showSecondaryDatesChanged"
|
|
1171
|
+
}];
|
|
1172
|
+
}
|
|
973
1173
|
}
|
|
974
|
-
_KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
|
|
1174
|
+
_KupPlanner_kupManager = new WeakMap(), _KupPlanner_lastOnChangeReceived = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(), _KupPlanner_phases = new WeakMap(), _KupPlanner_showSecondaryDatesLocal = new WeakMap(), _KupPlanner_instances = new WeakSet(), _KupPlanner_renderReactPlannerElement = function _KupPlanner_renderReactPlannerElement() {
|
|
975
1175
|
var _a;
|
|
976
1176
|
(_a = __classPrivateFieldGet(this, _KupPlanner_rootPlanner, "f")) === null || _a === void 0 ? void 0 : _a.unmount();
|
|
977
1177
|
const componentWrapperElement = this.rootElement.shadowRoot.getElementById(componentWrapperId);
|
|
@@ -983,7 +1183,13 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
|
|
|
983
1183
|
var _a;
|
|
984
1184
|
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
1185
|
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)
|
|
1186
|
+
const valuesToShow = getValuesToShow(row, this.taskIdCol, this.taskNameCol, data.columns, this.taskColumns, () => this.taskColumns.map((col) => col == this.taskDates[0]
|
|
1187
|
+
? '#START#'
|
|
1188
|
+
: col == this.taskDates[1]
|
|
1189
|
+
? '#END#'
|
|
1190
|
+
: getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
|
|
1191
|
+
let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.taskIconCol);
|
|
1192
|
+
let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.taskIconCol);
|
|
987
1193
|
let task = {
|
|
988
1194
|
taskRow: row,
|
|
989
1195
|
taskRowId: row.id,
|
|
@@ -996,6 +1202,9 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
|
|
|
996
1202
|
type: 'project',
|
|
997
1203
|
valuesToShow: valuesToShow,
|
|
998
1204
|
rowType: KupPlannerGanttRowType.TASK,
|
|
1205
|
+
icon: iconUrl
|
|
1206
|
+
? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
|
|
1207
|
+
: undefined,
|
|
999
1208
|
};
|
|
1000
1209
|
return task;
|
|
1001
1210
|
});
|
|
@@ -1008,6 +1217,7 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
|
|
|
1008
1217
|
data.rows
|
|
1009
1218
|
.filter((row) => isAtLeastOneDateValid(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]))
|
|
1010
1219
|
.forEach((row) => {
|
|
1220
|
+
var _a, _b;
|
|
1011
1221
|
const detailId = row.cells[this.detailIdCol].value;
|
|
1012
1222
|
const detailNameId = row.cells[this.detailNameCol].value;
|
|
1013
1223
|
const datesSanitized = sanitizeAllDates(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]);
|
|
@@ -1017,6 +1227,7 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
|
|
|
1017
1227
|
detail = {
|
|
1018
1228
|
id: detailId,
|
|
1019
1229
|
name: detailNameId,
|
|
1230
|
+
detailRow: row,
|
|
1020
1231
|
type: 'timeline',
|
|
1021
1232
|
valuesToShow: valuesToShow,
|
|
1022
1233
|
rowType: KupPlannerGanttRowType.DETAIL,
|
|
@@ -1024,15 +1235,20 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
|
|
|
1024
1235
|
};
|
|
1025
1236
|
details.push(detail);
|
|
1026
1237
|
}
|
|
1238
|
+
let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.detailIconCol);
|
|
1239
|
+
let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.detailIconCol);
|
|
1027
1240
|
detail.schedule.push({
|
|
1028
1241
|
startDate: datesSanitized.dateValues[0],
|
|
1029
1242
|
endDate: datesSanitized.dateValues[1],
|
|
1030
1243
|
color: this.detailColorCol
|
|
1031
|
-
? row.cells[this.detailColorCol].value
|
|
1244
|
+
? (_a = row.cells[this.detailColorCol].value) !== null && _a !== void 0 ? _a : '#D9D9D8'
|
|
1032
1245
|
: '#D9D9D8',
|
|
1033
1246
|
selectedColor: this.detailColorCol
|
|
1034
|
-
? row.cells[this.detailColorCol].value
|
|
1247
|
+
? (_b = row.cells[this.detailColorCol].value) !== null && _b !== void 0 ? _b : '#D9D9D8'
|
|
1035
1248
|
: '#D9D9D8',
|
|
1249
|
+
icon: iconUrl
|
|
1250
|
+
? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
|
|
1251
|
+
: undefined,
|
|
1036
1252
|
});
|
|
1037
1253
|
});
|
|
1038
1254
|
return details;
|
|
@@ -1042,9 +1258,6 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
|
|
|
1042
1258
|
const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
|
|
1043
1259
|
if (task)
|
|
1044
1260
|
task.phases = undefined;
|
|
1045
|
-
// this.plannerProps.mainGantt = JSON.parse(
|
|
1046
|
-
// JSON.stringify(this.plannerProps.mainGantt)
|
|
1047
|
-
// );
|
|
1048
1261
|
this.plannerProps = Object.assign({}, this.plannerProps);
|
|
1049
1262
|
}, _KupPlanner_handleOnClickOnTask = function _KupPlanner_handleOnClickOnTask(nativeEvent) {
|
|
1050
1263
|
const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, nativeEvent.id);
|
|
@@ -1056,6 +1269,12 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
|
|
|
1056
1269
|
return true;
|
|
1057
1270
|
}, _KupPlanner_handleOnClickOnDetail = function _KupPlanner_handleOnClickOnDetail() {
|
|
1058
1271
|
return true;
|
|
1272
|
+
}, _KupPlanner_handleOnContextMenuOnTask = function _KupPlanner_handleOnContextMenuOnTask() {
|
|
1273
|
+
return true;
|
|
1274
|
+
}, _KupPlanner_handleOnContextMenuOnPhase = function _KupPlanner_handleOnContextMenuOnPhase() {
|
|
1275
|
+
return true;
|
|
1276
|
+
}, _KupPlanner_handleOnContextMenuOnDetail = function _KupPlanner_handleOnContextMenuOnDetail() {
|
|
1277
|
+
return true;
|
|
1059
1278
|
}, _KupPlanner_emitOnChangeEventsReceived = function _KupPlanner_emitOnChangeEventsReceived(nativeEvent) {
|
|
1060
1279
|
let emitEvent = false;
|
|
1061
1280
|
if (!__classPrivateFieldGet(this, _KupPlanner_lastOnChangeReceived, "f")) {
|
|
@@ -1067,4 +1286,67 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
|
|
|
1067
1286
|
emitEvent = true;
|
|
1068
1287
|
}
|
|
1069
1288
|
return emitEvent;
|
|
1289
|
+
}, _KupPlanner_onFilter = function _KupPlanner_onFilter(e, isDetail) {
|
|
1290
|
+
const tempData = {
|
|
1291
|
+
columns: this.data.columns,
|
|
1292
|
+
rows: [],
|
|
1293
|
+
};
|
|
1294
|
+
const value = e.target.value;
|
|
1295
|
+
const data = isDetail ? this.detailData : this.data;
|
|
1296
|
+
const tempRows = [];
|
|
1297
|
+
for (let index = 0; index < data.rows.length; index++) {
|
|
1298
|
+
const row = data.rows[index];
|
|
1299
|
+
const cells = row.cells;
|
|
1300
|
+
for (let index = 0; index < data.columns.length; index++) {
|
|
1301
|
+
const column = data.columns[index];
|
|
1302
|
+
const cell = cells[column.name];
|
|
1303
|
+
if (cell) {
|
|
1304
|
+
const dValue = getCellValueForDisplay(data.columns[index], cell);
|
|
1305
|
+
const found = !!(dValue.toLowerCase().indexOf(value.toLowerCase()) > -1);
|
|
1306
|
+
if (found) {
|
|
1307
|
+
tempRows.push({ row, weight: index });
|
|
1308
|
+
break;
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
tempRows
|
|
1314
|
+
.sort((a, b) => a.weight - b.weight)
|
|
1315
|
+
.forEach((tempRow) => {
|
|
1316
|
+
tempData.rows.push(tempRow.row);
|
|
1317
|
+
});
|
|
1318
|
+
const newGantt = isDetail
|
|
1319
|
+
? {
|
|
1320
|
+
secondaryGantt: Object.assign(Object.assign({}, this.plannerProps.secondaryGantt), { items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toDetails).call(this, tempData) }),
|
|
1321
|
+
}
|
|
1322
|
+
: {
|
|
1323
|
+
mainGantt: Object.assign(Object.assign({}, this.plannerProps.mainGantt), { items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toTasks).call(this, tempData) }),
|
|
1324
|
+
};
|
|
1325
|
+
this.plannerProps = Object.assign(Object.assign({}, this.plannerProps), newGantt);
|
|
1326
|
+
}, _KupPlanner_getIconUrl = function _KupPlanner_getIconUrl(row, columnName) {
|
|
1327
|
+
var _a;
|
|
1328
|
+
let iconUrl = undefined;
|
|
1329
|
+
if (columnName) {
|
|
1330
|
+
const iconCell = row.cells[columnName];
|
|
1331
|
+
let icon = (_a = iconCell === null || iconCell === void 0 ? void 0 : iconCell.data) === null || _a === void 0 ? void 0 : _a.resource;
|
|
1332
|
+
if (!icon) {
|
|
1333
|
+
icon = iconCell.value;
|
|
1334
|
+
}
|
|
1335
|
+
if (icon) {
|
|
1336
|
+
iconUrl = getAssetPath('./assets/svg/' + icon + '.svg');
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
return iconUrl;
|
|
1340
|
+
}, _KupPlanner_getIconColor = function _KupPlanner_getIconColor(row, columnName) {
|
|
1341
|
+
var _a;
|
|
1342
|
+
let iconColor = undefined;
|
|
1343
|
+
if (columnName) {
|
|
1344
|
+
const iconCell = row.cells[columnName];
|
|
1345
|
+
iconColor = (_a = iconCell === null || iconCell === void 0 ? void 0 : iconCell.data) === null || _a === void 0 ? void 0 : _a.color;
|
|
1346
|
+
if (iconColor) {
|
|
1347
|
+
iconColor =
|
|
1348
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.colorCheck(iconColor).hexColor;
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
return iconColor;
|
|
1070
1352
|
};
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
.kup-qlik-container {
|
|
11
11
|
width: 576px;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
13
|
.kup-qlik-row > .qvobject {
|
|
15
14
|
flex: 0 0 auto;
|
|
16
15
|
min-width: 100px;
|
|
@@ -21,7 +20,6 @@
|
|
|
21
20
|
.kup-qlik-container {
|
|
22
21
|
width: 768px;
|
|
23
22
|
}
|
|
24
|
-
|
|
25
23
|
.kup-qlik-row > .qvobject {
|
|
26
24
|
flex: 0 0 auto;
|
|
27
25
|
min-width: 100px;
|
|
@@ -32,7 +30,6 @@
|
|
|
32
30
|
.kup-qlik-container {
|
|
33
31
|
width: 992px;
|
|
34
32
|
}
|
|
35
|
-
|
|
36
33
|
.kup-qlik-row > .qvobject {
|
|
37
34
|
flex: 0 0 auto;
|
|
38
35
|
min-width: 100px;
|
|
@@ -43,7 +40,6 @@
|
|
|
43
40
|
.kup-qlik-container {
|
|
44
41
|
width: 1200px;
|
|
45
42
|
}
|
|
46
|
-
|
|
47
43
|
.kup-qlik-row > .qvobject {
|
|
48
44
|
flex: 0 0 auto;
|
|
49
45
|
min-width: 100px;
|
|
@@ -61,16 +57,16 @@
|
|
|
61
57
|
height: var(--lyo_obj-height);
|
|
62
58
|
}
|
|
63
59
|
.kup-qlik-row .size-S {
|
|
64
|
-
height: calc(var(--lyo_obj-height)/2);
|
|
60
|
+
height: calc(var(--lyo_obj-height) / 2);
|
|
65
61
|
}
|
|
66
62
|
.kup-qlik-row .size-XS {
|
|
67
|
-
height: calc(var(--lyo_obj-height)/3);
|
|
63
|
+
height: calc(var(--lyo_obj-height) / 3);
|
|
68
64
|
}
|
|
69
65
|
.kup-qlik-row .size-L {
|
|
70
|
-
height: calc(var(--lyo_obj-height)*2);
|
|
66
|
+
height: calc(var(--lyo_obj-height) * 2);
|
|
71
67
|
}
|
|
72
68
|
.kup-qlik-row .size-XL {
|
|
73
|
-
height: calc(var(--lyo_obj-height)*3);
|
|
69
|
+
height: calc(var(--lyo_obj-height) * 3);
|
|
74
70
|
}
|
|
75
71
|
.kup-qlik-row .bordered {
|
|
76
72
|
border: 1px solid var(--kup-border-color, #969696);
|