@spicainternational/ngx-sds-components 8.1.1 → 8.3.0-beta.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 (186) hide show
  1. package/README.md +16 -16
  2. package/esm2022/public-api.mjs +1 -1
  3. package/esm2022/src/lib/app-switcher/app-switcher.component.mjs +3 -3
  4. package/esm2022/src/lib/app-switcher/app-switcher.model.mjs +1 -1
  5. package/esm2022/src/lib/app-switcher/public-api.mjs +1 -1
  6. package/esm2022/src/lib/avatar/avatar-group.component.mjs +3 -3
  7. package/esm2022/src/lib/avatar/avatar-group.model.mjs +1 -1
  8. package/esm2022/src/lib/avatar/avatar.component.mjs +3 -3
  9. package/esm2022/src/lib/avatar/public-api.mjs +1 -1
  10. package/esm2022/src/lib/badge/badge.directive.mjs +1 -1
  11. package/esm2022/src/lib/badge/badge.types.mjs +1 -1
  12. package/esm2022/src/lib/badge/components/badge.component.mjs +3 -3
  13. package/esm2022/src/lib/badge/public-api.mjs +1 -1
  14. package/esm2022/src/lib/callout/callout.component.mjs +3 -3
  15. package/esm2022/src/lib/callout/public-api.mjs +1 -1
  16. package/esm2022/src/lib/color-picker/color-picker.component.mjs +3 -3
  17. package/esm2022/src/lib/color-picker/public-api.mjs +1 -1
  18. package/esm2022/src/lib/date-picker/date-picker.component.mjs +3 -3
  19. package/esm2022/src/lib/date-picker/date-picker.model.mjs +1 -1
  20. package/esm2022/src/lib/date-picker/public-api.mjs +1 -1
  21. package/esm2022/src/lib/date-picker/sds-date-picker.service.mjs +1 -1
  22. package/esm2022/src/lib/date-pipes/date-compare.pipe.mjs +1 -1
  23. package/esm2022/src/lib/date-pipes/date-format.pipe.mjs +1 -1
  24. package/esm2022/src/lib/date-pipes/date-period-format.pipe.mjs +1 -1
  25. package/esm2022/src/lib/date-pipes/date-time-formats.constants.mjs +1 -1
  26. package/esm2022/src/lib/date-pipes/date-time-range-duration.pipe.mjs +1 -1
  27. package/esm2022/src/lib/date-pipes/date-time-range-format.pipe.mjs +1 -1
  28. package/esm2022/src/lib/date-pipes/public-api.mjs +1 -1
  29. package/esm2022/src/lib/drawer/drawer.component.mjs +3 -3
  30. package/esm2022/src/lib/drawer/public-api.mjs +1 -1
  31. package/esm2022/src/lib/duration-box/duration-box.component.mjs +3 -3
  32. package/esm2022/src/lib/duration-box/duration.service.mjs +1 -1
  33. package/esm2022/src/lib/duration-box/public-api.mjs +1 -1
  34. package/esm2022/src/lib/duration-pipe/duration-format.pipe.mjs +1 -1
  35. package/esm2022/src/lib/duration-pipe/public-api.mjs +1 -1
  36. package/esm2022/src/lib/ellipsis/directives/ellipsis.directive.mjs +1 -1
  37. package/esm2022/src/lib/ellipsis/public-api.mjs +1 -1
  38. package/esm2022/src/lib/expansion-panel/expansion-panel.component.mjs +3 -3
  39. package/esm2022/src/lib/expansion-panel/expansion-panel.types.mjs +1 -1
  40. package/esm2022/src/lib/expansion-panel/public-api.mjs +1 -1
  41. package/esm2022/src/lib/highlight-text/directives/highlight-text.directive.mjs +1 -1
  42. package/esm2022/src/lib/highlight-text/directives/index.mjs +1 -1
  43. package/esm2022/src/lib/highlight-text/pipes/highlight-text.pipe.mjs +1 -1
  44. package/esm2022/src/lib/highlight-text/pipes/index.mjs +1 -1
  45. package/esm2022/src/lib/highlight-text/public-api.mjs +1 -1
  46. package/esm2022/src/lib/highlight-text/utils/highlight-text.utils.mjs +1 -1
  47. package/esm2022/src/lib/highlight-text/utils/index.mjs +1 -1
  48. package/esm2022/src/lib/intersection/directives/index.mjs +1 -1
  49. package/esm2022/src/lib/intersection/directives/intersection.directive.mjs +1 -1
  50. package/esm2022/src/lib/intersection/public-api.mjs +1 -1
  51. package/esm2022/src/lib/intersection/services/index.mjs +1 -1
  52. package/esm2022/src/lib/intersection/services/intersection.service.mjs +1 -1
  53. package/esm2022/src/lib/keyboard-shortcut/directives/index.mjs +1 -1
  54. package/esm2022/src/lib/keyboard-shortcut/directives/keyboard-shortcut.directive.mjs +19 -29
  55. package/esm2022/src/lib/keyboard-shortcut/public-api.mjs +1 -1
  56. package/esm2022/src/lib/layout/default-layout/default-layout.component.mjs +3 -3
  57. package/esm2022/src/lib/layout/extra-large-layout/extra-large-layout.component.mjs +3 -3
  58. package/esm2022/src/lib/layout/fluid-layout/fluid-layout.component.mjs +3 -3
  59. package/esm2022/src/lib/layout/medium-layout/medium-layout.component.mjs +3 -3
  60. package/esm2022/src/lib/layout/public-api.mjs +1 -1
  61. package/esm2022/src/lib/layout/small-layout/small-layout.component.mjs +3 -3
  62. package/esm2022/src/lib/message/message.component.mjs +3 -3
  63. package/esm2022/src/lib/message/public-api.mjs +1 -1
  64. package/esm2022/src/lib/modal/dialog/dialog.component.mjs +3 -3
  65. package/esm2022/src/lib/modal/modal.component.mjs +3 -3
  66. package/esm2022/src/lib/modal/modal.model.mjs +1 -1
  67. package/esm2022/src/lib/modal/public-api.mjs +1 -1
  68. package/esm2022/src/lib/navigation/models/navigation-models.mjs +1 -1
  69. package/esm2022/src/lib/navigation/navigation-collapsible-frame/navigation-collapsible-frame.component.mjs +3 -3
  70. package/esm2022/src/lib/navigation/navigation-container/navigation-container.component.mjs +5 -8
  71. package/esm2022/src/lib/navigation/navigation-external-link/navigation-external-link.component.mjs +3 -3
  72. package/esm2022/src/lib/navigation/navigation-group/navigation-group.component.mjs +121 -22
  73. package/esm2022/src/lib/navigation/navigation-header/navigation-header.component.mjs +3 -3
  74. package/esm2022/src/lib/navigation/navigation-route-link/navigation-route-link.component.mjs +61 -23
  75. package/esm2022/src/lib/navigation/navigation-separator/navigation-separator.component.mjs +3 -3
  76. package/esm2022/src/lib/navigation/navigation-user-profile/components/user-profile-action-button/user-profile-action-button.component.mjs +3 -3
  77. package/esm2022/src/lib/navigation/navigation-user-profile/components/user-profile-selector/user-profile-selector.component.mjs +3 -3
  78. package/esm2022/src/lib/navigation/navigation-user-profile/components/user-profile-tile/user-profile-tile.component.mjs +3 -3
  79. package/esm2022/src/lib/navigation/navigation-user-profile/navigation-profile.model.mjs +1 -1
  80. package/esm2022/src/lib/navigation/navigation-user-profile/navigation-user-profile.component.mjs +3 -3
  81. package/esm2022/src/lib/navigation/product-home/product-home.component.mjs +5 -5
  82. package/esm2022/src/lib/navigation/public-api.mjs +1 -1
  83. package/esm2022/src/lib/navigation/utils/navigation.utils.mjs +1 -1
  84. package/esm2022/src/lib/number-box/number-box.component.mjs +3 -3
  85. package/esm2022/src/lib/number-box/public-api.mjs +1 -1
  86. package/esm2022/src/lib/page-header/page-header.component.mjs +3 -3
  87. package/esm2022/src/lib/page-header/public-api.mjs +1 -1
  88. package/esm2022/src/lib/pane/pane.component.mjs +3 -3
  89. package/esm2022/src/lib/pane/pane.model.mjs +1 -1
  90. package/esm2022/src/lib/pane/public-api.mjs +1 -1
  91. package/esm2022/src/lib/quick-info/quick-info.component.mjs +3 -3
  92. package/esm2022/src/lib/quick-info/quick-info.model.mjs +1 -1
  93. package/esm2022/src/lib/ripple/public-api.mjs +1 -1
  94. package/esm2022/src/lib/ripple/ripple.directive.mjs +1 -1
  95. package/esm2022/src/lib/segmented-control/public-api.mjs +1 -1
  96. package/esm2022/src/lib/segmented-control/segmented-control.component.mjs +3 -3
  97. package/esm2022/src/lib/side-bar/side-bar.component.mjs +22 -16
  98. package/esm2022/src/lib/static-value/public-api.mjs +1 -1
  99. package/esm2022/src/lib/static-value/static-value.component.mjs +3 -3
  100. package/esm2022/src/lib/table-actions/public-api.mjs +1 -1
  101. package/esm2022/src/lib/table-actions/table-actions.component.mjs +3 -3
  102. package/esm2022/src/lib/timeline/components/timeline.component.mjs +13 -3
  103. package/esm2022/src/lib/timeline/models/timeline.model.mjs +1 -1
  104. package/esm2022/src/lib/timeline/public-api.mjs +1 -1
  105. package/esm2022/src/lib/timeline/services/timeline.service.mjs +1 -1
  106. package/esm2022/src/lib/timeline/types/timeline.types.mjs +1 -1
  107. package/esm2022/src/lib/timer/public-api.mjs +1 -1
  108. package/esm2022/src/lib/timer/services/index.mjs +1 -1
  109. package/esm2022/src/lib/timer/services/timer.service.mjs +1 -1
  110. package/esm2022/src/lib/timer/utils/index.mjs +1 -1
  111. package/esm2022/src/lib/timer/utils/timer.utils.mjs +1 -1
  112. package/esm2022/src/lib/tooltip/components/tooltip.component.mjs +3 -3
  113. package/esm2022/src/lib/tooltip/public-api.mjs +1 -1
  114. package/esm2022/src/lib/tooltip/tooltip.directive.mjs +1 -1
  115. package/esm2022/src/lib/tooltip/tooltip.types.mjs +1 -1
  116. package/esm2022/src/lib/tooltip/utils/tooltip.utils.mjs +1 -1
  117. package/esm2022/src/lib/utils/date-time/date-time-format.function.mjs +1 -1
  118. package/esm2022/src/lib/utils/date-time/intl-date-time-format-options-presets.mjs +1 -1
  119. package/esm2022/src/lib/utils/date-time/public-api.mjs +1 -1
  120. package/esm2022/src/lib/utils/public-api.mjs +1 -1
  121. package/fesm2022/spicainternational-ngx-sds-components-src-lib-app-switcher.mjs +2 -2
  122. package/fesm2022/spicainternational-ngx-sds-components-src-lib-app-switcher.mjs.map +1 -1
  123. package/fesm2022/spicainternational-ngx-sds-components-src-lib-avatar.mjs +4 -4
  124. package/fesm2022/spicainternational-ngx-sds-components-src-lib-avatar.mjs.map +1 -1
  125. package/fesm2022/spicainternational-ngx-sds-components-src-lib-badge.mjs +2 -2
  126. package/fesm2022/spicainternational-ngx-sds-components-src-lib-badge.mjs.map +1 -1
  127. package/fesm2022/spicainternational-ngx-sds-components-src-lib-callout.mjs +2 -2
  128. package/fesm2022/spicainternational-ngx-sds-components-src-lib-callout.mjs.map +1 -1
  129. package/fesm2022/spicainternational-ngx-sds-components-src-lib-color-picker.mjs +2 -2
  130. package/fesm2022/spicainternational-ngx-sds-components-src-lib-color-picker.mjs.map +1 -1
  131. package/fesm2022/spicainternational-ngx-sds-components-src-lib-date-picker.mjs +2 -2
  132. package/fesm2022/spicainternational-ngx-sds-components-src-lib-date-picker.mjs.map +1 -1
  133. package/fesm2022/spicainternational-ngx-sds-components-src-lib-date-pipes.mjs.map +1 -1
  134. package/fesm2022/spicainternational-ngx-sds-components-src-lib-drawer.mjs +2 -2
  135. package/fesm2022/spicainternational-ngx-sds-components-src-lib-drawer.mjs.map +1 -1
  136. package/fesm2022/spicainternational-ngx-sds-components-src-lib-duration-box.mjs +2 -2
  137. package/fesm2022/spicainternational-ngx-sds-components-src-lib-duration-box.mjs.map +1 -1
  138. package/fesm2022/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs.map +1 -1
  139. package/fesm2022/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs.map +1 -1
  140. package/fesm2022/spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs +2 -2
  141. package/fesm2022/spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs.map +1 -1
  142. package/fesm2022/spicainternational-ngx-sds-components-src-lib-highlight-text.mjs.map +1 -1
  143. package/fesm2022/spicainternational-ngx-sds-components-src-lib-intersection.mjs.map +1 -1
  144. package/fesm2022/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs +18 -28
  145. package/fesm2022/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs.map +1 -1
  146. package/fesm2022/spicainternational-ngx-sds-components-src-lib-layout.mjs +10 -10
  147. package/fesm2022/spicainternational-ngx-sds-components-src-lib-layout.mjs.map +1 -1
  148. package/fesm2022/spicainternational-ngx-sds-components-src-lib-message.mjs +2 -2
  149. package/fesm2022/spicainternational-ngx-sds-components-src-lib-message.mjs.map +1 -1
  150. package/fesm2022/spicainternational-ngx-sds-components-src-lib-modal.mjs +4 -4
  151. package/fesm2022/spicainternational-ngx-sds-components-src-lib-modal.mjs.map +1 -1
  152. package/fesm2022/spicainternational-ngx-sds-components-src-lib-navigation.mjs +215 -83
  153. package/fesm2022/spicainternational-ngx-sds-components-src-lib-navigation.mjs.map +1 -1
  154. package/fesm2022/spicainternational-ngx-sds-components-src-lib-number-box.mjs +2 -2
  155. package/fesm2022/spicainternational-ngx-sds-components-src-lib-number-box.mjs.map +1 -1
  156. package/fesm2022/spicainternational-ngx-sds-components-src-lib-page-header.mjs +2 -2
  157. package/fesm2022/spicainternational-ngx-sds-components-src-lib-page-header.mjs.map +1 -1
  158. package/fesm2022/spicainternational-ngx-sds-components-src-lib-pane.mjs +2 -2
  159. package/fesm2022/spicainternational-ngx-sds-components-src-lib-pane.mjs.map +1 -1
  160. package/fesm2022/spicainternational-ngx-sds-components-src-lib-quick-info.mjs +2 -2
  161. package/fesm2022/spicainternational-ngx-sds-components-src-lib-quick-info.mjs.map +1 -1
  162. package/fesm2022/spicainternational-ngx-sds-components-src-lib-ripple.mjs.map +1 -1
  163. package/fesm2022/spicainternational-ngx-sds-components-src-lib-segmented-control.mjs +2 -2
  164. package/fesm2022/spicainternational-ngx-sds-components-src-lib-segmented-control.mjs.map +1 -1
  165. package/fesm2022/spicainternational-ngx-sds-components-src-lib-side-bar.mjs +21 -15
  166. package/fesm2022/spicainternational-ngx-sds-components-src-lib-side-bar.mjs.map +1 -1
  167. package/fesm2022/spicainternational-ngx-sds-components-src-lib-static-value.mjs +2 -2
  168. package/fesm2022/spicainternational-ngx-sds-components-src-lib-static-value.mjs.map +1 -1
  169. package/fesm2022/spicainternational-ngx-sds-components-src-lib-table-actions.mjs +2 -2
  170. package/fesm2022/spicainternational-ngx-sds-components-src-lib-table-actions.mjs.map +1 -1
  171. package/fesm2022/spicainternational-ngx-sds-components-src-lib-timeline.mjs +12 -2
  172. package/fesm2022/spicainternational-ngx-sds-components-src-lib-timeline.mjs.map +1 -1
  173. package/fesm2022/spicainternational-ngx-sds-components-src-lib-timer.mjs.map +1 -1
  174. package/fesm2022/spicainternational-ngx-sds-components-src-lib-tooltip.mjs +2 -2
  175. package/fesm2022/spicainternational-ngx-sds-components-src-lib-tooltip.mjs.map +1 -1
  176. package/fesm2022/spicainternational-ngx-sds-components-src-lib-utils-date-time.mjs.map +1 -1
  177. package/fesm2022/spicainternational-ngx-sds-components-src-lib-utils.mjs.map +1 -1
  178. package/fesm2022/spicainternational-ngx-sds-components.mjs.map +1 -1
  179. package/package.json +1 -1
  180. package/src/lib/keyboard-shortcut/directives/keyboard-shortcut.directive.d.ts +5 -10
  181. package/src/lib/navigation/navigation-container/navigation-container.component.d.ts +1 -2
  182. package/src/lib/navigation/navigation-group/navigation-group.component.d.ts +20 -1
  183. package/src/lib/navigation/navigation-route-link/navigation-route-link.component.d.ts +22 -9
  184. package/src/lib/ripple/sds-ripple.css +20 -20
  185. package/src/lib/side-bar/side-bar.component.d.ts +13 -7
  186. package/src/lib/timeline/components/timeline.component.d.ts +9 -1
@@ -302,6 +302,14 @@ class SdsTimelineComponent {
302
302
  * @memberof SdsTimelineComponent
303
303
  */
304
304
  this.cutOffset = false;
305
+ /**
306
+ * Sets default cursor, that should be shown when hovering over timeline component.
307
+ * Default value is 'default'.
308
+ *
309
+ * @type {string}
310
+ * @memberof SdsTimelineComponent
311
+ */
312
+ this.defaultCursor = "default";
305
313
  // protected
306
314
  this.hourTicks = [];
307
315
  this.hourLabels = [];
@@ -458,7 +466,7 @@ class SdsTimelineComponent {
458
466
  });
459
467
  }
