@sme.up/ketchup 7.5.0-SNAPSHOT → 8.0.1

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 (166) hide show
  1. package/dist/cjs/{component-72a5b626.js → component-85c2bd4d.js} +1 -1
  2. package/dist/cjs/{f-button-a508a0a1.js → f-button-c0ede055.js} +1 -1
  3. package/dist/cjs/{f-cell-52d724f5.js → f-cell-1c17dbac.js} +15 -8
  4. package/dist/cjs/{f-chip-cbb70aed.js → f-chip-bace36bb.js} +2 -2
  5. package/dist/cjs/{f-image-510563ed.js → f-image-22174590.js} +1 -1
  6. package/dist/cjs/{f-paginator-utils-ff531caa.js → f-paginator-utils-e21e1f06.js} +2 -2
  7. package/dist/cjs/{f-text-field-d17e5aa0.js → f-text-field-503f2bb0.js} +82 -8
  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 +1 -1
  10. package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
  11. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +851 -824
  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 +2 -3
  16. package/dist/cjs/kup-dash_2.cjs.entry.js +1 -1
  17. package/dist/cjs/kup-dashboard.cjs.entry.js +7 -7
  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 +7 -18
  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-9e1680dd.js → kup-manager-b994cf71.js} +164 -16
  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 +1041 -192
  30. package/dist/cjs/kup-probe.cjs.entry.js +1 -1
  31. package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
  32. package/dist/cjs/kup-snackbar.cjs.entry.js +12 -4
  33. package/dist/cjs/loader.cjs.js +1 -1
  34. package/dist/cjs/{tslib.es6-0ee02c67.js → tslib.es6-386654de.js} +9 -5
  35. package/dist/collection/assets/data-table.js +44 -0
  36. package/dist/collection/components/kup-chip/kup-chip.js +4 -3
  37. package/dist/collection/components/kup-dash-list/kup-dash-list.js +1 -3
  38. package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
  39. package/dist/collection/components/kup-data-table/kup-data-table.js +5 -16
  40. package/dist/collection/components/kup-echart/kup-echart-declarations.js +2 -0
  41. package/dist/collection/components/kup-echart/kup-echart.js +23 -8
  42. package/dist/collection/components/kup-family-tree/kup-family-tree.js +4 -15
  43. package/dist/collection/components/kup-planner/kup-planner-declarations.js +1 -0
  44. package/dist/collection/components/kup-planner/kup-planner.css +1 -3
  45. package/dist/collection/components/kup-planner/kup-planner.js +302 -72
  46. package/dist/collection/components/kup-snackbar/kup-snackbar.css +4 -3
  47. package/dist/collection/components/kup-snackbar/kup-snackbar.js +27 -0
  48. package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +3 -0
  49. package/dist/collection/components/kup-text-field/kup-text-field.js +109 -10
  50. package/dist/collection/components/kup-tree/kup-tree.js +66 -67
  51. package/dist/collection/f-components/f-cell/f-cell.js +12 -5
  52. package/dist/collection/f-components/f-text-field/f-text-field.js +80 -6
  53. package/dist/collection/managers/kup-manager/kup-manager.js +18 -0
  54. package/dist/collection/managers/kup-math/kup-math.js +85 -4
  55. package/dist/collection/utils/utils.js +1 -10
  56. package/dist/components/kup-autocomplete2.js +648 -386
  57. package/dist/components/kup-dash-list.js +2 -3
  58. package/dist/components/kup-dashboard.js +1 -1
  59. package/dist/components/kup-data-table.js +1 -1
  60. package/dist/components/kup-date-picker.js +1 -1
  61. package/dist/components/kup-dialog.js +1 -1
  62. package/dist/components/kup-dropdown-button.js +1 -1
  63. package/dist/components/kup-echart2.js +25 -8
  64. package/dist/components/kup-family-tree.js +5 -16
  65. package/dist/components/kup-form.js +1 -1
  66. package/dist/components/kup-gauge.js +1 -1
  67. package/dist/components/kup-image-list.js +1 -1
  68. package/dist/components/kup-image.js +1 -1
  69. package/dist/components/kup-list.js +1 -1
  70. package/dist/components/kup-magic-box.js +1 -1
  71. package/dist/components/kup-numeric-picker.js +1 -1
  72. package/dist/components/kup-planner.js +1041 -189
  73. package/dist/components/kup-snackbar.js +9 -1
  74. package/dist/esm/{component-b1bedf1d.js → component-120651a0.js} +1 -1
  75. package/dist/esm/{f-button-b7f77b26.js → f-button-c377973d.js} +1 -1
  76. package/dist/esm/{f-cell-dc3beffe.js → f-cell-e5a98bc8.js} +15 -8
  77. package/dist/esm/{f-chip-0a678211.js → f-chip-c8a18c48.js} +2 -2
  78. package/dist/esm/{f-image-f84dbd7c.js → f-image-5cbdf39d.js} +1 -1
  79. package/dist/esm/{f-paginator-utils-52902bd6.js → f-paginator-utils-a1dab059.js} +2 -2
  80. package/dist/esm/{f-text-field-7dd143be.js → f-text-field-dafb7c8b.js} +82 -8
  81. package/dist/esm/{f-text-field-mdc-d42d3f9e.js → f-text-field-mdc-cee583ea.js} +2 -2
  82. package/dist/esm/ketchup.js +1 -1
  83. package/dist/esm/kup-accordion.entry.js +4 -4
  84. package/dist/esm/kup-autocomplete_27.entry.js +851 -824
  85. package/dist/esm/kup-box.entry.js +10 -10
  86. package/dist/esm/kup-calendar.entry.js +5 -5
  87. package/dist/esm/kup-cell.entry.js +5 -5
  88. package/dist/esm/kup-dash-list.entry.js +2 -3
  89. package/dist/esm/kup-dash_2.entry.js +1 -1
  90. package/dist/esm/kup-dashboard.entry.js +7 -7
  91. package/dist/esm/kup-drawer.entry.js +1 -1
  92. package/dist/esm/kup-echart.entry.js +25 -8
  93. package/dist/esm/kup-family-tree.entry.js +7 -18
  94. package/dist/esm/kup-iframe.entry.js +1 -1
  95. package/dist/esm/kup-image-list.entry.js +8 -8
  96. package/dist/esm/kup-lazy.entry.js +1 -1
  97. package/dist/esm/kup-magic-box.entry.js +2 -2
  98. package/dist/esm/{kup-manager-a5ab58a0.js → kup-manager-3594cde8.js} +163 -16
  99. package/dist/esm/kup-nav-bar.entry.js +1 -1
  100. package/dist/esm/kup-numeric-picker.entry.js +5 -5
  101. package/dist/esm/kup-photo-frame.entry.js +1 -1
  102. package/dist/esm/kup-planner.entry.js +1042 -193
  103. package/dist/esm/kup-probe.entry.js +1 -1
  104. package/dist/esm/kup-qlik.entry.js +1 -1
  105. package/dist/esm/kup-snackbar.entry.js +12 -4
  106. package/dist/esm/loader.js +1 -1
  107. package/dist/esm/{tslib.es6-3eea2234.js → tslib.es6-8c2af864.js} +9 -5
  108. package/dist/ketchup/ketchup.esm.js +1 -1
  109. package/dist/ketchup/{p-98ff4101.entry.js → p-017418e7.entry.js} +1 -1
  110. package/dist/ketchup/{p-81605f08.js → p-10d84b1b.js} +1 -1
  111. package/dist/ketchup/{p-871cfe60.entry.js → p-22e72f06.entry.js} +1 -1
  112. package/dist/ketchup/{p-a203f78b.js → p-27a56c87.js} +1 -1
  113. package/dist/ketchup/{p-7065b172.js → p-2d32e3cd.js} +1 -1
  114. package/dist/ketchup/{p-a122b8d3.entry.js → p-31abf4b6.entry.js} +1 -1
  115. package/dist/ketchup/{p-beb0907a.entry.js → p-37ada0f0.entry.js} +1 -1
  116. package/dist/ketchup/p-38f16697.entry.js +9 -0
  117. package/dist/ketchup/{p-69f3b9da.js → p-4638fbff.js} +1 -1
  118. package/dist/ketchup/{p-00fc0f80.entry.js → p-473d2bea.entry.js} +1 -1
  119. package/dist/ketchup/{p-166257d0.entry.js → p-4c56e199.entry.js} +1 -1
  120. package/dist/ketchup/p-5205286a.entry.js +25 -0
  121. package/dist/ketchup/p-61319cfa.js +1 -0
  122. package/dist/ketchup/{p-de34eb56.js → p-6762d447.js} +1 -1
  123. package/dist/ketchup/{p-7040cab7.entry.js → p-6c726886.entry.js} +1 -1
  124. package/dist/ketchup/p-7be5ef32.entry.js +1 -0
  125. package/dist/ketchup/{p-e92d1972.entry.js → p-7f4f5f0f.entry.js} +1 -1
  126. package/dist/ketchup/p-7f59211b.js +1 -0
  127. package/dist/ketchup/{p-78d1fc60.entry.js → p-80815edf.entry.js} +1 -1
  128. package/dist/ketchup/p-8b248655.js +1 -0
  129. package/dist/ketchup/{p-a32cc181.entry.js → p-9fc6a9a8.entry.js} +1 -1
  130. package/dist/ketchup/{p-4fd6c34c.js → p-acaa171f.js} +3 -3
  131. package/dist/ketchup/{p-6022c951.entry.js → p-afff7a6e.entry.js} +1 -1
  132. package/dist/ketchup/{p-d315f7fa.entry.js → p-b718af72.entry.js} +1 -1
  133. package/dist/ketchup/p-bf4a881b.js +1 -0
  134. package/dist/ketchup/{p-c797ab39.entry.js → p-ce5b6ce7.entry.js} +1 -1
  135. package/dist/ketchup/p-cf322853.entry.js +1 -0
  136. package/dist/ketchup/{p-d2670436.entry.js → p-d1164680.entry.js} +1 -1
  137. package/dist/ketchup/{p-efb80719.entry.js → p-d4eb9a76.entry.js} +1 -1
  138. package/dist/ketchup/p-d76be079.entry.js +1 -0
  139. package/dist/ketchup/{p-d711e9ae.entry.js → p-ed7e118e.entry.js} +1 -1
  140. package/dist/ketchup/{p-f158836b.entry.js → p-ef0b4f19.entry.js} +2 -2
  141. package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
  142. package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +2 -0
  143. package/dist/types/components/kup-planner/kup-planner-declarations.d.ts +15 -2
  144. package/dist/types/components/kup-planner/kup-planner.d.ts +36 -11
  145. package/dist/types/components/kup-snackbar/kup-snackbar.d.ts +5 -0
  146. package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +3 -0
  147. package/dist/types/components/kup-text-field/kup-text-field.d.ts +20 -2
  148. package/dist/types/components/kup-tree/kup-tree.d.ts +1 -5
  149. package/dist/types/components.d.ts +72 -4
  150. package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +3 -0
  151. package/dist/types/managers/kup-language/kup-language-declarations.d.ts +1 -1
  152. package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +1 -0
  153. package/dist/types/managers/kup-manager/kup-manager.d.ts +7 -0
  154. package/dist/types/managers/kup-math/kup-math-declarations.d.ts +6 -0
  155. package/dist/types/managers/kup-math/kup-math.d.ts +26 -2
  156. package/dist/types/utils/utils.d.ts +0 -1
  157. package/package.json +6 -18
  158. package/dist/ketchup/p-28efed63.js +0 -1
  159. package/dist/ketchup/p-3ae1409f.entry.js +0 -1
  160. package/dist/ketchup/p-71cb80ac.entry.js +0 -9
  161. package/dist/ketchup/p-79b0730b.js +0 -15
  162. package/dist/ketchup/p-8d0e6825.entry.js +0 -1
  163. package/dist/ketchup/p-9ae47a0d.entry.js +0 -1
  164. package/dist/ketchup/p-c5c6a2fb.js +0 -1
  165. package/dist/ketchup/p-d1e3573f.js +0 -1
  166. package/dist/ketchup/p-f69a6d89.entry.js +0 -10
