@sme.up/ketchup 7.3.1 → 7.4.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.
Files changed (117) hide show
  1. package/dist/cjs/{f-button-5856cd74.js → f-button-daddd700.js} +2 -2
  2. package/dist/cjs/{f-cell-9d7a9e97.js → f-cell-3682fad4.js} +6 -6
  3. package/dist/cjs/{f-checkbox-1148e791.js → f-checkbox-593f72c3.js} +1 -1
  4. package/dist/cjs/{f-chip-675ed121.js → f-chip-9d540d94.js} +3 -3
  5. package/dist/cjs/{f-image-48facc89.js → f-image-7b42d149.js} +2 -2
  6. package/dist/cjs/{f-paginator-utils-0c1227f6.js → f-paginator-utils-1baeba0f.js} +3 -3
  7. package/dist/cjs/{f-text-field-3d8e7417.js → f-text-field-a6ed2d22.js} +2 -2
  8. package/dist/cjs/{index-1f177abc.js → index-74433248.js} +3 -0
  9. package/dist/cjs/ketchup.cjs.js +2 -2
  10. package/dist/cjs/kup-accordion.cjs.entry.js +3 -3
  11. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +9 -9
  12. package/dist/cjs/kup-box.cjs.entry.js +10 -10
  13. package/dist/cjs/kup-calendar.cjs.entry.js +5 -5
  14. package/dist/cjs/kup-cell.cjs.entry.js +7 -7
  15. package/dist/cjs/kup-dash-list.cjs.entry.js +2 -2
  16. package/dist/cjs/kup-dash_2.cjs.entry.js +2 -2
  17. package/dist/cjs/kup-dashboard.cjs.entry.js +6 -6
  18. package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
  19. package/dist/cjs/kup-echart.cjs.entry.js +44 -3
  20. package/dist/cjs/kup-family-tree.cjs.entry.js +4 -4
  21. package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
  22. package/dist/cjs/kup-image-list.cjs.entry.js +8 -8
  23. package/dist/cjs/kup-lazy.cjs.entry.js +2 -2
  24. package/dist/cjs/kup-magic-box.cjs.entry.js +3 -3
  25. package/dist/cjs/{kup-manager-22bb9699.js → kup-manager-10351449.js} +1 -1
  26. package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
  27. package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
  28. package/dist/cjs/kup-photo-frame.cjs.entry.js +2 -2
  29. package/dist/cjs/kup-planner.cjs.entry.js +11656 -0
  30. package/dist/cjs/kup-probe.cjs.entry.js +2 -2
  31. package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
  32. package/dist/cjs/kup-snackbar.cjs.entry.js +4 -4
  33. package/dist/cjs/loader.cjs.js +2 -2
  34. package/dist/collection/assets/echart.js +167 -0
  35. package/dist/collection/assets/gantt.js +0 -0
  36. package/dist/collection/assets/index.js +4 -0
  37. package/dist/collection/collection-manifest.json +1 -0
  38. package/dist/collection/components/kup-echart/kup-echart-declarations.js +1 -0
  39. package/dist/collection/components/kup-echart/kup-echart.js +41 -1
  40. package/dist/collection/components/kup-planner/kup-planner-declarations.js +27 -0
  41. package/dist/collection/components/kup-planner/kup-planner.css +489 -0
  42. package/dist/collection/components/kup-planner/kup-planner.js +691 -0
  43. package/dist/components/kup-echart2.js +42 -1
  44. package/dist/components/kup-planner.d.ts +11 -0
  45. package/dist/components/kup-planner.js +11826 -0
  46. package/dist/esm/{f-button-eedbdba1.js → f-button-8d15b5a0.js} +2 -2
  47. package/dist/esm/{f-cell-90a418d2.js → f-cell-7b706e57.js} +6 -6
  48. package/dist/esm/{f-checkbox-9b3f5f5b.js → f-checkbox-ec85b437.js} +1 -1
  49. package/dist/esm/{f-chip-45e7b3f6.js → f-chip-c671fe90.js} +3 -3
  50. package/dist/esm/{f-image-3026f0fe.js → f-image-21451b15.js} +2 -2
  51. package/dist/esm/{f-paginator-utils-6369da7c.js → f-paginator-utils-92bbf277.js} +3 -3
  52. package/dist/esm/{f-text-field-3b70a6f0.js → f-text-field-0bb2d109.js} +2 -2
  53. package/dist/esm/{index-8bd38435.js → index-b326ffc9.js} +3 -1
  54. package/dist/esm/ketchup.js +3 -3
  55. package/dist/esm/kup-accordion.entry.js +3 -3
  56. package/dist/esm/kup-autocomplete_27.entry.js +9 -9
  57. package/dist/esm/kup-box.entry.js +10 -10
  58. package/dist/esm/kup-calendar.entry.js +5 -5
  59. package/dist/esm/kup-cell.entry.js +7 -7
  60. package/dist/esm/kup-dash-list.entry.js +2 -2
  61. package/dist/esm/kup-dash_2.entry.js +2 -2
  62. package/dist/esm/kup-dashboard.entry.js +6 -6
  63. package/dist/esm/kup-drawer.entry.js +2 -2
  64. package/dist/esm/kup-echart.entry.js +44 -3
  65. package/dist/esm/kup-family-tree.entry.js +4 -4
  66. package/dist/esm/kup-iframe.entry.js +2 -2
  67. package/dist/esm/kup-image-list.entry.js +8 -8
  68. package/dist/esm/kup-lazy.entry.js +2 -2
  69. package/dist/esm/kup-magic-box.entry.js +3 -3
  70. package/dist/esm/{kup-manager-cad802b1.js → kup-manager-6145d980.js} +1 -1
  71. package/dist/esm/kup-nav-bar.entry.js +2 -2
  72. package/dist/esm/kup-numeric-picker.entry.js +3 -3
  73. package/dist/esm/kup-photo-frame.entry.js +2 -2
  74. package/dist/esm/kup-planner.entry.js +11652 -0
  75. package/dist/esm/kup-probe.entry.js +2 -2
  76. package/dist/esm/kup-qlik.entry.js +2 -2
  77. package/dist/esm/kup-snackbar.entry.js +4 -4
  78. package/dist/esm/loader.js +3 -3
  79. package/dist/ketchup/ketchup.esm.js +1 -1
  80. package/dist/ketchup/{p-1ad48de4.entry.js → p-0c1cbf8b.entry.js} +1 -1
  81. package/dist/ketchup/{p-97afbd71.entry.js → p-0c9b7c80.entry.js} +1 -1
  82. package/dist/ketchup/{p-138ac8b9.entry.js → p-1242366a.entry.js} +1 -1
  83. package/dist/ketchup/{p-fe34fa6e.entry.js → p-281cff81.entry.js} +1 -1
  84. package/dist/ketchup/{p-73becdb8.entry.js → p-2915a66a.entry.js} +1 -1
  85. package/dist/ketchup/{p-d0f4457e.entry.js → p-2a2dc2a8.entry.js} +1 -1
  86. package/dist/ketchup/{p-a89f0884.entry.js → p-32517a99.entry.js} +1 -1
  87. package/dist/ketchup/{p-eea29062.entry.js → p-439ac105.entry.js} +1 -1
  88. package/dist/ketchup/{p-78b093e3.entry.js → p-4fa7bffd.entry.js} +4 -4
  89. package/dist/ketchup/{p-b63a5a44.js → p-5292ef67.js} +1 -1
  90. package/dist/ketchup/{p-263b2c73.entry.js → p-76bf53df.entry.js} +1 -1
  91. package/dist/ketchup/{p-a1adab40.js → p-7cfdce27.js} +1 -1
  92. package/dist/ketchup/{p-4505a48d.js → p-826c91d7.js} +1 -1
  93. package/dist/ketchup/p-849ad5d8.entry.js +1 -0
  94. package/dist/ketchup/p-8826f5d6.entry.js +11 -0
  95. package/dist/ketchup/{p-c1d8fd43.entry.js → p-89ac80c1.entry.js} +1 -1
  96. package/dist/ketchup/p-9f00ad0f.js +1 -0
  97. package/dist/ketchup/{p-23288eed.entry.js → p-a641780a.entry.js} +1 -1
  98. package/dist/ketchup/{p-32dc31ad.js → p-ae4fffe0.js} +1 -1
  99. package/dist/ketchup/{p-bb6921bc.entry.js → p-c022824e.entry.js} +1 -1
  100. package/dist/ketchup/{p-9f1184cd.entry.js → p-c1137ffd.entry.js} +1 -1
  101. package/dist/ketchup/{p-b1da7902.entry.js → p-c222d070.entry.js} +1 -1
  102. package/dist/ketchup/{p-9f9b6656.js → p-c26975bf.js} +1 -1
  103. package/dist/ketchup/{p-7bd28eac.js → p-c4d9e3e2.js} +1 -1
  104. package/dist/ketchup/{p-9dcfbb1e.js → p-d4ece435.js} +2 -2
  105. package/dist/ketchup/{p-fd948af0.entry.js → p-d5200264.entry.js} +1 -1
  106. package/dist/ketchup/{p-2d8b5bba.entry.js → p-d87fb5ff.entry.js} +1 -1
  107. package/dist/ketchup/{p-b0675bce.entry.js → p-da37c417.entry.js} +1 -1
  108. package/dist/ketchup/{p-1cd45a72.entry.js → p-e4975ffa.entry.js} +1 -1
  109. package/dist/ketchup/{p-4e68f629.entry.js → p-e83e70e2.entry.js} +1 -1
  110. package/dist/ketchup/{p-ae3e0d31.js → p-ea16ddc0.js} +1 -1
  111. package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +2 -1
  112. package/dist/types/components/kup-planner/kup-planner-declarations.d.ts +40 -0
  113. package/dist/types/components/kup-planner/kup-planner.d.ts +72 -0
  114. package/dist/types/components.d.ts +85 -0
  115. package/package.json +6 -1
  116. package/dist/ketchup/p-2217be0a.entry.js +0 -1
  117. package/dist/ketchup/p-a7ae0b4d.js +0 -1
