@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.
Files changed (160) hide show
  1. package/dist/cjs/{component-72a5b626.js → component-85c2bd4d.js} +1 -1
  2. package/dist/cjs/{f-button-daddd700.js → f-button-49b2c37c.js} +1 -1
  3. package/dist/cjs/{f-cell-3682fad4.js → f-cell-9a6bc55c.js} +4 -4
  4. package/dist/cjs/{f-chip-9d540d94.js → f-chip-dee84122.js} +2 -2
  5. package/dist/cjs/{f-image-7b42d149.js → f-image-27f965ff.js} +4 -4
  6. package/dist/cjs/{f-paginator-utils-1baeba0f.js → f-paginator-utils-4a30189d.js} +2 -2
  7. package/dist/cjs/{f-text-field-a6ed2d22.js → f-text-field-04a663b4.js} +1 -1
  8. package/dist/cjs/{f-text-field-mdc-85997738.js → f-text-field-mdc-0e22f3e3.js} +2 -2
  9. package/dist/cjs/ketchup.cjs.js +2 -2
  10. package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
  11. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +814 -819
  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 +5 -5
  15. package/dist/cjs/kup-dash-list.cjs.entry.js +1 -1
  16. package/dist/cjs/kup-dash_2.cjs.entry.js +1 -1
  17. package/dist/cjs/kup-dashboard.cjs.entry.js +7 -10
  18. package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
  19. package/dist/cjs/kup-echart.cjs.entry.js +25 -8
  20. package/dist/cjs/kup-family-tree.cjs.entry.js +8 -19
  21. package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
  22. package/dist/cjs/kup-image-list.cjs.entry.js +8 -8
  23. package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
  24. package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
  25. package/dist/cjs/{kup-manager-10351449.js → kup-manager-2ff5d258.js} +80 -1
  26. package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
  27. package/dist/cjs/kup-numeric-picker.cjs.entry.js +5 -5
  28. package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
  29. package/dist/cjs/kup-planner.cjs.entry.js +1127 -218
  30. package/dist/cjs/kup-probe.cjs.entry.js +1 -1
  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/cjs/{tslib.es6-0ee02c67.js → tslib.es6-386654de.js} +9 -5
  35. package/dist/collection/collection-manifest.json +1 -1
  36. package/dist/collection/components/kup-card/kup-card.css +4 -8
  37. package/dist/collection/components/kup-chip/kup-chip.js +4 -3
  38. package/dist/collection/components/kup-dashboard/kup-dashboard.js +0 -3
  39. package/dist/collection/components/kup-data-table/kup-data-table.css +3 -6
  40. package/dist/collection/components/kup-data-table/kup-data-table.js +6 -20
  41. package/dist/collection/components/kup-echart/kup-echart-declarations.js +2 -0
  42. package/dist/collection/components/kup-echart/kup-echart.js +23 -8
  43. package/dist/collection/components/kup-family-tree/kup-family-tree.css +2 -2
  44. package/dist/collection/components/kup-family-tree/kup-family-tree.js +4 -15
  45. package/dist/collection/components/kup-image/kup-image.js +28 -0
  46. package/dist/collection/components/kup-list/kup-list.css +1 -1
  47. package/dist/collection/components/kup-planner/kup-planner-declarations.js +5 -2
  48. package/dist/collection/components/kup-planner/kup-planner.css +6 -3
  49. package/dist/collection/components/kup-planner/kup-planner.js +347 -65
  50. package/dist/collection/components/kup-qlik/kup-qlik.css +4 -8
  51. package/dist/collection/components/kup-snackbar/kup-snackbar.css +4 -3
  52. package/dist/collection/components/kup-spinner/kup-spinner.css +2 -4
  53. package/dist/collection/components/kup-tree/kup-tree.js +66 -67
  54. package/dist/collection/f-components/f-image/f-image.js +3 -3
  55. package/dist/collection/managers/kup-data/kup-data-column-helper.js +1 -0
  56. package/dist/collection/managers/kup-manager/kup-manager.js +18 -0
  57. package/dist/collection/managers/kup-theme/kup-theme-declarations.js +1 -0
  58. package/dist/collection/types/GenericTypes.js +1 -0
  59. package/dist/components/kup-autocomplete2.js +228 -151
  60. package/dist/components/kup-dashboard.js +0 -3
  61. package/dist/components/kup-echart2.js +24 -7
  62. package/dist/components/kup-family-tree.js +5 -16
  63. package/dist/components/kup-planner.js +1127 -219
  64. package/dist/components/kup-progress-bar.js +1 -1
  65. package/dist/components/kup-qlik.js +1 -1
  66. package/dist/components/kup-radio.js +1 -1
  67. package/dist/components/kup-rating.js +1 -1
  68. package/dist/components/kup-snackbar.js +1 -1
  69. package/dist/components/kup-spinner.js +1 -1
  70. package/dist/components/kup-switch.js +1 -1
  71. package/dist/components/kup-tab-bar.js +1 -1
  72. package/dist/components/kup-text-field.js +1 -1
  73. package/dist/components/kup-time-picker.js +1 -1
  74. package/dist/components/kup-tree.js +1 -1
  75. package/dist/esm/{component-b1bedf1d.js → component-120651a0.js} +1 -1
  76. package/dist/esm/{f-button-8d15b5a0.js → f-button-744cf1f6.js} +1 -1
  77. package/dist/esm/{f-cell-7b706e57.js → f-cell-b319c869.js} +4 -4
  78. package/dist/esm/{f-chip-c671fe90.js → f-chip-7e3e4180.js} +2 -2
  79. package/dist/esm/{f-image-21451b15.js → f-image-098c26ce.js} +4 -4
  80. package/dist/esm/{f-paginator-utils-92bbf277.js → f-paginator-utils-674cb2ae.js} +2 -2
  81. package/dist/esm/{f-text-field-0bb2d109.js → f-text-field-c38ef113.js} +1 -1
  82. package/dist/esm/{f-text-field-mdc-d42d3f9e.js → f-text-field-mdc-cee583ea.js} +2 -2
  83. package/dist/esm/ketchup.js +2 -2
  84. package/dist/esm/kup-accordion.entry.js +4 -4
  85. package/dist/esm/kup-autocomplete_27.entry.js +814 -819
  86. package/dist/esm/kup-box.entry.js +10 -10
  87. package/dist/esm/kup-calendar.entry.js +5 -5
  88. package/dist/esm/kup-cell.entry.js +5 -5
  89. package/dist/esm/kup-dash-list.entry.js +1 -1
  90. package/dist/esm/kup-dash_2.entry.js +1 -1
  91. package/dist/esm/kup-dashboard.entry.js +7 -10
  92. package/dist/esm/kup-drawer.entry.js +1 -1
  93. package/dist/esm/kup-echart.entry.js +25 -8
  94. package/dist/esm/kup-family-tree.entry.js +8 -19
  95. package/dist/esm/kup-iframe.entry.js +1 -1
  96. package/dist/esm/kup-image-list.entry.js +8 -8
  97. package/dist/esm/kup-lazy.entry.js +1 -1
  98. package/dist/esm/kup-magic-box.entry.js +2 -2
  99. package/dist/esm/{kup-manager-6145d980.js → kup-manager-b41eb2a8.js} +80 -2
  100. package/dist/esm/kup-nav-bar.entry.js +1 -1
  101. package/dist/esm/kup-numeric-picker.entry.js +5 -5
  102. package/dist/esm/kup-photo-frame.entry.js +1 -1
  103. package/dist/esm/kup-planner.entry.js +1128 -219
  104. package/dist/esm/kup-probe.entry.js +1 -1
  105. package/dist/esm/kup-qlik.entry.js +2 -2
  106. package/dist/esm/kup-snackbar.entry.js +4 -4
  107. package/dist/esm/loader.js +2 -2
  108. package/dist/esm/{tslib.es6-3eea2234.js → tslib.es6-8c2af864.js} +9 -5
  109. package/dist/ketchup/ketchup.esm.js +1 -1
  110. package/dist/ketchup/{p-439ac105.entry.js → p-0b0b61cb.entry.js} +1 -1
  111. package/dist/ketchup/p-0b91f5f8.entry.js +1 -0
  112. package/dist/ketchup/{p-81605f08.js → p-10d84b1b.js} +1 -1
  113. package/dist/ketchup/{p-a203f78b.js → p-27a56c87.js} +1 -1
  114. package/dist/ketchup/{p-32517a99.entry.js → p-395e1960.entry.js} +1 -1
  115. package/dist/ketchup/{p-76bf53df.entry.js → p-3b41aca7.entry.js} +1 -1
  116. package/dist/ketchup/{p-4d039705.entry.js → p-3efe7f43.entry.js} +1 -1
  117. package/dist/ketchup/{p-a641780a.entry.js → p-4325d965.entry.js} +1 -1
  118. package/dist/ketchup/{p-2915a66a.entry.js → p-4ae2ca6f.entry.js} +1 -1
  119. package/dist/ketchup/{p-e4975ffa.entry.js → p-5ce2b4fc.entry.js} +1 -1
  120. package/dist/ketchup/p-5d398e42.js +1 -0
  121. package/dist/ketchup/{p-7cfdce27.js → p-77e3d537.js} +1 -1
  122. package/dist/ketchup/p-7f59211b.js +1 -0
  123. package/dist/ketchup/p-940a5feb.js +30 -0
  124. package/dist/ketchup/{p-826c91d7.js → p-9700eb32.js} +1 -1
  125. package/dist/ketchup/p-a7e19620.entry.js +39 -0
  126. package/dist/ketchup/p-a877a87b.entry.js +9 -0
  127. package/dist/ketchup/p-a9b7533b.entry.js +25 -0
  128. package/dist/ketchup/{p-89ac80c1.entry.js → p-af82131e.entry.js} +1 -1
  129. package/dist/ketchup/{p-da37c417.entry.js → p-b032f47d.entry.js} +1 -1
  130. package/dist/ketchup/{p-0c1cbf8b.entry.js → p-b244f5ca.entry.js} +1 -1
  131. package/dist/ketchup/{p-2a2dc2a8.entry.js → p-bb17c1ba.entry.js} +1 -1
  132. package/dist/ketchup/{p-0c9b7c80.entry.js → p-bd42562d.entry.js} +1 -1
  133. package/dist/ketchup/{p-849ad5d8.entry.js → p-c8b7790a.entry.js} +1 -1
  134. package/dist/ketchup/{p-c022824e.entry.js → p-c968e93d.entry.js} +1 -1
  135. package/dist/ketchup/{p-1242366a.entry.js → p-d739710a.entry.js} +1 -1
  136. package/dist/ketchup/{p-ae4fffe0.js → p-d98fdb9b.js} +1 -1
  137. package/dist/ketchup/{p-c222d070.entry.js → p-da891093.entry.js} +1 -1
  138. package/dist/ketchup/{p-281cff81.entry.js → p-df316daf.entry.js} +1 -1
  139. package/dist/ketchup/{p-d87fb5ff.entry.js → p-e02b5141.entry.js} +1 -1
  140. package/dist/ketchup/{p-ea16ddc0.js → p-e714f4dc.js} +1 -1
  141. package/dist/ketchup/{p-c4d9e3e2.js → p-ef614656.js} +1 -1
  142. package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +2 -0
  143. package/dist/types/components/kup-image/kup-image.d.ts +2 -0
  144. package/dist/types/components/kup-planner/kup-planner-declarations.d.ts +18 -3
  145. package/dist/types/components/kup-planner/kup-planner.d.ts +36 -11
  146. package/dist/types/components/kup-tree/kup-tree.d.ts +1 -5
  147. package/dist/types/components.d.ts +39 -4
  148. package/dist/types/f-components/f-image/f-image-declarations.d.ts +1 -0
  149. package/dist/types/managers/kup-language/kup-language-declarations.d.ts +1 -1
  150. package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +1 -0
  151. package/dist/types/managers/kup-manager/kup-manager.d.ts +7 -0
  152. package/dist/types/types/GenericTypes.d.ts +1 -0
  153. package/package.json +8 -20
  154. package/dist/ketchup/p-02a26d59.entry.js +0 -9
  155. package/dist/ketchup/p-462475ac.entry.js +0 -10
  156. package/dist/ketchup/p-5292ef67.js +0 -30
  157. package/dist/ketchup/p-79b0730b.js +0 -15
  158. package/dist/ketchup/p-9f00ad0f.js +0 -1
  159. package/dist/ketchup/p-be61dd36.entry.js +0 -39
  160. package/dist/ketchup/p-e83e70e2.entry.js +0 -1
@@ -1,5 +1,5 @@
1
- import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } from '@stencil/core/internal/client';
2
- import { a8 as createCommonjsModule, k as kupManagerInstance, aE as KupDatesFormats, ak as getCellValueForDisplay, g as getProps, s as setProps, c as componentWrapperId, d as defineCustomElement$2, b as defineCustomElement$3, e as defineCustomElement$4, f as defineCustomElement$5, h as defineCustomElement$6, i as defineCustomElement$7, j as defineCustomElement$8, l as defineCustomElement$9, m as defineCustomElement$a, n as defineCustomElement$b, o as defineCustomElement$c, p as defineCustomElement$d, q as defineCustomElement$e, r as defineCustomElement$f, t as defineCustomElement$g, u as defineCustomElement$h, v as defineCustomElement$i, w as defineCustomElement$j, x as defineCustomElement$k, y as defineCustomElement$l, z as defineCustomElement$m, A as defineCustomElement$n, B as defineCustomElement$o, C as defineCustomElement$p, D as defineCustomElement$q, E as defineCustomElement$r, G as defineCustomElement$s } from './kup-autocomplete2.js';
1
+ import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host, getAssetPath } from '@stencil/core/internal/client';
2
+ import { a8 as createCommonjsModule, aE as commonjsGlobal, k as kupManagerInstance, aF as KupDatesFormats, ak as getCellValueForDisplay, g as getProps, s as setProps, Y as FTextFieldMDC, c as componentWrapperId, an as FTextField, a as KupThemeIconValues, Z as KupLanguageSearch, d as defineCustomElement$2, b as defineCustomElement$3, e as defineCustomElement$4, f as defineCustomElement$5, h as defineCustomElement$6, i as defineCustomElement$7, j as defineCustomElement$8, l as defineCustomElement$9, m as defineCustomElement$a, n as defineCustomElement$b, o as defineCustomElement$c, p as defineCustomElement$d, q as defineCustomElement$e, r as defineCustomElement$f, t as defineCustomElement$g, u as defineCustomElement$h, v as defineCustomElement$i, w as defineCustomElement$j, x as defineCustomElement$k, y as defineCustomElement$l, z as defineCustomElement$m, A as defineCustomElement$n, B as defineCustomElement$o, C as defineCustomElement$p, D as defineCustomElement$q, E as defineCustomElement$r, G as defineCustomElement$s } from './kup-autocomplete2.js';
3
3
 