@@ -203,7 +203,6 @@
203
203
  fill: #fff;
204
204
  text-anchor: middle;
205
205
  font-weight: lighter;
206
- dominant-baseline: central;
207
206
  -webkit-touch-callout: none;
208
207
  -webkit-user-select: none;
209
208
  -moz-user-select: none;
@@ -219,8 +218,7 @@
219
218
  -moz-user-select: none;
220
219
  user-select: none;
221
220
  pointer-events: none;
222
- }
223
-
221
+ }
224
222
  ._11iN9 {
225
223
  background: #efefef;
226
224
  border-radius: 8px;
@@ -1,10 +1,3 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f)
3
- throw new TypeError("Private accessor was defined without a getter");
4
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
5
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
6
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
7
- };
8
1
  var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
9
2
  if (kind === "m")
10
3
  throw new TypeError("Private method is not writable");
@@ -14,8 +7,15 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
14
7
  throw new TypeError("Cannot write private member to an object whose class did not declare it");
15
8
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16
9
  };
17
- var _KupPlanner_instances, _KupPlanner_kupManager, _KupPlanner_rootPlanner, _KupPlanner_lastOnChangeReceived, _KupPlanner_renderReactPlannerElement, _KupPlanner_toTasks, _KupPlanner_toDetails, _KupPlanner_getTask, _KupPlanner_removePhases, _KupPlanner_handleOnClickOnTask, _KupPlanner_handleOnClickOnPhase, _KupPlanner_handleOnClickOnDetail, _KupPlanner_emitOnChangeEventsReceived, _KupPlanner_onFilter;
18
- import { forceUpdate, h, Host, } from '@stencil/core';
10
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
11
+ if (kind === "a" && !f)
12
+ throw new TypeError("Private accessor was defined without a getter");
13
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
14
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
15
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
16
+ };
17
+ var _KupPlanner_instances, _KupPlanner_kupManager, _KupPlanner_lastOnChangeReceived, _KupPlanner_rootPlanner, _KupPlanner_phases, _KupPlanner_showSecondaryDatesLocal, _KupPlanner_renderReactPlannerElement, _KupPlanner_toTasks, _KupPlanner_toDetails, _KupPlanner_getTask, _KupPlanner_removePhases, _KupPlanner_handleOnClickOnTask, _KupPlanner_handleOnClickOnPhase, _KupPlanner_handleOnClickOnDetail, _KupPlanner_handleOnContextMenuOnTask, _KupPlanner_handleOnContextMenuOnPhase, _KupPlanner_handleOnContextMenuOnDetail, _KupPlanner_emitOnChangeEventsReceived, _KupPlanner_onFilter, _KupPlanner_getIconUrl, _KupPlanner_getIconColor;
18
+ import { forceUpdate, getAssetPath, h, Host, } from '@stencil/core';
19
19
  import { kupManagerInstance, } from '../../managers/kup-manager/kup-manager';
