@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,851 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, Injector, input, booleanAttribute, output, ElementRef, signal, forwardRef, ChangeDetectionStrategy, Component, TemplateRef, Directive, viewChild, contentChild, contentChildren, effect, ViewContainerRef, DestroyRef, NgZone, ChangeDetectorRef, computed } from '@angular/core';
|
|
3
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
4
|
+
import { outputToObservable, takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
5
|
+
import { Subject, Subscription, merge, fromEvent, EMPTY, startWith, switchMap } from 'rxjs';
|
|
6
|
+
import { Overlay, OverlayConfig } from '@angular/cdk/overlay';
|
|
7
|
+
import { TemplatePortal } from '@angular/cdk/portal';
|
|
8
|
+
import { filter } from 'rxjs/operators';
|
|
9
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
10
|
+
import { SelectionModel } from '@angular/cdk/collections';
|
|
11
|
+
import { Option, SELECT } from '@ngstarter-ui/components/select';
|
|
12
|
+
|
|
13
|
+
const MENU_ITEM = new InjectionToken('MENU_ITEM');
|
|
14
|
+
const MENU_TRIGGER = new InjectionToken('MENU_TRIGGER');
|
|
15
|
+
|
|
16
|
+
class MenuItem {
|
|
17
|
+
_injector = inject(Injector);
|
|
18
|
+
_menuTrigger = null;
|
|
19
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
20
|
+
role = input('menuitem', ...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
|
|
21
|
+
selected = input(false, { ...(ngDevMode ? { debugName: "selected" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
22
|
+
_triggered = output();
|
|
23
|
+
_elementRef = inject((ElementRef));
|
|
24
|
+
_menu = inject(Menu, { optional: true });
|
|
25
|
+
get label() {
|
|
26
|
+
return this._elementRef.nativeElement.textContent?.trim() || '';
|
|
27
|
+
}
|
|
28
|
+
focus() {
|
|
29
|
+
this._elementRef.nativeElement.focus();
|
|
30
|
+
}
|
|
31
|
+
ngOnInit() {
|
|
32
|
+
this._menuTrigger = this._injector.get(MENU_TRIGGER, null);
|
|
33
|
+
}
|
|
34
|
+
_handleClick(event) {
|
|
35
|
+
if (this.disabled()) {
|
|
36
|
+
event.preventDefault();
|
|
37
|
+
event.stopPropagation();
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const menuTrigger = this._menuTrigger;
|
|
41
|
+
const hasPopup = this._elementRef.nativeElement.getAttribute('aria-haspopup');
|
|
42
|
+
if (menuTrigger || hasPopup === 'menu') {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
this._triggered.emit();
|
|
46
|
+
}
|
|
47
|
+
_handleMouseEnter() {
|
|
48
|
+
const menuTrigger = this._menuTrigger;
|
|
49
|
+
if (this._menu && !menuTrigger) {
|
|
50
|
+
this._menu._triggerOpened(null);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
_isHighlighted = signal(false, ...(ngDevMode ? [{ debugName: "_isHighlighted" }] : /* istanbul ignore next */ []));
|
|
54
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MenuItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
55
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: MenuItem, isStandalone: true, selector: "ngs-menu-item, [ngs-menu-item]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { _triggered: "_triggered" }, host: { listeners: { "click": "_handleClick($event)", "mouseenter": "_handleMouseEnter()" }, properties: { "attr.role": "role()", "class.ngs-menu-item": "true", "class.ngs-menu-item-highlighted": "_isHighlighted() || selected()", "attr.disabled": "disabled() || null", "attr.aria-disabled": "disabled()", "tabindex": "disabled() ? -1 : 0" } }, providers: [
|
|
56
|
+
{
|
|
57
|
+
provide: MENU_ITEM,
|
|
58
|
+
useExisting: forwardRef(() => MenuItem)
|
|
59
|
+
}
|
|
60
|
+
], exportAs: ["ngsMenuItem"], ngImport: i0, template: "<div class=\"icon\">\n <ng-content select=\"ngs-icon\"/>\n</div>\n\n<div class=\"ngs-menu-item-content\">\n <ng-content/>\n</div>\n\n@if (_menuTrigger) {\n <svg class=\"ngs-menu-item-submenu-icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <polyline points=\"9 18 15 12 9 6\"></polyline>\n </svg>\n}\n", styles: [":host{--ngs-menu-item-height: var(--option-height);--ngs-menu-item-padding: 0 calc(var(--spacing, .25rem) * 3);--ngs-menu-item-font-size: .875rem;--ngs-menu-item-color: var(--color-on-surface);--ngs-menu-item-hover-background: var(--color-surface-container-high);--ngs-menu-item-selected-background: var(--color-primary-container);--ngs-menu-item-selected-color: var(--color-on-primary-container);--ngs-menu-item-active-background: var(--color-surface-container-highest);--ngs-menu-item-disabled-color: var(--color-on-surface-variant);--ngs-menu-item-gap: calc(var(--spacing, .25rem) * 2.5);display:flex;align-items:center;flex:none;min-height:var(--ngs-menu-item-height);padding:var(--ngs-menu-item-padding);font-size:var(--ngs-menu-item-font-size);color:var(--ngs-menu-item-color);cursor:pointer;-webkit-user-select:none;user-select:none;border:none;background:none;width:100%;text-align:left;box-sizing:border-box;transition:background .1s ease-in-out;outline:none;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;gap:var(--ngs-menu-item-gap)}:host:hover:not([disabled]),:host.ngs-menu-item-highlighted:not([disabled]){background:var(--ngs-menu-item-hover-background)}:host.ngs-menu-item-active:not([disabled]){background:var(--ngs-menu-item-active-background)}:host[disabled]{color:var(--ngs-menu-item-disabled-color);cursor:default;pointer-events:none}:host .icon{line-height:0;opacity:.75}:host .icon:empty{display:none}:host .ngs-menu-item-content{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2);flex:1}:host .ngs-menu-item-submenu-icon{width:16px;height:16px;margin-left:8px;opacity:.5}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
61
|
+
}
|
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MenuItem, decorators: [{
|
|
63
|
+
type: Component,
|
|
64
|
+
args: [{ selector: 'ngs-menu-item, [ngs-menu-item]', exportAs: 'ngsMenuItem', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
65
|
+
{
|
|
66
|
+
provide: MENU_ITEM,
|
|
67
|
+
useExisting: forwardRef(() => MenuItem)
|
|
68
|
+
}
|
|
69
|
+
], host: {
|
|
70
|
+
'[attr.role]': 'role()',
|
|
71
|
+
'[class.ngs-menu-item]': 'true',
|
|
72
|
+
'[class.ngs-menu-item-highlighted]': '_isHighlighted() || selected()',
|
|
73
|
+
'[attr.disabled]': 'disabled() || null',
|
|
74
|
+
'[attr.aria-disabled]': 'disabled()',
|
|
75
|
+
'[tabindex]': 'disabled() ? -1 : 0',
|
|
76
|
+
'(click)': '_handleClick($event)',
|
|
77
|
+
'(mouseenter)': '_handleMouseEnter()',
|
|
78
|
+
}, template: "<div class=\"icon\">\n <ng-content select=\"ngs-icon\"/>\n</div>\n\n<div class=\"ngs-menu-item-content\">\n <ng-content/>\n</div>\n\n@if (_menuTrigger) {\n <svg class=\"ngs-menu-item-submenu-icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <polyline points=\"9 18 15 12 9 6\"></polyline>\n </svg>\n}\n", styles: [":host{--ngs-menu-item-height: var(--option-height);--ngs-menu-item-padding: 0 calc(var(--spacing, .25rem) * 3);--ngs-menu-item-font-size: .875rem;--ngs-menu-item-color: var(--color-on-surface);--ngs-menu-item-hover-background: var(--color-surface-container-high);--ngs-menu-item-selected-background: var(--color-primary-container);--ngs-menu-item-selected-color: var(--color-on-primary-container);--ngs-menu-item-active-background: var(--color-surface-container-highest);--ngs-menu-item-disabled-color: var(--color-on-surface-variant);--ngs-menu-item-gap: calc(var(--spacing, .25rem) * 2.5);display:flex;align-items:center;flex:none;min-height:var(--ngs-menu-item-height);padding:var(--ngs-menu-item-padding);font-size:var(--ngs-menu-item-font-size);color:var(--ngs-menu-item-color);cursor:pointer;-webkit-user-select:none;user-select:none;border:none;background:none;width:100%;text-align:left;box-sizing:border-box;transition:background .1s ease-in-out;outline:none;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;gap:var(--ngs-menu-item-gap)}:host:hover:not([disabled]),:host.ngs-menu-item-highlighted:not([disabled]){background:var(--ngs-menu-item-hover-background)}:host.ngs-menu-item-active:not([disabled]){background:var(--ngs-menu-item-active-background)}:host[disabled]{color:var(--ngs-menu-item-disabled-color);cursor:default;pointer-events:none}:host .icon{line-height:0;opacity:.75}:host .icon:empty{display:none}:host .ngs-menu-item-content{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2);flex:1}:host .ngs-menu-item-submenu-icon{width:16px;height:16px;margin-left:8px;opacity:.5}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
79
|
+
}], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], _triggered: [{ type: i0.Output, args: ["_triggered"] }] } });
|
|
80
|
+
|
|
81
|
+
class MenuContent {
|
|
82
|
+
templateRef = inject(TemplateRef);
|
|
83
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MenuContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
84
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: MenuContent, isStandalone: true, selector: "[ngsMenuContent]", ngImport: i0 });
|
|
85
|
+
}
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MenuContent, decorators: [{
|
|
87
|
+
type: Directive,
|
|
88
|
+
args: [{
|
|
89
|
+
selector: '[ngsMenuContent]',
|
|
90
|
+
standalone: true
|
|
91
|
+
}]
|
|
92
|
+
}] });
|
|
93
|
+
|
|
94
|
+
class Menu {
|
|
95
|
+
role = input('menu', ...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
|
|
96
|
+
classList = input('', ...(ngDevMode ? [{ debugName: "classList" }] : /* istanbul ignore next */ []));
|
|
97
|
+
xPosition = input('after', ...(ngDevMode ? [{ debugName: "xPosition" }] : /* istanbul ignore next */ []));
|
|
98
|
+
yPosition = input('below', ...(ngDevMode ? [{ debugName: "yPosition" }] : /* istanbul ignore next */ []));
|
|
99
|
+
_panelClasses = signal([], ...(ngDevMode ? [{ debugName: "_panelClasses" }] : /* istanbul ignore next */ []));
|
|
100
|
+
closed = output();
|
|
101
|
+
_childMenuClosed = new Subject();
|
|
102
|
+
templateRef = viewChild.required(TemplateRef);
|
|
103
|
+
content = contentChild(MenuContent, ...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
104
|
+
items = contentChildren(MenuItem, { ...(ngDevMode ? { debugName: "items" } : /* istanbul ignore next */ {}), descendants: true });
|
|
105
|
+
_isNested = signal(false, ...(ngDevMode ? [{ debugName: "_isNested" }] : /* istanbul ignore next */ []));
|
|
106
|
+
_context = signal(undefined, ...(ngDevMode ? [{ debugName: "_context" }] : /* istanbul ignore next */ []));
|
|
107
|
+
_parentMenu = inject(Menu, { optional: true, skipSelf: true });
|
|
108
|
+
_parentMenuTrigger = inject(MENU_TRIGGER, { optional: true });
|
|
109
|
+
_itemSubscription = Subscription.EMPTY;
|
|
110
|
+
_openedTrigger = null;
|
|
111
|
+
constructor() {
|
|
112
|
+
if (this._parentMenu || this._parentMenuTrigger) {
|
|
113
|
+
this._isNested.set(true);
|
|
114
|
+
}
|
|
115
|
+
effect(() => {
|
|
116
|
+
const items = this.items();
|
|
117
|
+
this._itemSubscription.unsubscribe();
|
|
118
|
+
if (items.length > 0) {
|
|
119
|
+
this._itemSubscription = merge(...items.map(item => outputToObservable(item._triggered)))
|
|
120
|
+
.subscribe(() => {
|
|
121
|
+
this.close('click');
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
ngOnDestroy() {
|
|
127
|
+
this._itemSubscription.unsubscribe();
|
|
128
|
+
}
|
|
129
|
+
close(reason) {
|
|
130
|
+
if (this._openedTrigger) {
|
|
131
|
+
this._openedTrigger.closeMenu(reason);
|
|
132
|
+
}
|
|
133
|
+
this.closed.emit(reason);
|
|
134
|
+
}
|
|
135
|
+
_setPanelClasses(classes) {
|
|
136
|
+
this._panelClasses.set(classes);
|
|
137
|
+
}
|
|
138
|
+
_setContext(context) {
|
|
139
|
+
this._context.set(context);
|
|
140
|
+
}
|
|
141
|
+
_triggerOpened(trigger) {
|
|
142
|
+
if (this._openedTrigger && this._openedTrigger !== trigger) {
|
|
143
|
+
this._openedTrigger.closeMenu('mouse', true);
|
|
144
|
+
}
|
|
145
|
+
this._openedTrigger = trigger;
|
|
146
|
+
}
|
|
147
|
+
_triggerClosed(trigger) {
|
|
148
|
+
if (this._openedTrigger === trigger) {
|
|
149
|
+
this._openedTrigger = null;
|
|
150
|
+
this._childMenuClosed.next();
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
hasOpenChild() {
|
|
154
|
+
return !!this._openedTrigger && this._openedTrigger.menuOpen();
|
|
155
|
+
}
|
|
156
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: Menu, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
157
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: Menu, isStandalone: true, selector: "ngs-menu", inputs: { role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, classList: { classPropertyName: "classList", publicName: "classList", isSignal: true, isRequired: false, transformFunction: null }, xPosition: { classPropertyName: "xPosition", publicName: "xPosition", isSignal: true, isRequired: false, transformFunction: null }, yPosition: { classPropertyName: "yPosition", publicName: "yPosition", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "attr.role": "role()", "class.ngs-menu": "true" } }, queries: [{ propertyName: "content", first: true, predicate: MenuContent, descendants: true, isSignal: true }, { propertyName: "items", predicate: MenuItem, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], exportAs: ["ngsMenu"], ngImport: i0, template: "<ng-template>\n <div\n class=\"ngs-menu-panel\"\n [class]=\"classList()\"\n [class.ngs-menu-before]=\"_panelClasses().includes('ngs-menu-before')\"\n [class.ngs-menu-after]=\"_panelClasses().includes('ngs-menu-after')\"\n [class.ngs-menu-above]=\"_panelClasses().includes('ngs-menu-above')\"\n [class.ngs-menu-below]=\"_panelClasses().includes('ngs-menu-below')\"\n tabindex=\"-1\"\n role=\"menu\"\n >\n <ng-content select=\"[ngs-menu-header]\"/>\n <div class=\"ngs-menu-content\">\n @if (content()) {\n <ng-container [ngTemplateOutlet]=\"content()!.templateRef\" [ngTemplateOutletContext]=\"_context()\" />\n } @else {\n <ng-content />\n }\n </div>\n <ng-content select=\"[ngs-menu-footer]\"/>\n </div>\n</ng-template>\n", styles: [":host{display:contents}.ngs-menu-panel{background:var(--ngs-menu-background, var(--dropdown-bg));box-shadow:var(--ngs-menu-shadow, var(--dropdown-shadow));border-radius:var(--ngs-menu-border-radius, var(--dropdown-radius));max-height:var(--ngs-menu-max-height, 90vh)}@media(min-height:640px){.ngs-menu-panel{max-height:var(--ngs-menu-max-height, 65vh)}}.ngs-menu-panel{min-width:var(--ngs-menu-min-width, 112px);max-width:var(--ngs-menu-max-width, 280px);outline:var(--ngs-menu-border, var(--dropdown-border));overflow:auto;animation-name:ngs-menu-panel-showing;animation-duration:.15s;animation-timing-function:cubic-bezier(0,0,.2,1);padding-top:8px;padding-bottom:8px}.ngs-menu-panel.ngs-menu-below{transform-origin:top}.ngs-menu-panel.ngs-menu-below.ngs-menu-before{transform-origin:top right}.ngs-menu-panel.ngs-menu-below.ngs-menu-after{transform-origin:top left}.ngs-menu-panel.ngs-menu-above{transform-origin:bottom}.ngs-menu-panel.ngs-menu-above.ngs-menu-before{transform-origin:bottom right}.ngs-menu-panel.ngs-menu-above.ngs-menu-after{transform-origin:bottom left}@keyframes ngs-menu-panel-showing{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}.ngs-menu-content{padding:var(--ngs-menu-padding, 0)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
158
|
+
}
|
|
159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: Menu, decorators: [{
|
|
160
|
+
type: Component,
|
|
161
|
+
args: [{ selector: 'ngs-menu', exportAs: 'ngsMenu', standalone: true, imports: [
|
|
162
|
+
NgTemplateOutlet
|
|
163
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
164
|
+
'[attr.role]': 'role()',
|
|
165
|
+
'[class.ngs-menu]': 'true',
|
|
166
|
+
}, template: "<ng-template>\n <div\n class=\"ngs-menu-panel\"\n [class]=\"classList()\"\n [class.ngs-menu-before]=\"_panelClasses().includes('ngs-menu-before')\"\n [class.ngs-menu-after]=\"_panelClasses().includes('ngs-menu-after')\"\n [class.ngs-menu-above]=\"_panelClasses().includes('ngs-menu-above')\"\n [class.ngs-menu-below]=\"_panelClasses().includes('ngs-menu-below')\"\n tabindex=\"-1\"\n role=\"menu\"\n >\n <ng-content select=\"[ngs-menu-header]\"/>\n <div class=\"ngs-menu-content\">\n @if (content()) {\n <ng-container [ngTemplateOutlet]=\"content()!.templateRef\" [ngTemplateOutletContext]=\"_context()\" />\n } @else {\n <ng-content />\n }\n </div>\n <ng-content select=\"[ngs-menu-footer]\"/>\n </div>\n</ng-template>\n", styles: [":host{display:contents}.ngs-menu-panel{background:var(--ngs-menu-background, var(--dropdown-bg));box-shadow:var(--ngs-menu-shadow, var(--dropdown-shadow));border-radius:var(--ngs-menu-border-radius, var(--dropdown-radius));max-height:var(--ngs-menu-max-height, 90vh)}@media(min-height:640px){.ngs-menu-panel{max-height:var(--ngs-menu-max-height, 65vh)}}.ngs-menu-panel{min-width:var(--ngs-menu-min-width, 112px);max-width:var(--ngs-menu-max-width, 280px);outline:var(--ngs-menu-border, var(--dropdown-border));overflow:auto;animation-name:ngs-menu-panel-showing;animation-duration:.15s;animation-timing-function:cubic-bezier(0,0,.2,1);padding-top:8px;padding-bottom:8px}.ngs-menu-panel.ngs-menu-below{transform-origin:top}.ngs-menu-panel.ngs-menu-below.ngs-menu-before{transform-origin:top right}.ngs-menu-panel.ngs-menu-below.ngs-menu-after{transform-origin:top left}.ngs-menu-panel.ngs-menu-above{transform-origin:bottom}.ngs-menu-panel.ngs-menu-above.ngs-menu-before{transform-origin:bottom right}.ngs-menu-panel.ngs-menu-above.ngs-menu-after{transform-origin:bottom left}@keyframes ngs-menu-panel-showing{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}.ngs-menu-content{padding:var(--ngs-menu-padding, 0)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
167
|
+
}], ctorParameters: () => [], propDecorators: { role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], classList: [{ type: i0.Input, args: [{ isSignal: true, alias: "classList", required: false }] }], xPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "xPosition", required: false }] }], yPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "yPosition", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], templateRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }], content: [{ type: i0.ContentChild, args: [i0.forwardRef(() => MenuContent), { isSignal: true }] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => MenuItem), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
168
|
+
|
|
169
|
+
class MenuDivider {
|
|
170
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MenuDivider, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
171
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: MenuDivider, isStandalone: true, selector: "ngs-menu-divider", ngImport: i0, template: "", styles: [":host{display:block;height:1px;background:var(--ngs-menu-divider-color, var(--color-subtle));margin:var(--ngs-menu-divider-margin, calc(var(--spacing, .25rem) * 2) 0)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] });
|
|
172
|
+
}
|
|
173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MenuDivider, decorators: [{
|
|
174
|
+
type: Component,
|
|
175
|
+
args: [{ selector: 'ngs-menu-divider', imports: [], template: "", styles: [":host{display:block;height:1px;background:var(--ngs-menu-divider-color, var(--color-subtle));margin:var(--ngs-menu-divider-margin, calc(var(--spacing, .25rem) * 2) 0)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
176
|
+
}] });
|
|
177
|
+
|
|
178
|
+
class MenuHeading {
|
|
179
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MenuHeading, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
180
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: MenuHeading, isStandalone: true, selector: "ngs-menu-heading", ngImport: i0, template: "<ng-content/>\n", styles: [":host{display:block;font-size:.75rem;margin:calc(var(--spacing, .25rem) * 2) 0;padding:0 calc(var(--spacing, .25rem) * 3);color:var(--color-neutral-500)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] });
|
|
181
|
+
}
|
|
182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MenuHeading, decorators: [{
|
|
183
|
+
type: Component,
|
|
184
|
+
args: [{ selector: 'ngs-menu-heading', imports: [], template: "<ng-content/>\n", styles: [":host{display:block;font-size:.75rem;margin:calc(var(--spacing, .25rem) * 2) 0;padding:0 calc(var(--spacing, .25rem) * 3);color:var(--color-neutral-500)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
185
|
+
}] });
|
|
186
|
+
|
|
187
|
+
class MenuTrigger {
|
|
188
|
+
_overlay = inject(Overlay);
|
|
189
|
+
_elementRef = inject((ElementRef));
|
|
190
|
+
_viewContainerRef = inject(ViewContainerRef);
|
|
191
|
+
destroyRef = inject(DestroyRef);
|
|
192
|
+
_injector = inject(Injector);
|
|
193
|
+
_parentMenu = inject(Menu, { optional: true, skipSelf: true });
|
|
194
|
+
_menu = inject(Menu, { optional: true });
|
|
195
|
+
menu = input(null, { ...(ngDevMode ? { debugName: "menu" } : /* istanbul ignore next */ {}), alias: 'ngsMenuTriggerFor' });
|
|
196
|
+
menuData = input(undefined, { ...(ngDevMode ? { debugName: "menuData" } : /* istanbul ignore next */ {}), alias: 'ngsMenuTriggerData' });
|
|
197
|
+
menuDisabled = input(false, { ...(ngDevMode ? { debugName: "menuDisabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'ngsMenuDisabled' });
|
|
198
|
+
xPosition = input('after', ...(ngDevMode ? [{ debugName: "xPosition" }] : /* istanbul ignore next */ []));
|
|
199
|
+
yPosition = input('below', ...(ngDevMode ? [{ debugName: "yPosition" }] : /* istanbul ignore next */ []));
|
|
200
|
+
menuOpened = output();
|
|
201
|
+
menuClosed = output();
|
|
202
|
+
restoreFocus = input(true, { ...(ngDevMode ? { debugName: "restoreFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'ngsMenuTriggerRestoreFocus' });
|
|
203
|
+
_overlayRef = null;
|
|
204
|
+
_portal = null;
|
|
205
|
+
_closingSubscription = Subscription.EMPTY;
|
|
206
|
+
_hoverSubscription = Subscription.EMPTY;
|
|
207
|
+
_childMenuClosedSubscription = Subscription.EMPTY;
|
|
208
|
+
_closeTimeoutId;
|
|
209
|
+
_previouslyFocusedElement = null;
|
|
210
|
+
menuOpen = signal(false, ...(ngDevMode ? [{ debugName: "menuOpen" }] : /* istanbul ignore next */ []));
|
|
211
|
+
ngOnDestroy() {
|
|
212
|
+
if (this._overlayRef) {
|
|
213
|
+
this._overlayRef.dispose();
|
|
214
|
+
this._overlayRef = null;
|
|
215
|
+
}
|
|
216
|
+
this._closingSubscription.unsubscribe();
|
|
217
|
+
this._hoverSubscription.unsubscribe();
|
|
218
|
+
this._childMenuClosedSubscription.unsubscribe();
|
|
219
|
+
this._clearCloseTimeout();
|
|
220
|
+
}
|
|
221
|
+
_handleMouseLeave() {
|
|
222
|
+
}
|
|
223
|
+
_clearCloseTimeout() {
|
|
224
|
+
if (this._closeTimeoutId) {
|
|
225
|
+
clearTimeout(this._closeTimeoutId);
|
|
226
|
+
this._closeTimeoutId = null;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
_handleClick(event) {
|
|
230
|
+
const menuItem = this._injector.get(MENU_ITEM, null);
|
|
231
|
+
if (menuItem) {
|
|
232
|
+
event.stopPropagation();
|
|
233
|
+
event.stopImmediatePropagation();
|
|
234
|
+
}
|
|
235
|
+
this.toggleMenu();
|
|
236
|
+
}
|
|
237
|
+
toggleMenu() {
|
|
238
|
+
if (this.menuDisabled()) {
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
if (this._parentMenu) {
|
|
242
|
+
this.openMenu();
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
this.menuOpen() ? this.closeMenu('click') : this.openMenu();
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
openMenu() {
|
|
249
|
+
const menu = this.menu();
|
|
250
|
+
if (this.menuOpen() || !menu) {
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
this._previouslyFocusedElement = document.activeElement;
|
|
254
|
+
const overlayRef = this._createOverlay();
|
|
255
|
+
const strategy = overlayRef.getConfig().positionStrategy;
|
|
256
|
+
strategy.positionChanges.subscribe(change => {
|
|
257
|
+
menu._setPanelClasses(this._getPanelClasses(change.connectionPair));
|
|
258
|
+
});
|
|
259
|
+
menu._setContext(this.menuData());
|
|
260
|
+
this._portal = new TemplatePortal(menu.templateRef(), this._viewContainerRef, this._viewContainerRef.injector);
|
|
261
|
+
overlayRef.attach(this._portal);
|
|
262
|
+
if (overlayRef.hasAttached()) {
|
|
263
|
+
this._setIsMenuOpen(true);
|
|
264
|
+
const overlayElement = overlayRef.overlayElement;
|
|
265
|
+
this._hoverSubscription.unsubscribe();
|
|
266
|
+
this._hoverSubscription = merge(fromEvent(overlayElement, 'mouseenter'), fromEvent(overlayElement, 'mouseleave')).subscribe(event => {
|
|
267
|
+
if (event.type === 'mouseenter') {
|
|
268
|
+
this._clearCloseTimeout();
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
this._handleMouseLeave();
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
if (this._menu) {
|
|
276
|
+
this._menu._triggerOpened(this);
|
|
277
|
+
this._childMenuClosedSubscription.unsubscribe();
|
|
278
|
+
this._childMenuClosedSubscription = this._menu._childMenuClosed.subscribe(() => {
|
|
279
|
+
this._handleMouseLeave();
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
this._closingSubscription = this._menuClosingActions().subscribe(reason => this.closeMenu(reason));
|
|
283
|
+
this.menuOpened.emit();
|
|
284
|
+
}
|
|
285
|
+
closeMenu(reason, force = false) {
|
|
286
|
+
if (!this._overlayRef || !this.menuOpen()) {
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
if (!force && reason === 'mouse' && this.menu()?.hasOpenChild()) {
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
this._setIsMenuOpen(false);
|
|
293
|
+
const menu = this.menu();
|
|
294
|
+
if (menu) {
|
|
295
|
+
menu.close(reason);
|
|
296
|
+
}
|
|
297
|
+
if (this._menu) {
|
|
298
|
+
this._menu._triggerClosed(this);
|
|
299
|
+
}
|
|
300
|
+
this._overlayRef.detach();
|
|
301
|
+
this._closingSubscription.unsubscribe();
|
|
302
|
+
this._hoverSubscription.unsubscribe();
|
|
303
|
+
this._childMenuClosedSubscription.unsubscribe();
|
|
304
|
+
this._clearCloseTimeout();
|
|
305
|
+
this.menuClosed.emit(reason);
|
|
306
|
+
if (this.restoreFocus() && this._previouslyFocusedElement) {
|
|
307
|
+
this._previouslyFocusedElement.focus();
|
|
308
|
+
}
|
|
309
|
+
this._previouslyFocusedElement = null;
|
|
310
|
+
if (reason === 'click' && this._parentMenu) {
|
|
311
|
+
this._parentMenu.close('click');
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
_setIsMenuOpen(isOpen) {
|
|
315
|
+
this.menuOpen.set(isOpen);
|
|
316
|
+
}
|
|
317
|
+
_getPanelClasses(connectionPair) {
|
|
318
|
+
const classes = [];
|
|
319
|
+
const isBelow = connectionPair.overlayY === 'top';
|
|
320
|
+
const isBefore = connectionPair.overlayX === 'end';
|
|
321
|
+
if (isBelow) {
|
|
322
|
+
classes.push('ngs-menu-below');
|
|
323
|
+
}
|
|
324
|
+
else {
|
|
325
|
+
classes.push('ngs-menu-above');
|
|
326
|
+
}
|
|
327
|
+
if (isBefore) {
|
|
328
|
+
classes.push('ngs-menu-before');
|
|
329
|
+
}
|
|
330
|
+
else {
|
|
331
|
+
classes.push('ngs-menu-after');
|
|
332
|
+
}
|
|
333
|
+
return classes;
|
|
334
|
+
}
|
|
335
|
+
_createOverlay() {
|
|
336
|
+
if (!this._overlayRef) {
|
|
337
|
+
const config = this._getOverlayConfig();
|
|
338
|
+
this._overlayRef = this._overlay.create(config);
|
|
339
|
+
this._overlayRef
|
|
340
|
+
.keydownEvents()
|
|
341
|
+
.pipe(filter(event => event.key === 'Escape'))
|
|
342
|
+
.subscribe(() => this.closeMenu('keydown'));
|
|
343
|
+
this._overlayRef
|
|
344
|
+
.outsidePointerEvents()
|
|
345
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
346
|
+
.subscribe((event) => {
|
|
347
|
+
if (this._parentMenu && this._elementRef.nativeElement.contains(event.target)) {
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
this.closeMenu('backdrop');
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
return this._overlayRef;
|
|
354
|
+
}
|
|
355
|
+
_getOverlayConfig() {
|
|
356
|
+
return new OverlayConfig({
|
|
357
|
+
positionStrategy: this._overlay.position()
|
|
358
|
+
.flexibleConnectedTo(this._elementRef)
|
|
359
|
+
.withLockedPosition(false)
|
|
360
|
+
.withTransformOriginOn('.ngs-menu-panel')
|
|
361
|
+
.withPositions(this._getPositions())
|
|
362
|
+
.withPush(false),
|
|
363
|
+
scrollStrategy: this._overlay.scrollStrategies.block(),
|
|
364
|
+
hasBackdrop: !this._parentMenu,
|
|
365
|
+
backdropClass: 'cdk-overlay-transparent-backdrop'
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
_getPositions() {
|
|
369
|
+
const menu = this.menu();
|
|
370
|
+
if (this._parentMenu) {
|
|
371
|
+
return [
|
|
372
|
+
{
|
|
373
|
+
originX: 'end',
|
|
374
|
+
originY: 'top',
|
|
375
|
+
overlayX: 'start',
|
|
376
|
+
overlayY: 'top',
|
|
377
|
+
offsetX: 0,
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
originX: 'start',
|
|
381
|
+
originY: 'top',
|
|
382
|
+
overlayX: 'end',
|
|
383
|
+
overlayY: 'top',
|
|
384
|
+
offsetX: 0,
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
originX: 'end',
|
|
388
|
+
originY: 'bottom',
|
|
389
|
+
overlayX: 'start',
|
|
390
|
+
overlayY: 'bottom',
|
|
391
|
+
offsetX: 0,
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
originX: 'start',
|
|
395
|
+
originY: 'bottom',
|
|
396
|
+
overlayX: 'end',
|
|
397
|
+
overlayY: 'bottom',
|
|
398
|
+
offsetX: 0,
|
|
399
|
+
}
|
|
400
|
+
];
|
|
401
|
+
}
|
|
402
|
+
const xPosition = menu?.xPosition() || this.xPosition();
|
|
403
|
+
const yPosition = menu?.yPosition() || this.yPosition();
|
|
404
|
+
if (yPosition === 'above') {
|
|
405
|
+
return [
|
|
406
|
+
{
|
|
407
|
+
originX: xPosition === 'before' ? 'end' : 'start',
|
|
408
|
+
originY: 'top',
|
|
409
|
+
overlayX: xPosition === 'before' ? 'end' : 'start',
|
|
410
|
+
overlayY: 'bottom',
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
originX: xPosition === 'before' ? 'start' : 'end',
|
|
414
|
+
originY: 'top',
|
|
415
|
+
overlayX: xPosition === 'before' ? 'start' : 'end',
|
|
416
|
+
overlayY: 'bottom',
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
originX: xPosition === 'before' ? 'end' : 'start',
|
|
420
|
+
originY: 'bottom',
|
|
421
|
+
overlayX: xPosition === 'before' ? 'end' : 'start',
|
|
422
|
+
overlayY: 'top',
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
originX: xPosition === 'before' ? 'start' : 'end',
|
|
426
|
+
originY: 'bottom',
|
|
427
|
+
overlayX: xPosition === 'before' ? 'start' : 'end',
|
|
428
|
+
overlayY: 'top',
|
|
429
|
+
},
|
|
430
|
+
];
|
|
431
|
+
}
|
|
432
|
+
return [
|
|
433
|
+
{
|
|
434
|
+
originX: xPosition === 'before' ? 'end' : 'start',
|
|
435
|
+
originY: 'bottom',
|
|
436
|
+
overlayX: xPosition === 'before' ? 'end' : 'start',
|
|
437
|
+
overlayY: 'top',
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
originX: xPosition === 'before' ? 'start' : 'end',
|
|
441
|
+
originY: 'bottom',
|
|
442
|
+
overlayX: xPosition === 'before' ? 'start' : 'end',
|
|
443
|
+
overlayY: 'top',
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
originX: xPosition === 'before' ? 'end' : 'start',
|
|
447
|
+
originY: 'top',
|
|
448
|
+
overlayX: xPosition === 'before' ? 'end' : 'start',
|
|
449
|
+
overlayY: 'bottom',
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
originX: xPosition === 'before' ? 'start' : 'end',
|
|
453
|
+
originY: 'top',
|
|
454
|
+
overlayX: xPosition === 'before' ? 'start' : 'end',
|
|
455
|
+
overlayY: 'bottom',
|
|
456
|
+
},
|
|
457
|
+
];
|
|
458
|
+
}
|
|
459
|
+
_menuClosingActions() {
|
|
460
|
+
const menu = this.menu();
|
|
461
|
+
const detachments = this._overlayRef.detachments();
|
|
462
|
+
const menuClosed = menu ? outputToObservable(menu.closed) : EMPTY;
|
|
463
|
+
const parentMenuClosed = this._parentMenu ? outputToObservable(this._parentMenu.closed) : EMPTY;
|
|
464
|
+
return merge(detachments, menuClosed, parentMenuClosed).pipe(filter((reason) => !!reason));
|
|
465
|
+
}
|
|
466
|
+
_handleMouseEnter() {
|
|
467
|
+
this._clearCloseTimeout();
|
|
468
|
+
if (this._parentMenu) {
|
|
469
|
+
this.openMenu();
|
|
470
|
+
}
|
|
471
|
+
else if (this._menu) {
|
|
472
|
+
this.openMenu();
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MenuTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
476
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.4", type: MenuTrigger, isStandalone: true, selector: "[ngsMenuTriggerFor]", inputs: { menu: { classPropertyName: "menu", publicName: "ngsMenuTriggerFor", isSignal: true, isRequired: false, transformFunction: null }, menuData: { classPropertyName: "menuData", publicName: "ngsMenuTriggerData", isSignal: true, isRequired: false, transformFunction: null }, menuDisabled: { classPropertyName: "menuDisabled", publicName: "ngsMenuDisabled", isSignal: true, isRequired: false, transformFunction: null }, xPosition: { classPropertyName: "xPosition", publicName: "xPosition", isSignal: true, isRequired: false, transformFunction: null }, yPosition: { classPropertyName: "yPosition", publicName: "yPosition", isSignal: true, isRequired: false, transformFunction: null }, restoreFocus: { classPropertyName: "restoreFocus", publicName: "ngsMenuTriggerRestoreFocus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuOpened: "menuOpened", menuClosed: "menuClosed" }, host: { attributes: { "aria-haspopup": "menu" }, listeners: { "click": "_handleClick($event)", "mouseenter": "_handleMouseEnter()", "mouseleave": "_handleMouseLeave()" }, properties: { "attr.aria-expanded": "menuOpen()", "attr.aria-controls": "menuOpen() ? menu()?.templateRef() : null", "class.ngs-menu-item-highlighted": "menuOpen()" } }, providers: [
|
|
477
|
+
{
|
|
478
|
+
provide: MENU_TRIGGER,
|
|
479
|
+
useExisting: forwardRef(() => MenuTrigger)
|
|
480
|
+
}
|
|
481
|
+
], exportAs: ["ngsMenuTrigger"], ngImport: i0 });
|
|
482
|
+
}
|
|
483
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MenuTrigger, decorators: [{
|
|
484
|
+
type: Directive,
|
|
485
|
+
args: [{
|
|
486
|
+
selector: '[ngsMenuTriggerFor]',
|
|
487
|
+
exportAs: 'ngsMenuTrigger',
|
|
488
|
+
standalone: true,
|
|
489
|
+
host: {
|
|
490
|
+
'aria-haspopup': 'menu',
|
|
491
|
+
'[attr.aria-expanded]': 'menuOpen()',
|
|
492
|
+
'[attr.aria-controls]': 'menuOpen() ? menu()?.templateRef() : null',
|
|
493
|
+
'[class.ngs-menu-item-highlighted]': 'menuOpen()',
|
|
494
|
+
'(click)': '_handleClick($event)',
|
|
495
|
+
'(mouseenter)': '_handleMouseEnter()',
|
|
496
|
+
'(mouseleave)': '_handleMouseLeave()',
|
|
497
|
+
},
|
|
498
|
+
providers: [
|
|
499
|
+
{
|
|
500
|
+
provide: MENU_TRIGGER,
|
|
501
|
+
useExisting: forwardRef(() => MenuTrigger)
|
|
502
|
+
}
|
|
503
|
+
]
|
|
504
|
+
}]
|
|
505
|
+
}], propDecorators: { menu: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngsMenuTriggerFor", required: false }] }], menuData: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngsMenuTriggerData", required: false }] }], menuDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngsMenuDisabled", required: false }] }], xPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "xPosition", required: false }] }], yPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "yPosition", required: false }] }], menuOpened: [{ type: i0.Output, args: ["menuOpened"] }], menuClosed: [{ type: i0.Output, args: ["menuClosed"] }], restoreFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngsMenuTriggerRestoreFocus", required: false }] }] } });
|
|
506
|
+
|
|
507
|
+
class ContextMenuTrigger {
|
|
508
|
+
_overlay = inject(Overlay);
|
|
509
|
+
_elementRef = inject((ElementRef));
|
|
510
|
+
_viewContainerRef = inject(ViewContainerRef);
|
|
511
|
+
_ngZone = inject(NgZone);
|
|
512
|
+
menu = input(null, { ...(ngDevMode ? { debugName: "menu" } : /* istanbul ignore next */ {}), alias: 'ngsContextMenuTriggerFor' });
|
|
513
|
+
menuData = input(undefined, { ...(ngDevMode ? { debugName: "menuData" } : /* istanbul ignore next */ {}), alias: 'ngsContextMenuTriggerData' });
|
|
514
|
+
menuOpened = output();
|
|
515
|
+
menuClosed = output();
|
|
516
|
+
_overlayRef = null;
|
|
517
|
+
_portal = null;
|
|
518
|
+
_closingSubscription = Subscription.EMPTY;
|
|
519
|
+
menuOpen = signal(false, ...(ngDevMode ? [{ debugName: "menuOpen" }] : /* istanbul ignore next */ []));
|
|
520
|
+
ngOnDestroy() {
|
|
521
|
+
if (this._overlayRef) {
|
|
522
|
+
this._overlayRef.dispose();
|
|
523
|
+
this._overlayRef = null;
|
|
524
|
+
}
|
|
525
|
+
this._closingSubscription.unsubscribe();
|
|
526
|
+
}
|
|
527
|
+
openMenu(x, y) {
|
|
528
|
+
const menu = this.menu();
|
|
529
|
+
if (this.menuOpen() || !menu) {
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
const overlayRef = this._createOverlay(x, y);
|
|
533
|
+
const strategy = overlayRef.getConfig().positionStrategy;
|
|
534
|
+
strategy.positionChanges.subscribe(change => {
|
|
535
|
+
menu._setPanelClasses(this._getPanelClasses(change.connectionPair));
|
|
536
|
+
});
|
|
537
|
+
menu._setContext(this.menuData());
|
|
538
|
+
this._portal = new TemplatePortal(menu.templateRef(), this._viewContainerRef);
|
|
539
|
+
overlayRef.attach(this._portal);
|
|
540
|
+
if (overlayRef.hasAttached()) {
|
|
541
|
+
this._setIsMenuOpen(true);
|
|
542
|
+
}
|
|
543
|
+
this._closingSubscription = this._menuClosingActions().subscribe(reason => this.closeMenu(reason));
|
|
544
|
+
this.menuOpened.emit();
|
|
545
|
+
}
|
|
546
|
+
closeMenu(reason) {
|
|
547
|
+
if (!this._overlayRef || !this.menuOpen()) {
|
|
548
|
+
return;
|
|
549
|
+
}
|
|
550
|
+
this._setIsMenuOpen(false);
|
|
551
|
+
const menu = this.menu();
|
|
552
|
+
if (menu) {
|
|
553
|
+
menu.close(reason);
|
|
554
|
+
}
|
|
555
|
+
this._overlayRef.detach();
|
|
556
|
+
this._closingSubscription.unsubscribe();
|
|
557
|
+
this.menuClosed.emit(reason);
|
|
558
|
+
}
|
|
559
|
+
_setIsMenuOpen(isOpen) {
|
|
560
|
+
this.menuOpen.set(isOpen);
|
|
561
|
+
}
|
|
562
|
+
_getPanelClasses(connectionPair) {
|
|
563
|
+
const classes = [];
|
|
564
|
+
const isBelow = connectionPair.overlayY === 'top';
|
|
565
|
+
const isBefore = connectionPair.overlayX === 'end';
|
|
566
|
+
if (isBelow) {
|
|
567
|
+
classes.push('ngs-menu-below');
|
|
568
|
+
}
|
|
569
|
+
else {
|
|
570
|
+
classes.push('ngs-menu-above');
|
|
571
|
+
}
|
|
572
|
+
if (isBefore) {
|
|
573
|
+
classes.push('ngs-menu-before');
|
|
574
|
+
}
|
|
575
|
+
else {
|
|
576
|
+
classes.push('ngs-menu-after');
|
|
577
|
+
}
|
|
578
|
+
return classes;
|
|
579
|
+
}
|
|
580
|
+
_createOverlay(x, y) {
|
|
581
|
+
if (this._overlayRef) {
|
|
582
|
+
this._overlayRef.updatePositionStrategy(this._getPositionStrategy(x, y));
|
|
583
|
+
return this._overlayRef;
|
|
584
|
+
}
|
|
585
|
+
const config = this._getOverlayConfig(x, y);
|
|
586
|
+
this._overlayRef = this._overlay.create(config);
|
|
587
|
+
this._overlayRef.keydownEvents()
|
|
588
|
+
.pipe(filter(event => event.key === 'Escape'))
|
|
589
|
+
.subscribe(() => this.closeMenu('keydown'));
|
|
590
|
+
this._overlayRef.backdropClick().subscribe(() => this.closeMenu('backdrop'));
|
|
591
|
+
return this._overlayRef;
|
|
592
|
+
}
|
|
593
|
+
_getOverlayConfig(x, y) {
|
|
594
|
+
return new OverlayConfig({
|
|
595
|
+
positionStrategy: this._getPositionStrategy(x, y),
|
|
596
|
+
scrollStrategy: this._overlay.scrollStrategies.reposition(),
|
|
597
|
+
hasBackdrop: true,
|
|
598
|
+
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
_getPositionStrategy(x, y) {
|
|
602
|
+
return this._overlay.position()
|
|
603
|
+
.flexibleConnectedTo({ x, y })
|
|
604
|
+
.withPush(false)
|
|
605
|
+
.withPositions([
|
|
606
|
+
{
|
|
607
|
+
originX: 'start',
|
|
608
|
+
originY: 'bottom',
|
|
609
|
+
overlayX: 'start',
|
|
610
|
+
overlayY: 'top',
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
originX: 'start',
|
|
614
|
+
originY: 'top',
|
|
615
|
+
overlayX: 'start',
|
|
616
|
+
overlayY: 'bottom',
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
originX: 'end',
|
|
620
|
+
originY: 'bottom',
|
|
621
|
+
overlayX: 'end',
|
|
622
|
+
overlayY: 'top',
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
originX: 'end',
|
|
626
|
+
originY: 'top',
|
|
627
|
+
overlayX: 'end',
|
|
628
|
+
overlayY: 'bottom',
|
|
629
|
+
},
|
|
630
|
+
]);
|
|
631
|
+
}
|
|
632
|
+
_menuClosingActions() {
|
|
633
|
+
const menu = this.menu();
|
|
634
|
+
const detachments = this._overlayRef.detachments();
|
|
635
|
+
const menuClosed = menu ? outputToObservable(menu.closed) : EMPTY;
|
|
636
|
+
return merge(detachments, menuClosed).pipe(filter((reason) => !!reason));
|
|
637
|
+
}
|
|
638
|
+
_handleContextMenu(event) {
|
|
639
|
+
event.preventDefault();
|
|
640
|
+
if (this.menuOpen()) {
|
|
641
|
+
this.closeMenu('click');
|
|
642
|
+
}
|
|
643
|
+
this.openMenu(event.clientX, event.clientY);
|
|
644
|
+
}
|
|
645
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ContextMenuTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
646
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.4", type: ContextMenuTrigger, isStandalone: true, selector: "[ngsContextMenuTriggerFor]", inputs: { menu: { classPropertyName: "menu", publicName: "ngsContextMenuTriggerFor", isSignal: true, isRequired: false, transformFunction: null }, menuData: { classPropertyName: "menuData", publicName: "ngsContextMenuTriggerData", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuOpened: "menuOpened", menuClosed: "menuClosed" }, host: { listeners: { "contextmenu": "_handleContextMenu($event)" } }, exportAs: ["ngsContextMenuTrigger"], ngImport: i0 });
|
|
647
|
+
}
|
|
648
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ContextMenuTrigger, decorators: [{
|
|
649
|
+
type: Directive,
|
|
650
|
+
args: [{
|
|
651
|
+
selector: '[ngsContextMenuTriggerFor]',
|
|
652
|
+
exportAs: 'ngsContextMenuTrigger',
|
|
653
|
+
standalone: true,
|
|
654
|
+
host: {
|
|
655
|
+
'(contextmenu)': '_handleContextMenu($event)',
|
|
656
|
+
}
|
|
657
|
+
}]
|
|
658
|
+
}], propDecorators: { menu: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngsContextMenuTriggerFor", required: false }] }], menuData: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngsContextMenuTriggerData", required: false }] }], menuOpened: [{ type: i0.Output, args: ["menuOpened"] }], menuClosed: [{ type: i0.Output, args: ["menuClosed"] }] } });
|
|
659
|
+
|
|
660
|
+
class MenuHeader {
|
|
661
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MenuHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
662
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: MenuHeader, isStandalone: true, selector: "ngs-menu-header", ngImport: i0, template: "<ng-content/>\n", styles: [":host{display:block;padding:var(--ngs-menu-footer-padding, 0 calc(var(--spacing, .25rem) * 3) calc(var(--spacing, .25rem) * 2) calc(var(--spacing, .25rem) * 3))}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] });
|
|
663
|
+
}
|
|
664
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MenuHeader, decorators: [{
|
|
665
|
+
type: Component,
|
|
666
|
+
args: [{ selector: 'ngs-menu-header', imports: [], template: "<ng-content/>\n", styles: [":host{display:block;padding:var(--ngs-menu-footer-padding, 0 calc(var(--spacing, .25rem) * 3) calc(var(--spacing, .25rem) * 2) calc(var(--spacing, .25rem) * 3))}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
667
|
+
}] });
|
|
668
|
+
|
|
669
|
+
class MenuFooter {
|
|
670
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MenuFooter, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
671
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: MenuFooter, isStandalone: true, selector: "ngs-menu-footer", ngImport: i0, template: "<ng-content/>\n", styles: [":host{display:block;padding:var(--ngs-menu-footer-padding, calc(var(--spacing, .25rem) * 2) calc(var(--spacing, .25rem) * 3) 0 calc(var(--spacing, .25rem) * 3))}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] });
|
|
672
|
+
}
|
|
673
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MenuFooter, decorators: [{
|
|
674
|
+
type: Component,
|
|
675
|
+
args: [{ selector: 'ngs-menu-footer', imports: [], template: "<ng-content/>\n", styles: [":host{display:block;padding:var(--ngs-menu-footer-padding, calc(var(--spacing, .25rem) * 2) calc(var(--spacing, .25rem) * 3) 0 calc(var(--spacing, .25rem) * 3))}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
676
|
+
}] });
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* Injection token used to provide the parent component to options.
|
|
680
|
+
*/
|
|
681
|
+
const OPTION_PARENT_COMPONENT = new InjectionToken('OPTION_PARENT_COMPONENT');
|
|
682
|
+
|
|
683
|
+
class MenuOptionGroupDirective {
|
|
684
|
+
_changeDetectorRef = inject(ChangeDetectorRef);
|
|
685
|
+
_destroyRef = inject(DestroyRef);
|
|
686
|
+
_menu = inject(Menu, { optional: true });
|
|
687
|
+
disableRipple = false;
|
|
688
|
+
inertGroups = false;
|
|
689
|
+
hideSingleSelectionIndicator = false;
|
|
690
|
+
multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
691
|
+
multipleSignal = computed(() => this.multiple(), ...(ngDevMode ? [{ debugName: "multipleSignal" }] : /* istanbul ignore next */ []));
|
|
692
|
+
hideCheckIcon = signal(false, ...(ngDevMode ? [{ debugName: "hideCheckIcon" }] : /* istanbul ignore next */ []));
|
|
693
|
+
_optionsContentChanges = signal(0, ...(ngDevMode ? [{ debugName: "_optionsContentChanges" }] : /* istanbul ignore next */ []));
|
|
694
|
+
_selectionModel;
|
|
695
|
+
_value;
|
|
696
|
+
options = contentChildren(Option, { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), descendants: true });
|
|
697
|
+
ngsOptions = contentChildren(forwardRef(() => Option), { ...(ngDevMode ? { debugName: "ngsOptions" } : /* istanbul ignore next */ {}), descendants: true });
|
|
698
|
+
_options$ = toObservable(this.options);
|
|
699
|
+
_ngsOptions$ = toObservable(this.ngsOptions);
|
|
700
|
+
_initialized = new Subject();
|
|
701
|
+
valueChange = output();
|
|
702
|
+
optionSelectionChanges = merge(this._options$, this._ngsOptions$).pipe(startWith(null), switchMap(() => {
|
|
703
|
+
const options = this.options();
|
|
704
|
+
const ngsOptions = this.ngsOptions();
|
|
705
|
+
const streams = [
|
|
706
|
+
...options.map(option => outputToObservable(option.onSelectionChange)),
|
|
707
|
+
...ngsOptions.map(option => outputToObservable(option.onSelectionChange))
|
|
708
|
+
];
|
|
709
|
+
if (streams.length === 0) {
|
|
710
|
+
return EMPTY;
|
|
711
|
+
}
|
|
712
|
+
return merge(...streams);
|
|
713
|
+
}));
|
|
714
|
+
onChange = () => { };
|
|
715
|
+
onTouched = () => { };
|
|
716
|
+
ngOnInit() {
|
|
717
|
+
this._selectionModel = new SelectionModel(this.multiple());
|
|
718
|
+
}
|
|
719
|
+
registerOnChange(fn) {
|
|
720
|
+
this.onChange = fn;
|
|
721
|
+
}
|
|
722
|
+
registerOnTouched(fn) {
|
|
723
|
+
this.onTouched = fn;
|
|
724
|
+
}
|
|
725
|
+
ngAfterContentInit() {
|
|
726
|
+
this.optionSelectionChanges
|
|
727
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
728
|
+
.subscribe((res) => {
|
|
729
|
+
let source;
|
|
730
|
+
if (res instanceof Option) {
|
|
731
|
+
source = res;
|
|
732
|
+
}
|
|
733
|
+
else if (res && res.source instanceof Option) {
|
|
734
|
+
source = res.source;
|
|
735
|
+
}
|
|
736
|
+
else {
|
|
737
|
+
source = res;
|
|
738
|
+
}
|
|
739
|
+
if (source instanceof Option) {
|
|
740
|
+
this._value = source.value();
|
|
741
|
+
}
|
|
742
|
+
else if (source && typeof source.value === 'function') {
|
|
743
|
+
this._value = source.value();
|
|
744
|
+
}
|
|
745
|
+
else {
|
|
746
|
+
this._value = source.value;
|
|
747
|
+
}
|
|
748
|
+
this._selectOptionByValue();
|
|
749
|
+
this.onChange(this._value);
|
|
750
|
+
if (!this.multiple) {
|
|
751
|
+
this._menu?.close('click');
|
|
752
|
+
}
|
|
753
|
+
});
|
|
754
|
+
this._options$
|
|
755
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
756
|
+
.subscribe(() => {
|
|
757
|
+
this._selectOptionByValue();
|
|
758
|
+
});
|
|
759
|
+
this._ngsOptions$
|
|
760
|
+
.pipe(takeUntilDestroyed(this._destroyRef))
|
|
761
|
+
.subscribe(() => {
|
|
762
|
+
this._selectOptionByValue();
|
|
763
|
+
});
|
|
764
|
+
}
|
|
765
|
+
_selectOptionByValue() {
|
|
766
|
+
const options = this.options();
|
|
767
|
+
const ngsOptions = this.ngsOptions();
|
|
768
|
+
options.forEach(option => {
|
|
769
|
+
if (option.value === this._value) {
|
|
770
|
+
option.select();
|
|
771
|
+
}
|
|
772
|
+
else {
|
|
773
|
+
option.deselect();
|
|
774
|
+
}
|
|
775
|
+
});
|
|
776
|
+
ngsOptions.forEach(option => {
|
|
777
|
+
if (option.value() === this._value) {
|
|
778
|
+
option.select();
|
|
779
|
+
}
|
|
780
|
+
else {
|
|
781
|
+
option.deselect();
|
|
782
|
+
}
|
|
783
|
+
});
|
|
784
|
+
this._changeDetectorRef.markForCheck();
|
|
785
|
+
}
|
|
786
|
+
writeValue(newValue) {
|
|
787
|
+
if (newValue !== this._value) {
|
|
788
|
+
this._value = newValue;
|
|
789
|
+
this._selectOptionByValue();
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MenuOptionGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
793
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.4", type: MenuOptionGroupDirective, isStandalone: true, selector: "[ngsMenuOptionGroup]", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, providers: [
|
|
794
|
+
{
|
|
795
|
+
provide: OPTION_PARENT_COMPONENT,
|
|
796
|
+
useExisting: MenuOptionGroupDirective
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
provide: NG_VALUE_ACCESSOR,
|
|
800
|
+
useExisting: forwardRef(() => MenuOptionGroupDirective),
|
|
801
|
+
multi: true
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
provide: SELECT,
|
|
805
|
+
useFactory: (directive) => {
|
|
806
|
+
return {
|
|
807
|
+
multiple: directive.multipleSignal,
|
|
808
|
+
hideCheckIcon: directive.hideCheckIcon,
|
|
809
|
+
_optionsContentChanges: directive._optionsContentChanges
|
|
810
|
+
};
|
|
811
|
+
},
|
|
812
|
+
deps: [forwardRef(() => MenuOptionGroupDirective)]
|
|
813
|
+
}
|
|
814
|
+
], queries: [{ propertyName: "options", predicate: Option, descendants: true, isSignal: true }, { propertyName: "ngsOptions", predicate: i0.forwardRef(() => Option), descendants: true, isSignal: true }], ngImport: i0 });
|
|
815
|
+
}
|
|
816
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: MenuOptionGroupDirective, decorators: [{
|
|
817
|
+
type: Directive,
|
|
818
|
+
args: [{
|
|
819
|
+
selector: '[ngsMenuOptionGroup]',
|
|
820
|
+
standalone: true,
|
|
821
|
+
providers: [
|
|
822
|
+
{
|
|
823
|
+
provide: OPTION_PARENT_COMPONENT,
|
|
824
|
+
useExisting: MenuOptionGroupDirective
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
provide: NG_VALUE_ACCESSOR,
|
|
828
|
+
useExisting: forwardRef(() => MenuOptionGroupDirective),
|
|
829
|
+
multi: true
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
provide: SELECT,
|
|
833
|
+
useFactory: (directive) => {
|
|
834
|
+
return {
|
|
835
|
+
multiple: directive.multipleSignal,
|
|
836
|
+
hideCheckIcon: directive.hideCheckIcon,
|
|
837
|
+
_optionsContentChanges: directive._optionsContentChanges
|
|
838
|
+
};
|
|
839
|
+
},
|
|
840
|
+
deps: [forwardRef(() => MenuOptionGroupDirective)]
|
|
841
|
+
}
|
|
842
|
+
]
|
|
843
|
+
}]
|
|
844
|
+
}], propDecorators: { multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], options: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => Option), { ...{ descendants: true }, isSignal: true }] }], ngsOptions: [{ type: i0.ContentChildren, args: [forwardRef(() => Option), { ...{ descendants: true }, isSignal: true }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* Generated bundle index. Do not edit.
|
|
848
|
+
*/
|
|
849
|
+
|
|
850
|
+
export { ContextMenuTrigger, Menu, MenuContent, MenuDivider, MenuFooter, MenuHeader, MenuHeading, MenuItem, MenuOptionGroupDirective, MenuTrigger };
|
|
851
|
+
//# sourceMappingURL=ngstarter-ui-components-menu.mjs.map
|