@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,634 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, signal, contentChildren, input, numberAttribute, output, effect, ChangeDetectionStrategy, Component, PLATFORM_ID, Injectable, viewChild, computed, Directive } from '@angular/core';
|
|
3
|
+
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
4
|
+
import { injectElement, arrayShallowEquals, ResizeObserverService, MutationObserverService, zonefreeScheduler, px, typedFromEvent, getActualTarget, isElement } from '@ngstarter-ui/components/core';
|
|
5
|
+
import { isPlatformBrowser, DOCUMENT } from '@angular/common';
|
|
6
|
+
import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
|
+
import { Subscription, BehaviorSubject, combineLatest, distinctUntilChanged, startWith, debounceTime, map, merge, filter } from 'rxjs';
|
|
8
|
+
|
|
9
|
+
const tilesSwap = (order, currentVisualIndex, newVisualIndex) => {
|
|
10
|
+
const reverseOrder = new Map();
|
|
11
|
+
order.forEach((visual, key) => {
|
|
12
|
+
reverseOrder.set(visual, key);
|
|
13
|
+
});
|
|
14
|
+
const keyOfDragged = reverseOrder.get(currentVisualIndex);
|
|
15
|
+
const keyOfTarget = reverseOrder.get(newVisualIndex);
|
|
16
|
+
if (keyOfDragged === undefined || keyOfTarget === undefined) {
|
|
17
|
+
return order;
|
|
18
|
+
}
|
|
19
|
+
const newOrder = new Map(order);
|
|
20
|
+
newOrder.set(keyOfDragged, newVisualIndex);
|
|
21
|
+
newOrder.set(keyOfTarget, currentVisualIndex);
|
|
22
|
+
return newOrder;
|
|
23
|
+
};
|
|
24
|
+
const tilesShift = (order, currentVisualIndex, newVisualIndex) => {
|
|
25
|
+
const reverseOrder = new Map();
|
|
26
|
+
order.forEach((visual, key) => {
|
|
27
|
+
reverseOrder.set(visual, key);
|
|
28
|
+
});
|
|
29
|
+
const keyOfDragged = reverseOrder.get(currentVisualIndex);
|
|
30
|
+
if (keyOfDragged === undefined || currentVisualIndex === newVisualIndex) {
|
|
31
|
+
return order;
|
|
32
|
+
}
|
|
33
|
+
const newOrder = new Map();
|
|
34
|
+
const from = currentVisualIndex;
|
|
35
|
+
const to = newVisualIndex;
|
|
36
|
+
if (from < to) { // Dragging down/right
|
|
37
|
+
order.forEach((visual, key) => {
|
|
38
|
+
if (visual > from && visual <= to) {
|
|
39
|
+
newOrder.set(key, visual - 1); // Shift up/left
|
|
40
|
+
}
|
|
41
|
+
else if (key !== keyOfDragged) {
|
|
42
|
+
newOrder.set(key, visual);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
else { // Dragging up/left
|
|
47
|
+
order.forEach((visual, key) => {
|
|
48
|
+
if (visual >= to && visual < from) {
|
|
49
|
+
newOrder.set(key, visual + 1); // Shift down/right
|
|
50
|
+
}
|
|
51
|
+
else if (key !== keyOfDragged) {
|
|
52
|
+
newOrder.set(key, visual);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
// Place the dragged item at the new position
|
|
57
|
+
newOrder.set(keyOfDragged, to);
|
|
58
|
+
return newOrder;
|
|
59
|
+
};
|
|
60
|
+
const TILES_REORDER = new InjectionToken('TILES_REORDER', { factory: () => tilesShift });
|
|
61
|
+
|
|
62
|
+
class Tiles {
|
|
63
|
+
reorder = inject(TILES_REORDER);
|
|
64
|
+
el = injectElement();
|
|
65
|
+
element = signal(null, ...(ngDevMode ? [{ debugName: "element" }] : /* istanbul ignore next */ []));
|
|
66
|
+
order = signal(new Map(), ...(ngDevMode ? [{ debugName: "order" }] : /* istanbul ignore next */ []));
|
|
67
|
+
tiles = contentChildren(Tile, ...(ngDevMode ? [{ debugName: "tiles" }] : /* istanbul ignore next */ []));
|
|
68
|
+
items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
69
|
+
gap = input(24, ...(ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []));
|
|
70
|
+
columns = input(12, { ...(ngDevMode ? { debugName: "columns" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
71
|
+
orderChange = output();
|
|
72
|
+
orderChanged = output();
|
|
73
|
+
layoutChanged = output();
|
|
74
|
+
rearrangeTimer;
|
|
75
|
+
lastSourceVisualIndex = null;
|
|
76
|
+
lastTargetVisualIndex = null;
|
|
77
|
+
lastSwapTime = 0;
|
|
78
|
+
lastSwapX = 0;
|
|
79
|
+
lastSwapY = 0;
|
|
80
|
+
initialItems = null;
|
|
81
|
+
isInitialized = false;
|
|
82
|
+
isDragging = false;
|
|
83
|
+
constructor() {
|
|
84
|
+
effect(() => {
|
|
85
|
+
const tiles = this.tiles();
|
|
86
|
+
const currentOrder = this.order();
|
|
87
|
+
const newOrder = new Map();
|
|
88
|
+
tiles.forEach((tile, index) => {
|
|
89
|
+
if (currentOrder.has(tile)) {
|
|
90
|
+
newOrder.set(tile, currentOrder.get(tile));
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
newOrder.set(tile, index);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
// Cleanup old entries and check if changed
|
|
97
|
+
let changed = newOrder.size !== currentOrder.size;
|
|
98
|
+
if (!changed) {
|
|
99
|
+
for (const [tile, visualIndex] of newOrder) {
|
|
100
|
+
if (currentOrder.get(tile) !== visualIndex) {
|
|
101
|
+
changed = true;
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
if (changed) {
|
|
107
|
+
this.order.set(newOrder);
|
|
108
|
+
const currentItems = this.items();
|
|
109
|
+
if (currentItems.length > 0 && this.isInitialized && !this.isDragging) {
|
|
110
|
+
const layout = this.calculateLayout(newOrder);
|
|
111
|
+
this.layoutChanged.emit(layout);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
this.isInitialized = true;
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
calculateLayout(currentOrder) {
|
|
118
|
+
const tiles = this.tiles();
|
|
119
|
+
const currentItems = this.items();
|
|
120
|
+
const layout = new Array(currentItems.length);
|
|
121
|
+
tiles.forEach((tile, index) => {
|
|
122
|
+
const visualIndex = currentOrder.get(tile) ?? index;
|
|
123
|
+
if (visualIndex < layout.length) {
|
|
124
|
+
layout[visualIndex] = currentItems[index];
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
return layout.filter(item => item !== undefined);
|
|
128
|
+
}
|
|
129
|
+
onDragEnd(tile) {
|
|
130
|
+
if (this.rearrangeTimer) {
|
|
131
|
+
clearTimeout(this.rearrangeTimer);
|
|
132
|
+
this.rearrangeTimer = null;
|
|
133
|
+
}
|
|
134
|
+
const currentItems = this.items();
|
|
135
|
+
const currentOrder = this.order();
|
|
136
|
+
const tiles = this.tiles();
|
|
137
|
+
if (currentItems.length > 0 && tiles.length > 0) {
|
|
138
|
+
const newItems = new Array(currentItems.length);
|
|
139
|
+
tiles.forEach((tile, index) => {
|
|
140
|
+
const visualIndex = currentOrder.get(tile) ?? index;
|
|
141
|
+
if (visualIndex < newItems.length) {
|
|
142
|
+
newItems[visualIndex] = currentItems[index];
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
// Filter out empty slots if any (though they shouldn't exist if data is consistent)
|
|
146
|
+
const filteredNewItems = newItems.filter(item => item !== undefined);
|
|
147
|
+
if (filteredNewItems.length === currentItems.length) {
|
|
148
|
+
if (this.initialItems && !arrayShallowEquals(this.initialItems, filteredNewItems)) {
|
|
149
|
+
this.orderChanged.emit(filteredNewItems);
|
|
150
|
+
this.layoutChanged.emit(filteredNewItems);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
console.warn('Tiles: New items length mismatch, skip emission', filteredNewItems.length, currentItems.length);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
this.lastSourceVisualIndex = null;
|
|
158
|
+
this.lastTargetVisualIndex = null;
|
|
159
|
+
this.lastSwapTime = 0;
|
|
160
|
+
this.initialItems = null;
|
|
161
|
+
this.isDragging = false;
|
|
162
|
+
}
|
|
163
|
+
onDragStart() {
|
|
164
|
+
this.isDragging = true;
|
|
165
|
+
if (!this.initialItems) {
|
|
166
|
+
this.initialItems = [...this.items()];
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
rearrange(element, event) {
|
|
170
|
+
const draggedElement = this.element();
|
|
171
|
+
const tiles = this.tiles();
|
|
172
|
+
if (!draggedElement || draggedElement === element) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
const draggedTile = tiles.find((tile) => tile.element === draggedElement);
|
|
176
|
+
let targetTile = tiles.find((tile) => tile.element === element);
|
|
177
|
+
if (!draggedTile || !targetTile) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
const order = this.order();
|
|
181
|
+
const draggedVisualIndex = order.get(draggedTile);
|
|
182
|
+
let targetVisualIndex = order.get(targetTile);
|
|
183
|
+
if (draggedVisualIndex === undefined || targetVisualIndex === undefined) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
const isMovingForward = draggedVisualIndex < targetVisualIndex;
|
|
187
|
+
const areSameSize = draggedTile.width() === targetTile.width() && draggedTile.height() === targetTile.height();
|
|
188
|
+
const columns = this.columns();
|
|
189
|
+
const isFullWidth = draggedTile.width() === columns || (draggedTile.width() === 1 && columns === 1);
|
|
190
|
+
// Get the actual floating element's position
|
|
191
|
+
const draggedWrapper = draggedTile.wrapper()?.nativeElement;
|
|
192
|
+
if (!draggedWrapper) {
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
const floatingRect = draggedWrapper.getBoundingClientRect();
|
|
196
|
+
// Check if the edge of the floating block has crossed the midpoint of the target tile
|
|
197
|
+
const targetRect = element.getBoundingClientRect();
|
|
198
|
+
const midX = targetRect.left + targetRect.width / 2;
|
|
199
|
+
const midY = targetRect.top + targetRect.height / 2;
|
|
200
|
+
const deltaX = Math.abs(targetRect.left - floatingRect.left);
|
|
201
|
+
const deltaY = Math.abs(targetRect.top - floatingRect.top);
|
|
202
|
+
let shouldRearrange = false;
|
|
203
|
+
if (isFullWidth && !isMovingForward) {
|
|
204
|
+
// Special logic for full-width tiles when moving up:
|
|
205
|
+
// if the top edge of the dragged tile has passed the bottom third of the target tile
|
|
206
|
+
if (floatingRect.top < targetRect.bottom - targetRect.height * 0.3) {
|
|
207
|
+
shouldRearrange = true;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
else if (isFullWidth && isMovingForward) {
|
|
211
|
+
// Special logic for full-width tiles when moving down:
|
|
212
|
+
// if the bottom edge of the dragged tile has passed the top third of the target tile
|
|
213
|
+
if (floatingRect.bottom > targetRect.top + targetRect.height * 0.3) {
|
|
214
|
+
shouldRearrange = true;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
else if (deltaX > deltaY) {
|
|
218
|
+
// Primarily horizontal movement
|
|
219
|
+
const edgeX = isMovingForward ? floatingRect.right : floatingRect.left;
|
|
220
|
+
const threshold = areSameSize ? (isMovingForward ? targetRect.left + targetRect.width * 0.2 : targetRect.right - targetRect.width * 0.2) : midX;
|
|
221
|
+
if (isMovingForward ? edgeX >= threshold : edgeX <= threshold) {
|
|
222
|
+
shouldRearrange = true;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
// Primarily vertical movement
|
|
227
|
+
const edgeY = isMovingForward ? floatingRect.bottom : floatingRect.top;
|
|
228
|
+
const threshold = areSameSize ? (isMovingForward ? targetRect.top + targetRect.height * 0.2 : targetRect.bottom - targetRect.height * 0.2) : midY;
|
|
229
|
+
if (isMovingForward ? edgeY >= threshold : edgeY <= threshold) {
|
|
230
|
+
shouldRearrange = true;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
if (!shouldRearrange) {
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
// Adjustment for full-width tiles to displace the entire row
|
|
237
|
+
if (isFullWidth) {
|
|
238
|
+
const targetTop = targetRect.top;
|
|
239
|
+
let finalTargetVisualIndex = targetVisualIndex;
|
|
240
|
+
tiles.forEach((t) => {
|
|
241
|
+
const tIndex = order.get(t);
|
|
242
|
+
if (tIndex !== undefined) {
|
|
243
|
+
if (isMovingForward ? tIndex > finalTargetVisualIndex : tIndex < finalTargetVisualIndex) {
|
|
244
|
+
const r = t.element.getBoundingClientRect();
|
|
245
|
+
if (Math.abs(r.top - targetTop) < 5) {
|
|
246
|
+
finalTargetVisualIndex = tIndex;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
if (finalTargetVisualIndex !== targetVisualIndex) {
|
|
252
|
+
const newTargetTile = tiles.find((t) => order.get(t) === finalTargetVisualIndex);
|
|
253
|
+
if (newTargetTile) {
|
|
254
|
+
targetTile = newTargetTile;
|
|
255
|
+
targetVisualIndex = finalTargetVisualIndex;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
// Recalculate size equality after potential adjustment
|
|
260
|
+
const areSameSizeNow = draggedTile.width() === targetTile.width() && draggedTile.height() === targetTile.height();
|
|
261
|
+
// Prevent bouncing: if we just swapped with this tile, don't swap back
|
|
262
|
+
// unless the pointer has moved significantly in the opposite direction.
|
|
263
|
+
const now = Date.now();
|
|
264
|
+
if (now - this.lastSwapTime < 500 && this.lastTargetVisualIndex === draggedVisualIndex && this.lastSourceVisualIndex === targetVisualIndex) {
|
|
265
|
+
const movementX = event.clientX - this.lastSwapX;
|
|
266
|
+
const movementY = event.clientY - this.lastSwapY;
|
|
267
|
+
// If we are moving in the same direction as the original swap, don't swap back
|
|
268
|
+
const wasMovingForward = (this.lastSourceVisualIndex ?? 0) < (this.lastTargetVisualIndex ?? 0);
|
|
269
|
+
if (deltaX > deltaY) {
|
|
270
|
+
if (wasMovingForward ? movementX > -10 : movementX < 10) {
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
if (wasMovingForward ? movementY > -10 : movementY < 10) {
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
// Skip if this is the exact same target we've already started to rearrange to
|
|
281
|
+
if (this.rearrangeTimer && this.lastTargetVisualIndex === targetVisualIndex) {
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
if (this.rearrangeTimer) {
|
|
285
|
+
clearTimeout(this.rearrangeTimer);
|
|
286
|
+
}
|
|
287
|
+
this.lastSourceVisualIndex = draggedVisualIndex;
|
|
288
|
+
this.lastTargetVisualIndex = targetVisualIndex;
|
|
289
|
+
this.rearrangeTimer = setTimeout(() => {
|
|
290
|
+
const orderAtTimeOfExecution = this.order();
|
|
291
|
+
let newOrder;
|
|
292
|
+
this.lastSwapTime = Date.now();
|
|
293
|
+
this.lastSwapX = event.clientX;
|
|
294
|
+
this.lastSwapY = event.clientY;
|
|
295
|
+
if (areSameSizeNow || (isFullWidth && targetTile.width() === 12)) {
|
|
296
|
+
// Use swap for tiles of the same size or full-width tiles swapping with other full-width tiles
|
|
297
|
+
newOrder = new Map(orderAtTimeOfExecution);
|
|
298
|
+
newOrder.set(draggedTile, targetVisualIndex);
|
|
299
|
+
newOrder.set(targetTile, draggedVisualIndex);
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
newOrder = this.reorder(orderAtTimeOfExecution, draggedVisualIndex, targetVisualIndex);
|
|
303
|
+
}
|
|
304
|
+
this.order.set(new Map(newOrder));
|
|
305
|
+
const result = new Map();
|
|
306
|
+
tiles.forEach((tile, index) => {
|
|
307
|
+
result.set(index, newOrder.get(tile) ?? index);
|
|
308
|
+
});
|
|
309
|
+
this.orderChange.emit(result);
|
|
310
|
+
this.rearrangeTimer = null;
|
|
311
|
+
}, 50);
|
|
312
|
+
}
|
|
313
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: Tiles, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
314
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.4", type: Tiles, isStandalone: true, selector: "ngs-tiles", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { orderChange: "orderChange", orderChanged: "orderChanged", layoutChanged: "layoutChanged" }, host: { properties: { "style.--ngs-tiles-columns": "columns()", "style.grid-template-columns": "\"repeat(\" + columns() + \", 1fr)\"" }, classAttribute: "ngs-tiles" }, queries: [{ propertyName: "tiles", predicate: Tile, isSignal: true }], exportAs: ["ngsTiles"], ngImport: i0, template: '<ng-content/>', isInline: true, styles: [":host{--ngs-tiles-columns: 12;--ngs-tiles-row-height: 20px;--ngs-tiles-gap: calc(var(--spacing, .25rem) * 5);position:relative;-webkit-user-select:none;user-select:none;z-index:0;display:grid;grid-template-columns:repeat(var(--ngs-tiles-columns, 12),1fr);grid-auto-flow:dense;justify-items:stretch;gap:var(--ngs-tiles-gap);grid-auto-rows:minmax(var(--ngs-tiles-row-height),auto)}@media(max-width:639px){:host{--ngs-tiles-columns: 1 !important;grid-template-columns:1fr!important}}:host._dragged ngs-tile{pointer-events:auto}:host._dragged ngs-tile._dragged{pointer-events:none}:host._dragged ngs-tile>.t-wrapper{pointer-events:none;will-change:transform}:host._dragged ngs-tile>*{pointer-events:none}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
315
|
+
}
|
|
316
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: Tiles, decorators: [{
|
|
317
|
+
type: Component,
|
|
318
|
+
args: [{ selector: 'ngs-tiles', exportAs: 'ngsTiles', template: '<ng-content/>', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
319
|
+
'class': 'ngs-tiles',
|
|
320
|
+
'[style.--ngs-tiles-columns]': 'columns()',
|
|
321
|
+
'[style.grid-template-columns]': '"repeat(" + columns() + ", 1fr)"',
|
|
322
|
+
}, styles: [":host{--ngs-tiles-columns: 12;--ngs-tiles-row-height: 20px;--ngs-tiles-gap: calc(var(--spacing, .25rem) * 5);position:relative;-webkit-user-select:none;user-select:none;z-index:0;display:grid;grid-template-columns:repeat(var(--ngs-tiles-columns, 12),1fr);grid-auto-flow:dense;justify-items:stretch;gap:var(--ngs-tiles-gap);grid-auto-rows:minmax(var(--ngs-tiles-row-height),auto)}@media(max-width:639px){:host{--ngs-tiles-columns: 1 !important;grid-template-columns:1fr!important}}:host._dragged ngs-tile{pointer-events:auto}:host._dragged ngs-tile._dragged{pointer-events:none}:host._dragged ngs-tile>.t-wrapper{pointer-events:none;will-change:transform}:host._dragged ngs-tile>*{pointer-events:none}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
323
|
+
}], ctorParameters: () => [], propDecorators: { tiles: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => Tile), { isSignal: true }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], orderChange: [{ type: i0.Output, args: ["orderChange"] }], orderChanged: [{ type: i0.Output, args: ["orderChanged"] }], layoutChanged: [{ type: i0.Output, args: ["layoutChanged"] }] } });
|
|
324
|
+
|
|
325
|
+
class TileService {
|
|
326
|
+
isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
327
|
+
el = injectElement();
|
|
328
|
+
tiles = inject(Tiles);
|
|
329
|
+
sub = new Subscription();
|
|
330
|
+
offset$ = new BehaviorSubject([NaN, NaN]);
|
|
331
|
+
resize$ = inject(ResizeObserverService).observe(this.el);
|
|
332
|
+
mutations$ = inject(MutationObserverService).observe(this.el, { childList: true });
|
|
333
|
+
lastRect = null;
|
|
334
|
+
position$ = combineLatest([
|
|
335
|
+
this.offset$.pipe(distinctUntilChanged(arrayShallowEquals)),
|
|
336
|
+
this.resize$.pipe(startWith(null)),
|
|
337
|
+
this.mutations$.pipe(startWith(null)),
|
|
338
|
+
toObservable(this.tiles.order).pipe(debounceTime(0, zonefreeScheduler())),
|
|
339
|
+
]).pipe(debounceTime(0, zonefreeScheduler()), map(([offset, _, __, order]) => ({ offset, order })));
|
|
340
|
+
init(element) {
|
|
341
|
+
if (this.isBrowser && element) {
|
|
342
|
+
this.sub.add(this.position$.subscribe(({ offset, order }) => {
|
|
343
|
+
this.animate(element);
|
|
344
|
+
this.setPosition(element, offset);
|
|
345
|
+
this.setRect(element, offset);
|
|
346
|
+
}));
|
|
347
|
+
}
|
|
348
|
+
else {
|
|
349
|
+
this.el.style.setProperty('position', 'relative');
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
animate(element) {
|
|
353
|
+
const isDragging = !Number.isNaN(this.offset$.value[0]);
|
|
354
|
+
const currentRect = this.el.getBoundingClientRect();
|
|
355
|
+
if (isDragging || (element.style.position === 'fixed' && !element.style.transition.includes('top'))) {
|
|
356
|
+
this.lastRect = currentRect;
|
|
357
|
+
return;
|
|
358
|
+
}
|
|
359
|
+
if (this.lastRect) {
|
|
360
|
+
const dx = this.lastRect.left - currentRect.left;
|
|
361
|
+
const dy = this.lastRect.top - currentRect.top;
|
|
362
|
+
if (dx !== 0 || dy !== 0) {
|
|
363
|
+
element.style.setProperty('transition', 'none');
|
|
364
|
+
element.style.setProperty('transform', `translate(${px(dx)}, ${px(dy)})`);
|
|
365
|
+
// Trigger reflow
|
|
366
|
+
element.offsetHeight;
|
|
367
|
+
element.style.removeProperty('transition');
|
|
368
|
+
element.style.removeProperty('transform');
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
this.lastRect = currentRect;
|
|
372
|
+
}
|
|
373
|
+
setOffset(offset) {
|
|
374
|
+
this.offset$.next(offset);
|
|
375
|
+
}
|
|
376
|
+
ngOnDestroy() {
|
|
377
|
+
this.sub.unsubscribe();
|
|
378
|
+
}
|
|
379
|
+
getRect([left, top]) {
|
|
380
|
+
const elTop = Number.isNaN(top) ? this.el.offsetTop : top;
|
|
381
|
+
const elLeft = Number.isNaN(left) ? this.el.offsetLeft : left;
|
|
382
|
+
const rect = {
|
|
383
|
+
top: elTop,
|
|
384
|
+
left: elLeft,
|
|
385
|
+
width: this.el.clientWidth,
|
|
386
|
+
height: this.el.clientHeight,
|
|
387
|
+
right: NaN,
|
|
388
|
+
bottom: NaN,
|
|
389
|
+
y: elTop,
|
|
390
|
+
x: elLeft,
|
|
391
|
+
};
|
|
392
|
+
return {
|
|
393
|
+
...rect,
|
|
394
|
+
toJSON: () => JSON.stringify(rect),
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
setRect({ style }, offset) {
|
|
398
|
+
const isDragging = !Number.isNaN(offset[0]);
|
|
399
|
+
if (!isDragging) {
|
|
400
|
+
return;
|
|
401
|
+
}
|
|
402
|
+
const { top, left, width, height } = this.getRect(offset);
|
|
403
|
+
style.width = px(width);
|
|
404
|
+
style.height = px(height);
|
|
405
|
+
style.top = px(top);
|
|
406
|
+
style.left = px(left);
|
|
407
|
+
}
|
|
408
|
+
setPosition(element, [left]) {
|
|
409
|
+
const isDragging = !Number.isNaN(left);
|
|
410
|
+
if (isDragging) {
|
|
411
|
+
element.style.setProperty('transition', 'none');
|
|
412
|
+
element.style.setProperty('position', 'fixed');
|
|
413
|
+
element.style.setProperty('z-index', '100');
|
|
414
|
+
// This inline style will override the CSS class, making the floating tile visible
|
|
415
|
+
element.style.setProperty('opacity', '1');
|
|
416
|
+
element.style.setProperty('pointer-events', 'none');
|
|
417
|
+
}
|
|
418
|
+
else if (element.style.position === 'fixed') {
|
|
419
|
+
const { top, left, width, height } = this.el.getBoundingClientRect();
|
|
420
|
+
const currentTop = parseFloat(element.style.top);
|
|
421
|
+
const currentLeft = parseFloat(element.style.left);
|
|
422
|
+
// If already at target, clean up immediately
|
|
423
|
+
if (Math.abs(currentTop - top) < 1 && Math.abs(currentLeft - left) < 1) {
|
|
424
|
+
this.cleanup(element);
|
|
425
|
+
return;
|
|
426
|
+
}
|
|
427
|
+
// Transition for smooth return
|
|
428
|
+
element.style.setProperty('transition', 'top 300ms cubic-bezier(0.2, 0, 0, 1), left 300ms cubic-bezier(0.2, 0, 0, 1), width 300ms cubic-bezier(0.2, 0, 0, 1), height 300ms cubic-bezier(0.2, 0, 0, 1), transform 300ms cubic-bezier(0.2, 0, 0, 1)');
|
|
429
|
+
element.style.top = px(top);
|
|
430
|
+
element.style.left = px(left);
|
|
431
|
+
element.style.width = px(width);
|
|
432
|
+
element.style.height = px(height);
|
|
433
|
+
const onTransitionEnd = (event) => {
|
|
434
|
+
if (event.propertyName === 'top' || event.propertyName === 'left') {
|
|
435
|
+
element.removeEventListener('transitionend', onTransitionEnd);
|
|
436
|
+
this.cleanup(element);
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
element.addEventListener('transitionend', onTransitionEnd);
|
|
440
|
+
// Fallback cleanup if transitionend doesn't fire
|
|
441
|
+
setTimeout(() => {
|
|
442
|
+
element.removeEventListener('transitionend', onTransitionEnd);
|
|
443
|
+
this.cleanup(element);
|
|
444
|
+
}, 400);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
cleanup(element) {
|
|
448
|
+
element.style.removeProperty('transition');
|
|
449
|
+
element.style.removeProperty('position');
|
|
450
|
+
element.style.removeProperty('z-index');
|
|
451
|
+
element.style.removeProperty('opacity');
|
|
452
|
+
element.style.removeProperty('pointer-events');
|
|
453
|
+
element.style.removeProperty('top');
|
|
454
|
+
element.style.removeProperty('left');
|
|
455
|
+
element.style.removeProperty('width');
|
|
456
|
+
element.style.removeProperty('height');
|
|
457
|
+
}
|
|
458
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: TileService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
459
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: TileService });
|
|
460
|
+
}
|
|
461
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: TileService, decorators: [{
|
|
462
|
+
type: Injectable
|
|
463
|
+
}] });
|
|
464
|
+
|
|
465
|
+
const BREAKPOINTS = {
|
|
466
|
+
sm: '(min-width: 640px)',
|
|
467
|
+
md: '(min-width: 768px)',
|
|
468
|
+
lg: '(min-width: 1024px)',
|
|
469
|
+
xl: '(min-width: 1280px)',
|
|
470
|
+
};
|
|
471
|
+
class Tile {
|
|
472
|
+
element = injectElement();
|
|
473
|
+
wrapper = viewChild.required('wrapper');
|
|
474
|
+
service = inject(TileService);
|
|
475
|
+
breakpointObserver = inject(BreakpointObserver);
|
|
476
|
+
breakpointState = signal(this.breakpointObserver.isMatched(Object.values(BREAKPOINTS)), ...(ngDevMode ? [{ debugName: "breakpointState" }] : /* istanbul ignore next */ []));
|
|
477
|
+
tiles = inject(Tiles);
|
|
478
|
+
dragged = signal(false, ...(ngDevMode ? [{ debugName: "dragged" }] : /* istanbul ignore next */ []));
|
|
479
|
+
initialized = signal(false, ...(ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []));
|
|
480
|
+
heightPx = signal(null, ...(ngDevMode ? [{ debugName: "heightPx" }] : /* istanbul ignore next */ []));
|
|
481
|
+
width = input.required(...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
482
|
+
widthSm = input(undefined, { ...(ngDevMode ? { debugName: "widthSm" } : /* istanbul ignore next */ {}), alias: 'width.sm' });
|
|
483
|
+
widthMd = input(undefined, { ...(ngDevMode ? { debugName: "widthMd" } : /* istanbul ignore next */ {}), alias: 'width.md' });
|
|
484
|
+
widthLg = input(undefined, { ...(ngDevMode ? { debugName: "widthLg" } : /* istanbul ignore next */ {}), alias: 'width.lg' });
|
|
485
|
+
widthXl = input(undefined, { ...(ngDevMode ? { debugName: "widthXl" } : /* istanbul ignore next */ {}), alias: 'width.xl' });
|
|
486
|
+
height = input.required(...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
|
|
487
|
+
heightSm = input(undefined, { ...(ngDevMode ? { debugName: "heightSm" } : /* istanbul ignore next */ {}), alias: 'height.sm' });
|
|
488
|
+
heightMd = input(undefined, { ...(ngDevMode ? { debugName: "heightMd" } : /* istanbul ignore next */ {}), alias: 'height.md' });
|
|
489
|
+
heightLg = input(undefined, { ...(ngDevMode ? { debugName: "heightLg" } : /* istanbul ignore next */ {}), alias: 'height.lg' });
|
|
490
|
+
heightXl = input(undefined, { ...(ngDevMode ? { debugName: "heightXl" } : /* istanbul ignore next */ {}), alias: 'height.xl' });
|
|
491
|
+
gridColumn = computed(() => {
|
|
492
|
+
const cols = this.tiles.columns();
|
|
493
|
+
return `span min(var(--ngs-tile-w, ${cols}), ${cols})`;
|
|
494
|
+
}, ...(ngDevMode ? [{ debugName: "gridColumn" }] : /* istanbul ignore next */ []));
|
|
495
|
+
gridRow = computed(() => `span var(--ngs-tile-h, ${this.height()})`, ...(ngDevMode ? [{ debugName: "gridRow" }] : /* istanbul ignore next */ []));
|
|
496
|
+
constructor() {
|
|
497
|
+
this.breakpointObserver.observe(Object.values(BREAKPOINTS)).subscribe(() => {
|
|
498
|
+
this.breakpointState.set(!this.breakpointState());
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
onPointerMove(event) {
|
|
502
|
+
if (this.dragged()) {
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
this.tiles.rearrange(this.element, event);
|
|
506
|
+
}
|
|
507
|
+
onDrag(offset, end = false) {
|
|
508
|
+
const isDragging = !Number.isNaN(offset[0]);
|
|
509
|
+
this.tiles.element.set(isDragging ? this.element : null);
|
|
510
|
+
this.service.setOffset(offset);
|
|
511
|
+
if (isDragging) {
|
|
512
|
+
if (!this.dragged()) {
|
|
513
|
+
const { height } = this.element.getBoundingClientRect();
|
|
514
|
+
this.heightPx.set(height + 'px');
|
|
515
|
+
}
|
|
516
|
+
this.dragged.set(true);
|
|
517
|
+
this.tiles.onDragStart();
|
|
518
|
+
this.tiles.el.classList.add('_dragged');
|
|
519
|
+
}
|
|
520
|
+
else {
|
|
521
|
+
this.dragged.set(false);
|
|
522
|
+
this.heightPx.set(null);
|
|
523
|
+
this.tiles.el.classList.remove('_dragged');
|
|
524
|
+
if (end) {
|
|
525
|
+
this.tiles.onDragEnd(this);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
ngAfterViewInit() {
|
|
530
|
+
this.service.init(this.wrapper()?.nativeElement);
|
|
531
|
+
setTimeout(() => this.initialized.set(true));
|
|
532
|
+
}
|
|
533
|
+
ngOnDestroy() {
|
|
534
|
+
if (this.tiles.element() === this.element) {
|
|
535
|
+
this.tiles.element.set(null);
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: Tile, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
539
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.4", type: Tile, isStandalone: true, selector: "ngs-tile", inputs: { width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: true, transformFunction: null }, widthSm: { classPropertyName: "widthSm", publicName: "width.sm", isSignal: true, isRequired: false, transformFunction: null }, widthMd: { classPropertyName: "widthMd", publicName: "width.md", isSignal: true, isRequired: false, transformFunction: null }, widthLg: { classPropertyName: "widthLg", publicName: "width.lg", isSignal: true, isRequired: false, transformFunction: null }, widthXl: { classPropertyName: "widthXl", publicName: "width.xl", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: true, transformFunction: null }, heightSm: { classPropertyName: "heightSm", publicName: "height.sm", isSignal: true, isRequired: false, transformFunction: null }, heightMd: { classPropertyName: "heightMd", publicName: "height.md", isSignal: true, isRequired: false, transformFunction: null }, heightLg: { classPropertyName: "heightLg", publicName: "height.lg", isSignal: true, isRequired: false, transformFunction: null }, heightXl: { classPropertyName: "heightXl", publicName: "height.xl", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "pointermove": "onPointerMove($event)" }, properties: { "class._dragged": "dragged()", "class._initialized": "initialized()", "style.--ngs-tile-w": "width()", "style.--ngs-tile-w-sm": "widthSm() ?? null", "style.--ngs-tile-w-md": "widthMd() ?? null", "style.--ngs-tile-w-lg": "widthLg() ?? null", "style.--ngs-tile-w-xl": "widthXl() ?? null", "style.--ngs-tile-h": "height()", "style.--ngs-tile-h-sm": "heightSm() ?? null", "style.--ngs-tile-h-md": "heightMd() ?? null", "style.--ngs-tile-h-lg": "heightLg() ?? null", "style.--ngs-tile-h-xl": "heightXl() ?? null", "style.grid-column": "gridColumn()", "style.grid-row": "gridRow()", "style.min-height": "dragged() ? heightPx() : null", "style.min-width": "\"0\"", "style.order": "tiles.order().get(this) ?? 0" } }, providers: [
|
|
540
|
+
TileService
|
|
541
|
+
], viewQueries: [{ propertyName: "wrapper", first: true, predicate: ["wrapper"], descendants: true, isSignal: true }], exportAs: ["ngsTile"], ngImport: i0, template: "<div class=\"t-placeholder\"></div>\n<div #wrapper class=\"t-wrapper\">\n <ng-content/>\n</div>\n", styles: [":host{display:flex;flex-direction:column;position:relative;overflow:visible;-webkit-user-select:none;user-select:none;min-width:0}@media(min-width:640px){:host{--ngs-tile-w: var(--ngs-tile-w-sm, var(--ngs-tile-w));--ngs-tile-h: var(--ngs-tile-h-sm, var(--ngs-tile-h))}}@media(min-width:768px){:host{--ngs-tile-w: var(--ngs-tile-w-md, var(--ngs-tile-w-sm, var(--ngs-tile-w)));--ngs-tile-h: var(--ngs-tile-h-md, var(--ngs-tile-h-sm, var(--ngs-tile-h)))}}@media(min-width:1024px){:host{--ngs-tile-w: var(--ngs-tile-w-lg, var(--ngs-tile-w-md, var(--ngs-tile-w-sm, var(--ngs-tile-w))));--ngs-tile-h: var(--ngs-tile-h-lg, var(--ngs-tile-h-md, var(--ngs-tile-h-sm, var(--ngs-tile-h))))}}@media(min-width:1280px){:host{--ngs-tile-w: var(--ngs-tile-w-xl, var(--ngs-tile-w-lg, var(--ngs-tile-w-md, var(--ngs-tile-w-sm, var(--ngs-tile-w)))));--ngs-tile-h: var(--ngs-tile-h-xl, var(--ngs-tile-h-lg, var(--ngs-tile-h-md, var(--ngs-tile-h-sm, var(--ngs-tile-h)))))}}:host .t-placeholder{position:absolute;inset:0;box-sizing:border-box;border-radius:.75rem;border:2px dashed var(--color-border);background-color:var(--color-surface-container);z-index:1;opacity:0;transition:opacity .15s ease-in-out;pointer-events:none}:host._dragged .t-placeholder{opacity:1}:host>.t-wrapper{flex:1;z-index:2;border-radius:inherit}:host._initialized>.t-wrapper{transition:opacity .15s ease-in-out,transform .3s cubic-bezier(.2,0,0,1),top .3s ease-in-out,left .3s ease-in-out,width .3s ease-in-out,height .3s ease-in-out}:host._dragged>.t-wrapper{z-index:100}:host [ngsTileHandle]{touch-action:none;-webkit-user-select:none;user-select:none}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
542
|
+
}
|
|
543
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: Tile, decorators: [{
|
|
544
|
+
type: Component,
|
|
545
|
+
args: [{ selector: 'ngs-tile', exportAs: 'ngsTile', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
546
|
+
TileService
|
|
547
|
+
], host: {
|
|
548
|
+
'[class._dragged]': 'dragged()',
|
|
549
|
+
'[class._initialized]': 'initialized()',
|
|
550
|
+
'[style.--ngs-tile-w]': 'width()',
|
|
551
|
+
'[style.--ngs-tile-w-sm]': 'widthSm() ?? null',
|
|
552
|
+
'[style.--ngs-tile-w-md]': 'widthMd() ?? null',
|
|
553
|
+
'[style.--ngs-tile-w-lg]': 'widthLg() ?? null',
|
|
554
|
+
'[style.--ngs-tile-w-xl]': 'widthXl() ?? null',
|
|
555
|
+
'[style.--ngs-tile-h]': 'height()',
|
|
556
|
+
'[style.--ngs-tile-h-sm]': 'heightSm() ?? null',
|
|
557
|
+
'[style.--ngs-tile-h-md]': 'heightMd() ?? null',
|
|
558
|
+
'[style.--ngs-tile-h-lg]': 'heightLg() ?? null',
|
|
559
|
+
'[style.--ngs-tile-h-xl]': 'heightXl() ?? null',
|
|
560
|
+
'[style.grid-column]': 'gridColumn()',
|
|
561
|
+
'[style.grid-row]': 'gridRow()',
|
|
562
|
+
'[style.min-height]': 'dragged() ? heightPx() : null',
|
|
563
|
+
'[style.min-width]': '"0"',
|
|
564
|
+
'[style.order]': 'tiles.order().get(this) ?? 0',
|
|
565
|
+
'(pointermove)': 'onPointerMove($event)',
|
|
566
|
+
}, template: "<div class=\"t-placeholder\"></div>\n<div #wrapper class=\"t-wrapper\">\n <ng-content/>\n</div>\n", styles: [":host{display:flex;flex-direction:column;position:relative;overflow:visible;-webkit-user-select:none;user-select:none;min-width:0}@media(min-width:640px){:host{--ngs-tile-w: var(--ngs-tile-w-sm, var(--ngs-tile-w));--ngs-tile-h: var(--ngs-tile-h-sm, var(--ngs-tile-h))}}@media(min-width:768px){:host{--ngs-tile-w: var(--ngs-tile-w-md, var(--ngs-tile-w-sm, var(--ngs-tile-w)));--ngs-tile-h: var(--ngs-tile-h-md, var(--ngs-tile-h-sm, var(--ngs-tile-h)))}}@media(min-width:1024px){:host{--ngs-tile-w: var(--ngs-tile-w-lg, var(--ngs-tile-w-md, var(--ngs-tile-w-sm, var(--ngs-tile-w))));--ngs-tile-h: var(--ngs-tile-h-lg, var(--ngs-tile-h-md, var(--ngs-tile-h-sm, var(--ngs-tile-h))))}}@media(min-width:1280px){:host{--ngs-tile-w: var(--ngs-tile-w-xl, var(--ngs-tile-w-lg, var(--ngs-tile-w-md, var(--ngs-tile-w-sm, var(--ngs-tile-w)))));--ngs-tile-h: var(--ngs-tile-h-xl, var(--ngs-tile-h-lg, var(--ngs-tile-h-md, var(--ngs-tile-h-sm, var(--ngs-tile-h)))))}}:host .t-placeholder{position:absolute;inset:0;box-sizing:border-box;border-radius:.75rem;border:2px dashed var(--color-border);background-color:var(--color-surface-container);z-index:1;opacity:0;transition:opacity .15s ease-in-out;pointer-events:none}:host._dragged .t-placeholder{opacity:1}:host>.t-wrapper{flex:1;z-index:2;border-radius:inherit}:host._initialized>.t-wrapper{transition:opacity .15s ease-in-out,transform .3s cubic-bezier(.2,0,0,1),top .3s ease-in-out,left .3s ease-in-out,width .3s ease-in-out,height .3s ease-in-out}:host._dragged>.t-wrapper{z-index:100}:host [ngsTileHandle]{touch-action:none;-webkit-user-select:none;user-select:none}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
567
|
+
}], ctorParameters: () => [], propDecorators: { wrapper: [{ type: i0.ViewChild, args: ['wrapper', { isSignal: true }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: true }] }], widthSm: [{ type: i0.Input, args: [{ isSignal: true, alias: "width.sm", required: false }] }], widthMd: [{ type: i0.Input, args: [{ isSignal: true, alias: "width.md", required: false }] }], widthLg: [{ type: i0.Input, args: [{ isSignal: true, alias: "width.lg", required: false }] }], widthXl: [{ type: i0.Input, args: [{ isSignal: true, alias: "width.xl", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: true }] }], heightSm: [{ type: i0.Input, args: [{ isSignal: true, alias: "height.sm", required: false }] }], heightMd: [{ type: i0.Input, args: [{ isSignal: true, alias: "height.md", required: false }] }], heightLg: [{ type: i0.Input, args: [{ isSignal: true, alias: "height.lg", required: false }] }], heightXl: [{ type: i0.Input, args: [{ isSignal: true, alias: "height.xl", required: false }] }] } });
|
|
568
|
+
|
|
569
|
+
class TileHandleDirective {
|
|
570
|
+
doc = inject(DOCUMENT);
|
|
571
|
+
tile = inject(Tile);
|
|
572
|
+
x = NaN;
|
|
573
|
+
y = NaN;
|
|
574
|
+
startX = NaN;
|
|
575
|
+
startY = NaN;
|
|
576
|
+
isActuallyDragging = false;
|
|
577
|
+
pointerSub = merge(typedFromEvent(this.doc, 'pointerup'), typedFromEvent(this.doc, 'pointermove'))
|
|
578
|
+
.pipe(filter(() => !Number.isNaN(this.startX)), takeUntilDestroyed())
|
|
579
|
+
.subscribe((event) => {
|
|
580
|
+
if (event.type === 'pointerup') {
|
|
581
|
+
this.onPointer(NaN, NaN, true);
|
|
582
|
+
}
|
|
583
|
+
else {
|
|
584
|
+
const dx = event.x - this.startX;
|
|
585
|
+
const dy = event.y - this.startY;
|
|
586
|
+
if (!this.isActuallyDragging && Math.sqrt(dx * dx + dy * dy) > 2) {
|
|
587
|
+
this.isActuallyDragging = true;
|
|
588
|
+
}
|
|
589
|
+
if (this.isActuallyDragging) {
|
|
590
|
+
this.tile.onDrag([event.x - this.x, event.y - this.y]);
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
onPointer(x = NaN, y = NaN, end = false) {
|
|
595
|
+
const { left, top } = this.tile.element.getBoundingClientRect();
|
|
596
|
+
this.x = x - left;
|
|
597
|
+
this.y = y - top;
|
|
598
|
+
if (end) {
|
|
599
|
+
this.startX = NaN;
|
|
600
|
+
this.startY = NaN;
|
|
601
|
+
this.isActuallyDragging = false;
|
|
602
|
+
this.tile.onDrag([NaN, NaN], end);
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
onStart(event) {
|
|
606
|
+
const pointerEvent = event;
|
|
607
|
+
const target = getActualTarget(pointerEvent);
|
|
608
|
+
const { x, y, pointerId } = pointerEvent;
|
|
609
|
+
if (isElement(target)) {
|
|
610
|
+
target.releasePointerCapture(pointerId);
|
|
611
|
+
}
|
|
612
|
+
this.startX = x;
|
|
613
|
+
this.startY = y;
|
|
614
|
+
this.onPointer(x, y);
|
|
615
|
+
}
|
|
616
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: TileHandleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
617
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: TileHandleDirective, isStandalone: true, selector: "[ngsTileHandle]", host: { listeners: { "pointerdown": "onStart($event)" } }, ngImport: i0 });
|
|
618
|
+
}
|
|
619
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: TileHandleDirective, decorators: [{
|
|
620
|
+
type: Directive,
|
|
621
|
+
args: [{
|
|
622
|
+
selector: '[ngsTileHandle]',
|
|
623
|
+
host: {
|
|
624
|
+
'(pointerdown)': 'onStart($event)'
|
|
625
|
+
},
|
|
626
|
+
}]
|
|
627
|
+
}] });
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Generated bundle index. Do not edit.
|
|
631
|
+
*/
|
|
632
|
+
|
|
633
|
+
export { TILES_REORDER, Tile, TileHandleDirective, TileService, Tiles, tilesShift, tilesSwap };
|
|
634
|
+
//# sourceMappingURL=ngstarter-ui-components-tiles.mjs.map
|