20
20
  import { defaultStylingOptions, KupPlannerLastOnChangeReceived, KupPlannerProps, KupPlannerTaskAction, KupPlannerGanttRowType, } from './kup-planner-declarations';
21
21
  import { getProps, setProps } from '../../utils/utils';
@@ -36,9 +36,11 @@ export class KupPlanner {
36
36
  /* I n t e r n a l V a r i a b l e s */
37
37
  /*-------------------------------------------------*/
38
38
  _KupPlanner_kupManager.set(this, kupManagerInstance());
39
- _KupPlanner_rootPlanner.set(this, void 0);
40
39
  _KupPlanner_lastOnChangeReceived.set(this, void 0);
41
- this.plannerProps = undefined;
40
+ _KupPlanner_rootPlanner.set(this, void 0);
41
+ _KupPlanner_phases.set(this, {});
42
+ // no re-render
43
+ _KupPlanner_showSecondaryDatesLocal.set(this, false);
42
44
  this.customStyle = '';
43
45
  this.data = undefined;
44
46
  this.detailData = undefined;
@@ -46,6 +48,7 @@ export class KupPlanner {
46
48
  this.detailColumns = undefined;
47
49
  this.detailDates = undefined;
48
50
  this.detailHeight = undefined;
51
+ this.detailIconCol = undefined;
49
52
  this.detailIdCol = undefined;
50
53
  this.detailNameCol = undefined;
51
54
  this.detailPrevDates = undefined;
@@ -55,6 +58,7 @@ export class KupPlanner {
55
58
  this.phaseColumns = undefined;
56
59
  this.phaseColParDep = undefined;
57
60
  this.phaseDates = undefined;
61
+ this.phaseIconCol = undefined;
58
62
  this.phaseIdCol = undefined;
59
63
  this.phaseNameCol = undefined;
60
64
  this.phasePrevDates = undefined;
@@ -62,26 +66,23 @@ export class KupPlanner {
62
66
  this.taskColumns = undefined;
63
67
  this.taskDates = undefined;
64
68
  this.taskHeight = undefined;
69
+ this.taskIconCol = undefined;
65
70
  this.taskIdCol = undefined;
66
71
  this.taskNameCol = undefined;
67
72
  this.taskPrevDates = undefined;
68
73
  this.titleMess = undefined;
74
+ this.plannerProps = undefined;
69
75
  }
70
- onKupClick(event, taskAction) {
71
- this.kupClick.emit({
72
- comp: this,
73
- id: this.rootElement.id,
74
- value: event,
75
- taskAction: taskAction,
76
- });
76
+ dataChanged() {
77
+ __classPrivateFieldSet(this, _KupPlanner_phases, {}, "f");
77
78
  }
78
- onKupDateChange(event, taskAction) {
79
- this.kupDateChange.emit({
80
- comp: this,
81
- id: this.rootElement.id,
82
- value: event,
83
- taskAction: taskAction,
84
- });
79
+ showSecondaryDatesChanged() {
80
+ var _a;
81
+ __classPrivateFieldSet(this, _KupPlanner_showSecondaryDatesLocal, this.showSecondaryDates, "f");
82
+ if ((_a = this.plannerProps) === null || _a === void 0 ? void 0 : _a.mainGantt) {
83
+ this.plannerProps.mainGantt.showSecondaryDates =
84
+ this.showSecondaryDates;
85
+ }
85
86
  }
86
87
  /*-------------------------------------------------*/
87
88
  /* P u b l i c M e t h o d s */
@@ -116,6 +117,7 @@ export class KupPlanner {
116
117
  var _a;
117
118
  const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
118
119
  if (task) {
120
+ __classPrivateFieldGet(this, _KupPlanner_phases, "f")[taskId] = data;
119
121
  task.phases = (_a = data.rows) === null || _a === void 0 ? void 0 : _a.filter((row) => isAtLeastOneDateValid(row.cells[this.phaseDates[0]], row.cells[this.phaseDates[1]])).map((row) => {
120
122
  const datesSanitized = sanitizeAllDates(row.cells[this.phaseDates[0]], row.cells[this.phaseDates[1]], row.cells[this.phasePrevDates[0]], row.cells[this.phasePrevDates[1]]);
121
123
  const valuesToShow = getValuesToShow(row, this.phaseIdCol, this.phaseNameCol, data.columns, this.phaseColumns, () => this.phaseColumns.map((col) => col == this.phaseDates[0]
@@ -123,6 +125,8 @@ export class KupPlanner {
123
125
  : col == this.phaseDates[1]
124
126
  ? '#END#'
125
127
  : getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
128
+ let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.phaseIconCol);
129
+ let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.phaseIconCol);
126
130
  let phase = {
127
131
  taskRow: task.taskRow,
128
132
  phaseRow: row,
@@ -139,48 +143,22 @@ export class KupPlanner {
139
143
  selectedColor: row.cells[this.phaseColorCol].value,
140
144
  valuesToShow: valuesToShow,
141
145
  rowType: KupPlannerGanttRowType.PHASE,
146
+ icon: iconUrl
147
+ ? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
148
+ : undefined,
142
149
  };
143
150
  return phase;
144
151
  });
145
152
  }
146
153
  this.plannerProps = Object.assign({}, this.plannerProps);
147
154
  }
148
- handleOnClick(nativeEvent) {
149
- console.log('kup-planner.handleOnClick', nativeEvent);
150
- switch (nativeEvent.rowType) {
151
- case KupPlannerGanttRowType.TASK:
152
- const taskAction = nativeEvent.phases
153
- ? KupPlannerTaskAction.onTaskClosing
154
- : KupPlannerTaskAction.onTaskOpening;
155
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnTask).call(this, nativeEvent)) {
156
- this.onKupClick(nativeEvent, taskAction);
157
- }
158
- break;
159
- case KupPlannerGanttRowType.PHASE:
160
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnPhase).call(this)) {
161
- this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
162
- }
163
- break;
164
- case KupPlannerGanttRowType.DETAIL:
165
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnDetail).call(this)) {
166
- this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
167
- }
168
- break;
169
- }
170
- }
171
- handleOnDateChange(nativeEvent) {
172
- if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_emitOnChangeEventsReceived).call(this, nativeEvent)) {
173
- if (nativeEvent.rowType != KupPlannerGanttRowType.DETAIL) {
174
- console.log('kup-planner.handleOnDateChange', nativeEvent);
175
- this.onKupDateChange(nativeEvent, KupPlannerTaskAction.onResize);
176
- }
177
- }
178
- }
155
+ //---- Lifecycle hooks ----
179
156
  componentWillLoad() {
180
157
  __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logLoad(this, false);
181
158
  __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.register(this);
182
159
  }
