@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
import { GenericObject } from '../../types/GenericTypes';
|
|
3
|
-
import { KupPlannerEventPayload, KupPlannerTaskAction } from './kup-planner-declarations';
|
|
3
|
+
import { KupPlannerEventPayload, KupPlannerGanttTask, KupPlannerPhase, KupPlannerTaskAction, KupPlannerDetail } from './kup-planner-declarations';
|
|
4
4
|
import { KupDataDataset } from '../../managers/kup-data/kup-data-declarations';
|
|
5
5
|
import { GanttRow, PlannerProps } from '@sme.up/gantt-component';
|
|
6
6
|
export declare class KupPlanner {
|
|
@@ -20,20 +20,135 @@ export declare class KupPlanner {
|
|
|
20
20
|
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
|
|
21
21
|
*/
|
|
22
22
|
customStyle: string;
|
|
23
|
+
/**
|
|
24
|
+
* Dataset containg the tasks list
|
|
25
|
+
* @default null
|
|
26
|
+
*/
|
|
23
27
|
data: KupDataDataset;
|
|
24
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Dataset containg the details list
|
|
30
|
+
* @default null
|
|
31
|
+
*/
|
|
32
|
+
detailData: KupDataDataset;
|
|
33
|
+
/**
|
|
34
|
+
* Column containing the detail color, in hex format
|
|
35
|
+
* @default null
|
|
36
|
+
*/
|
|
37
|
+
detailColorCol: string;
|
|
38
|
+
/**
|
|
39
|
+
* Columns containing informations displayed in the left box, near the gantt of details
|
|
40
|
+
* @default null
|
|
41
|
+
*/
|
|
42
|
+
detailColumns: string[];
|
|
43
|
+
/**
|
|
44
|
+
* Columns containing detail duration, from (firstDate) to (secondDate)
|
|
45
|
+
* @default null
|
|
46
|
+
*/
|
|
47
|
+
detailDates: string[];
|
|
48
|
+
/**
|
|
49
|
+
* Height for detail gantt
|
|
50
|
+
* @default null
|
|
51
|
+
*/
|
|
52
|
+
detailHeight: number;
|
|
53
|
+
/**
|
|
54
|
+
* Column containing unique detail identifier
|
|
55
|
+
* @default null
|
|
56
|
+
*/
|
|
57
|
+
detailIdCol: string;
|
|
58
|
+
/**
|
|
59
|
+
* Column containing detail name displayed
|
|
60
|
+
* @default null
|
|
61
|
+
*/
|
|
62
|
+
detailNameCol: string;
|
|
63
|
+
/**
|
|
64
|
+
* Columns containing fForecast detail duration, from (firstDate) to (secondDate)
|
|
65
|
+
* @default null
|
|
66
|
+
*/
|
|
67
|
+
detailPrevDates: string[];
|
|
68
|
+
/**
|
|
69
|
+
* Total size of the cells inside to the left box, near the gantt
|
|
70
|
+
* @default '300px'
|
|
71
|
+
*/
|
|
72
|
+
listCellWidth: string;
|
|
73
|
+
/**
|
|
74
|
+
* Max width for component
|
|
75
|
+
* @default '90vw'
|
|
76
|
+
*/
|
|
77
|
+
maxWidth: string;
|
|
78
|
+
/**
|
|
79
|
+
* Column containing the phase color in hex format
|
|
80
|
+
* @default null
|
|
81
|
+
*/
|
|
25
82
|
phaseColorCol: string;
|
|
83
|
+
/**
|
|
84
|
+
* Columns containing informations displayed in the left box ,near the gantt of phases
|
|
85
|
+
* @default null
|
|
86
|
+
*/
|
|
26
87
|
phaseColumns: string[];
|
|
88
|
+
/**
|
|
89
|
+
* Column containing the name of the parent phases
|
|
90
|
+
* @default null
|
|
91
|
+
*/
|
|
27
92
|
phaseColParDep: string;
|
|
93
|
+
/**
|
|
94
|
+
* Columns containing phase duration, from (firstDate) to (secondDate)
|
|
95
|
+
* @default null
|
|
96
|
+
*/
|
|
28
97
|
phaseDates: string[];
|
|
98
|
+
/**
|
|
99
|
+
* Column containing unique phase identifier
|
|
100
|
+
* @default null
|
|
101
|
+
*/
|
|
29
102
|
phaseIdCol: string;
|
|
103
|
+
/**
|
|
104
|
+
* Column containing phase name displayed
|
|
105
|
+
* @default null
|
|
106
|
+
*/
|
|
30
107
|
phaseNameCol: string;
|
|
108
|
+
/**
|
|
109
|
+
* Columns containing forecast phase duration, from (firstDate) to (secondDate)
|
|
110
|
+
* @default null
|
|
111
|
+
*/
|
|
31
112
|
phasePrevDates: string[];
|
|
113
|
+
/**
|
|
114
|
+
* Enable/disable display of secondary dates
|
|
115
|
+
* @default false
|
|
116
|
+
*/
|
|
117
|
+
showSecondaryDates: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Columns containing informations displayed in the left box, near the gantt
|
|
120
|
+
* @default null
|
|
121
|
+
*/
|
|
32
122
|
taskColumns: string[];
|
|
123
|
+
/**
|
|
124
|
+
* Columns containing task duration, from (firstDate) to (secondDate)
|
|
125
|
+
* @default null
|
|
126
|
+
*/
|
|
33
127
|
taskDates: string[];
|
|
128
|
+
/**
|
|
129
|
+
* Height for main gantt
|
|
130
|
+
* @default null
|
|
131
|
+
*/
|
|
132
|
+
taskHeight: number;
|
|
133
|
+
/**
|
|
134
|
+
* Column containing unique task identifier
|
|
135
|
+
* @default null
|
|
136
|
+
*/
|
|
34
137
|
taskIdCol: string;
|
|
138
|
+
/**
|
|
139
|
+
* Column containing task name displayed
|
|
140
|
+
* @default null
|
|
141
|
+
*/
|
|
35
142
|
taskNameCol: string;
|
|
143
|
+
/**
|
|
144
|
+
* Columns containing forecast task duration, from (firstDate) to (secondDate)
|
|
145
|
+
* @default null
|
|
146
|
+
*/
|
|
36
147
|
taskPrevDates: string[];
|
|
148
|
+
/**
|
|
149
|
+
* Message displayed on top
|
|
150
|
+
* @default null
|
|
151
|
+
*/
|
|
37
152
|
titleMess: string;
|
|
38
153
|
kupClick: EventEmitter<KupPlannerEventPayload>;
|
|
39
154
|
onKupClick(event: GanttRow, taskAction?: KupPlannerTaskAction): void;
|
|
@@ -61,7 +176,7 @@ export declare class KupPlanner {
|
|
|
61
176
|
* @param data - Matrix which contains project phases
|
|
62
177
|
*/
|
|
63
178
|
addPhases(taskId: string, data: KupDataDataset): Promise<void>;
|
|
64
|
-
handleOnClick(nativeEvent:
|
|
179
|
+
handleOnClick(nativeEvent: KupPlannerGanttTask | KupPlannerPhase | KupPlannerDetail): void;
|
|
65
180
|
handleOnDateChange(nativeEvent: GanttRow): void;
|
|
66
181
|
componentWillLoad(): void;
|
|
67
182
|
componentDidLoad(): void;
|
|
@@ -44,6 +44,7 @@ import { KupLazyRender } from "./components/kup-lazy/kup-lazy-declarations";
|
|
|
44
44
|
import { KupNavBarStyling } from "./components/kup-nav-bar/kup-nav-bar-declarations";
|
|
45
45
|
import { KupNumericPickerEventPayload } from "./components/kup-numeric-picker/kup-numeric-picker-declarations";
|
|
46
46
|
import { KupPlannerEventPayload, KupPlannerPhase } from "./components/kup-planner/kup-planner-declarations";
|
|
47
|
+
import { TaskType } from "@sme.up/gantt-component/dist/types/public-types";
|
|
47
48
|
import { KupQlikGrid, QlikServer } from "./components/kup-qlik/kup-qlik-declarations";
|
|
48
49
|
import { KupRadioChangeEventPayload, KupRadioData } from "./components/kup-radio/kup-radio-declarations";
|
|
49
50
|
import { KupRatingClickEventPayload } from "./components/kup-rating/kup-rating-declarations";
|
|
@@ -90,6 +91,7 @@ export { KupLazyRender } from "./components/kup-lazy/kup-lazy-declarations";
|
|
|
90
91
|
export { KupNavBarStyling } from "./components/kup-nav-bar/kup-nav-bar-declarations";
|
|
91
92
|
export { KupNumericPickerEventPayload } from "./components/kup-numeric-picker/kup-numeric-picker-declarations";
|
|
92
93
|
export { KupPlannerEventPayload, KupPlannerPhase } from "./components/kup-planner/kup-planner-declarations";
|
|
94
|
+
export { TaskType } from "@sme.up/gantt-component/dist/types/public-types";
|
|
93
95
|
export { KupQlikGrid, QlikServer } from "./components/kup-qlik/kup-qlik-declarations";
|
|
94
96
|
export { KupRadioChangeEventPayload, KupRadioData } from "./components/kup-radio/kup-radio-declarations";
|
|
95
97
|
export { KupRatingClickEventPayload } from "./components/kup-rating/kup-rating-declarations";
|
|
@@ -2447,20 +2449,101 @@ export namespace Components {
|
|
|
2447
2449
|
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
|
|
2448
2450
|
*/
|
|
2449
2451
|
"customStyle": string;
|
|
2452
|
+
/**
|
|
2453
|
+
* Dataset containg the tasks list
|
|
2454
|
+
* @default null
|
|
2455
|
+
*/
|
|
2450
2456
|
"data": KupDataDataset;
|
|
2451
|
-
|
|
2457
|
+
/**
|
|
2458
|
+
* Column containing the detail color, in hex format
|
|
2459
|
+
* @default null
|
|
2460
|
+
*/
|
|
2461
|
+
"detailColorCol": string;
|
|
2462
|
+
/**
|
|
2463
|
+
* Columns containing informations displayed in the left box, near the gantt of details
|
|
2464
|
+
* @default null
|
|
2465
|
+
*/
|
|
2466
|
+
"detailColumns": string[];
|
|
2467
|
+
/**
|
|
2468
|
+
* Dataset containg the details list
|
|
2469
|
+
* @default null
|
|
2470
|
+
*/
|
|
2471
|
+
"detailData": KupDataDataset;
|
|
2472
|
+
/**
|
|
2473
|
+
* Columns containing detail duration, from (firstDate) to (secondDate)
|
|
2474
|
+
* @default null
|
|
2475
|
+
*/
|
|
2476
|
+
"detailDates": string[];
|
|
2477
|
+
/**
|
|
2478
|
+
* Height for detail gantt
|
|
2479
|
+
* @default null
|
|
2480
|
+
*/
|
|
2481
|
+
"detailHeight": number;
|
|
2482
|
+
/**
|
|
2483
|
+
* Column containing unique detail identifier
|
|
2484
|
+
* @default null
|
|
2485
|
+
*/
|
|
2486
|
+
"detailIdCol": string;
|
|
2487
|
+
/**
|
|
2488
|
+
* Column containing detail name displayed
|
|
2489
|
+
* @default null
|
|
2490
|
+
*/
|
|
2491
|
+
"detailNameCol": string;
|
|
2492
|
+
/**
|
|
2493
|
+
* Columns containing fForecast detail duration, from (firstDate) to (secondDate)
|
|
2494
|
+
* @default null
|
|
2495
|
+
*/
|
|
2496
|
+
"detailPrevDates": string[];
|
|
2452
2497
|
/**
|
|
2453
2498
|
* Used to retrieve component's props values.
|
|
2454
2499
|
* @param descriptions - When provided and true, the result will be the list of props with their description.
|
|
2455
2500
|
* @returns List of props as object, each key will be a prop.
|
|
2456
2501
|
*/
|
|
2457
2502
|
"getProps": (descriptions?: boolean) => Promise<GenericObject>;
|
|
2503
|
+
/**
|
|
2504
|
+
* Total size of the cells inside to the left box, near the gantt
|
|
2505
|
+
* @default '300px'
|
|
2506
|
+
*/
|
|
2507
|
+
"listCellWidth": string;
|
|
2508
|
+
/**
|
|
2509
|
+
* Max width for component
|
|
2510
|
+
* @default '90vw'
|
|
2511
|
+
*/
|
|
2512
|
+
"maxWidth": string;
|
|
2513
|
+
/**
|
|
2514
|
+
* Column containing the name of the parent phases
|
|
2515
|
+
* @default null
|
|
2516
|
+
*/
|
|
2458
2517
|
"phaseColParDep": string;
|
|
2518
|
+
/**
|
|
2519
|
+
* Column containing the phase color in hex format
|
|
2520
|
+
* @default null
|
|
2521
|
+
*/
|
|
2459
2522
|
"phaseColorCol": string;
|
|
2523
|
+
/**
|
|
2524
|
+
* Columns containing informations displayed in the left box ,near the gantt of phases
|
|
2525
|
+
* @default null
|
|
2526
|
+
*/
|
|
2460
2527
|
"phaseColumns": string[];
|
|
2528
|
+
/**
|
|
2529
|
+
* Columns containing phase duration, from (firstDate) to (secondDate)
|
|
2530
|
+
* @default null
|
|
2531
|
+
*/
|
|
2461
2532
|
"phaseDates": string[];
|
|
2533
|
+
/**
|
|
2534
|
+
* Column containing unique phase identifier
|
|
2535
|
+
* @default null
|
|
2536
|
+
*/
|
|
2462
2537
|
"phaseIdCol": string;
|
|
2538
|
+
/**
|
|
2539
|
+
* Column containing phase name displayed
|
|
2540
|
+
* @default null
|
|
2541
|
+
*/
|
|
2463
2542
|
"phaseNameCol": string;
|
|
2543
|
+
/**
|
|
2544
|
+
* Columns containing forecast phase duration, from (firstDate) to (secondDate)
|
|
2545
|
+
* @default null
|
|
2546
|
+
*/
|
|
2464
2547
|
"phasePrevDates": string[];
|
|
2465
2548
|
/**
|
|
2466
2549
|
* This method is used to trigger a new render of the component.
|
|
@@ -2471,11 +2554,45 @@ export namespace Components {
|
|
|
2471
2554
|
* @param props - Object containing props that will be set to the component.
|
|
2472
2555
|
*/
|
|
2473
2556
|
"setProps": (props: GenericObject) => Promise<void>;
|
|
2557
|
+
/**
|
|
2558
|
+
* Enable/disable display of secondary dates
|
|
2559
|
+
* @default false
|
|
2560
|
+
*/
|
|
2561
|
+
"showSecondaryDates": boolean;
|
|
2562
|
+
/**
|
|
2563
|
+
* Columns containing informations displayed in the left box, near the gantt
|
|
2564
|
+
* @default null
|
|
2565
|
+
*/
|
|
2474
2566
|
"taskColumns": string[];
|
|
2567
|
+
/**
|
|
2568
|
+
* Columns containing task duration, from (firstDate) to (secondDate)
|
|
2569
|
+
* @default null
|
|
2570
|
+
*/
|
|
2475
2571
|
"taskDates": string[];
|
|
2572
|
+
/**
|
|
2573
|
+
* Height for main gantt
|
|
2574
|
+
* @default null
|
|
2575
|
+
*/
|
|
2576
|
+
"taskHeight": number;
|
|
2577
|
+
/**
|
|
2578
|
+
* Column containing unique task identifier
|
|
2579
|
+
* @default null
|
|
2580
|
+
*/
|
|
2476
2581
|
"taskIdCol": string;
|
|
2582
|
+
/**
|
|
2583
|
+
* Column containing task name displayed
|
|
2584
|
+
* @default null
|
|
2585
|
+
*/
|
|
2477
2586
|
"taskNameCol": string;
|
|
2587
|
+
/**
|
|
2588
|
+
* Columns containing forecast task duration, from (firstDate) to (secondDate)
|
|
2589
|
+
* @default null
|
|
2590
|
+
*/
|
|
2478
2591
|
"taskPrevDates": string[];
|
|
2592
|
+
/**
|
|
2593
|
+
* Message displayed on top
|
|
2594
|
+
* @default null
|
|
2595
|
+
*/
|
|
2479
2596
|
"titleMess": string;
|
|
2480
2597
|
}
|
|
2481
2598
|
interface KupProbe {
|
|
@@ -5636,23 +5753,138 @@ declare namespace LocalJSX {
|
|
|
5636
5753
|
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
|
|
5637
5754
|
*/
|
|
5638
5755
|
"customStyle"?: string;
|
|
5756
|
+
/**
|
|
5757
|
+
* Dataset containg the tasks list
|
|
5758
|
+
* @default null
|
|
5759
|
+
*/
|
|
5639
5760
|
"data"?: KupDataDataset;
|
|
5640
|
-
|
|
5761
|
+
/**
|
|
5762
|
+
* Column containing the detail color, in hex format
|
|
5763
|
+
* @default null
|
|
5764
|
+
*/
|
|
5765
|
+
"detailColorCol"?: string;
|
|
5766
|
+
/**
|
|
5767
|
+
* Columns containing informations displayed in the left box, near the gantt of details
|
|
5768
|
+
* @default null
|
|
5769
|
+
*/
|
|
5770
|
+
"detailColumns"?: string[];
|
|
5771
|
+
/**
|
|
5772
|
+
* Dataset containg the details list
|
|
5773
|
+
* @default null
|
|
5774
|
+
*/
|
|
5775
|
+
"detailData"?: KupDataDataset;
|
|
5776
|
+
/**
|
|
5777
|
+
* Columns containing detail duration, from (firstDate) to (secondDate)
|
|
5778
|
+
* @default null
|
|
5779
|
+
*/
|
|
5780
|
+
"detailDates"?: string[];
|
|
5781
|
+
/**
|
|
5782
|
+
* Height for detail gantt
|
|
5783
|
+
* @default null
|
|
5784
|
+
*/
|
|
5785
|
+
"detailHeight"?: number;
|
|
5786
|
+
/**
|
|
5787
|
+
* Column containing unique detail identifier
|
|
5788
|
+
* @default null
|
|
5789
|
+
*/
|
|
5790
|
+
"detailIdCol"?: string;
|
|
5791
|
+
/**
|
|
5792
|
+
* Column containing detail name displayed
|
|
5793
|
+
* @default null
|
|
5794
|
+
*/
|
|
5795
|
+
"detailNameCol"?: string;
|
|
5796
|
+
/**
|
|
5797
|
+
* Columns containing fForecast detail duration, from (firstDate) to (secondDate)
|
|
5798
|
+
* @default null
|
|
5799
|
+
*/
|
|
5800
|
+
"detailPrevDates"?: string[];
|
|
5801
|
+
/**
|
|
5802
|
+
* Total size of the cells inside to the left box, near the gantt
|
|
5803
|
+
* @default '300px'
|
|
5804
|
+
*/
|
|
5805
|
+
"listCellWidth"?: string;
|
|
5806
|
+
/**
|
|
5807
|
+
* Max width for component
|
|
5808
|
+
* @default '90vw'
|
|
5809
|
+
*/
|
|
5810
|
+
"maxWidth"?: string;
|
|
5641
5811
|
"onKup-planner-click"?: (event: KupPlannerCustomEvent<KupPlannerEventPayload>) => void;
|
|
5642
5812
|
"onKup-planner-datechange"?: (event: KupPlannerCustomEvent<KupPlannerEventPayload>) => void;
|
|
5643
5813
|
"onKup-planner-ready"?: (event: KupPlannerCustomEvent<KupPlannerEventPayload>) => void;
|
|
5814
|
+
/**
|
|
5815
|
+
* Column containing the name of the parent phases
|
|
5816
|
+
* @default null
|
|
5817
|
+
*/
|
|
5644
5818
|
"phaseColParDep"?: string;
|
|
5819
|
+
/**
|
|
5820
|
+
* Column containing the phase color in hex format
|
|
5821
|
+
* @default null
|
|
5822
|
+
*/
|
|
5645
5823
|
"phaseColorCol"?: string;
|
|
5824
|
+
/**
|
|
5825
|
+
* Columns containing informations displayed in the left box ,near the gantt of phases
|
|
5826
|
+
* @default null
|
|
5827
|
+
*/
|
|
5646
5828
|
"phaseColumns"?: string[];
|
|
5829
|
+
/**
|
|
5830
|
+
* Columns containing phase duration, from (firstDate) to (secondDate)
|
|
5831
|
+
* @default null
|
|
5832
|
+
*/
|
|
5647
5833
|
"phaseDates"?: string[];
|
|
5834
|
+
/**
|
|
5835
|
+
* Column containing unique phase identifier
|
|
5836
|
+
* @default null
|
|
5837
|
+
*/
|
|
5648
5838
|
"phaseIdCol"?: string;
|
|
5839
|
+
/**
|
|
5840
|
+
* Column containing phase name displayed
|
|
5841
|
+
* @default null
|
|
5842
|
+
*/
|
|
5649
5843
|
"phaseNameCol"?: string;
|
|
5844
|
+
/**
|
|
5845
|
+
* Columns containing forecast phase duration, from (firstDate) to (secondDate)
|
|
5846
|
+
* @default null
|
|
5847
|
+
*/
|
|
5650
5848
|
"phasePrevDates"?: string[];
|
|
5849
|
+
/**
|
|
5850
|
+
* Enable/disable display of secondary dates
|
|
5851
|
+
* @default false
|
|
5852
|
+
*/
|
|
5853
|
+
"showSecondaryDates"?: boolean;
|
|
5854
|
+
/**
|
|
5855
|
+
* Columns containing informations displayed in the left box, near the gantt
|
|
5856
|
+
* @default null
|
|
5857
|
+
*/
|
|
5651
5858
|
"taskColumns"?: string[];
|
|
5859
|
+
/**
|
|
5860
|
+
* Columns containing task duration, from (firstDate) to (secondDate)
|
|
5861
|
+
* @default null
|
|
5862
|
+
*/
|
|
5652
5863
|
"taskDates"?: string[];
|
|
5864
|
+
/**
|
|
5865
|
+
* Height for main gantt
|
|
5866
|
+
* @default null
|
|
5867
|
+
*/
|
|
5868
|
+
"taskHeight"?: number;
|
|
5869
|
+
/**
|
|
5870
|
+
* Column containing unique task identifier
|
|
5871
|
+
* @default null
|
|
5872
|
+
*/
|
|
5653
5873
|
"taskIdCol"?: string;
|
|
5874
|
+
/**
|
|
5875
|
+
* Column containing task name displayed
|
|
5876
|
+
* @default null
|
|
5877
|
+
*/
|
|
5654
5878
|
"taskNameCol"?: string;
|
|
5879
|
+
/**
|
|
5880
|
+
* Columns containing forecast task duration, from (firstDate) to (secondDate)
|
|
5881
|
+
* @default null
|
|
5882
|
+
*/
|
|
5655
5883
|
"taskPrevDates"?: string[];
|
|
5884
|
+
/**
|
|
5885
|
+
* Message displayed on top
|
|
5886
|
+
* @default null
|
|
5887
|
+
*/
|
|
5656
5888
|
"titleMess"?: string;
|
|
5657
5889
|
}
|
|
5658
5890
|
interface KupProbe {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sme.up/ketchup",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.2",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"smeup",
|
|
6
6
|
"KetchUP",
|
|
@@ -34,7 +34,9 @@
|
|
|
34
34
|
"test:spec": "npm run build:setup && stencil test --spec",
|
|
35
35
|
"test:e2e": "npm run build:setup && stencil test --e2e",
|
|
36
36
|
"test": "npm run build:setup && stencil test --spec --e2e",
|
|
37
|
-
"test.watch": "npm run build:setup && stencil test --spec --e2e --watchAll"
|
|
37
|
+
"test.watch": "npm run build:setup && stencil test --spec --e2e --watchAll",
|
|
38
|
+
"react:dev": "npx link ../../../gantt-component && cd ../../../gantt-component && npx link ../ketchup/packages/ketchup/node_modules/react ../ketchup/packages/ketchup/node_modules/react-dom && cd ../ketchup/packages/ketchup",
|
|
39
|
+
"jenkins:react:dev": "npx link ../../../GanttComponent-Develop-Continuum && cd ../../../GanttComponent-Develop-Continuum && npx link ../KetchUP-Develop-Continuum/packages/ketchup/node_modules/react ../KetchUP-Develop-Continuum/packages/ketchup/node_modules/react-dom && cd ../KetchUP-Develop-Continuum/packages/ketchup"
|
|
38
40
|
},
|
|
39
41
|
"dependencies": {
|
|
40
42
|
"@fullcalendar/core": "^5.11.0",
|
|
@@ -45,7 +47,7 @@
|
|
|
45
47
|
"@material/form-field": "^14.0.0",
|
|
46
48
|
"@material/ripple": "^14.0.0",
|
|
47
49
|
"@material/textfield": "^14.0.0",
|
|
48
|
-
"@sme.up/gantt-component": "^1.3.
|
|
50
|
+
"@sme.up/gantt-component": "^1.3.20",
|
|
49
51
|
"d3-shape": "^3.1.0",
|
|
50
52
|
"dayjs": "^1.11.1",
|
|
51
53
|
"echarts": "^5.3.2",
|
|
@@ -59,7 +61,7 @@
|
|
|
59
61
|
"vanilla-picker": "^2.12.1"
|
|
60
62
|
},
|
|
61
63
|
"devDependencies": {
|
|
62
|
-
"@stencil/core": "^3.0
|
|
64
|
+
"@stencil/core": "^3.1.0",
|
|
63
65
|
"@stencil/sass": "^1.4.1",
|
|
64
66
|
"@stencil/react-output-target": "0.3.1",
|
|
65
67
|
"@types/d3-shape": "^3.0.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as o,f as i,h as e,H as s,g as r}from"./p-9dcfbb1e.js";import{k as n,z as a,g as l,s as h,u as c,l as p,K as b,c as d,R as u,W as x,X as g,Y as f,I as m,a3 as k}from"./p-b63a5a44.js";import{f as w,p as v,s as y,d as _,r as j,h as C,b as R}from"./p-4505a48d.js";import{F as A}from"./p-a7ae0b4d.js";import{a as z}from"./p-7bd28eac.js";import{c as P}from"./p-97e8ea42.js";import{F as I}from"./p-32dc31ad.js";import{F as O}from"./p-a203f78b.js";import"./p-a1adab40.js";import"./p-6c77a36c.js";import"./p-9f9b6656.js";import"./p-ae3e0d31.js";import"./p-79b0730b.js";import"./p-81605f08.js";var S;!function(t){t.cardData="Data of the card linked to the box when the latter's layout must be a premade template.",t.columns="Number of columns.",t.customStyle="Custom style of the component.",t.data="Actual data of the box.",t.dragEnabled="Enable dragging.",t.dropEnabled="Enable dropping.",t.dropOnSection="Drop can be done in section.",t.enableRowActions="If enabled, a button to load / display the row actions will be displayed on the right of every box.",t.globalFilter="When set to true it activates the global filter.",t.globalFilterValue="The value of the global filter.",t.kanban="Displays the boxlist as a Kanban.",t.layout="How the field will be displayed. If not present, a default one will be created.",t.multiSelection="Enable multi selection.",t.pageSelected="Current page number.",t.pageSize="Number of boxes per page.",t.pagination="Enables pagination.",t.rowsPerPage="Number of current rows per page.",t.scrollOnHover="Activates the scroll on hover function.",t.selectBox="Automatically selects the box at the specified index.",t.selectedRowsState="Multiple selection.",t.showSelection="If enabled, highlights the selected box/boxes.",t.sortBy="If sorting is enabled, specifies which column to sort.",t.sortEnabled="Enable sorting.",t.stateId="",t.store="",t.swipeDisabled="Disable swipe."}(S||(S={}));class M{constructor(){this.globalFilterValue="",this.sortBy="",this.selectedRowsState="",this.pageSelected=1,this.rowsPerPage=0,this.load=!1}toDebugString(){return"box state"}}const B=class{constructor(i){t(this,i),this.kupBoxClick=o(this,"kup-box-click",6),this.kupBoxSelected=o(this,"kup-box-selected",6),this.kupAutoBoxSelect=o(this,"kup-box-autoselect",6),this.kupRowActionMenuClick=o(this,"kup-box-rowactionmenuclick",6),this.kupRowActionClick=o(this,"kup-box-rowactionclick",6),this.kupDidLoad=o(this,"kup-box-didload",6),this.kupDidUnload=o(this,"kup-box-didunload",6),this.kupBoxContextMenu=o(this,"kup-box-contextmenu",6),this.state=new M,this.kupManager=n(),this.visibleColumns=[],this.rows=[],this.filteredRows=[],this.sectionRef=null,this.rowsRefs=[],this.hold=!1,this.interactableDrag=[],this.interactableDrop=[],this.interactableTouch=[],this.collapsedSection={},this.selectedRows=[],this.rowActionMenuOpened=void 0,this.currentPage=1,this.currentRowsPerPage=10,this.cardData=null,this.columns=1,this.customStyle="",this.data=null,this.dragEnabled=!1,this.dropEnabled=!1,this.dropOnSection=!1,this.editableData=!1,this.enableRowActions=!1,this.globalFilter=!1,this.globalFilterValue="",this.kanban=null,this.layout=void 0,this.multiSelection=!1,this.pageSelected=1,this.pageSize=10,this.pagination=!1,this.rowsPerPage=void 0,this.scrollOnHover=!1,this.selectBox=void 0,this.selectedRowsState=void 0,this.showSelection=!0,this.sortBy=void 0,this.sortEnabled=!1,this.stateId="",this.store=void 0,this.swipeDisabled=!1}initWithPersistedState(){if(this.store&&this.stateId){const t=this.store.getState(this.stateId);null!=t&&(this.kupManager.debug.logMessage(this,"Initialize with state for stateId "+this.stateId+": "+t),this.sortBy=this.state.sortBy,this.globalFilterValue=this.state.globalFilterValue,this.selectedRowsState=this.state.selectedRowsState,this.pageSelected=this.state.pageSelected,this.rowsPerPage=this.state.rowsPerPage)}}persistState(){if(this.store&&this.stateId){let t=!1;this.kupManager.objects.deepEqual(this.state.sortBy,this.sortBy)||(this.state.sortBy=this.sortBy,t=!0),this.kupManager.objects.deepEqual(this.state.globalFilterValue,this.globalFilterValue)||(this.state.globalFilterValue=this.globalFilterValue,t=!0),this.kupManager.objects.deepEqual(this.state.pageSelected,this.currentPage)||(this.state.pageSelected=this.currentPage,t=!0),this.kupManager.objects.deepEqual(this.state.rowsPerPage,this.currentRowsPerPage)||(this.state.rowsPerPage=this.currentRowsPerPage,t=!0);const o=this.selectedRows.reduce(((t,o,i)=>t+(i>0?";":"")+o.id),"");if(this.kupManager.objects.deepEqual(this.state.selectedRowsState,o)||(this.state.selectedRowsState=o,t=!0),!this.state.load)return void(this.state.load=!0);t&&(this.kupManager.debug.logMessage(this,"Persisting state for stateId "+this.stateId+": "+this.state),this.store.persistState(this.stateId,this.state))}}rowsPerPageHandler(t){this.currentRowsPerPage=t}recalculateRows(){this.initRows()}onDataChanged(){a(this.getRows()),this.initVisibleColumns(),this.initRows(),this.checkLayout()}onLayoutChanged(){this.checkLayout()}onSelectBoxChanged(){this.handleAutomaticBoxSelection()}async getProps(t){return l(this,S,t)}async loadRowActions(t,o){t.actions=o,this.rowActionMenuOpened=t}async refresh(){i(this)}async setProps(t){h(this,S,t)}getColumns(){return this.data&&this.data.columns?this.data.columns:[{title:"",name:"",size:void 0}]}initVisibleColumns(){this.visibleColumns=this.getColumns().filter((t=>!t.hasOwnProperty("visible")||t.visible))}getRows(){return this.data&&this.data.rows?this.data.rows:[]}initRows(){this.filteredRows=this.getRows(),this.globalFilter&&this.globalFilterValue&&(this.filteredRows=w(this.filteredRows,null,this.globalFilterValue,this.visibleColumns)),this.rows=this.sortRows(this.filteredRows),this.pagination&&(this.rows=v(this.rows,this.currentPage,this.currentRowsPerPage,!1))}sortRows(t){let o=t;return this.sortBy&&(o=y(o,[{column:this.sortBy,sortMode:k.A}])),o}checkScrollOnHover(){this.kupManager.scrollOnHover.isRegistered(this.boxContainer)?this.scrollOnHover||this.kupManager.scrollOnHover.unregister(this.boxContainer):this.scrollOnHover&&this.kupManager.scrollOnHover.register(this.boxContainer)}checkLayout(){if(this.layout)return void(this.boxLayout=this.layout);const t={horizontal:!1,sections:[]},o=this.visibleColumns;let i=o.length,e=[],s=0;for(;i-- >0;)e.push({column:o[s++].name});t.content=e,this.boxLayout={sections:[t]}}onSortChange(t){let o=c(this.visibleColumns,t.detail.value);this.sortBy=o.name}onGlobalFilterChange({detail:t}){let o="";t&&t.value&&(o=t.value),this.globalFilterValue=o}isSectionExpanded(t,o){return!(!t.id||!o.id)&&this.collapsedSection[o.id]&&this.collapsedSection[o.id][t.id]}handleAutomaticBoxSelection(){if(this.selectBox&&this.selectBox>0&&this.selectBox<=this.data.rows.length){this.selectedRows=[];for(let t of this.data.rows)if(t.id===(this.selectBox-1).toString()){this.selectedRows.push(t);break}this.kupAutoBoxSelect.emit({comp:this,id:this.rootElement.id,row:this.selectedRows[0]})}}getEventDetails(t,o){let i=null,e=null,s=null,r=null;if(t&&(i=t.closest(".box-object")||t.querySelector(".box-object")||t.closest(".f-cell")),i)if(i.classList.contains("f-cell")){const t=i["kup-get-cell-props"]();e=t.cell,r=t.column,s=t.row}else e=i["data-cell"],s=i["data-row"],r=c(this.visibleColumns,i.dataset.column);return{boxObject:i||null,column:r||null,cell:e||null,originalEvent:o,row:s||null}}contextMenuHandler(t){return this.getEventDetails(t.target,t)}checkIfElementIsActionMenuIcon(t){return!(!t.tagName||!t.parentElement)&&"svg"===t.tagName&&t.parentElement.classList.contains("row-actions-toggler")}onBoxClick({target:t},o){if(!(t instanceof HTMLElement))return;let i=t,e=i.classList;for(;!e.contains("box-object")&&!e.contains("box-section")&&!e.contains("box")&&(i=i.parentElement,null!==i);)e=i.classList;let s=null;e.contains("box-object")&&(s=i.dataset.column),this.kupBoxClick.emit({comp:this,id:this.rootElement.id,row:o,column:s}),this.multiSelection?this.onSelectionCheckChange(o):this.selectedRows=[o]}onSelectionCheckChange(t){var o=-1;for(let i=0;i<this.selectedRows.length;i++)if(this.selectedRows[i].id===t.id){o=i;break}o>=0?(this.selectedRows.splice(o,1),this.selectedRows=[...this.selectedRows]):this.selectedRows=[...this.selectedRows,t],this.kupBoxSelected.emit({comp:this,id:this.rootElement.id,rows:this.selectedRows})}toggleSectionExpand(t,o){if(o.id)if(t.id){if(this.collapsedSection[o.id]){const i=this.collapsedSection[o.id];i[t.id]=!i[t.id]||!i[t.id]}else this.collapsedSection[o.id]={},this.collapsedSection[o.id][t.id]=!0;this.collapsedSection=Object.assign({},this.collapsedSection)}else console.error("cannot expand / collapse a section of a row without ad id");else console.error("cannot expand / collapse a section withoun an ID")}onRowAction(t){t&&(t!==this.rowActionMenuOpened?t.actions?this.rowActionMenuOpened=t:this.kupRowActionMenuClick.emit({comp:this,id:this.rootElement.id,row:t}):this.rowActionMenuOpened=null)}onRowActionClick(t,o,i){this.kupRowActionClick.emit({comp:this,id:this.rootElement.id,row:t,action:o,index:i})}clickFunction(t){try{const o=t.composedPath();for(let t of o)if(this.checkIfElementIsActionMenuIcon(t))return}catch(o){if(this.checkIfElementIsActionMenuIcon(t.target))return}this.rowActionMenuOpened=null}handlePageChange(t){const o=_(t,this.filteredRows.length,this.currentRowsPerPage);o&&(this.currentPage=o)}handleRowsPerPageChange(t){const o=j(t,this.filteredRows.length);o&&(this.currentRowsPerPage=o,this.adjustPaginator())}adjustPaginator(){const t=Math.ceil(this.rows.length/this.currentRowsPerPage);this.currentPage>t&&(this.currentPage=1)}renderSectionAsCard(t){let o=!1;const i={button:[],cell:[],columns:[],image:[],progressbar:[],text:[]};for(let o=0;o<this.data.columns.length;o++){const e=this.data.columns[o];!1!==e.visible&&(i.cell.push(t.cells[e.name]),i.columns.push(e))}for(const o in t.cells)if(t.cells.hasOwnProperty(o)){const e=t.cells[o];if(void 0!==e.cardID&&e.obj)switch(e.obj.p){case"BTN":do{i.button.push({})}while(i.button.length<e.cardID);i.button[e.cardID]={label:e.value};break;case"IMG":do{i.image.push({})}while(i.image.length<e.cardID);i.image[e.cardID]={resource:e.value};break;case"PGB":do{i.progressbar.push({})}while(i.progressbar.length<e.cardID);i.progressbar[e.cardID]={value:e.value};break;default:do{i.text.push("")}while(i.text.length<e.cardID);i.text[e.cardID]=e.value}}for(const e in t.cells)if(t.cells.hasOwnProperty(e)){const s=t.cells[e];if(void 0===s.cardID&&s.obj)switch(o=!1,s.obj.p){case"BTN":for(let t=0;t<i.button.length;t++)if(!Object.keys(i.button[t]).length){i.button[t]={label:s.value},o=!0;break}o||i.button.push({label:s.value});break;case"IMG":for(let t=0;t<i.image.length;t++)if(!Object.keys(i.image[t]).length){i.image[t]={resource:s.value},o=!0;break}o||i.image.push({resource:s.value});break;case"PGB":for(let t=0;t<i.progressbar.length;t++)if(!Object.keys(i.progressbar[t]).length){i.progressbar[t]={value:s.value},o=!0;break}o||i.progressbar.push({value:s.value});break;default:for(let t=0;t<i.text.length;t++)if(""===i.text[t]){i.text[t]=s.value,o=!0;break}o||i.text.push(s.value)}}return e("kup-card",Object.assign({data:i},this.cardData))}renderRow(t){const o=[...this.visibleColumns];let i=null,s=t.layout;s||(s=this.boxLayout);let r=!1;if(s){s.horizontal&&(r=!0);const e=s.sections;let n=e.length,a=0;n>0&&(i=[]);const l={horizontal:r};for(;n-- >0;)i.push(null!=this.cardData&&"object"==typeof this.cardData?this.renderSectionAsCard(t):this.renderSection(e[a++],l,t,o))}var n=!1;for(let o of this.selectedRows)o.id===t.id&&(n=!0);let a=null;this.multiSelection&&(a=e("div",{class:"box-selection"},e("kup-checkbox",{checked:n})));let l=null;if(this.enableRowActions&&!this.swipeDisabled){const o={"row-action-menu":!0,open:t===this.rowActionMenuOpened};let i=null;if(t.actions){const o=t.actions.map(((o,i)=>e("li",{tabindex:"0",onClick:()=>this.onRowActionClick(t,o,i)},e("div",{class:`icon ${o.icon}`}),e("div",{class:"text"},o.text))));i=e("ul",null,o)}l=e("div",{class:"row-actions-wrapper"},e("div",{class:"row-actions-toggler"},e("svg",{version:"1.1",width:"24",height:"24",viewBox:"0 0 24 24",onClick:()=>this.onRowAction(t)},e("path",{d:"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"})),e("div",{class:o},i)))}let h=null;return t.badgeData&&t.badgeData.length>0&&(h=t.badgeData.map((t=>e("kup-badge",{text:t.text,class:t.className?`centered ${t.className}`:"centered",imageData:t.imageData})))),e("div",{class:"box-wrapper",style:t.style||{}},e("div",{class:{box:!0,draggable:this.dragEnabled,selected:this.showSelection&&n,column:!r},onClick:o=>this.onBoxClick(o,t),ref:t=>this.rowsRefs.push(t)},a,i,h),l)}renderSection(t,o,i,s){let r=null;if(t.sections&&t.sections.length>0){const o=t.sections;let e=o.length,n=0;for(e>0&&(r=[]);e-- >0;)r.push(this.renderSection(o[n++],t,i,s))}else if(t.content){const o=t.content;let e=o.length,n=0;for(e>0&&(r=[]);e-- >0;)r.push(this.renderBoxObject({boxObject:o[n++],row:i,visibleColumns:s},!0))}else s.length>0&&(r=this.renderBoxObject({boxObject:{column:s[0].name},row:i,visibleColumns:s}));const n=this.isSectionExpanded(i,t),a=!!t.columns,l={"box-section":!0,open:n,column:!a&&!t.horizontal,grid:a,titled:!!t.title,"last-child":!t.sections||0===t.sections.length},h=t.style||{};t.dim&&o&&(h.flex=`0 0 ${t.dim}`,o.horizontal?h.maxWidth=t.dim:h.maxHeight=t.dim),a&&(h["grid-template-columns"]=`repeat(${t.columns}, 1fr)`);let c=null;if(t.collapsible){l["collapse-section"]=!0;const o={content:!0};let s="";s=t.title?t.title:this.kupManager.language.translate(n?p.COLLAPSE:p.EXPAND),c=e("div",{class:l,style:h},e("div",{class:o},r),e("div",{class:"header",role:"button",onClick:o=>{o.stopPropagation(),this.toggleSectionExpand(i,t)}},e("div",{class:"header-content"},e("span",null,s),e(A,{resource:`${b.DROPDOWN}`,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:n?"toggled":""}))))}else{const o=t.title?e("h3",null,t.title):null;c=e("div",{class:l,style:h},o,r)}return c}renderBoxObject({boxObject:t,row:o,visibleColumns:i},s){const r={"box-object":!0};let n=null,a=-1;for(let o=0;o<i.length;o++)if(i[o].name===t.column){a=o;break}a>=0?(n=i[a],i.splice(a,1)):s&&(n=this.data.columns.find((o=>o.name===t.column)));const l=o.cells[t.column];let h;return l&&!this.kupManager.objects.isEmptyKupObj(l.obj)&&(r["is-obj"]=!0,this.kupManager.debug.isDebug()&&(h=l.obj.t+"; "+l.obj.p+"; "+l.obj.k+";")),e("div",{"data-cell":l,"data-row":o,"data-column":t.column,class:r,style:{},title:h},l&&n?e(I,Object.assign({},{cell:l,column:n,component:this,editable:this.editableData,renderKup:!0,row:o,setSizes:!0,shape:t.shape})):e("span",null,t.value))}kanbanMode(){if(!this.kanban.columns||0===this.kanban.columns.length)return this.kupManager.debug.logMessage(this,"No columns to group by detected.",d.ERROR),{jsx:e("div",{id:"empty-data-message",class:"box-wrapper"},e("div",{ref:t=>this.rowsRefs.push(t)}),this.kupManager.language.translate(p.EMPTY_DATA)),style:{"grid-template-columns":"repeat(1, 1fr)"}};const t=[];if(this.kanban.labels)for(let o=0;o<this.kanban.labels.length;o++)t.push({labels:this.kanban.labels[o],nodes:[]});for(let o=0;o<this.rows.length;o++){let i=[];for(let t=0;t<this.kanban.columns.length;t++)try{i.push(this.rows[o].cells[this.kanban.columns[t]].value)}catch(t){this.kupManager.debug.logMessage(this,t,d.WARNING)}const e={found:!1,index:null};for(let o=0;o<t.length;o++){let s=t[o].labels,r=!0;for(let t=0;t<s.length;t++)if(i[t]!==s[t]){r=!1;break}if(r){e.found=!0,e.index=o;break}}e.found?t[e.index].nodes.push(this.renderRow(this.rows[o])):t.push({labels:i,nodes:[this.renderRow(this.rows[o])]})}const o=[];for(let i=0;i<t.length;i++){const s=t[i].labels,r={data:[]};for(let t=0;t<s.length;t++)r.data.push({value:s[t],id:s[t]});o.push(e("div",{class:"kanban-section"},e(z,Object.assign({},r)),t[i].nodes))}return{jsx:o,style:{"grid-template-columns":this.kanban.isStacked?"repeat(1fr)":this.kanban.size?`repeat(${Object.keys(t).length}, ${this.kanban.size})`:`repeat(${Object.keys(t).length}, 1fr)`}}}didLoadInteractables(){this.interactableTouch.push(this.boxContainer),this.kupManager.interact.on(this.boxContainer,u.TAP,(t=>{this.hold?this.hold=!1:2===t.button&&this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)})})),this.kupManager.interact.on(this.boxContainer,u.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||(this.hold=!0,this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)}))}))}didRenderInteractables(){if(this.dragEnabled)for(let t=0;t<this.rowsRefs.length;t++){const o=this.rowsRefs[t],i=()=>{const t=this.rootElement.shadowRoot.querySelector(".box-object:hover");return{cell:t["data-cell"],column:c(this.visibleColumns,t.dataset.column),id:this.rootElement.id,multiple:this.multiSelection,row:t["data-row"],selectedRows:this.selectedRows}};o&&!this.interactableDrag.includes(o)&&(this.interactableDrag.push(o),this.kupManager.interact.draggable(o,{allowFrom:".box-object",cursorChecker:()=>null},{callback:i},x.BADGE))}if(this.dropEnabled){const t=()=>{const t=this.getEventDetails(this.rootElement.shadowRoot.querySelector(".box:hover"));return{cell:t.cell,column:t.column,id:this.rootElement.id,row:t.row}};this.interactableDrop.includes(this.sectionRef)||(this.interactableDrop.push(this.sectionRef),this.kupManager.interact.dropzone(this.sectionRef,{accept:`[${g}]`},{dispatcher:this.rootElement,type:f.BOX}));for(let o=0;o<this.rowsRefs.length;o++){const i=this.rowsRefs[o];i&&!this.interactableDrop.includes(i)&&(this.interactableDrop.push(i),this.kupManager.interact.dropzone(i,{accept:`[${g}]`},{callback:t,dispatcher:this.rootElement,type:f.BOX}))}}}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.rowsPerPage?this.currentRowsPerPage=this.rowsPerPage:this.pageSize&&(this.currentRowsPerPage=this.pageSize),this.data&&this.data.rows&&this.currentRowsPerPage>this.data.rows.length&&(this.currentRowsPerPage=this.data.rows.length),this.kupManager.language.register(this),this.kupManager.theme.register(this),this.onDataChanged(),this.adjustPaginator()}componentDidLoad(){if(this.handleAutomaticBoxSelection(),document.addEventListener("click",this.clickFunction.bind(this)),this.currentPage=this.pageSelected,this.multiSelection&&this.selectedRowsState){this.selectedRows=[];let t=this.selectedRowsState.split(";");this.selectedRows=this.data.rows.filter((o=>t.indexOf(o.id)>=0))}this.didLoadInteractables(),this.kupDidLoad.emit({comp:this,id:this.rootElement.id}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const o=t.querySelectorAll(".f-text-field");for(let t=0;t<o.length;t++)O(o[t])}this.checkScrollOnHover(),this.persistState(),this.didRenderInteractables(),this.kupManager.debug.logRender(this,!0)}render(){const t=!("object"!=typeof this.kanban||null===this.kanban);let o=null;if(this.sortEnabled){const t=[{value:"",id:""},...this.visibleColumns.map((t=>({value:t.title,id:t.name,selected:t.name===this.sortBy})))];let i={label:this.kupManager.language.translate(p.SORT_BY),trailingIcon:!0};o=e("div",{id:"sort-panel"},e("kup-combobox",{data:{"kup-text-field":i,"kup-list":{data:t,selectable:!0}},initialValue:this.sortBy,"onkup-combobox-itemclick":t=>this.onSortChange(t)}))}let i=null;this.globalFilter&&(i=e("div",{id:"global-filter"},e("kup-text-field",{fullWidth:!0,label:this.kupManager.language.translate(m.SEARCH),icon:b.SEARCH,initialValue:this.globalFilterValue,"onkup-textfield-input":t=>{window.clearTimeout(this.globalFilterTimeout),this.globalFilterTimeout=window.setTimeout((()=>this.onGlobalFilterChange(t)),600)}})));let r=null;this.pagination&&(r=e(R,{id:top?"top-paginator":"bottom-paginator",currentPage:this.currentPage,max:this.filteredRows.length,mode:C.SIMPLE,perPage:this.currentRowsPerPage?this.currentRowsPerPage:this.pageSize,onPageChange:t=>this.handlePageChange(t.detail.value),onRowsChange:t=>this.handleRowsPerPageChange(t.detail.value)}));let n=null,a={};if(0===this.rows.length)n=e("div",{id:"empty-data-message",class:"box-wrapper"},e("div",{class:"box",ref:t=>this.rowsRefs.push(t)},this.kupManager.language.translate(p.EMPTY_DATA))),a={"grid-template-columns":"repeat(1, 1fr)"};else if(t){const t=this.kanbanMode();n=t.jsx,a=t.style}else{a={"grid-template-columns":`repeat(${this.columns}, 1fr)`};const t=this.rows;let o=t.length,i=0;for(n=[];o-- >0;)n.push(this.renderRow(t[i++]))}return e(s,null,e("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{id:P},e("div",{class:"box-component",ref:t=>this.sectionRef=t},o,i,r,e("div",{class:t?"is-kanban":"",id:"box-container",style:a,onContextMenu:t=>{t.preventDefault()},ref:t=>this.boxContainer=t},n))))}disconnectedCallback(){this.kupManager.interact.unregister(this.interactableDrag.concat(this.interactableDrop)),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this),this.scrollOnHover&&this.kupManager.scrollOnHover.unregister(this.boxContainer),document.removeEventListener("click",this.clickFunction.bind(this)),this.kupDidUnload.emit({comp:this,id:this.rootElement.id})}get rootElement(){return r(this)}static get watchers(){return{pageSize:["rowsPerPageHandler","recalculateRows"],globalFilterValue:["recalculateRows"],sortBy:["recalculateRows"],pagination:["recalculateRows"],currentPage:["recalculateRows"],currentRowsPerPage:["recalculateRows"],data:["onDataChanged"],layout:["onLayoutChanged"],selectBox:["onSelectBoxChanged"]}}};B.style=":host{--kup_box_background_color:var(\n --kup-box-background-color,\n var(--kup-background-color)\n );--kup_box_color:var(--kup-box-color, var(--kup-text-color));--kup_box_font_family:var(--kup-box-font-family, var(--kup-font-family));--kup_box_font_size:var(--kup-box-font-size, var(--kup-font-size));--kup_box_grid_gap:var(--kup-box-grid-gap, 1em);--kup_box_hover_box_shadow:var(\n --kup-box-hover-box-shadow,\n 0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)\n );--kup_box_primary_color_rgb:var(\n --kup-box-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_box_transition:var(--kup-box-transition, 0.25s);display:block;font-family:var(--kup_box_font_family);font-size:var(--kup_box_font_size)}.box-component{background:var(--kup_box_background_color);transition:border var(--kup_box_transition) ease}.box-component[kup-drag-over]{position:relative;border:3px dashed var(--kup-border-color)}#box-container{display:grid;grid-gap:var(--kup_box_grid_gap);color:var(--kup_box_color);overflow:auto}#box-container.is-kanban .kanban-section{overflow:auto}#box-container.is-kanban .box-wrapper{padding-top:1em}#box-container.is-kanban .box-wrapper .box{overflow:auto}#box-container *{box-sizing:border-box}#box-container .box-wrapper{display:flex;align-items:center}#box-container .box-wrapper .box{flex-grow:1;cursor:pointer;position:relative;display:flex;transition:background-color var(--kup_box_transition) ease, box-shadow var(--kup_box_transition) ease, border var(--kup_box_transition) ease}#box-container .box-wrapper .box.draggable{touch-action:none;user-select:none}#box-container .box-wrapper .box.column{flex-direction:column}#box-container .box-wrapper .box:hover{box-shadow:var(--kup_box_hover_box_shadow)}#box-container .box-wrapper .box.selected{background-color:rgba(var(--kup_box_primary_color_rgb), 0.175)}#box-container .box-wrapper .box.selected .box-section.titled>h3{background-color:transparent}#box-container .box-wrapper .box[kup-draggable]{opacity:0.5}#box-container .box-wrapper .box[kup-drag-over]{border:3px dashed var(--kup-border-color);position:relative;z-index:2}#box-container .box-wrapper .box .box-section{display:flex;flex-direction:row;flex:1 1 1%;flex-wrap:wrap}#box-container .box-wrapper .box .box-section.column{flex-direction:column;justify-content:center;flex-wrap:unset}#box-container .box-wrapper .box .box-section.column>.box-section{flex:0 0 auto}#box-container .box-wrapper .box .box-section.grid{display:grid}#box-container .box-wrapper .box .box-section .box-object{min-height:16px}#box-container .box-wrapper .box .box-section .box-object img{height:auto}#box-container .box-wrapper .box .box-section.collapse-section .header{border-top:1px solid var(--kup-border-color);color:rgba(var(--kup-text-color-rgb), 0.75);display:flex;justify-content:space-around;width:100%}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content{margin:0.5em;display:flex;align-items:center}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image{transition:transform 0.15s}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image.toggled{transform:rotate(-180deg)}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .kup-icon.kup-dropdown-icon{margin:0;-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}#box-container .box-wrapper .box .box-section.collapse-section .content{display:none;width:100%}#box-container .box-wrapper .box .box-section.collapse-section.open .content{display:block}#box-container .box-wrapper .box .box-section.titled{border:1px solid var(--kup-border-color);padding-top:5px;position:relative;margin:10px}#box-container .box-wrapper .box .box-section.titled>h3{background:var(--kup-background-color);font-size:calc(var(--kup-font-size) * 1.15);position:absolute;margin:0px;padding:0 8px;top:-11px;left:5px;transition:background-color 0.25s ease}#box-container .box-wrapper .box .box-selection{position:absolute;top:0.5em;right:0.5em;z-index:1}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler{position:relative;width:24px;height:24px;margin-left:3px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler svg{cursor:pointer;opacity:0;fill:var(--kup-text-color);transition:opacity 500ms ease-out}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu{background:var(--kup-background-color);border:1px solid var(--kup-border-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);position:absolute;top:0;right:24px;display:none;z-index:10}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul{list-style-type:none;margin:0;padding:0}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li{cursor:pointer;white-space:nowrap;padding:0 12px;display:flex;align-items:center;line-height:30px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li:not(:last-child){border-bottom:1px solid var(--kup-border-color)}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu.open{display:block}#box-container .box-wrapper:hover .row-actions-wrapper .row-actions-toggler svg{opacity:1}#sort-panel,#global-filter{margin-bottom:1em}:host(.kup-center-aligned) #kup-component .box-section{text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell img{margin:auto}:host(.kup-right-aligned) #kup-component .box-section{text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell img{margin-left:auto;margin-right:0}:host(.kup-top-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-start}:host(.kup-bottom-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-end}:host(:not(.kup-borderless)) .box{border:1px solid var(--kup-border-color)}:host(.kup-flat-on-hover) #box-container .box-wrapper .box:hover{box-shadow:none}:host(.kup-shaped) .box{border-radius:10px}:host(.kup-round) .box{border-radius:25px}:host(.kup-dashed-sections) .box-section{border:2px dashed var(--kup-text-color)}:host(:not(.kup-paddingless)) #box-container .box{padding:3px}:host(:not(.kup-paddingless)) #box-container .box .box-section .box-object{padding:1px 4px}:host(:not(.kup-paddingless)) #box-container .box .box-section.last-child{margin:3px 4px}:host(.kup-danger){--kup-box-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-box-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-box-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-box-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-box-primary-color-rgb:var(--kup-warning-color-rgb)}";export{B as kup_box}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as t,a as e}from"./p-9dcfbb1e.js";import{b as s}from"./p-b63a5a44.js";var a;!function(t){t.BAR="bar"}(a||(a={}));const i=i=>{let r,o;i.resource?i.resource.indexOf(".")>-1||i.resource.indexOf("/")>-1||i.resource.indexOf("\\")>-1?(o={"--kup_image_height":i.sizeY?i.sizeY:"auto","--kup_image_width":i.sizeX?i.sizeX:"100%"},r=t("img",{src:i.resource})):(o={"--kup_image_height":i.sizeY?i.sizeY:"100%","--kup_image_width":i.sizeX?i.sizeX:"100%"},r=function(a){const i={"f-image__icon":!0},r={background:a.color?a.color:`var(${s.ICON})`};if(a.resource.indexOf("--kup")>-1){let t=a.resource.replace("--","");i["kup-icon"]=!0,i[t]=!0}else{const t=e(`./assets/svg/${a.resource}.svg`);r.mask=`url('${t}') no-repeat center`,r.webkitMask=`url('${t}') no-repeat center`}return t("div",{class:i,style:r})}(i)):i.data&&(o={"--kup_image_height":i.sizeY?i.sizeY:"100%","--kup_image_width":i.sizeX?i.sizeX:"100%"},r=function(e){const s=[];let i=0;for(let r=0;r<e.length;r++){let o;e[r].shape||(e[r].shape=a.BAR),e[r].color||(e[r].color="transparent"),e[r].height||(e[r].height="100%"),e[r].width||(e[r].width="100%");const n="step-"+r,c="css-step bottom-aligned",l={backgroundColor:e[r].color,left:i+"%",height:e[r].height,width:e[r].width};i+=parseFloat(e[r].width),o=t("span",{id:n,class:c,style:l}),s.push(o)}return t("div",{class:"f-image__css"},s)}(i.data));const n=[];if(i.badgeData)for(let e=0;e<i.badgeData.length;e++)n.push(t("kup-badge",Object.assign({},i.badgeData[e])));return t("div",Object.assign({class:`f-image ${i.wrapperClass?i.wrapperClass:""} ${i.fit?"kup-fit":""}`},i.dataSet,{id:i.id,style:o,title:i.title,onClick:i.onClick}),r,...n)};export{i as F}
|