4
4
  /**
5
5
  * Props of the kup-gantt component.
@@ -37,8 +37,11 @@ var KupPlannerProps;
37
37
  })(KupPlannerProps || (KupPlannerProps = {}));
38
38
  var KupPlannerTaskAction;
39
39
  (function (KupPlannerTaskAction) {
40
- KupPlannerTaskAction["onOpening"] = "onOpening";
41
- KupPlannerTaskAction["onClosing"] = "onClosing";
40
+ KupPlannerTaskAction["onTaskOpening"] = "onTaskOpening";
41
+ KupPlannerTaskAction["onTaskClosing"] = "onTaskClosing";
42
+ KupPlannerTaskAction["onClick"] = "onClick";
43
+ KupPlannerTaskAction["onResize"] = "onResize";
44
+ KupPlannerTaskAction["onRightClick"] = "onRightClick";
42
45
  })(KupPlannerTaskAction || (KupPlannerTaskAction = {}));
43
46
  var KupPlannerGanttRowType;
44
47
  (function (KupPlannerGanttRowType) {
@@ -8362,6 +8365,545 @@ exports.Zone = Zone;
8362
8365
  //# sourceMappingURL=luxon.js.map
8363
8366
  });
8364
8367
 
8368
+ var hexToCssFilter = createCommonjsModule(function (module, exports) {
8369
+ (function (global, factory) {
8370
+ factory(exports) ;
8371
+ }(commonjsGlobal, (function (exports) {
8372
+ /*! *****************************************************************************
8373
+ Copyright (c) Microsoft Corporation.
8374
+
8375
+ Permission to use, copy, modify, and/or distribute this software for any
8376
+ purpose with or without fee is hereby granted.
8377
+
8378
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8379
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
8380
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
8381
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
8382
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
8383
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
8384
+ PERFORMANCE OF THIS SOFTWARE.
8385
+ ***************************************************************************** */
8386
+
8387
+ function __read(o, n) {
8388
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
8389
+ if (!m) return o;
8390
+ var i = m.call(o), r, ar = [], e;
8391
+ try {
8392
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
8393
+ }
8394
+ catch (error) { e = { error: error }; }
8395
+ finally {
8396
+ try {
8397
+ if (r && !r.done && (m = i["return"])) m.call(i);
8398
+ }
8399
+ finally { if (e) throw e.error; }
8400
+ }
8401
+ return ar;
8402
+ }
8403
+
8404
+ var Color = /** @class */ (function () {
8405
+ function Color(r, g, b) {
8406
+ this.r = 0;
8407
+ this.g = 0;
8408
+ this.b = 0;
8409
+ this.set(r, g, b);
8410
+ }
8411
+ Color.prototype.set = function (r, g, b) {
8412
+ this.r = this.clamp(r);
8413
+ this.g = this.clamp(g);
8414
+ this.b = this.clamp(b);
8415
+ };
8416
+ /**
8417
+ * Applying cals to get CSS filter for hue-rotate
8418
+ *
8419
+ * @param {number} [angle=0]
8420
+ * @memberof Color
8421
+ */
8422
+ Color.prototype.hueRotate = function (angle) {
8423
+ if (angle === void 0) { angle = 0; }
8424
+ angle = (angle / 180) * Math.PI;
8425
+ var sin = Math.sin(angle);
8426
+ var cos = Math.cos(angle);
8427
+ this.multiply([
8428
+ 0.213 + cos * 0.787 - sin * 0.213,
8429
+ 0.715 - cos * 0.715 - sin * 0.715,
8430
+ 0.072 - cos * 0.072 + sin * 0.928,
8431
+ 0.213 - cos * 0.213 + sin * 0.143,
8432
+ 0.715 + cos * 0.285 + sin * 0.14,
8433
+ 0.072 - cos * 0.072 - sin * 0.283,
8434
+ 0.213 - cos * 0.213 - sin * 0.787,
8435
+ 0.715 - cos * 0.715 + sin * 0.715,
8436
+ 0.072 + cos * 0.928 + sin * 0.072,
8437
+ ]);
8438
+ };
8439
+ /**
8440
+ * Applying cals to get CSS filter for grayscale
8441
+ *
8442
+ * @param {number} [value=1]
8443
+ * @memberof Color
8444
+ */
8445
+ Color.prototype.grayscale = function (value) {
8446
+ if (value === void 0) { value = 1; }
8447
+ this.multiply([
8448
+ 0.2126 + 0.7874 * (1 - value),
8449
+ 0.7152 - 0.7152 * (1 - value),
8450
+ 0.0722 - 0.0722 * (1 - value),
8451
+ 0.2126 - 0.2126 * (1 - value),
8452
+ 0.7152 + 0.2848 * (1 - value),
8453
+ 0.0722 - 0.0722 * (1 - value),
8454
+ 0.2126 - 0.2126 * (1 - value),
8455
+ 0.7152 - 0.7152 * (1 - value),
8456
+ 0.0722 + 0.9278 * (1 - value),
8457
+ ]);
8458
+ };
8459
+ /**
8460
+ * Applying cals to get CSS filter for sepia
8461
+ *
8462
+ * @param {number} [value=1]
8463
+ * @memberof Color
8464
+ */
8465
+ Color.prototype.sepia = function (value) {
8466
+ if (value === void 0) { value = 1; }
8467
+ this.multiply([
8468
+ 0.393 + 0.607 * (1 - value),
8469
+ 0.769 - 0.769 * (1 - value),
8470
+ 0.189 - 0.189 * (1 - value),
8471
+ 0.349 - 0.349 * (1 - value),
8472
+ 0.686 + 0.314 * (1 - value),
8473
+ 0.168 - 0.168 * (1 - value),
8474
+ 0.272 - 0.272 * (1 - value),
8475
+ 0.534 - 0.534 * (1 - value),
8476
+ 0.131 + 0.869 * (1 - value),
8477
+ ]);
8478
+ };
8479
+ /**
8480
+ * Applying cals to get CSS filter for saturate
8481
+ *
8482
+ * @param {number} [value=1]
8483
+ * @memberof Color
8484
+ */
8485
+ Color.prototype.saturate = function (value) {
8486
+ if (value === void 0) { value = 1; }
8487
+ this.multiply([
8488
+ 0.213 + 0.787 * value,
8489
+ 0.715 - 0.715 * value,
8490
+ 0.072 - 0.072 * value,
8491
+ 0.213 - 0.213 * value,
8492
+ 0.715 + 0.285 * value,
8493
+ 0.072 - 0.072 * value,
8494
+ 0.213 - 0.213 * value,
8495
+ 0.715 - 0.715 * value,
8496
+ 0.072 + 0.928 * value,
8497
+ ]);
8498
+ };
8499
+ Color.prototype.multiply = function (matrix) {
8500
+ // These values are needed. It's correct because the returned values will change
8501
+ var newR = this.clamp(this.r * matrix[0] + this.g * matrix[1] + this.b * matrix[2]);
8502
+ var newG = this.clamp(this.r * matrix[3] + this.g * matrix[4] + this.b * matrix[5]);
8503
+ var newB = this.clamp(this.r * matrix[6] + this.g * matrix[7] + this.b * matrix[8]);
8504
+ this.r = newR;
8505
+ this.g = newG;
8506
+ this.b = newB;
8507
+ };
8508
+ /**
8509
+ * Applying cals to get CSS filter for brightness
8510
+ *
8511
+ * @param {number} [value=1]
8512
+ * @memberof Color
8513
+ */
8514
+ Color.prototype.brightness = function (value) {
8515
+ if (value === void 0) { value = 1; }
8516
+ this.linear(value);
8517
+ };
8518
+ /**
8519
+ * Applying cals to get CSS filter for contrast
8520
+ *
8521
+ * @param {number} [value=1]
8522
+ * @memberof Color
8523
+ */
8524
+ Color.prototype.contrast = function (value) {
8525
+ if (value === void 0) { value = 1; }
8526
+ this.linear(value, -(0.5 * value) + 0.5);
8527
+ };
8528
+ Color.prototype.linear = function (slope, intercept) {
8529
+ if (slope === void 0) { slope = 1; }
8530
+ if (intercept === void 0) { intercept = 0; }
8531
+ this.r = this.clamp(this.r * slope + intercept * 255);
8532
+ this.g = this.clamp(this.g * slope + intercept * 255);
8533
+ this.b = this.clamp(this.b * slope + intercept * 255);
8534
+ };
8535
+ /**
8536
+ * Applying cals to get CSS filter for invert
8537
+ *
8538
+ * @param {number} [value=1]
8539
+ * @memberof Color
8540
+ */
8541
+ Color.prototype.invert = function (value) {
8542
+ if (value === void 0) { value = 1; }
8543
+ this.r = this.clamp((value + (this.r / 255) * (1 - 2 * value)) * 255);
8544
+ this.g = this.clamp((value + (this.g / 255) * (1 - 2 * value)) * 255);
8545
+ this.b = this.clamp((value + (this.b / 255) * (1 - 2 * value)) * 255);
8546
+ };
8547
+ /**
8548
+ * transform RGB into HSL values
8549
+ *
8550
+ * @returns {HSLData}
8551
+ * @memberof Color
8552
+ */
8553
+ Color.prototype.hsl = function () {
8554
+ var red = this.r / 255;
8555
+ var green = this.g / 255;
8556
+ var blue = this.b / 255;
8557
+ // find greatest and smallest channel values
8558
+ var max = Math.max(red, green, blue);
8559
+ var min = Math.min(red, green, blue);
8560
+ var hue = 0;
8561
+ var saturation = 0;
8562
+ var lightness = (max + min) / 2;
8563
+ // If min and max have the same values, it means
8564
+ // the given color is achromatic
8565
+ if (max === min) {
8566
+ return {
8567
+ h: 0,
8568
+ s: 0,
8569
+ l: lightness * 100,
8570
+ };
8571
+ }
8572
+ // Adding delta value of greatest and smallest channel values
8573
+ var delta = max - min;
8574
+ saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);
8575
+ if (max === red) {
8576
+ hue = (green - blue) / delta + (green < blue ? 6 : 0);
8577
+ }
8578
+ else if (max === green) {
8579
+ hue = (blue - red) / delta + 2;
8580
+ }
8581
+ else if (max === blue) {
8582
+ hue = (red - green) / delta + 4;
8583
+ }
8584
+ hue /= 6;
8585
+ return {
8586
+ h: hue * 100,
8587
+ s: saturation * 100,
8588
+ l: lightness * 100,
8589
+ };
8590
+ };
8591
+ /**
8592
+ * Normalize the value to follow the min and max for RGB colors
8593
+ * min: 0
8594
+ * max: 255
8595
+ *
8596
+ * @private
8597
+ * @param {number} value
8598
+ * @returns {number}
8599
+ * @memberof Color
8600
+ */
8601
+ Color.prototype.clamp = function (value) {
8602
+ // Minimum RGB Value = 0;
8603
+ // Maximum RGB Value = 255;
8604
+ return Math.min(Math.max(value, 0), 255);
8605
+ };
8606
+ return Color;
8607
+ }());
8608
+
8609
+ var Solver = /** @class */ (function () {
8610
+ function Solver(target, options) {
8611
+ this.target = target;
8612
+ this.targetHSL = target.hsl();
8613
+ this.options = Object.assign({},
8614
+ // Adding default values for options
8615
+ {
8616
+ acceptanceLossPercentage: 5,
8617
+ maxChecks: 15,
8618
+ }, options);
8619
+ // All the calcs done by the library to generate
8620
+ // a CSS Filter are based on the color `#000`
8621
+ // in this case, `rgb(0, 0, 0)`
8622
+ // Please make sure the background of the element
8623
+ // is `#000` for better performance
8624
+ // and color similarity.
8625
+ this.reusedColor = new Color(0, 0, 0);
8626
+ }
8627
+ /**
8628
+ * Returns the solved values for the
8629
+ *
8630
+ * @returns {(SPSAPayload & { filter: string; })}
8631
+ * @memberof Solver
8632
+ */
8633
+ Solver.prototype.solve = function () {
8634
+ var result = this.solveNarrow(this.solveWide());
8635
+ return {
8636
+ values: result.values,
8637
+ called: result.called,
8638
+ loss: result.loss,
8639
+ filter: this.css(result.values),
8640
+ };
8641
+ };
8642
+ /**
8643
+ * Solve wide values based on the wide values for RGB and HSL values
8644
+ *
8645
+ * @private
8646
+ * @returns {SPSAPayload}
8647
+ * @memberof Solver
8648
+ */
8649
+ Solver.prototype.solveWide = function () {
8650
+ var A = 5;
8651
+ var c = 15;
8652
+ // Wide values for RGB and HSL values
8653
+ // the values in the order: [`r`, `g`, `b`, `h`, `s`, `l`]
8654
+ var a = [60, 180, 18000, 600, 1.2, 1.2];
8655
+ var best = { loss: Infinity };
8656
+ var counter = 0;
8657
+ while (best.loss > this.options.acceptanceLossPercentage) {
8658
+ var initialFilterValues = [50, 20, 3750, 50, 100, 100];
8659
+ var result = this.spsa({
8660
+ A: A,
8661
+ a: a,
8662
+ c: c,
8663
+ values: initialFilterValues,
8664
+ // for wide values we should use the double of tries in
8665
+ // comparison of `solveNarrow()` method
8666
+ maxTriesInLoop: 1000,
8667
+ });
8668
+ if (result.loss < best.loss) {
8669
+ best = result;
8670
+ }
8671
+ counter += 1;
8672
+ if (counter >= this.options.maxChecks) {
8673
+ break;
8674
+ }
8675
+ }
8676
+ return Object.assign({}, best, { called: counter });
8677
+ };
8678
+ /**
8679
+ * Solve narrow values based on the wide values for the filter
8680
+ *
8681
+ * @private
8682
+ * @param {SPSAPayload} wide
8683
+ * @returns {SPSAPayload}
8684
+ * @memberof Solver
8685
+ */
8686
+ Solver.prototype.solveNarrow = function (wide) {
8687
+ var A = wide.loss;
8688
+ var c = 2;
8689
+ var A1 = A + 1;
8690
+ // Narrow values for RGB and HSL values
8691
+ // the values in the order: [`r`, `g`, `b`, `h`, `s`, `l`]
8692
+ var a = [0.25 * A1, 0.25 * A1, A1, 0.25 * A1, 0.2 * A1, 0.2 * A1];
8693
+ return this.spsa({
8694
+ A: A,
8695
+ a: a,
8696
+ c: c,
8697
+ values: wide.values,
8698
+ maxTriesInLoop: 500,
8699
+ called: wide.called,
8700
+ });
8701
+ };
8702
+ /**
8703
+ * Returns final value based on the current filter order
8704
+ * to get the order, please check the returned value
8705
+ * in `css()` method
8706
+ *
8707
+ * @private
8708
+ * @param {number} value
8709
+ * @param {number} idx
8710
+ * @returns {number}
8711
+ * @memberof Solver
8712
+ */
8713
+ Solver.prototype.fixValueByFilterIDX = function (value, idx) {
8714
+ var max = 100;
8715
+ // Fixing max, minimum and value by filter
8716
+ if (idx === 2 /* saturate */) {
8717
+ max = 7500;
8718
+ }
8719
+ else if (idx === 4 /* brightness */ || idx === 5 /* contrast */) {
8720
+ max = 200;
8721
+ }
8722
+ if (idx === 3 /* hue-rotate */) {
8723
+ if (value > max) {
8724
+ value %= max;
8725
+ }
8726
+ else if (value < 0) {
8727
+ value = max + (value % max);
8728
+ }
8729
+ }
8730
+ // Checking if value is below the minimum or above
8731
+ // the maximum allowed by filter
8732
+ else if (value < 0) {
8733
+ value = 0;
8734
+ }
8735
+ else if (value > max) {
8736
+ value = max;
8737
+ }
8738
+ return value;
8739
+ };
8740
+ Solver.prototype.spsa = function (_a) {
8741
+ var A = _a.A, a = _a.a, c = _a.c, values = _a.values, _b = _a.maxTriesInLoop, maxTriesInLoop = _b === void 0 ? 500 : _b, _c = _a.called, called = _c === void 0 ? 0 : _c;
8742
+ var alpha = 1;
8743
+ var gamma = 0.16666666666666666;
8744
+ var best = null;
8745
+ var bestLoss = Infinity;
8746
+ var deltas = new Array(6);
8747
+ var highArgs = new Array(6);
8748
+ var lowArgs = new Array(6);
8749
+ // Size of all CSS filters to be applied to get the correct color
8750
+ var filtersToBeAppliedSize = 6;
8751
+ for (var key = 0; key < maxTriesInLoop; key++) {
8752
+ var ck = c / Math.pow(key + 1, gamma);
8753
+ for (var i = 0; i < filtersToBeAppliedSize; i++) {
8754
+ deltas[i] = Math.random() > 0.5 ? 1 : -1;
8755
+ highArgs[i] = values[i] + ck * deltas[i];
8756
+ lowArgs[i] = values[i] - ck * deltas[i];
8757
+ }
8758
+ var lossDiff = this.loss(highArgs) - this.loss(lowArgs);
8759
+ for (var i = 0; i < filtersToBeAppliedSize; i++) {
8760
+ var g = (lossDiff / (2 * ck)) * deltas[i];
8761
+ var ak = a[i] / Math.pow(A + key + 1, alpha);
8762
+ values[i] = this.fixValueByFilterIDX(values[i] - ak * g, i);
8763
+ }
8764
+ var loss = this.loss(values);
8765
+ if (loss < bestLoss) {
8766
+ best = values.slice(0);
8767
+ bestLoss = loss;
8768
+ }
8769
+ }
8770
+ return { values: best, loss: bestLoss, called: called };
8771
+ };
8772
+ /**
8773
+ * Checks how much is the loss for the filter in RGB and HSL colors
8774
+ *
8775
+ * @private
8776
+ * @param {SPSAPayload['values']} filters
8777
+ * @returns {number}
8778
+ * @memberof Solver
8779
+ */
8780
+ Solver.prototype.loss = function (filters) {
8781
+ // Argument as an Array of percentages.
8782
+ var color = this.reusedColor;
8783
+ // Resetting the color to black in case
8784
+ // it was called more than once
8785
+ color.set(0, 0, 0);
8786
+ color.invert(filters[0] / 100);
8787
+ color.sepia(filters[1] / 100);
8788
+ color.saturate(filters[2] / 100);
8789
+ color.hueRotate(filters[3] * 3.6);
8790
+ color.brightness(filters[4] / 100);
8791
+ color.contrast(filters[5] / 100);
8792
+ var colorHSL = color.hsl();
8793
+ return (Math.abs(color.r - this.target.r) +
8794
+ Math.abs(color.g - this.target.g) +
8795
+ Math.abs(color.b - this.target.b) +
8796
+ Math.abs(colorHSL.h - this.targetHSL.h) +
8797
+ Math.abs(colorHSL.s - this.targetHSL.s) +
8798
+ Math.abs(colorHSL.l - this.targetHSL.l));
8799
+ };
8800
+ /**
8801
+ * Returns the CSS filter list for the received HEX color
8802
+ *
8803
+ * @private
8804
+ * @param {number[]} filters
8805
+ * @returns {string}
8806
+ * @memberof Solver
8807
+ */
8808
+ Solver.prototype.css = function (filters) {
8809
+ var formatCssFilterValueByMultiplier = function (idx, multiplier) {
8810
+ if (multiplier === void 0) { multiplier = 1; }
8811
+ return Math.round(filters[idx] * multiplier);
8812
+ };
8813
+ return [
8814
+ "invert(" + formatCssFilterValueByMultiplier(0) + "%)",
8815
+ "sepia(" + formatCssFilterValueByMultiplier(1) + "%)",
8816
+ "saturate(" + formatCssFilterValueByMultiplier(2) + "%)",
8817
+ "hue-rotate(" + formatCssFilterValueByMultiplier(3, 3.6) + "deg)",
8818
+ "brightness(" + formatCssFilterValueByMultiplier(4) + "%)",
8819
+ "contrast(" + formatCssFilterValueByMultiplier(5) + "%);",
8820
+ ].join(' ');
8821
+ };
8822
+ return Solver;
8823
+ }());
8824
+
8825
+ /**
8826
+ * Transform a CSS Color from Hexadecimal to RGB color
8827
+ *
8828
+ * @param {string} hex hexadecimal color
8829
+ * @returns {([number, number, number] | [])} array with the RGB colors or empty array
8830
+ */
8831
+ var hexToRgb = function (hex) {
8832
+ if (hex.length === 4) {
8833
+ return [parseInt("0x" + hex[1] + hex[1]), parseInt("0x" + hex[2] + hex[2]), parseInt("0x" + hex[3] + hex[3])];
8834
+ }
8835
+ if (hex.length === 7) {
8836
+ return [parseInt("0x" + hex[1] + hex[2]), parseInt("0x" + hex[3] + hex[4]), parseInt("0x" + hex[5] + hex[6])];
8837
+ }
8838
+ return [];
8839
+ };
8840
+ var isNumeric = function (n) { return !isNaN(parseFloat(n)) && isFinite(n); };
8841
+ // Memory cache for the computed results to avoid multiple
8842
+ // calculations for the same color
8843
+ var results = {};
8844
+ /**
8845
+ * A function that transforms a HEX color into CSS filters
8846
+ *
8847
+ * @param colorValue string hexadecimal color
8848
+ * @param opts HexToCssConfiguration function configuration
8849
+ *
8850
+ */
8851
+ var hexToCSSFilter = function (colorValue, opts) {
8852
+ var _a;
8853
+ if (opts === void 0) { opts = {}; }
8854
+ var red;
8855
+ var green;
8856
+ var blue;
8857
+ if (results[colorValue] && !opts.forceFilterRecalculation) {
8858
+ return Object.assign({}, results[colorValue], { cache: true });
8859
+ }
8860
+ var color;
8861
+ try {
8862
+ _a = __read(hexToRgb(colorValue), 3), red = _a[0], green = _a[1], blue = _a[2];
8863
+ if (!isNumeric(red) || !isNumeric(green) || !isNumeric(blue)) {
8864
+ throw new Error("hextToRgb returned an invalid value for '" + colorValue + "'");
8865
+ }
8866
+ color = new Color(Number(red), Number(green), Number(blue));
8867
+ }
8868
+ catch (error) {
8869
+ throw new Error("Color value should be in HEX format. " + error);
8870
+ }
8871
+ var solver = new Solver(color, Object.assign({},
8872
+ // `HexToCssConfiguration` Defaults
8873
+ {
8874
+ acceptanceLossPercentage: 5,
8875
+ maxChecks: 30,
8876
+ forceFilterRecalculation: false,
8877
+ }, opts));
8878
+ return (results[colorValue] = Object.assign({}, solver.solve(), {
8879
+ hex: colorValue,
8880
+ rgb: [red, green, blue],
8881
+ cache: false,
8882
+ }));
8883
+ };
8884
+ /**
8885
+ * A function that clears cached results
8886
+ *
8887
+ * @param {string} key? HEX string value passed previously `#24639C`. If not passed, it clears all cached results
8888
+ * @returns void
8889
+ */
8890
+ var clearCache = function (key) {
8891
+ if (!key) {
8892
+ results = {};
8893
+ }
8894
+ else if (results[key]) {
8895
+ delete results[key];
8896
+ }
8897
+ };
8898
+
8899
+ exports.clearCache = clearCache;
8900
+ exports.hexToCSSFilter = hexToCSSFilter;
8901
+
8902
+ Object.defineProperty(exports, '__esModule', { value: true });
8903
+
8904
+ })));
8905
+ });
8906
+
8365
8907
  function _extends() {
8366
8908
  _extends = Object.assign ? Object.assign.bind() : function (target) {
8367
8909
  for (var i = 1; i < arguments.length; i++) {
@@ -8435,7 +8977,8 @@ var parseToDayEnd = function parseToDayEnd(endDate) {
8435
8977
  }).toJSDate();
8436
8978
  };
8437
8979
  var formatToIsoDate = function formatToIsoDate(date) {
8438
- return luxon.DateTime.fromJSDate(date).toISODate();
8980
+ var _DateTime$fromJSDate$;
8981
+ return (_DateTime$fromJSDate$ = luxon.DateTime.fromJSDate(date).toISODate()) != null ? _DateTime$fromJSDate$ : undefined;
8439
8982
  };
8440
8983
  var formatToLocaleSimple = function formatToLocaleSimple(date) {
8441
8984
  return luxon.DateTime.fromJSDate(date).toFormat("dd/MM/yyyy");
@@ -8453,6 +8996,8 @@ function validDates(startDate, endDate, _name) {
8453
8996
  };
8454
8997
  }
8455
8998
 
8999
+ var MAIN_GANTT_ID = "main";
9000
+ var SECONDARY_GANTT_ID = "secondary";
8456
9001
  var toViewMode = function toViewMode(timeUnit) {
8457
9002
  switch (timeUnit) {
8458
9003
  case TimeUnit.DAY:
@@ -8465,6 +9010,14 @@ var toViewMode = function toViewMode(timeUnit) {
8465
9010
  return ViewMode.Year;
8466
9011
  }
8467
9012
  };
9013
+ var columnWidthForTimeUnit = function columnWidthForTimeUnit(timeUnit) {
9014
+ switch (timeUnit) {
9015
+ case TimeUnit.YEAR:
9016
+ return 60 * 2;
9017
+ default:
9018
+ return 60;
9019
+ }
9020
+ };
8468
9021
  var convertPhaseToTask = function convertPhaseToTask(item) {
8469
9022
  var mapPhase = function mapPhase(_ref) {
8470
9023
  var phaseStart = _ref.startDate,
@@ -8475,7 +9028,8 @@ var convertPhaseToTask = function convertPhaseToTask(item) {
8475
9028
  phaseId = _ref.id,
8476
9029
  color = _ref.color,
8477
9030
  selectedColor = _ref.selectedColor,
8478
- dependencies = _ref.dependencies;
9031
+ dependencies = _ref.dependencies,
9032
+ icon = _ref.icon;
8479
9033
  var _validDates = validDates(phaseStart, phaseEnd),
8480
9034
  start = _validDates.start,
8481
9035
  end = _validDates.end;
@@ -8498,7 +9052,8 @@ var convertPhaseToTask = function convertPhaseToTask(item) {
8498
9052
  progressColor: color,
8499
9053
  backgroundSelectedColor: selectedColor,
8500
9054
  progressSelectedColor: selectedColor
8501
- } : {}
9055
+ } : {},
9056
+ icon: icon
8502
9057
  };
8503
9058
  };
8504
9059
  return mapPhase(item);
@@ -8529,7 +9084,8 @@ var convertDetailToTimeline = function convertDetailToTimeline(item, mainGanttSt
8529
9084
  var startDate = x.startDate,
8530
9085
  endDate = x.endDate,
8531
9086
  color = x.color,
8532
- selectedColor = x.selectedColor;
9087
+ selectedColor = x.selectedColor,
9088
+ icon = x.icon;
8533
9089
  var _validDates3 = validDates(startDate, endDate),
8534
9090
  start = _validDates3.start,
8535
9091
  end = _validDates3.end;
@@ -8537,7 +9093,8 @@ var convertDetailToTimeline = function convertDetailToTimeline(item, mainGanttSt
8537
9093
  start: start,
8538
9094
  end: end,
8539
9095
  backgroundColor: color != null ? color : "0xffffff",
8540
- backgroundSelectedColor: selectedColor != null ? selectedColor : color
9096
+ backgroundSelectedColor: selectedColor != null ? selectedColor : color,
9097
+ icon: icon
8541
9098
  };
8542
9099
  };
8543
9100
  var defaultColor = "#595959";
@@ -8582,7 +9139,8 @@ var convertProjectToTasks = function convertProjectToTasks(item, mainGanttStartD
8582
9139
  secondaryEnd: end2,
8583
9140
  progress: 100,
8584
9141
  isDisabled: false,
8585
- hideChildren: false
9142
+ hideChildren: false,
9143
+ icon: row.icon
8586
9144
  };
8587
9145
  var children1 = ((_row$phases = row.phases) != null ? _row$phases : []).map(convertPhaseToTask);
8588
9146
  return [mainTask].concat(children1);
@@ -8744,8 +9302,8 @@ var ganttDateRangeFromDetail = function ganttDateRangeFromDetail(details, viewMo
8744
9302
  return ganttDateRangeGeneric(dates, viewMode, preStepsCount, showSecondaryDates, true);
8745
9303
  };
8746
9304
  var ganttDateRangeGeneric = function ganttDateRangeGeneric(dates, viewMode, preStepsCount, showSecondaryDates, realDates) {
8747
- var newStartDate = dates[0].start;
8748
- var newEndDate = dates[0].end;
9305
+ var newStartDate = dates.length > 0 ? dates[0].start : new Date();
9306
+ var newEndDate = dates.length > 0 ? dates[0].end : new Date();
8749
9307
  for (var _iterator = _createForOfIteratorHelperLoose(dates), _step; !(_step = _iterator()).done;) {
8750
9308
  var d = _step.value;
8751
9309
  if (d.start < newStartDate) {
@@ -9179,7 +9737,8 @@ var TaskList = function TaskList(_ref) {
9179
9737
  taskListRef = _ref.taskListRef,
9180
9738
  horizontalContainerClass = _ref.horizontalContainerClass,
9181
9739
  TaskListHeader = _ref.TaskListHeader,
9182
- TaskListTable = _ref.TaskListTable;
9740
+ TaskListTable = _ref.TaskListTable,
9741
+ filter = _ref.filter;
9183
9742
  var horizontalContainerRef = react.useRef(null);
9184
9743
  react.useEffect(function () {
9185
9744
  if (horizontalContainerRef.current) {
@@ -9204,6 +9763,10 @@ var TaskList = function TaskList(_ref) {
9204
9763
  setSelectedTask: setSelectedTask,
9205
9764
  onExpanderClick: onExpanderClick
9206
9765
  };
9766
+ react.useEffect(function () {
9767
+ var _taskListRef$current;
9768
+ (_taskListRef$current = taskListRef.current) === null || _taskListRef$current === void 0 ? void 0 : _taskListRef$current.prepend(filter);
9769
+ }, [taskListRef, filter]);
9207
9770
  return react.createElement("div", {
9208
9771
  ref: taskListRef,
9209
9772
  className: classes.tasks
@@ -9754,7 +10317,7 @@ var convertToTimeline = function convertToTimeline(task, index, dates, columnWid
9754
10317
  var _task$timeline;
9755
10318
  var y = taskYCoordinate(index, rowHeight, taskHeight);
9756
10319
  function convertFrameToTask(frame, j) {
9757
- var _frame$backgroundSele;
10320
+ var _frame$backgroundSele, _frame$icon;
9758
10321
  var _computeTypeAndXs2 = computeTypeAndXs(frame.start, frame.end, "task", dates, columnWidth, handleWidth, false),
9759
10322
  x1 = _computeTypeAndXs2.x1,
9760
10323
  x2 = _computeTypeAndXs2.x2;
@@ -9786,7 +10349,8 @@ var convertToTimeline = function convertToTimeline(task, index, dates, columnWid
9786
10349
  typeInternal: "timeline",
9787
10350
  x1: x1,
9788
10351
  x2: x2,
9789
- y: y
10352
+ y: y,
10353
+ icon: (_frame$icon = frame.icon) != null ? _frame$icon : undefined
9790
10354
  };
9791
10355
  }
9792
10356
  var _computeTypeAndXs3 = computeTypeAndXs(task.start, task.end, task.type, dates, columnWidth, handleWidth, false),
@@ -10145,6 +10709,25 @@ var BarProgressHandle = function BarProgressHandle(_ref) {
10145
10709
  });
10146
10710
  };
10147
10711
 
10712
+ var TaskIcon = function TaskIcon(_ref) {
10713
+ var _ref$color = _ref.color,
10714
+ color = _ref$color === void 0 ? "#000000" : _ref$color,
10715
+ url = _ref.url,
10716
+ height = _ref.height,
10717
+ width = _ref.width,
10718
+ x = _ref.x,
10719
+ y = _ref.y;
10720
+ var cssFilter = hexToCssFilter.hexToCSSFilter(color);
10721
+ return react.createElement("image", {
10722
+ href: url,
10723
+ filter: cssFilter.filter.replace(";", ""),
10724
+ x: x,
10725
+ y: y,
10726
+ width: width,
10727
+ height: height
10728
+ });
10729
+ };
10730
+
10148
10731
  var Bar = function Bar(_ref) {
10149
10732
  var _task$x2secondary, _task$x1secondary;
10150
10733
  var task = _ref.task,
@@ -10202,7 +10785,14 @@ var Bar = function Bar(_ref) {
10202
10785
  onMouseDown: function onMouseDown(e) {
10203
10786
  onEventStart("progress", task, e);
10204
10787
  }
10205
- })));
10788
+ })), task.icon && task.icon.url && react.createElement(TaskIcon, {
10789
+ color: task.icon.color,
10790
+ url: task.icon.url,
10791
+ width: task.height / 2 + "px",
10792
+ height: task.height / 2 + "px",
10793
+ x: task.x1 + (task.x2 - task.x1) - task.height / 2 / 2,
10794
+ y: task.y - task.height / 2 / 2 / 2 + (showSecondaryDates ? task.height / 2 : 0)
10795
+ }));
10206
10796
  };
10207
10797
 
10208
10798
  var BarSmall = function BarSmall(_ref) {
@@ -10263,7 +10853,9 @@ var Timeline = function Timeline(_ref) {
10263
10853
  rx: 0,
10264
10854
  ry: 0
10265
10855
  }), task.barChildren.map(function (bar) {
10266
- return react.createElement("rect", {
10856
+ return react.createElement(react.Fragment, {
10857
+ key: bar.id + ".rf"
10858
+ }, react.createElement("rect", {
10267
10859
  style: {
10268
10860
  cursor: "pointer"
10269
10861
  },
@@ -10275,7 +10867,14 @@ var Timeline = function Timeline(_ref) {
10275
10867
  height: bar.height,
10276
10868
  rx: bar.barCornerRadius,
10277
10869
  ry: bar.barCornerRadius
10278
- });
10870
+ }), bar.icon && bar.icon.url && react.createElement(TaskIcon, {
10871
+ color: bar.icon.color,
10872
+ url: bar.icon.url,
10873
+ width: bar.height + "px",
10874
+ height: bar.height + "px",
10875
+ x: bar.x1 + (bar.x2 - bar.x1) - bar.height / 2,
10876
+ y: bar.y - bar.height / 2 / 2
10877
+ }));
10279
10878
  }));
10280
10879
  };
10281
10880
 
@@ -10312,7 +10911,7 @@ var TaskItem = function TaskItem(props) {
10312
10911
  setTaskItem(react.createElement(Bar, Object.assign({}, props)));
10313
10912
  break;
10314
10913
  }
10315
- }, [task, isSelected]);
10914
+ }, [task, isSelected, props]);
10316
10915
  react.useEffect(function () {
10317
10916
  if (textRef.current) {
10318
10917
  setIsTextInside(textRef.current.getBBox().width < task.x2 - task.x1);
@@ -10353,6 +10952,9 @@ var TaskItem = function TaskItem(props) {
10353
10952
  onClick: function onClick(e) {
10354
10953
  onEventStart("click", task, e);
10355
10954
  },
10955
+ onContextMenu: function onContextMenu(e) {
10956
+ onEventStart("contextmenu", task, e);
10957
+ },
10356
10958
  onFocus: function onFocus() {
10357
10959
  onEventStart("select", task);
10358
10960
  }
@@ -10393,6 +10995,7 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
10393
10995
  onProgressChange = _ref.onProgressChange,
10394
10996
  onDoubleClick = _ref.onDoubleClick,
10395
10997
  onClick = _ref.onClick,
10998
+ onContextMenu = _ref.onContextMenu,
10396
10999
  onDelete = _ref.onDelete;
10397
11000
  var point = svg === null || svg === void 0 ? void 0 : (_svg$current = svg.current) === null || _svg$current === void 0 ? void 0 : _svg$current.createSVGPoint();
10398
11001
  var _useState = react.useState(0),
@@ -10554,6 +11157,9 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
10554
11157
  } else if (action === "click") {
10555
11158
  var skipClick = !hasMovedHorizontally(event);
10556
11159
  skipClick && !!onClick && onClick(task);
11160
+ } else if (action === "contextmenu") {
11161
+ event.preventDefault();
11162
+ !!onContextMenu && onContextMenu(event, task);
10557
11163
  } else if (action === "move") {
10558
11164
  var _svg$current$getScree3;
10559
11165
  if (!(svg !== null && svg !== void 0 && svg.current) || !point) return;
@@ -10641,6 +11247,7 @@ var TaskGantt = function TaskGantt(_ref) {
10641
11247
  calendarProps = _ref.calendarProps,
10642
11248
  barProps = _ref.barProps,
10643
11249
  ganttHeight = _ref.ganttHeight,
11250
+ taskGanttRef = _ref.taskGanttRef,
10644
11251
  scrollY = _ref.scrollY,
10645
11252
  scrollX = _ref.scrollX;
10646
11253
  var ganttSVGRef = react.useRef(null);
@@ -10660,7 +11267,8 @@ var TaskGantt = function TaskGantt(_ref) {
10660
11267
  }
10661
11268
  }, [scrollX]);
10662
11269
  return react.createElement("div", {
10663
- className: styles$7.ganttContainer
11270
+ className: styles$7.ganttContainer,
11271
+ ref: taskGanttRef
10664
11272
  }, react.createElement("div", {
10665
11273
  className: styles$7.ganttVerticalContainer,
10666
11274
  ref: verticalGanttContainerRef,
@@ -10691,9 +11299,10 @@ var TaskGantt = function TaskGantt(_ref) {
10691
11299
  var styles$8 = {"scrollWrapper":"_2k9Ys","scroll":"_19jgW"};
10692
11300
 
10693
11301
  var HorizontalScroll = function HorizontalScroll(_ref) {
11302
+ var _taskGanttRef$current;
10694
11303
  var scroll = _ref.scroll,
10695
11304
  svgWidth = _ref.svgWidth,
10696
- taskListWidth = _ref.taskListWidth,
11305
+ taskGanttRef = _ref.taskGanttRef,
10697
11306
  rtl = _ref.rtl,
10698
11307
  onScroll = _ref.onScroll;
10699
11308
  var scrollRef = react.useRef(null);
@@ -10702,12 +11311,12 @@ var HorizontalScroll = function HorizontalScroll(_ref) {
10702
11311
  scrollRef.current.scrollLeft = scroll;
10703
11312
  }
10704
11313
  }, [scroll]);
10705
- console.log("HORIZONTAL-SCROLL svgWidth: " + svgWidth);
11314
+ var rect = (_taskGanttRef$current = taskGanttRef.current) === null || _taskGanttRef$current === void 0 ? void 0 : _taskGanttRef$current.getBoundingClientRect();
10706
11315
  return react.createElement("div", {
10707
11316
  dir: "ltr",
10708
- style: {
10709
- margin: rtl ? "0px " + taskListWidth + "px 0px 0px" : "0px 0px 0px " + taskListWidth + "px"
10710
- },
11317
+ style: rect ? {
11318
+ margin: rtl ? "0px " + rect.x + "px 0px 0px" : "0px 0px 0px " + rect.x + "px"
11319
+ } : undefined,
10711
11320
  className: styles$8.scrollWrapper,
10712
11321
  onScroll: onScroll,
10713
11322
  ref: scrollRef
@@ -10723,13 +11332,14 @@ var Gantt = function Gantt(_ref) {
10723
11332
  var id = _ref.id,
10724
11333
  tasks = _ref.tasks,
10725
11334
  _ref$headerHeight = _ref.headerHeight,
10726
- headerHeight = _ref$headerHeight === void 0 ? 50 : _ref$headerHeight,
11335
+ headerHeight = _ref$headerHeight === void 0 ? 114 : _ref$headerHeight,
10727
11336
  _ref$columnWidth = _ref.columnWidth,
10728
11337
  columnWidth = _ref$columnWidth === void 0 ? 60 : _ref$columnWidth,
10729
11338
  _ref$listCellWidth = _ref.listCellWidth,
10730
11339
  listCellWidth = _ref$listCellWidth === void 0 ? "297px" : _ref$listCellWidth,
10731
11340
  _ref$rowHeight = _ref.rowHeight,
10732
11341
  rowHeight = _ref$rowHeight === void 0 ? 50 : _ref$rowHeight,
11342
+ filter = _ref.filter,
10733
11343
  _ref$ganttHeight = _ref.ganttHeight,
10734
11344
  ganttHeight = _ref$ganttHeight === void 0 ? 0 : _ref$ganttHeight,
10735
11345
  _ref$viewMode = _ref.viewMode,
@@ -10801,10 +11411,12 @@ var Gantt = function Gantt(_ref) {
10801
11411
  onProgressChange = _ref.onProgressChange,
10802
11412
  onDoubleClick = _ref.onDoubleClick,
10803
11413
  onClick = _ref.onClick,
11414
+ onContextMenu = _ref.onContextMenu,
10804
11415
  onDelete = _ref.onDelete,
10805
11416
  onSelect = _ref.onSelect,
10806
11417
  onExpanderClick = _ref.onExpanderClick;
10807
11418
  var wrapperRef = react.useRef(null);
11419
+ var taskGanttRef = react.useRef(null);
10808
11420
  var taskListRef = react.useRef(null);
10809
11421
  var _useState = react.useState(function () {
10810
11422
  var _ganttDateRangeFromTa = ganttDateRangeFromTask(tasks, viewMode, preStepsCount, showSecondaryDates, displayedStartDate, displayedEndDate),
@@ -10817,26 +11429,26 @@ var Gantt = function Gantt(_ref) {
10817
11429
  }),
10818
11430
  dateSetup = _useState[0],
10819
11431
  setDateSetup = _useState[1];
10820
- var _useState2 = react.useState(undefined),
10821
- currentViewDate = _useState2[0],
10822
- setCurrentViewDate = _useState2[1];
10823
- var _useState3 = react.useState(0),
10824
- taskListWidth = _useState3[0],
10825
- setTaskListWidth = _useState3[1];
10826
- var _useState4 = react.useState(0),
10827
- svgContainerWidth = _useState4[0],
10828
- setSvgContainerWidth = _useState4[1];
10829
- var _useState5 = react.useState(ganttHeight),
10830
- svgContainerHeight = _useState5[0],
10831
- setSvgContainerHeight = _useState5[1];
10832
- var _useState6 = react.useState([]),
10833
- barTasks = _useState6[0],
10834
- setBarTasks = _useState6[1];
10835
- var _useState7 = react.useState({
11432
+ var taskListWidth = react.useRef(0);
11433
+ var setTaskListWidth = function setTaskListWidth(width) {
11434
+ taskListWidth.current = width;
11435
+ };
11436
+ var svgContainerWidth = react.useRef(0);
11437
+ var setSvgContainerWidth = function setSvgContainerWidth(width) {
11438
+ svgContainerWidth.current = width;
11439
+ };
11440
+ var svgContainerHeight = react.useRef(ganttHeight);
11441
+ var setSvgContainerHeight = function setSvgContainerHeight(height) {
11442
+ svgContainerHeight.current = height;
11443
+ };
11444
+ var _useState2 = react.useState([]),
11445
+ barTasks = _useState2[0],
11446
+ setBarTasks = _useState2[1];
11447
+ var _useState3 = react.useState({
10836
11448
  action: ""
10837
11449
  }),
10838
- ganttEvent = _useState7[0],
10839
- setGanttEvent = _useState7[1];
11450
+ ganttEvent = _useState3[0],
11451
+ setGanttEvent = _useState3[1];
10840
11452
  var taskHeight = react.useMemo(function () {
10841
11453
  return rowHeight * barFill / 100;
10842
11454
  }, [rowHeight, barFill]);
@@ -10846,29 +11458,30 @@ var Gantt = function Gantt(_ref) {
10846
11458
  var timelineHeight = react.useMemo(function () {
10847
11459
  return rowHeight * timelineFill / 100;
10848
11460
  }, [rowHeight, timelineFill]);
10849
- var _useState8 = react.useState(),
10850
- selectedTask = _useState8[0],
10851
- setSelectedTask = _useState8[1];
10852
- var _useState9 = react.useState(null),
10853
- failedTask = _useState9[0],
10854
- setFailedTask = _useState9[1];
11461
+ var _useState4 = react.useState(),
11462
+ selectedTask = _useState4[0],
11463
+ setSelectedTask = _useState4[1];
11464
+ var _useState5 = react.useState(null),
11465
+ failedTask = _useState5[0],
11466
+ setFailedTask = _useState5[1];
10855
11467
  var svgWidth = dateSetup.dates.length * columnWidth;
10856
11468
  var ganttFullHeight = barTasks.length * rowHeight;
10857
- var _useState10 = react.useState(0),
10858
- scrollY = _useState10[0],
10859
- setScrollY = _useState10[1];
10860
- var _useState11 = react.useState(-1),
10861
- scrollX = _useState11[0],
10862
- setScrollX = _useState11[1];
10863
- var _useState12 = react.useState(false),
10864
- ignoreScrollEvent = _useState12[0],
10865
- setIgnoreScrollEvent = _useState12[1];
10866
- var _useState13 = react.useState(),
10867
- currentDateIndicatorContent = _useState13[0],
10868
- setCurrentDateIndicatorContent = _useState13[1];
10869
- var _useState14 = react.useState(),
10870
- projectionContent = _useState14[0],
10871
- setProjectionContent = _useState14[1];
11469
+ var _useState6 = react.useState(0),
11470
+ scrollY = _useState6[0],
11471
+ setScrollY = _useState6[1];
11472
+ var _useState7 = react.useState(-1),
11473
+ scrollX = _useState7[0],
11474
+ setScrollX = _useState7[1];
11475
+ var ignoreScrollEvent = react.useRef(false);
11476
+ var setIgnoreScrollEvent = function setIgnoreScrollEvent(value) {
11477
+ ignoreScrollEvent.current = value;
11478
+ };
11479
+ var _useState8 = react.useState(),
11480
+ currentDateIndicatorContent = _useState8[0],
11481
+ setCurrentDateIndicatorContent = _useState8[1];
11482
+ var _useState9 = react.useState(),
11483
+ projectionContent = _useState9[0],
11484
+ setProjectionContent = _useState9[1];
10872
11485
  react.useEffect(function () {
10873
11486
  window.addEventListener("gantt-sync-scroll-event", function (e) {
10874
11487
  if (e.detail.id !== id) {
@@ -10894,14 +11507,30 @@ var Gantt = function Gantt(_ref) {
10894
11507
  setScrollX(newDates.length * columnWidth);
10895
11508
  }
10896
11509
  }
10897
- setDateSetup({
10898
- dates: newDates,
10899
- viewMode: viewMode
10900
- });
11510
+ var set = false;
11511
+ if (dateSetup && dateSetup.dates) {
11512
+ var old = dateSetup.dates;
11513
+ if (old.length !== newDates.length) {
11514
+ set = true;
11515
+ } else {
11516
+ for (var i = 0; i < old.length; i++) {
11517
+ if (old[i].valueOf() !== newDates[i].valueOf()) {
11518
+ set = true;
11519
+ break;
11520
+ }
11521
+ }
11522
+ }
11523
+ }
11524
+ if (set) {
11525
+ setDateSetup({
11526
+ dates: newDates,
11527
+ viewMode: viewMode
11528
+ });
11529
+ }
10901
11530
  setBarTasks(convertToBarTasks(filteredTasks, newDates, columnWidth, rowHeight, taskHeight, projectHeight, timelineHeight, barCornerRadius, handleWidth, rtl, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, showSecondaryDates));
10902
11531
  }, [tasks, viewMode, preStepsCount, rowHeight, barCornerRadius, columnWidth, taskHeight, handleWidth, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, rtl, scrollX, onExpanderClick, showSecondaryDates, projectHeight, timelineHeight, displayedStartDate, displayedEndDate]);
10903
11532
  react.useEffect(function () {
10904
- if (viewMode === dateSetup.viewMode && (viewDate && !currentViewDate || viewDate && (currentViewDate === null || currentViewDate === void 0 ? void 0 : currentViewDate.valueOf()) !== viewDate.valueOf())) {
11533
+ if (viewMode === dateSetup.viewMode && viewDate) {
10905
11534
  var dates = dateSetup.dates;
10906
11535
  var index = dates.findIndex(function (d, i) {
10907
11536
  return viewDate.valueOf() >= d.valueOf() && i + 1 !== dates.length && viewDate.valueOf() < dates[i + 1].valueOf();
@@ -10909,10 +11538,10 @@ var Gantt = function Gantt(_ref) {
10909
11538
  if (index === -1) {
10910
11539
  return;
10911
11540
  }
10912
- setCurrentViewDate(viewDate);
11541
+ setIgnoreScrollEvent(true);
10913
11542
  setScrollX(columnWidth * index);
10914
11543
  }
10915
- }, [viewDate, columnWidth, dateSetup.dates, dateSetup.viewMode, viewMode, currentViewDate, setCurrentViewDate]);
11544
+ }, [viewDate, columnWidth, dateSetup.dates, dateSetup.viewMode, viewMode]);
10916
11545
  react.useEffect(function () {
10917
11546
  var changedTask = ganttEvent.changedTask,
10918
11547
  action = ganttEvent.action;
@@ -10955,9 +11584,9 @@ var Gantt = function Gantt(_ref) {
10955
11584
  }, [taskListRef, listCellWidth]);
10956
11585
  react.useEffect(function () {
10957
11586
  if (wrapperRef.current) {
10958
- setSvgContainerWidth(wrapperRef.current.offsetWidth - taskListWidth);
11587
+ setSvgContainerWidth(wrapperRef.current.offsetWidth - taskListWidth.current);
10959
11588
  }
10960
- }, [wrapperRef, taskListWidth]);
11589
+ }, [wrapperRef]);
10961
11590
  react.useEffect(function () {
10962
11591
  if (ganttHeight) {
10963
11592
  setSvgContainerHeight(ganttHeight + headerHeight);
@@ -11000,7 +11629,7 @@ var Gantt = function Gantt(_ref) {
11000
11629
  };
11001
11630
  }, [wrapperRef, scrollY, scrollX, ganttHeight, svgWidth, rtl, ganttFullHeight]);
11002
11631
  var handleScrollY = function handleScrollY(event) {
11003
- if (scrollY !== event.currentTarget.scrollTop && !ignoreScrollEvent) {
11632
+ if (scrollY !== event.currentTarget.scrollTop && !ignoreScrollEvent.current) {
11004
11633
  setScrollY(event.currentTarget.scrollTop);
11005
11634
  setIgnoreScrollEvent(true);
11006
11635
  } else {
@@ -11008,7 +11637,7 @@ var Gantt = function Gantt(_ref) {
11008
11637
  }
11009
11638
  };
11010
11639
  var handleScrollX = function handleScrollX(event) {
11011
- if (scrollX !== event.currentTarget.scrollLeft && !ignoreScrollEvent) {
11640
+ if (scrollX !== event.currentTarget.scrollLeft && !ignoreScrollEvent.current) {
11012
11641
  setScrollX(event.currentTarget.scrollLeft);
11013
11642
  setIgnoreScrollEvent(true);
11014
11643
  window.dispatchEvent(new CustomEvent("gantt-sync-scroll-event", {
@@ -11168,6 +11797,7 @@ var Gantt = function Gantt(_ref) {
11168
11797
  onProgressChange: onProgressChange,
11169
11798
  onDoubleClick: onDoubleClick,
11170
11799
  onClick: onClick,
11800
+ onContextMenu: onContextMenu,
11171
11801
  onDelete: onDelete
11172
11802
  };
11173
11803
  var tableProps = {
@@ -11180,6 +11810,7 @@ var Gantt = function Gantt(_ref) {
11180
11810
  headerHeight: headerHeight,
11181
11811
  scrollY: scrollY,
11182
11812
  ganttHeight: ganttHeight,
11813
+ filter: filter,
11183
11814
  horizontalContainerClass: styles$7.horizontalContainer,
11184
11815
  selectedTask: selectedTask,
11185
11816
  taskListRef: taskListRef,
@@ -11198,20 +11829,21 @@ var Gantt = function Gantt(_ref) {
11198
11829
  calendarProps: calendarProps,
11199
11830
  barProps: barProps,
11200
11831
  ganttHeight: ganttHeight,
11832
+ taskGanttRef: taskGanttRef,
11201
11833
  scrollY: scrollY,
11202
11834
  scrollX: scrollX
11203
11835
  }), ganttEvent.changedTask && react.createElement(Tooltip, {
11204
11836
  arrowIndent: arrowIndent,
11205
11837
  rowHeight: rowHeight,
11206
- svgContainerHeight: svgContainerHeight,
11207
- svgContainerWidth: svgContainerWidth,
11838
+ svgContainerHeight: svgContainerHeight.current,
11839
+ svgContainerWidth: svgContainerWidth.current,
11208
11840
  fontFamily: fontFamily,
11209
11841
  fontSize: fontSize,
11210
11842
  scrollX: scrollX,
11211
11843
  scrollY: scrollY,
11212
11844
  task: ganttEvent.changedTask,
11213
11845
  headerHeight: headerHeight,
11214
- taskListWidth: taskListWidth,
11846
+ taskListWidth: taskListWidth.current,
11215
11847
  TooltipContent: TooltipContent,
11216
11848
  rtl: rtl,
11217
11849
  svgWidth: svgWidth
@@ -11224,7 +11856,8 @@ var Gantt = function Gantt(_ref) {
11224
11856
  rtl: rtl
11225
11857
  })), react.createElement(HorizontalScroll, {
11226
11858
  svgWidth: svgWidth,
11227
- taskListWidth: taskListWidth,
11859
+ taskGanttRef: taskGanttRef,
11860
+ taskListWidth: taskListWidth.current,
11228
11861
  scroll: scrollX,
11229
11862
  rtl: rtl,
11230
11863
  onScroll: handleScrollX
@@ -11245,6 +11878,7 @@ var format = function format(date, locale, options) {
11245
11878
  } catch (e) {
11246
11879
  console.error("time-formatters.ts format", date, locale, options);
11247
11880
  console.error(e);
11881
+ return "FORMAT-ERR";
11248
11882
  }
11249
11883
  };
11250
11884
  var dayFormatter = function dayFormatter(date, locale) {
@@ -11269,16 +11903,15 @@ var ganttDateTimeFormatters = {
11269
11903
 
11270
11904
  var classes$1 = {"wrapper":"_37E9D","title":"_WrYI6","toggler":"_c53zr","switch":"_2eBO5","input":"_hiyro","slider":"_2HI58","label":"_2gSdA","filter":"_2cfRI"};
11271
11905
 
11272
- var CustomTaskListHeaderHOC = function CustomTaskListHeaderHOC(label, doubleView, setDoubleView, onFilterInput) {
11906
+ var CustomTaskListHeaderHOC = function CustomTaskListHeaderHOC(label, doubleView, setDoubleView) {
11273
11907
  var CustomTaskListHeader = function CustomTaskListHeader(_ref) {
11274
- var headerHeight = _ref.headerHeight,
11275
- fontFamily = _ref.fontFamily,
11908
+ var fontFamily = _ref.fontFamily,
11276
11909
  fontSize = _ref.fontSize;
11277
11910
  return react.createElement("div", {
11278
11911
  style: {
11279
11912
  fontFamily: fontFamily,
11280
11913
  fontSize: fontSize,
11281
- height: headerHeight
11914
+ height: "50px"
11282
11915
  },
11283
11916
  className: classes$1.wrapper
11284
11917
  }, react.createElement("div", {
@@ -11300,16 +11933,7 @@ var CustomTaskListHeaderHOC = function CustomTaskListHeaderHOC(label, doubleView
11300
11933
  className: classes$1.slider
11301
11934
  })), react.createElement("span", {
11302
11935
  className: classes$1.label
11303
- }, "Mostra previsioni")), react.createElement("div", {
11304
- className: classes$1.filter
11305
- }, react.createElement("input", {
11306
- type: "text",
11307
- name: "filter",
11308
- size: 30,
11309
- onInput: function onInput(e) {
11310
- return onFilterInput === null || onFilterInput === void 0 ? void 0 : onFilterInput(e);
11311
- }
11312
- })));
11936
+ }, "Previsioni")));
11313
11937
  };
11314
11938
  return CustomTaskListHeader;
11315
11939
  };
@@ -11327,7 +11951,8 @@ var ProjectRow = function ProjectRow(_ref) {
11327
11951
  fontFamily = _ref.fontFamily,
11328
11952
  fontSize = _ref.fontSize,
11329
11953
  setSelectedTask = _ref.setSelectedTask,
11330
- onclickTaskList = _ref.onclickTaskList;
11954
+ onclickTaskList = _ref.onclickTaskList,
11955
+ oncontextmenuTaskList = _ref.oncontextmenuTaskList;
11331
11956
  var str = "";
11332
11957
  for (var i = 0; i < valuesToShow.length; i++) {
11333
11958
  str += "1fr ";
@@ -11346,6 +11971,11 @@ var ProjectRow = function ProjectRow(_ref) {
11346
11971
  onClick: function onClick() {
11347
11972
  setSelectedTask(id);
11348
11973
  onclickTaskList(id);
11974
+ },
11975
+ onContextMenu: function onContextMenu(e) {
11976
+ e.preventDefault();
11977
+ setSelectedTask(id);
11978
+ oncontextmenuTaskList(e, id);
11349
11979
  }
11350
11980
  }, valuesToShow === null || valuesToShow === void 0 ? void 0 : valuesToShow.map(function (v, index) {
11351
11981
  return react.createElement("span", {
@@ -11367,7 +11997,8 @@ var SubRow = function SubRow(_ref2) {
11367
11997
  fontFamily = _ref2.fontFamily,
11368
11998
  fontSize = _ref2.fontSize,
11369
11999
  setSelectedTask = _ref2.setSelectedTask,
11370
- onclickTaskList = _ref2.onclickTaskList;
12000
+ onclickTaskList = _ref2.onclickTaskList,
12001
+ oncontextmenuTaskList = _ref2.oncontextmenuTaskList;
11371
12002
  var str = "";
11372
12003
  for (var i = 0; i < valuesToShow.length + 1; i++) {
11373
12004
  str += "1fr ";
@@ -11386,6 +12017,11 @@ var SubRow = function SubRow(_ref2) {
11386
12017
  onClick: function onClick() {
11387
12018
  setSelectedTask(id);
11388
12019
  onclickTaskList(id);
12020
+ },
12021
+ onContextMenu: function onContextMenu(e) {
12022
+ e.preventDefault();
12023
+ setSelectedTask(id);
12024
+ oncontextmenuTaskList(e, id);
11389
12025
  }
11390
12026
  }, react.createElement("span", {
11391
12027
  key: "phase_" + id + "_valuesToShow_color",
@@ -11409,7 +12045,9 @@ var TimelineSubRow = function TimelineSubRow(_ref3) {
11409
12045
  rowHeight = _ref3.rowHeight,
11410
12046
  rowWidth = _ref3.rowWidth,
11411
12047
  fontFamily = _ref3.fontFamily,
11412
- fontSize = _ref3.fontSize;
12048
+ fontSize = _ref3.fontSize,
12049
+ setSelectedTask = _ref3.setSelectedTask,
12050
+ oncontextmenuTaskList = _ref3.oncontextmenuTaskList;
11413
12051
  var str = "";
11414
12052
  for (var i = 0; i < valuesToShow.length; i++) {
11415
12053
  str += "1fr ";
@@ -11424,7 +12062,12 @@ var TimelineSubRow = function TimelineSubRow(_ref3) {
11424
12062
  return react.createElement("div", {
11425
12063
  key: "detail_" + id,
11426
12064
  className: styles$9.timeline,
11427
- style: customStyle
12065
+ style: customStyle,
12066
+ onContextMenu: function onContextMenu(e) {
12067
+ e.preventDefault();
12068
+ setSelectedTask(id);
12069
+ oncontextmenuTaskList(e, id);
12070
+ }
11428
12071
  }, valuesToShow === null || valuesToShow === void 0 ? void 0 : valuesToShow.map(function (v, index) {
11429
12072
  return react.createElement("span", {
11430
12073
  className: index === 0 ? styles$9.main : undefined,
@@ -11433,7 +12076,7 @@ var TimelineSubRow = function TimelineSubRow(_ref3) {
11433
12076
  }, v);
11434
12077
  }));
11435
12078
  };
11436
- var CustomTaskListTableHOC = function CustomTaskListTableHOC(onclickTaskList, id) {
12079
+ var CustomTaskListTableHOC = function CustomTaskListTableHOC(onclickTaskList, oncontextmenuTaskList, id) {
11437
12080
  var CustomTaskListTable = function CustomTaskListTable(_ref4) {
11438
12081
  var rowHeight = _ref4.rowHeight,
11439
12082
  rowWidth = _ref4.rowWidth,
@@ -11455,7 +12098,8 @@ var CustomTaskListTableHOC = function CustomTaskListTableHOC(onclickTaskList, id
11455
12098
  fontFamily: fontFamily,
11456
12099
  fontSize: fontSize,
11457
12100
  setSelectedTask: setSelectedTask,
11458
- onclickTaskList: onclickTaskList
12101
+ onclickTaskList: onclickTaskList,
12102
+ oncontextmenuTaskList: oncontextmenuTaskList
11459
12103
  }), task.type === "task" && react.createElement(SubRow, {
11460
12104
  key: task.id + "_" + task.type,
11461
12105
  task: task,
@@ -11464,7 +12108,8 @@ var CustomTaskListTableHOC = function CustomTaskListTableHOC(onclickTaskList, id
11464
12108
  fontFamily: fontFamily,
11465
12109
  fontSize: fontSize,
11466
12110
  setSelectedTask: setSelectedTask,
11467
- onclickTaskList: onclickTaskList
12111
+ onclickTaskList: onclickTaskList,
12112
+ oncontextmenuTaskList: oncontextmenuTaskList
11468
12113
  }), task.type === "timeline" && react.createElement(TimelineSubRow, {
11469
12114
  key: task.id + "_" + task.type,
11470
12115
  task: task,
@@ -11473,7 +12118,8 @@ var CustomTaskListTableHOC = function CustomTaskListTableHOC(onclickTaskList, id
11473
12118
  fontFamily: fontFamily,
11474
12119
  fontSize: fontSize,
11475
12120
  setSelectedTask: setSelectedTask,
11476
- onclickTaskList: onclickTaskList
12121
+ onclickTaskList: onclickTaskList,
12122
+ oncontextmenuTaskList: oncontextmenuTaskList
11477
12123
  }));
11478
12124
  }));
11479
12125
  };
@@ -11536,28 +12182,28 @@ var Planner = function Planner(props) {
11536
12182
  var _useState = react.useState(TimeUnit.MONTH),
11537
12183
  timeUnit = _useState[0],
11538
12184
  setTimeUnit = _useState[1];
11539
- var _useState2 = react.useState(props.mainGantt.items),
11540
- currentTasks = _useState2[0],
11541
- setCurrentTasks = _useState2[1];
11542
- var _useState3 = react.useState((_props$secondaryGantt = props.secondaryGantt) === null || _props$secondaryGantt === void 0 ? void 0 : _props$secondaryGantt.items),
11543
- currentDetails = _useState3[0],
11544
- setCurrentDetails = _useState3[1];
11545
- var _useState4 = react.useState((_props$mainGantt$show = props.mainGantt.showSecondaryDates) != null ? _props$mainGantt$show : false),
11546
- mainGanttDoubleView = _useState4[0],
11547
- setMainGanttDoubleView = _useState4[1];
11548
- var _useState5 = react.useState(calculateDisplayedDateRange(currentTasks, timeUnit, mainGanttDoubleView, currentDetails, props.preStepsCount)),
11549
- displayedDates = _useState5[0],
11550
- setDisplayedDates = _useState5[1];
11551
- var _useState6 = react.useState(),
11552
- viewDate = _useState6[0],
11553
- setViewDate = _useState6[1];
11554
- var _useState7 = react.useState(),
11555
- projection = _useState7[0],
11556
- setProjection = _useState7[1];
11557
- var locale = "it-IT";
11558
- var onFilterInput = function onFilterInput(e) {
11559
- console.log("PLANNER onFilterInput", e);
12185
+ var currentTasks = react.useRef(props.mainGantt.items);
12186
+ var setCurrentTasks = function setCurrentTasks(tasks) {
12187
+ currentTasks.current = tasks;
12188
+ };
12189
+ var currentDetails = react.useRef((_props$secondaryGantt = props.secondaryGantt) === null || _props$secondaryGantt === void 0 ? void 0 : _props$secondaryGantt.items);
12190
+ var setCurrentDetails = function setCurrentDetails(details) {
12191
+ currentDetails.current = details;
11560
12192
  };
12193
+ var _useState2 = react.useState((_props$mainGantt$show = props.mainGantt.showSecondaryDates) != null ? _props$mainGantt$show : false),
12194
+ mainGanttDoubleView = _useState2[0],
12195
+ setMainGanttDoubleView = _useState2[1];
12196
+ var displayedDates = react.useRef(calculateDisplayedDateRange(currentTasks.current, timeUnit, mainGanttDoubleView, currentDetails.current, props.preStepsCount));
12197
+ var setDisplayedDates = function setDisplayedDates(dates) {
12198
+ displayedDates.current = dates;
12199
+ };
12200
+ var _useState3 = react.useState(),
12201
+ viewDate = _useState3[0],
12202
+ setViewDate = _useState3[1];
12203
+ var _useState4 = react.useState(),
12204
+ projection = _useState4[0],
12205
+ setProjection = _useState4[1];
12206
+ var locale = "it-IT";
11561
12207
  var handleClick = function handleClick(row, onClick) {
11562
12208
  if (!row) {
11563
12209
  return;
@@ -11575,6 +12221,28 @@ var Planner = function Planner(props) {
11575
12221
  }
11576
12222
  onClick === null || onClick === void 0 ? void 0 : onClick(row);
11577
12223
  };
12224
+ var handleContextMenu = function handleContextMenu(event, row, onContextMenu) {
12225
+ if (!row) {
12226
+ return;
12227
+ }
12228
+ if (row.type === "task" && props.secondaryGantt) {
12229
+ var _phase$color2;
12230
+ var phase = row;
12231
+ setProjection({
12232
+ start: new Date(phase.startDate),
12233
+ end: new Date(phase.endDate),
12234
+ color: (_phase$color2 = phase.color) != null ? _phase$color2 : "#ED7D31"
12235
+ });
12236
+ } else {
12237
+ setProjection(undefined);
12238
+ }
12239
+ onContextMenu === null || onContextMenu === void 0 ? void 0 : onContextMenu(event, row);
12240
+ };
12241
+ var handleSetDoubleView = function handleSetDoubleView(checked) {
12242
+ var _props$onSetDoubleVie;
12243
+ setMainGanttDoubleView(checked);
12244
+ (_props$onSetDoubleVie = props.onSetDoubleView) === null || _props$onSetDoubleVie === void 0 ? void 0 : _props$onSetDoubleVie.call(props, checked);
12245
+ };
11578
12246
  var handleDateChange = function handleDateChange(task, currentProjects, onDateChange) {
11579
12247
  var id = task === null || task === void 0 ? void 0 : task.id;
11580
12248
  if (!id) {
@@ -11632,25 +12300,32 @@ var Planner = function Planner(props) {
11632
12300
  setProjection(undefined);
11633
12301
  }, [props]);
11634
12302
  react.useEffect(function () {
11635
- var dates = calculateDisplayedDateRange(currentTasks, timeUnit, mainGanttDoubleView, currentDetails, props.preStepsCount);
12303
+ var dates = calculateDisplayedDateRange(currentTasks.current, timeUnit, mainGanttDoubleView, currentDetails.current, props.preStepsCount);
11636
12304
  setDisplayedDates(dates);
11637
12305
  if (!viewDate) {
11638
- setViewDate(dates.displayedStartDate);
12306
+ var now = new Date();
12307
+ if (dates.displayedStartDate <= now && dates.displayedEndDate >= now) {
12308
+ setViewDate(now);
12309
+ } else {
12310
+ setViewDate(dates.displayedStartDate);
12311
+ }
11639
12312
  }
11640
- }, [currentTasks, currentDetails]);
12313
+ }, [timeUnit, mainGanttDoubleView, props.preStepsCount, viewDate]);
11641
12314
  var tasks = [];
11642
- for (var i = 0; i < currentTasks.length; i++) {
11643
- tasks.push.apply(tasks, convertProjectToTasks(currentTasks[i], formatToIsoDate(displayedDates.displayedStartDate), formatToIsoDate(displayedDates.displayedEndDate)));
12315
+ for (var i = 0; i < currentTasks.current.length; i++) {
12316
+ tasks.push.apply(tasks, convertProjectToTasks(currentTasks.current[i], formatToIsoDate(displayedDates.current.displayedStartDate), formatToIsoDate(displayedDates.current.displayedEndDate)));
11644
12317
  }
11645
12318
  var details = [];
11646
- if (currentDetails) {
11647
- for (var _i = 0; _i < currentDetails.length; _i++) {
11648
- details.push.apply(details, convertProjectToTasks(currentDetails[_i], formatToIsoDate(displayedDates.displayedStartDate), formatToIsoDate(displayedDates.displayedEndDate)));
12319
+ if (currentDetails.current) {
12320
+ for (var _i = 0; _i < currentDetails.current.length; _i++) {
12321
+ details.push.apply(details, convertProjectToTasks(currentDetails.current[_i], formatToIsoDate(displayedDates.current.displayedStartDate), formatToIsoDate(displayedDates.current.displayedEndDate)));
11649
12322
  }
11650
12323
  }
12324
+ console.log("PLANNER render");
11651
12325
  return react.createElement("div", null, react.createElement(Switcher, {
11652
12326
  onTimeUnitChange: function onTimeUnitChange(timeUnit) {
11653
- return setTimeUnit(timeUnit);
12327
+ setTimeUnit(timeUnit);
12328
+ setViewDate(undefined);
11654
12329
  }
11655
12330
  }), react.createElement("div", {
11656
12331
  style: {
@@ -11658,73 +12333,109 @@ var Planner = function Planner(props) {
11658
12333
  flexDirection: "column"
11659
12334
  }
11660
12335
  }, react.createElement(Gantt, Object.assign({
11661
- id: "main",
11662
- key: "main",
12336
+ id: MAIN_GANTT_ID,
12337
+ key: MAIN_GANTT_ID,
12338
+ filter: props.mainGantt.filter,
11663
12339
  hideLabel: props.mainGantt.hideLabel,
11664
12340
  showSecondaryDates: mainGanttDoubleView,
11665
12341
  hideDependencies: props.mainGantt.hideDependencies,
11666
12342
  ganttHeight: props.mainGantt.ganttHeight,
11667
- displayedStartDate: displayedDates.displayedStartDate,
11668
- displayedEndDate: displayedDates.displayedEndDate,
12343
+ displayedStartDate: displayedDates.current.displayedStartDate,
12344
+ displayedEndDate: displayedDates.current.displayedEndDate,
11669
12345
  viewDate: viewDate,
11670
12346
  tasks: tasks,
12347
+ columnWidth: columnWidthForTimeUnit(timeUnit),
11671
12348
  viewMode: toViewMode(timeUnit)
11672
12349
  }, props.mainGantt.stylingOptions, {
11673
- TaskListHeader: (_props$mainGantt$task = props.mainGantt.taskListHeaderProject) != null ? _props$mainGantt$task : CustomTaskListHeaderHOC(props.mainGantt.title, mainGanttDoubleView != null ? mainGanttDoubleView : false, setMainGanttDoubleView, onFilterInput),
12350
+ TaskListHeader: (_props$mainGantt$task = props.mainGantt.taskListHeaderProject) != null ? _props$mainGantt$task : CustomTaskListHeaderHOC(props.mainGantt.title, mainGanttDoubleView != null ? mainGanttDoubleView : false, handleSetDoubleView),
11674
12351
  TaskListTable: (_props$mainGantt$task2 = props.mainGantt.taskListTableProject) != null ? _props$mainGantt$task2 : CustomTaskListTableHOC(function (id) {
11675
- var row = getProjectById(id, currentTasks);
12352
+ var row = getProjectById(id, currentTasks.current);
11676
12353
  if (!row) {
11677
- row = getPhaseById(id, currentTasks);
12354
+ row = getPhaseById(id, currentTasks.current);
11678
12355
  }
11679
12356
  if (row) {
11680
12357
  handleClick(row, props.mainGantt.onClick);
11681
12358
  }
11682
- }, "main"),
12359
+ }, function (event, id) {
12360
+ var row = getProjectById(id, currentTasks.current);
12361
+ if (!row) {
12362
+ row = getPhaseById(id, currentTasks.current);
12363
+ }
12364
+ if (row) {
12365
+ handleContextMenu(event, row, props.mainGantt.onContextMenu);
12366
+ }
12367
+ }, MAIN_GANTT_ID),
11683
12368
  TooltipContent: (_props$mainGantt$tool = props.mainGantt.tooltipContent) != null ? _props$mainGantt$tool : CustomTooltipHOC(),
11684
- onClick: function onClick(e) {
11685
- var row = getProjectById(e.id, currentTasks);
12369
+ onClick: function onClick(task) {
12370
+ var row = getProjectById(task.id, currentTasks.current);
11686
12371
  if (!row) {
11687
- row = getPhaseById(e.id, currentTasks);
12372
+ row = getPhaseById(task.id, currentTasks.current);
11688
12373
  }
11689
12374
  if (row) {
11690
12375
  handleClick(row, props.mainGantt.onClick);
11691
12376
  }
11692
12377
  },
11693
- onDateChange: function onDateChange(e) {
11694
- return handleDateChange(e, currentTasks, props.mainGantt.onDateChange);
12378
+ onContextMenu: function onContextMenu(event, task) {
12379
+ var row = getProjectById(task.id, currentTasks.current);
12380
+ if (!row) {
12381
+ row = getPhaseById(task.id, currentTasks.current);
12382
+ }
12383
+ if (row) {
12384
+ handleContextMenu(event, row, props.mainGantt.onContextMenu);
12385
+ }
12386
+ },
12387
+ onDateChange: function onDateChange(task) {
12388
+ return handleDateChange(task, currentTasks.current, props.mainGantt.onDateChange);
11695
12389
  },
11696
12390
  locale: locale,
11697
12391
  dateTimeFormatters: ganttDateTimeFormatters
11698
12392
  })), props.secondaryGantt && react.createElement(Gantt, Object.assign({
11699
- id: "secondary",
11700
- key: "secondary",
12393
+ id: SECONDARY_GANTT_ID,
12394
+ key: SECONDARY_GANTT_ID,
11701
12395
  hideLabel: props.secondaryGantt.hideLabel,
12396
+ filter: props.secondaryGantt.filter,
11702
12397
  showSecondaryDates: mainGanttDoubleView,
11703
12398
  hideDependencies: props.secondaryGantt.hideDependencies,
11704
12399
  ganttHeight: props.secondaryGantt.ganttHeight,
11705
- displayedStartDate: displayedDates.displayedStartDate,
11706
- displayedEndDate: displayedDates.displayedEndDate,
12400
+ displayedStartDate: displayedDates.current.displayedStartDate,
12401
+ displayedEndDate: displayedDates.current.displayedEndDate,
11707
12402
  viewDate: viewDate,
11708
12403
  tasks: details,
12404
+ columnWidth: columnWidthForTimeUnit(timeUnit),
11709
12405
  viewMode: toViewMode(timeUnit)
11710
12406
  }, props.mainGantt.stylingOptions, {
11711
- TaskListHeader: (_props$secondaryGantt3 = props.secondaryGantt.taskListHeaderProject) != null ? _props$secondaryGantt3 : CustomTaskListHeaderHOC(props.secondaryGantt.title, undefined, undefined, onFilterInput),
12407
+ TaskListHeader: (_props$secondaryGantt3 = props.secondaryGantt.taskListHeaderProject) != null ? _props$secondaryGantt3 : CustomTaskListHeaderHOC(props.secondaryGantt.title),
11712
12408
  TaskListTable: (_props$secondaryGantt4 = (_props$secondaryGantt5 = props.secondaryGantt) === null || _props$secondaryGantt5 === void 0 ? void 0 : _props$secondaryGantt5.taskListTableProject) != null ? _props$secondaryGantt4 : CustomTaskListTableHOC(function (id) {
11713
12409
  console.log("planner.tsx secondaryGantt Clicked on " + id);
11714
- }, "secondary"),
12410
+ }, function (event, id) {
12411
+ if (props.secondaryGantt) {
12412
+ var row = getProjectById(id, currentDetails.current);
12413
+ if (row) {
12414
+ handleContextMenu(event, row, props.secondaryGantt.onContextMenu);
12415
+ }
12416
+ }
12417
+ }, SECONDARY_GANTT_ID),
11715
12418
  TooltipContent: (_props$secondaryGantt6 = props.secondaryGantt.tooltipContent) != null ? _props$secondaryGantt6 : CustomTooltipHOC(),
11716
12419
  projection: projection,
11717
- onClick: function onClick(e) {
12420
+ onClick: function onClick(task) {
11718
12421
  if (props.secondaryGantt) {
11719
- var row = getProjectById(e.id, currentDetails);
12422
+ var row = getProjectById(task.id, currentDetails.current);
11720
12423
  if (row) {
11721
12424
  handleClick(row, props.secondaryGantt.onClick);
11722
12425
  }
11723
12426
  }
11724
12427
  },
11725
- onDateChange: function onDateChange(e) {
12428
+ onContextMenu: function onContextMenu(event, task) {
12429
+ if (props.secondaryGantt) {
12430
+ var row = getProjectById(task.id, currentDetails.current);
12431
+ if (row) {
12432
+ handleContextMenu(event, row, props.secondaryGantt.onContextMenu);
12433
+ }
12434
+ }
12435
+ },
12436
+ onDateChange: function onDateChange(task) {
11726
12437
  var _props$secondaryGantt7;
11727
- return handleDateChange(e, currentDetails, (_props$secondaryGantt7 = props.secondaryGantt) === null || _props$secondaryGantt7 === void 0 ? void 0 : _props$secondaryGantt7.onDateChange);
12438
+ return handleDateChange(task, currentDetails.current, (_props$secondaryGantt7 = props.secondaryGantt) === null || _props$secondaryGantt7 === void 0 ? void 0 : _props$secondaryGantt7.onDateChange);
11728
12439
  },
11729
12440
  locale: locale,
11730
12441
  dateTimeFormatters: ganttDateTimeFormatters
@@ -11783,15 +12494,8 @@ function getValuesToShow(row, idCol, nameCol, dataColumns, columns, customToValu
11783
12494
  return valuesToShow;
11784
12495
  }
11785
12496
 
11786
- const kupPlannerCss = "._3_ygE{display:table;border-bottom:#e6e4e4 1px solid;border-top:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}._1nBOt{display:table-row;list-style:none}._2eZzQ{border-right:1px solid rgb(196, 196, 196);opacity:1;margin-left:-2px}._WuQ0f{display:table-cell;vertical-align:-webkit-baseline-middle;vertical-align:middle}._3ZbQT{display:table;border-bottom:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}._34SS0{display:table-row;text-overflow:ellipsis}._34SS0:nth-of-type(even){}._3lLk3{display:table-cell;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._nI1Xw{display:flex}._2QjE6{color:rgb(86 86 86);font-size:0.6rem;padding:0.15rem 0.2rem 0 0.2rem;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}._2TfEi{font-size:0.6rem;padding-left:1rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}._3T42e{background:#fff;padding:12px;box-shadow:0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23)}._29NTg{font-size:12px;margin-bottom:6px;color:#666}._25P-K{position:absolute;display:flex;flex-shrink:0;pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}._3gVAq{visibility:hidden;position:absolute;display:flex;pointer-events:none}._1eT-t{overflow:hidden auto;width:1rem;flex-shrink:0;scrollbar-width:thin}._1eT-t::-webkit-scrollbar{width:1.1rem;height:1.1rem}._1eT-t::-webkit-scrollbar-corner{background:transparent}._1eT-t::-webkit-scrollbar-thumb{border:6px solid transparent;background:rgba(0, 0, 0, 0.2);background:var(--palette-black-alpha-20, rgba(0, 0, 0, 0.2));border-radius:10px;background-clip:padding-box}._1eT-t::-webkit-scrollbar-thumb:hover{border:4px solid transparent;background:rgba(0, 0, 0, 0.3);background:var(--palette-black-alpha-30, rgba(0, 0, 0, 0.3));background-clip:padding-box}._EvhC1{border-radius:8px;background:#efefef;margin:12px;padding:12px}._2dZTy{fill:#fff}._2dZTy:nth-child(even){}._3rUKi{stroke:transparent}._RuwuK{stroke:#e6e4e4}._9w8d5{text-anchor:middle;fill:#333;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._1rLuZ{stroke:#e6e4e4}._2q1Kt{text-anchor:middle;fill:#555;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._35nLX{fill:#ffffff;stroke:#e0e0e0;stroke-width:1.4}._KxSXS{cursor:pointer;outline:none}._KxSXS:hover ._3w_5u{visibility:visible;opacity:1}._3w_5u{fill:#ddd;cursor:ew-resize;opacity:0;visibility:hidden}._31ERP{-webkit-user-select:none;-moz-user-select:none;user-select:none;stroke-width:0}._3zRJQ{fill:#fff;text-anchor:middle;font-weight:lighter;dominant-baseline:central;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._3KcaM{fill:#555;text-anchor:start;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._11iN9{background:#efefef;border-radius:8px;margin:12px;overflow:hidden;padding:12px}._CZjuD{overflow:hidden;font-size:0;margin:0;padding:0}._2B2zv{margin:0;padding:0;overflow:hidden}._3eULf{display:flex;padding:0;margin:0;list-style:none;outline:none;position:relative}._2k9Ys{overflow:auto;max-width:100%;scrollbar-width:thin;height:1.2rem}._2k9Ys::-webkit-scrollbar{width:1.1rem;height:1.1rem}._2k9Ys::-webkit-scrollbar-corner{background:transparent}._2k9Ys::-webkit-scrollbar-thumb{border:6px solid transparent;background:rgba(0, 0, 0, 0.2);background:var(--palette-black-alpha-20, rgba(0, 0, 0, 0.2));border-radius:10px;background-clip:padding-box}._2k9Ys::-webkit-scrollbar-thumb:hover{border:4px solid transparent;background:rgba(0, 0, 0, 0.3);background:var(--palette-black-alpha-30, rgba(0, 0, 0, 0.3));background-clip:padding-box}._19jgW{height:1px}._37E9D{display:flex;justify-content:space-around;max-width:330px;place-items:\"center\";text-align:center;align-items:center}._WrYI6{font-weight:bold;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._c53zr{max-width:-moz-max-content;max-width:max-content;padding:0 4px;text-align:right}._2eBO5{position:relative;display:inline-block;width:30px;height:17px}._hiyro{opacity:0;width:0;height:0}._hiyro:checked+._2HI58{background-color:#003b77}._hiyro:checked+._2HI58:before{transform:translateX(13px)}._hiyro:focus+._2HI58{box-shadow:0 0 1px #003b77}._2HI58{-webkit-transition:0.4s;cursor:pointer;background-color:#ccc;bottom:0;border-radius:17px;left:0;position:absolute;right:0;top:0;transition:0.4s}._2HI58:before{-webkit-transition:0.1s;background-color:white;border-radius:50%;bottom:2px;content:\"\";height:13px;left:2px;position:absolute;transition:0.1s;width:13px}._2gSdA{font-size:12px;padding:6px}._2cfRI{font-size:12px}._lEI6r{padding:0 10px;margin-right:10px}._RU6Aa{background:var(--kup-background-color, #ffffff);border:1px solid var(--kup-border-color, #acacac);border-radius:4px;box-sizing:border-box;color:var(--kup-text-color, #595959);cursor:pointer;display:grid;font-weight:400;grid-template-columns:var(--grid-project-columns, 1fr 1fr 1fr);place-items:center}._RU6Aa>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}._RU6Aa ._30j6y{font-weight:700;width:100%;text-align:center}._T0HQN{cursor:pointer;display:grid;border-width:1px;border-style:solid;border-color:#acacac;border-bottom-left-radius:4px;border-bottom-right-radius:4px;box-sizing:border-box;grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background:#ffffff;color:#595959;font-weight:400}._T0HQN>*{font-size:12px;line-height:14px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%}._T0HQN:has(+._T0HQN),._RU6Aa:has(+._T0HQN){border-bottom-left-radius:0;border-bottom-right-radius:0}._yp2DW{cursor:pointer;display:grid;border-width:1px;border-style:solid;border-color:#cbcbcb;border-radius:4px;grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background:#fff;color:#595959;font-weight:400;box-sizing:border-box}._yp2DW>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}._yp2DW ._30j6y{font-weight:700;width:100%;text-align:center}._3P0WE{display:grid;grid-auto-flow:column;grid-gap:8px;margin-left:12px;width:-moz-max-content;width:max-content}._1oXbe{background:transparent;border-color:var(--kup-primary-color, #003b77);border-radius:4px;border-width:1px;box-shadow:0 3px 1px -2px rgba(var(--kup-text-color-rgb, 51 51 51), 0.2), 0 2px 2px 0 rgba(var(--kup-text-color-rgb, 51 51 51), 0.14), 0 1px 5px 0 rgba(var(--kup-text-color-rgb, 51 51 51), 0.12);box-sizing:border-box;color:var(--kup-primary-color, #003b77);cursor:pointer;font-size:11px;height:32px;min-width:64px}._1R9mh{font-family:var(--kup-font-family, inherit);font-size:11px;letter-spacing:0.0892857143em;text-decoration:none;text-transform:uppercase;padding:0 6px}:host{display:block}";
12497
+ const kupPlannerCss = "._3_ygE{display:table;border-bottom:#e6e4e4 1px solid;border-top:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}._1nBOt{display:table-row;list-style:none}._2eZzQ{border-right:1px solid rgb(196, 196, 196);opacity:1;margin-left:-2px}._WuQ0f{display:table-cell;vertical-align:-webkit-baseline-middle;vertical-align:middle}._3ZbQT{display:table;border-bottom:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}._34SS0{display:table-row;text-overflow:ellipsis}._34SS0:nth-of-type(even){}._3lLk3{display:table-cell;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._nI1Xw{display:flex}._2QjE6{color:rgb(86 86 86);font-size:0.6rem;padding:0.15rem 0.2rem 0 0.2rem;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}._2TfEi{font-size:0.6rem;padding-left:1rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}._3T42e{background:#fff;padding:12px;box-shadow:0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23)}._29NTg{font-size:12px;margin-bottom:6px;color:#666}._25P-K{position:absolute;display:flex;flex-shrink:0;pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}._3gVAq{visibility:hidden;position:absolute;display:flex;pointer-events:none}._1eT-t{overflow:hidden auto;width:1rem;flex-shrink:0;scrollbar-width:thin}._1eT-t::-webkit-scrollbar{width:1.1rem;height:1.1rem}._1eT-t::-webkit-scrollbar-corner{background:transparent}._1eT-t::-webkit-scrollbar-thumb{border:6px solid transparent;background:rgba(0, 0, 0, 0.2);background:var(--palette-black-alpha-20, rgba(0, 0, 0, 0.2));border-radius:10px;background-clip:padding-box}._1eT-t::-webkit-scrollbar-thumb:hover{border:4px solid transparent;background:rgba(0, 0, 0, 0.3);background:var(--palette-black-alpha-30, rgba(0, 0, 0, 0.3));background-clip:padding-box}._EvhC1{border-radius:8px;background:#efefef;margin:12px;padding:12px}._2dZTy{fill:#fff}._2dZTy:nth-child(even){}._3rUKi{stroke:transparent}._RuwuK{stroke:#e6e4e4}._9w8d5{text-anchor:middle;fill:#333;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._1rLuZ{stroke:#e6e4e4}._2q1Kt{text-anchor:middle;fill:#555;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._35nLX{fill:#ffffff;stroke:#e0e0e0;stroke-width:1.4}._KxSXS{cursor:pointer;outline:none}._KxSXS:hover ._3w_5u{visibility:visible;opacity:1}._3w_5u{fill:#ddd;cursor:ew-resize;opacity:0;visibility:hidden}._31ERP{-webkit-user-select:none;-moz-user-select:none;user-select:none;stroke-width:0}._3zRJQ{fill:#fff;text-anchor:middle;font-weight:lighter;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._3KcaM{fill:#555;text-anchor:start;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._11iN9{background:#efefef;border-radius:8px;margin:12px;overflow:hidden;padding:12px}._CZjuD{overflow:hidden;font-size:0;margin:0;padding:0}._2B2zv{margin:0;padding:0;overflow:hidden}._3eULf{display:flex;padding:0;margin:0;list-style:none;outline:none;position:relative}._2k9Ys{overflow:auto;max-width:100%;scrollbar-width:thin;height:1.2rem}._2k9Ys::-webkit-scrollbar{width:1.1rem;height:1.1rem}._2k9Ys::-webkit-scrollbar-corner{background:transparent}._2k9Ys::-webkit-scrollbar-thumb{border:6px solid transparent;background:rgba(0, 0, 0, 0.2);background:var(--palette-black-alpha-20, rgba(0, 0, 0, 0.2));border-radius:10px;background-clip:padding-box}._2k9Ys::-webkit-scrollbar-thumb:hover{border:4px solid transparent;background:rgba(0, 0, 0, 0.3);background:var(--palette-black-alpha-30, rgba(0, 0, 0, 0.3));background-clip:padding-box}._19jgW{height:1px}._37E9D{display:flex;justify-content:space-around;max-width:330px;place-items:\"center\";text-align:center;align-items:center}._WrYI6{font-weight:bold;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._c53zr{max-width:-moz-max-content;max-width:max-content;padding:0 4px;text-align:right}._2eBO5{position:relative;display:inline-block;width:30px;height:17px}._hiyro{opacity:0;width:0;height:0}._hiyro:checked+._2HI58{background-color:#003b77}._hiyro:checked+._2HI58:before{transform:translateX(13px)}._hiyro:focus+._2HI58{box-shadow:0 0 1px #003b77}._2HI58{-webkit-transition:0.4s;cursor:pointer;background-color:#ccc;bottom:0;border-radius:17px;left:0;position:absolute;right:0;top:0;transition:0.4s}._2HI58:before{-webkit-transition:0.1s;background-color:white;border-radius:50%;bottom:2px;content:\"\";height:13px;left:2px;position:absolute;transition:0.1s;width:13px}._2gSdA{font-size:12px;padding:6px}._2cfRI{font-size:12px}._lEI6r{padding:0 10px;margin-right:10px}._RU6Aa{background:var(--kup-background-color, #ffffff);border:1px solid var(--kup-border-color, #acacac);border-radius:4px;box-sizing:border-box;color:var(--kup-text-color, #595959);cursor:pointer;display:grid;font-weight:400;grid-template-columns:var(--grid-project-columns, 1fr 1fr 1fr);place-items:center}._RU6Aa>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}._RU6Aa ._30j6y{font-weight:700;width:100%;text-align:center}._T0HQN{cursor:pointer;display:grid;border-width:1px;border-style:solid;border-color:#acacac;border-bottom-left-radius:4px;border-bottom-right-radius:4px;box-sizing:border-box;grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background:#ffffff;color:#595959;font-weight:400}._T0HQN>*{font-size:12px;line-height:14px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%}._T0HQN:has(+._T0HQN),._RU6Aa:has(+._T0HQN){border-bottom-left-radius:0;border-bottom-right-radius:0}._yp2DW{cursor:pointer;display:grid;border-width:1px;border-style:solid;border-color:#cbcbcb;border-radius:4px;grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background:#fff;color:#595959;font-weight:400;box-sizing:border-box}._yp2DW>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}._yp2DW ._30j6y{font-weight:700;width:100%;text-align:center}._3P0WE{display:grid;grid-auto-flow:column;grid-gap:8px;margin-left:12px;width:-moz-max-content;width:max-content}._1oXbe{background:transparent;border-color:var(--kup-primary-color, #003b77);border-radius:4px;border-width:1px;box-shadow:0 3px 1px -2px rgba(var(--kup-text-color-rgb, 51 51 51), 0.2), 0 2px 2px 0 rgba(var(--kup-text-color-rgb, 51 51 51), 0.14), 0 1px 5px 0 rgba(var(--kup-text-color-rgb, 51 51 51), 0.12);box-sizing:border-box;color:var(--kup-primary-color, #003b77);cursor:pointer;font-size:11px;height:32px;min-width:64px}._1R9mh{font-family:var(--kup-font-family, inherit);font-size:11px;letter-spacing:0.0892857143em;text-decoration:none;text-transform:uppercase;padding:0 6px}:host{display:block}.filter{margin:12px 10px 12px 0;padding:0 10px}";
11787
12498
 
11788
- var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11789
- if (kind === "a" && !f)
11790
- throw new TypeError("Private accessor was defined without a getter");
11791
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
11792
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
11793
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11794
- };
11795
12499
  var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
11796
12500
  if (kind === "m")
11797
12501
  throw new TypeError("Private method is not writable");
@@ -11801,7 +12505,14 @@ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) ||
11801
12505
  throw new TypeError("Cannot write private member to an object whose class did not declare it");
11802
12506
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11803
12507
  };
11804
- var _KupPlanner_instances, _KupPlanner_kupManager, _KupPlanner_rootPlanner, _KupPlanner_lastOnChangeReceived, _KupPlanner_renderReactPlannerElement, _KupPlanner_toTasks, _KupPlanner_toDetails, _KupPlanner_getTask, _KupPlanner_removePhases, _KupPlanner_handleOnClickOnTask, _KupPlanner_handleOnClickOnPhase, _KupPlanner_handleOnClickOnDetail, _KupPlanner_emitOnChangeEventsReceived;
12508
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12509
+ if (kind === "a" && !f)
12510
+ throw new TypeError("Private accessor was defined without a getter");
12511
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
12512
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
12513
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12514
+ };
12515
+ 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;
11805
12516
  const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
11806
12517
  constructor() {
11807
12518
  super();
@@ -11810,14 +12521,17 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
11810
12521
  this.kupClick = createEvent(this, "kup-planner-click", 6);
11811
12522
  this.kupDateChange = createEvent(this, "kup-planner-datechange", 6);
11812
12523
  this.kupReady = createEvent(this, "kup-planner-ready", 6);
12524
+ this.kupContextMenu = createEvent(this, "kup-planner-contextmenu", 6);
11813
12525
  _KupPlanner_instances.add(this);
11814
12526
  /*-------------------------------------------------*/
11815
12527
  /* I n t e r n a l V a r i a b l e s */
11816
12528
  /*-------------------------------------------------*/
11817
12529
  _KupPlanner_kupManager.set(this, kupManagerInstance());
11818
- _KupPlanner_rootPlanner.set(this, void 0);
11819
12530
  _KupPlanner_lastOnChangeReceived.set(this, void 0);
11820
- this.plannerProps = undefined;
12531
+ _KupPlanner_rootPlanner.set(this, void 0);
12532
+ _KupPlanner_phases.set(this, {});
12533
+ // no re-render
12534
+ _KupPlanner_showSecondaryDatesLocal.set(this, false);
11821
12535
  this.customStyle = '';
11822
12536
  this.data = undefined;
11823
12537
  this.detailData = undefined;
@@ -11825,6 +12539,7 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
11825
12539
  this.detailColumns = undefined;
11826
12540
  this.detailDates = undefined;
11827
12541
  this.detailHeight = undefined;
12542
+ this.detailIconCol = undefined;
11828
12543
  this.detailIdCol = undefined;
11829
12544
  this.detailNameCol = undefined;
11830
12545
  this.detailPrevDates = undefined;
@@ -11834,6 +12549,7 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
11834
12549
  this.phaseColumns = undefined;
11835
12550
  this.phaseColParDep = undefined;
11836
12551
  this.phaseDates = undefined;
12552
+ this.phaseIconCol = undefined;
11837
12553
  this.phaseIdCol = undefined;
11838
12554
  this.phaseNameCol = undefined;
11839
12555
  this.phasePrevDates = undefined;
@@ -11841,25 +12557,23 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
11841
12557
  this.taskColumns = undefined;
11842
12558
  this.taskDates = undefined;
11843
12559
  this.taskHeight = undefined;
12560
+ this.taskIconCol = undefined;
11844
12561
  this.taskIdCol = undefined;
11845
12562
  this.taskNameCol = undefined;
11846
12563
  this.taskPrevDates = undefined;
11847
12564
  this.titleMess = undefined;
12565
+ this.plannerProps = undefined;
11848
12566
  }
11849
- onKupClick(event, taskAction) {
11850
- this.kupClick.emit({
11851
- comp: this,
11852
- id: this.rootElement.id,
11853
- value: event,
11854
- taskAction: taskAction,
11855
- });
12567
+ dataChanged() {
12568
+ __classPrivateFieldSet(this, _KupPlanner_phases, {}, "f");
11856
12569
  }
11857
- onKupDateChange(event) {
11858
- this.kupDateChange.emit({
11859
- comp: this,
11860
- id: this.rootElement.id,
11861
- value: event,
11862
- });
12570
+ showSecondaryDatesChanged() {
12571
+ var _a;
12572
+ __classPrivateFieldSet(this, _KupPlanner_showSecondaryDatesLocal, this.showSecondaryDates, "f");
12573
+ if ((_a = this.plannerProps) === null || _a === void 0 ? void 0 : _a.mainGantt) {
12574
+ this.plannerProps.mainGantt.showSecondaryDates =
12575
+ this.showSecondaryDates;
12576
+ }
11863
12577
  }
11864
12578
  /*-------------------------------------------------*/
11865
12579
  /* P u b l i c M e t h o d s */
@@ -11894,6 +12608,7 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
11894
12608
  var _a;
11895
12609
  const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
11896
12610
  if (task) {
12611
+ __classPrivateFieldGet(this, _KupPlanner_phases, "f")[taskId] = data;
11897
12612
  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) => {
11898
12613
  const datesSanitized = sanitizeAllDates(row.cells[this.phaseDates[0]], row.cells[this.phaseDates[1]], row.cells[this.phasePrevDates[0]], row.cells[this.phasePrevDates[1]]);
11899
12614
  const valuesToShow = getValuesToShow(row, this.phaseIdCol, this.phaseNameCol, data.columns, this.phaseColumns, () => this.phaseColumns.map((col) => col == this.phaseDates[0]
@@ -11901,6 +12616,8 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
11901
12616
  : col == this.phaseDates[1]
11902
12617
  ? '#END#'
11903
12618
  : getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
12619
+ let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.phaseIconCol);
12620
+ let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.phaseIconCol);
11904
12621
  let phase = {
11905
12622
  taskRow: task.taskRow,
11906
12623
  phaseRow: row,
@@ -11917,59 +12634,43 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
11917
12634
  selectedColor: row.cells[this.phaseColorCol].value,
11918
12635
  valuesToShow: valuesToShow,
11919
12636
  rowType: KupPlannerGanttRowType.PHASE,
12637
+ icon: iconUrl
12638
+ ? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
12639
+ : undefined,
11920
12640
  };
11921
12641
  return phase;
11922
12642
  });
11923
12643
  }
11924
12644
  this.plannerProps = Object.assign({}, this.plannerProps);
11925
12645
  }
11926
- handleOnClick(nativeEvent) {
11927
- console.log('handleOnClick', nativeEvent);
11928
- switch (nativeEvent.rowType) {
11929
- case KupPlannerGanttRowType.TASK:
11930
- const taskAction = nativeEvent.phases
11931
- ? KupPlannerTaskAction.onClosing
11932
- : KupPlannerTaskAction.onOpening;
11933
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnTask).call(this, nativeEvent)) {
11934
- this.onKupClick(nativeEvent, taskAction);
11935
- }
11936
- break;
11937
- case KupPlannerGanttRowType.PHASE:
11938
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnPhase).call(this)) {
11939
- this.onKupClick(nativeEvent);
11940
- }
11941
- break;
11942
- case KupPlannerGanttRowType.DETAIL:
11943
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnDetail).call(this)) {
11944
- this.onKupClick(nativeEvent);
11945
- }
11946
- break;
11947
- }
11948
- }
11949
- handleOnDateChange(nativeEvent) {
11950
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_emitOnChangeEventsReceived).call(this, nativeEvent)) {
11951
- console.log('handleOnDateChange', nativeEvent);
11952
- this.onKupDateChange(nativeEvent);
11953
- }
11954
- }
12646
+ //---- Lifecycle hooks ----
11955
12647
  componentWillLoad() {
11956
12648
  __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logLoad(this, false);
11957
12649
  __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.register(this);
11958
12650
  }
11959
12651
  componentDidLoad() {
12652
+ __classPrivateFieldSet(this, _KupPlanner_showSecondaryDatesLocal, this.showSecondaryDates, "f");
11960
12653
  let details = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toDetails).call(this, this.detailData);
11961
12654
  if (details && details.length == 0) {
11962
12655
  details = undefined;
11963
12656
  }
12657
+ const mainFilter = this.rootElement.shadowRoot.querySelector('#main-filter');
12658
+ FTextFieldMDC(mainFilter);
12659
+ const secondaryFilter = this.rootElement.shadowRoot.querySelector('#secondary-filter');
12660
+ if (details) {
12661
+ FTextFieldMDC(secondaryFilter);
12662
+ }
11964
12663
  this.plannerProps = {
11965
12664
  mainGantt: {
11966
12665
  title: this.titleMess,
11967
12666
  items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toTasks).call(this, this.data),
11968
12667
  stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
12668
+ filter: mainFilter,
11969
12669
  hideLabel: true,
11970
12670
  ganttHeight: this.taskHeight,
11971
- showSecondaryDates: this.showSecondaryDates,
12671
+ showSecondaryDates: __classPrivateFieldGet(this, _KupPlanner_showSecondaryDatesLocal, "f"),
11972
12672
  onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
12673
+ onContextMenu: (event, row) => this.handleOnContextMenu(event, row),
11973
12674
  onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
11974
12675
  },
11975
12676
  secondaryGantt: details
@@ -11977,14 +12678,16 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
11977
12678
  title: '',
11978
12679
  items: details,
11979
12680
  stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
12681
+ filter: secondaryFilter,
11980
12682
  hideLabel: true,
11981
12683
  ganttHeight: this.detailHeight,
11982
12684
  onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
12685
+ onContextMenu: (event, row) => this.handleOnContextMenu(event, row),
11983
12686
  onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
11984
12687
  }
11985
12688
  : undefined,
12689
+ onSetDoubleView: (checked) => this.handleOnSetDoubleView(checked),
11986
12690
  };
11987
- console.log('kup-planner.tsx componentDidLoad plannerProps', this.plannerProps);
11988
12691
  __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_renderReactPlannerElement).call(this);
11989
12692
  this.kupReady.emit({
11990
12693
  comp: this,
@@ -11999,14 +12702,134 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
11999
12702
  componentDidRender() {
12000
12703
  __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logRender(this, true);
12001
12704
  }
12705
+ onKupClick(event, taskAction) {
12706
+ this.kupClick.emit({
12707
+ comp: this,
12708
+ id: this.rootElement.id,
12709
+ value: event,
12710
+ taskAction: taskAction,
12711
+ });
12712
+ }
12713
+ onKupContextMenu(event, ganttRow, taskAction) {
12714
+ let row;
12715
+ let cell;
12716
+ let column;
12717
+ switch (ganttRow.type) {
12718
+ case 'project': {
12719
+ row = ganttRow.taskRow;
12720
+ cell = row.cells[this.taskIdCol];
12721
+ column = this.data.columns[this.taskIdCol];
12722
+ break;
12723
+ }
12724
+ case 'task': {
12725
+ row = ganttRow.phaseRow;
12726
+ cell = row.cells[this.phaseIdCol];
12727
+ //column = this.data.columns[this.taskIdCol];
12728
+ break;
12729
+ }
12730
+ case 'timeline': {
12731
+ row = ganttRow.detailRow;
12732
+ cell = row.cells[this.detailIdCol];
12733
+ column = this.data.columns[this.detailIdCol];
12734
+ break;
12735
+ }
12736
+ }
12737
+ this.kupContextMenu.emit({
12738
+ comp: this,
12739
+ id: this.rootElement.id,
12740
+ value: ganttRow,
12741
+ taskAction: taskAction,
12742
+ details: {
12743
+ cell: cell,
12744
+ column: column,
12745
+ originalEvent: event,
12746
+ row: row,
12747
+ },
12748
+ });
12749
+ }
12750
+ onKupDateChange(event, taskAction) {
12751
+ this.kupDateChange.emit({
12752
+ comp: this,
12753
+ id: this.rootElement.id,
12754
+ value: event,
12755
+ taskAction: taskAction,
12756
+ });
12757
+ }
12758
+ handleOnClick(nativeEvent) {
12759
+ switch (nativeEvent.rowType) {
12760
+ case KupPlannerGanttRowType.TASK:
12761
+ const taskAction = nativeEvent.phases
12762
+ ? KupPlannerTaskAction.onTaskClosing
12763
+ : KupPlannerTaskAction.onTaskOpening;
12764
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnTask).call(this, nativeEvent)) {
12765
+ this.onKupClick(nativeEvent, taskAction);
12766
+ }
12767
+ break;
12768
+ case KupPlannerGanttRowType.PHASE:
12769
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnPhase).call(this)) {
12770
+ this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
12771
+ }
12772
+ break;
12773
+ case KupPlannerGanttRowType.DETAIL:
12774
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnDetail).call(this)) {
12775
+ this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
12776
+ }
12777
+ break;
12778
+ }
12779
+ }
12780
+ handleOnContextMenu(event, row) {
12781
+ switch (row.rowType) {
12782
+ case KupPlannerGanttRowType.TASK:
12783
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnTask).call(this)) {
12784
+ this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
12785
+ }
12786
+ break;
12787
+ case KupPlannerGanttRowType.PHASE:
12788
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnPhase).call(this)) {
12789
+ this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
12790
+ }
12791
+ break;
12792
+ case KupPlannerGanttRowType.DETAIL:
12793
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnDetail).call(this)) {
12794
+ this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
12795
+ }
12796
+ break;
12797
+ }
12798
+ }
12799
+ handleOnSetDoubleView(checked) {
12800
+ var _a;
12801
+ __classPrivateFieldSet(this, _KupPlanner_showSecondaryDatesLocal, checked, "f");
12802
+ if ((_a = this.plannerProps) === null || _a === void 0 ? void 0 : _a.mainGantt) {
12803
+ this.plannerProps.mainGantt.showSecondaryDates = checked;
12804
+ }
12805
+ }
12806
+ handleOnDateChange(nativeEvent) {
12807
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_emitOnChangeEventsReceived).call(this, nativeEvent)) {
12808
+ if (nativeEvent.rowType != KupPlannerGanttRowType.DETAIL) {
12809
+ this.onKupDateChange(nativeEvent, KupPlannerTaskAction.onResize);
12810
+ }
12811
+ }
12812
+ }
12002
12813
  render() {
12003
- //console.log('kup-planner.tsx render');
12004
- return (h(Host, null, h("div", { id: componentWrapperId, style: { maxWidth: this.maxWidth } })));
12814
+ var _a;
12815
+ 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) => {
12816
+ if (e.key === 'Enter') {
12817
+ __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e);
12818
+ }
12819
+ }, 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) => {
12820
+ if (e.key === 'Enter') {
12821
+ __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e, true);
12822
+ }
12823
+ }, wrapperClass: "filter" })) : null));
12005
12824
  }
12006
12825
  disconnectedCallback() {
12007
12826
  __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.unregister(this);
12008
12827
  }
12009
12828
  get rootElement() { return this; }
12829
+ static get watchers() { return {
12830
+ "data": ["dataChanged"],
12831
+ "showSecondaryDates": ["showSecondaryDatesChanged"]
12832
+ }; }
12010
12833
  static get style() { return kupPlannerCss; }
12011
12834
  }, [1, "kup-planner", {
12012
12835
  "customStyle": [1, "custom-style"],
@@ -12016,6 +12839,7 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
12016
12839
  "detailColumns": [16],
12017
12840
  "detailDates": [16],
12018
12841
  "detailHeight": [2, "detail-height"],
12842
+ "detailIconCol": [1, "detail-icon-col"],
12019
12843
  "detailIdCol": [1, "detail-id-col"],
12020
12844
  "detailNameCol": [1, "detail-name-col"],
12021
12845
  "detailPrevDates": [16],
@@ -12025,6 +12849,7 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
12025
12849
  "phaseColumns": [16],
12026
12850
  "phaseColParDep": [1, "phase-col-par-dep"],
12027
12851
  "phaseDates": [16],
12852
+ "phaseIconCol": [1, "phase-icon-col"],
12028
12853
  "phaseIdCol": [1, "phase-id-col"],
12029
12854
  "phaseNameCol": [1, "phase-name-col"],
12030
12855
  "phasePrevDates": [16],
@@ -12032,6 +12857,7 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
12032
12857
  "taskColumns": [16],
12033
12858
  "taskDates": [16],
12034
12859
  "taskHeight": [2, "task-height"],
12860
+ "taskIconCol": [1, "task-icon-col"],
12035
12861
  "taskIdCol": [1, "task-id-col"],
12036
12862
  "taskNameCol": [1, "task-name-col"],
12037
12863
  "taskPrevDates": [16],
@@ -12042,7 +12868,7 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
12042
12868
  "setProps": [64],
12043
12869
  "addPhases": [64]
12044
12870
  }]);
12045
- _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(), _KupPlanner_lastOnChangeReceived = new WeakMap(), _KupPlanner_instances = new WeakSet(), _KupPlanner_renderReactPlannerElement = function _KupPlanner_renderReactPlannerElement() {
12871
+ _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() {
12046
12872
  var _a;
12047
12873
  (_a = __classPrivateFieldGet(this, _KupPlanner_rootPlanner, "f")) === null || _a === void 0 ? void 0 : _a.unmount();
12048
12874
  const componentWrapperElement = this.rootElement.shadowRoot.getElementById(componentWrapperId);
@@ -12054,7 +12880,13 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
12054
12880
  var _a;
12055
12881
  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) => {
12056
12882
  const datesSanitized = sanitizeAllDates(row.cells[this.taskDates[0]], row.cells[this.taskDates[1]], row.cells[this.taskPrevDates[0]], row.cells[this.taskPrevDates[1]]);
12057
- const valuesToShow = getValuesToShow(row, this.taskIdCol, this.taskNameCol, data.columns, this.taskColumns);
12883
+ const valuesToShow = getValuesToShow(row, this.taskIdCol, this.taskNameCol, data.columns, this.taskColumns, () => this.taskColumns.map((col) => col == this.taskDates[0]
12884
+ ? '#START#'
12885
+ : col == this.taskDates[1]
12886
+ ? '#END#'
12887
+ : getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
12888
+ let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.taskIconCol);
12889
+ let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.taskIconCol);
12058
12890
  let task = {
12059
12891
  taskRow: row,
12060
12892
  taskRowId: row.id,
@@ -12067,6 +12899,9 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
12067
12899
  type: 'project',
12068
12900
  valuesToShow: valuesToShow,
12069
12901
  rowType: KupPlannerGanttRowType.TASK,
12902
+ icon: iconUrl
12903
+ ? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
12904
+ : undefined,
12070
12905
  };
12071
12906
  return task;
12072
12907
  });
@@ -12079,6 +12914,7 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
12079
12914
  data.rows
12080
12915
  .filter((row) => isAtLeastOneDateValid(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]))
12081
12916
  .forEach((row) => {
12917
+ var _a, _b;
12082
12918
  const detailId = row.cells[this.detailIdCol].value;
12083
12919
  const detailNameId = row.cells[this.detailNameCol].value;
12084
12920
  const datesSanitized = sanitizeAllDates(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]);
@@ -12088,6 +12924,7 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
12088
12924
  detail = {
12089
12925
  id: detailId,
12090
12926
  name: detailNameId,
12927
+ detailRow: row,
12091
12928
  type: 'timeline',
12092
12929
  valuesToShow: valuesToShow,
12093
12930
  rowType: KupPlannerGanttRowType.DETAIL,
@@ -12095,15 +12932,20 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
12095
12932
  };
12096
12933
  details.push(detail);
12097
12934
  }
12935
+ let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.detailIconCol);
12936
+ let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.detailIconCol);
12098
12937
  detail.schedule.push({
12099
12938
  startDate: datesSanitized.dateValues[0],
12100
12939
  endDate: datesSanitized.dateValues[1],
12101
12940
  color: this.detailColorCol
12102
- ? row.cells[this.detailColorCol].value
12941
+ ? (_a = row.cells[this.detailColorCol].value) !== null && _a !== void 0 ? _a : '#D9D9D8'
12103
12942
  : '#D9D9D8',
12104
12943
  selectedColor: this.detailColorCol
12105
- ? row.cells[this.detailColorCol].value
12944
+ ? (_b = row.cells[this.detailColorCol].value) !== null && _b !== void 0 ? _b : '#D9D9D8'
12106
12945
  : '#D9D9D8',
12946
+ icon: iconUrl
12947
+ ? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
12948
+ : undefined,
12107
12949
  });
12108
12950
  });
12109
12951
  return details;
@@ -12113,9 +12955,6 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
12113
12955
  const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
12114
12956
  if (task)
12115
12957
  task.phases = undefined;
12116
- // this.plannerProps.mainGantt = JSON.parse(
12117
- // JSON.stringify(this.plannerProps.mainGantt)
12118
- // );
12119
12958
  this.plannerProps = Object.assign({}, this.plannerProps);
12120
12959
  }, _KupPlanner_handleOnClickOnTask = function _KupPlanner_handleOnClickOnTask(nativeEvent) {
12121
12960
  const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, nativeEvent.id);
@@ -12127,6 +12966,12 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
12127
12966
  return true;
12128
12967
  }, _KupPlanner_handleOnClickOnDetail = function _KupPlanner_handleOnClickOnDetail() {
12129
12968
  return true;
12969
+ }, _KupPlanner_handleOnContextMenuOnTask = function _KupPlanner_handleOnContextMenuOnTask() {
12970
+ return true;
12971
+ }, _KupPlanner_handleOnContextMenuOnPhase = function _KupPlanner_handleOnContextMenuOnPhase() {
12972
+ return true;
12973
+ }, _KupPlanner_handleOnContextMenuOnDetail = function _KupPlanner_handleOnContextMenuOnDetail() {
12974
+ return true;
12130
12975
  }, _KupPlanner_emitOnChangeEventsReceived = function _KupPlanner_emitOnChangeEventsReceived(nativeEvent) {
12131
12976
  let emitEvent = false;
12132
12977
  if (!__classPrivateFieldGet(this, _KupPlanner_lastOnChangeReceived, "f")) {
@@ -12138,6 +12983,69 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
12138
12983
  emitEvent = true;
12139
12984
  }
12140
12985
  return emitEvent;
12986
+ }, _KupPlanner_onFilter = function _KupPlanner_onFilter(e, isDetail) {
12987
+ const tempData = {
12988
+ columns: this.data.columns,
12989
+ rows: [],
12990
+ };
12991
+ const value = e.target.value;
12992
+ const data = isDetail ? this.detailData : this.data;
12993
+ const tempRows = [];
12994
+ for (let index = 0; index < data.rows.length; index++) {
12995
+ const row = data.rows[index];
12996
+ const cells = row.cells;
12997
+ for (let index = 0; index < data.columns.length; index++) {
12998
+ const column = data.columns[index];
12999
+ const cell = cells[column.name];
13000
+ if (cell) {
13001
+ const dValue = getCellValueForDisplay(data.columns[index], cell);
13002
+ const found = !!(dValue.toLowerCase().indexOf(value.toLowerCase()) > -1);
13003
+ if (found) {
13004
+ tempRows.push({ row, weight: index });
13005
+ break;
13006
+ }
13007
+ }
13008
+ }
13009
+ }
13010
+ tempRows
13011
+ .sort((a, b) => a.weight - b.weight)
13012
+ .forEach((tempRow) => {
13013
+ tempData.rows.push(tempRow.row);
13014
+ });
13015
+ const newGantt = isDetail
13016
+ ? {
13017
+ secondaryGantt: Object.assign(Object.assign({}, this.plannerProps.secondaryGantt), { items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toDetails).call(this, tempData) }),
13018
+ }
13019
+ : {
13020
+ mainGantt: Object.assign(Object.assign({}, this.plannerProps.mainGantt), { items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toTasks).call(this, tempData) }),
13021
+ };
13022
+ this.plannerProps = Object.assign(Object.assign({}, this.plannerProps), newGantt);
13023
+ }, _KupPlanner_getIconUrl = function _KupPlanner_getIconUrl(row, columnName) {
13024
+ var _a;
13025
+ let iconUrl = undefined;
13026
+ if (columnName) {
13027
+ const iconCell = row.cells[columnName];
13028
+ let icon = (_a = iconCell === null || iconCell === void 0 ? void 0 : iconCell.data) === null || _a === void 0 ? void 0 : _a.resource;
13029
+ if (!icon) {
13030
+ icon = iconCell.value;
13031
+ }
13032
+ if (icon) {
13033
+ iconUrl = getAssetPath('./assets/svg/' + icon + '.svg');
13034
+ }
13035
+ }
13036
+ return iconUrl;
13037
+ }, _KupPlanner_getIconColor = function _KupPlanner_getIconColor(row, columnName) {
13038
+ var _a;
13039
+ let iconColor = undefined;
13040
+ if (columnName) {
13041
+ const iconCell = row.cells[columnName];
13042
+ iconColor = (_a = iconCell === null || iconCell === void 0 ? void 0 : iconCell.data) === null || _a === void 0 ? void 0 : _a.color;
13043
+ if (iconColor) {
13044
+ iconColor =
13045
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.colorCheck(iconColor).hexColor;
13046
+ }
13047
+ }
13048
+ return iconColor;
12141
13049
  };
12142
13050
  function defineCustomElement$1() {
12143
13051
  if (typeof customElements === "undefined") {