183
160
  componentDidLoad() {
161
+ __classPrivateFieldSet(this, _KupPlanner_showSecondaryDatesLocal, this.showSecondaryDates, "f");
184
162
  let details = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toDetails).call(this, this.detailData);
185
163
  if (details && details.length == 0) {
186
164
  details = undefined;
@@ -199,8 +177,9 @@ export class KupPlanner {
199
177
  filter: mainFilter,
200
178
  hideLabel: true,
201
179
  ganttHeight: this.taskHeight,
202
- showSecondaryDates: this.showSecondaryDates,
180
+ showSecondaryDates: __classPrivateFieldGet(this, _KupPlanner_showSecondaryDatesLocal, "f"),
203
181
  onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
182
+ onContextMenu: (event, row) => this.handleOnContextMenu(event, row),
204
183
  onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
205
184
  },
206
185
  secondaryGantt: details
@@ -212,9 +191,11 @@ export class KupPlanner {
212
191
  hideLabel: true,
213
192
  ganttHeight: this.detailHeight,
214
193
  onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
194
+ onContextMenu: (event, row) => this.handleOnContextMenu(event, row),
215
195
  onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
216
196
  }
217
197
  : undefined,
198
+ onSetDoubleView: (checked) => this.handleOnSetDoubleView(checked),
218
199
  };
