@ngstarter-ui/components 22.3.5 → 22.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (476) hide show
  1. package/README.md +27 -0
  2. package/ai/component-registry.json +186 -101
  3. package/fesm2022/attachment-block-BK9QxVjq.mjs +163 -0
  4. package/fesm2022/attachment-block-BK9QxVjq.mjs.map +1 -0
  5. package/fesm2022/callout-block-Bl4GZYz8.mjs +196 -0
  6. package/fesm2022/callout-block-Bl4GZYz8.mjs.map +1 -0
  7. package/fesm2022/code-block.component-DCRD-9iP.mjs +393 -0
  8. package/fesm2022/code-block.component-DCRD-9iP.mjs.map +1 -0
  9. package/fesm2022/content-builder.store-D622mHxt.mjs +328 -0
  10. package/fesm2022/content-builder.store-D622mHxt.mjs.map +1 -0
  11. package/fesm2022/content-editor-content-editable.directive-WzD9_71s.mjs +1110 -0
  12. package/fesm2022/content-editor-content-editable.directive-WzD9_71s.mjs.map +1 -0
  13. package/fesm2022/cursor-controller-DKfBII1n.mjs +55 -0
  14. package/fesm2022/cursor-controller-DKfBII1n.mjs.map +1 -0
  15. package/fesm2022/default-converters-9oSKDsXP.mjs +140 -0
  16. package/fesm2022/default-converters-9oSKDsXP.mjs.map +1 -0
  17. package/fesm2022/divider-block.component-Dvgeq_D0.mjs +148 -0
  18. package/fesm2022/divider-block.component-Dvgeq_D0.mjs.map +1 -0
  19. package/fesm2022/embed-block-CYkOv4Wt.mjs +565 -0
  20. package/fesm2022/embed-block-CYkOv4Wt.mjs.map +1 -0
  21. package/fesm2022/extra-block-defs-Cn_hfM3c.mjs +122 -0
  22. package/fesm2022/extra-block-defs-Cn_hfM3c.mjs.map +1 -0
  23. package/fesm2022/gallery-block-DT3uIURY.mjs +365 -0
  24. package/fesm2022/gallery-block-DT3uIURY.mjs.map +1 -0
  25. package/fesm2022/grid-block-ZVDT3m8-.mjs +504 -0
  26. package/fesm2022/grid-block-ZVDT3m8-.mjs.map +1 -0
  27. package/fesm2022/heading-block.component-iCpJGTMh.mjs +274 -0
  28. package/fesm2022/heading-block.component-iCpJGTMh.mjs.map +1 -0
  29. package/fesm2022/html-utils-DywL8gGa.mjs +24 -0
  30. package/fesm2022/html-utils-DywL8gGa.mjs.map +1 -0
  31. package/fesm2022/image-block.component-DJ7-HCR8.mjs +285 -0
  32. package/fesm2022/image-block.component-DJ7-HCR8.mjs.map +1 -0
  33. package/fesm2022/list-block.component-qFIebEBO.mjs +312 -0
  34. package/fesm2022/list-block.component-qFIebEBO.mjs.map +1 -0
  35. package/fesm2022/nested-blocks-CXhgXJ1H.mjs +345 -0
  36. package/fesm2022/nested-blocks-CXhgXJ1H.mjs.map +1 -0
  37. package/fesm2022/ngstarter-ui-components-action-required.mjs +150 -45
  38. package/fesm2022/ngstarter-ui-components-action-required.mjs.map +1 -1
  39. package/fesm2022/ngstarter-ui-components-alert.mjs +318 -133
  40. package/fesm2022/ngstarter-ui-components-alert.mjs.map +1 -1
  41. package/fesm2022/ngstarter-ui-components-announcement.mjs +280 -88
  42. package/fesm2022/ngstarter-ui-components-announcement.mjs.map +1 -1
  43. package/fesm2022/ngstarter-ui-components-autocomplete.mjs +647 -386
  44. package/fesm2022/ngstarter-ui-components-autocomplete.mjs.map +1 -1
  45. package/fesm2022/ngstarter-ui-components-avatar.mjs +715 -482
  46. package/fesm2022/ngstarter-ui-components-avatar.mjs.map +1 -1
  47. package/fesm2022/ngstarter-ui-components-badge.mjs +308 -97
  48. package/fesm2022/ngstarter-ui-components-badge.mjs.map +1 -1
  49. package/fesm2022/ngstarter-ui-components-block-loader.mjs +164 -47
  50. package/fesm2022/ngstarter-ui-components-block-loader.mjs.map +1 -1
  51. package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs +278 -315
  52. package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs.map +1 -1
  53. package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs +707 -205
  54. package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs.map +1 -1
  55. package/fesm2022/ngstarter-ui-components-button-toggle.mjs +518 -175
  56. package/fesm2022/ngstarter-ui-components-button-toggle.mjs.map +1 -1
  57. package/fesm2022/ngstarter-ui-components-button.mjs +294 -68
  58. package/fesm2022/ngstarter-ui-components-button.mjs.map +1 -1
  59. package/fesm2022/ngstarter-ui-components-calendar.mjs +442 -250
  60. package/fesm2022/ngstarter-ui-components-calendar.mjs.map +1 -1
  61. package/fesm2022/ngstarter-ui-components-card-overlay.mjs +159 -47
  62. package/fesm2022/ngstarter-ui-components-card-overlay.mjs.map +1 -1
  63. package/fesm2022/ngstarter-ui-components-card.mjs +619 -194
  64. package/fesm2022/ngstarter-ui-components-card.mjs.map +1 -1
  65. package/fesm2022/ngstarter-ui-components-carousel.mjs +1012 -634
  66. package/fesm2022/ngstarter-ui-components-carousel.mjs.map +1 -1
  67. package/fesm2022/ngstarter-ui-components-checkbox.mjs +715 -308
  68. package/fesm2022/ngstarter-ui-components-checkbox.mjs.map +1 -1
  69. package/fesm2022/ngstarter-ui-components-chips.mjs +1397 -667
  70. package/fesm2022/ngstarter-ui-components-chips.mjs.map +1 -1
  71. package/fesm2022/ngstarter-ui-components-code-highlighter.mjs +519 -357
  72. package/fesm2022/ngstarter-ui-components-code-highlighter.mjs.map +1 -1
  73. package/fesm2022/ngstarter-ui-components-color-picker.mjs +1218 -604
  74. package/fesm2022/ngstarter-ui-components-color-picker.mjs.map +1 -1
  75. package/fesm2022/ngstarter-ui-components-color-scheme.mjs +265 -134
  76. package/fesm2022/ngstarter-ui-components-color-scheme.mjs.map +1 -1
  77. package/fesm2022/ngstarter-ui-components-color-switcher.mjs +190 -71
  78. package/fesm2022/ngstarter-ui-components-color-switcher.mjs.map +1 -1
  79. package/fesm2022/ngstarter-ui-components-command-bar.mjs +197 -58
  80. package/fesm2022/ngstarter-ui-components-command-bar.mjs.map +1 -1
  81. package/fesm2022/ngstarter-ui-components-comment-editor.mjs +2212 -1128
  82. package/fesm2022/ngstarter-ui-components-comment-editor.mjs.map +1 -1
  83. package/fesm2022/ngstarter-ui-components-comparison-slider.mjs +269 -183
  84. package/fesm2022/ngstarter-ui-components-comparison-slider.mjs.map +1 -1
  85. package/fesm2022/ngstarter-ui-components-confirm.mjs +164 -86
  86. package/fesm2022/ngstarter-ui-components-confirm.mjs.map +1 -1
  87. package/fesm2022/ngstarter-ui-components-content-editor.mjs +6240 -2
  88. package/fesm2022/ngstarter-ui-components-content-editor.mjs.map +1 -1
  89. package/fesm2022/ngstarter-ui-components-cookie-popup.mjs +244 -108
  90. package/fesm2022/ngstarter-ui-components-cookie-popup.mjs.map +1 -1
  91. package/fesm2022/ngstarter-ui-components-core.mjs +2110 -1592
  92. package/fesm2022/ngstarter-ui-components-core.mjs.map +1 -1
  93. package/fesm2022/ngstarter-ui-components-country-select.mjs +1970 -588
  94. package/fesm2022/ngstarter-ui-components-country-select.mjs.map +1 -1
  95. package/fesm2022/ngstarter-ui-components-crop.mjs +249 -191
  96. package/fesm2022/ngstarter-ui-components-crop.mjs.map +1 -1
  97. package/fesm2022/ngstarter-ui-components-currency-select.mjs +1658 -452
  98. package/fesm2022/ngstarter-ui-components-currency-select.mjs.map +1 -1
  99. package/fesm2022/ngstarter-ui-components-data-view.mjs +4538 -2497
  100. package/fesm2022/ngstarter-ui-components-data-view.mjs.map +1 -1
  101. package/fesm2022/ngstarter-ui-components-date-format-select.mjs +357 -157
  102. package/fesm2022/ngstarter-ui-components-date-format-select.mjs.map +1 -1
  103. package/fesm2022/ngstarter-ui-components-datepicker.mjs +2587 -1264
  104. package/fesm2022/ngstarter-ui-components-datepicker.mjs.map +1 -1
  105. package/fesm2022/ngstarter-ui-components-dialog.mjs +681 -385
  106. package/fesm2022/ngstarter-ui-components-dialog.mjs.map +1 -1
  107. package/fesm2022/ngstarter-ui-components-digit-roller.mjs +1000 -750
  108. package/fesm2022/ngstarter-ui-components-digit-roller.mjs.map +1 -1
  109. package/fesm2022/ngstarter-ui-components-divider.mjs +164 -41
  110. package/fesm2022/ngstarter-ui-components-divider.mjs.map +1 -1
  111. package/fesm2022/ngstarter-ui-components-drawer.mjs +218 -143
  112. package/fesm2022/ngstarter-ui-components-drawer.mjs.map +1 -1
  113. package/fesm2022/ngstarter-ui-components-emoji-picker.mjs +345 -247
  114. package/fesm2022/ngstarter-ui-components-emoji-picker.mjs.map +1 -1
  115. package/fesm2022/ngstarter-ui-components-empty-state.mjs +244 -74
  116. package/fesm2022/ngstarter-ui-components-empty-state.mjs.map +1 -1
  117. package/fesm2022/ngstarter-ui-components-events.mjs +467 -126
  118. package/fesm2022/ngstarter-ui-components-events.mjs.map +1 -1
  119. package/fesm2022/ngstarter-ui-components-expand.mjs +191 -59
  120. package/fesm2022/ngstarter-ui-components-expand.mjs.map +1 -1
  121. package/fesm2022/ngstarter-ui-components-expansion.mjs +529 -193
  122. package/fesm2022/ngstarter-ui-components-expansion.mjs.map +1 -1
  123. package/fesm2022/ngstarter-ui-components-file-type.mjs +270 -171
  124. package/fesm2022/ngstarter-ui-components-file-type.mjs.map +1 -1
  125. package/fesm2022/ngstarter-ui-components-filter-builder.mjs +741 -352
  126. package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -1
  127. package/fesm2022/ngstarter-ui-components-form-builder.mjs +9032 -6964
  128. package/fesm2022/ngstarter-ui-components-form-builder.mjs.map +1 -1
  129. package/fesm2022/ngstarter-ui-components-form-field.mjs +741 -276
  130. package/fesm2022/ngstarter-ui-components-form-field.mjs.map +1 -1
  131. package/fesm2022/ngstarter-ui-components-gauge.mjs +155 -43
  132. package/fesm2022/ngstarter-ui-components-gauge.mjs.map +1 -1
  133. package/fesm2022/ngstarter-ui-components-grid.mjs +197 -81
  134. package/fesm2022/ngstarter-ui-components-grid.mjs.map +1 -1
  135. package/fesm2022/ngstarter-ui-components-guided-tour.mjs +881 -740
  136. package/fesm2022/ngstarter-ui-components-guided-tour.mjs.map +1 -1
  137. package/fesm2022/ngstarter-ui-components-headless-editor.mjs +3573 -3656
  138. package/fesm2022/ngstarter-ui-components-headless-editor.mjs.map +1 -1
  139. package/fesm2022/ngstarter-ui-components-headless-stepper.mjs +277 -204
  140. package/fesm2022/ngstarter-ui-components-headless-stepper.mjs.map +1 -1
  141. package/fesm2022/ngstarter-ui-components-icon.mjs +209 -182
  142. package/fesm2022/ngstarter-ui-components-icon.mjs.map +1 -1
  143. package/fesm2022/ngstarter-ui-components-image-designer.mjs +5096 -4066
  144. package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -1
  145. package/fesm2022/ngstarter-ui-components-image-placeholder.mjs +45 -19
  146. package/fesm2022/ngstarter-ui-components-image-placeholder.mjs.map +1 -1
  147. package/fesm2022/ngstarter-ui-components-image-resizer.mjs +333 -154
  148. package/fesm2022/ngstarter-ui-components-image-resizer.mjs.map +1 -1
  149. package/fesm2022/ngstarter-ui-components-image-viewer.mjs +564 -358
  150. package/fesm2022/ngstarter-ui-components-image-viewer.mjs.map +1 -1
  151. package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs +246 -167
  152. package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs.map +1 -1
  153. package/fesm2022/ngstarter-ui-components-incidents.mjs +732 -258
  154. package/fesm2022/ngstarter-ui-components-incidents.mjs.map +1 -1
  155. package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs +244 -182
  156. package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs.map +1 -1
  157. package/fesm2022/ngstarter-ui-components-input-mask.mjs +314 -174
  158. package/fesm2022/ngstarter-ui-components-input-mask.mjs.map +1 -1
  159. package/fesm2022/ngstarter-ui-components-input-validator.mjs +45 -69
  160. package/fesm2022/ngstarter-ui-components-input-validator.mjs.map +1 -1
  161. package/fesm2022/ngstarter-ui-components-input.mjs +303 -161
  162. package/fesm2022/ngstarter-ui-components-input.mjs.map +1 -1
  163. package/fesm2022/ngstarter-ui-components-kanban-board.mjs +504 -159
  164. package/fesm2022/ngstarter-ui-components-kanban-board.mjs.map +1 -1
  165. package/fesm2022/ngstarter-ui-components-kbd.mjs +86 -30
  166. package/fesm2022/ngstarter-ui-components-kbd.mjs.map +1 -1
  167. package/fesm2022/ngstarter-ui-components-layout.mjs +681 -220
  168. package/fesm2022/ngstarter-ui-components-layout.mjs.map +1 -1
  169. package/fesm2022/ngstarter-ui-components-list.mjs +968 -281
  170. package/fesm2022/ngstarter-ui-components-list.mjs.map +1 -1
  171. package/fesm2022/ngstarter-ui-components-logo.mjs +181 -51
  172. package/fesm2022/ngstarter-ui-components-logo.mjs.map +1 -1
  173. package/fesm2022/ngstarter-ui-components-marquee.mjs +226 -147
  174. package/fesm2022/ngstarter-ui-components-marquee.mjs.map +1 -1
  175. package/fesm2022/ngstarter-ui-components-menu.mjs +1686 -1091
  176. package/fesm2022/ngstarter-ui-components-menu.mjs.map +1 -1
  177. package/fesm2022/ngstarter-ui-components-micro-chart.mjs +1541 -943
  178. package/fesm2022/ngstarter-ui-components-micro-chart.mjs.map +1 -1
  179. package/fesm2022/ngstarter-ui-components-navigation.mjs +1035 -455
  180. package/fesm2022/ngstarter-ui-components-navigation.mjs.map +1 -1
  181. package/fesm2022/ngstarter-ui-components-notifications.mjs +678 -230
  182. package/fesm2022/ngstarter-ui-components-notifications.mjs.map +1 -1
  183. package/fesm2022/ngstarter-ui-components-number-input.mjs +616 -316
  184. package/fesm2022/ngstarter-ui-components-number-input.mjs.map +1 -1
  185. package/fesm2022/ngstarter-ui-components-option.mjs +405 -163
  186. package/fesm2022/ngstarter-ui-components-option.mjs.map +1 -1
  187. package/fesm2022/ngstarter-ui-components-overlay.mjs +107 -111
  188. package/fesm2022/ngstarter-ui-components-overlay.mjs.map +1 -1
  189. package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs +131 -76
  190. package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs.map +1 -1
  191. package/fesm2022/ngstarter-ui-components-paginator.mjs +543 -295
  192. package/fesm2022/ngstarter-ui-components-paginator.mjs.map +1 -1
  193. package/fesm2022/ngstarter-ui-components-password-strength.mjs +785 -340
  194. package/fesm2022/ngstarter-ui-components-password-strength.mjs.map +1 -1
  195. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs +3705 -2695
  196. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs.map +1 -1
  197. package/fesm2022/ngstarter-ui-components-pdf-signer.mjs +1179 -851
  198. package/fesm2022/ngstarter-ui-components-pdf-signer.mjs.map +1 -1
  199. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs +2973 -2070
  200. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs.map +1 -1
  201. package/fesm2022/ngstarter-ui-components-phone-input.mjs +2081 -770
  202. package/fesm2022/ngstarter-ui-components-phone-input.mjs.map +1 -1
  203. package/fesm2022/ngstarter-ui-components-pin-input.mjs +366 -198
  204. package/fesm2022/ngstarter-ui-components-pin-input.mjs.map +1 -1
  205. package/fesm2022/ngstarter-ui-components-popover.mjs +558 -308
  206. package/fesm2022/ngstarter-ui-components-popover.mjs.map +1 -1
  207. package/fesm2022/ngstarter-ui-components-progress-bar.mjs +178 -73
  208. package/fesm2022/ngstarter-ui-components-progress-bar.mjs.map +1 -1
  209. package/fesm2022/ngstarter-ui-components-radio-card.mjs +301 -105
  210. package/fesm2022/ngstarter-ui-components-radio-card.mjs.map +1 -1
  211. package/fesm2022/ngstarter-ui-components-radio.mjs +417 -157
  212. package/fesm2022/ngstarter-ui-components-radio.mjs.map +1 -1
  213. package/fesm2022/ngstarter-ui-components-rail-nav.mjs +208 -88
  214. package/fesm2022/ngstarter-ui-components-rail-nav.mjs.map +1 -1
  215. package/fesm2022/ngstarter-ui-components-resizable-container.mjs +123 -74
  216. package/fesm2022/ngstarter-ui-components-resizable-container.mjs.map +1 -1
  217. package/fesm2022/ngstarter-ui-components-screen-loader.mjs +197 -95
  218. package/fesm2022/ngstarter-ui-components-screen-loader.mjs.map +1 -1
  219. package/fesm2022/ngstarter-ui-components-scroll-spy.mjs +383 -245
  220. package/fesm2022/ngstarter-ui-components-scroll-spy.mjs.map +1 -1
  221. package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs +705 -581
  222. package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs.map +1 -1
  223. package/fesm2022/ngstarter-ui-components-segmented.mjs +422 -220
  224. package/fesm2022/ngstarter-ui-components-segmented.mjs.map +1 -1
  225. package/fesm2022/ngstarter-ui-components-select.mjs +1862 -1159
  226. package/fesm2022/ngstarter-ui-components-select.mjs.map +1 -1
  227. package/fesm2022/ngstarter-ui-components-side-panel.mjs +313 -118
  228. package/fesm2022/ngstarter-ui-components-side-panel.mjs.map +1 -1
  229. package/fesm2022/ngstarter-ui-components-sidebar.mjs +1239 -470
  230. package/fesm2022/ngstarter-ui-components-sidebar.mjs.map +1 -1
  231. package/fesm2022/ngstarter-ui-components-sidenav.mjs +664 -354
  232. package/fesm2022/ngstarter-ui-components-sidenav.mjs.map +1 -1
  233. package/fesm2022/ngstarter-ui-components-signature-pad.mjs +1092 -643
  234. package/fesm2022/ngstarter-ui-components-signature-pad.mjs.map +1 -1
  235. package/fesm2022/ngstarter-ui-components-skeleton.mjs +153 -43
  236. package/fesm2022/ngstarter-ui-components-skeleton.mjs.map +1 -1
  237. package/fesm2022/ngstarter-ui-components-slide-toggle.mjs +425 -108
  238. package/fesm2022/ngstarter-ui-components-slide-toggle.mjs.map +1 -1
  239. package/fesm2022/ngstarter-ui-components-slider.mjs +645 -487
  240. package/fesm2022/ngstarter-ui-components-slider.mjs.map +1 -1
  241. package/fesm2022/ngstarter-ui-components-snack-bar.mjs +372 -354
  242. package/fesm2022/ngstarter-ui-components-snack-bar.mjs.map +1 -1
  243. package/fesm2022/ngstarter-ui-components-sort.mjs +378 -147
  244. package/fesm2022/ngstarter-ui-components-sort.mjs.map +1 -1
  245. package/fesm2022/ngstarter-ui-components-spinner.mjs +242 -76
  246. package/fesm2022/ngstarter-ui-components-spinner.mjs.map +1 -1
  247. package/fesm2022/ngstarter-ui-components-splash-screen.mjs +142 -91
  248. package/fesm2022/ngstarter-ui-components-splash-screen.mjs.map +1 -1
  249. package/fesm2022/ngstarter-ui-components-split.mjs +1067 -929
  250. package/fesm2022/ngstarter-ui-components-split.mjs.map +1 -1
  251. package/fesm2022/ngstarter-ui-components-step-tracker.mjs +617 -331
  252. package/fesm2022/ngstarter-ui-components-step-tracker.mjs.map +1 -1
  253. package/fesm2022/ngstarter-ui-components-stepper.mjs +357 -126
  254. package/fesm2022/ngstarter-ui-components-stepper.mjs.map +1 -1
  255. package/fesm2022/ngstarter-ui-components-suggestions.mjs +259 -72
  256. package/fesm2022/ngstarter-ui-components-suggestions.mjs.map +1 -1
  257. package/fesm2022/ngstarter-ui-components-tab-panel.mjs +674 -267
  258. package/fesm2022/ngstarter-ui-components-tab-panel.mjs.map +1 -1
  259. package/fesm2022/ngstarter-ui-components-table.mjs +1144 -662
  260. package/fesm2022/ngstarter-ui-components-table.mjs.map +1 -1
  261. package/fesm2022/ngstarter-ui-components-tabs.mjs +1236 -615
  262. package/fesm2022/ngstarter-ui-components-tabs.mjs.map +1 -1
  263. package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs +414 -216
  264. package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs.map +1 -1
  265. package/fesm2022/ngstarter-ui-components-tiles.mjs +939 -647
  266. package/fesm2022/ngstarter-ui-components-tiles.mjs.map +1 -1
  267. package/fesm2022/ngstarter-ui-components-timeline.mjs +418 -122
  268. package/fesm2022/ngstarter-ui-components-timeline.mjs.map +1 -1
  269. package/fesm2022/ngstarter-ui-components-timepicker.mjs +870 -508
  270. package/fesm2022/ngstarter-ui-components-timepicker.mjs.map +1 -1
  271. package/fesm2022/ngstarter-ui-components-timezone-select.mjs +651 -371
  272. package/fesm2022/ngstarter-ui-components-timezone-select.mjs.map +1 -1
  273. package/fesm2022/ngstarter-ui-components-toolbar.mjs +727 -320
  274. package/fesm2022/ngstarter-ui-components-toolbar.mjs.map +1 -1
  275. package/fesm2022/ngstarter-ui-components-tooltip.mjs +601 -521
  276. package/fesm2022/ngstarter-ui-components-tooltip.mjs.map +1 -1
  277. package/fesm2022/ngstarter-ui-components-tree-select.mjs +1197 -434
  278. package/fesm2022/ngstarter-ui-components-tree-select.mjs.map +1 -1
  279. package/fesm2022/ngstarter-ui-components-tree.mjs +1821 -1262
  280. package/fesm2022/ngstarter-ui-components-tree.mjs.map +1 -1
  281. package/fesm2022/ngstarter-ui-components-upload.mjs +1059 -345
  282. package/fesm2022/ngstarter-ui-components-upload.mjs.map +1 -1
  283. package/fesm2022/ngstarter-ui-components-video-player.mjs +763 -533
  284. package/fesm2022/ngstarter-ui-components-video-player.mjs.map +1 -1
  285. package/fesm2022/ngstarter-ui-components-video-viewer.mjs +630 -229
  286. package/fesm2022/ngstarter-ui-components-video-viewer.mjs.map +1 -1
  287. package/fesm2022/ngstarter-ui-components-visual-builder.mjs +40 -17
  288. package/fesm2022/ngstarter-ui-components-visual-builder.mjs.map +1 -1
  289. package/fesm2022/ngstarter-ui-components-whiteboard.mjs +3039 -1803
  290. package/fesm2022/ngstarter-ui-components-whiteboard.mjs.map +1 -1
  291. package/fesm2022/ngstarter-ui-components.mjs +3 -5
  292. package/fesm2022/ngstarter-ui-components.mjs.map +1 -1
  293. package/fesm2022/paragraph-block.component-Csk8Gu3x.mjs +264 -0
  294. package/fesm2022/paragraph-block.component-Csk8Gu3x.mjs.map +1 -0
  295. package/fesm2022/plain-text-settings-BnxCxLhA.mjs +354 -0
  296. package/fesm2022/plain-text-settings-BnxCxLhA.mjs.map +1 -0
  297. package/fesm2022/quote-block.component-tRmrU97F.mjs +309 -0
  298. package/fesm2022/quote-block.component-tRmrU97F.mjs.map +1 -0
  299. package/fesm2022/table-block.component-BuzRRggv.mjs +1859 -0
  300. package/fesm2022/table-block.component-BuzRRggv.mjs.map +1 -0
  301. package/fesm2022/toggle-block-C5Jo2YDf.mjs +150 -0
  302. package/fesm2022/toggle-block-C5Jo2YDf.mjs.map +1 -0
  303. package/fesm2022/upload-status-tZ0x0BUB.mjs +107 -0
  304. package/fesm2022/upload-status-tZ0x0BUB.mjs.map +1 -0
  305. package/fesm2022/video-block.component-CpAXibm6.mjs +312 -0
  306. package/fesm2022/video-block.component-CpAXibm6.mjs.map +1 -0
  307. package/package.json +11 -10
  308. package/styles/_tokens.scss +1 -0
  309. package/types/ngstarter-ui-components-action-required.d.ts +34 -14
  310. package/types/ngstarter-ui-components-alert.d.ts +53 -44
  311. package/types/ngstarter-ui-components-announcement.d.ts +74 -53
  312. package/types/ngstarter-ui-components-autocomplete.d.ts +141 -84
  313. package/types/ngstarter-ui-components-avatar.d.ts +113 -66
  314. package/types/ngstarter-ui-components-badge.d.ts +73 -37
  315. package/types/ngstarter-ui-components-block-loader.d.ts +32 -20
  316. package/types/ngstarter-ui-components-bottom-sheet.d.ts +125 -132
  317. package/types/ngstarter-ui-components-breadcrumbs.d.ts +93 -88
  318. package/types/ngstarter-ui-components-button-toggle.d.ts +124 -54
  319. package/types/ngstarter-ui-components-button.d.ts +69 -27
  320. package/types/ngstarter-ui-components-calendar.d.ts +123 -71
  321. package/types/ngstarter-ui-components-card-overlay.d.ts +31 -19
  322. package/types/ngstarter-ui-components-card.d.ts +75 -71
  323. package/types/ngstarter-ui-components-carousel.d.ts +115 -69
  324. package/types/ngstarter-ui-components-checkbox.d.ts +183 -86
  325. package/types/ngstarter-ui-components-chips.d.ts +288 -195
  326. package/types/ngstarter-ui-components-code-highlighter.d.ts +71 -28
  327. package/types/ngstarter-ui-components-color-picker.d.ts +140 -89
  328. package/types/ngstarter-ui-components-color-scheme.d.ts +43 -52
  329. package/types/ngstarter-ui-components-color-switcher.d.ts +46 -26
  330. package/types/ngstarter-ui-components-command-bar.d.ts +40 -26
  331. package/types/ngstarter-ui-components-comment-editor.d.ts +311 -235
  332. package/types/ngstarter-ui-components-comparison-slider.d.ts +41 -40
  333. package/types/ngstarter-ui-components-confirm.d.ts +24 -29
  334. package/types/ngstarter-ui-components-content-editor.d.ts +1482 -998
  335. package/types/ngstarter-ui-components-cookie-popup.d.ts +43 -38
  336. package/types/ngstarter-ui-components-core.d.ts +513 -467
  337. package/types/ngstarter-ui-components-country-select.d.ts +170 -97
  338. package/types/ngstarter-ui-components-crop.d.ts +67 -52
  339. package/types/ngstarter-ui-components-currency-select.d.ts +127 -90
  340. package/types/ngstarter-ui-components-data-view.d.ts +811 -567
  341. package/types/ngstarter-ui-components-date-format-select.d.ts +90 -58
  342. package/types/ngstarter-ui-components-datepicker.d.ts +589 -373
  343. package/types/ngstarter-ui-components-dialog.d.ts +138 -116
  344. package/types/ngstarter-ui-components-digit-roller.d.ts +228 -131
  345. package/types/ngstarter-ui-components-divider.d.ts +29 -17
  346. package/types/ngstarter-ui-components-drawer.d.ts +39 -30
  347. package/types/ngstarter-ui-components-emoji-picker.d.ts +69 -47
  348. package/types/ngstarter-ui-components-empty-state.d.ts +20 -28
  349. package/types/ngstarter-ui-components-events.d.ts +73 -57
  350. package/types/ngstarter-ui-components-expand.d.ts +55 -25
  351. package/types/ngstarter-ui-components-expansion.d.ts +93 -64
  352. package/types/ngstarter-ui-components-file-type.d.ts +53 -27
  353. package/types/ngstarter-ui-components-filter-builder.d.ts +131 -100
  354. package/types/ngstarter-ui-components-form-builder.d.ts +1094 -881
  355. package/types/ngstarter-ui-components-form-field.d.ts +116 -105
  356. package/types/ngstarter-ui-components-gauge.d.ts +32 -20
  357. package/types/ngstarter-ui-components-grid.d.ts +66 -50
  358. package/types/ngstarter-ui-components-guided-tour.d.ts +250 -222
  359. package/types/ngstarter-ui-components-headless-editor.d.ts +708 -658
  360. package/types/ngstarter-ui-components-headless-stepper.d.ts +84 -64
  361. package/types/ngstarter-ui-components-icon.d.ts +39 -38
  362. package/types/ngstarter-ui-components-image-designer.d.ts +422 -341
  363. package/types/ngstarter-ui-components-image-placeholder.d.ts +5 -8
  364. package/types/ngstarter-ui-components-image-resizer.d.ts +40 -33
  365. package/types/ngstarter-ui-components-image-viewer.d.ts +67 -54
  366. package/types/ngstarter-ui-components-image-zoom-viewer.d.ts +29 -33
  367. package/types/ngstarter-ui-components-incidents.d.ts +97 -104
  368. package/types/ngstarter-ui-components-inline-text-edit.d.ts +54 -39
  369. package/types/ngstarter-ui-components-input-mask.d.ts +54 -34
  370. package/types/ngstarter-ui-components-input-validator.d.ts +7 -11
  371. package/types/ngstarter-ui-components-input.d.ts +82 -54
  372. package/types/ngstarter-ui-components-kanban-board.d.ts +76 -63
  373. package/types/ngstarter-ui-components-kbd.d.ts +8 -12
  374. package/types/ngstarter-ui-components-layout.d.ts +131 -87
  375. package/types/ngstarter-ui-components-list.d.ts +123 -88
  376. package/types/ngstarter-ui-components-logo.d.ts +21 -21
  377. package/types/ngstarter-ui-components-marquee.d.ts +41 -34
  378. package/types/ngstarter-ui-components-menu.d.ts +329 -221
  379. package/types/ngstarter-ui-components-micro-chart.d.ts +385 -186
  380. package/types/ngstarter-ui-components-navigation.d.ts +186 -125
  381. package/types/ngstarter-ui-components-notifications.d.ts +104 -89
  382. package/types/ngstarter-ui-components-number-input.d.ts +138 -96
  383. package/types/ngstarter-ui-components-option.d.ts +102 -68
  384. package/types/ngstarter-ui-components-overlay.d.ts +7 -12
  385. package/types/ngstarter-ui-components-page-loading-bar.d.ts +23 -20
  386. package/types/ngstarter-ui-components-paginator.d.ts +171 -129
  387. package/types/ngstarter-ui-components-password-strength.d.ts +217 -102
  388. package/types/ngstarter-ui-components-pdf-builder.d.ts +717 -649
  389. package/types/ngstarter-ui-components-pdf-signer.d.ts +202 -142
  390. package/types/ngstarter-ui-components-pdf-viewer.d.ts +544 -385
  391. package/types/ngstarter-ui-components-phone-input.d.ts +175 -115
  392. package/types/ngstarter-ui-components-pin-input.d.ts +83 -45
  393. package/types/ngstarter-ui-components-popover.d.ts +128 -89
  394. package/types/ngstarter-ui-components-progress-bar.d.ts +49 -30
  395. package/types/ngstarter-ui-components-radio-card.d.ts +50 -34
  396. package/types/ngstarter-ui-components-radio.d.ts +100 -47
  397. package/types/ngstarter-ui-components-rail-nav.d.ts +36 -29
  398. package/types/ngstarter-ui-components-resizable-container.d.ts +30 -25
  399. package/types/ngstarter-ui-components-screen-loader.d.ts +38 -32
  400. package/types/ngstarter-ui-components-scroll-spy.d.ts +56 -60
  401. package/types/ngstarter-ui-components-scrollbar-area.d.ts +116 -86
  402. package/types/ngstarter-ui-components-segmented.d.ts +93 -61
  403. package/types/ngstarter-ui-components-select.d.ts +366 -266
  404. package/types/ngstarter-ui-components-side-panel.d.ts +59 -40
  405. package/types/ngstarter-ui-components-sidebar.d.ts +208 -154
  406. package/types/ngstarter-ui-components-sidenav.d.ts +136 -78
  407. package/types/ngstarter-ui-components-signature-pad.d.ts +165 -92
  408. package/types/ngstarter-ui-components-skeleton.d.ts +18 -17
  409. package/types/ngstarter-ui-components-slide-toggle.d.ts +113 -44
  410. package/types/ngstarter-ui-components-slider.d.ts +123 -82
  411. package/types/ngstarter-ui-components-snack-bar.d.ts +126 -134
  412. package/types/ngstarter-ui-components-sort.d.ts +99 -63
  413. package/types/ngstarter-ui-components-spinner.d.ts +49 -27
  414. package/types/ngstarter-ui-components-splash-screen.d.ts +34 -29
  415. package/types/ngstarter-ui-components-split.d.ts +276 -195
  416. package/types/ngstarter-ui-components-step-tracker.d.ts +102 -83
  417. package/types/ngstarter-ui-components-stepper.d.ts +57 -43
  418. package/types/ngstarter-ui-components-suggestions.d.ts +41 -28
  419. package/types/ngstarter-ui-components-tab-panel.d.ts +110 -83
  420. package/types/ngstarter-ui-components-table.d.ts +256 -228
  421. package/types/ngstarter-ui-components-tabs.d.ts +231 -138
  422. package/types/ngstarter-ui-components-thumbnail-maker.d.ts +40 -34
  423. package/types/ngstarter-ui-components-tiles.d.ts +166 -104
  424. package/types/ngstarter-ui-components-timeline.d.ts +45 -57
  425. package/types/ngstarter-ui-components-timepicker.d.ts +166 -111
  426. package/types/ngstarter-ui-components-timezone-select.d.ts +110 -70
  427. package/types/ngstarter-ui-components-toolbar.d.ts +89 -72
  428. package/types/ngstarter-ui-components-tooltip.d.ts +89 -52
  429. package/types/ngstarter-ui-components-tree-select.d.ts +182 -105
  430. package/types/ngstarter-ui-components-tree.d.ts +355 -229
  431. package/types/ngstarter-ui-components-upload.d.ts +216 -131
  432. package/types/ngstarter-ui-components-video-player.d.ts +130 -67
  433. package/types/ngstarter-ui-components-video-viewer.d.ts +140 -91
  434. package/types/ngstarter-ui-components-visual-builder.d.ts +5 -8
  435. package/types/ngstarter-ui-components-whiteboard.d.ts +412 -339
  436. package/types/ngstarter-ui-components.d.ts +2 -2
  437. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-8OmuepvH.mjs +0 -35
  438. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-8OmuepvH.mjs.map +0 -1
  439. package/fesm2022/ngstarter-ui-components-content-editor-callout-block-Dp5tISk3.mjs +0 -26
  440. package/fesm2022/ngstarter-ui-components-content-editor-callout-block-Dp5tISk3.mjs.map +0 -1
  441. package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-BbBs-R_y.mjs +0 -220
  442. package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-BbBs-R_y.mjs.map +0 -1
  443. package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs +0 -99
  444. package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs.map +0 -1
  445. package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-D1nXMRXD.mjs +0 -40
  446. package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-D1nXMRXD.mjs.map +0 -1
  447. package/fesm2022/ngstarter-ui-components-content-editor-embed-block-DGCCeU-Y.mjs +0 -375
  448. package/fesm2022/ngstarter-ui-components-content-editor-embed-block-DGCCeU-Y.mjs.map +0 -1
  449. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-BJfRgtaA.mjs +0 -80
  450. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-BJfRgtaA.mjs.map +0 -1
  451. package/fesm2022/ngstarter-ui-components-content-editor-grid-block-C_L7hF2G.mjs +0 -65
  452. package/fesm2022/ngstarter-ui-components-content-editor-grid-block-C_L7hF2G.mjs.map +0 -1
  453. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-durrPUhm.mjs +0 -137
  454. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-durrPUhm.mjs.map +0 -1
  455. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-BoL1jZpT.mjs +0 -113
  456. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-BoL1jZpT.mjs.map +0 -1
  457. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-ChZpgXO5.mjs +0 -235
  458. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-ChZpgXO5.mjs.map +0 -1
  459. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-DwyNFnII.mjs +0 -117
  460. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-DwyNFnII.mjs.map +0 -1
  461. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-BWpJv6CO.mjs +0 -4464
  462. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-BWpJv6CO.mjs.map +0 -1
  463. package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-BvNvkqTO.mjs +0 -132
  464. package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-BvNvkqTO.mjs.map +0 -1
  465. package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-tgNKltfK.mjs +0 -171
  466. package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-tgNKltfK.mjs.map +0 -1
  467. package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-BcAlqmh8.mjs +0 -1653
  468. package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-BcAlqmh8.mjs.map +0 -1
  469. package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-S474I51r.mjs +0 -20
  470. package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-S474I51r.mjs.map +0 -1
  471. package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs +0 -19
  472. package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs.map +0 -1
  473. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-Dj82fxTI.mjs +0 -134
  474. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-Dj82fxTI.mjs.map +0 -1
  475. package/fesm2022/ngstarter-ui-components-form-builder-plain-text-settings-GNXKGonc.mjs +0 -159
  476. package/fesm2022/ngstarter-ui-components-form-builder-plain-text-settings-GNXKGonc.mjs.map +0 -1