@@ -0,0 +1,691 @@
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
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
9
+ if (kind === "m")
10
+ throw new TypeError("Private method is not writable");
11
+ if (kind === "a" && !f)
12
+ throw new TypeError("Private accessor was defined without a setter");
13
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
14
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
15
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16
+ };
17
+ var _KupPlanner_instances, _KupPlanner_kupManager, _KupPlanner_rootPlanner, _KupPlanner_renderReactPlannerElement, _KupPlanner_toTasks, _KupPlanner_getTask, _KupPlanner_removePhases, _KupPlanner_handleOnClickOnTask, _KupPlanner_handleOnClickOnPhase;
18
+ import { forceUpdate, h, Host, } from '@stencil/core';
19
+ import { kupManagerInstance, } from '../../managers/kup-manager/kup-manager';
20
+ import { KupPlannerProps, KupPlannerTaskAction, } from './kup-planner-declarations';
21
+ import { getProps, setProps } from '../../utils/utils';
22
+ import { componentWrapperId } from '../../variables/GenericVariables';
23
+ import { createRoot } from 'react-dom/client';
24
+ import React from 'react';
25
+ import { Planner, } from '@sme.up/gantt-component';
26
+ export class KupPlanner {
27
+ constructor() {
28
+ _KupPlanner_instances.add(this);
29
+ /*-------------------------------------------------*/
30
+ /* I n t e r n a l V a r i a b l e s */
31
+ /*-------------------------------------------------*/
32
+ _KupPlanner_kupManager.set(this, kupManagerInstance());
33
+ _KupPlanner_rootPlanner.set(this, void 0);
34
+ this.plannerProps = undefined;
35
+ this.customStyle = '';
36
+ this.data = undefined;
37
+ this.dataRaw = undefined;
38
+ this.phaseColorCol = undefined;
39
+ this.phaseColumns = undefined;
40
+ this.phaseColParDep = undefined;
41
+ this.phaseDates = undefined;
42
+ this.phaseIdCol = undefined;
43
+ this.phaseNameCol = undefined;
44
+ this.phasePrevDates = undefined;
45
+ this.taskColumns = undefined;
46
+ this.taskDates = undefined;
47
+ this.taskIdCol = undefined;
48
+ this.taskNameCol = undefined;
49
+ this.taskPrevDates = undefined;
50
+ this.titleMess = undefined;
51
+ }
52
+ onKupClick(event, taskAction) {
53
+ this.kupClick.emit({
54
+ comp: this,
55
+ id: this.rootElement.id,
56
+ value: event,
57
+ taskAction: taskAction,
58
+ });
59
+ }
60
+ onKupDateChange(event) {
61
+ this.kupDateChange.emit({
62
+ comp: this,
63
+ id: this.rootElement.id,
64
+ value: event,
65
+ });
66
+ }
67
+ /*-------------------------------------------------*/
68
+ /* P u b l i c M e t h o d s */
69
+ /*-------------------------------------------------*/
70
+ /**
71
+ * Used to retrieve component's props values.
72
+ * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
73
+ * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
74
+ */
75
+ async getProps(descriptions) {
76
+ return getProps(this, KupPlannerProps, descriptions);
77
+ }
78
+ /**
79
+ * This method is used to trigger a new render of the component.
80
+ */
81
+ async refresh() {
82
+ forceUpdate(this);
83
+ }
84
+ /**
85
+ * Sets the props to the component.
86
+ * @param {GenericObject} props - Object containing props that will be set to the component.
87
+ */
88
+ async setProps(props) {
89
+ setProps(this, KupPlannerProps, props);
90
+ }
91
+ /**
92
+ * Add a list of phases to the project
93
+ * @param taskId
94
+ * @param data - Matrix which contains project phases
95
+ */
96
+ async addPhases(taskId, data) {
97
+ var _a;
98
+ const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
99
+ if (task) {
100
+ task.phases = (_a = data.rows) === null || _a === void 0 ? void 0 : _a.map((row) => {
101
+ let phase = {
102
+ id: row.cells[this.phaseIdCol].value,
103
+ phaseRowId: row.id,
104
+ taskRowId: task.taskRowId,
105
+ name: row.cells[this.phaseNameCol].value,
106
+ startDate: row.cells[this.phaseDates[0]].value,
107
+ endDate: row.cells[this.phaseDates[1]].value,
108
+ secondaryStartDate: row.cells[this.phasePrevDates[0]].value,
109
+ secondaryEndDate: row.cells[this.phasePrevDates[1]].value,
110
+ type: 'phase',
111
+ color: row.cells[this.phaseColorCol].value,
112
+ valuesToShow: this.phaseColumns.map((col) => row.cells[col].value),
113
+ };
114
+ return phase;
115
+ });
116
+ }
117
+ this.plannerProps = Object.assign({}, this.plannerProps);
118
+ }
119
+ handleOnClick(nativeEvent) {
120
+ console.log('handleOnClick', nativeEvent);
121
+ switch (nativeEvent.type) {
122
+ case 'task':
123
+ const taskAction = nativeEvent.phases
124
+ ? KupPlannerTaskAction.onClosing
125
+ : KupPlannerTaskAction.onOpening;
126
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnTask).call(this, nativeEvent)) {
127
+ this.onKupClick(nativeEvent, taskAction);
128
+ }
129
+ break;
130
+ case 'phase':
131
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnPhase).call(this)) {
132
+ this.onKupClick(nativeEvent);
133
+ }
134
+ break;
135
+ }
136
+ }
137
+ handleOnDateChange(nativeEvent) {
138
+ console.log('handleOnDateChange', nativeEvent);
139
+ this.onKupDateChange(nativeEvent);
140
+ }
141
+ componentWillLoad() {
142
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logLoad(this, false);
143
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.register(this);
144
+ }
145
+ componentDidLoad() {
146
+ this.plannerProps = {
147
+ title: this.titleMess,
148
+ items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toTasks).call(this, this.data),
149
+ onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
150
+ onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
151
+ };
152
+ __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_renderReactPlannerElement).call(this);
153
+ this.kupReady.emit({
154
+ comp: this,
155
+ id: this.rootElement.id,
156
+ value: undefined,
157
+ });
158
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logLoad(this, true);
159
+ }
160
+ componentWillRender() {
161
+ __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_renderReactPlannerElement).call(this);
162
+ }
163
+ componentDidRender() {
164
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logRender(this, true);
165
+ }
166
+ render() {
167
+ return (h(Host, null, h("div", { id: componentWrapperId })));
168
+ }
169
+ disconnectedCallback() {
170
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.unregister(this);
171
+ }
172
+ static get is() { return "kup-planner"; }
173
+ static get encapsulation() { return "shadow"; }
174
+ static get originalStyleUrls() {
175
+ return {
176
+ "$": ["kup-planner.scss"]
177
+ };
178
+ }
179
+ static get styleUrls() {
180
+ return {
181
+ "$": ["kup-planner.css"]
182
+ };
183
+ }
184
+ static get properties() {
185
+ return {
186
+ "customStyle": {
187
+ "type": "string",
188
+ "mutable": false,
189
+ "complexType": {
190
+ "original": "string",
191
+ "resolved": "string",
192
+ "references": {}
193
+ },
194
+ "required": false,
195
+ "optional": false,
196
+ "docs": {
197
+ "tags": [{
198
+ "name": "default",
199
+ "text": "\"\""
200
+ }, {
201
+ "name": "see",
202
+ "text": "https://ketchup.smeup.com/ketchup-showcase/#/customization"
203
+ }],
204
+ "text": "Custom style of the component."
205
+ },
206
+ "attribute": "custom-style",
207
+ "reflect": false,
208
+ "defaultValue": "''"
209
+ },
210
+ "data": {
211
+ "type": "unknown",
212
+ "mutable": false,
213
+ "complexType": {
214
+ "original": "KupDataDataset",
215
+ "resolved": "KupDataDataset",
216
+ "references": {
217
+ "KupDataDataset": {
218
+ "location": "import",
219
+ "path": "../../managers/kup-data/kup-data-declarations"
220
+ }
221
+ }
222
+ },
223
+ "required": false,
224
+ "optional": false,
225
+ "docs": {
226
+ "tags": [],
227
+ "text": ""
228
+ }
229
+ },
230
+ "dataRaw": {
231
+ "type": "any",
232
+ "mutable": false,
233
+ "complexType": {
234
+ "original": "any",
235
+ "resolved": "any",
236
+ "references": {}
237
+ },
238
+ "required": false,
239
+ "optional": false,
240
+ "docs": {
241
+ "tags": [],
242
+ "text": ""
243
+ },
244
+ "attribute": "data-raw",
245
+ "reflect": false
246
+ },
247
+ "phaseColorCol": {
248
+ "type": "string",
249
+ "mutable": false,
250
+ "complexType": {
251
+ "original": "string",
252
+ "resolved": "string",
253
+ "references": {}
254
+ },
255
+ "required": false,
256
+ "optional": false,
257
+ "docs": {
258
+ "tags": [],
259
+ "text": ""
260
+ },
261
+ "attribute": "phase-color-col",
262
+ "reflect": false
263
+ },
264
+ "phaseColumns": {
265
+ "type": "unknown",
266
+ "mutable": false,
267
+ "complexType": {
268
+ "original": "string[]",
269
+ "resolved": "string[]",
270
+ "references": {}
271
+ },
272
+ "required": false,
273
+ "optional": false,
274
+ "docs": {
275
+ "tags": [],
276
+ "text": ""
277
+ }
278
+ },
279
+ "phaseColParDep": {
280
+ "type": "string",
281
+ "mutable": false,
282
+ "complexType": {
283
+ "original": "string",
284
+ "resolved": "string",
285
+ "references": {}
286
+ },
287
+ "required": false,
288
+ "optional": false,
289
+ "docs": {
290
+ "tags": [],
291
+ "text": ""
292
+ },
293
+ "attribute": "phase-col-par-dep",
294
+ "reflect": false
295
+ },
296
+ "phaseDates": {
297
+ "type": "unknown",
298
+ "mutable": false,
299
+ "complexType": {
300
+ "original": "string[]",
301
+ "resolved": "string[]",
302
+ "references": {}
303
+ },
304
+ "required": false,
305
+ "optional": false,
306
+ "docs": {
307
+ "tags": [],
308
+ "text": ""
309
+ }
310
+ },
311
+ "phaseIdCol": {
312
+ "type": "string",
313
+ "mutable": false,
314
+ "complexType": {
315
+ "original": "string",
316
+ "resolved": "string",
317
+ "references": {}
318
+ },
319
+ "required": false,
320
+ "optional": false,
321
+ "docs": {
322
+ "tags": [],
323
+ "text": ""
324
+ },
325
+ "attribute": "phase-id-col",
326
+ "reflect": false
327
+ },
328
+ "phaseNameCol": {
329
+ "type": "string",
330
+ "mutable": false,
331
+ "complexType": {
332
+ "original": "string",
333
+ "resolved": "string",
334
+ "references": {}
335
+ },
336
+ "required": false,
337
+ "optional": false,
338
+ "docs": {
339
+ "tags": [],
340
+ "text": ""
341
+ },
342
+ "attribute": "phase-name-col",
343
+ "reflect": false
344
+ },
345
+ "phasePrevDates": {
346
+ "type": "unknown",
347
+ "mutable": false,
348
+ "complexType": {
349
+ "original": "string[]",
350
+ "resolved": "string[]",
351
+ "references": {}
352
+ },
353
+ "required": false,
354
+ "optional": false,
355
+ "docs": {
356
+ "tags": [],
357
+ "text": ""
358
+ }
359
+ },
360
+ "taskColumns": {
361
+ "type": "unknown",
362
+ "mutable": false,
363
+ "complexType": {
364
+ "original": "string[]",
365
+ "resolved": "string[]",
366
+ "references": {}
367
+ },
368
+ "required": false,
369
+ "optional": false,
370
+ "docs": {
371
+ "tags": [],
372
+ "text": ""
373
+ }
374
+ },
375
+ "taskDates": {
376
+ "type": "unknown",
377
+ "mutable": false,
378
+ "complexType": {
379
+ "original": "string[]",
380
+ "resolved": "string[]",
381
+ "references": {}
382
+ },
383
+ "required": false,
384
+ "optional": false,
385
+ "docs": {
386
+ "tags": [],
387
+ "text": ""
388
+ }
389
+ },
390
+ "taskIdCol": {
391
+ "type": "string",
392
+ "mutable": false,
393
+ "complexType": {
394
+ "original": "string",
395
+ "resolved": "string",
396
+ "references": {}
397
+ },
398
+ "required": false,
399
+ "optional": false,
400
+ "docs": {
401
+ "tags": [],
402
+ "text": ""
403
+ },
404
+ "attribute": "task-id-col",
405
+ "reflect": false
406
+ },
407
+ "taskNameCol": {
408
+ "type": "string",
409
+ "mutable": false,
410
+ "complexType": {
411
+ "original": "string",
412
+ "resolved": "string",
413
+ "references": {}
414
+ },
415
+ "required": false,
416
+ "optional": false,
417
+ "docs": {
418
+ "tags": [],
419
+ "text": ""
420
+ },
421
+ "attribute": "task-name-col",
422
+ "reflect": false
423
+ },
424
+ "taskPrevDates": {
425
+ "type": "unknown",
426
+ "mutable": false,
427
+ "complexType": {
428
+ "original": "string[]",
429
+ "resolved": "string[]",
430
+ "references": {}
431
+ },
432
+ "required": false,
433
+ "optional": false,
434
+ "docs": {
435
+ "tags": [],
436
+ "text": ""
437
+ }
438
+ },
439
+ "titleMess": {
440
+ "type": "string",
441
+ "mutable": false,
442
+ "complexType": {
443
+ "original": "string",
444
+ "resolved": "string",
445
+ "references": {}
446
+ },
447
+ "required": false,
448
+ "optional": false,
449
+ "docs": {
450
+ "tags": [],
451
+ "text": ""
452
+ },
453
+ "attribute": "title-mess",
454
+ "reflect": false
455
+ }
456
+ };
457
+ }
458
+ static get states() {
459
+ return {
460
+ "plannerProps": {}
461
+ };
462
+ }
463
+ static get events() {
464
+ return [{
465
+ "method": "kupClick",
466
+ "name": "kup-planner-click",
467
+ "bubbles": true,
468
+ "cancelable": false,
469
+ "composed": true,
470
+ "docs": {
471
+ "tags": [],
472
+ "text": ""
473
+ },
474
+ "complexType": {
475
+ "original": "KupPlannerEventPayload",
476
+ "resolved": "KupPlannerEventPayload",
477
+ "references": {
478
+ "KupPlannerEventPayload": {
479
+ "location": "import",
480
+ "path": "./kup-planner-declarations"
481
+ }
482
+ }
483
+ }
484
+ }, {
485
+ "method": "kupDateChange",
486
+ "name": "kup-planner-datechange",
487
+ "bubbles": true,
488
+ "cancelable": false,
489
+ "composed": true,
490
+ "docs": {
491
+ "tags": [],
492
+ "text": ""
493
+ },
494
+ "complexType": {
495
+ "original": "KupPlannerEventPayload",
496
+ "resolved": "KupPlannerEventPayload",
497
+ "references": {
498
+ "KupPlannerEventPayload": {
499
+ "location": "import",
500
+ "path": "./kup-planner-declarations"
501
+ }
502
+ }
503
+ }
504
+ }, {
505
+ "method": "kupReady",
506
+ "name": "kup-planner-ready",
507
+ "bubbles": true,
508
+ "cancelable": false,
509
+ "composed": true,
510
+ "docs": {
511
+ "tags": [],
512
+ "text": ""
513
+ },
514
+ "complexType": {
515
+ "original": "KupPlannerEventPayload",
516
+ "resolved": "KupPlannerEventPayload",
517
+ "references": {
518
+ "KupPlannerEventPayload": {
519
+ "location": "import",
520
+ "path": "./kup-planner-declarations"
521
+ }
522
+ }
523
+ }
524
+ }];
525
+ }
526
+ static get methods() {
527
+ return {
528
+ "getProps": {
529
+ "complexType": {
530
+ "signature": "(descriptions?: boolean) => Promise<GenericObject>",
531
+ "parameters": [{
532
+ "tags": [{
533
+ "name": "param",
534
+ "text": "descriptions - When provided and true, the result will be the list of props with their description."
535
+ }],
536
+ "text": "- When provided and true, the result will be the list of props with their description."
537
+ }],
538
+ "references": {
539
+ "Promise": {
540
+ "location": "global"
541
+ },
542
+ "GenericObject": {
543
+ "location": "import",
544
+ "path": "../../types/GenericTypes"
545
+ }
546
+ },
547
+ "return": "Promise<GenericObject>"
548
+ },
549
+ "docs": {
550
+ "text": "Used to retrieve component's props values.",
551
+ "tags": [{
552
+ "name": "param",
553
+ "text": "descriptions - When provided and true, the result will be the list of props with their description."
554
+ }, {
555
+ "name": "returns",
556
+ "text": "List of props as object, each key will be a prop."
557
+ }]
558
+ }
559
+ },
560
+ "refresh": {
561
+ "complexType": {
562
+ "signature": "() => Promise<void>",
563
+ "parameters": [],
564
+ "references": {
565
+ "Promise": {
566
+ "location": "global"
567
+ }
568
+ },
569
+ "return": "Promise<void>"
570
+ },
571
+ "docs": {
572
+ "text": "This method is used to trigger a new render of the component.",
573
+ "tags": []
574
+ }
575
+ },
576
+ "setProps": {
577
+ "complexType": {
578
+ "signature": "(props: GenericObject) => Promise<void>",
579
+ "parameters": [{
580
+ "tags": [{
581
+ "name": "param",
582
+ "text": "props - Object containing props that will be set to the component."
583
+ }],
584
+ "text": "- Object containing props that will be set to the component."
585
+ }],
586
+ "references": {
587
+ "Promise": {
588
+ "location": "global"
589
+ },
590
+ "GenericObject": {
591
+ "location": "import",
592
+ "path": "../../types/GenericTypes"
593
+ }
594
+ },
595
+ "return": "Promise<void>"
596
+ },
597
+ "docs": {
598
+ "text": "Sets the props to the component.",
599
+ "tags": [{
600
+ "name": "param",
601
+ "text": "props - Object containing props that will be set to the component."
602
+ }]
603
+ }
604
+ },
605
+ "addPhases": {
606
+ "complexType": {
607
+ "signature": "(taskId: string, data: KupDataDataset) => Promise<void>",
608
+ "parameters": [{
609
+ "tags": [{
610
+ "name": "param",
611
+ "text": "taskId"
612
+ }],
613
+ "text": ""
614
+ }, {
615
+ "tags": [{
616
+ "name": "param",
617
+ "text": "data - Matrix which contains project phases"
618
+ }],
619
+ "text": "- Matrix which contains project phases"
620
+ }],
621
+ "references": {
622
+ "Promise": {
623
+ "location": "global"
624
+ },
625
+ "KupDataDataset": {
626
+ "location": "import",
627
+ "path": "../../managers/kup-data/kup-data-declarations"
628
+ },
629
+ "KupPlannerPhase": {
630
+ "location": "import",
631
+ "path": "./kup-planner-declarations"
632
+ }
633
+ },
634
+ "return": "Promise<void>"
635
+ },
636
+ "docs": {
637
+ "text": "Add a list of phases to the project",
638
+ "tags": [{
639
+ "name": "param",
640
+ "text": "taskId"
641
+ }, {
642
+ "name": "param",
643
+ "text": "data - Matrix which contains project phases"
644
+ }]
645
+ }
646
+ }
647
+ };
648
+ }
649
+ static get elementRef() { return "rootElement"; }
650
+ }
651
+ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(), _KupPlanner_instances = new WeakSet(), _KupPlanner_renderReactPlannerElement = function _KupPlanner_renderReactPlannerElement() {
652
+ var _a;
653
+ (_a = __classPrivateFieldGet(this, _KupPlanner_rootPlanner, "f")) === null || _a === void 0 ? void 0 : _a.unmount();
654
+ const componentWrapperElement = this.rootElement.shadowRoot.getElementById(componentWrapperId);
655
+ if (componentWrapperElement) {
656
+ __classPrivateFieldSet(this, _KupPlanner_rootPlanner, createRoot(componentWrapperElement), "f");
657
+ __classPrivateFieldGet(this, _KupPlanner_rootPlanner, "f").render(React.createElement(Planner, this.plannerProps));
658
+ }
659
+ }, _KupPlanner_toTasks = function _KupPlanner_toTasks(data) {
660
+ var _a;
661
+ let tasks = (_a = data.rows) === null || _a === void 0 ? void 0 : _a.map((value) => {
662
+ let task = {
663
+ taskRowId: value.id,
664
+ id: value.cells[this.taskIdCol].value,
665
+ name: value.cells[this.taskNameCol].value,
666
+ startDate: value.cells[this.taskDates[0]].value,
667
+ endDate: value.cells[this.taskDates[1]].value,
668
+ secondaryStartDate: value.cells[this.taskPrevDates[0]].value,
669
+ secondaryEndDate: value.cells[this.taskPrevDates[1]].value,
670
+ type: 'task',
671
+ valuesToShow: this.taskColumns.map((col) => value.cells[col].value),
672
+ };
673
+ return task;
674
+ });
675
+ return tasks;
676
+ }, _KupPlanner_getTask = function _KupPlanner_getTask(taskId) {
677
+ return this.plannerProps.items.find((task) => task.id == taskId);
678
+ }, _KupPlanner_removePhases = function _KupPlanner_removePhases(taskId) {
679
+ const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
680
+ if (task)
681
+ task.phases = undefined;
682
+ this.plannerProps = Object.assign({}, this.plannerProps);
683
+ }, _KupPlanner_handleOnClickOnTask = function _KupPlanner_handleOnClickOnTask(nativeEvent) {
684
+ const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, nativeEvent.id);
685
+ if (task === null || task === void 0 ? void 0 : task.phases) {
686
+ __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_removePhases).call(this, task.id);
687
+ }
688
+ return true;
689
+ }, _KupPlanner_handleOnClickOnPhase = function _KupPlanner_handleOnClickOnPhase() {
690
+ return true;
691
+ };