219
200
  __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_renderReactPlannerElement).call(this);
220
201
  this.kupReady.emit({
@@ -230,9 +211,116 @@ export class KupPlanner {
230
211
  componentDidRender() {
231
212
  __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logRender(this, true);
232
213
  }
214
+ onKupClick(event, taskAction) {
215
+ this.kupClick.emit({
216
+ comp: this,
217
+ id: this.rootElement.id,
218
+ value: event,
219
+ taskAction: taskAction,
220
+ });
221
+ }
222
+ onKupContextMenu(event, ganttRow, taskAction) {
223
+ let row;
224
+ let cell;
225
+ let column;
226
+ switch (ganttRow.type) {
227
+ case 'project': {
228
+ row = ganttRow.taskRow;
229
+ cell = row.cells[this.taskIdCol];
230
+ column = this.data.columns[this.taskIdCol];
231
+ break;
232
+ }
233
+ case 'task': {
234
+ row = ganttRow.phaseRow;
235
+ cell = row.cells[this.phaseIdCol];
236
+ //column = this.data.columns[this.taskIdCol];
237
+ break;
238
+ }
239
+ case 'timeline': {
240
+ row = ganttRow.detailRow;
241
+ cell = row.cells[this.detailIdCol];
242
+ column = this.data.columns[this.detailIdCol];
243
+ break;
244
+ }
245
+ }
246
+ this.kupContextMenu.emit({
247
+ comp: this,
248
+ id: this.rootElement.id,
249
+ value: ganttRow,
250
+ taskAction: taskAction,
251
+ details: {
252
+ cell: cell,
253
+ column: column,
254
+ originalEvent: event,
255
+ row: row,
256
+ },
257
+ });
258
+ }
259
+ onKupDateChange(event, taskAction) {
260
+ this.kupDateChange.emit({
261
+ comp: this,
262
+ id: this.rootElement.id,
263
+ value: event,
264
+ taskAction: taskAction,
265
+ });
266
+ }
267
+ handleOnClick(nativeEvent) {
268
+ switch (nativeEvent.rowType) {
269
+ case KupPlannerGanttRowType.TASK:
270
+ const taskAction = nativeEvent.phases
271
+ ? KupPlannerTaskAction.onTaskClosing
272
+ : KupPlannerTaskAction.onTaskOpening;
273
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnTask).call(this, nativeEvent)) {
274
+ this.onKupClick(nativeEvent, taskAction);
275
+ }
276
+ break;
277
+ case KupPlannerGanttRowType.PHASE:
278
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnPhase).call(this)) {
279
+ this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
280
+ }
281
+ break;
282
+ case KupPlannerGanttRowType.DETAIL:
283
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnDetail).call(this)) {
284
+ this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
285
+ }
286
+ break;
287
+ }
288
+ }
289
+ handleOnContextMenu(event, row) {
290
+ switch (row.rowType) {
291
+ case KupPlannerGanttRowType.TASK:
292
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnTask).call(this)) {
293
+ this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
294
+ }
295
+ break;
296
+ case KupPlannerGanttRowType.PHASE:
297
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnPhase).call(this)) {
298
+ this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
299
+ }
300
+ break;
301
+ case KupPlannerGanttRowType.DETAIL:
302
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnDetail).call(this)) {
303
+ this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
304
+ }
305
+ break;
306
+ }
307
+ }
308
+ handleOnSetDoubleView(checked) {
309
+ var _a;
310
+ __classPrivateFieldSet(this, _KupPlanner_showSecondaryDatesLocal, checked, "f");
311
+ if ((_a = this.plannerProps) === null || _a === void 0 ? void 0 : _a.mainGantt) {
312
+ this.plannerProps.mainGantt.showSecondaryDates = checked;
313
+ }
314
+ }
315
+ handleOnDateChange(nativeEvent) {
316
+ if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_emitOnChangeEventsReceived).call(this, nativeEvent)) {
317
+ if (nativeEvent.rowType != KupPlannerGanttRowType.DETAIL) {
318
+ this.onKupDateChange(nativeEvent, KupPlannerTaskAction.onResize);
319
+ }
320
+ }
321
+ }
233
322
  render() {
234
323
  var _a;
235
- //console.log('kup-planner.tsx render');
236
324
  return (h(Host, null, h("style", null, __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId, style: { maxWidth: this.maxWidth } }), h(FTextField, { icon: KupThemeIconValues.SEARCH, id: "main-filter", label: __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), onKeyDown: (e) => {
237
325
  if (e.key === 'Enter') {
238
326
  __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e);
@@ -406,6 +494,26 @@ export class KupPlanner {
406
494
  "attribute": "detail-height",
407
495
  "reflect": false
408
496
  },
497
+ "detailIconCol": {
498
+ "type": "string",
499
+ "mutable": false,
500
+ "complexType": {
501
+ "original": "string",
502
+ "resolved": "string",
503
+ "references": {}
504
+ },
505
+ "required": false,
506
+ "optional": false,
507
+ "docs": {
508
+ "tags": [{
509
+ "name": "default",
510
+ "text": "null"
511
+ }],
512
+ "text": "Column containing icon name to show, for detail"
513
+ },
514
+ "attribute": "detail-icon-col",
515
+ "reflect": false
516
+ },
409
517
  "detailIdCol": {
410
518
  "type": "string",
411
519
  "mutable": false,
@@ -461,7 +569,7 @@ export class KupPlanner {
461
569
  "name": "default",
462
570
  "text": "null"
463
571
  }],
464
- "text": "Columns containing fForecast detail duration, from (firstDate) to (secondDate)"
572
+ "text": "Columns containing forecast detail duration, from (firstDate) to (secondDate)"
465
573
  }
466
574
  },
467
575
  "listCellWidth": {
@@ -582,6 +690,26 @@ export class KupPlanner {
582
690
  "text": "Columns containing phase duration, from (firstDate) to (secondDate)"
583
691
  }
584
692
  },
693
+ "phaseIconCol": {
694
+ "type": "string",
695
+ "mutable": false,
696
+ "complexType": {
697
+ "original": "string",
698
+ "resolved": "string",
699
+ "references": {}
700
+ },
701
+ "required": false,
702
+ "optional": false,
703
+ "docs": {
704
+ "tags": [{
705
+ "name": "default",
706
+ "text": "null"
707
+ }],
708
+ "text": "Column containing icon name to show, for phase"
709
+ },
710
+ "attribute": "phase-icon-col",
711
+ "reflect": false
712
+ },
585
713
  "phaseIdCol": {
586
714
  "type": "string",
587
715
  "mutable": false,
@@ -717,6 +845,26 @@ export class KupPlanner {
717
845
  "attribute": "task-height",
718
846
  "reflect": false
719
847
  },
848
+ "taskIconCol": {
849
+ "type": "string",
850
+ "mutable": false,
851
+ "complexType": {
852
+ "original": "string",
853
+ "resolved": "string",
854
+ "references": {}
855
+ },
856
+ "required": false,
857
+ "optional": false,
858
+ "docs": {
859
+ "tags": [{
860
+ "name": "default",
861
+ "text": "null"
862
+ }],
863
+ "text": "Column containing icon name to show, for task"
864
+ },
865
+ "attribute": "task-icon-col",
866
+ "reflect": false
867
+ },
720
868
  "taskIdCol": {
721
869
  "type": "string",
722
870
  "mutable": false,
@@ -863,6 +1011,26 @@ export class KupPlanner {
863
1011
  }
864
1012
  }
865
1013
  }
1014
+ }, {
1015
+ "method": "kupContextMenu",
1016
+ "name": "kup-planner-contextmenu",
1017
+ "bubbles": true,
1018
+ "cancelable": false,
1019
+ "composed": true,
1020
+ "docs": {
1021
+ "tags": [],
1022
+ "text": "Generic right click event on planner."
1023
+ },
1024
+ "complexType": {
1025
+ "original": "KupPlannerClickEventPayload",
1026
+ "resolved": "KupPlannerClickEventPayload",
1027
+ "references": {
1028
+ "KupPlannerClickEventPayload": {
1029
+ "location": "import",
1030
+ "path": "./kup-planner-declarations"
1031
+ }
1032
+ }
1033
+ }
866
1034
  }];