@@ -1,62 +1,54 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, ElementRef, output, input, signal, computed, HostListener, ChangeDetectionStrategy, Component, Injectable, ViewContainerRef, Directive } from '@angular/core';
3
- import { Subject } from 'rxjs';
4
- import { Overlay, FlexibleConnectedPositionStrategy } from '@angular/cdk/overlay';
5
- import { ComponentPortal } from '@angular/cdk/portal';
6
- import { PositionManager } from '@ngstarter-ui/components/overlay';
7
- import { NgTemplateOutlet, NgClass, CommonModule, DOCUMENT } from '@angular/common';
8
- import { DomSanitizer } from '@angular/platform-browser';
9
- import { Button } from '@ngstarter-ui/components/button';
10
- import { Router } from '@angular/router';
11
-
12
- const TOUR_CONFIG = new InjectionToken('TOUR_CONFIG');
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, Directive, ElementRef, HostListener, Injectable, InjectionToken, ViewContainerRef, computed, inject, input, output, signal } from "@angular/core";
3
+ import { Button } from "@ngstarter-ui/components/button";
4
+ import { CommonModule, DOCUMENT as DOCUMENT$1, NgClass, NgTemplateOutlet } from "@angular/common";
5
+ import { FlexibleConnectedPositionStrategy, Overlay } from "@angular/cdk/overlay";
6
+ import { ComponentPortal } from "@angular/cdk/portal";
7
+ import { Subject } from "rxjs";
8
+ import { Router } from "@angular/router";
9
+ import { DomSanitizer } from "@angular/platform-browser";
10
+ import { PositionManager } from "@ngstarter-ui/components/overlay";
11
+ const TOUR_CONFIG = new InjectionToken("TOUR_CONFIG");
13
12
  function provideTourConfig(config) {
14
- return {
15
- provide: TOUR_CONFIG,
16
- useValue: config
17
- };
13
+ return {
14
+ provide: TOUR_CONFIG,
15
+ useValue: config
16
+ };
18
17
  }
