@ngstarter-ui/components 22.3.5 → 22.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/ai/component-registry.json +186 -101
- package/fesm2022/attachment-block-BK9QxVjq.mjs +163 -0
- package/fesm2022/attachment-block-BK9QxVjq.mjs.map +1 -0
- package/fesm2022/callout-block-Bl4GZYz8.mjs +196 -0
- package/fesm2022/callout-block-Bl4GZYz8.mjs.map +1 -0
- package/fesm2022/code-block.component-DCRD-9iP.mjs +393 -0
- package/fesm2022/code-block.component-DCRD-9iP.mjs.map +1 -0
- package/fesm2022/content-builder.store-D622mHxt.mjs +328 -0
- package/fesm2022/content-builder.store-D622mHxt.mjs.map +1 -0
- package/fesm2022/content-editor-content-editable.directive-WzD9_71s.mjs +1110 -0
- package/fesm2022/content-editor-content-editable.directive-WzD9_71s.mjs.map +1 -0
- package/fesm2022/cursor-controller-DKfBII1n.mjs +55 -0
- package/fesm2022/cursor-controller-DKfBII1n.mjs.map +1 -0
- package/fesm2022/default-converters-9oSKDsXP.mjs +140 -0
- package/fesm2022/default-converters-9oSKDsXP.mjs.map +1 -0
- package/fesm2022/divider-block.component-Dvgeq_D0.mjs +148 -0
- package/fesm2022/divider-block.component-Dvgeq_D0.mjs.map +1 -0
- package/fesm2022/embed-block-CYkOv4Wt.mjs +565 -0
- package/fesm2022/embed-block-CYkOv4Wt.mjs.map +1 -0
- package/fesm2022/extra-block-defs-Cn_hfM3c.mjs +122 -0
- package/fesm2022/extra-block-defs-Cn_hfM3c.mjs.map +1 -0
- package/fesm2022/gallery-block-DT3uIURY.mjs +365 -0
- package/fesm2022/gallery-block-DT3uIURY.mjs.map +1 -0
- package/fesm2022/grid-block-ZVDT3m8-.mjs +504 -0
- package/fesm2022/grid-block-ZVDT3m8-.mjs.map +1 -0
- package/fesm2022/heading-block.component-iCpJGTMh.mjs +274 -0
- package/fesm2022/heading-block.component-iCpJGTMh.mjs.map +1 -0
- package/fesm2022/html-utils-DywL8gGa.mjs +24 -0
- package/fesm2022/html-utils-DywL8gGa.mjs.map +1 -0
- package/fesm2022/image-block.component-DJ7-HCR8.mjs +285 -0
- package/fesm2022/image-block.component-DJ7-HCR8.mjs.map +1 -0
- package/fesm2022/list-block.component-qFIebEBO.mjs +312 -0
- package/fesm2022/list-block.component-qFIebEBO.mjs.map +1 -0
- package/fesm2022/nested-blocks-CXhgXJ1H.mjs +345 -0
- package/fesm2022/nested-blocks-CXhgXJ1H.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-action-required.mjs +150 -45
- package/fesm2022/ngstarter-ui-components-action-required.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-alert.mjs +318 -133
- package/fesm2022/ngstarter-ui-components-alert.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-announcement.mjs +280 -88
- package/fesm2022/ngstarter-ui-components-announcement.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-autocomplete.mjs +647 -386
- package/fesm2022/ngstarter-ui-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-avatar.mjs +715 -482
- package/fesm2022/ngstarter-ui-components-avatar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-badge.mjs +308 -97
- package/fesm2022/ngstarter-ui-components-badge.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-block-loader.mjs +164 -47
- package/fesm2022/ngstarter-ui-components-block-loader.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs +278 -315
- package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs +707 -205
- package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-button-toggle.mjs +518 -175
- package/fesm2022/ngstarter-ui-components-button-toggle.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-button.mjs +294 -68
- package/fesm2022/ngstarter-ui-components-button.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-calendar.mjs +442 -250
- package/fesm2022/ngstarter-ui-components-calendar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-card-overlay.mjs +159 -47
- package/fesm2022/ngstarter-ui-components-card-overlay.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-card.mjs +619 -194
- package/fesm2022/ngstarter-ui-components-card.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-carousel.mjs +1012 -634
- package/fesm2022/ngstarter-ui-components-carousel.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-checkbox.mjs +715 -308
- package/fesm2022/ngstarter-ui-components-checkbox.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-chips.mjs +1397 -667
- package/fesm2022/ngstarter-ui-components-chips.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-code-highlighter.mjs +519 -357
- package/fesm2022/ngstarter-ui-components-code-highlighter.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-color-picker.mjs +1218 -604
- package/fesm2022/ngstarter-ui-components-color-picker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-color-scheme.mjs +265 -134
- package/fesm2022/ngstarter-ui-components-color-scheme.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-color-switcher.mjs +190 -71
- package/fesm2022/ngstarter-ui-components-color-switcher.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-command-bar.mjs +197 -58
- package/fesm2022/ngstarter-ui-components-command-bar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-comment-editor.mjs +2212 -1128
- package/fesm2022/ngstarter-ui-components-comment-editor.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-comparison-slider.mjs +269 -183
- package/fesm2022/ngstarter-ui-components-comparison-slider.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-confirm.mjs +164 -86
- package/fesm2022/ngstarter-ui-components-confirm.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-content-editor.mjs +6240 -2
- package/fesm2022/ngstarter-ui-components-content-editor.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-cookie-popup.mjs +244 -108
- package/fesm2022/ngstarter-ui-components-cookie-popup.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-core.mjs +2110 -1592
- package/fesm2022/ngstarter-ui-components-core.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-country-select.mjs +1970 -588
- package/fesm2022/ngstarter-ui-components-country-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-crop.mjs +249 -191
- package/fesm2022/ngstarter-ui-components-crop.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-currency-select.mjs +1658 -452
- package/fesm2022/ngstarter-ui-components-currency-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-data-view.mjs +4538 -2497
- package/fesm2022/ngstarter-ui-components-data-view.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-date-format-select.mjs +357 -157
- package/fesm2022/ngstarter-ui-components-date-format-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-datepicker.mjs +2587 -1264
- package/fesm2022/ngstarter-ui-components-datepicker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-dialog.mjs +681 -385
- package/fesm2022/ngstarter-ui-components-dialog.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-digit-roller.mjs +1000 -750
- package/fesm2022/ngstarter-ui-components-digit-roller.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-divider.mjs +164 -41
- package/fesm2022/ngstarter-ui-components-divider.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-drawer.mjs +218 -143
- package/fesm2022/ngstarter-ui-components-drawer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-emoji-picker.mjs +345 -247
- package/fesm2022/ngstarter-ui-components-emoji-picker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-empty-state.mjs +244 -74
- package/fesm2022/ngstarter-ui-components-empty-state.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-events.mjs +467 -126
- package/fesm2022/ngstarter-ui-components-events.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-expand.mjs +191 -59
- package/fesm2022/ngstarter-ui-components-expand.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-expansion.mjs +529 -193
- package/fesm2022/ngstarter-ui-components-expansion.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-file-type.mjs +270 -171
- package/fesm2022/ngstarter-ui-components-file-type.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-filter-builder.mjs +741 -352
- package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-form-builder.mjs +9032 -6964
- package/fesm2022/ngstarter-ui-components-form-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-form-field.mjs +741 -276
- package/fesm2022/ngstarter-ui-components-form-field.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-gauge.mjs +155 -43
- package/fesm2022/ngstarter-ui-components-gauge.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-grid.mjs +197 -81
- package/fesm2022/ngstarter-ui-components-grid.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-guided-tour.mjs +881 -740
- package/fesm2022/ngstarter-ui-components-guided-tour.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-headless-editor.mjs +3573 -3656
- package/fesm2022/ngstarter-ui-components-headless-editor.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-headless-stepper.mjs +277 -204
- package/fesm2022/ngstarter-ui-components-headless-stepper.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-icon.mjs +209 -182
- package/fesm2022/ngstarter-ui-components-icon.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-image-designer.mjs +5096 -4066
- package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-image-placeholder.mjs +45 -19
- package/fesm2022/ngstarter-ui-components-image-placeholder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-image-resizer.mjs +333 -154
- package/fesm2022/ngstarter-ui-components-image-resizer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-image-viewer.mjs +564 -358
- package/fesm2022/ngstarter-ui-components-image-viewer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs +246 -167
- package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-incidents.mjs +732 -258
- package/fesm2022/ngstarter-ui-components-incidents.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs +244 -182
- package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-input-mask.mjs +314 -174
- package/fesm2022/ngstarter-ui-components-input-mask.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-input-validator.mjs +45 -69
- package/fesm2022/ngstarter-ui-components-input-validator.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-input.mjs +303 -161
- package/fesm2022/ngstarter-ui-components-input.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-kanban-board.mjs +504 -159
- package/fesm2022/ngstarter-ui-components-kanban-board.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-kbd.mjs +86 -30
- package/fesm2022/ngstarter-ui-components-kbd.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-layout.mjs +681 -220
- package/fesm2022/ngstarter-ui-components-layout.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-list.mjs +968 -281
- package/fesm2022/ngstarter-ui-components-list.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-logo.mjs +181 -51
- package/fesm2022/ngstarter-ui-components-logo.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-marquee.mjs +226 -147
- package/fesm2022/ngstarter-ui-components-marquee.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-menu.mjs +1686 -1091
- package/fesm2022/ngstarter-ui-components-menu.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-micro-chart.mjs +1541 -943
- package/fesm2022/ngstarter-ui-components-micro-chart.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-navigation.mjs +1035 -455
- package/fesm2022/ngstarter-ui-components-navigation.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-notifications.mjs +678 -230
- package/fesm2022/ngstarter-ui-components-notifications.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-number-input.mjs +616 -316
- package/fesm2022/ngstarter-ui-components-number-input.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-option.mjs +405 -163
- package/fesm2022/ngstarter-ui-components-option.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-overlay.mjs +107 -111
- package/fesm2022/ngstarter-ui-components-overlay.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs +131 -76
- package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-paginator.mjs +543 -295
- package/fesm2022/ngstarter-ui-components-paginator.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-password-strength.mjs +785 -340
- package/fesm2022/ngstarter-ui-components-password-strength.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-builder.mjs +3705 -2695
- package/fesm2022/ngstarter-ui-components-pdf-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-signer.mjs +1179 -851
- package/fesm2022/ngstarter-ui-components-pdf-signer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs +2973 -2070
- package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-phone-input.mjs +2081 -770
- package/fesm2022/ngstarter-ui-components-phone-input.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-pin-input.mjs +366 -198
- package/fesm2022/ngstarter-ui-components-pin-input.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-popover.mjs +558 -308
- package/fesm2022/ngstarter-ui-components-popover.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-progress-bar.mjs +178 -73
- package/fesm2022/ngstarter-ui-components-progress-bar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-radio-card.mjs +301 -105
- package/fesm2022/ngstarter-ui-components-radio-card.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-radio.mjs +417 -157
- package/fesm2022/ngstarter-ui-components-radio.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-rail-nav.mjs +208 -88
- package/fesm2022/ngstarter-ui-components-rail-nav.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-resizable-container.mjs +123 -74
- package/fesm2022/ngstarter-ui-components-resizable-container.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-screen-loader.mjs +197 -95
- package/fesm2022/ngstarter-ui-components-screen-loader.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-scroll-spy.mjs +383 -245
- package/fesm2022/ngstarter-ui-components-scroll-spy.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs +705 -581
- package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-segmented.mjs +422 -220
- package/fesm2022/ngstarter-ui-components-segmented.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-select.mjs +1862 -1159
- package/fesm2022/ngstarter-ui-components-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-side-panel.mjs +313 -118
- package/fesm2022/ngstarter-ui-components-side-panel.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-sidebar.mjs +1239 -470
- package/fesm2022/ngstarter-ui-components-sidebar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-sidenav.mjs +664 -354
- package/fesm2022/ngstarter-ui-components-sidenav.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-signature-pad.mjs +1092 -643
- package/fesm2022/ngstarter-ui-components-signature-pad.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-skeleton.mjs +153 -43
- package/fesm2022/ngstarter-ui-components-skeleton.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-slide-toggle.mjs +425 -108
- package/fesm2022/ngstarter-ui-components-slide-toggle.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-slider.mjs +645 -487
- package/fesm2022/ngstarter-ui-components-slider.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-snack-bar.mjs +372 -354
- package/fesm2022/ngstarter-ui-components-snack-bar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-sort.mjs +378 -147
- package/fesm2022/ngstarter-ui-components-sort.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-spinner.mjs +242 -76
- package/fesm2022/ngstarter-ui-components-spinner.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-splash-screen.mjs +142 -91
- package/fesm2022/ngstarter-ui-components-splash-screen.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-split.mjs +1067 -929
- package/fesm2022/ngstarter-ui-components-split.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-step-tracker.mjs +617 -331
- package/fesm2022/ngstarter-ui-components-step-tracker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-stepper.mjs +357 -126
- package/fesm2022/ngstarter-ui-components-stepper.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-suggestions.mjs +259 -72
- package/fesm2022/ngstarter-ui-components-suggestions.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-tab-panel.mjs +674 -267
- package/fesm2022/ngstarter-ui-components-tab-panel.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-table.mjs +1144 -662
- package/fesm2022/ngstarter-ui-components-table.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-tabs.mjs +1236 -615
- package/fesm2022/ngstarter-ui-components-tabs.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs +414 -216
- package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-tiles.mjs +939 -647
- package/fesm2022/ngstarter-ui-components-tiles.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-timeline.mjs +418 -122
- package/fesm2022/ngstarter-ui-components-timeline.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-timepicker.mjs +870 -508
- package/fesm2022/ngstarter-ui-components-timepicker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-timezone-select.mjs +651 -371
- package/fesm2022/ngstarter-ui-components-timezone-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-toolbar.mjs +727 -320
- package/fesm2022/ngstarter-ui-components-toolbar.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-tooltip.mjs +601 -521
- package/fesm2022/ngstarter-ui-components-tooltip.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-tree-select.mjs +1197 -434
- package/fesm2022/ngstarter-ui-components-tree-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-tree.mjs +1821 -1262
- package/fesm2022/ngstarter-ui-components-tree.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-upload.mjs +1059 -345
- package/fesm2022/ngstarter-ui-components-upload.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-video-player.mjs +763 -533
- package/fesm2022/ngstarter-ui-components-video-player.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-video-viewer.mjs +630 -229
- package/fesm2022/ngstarter-ui-components-video-viewer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-visual-builder.mjs +40 -17
- package/fesm2022/ngstarter-ui-components-visual-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-whiteboard.mjs +3039 -1803
- package/fesm2022/ngstarter-ui-components-whiteboard.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components.mjs +3 -5
- package/fesm2022/ngstarter-ui-components.mjs.map +1 -1
- package/fesm2022/paragraph-block.component-Csk8Gu3x.mjs +264 -0
- package/fesm2022/paragraph-block.component-Csk8Gu3x.mjs.map +1 -0
- package/fesm2022/plain-text-settings-BnxCxLhA.mjs +354 -0
- package/fesm2022/plain-text-settings-BnxCxLhA.mjs.map +1 -0
- package/fesm2022/quote-block.component-tRmrU97F.mjs +309 -0
- package/fesm2022/quote-block.component-tRmrU97F.mjs.map +1 -0
- package/fesm2022/table-block.component-BuzRRggv.mjs +1859 -0
- package/fesm2022/table-block.component-BuzRRggv.mjs.map +1 -0
- package/fesm2022/toggle-block-C5Jo2YDf.mjs +150 -0
- package/fesm2022/toggle-block-C5Jo2YDf.mjs.map +1 -0
- package/fesm2022/upload-status-tZ0x0BUB.mjs +107 -0
- package/fesm2022/upload-status-tZ0x0BUB.mjs.map +1 -0
- package/fesm2022/video-block.component-CpAXibm6.mjs +312 -0
- package/fesm2022/video-block.component-CpAXibm6.mjs.map +1 -0
- package/package.json +11 -10
- package/styles/_tokens.scss +1 -0
- package/types/ngstarter-ui-components-action-required.d.ts +34 -14
- package/types/ngstarter-ui-components-alert.d.ts +53 -44
- package/types/ngstarter-ui-components-announcement.d.ts +74 -53
- package/types/ngstarter-ui-components-autocomplete.d.ts +141 -84
- package/types/ngstarter-ui-components-avatar.d.ts +113 -66
- package/types/ngstarter-ui-components-badge.d.ts +73 -37
- package/types/ngstarter-ui-components-block-loader.d.ts +32 -20
- package/types/ngstarter-ui-components-bottom-sheet.d.ts +125 -132
- package/types/ngstarter-ui-components-breadcrumbs.d.ts +93 -88
- package/types/ngstarter-ui-components-button-toggle.d.ts +124 -54
- package/types/ngstarter-ui-components-button.d.ts +69 -27
- package/types/ngstarter-ui-components-calendar.d.ts +123 -71
- package/types/ngstarter-ui-components-card-overlay.d.ts +31 -19
- package/types/ngstarter-ui-components-card.d.ts +75 -71
- package/types/ngstarter-ui-components-carousel.d.ts +115 -69
- package/types/ngstarter-ui-components-checkbox.d.ts +183 -86
- package/types/ngstarter-ui-components-chips.d.ts +288 -195
- package/types/ngstarter-ui-components-code-highlighter.d.ts +71 -28
- package/types/ngstarter-ui-components-color-picker.d.ts +140 -89
- package/types/ngstarter-ui-components-color-scheme.d.ts +43 -52
- package/types/ngstarter-ui-components-color-switcher.d.ts +46 -26
- package/types/ngstarter-ui-components-command-bar.d.ts +40 -26
- package/types/ngstarter-ui-components-comment-editor.d.ts +311 -235
- package/types/ngstarter-ui-components-comparison-slider.d.ts +41 -40
- package/types/ngstarter-ui-components-confirm.d.ts +24 -29
- package/types/ngstarter-ui-components-content-editor.d.ts +1482 -998
- package/types/ngstarter-ui-components-cookie-popup.d.ts +43 -38
- package/types/ngstarter-ui-components-core.d.ts +513 -467
- package/types/ngstarter-ui-components-country-select.d.ts +170 -97
- package/types/ngstarter-ui-components-crop.d.ts +67 -52
- package/types/ngstarter-ui-components-currency-select.d.ts +127 -90
- package/types/ngstarter-ui-components-data-view.d.ts +811 -567
- package/types/ngstarter-ui-components-date-format-select.d.ts +90 -58
- package/types/ngstarter-ui-components-datepicker.d.ts +589 -373
- package/types/ngstarter-ui-components-dialog.d.ts +138 -116
- package/types/ngstarter-ui-components-digit-roller.d.ts +228 -131
- package/types/ngstarter-ui-components-divider.d.ts +29 -17
- package/types/ngstarter-ui-components-drawer.d.ts +39 -30
- package/types/ngstarter-ui-components-emoji-picker.d.ts +69 -47
- package/types/ngstarter-ui-components-empty-state.d.ts +20 -28
- package/types/ngstarter-ui-components-events.d.ts +73 -57
- package/types/ngstarter-ui-components-expand.d.ts +55 -25
- package/types/ngstarter-ui-components-expansion.d.ts +93 -64
- package/types/ngstarter-ui-components-file-type.d.ts +53 -27
- package/types/ngstarter-ui-components-filter-builder.d.ts +131 -100
- package/types/ngstarter-ui-components-form-builder.d.ts +1094 -881
- package/types/ngstarter-ui-components-form-field.d.ts +116 -105
- package/types/ngstarter-ui-components-gauge.d.ts +32 -20
- package/types/ngstarter-ui-components-grid.d.ts +66 -50
- package/types/ngstarter-ui-components-guided-tour.d.ts +250 -222
- package/types/ngstarter-ui-components-headless-editor.d.ts +708 -658
- package/types/ngstarter-ui-components-headless-stepper.d.ts +84 -64
- package/types/ngstarter-ui-components-icon.d.ts +39 -38
- package/types/ngstarter-ui-components-image-designer.d.ts +422 -341
- package/types/ngstarter-ui-components-image-placeholder.d.ts +5 -8
- package/types/ngstarter-ui-components-image-resizer.d.ts +40 -33
- package/types/ngstarter-ui-components-image-viewer.d.ts +67 -54
- package/types/ngstarter-ui-components-image-zoom-viewer.d.ts +29 -33
- package/types/ngstarter-ui-components-incidents.d.ts +97 -104
- package/types/ngstarter-ui-components-inline-text-edit.d.ts +54 -39
- package/types/ngstarter-ui-components-input-mask.d.ts +54 -34
- package/types/ngstarter-ui-components-input-validator.d.ts +7 -11
- package/types/ngstarter-ui-components-input.d.ts +82 -54
- package/types/ngstarter-ui-components-kanban-board.d.ts +76 -63
- package/types/ngstarter-ui-components-kbd.d.ts +8 -12
- package/types/ngstarter-ui-components-layout.d.ts +131 -87
- package/types/ngstarter-ui-components-list.d.ts +123 -88
- package/types/ngstarter-ui-components-logo.d.ts +21 -21
- package/types/ngstarter-ui-components-marquee.d.ts +41 -34
- package/types/ngstarter-ui-components-menu.d.ts +329 -221
- package/types/ngstarter-ui-components-micro-chart.d.ts +385 -186
- package/types/ngstarter-ui-components-navigation.d.ts +186 -125
- package/types/ngstarter-ui-components-notifications.d.ts +104 -89
- package/types/ngstarter-ui-components-number-input.d.ts +138 -96
- package/types/ngstarter-ui-components-option.d.ts +102 -68
- package/types/ngstarter-ui-components-overlay.d.ts +7 -12
- package/types/ngstarter-ui-components-page-loading-bar.d.ts +23 -20
- package/types/ngstarter-ui-components-paginator.d.ts +171 -129
- package/types/ngstarter-ui-components-password-strength.d.ts +217 -102
- package/types/ngstarter-ui-components-pdf-builder.d.ts +717 -649
- package/types/ngstarter-ui-components-pdf-signer.d.ts +202 -142
- package/types/ngstarter-ui-components-pdf-viewer.d.ts +544 -385
- package/types/ngstarter-ui-components-phone-input.d.ts +175 -115
- package/types/ngstarter-ui-components-pin-input.d.ts +83 -45
- package/types/ngstarter-ui-components-popover.d.ts +128 -89
- package/types/ngstarter-ui-components-progress-bar.d.ts +49 -30
- package/types/ngstarter-ui-components-radio-card.d.ts +50 -34
- package/types/ngstarter-ui-components-radio.d.ts +100 -47
- package/types/ngstarter-ui-components-rail-nav.d.ts +36 -29
- package/types/ngstarter-ui-components-resizable-container.d.ts +30 -25
- package/types/ngstarter-ui-components-screen-loader.d.ts +38 -32
- package/types/ngstarter-ui-components-scroll-spy.d.ts +56 -60
- package/types/ngstarter-ui-components-scrollbar-area.d.ts +116 -86
- package/types/ngstarter-ui-components-segmented.d.ts +93 -61
- package/types/ngstarter-ui-components-select.d.ts +366 -266
- package/types/ngstarter-ui-components-side-panel.d.ts +59 -40
- package/types/ngstarter-ui-components-sidebar.d.ts +208 -154
- package/types/ngstarter-ui-components-sidenav.d.ts +136 -78
- package/types/ngstarter-ui-components-signature-pad.d.ts +165 -92
- package/types/ngstarter-ui-components-skeleton.d.ts +18 -17
- package/types/ngstarter-ui-components-slide-toggle.d.ts +113 -44
- package/types/ngstarter-ui-components-slider.d.ts +123 -82
- package/types/ngstarter-ui-components-snack-bar.d.ts +126 -134
- package/types/ngstarter-ui-components-sort.d.ts +99 -63
- package/types/ngstarter-ui-components-spinner.d.ts +49 -27
- package/types/ngstarter-ui-components-splash-screen.d.ts +34 -29
- package/types/ngstarter-ui-components-split.d.ts +276 -195
- package/types/ngstarter-ui-components-step-tracker.d.ts +102 -83
- package/types/ngstarter-ui-components-stepper.d.ts +57 -43
- package/types/ngstarter-ui-components-suggestions.d.ts +41 -28
- package/types/ngstarter-ui-components-tab-panel.d.ts +110 -83
- package/types/ngstarter-ui-components-table.d.ts +256 -228
- package/types/ngstarter-ui-components-tabs.d.ts +231 -138
- package/types/ngstarter-ui-components-thumbnail-maker.d.ts +40 -34
- package/types/ngstarter-ui-components-tiles.d.ts +166 -104
- package/types/ngstarter-ui-components-timeline.d.ts +45 -57
- package/types/ngstarter-ui-components-timepicker.d.ts +166 -111
- package/types/ngstarter-ui-components-timezone-select.d.ts +110 -70
- package/types/ngstarter-ui-components-toolbar.d.ts +89 -72
- package/types/ngstarter-ui-components-tooltip.d.ts +89 -52
- package/types/ngstarter-ui-components-tree-select.d.ts +182 -105
- package/types/ngstarter-ui-components-tree.d.ts +355 -229
- package/types/ngstarter-ui-components-upload.d.ts +216 -131
- package/types/ngstarter-ui-components-video-player.d.ts +130 -67
- package/types/ngstarter-ui-components-video-viewer.d.ts +140 -91
- package/types/ngstarter-ui-components-visual-builder.d.ts +5 -8
- package/types/ngstarter-ui-components-whiteboard.d.ts +412 -339
- package/types/ngstarter-ui-components.d.ts +2 -2
- package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-8OmuepvH.mjs +0 -35
- package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-8OmuepvH.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-callout-block-Dp5tISk3.mjs +0 -26
- package/fesm2022/ngstarter-ui-components-content-editor-callout-block-Dp5tISk3.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-BbBs-R_y.mjs +0 -220
- package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-BbBs-R_y.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs +0 -99
- package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-D1nXMRXD.mjs +0 -40
- package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-D1nXMRXD.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-embed-block-DGCCeU-Y.mjs +0 -375
- package/fesm2022/ngstarter-ui-components-content-editor-embed-block-DGCCeU-Y.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-BJfRgtaA.mjs +0 -80
- package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-BJfRgtaA.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-grid-block-C_L7hF2G.mjs +0 -65
- package/fesm2022/ngstarter-ui-components-content-editor-grid-block-C_L7hF2G.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-durrPUhm.mjs +0 -137
- package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-durrPUhm.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-BoL1jZpT.mjs +0 -113
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-BoL1jZpT.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-ChZpgXO5.mjs +0 -235
- package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-ChZpgXO5.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-DwyNFnII.mjs +0 -117
- package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-DwyNFnII.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-BWpJv6CO.mjs +0 -4464
- package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-BWpJv6CO.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-BvNvkqTO.mjs +0 -132
- package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-BvNvkqTO.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-tgNKltfK.mjs +0 -171
- package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-tgNKltfK.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-BcAlqmh8.mjs +0 -1653
- package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-BcAlqmh8.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-S474I51r.mjs +0 -20
- package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-S474I51r.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs +0 -19
- package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-Dj82fxTI.mjs +0 -134
- package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-Dj82fxTI.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-form-builder-plain-text-settings-GNXKGonc.mjs +0 -159
- package/fesm2022/ngstarter-ui-components-form-builder-plain-text-settings-GNXKGonc.mjs.map +0 -1
|
@@ -1,663 +1,955 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, Directive, Injectable, InjectionToken, PLATFORM_ID, computed, contentChildren, effect, inject, input, numberAttribute, output, signal, viewChild } from "@angular/core";
|
|
3
|
+
import { DOCUMENT as DOCUMENT$1, isPlatformBrowser } from "@angular/common";
|
|
4
|
+
import { MutationObserverService, ResizeObserverService, arrayShallowEquals, getActualTarget, injectElement, isElement, px, typedFromEvent, zonefreeScheduler } from "@ngstarter-ui/components/core";
|
|
5
|
+
import { takeUntilDestroyed, toObservable } from "@angular/core/rxjs-interop";
|
|
6
|
+
import { BehaviorSubject, Subscription, combineLatest, debounceTime, distinctUntilChanged, filter, map, merge, startWith } from "rxjs";
|
|
7
|
+
import { BreakpointObserver } from "@angular/cdk/layout";
|
|
9
8
|
const tilesSwap = (order, currentVisualIndex, newVisualIndex) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
newOrder.set(keyOfTarget, currentVisualIndex);
|
|
22
|
-
return newOrder;
|
|
9
|
+
const reverseOrder = /* @__PURE__ */ new Map();
|
|
10
|
+
order.forEach((visual, key) => {
|
|
11
|
+
reverseOrder.set(visual, key);
|
|
12
|
+
});
|
|
13
|
+
const keyOfDragged = reverseOrder.get(currentVisualIndex);
|
|
14
|
+
const keyOfTarget = reverseOrder.get(newVisualIndex);
|
|
15
|
+
if (keyOfDragged === void 0 || keyOfTarget === void 0) return order;
|
|
16
|
+
const newOrder = new Map(order);
|
|
17
|
+
newOrder.set(keyOfDragged, newVisualIndex);
|
|
18
|
+
newOrder.set(keyOfTarget, currentVisualIndex);
|
|
19
|
+
return newOrder;
|
|
23
20
|
};
|
|
24
21
|
const tilesShift = (order, currentVisualIndex, newVisualIndex) => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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;
|
|
22
|
+
const reverseOrder = /* @__PURE__ */ new Map();
|
|
23
|
+
order.forEach((visual, key) => {
|
|
24
|
+
reverseOrder.set(visual, key);
|
|
25
|
+
});
|
|
26
|
+
const keyOfDragged = reverseOrder.get(currentVisualIndex);
|
|
27
|
+
if (keyOfDragged === void 0 || currentVisualIndex === newVisualIndex) return order;
|
|
28
|
+
const newOrder = /* @__PURE__ */ new Map();
|
|
29
|
+
const from = currentVisualIndex;
|
|
30
|
+
const to = newVisualIndex;
|
|
31
|
+
if (from < to) order.forEach((visual, key) => {
|
|
32
|
+
if (visual > from && visual <= to) newOrder.set(key, visual - 1);
|
|
33
|
+
else if (key !== keyOfDragged) newOrder.set(key, visual);
|
|
34
|
+
});
|
|
35
|
+
else order.forEach((visual, key) => {
|
|
36
|
+
if (visual >= to && visual < from) newOrder.set(key, visual + 1);
|
|
37
|
+
else if (key !== keyOfDragged) newOrder.set(key, visual);
|
|
38
|
+
});
|
|
39
|
+
newOrder.set(keyOfDragged, to);
|
|
40
|
+
return newOrder;
|
|
59
41
|
};
|
|
60
|
-
const TILES_REORDER = new InjectionToken(
|
|
61
|
-
|
|
42
|
+
const TILES_REORDER = new InjectionToken("TILES_REORDER", { factory: () => tilesShift });
|
|
62
43
|
const tolerance = 1;
|
|
63
44
|
function contains(outer, inner) {
|
|
64
|
-
|
|
65
|
-
inner.top >= outer.top - tolerance && inner.bottom <= outer.bottom + tolerance;
|
|
45
|
+
return inner.left >= outer.left - tolerance && inner.right <= outer.right + tolerance && inner.top >= outer.top - tolerance && inner.bottom <= outer.bottom + tolerance;
|
|
66
46
|
}
|
|
67
47
|
function overlaps(a, b) {
|
|
68
|
-
|
|
69
|
-
a.top < b.bottom - tolerance && a.bottom > b.top + tolerance;
|
|
48
|
+
return a.left < b.right - tolerance && a.right > b.left + tolerance && a.top < b.bottom - tolerance && a.bottom > b.top + tolerance;
|
|
70
49
|
}
|
|
71
|
-
/** Find a rectangle in the hovered rows that the dragged tile can trade with. */
|
|
72
50
|
function findTileGroup(slots, source, hovered, floating, columnGap, rowGap) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
return closest;
|
|
51
|
+
const area = (rect) => (rect.width + columnGap) * (rect.height + rowGap);
|
|
52
|
+
const sourceArea = area(source);
|
|
53
|
+
let closest;
|
|
54
|
+
let closestDistance = Infinity;
|
|
55
|
+
for (const { tile, rect } of slots) {
|
|
56
|
+
const bounds = new DOMRectReadOnly(rect.left, rect.top, source.width, source.height);
|
|
57
|
+
const horizontalDistance = Math.abs(bounds.left - floating.left);
|
|
58
|
+
if (horizontalDistance > source.width / 4 || !contains(bounds, hovered) || bounds.bottom > source.top + tolerance && bounds.top < source.bottom - tolerance) continue;
|
|
59
|
+
const distance = Math.hypot(horizontalDistance, bounds.top - floating.top);
|
|
60
|
+
if (distance >= closestDistance) continue;
|
|
61
|
+
const covered = slots.filter((slot) => overlaps(bounds, slot.rect));
|
|
62
|
+
if (covered.length < 2 || covered.some((slot) => !contains(bounds, slot.rect))) continue;
|
|
63
|
+
const coveredArea = covered.reduce((sum, slot) => sum + area(slot.rect), 0);
|
|
64
|
+
if (Math.abs(sourceArea - coveredArea) > source.width + source.height) continue;
|
|
65
|
+
closestDistance = distance;
|
|
66
|
+
closest = {
|
|
67
|
+
anchor: tile,
|
|
68
|
+
rect: bounds,
|
|
69
|
+
tiles: new Set(covered.map((slot) => slot.tile))
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
return closest;
|
|
97
73
|
}
|
|
98
74
|
function exchangeTileGroup(slots, dragged, source, group, rtl) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
75
|
+
const ordered = slots.map(({ tile, rect }) => {
|
|
76
|
+
if (tile === dragged) return {
|
|
77
|
+
tile,
|
|
78
|
+
x: group.rect.left,
|
|
79
|
+
y: group.rect.top
|
|
80
|
+
};
|
|
81
|
+
if (group.tiles.has(tile)) return {
|
|
82
|
+
tile,
|
|
83
|
+
x: source.left + rect.left - group.rect.left,
|
|
84
|
+
y: source.top + rect.top - group.rect.top
|
|
85
|
+
};
|
|
86
|
+
return {
|
|
87
|
+
tile,
|
|
88
|
+
x: rect.left,
|
|
89
|
+
y: rect.top
|
|
90
|
+
};
|
|
91
|
+
}).sort((a, b) => Math.abs(a.y - b.y) > tolerance ? a.y - b.y : rtl ? b.x - a.x : a.x - b.x);
|
|
92
|
+
return new Map(ordered.map(({ tile }, index) => [tile, index]));
|
|
109
93
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
94
|
+
var Tiles = class Tiles {
|
|
95
|
+
reorder = inject(TILES_REORDER);
|
|
96
|
+
el = injectElement();
|
|
97
|
+
element = signal(null, ...ngDevMode ? [{ debugName: "element" }] : /* istanbul ignore next */ []);
|
|
98
|
+
order = signal(/* @__PURE__ */ new Map(), ...ngDevMode ? [{ debugName: "order" }] : /* istanbul ignore next */ []);
|
|
99
|
+
tiles = contentChildren(Tile, ...ngDevMode ? [{ debugName: "tiles" }] : /* istanbul ignore next */ []);
|
|
100
|
+
items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
101
|
+
gap = input(24, ...ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []);
|
|
102
|
+
columns = input(12, {
|
|
103
|
+
...ngDevMode ? { debugName: "columns" } : /* istanbul ignore next */ {},
|
|
104
|
+
transform: numberAttribute
|
|
105
|
+
});
|
|
106
|
+
orderChange = output();
|
|
107
|
+
orderChanged = output();
|
|
108
|
+
layoutChanged = output();
|
|
109
|
+
rearrangeTimer;
|
|
110
|
+
pendingTarget;
|
|
111
|
+
lastRearrange;
|
|
112
|
+
initialItems = null;
|
|
113
|
+
isInitialized = false;
|
|
114
|
+
isDragging = false;
|
|
115
|
+
constructor() {
|
|
116
|
+
inject(DestroyRef).onDestroy(() => this.cancelPendingRearrange());
|
|
117
|
+
effect(() => {
|
|
118
|
+
const tiles = this.tiles();
|
|
119
|
+
const currentOrder = this.order();
|
|
120
|
+
const newOrder = /* @__PURE__ */ new Map();
|
|
121
|
+
tiles.forEach((tile, index) => {
|
|
122
|
+
if (currentOrder.has(tile)) newOrder.set(tile, currentOrder.get(tile));
|
|
123
|
+
else newOrder.set(tile, index);
|
|
124
|
+
});
|
|
125
|
+
let changed = newOrder.size !== currentOrder.size;
|
|
126
|
+
if (!changed) {
|
|
127
|
+
for (const [tile, visualIndex] of newOrder) if (currentOrder.get(tile) !== visualIndex) {
|
|
128
|
+
changed = true;
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (changed) {
|
|
133
|
+
this.order.set(newOrder);
|
|
134
|
+
if (this.items().length > 0 && this.isInitialized && !this.isDragging) {
|
|
135
|
+
const layout = this.calculateLayout(newOrder);
|
|
136
|
+
this.layoutChanged.emit(layout);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
this.isInitialized = true;
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
calculateLayout(currentOrder) {
|
|
143
|
+
const tiles = this.tiles();
|
|
144
|
+
const currentItems = this.items();
|
|
145
|
+
const layout = new Array(currentItems.length);
|
|
146
|
+
tiles.forEach((tile, index) => {
|
|
147
|
+
const visualIndex = currentOrder.get(tile) ?? index;
|
|
148
|
+
if (visualIndex < layout.length) layout[visualIndex] = currentItems[index];
|
|
149
|
+
});
|
|
150
|
+
return layout.filter((item) => item !== void 0);
|
|
151
|
+
}
|
|
152
|
+
onDragEnd(tile) {
|
|
153
|
+
this.cancelPendingRearrange();
|
|
154
|
+
const currentItems = this.items();
|
|
155
|
+
const currentOrder = this.order();
|
|
156
|
+
const tiles = this.tiles();
|
|
157
|
+
if (currentItems.length > 0 && tiles.length > 0) {
|
|
158
|
+
const newItems = new Array(currentItems.length);
|
|
159
|
+
tiles.forEach((tile, index) => {
|
|
160
|
+
const visualIndex = currentOrder.get(tile) ?? index;
|
|
161
|
+
if (visualIndex < newItems.length) newItems[visualIndex] = currentItems[index];
|
|
162
|
+
});
|
|
163
|
+
const filteredNewItems = newItems.filter((item) => item !== void 0);
|
|
164
|
+
if (filteredNewItems.length === currentItems.length) {
|
|
165
|
+
if (this.initialItems && !arrayShallowEquals(this.initialItems, filteredNewItems)) {
|
|
166
|
+
this.orderChanged.emit(filteredNewItems);
|
|
167
|
+
this.layoutChanged.emit(filteredNewItems);
|
|
168
|
+
}
|
|
169
|
+
} else console.warn("Tiles: New items length mismatch, skip emission", filteredNewItems.length, currentItems.length);
|
|
170
|
+
}
|
|
171
|
+
this.lastRearrange = void 0;
|
|
172
|
+
this.initialItems = null;
|
|
173
|
+
this.isDragging = false;
|
|
174
|
+
}
|
|
175
|
+
onDragStart() {
|
|
176
|
+
this.isDragging = true;
|
|
177
|
+
if (!this.initialItems) this.initialItems = [...this.items()];
|
|
178
|
+
}
|
|
179
|
+
rearrange(element, event) {
|
|
180
|
+
const draggedElement = this.element();
|
|
181
|
+
const tiles = this.tiles();
|
|
182
|
+
if (!draggedElement || draggedElement === element) return;
|
|
183
|
+
const draggedTile = tiles.find((tile) => tile.element === draggedElement);
|
|
184
|
+
let targetTile = tiles.find((tile) => tile.element === element);
|
|
185
|
+
if (!draggedTile || !targetTile) return;
|
|
186
|
+
const order = this.order();
|
|
187
|
+
const draggedVisualIndex = order.get(draggedTile);
|
|
188
|
+
let targetVisualIndex = order.get(targetTile);
|
|
189
|
+
if (draggedVisualIndex === void 0 || targetVisualIndex === void 0) return;
|
|
190
|
+
const columns = this.columns();
|
|
191
|
+
const isFullWidth = draggedTile.width() === columns;
|
|
192
|
+
const draggedWrapper = draggedTile.wrapper()?.nativeElement;
|
|
193
|
+
if (!draggedWrapper) return;
|
|
194
|
+
const floatingRect = draggedWrapper.getBoundingClientRect();
|
|
195
|
+
const sourceRect = draggedElement.getBoundingClientRect();
|
|
196
|
+
const hoveredRect = element.getBoundingClientRect();
|
|
197
|
+
const areSameSize = Math.abs(sourceRect.width - hoveredRect.width) < 1 && Math.abs(sourceRect.height - hoveredRect.height) < 1;
|
|
198
|
+
const slots = !areSameSize && Math.abs(sourceRect.top - hoveredRect.top) >= 1 && hoveredRect.width <= sourceRect.width + 1 && hoveredRect.height <= sourceRect.height + 1 ? tiles.map((tile) => ({
|
|
199
|
+
tile,
|
|
200
|
+
rect: tile.element.getBoundingClientRect()
|
|
201
|
+
})) : void 0;
|
|
202
|
+
const gridStyle = slots && getComputedStyle(this.el);
|
|
203
|
+
const group = slots && gridStyle && findTileGroup(slots, sourceRect, hoveredRect, floatingRect, parseFloat(gridStyle.columnGap) || 0, parseFloat(gridStyle.rowGap) || 0);
|
|
204
|
+
const targetRect = group?.rect ?? hoveredRect;
|
|
205
|
+
const vertical = Math.abs(sourceRect.top - targetRect.top) >= 1;
|
|
206
|
+
const forward = vertical ? sourceRect.top < targetRect.top : sourceRect.left < targetRect.left;
|
|
207
|
+
const start = vertical ? targetRect.top : targetRect.left;
|
|
208
|
+
const end = vertical ? targetRect.bottom : targetRect.right;
|
|
209
|
+
const fraction = isFullWidth ? .3 : group || areSameSize ? .2 : .5;
|
|
210
|
+
const edge = vertical ? forward ? floatingRect.bottom : floatingRect.top : forward ? floatingRect.right : floatingRect.left;
|
|
211
|
+
const threshold = forward ? start + (end - start) * fraction : end - (end - start) * fraction;
|
|
212
|
+
if (forward ? edge < threshold : edge > threshold) {
|
|
213
|
+
this.cancelPendingRearrange();
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
const last = this.lastRearrange;
|
|
217
|
+
if (last) {
|
|
218
|
+
const movement = vertical ? event.clientY - last.y : event.clientX - last.x;
|
|
219
|
+
if ((forward ? movement : -movement) < 10) {
|
|
220
|
+
this.cancelPendingRearrange();
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
if (isFullWidth && !group) {
|
|
225
|
+
const targetTop = targetRect.top;
|
|
226
|
+
let finalTargetVisualIndex = targetVisualIndex;
|
|
227
|
+
tiles.forEach((t) => {
|
|
228
|
+
const tIndex = order.get(t);
|
|
229
|
+
if (tIndex !== void 0) {
|
|
230
|
+
if (forward ? tIndex > finalTargetVisualIndex : tIndex < finalTargetVisualIndex) {
|
|
231
|
+
const r = t.element.getBoundingClientRect();
|
|
232
|
+
if (Math.abs(r.top - targetTop) < 5) finalTargetVisualIndex = tIndex;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
if (finalTargetVisualIndex !== targetVisualIndex) {
|
|
237
|
+
const newTargetTile = tiles.find((t) => order.get(t) === finalTargetVisualIndex);
|
|
238
|
+
if (newTargetTile) {
|
|
239
|
+
targetTile = newTargetTile;
|
|
240
|
+
targetVisualIndex = finalTargetVisualIndex;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
const pendingTarget = group?.anchor ?? targetTile;
|
|
245
|
+
if (this.pendingTarget === pendingTarget) return;
|
|
246
|
+
this.cancelPendingRearrange();
|
|
247
|
+
this.pendingTarget = pendingTarget;
|
|
248
|
+
const swap = targetTile.element === element && areSameSize || isFullWidth && targetTile.width() === columns;
|
|
249
|
+
this.rearrangeTimer = setTimeout(() => {
|
|
250
|
+
this.rearrangeTimer = void 0;
|
|
251
|
+
this.pendingTarget = void 0;
|
|
252
|
+
if (this.element() !== draggedElement || this.order() !== order) return;
|
|
253
|
+
const newOrder = group && slots ? exchangeTileGroup(slots, draggedTile, sourceRect, group, gridStyle?.direction === "rtl") : (swap ? tilesSwap : this.reorder)(order, draggedVisualIndex, targetVisualIndex);
|
|
254
|
+
if (newOrder === order) return;
|
|
255
|
+
this.lastRearrange = {
|
|
256
|
+
x: event.clientX,
|
|
257
|
+
y: event.clientY
|
|
258
|
+
};
|
|
259
|
+
this.order.set(new Map(newOrder));
|
|
260
|
+
const result = /* @__PURE__ */ new Map();
|
|
261
|
+
tiles.forEach((tile, index) => {
|
|
262
|
+
result.set(index, newOrder.get(tile) ?? index);
|
|
263
|
+
});
|
|
264
|
+
this.orderChange.emit(result);
|
|
265
|
+
}, 50);
|
|
266
|
+
}
|
|
267
|
+
cancelPendingRearrange() {
|
|
268
|
+
clearTimeout(this.rearrangeTimer);
|
|
269
|
+
this.rearrangeTimer = void 0;
|
|
270
|
+
this.pendingTarget = void 0;
|
|
271
|
+
}
|
|
272
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
273
|
+
minVersion: "12.0.0",
|
|
274
|
+
version: "22.3.0",
|
|
275
|
+
ngImport: i0,
|
|
276
|
+
type: Tiles,
|
|
277
|
+
deps: [],
|
|
278
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
279
|
+
});
|
|
280
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
281
|
+
minVersion: "17.2.0",
|
|
282
|
+
version: "22.3.0",
|
|
283
|
+
type: Tiles,
|
|
284
|
+
isStandalone: true,
|
|
285
|
+
selector: "ngs-tiles",
|
|
286
|
+
inputs: {
|
|
287
|
+
items: {
|
|
288
|
+
classPropertyName: "items",
|
|
289
|
+
publicName: "items",
|
|
290
|
+
isSignal: true,
|
|
291
|
+
isRequired: false,
|
|
292
|
+
transformFunction: null
|
|
293
|
+
},
|
|
294
|
+
gap: {
|
|
295
|
+
classPropertyName: "gap",
|
|
296
|
+
publicName: "gap",
|
|
297
|
+
isSignal: true,
|
|
298
|
+
isRequired: false,
|
|
299
|
+
transformFunction: null
|
|
300
|
+
},
|
|
301
|
+
columns: {
|
|
302
|
+
classPropertyName: "columns",
|
|
303
|
+
publicName: "columns",
|
|
304
|
+
isSignal: true,
|
|
305
|
+
isRequired: false,
|
|
306
|
+
transformFunction: null
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
outputs: {
|
|
310
|
+
orderChange: "orderChange",
|
|
311
|
+
orderChanged: "orderChanged",
|
|
312
|
+
layoutChanged: "layoutChanged"
|
|
313
|
+
},
|
|
314
|
+
host: {
|
|
315
|
+
properties: {
|
|
316
|
+
"style.--ngs-tiles-columns": "columns()",
|
|
317
|
+
"style.grid-template-columns": "\"repeat(\" + columns() + \", 1fr)\""
|
|
318
|
+
},
|
|
319
|
+
classAttribute: "ngs-tiles"
|
|
320
|
+
},
|
|
321
|
+
queries: [{
|
|
322
|
+
propertyName: "tiles",
|
|
323
|
+
predicate: Tile,
|
|
324
|
+
isSignal: true
|
|
325
|
+
}],
|
|
326
|
+
exportAs: ["ngsTiles"],
|
|
327
|
+
ngImport: i0,
|
|
328
|
+
template: "<ng-content/>",
|
|
329
|
+
isInline: true,
|
|
330
|
+
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.3.3 | MIT License | https://tailwindcss.com */\n"],
|
|
331
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
332
|
+
});
|
|
333
|
+
};
|
|
334
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
335
|
+
minVersion: "12.0.0",
|
|
336
|
+
version: "22.3.0",
|
|
337
|
+
ngImport: i0,
|
|
338
|
+
type: Tiles,
|
|
339
|
+
decorators: [{
|
|
340
|
+
type: Component,
|
|
341
|
+
args: [{
|
|
342
|
+
selector: "ngs-tiles",
|
|
343
|
+
exportAs: "ngsTiles",
|
|
344
|
+
template: "<ng-content/>",
|
|
345
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
346
|
+
host: {
|
|
347
|
+
"class": "ngs-tiles",
|
|
348
|
+
"[style.--ngs-tiles-columns]": "columns()",
|
|
349
|
+
"[style.grid-template-columns]": "\"repeat(\" + columns() + \", 1fr)\""
|
|
350
|
+
},
|
|
351
|
+
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.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
352
|
+
}]
|
|
353
|
+
}],
|
|
354
|
+
ctorParameters: () => [],
|
|
355
|
+
propDecorators: {
|
|
356
|
+
tiles: [{
|
|
357
|
+
type: i0.ContentChildren,
|
|
358
|
+
args: [i0.forwardRef(() => Tile), { isSignal: true }]
|
|
359
|
+
}],
|
|
360
|
+
items: [{
|
|
361
|
+
type: i0.Input,
|
|
362
|
+
args: [{
|
|
363
|
+
isSignal: true,
|
|
364
|
+
alias: "items",
|
|
365
|
+
required: false
|
|
366
|
+
}]
|
|
367
|
+
}],
|
|
368
|
+
gap: [{
|
|
369
|
+
type: i0.Input,
|
|
370
|
+
args: [{
|
|
371
|
+
isSignal: true,
|
|
372
|
+
alias: "gap",
|
|
373
|
+
required: false
|
|
374
|
+
}]
|
|
375
|
+
}],
|
|
376
|
+
columns: [{
|
|
377
|
+
type: i0.Input,
|
|
378
|
+
args: [{
|
|
379
|
+
isSignal: true,
|
|
380
|
+
alias: "columns",
|
|
381
|
+
required: false
|
|
382
|
+
}]
|
|
383
|
+
}],
|
|
384
|
+
orderChange: [{
|
|
385
|
+
type: i0.Output,
|
|
386
|
+
args: ["orderChange"]
|
|
387
|
+
}],
|
|
388
|
+
orderChanged: [{
|
|
389
|
+
type: i0.Output,
|
|
390
|
+
args: ["orderChanged"]
|
|
391
|
+
}],
|
|
392
|
+
layoutChanged: [{
|
|
393
|
+
type: i0.Output,
|
|
394
|
+
args: ["layoutChanged"]
|
|
395
|
+
}]
|
|
396
|
+
}
|
|
397
|
+
});
|
|
398
|
+
var TileService = class TileService {
|
|
399
|
+
isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
400
|
+
el = injectElement();
|
|
401
|
+
tiles = inject(Tiles);
|
|
402
|
+
sub = new Subscription();
|
|
403
|
+
offset$ = new BehaviorSubject([NaN, NaN]);
|
|
404
|
+
resize$ = inject(ResizeObserverService).observe(this.el);
|
|
405
|
+
mutations$ = inject(MutationObserverService).observe(this.el, { childList: true });
|
|
406
|
+
lastPosition = null;
|
|
407
|
+
lastOrder = /* @__PURE__ */ new Map();
|
|
408
|
+
position$ = combineLatest([
|
|
409
|
+
this.offset$.pipe(distinctUntilChanged(arrayShallowEquals)),
|
|
410
|
+
this.resize$.pipe(startWith(null)),
|
|
411
|
+
this.mutations$.pipe(startWith(null)),
|
|
412
|
+
toObservable(this.tiles.order).pipe(debounceTime(0, zonefreeScheduler()))
|
|
413
|
+
]).pipe(debounceTime(0, zonefreeScheduler()), map(([offset, _, __, order]) => ({
|
|
414
|
+
offset,
|
|
415
|
+
order
|
|
416
|
+
})));
|
|
417
|
+
init(element) {
|
|
418
|
+
if (this.isBrowser && element) this.sub.add(this.position$.subscribe(({ offset, order }) => {
|
|
419
|
+
this.animate(element, order);
|
|
420
|
+
this.setPosition(element, offset);
|
|
421
|
+
this.setRect(element, offset);
|
|
422
|
+
}));
|
|
423
|
+
else this.el.style.setProperty("position", "relative");
|
|
424
|
+
}
|
|
425
|
+
animate(element, order) {
|
|
426
|
+
const isDragging = !Number.isNaN(this.offset$.value[0]);
|
|
427
|
+
const currentPosition = {
|
|
428
|
+
left: this.el.offsetLeft,
|
|
429
|
+
top: this.el.offsetTop
|
|
430
|
+
};
|
|
431
|
+
const reordered = [...order].some(([tile, index]) => this.lastOrder.has(tile) && this.lastOrder.get(tile) !== index);
|
|
432
|
+
this.lastOrder = order;
|
|
433
|
+
if (!reordered || isDragging || element.style.position === "fixed" && !element.style.transition.includes("top")) {
|
|
434
|
+
this.lastPosition = currentPosition;
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
if (this.lastPosition) {
|
|
438
|
+
const dx = this.lastPosition.left - currentPosition.left;
|
|
439
|
+
const dy = this.lastPosition.top - currentPosition.top;
|
|
440
|
+
if (dx !== 0 || dy !== 0) {
|
|
441
|
+
element.style.setProperty("transition", "none");
|
|
442
|
+
element.style.setProperty("transform", `translate(${px(dx)}, ${px(dy)})`);
|
|
443
|
+
element.offsetHeight;
|
|
444
|
+
element.style.removeProperty("transition");
|
|
445
|
+
element.style.removeProperty("transform");
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
this.lastPosition = currentPosition;
|
|
449
|
+
}
|
|
450
|
+
setOffset(offset) {
|
|
451
|
+
this.offset$.next(offset);
|
|
452
|
+
}
|
|
453
|
+
ngOnDestroy() {
|
|
454
|
+
this.sub.unsubscribe();
|
|
455
|
+
}
|
|
456
|
+
getRect([left, top]) {
|
|
457
|
+
const elTop = Number.isNaN(top) ? this.el.offsetTop : top;
|
|
458
|
+
const elLeft = Number.isNaN(left) ? this.el.offsetLeft : left;
|
|
459
|
+
const rect = {
|
|
460
|
+
top: elTop,
|
|
461
|
+
left: elLeft,
|
|
462
|
+
width: this.el.clientWidth,
|
|
463
|
+
height: this.el.clientHeight,
|
|
464
|
+
right: NaN,
|
|
465
|
+
bottom: NaN,
|
|
466
|
+
y: elTop,
|
|
467
|
+
x: elLeft
|
|
468
|
+
};
|
|
469
|
+
return {
|
|
470
|
+
...rect,
|
|
471
|
+
toJSON: () => JSON.stringify(rect)
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
setRect({ style }, offset) {
|
|
475
|
+
if (!!Number.isNaN(offset[0])) return;
|
|
476
|
+
const { top, left, width, height } = this.getRect(offset);
|
|
477
|
+
style.width = px(width);
|
|
478
|
+
style.height = px(height);
|
|
479
|
+
style.top = px(top);
|
|
480
|
+
style.left = px(left);
|
|
481
|
+
}
|
|
482
|
+
setPosition(element, [left]) {
|
|
483
|
+
if (!Number.isNaN(left)) {
|
|
484
|
+
element.style.setProperty("transition", "none");
|
|
485
|
+
element.style.setProperty("position", "fixed");
|
|
486
|
+
element.style.setProperty("z-index", "100");
|
|
487
|
+
element.style.setProperty("opacity", "1");
|
|
488
|
+
element.style.setProperty("pointer-events", "none");
|
|
489
|
+
} else if (element.style.position === "fixed") {
|
|
490
|
+
const { top, left, width, height } = this.el.getBoundingClientRect();
|
|
491
|
+
const currentTop = parseFloat(element.style.top);
|
|
492
|
+
const currentLeft = parseFloat(element.style.left);
|
|
493
|
+
if (Math.abs(currentTop - top) < 1 && Math.abs(currentLeft - left) < 1) {
|
|
494
|
+
this.cleanup(element);
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
497
|
+
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)");
|
|
498
|
+
element.style.top = px(top);
|
|
499
|
+
element.style.left = px(left);
|
|
500
|
+
element.style.width = px(width);
|
|
501
|
+
element.style.height = px(height);
|
|
502
|
+
const onTransitionEnd = (event) => {
|
|
503
|
+
if (event.propertyName === "top" || event.propertyName === "left") {
|
|
504
|
+
element.removeEventListener("transitionend", onTransitionEnd);
|
|
505
|
+
this.cleanup(element);
|
|
506
|
+
}
|
|
507
|
+
};
|
|
508
|
+
element.addEventListener("transitionend", onTransitionEnd);
|
|
509
|
+
setTimeout(() => {
|
|
510
|
+
element.removeEventListener("transitionend", onTransitionEnd);
|
|
511
|
+
this.cleanup(element);
|
|
512
|
+
}, 400);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
cleanup(element) {
|
|
516
|
+
element.style.removeProperty("transition");
|
|
517
|
+
element.style.removeProperty("position");
|
|
518
|
+
element.style.removeProperty("z-index");
|
|
519
|
+
element.style.removeProperty("opacity");
|
|
520
|
+
element.style.removeProperty("pointer-events");
|
|
521
|
+
element.style.removeProperty("top");
|
|
522
|
+
element.style.removeProperty("left");
|
|
523
|
+
element.style.removeProperty("width");
|
|
524
|
+
element.style.removeProperty("height");
|
|
525
|
+
}
|
|
526
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
527
|
+
minVersion: "12.0.0",
|
|
528
|
+
version: "22.3.0",
|
|
529
|
+
ngImport: i0,
|
|
530
|
+
type: TileService,
|
|
531
|
+
deps: [],
|
|
532
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
533
|
+
});
|
|
534
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
535
|
+
minVersion: "12.0.0",
|
|
536
|
+
version: "22.3.0",
|
|
537
|
+
ngImport: i0,
|
|
538
|
+
type: TileService
|
|
539
|
+
});
|
|
540
|
+
};
|
|
541
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
542
|
+
minVersion: "12.0.0",
|
|
543
|
+
version: "22.3.0",
|
|
544
|
+
ngImport: i0,
|
|
545
|
+
type: TileService,
|
|
546
|
+
decorators: [{ type: Injectable }]
|
|
547
|
+
});
|
|
485
548
|
const BREAKPOINTS = {
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
549
|
+
sm: "(min-width: 640px)",
|
|
550
|
+
md: "(min-width: 768px)",
|
|
551
|
+
lg: "(min-width: 1024px)",
|
|
552
|
+
xl: "(min-width: 1280px)"
|
|
490
553
|
};
|
|
491
|
-
class Tile {
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
554
|
+
var Tile = class Tile {
|
|
555
|
+
element = injectElement();
|
|
556
|
+
wrapper = viewChild.required("wrapper", ...ngDevMode ? [{ debugName: "wrapper" }] : /* istanbul ignore next */ []);
|
|
557
|
+
service = inject(TileService);
|
|
558
|
+
breakpointObserver = inject(BreakpointObserver);
|
|
559
|
+
breakpointState = signal(this.breakpointObserver.isMatched(Object.values(BREAKPOINTS)), ...ngDevMode ? [{ debugName: "breakpointState" }] : /* istanbul ignore next */ []);
|
|
560
|
+
tiles = inject(Tiles);
|
|
561
|
+
dragged = signal(false, ...ngDevMode ? [{ debugName: "dragged" }] : /* istanbul ignore next */ []);
|
|
562
|
+
initialized = signal(false, ...ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []);
|
|
563
|
+
heightPx = signal(null, ...ngDevMode ? [{ debugName: "heightPx" }] : /* istanbul ignore next */ []);
|
|
564
|
+
width = input.required(...ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []);
|
|
565
|
+
widthSm = input(void 0, {
|
|
566
|
+
...ngDevMode ? { debugName: "widthSm" } : /* istanbul ignore next */ {},
|
|
567
|
+
alias: "width.sm"
|
|
568
|
+
});
|
|
569
|
+
widthMd = input(void 0, {
|
|
570
|
+
...ngDevMode ? { debugName: "widthMd" } : /* istanbul ignore next */ {},
|
|
571
|
+
alias: "width.md"
|
|
572
|
+
});
|
|
573
|
+
widthLg = input(void 0, {
|
|
574
|
+
...ngDevMode ? { debugName: "widthLg" } : /* istanbul ignore next */ {},
|
|
575
|
+
alias: "width.lg"
|
|
576
|
+
});
|
|
577
|
+
widthXl = input(void 0, {
|
|
578
|
+
...ngDevMode ? { debugName: "widthXl" } : /* istanbul ignore next */ {},
|
|
579
|
+
alias: "width.xl"
|
|
580
|
+
});
|
|
581
|
+
height = input.required(...ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []);
|
|
582
|
+
heightSm = input(void 0, {
|
|
583
|
+
...ngDevMode ? { debugName: "heightSm" } : /* istanbul ignore next */ {},
|
|
584
|
+
alias: "height.sm"
|
|
585
|
+
});
|
|
586
|
+
heightMd = input(void 0, {
|
|
587
|
+
...ngDevMode ? { debugName: "heightMd" } : /* istanbul ignore next */ {},
|
|
588
|
+
alias: "height.md"
|
|
589
|
+
});
|
|
590
|
+
heightLg = input(void 0, {
|
|
591
|
+
...ngDevMode ? { debugName: "heightLg" } : /* istanbul ignore next */ {},
|
|
592
|
+
alias: "height.lg"
|
|
593
|
+
});
|
|
594
|
+
heightXl = input(void 0, {
|
|
595
|
+
...ngDevMode ? { debugName: "heightXl" } : /* istanbul ignore next */ {},
|
|
596
|
+
alias: "height.xl"
|
|
597
|
+
});
|
|
598
|
+
gridColumn = computed(() => {
|
|
599
|
+
const cols = this.tiles.columns();
|
|
600
|
+
return `span min(var(--ngs-tile-w, ${cols}), ${cols})`;
|
|
601
|
+
}, ...ngDevMode ? [{ debugName: "gridColumn" }] : /* istanbul ignore next */ []);
|
|
602
|
+
gridRow = computed(() => `span var(--ngs-tile-h, ${this.height()})`, ...ngDevMode ? [{ debugName: "gridRow" }] : /* istanbul ignore next */ []);
|
|
603
|
+
constructor() {
|
|
604
|
+
this.breakpointObserver.observe(Object.values(BREAKPOINTS)).subscribe(() => {
|
|
605
|
+
this.breakpointState.set(!this.breakpointState());
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
onPointerMove(event) {
|
|
609
|
+
if (this.dragged()) return;
|
|
610
|
+
this.tiles.rearrange(this.element, event);
|
|
611
|
+
}
|
|
612
|
+
onDrag(offset, end = false) {
|
|
613
|
+
const isDragging = !Number.isNaN(offset[0]);
|
|
614
|
+
this.tiles.element.set(isDragging ? this.element : null);
|
|
615
|
+
this.service.setOffset(offset);
|
|
616
|
+
if (isDragging) {
|
|
617
|
+
if (!this.dragged()) {
|
|
618
|
+
const { height } = this.element.getBoundingClientRect();
|
|
619
|
+
this.heightPx.set(height + "px");
|
|
620
|
+
}
|
|
621
|
+
this.dragged.set(true);
|
|
622
|
+
this.tiles.onDragStart();
|
|
623
|
+
this.tiles.el.classList.add("_dragged");
|
|
624
|
+
} else {
|
|
625
|
+
this.dragged.set(false);
|
|
626
|
+
this.heightPx.set(null);
|
|
627
|
+
this.tiles.el.classList.remove("_dragged");
|
|
628
|
+
if (end) this.tiles.onDragEnd(this);
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
ngAfterViewInit() {
|
|
632
|
+
this.service.init(this.wrapper()?.nativeElement);
|
|
633
|
+
setTimeout(() => this.initialized.set(true));
|
|
634
|
+
}
|
|
635
|
+
ngOnDestroy() {
|
|
636
|
+
if (this.tiles.element() === this.element) this.tiles.element.set(null);
|
|
637
|
+
}
|
|
638
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
639
|
+
minVersion: "12.0.0",
|
|
640
|
+
version: "22.3.0",
|
|
641
|
+
ngImport: i0,
|
|
642
|
+
type: Tile,
|
|
643
|
+
deps: [],
|
|
644
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
645
|
+
});
|
|
646
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
647
|
+
minVersion: "17.2.0",
|
|
648
|
+
version: "22.3.0",
|
|
649
|
+
type: Tile,
|
|
650
|
+
isStandalone: true,
|
|
651
|
+
selector: "ngs-tile",
|
|
652
|
+
inputs: {
|
|
653
|
+
width: {
|
|
654
|
+
classPropertyName: "width",
|
|
655
|
+
publicName: "width",
|
|
656
|
+
isSignal: true,
|
|
657
|
+
isRequired: true,
|
|
658
|
+
transformFunction: null
|
|
659
|
+
},
|
|
660
|
+
widthSm: {
|
|
661
|
+
classPropertyName: "widthSm",
|
|
662
|
+
publicName: "width.sm",
|
|
663
|
+
isSignal: true,
|
|
664
|
+
isRequired: false,
|
|
665
|
+
transformFunction: null
|
|
666
|
+
},
|
|
667
|
+
widthMd: {
|
|
668
|
+
classPropertyName: "widthMd",
|
|
669
|
+
publicName: "width.md",
|
|
670
|
+
isSignal: true,
|
|
671
|
+
isRequired: false,
|
|
672
|
+
transformFunction: null
|
|
673
|
+
},
|
|
674
|
+
widthLg: {
|
|
675
|
+
classPropertyName: "widthLg",
|
|
676
|
+
publicName: "width.lg",
|
|
677
|
+
isSignal: true,
|
|
678
|
+
isRequired: false,
|
|
679
|
+
transformFunction: null
|
|
680
|
+
},
|
|
681
|
+
widthXl: {
|
|
682
|
+
classPropertyName: "widthXl",
|
|
683
|
+
publicName: "width.xl",
|
|
684
|
+
isSignal: true,
|
|
685
|
+
isRequired: false,
|
|
686
|
+
transformFunction: null
|
|
687
|
+
},
|
|
688
|
+
height: {
|
|
689
|
+
classPropertyName: "height",
|
|
690
|
+
publicName: "height",
|
|
691
|
+
isSignal: true,
|
|
692
|
+
isRequired: true,
|
|
693
|
+
transformFunction: null
|
|
694
|
+
},
|
|
695
|
+
heightSm: {
|
|
696
|
+
classPropertyName: "heightSm",
|
|
697
|
+
publicName: "height.sm",
|
|
698
|
+
isSignal: true,
|
|
699
|
+
isRequired: false,
|
|
700
|
+
transformFunction: null
|
|
701
|
+
},
|
|
702
|
+
heightMd: {
|
|
703
|
+
classPropertyName: "heightMd",
|
|
704
|
+
publicName: "height.md",
|
|
705
|
+
isSignal: true,
|
|
706
|
+
isRequired: false,
|
|
707
|
+
transformFunction: null
|
|
708
|
+
},
|
|
709
|
+
heightLg: {
|
|
710
|
+
classPropertyName: "heightLg",
|
|
711
|
+
publicName: "height.lg",
|
|
712
|
+
isSignal: true,
|
|
713
|
+
isRequired: false,
|
|
714
|
+
transformFunction: null
|
|
715
|
+
},
|
|
716
|
+
heightXl: {
|
|
717
|
+
classPropertyName: "heightXl",
|
|
718
|
+
publicName: "height.xl",
|
|
719
|
+
isSignal: true,
|
|
720
|
+
isRequired: false,
|
|
721
|
+
transformFunction: null
|
|
722
|
+
}
|
|
723
|
+
},
|
|
724
|
+
host: {
|
|
725
|
+
listeners: { "pointermove": "onPointerMove($event)" },
|
|
726
|
+
properties: {
|
|
727
|
+
"class._dragged": "dragged()",
|
|
728
|
+
"class._initialized": "initialized()",
|
|
729
|
+
"style.--ngs-tile-w": "width()",
|
|
730
|
+
"style.--ngs-tile-w-sm": "widthSm() ?? null",
|
|
731
|
+
"style.--ngs-tile-w-md": "widthMd() ?? null",
|
|
732
|
+
"style.--ngs-tile-w-lg": "widthLg() ?? null",
|
|
733
|
+
"style.--ngs-tile-w-xl": "widthXl() ?? null",
|
|
734
|
+
"style.--ngs-tile-h": "height()",
|
|
735
|
+
"style.--ngs-tile-h-sm": "heightSm() ?? null",
|
|
736
|
+
"style.--ngs-tile-h-md": "heightMd() ?? null",
|
|
737
|
+
"style.--ngs-tile-h-lg": "heightLg() ?? null",
|
|
738
|
+
"style.--ngs-tile-h-xl": "heightXl() ?? null",
|
|
739
|
+
"style.grid-column": "gridColumn()",
|
|
740
|
+
"style.grid-row": "gridRow()",
|
|
741
|
+
"style.min-height": "dragged() ? heightPx() : null",
|
|
742
|
+
"style.min-width": "\"0\"",
|
|
743
|
+
"style.order": "tiles.order().get(this) ?? 0"
|
|
744
|
+
}
|
|
745
|
+
},
|
|
746
|
+
providers: [TileService],
|
|
747
|
+
viewQueries: [{
|
|
748
|
+
propertyName: "wrapper",
|
|
749
|
+
first: true,
|
|
750
|
+
predicate: ["wrapper"],
|
|
751
|
+
descendants: true,
|
|
752
|
+
isSignal: true
|
|
753
|
+
}],
|
|
754
|
+
exportAs: ["ngsTile"],
|
|
755
|
+
ngImport: i0,
|
|
756
|
+
template: "<div class=\"t-placeholder\"></div>\n<div #wrapper class=\"t-wrapper\">\n <ng-content/>\n</div>\n",
|
|
757
|
+
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:var(--ngs-radius-xl);border:2px dashed var(--ngs-color-border);background-color:var(--ngs-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.3.3 | MIT License | https://tailwindcss.com */\n"],
|
|
758
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
759
|
+
});
|
|
760
|
+
};
|
|
761
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
762
|
+
minVersion: "12.0.0",
|
|
763
|
+
version: "22.3.0",
|
|
764
|
+
ngImport: i0,
|
|
765
|
+
type: Tile,
|
|
766
|
+
decorators: [{
|
|
767
|
+
type: Component,
|
|
768
|
+
args: [{
|
|
769
|
+
selector: "ngs-tile",
|
|
770
|
+
exportAs: "ngsTile",
|
|
771
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
772
|
+
providers: [TileService],
|
|
773
|
+
host: {
|
|
774
|
+
"[class._dragged]": "dragged()",
|
|
775
|
+
"[class._initialized]": "initialized()",
|
|
776
|
+
"[style.--ngs-tile-w]": "width()",
|
|
777
|
+
"[style.--ngs-tile-w-sm]": "widthSm() ?? null",
|
|
778
|
+
"[style.--ngs-tile-w-md]": "widthMd() ?? null",
|
|
779
|
+
"[style.--ngs-tile-w-lg]": "widthLg() ?? null",
|
|
780
|
+
"[style.--ngs-tile-w-xl]": "widthXl() ?? null",
|
|
781
|
+
"[style.--ngs-tile-h]": "height()",
|
|
782
|
+
"[style.--ngs-tile-h-sm]": "heightSm() ?? null",
|
|
783
|
+
"[style.--ngs-tile-h-md]": "heightMd() ?? null",
|
|
784
|
+
"[style.--ngs-tile-h-lg]": "heightLg() ?? null",
|
|
785
|
+
"[style.--ngs-tile-h-xl]": "heightXl() ?? null",
|
|
786
|
+
"[style.grid-column]": "gridColumn()",
|
|
787
|
+
"[style.grid-row]": "gridRow()",
|
|
788
|
+
"[style.min-height]": "dragged() ? heightPx() : null",
|
|
789
|
+
"[style.min-width]": "\"0\"",
|
|
790
|
+
"[style.order]": "tiles.order().get(this) ?? 0",
|
|
791
|
+
"(pointermove)": "onPointerMove($event)"
|
|
792
|
+
},
|
|
793
|
+
template: "<div class=\"t-placeholder\"></div>\n<div #wrapper class=\"t-wrapper\">\n <ng-content/>\n</div>\n",
|
|
794
|
+
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:var(--ngs-radius-xl);border:2px dashed var(--ngs-color-border);background-color:var(--ngs-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.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
795
|
+
}]
|
|
796
|
+
}],
|
|
797
|
+
ctorParameters: () => [],
|
|
798
|
+
propDecorators: {
|
|
799
|
+
wrapper: [{
|
|
800
|
+
type: i0.ViewChild,
|
|
801
|
+
args: ["wrapper", { isSignal: true }]
|
|
802
|
+
}],
|
|
803
|
+
width: [{
|
|
804
|
+
type: i0.Input,
|
|
805
|
+
args: [{
|
|
806
|
+
isSignal: true,
|
|
807
|
+
alias: "width",
|
|
808
|
+
required: true
|
|
809
|
+
}]
|
|
810
|
+
}],
|
|
811
|
+
widthSm: [{
|
|
812
|
+
type: i0.Input,
|
|
813
|
+
args: [{
|
|
814
|
+
isSignal: true,
|
|
815
|
+
alias: "width.sm",
|
|
816
|
+
required: false
|
|
817
|
+
}]
|
|
818
|
+
}],
|
|
819
|
+
widthMd: [{
|
|
820
|
+
type: i0.Input,
|
|
821
|
+
args: [{
|
|
822
|
+
isSignal: true,
|
|
823
|
+
alias: "width.md",
|
|
824
|
+
required: false
|
|
825
|
+
}]
|
|
826
|
+
}],
|
|
827
|
+
widthLg: [{
|
|
828
|
+
type: i0.Input,
|
|
829
|
+
args: [{
|
|
830
|
+
isSignal: true,
|
|
831
|
+
alias: "width.lg",
|
|
832
|
+
required: false
|
|
833
|
+
}]
|
|
834
|
+
}],
|
|
835
|
+
widthXl: [{
|
|
836
|
+
type: i0.Input,
|
|
837
|
+
args: [{
|
|
838
|
+
isSignal: true,
|
|
839
|
+
alias: "width.xl",
|
|
840
|
+
required: false
|
|
841
|
+
}]
|
|
842
|
+
}],
|
|
843
|
+
height: [{
|
|
844
|
+
type: i0.Input,
|
|
845
|
+
args: [{
|
|
846
|
+
isSignal: true,
|
|
847
|
+
alias: "height",
|
|
848
|
+
required: true
|
|
849
|
+
}]
|
|
850
|
+
}],
|
|
851
|
+
heightSm: [{
|
|
852
|
+
type: i0.Input,
|
|
853
|
+
args: [{
|
|
854
|
+
isSignal: true,
|
|
855
|
+
alias: "height.sm",
|
|
856
|
+
required: false
|
|
857
|
+
}]
|
|
858
|
+
}],
|
|
859
|
+
heightMd: [{
|
|
860
|
+
type: i0.Input,
|
|
861
|
+
args: [{
|
|
862
|
+
isSignal: true,
|
|
863
|
+
alias: "height.md",
|
|
864
|
+
required: false
|
|
865
|
+
}]
|
|
866
|
+
}],
|
|
867
|
+
heightLg: [{
|
|
868
|
+
type: i0.Input,
|
|
869
|
+
args: [{
|
|
870
|
+
isSignal: true,
|
|
871
|
+
alias: "height.lg",
|
|
872
|
+
required: false
|
|
873
|
+
}]
|
|
874
|
+
}],
|
|
875
|
+
heightXl: [{
|
|
876
|
+
type: i0.Input,
|
|
877
|
+
args: [{
|
|
878
|
+
isSignal: true,
|
|
879
|
+
alias: "height.xl",
|
|
880
|
+
required: false
|
|
881
|
+
}]
|
|
882
|
+
}]
|
|
883
|
+
}
|
|
884
|
+
});
|
|
885
|
+
var TileHandleDirective = class TileHandleDirective {
|
|
886
|
+
doc = inject(DOCUMENT$1);
|
|
887
|
+
tile = inject(Tile);
|
|
888
|
+
x = NaN;
|
|
889
|
+
y = NaN;
|
|
890
|
+
startX = NaN;
|
|
891
|
+
startY = NaN;
|
|
892
|
+
isActuallyDragging = false;
|
|
893
|
+
pointerSub = merge(typedFromEvent(this.doc, "pointerup"), typedFromEvent(this.doc, "pointermove")).pipe(filter(() => !Number.isNaN(this.startX)), takeUntilDestroyed()).subscribe((event) => {
|
|
894
|
+
if (event.type === "pointerup") this.onPointer(NaN, NaN, true);
|
|
895
|
+
else {
|
|
896
|
+
const dx = event.x - this.startX;
|
|
897
|
+
const dy = event.y - this.startY;
|
|
898
|
+
if (!this.isActuallyDragging && Math.sqrt(dx * dx + dy * dy) > 2) this.isActuallyDragging = true;
|
|
899
|
+
if (this.isActuallyDragging) this.tile.onDrag([event.x - this.x, event.y - this.y]);
|
|
900
|
+
}
|
|
901
|
+
});
|
|
902
|
+
onPointer(x = NaN, y = NaN, end = false) {
|
|
903
|
+
const { left, top } = this.tile.element.getBoundingClientRect();
|
|
904
|
+
this.x = x - left;
|
|
905
|
+
this.y = y - top;
|
|
906
|
+
if (end) {
|
|
907
|
+
this.startX = NaN;
|
|
908
|
+
this.startY = NaN;
|
|
909
|
+
this.isActuallyDragging = false;
|
|
910
|
+
this.tile.onDrag([NaN, NaN], end);
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
onStart(event) {
|
|
914
|
+
const pointerEvent = event;
|
|
915
|
+
const target = getActualTarget(pointerEvent);
|
|
916
|
+
const { x, y, pointerId } = pointerEvent;
|
|
917
|
+
if (isElement(target)) target.releasePointerCapture(pointerId);
|
|
918
|
+
this.startX = x;
|
|
919
|
+
this.startY = y;
|
|
920
|
+
this.onPointer(x, y);
|
|
921
|
+
}
|
|
922
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
923
|
+
minVersion: "12.0.0",
|
|
924
|
+
version: "22.3.0",
|
|
925
|
+
ngImport: i0,
|
|
926
|
+
type: TileHandleDirective,
|
|
927
|
+
deps: [],
|
|
928
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
929
|
+
});
|
|
930
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
931
|
+
minVersion: "14.0.0",
|
|
932
|
+
version: "22.3.0",
|
|
933
|
+
type: TileHandleDirective,
|
|
934
|
+
isStandalone: true,
|
|
935
|
+
selector: "[ngsTileHandle]",
|
|
936
|
+
host: { listeners: { "pointerdown": "onStart($event)" } },
|
|
937
|
+
ngImport: i0
|
|
938
|
+
});
|
|
939
|
+
};
|
|
940
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
941
|
+
minVersion: "12.0.0",
|
|
942
|
+
version: "22.3.0",
|
|
943
|
+
ngImport: i0,
|
|
944
|
+
type: TileHandleDirective,
|
|
945
|
+
decorators: [{
|
|
946
|
+
type: Directive,
|
|
947
|
+
args: [{
|
|
948
|
+
selector: "[ngsTileHandle]",
|
|
949
|
+
host: { "(pointerdown)": "onStart($event)" }
|
|
950
|
+
}]
|
|
951
|
+
}]
|
|
952
|
+
});
|
|
662
953
|
export { TILES_REORDER, Tile, TileHandleDirective, TileService, Tiles, tilesShift, tilesSwap };
|
|
663
|
-
|
|
954
|
+
|
|
955
|
+
//# sourceMappingURL=ngstarter-ui-components-tiles.mjs.map
|