867
1035
  }
868
1036
  static get methods() {
@@ -993,8 +1161,17 @@ export class KupPlanner {
993
1161
  };
994
1162
  }
995
1163
  static get elementRef() { return "rootElement"; }
1164
+ static get watchers() {
1165
+ return [{
1166
+ "propName": "data",
1167
+ "methodName": "dataChanged"
1168
+ }, {
1169
+ "propName": "showSecondaryDates",
1170
+ "methodName": "showSecondaryDatesChanged"
1171
+ }];
1172
+ }
996
1173
  }
997
- _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(), _KupPlanner_lastOnChangeReceived = new WeakMap(), _KupPlanner_instances = new WeakSet(), _KupPlanner_renderReactPlannerElement = function _KupPlanner_renderReactPlannerElement() {
1174
+ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_lastOnChangeReceived = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(), _KupPlanner_phases = new WeakMap(), _KupPlanner_showSecondaryDatesLocal = new WeakMap(), _KupPlanner_instances = new WeakSet(), _KupPlanner_renderReactPlannerElement = function _KupPlanner_renderReactPlannerElement() {
998
1175
  var _a;
999
1176
  (_a = __classPrivateFieldGet(this, _KupPlanner_rootPlanner, "f")) === null || _a === void 0 ? void 0 : _a.unmount();
1000
1177
  const componentWrapperElement = this.rootElement.shadowRoot.getElementById(componentWrapperId);
@@ -1006,7 +1183,13 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
1006
1183
  var _a;
1007
1184
  let tasks = (_a = data.rows) === null || _a === void 0 ? void 0 : _a.filter((row) => isAtLeastOneDateValid(row.cells[this.taskDates[0]], row.cells[this.taskDates[1]])).map((row) => {
1008
1185
  const datesSanitized = sanitizeAllDates(row.cells[this.taskDates[0]], row.cells[this.taskDates[1]], row.cells[this.taskPrevDates[0]], row.cells[this.taskPrevDates[1]]);
1009
- const valuesToShow = getValuesToShow(row, this.taskIdCol, this.taskNameCol, data.columns, this.taskColumns);
1186
+ const valuesToShow = getValuesToShow(row, this.taskIdCol, this.taskNameCol, data.columns, this.taskColumns, () => this.taskColumns.map((col) => col == this.taskDates[0]
1187
+ ? '#START#'
1188
+ : col == this.taskDates[1]
1189
+ ? '#END#'
1190
+ : getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
1191
+ let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.taskIconCol);
1192
+ let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.taskIconCol);
1010
1193
  let task = {
1011
1194
  taskRow: row,
1012
1195
  taskRowId: row.id,
@@ -1019,6 +1202,9 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
1019
1202
  type: 'project',
1020
1203
  valuesToShow: valuesToShow,
1021
1204
  rowType: KupPlannerGanttRowType.TASK,
1205
+ icon: iconUrl
1206
+ ? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
1207
+ : undefined,
1022
1208
  };
1023
1209
  return task;
1024
1210
  });
@@ -1041,6 +1227,7 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
1041
1227
  detail = {
1042
1228
  id: detailId,
1043
1229
  name: detailNameId,
1230
+ detailRow: row,
1044
1231
  type: 'timeline',
1045
1232
  valuesToShow: valuesToShow,
1046
1233
  rowType: KupPlannerGanttRowType.DETAIL,
@@ -1048,6 +1235,8 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
1048
1235
  };
1049
1236
  details.push(detail);
1050
1237
  }
1238
+ let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.detailIconCol);
1239
+ let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.detailIconCol);
1051
1240
  detail.schedule.push({
1052
1241
  startDate: datesSanitized.dateValues[0],
1053
1242
  endDate: datesSanitized.dateValues[1],
@@ -1057,6 +1246,9 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
1057
1246
  selectedColor: this.detailColorCol
1058
1247
  ? (_b = row.cells[this.detailColorCol].value) !== null && _b !== void 0 ? _b : '#D9D9D8'
1059
1248
  : '#D9D9D8',
1249
+ icon: iconUrl
1250
+ ? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
1251
+ : undefined,
1060
1252
  });