460
468
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SdsTimelineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
461
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SdsTimelineComponent, isStandalone: true, selector: "sds-timeline", inputs: { start: "start", end: "end", items: "items", pointInTimeItems: "pointInTimeItems", itemTemplate: "itemTemplate", pointInTimeTemplate: "pointInTimeTemplate", dayLabelTemplate: "dayLabelTemplate", dayLabelCustomDataFn: "dayLabelCustomDataFn", tickFrequency: "tickFrequency", hourLabelFrequency: "hourLabelFrequency", zoomPercent: "zoomPercent", viewOffsetPercent: "viewOffsetPercent", maxZoomPercent: "maxZoomPercent", showHourLabels: "showHourLabels", hourLabelClass: "hourLabelClass", showDayLabels: "showDayLabels", dayLabelClass: "dayLabelClass", showTimeline: "showTimeline", hourTickClass: "hourTickClass", timelineHeight: "timelineHeight", enableZoomAndDrag: "enableZoomAndDrag", offSetMinutes: "offSetMinutes", locales: "locales", cutOffset: "cutOffset" }, outputs: { zoomPercentChange: "zoomPercentChange", viewOffsetPercentChange: "viewOffsetPercentChange" }, host: { listeners: { "window:mousemove": "onDragMove($event)", "window:touchmove": "onDragMoveTouch($event)", "window:mouseup": "onDragEnd($event)", "window:touchend": "onDragEnd($event)" } }, viewQueries: [{ propertyName: "_viewport", first: true, predicate: ["viewport"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<ng-template #defaultItemTemplate let-item=\"item\">\r\n <div \r\n class=\"sds-timeline-item h-100\"\r\n [title]=\"item.hint\"\r\n >\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #defaultPointInTimeItemTemplate let-item=\"item\">\r\n <div \r\n class=\"sds-timeline-item h-100\"\r\n [title]=\"item.hint\"\r\n >\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #defaultDayLabelTemplate let-label=\"label\">\r\n {{label.label}}\r\n</ng-template>\r\n\r\n<div \r\n #viewport\r\n class=\"sds-timeline-viewport\"\r\n (wheel)=\"onScroll($event)\"\r\n\r\n (mousedown)=\"onDragStart($event)\"\r\n (touchstart)=\"onDragStart($event)\"\r\n >\r\n\r\n <div \r\n class=\"sds-timeline-container d-flex flex-column\"\r\n [style.left.%]=\"viewOffsetPercent\"\r\n [style.width.%]=\"zoomPercent\"\r\n [style.cursor]=\"isDragging ? 'ew-resize' : 'default'\"\r\n >\r\n\r\n <div\r\n *ngIf=\"showDayLabels\" \r\n class=\"sds-timeline-day-header\">\r\n\r\n <div \r\n *ngFor=\"let label of dayLabels\"\r\n class=\"sds-day-label\" \r\n [ngClass]=\"dayLabelClass ?? null\"\r\n [style.left.%]=\"label.x\"\r\n [style.width.%]=\"label.width\"\r\n >\r\n <ng-container \r\n [ngTemplateOutlet]=\"dayLabelTemplate ? dayLabelTemplate : defaultDayLabelTemplate\"\r\n [ngTemplateOutletContext]=\"{label: label}\">\r\n </ng-container> \r\n </div>\r\n </div>\r\n\r\n <div \r\n *ngIf=\"showHourLabels\" \r\n class=\"sds-timeline-hour-header\">\r\n\r\n <div \r\n *ngFor=\"let label of hourLabels;\"\r\n class=\"sds-hour-label\" \r\n [ngClass]=\"hourLabelClass ?? null\"\r\n [style.left.%]=\"label.x\"\r\n [style.width.rem]=\"1.2\"\r\n [ngStyle]=\"{'left': 'calc(' + label.x + '% - 0.6rem)'}\"\r\n >\r\n \r\n {{label.label}}\r\n \r\n </div>\r\n </div>\r\n\r\n <div \r\n *ngIf=\"showTimeline\"\r\n class=\"sds-timeline flex-grow-1\"\r\n [style.height]=\"timelineHeight\"\r\n >\r\n\r\n <div \r\n *ngFor=\"let tick of hourTicks\"\r\n class=\"sds-timeline-tick\" \r\n [ngClass]=\"hourTickClass ?? null\"\t\r\n [ngStyle]=\"tick.x == 100 ? {'left': 'calc(' + tick.x +'% - 1px)'} : {'left': 'calc(' + tick.x + '% - 0.5px)'}\"\r\n >\r\n </div>\r\n\r\n <div \r\n *ngFor=\"let item of presentationItems\"\r\n class=\"sds-timeline-item-container\"\r\n [ngClass]=\"item.class ?? null\"\r\n [ngStyle]=\"{\r\n 'width': 'max(' + item.width +'%, 1px)',\r\n 'top': 'calc(' + item.top + ' - max(calc(' + item.height +'/2), 1px))', \r\n }\"\r\n\r\n [style.left.%]=\"item.x\"\r\n [style.height]=\"item.height\"\r\n [style.backgroundColor]=\"item.backgroundColor\"\r\n >\r\n\r\n <ng-container \r\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultItemTemplate\"\r\n [ngTemplateOutletContext]=\"{item: item}\">\r\n </ng-container> \r\n </div>\r\n\r\n\r\n <!-- [ngClass]=\"item.class\"\t -->\r\n <div *ngFor=\"let item of presentationPointInTimeItems\"\r\n class=`sds-timeline-point-in-time-item-container ${item.class}`\r\n [style.height]=\"item.height\"\r\n [style.width]=\"item.width\"\r\n [ngStyle]=\"{\r\n 'top': 'calc(' + item.top + ' - max(calc(' + item.height +'/2), 1px))', \r\n 'left': 'calc(' + item.x + '% - max( calc(' + item.width +'/2), 1px))',\r\n \r\n }\"\r\n [style.backgroundColor]=\"item.backgroundColor\"\r\n >\r\n\r\n <ng-container \r\n [ngTemplateOutlet]=\"pointInTimeTemplate ? pointInTimeTemplate : defaultPointInTimeItemTemplate\"\r\n [ngTemplateOutletContext]=\"{item: item}\">\r\n </ng-container> \r\n\r\n </div>\r\n\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".sds-timeline-viewport{overflow:hidden}.sds-timeline-viewport .sds-timeline-container{width:100%;min-height:0;position:relative;-webkit-user-select:none;user-select:none}.sds-timeline-viewport .sds-timeline-container .sds-timeline-day-header{height:1.6rem;position:relative}.sds-timeline-viewport .sds-timeline-container .sds-timeline-day-header .sds-day-label{position:absolute;display:inline;text-align:center;font-size:.875rem}.sds-timeline-viewport .sds-timeline-container .sds-timeline-hour-header{height:1.6rem;position:relative;font-size:.8em}.sds-timeline-viewport .sds-timeline-container .sds-timeline-hour-header .sds-hour-label{position:absolute;display:inline;text-align:center;font-size:.875rem}.sds-timeline-viewport .sds-timeline-container .sds-timeline{position:relative}.sds-timeline-viewport .sds-timeline-container .sds-timeline .sds-timeline-tick{border-left:1px solid rgb(187,187,187);height:100%;position:absolute;display:inline}.sds-timeline-viewport .sds-timeline-container .sds-timeline .sds-timeline-item-container{height:100%;position:absolute;display:inline;top:20%;height:60%}.sds-timeline-viewport .sds-timeline-container .sds-timeline .sds-timeline-item-container .sds-timeline-item{position:relative;width:100%}.sds-timeline-viewport .sds-timeline-container .sds-timeline .sds-timeline-point-in-time-item-container{width:1px;height:1px;position:absolute}.sds-timeline-viewport .sds-timeline-container .sds-timeline .sds-timeline-point-in-time-item-container .sds-timeline-item{position:relative;width:100%}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
469
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SdsTimelineComponent, isStandalone: true, selector: "sds-timeline", inputs: { start: "start", end: "end", items: "items", pointInTimeItems: "pointInTimeItems", itemTemplate: "itemTemplate", pointInTimeTemplate: "pointInTimeTemplate", dayLabelTemplate: "dayLabelTemplate", dayLabelCustomDataFn: "dayLabelCustomDataFn", tickFrequency: "tickFrequency", hourLabelFrequency: "hourLabelFrequency", zoomPercent: "zoomPercent", viewOffsetPercent: "viewOffsetPercent", maxZoomPercent: "maxZoomPercent", showHourLabels: "showHourLabels", hourLabelClass: "hourLabelClass", showDayLabels: "showDayLabels", dayLabelClass: "dayLabelClass", showTimeline: "showTimeline", hourTickClass: "hourTickClass", timelineHeight: "timelineHeight", enableZoomAndDrag: "enableZoomAndDrag", offSetMinutes: "offSetMinutes", locales: "locales", cutOffset: "cutOffset", defaultCursor: "defaultCursor" }, outputs: { zoomPercentChange: "zoomPercentChange", viewOffsetPercentChange: "viewOffsetPercentChange" }, host: { listeners: { "window:mousemove": "onDragMove($event)", "window:touchmove": "onDragMoveTouch($event)", "window:mouseup": "onDragEnd($event)", "window:touchend": "onDragEnd($event)" } }, viewQueries: [{ propertyName: "_viewport", first: true, predicate: ["viewport"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<ng-template #defaultItemTemplate let-item=\"item\">\n <div \n class=\"sds-timeline-item h-100\"\n [title]=\"item.hint\"\n >\n </div>\n</ng-template>\n\n<ng-template #defaultPointInTimeItemTemplate let-item=\"item\">\n <div \n class=\"sds-timeline-item h-100\"\n [title]=\"item.hint\"\n >\n </div>\n</ng-template>\n\n<ng-template #defaultDayLabelTemplate let-label=\"label\">\n {{label.label}}\n</ng-template>\n\n<div \n #viewport\n class=\"sds-timeline-viewport\"\n (wheel)=\"onScroll($event)\"\n\n (mousedown)=\"onDragStart($event)\"\n (touchstart)=\"onDragStart($event)\"\n >\n\n <div \n class=\"sds-timeline-container d-flex flex-column\"\n [style.left.%]=\"viewOffsetPercent\"\n [style.width.%]=\"zoomPercent\"\n [style.cursor]=\"isDragging ? 'ew-resize' : defaultCursor\"\n >\n\n <div\n *ngIf=\"showDayLabels\" \n class=\"sds-timeline-day-header\">\n\n <div \n *ngFor=\"let label of dayLabels\"\n class=\"sds-day-label\" \n [ngClass]=\"dayLabelClass ?? null\"\n [style.left.%]=\"label.x\"\n [style.width.%]=\"label.width\"\n >\n <ng-container \n [ngTemplateOutlet]=\"dayLabelTemplate ? dayLabelTemplate : defaultDayLabelTemplate\"\n [ngTemplateOutletContext]=\"{label: label}\">\n </ng-container> \n </div>\n </div>\n\n <div \n *ngIf=\"showHourLabels\" \n class=\"sds-timeline-hour-header\">\n\n <div \n *ngFor=\"let label of hourLabels;\"\n class=\"sds-hour-label\" \n [ngClass]=\"hourLabelClass ?? null\"\n [style.left.%]=\"label.x\"\n [style.width.rem]=\"1.2\"\n [ngStyle]=\"{'left': 'calc(' + label.x + '% - 0.6rem)'}\"\n >\n \n {{label.label}}\n \n </div>\n </div>\n\n <div \n *ngIf=\"showTimeline\"\n class=\"sds-timeline flex-grow-1\"\n [style.height]=\"timelineHeight\"\n >\n\n <div \n *ngFor=\"let tick of hourTicks\"\n class=\"sds-timeline-tick\" \n [ngClass]=\"hourTickClass ?? null\"\t\n [ngStyle]=\"tick.x == 100 ? {'left': 'calc(' + tick.x +'% - 1px)'} : {'left': 'calc(' + tick.x + '% - 0.5px)'}\"\n >\n </div>\n\n <div \n *ngFor=\"let item of presentationItems\"\n class=\"sds-timeline-item-container\"\n [ngClass]=\"item.class ?? null\"\n [ngStyle]=\"{\n 'width': 'max(' + item.width +'%, 1px)',\n 'top': 'calc(' + item.top + ' - max(calc(' + item.height +'/2), 1px))', \n }\"\n\n [style.left.%]=\"item.x\"\n [style.height]=\"item.height\"\n [style.backgroundColor]=\"item.backgroundColor\"\n >\n\n <ng-container \n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultItemTemplate\"\n [ngTemplateOutletContext]=\"{item: item}\">\n </ng-container> \n </div>\n\n\n <!-- [ngClass]=\"item.class\"\t -->\n <div *ngFor=\"let item of presentationPointInTimeItems\"\n class=`sds-timeline-point-in-time-item-container ${item.class}`\n [style.height]=\"item.height\"\n [style.width]=\"item.width\"\n [ngStyle]=\"{\n 'top': 'calc(' + item.top + ' - max(calc(' + item.height +'/2), 1px))', \n 'left': 'calc(' + item.x + '% - max( calc(' + item.width +'/2), 1px))',\n \n }\"\n [style.backgroundColor]=\"item.backgroundColor\"\n >\n\n <ng-container \n [ngTemplateOutlet]=\"pointInTimeTemplate ? pointInTimeTemplate : defaultPointInTimeItemTemplate\"\n [ngTemplateOutletContext]=\"{item: item}\">\n </ng-container> \n\n </div>\n\n </div>\n </div>\n</div>\n", styles: [".sds-timeline-viewport{overflow:hidden}.sds-timeline-viewport .sds-timeline-container{width:100%;min-height:0;position:relative;-webkit-user-select:none;user-select:none}.sds-timeline-viewport .sds-timeline-container .sds-timeline-day-header{height:1.6rem;position:relative}.sds-timeline-viewport .sds-timeline-container .sds-timeline-day-header .sds-day-label{position:absolute;display:inline;text-align:center;font-size:.875rem}.sds-timeline-viewport .sds-timeline-container .sds-timeline-hour-header{height:1.6rem;position:relative;font-size:.8em}.sds-timeline-viewport .sds-timeline-container .sds-timeline-hour-header .sds-hour-label{position:absolute;display:inline;text-align:center;font-size:.875rem}.sds-timeline-viewport .sds-timeline-container .sds-timeline{position:relative}.sds-timeline-viewport .sds-timeline-container .sds-timeline .sds-timeline-tick{border-left:1px solid rgb(187,187,187);height:100%;position:absolute;display:inline}.sds-timeline-viewport .sds-timeline-container .sds-timeline .sds-timeline-item-container{height:100%;position:absolute;display:inline;top:20%;height:60%}.sds-timeline-viewport .sds-timeline-container .sds-timeline .sds-timeline-item-container .sds-timeline-item{position:relative;width:100%}.sds-timeline-viewport .sds-timeline-container .sds-timeline .sds-timeline-point-in-time-item-container{width:1px;height:1px;position:absolute}.sds-timeline-viewport .sds-timeline-container .sds-timeline .sds-timeline-point-in-time-item-container .sds-timeline-item{position:relative;width:100%}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
462
470
  }
463
471
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SdsTimelineComponent, decorators: [{
464
472
  type: Component,
@@ -468,7 +476,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
468
476
  NgStyle,
469
477
  NgClass,
470
478
  NgTemplateOutlet,
471
- ], template: "<ng-template #defaultItemTemplate let-item=\"item\">\r\n <div \r\n class=\"sds-timeline-item h-100\"\r\n [title]=\"item.hint\"\r\n >\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #defaultPointInTimeItemTemplate let-item=\"item\">\r\n <div \r\n class=\"sds-timeline-item h-100\"\r\n [title]=\"item.hint\"\r\n >\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #defaultDayLabelTemplate let-label=\"label\">\r\n {{label.label}}\r\n</ng-template>\r\n\r\n<div \r\n #viewport\r\n class=\"sds-timeline-viewport\"\r\n (wheel)=\"onScroll($event)\"\r\n\r\n (mousedown)=\"onDragStart($event)\"\r\n (touchstart)=\"onDragStart($event)\"\r\n >\r\n\r\n <div \r\n class=\"sds-timeline-container d-flex flex-column\"\r\n [style.left.%]=\"viewOffsetPercent\"\r\n [style.width.%]=\"zoomPercent\"\r\n [style.cursor]=\"isDragging ? 'ew-resize' : 'default'\"\r\n >\r\n\r\n <div\r\n *ngIf=\"showDayLabels\" \r\n class=\"sds-timeline-day-header\">\r\n\r\n <div \r\n *ngFor=\"let label of dayLabels\"\r\n class=\"sds-day-label\" \r\n [ngClass]=\"dayLabelClass ?? null\"\r\n [style.left.%]=\"label.x\"\r\n [style.width.%]=\"label.width\"\r\n >\r\n <ng-container \r\n [ngTemplateOutlet]=\"dayLabelTemplate ? dayLabelTemplate : defaultDayLabelTemplate\"\r\n [ngTemplateOutletContext]=\"{label: label}\">\r\n </ng-container> \r\n </div>\r\n </div>\r\n\r\n <div \r\n *ngIf=\"showHourLabels\" \r\n class=\"sds-timeline-hour-header\">\r\n\r\n <div \r\n *ngFor=\"let label of hourLabels;\"\r\n class=\"sds-hour-label\" \r\n [ngClass]=\"hourLabelClass ?? null\"\r\n [style.left.%]=\"label.x\"\r\n [style.width.rem]=\"1.2\"\r\n [ngStyle]=\"{'left': 'calc(' + label.x + '% - 0.6rem)'}\"\r\n >\r\n \r\n {{label.label}}\r\n \r\n </div>\r\n </div>\r\n\r\n <div \r\n *ngIf=\"showTimeline\"\r\n class=\"sds-timeline flex-grow-1\"\r\n [style.height]=\"timelineHeight\"\r\n >\r\n\r\n <div \r\n *ngFor=\"let tick of hourTicks\"\r\n class=\"sds-timeline-tick\" \r\n [ngClass]=\"hourTickClass ?? null\"\t\r\n [ngStyle]=\"tick.x == 100 ? {'left': 'calc(' + tick.x +'% - 1px)'} : {'left': 'calc(' + tick.x + '% - 0.5px)'}\"\r\n >\r\n </div>\r\n\r\n <div \r\n *ngFor=\"let item of presentationItems\"\r\n class=\"sds-timeline-item-container\"\r\n [ngClass]=\"item.class ?? null\"\r\n [ngStyle]=\"{\r\n 'width': 'max(' + item.width +'%, 1px)',\r\n 'top': 'calc(' + item.top + ' - max(calc(' + item.height +'/2), 1px))', \r\n }\"\r\n\r\n [style.left.%]=\"item.x\"\r\n [style.height]=\"item.height\"\r\n [style.backgroundColor]=\"item.backgroundColor\"\r\n >\r\n\r\n <ng-container \r\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultItemTemplate\"\r\n [ngTemplateOutletContext]=\"{item: item}\">\r\n </ng-container> \r\n </div>\r\n\r\n\r\n <!-- [ngClass]=\"item.class\"\t -->\r\n <div *ngFor=\"let item of presentationPointInTimeItems\"\r\n class=`sds-timeline-point-in-time-item-container ${item.class}`\r\n [style.height]=\"item.height\"\r\n [style.width]=\"item.width\"\r\n [ngStyle]=\"{\r\n 'top': 'calc(' + item.top + ' - max(calc(' + item.height +'/2), 1px))', \r\n 'left': 'calc(' + item.x + '% - max( calc(' + item.width +'/2), 1px))',\r\n \r\n }\"\r\n [style.backgroundColor]=\"item.backgroundColor\"\r\n >\r\n\r\n <ng-container \r\n [ngTemplateOutlet]=\"pointInTimeTemplate ? pointInTimeTemplate : defaultPointInTimeItemTemplate\"\r\n [ngTemplateOutletContext]=\"{item: item}\">\r\n </ng-container> \r\n\r\n </div>\r\n\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".sds-timeline-viewport{overflow:hidden}.sds-timeline-viewport .sds-timeline-container{width:100%;min-height:0;position:relative;-webkit-user-select:none;user-select:none}.sds-timeline-viewport .sds-timeline-container .sds-timeline-day-header{height:1.6rem;position:relative}.sds-timeline-viewport .sds-timeline-container .sds-timeline-day-header .sds-day-label{position:absolute;display:inline;text-align:center;font-size:.875rem}.sds-timeline-viewport .sds-timeline-container .sds-timeline-hour-header{height:1.6rem;position:relative;font-size:.8em}.sds-timeline-viewport .sds-timeline-container .sds-timeline-hour-header .sds-hour-label{position:absolute;display:inline;text-align:center;font-size:.875rem}.sds-timeline-viewport .sds-timeline-container .sds-timeline{position:relative}.sds-timeline-viewport .sds-timeline-container .sds-timeline .sds-timeline-tick{border-left:1px solid rgb(187,187,187);height:100%;position:absolute;display:inline}.sds-timeline-viewport .sds-timeline-container .sds-timeline .sds-timeline-item-container{height:100%;position:absolute;display:inline;top:20%;height:60%}.sds-timeline-viewport .sds-timeline-container .sds-timeline .sds-timeline-item-container .sds-timeline-item{position:relative;width:100%}.sds-timeline-viewport .sds-timeline-container .sds-timeline .sds-timeline-point-in-time-item-container{width:1px;height:1px;position:absolute}.sds-timeline-viewport .sds-timeline-container .sds-timeline .sds-timeline-point-in-time-item-container .sds-timeline-item{position:relative;width:100%}\n"] }]
479
+ ], template: "<ng-template #defaultItemTemplate let-item=\"item\">\n <div \n class=\"sds-timeline-item h-100\"\n [title]=\"item.hint\"\n >\n </div>\n</ng-template>\n\n<ng-template #defaultPointInTimeItemTemplate let-item=\"item\">\n <div \n class=\"sds-timeline-item h-100\"\n [title]=\"item.hint\"\n >\n </div>\n</ng-template>\n\n<ng-template #defaultDayLabelTemplate let-label=\"label\">\n {{label.label}}\n</ng-template>\n\n<div \n #viewport\n class=\"sds-timeline-viewport\"\n (wheel)=\"onScroll($event)\"\n\n (mousedown)=\"onDragStart($event)\"\n (touchstart)=\"onDragStart($event)\"\n >\n\n <div \n class=\"sds-timeline-container d-flex flex-column\"\n [style.left.%]=\"viewOffsetPercent\"\n [style.width.%]=\"zoomPercent\"\n [style.cursor]=\"isDragging ? 'ew-resize' : defaultCursor\"\n >\n\n <div\n *ngIf=\"showDayLabels\" \n class=\"sds-timeline-day-header\">\n\n <div \n *ngFor=\"let label of dayLabels\"\n class=\"sds-day-label\" \n [ngClass]=\"dayLabelClass ?? null\"\n [style.left.%]=\"label.x\"\n [style.width.%]=\"label.width\"\n >\n <ng-container \n [ngTemplateOutlet]=\"dayLabelTemplate ? dayLabelTemplate : defaultDayLabelTemplate\"\n [ngTemplateOutletContext]=\"{label: label}\">\n </ng-container> \n </div>\n </div>\n\n <div \n *ngIf=\"showHourLabels\" \n class=\"sds-timeline-hour-header\">\n\n <div \n *ngFor=\"let label of hourLabels;\"\n class=\"sds-hour-label\" \n [ngClass]=\"hourLabelClass ?? null\"\n [style.left.%]=\"label.x\"\n [style.width.rem]=\"1.2\"\n [ngStyle]=\"{'left': 'calc(' + label.x + '% - 0.6rem)'}\"\n >\n \n {{label.label}}\n \n </div>\n </div>\n\n <div \n *ngIf=\"showTimeline\"\n class=\"sds-timeline flex-grow-1\"\n [style.height]=\"timelineHeight\"\n >\n\n <div \n *ngFor=\"let tick of hourTicks\"\n class=\"sds-timeline-tick\" \n [ngClass]=\"hourTickClass ?? null\"\t\n [ngStyle]=\"tick.x == 100 ? {'left': 'calc(' + tick.x +'% - 1px)'} : {'left': 'calc(' + tick.x + '% - 0.5px)'}\"\n >\n </div>\n\n <div \n *ngFor=\"let item of presentationItems\"\n class=\"sds-timeline-item-container\"\n [ngClass]=\"item.class ?? null\"\n [ngStyle]=\"{\n 'width': 'max(' + item.width +'%, 1px)',\n 'top': 'calc(' + item.top + ' - max(calc(' + item.height +'/2), 1px))', \n }\"\n\n [style.left.%]=\"item.x\"\n [style.height]=\"item.height\"\n [style.backgroundColor]=\"item.backgroundColor\"\n >\n\n <ng-container \n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultItemTemplate\"\n [ngTemplateOutletContext]=\"{item: item}\">\n </ng-container> \n </div>\n\n\n <!-- [ngClass]=\"item.class\"\t -->\n <div *ngFor=\"let item of presentationPointInTimeItems\"\n class=`sds-timeline-point-in-time-item-container ${item.class}`\n [style.height]=\"item.height\"\n [style.width]=\"item.width\"\n [ngStyle]=\"{\n 'top': 'calc(' + item.top + ' - max(calc(' + item.height +'/2), 1px))', \n 'left': 'calc(' + item.x + '% - max( calc(' + item.width +'/2), 1px))',\n \n }\"\n [style.backgroundColor]=\"item.backgroundColor\"\n >\n\n <ng-container \n [ngTemplateOutlet]=\"pointInTimeTemplate ? pointInTimeTemplate : defaultPointInTimeItemTemplate\"\n [ngTemplateOutletContext]=\"{item: item}\">\n </ng-container> \n\n </div>\n\n </div>\n </div>\n</div>\n", styles: [".sds-timeline-viewport{overflow:hidden}.sds-timeline-viewport .sds-timeline-container{width:100%;min-height:0;position:relative;-webkit-user-select:none;user-select:none}.sds-timeline-viewport .sds-timeline-container .sds-timeline-day-header{height:1.6rem;position:relative}.sds-timeline-viewport .sds-timeline-container .sds-timeline-day-header .sds-day-label{position:absolute;display:inline;text-align:center;font-size:.875rem}.sds-timeline-viewport .sds-timeline-container .sds-timeline-hour-header{height:1.6rem;position:relative;font-size:.8em}.sds-timeline-viewport .sds-timeline-container .sds-timeline-hour-header .sds-hour-label{position:absolute;display:inline;text-align:center;font-size:.875rem}.sds-timeline-viewport .sds-timeline-container .sds-timeline{position:relative}.sds-timeline-viewport .sds-timeline-container .sds-timeline .sds-timeline-tick{border-left:1px solid rgb(187,187,187);height:100%;position:absolute;display:inline}.sds-timeline-viewport .sds-timeline-container .sds-timeline .sds-timeline-item-container{height:100%;position:absolute;display:inline;top:20%;height:60%}.sds-timeline-viewport .sds-timeline-container .sds-timeline .sds-timeline-item-container .sds-timeline-item{position:relative;width:100%}.sds-timeline-viewport .sds-timeline-container .sds-timeline .sds-timeline-point-in-time-item-container{width:1px;height:1px;position:absolute}.sds-timeline-viewport .sds-timeline-container .sds-timeline .sds-timeline-point-in-time-item-container .sds-timeline-item{position:relative;width:100%}\n"] }]
472
480
  }], ctorParameters: () => [], propDecorators: { start: [{
473
481
  type: Input
474
482
  }], end: [{
@@ -521,6 +529,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
521
529
  type: Input
522
530
  }], cutOffset: [{
523
531
  type: Input
532
+ }], defaultCursor: [{
533
+ type: Input
524
534
  }], _viewport: [{
525
535
  type: ViewChild,
526
536
  args: ['viewport', { static: true }]
@@ -1 +1 @@
1
- {"version":3,"file":"spicainternational-ngx-sds-components-src-lib-timeline.mjs","sources":["../../../projects/ngx-sds-components/src/lib/timeline/services/timeline.service.ts","../../../projects/ngx-sds-components/src/lib/timeline/components/timeline.component.ts","../../../projects/ngx-sds-components/src/lib/timeline/components/timeline.component.html","../../../projects/ngx-sds-components/src/lib/timeline/spicainternational-ngx-sds-components-src-lib-timeline.ts"],"sourcesContent":["import { TimelineIntervalLabel, TimelineTick } from '../models/timeline.model';\r\nimport { TimelineCustomDateDataProvider, TimelineTickFrequency } from '../types/timeline.types';\r\n\r\nexport class SdsTimelineService {\r\n\r\n private startWithOffset: Date = new Date();\r\n private endWithOffset: Date = new Date();\r\n\r\n private start: Date = new Date();\r\n private end: Date = new Date();\r\n\r\n private cutOffset = true;\r\n\r\n\r\n private widthPercentPerMinute: number;\r\n\r\n private hourTicks: TimelineTick[] = [];\r\n\r\n \r\n constructor(start: Date, end: Date, offSetMinutes: number, cutOffset: boolean) {\r\n this.cutOffset = cutOffset;\r\n\r\n this.start = new Date(start);\r\n this.startWithOffset = new Date(start);\r\n this.startWithOffset.setMinutes(this.startWithOffset.getMinutes() - offSetMinutes);\r\n\r\n this.end = new Date(end);\r\n this.endWithOffset = new Date(end); \r\n this.endWithOffset.setMinutes(this.endWithOffset.getMinutes() + offSetMinutes);\r\n\r\n this.widthPercentPerMinute = (100 / this.diffInMinutes(this.startWithOffset, this.endWithOffset));\r\n\r\n this.initHourTicks();\r\n }\r\n\r\n public getX(time: Date): number {\r\n const trimmedTime = new Date(time);\r\n if (this.cutOffset) {\r\n if (trimmedTime < this.start) {\r\n trimmedTime.setTime(this.start.getTime());\r\n }\r\n if (trimmedTime > this.end) {\r\n trimmedTime.setTime(this.end.getTime());\r\n }\r\n }\r\n\r\n return this.diffInMinutes(this.startWithOffset, trimmedTime) * this.widthPercentPerMinute; \r\n }\r\n\r\n public getWidthFromMinutes(minutes: number): number {\r\n return minutes * this.widthPercentPerMinute;\r\n }\r\n\r\n public getWidthFromTime(start: Date, end: Date): number {\r\n const trimmedStart = new Date(start);\r\n if (this.cutOffset) {\r\n if (trimmedStart < this.start) {\r\n trimmedStart.setTime(this.start.getTime());\r\n } \r\n if (trimmedStart > this.end) {\r\n trimmedStart.setTime(this.end.getTime());\r\n }\r\n }\r\n\r\n const trimmedEnd = new Date(end);\r\n if (this.cutOffset) {\r\n if (trimmedEnd < this.start) {\r\n trimmedEnd.setTime(this.start.getTime());\r\n }\r\n if (trimmedEnd > this.end) {\r\n trimmedEnd.setTime(this.end.getTime());\r\n }\r\n }\r\n\r\n return this.getWidthFromMinutes(this.diffInMinutes(trimmedStart, trimmedEnd));\r\n }\r\n\r\n public getTick(time: Date): TimelineTick {\r\n return {\r\n date: new Date(time),\r\n x: this.getX(time),\r\n } \r\n }\r\n \r\n public getHourTicks(frequency: TimelineTickFrequency = 'hourly'): TimelineTick[] {\r\n return this.hourTicks.filter(tick => this.isValidFrequencyHour(tick.date.getHours(), frequency));\r\n }\r\n\r\n public getHourLabels(frequency: TimelineTickFrequency = 'hourly'): TimelineIntervalLabel[] {\r\n const hourLabels: TimelineIntervalLabel[] = [];\r\n\r\n const ticks = this.hourTicks.filter(tick => this.isValidFrequencyHour(tick.date.getHours(), frequency));\r\n ticks.forEach(tick => {\r\n let labelStartTime = new Date(tick.date);\r\n hourLabels.push(\r\n {\r\n x: this.getX(labelStartTime),\r\n width: 0,\r\n label: tick.date.getHours().toString(),\r\n date: new Date(labelStartTime),\r\n data: null\r\n });\r\n });\r\n return hourLabels;\r\n }\r\n\r\n public getDayLabels(\r\n locales: string | Array<string> | undefined, \r\n customDataFn: TimelineCustomDateDataProvider | undefined): TimelineIntervalLabel[] {\r\n const dayLabels = [];\r\n\r\n // get start date at the beginning of the day\r\n let startDate = new Date(this.startWithOffset);\r\n startDate.setHours(0, 0, 0, 0);\r\n\r\n // get end date at the end of the day\r\n let endDate = new Date(this.endWithOffset);\r\n endDate.setHours(23, 59, 59, 999);\r\n\r\n let currentDate = new Date(startDate);\r\n while (currentDate <= endDate) {\r\n let endOfCurrentDay = new Date(currentDate);\r\n endOfCurrentDay.setHours(23, 59, 59, 999);\r\n\r\n const dayLabelWidth = this.getWidthFromTime(currentDate, endOfCurrentDay);\r\n\r\n if (dayLabelWidth > 0) {\r\n dayLabels.push({\r\n // date: new Date(currentDate),\r\n x: this.getX(new Date(currentDate)),\r\n width: dayLabelWidth,\r\n label: currentDate.toLocaleDateString(locales ?? [], { weekday: 'long', day: 'numeric', month: 'long', year: 'numeric' }),\r\n date: new Date(currentDate),\r\n data: customDataFn ? customDataFn(new Date(currentDate)) : null\r\n });\r\n }\r\n currentDate.setDate(currentDate.getDate() + 1); \r\n }\r\n return dayLabels;\r\n } \r\n\r\n //#region Private Methods\r\n\r\n private isValidFrequencyHour(hours: number, frequency: TimelineTickFrequency) {\r\n\r\n if (frequency === 'hourly') {\r\n return true; // every tick is valid\r\n } \r\n if (frequency === '2hrs') {\r\n return hours % 2 === 0;\r\n } \r\n if (frequency === '3hrs') {\r\n return hours % 3 === 0;\r\n } \r\n if (frequency === '6hrs') {\r\n return hours % 6 === 0;\r\n }\r\n return false; // unsupported frequency\r\n }\r\n\r\n private diffInMinutes(start: Date, end: Date): number {\r\n return (end.getTime() - start.getTime()) / (1000 * 60);;\r\n }\r\n\r\n private roundHoursUp(time: Date): Date {\r\n \r\n let newTime = new Date(time);\r\n \r\n if (newTime.getMinutes() > 0 || newTime.getSeconds() > 0 || newTime.getMilliseconds() > 0) {\r\n newTime.setHours(newTime.getHours() + 1);\r\n }\r\n newTime.setMinutes(0, 0, 0);\r\n return newTime;\r\n }\r\n\r\n\r\n private roundHoursDown(time: Date) {\r\n let newTime = new Date(time);\r\n newTime.setMinutes(0, 0, 0);\r\n return newTime;\r\n }\r\n \r\n\r\n private initHourTicks(): void {\r\n this.hourTicks = [];\r\n\r\n // get first whole hour from start date\r\n let startHour = this.roundHoursUp(this.startWithOffset);\r\n\r\n // get last whole hour from end date\r\n let endHour = this.roundHoursDown(this.endWithOffset);\r\n\r\n let currentHour = new Date(startHour)\r\n while (currentHour <= endHour) {\r\n this.hourTicks.push(this.getTick(currentHour));\r\n currentHour.setHours(currentHour.getHours() + 1);\r\n }\r\n }\r\n \r\n //#endregion\r\n\r\n}\r\n","import {\r\n AfterViewInit,\r\n Component,\r\n ElementRef,\r\n HostListener,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n TemplateRef,\r\n ViewChild,\r\n EventEmitter\r\n} from '@angular/core';\r\nimport { TimelineCustomDateDataProvider, TimelineTickFrequency } from '../types/timeline.types';\r\nimport { SdsTimelineService } from '../services/timeline.service';\r\nimport {\r\n TimelineIntervalLabel,\r\n TimelineItem,\r\n TimelineItemPresentation,\r\n TimelinePointInTimeItem,\r\n TimelinePointInTimeItemPresentation,\r\n TimelineTick,\r\n} from '../models/timeline.model';\r\nimport { NgIf, NgFor, NgStyle, NgTemplateOutlet, NgClass } from '@angular/common';\r\n\r\n@Component({\r\n selector: 'sds-timeline',\r\n templateUrl: './timeline.component.html',\r\n styleUrls: ['./timeline.component.scss'],\r\n standalone: true,\r\n imports: [\r\n NgIf,\r\n NgFor,\r\n NgStyle,\r\n NgClass,\r\n NgTemplateOutlet,\r\n ],\r\n})\r\nexport class SdsTimelineComponent implements OnInit, OnChanges, AfterViewInit {\r\n /**\r\n * The start date and time for the timeline.\r\n *\r\n * @type {Date}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() start: Date = new Date();\r\n\r\n /**\r\n * The end date and time for the timeline.\r\n *\r\n * @type {Date}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() end: Date = new Date();\r\n\r\n /**\r\n * The period based items to be displayed on the timeline. Specify data if you need \r\n * additional data for custom rendering of the items.\r\n *\r\n * @type {TimelineItem[]}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() items: TimelineItem[] = [];\r\n\r\n /**\r\n * Items to be displayed on the timeline at a specific point in time.\r\n * Specify data if you need additional data for custom rendering of the items.\r\n *\r\n * @type {TimelinePointInTimeItem[]}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() pointInTimeItems: TimelinePointInTimeItem[] = [];\r\n\r\n /**\r\n * The template to be used for custom rendering of the items.\r\n *\r\n * @type {(TemplateRef<any> | undefined)}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() itemTemplate: TemplateRef<any> | undefined = undefined;\r\n\r\n /**\r\n * The template to be used for custom rendering of the poin-in-time items.\r\n *\r\n * @type {(TemplateRef<any> | undefined)}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() pointInTimeTemplate: TemplateRef<any> | undefined = undefined;\r\n\r\n /**\r\n * The template to be used for custom rendering of the day labels.\r\n *\r\n * @type {(TemplateRef<any> | undefined)}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() dayLabelTemplate: TemplateRef<any> | undefined = undefined;\r\n \r\n /**\r\n * A custom data function for the day labels. \r\n * This function takes a Date object as input and returns any custom data that will be available for the custom template\r\n *\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() dayLabelCustomDataFn: TimelineCustomDateDataProvider | undefined = undefined;\r\n\r\n /**\r\n * The frequency of the ticks on the timeline.\r\n *\r\n * @type {TimelineTickFrequency}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() tickFrequency: TimelineTickFrequency = 'hourly';\r\n\r\n /**\r\n * The frequency of the hour labels on the timeline.\r\n *\r\n * @type {TimelineTickFrequency}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() hourLabelFrequency: TimelineTickFrequency = '3hrs';\r\n\r\n\r\n /**\r\n * The current zoom level of the timeline. In percent.\r\n *\r\n * @type {number}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() zoomPercent: number = 100;\r\n @Output() zoomPercentChange = new EventEmitter<number>();\r\n\r\n /**\r\n * Initial offset of the viewport in percent. This is used in scenarios \r\n * with multiple days when you want to show non-first day as defult.\r\n *\r\n * @type {number}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() viewOffsetPercent: number = 0;\r\n @Output() viewOffsetPercentChange = new EventEmitter<number>();\r\n\r\n /**\r\n * The maximum allowed zoom level of the timeline. In percent.\r\n *\r\n * @type {number}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() maxZoomPercent: number = 500;\r\n\r\n /**\r\n * Whether to show hour labels.\r\n *\r\n * @type {boolean}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() showHourLabels: boolean = true;\r\n\r\n /**\r\n * The CSS class to be applied to the hour labels.\r\n *\r\n * @type {string}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() hourLabelClass?: string;\r\n\r\n /**\r\n * Whether to show day labels. \r\n *\r\n * @type {boolean}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() showDayLabels: boolean = false;\r\n\r\n /**\r\n * The CSS class to be applied to the day labels.\r\n *\r\n * @type {string}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() dayLabelClass?: string;\r\n\r\n /**\r\n * Whether to show timeline. Useful for hiding the timeline when we only need header.\r\n *\r\n * @type {boolean}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() showTimeline: boolean = true; \r\n\r\n /**\r\n * The CSS class to be applied to the hour ticks.\r\n *\r\n * @type {string}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() hourTickClass?: string;\r\n\r\n /**\r\n * The height of the timeline. Default is 2rem.\r\n *\r\n * @type {string}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() timelineHeight: string = '2rem';\r\n\r\n /**\r\n * Whether to enable zoom and drag functionality.\r\n *\r\n * @type {boolean}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() enableZoomAndDrag: boolean = true;\r\n\r\n /**\r\n * Number of minutes added to start and stop to fit the data on the edges\r\n *\r\n * @type {number}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() offSetMinutes: number = 15;\r\n\r\n /**\r\n * The locales to be used for formatting the timeline.\r\n *\r\n * @type {(string | Array<string>)}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() locales?: string | Array<string>;\r\n\r\n /**\r\n * Control if those parts of segments (or whole segments) that fall into the Offset \r\n * period are displayed or not\r\n *\r\n * @type {boolean}\r\n * @memberof SdsTimelineComponent\r\n */\r\n @Input() cutOffset: boolean = false;\r\n\r\n // protected\r\n hourTicks: TimelineTick[] = [];\r\n hourLabels: TimelineIntervalLabel[] = [];\r\n dayLabels: TimelineIntervalLabel[] = [];\r\n\r\n private _timelineService: SdsTimelineService = new SdsTimelineService(\r\n this.start,\r\n this.end,\r\n this.offSetMinutes,\r\n this.cutOffset\r\n );\r\n\r\n public presentationItems: TimelineItemPresentation[] = [];\r\n public presentationPointInTimeItems: TimelinePointInTimeItemPresentation[] = [];\r\n\r\n public isDragging = false;\r\n public initialDragX = 0;\r\n\r\n private viewOffsetPercentDragStart = 0;\r\n\r\n @ViewChild('viewport', { static: true }) _viewport: ElementRef | undefined;\r\n\r\n constructor() {}\r\n\r\n ngAfterViewInit(): void {\r\n this.generateTicks();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (this.start && this.end) {\r\n this._timelineService = new SdsTimelineService(\r\n this.start,\r\n this.end,\r\n this.offSetMinutes,\r\n this.cutOffset\r\n );\r\n this.generateTicks();\r\n this.generateInternalTimelineItems();\r\n }\r\n\r\n if (changes['start'] || changes['end'] || changes['offSetMinutes'] || changes['cutOffset']) {\r\n this._timelineService = new SdsTimelineService(\r\n this.start,\r\n this.end,\r\n this.offSetMinutes,\r\n this.cutOffset\r\n );\r\n this.generateTicks();\r\n this.generateInternalTimelineItems(); \r\n }\r\n\r\n if (changes['items']) {\r\n this.generateInternalTimelineItems();\r\n }\r\n\r\n if (changes['pointInTimeItems']) {\r\n this.generateInternalTimelinePointInTimeItems();\r\n }\r\n\r\n if (changes['zoomPercent']) {\r\n // this.viewOffsetPercent = (this.zoomPercent - 100) / -2;\r\n }\r\n\r\n if (changes['showDayLabels'] || changes['showHourLabels']) {\r\n this.generateTicks();\r\n } \r\n }\r\n\r\n ngOnInit(): void {}\r\n\r\n //#region mouse wheel zoom\r\n onScroll(event: WheelEvent): void {\r\n if (this.enableZoomAndDrag) {\r\n\r\n event.preventDefault();\r\n\r\n const delta = Math.sign(event.deltaY);\r\n const newZoomPercent = Math.min(\r\n Math.max(this.zoomPercent + -delta * 20, 100),\r\n this.maxZoomPercent\r\n );\r\n const deltaZoomPercent = newZoomPercent - this.zoomPercent;\r\n this.zoomPercent = newZoomPercent;\r\n this.zoomPercentChange.emit(this.zoomPercent);\r\n \r\n // get the relative position of the cursor on the viewport so we can zoom in into this position\r\n const x = event.clientX - this._viewport?.nativeElement.getBoundingClientRect().left;\r\n const cursorRelativePosition = x / this._viewport?.nativeElement.getBoundingClientRect().width;\r\n // this.viewOffsetPercent = this.viewOffsetPercent - deltaZoomPercent * cursorRelativePosition;\r\n\r\n this.constrainOffset(this.viewOffsetPercent - deltaZoomPercent * cursorRelativePosition);\r\n }\r\n }\r\n //#endregion\r\n\r\n //#region dragging\r\n \r\n public onDragStart(event: MouseEvent | TouchEvent): void {\r\n if (this.enableZoomAndDrag && this.zoomPercent > 100) {\r\n event.preventDefault();\r\n this.isDragging = true;\r\n this.viewOffsetPercentDragStart = this.viewOffsetPercent;\r\n\r\n if (event instanceof MouseEvent) {\r\n this.initialDragX = event.clientX;\r\n } else if (event instanceof TouchEvent) {\r\n this.initialDragX = event.touches[0].clientX;\r\n }\r\n }\r\n }\r\n\r\n @HostListener('window:mousemove', ['$event'])\r\n public onDragMove(event: MouseEvent): void {\r\n if (this.enableZoomAndDrag) {\r\n if (this.isDragging) {\r\n const currentX = event.clientX;\r\n this.moveElement(currentX);\r\n }\r\n }\r\n }\r\n\r\n @HostListener('window:touchmove', ['$event'])\r\n onDragMoveTouch(event: TouchEvent): void {\r\n if (this.enableZoomAndDrag) {\r\n if (this.isDragging) {\r\n const currentX = event.touches[0].clientX;\r\n this.moveElement(currentX);\r\n }\r\n }\r\n }\r\n\r\n @HostListener('window:mouseup', ['$event'])\r\n @HostListener('window:touchend', ['$event'])\r\n public onDragEnd(event: MouseEvent | TouchEvent): void {\r\n if (this.enableZoomAndDrag) {\r\n this.isDragging = false;\r\n }\r\n }\r\n\r\n private moveElement(currentX: number): void {\r\n const diff = currentX - this.initialDragX;\r\n if (this._viewport && this._viewport.nativeElement) {\r\n const diffInPercent = (diff / this._viewport?.nativeElement.getBoundingClientRect().width) * 100;\r\n // this.viewOffsetPercent = this.viewOffsetPercentDragStart + diffInPercent;\r\n this.constrainOffset(this.viewOffsetPercentDragStart + diffInPercent);\r\n }\r\n }\r\n\r\n //#endregion\r\n\r\n private constrainOffset(newOffset: number): void { \r\n if (this.zoomPercent + newOffset < 100) {\r\n newOffset = -this.zoomPercent + 100;\r\n }\r\n newOffset = Math.min(0, newOffset);\r\n if (newOffset != this.viewOffsetPercent) {\r\n this.viewOffsetPercent = newOffset;\r\n this.viewOffsetPercentChange.emit(this.viewOffsetPercent);\r\n }\r\n }\r\n\r\n private generateTicks(): void {\r\n this.hourTicks = this._timelineService.getHourTicks(this.tickFrequency);\r\n this.dayLabels = this._timelineService.getDayLabels(this.locales, this.dayLabelCustomDataFn);\r\n this.hourLabels = this._timelineService.getHourLabels(this.hourLabelFrequency);\r\n }\r\n\r\n private generateInternalTimelineItems(): void {\r\n const cuttOffStart = this.cutOffset ? this.start : new Date(this.start.getTime() - this.offSetMinutes * 60000);\r\n const cuttOffEnd = this.cutOffset ? this.end : new Date(this.end.getTime() + this.offSetMinutes * 60000);\r\n\r\n this.presentationItems = this.items\r\n .filter((item) => item.end < cuttOffStart || item.start > cuttOffEnd ? false : true)\r\n .map((item) => {\r\n const startTime = new Date(item.start).toLocaleTimeString(this.locales?? [], { hour: 'numeric', minute: '2-digit' });\r\n const endTime = new Date(item.end).toLocaleTimeString(this.locales?? [], { hour: 'numeric', minute: '2-digit' });\r\n const timeRange = `${startTime} - ${endTime}`;\r\n \r\n return {\r\n data: item.data,\r\n x: this._timelineService.getX(item.start),\r\n width: this._timelineService.getWidthFromTime(\r\n item.start,\r\n item.end\r\n ),\r\n hint: item.hint ?? timeRange,\r\n backgroundColor: item.backgroundColor,\r\n top: item.top ?? '50%',\r\n height: item.height ?? '60%',\r\n class: item.class,\r\n };\r\n });\r\n }\r\n\r\n\r\n private generateInternalTimelinePointInTimeItems(): void {\r\n const cuttOffStart = this.cutOffset ? this.start : new Date(this.start.getTime() - this.offSetMinutes * 60000);\r\n const cuttOffEnd = this.cutOffset ? this.end : new Date(this.end.getTime() + this.offSetMinutes * 60000);\r\n\r\n this.presentationPointInTimeItems = this.pointInTimeItems\r\n .filter((item) => item.date < cuttOffStart || item.date > cuttOffEnd ? false : true)\r\n .map((item) => {\r\n\r\n const timePointString = new Date(item.date).toLocaleTimeString(this.locales?? [], { hour: 'numeric', minute: '2-digit' });\r\n\r\n return {\r\n data: item.data,\r\n x: this._timelineService.getX(item.date),\r\n hint: item.hint ?? timePointString,\r\n top: item.top ?? '20%',\r\n height: item.height ?? '1rem',\r\n width: item.width ?? '1rem',\r\n class: item.class,\r\n backgroundColor: item.backgroundColor,\r\n };\r\n });\r\n }\r\n}\r\n","<ng-template #defaultItemTemplate let-item=\"item\">\r\n <div \r\n class=\"sds-timeline-item h-100\"\r\n [title]=\"item.hint\"\r\n >\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #defaultPointInTimeItemTemplate let-item=\"item\">\r\n <div \r\n class=\"sds-timeline-item h-100\"\r\n [title]=\"item.hint\"\r\n >\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #defaultDayLabelTemplate let-label=\"label\">\r\n {{label.label}}\r\n</ng-template>\r\n\r\n<div \r\n #viewport\r\n class=\"sds-timeline-viewport\"\r\n (wheel)=\"onScroll($event)\"\r\n\r\n (mousedown)=\"onDragStart($event)\"\r\n (touchstart)=\"onDragStart($event)\"\r\n >\r\n\r\n <div \r\n class=\"sds-timeline-container d-flex flex-column\"\r\n [style.left.%]=\"viewOffsetPercent\"\r\n [style.width.%]=\"zoomPercent\"\r\n [style.cursor]=\"isDragging ? 'ew-resize' : 'default'\"\r\n >\r\n\r\n <div\r\n *ngIf=\"showDayLabels\" \r\n class=\"sds-timeline-day-header\">\r\n\r\n <div \r\n *ngFor=\"let label of dayLabels\"\r\n class=\"sds-day-label\" \r\n [ngClass]=\"dayLabelClass ?? null\"\r\n [style.left.%]=\"label.x\"\r\n [style.width.%]=\"label.width\"\r\n >\r\n <ng-container \r\n [ngTemplateOutlet]=\"dayLabelTemplate ? dayLabelTemplate : defaultDayLabelTemplate\"\r\n [ngTemplateOutletContext]=\"{label: label}\">\r\n </ng-container> \r\n </div>\r\n </div>\r\n\r\n <div \r\n *ngIf=\"showHourLabels\" \r\n class=\"sds-timeline-hour-header\">\r\n\r\n <div \r\n *ngFor=\"let label of hourLabels;\"\r\n class=\"sds-hour-label\" \r\n [ngClass]=\"hourLabelClass ?? null\"\r\n [style.left.%]=\"label.x\"\r\n [style.width.rem]=\"1.2\"\r\n [ngStyle]=\"{'left': 'calc(' + label.x + '% - 0.6rem)'}\"\r\n >\r\n \r\n {{label.label}}\r\n \r\n </div>\r\n </div>\r\n\r\n <div \r\n *ngIf=\"showTimeline\"\r\n class=\"sds-timeline flex-grow-1\"\r\n [style.height]=\"timelineHeight\"\r\n >\r\n\r\n <div \r\n *ngFor=\"let tick of hourTicks\"\r\n class=\"sds-timeline-tick\" \r\n [ngClass]=\"hourTickClass ?? null\"\t\r\n [ngStyle]=\"tick.x == 100 ? {'left': 'calc(' + tick.x +'% - 1px)'} : {'left': 'calc(' + tick.x + '% - 0.5px)'}\"\r\n >\r\n </div>\r\n\r\n <div \r\n *ngFor=\"let item of presentationItems\"\r\n class=\"sds-timeline-item-container\"\r\n [ngClass]=\"item.class ?? null\"\r\n [ngStyle]=\"{\r\n 'width': 'max(' + item.width +'%, 1px)',\r\n 'top': 'calc(' + item.top + ' - max(calc(' + item.height +'/2), 1px))', \r\n }\"\r\n\r\n [style.left.%]=\"item.x\"\r\n [style.height]=\"item.height\"\r\n [style.backgroundColor]=\"item.backgroundColor\"\r\n >\r\n\r\n <ng-container \r\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultItemTemplate\"\r\n [ngTemplateOutletContext]=\"{item: item}\">\r\n </ng-container> \r\n </div>\r\n\r\n\r\n <!-- [ngClass]=\"item.class\"\t -->\r\n <div *ngFor=\"let item of presentationPointInTimeItems\"\r\n class=`sds-timeline-point-in-time-item-container ${item.class}`\r\n [style.height]=\"item.height\"\r\n [style.width]=\"item.width\"\r\n [ngStyle]=\"{\r\n 'top': 'calc(' + item.top + ' - max(calc(' + item.height +'/2), 1px))', \r\n 'left': 'calc(' + item.x + '% - max( calc(' + item.width +'/2), 1px))',\r\n \r\n }\"\r\n [style.backgroundColor]=\"item.backgroundColor\"\r\n >\r\n\r\n <ng-container \r\n [ngTemplateOutlet]=\"pointInTimeTemplate ? pointInTimeTemplate : defaultPointInTimeItemTemplate\"\r\n [ngTemplateOutletContext]=\"{item: item}\">\r\n </ng-container> \r\n\r\n </div>\r\n\r\n </div>\r\n </div>\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAGa,kBAAkB,CAAA;AAgB3B,IAAA,WAAA,CAAY,KAAW,EAAE,GAAS,EAAE,aAAqB,EAAE,SAAkB,EAAA;AAdrE,QAAA,IAAA,CAAA,eAAe,GAAS,IAAI,IAAI,EAAE;AAClC,QAAA,IAAA,CAAA,aAAa,GAAS,IAAI,IAAI,EAAE;AAEhC,QAAA,IAAA,CAAA,KAAK,GAAS,IAAI,IAAI,EAAE;AACxB,QAAA,IAAA,CAAA,GAAG,GAAS,IAAI,IAAI,EAAE;QAEtB,IAAS,CAAA,SAAA,GAAG,IAAI;QAKhB,IAAS,CAAA,SAAA,GAAmB,EAAE;AAIlC,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;QAE1B,IAAI,CAAC,KAAK,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC;QAC5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B,EAAA,CAAA;sBAA5B;gBAQQ,aAAa,EAAA,CAAA;sBAArB;gBAQQ,kBAAkB,EAAA,CAAA;sBAA1B;gBASQ,WAAW,EAAA,CAAA;sBAAnB;gBACS,iBAAiB,EAAA,CAAA;sBAA1B;gBASQ,iBAAiB,EAAA,CAAA;sBAAzB;gBACS,uBAAuB,EAAA,CAAA;sBAAhC;gBAQQ,cAAc,EAAA,CAAA;sBAAtB;gBAQQ,cAAc,EAAA,CAAA;sBAAtB;gBAQQ,cAAc,EAAA,CAAA;sBAAtB;gBAQQ,aAAa,EAAA,CAAA;sBAArB;gBAQQ,aAAa,EAAA,CAAA;sBAArB;gBAQQ,YAAY,EAAA,CAAA;sBAApB;gBAQQ,aAAa,EAAA,CAAA;sBAArB;gBAQQ,cAAc,EAAA,CAAA;sBAAtB;gBAQQ,iBAAiB,EAAA,CAAA;sBAAzB;gBAQQ,aAAa,EAAA,CAAA;sBAArB;gBAQQ,OAAO,EAAA,CAAA;sBAAf;gBASQ,SAAS,EAAA,CAAA;sBAAjB;gBAsBwC,SAAS,EAAA,CAAA;sBAAjD,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,UAAU,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;gBA4FhC,UAAU,EAAA,CAAA;sBADhB,YAAY;uBAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC;gBAW5C,eAAe,EAAA,CAAA;sBADd,YAAY;uBAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC;gBAYrC,SAAS,EAAA,CAAA;sBAFf,YAAY;uBAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;;sBACzC,YAAY;uBAAC,iBAAiB,EAAE,CAAC,QAAQ,CAAC;;;AEnX/C;;AAEG;;;;"}
1
+ {"version":3,"file":"spicainternational-ngx-sds-components-src-lib-timeline.mjs","sources":["../../../projects/ngx-sds-components/src/lib/timeline/services/timeline.service.ts","../../../projects/ngx-sds-components/src/lib/timeline/components/timeline.component.ts","../../../projects/ngx-sds-components/src/lib/timeline/components/timeline.component.html","../../../projects/ngx-sds-components/src/lib/timeline/spicainternational-ngx-sds-components-src-lib-timeline.ts"],"sourcesContent":["import { TimelineIntervalLabel, TimelineTick } from '../models/timeline.model';\nimport { TimelineCustomDateDataProvider, TimelineTickFrequency } from '../types/timeline.types';\n\nexport class SdsTimelineService {\n\n private startWithOffset: Date = new Date();\n private endWithOffset: Date = new Date();\n\n private start: Date = new Date();\n private end: Date = new Date();\n\n private cutOffset = true;\n\n\n private widthPercentPerMinute: number;\n\n private hourTicks: TimelineTick[] = [];\n\n \n constructor(start: Date, end: Date, offSetMinutes: number, cutOffset: boolean) {\n this.cutOffset = cutOffset;\n\n this.start = new Date(start);\n this.startWithOffset = new Date(start);\n this.startWithOffset.setMinutes(this.startWithOffset.getMinutes() - offSetMinutes);\n\n this.end = new Date(end);\n this.endWithOffset = new Date(end); \n this.endWithOffset.setMinutes(this.endWithOffset.getMinutes() + offSetMinutes);\n\n this.widthPercentPerMinute = (100 / this.diffInMinutes(this.startWithOffset, this.endWithOffset));\n\n this.initHourTicks();\n }\n\n public getX(time: Date): number {\n const trimmedTime = new Date(time);\n if (this.cutOffset) {\n if (trimmedTime < this.start) {\n trimmedTime.setTime(this.start.getTime());\n }\n if (trimmedTime > this.end) {\n trimmedTime.setTime(this.end.getTime());\n }\n }\n\n return this.diffInMinutes(this.startWithOffset, trimmedTime) * this.widthPercentPerMinute; \n }\n\n public getWidthFromMinutes(minutes: number): number {\n return minutes * this.widthPercentPerMinute;\n }\n\n public getWidthFromTime(start: Date, end: Date): number {\n const trimmedStart = new Date(start);\n if (this.cutOffset) {\n if (trimmedStart < this.start) {\n trimmedStart.setTime(this.start.getTime());\n } \n if (trimmedStart > this.end) {\n trimmedStart.setTime(this.end.getTime());\n }\n }\n\n const trimmedEnd = new Date(end);\n if (this.cutOffset) {\n if (trimmedEnd < this.start) {\n trimmedEnd.setTime(this.start.getTime());\n }\n if (trimmedEnd > this.end) {\n trimmedEnd.setTime(this.end.getTime());\n }\n }\n\n return this.getWidthFromMinutes(this.diffInMinutes(trimmedStart, trimmedEnd));\n }\n\n public getTick(time: Date): TimelineTick {\n return {\n date: new Date(time),\n x: this.getX(time),\n } \n }\n \n public getHourTicks(frequency: TimelineTickFrequency = 'hourly'): TimelineTick[] {\n return this.hourTicks.filter(tick => this.isValidFrequencyHour(tick.date.getHours(), frequency));\n }\n\n public getHourLabels(frequency: TimelineTickFrequency = 'hourly'): TimelineIntervalLabel[] {\n const hourLabels: TimelineIntervalLabel[] = [];\n\n const ticks = this.hourTicks.filter(tick => this.isValidFrequencyHour(tick.date.getHours(), frequency));\n ticks.forEach(tick => {\n let labelStartTime = new Date(tick.date);\n hourLabels.push(\n {\n x: this.getX(labelStartTime),\n width: 0,\n label: tick.date.getHours().toString(),\n date: new Date(labelStartTime),\n data: null\n });\n });\n return hourLabels;\n }\n\n public getDayLabels(\n locales: string | Array<string> | undefined, \n customDataFn: TimelineCustomDateDataProvider | undefined): TimelineIntervalLabel[] {\n const dayLabels = [];\n\n // get start date at the beginning of the day\n let startDate = new Date(this.startWithOffset);\n startDate.setHours(0, 0, 0, 0);\n\n // get end date at the end of the day\n let endDate = new Date(this.endWithOffset);\n endDate.setHours(23, 59, 59, 999);\n\n let currentDate = new Date(startDate);\n while (currentDate <= endDate) {\n let endOfCurrentDay = new Date(currentDate);\n endOfCurrentDay.setHours(23, 59, 59, 999);\n\n const dayLabelWidth = this.getWidthFromTime(currentDate, endOfCurrentDay);\n\n if (dayLabelWidth > 0) {\n dayLabels.push({\n // date: new Date(currentDate),\n x: this.getX(new Date(currentDate)),\n width: dayLabelWidth,\n label: currentDate.toLocaleDateString(locales ?? [], { weekday: 'long', day: 'numeric', month: 'long', year: 'numeric' }),\n date: new Date(currentDate),\n data: customDataFn ? customDataFn(new Date(currentDate)) : null\n });\n }\n currentDate.setDate(currentDate.getDate() + 1); \n }\n return dayLabels;\n } \n\n //#region Private Methods\n\n private isValidFrequencyHour(hours: number, frequency: TimelineTickFrequency) {\n\n if (frequency === 'hourly') {\n return true; // every tick is valid\n } \n if (frequency === '2hrs') {\n return hours % 2 === 0;\n } \n if (frequency === '3hrs') {\n return hours % 3 === 0;\n } \n if (frequency === '6hrs') {\n return hours % 6 === 0;\n }\n return false; // unsupported frequency\n }\n\n private diffInMinutes(start: Date, end: Date): number {\n return (end.getTime() - start.getTime()) / (1000 * 60);;\n }\n\n private roundHoursUp(time: Date): Date {\n \n let newTime = new Date(time);\n \n if (newTime.getMinutes() > 0 || newTime.getSeconds() > 0 || newTime.getMilliseconds() > 0) {\n newTime.setHours(newTime.getHours() + 1);\n }\n newTime.setMinutes(0, 0, 0);\n return newTime;\n }\n\n\n private roundHoursDown(time: Date) {\n let newTime = new Date(time);\n newTime.setMinutes(0, 0, 0);\n return newTime;\n }\n \n\n private initHourTicks(): void {\n this.hourTicks = [];\n\n // get first whole hour from start date\n let startHour = this.roundHoursUp(this.startWithOffset);\n\n // get last whole hour from end date\n let endHour = this.roundHoursDown(this.endWithOffset);\n\n let currentHour = new Date(startHour)\n while (currentHour <= endHour) {\n this.hourTicks.push(this.getTick(currentHour));\n currentHour.setHours(currentHour.getHours() + 1);\n }\n }\n \n //#endregion\n\n}\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n HostListener,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n EventEmitter\n} from '@angular/core';\nimport { TimelineCustomDateDataProvider, TimelineTickFrequency } from '../types/timeline.types';\nimport { SdsTimelineService } from '../services/timeline.service';\nimport {\n TimelineIntervalLabel,\n TimelineItem,\n TimelineItemPresentation,\n TimelinePointInTimeItem,\n TimelinePointInTimeItemPresentation,\n TimelineTick,\n} from '../models/timeline.model';\nimport { NgIf, NgFor, NgStyle, NgTemplateOutlet, NgClass } from '@angular/common';\n\n@Component({\n selector: 'sds-timeline',\n templateUrl: './timeline.component.html',\n styleUrls: ['./timeline.component.scss'],\n standalone: true,\n imports: [\n NgIf,\n NgFor,\n NgStyle,\n NgClass,\n NgTemplateOutlet,\n ],\n})\nexport class SdsTimelineComponent implements OnInit, OnChanges, AfterViewInit {\n /**\n * The start date and time for the timeline.\n *\n * @type {Date}\n * @memberof SdsTimelineComponent\n */\n @Input() start: Date = new Date();\n\n /**\n * The end date and time for the timeline.\n *\n * @type {Date}\n * @memberof SdsTimelineComponent\n */\n @Input() end: Date = new Date();\n\n /**\n * The period based items to be displayed on the timeline. Specify data if you need \n * additional data for custom rendering of the items.\n *\n * @type {TimelineItem[]}\n * @memberof SdsTimelineComponent\n */\n @Input() items: TimelineItem[] = [];\n\n /**\n * Items to be displayed on the timeline at a specific point in time.\n * Specify data if you need additional data for custom rendering of the items.\n *\n * @type {TimelinePointInTimeItem[]}\n * @memberof SdsTimelineComponent\n */\n @Input() pointInTimeItems: TimelinePointInTimeItem[] = [];\n\n /**\n * The template to be used for custom rendering of the items.\n *\n * @type {(TemplateRef<any> | undefined)}\n * @memberof SdsTimelineComponent\n */\n @Input() itemTemplate: TemplateRef<any> | undefined = undefined;\n\n /**\n * The template to be used for custom rendering of the poin-in-time items.\n *\n * @type {(TemplateRef<any> | undefined)}\n * @memberof SdsTimelineComponent\n */\n @Input() pointInTimeTemplate: TemplateRef<any> | undefined = undefined;\n\n /**\n * The template to be used for custom rendering of the day labels.\n *\n * @type {(TemplateRef<any> | undefined)}\n * @memberof SdsTimelineComponent\n */\n @Input() dayLabelTemplate: TemplateRef<any> | undefined = undefined;\n \n /**\n * A custom data function for the day labels. \n * This function takes a Date object as input and returns any custom data that will be available for the custom template\n *\n * @memberof SdsTimelineComponent\n */\n @Input() dayLabelCustomDataFn: TimelineCustomDateDataProvider | undefined = undefined;\n\n /**\n * The frequency of the ticks on the timeline.\n *\n * @type {TimelineTickFrequency}\n * @memberof SdsTimelineComponent\n */\n @Input() tickFrequency: TimelineTickFrequency = 'hourly';\n\n /**\n * The frequency of the hour labels on the timeline.\n *\n * @type {TimelineTickFrequency}\n * @memberof SdsTimelineComponent\n */\n @Input() hourLabelFrequency: TimelineTickFrequency = '3hrs';\n\n\n /**\n * The current zoom level of the timeline. In percent.\n *\n * @type {number}\n * @memberof SdsTimelineComponent\n */\n @Input() zoomPercent: number = 100;\n @Output() zoomPercentChange = new EventEmitter<number>();\n\n /**\n * Initial offset of the viewport in percent. This is used in scenarios \n * with multiple days when you want to show non-first day as defult.\n *\n * @type {number}\n * @memberof SdsTimelineComponent\n */\n @Input() viewOffsetPercent: number = 0;\n @Output() viewOffsetPercentChange = new EventEmitter<number>();\n\n /**\n * The maximum allowed zoom level of the timeline. In percent.\n *\n * @type {number}\n * @memberof SdsTimelineComponent\n */\n @Input() maxZoomPercent: number = 500;\n\n /**\n * Whether to show hour labels.\n *\n * @type {boolean}\n * @memberof SdsTimelineComponent\n */\n @Input() showHourLabels: boolean = true;\n\n /**\n * The CSS class to be applied to the hour labels.\n *\n * @type {string}\n * @memberof SdsTimelineComponent\n */\n @Input() hourLabelClass?: string;\n\n /**\n * Whether to show day labels. \n *\n * @type {boolean}\n * @memberof SdsTimelineComponent\n */\n @Input() showDayLabels: boolean = false;\n\n /**\n * The CSS class to be applied to the day labels.\n *\n * @type {string}\n * @memberof SdsTimelineComponent\n */\n @Input() dayLabelClass?: string;\n\n /**\n * Whether to show timeline. Useful for hiding the timeline when we only need header.\n *\n * @type {boolean}\n * @memberof SdsTimelineComponent\n */\n @Input() showTimeline: boolean = true; \n\n /**\n * The CSS class to be applied to the hour ticks.\n *\n * @type {string}\n * @memberof SdsTimelineComponent\n */\n @Input() hourTickClass?: string;\n\n /**\n * The height of the timeline. Default is 2rem.\n *\n * @type {string}\n * @memberof SdsTimelineComponent\n */\n @Input() timelineHeight: string = '2rem';\n\n /**\n * Whether to enable zoom and drag functionality.\n *\n * @type {boolean}\n * @memberof SdsTimelineComponent\n */\n @Input() enableZoomAndDrag: boolean = true;\n\n /**\n * Number of minutes added to start and stop to fit the data on the edges\n *\n * @type {number}\n * @memberof SdsTimelineComponent\n */\n @Input() offSetMinutes: number = 15;\n\n /**\n * The locales to be used for formatting the timeline.\n *\n * @type {(string | Array<string>)}\n * @memberof SdsTimelineComponent\n */\n @Input() locales?: string | Array<string>;\n\n /**\n * Control if those parts of segments (or whole segments) that fall into the Offset \n * period are displayed or not\n *\n * @type {boolean}\n * @memberof SdsTimelineComponent\n */\n @Input() cutOffset: boolean = false;\n\n /**\n * Sets default cursor, that should be shown when hovering over timeline component.\n * Default value is 'default'.\n *\n * @type {string}\n * @memberof SdsTimelineComponent\n */\n @Input() defaultCursor: string = \"default\";\n\n // protected\n hourTicks: TimelineTick[] = [];\n hourLabels: TimelineIntervalLabel[] = [];\n dayLabels: TimelineIntervalLabel[] = [];\n\n private _timelineService: SdsTimelineService = new SdsTimelineService(\n this.start,\n this.end,\n this.offSetMinutes,\n this.cutOffset\n );\n\n public presentationItems: TimelineItemPresentation[] = [];\n public presentationPointInTimeItems: TimelinePointInTimeItemPresentation[] = [];\n\n public isDragging = false;\n public initialDragX = 0;\n\n private viewOffsetPercentDragStart = 0;\n\n @ViewChild('viewport', { static: true }) _viewport: ElementRef | undefined;\n\n constructor() {}\n\n ngAfterViewInit(): void {\n this.generateTicks();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (this.start && this.end) {\n this._timelineService = new SdsTimelineService(\n this.start,\n this.end,\n this.offSetMinutes,\n this.cutOffset\n );\n this.generateTicks();\n this.generateInternalTimelineItems();\n }\n\n if (changes['start'] || changes['end'] || changes['offSetMinutes'] || changes['cutOffset']) {\n this._timelineService = new SdsTimelineService(\n this.start,\n this.end,\n this.offSetMinutes,\n this.cutOffset\n );\n this.generateTicks();\n this.generateInternalTimelineItems(); \n }\n\n if (changes['items']) {\n this.generateInternalTimelineItems();\n }\n\n if (changes['pointInTimeItems']) {\n this.generateInternalTimelinePointInTimeItems();\n }\n\n if (changes['zoomPercent']) {\n // this.viewOffsetPercent = (this.zoomPercent - 100) / -2;\n }\n\n if (changes['showDayLabels'] || changes['showHourLabels']) {\n this.generateTicks();\n } \n }\n\n ngOnInit(): void {}\n\n //#region mouse wheel zoom\n onScroll(event: WheelEvent): void {\n if (this.enableZoomAndDrag) {\n\n event.preventDefault();\n\n const delta = Math.sign(event.deltaY);\n const newZoomPercent = Math.min(\n Math.max(this.zoomPercent + -delta * 20, 100),\n this.maxZoomPercent\n );\n const deltaZoomPercent = newZoomPercent - this.zoomPercent;\n this.zoomPercent = newZoomPercent;\n this.zoomPercentChange.emit(this.zoomPercent);\n \n // get the relative position of the cursor on the viewport so we can zoom in into this position\n const x = event.clientX - this._viewport?.nativeElement.getBoundingClientRect().left;\n const cursorRelativePosition = x / this._viewport?.nativeElement.getBoundingClientRect().width;\n // this.viewOffsetPercent = this.viewOffsetPercent - deltaZoomPercent * cursorRelativePosition;\n\n this.constrainOffset(this.viewOffsetPercent - deltaZoomPercent * cursorRelativePosition);\n }\n }\n //#endregion\n\n //#region dragging\n \n public onDragStart(event: MouseEvent | TouchEvent): void {\n if (this.enableZoomAndDrag && this.zoomPercent > 100) {\n event.preventDefault();\n this.isDragging = true;\n this.viewOffsetPercentDragStart = this.viewOffsetPercent;\n\n if (event instanceof MouseEvent) {\n this.initialDragX = event.clientX;\n } else if (event instanceof TouchEvent) {\n this.initialDragX = event.touches[0].clientX;\n }\n }\n }\n\n @HostListener('window:mousemove', ['$event'])\n public onDragMove(event: MouseEvent): void {\n if (this.enableZoomAndDrag) {\n if (this.isDragging) {\n const currentX = event.clientX;\n this.moveElement(currentX);\n }\n }\n }\n\n @HostListener('window:touchmove', ['$event'])\n onDragMoveTouch(event: TouchEvent): void {\n if (this.enableZoomAndDrag) {\n if (this.isDragging) {\n const currentX = event.touches[0].clientX;\n this.moveElement(currentX);\n }\n }\n }\n\n @HostListener('window:mouseup', ['$event'])\n @HostListener('window:touchend', ['$event'])\n public onDragEnd(event: MouseEvent | TouchEvent): void {\n if (this.enableZoomAndDrag) {\n this.isDragging = false;\n }\n }\n\n private moveElement(currentX: number): void {\n const diff = currentX - this.initialDragX;\n if (this._viewport && this._viewport.nativeElement) {\n const diffInPercent = (diff / this._viewport?.nativeElement.getBoundingClientRect().width) * 100;\n // this.viewOffsetPercent = this.viewOffsetPercentDragStart + diffInPercent;\n this.constrainOffset(this.viewOffsetPercentDragStart + diffInPercent);\n }\n }\n\n //#endregion\n\n private constrainOffset(newOffset: number): void { \n if (this.zoomPercent + newOffset < 100) {\n newOffset = -this.zoomPercent + 100;\n }\n newOffset = Math.min(0, newOffset);\n if (newOffset != this.viewOffsetPercent) {\n this.viewOffsetPercent = newOffset;\n this.viewOffsetPercentChange.emit(this.viewOffsetPercent);\n }\n }\n\n private generateTicks(): void {\n this.hourTicks = this._timelineService.getHourTicks(this.tickFrequency);\n this.dayLabels = this._timelineService.getDayLabels(this.locales, this.dayLabelCustomDataFn);\n this.hourLabels = this._timelineService.getHourLabels(this.hourLabelFrequency);\n }\n\n private generateInternalTimelineItems(): void {\n const cuttOffStart = this.cutOffset ? this.start : new Date(this.start.getTime() - this.offSetMinutes * 60000);\n const cuttOffEnd = this.cutOffset ? this.end : new Date(this.end.getTime() + this.offSetMinutes * 60000);\n\n this.presentationItems = this.items\n .filter((item) => item.end < cuttOffStart || item.start > cuttOffEnd ? false : true)\n .map((item) => {\n const startTime = new Date(item.start).toLocaleTimeString(this.locales?? [], { hour: 'numeric', minute: '2-digit' });\n const endTime = new Date(item.end).toLocaleTimeString(this.locales?? [], { hour: 'numeric', minute: '2-digit' });\n const timeRange = `${startTime} - ${endTime}`;\n \n return {\n data: item.data,\n x: this._timelineService.getX(item.start),\n width: this._timelineService.getWidthFromTime(\n item.start,\n item.end\n ),\n hint: item.hint ?? timeRange,\n backgroundColor: item.backgroundColor,\n top: item.top ?? '50%',\n height: item.height ?? '60%',\n class: item.class,\n };\n });\n }\n\n\n private generateInternalTimelinePointInTimeItems(): void {\n const cuttOffStart = this.cutOffset ? this.start : new Date(this.start.getTime() - this.offSetMinutes * 60000);\n const cuttOffEnd = this.cutOffset ? this.end : new Date(this.end.getTime() + this.offSetMinutes * 60000);\n\n this.presentationPointInTimeItems = this.pointInTimeItems\n .filter((item) => item.date < cuttOffStart || item.date > cuttOffEnd ? false : true)\n .map((item) => {\n\n const timePointString = new Date(item.date).toLocaleTimeString(this.locales?? [], { hour: 'numeric', minute: '2-digit' });\n\n return {\n data: item.data,\n x: this._timelineService.getX(item.date),\n hint: item.hint ?? timePointString,\n top: item.top ?? '20%',\n height: item.height ?? '1rem',\n width: item.width ?? '1rem',\n class: item.class,\n backgroundColor: item.backgroundColor,\n };\n });\n }\n}\n","<ng-template #defaultItemTemplate let-item=\"item\">\n <div \n class=\"sds-timeline-item h-100\"\n [title]=\"item.hint\"\n >\n </div>\n</ng-template>\n\n<ng-template #defaultPointInTimeItemTemplate let-item=\"item\">\n <div \n class=\"sds-timeline-item h-100\"\n [title]=\"item.hint\"\n >\n </div>\n</ng-template>\n\n<ng-template #defaultDayLabelTemplate let-label=\"label\">\n {{label.label}}\n</ng-template>\n\n<div \n #viewport\n class=\"sds-timeline-viewport\"\n (wheel)=\"onScroll($event)\"\n\n (mousedown)=\"onDragStart($event)\"\n (touchstart)=\"onDragStart($event)\"\n >\n\n <div \n class=\"sds-timeline-container d-flex flex-column\"\n [style.left.%]=\"viewOffsetPercent\"\n [style.width.%]=\"zoomPercent\"\n [style.cursor]=\"isDragging ? 'ew-resize' : defaultCursor\"\n >\n\n <div\n *ngIf=\"showDayLabels\" \n class=\"sds-timeline-day-header\">\n\n <div \n *ngFor=\"let label of dayLabels\"\n class=\"sds-day-label\" \n [ngClass]=\"dayLabelClass ?? null\"\n [style.left.%]=\"label.x\"\n [style.width.%]=\"label.width\"\n >\n <ng-container \n [ngTemplateOutlet]=\"dayLabelTemplate ? dayLabelTemplate : defaultDayLabelTemplate\"\n [ngTemplateOutletContext]=\"{label: label}\">\n </ng-container> \n </div>\n </div>\n\n <div \n *ngIf=\"showHourLabels\" \n class=\"sds-timeline-hour-header\">\n\n <div \n *ngFor=\"let label of hourLabels;\"\n class=\"sds-hour-label\" \n [ngClass]=\"hourLabelClass ?? null\"\n [style.left.%]=\"label.x\"\n [style.width.rem]=\"1.2\"\n [ngStyle]=\"{'left': 'calc(' + label.x + '% - 0.6rem)'}\"\n >\n \n {{label.label}}\n \n </div>\n </div>\n\n <div \n *ngIf=\"showTimeline\"\n class=\"sds-timeline flex-grow-1\"\n [style.height]=\"timelineHeight\"\n >\n\n <div \n *ngFor=\"let tick of hourTicks\"\n class=\"sds-timeline-tick\" \n [ngClass]=\"hourTickClass ?? null\"\t\n [ngStyle]=\"tick.x == 100 ? {'left': 'calc(' + tick.x +'% - 1px)'} : {'left': 'calc(' + tick.x + '% - 0.5px)'}\"\n >\n </div>\n\n <div \n *ngFor=\"let item of presentationItems\"\n class=\"sds-timeline-item-container\"\n [ngClass]=\"item.class ?? null\"\n [ngStyle]=\"{\n 'width': 'max(' + item.width +'%, 1px)',\n 'top': 'calc(' + item.top + ' - max(calc(' + item.height +'/2), 1px))', \n }\"\n\n [style.left.%]=\"item.x\"\n [style.height]=\"item.height\"\n [style.backgroundColor]=\"item.backgroundColor\"\n >\n\n <ng-container \n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultItemTemplate\"\n [ngTemplateOutletContext]=\"{item: item}\">\n </ng-container> \n </div>\n\n\n <!-- [ngClass]=\"item.class\"\t -->\n <div *ngFor=\"let item of presentationPointInTimeItems\"\n class=`sds-timeline-point-in-time-item-container ${item.class}`\n [style.height]=\"item.height\"\n [style.width]=\"item.width\"\n [ngStyle]=\"{\n 'top': 'calc(' + item.top + ' - max(calc(' + item.height +'/2), 1px))', \n 'left': 'calc(' + item.x + '% - max( calc(' + item.width +'/2), 1px))',\n \n }\"\n [style.backgroundColor]=\"item.backgroundColor\"\n >\n\n <ng-container \n [ngTemplateOutlet]=\"pointInTimeTemplate ? pointInTimeTemplate : defaultPointInTimeItemTemplate\"\n [ngTemplateOutletContext]=\"{item: item}\">\n </ng-container> \n\n </div>\n\n </div>\n </div>\n</div>\n","/**\n * Generated bundle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A;sBAAf;gBASQ,SAAS,EAAA,CAAA;sBAAjB;gBASQ,aAAa,EAAA,CAAA;sBAArB;gBAsBwC,SAAS,EAAA,CAAA;sBAAjD,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,UAAU,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;gBA4FhC,UAAU,EAAA,CAAA;sBADhB,YAAY;uBAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC;gBAW5C,eAAe,EAAA,CAAA;sBADd,YAAY;uBAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC;gBAYrC,SAAS,EAAA,CAAA;sBAFf,YAAY;uBAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;;sBACzC,YAAY;uBAAC,iBAAiB,EAAE,CAAC,QAAQ,CAAC;;;AE5X/C;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"spicainternational-ngx-sds-components-src-lib-timer.mjs","sources":["../../../projects/ngx-sds-components/src/lib/timer/utils/timer.utils.ts","../../../projects/ngx-sds-components/src/lib/timer/services/timer.service.ts","../../../projects/ngx-sds-components/src/lib/timer/spicainternational-ngx-sds-components-src-lib-timer.ts"],"sourcesContent":["/**\r\n * @public @function timeToNextFifteenMinutesInterval\r\n * @description\r\n * Function responsible for calc of time until next fifteen minutes interval. By fifteen minutes interval\r\n * we mean (e.g. 08:15, 08:30, 08:45,...)\r\n * @param { number } currentTimestampMs\r\n * @returns { number }\r\n */\r\nexport const timeToNextFifteenMinutesInterval = (currentTimestamp: number) => {\r\n const timestampSeconds = currentTimestamp / 1000;\r\n\r\n const numberOfSecondsIntoTheCurrentInterval = timestampSeconds % 900;\r\n\r\n const numberOfSecondsToTheNextInterval = 900 - numberOfSecondsIntoTheCurrentInterval;\r\n return numberOfSecondsToTheNextInterval;\r\n}\r\n\r\n/**\r\n * @public @function timeToNextFiveMinutesInterval\r\n * @description\r\n * Function responsible for calc of time until next five minutes interval. By five minutes interval\r\n * we mean (e.g. 08:05, 08:10, 08:15,...)\r\n * @param { number } currentTimestampMs\r\n * @returns { number }\r\n */\r\nexport const timeToNextFiveMinutesInterval = (currentTimestamp: number) => {\r\n const timestampSeconds = currentTimestamp / 1000;\r\n\r\n const numberOfSecondsIntoTheCurrentInterval = timestampSeconds % 300;\r\n\r\n const numberOfSecondsToTheNextInterval = 300 - numberOfSecondsIntoTheCurrentInterval;\r\n return numberOfSecondsToTheNextInterval;\r\n}\r\n\r\n/**\r\n * @public @function timeToNextHour\r\n * @description\r\n * Function responsible for calc of time until next hour\r\n * @param { number } currentTimestampMs\r\n * @returns { number }\r\n */\r\nexport const timeToNextHour = (currentTimestamp: number) => {\r\n const timestampSeconds = currentTimestamp / 1000;\r\n\r\n const numberOfSecondsIntoTheCurrentHour = timestampSeconds % 3600;\r\n\r\n const numberOfSecondsToTheNextHour = 3600 - numberOfSecondsIntoTheCurrentHour;\r\n return numberOfSecondsToTheNextHour;\r\n };\r\n\r\n /**\r\n * @public @function timeToNextHalfHour\r\n * @description\r\n * Function responsible for calc of time until half hour\r\n * @param { number } currentTimestampMs\r\n * @returns { number }\r\n */\r\nexport const timeToNextHalfHour = (currentTimestamp: number) => {\r\n const timestampSeconds = currentTimestamp / 1000;\r\n\r\n const numberOfSecondsIntoTheCurrentHalfHour = timestampSeconds % 1800;\r\n\r\n const numberOfSecondsToTheNextHalfHour = 1800 - numberOfSecondsIntoTheCurrentHalfHour;\r\n return numberOfSecondsToTheNextHalfHour;\r\n };\r\n\r\n/**\r\n * @public @function timeToNextMinuteInterval\r\n * @description\r\n * Function responsible for calc of time until next minute interval. By minute interval\r\n * we mean (e.g. 08:00, 08:01, 08:02,...)\r\n * @param { number } currentTimestampMs\r\n * @returns { number }\r\n */\r\nexport const timeToNextMinuteInterval = (currentTimestamp: number) => {\r\n const timestampSeconds = currentTimestamp / 1000;\r\n\r\n const numberOfSecondsIntoTheCurrentInterval = timestampSeconds % 60;\r\n\r\n const numberOfSecondsToTheNextInterval = 60 - numberOfSecondsIntoTheCurrentInterval;\r\n return numberOfSecondsToTheNextInterval;\r\n}\r\n\r\n/**\r\n * @public @function timeToNextSecondInterval\r\n * @description\r\n * Function responsible for calc of time until next second interval. By second interval\r\n * we mean (e.g. 08:00:01, 08:00:01, 08:00:02,...)\r\n * @param { number } currentTimestampMs\r\n * @returns { number }\r\n */\r\nexport const timeToNextSecondInterval = (currentTimestamp: number) => {\r\n const timestampSeconds = currentTimestamp;\r\n\r\n const numberOfMilisecSecondsIntoTheCurrentInterval = timestampSeconds % 999;\r\n\r\n const numberOfMilisecondsSecondsToTheNextInterval = 999 - numberOfMilisecSecondsIntoTheCurrentInterval;\r\n return numberOfMilisecondsSecondsToTheNextInterval;\r\n}\r\n\r\n/**\r\n * @public @function timeToNextTenMinutesInterval\r\n * @description\r\n * Function responsible for calc of time until next ten minutes interval. By ten minutes interval\r\n * we mean (e.g. 08:10, 08:20, 08:30,...)\r\n * @param { number } currentTimestampMs\r\n * @returns { number }\r\n */\r\nexport const timeToNextTenMinutesInterval = (currentTimestamp: number) => {\r\n const timestampSeconds = currentTimestamp / 1000;\r\n\r\n const numberOfSecondsIntoTheCurrentInterval = timestampSeconds % 600;\r\n\r\n const numberOfSecondsToTheNextInterval = 600 - numberOfSecondsIntoTheCurrentInterval;\r\n return numberOfSecondsToTheNextInterval;\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { BehaviorSubject, Observable, Subscription, interval } from 'rxjs';\r\nimport { timeToNextFifteenMinutesInterval, timeToNextFiveMinutesInterval, timeToNextHalfHour, timeToNextHour, timeToNextMinuteInterval, timeToNextSecondInterval, timeToNextTenMinutesInterval } from '../utils';\r\nimport { debounceTime, skip } from 'rxjs/operators';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class SdsTimerService {\r\n /**\r\n * @description\r\n * Timer emitted every 15 minutes (e.g. 08:00, 08:15, 08:30, etc.)\r\n */\r\n public fifteenMinutesInterval$: Observable<void>;\r\n\r\n /**\r\n * @description\r\n * Timer emitted every 5 minutes (e.g. 08:00, 08:05, 08:10, etc.)\r\n */\r\n public fiveMinutesInterval$: Observable<void>;\r\n\r\n /**\r\n * @description\r\n * Timer that invokes each full hour\r\n */\r\n public fullHourInterval$: Observable<void>;\r\n\r\n /**\r\n * @description\r\n * Timer emitted every 30 minutes at full and half hour (e.g. at 10:00, 10:30, 11:00, etc.)\r\n */\r\n public halfHourInterval$: Observable<void>;\r\n\r\n /**\r\n * @description\r\n * Timer emitted every minute (e.g. 08:00, 08:01, 08:02, etc.)\r\n */\r\n public minuteInterval$: Observable<void>;\r\n\r\n /**\r\n * @description\r\n * Timer emitted every second\r\n */\r\n public secondsInterval$: Observable<void>;\r\n\r\n /**\r\n * @description\r\n * Timer emitted every 10 minutes (e.g. 08:00, 08:10, 08:20, etc.)\r\n */\r\n public tenMinutesInterval$: Observable<void>;\r\n\r\n /**\r\n * @description\r\n * Source for fifteen minute interval\r\n */\r\n private _fifteenMinutesInterval: BehaviorSubject<void> = new BehaviorSubject<void>(undefined)\r\n\r\n /**\r\n * @description\r\n * Source for five minute interval\r\n */\r\n private _fiveMinutesInterval: BehaviorSubject<void> = new BehaviorSubject<void>(undefined)\r\n\r\n /**\r\n * @description\r\n * Source for half hour interval\r\n */\r\n private _fullHourInterval: BehaviorSubject<void> = new BehaviorSubject<void>(\r\n undefined\r\n );\r\n\r\n /**\r\n * @description\r\n * Source for half hour interval\r\n */\r\n private _halfHourInterval: BehaviorSubject<void> = new BehaviorSubject<void>(\r\n undefined\r\n );\r\n\r\n /**\r\n * @description\r\n * Source for minute interval\r\n */\r\n private _minuteInterval: BehaviorSubject<void> = new BehaviorSubject<void>(undefined)\r\n\r\n /**\r\n * @description\r\n * Source for secong interval\r\n */\r\n private _secondsInterval: BehaviorSubject<void> = new BehaviorSubject<void>(undefined);\r\n\r\n /**\r\n * @description\r\n * Source for ten minutes interval\r\n */\r\n private _tenMinutesInterval: BehaviorSubject<void> = new BehaviorSubject<void>(undefined)\r\n\r\n private _subscriptions: Subscription[] = [];\r\n\r\nconstructor() {\r\n this.fifteenMinutesInterval$ = this._fifteenMinutesInterval.asObservable().pipe(skip(1));\r\n this.fiveMinutesInterval$ = this._fiveMinutesInterval.asObservable().pipe(skip(1));\r\n this.fullHourInterval$ = this._fullHourInterval.asObservable().pipe(skip(1));\r\n this.halfHourInterval$ = this._halfHourInterval.asObservable().pipe(skip(1));\r\n this.minuteInterval$ = this._minuteInterval.asObservable().pipe().pipe(skip(1));\r\n this.secondsInterval$ = this._secondsInterval.asObservable().pipe(skip(1));\r\n this.tenMinutesInterval$ = this._tenMinutesInterval.asObservable().pipe(skip(1));\r\n\r\n const timeOffsetToFullSecond = timeToNextSecondInterval(new Date().getTime())\r\n\r\n // This observable will invoke each second while app is running\r\n const ticksSubscription: Subscription = interval(1000).pipe(debounceTime(timeOffsetToFullSecond)).subscribe(\r\n intervalTick => {\r\n const now = new Date().getTime();\r\n\r\n const timeRemainingToNextMinuteInterval = timeToNextMinuteInterval(now);\r\n\r\n const timeRemaingingToNextFiveMinutesInterval = timeToNextFiveMinutesInterval(now);\r\n\r\n const timeRemainingToNextTenMinutesInterval = timeToNextTenMinutesInterval(now);\r\n\r\n const timeRemainingToNextFifteenMinutesInterval = timeToNextFifteenMinutesInterval(now);\r\n\r\n const timeRemainingToNextFullHour = timeToNextHour(\r\n now\r\n );\r\n\r\n const timeRemainingToNextHalfHour = timeToNextHalfHour(\r\n now\r\n );\r\n\r\n this._secondsInterval.next();\r\n\r\n // Check if its minute tick\r\n if (timeRemainingToNextMinuteInterval > 59) {\r\n this._minuteInterval.next();\r\n }\r\n\r\n // Check if its five minute interval tick\r\n if (timeRemaingingToNextFiveMinutesInterval > 299) {\r\n this._fiveMinutesInterval.next();\r\n }\r\n\r\n // Check if its ten minute interval\r\n if (timeRemainingToNextTenMinutesInterval > 599) {\r\n this._tenMinutesInterval.next();\r\n }\r\n\r\n // Check if its fifteen minute interval\r\n if (timeRemainingToNextFifteenMinutesInterval > 899) {\r\n this._fifteenMinutesInterval.next();\r\n }\r\n\r\n // Check if its half hour tick\r\n if (timeRemainingToNextHalfHour > 1799) {\r\n this._halfHourInterval.next();\r\n }\r\n\r\n // Check if its full hour tick\r\n if (timeRemainingToNextFullHour > 3599) {\r\n this._fullHourInterval.next();\r\n }\r\n\r\n // Define any additional intervals that might be needed\r\n }\r\n );\r\n\r\n this._subscriptions.push(ticksSubscription);\r\n}\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;AAOG;AACU,MAAA,gCAAgC,GAAG,CAAC,gBAAwB,KAAI;AACzE,IAAA,MAAM,gBAAgB,GAAG,gBAAgB,GAAG,IAAI;AAEhD,IAAA,MAAM,qCAAqC,GAAG,gBAAgB,GAAG,GAAG;AAEpE,IAAA,MAAM,gCAAgC,GAAG,GAAG,GAAG,qCAAqC;AACpF,IAAA,OAAO,gCAAgC;AAC3C;AAEA;;;;;;;AAOG;AACU,MAAA,6BAA6B,GAAG,CAAC,gBAAwB,KAAI;AACtE,IAAA,MAAM,gBAAgB,GAAG,gBAAgB,GAAG,IAAI;AAEhD,IAAA,MAAM,qCAAqC,GAAG,gBAAgB,GAAG,GAAG;AAEpE,IAAA,MAAM,gCAAgC,GAAG,GAAG,GAAG,qCAAqC;AACpF,IAAA,OAAO,gCAAgC;AAC3C;AAEA;;;;;;AAMG;AACU,MAAA,cAAc,GAAG,CAAC,gBAAwB,KAAI;AACvD,IAAA,MAAM,gBAAgB,GAAG,gBAAgB,GAAG,IAAI;AAEhD,IAAA,MAAM,iCAAiC,GAAG,gBAAgB,GAAG,IAAI;AAEjE,IAAA,MAAM,4BAA4B,GAAG,IAAI,GAAG,iCAAiC;AAC7E,IAAA,OAAO,4BAA4B;AACrC;AAEA;;;;;;AAMG;AACQ,MAAA,kBAAkB,GAAG,CAAC,gBAAwB,KAAI;AAC3D,IAAA,MAAM,gBAAgB,GAAG,gBAAgB,GAAG,IAAI;AAEhD,IAAA,MAAM,qC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iB,CAAC,IAAI,EAAE;;;AAIjC,SAAC,CACJ;AAED,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,iBAAiB,CAAC;;+GA/JlC,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cAFd,MAAM,EAAA,CAAA,CAAA;;4FAEP,eAAe,EAAA,UAAA,EAAA,CAAA;kBAH3B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACPD;;AAEG;;;;"}
1
+ {"version":3,"file":"spicainternational-ngx-sds-components-src-lib-timer.mjs","sources":["../../../projects/ngx-sds-components/src/lib/timer/utils/timer.utils.ts","../../../projects/ngx-sds-components/src/lib/timer/services/timer.service.ts","../../../projects/ngx-sds-components/src/lib/timer/spicainternational-ngx-sds-components-src-lib-timer.ts"],"sourcesContent":["/**\n * @public @function timeToNextFifteenMinutesInterval\n * @description\n * Function responsible for calc of time until next fifteen minutes interval. By fifteen minutes interval\n * we mean (e.g. 08:15, 08:30, 08:45,...)\n * @param { number } currentTimestampMs\n * @returns { number }\n */\nexport const timeToNextFifteenMinutesInterval = (currentTimestamp: number) => {\n const timestampSeconds = currentTimestamp / 1000;\n\n const numberOfSecondsIntoTheCurrentInterval = timestampSeconds % 900;\n\n const numberOfSecondsToTheNextInterval = 900 - numberOfSecondsIntoTheCurrentInterval;\n return numberOfSecondsToTheNextInterval;\n}\n\n/**\n * @public @function timeToNextFiveMinutesInterval\n * @description\n * Function responsible for calc of time until next five minutes interval. By five minutes interval\n * we mean (e.g. 08:05, 08:10, 08:15,...)\n * @param { number } currentTimestampMs\n * @returns { number }\n */\nexport const timeToNextFiveMinutesInterval = (currentTimestamp: number) => {\n const timestampSeconds = currentTimestamp / 1000;\n\n const numberOfSecondsIntoTheCurrentInterval = timestampSeconds % 300;\n\n const numberOfSecondsToTheNextInterval = 300 - numberOfSecondsIntoTheCurrentInterval;\n return numberOfSecondsToTheNextInterval;\n}\n\n/**\n * @public @function timeToNextHour\n * @description\n * Function responsible for calc of time until next hour\n * @param { number } currentTimestampMs\n * @returns { number }\n */\nexport const timeToNextHour = (currentTimestamp: number) => {\n const timestampSeconds = currentTimestamp / 1000;\n\n const numberOfSecondsIntoTheCurrentHour = timestampSeconds % 3600;\n\n const numberOfSecondsToTheNextHour = 3600 - numberOfSecondsIntoTheCurrentHour;\n return numberOfSecondsToTheNextHour;\n };\n\n /**\n * @public @function timeToNextHalfHour\n * @description\n * Function responsible for calc of time until half hour\n * @param { number } currentTimestampMs\n * @returns { number }\n */\nexport const timeToNextHalfHour = (currentTimestamp: number) => {\n const timestampSeconds = currentTimestamp / 1000;\n\n const numberOfSecondsIntoTheCurrentHalfHour = timestampSeconds % 1800;\n\n const numberOfSecondsToTheNextHalfHour = 1800 - numberOfSecondsIntoTheCurrentHalfHour;\n return numberOfSecondsToTheNextHalfHour;\n };\n\n/**\n * @public @function timeToNextMinuteInterval\n * @description\n * Function responsible for calc of time until next minute interval. By minute interval\n * we mean (e.g. 08:00, 08:01, 08:02,...)\n * @param { number } currentTimestampMs\n * @returns { number }\n */\nexport const timeToNextMinuteInterval = (currentTimestamp: number) => {\n const timestampSeconds = currentTimestamp / 1000;\n\n const numberOfSecondsIntoTheCurrentInterval = timestampSeconds % 60;\n\n const numberOfSecondsToTheNextInterval = 60 - numberOfSecondsIntoTheCurrentInterval;\n return numberOfSecondsToTheNextInterval;\n}\n\n/**\n * @public @function timeToNextSecondInterval\n * @description\n * Function responsible for calc of time until next second interval. By second interval\n * we mean (e.g. 08:00:01, 08:00:01, 08:00:02,...)\n * @param { number } currentTimestampMs\n * @returns { number }\n */\nexport const timeToNextSecondInterval = (currentTimestamp: number) => {\n const timestampSeconds = currentTimestamp;\n\n const numberOfMilisecSecondsIntoTheCurrentInterval = timestampSeconds % 999;\n\n const numberOfMilisecondsSecondsToTheNextInterval = 999 - numberOfMilisecSecondsIntoTheCurrentInterval;\n return numberOfMilisecondsSecondsToTheNextInterval;\n}\n\n/**\n * @public @function timeToNextTenMinutesInterval\n * @description\n * Function responsible for calc of time until next ten minutes interval. By ten minutes interval\n * we mean (e.g. 08:10, 08:20, 08:30,...)\n * @param { number } currentTimestampMs\n * @returns { number }\n */\nexport const timeToNextTenMinutesInterval = (currentTimestamp: number) => {\n const timestampSeconds = currentTimestamp / 1000;\n\n const numberOfSecondsIntoTheCurrentInterval = timestampSeconds % 600;\n\n const numberOfSecondsToTheNextInterval = 600 - numberOfSecondsIntoTheCurrentInterval;\n return numberOfSecondsToTheNextInterval;\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable, Subscription, interval } from 'rxjs';\nimport { timeToNextFifteenMinutesInterval, timeToNextFiveMinutesInterval, timeToNextHalfHour, timeToNextHour, timeToNextMinuteInterval, timeToNextSecondInterval, timeToNextTenMinutesInterval } from '../utils';\nimport { debounceTime, skip } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SdsTimerService {\n /**\n * @description\n * Timer emitted every 15 minutes (e.g. 08:00, 08:15, 08:30, etc.)\n */\n public fifteenMinutesInterval$: Observable<void>;\n\n /**\n * @description\n * Timer emitted every 5 minutes (e.g. 08:00, 08:05, 08:10, etc.)\n */\n public fiveMinutesInterval$: Observable<void>;\n\n /**\n * @description\n * Timer that invokes each full hour\n */\n public fullHourInterval$: Observable<void>;\n\n /**\n * @description\n * Timer emitted every 30 minutes at full and half hour (e.g. at 10:00, 10:30, 11:00, etc.)\n */\n public halfHourInterval$: Observable<void>;\n\n /**\n * @description\n * Timer emitted every minute (e.g. 08:00, 08:01, 08:02, etc.)\n */\n public minuteInterval$: Observable<void>;\n\n /**\n * @description\n * Timer emitted every second\n */\n public secondsInterval$: Observable<void>;\n\n /**\n * @description\n * Timer emitted every 10 minutes (e.g. 08:00, 08:10, 08:20, etc.)\n */\n public tenMinutesInterval$: Observable<void>;\n\n /**\n * @description\n * Source for fifteen minute interval\n */\n private _fifteenMinutesInterval: BehaviorSubject<void> = new BehaviorSubject<void>(undefined)\n\n /**\n * @description\n * Source for five minute interval\n */\n private _fiveMinutesInterval: BehaviorSubject<void> = new BehaviorSubject<void>(undefined)\n\n /**\n * @description\n * Source for half hour interval\n */\n private _fullHourInterval: BehaviorSubject<void> = new BehaviorSubject<void>(\n undefined\n );\n\n /**\n * @description\n * Source for half hour interval\n */\n private _halfHourInterval: BehaviorSubject<void> = new BehaviorSubject<void>(\n undefined\n );\n\n /**\n * @description\n * Source for minute interval\n */\n private _minuteInterval: BehaviorSubject<void> = new BehaviorSubject<void>(undefined)\n\n /**\n * @description\n * Source for secong interval\n */\n private _secondsInterval: BehaviorSubject<void> = new BehaviorSubject<void>(undefined);\n\n /**\n * @description\n * Source for ten minutes interval\n */\n private _tenMinutesInterval: BehaviorSubject<void> = new BehaviorSubject<void>(undefined)\n\n private _subscriptions: Subscription[] = [];\n\nconstructor() {\n this.fifteenMinutesInterval$ = this._fifteenMinutesInterval.asObservable().pipe(skip(1));\n this.fiveMinutesInterval$ = this._fiveMinutesInterval.asObservable().pipe(skip(1));\n this.fullHourInterval$ = this._fullHourInterval.asObservable().pipe(skip(1));\n this.halfHourInterval$ = this._halfHourInterval.asObservable().pipe(skip(1));\n this.minuteInterval$ = this._minuteInterval.asObservable().pipe().pipe(skip(1));\n this.secondsInterval$ = this._secondsInterval.asObservable().pipe(skip(1));\n this.tenMinutesInterval$ = this._tenMinutesInterval.asObservable().pipe(skip(1));\n\n const timeOffsetToFullSecond = timeToNextSecondInterval(new Date().getTime())\n\n // This observable will invoke each second while app is running\n const ticksSubscription: Subscription = interval(1000).pipe(debounceTime(timeOffsetToFullSecond)).subscribe(\n intervalTick => {\n const now = new Date().getTime();\n\n const timeRemainingToNextMinuteInterval = timeToNextMinuteInterval(now);\n\n const timeRemaingingToNextFiveMinutesInterval = timeToNextFiveMinutesInterval(now);\n\n const timeRemainingToNextTenMinutesInterval = timeToNextTenMinutesInterval(now);\n\n const timeRemainingToNextFifteenMinutesInterval = timeToNextFifteenMinutesInterval(now);\n\n const timeRemainingToNextFullHour = timeToNextHour(\n now\n );\n\n const timeRemainingToNextHalfHour = timeToNextHalfHour(\n now\n );\n\n this._secondsInterval.next();\n\n // Check if its minute tick\n if (timeRemainingToNextMinuteInterval > 59) {\n this._minuteInterval.next();\n }\n\n // Check if its five minute interval tick\n if (timeRemaingingToNextFiveMinutesInterval > 299) {\n this._fiveMinutesInterval.next();\n }\n\n // Check if its ten minute interval\n if (timeRemainingToNextTenMinutesInterval > 599) {\n this._tenMinutesInterval.next();\n }\n\n // Check if its fifteen minute interval\n if (timeRemainingToNextFifteenMinutesInterval > 899) {\n this._fifteenMinutesInterval.next();\n }\n\n // Check if its half hour tick\n if (timeRemainingToNextHalfHour > 1799) {\n this._halfHourInterval.next();\n }\n\n // Check if its full hour tick\n if (timeRemainingToNextFullHour > 3599) {\n this._fullHourInterval.next();\n }\n\n // Define any additional intervals that might be needed\n }\n );\n\n this._subscriptions.push(ticksSubscription);\n}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;AAOG;AACU,MAAA,gCAAgC,GAAG,CAAC,gBAAwB,KAAI;AACzE,IAAA,MAAM,gBAAgB,GAAG,gBAAgB,GAAG,IAAI;AAEhD,IAAA,MAAM,qCAAqC,GAAG,gBAAgB,GAAG,GAAG;AAEpE,IAAA,MAAM,gCAAgC,GAAG,GAAG,GAAG,qCAAqC;AACpF,IAAA,OAAO,gCAAgC;AAC3C;AAEA;;;;;;;AAOG;AACU,MAAA,6BAA6B,GAAG,CAAC,gBAAwB,KAAI;AACtE,IAAA,MAAM,gBAAgB,G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.3.12", ngImport: i0, type: SdsTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SdsTooltipComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<div class=\"sds-tooltip\"\r\n [ngClass]=\"['sds-tooltip-' + position, 'sds-tooltip-' + theme, tooltipClass]\"\r\n [class.sds-tooltip-visible]=\"visible\"\r\n [style.left.px]=\"left\"\r\n [style.top.px]=\"top\"\r\n >\r\n <fa-icon class=\"sds-tooltip-icon\"\r\n *ngIf=\"tooltipIcon\" \r\n [icon]=\"tooltipIcon\">\r\n </fa-icon>\r\n\r\n <small class=\"sds-tooltip-text\">\r\n {{ tooltip }}\r\n </small>\r\n\r\n</div>\r\n", styles: [".sds-tooltip{position:fixed;background-color:#000;border-radius:4px;color:#fff;padding:3px 6px;max-width:15rem;z-index:10700;opacity:0}.sds-tooltip fa-icon{margin-right:.25rem}.sds-tooltip-visible{opacity:1;transition:opacity .3s}.sds-tooltip-light{background-color:var(--bs-gray-200);color:#000}.sds-tooltip-dark{background-color:#000;color:#fff}.sds-tooltip-danger{background-color:var(--bs-danger);color:#fff}.sds-tooltip-success{background-color:var(--bs-success);color:#fff}.sds-tooltip-warning{background-color:var(--bs-warning);color:var(--bs-gray-900)}.sds-tooltip-info{background-color:var(--bs-info);color:#fff}.sds-tooltip-classic{background-color:#fff;color:#000;border:1px solid gray}.sds-tooltip-below{transform:translate(-50%);margin-top:.5rem}.sds-tooltip-above{transform:translate(-50%,calc(-100% - .5rem));margin-bottom:.5rem}.sds-tooltip-left{transform:translate(calc(-100% - .5rem),-50%)}.sds-tooltip-right{transform:translateY(-50%);margin-left:.5rem}.sds-tooltip-dynamic{margin-left:20px}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }] }); }
17
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SdsTooltipComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<div class=\"sds-tooltip\"\n [ngClass]=\"['sds-tooltip-' + position, 'sds-tooltip-' + theme, tooltipClass]\"\n [class.sds-tooltip-visible]=\"visible\"\n [style.left.px]=\"left\"\n [style.top.px]=\"top\"\n >\n <fa-icon class=\"sds-tooltip-icon\"\n *ngIf=\"tooltipIcon\" \n [icon]=\"tooltipIcon\">\n </fa-icon>\n\n <small class=\"sds-tooltip-text\">\n {{ tooltip }}\n </small>\n\n</div>\n", styles: [".sds-tooltip{position:fixed;background-color:#000;border-radius:4px;color:#fff;padding:3px 6px;max-width:15rem;z-index:10700;opacity:0}.sds-tooltip fa-icon{margin-right:.25rem}.sds-tooltip-visible{opacity:1;transition:opacity .3s}.sds-tooltip-light{background-color:var(--bs-gray-200);color:#000}.sds-tooltip-dark{background-color:#000;color:#fff}.sds-tooltip-danger{background-color:var(--bs-danger);color:#fff}.sds-tooltip-success{background-color:var(--bs-success);color:#fff}.sds-tooltip-warning{background-color:var(--bs-warning);color:var(--bs-gray-900)}.sds-tooltip-info{background-color:var(--bs-info);color:#fff}.sds-tooltip-classic{background-color:#fff;color:#000;border:1px solid gray}.sds-tooltip-below{transform:translate(-50%);margin-top:.5rem}.sds-tooltip-above{transform:translate(-50%,calc(-100% - .5rem));margin-bottom:.5rem}.sds-tooltip-left{transform:translate(calc(-100% - .5rem),-50%)}.sds-tooltip-right{transform:translateY(-50%);margin-left:.5rem}.sds-tooltip-dynamic{margin-left:20px}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }] }); }
18
18
  }
19
19
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SdsTooltipComponent, decorators: [{
20
20
  type: Component,
@@ -22,7 +22,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
22
22
  NgClass,
23
23
  NgIf,
24
24
  FaIconComponent,
25
- ], template: "<div class=\"sds-tooltip\"\r\n [ngClass]=\"['sds-tooltip-' + position, 'sds-tooltip-' + theme, tooltipClass]\"\r\n [class.sds-tooltip-visible]=\"visible\"\r\n [style.left.px]=\"left\"\r\n [style.top.px]=\"top\"\r\n >\r\n <fa-icon class=\"sds-tooltip-icon\"\r\n *ngIf=\"tooltipIcon\" \r\n [icon]=\"tooltipIcon\">\r\n </fa-icon>\r\n\r\n <small class=\"sds-tooltip-text\">\r\n {{ tooltip }}\r\n </small>\r\n\r\n</div>\r\n", styles: [".sds-tooltip{position:fixed;background-color:#000;border-radius:4px;color:#fff;padding:3px 6px;max-width:15rem;z-index:10700;opacity:0}.sds-tooltip fa-icon{margin-right:.25rem}.sds-tooltip-visible{opacity:1;transition:opacity .3s}.sds-tooltip-light{background-color:var(--bs-gray-200);color:#000}.sds-tooltip-dark{background-color:#000;color:#fff}.sds-tooltip-danger{background-color:var(--bs-danger);color:#fff}.sds-tooltip-success{background-color:var(--bs-success);color:#fff}.sds-tooltip-warning{background-color:var(--bs-warning);color:var(--bs-gray-900)}.sds-tooltip-info{background-color:var(--bs-info);color:#fff}.sds-tooltip-classic{background-color:#fff;color:#000;border:1px solid gray}.sds-tooltip-below{transform:translate(-50%);margin-top:.5rem}.sds-tooltip-above{transform:translate(-50%,calc(-100% - .5rem));margin-bottom:.5rem}.sds-tooltip-left{transform:translate(calc(-100% - .5rem),-50%)}.sds-tooltip-right{transform:translateY(-50%);margin-left:.5rem}.sds-tooltip-dynamic{margin-left:20px}\n"] }]
25
+ ], template: "<div class=\"sds-tooltip\"\n [ngClass]=\"['sds-tooltip-' + position, 'sds-tooltip-' + theme, tooltipClass]\"\n [class.sds-tooltip-visible]=\"visible\"\n [style.left.px]=\"left\"\n [style.top.px]=\"top\"\n >\n <fa-icon class=\"sds-tooltip-icon\"\n *ngIf=\"tooltipIcon\" \n [icon]=\"tooltipIcon\">\n </fa-icon>\n\n <small class=\"sds-tooltip-text\">\n {{ tooltip }}\n </small>\n\n</div>\n", styles: [".sds-tooltip{position:fixed;background-color:#000;border-radius:4px;color:#fff;padding:3px 6px;max-width:15rem;z-index:10700;opacity:0}.sds-tooltip fa-icon{margin-right:.25rem}.sds-tooltip-visible{opacity:1;transition:opacity .3s}.sds-tooltip-light{background-color:var(--bs-gray-200);color:#000}.sds-tooltip-dark{background-color:#000;color:#fff}.sds-tooltip-danger{background-color:var(--bs-danger);color:#fff}.sds-tooltip-success{background-color:var(--bs-success);color:#fff}.sds-tooltip-warning{background-color:var(--bs-warning);color:var(--bs-gray-900)}.sds-tooltip-info{background-color:var(--bs-info);color:#fff}.sds-tooltip-classic{background-color:#fff;color:#000;border:1px solid gray}.sds-tooltip-below{transform:translate(-50%);margin-top:.5rem}.sds-tooltip-above{transform:translate(-50%,calc(-100% - .5rem));margin-bottom:.5rem}.sds-tooltip-left{transform:translate(calc(-100% - .5rem),-50%)}.sds-tooltip-right{transform:translateY(-50%);margin-left:.5rem}.sds-tooltip-dynamic{margin-left:20px}\n"] }]
26
26
  }], ctorParameters: () => [] });
27
27
 
28
28
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"spicainternational-ngx-sds-components-src-lib-tooltip.mjs","sources":["../../../projects/ngx-sds-components/src/lib/tooltip/components/tooltip.component.ts","../../../projects/ngx-sds-components/src/lib/tooltip/components/tooltip.component.html","../../../projects/ngx-sds-components/src/lib/tooltip/utils/tooltip.utils.ts","../../../projects/ngx-sds-components/src/lib/tooltip/tooltip.directive.ts","../../../projects/ngx-sds-components/src/lib/tooltip/spicainternational-ngx-sds-components-src-lib-tooltip.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\r\nimport { TooltipPosition, TooltipTheme } from '../tooltip.types';\r\nimport { IconProp } from '@fortawesome/fontawesome-svg-core';\r\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\r\nimport { NgClass, NgIf } from '@angular/common';\r\n\r\n@Component({\r\n templateUrl: './tooltip.component.html',\r\n styleUrls: ['./tooltip.component.scss'],\r\n standalone: true,\r\n imports: [\r\n NgClass,\r\n NgIf,\r\n FaIconComponent,\r\n ],\r\n})\r\nexport class SdsTooltipComponent implements OnInit {\r\n\r\n public tooltip: string = '';\r\n public left: number = 0;\r\n public top: number = 0;\r\n public visible: boolean = false;\r\n\r\n public tooltipIcon?: IconProp;\r\n public tooltipClass?: string;\r\n\r\n public position: TooltipPosition = 'above';\r\n public theme: TooltipTheme = 'dark';\r\n\r\n\r\n\r\n constructor() {}\r\n\r\n ngOnInit(): void {}\r\n}\r\n","<div class=\"sds-tooltip\"\r\n [ngClass]=\"['sds-tooltip-' + position, 'sds-tooltip-' + theme, tooltipClass]\"\r\n [class.sds-tooltip-visible]=\"visible\"\r\n [style.left.px]=\"left\"\r\n [style.top.px]=\"top\"\r\n >\r\n <fa-icon class=\"sds-tooltip-icon\"\r\n *ngIf=\"tooltipIcon\" \r\n [icon]=\"tooltipIcon\">\r\n </fa-icon>\r\n\r\n <small class=\"sds-tooltip-text\">\r\n {{ tooltip }}\r\n </small>\r\n\r\n</div>\r\n","/**\r\n * Check if device is mobile phone or tablet\r\n * {@link https://stackoverflow.com/a/11381730 | [SO] Detecting a mobile browser }\r\n */\r\nexport const isMobile = function() {\r\n let check = false;\r\n (function(a){\r\n if(\r\n // RegExp for mobile devices\r\n /(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i\r\n // preform regex check\r\n .test(a.substr(0,4))\r\n ) \r\n check = true;\r\n })(navigator.userAgent||navigator.vendor||(window as any).opera);\r\n return check;\r\n };\r\n ","import {\r\n ApplicationRef,\r\n ComponentFactoryResolver,\r\n ComponentRef,\r\n Directive,\r\n ElementRef,\r\n EmbeddedViewRef,\r\n HostListener,\r\n Injector,\r\n Input,\r\n OnChanges,\r\n Renderer2,\r\n SimpleChanges,\r\n ViewContainerRef,\r\n} from '@angular/core';\r\nimport { SdsTooltipComponent } from './components/tooltip.component';\r\nimport { TooltipPosition, TooltipTheme } from './tooltip.types';\r\nimport { IconProp } from '@fortawesome/fontawesome-svg-core';\r\nimport { isMobile } from './utils';\r\n\r\n@Directive({\r\n selector: '[sdsTooltip]',\r\n standalone: true,\r\n})\r\nexport class SdsTooltipDirective implements OnChanges {\r\n @Input() tooltip = '';\r\n @Input() tooltipClass = '';\r\n @Input() tooltipIcon?: IconProp;\r\n @Input() position: TooltipPosition = 'above';\r\n @Input() theme: TooltipTheme = 'dark';\r\n @Input() showDelay = 0;\r\n @Input() hideDelay = 0;\r\n\r\n private componentRef: ComponentRef<any> | null = null;\r\n private showTimeout?: number;\r\n private hideTimeout?: number;\r\n private touchTimeout?: number;\r\n\r\n\r\n constructor(\r\n private elementRef: ElementRef,\r\n private appRef: ApplicationRef,\r\n private componentFactoryResolver: ComponentFactoryResolver,\r\n // private viewContainerRef: ViewContainerRef,\r\n private injector: Injector,\r\n // private renderer2: Renderer2\r\n ) {\r\n // this.renderer2.listen('window', 'scroll', (_) => {\r\n // console.log('scroll');\r\n // this.setHideTooltipTimeout();\r\n // });\r\n }\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['tooltip']) {\r\n if (this.componentRef !== null) {\r\n this.componentRef.instance.tooltip = this.tooltip;\r\n } \r\n }\r\n\r\n if (changes['tooltipIcon']) {\r\n if (this.componentRef !== null) {\r\n this.componentRef.instance.tooltipIcon = this.tooltipIcon;\r\n } \r\n } \r\n \r\n if (changes['tooltipClass']) {\r\n if (this.componentRef !== null) {\r\n this.componentRef.instance.tooltipClass = this.tooltipClass;\r\n } \r\n } \r\n }\r\n\r\n @HostListener('mouseenter')\r\n onMouseEnter(): void {\r\n if(isMobile()) return;\r\n\r\n this.initializeTooltip();\r\n }\r\n\r\n @HostListener('mouseleave')\r\n onMouseLeave(): void {\r\n if(isMobile()) return;\r\n\r\n this.setHideTooltipTimeout();\r\n }\r\n\r\n // @HostListener(\"window:scroll\", [])\r\n // onWindowScroll() {\r\n // console.log('scroll');\r\n // this.setHideTooltipTimeout();\r\n // }\r\n\r\n // @HostListener('window:scroll') onScroll(e: Event): void {\r\n // console.log((e.target as Element).scrollTop);\r\n // }\r\n\r\n // @HostListener('scroll') onScrollHost(e: Event): void {\r\n // console.log((e.target as Element).scrollTop);\r\n // }\r\n\r\n @HostListener('mousemove', ['$event'])\r\n onMouseMove($event: MouseEvent): void {\r\n if(isMobile()) return;\r\n\r\n if (this.componentRef !== null && this.position === 'dynamic') {\r\n this.componentRef.instance.left = $event.clientX;\r\n this.componentRef.instance.top = $event.clientY;\r\n this.componentRef.instance.tooltip = this.tooltip;\r\n this.componentRef.instance.tooltipIcon = this.tooltipIcon;\r\n this.componentRef.instance.tooltipClass = this.tooltipClass;\r\n }\r\n }\r\n\r\n @HostListener('touchstart', ['$event'])\r\n onTouchStart($event: TouchEvent): void {\r\n // Only triggered on mobile devices, no need to check device type\r\n \r\n window.clearTimeout(this.touchTimeout);\r\n this.touchTimeout = window.setTimeout(this.initializeTooltip.bind(this), 500);\r\n }\r\n\r\n @HostListener('touchend')\r\n onTouchEnd(): void {\r\n // Only triggered on mobile devices, no need to check device type\r\n\r\n window.clearTimeout(this.touchTimeout);\r\n this.setHideTooltipTimeout();\r\n }\r\n\r\n private initializeTooltip() {\r\n if (this.componentRef === null) {\r\n window.clearInterval(this.hideDelay);\r\n\r\n if (this.tooltip) {\r\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(SdsTooltipComponent);\r\n this.componentRef = componentFactory.create(this.injector);\r\n\r\n this.appRef.attachView(this.componentRef.hostView);\r\n const [tooltipDOMElement] = (this.componentRef.hostView as EmbeddedViewRef<any>).rootNodes;\r\n\r\n this.setTooltipComponentProperties();\r\n\r\n document.body.appendChild(tooltipDOMElement);\r\n this.showTimeout = window.setTimeout(this.showTooltip.bind(this), this.showDelay);\r\n }\r\n }\r\n }\r\n\r\n private setTooltipComponentProperties() {\r\n if (this.componentRef !== null) {\r\n this.componentRef.instance.tooltip = this.tooltip;\r\n this.componentRef.instance.tooltipIcon = this.tooltipIcon;\r\n this.componentRef.instance.tooltipClass = this.tooltipClass;\r\n this.componentRef.instance.position = this.position;\r\n this.componentRef.instance.theme = this.theme;\r\n\r\n const { left, right, top, bottom } = this.elementRef.nativeElement.getBoundingClientRect();\r\n\r\n switch (this.position) {\r\n case 'below': {\r\n this.componentRef.instance.left = Math.round((right - left) / 2 + left);\r\n this.componentRef.instance.top = Math.round(bottom);\r\n break;\r\n }\r\n case 'above': {\r\n this.componentRef.instance.left = Math.round((right - left) / 2 + left);\r\n this.componentRef.instance.top = Math.round(top);\r\n break;\r\n }\r\n case 'right': {\r\n this.componentRef.instance.left = Math.round(right);\r\n this.componentRef.instance.top = Math.round(top + (bottom - top) / 2);\r\n break;\r\n }\r\n case 'left': {\r\n this.componentRef.instance.left = Math.round(left);\r\n this.componentRef.instance.top = Math.round(top + (bottom - top) / 2);\r\n break;\r\n }\r\n default: {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n private showTooltip() {\r\n if (this.tooltip && this.componentRef !== null) {\r\n this.componentRef.instance.visible = true;\r\n }\r\n }\r\n\r\n private setHideTooltipTimeout() {\r\n this.hideTimeout = window.setTimeout(this.destroy.bind(this), this.hideDelay);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.destroy();\r\n }\r\n\r\n destroy(): void {\r\n if (this.componentRef !== null) {\r\n window.clearInterval(this.showTimeout);\r\n window.clearInterval(this.hideDelay);\r\n this.appRef.detachView(this.componentRef.hostView);\r\n this.componentRef.destroy();\r\n this.componentRef = null;\r\n }\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAgBa,mBAAmB,CAAA;AAe5B,IAAA,WAAA,GAAA;QAbO,IAAO,CAAA,OAAA,GAAW,EAAE;QACpB,IAAI,CAAA,IAAA,GAAW,CAAC;QAChB,IAAG,CAAA,GAAA,GAAW,CAAC;QACf,IAAO,CAAA,OAAA,GAAY,KAAK;QAKxB,IAAQ,CAAA,QAAA,GAAoB,OAAO;QACnC,IAAK,CAAA,KAAA,GAAiB,MAAM;;AAMnC,IAAA,QAAQ;+GAjBC,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,S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AAA,EAAA,WAAA,EAAA,qBAAA,EAAA,YAAA,EAAA,sBAAA,EAAA,UAAA,EAAA,cAAA,EAAA,EAAA,EAAA,aAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,UAAU,EAAE,IAAI;AACnB,iBAAA;0KAEY,OAAO,EAAA,CAAA;sBAAf;gBACQ,YAAY,EAAA,CAAA;sBAApB;gBACQ,WAAW,EAAA,CAAA;sBAAnB;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,KAAK,EAAA,CAAA;sBAAb;gBACQ,SAAS,EAAA,CAAA;sBAAjB;gBACQ,SAAS,EAAA,CAAA;sBAAjB;gBA0CD,YAAY,EAAA,CAAA;sBADX,YAAY;uBAAC,YAAY;gBAQ1B,YAAY,EAAA,CAAA;sBADX,YAAY;uBAAC,YAAY;gBAsB1B,WAAW,EAAA,CAAA;sBADV,YAAY;uBAAC,WAAW,EAAE,CAAC,QAAQ,CAAC;gBAcrC,YAAY,EAAA,CAAA;sBADX,YAAY;uBAAC,YAAY,EAAE,CAAC,QAAQ,CAAC;gBAStC,UAAU,EAAA,CAAA;sBADT,YAAY;uBAAC,UAAU;;;ACzH5B;;AAEG;;;;"}
1
+ {"version":3,"file":"spicainternational-ngx-sds-components-src-lib-tooltip.mjs","sources":["../../../projects/ngx-sds-components/src/lib/tooltip/components/tooltip.component.ts","../../../projects/ngx-sds-components/src/lib/tooltip/components/tooltip.component.html","../../../projects/ngx-sds-components/src/lib/tooltip/utils/tooltip.utils.ts","../../../projects/ngx-sds-components/src/lib/tooltip/tooltip.directive.ts","../../../projects/ngx-sds-components/src/lib/tooltip/spicainternational-ngx-sds-components-src-lib-tooltip.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\nimport { TooltipPosition, TooltipTheme } from '../tooltip.types';\nimport { IconProp } from '@fortawesome/fontawesome-svg-core';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport { NgClass, NgIf } from '@angular/common';\n\n@Component({\n templateUrl: './tooltip.component.html',\n styleUrls: ['./tooltip.component.scss'],\n standalone: true,\n imports: [\n NgClass,\n NgIf,\n FaIconComponent,\n ],\n})\nexport class SdsTooltipComponent implements OnInit {\n\n public tooltip: string = '';\n public left: number = 0;\n public top: number = 0;\n public visible: boolean = false;\n\n public tooltipIcon?: IconProp;\n public tooltipClass?: string;\n\n public position: TooltipPosition = 'above';\n public theme: TooltipTheme = 'dark';\n\n\n\n constructor() {}\n\n ngOnInit(): void {}\n}\n","<div class=\"sds-tooltip\"\n [ngClass]=\"['sds-tooltip-' + position, 'sds-tooltip-' + theme, tooltipClass]\"\n [class.sds-tooltip-visible]=\"visible\"\n [style.left.px]=\"left\"\n [style.top.px]=\"top\"\n >\n <fa-icon class=\"sds-tooltip-icon\"\n *ngIf=\"tooltipIcon\" \n [icon]=\"tooltipIcon\">\n </fa-icon>\n\n <small class=\"sds-tooltip-text\">\n {{ tooltip }}\n </small>\n\n</div>\n","/**\n * Check if device is mobile phone or tablet\n * {@link https://stackoverflow.com/a/11381730 | [SO] Detecting a mobile browser }\n */\nexport const isMobile = function() {\n let check = false;\n (function(a){\n if(\n // RegExp for mobile devices\n /(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i\n // preform regex check\n .test(a.substr(0,4))\n ) \n check = true;\n })(navigator.userAgent||navigator.vendor||(window as any).opera);\n return check;\n };\n ","import {\n ApplicationRef,\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n ElementRef,\n EmbeddedViewRef,\n HostListener,\n Injector,\n Input,\n OnChanges,\n Renderer2,\n SimpleChanges,\n ViewContainerRef,\n} from '@angular/core';\nimport { SdsTooltipComponent } from './components/tooltip.component';\nimport { TooltipPosition, TooltipTheme } from './tooltip.types';\nimport { IconProp } from '@fortawesome/fontawesome-svg-core';\nimport { isMobile } from './utils';\n\n@Directive({\n selector: '[sdsTooltip]',\n standalone: true,\n})\nexport class SdsTooltipDirective implements OnChanges {\n @Input() tooltip = '';\n @Input() tooltipClass = '';\n @Input() tooltipIcon?: IconProp;\n @Input() position: TooltipPosition = 'above';\n @Input() theme: TooltipTheme = 'dark';\n @Input() showDelay = 0;\n @Input() hideDelay = 0;\n\n private componentRef: ComponentRef<any> | null = null;\n private showTimeout?: number;\n private hideTimeout?: number;\n private touchTimeout?: number;\n\n\n constructor(\n private elementRef: ElementRef,\n private appRef: ApplicationRef,\n private componentFactoryResolver: ComponentFactoryResolver,\n // private viewContainerRef: ViewContainerRef,\n private injector: Injector,\n // private renderer2: Renderer2\n ) {\n // this.renderer2.listen('window', 'scroll', (_) => {\n // console.log('scroll');\n // this.setHideTooltipTimeout();\n // });\n }\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['tooltip']) {\n if (this.componentRef !== null) {\n this.componentRef.instance.tooltip = this.tooltip;\n } \n }\n\n if (changes['tooltipIcon']) {\n if (this.componentRef !== null) {\n this.componentRef.instance.tooltipIcon = this.tooltipIcon;\n } \n } \n \n if (changes['tooltipClass']) {\n if (this.componentRef !== null) {\n this.componentRef.instance.tooltipClass = this.tooltipClass;\n } \n } \n }\n\n @HostListener('mouseenter')\n onMouseEnter(): void {\n if(isMobile()) return;\n\n this.initializeTooltip();\n }\n\n @HostListener('mouseleave')\n onMouseLeave(): void {\n if(isMobile()) return;\n\n this.setHideTooltipTimeout();\n }\n\n // @HostListener(\"window:scroll\", [])\n // onWindowScroll() {\n // console.log('scroll');\n // this.setHideTooltipTimeout();\n // }\n\n // @HostListener('window:scroll') onScroll(e: Event): void {\n // console.log((e.target as Element).scrollTop);\n // }\n\n // @HostListener('scroll') onScrollHost(e: Event): void {\n // console.log((e.target as Element).scrollTop);\n // }\n\n @HostListener('mousemove', ['$event'])\n onMouseMove($event: MouseEvent): void {\n if(isMobile()) return;\n\n if (this.componentRef !== null && this.position === 'dynamic') {\n this.componentRef.instance.left = $event.clientX;\n this.componentRef.instance.top = $event.clientY;\n this.componentRef.instance.tooltip = this.tooltip;\n this.componentRef.instance.tooltipIcon = this.tooltipIcon;\n this.componentRef.instance.tooltipClass = this.tooltipClass;\n }\n }\n\n @HostListener('touchstart', ['$event'])\n onTouchStart($event: TouchEvent): void {\n // Only triggered on mobile devices, no need to check device type\n \n window.clearTimeout(this.touchTimeout);\n this.touchTimeout = window.setTimeout(this.initializeTooltip.bind(this), 500);\n }\n\n @HostListener('touchend')\n onTouchEnd(): void {\n // Only triggered on mobile devices, no need to check device type\n\n window.clearTimeout(this.touchTimeout);\n this.setHideTooltipTimeout();\n }\n\n private initializeTooltip() {\n if (this.componentRef === null) {\n window.clearInterval(this.hideDelay);\n\n if (this.tooltip) {\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(SdsTooltipComponent);\n this.componentRef = componentFactory.create(this.injector);\n\n this.appRef.attachView(this.componentRef.hostView);\n const [tooltipDOMElement] = (this.componentRef.hostView as EmbeddedViewRef<any>).rootNodes;\n\n this.setTooltipComponentProperties();\n\n document.body.appendChild(tooltipDOMElement);\n this.showTimeout = window.setTimeout(this.showTooltip.bind(this), this.showDelay);\n }\n }\n }\n\n private setTooltipComponentProperties() {\n if (this.componentRef !== null) {\n this.componentRef.instance.tooltip = this.tooltip;\n this.componentRef.instance.tooltipIcon = this.tooltipIcon;\n this.componentRef.instance.tooltipClass = this.tooltipClass;\n this.componentRef.instance.position = this.position;\n this.componentRef.instance.theme = this.theme;\n\n const { left, right, top, bottom } = this.elementRef.nativeElement.getBoundingClientRect();\n\n switch (this.position) {\n case 'below': {\n this.componentRef.instance.left = Math.round((right - left) / 2 + left);\n this.componentRef.instance.top = Math.round(bottom);\n break;\n }\n case 'above': {\n this.componentRef.instance.left = Math.round((right - left) / 2 + left);\n this.componentRef.instance.top = Math.round(top);\n break;\n }\n case 'right': {\n this.componentRef.instance.left = Math.round(right);\n this.componentRef.instance.top = Math.round(top + (bottom - top) / 2);\n break;\n }\n case 'left': {\n this.componentRef.instance.left = Math.round(left);\n this.componentRef.instance.top = Math.round(top + (bottom - top) / 2);\n break;\n }\n default: {\n break;\n }\n }\n }\n }\n\n private showTooltip() {\n if (this.tooltip && this.componentRef !== null) {\n this.componentRef.instance.visible = true;\n }\n }\n\n private setHideTooltipTimeout() {\n this.hideTimeout = window.setTimeout(this.destroy.bind(this), this.hideDelay);\n }\n\n ngOnDestroy(): void {\n this.destroy();\n }\n\n destroy(): void {\n if (this.componentRef !== null) {\n window.clearInterval(this.showTimeout);\n window.clearInterval(this.hideDelay);\n this.appRef.detachView(this.componentRef.hostView);\n this.componentRef.destroy();\n this.componentRef = null;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAgBa,mBAAmB,CAAA;AAe5B,I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
@@ -1 +1 @@
1
- {"version":3,"file":"spicainternational-ngx-sds-components-src-lib-utils-date-time.mjs","sources":["../../../projects/ngx-sds-components/src/lib/utils/date-time/intl-date-time-format-options-presets.ts","../../../projects/ngx-sds-components/src/lib/utils/date-time/date-time-format.function.ts","../../../projects/ngx-sds-components/src/lib/utils/date-time/spicainternational-ngx-sds-components-src-lib-utils-date-time.ts"],"sourcesContent":["export type IntlDateTimeFormatOptionPresetType = \r\n 'time' | \r\n 'time-with-seconds' | \r\n 'date' | \r\n 'date-with-month-name' | \r\n 'date-time';\r\n\r\nexport const INTL_DATE_TIME_FORMAT_OPTIONS_PRESETS: { [Key in IntlDateTimeFormatOptionPresetType]: Intl.DateTimeFormatOptions } = {\r\n 'time': {\r\n hour: 'numeric',\r\n minute: '2-digit'\r\n },\r\n 'time-with-seconds': {\r\n hour: 'numeric',\r\n minute: '2-digit',\r\n second: '2-digit'\r\n },\r\n 'date': {\r\n day: 'numeric',\r\n month: 'numeric',\r\n year: 'numeric'\r\n },\r\n 'date-with-month-name': {\r\n day: 'numeric',\r\n month: 'long',\r\n year: 'numeric'\r\n },\r\n 'date-time': {\r\n day: 'numeric',\r\n month: 'numeric',\r\n year: 'numeric',\r\n hour: 'numeric',\r\n minute: '2-digit'\r\n }\r\n};","import {\r\n INTL_DATE_TIME_FORMAT_OPTIONS_PRESETS,\r\n IntlDateTimeFormatOptionPresetType,\r\n} from './intl-date-time-format-options-presets';\r\n\r\nexport const formatDateTime = (\r\n date: Date | number | string | undefined,\r\n locales: string | Array<string>,\r\n options?: Intl.DateTimeFormatOptions | IntlDateTimeFormatOptionPresetType\r\n): string => {\r\n if (date === null || date === undefined) {\r\n return '';\r\n }\r\n\r\n const formatDate = new Date(date);\r\n if (formatDate.toString() == 'Invalid Date') {\r\n return '';\r\n }\r\n\r\n if (typeof options === 'string') {\r\n return formatDate.toLocaleDateString(\r\n locales,\r\n INTL_DATE_TIME_FORMAT_OPTIONS_PRESETS[options]\r\n );\r\n }\r\n\r\n return formatDate.toLocaleDateString(\r\n locales,\r\n options as Intl.DateTimeFormatOptions | undefined\r\n );\r\n};\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAOa,MAAA,qCAAqC,GAAgF;AAC9H,IAAA,MAAM,EAAE;AACJ,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,MAAM,EAAE;AACX,KAAA;AACD,IAAA,mBAAmB,EAAE;AACjB,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,MAAM,EAAE,SAAS;AACjB,QAAA,MAAM,EAAE;AACX,KAAA;AACD,IAAA,MAAM,EAAE;AACJ,QAAA,GAAG,EAAE,SAAS;AACd,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,IAAI,EAAE;AACT,KAAA;AACD,IAAA,sBAAsB,EAAE;AACpB,QAAA,GAAG,EAAE,SAAS;AACd,QAAA,KAAK,EAAE,MAAM;AACb,QAAA,IAAI,EAAE;AACT,KAAA;AACD,IAAA,WAAW,EAAE;AACT,QAAA,GAAG,EAAE,SAAS;AACd,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,MAAM,EAAE;AACX;;;AC5BQ,MAAA,cAAc,GAAG,CAC1B,IAAwC,EACxC,OAA+B,EAC/B,OAAyE,KACjE;IACR,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,EAAE;AACrC,QAAA,OAAO,EAAE;;AAGb,IAAA,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC;AACjC,IAAA,IAAI,UAAU,CAAC,QAAQ,EAAE,IAAI,cAAc,EAAE;AACzC,QAAA,OAAO,EAAE;;AAGb,IAAA,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC7B,OAAO,UAAU,CAAC,kBAAkB,CAChC,OAAO,EACP,qCAAqC,CAAC,OAAO,CAAC,CACjD;;IAGL,OAAO,UAAU,CAAC,kBAAkB,CAChC,OAAO,EACP,OAAiD,CACpD;AACL;;AC9BA;;AAEG;;;;"}
1
+ {"version":3,"file":"spicainternational-ngx-sds-components-src-lib-utils-date-time.mjs","sources":["../../../projects/ngx-sds-components/src/lib/utils/date-time/intl-date-time-format-options-presets.ts","../../../projects/ngx-sds-components/src/lib/utils/date-time/date-time-format.function.ts","../../../projects/ngx-sds-components/src/lib/utils/date-time/spicainternational-ngx-sds-components-src-lib-utils-date-time.ts"],"sourcesContent":["export type IntlDateTimeFormatOptionPresetType = \n 'time' | \n 'time-with-seconds' | \n 'date' | \n 'date-with-month-name' | \n 'date-time';\n\nexport const INTL_DATE_TIME_FORMAT_OPTIONS_PRESETS: { [Key in IntlDateTimeFormatOptionPresetType]: Intl.DateTimeFormatOptions } = {\n 'time': {\n hour: 'numeric',\n minute: '2-digit'\n },\n 'time-with-seconds': {\n hour: 'numeric',\n minute: '2-digit',\n second: '2-digit'\n },\n 'date': {\n day: 'numeric',\n month: 'numeric',\n year: 'numeric'\n },\n 'date-with-month-name': {\n day: 'numeric',\n month: 'long',\n year: 'numeric'\n },\n 'date-time': {\n day: 'numeric',\n month: 'numeric',\n year: 'numeric',\n hour: 'numeric',\n minute: '2-digit'\n }\n};","import {\n INTL_DATE_TIME_FORMAT_OPTIONS_PRESETS,\n IntlDateTimeFormatOptionPresetType,\n} from './intl-date-time-format-options-presets';\n\nexport const formatDateTime = (\n date: Date | number | string | undefined,\n locales: string | Array<string>,\n options?: Intl.DateTimeFormatOptions | IntlDateTimeFormatOptionPresetType\n): string => {\n if (date === null || date === undefined) {\n return '';\n }\n\n const formatDate = new Date(date);\n if (formatDate.toString() == 'Invalid Date') {\n return '';\n }\n\n if (typeof options === 'string') {\n return formatDate.toLocaleDateString(\n locales,\n INTL_DATE_TIME_FORMAT_OPTIONS_PRESETS[options]\n );\n }\n\n return formatDate.toLocaleDateString(\n locales,\n options as Intl.DateTimeFormatOptions | undefined\n );\n};\n","/**\n * Generated bundle index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