@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,375 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, inject, DestroyRef, input, signal, effect, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import { C as ContentBuilderStore, a as CONTENT_BUILDER } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CZn1p9ek.mjs';
|
|
4
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
|
-
import { Icon } from '@ngstarter-ui/components/icon';
|
|
6
|
-
import { Popover, PopoverTriggerForDirective } from '@ngstarter-ui/components/popover';
|
|
7
|
-
import { TabGroup, Tab } from '@ngstarter-ui/components/tabs';
|
|
8
|
-
import { Button } from '@ngstarter-ui/components/button';
|
|
9
|
-
import { Input } from '@ngstarter-ui/components/input';
|
|
10
|
-
import { FormField, Suffix } from '@ngstarter-ui/components/form-field';
|
|
11
|
-
import * as i1 from '@angular/forms';
|
|
12
|
-
import { FormBuilder, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
13
|
-
import { SafeResourceUrlPipe } from '@ngstarter-ui/components/core';
|
|
14
|
-
|
|
15
|
-
class EmbedService {
|
|
16
|
-
parse(rawUrl) {
|
|
17
|
-
const cleaned = (rawUrl || '').trim();
|
|
18
|
-
if (!cleaned) {
|
|
19
|
-
return { url: '', type: '' };
|
|
20
|
-
}
|
|
21
|
-
const withScheme = /^(https?:)?\/\//i.test(cleaned) ? cleaned : `https://${cleaned}`;
|
|
22
|
-
let u = null;
|
|
23
|
-
try {
|
|
24
|
-
u = new URL(withScheme);
|
|
25
|
-
}
|
|
26
|
-
catch {
|
|
27
|
-
return { url: cleaned, type: '' };
|
|
28
|
-
}
|
|
29
|
-
const host = u.hostname.toLowerCase();
|
|
30
|
-
const path = u.pathname.toLowerCase();
|
|
31
|
-
const href = u.toString();
|
|
32
|
-
if (path.endsWith('.pdf')) {
|
|
33
|
-
return { url: href, type: 'pdf' };
|
|
34
|
-
}
|
|
35
|
-
else if (host.includes('youtu.be') || host.includes('youtube.com')) {
|
|
36
|
-
return { url: this.toYoutubeEmbed(u), type: 'youtube' };
|
|
37
|
-
}
|
|
38
|
-
else if (host.includes('vimeo.com')) {
|
|
39
|
-
return { url: this.toVimeoEmbed(u), type: 'vimeo' };
|
|
40
|
-
}
|
|
41
|
-
else if (host.includes('spotify.com')) {
|
|
42
|
-
return { url: this.toSpotifyEmbed(u), type: 'spotify' };
|
|
43
|
-
}
|
|
44
|
-
else if (host.includes('maps.google.') || (host.includes('google.') && path.startsWith('/maps'))) {
|
|
45
|
-
return { url: this.toGoogleMapsEmbed(u), type: 'google-maps' };
|
|
46
|
-
}
|
|
47
|
-
else if (host.includes('docs.google.')) {
|
|
48
|
-
return { url: this.toGoogleDocsEmbed(u), type: 'google-docs' };
|
|
49
|
-
}
|
|
50
|
-
else if (host.includes('drive.google.')) {
|
|
51
|
-
return { url: this.toGoogleDriveEmbed(u), type: 'google-drive' };
|
|
52
|
-
}
|
|
53
|
-
else if (host.includes('codepen.io')) {
|
|
54
|
-
return { url: this.toCodepenEmbed(u), type: 'codepen' };
|
|
55
|
-
}
|
|
56
|
-
else if (host.includes('figma.com')) {
|
|
57
|
-
return { url: this.toFigmaEmbed(u), type: 'figma' };
|
|
58
|
-
}
|
|
59
|
-
else if (host.includes('loom.com')) {
|
|
60
|
-
return { url: this.toLoomEmbed(u), type: 'loom' };
|
|
61
|
-
}
|
|
62
|
-
else if (host.includes('twitter.com') || host === 'x.com' || host.endsWith('.x.com')) {
|
|
63
|
-
return { url: this.toTwitterEmbed(u), type: 'twitter' };
|
|
64
|
-
}
|
|
65
|
-
else if (host.includes('instagram.com')) {
|
|
66
|
-
return { url: this.toInstagramEmbed(u), type: 'instagram' };
|
|
67
|
-
}
|
|
68
|
-
else if (host.includes('tiktok.com')) {
|
|
69
|
-
return { url: this.toTiktokEmbed(u), type: 'tiktok' };
|
|
70
|
-
}
|
|
71
|
-
else if (host.includes('soundcloud.com')) {
|
|
72
|
-
return { url: this.toSoundcloudEmbed(u), type: 'soundcloud' };
|
|
73
|
-
}
|
|
74
|
-
else if (host.includes('stackblitz.com')) {
|
|
75
|
-
return { url: this.toStackblitzEmbed(u), type: 'stackblitz' };
|
|
76
|
-
}
|
|
77
|
-
else if (host.includes('gist.github.com')) {
|
|
78
|
-
return { url: href, type: 'gist' };
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
return { url: href, type: 'website' };
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
// ==== Provider transformers ====
|
|
85
|
-
toYoutubeEmbed(u) {
|
|
86
|
-
// Already embed
|
|
87
|
-
if (/^\/embed\//.test(u.pathname)) {
|
|
88
|
-
return `https://www.youtube.com${u.pathname}${u.search}`;
|
|
89
|
-
}
|
|
90
|
-
const host = u.hostname.toLowerCase();
|
|
91
|
-
let id = '';
|
|
92
|
-
let start = '';
|
|
93
|
-
if (host.includes('youtu.be')) {
|
|
94
|
-
id = u.pathname.split('/').filter(Boolean)[0] || '';
|
|
95
|
-
// t or start
|
|
96
|
-
start = this.extractYouTubeStart(u.searchParams);
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
// youtube.com variants
|
|
100
|
-
if (u.searchParams.get('v')) {
|
|
101
|
-
id = u.searchParams.get('v') || '';
|
|
102
|
-
start = this.extractYouTubeStart(u.searchParams);
|
|
103
|
-
}
|
|
104
|
-
else if (u.pathname.startsWith('/shorts/')) {
|
|
105
|
-
id = u.pathname.split('/')[2] || '';
|
|
106
|
-
}
|
|
107
|
-
else if (u.pathname.startsWith('/live/')) {
|
|
108
|
-
id = u.pathname.split('/')[2] || '';
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
const qs = start ? `?start=${start}` : '';
|
|
112
|
-
return id ? `https://www.youtube.com/embed/${id}${qs}` : u.toString();
|
|
113
|
-
}
|
|
114
|
-
extractYouTubeStart(params) {
|
|
115
|
-
const t = params.get('t') || params.get('start') || '';
|
|
116
|
-
if (!t)
|
|
117
|
-
return '';
|
|
118
|
-
// t can be in format 1h2m3s or 90 or 1m30s
|
|
119
|
-
const total = this.parseTimeToSeconds(t);
|
|
120
|
-
return total ? String(total) : '';
|
|
121
|
-
}
|
|
122
|
-
parseTimeToSeconds(t) {
|
|
123
|
-
if (/^\d+$/.test(t))
|
|
124
|
-
return parseInt(t, 10);
|
|
125
|
-
const re = /(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?/i;
|
|
126
|
-
const m = t.match(re);
|
|
127
|
-
if (!m)
|
|
128
|
-
return 0;
|
|
129
|
-
const h = parseInt(m[1] || '0', 10);
|
|
130
|
-
const mnt = parseInt(m[2] || '0', 10);
|
|
131
|
-
const s = parseInt(m[3] || '0', 10);
|
|
132
|
-
return h * 3600 + mnt * 60 + s;
|
|
133
|
-
}
|
|
134
|
-
toVimeoEmbed(u) {
|
|
135
|
-
// extract last numeric id
|
|
136
|
-
const parts = u.pathname.split('/').filter(Boolean);
|
|
137
|
-
const last = parts[parts.length - 1] || '';
|
|
138
|
-
const id = /^(\d+)$/.test(last) ? last : (parts.includes('videos') ? parts[parts.indexOf('videos') + 1] : '');
|
|
139
|
-
return id ? `https://player.vimeo.com/video/${id}` : u.toString();
|
|
140
|
-
}
|
|
141
|
-
toSpotifyEmbed(u) {
|
|
142
|
-
const parts = u.pathname.split('/').filter(Boolean);
|
|
143
|
-
if (parts[0] === 'embed')
|
|
144
|
-
return u.toString();
|
|
145
|
-
// /{type}/{id}
|
|
146
|
-
if (parts.length >= 2) {
|
|
147
|
-
const type = parts[0];
|
|
148
|
-
const id = parts[1];
|
|
149
|
-
return `https://open.spotify.com/embed/${type}/${id}`;
|
|
150
|
-
}
|
|
151
|
-
return u.toString();
|
|
152
|
-
}
|
|
153
|
-
toGoogleMapsEmbed(u) {
|
|
154
|
-
const p = u.pathname;
|
|
155
|
-
if (p.includes('/maps/embed') || u.searchParams.get('output') === 'embed') {
|
|
156
|
-
return u.toString();
|
|
157
|
-
}
|
|
158
|
-
// Best-effort wrap original URL as query for embed
|
|
159
|
-
return `https://www.google.com/maps?output=embed&q=${encodeURIComponent(u.toString())}`;
|
|
160
|
-
}
|
|
161
|
-
toGoogleDocsEmbed(u) {
|
|
162
|
-
// document, presentation, spreadsheets, forms
|
|
163
|
-
const parts = u.pathname.split('/').filter(Boolean);
|
|
164
|
-
if (parts.length >= 3) {
|
|
165
|
-
const product = parts[0]; // document|presentation|spreadsheets|forms
|
|
166
|
-
const kind = parts[1]; // usually 'd'
|
|
167
|
-
const id = parts[2];
|
|
168
|
-
if (product === 'document') {
|
|
169
|
-
return `https://docs.google.com/document/d/${id}/preview`;
|
|
170
|
-
}
|
|
171
|
-
if (product === 'presentation') {
|
|
172
|
-
return `https://docs.google.com/presentation/d/${id}/embed`;
|
|
173
|
-
}
|
|
174
|
-
if (product === 'spreadsheets') {
|
|
175
|
-
return `https://docs.google.com/spreadsheets/d/${id}/preview`;
|
|
176
|
-
}
|
|
177
|
-
if (product === 'forms') {
|
|
178
|
-
return `https://docs.google.com/forms/d/${id}/viewform?embedded=true`;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
return u.toString();
|
|
182
|
-
}
|
|
183
|
-
toGoogleDriveEmbed(u) {
|
|
184
|
-
// /file/d/{id}/view -> /file/d/{id}/preview
|
|
185
|
-
const parts = u.pathname.split('/').filter(Boolean);
|
|
186
|
-
const idx = parts.indexOf('d');
|
|
187
|
-
if (parts[0] === 'file' && idx >= 0 && parts[idx + 1]) {
|
|
188
|
-
const id = parts[idx + 1];
|
|
189
|
-
return `https://drive.google.com/file/d/${id}/preview`;
|
|
190
|
-
}
|
|
191
|
-
// open?id=... -> uc?export=preview&id=...
|
|
192
|
-
const openId = u.searchParams.get('id');
|
|
193
|
-
if (openId) {
|
|
194
|
-
return `https://drive.google.com/uc?export=preview&id=${encodeURIComponent(openId)}`;
|
|
195
|
-
}
|
|
196
|
-
return u.toString();
|
|
197
|
-
}
|
|
198
|
-
toCodepenEmbed(u) {
|
|
199
|
-
const parts = u.pathname.split('/').filter(Boolean);
|
|
200
|
-
const user = parts[0];
|
|
201
|
-
const mode = parts[1]; // pen|full|details|embed
|
|
202
|
-
const id = parts[2];
|
|
203
|
-
if (mode === 'embed')
|
|
204
|
-
return u.toString();
|
|
205
|
-
if (user && id) {
|
|
206
|
-
return `https://codepen.io/${user}/embed/${id}`;
|
|
207
|
-
}
|
|
208
|
-
return u.toString();
|
|
209
|
-
}
|
|
210
|
-
toFigmaEmbed(u) {
|
|
211
|
-
return `https://www.figma.com/embed?embed_host=share&url=${encodeURIComponent(u.toString())}`;
|
|
212
|
-
}
|
|
213
|
-
toLoomEmbed(u) {
|
|
214
|
-
const parts = u.pathname.split('/').filter(Boolean);
|
|
215
|
-
if (parts[0] === 'embed')
|
|
216
|
-
return u.toString();
|
|
217
|
-
// /share/{id}
|
|
218
|
-
if (parts[0] === 'share' && parts[1]) {
|
|
219
|
-
return `https://www.loom.com/embed/${parts[1]}`;
|
|
220
|
-
}
|
|
221
|
-
return u.toString();
|
|
222
|
-
}
|
|
223
|
-
toTwitterEmbed(u) {
|
|
224
|
-
// Use twitframe to get an embeddable iframe
|
|
225
|
-
return `https://twitframe.com/show?url=${encodeURIComponent(u.toString())}`;
|
|
226
|
-
}
|
|
227
|
-
toInstagramEmbed(u) {
|
|
228
|
-
// Append /embed to post/reel URLs
|
|
229
|
-
let p = u.pathname;
|
|
230
|
-
if (!p.endsWith('/'))
|
|
231
|
-
p += '/';
|
|
232
|
-
if (!p.endsWith('embed/')) {
|
|
233
|
-
p += 'embed/';
|
|
234
|
-
}
|
|
235
|
-
return `${u.protocol}//${u.host}${p}`;
|
|
236
|
-
}
|
|
237
|
-
toTiktokEmbed(u) {
|
|
238
|
-
// Expect /@user/video/{id}
|
|
239
|
-
const parts = u.pathname.split('/').filter(Boolean);
|
|
240
|
-
const idx = parts.indexOf('video');
|
|
241
|
-
if (idx >= 0 && parts[idx + 1]) {
|
|
242
|
-
const id = parts[idx + 1];
|
|
243
|
-
return `https://www.tiktok.com/embed/v2/${id}`;
|
|
244
|
-
}
|
|
245
|
-
return u.toString();
|
|
246
|
-
}
|
|
247
|
-
toSoundcloudEmbed(u) {
|
|
248
|
-
return `https://w.soundcloud.com/player/?url=${encodeURIComponent(u.toString())}`;
|
|
249
|
-
}
|
|
250
|
-
toStackblitzEmbed(u) {
|
|
251
|
-
// Ensure we have the embed parameter for StackBlitz iframe
|
|
252
|
-
const url = new URL(u.toString());
|
|
253
|
-
if (url.searchParams.get('embed') !== '1') {
|
|
254
|
-
url.searchParams.set('embed', '1');
|
|
255
|
-
}
|
|
256
|
-
// Keep other parameters like file, terminal, ctl, hideExplorer if provided by user
|
|
257
|
-
return url.toString();
|
|
258
|
-
}
|
|
259
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: EmbedService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
260
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: EmbedService });
|
|
261
|
-
}
|
|
262
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: EmbedService, decorators: [{
|
|
263
|
-
type: Injectable
|
|
264
|
-
}] });
|
|
265
|
-
|
|
266
|
-
class EmbedBlock {
|
|
267
|
-
store = inject(ContentBuilderStore);
|
|
268
|
-
contentBuilder = inject(CONTENT_BUILDER);
|
|
269
|
-
destroyRef = inject(DestroyRef);
|
|
270
|
-
formBuilder = inject(FormBuilder);
|
|
271
|
-
embedService = inject(EmbedService);
|
|
272
|
-
id = input.required(/* @ts-ignore */
|
|
273
|
-
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
274
|
-
content = input.required(/* @ts-ignore */
|
|
275
|
-
...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
276
|
-
settings = input.required(/* @ts-ignore */
|
|
277
|
-
...(ngDevMode ? [{ debugName: "settings" }] : /* istanbul ignore next */ []));
|
|
278
|
-
props = input([], /* @ts-ignore */
|
|
279
|
-
...(ngDevMode ? [{ debugName: "props" }] : /* istanbul ignore next */ []));
|
|
280
|
-
index = input.required(/* @ts-ignore */
|
|
281
|
-
...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
|
|
282
|
-
embedUrlValidator = (control) => {
|
|
283
|
-
const value = (control.value ?? '').toString();
|
|
284
|
-
if (!value.trim()) {
|
|
285
|
-
return null;
|
|
286
|
-
}
|
|
287
|
-
const { type } = this.embedService.parse(value);
|
|
288
|
-
if (!type || type === 'website') {
|
|
289
|
-
return { embedUrl: true };
|
|
290
|
-
}
|
|
291
|
-
return null;
|
|
292
|
-
};
|
|
293
|
-
form = this.formBuilder.nonNullable.group({
|
|
294
|
-
url: ['', [Validators.required, this.embedUrlValidator]],
|
|
295
|
-
});
|
|
296
|
-
_content = signal({
|
|
297
|
-
url: '',
|
|
298
|
-
type: ''
|
|
299
|
-
}, /* @ts-ignore */
|
|
300
|
-
...(ngDevMode ? [{ debugName: "_content" }] : /* istanbul ignore next */ []));
|
|
301
|
-
_settings = signal({
|
|
302
|
-
width: null,
|
|
303
|
-
height: null
|
|
304
|
-
}, /* @ts-ignore */
|
|
305
|
-
...(ngDevMode ? [{ debugName: "_settings" }] : /* istanbul ignore next */ []));
|
|
306
|
-
_props = signal([], /* @ts-ignore */
|
|
307
|
-
...(ngDevMode ? [{ debugName: "_props" }] : /* istanbul ignore next */ []));
|
|
308
|
-
initialized = signal(false, /* @ts-ignore */
|
|
309
|
-
...(ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []));
|
|
310
|
-
constructor() {
|
|
311
|
-
effect(() => {
|
|
312
|
-
const content = this.content();
|
|
313
|
-
const settings = this.settings();
|
|
314
|
-
const props = this.props();
|
|
315
|
-
untracked(() => {
|
|
316
|
-
this._content.set({ ...content });
|
|
317
|
-
this._settings.set({ ...settings });
|
|
318
|
-
this._props.set([...props]);
|
|
319
|
-
});
|
|
320
|
-
});
|
|
321
|
-
}
|
|
322
|
-
ngOnInit() {
|
|
323
|
-
this._content.set(this.content());
|
|
324
|
-
this._settings.set(this.settings());
|
|
325
|
-
this._props.set(this.props());
|
|
326
|
-
this.contentBuilder
|
|
327
|
-
.focusChanged
|
|
328
|
-
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
329
|
-
.subscribe(() => {
|
|
330
|
-
if (this.store.focusedBlockId() === this.id()) {
|
|
331
|
-
}
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
getData() {
|
|
335
|
-
return {
|
|
336
|
-
content: this._content(),
|
|
337
|
-
props: this._props(),
|
|
338
|
-
settings: this._settings()
|
|
339
|
-
};
|
|
340
|
-
}
|
|
341
|
-
isEmpty() {
|
|
342
|
-
return this.getData().content.url === '' && this.getData().content.type === '';
|
|
343
|
-
}
|
|
344
|
-
embed(trigger) {
|
|
345
|
-
this._content.set(this.embedService.parse(this.form.value.url || ''));
|
|
346
|
-
trigger.api.close();
|
|
347
|
-
this.store.updateBlock(this.id(), { ...this.getData(), isEmpty: this.isEmpty() });
|
|
348
|
-
this.contentBuilder.emitContentChangeEvent();
|
|
349
|
-
}
|
|
350
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: EmbedBlock, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
351
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: EmbedBlock, isStandalone: true, selector: "app-embed-block", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: true, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, settings: { classPropertyName: "settings", publicName: "settings", isSignal: true, isRequired: true, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class.is-empty": "isEmpty()" }, classAttribute: "ngs-embed-block" }, providers: [EmbedService], ngImport: i0, template: "@if (isEmpty()) {\n <div class=\"bg-surface-container-low cursor-pointer hover:bg-surface-container p-4 rounded-2xl flex items-center gap-3\"\n #trigger=\"ngsPopoverTriggerFor\"\n [ngsPopoverTriggerFor]=\"addPopover\" position=\"below-center\" trigger=\"click\" hasBackdrop>\n <ngs-icon name=\"fluent:globe-24-regular\"/>\n <div class=\"text-sm\">Embed anything (PDFs, Google Docs, Google Maps, Spotify\u2026)</div>\n </div>\n <ngs-popover #addPopover>\n <div class=\"w-[400px] overflow-hidden\">\n <ngs-tab-group>\n <ngs-tab label=\"Embed\">\n <div class=\"p-4\">\n <ngs-form-field class=\"w-full\">\n <input ngsInput [formControl]=\"form.controls.url\" placeholder=\"Paste in https://...\">\n <div ngsSuffix class=\"pe-2\">\n <button ngsButton=\"filled\" type=\"button\" [disabled]=\"form.invalid\" (click)=\"embed(trigger)\">Embed</button>\n </div>\n </ngs-form-field>\n <p class=\"text-xs text-center\">Works with links of PDFs, Google Drive, Google Maps, CodePen\u2026</p>\n </div>\n </ngs-tab>\n <ngs-tab label=\"Upload\">\n <div class=\"p-4\">\n <div>\n <button ngsButton=\"filled\" class=\"w-full\">Upload</button>\n </div>\n <p class=\"text-xs text-center mt-4\">Upload a file from your computer.</p>\n </div>\n </ngs-tab>\n </ngs-tab-group>\n </div>\n </ngs-popover>\n} @else {\n <div class=\"w-full bg-surface-container-low w-[700px] h-[400px]\">\n <iframe width=\"100%\" height=\"100%\" [src]=\"_content().url | safeResourceUrl\" frameborder=\"0\" allowfullscreen></iframe>\n </div>\n}\n", styles: [""], dependencies: [{ kind: "component", type: Icon, selector: "ngs-icon", inputs: ["name"], exportAs: ["ngsIcon"] }, { kind: "component", type: Popover, selector: "ngs-popover", exportAs: ["ngsPopover"] }, { kind: "directive", type: PopoverTriggerForDirective, selector: "[ngsPopoverTriggerFor]", inputs: ["ngsPopoverTriggerFor", "ngsPopoverContext", "trigger", "position", "delay", "origin", "closeOnOriginClick", "closeOnOriginMouseLeave", "hasBackdrop"], outputs: ["opened", "closed"], exportAs: ["ngsPopoverTriggerFor"] }, { kind: "component", type: TabGroup, selector: "ngs-tab-group", inputs: ["selectedIndex", "headerPosition", "preserveContent", "ngs-stretch-tabs", "ngs-align-tabs", "disableRipple", "animationDuration", "animate.enter", "animate.leave"], outputs: ["selectedIndexChange", "selectedTabChange", "focusChange"] }, { kind: "component", type: Tab, selector: "ngs-tab", inputs: ["label", "aria-label", "aria-labelledby", "disabled"], exportAs: ["ngsTab"] }, { kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }, { kind: "component", type: FormField, selector: "ngs-form-field", inputs: ["labelMode", "subscriptHiddenIfEmpty", "sameHeightAsButton"], exportAs: ["ngsFormField"] }, { kind: "directive", type: Input, selector: "input[ngsInput], textarea[ngsInput]", inputs: ["id", "placeholder", "required", "disabled", "readonly", "errorStateMatcher"], exportAs: ["ngsInput"] }, { kind: "directive", type: Suffix, selector: "[ngsSuffix]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: SafeResourceUrlPipe, name: "safeResourceUrl" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
352
|
-
}
|
|
353
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: EmbedBlock, decorators: [{
|
|
354
|
-
type: Component,
|
|
355
|
-
args: [{ selector: 'app-embed-block', imports: [
|
|
356
|
-
Icon,
|
|
357
|
-
Popover,
|
|
358
|
-
PopoverTriggerForDirective,
|
|
359
|
-
TabGroup,
|
|
360
|
-
Tab,
|
|
361
|
-
Button,
|
|
362
|
-
FormField,
|
|
363
|
-
Input,
|
|
364
|
-
Suffix,
|
|
365
|
-
FormsModule,
|
|
366
|
-
ReactiveFormsModule,
|
|
367
|
-
SafeResourceUrlPipe
|
|
368
|
-
], providers: [EmbedService], changeDetection: ChangeDetectionStrategy.Eager, host: {
|
|
369
|
-
'class': 'ngs-embed-block',
|
|
370
|
-
'[class.is-empty]': 'isEmpty()'
|
|
371
|
-
}, template: "@if (isEmpty()) {\n <div class=\"bg-surface-container-low cursor-pointer hover:bg-surface-container p-4 rounded-2xl flex items-center gap-3\"\n #trigger=\"ngsPopoverTriggerFor\"\n [ngsPopoverTriggerFor]=\"addPopover\" position=\"below-center\" trigger=\"click\" hasBackdrop>\n <ngs-icon name=\"fluent:globe-24-regular\"/>\n <div class=\"text-sm\">Embed anything (PDFs, Google Docs, Google Maps, Spotify\u2026)</div>\n </div>\n <ngs-popover #addPopover>\n <div class=\"w-[400px] overflow-hidden\">\n <ngs-tab-group>\n <ngs-tab label=\"Embed\">\n <div class=\"p-4\">\n <ngs-form-field class=\"w-full\">\n <input ngsInput [formControl]=\"form.controls.url\" placeholder=\"Paste in https://...\">\n <div ngsSuffix class=\"pe-2\">\n <button ngsButton=\"filled\" type=\"button\" [disabled]=\"form.invalid\" (click)=\"embed(trigger)\">Embed</button>\n </div>\n </ngs-form-field>\n <p class=\"text-xs text-center\">Works with links of PDFs, Google Drive, Google Maps, CodePen\u2026</p>\n </div>\n </ngs-tab>\n <ngs-tab label=\"Upload\">\n <div class=\"p-4\">\n <div>\n <button ngsButton=\"filled\" class=\"w-full\">Upload</button>\n </div>\n <p class=\"text-xs text-center mt-4\">Upload a file from your computer.</p>\n </div>\n </ngs-tab>\n </ngs-tab-group>\n </div>\n </ngs-popover>\n} @else {\n <div class=\"w-full bg-surface-container-low w-[700px] h-[400px]\">\n <iframe width=\"100%\" height=\"100%\" [src]=\"_content().url | safeResourceUrl\" frameborder=\"0\" allowfullscreen></iframe>\n </div>\n}\n" }]
|
|
372
|
-
}], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: true }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: true }] }], settings: [{ type: i0.Input, args: [{ isSignal: true, alias: "settings", required: true }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: true }] }] } });
|
|
373
|
-
|
|
374
|
-
export { EmbedBlock };
|
|
375
|
-
//# sourceMappingURL=ngstarter-ui-components-content-editor-embed-block-Bo3irEeG.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngstarter-ui-components-content-editor-embed-block-Bo3irEeG.mjs","sources":["../../../projects/components/content-editor/src/_builder/embed-block/embed-service.ts","../../../projects/components/content-editor/src/_builder/embed-block/embed-block.ts","../../../projects/components/content-editor/src/_builder/embed-block/embed-block.html"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable()\nexport class EmbedService {\n parse(rawUrl: string): { url: string; type: string } {\n const cleaned = (rawUrl || '').trim();\n if (!cleaned) {\n return { url: '', type: '' };\n }\n\n const withScheme = /^(https?:)?\\/\\//i.test(cleaned) ? cleaned : `https://${cleaned}`;\n\n let u: URL | null = null;\n try {\n u = new URL(withScheme);\n } catch {\n return { url: cleaned, type: '' };\n }\n\n const host = u.hostname.toLowerCase();\n const path = u.pathname.toLowerCase();\n const href = u.toString();\n\n if (path.endsWith('.pdf')) {\n return { url: href, type: 'pdf' };\n } else if (host.includes('youtu.be') || host.includes('youtube.com')) {\n return { url: this.toYoutubeEmbed(u), type: 'youtube' };\n } else if (host.includes('vimeo.com')) {\n return { url: this.toVimeoEmbed(u), type: 'vimeo' };\n } else if (host.includes('spotify.com')) {\n return { url: this.toSpotifyEmbed(u), type: 'spotify' };\n } else if (host.includes('maps.google.') || (host.includes('google.') && path.startsWith('/maps'))) {\n return { url: this.toGoogleMapsEmbed(u), type: 'google-maps' };\n } else if (host.includes('docs.google.')) {\n return { url: this.toGoogleDocsEmbed(u), type: 'google-docs' };\n } else if (host.includes('drive.google.')) {\n return { url: this.toGoogleDriveEmbed(u), type: 'google-drive' };\n } else if (host.includes('codepen.io')) {\n return { url: this.toCodepenEmbed(u), type: 'codepen' };\n } else if (host.includes('figma.com')) {\n return { url: this.toFigmaEmbed(u), type: 'figma' };\n } else if (host.includes('loom.com')) {\n return { url: this.toLoomEmbed(u), type: 'loom' };\n } else if (host.includes('twitter.com') || host === 'x.com' || host.endsWith('.x.com')) {\n return { url: this.toTwitterEmbed(u), type: 'twitter' };\n } else if (host.includes('instagram.com')) {\n return { url: this.toInstagramEmbed(u), type: 'instagram' };\n } else if (host.includes('tiktok.com')) {\n return { url: this.toTiktokEmbed(u), type: 'tiktok' };\n } else if (host.includes('soundcloud.com')) {\n return { url: this.toSoundcloudEmbed(u), type: 'soundcloud' };\n } else if (host.includes('stackblitz.com')) {\n return { url: this.toStackblitzEmbed(u), type: 'stackblitz' };\n } else if (host.includes('gist.github.com')) {\n return { url: href, type: 'gist' };\n } else {\n return { url: href, type: 'website' };\n }\n }\n\n // ==== Provider transformers ====\n private toYoutubeEmbed(u: URL): string {\n // Already embed\n if (/^\\/embed\\//.test(u.pathname)) {\n return `https://www.youtube.com${u.pathname}${u.search}`;\n }\n\n const host = u.hostname.toLowerCase();\n let id = '';\n let start = '';\n\n if (host.includes('youtu.be')) {\n id = u.pathname.split('/').filter(Boolean)[0] || '';\n // t or start\n start = this.extractYouTubeStart(u.searchParams);\n } else {\n // youtube.com variants\n if (u.searchParams.get('v')) {\n id = u.searchParams.get('v') || '';\n start = this.extractYouTubeStart(u.searchParams);\n } else if (u.pathname.startsWith('/shorts/')) {\n id = u.pathname.split('/')[2] || '';\n } else if (u.pathname.startsWith('/live/')) {\n id = u.pathname.split('/')[2] || '';\n }\n }\n\n const qs = start ? `?start=${start}` : '';\n return id ? `https://www.youtube.com/embed/${id}${qs}` : u.toString();\n }\n\n private extractYouTubeStart(params: URLSearchParams): string {\n const t = params.get('t') || params.get('start') || '';\n if (!t) return '';\n // t can be in format 1h2m3s or 90 or 1m30s\n const total = this.parseTimeToSeconds(t);\n return total ? String(total) : '';\n }\n\n private parseTimeToSeconds(t: string): number {\n if (/^\\d+$/.test(t)) return parseInt(t, 10);\n const re = /(?:(\\d+)h)?(?:(\\d+)m)?(?:(\\d+)s)?/i;\n const m = t.match(re);\n if (!m) return 0;\n const h = parseInt(m[1] || '0', 10);\n const mnt = parseInt(m[2] || '0', 10);\n const s = parseInt(m[3] || '0', 10);\n return h * 3600 + mnt * 60 + s;\n }\n\n private toVimeoEmbed(u: URL): string {\n // extract last numeric id\n const parts = u.pathname.split('/').filter(Boolean);\n const last = parts[parts.length - 1] || '';\n const id = /^(\\d+)$/.test(last) ? last : (parts.includes('videos') ? parts[parts.indexOf('videos') + 1] : '');\n return id ? `https://player.vimeo.com/video/${id}` : u.toString();\n }\n\n private toSpotifyEmbed(u: URL): string {\n const parts = u.pathname.split('/').filter(Boolean);\n if (parts[0] === 'embed') return u.toString();\n // /{type}/{id}\n if (parts.length >= 2) {\n const type = parts[0];\n const id = parts[1];\n return `https://open.spotify.com/embed/${type}/${id}`;\n }\n return u.toString();\n }\n\n private toGoogleMapsEmbed(u: URL): string {\n const p = u.pathname;\n if (p.includes('/maps/embed') || u.searchParams.get('output') === 'embed') {\n return u.toString();\n }\n // Best-effort wrap original URL as query for embed\n return `https://www.google.com/maps?output=embed&q=${encodeURIComponent(u.toString())}`;\n }\n\n private toGoogleDocsEmbed(u: URL): string {\n // document, presentation, spreadsheets, forms\n const parts = u.pathname.split('/').filter(Boolean);\n if (parts.length >= 3) {\n const product = parts[0]; // document|presentation|spreadsheets|forms\n const kind = parts[1]; // usually 'd'\n const id = parts[2];\n if (product === 'document') {\n return `https://docs.google.com/document/d/${id}/preview`;\n }\n if (product === 'presentation') {\n return `https://docs.google.com/presentation/d/${id}/embed`;\n }\n if (product === 'spreadsheets') {\n return `https://docs.google.com/spreadsheets/d/${id}/preview`;\n }\n if (product === 'forms') {\n return `https://docs.google.com/forms/d/${id}/viewform?embedded=true`;\n }\n }\n return u.toString();\n }\n\n private toGoogleDriveEmbed(u: URL): string {\n // /file/d/{id}/view -> /file/d/{id}/preview\n const parts = u.pathname.split('/').filter(Boolean);\n const idx = parts.indexOf('d');\n if (parts[0] === 'file' && idx >= 0 && parts[idx + 1]) {\n const id = parts[idx + 1];\n return `https://drive.google.com/file/d/${id}/preview`;\n }\n // open?id=... -> uc?export=preview&id=...\n const openId = u.searchParams.get('id');\n if (openId) {\n return `https://drive.google.com/uc?export=preview&id=${encodeURIComponent(openId)}`;\n }\n return u.toString();\n }\n\n private toCodepenEmbed(u: URL): string {\n const parts = u.pathname.split('/').filter(Boolean);\n const user = parts[0];\n const mode = parts[1]; // pen|full|details|embed\n const id = parts[2];\n if (mode === 'embed') return u.toString();\n if (user && id) {\n return `https://codepen.io/${user}/embed/${id}`;\n }\n return u.toString();\n }\n\n private toFigmaEmbed(u: URL): string {\n return `https://www.figma.com/embed?embed_host=share&url=${encodeURIComponent(u.toString())}`;\n }\n\n private toLoomEmbed(u: URL): string {\n const parts = u.pathname.split('/').filter(Boolean);\n if (parts[0] === 'embed') return u.toString();\n // /share/{id}\n if (parts[0] === 'share' && parts[1]) {\n return `https://www.loom.com/embed/${parts[1]}`;\n }\n return u.toString();\n }\n\n private toTwitterEmbed(u: URL): string {\n // Use twitframe to get an embeddable iframe\n return `https://twitframe.com/show?url=${encodeURIComponent(u.toString())}`;\n }\n\n private toInstagramEmbed(u: URL): string {\n // Append /embed to post/reel URLs\n let p = u.pathname;\n if (!p.endsWith('/')) p += '/';\n if (!p.endsWith('embed/')) {\n p += 'embed/';\n }\n return `${u.protocol}//${u.host}${p}`;\n }\n\n private toTiktokEmbed(u: URL): string {\n // Expect /@user/video/{id}\n const parts = u.pathname.split('/').filter(Boolean);\n const idx = parts.indexOf('video');\n if (idx >= 0 && parts[idx + 1]) {\n const id = parts[idx + 1];\n return `https://www.tiktok.com/embed/v2/${id}`;\n }\n return u.toString();\n }\n\n private toSoundcloudEmbed(u: URL): string {\n return `https://w.soundcloud.com/player/?url=${encodeURIComponent(u.toString())}`;\n }\n\n private toStackblitzEmbed(u: URL): string {\n // Ensure we have the embed parameter for StackBlitz iframe\n const url = new URL(u.toString());\n if (url.searchParams.get('embed') !== '1') {\n url.searchParams.set('embed', '1');\n }\n // Keep other parameters like file, terminal, ctl, hideExplorer if provided by user\n return url.toString();\n }\n}\n","import { Component, effect, untracked, DestroyRef, inject, input, signal, ChangeDetectionStrategy } from '@angular/core';\nimport { ContentBuilderStore } from '../../content-builder.store';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Icon } from '@ngstarter-ui/components/icon';\nimport { Popover, PopoverTriggerForDirective } from '@ngstarter-ui/components/popover';\nimport { Tab, TabGroup } from '@ngstarter-ui/components/tabs';\nimport { Button } from '@ngstarter-ui/components/button';\nimport { Input } from '@ngstarter-ui/components/input';\nimport { FormField, Suffix } from '@ngstarter-ui/components/form-field';\nimport { AbstractControl, FormBuilder, FormsModule, ReactiveFormsModule, ValidationErrors, ValidatorFn, Validators } from '@angular/forms';\nimport { EmbedService } from './embed-service';\nimport { SafeResourceUrlPipe } from '@ngstarter-ui/components/core';\nimport {\n CONTENT_BUILDER,\n ContentEditorEmbedBlockSettings,\n ContentEditorEmbedContent,\n ContentEditorItemProperty\n} from '../../types';\nimport { ContentBuilderComponent } from '../../content-builder/content-builder.component';\n\n@Component({\n selector: 'app-embed-block',\n imports: [\n Icon,\n Popover,\n PopoverTriggerForDirective,\n TabGroup,\n Tab,\n Button,\n FormField,\n Input,\n Suffix,\n FormsModule,\n ReactiveFormsModule,\n SafeResourceUrlPipe\n ],\n providers: [EmbedService],\n templateUrl: './embed-block.html',\n styleUrl: './embed-block.scss',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'class': 'ngs-embed-block',\n '[class.is-empty]': 'isEmpty()'\n }\n})\nexport class EmbedBlock {\n private store = inject(ContentBuilderStore);\n private contentBuilder = inject<ContentBuilderComponent>(CONTENT_BUILDER);\n private destroyRef = inject(DestroyRef);\n private formBuilder = inject(FormBuilder);\n private embedService = inject(EmbedService);\n\n id = input.required<string>();\n content = input.required<ContentEditorEmbedContent>();\n settings = input.required<ContentEditorEmbedBlockSettings>();\n props = input<ContentEditorItemProperty[]>([]);\n index = input.required<number>();\n\n private readonly embedUrlValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {\n const value = (control.value ?? '').toString();\n\n if (!value.trim()) {\n return null;\n }\n\n const { type } = this.embedService.parse(value);\n\n if (!type || type === 'website') {\n return { embedUrl: true };\n }\n\n return null;\n };\n\n protected form = this.formBuilder.nonNullable.group({\n url: ['', [Validators.required, this.embedUrlValidator]],\n });\n\n protected _content = signal<ContentEditorEmbedContent>({\n url: '',\n type: ''\n });\n protected _settings = signal<ContentEditorEmbedBlockSettings>({\n width: null,\n height: null\n });\n protected _props = signal<ContentEditorItemProperty[]>([]);\n readonly initialized = signal(false);\n\n constructor() {\n effect(() => {\n const content = this.content();\n const settings = this.settings();\n const props = this.props();\n untracked(() => {\n this._content.set({ ...content });\n this._settings.set({ ...settings });\n this._props.set([...props]);\n });\n });\n }\n\n ngOnInit() {\n this._content.set(this.content());\n this._settings.set(this.settings());\n this._props.set(this.props());\n this.contentBuilder\n .focusChanged\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n if (this.store.focusedBlockId() === this.id()) {\n\n }\n });\n }\n\n getData(): any {\n return {\n content: this._content(),\n props: this._props(),\n settings: this._settings()\n };\n }\n\n isEmpty() {\n return this.getData().content.url === '' && this.getData().content.type === '';\n }\n\n embed(trigger: PopoverTriggerForDirective) {\n this._content.set(this.embedService.parse(this.form.value.url || ''));\n trigger.api.close();\n this.store.updateBlock(this.id(), {...this.getData(), isEmpty: this.isEmpty()});\n this.contentBuilder.emitContentChangeEvent();\n }\n}\n","@if (isEmpty()) {\n <div class=\"bg-surface-container-low cursor-pointer hover:bg-surface-container p-4 rounded-2xl flex items-center gap-3\"\n #trigger=\"ngsPopoverTriggerFor\"\n [ngsPopoverTriggerFor]=\"addPopover\" position=\"below-center\" trigger=\"click\" hasBackdrop>\n <ngs-icon name=\"fluent:globe-24-regular\"/>\n <div class=\"text-sm\">Embed anything (PDFs, Google Docs, Google Maps, Spotify…)</div>\n </div>\n <ngs-popover #addPopover>\n <div class=\"w-[400px] overflow-hidden\">\n <ngs-tab-group>\n <ngs-tab label=\"Embed\">\n <div class=\"p-4\">\n <ngs-form-field class=\"w-full\">\n <input ngsInput [formControl]=\"form.controls.url\" placeholder=\"Paste in https://...\">\n <div ngsSuffix class=\"pe-2\">\n <button ngsButton=\"filled\" type=\"button\" [disabled]=\"form.invalid\" (click)=\"embed(trigger)\">Embed</button>\n </div>\n </ngs-form-field>\n <p class=\"text-xs text-center\">Works with links of PDFs, Google Drive, Google Maps, CodePen…</p>\n </div>\n </ngs-tab>\n <ngs-tab label=\"Upload\">\n <div class=\"p-4\">\n <div>\n <button ngsButton=\"filled\" class=\"w-full\">Upload</button>\n </div>\n <p class=\"text-xs text-center mt-4\">Upload a file from your computer.</p>\n </div>\n </ngs-tab>\n </ngs-tab-group>\n </div>\n </ngs-popover>\n} @else {\n <div class=\"w-full bg-surface-container-low w-[700px] h-[400px]\">\n <iframe width=\"100%\" height=\"100%\" [src]=\"_content().url | safeResourceUrl\" frameborder=\"0\" allowfullscreen></iframe>\n </div>\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAGa,YAAY,CAAA;AACvB,IAAA,KAAK,CAAC,MAAc,EAAA;QAClB,MAAM,OAAO,GAAG,CAAC,MAAM,IAAI,EAAE,EAAE,IAAI,EAAE;QACrC,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QAC9B;AAEA,QAAA,MAAM,UAAU,GAAG,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,OAAO,GAAG,CAAA,QAAA,EAAW,OAAO,EAAE;QAEpF,IAAI,CAAC,GAAe,IAAI;AACxB,QAAA,IAAI;AACF,YAAA,CAAC,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC;QACzB;AAAE,QAAA,MAAM;YACN,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;QACnC;QAEA,MAAM,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE;QACrC,MAAM,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE;AACrC,QAAA,MAAM,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE;AAEzB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UAAA,EAAA,mBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACL,MAAM,EAAA,QAAA,EAAA,aAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACN,WAAW,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,wSAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACX,mBAAmB,6MACnB,mBAAmB,EAAA,IAAA,EAAA,iBAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,KAAA,EAAA,CAAA;;2FAWV,UAAU,EAAA,UAAA,EAAA,CAAA;kBAzBtB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,OAAA,EAClB;wBACP,IAAI;wBACJ,OAAO;wBACP,0BAA0B;wBAC1B,QAAQ;wBACR,GAAG;wBACH,MAAM;wBACN,SAAS;wBACT,KAAK;wBACL,MAAM;wBACN,WAAW;wBACX,mBAAmB;wBACnB;AACD,qBAAA,EAAA,SAAA,EACU,CAAC,YAAY,CAAC,mBAGR,uBAAuB,CAAC,KAAK,EAAA,IAAA,EACxC;AACJ,wBAAA,OAAO,EAAE,iBAAiB;AAC1B,wBAAA,kBAAkB,EAAE;AACrB,qBAAA,EAAA,QAAA,EAAA,6sDAAA,EAAA;;;;;"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { computed, linkedSignal, signal, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import { moveItemInArray, CdkDrag, CdkDragHandle, CdkDropList } from '@angular/cdk/drag-drop';
|
|
4
|
-
import { createNgsHeadlessEditorText, createNgsHeadlessEditorId } from '@ngstarter-ui/components/headless-editor';
|
|
5
|
-
import { UploadArea, UploadTriggerDirective } from '@ngstarter-ui/components/upload';
|
|
6
|
-
import { Button } from '@ngstarter-ui/components/button';
|
|
7
|
-
import { Icon } from '@ngstarter-ui/components/icon';
|
|
8
|
-
import { FormField, Hint, Label } from '@ngstarter-ui/components/form-field';
|
|
9
|
-
import { Input } from '@ngstarter-ui/components/input';
|
|
10
|
-
import { Menu, MenuDivider, MenuItem, MenuTrigger } from '@ngstarter-ui/components/menu';
|
|
11
|
-
import { ImageViewerDirective, ImageViewerPictureDirective } from '@ngstarter-ui/components/image-viewer';
|
|
12
|
-
import { f as ContentEditorUploadBlockBase, b as contentEditorText } from './ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CZn1p9ek.mjs';
|
|
13
|
-
import { C as ContentEditorUploadStatus } from './ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs';
|
|
14
|
-
|
|
15
|
-
class ContentEditorGalleryBlock extends ContentEditorUploadBlockBase {
|
|
16
|
-
images = computed(() => this.content().images, /* @ts-ignore */
|
|
17
|
-
...(ngDevMode ? [{ debugName: "images" }] : /* istanbul ignore next */ []));
|
|
18
|
-
selectedId = linkedSignal({ ...(ngDevMode ? { debugName: "selectedId" } : /* istanbul ignore next */ {}), source: this.images,
|
|
19
|
-
computation: (images, previous) => {
|
|
20
|
-
if (images.some(image => image.id === previous?.value))
|
|
21
|
-
return previous.value;
|
|
22
|
-
const previousIndex = previous?.source.findIndex(image => image.id === previous.value) ?? 0;
|
|
23
|
-
return images[Math.min(Math.max(previousIndex, 0), images.length - 1)]?.id ?? null;
|
|
24
|
-
} });
|
|
25
|
-
selectedIndex = computed(() => this.images().findIndex(image => image.id === this.selectedId()), /* @ts-ignore */
|
|
26
|
-
...(ngDevMode ? [{ debugName: "selectedIndex" }] : /* istanbul ignore next */ []));
|
|
27
|
-
selectedImage = computed(() => this.images()[this.selectedIndex()] ?? null, /* @ts-ignore */
|
|
28
|
-
...(ngDevMode ? [{ debugName: "selectedImage" }] : /* istanbul ignore next */ []));
|
|
29
|
-
replacementId = signal(null, /* @ts-ignore */
|
|
30
|
-
...(ngDevMode ? [{ debugName: "replacementId" }] : /* istanbul ignore next */ []));
|
|
31
|
-
captionText = contentEditorText;
|
|
32
|
-
selectImage(id) { this.selectedId.set(id); }
|
|
33
|
-
previousImage() { const image = this.images()[this.selectedIndex() - 1]; if (image)
|
|
34
|
-
this.selectImage(image.id); }
|
|
35
|
-
nextImage() { const image = this.images()[this.selectedIndex() + 1]; if (image)
|
|
36
|
-
this.selectImage(image.id); }
|
|
37
|
-
changeAlt(id, event) { this.changeImage(id, { alt: event.target.value }); }
|
|
38
|
-
changeCaption(id, caption) { this.changeImage(id, { caption: [createNgsHeadlessEditorText(caption)] }); }
|
|
39
|
-
changeImage(id, data) {
|
|
40
|
-
this.save({ images: this.latestContent().images.map(image => image.id === id ? { ...image, ...data } : image) });
|
|
41
|
-
}
|
|
42
|
-
removeImage(id) { this.save({ images: this.latestContent().images.filter(image => image.id !== id) }); }
|
|
43
|
-
moveImage(index, direction) { this.reorderImage(index, index + direction); }
|
|
44
|
-
dropImage(event) {
|
|
45
|
-
this.reorderImage(event.previousIndex, event.currentIndex);
|
|
46
|
-
}
|
|
47
|
-
reorderImage(from, to) {
|
|
48
|
-
const images = [...this.latestContent().images];
|
|
49
|
-
if (from < 0 || to < 0 || from >= images.length || to >= images.length || from === to)
|
|
50
|
-
return;
|
|
51
|
-
moveItemInArray(images, from, to);
|
|
52
|
-
this.save({ images });
|
|
53
|
-
}
|
|
54
|
-
requestReplacement(id, trigger) {
|
|
55
|
-
this.replacementId.set(id);
|
|
56
|
-
trigger._handleClick();
|
|
57
|
-
}
|
|
58
|
-
async upload(event, replaceId = null) {
|
|
59
|
-
const files = replaceId ? event.files.slice(0, 1) : event.files;
|
|
60
|
-
await this.uploadFiles('gallery', { files, accept: file => file.type.startsWith('image/'), apply: results => {
|
|
61
|
-
const images = results.map(({ url, file }) => ({ id: createNgsHeadlessEditorId('image'), src: url, alt: file.name, caption: [] }));
|
|
62
|
-
if (replaceId)
|
|
63
|
-
this.changeImage(replaceId, { src: images[0].src });
|
|
64
|
-
else {
|
|
65
|
-
this.save({ images: [...this.latestContent().images, ...images] });
|
|
66
|
-
this.selectImage(images[0].id);
|
|
67
|
-
}
|
|
68
|
-
} });
|
|
69
|
-
}
|
|
70
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorGalleryBlock, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
71
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: ContentEditorGalleryBlock, isStandalone: true, selector: "ngs-content-editor-gallery-block", usesInheritance: true, ngImport: i0, template: "<div class=\"flex min-w-0 flex-col gap-4 p-3 sm:p-4\">\n <div class=\"flex flex-wrap items-center gap-3\">\n <span class=\"text-base font-semibold\">Carousel</span>\n <span class=\"text-sm text-on-surface-variant\">{{ images().length }} {{ images().length === 1 ? 'image' : 'images' }}</span>\n </div>\n @if (selectedImage(); as image) {\n <div class=\"gallery-preview relative overflow-hidden rounded-lg\" ngsImageViewer>\n <button ngsButton class=\"gallery-picture block w-full\" [fullWidth]=\"true\" ngsImageViewerPicture [sourceUrl]=\"image.src\" [caption]=\"captionText(image.caption)\" [attr.aria-label]=\"image.alt || 'View image'\">\n <img class=\"block aspect-video w-full object-cover\" [src]=\"image.src\" [alt]=\"image.alt\" draggable=\"false\">\n </button>\n <button ngsIconButton class=\"preview-action image-actions absolute right-3 top-3\" aria-label=\"Image actions\" [ngsMenuTriggerFor]=\"imageMenu\"><ngs-icon name=\"fluent:more-horizontal-24-regular\"/></button>\n @if (images().length > 1) {\n <button ngsIconButton class=\"preview-action absolute left-3 top-1/2 -translate-y-1/2\" aria-label=\"Previous image\" [disabled]=\"selectedIndex() === 0\" (click)=\"previousImage()\"><ngs-icon name=\"fluent:chevron-left-24-regular\"/></button>\n <button ngsIconButton class=\"preview-action absolute right-3 top-1/2 -translate-y-1/2\" aria-label=\"Next image\" [disabled]=\"selectedIndex() === images().length - 1\" (click)=\"nextImage()\"><ngs-icon name=\"fluent:chevron-right-24-regular\"/></button>\n }\n <span class=\"image-counter absolute bottom-3 left-1/2 -translate-x-1/2 rounded-full px-3 py-1 text-sm\" aria-live=\"polite\">{{ selectedIndex() + 1 }} / {{ images().length }}</span>\n </div>\n <div class=\"flex min-w-0 flex-col gap-2\">\n <span class=\"flex items-center gap-2 text-xs text-on-surface-variant\"><ngs-icon name=\"fluent:re-order-24-regular\" class=\"size-4\"/>Drag to reorder</span>\n <div class=\"thumbnail-strip flex min-w-0 gap-3 overflow-x-auto pb-2\">\n <div cdkDropList cdkDropListOrientation=\"horizontal\" [cdkDropListData]=\"images()\" (cdkDropListDropped)=\"dropImage($event)\" class=\"flex shrink-0 gap-3\">\n @for (thumbnail of images(); track thumbnail.id) {\n <div cdkDrag [cdkDragData]=\"thumbnail.id\" class=\"gallery-thumbnail flex shrink-0 items-center gap-1 rounded-lg p-1\" [attr.data-image-id]=\"thumbnail.id\">\n <div cdkDragHandle class=\"thumbnail-handle flex w-5 shrink-0 self-stretch items-center justify-center select-none touch-none\" [attr.title]=\"'Drag to reorder image ' + ($index + 1)\"><ngs-icon name=\"fluent:re-order-dots-vertical-24-regular\"/></div>\n <button ngsButton class=\"thumbnail-picture\" [class.is-selected]=\"selectedId() === thumbnail.id\" [attr.aria-label]=\"'Select image ' + ($index + 1)\" [attr.aria-pressed]=\"selectedId() === thumbnail.id\" (click)=\"selectImage(thumbnail.id)\">\n <img class=\"block h-18 w-32 rounded-md object-cover\" [src]=\"thumbnail.src\" [alt]=\"thumbnail.alt\" draggable=\"false\" loading=\"lazy\">\n </button>\n </div>\n }\n </div>\n <button ngsButton class=\"add-image-tile flex shrink-0 flex-col justify-center gap-1 rounded-lg\" ngsUploadTrigger accept=\"image/*\" [multiple]=\"true\" [disabled]=\"uploading()\" (fileSelected)=\"upload($event)\"><ngs-icon name=\"fluent:add-24-regular\"/>Add images</button>\n </div>\n </div>\n <div class=\"flex flex-col gap-3\">\n <ngs-form-field labelMode=\"external\" subscriptHiddenIfEmpty class=\"gallery-field\">\n <ngs-label>Caption</ngs-label>\n <input ngsInput [value]=\"captionText(image.caption)\" placeholder=\"Add a caption\" (input)=\"changeCaption(image.id, $any($event.target).value)\">\n </ngs-form-field>\n <ngs-form-field labelMode=\"external\" class=\"gallery-field\">\n <ngs-label>Alt text</ngs-label>\n <input ngsInput [value]=\"image.alt\" placeholder=\"Describe this image\" (input)=\"changeAlt(image.id, $event)\">\n <ngs-hint>Describe the image for screen readers</ngs-hint>\n </ngs-form-field>\n </div>\n <ngs-menu #imageMenu>\n <button ngs-menu-item [disabled]=\"uploading()\" (click)=\"requestReplacement(image.id, replaceUpload)\">Replace image</button>\n <button ngs-menu-item [disabled]=\"selectedIndex() === 0\" (click)=\"moveImage(selectedIndex(), -1)\">Move image earlier</button>\n <button ngs-menu-item [disabled]=\"selectedIndex() === images().length - 1\" (click)=\"moveImage(selectedIndex(), 1)\">Move image later</button>\n <ngs-menu-divider/>\n <button ngs-menu-item (click)=\"removeImage(image.id)\">Remove image</button>\n </ngs-menu>\n } @else {\n <ngs-upload-area ngsUploadTrigger accept=\"image/*\" [multiple]=\"true\" (fileSelected)=\"!uploading() && upload($event)\">\n <div class=\"flex flex-col items-center gap-2 py-8\"><ngs-icon name=\"fluent:image-multiple-24-regular\" class=\"size-8\"/><span>Add images to your carousel</span><span class=\"text-xs text-on-surface-variant\">Click or drop images here</span></div>\n </ngs-upload-area>\n }\n <button ngsButton hidden ngsUploadTrigger accept=\"image/*\" #replaceUpload=\"ngsUploadTrigger\" (fileSelected)=\"upload($event, replacementId())\" aria-label=\"Replace selected image\"></button>\n <ngs-content-editor-upload-status [task]=\"uploadTask\"/>\n</div>\n", styles: [":host{display:block;min-width:0;background:var(--ngs-content-editor-surface, var(--ngs-color-surface));border:1px solid var(--ngs-content-editor-border, var(--ngs-color-outline-variant));border-radius:var(--ngs-control-radius)}:host button[hidden]{display:none}:host .gallery-picture,:host .thumbnail-picture{--ngs-button-height: auto;--ngs-button-padding: 0;--ngs-button-content-gap: 0}:host .gallery-picture ::ng-deep .content,:host .thumbnail-picture ::ng-deep .content{display:block;width:100%}:host .preview-action{position:absolute;--ngs-button-height: calc(var(--spacing, .25rem) * 8);background:var(--ngs-content-editor-surface, var(--ngs-color-surface));color:var(--ngs-color-on-surface);box-shadow:var(--ngs-shadow-sm);border-radius:var(--ngs-radius-full)}:host .preview-action.image-actions{border-radius:var(--ngs-control-radius)}:host .image-counter{background:var(--ngs-color-black);color:var(--ngs-color-white)}:host .gallery-thumbnail{background:var(--ngs-color-surface-container-low)}:host .thumbnail-handle{cursor:grab}:host .thumbnail-handle:active{cursor:grabbing}:host .thumbnail-picture{border-radius:var(--ngs-radius-md)}:host .thumbnail-picture.is-selected{outline:2px solid var(--ngs-color-primary);outline-offset:1px}:host .add-image-tile{--ngs-button-height: auto;--ngs-button-padding: calc(var(--spacing, .25rem) * 3);--ngs-button-content-gap: var(--spacing, .25rem);width:calc(var(--spacing, .25rem) * 36);border:1px dashed var(--ngs-content-editor-border, var(--ngs-color-outline-variant))}:host .add-image-tile ::ng-deep .icon{left:auto;right:auto}:host .add-image-tile ::ng-deep .content{line-height:normal}:host ngs-form-field{--ngs-form-field-border-width: 1px;--ngs-form-field-border-color: var(--ngs-content-editor-field-border, var(--ngs-color-outline));--ngs-form-field-container-min-height: calc(var(--spacing, .25rem) * 9);--ngs-form-field-input-height: calc(var(--spacing, .25rem) * 9)}:host .cdk-drag-placeholder{opacity:.25}:host .cdk-drag-animating{transition:transform .18s ease}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: ContentEditorUploadStatus, selector: "ngs-content-editor-upload-status", inputs: ["task"] }, { kind: "component", type: UploadArea, selector: "ngs-upload-area", inputs: ["accept", "allowHover", "multiple"], outputs: ["fileSelected"], exportAs: ["ngsUploadArea"] }, { kind: "directive", type: UploadTriggerDirective, selector: "[ngsUploadTrigger]", inputs: ["accept", "multiple"], outputs: ["fileSelected"], exportAs: ["ngsUploadTrigger"] }, { kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }, { kind: "component", type: Icon, selector: "ngs-icon", inputs: ["name"], exportAs: ["ngsIcon"] }, { kind: "component", type: FormField, selector: "ngs-form-field", inputs: ["labelMode", "subscriptHiddenIfEmpty", "sameHeightAsButton"], exportAs: ["ngsFormField"] }, { kind: "component", type: Hint, selector: "ngs-hint", inputs: ["align"], exportAs: ["ngsHint"] }, { kind: "component", type: Label, selector: "ngs-label" }, { kind: "directive", type: Input, selector: "input[ngsInput], textarea[ngsInput]", inputs: ["id", "placeholder", "required", "disabled", "readonly", "errorStateMatcher"], exportAs: ["ngsInput"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "component", type: Menu, selector: "ngs-menu", inputs: ["themeSource", "role", "classList", "xPosition", "yPosition", "pushIntoViewport"], outputs: ["closed"], exportAs: ["ngsMenu"] }, { kind: "component", type: MenuDivider, selector: "ngs-menu-divider" }, { kind: "component", type: MenuItem, selector: "ngs-menu-item, [ngs-menu-item]", inputs: ["disabled", "role", "selected"], outputs: ["_triggered"], exportAs: ["ngsMenuItem"] }, { kind: "directive", type: MenuTrigger, selector: "[ngsMenuTriggerFor]", inputs: ["ngsMenuTriggerFor", "ngsMenuTriggerData", "ngsMenuDisabled", "xPosition", "yPosition", "ngsMenuTriggerRestoreFocus"], outputs: ["menuOpened", "menuClosed"], exportAs: ["ngsMenuTrigger"] }, { kind: "directive", type: ImageViewerDirective, selector: "[ngsImageViewer]", exportAs: ["ngsImageViewer"] }, { kind: "directive", type: ImageViewerPictureDirective, selector: "[ngsImageViewerPicture]", inputs: ["sourceUrl", "caption", "title", "description"], exportAs: ["ngsImageViewerPicture"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
72
|
-
}
|
|
73
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ContentEditorGalleryBlock, decorators: [{
|
|
74
|
-
type: Component,
|
|
75
|
-
args: [{ selector: 'ngs-content-editor-gallery-block', imports: [ContentEditorUploadStatus, UploadArea, UploadTriggerDirective, Button, Icon, FormField, Hint, Label, Input,
|
|
76
|
-
CdkDrag, CdkDragHandle, CdkDropList, Menu, MenuDivider, MenuItem, MenuTrigger, ImageViewerDirective, ImageViewerPictureDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex min-w-0 flex-col gap-4 p-3 sm:p-4\">\n <div class=\"flex flex-wrap items-center gap-3\">\n <span class=\"text-base font-semibold\">Carousel</span>\n <span class=\"text-sm text-on-surface-variant\">{{ images().length }} {{ images().length === 1 ? 'image' : 'images' }}</span>\n </div>\n @if (selectedImage(); as image) {\n <div class=\"gallery-preview relative overflow-hidden rounded-lg\" ngsImageViewer>\n <button ngsButton class=\"gallery-picture block w-full\" [fullWidth]=\"true\" ngsImageViewerPicture [sourceUrl]=\"image.src\" [caption]=\"captionText(image.caption)\" [attr.aria-label]=\"image.alt || 'View image'\">\n <img class=\"block aspect-video w-full object-cover\" [src]=\"image.src\" [alt]=\"image.alt\" draggable=\"false\">\n </button>\n <button ngsIconButton class=\"preview-action image-actions absolute right-3 top-3\" aria-label=\"Image actions\" [ngsMenuTriggerFor]=\"imageMenu\"><ngs-icon name=\"fluent:more-horizontal-24-regular\"/></button>\n @if (images().length > 1) {\n <button ngsIconButton class=\"preview-action absolute left-3 top-1/2 -translate-y-1/2\" aria-label=\"Previous image\" [disabled]=\"selectedIndex() === 0\" (click)=\"previousImage()\"><ngs-icon name=\"fluent:chevron-left-24-regular\"/></button>\n <button ngsIconButton class=\"preview-action absolute right-3 top-1/2 -translate-y-1/2\" aria-label=\"Next image\" [disabled]=\"selectedIndex() === images().length - 1\" (click)=\"nextImage()\"><ngs-icon name=\"fluent:chevron-right-24-regular\"/></button>\n }\n <span class=\"image-counter absolute bottom-3 left-1/2 -translate-x-1/2 rounded-full px-3 py-1 text-sm\" aria-live=\"polite\">{{ selectedIndex() + 1 }} / {{ images().length }}</span>\n </div>\n <div class=\"flex min-w-0 flex-col gap-2\">\n <span class=\"flex items-center gap-2 text-xs text-on-surface-variant\"><ngs-icon name=\"fluent:re-order-24-regular\" class=\"size-4\"/>Drag to reorder</span>\n <div class=\"thumbnail-strip flex min-w-0 gap-3 overflow-x-auto pb-2\">\n <div cdkDropList cdkDropListOrientation=\"horizontal\" [cdkDropListData]=\"images()\" (cdkDropListDropped)=\"dropImage($event)\" class=\"flex shrink-0 gap-3\">\n @for (thumbnail of images(); track thumbnail.id) {\n <div cdkDrag [cdkDragData]=\"thumbnail.id\" class=\"gallery-thumbnail flex shrink-0 items-center gap-1 rounded-lg p-1\" [attr.data-image-id]=\"thumbnail.id\">\n <div cdkDragHandle class=\"thumbnail-handle flex w-5 shrink-0 self-stretch items-center justify-center select-none touch-none\" [attr.title]=\"'Drag to reorder image ' + ($index + 1)\"><ngs-icon name=\"fluent:re-order-dots-vertical-24-regular\"/></div>\n <button ngsButton class=\"thumbnail-picture\" [class.is-selected]=\"selectedId() === thumbnail.id\" [attr.aria-label]=\"'Select image ' + ($index + 1)\" [attr.aria-pressed]=\"selectedId() === thumbnail.id\" (click)=\"selectImage(thumbnail.id)\">\n <img class=\"block h-18 w-32 rounded-md object-cover\" [src]=\"thumbnail.src\" [alt]=\"thumbnail.alt\" draggable=\"false\" loading=\"lazy\">\n </button>\n </div>\n }\n </div>\n <button ngsButton class=\"add-image-tile flex shrink-0 flex-col justify-center gap-1 rounded-lg\" ngsUploadTrigger accept=\"image/*\" [multiple]=\"true\" [disabled]=\"uploading()\" (fileSelected)=\"upload($event)\"><ngs-icon name=\"fluent:add-24-regular\"/>Add images</button>\n </div>\n </div>\n <div class=\"flex flex-col gap-3\">\n <ngs-form-field labelMode=\"external\" subscriptHiddenIfEmpty class=\"gallery-field\">\n <ngs-label>Caption</ngs-label>\n <input ngsInput [value]=\"captionText(image.caption)\" placeholder=\"Add a caption\" (input)=\"changeCaption(image.id, $any($event.target).value)\">\n </ngs-form-field>\n <ngs-form-field labelMode=\"external\" class=\"gallery-field\">\n <ngs-label>Alt text</ngs-label>\n <input ngsInput [value]=\"image.alt\" placeholder=\"Describe this image\" (input)=\"changeAlt(image.id, $event)\">\n <ngs-hint>Describe the image for screen readers</ngs-hint>\n </ngs-form-field>\n </div>\n <ngs-menu #imageMenu>\n <button ngs-menu-item [disabled]=\"uploading()\" (click)=\"requestReplacement(image.id, replaceUpload)\">Replace image</button>\n <button ngs-menu-item [disabled]=\"selectedIndex() === 0\" (click)=\"moveImage(selectedIndex(), -1)\">Move image earlier</button>\n <button ngs-menu-item [disabled]=\"selectedIndex() === images().length - 1\" (click)=\"moveImage(selectedIndex(), 1)\">Move image later</button>\n <ngs-menu-divider/>\n <button ngs-menu-item (click)=\"removeImage(image.id)\">Remove image</button>\n </ngs-menu>\n } @else {\n <ngs-upload-area ngsUploadTrigger accept=\"image/*\" [multiple]=\"true\" (fileSelected)=\"!uploading() && upload($event)\">\n <div class=\"flex flex-col items-center gap-2 py-8\"><ngs-icon name=\"fluent:image-multiple-24-regular\" class=\"size-8\"/><span>Add images to your carousel</span><span class=\"text-xs text-on-surface-variant\">Click or drop images here</span></div>\n </ngs-upload-area>\n }\n <button ngsButton hidden ngsUploadTrigger accept=\"image/*\" #replaceUpload=\"ngsUploadTrigger\" (fileSelected)=\"upload($event, replacementId())\" aria-label=\"Replace selected image\"></button>\n <ngs-content-editor-upload-status [task]=\"uploadTask\"/>\n</div>\n", styles: [":host{display:block;min-width:0;background:var(--ngs-content-editor-surface, var(--ngs-color-surface));border:1px solid var(--ngs-content-editor-border, var(--ngs-color-outline-variant));border-radius:var(--ngs-control-radius)}:host button[hidden]{display:none}:host .gallery-picture,:host .thumbnail-picture{--ngs-button-height: auto;--ngs-button-padding: 0;--ngs-button-content-gap: 0}:host .gallery-picture ::ng-deep .content,:host .thumbnail-picture ::ng-deep .content{display:block;width:100%}:host .preview-action{position:absolute;--ngs-button-height: calc(var(--spacing, .25rem) * 8);background:var(--ngs-content-editor-surface, var(--ngs-color-surface));color:var(--ngs-color-on-surface);box-shadow:var(--ngs-shadow-sm);border-radius:var(--ngs-radius-full)}:host .preview-action.image-actions{border-radius:var(--ngs-control-radius)}:host .image-counter{background:var(--ngs-color-black);color:var(--ngs-color-white)}:host .gallery-thumbnail{background:var(--ngs-color-surface-container-low)}:host .thumbnail-handle{cursor:grab}:host .thumbnail-handle:active{cursor:grabbing}:host .thumbnail-picture{border-radius:var(--ngs-radius-md)}:host .thumbnail-picture.is-selected{outline:2px solid var(--ngs-color-primary);outline-offset:1px}:host .add-image-tile{--ngs-button-height: auto;--ngs-button-padding: calc(var(--spacing, .25rem) * 3);--ngs-button-content-gap: var(--spacing, .25rem);width:calc(var(--spacing, .25rem) * 36);border:1px dashed var(--ngs-content-editor-border, var(--ngs-color-outline-variant))}:host .add-image-tile ::ng-deep .icon{left:auto;right:auto}:host .add-image-tile ::ng-deep .content{line-height:normal}:host ngs-form-field{--ngs-form-field-border-width: 1px;--ngs-form-field-border-color: var(--ngs-content-editor-field-border, var(--ngs-color-outline));--ngs-form-field-container-min-height: calc(var(--spacing, .25rem) * 9);--ngs-form-field-input-height: calc(var(--spacing, .25rem) * 9)}:host .cdk-drag-placeholder{opacity:.25}:host .cdk-drag-animating{transition:transform .18s ease}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
|
|
77
|
-
}] });
|
|
78
|
-
|
|
79
|
-
export { ContentEditorGalleryBlock };
|
|
80
|
-
//# sourceMappingURL=ngstarter-ui-components-content-editor-gallery-block-Cbh0nblW.mjs.map
|