1061
1253
  });
1062
1254
  return details;
@@ -1066,9 +1258,6 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
1066
1258
  const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
1067
1259
  if (task)
1068
1260
  task.phases = undefined;
1069
- // this.plannerProps.mainGantt = JSON.parse(
1070
- // JSON.stringify(this.plannerProps.mainGantt)
1071
- // );
1072
1261
  this.plannerProps = Object.assign({}, this.plannerProps);
1073
1262
  }, _KupPlanner_handleOnClickOnTask = function _KupPlanner_handleOnClickOnTask(nativeEvent) {
1074
1263
  const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, nativeEvent.id);
@@ -1080,6 +1269,12 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
1080
1269
  return true;
1081
1270
  }, _KupPlanner_handleOnClickOnDetail = function _KupPlanner_handleOnClickOnDetail() {
1082
1271
  return true;
1272
+ }, _KupPlanner_handleOnContextMenuOnTask = function _KupPlanner_handleOnContextMenuOnTask() {
1273
+ return true;
1274
+ }, _KupPlanner_handleOnContextMenuOnPhase = function _KupPlanner_handleOnContextMenuOnPhase() {
1275
+ return true;
1276
+ }, _KupPlanner_handleOnContextMenuOnDetail = function _KupPlanner_handleOnContextMenuOnDetail() {
1277
+ return true;
1083
1278
  }, _KupPlanner_emitOnChangeEventsReceived = function _KupPlanner_emitOnChangeEventsReceived(nativeEvent) {
1084
1279
  let emitEvent = false;
1085
1280
  if (!__classPrivateFieldGet(this, _KupPlanner_lastOnChangeReceived, "f")) {
@@ -1098,19 +1293,28 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
1098
1293
  };
1099
1294
  const value = e.target.value;
1100
1295
  const data = isDetail ? this.detailData : this.data;
1296
+ const tempRows = [];
1101
1297
  for (let index = 0; index < data.rows.length; index++) {
1102
1298
  const row = data.rows[index];
1103
- const valuesToShow = isDetail
1104
- ? getValuesToShow(row, this.detailIdCol, this.detailNameCol, data.columns, this.detailColumns)
1105
- : getValuesToShow(row, this.taskIdCol, this.taskNameCol, data.columns, this.taskColumns);
1106
- for (let index = 0; index < valuesToShow.length; index++) {
1107
- const valueToShow = valuesToShow[index];
1108
- if (valueToShow.toLowerCase().indexOf(value.toLowerCase()) > -1) {
1109
- tempData.rows.push(row);
1110
- break;
1299
+ const cells = row.cells;
1300
+ for (let index = 0; index < data.columns.length; index++) {
1301
+ const column = data.columns[index];
1302
+ const cell = cells[column.name];
1303
+ if (cell) {
1304
+ const dValue = getCellValueForDisplay(data.columns[index], cell);
1305
+ const found = !!(dValue.toLowerCase().indexOf(value.toLowerCase()) > -1);
1306
+ if (found) {
1307
+ tempRows.push({ row, weight: index });
1308
+ break;
1309
+ }
1111
1310
  }
1112
1311
  }
1113
1312
  }
1313
+ tempRows
1314
+ .sort((a, b) => a.weight - b.weight)
1315
+ .forEach((tempRow) => {
1316
+ tempData.rows.push(tempRow.row);
1317
+ });
1114
1318
  const newGantt = isDetail
1115
1319
  ? {
1116
1320
  secondaryGantt: Object.assign(Object.assign({}, this.plannerProps.secondaryGantt), { items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toDetails).call(this, tempData) }),
@@ -1119,4 +1323,30 @@ _KupPlanner_kupManager = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(),
1119
1323
  mainGantt: Object.assign(Object.assign({}, this.plannerProps.mainGantt), { items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toTasks).call(this, tempData) }),
1120
1324
  };
1121
1325
  this.plannerProps = Object.assign(Object.assign({}, this.plannerProps), newGantt);
1326
+ }, _KupPlanner_getIconUrl = function _KupPlanner_getIconUrl(row, columnName) {
1327
+ var _a;
1328
+ let iconUrl = undefined;
1329
+ if (columnName) {
1330
+ const iconCell = row.cells[columnName];
1331
+ let icon = (_a = iconCell === null || iconCell === void 0 ? void 0 : iconCell.data) === null || _a === void 0 ? void 0 : _a.resource;
1332
+ if (!icon) {
1333
+ icon = iconCell.value;
1334
+ }
1335
+ if (icon) {
1336
+ iconUrl = getAssetPath('./assets/svg/' + icon + '.svg');
1337
+ }
1338
+ }
1339
+ return iconUrl;
1340
+ }, _KupPlanner_getIconColor = function _KupPlanner_getIconColor(row, columnName) {
1341
+ var _a;
1342
+ let iconColor = undefined;
1343
+ if (columnName) {
1344
+ const iconCell = row.cells[columnName];
1345
+ iconColor = (_a = iconCell === null || iconCell === void 0 ? void 0 : iconCell.data) === null || _a === void 0 ? void 0 : _a.color;
1346
+ if (iconColor) {
1347
+ iconColor =
1348
+ __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.colorCheck(iconColor).hexColor;
1349
+ }
1350
+ }
1351
+ return iconColor;
1122
1352
  };
