@ngstarter-ui/components 1.0.21
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.
- package/README.md +0 -0
- package/fesm2022/ngstarter-ui-components-action-required.mjs +42 -0
- package/fesm2022/ngstarter-ui-components-action-required.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-alert.mjs +132 -0
- package/fesm2022/ngstarter-ui-components-alert.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-announcement.mjs +86 -0
- package/fesm2022/ngstarter-ui-components-announcement.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-autocomplete.mjs +360 -0
- package/fesm2022/ngstarter-ui-components-autocomplete.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-avatar.mjs +235 -0
- package/fesm2022/ngstarter-ui-components-avatar.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-badge.mjs +97 -0
- package/fesm2022/ngstarter-ui-components-badge.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-block-loader.mjs +48 -0
- package/fesm2022/ngstarter-ui-components-block-loader.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs +327 -0
- package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs +209 -0
- package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-button-toggle.mjs +175 -0
- package/fesm2022/ngstarter-ui-components-button-toggle.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-button.mjs +70 -0
- package/fesm2022/ngstarter-ui-components-button.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-card-overlay.mjs +49 -0
- package/fesm2022/ngstarter-ui-components-card-overlay.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-card.mjs +199 -0
- package/fesm2022/ngstarter-ui-components-card.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-carousel.mjs +614 -0
- package/fesm2022/ngstarter-ui-components-carousel.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-checkbox.mjs +300 -0
- package/fesm2022/ngstarter-ui-components-checkbox.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-chips.mjs +589 -0
- package/fesm2022/ngstarter-ui-components-chips.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-code-highlighter.mjs +347 -0
- package/fesm2022/ngstarter-ui-components-code-highlighter.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-color-picker.mjs +713 -0
- package/fesm2022/ngstarter-ui-components-color-picker.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-color-scheme.mjs +106 -0
- package/fesm2022/ngstarter-ui-components-color-scheme.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-color-switcher.mjs +72 -0
- package/fesm2022/ngstarter-ui-components-color-switcher.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-command-bar.mjs +57 -0
- package/fesm2022/ngstarter-ui-components-command-bar.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-comment-editor.mjs +1024 -0
- package/fesm2022/ngstarter-ui-components-comment-editor.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-comparison-slider.mjs +177 -0
- package/fesm2022/ngstarter-ui-components-comparison-slider.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-confirm.mjs +85 -0
- package/fesm2022/ngstarter-ui-components-confirm.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-Bk6QTli8.mjs +173 -0
- package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-Bk6QTli8.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-content-editor-content-editable.directive-Bvfa2dqh.mjs +124 -0
- package/fesm2022/ngstarter-ui-components-content-editor-content-editor-content-editable.directive-Bvfa2dqh.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs +99 -0
- package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-C_iRTCPH.mjs +33 -0
- package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-C_iRTCPH.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-embed-block-BbkC_t86.mjs +354 -0
- package/fesm2022/ngstarter-ui-components-content-editor-embed-block-BbkC_t86.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-D9_CxTY1.mjs +114 -0
- package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-D9_CxTY1.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-B4zJyUg1.mjs +146 -0
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-B4zJyUg1.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-Cv6wx5Xe.mjs +215 -0
- package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-Cv6wx5Xe.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-1Zi2nAX5.mjs +2548 -0
- package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-1Zi2nAX5.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-C9bQvDYU.mjs +110 -0
- package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-C9bQvDYU.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-BbHds2r2.mjs +141 -0
- package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-BbHds2r2.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-DlDh7Fnn.mjs +1604 -0
- package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-DlDh7Fnn.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-m4DTihP2.mjs +175 -0
- package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-m4DTihP2.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-editor.mjs +2 -0
- package/fesm2022/ngstarter-ui-components-content-editor.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-content-fade.mjs +35 -0
- package/fesm2022/ngstarter-ui-components-content-fade.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-cookie-popup.mjs +107 -0
- package/fesm2022/ngstarter-ui-components-cookie-popup.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-core.mjs +1330 -0
- package/fesm2022/ngstarter-ui-components-core.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-country-select.mjs +489 -0
- package/fesm2022/ngstarter-ui-components-country-select.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-crop.mjs +183 -0
- package/fesm2022/ngstarter-ui-components-crop.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-currency-select.mjs +397 -0
- package/fesm2022/ngstarter-ui-components-currency-select.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-data-view.mjs +1494 -0
- package/fesm2022/ngstarter-ui-components-data-view.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-date-format-select.mjs +154 -0
- package/fesm2022/ngstarter-ui-components-date-format-select.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-datepicker.mjs +1159 -0
- package/fesm2022/ngstarter-ui-components-datepicker.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-dialog.mjs +357 -0
- package/fesm2022/ngstarter-ui-components-dialog.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-divider.mjs +42 -0
- package/fesm2022/ngstarter-ui-components-divider.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-drawer.mjs +132 -0
- package/fesm2022/ngstarter-ui-components-drawer.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-emoji-picker.mjs +245 -0
- package/fesm2022/ngstarter-ui-components-emoji-picker.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-empty-state.mjs +75 -0
- package/fesm2022/ngstarter-ui-components-empty-state.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-expand.mjs +56 -0
- package/fesm2022/ngstarter-ui-components-expand.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-expansion.mjs +193 -0
- package/fesm2022/ngstarter-ui-components-expansion.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-filter-builder.mjs +333 -0
- package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-field.mjs +230 -0
- package/fesm2022/ngstarter-ui-components-form-field.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-autocomplete-many-field-BKQVlZHV.mjs +124 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-autocomplete-many-field-BKQVlZHV.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-checkbox-field-CoyKdvhV.mjs +22 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-checkbox-field-CoyKdvhV.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-datepicker-field-Bzc0TPO9.mjs +44 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-datepicker-field-Bzc0TPO9.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-divider-content-CwGzDCZv.mjs +17 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-divider-content-CwGzDCZv.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-image-content-ICTwkZPa.mjs +17 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-image-content-ICTwkZPa.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-input-field-RYxi-Mpw.mjs +35 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-input-field-RYxi-Mpw.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-radio-group-field-Cv3AGpoq.mjs +38 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-radio-group-field-Cv3AGpoq.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-select-field-eLcwI-BY.mjs +39 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-select-field-eLcwI-BY.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-text-content-BjzH_M3-.mjs +24 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-text-content-BjzH_M3-.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-textarea-field-4zH7FTQ1.mjs +37 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-textarea-field-4zH7FTQ1.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-timezone-field-BpH65Hd-.mjs +35 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-timezone-field-BpH65Hd-.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-toggle-field-iyqUrWxt.mjs +22 -0
- package/fesm2022/ngstarter-ui-components-form-renderer-toggle-field-iyqUrWxt.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-renderer.mjs +317 -0
- package/fesm2022/ngstarter-ui-components-form-renderer.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-gauge.mjs +44 -0
- package/fesm2022/ngstarter-ui-components-gauge.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-grid.mjs +78 -0
- package/fesm2022/ngstarter-ui-components-grid.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-guided-tour.mjs +736 -0
- package/fesm2022/ngstarter-ui-components-guided-tour.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-headless-stepper.mjs +192 -0
- package/fesm2022/ngstarter-ui-components-headless-stepper.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-icon.mjs +61 -0
- package/fesm2022/ngstarter-ui-components-icon.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-image-designer.mjs +4016 -0
- package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-image-placeholder.mjs +20 -0
- package/fesm2022/ngstarter-ui-components-image-placeholder.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-image-resizer.mjs +151 -0
- package/fesm2022/ngstarter-ui-components-image-resizer.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-image-viewer.mjs +349 -0
- package/fesm2022/ngstarter-ui-components-image-viewer.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs +162 -0
- package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-incidents.mjs +257 -0
- package/fesm2022/ngstarter-ui-components-incidents.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs +179 -0
- package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-input-mask.mjs +180 -0
- package/fesm2022/ngstarter-ui-components-input-mask.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-input-validator.mjs +24 -0
- package/fesm2022/ngstarter-ui-components-input-validator.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-input.mjs +152 -0
- package/fesm2022/ngstarter-ui-components-input.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-kanban-board.mjs +156 -0
- package/fesm2022/ngstarter-ui-components-kanban-board.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-kbd.mjs +31 -0
- package/fesm2022/ngstarter-ui-components-kbd.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-layout.mjs +199 -0
- package/fesm2022/ngstarter-ui-components-layout.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-list.mjs +279 -0
- package/fesm2022/ngstarter-ui-components-list.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-logo.mjs +51 -0
- package/fesm2022/ngstarter-ui-components-logo.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-marquee.mjs +76 -0
- package/fesm2022/ngstarter-ui-components-marquee.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-menu.mjs +851 -0
- package/fesm2022/ngstarter-ui-components-menu.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-micro-chart.mjs +928 -0
- package/fesm2022/ngstarter-ui-components-micro-chart.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-navigation.mjs +439 -0
- package/fesm2022/ngstarter-ui-components-navigation.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-notifications.mjs +181 -0
- package/fesm2022/ngstarter-ui-components-notifications.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-number-input.mjs +293 -0
- package/fesm2022/ngstarter-ui-components-number-input.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-option.mjs +157 -0
- package/fesm2022/ngstarter-ui-components-option.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-overlay.mjs +112 -0
- package/fesm2022/ngstarter-ui-components-overlay.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs +77 -0
- package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-paginator.mjs +297 -0
- package/fesm2022/ngstarter-ui-components-paginator.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-panel.mjs +123 -0
- package/fesm2022/ngstarter-ui-components-panel.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-password-strength.mjs +335 -0
- package/fesm2022/ngstarter-ui-components-password-strength.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-phone-input.mjs +651 -0
- package/fesm2022/ngstarter-ui-components-phone-input.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-pin-input.mjs +193 -0
- package/fesm2022/ngstarter-ui-components-pin-input.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-popover.mjs +302 -0
- package/fesm2022/ngstarter-ui-components-popover.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-progress-bar.mjs +68 -0
- package/fesm2022/ngstarter-ui-components-progress-bar.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-radio-card.mjs +102 -0
- package/fesm2022/ngstarter-ui-components-radio-card.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-radio.mjs +147 -0
- package/fesm2022/ngstarter-ui-components-radio.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-rail-nav.mjs +87 -0
- package/fesm2022/ngstarter-ui-components-rail-nav.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-resizable-container.mjs +74 -0
- package/fesm2022/ngstarter-ui-components-resizable-container.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-screen-loader.mjs +95 -0
- package/fesm2022/ngstarter-ui-components-screen-loader.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-scroll-spy.mjs +219 -0
- package/fesm2022/ngstarter-ui-components-scroll-spy.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs +459 -0
- package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-segmented.mjs +218 -0
- package/fesm2022/ngstarter-ui-components-segmented.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-select.mjs +496 -0
- package/fesm2022/ngstarter-ui-components-select.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-side-panel.mjs +107 -0
- package/fesm2022/ngstarter-ui-components-side-panel.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-sidebar.mjs +435 -0
- package/fesm2022/ngstarter-ui-components-sidebar.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-sidenav.mjs +354 -0
- package/fesm2022/ngstarter-ui-components-sidenav.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-signature-pad.mjs +452 -0
- package/fesm2022/ngstarter-ui-components-signature-pad.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-skeleton.mjs +22 -0
- package/fesm2022/ngstarter-ui-components-skeleton.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-slide-toggle.mjs +93 -0
- package/fesm2022/ngstarter-ui-components-slide-toggle.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-slider.mjs +481 -0
- package/fesm2022/ngstarter-ui-components-slider.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-snack-bar.mjs +354 -0
- package/fesm2022/ngstarter-ui-components-snack-bar.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-sort.mjs +140 -0
- package/fesm2022/ngstarter-ui-components-sort.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-spinner.mjs +75 -0
- package/fesm2022/ngstarter-ui-components-spinner.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-splash-screen.mjs +93 -0
- package/fesm2022/ngstarter-ui-components-splash-screen.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-split.mjs +948 -0
- package/fesm2022/ngstarter-ui-components-split.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-stepper.mjs +103 -0
- package/fesm2022/ngstarter-ui-components-stepper.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-suggestions.mjs +72 -0
- package/fesm2022/ngstarter-ui-components-suggestions.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-tab-panel.mjs +265 -0
- package/fesm2022/ngstarter-ui-components-tab-panel.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-table.mjs +648 -0
- package/fesm2022/ngstarter-ui-components-table.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-tabs.mjs +591 -0
- package/fesm2022/ngstarter-ui-components-tabs.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-text-editor.mjs +1012 -0
- package/fesm2022/ngstarter-ui-components-text-editor.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs +212 -0
- package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-tiles.mjs +634 -0
- package/fesm2022/ngstarter-ui-components-tiles.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-timeline.mjs +122 -0
- package/fesm2022/ngstarter-ui-components-timeline.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-timepicker.mjs +486 -0
- package/fesm2022/ngstarter-ui-components-timepicker.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-timezone-select.mjs +371 -0
- package/fesm2022/ngstarter-ui-components-timezone-select.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-toolbar.mjs +299 -0
- package/fesm2022/ngstarter-ui-components-toolbar.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-tooltip.mjs +506 -0
- package/fesm2022/ngstarter-ui-components-tooltip.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-tree.mjs +200 -0
- package/fesm2022/ngstarter-ui-components-tree.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-upload.mjs +330 -0
- package/fesm2022/ngstarter-ui-components-upload.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-video-player.mjs +516 -0
- package/fesm2022/ngstarter-ui-components-video-player.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-video-viewer.mjs +218 -0
- package/fesm2022/ngstarter-ui-components-video-viewer.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-visual-builder.mjs +18 -0
- package/fesm2022/ngstarter-ui-components-visual-builder.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components.mjs +6 -0
- package/fesm2022/ngstarter-ui-components.mjs.map +1 -0
- package/package.json +535 -0
- package/styles/_common.scss +456 -0
- package/styles/_global.scss +91 -0
- package/styles/themes/default.scss +2 -0
- package/types/ngstarter-ui-components-action-required.d.ts +14 -0
- package/types/ngstarter-ui-components-alert.d.ts +50 -0
- package/types/ngstarter-ui-components-announcement.d.ts +59 -0
- package/types/ngstarter-ui-components-autocomplete.d.ts +83 -0
- package/types/ngstarter-ui-components-avatar.d.ts +69 -0
- package/types/ngstarter-ui-components-badge.d.ts +38 -0
- package/types/ngstarter-ui-components-block-loader.d.ts +21 -0
- package/types/ngstarter-ui-components-bottom-sheet.d.ts +149 -0
- package/types/ngstarter-ui-components-breadcrumbs.d.ts +104 -0
- package/types/ngstarter-ui-components-button-toggle.d.ts +54 -0
- package/types/ngstarter-ui-components-button.d.ts +27 -0
- package/types/ngstarter-ui-components-card-overlay.d.ts +20 -0
- package/types/ngstarter-ui-components-card.d.ts +85 -0
- package/types/ngstarter-ui-components-carousel.d.ts +76 -0
- package/types/ngstarter-ui-components-checkbox.d.ts +94 -0
- package/types/ngstarter-ui-components-chips.d.ts +189 -0
- package/types/ngstarter-ui-components-code-highlighter.d.ts +28 -0
- package/types/ngstarter-ui-components-color-picker.d.ts +92 -0
- package/types/ngstarter-ui-components-color-scheme.d.ts +44 -0
- package/types/ngstarter-ui-components-color-switcher.d.ts +26 -0
- package/types/ngstarter-ui-components-command-bar.d.ts +28 -0
- package/types/ngstarter-ui-components-comment-editor.d.ts +194 -0
- package/types/ngstarter-ui-components-comparison-slider.d.ts +42 -0
- package/types/ngstarter-ui-components-confirm.d.ts +34 -0
- package/types/ngstarter-ui-components-content-editor.d.ts +321 -0
- package/types/ngstarter-ui-components-content-fade.d.ts +17 -0
- package/types/ngstarter-ui-components-cookie-popup.d.ts +41 -0
- package/types/ngstarter-ui-components-core.d.ts +421 -0
- package/types/ngstarter-ui-components-country-select.d.ts +78 -0
- package/types/ngstarter-ui-components-crop.d.ts +59 -0
- package/types/ngstarter-ui-components-currency-select.d.ts +82 -0
- package/types/ngstarter-ui-components-data-view.d.ts +391 -0
- package/types/ngstarter-ui-components-date-format-select.d.ts +59 -0
- package/types/ngstarter-ui-components-datepicker.d.ts +384 -0
- package/types/ngstarter-ui-components-dialog.d.ts +115 -0
- package/types/ngstarter-ui-components-divider.d.ts +18 -0
- package/types/ngstarter-ui-components-drawer.d.ts +32 -0
- package/types/ngstarter-ui-components-emoji-picker.d.ts +49 -0
- package/types/ngstarter-ui-components-empty-state.d.ts +33 -0
- package/types/ngstarter-ui-components-expand.d.ts +26 -0
- package/types/ngstarter-ui-components-expansion.d.ts +68 -0
- package/types/ngstarter-ui-components-filter-builder.d.ts +106 -0
- package/types/ngstarter-ui-components-form-field.d.ts +107 -0
- package/types/ngstarter-ui-components-form-renderer.d.ts +121 -0
- package/types/ngstarter-ui-components-gauge.d.ts +21 -0
- package/types/ngstarter-ui-components-grid.d.ts +45 -0
- package/types/ngstarter-ui-components-guided-tour.d.ts +227 -0
- package/types/ngstarter-ui-components-headless-stepper.d.ts +65 -0
- package/types/ngstarter-ui-components-icon.d.ts +17 -0
- package/types/ngstarter-ui-components-image-designer.d.ts +357 -0
- package/types/ngstarter-ui-components-image-placeholder.d.ts +8 -0
- package/types/ngstarter-ui-components-image-resizer.d.ts +35 -0
- package/types/ngstarter-ui-components-image-viewer.d.ts +63 -0
- package/types/ngstarter-ui-components-image-zoom-viewer.d.ts +34 -0
- package/types/ngstarter-ui-components-incidents.d.ts +119 -0
- package/types/ngstarter-ui-components-inline-text-edit.d.ts +39 -0
- package/types/ngstarter-ui-components-input-mask.d.ts +36 -0
- package/types/ngstarter-ui-components-input-validator.d.ts +5 -0
- package/types/ngstarter-ui-components-input.d.ts +53 -0
- package/types/ngstarter-ui-components-kanban-board.d.ts +68 -0
- package/types/ngstarter-ui-components-kbd.d.ts +13 -0
- package/types/ngstarter-ui-components-layout.d.ts +83 -0
- package/types/ngstarter-ui-components-list.d.ts +98 -0
- package/types/ngstarter-ui-components-logo.d.ts +26 -0
- package/types/ngstarter-ui-components-marquee.d.ts +27 -0
- package/types/ngstarter-ui-components-menu.d.ts +199 -0
- package/types/ngstarter-ui-components-micro-chart.d.ts +195 -0
- package/types/ngstarter-ui-components-navigation.d.ts +136 -0
- package/types/ngstarter-ui-components-notifications.d.ts +84 -0
- package/types/ngstarter-ui-components-number-input.d.ts +99 -0
- package/types/ngstarter-ui-components-option.d.ts +61 -0
- package/types/ngstarter-ui-components-overlay.d.ts +12 -0
- package/types/ngstarter-ui-components-page-loading-bar.d.ts +20 -0
- package/types/ngstarter-ui-components-paginator.d.ts +145 -0
- package/types/ngstarter-ui-components-panel.d.ts +59 -0
- package/types/ngstarter-ui-components-password-strength.d.ts +109 -0
- package/types/ngstarter-ui-components-phone-input.d.ts +103 -0
- package/types/ngstarter-ui-components-pin-input.d.ts +48 -0
- package/types/ngstarter-ui-components-popover.d.ts +94 -0
- package/types/ngstarter-ui-components-progress-bar.d.ts +30 -0
- package/types/ngstarter-ui-components-radio-card.d.ts +37 -0
- package/types/ngstarter-ui-components-radio.d.ts +45 -0
- package/types/ngstarter-ui-components-rail-nav.d.ts +36 -0
- package/types/ngstarter-ui-components-resizable-container.d.ts +25 -0
- package/types/ngstarter-ui-components-screen-loader.d.ts +34 -0
- package/types/ngstarter-ui-components-scroll-spy.d.ts +63 -0
- package/types/ngstarter-ui-components-scrollbar-area.d.ts +67 -0
- package/types/ngstarter-ui-components-segmented.d.ts +65 -0
- package/types/ngstarter-ui-components-select.d.ts +126 -0
- package/types/ngstarter-ui-components-side-panel.d.ts +42 -0
- package/types/ngstarter-ui-components-sidebar.d.ts +143 -0
- package/types/ngstarter-ui-components-sidenav.d.ts +86 -0
- package/types/ngstarter-ui-components-signature-pad.d.ts +49 -0
- package/types/ngstarter-ui-components-skeleton.d.ts +9 -0
- package/types/ngstarter-ui-components-slide-toggle.d.ts +41 -0
- package/types/ngstarter-ui-components-slider.d.ts +85 -0
- package/types/ngstarter-ui-components-snack-bar.d.ts +142 -0
- package/types/ngstarter-ui-components-sort.d.ts +66 -0
- package/types/ngstarter-ui-components-spinner.d.ts +28 -0
- package/types/ngstarter-ui-components-splash-screen.d.ts +31 -0
- package/types/ngstarter-ui-components-split.d.ts +210 -0
- package/types/ngstarter-ui-components-stepper.d.ts +44 -0
- package/types/ngstarter-ui-components-suggestions.d.ts +32 -0
- package/types/ngstarter-ui-components-tab-panel.d.ts +96 -0
- package/types/ngstarter-ui-components-table.d.ts +277 -0
- package/types/ngstarter-ui-components-tabs.d.ts +145 -0
- package/types/ngstarter-ui-components-text-editor.d.ts +191 -0
- package/types/ngstarter-ui-components-thumbnail-maker.d.ts +35 -0
- package/types/ngstarter-ui-components-tiles.d.ts +109 -0
- package/types/ngstarter-ui-components-timeline.d.ts +57 -0
- package/types/ngstarter-ui-components-timepicker.d.ts +115 -0
- package/types/ngstarter-ui-components-timezone-select.d.ts +75 -0
- package/types/ngstarter-ui-components-toolbar.d.ts +74 -0
- package/types/ngstarter-ui-components-tooltip.d.ts +52 -0
- package/types/ngstarter-ui-components-tree.d.ts +60 -0
- package/types/ngstarter-ui-components-upload.d.ts +134 -0
- package/types/ngstarter-ui-components-video-player.d.ts +67 -0
- package/types/ngstarter-ui-components-video-viewer.d.ts +98 -0
- package/types/ngstarter-ui-components-visual-builder.d.ts +8 -0
- package/types/ngstarter-ui-components.d.ts +2 -0
|
@@ -0,0 +1,736 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, ElementRef, output, input, signal, computed, HostListener, Component, ChangeDetectionStrategy, 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');
|
|
13
|
+
function provideTourConfig(config) {
|
|
14
|
+
return {
|
|
15
|
+
provide: TOUR_CONFIG,
|
|
16
|
+
useValue: config
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
var TourState;
|
|
20
|
+
(function (TourState) {
|
|
21
|
+
TourState[TourState["OFF"] = 0] = "OFF";
|
|
22
|
+
TourState[TourState["ON"] = 1] = "ON";
|
|
23
|
+
TourState[TourState["PAUSED"] = 2] = "PAUSED";
|
|
24
|
+
})(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, ...(ngDevMode ? [{ debugName: "animateEnterClass" }] : /* istanbul ignore next */ []));
|
|
31
|
+
animateLeaveClass = input(false, ...(ngDevMode ? [{ debugName: "animateLeaveClass" }] : /* istanbul ignore next */ []));
|
|
32
|
+
rect = signal({ top: 0, left: 0, width: 0, height: 0 }, ...(ngDevMode ? [{ debugName: "rect" }] : /* istanbul ignore next */ []));
|
|
33
|
+
rx = signal(0, ...(ngDevMode ? [{ debugName: "rx" }] : /* istanbul ignore next */ []));
|
|
34
|
+
padding = signal(0, ...(ngDevMode ? [{ debugName: "padding" }] : /* istanbul ignore next */ []));
|
|
35
|
+
disableInteraction = signal(false, ...(ngDevMode ? [{ debugName: "disableInteraction" }] : /* istanbul ignore next */ []));
|
|
36
|
+
viewBox = signal(`0 0 ${window.innerWidth || 1000} ${window.innerHeight || 1000}`, ...(ngDevMode ? [{ debugName: "viewBox" }] : /* istanbul ignore next */ []));
|
|
37
|
+
isInitial = signal(true, ...(ngDevMode ? [{ debugName: "isInitial" }] : /* istanbul ignore next */ []));
|
|
38
|
+
backdropPath = computed(() => {
|
|
39
|
+
const { top, left, width, height } = this.rect();
|
|
40
|
+
const p = this.padding();
|
|
41
|
+
const radius = this.rx();
|
|
42
|
+
const w = window.innerWidth;
|
|
43
|
+
const h = window.innerHeight;
|
|
44
|
+
const rectTop = top - p;
|
|
45
|
+
const rectLeft = left - p;
|
|
46
|
+
const rectWidth = width + 2 * p;
|
|
47
|
+
const rectHeight = height + 2 * p;
|
|
48
|
+
// Outer rectangle (entire screen)
|
|
49
|
+
const screenPath = `M0,0 H${w} V${h} H0 Z`;
|
|
50
|
+
// Hole (inner contour)
|
|
51
|
+
const holePath = `
|
|
52
|
+
M${rectLeft + radius},${rectTop}
|
|
53
|
+
L${rectLeft + rectWidth - radius},${rectTop}
|
|
54
|
+
A${radius},${radius} 0 0 1 ${rectLeft + rectWidth},${rectTop + radius}
|
|
55
|
+
L${rectLeft + rectWidth},${rectTop + rectHeight - radius}
|
|
56
|
+
A${radius},${radius} 0 0 1 ${rectLeft + rectWidth - radius},${rectTop + rectHeight}
|
|
57
|
+
L${rectLeft + radius},${rectTop + rectHeight}
|
|
58
|
+
A${radius},${radius} 0 0 1 ${rectLeft},${rectTop + rectHeight - radius}
|
|
59
|
+
L${rectLeft},${rectTop + radius}
|
|
60
|
+
A${radius},${radius} 0 0 1 ${rectLeft + radius},${rectTop}
|
|
61
|
+
Z
|
|
62
|
+
`.replace(/\s+/g, ' ');
|
|
63
|
+
return `${screenPath} ${holePath}`;
|
|
64
|
+
}, ...(ngDevMode ? [{ debugName: "backdropPath" }] : /* istanbul ignore next */ []));
|
|
65
|
+
constructor() {
|
|
66
|
+
this.updateViewBox();
|
|
67
|
+
}
|
|
68
|
+
onResize() {
|
|
69
|
+
this.updatePositionFromAnchor();
|
|
70
|
+
this.updateViewBox();
|
|
71
|
+
}
|
|
72
|
+
anchorElement = null;
|
|
73
|
+
updatePosition(rect, borderRadius, anchorElement, padding = 0, disableInteraction = false) {
|
|
74
|
+
if (anchorElement) {
|
|
75
|
+
this.anchorElement = anchorElement;
|
|
76
|
+
}
|
|
77
|
+
const isInitial = this.isInitial();
|
|
78
|
+
this.rect.set({
|
|
79
|
+
top: rect.top,
|
|
80
|
+
left: rect.left,
|
|
81
|
+
width: rect.width,
|
|
82
|
+
height: rect.height
|
|
83
|
+
});
|
|
84
|
+
const radius = parseInt(borderRadius, 10) || 0;
|
|
85
|
+
this.rx.set(radius);
|
|
86
|
+
this.padding.set(padding);
|
|
87
|
+
this.disableInteraction.set(disableInteraction);
|
|
88
|
+
this.updateViewBox();
|
|
89
|
+
if (isInitial) {
|
|
90
|
+
setTimeout(() => {
|
|
91
|
+
this.isInitial.set(false);
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
updatePositionFromAnchor() {
|
|
96
|
+
if (this.anchorElement) {
|
|
97
|
+
const rect = this.anchorElement.getBoundingClientRect();
|
|
98
|
+
this.rect.set({
|
|
99
|
+
top: rect.top,
|
|
100
|
+
left: rect.left,
|
|
101
|
+
width: rect.width,
|
|
102
|
+
height: rect.height
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
updateViewBox() {
|
|
107
|
+
const w = window.innerWidth || 1000;
|
|
108
|
+
const h = window.innerHeight || 1000;
|
|
109
|
+
this.viewBox.set(`0 0 ${w} ${h}`);
|
|
110
|
+
}
|
|
111
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: TourBackdrop, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
112
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.4", 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\"" } }, 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(--overlay-backdrop-bg);pointer-events:auto;cursor:default}:host rect{fill:transparent;stroke:var(--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.2.2 | MIT License | https://tailwindcss.com */\n"] });
|
|
113
|
+
}
|
|
114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: TourBackdrop, decorators: [{
|
|
115
|
+
type: Component,
|
|
116
|
+
args: [{ selector: 'ngs-tour-backdrop', standalone: true, host: {
|
|
117
|
+
'[class.is-initial]': 'isInitial()',
|
|
118
|
+
'[class.animate-enter]': 'animateEnterClass()',
|
|
119
|
+
'[class.animate-leave]': 'animateLeaveClass()',
|
|
120
|
+
'[style.pointer-events]': '"none"',
|
|
121
|
+
}, 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(--overlay-backdrop-bg);pointer-events:auto;cursor:default}:host rect{fill:transparent;stroke:var(--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.2.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
122
|
+
}], 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: [{
|
|
123
|
+
type: HostListener,
|
|
124
|
+
args: ['window:resize']
|
|
125
|
+
}, {
|
|
126
|
+
type: HostListener,
|
|
127
|
+
args: ['window:scroll']
|
|
128
|
+
}] } });
|
|
129
|
+
|
|
130
|
+
class TourStep {
|
|
131
|
+
tourService = inject(TourService);
|
|
132
|
+
_sanitizer = inject(DomSanitizer);
|
|
133
|
+
step = input.required(...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
|
|
134
|
+
isFirst = input(false, ...(ngDevMode ? [{ debugName: "isFirst" }] : /* istanbul ignore next */ []));
|
|
135
|
+
isLast = input(false, ...(ngDevMode ? [{ debugName: "isLast" }] : /* istanbul ignore next */ []));
|
|
136
|
+
position = input(null, ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
137
|
+
animateEnterClass = input(true, ...(ngDevMode ? [{ debugName: "animateEnterClass" }] : /* istanbul ignore next */ []));
|
|
138
|
+
animateLeaveClass = input(false, ...(ngDevMode ? [{ debugName: "animateLeaveClass" }] : /* istanbul ignore next */ []));
|
|
139
|
+
config = inject(TOUR_CONFIG, { optional: true });
|
|
140
|
+
htmlContent = computed(() => {
|
|
141
|
+
const html = this.step().htmlContent;
|
|
142
|
+
return html ? this._sanitizer.bypassSecurityTrustHtml(html) : null;
|
|
143
|
+
}, ...(ngDevMode ? [{ debugName: "htmlContent" }] : /* istanbul ignore next */ []));
|
|
144
|
+
getArrowClasses(pos) {
|
|
145
|
+
if (!pos) {
|
|
146
|
+
return 'hidden';
|
|
147
|
+
}
|
|
148
|
+
const classes = [];
|
|
149
|
+
// Vertical position of the arrow on the step
|
|
150
|
+
if (pos.overlayY === 'top' && pos.originY === 'bottom') {
|
|
151
|
+
classes.push('pos-top'); // Arrow on the top edge of the step
|
|
152
|
+
}
|
|
153
|
+
else if (pos.overlayY === 'bottom' && pos.originY === 'top') {
|
|
154
|
+
classes.push('pos-bottom'); // Arrow on the bottom edge of the step
|
|
155
|
+
}
|
|
156
|
+
else if (pos.overlayX === 'start' && pos.originX === 'end') {
|
|
157
|
+
// Step is to the right of the element (AFTER)
|
|
158
|
+
classes.push('pos-left');
|
|
159
|
+
}
|
|
160
|
+
else if (pos.overlayX === 'end' && pos.originX === 'start') {
|
|
161
|
+
// Step is to the left of the element (BEFORE)
|
|
162
|
+
classes.push('pos-right');
|
|
163
|
+
}
|
|
164
|
+
// Alignment of the arrow on the chosen edge
|
|
165
|
+
if (classes.includes('pos-top') || classes.includes('pos-bottom')) {
|
|
166
|
+
if (pos.overlayX === 'center') {
|
|
167
|
+
classes.push('align-center');
|
|
168
|
+
}
|
|
169
|
+
else if (pos.overlayX === 'start') {
|
|
170
|
+
classes.push('align-start');
|
|
171
|
+
}
|
|
172
|
+
else if (pos.overlayX === 'end') {
|
|
173
|
+
classes.push('align-end');
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
else if (classes.includes('pos-left') || classes.includes('pos-right')) {
|
|
177
|
+
if (pos.overlayY === 'center') {
|
|
178
|
+
classes.push('align-center');
|
|
179
|
+
}
|
|
180
|
+
else if (pos.overlayY === 'top') {
|
|
181
|
+
classes.push('align-start');
|
|
182
|
+
}
|
|
183
|
+
else if (pos.overlayY === 'bottom') {
|
|
184
|
+
classes.push('align-end');
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return classes.join(' ');
|
|
188
|
+
}
|
|
189
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: TourStep, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
190
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", 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" }, 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(--color-surface-container-lowest);--ngs-guided-tour-step-border: 1px solid var(--color-subtle);--ngs-guided-tour-arrow-border-color: var(--color-subtle);display:block;z-index:1200;position:relative;background:var(--ngs-guided-tour-step-bg);border-radius:var(--ngs-guided-tour-step-radius, 1rem);box-shadow:var(--ngs-guided-tour-step-shadow, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));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.2.2 | 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 });
|
|
191
|
+
}
|
|
192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: TourStep, decorators: [{
|
|
193
|
+
type: Component,
|
|
194
|
+
args: [{ selector: 'ngs-tour-step', standalone: true, imports: [
|
|
195
|
+
NgTemplateOutlet,
|
|
196
|
+
NgClass,
|
|
197
|
+
CommonModule,
|
|
198
|
+
Button
|
|
199
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
200
|
+
'class': 'ngs-tour-step not-prose',
|
|
201
|
+
'[class.animate-enter]': 'animateEnterClass()',
|
|
202
|
+
'[class.animate-leave]': 'animateLeaveClass()',
|
|
203
|
+
}, 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(--color-surface-container-lowest);--ngs-guided-tour-step-border: 1px solid var(--color-subtle);--ngs-guided-tour-arrow-border-color: var(--color-subtle);display:block;z-index:1200;position:relative;background:var(--ngs-guided-tour-step-bg);border-radius:var(--ngs-guided-tour-step-radius, 1rem);box-shadow:var(--ngs-guided-tour-step-shadow, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));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.2.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
204
|
+
}], 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 }] }] } });
|
|
205
|
+
|
|
206
|
+
class TourService {
|
|
207
|
+
overlay = inject(Overlay);
|
|
208
|
+
config = inject(TOUR_CONFIG, { optional: true });
|
|
209
|
+
document = inject(DOCUMENT);
|
|
210
|
+
router = inject(Router);
|
|
211
|
+
backdropOverlayRef = null;
|
|
212
|
+
backdropComponentRef = null;
|
|
213
|
+
_steps = signal([], ...(ngDevMode ? [{ debugName: "_steps" }] : /* istanbul ignore next */ []));
|
|
214
|
+
_currentStepIndex = signal(-1, ...(ngDevMode ? [{ debugName: "_currentStepIndex" }] : /* istanbul ignore next */ []));
|
|
215
|
+
_state = signal(TourState.OFF, ...(ngDevMode ? [{ debugName: "_state" }] : /* istanbul ignore next */ []));
|
|
216
|
+
_anchors = new Map();
|
|
217
|
+
stepOverlayRef = null;
|
|
218
|
+
stepComponentRef = null;
|
|
219
|
+
customStepComponent = inject(TOUR_STEP_COMPONENT, { optional: true });
|
|
220
|
+
constructor() {
|
|
221
|
+
this.document.addEventListener('keydown', this.handleKeyDown);
|
|
222
|
+
}
|
|
223
|
+
ngOnDestroy() {
|
|
224
|
+
this.document.removeEventListener('keydown', this.handleKeyDown);
|
|
225
|
+
}
|
|
226
|
+
handleKeyDown = (event) => {
|
|
227
|
+
if (this.state() !== TourState.ON || this.config?.keyboardNavigation === false) {
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
switch (event.key) {
|
|
231
|
+
case 'ArrowRight':
|
|
232
|
+
void this.next();
|
|
233
|
+
break;
|
|
234
|
+
case 'ArrowLeft':
|
|
235
|
+
void this.prev();
|
|
236
|
+
break;
|
|
237
|
+
case 'Escape':
|
|
238
|
+
void this.end();
|
|
239
|
+
break;
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
steps = this._steps.asReadonly();
|
|
243
|
+
currentStepIndex = this._currentStepIndex.asReadonly();
|
|
244
|
+
state = this._state.asReadonly();
|
|
245
|
+
currentStep = computed(() => {
|
|
246
|
+
const index = this._currentStepIndex();
|
|
247
|
+
const steps = this._steps();
|
|
248
|
+
return index >= 0 && index < steps.length ? steps[index] : null;
|
|
249
|
+
}, ...(ngDevMode ? [{ debugName: "currentStep" }] : /* istanbul ignore next */ []));
|
|
250
|
+
stepShow$ = new Subject();
|
|
251
|
+
stepHide$ = new Subject();
|
|
252
|
+
start$ = new Subject();
|
|
253
|
+
end$ = new Subject();
|
|
254
|
+
registerAnchor(id, anchor) {
|
|
255
|
+
this._anchors.set(id, anchor);
|
|
256
|
+
}
|
|
257
|
+
unregisterAnchor(id) {
|
|
258
|
+
this._anchors.delete(id);
|
|
259
|
+
}
|
|
260
|
+
start(steps) {
|
|
261
|
+
this._steps.set(steps);
|
|
262
|
+
this._state.set(TourState.ON);
|
|
263
|
+
this.start$.next();
|
|
264
|
+
void this.goToStep(0);
|
|
265
|
+
}
|
|
266
|
+
async end() {
|
|
267
|
+
const currentStep = this.currentStep();
|
|
268
|
+
if (currentStep) {
|
|
269
|
+
if (currentStep.onHide) {
|
|
270
|
+
await currentStep.onHide();
|
|
271
|
+
}
|
|
272
|
+
this.stepHide$.next(currentStep);
|
|
273
|
+
// Start hiding step and backdrop in parallel
|
|
274
|
+
const hideStepPromise = this._hideStep(currentStep);
|
|
275
|
+
const hideBackdropPromise = this.hideBackdrop(true);
|
|
276
|
+
await Promise.all([hideStepPromise, hideBackdropPromise]);
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
await this.hideBackdrop(true);
|
|
280
|
+
}
|
|
281
|
+
this._state.set(TourState.OFF);
|
|
282
|
+
this._currentStepIndex.set(-1);
|
|
283
|
+
this._steps.set([]);
|
|
284
|
+
this.end$.next();
|
|
285
|
+
}
|
|
286
|
+
async next() {
|
|
287
|
+
const currentStep = this.currentStep();
|
|
288
|
+
if (currentStep?.onNext) {
|
|
289
|
+
await currentStep.onNext();
|
|
290
|
+
}
|
|
291
|
+
if (this._currentStepIndex() < this._steps().length - 1) {
|
|
292
|
+
await this.goToStep(this._currentStepIndex() + 1);
|
|
293
|
+
}
|
|
294
|
+
else {
|
|
295
|
+
await this.end();
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
async prev() {
|
|
299
|
+
const currentStep = this.currentStep();
|
|
300
|
+
if (currentStep?.onPrev) {
|
|
301
|
+
await currentStep.onPrev();
|
|
302
|
+
}
|
|
303
|
+
if (this._currentStepIndex() > 0) {
|
|
304
|
+
await this.goToStep(this._currentStepIndex() - 1);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
async goToStep(index) {
|
|
308
|
+
const currentStep = this.currentStep();
|
|
309
|
+
const nextStep = this._steps()[index];
|
|
310
|
+
if (currentStep) {
|
|
311
|
+
if (currentStep.onHide) {
|
|
312
|
+
await currentStep.onHide();
|
|
313
|
+
}
|
|
314
|
+
this.stepHide$.next(currentStep);
|
|
315
|
+
await this._hideStep(currentStep);
|
|
316
|
+
}
|
|
317
|
+
if (currentStep?.withBackdrop && !nextStep?.withBackdrop) {
|
|
318
|
+
this.hideBackdrop(false);
|
|
319
|
+
}
|
|
320
|
+
if (nextStep?.route) {
|
|
321
|
+
const currentUrl = this.router.url;
|
|
322
|
+
const targetUrl = nextStep.route;
|
|
323
|
+
// Compare only path without params and fragment if needed,
|
|
324
|
+
// but usually Router.url returns full path.
|
|
325
|
+
// If URL differs, perform transition.
|
|
326
|
+
if (currentUrl !== targetUrl) {
|
|
327
|
+
await this.router.navigateByUrl(targetUrl);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
if (nextStep?.onShow) {
|
|
331
|
+
await nextStep.onShow();
|
|
332
|
+
}
|
|
333
|
+
if (nextStep?.waitFor) {
|
|
334
|
+
try {
|
|
335
|
+
await this.waitForElement(nextStep.waitFor);
|
|
336
|
+
}
|
|
337
|
+
catch (e) {
|
|
338
|
+
console.warn(`TourService: Element "${nextStep.waitFor}" not found after timeout.`);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
this._currentStepIndex.set(index);
|
|
342
|
+
if (nextStep) {
|
|
343
|
+
this.stepShow$.next(nextStep);
|
|
344
|
+
this._showStep(nextStep);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
waitForElement(selector, timeout = 3000) {
|
|
348
|
+
return new Promise((resolve, reject) => {
|
|
349
|
+
const element = document.querySelector(selector);
|
|
350
|
+
if (element) {
|
|
351
|
+
return resolve(element);
|
|
352
|
+
}
|
|
353
|
+
const observer = new MutationObserver(() => {
|
|
354
|
+
const element = document.querySelector(selector);
|
|
355
|
+
if (element) {
|
|
356
|
+
observer.disconnect();
|
|
357
|
+
clearTimeout(timer);
|
|
358
|
+
resolve(element);
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
observer.observe(document.body, {
|
|
362
|
+
childList: true,
|
|
363
|
+
subtree: true
|
|
364
|
+
});
|
|
365
|
+
const timer = setTimeout(() => {
|
|
366
|
+
observer.disconnect();
|
|
367
|
+
reject(new Error(`Timeout waiting for element: ${selector}`));
|
|
368
|
+
}, timeout);
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
showBackdrop(rect, borderRadius, viewContainerRef, anchorElement, padding = 0, disableInteraction = false) {
|
|
372
|
+
if (!this.backdropOverlayRef) {
|
|
373
|
+
this.backdropOverlayRef = this.overlay.create({
|
|
374
|
+
positionStrategy: this.overlay.position().global(),
|
|
375
|
+
scrollStrategy: this.overlay.scrollStrategies.block(),
|
|
376
|
+
hasBackdrop: false
|
|
377
|
+
});
|
|
378
|
+
const portal = new ComponentPortal(TourBackdrop, viewContainerRef);
|
|
379
|
+
this.backdropComponentRef = this.backdropOverlayRef.attach(portal);
|
|
380
|
+
this.backdropComponentRef.instance.backdropClick.subscribe(() => {
|
|
381
|
+
const step = this.currentStep();
|
|
382
|
+
const closeOnBackdropClick = step?.closeOnBackdropClick ?? this.config?.closeOnBackdropClick ?? false;
|
|
383
|
+
if (closeOnBackdropClick) {
|
|
384
|
+
this.end();
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
this.backdropComponentRef?.instance.updatePosition(rect, borderRadius, anchorElement, padding, disableInteraction);
|
|
389
|
+
}
|
|
390
|
+
async hideBackdrop(animate) {
|
|
391
|
+
const overlayRef = this.backdropOverlayRef;
|
|
392
|
+
const componentRef = this.backdropComponentRef;
|
|
393
|
+
if (!overlayRef) {
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
if (this.backdropOverlayRef === overlayRef) {
|
|
397
|
+
this.backdropOverlayRef = null;
|
|
398
|
+
this.backdropComponentRef = null;
|
|
399
|
+
}
|
|
400
|
+
if (animate) {
|
|
401
|
+
if (componentRef) {
|
|
402
|
+
const safeSetInput = (name, value) => {
|
|
403
|
+
try {
|
|
404
|
+
componentRef.setInput(name, value);
|
|
405
|
+
}
|
|
406
|
+
catch (e) {
|
|
407
|
+
// Ignore if input is not declared
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
safeSetInput('animateEnterClass', false);
|
|
411
|
+
safeSetInput('animateLeaveClass', true);
|
|
412
|
+
}
|
|
413
|
+
return new Promise(resolve => {
|
|
414
|
+
setTimeout(() => {
|
|
415
|
+
overlayRef.dispose();
|
|
416
|
+
resolve();
|
|
417
|
+
}, 150);
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
else {
|
|
421
|
+
overlayRef.dispose();
|
|
422
|
+
return Promise.resolve();
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
_showStep(step) {
|
|
426
|
+
const anchorId = typeof step.anchorId === 'function' ? step.anchorId() : step.anchorId;
|
|
427
|
+
let anchorElement = null;
|
|
428
|
+
let anchorDirective = null;
|
|
429
|
+
if (typeof anchorId === 'string') {
|
|
430
|
+
anchorDirective = this._anchors.get(anchorId);
|
|
431
|
+
if (anchorDirective) {
|
|
432
|
+
anchorDirective.showStep(step);
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
anchorElement = document.querySelector(anchorId);
|
|
436
|
+
if (!anchorElement) {
|
|
437
|
+
anchorElement = document.getElementById(anchorId);
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
else if (anchorId instanceof HTMLElement) {
|
|
441
|
+
anchorElement = anchorId;
|
|
442
|
+
}
|
|
443
|
+
if (anchorElement) {
|
|
444
|
+
this.showStepForElement(anchorElement, step);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
showStepForElement(element, step) {
|
|
448
|
+
if (this.stepOverlayRef) {
|
|
449
|
+
const oldOverlayRef = this.stepOverlayRef;
|
|
450
|
+
const oldComponentRef = this.stepComponentRef;
|
|
451
|
+
this.stepOverlayRef = null;
|
|
452
|
+
this.stepComponentRef = null;
|
|
453
|
+
oldOverlayRef.dispose();
|
|
454
|
+
}
|
|
455
|
+
const rect = element.getBoundingClientRect();
|
|
456
|
+
const isVisible = (rect.top >= 0 &&
|
|
457
|
+
rect.left >= 0 &&
|
|
458
|
+
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
|
|
459
|
+
rect.right <= (window.innerWidth || document.documentElement.clientWidth));
|
|
460
|
+
if (!isVisible) {
|
|
461
|
+
element.scrollIntoView({
|
|
462
|
+
behavior: 'instant',
|
|
463
|
+
block: 'center',
|
|
464
|
+
inline: 'nearest'
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
setTimeout(() => {
|
|
468
|
+
if (this.state() === TourState.OFF) {
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
471
|
+
const rect = element.getBoundingClientRect();
|
|
472
|
+
const style = window.getComputedStyle(element);
|
|
473
|
+
const padding = step.padding ?? this.config?.padding ?? 4;
|
|
474
|
+
let positionStrategy;
|
|
475
|
+
const positionManager = new PositionManager();
|
|
476
|
+
const defaultPositions = [
|
|
477
|
+
...positionManager.build('below-center'),
|
|
478
|
+
...positionManager.build('above-center'),
|
|
479
|
+
...positionManager.build('after-center'),
|
|
480
|
+
...positionManager.build('before-center'),
|
|
481
|
+
].map(p => ({ ...p, ...this._getOffset(p, padding) }));
|
|
482
|
+
const preferredPositions = step.position
|
|
483
|
+
? positionManager.build(step.position).map(p => ({ ...p, ...this._getOffset(p, padding) }))
|
|
484
|
+
: defaultPositions;
|
|
485
|
+
positionStrategy = this.overlay
|
|
486
|
+
.position()
|
|
487
|
+
.flexibleConnectedTo(element)
|
|
488
|
+
.withPush(false)
|
|
489
|
+
.withPositions(preferredPositions);
|
|
490
|
+
this.stepOverlayRef = this.overlay.create({
|
|
491
|
+
positionStrategy,
|
|
492
|
+
scrollStrategy: this.overlay.scrollStrategies.block(),
|
|
493
|
+
hasBackdrop: false,
|
|
494
|
+
panelClass: 'ngs-tour-step-overlay'
|
|
495
|
+
});
|
|
496
|
+
if (step.withBackdrop) {
|
|
497
|
+
this.showBackdrop(rect, style.borderRadius, undefined, element, padding, step.disableInteraction);
|
|
498
|
+
}
|
|
499
|
+
const componentType = this.customStepComponent || TourStep;
|
|
500
|
+
const portal = new ComponentPortal(componentType);
|
|
501
|
+
this.stepComponentRef = this.stepOverlayRef.attach(portal);
|
|
502
|
+
const safeSetInput = (name, value) => {
|
|
503
|
+
try {
|
|
504
|
+
this.stepComponentRef?.setInput(name, value);
|
|
505
|
+
}
|
|
506
|
+
catch (e) {
|
|
507
|
+
// Ignore if input is not declared
|
|
508
|
+
}
|
|
509
|
+
};
|
|
510
|
+
if (positionStrategy instanceof FlexibleConnectedPositionStrategy) {
|
|
511
|
+
positionStrategy.positionChanges.subscribe((change) => {
|
|
512
|
+
safeSetInput('position', change.connectionPair);
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
const steps = this.steps();
|
|
516
|
+
const index = this.currentStepIndex();
|
|
517
|
+
const isFirst = index === 0;
|
|
518
|
+
const isLast = index === steps.length - 1;
|
|
519
|
+
safeSetInput('step', step);
|
|
520
|
+
safeSetInput('isFirst', isFirst);
|
|
521
|
+
safeSetInput('isLast', isLast);
|
|
522
|
+
if (positionStrategy instanceof FlexibleConnectedPositionStrategy) {
|
|
523
|
+
this.stepOverlayRef.updatePosition();
|
|
524
|
+
}
|
|
525
|
+
}, 0);
|
|
526
|
+
}
|
|
527
|
+
_getOffset(position, padding) {
|
|
528
|
+
const offset = 8 + padding;
|
|
529
|
+
if (position.originY === 'bottom' && position.overlayY === 'top') {
|
|
530
|
+
return { offsetY: offset };
|
|
531
|
+
}
|
|
532
|
+
if (position.originY === 'top' && position.overlayY === 'bottom') {
|
|
533
|
+
return { offsetY: -offset };
|
|
534
|
+
}
|
|
535
|
+
if (position.originX === 'end' && position.overlayX === 'start') {
|
|
536
|
+
return { offsetX: offset };
|
|
537
|
+
}
|
|
538
|
+
if (position.originX === 'start' && position.overlayX === 'end') {
|
|
539
|
+
return { offsetX: -offset };
|
|
540
|
+
}
|
|
541
|
+
return {};
|
|
542
|
+
}
|
|
543
|
+
async _hideStep(step) {
|
|
544
|
+
const anchorId = typeof step.anchorId === 'function' ? step.anchorId() : step.anchorId;
|
|
545
|
+
if (typeof anchorId === 'string') {
|
|
546
|
+
const anchor = this._anchors.get(anchorId);
|
|
547
|
+
if (anchor) {
|
|
548
|
+
await anchor.hideStep();
|
|
549
|
+
return;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
const overlayRef = this.stepOverlayRef;
|
|
553
|
+
const componentRef = this.stepComponentRef;
|
|
554
|
+
if (overlayRef) {
|
|
555
|
+
if (this.stepOverlayRef === overlayRef) {
|
|
556
|
+
this.stepOverlayRef = null;
|
|
557
|
+
this.stepComponentRef = null;
|
|
558
|
+
}
|
|
559
|
+
const safeSetInput = (name, value) => {
|
|
560
|
+
try {
|
|
561
|
+
componentRef?.setInput(name, value);
|
|
562
|
+
}
|
|
563
|
+
catch (e) {
|
|
564
|
+
// Ignore if input is not declared
|
|
565
|
+
}
|
|
566
|
+
};
|
|
567
|
+
safeSetInput('animateEnterClass', false);
|
|
568
|
+
safeSetInput('animateLeaveClass', true);
|
|
569
|
+
await new Promise(resolve => setTimeout(resolve, 150));
|
|
570
|
+
overlayRef.dispose();
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: TourService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
574
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: TourService, providedIn: 'root' });
|
|
575
|
+
}
|
|
576
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: TourService, decorators: [{
|
|
577
|
+
type: Injectable,
|
|
578
|
+
args: [{
|
|
579
|
+
providedIn: 'root'
|
|
580
|
+
}]
|
|
581
|
+
}], ctorParameters: () => [] });
|
|
582
|
+
|
|
583
|
+
class TourAnchorDirective {
|
|
584
|
+
anchorId = input.required({ ...(ngDevMode ? { debugName: "anchorId" } : /* istanbul ignore next */ {}), alias: 'ngsTourAnchor' });
|
|
585
|
+
elementRef = inject(ElementRef);
|
|
586
|
+
tourService = inject(TourService);
|
|
587
|
+
overlay = inject(Overlay);
|
|
588
|
+
viewContainerRef = inject(ViewContainerRef);
|
|
589
|
+
customStepComponent = inject(TOUR_STEP_COMPONENT, { optional: true });
|
|
590
|
+
config = inject(TOUR_CONFIG, { optional: true });
|
|
591
|
+
overlayRef = null;
|
|
592
|
+
componentRef = null;
|
|
593
|
+
ngOnInit() {
|
|
594
|
+
this.tourService.registerAnchor(this.anchorId(), this);
|
|
595
|
+
}
|
|
596
|
+
ngOnDestroy() {
|
|
597
|
+
this.tourService.unregisterAnchor(this.anchorId());
|
|
598
|
+
this.hideStep();
|
|
599
|
+
}
|
|
600
|
+
showStep(step) {
|
|
601
|
+
const currentOverlayRef = this.overlayRef;
|
|
602
|
+
const currentComponentRef = this.componentRef;
|
|
603
|
+
if (this.overlayRef === currentOverlayRef) {
|
|
604
|
+
this.overlayRef = null;
|
|
605
|
+
this.componentRef = null;
|
|
606
|
+
}
|
|
607
|
+
if (currentOverlayRef) {
|
|
608
|
+
currentOverlayRef.dispose();
|
|
609
|
+
}
|
|
610
|
+
const rect = this.elementRef.nativeElement.getBoundingClientRect();
|
|
611
|
+
const isVisible = (rect.top >= 0 &&
|
|
612
|
+
rect.left >= 0 &&
|
|
613
|
+
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
|
|
614
|
+
rect.right <= (window.innerWidth || document.documentElement.clientWidth));
|
|
615
|
+
if (!isVisible) {
|
|
616
|
+
this.elementRef.nativeElement.scrollIntoView({
|
|
617
|
+
behavior: 'instant',
|
|
618
|
+
block: 'center',
|
|
619
|
+
inline: 'nearest'
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
const timeout = 0;
|
|
623
|
+
// Give time for scroll to finish before calculating coordinates for the backdrop
|
|
624
|
+
setTimeout(() => {
|
|
625
|
+
if (this.tourService.state() === 0) { // TourState.OFF
|
|
626
|
+
return;
|
|
627
|
+
}
|
|
628
|
+
const rect = this.elementRef.nativeElement.getBoundingClientRect();
|
|
629
|
+
const style = window.getComputedStyle(this.elementRef.nativeElement);
|
|
630
|
+
const padding = step.padding ?? this.config?.padding ?? 4;
|
|
631
|
+
const positionManager = new PositionManager();
|
|
632
|
+
const defaultPositions = [
|
|
633
|
+
...positionManager.build('below-center'),
|
|
634
|
+
...positionManager.build('above-center'),
|
|
635
|
+
...positionManager.build('after-center'),
|
|
636
|
+
...positionManager.build('before-center'),
|
|
637
|
+
].map(p => ({ ...p, ...this._getOffset(p, padding) }));
|
|
638
|
+
const preferredPositions = step.position
|
|
639
|
+
? positionManager.build(step.position).map(p => ({ ...p, ...this._getOffset(p, padding) }))
|
|
640
|
+
: defaultPositions;
|
|
641
|
+
const positionStrategy = this.overlay
|
|
642
|
+
.position()
|
|
643
|
+
.flexibleConnectedTo(this.elementRef)
|
|
644
|
+
.withPush(false)
|
|
645
|
+
.withPositions(preferredPositions);
|
|
646
|
+
this.overlayRef = this.overlay.create({
|
|
647
|
+
positionStrategy,
|
|
648
|
+
scrollStrategy: this.overlay.scrollStrategies.block(),
|
|
649
|
+
hasBackdrop: false,
|
|
650
|
+
panelClass: 'ngs-tour-step-overlay'
|
|
651
|
+
});
|
|
652
|
+
if (step.withBackdrop) {
|
|
653
|
+
this.tourService.showBackdrop(rect, style.borderRadius, this.viewContainerRef, this.elementRef.nativeElement, padding, step.disableInteraction);
|
|
654
|
+
}
|
|
655
|
+
const componentType = this.customStepComponent || TourStep;
|
|
656
|
+
const portal = new ComponentPortal(componentType, this.viewContainerRef);
|
|
657
|
+
this.componentRef = this.overlayRef.attach(portal);
|
|
658
|
+
const safeSetInput = (name, value) => {
|
|
659
|
+
try {
|
|
660
|
+
this.componentRef?.setInput(name, value);
|
|
661
|
+
}
|
|
662
|
+
catch (e) {
|
|
663
|
+
// Ignore if input is not declared
|
|
664
|
+
}
|
|
665
|
+
};
|
|
666
|
+
if (positionStrategy instanceof FlexibleConnectedPositionStrategy) {
|
|
667
|
+
positionStrategy.positionChanges.subscribe((change) => {
|
|
668
|
+
safeSetInput('position', change.connectionPair);
|
|
669
|
+
});
|
|
670
|
+
// Trigger position calculation to emit initial value
|
|
671
|
+
this.overlayRef.updatePosition();
|
|
672
|
+
}
|
|
673
|
+
const steps = this.tourService.steps();
|
|
674
|
+
const index = this.tourService.currentStepIndex();
|
|
675
|
+
const isFirst = index === 0;
|
|
676
|
+
const isLast = index === steps.length - 1;
|
|
677
|
+
safeSetInput('step', step);
|
|
678
|
+
safeSetInput('isFirst', isFirst);
|
|
679
|
+
safeSetInput('isLast', isLast);
|
|
680
|
+
}, timeout);
|
|
681
|
+
}
|
|
682
|
+
async hideStep() {
|
|
683
|
+
const overlayRef = this.overlayRef;
|
|
684
|
+
const componentRef = this.componentRef;
|
|
685
|
+
if (this.overlayRef === overlayRef) {
|
|
686
|
+
this.overlayRef = null;
|
|
687
|
+
this.componentRef = null;
|
|
688
|
+
}
|
|
689
|
+
if (overlayRef) {
|
|
690
|
+
const safeSetInput = (name, value) => {
|
|
691
|
+
try {
|
|
692
|
+
componentRef?.setInput(name, value);
|
|
693
|
+
}
|
|
694
|
+
catch (e) {
|
|
695
|
+
// Ignore if input is not declared
|
|
696
|
+
}
|
|
697
|
+
};
|
|
698
|
+
safeSetInput('animateEnterClass', false);
|
|
699
|
+
safeSetInput('animateLeaveClass', true);
|
|
700
|
+
await new Promise(resolve => setTimeout(resolve, 200));
|
|
701
|
+
overlayRef.dispose();
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
_getOffset(position, padding) {
|
|
705
|
+
const offset = 8 + padding;
|
|
706
|
+
if (position.originY === 'bottom' && position.overlayY === 'top') {
|
|
707
|
+
return { offsetY: offset };
|
|
708
|
+
}
|
|
709
|
+
if (position.originY === 'top' && position.overlayY === 'bottom') {
|
|
710
|
+
return { offsetY: -offset };
|
|
711
|
+
}
|
|
712
|
+
if (position.originX === 'end' && position.overlayX === 'start') {
|
|
713
|
+
return { offsetX: offset };
|
|
714
|
+
}
|
|
715
|
+
if (position.originX === 'start' && position.overlayX === 'end') {
|
|
716
|
+
return { offsetX: -offset };
|
|
717
|
+
}
|
|
718
|
+
return {};
|
|
719
|
+
}
|
|
720
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: TourAnchorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
721
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.4", type: TourAnchorDirective, isStandalone: true, selector: "[ngsTourAnchor]", inputs: { anchorId: { classPropertyName: "anchorId", publicName: "ngsTourAnchor", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
722
|
+
}
|
|
723
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: TourAnchorDirective, decorators: [{
|
|
724
|
+
type: Directive,
|
|
725
|
+
args: [{
|
|
726
|
+
selector: '[ngsTourAnchor]',
|
|
727
|
+
standalone: true
|
|
728
|
+
}]
|
|
729
|
+
}], propDecorators: { anchorId: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngsTourAnchor", required: true }] }] } });
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* Generated bundle index. Do not edit.
|
|
733
|
+
*/
|
|
734
|
+
|
|
735
|
+
export { TOUR_CONFIG, TOUR_STEP_COMPONENT, TourAnchorDirective, TourService, TourState, TourStep, provideTourConfig };
|
|
736
|
+
//# sourceMappingURL=ngstarter-ui-components-guided-tour.mjs.map
|