19
18
  var TourState;
20
- (function (TourState) {
21
- TourState[TourState["OFF"] = 0] = "OFF";
22
- TourState[TourState["ON"] = 1] = "ON";
23
- TourState[TourState["PAUSED"] = 2] = "PAUSED";
19
+ (function(TourState) {
20
+ TourState[TourState["OFF"] = 0] = "OFF";
21
+ TourState[TourState["ON"] = 1] = "ON";
22
+ TourState[TourState["PAUSED"] = 2] = "PAUSED";
24
23
  })(TourState || (TourState = {}));
25
- const TOUR_STEP_COMPONENT = new InjectionToken('TOUR_STEP_COMPONENT');
26
-
27
- class TourBackdrop {
28
- elementRef = inject(ElementRef);
29
- backdropClick = output();
30
- animateEnterClass = input(true, /* @ts-ignore */
31
- ...(ngDevMode ? [{ debugName: "animateEnterClass" }] : /* istanbul ignore next */ []));
32
- animateLeaveClass = input(false, /* @ts-ignore */
33
- ...(ngDevMode ? [{ debugName: "animateLeaveClass" }] : /* istanbul ignore next */ []));
34
- rect = signal({ top: 0, left: 0, width: 0, height: 0 }, /* @ts-ignore */
35
- ...(ngDevMode ? [{ debugName: "rect" }] : /* istanbul ignore next */ []));
36
- rx = signal(0, /* @ts-ignore */
37
- ...(ngDevMode ? [{ debugName: "rx" }] : /* istanbul ignore next */ []));
38
- padding = signal(0, /* @ts-ignore */
39
- ...(ngDevMode ? [{ debugName: "padding" }] : /* istanbul ignore next */ []));
40
- disableInteraction = signal(false, /* @ts-ignore */
41
- ...(ngDevMode ? [{ debugName: "disableInteraction" }] : /* istanbul ignore next */ []));
42
- viewBox = signal(`0 0 ${window.innerWidth || 1000} ${window.innerHeight || 1000}`, /* @ts-ignore */
43
- ...(ngDevMode ? [{ debugName: "viewBox" }] : /* istanbul ignore next */ []));
44
- isInitial = signal(true, /* @ts-ignore */
45
- ...(ngDevMode ? [{ debugName: "isInitial" }] : /* istanbul ignore next */ []));
46
- backdropPath = computed(() => {
47
- const { top, left, width, height } = this.rect();
48
- const p = this.padding();
49
- const radius = this.rx();
50
- const w = window.innerWidth;
51
- const h = window.innerHeight;
52
- const rectTop = top - p;
53
- const rectLeft = left - p;
54
- const rectWidth = width + 2 * p;
55
- const rectHeight = height + 2 * p;
56
- // Outer rectangle (entire screen)
57
- const screenPath = `M0,0 H${w} V${h} H0 Z`;
58
- // Hole (inner contour)
59
- const holePath = `
24
+ const TOUR_STEP_COMPONENT = new InjectionToken("TOUR_STEP_COMPONENT");
25
+ var TourBackdrop = class TourBackdrop {
26
+ elementRef = inject(ElementRef);
27
+ backdropClick = output();
28
+ animateEnterClass = input(true, ...ngDevMode ? [{ debugName: "animateEnterClass" }] : /* istanbul ignore next */ []);
29
+ animateLeaveClass = input(false, ...ngDevMode ? [{ debugName: "animateLeaveClass" }] : /* istanbul ignore next */ []);
30
+ rect = signal({
31
+ top: 0,
32
+ left: 0,
33
+ width: 0,
34
+ height: 0
35
+ }, ...ngDevMode ? [{ debugName: "rect" }] : /* istanbul ignore next */ []);
36
+ rx = signal(0, ...ngDevMode ? [{ debugName: "rx" }] : /* istanbul ignore next */ []);
37
+ padding = signal(0, ...ngDevMode ? [{ debugName: "padding" }] : /* istanbul ignore next */ []);
38
+ disableInteraction = signal(false, ...ngDevMode ? [{ debugName: "disableInteraction" }] : /* istanbul ignore next */ []);
39
+ viewBox = signal(`0 0 ${window.innerWidth || 1e3} ${window.innerHeight || 1e3}`, ...ngDevMode ? [{ debugName: "viewBox" }] : /* istanbul ignore next */ []);
40
+ isInitial = signal(true, ...ngDevMode ? [{ debugName: "isInitial" }] : /* istanbul ignore next */ []);
41
+ backdropPath = computed(() => {
42
+ const { top, left, width, height } = this.rect();
43
+ const p = this.padding();
44
+ const radius = this.rx();
45
+ const w = window.innerWidth;
46
+ const h = window.innerHeight;
47
+ const rectTop = top - p;
48
+ const rectLeft = left - p;
49
+ const rectWidth = width + 2 * p;
50
+ const rectHeight = height + 2 * p;
51
+ return `${`M0,0 H${w} V${h} H0 Z`} ${`
60
52
  M${rectLeft + radius},${rectTop}
61
53
  L${rectLeft + rectWidth - radius},${rectTop}
62
54
  A${radius},${radius} 0 0 1 ${rectLeft + rectWidth},${rectTop + radius}
@@ -67,689 +59,838 @@ class TourBackdrop {
67
59
  L${rectLeft},${rectTop + radius}
68
60
  A${radius},${radius} 0 0 1 ${rectLeft + radius},${rectTop}
69
61
  Z
70
- `.replace(/\s+/g, ' ');
71
- return `${screenPath} ${holePath}`;
72
- }, /* @ts-ignore */
73
- ...(ngDevMode ? [{ debugName: "backdropPath" }] : /* istanbul ignore next */ []));
74
- constructor() {
75
- this.updateViewBox();
76
- }
77
- onResize() {
78
- this.updatePositionFromAnchor();
79
- this.updateViewBox();
80
- }
81
- anchorElement = null;
82
- updatePosition(rect, borderRadius, anchorElement, padding = 0, disableInteraction = false) {
83
- if (anchorElement) {
84
- this.anchorElement = anchorElement;
85
- }
86
- const isInitial = this.isInitial();
87
- this.rect.set({
88
- top: rect.top,
89
- left: rect.left,
90
- width: rect.width,
91
- height: rect.height
92
- });
93
- const radius = parseInt(borderRadius, 10) || 0;
94
- this.rx.set(radius);
95
- this.padding.set(padding);
96
- this.disableInteraction.set(disableInteraction);
97
- this.updateViewBox();
98
- if (isInitial) {
99
- setTimeout(() => {
100
- this.isInitial.set(false);
101
- });
102
- }
103
- }
104
- updatePositionFromAnchor() {
105
- if (this.anchorElement) {
106
- const rect = this.anchorElement.getBoundingClientRect();
107
- this.rect.set({
108
- top: rect.top,
109
- left: rect.left,
110
- width: rect.width,
111
- height: rect.height
112
- });
113
- }
114
- }
115
- updateViewBox() {
116
- const w = window.innerWidth || 1000;
117
- const h = window.innerHeight || 1000;
118
- this.viewBox.set(`0 0 ${w} ${h}`);
119
- }
120
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TourBackdrop, deps: [], target: i0.ɵɵFactoryTarget.Component });
121
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: TourBackdrop, isStandalone: true, selector: "ngs-tour-backdrop", inputs: { animateEnterClass: { classPropertyName: "animateEnterClass", publicName: "animateEnterClass", isSignal: true, isRequired: false, transformFunction: null }, animateLeaveClass: { classPropertyName: "animateLeaveClass", publicName: "animateLeaveClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { backdropClick: "backdropClick" }, host: { listeners: { "window:resize": "onResize()", "window:scroll": "onResize()" }, properties: { "class.is-initial": "isInitial()", "class.animate-enter": "animateEnterClass()", "class.animate-leave": "animateLeaveClass()", "style.pointer-events": "\"none\"" } }, exportAs: ["ngsTourBackdrop"], ngImport: i0, template: "<svg\n class=\"absolute top-0 left-0 w-full h-full pointer-events-none\"\n [attr.viewBox]=\"viewBox()\"\n preserveAspectRatio=\"xMinYMin slice\"\n>\n <path\n fill-rule=\"evenodd\"\n [attr.d]=\"backdropPath()\"\n (click)=\"backdropClick.emit()\"\n />\n <rect\n [attr.x]=\"rect().left - padding()\"\n [attr.y]=\"rect().top - padding()\"\n [attr.width]=\"rect().width + 2 * padding()\"\n [attr.height]=\"rect().height + 2 * padding()\"\n [attr.rx]=\"rx()\"\n [class.interactive]=\"!disableInteraction()\"\n ></rect>\n</svg>\n", styles: [":host{position:fixed;top:0;left:0;width:100vw;height:100vh;pointer-events:none;z-index:1100;display:block;background:transparent;overflow:hidden;visibility:visible}:host path{fill:var(--ngs-overlay-backdrop-bg);pointer-events:auto;cursor:default}:host rect{fill:transparent;stroke:var(--ngs-color-primary);stroke-width:2;pointer-events:auto}:host rect:not(.interactive){pointer-events:none}:host path,:host rect{transition:all .3s cubic-bezier(.4,0,.2,1)}:host.animate-enter{animation:backdrop-fade-in .2s ease-out forwards}:host.animate-leave{animation:backdrop-fade-out .15s ease-in forwards}@keyframes backdrop-fade-in{0%{opacity:0}to{opacity:1}}@keyframes backdrop-fade-out{0%{opacity:1}to{opacity:0}}:host(.is-initial) path,:host(.is-initial) rect{transition:none}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.Eager });
122
- }
123
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TourBackdrop, decorators: [{
124
- type: Component,
125
- args: [{ selector: 'ngs-tour-backdrop', exportAs: 'ngsTourBackdrop', changeDetection: ChangeDetectionStrategy.Eager, host: {
126
- '[class.is-initial]': 'isInitial()',
127
- '[class.animate-enter]': 'animateEnterClass()',
128
- '[class.animate-leave]': 'animateLeaveClass()',
129
- '[style.pointer-events]': '"none"',
130
- }, template: "<svg\n class=\"absolute top-0 left-0 w-full h-full pointer-events-none\"\n [attr.viewBox]=\"viewBox()\"\n preserveAspectRatio=\"xMinYMin slice\"\n>\n <path\n fill-rule=\"evenodd\"\n [attr.d]=\"backdropPath()\"\n (click)=\"backdropClick.emit()\"\n />\n <rect\n [attr.x]=\"rect().left - padding()\"\n [attr.y]=\"rect().top - padding()\"\n [attr.width]=\"rect().width + 2 * padding()\"\n [attr.height]=\"rect().height + 2 * padding()\"\n [attr.rx]=\"rx()\"\n [class.interactive]=\"!disableInteraction()\"\n ></rect>\n</svg>\n", styles: [":host{position:fixed;top:0;left:0;width:100vw;height:100vh;pointer-events:none;z-index:1100;display:block;background:transparent;overflow:hidden;visibility:visible}:host path{fill:var(--ngs-overlay-backdrop-bg);pointer-events:auto;cursor:default}:host rect{fill:transparent;stroke:var(--ngs-color-primary);stroke-width:2;pointer-events:auto}:host rect:not(.interactive){pointer-events:none}:host path,:host rect{transition:all .3s cubic-bezier(.4,0,.2,1)}:host.animate-enter{animation:backdrop-fade-in .2s ease-out forwards}:host.animate-leave{animation:backdrop-fade-out .15s ease-in forwards}@keyframes backdrop-fade-in{0%{opacity:0}to{opacity:1}}@keyframes backdrop-fade-out{0%{opacity:1}to{opacity:0}}:host(.is-initial) path,:host(.is-initial) rect{transition:none}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
131
- }], ctorParameters: () => [], propDecorators: { backdropClick: [{ type: i0.Output, args: ["backdropClick"] }], animateEnterClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "animateEnterClass", required: false }] }], animateLeaveClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "animateLeaveClass", required: false }] }], onResize: [{
132
- type: HostListener,
133
- args: ['window:resize']
134
- }, {
135
- type: HostListener,
136
- args: ['window:scroll']
137
- }] } });
138
-
139
- class TourStep {
140
- tourService = inject(TourService);
141
- _sanitizer = inject(DomSanitizer);
142
- step = input.required(/* @ts-ignore */
143
- ...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
144
- isFirst = input(false, /* @ts-ignore */
145
- ...(ngDevMode ? [{ debugName: "isFirst" }] : /* istanbul ignore next */ []));
146
- isLast = input(false, /* @ts-ignore */
147
- ...(ngDevMode ? [{ debugName: "isLast" }] : /* istanbul ignore next */ []));
148
- position = input(null, /* @ts-ignore */
149
- ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
150
- animateEnterClass = input(true, /* @ts-ignore */
151
- ...(ngDevMode ? [{ debugName: "animateEnterClass" }] : /* istanbul ignore next */ []));
152
- animateLeaveClass = input(false, /* @ts-ignore */
153
- ...(ngDevMode ? [{ debugName: "animateLeaveClass" }] : /* istanbul ignore next */ []));
154
- config = inject(TOUR_CONFIG, { optional: true });
155
- htmlContent = computed(() => {
156
- const html = this.step().htmlContent;
157
- return html ? this._sanitizer.bypassSecurityTrustHtml(html) : null;
158
- }, /* @ts-ignore */
159
- ...(ngDevMode ? [{ debugName: "htmlContent" }] : /* istanbul ignore next */ []));
160
- getArrowClasses(pos) {
161
- if (!pos) {
162
- return 'hidden';
163
- }
164
- const classes = [];
165
- // Vertical position of the arrow on the step
166
- if (pos.overlayY === 'top' && pos.originY === 'bottom') {
167
- classes.push('pos-top'); // Arrow on the top edge of the step
168
- }
169
- else if (pos.overlayY === 'bottom' && pos.originY === 'top') {
170
- classes.push('pos-bottom'); // Arrow on the bottom edge of the step
171
- }
172
- else if (pos.overlayX === 'start' && pos.originX === 'end') {
173
- // Step is to the right of the element (AFTER)
174
- classes.push('pos-left');
175
- }
176
- else if (pos.overlayX === 'end' && pos.originX === 'start') {
177
- // Step is to the left of the element (BEFORE)
178
- classes.push('pos-right');
179
- }
180
- // Alignment of the arrow on the chosen edge
181
- if (classes.includes('pos-top') || classes.includes('pos-bottom')) {
182
- if (pos.overlayX === 'center') {
183
- classes.push('align-center');
184
- }
185
- else if (pos.overlayX === 'start') {
186
- classes.push('align-start');
187
- }
188
- else if (pos.overlayX === 'end') {
189
- classes.push('align-end');
190
- }
191
- }
192
- else if (classes.includes('pos-left') || classes.includes('pos-right')) {
193
- if (pos.overlayY === 'center') {
194
- classes.push('align-center');
195
- }
196
- else if (pos.overlayY === 'top') {
197
- classes.push('align-start');
198
- }
199
- else if (pos.overlayY === 'bottom') {
200
- classes.push('align-end');
201
- }
202
- }
203
- return classes.join(' ');
204
- }
205
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TourStep, deps: [], target: i0.ɵɵFactoryTarget.Component });
206
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: TourStep, isStandalone: true, selector: "ngs-tour-step", inputs: { step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: true, transformFunction: null }, isFirst: { classPropertyName: "isFirst", publicName: "isFirst", isSignal: true, isRequired: false, transformFunction: null }, isLast: { classPropertyName: "isLast", publicName: "isLast", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, animateEnterClass: { classPropertyName: "animateEnterClass", publicName: "animateEnterClass", isSignal: true, isRequired: false, transformFunction: null }, animateLeaveClass: { classPropertyName: "animateLeaveClass", publicName: "animateLeaveClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.animate-enter": "animateEnterClass()", "class.animate-leave": "animateLeaveClass()" }, classAttribute: "ngs-tour-step not-prose" }, exportAs: ["ngsTourStep"], ngImport: i0, template: "@if (!step().hideArrow) {\n <div class=\"tour-step-arrow\" [ngClass]=\"getArrowClasses(position())\"></div>\n}\n<div class=\"relative z-[1] transform-gpu\">\n @if (step().title) {\n <h3 class=\"mt-0 mb-2 font-semibold text-base leading-none tracking-tight\">{{ step().title }}</h3>\n }\n\n <div class=\"text-sm text-on-surface-variant\">\n @if (step().template) {\n <ng-container *ngTemplateOutlet=\"step().template!; context: step().templateContext\"/>\n } @else if (htmlContent()) {\n <div [innerHTML]=\"htmlContent()\"></div>\n } @else {\n {{ step().content }}\n }\n </div>\n\n <div class=\"flex justify-between gap-4 mt-4\">\n <button ngsButton (click)=\"tourService.end()\" class=\"button\">\n {{ step().skipBtnText || config?.skipBtnText || 'Close' }}\n </button>\n <div class=\"flex gap-2\">\n <button ngsButton=\"tonal\" (click)=\"tourService.prev()\" [disabled]=\"isFirst()\" class=\"button\">\n {{ step().prevBtnText || config?.prevBtnText || 'Prev' }}\n </button>\n <button ngsButton=\"filled\" (click)=\"tourService.next()\" class=\"button\">\n @if (isLast()) {\n {{ step().finishBtnText || config?.finishBtnText || 'Finish' }}\n } @else {\n {{ step().nextBtnText || config?.nextBtnText || 'Next' }}\n }\n </button>\n </div>\n </div>\n</div>\n", styles: [":host{--ngs-guided-tour-step-bg: var(--ngs-color-surface-container-lowest);--ngs-guided-tour-step-border: 1px solid var(--ngs-color-subtle);--ngs-guided-tour-arrow-border-color: var(--ngs-color-subtle);display:block;z-index:1200;position:relative;background:var(--ngs-guided-tour-step-bg);border-radius:var(--ngs-guided-tour-step-radius, var(--ngs-radius-xl));box-shadow:var(--ngs-guided-tour-step-shadow, var(--ngs-shadow-lg));max-width:var(--ngs-guided-tour-step-max-width, 400px);padding:var(--ngs-guided-tour-step-step-padding, calc(var(--spacing, .25rem) * 4));border:var(--ngs-guided-tour-step-border);overflow:visible}:host .button{--ngs-button-height: calc(var(--spacing, .25rem) * 8);--ngs-button-padding: 0 calc(var(--spacing, .25rem) * 3)}:host.animate-enter{animation:step-enter .3s cubic-bezier(.4,0,.2,1) forwards}:host.animate-leave{animation:step-leave .15s cubic-bezier(.4,0,.2,1) forwards}:host .tour-step-arrow{position:absolute;width:12px;height:12px;background:var(--ngs-guided-tour-step-bg);z-index:10;pointer-events:none;border:1px solid transparent}:host .tour-step-arrow.hidden{display:none}:host .tour-step-arrow.pos-top{top:0;border-top-color:var(--ngs-guided-tour-arrow-border-color);border-left-color:var(--ngs-guided-tour-arrow-border-color)}:host .tour-step-arrow.pos-top.align-center{left:50%;transform:translate(-50%) translateY(-50%) rotate(45deg)}:host .tour-step-arrow.pos-top.align-start{left:16px;transform:translateY(-50%) rotate(45deg)}:host .tour-step-arrow.pos-top.align-end{right:16px;transform:translateY(-50%) rotate(45deg)}:host .tour-step-arrow.pos-bottom{bottom:0;border-bottom-color:var(--ngs-guided-tour-arrow-border-color);border-right-color:var(--ngs-guided-tour-arrow-border-color)}:host .tour-step-arrow.pos-bottom.align-center{left:50%;transform:translate(-50%) translateY(50%) rotate(45deg)}:host .tour-step-arrow.pos-bottom.align-start{left:16px;transform:translateY(50%) rotate(45deg)}:host .tour-step-arrow.pos-bottom.align-end{right:16px;transform:translateY(50%) rotate(45deg)}:host .tour-step-arrow.pos-left{left:0;border-bottom-color:var(--ngs-guided-tour-arrow-border-color);border-left-color:var(--ngs-guided-tour-arrow-border-color)}:host .tour-step-arrow.pos-left.align-center{top:50%;transform:translate(-50%) translateY(-50%) rotate(45deg)}:host .tour-step-arrow.pos-left.align-start{top:16px;transform:translate(-50%) rotate(45deg)}:host .tour-step-arrow.pos-left.align-end{bottom:16px;transform:translate(-50%) rotate(45deg)}:host .tour-step-arrow.pos-right{right:0;border-top-color:var(--ngs-guided-tour-arrow-border-color);border-right-color:var(--ngs-guided-tour-arrow-border-color)}:host .tour-step-arrow.pos-right.align-center{top:50%;transform:translate(50%) translateY(-50%) rotate(45deg)}:host .tour-step-arrow.pos-right.align-start{top:16px;transform:translate(50%) rotate(45deg)}:host .tour-step-arrow.pos-right.align-end{bottom:16px;transform:translate(50%) rotate(45deg)}@keyframes step-enter{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes step-leave{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: CommonModule }, { kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
207
- }
208
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TourStep, decorators: [{
209
- type: Component,
210
- args: [{ selector: 'ngs-tour-step', exportAs: 'ngsTourStep', imports: [
211
- NgTemplateOutlet,
212
- NgClass,
213
- CommonModule,
214
- Button
215
- ], changeDetection: ChangeDetectionStrategy.OnPush, host: {
216
- 'class': 'ngs-tour-step not-prose',
217
- '[class.animate-enter]': 'animateEnterClass()',
218
- '[class.animate-leave]': 'animateLeaveClass()',
219
- }, template: "@if (!step().hideArrow) {\n <div class=\"tour-step-arrow\" [ngClass]=\"getArrowClasses(position())\"></div>\n}\n<div class=\"relative z-[1] transform-gpu\">\n @if (step().title) {\n <h3 class=\"mt-0 mb-2 font-semibold text-base leading-none tracking-tight\">{{ step().title }}</h3>\n }\n\n <div class=\"text-sm text-on-surface-variant\">\n @if (step().template) {\n <ng-container *ngTemplateOutlet=\"step().template!; context: step().templateContext\"/>\n } @else if (htmlContent()) {\n <div [innerHTML]=\"htmlContent()\"></div>\n } @else {\n {{ step().content }}\n }\n </div>\n\n <div class=\"flex justify-between gap-4 mt-4\">\n <button ngsButton (click)=\"tourService.end()\" class=\"button\">\n {{ step().skipBtnText || config?.skipBtnText || 'Close' }}\n </button>\n <div class=\"flex gap-2\">\n <button ngsButton=\"tonal\" (click)=\"tourService.prev()\" [disabled]=\"isFirst()\" class=\"button\">\n {{ step().prevBtnText || config?.prevBtnText || 'Prev' }}\n </button>\n <button ngsButton=\"filled\" (click)=\"tourService.next()\" class=\"button\">\n @if (isLast()) {\n {{ step().finishBtnText || config?.finishBtnText || 'Finish' }}\n } @else {\n {{ step().nextBtnText || config?.nextBtnText || 'Next' }}\n }\n </button>\n </div>\n </div>\n</div>\n", styles: [":host{--ngs-guided-tour-step-bg: var(--ngs-color-surface-container-lowest);--ngs-guided-tour-step-border: 1px solid var(--ngs-color-subtle);--ngs-guided-tour-arrow-border-color: var(--ngs-color-subtle);display:block;z-index:1200;position:relative;background:var(--ngs-guided-tour-step-bg);border-radius:var(--ngs-guided-tour-step-radius, var(--ngs-radius-xl));box-shadow:var(--ngs-guided-tour-step-shadow, var(--ngs-shadow-lg));max-width:var(--ngs-guided-tour-step-max-width, 400px);padding:var(--ngs-guided-tour-step-step-padding, calc(var(--spacing, .25rem) * 4));border:var(--ngs-guided-tour-step-border);overflow:visible}:host .button{--ngs-button-height: calc(var(--spacing, .25rem) * 8);--ngs-button-padding: 0 calc(var(--spacing, .25rem) * 3)}:host.animate-enter{animation:step-enter .3s cubic-bezier(.4,0,.2,1) forwards}:host.animate-leave{animation:step-leave .15s cubic-bezier(.4,0,.2,1) forwards}:host .tour-step-arrow{position:absolute;width:12px;height:12px;background:var(--ngs-guided-tour-step-bg);z-index:10;pointer-events:none;border:1px solid transparent}:host .tour-step-arrow.hidden{display:none}:host .tour-step-arrow.pos-top{top:0;border-top-color:var(--ngs-guided-tour-arrow-border-color);border-left-color:var(--ngs-guided-tour-arrow-border-color)}:host .tour-step-arrow.pos-top.align-center{left:50%;transform:translate(-50%) translateY(-50%) rotate(45deg)}:host .tour-step-arrow.pos-top.align-start{left:16px;transform:translateY(-50%) rotate(45deg)}:host .tour-step-arrow.pos-top.align-end{right:16px;transform:translateY(-50%) rotate(45deg)}:host .tour-step-arrow.pos-bottom{bottom:0;border-bottom-color:var(--ngs-guided-tour-arrow-border-color);border-right-color:var(--ngs-guided-tour-arrow-border-color)}:host .tour-step-arrow.pos-bottom.align-center{left:50%;transform:translate(-50%) translateY(50%) rotate(45deg)}:host .tour-step-arrow.pos-bottom.align-start{left:16px;transform:translateY(50%) rotate(45deg)}:host .tour-step-arrow.pos-bottom.align-end{right:16px;transform:translateY(50%) rotate(45deg)}:host .tour-step-arrow.pos-left{left:0;border-bottom-color:var(--ngs-guided-tour-arrow-border-color);border-left-color:var(--ngs-guided-tour-arrow-border-color)}:host .tour-step-arrow.pos-left.align-center{top:50%;transform:translate(-50%) translateY(-50%) rotate(45deg)}:host .tour-step-arrow.pos-left.align-start{top:16px;transform:translate(-50%) rotate(45deg)}:host .tour-step-arrow.pos-left.align-end{bottom:16px;transform:translate(-50%) rotate(45deg)}:host .tour-step-arrow.pos-right{right:0;border-top-color:var(--ngs-guided-tour-arrow-border-color);border-right-color:var(--ngs-guided-tour-arrow-border-color)}:host .tour-step-arrow.pos-right.align-center{top:50%;transform:translate(50%) translateY(-50%) rotate(45deg)}:host .tour-step-arrow.pos-right.align-start{top:16px;transform:translate(50%) rotate(45deg)}:host .tour-step-arrow.pos-right.align-end{bottom:16px;transform:translate(50%) rotate(45deg)}@keyframes step-enter{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes step-leave{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
220
- }], propDecorators: { step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: true }] }], isFirst: [{ type: i0.Input, args: [{ isSignal: true, alias: "isFirst", required: false }] }], isLast: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLast", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], animateEnterClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "animateEnterClass", required: false }] }], animateLeaveClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "animateLeaveClass", required: false }] }] } });
221
-
222
- class TourService {
223
- overlay = inject(Overlay);
224
- config = inject(TOUR_CONFIG, { optional: true });
225
- document = inject(DOCUMENT);
226
- router = inject(Router);
227
- backdropOverlayRef = null;
228
- backdropComponentRef = null;
229
- _steps = signal([], /* @ts-ignore */
230
- ...(ngDevMode ? [{ debugName: "_steps" }] : /* istanbul ignore next */ []));
231
- _currentStepIndex = signal(-1, /* @ts-ignore */
232
- ...(ngDevMode ? [{ debugName: "_currentStepIndex" }] : /* istanbul ignore next */ []));
233
- _state = signal(TourState.OFF, /* @ts-ignore */
234
- ...(ngDevMode ? [{ debugName: "_state" }] : /* istanbul ignore next */ []));
235
- _anchors = new Map();
236
- stepOverlayRef = null;
237
- stepComponentRef = null;
238
- customStepComponent = inject(TOUR_STEP_COMPONENT, { optional: true });
239
- constructor() {
240
- this.document.addEventListener('keydown', this.handleKeyDown);
241
- }
242
- ngOnDestroy() {
243
- this.document.removeEventListener('keydown', this.handleKeyDown);
244
- }
245
- handleKeyDown = (event) => {
246
- if (this.state() !== TourState.ON || this.config?.keyboardNavigation === false) {
247
- return;
248
- }
249
- switch (event.key) {
250
- case 'ArrowRight':
251
- void this.next();
252
- break;
253
- case 'ArrowLeft':
254
- void this.prev();
255
- break;
256
- case 'Escape':
257
- void this.end();
258
- break;
259
- }
260
- };
261
- steps = this._steps.asReadonly();
262
- currentStepIndex = this._currentStepIndex.asReadonly();
263
- state = this._state.asReadonly();
264
- currentStep = computed(() => {
265
- const index = this._currentStepIndex();
266
- const steps = this._steps();
267
- return index >= 0 && index < steps.length ? steps[index] : null;
268
- }, /* @ts-ignore */
269
- ...(ngDevMode ? [{ debugName: "currentStep" }] : /* istanbul ignore next */ []));
270
- stepShow$ = new Subject();
271
- stepHide$ = new Subject();
272
- start$ = new Subject();
273
- end$ = new Subject();
274
- registerAnchor(id, anchor) {
275
- this._anchors.set(id, anchor);
276
- }
277
- unregisterAnchor(id) {
278
- this._anchors.delete(id);
279
- }
280
- start(steps) {
281
- this._steps.set(steps);
282
- this._state.set(TourState.ON);
283
- this.start$.next();
284
- void this.goToStep(0);
285
- }
286
- async end() {
287
- const currentStep = this.currentStep();
288
- if (currentStep) {
289
- if (currentStep.onHide) {
290
- await currentStep.onHide();
291
- }
292
- this.stepHide$.next(currentStep);
293
- // Start hiding step and backdrop in parallel
294
- const hideStepPromise = this._hideStep(currentStep);
295
- const hideBackdropPromise = this.hideBackdrop(true);
296
- await Promise.all([hideStepPromise, hideBackdropPromise]);
297
- }
298
- else {
299
- await this.hideBackdrop(true);
300
- }
301
- this._state.set(TourState.OFF);
302
- this._currentStepIndex.set(-1);
303
- this._steps.set([]);
304
- this.end$.next();
305
- }
306
- async next() {
307
- const currentStep = this.currentStep();
308
- if (currentStep?.onNext) {
309
- await currentStep.onNext();
310
- }
311
- if (this._currentStepIndex() < this._steps().length - 1) {
312
- await this.goToStep(this._currentStepIndex() + 1);
313
- }
314
- else {
315
- await this.end();
316
- }
317
- }
318
- async prev() {
319
- const currentStep = this.currentStep();
320
- if (currentStep?.onPrev) {
321
- await currentStep.onPrev();
322
- }
323
- if (this._currentStepIndex() > 0) {
324
- await this.goToStep(this._currentStepIndex() - 1);
325
- }
326
- }
327
- async goToStep(index) {
328
- const currentStep = this.currentStep();
329
- const nextStep = this._steps()[index];
330
- if (currentStep) {
331
- if (currentStep.onHide) {
332
- await currentStep.onHide();
333
- }
334
- this.stepHide$.next(currentStep);
335
- await this._hideStep(currentStep);
336
- }
337
- if (currentStep?.withBackdrop && !nextStep?.withBackdrop) {
338
- this.hideBackdrop(false);
339
- }
340
- if (nextStep?.route) {
341
- const currentUrl = this.router.url;
342
- const targetUrl = nextStep.route;
343
- // Compare only path without params and fragment if needed,
344
- // but usually Router.url returns full path.
345
- // If URL differs, perform transition.
346
- if (currentUrl !== targetUrl) {
347
- await this.router.navigateByUrl(targetUrl);
348
- }
349
- }
350
- if (nextStep?.onShow) {
351
- await nextStep.onShow();
352
- }
353
- if (nextStep?.waitFor) {
354
- try {
355
- await this.waitForElement(nextStep.waitFor);
356
- }
357
- catch (e) {
358
- console.warn(`TourService: Element "${nextStep.waitFor}" not found after timeout.`);
359
- }
360
- }
361
- this._currentStepIndex.set(index);
362
- if (nextStep) {
363
- this.stepShow$.next(nextStep);
364
- this._showStep(nextStep);
365
- }
366
- }
367
- waitForElement(selector, timeout = 3000) {
368
- return new Promise((resolve, reject) => {
369
- const element = document.querySelector(selector);
370
- if (element) {
371
- return resolve(element);
372
- }
373
- const observer = new MutationObserver(() => {
374
- const element = document.querySelector(selector);
375
- if (element) {
376
- observer.disconnect();
377
- clearTimeout(timer);
378
- resolve(element);
379
- }
380
- });
381
- observer.observe(document.body, {
382
- childList: true,
383
- subtree: true
384
- });
385
- const timer = setTimeout(() => {
386
- observer.disconnect();
387
- reject(new Error(`Timeout waiting for element: ${selector}`));
388
- }, timeout);
389
- });
390
- }
391
- showBackdrop(rect, borderRadius, viewContainerRef, anchorElement, padding = 0, disableInteraction = false) {
392
- if (!this.backdropOverlayRef) {
393
- this.backdropOverlayRef = this.overlay.create({
394
- positionStrategy: this.overlay.position().global(),
395
- scrollStrategy: this.overlay.scrollStrategies.block(),
396
- hasBackdrop: false
397
- });
398
- const portal = new ComponentPortal(TourBackdrop, viewContainerRef);
399
- this.backdropComponentRef = this.backdropOverlayRef.attach(portal);
400
- this.backdropComponentRef.instance.backdropClick.subscribe(() => {
401
- const step = this.currentStep();
402
- const closeOnBackdropClick = step?.closeOnBackdropClick ?? this.config?.closeOnBackdropClick ?? false;
403
- if (closeOnBackdropClick) {
404
- this.end();
405
- }
406
- });
407
- }
408
- this.backdropComponentRef?.instance.updatePosition(rect, borderRadius, anchorElement, padding, disableInteraction);
409
- }
410
- async hideBackdrop(animate) {
411
- const overlayRef = this.backdropOverlayRef;
412
- const componentRef = this.backdropComponentRef;
413
- if (!overlayRef) {
414
- return;
415
- }
416
- if (this.backdropOverlayRef === overlayRef) {
417
- this.backdropOverlayRef = null;
418
- this.backdropComponentRef = null;
419
- }
420
- if (animate) {
421
- if (componentRef) {
422
- const safeSetInput = (name, value) => {
423
- try {
424
- componentRef.setInput(name, value);
425
- }
426
- catch (e) {
427
- // Ignore if input is not declared
428
- }
429
- };
430
- safeSetInput('animateEnterClass', false);
431
- safeSetInput('animateLeaveClass', true);
432
- }
433
- return new Promise(resolve => {
434
- setTimeout(() => {
435
- overlayRef.dispose();
436
- resolve();
437
- }, 150);
438
- });
439
- }
440
- else {
441
- overlayRef.dispose();
442
- return Promise.resolve();
443
- }
444
- }
445
- _showStep(step) {
446
- const anchorId = typeof step.anchorId === 'function' ? step.anchorId() : step.anchorId;
447
- let anchorElement = null;
448
- let anchorDirective = null;
449
- if (typeof anchorId === 'string') {
450
- anchorDirective = this._anchors.get(anchorId);
451
- if (anchorDirective) {
452
- anchorDirective.showStep(step);
453
- return;
454
- }
455
- anchorElement = document.querySelector(anchorId);
456
- if (!anchorElement) {
457
- anchorElement = document.getElementById(anchorId);
458
- }
459
- }
460
- else if (anchorId instanceof HTMLElement) {
461
- anchorElement = anchorId;
462
- }
463
- if (anchorElement) {
464
- this.showStepForElement(anchorElement, step);
465
- }
466
- }
467
- showStepForElement(element, step) {
468
- if (this.stepOverlayRef) {
469
- const oldOverlayRef = this.stepOverlayRef;
470
- const oldComponentRef = this.stepComponentRef;
471
- this.stepOverlayRef = null;
472
- this.stepComponentRef = null;
473
- oldOverlayRef.dispose();
474
- }
475
- const rect = element.getBoundingClientRect();
476
- const isVisible = (rect.top >= 0 &&
477
- rect.left >= 0 &&
478
- rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
479
- rect.right <= (window.innerWidth || document.documentElement.clientWidth));
480
- if (!isVisible) {
481
- element.scrollIntoView({
482
- behavior: 'instant',
483
- block: 'center',
484
- inline: 'nearest'
485
- });
486
- }
487
- setTimeout(() => {
488
- if (this.state() === TourState.OFF) {
489
- return;
490
- }
491
- const rect = element.getBoundingClientRect();
492
- const style = window.getComputedStyle(element);
493
- const padding = step.padding ?? this.config?.padding ?? 4;
494
- let positionStrategy;
495
- const positionManager = new PositionManager();
496
- const defaultPositions = [
497
- ...positionManager.build('below-center'),
498
- ...positionManager.build('above-center'),
499
- ...positionManager.build('after-center'),
500
- ...positionManager.build('before-center'),
501
- ].map(p => ({ ...p, ...this._getOffset(p, padding) }));
502
- const preferredPositions = step.position
503
- ? positionManager.build(step.position).map(p => ({ ...p, ...this._getOffset(p, padding) }))
504
- : defaultPositions;
505
- positionStrategy = this.overlay
506
- .position()
507
- .flexibleConnectedTo(element)
508
- .withPush(false)
509
- .withPositions(preferredPositions);
510
- this.stepOverlayRef = this.overlay.create({
511
- positionStrategy,
512
- scrollStrategy: this.overlay.scrollStrategies.block(),
513
- hasBackdrop: false,
514
- panelClass: 'ngs-tour-step-overlay'
515
- });
516
- if (step.withBackdrop) {
517
- this.showBackdrop(rect, style.borderRadius, undefined, element, padding, step.disableInteraction);
518
- }
519
- const componentType = this.customStepComponent || TourStep;
520
- const portal = new ComponentPortal(componentType);
521
- this.stepComponentRef = this.stepOverlayRef.attach(portal);
522
- const safeSetInput = (name, value) => {
523
- try {
524
- this.stepComponentRef?.setInput(name, value);
525
- }
526
- catch (e) {
527
- // Ignore if input is not declared
528
- }
529
- };
530
- if (positionStrategy instanceof FlexibleConnectedPositionStrategy) {
531
- positionStrategy.positionChanges.subscribe((change) => {
532
- safeSetInput('position', change.connectionPair);
533
- });
534
- }
535
- const steps = this.steps();
536
- const index = this.currentStepIndex();
537
- const isFirst = index === 0;
538
- const isLast = index === steps.length - 1;
539
- safeSetInput('step', step);
540
- safeSetInput('isFirst', isFirst);
541
- safeSetInput('isLast', isLast);
542
- if (positionStrategy instanceof FlexibleConnectedPositionStrategy) {
543
- this.stepOverlayRef.updatePosition();
544
- }
545
- }, 0);
546
- }
547
- _getOffset(position, padding) {
548
- const offset = 8 + padding;
549
- if (position.originY === 'bottom' && position.overlayY === 'top') {
550
- return { offsetY: offset };
551
- }
552
- if (position.originY === 'top' && position.overlayY === 'bottom') {
553
- return { offsetY: -offset };
554
- }
555
- if (position.originX === 'end' && position.overlayX === 'start') {
556
- return { offsetX: offset };
557
- }
558
- if (position.originX === 'start' && position.overlayX === 'end') {
559
- return { offsetX: -offset };
560
- }
561
- return {};
562
- }
563
- async _hideStep(step) {
564
- const anchorId = typeof step.anchorId === 'function' ? step.anchorId() : step.anchorId;
565
- if (typeof anchorId === 'string') {
566
- const anchor = this._anchors.get(anchorId);
567
- if (anchor) {
568
- await anchor.hideStep();
569
- return;
570
- }
571
- }
572
- const overlayRef = this.stepOverlayRef;
573
- const componentRef = this.stepComponentRef;
574
- if (overlayRef) {
575
- if (this.stepOverlayRef === overlayRef) {
576
- this.stepOverlayRef = null;
577
- this.stepComponentRef = null;
578
- }
579
- const safeSetInput = (name, value) => {
580
- try {
581
- componentRef?.setInput(name, value);
582
- }
583
- catch (e) {
584
- // Ignore if input is not declared
585
- }
586
- };
587
- safeSetInput('animateEnterClass', false);
588
- safeSetInput('animateLeaveClass', true);
589
- await new Promise(resolve => setTimeout(resolve, 150));
590
- overlayRef.dispose();
591
- }
592
- }
593
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TourService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
594
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TourService, providedIn: 'root' });
595
- }
596
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TourService, decorators: [{
597
- type: Injectable,
598
- args: [{
599
- providedIn: 'root'
600
- }]
601
- }], ctorParameters: () => [] });
602
-
603
- class TourAnchorDirective {
604
- anchorId = input.required({ ...(ngDevMode ? { debugName: "anchorId" } : /* istanbul ignore next */ {}), alias: 'ngsTourAnchor' });
605
- elementRef = inject(ElementRef);
606
- tourService = inject(TourService);
607
- overlay = inject(Overlay);
608
- viewContainerRef = inject(ViewContainerRef);
609
- customStepComponent = inject(TOUR_STEP_COMPONENT, { optional: true });
610
- config = inject(TOUR_CONFIG, { optional: true });
611
- overlayRef = null;
612
- componentRef = null;
613
- ngOnInit() {
614
- this.tourService.registerAnchor(this.anchorId(), this);
615
- }
616
- ngOnDestroy() {
617
- this.tourService.unregisterAnchor(this.anchorId());
618
- this.hideStep();
619
- }
620
- showStep(step) {
621
- const currentOverlayRef = this.overlayRef;
622
- const currentComponentRef = this.componentRef;
623
- if (this.overlayRef === currentOverlayRef) {
624
- this.overlayRef = null;
625
- this.componentRef = null;
626
- }
627
- if (currentOverlayRef) {
628
- currentOverlayRef.dispose();
629
- }
630
- const rect = this.elementRef.nativeElement.getBoundingClientRect();
631
- const isVisible = (rect.top >= 0 &&
632
- rect.left >= 0 &&
633
- rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
634
- rect.right <= (window.innerWidth || document.documentElement.clientWidth));
635
- if (!isVisible) {
636
- this.elementRef.nativeElement.scrollIntoView({
637
- behavior: 'instant',
638
- block: 'center',
639
- inline: 'nearest'
640
- });
641
- }
642
- const timeout = 0;
643
- // Give time for scroll to finish before calculating coordinates for the backdrop
644
- setTimeout(() => {
645
- if (this.tourService.state() === 0) { // TourState.OFF
646
- return;
647
- }
648
- const rect = this.elementRef.nativeElement.getBoundingClientRect();
649
- const style = window.getComputedStyle(this.elementRef.nativeElement);
650
- const padding = step.padding ?? this.config?.padding ?? 4;
651
- const positionManager = new PositionManager();
652
- const defaultPositions = [
653
- ...positionManager.build('below-center'),
654
- ...positionManager.build('above-center'),
655
- ...positionManager.build('after-center'),
656
- ...positionManager.build('before-center'),
657
- ].map(p => ({ ...p, ...this._getOffset(p, padding) }));
658
- const preferredPositions = step.position
659
- ? positionManager.build(step.position).map(p => ({ ...p, ...this._getOffset(p, padding) }))
660
- : defaultPositions;
661
- const positionStrategy = this.overlay
662
- .position()
663
- .flexibleConnectedTo(this.elementRef)
664
- .withPush(false)
665
- .withPositions(preferredPositions);
666
- this.overlayRef = this.overlay.create({
667
- positionStrategy,
668
- scrollStrategy: this.overlay.scrollStrategies.block(),
669
- hasBackdrop: false,
670
- panelClass: 'ngs-tour-step-overlay'
671
- });
672
- if (step.withBackdrop) {
673
- this.tourService.showBackdrop(rect, style.borderRadius, this.viewContainerRef, this.elementRef.nativeElement, padding, step.disableInteraction);
674
- }
675
- const componentType = this.customStepComponent || TourStep;
676
- const portal = new ComponentPortal(componentType, this.viewContainerRef);
677
- this.componentRef = this.overlayRef.attach(portal);
678
- const safeSetInput = (name, value) => {
679
- try {
680
- this.componentRef?.setInput(name, value);
681
- }
682
- catch (e) {
683
- // Ignore if input is not declared
684
- }
685
- };
686
- if (positionStrategy instanceof FlexibleConnectedPositionStrategy) {
687
- positionStrategy.positionChanges.subscribe((change) => {
688
- safeSetInput('position', change.connectionPair);
689
- });
690
- // Trigger position calculation to emit initial value
691
- this.overlayRef.updatePosition();
692
- }
693
- const steps = this.tourService.steps();
694
- const index = this.tourService.currentStepIndex();
695
- const isFirst = index === 0;
696
- const isLast = index === steps.length - 1;
697
- safeSetInput('step', step);
698
- safeSetInput('isFirst', isFirst);
699
- safeSetInput('isLast', isLast);
700
- }, timeout);
701
- }
702
- async hideStep() {
703
- const overlayRef = this.overlayRef;
704
- const componentRef = this.componentRef;
705
- if (this.overlayRef === overlayRef) {
706
- this.overlayRef = null;
707
- this.componentRef = null;
708
- }
709
- if (overlayRef) {
710
- const safeSetInput = (name, value) => {
711
- try {
712
- componentRef?.setInput(name, value);
713
- }
714
- catch (e) {
715
- // Ignore if input is not declared
716
- }
717
- };
718
- safeSetInput('animateEnterClass', false);
719
- safeSetInput('animateLeaveClass', true);
720
- await new Promise(resolve => setTimeout(resolve, 200));
721
- overlayRef.dispose();
722
- }
723
- }
724
- _getOffset(position, padding) {
725
- const offset = 8 + padding;
726
- if (position.originY === 'bottom' && position.overlayY === 'top') {
727
- return { offsetY: offset };
728
- }
729
- if (position.originY === 'top' && position.overlayY === 'bottom') {
730
- return { offsetY: -offset };
731
- }
732
- if (position.originX === 'end' && position.overlayX === 'start') {
733
- return { offsetX: offset };
734
- }
735
- if (position.originX === 'start' && position.overlayX === 'end') {
736
- return { offsetX: -offset };
737
- }
738
- return {};
739
- }
740
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TourAnchorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
741
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.7", type: TourAnchorDirective, isStandalone: true, selector: "[ngsTourAnchor]", inputs: { anchorId: { classPropertyName: "anchorId", publicName: "ngsTourAnchor", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
742
- }
743
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: TourAnchorDirective, decorators: [{
744
- type: Directive,
745
- args: [{
746
- selector: '[ngsTourAnchor]',
747
- }]
748
- }], propDecorators: { anchorId: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngsTourAnchor", required: true }] }] } });
749
-
750
- /**
751
- * Generated bundle index. Do not edit.
752
- */
753
-
62
+ `.replace(/\s+/g, " ")}`;
63
+ }, ...ngDevMode ? [{ debugName: "backdropPath" }] : /* istanbul ignore next */ []);
64
+ constructor() {
65
+ this.updateViewBox();
66
+ }
67
+ onResize() {
68
+ this.updatePositionFromAnchor();
69
+ this.updateViewBox();
70
+ }
71
+ anchorElement = null;
72
+ updatePosition(rect, borderRadius, anchorElement, padding = 0, disableInteraction = false) {
73
+ if (anchorElement) this.anchorElement = anchorElement;
74
+ const isInitial = this.isInitial();
75
+ this.rect.set({
76
+ top: rect.top,
77
+ left: rect.left,
78
+ width: rect.width,
79
+ height: rect.height
80
+ });
81
+ const radius = parseInt(borderRadius, 10) || 0;
82
+ this.rx.set(radius);
83
+ this.padding.set(padding);
84
+ this.disableInteraction.set(disableInteraction);
85
+ this.updateViewBox();
86
+ if (isInitial) setTimeout(() => {
87
+ this.isInitial.set(false);
88
+ });
89
+ }
90
+ updatePositionFromAnchor() {
91
+ if (this.anchorElement) {
92
+ const rect = this.anchorElement.getBoundingClientRect();
93
+ this.rect.set({
94
+ top: rect.top,
95
+ left: rect.left,
96
+ width: rect.width,
97
+ height: rect.height
98
+ });
99
+ }
100
+ }
101
+ updateViewBox() {
102
+ const w = window.innerWidth || 1e3;
103
+ const h = window.innerHeight || 1e3;
104
+ this.viewBox.set(`0 0 ${w} ${h}`);
105
+ }
106
+ static ɵfac = i0.ɵɵngDeclareFactory({
107
+ minVersion: "12.0.0",
108
+ version: "22.3.0",
109
+ ngImport: i0,
110
+ type: TourBackdrop,
111
+ deps: [],
112
+ target: i0.ɵɵFactoryTarget.Component
113
+ });
114
+ static ɵcmp = i0.ɵɵngDeclareComponent({
115
+ minVersion: "17.1.0",
116
+ version: "22.3.0",
117
+ type: TourBackdrop,
118
+ isStandalone: true,
119
+ selector: "ngs-tour-backdrop",
120
+ inputs: {
121
+ animateEnterClass: {
122
+ classPropertyName: "animateEnterClass",
123
+ publicName: "animateEnterClass",
124
+ isSignal: true,
125
+ isRequired: false,
126
+ transformFunction: null
127
+ },
128
+ animateLeaveClass: {
129
+ classPropertyName: "animateLeaveClass",
130
+ publicName: "animateLeaveClass",
131
+ isSignal: true,
132
+ isRequired: false,
133
+ transformFunction: null
134
+ }
135
+ },
136
+ outputs: { backdropClick: "backdropClick" },
137
+ host: {
138
+ listeners: {
139
+ "window:resize": "onResize()",
140
+ "window:scroll": "onResize()"
141
+ },
142
+ properties: {
143
+ "class.is-initial": "isInitial()",
144
+ "class.animate-enter": "animateEnterClass()",
145
+ "class.animate-leave": "animateLeaveClass()",
146
+ "style.pointer-events": "\"none\""
147
+ }
148
+ },
149
+ exportAs: ["ngsTourBackdrop"],
150
+ ngImport: i0,
151
+ template: "<svg\n class=\"absolute top-0 left-0 w-full h-full pointer-events-none\"\n [attr.viewBox]=\"viewBox()\"\n preserveAspectRatio=\"xMinYMin slice\"\n>\n <path\n fill-rule=\"evenodd\"\n [attr.d]=\"backdropPath()\"\n (click)=\"backdropClick.emit()\"\n />\n <rect\n [attr.x]=\"rect().left - padding()\"\n [attr.y]=\"rect().top - padding()\"\n [attr.width]=\"rect().width + 2 * padding()\"\n [attr.height]=\"rect().height + 2 * padding()\"\n [attr.rx]=\"rx()\"\n [class.interactive]=\"!disableInteraction()\"\n ></rect>\n</svg>\n",
152
+ styles: [":host{position:fixed;top:0;left:0;width:100vw;height:100vh;pointer-events:none;z-index:1100;display:block;background:transparent;overflow:hidden;visibility:visible}:host path{fill:var(--ngs-overlay-backdrop-bg);pointer-events:auto;cursor:default}:host rect{fill:transparent;stroke:var(--ngs-color-primary);stroke-width:2;pointer-events:auto}:host rect:not(.interactive){pointer-events:none}:host path,:host rect{transition:all .3s cubic-bezier(.4,0,.2,1)}:host.animate-enter{animation:backdrop-fade-in .2s ease-out forwards}:host.animate-leave{animation:backdrop-fade-out .15s ease-in forwards}@keyframes backdrop-fade-in{0%{opacity:0}to{opacity:1}}@keyframes backdrop-fade-out{0%{opacity:1}to{opacity:0}}:host(.is-initial) path,:host(.is-initial) rect{transition:none}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
153
+ changeDetection: i0.ChangeDetectionStrategy.Eager
154
+ });
155
+ };
156
+ i0.ɵɵngDeclareClassMetadata({
157
+ minVersion: "12.0.0",
158
+ version: "22.3.0",
159
+ ngImport: i0,
160
+ type: TourBackdrop,
161
+ decorators: [{
162
+ type: Component,
163
+ args: [{
164
+ selector: "ngs-tour-backdrop",
165
+ exportAs: "ngsTourBackdrop",
166
+ changeDetection: ChangeDetectionStrategy.Eager,
167
+ host: {
168
+ "[class.is-initial]": "isInitial()",
169
+ "[class.animate-enter]": "animateEnterClass()",
170
+ "[class.animate-leave]": "animateLeaveClass()",
171
+ "[style.pointer-events]": "\"none\""
172
+ },
173
+ template: "<svg\n class=\"absolute top-0 left-0 w-full h-full pointer-events-none\"\n [attr.viewBox]=\"viewBox()\"\n preserveAspectRatio=\"xMinYMin slice\"\n>\n <path\n fill-rule=\"evenodd\"\n [attr.d]=\"backdropPath()\"\n (click)=\"backdropClick.emit()\"\n />\n <rect\n [attr.x]=\"rect().left - padding()\"\n [attr.y]=\"rect().top - padding()\"\n [attr.width]=\"rect().width + 2 * padding()\"\n [attr.height]=\"rect().height + 2 * padding()\"\n [attr.rx]=\"rx()\"\n [class.interactive]=\"!disableInteraction()\"\n ></rect>\n</svg>\n",
174
+ styles: [":host{position:fixed;top:0;left:0;width:100vw;height:100vh;pointer-events:none;z-index:1100;display:block;background:transparent;overflow:hidden;visibility:visible}:host path{fill:var(--ngs-overlay-backdrop-bg);pointer-events:auto;cursor:default}:host rect{fill:transparent;stroke:var(--ngs-color-primary);stroke-width:2;pointer-events:auto}:host rect:not(.interactive){pointer-events:none}:host path,:host rect{transition:all .3s cubic-bezier(.4,0,.2,1)}:host.animate-enter{animation:backdrop-fade-in .2s ease-out forwards}:host.animate-leave{animation:backdrop-fade-out .15s ease-in forwards}@keyframes backdrop-fade-in{0%{opacity:0}to{opacity:1}}@keyframes backdrop-fade-out{0%{opacity:1}to{opacity:0}}:host(.is-initial) path,:host(.is-initial) rect{transition:none}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
175
+ }]
176
+ }],
177
+ ctorParameters: () => [],
178
+ propDecorators: {
179
+ backdropClick: [{
180
+ type: i0.Output,
181
+ args: ["backdropClick"]
182
+ }],
183
+ animateEnterClass: [{
184
+ type: i0.Input,
185
+ args: [{
186
+ isSignal: true,
187
+ alias: "animateEnterClass",
188
+ required: false
189
+ }]
190
+ }],
191
+ animateLeaveClass: [{
192
+ type: i0.Input,
193
+ args: [{
194
+ isSignal: true,
195
+ alias: "animateLeaveClass",
196
+ required: false
197
+ }]
198
+ }],
199
+ onResize: [{
200
+ type: HostListener,
201
+ args: ["window:resize"]
202
+ }, {
203
+ type: HostListener,
204
+ args: ["window:scroll"]
205
+ }]
206
+ }
207
+ });
208
+ var TourStep = class TourStep {
209
+ tourService = inject(TourService);
210
+ _sanitizer = inject(DomSanitizer);
211
+ step = input.required(...ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []);
212
+ isFirst = input(false, ...ngDevMode ? [{ debugName: "isFirst" }] : /* istanbul ignore next */ []);
213
+ isLast = input(false, ...ngDevMode ? [{ debugName: "isLast" }] : /* istanbul ignore next */ []);
214
+ position = input(null, ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
215
+ animateEnterClass = input(true, ...ngDevMode ? [{ debugName: "animateEnterClass" }] : /* istanbul ignore next */ []);
216
+ animateLeaveClass = input(false, ...ngDevMode ? [{ debugName: "animateLeaveClass" }] : /* istanbul ignore next */ []);
217
+ config = inject(TOUR_CONFIG, { optional: true });
218
+ htmlContent = computed(() => {
219
+ const html = this.step().htmlContent;
220
+ return html ? this._sanitizer.bypassSecurityTrustHtml(html) : null;
221
+ }, ...ngDevMode ? [{ debugName: "htmlContent" }] : /* istanbul ignore next */ []);
222
+ getArrowClasses(pos) {
223
+ if (!pos) return "hidden";
224
+ const classes = [];
225
+ if (pos.overlayY === "top" && pos.originY === "bottom") classes.push("pos-top");
226
+ else if (pos.overlayY === "bottom" && pos.originY === "top") classes.push("pos-bottom");
227
+ else if (pos.overlayX === "start" && pos.originX === "end") classes.push("pos-left");
228
+ else if (pos.overlayX === "end" && pos.originX === "start") classes.push("pos-right");
229
+ if (classes.includes("pos-top") || classes.includes("pos-bottom")) {
230
+ if (pos.overlayX === "center") classes.push("align-center");
231
+ else if (pos.overlayX === "start") classes.push("align-start");
232
+ else if (pos.overlayX === "end") classes.push("align-end");
233
+ } else if (classes.includes("pos-left") || classes.includes("pos-right")) {
234
+ if (pos.overlayY === "center") classes.push("align-center");
235
+ else if (pos.overlayY === "top") classes.push("align-start");
236
+ else if (pos.overlayY === "bottom") classes.push("align-end");
237
+ }
238
+ return classes.join(" ");
239
+ }
240
+ static ɵfac = i0.ɵɵngDeclareFactory({
241
+ minVersion: "12.0.0",
242
+ version: "22.3.0",
243
+ ngImport: i0,
244
+ type: TourStep,
245
+ deps: [],
246
+ target: i0.ɵɵFactoryTarget.Component
247
+ });
248
+ static ɵcmp = i0.ɵɵngDeclareComponent({
249
+ minVersion: "17.0.0",
250
+ version: "22.3.0",
251
+ type: TourStep,
252
+ isStandalone: true,
253
+ selector: "ngs-tour-step",
254
+ inputs: {
255
+ step: {
256
+ classPropertyName: "step",
257
+ publicName: "step",
258
+ isSignal: true,
259
+ isRequired: true,
260
+ transformFunction: null
261
+ },
262
+ isFirst: {
263
+ classPropertyName: "isFirst",
264
+ publicName: "isFirst",
265
+ isSignal: true,
266
+ isRequired: false,
267
+ transformFunction: null
268
+ },
269
+ isLast: {
270
+ classPropertyName: "isLast",
271
+ publicName: "isLast",
272
+ isSignal: true,
273
+ isRequired: false,
274
+ transformFunction: null
275
+ },
276
+ position: {
277
+ classPropertyName: "position",
278
+ publicName: "position",
279
+ isSignal: true,
280
+ isRequired: false,
281
+ transformFunction: null
282
+ },
283
+ animateEnterClass: {
284
+ classPropertyName: "animateEnterClass",
285
+ publicName: "animateEnterClass",
286
+ isSignal: true,
287
+ isRequired: false,
288
+ transformFunction: null
289
+ },
290
+ animateLeaveClass: {
291
+ classPropertyName: "animateLeaveClass",
292
+ publicName: "animateLeaveClass",
293
+ isSignal: true,
294
+ isRequired: false,
295
+ transformFunction: null
296
+ }
297
+ },
298
+ host: {
299
+ properties: {
300
+ "class.animate-enter": "animateEnterClass()",
301
+ "class.animate-leave": "animateLeaveClass()"
302
+ },
303
+ classAttribute: "ngs-tour-step not-prose"
304
+ },
305
+ exportAs: ["ngsTourStep"],
306
+ ngImport: i0,
307
+ template: "@if (!step().hideArrow) {\n <div class=\"tour-step-arrow\" [ngClass]=\"getArrowClasses(position())\"></div>\n}\n<div class=\"relative z-[1] transform-gpu\">\n @if (step().title) {\n <h3 class=\"mt-0 mb-2 font-semibold text-base leading-none tracking-tight\">{{ step().title }}</h3>\n }\n\n <div class=\"text-sm text-on-surface-variant\">\n @if (step().template) {\n <ng-container *ngTemplateOutlet=\"step().template!; context: step().templateContext\"/>\n } @else if (htmlContent()) {\n <div [innerHTML]=\"htmlContent()\"></div>\n } @else {\n {{ step().content }}\n }\n </div>\n\n <div class=\"flex justify-between gap-4 mt-4\">\n <button ngsButton (click)=\"tourService.end()\" class=\"button\">\n {{ step().skipBtnText || config?.skipBtnText || 'Close' }}\n </button>\n <div class=\"flex gap-2\">\n <button ngsButton=\"tonal\" (click)=\"tourService.prev()\" [disabled]=\"isFirst()\" class=\"button\">\n {{ step().prevBtnText || config?.prevBtnText || 'Prev' }}\n </button>\n <button ngsButton=\"filled\" (click)=\"tourService.next()\" class=\"button\">\n @if (isLast()) {\n {{ step().finishBtnText || config?.finishBtnText || 'Finish' }}\n } @else {\n {{ step().nextBtnText || config?.nextBtnText || 'Next' }}\n }\n </button>\n </div>\n </div>\n</div>\n",
308
+ styles: [":host{--ngs-guided-tour-step-bg: var(--ngs-color-surface-container-lowest);--ngs-guided-tour-step-border: 1px solid var(--ngs-color-subtle);--ngs-guided-tour-arrow-border-color: var(--ngs-color-subtle);display:block;z-index:1200;position:relative;background:var(--ngs-guided-tour-step-bg);border-radius:var(--ngs-guided-tour-step-radius, var(--ngs-radius-xl));box-shadow:var(--ngs-guided-tour-step-shadow, var(--ngs-shadow-lg));max-width:var(--ngs-guided-tour-step-max-width, 400px);padding:var(--ngs-guided-tour-step-step-padding, calc(var(--spacing, .25rem) * 4));border:var(--ngs-guided-tour-step-border);overflow:visible}:host .button{--ngs-button-height: calc(var(--spacing, .25rem) * 8);--ngs-button-padding: 0 calc(var(--spacing, .25rem) * 3)}:host.animate-enter{animation:step-enter .3s cubic-bezier(.4,0,.2,1) forwards}:host.animate-leave{animation:step-leave .15s cubic-bezier(.4,0,.2,1) forwards}:host .tour-step-arrow{position:absolute;width:12px;height:12px;background:var(--ngs-guided-tour-step-bg);z-index:10;pointer-events:none;border:1px solid transparent}:host .tour-step-arrow.hidden{display:none}:host .tour-step-arrow.pos-top{top:0;border-top-color:var(--ngs-guided-tour-arrow-border-color);border-left-color:var(--ngs-guided-tour-arrow-border-color)}:host .tour-step-arrow.pos-top.align-center{left:50%;transform:translate(-50%) translateY(-50%) rotate(45deg)}:host .tour-step-arrow.pos-top.align-start{left:16px;transform:translateY(-50%) rotate(45deg)}:host .tour-step-arrow.pos-top.align-end{right:16px;transform:translateY(-50%) rotate(45deg)}:host .tour-step-arrow.pos-bottom{bottom:0;border-bottom-color:var(--ngs-guided-tour-arrow-border-color);border-right-color:var(--ngs-guided-tour-arrow-border-color)}:host .tour-step-arrow.pos-bottom.align-center{left:50%;transform:translate(-50%) translateY(50%) rotate(45deg)}:host .tour-step-arrow.pos-bottom.align-start{left:16px;transform:translateY(50%) rotate(45deg)}:host .tour-step-arrow.pos-bottom.align-end{right:16px;transform:translateY(50%) rotate(45deg)}:host .tour-step-arrow.pos-left{left:0;border-bottom-color:var(--ngs-guided-tour-arrow-border-color);border-left-color:var(--ngs-guided-tour-arrow-border-color)}:host .tour-step-arrow.pos-left.align-center{top:50%;transform:translate(-50%) translateY(-50%) rotate(45deg)}:host .tour-step-arrow.pos-left.align-start{top:16px;transform:translate(-50%) rotate(45deg)}:host .tour-step-arrow.pos-left.align-end{bottom:16px;transform:translate(-50%) rotate(45deg)}:host .tour-step-arrow.pos-right{right:0;border-top-color:var(--ngs-guided-tour-arrow-border-color);border-right-color:var(--ngs-guided-tour-arrow-border-color)}:host .tour-step-arrow.pos-right.align-center{top:50%;transform:translate(50%) translateY(-50%) rotate(45deg)}:host .tour-step-arrow.pos-right.align-start{top:16px;transform:translate(50%) rotate(45deg)}:host .tour-step-arrow.pos-right.align-end{bottom:16px;transform:translate(50%) rotate(45deg)}@keyframes step-enter{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes step-leave{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
309
+ dependencies: [
310
+ {
311
+ kind: "directive",
312
+ type: NgTemplateOutlet,
313
+ selector: "[ngTemplateOutlet]",
314
+ inputs: [
315
+ "ngTemplateOutletContext",
316
+ "ngTemplateOutlet",
317
+ "ngTemplateOutletInjector"
318
+ ]
319
+ },
320
+ {
321
+ kind: "directive",
322
+ type: NgClass,
323
+ selector: "[ngClass]",
324
+ inputs: ["class", "ngClass"]
325
+ },
326
+ {
327
+ kind: "ngmodule",
328
+ type: CommonModule
329
+ },
330
+ {
331
+ kind: "component",
332
+ type: Button,
333
+ selector: "\n button[ngsButton], button[ngsIconButton],\n a[ngsButton], a[ngsIconButton]\n ",
334
+ inputs: [
335
+ "ngsButton",
336
+ "ngsIconButton",
337
+ "loading",
338
+ "disabled",
339
+ "disabledInteractive",
340
+ "disableRipple",
341
+ "reverse",
342
+ "fullWidth",
343
+ "hideTextOnMobile"
344
+ ],
345
+ exportAs: ["ngsButton"]
346
+ }
347
+ ],
348
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
349
+ });
350
+ };
351
+ i0.ɵɵngDeclareClassMetadata({
352
+ minVersion: "12.0.0",
353
+ version: "22.3.0",
354
+ ngImport: i0,
355
+ type: TourStep,
356
+ decorators: [{
357
+ type: Component,
358
+ args: [{
359
+ selector: "ngs-tour-step",
360
+ exportAs: "ngsTourStep",
361
+ imports: [
362
+ NgTemplateOutlet,
363
+ NgClass,
364
+ CommonModule,
365
+ Button
366
+ ],
367
+ changeDetection: ChangeDetectionStrategy.OnPush,
368
+ host: {
369
+ "class": "ngs-tour-step not-prose",
370
+ "[class.animate-enter]": "animateEnterClass()",
371
+ "[class.animate-leave]": "animateLeaveClass()"
372
+ },
373
+ template: "@if (!step().hideArrow) {\n <div class=\"tour-step-arrow\" [ngClass]=\"getArrowClasses(position())\"></div>\n}\n<div class=\"relative z-[1] transform-gpu\">\n @if (step().title) {\n <h3 class=\"mt-0 mb-2 font-semibold text-base leading-none tracking-tight\">{{ step().title }}</h3>\n }\n\n <div class=\"text-sm text-on-surface-variant\">\n @if (step().template) {\n <ng-container *ngTemplateOutlet=\"step().template!; context: step().templateContext\"/>\n } @else if (htmlContent()) {\n <div [innerHTML]=\"htmlContent()\"></div>\n } @else {\n {{ step().content }}\n }\n </div>\n\n <div class=\"flex justify-between gap-4 mt-4\">\n <button ngsButton (click)=\"tourService.end()\" class=\"button\">\n {{ step().skipBtnText || config?.skipBtnText || 'Close' }}\n </button>\n <div class=\"flex gap-2\">\n <button ngsButton=\"tonal\" (click)=\"tourService.prev()\" [disabled]=\"isFirst()\" class=\"button\">\n {{ step().prevBtnText || config?.prevBtnText || 'Prev' }}\n </button>\n <button ngsButton=\"filled\" (click)=\"tourService.next()\" class=\"button\">\n @if (isLast()) {\n {{ step().finishBtnText || config?.finishBtnText || 'Finish' }}\n } @else {\n {{ step().nextBtnText || config?.nextBtnText || 'Next' }}\n }\n </button>\n </div>\n </div>\n</div>\n",
374
+ styles: [":host{--ngs-guided-tour-step-bg: var(--ngs-color-surface-container-lowest);--ngs-guided-tour-step-border: 1px solid var(--ngs-color-subtle);--ngs-guided-tour-arrow-border-color: var(--ngs-color-subtle);display:block;z-index:1200;position:relative;background:var(--ngs-guided-tour-step-bg);border-radius:var(--ngs-guided-tour-step-radius, var(--ngs-radius-xl));box-shadow:var(--ngs-guided-tour-step-shadow, var(--ngs-shadow-lg));max-width:var(--ngs-guided-tour-step-max-width, 400px);padding:var(--ngs-guided-tour-step-step-padding, calc(var(--spacing, .25rem) * 4));border:var(--ngs-guided-tour-step-border);overflow:visible}:host .button{--ngs-button-height: calc(var(--spacing, .25rem) * 8);--ngs-button-padding: 0 calc(var(--spacing, .25rem) * 3)}:host.animate-enter{animation:step-enter .3s cubic-bezier(.4,0,.2,1) forwards}:host.animate-leave{animation:step-leave .15s cubic-bezier(.4,0,.2,1) forwards}:host .tour-step-arrow{position:absolute;width:12px;height:12px;background:var(--ngs-guided-tour-step-bg);z-index:10;pointer-events:none;border:1px solid transparent}:host .tour-step-arrow.hidden{display:none}:host .tour-step-arrow.pos-top{top:0;border-top-color:var(--ngs-guided-tour-arrow-border-color);border-left-color:var(--ngs-guided-tour-arrow-border-color)}:host .tour-step-arrow.pos-top.align-center{left:50%;transform:translate(-50%) translateY(-50%) rotate(45deg)}:host .tour-step-arrow.pos-top.align-start{left:16px;transform:translateY(-50%) rotate(45deg)}:host .tour-step-arrow.pos-top.align-end{right:16px;transform:translateY(-50%) rotate(45deg)}:host .tour-step-arrow.pos-bottom{bottom:0;border-bottom-color:var(--ngs-guided-tour-arrow-border-color);border-right-color:var(--ngs-guided-tour-arrow-border-color)}:host .tour-step-arrow.pos-bottom.align-center{left:50%;transform:translate(-50%) translateY(50%) rotate(45deg)}:host .tour-step-arrow.pos-bottom.align-start{left:16px;transform:translateY(50%) rotate(45deg)}:host .tour-step-arrow.pos-bottom.align-end{right:16px;transform:translateY(50%) rotate(45deg)}:host .tour-step-arrow.pos-left{left:0;border-bottom-color:var(--ngs-guided-tour-arrow-border-color);border-left-color:var(--ngs-guided-tour-arrow-border-color)}:host .tour-step-arrow.pos-left.align-center{top:50%;transform:translate(-50%) translateY(-50%) rotate(45deg)}:host .tour-step-arrow.pos-left.align-start{top:16px;transform:translate(-50%) rotate(45deg)}:host .tour-step-arrow.pos-left.align-end{bottom:16px;transform:translate(-50%) rotate(45deg)}:host .tour-step-arrow.pos-right{right:0;border-top-color:var(--ngs-guided-tour-arrow-border-color);border-right-color:var(--ngs-guided-tour-arrow-border-color)}:host .tour-step-arrow.pos-right.align-center{top:50%;transform:translate(50%) translateY(-50%) rotate(45deg)}:host .tour-step-arrow.pos-right.align-start{top:16px;transform:translate(50%) rotate(45deg)}:host .tour-step-arrow.pos-right.align-end{bottom:16px;transform:translate(50%) rotate(45deg)}@keyframes step-enter{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes step-leave{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
375
+ }]
376
+ }],
377
+ propDecorators: {
378
+ step: [{
379
+ type: i0.Input,
380
+ args: [{
381
+ isSignal: true,
382
+ alias: "step",
383
+ required: true
384
+ }]
385
+ }],
386
+ isFirst: [{
387
+ type: i0.Input,
388
+ args: [{
389
+ isSignal: true,
390
+ alias: "isFirst",
391
+ required: false
392
+ }]
393
+ }],
394
+ isLast: [{
395
+ type: i0.Input,
396
+ args: [{
397
+ isSignal: true,
398
+ alias: "isLast",
399
+ required: false
400
+ }]
401
+ }],
402
+ position: [{
403
+ type: i0.Input,
404
+ args: [{
405
+ isSignal: true,
406
+ alias: "position",
407
+ required: false
408
+ }]
409
+ }],
410
+ animateEnterClass: [{
411
+ type: i0.Input,
412
+ args: [{
413
+ isSignal: true,
414
+ alias: "animateEnterClass",
415
+ required: false
416
+ }]
417
+ }],
418
+ animateLeaveClass: [{
419
+ type: i0.Input,
420
+ args: [{
421
+ isSignal: true,
422
+ alias: "animateLeaveClass",
423
+ required: false
424
+ }]
425
+ }]
426
+ }
427
+ });
428
+ var TourService = class TourService {
429
+ overlay = inject(Overlay);
430
+ config = inject(TOUR_CONFIG, { optional: true });
431
+ document = inject(DOCUMENT$1);
432
+ router = inject(Router);
433
+ backdropOverlayRef = null;
434
+ backdropComponentRef = null;
435
+ _steps = signal([], ...ngDevMode ? [{ debugName: "_steps" }] : /* istanbul ignore next */ []);
436
+ _currentStepIndex = signal(-1, ...ngDevMode ? [{ debugName: "_currentStepIndex" }] : /* istanbul ignore next */ []);
437
+ _state = signal(TourState.OFF, ...ngDevMode ? [{ debugName: "_state" }] : /* istanbul ignore next */ []);
438
+ _anchors = /* @__PURE__ */ new Map();
439
+ stepOverlayRef = null;
440
+ stepComponentRef = null;
441
+ customStepComponent = inject(TOUR_STEP_COMPONENT, { optional: true });
442
+ constructor() {
443
+ this.document.addEventListener("keydown", this.handleKeyDown);
444
+ }
445
+ ngOnDestroy() {
446
+ this.document.removeEventListener("keydown", this.handleKeyDown);
447
+ }
448
+ handleKeyDown = (event) => {
449
+ if (this.state() !== TourState.ON || this.config?.keyboardNavigation === false) return;
450
+ switch (event.key) {
451
+ case "ArrowRight":
452
+ this.next();
453
+ break;
454
+ case "ArrowLeft":
455
+ this.prev();
456
+ break;
457
+ case "Escape": this.end();
458
+ }
459
+ };
460
+ steps = this._steps.asReadonly();
461
+ currentStepIndex = this._currentStepIndex.asReadonly();
462
+ state = this._state.asReadonly();
463
+ currentStep = computed(() => {
464
+ const index = this._currentStepIndex();
465
+ const steps = this._steps();
466
+ return index >= 0 && index < steps.length ? steps[index] : null;
467
+ }, ...ngDevMode ? [{ debugName: "currentStep" }] : /* istanbul ignore next */ []);
468
+ stepShow$ = new Subject();
469
+ stepHide$ = new Subject();
470
+ start$ = new Subject();
471
+ end$ = new Subject();
472
+ registerAnchor(id, anchor) {
473
+ this._anchors.set(id, anchor);
474
+ }
475
+ unregisterAnchor(id) {
476
+ this._anchors.delete(id);
477
+ }
478
+ start(steps) {
479
+ this._steps.set(steps);
480
+ this._state.set(TourState.ON);
481
+ this.start$.next();
482
+ this.goToStep(0);
483
+ }
484
+ async end() {
485
+ const currentStep = this.currentStep();
486
+ if (currentStep) {
487
+ if (currentStep.onHide) await currentStep.onHide();
488
+ this.stepHide$.next(currentStep);
489
+ const hideStepPromise = this._hideStep(currentStep);
490
+ const hideBackdropPromise = this.hideBackdrop(true);
491
+ await Promise.all([hideStepPromise, hideBackdropPromise]);
492
+ } else await this.hideBackdrop(true);
493
+ this._state.set(TourState.OFF);
494
+ this._currentStepIndex.set(-1);
495
+ this._steps.set([]);
496
+ this.end$.next();
497
+ }
498
+ async next() {
499
+ const currentStep = this.currentStep();
500
+ if (currentStep?.onNext) await currentStep.onNext();
501
+ if (this._currentStepIndex() < this._steps().length - 1) await this.goToStep(this._currentStepIndex() + 1);
502
+ else await this.end();
503
+ }
504
+ async prev() {
505
+ const currentStep = this.currentStep();
506
+ if (currentStep?.onPrev) await currentStep.onPrev();
507
+ if (this._currentStepIndex() > 0) await this.goToStep(this._currentStepIndex() - 1);
508
+ }
509
+ async goToStep(index) {
510
+ const currentStep = this.currentStep();
511
+ const nextStep = this._steps()[index];
512
+ if (currentStep) {
513
+ if (currentStep.onHide) await currentStep.onHide();
514
+ this.stepHide$.next(currentStep);
515
+ await this._hideStep(currentStep);
516
+ }
517
+ if (currentStep?.withBackdrop && !nextStep?.withBackdrop) this.hideBackdrop(false);
518
+ if (nextStep?.route) {
519
+ const currentUrl = this.router.url;
520
+ const targetUrl = nextStep.route;
521
+ if (currentUrl !== targetUrl) await this.router.navigateByUrl(targetUrl);
522
+ }
523
+ if (nextStep?.onShow) await nextStep.onShow();
524
+ if (nextStep?.waitFor) try {
525
+ await this.waitForElement(nextStep.waitFor);
526
+ } catch (e) {
527
+ console.warn(`TourService: Element "${nextStep.waitFor}" not found after timeout.`);
528
+ }
529
+ this._currentStepIndex.set(index);
530
+ if (nextStep) {
531
+ this.stepShow$.next(nextStep);
532
+ this._showStep(nextStep);
533
+ }
534
+ }
535
+ waitForElement(selector, timeout = 3e3) {
536
+ return new Promise((resolve, reject) => {
537
+ const element = document.querySelector(selector);
538
+ if (element) return resolve(element);
539
+ const observer = new MutationObserver(() => {
540
+ const element = document.querySelector(selector);
541
+ if (element) {
542
+ observer.disconnect();
543
+ clearTimeout(timer);
544
+ resolve(element);
545
+ }
546
+ });
547
+ observer.observe(document.body, {
548
+ childList: true,
549
+ subtree: true
550
+ });
551
+ const timer = setTimeout(() => {
552
+ observer.disconnect();
553
+ reject(/* @__PURE__ */ new Error(`Timeout waiting for element: ${selector}`));
554
+ }, timeout);
555
+ });
556
+ }
557
+ showBackdrop(rect, borderRadius, viewContainerRef, anchorElement, padding = 0, disableInteraction = false) {
558
+ if (!this.backdropOverlayRef) {
559
+ this.backdropOverlayRef = this.overlay.create({
560
+ positionStrategy: this.overlay.position().global(),
561
+ scrollStrategy: this.overlay.scrollStrategies.block(),
562
+ hasBackdrop: false
563
+ });
564
+ const portal = new ComponentPortal(TourBackdrop, viewContainerRef);
565
+ this.backdropComponentRef = this.backdropOverlayRef.attach(portal);
566
+ this.backdropComponentRef.instance.backdropClick.subscribe(() => {
567
+ if (this.currentStep()?.closeOnBackdropClick ?? this.config?.closeOnBackdropClick ?? false) this.end();
568
+ });
569
+ }
570
+ this.backdropComponentRef?.instance.updatePosition(rect, borderRadius, anchorElement, padding, disableInteraction);
571
+ }
572
+ async hideBackdrop(animate) {
573
+ const overlayRef = this.backdropOverlayRef;
574
+ const componentRef = this.backdropComponentRef;
575
+ if (!overlayRef) return;
576
+ if (this.backdropOverlayRef === overlayRef) {
577
+ this.backdropOverlayRef = null;
578
+ this.backdropComponentRef = null;
579
+ }
580
+ if (animate) {
581
+ if (componentRef) {
582
+ const safeSetInput = (name, value) => {
583
+ try {
584
+ componentRef.setInput(name, value);
585
+ } catch (e) {}
586
+ };
587
+ safeSetInput("animateEnterClass", false);
588
+ safeSetInput("animateLeaveClass", true);
589
+ }
590
+ return new Promise((resolve) => {
591
+ setTimeout(() => {
592
+ overlayRef.dispose();
593
+ resolve();
594
+ }, 150);
595
+ });
596
+ } else {
597
+ overlayRef.dispose();
598
+ return Promise.resolve();
599
+ }
600
+ }
601
+ _showStep(step) {
602
+ const anchorId = typeof step.anchorId === "function" ? step.anchorId() : step.anchorId;
603
+ let anchorElement = null;
604
+ let anchorDirective = null;
605
+ if (typeof anchorId === "string") {
606
+ anchorDirective = this._anchors.get(anchorId);
607
+ if (anchorDirective) {
608
+ anchorDirective.showStep(step);
609
+ return;
610
+ }
611
+ anchorElement = document.querySelector(anchorId);
612
+ if (!anchorElement) anchorElement = document.getElementById(anchorId);
613
+ } else if (anchorId instanceof HTMLElement) anchorElement = anchorId;
614
+ if (anchorElement) this.showStepForElement(anchorElement, step);
615
+ }
616
+ showStepForElement(element, step) {
617
+ if (this.stepOverlayRef) {
618
+ const oldOverlayRef = this.stepOverlayRef;
619
+ this.stepComponentRef;
620
+ this.stepOverlayRef = null;
621
+ this.stepComponentRef = null;
622
+ oldOverlayRef.dispose();
623
+ }
624
+ const rect = element.getBoundingClientRect();
625
+ if (!(rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth))) element.scrollIntoView({
626
+ behavior: "instant",
627
+ block: "center",
628
+ inline: "nearest"
629
+ });
630
+ setTimeout(() => {
631
+ if (this.state() === TourState.OFF) return;
632
+ const rect = element.getBoundingClientRect();
633
+ const style = window.getComputedStyle(element);
634
+ const padding = step.padding ?? this.config?.padding ?? 4;
635
+ let positionStrategy;
636
+ const positionManager = new PositionManager();
637
+ const defaultPositions = [
638
+ ...positionManager.build("below-center"),
639
+ ...positionManager.build("above-center"),
640
+ ...positionManager.build("after-center"),
641
+ ...positionManager.build("before-center")
642
+ ].map((p) => ({
643
+ ...p,
644
+ ...this._getOffset(p, padding)
645
+ }));
646
+ const preferredPositions = step.position ? positionManager.build(step.position).map((p) => ({
647
+ ...p,
648
+ ...this._getOffset(p, padding)
649
+ })) : defaultPositions;
650
+ positionStrategy = this.overlay.position().flexibleConnectedTo(element).withPush(false).withPositions(preferredPositions);
651
+ this.stepOverlayRef = this.overlay.create({
652
+ positionStrategy,
653
+ scrollStrategy: this.overlay.scrollStrategies.block(),
654
+ hasBackdrop: false,
655
+ panelClass: "ngs-tour-step-overlay"
656
+ });
657
+ if (step.withBackdrop) this.showBackdrop(rect, style.borderRadius, void 0, element, padding, step.disableInteraction);
658
+ const componentType = this.customStepComponent || TourStep;
659
+ const portal = new ComponentPortal(componentType);
660
+ this.stepComponentRef = this.stepOverlayRef.attach(portal);
661
+ const safeSetInput = (name, value) => {
662
+ try {
663
+ this.stepComponentRef?.setInput(name, value);
664
+ } catch (e) {}
665
+ };
666
+ if (positionStrategy instanceof FlexibleConnectedPositionStrategy) positionStrategy.positionChanges.subscribe((change) => {
667
+ safeSetInput("position", change.connectionPair);
668
+ });
669
+ const steps = this.steps();
670
+ const index = this.currentStepIndex();
671
+ const isFirst = index === 0;
672
+ const isLast = index === steps.length - 1;
673
+ safeSetInput("step", step);
674
+ safeSetInput("isFirst", isFirst);
675
+ safeSetInput("isLast", isLast);
676
+ if (positionStrategy instanceof FlexibleConnectedPositionStrategy) this.stepOverlayRef.updatePosition();
677
+ }, 0);
678
+ }
679
+ _getOffset(position, padding) {
680
+ const offset = 8 + padding;
681
+ if (position.originY === "bottom" && position.overlayY === "top") return { offsetY: offset };
682
+ if (position.originY === "top" && position.overlayY === "bottom") return { offsetY: -offset };
683
+ if (position.originX === "end" && position.overlayX === "start") return { offsetX: offset };
684
+ if (position.originX === "start" && position.overlayX === "end") return { offsetX: -offset };
685
+ return {};
686
+ }
687
+ async _hideStep(step) {
688
+ const anchorId = typeof step.anchorId === "function" ? step.anchorId() : step.anchorId;
689
+ if (typeof anchorId === "string") {
690
+ const anchor = this._anchors.get(anchorId);
691
+ if (anchor) {
692
+ await anchor.hideStep();
693
+ return;
694
+ }
695
+ }
696
+ const overlayRef = this.stepOverlayRef;
697
+ const componentRef = this.stepComponentRef;
698
+ if (overlayRef) {
699
+ if (this.stepOverlayRef === overlayRef) {
700
+ this.stepOverlayRef = null;
701
+ this.stepComponentRef = null;
702
+ }
703
+ const safeSetInput = (name, value) => {
704
+ try {
705
+ componentRef?.setInput(name, value);
706
+ } catch (e) {}
707
+ };
708
+ safeSetInput("animateEnterClass", false);
709
+ safeSetInput("animateLeaveClass", true);
710
+ await new Promise((resolve) => setTimeout(resolve, 150));
711
+ overlayRef.dispose();
712
+ }
713
+ }
714
+ static ɵfac = i0.ɵɵngDeclareFactory({
715
+ minVersion: "12.0.0",
716
+ version: "22.3.0",
717
+ ngImport: i0,
718
+ type: TourService,
719
+ deps: [],
720
+ target: i0.ɵɵFactoryTarget.Injectable
721
+ });
722
+ static ɵprov = i0.ɵɵngDeclareInjectable({
723
+ minVersion: "12.0.0",
724
+ version: "22.3.0",
725
+ ngImport: i0,
726
+ type: TourService,
727
+ providedIn: "root"
728
+ });
729
+ };
730
+ i0.ɵɵngDeclareClassMetadata({
731
+ minVersion: "12.0.0",
732
+ version: "22.3.0",
733
+ ngImport: i0,
734
+ type: TourService,
735
+ decorators: [{
736
+ type: Injectable,
737
+ args: [{ providedIn: "root" }]
738
+ }],
739
+ ctorParameters: () => []
740
+ });
741
+ var TourAnchorDirective = class TourAnchorDirective {
742
+ anchorId = input.required({
743
+ ...ngDevMode ? { debugName: "anchorId" } : /* istanbul ignore next */ {},
744
+ alias: "ngsTourAnchor"
745
+ });
746
+ elementRef = inject(ElementRef);
747
+ tourService = inject(TourService);
748
+ overlay = inject(Overlay);
749
+ viewContainerRef = inject(ViewContainerRef);
750
+ customStepComponent = inject(TOUR_STEP_COMPONENT, { optional: true });
751
+ config = inject(TOUR_CONFIG, { optional: true });
752
+ overlayRef = null;
753
+ componentRef = null;
754
+ ngOnInit() {
755
+ this.tourService.registerAnchor(this.anchorId(), this);
756
+ }
757
+ ngOnDestroy() {
758
+ this.tourService.unregisterAnchor(this.anchorId());
759
+ this.hideStep();
760
+ }
761
+ showStep(step) {
762
+ const currentOverlayRef = this.overlayRef;
763
+ this.componentRef;
764
+ if (this.overlayRef === currentOverlayRef) {
765
+ this.overlayRef = null;
766
+ this.componentRef = null;
767
+ }
768
+ if (currentOverlayRef) currentOverlayRef.dispose();
769
+ const rect = this.elementRef.nativeElement.getBoundingClientRect();
770
+ if (!(rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth))) this.elementRef.nativeElement.scrollIntoView({
771
+ behavior: "instant",
772
+ block: "center",
773
+ inline: "nearest"
774
+ });
775
+ setTimeout(() => {
776
+ if (this.tourService.state() === 0) return;
777
+ const rect = this.elementRef.nativeElement.getBoundingClientRect();
778
+ const style = window.getComputedStyle(this.elementRef.nativeElement);
779
+ const padding = step.padding ?? this.config?.padding ?? 4;
780
+ const positionManager = new PositionManager();
781
+ const defaultPositions = [
782
+ ...positionManager.build("below-center"),
783
+ ...positionManager.build("above-center"),
784
+ ...positionManager.build("after-center"),
785
+ ...positionManager.build("before-center")
786
+ ].map((p) => ({
787
+ ...p,
788
+ ...this._getOffset(p, padding)
789
+ }));
790
+ const preferredPositions = step.position ? positionManager.build(step.position).map((p) => ({
791
+ ...p,
792
+ ...this._getOffset(p, padding)
793
+ })) : defaultPositions;
794
+ const positionStrategy = this.overlay.position().flexibleConnectedTo(this.elementRef).withPush(false).withPositions(preferredPositions);
795
+ this.overlayRef = this.overlay.create({
796
+ positionStrategy,
797
+ scrollStrategy: this.overlay.scrollStrategies.block(),
798
+ hasBackdrop: false,
799
+ panelClass: "ngs-tour-step-overlay"
800
+ });
801
+ if (step.withBackdrop) this.tourService.showBackdrop(rect, style.borderRadius, this.viewContainerRef, this.elementRef.nativeElement, padding, step.disableInteraction);
802
+ const componentType = this.customStepComponent || TourStep;
803
+ const portal = new ComponentPortal(componentType, this.viewContainerRef);
804
+ this.componentRef = this.overlayRef.attach(portal);
805
+ const safeSetInput = (name, value) => {
806
+ try {
807
+ this.componentRef?.setInput(name, value);
808
+ } catch (e) {}
809
+ };
810
+ if (positionStrategy instanceof FlexibleConnectedPositionStrategy) {
811
+ positionStrategy.positionChanges.subscribe((change) => {
812
+ safeSetInput("position", change.connectionPair);
813
+ });
814
+ this.overlayRef.updatePosition();
815
+ }
816
+ const steps = this.tourService.steps();
817
+ const index = this.tourService.currentStepIndex();
818
+ const isFirst = index === 0;
819
+ const isLast = index === steps.length - 1;
820
+ safeSetInput("step", step);
821
+ safeSetInput("isFirst", isFirst);
822
+ safeSetInput("isLast", isLast);
823
+ }, 0);
824
+ }
825
+ async hideStep() {
826
+ const overlayRef = this.overlayRef;
827
+ const componentRef = this.componentRef;
828
+ if (this.overlayRef === overlayRef) {
829
+ this.overlayRef = null;
830
+ this.componentRef = null;
831
+ }
832
+ if (overlayRef) {
833
+ const safeSetInput = (name, value) => {
834
+ try {
835
+ componentRef?.setInput(name, value);
836
+ } catch (e) {}
837
+ };
838
+ safeSetInput("animateEnterClass", false);
839
+ safeSetInput("animateLeaveClass", true);
840
+ await new Promise((resolve) => setTimeout(resolve, 200));
841
+ overlayRef.dispose();
842
+ }
843
+ }
844
+ _getOffset(position, padding) {
845
+ const offset = 8 + padding;
846
+ if (position.originY === "bottom" && position.overlayY === "top") return { offsetY: offset };
847
+ if (position.originY === "top" && position.overlayY === "bottom") return { offsetY: -offset };
848
+ if (position.originX === "end" && position.overlayX === "start") return { offsetX: offset };
849
+ if (position.originX === "start" && position.overlayX === "end") return { offsetX: -offset };
850
+ return {};
851
+ }
852
+ static ɵfac = i0.ɵɵngDeclareFactory({
853
+ minVersion: "12.0.0",
854
+ version: "22.3.0",
855
+ ngImport: i0,
856
+ type: TourAnchorDirective,
857
+ deps: [],
858
+ target: i0.ɵɵFactoryTarget.Directive
859
+ });
860
+ static ɵdir = i0.ɵɵngDeclareDirective({
861
+ minVersion: "17.1.0",
862
+ version: "22.3.0",
863
+ type: TourAnchorDirective,
864
+ isStandalone: true,
865
+ selector: "[ngsTourAnchor]",
866
+ inputs: { anchorId: {
867
+ classPropertyName: "anchorId",
868
+ publicName: "ngsTourAnchor",
869
+ isSignal: true,
870
+ isRequired: true,
871
+ transformFunction: null
872
+ } },
873
+ ngImport: i0
874
+ });
875
+ };
876
+ i0.ɵɵngDeclareClassMetadata({
877
+ minVersion: "12.0.0",
878
+ version: "22.3.0",
879
+ ngImport: i0,
880
+ type: TourAnchorDirective,
881
+ decorators: [{
882
+ type: Directive,
883
+ args: [{ selector: "[ngsTourAnchor]" }]
884
+ }],
885
+ propDecorators: { anchorId: [{
886
+ type: i0.Input,
887
+ args: [{
888
+ isSignal: true,
889
+ alias: "ngsTourAnchor",
890
+ required: true
891
+ }]
892
+ }] }
893
+ });
754
894
  export { TOUR_CONFIG, TOUR_STEP_COMPONENT, TourAnchorDirective, TourService, TourState, TourStep, provideTourConfig };
755
- //# sourceMappingURL=ngstarter-ui-components-guided-tour.mjs.map
895
+
896
+ //# sourceMappingURL=ngstarter-ui-components-guided-tour.mjs.map