@ngstarter-ui/components 22.3.6 → 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-BgKuFsDy.mjs +0 -35
- package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-BgKuFsDy.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-callout-block-CGTJefVK.mjs +0 -26
- package/fesm2022/ngstarter-ui-components-content-editor-callout-block-CGTJefVK.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-B441NasU.mjs +0 -220
- package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-B441NasU.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-Bo3irEeG.mjs +0 -375
- package/fesm2022/ngstarter-ui-components-content-editor-embed-block-Bo3irEeG.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-Cbh0nblW.mjs +0 -80
- package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-Cbh0nblW.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-grid-block-BVQTRzaX.mjs +0 -65
- package/fesm2022/ngstarter-ui-components-content-editor-grid-block-BVQTRzaX.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-CnbRqEWF.mjs +0 -137
- package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-CnbRqEWF.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-Cv9-02mR.mjs +0 -113
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-Cv9-02mR.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-yvSNKY0B.mjs +0 -188
- package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-yvSNKY0B.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-Clz9SzCR.mjs +0 -117
- package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-Clz9SzCR.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CZn1p9ek.mjs +0 -4464
- package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CZn1p9ek.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-CxDRklAS.mjs +0 -132
- package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-CxDRklAS.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-BNgtiV7U.mjs +0 -171
- package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-BNgtiV7U.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-D05mE7nQ.mjs +0 -1653
- package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-D05mE7nQ.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-Ch1kWIaX.mjs +0 -20
- package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-Ch1kWIaX.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-laP7DTyq.mjs +0 -134
- package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-laP7DTyq.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,192 +1,250 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, ElementRef, computed, effect, inject, input, output, signal } from "@angular/core";
|
|
3
|
+
var Crop = class Crop {
|
|
4
|
+
minWidth = input(100, ...ngDevMode ? [{ debugName: "minWidth" }] : /* istanbul ignore next */ []);
|
|
5
|
+
minHeight = input(100, ...ngDevMode ? [{ debugName: "minHeight" }] : /* istanbul ignore next */ []);
|
|
6
|
+
shape = input("rectangle", ...ngDevMode ? [{ debugName: "shape" }] : /* istanbul ignore next */ []);
|
|
7
|
+
selectionApplied = output();
|
|
8
|
+
isCircle = computed(() => this.shape() === "circle", ...ngDevMode ? [{ debugName: "isCircle" }] : /* istanbul ignore next */ []);
|
|
9
|
+
selection = signal({
|
|
10
|
+
top: 20,
|
|
11
|
+
right: 20,
|
|
12
|
+
bottom: 20,
|
|
13
|
+
left: 20
|
|
14
|
+
}, ...ngDevMode ? [{ debugName: "selection" }] : /* istanbul ignore next */ []);
|
|
15
|
+
elementRef = inject(ElementRef);
|
|
16
|
+
activeDragHandle = signal(null, ...ngDevMode ? [{ debugName: "activeDragHandle" }] : /* istanbul ignore next */ []);
|
|
17
|
+
startDragPosition = signal(null, ...ngDevMode ? [{ debugName: "startDragPosition" }] : /* istanbul ignore next */ []);
|
|
18
|
+
startDragSelection = signal(null, ...ngDevMode ? [{ debugName: "startDragSelection" }] : /* istanbul ignore next */ []);
|
|
19
|
+
constructor() {
|
|
20
|
+
effect(() => {
|
|
21
|
+
if (this.isCircle() && this.elementRef.nativeElement.isConnected) this.resetSelectionToSquare();
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
ngAfterViewInit() {
|
|
25
|
+
if (this.isCircle()) {
|
|
26
|
+
const hostEl = this.elementRef.nativeElement;
|
|
27
|
+
if (hostEl.offsetWidth > 0) this.resetSelectionToSquare();
|
|
28
|
+
else {
|
|
29
|
+
const observer = new ResizeObserver(() => {
|
|
30
|
+
if (hostEl.offsetWidth > 0) {
|
|
31
|
+
this.resetSelectionToSquare();
|
|
32
|
+
observer.disconnect();
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
observer.observe(hostEl);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
resetSelectionToSquare() {
|
|
40
|
+
const hostEl = this.elementRef.nativeElement;
|
|
41
|
+
const hostWidth = hostEl.offsetWidth;
|
|
42
|
+
const hostHeight = hostEl.offsetHeight;
|
|
43
|
+
if (hostWidth === 0 || hostHeight === 0) return;
|
|
44
|
+
const size = Math.min(hostWidth, hostHeight) * .8;
|
|
45
|
+
const left = (hostWidth - size) / 2;
|
|
46
|
+
const top = (hostHeight - size) / 2;
|
|
47
|
+
this.selection.set({
|
|
48
|
+
top,
|
|
49
|
+
right: (hostWidth - size) / 2,
|
|
50
|
+
bottom: (hostHeight - size) / 2,
|
|
51
|
+
left
|
|
52
|
+
});
|
|
53
|
+
setTimeout(() => this.emitSelection(), 0);
|
|
54
|
+
}
|
|
55
|
+
selectionStyle = computed(() => ({
|
|
56
|
+
top: `${this.selection().top}px`,
|
|
57
|
+
right: `${this.selection().right}px`,
|
|
58
|
+
bottom: `${this.selection().bottom}px`,
|
|
59
|
+
left: `${this.selection().left}px`
|
|
60
|
+
}), ...ngDevMode ? [{ debugName: "selectionStyle" }] : /* istanbul ignore next */ []);
|
|
61
|
+
onDragStart(event, handle) {
|
|
62
|
+
event.preventDefault();
|
|
63
|
+
event.stopPropagation();
|
|
64
|
+
this.activeDragHandle.set(handle);
|
|
65
|
+
this.startDragPosition.set({
|
|
66
|
+
x: event.clientX,
|
|
67
|
+
y: event.clientY
|
|
68
|
+
});
|
|
69
|
+
this.startDragSelection.set(this.selection());
|
|
70
|
+
}
|
|
71
|
+
onDragEnd() {
|
|
72
|
+
if (!this.activeDragHandle()) return;
|
|
73
|
+
this.activeDragHandle.set(null);
|
|
74
|
+
this.emitSelection();
|
|
75
|
+
}
|
|
76
|
+
emitSelection() {
|
|
77
|
+
const hostEl = this.elementRef.nativeElement;
|
|
78
|
+
const containerWidth = hostEl.offsetWidth;
|
|
79
|
+
const containerHeight = hostEl.offsetHeight;
|
|
80
|
+
if (containerWidth === 0 || containerHeight === 0) return;
|
|
81
|
+
const { top, right, bottom, left } = this.selection();
|
|
82
|
+
const width = containerWidth - left - right;
|
|
83
|
+
const height = containerHeight - top - bottom;
|
|
84
|
+
this.selectionApplied.emit({
|
|
85
|
+
shape: this.shape(),
|
|
86
|
+
pixels: {
|
|
87
|
+
top,
|
|
88
|
+
right,
|
|
89
|
+
bottom,
|
|
90
|
+
left,
|
|
91
|
+
width,
|
|
92
|
+
height
|
|
93
|
+
},
|
|
94
|
+
percentages: {
|
|
95
|
+
top: top / containerHeight * 100,
|
|
96
|
+
right: right / containerWidth * 100,
|
|
97
|
+
bottom: bottom / containerHeight * 100,
|
|
98
|
+
left: left / containerWidth * 100
|
|
99
|
+
},
|
|
100
|
+
containerWidth,
|
|
101
|
+
containerHeight
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
onDrag(event) {
|
|
105
|
+
const handle = this.activeDragHandle();
|
|
106
|
+
if (!handle) return;
|
|
107
|
+
const startPos = this.startDragPosition();
|
|
108
|
+
const startSelection = this.startDragSelection();
|
|
109
|
+
const dx = event.clientX - startPos.x;
|
|
110
|
+
const dy = event.clientY - startPos.y;
|
|
111
|
+
const hostRect = this.elementRef.nativeElement.getBoundingClientRect();
|
|
112
|
+
this.selection.update(() => {
|
|
113
|
+
const newSelection = { ...startSelection };
|
|
114
|
+
if (handle === "move") {
|
|
115
|
+
const selectionWidth = hostRect.width - startSelection.left - startSelection.right;
|
|
116
|
+
const selectionHeight = hostRect.height - startSelection.top - startSelection.bottom;
|
|
117
|
+
newSelection.top = Math.max(0, Math.min(startSelection.top + dy, hostRect.height - selectionHeight));
|
|
118
|
+
newSelection.left = Math.max(0, Math.min(startSelection.left + dx, hostRect.width - selectionWidth));
|
|
119
|
+
newSelection.bottom = hostRect.height - newSelection.top - selectionHeight;
|
|
120
|
+
newSelection.right = hostRect.width - newSelection.left - selectionWidth;
|
|
121
|
+
return newSelection;
|
|
122
|
+
}
|
|
123
|
+
let currentDx = dx;
|
|
124
|
+
let currentDy = dy;
|
|
125
|
+
if (this.isCircle() && handle.includes("-")) {
|
|
126
|
+
if (handle === "top-left" || handle === "bottom-right") currentDy = currentDx;
|
|
127
|
+
else currentDy = -currentDx;
|
|
128
|
+
}
|
|
129
|
+
if (handle.includes("top")) newSelection.top = startSelection.top + currentDy;
|
|
130
|
+
if (handle.includes("bottom")) newSelection.bottom = startSelection.bottom - currentDy;
|
|
131
|
+
if (handle.includes("left")) newSelection.left = startSelection.left + currentDx;
|
|
132
|
+
if (handle.includes("right")) newSelection.right = startSelection.right - currentDx;
|
|
133
|
+
const minW = this.minWidth();
|
|
134
|
+
const minH = this.isCircle() ? minW : this.minHeight();
|
|
135
|
+
if (hostRect.width - newSelection.left - newSelection.right < minW) {
|
|
136
|
+
if (handle.includes("left")) newSelection.left = hostRect.width - newSelection.right - minW;
|
|
137
|
+
else newSelection.right = hostRect.width - newSelection.left - minW;
|
|
138
|
+
}
|
|
139
|
+
if (hostRect.height - newSelection.top - newSelection.bottom < minH) {
|
|
140
|
+
if (handle.includes("top")) newSelection.top = hostRect.height - newSelection.bottom - minH;
|
|
141
|
+
else newSelection.bottom = hostRect.height - newSelection.top - minH;
|
|
142
|
+
}
|
|
143
|
+
newSelection.top = Math.max(0, newSelection.top);
|
|
144
|
+
newSelection.bottom = Math.max(0, newSelection.bottom);
|
|
145
|
+
newSelection.left = Math.max(0, newSelection.left);
|
|
146
|
+
newSelection.right = Math.max(0, newSelection.right);
|
|
147
|
+
return newSelection;
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
151
|
+
minVersion: "12.0.0",
|
|
152
|
+
version: "22.3.0",
|
|
153
|
+
ngImport: i0,
|
|
154
|
+
type: Crop,
|
|
155
|
+
deps: [],
|
|
156
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
157
|
+
});
|
|
158
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
159
|
+
minVersion: "17.1.0",
|
|
160
|
+
version: "22.3.0",
|
|
161
|
+
type: Crop,
|
|
162
|
+
isStandalone: true,
|
|
163
|
+
selector: "ngs-crop",
|
|
164
|
+
inputs: {
|
|
165
|
+
minWidth: {
|
|
166
|
+
classPropertyName: "minWidth",
|
|
167
|
+
publicName: "minWidth",
|
|
168
|
+
isSignal: true,
|
|
169
|
+
isRequired: false,
|
|
170
|
+
transformFunction: null
|
|
171
|
+
},
|
|
172
|
+
minHeight: {
|
|
173
|
+
classPropertyName: "minHeight",
|
|
174
|
+
publicName: "minHeight",
|
|
175
|
+
isSignal: true,
|
|
176
|
+
isRequired: false,
|
|
177
|
+
transformFunction: null
|
|
178
|
+
},
|
|
179
|
+
shape: {
|
|
180
|
+
classPropertyName: "shape",
|
|
181
|
+
publicName: "shape",
|
|
182
|
+
isSignal: true,
|
|
183
|
+
isRequired: false,
|
|
184
|
+
transformFunction: null
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
outputs: { selectionApplied: "selectionApplied" },
|
|
188
|
+
host: { listeners: {
|
|
189
|
+
"document:mouseup": "onDragEnd()",
|
|
190
|
+
"document:mousemove": "onDrag($event)"
|
|
191
|
+
} },
|
|
192
|
+
ngImport: i0,
|
|
193
|
+
template: "<div class=\"crop-viewport\">\n <ng-content />\n <div\n class=\"crop-selection-area\"\n [class.is-circle]=\"isCircle()\"\n [style]=\"selectionStyle()\">\n </div>\n</div>\n\n<!-- Handles are now outside the viewport to prevent clipping -->\n<div\n class=\"crop-handles-overlay\"\n [style]=\"selectionStyle()\">\n <div class=\"crop-handle move-handle\" (mousedown)=\"onDragStart($event, 'move')\"></div>\n <div class=\"crop-handle top-left\" (mousedown)=\"onDragStart($event, 'top-left')\"></div>\n <div class=\"crop-handle top-right\" (mousedown)=\"onDragStart($event, 'top-right')\"></div>\n <div class=\"crop-handle bottom-left\" (mousedown)=\"onDragStart($event, 'bottom-left')\"></div>\n <div class=\"crop-handle bottom-right\" (mousedown)=\"onDragStart($event, 'bottom-right')\"></div>\n\n <div class=\"crop-handle top\" [class.hidden]=\"isCircle()\" (mousedown)=\"onDragStart($event, 'top')\"></div>\n <div class=\"crop-handle right\" [class.hidden]=\"isCircle()\" (mousedown)=\"onDragStart($event, 'right')\"></div>\n <div class=\"crop-handle bottom\" [class.hidden]=\"isCircle()\" (mousedown)=\"onDragStart($event, 'bottom')\"></div>\n <div class=\"crop-handle left\" [class.hidden]=\"isCircle()\" (mousedown)=\"onDragStart($event, 'left')\"></div>\n</div>\n",
|
|
194
|
+
styles: [":host{display:inline-block;position:relative;-webkit-user-select:none;user-select:none}:host .crop-viewport{position:relative;width:100%;height:100%;overflow:hidden}:host ::ng-deep>.crop-viewport>*:first-child{display:block;max-width:100%;height:auto}:host .crop-selection-area{position:absolute;box-shadow:0 0 0 2000px #00000080}:host .crop-selection-area.is-circle{border-radius:50%}:host .crop-handles-overlay{position:absolute}:host .crop-handles-overlay.is-circle{border-radius:50%}:host .crop-handle{position:absolute;width:14px;height:14px;background:#ffffffe6;border:1px solid rgba(0,0,0,.5);border-radius:50%}:host .crop-handle.hidden{display:none}:host .move-handle{position:absolute;inset:0;width:auto;height:auto;background:transparent;border:none;border-radius:0;cursor:move}.is-circle :host .move-handle{border-radius:50%}:host .top-left{top:-7px;left:-7px;cursor:nwse-resize}:host .top-right{top:-7px;right:-7px;cursor:nesw-resize}:host .bottom-left{bottom:-7px;left:-7px;cursor:nesw-resize}:host .bottom-right{bottom:-7px;right:-7px;cursor:nwse-resize}:host .top{top:-7px;left:50%;transform:translate(-50%);cursor:ns-resize}:host .right{top:50%;right:-7px;transform:translateY(-50%);cursor:ew-resize}:host .bottom{bottom:-7px;left:50%;transform:translate(-50%);cursor:ns-resize}:host .left{top:50%;left:-7px;transform:translateY(-50%);cursor:ew-resize}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
|
|
195
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
199
|
+
minVersion: "12.0.0",
|
|
200
|
+
version: "22.3.0",
|
|
201
|
+
ngImport: i0,
|
|
202
|
+
type: Crop,
|
|
203
|
+
decorators: [{
|
|
204
|
+
type: Component,
|
|
205
|
+
args: [{
|
|
206
|
+
selector: "ngs-crop",
|
|
207
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
208
|
+
host: {
|
|
209
|
+
"(document:mouseup)": "onDragEnd()",
|
|
210
|
+
"(document:mousemove)": "onDrag($event)"
|
|
211
|
+
},
|
|
212
|
+
template: "<div class=\"crop-viewport\">\n <ng-content />\n <div\n class=\"crop-selection-area\"\n [class.is-circle]=\"isCircle()\"\n [style]=\"selectionStyle()\">\n </div>\n</div>\n\n<!-- Handles are now outside the viewport to prevent clipping -->\n<div\n class=\"crop-handles-overlay\"\n [style]=\"selectionStyle()\">\n <div class=\"crop-handle move-handle\" (mousedown)=\"onDragStart($event, 'move')\"></div>\n <div class=\"crop-handle top-left\" (mousedown)=\"onDragStart($event, 'top-left')\"></div>\n <div class=\"crop-handle top-right\" (mousedown)=\"onDragStart($event, 'top-right')\"></div>\n <div class=\"crop-handle bottom-left\" (mousedown)=\"onDragStart($event, 'bottom-left')\"></div>\n <div class=\"crop-handle bottom-right\" (mousedown)=\"onDragStart($event, 'bottom-right')\"></div>\n\n <div class=\"crop-handle top\" [class.hidden]=\"isCircle()\" (mousedown)=\"onDragStart($event, 'top')\"></div>\n <div class=\"crop-handle right\" [class.hidden]=\"isCircle()\" (mousedown)=\"onDragStart($event, 'right')\"></div>\n <div class=\"crop-handle bottom\" [class.hidden]=\"isCircle()\" (mousedown)=\"onDragStart($event, 'bottom')\"></div>\n <div class=\"crop-handle left\" [class.hidden]=\"isCircle()\" (mousedown)=\"onDragStart($event, 'left')\"></div>\n</div>\n",
|
|
213
|
+
styles: [":host{display:inline-block;position:relative;-webkit-user-select:none;user-select:none}:host .crop-viewport{position:relative;width:100%;height:100%;overflow:hidden}:host ::ng-deep>.crop-viewport>*:first-child{display:block;max-width:100%;height:auto}:host .crop-selection-area{position:absolute;box-shadow:0 0 0 2000px #00000080}:host .crop-selection-area.is-circle{border-radius:50%}:host .crop-handles-overlay{position:absolute}:host .crop-handles-overlay.is-circle{border-radius:50%}:host .crop-handle{position:absolute;width:14px;height:14px;background:#ffffffe6;border:1px solid rgba(0,0,0,.5);border-radius:50%}:host .crop-handle.hidden{display:none}:host .move-handle{position:absolute;inset:0;width:auto;height:auto;background:transparent;border:none;border-radius:0;cursor:move}.is-circle :host .move-handle{border-radius:50%}:host .top-left{top:-7px;left:-7px;cursor:nwse-resize}:host .top-right{top:-7px;right:-7px;cursor:nesw-resize}:host .bottom-left{bottom:-7px;left:-7px;cursor:nesw-resize}:host .bottom-right{bottom:-7px;right:-7px;cursor:nwse-resize}:host .top{top:-7px;left:50%;transform:translate(-50%);cursor:ns-resize}:host .right{top:50%;right:-7px;transform:translateY(-50%);cursor:ew-resize}:host .bottom{bottom:-7px;left:50%;transform:translate(-50%);cursor:ns-resize}:host .left{top:50%;left:-7px;transform:translateY(-50%);cursor:ew-resize}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
214
|
+
}]
|
|
215
|
+
}],
|
|
216
|
+
ctorParameters: () => [],
|
|
217
|
+
propDecorators: {
|
|
218
|
+
minWidth: [{
|
|
219
|
+
type: i0.Input,
|
|
220
|
+
args: [{
|
|
221
|
+
isSignal: true,
|
|
222
|
+
alias: "minWidth",
|
|
223
|
+
required: false
|
|
224
|
+
}]
|
|
225
|
+
}],
|
|
226
|
+
minHeight: [{
|
|
227
|
+
type: i0.Input,
|
|
228
|
+
args: [{
|
|
229
|
+
isSignal: true,
|
|
230
|
+
alias: "minHeight",
|
|
231
|
+
required: false
|
|
232
|
+
}]
|
|
233
|
+
}],
|
|
234
|
+
shape: [{
|
|
235
|
+
type: i0.Input,
|
|
236
|
+
args: [{
|
|
237
|
+
isSignal: true,
|
|
238
|
+
alias: "shape",
|
|
239
|
+
required: false
|
|
240
|
+
}]
|
|
241
|
+
}],
|
|
242
|
+
selectionApplied: [{
|
|
243
|
+
type: i0.Output,
|
|
244
|
+
args: ["selectionApplied"]
|
|
245
|
+
}]
|
|
246
|
+
}
|
|
247
|
+
});
|
|
191
248
|
export { Crop };
|
|
192
|
-
|
|
249
|
+
|
|
250
|
+
//# sourceMappingURL=ngstarter-ui-components-crop.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngstarter-ui-components-crop.mjs","sources":["../../../projects/components/crop/src/crop/crop.ts","../../../projects/components/crop/src/crop/crop.html","../../../projects/components/crop/ngstarter-ui-components-crop.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\n\nexport interface CropSelection {\n shape: 'rectangle' | 'circle';\n pixels: {\n top: number;\n right: number;\n bottom: number;\n left: number;\n width: number;\n height: number;\n };\n percentages: {\n top: number;\n right: number;\n bottom: number;\n left: number;\n };\n containerWidth: number;\n containerHeight: number;\n}\n\ninterface CropInset {\n top: number;\n right: number;\n bottom: number;\n left: number;\n}\n\ntype DragHandle =\n | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'\n | 'top' | 'right' | 'bottom' | 'left'\n | 'move';\n\n@Component({\n selector: 'ngs-crop',\n templateUrl: './crop.html',\n styleUrl: './crop.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '(document:mouseup)': 'onDragEnd()',\n '(document:mousemove)': 'onDrag($event)',\n },\n})\nexport class Crop implements AfterViewInit {\n minWidth = input(100);\n minHeight = input(100);\n shape = input<'rectangle' | 'circle'>('rectangle');\n selectionApplied = output<CropSelection>();\n\n isCircle = computed(() => this.shape() === 'circle');\n selection = signal<CropInset>({ top: 20, right: 20, bottom: 20, left: 20 });\n\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private activeDragHandle = signal<DragHandle | null>(null);\n private startDragPosition = signal<{ x: number; y: number } | null>(null);\n private startDragSelection = signal<CropInset | null>(null);\n\n constructor() {\n effect(() => {\n if (this.isCircle() && this.elementRef.nativeElement.isConnected) {\n this.resetSelectionToSquare();\n }\n });\n }\n\n ngAfterViewInit(): void {\n if (this.isCircle()) {\n const hostEl = this.elementRef.nativeElement;\n if (hostEl.offsetWidth > 0) {\n this.resetSelectionToSquare();\n } else {\n const observer = new ResizeObserver(() => {\n if (hostEl.offsetWidth > 0) {\n this.resetSelectionToSquare();\n observer.disconnect();\n }\n });\n observer.observe(hostEl);\n }\n }\n }\n\n private resetSelectionToSquare(): void {\n const hostEl = this.elementRef.nativeElement;\n const hostWidth = hostEl.offsetWidth;\n const hostHeight = hostEl.offsetHeight;\n\n if (hostWidth === 0 || hostHeight === 0) return;\n\n const size = Math.min(hostWidth, hostHeight) * 0.8;\n const left = (hostWidth - size) / 2;\n const top = (hostHeight - size) / 2;\n\n this.selection.set({\n top: top,\n right: (hostWidth - size) / 2,\n bottom: (hostHeight - size) / 2,\n left: left,\n });\n\n // Emit the new selection state after it has been programmatically changed.\n // Use a timeout to avoid potential \"changed after checked\" errors.\n setTimeout(() => this.emitSelection(), 0);\n }\n\n selectionStyle = computed(() => ({\n top: `${this.selection().top}px`,\n right: `${this.selection().right}px`,\n bottom: `${this.selection().bottom}px`,\n left: `${this.selection().left}px`,\n }));\n\n onDragStart(event: MouseEvent, handle: DragHandle): void {\n event.preventDefault();\n event.stopPropagation();\n this.activeDragHandle.set(handle);\n this.startDragPosition.set({ x: event.clientX, y: event.clientY });\n this.startDragSelection.set(this.selection());\n }\n\n onDragEnd(): void {\n if (!this.activeDragHandle()) {\n return;\n }\n this.activeDragHandle.set(null);\n this.emitSelection();\n }\n\n private emitSelection(): void {\n const hostEl = this.elementRef.nativeElement;\n const containerWidth = hostEl.offsetWidth;\n const containerHeight = hostEl.offsetHeight;\n\n if (containerWidth === 0 || containerHeight === 0) {\n return;\n }\n\n const { top, right, bottom, left } = this.selection();\n const width = containerWidth - left - right;\n const height = containerHeight - top - bottom;\n\n this.selectionApplied.emit({\n shape: this.shape(),\n pixels: {\n top,\n right,\n bottom,\n left,\n width,\n height,\n },\n percentages: {\n top: (top / containerHeight) * 100,\n right: (right / containerWidth) * 100,\n bottom: (bottom / containerHeight) * 100,\n left: (left / containerWidth) * 100,\n },\n containerWidth,\n containerHeight,\n });\n }\n\n onDrag(event: MouseEvent): void {\n const handle = this.activeDragHandle();\n if (!handle) return;\n\n const startPos = this.startDragPosition()!;\n const startSelection = this.startDragSelection()!;\n const dx = event.clientX - startPos.x;\n const dy = event.clientY - startPos.y;\n const hostRect = this.elementRef.nativeElement.getBoundingClientRect();\n\n this.selection.update(() => {\n const newSelection = { ...startSelection };\n\n if (handle === 'move') {\n const selectionWidth = hostRect.width - startSelection.left - startSelection.right;\n const selectionHeight = hostRect.height - startSelection.top - startSelection.bottom;\n newSelection.top = Math.max(0, Math.min(startSelection.top + dy, hostRect.height - selectionHeight));\n newSelection.left = Math.max(0, Math.min(startSelection.left + dx, hostRect.width - selectionWidth));\n newSelection.bottom = hostRect.height - newSelection.top - selectionHeight;\n newSelection.right = hostRect.width - newSelection.left - selectionWidth;\n return newSelection;\n }\n\n let currentDx = dx;\n let currentDy = dy;\n\n if (this.isCircle() && handle.includes('-')) {\n if (handle === 'top-left' || handle === 'bottom-right') {\n currentDy = currentDx;\n } else {\n currentDy = -currentDx;\n }\n }\n\n if (handle.includes('top')) newSelection.top = startSelection.top + currentDy;\n if (handle.includes('bottom')) newSelection.bottom = startSelection.bottom - currentDy;\n if (handle.includes('left')) newSelection.left = startSelection.left + currentDx;\n if (handle.includes('right')) newSelection.right = startSelection.right - currentDx;\n\n const minW = this.minWidth();\n const minH = this.isCircle() ? minW : this.minHeight();\n\n if (hostRect.width - newSelection.left - newSelection.right < minW) {\n if (handle.includes('left')) newSelection.left = hostRect.width - newSelection.right - minW;\n else newSelection.right = hostRect.width - newSelection.left - minW;\n }\n if (hostRect.height - newSelection.top - newSelection.bottom < minH) {\n if (handle.includes('top')) newSelection.top = hostRect.height - newSelection.bottom - minH;\n else newSelection.bottom = hostRect.height - newSelection.top - minH;\n }\n\n newSelection.top = Math.max(0, newSelection.top);\n newSelection.bottom = Math.max(0, newSelection.bottom);\n newSelection.left = Math.max(0, newSelection.left);\n newSelection.right = Math.max(0, newSelection.right);\n\n return newSelection;\n });\n }\n}\n","<div class=\"crop-viewport\">\n <ng-content />\n <div\n class=\"crop-selection-area\"\n [class.is-circle]=\"isCircle()\"\n [style]=\"selectionStyle()\">\n </div>\n</div>\n\n<!-- Handles are now outside the viewport to prevent clipping -->\n<div\n class=\"crop-handles-overlay\"\n [style]=\"selectionStyle()\">\n <div class=\"crop-handle move-handle\" (mousedown)=\"onDragStart($event, 'move')\"></div>\n <div class=\"crop-handle top-left\" (mousedown)=\"onDragStart($event, 'top-left')\"></div>\n <div class=\"crop-handle top-right\" (mousedown)=\"onDragStart($event, 'top-right')\"></div>\n <div class=\"crop-handle bottom-left\" (mousedown)=\"onDragStart($event, 'bottom-left')\"></div>\n <div class=\"crop-handle bottom-right\" (mousedown)=\"onDragStart($event, 'bottom-right')\"></div>\n\n <div class=\"crop-handle top\" [class.hidden]=\"isCircle()\" (mousedown)=\"onDragStart($event, 'top')\"></div>\n <div class=\"crop-handle right\" [class.hidden]=\"isCircle()\" (mousedown)=\"onDragStart($event, 'right')\"></div>\n <div class=\"crop-handle bottom\" [class.hidden]=\"isCircle()\" (mousedown)=\"onDragStart($event, 'bottom')\"></div>\n <div class=\"crop-handle left\" [class.hidden]=\"isCircle()\" (mousedown)=\"onDragStart($event, 'left')\"></div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAuDa,IAAI,CAAA;IACf,QAAQ,GAAG,KAAK,CAAC,GAAG;iFAAC;IACrB,SAAS,GAAG,KAAK,CAAC,GAAG;kFAAC;IACtB,KAAK,GAAG,KAAK,CAAyB,WAAW;8EAAC;IAClD,gBAAgB,GAAG,MAAM,EAAiB;IAE1C,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,KAAK,QAAQ;iFAAC;AACpD,IAAA,SAAS,GAAG,MAAM,CAAY,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;kFAAC;AAEnE,IAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;IACxD,gBAAgB,GAAG,MAAM,CAAoB,IAAI;yFAAC;IAClD,iBAAiB,GAAG,MAAM,CAAkC,IAAI;0FAAC;IACjE,kBAAkB,GAAG,MAAM,CAAmB,IAAI;2FAAC;AAE3D,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,IAAI,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,WAAW,EAAE;gBAChE,IAAI,CAAC,sBAAsB,EAAE;YAC/B;AACF,QAAA,CAAC,CAAC;IACJ;IAEA,eAAe,GAAA;AACb,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;AACnB,YAAA,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa;AAC5C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C,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC;AAChD,YAAA,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC;AACtD,YAAA,YAAY,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC;AAClD,YAAA,YAAY,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC;AAEpD,YAAA,OAAO,YAAY;AACrB,QAAA,CAAC,CAAC;IACJ;uGAjLW,IAAI,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAJ,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,IAAI,omBCvDjB,0wCAwBA,EAAA,MAAA,EAAA,CAAA,+5CAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FD+Ba,IAAI,EAAA,UAAA,EAAA,CAAA;kBAVhB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,EAAA,eAAA,EAGH,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,oBAAoB,EAAE,aAAa;AACnC,wBAAA,sBAAsB,EAAE,gBAAgB;AACzC,qBAAA,EAAA,QAAA,EAAA,0wCAAA,EAAA,MAAA,EAAA,CAAA,+5CAAA,CAAA,EAAA;;;AErDH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngstarter-ui-components-crop.mjs","names":[],"sources":["../../../projects/components/crop/src/crop/crop.ts","../../../projects/components/crop/src/crop/crop.html"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\n\nexport interface CropSelection {\n shape: 'rectangle' | 'circle';\n pixels: {\n top: number;\n right: number;\n bottom: number;\n left: number;\n width: number;\n height: number;\n };\n percentages: {\n top: number;\n right: number;\n bottom: number;\n left: number;\n };\n containerWidth: number;\n containerHeight: number;\n}\n\ninterface CropInset {\n top: number;\n right: number;\n bottom: number;\n left: number;\n}\n\ntype DragHandle =\n | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'\n | 'top' | 'right' | 'bottom' | 'left'\n | 'move';\n\n@Component({\n selector: 'ngs-crop',\n templateUrl: './crop.html',\n styleUrl: './crop.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '(document:mouseup)': 'onDragEnd()',\n '(document:mousemove)': 'onDrag($event)',\n },\n})\nexport class Crop implements AfterViewInit {\n minWidth = input(100);\n minHeight = input(100);\n shape = input<'rectangle' | 'circle'>('rectangle');\n selectionApplied = output<CropSelection>();\n\n isCircle = computed(() => this.shape() === 'circle');\n selection = signal<CropInset>({ top: 20, right: 20, bottom: 20, left: 20 });\n\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private activeDragHandle = signal<DragHandle | null>(null);\n private startDragPosition = signal<{ x: number; y: number } | null>(null);\n private startDragSelection = signal<CropInset | null>(null);\n\n constructor() {\n effect(() => {\n if (this.isCircle() && this.elementRef.nativeElement.isConnected) {\n this.resetSelectionToSquare();\n }\n });\n }\n\n ngAfterViewInit(): void {\n if (this.isCircle()) {\n const hostEl = this.elementRef.nativeElement;\n if (hostEl.offsetWidth > 0) {\n this.resetSelectionToSquare();\n } else {\n const observer = new ResizeObserver(() => {\n if (hostEl.offsetWidth > 0) {\n this.resetSelectionToSquare();\n observer.disconnect();\n }\n });\n observer.observe(hostEl);\n }\n }\n }\n\n private resetSelectionToSquare(): void {\n const hostEl = this.elementRef.nativeElement;\n const hostWidth = hostEl.offsetWidth;\n const hostHeight = hostEl.offsetHeight;\n\n if (hostWidth === 0 || hostHeight === 0) return;\n\n const size = Math.min(hostWidth, hostHeight) * 0.8;\n const left = (hostWidth - size) / 2;\n const top = (hostHeight - size) / 2;\n\n this.selection.set({\n top: top,\n right: (hostWidth - size) / 2,\n bottom: (hostHeight - size) / 2,\n left: left,\n });\n\n // Emit the new selection state after it has been programmatically changed.\n // Use a timeout to avoid potential \"changed after checked\" errors.\n setTimeout(() => this.emitSelection(), 0);\n }\n\n selectionStyle = computed(() => ({\n top: `${this.selection().top}px`,\n right: `${this.selection().right}px`,\n bottom: `${this.selection().bottom}px`,\n left: `${this.selection().left}px`,\n }));\n\n onDragStart(event: MouseEvent, handle: DragHandle): void {\n event.preventDefault();\n event.stopPropagation();\n this.activeDragHandle.set(handle);\n this.startDragPosition.set({ x: event.clientX, y: event.clientY });\n this.startDragSelection.set(this.selection());\n }\n\n onDragEnd(): void {\n if (!this.activeDragHandle()) {\n return;\n }\n this.activeDragHandle.set(null);\n this.emitSelection();\n }\n\n private emitSelection(): void {\n const hostEl = this.elementRef.nativeElement;\n const containerWidth = hostEl.offsetWidth;\n const containerHeight = hostEl.offsetHeight;\n\n if (containerWidth === 0 || containerHeight === 0) {\n return;\n }\n\n const { top, right, bottom, left } = this.selection();\n const width = containerWidth - left - right;\n const height = containerHeight - top - bottom;\n\n this.selectionApplied.emit({\n shape: this.shape(),\n pixels: {\n top,\n right,\n bottom,\n left,\n width,\n height,\n },\n percentages: {\n top: (top / containerHeight) * 100,\n right: (right / containerWidth) * 100,\n bottom: (bottom / containerHeight) * 100,\n left: (left / containerWidth) * 100,\n },\n containerWidth,\n containerHeight,\n });\n }\n\n onDrag(event: MouseEvent): void {\n const handle = this.activeDragHandle();\n if (!handle) return;\n\n const startPos = this.startDragPosition()!;\n const startSelection = this.startDragSelection()!;\n const dx = event.clientX - startPos.x;\n const dy = event.clientY - startPos.y;\n const hostRect = this.elementRef.nativeElement.getBoundingClientRect();\n\n this.selection.update(() => {\n const newSelection = { ...startSelection };\n\n if (handle === 'move') {\n const selectionWidth = hostRect.width - startSelection.left - startSelection.right;\n const selectionHeight = hostRect.height - startSelection.top - startSelection.bottom;\n newSelection.top = Math.max(0, Math.min(startSelection.top + dy, hostRect.height - selectionHeight));\n newSelection.left = Math.max(0, Math.min(startSelection.left + dx, hostRect.width - selectionWidth));\n newSelection.bottom = hostRect.height - newSelection.top - selectionHeight;\n newSelection.right = hostRect.width - newSelection.left - selectionWidth;\n return newSelection;\n }\n\n let currentDx = dx;\n let currentDy = dy;\n\n if (this.isCircle() && handle.includes('-')) {\n if (handle === 'top-left' || handle === 'bottom-right') {\n currentDy = currentDx;\n } else {\n currentDy = -currentDx;\n }\n }\n\n if (handle.includes('top')) newSelection.top = startSelection.top + currentDy;\n if (handle.includes('bottom')) newSelection.bottom = startSelection.bottom - currentDy;\n if (handle.includes('left')) newSelection.left = startSelection.left + currentDx;\n if (handle.includes('right')) newSelection.right = startSelection.right - currentDx;\n\n const minW = this.minWidth();\n const minH = this.isCircle() ? minW : this.minHeight();\n\n if (hostRect.width - newSelection.left - newSelection.right < minW) {\n if (handle.includes('left')) newSelection.left = hostRect.width - newSelection.right - minW;\n else newSelection.right = hostRect.width - newSelection.left - minW;\n }\n if (hostRect.height - newSelection.top - newSelection.bottom < minH) {\n if (handle.includes('top')) newSelection.top = hostRect.height - newSelection.bottom - minH;\n else newSelection.bottom = hostRect.height - newSelection.top - minH;\n }\n\n newSelection.top = Math.max(0, newSelection.top);\n newSelection.bottom = Math.max(0, newSelection.bottom);\n newSelection.left = Math.max(0, newSelection.left);\n newSelection.right = Math.max(0, newSelection.right);\n\n return newSelection;\n });\n }\n}\n","<div class=\"crop-viewport\">\n <ng-content />\n <div\n class=\"crop-selection-area\"\n [class.is-circle]=\"isCircle()\"\n [style]=\"selectionStyle()\">\n </div>\n</div>\n\n<!-- Handles are now outside the viewport to prevent clipping -->\n<div\n class=\"crop-handles-overlay\"\n [style]=\"selectionStyle()\">\n <div class=\"crop-handle move-handle\" (mousedown)=\"onDragStart($event, 'move')\"></div>\n <div class=\"crop-handle top-left\" (mousedown)=\"onDragStart($event, 'top-left')\"></div>\n <div class=\"crop-handle top-right\" (mousedown)=\"onDragStart($event, 'top-right')\"></div>\n <div class=\"crop-handle bottom-left\" (mousedown)=\"onDragStart($event, 'bottom-left')\"></div>\n <div class=\"crop-handle bottom-right\" (mousedown)=\"onDragStart($event, 'bottom-right')\"></div>\n\n <div class=\"crop-handle top\" [class.hidden]=\"isCircle()\" (mousedown)=\"onDragStart($event, 'top')\"></div>\n <div class=\"crop-handle right\" [class.hidden]=\"isCircle()\" (mousedown)=\"onDragStart($event, 'right')\"></div>\n <div class=\"crop-handle bottom\" [class.hidden]=\"isCircle()\" (mousedown)=\"onDragStart($event, 'bottom')\"></div>\n <div class=\"crop-handle left\" [class.hidden]=\"isCircle()\" (mousedown)=\"onDragStart($event, 'left')\"></div>\n</div>\n"],"mappings":";;AAuDA,IAAa,OAAb,MAAa,KAAI;CACf,WAAW,MAAM,KAAI,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CACrB,YAAY,MAAM,KAAI,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CACtB,QAAQ,MAA8B,aAAY,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAClD,mBAAmB,OAAM;CAEzB,WAAW,eAAe,KAAK,MAAK,MAAO,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CACpD,YAAY,OAAkB;EAAE,KAAK;EAAI,OAAO;EAAI,QAAQ;EAAI,MAAM;CAAE,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAEnE,aAAa,OAAgC,UAAU;CACvD,mBAAmB,OAA0B,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,mBAAA,CAAA,+BAAA,CAA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