@@ -17,6 +17,7 @@
17
17
  }
18
18
 
19
19
  #kup-component {
20
+ box-sizing: border-box;
20
21
  display: flex;
21
22
  justify-content: center;
22
23
  height: 100%;
@@ -31,7 +32,7 @@
31
32
  box-shadow: var(--kup-box-shadow);
32
33
  color: var(--kup-navbar-color);
33
34
  display: flex;
34
- justify-content: flex-start;
35
+ justify-content: space-between;
35
36
  max-width: 672px;
36
37
  min-height: 48px;
37
38
  min-width: 344px;
@@ -39,7 +40,7 @@
39
40
  .snackbar__text {
40
41
  padding: 14px 16px;
41
42
  pointer-events: all;
42
- white-space: nowrap;
43
+ word-break: break-word;
43
44
  }
44
45
  .snackbar__buttons {
45
46
  --kup-button-primary-color: var(--kup-navbar-color);
@@ -52,7 +53,7 @@
52
53
  justify-content: flex-end;
53
54
  margin-right: 8px;
54
55
  pointer-events: all;
55
- width: 100%;
56
+ width: max-content;
56
57
  }
57
58
  .snackbar__close {
58
59
  --kup-button-font-size: 11px;
@@ -27,6 +27,12 @@ export class KupSnackbar {
27
27
  id: this.rootElement.id,
28
28
  });
29
29
  }
30
+ onKupTimeoutComplete() {
31
+ this.kupTimeoutComplete.emit({
32
+ comp: this,
33
+ id: this.rootElement.id,
34
+ });
35
+ }
30
36
  /*-------------------------------------------------*/
31
37
  /* P u b l i c M e t h o d s */
32
38
  /*-------------------------------------------------*/
@@ -80,6 +86,7 @@ export class KupSnackbar {
80
86
  if (this.timeout && this.visible) {
81
87
  setTimeout(() => {
82
88
  this.hide();
89
+ this.onKupTimeoutComplete();
83
90
  }, this.timeout);
84
91
  }
85
92
  this.kupManager.debug.logRender(this, true);
@@ -243,6 +250,26 @@ export class KupSnackbar {
243
250
  }
244
251
  }
245
252
  }
253
+ }, {
254
+ "method": "kupTimeoutComplete",
255
+ "name": "kup-snackbar-timeoutcomplete",
256
+ "bubbles": true,
257
+ "cancelable": false,
258
+ "composed": true,
259
+ "docs": {
260
+ "tags": [],
261
+ "text": "Triggered when the snackbar's hidden timeout is complete."
262
+ },
263
+ "complexType": {
264
+ "original": "KupEventPayload",
265
+ "resolved": "KupEventPayload",
266
+ "references": {
267
+ "KupEventPayload": {
268
+ "location": "import",
269
+ "path": "../../types/GenericTypes"
270
+ }
271
+ }
272
+ }
246
273
  }];
247
274
  }
248
275
  static get methods() {